Browse Source

extras/tools: bump libtool to 2.5.4

2.5.4 was released on Wed 20 Nov[^1].

A few patches have been merged:
- emscripten-dllinker merged as v2.5.3-41-gd8a93445
- response-files merged as v2.5.3-25-geed74d65

Then clang-libs and embed-bitcode were conflicting, so they were rebased
and their filename were bumped too.

[^1]: https://savannah.gnu.org/news/?id=10693
pull/176/head
Alexandre Janniaux 2 years ago
committed by Steve Lhomme
parent
commit
d4931205fc
  1. 5
      Makefile.am
  2. 1
      extras/tools/SHA512SUMS
  3. 36
      extras/tools/libtool-2.4.7-emscripten-dlinker.patch
  4. 83
      extras/tools/libtool-2.4.7-response-files.patch
  5. 13
      extras/tools/libtool-2.5.4-clang-libs.patch
  6. 16
      extras/tools/libtool-2.5.4-embed-bitcode.patch
  7. 2
      extras/tools/packages.mak
  8. 6
      extras/tools/tools.mak

5
Makefile.am

@ -65,10 +65,9 @@ EXTRA_DIST += \
extras/tools/automake-clang.patch \
extras/tools/cmake-enable-ALPN-support-on-macOS-10.14.patch \
extras/tools/libtool-2.4.7-bitcode.patch \
extras/tools/libtool-2.4.7-clang-libs.patch \
extras/tools/libtool-2.4.7-response-files.patch \
extras/tools/libtool-2.5.4-clang-libs.patch \
extras/tools/libtool-2.4.7-lpthread.patch \
extras/tools/libtool-2.4.7-embed-bitcode.patch
extras/tools/libtool-2.5.4-embed-bitcode.patch
###############################################################################
# Various utilities ( editor syntax files, D-Bus controller ... )

1
extras/tools/SHA512SUMS

@ -16,6 +16,7 @@ d24849b93de58b20f518c071687e7bfa653a96600382f36c4cf7fc1047656458f75f093b911b786b
37b3a421419b16930e53181c431fe3b4afd55ac54733a5df08376641fd2fb88eeb73ee7abe3788f3e491e7c1b215c7f35aefa66f44b09008ad22b76ab2998830 ninja-1.11.1.tar.gz
8805f07d0cfe2050305eff009b20973bfe3aab808a263479ed98a31fa026c1a378285928c2dd058e4224abc1b347aeee5c1628c964375135e9b4647819a119bc meson-1.6.0.tar.gz
27acef46d9eb67203d708b57d80b853f76fa4b9c2720ff36ec161e6cdf702249e7982214ddf60bae75511aa79bc7d92aa27e3eab7ef9c0f5c040e8e42e76a385 libtool-2.4.7.tar.gz
60599f5c3168a287fe3a35062fd2e32e0b73433fce820bfd18d28b0e3bd7a8fefde6d6f0505fbbc2d664119ab7c539269184993843289932c895847ea1ab9f04 libtool-2.5.4.tar.gz
855ebce5ff36753238a44f14c95be7afdc3990b085960345ca2caf1a2db884f7db74d406ce9eec2f4a52abb8a063d4ed000a36b317c9a353ef4e25e2cca9a3f4 gperf-3.1.tar.gz
1bf28876ee38557042bf790af3d06ae0dcddc2d310480a821fbae1f269d433259b1ef0243fa6eff829ce67a22e8461655d41bbb7382355b7530d5648e296c9d6 config.guess-948ae97ca5703224bd3eada06b7a69f40dd15a02
14e316b18542d0a971d925a0dfca38f67680f1e2933d170767b59137d527a15d2b785910c9ba0845ebba7e089e3a05fe60aabd6a7c06a7481822942a698f8a6a config.sub-948ae97ca5703224bd3eada06b7a69f40dd15a02

36
extras/tools/libtool-2.4.7-emscripten-dlinker.patch

