diff mbox

[hsa-branch] Fix issue with an undefined builtin

Message ID 20160609135705.GM2962@virgil.suse.cz
State New
Headers show

Commit Message

Martin Jambor June 9, 2016, 1:57 p.m. UTC
Hi,

when I added HSA-only builtins to the HSA branch, I added them only
conditionally if HSA was enabled, which however broke non-HSA
compilation.  This patch fixes this be removing the ifdefs.

Now that we have reorganized HSA so that all GTY stuff is in one file
(hsa.c), the right thing to do is to conditionally compile all of it.
However, this will mean putting ifdefs also to omp-lowering, which is
something that I would like to do only after we split omp-low.c and
gridification gets its own file.  At the branch this does not do any
real harm anyway.

I will commit this to the branch straight away.

Thanks,

Martin


2016-06-06  Martin Jambor  <mjambor@suse.cz>

	* builtins.def: Do not enclose DEF_HSA_BUILTIN by an ifdef ENABLE_HSA.
diff mbox

Patch

diff --git a/gcc/builtins.def b/gcc/builtins.def
index 2bc933b..4e1c0ac 100644
--- a/gcc/builtins.def
+++ b/gcc/builtins.def
@@ -189,14 +189,10 @@  along with GCC; see the file COPYING3.  If not see
 		|| flag_offload_abi != OFFLOAD_ABI_UNSET))
 
 #undef DEF_HSA_BUILTIN
-#ifdef ENABLE_HSA
 #define DEF_HSA_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
   DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE,    \
                false, false, true, ATTRS, false, \
 	       (!flag_disable_hsa))
-#else
-#define DEF_HSA_BUILTIN(ENUM, NAME, TYPE, ATTRS)
-#endif
 
 /* Builtin used by implementation of Cilk Plus.  Most of these are decomposed
    by the compiler but a few are implemented in libcilkrts.  */