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 <iain@sandoe.co.uk>
"%{weak_reference_mismatches*:\
-Xlinker -weak_reference_mismatches -Xlinker %*} \
%<weak_reference_mismatches*", \
+ "%{weak_framework*: -Xlinker -weak_framework -Xlinker %*} \
+ %<weak_framework*", \
"%{whyload:-Xlinker -whyload} %<whyload", \
"%{whatsloaded:-Xlinker -whatsloaded} %<whatsloaded", \
"%{w:-Xlinker -w}", \
Driver RejectNegative Separate
-unexported_symbols_list <filename> Do not export the global symbols listed in <filename>.
+weak_framework
+Driver RejectNegative Separate
+-weak_framework <framework> Make a weak link to the specified framework.
+
weak_reference_mismatches
Driver RejectNegative Separate
-weak_reference_mismatches <treatment> 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.