@ -1,36 +0,0 @@
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -6397,6 +6397,7 @@ func_mode_link ()
case $host in
*-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
*-*-sysv4*uw2*) add_dir=-L$dir ;;
+ *-*-emscripten*) add_dir=-L$dir ;;
*-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
*-*-unixware7*) add_dir=-L$dir ;;
*-*-darwin* )
diff --git a/m4/libtool.m4 b/m4/libtool.m4
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -3081,6 +3081,21 @@ uts4*)
shlibpath_var=LD_LIBRARY_PATH
;;
+emscripten*)
+ version_type=none
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ dynamic_linker="Emscripten linker"
+ _LT_COMPILER_PIC($1)='-fPIC'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(no_undefined_flag, $1)=
+ ;;
+
*)
dynamic_linker=no
;;

83
extras/tools/libtool-2.4.7-response-files.patch

@ -1,83 +0,0 @@
From 5fe8ae738927cd2c7e6d786b359e39876c84630c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Wed, 10 Oct 2018 10:47:21 +0300
Subject: [PATCH] Prefer response files over linker scripts for mingw tools
The GCC/binutils tools support response files just fine, while
lld (impersonating GNU ld) only supports response files, not
linker scripts. Using a linker script as input just to pass a
list of files is overkill for cases when a response file is enough.
---
libtool-2.4.6/build-aux/ltmain.in | 28 ++++++++++++++--------------
libtool-2.4.6/m4/libtool.m4 | 2 ++
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git libtool-2.4.6/build-aux/ltmain.in.orig libtool-2.4.6/build-aux/ltmain.in
index 2641327..f6b4217 100644
--- libtool-2.4.6/build-aux/ltmain.in.orig 2019-05-14 15:41:21.977391100 +0200
+++ libtool-2.4.6/build-aux/ltmain.in 2019-05-14 15:43:07.767697900 +0200
@@ -9852,20 +9852,7 @@ EOF
last_robj=
k=1
- if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
- output=$output_objdir/$output_la.lnkscript
- func_verbose "creating GNU ld script: $output"
- echo 'INPUT (' > $output
- for obj in $save_libobjs
- do
- func_to_tool_file "$obj"
- $ECHO "$func_to_tool_file_result" >> $output
- done
- echo ')' >> $output
- func_append delfiles " $output"
- func_to_tool_file "$output"
- output=$func_to_tool_file_result
- elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
+ if test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
output=$output_objdir/$output_la.lnk
func_verbose "creating linker input file list: $output"
: > $output
@@ -9884,6 +9871,19 @@ EOF
func_append delfiles " $output"
func_to_tool_file "$output"
output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+ elif test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
+ output=$output_objdir/$output_la.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ echo ')' >> $output
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$func_to_tool_file_result
else
if test -n "$save_libobjs"; then
func_verbose "creating reloadable object files..."
diff --git libtool-2.4.6/m4/libtool.m4.orig libtool-2.4.6/m4/libtool.m4
index 6f93d32..2c5c2f0 100644
--- libtool-2.4.6/m4/libtool.m4.orig
+++ libtool-2.4.6/m4/libtool.m4
@@ -4750,6 +4750,7 @@ _LT_EOF
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
_LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+ _LT_TAGVAR(file_list_spec, $1)='@'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -6166,6 +6167,7 @@ if test "$_lt_caught_CXX_error" != yes; then
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_TAGVAR(always_export_symbols, $1)=no
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
--
2.7.4

13
extras/tools/libtool-2.4.7-clang-libs.patch → extras/tools/libtool-2.5.4-clang-libs.patch

