Module Name: src
Committed By: christos
Date: Sat Jun 2 01:40:02 UTC 2018
Modified Files:
src/external/gpl3/gcc/dist/gcc: gcc.c
src/external/gpl3/gcc/dist/gcc/config: netbsd-elf.h
Log Message:
Don't add a dynamic dependency to the sanitizer shared libaries in other
shared libraries.
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gcc/dist/gcc/gcc.c
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gcc/dist/gcc/gcc.c
diff -u src/external/gpl3/gcc/dist/gcc/gcc.c:1.16 src/external/gpl3/gcc/dist/gcc/gcc.c:1.17
--- src/external/gpl3/gcc/dist/gcc/gcc.c:1.16 Thu Feb 1 22:41:03 2018
+++ src/external/gpl3/gcc/dist/gcc/gcc.c Fri Jun 1 21:40:02 2018
@@ -964,20 +964,20 @@ proper position among the other output f
/* Linker command line options for -fsanitize= early on the command line. */
#ifndef SANITIZER_EARLY_SPEC
#define SANITIZER_EARLY_SPEC "\
-%{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address):" LIBASAN_EARLY_SPEC "} \
+%{!shared:%{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address):" LIBASAN_EARLY_SPEC "} \
%{%:sanitize(thread):" LIBTSAN_EARLY_SPEC "} \
- %{%:sanitize(leak):" LIBLSAN_EARLY_SPEC "}}}"
+ %{%:sanitize(leak):" LIBLSAN_EARLY_SPEC "}}}}"
#endif
/* Linker command line options for -fsanitize= late on the command line. */
#ifndef SANITIZER_SPEC
#define SANITIZER_SPEC "\
-%{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address):" LIBASAN_SPEC "\
+%{!shared:%{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address):" LIBASAN_SPEC "\
%{static:%ecannot specify -static with -fsanitize=address}}\
%{%:sanitize(thread):" LIBTSAN_SPEC "\
%{static:%ecannot specify -static with -fsanitize=thread}}\
%{%:sanitize(undefined):" LIBUBSAN_SPEC "}\
- %{%:sanitize(leak):" LIBLSAN_SPEC "}}}"
+ %{%:sanitize(leak):" LIBLSAN_SPEC "}}}}"
#endif
#ifndef POST_LINK_SPEC
Index: src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h
diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h:1.13 src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h:1.14
--- src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h:1.13 Thu Feb 1 22:41:04 2018
+++ src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h Fri Jun 1 21:40:02 2018
@@ -90,9 +90,9 @@ along with GCC; see the file COPYING3.
%(netbsd_link_ld_elf_so)} \
%{static:-static \
%{pie: %(netbsd_link_ld_elf_so)}}} \
- %{!nostdlib:%{!nodefaultlibs:\
+ %{!shared:%{!nostdlib:%{!nodefaultlibs:\
%{%:sanitize(address): -lasan } \
- %{%:sanitize(undefined): -lubsan}}}"
+ %{%:sanitize(undefined): -lubsan}}}}"
/* Provide the standard list of subtarget extra specs for NetBSD targets. */
#define NETBSD_SUBTARGET_EXTRA_SPECS \