diff options
author | tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-08 15:41:13 +0000 |
---|---|---|
committer | tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-08 15:41:13 +0000 |
commit | 752cfdfdd758616a0fee3071d33e4add83f34a51 (patch) | |
tree | 534d8a2d3746af0c984f8502f409c0547d28f7a3 /gcc/builtins.def | |
parent | c049b358f961f72d0c0cf61a707e9a5855b12b28 (diff) | |
download | gcc-752cfdfdd758616a0fee3071d33e4add83f34a51.tar.gz |
Make sure that OMP builtins are available in offloading compilers.
gcc/
* builtins.def (DEF_GOMP_BUILTIN): Also consider flag_offload_abi
for registering builtins.
* config/i386/intelmic-mkoffload.c (prepare_target_image): Don't
add -fopenmp to the argv_obstack used when invoking
compile_for_target.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219346 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.def')
-rw-r--r-- | gcc/builtins.def | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/builtins.def b/gcc/builtins.def index 28b164673db..5a7ed10f550 100644 --- a/gcc/builtins.def +++ b/gcc/builtins.def @@ -148,11 +148,14 @@ along with GCC; see the file COPYING3. If not see /* Builtin used by the implementation of GNU OpenMP. None of these are actually implemented in the compiler; they're all in libgomp. */ +/* These builtins also need to be enabled in offloading compilers invoked from + mkoffload; for that purpose, we're checking the -foffload-abi flag here. */ #undef DEF_GOMP_BUILTIN #define DEF_GOMP_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ false, true, true, ATTRS, false, \ - (flag_openmp || flag_tree_parallelize_loops)) + (flag_openmp || flag_tree_parallelize_loops \ + || flag_offload_abi != OFFLOAD_ABI_UNSET)) /* Builtin used by implementation of Cilk Plus. Most of these are decomposed by the compiler but a few are implemented in libcilkrts. */ |