[vlc-devel] [PATCH 1/5] tools: add pdb support to libtool
Steve Lhomme
robux4 at ycbcr.xyz
Thu May 16 17:17:43 CEST 2019
If the -Wl,-pdb comes from the makefile, it will be copied next to the DLL/EXE
it belongs to (in the .libs folders).
---
extras/tools/libtool-2.4.6-pass-pdb.patch | 28 +++++++++++++++++++++++
extras/tools/tools.mak | 1 +
2 files changed, 29 insertions(+)
create mode 100644 extras/tools/libtool-2.4.6-pass-pdb.patch
diff --git a/extras/tools/libtool-2.4.6-pass-pdb.patch b/extras/tools/libtool-2.4.6-pass-pdb.patch
new file mode 100644
index 0000000000..7f91c88075
--- /dev/null
+++ b/extras/tools/libtool-2.4.6-pass-pdb.patch
@@ -0,0 +1,28 @@
+--- libtool/build-aux/ltmain.sh.pass-pdb 2019-05-16 15:13:41.307311500 +0200
++++ libtool/build-aux/ltmain.sh 2019-05-16 15:15:50.380562600 +0200
+@@ -7221,16 +7221,25 @@ func_mode_link ()
+ ;;
+
+ -Wl,*)
++ next_is_pdb=
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs=$IFS; IFS=,
+ for flag in $args; do
++ if test -n "$next_is_pdb"; then
++ # a -pdb was found, put it in the same folder as the library
++ flag=$objdir/$flag
++ next_is_pdb=
++ fi
+ IFS=$save_ifs
+ func_quote_for_eval "$flag"
+ func_append arg " $wl$func_quote_for_eval_result"
+ func_append compiler_flags " $wl$func_quote_for_eval_result"
+ func_append linker_flags " $func_quote_for_eval_result"
++ if test "$flag" = "-pdb"; then
++ next_is_pdb=yes
++ fi
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$arg"
diff --git a/extras/tools/tools.mak b/extras/tools/tools.mak
index f20934284d..6852626fcd 100644
--- a/extras/tools/tools.mak
+++ b/extras/tools/tools.mak
@@ -129,6 +129,7 @@ libtool: libtool-$(LIBTOOL_VERSION).tar.gz
$(APPLY) libtool-2.4.6-san.patch
$(APPLY) libtool-2.4.6-clang-libs.patch
$(APPLY) libtool-2.4.6-response-files.patch
+ $(APPLY) libtool-2.4.6-pass-pdb.patch
$(MOVE)
.buildlibtool: libtool .automake .help2man
--
2.17.1
More information about the vlc-devel
mailing list