diff options
Diffstat (limited to '0317-Bugfix-set-default-value-when-tune_native-is-NULL.patch')
-rw-r--r-- | 0317-Bugfix-set-default-value-when-tune_native-is-NULL.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/0317-Bugfix-set-default-value-when-tune_native-is-NULL.patch b/0317-Bugfix-set-default-value-when-tune_native-is-NULL.patch new file mode 100644 index 0000000..92f10c2 --- /dev/null +++ b/0317-Bugfix-set-default-value-when-tune_native-is-NULL.patch @@ -0,0 +1,27 @@ +From bc468838ffa1991e50cb4b82b45154d44302417b Mon Sep 17 00:00:00 2001 +From: zhenyu--zhao_admin <zhaozhenyu17@huawei.com> +Date: Tue, 3 Dec 2024 22:39:36 +0800 +Subject: [PATCH 5/5] Bugfix: set default value when tune_native is NULL. + +--- + gcc/gcc.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/gcc/gcc.cc b/gcc/gcc.cc +index 0032735db..90f6dfe85 100644 +--- a/gcc/gcc.cc ++++ b/gcc/gcc.cc +@@ -5800,6 +5800,10 @@ do_self_spec (const char *spec) + do_spec_1 (" ", 0, NULL); + + const char* tune_native = eval_spec_function ("local_cpu_detect", "cpu", ""); ++ if (tune_native == NULL) ++ { ++ tune_native = "native"; ++ } + setenv ("GCC_AI4C_TUNE_INFO", tune_native, 1); + + /* Mark %<S switches processed by do_self_spec to be ignored permanently. +-- +2.33.0 + |