This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: issues with gcc 4.4.6
- From: "GUPTA, GAURAV G (GAURAV)" <gaurav dot g dot gupta at alcatel-lucent dot com>
- To: Kai Ruottu <kai dot ruottu at wippies dot com>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Mon, 18 Mar 2013 14:21:25 +0530
- Subject: RE: issues with gcc 4.4.6
Kai
-----Original Message-----
From: Kai Ruottu [mailto:kai.ruottu@wippies.com]
Sent: Sunday, March 17, 2013 2:03 PM
To: GUPTA, GAURAV G (GAURAV)
Cc: gcc-help@gcc.gnu.org
Subject: Re: issues with gcc 4.4.6
On 17.3.2013 5:23, GUPTA, GAURAV G (GAURAV) wrote:
>
> Kai
>
> I started fresh but now I am hitting the below error . My assessment of the problem is why
> this problem is coming because I compiled/configured my binutils also with same sysroot .
>
> /local/gagupta/gccfolder/crosstoolsv1/x86_64-redhat-linux-gnu/bin/ld: skipping incompatible
> /local/gagupta/gccfolder/crosstoolsv1/sysroot/usr/lib/libc.so when searching for -lc
> /local/gagupta/gccfolder/crosstoolsv1/x86_64-redhat-linux-gnu/bin/ld: cannot find -lc
You need both the default 64-bit and the optional 32-bit C library in sysroot, the 64-bit
libraries in 'lib64' & 'usr/lib64' and the 32-bit libraries in 'lib' & 'usr/lib'. You maybe
installed only the 32-bit ones?
But the 'libc.so' normally isn't a binary file but a text file, a linker script, which puts
the linker to link against the 'libc.so.6' and 'libc_nonshared.a' and maybe 'ld-linux.so.2'
(in the 32-bit case). So complaining about the script is a little odd. Please check the
situation in the '*lib64' and '*lib' directories.
If you don't need the 32-bit anywhere, the use '--disable-multilib' in the GCC configure,
then the build doesn't try to create the 32-bit 'libgcc', 'libstdc++' etc.
[Gaurav] - Just one thought is there some special provision that needs to be done while building binary utilities so that ld is built using the libc present in sysroot rather than host system libc.
Btw following is my configure options for binutils
AR=ar AS=as ${SOURCES_BINUTILS}/configure \
--prefix=${CROSS_TOOLS} \
--target=${TARGET} \
--with-sysroot=${SYSROOT} \
--disable-nls --enable-shared