From 29a14a1a907947fe9e43bce62d3468559f17da97 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Fri, 24 Jul 2020 16:17:44 +0200 Subject: [PATCH] iDefine TARGET_OFFLOAD_OPTIONS for AArch64 2020-07-24 Matthias Klose * config/aarch64/aarch64.c (+aarch64_offload_options, TARGET_OFFLOAD_OPTIONS): New. --- gcc/config/aarch64/aarch64.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 3fe1feaa80c..a108119ba3e 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -15005,6 +15005,16 @@ aarch64_override_options_after_change (void) aarch64_override_options_after_change_1 (&global_options); } +/* Implement the TARGET_OFFLOAD_OPTIONS hook. */ +static char * +aarch64_offload_options (void) +{ + if (TARGET_ILP32) + return xstrdup ("-foffload-abi=ilp32"); + else + return xstrdup ("-foffload-abi=lp64"); +} + static struct machine_function * aarch64_init_machine_status (void) { @@ -23580,6 +23590,9 @@ aarch64_libgcc_floating_mode_supported_p #define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE \ aarch64_override_options_after_change +#undef TARGET_OFFLOAD_OPTIONS +#define TARGET_OFFLOAD_OPTIONS aarch64_offload_options + #undef TARGET_OPTION_SAVE #define TARGET_OPTION_SAVE aarch64_option_save -- 2.30.2