[pushed] Darwin: Handle -dynamiclib on cc1 lines.

Message ID 20230926085228.9962-1-iain@sandoe.co.uk
State Unresolved
Headers
Series [pushed] Darwin: Handle -dynamiclib on cc1 lines. |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Iain Sandoe Sept. 26, 2023, 8:52 a.m. UTC
  Tested on x86_64-darwin21, pushed to trunk, thanks
Iain

--- 8< ---

The changes of r14-4172 missed a case where we accept -dynamiclib on the
command line and then pass it to cc1 (which does not accept it).

This prunes the -dynamiclib from cc1 lines.

gcc/ChangeLog:

	* config/darwin.h (DARWIN_CC1_SPEC): Remove -dynamiclib.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
---
 gcc/config/darwin.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 61e46f76b22..2ee66c1a3d1 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -307,7 +307,7 @@  extern GTY(()) int darwin_ms_struct;
    %:version-compare(>= 10.7 mmacosx-version-min= -no_pie) }"
 
 #define DARWIN_CC1_SPEC							\
-  "%<dynamic %<force_cpusubtype_ALL %<multiply_defined* "
+  "%<dynamic %<force_cpusubtype_ALL %<multiply_defined* %<dynamiclib"
 
 #define SUBSUBTARGET_OVERRIDE_OPTIONS					\
   do {									\