Skip to content

Commit 96951f3

Browse files
committed
Merge: redhat: remove kernel-ipaclones-internal package
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6723 JIRA: https://issues.redhat.com/browse/RHEL-86518 The kernel-ipaclones-internal package added the gcc option -fdump-ipa-clones to KCFLAGS in anticipation of supporting source-based livepatch creation. This is not needed by kpatch-build or objtool-based tools, clang doesn't support it, and it interferes with Rust enablement. Remove the build option and packaging of the generated files. Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com> Approved-by: Jan Stancek <jstancek@redhat.com> Approved-by: Herton R. Krzesinski <herton@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Augusto Caringi <acaringi@redhat.com>
2 parents ffde392 + d720643 commit 96951f3

File tree

1 file changed

+0
-66
lines changed

1 file changed

+0
-66
lines changed

redhat/kernel.spec.template

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -264,19 +264,13 @@ Summary: The Linux kernel
264264
# gcov support
265265
%define with_gcov %{?_with_gcov:1}%{?!_with_gcov:0}
266266

267-
#
268-
# ipa_clone support
269-
%define with_ipaclones %{?_without_ipaclones: 0} %{?!_without_ipaclones: 1}
270-
271267
# Want to build a vanilla kernel build without any non-upstream patches?
272268
%define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0}
273269

274270
%if 0%{?fedora}
275271
# Kernel headers are being split out into a separate package
276272
%define with_headers 0
277273
%define with_cross_headers 0
278-
# no ipa_clone for now
279-
%define with_ipaclones 0
280274
# no stablelist
281275
%define with_kernel_abi_stablelists 0
282276
# Fedora builds these separately
@@ -301,8 +295,6 @@ Summary: The Linux kernel
301295
%global clang_make_opts %{clang_make_opts} LD=ld.lld HOSTLD=ld.lld AR=llvm-ar NM=llvm-nm HOSTAR=llvm-ar HOSTNM=llvm-nm
302296
%endif
303297
%global make_opts %{make_opts} %{clang_make_opts}
304-
# clang does not support the -fdump-ipa-clones option
305-
%global with_ipaclones 0
306298
%endif
307299

308300
# turn off debug kernel and kabichk for gcov builds
@@ -320,16 +312,6 @@ Summary: The Linux kernel
320312
%define with_kabidwchk 0
321313
%endif
322314

323-
# kpatch_kcflags are extra compiler flags applied to base kernel
324-
# -fdump-ipa-clones is enabled only for base kernels on selected arches
325-
%if %{with_ipaclones}
326-
%ifarch x86_64 ppc64le
327-
%define kpatch_kcflags -fdump-ipa-clones
328-
%else
329-
%define with_ipaclones 0
330-
%endif
331-
%endif
332-
333315
%define make_target bzImage
334316
%define image_install_path boot
335317

@@ -380,7 +362,6 @@ Summary: The Linux kernel
380362
%define with_selftests 0
381363
%define with_cross 0
382364
%define with_cross_headers 0
383-
%define with_ipaclones 0
384365
%endif
385366

386367
# if requested, only build pae kernel
@@ -401,7 +382,6 @@ Summary: The Linux kernel
401382
%define with_selftests 0
402383
%define with_cross 0
403384
%define with_cross_headers 0
404-
%define with_ipaclones 0
405385
%endif
406386

407387
# if requested, only build realtime kernel
@@ -416,7 +396,6 @@ Summary: The Linux kernel
416396
%define with_selftests 0
417397
%define with_cross 0
418398
%define with_cross_headers 0
419-
%define with_ipaclones 0
420399
%endif
421400

422401
# turn off kABI DUP check and DWARF-based check if kABI check is disabled
@@ -1295,18 +1274,6 @@ Requires: kernel%{?1:-%{1}}-core = %{version}-%{release}\
12951274
This meta package is used to install matching core and devel packages for a given %{?2:%{2} }kernel.\
12961275
%{nil}
12971276

1298-
#
1299-
# kernel-<variant>-ipaclones-internal package
1300-
#
1301-
%define kernel_ipaclones_package() \
1302-
%package %{?1:%{1}-}ipaclones-internal\
1303-
Summary: *.ipa-clones files generated by -fdump-ipa-clones for kernel%{?1:-%{1}}\
1304-
Group: System Environment/Kernel\
1305-
AutoReqProv: no\
1306-
%description %{?1:%{1}-}ipaclones-internal\
1307-
This package provides *.ipa-clones files.\
1308-
%{nil}
1309-
13101277
#
13111278
# This macro creates a kernel-<subpackage>-modules-internal package.
13121279
# %%kernel_modules_internal_package <subpackage> <pretty-name>
@@ -1610,10 +1577,6 @@ Prebuilt default unified kernel image for virtual machines.
16101577
Prebuilt default unified kernel image addons for virtual machines.
16111578
%endif
16121579

1613-
%if %{with_ipaclones}
1614-
%kernel_ipaclones_package
1615-
%endif
1616-
16171580
%prep
16181581
# do a few sanity-checks for --with *only builds
16191582
%if %{with_baseonly}
@@ -1878,11 +1841,6 @@ InitBuildVars() {
18781841
echo USING ARCH=$Arch
18791842

18801843
KCFLAGS="%{?kcflags}"
1881-
1882-
# add kpatch flags for base kernel
1883-
if [ "$Variant" == "" ]; then
1884-
KCFLAGS="$KCFLAGS %{?kpatch_kcflags}"
1885-
fi
18861844
}
18871845

18881846
BuildKernel() {
@@ -2579,17 +2537,6 @@ BuildKernel() {
25792537
fi
25802538
%endif
25812539

2582-
%if %{with_ipaclones}
2583-
MAXPROCS=$(echo %{?_smp_mflags} | sed -n 's/-j\s*\([0-9]\+\)/\1/p')
2584-
if [ -z "$MAXPROCS" ]; then
2585-
MAXPROCS=1
2586-
fi
2587-
if [ "$Variant" == "" ]; then
2588-
mkdir -p $RPM_BUILD_ROOT/$DevelDir-ipaclones
2589-
find . -name '*.ipa-clones' | xargs -i{} -r -n 1 -P $MAXPROCS install -m 644 -D "{}" "$RPM_BUILD_ROOT/$DevelDir-ipaclones/{}"
2590-
fi
2591-
%endif
2592-
25932540
%if %{with_gcov}
25942541
popd
25952542
%endif
@@ -3714,19 +3661,6 @@ fi
37143661
%kernel_variant_files %{_use_vdso} %{with_arm64_64k} 64k
37153662
%kernel_variant_files %{_use_vdso} %{with_realtime_arm64_64k} rt-64k
37163663

3717-
%define kernel_variant_ipaclones(k:) \
3718-
%if %{1}\
3719-
%if %{with_ipaclones}\
3720-
%{expand:%%files %{?2:%{2}-}ipaclones-internal}\
3721-
%defattr(-,root,root)\
3722-
%defverify(not mtime)\
3723-
/usr/src/kernels/%{KVERREL}%{?2:+%{2}}-ipaclones\
3724-
%endif\
3725-
%endif\
3726-
%{nil}
3727-
3728-
%kernel_variant_ipaclones %{with_up}
3729-
37303664
# plz don't put in a version string unless you're going to tag
37313665
# and build.
37323666
#

0 commit comments

Comments
 (0)