From 68533597ed39f1dff6cf6f0febfaa9c0ca4aac03 Mon Sep 17 00:00:00 2001 From: Huang Yang Date: Thu, 2 Jun 2022 15:27:07 +0800 Subject: [PATCH] add build flags for weak symbols on loongarch64 --- tcl.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tcl.spec b/tcl.spec index d947075..ac252ca 100644 --- a/tcl.spec +++ b/tcl.spec @@ -2,7 +2,7 @@ Name: tcl Version: 8.6.10 -Release: 4 +Release: 5 Epoch: 1 Summary: The Tool Command Language implementation License: BSD @@ -58,7 +58,11 @@ The development files for tcl. cd unix autoconf %configure --enable-threads --enable-symbols --enable-shared --enable-dtrace +%ifnarch loongarch64 %make_build CFLAGS="%{optflags}" TCL_LIBRARY=%{_datadir}/%{name}%{MAJOR} +%else +%make_build CFLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive" TCL_LIBRARY=%{_datadir}/%{name}%{MAJOR} +%endif %install cd unix @@ -87,11 +91,9 @@ done sed -i -e "s|$PWD/unix|%{_libdir}|; s|$PWD|%{_includedir}/%{name}-private|" %{buildroot}/%{_libdir}/%{name}Config.sh rm -rf %{buildroot}/%{_datadir}/%{name}%{MAJOR}/ldAix -%ifnarch loongarch64 %check cd unix make test -%endif %pre @@ -129,6 +131,9 @@ make test %{_mandir}/mann/* %changelog +* Wed May 25 2022 Peng Fan - 1:86.10-5 +- add build flags for weak symbols on loongarch64 + * Wed Apr 27 2022 liyanan - 1:8.6.10-4 - Disable test cases in loongarch64 branch -- Gitee