Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2011 08:01:05 +0000
From:      Alexander Best <arundel@freebsd.org>
To:        Dimitry Andric <dim@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:  <20110819080105.GA92201@freebsd.org>
In-Reply-To: <4E4D6E01.40905@FreeBSD.org>
References:  <20110818050142.GA96873@freebsd.org> <4E4CB59B.3000005@FreeBSD.org> <20110818173508.GA92360@freebsd.org> <4E4D6E01.40905@FreeBSD.org>

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



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