Le 04/02/2012 21:30, Pierre Labastie a écrit : > maybe link libstdc++ to this directory, something like: > ln -s /tools/lib/libstdc++.a `dirname $(gcc > --print-libgcc-file-name)`/libstdc++.a > could be added to the "readjusting" instructions. After doing that, > gmp's configure finds that 'g++ -static' works. Whether it introduces > other problems, I have not tested yet. > It does introduce other problems! While building gmp, it stops with: /bin/sh ./libtool --tag=CXX --mode=link g++ -O3 -pipe -march=native -versi on-info 6:3:2 -o libgmpxx.la -rpath /usr/lib dummy.lo cxx/isfuns.lo cxx/ismpf.l o cxx/ismpq.lo cxx/ismpz.lo cxx/ismpznw.lo cxx/osdoprnti.lo cxx/osfuns.lo cxx/os mpf.lo cxx/osmpq.lo cxx/osmpz.lo libgmp.la libtool: link: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/crti.o /tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/crtbeginS.o .libs/dummy.o cxx/.libs/isfuns.o cxx/.libs/ismpf.o cxx/.libs/ismpq.o cxx/.libs/ismpz.o cxx/.libs/ismpznw.o cxx/.libs/osdoprnti.o cxx/.libs/osfuns.o cxx/.libs/osmpf.o cxx/.libs/osmpq.o cxx/.libs/osmpz.o -Wl,-rpath -Wl,/sources/gmp-5.0.3/.libs ./.libs/libgmp.so -L/tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.2 -L/tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../x86_64-unknown-linux-gnu/lib -lstdc++ -lm -lc -lgcc_s /tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/crtendS.o /usr/lib/crtn.o -O3 -march=native -Wl,-soname -Wl,libgmpxx.so.4 -o .libs/libgmpxx.so.4.2.3 /tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../x86_64-unknown-linux-gnu/bin/ld: /tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/libstdc++.a(ctype.o): relocation R_X86_64_32S against `vtable for std::ctype<wchar_t>' can not be used when making a shared object; recompile with -fPIC /tools/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/libstdc++.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[3]: *** [libgmpxx.la] Error 1 [...]
Looks like the libstdc++.a built during chapter 5 cannot be used... Some missing -fPIC during build of libstdc++? (-fPIC is indeed used for C++ bindings during the build of gmp) So, I do not know what to do. Well, does it make a difference if not building the libgmpxx library with -static? Is there a package which uses libgmpxx anyway? (not even sure gcc needs the C++ bindings). So, maybe not worth worrying about it. Regards Pierre -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
