public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Patrick Plenefisch <phplenefisch@WPI.EDU>
To: gcc-help <gcc-help@gcc.gnu.org>
Subject: MinGW Windows-specific linking warnings
Date: Fri, 19 Sep 2014 16:14:00 -0000	[thread overview]
Message-ID: <CAOCpoWc=FFqquPiM=gbNg7fBwnaEKU=p-5USgDK2QSEY14Em3Q@mail.gmail.com> (raw)

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

                 reply	other threads:[~2014-09-19 16:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOCpoWc=FFqquPiM=gbNg7fBwnaEKU=p-5USgDK2QSEY14Em3Q@mail.gmail.com' \
    --to=phplenefisch@wpi.edu \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).