From patchwork Tue Feb 17 08:03:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Haubenwallner X-Patchwork-Id: 440516 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B16031402A0 for ; Tue, 17 Feb 2015 19:04:14 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=YVZlOdogqYbB4I+v84FCY3mwcIL8gMWAYzmmeOEqzHn 6STnhucp1zX22PFBx/MZiNUpcx9xPaYVKGyWpSTGDQVZhwVFWKgqdzrUsPDstAmu ZC+NPmt74VO4/dfBuqRAtDO0QxO1pInUCiwYUa+bVzWiSMrk0K2rucYUhxuhhGa4 = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=PdZj8c2QylJqBiYzBXE+ZF2YzvQ=; b=JlsgP0unRY2gAoqCU 3fRcaTnG6wWGvs9awv39Ffaf0PMcxSPAjejAL50B7CvQOoBATnT64KhR0hDHyPEH TO/OtoS2zJ+OAHDj8zKxWrIObuxk3SmkZl+UvTWrLAR/tTtgc5hlSre1mk88C+ea 9JuJ0RE9MBJD1gSQuHhBz2EY50= Received: (qmail 8477 invoked by alias); 17 Feb 2015 08:04:06 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 8465 invoked by uid 89); 17 Feb 2015 08:04:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: smtp.salomon.at Received: from smtp.salomon.at (HELO smtp.salomon.at) (193.186.16.13) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 17 Feb 2015 08:04:04 +0000 Received: from samail03.wamas.com ([172.28.2.2] helo=mailhost.salomon.at) by smtp.salomon.at with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1YNd8S-0000hD-G9; Tue, 17 Feb 2015 09:04:01 +0100 Received: from [172.28.53.101] by mailhost.salomon.at with esmtps (TLSv1:AES128-SHA:128) (Exim 4.77) (envelope-from ) id 1YNd8S-00081C-Aj; Tue, 17 Feb 2015 09:04:00 +0100 Message-ID: <54E2F5EF.3030209@ssi-schaefer.com> Date: Tue, 17 Feb 2015 09:03:59 +0100 From: Michael Haubenwallner User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: David Edelsohn CC: GCC Patches Subject: [PATCH] support --without-multilib --with-specs=-pthread on AIX Hi David, according to LIB_SPEC found in config/rs6000/aix*.h, pthread linking was done with "-lpthreads -lc_r libc.a" for aix43, which simplified to "-lpthreads -lc" with aix51. But libgcc_s still is linked the aix43 way with "-lpthreads -lc_r libc.a". As libc_r.a is a symlink to libc.a now, do you know if its shared objects are loaded both as "libc.a(shr.o)" and "libc_r.a(shr.o)", or as "libc.a(shr.o)" only? Can this be a problem worth a bug entry? Anyway, this patch allows me to configure --without-multilib --with-specs=-pthread Thanks! /haubi/ From cee852b7e80f15474187673926c4e0a96d454cac Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Tue, 3 Feb 2015 12:56:53 +0100 Subject: [PATCH] support --without-multilib --with-specs=-pthread on AIX 2015-02-17 Michael Haubenwallner * config/rs6000/t-slibgcc-aix (SHLIB_LINK): Link libgcc_s with empty nolibgcc.specs, do not use -nodefaultlibs. --- libgcc/config/rs6000/t-slibgcc-aix | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/libgcc/config/rs6000/t-slibgcc-aix b/libgcc/config/rs6000/t-slibgcc-aix index 61853e0..b89e9e0 100644 --- a/libgcc/config/rs6000/t-slibgcc-aix +++ b/libgcc/config/rs6000/t-slibgcc-aix @@ -35,13 +35,11 @@ SHLIB_EXT = $(SHLIB_EXT_$(with_aix_soname)) SHLIB_SOVERSION = 1 SHLIB_SONAME = @shlib_base_name@.so.$(SHLIB_SOVERSION) SHLIB_LINK = \ + { echo '*libgcc:'; echo; echo; } > nolibgcc.specs ; \ if test svr4 != $(with_aix_soname) ; then \ - $(CC) $(LIBGCC2_CFLAGS) -shared -Wl,-bnortl -nodefaultlibs \ + $(CC) $(LIBGCC2_CFLAGS) -shared -Wl,-bnortl -specs=nolibgcc.specs \ -Wl,-bE:@shlib_map_file@ -o @multilib_dir@/shr.o \ - @multilib_flags@ @shlib_objs@ -lc \ - `case @multilib_dir@ in \ - *pthread*) echo -L$(TARGET_SYSTEM_ROOT)/usr/lib/threads -lpthreads -lc_r $(TARGET_SYSTEM_ROOT)/usr/lib/libc.a ;; \ - *) echo -lc ;; esac` ; \ + @multilib_flags@ @shlib_objs@ ; \ rm -f @multilib_dir@/tmp-@shlib_base_name@.a ; \ $(AR_CREATE_FOR_TARGET) @multilib_dir@/tmp-@shlib_base_name@.a \ @multilib_dir@/shr.o ; \ @@ -51,12 +49,9 @@ SHLIB_LINK = \ fi ; \ if test aix != $(with_aix_soname) ; then \ case @multilib_dir@ in *64*) shr='shr_64' ;; *) shr='shr' ;; esac ; \ - $(CC) $(LIBGCC2_CFLAGS) -shared -Wl,-G -nodefaultlibs \ + $(CC) $(LIBGCC2_CFLAGS) -shared -Wl,-G -specs=nolibgcc.specs \ -Wl,-bE:@shlib_map_file@ -o @multilib_dir@/$$shr.o \ - @multilib_flags@ @shlib_objs@ -lc \ - `case @multilib_dir@ in \ - *pthread*) echo -L$(TARGET_SYSTEM_ROOT)/usr/lib/threads -lpthreads -lc_r $(TARGET_SYSTEM_ROOT)/usr/lib/libc.a ;; \ - *) echo -lc ;; esac` ; \ + @multilib_flags@ @shlib_objs@ ; \ $(STRIP_FOR_TARGET) -X32_64 -e @multilib_dir@/$$shr.o ; \ { echo "\#! $(SHLIB_SONAME)($$shr.o)" ; \ case @multilib_dir@ in *64*) echo '\# 64' ;; *) echo '\# 32' ;; esac ; \ @@ -70,7 +65,8 @@ SHLIB_LINK = \ rm -f @multilib_dir@/@shlib_base_name@.so ; \ $(LN_S) $(SHLIB_SONAME) @multilib_dir@/@shlib_base_name@.so ; \ rm -f @multilib_dir@/$$shr.imp @multilib_dir@/$$shr.o ; \ - fi + fi ; \ + rm -f nolibgcc.specs SHLIB_INSTALL = \ $(mkinstalldirs) $(DESTDIR)$(slibdir)@shlib_slibdir_qual@; \ if test svr4 != $(with_aix_soname) ; then \ -- 2.0.5