ghc: update Darwin bintools references

- Unconditionally get `install_name_tool` from cc.bintools.bintools since it is no longer wrapped; and
- Use the `strip` wrapper on both Darwin architectures. It’s the default one, and it’s the same between both.
This commit is contained in:
Randy Eckenrode 2024-07-03 20:03:37 -04:00
parent ca92415e87
commit 79f5f9bf1b
No known key found for this signature in database
GPG Key ID: 64C1CD4EC2A600D9
3 changed files with 24 additions and 30 deletions

View File

@ -152,18 +152,16 @@ let
otool = cc.bintools.bintools;
# GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is
# part of the bintools wrapper (due to codesigning requirements), but not on
# x86_64-darwin. We decide based on target platform to have consistent tools
# across all GHC stages.
install_name_tool =
if stdenv.targetPlatform.isAarch64
then cc.bintools
else cc.bintools.bintools;
# Same goes for strip.
# GHC needs install_name_tool on all darwin platforms. The same one can
# be used on both platforms. It is safe to use with linker-generated
# signatures because it will update the signatures automatically after
# modifying the target binary.
install_name_tool = cc.bintools.bintools;
# strip on darwin is wrapped to enable deterministic mode.
strip =
# TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
if stdenv.targetPlatform.isDarwin
then cc.bintools
else cc.bintools.bintools;
}.${name};

View File

@ -288,18 +288,16 @@ let
otool = cc.bintools.bintools;
# GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is
# part of the bintools wrapper (due to codesigning requirements), but not on
# x86_64-darwin. We decide based on target platform to have consistent tools
# across all GHC stages.
install_name_tool =
if stdenv.targetPlatform.isAarch64
then cc.bintools
else cc.bintools.bintools;
# Same goes for strip.
# GHC needs install_name_tool on all darwin platforms. The same one can
# be used on both platforms. It is safe to use with linker-generated
# signatures because it will update the signatures automatically after
# modifying the target binary.
install_name_tool = cc.bintools.bintools;
# strip on darwin is wrapped to enable deterministic mode.
strip =
# TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
if stdenv.targetPlatform.isDarwin
then cc.bintools
else cc.bintools.bintools;
}.${name};

View File

@ -157,18 +157,16 @@ let
otool = cc.bintools.bintools;
# GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is
# part of the bintools wrapper (due to codesigning requirements), but not on
# x86_64-darwin. We decide based on target platform to have consistent tools
# across all GHC stages.
install_name_tool =
if stdenv.targetPlatform.isAarch64
then cc.bintools
else cc.bintools.bintools;
# Same goes for strip.
# GHC needs install_name_tool on all darwin platforms. The same one can
# be used on both platforms. It is safe to use with linker-generated
# signatures because it will update the signatures automatically after
# modifying the target binary.
install_name_tool = cc.bintools.bintools;
# strip on darwin is wrapped to enable deterministic mode.
strip =
# TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
if stdenv.targetPlatform.isDarwin
then cc.bintools
else cc.bintools.bintools;
}.${name};