Bug#928254: gcc-8: -static-libasan does not work with GNU MPFR

2019-05-02 Thread Vincent Lefevre
Control: reassign -1 libtool 2.4.6-10
Control: retitle -1 libtool: "Flags to be passed through unchanged" should 
include -static-libasan
Control: severity -1 normal

On 2019-05-02 10:10:33 +0200, Vincent Lefevre wrote:
> On 2019-05-01 20:54:05 +0200, Matthias Klose wrote:
> > the linker never sees your CFLAGS. At least -static-libasan needs to
> > be added to LDFLAGS.
> 
> Indeed, I can see -static-libasan in the "libtool --mode=link" line,
> but libtool drops this option in the gcc call:
> 
> /bin/sh ../libtool  --tag=CC   --mode=link gcc  -O0 -march=native 
> -fsanitize=address -static-libasan   -version-info 6:0:0 
> -Wl,--disable-new-dtags -o libmpfr.la -rpath /usr/local/lib [.lo files]  -lgmp
> libtool: link: gcc -shared  -fPIC -DPIC  [.o files]  -lgmp  -O0 -march=native 
> -fsanitize=address -Wl,--disable-new-dtags   -Wl,-soname -Wl,libmpfr.so.6 -o 
> .libs/libmpfr.so.6.0.0
> 
> Why does libtool do that, while it preserves
> "-O0 -march=native -fsanitize=address"?

I can see that the libtool script contains:

  # Flags to be passed through unchanged, with rationale:
  # -64, -mips[0-9]  enable 64-bit mode for the SGI compiler
  # -r[0-9][0-9]*specify processor for the SGI compiler
  # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
  # +DA*, +DD*   enable 64-bit mode for the HP compiler
  # -q*  compiler args for the IBM compiler
  # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
  # -F/path  path to uninstalled frameworks, gcc on darwin
  # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
  # -fstack-protector*   stack protector flags for GCC
  # @fileGCC response files
  # -tp=*Portland pgcc target processor selection
  # --sysroot=*  for sysroot support
  # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time 
optimization
  # -specs=* GCC specs files
  # -stdlib=*select c++ std lib with clang
  # -fsanitize=* Clang/GCC memory and address sanitizer
  # -fuse-ld=*   Linker select flags for GCC
  -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=*)
func_quote_for_eval "$arg"
arg=$func_quote_for_eval_result
func_append compile_command " $arg"
func_append finalize_command " $arg"
func_append compiler_flags " $arg"
continue
;;

i.e. it misses the -static-libasan flag.

Reassigning to libtool.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Processed: Re: Bug#928254: gcc-8: -static-libasan does not work with GNU MPFR

2019-05-02 Thread Debian Bug Tracking System
Processing control commands:

> reassign -1 libtool 2.4.6-10
Bug #928254 [gcc-8] gcc-8: -static-libasan does not work with GNU MPFR
Bug reassigned from package 'gcc-8' to 'libtool'.
No longer marked as found in versions gcc-8/8.3.0-7.
Ignoring request to alter fixed versions of bug #928254 to the same values 
previously set
Bug #928254 [libtool] gcc-8: -static-libasan does not work with GNU MPFR
Marked as found in versions libtool/2.4.6-10.
> retitle -1 libtool: "Flags to be passed through unchanged" should include 
> -static-libasan
Bug #928254 [libtool] gcc-8: -static-libasan does not work with GNU MPFR
Changed Bug title to 'libtool: "Flags to be passed through unchanged" should 
include -static-libasan' from 'gcc-8: -static-libasan does not work with GNU 
MPFR'.
> severity -1 normal
Bug #928254 [libtool] libtool: "Flags to be passed through unchanged" should 
include -static-libasan
Severity set to 'normal' from 'minor'

-- 
928254: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=928254
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#928254: gcc-8: -static-libasan does not work with GNU MPFR

2019-05-02 Thread Vincent Lefevre
On 2019-05-01 20:54:05 +0200, Matthias Klose wrote:
> the linker never sees your CFLAGS. At least -static-libasan needs to
> be added to LDFLAGS.

Indeed, I can see -static-libasan in the "libtool --mode=link" line,
but libtool drops this option in the gcc call:

/bin/sh ../libtool  --tag=CC   --mode=link gcc  -O0 -march=native 
-fsanitize=address -static-libasan   -version-info 6:0:0 
-Wl,--disable-new-dtags -o libmpfr.la -rpath /usr/local/lib [.lo files]  -lgmp
libtool: link: gcc -shared  -fPIC -DPIC  [.o files]  -lgmp  -O0 -march=native 
-fsanitize=address -Wl,--disable-new-dtags   -Wl,-soname -Wl,libmpfr.so.6 -o 
.libs/libmpfr.so.6.0.0

Why does libtool do that, while it preserves
"-O0 -march=native -fsanitize=address"?

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)