Relocatable linking with relocations from format elf64-x86-64-freebsd (crt1_s.o) to format elf32-i386-freebsd (gcrt1.o) is not supported

Alexander Best arundel at freebsd.org
Fri Aug 19 08:01:05 UTC 2011


On Thu Aug 18 11, Dimitry Andric wrote:
> On 2011-08-18 19:35, Alexander Best wrote:
> ...
> >>>ld: Relocatable linking with relocations from format elf64-x86-64-freebsd
> >>>(crt1_s.o) to format elf32-i386-freebsd (gcrt1.o) is not supported
> >>Most likely, this is because you are forcing CC=clang, which does not
> >>work as expected.  Can you please post your /etc/make.conf and
> >>/etc/src.conf files, and show us any environment variables related to
> >>buildworld?  Also, how exactly are you running make buildworld?
> >
> >i've attached my src.conf, my make.conf and the output of 'env'. nothing
> >special, i'm using a simple 'make buildworld'.
> 
> The problem is in your make.conf. Effectively, you are doing:
> 
> CC = clang
> CXX = clang++
> 
> which will not work, at least not for the 32-bit compat stage on amd64.
> Please use the following fragment instead, which is recommended on
> <http://wiki.freebsd.org/BuildingFreeBSDWithClang>:
> 
> .if !defined(CC) || ${CC} == "cc"
> CC=clang
> .endif
> .if !defined(CXX) || ${CXX} == "c++"
> CXX=clang++
> .endif
> .if !defined(CPP) || ${CPP} == "cpp"
> CPP=clang -E
> .endif

thanks. that fixed the issue. seeing forward to simply setting CC/CXX/CPP to
clang or gcc directly and also to using "/", so one can use absolute paths.

cheers.
alex


More information about the freebsd-toolchain mailing list