From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21769 invoked by alias); 19 Sep 2014 16:14:17 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 21755 invoked by uid 89); 19 Sep 2014 16:14:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: MAIL1.WPI.EDU Received: from MAIL1.WPI.EDU (HELO MAIL1.WPI.EDU) (130.215.36.91) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 Sep 2014 16:14:14 +0000 Received: from MAIL1.WPI.EDU (MAIL1.WPI.EDU [130.215.36.91]) by MAIL1.WPI.EDU (8.14.9/8.14.9) with ESMTP id s8JGEDtw009545 for ; Fri, 19 Sep 2014 12:14:13 -0400 X-DKIM: Sendmail DKIM Filter v2.8.3 MAIL1.WPI.EDU s8JGEDtw009545 Received: from MX3.WPI.EDU (mx3.wpi.edu [130.215.36.147]) by MAIL1.WPI.EDU (8.14.9/8.14.9) with ESMTP id s8JGEDlQ009537 for ; Fri, 19 Sep 2014 12:14:13 -0400 Received: from APPLIANCE4.WPI.EDU (appliance4.wpi.edu [130.215.36.61]) by MX3.WPI.EDU (8.14.4/8.14.4) with ESMTP id s8JGEBlV028930 for ; Fri, 19 Sep 2014 12:14:12 -0400 (envelope-from phplenefisch@wpi.edu) Received: from mail-qc0-f172.google.com (mail-qc0-f172.google.com [209.85.216.172]) (authenticated authen=phplenefisch@wpi.edu) by APPLIANCE4.WPI.EDU (8.14.9/8.14.9) with ESMTP id s8JGEANL032392 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Fri, 19 Sep 2014 12:14:11 -0400 Received: by mail-qc0-f172.google.com with SMTP id x13so3427153qcv.31 for ; Fri, 19 Sep 2014 09:14:05 -0700 (PDT) X-Received: by 10.224.104.2 with SMTP id m2mr2130828qao.52.1411143245842; Fri, 19 Sep 2014 09:14:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.101.118 with HTTP; Fri, 19 Sep 2014 09:13:45 -0700 (PDT) From: Patrick Plenefisch Date: Fri, 19 Sep 2014 16:14:00 -0000 Message-ID: Subject: MinGW Windows-specific linking warnings To: gcc-help Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2014-09/txt/msg00116.txt.bz2 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