This is the mail archive of the mailing list for the GCC 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]

gcc 4.0.0 x86_64 static linking of libstdc++.a


I'm facing the following problem: I want to create a shared library on Linux
(Red Hat Enterprise 3) / Opteron, with gcc 4.0.0 & binutils 2.16. When
compiling in 32-bit mode (with -m32) everything works, but in 64-bit mode
(with -m64) the following error message appears:

gcc -shared   {list of .o files}  -ldl -lm

 -m64 -static-libgcc -fPIC 
-Wl,-soname -Wl, -o .libs/

relocation R_X86_64_32 against `std::bad_typeid::~bad_typeid()' can not be
used when making a shared object; recompile with
could not read symbols: Bad value
collect2: ld returned 1 exit status

all object files were compiled with the following switches (c/c++): -O3 
-fno-exception -m64 -fPIC

What does the error message mean? Is gcc 4.0.0 (or at least libstdc++.a)
miscompiled, or is it a gcc configuration problem:

gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /home/gcc_compile/opt3/gcc-4.0.0/configure 
--prefix=/opt/dessup/gnu_2004/gcc400/opt3 --disable-nls --disable-werror 
--with-local-prefix=/opt/dessup/gnu_2004/tools/opt3 --with-gnu-as 
--with-as=/opt/dessup/gnu_2004/gcc400/opt3/bin/as --with-gnu-ld 
Thread model: posix
gcc version 4.0.0

thanks for your time,
Roland Lengfeldner

5 GB Mailbox, 50 FreeSMS
+++ GMX - die erste Adresse für Mail, Message, More +++

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