summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-11-24 19:43:47 +0000
committerCoprDistGit <infra@openeuler.org>2026-11-24 19:43:47 +0000
commit1af96922f5e3170d23c4b4c792a4a1ff39f96fa5 (patch)
tree48103adc45c660c6bbaa4b34f43a3fa88535874d
parentc66e5e4031eb1419e1e1c6383fc17da9b1d98b8c (diff)
automatic import of kernel
-rw-r--r--kernel.spec18
1 files changed, 13 insertions, 5 deletions
diff --git a/kernel.spec b/kernel.spec
index bc4dae6..fe71979 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 .21
+%global pkg_release .22
%global _disable_source_fetch 0
%global openeuler_lts 0
@@ -529,15 +529,18 @@ TargetImage=$(basename $(make -s image_name))
# 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.
+# 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.
%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 -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" %{?_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 -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" %{?_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}
@@ -1187,6 +1190,11 @@ fi
%endif
%changelog
+* 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
+ the python extension link on aarch64, so pass neither flag and keep -fPIC
+
* 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