summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--backport-tests-link-order.at-avoid-warning-and-test-failure.patch31
-rw-r--r--libtool-2.4.5-rpath.patch (renamed from libtool-2.5.1-rpath.patch)6
-rw-r--r--libtool-2.4.7-hardening.patch28
-rw-r--r--libtool.spec45
-rw-r--r--sources2
6 files changed, 61 insertions, 52 deletions
diff --git a/.gitignore b/.gitignore
index 38c6e16..38d50c9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/libtool-2.5.2.tar.xz
+/libtool-2.4.7.tar.xz
diff --git a/backport-tests-link-order.at-avoid-warning-and-test-failure.patch b/backport-tests-link-order.at-avoid-warning-and-test-failure.patch
new file mode 100644
index 0000000..02efa32
--- /dev/null
+++ b/backport-tests-link-order.at-avoid-warning-and-test-failure.patch
@@ -0,0 +1,31 @@
+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
+
diff --git a/libtool-2.5.1-rpath.patch b/libtool-2.4.5-rpath.patch
index 33f2793..2f97997 100644
--- a/libtool-2.5.1-rpath.patch
+++ b/libtool-2.4.5-rpath.patch
@@ -11,17 +11,17 @@ diff --git a/m4/libtool.m4 b/m4/libtool.m4
index f796d7b..41dd20a 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
-@@ -2916,6 +2916,9 @@
+@@ -2866,6 +2866,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* directories which are
+ # Ideally, we could use ldconfig to report *all* directores which are
# searched for libraries, however this is still not possible. Aside from not
# being certain /sbin/ldconfig is available, command
-@@ -2924,7 +2927,7 @@
+@@ -2874,7 +2877,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
# appending ld.so.conf contents (and includes) to the search path.
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
diff --git a/libtool-2.4.7-hardening.patch b/libtool-2.4.7-hardening.patch
deleted file mode 100644
index 2ad24d2..0000000
--- a/libtool-2.4.7-hardening.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index 13dfc63..5c5603a 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -311,6 +311,23 @@ libtool: $(ltmain_sh) $(config_status) $(dotversion)
-
- include libltdl/ltdl.mk
-
-+libltdl_libltdl_la_CFLAGS = $(CUSTOM_LTDL_CFLAGS)
-+libltdl_libltdl_la_LDFLAGS += $(CUSTOM_LTDL_LDFLAGS)
-+
-+libltdl_dlopen_la_LDFLAGS += $(CUSTOM_LTDL_LDFLAGS)
-+libltdl_dld_link_la_LDFLAGS += $(CUSTOM_LTDL_LDFLAGS)
-+libltdl_dyld_la_LDFLAGS += $(CUSTOM_LTDL_LDFLAGS)
-+libltdl_load_add_on_la_LDFLAGS += $(CUSTOM_LTDL_LDFLAGS)
-+libltdl_loadlibrary_la_LDFLAGS += $(CUSTOM_LTDL_LDFLAGS)
-+libltdl_shl_load_la_LDFLAGS += $(CUSTOM_LTDL_LDFLAGS)
-+
-+libltdl_dlopen_la_CFLAGS = $(CUSTOM_LTDL_CFLAGS)
-+libltdl_dld_link_la_CFLAGS = $(CUSTOM_LTDL_CFLAGS)
-+libltdl_dyld_la_CFLAGS = $(CUSTOM_LTDL_CFLAGS)
-+libltdl_load_add_on_la_CFLAGS = $(CUSTOM_LTDL_CFLAGS)
-+libltdl_loadlibrary_la_CFLAGS = $(CUSTOM_LTDL_CFLAGS)
-+libltdl_shl_load_la_CFLAGS = $(CUSTOM_LTDL_CFLAGS)
-+
- lt_aclocal_m4 = $(srcdir)/$(ltdl_dir)/aclocal.m4
- lt_config_h_in = $(srcdir)/$(ltdl_dir)/config-h.in
- lt_configure = $(srcdir)/$(ltdl_dir)/configure
diff --git a/libtool.spec b/libtool.spec
index cd917c1..2594b4b 100644
--- a/libtool.spec
+++ b/libtool.spec
@@ -1,17 +1,17 @@
%undefine _hardened_build
+%global gcc_major 7.3.0
Name: libtool
-Version: 2.5.2
-Release: 1
-License: GPL-2.0-or-later AND GPL-2.0-or-later WITH Autoconf-exception-generic AND GPL-2.0-or-later WITH Libtool-exception AND LGPL-2.0-or-later WITH Libtool-exception AND GPL-3.0-or-later WITH Autoconf-exception-generic-3.0 AND MIT AND FSFAP AND FSFULLR AND FSFULLRWD AND GFDL-1.3-or-later AND X11
+Version: 2.4.7
+Release: 4
+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: https://www.gnu.org/software/libtool/
-Source0: https://alpha.gnu.org/gnu/libtool/%{name}-%{version}.tar.xz
+Source0: https://ftp.gnu.org/gnu/libtool/libtool-%{version}.tar.xz
-Patch0: libtool-2.5.1-rpath.patch
-%undefine _hardened_build
-Patch1: libtool-2.4.7-hardening.patch
-Patch2: libtool-2.4.6-disable-lto-link-order2.patch
+Patch0: libtool-2.4.5-rpath.patch
+Patch1: libtool-2.4.6-disable-lto-link-order2.patch
+Patch6000: backport-tests-link-order.at-avoid-warning-and-test-failure.patch
Requires: gcc(major),autoconf, automake, sed, tar, findutils
@@ -24,8 +24,8 @@ Libtool hides the complexity of using shared libraries behind a consistent, port
%package ltdl
Summary: Runtime libraries for GNU Libtool Dynamic Module Loader
-License: LGPL-2.1-or-later
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
@@ -33,11 +33,11 @@ library that provides a consistent, portable interface which simplifies the
process of using dynamic modules.
%package devel
-Summary: Tools needed for development using the GNU Libtool Dynamic Module Loader
-License: LGPL-2.1-or-later
-Requires: automake
-Requires: %{name}-ltdl = %{version}-%{release}
-Provides: %{name}-ltdl-devel = %{version}-%{release}
+Summary: Tools needed for development using the GNU Libtool Dynamic Module Loader
+License: LGPL-2.0-or-later
+Requires: automake
+Requires: %{name}-ltdl = %{version}-%{release}
+Provides: %{name}-ltdl-devel = %{version}-%{release}
Obsoletes: %{name}-ltdl-devel < %{version}-%{release}
%description devel
@@ -47,7 +47,6 @@ Static libraries and header files for development with ltdl.
%prep
%autosetup -n libtool-%{version} -p1
-
# Fix libtool to pass -Wl,xxx options before libraries
sed -i \
-e 's,$libobjs $deplibs $compiler_flags,$compiler_flags $libobjs $deplibs,' \
@@ -62,17 +61,21 @@ export F77=gfortran
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
export FFLAGS=$(echo "$RPM_OPT_FLAGS -I/usr/lib64/gfortran/modules"| sed 's/-fstack-protector-strong/ /g')
export FCFLAGS=$(echo "$RPM_OPT_FLAGS -I/usr/lib64/gfortran/modules"| sed 's/-fstack-protector-strong/ /g')
-%ifarch x86_64 riscv64
+%ifarch x86_64
export FFLAGS="$RPM_OPT_FLAGS -fPIE"
export FCFLAGS="$RPM_OPT_FLAGS -fPIE"
%endif
+%ifarch riscv64
+export FFLAGS="$RPM_OPT_FLAGS -fPIC"
+export FCFLAGS="$RPM_OPT_FLAGS -fPIC"
+%endif
%configure
%make_build CUSTOM_LTDL_CFLAGS="%_hardening_cflags" CUSTOM_LTDL_LDFLAGS="%_hardening_ldflags"
%check
-%make_build check VERBOSE=yes
+make check VERBOSE=yes
%install
%make_install
@@ -103,13 +106,15 @@ rm -f %{buildroot}%{_infodir}/dir
%files help
%doc README
-%{_infodir}/*
+%{_infodir}/libtool.info*
%{_mandir}/man1/libtool.1*
%{_mandir}/man1/libtoolize.1*
+
%changelog
-* Thu Sep 26 2024 Funda Wang <fundawang@yeah.net> - 2.5.2-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
diff --git a/sources b/sources
index 5549c83..970f378 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-878d7346a122f935367ce373679a3266 libtool-2.5.2.tar.xz
+2fc0b6ddcd66a89ed6e45db28fa44232 libtool-2.4.7.tar.xz