Date: Thu, 21 May 2009 11:20:21 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: xorquewasp@googlemail.com Cc: freebsd-hackers@freebsd.org Subject: Re: compiling system binutils as cross tools Message-ID: <alpine.BSF.2.00.0905211116310.25537@fledge.watson.org> In-Reply-To: <20090521095305.GA27043@logik.internal.network> References: <20090521095305.GA27043@logik.internal.network>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 21 May 2009, xorquewasp@googlemail.com wrote: > How do I compile the system binutils (contrib/binutils) as i386 -> x86_64 > cross utils? That is, binutils that will run on an i386 host but will > produce x86_64 binaries? > > I'm trying to produce a bootstrapping compiler for a port and need to get > these working. I've spent a while reading Makefiles but would rather get > information from someone who actually knows rather than waste *another* week > on this stuff. > > I'd rather not compile the entire world if it can be avoided. Not really my area, but if you haven't found "make toolchain" and "make buildenv" then you might want to take a look. Typically these will be combined with TARGET_ARCH=foo, and in your case foo is 'amd64'. The former builds the toolchain required for the architecture, and the latter creates a shell environment with paths appropriately munged and environments appropriately set to cross-compile using that chain. Normally the toolchain step is part of our integrated buildworld/buildkernel/etc process, but you can also use it for other things with buildenv. Robert N M Watson Computer Laboratory University of Cambridge
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0905211116310.25537>