[Bug bootstrap/25794] New: gcc won't link to new local glibc
davek at csh dot rit dot edu
gcc-bugzilla@gcc.gnu.org
Sun Jan 15 15:02:00 GMT 2006
I can't figure out how to get gcc to build using a local build of glibc. I've
built and installed glibc-2.3.6 in /usr/glibc2. As I understand it, I need to
make a cross-compiler in order to make gcc with the new glibc2 (nothing told me
to do this, its just the only way I can kinda get it to work) Here's my
gcc-build configuration:
../gcc-4.0.2/configure --enable-languages=c,c++ --with-sysroot=/usr/glibc2
--with-newlib
and my build command:
make BOOT_CFLAGS="-Wl,--dynamic-linker=/usr/glibc2/lib/ld-linux.so.2"
bootstrap4
which will make the stage1 compiler, but will fail as soon as it tries to use
it ->
make[2]: Leaving directory `/usr/home/davek/download/gcc-build/gcc'
echo timestamp > stage1_copy
echo stage2_build > stage_last
make CC=" stage1/xgcc -Bstage1/ -B/usr/local/i686-pc-linux-gnu/bin/"
CC_FOR_BUIL
D=" stage1/xgcc -Bstage1/ -B/usr/local/i686-pc-linux-gnu/bin/" \
STAGE_PREFIX=stage1/ \
ADAFLAGS="" CFLAGS="-O2 -g -fomit-frame-pointer" LDFLAGS=""
WARN_CFLAGS
="\$(GCC_WARN_CFLAGS)" STRICT_WARN="-pedantic -Wno-long-long
-Wno-variadic-macro
s -Wold-style-definition " libdir=/usr/local/lib LANGUAGES="c gcov gcov-dump
c++
" MAKEINFO="/home/davek/download/gcc-4.0.2/missing makeinfo
--split-size=5000000
" MAKEINFOFLAGS="--no-split" MAKEOVERRIDES= OUTPUT_OPTION="-o \$@" \
CFLAGS="-O2 -g -fomit-frame-pointer" WERROR=""
make[2]: Entering directory `/usr/home/davek/download/gcc-build/gcc'
stage1/xgcc -Bstage1/ -B/usr/local/i686-pc-linux-gnu/bin/ -c -O2 -g
-fomit-fra
me-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-pro
totypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition
-DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.0.2/gcc
-I../../gcc-
4.0.2/gcc/build -I../../gcc-4.0.2/gcc/../include
-I../../gcc-4.0.2/gcc/../libcpp
/include -o build/genmodes.o ../../gcc-4.0.2/gcc/genmodes.c
stage1/xgcc -Bstage1/ -B/usr/local/i686-pc-linux-gnu/bin/ -c -O2 -g
-fomit-fra
me-pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-pro
totypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition
-DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.0.2/gcc
-I../../gcc-
4.0.2/gcc/build -I../../gcc-4.0.2/gcc/../include
-I../../gcc-4.0.2/gcc/../libcpp
/include -o build/errors.o ../../gcc-4.0.2/gcc/errors.c
stage1/xgcc -Bstage1/ -B/usr/local/i686-pc-linux-gnu/bin/ -O2 -g
-fomit-frame-
pointer -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-protot
ypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition
-D
HAVE_CONFIG_H -DGENERATOR_FILE -o build/genmodes \
build/genmodes.o build/errors.o
../build-i686-pc-linux-gnu/libiberty/libiberty.
a
/usr/glibc2/lib/libc.so.6: undefined reference to `_rtld_global@GLIBC_PRIVATE'
/usr/glibc2/lib/libc.so.6: undefined reference to
`__libc_enable_secure@GLIBC_PR
IVATE'
/usr/glibc2/lib/libc.so.6: undefined reference to
`_rtld_global_ro@GLIBC_PRIVATE
'
/usr/glibc2/lib/libc.so.6: undefined reference to
`_dl_out_of_memory@GLIBC_PRIVA
TE'
/usr/glibc2/lib/libc.so.6: undefined reference to `_dl_argv@GLIBC_PRIVATE'
collect2: ld returned 1 exit status
make[2]: *** [build/genmodes] Error 1
make[2]: Leaving directory `/usr/home/davek/download/gcc-build/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/usr/home/davek/download/gcc-build/gcc'
make: *** [bootstrap4] Error 2
It's still linking against /lib/ld-linux.so.2, which I don't think it should
be. I'm sure its a magic variable I'm not setting somewhere.
In short: how do you compile gcc with a local build of glibc?
--
Summary: gcc won't link to new local glibc
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: davek at csh dot rit dot edu
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25794
More information about the Gcc-bugs
mailing list