Compare commits

..

No commits in common. "rawhide" and "f32" have entirely different histories.
rawhide ... f32

9 changed files with 146 additions and 216 deletions

1
.gitignore vendored
View File

@ -1,2 +1 @@
/libtool-2.4.6.tar.xz /libtool-2.4.6.tar.xz
/libtool-2.4.7.tar.xz

View File

@ -0,0 +1,35 @@
Ensure that $(LIBLTDL) is built first
After Automake upstream commit f4e91bfc490d, the list in 'all-am:' is
reordered for this test-case (*_LTLIBRARIES is before *_PROGRAMS), which
means that linker will fail to link 'old' binary.
Previously (with automake <= 1.16), it was matter of luck -- it worked if
(a) the build was serial (-j1), and/or (b) libtool-ltdl-devel package was
installed on the box so ./configure picked the system version of libltdl.
Users should anyways use system's ltdl, so this has low priority.
diff --git a/tests/old-ltdl-iface.at b/tests/old-ltdl-iface.at
index cee29089..6f9c8001 100644
--- a/tests/old-ltdl-iface.at
+++ b/tests/old-ltdl-iface.at
@@ -62,6 +62,9 @@ MOSTLYCLEANFILES =
include ltdl/Makefile.inc
bin_PROGRAMS = old
old_LDADD = -Lltdl $(LIBLTDL)
+# TODO: if --with-included-ltdl was unused this would
+# generate useless dependency.
+old_DEPENDENCIES = $(LIBLTDL)
]])
AT_DATA([old.c],
@@ -131,7 +134,7 @@ LT_AT_CHECK_LIBTOOLIZE([--ltdl=ltdl --nonrecursive --install], 0, [expout], [exp
AT_CHECK([test -f ltdl/Makefile.inc])
-LT_AT_BOOTSTRAP([ignore], [-I m4], [], [--add-missing], [--force])
+LT_AT_BOOTSTRAP([ignore], [-I m4], [], [--add-missing], [--force], [--with-included-ltdl])
LT_AT_EXEC_CHECK([./old], 0, [[...]])

View File

@ -1,53 +0,0 @@
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)])

View File

@ -1,16 +0,0 @@
diff -r -U5 libtool-2.4.6.old/tests/demo.at libtool-2.4.6/tests/demo.at
--- libtool-2.4.6.old/tests/demo.at 2022-01-31 22:15:48.539557030 +0100
+++ libtool-2.4.6/tests/demo.at 2022-02-01 09:43:30.262092074 +0100
@@ -508,11 +508,11 @@
## ----------- ##
AT_SETUP([force non-PIC objects])
AT_CHECK([case $host in
-hppa*|x86_64*|s390*)
+hppa*|x86_64*|s390*|arm*)
# These hosts cannot use non-PIC shared libs
exit 77 ;;
*-solaris*|*-sunos*)
# Libtool does not build non-PIC shared libs on these hosts
exit 77 ;;

View File

@ -0,0 +1,34 @@
From 350082b6aa89f9ef603fcebbb4cf33f15a743f2f Mon Sep 17 00:00:00 2001
From: Bert Wesarg <bert.wesarg@googlemail.com>
Date: Mon, 13 Jun 2016 22:28:47 +0200
Subject: [PATCH] libtool: exit verbosely for fatal configure problems
Instead of calling not-existing function and processing subsequent
shell code.
* build-aux/ltmain.in (func_fatal_configuration): Fix typo in
func_fatal_error call.
Copyright-paperwork-exempt: Yes
Upstream: 350082b6aa89f9ef603fcebbb4cf33f15a743f2f
---
build-aux/ltmain.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 0ad021db..c3058f21 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -212,7 +212,7 @@ fi
# a configuration failure hint, and exit.
func_fatal_configuration ()
{
- func__fatal_error ${1+"$@"} \
+ func_fatal_error ${1+"$@"} \
"See the $PACKAGE documentation for more information." \
"Fatal configuration error."
}
--
2.17.1

View File

