From patchwork Wed Sep 15 15:51:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 64837 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]) by ozlabs.org (Postfix) with SMTP id BC58AB6EED for ; Thu, 16 Sep 2010 01:51:36 +1000 (EST) Received: (qmail 32226 invoked by alias); 15 Sep 2010 15:51:35 -0000 Received: (qmail 32217 invoked by uid 22791); 15 Sep 2010 15:51:34 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from c2beaomr05.btconnect.com (HELO c2beaomr05.btconnect.com) (213.123.26.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Sep 2010 15:51:26 +0000 Received: from thor.office (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by c2beaomr05.btconnect.com with ESMTP id FLO85259; Wed, 15 Sep 2010 16:51:01 +0100 (BST) X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=0001.0A0B0302.4C90EB65.00C6, actions=TAG Message-Id: From: IainS To: GCC Patches Mime-Version: 1.0 (Apple Message framework v936) Subject: [Patch libgcc build] cater for static archives as 'extra parts' Date: Wed, 15 Sep 2010 16:51:00 +0100 Cc: Paolo Bonzini X-IsSubscribed: yes 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 Hi, It would tidy up cases where several "extra parts" objects are used if they could be made into a static archive. At present, although "extra parts" can be built as static archives, libgcc's build process does not carry out the additional ranlib needed by some targets after installing them. This patch looks for static archives in the list and applies the ranlib. (I have a tidy-up patch for darwin which would like to use this facility), OK for trunk? Iain libgcc: * Makefile.in (libgcc-extra-parts): Check for static archives and ranlib after installing. (gcc-extra-parts): Likewise. (install-leaf): LIkewise. Index: libgcc/Makefile.in =================================================================== --- libgcc/Makefile.in (revision 164304) +++ libgcc/Makefile.in (working copy) @@ -870,6 +870,9 @@ endif for file in $$parts; do \ rm -f $(gcc_objdir)$(MULTISUBDIR)/$$file; \ $(INSTALL_DATA) $$file $(gcc_objdir)$(MULTISUBDIR)/; \ + if [ $${file##*.} = "a" ] ; then \ + $(RANLIB) $(gcc_objdir)$(MULTISUBDIR)/$$file; \ + fi; \ done # Build extra startfiles in the gcc directory, for unconverted @@ -903,6 +906,9 @@ gcc-extra-parts: for file in $$parts; do \ rm -f $(gcc_objdir)$(MULTISUBDIR)/$$file; \ $(INSTALL_DATA) $$file $(gcc_objdir)$(MULTISUBDIR)/; \ + if [ $${file##*.} = "a" ] ; then \ + $(RANLIB) $(gcc_objdir)$(MULTISUBDIR)/$$file; \ + fi; \ done all: $(extra-parts) @@ -958,6 +964,9 @@ install-leaf: $(install-shared) $(install-libunwin for file in $$parts; do \ rm -f $(DESTDIR)$(inst_libdir)/$$file; \ $(INSTALL_DATA) $$file $(DESTDIR)$(inst_libdir)/; \ + if [ $${file##*.} = "a" ] ; then \ + $(RANLIB) $(gcc_objdir)$(MULTISUBDIR)/$$file; \ + fi; \ done install: install-leaf