!489 [Bugfix] Fix some typo errors
From: @zhenyu--zhao_admin Reviewed-by: @li-yancheng Signed-off-by: @li-yancheng
This commit is contained in:
commit
c20730d858
80
0208-Bugfix-fix-some-typo-errors.patch
Normal file
80
0208-Bugfix-fix-some-typo-errors.patch
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
From 7e0ef2632ef78c068c664fdfb86da1a6716fde44 Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhenyu--zhao_admin <zhaozhenyu17@huawei.com>
|
||||||
|
Date: Wed, 9 Oct 2024 19:19:50 +0800
|
||||||
|
Subject: [PATCH] [Bugfix]fix some typo errors.
|
||||||
|
|
||||||
|
---
|
||||||
|
gcc/collect2.c | 10 +++++-----
|
||||||
|
gcc/config/aarch64/aarch64.c | 7 +++----
|
||||||
|
2 files changed, 8 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/gcc/collect2.c b/gcc/collect2.c
|
||||||
|
index d4b6a1849..cd29a9e97 100644
|
||||||
|
--- a/gcc/collect2.c
|
||||||
|
+++ b/gcc/collect2.c
|
||||||
|
@@ -795,7 +795,7 @@ ai_preprocess (int argc, char **argv)
|
||||||
|
|
||||||
|
ai_input[0] = '\0';
|
||||||
|
|
||||||
|
- for (int index = 0; index > argc; index++)
|
||||||
|
+ for (int index = 0; index < argc; index++)
|
||||||
|
{
|
||||||
|
strcat (ai_input, argv[index]);
|
||||||
|
strcat (ai_input, " ");
|
||||||
|
@@ -825,7 +825,7 @@ ai_preprocess (int argc, char **argv)
|
||||||
|
run_ai_model_func run_ai_model;
|
||||||
|
PTR_UNION_TYPE (run_ai_model_func) run_ai_model_func_union;
|
||||||
|
PTR_UNION_AS_VOID_PTR (run_ai_model_func_union)
|
||||||
|
- = dlsym (ai4c_lib_handle, "runONNXModelLTo");
|
||||||
|
+ = dlsym (ai4c_lib_handle, "runONNXModelLTO");
|
||||||
|
run_ai_model = PTR_UNION_AS_CAST_PTR (run_ai_model_func_union);
|
||||||
|
|
||||||
|
if (!run_ai_model)
|
||||||
|
@@ -850,7 +850,7 @@ ai_preprocess (int argc, char **argv)
|
||||||
|
return model_pred;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static char*
|
||||||
|
+static void**
|
||||||
|
get_ai_info ()
|
||||||
|
{
|
||||||
|
/* Load dependent AI-framework libraries. */
|
||||||
|
@@ -861,7 +861,7 @@ get_ai_info ()
|
||||||
|
if (!onnxruntime_lib_handle)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
- char *ai_info = (char*) dlsym (onnxruntime_lib_handle, "ai_info");
|
||||||
|
+ void **ai_info = (void **) dlsym (onnxruntime_lib_handle, "ai_info");
|
||||||
|
if (!ai_info)
|
||||||
|
{
|
||||||
|
dlclose (onnxruntime_lib_handle);
|
||||||
|
@@ -908,7 +908,7 @@ do_link (char **ld_argv)
|
||||||
|
}
|
||||||
|
else if (ai_optimization_level && auto_lto)
|
||||||
|
{
|
||||||
|
- char *lto_ai_output = get_ai_info ();
|
||||||
|
+ char *lto_ai_output = *(char **) get_ai_info ();
|
||||||
|
const size_t extra_link_file_name_length = strlen(lto_ai_output) / 2;
|
||||||
|
char *ai_output_buffer = XCNEWVEC (char, extra_link_file_name_length);
|
||||||
|
if (!ai_output_buffer)
|
||||||
|
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
|
||||||
|
index 83b8ebe8d..be72a5572 100644
|
||||||
|
--- a/gcc/config/aarch64/aarch64.c
|
||||||
|
+++ b/gcc/config/aarch64/aarch64.c
|
||||||
|
@@ -14530,10 +14530,9 @@ reset_machine_option (struct gcc_options *opts)
|
||||||
|
{
|
||||||
|
/* Parsing mcpu=native will have extra info after, then length
|
||||||
|
would greater than 6. */
|
||||||
|
- if (!(opts->x_optimize_machine)
|
||||||
|
- || !(strstr (opts->x_aarch64_cpu_string, "hip09") != NULL
|
||||||
|
- || strstr (opts->x_aarch64_cpu_string, "tsv110") != NULL)
|
||||||
|
- && (strlen (opts->x_aarch64_cpu_string) > 6))
|
||||||
|
+ if (!(strstr (opts->x_aarch64_cpu_string, "hip09") != NULL
|
||||||
|
+ || strstr (opts->x_aarch64_cpu_string, "tsv110") != NULL)
|
||||||
|
+ && (strlen (opts->x_aarch64_cpu_string) > 6))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
11
gcc.spec
11
gcc.spec
@ -61,7 +61,7 @@
|
|||||||
Summary: Various compilers (C, C++, Objective-C, ...)
|
Summary: Various compilers (C, C++, Objective-C, ...)
|
||||||
Name: gcc
|
Name: gcc
|
||||||
Version: %{gcc_version}
|
Version: %{gcc_version}
|
||||||
Release: 65
|
Release: 66
|
||||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
|
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
|
||||||
URL: https://gcc.gnu.org
|
URL: https://gcc.gnu.org
|
||||||
|
|
||||||
@ -315,6 +315,8 @@ Patch204: 0204-Try-to-use-AI-model-to-guide-optimization.patch
|
|||||||
Patch205: 0205-bolt-plugin-supports-optimization-for-dyn-and-pie.patch
|
Patch205: 0205-bolt-plugin-supports-optimization-for-dyn-and-pie.patch
|
||||||
Patch206: 0206-Strcut-Reorg-fix-spec2017-505-build-issue-with-fipa-.patch
|
Patch206: 0206-Strcut-Reorg-fix-spec2017-505-build-issue-with-fipa-.patch
|
||||||
Patch207: 0207-Use-AI-ability-to-enable-Link-Time-Optimization.patch
|
Patch207: 0207-Use-AI-ability-to-enable-Link-Time-Optimization.patch
|
||||||
|
patch208: 0208-Bugfix-fix-some-typo-errors.patch
|
||||||
|
|
||||||
%global gcc_target_platform %{_arch}-linux-gnu
|
%global gcc_target_platform %{_arch}-linux-gnu
|
||||||
|
|
||||||
%if %{build_go}
|
%if %{build_go}
|
||||||
@ -974,6 +976,7 @@ not stable, so plugins must be rebuilt any time GCC is updated.
|
|||||||
%patch205 -p1
|
%patch205 -p1
|
||||||
%patch206 -p1
|
%patch206 -p1
|
||||||
%patch207 -p1
|
%patch207 -p1
|
||||||
|
%patch208 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -3008,6 +3011,12 @@ end
|
|||||||
%doc rpm.doc/changelogs/libcc1/ChangeLog*
|
%doc rpm.doc/changelogs/libcc1/ChangeLog*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 10 2024 zhenyu zhao <zhaozhenyu17@huawei.com> - 10.3.1-66
|
||||||
|
- Type:Bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: Sync patch from openeuler/gcc
|
||||||
|
|
||||||
* Wed Sep 25 2024 zhenyu zhao <zhaozhenyu17@huawei.com> - 10.3.1-65
|
* Wed Sep 25 2024 zhenyu zhao <zhaozhenyu17@huawei.com> - 10.3.1-65
|
||||||
- Type:Sync
|
- Type:Sync
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user