@ -1,58 +0,0 @@
diff -r -U5 libtool-2.4.6/build-aux/ltmain.in libtool-2.4.6.new/build-aux/ltmain.in
--- libtool-2.4.6/build-aux/ltmain.in 2022-02-22 09:21:35.317958251 +0100
+++ libtool-2.4.6.new/build-aux/ltmain.in 2022-02-22 09:16:10.117571787 +0100
@@ -501,21 +501,14 @@
fi
# preserve --debug
test : = "$debug_cmd" || func_append preserve_args " --debug"
- case $host in
- # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
- # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
- # don't eliminate duplications in $postdeps and $predeps
- opt_duplicate_compiler_generated_deps=:
- ;;
- *)
- opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
- ;;
- esac
+ # Keeping compiler generated duplicates in $postdeps and $predeps is not
+ # harmful, and is necessary in a majority of systems that use it to satisfy
+ # symbol dependencies.
+ opt_duplicate_compiler_generated_deps=:
$opt_help || {
# Sanity checks first:
func_check_version_match
diff -r -U5 libtool-2.4.6/build-aux/ltmain.sh libtool-2.4.6.new/build-aux/ltmain.sh
--- libtool-2.4.6/build-aux/ltmain.sh 2015-02-15 17:15:12.000000000 +0100
+++ libtool-2.4.6.new/build-aux/ltmain.sh 2022-02-22 09:16:44.783613061 +0100
@@ -2413,21 +2413,14 @@
fi
# preserve --debug
test : = "$debug_cmd" || func_append preserve_args " --debug"
- case $host in
- # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
- # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
- # don't eliminate duplications in $postdeps and $predeps
- opt_duplicate_compiler_generated_deps=:
- ;;
- *)
- opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
- ;;
- esac
+ # Keeping compiler generated duplicates in $postdeps and $predeps is not
+ # harmful, and is necessary in a majority of systems that use it to satisfy
+ # symbol dependencies.
+ opt_duplicate_compiler_generated_deps=:
$opt_help || {
# Sanity checks first:
func_check_version_match

37
libtool-2.4.6-specs.patch Normal file
View File

@ -0,0 +1,37 @@
From 702a97fbb09bd7088a50f2b239016d1e32843c24 Mon Sep 17 00:00:00 2001
From: Pavel Raiskup <praiskup@redhat.com>
Date: Fri, 18 Sep 2015 10:36:43 +0200
Subject: libtool: fix GCC linking with -specs=*
References:
https://bugzilla.redhat.com/show_bug.cgi?id=985592
* build-aux/ltmain.in (func_mode_link): Pass -specs=*
to the linker, Fedora uses this option for hardening.
Signed-off-by: Pavel Raiskup <praiskup@redhat.com>
---
build-aux/ltmain.in | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index d5cf07a..0c40da0 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -5360,10 +5360,12 @@ func_mode_link ()
# -tp=* Portland pgcc target processor selection
# --sysroot=* for sysroot support
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -specs=* GCC specs files
# -stdlib=* select c++ std lib with clang
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+ -specs=*)
func_quote_for_eval "$arg"
arg=$func_quote_for_eval_result
func_append compile_command " $arg"
--
cgit v1.0-41-gc330

View File

