[FIX] Adaptation to gcc12 only solves the build problem
This commit is contained in:
parent
2b7de02b88
commit
b845d1f504
@ -0,0 +1,48 @@
|
|||||||
|
From a90cb241218f32ec2da8355e74f0736d245d62a8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: dingguangya <dingguangya1@huawei.com>
|
||||||
|
Date: Fri, 4 Aug 2023 11:15:06 +0800
|
||||||
|
Subject: [PATCH 2/2] [Pin-gcc-client] Adaptation to gcc12 only solves the
|
||||||
|
build problem
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index fcd737b..3ed6b28 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -50,7 +50,7 @@ execute_process(COMMAND gcc -print-file-name=plugin
|
||||||
|
ERROR_STRIP_TRAILING_WHITESPACE)
|
||||||
|
include_directories(${output_var}/include)
|
||||||
|
include_directories(include)
|
||||||
|
-add_compile_options(-std=c++14 -Wall -fPIC -fno-rtti)
|
||||||
|
+add_compile_options(-std=c++17 -Wall -fPIC -fno-rtti)
|
||||||
|
|
||||||
|
# Proto file
|
||||||
|
get_filename_component(plg_proto "protos/plugin.proto" ABSOLUTE)
|
||||||
|
diff --git a/cmake/common.cmake b/cmake/common.cmake
|
||||||
|
index 3d2252e..2d97026 100644
|
||||||
|
--- a/cmake/common.cmake
|
||||||
|
+++ b/cmake/common.cmake
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
cmake_minimum_required(VERSION 3.5.1)
|
||||||
|
|
||||||
|
-set (CMAKE_CXX_STANDARD 14)
|
||||||
|
+set (CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
|
diff --git a/lib/Translate/GimpleToPluginOps.cpp b/lib/Translate/GimpleToPluginOps.cpp
|
||||||
|
index 80d4e87..c358d17 100644
|
||||||
|
--- a/lib/Translate/GimpleToPluginOps.cpp
|
||||||
|
+++ b/lib/Translate/GimpleToPluginOps.cpp
|
||||||
|
@@ -640,7 +640,7 @@ vector<LoopOp> GimpleToPluginOps::GetAllLoops(uint64_t funcID)
|
||||||
|
vector<LoopOp> loops;
|
||||||
|
enum li_flags LI = LI_FROM_INNERMOST;
|
||||||
|
class loop *loop;
|
||||||
|
- FOR_EACH_LOOP(loop, LI) {
|
||||||
|
+ for (auto loop : loops_list (cfun, LI)) {
|
||||||
|
uint64_t id = reinterpret_cast<uint64_t>(reinterpret_cast<void*>(loop));
|
||||||
|
LoopOp pluginLoop;
|
||||||
|
if (!id) {
|
||||||
|
--
|
||||||
|
2.33.0.windows.2
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: pin-gcc-client
|
Name: pin-gcc-client
|
||||||
Version: 0.4.1
|
Version: 0.4.1
|
||||||
Release: 9
|
Release: 10
|
||||||
Summary: A Pin (Plug-IN framework) client is implemented based on GCC plugin and can execute the compiler optimization pass in GCC.
|
Summary: A Pin (Plug-IN framework) client is implemented based on GCC plugin and can execute the compiler optimization pass in GCC.
|
||||||
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://gitee.com/src-openeuler/pin-gcc-client
|
URL: https://gitee.com/src-openeuler/pin-gcc-client
|
||||||
@ -21,6 +21,7 @@ Patch8: 0008-Pin-gcc-client-Fix-struct-self-contained-CallOp-Tree.patch
|
|||||||
Patch9: 0009-Pin-gcc-client-Fix-TreeToValue-VAR_DECL-and-ARRAY_TY.patch
|
Patch9: 0009-Pin-gcc-client-Fix-TreeToValue-VAR_DECL-and-ARRAY_TY.patch
|
||||||
Patch10: 0010-PluginClient-Fix-the-bug-during-multi-process-compil.patch
|
Patch10: 0010-PluginClient-Fix-the-bug-during-multi-process-compil.patch
|
||||||
Patch11: 0011-Pin-gcc-client-Adaptation-to-llvm15-mlir15-only-solv.patch
|
Patch11: 0011-Pin-gcc-client-Adaptation-to-llvm15-mlir15-only-solv.patch
|
||||||
|
Patch12: 0012-Pin-gcc-client-Adaptation-to-gcc12-only-solves-the-b.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A Pin (Plug-IN framework) client is implemented based on GCC plugin and can execute the compiler optimization pass in GCC.
|
A Pin (Plug-IN framework) client is implemented based on GCC plugin and can execute the compiler optimization pass in GCC.
|
||||||
@ -63,6 +64,12 @@ find %{_libdir} -type f -name "*.so" -exec strip "{}" ";"
|
|||||||
%config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
%config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 3 2023 dingguangya <dingguangya1@huawei.com> - 0.4.1-10
|
||||||
|
- Type:FIX
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:Adaptation to gcc12 only solves the build problem
|
||||||
|
|
||||||
* Thu Aug 3 2023 dingguangya <dingguangya1@huawei.com> - 0.4.1-9
|
* Thu Aug 3 2023 dingguangya <dingguangya1@huawei.com> - 0.4.1-9
|
||||||
- Type:FIX
|
- Type:FIX
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user