forked from rpms/kernel
		
	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 <dzickus@redhat.com>
This commit is contained in:
		
							parent
							
								
									1b063eee54
								
							
						
					
					
						commit
						1ccbaa7369
					
				| @ -1049,7 +1049,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y | |||||||
| # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set | # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set | ||||||
| CONFIG_DEBUG_FS=y | CONFIG_DEBUG_FS=y | ||||||
| # CONFIG_DEBUG_GPIO is not set | # 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_COMPRESSED is not set | ||||||
| CONFIG_DEBUG_INFO_DWARF4=y | CONFIG_DEBUG_INFO_DWARF4=y | ||||||
| # CONFIG_DEBUG_INFO_REDUCED is not set | # CONFIG_DEBUG_INFO_REDUCED is not set | ||||||
|  | |||||||
| @ -1049,7 +1049,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y | |||||||
| # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set | # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set | ||||||
| CONFIG_DEBUG_FS=y | CONFIG_DEBUG_FS=y | ||||||
| # CONFIG_DEBUG_GPIO is not set | # 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_COMPRESSED is not set | ||||||
| CONFIG_DEBUG_INFO_DWARF4=y | CONFIG_DEBUG_INFO_DWARF4=y | ||||||
| # CONFIG_DEBUG_INFO_REDUCED is not set | # CONFIG_DEBUG_INFO_REDUCED is not set | ||||||
|  | |||||||
| @ -926,7 +926,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y | |||||||
| CONFIG_DEBUG_FS=y | CONFIG_DEBUG_FS=y | ||||||
| CONFIG_DEBUGGER=y | CONFIG_DEBUGGER=y | ||||||
| # CONFIG_DEBUG_GPIO is not set | # 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_COMPRESSED is not set | ||||||
| CONFIG_DEBUG_INFO_DWARF4=y | CONFIG_DEBUG_INFO_DWARF4=y | ||||||
| # CONFIG_DEBUG_INFO_REDUCED is not set | # CONFIG_DEBUG_INFO_REDUCED is not set | ||||||
|  | |||||||
| @ -926,7 +926,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y | |||||||
| CONFIG_DEBUG_FS=y | CONFIG_DEBUG_FS=y | ||||||
| CONFIG_DEBUGGER=y | CONFIG_DEBUGGER=y | ||||||
| # CONFIG_DEBUG_GPIO is not set | # 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_COMPRESSED is not set | ||||||
| CONFIG_DEBUG_INFO_DWARF4=y | CONFIG_DEBUG_INFO_DWARF4=y | ||||||
| # CONFIG_DEBUG_INFO_REDUCED is not set | # CONFIG_DEBUG_INFO_REDUCED is not set | ||||||
|  | |||||||
| @ -933,7 +933,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y | |||||||
| # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set | # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set | ||||||
| CONFIG_DEBUG_FS=y | CONFIG_DEBUG_FS=y | ||||||
| # CONFIG_DEBUG_GPIO is not set | # 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_COMPRESSED is not set | ||||||
| CONFIG_DEBUG_INFO_DWARF4=y | CONFIG_DEBUG_INFO_DWARF4=y | ||||||
| # CONFIG_DEBUG_INFO_REDUCED is not set | # CONFIG_DEBUG_INFO_REDUCED is not set | ||||||
|  | |||||||
| @ -933,7 +933,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y | |||||||
| # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set | # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set | ||||||
| CONFIG_DEBUG_FS=y | CONFIG_DEBUG_FS=y | ||||||
| # CONFIG_DEBUG_GPIO is not set | # 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_COMPRESSED is not set | ||||||
| CONFIG_DEBUG_INFO_DWARF4=y | CONFIG_DEBUG_INFO_DWARF4=y | ||||||
| # CONFIG_DEBUG_INFO_REDUCED is not set | # CONFIG_DEBUG_INFO_REDUCED is not set | ||||||
|  | |||||||
| @ -940,7 +940,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y | |||||||
| # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set | # CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set | ||||||
| CONFIG_DEBUG_FS=y | CONFIG_DEBUG_FS=y | ||||||
| # CONFIG_DEBUG_GPIO is not set | # 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_COMPRESSED is not set | ||||||
| CONFIG_DEBUG_INFO_DWARF4=y | CONFIG_DEBUG_INFO_DWARF4=y | ||||||
| # CONFIG_DEBUG_INFO_REDUCED is not set | # CONFIG_DEBUG_INFO_REDUCED is not set | ||||||
|  | |||||||
| @ -986,7 +986,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y | |||||||
| CONFIG_DEBUG_FS=y | CONFIG_DEBUG_FS=y | ||||||
| # CONFIG_DEBUG_GPIO is not set | # CONFIG_DEBUG_GPIO is not set | ||||||
| # CONFIG_DEBUG_HOTPLUG_CPU0 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_COMPRESSED is not set | ||||||
| CONFIG_DEBUG_INFO_DWARF4=y | CONFIG_DEBUG_INFO_DWARF4=y | ||||||
| # CONFIG_DEBUG_INFO_REDUCED is not set | # CONFIG_DEBUG_INFO_REDUCED is not set | ||||||
|  | |||||||
| @ -986,7 +986,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y | |||||||
| CONFIG_DEBUG_FS=y | CONFIG_DEBUG_FS=y | ||||||
| # CONFIG_DEBUG_GPIO is not set | # CONFIG_DEBUG_GPIO is not set | ||||||
| # CONFIG_DEBUG_HOTPLUG_CPU0 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_COMPRESSED is not set | ||||||
| CONFIG_DEBUG_INFO_DWARF4=y | CONFIG_DEBUG_INFO_DWARF4=y | ||||||
| # CONFIG_DEBUG_INFO_REDUCED is not set | # CONFIG_DEBUG_INFO_REDUCED is not set | ||||||
|  | |||||||
| @ -1,3 +1,4 @@ | |||||||
|  | %global _lto_cflags %{nil} | ||||||
| # We have to override the new %%install behavior because, well... the kernel is special. | # We have to override the new %%install behavior because, well... the kernel is special. | ||||||
| %global __spec_install_pre %{___build_pre} | %global __spec_install_pre %{___build_pre} | ||||||
| 
 | 
 | ||||||
