Hi,

The attached patch was backported from trunk.

commit 13d478244d380d1564eefc204201b7f681218ce3
Author: jnorris <jnorris@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Fri Oct 9 12:35:58 2015 +0000

        * config/rs6000/rs6000.c (rs6000_offload_options): New.
        (TARGET_OFFLOAD_OPTIONS): New.


Jim
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 023f622..2dce709 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1688,6 +1688,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
 
 
 /* Processor table.  */
@@ -9532,6 +9535,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.  */
 

Reply via email to