Makefile.in: Merge Aarch64 and ARM "ifeq" blocks.
authorDoug Rupp <rupp@adacore.com>
Thu, 16 Nov 2017 16:06:48 +0000 (16:06 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 16 Nov 2017 16:06:48 +0000 (16:06 +0000)
2017-11-16  Doug Rupp  <rupp@adacore.com>

* gcc-interface/Makefile.in: Merge Aarch64 and ARM "ifeq" blocks.

From-SVN: r254829

gcc/ada/ChangeLog
gcc/ada/gcc-interface/Makefile.in

index 080cd67ea823e6c978d088f012a3a24126abaaa9..28cfd17112b2de9ec369fb4b5827ae042d1d41d6 100644 (file)
@@ -1,3 +1,7 @@
+2017-11-16  Doug Rupp  <rupp@adacore.com>
+
+       * gcc-interface/Makefile.in: Merge Aarch64 and ARM "ifeq" blocks.
+
 2017-11-16  Steve Baird  <baird@adacore.com>
 
        * debug.adb: Update another comment to indicate gnat2scil's use of the
index 749dbbfec4751d5ed721cf1cede74399b7170717..db67dcbf1879a92929a8500cd7479192b7e840f9 100644 (file)
@@ -763,17 +763,29 @@ ifeq ($(strip $(filter-out %86 x86_64 wrs vxworks vxworks7,$(target_cpu) $(targe
   endif
 endif
 
-# ARM VxWorks
-ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
+# ARM and Aarch64 VxWorks
+ifeq ($(strip $(filter-out aarch64 arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
 
-  ifeq ($(strip $(filter-out vxworks7%, $(target_os))),)
-     SVX=system-vxworks7
-     EH_MECHANISM=-arm
-     SIGTRAMP_OBJ=sigtramp-armvxworks.o
+  ifeq ($(strip $(filter-out aarch64, $(target_cpu))),)
+    ARCH_STR=aarch64
+    SVX=system-vxworks7
+    EH_MECHANISM=-gcc
+    SIGTRAMP_OBJ=sigtramp-vxworks.o
   else
-     SVX=system-vxworks
-     EH_MECHANISM=-gcc
-     SIGTRAMP_OBJ=sigtramp-vxworks.o
+    ifeq ($(strip $(filter-out arm%, $(target_cpu))),)
+      ARCH_STR=arm
+      ifeq ($(strip $(filter-out vxworks7%, $(target_os))),)
+        SVX=system-vxworks7
+        EH_MECHANISM=-arm
+        SIGTRAMP_OBJ=sigtramp-armvxworks.o
+      else
+        SVX=system-vxworks
+        EH_MECHANISM=-gcc
+        SIGTRAMP_OBJ=sigtramp-vxworks.o
+      endif
+    else
+      ARCH_STR=coff
+    endif
   endif
 
   LIBGNAT_TARGET_PAIRS = \
@@ -793,7 +805,7 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
   s-taprop.adb<libgnarl/s-taprop__vxworks.adb \
   s-tasinf.ads<libgnarl/s-tasinf__vxworks.ads \
   s-taspri.ads<libgnarl/s-taspri__vxworks.ads \
-  s-vxwork.ads<libgnarl/s-vxwork__arm.ads \
+  s-vxwork.ads<libgnarl/s-vxwork__$(ARCH_STR).ads \
   g-socthi.ads<libgnat/g-socthi__vxworks.ads \
   g-socthi.adb<libgnat/g-socthi__vxworks.adb \
   g-stsifd.adb<libgnat/g-stsifd__sockets.adb
@@ -806,7 +818,7 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
     s-vxwext.ads<libgnarl/s-vxwext__rtp.ads \
     s-vxwext.adb<libgnarl/s-vxwext__rtp-smp.adb \
     s-tpopsp.adb<libgnarl/s-tpopsp__vxworks-tls.adb \
-    system.ads<libgnat/$(SVX)-arm-rtp-smp.ads
+    system.ads<libgnat/$(SVX)-$(ARCH_STR)-rtp-smp.ads
 
     EXTRA_LIBGNAT_OBJS+=affinity.o
 
@@ -819,7 +831,7 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
       s-tpopsp.adb<libgnarl/s-tpopsp__vxworks-tls.adb \
       s-vxwext.ads<libgnarl/s-vxwext__kernel.ads \
       s-vxwext.adb<libgnarl/s-vxwext__kernel-smp.adb \
-      system.ads<libgnat/$(SVX)-arm.ads
+      system.ads<libgnat/$(SVX)-$(ARCH_STR).ads
 
       EXTRA_LIBGNAT_OBJS+=affinity.o
 
@@ -828,7 +840,7 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
     else
       LIBGNAT_TARGET_PAIRS += \
       s-tpopsp.adb<libgnarl/s-tpopsp__vxworks.adb \
-      system.ads<libgnat/$(SVX)-arm.ads
+      system.ads<libgnat/$(SVX)-$(ARCH_STR).ads
 
       ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
         LIBGNAT_TARGET_PAIRS += \
@@ -847,15 +859,20 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
 
   EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
 
-  ifeq ($(strip $(filter-out vxworks7%, $(target_os))),)
+  ifeq ($(strip $(filter-out arm vxworks7%, $(target_cpu) $(target_os))),)
     GCC_SPEC_FILES+=vxworks7-rtp-base-link.spec
   else
+    ifeq ($(strip $(filter-out aarch64, $(target_cpu))),)
+      GCC_SPEC_FILES+=vxworks7-rtp-base-link.spec
+    endif
     EXTRA_ADALIB_OBJS+=$(VX_CRTBE_EXTRA_ADALIB_OBJS)
     EXTRA_LIBGNAT_SRCS+=vx_crtbegin.inc
     GCC_SPEC_FILES+=vxworks-gnat-crtbe-link.spec
 
-    GCC_SPEC_FILES+=vxworks-arm-link.spec
-    GCC_SPEC_FILES+=vxworks-smp-arm-link.spec
+    ifneq ($(strip $(filter-out vxworks7%, $(target_os))),)
+      GCC_SPEC_FILES+=vxworks-arm-link.spec
+      GCC_SPEC_FILES+=vxworks-smp-arm-link.spec
+    endif
   endif
 endif