From d3407f1a3bab0dd8c139272ee354175c0b489903 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Fri, 17 Sep 2021 17:12:54 +0000 Subject: [PATCH] cc-wrapper: Add support for -mthumb / -marm --- pkgs/build-support/cc-wrapper/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 804f59286c7a..3738f628b187 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -463,6 +463,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