This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Pointing GCC/GNU ld to different libc.so file


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?

I have tried to use -Wl,-T and -Wl,-c without success. I am able to make ld
load a different libc.so file using -c but I get a 'parse error'. I know
however that the syntax of libc.so is correct so I am not sure why ld can't
parse it.

Thanks for the help,
Iran Rocha


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]