darwin: Fix single_module is obsolete warning
In XCode 15's linker, -single_module is the default and otherwise passing it as a flag results in a warning being raised: ld: warning: -single_module is obsolete This patch fixes this warning by, at configure time, determining whether the linker supports -single_module (which is likely false for all non-darwin linkers, and true for darwin linkers in previous versions of macOS), and using that information at runtime to decide to pass or not the flag in the invocation. Fixes #24168
Showing
- compiler/GHC/Linker/Dynamic.hs 9 additions, 2 deletionscompiler/GHC/Linker/Dynamic.hs
- compiler/GHC/Settings.hs 1 addition, 0 deletionscompiler/GHC/Settings.hs
- compiler/GHC/Settings/IO.hs 2 additions, 0 deletionscompiler/GHC/Settings/IO.hs
- configure.ac 1 addition, 0 deletionsconfigure.ac
- distrib/configure.ac.in 1 addition, 0 deletionsdistrib/configure.ac.in
- hadrian/bindist/Makefile 1 addition, 0 deletionshadrian/bindist/Makefile
- hadrian/bindist/config.mk.in 1 addition, 0 deletionshadrian/bindist/config.mk.in
- hadrian/cfg/default.host.target.in 1 addition, 0 deletionshadrian/cfg/default.host.target.in
- hadrian/cfg/default.target.in 1 addition, 0 deletionshadrian/cfg/default.target.in
- hadrian/src/Rules/Generate.hs 2 additions, 0 deletionshadrian/src/Rules/Generate.hs
- m4/fp_prog_ld_single_module.m4 30 additions, 0 deletionsm4/fp_prog_ld_single_module.m4
- m4/prep_target_file.m4 1 addition, 0 deletionsm4/prep_target_file.m4
- utils/ghc-toolchain/src/GHC/Toolchain/Tools/Link.hs 33 additions, 1 deletionutils/ghc-toolchain/src/GHC/Toolchain/Tools/Link.hs
Loading
Please register or sign in to comment