From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25103 invoked by alias); 3 Sep 2013 21:39:14 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 25056 invoked by uid 89); 3 Sep 2013 21:39:14 -0000 Received: from qmta04.emeryville.ca.mail.comcast.net (HELO qmta04.emeryville.ca.mail.comcast.net) (76.96.30.40) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Sep 2013 21:39:14 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_DNSBL_BUMP,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_BL,RCVD_IN_JMF_BL,RDNS_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: qmta04.emeryville.ca.mail.comcast.net Received: from omta17.emeryville.ca.mail.comcast.net ([76.96.30.73]) by qmta04.emeryville.ca.mail.comcast.net with comcast id Lf9j1m00G1afHeLA4lfBl3; Tue, 03 Sep 2013 21:39:12 +0000 Received: from up.mrs.kithrup.com ([24.4.193.8]) by omta17.emeryville.ca.mail.comcast.net with comcast id LlfA1m00u0BKwT48dlfB7H; Tue, 03 Sep 2013 21:39:11 +0000 From: Mike Stump Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: -static-libstdc++ breaks building gdb Date: Tue, 03 Sep 2013 21:39:00 -0000 Message-Id: Cc: Eric Botcazou To: "gcc-patches@gcc.gnu.org Patches" , "gdb-patches@sourceware.org" Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) X-SW-Source: 2013-09/txt/msg00112.txt.bz2 I'm on a openSUSE 11.4 system with a: gcc (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585] host compiler. When I building gdb trunk, I get a failure to build because= configure tests g++ to see if these work, but gdb links with gcc and 4.5.1= errors out with the flag. You can't set LDFLAGS, because that is given to= gcc, without testing the flag with gcc. So, either: AC_LANG_PUSH(C++) goes away, or we need to exclude 4.5 as well. I tested the first approach = and while it gives a message, it doesn't fail the link, so short of rewriti= ng the test, we need to bump the minor number up 1. I make no claim that 4= .6.0 doesn't also fail. If someone knows when the driver was made to error out with the proper retu= rn code, it would be better to put that into the test instead. Here is the failure trying to make the first approach work: configure:4926: checking whether gcc accepts -static-libstdc++ -static-libg= cc configure:4937: gcc -o conftest -g -O2 -static-libstdc++ -static-libgcc c= onftest.c >&5 gcc: unrecognized option '-static-libstdc++' configure:4937: $? =3D 0 configure:4938: result: yes Ok? diff --git a/binutils/configure b/binutils/configure index a2671fb..d9cb7b8 100755 --- a/binutils/configure +++ b/binutils/configure @@ -4981,7 +4981,7 @@ ac_compiler_gnu=3D$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ =20 -#if (__GNUC__ < 4) || (__GNUC__ =3D=3D 4 && __GNUC_MINOR__ < 5) +#if (__GNUC__ < 4) || (__GNUC__ =3D=3D 4 && __GNUC_MINOR__ < 6) #error -static-libstdc++ not implemented #endif int main() {} diff --git a/binutils/configure.ac b/binutils/configure.ac index 04cf83f..c819263 100644 --- a/binutils/configure.ac +++ b/binutils/configure.ac @@ -1269,7 +1269,7 @@ if test "$GCC" =3D yes; then AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc]) AC_LANG_PUSH(C++) AC_LINK_IFELSE([ -#if (__GNUC__ < 4) || (__GNUC__ =3D=3D 4 && __GNUC_MINOR__ < 5) +#if (__GNUC__ < 4) || (__GNUC__ =3D=3D 4 && __GNUC_MINOR__ < 6) #error -static-libstdc++ not implemented #endif int main() {}],