Control: tags 751161 patch On 2019-05-02 14:29:40 +0200, Vincent Lefevre wrote: > Bug 751161 concerns the same issue. It mentions the -fsanitizer= flags, > which had been fixed some time ago in libtool, but -static-libasan is > still stripped. > > The gcc man page says: > > Linker Options > object-file-name -fuse-ld=linker -llibrary -nostartfiles > -nodefaultlibs -nostdlib -pie -pthread -rdynamic -s -static > -static-libgcc -static-libstdc++ -static-libasan -static-libtsan > -static-liblsan -static-libubsan -static-libmpx > -static-libmpxwrappers -shared -shared-libgcc -symbolic -T script > -Wl,option -Xlinker option -u symbol -z keyword > > so that some other options may also be concerned (see below the > current list of flags that are passed through unchanged).
I've attached a patch to include -static-* and -fcilkplus options. I assume that by default, any -static-* option should be passed to the linker. Thus -static-* would take into account new future options. Exceptions to this rule should be handled earlier in the "case" construct, as already done for -static-libtool-libs. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Description: Pass more flags to the linker unchanged. Closes: #751161. Author: Vincent Lefevre <vinc...@vinc17.net> Last-Updated: 2019-05-03 --- libtool-2.4.6-a/build-aux/ltmain.in 2019-05-03 11:11:05.000000000 +0200 +++ libtool-2.4.6-b/build-aux/ltmain.in 2019-05-03 11:18:59.209409497 +0200 @@ -5383,10 +5383,12 @@ # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer # -fuse-ld=* Linker select flags for GCC + # -static-* direct GCC to link specific libraries statically + # -fcilkplus Cilk Plus language extension features for C/C++ -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=*|-fuse-ld=*) + -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg"