|
|
4dd737 |
2014-04-09 Richard Henderson <rth@redhat.com>
|
|
|
4dd737 |
|
|
|
4dd737 |
* gcc-interface/Makefile.in: Support aarch64-linux.
|
|
|
4dd737 |
* init.c: Enable alternate stack support also on aarch64.
|
|
|
4dd737 |
* types.h (Fat_Pointer): Remove aligned attribute.
|
|
|
4dd737 |
|
|
|
4dd737 |
--- gcc/ada/gcc-interface/Makefile.in
|
|
|
4dd737 |
+++ gcc/ada/gcc-interface/Makefile.in
|
|
|
4dd737 |
@@ -2123,6 +2123,44 @@ ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
|
|
|
4dd737 |
LIBRARY_VERSION := $(LIB_VERSION)
|
|
|
4dd737 |
endif
|
|
|
4dd737 |
|
|
|
4dd737 |
+# AArch64 Linux
|
|
|
4dd737 |
+ifeq ($(strip $(filter-out aarch64% linux%,$(arch) $(osys))),)
|
|
|
4dd737 |
+ LIBGNAT_TARGET_PAIRS = \
|
|
|
4dd737 |
+ a-exetim.adb
|
|
|
4dd737 |
+ a-exetim.ads
|
|
|
4dd737 |
+ a-intnam.ads
|
|
|
4dd737 |
+ a-synbar.adb
|
|
|
4dd737 |
+ a-synbar.ads
|
|
|
4dd737 |
+ s-inmaop.adb
|
|
|
4dd737 |
+ s-intman.adb
|
|
|
4dd737 |
+ s-linux.ads
|
|
|
4dd737 |
+ s-mudido.adb
|
|
|
4dd737 |
+ s-osinte.ads
|
|
|
4dd737 |
+ s-osinte.adb
|
|
|
4dd737 |
+ s-osprim.adb
|
|
|
4dd737 |
+ s-taprop.adb
|
|
|
4dd737 |
+ s-tasinf.ads
|
|
|
4dd737 |
+ s-tasinf.adb
|
|
|
4dd737 |
+ s-tpopsp.adb
|
|
|
4dd737 |
+ s-taspri.ads
|
|
|
4dd737 |
+ g-sercom.adb
|
|
|
4dd737 |
+ $(ATOMICS_TARGET_PAIRS) \
|
|
|
4dd737 |
+ $(ATOMICS_BUILTINS_TARGET_PAIRS) \
|
|
|
4dd737 |
+ system.ads
|
|
|
4dd737 |
+ ## ^^ Note the above is a pretty-close placeholder.
|
|
|
4dd737 |
+
|
|
|
4dd737 |
+ TOOLS_TARGET_PAIRS = \
|
|
|
4dd737 |
+ mlib-tgt-specific.adb
|
|
|
4dd737 |
+ indepsw.adb
|
|
|
4dd737 |
+
|
|
|
4dd737 |
+ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o a-exetim.o
|
|
|
4dd737 |
+ EH_MECHANISM=-gcc
|
|
|
4dd737 |
+ THREADSLIB=-lpthread -lrt
|
|
|
4dd737 |
+ GNATLIB_SHARED=gnatlib-shared-dual
|
|
|
4dd737 |
+ GMEM_LIB = gmemlib
|
|
|
4dd737 |
+ LIBRARY_VERSION := $(LIB_VERSION)
|
|
|
4dd737 |
+endif
|
|
|
4dd737 |
+
|
|
|
4dd737 |
# x86-64 Linux
|
|
|
4dd737 |
ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
|
|
|
4dd737 |
LIBGNAT_TARGET_PAIRS = \
|
|
|
4dd737 |
--- gcc/ada/init.c
|
|
|
4dd737 |
+++ gcc/ada/init.c
|
|
|
4dd737 |
@@ -562,7 +562,9 @@ __gnat_error_handler (int sig, siginfo_t *si ATTRIBUTE_UNUSED, void *ucontext)
|
|
|
4dd737 |
Raise_From_Signal_Handler (exception, msg);
|
|
|
4dd737 |
}
|
|
|
4dd737 |
|
|
|
4dd737 |
-#if defined (i386) || defined (__x86_64__) || defined (__powerpc__)
|
|
|
4dd737 |
+#if defined (i386) || defined (__x86_64__) || defined (__powerpc__) \
|
|
|
4dd737 |
+ || defined (__aarch64__)
|
|
|
4dd737 |
+#define HAVE_GNAT_ALTERNATE_STACK 1
|
|
|
4dd737 |
/* This must be in keeping with System.OS_Interface.Alternate_Stack_Size. */
|
|
|
4dd737 |
char __gnat_alternate_stack[16 * 1024]; /* 2 * SIGSTKSZ */
|
|
|
4dd737 |
#endif
|
|
|
4dd737 |
@@ -603,7 +605,7 @@ __gnat_install_handler (void)
|
|
|
4dd737 |
handled properly, avoiding a SEGV generation from stack usage by the
|
|
|
4dd737 |
handler itself. */
|
|
|
4dd737 |
|
|
|
4dd737 |
-#if defined (i386) || defined (__x86_64__) || defined (__powerpc__)
|
|
|
4dd737 |
+#ifdef HAVE_GNAT_ALTERNATE_STACK
|
|
|
4dd737 |
stack_t stack;
|
|
|
4dd737 |
stack.ss_sp = __gnat_alternate_stack;
|
|
|
4dd737 |
stack.ss_size = sizeof (__gnat_alternate_stack);
|
|
|
4dd737 |
@@ -624,7 +626,7 @@ __gnat_install_handler (void)
|
|
|
4dd737 |
sigaction (SIGILL, &act, NULL);
|
|
|
4dd737 |
if (__gnat_get_interrupt_state (SIGBUS) != 's')
|
|
|
4dd737 |
sigaction (SIGBUS, &act, NULL);
|
|
|
4dd737 |
-#if defined (i386) || defined (__x86_64__) || defined (__powerpc__)
|
|
|
4dd737 |
+#ifdef HAVE_GNAT_ALTERNATE_STACK
|
|
|
4dd737 |
act.sa_flags |= SA_ONSTACK;
|
|
|
4dd737 |
#endif
|
|
|
4dd737 |
if (__gnat_get_interrupt_state (SIGSEGV) != 's')
|
|
|
4dd737 |
--- gcc/ada/types.h
|
|
|
4dd737 |
+++ gcc/ada/types.h
|
|
|
4dd737 |
@@ -79,8 +79,7 @@ typedef Char *Str_Ptr;
|
|
|
4dd737 |
/* Types for the fat pointer used for strings and the template it
|
|
|
4dd737 |
points to. */
|
|
|
4dd737 |
typedef struct {int Low_Bound, High_Bound; } String_Template;
|
|
|
4dd737 |
-typedef struct {const char *Array; String_Template *Bounds; }
|
|
|
4dd737 |
- __attribute ((aligned (sizeof (char *) * 2))) Fat_Pointer;
|
|
|
4dd737 |
+typedef struct {const char *Array; String_Template *Bounds; } Fat_Pointer;
|
|
|
4dd737 |
|
|
|
4dd737 |
/* Types for Node/Entity Kinds: */
|
|
|
4dd737 |
|