aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2020-07-24 16:17:44 +0200
committerMatthias Klose <doko@ubuntu.com>2020-07-24 16:17:44 +0200
commit29a14a1a907947fe9e43bce62d3468559f17da97 (patch)
tree22ff7d35f3f6aa1e4a512addf1240bbd81e20e52
parent8c7bb540803e8bff9998bc86806e8a83acc75370 (diff)
downloadgcc-29a14a1a907947fe9e43bce62d3468559f17da97.zip
gcc-29a14a1a907947fe9e43bce62d3468559f17da97.tar.gz
gcc-29a14a1a907947fe9e43bce62d3468559f17da97.tar.bz2
iDefine TARGET_OFFLOAD_OPTIONS for AArch64
2020-07-24 Matthias Klose <doko@ubuntu.com> * config/aarch64/aarch64.c (+aarch64_offload_options, TARGET_OFFLOAD_OPTIONS): New.
-rw-r--r--gcc/config/aarch64/aarch64.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 3fe1fea..a108119 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