This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Pointing GCC/GNU ld to different libc.so file
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Rocha Iran-QIR001 <Iran dot Rocha at motorola dot com>
- Cc: "'gcc-help at gnu dot org'" <gcc-help at gnu dot org>,"'binutils at sources dot redhat dot com'" <binutils at sources dot redhat dot com>
- Date: Sun, 20 Apr 2003 23:52:08 -0400
- Subject: Re: Pointing GCC/GNU ld to different libc.so file
- References: <4D87884B6A6D4E438A8592BCC9C85DCA0634ECC2@il02exm06.corp.mot.com>
On Fri, Apr 18, 2003 at 04:33:13PM -0500, Rocha Iran-QIR001 wrote:
> Hi,
>
> I am using GCC 3.2.3 and GNU Binutils 2.13 on a sparc-sun-solaris2.6 machine
> to build code for ia64-pc-linux-gnu. My site has a common location where the
> original ia64 libraries and include files are located. The original libc.so
> file available from this common location is the following:
>
> /* GNU ld script
> Use the shared library, but some functions are only in
> the static library, so try that secondarily. */
> GROUP ( /lib/libc.so.6.1 /usr/lib/libc_nonshared.a )
>
> The cross-compiler cannot build using this libc.so file since the target
> libraries are not available under /lib and /usr/lib in my host machine. In
> order for the cross-compiler to work, I need to use a libc.so file that
> looks like this:
>
> /* GNU ld script
> Use the shared library, but some functions are only in
> the static library, so try that secondarily. */
> GROUP ( libc.so.6.1 libc_nonshared.a ld-linux-ia64.so.2 )
>
> We would not like however to change the original libc.so. My question
> therefore is:
>
> Is there a way to ask GCC and GNU ld to use a different libc.so file?
If you use a 3.4 snapshot of GCC and a CVS snapshot of binutils, you
can use the --with-sysroot configure option. With 3.2.3/2.13, there's
no way to do this without replacing libc.so.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer