Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Aug 2011 21:54:41 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Alexander Best <arundel@freebsd.org>
Cc:        freebsd-toolchain@freebsd.org
Subject:   Re: Relocatable linking with relocations from format elf64-x86-64-freebsd (crt1_s.o) to format elf32-i386-freebsd (gcrt1.o) is not supported
Message-ID:  <4E4D6E01.40905@FreeBSD.org>
In-Reply-To: <20110818173508.GA92360@freebsd.org>
References:  <20110818050142.GA96873@freebsd.org> <4E4CB59B.3000005@FreeBSD.org> <20110818173508.GA92360@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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