From c77691f67d7df0925fcaccdcb50edf27e18e39e8 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Tue, 24 Nov 2026 21:36:23 +0000 Subject: automatic import of kernel --- kernel.spec | 30 ++++++++++++++++++------------ 1 file 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 - 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 - 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 -- cgit v1.2.3