Cleanups.
authorArnaud Charlet <charlet@adacore.com>
Mon, 4 Jul 2016 12:47:30 +0000 (12:47 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 4 Jul 2016 12:47:30 +0000 (14:47 +0200)
From-SVN: r237977

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

index 92032ab..44ee116 100644 (file)
@@ -1,3 +1,7 @@
+2016-07-04  Arnaud Charlet  <charlet@adacore.com>
+
+       * gcc-interface/Makefile.in: Cleanups.
+
 2016-07-04  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_attr.adb (Analyze_Attribute_Old_Result): The attributes can
index 8996dd1..0df7f89 100644 (file)
@@ -444,6 +444,15 @@ EXTRA_LIBGNAT_OBJS=
 # specific header files required to rebuild the runtime library from sources.
 EXTRA_LIBGNAT_SRCS=
 
+# Subsets of extra libgnat sources that always go together
+VX_SIGTRAMP_EXTRA_SRCS=sigtramp.h sigtramp-vxworks-target.inc
+
+# Additional object files that should go in the same directory as libgnat,
+# aside the library itself. Typically useful for crtbegin/crtend kind of files.
+EXTRA_ADALIB_OBJS=
+
+VX_CRTBE_EXTRA_ADALIB_OBJS=vx_crtbegin.o vx_crtbegin_auto.o vx_crtend.o
+
 # GCC spec files to be installed in $(libsubdir), so --specs=<spec-filename>
 # finds them at runtime. Sequences of alphanum characters prefixed with '_' in
 # the filename are stripped off at installation time. This is used to strip
@@ -571,7 +580,6 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworks7,$(target_cpu) $(target_
     system.ads<system-vxworks-$(ARCH_STR)-rtp.ads
 
     EH_MECHANISM=-gcc
-    EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o
   else
     ifeq ($(strip $(filter-out rtp-smp,$(THREAD_KIND))),)
       LIBGNAT_TARGET_PAIRS += \
@@ -582,8 +590,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworks7,$(target_cpu) $(target_
       system.ads<$(SVX)-$(ARCH_STR)-rtp-smp.ads
 
       EH_MECHANISM=-gcc
-      EXTRA_LIBGNAT_OBJS+=affinity.o sigtramp-vxworks.o
-      EXTRA_LIBGNAT_SRCS+=sigtramp.h
+      EXTRA_LIBGNAT_OBJS+=affinity.o
     else
       ifeq ($(strip $(filter-out kernel-smp,$(THREAD_KIND))),)
         LIBGNAT_TARGET_PAIRS += \
@@ -613,8 +620,6 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworks7,$(target_cpu) $(target_
         endif
       endif
       EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
-      EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o
-      EXTRA_LIBGNAT_SRCS+=sigtramp.h
     endif
   endif
 
@@ -622,8 +627,11 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworks7,$(target_cpu) $(target_
 
   EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
 
+  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-$(ARCH_STR)-link.spec
-  GCC_SPEC_FILES+=vxworks-crtbe-link.spec
 endif
 
 # PowerPC and e500v2 VxWorks 653
@@ -661,6 +669,8 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(target_cpu) $(target_vendor)
   $(ATOMICS_TARGET_PAIRS) \
   $(ATOMICS_BUILTINS_TARGET_PAIRS)
 
+  EH_MECHANISM=-gcc
+
   TOOLS_TARGET_PAIRS=\
   mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
   indepsw.adb<indepsw-gnu.adb
@@ -669,7 +679,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(target_cpu) $(target_vendor)
   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
 
   EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o
-  EXTRA_LIBGNAT_SRCS+=sigtramp.h
+  EXTRA_LIBGNAT_SRCS+=$(VX_SIGTRAMP_EXTRA_SRCS)
 
   # Extra pairs for the vthreads runtime
   ifeq ($(strip $(filter-out vthreads,$(THREAD_KIND))),)
@@ -712,6 +722,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksmils,$(target_cpu) $(target_vendo
   s-osinte.adb<s-osinte-vxworks.adb \
   s-osinte.ads<s-osinte-vxworks.ads \
   s-osprim.adb<s-osprim-vxworks.adb \
+  s-osvers.ads<s-osvers-vxworks-mils.ads \
   s-parame.ads<s-parame-ae653.ads \
   s-parame.adb<s-parame-vxworks.adb \
   s-stchop.adb<s-stchop-vxworks.adb \
@@ -720,7 +731,6 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksmils,$(target_cpu) $(target_vendo
   s-tasinf.ads<s-tasinf-vxworks.ads \
   s-taspri.ads<s-taspri-vxworks.ads \
   s-thread.adb<s-thread-ae653.adb \
-  s-osvers.ads<s-osvers-vxworks-mils.ads \
   s-tpopsp.adb<s-tpopsp-vxworks.adb \
   s-vxwork.ads<s-vxwork-ppc.ads \
   system.ads<system-vxworks-ppc-mils.ads \
@@ -735,8 +745,11 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksmils,$(target_cpu) $(target_vendo
   EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-thread.o s-osvers.o
   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
 
-  EXTRA_LIBGNAT_OBJS+=vx_stack_info.o sigtramp-vxworks.o
-  EXTRA_LIBGNAT_SRCS+=sigtramp.h
+  EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
+
+  EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o
+  EXTRA_LIBGNAT_SRCS+=$(VX_SIGTRAMP_EXTRA_SRCS)
+
   GNATRTL_SOCKETS_OBJS =
 
   ifeq ($(strip $(filter-out yes,$(TRACE))),)
@@ -777,6 +790,8 @@ ifeq ($(strip $(filter-out %86 wrs vxworksae,$(target_cpu) $(target_vendor) $(ta
   $(ATOMICS_TARGET_PAIRS) \
   $(ATOMICS_BUILTINS_TARGET_PAIRS)
 
+  EH_MECHANISM=-gcc
+
   TOOLS_TARGET_PAIRS=\
   mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
   indepsw.adb<indepsw-gnu.adb
@@ -865,21 +880,26 @@ ifeq ($(strip $(filter-out sparc% wrs vx%,$(target_cpu) $(target_vendor) $(targe
   EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
 endif
 
-# x86 VxWorks
-ifeq ($(strip $(filter-out %86 wrs vxworks vxworks7,$(target_cpu) $(target_vendor) $(target_os))),)
+# x86/x86_64 VxWorks
+ifeq ($(strip $(filter-out %86 x86_64 wrs vxworks vxworks7,$(target_cpu) $(target_vendor) $(target_os))),)
+
+  EH_MECHANISM=-gcc
 
   ifeq ($(strip $(filter-out vxworks7%, $(target_os))),)
      SVX=system-vxworks7
   else
      SVX=system-vxworks
-     EH_MECHANISM=-gcc
   endif
 
-  EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o sigtramp-vxworks-vxsim.o
-  EXTRA_LIBGNAT_OBJS+=init-vxsim.o
-  EXTRA_LIBGNAT_SRCS+=sigtramp.h sigtramp-vxworks-target.inc
+  ifeq ($(strip $(filter-out x86_64, $(target_cpu))),)
+     X86CPU=x86_64
+     LIBGNAT_TARGET_PAIRS=$(X86_64_TARGET_PAIRS)
+  else
+     X86CPU=x86
+     LIBGNAT_TARGET_PAIRS=$(X86_TARGET_PAIRS)
+  endif
 
-  LIBGNAT_TARGET_PAIRS = \
+  LIBGNAT_TARGET_PAIRS+= \
   a-intnam.ads<a-intnam-vxworks.ads \
   i-vxwork.ads<i-vxwork-x86.ads \
   s-osinte.adb<s-osinte-vxworks.adb \
@@ -900,7 +920,9 @@ ifeq ($(strip $(filter-out %86 wrs vxworks vxworks7,$(target_cpu) $(target_vendo
   g-socthi.adb<g-socthi-vxworks.adb \
   g-stsifd.adb<g-stsifd-sockets.adb \
   $(ATOMICS_TARGET_PAIRS) \
-  $(X86_TARGET_PAIRS)
+  $(CERTMATH_TARGET_PAIRS) \
+  $(CERTMATH_TARGET_PAIRS_SQRT_FPU) \
+  $(CERTMATH_TARGET_PAIRS_X86TRA)
 
   TOOLS_TARGET_PAIRS=\
   mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
@@ -933,23 +955,23 @@ ifeq ($(strip $(filter-out %86 wrs vxworks vxworks7,$(target_cpu) $(target_vendo
   # runtime to be called if a program is running on VxSim vs real hardware
   # (due to differences in signal context for unwinding).
 
-  VXSIM_CPU =
-
-  ifeq ($(strip $(filter-out vxworks rtp rtp-smp,$(target_os) $(THREAD_KIND))),)
+  ifneq ($(strip $(filter-out vxworks7, $(target_os))),)
+    ifeq ($(strip $(filter-out vxworks rtp rtp-smp,$(target_os) $(THREAD_KIND))),)
       VXSIM_CPU = SIMPENTIUM
-  else
-    ifeq ($(strip $(filter-out kernel kernel-smp rtp rtp-smp,$(THREAD_KIND))),)
-      ifeq ($(strip $(filter-out linux%,$(host_os))),)
-        # Linux
-        VXSIM_CPU = SIMLINUX
-      else
-        # Windows
-        VXSIM_CPU = SIMNT
+    else
+      ifeq ($(strip $(filter-out kernel kernel-smp rtp rtp-smp,$(THREAD_KIND))),)
+        ifeq ($(strip $(filter-out linux%,$(host_os))),)
+          # Linux
+          VXSIM_CPU = SIMLINUX
+        else
+          # Windows
+          VXSIM_CPU = SIMNT
+        endif
       endif
     endif
-  endif
 
-  GNATLIBCFLAGS_FOR_C := $(GNATLIBCFLAGS_FOR_C) -D__VXSIM_CPU__=$(VXSIM_CPU)
+    GNATLIBCFLAGS_FOR_C := $(GNATLIBCFLAGS_FOR_C) -D__VXSIM_CPU__=$(VXSIM_CPU)
+  endif
 
   ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
     # Runtime N/A for VxWorks7 (non-existent system file)
@@ -957,7 +979,7 @@ ifeq ($(strip $(filter-out %86 wrs vxworks vxworks7,$(target_cpu) $(target_vendo
     s-vxwext.ads<s-vxwext-rtp.ads \
     s-vxwext.adb<s-vxwext-rtp.adb \
     s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
-    system.ads<$(SVX)-x86-rtp.ads
+    system.ads<system-vxworks-x86-rtp.ads
   else
     ifeq ($(strip $(filter-out rtp-smp, $(THREAD_KIND))),)
       LIBGNAT_TARGET_PAIRS += \
@@ -965,7 +987,7 @@ ifeq ($(strip $(filter-out %86 wrs vxworks vxworks7,$(target_cpu) $(target_vendo
       s-vxwext.ads<s-vxwext-rtp.ads \
       s-vxwext.adb<s-vxwext-rtp-smp.adb \
       s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
-      system.ads<$(SVX)-x86-rtp-smp.ads
+      system.ads<$(SVX)-$(X86CPU)-rtp-smp.ads
 
       EXTRA_LIBGNAT_OBJS+=affinity.o
     else
@@ -976,7 +998,7 @@ ifeq ($(strip $(filter-out %86 wrs vxworks vxworks7,$(target_cpu) $(target_vendo
         s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
         s-vxwext.ads<s-vxwext-kernel.ads \
         s-vxwext.adb<s-vxwext-kernel-smp.adb \
-        system.ads<$(SVX)-x86-kernel.ads
+        system.ads<$(SVX)-$(X86CPU)-kernel.ads
 
         EXTRA_LIBGNAT_OBJS+=affinity.o
       else
@@ -999,12 +1021,21 @@ ifeq ($(strip $(filter-out %86 wrs vxworks vxworks7,$(target_cpu) $(target_vendo
       EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
     endif
   endif
+
+  EXTRA_GNATRTL_NONTASKING_OBJS += \
+    $(CERTMATH_GNATRTL_OBJS) $(CERTMATH_GNATRTL_X86TRA_OBJS)
   EXTRA_GNATRTL_TASKING_OBJS += s-vxwork.o s-vxwext.o
 
   EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
 
+  EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o
+  EXTRA_LIBGNAT_SRCS+=$(VX_SIGTRAMP_EXTRA_SRCS)
+
+  EXTRA_ADALIB_OBJS+=$(VX_CRTBE_EXTRA_ADALIB_OBJS)
+  EXTRA_LIBGNAT_SRCS+=vx_crtbegin.inc
+  GCC_SPEC_FILES+=vxworks-gnat-crtbe-link.spec
+
   ifneq ($(strip $(filter-out vxworks7%, $(target_os))),)
-    GCC_SPEC_FILES+=vxworks-crtbe-link.spec
     GCC_SPEC_FILES+=vxworks-x86-link.spec
     GCC_SPEC_FILES+=vxworks-cert-x86-link.spec
     GCC_SPEC_FILES+=vxworks-smp-x86-link.spec
@@ -1016,8 +1047,12 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
 
   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
 
   LIBGNAT_TARGET_PAIRS = \
@@ -1047,8 +1082,6 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
   indepsw.adb<indepsw-gnu.adb
 
   ifeq ($(strip $(filter-out rtp-smp,$(THREAD_KIND))),)
-    EH_MECHANISM=-gcc
-
     LIBGNAT_TARGET_PAIRS += \
     s-mudido.adb<s-mudido-affinity.adb \
     s-vxwext.ads<s-vxwext-rtp.ads \
@@ -1056,35 +1089,35 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
     s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
     system.ads<$(SVX)-arm-rtp-smp.ads
 
-    EXTRA_LIBGNAT_OBJS+=affinity.o sigtramp-vxworks.o
-    EXTRA_LIBGNAT_SRCS+=sigtramp.h
+    EXTRA_LIBGNAT_OBJS+=affinity.o
+
+    EXTRA_LIBGNAT_OBJS+=$(SIGTRAMP_OBJ)
+    EXTRA_LIBGNAT_SRCS+=$(VX_SIGTRAMP_EXTRA_SRCS)
   else
     ifeq ($(strip $(filter-out kernel-smp,$(THREAD_KIND))),)
-      EH_MECHANISM=-gcc
-
       LIBGNAT_TARGET_PAIRS += \
       s-mudido.adb<s-mudido-affinity.adb \
       s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
       s-vxwext.ads<s-vxwext-kernel.ads \
       s-vxwext.adb<s-vxwext-kernel-smp.adb \
-      system.ads<system-vxworks-arm.ads
+      system.ads<$(SVX)-arm.ads
+
+      EXTRA_LIBGNAT_OBJS+=affinity.o
 
-      EXTRA_LIBGNAT_OBJS+=affinity.o sigtramp-vxworks.o
-      EXTRA_LIBGNAT_SRCS+=sigtramp.h
+      EXTRA_LIBGNAT_OBJS+=$(SIGTRAMP_OBJ)
+      EXTRA_LIBGNAT_SRCS+=$(VX_SIGTRAMP_EXTRA_SRCS)
     else
       LIBGNAT_TARGET_PAIRS += \
       s-tpopsp.adb<s-tpopsp-vxworks.adb \
-      system.ads<system-vxworks-arm.ads
+      system.ads<$(SVX)-arm.ads
 
       ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
-        EH_MECHANISM=-gcc
-
         LIBGNAT_TARGET_PAIRS += \
         s-vxwext.ads<s-vxwext-kernel.ads \
         s-vxwext.adb<s-vxwext-kernel.adb
 
-        EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o
-        EXTRA_LIBGNAT_SRCS+=sigtramp.h
+        EXTRA_LIBGNAT_OBJS+=$(SIGTRAMP_OBJ)
+        EXTRA_LIBGNAT_SRCS+=$(VX_SIGTRAMP_EXTRA_SRCS)
       endif
     endif
   endif
@@ -1094,9 +1127,14 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
 
   EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
 
-  GCC_SPEC_FILES+=vxworks-crtbe-link.spec
-  GCC_SPEC_FILES+=vxworks-arm-link.spec
-  GCC_SPEC_FILES+=vxworks-smp-arm-link.spec
+  ifneq (-arm,$(EH_MECHANISM))
+    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
+  endif
 endif
 
 # MIPS VxWorks
@@ -1138,7 +1176,10 @@ ifeq ($(strip $(filter-out mips% wrs vx%,$(target_cpu) $(target_vendor) $(target
     s-vxwext.adb<s-vxwext-rtp-smp.adb \
     s-tpopsp.adb<s-tpopsp-vxworks-tls.adb
 
-    EXTRA_LIBGNAT_OBJS+=affinity.o sigtramp-vxworks.o
+    EXTRA_LIBGNAT_OBJS+=affinity.o
+
+    EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o
+    EXTRA_LIBGNAT_SRCS+=$(VX_SIGTRAMP_EXTRA_SRCS)
   else
     ifeq ($(strip $(filter-out kernel-smp,$(THREAD_KIND))),)
       LIBGNAT_TARGET_PAIRS += \
@@ -1179,17 +1220,15 @@ ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
   s-taprop.adb<s-taprop-posix.adb \
   s-taspri.ads<s-taspri-posix.ads \
   s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
-  system.ads<system-linux-armel.ads \
-  a-exexpr.adb<a-exexpr-gcc.adb \
-  s-excmac.ads<s-excmac-arm.ads
+  system.ads<system-linux-armel.ads
 
   TOOLS_TARGET_PAIRS =  \
     mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
     indepsw.adb<indepsw-gnu.adb
 
   EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
-  EXTRA_LIBGNAT_OBJS+=raise-gcc.o sigtramp-armdroid.o
-  EXTRA_GNATRTL_NONTASKING_OBJS+=g-cppexc.o s-excmac.o
+  EXTRA_LIBGNAT_OBJS+=sigtramp-armdroid.o
+  EXTRA_LIBGNAT_SRCS+=sigtramp.h
   EH_MECHANISM=-arm
   THREADSLIB =
   GNATLIB_SHARED = gnatlib-shared-dual
@@ -1980,9 +2019,7 @@ ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),)
   else
     EH_MECHANISM=-arm
     LIBGNAT_TARGET_PAIRS += \
-    system.ads<system-linux-armel.ads \
-    a-exexpr.adb<a-exexpr-gcc.adb \
-    s-excmac.ads<s-excmac-arm.ads
+    system.ads<system-linux-armel.ads
   endif
 
   TOOLS_TARGET_PAIRS =  \
@@ -1990,8 +2027,6 @@ ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),)
     indepsw.adb<indepsw-gnu.adb
 
   EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
-  EXTRA_LIBGNAT_OBJS+=raise-gcc.o
-  EXTRA_GNATRTL_NONTASKING_OBJS+=g-cppexc.o s-excmac.o
   THREADSLIB = -lpthread
   GNATLIB_SHARED = gnatlib-shared-dual
   GMEM_LIB = gmemlib
@@ -2348,6 +2383,8 @@ ifeq ($(strip $(filter-out darwin%,$(target_os))),)
     LIBGNAT_TARGET_PAIRS += \
       s-intman.adb<s-intman-susv3.adb \
       s-osprim.adb<s-osprim-darwin.adb \
+      a-exetim.ads<a-exetim-default.ads \
+      a-exetim.adb<a-exetim-darwin.adb \
       $(ATOMICS_TARGET_PAIRS)
 
     ifeq ($(strip $(MULTISUBDIR)),/i386)
@@ -2362,6 +2399,7 @@ ifeq ($(strip $(filter-out darwin%,$(target_os))),)
     endif
 
     EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
+    EXTRA_GNATRTL_TASKING_OBJS=a-exetim.o
   endif
 
   ifeq ($(strip $(filter-out powerpc%,$(target_cpu))),)
@@ -2401,6 +2439,8 @@ ifeq ($(strip $(filter-out darwin%,$(target_os))),)
       $(ATOMICS_TARGET_PAIRS) \
       $(ATOMICS_BUILTINS_TARGET_PAIRS)
 
+    EXTRA_LIBGNAT_OBJS+=sigtramp-ios.o
+    EXTRA_LIBGNAT_SRCS+=sigtramp.h
     LIBGNAT_TARGET_PAIRS += \
       system.ads<system-darwin-arm64.ads
   endif
@@ -2425,6 +2465,14 @@ ifeq ($(EH_MECHANISM),-gcc)
   EXTRA_GNATRTL_NONTASKING_OBJS+=g-cppexc.o s-excmac.o
 endif
 
+ifeq ($(EH_MECHANISM),-arm)
+  LIBGNAT_TARGET_PAIRS += \
+    a-exexpr.adb<a-exexpr-gcc.adb \
+    s-excmac.ads<s-excmac-arm.ads
+  EXTRA_LIBGNAT_OBJS+=raise-gcc.o
+  EXTRA_GNATRTL_NONTASKING_OBJS+=g-cppexc.o s-excmac.o
+endif
+
 # Use the Ada 2005 version of Ada.Exceptions by default, unless specified
 # explicitly already. The base files (a-except.ad?) are used only for building
 # the compiler and other basic tools.
@@ -2488,7 +2536,7 @@ ADA_EXCLUDE_SRCS =\
   g-allein.ads g-alleve.adb g-alleve.ads g-altcon.adb g-altcon.ads \
   g-altive.ads g-alveop.adb g-alveop.ads g-alvety.ads g-alvevi.ads \
   g-intpri.ads g-regist.adb g-regist.ads g-sse.ads    g-ssvety.ads \
-  i-vxwoio.adb i-vxwoio.ads i-vxwork.ads \
+  i-vxwoio.adb i-vxwoio.ads i-vxwork.ads i-bit_types.ads \
   s-bb.ads     s-bbbosu.ads s-bbcaco.ads s-bbcppr.ads s-bbexti.adb \
   s-bbexti.ads s-bbinte.adb s-bbinte.ads s-bbprot.adb s-bbprot.ads \
   s-bbsle3.ads s-bbsuer.ads s-bbsule.ads s-bbthqu.adb s-bbthqu.ads \
@@ -2499,8 +2547,8 @@ ADA_EXCLUDE_SRCS =\
   s-init.ads   s-init.adb   s-linux.ads  s-macres.ads \
   s-memcom.adb s-memcom.ads s-memmov.adb s-memmov.ads s-memset.adb \
   s-memset.ads s-mufalo.adb s-mufalo.ads s-musplo.adb s-musplo.ads \
-  s-sopco3.adb s-sopco3.ads s-sopco4.adb s-sopco4.ads \
-  s-sopco5.adb s-sopco5.ads s-stache.adb s-stache.ads \
+  s-sam4.ads   s-sopco3.adb s-sopco3.ads s-sopco4.adb s-sopco4.ads \
+  s-sopco5.adb s-sopco5.ads s-stache.adb s-stache.ads s-stm32.ads \
   s-strcom.adb s-strcom.ads s-thread.ads \
   s-vxwexc.adb s-vxwexc.ads s-vxwext.adb s-vxwext.ads \
   s-win32.ads  s-winext.ads
@@ -2686,7 +2734,7 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR) install-gcc-specs
            $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
            $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
        done
-       -$(foreach file, $(EXTRA_ADALIB_FILES), \
+       -$(foreach file, $(EXTRA_ADALIB_OBJS), \
            $(INSTALL_DATA_DATE) $(RTSDIR)/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
        ) true
 #     Install the shared libraries, if any, using $(INSTALL) instead
@@ -2803,7 +2851,7 @@ gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-osc
                 CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
                FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
                srcdir=$(fsrcdir) \
-               -f ../Makefile $(LIBGNAT_OBJS)
+               -f ../Makefile $(LIBGNAT_OBJS) $(EXTRA_ADALIB_OBJS)
 # Ada files
        $(MAKE) -C $(RTSDIR) \
                CC="`echo \"$(GCC_FOR_TARGET)\" \
@@ -2858,6 +2906,16 @@ gnatlib-shared-default:
        cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
                libgnarl$(soext)
 
+       # Create static libgnat and libgnarl compiled with -fPIC
+       $(RM) $(RTSDIR)/libgnat_pic$(arext) $(RTSDIR)/libgnarl_pic$(arext)
+       $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnat_pic$(arext) \
+          $(addprefix $(RTSDIR)/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
+       $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnat_pic$(arext)
+       $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnarl_pic$(arext) \
+          $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS))
+       $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl_pic$(arext)
+
+
 gnatlib-shared-dual:
        $(MAKE) $(FLAGS_TO_PASS) \
              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
@@ -2867,6 +2925,8 @@ gnatlib-shared-dual:
             THREAD_KIND="$(THREAD_KIND)" \
              gnatlib-shared-default
        $(MV) $(RTSDIR)/libgna*$(soext) .
+       $(MV) $(RTSDIR)/libgnat_pic$(arext) .
+       $(MV) $(RTSDIR)/libgnarl_pic$(arext) .
        $(RM) ../stamp-gnatlib2-$(RTSDIR)
        $(MAKE) $(FLAGS_TO_PASS) \
              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
@@ -2876,6 +2936,8 @@ gnatlib-shared-dual:
             THREAD_KIND="$(THREAD_KIND)" \
              gnatlib
        $(MV) libgna*$(soext) $(RTSDIR)
+       $(MV) libgnat_pic$(arext) $(RTSDIR)
+       $(MV) libgnarl_pic$(arext) $(RTSDIR)
 
 gnatlib-shared-dual-win32:
        $(MAKE) $(FLAGS_TO_PASS) \
@@ -2910,6 +2972,8 @@ gnatlib-shared-win32:
             THREAD_KIND="$(THREAD_KIND)" \
              gnatlib
        $(RM) $(RTSDIR)/libgna*$(soext)
+       $(CP) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnat_pic$(arext)
+       $(CP) $(RTSDIR)/libgnarl$(arext) $(RTSDIR)/libgnarl_pic$(arext)
        cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \
                 | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared -shared-libgcc \
                $(PICFLAG_FOR_TARGET) \
@@ -3106,8 +3170,10 @@ socket.o  : socket.c gsocket.h
 sysdep.o  : sysdep.c
 raise.o   : raise.c raise.h
 sigtramp-armdroid.o      : sigtramp-armdroid.c sigtramp.h
-sigtramp-vxworks.o       : sigtramp-vxworks.c sigtramp.h sigtramp-vxworks-target.inc
-sigtramp-vxworks-vxsim.o : sigtramp-vxworks-vxsim.c sigtramp.h sigtramp-vxworks-target.inc
+sigtramp-armvxworks.o    : sigtramp-armvxworks.c sigtramp.h
+sigtramp-ios.o           : sigtramp-ios.c sigtramp.h
+sigtramp-vxworks.o       : sigtramp-vxworks.c $(VX_SIGTRAMP_EXTRA_SRCS)
+sigtramp-vxworks-vxsim.o : sigtramp-vxworks-vxsim.c $(VX_SIGTRAMP_EXTRA_SRCS)
 terminals.o : terminals.c
 vx_stack_info.o : vx_stack_info.c
 
@@ -3124,6 +3190,21 @@ init.o    : init.c adaint.h raise.h
        $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
                 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
 
+vx_crtbegin.o : vx_crtbegin.c vx_crtbegin.inc
+       $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
+                -iquote $(srcdir) -iquote $(ftop_srcdir)/libgcc \
+                $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
+
+vx_crtbegin_auto.o : vx_crtbegin_auto.c vx_crtbegin.inc
+       $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
+                -iquote $(srcdir) -iquote $(ftop_srcdir)/libgcc \
+                $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
+
+vx_crtend.o : vx_crtend.c
+       $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
+                -iquote $(srcdir) -iquote $(ftop_srcdir)/libgcc \
+                $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
+
 init-vxsim.o : init-vxsim.c
        $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \
                 $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)