This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Handle -fsanitize=* in lto-wrapper (PR lto/69254)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 26 Jan 2016 15:35:34 +0100
- Subject: Re: [PATCH] Handle -fsanitize=* in lto-wrapper (PR lto/69254)
- Authentication-results: sourceware.org; auth=none
- References: <20160125203022 dot GN3017 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1601261501140 dot 31122 at t29 dot fhfr dot qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jan 26, 2016 at 03:06:43PM +0100, Richard Biener wrote:
> > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> Can you split out the non -fsanitize part? It is ok.
Ok, I've committed following patch:
2016-01-26 Jakub Jelinek <jakub@redhat.com>
PR lto/69254
* lto-wrapper.c (merge_and_complain): Handle -fcilkplus.
(append_compiler_options): Handle -fcilkplus.
(append_linker_options): Ignore -fno-{openmp,openacc,cilkplus}.
--- gcc/lto-wrapper.c.jj 2016-01-23 00:13:00.632019027 +0100
+++ gcc/lto-wrapper.c 2016-01-25 15:59:49.778877313 +0100
@@ -277,6 +293,7 @@ merge_and_complain (struct cl_decoded_op
case OPT_fwrapv:
case OPT_fopenmp:
case OPT_fopenacc:
+ case OPT_fcilkplus:
case OPT_fcheck_pointer_bounds:
/* For selected options we can merge conservatively. */
for (j = 0; j < *decoded_options_count; ++j)
@@ -505,6 +546,7 @@ append_compiler_options (obstack *argv_o
case OPT_fwrapv:
case OPT_fopenmp:
case OPT_fopenacc:
+ case OPT_fcilkplus:
case OPT_ftrapv:
case OPT_fstrict_overflow:
case OPT_foffload_abi_:
@@ -558,6 +601,15 @@ append_linker_options (obstack *argv_obs
??? We fail to diagnose a possible mismatch here. */
continue;
+ case OPT_fopenmp:
+ case OPT_fopenacc:
+ case OPT_fcilkplus:
+ /* Ignore -fno-XXX form of these options, as otherwise
+ corresponding builtins will not be enabled. */
+ if (option->value == 0)
+ continue;
+ break;
+
default:
break;
}
Jakub