[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 30 Jul 2014 11:01:18 +0000 (13:01 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 30 Jul 2014 11:01:18 +0000 (13:01 +0200)
2014-07-30  Doug Rupp  <rupp@adacore.com>

* adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
temp files in /cache directory unless overridden by TMPDIR.

2014-07-30  Jose Ruiz  <ruiz@adacore.com>

* s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
type CPU, so it can never be greater than CPU_Range'Last.

2014-07-30  Bob Duff  <duff@adacore.com>

* s-taskin.ads: Minor comment fix.

2014-07-30  Thomas Quinot  <quinot@adacore.com>

* g-socket.adb: Remove now useless WITH, USE, and USE TYPE
clauses.

2014-07-30  Yannick Moy  <moy@adacore.com>

* debug.adb: Free debug flag dQ used for frontend inlining in
GNATprove mode..
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
debug flag..

2014-07-30  Thomas Quinot  <quinot@adacore.com>

* Make-generated.in: Remove generation of s-oscons.ads, only
generate the xoscons utility, in runtime-agnostic rules.
* gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
no longer supported.

From-SVN: r213250

gcc/ada/ChangeLog
gcc/ada/Make-generated.in
gcc/ada/adaint.c
gcc/ada/debug.adb
gcc/ada/g-socket.adb
gcc/ada/gcc-interface/Makefile.in
gcc/ada/s-tarest.adb
gcc/ada/s-taskin.ads
gcc/ada/s-tassta.adb
gcc/ada/sem_ch6.adb

index 1d457eb..8970579 100644 (file)
@@ -1,3 +1,37 @@
+2014-07-30  Doug Rupp  <rupp@adacore.com>
+
+       * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
+       temp files in /cache directory unless overridden by TMPDIR.
+
+2014-07-30  Jose Ruiz  <ruiz@adacore.com>
+
+       * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
+       Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
+       type CPU, so it can never be greater than CPU_Range'Last.
+
+2014-07-30  Bob Duff  <duff@adacore.com>
+
+       * s-taskin.ads: Minor comment fix.
+
+2014-07-30  Thomas Quinot  <quinot@adacore.com>
+
+       * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
+       clauses.
+
+2014-07-30  Yannick Moy  <moy@adacore.com>
+
+       * debug.adb: Free debug flag dQ used for frontend inlining in
+       GNATprove mode..
+       * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
+       debug flag..
+
+2014-07-30  Thomas Quinot  <quinot@adacore.com>
+
+       * Make-generated.in: Remove generation of s-oscons.ads, only
+       generate the xoscons utility, in runtime-agnostic rules.
+       * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
+       no longer supported.
+
 2014-07-30  Bob Duff  <duff@adacore.com>
 
        * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
index 412e18b..17200c7 100644 (file)
@@ -66,47 +66,11 @@ $(ADA_GEN_SUBDIR)/stamp-nmake: $(ADA_GEN_SUBDIR)/sinfo.ads $(ADA_GEN_SUBDIR)/nma
        $(MOVE_IF_CHANGE) $(ADA_GEN_SUBDIR)/bldtools/nmake/nmake.adb $(ADA_GEN_SUBDIR)/nmake.adb
        touch $(ADA_GEN_SUBDIR)/stamp-nmake
 
-# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust
-# for running it from $(ADA_GEN_SUBDIR)/bldtools/oscons.
-
-OSCONS_CC=$(subst ./xgcc,../../../xgcc,$(subst -B./, -B../../../,$(GCC_FOR_TARGET)))
-
-# The main ada source directory must be on the include path for #include "..."
-# because s-oscons-tmplt.c requires adaint.h, gsocket.h, and any file included
-# by these headers. However note that we must use -iquote, not -I, so that
-# ada/types.h does not conflict with a same-named system header (VxWorks
-# has a <types.h> header).
-
-OSCONS_SRCDIR=$${_oscons_srcdir}
-OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \
-  -DTARGET=\"$(target)\" -iquote $(OSCONS_SRCDIR) s-oscons-tmplt.c > s-oscons-tmplt.i
-OSCONS_EXTRACT=$(OSCONS_CC) -iquote $(OSCONS_SRCDIR) -S s-oscons-tmplt.i
-
-# Note: if you need to build with a non-GNU compiler, you could adapt the
-# following definitions (written for VMS DEC-C)
-#OSCONS_CPP=../../../$(DECC) -E /comment=as_is -DNATIVE \
-#             -DTARGET='""$(target)""' -I$(OSCONS_SRCDIR) s-oscons-tmplt.c
-#
-#OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \
-#                 -DTARGET='""$(target)""' -I$(OSCONS_SRCDIR) s-oscons-tmplt.c ; \
-#  ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
-#  ./s-oscons-tmplt.exe > s-oscons-tmplt.s
-
-# Note: the first dependency of s-oscons.ads *must* remain s-oscons-tmplt.c, as
-# we use $(<D) to locate the main ada/ source directory and pass it to OSCONS_CPP
-# as a -I argument.
-$(ADA_GEN_SUBDIR)/s-oscons.ads : $(ADA_GEN_SUBDIR)/s-oscons-tmplt.c $(ADA_GEN_SUBDIR)/xoscons.adb $(ADA_GEN_SUBDIR)/xutil.ads $(ADA_GEN_SUBDIR)/xutil.adb
+$(ADA_GEN_SUBDIR)/bldtools/oscons/xoscons : $(ADA_GEN_SUBDIR)/xoscons.adb $(ADA_GEN_SUBDIR)/xutil.ads $(ADA_GEN_SUBDIR)/xutil.adb
        -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/oscons
        $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/oscons/,$(notdir $^))
        $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/oscons
-       _oscons_srcdir=`cd $(<D) && pwd` ; \
-       (cd $(ADA_GEN_SUBDIR)/bldtools/oscons ; gnatmake -q xoscons ; \
-               $(RM) s-oscons-tmplt.i s-oscons-tmplt.s ; \
-               $(OSCONS_CPP) ; \
-               $(OSCONS_EXTRACT) ; \
-               ./xoscons s-oscons ) ; \
-               $(MOVE_IF_CHANGE) $(ADA_GEN_SUBDIR)/bldtools/oscons/s-oscons.ads $(ADA_GEN_SUBDIR)/s-oscons.ads ; \
-               $(MOVE_IF_CHANGE) $(ADA_GEN_SUBDIR)/bldtools/oscons/s-oscons.h $(ADA_GEN_SUBDIR)/s-oscons.h
+       cd $(ADA_GEN_SUBDIR)/bldtools/oscons ; gnatmake -q xoscons
 
 $(ADA_GEN_SUBDIR)/sdefault.adb: $(ADA_GEN_SUBDIR)/stamp-sdefault ; @true
 $(ADA_GEN_SUBDIR)/stamp-sdefault : $(srcdir)/version.c Makefile
index 81b2d14..a84f4a5 100644 (file)
@@ -1361,14 +1361,18 @@ __gnat_tmp_name (char *tmp_filename)
   }
 
 #elif defined (linux) || defined (__FreeBSD__) || defined (__NetBSD__) \
