mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 11:45:45 +03:00
cc-wrapper: add -m{,no-}strict-align and -mcmodel parameter
This commit is contained in:
parent
24df6aa12a
commit
ff97a3df3b
1 changed files with 11 additions and 1 deletions
|
@ -332,7 +332,17 @@ let
|
||||||
++ optional (targetPlatform ? gcc.fpu) "-mfpu=${targetPlatform.gcc.fpu}"
|
++ optional (targetPlatform ? gcc.fpu) "-mfpu=${targetPlatform.gcc.fpu}"
|
||||||
++ optional (targetPlatform ? gcc.mode) "-mmode=${targetPlatform.gcc.mode}"
|
++ optional (targetPlatform ? gcc.mode) "-mmode=${targetPlatform.gcc.mode}"
|
||||||
++ optional (targetPlatform ? gcc.thumb) "-m${thumb}"
|
++ optional (targetPlatform ? gcc.thumb) "-m${thumb}"
|
||||||
++ optional (tune != null) "-mtune=${tune}";
|
++ optional (tune != null) "-mtune=${tune}"
|
||||||
|
++
|
||||||
|
optional (targetPlatform ? gcc.strict-align)
|
||||||
|
"-m${optionalString (!targetPlatform.gcc.strict-align) "no-"}strict-align"
|
||||||
|
++ optional (
|
||||||
|
targetPlatform ? gcc.cmodel
|
||||||
|
&&
|
||||||
|
# TODO: clang on powerpcspe also needs a condition: https://github.com/llvm/llvm-project/issues/71356
|
||||||
|
# https://releases.llvm.org/18.1.6/tools/clang/docs/ReleaseNotes.html#loongarch-support
|
||||||
|
((targetPlatform.isLoongArch64 && isClang) -> versionAtLeast ccVersion "18.1")
|
||||||
|
) "-mcmodel=${targetPlatform.gcc.cmodel}";
|
||||||
|
|
||||||
defaultHardeningFlags = bintools.defaultHardeningFlags or [ ];
|
defaultHardeningFlags = bintools.defaultHardeningFlags or [ ];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue