aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-04-27 11:48:45 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2017-04-27 11:48:45 +0200
commit6cbfce7e87651d5e7272bad48dfc63e71c1bb27a (patch)
tree1b8bba33017bf56868f71410e9917dde0ac8c621 /gcc/ada/gcc-interface
parentde3b531c9aa93592f98ebd99c6b35be632e3c1b3 (diff)
downloadgcc-6cbfce7e87651d5e7272bad48dfc63e71c1bb27a.zip
gcc-6cbfce7e87651d5e7272bad48dfc63e71c1bb27a.tar.gz
gcc-6cbfce7e87651d5e7272bad48dfc63e71c1bb27a.tar.bz2
[multiple changes]
2017-04-27 Claire Dross <dross@adacore.com> * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to modifications in functional containers. * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat to improve readablity. Subprograms are separated between basic operations, constructors and properties. Universally quantified formulas in contracts are factorized in independant functions with a name and a comment. Names of parameters are improved. 2017-04-27 Gary Dismukes <dismukes@adacore.com> * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix. 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com> * sem_res.adb (Resolve_Type_Conversion): Do not install a predicate check here since this is already done during the expansion phase. Verify whether the operand satisfies the static predicate (if any) of the target type. * sem_ch3.adb (Analyze_Object_Declaration): Do not install a predicate check if the object is initialized by means of a type conversion because the conversion is subjected to the same check. 2017-04-27 Tristan Gingold <gingold@adacore.com> * raise.c (__gnat_builtin_longjmp): Remove. (__gnat_bracktrace): Add a dummy definition for the compiler (__gnat_eh_personality, __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19, __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30, __gnat_rcheck_31, __gnat_rcheck_32): Likewise. * a-exexpr.adb: Renamed from a-exexpr-gcc.adb * a-except.ads, a-except.adb: Renamed from a-except-2005.ads and a-except-2005.adb. * raise-gcc.c: Allow build in compiler, compiled as a C++ file. (__gnat_Unwind_ForcedUnwind): Adjust prototype. (db): Constify msg_format. (get_call_site_action_for): Don't use void arithmetic. * system.ads (Frontend_Exceptions): Set to False. (ZCX_By_Default): Set to True. (GCC_ZC_Support): Set to True. * gcc-interface/Makefile.in: No more variants for a-exexpr.adb and a-except.ad[sb]. * gcc-interface/Make-lang.in: Add support for backend zcx exceptions in gnat1 and gnatbind. * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o, s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o * s-excmac.ads, s-excmac.adb: Copy of variants. * a-except.o: Adjust preequisites. Add handling of s-excmac-arm.adb and s-excmac-gcc.adb. From-SVN: r247301
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r--gcc/ada/gcc-interface/Make-lang.in34
-rw-r--r--gcc/ada/gcc-interface/Makefile.in20
2 files changed, 36 insertions, 18 deletions
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index eb0489b..10c865f 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -99,6 +99,8 @@ ADA_TOOLS=gnatbind gnatchop gnat gnatkr gnatlink gnatls gnatmake \
ada-warn = $(ADA_CFLAGS) $(filter-out -pedantic, $(STRICT_WARN))
# Unresolved warnings in specific files.
ada/adaint.o-warn = -Wno-error
+# For unwind-pe.h
+CFLAGS-ada/raise-gcc.o += -I$(srcdir)/../libgcc -Iinclude
ada/%.o: ada/gcc-interface/%.c
$(COMPILE) $<
@@ -223,6 +225,7 @@ GCC_LLINK=$(LLINKER) $(GCC_LINKERFLAGS) $(LDFLAGS)
# Object files for gnat1 from C sources.
GNAT1_C_OBJS = ada/adadecode.o ada/adaint.o ada/argv.o ada/cio.o \
ada/cstreams.o ada/env.o ada/init.o ada/initialize.o ada/raise.o \
+ ada/raise-gcc.o \
ada/seh_init.o ada/targext.o ada/cuintp.o ada/decl.o ada/rtfinal.o \
ada/rtinit.o ada/misc.o ada/utils.o ada/utils2.o ada/trans.o ada/targtyps.o
@@ -232,6 +235,7 @@ GNAT_ADA_OBJS = \
ada/a-chlat1.o \
ada/a-elchha.o \
ada/a-except.o \
+ ada/a-exctra.o \
ada/a-ioexce.o \
ada/ada.o \
ada/spark_xrefs.o \
@@ -334,6 +338,7 @@ GNAT_ADA_OBJS = \
ada/rident.o \
ada/rtsfind.o \
ada/s-addope.o \
+ ada/s-addima.o \
ada/s-assert.o \
ada/s-bitops.o \
ada/s-carun8.o \
@@ -351,9 +356,11 @@ GNAT_ADA_OBJS = \
ada/s-excdeb.o \
ada/s-except.o \
ada/s-exctab.o \
+ ada/s-excmac.o \
ada/s-htable.o \
ada/s-imenne.o \
ada/s-imgenu.o \
+ ada/s-imgint.o \
ada/s-mastop.o \
ada/s-memory.o \
ada/s-os_lib.o \
@@ -372,7 +379,9 @@ GNAT_ADA_OBJS = \
ada/s-strhas.o \
ada/s-string.o \
ada/s-strops.o \
+ ada/s-traceb.o \
ada/s-traent.o \
+ ada/s-trasym.o \
ada/s-unstyp.o \
ada/s-utf_32.o \
ada/s-valint.o \
@@ -381,6 +390,7 @@ GNAT_ADA_OBJS = \
ada/s-wchcnv.o \
ada/s-wchcon.o \
ada/s-wchjis.o \
+ ada/s-wchstw.o \
ada/scans.o \
ada/scil_ll.o \
ada/scn.o \
@@ -514,6 +524,7 @@ GNATBIND_OBJS = \
ada/osint.o \
ada/output.o \
ada/raise.o \
+ ada/raise-gcc.o \
ada/restrict.o \
ada/rident.o \
ada/rtfinal.o \
@@ -534,10 +545,12 @@ GNATBIND_OBJS = \
ada/s-crtl.o \
ada/s-excdeb.o \
ada/s-except.o \
+ ada/s-excmac.o \
ada/s-exctab.o \
ada/s-htable.o \
ada/s-imenne.o \
ada/s-imgenu.o \
+ ada/s-imgint.o \
ada/s-mastop.o \
ada/s-memory.o \
ada/s-os_lib.o \
@@ -555,11 +568,13 @@ GNATBIND_OBJS = \
ada/s-string.o \
ada/s-strops.o \
ada/s-traent.o \
+ ada/s-traceb.o \
ada/s-unstyp.o \
ada/s-utf_32.o \
ada/s-wchcnv.o \
ada/s-wchcon.o \
ada/s-wchjis.o \
+ ada/s-wchstw.o \
ada/scans.o \
ada/scil_ll.o \
ada/scng.o \
@@ -594,6 +609,21 @@ ADA_BACKEND = $(BACKEND) attribs.o
# List of target dependent sources, overridden below as necessary
TARGET_ADA_SRCS =
+# Select the right s-excmac according to exception layout (Itanium or arm)
+host_cpu=$(word 1, $(subst -, ,$(host)))
+EH_MECHANISM=-gcc
+ifeq ($(strip $(filter-out arm%,$(host_cpu))),)
+EH_MECHANISM=-arm
+endif
+
+ada/s-excmac.o: ada/s-excmac.ads ada/s-excmac.adb
+
+ada/s-excmac.ads: $(srcdir)/ada/s-excmac$(EH_MECHANISM).ads
+ $(CP) $< $@
+
+ada/s-excmac.adb: $(srcdir)/ada/s-excmac$(EH_MECHANISM).adb
+ $(CP) $< $@
+
# Needs to be built with CC=gcc
# Since the RTL should be built with the latest compiler, remove the
# stamp target in the parent directory whenever gnat1 is rebuilt
@@ -976,12 +1006,12 @@ ada/sdefault.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
# Special flags - see gcc-interface/Makefile.in for the template.
-ada/a-except.o : ada/a-except.adb ada/a-except.ads
+ada/a-except.o : ada/a-except.adb ada/a-except.ads ada/s-excmac.ads ada/s-excmac.adb
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \
$(ADA_INCLUDES) $< $(OUTPUT_OPTION)
@$(ADA_DEPS)
-ada/s-excdeb.o : ada/s-excdeb.adb ada/s-excdeb.ads
+ada/s-excdeb.o : ada/s-excdeb.adb ada/s-excdeb.ads
$(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 \
$(ADA_INCLUDES) $< $(OUTPUT_OPTION)
@$(ADA_DEPS)
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index 14269e2..b65ec2c 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -2427,32 +2427,20 @@ endif
ifeq ($(EH_MECHANISM),-gcc)
LIBGNAT_TARGET_PAIRS += \
- a-exexpr.adb<a-exexpr-gcc.adb \
- s-excmac.ads<s-excmac-gcc.ads
+ s-excmac.ads<s-excmac-gcc.ads \
+ s-excmac.adb<s-excmac-gcc.adb
EXTRA_LIBGNAT_OBJS+=raise-gcc.o
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
+ s-excmac.ads<s-excmac-arm.ads \
+ s-excmac.adb<s-excmac-arm.adb
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.
-# These base versions lack Ada 2005 additions which would cause bootstrap
-# problems if included in the compiler and other basic tools.
-
-ifeq ($(filter a-except%,$(LIBGNAT_TARGET_PAIRS)),)
- LIBGNAT_TARGET_PAIRS += \
- a-except.ads<a-except-2005.ads \
- a-except.adb<a-except-2005.adb
-endif
-
# Configuration of host tools
# Under linux, host tools need to be linked with -ldl