From: Iain Sandoe Date: Sun, 9 Jul 2023 08:02:39 +0000 (+0100) Subject: Darwin: Move checking of the 'shared' driver spec. X-Git-Tag: releases/gcc-12.4.0~229 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffe514c8ebd359e5d3fc22d30ee8f5fee259d15f;p=thirdparty%2Fgcc.git 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. includes changes in 3b18fd28c83ac90bf408389c003ed25d93438210. 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) Signed-off-by: Iain Sandoe --- diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index ba5fb0a2b486..6b81820072ba 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -133,10 +133,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 \ - "%