Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot 095de3e893 !35 fix building packages without libltdl.la
From: @fundawang 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2025-05-20 04:02:33 +00:00
Funda Wang c15ca66992 fix building packages without libltdl.la 2025-04-04 20:04:44 +08:00
openeuler-ci-bot 55bdc169d5 !33 [sync] PR-31: add sw_64 support
From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2025-03-17 04:23:51 +00:00
Hailiang 5c8bc2ff61 add sw_64 support
(cherry picked from commit cc2c5df69d)
2025-03-17 10:59:04 +08:00
openeuler-ci-bot 326b003b4f !27 update to 2.5.4
From: @fundawang 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-11-21 06:46:56 +00:00
Funda Wang 2c8d3558b5 2.5.4 2024-11-21 10:53:27 +08:00
openeuler-ci-bot 9de8fa7f8a !23 update to 2.5.3
From: @fundawang 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-10-09 00:56:06 +00:00
Funda Wang 8c7fae2ef3 2.5.3 2024-10-08 17:57:10 +08:00
openeuler-ci-bot 05aaafb0e7 !22 pass -Wl,xxx options before libraries
From: @fundawang 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-10-08 08:50:40 +00:00
Funda Wang 50fc2e7ba9 pass -Wl,xxx options before libraries 2024-09-26 22:53:38 +08:00
9 changed files with 171 additions and 53 deletions
+39
View File
@@ -0,0 +1,39 @@
From 80ff97af5d5686e071816af16f65d98af5116238 Mon Sep 17 00:00:00 2001
From: Hailiang <mahailiang@uniontech.com>
Date: Tue, 11 Mar 2025 13:43:07 +0800
Subject: [PATCH] add sw_64 support
---
build-aux/config.guess | 3 +++
build-aux/config.sub | 1 +
2 files changed, 4 insertions(+)
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 48a6846..a5fa853 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -1186,6 +1186,9 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
+ sw_64*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
tile*:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
diff --git a/build-aux/config.sub b/build-aux/config.sub
index 4aaae46..ada8a42 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -1432,6 +1432,7 @@ case $cpu-$vendor in
| spu \
| sv1 \
| sx* \
+ | sw_64 \
| tahoe \
| thumbv7* \
| tic30 \
--
2.20.1
@@ -1,31 +0,0 @@
From 1e13a1944f725ccc24bce1a2fa6f9009ba8a2270 Mon Sep 17 00:00:00 2001
From: Andreas Stieger <Andreas.Stieger@gmx.de>
Date: Sun, 4 Sep 2022 22:24:41 +0200
Subject: [PATCH] tests/link-order.at: avoid warning and test failure with GNU
grep 3.8
---
tests/link-order.at | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/link-order.at b/tests/link-order.at
index 3f01a00..a145347 100644
--- a/tests/link-order.at
+++ b/tests/link-order.at
@@ -99,12 +99,12 @@ aix* | interix*) ;; # These systems have different path syntax
case $hardcode_direct$hardcode_direct_absolute in
yesno)
AT_CHECK([if $EGREP relinking stderr; then
- $EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" stdout
+ $EGREP " .*/new/lib/libb$shared_ext .*/old/lib/libcee$shared_ext" stdout
else :; fi], [0], [ignore], [], [echo "wrong link order"])
;;
*)
AT_CHECK([if $EGREP relinking stderr; then
- $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout
+ $EGREP " -L.*/new/lib -lb -L.*/old/lib -lcee" stdout
else :; fi], [0], [ignore], [], [echo "wrong link order"])
;;
esac
--
2.27.0
@@ -0,0 +1,53 @@
Enabling lto will result in failure during test phase, to be precise test 67 will cause it.
Compiler flags for this test (and most likely for rest of them) are inherited from actual build phase.
I'm not sure if this is expected.
Most distribution disables this test. We try to keep it by stripping lto flags for it.
Origin for this tests: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=391427
--- a/tests/link-order2.at 2015-01-16 19:52:04.000000000 +0100
+++ b/tests/link-order2_new.at 2021-11-30 02:01:09.574451906 +0100
@@ -47,6 +47,8 @@
AT_KEYWORDS([libtool])
AT_KEYWORDS([interactive])dnl running 'wrong' may cause a popup window.
+NO_LTO_CFLAGS=${CFLAGS/-flto*-ffat-lto-objects }
+
eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|allow_undefined_flag)='`
undefined_setting=-no-undefined
@@ -89,12 +91,12 @@
EOF
for file in a0 a1 b; do
- $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c
+ $LIBTOOL --mode=compile $CC $CPPFLAGS $NO_LTO_CFLAGS -c $file.c
done
-$CC $CPPFLAGS $CFLAGS -c main.c
+$CC $CPPFLAGS $NO_LTO_CFLAGS -c main.c
# Build an old, installed library.
-$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba0.la a0.lo -rpath $deflibdir
+$LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o liba0.la a0.lo -rpath $deflibdir
$LIBTOOL --mode=install cp liba0.la $deflibdir/liba0.la
$LIBTOOL --mode=clean rm -f liba0.la
@@ -118,13 +120,13 @@
esac
test non-libtool,-static-libtool-libs = "$type_of_depdepl,$static" &&
static=-all-static
- $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba1.la a1.lo -rpath $libdir
- $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o libb.la b.lo liba1.la -rpath $libdir
- AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0],
+ $LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o liba1.la a1.lo -rpath $libdir
+ $LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o libb.la b.lo liba1.la -rpath $libdir
+ AT_CHECK([$LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0],
[], [ignore], [ignore])
LT_AT_EXEC_CHECK([./main])
# Now test that if we reverse the link order, the program fails.
- AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la],
+ AT_CHECK([$LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la],
[], [ignore], [ignore])
if test yes, != "$shared_fails,$static"; then
LT_AT_EXEC_CHECK([./wrong], [1], [], [ignore], [|| (exit 1)])
@@ -0,0 +1,17 @@
diff -up ./m4/ltdl.m4.orig ./m4/ltdl.m4
--- ./m4/ltdl.m4.orig 2016-02-11 20:40:28.013253981 +0200
+++ ./m4/ltdl.m4 2016-02-11 20:41:07.142760471 +0200
@@ -282,8 +282,11 @@ AC_ARG_WITH([ltdl_lib],
[use the libltdl.la installed in DIR])])
if test -n "$with_ltdl_lib"; then
- if test -f "$with_ltdl_lib/libltdl.la"; then :
- else
+ # check for the existence of "$with_ltdl_lib/libltdl.la" while
+ # allowing people to delete the libtool archive file (which isn't
+ # useful in this case in many common platforms.)
+ with_ltdl_lib_libname=`echo "$with_ltdl_lib"/libltdl.*`
+ if test "x$with_ltdl_lib_libname" = "x$with_ltdl_lib/libltdl.*"; then
AC_MSG_ERROR([invalid ltdl library directory: '$with_ltdl_lib'])
fi
else
Binary file not shown.
@@ -11,14 +11,14 @@ diff --git a/m4/libtool.m4 b/m4/libtool.m4
index f796d7b..41dd20a 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2866,6 +2866,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
@@ -2930,6 +2930,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
# before this can be enabled.
hardcode_into_libs=yes
+ # Add ABI-specific directories to the system library path.
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
# Ideally, we could use ldconfig to report *all* directores which are
# Ideally, we could use ldconfig to report *all* directories which are
# searched for libraries, however this is still not possible. Aside from not
# being certain /sbin/ldconfig is available, command
@@ -2874,7 +2877,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Binary file not shown.
+59 -19
View File
@@ -2,19 +2,21 @@
%global gcc_major 7.3.0
Name: libtool
Version: 2.4.7
Version: 2.5.4
Release: 3
License: GPLv2+ and LGPLv2+ and GFDL-1.3-or-later
License: GPL-2.0-or-later AND LGPL-2.0-or-later and GFDL-1.3-or-later
Summary: The GNU Portable Library Tool
URL: http://www.gnu.org/software/libtool/
Source0: http://ftp.gnu.org/gnu/libtool/libtool-%{version}.tar.xz
URL: https://www.gnu.org/software/libtool/
Source0: https://ftp.gnu.org/gnu/libtool/libtool-%{version}.tar.xz
Patch0: libtool-2.4.5-rpath.patch
Patch6000: backport-tests-link-order.at-avoid-warning-and-test-failure.patch
Patch0: libtool-2.5.3-rpath.patch
Patch1: libtool-2.4.6-disable-lto-link-order2.patch
Patch2: add-sw_64-support.patch
Patch3: libtool-2.4.6-fix-building-without-libltdl.la.patch
Requires: gcc(major),autoconf, automake, sed, tar, findutils
BuildRequires: texinfo autoconf automake help2man
BuildRequires: texinfo autoconf automake help2man
BuildRequires: libstdc++-devel gcc-gfortran gcc gcc-c++
%description
@@ -22,8 +24,9 @@ GNU libtool is a generic library support script.
Libtool hides the complexity of using shared libraries behind a consistent, portable interface.
%package ltdl
Summary: Runtime libraries for GNU Libtool Dynamic Module Loader
Summary: Runtime libraries for GNU Libtool Dynamic Module Loader
Provides: %{name}-libs = %{version}-%{release}
License: LGPL-2.1-or-later
%description ltdl
The libtool-ltdl package contains the GNU Libtool Dynamic Module Loader, a
@@ -32,11 +35,11 @@ process of using dynamic modules.
%package devel
Summary: Tools needed for development using the GNU Libtool Dynamic Module Loader
License: LGPLv2+
License: LGPL-2.0-or-later
Requires: automake
Requires: %{name}-ltdl = %{version}-%{release}
Provides: %{name}-ltdl-devel
Obsoletes: %{name}-ltdl-devel
Provides: %{name}-ltdl-devel = %{version}-%{release}
Obsoletes: %{name}-ltdl-devel < %{version}-%{release}
%description devel
Static libraries and header files for development with ltdl.
@@ -45,10 +48,14 @@ Static libraries and header files for development with ltdl.
%prep
%autosetup -n libtool-%{version} -p1
autoreconf -v
# Fix libtool to pass -Wl,xxx options before libraries
sed -i \
-e 's,$libobjs $deplibs $compiler_flags,$compiler_flags $libobjs $deplibs,' \
-e 's,$predep_objects $libobjs $deplibs $postdep_objects $compiler_flags,$compiler_flags $predep_objects $libobjs $deplibs $postdep_objects,' \
m4/libtool.m4
%build
autoreconf -v
export CC=gcc
export CXX=g++
export F77=gfortran
@@ -69,12 +76,12 @@ export FCFLAGS="$RPM_OPT_FLAGS -fPIC"
%make_build CUSTOM_LTDL_CFLAGS="%_hardening_cflags" CUSTOM_LTDL_LDFLAGS="%_hardening_ldflags"
%check
make check VERBOSE=yes
%make_build check VERBOSE=yes
%install
%make_install
%delete_la_and_a
rm -f %{buildroot}%{_infodir}/dir
rm -f %{buildroot}%{_libdir}/libltdl.{a,la}
%files
%license COPYING
@@ -92,20 +99,53 @@ rm -f %{buildroot}%{_libdir}/libltdl.{a,la}
%files devel
%license libltdl/COPYING.LIB
%doc libltdl/README
%{_datadir}/libtool
%exclude %{_datadir}/libtool/build-aux
%{_datadir}/libtool/COPYING.LIB
%{_datadir}/libtool/Makefile.am
%{_datadir}/libtool/Makefile.in
%{_datadir}/libtool/README
%{_datadir}/libtool/aclocal.m4
%{_datadir}/libtool/config-h.in
%{_datadir}/libtool/configure
%{_datadir}/libtool/configure.ac
%{_datadir}/libtool/libltdl
%{_datadir}/libtool/loaders
%{_datadir}/libtool/lt__alloc.c
%{_datadir}/libtool/lt__argz.c
%{_datadir}/libtool/lt__dirent.c
%{_datadir}/libtool/lt__strl.c
%{_datadir}/libtool/lt_dlloader.c
%{_datadir}/libtool/lt_error.c
%{_datadir}/libtool/ltdl.c
%{_datadir}/libtool/ltdl.h
%{_datadir}/libtool/ltdl.mk
%{_datadir}/libtool/slist.c
%{_includedir}/ltdl.h
%{_includedir}/libltdl
%{_libdir}/libltdl.so
%files help
%doc README
%{_infodir}/libtool.info*.gz
%{_infodir}/libtool.info*
%{_mandir}/man1/libtool.1*
%{_mandir}/man1/libtoolize.1*
%changelog
* Fri Apr 04 2025 Funda Wang <fundawang@yeah.net> - 2.5.4-3
- fix building packages without libltdl.la
* Tue Mar 11 2025 mahailiang <mahailiang@uniontech.com> - 2.5.4-2
- add sw_64 support
* Thu Nov 21 2024 Funda Wang <fundawang@yeah.net> - 2.5.4-1
- update to 2.5.4
* Tue Oct 08 2024 Funda Wang <fundawang@yeah.net> - 2.5.3-1
- update to 2.5.3
* Thu Sep 26 2024 Funda Wang <fundawang@yeah.net> - 2.4.7-4
- pass -Wl,xxx options before libraries
- disable LTO for link-order2 test
* Tue Jun 06 2023 laokz <zhangkai@iscas.ac.cn> - 2.4.7-3
- add -fPIC to fortran flags for riscv
+1 -1
View File
@@ -1,4 +1,4 @@
version_control: git
src_repo: https://git.savannah.gnu.org/git/libtool.git
tag_prefix: ^v
seperator: .
separator: .