tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

eh_globals.o in libstdc++.a not relocatable?



Hi!

I'm trying to package libjit from gcc. I started with gcc10 because I
have that installed anyway.

I started a package in wip/gcc10-libjit. It wants to compile its own
libintl (I didn't find a way around that yet) and I had to add -fPIC
to the BOOT_CXFLAGS for that.

Now it failes linking with:

... cc1-checksum.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a ./../intl/libintl.a  ../libbacktrace/.libs/libbacktrace.a ../libiberty/pic/libiberty.a ../libdecnumber/libdecnumber.a  -L/scratch/lang/gcc10-libjit/work/build/./isl/.libs  -lisl -L/scratch/lang/gcc10-libjit/work/build/./gmp/.libs -L/scratch/lang/gcc10-libjit/work/build/./mpfr/src/.libs -L/scratch/lang/gcc10-libjit/work/build/./mpc/src/.libs -lmpc -lmpfr -lgmp -rdynamic  -lz
ld: /usr/lib/libstdc++.a(eh_globals.o): relocation R_X86_64_TPOFF32 against `_ZZN12_GLOBAL__N_110get_globalEvE6global' can not be used when making a shared object; recompile with -fPIC

and adding -fPIC to BOOT_CXXFLAGS or CXXFLAGS obviously doesn't help
for that one :)

On the other hand:

$ ar x /usr/lib/libstdc++.a eh_globals.o
$ file eh_globals.o
eh_globals.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped

so eh_globals.o seems to be relocatable?

$ nm eh_globals.o
                 U _GLOBAL_OFFSET_TABLE_
0000000000000000 b _ZZN12_GLOBAL__N_110get_globalEvE6global
0000000000000010 T __cxa_get_globals
0000000000000000 T __cxa_get_globals_fast


Any ideas what's up here or how to fix that?

Thanks,
 Thomas


Home | Main Index | Thread Index | Old Index