From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21015 invoked by alias); 7 Jul 2009 09:14:40 -0000 Received: (qmail 21002 invoked by uid 22791); 7 Jul 2009 09:14:39 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jul 2009 09:14:32 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n679EQJh020262; Tue, 7 Jul 2009 05:14:26 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n679EP1g011611; Tue, 7 Jul 2009 05:14:25 -0400 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.2/8.14.2/Submit) id n679EPPL025489; Tue, 7 Jul 2009 11:14:25 +0200 Date: Tue, 07 Jul 2009 09:56:00 -0000 From: Jakub Jelinek To: Matthias Klose Cc: GCC Patches , Paolo Carlini , GCJ-patches Subject: Re: [patch] PR40134, use a linker script on arm-linux to link with -lgcc_s -lgcc Message-ID: <20090707091425.GB4462@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <4A530F5C.4040500@ubuntu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A530F5C.4040500@ubuntu.com> User-Agent: Mutt/1.5.18 (2008-05-17) 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: 2009-07/txt/msg00325.txt.bz2 On Tue, Jul 07, 2009 at 11:03:24AM +0200, Matthias Klose wrote: > Use a linker script to link with -lgcc_s -lgcc on arm-linux, which allows the > arm-linux target to run the testsuite without regressions with the patch for the > exception propagation support [1] enabled. > > The approach taken is the same as used on the sh-linux configuration. > > Tested on the 4.4 branch without regressions (c, c++, fortran, objc, obj-c++), > the trunk currently fails to build for unrelated reasons [2] > > Ok for the branch (and for the trunk after it bootstraps again)? For branch I think this could be acceptable, but for trunk I really think we should do this on all architectures that have shared libgcc_s*. It is not just arm/sh that need this, but also e.g. ppc-linux (and maybe ppc64-linux), where libgcc.a only contains the out of line gpr/fpr register save/restores. Something like (untested): --- gcc.c 2009-06-11 13:24:15.000000000 +0200 +++ gcc.c 2009-07-07 11:11:27.664079777 +0200 @@ -1733,11 +1733,11 @@ init_gcc_specs (struct obstack *obstack, "}" #ifdef LINK_EH_SPEC "%{shared:" - "%{shared-libgcc:", shared_name, "}" + "%{shared-libgcc:", shared_name, " ", static_name, "}" "%{!shared-libgcc:", static_name, "}" "}" #else - "%{shared:", shared_name, "}" + "%{shared:", shared_name, " ", static_name, "}" #endif #endif "}}", NULL); Most of libgcc.a is sane and on targets with visibility support makes all symbols hidden anyway. The major exception here are the dfp bits, here I'd think we should remove them from libgcc.a and put into libgcc_dfp.a or something similar (and have libgcc_dfp.so too). Jakub