aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-29 11:24:55 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-29 11:24:55 +0200
commitc5ecd6b73c89668590555d62b39f954618c27978 (patch)
tree0dc6223602cbfdf17b2870ef8eafd07923b38da1 /gcc/ada/gcc-interface
parente7898e54f4dc9563328204d6e8b886982c9c3357 (diff)
downloadgcc-c5ecd6b73c89668590555d62b39f954618c27978.zip
gcc-c5ecd6b73c89668590555d62b39f954618c27978.tar.gz
gcc-c5ecd6b73c89668590555d62b39f954618c27978.tar.bz2
[multiple changes]
2011-08-29 Thomas Quinot <quinot@adacore.com> * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use Is_RTU instead of using Chars comparisons. 2011-08-29 Thomas Quinot <quinot@adacore.com> * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a temporary object if the actual is constrained, and the discriminants read from the stream don't match. 2011-08-29 Tristan Gingold <gingold@adacore.com> * sem_attr.adb, exp_attr.adb: Add handling of Attribute_System_Allocator_Alignment * snames.ads-tmpl: Add Name_System_Allocator_Alignment and Attribute_System_Allocator_Alignment. * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment. * gcc-interface/targtyps.c, gcc-interface/utils2.c, gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to get_target_system_allocator_alignment. 2011-08-29 Arnaud Charlet <charlet@adacore.com> * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update dependencies. From-SVN: r178176
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r--gcc/ada/gcc-interface/Make-lang.in13
-rw-r--r--gcc/ada/gcc-interface/Makefile.in37
-rw-r--r--gcc/ada/gcc-interface/gigi.h2
-rw-r--r--gcc/ada/gcc-interface/targtyps.c6
-rw-r--r--gcc/ada/gcc-interface/utils2.c14
5 files changed, 39 insertions, 33 deletions
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 65ee531..db4e885 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -241,8 +241,7 @@ GNAT_ADA_OBJS = \
ada/g-spchge.o \
ada/g-speche.o \
ada/g-u3spch.o \
- ada/get_alfa.o \
- ada/get_scos.o \
+ ada/get_alfa.o \
ada/get_targ.o \
ada/gnat.o \
ada/gnatvsn.o \
@@ -2801,12 +2800,6 @@ ada/get_alfa.o : ada/ada.ads ada/a-ioexce.ads ada/a-unccon.ads \
ada/s-string.ads ada/s-unstyp.ads ada/types.ads ada/unchconv.ads \
ada/unchdeal.ads
-ada/get_scos.o : ada/ada.ads ada/a-ioexce.ads ada/a-unccon.ads \
- ada/get_scos.ads ada/get_scos.adb ada/gnat.ads ada/g-table.ads \
- ada/g-table.adb ada/scos.ads ada/scos.adb ada/system.ads \
- ada/s-exctab.ads ada/s-memory.ads ada/s-stalib.ads ada/s-unstyp.ads \
- ada/types.ads ada/unchconv.ads ada/unchdeal.ads
-
ada/get_targ.o : ada/ada.ads ada/a-unccon.ads ada/get_targ.ads \
ada/get_targ.adb ada/system.ads ada/s-exctab.ads ada/s-stalib.ads \
ada/s-unstyp.ads ada/types.ads ada/unchconv.ads ada/unchdeal.ads
@@ -3362,7 +3355,7 @@ ada/put_scos.o : ada/ada.ads ada/a-unccon.ads ada/gnat.ads ada/g-table.ads \
ada/g-table.adb ada/par_sco.ads ada/put_scos.ads ada/put_scos.adb \
ada/scos.ads ada/scos.adb ada/system.ads ada/s-exctab.ads \
ada/s-memory.ads ada/s-stalib.ads ada/s-unstyp.ads ada/types.ads \
- ada/unchconv.ads ada/unchdeal.ads
+ ada/unchconv.ads ada/unchdeal.ads ada/snames.ads
ada/repinfo.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/aspects.ads ada/atree.ads \
@@ -3651,7 +3644,7 @@ ada/scng.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/scos.o : ada/ada.ads ada/a-unccon.ads ada/gnat.ads ada/g-table.ads \
ada/g-table.adb ada/scos.ads ada/scos.adb ada/system.ads \
ada/s-exctab.ads ada/s-memory.ads ada/s-stalib.ads ada/s-unstyp.ads \
- ada/types.ads ada/unchconv.ads ada/unchdeal.ads
+ ada/types.ads ada/unchconv.ads ada/unchdeal.ads ada/snames.ads
ada/sem.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads ada/a-uncdea.ads \
ada/alloc.ads ada/aspects.ads ada/atree.ads ada/atree.adb \
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index 0440855..c80480e 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -274,8 +274,16 @@ INCLUDES = -I- -I. -I.. -I$(srcdir)/ada -I$(srcdir) -I$(srcdir)/config \
ADA_INCLUDES = -I- -I. -I$(srcdir)/ada
-INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir)/ada \
- -I$(fsrcdir)/../include -I$(fsrcdir)
+INCLUDES_FOR_SUBDIR = -iquote . -iquote .. -iquote ../.. -iquote $(fsrcdir)/ada \
+ -I$(fsrcdir)/../include
+
+ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
+ # On Windows native the tconfig.h files used by C runtime files needs to have
+ # the gcc source dir in its include dir list
+ INCLUDES_FOR_SUBDIR = -iquote . -iquote .. -iquote ../.. -iquote $(fsrcdir)/ada \
+ -I$(fsrcdir)/../include -I$(fsrcdir)
+endif
+
ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
# Avoid a lot of time thinking about remaking Makefile.in and *.def.
@@ -466,7 +474,7 @@ ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
endif
endif
-ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
+ifeq ($(strip $(filter-out e500% powerpc% wrs vxworks,$(targ))),)
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-vxworks.ads \
a-numaux.ads<a-numaux-vxworks.ads \
@@ -521,7 +529,8 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
system.ads<system-vxworks-ppc-rtp.ads
EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
- EXTRA_GNATRTL_TASKING_OBJS=affinity.o
+ EXTRA_LIBGNAT_OBJS+=affinity.o
+ EXTRA_LIBGNAT_SRCS+=affinity.c
else
ifeq ($(strip $(filter-out kernel-smp,$(THREAD_KIND))),)
LIBGNAT_TARGET_PAIRS += \
@@ -532,7 +541,8 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
system.ads<system-vxworks-ppc-kernel.ads
EH_MECHANISM=-gcc
- EXTRA_GNATRTL_TASKING_OBJS=affinity.o
+ EXTRA_LIBGNAT_OBJS+=affinity.o
+ EXTRA_LIBGNAT_SRCS+=affinity.c
else
LIBGNAT_TARGET_PAIRS += \
s-interr.adb<s-interr-hwint.adb \
@@ -622,7 +632,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(targ))),)
endif
# vxworks MILS
-ifeq ($(strip $(filter-out powerpc% wrs vxworksmils,$(targ))),)
+ifeq ($(strip $(filter-out e500% powerpc% wrs vxworksmils,$(targ))),)
# target pairs for vthreads runtime
LIBGNAT_TARGET_PAIRS = \
a-elchha.adb<a-elchha-vx6-raven-cert.adb \
@@ -837,7 +847,8 @@ ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
system.ads<system-vxworks-x86-rtp.ads
EXTRA_GNATRTL_NONTASKING_OBJS=s-vxwexc.o
- EXTRA_GNATRTL_TASKING_OBJS=affinity.o
+ EXTRA_LIBGNAT_SRCS+=affinity.o
+ EXTRA_LIBGNAT_SRCS+=affinity.c
else
ifeq ($(strip $(filter-out kernel-smp, $(THREAD_KIND))),)
LIBGNAT_TARGET_PAIRS += \
@@ -846,7 +857,8 @@ ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
s-vxwext.ads<s-vxwext-kernel.ads \
s-vxwext.adb<s-vxwext-kernel-smp.adb \
system.ads<system-vxworks-x86-kernel.ads
- EXTRA_GNATRTL_TASKING_OBJS=affinity.o
+ EXTRA_LIBGNAT_OBJS+=affinity.o
+ EXTRA_LIBGNAT_SRCS+=affinity.c
else
LIBGNAT_TARGET_PAIRS += \
s-interr.adb<s-interr-hwint.adb \
@@ -1530,7 +1542,6 @@ ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ)))
s-parame.ads<s-parame-vms-alpha.ads \
$(ATOMICS_TARGET_PAIRS)
- EXTRA_GNATRTL_NONTASKING_OBJS = s-atocou.o
TOOLS_TARGET_PAIRS= \
mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
symbols.adb<symbols-vms.adb \
@@ -1548,7 +1559,7 @@ adamsg.o: adamsg.msg
GNATLIB_SHARED=gnatlib-shared-vms
EXTRA_LIBGNAT_SRCS+=adamsg.msg
EXTRA_LIBGNAT_OBJS+=adamsg.o
- EXTRA_GNATRTL_NONTASKING_OBJS+-s-po32gl.o
+ EXTRA_GNATRTL_NONTASKING_OBJS+=s-po32gl.o
EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
EXTRA_GNATTOOLS = \
../../gnatsym$(exeext)
@@ -1617,7 +1628,6 @@ ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
s-osprim.adb<s-osprim-mingw.adb \
s-taprop.adb<s-taprop-mingw.adb
- EH_MECHANISM=-gcc
ifeq ($(strip $(filter-out x86_64%,$(arch))),)
ifeq ($(strip $(MULTISUBDIR)),/32)
LIBGNAT_TARGET_PAIRS += \
@@ -1649,6 +1659,8 @@ ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
# ??? This will be replaced by gnatlib-shared-dual-win32 when GNAT
# auto-import support for array/record will be done.
GNATLIB_SHARED = gnatlib-shared-win32
+
+ EH_MECHANISM=-gcc
endif
TOOLS_TARGET_PAIRS= \
@@ -2163,7 +2175,8 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
endif
TOOLS_TARGET_PAIRS = \
- mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb
+ mlib-tgt-specific.adb<mlib-tgt-specific-darwin.adb \
+ indepsw.adb<indepsw-darwin.adb
EH_MECHANISM=-gcc
GNATLIB_SHARED = gnatlib-shared-darwin
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h
index 26ba3fb..04c0825 100644
--- a/gcc/ada/gcc-interface/gigi.h
+++ b/gcc/ada/gcc-interface/gigi.h
@@ -954,7 +954,7 @@ extern Pos get_target_double_size (void);
extern Pos get_target_long_double_size (void);
extern Pos get_target_pointer_size (void);
extern Pos get_target_maximum_default_alignment (void);
-extern Pos get_target_default_allocator_alignment (void);
+extern Pos get_target_system_allocator_alignment (void);
extern Pos get_target_maximum_allowed_alignment (void);
extern Pos get_target_maximum_alignment (void);
extern Nat get_float_words_be (void);
diff --git a/gcc/ada/gcc-interface/targtyps.c b/gcc/ada/gcc-interface/targtyps.c
index b31fee3..78df4dd 100644
--- a/gcc/ada/gcc-interface/targtyps.c
+++ b/gcc/ada/gcc-interface/targtyps.c
@@ -6,7 +6,7 @@
* *
* Body *
* *
- * Copyright (C) 1992-2010, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2011, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@@ -149,7 +149,7 @@ get_target_maximum_default_alignment (void)
return BIGGEST_ALIGNMENT / BITS_PER_UNIT;
}
-/* Standard'Default_Allocator_Alignment. Alignment guaranteed to be honored
+/* Standard'System_Allocator_Alignment. Alignment guaranteed to be honored
by the default allocator (System.Memory.Alloc or malloc if we have no
run-time library at hand).
@@ -172,7 +172,7 @@ get_target_maximum_default_alignment (void)
#endif
Pos
-get_target_default_allocator_alignment (void)
+get_target_system_allocator_alignment (void)
{
return MALLOC_ALIGNMENT / BITS_PER_UNIT;
}
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c
index 5f3f03a..25e293d 100644
--- a/gcc/ada/gcc-interface/utils2.c
+++ b/gcc/ada/gcc-interface/utils2.c
@@ -1907,13 +1907,13 @@ maybe_wrap_malloc (tree data_size, tree data_type, Node_Id gnat_node)
stored just in front. */
unsigned int data_align = TYPE_ALIGN (data_type);
- unsigned int default_allocator_alignment
- = get_target_default_allocator_alignment () * BITS_PER_UNIT;
+ unsigned int system_allocator_alignment
+ = get_target_system_allocator_alignment () * BITS_PER_UNIT;
tree aligning_type
- = ((data_align > default_allocator_alignment)
+ = ((data_align > system_allocator_alignment)
? make_aligning_type (data_type, data_align, data_size,
- default_allocator_alignment,
+ system_allocator_alignment,
POINTER_SIZE / BITS_PER_UNIT)
: NULL_TREE);
@@ -1986,12 +1986,12 @@ maybe_wrap_free (tree data_ptr, tree data_type)
return value, stored in front of the data block at allocation time. */
unsigned int data_align = TYPE_ALIGN (data_type);
- unsigned int default_allocator_alignment
- = get_target_default_allocator_alignment () * BITS_PER_UNIT;
+ unsigned int system_allocator_alignment
+ = get_target_system_allocator_alignment () * BITS_PER_UNIT;
tree free_ptr;
- if (data_align > default_allocator_alignment)
+ if (data_align > system_allocator_alignment)
{
/* DATA_FRONT_PTR (void *)
= (void *)DATA_PTR - (void *)sizeof (void *)) */