[vlc-devel] [3.0 PATCH v2 02/20] tools: update libtool to 2.4.6

Steve Lhomme robux4 at ycbcr.xyz
Thu Apr 2 13:38:00 CEST 2020


(cherry picked from commit d5b4cec3b4b85a8813bfc68aedf41fc135316953)
---
 extras/tools/SHA512SUMS                       |  2 +-
 ...code.patch => libtool-2.4.6-bitcode.patch} | 26 +++---
 extras/tools/libtool-2.4.6-clang-libs.patch   |  9 +-
 .../tools/libtool-2.4.6-response-files.patch  | 83 +++++++++++++++++++
 ....4.2-san.patch => libtool-2.4.6-san.patch} | 34 ++++----
 extras/tools/packages.mak                     |  2 +-
 extras/tools/tools.mak                        |  5 +-
 7 files changed, 120 insertions(+), 41 deletions(-)
 rename extras/tools/{libtool-2.4.2-bitcode.patch => libtool-2.4.6-bitcode.patch} (55%)
 create mode 100644 extras/tools/libtool-2.4.6-response-files.patch
 rename extras/tools/{libtool-2.4.2-san.patch => libtool-2.4.6-san.patch} (52%)

diff --git a/extras/tools/SHA512SUMS b/extras/tools/SHA512SUMS
index 7fd6d37e1cb..b4a5c644150 100644
--- a/extras/tools/SHA512SUMS
+++ b/extras/tools/SHA512SUMS
@@ -3,7 +3,7 @@ e34c7818bcde14d2cb13cdd293ed17d70740d4d1fd7c67a07b415491ef85d42f450d4fe5f8f80cc3
 6f201f96431f5e3d3081c4d71c884ae1f4f45b9c5c7a1306c9f3f3d4bd5ee5f6fae47b55d35241b3cae84be555cc0ab84c034acdcd5d9a071f6f0ecdee2dec73  automake-1.15.tar.gz
 693520e53fa21e81f5f15e6f8979e5264e3bf7e194e4c19b884a44767b3b6d6535dee674f355440e7dcac480372882152c0523ac3c2f1c12d51b43540bcffa59  cmake-3.13.1.tar.gz
 9953413376c6b33e9e49d1f4f5b2d50075e0b1defb17b3c233d186d21416e6b607df11f6030588eeec3b025e1075c9c37a3db3c872fc22329d1dc0d0c6e2d9d0  gas-preprocessor-72887b9.tar.gz
-0e54af7bbec376f943f2b8e4f13631fe5627b099a37a5f0252e12bade76473b0a36a673529d594778064cd8632abdc43d8a20883d66d6b27738861afbb7e211d  libtool-2.4.2.tar.gz
+3233d81cb2739a54b840a0a82064eebbfaa4fb442fb993a35d6bd41d8395c51f038c90ae048b9252f172d0a5bbfb4b36e2b13d4477001f9ff7d4124237819a18  libtool-2.4.6.tar.gz
 29254dd4267a093e8d9da3a26df8b02564044cdb4506be539ec1aff4e5d406477bcf32f5e813c840f3aec77293bfe2cdde18f6a21724a7e0bfff646ec88b74ae  m4-1.4.18.tar.gz
 56a9656539448972bc3080357ccc987bd4cbca3847758fe41251eb8af1a5e403a75f38d1344fa2c0bd56de880f37f3eaafbe7116c506f33331e7a8dd8a53cf2a  pkg-config-0.28-1.tar.gz
 9f85a98e55cbc9f245a3079d5a597f778454bc945f0942cb10fbdfbde5fe12b17d6dda93d6a8d5281459ad30a3840be7e0712feb33a824226884e7e4da54a061  protobuf-3.1.0.tar.gz
diff --git a/extras/tools/libtool-2.4.2-bitcode.patch b/extras/tools/libtool-2.4.6-bitcode.patch
similarity index 55%
rename from extras/tools/libtool-2.4.2-bitcode.patch
rename to extras/tools/libtool-2.4.6-bitcode.patch
index eaf953c6518..0b2a8098938 100644
--- a/extras/tools/libtool-2.4.2-bitcode.patch
+++ b/extras/tools/libtool-2.4.6-bitcode.patch
@@ -1,37 +1,35 @@
-diff -ru libtool/libltdl/config/ltmain.m4sh libtool-fixed/libltdl/config/ltmain.m4sh
---- libtool/libltdl/config/ltmain.m4sh	2011-10-17 12:17:05.000000000 +0200
-+++ libtool-fixed/libltdl/config/ltmain.m4sh.new	2015-09-30 22:03:22.000000000 +0200
-@@ -7928,16 +7928,6 @@
+--- libtool-2.4.6/build-aux/ltmain.in.orig	2019-03-06 17:18:05.670433700 +0100
++++ libtool-2.4.6/build-aux/ltmain.in	2019-03-06 17:21:23.122227200 +0100
+@@ -8296,16 +8296,6 @@
  
        case $host in
        *-*-darwin*)
 -	# Don't allow lazy linking, it breaks C++ global constructors
 -	# But is supposedly fixed on 10.4 or later (yay!).
