diff --git a/0012-Pin-gcc-client-Adaptation-to-gcc12-only-solves-the-b.patch b/0012-Pin-gcc-client-Adaptation-to-gcc12-only-solves-the-b.patch new file mode 100644 index 0000000..486e1d5 --- /dev/null +++ b/0012-Pin-gcc-client-Adaptation-to-gcc12-only-solves-the-b.patch @@ -0,0 +1,48 @@ +From a90cb241218f32ec2da8355e74f0736d245d62a8 Mon Sep 17 00:00:00 2001 +From: dingguangya +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 GimpleToPluginOps::GetAllLoops(uint64_t funcID) + vector 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(reinterpret_cast(loop)); + LoopOp pluginLoop; + if (!id) { +-- +2.33.0.windows.2 + diff --git a/pin-gcc-client.spec b/pin-gcc-client.spec index 42955db..9550513 100644 --- a/pin-gcc-client.spec +++ b/pin-gcc-client.spec @@ -1,6 +1,6 @@ Name: pin-gcc-client 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. License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD 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 Patch10: 0010-PluginClient-Fix-the-bug-during-multi-process-compil.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 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 %changelog +* Thu Aug 3 2023 dingguangya - 0.4.1-10 +- Type:FIX +- ID:NA +- SUG:NA +- DESC:Adaptation to gcc12 only solves the build problem + * Thu Aug 3 2023 dingguangya - 0.4.1-9 - Type:FIX - ID:NA