Repository navigation
zfs: pass kernel build flags correctly - #435553
Conversation
ZFS's autoconf scripts recognize KERNEL_CC, KERNEL_CROSS_COMPILE, KERNEL_ARCH, etc. This avoids the need to separately give them as Make flags, although I'm not sure what the original intention behind giving the unprefixed flags to configure was — the commit adding that doesn't say, except that it was to fix cross, which still works after this change. This fixes the ZFS kernel module build after the change to use unwrapped compilers for building the kernel, which previously resulted in CC etc. being clobbered for the ZFS build, even for non-kernel parts like the "compiler works" Autoconf check.
| "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" | ||
| ] | ||
| ++ kernelModuleMakeFlags | ||
| ++ map (f: "KERNEL_${f}") kernelModuleMakeFlags |
There was a problem hiding this comment.
This scares me a little bit if we happen to introduce variables that shouldn’t get the KERNEL_ prefix later, but I guess at worst it’d most likely be harmless.
There was a problem hiding this comment.
My thoughts exactly. It would be strange for ZFS to introduce a variable called KERNEL_X that is for something other than setting the X passed to the kernel..
Could you reference these changes directly? |
That pr introduced that #402198 |
cfe5a79#diff-65503e1f59ebff07b9456a6616fc40d19f831947faf6323991e4ceb94a6a7a59R142 of #230498 |
|
This breaks #473637 |
ZFS's autoconf scripts recognize KERNEL_CC, KERNEL_CROSS_COMPILE, KERNEL_ARCH, etc. This avoids the need to separately give them as Make flags, although I'm not sure what the original intention behind giving the unprefixed flags to configure was — the commit adding that doesn't say, except that it was to fix cross, which still works after this change.
This fixes the ZFS kernel module build after the change to use unwrapped compilers for building the kernel, which previously resulted in CC etc. being clobbered for the ZFS build, even for non-kernel parts like the "compiler works" Autoconf check.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.