From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id 69C1A3858D1E; Sat, 27 Apr 2024 16:06:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69C1A3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1714233968; bh=3PCHvu+YDrCWs0tEQ3qO+Ej+XlDTbNsaz64JwfU25dY=; h=From:To:Subject:Date:From; b=cSaXpaJeazPjxURtUIQDmrJByS4juGxuEWY7gEGMVeWgnNmJlJSlzsAdpfmYroWXx /tFSaRl1GVSxsUXB+I6zxXVvuFGvkMCv7u578dg5xD2CPTzzPbHIBLa+fcRQR/q/zC SHzvVFHFE8XEY23T98V0tjdVjSG1XLT/AE+06s5E= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Iain D Sandoe To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-11376] Darwin: Move checking of the 'shared' driver spec. X-Act-Checkin: gcc X-Git-Author: Iain Sandoe X-Git-Refname: refs/heads/releases/gcc-11 X-Git-Oldrev: dfaad4ec7520699ba3d4b849883b590818cc3e90 X-Git-Newrev: a0121359733b2c476131ea34534b53bd3ce92521 Message-Id: <20240427160608.69C1A3858D1E@sourceware.org> Date: Sat, 27 Apr 2024 16:06:08 +0000 (GMT) List-Id: https://gcc.gnu.org/g:a0121359733b2c476131ea34534b53bd3ce92521 commit r11-11376-ga0121359733b2c476131ea34534b53bd3ce92521 Author: Iain Sandoe Date: Sun Jul 9 09:02:39 2023 +0100 Darwin: Move checking of the 'shared' driver spec. This avoids a bunch of irrelevant diagnostics if the user passes '-shared' to gnatmake. Currently, we push '-dynamiclib' back onto the command line (since that is the Darwin spelling of 'shared') but this is not handled by gnat1, leading to a diagnostic for every character after the '-d'. '-shared' has no effect on gnatmake (it needs to be passed to gnatbind). This moves the handling of '-shared' to leaf specs so that we do not need to push 'dynamiclib' onto the command line. gcc/ChangeLog: * config/darwin.h: (SUBTARGET_DRIVER_SELF_SPECS): Move handling of 'shared' into the same specs as 'dynamiclib'. (STARTFILE_SPEC): Handle 'shared'. (cherry picked from commit 2e36eedb244badaaf2a70388071115c851b8db9b) Diff: --- gcc/config/darwin.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 9cae0165ae9..430f12662e9 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -131,10 +131,9 @@ extern GTY(()) int darwin_ms_struct; cases where these driver opts are used multiple times, or to control operations on more than one command (e.g. dynamiclib). These are handled specially and we then add %= 10.7 mmacosx-version-min= -no_pie) }" #define DARWIN_CC1_SPEC \ - "%