@ -6,14 +6,17 @@ compiler libraries.
https://crbug.com/749263
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866
--- libtool-2.4.6/m4/libtool.m4 2015-01-20 17:15:19.000000000 +0100
+++ libtool-2.4.6/m4/libtool.m4.clang 2019-03-06 17:27:40.620395700 +0100
@@ -7531,7 +7531,7 @@
--- libtool-2.5.4/m4/libtool.m4
+++ libtool-2.5.4/m4/libtool.m4
@@ -7708,7 +7708,7 @@ if AC_TRY_EVAL(ac_compile); then
for p in `eval "$output_verbose_link_cmd"`; do
case $prev$p in
- -L* | -R* | -l*)
+ -L* | -R* | -l* | */libclang_rt.*.a)
# Some compilers place space between "-{L,R}" and the path.
# Some compilers place space between "-{L,R,l}" and the path.
# Remove the space.
if test x-L = "$p" ||
if test x-L = x"$p" ||
--
2.45.2

16
extras/tools/libtool-2.4.7-embed-bitcode.patch → extras/tools/libtool-2.5.4-embed-bitcode.patch

@ -1,4 +1,4 @@
From 019e9ec253a972fd5b0e3675140256b0982ec6f4 Mon Sep 17 00:00:00 2001
From 62292dccf7bfdce63e4d700b930cfca44e6d8b83 Mon Sep 17 00:00:00 2001
From: Alexandre Janniaux <ajanni@videolabs.io>
Date: Mon, 31 May 2021 10:28:54 +0200
Subject: [PATCH] ltmain: add support for -fembed-bitcode
@ -9,22 +9,22 @@ Subject: [PATCH] ltmain: add support for -fembed-bitcode
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 8ef537c1..d8131598 100644
index fa157775..571552b7 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -5197,6 +5197,7 @@ func_mode_link ()
@@ -5349,6 +5349,7 @@ func_mode_link ()
continue
;;
-mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
+ |-fembed-bitcode|-fembed-bitcode-marker \
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
|-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
func_append compiler_flags " $arg"
func_append compile_command " $arg"
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 69cd577d..da0eec54 100644
index 8d323b3e..9044afc3 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1122,9 +1122,9 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
@@ -1156,9 +1156,9 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
if test yes = "$_lt_dar_can_shared"; then
output_verbose_link_cmd=func_echo_all
_LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
@ -34,8 +34,8 @@ index 69cd577d..da0eec54 100644
- _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+ _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -dynamiclib \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
m4_if([$1], [CXX],
[ if test yes != "$lt_cv_apple_cc_single_mod"; then
[ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then
_LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
--
2.36.0
2.45.2

2
extras/tools/packages.mak

@ -10,7 +10,7 @@ CMAKE_VERSION_MAJ=3.29
CMAKE_VERSION=$(CMAKE_VERSION_MAJ).5
CMAKE_URL=http://www.cmake.org/files/v$(CMAKE_VERSION_MAJ)/cmake-$(CMAKE_VERSION).tar.gz
LIBTOOL_VERSION=2.4.7
LIBTOOL_VERSION=2.5.4
LIBTOOL_URL=$(GNU)/libtool/libtool-$(LIBTOOL_VERSION).tar.gz
AUTOCONF_VERSION=2.72

6
extras/tools/tools.mak

@ -117,11 +117,9 @@ libtool: libtool-$(LIBTOOL_VERSION).tar.gz
$(UNPACK)
(cd $(UNPACK_DIR) && chmod u+w build-aux/ltmain.sh)
$(APPLY) $(TOOLS)/libtool-2.4.7-bitcode.patch
$(APPLY) $(TOOLS)/libtool-2.4.7-clang-libs.patch
$(APPLY) $(TOOLS)/libtool-2.4.7-response-files.patch
$(APPLY) $(TOOLS)/libtool-2.5.4-clang-libs.patch
$(APPLY) $(TOOLS)/libtool-2.4.7-lpthread.patch
$(APPLY) $(TOOLS)/libtool-2.4.7-embed-bitcode.patch
$(APPLY) $(TOOLS)/libtool-2.4.7-emscripten-dlinker.patch
$(APPLY) $(TOOLS)/libtool-2.5.4-embed-bitcode.patch
$(MOVE)
.buildlibtool: libtool .automake .help2man

Loading…
Cancel
Save