diff options
author | Bernardo Meurer <bernardo@meurer.org> | 2021-07-11 21:55:40 -0700 |
---|---|---|
committer | Bernardo Meurer <bernardo@meurer.org> | 2021-07-12 10:39:51 -0700 |
commit | 89deec56234511babe7478a44f684afcec83b394 (patch) | |
tree | 32c96ac94f4611c6437b972acd32ffb2c9196040 /pkgs/os-specific/linux/kernel/generate-config.pl | |
parent | 61ab7e84de28ec85dc026a88301f7aa63d2aa1d7 (diff) | |
download | nixpkgs-89deec56234511babe7478a44f684afcec83b394.tar nixpkgs-89deec56234511babe7478a44f684afcec83b394.tar.gz nixpkgs-89deec56234511babe7478a44f684afcec83b394.tar.bz2 nixpkgs-89deec56234511babe7478a44f684afcec83b394.tar.lz nixpkgs-89deec56234511babe7478a44f684afcec83b394.tar.xz nixpkgs-89deec56234511babe7478a44f684afcec83b394.tar.zst nixpkgs-89deec56234511babe7478a44f684afcec83b394.zip |
buildLinux: apply hostPlatform.linux-kernel.makeFlags to generate-config.pl
This enforces that the configuration generated will obey any/all flags set in the platform/stdenv configuration. This is crucial, for example, if you'd like to build a kernel using clang. Without this patch, anything you set in `stdenv.hostPlatform.linux-kernel.makeFlags` is wholly ignored during config generation, causing (for example) any changes in the desired toolchain (e.g. `LLVM`, `LLVM_IAS`) to not be reflected in the generated config, and for the subsequent build to fail.
Diffstat (limited to 'pkgs/os-specific/linux/kernel/generate-config.pl')
-rw-r--r-- | pkgs/os-specific/linux/kernel/generate-config.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/kernel/generate-config.pl b/pkgs/os-specific/linux/kernel/generate-config.pl index 82e1cb66e2b..df807188f14 100644 --- a/pkgs/os-specific/linux/kernel/generate-config.pl +++ b/pkgs/os-specific/linux/kernel/generate-config.pl @@ -19,6 +19,7 @@ my $autoModules = $ENV{'AUTO_MODULES'}; my $preferBuiltin = $ENV{'PREFER_BUILTIN'}; my $ignoreConfigErrors = $ENV{'ignoreConfigErrors'}; my $buildRoot = $ENV{'BUILD_ROOT'}; +my $makeFlags = $ENV{'MAKE_FLAGS'}; $SIG{PIPE} = 'IGNORE'; # Read the answers. @@ -40,7 +41,7 @@ close ANSWERS; sub runConfig { # Run `make config'. - my $pid = open2(\*IN, \*OUT, "make -C $ENV{SRC} O=$buildRoot config SHELL=bash ARCH=$ENV{ARCH} CC=$ENV{CC} HOSTCC=$ENV{HOSTCC} HOSTCXX=$ENV{HOSTCXX}"); + my $pid = open2(\*IN, \*OUT, "make -C $ENV{SRC} O=$buildRoot config SHELL=bash ARCH=$ENV{ARCH} CC=$ENV{CC} HOSTCC=$ENV{HOSTCC} HOSTCXX=$ENV{HOSTCXX} $makeFlags"); # Parse the output, look for questions and then send an # appropriate answer. |