3
0
Fork 0
forked from mirrors/nixpkgs

darwin.binutils: fix wrapper of as when cross-compiling to aarch64-darwin (#134097)

This commit is contained in:
Jasper 2021-08-17 09:12:51 +07:00 committed by GitHub
parent 5919a42546
commit 00037f7403
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,8 +56,8 @@ stdenv.mkDerivation {
# and using clang directly here is a better option than relying on cctools.
# On x86_64-darwin the Clang version is too old to support this mode.
+ lib.optionalString stdenv.isAarch64 ''
rm $out/bin/as
makeWrapper "${clang-unwrapped}/bin/clang" "$out/bin/as" \
rm $out/bin/${targetPrefix}as
makeWrapper "${clang-unwrapped}/bin/clang" "$out/bin/${targetPrefix}as" \
--add-flags "-x assembler -integrated-as -c"
'';