From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31369 invoked by alias); 23 Jan 2013 11:24:20 -0000 Received: (qmail 31359 invoked by uid 22791); 23 Jan 2013 11:24:19 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.salomon.at (HELO smtp.salomon.at) (193.186.16.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Jan 2013 11:24:15 +0000 Received: from samail03.wamas.com ([172.28.2.2] helo=mailhost.salomon.at) by smtp.salomon.at with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77) (envelope-from ) id 1TxyRA-0007Bw-BS for gcc-patches@gcc.gnu.org; Wed, 23 Jan 2013 12:24:13 +0100 Received: from [172.28.8.170] by mailhost.salomon.at with esmtp (Exim 4.77) (envelope-from ) id 1TxyRA-0004G0-8P; Wed, 23 Jan 2013 12:24:12 +0100 Message-ID: <50FFC85C.9020308@salomon.at> Date: Wed, 23 Jan 2013 11:24:00 -0000 From: Michael Haubenwallner User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120327 Thunderbird/10.0.3 MIME-Version: 1.0 To: GCC Patches Subject: [PATCH, regression?] Support --static-libstdc++ with native AIX ld Content-Type: multipart/mixed; boundary="------------010505090007040106000903" X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg01144.txt.bz2 This is a multi-part message in MIME format. --------------010505090007040106000903 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 592 Hi, attached patch actually makes gcc-4.8 useable after removing builddir when using native AIX ld, as libstdc++ now really is statically linked into xgcc/xg++, like with other platforms or with GNU binutils on AIX. This also renders those tries/patches needless that drop the RPATH_ENVVAR=LD_LIBRARY_PATH on AIX. Thank you! /haubi/ 2013-01-23 Michael Haubenwallner AIX ld does support -bstatic/-bdynamic instead of -Bstatic/-Bdynamic. * gcc/configure.ac (gcc_cv_ld_static_dynamic): Define for AIX native ld. * gcc/configure: Regenerate. --------------010505090007040106000903 Content-Type: text/x-patch; name="aixld-static-libstdcxx.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="aixld-static-libstdcxx.patch" Content-length: 1090 diff --git a/gcc/configure b/gcc/configure index 10ff5ae..f153294 100755 --- a/gcc/configure +++ b/gcc/configure @@ -23650,6 +23650,12 @@ elif test x$gcc_cv_ld != x; then gcc_cv_ld_static_dynamic=yes else case "$target" in + # AIX ld uses -b flags + *-*-aix4.[23]*|*-*-aix[5-9]*) + gcc_cv_ld_static_dynamic=yes + gcc_cv_ld_static_option="-bstatic" + gcc_cv_ld_dynamic_option="-bdynamic" + ;; # HP-UX ld uses -a flags to select between shared and archive. *-*-hpux*) if test x"$gnu_ld" = xno; then diff --git a/gcc/configure.ac b/gcc/configure.ac index 3703a20..d33fcb2 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -3317,6 +3317,12 @@ elif test x$gcc_cv_ld != x; then gcc_cv_ld_static_dynamic=yes else case "$target" in + # AIX ld uses -b flags + *-*-aix4.[[23]]*|*-*-aix[[5-9]]*) + gcc_cv_ld_static_dynamic=yes + gcc_cv_ld_static_option="-bstatic" + gcc_cv_ld_dynamic_option="-bdynamic" + ;; # HP-UX ld uses -a flags to select between shared and archive. *-*-hpux*) if test x"$gnu_ld" = xno; then --------------010505090007040106000903--