This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Building a x86_64/x86_64 cross-compiler
- From: Oleg Smolsky <oleg dot smolsky at riverbed dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 13 Jul 2013 08:58:47 -0700
- Subject: Re: Building a x86_64/x86_64 cross-compiler
- References: <51DBB26B dot 6040304 at riverbed dot com>
On 2013-07-08 23:49, Oleg Smolsky wrote:
build/genhooks "Target Hook" \
> tmp-target-hooks-def.h
build/genhooks: /lib64/libc.so.6: version `GLIBC_2.14' not found
(required by build/genhooks)
I am using glibc 2.16.0 and have no idea where this thing came from.
The binary does not run as the system's glibc (well, that very .so) is
version 2.12.
I built glibc this way:
../glibc-2.16.0/configure --prefix=/work/osmolsky/_gcc-sr-build/gcc48
--target=x86_64-unknown-linux-gnu
--with-headers=/work/osmolsky/_gcc-sr-build/sysroot/usr/include
--enable-kernel=2.6.32 --without-selinux
Just figured it out - there are a few things specific to glibc that are
vital to making a valid cross-compiler (even for my intel-to-intel case):
1) host and target should to use the same version of glibc (redhat's
source rpm also has a shash of patches)
2) glibc takes the --host argument (while I was feeding --target)
3) redhat's source rpm passes additional options to configure
So, people playing with the --with-sysroot option and building
cross-compilers must really be careful with GLibc.
Oleg.