canadian cross host mingw: build of liblto_plugin-0.dll fails
Titus von Boxberg
Fri Sep 15 11:33:00 GMT 2017
on opensuse linux, I'm trying to build an arm-none toolchain for host mingw-w64
with a fairly recent crosstool-NG.
As the build machine compiler I'm using gcc-7.2 from opensuse package
Everything is going smooth except that in the build step for the final gcc
libtool refuses to generate the liblto_plugin-0.dll
The command line is:
./libtool --tag=CC --tag=disable-static --mode=link x86_64-host_w64-mingw32-gcc -Wall -O2 -g -pipe -I/home/ELBE/titus/tmp/m32-ctng-m7/.build/HOST-x86_64-w64-mingw32/arm-m7-eabi/buildtools/complibs-host/include -Os -D__USE_MINGW_ACCESS -Wc,-static-libgcc -no-undefined -bindir "/opt/cross/arm-m7-eabi/bin" -module -bindir /opt/cross/arm-m7-eabi/libexec/gcc/arm-m7-eabi/7.2.0 -Wc,../libiberty/libiberty.a -Xcompiler '-static-libstdc++' -Xcompiler '-static-libgcc' '-L/home/ELBE/titus/tmp/m32-ctng-m7/.build/HOST-x86_64-w64-mingw32/arm-m7-eabi/buildtools/complibs-host/lib' '-lstdc++' '-lm' '-Wl,--stack,12582912' -o liblto_plugin.la -rpath /opt/cross/arm-m7-eabi/libexec/gcc/arm-m7-eabi/7.2.0 lto-plugin.lo
The message is:
*** Warning: linker path does not have real file for library -lstdc++.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libstdc++ but no candidates were found. (...for file magic test)
*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module liblto_plugin. Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.
libtool is looking into these paths:
I found that the opensuse c++ runtime package installs libstdc++-6.dll
into the bin directory of the sysroot
When manually copying libstdc++-6.dll into the sysroot's lib directory, libtool is happy.
Any ideas where to look to get this fixed reliably?
More information about the crossgcc