From 0b7dca94f2c5020679fcf1aafc0a6eb19f6533d2 Mon Sep 17 00:00:00 2001 From: eaglegai Date: Tue, 23 Jan 2024 07:58:00 +0000 Subject: [PATCH] add '-Wl, --as-needed' for re2 to link dynamic library --- re2.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/re2.spec b/re2.spec index 738f009..a0a56f9 100644 --- a/re2.spec +++ b/re2.spec @@ -1,6 +1,6 @@ Name: re2 Version: 20230901 -Release: 1 +Release: 2 Summary: Provide backtracking RE engine License: BSD URL: http://github.com/google/re2/ @@ -24,6 +24,7 @@ If you want to develop programs using re2, you need to install re2-devel. %autosetup -n %{name}-2023-09-01 -p1 %build +sed -i 's/RE2_LDFLAGS?=-pthread/RE2_LDFLAGS?=-pthread -Wl,--as-needed/g' Makefile %make_build CXXFLAGS="${CXXFLAGS:-%optflags} -pthread -std=c++17" \ LDFLAGS="${LDFLAGS:-%__global_ldflags} -pthread" \ includedir=%{_includedir} libdir=%{_libdir} @@ -51,6 +52,9 @@ export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}:LD_LIBRARY_PATH %exclude %{_libdir}/libre2.a %changelog +* Tue Jan 23 2024 gaihuiying - 20230901-2 +- add '-Wl, --as-needed' for re2 to link dynamic library + * Wed Oct 18 2023 wulei - 20230901-1 - Update to 20230901 -- Gitee