Merge pull request #78994 from orivej/linux-headers
linuxHeaders: 4.19.16 -> 5.5
This commit is contained in:
commit
b39c52f459
@ -1,7 +1,4 @@
|
||||
{ stdenvNoCC, lib, buildPackages
|
||||
, fetchurl, perl
|
||||
, elf-header
|
||||
}:
|
||||
{ stdenvNoCC, lib, buildPackages, fetchurl, perl, elf-header }:
|
||||
|
||||
let
|
||||
makeLinuxHeaders = { src, version, patches ? [] }: stdenvNoCC.mkDerivation {
|
||||
@ -39,29 +36,28 @@ let
|
||||
# Skip clean on darwin, case-sensitivity issues.
|
||||
buildPhase = lib.optionalString (!stdenvNoCC.buildPlatform.isDarwin) ''
|
||||
make mrproper $makeFlags
|
||||
''
|
||||
# For some reason, doing `make install_headers` twice, first without
|
||||
# INSTALL_HDR_PATH=$out then with, is neccessary to get this to work
|
||||
# for darwin cross. @Ericson2314 has no idea why.
|
||||
+ ''
|
||||
make headers_install $makeFlags
|
||||
'' + ''
|
||||
make headers $makeFlags
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
make headers_check $makeFlags
|
||||
'';
|
||||
|
||||
# The following command requires rsync:
|
||||
# make headers_install INSTALL_HDR_PATH=$out $makeFlags
|
||||
# but rsync depends on popt which does not compile on aarch64 without
|
||||
# updateAutotoolsGnuConfigScriptsHook which is not enabled in stage2,
|
||||
# so we replicate it with cp. This also reduces bootstrap closure size.
|
||||
installPhase = ''
|
||||
make headers_install INSTALL_HDR_PATH=$out $makeFlags
|
||||
mkdir -p $out
|
||||
cp -r usr/include $out
|
||||
find $out -type f ! -name '*.h' -delete
|
||||
''
|
||||
# Some builds (e.g. KVM) want a kernel.release.
|
||||
+ '' mkdir -p $out/include/config
|
||||
echo "${version}-default" > $out/include/config/kernel.release
|
||||
''
|
||||
# These oddly named file records the `SHELL` passed, which causes bootstrap
|
||||
# tools run-time dependency.
|
||||
+ ''
|
||||
find "$out" -name '..install.cmd' -print0 | xargs -0 rm
|
||||
mkdir -p $out/include/config
|
||||
echo "${version}-default" > $out/include/config/kernel.release
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
@ -73,16 +69,15 @@ let
|
||||
in {
|
||||
inherit makeLinuxHeaders;
|
||||
|
||||
linuxHeaders = let version = "4.19.16"; in
|
||||
linuxHeaders = let version = "5.5"; in
|
||||
makeLinuxHeaders {
|
||||
inherit version;
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
|
||||
sha256 = "1pqvn6dsh0xhdpawz4ag27vkw1abvb6sn3869i4fbrz33ww8i86q";
|
||||
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
|
||||
sha256 = "0c131fi6s7vgvka1c0597vnvcmwn1pp968rci5kq64iwj3pd9yx6";
|
||||
};
|
||||
patches = [
|
||||
./no-relocs.patch # for building x86 kernel headers on non-ELF platforms
|
||||
./no-dynamic-cc-version-check.patch # so we can use `stdenvNoCC`, see `makeFlags` above
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@ -1,32 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 863f58503bee..b778d5023208 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -501,11 +501,9 @@ KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
|
||||
KBUILD_AFLAGS += $(call cc-option,-fno-PIE)
|
||||
|
||||
# check for 'asm goto'
|
||||
-ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y)
|
||||
CC_HAVE_ASM_GOTO := 1
|
||||
KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
|
||||
KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
|
||||
-endif
|
||||
|
||||
# The expansion should be delayed until arch/$(SRCARCH)/Makefile is included.
|
||||
# Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile.
|
||||
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
|
||||
index 065324a8046f..d09c67194549 100644
|
||||
--- a/scripts/Kbuild.include
|
||||
+++ b/scripts/Kbuild.include
|
||||
@@ -216,11 +216,8 @@ cc-disable-warning = $(call try-run-cached,\
|
||||
cc-name = $(call shell-cached,$(CC) -v 2>&1 | grep -q "clang version" && echo clang || echo gcc)
|
||||
|
||||
# cc-version
|
||||
-cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
|
||||
|
||||
# cc-fullversion
|
||||
-cc-fullversion = $(shell $(CONFIG_SHELL) \
|
||||
- $(srctree)/scripts/gcc-version.sh -p $(CC))
|
||||
|
||||
# cc-ifversion
|
||||
# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
|
@ -1,13 +1,7 @@
|
||||
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
|
||||
index fad55160dcb9..a48c8331cbb2 100644
|
||||
--- a/arch/x86/Makefile
|
||||
+++ b/arch/x86/Makefile
|
||||
@@ -239,7 +239,7 @@ ifdef CONFIG_RETPOLINE
|
||||
endif
|
||||
|
||||
@@ -231,3 +231,3 @@ endif
|
||||
archscripts: scripts_basic
|
||||
- $(Q)$(MAKE) $(build)=arch/x86/tools relocs
|
||||
+ $(Q)$(MAKE) $(build)=arch/x86/tools
|
||||
|
||||
###
|
||||
# Syscall table generation
|
||||
|
Loading…
Reference in New Issue
Block a user