From: Iain Sandoe Date: Mon, 5 Aug 2024 12:19:28 +0000 (+0100) Subject: Darwin: Recognise -weak_framework in the driver [PR116237]. X-Git-Tag: basepoints/gcc-16~6750 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cec7bc79db52bae159c3c60a415e2aea48051d8;p=thirdparty%2Fgcc.git Darwin: Recognise -weak_framework in the driver [PR116237]. XCode compilers recognise the weak_framework linker option in the driver and forward it. This patch makes GCC adopt the same behaviour. PR target/116237 gcc/ChangeLog: * config/darwin.h (SUBTARGET_DRIVER_SELF_SPECS): Add a spec for weak_framework. * config/darwin.opt: Handle weak_framework driver option. Signed-off-by: Iain Sandoe --- diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index c09b9e9dc94..377599074a7 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -264,6 +264,8 @@ extern GTY(()) int darwin_ms_struct; "%{weak_reference_mismatches*:\ -Xlinker -weak_reference_mismatches -Xlinker %*} \ % Do not export the global symbols listed in . +weak_framework +Driver RejectNegative Separate +-weak_framework Make a weak link to the specified framework. + weak_reference_mismatches Driver RejectNegative Separate -weak_reference_mismatches Specifies what to do if a symbol import conflicts between file (weak in one and not in another) the default is to treat the symbol as non-weak.