From: Pierre-Marie de Rodat <derodat@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Doug Rupp <rupp@adacore.com>
Subject: [Ada] Vxworks7* - Makefile.rtl rtp vs rtp-smp cleanup
Date: Wed, 6 Jul 2022 13:31:23 +0000 [thread overview]
Message-ID: <20220706133123.GA2203130@adacore.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 730 bytes --]
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.
Tested on x86_64-pc-linux-gnu, committed on trunk
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.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 5020 bytes --]
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
--- 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)
reply other threads:[~2022-07-06 13:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220706133123.GA2203130@adacore.com \
--to=derodat@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rupp@adacore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).