From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20286 invoked by alias); 1 Sep 2018 11:05:49 -0000 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 Received: (qmail 20274 invoked by uid 89); 1 Sep 2018 11:05:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=sk:dgrequ, sk:dg-requ, @xref, sk:libasan X-HELO: mailrelay4-3.pub.mailoutpod1-cph3.one.com Received: from mailrelay4-3.pub.mailoutpod1-cph3.one.com (HELO mailrelay4-3.pub.mailoutpod1-cph3.one.com) (46.30.212.13) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 01 Sep 2018 11:05:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=carewolf.com; s=20140924; h=content-transfer-encoding:content-type:mime-version:references:in-reply-to: message-id:date:subject:cc:to:from:from; bh=6jSSlFCPL+XubUTuuWKnF5brV7TPqoELg3+NJdWpgPI=; b=Fk6WiGn+SmQKT1WXTyPDq6QWiSMA/N0sBKNRd2abeKk8iF3CQJQ17X40/8wxhdrMS8HjMphk2fio5 l8p02cEiDaiSoEr6ml5FsArgw4wrX3SZ1IXDu9l3oogwJeN9ttgLC2E1eHM6Cl2R3EUmWvniUBffRg tZNT9aPDRT1b8Tl8= X-HalOne-Cookie: e6b3f975c2a93da88aa679fa8637877cdddd3bf6 X-HalOne-ID: f7267fe2-add6-11e8-86b5-d0431ea8bb10 Received: from carewolf.com (unknown [84.185.104.88]) by mailrelay4.pub.mailoutpod1-cph3.one.com (Halon) with ESMTPSA id f7267fe2-add6-11e8-86b5-d0431ea8bb10; Sat, 01 Sep 2018 11:05:42 +0000 (UTC) From: Allan Sandfeld Jensen To: gcc-patches@gcc.gnu.org Cc: Joseph Myers , Iain Sandoe Subject: Re: [Patch][GCC] Document and fix -r (partial linking) Date: Sat, 01 Sep 2018 11:05:00 -0000 Message-ID: <5399704.KElGaqSPkd@twilight> In-Reply-To: References: <5835862.YDeY9hZc7r@twilight> <2318781.Tl31r3eYUQ@twilight> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart1728830.lGXAFRqVoO" Content-Transfer-Encoding: 7Bit X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00002.txt.bz2 This is a multi-part message in MIME format. --nextPart1728830.lGXAFRqVoO Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Content-length: 742 On Montag, 27. August 2018 15:37:15 CEST Joseph Myers wrote: > On Sun, 26 Aug 2018, Allan Sandfeld Jensen wrote: > > Patch updated. I specifically edited a number of the existing tests that > > used both -r and -nostdlib and removed -nostdlib so the patch is > > exercised by existing tests. The patch bootstrapped, I didn't notice any > > relevant failures when running the test suite (though I could have missed > > something, I am never comfortable reading that output). > > Note that Iain's comments also included that the patch is incomplete > because of more specs in gcc.c (VTABLE_VERIFICATION_SPEC, > SANITIZER_EARLY_SPEC, SANITIZER_SPEC) that needs corresponding updates to > handle -r like -nostdlib. Updated (but tests not rerun) --nextPart1728830.lGXAFRqVoO Content-Disposition: inline; filename="Fix-and-document-r-option.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="Fix-and-document-r-option.patch" Content-length: 13337 >From 1d164bced7979c94767c260174e3c486d4fc8c5d Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Sat, 1 Sep 2018 12:59:14 +0200 Subject: [PATCH] Fix and document -r option The option has existed and been working for years, make sure it implies the right extra options, and list it in the documentation. 2018-09-01 Allan Sandfeld Jensen gcc/doc/ * invoke.texi: Document -r. gcc/ * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib. (VTABLE_VERIFICATION_SPEC): Ditto (SANITIZER_EARLY_SPEC): Ditto (SANITIZER_SPEC): Ditto * config/darwin.h (LINK_COMMAND_SPEC): Ditto * cp/g++spec.c (lang_specific_driver): Ditto * fortran/gfortranspec.c (lang_specific_driver): Ditto * go/gospec.c (lang_specific_driver): Ditto gcc/testsuite/ * g++.dg/ipa/pr64059.C: Removed now redundant -nostdlib. * g++.dg/lto/20081109-1_0.C: Ditto * g++.dg/lto/20090302_0.C: Ditto * g++.dg/lto/pr45621_0.C: Ditto * g++.dg/lto/pr60567_0.C: Ditto * g++.dg/lto/pr62026.C: Ditto * gcc.dg/lto/pr45736_0.c: Ditto * gcc.dg/lto/pr52634_0.c: Ditto * gfortran.dg/lto/20091016-1_0.f90: Ditto * gfortran.dg/lto/pr79108_0.f90: Ditto --- gcc/config/darwin.h | 8 ++++---- gcc/cp/g++spec.c | 1 + gcc/doc/invoke.texi | 7 ++++++- gcc/fortran/gfortranspec.c | 1 + gcc/gcc.c | 18 +++++++++--------- gcc/go/gospec.c | 1 + gcc/testsuite/g++.dg/ipa/pr64059.C | 2 +- gcc/testsuite/g++.dg/lto/20081109-1_0.C | 2 +- gcc/testsuite/g++.dg/lto/20090302_0.C | 2 +- gcc/testsuite/g++.dg/lto/pr45621_0.C | 2 +- gcc/testsuite/g++.dg/lto/pr60567_0.C | 2 +- gcc/testsuite/g++.dg/lto/pr62026.C | 2 +- gcc/testsuite/gcc.dg/lto/pr45736_0.c | 2 +- gcc/testsuite/gcc.dg/lto/pr52634_0.c | 2 +- gcc/testsuite/gfortran.dg/lto/20091016-1_0.f90 | 2 +- gcc/testsuite/gfortran.dg/lto/pr79108_0.f90 | 2 +- 16 files changed, 32 insertions(+), 24 deletions(-) diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index cd6d6521658..87f610259c0 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -180,20 +180,20 @@ extern GTY(()) int darwin_ms_struct; "%X %{s} %{t} %{Z} %{u*} \ %{e*} %{r} \ %{o*}%{!o:-o a.out} \ - %{!nostdlib:%{!nostartfiles:%S}} \ + %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \ %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} \ %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1): \ %{static|static-libgcc|static-libstdc++|static-libgfortran: libgomp.a%s; : -lgomp } } \ %{fgnu-tm: \ %{static|static-libgcc|static-libstdc++|static-libgfortran: libitm.a%s; : -litm } } \ - %{!nostdlib:%{!nodefaultlibs:\ + %{!nostdlib:%{!r:%{!nodefaultlibs:\ %{%:sanitize(address): -lasan } \ %{%:sanitize(undefined): -lubsan } \ %(link_ssp) \ " DARWIN_EXPORT_DYNAMIC " %