[PATCH] Add command line parsing of -fsanitize

Joseph S. Myers joseph@codesourcery.com
Sun Jul 14 17:43:00 GMT 2013


On Sat, 13 Jul 2013, Jakub Jelinek wrote:

> Here is a patch that implements that (of course on top of Marek's patch from
> June).
> 
> 2013-07-13  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* gcc.c: Document %{%:function(args):X}.
> 	(SANITIZER_EARLY_SPEC, SANITIZER_SPEC): Use %:sanitize(address)
> 	instead of fsanitize=address and %:sanitize(thread) instead of
> 	fsanitize=thread.
> 	(static_spec_functions): Add sanitize.
> 	(handle_spec_function): Add retval_nonnull argument and if non-NULL,
> 	store funcval != NULL there.
> 	(do_spec_1): Adjust handle_spec_function caller.
> 	(handle_braces): Allow %:function(args) as condition.
> 	(sanitize_spec_function): New function.
> 	* common.opt (fsanitize=): Add Driver.
> 	* config/darwin.h (LINK_COMMAND_SPEC_A): Use %:sanitize(address)
> 	instead of fsanitize=address.
> 	* config/arm/linux-eabi.h (ASAN_CC1_SPEC): Use %:sanitize(address)
> 	instead of fsanitize=address*.

This seems fine to me.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list