-  || defined (__OpenBSD__) || defined(__GLIBC__)
+  || defined (__OpenBSD__) || defined(__GLIBC__) || defined (__ANDROID__)
 #define MAX_SAFE_PATH 1000
   char *tmpdir = getenv ("TMPDIR");
 
   /* If tmpdir is longer than MAX_SAFE_PATH, revert to default value to avoid
      a buffer overflow.  */
   if (tmpdir == NULL || strlen (tmpdir) > MAX_SAFE_PATH)
+#ifdef __ANDROID__
+    strcpy (tmp_filename, "/cache/gnat-XXXXXX");
+#else
     strcpy (tmp_filename, "/tmp/gnat-XXXXXX");
+#endif
   else
     sprintf (tmp_filename, "%s/gnat-XXXXXX", tmpdir);
 
index 1f7c8e2..b96ce83 100644 (file)
@@ -80,7 +80,7 @@ package body Debug is
    --  dN   No file name information in exception messages
    --  dO   Output immediate error messages
    --  dP   Do not check for controlled objects in preelaborable packages
-   --  dQ   Enable inlining in GNATprove mode
+   --  dQ   Enable inlining of bodies-without-decl in GNATprove mode
    --  dR   Bypass check for correct version of s-rpc
    --  dS   Never convert numbers to machine numbers in Sem_Eval
    --  dT   Convert to machine numbers only for constant declarations
@@ -438,9 +438,10 @@ package body Debug is
    --       in preelaborable packages, but this restriction is a huge pain,
    --       especially in the predefined library units.
 
