Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 May 2011 09:17:23 +0200
From:      "O. Hartmann" <ohartman@mail.zedat.fu-berlin.de>
To:        Dimitry Andric <dim@FreeBSD.org>
Cc:        Olivier Smedts <olivier@gid0.org>, freebsd-current@freebsd.org
Subject:   Re: Building FreeBSD 9.0-CUR/amd64 with CLANG fails
Message-ID:  <4DC0FD83.5080504@mail.zedat.fu-berlin.de>
In-Reply-To: <4DC0F98D.3020601@FreeBSD.org>
References:  <4DBDB8D4.6050102@mail.zedat.fu-berlin.de>	<BANLkTimAhmHh33FuwB6o%2BB5iSOORV-PmMQ@mail.gmail.com> <4DC04F29.2050401@mail.zedat.fu-berlin.de> <4DC0F98D.3020601@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 05/04/11 09:00, Dimitry Andric wrote:
> On 2011-05-03 20:53, O. Hartmann wrote:
> ...
>>>> ld -m elf_i386_fbsd -Y P,/usr/obj/usr/src/lib32/usr/lib32 =EF=BF=BD-=
o
>>>> gcrt1.o -r
>>>> crt1_s.o gcrt1_c.o
>>>> ld: Relocatable linking with relocations from format
>>>> elf64-x86-64-freebsd
>>>> (crt1_s.o) to format elf32-i386-freebsd (gcrt1.o) is not supported
> ...
>> Today, I tried again, after CLANG/LLVM has been updated to version 3.0=
=2E
>> Same error.
>>
>> This is the addendum I made to the /etc/make.conf:
>>
>> ##
>> ## CLANG
>> ##
>> .if defined(USE_CLANG)
>> .if !defined(CC) || ${CC} =3D=3D "cc"
>> CC=3Dclang
>> .endif
>> .if !defined(CXX) || ${CXX} =3D=3D "c++"
>> CXX=3Dclang++
>> .endif
>> # Don't die on warnings
>> NO_WERROR=3D
>> WERROR=3D
>> # Don't forget this when using Jails!
>> NO_FSCHG=3D
>> .endif
>
> Ok, that looks good, I use a similar construction. However, in my case
> it works fine, so there must be something special on your system that
> breaks the build.
>
> What happens here, is that the 32-bit stage on amd64 fails, because it
> tries to link together 64-bit and 32-bit object files, which is not
> allowed. This can occur if Makefile.inc1 cannot set CC to the correct
> value, but there might also be something else going on.
>
> To debug this further, can you please post:
> - Your full /etc/make.conf
> - Your full /etc/src.conf
> - Any modifications you made to your source tree
> - The specific procedure you use for buildworld
> - An url to a full build log (don't post it to the list, because it wil=
l
> be rather large)
>


Sorry for the noise.
But when I tried to compile essential ports (essential to me), like=20
x11-wm/windowmaker, mulitmedia/ffmpeg, for instance, I run into serious=20
compiler/assembler error with LLVM/CLANG. I guess the ports- tree isn't=20
mature for clang. So am I right in this thinking: leaving /etc/make.conf =

untouched in terms of not putting there the CLANG build construct and=20
putting this instead into /etc/src.conf will only affect the OS' source=20
tree to be build by clang and all ports are build by the antique=20
system's gcc 4.2.1?

Oliver




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DC0FD83.5080504>