From: jnorris Date: Fri, 9 Oct 2015 12:35:58 +0000 (+0000) Subject: * config/rs6000/rs6000.c (rs6000_offload_options): New. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=13d478244d380d1564eefc204201b7f681218ce3;p=thirdparty%2Fgcc.git * config/rs6000/rs6000.c (rs6000_offload_options): New. (TARGET_OFFLOAD_OPTIONS): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228653 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cd9f3f7ef24f..cf239b03aad9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-09 James Norris + + * config/rs6000/rs6000.c (rs6000_offload_options): New. + (TARGET_OFFLOAD_OPTIONS): New. + 2015-10-09 Alexandre Oliva PR middle-end/67891 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 30760ee4df9d..e8d9c7f7e53e 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. */