-   --  dQ   Enable inlining in GNATprove mode. Although expansion is not set in
-   --       GNATprove mode, inlining is useful for improving the precision of
-   --       formal verification. Under a debug flag until fully reliable.
+   --  dQ   Enable inlining of bodies-without-decl in GNATprove mode. A decl is
+   --       created by the frontend so that the usual frontend inlining
+   --       mechanism can be used for formal verification. Under a debug flag
+   --       until fully reliable.
 
    --  dR   Bypass the check for a proper version of s-rpc being present
    --       to use the -gnatz? switch. This allows debugging of the use
index ee4d52a..b70c2cf 100644 (file)
@@ -34,8 +34,6 @@ with Ada.Exceptions;           use Ada.Exceptions;
 with Ada.Finalization;
 with Ada.Unchecked_Conversion;
 
-with Interfaces.C.Strings;
-
 with GNAT.Sockets.Thin_Common; use GNAT.Sockets.Thin_Common;
 with GNAT.Sockets.Thin;        use GNAT.Sockets.Thin;
 
@@ -1412,7 +1410,6 @@ package body GNAT.Sockets is
 
    function Inet_Addr (Image : String) return Inet_Addr_Type is
       use Interfaces.C;
-      use Interfaces.C.Strings;
 
       Img    : aliased char_array := To_C (Image);
       Addr   : aliased C.int;
@@ -1710,7 +1707,6 @@ package body GNAT.Sockets is
    ------------------------
 
    procedure Raise_Socket_Error (Error : Integer) is
-      use type C.Strings.chars_ptr;
    begin
       raise Socket_Error with
         Err_Code_Image (Error) & Socket_Error_Message (Error);
@@ -2421,7 +2417,6 @@ package body GNAT.Sockets is
 
    function To_Host_Entry (E : Hostent_Access) return Host_Entry_Type is
       use type C.size_t;
-      use C.Strings;
 
       Aliases_Count, Addresses_Count : Natural;
 
@@ -2549,7 +2544,6 @@ package body GNAT.Sockets is
    ----------------------
 
    function To_Service_Entry (E : Servent_Access) return Service_Entry_Type is
-      use C.Strings;
       use type C.size_t;
 
       Aliases_Count : Natural;
index 5c36962..a05e852 100644 (file)
@@ -1,5 +1,5 @@
 # Makefile for GNU Ada Compiler (GNAT).
-#   Copyright (C) 1994-2013 Free Software Foundation, Inc.
+#   Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 #This file is part of GCC.
 
@@ -454,6 +454,16 @@ EXTRA_LIBGNAT_OBJS=
 # file (included files).
 EXTRA_LIBGNAT_SRCS=
 
+# GCC spec files to be installed in $(libsubdir), so --specs=<spec-filename>
+# finds them at runtime. Sequences of alphanum characters prefixed with '_' in
+# the filename are stripped off at installation time. This is used to strip
+# the architecture indications in vxsim spec filenames, installing e.g.
+# vxsim_ppc.spec as vxsim.spec. This allows setting up pretty general self
+# specs to perform -vxsim -> --specs=<...> translations without causing
+# conflicts since the specs are installed in a target specific subdirectory.
+#
+GCC_SPEC_FILES=
+
 # $(filter-out PATTERN...,TEXT) removes all PATTERN words from TEXT.
 # $(strip STRING) removes leading and trailing spaces from STRING.
 # If what's left is null then it's a match.
@@ -563,6 +573,9 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(target_cpu) $(target_vendor) $
     s-vxwext.adb<s-vxwext-rtp.adb \
     s-tpopsp.adb<s-tpopsp-vxworks-rtp.adb \
     system.ads<system-vxworks-$(ARCH_STR)-rtp.ads
+
+    EH_MECHANISM=-gcc
+    EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o
   else
     ifeq ($(strip $(filter-out rtp-smp,$(THREAD_KIND))),)
       LIBGNAT_TARGET_PAIRS += \
@@ -572,7 +585,8 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(target_cpu) $(target_vendor) $
       s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
       system.ads<system-vxworks-$(ARCH_STR)-rtp.ads
 
-      EXTRA_LIBGNAT_OBJS+=affinity.o
+      EH_MECHANISM=-gcc
+      EXTRA_LIBGNAT_OBJS+=affinity.o sigtramp-vxworks.o
     else
       ifeq ($(strip $(filter-out kernel-smp,$(THREAD_KIND))),)
         LIBGNAT_TARGET_PAIRS += \
