Commit 93a87598 by Arnaud Charlet

[multiple changes]

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
parent 1399d355
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> 2014-07-30 Bob Duff <duff@adacore.com>
* exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
......
...@@ -66,47 +66,11 @@ $(ADA_GEN_SUBDIR)/stamp-nmake: $(ADA_GEN_SUBDIR)/sinfo.ads $(ADA_GEN_SUBDIR)/nma ...@@ -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 $(MOVE_IF_CHANGE) $(ADA_GEN_SUBDIR)/bldtools/nmake/nmake.adb $(ADA_GEN_SUBDIR)/nmake.adb
touch $(ADA_GEN_SUBDIR)/stamp-nmake touch $(ADA_GEN_SUBDIR)/stamp-nmake
# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust $(ADA_GEN_SUBDIR)/bldtools/oscons/xoscons : $(ADA_GEN_SUBDIR)/xoscons.adb $(ADA_GEN_SUBDIR)/xutil.ads $(ADA_GEN_SUBDIR)/xutil.adb
# 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
-$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/oscons -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/oscons
$(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/oscons/,$(notdir $^)) $(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/oscons/,$(notdir $^))
$(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/oscons $(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/oscons
_oscons_srcdir=`cd $(<D) && pwd` ; \ cd $(ADA_GEN_SUBDIR)/bldtools/oscons ; gnatmake -q xoscons
(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
$(ADA_GEN_SUBDIR)/sdefault.adb: $(ADA_GEN_SUBDIR)/stamp-sdefault ; @true $(ADA_GEN_SUBDIR)/sdefault.adb: $(ADA_GEN_SUBDIR)/stamp-sdefault ; @true
$(ADA_GEN_SUBDIR)/stamp-sdefault : $(srcdir)/version.c Makefile $(ADA_GEN_SUBDIR)/stamp-sdefault : $(srcdir)/version.c Makefile
......
...@@ -1361,14 +1361,18 @@ __gnat_tmp_name (char *tmp_filename) ...@@ -1361,14 +1361,18 @@ __gnat_tmp_name (char *tmp_filename)
} }
#elif defined (linux) || defined (__FreeBSD__) || defined (__NetBSD__) \ #elif defined (linux) || defined (__FreeBSD__) || defined (__NetBSD__) \
|| defined (__OpenBSD__) || defined(__GLIBC__) || defined (__OpenBSD__) || defined(__GLIBC__) || defined (__ANDROID__)
#define MAX_SAFE_PATH 1000 #define MAX_SAFE_PATH 1000
char *tmpdir = getenv ("TMPDIR"); char *tmpdir = getenv ("TMPDIR");
/* If tmpdir is longer than MAX_SAFE_PATH, revert to default value to avoid /* If tmpdir is longer than MAX_SAFE_PATH, revert to default value to avoid
a buffer overflow. */ a buffer overflow. */
if (tmpdir == NULL || strlen (tmpdir) > MAX_SAFE_PATH) if (tmpdir == NULL || strlen (tmpdir) > MAX_SAFE_PATH)
#ifdef __ANDROID__
strcpy (tmp_filename, "/cache/gnat-XXXXXX");
#else
strcpy (tmp_filename, "/tmp/gnat-XXXXXX"); strcpy (tmp_filename, "/tmp/gnat-XXXXXX");
#endif
else else
sprintf (tmp_filename, "%s/gnat-XXXXXX", tmpdir); sprintf (tmp_filename, "%s/gnat-XXXXXX", tmpdir);
......
...@@ -80,7 +80,7 @@ package body Debug is ...@@ -80,7 +80,7 @@ package body Debug is
-- dN No file name information in exception messages -- dN No file name information in exception messages
-- dO Output immediate error messages -- dO Output immediate error messages
-- dP Do not check for controlled objects in preelaborable packages -- 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 -- dR Bypass check for correct version of s-rpc
-- dS Never convert numbers to machine numbers in Sem_Eval -- dS Never convert numbers to machine numbers in Sem_Eval
-- dT Convert to machine numbers only for constant declarations -- dT Convert to machine numbers only for constant declarations
...@@ -438,9 +438,10 @@ package body Debug is ...@@ -438,9 +438,10 @@ package body Debug is
-- in preelaborable packages, but this restriction is a huge pain, -- in preelaborable packages, but this restriction is a huge pain,
-- especially in the predefined library units. -- especially in the predefined library units.
-- dQ Enable inlining in GNATprove mode. Although expansion is not set in -- dQ Enable inlining of bodies-without-decl in GNATprove mode. A decl is
-- GNATprove mode, inlining is useful for improving the precision of -- created by the frontend so that the usual frontend inlining
-- formal verification. Under a debug flag until fully reliable. -- 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 -- dR Bypass the check for a proper version of s-rpc being present
-- to use the -gnatz? switch. This allows debugging of the use -- to use the -gnatz? switch. This allows debugging of the use
......
...@@ -34,8 +34,6 @@ with Ada.Exceptions; use Ada.Exceptions; ...@@ -34,8 +34,6 @@ with Ada.Exceptions; use Ada.Exceptions;
with Ada.Finalization; with Ada.Finalization;
with Ada.Unchecked_Conversion; with Ada.Unchecked_Conversion;
with Interfaces.C.Strings;
with GNAT.Sockets.Thin_Common; use GNAT.Sockets.Thin_Common; with GNAT.Sockets.Thin_Common; use GNAT.Sockets.Thin_Common;
with GNAT.Sockets.Thin; use GNAT.Sockets.Thin; with GNAT.Sockets.Thin; use GNAT.Sockets.Thin;
...@@ -1412,7 +1410,6 @@ package body GNAT.Sockets is ...@@ -1412,7 +1410,6 @@ package body GNAT.Sockets is
function Inet_Addr (Image : String) return Inet_Addr_Type is function Inet_Addr (Image : String) return Inet_Addr_Type is
use Interfaces.C; use Interfaces.C;
use Interfaces.C.Strings;
Img : aliased char_array := To_C (Image); Img : aliased char_array := To_C (Image);
Addr : aliased C.int; Addr : aliased C.int;
...@@ -1710,7 +1707,6 @@ package body GNAT.Sockets is ...@@ -1710,7 +1707,6 @@ package body GNAT.Sockets is
------------------------ ------------------------
procedure Raise_Socket_Error (Error : Integer) is procedure Raise_Socket_Error (Error : Integer) is
use type C.Strings.chars_ptr;
begin begin
raise Socket_Error with raise Socket_Error with
Err_Code_Image (Error) & Socket_Error_Message (Error); Err_Code_Image (Error) & Socket_Error_Message (Error);
...@@ -2421,7 +2417,6 @@ package body GNAT.Sockets is ...@@ -2421,7 +2417,6 @@ package body GNAT.Sockets is
function To_Host_Entry (E : Hostent_Access) return Host_Entry_Type is function To_Host_Entry (E : Hostent_Access) return Host_Entry_Type is
use type C.size_t; use type C.size_t;
use C.Strings;
Aliases_Count, Addresses_Count : Natural; Aliases_Count, Addresses_Count : Natural;
...@@ -2549,7 +2544,6 @@ package body GNAT.Sockets is ...@@ -2549,7 +2544,6 @@ package body GNAT.Sockets is
---------------------- ----------------------
function To_Service_Entry (E : Servent_Access) return Service_Entry_Type is function To_Service_Entry (E : Servent_Access) return Service_Entry_Type is
use C.Strings;
use type C.size_t; use type C.size_t;
Aliases_Count : Natural; Aliases_Count : Natural;
......
...@@ -538,7 +538,6 @@ package body System.Tasking.Restricted.Stages is ...@@ -538,7 +538,6 @@ package body System.Tasking.Restricted.Stages is
if CPU /= Unspecified_CPU if CPU /= Unspecified_CPU
and then (CPU < Integer (System.Multiprocessors.CPU_Range'First) 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)) or else CPU > Integer (System.Multiprocessors.Number_Of_CPUs))
then then
raise Tasking_Error with "CPU not in range"; raise Tasking_Error with "CPU not in range";
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -86,8 +86,10 @@ package System.Tasking is ...@@ -86,8 +86,10 @@ package System.Tasking is
-- Sometimes we need to hold two ATCB locks at the same time. To allow us -- 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 -- 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 -- needs to hold locks on two ATCBs at once, the lock with lower serial
-- serial numbers must be locked first. -- 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 -- We don't always need to check the serial numbers, since the serial
-- numbers are assigned sequentially, and so: -- numbers are assigned sequentially, and so:
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -537,8 +537,6 @@ package body System.Tasking.Stages is ...@@ -537,8 +537,6 @@ package body System.Tasking.Stages is
if CPU /= Unspecified_CPU if CPU /= Unspecified_CPU
and then (CPU < Integer (System.Multiprocessors.CPU_Range'First) and then (CPU < Integer (System.Multiprocessors.CPU_Range'First)
or else or else
CPU > Integer (System.Multiprocessors.CPU_Range'Last)
or else
CPU > Integer (System.Multiprocessors.Number_Of_CPUs)) CPU > Integer (System.Multiprocessors.Number_Of_CPUs))
then then
raise Tasking_Error with "CPU not in range"; raise Tasking_Error with "CPU not in range";
......
...@@ -3470,7 +3470,6 @@ package body Sem_Ch6 is ...@@ -3470,7 +3470,6 @@ package body Sem_Ch6 is
-- the body, which can be defined by a pragma inside the body. -- the body, which can be defined by a pragma inside the body.
elsif GNATprove_Mode elsif GNATprove_Mode
and then Debug_Flag_QQ
and then Full_Analysis and then Full_Analysis
and then not Inside_A_Generic and then not Inside_A_Generic
and then Present (Spec_Id) and then Present (Spec_Id)
...@@ -3499,7 +3498,6 @@ package body Sem_Ch6 is ...@@ -3499,7 +3498,6 @@ package body Sem_Ch6 is
-- body, which can be defined by a pragma inside the body. -- body, which can be defined by a pragma inside the body.
elsif GNATprove_Mode elsif GNATprove_Mode
and then Debug_Flag_QQ
and then Full_Analysis and then Full_Analysis
and then not Inside_A_Generic and then not Inside_A_Generic
and then Present (Spec_Id) and then Present (Spec_Id)
...@@ -3637,7 +3635,6 @@ package body Sem_Ch6 is ...@@ -3637,7 +3635,6 @@ package body Sem_Ch6 is
if SPARK_Mode /= On if SPARK_Mode /= On
and then GNATprove_Mode and then GNATprove_Mode
and then Debug_Flag_QQ
and then Present (Spec_Id) and then Present (Spec_Id)
and then Nkind (Parent (Parent (Spec_Id))) = N_Subprogram_Declaration and then Nkind (Parent (Parent (Spec_Id))) = N_Subprogram_Declaration
then then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment