This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 3.4 installation problems: libc is somewhere unusual
- From: Segher Boessenkool <segher at koffie dot nl>
- To: Paul Jarc <prj at po dot cwru dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 11 Sep 2003 22:50:37 +0200
- Subject: Re: 3.4 installation problems: libc is somewhere unusual
- References: <m3fzj3xivt.fsf@multivac.cwru.edu>
Paul Jarc wrote:
My glibc installation is not in the usual place. This means I have to
pull a few tricks to build gcc, but the tricks that worked for gcc up
to 3.3.1 (tweaking C_INCLUDE_PATH and LIBRARY_PATH, and adding the
appropriate -Wl,--dynamic-linker and -Wl,-R arguments to
STAGE1_CFLAGS, BOOT_CFLAGS, and LDFLAGS) don't work for 3.4-20030910.
What I did to solve a situation quite like this:
- edit your linker scripts (in directory ldscripts/) to
include SEARCH_DIR("/wherever/your/glibc/is");
(preferably before the other paths already there, don't
want to pick up an old library by mistake).
(Yes, build and install a separate binutils to go
with your new glibc and GCC; that'll save you a lot
of problems).
- edit libc.so to explicitly link to ld.so (ld-linux.so.2,
in your case); imho this should be there always, as
libc.so.N requires to be linked (at runtime) against
the matching version of ld.so anyway.
- edit the ld.so.conf that goes with your glibc to include
the path to your glibc (and run the new ldconfig).
- put the new binutils in front of your path, and everything
should Just Work(tm).
I think I didn't forget anything here, but feel free to ask
more if so. But off-list, as this is not really a GCC
problem, more a problem with the rest of your toolchain.
Segher