summaryrefslogtreecommitdiff
path: root/kernel.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-11-24 21:36:23 +0000
committerCoprDistGit <infra@openeuler.org>2026-11-24 21:36:23 +0000
commitc77691f67d7df0925fcaccdcb50edf27e18e39e8 (patch)
treebeb150ff4bc2983f8f1e8d0d3bc0238225cdc712 /kernel.spec
parent1af96922f5e3170d23c4b4c792a4a1ff39f96fa5 (diff)
automatic import of kernelopeneuler24.03_LTS_SP3
Diffstat (limited to 'kernel.spec')
-rw-r--r--kernel.spec30
1 files changed, 18 insertions, 12 deletions
diff --git a/kernel.spec b/kernel.spec
index fe71979..8cc04a9 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -42,7 +42,7 @@ rm -f test_openEuler_sign.ko test_openEuler_sign.ko.sig
%global upstream_sublevel 6
%global devel_release 0
%global maintenance_release .0.0
-%global pkg_release .22
+%global pkg_release .23
%global _disable_source_fetch 0
%global openeuler_lts 0
@@ -524,23 +524,24 @@ TargetImage=$(basename $(make -s image_name))
%if %{with_perf}
# perf
#
-# -fpie used to be passed as EXTRA_PERFLIBS=-fpie. Since v7.3.6
-# tools/perf/Makefile.perf folds EXTRA_PERFLIBS into PERFLIBS_PY, which is
-# also used as the prerequisite list of the python extension, so make looks
-# for a rule named "-fpie" and aborts with:
+# perf needs -fpie on the link line, not in the compile flags. Originally it
+# travelled through EXTRA_PERFLIBS, which ends up in LIBS/LIBS_PY. v7.3.6
+# changes tools/perf/Makefile.perf so EXTRA_PERFLIBS is folded into
+# PERFLIBS_PY, which is also the prerequisite list of the python extension,
+# so make looks for a rule named "-fpie" and fails:
# No rule to make target '-fpie', needed by 'python/perf...so'
-# Drop the flag entirely rather than moving it into EXTRA_CFLAGS: EXTRA_CFLAGS
-# already carries -fPIC, and putting -fpie after it overrides -fPIC, which
-# makes the perf objects non-PIC and breaks the python extension link on
-# aarch64 (R_AARCH64_ADR_PREL_PG_HI21 cannot be used in a shared object).
-# perf binaries are PIE through the hardened linker spec from the RPM macros.
+# Do not move it into EXTRA_CFLAGS either: that sits next to -fPIC and makes
+# the objects PIE, breaking the aarch64 link of the llvm-enabled perf with
+# R_AARCH64_ADR_PREL_PG_HI21 ... cannot be used when making a shared object
+# LDFLAGS reaches both the perf link and the python extension link, which is
+# where the flag used to take effect.
%ifarch aarch64
# aarch64 make perf with CORESIGHT=1
%global perf_make \
- LDFLAGS="-Wl,--no-as-needed -lstdc++ %{?build_ldflags}" make %{?clang_make_opts} EXTRA_LDFLAGS="%[ "%{toolchain}" == "clang" ? "-z now" : "" ]" EXTRA_CFLAGS="%[ "%{toolchain}" == "clang" ? "" : "-Wl,-z,now" ] -g -Wall -fstack-protector-strong -fPIC" %{?_smp_mflags} -s V=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_LIBNUMA=1 NO_STRLCPY=1 CORESIGHT=1 prefix=%{_prefix}
+ LDFLAGS="-Wl,--no-as-needed -lstdc++ -fpie %{?build_ldflags}" make %{?clang_make_opts} EXTRA_LDFLAGS="%[ "%{toolchain}" == "clang" ? "-z now" : "" ]" EXTRA_CFLAGS="%[ "%{toolchain}" == "clang" ? "" : "-Wl,-z,now" ] -g -Wall -fstack-protector-strong -fPIC" %{?_smp_mflags} -s V=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_LIBNUMA=1 NO_STRLCPY=1 CORESIGHT=1 prefix=%{_prefix}
%else
%global perf_make \
- LDFLAGS="-Wl,--no-as-needed -lstdc++ %{?build_ldflags}" make %{?clang_make_opts} EXTRA_LDFLAGS="%[ "%{toolchain}" == "clang" ? "-z now" : "" ]" EXTRA_CFLAGS="%[ "%{toolchain}" == "clang" ? "" : "-Wl,-z,now" ] -g -Wall -fstack-protector-strong -fPIC" %{?_smp_mflags} -s V=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_LIBNUMA=1 NO_STRLCPY=1 prefix=%{_prefix}
+ LDFLAGS="-Wl,--no-as-needed -lstdc++ -fpie %{?build_ldflags}" make %{?clang_make_opts} EXTRA_LDFLAGS="%[ "%{toolchain}" == "clang" ? "-z now" : "" ]" EXTRA_CFLAGS="%[ "%{toolchain}" == "clang" ? "" : "-Wl,-z,now" ] -g -Wall -fstack-protector-strong -fPIC" %{?_smp_mflags} -s V=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_LIBNUMA=1 NO_STRLCPY=1 prefix=%{_prefix}
%endif
%if 0%{?with_python2}
%global perf_python2 -C tools/perf PYTHON=%{__python2}
@@ -1190,6 +1191,11 @@ fi
%endif
%changelog
+* Wed Nov 25 2026 Xie XiuQi <xiexiuqi@huawei.com> - 7.3.6-0.0.0.23
+- kernel: move -fpie for perf from EXTRA_PERFLIBS to LDFLAGS
+- perf: v7.3.6 folds EXTRA_PERFLIBS into the python extension prerequisite
+ list, and dropping the flag breaks the aarch64 llvm-enabled link
+
* Wed Nov 25 2026 Xie XiuQi <xiexiuqi@huawei.com> - 7.3.6-0.0.0.22
- kernel: drop the extra -fpie from the perf build flags
- perf: -fpie after -fPIC in EXTRA_CFLAGS makes objects non-PIC and breaks