public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* MinGW Windows-specific linking warnings
@ 2014-09-19 16:14 Patrick Plenefisch
  0 siblings, 0 replies; only message in thread
From: Patrick Plenefisch @ 2014-09-19 16:14 UTC (permalink / raw)
  To: gcc-help

Hi,

I'm currently trying to build GCC 4.9.1 cross toolchains for arm
softfp targets (arm7-a, arm-linux-gnueabi). Due to circumstances
beyond my control, I can't put a "libstdc++.so.6" file on our target
because some core system libraries use a old version of it and
politics. Due to this, and the fact that my application is part of a
fast-turnover application layer, I have patched GCC's configure to
output the file libstdc++.so.6.0.20 instead, so our application uses
the full path to the minor version, while the system uses the older
libstdc++.so.6. This setup is working very well and as expected,
however when building on MinGW-cross (host=i686-w64-mingw32,
build=x86_64-linux-gnu, target=arm-linux-gnueabi), we start getting
these warnings (but everything works as expected)
c:/{long path}/bin/ld.exe: warning: libstdc++.so.6, needed by {a small
library built with the old compiler}, not found (try using -rpath or
-rpath-link)
This warning, while trivial to fix by updating the library, struck me
as odd, since adding --verbose shows it is finding files in the exact
same directory as the one containing copies of libstdc++.so.6.0.20 as
{.so, .so.6}.
My curiosity got the best of me, so I tried to see what adding -rpath
did. It spat out the warning (same binary, still working) of that the
two libraries are different versions, even though the contents of
libstdc++.so.* are all the new 6.0.20 version, and the libstdc++.so.6
that is on the target (not used by our applications) is not on our
build machine
Compiling on a linux toolchain (same build settings except
host=x86_64-linux-gnu, build=x86_64-linux-gnu,
target=arm-linux-gnueabi) I get no warning at all. Why is the windows
build showing warnings, while the linux build is not. I'd prefer the
no warnings as I've manually confirmed the binaries are just fine.
What flags/configure flags am I missing?

Here are my binutils & gcc configure flags for windows, the only thing
different about linux build is the host and the paths are more
LSB-like:
--host=i686-w64-mingw32 --prefix=/c/frc --target=arm-frc-linux-gnueabi
 --enable-poison-system-directories --with-sysroot=/c/frc
--enable-plugins --disable-nls --enable-lto
--with-build-sysroot=/usr/arm-frc-linux-gnueabi

 --host=i686-w64-mingw32 --enable-threads=posix
--target=arm-frc-linux-gnueabi --with-arch=armv7-a
--with-cpu=cortex-a9 --with-float=softfp --with-fpu=vfp
--with-specs='%{save-temps: -fverbose-asm}
%{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables}'
--enable-languages=c,c++ --enable-shared --enable-lto --disable-nls
--with-cloog --disable-multilib --disable-multiarch --prefix=/frc
--with-sysroot=/frc --enable-poison-system-directories
--disable-libmudflap --with-build-sysroot=/usr/arm-frc-linux-gnueabi

Thanks,
Patrick

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-19 16:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-19 16:14 MinGW Windows-specific linking warnings Patrick Plenefisch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).