!23 add '-Wl, --as-needed' for re2 to link dynamic library
From: @eaglegai Reviewed-by: @wang--ge Signed-off-by: @wang--ge
This commit is contained in:
commit
81f3c371a3
6
re2.spec
6
re2.spec
@ -1,6 +1,6 @@
|
|||||||
Name: re2
|
Name: re2
|
||||||
Version: 20230901
|
Version: 20230901
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Provide backtracking RE engine
|
Summary: Provide backtracking RE engine
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://github.com/google/re2/
|
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
|
%autosetup -n %{name}-2023-09-01 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
sed -i 's/RE2_LDFLAGS?=-pthread/RE2_LDFLAGS?=-pthread -Wl,--as-needed/g' Makefile
|
||||||
%make_build CXXFLAGS="${CXXFLAGS:-%optflags} -pthread -std=c++17" \
|
%make_build CXXFLAGS="${CXXFLAGS:-%optflags} -pthread -std=c++17" \
|
||||||
LDFLAGS="${LDFLAGS:-%__global_ldflags} -pthread" \
|
LDFLAGS="${LDFLAGS:-%__global_ldflags} -pthread" \
|
||||||
includedir=%{_includedir} libdir=%{_libdir}
|
includedir=%{_includedir} libdir=%{_libdir}
|
||||||
@ -51,6 +52,9 @@ export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}:LD_LIBRARY_PATH
|
|||||||
%exclude %{_libdir}/libre2.a
|
%exclude %{_libdir}/libre2.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 23 2024 gaihuiying <eaglegai@163.com> - 20230901-2
|
||||||
|
- add '-Wl, --as-needed' for re2 to link dynamic library
|
||||||
|
|
||||||
* Wed Oct 18 2023 wulei <wu_lei@hoperun.com> - 20230901-1
|
* Wed Oct 18 2023 wulei <wu_lei@hoperun.com> - 20230901-1
|
||||||
- Update to 20230901
|
- Update to 20230901
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user