aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJames Norris <jnorris@codesourcery.com>2015-10-09 12:35:58 +0000
committerJames Norris <jnorris@gcc.gnu.org>2015-10-09 12:35:58 +0000
commit1a025b0575e33f9715e18815f9bc55e1df83df8e (patch)
treea9fe194bece635a740f8beb0d59ce916a3a36ec2 /gcc
parent01a7166b4f3d97036af47b2d6b43391483261b42 (diff)
downloadgcc-1a025b0575e33f9715e18815f9bc55e1df83df8e.zip
gcc-1a025b0575e33f9715e18815f9bc55e1df83df8e.tar.gz
gcc-1a025b0575e33f9715e18815f9bc55e1df83df8e.tar.bz2
rs6000.c (rs6000_offload_options): New.
* config/rs6000/rs6000.c (rs6000_offload_options): New. (TARGET_OFFLOAD_OPTIONS): New. From-SVN: r228653
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rs6000/rs6000.c13
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cd9f3f7..cf239b0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 30760ee..e8d9c7f 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -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
/* 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. */