From patchwork Tue Mar 29 21:19:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 603151 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 3qZNvk6BFxz9sBg for ; Wed, 30 Mar 2016 08:19:44 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=uS8WXL3S; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=lH1OJfgA5Pn1yvSh HGnrxKsgDdiC9QKMAKnwPsNvpYp4ksChYsC5PSM+zeu9JXtea/lGCCWEOHBIZsLO oAGU0Ryra5dB7w7+5vzFuTsic5Qx7a+o+IYQ9e1uh4EdqwU8eUZXAibExtKSyBcg YuJtu0DvRHgHyy9IivG/wCUKqI0= 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:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=WFfx+WJaBQtpFtHIKQ8KEv ykQK0=; b=uS8WXL3Sw1l3hbOon9ADsOYy+rb69nXX+HaYIYuZuuVYhuyWyO4FZD XH8eFT+GMtmeZ0Mi9c3PfWgWAfPNbEeB6f34R+665nw3HdsSp9sNYuuQE540hJRF efxJDbfeXNfHBtJtCef6zudM5sUXxdgetgJyK0rU7sM/KMCpyDmf0= Received: (qmail 112849 invoked by alias); 29 Mar 2016 21:19:32 -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 112838 invoked by uid 89); 29 Mar 2016 21:19:31 -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, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=2016-03-10, 20160310, 2711, H*Ad:U*roland X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 29 Mar 2016 21:19:21 +0000 Received: from svr-orw-fem-06.mgc.mentorg.com ([147.34.97.120]) by relay1.mentorg.com with esmtp id 1al12k-0001iz-6L from Thomas_Schwinge@mentor.com ; Tue, 29 Mar 2016 14:19:18 -0700 Received: from tftp-cs (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.3.224.2; Tue, 29 Mar 2016 14:19:17 -0700 Received: by tftp-cs (Postfix, from userid 49978) id 38D98C1D41; Tue, 29 Mar 2016 14:19:17 -0700 (PDT) From: Thomas Schwinge To: CC: , Samuel Thibault , Roland McGrath Subject: Re: [PATCH] hurd: align -p and -pg behavior on Linux In-Reply-To: <87bn75ybeb.fsf@kepler.schwinge.homeip.net> References: <20150919120023.GA12911@var.home> <87bn75ybeb.fsf@kepler.schwinge.homeip.net> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (i586-pc-linux-gnu) Date: Tue, 29 Mar 2016 23:19:09 +0200 Message-ID: <87poudoucy.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Wed, 24 Feb 2016 23:46:36 +0100, I wrote: > On Sat, 19 Sep 2015 14:00:23 +0200, Samuel Thibault wrote: > > On Linux, -p and -pg do not make gcc link against libc_p.a, only > > -profile does (as documented in r11246), and thus people expect -p > > (Yo, 20 years ago...) > > > and -pg to work without libc_p.a installed (it is actually even not > > available any more in Debian). We should thus rather make the Hurd port > > do the same to avoid build failures. > > Conceptually, ACK. > I'm now testing the following patch: Now committed in r234535: commit 9b2eb5d3268cf674f9a6964479f20428e0b43500 Author: tschwinge Date: Tue Mar 29 21:17:53 2016 +0000 [Hurd] Specs maintenance gcc/ * config/gnu.h (CPP_SPEC, LIB_SPEC): Don't override. * config/i386/gnu.h (STARTFILE_SPEC): Use gcrt1.o instead of gcrt0.o if linking dynamically. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234535 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/gnu.h | 8 -------- gcc/config/i386/gnu.h | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) Grüße Thomas diff --git gcc/ChangeLog gcc/ChangeLog index 866531f..37e2504 100644 --- gcc/ChangeLog +++ gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-03-29 Thomas Schwinge + + * config/gnu.h (CPP_SPEC, LIB_SPEC): Don't override. + * config/i386/gnu.h (STARTFILE_SPEC): Use gcrt1.o instead of + gcrt0.o if linking dynamically. + 2016-03-10 Jan Hubicka PR ipa/70283 diff --git gcc/config/gnu.h gcc/config/gnu.h index 1d98ec8..1dbecda 100644 --- gcc/config/gnu.h +++ gcc/config/gnu.h @@ -19,14 +19,6 @@ You should have received a copy of the GNU General Public License along with GCC. If not, see . */ -/* Provide GCC options for standard feature-test macros. */ -#undef CPP_SPEC -#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}" - -/* Default C library spec. */ -#undef LIB_SPEC -#define LIB_SPEC "%{pthread:-lpthread} %{pg|p|profile:-lc_p;:-lc}" - #undef GNU_USER_TARGET_OS_CPP_BUILTINS #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ do { \ diff --git gcc/config/i386/gnu.h gcc/config/i386/gnu.h index c726d31..9d2f94f 100644 --- gcc/config/i386/gnu.h +++ gcc/config/i386/gnu.h @@ -27,11 +27,11 @@ along with GCC. If not, see . #undef STARTFILE_SPEC #if defined HAVE_LD_PIE #define STARTFILE_SPEC \ - "%{!shared: %{pg|p|profile:gcrt0.o%s;pie:Scrt1.o%s;static:crt0.o%s;:crt1.o%s}} \ + "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};pie:Scrt1.o%s;static:crt0.o%s;:crt1.o%s}} \ crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" #else #define STARTFILE_SPEC \ - "%{!shared: %{pg|p|profile:gcrt0.o%s;static:crt0.o%s;:crt1.o%s}} \ + "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};static:crt0.o%s;:crt1.o%s}} \ crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" #endif