diff options
author | ygribov <ygribov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-31 13:35:18 +0000 |
---|---|---|
committer | ygribov <ygribov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-31 13:35:18 +0000 |
commit | 3e1dd01e64c444733399ba398bb2ace1d59cc4d4 (patch) | |
tree | 635ebf6c3843da8f2869a7802dedfc2941d28cc1 /gcc/gcc.c | |
parent | 7c0c95b8530831130b9d4a1acf4cd0311376bc10 (diff) | |
download | gcc-3e1dd01e64c444733399ba398bb2ace1d59cc4d4.tar.gz |
2014-07-31 Yury Gribov <y.gribov@samsung.com>
* doc/cpp.texi (__SANITIZE_ADDRESS__): Updated description.
* doc/invoke.texi (-fsanitize=kernel-address): Describe new option.
* flag-types.h (SANITIZE_USER_ADDRESS, SANITIZE_KERNEL_ADDRESS):
New enums.
* gcc.c (sanitize_spec_function): Support new option.
(SANITIZER_SPEC): Remove now redundant check.
* opts.c (common_handle_option): Support new option.
(finish_options): Check for incompatibilities.
* toplev.c (process_options): Split userspace-specific checks.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213367 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c index 6cd08eab8b5..c0fde8c8df5 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -779,8 +779,7 @@ proper position among the other output files. */ #ifndef SANITIZER_SPEC #define SANITIZER_SPEC "\ %{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address):" LIBASAN_SPEC "\ - %{static:%ecannot specify -static with -fsanitize=address}\ - %{%:sanitize(thread):%e-fsanitize=address is incompatible with -fsanitize=thread}}\ + %{static:%ecannot specify -static with -fsanitize=address}}\ %{%:sanitize(thread):" LIBTSAN_SPEC "\ %{!pie:%{!shared:%e-fsanitize=thread linking must be done with -pie or -shared}}}\ %{%:sanitize(undefined):" LIBUBSAN_SPEC "}\ @@ -8224,7 +8223,9 @@ sanitize_spec_function (int argc, const char **argv) return NULL; if (strcmp (argv[0], "address") == 0) - return (flag_sanitize & SANITIZE_ADDRESS) ? "" : NULL; + return (flag_sanitize & SANITIZE_USER_ADDRESS) ? "" : NULL; + if (strcmp (argv[0], "kernel-address") == 0) + return (flag_sanitize & SANITIZE_KERNEL_ADDRESS) ? "" : NULL; if (strcmp (argv[0], "thread") == 0) return (flag_sanitize & SANITIZE_THREAD) ? "" : NULL; if (strcmp (argv[0], "undefined") == 0) |