A standalong ifeq is added for selecting vxworks7r2 targets which
have shared gnatlib enabled.  The powerpc64 ifeq is moved here and
x86_64 is added to the filter list.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

        * Makefile.rtl: Add a new ifeq for vx7r2 shared gnatlib.
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -1200,13 +1200,6 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworksspe vxworks7% vxworks7spe
     GCC_SPEC_FILES+=vxworks-cert-$(ARCH_STR)-link.spec
     GCC_SPEC_FILES+=vxworks-smp-$(ARCH_STR)-link.spec
   endif
-
-  ifeq ($(strip $(filter-out vxworks7r2 powerpc64 rtp rtp-smp, $(target_os) $(target_cpu) $(THREAD_KIND))),)
-    # Shared libraries are only supported on PowerPC64, VxWorks7r2
-    # ATM.  Also this is disabled for kernel runtimes.
-    GNATLIB_SHARED = gnatlib-shared-dual
-    LIBRARY_VERSION := $(LIB_VERSION)
-  endif
 endif
 
 # PowerPC and e500v2 VxWorks 653
@@ -2973,6 +2966,13 @@ ifeq ($(strip $(filter-out linux%,$(target_os))),)
     g-sercom.adb<libgnat/g-sercom__linux.adb
 endif
 
+# Turn on shared gnatlib for specific vx7r2 targets for RTP runtimes. Once
+# all targets are ported the target_cpu selector can be removed.
+ifeq ($(strip $(filter-out vxworks7r2 powerpc64 x86_64 rtp rtp-smp, $(target_os) $(target_cpu) $(THREAD_KIND))),)
+    GNATLIB_SHARED = gnatlib-shared-dual
+    LIBRARY_VERSION := $(LIB_VERSION)
+endif
+
 LIBGNAT_TARGET_PAIRS += \
   interfac.ads<libgnat/interfac__2020.ads
 


Reply via email to