@@ -602,17 +616,29 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(target_cpu) $(target_vendor) $
         endif
       endif
       EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
-      EXTRA_LIBGNAT_OBJS+=sigtramp-ppcvxw.o
+      EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o
     endif
   endif
 
   EXTRA_GNATRTL_TASKING_OBJS += s-vxwork.o s-vxwext.o
 
   EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
+
+  GCC_SPEC_FILES+=vxworks-$(ARCH_STR)-link.spec
+  GCC_SPEC_FILES+=vxworks-cert-$(ARCH_STR)-link.spec
+  GCC_SPEC_FILES+=vxworks-smp-$(ARCH_STR)-link.spec
+  GCC_SPEC_FILES+=vxworks-crtbe-link.spec
 endif
 
 # PowerPC and e500v2 VxWorks 653
 ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(target_cpu) $(target_vendor) $(target_os))),)
+
+  ifeq ($(strip $(filter-out e500%, $(target_alias))),)
+     ARCH_STR=e500
+  else
+     ARCH_STR=ppc
+  endif
+
   # target pairs for vthreads runtime
   LIBGNAT_TARGET_PAIRS = \
   a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
@@ -635,15 +661,10 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(target_cpu) $(target_vendor)
   s-vxwext.adb<s-vxwext-noints.adb \
   s-vxwext.ads<s-vxwext-vthreads.ads \
   s-vxwork.ads<s-vxwork-ppc.ads \
+  system.ads<system-vxworks-$(ARCH_STR)-vthread.ads \
   $(ATOMICS_TARGET_PAIRS) \
   $(ATOMICS_BUILTINS_TARGET_PAIRS)
 
-  ifeq ($(strip $(filter-out e500%, $(target_alias))),)
-    LIBGNAT_TARGET_PAIRS += system.ads<system-vxworks-e500-vthread.ads
-  else
-    LIBGNAT_TARGET_PAIRS += system.ads<system-vxworks-ppc-vthread.ads
-  endif
-
   TOOLS_TARGET_PAIRS=\
   mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
   indepsw.adb<indepsw-gnu.adb
@@ -651,7 +672,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(target_cpu) $(target_vendor)
   EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
 
-  EXTRA_LIBGNAT_OBJS+=sigtramp-ppcvxw.o
+  EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o
 
   # Extra pairs for the vthreads runtime
   ifeq ($(strip $(filter-out vthreads,$(THREAD_KIND))),)
