Only change cross stdenv
Prevents mass rebuilds in x86, where the envvar doesn't have any effect.
This commit is contained in:
parent
635935cd09
commit
a333210fdc
10
overlay.nix
10
overlay.nix
@ -33,9 +33,13 @@ final: prev:
|
|||||||
|
|
||||||
# To cross compile for riscv64, we need to populate this env variable, not
|
# To cross compile for riscv64, we need to populate this env variable, not
|
||||||
# NIX_CFLAGS_COMPILE, otherwise we affect the packages for x86.
|
# NIX_CFLAGS_COMPILE, otherwise we affect the packages for x86.
|
||||||
stdenv = prev.stdenvAdapters.addAttrsToDerivation {
|
stdenv = if prev.stdenv.buildPlatform != prev.stdenv.hostPlatform
|
||||||
NIX_CFLAGS_COMPILE_riscv64_unknown_linux_gnu = "-march=rv64g";
|
then
|
||||||
} prev.stdenv;
|
prev.stdenvAdapters.addAttrsToDerivation {
|
||||||
|
NIX_CFLAGS_COMPILE_riscv64_unknown_linux_gnu = "-march=rv64g";
|
||||||
|
} prev.stdenv
|
||||||
|
else
|
||||||
|
prev.stdenv;
|
||||||
|
|
||||||
opensbi-uboot = prev.opensbi.overrideAttrs (old: {
|
opensbi-uboot = prev.opensbi.overrideAttrs (old: {
|
||||||
makeFlags = old.makeFlags ++ [
|
makeFlags = old.makeFlags ++ [
|
||||||
|
Loading…
Reference in New Issue
Block a user