drop target CPU for aarch64 to cortex-a53 instead of cortex-a73

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-09-06 19:02:04 -04:00
parent f521f88daf
commit 909eeac5b0
2 changed files with 3 additions and 3 deletions

View file

@ -18,7 +18,7 @@ lib.optionalAttrs stdenv.hostPlatform.isStatic {
[ "-C" "target-cpu=x86-64-v2" ] [ "-C" "target-cpu=x86-64-v2" ]
++ lib.optionals ++ lib.optionals
stdenv.targetPlatform.isAarch64 stdenv.targetPlatform.isAarch64
[ "-C" "target-cpu=cortex-a55" ] # cortex-a55 == ARMv8.2-a [ "-C" "target-cpu=cortex-a53" ] # cortex-a53 == ARMv8-A
# This disables PIE for static builds, which isn't great in terms # This disables PIE for static builds, which isn't great in terms
# of security. Unfortunately, my hand is forced because nixpkgs' # of security. Unfortunately, my hand is forced because nixpkgs'
# `libstdc++.a` is built without `-fPIE`, which precludes us from # `libstdc++.a` is built without `-fPIE`, which precludes us from

View file

@ -97,7 +97,7 @@ buildDepsOnlyEnv =
else if stdenv.targetPlatform.isAarch64 else if stdenv.targetPlatform.isAarch64
then lib.subtractLists [ "-DPORTABLE=1" ] old.cmakeFlags then lib.subtractLists [ "-DPORTABLE=1" ] old.cmakeFlags
++ lib.optionals stdenv.targetPlatform.isAarch64 [ ++ lib.optionals stdenv.targetPlatform.isAarch64 [
# cortex-a73 == ARMv8-A # cortex-a53 == ARMv8-A
"-DPORTABLE=armv8-a" "-DPORTABLE=armv8-a"
] ]
else old.cmakeFlags; else old.cmakeFlags;
@ -131,7 +131,7 @@ buildPackageEnv = {
+ lib.optionalString stdenv.targetPlatform.isx86_64 + lib.optionalString stdenv.targetPlatform.isx86_64
" -Ctarget-cpu=x86-64-v2" " -Ctarget-cpu=x86-64-v2"
+ lib.optionalString stdenv.targetPlatform.isAarch64 + lib.optionalString stdenv.targetPlatform.isAarch64
" -Ctarget-cpu=cortex-a73"; # cortex-a73 == ARMv8-A " -Ctarget-cpu=cortex-a53"; # cortex-a53 == ARMv8-A
}; };