From patchwork Fri Aug 20 12:46:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 62273 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 7A312B70B8 for ; Fri, 20 Aug 2010 22:47:11 +1000 (EST) Received: (qmail 28029 invoked by alias); 20 Aug 2010 12:47:09 -0000 Received: (qmail 28014 invoked by uid 22791); 20 Aug 2010 12:47:08 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, TW_LG X-Spam-Check-By: sourceware.org Received: from c2beaomr02.btconnect.com (HELO c2beaomr02.btconnect.com) (213.123.26.180) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Aug 2010 12:47:01 +0000 Received: from thor.office (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by c2beaomr02.btconnect.com with ESMTP id EAT87328; Fri, 20 Aug 2010 13:46:44 +0100 (BST) X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=0001.0A0B0302.4C6E7934.00C0, actions=tag Message-Id: From: IainS To: gcc patches Mime-Version: 1.0 (Apple Message framework v936) Subject: [Patch darwin, ppc] lgcc to provide save/restFP for pre-exisitng libraries. Date: Fri, 20 Aug 2010 13:46:43 +0100 Cc: Jack Howarth , mrs@gcc.gnu.org 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 My patch of r163267 breaks powerpc in the case that one has a static lib that refers to save/restFP. Sorry, I didn't spot that, I bootstrap with gmp/mpfr/mpc in tree .. I could revert the lgcc change for all archs, but would prefer to try this if that's OK with Mike: (if it turns out that i686 needs _eprintf for some pre-existing external code, then we might have to give up and just re-add the lgcc for all, which seems a shame) OK for trunk & 4.5 ? (since this is not a reversion - but an additional patch). Iain "%{!m64:%:version-compare(!> 10.4 mmacosx-version-min= crt2.o%s)}" Index: gcc/config/rs6000/darwin.h =================================================================== --- gcc/config/rs6000/darwin.h (revision 163335) +++ gcc/config/rs6000/darwin.h (working copy) @@ -120,6 +120,10 @@ extern int darwin_emit_branch_islands; mcpu=G5:ppc970; \ :ppc}}" +/* Linked libs might refer to save/restFP - we still need to append - lgcc to + provide these. */ +#define LIB_SPEC "%{!static:-lgcc -lSystem}" + /* crt2.o is at least partially required for 10.3.x and earlier. */ #define DARWIN_CRT2_SPEC \