iDefine TARGET_OFFLOAD_OPTIONS for AArch64
authorMatthias Klose <doko@ubuntu.com>
Fri, 24 Jul 2020 14:17:44 +0000 (16:17 +0200)
committerMatthias Klose <doko@ubuntu.com>
Fri, 24 Jul 2020 14:17:44 +0000 (16:17 +0200)
2020-07-24  Matthias Klose  <doko@ubuntu.com>

* config/aarch64/aarch64.c (+aarch64_offload_options,
TARGET_OFFLOAD_OPTIONS): New.

gcc/config/aarch64/aarch64.c

index 3fe1feaa80ccb0a287ee1c7ea1056e8f0a830532..a108119ba3e1160809c48a80897c0c0ac175b271 100644 (file)
@@ -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