49 lines
1.6 KiB
Diff
49 lines
1.6 KiB
Diff
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
|
|
|