| @ -182,10 +183,10 @@ Summary: The Linux kernel | |||||||
| # no whitelist | # no whitelist | ||||||
| %define with_kernel_abi_whitelists 0 | %define with_kernel_abi_whitelists 0 | ||||||
| # Fedora builds these separately | # Fedora builds these separately | ||||||
| %endif |  | ||||||
| %define with_perf 0 | %define with_perf 0 | ||||||
| %define with_tools 0 | %define with_tools 0 | ||||||
| %define with_bpftool 0 | %define with_bpftool 0 | ||||||
|  | %endif | ||||||
| 
 | 
 | ||||||
| %if %{with_verbose} | %if %{with_verbose} | ||||||
| %define make_opts V=1 | %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: 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: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex | ||||||
| BuildRequires: net-tools, hostname, bc, elfutils-devel | BuildRequires: net-tools, hostname, bc, elfutils-devel | ||||||
| %if 0%{?fedora} |  | ||||||
| BuildRequires: dwarves | BuildRequires: dwarves | ||||||
| %endif |  | ||||||
| BuildRequires: python3-devel | BuildRequires: python3-devel | ||||||
| %if %{with_headers} | %if %{with_headers} | ||||||
| BuildRequires: rsync | BuildRequires: rsync | ||||||
| @ -518,9 +517,7 @@ BuildConflicts: rhbuildsys(DiskFree) < 500Mb | |||||||
| %if %{with_debuginfo} | %if %{with_debuginfo} | ||||||
| BuildRequires: rpm-build, elfutils | BuildRequires: rpm-build, elfutils | ||||||
| BuildConflicts: rpm < 4.13.0.1-19 | BuildConflicts: rpm < 4.13.0.1-19 | ||||||
| %if 0%{?fedora} |  | ||||||
| BuildConflicts: dwarves < 1.13 | BuildConflicts: dwarves < 1.13 | ||||||
| %endif |  | ||||||
| # Most of these should be enabled after more investigation | # Most of these should be enabled after more investigation | ||||||
| %undefine _include_minidebuginfo | %undefine _include_minidebuginfo | ||||||
| %undefine _find_debuginfo_dwz_opts | %undefine _find_debuginfo_dwz_opts | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user