Commit 2d4d7e29 by Thomas Quinot Committed by Arnaud Charlet

xoscons.adb, [...]: New files.

2008-08-05  Thomas Quinot  <quinot@adacore.com>

	* xoscons.adb, xutil.ads, xutil.adb, s-oscons-tmplt.c: New files.

	* gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Generate
	s-oscons.ads

From-SVN: r138705
parent 4ae23b62
2008-08-05 Thomas Quinot <quinot@adacore.com>
* xoscons.adb, xutil.ads, xutil.adb, s-oscons-tmplt.c: New files.
* gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Generate
s-oscons.ads
2008-08-05 Robert Dewar <dewar@adacore.com>
* opt.ads (Warn_On_Biased_Representation): New flag
......@@ -922,18 +922,47 @@ ada/sinfo.h : ada/sinfo.ads ada/xsinfo.adb
$(CP) $^ ada/bldtools/sinfo
(cd ada/bldtools/sinfo && $(GNATMAKE) -q xsinfo && ./xsinfo ../../sinfo.h )
ada/nmake.adb : ada/sinfo.ads ada/nmake.adt ada/xnmake.adb
ada/nmake.adb : ada/sinfo.ads ada/nmake.adt ada/xnmake.adb ada/xutil.ads ada/xutil.adb
-$(MKDIR) ada/bldtools/nmake_b
$(RM) $(addprefix ada/bldtools/nmake_b/,$(notdir $^))
$(CP) $^ ada/bldtools/nmake_b
(cd ada/bldtools/nmake_b && $(GNATMAKE) -q xnmake && ./xnmake -b ../../nmake.adb )
ada/nmake.ads : ada/sinfo.ads ada/nmake.adt ada/xnmake.adb ada/nmake.adb
ada/nmake.ads : ada/sinfo.ads ada/nmake.adt ada/xnmake.adb ada/nmake.adb ada/xutil.ads ada/xutil.adb
-$(MKDIR) ada/bldtools/nmake_s
$(RM) $(addprefix ada/bldtools/nmake_s/,$(notdir $^))
$(CP) $^ ada/bldtools/nmake_s
(cd ada/bldtools/nmake_s && $(GNATMAKE) -q xnmake && ./xnmake -s ../../nmake.ads )
OSCONS_CPPFLAGS=-DTHREAD_KIND_$(THREAD_KIND) s-oscons-tmplt.c
ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),)
OSCONS_CPP=../../../$(DECC) -E /comment=as_is -DNATIVE \
-DTARGET='""$(target)""' s-oscons-tmplt.c
OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \
-DTARGET='""$(target)""' s-oscons-tmplt.c ; \
ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \
./s-oscons-tmplt.exe > s-oscons-tmplt.s
else
OSCONS_CPP=../../../xgcc -B../../../ -E -C \
-DTARGET=\"$(target)\" s-oscons-tmplt.c > s-oscons-tmplt.i
OSCONS_EXTRACT=../../../xgcc -S -B../../../ s-oscons-tmplt.i
endif
ada/s-oscons.ads : ada/s-oscons-tmplt.c ada/gsocket.h ada/xoscons.adb ada/xutil.ads ada/xutil.adb
-$(MKDIR) ada/bldtools/oscons
$(RM) $(addprefix ada/bldtools/oscons/,$(notdir $^))
$(CP) $^ ada/bldtools/oscons
(cd ada/bldtools/oscons; gnatmake -q xoscons ; \
$(RM) s-oscons-tmplt.i s-oscons-tmplt.s ; \
$(OSCONS_CPP) ; \
$(OSCONS_EXTRACT) ; \
./xoscons ; \
$(RM) ../../s-oscons.ads ; \
$(CP) s-oscons.ads ../../s-oscons.ads)
update-sources : ada/treeprs.ads ada/einfo.h ada/sinfo.h ada/nmake.adb \
ada/nmake.ads
$(RM) $(addprefix $(srcdir)/ada/,$(notdir $^))
......
......@@ -1948,6 +1948,9 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
$(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
$(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
$(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
# Copy generated target dependent sources
$(RM) $(RTSDIR)/s-oscons.ads
(cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
$(RM) ../stamp-gnatlib-$(RTSDIR)
touch ../stamp-gnatlib1-$(RTSDIR)
......
------------------------------------------------------------------------------
-- --
-- GNAT SYSTEM UTILITIES --
-- --
-- X U T I L --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2008, 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
package body XUtil is
use Ada.Strings.Unbounded;
use Ada.Streams.Stream_IO;
--------------
-- New_Line --
--------------
procedure New_Line (F : Sfile) is
begin
Character'Write (Stream (F), ASCII.LF);
end New_Line;
---------
-- Put --
---------
procedure Put (F : Sfile; S : String) is
begin
String'Write (Stream (F), S);
end Put;
---------
-- Put --
---------
procedure Put (F : Sfile; S : VString) is
begin
Put (F, To_String (S));
end Put;
--------------
-- Put_Line --
--------------
procedure Put_Line (F : Sfile; S : String) is
begin
Put (F, S);
New_Line (F);
end Put_Line;
--------------
-- Put_Line --
--------------
procedure Put_Line (F : Sfile; S : VString) is
begin
Put_Line (F, To_String (S));
end Put_Line;
end XUtil;
------------------------------------------------------------------------------
-- --
-- GNAT SYSTEM UTILITIES --
-- --
-- X U T I L --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2008, 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Shared routines for the build-time code generation utilities
with Ada.Streams.Stream_IO;
with Ada.Strings.Unbounded;
package XUtil is
subtype VString is Ada.Strings.Unbounded.Unbounded_String;
subtype Sfile is Ada.Streams.Stream_IO.File_Type;
procedure Put (F : Sfile; S : String);
procedure Put (F : Sfile; S : VString);
procedure Put_Line (F : Sfile; S : String);
procedure Put_Line (F : Sfile; S : VString);
procedure New_Line (F : Sfile);
-- Similar to the same-named Ada.Text_IO routines, but ensure UNIX line
-- ending on all platforms.
end XUtil;
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