From: Tom de Vries Date: Fri, 23 Jan 2015 12:53:55 +0000 (+0000) Subject: Make fopenmp an LTO option X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1506ae0e1e865fb7a42fc37a47f1799b71f21c53;p=gcc.git Make fopenmp an LTO option 2015-01-23 Tom de Vries PR libgomp/64707 * lto-opts.c (lto_write_options): Output non-explicit conservative -fno-openmp. * lto-wrapper.c (merge_and_complain): Handle merging -fopenmp. (append_compiler_options): Pass -fopenmp through. * c.opt (fopenmp): Mark as LTO option. * lang.opt (fopenmp): Mark as LTO option. * testsuite/libgomp.c/target-9.c: Add -ftree-parallelize-loops=0 to dg-options. From-SVN: r220037 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f74a495838e..418468faf38 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2015-01-23 Tom de Vries + + PR libgomp/64707 + * lto-opts.c (lto_write_options): Output non-explicit conservative + -fno-openmp. + * lto-wrapper.c (merge_and_complain): Handle merging -fopenmp. + (append_compiler_options): Pass -fopenmp through. + 2015-01-23 Jakub Jelinek PR debug/64511 diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 62b8c3403f9..ac72e868157 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2015-01-23 Tom de Vries + + PR libgomp/64707 + * c.opt (fopenmp): Mark as LTO option. + 2015-01-21 Jakub Jelinek PR c/63307 diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 62b6c68576d..4b92022187f 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -1288,7 +1288,7 @@ C ObjC C++ ObjC++ Var(flag_openacc) Enable OpenACC fopenmp -C ObjC C++ ObjC++ Var(flag_openmp) +C ObjC C++ ObjC++ LTO Var(flag_openmp) Enable OpenMP (implies -frecursive in Fortran) fopenmp-simd diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6e17a653be5..5ae81b14a2b 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2015-01-23 Tom de Vries + + PR libgomp/64707 + * lang.opt (fopenmp): Mark as LTO option. 2015-01-23 Andre Vehreschild diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt index a7a4ed644f5..0360f6c7bad 100644 --- a/gcc/fortran/lang.opt +++ b/gcc/fortran/lang.opt @@ -571,7 +571,7 @@ Fortran ; Documented in C fopenmp -Fortran +Fortran LTO ; Documented in C fopenmp-simd diff --git a/gcc/lto-opts.c b/gcc/lto-opts.c index 026b323b46f..d44dba03935 100644 --- a/gcc/lto-opts.c +++ b/gcc/lto-opts.c @@ -166,6 +166,10 @@ lto_write_options (void) append_to_collect_gcc_options (&temporary_obstack, &first_p, "-fno-strict-overflow"); + if (!global_options_set.x_flag_openmp + && !global_options.x_flag_openmp) + append_to_collect_gcc_options (&temporary_obstack, &first_p, "-fno-openmp"); + /* Append options from target hook and store them to offload_lto section. */ if (lto_stream_offload_p) { diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index b1efed2f9c2..2d0d451af86 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -271,6 +271,7 @@ merge_and_complain (struct cl_decoded_option **decoded_options, case OPT_fsigned_zeros: case OPT_ftrapping_math: case OPT_fwrapv: + case OPT_fopenmp: /* For selected options we can merge conservatively. */ for (j = 0; j < *decoded_options_count; ++j) if ((*decoded_options)[j].opt_index == foption->opt_index) @@ -490,6 +491,7 @@ append_compiler_options (obstack *argv_obstack, struct cl_decoded_option *opts, case OPT_fsigned_zeros: case OPT_ftrapping_math: case OPT_fwrapv: + case OPT_fopenmp: case OPT_ftrapv: case OPT_fstrict_overflow: case OPT_foffload_abi_: diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 7e866ac1070..8c722d4e7bb 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,9 @@ +2015-01-23 Tom de Vries + + PR libgomp/64707 + * testsuite/libgomp.c/target-9.c: Add -ftree-parallelize-loops=0 to + dg-options. + 2015-01-19 Thomas Schwinge PR libgomp/64625 diff --git a/libgomp/testsuite/libgomp.c/target-9.c b/libgomp/testsuite/libgomp.c/target-9.c index 00fe0cb1702..4f3c812afd0 100644 --- a/libgomp/testsuite/libgomp.c/target-9.c +++ b/libgomp/testsuite/libgomp.c/target-9.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O1" } */ +/* { dg-options "-O1 -ftree-parallelize-loops=0" } */ /* { dg-additional-options "-flto" { target lto } } */ #include