aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-10-20 17:06:52 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-10-20 17:06:52 +0200
commitdbb4cfef76186a547ac0c3ce1e0d895cd87685ec (patch)
tree384bb4169d12696247c049d5cbdb743d5cbb744b /gcc/ada/gcc-interface
parentc19273ff4a5cb466c7f5ac09336b066e8ba4ea28 (diff)
downloadgcc-dbb4cfef76186a547ac0c3ce1e0d895cd87685ec.zip
gcc-dbb4cfef76186a547ac0c3ce1e0d895cd87685ec.tar.gz
gcc-dbb4cfef76186a547ac0c3ce1e0d895cd87685ec.tar.bz2
[multiple changes]
2014-10-20 Robert Dewar <dewar@adacore.com> * sem_ch3.adb, prj-proc.adb, prj-proc.ads, prj-conf.adb: Minor reformatting. 2014-10-20 Robert Dewar <dewar@adacore.com> * par-prag.adb (Add_List_Pragma_Entry): New procedure. * par.adb (P_Pragma): Document requirement to handle multiple calls. 2014-10-20 Robert Dewar <dewar@adacore.com> * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All): Fix error of bad inheritance of this pragma from with'ed unit. 2014-10-20 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): For a subtype, inherit convention from parent type, because the subtype may have been declared on a partial view, prior to the pragma on the parent. 2014-10-20 Olivier Hainque <hainque@adacore.com> Tristan Gingold <gingold@adacore.com> * gcc-interface/Makefile.in: Handle arm-darwin and VxWorks 7. Misc clean ups. 2014-10-20 Nicolas Roche <roche@adacore.com> * gcc-interface/Make-lang.in: ensure that automatically generated dependency are referencing generated gnatvsn rather than original one. From-SVN: r216482
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r--gcc/ada/gcc-interface/Make-lang.in32
-rw-r--r--gcc/ada/gcc-interface/Makefile.in38
2 files changed, 58 insertions, 12 deletions
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index e11794f..efae513 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -68,7 +68,7 @@ ALL_ADAFLAGS = \
$(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS) $(CHECKING_ADAFLAGS) $(WARN_ADAFLAGS)
FORCE_DEBUG_ADAFLAGS = -g
ADA_CFLAGS =
-ADA_INCLUDES = -nostdinc -I- -I. -Iada -I$(srcdir)/ada -I$(srcdir)/ada/gcc-interface
+ADA_INCLUDES = -nostdinc -I- -I. -Iada/generated -Iada -I$(srcdir)/ada -I$(srcdir)/ada/gcc-interface
GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
GNATLIBCFLAGS= -g -O2 $(TCFLAGS)
ADA_INCLUDE_DIR = $(libsubdir)/adainclude
@@ -111,6 +111,7 @@ ADA_DEPS=case $@ in \
*)a="`echo $@ | sed -e 's/.o$$/.ali/'`"; \
echo "$@: `cat $$a | \
sed -ne 's;^D \([a-z0-9_\.-]*\).*;ada/\1;gp' | \
+ sed -e 's;ada/gnatvsn.ads;ada/generated/gnatvsn.ads;g' | \
tr -d '\015' | tr '\n' ' '`" > $(dir $@)/$(DEPDIR)/$(patsubst %.o,%.Po,$(notdir $@));; \
esac;
@@ -145,7 +146,7 @@ ifeq ($(build), $(host))
CC="../../xgcc -B../../" \
CXX="$(CXX)" \
$(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
- ADA_INCLUDES="-I- -I../rts" \
+ ADA_INCLUDES="-I- -I../generated -I../rts" \
GNATMAKE="../../gnatmake" \
GNATLINK="../../gnatlink" \
GNATBIND="../../gnatbind"
@@ -163,7 +164,7 @@ ifeq ($(build), $(host))
CC="$(CC)" \
CXX="$(CXX)" \
$(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
- ADA_INCLUDES="-I$(RTS_DIR)/../adainclude -I$(RTS_DIR)" \
+ ADA_INCLUDES="-I../generated -I$(RTS_DIR)/../adainclude -I$(RTS_DIR)" \
GNATMAKE="gnatmake" \
GNATBIND="gnatbind" \
GNATLINK="gnatlink" \
@@ -186,7 +187,7 @@ else
CC="$(CC)" \
CXX="$(CXX)" \
$(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
- ADA_INCLUDES="-I../rts" \
+ ADA_INCLUDES="-I../generated -I../rts" \
GNATMAKE="$(GNATMAKE_FOR_HOST)" \
GNATBIND="$(GNATBIND_FOR_HOST)" \
GNATLINK="$(GNATLINK_FOR_HOST)" \
@@ -201,7 +202,7 @@ else
CC="$(CC)" \
CXX="$(CXX)" \
$(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
- ADA_INCLUDES="-I$(RTS_DIR)/../adainclude -I$(RTS_DIR)" \
+ ADA_INCLUDES="-I../generated -I$(RTS_DIR)/../adainclude -I$(RTS_DIR)" \
GNATMAKE="$(GNATMAKE_FOR_HOST)" \
GNATBIND="$(GNATBIND_FOR_HOST)" \
GNATLINK="$(GNATLINK_FOR_HOST)" \
@@ -985,6 +986,24 @@ ada/a-tags.o : ada/a-tags.adb ada/a-tags.ads
$< $(OUTPUT_OPTION)
@$(ADA_DEPS)
+# Handling of gnatvsn version string
+
+# This ensure the build works even if there is no GNAT_DATE present in the
+# sources
+ada/GNAT_DATE:
+ touch ada/GNAT_DATE
+
+ada/generated/gnatvsn.ads: ada/gnatvsn.ads BASE-VER ada/GNAT_DATE
+ $(MKDIR) ada/generated
+ s=`cat $(srcdir)/BASE-VER | sed -e "s/\([0-9]*\)\.\([0-9]*\)\..*/-\1\2/g"`; \
+ d=`if test -f $(srcdir)/ada/GNAT_DATE; then \
+ cat $(srcdir)/ada/GNAT_DATE; else date +%Y%m%d; fi`; \
+ cat $< | sed -e "/Version/s/(\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\).*)/($$d$$s)/g" >$@
+
+ada/gnatvsn.o : ada/gnatvsn.adb ada/generated/gnatvsn.ads
+ $(CC) -c $(ALL_ADAFLAGS) -Iada/generated -I../ada/generated $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
+ @$(ADA_DEPS)
+
# Dependencies for windows specific tool (mdll)
ada/mdll.o : ada/mdll.adb ada/mdll.ads ada/mdll-fil.ads ada/mdll-utl.ads
@@ -997,7 +1016,8 @@ ada/mdll-utl.o : ada/mdll-utl.adb ada/mdll.ads ada/mdll-utl.ads ada/sdefault.ads
$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
ada_generated_files = ada/sinfo.h ada/einfo.h ada/nmake.adb ada/nmake.ads \
- ada/treeprs.ads ada/snames.ads ada/snames.adb ada/snames.h
+ ada/treeprs.ads ada/snames.ads ada/snames.adb ada/snames.h \
+ ada/generated/gnatvsn.ads
# When building from scratch we don't have dependency files, the only thing
# we need to ensure is that the generated files are created first.
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index 51c817b..cedc7e9 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -523,6 +523,12 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworks7,$(target_cpu) $(target_
ARCH_STR=ppc
endif
+ ifeq ($(strip $(filter-out vxworks7%, $(target_os))),)
+ SVX=system-vxworks7
+ else
+ SVX=system-vxworks
+ endif
+
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-vxworks.ads \
a-numaux.ads<a-numaux-vxworks.ads \
@@ -586,7 +592,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworks7,$(target_cpu) $(target_
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<system-vxworks-$(ARCH_STR)-rtp.ads
+ system.ads<$(SVX)-$(ARCH_STR)-rtp-smp.ads
EH_MECHANISM=-gcc
EXTRA_LIBGNAT_OBJS+=affinity.o sigtramp-vxworks.o
@@ -871,6 +877,13 @@ endif
# x86 VxWorks
ifeq ($(strip $(filter-out %86 wrs vxworks vxworks7,$(target_cpu) $(target_vendor) $(target_os))),)
+
+ ifeq ($(strip $(filter-out vxworks7%, $(target_os))),)
+ SVX=system-vxworks7
+ else
+ SVX=system-vxworks
+ endif
+
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-vxworks.ads \
i-vxwork.ads<i-vxwork-x86.ads \
@@ -921,7 +934,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<system-vxworks-x86-rtp.ads
+ system.ads<$(SVX)-x86-rtp-smp.ads
EXTRA_LIBGNAT_OBJS+=affinity.o
else
@@ -956,6 +969,9 @@ ifeq ($(strip $(filter-out %86 wrs vxworks vxworks7,$(target_cpu) $(target_vendo
EXTRA_GNATRTL_TASKING_OBJS += s-vxwork.o s-vxwext.o
EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
+
+ GCC_SPEC_FILES+=vxworks-x86-link.spec
+ GCC_SPEC_FILES+=vxworks-smp-x86-link.spec
endif
# ARM VxWorks
@@ -1149,15 +1165,15 @@ ifeq ($(strip $(filter-out sparc% sun solaris%,$(target_cpu) $(target_vendor) $(
s-tasinf.ads<s-tasinf-solaris.ads \
s-taspri.ads<s-taspri-solaris.ads \
s-tpopsp.adb<s-tpopsp-solaris.adb \
- g-soliop.ads<g-soliop-solaris.ads
+ g-soliop.ads<g-soliop-solaris.ads \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(ATOMICS_BUILTINS_TARGET_PAIRS)
LIBGNAT_TARGET_PAIRS_32 = \
system.ads<system-solaris-sparc.ads
LIBGNAT_TARGET_PAIRS_64 = \
- system.ads<system-solaris-sparcv9.ads \
- $(ATOMICS_TARGET_PAIRS) \
- $(ATOMICS_BUILTINS_TARGET_PAIRS)
+ system.ads<system-solaris-sparcv9.ads
ifeq ($(strip $(filter-out sparc sun solaris%,$(target_cpu) $(target_vendor) $(target_os))),)
ifeq ($(strip $(MULTISUBDIR)),/sparcv9)
@@ -2326,6 +2342,16 @@ ifeq ($(strip $(filter-out darwin%,$(target_os))),)
endif
endif
+ ifeq ($(strip $(filter-out arm,$(arch))),)
+ LIBGNAT_TARGET_PAIRS += \
+ s-intman.adb<s-intman-susv3.adb \
+ s-osprim.adb<s-osprim-darwin.adb \
+ $(ATOMICS_TARGET_PAIRS)
+
+ LIBGNAT_TARGET_PAIRS += \
+ system.ads<system-darwin-arm.ads
+ endif
+
TOOLS_TARGET_PAIRS = \
mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb \
indepsw.adb<indepsw-darwin.adb