From owner-freebsd-toolchain@FreeBSD.ORG Fri Aug 19 08:01:05 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id C8E3A106564A; Fri, 19 Aug 2011 08:01:05 +0000 (UTC) Date: Fri, 19 Aug 2011 08:01:05 +0000 From: Alexander Best To: Dimitry Andric Message-ID: <20110819080105.GA92201@freebsd.org> References: <20110818050142.GA96873@freebsd.org> <4E4CB59B.3000005@FreeBSD.org> <20110818173508.GA92360@freebsd.org> <4E4D6E01.40905@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E4D6E01.40905@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 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2011 08:01:05 -0000 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 > : > > .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