]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: Support "-fno-sanitize*" options.
authorManoj Gupta <manojgupta@google.com>
Fri, 16 Dec 2022 18:10:58 +0000 (10:10 -0800)
committerMike Frysinger <vapier@gentoo.org>
Sun, 14 Jan 2024 06:14:29 +0000 (01:14 -0500)
"-fno-sanitize*" options e.g. -fno-sanitize=alignment
or -fno-sanitize-recover=all are used to tune the behvior of
sanitizers in GCC/clang. Let libtool pass these options
to compiler similar to fsanitize=*.

* build-aux/ltmain.in: Handle -fno-sanitize*.

Signed-off-by: Manoj Gupta <manojgupta@google.com>
build-aux/ltmain.in

index 34af382a67df56f1905f125c988f18d6b43c84db..fb49d6c8f1167d5bdb1c4db7b92946ca47252ac4 100644 (file)
@@ -5407,6 +5407,7 @@ func_mode_link ()
       # -specs=*             GCC specs files
       # -stdlib=*            select c++ std lib with clang
       # -fsanitize=*         Clang/GCC memory and address sanitizer
+      # -fno-sanitize*       Clang/GCC memory and address sanitizer
       # -shared-libsan       Link with shared sanitizer runtimes (Clang)
       # -static-libsan       Link with static sanitizer runtimes (Clang)
       # -fuse-ld=*           Linker select flags for GCC
@@ -5415,8 +5416,8 @@ func_mode_link ()
       -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=*| \
-      -specs=*|-fsanitize=*|-shared-libsan|-static-libsan|-fuse-ld=*|-Wa,*| \
-      -Werror|-Werror=*)
+      -specs=*|-fsanitize=*|-fno-sanitize*|-shared-libsan|-static-libsan| \
+      -fuse-ld=*|-Wa,*|-Werror|-Werror=*)
         func_quote_arg pretty "$arg"
        arg=$func_quote_arg_result
         func_append compile_command " $arg"