Commit 1e6c4457 authored by Yarny0's avatar Yarny0
Browse files

linux/common-config: disable OF_OVERLAY on x86_64 if version < 5.15

`OF_OVERLAY` breaks kernel compilation for version 5.10
(beginning with 5.10.236), but only on x86_64.
Luckily, `OF_OVERLAY` is of not real interest on x86_64,
so this commit unbreaks the build by just disabling that option
if the target is x86_64 *and* the kernel version is below 5.15.

v5.15 contains a patch that turns the compilation error into a
warning, so this measure is not needed from that version on:
https://git.kernel.org/linus/5aad03685185b5133a28e1ee1d4e98d3fd3642a3

The reasons for the build failure are not
fully clear at the time of this writing;
apparently, a change in `pahole` is the core cause.
For details see the issue and in particular this comment:
https://github.com/NixOS/nixpkgs/issues/403985#issuecomment-2863338895
If that is correct and `pahole` gets fixed,
we can probably revert the commit at hand.
parent dda3dcd3
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1102,7 +1102,10 @@ let

        # enable support for device trees and overlays
        OF = option yes;
        OF_OVERLAY = option yes;
        # OF_OVERLAY breaks v5.10 on x86_64, see https://github.com/NixOS/nixpkgs/issues/403985
        OF_OVERLAY = lib.mkIf (!(lib.versionOlder version "5.15" && stdenv.hostPlatform.isx86_64)) (
          option yes
        );

        # Enable initrd support.
        BLK_DEV_INITRD = yes;