From af2386040bc8b1b47514fd0a3ea45efd1c4010e3 Mon Sep 17 00:00:00 2001 From: dingguangya Date: Mon, 7 Aug 2023 19:31:44 +0800 Subject: [PATCH] [FIX] Adaptation to gcc12 only solves the build problem --- ...ation-to-gcc12-only-solves-the-build.patch | 44 +++++++++++++++++++ pin-server.spec | 9 +++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 0029-Pin-server-Adaptation-to-gcc12-only-solves-the-build.patch diff --git a/0029-Pin-server-Adaptation-to-gcc12-only-solves-the-build.patch b/0029-Pin-server-Adaptation-to-gcc12-only-solves-the-build.patch new file mode 100644 index 0000000..fca6ed0 --- /dev/null +++ b/0029-Pin-server-Adaptation-to-gcc12-only-solves-the-build.patch @@ -0,0 +1,44 @@ +From 868531920b4f5a16f636219d44fbf36a9abd401b Mon Sep 17 00:00:00 2001 +From: dingguangya +Date: Mon, 7 Aug 2023 17:02:15 +0800 +Subject: [PATCH 2/2] [Pin-server] Adaptation to gcc12 only solves the build + problem + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 233f345..0a72863 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,7 +17,7 @@ include(cmake/common.cmake) + #------------------------------------------------------------------------------- + set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON) + +-set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to") ++set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to conform to") + + find_package(MLIR REQUIRED CONFIG) + message(STATUS "Using MLIRConfig.cmake in: ${MLIR_DIR}") +@@ -46,7 +46,7 @@ add_definitions(${LLVM_DEFINITIONS}) + + include_directories(include) + +-add_compile_options(-std=c++14 -Wall -fPIC) ++add_compile_options(-std=c++17 -Wall -fPIC) + # Proto file + get_filename_component(plg_proto "protos/plugin.proto" ABSOLUTE) + get_filename_component(plg_proto_path "${plg_proto}" PATH) +diff --git a/cmake/common.cmake b/cmake/common.cmake +index f18c25b..cf48699 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) + +-- +2.33.0.windows.2 + diff --git a/pin-server.spec b/pin-server.spec index b0024a5..bc7d703 100644 --- a/pin-server.spec +++ b/pin-server.spec @@ -1,6 +1,6 @@ Name: pin-server Version: 0.4.0 -Release: 11 +Release: 12 Summary: Pin (Plug-IN framework) server provides plugin APIs for compiler optimization developers to develop optimization pass. License: Apache 2.0 URL: https://gitee.com/openeuler/pin-server @@ -38,6 +38,7 @@ Patch25: 0025-Pin-server-Fix-Pass-DoOptimize-method-and-struct-sel.patch Patch26: 0026-Pin-server-Fix-log-output-form.patch Patch27: 0027-Pin-server-Optimized-LocalVarSummeryPass.patch Patch28: 0028-Pin-server-Adaptation-to-llvm15-mlir15-only-solves-t.patch +Patch29: 0029-Pin-server-Adaptation-to-gcc12-only-solves-the-build.patch %description Pin (Plug-IN framework) server provides plugin APIs for compiler optimization developers to develop optimization pass. @@ -94,6 +95,12 @@ find %{_libdir} -type f -name "libMLIRServerAPI.so" -exec strip "{}" ";" %config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf %changelog +* Thu Aug 3 2023 dingguangya - 0.4.0-12 +- Type:FIX +- ID:NA +- SUG:NA +- DESC:Adaptation to gcc12 only solves the build problem + * Thu Aug 3 2023 dingguangya - 0.4.0-11 - Type:FIX - ID:NA