public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1524] [Ada] Vxworks7* - Makefile.rtl rtp vs rtp-smp cleanup
@ 2022-07-06 13:30 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-07-06 13:30 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:35e0aa2df74f2ce1e6d593e699cd7b9e81b9e2ee

commit r13-1524-g35e0aa2df74f2ce1e6d593e699cd7b9e81b9e2ee
Author: Doug Rupp <rupp@adacore.com>
Date:   Wed Jun 8 13:32:51 2022 -0700

    [Ada] Vxworks7* - Makefile.rtl rtp vs rtp-smp cleanup
    
    Only smp runtimes are built for vxworks7*, even though the -smp suffix
    is removed during install. Therefore, in general, the build macros for
    the non-smp runtimes are superfluous except on the legacy ppc-vxworks6
    target where both the smp and non-smp runtime are built.  Lastly, an
    error message is added if a runtime build is commanded that doesn't
    exist, rather then letting the build mysteriously fail.
    
    gcc/ada/
    
            * Makefile.rtl [arm,aarch64 vxworks7]: Remove rtp and kernel
            build macros and set an error variable if needed.
            [x86,x86_vxworks7]: Likewise.
            [ppc,ppc64]: Set an error variable if needed.
            (rts-err): New phony Makefile target.
            (setup-rts): Depend on rts-err.

Diff:
---
 gcc/ada/Makefile.rtl | 74 ++++++++++++++++++----------------------------------
 1 file changed, 25 insertions(+), 49 deletions(-)

diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 002d425cad5..3ae4e23d414 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -1124,6 +1124,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworks7%, $(target_cpu) $(targe
 
   EH_MECHANISM=-gcc
 
+  # The rtp and kernel sections must be retained for the sake of ppc-vx6
   ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
     LIBGNAT_TARGET_PAIRS += \
     s-vxwext.ads<libgnarl/s-vxwext__rtp.ads \
@@ -1153,15 +1154,15 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworks7%, $(target_cpu) $(targe
 
         EXTRA_LIBGNAT_OBJS+=affinity.o
       else
-        LIBGNAT_TARGET_PAIRS += \
-        s-interr.adb<libgnarl/s-interr__vxworks.adb \
-        s-tpopsp.adb<libgnarl/s-tpopsp__vxworks.adb
-
         ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
           LIBGNAT_TARGET_PAIRS += \
+          s-interr.adb<libgnarl/s-interr__vxworks.adb \
+          s-tpopsp.adb<libgnarl/s-tpopsp__vxworks.adb \
           s-vxwext.ads<libgnarl/s-vxwext__kernel.ads \
           s-vxwext.adb<libgnarl/s-vxwext__kernel.adb \
           system.ads<libgnat/$(SVX)-$(ARCH_STR)-kernel.ads
+        else
+          RTSERR = $(error NO SUCH RUNTIME)
         endif
       endif
       EXTRA_GNATRTL_NONTASKING_OBJS+=i-vxinco.o i-vxwork.o i-vxwoio.o
@@ -1257,48 +1258,31 @@ ifeq ($(strip $(filter-out %86 x86_64 wrs vxworks7%, $(target_cpu) $(target_vend
 
   GNATLIBCFLAGS_FOR_C := $(GNATLIBCFLAGS_FOR_C) -D__VXSIM_CPU__=$(VXSIM_CPU)
 
-  ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),)
+  ifeq ($(strip $(filter-out rtp-smp, $(THREAD_KIND))),)
     LIBGNAT_TARGET_PAIRS += \
+    s-mudido.adb<libgnarl/s-mudido__affinity.adb \
     s-vxwext.ads<libgnarl/s-vxwext__rtp.ads \
-    s-vxwext.adb<libgnarl/s-vxwext__rtp.adb \
-    s-tpopsp.adb<libgnarl/s-tpopsp__vxworks-rtp.adb \
-    system.ads<libgnat/system-vxworks7-x86-rtp.ads
+    s-vxwext.adb<libgnarl/s-vxwext__rtp-smp.adb \
+    s-tpopsp.adb<libgnarl/s-tpopsp__vxworks-tls.adb \
+    system.ads<libgnat/system-vxworks7-$(X86CPU)-rtp-smp.ads
+
+    EXTRA_LIBGNAT_OBJS+=affinity.o
   else
-    ifeq ($(strip $(filter-out rtp-smp, $(THREAD_KIND))),)
+    ifeq ($(strip $(filter-out kernel-smp, $(THREAD_KIND))),)
       LIBGNAT_TARGET_PAIRS += \
+      s-interr.adb<libgnarl/s-interr__vxworks.adb \
       s-mudido.adb<libgnarl/s-mudido__affinity.adb \
-      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/system-vxworks7-$(X86CPU)-rtp-smp.ads
+      s-vxwext.ads<libgnarl/s-vxwext__kernel.ads \
+      s-vxwext.adb<libgnarl/s-vxwext__kernel-smp.adb \
+      system.ads<libgnat/system-vxworks7-$(X86CPU)-kernel.ads
 
       EXTRA_LIBGNAT_OBJS+=affinity.o
     else
-      ifeq ($(strip $(filter-out kernel-smp, $(THREAD_KIND))),)
-        LIBGNAT_TARGET_PAIRS += \
-        s-interr.adb<libgnarl/s-interr__vxworks.adb \
-        s-mudido.adb<libgnarl/s-mudido__affinity.adb \
-        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/system-vxworks7-$(X86CPU)-kernel.ads
-
-        EXTRA_LIBGNAT_OBJS+=affinity.o
-      else
-        LIBGNAT_TARGET_PAIRS += \
-        s-interr.adb<libgnarl/s-interr__vxworks.adb \
-        s-tpopsp.adb<libgnarl/s-tpopsp__vxworks.adb
-
-        ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
-          LIBGNAT_TARGET_PAIRS += \
-          s-vxwext.ads<libgnarl/s-vxwext__kernel.ads \
-          s-vxwext.adb<libgnarl/s-vxwext__kernel.adb \
-          system.ads<libgnat/system-vxworks7-x86-kernel.ads
-        endif
-      endif
-
-      EXTRA_GNATRTL_NONTASKING_OBJS += i-vxinco.o i-vxwork.o i-vxwoio.o
+      RTSERR = $(error NO SUCH RUNTIME)
     endif
+
+    EXTRA_GNATRTL_NONTASKING_OBJS += i-vxinco.o i-vxwork.o i-vxwoio.o
   endif
 
   EXTRA_GNATRTL_NONTASKING_OBJS += s-stchop.o
@@ -1385,18 +1369,7 @@ ifeq ($(strip $(filter-out aarch64 arm wrs vxworks7%, $(target_cpu) $(target_ven
       EXTRA_LIBGNAT_OBJS+=$(SIGTRAMP_OBJ)
       EXTRA_LIBGNAT_SRCS+=$(VX_SIGTRAMP_EXTRA_SRCS)
     else
-      LIBGNAT_TARGET_PAIRS += \
-      s-tpopsp.adb<libgnarl/s-tpopsp__vxworks.adb \
-      system.ads<libgnat/system-vxworks7-$(ARCH_STR).ads
-
-      ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
-        LIBGNAT_TARGET_PAIRS += \
-        s-vxwext.ads<libgnarl/s-vxwext__kernel.ads \
-        s-vxwext.adb<libgnarl/s-vxwext__kernel.adb
-
-        EXTRA_LIBGNAT_OBJS+=$(SIGTRAMP_OBJ)
-        EXTRA_LIBGNAT_SRCS+=$(VX_SIGTRAMP_EXTRA_SRCS)
-      endif
+      RTSERR = $(error NO SUCH RUNTIME)
     endif
   endif
 
@@ -2879,7 +2852,10 @@ ADA_EXCLUDE_FILES=$(filter-out \
   $(patsubst %$(objext),%.adb,$(GNATRTL_OBJS)), \
   $(ADA_EXCLUDE_SRCS))
 
-setup-rts: force
+.PHONY: rts-err
+rts-err: ; $(RTSERR)
+
+setup-rts: rts-err force
 	$(RMDIR) $(RTSDIR)
 	$(MKDIR) $(RTSDIR)
 	$(CHMOD) u+w $(RTSDIR)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-06 13:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-06 13:30 [gcc r13-1524] [Ada] Vxworks7* - Makefile.rtl rtp vs rtp-smp cleanup Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).