From 2ecb137947bb8d928d42a708df8bf87e02231324 Mon Sep 17 00:00:00 2001 From: liyancheng <412998149@qq.com> Date: Sat, 27 Aug 2022 10:15:54 +0800 Subject: [PATCH] [Bugfix] static link plg_grpc_proto (cherry picked from commit 272b3f53511b267e700cf91f8be4b531a4c740cf) --- 0001-static-link-plg_grpc_proto.patch | 14 ++++++++++++++ pin-gcc-client.spec | 11 ++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 0001-static-link-plg_grpc_proto.patch diff --git a/0001-static-link-plg_grpc_proto.patch b/0001-static-link-plg_grpc_proto.patch new file mode 100644 index 0000000..bf21d8a --- /dev/null +++ b/0001-static-link-plg_grpc_proto.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e713c1b..ec07e26 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38,7 +38,7 @@ add_custom_command( + include_directories("${CMAKE_CURRENT_BINARY_DIR}") + + # plg_grpc_proto +-add_library(plg_grpc_proto ++add_library(plg_grpc_proto STATIC + ${plg_grpc_srcs} + ${plg_grpc_hdrs} + ${plg_proto_srcs} + diff --git a/pin-gcc-client.spec b/pin-gcc-client.spec index 38739af..e2ec9d6 100644 --- a/pin-gcc-client.spec +++ b/pin-gcc-client.spec @@ -1,11 +1,13 @@ Name: pin-gcc-client Version: 0.1.0 -Release: 1 +Release: 2 Summary: A Pin (Plug-IN framework) client is implemented based on GCC plugin and can execute the compiler optimization pass in GCC. License: Apache 2.0 URL: https://gitee.com/src-openeuler/pin-gcc-client Source0: %{name}-%{version}.tar.gz +Patch0: 0001-static-link-plg_grpc_proto.patch + BuildRequires: gcc gcc-c++ gcc-plugin-devel cmake make pkgconfig grpc grpc-plugins grpc-devel protobuf-devel jsoncpp-devel Requires: gcc grpc protobuf @@ -17,6 +19,7 @@ A Pin (Plug-IN framework) client is implemented based on GCC plugin and can exec %prep %setup -q +%patch0 -p1 mkdir -p _build cd _build %{cmake} .. -DCMAKE_INSTALL_PREFIX=%{_usr} -DCMAKE_INSTALL_LIBDIR=%{_libdir} @@ -34,6 +37,12 @@ cd _build %attr(0755,root,root) %{_libdir}/libpin_gcc_client.so %changelog +* Sat Aug 27 2022 liyancheng <412998149@qq.com> - 0.1.0-2 +- Type:Bugfix +- ID:NA +- SUG:NA +- DESC:Static link plg_grpc_proto + * Fri Aug 26 2022 liyancheng <412998149@qq.com> - 0.1.0-1 - Type:Init - ID:NA -- Gitee