http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55379
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|-static -static-libasan |-static -static-libasan |doesn't create static |pass -Bdynamic to linker |binary | --- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-18 14:55:57 UTC --- [hjl@gnu-tools-1 gcc]$ ./xgcc -B./ x.o -o x -faddress-sanitizer -B../x86_64-unknown-linux-gnu/libsanitizer/asan/.libs/ -static-libasan -static -v Reading specs from ./specs COLLECT_GCC=./xgcc COLLECT_LTO_WRAPPER=./lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /export/gnu/import/git/sources/gcc/configure --enable-languages=c,c++ --disable-bootstrap --prefix=/usr/gcc-4.8.0 --with-local-prefix=/usr/local --enable-gnu-indirect-function --with-fpmath=sse : (reconfigured) /export/gnu/import/git/sources/gcc/configure --disable-bootstrap --prefix=/usr/gcc-4.8.0 --with-local-prefix=/usr/local --enable-gnu-indirect-function --with-fpmath=sse CFLAGS=-g CXXFLAGS=-g --enable-languages=c,c++,lto --no-create --no-recursion Thread model: posix gcc version 4.8.0 20121117 (experimental) (GCC) COMPILER_PATH=./:../x86_64-unknown-linux-gnu/libsanitizer/asan/.libs/ LIBRARY_PATH=./:../x86_64-unknown-linux-gnu/libsanitizer/asan/.libs/:/lib/../lib64/:/usr/lib/../lib64/:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-B' './' '-o' 'x' '-faddress-sanitizer' '-B' '../x86_64-unknown-linux-gnu/libsanitizer/asan/.libs/' '-static-libasan' '-static' '-v' '-mtune=generic' '-march=x86-64' ./collect2 -m elf_x86_64 -static -o x /lib/../lib64/crt1.o /lib/../lib64/crti.o ./crtbeginT.o -L. -L../x86_64-unknown-linux-gnu/libsanitizer/asan/.libs -L/lib/../lib64 -L/usr/lib/../lib64 x.o -Bstatic -lasan -Bdynamic --start-group -lgcc -lgcc_eh -lc --end-group ./crtend.o /lib/../lib64/crtn.o [hjl@gnu-tools-1 gcc]$