[vlc-devel] [PATCH] tools: Patch libtool to pass-through sanitizer flags

Rémi Denis-Courmont remi at remlab.net
Mon Oct 16 09:34:08 CEST 2017


Le 16 octobre 2017 08:40:45 GMT+02:00, Marvin Scholz <epirat07 at gmail.com> a écrit :
>This is basically the same as
>http://git.savannah.gnu.org/cgit/libtool.git/commit/?id=a5c6466
>Libtool has no release that includes this commit, yet.
>
>This fixes using sanitizers on macOS, as without this patch, the
>relevant flag is not passed to the compiler when linking, causing
>undefined symbol errors.
>---
> extras/tools/libtool-2.4.2-san.patch | 28 ++++++++++++++++++++++++++++
> extras/tools/tools.mak               |  1 +
> 2 files changed, 29 insertions(+)
> create mode 100644 extras/tools/libtool-2.4.2-san.patch
>
>diff --git a/extras/tools/libtool-2.4.2-san.patch
>b/extras/tools/libtool-2.4.2-san.patch
>new file mode 100644
>index 0000000000..2a5c7724b6
>--- /dev/null
>+++ b/extras/tools/libtool-2.4.2-san.patch
>@@ -0,0 +1,28 @@
>+--- 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
>+       # --sysroot=*          for sysroot support
>+       # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time
>optimization
>++      # -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=*)
>+         func_quote_for_eval "$arg"
>+ 	arg="$func_quote_for_eval_result"
>+         func_append compile_command " $arg"
>+--- 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
>+       # --sysroot=*          for sysroot support
>+       # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time
>optimization
>++      # -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=*)
>+         func_quote_for_eval "$arg"
>+ 	arg="$func_quote_for_eval_result"
>+         func_append compile_command " $arg"
>diff --git a/extras/tools/tools.mak b/extras/tools/tools.mak
>index c52e6ec8eb..d96cc837e8 100644
>--- a/extras/tools/tools.mak
>+++ b/extras/tools/tools.mak
>@@ -86,6 +86,7 @@ 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
> 	$(MOVE)
> 
> .libtool: libtool .automake
>-- 
>2.13.5 (Apple Git-94)
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

I think that you should preserve the description and author metadata when backporting a patch which isn't yours.
-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.


More information about the vlc-devel mailing list