--	if test "$tagname" = CXX ; then
+-	if test CXX = "$tagname"; then
 -	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
 -	    10.[0123])
--	      func_append compile_command " ${wl}-bind_at_load"
--	      func_append finalize_command " ${wl}-bind_at_load"
+-	      func_append compile_command " $wl-bind_at_load"
+-	      func_append finalize_command " $wl-bind_at_load"
 -	    ;;
 -	  esac
 -	fi
  	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
  	compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
  	finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
-diff -ru libtool/libltdl/config/ltmain.sh libtool-fixed/libltdl/config/ltmain.sh
---- libtool/libltdl/config/ltmain.sh	2011-10-17 12:19:35.000000000 +0200
-+++ libtool-fixed/libltdl/config/ltmain.sh.new	2015-09-30 22:03:44.000000000 +0200
-@@ -8715,16 +8715,6 @@
+--- libtool-2.4.6/build-aux/ltmain.sh.orig	2019-03-06 17:18:05.690203200 +0100
++++ libtool-2.4.6/build-aux/ltmain.sh	2019-03-06 17:21:40.825606300 +0100
+@@ -10208,16 +10208,6 @@
  
        case $host in
        *-*-darwin*)
 -	# Don't allow lazy linking, it breaks C++ global constructors
 -	# But is supposedly fixed on 10.4 or later (yay!).
--	if test "$tagname" = CXX ; then
+-	if test CXX = "$tagname"; then
 -	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
 -	    10.[0123])
--	      func_append compile_command " ${wl}-bind_at_load"
--	      func_append finalize_command " ${wl}-bind_at_load"
+-	      func_append compile_command " $wl-bind_at_load"
+-	      func_append finalize_command " $wl-bind_at_load"
 -	    ;;
 -	  esac
 -	fi
diff --git a/extras/tools/libtool-2.4.6-clang-libs.patch b/extras/tools/libtool-2.4.6-clang-libs.patch
index 93ec23bd1b8..8e2a258918a 100644
--- a/extras/tools/libtool-2.4.6-clang-libs.patch
+++ b/extras/tools/libtool-2.4.6-clang-libs.patch
@@ -6,15 +6,14 @@ compiler libraries.
 https://crbug.com/749263
 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866
 
---- a/libltdl/m4/libtool.m4
-+++ b/libltdl/m4/libtool.m4
-@@ -7531,7 +7544,7 @@
+--- 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 @@
    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.
         # Remove the space.
         if test x-L = "$p" ||
-
diff --git a/extras/tools/libtool-2.4.6-response-files.patch b/extras/tools/libtool-2.4.6-response-files.patch
new file mode 100644
index 00000000000..a8c6d39fb7e
--- /dev/null
+++ b/extras/tools/libtool-2.4.6-response-files.patch
@@ -0,0 +1,83 @@
+From 5fe8ae738927cd2c7e6d786b359e39876c84630c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at 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/config/ltmain.m4sh | 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.sh.orig libtool-2.4.6/build-aux/ltmain.sh
+index 2641327..f6b4217 100644
+--- libtool-2.4.6/build-aux/ltmain.sh.orig	2019-05-14 15:41:21.977391100 +0200
++++ libtool-2.4.6/build-aux/ltmain.sh	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
+
diff --git a/extras/tools/libtool-2.4.2-san.patch b/extras/tools/libtool-2.4.6-san.patch
similarity index 52%
rename from extras/tools/libtool-2.4.2-san.patch
rename to extras/tools/libtool-2.4.6-san.patch
index 4f833aac604..c70154b5eec 100644
--- a/extras/tools/libtool-2.4.2-san.patch
+++ b/extras/tools/libtool-2.4.6-san.patch
@@ -12,33 +12,31 @@ linker to allow trivial use of the clang address sanitizer.
 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at macports.org>
 Copyright-paperwork-exempt: Yes
 ---
