cc-wrapper: Add support for -mthumb / -marm

(cherry picked from commit d3407f1a3bab0dd8c139272ee354175c0b489903)
This commit is contained in:
John Ericson 2021-09-17 17:12:54 +00:00 committed by github-actions[bot]
parent 2c75ca9c41
commit 7ff267798e

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