Can you build libstdc++ without using /usr/include, /lib, /usr/lib on thebuild machine?

Steve E Sherman stevees@us.ibm.com
Fri Dec 8 07:16:00 GMT 2000


I am trying to build on a Redhat 6.2 system (2.2 kernel). I want to build
my own kernel (2.4), glibc, and libstdc++ libraries (as well as some
other packages) on this machine without using any the local machine's
files. I can build my version of the kernel just fine. I can build
glibc so that it uses the my kernel's header files. How can I build
libstdc++ so that it uses my kernel and my glibc.

I am  trying to build the egcs-1.1.2 code and am using the 2.4 kernel and
glibc-2.1.3
I've tried several things like:

CFLAGS=my-glibc-dir/include CXXFLAGS=my-glibc-dir/include ../configure
--prefix=my_glibc-dir --enable-threads --enable-share
--target=i686-redhat-linux

setting CFLAGS and CXXFLAGS to point to my glibc header files instead of
the ones in /usr/include. However, I get messages like:
Cannot find //lib/libc_nonshared.a

This library is in my-glibc-dir/lib. The // looks like a variable that
wasn't defined but I can't find an explicit mention to this library in the
egcs package
so maybe its internal to the compiler? I also get messages from xgcc
telling me that it can't find the GNU C library minor version number
(defined in
feature.h). The only way I've gotten this to build is to under egcs-1.1.2
is to:

mkdir obj-i686-redhat-linux/libstdc++ and obj-686-redhat-linux/libiberty
issue the configure statement above in both the libstdc++ anfd libiberty
subdirs
issue make all-target-libstdc++

But this uses the native libraries and not the ones I've built. Does the
egcs/libstdc++ require you to have its dependecies native on the build
machine?
Any ideas? Thanks

Steve

Steve
=======================================================================
Steve Sherman,  IBM
Internet ID: stevees@us.ibm.com   Notes ID: Steve E
Sherman/Raleigh/IBM@IBMUS
Phone: (919) 254-0446    T/L: 444-0446



More information about the Gcc-help mailing list