-diff -ru libtool/libltdl/config/ltmain.m4sh libtool-fixed/libltdl/config/ltmain.m4sh
---- libtool/libltdl/config/ltmain.m4sh	2017-10-16 08:20:47.000000000 +0200
-+++ libtool-fixed/libltdl/config/ltmain.m4sh	2017-10-16 08:22:23.000000000 +0200
-@@ -5064,9 +5064,10 @@
-       # -tp=*                Portland pgcc target processor selection
+--- libtool-2.4.6/build-aux/ltmain.in.orig	2019-03-06 17:24:29.400776100 +0100
++++ libtool-2.4.6/build-aux/ltmain.in	2019-03-06 17:26:31.994381100 +0100
+@@ -5361,9 +5361,10 @@
        # --sysroot=*          for sysroot support
-       # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+       # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+       # -stdlib=*            select c++ std lib with clang
 +      # -fsanitize=*         Clang/GCC memory and address sanitizer
        -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*|-flto*|-fwhopr*|-fuse-linker-plugin)
-+      -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fsanitize=*)
+-      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
++      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*|-fsanitize=*)
          func_quote_for_eval "$arg"
- 	arg="$func_quote_for_eval_result"
+ 	arg=$func_quote_for_eval_result
          func_append compile_command " $arg"
-diff -ru libtool/libltdl/config/ltmain.sh libtool-fixed/libltdl/config/ltmain.sh
---- libtool/libltdl/config/ltmain.sh	2017-10-16 08:20:47.000000000 +0200
-+++ libtool-fixed/libltdl/config/ltmain.sh	2017-10-16 08:22:58.000000000 +0200
-@@ -5851,9 +5851,10 @@
-       # -tp=*                Portland pgcc target processor selection
+--- libtool-2.4.6/build-aux/ltmain.sh.orig	2019-03-06 17:25:38.610781500 +0100
++++ libtool-2.4.6/build-aux/ltmain.sh	2019-03-06 17:26:53.790387700 +0100
+@@ -7273,9 +7273,10 @@
        # --sysroot=*          for sysroot support
-       # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+       # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+       # -stdlib=*            select c++ std lib with clang
 +      # -fsanitize=*         Clang/GCC memory and address sanitizer
        -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*|-flto*|-fwhopr*|-fuse-linker-plugin)
-+      -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fsanitize=*)
+-      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
++      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*|-fsanitize=*)
          func_quote_for_eval "$arg"
- 	arg="$func_quote_for_eval_result"
+ 	arg=$func_quote_for_eval_result
          func_append compile_command " $arg"
diff --git a/extras/tools/packages.mak b/extras/tools/packages.mak
index 64f9326d56d..35afe6912d2 100644
--- a/extras/tools/packages.mak
+++ b/extras/tools/packages.mak
@@ -12,7 +12,7 @@ NASM_URL=http://www.nasm.us/pub/nasm/releasebuilds/$(NASM_VERSION)/nasm-$(NASM_V
 CMAKE_VERSION=3.13.1
 CMAKE_URL=http://www.cmake.org/files/v3.13/cmake-$(CMAKE_VERSION).tar.gz
 
-LIBTOOL_VERSION=2.4.2
+LIBTOOL_VERSION=2.4.6
 LIBTOOL_URL=$(GNU)/libtool/libtool-$(LIBTOOL_VERSION).tar.gz
 
 AUTOCONF_VERSION=2.69
diff --git a/extras/tools/tools.mak b/extras/tools/tools.mak
index 1d058f521bd..205464960df 100644
--- a/extras/tools/tools.mak
+++ b/extras/tools/tools.mak
@@ -101,9 +101,10 @@ libtool-$(LIBTOOL_VERSION).tar.gz:
 
 libtool: libtool-$(LIBTOOL_VERSION).tar.gz
 	$(UNPACK)
-	$(APPLY) libtool-2.4.2-bitcode.patch
-	$(APPLY) libtool-2.4.2-san.patch
+	$(APPLY) libtool-2.4.6-bitcode.patch
+	$(APPLY) libtool-2.4.6-san.patch
 	$(APPLY) libtool-2.4.6-clang-libs.patch
+	$(APPLY) libtool-2.4.6-response-files.patch
 	$(MOVE)
 
 .libtool: libtool .automake
-- 
2.17.1



More information about the vlc-devel mailing list