@@ -715,7 +736,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksmils,$(target_cpu) $(target_vendo
   EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-thread.o
   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
 
-  EXTRA_LIBGNAT_OBJS+=vx_stack_info.o sigtramp-ppcvxw.o
+  EXTRA_LIBGNAT_OBJS+=vx_stack_info.o sigtramp-vxworks.o
   GNATRTL_SOCKETS_OBJS =
 
   ifeq ($(strip $(filter-out yes,$(TRACE))),)
@@ -900,6 +921,8 @@ ifeq ($(strip $(filter-out %86 wrs vxworks,$(target_cpu) $(target_vendor) $(targ
       EXTRA_LIBGNAT_OBJS+=affinity.o
     else
       ifeq ($(strip $(filter-out kernel-smp, $(THREAD_KIND))),)
+        EH_MECHANISM=-gcc
+
         LIBGNAT_TARGET_PAIRS += \
         s-interr.adb<s-interr-hwint.adb \
         s-mudido.adb<s-mudido-affinity.adb \
@@ -914,6 +937,8 @@ ifeq ($(strip $(filter-out %86 wrs vxworks,$(target_cpu) $(target_vendor) $(targ
         s-tpopsp.adb<s-tpopsp-vxworks.adb
 
         ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
+          EH_MECHANISM=-gcc
+
           LIBGNAT_TARGET_PAIRS += \
           s-vxwext.ads<s-vxwext-kernel.ads \
           s-vxwext.adb<s-vxwext-kernel.adb \
@@ -961,6 +986,8 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
   indepsw.adb<indepsw-gnu.adb
 
   ifeq ($(strip $(filter-out rtp-smp,$(THREAD_KIND))),)
+    EH_MECHANISM=-gcc
+
     LIBGNAT_TARGET_PAIRS += \
     s-mudido.adb<s-mudido-affinity.adb \
     s-vxwext.ads<s-vxwext-rtp.ads \
@@ -968,7 +995,7 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
     s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
     system.ads<system-vxworks-arm-rtp.ads
 
-    EXTRA_LIBGNAT_OBJS+=affinity.o
+    EXTRA_LIBGNAT_OBJS+=affinity.o sigtramp-vxworks.o
   else
     ifeq ($(strip $(filter-out kernel-smp,$(THREAD_KIND))),)
       EH_MECHANISM=-gcc
@@ -980,7 +1007,7 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
       s-vxwext.adb<s-vxwext-kernel-smp.adb \
       system.ads<system-vxworks-arm.ads
 
-      EXTRA_LIBGNAT_OBJS+=affinity.o sigtramp-armvxw.o
+      EXTRA_LIBGNAT_OBJS+=affinity.o sigtramp-vxworks.o
     else
       LIBGNAT_TARGET_PAIRS += \
       s-tpopsp.adb<s-tpopsp-vxworks.adb \
@@ -993,7 +1020,7 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
         s-vxwext.ads<s-vxwext-kernel.ads \
         s-vxwext.adb<s-vxwext-kernel.adb
 
-        EXTRA_LIBGNAT_OBJS+=sigtramp-armvxw.o
+        EXTRA_LIBGNAT_OBJS+=sigtramp-vxworks.o
       endif
     endif
   endif
@@ -1002,6 +1029,8 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(ta
   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
 
   EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
+
+  GCC_SPEC_FILES+=vxworks-crtbe-link.spec
 endif
 
 # MIPS VxWorks
@@ -1034,6 +1063,37 @@ ifeq ($(strip $(filter-out mips% wrs vx%,$(target_cpu) $(target_vendor) $(target
   mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
   indepsw.adb<indepsw-gnu.adb
 
+  ifeq ($(strip $(filter-out rtp-smp,$(THREAD_KIND))),)
+    EH_MECHANISM=-gcc
+
+    LIBGNAT_TARGET_PAIRS += \
+    s-mudido.adb<s-mudido-affinity.adb \
+    s-vxwext.ads<s-vxwext-rtp.ads \
+    s-vxwext.adb<s-vxwext-rtp-smp.adb \
+    s-tpopsp.adb<s-tpopsp-vxworks-tls.adb
+
+    EXTRA_LIBGNAT_OBJS+=affinity.o sigtramp-vxworks.o
+  else
+    ifeq ($(strip $(filter-out kernel-smp,$(THREAD_KIND))),)
+      LIBGNAT_TARGET_PAIRS += \
+      s-mudido.adb<s-mudido-affinity.adb \
+      s-tpopsp.adb<s-tpopsp-vxworks-tls.adb \
+      s-vxwext.ads<s-vxwext-kernel.ads \
+      s-vxwext.adb<s-vxwext-kernel-smp.adb
+
+      EXTRA_LIBGNAT_OBJS+=affinity.o
+    else
+      LIBGNAT_TARGET_PAIRS += \
+      s-tpopsp.adb<s-tpopsp-vxworks.adb
+
+      ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
+        LIBGNAT_TARGET_PAIRS += \
+        s-vxwext.ads<s-vxwext-kernel.ads \
+        s-vxwext.adb<s-vxwext-kernel.adb
+      endif
+    endif
+  endif
+
   EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o
   EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
 
@@ -1539,110 +1599,6 @@ ifeq ($(strip $(filter-out rtems%,$(target_os))),)
   s-interr.adb<s-interr-hwint.adb
 endif
 
-# OpenVMS (host)
-ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host_cpu) $(host_vendor) $(host_os))),)
-
-soext  = .exe
-hyphen = _
-LN = cp -p
-LN_S = cp -p
-
-endif
-
-# OpenVMS (target)
-ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(target_cpu) $(target_vendor) $(target_os))),)
-  LIBGNAT_TARGET_PAIRS = \
-    a-caldel.adb<a-caldel-vms.adb \
-    a-calend.adb<a-calend-vms.adb \
-    a-calend.ads<a-calend-vms.ads \
-    a-dirval.adb<a-dirval-vms.adb \
-    a-excpol.adb<a-excpol-abort.adb \
-    a-intnam.ads<a-intnam-vms.ads \
-    a-numaux.ads<a-numaux-vms.ads \
-    g-expect.adb<g-expect-vms.adb \
-    g-socthi.ads<g-socthi-vms.ads \
-    g-socthi.adb<g-socthi-vms.adb \
-    g-stsifd.adb<g-stsifd-sockets.adb \
-    i-cstrea.adb<i-cstrea-vms.adb \
-    memtrack.adb<memtrack-vms_64.adb \
-    s-auxdec.ads<s-auxdec-vms_64.ads \
-    s-inmaop.adb<s-inmaop-vms.adb \
-    s-interr.adb<s-interr-vms.adb \
-    s-intman.adb<s-intman-vms.adb \
-    s-intman.ads<s-intman-vms.ads \
-    s-memory.adb<s-memory-vms_64.adb \
-    s-memory.ads<s-memory-vms_64.ads \
-    s-ransee.adb<s-ransee-vms.adb \
-    s-osprim.adb<s-osprim-vms.adb \
-    s-osprim.ads<s-osprim-vms.ads \
-    s-osinte.adb<s-osinte-vms.adb \
-    s-osinte.ads<s-osinte-vms.ads \
-    s-taprop.adb<s-taprop-vms.adb \
-    s-tasdeb.adb<s-tasdeb-vms.adb \
-    s-taspri.ads<s-taspri-vms.ads \
-    s-tpopsp.adb<s-tpopsp-vms.adb \
-    s-tpopde.adb<s-tpopde-vms.adb \
-    s-tpopde.ads<s-tpopde-vms.ads
-
-  ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(target_cpu) $(target_vendor) $(target_os))),)
-    LIBGNAT_TARGET_PAIRS += \
-      g-enblsp.adb<g-enblsp-vms-ia64.adb \
-      g-trasym.adb<g-trasym-vms-ia64.adb \
-      s-asthan.adb<s-asthan-vms-ia64.adb \
-      s-auxdec.adb<s-auxdec-vms-ia64.adb \
-      s-vaflop.adb<s-vaflop-vms-ia64.adb \
-      system.ads<system-vms-ia64.ads \
-      s-parame.ads<s-parame-vms-ia64.ads \
-      $(ATOMICS_TARGET_PAIRS) \
-      $(ATOMICS_BUILTINS_TARGET_PAIRS)
-
-    EXTRA_LIBGNAT_SRCS+=tb-ivms.c
-    override GNATRTL_ALTIVEC_OBJS=
-
-    TOOLS_TARGET_PAIRS= \
-      mlib-tgt-specific.adb<mlib-tgt-specific-vms-ia64.adb \
-      symbols.adb<symbols-vms.adb \
-      symbols-processing.adb<symbols-processing-vms-ia64.adb
-  else
-    ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(target_cpu) $(target_vendor) $(target_os))),)
-      LIBGNAT_TARGET_PAIRS += \
-        g-enblsp.adb<g-enblsp-vms-alpha.adb \
-        g-trasym.adb<g-trasym-vms-alpha.adb \
-        s-asthan.adb<s-asthan-vms-alpha.adb \
-        s-auxdec.adb<s-auxdec-vms-alpha.adb \
-        s-traent.adb<s-traent-vms.adb \
-        s-traent.ads<s-traent-vms.ads \
-        s-vaflop.adb<s-vaflop-vms-alpha.adb \
-        system.ads<system-vms_64.ads \
-       s-parame.ads<s-parame-vms-alpha.ads \
-        $(ATOMICS_TARGET_PAIRS) \
-        $(ATOMICS_BUILTINS_TARGET_PAIRS)
-
-    EXTRA_LIBGNAT_SRCS+=tb-alvms.c
-    override GNATRTL_ALTIVEC_OBJS=
-
-    TOOLS_TARGET_PAIRS= \
-      mlib-tgt-specific.adb<mlib-tgt-specific-vms-alpha.adb \
-      symbols.adb<symbols-vms.adb \
-      symbols-processing.adb<symbols-processing-vms-alpha.adb
-    endif
-  endif
-
-  EXTRA_GNATMAKE_OBJS = mlib-tgt-vms_common.o
-
-  GMEM_LIB = gmemlib
-  EH_MECHANISM=-gcc
-  GNATLIB_SHARED=gnatlib-shared-vms
-  EXTRA_GNATRTL_NONTASKING_OBJS+=s-po32gl.o
-  EXTRA_GNATRTL_TASKING_OBJS=s-tpopde.o
-  EXTRA_GNATTOOLS = \
-     ../../gnatsym$(exeext)
-  # This command transforms (YYYYMMDD) into YY,MMDD
-  GSMATCH_VERSION := $(shell grep "^ *Gnat_Static_Version_String" $(fsrcpfx)ada/gnatvsn.ads | sed -e 's/.*(\(.*\)).*/\1/' -e 's/\(..\)\(..\)\(....\).*/\2,\3/')
-  TOOLS_LIBS_LO := --for-linker=sys\\$$\$$library:trace.exe
-  LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
-endif
-
 # PikeOS
 ifeq ($(strip $(filter-out powerpc% %86 sysgo pikeos,$(target_cpu) $(target_vendor) $(target_os)))),)
   TOOLS_TARGET_PAIRS=\
