diff --git a/0334-Dont-use-local_detect_cpu-when-cross-build.patch b/0334-Dont-use-local_detect_cpu-when-cross-build.patch new file mode 100644 index 0000000000000000000000000000000000000000..d951bdc27620491508e9d3d9f6c45af361f2e0a2 --- /dev/null +++ b/0334-Dont-use-local_detect_cpu-when-cross-build.patch @@ -0,0 +1,27 @@ +From cd708367a6558eca37715f8068f044a55402edab Mon Sep 17 00:00:00 2001 +From: YunQiang Su +Date: Wed, 18 Dec 2024 14:22:03 +0800 +Subject: [PATCH] Don't use local_detect_cpu when cross build + +-march=native makes no sense for cross build. +--- + gcc/gcc.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/gcc.cc b/gcc/gcc.cc +index 179d507f255..f2387e0fae2 100644 +--- a/gcc/gcc.cc ++++ b/gcc/gcc.cc +@@ -5800,7 +5800,7 @@ do_self_spec (const char *spec) + do_spec_1 (" ", 0, NULL); + + const char* tune_native = NULL; +-#if defined (__x86_64__) || defined (__aarch64__) ++#if !defined(CROSS_DIRECTORY_STRUCTURE) && (defined (__x86_64__) || defined (__aarch64__)) + tune_native = eval_spec_function ("local_cpu_detect", "cpu", ""); + #endif + if (tune_native == NULL) +-- +Gitee + + diff --git a/gcc.spec b/gcc.spec index 6328283c085274f11e8b9cdfa75fef92e02b4547..3a0055f779768bb64a92245cca0e5f72a7de5d42 100644 --- a/gcc.spec +++ b/gcc.spec @@ -2,7 +2,7 @@ %global gcc_major 12 # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. -%global gcc_release 63 +%global gcc_release 64 %global _unpackaged_files_terminate_build 0 %global _performance_build 1 @@ -437,6 +437,7 @@ Patch328: 0328-Bugfix-if-split-Added-checking-for-ssa_name.patch Patch329: 0329-Fixed-work-with-loops-in-process_complex_cond.patch Patch330: 0330-bugfix-fix-typo-error.patch Patch331: 0331-fix-function-missing-return-value.patch +Patch334: 0334-Dont-use-local_detect_cpu-when-cross-build.patch # Part 1001-1999 %ifarch sw_64 @@ -1554,6 +1555,7 @@ not stable, so plugins must be rebuilt any time GCC is updated. %patch -P329 -p1 %patch -P330 -p1 %patch -P331 -p1 +%patch -P334 -p1 %ifarch sw_64 %patch -P1001 -p1 @@ -4177,6 +4179,9 @@ end %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Thu Jul 24 2025 Ouuleilei - 12.3.1-64 +- Sync 0334 patch from 24.03SP2-Next + * Sat Dec 21 2024 rfwang07 - 12.3.1-63 - Type:Bugfix - ID:NA