This is the mail archive of the
mailing list for the GCC project.
Re: Trying to build gcc cross compiler from linux to freebsdâ
- From: Kai Ruottu <kai dot ruottu at wippies dot com>
- To: NiccolÃ Ferrari <niccolo dot ferrari at hotmail dot it>, "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Wed, 18 Mar 2015 00:49:36 +0200
- Subject: Re: Trying to build gcc cross compiler from linux to freebsdâ
- Authentication-results: sourceware.org; auth=none
- References: <DUB127-W448B8269BE5FEA4E66EADB8F030 at phx dot gbl> <5508AA6F dot 9090703 at wippies dot com>
18.3.2015, 0:27, Kai Ruottu kirjoitti:
17.3.2015, 21:14, NiccolÃ Ferrari kirjoitti:
I was trying to compile a gcc cross compiler for linux x86_64
(build and host) to freebsd x86_64. I tried to follow this
The steps are :
1. choose a sysroot where to put the C headers and libraries for the
target (usually in '/usr/include' and '/usr/lib'
on the native target system)
2. copy them onto the sysroot, for example '$sysroot/usr/include' and
'$sysroot/usr/lib' on the cross host
3. configure the GNU binutils and GCC using '--with-sysroot=$sysroot'
to tell where the target stuff is on the
cross host system. Build and install them, binutils first, GCC
4. be happy and try making a "Hello World" app for the target,
compiling it on the cross host...
I looked what the :
told and it seems these instructions are for the "pre-sysroot" time...
If one makes one's ow $sysroot to have
a 1-to-1 image to the target's native install scheme for the headers and
libraries then things should be much
easier. Especially when the target is a bi-arch system with separate
64-bit (default) and 32-bit libraries and
separate places for the shared libs (.so) and the static archives (.a).
Which I expect the x86_64-freebsd* systems
being just like the x86_64-linux-gnu systems are...
My own "standard" place for a $sysroot is '/opt/host-$target', in your
case the chosen $sysroot would be :
and there those possible 'lib*', 'usr/lib*', 'usr/include' etc
directories the target system has as its C library