@@ -2475,6 +2431,7 @@ ADA_EXCLUDE_SRCS =\
   s-stache.adb s-stache.ads \
   s-thread.ads \
   s-vxwext.adb s-vxwext.ads \
+  s-vxwexc.adb s-vxwexc.ads \
   s-win32.ads  s-winext.ads \
   g-regist.adb g-regist.ads g-sse.ads    g-ssvety.ads \
   i-vxwoio.adb i-vxwoio.ads i-vxwork.ads \
@@ -2641,7 +2598,15 @@ gnatlink-re: ../stamp-tools gnatmake-re
          true; \
        fi
 
-install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
+install-gcc-specs:
+#      Install all the requested GCC spec files.
+
+       for f in $(GCC_SPEC_FILES); do \
+           $(INSTALL_DATA_DATE) $(srcdir)/ada/$$f \
+           $(libsubdir)/$$(echo $$f|sed -e 's#_[a-zA-Z0-9]*##g'); \
+       done
+
+install-gnatlib: ../stamp-gnatlib-$(RTSDIR) install-gcc-specs
 #      Create the directory before deleting it, in case the directory is
 #      a list of directories (as it may be on VMS). This ensures we are
 #      deleting the right one.
@@ -2727,24 +2692,30 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
        $(RM) ../stamp-gnatlib-$(RTSDIR)
        touch ../stamp-gnatlib1-$(RTSDIR)
 
-ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%, $(host_cpu) $(host_os))),)
-OSCONS_CPP=../../$(DECC) -E /comment=as_is -DNATIVE \
-             -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c
+# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust
+# for running it from ada/rts
 
-OSCONS_EXTRACT=../../$(DECC) -DNATIVE \
-                 -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c ; \
-  ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
-  ./s-oscons-tmplt.exe > s-oscons-tmplt.s
+OSCONS_CC=$(subst ./xgcc,../../xgcc,$(subst -B./, -B../../,$(GCC_FOR_TARGET)))
 
-else
-# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust
-# for running it from $(RTSDIR)
-OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \
-  | sed -e 's^\./xgcc^../../xgcc^' -e 's^-B./^-B../../^'`
-OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \
-  -DTARGET=\"$(target)\" $(fsrcpfx)ada/s-oscons-tmplt.c > s-oscons-tmplt.i
-OSCONS_EXTRACT=$(OSCONS_CC) $(GNATLIBCFLAGS) -S s-oscons-tmplt.i
-endif
+# The main ada source directory must be on the include path for #include "..."
+# because s-oscons-tmplt.c requires adaint.h, gsocket.h, and any file included
+# by these headers. However note that we must use -iquote, not -I, so that
+# ada/types.h does not conflict with a same-named system header (VxWorks
+# has a <types.h> header).
+
+OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) $(GNATLIBCFLAGS_FOR_C) -E -C \
+  -DTARGET=\"$(target)\" -iquote $(fsrcpfx)ada $(fsrcpfx)ada/s-oscons-tmplt.c > s-oscons-tmplt.i
+OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i
+
+# Note: if you need to build with a non-GNU compiler, you could adapt the
+# following definitions (written for VMS DEC-C)
+#OSCONS_CPP=../../../$(DECC) -E /comment=as_is -DNATIVE \
+#             -DTARGET='""$(target)""' -I$(OSCONS_SRCDIR) s-oscons-tmplt.c
+#
+#OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \
+#                 -DTARGET='""$(target)""' -I$(OSCONS_SRCDIR) s-oscons-tmplt.c ; \
+#  ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
+#  ./s-oscons-tmplt.exe > s-oscons-tmplt.s
 
 ./bldtools/oscons/xoscons: xoscons.adb xutil.ads xutil.adb
        -$(MKDIR) ./bldtools/oscons
@@ -2759,13 +2730,8 @@ $(RTSDIR)/s-oscons.ads: ../stamp-gnatlib1-$(RTSDIR) s-oscons-tmplt.c gsocket.h .
            $(OSCONS_EXTRACT) ; \
            ../bldtools/oscons/xoscons s-oscons)
 
-# Don't use semicolon separated shell commands that involve list expansions.
-# The semicolon triggers a call to DCL on VMS and DCL can't handle command
-# line lengths in excess of 256 characters.
-# Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
-# is guaranteed to overflow the buffer.
-
 gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads
+       test -f $(RTSDIR)/s-oscons.ads || exit 1
 # C files
        $(MAKE) -C $(RTSDIR) \
                CC="`echo \"$(GCC_FOR_TARGET)\" \
@@ -3107,8 +3073,7 @@ socket.o  : socket.c gsocket.h
 sysdep.o  : sysdep.c
 raise.o   : raise.c raise.h
 sigtramp-armdroid.o : sigtramp-armdroid.c sigtramp.h
