summaryrefslogtreecommitdiff
path: root/kernel.spec
diff options
context:
space:
mode:
Diffstat (limited to 'kernel.spec')
-rw-r--r--kernel.spec19
1 files changed, 16 insertions, 3 deletions
diff --git a/kernel.spec b/kernel.spec
index 2155c24..bc4dae6 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 .20
+%global pkg_release .21
%global _disable_source_fetch 0
%global openeuler_lts 0
@@ -523,13 +523,21 @@ TargetImage=$(basename $(make -s image_name))
## make tools
%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:
+# No rule to make target '-fpie', needed by 'python/perf...so'
+# Keep the flag as a compiler option instead. PIE itself comes from the
+# hardened linker spec inherited from the RPM macros.
%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" EXTRA_PERFLIBS="-fpie" %{?_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++ %{?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 -fpie" %{?_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" EXTRA_PERFLIBS="-fpie" %{?_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++ %{?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 -fpie" %{?_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}
@@ -1179,6 +1187,11 @@ fi
%endif
%changelog
+* Wed Nov 25 2026 Xie XiuQi <xiexiuqi@huawei.com> - 7.3.6-0.0.0.21
+- kernel: pass -fpie in EXTRA_CFLAGS instead of EXTRA_PERFLIBS for perf
+- perf: v7.3.6 folds EXTRA_PERFLIBS into PERFLIBS_PY, which is a make
+ prerequisite list, so "-fpie" was treated as a target and broke the build
+
* Tue Nov 24 2026 Xie XiuQi <xiexiuqi@huawei.com> - 7.3.6-0.0.0.20
- kernel: update to v7.3.6
- Source0: fetch linux-7.3.6.tar.xz from aliyun kernel.org mirror