@ -7,8 +7,8 @@
Summary: The GNU Portable Library Tool Summary: The GNU Portable Library Tool
Name: libtool Name: libtool
Version: 2.4.7 Version: 2.4.6
Release: 2%{?dist} Release: 33%{?dist}
License: GPLv2+ and LGPLv2+ and GFDL License: GPLv2+ and LGPLv2+ and GFDL
URL: http://www.gnu.org/software/libtool/ URL: http://www.gnu.org/software/libtool/
@ -18,26 +18,20 @@ Source: http://ftp.gnu.org/gnu/libtool/libtool-%{version}.tar.xz
# ~> remove possibly once #1158915 gets fixed somehow # ~> remove possibly once #1158915 gets fixed somehow
Patch0: libtool-2.4.5-rpath.patch Patch0: libtool-2.4.5-rpath.patch
# ~> downstream (TODO)
Patch1: libtool-2.4.6-am-1.16-test.patch
# ~> upstream 702a97fbb
Patch2: libtool-2.4.6-specs.patch
# See the rhbz#1289759 and rhbz#1214506. We disable hardening namely because # See the rhbz#1289759 and rhbz#1214506. We disable hardening namely because
# that bakes the CFLAGS/LDFLAGS into installed /bin/libtool and ltmain.sh files. # that bakes the CFLAGS/LDFLAGS into installed /bin/libtool and ltmain.sh files.
# At the same time we want to have libltdl.so hardened. Downstream-only patch. # At the same time we want to have libltdl.so hardened. Downstream-only patch.
%undefine _hardened_build %undefine _hardened_build
Patch1: libtool-2.4.6-hardening.patch Patch3: libtool-2.4.6-hardening.patch
# The testsuite seems to not properly handle template instantiation and as # rhbz#1622611, upstream 350082b6aa89f9ef603fcebbb4cf33f15a743f2f
# a result fails. libtool itself appears to be OK from my by-hand testing. (by Jeff Law) Patch4: libtool-2.4.6-fatal-handler.patch
# Disable LTO for link-order2 test (Related: #1988112)
Patch2: libtool-2.4.6-disable-lto-link-order2.patch
# non-PIC libraries are not supported on ARMv7
# Since we removed "-fPIC" from global CFLAGS this test fails on this arch (as expected)
# Please refer to the following ticket regarding PIC support on ARM:
# https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/503448
Patch3: libtool-2.4.6-disable_non-pic_arm.patch
# rhbz#2047389, patch sent upstream
# https://lists.gnu.org/archive/html/libtool-patches/2022-02/msg00000.html
Patch4: libtool-2.4.6-keep-compiler-deps.patch
%if ! 0%{?_module_build} %if ! 0%{?_module_build}
Patch100: libtool-nodocs.patch Patch100: libtool-nodocs.patch
@ -60,7 +54,6 @@ BuildRequires: help2man
BuildRequires: libstdc++-devel, gcc-gfortran BuildRequires: libstdc++-devel, gcc-gfortran
BuildRequires: gcc, gcc-c++ BuildRequires: gcc, gcc-c++
BuildRequires: make
%description %description
@ -107,27 +100,50 @@ Static libraries and header files for development with ltdl.
%prep %prep
%autosetup -n libtool-%{version} -p1 %setup -n libtool-%{version} -q
%patch0 -p1 -b .rpath
%patch1 -p1 -b .test
%patch2 -p1 -b .gcc-specs
%patch3 -p1 -b .ltdl-hardening
%patch4 -p1 -b .fatal-handler
%if ! 0%{?_module_build}
%patch100 -p1 -b .nodocs
%endif
autoreconf -v autoreconf -v
%build %build
export CC=gcc
export CXX=g++
export F77=gfortran
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
%configure %configure --prefix=%{_prefix} \
--exec-prefix=%{_prefix} \
--bindir=%{_bindir} \
--sbindir=%{_sbindir} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
--includedir=%{_includedir} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--localstatedir=%{_localstatedir} \
--mandir=%{_mandir} \
--infodir=%{_infodir}
%make_build \ make %{?_smp_mflags} \
CUSTOM_LTDL_CFLAGS="%_hardening_cflags" \ CUSTOM_LTDL_CFLAGS="%_hardening_cflags" \
CUSTOM_LTDL_LDFLAGS="%_hardening_ldflags" CUSTOM_LTDL_LDFLAGS="%_hardening_ldflags"
%check %check
%if %{with check} %if %{with check}
make check VERBOSE=yes || { cat tests/testsuite.dir/*/testsuite.log ; false ; } make check VERBOSE=yes || { cat testsuite.log ; false ; }
%endif %endif
%install %install
%make_install make install DESTDIR=%{buildroot}
# info's TOP dir (by default owned by info) # info's TOP dir (by default owned by info)
rm -f %{buildroot}%{_infodir}/dir rm -f %{buildroot}%{_infodir}/dir
# *.la *.a files generated by libtool shouldn't be distributed (and the # *.la *.a files generated by libtool shouldn't be distributed (and the
@ -165,70 +181,6 @@ rm -f %{buildroot}%{_libdir}/libltdl.{a,la}
%changelog %changelog
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Mar 21 2022 Frederic Berat <fberat@redhat.com> - 2.4.7-1
- Rebase to libtool 2.4.7 (#2065004)
* Thu Feb 17 2022 Frederic Berat <fberat@redhat.com> - 2.4.6-50
- Keep compiler generated list of library dependencies.
* Sun Feb 13 2022 Jeff Law <jeffreyalaw@gmail.com> - 2.4.6-49
- Re-enable LTO (completing change from Nov 29, 2021)
* Tue Feb 01 2022 Frederic Berat <fberat@redhat.com> - 2.4.6-48
- Add support for "-fsanitize", rhbz#2024647
- Add support for "-fuse-ld", rhbz#2024647
- Use make macros (based on Tom Stellard work for f33 and Timm Bäder)
https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
- Disable non-PIC test for ARM as this is not supported on this arch
- Use autosetup
- Use plain %%configure
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.6-47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Jan 10 2022 Jakub Jelinek <jakub@redhat.com> - 2.4.6-46
- bump: for gcc 12.* in rawhide
* Mon Nov 29 2021 Marek Kulik <mkulik@redhat.com> - 2.4.6-45
- Enable LTO build
- Add disable-lto-link-order2.patch to pass tests
* Mon Oct 04 2021 Ondrej Dubaj <odubaj@redhat.com> - 2.4.6-44
- rebuild with automake-1.16.5
* Mon Aug 30 2021 Ondrej Dubaj <odubaj@redhat.com> - 2.4.6-43
- rebuild with automake-1.16.4
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.6-42
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Mar 25 2021 Ondrej Dubaj <odubaj@redhat.com> - 2.4.6-41
- rebuild with automake-1.16.3
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.6-40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Dec 07 2020 Jakub Jelinek <jakub@redhat.com> - 2.4.6-39
- bump: for gcc 11.* in eln
* Sun Dec 06 2020 Jakub Jelinek <jakub@redhat.com> - 2.4.6-38
- bump: for gcc 11.* in rawhide
* Wed Oct 21 2020 Jakub Jelinek <jakub@redhat.com> - 2.4.6-37
- bump: for gcc 11.* in eln
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.6-36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Apr 21 2020 Jeff Law <law@redhat.com> - 2.4.6-35
- Disable LTO
* Tue Apr 21 2020 Pavel Raiskup <praiskup@redhat.com> - 2.4.6-34
- bump for new automake, rhbz#1815814
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.6-33 * Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.6-33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (libtool-2.4.7.tar.xz) = 47f4c6de40927254ff9ba452612c0702aea6f4edc7e797f0966c8c6bf0340d533598976cdba17f0bdc64545572e71cd319bbb587aa5f47cd2e7c1d96f873a3da 1bfb9b923f2c1339b4d2ce1807064aa5 libtool-2.4.6.tar.xz