-sigtramp-armvxw.o : sigtramp-armvxw.c sigtramp.h
-sigtramp-ppcvxw.o : sigtramp-ppcvxw.c sigtramp.h
+sigtramp-vxworks.o : sigtramp-vxworks.c sigtramp.h
 terminals.o : terminals.c
 vx_stack_info.o : vx_stack_info.c
 
index 1436f2a..22343c6 100644 (file)
@@ -538,7 +538,6 @@ package body System.Tasking.Restricted.Stages is
 
       if CPU /= Unspecified_CPU
         and then (CPU < Integer (System.Multiprocessors.CPU_Range'First)
-          or else CPU > Integer (System.Multiprocessors.CPU_Range'Last)
           or else CPU > Integer (System.Multiprocessors.Number_Of_CPUs))
       then
          raise Tasking_Error with "CPU not in range";
index 8f1bb05..fc9975c 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                  S p e c                                 --
 --                                                                          --
---          Copyright (C) 1992-2013, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2014, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNARL 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- --
@@ -86,8 +86,10 @@ package System.Tasking is
 
    --  Sometimes we need to hold two ATCB locks at the same time. To allow us
    --  to order the locking, each ATCB is given a unique serial number. If one
-   --  needs to hold locks on several ATCBs at once, the locks with lower
-   --  serial numbers must be locked first.
+   --  needs to hold locks on two ATCBs at once, the lock with lower serial
+   --  number must be locked first. We avoid holding three or more ATCB locks,
+   --  because that can easily lead to complications that cause race conditions
+   --  and deadlocks.
 
    --  We don't always need to check the serial numbers, since the serial
    --  numbers are assigned sequentially, and so:
index decfcab..fb02a53 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                  B o d y                                 --
 --                                                                          --
---         Copyright (C) 1992-2013, Free Software Foundation, Inc.          --
+--         Copyright (C) 1992-2014, Free Software Foundation, Inc.          --
 --                                                                          --
 -- GNARL 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- --
@@ -537,8 +537,6 @@ package body System.Tasking.Stages is
       if CPU /= Unspecified_CPU
         and then (CPU < Integer (System.Multiprocessors.CPU_Range'First)
                     or else
-                  CPU > Integer (System.Multiprocessors.CPU_Range'Last)
-                    or else
                   CPU > Integer (System.Multiprocessors.Number_Of_CPUs))
       then
          raise Tasking_Error with "CPU not in range";
index f7d79f9..41ddca2 100644 (file)
@@ -3470,7 +3470,6 @@ package body Sem_Ch6 is
          --  the body, which can be defined by a pragma inside the body.
 
          elsif GNATprove_Mode
-           and then Debug_Flag_QQ
            and then Full_Analysis
            and then not Inside_A_Generic
            and then Present (Spec_Id)
@@ -3499,7 +3498,6 @@ package body Sem_Ch6 is
       --  body, which can be defined by a pragma inside the body.
 
       elsif GNATprove_Mode
-        and then Debug_Flag_QQ
         and then Full_Analysis
         and then not Inside_A_Generic
         and then Present (Spec_Id)
@@ -3637,7 +3635,6 @@ package body Sem_Ch6 is
 
       if SPARK_Mode /= On
         and then GNATprove_Mode
-        and then Debug_Flag_QQ
         and then Present (Spec_Id)
         and then Nkind (Parent (Parent (Spec_Id))) = N_Subprogram_Declaration
       then