Merge pull request #138320 from NixOS/backport-138305-to-release-21.05

[Backport release-21.05] cc-wrapper: Add support for -mthumb / -marm
This commit is contained in:
John Ericson 2021-09-17 15:15:43 -04:00 committed by GitHub
commit dba5c42f73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -458,6 +458,9 @@ stdenv.mkDerivation {
+ optionalString (targetPlatform ? gcc.mode) ''
echo "-mmode=${targetPlatform.gcc.mode}" >> $out/nix-support/cc-cflags-before
''
+ optionalString (targetPlatform ? gcc.thumb) ''
echo "-m${if targetPlatform.gcc.thumb then "thumb" else "arm"}" >> $out/nix-support/cc-cflags-before
''
+ optionalString (targetPlatform ? gcc.tune &&
isGccArchSupported targetPlatform.gcc.tune) ''
echo "-mtune=${targetPlatform.gcc.tune}" >> $out/nix-support/cc-cflags-before