From 1ccbaa73692d4f01ad5cbdb7c2a7faf18586e66f Mon Sep 17 00:00:00 2001 From: Don Zickus Date: Fri, 30 Oct 2020 15:59:40 -0400 Subject: [PATCH] Enable BPF features and fix LTO issues This change builds kernel-tools from this spec file again. In order to do that, we had to properly disable LTO and correctly build bpftool (by enabling CONFIG_DEBUG_INFO_BTF=y). This is how we want RHEL-9-alpha built now. Signed-off-by: Don Zickus --- kernel-aarch64-debug-rhel.config | 2 +- kernel-aarch64-rhel.config | 2 +- kernel-ppc64le-debug-rhel.config | 2 +- kernel-ppc64le-rhel.config | 2 +- kernel-s390x-debug-rhel.config | 2 +- kernel-s390x-rhel.config | 2 +- kernel-s390x-zfcpdump-rhel.config | 2 +- kernel-x86_64-debug-rhel.config | 2 +- kernel-x86_64-rhel.config | 2 +- kernel.spec | 7 ++----- 10 files changed, 11 insertions(+), 14 deletions(-) diff --git a/kernel-aarch64-debug-rhel.config b/kernel-aarch64-debug-rhel.config index 0fb4698..311d927 100644 --- a/kernel-aarch64-debug-rhel.config +++ b/kernel-aarch64-debug-rhel.config @@ -1049,7 +1049,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_COMPRESSED is not set CONFIG_DEBUG_INFO_DWARF4=y # CONFIG_DEBUG_INFO_REDUCED is not set diff --git a/kernel-aarch64-rhel.config b/kernel-aarch64-rhel.config index 8b10d93..0b2a8aa 100644 --- a/kernel-aarch64-rhel.config +++ b/kernel-aarch64-rhel.config @@ -1049,7 +1049,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_COMPRESSED is not set CONFIG_DEBUG_INFO_DWARF4=y # CONFIG_DEBUG_INFO_REDUCED is not set diff --git a/kernel-ppc64le-debug-rhel.config b/kernel-ppc64le-debug-rhel.config index b9706c4..72db95d 100644 --- a/kernel-ppc64le-debug-rhel.config +++ b/kernel-ppc64le-debug-rhel.config @@ -926,7 +926,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y CONFIG_DEBUG_FS=y CONFIG_DEBUGGER=y # CONFIG_DEBUG_GPIO is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_COMPRESSED is not set CONFIG_DEBUG_INFO_DWARF4=y # CONFIG_DEBUG_INFO_REDUCED is not set diff --git a/kernel-ppc64le-rhel.config b/kernel-ppc64le-rhel.config index e266cd4..2cc2ae0 100644 --- a/kernel-ppc64le-rhel.config +++ b/kernel-ppc64le-rhel.config @@ -926,7 +926,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y CONFIG_DEBUG_FS=y CONFIG_DEBUGGER=y # CONFIG_DEBUG_GPIO is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_COMPRESSED is not set CONFIG_DEBUG_INFO_DWARF4=y # CONFIG_DEBUG_INFO_REDUCED is not set diff --git a/kernel-s390x-debug-rhel.config b/kernel-s390x-debug-rhel.config index 2a18adc..520e0d7 100644 --- a/kernel-s390x-debug-rhel.config +++ b/kernel-s390x-debug-rhel.config @@ -933,7 +933,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_COMPRESSED is not set CONFIG_DEBUG_INFO_DWARF4=y # CONFIG_DEBUG_INFO_REDUCED is not set diff --git a/kernel-s390x-rhel.config b/kernel-s390x-rhel.config index f985325..24878ef 100644 --- a/kernel-s390x-rhel.config +++ b/kernel-s390x-rhel.config @@ -933,7 +933,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_COMPRESSED is not set CONFIG_DEBUG_INFO_DWARF4=y # CONFIG_DEBUG_INFO_REDUCED is not set diff --git a/kernel-s390x-zfcpdump-rhel.config b/kernel-s390x-zfcpdump-rhel.config index 786a288..459e48f 100644 --- a/kernel-s390x-zfcpdump-rhel.config +++ b/kernel-s390x-zfcpdump-rhel.config @@ -940,7 +940,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_COMPRESSED is not set CONFIG_DEBUG_INFO_DWARF4=y # CONFIG_DEBUG_INFO_REDUCED is not set diff --git a/kernel-x86_64-debug-rhel.config b/kernel-x86_64-debug-rhel.config index df4b412..e41dc59 100644 --- a/kernel-x86_64-debug-rhel.config +++ b/kernel-x86_64-debug-rhel.config @@ -986,7 +986,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_COMPRESSED is not set CONFIG_DEBUG_INFO_DWARF4=y # CONFIG_DEBUG_INFO_REDUCED is not set diff --git a/kernel-x86_64-rhel.config b/kernel-x86_64-rhel.config index f5814c5..f7c50fe 100644 --- a/kernel-x86_64-rhel.config +++ b/kernel-x86_64-rhel.config @@ -986,7 +986,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y CONFIG_DEBUG_FS=y # CONFIG_DEBUG_GPIO is not set # CONFIG_DEBUG_HOTPLUG_CPU0 is not set -# CONFIG_DEBUG_INFO_BTF is not set +CONFIG_DEBUG_INFO_BTF=y # CONFIG_DEBUG_INFO_COMPRESSED is not set CONFIG_DEBUG_INFO_DWARF4=y # CONFIG_DEBUG_INFO_REDUCED is not set diff --git a/kernel.spec b/kernel.spec index 116786d..418a2ae 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1,3 +1,4 @@ +%global _lto_cflags %{nil} # We have to override the new %%install behavior because, well... the kernel is special. %global __spec_install_pre %{___build_pre} @@ -182,10 +183,10 @@ Summary: The Linux kernel # no whitelist %define with_kernel_abi_whitelists 0 # Fedora builds these separately -%endif %define with_perf 0 %define with_tools 0 %define with_bpftool 0 +%endif %if %{with_verbose} %define make_opts V=1 @@ -476,9 +477,7 @@ BuildRequires: kmod, patch, bash, tar, git-core BuildRequires: bzip2, xz, findutils, gzip, m4, perl-interpreter, perl-Carp, perl-devel, perl-generators, make, diffutils, gawk BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex BuildRequires: net-tools, hostname, bc, elfutils-devel -%if 0%{?fedora} BuildRequires: dwarves -%endif BuildRequires: python3-devel %if %{with_headers} BuildRequires: rsync @@ -518,9 +517,7 @@ BuildConflicts: rhbuildsys(DiskFree) < 500Mb %if %{with_debuginfo} BuildRequires: rpm-build, elfutils BuildConflicts: rpm < 4.13.0.1-19 -%if 0%{?fedora} BuildConflicts: dwarves < 1.13 -%endif # Most of these should be enabled after more investigation %undefine _include_minidebuginfo %undefine _find_debuginfo_dwz_opts