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: basepoints/gcc-15~5967 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e36eedb244badaaf2a70388071115c851b8db9b;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. gcc/ChangeLog: * config/darwin.h: (SUBTARGET_DRIVER_SELF_SPECS): Move handling of 'shared' into the same specs as 'dynamiclib'. (STARTFILE_SPEC): Handle 'shared'. --- diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index b7cfab607dbb..61e46f76b223 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 \ - "%