From f84e7ca5aa1d1e64f4504d183dd26aeff8164c6a Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Wed, 13 Nov 2024 12:47:11 +0800 Subject: [PATCH 1/2] adopt to new cmake macro (cherry picked from commit 0e604ce666f227b427672729224b8b123b0565a0) --- pin-gcc-client.spec | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/pin-gcc-client.spec b/pin-gcc-client.spec index f181d51..5666266 100644 --- a/pin-gcc-client.spec +++ b/pin-gcc-client.spec @@ -1,6 +1,6 @@ Name: pin-gcc-client Version: 0.4.1 -Release: 14 +Release: 15 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 @@ -33,26 +33,14 @@ A Pin (Plug-IN framework) client is implemented based on GCC plugin and can exec %autosetup -p1 %build -mkdir -p _build -cd _build -%{cmake} .. -DCMAKE_INSTALL_PREFIX=%{_usr} -DCMAKE_INSTALL_LIBDIR=%{_libdir} -DCMAKE_SKIP_RPATH=ON -DMLIR_DIR=/usr/lib64/cmake/mlir -DLLVM_DIR=/usr/lib64/cmake/llvm -%make_build +%{cmake} -DCMAKE_SKIP_RPATH=ON -DMLIR_DIR=/usr/lib64/cmake/mlir -DLLVM_DIR=/usr/lib64/cmake/llvm +%cmake_build %install -cd _build -%make_install - -mkdir -p %{buildroot}/etc/ld.so.conf.d -echo "{_libdir}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf +%cmake_install find %{buildroot} -type f -name "*.so" -exec strip "{}" ";" -%post -/sbin/ldconfig - -%postun -/sbin/ldconfig - %files %license LICENSE %attr(0755,root,root) %{_libdir}/libpin_gcc_client.so @@ -61,9 +49,12 @@ find %{buildroot} -type f -name "*.so" -exec strip "{}" ";" %attr(0755,root,root) %{_libdir}/libMLIRPlugin.so %attr(0755,root,root) %{_libdir}/libMLIRPlugin.so.17 %attr(0644,root,root) %{_bindir}/pin-gcc-client.json -%config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf %changelog +* Wed Nov 13 2024 Funda Wang - 0.4.1-15 +- adopt to new cmake macro +- drop useless scriptlets + * Wed Apr 10 2024 wumingchuan - 0.4.1-14 - Type:Update - ID:NA -- Gitee From 1a7ea7bc038e7e78fa31815ef0f083a97f4156f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=99=A8=E5=8D=89?= Date: Tue, 11 Feb 2025 06:32:40 +0000 Subject: [PATCH 2/2] [Bugfix]Fix cmake build error. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: éƒ‘æ™šć‰ --- pin-gcc-client.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/pin-gcc-client.spec b/pin-gcc-client.spec index 5666266..56eb157 100644 --- a/pin-gcc-client.spec +++ b/pin-gcc-client.spec @@ -33,6 +33,7 @@ A Pin (Plug-IN framework) client is implemented based on GCC plugin and can exec %autosetup -p1 %build +DESTDIR="%{buildroot}" %{cmake} -DCMAKE_SKIP_RPATH=ON -DMLIR_DIR=/usr/lib64/cmake/mlir -DLLVM_DIR=/usr/lib64/cmake/llvm %cmake_build -- Gitee