rs6000.c (rs6000_offload_options): New.
authorJames Norris <jnorris@codesourcery.com>
Fri, 9 Oct 2015 12:35:58 +0000 (12:35 +0000)
committerJames Norris <jnorris@gcc.gnu.org>
Fri, 9 Oct 2015 12:35:58 +0000 (12:35 +0000)
* config/rs6000/rs6000.c (rs6000_offload_options): New.
(TARGET_OFFLOAD_OPTIONS): New.

From-SVN: r228653

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index cd9f3f7ef24f3a05ca2926ebb3e97642887d30c5..cf239b03aad954c6a91f8e9febb63f52e475f1e2 100644 (file)
@@ -1,3 +1,8 @@
+2015-10-09  James Norris  <jnorris@codesourcery.com>
+
+       * config/rs6000/rs6000.c (rs6000_offload_options): New.
+       (TARGET_OFFLOAD_OPTIONS): New.
+
 2015-10-09  Alexandre Oliva <aoliva@redhat.com>
 
        PR middle-end/67891
index 30760ee4df9d357bd949f04a358eee6b6d3adeb8..e8d9c7f7e53ed878cf3050d8b8ce51dc822aaf29 100644 (file)
@@ -1690,6 +1690,9 @@ static const struct attribute_spec rs6000_attribute_table[] =
 #define TARGET_LIBGCC_SHIFT_COUNT_MODE rs6000_abi_word_mode
 #undef TARGET_UNWIND_WORD_MODE
 #define TARGET_UNWIND_WORD_MODE rs6000_abi_word_mode
+
+#undef TARGET_OFFLOAD_OPTIONS
+#define TARGET_OFFLOAD_OPTIONS rs6000_offload_options
 \f
 
 /* Processor table.  */
@@ -9530,6 +9533,16 @@ rs6000_abi_word_mode (void)
   return TARGET_32BIT ? SImode : DImode;
 }
 
+/* Implement the TARGET_OFFLOAD_OPTIONS hook.  */
+static char *
+rs6000_offload_options (void)
+{
+  if (TARGET_64BIT)
+    return xstrdup ("-foffload-abi=lp64");
+  else
+    return xstrdup ("-foffload-abi=ilp32");
+}
+
 /* On rs6000, function arguments are promoted, as are function return
    values.  */