This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[FYI 4.1 stage 1 Ada] Partial merge from libada-gnattools-branch


This is the famous partial merge from the libada-gnattools-branch to introduce
a functional gnattools directory.  I plan to commit this as soon as stage 1
opens up (although I would kind of like to commit it earlier to save on trouble
with backporting in the future).

Despite the massive ChangeLog, this is just moving stuff around.  It has been
tested both native on i686-pc-linux-gnu and cross to powerpc-rtems.  It does
not affect anything but Ada.

For Ada, it means that certain configury changes should be done in
gnattools/configure.in rather than in gcc/ada/Makefile.in.  This also will mean
that you can't build gnattools "directly" in the gcc/ada subdir, at least not
trivially.  (If you're curious, you can still build it without building all
of GCC, and I'll be happy to tell anyone who wants to how to do that.)  However, I consider this a prerequisite for cleaning up the Ada build to work neatly in
all kinds of cross environments.  I also suspect that I've exposed some preexisting configury errors, which I will ask about after this is done.

(top level)
	Merged from libada-gnattools-branch:
	2004-11-28  Nathanael Nerode  <neroden@gcc.gnu.org>

	* gnattools: New directory.
	* Makefile.def: Add gnattools as a module, depending on target-libada.
	* Makefile.in: Regenerate.
	* configure.in: Include gnattools in host_tools; disable it if ada
	is disabled.
	* configure: Regenerate.

(gcc)
	* configure.ac: Rename cc_for_cross_gnattools to host_cc_for_libada.
	* configure: Regenerate.
        * libada-mk.in: Remove CC; rename
	cc_for_cross_gnattools / cc_set_by_configure to host_cc_for_libada.
	
(gcc/ada)
	Partial merge from libada-gnattools-branch:

	2004-12-02  Nathanael Nerode  <neroden@gcc.gnu.org>
        * Makefile.in: Move gnattools{1,1re,2,3,4} and corresponding flags
        into code in gnattools/Makefile.in.  Remove direct dependencies on
        stamp-tools by tools clauses.
	2004-12-02  Nathanael Nerode  <neroden@gcc.gnu.org>
        * config-lang.in: Add gnattools to $lang_dirs.
	
(libada)
2004-12-03  Nathanael Nerode  <neroden@gcc.gnu.org>

	* Makefile.in: Add stamp file for building libada, to avoid
	duplicate builds every time all-gnattools is called.

2004-12-02  Nathanael Nerode  <neroden@gcc.gnu.org>

	* Makefile.in: Build gcc/ada/Makefile (by running gcc/ada/configure)
	here.

2004-08-16  Nathanael Nerode  <neroden@gcc.gnu.org>

	* configure.ac: Replace AC_CANONICAL_SYSTEM with _BUILD, _HOST,
	_TARGET.
	* configure: Regenerate.

2004-07-18  Nathanael Nerode  <neroden@gcc.gnu.org>

	* configure.ac, Makefile.in: Remove gnattools-specific code
	(see gnattools directory).
	* Makefile.in: Remove dead rts-* targets.
	* configure: Regenerate.

(gnattools)
2005-02-02  Nathanael Nerode  <neroden@gcc.gnu.org>

        * Makefile.in: Remove use of cc_set_by_configure; just use
        plain old CC from the top level in this case.

2005-01-30  Nathanael Nerode  <neroden@gcc.gnu.org>
	Merge from mainline at tag libada-gnattools-merge-20050129:
	* configure.ac: Changes propagated from gcc/ada/Makefile.in.
	* Makefile.in: Changes relocated from gcc/ada/Makefile.in.

2004-12-13  Nathanael Nerode  <neroden@gcc.gnu.org>

        * Makefile.in: Reinstate stamp-gnatlib check.

2004-12-02  Nathanael Nerode  <neroden@gcc.gnu.org>

	* Makefile.in: Inline gnattools{1,1-re,2,3,4} targets from
	gcc/ada/configure.ac into gnattools-native and gnattools-cross
	targets, collecting flags as appropriate from here,
	gcc/ada/Makefile.in, gcc/ada/configure.ac, etc.  Attempt to retain
	identical behavior.
	* configure.ac: Add necessary configure bits from
	gcc/ada/configure.ac.
	* configure: Regenerate.

2004-08-16  Nathanael Nerode  <neroden@gcc.gnu.org>

	* configure.ac: Replace AC_CANONICAL_SYSTEM with _BUILD, _HOST,
	_TARGET.  Replace _GCC_TOPLEV_NONCANONICAL_TARGET with
	ACX_NONCANONICAL_TARGET, and replace now-redundant AC_SUBST.
	* configure: Regenerate.

2004-07-18  Nathanael Nerode  <neroden@gcc.gnu.org>

	* Makefile.in, configure.ac: Remove libada-specific targets and
	variables.
	* configure: Regenerate.
	* New directory, cloned from libada.

Index: Makefile.def
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.def,v
retrieving revision 1.46
diff -u -r1.46 Makefile.def
--- Makefile.def	17 Jan 2005 23:50:25 -0000	1.46
+++ Makefile.def	12 Feb 2005 00:47:30 -0000
@@ -111,6 +111,7 @@
                 missing=distclean;
                 missing=maintainer-clean; };
 host_modules= { module= utils; no_check=true; };
+host_modules= { module= gnattools; };
 
 target_modules = { module= libstdc++-v3; raw_cxx=true; };
 target_modules = { module= libmudflap; };
@@ -273,6 +274,8 @@
 
 dependencies = { module=all-fixincludes; on=all-libiberty; };
 
+dependencies = { module=all-gnattools; on=all-target-libada; };
+
 // Host modules specific to gdb.
 dependencies = { module=configure-gdb; on=configure-itcl; };
 dependencies = { module=configure-gdb; on=configure-tcl; };
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.339
diff -u -r1.339 configure.in
--- configure.in	29 Jan 2005 04:22:08 -0000	1.339
+++ configure.in	12 Feb 2005 00:48:01 -0000
@@ -148,7 +148,7 @@
 # know that we are building the simulator.
 # binutils, gas and ld appear in that order because it makes sense to run
 # "make check" in that particular order.
-host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar"
+host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
 
 # libgcj represents the runtime libraries only used by gcj.
 libgcj="target-libffi \
@@ -320,6 +320,7 @@
 ENABLE_LIBADA=yes)
 if test "${ENABLE_LIBADA}" != "yes" ; then
   noconfigdirs="$noconfigdirs target-libada"
+  noconfigdirs="$noconfigdirs gnattools"
 fi
 
 # Save it here so that, even in case of --enable-libgcj, if the Java
Index: gcc/configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.ac,v
retrieving revision 2.94
diff -u -r2.94 configure.ac
--- gcc/configure.ac	7 Feb 2005 23:10:54 -0000	2.94
+++ gcc/configure.ac	12 Feb 2005 00:48:18 -0000
@@ -1519,10 +1519,9 @@
 		;;
 esac
 
-# This is a terrible hack which will go away when a gnattools directory
-# is created.
-cc_for_cross_gnattools=${CC}
-AC_SUBST(cc_for_cross_gnattools)
+# This is a terrible hack which will go away some day.
+host_cc_for_libada=${CC}
+AC_SUBST(host_cc_for_libada)
 
 out_object_file=`basename $out_file .c`.o
 
Index: gcc/libada-mk.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/libada-mk.in,v
retrieving revision 2.2
diff -u -r2.2 libada-mk.in
--- gcc/libada-mk.in	7 Feb 2005 23:10:54 -0000	2.2
+++ gcc/libada-mk.in	12 Feb 2005 00:48:18 -0000
@@ -26,9 +26,6 @@
 gcc_version=@gcc_version@
 NOCOMMON_FLAG=@nocommon_flag@
 WARN_CFLAGS=@warn_cflags@
-cc_set_by_configure=@cc_for_cross_gnattools@
 gcc_tmake_file=@tmake_file@
 gcc_xmake_file=@xmake_file@
-
-# This really shouldn't be needed, but for now...
-CC=@CC@
+host_cc_for_libada=@host_cc_for_libada@
Index: gcc/ada/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/Makefile.in,v
retrieving revision 1.110
diff -u -r1.110 Makefile.in
--- gcc/ada/Makefile.in	10 Feb 2005 13:55:32 -0000	1.110
+++ gcc/ada/Makefile.in	12 Feb 2005 00:48:33 -0000
@@ -193,9 +193,6 @@
 # List of extra object files linked in with various programs.
 EXTRA_GNATTOOLS_OBJS = ../../prefix.o ../../version.o
 
-# List extra gnattools
-EXTRA_GNATTOOLS =
-
 # List of target dependent sources, overridden below as necessary
 TARGET_ADA_SRCS =
 
@@ -1478,45 +1475,14 @@
 ADA_INCLUDE_SRCS =\
  ada.ads calendar.ads directio.ads gnat.ads interfac.ads ioexcept.ads \
  machcode.ads text_io.ads unchconv.ads unchdeal.ads \
- sequenio.ads system.ads Makefile.adalib memtrack.adb \
+ sequenio.ads system.ads memtrack.adb \
  a-*.adb a-*.ads g-*.ad? i-*.ad? \
  s-[a-o]*.adb s-[p-z]*.adb \
  s-[a-o]*.ads s-[p-z]*.ads
 
 LIBGNAT=../rts/libgnat.a 
-TOOLS_FLAGS_TO_PASS=		\
-        "CC=$(CC)" 		\
-        "CFLAGS=$(CFLAGS)"	\
-	"LDFLAGS=$(LDFLAGS)"	\
-        "ADAFLAGS=$(ADAFLAGS)"	\
-        "INCLUDES=$(INCLUDES_FOR_SUBDIR)"\
-	"ADA_INCLUDES=$(ADA_INCLUDES) $(ADA_INCLUDES_FOR_SUBDIR)"\
-	"libsubdir=$(libsubdir)"	\
-	"exeext=$(exeext)"	\
-	"fsrcdir=$(fsrcdir)"	\
-	"srcdir=$(fsrcdir)"	\
-        "TOOLS_LIBS=$(TOOLS_LIBS) $(TGT_LIB)"	\
-	"GNATMAKE=$(GNATMAKE)"	\
-	"GNATLINK=$(GNATLINK)"	\
-	"GNATBIND=$(GNATBIND)"
-
 GCC_LINK="$(CC) -static-libgcc $(ADA_INCLUDES)"
 
-# Build directory for the tools. Let's copy the target-dependent
-# sources using the same mechanism as for gnatlib. The other sources are 
-# accessed using the vpath directive below
-
-../stamp-tools:
-	-$(RM) tools/*
-	-$(RMDIR) tools
-	-$(MKDIR) tools
-	-(cd tools; $(LN_S) ../sdefault.adb .)
-	-$(foreach PAIR,$(TOOLS_TARGET_PAIRS), \
-	          $(RM) tools/$(word 1,$(subst <, ,$(PAIR)));\
-	          $(LN_S) $(fsrcdir)/$(word 2,$(subst <, ,$(PAIR))) \
-	                tools/$(word 1,$(subst <, ,$(PAIR)));)
-	touch ../stamp-tools
-
 # when compiling the tools, the runtime has to be first on the path so that
 # it hides the runtime files lying with the rest of the sources
 ifeq ($(TOOLSCASE),native)
@@ -1535,113 +1501,73 @@
   vpath %.h   ../
 endif
 
-# gnatmake/link tools cannot always be built with gnatmake/link for bootstrap 
-# reasons: gnatmake should be built with a recent compiler, a recent compiler
-# may not generate ALI files compatible with an old gnatmake so it is important
-# to be able to build gnatmake without a version of gnatmake around. Once 
-# everything has been compiled once, gnatmake can be recompiled with itself 
-# (see target gnattools1-re) 
-gnattools1: ../stamp-tools ../stamp-gnatlib
-	$(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
-	  TOOLSCASE=native \
-	  ../../gnatmake$(exeext) ../../gnatlink$(exeext) ../../gnatbl$(exeext)
-
-# gnatmake/link can be built with recent gnatmake/link if they are available.
-# This is especially convenient for building cross tools or for rebuilding
-# the tools when the original bootstrap has already be done.
-gnattools1-re: ../stamp-tools
-	$(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
-	  TOOLSCASE=cross INCLUDES="" gnatmake-re gnatlink-re
-
-# these tools are built with gnatmake & are common to native and cross
-gnattools2: ../stamp-tools
-	$(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
-	  TOOLSCASE=native \
-	  ../../gnatchop$(exeext) ../../gnat$(exeext) ../../gnatkr$(exeext) \
-	  ../../gnatls$(exeext) ../../gnatprep$(exeext) \
-	  ../../gnatxref$(exeext) \
-	  ../../gnatfind$(exeext) ../../gnatname$(exeext) \
-	  ../../gnatclean$(exeext) ../../gprmake$(exeext)
-
-# These tools are only built for the native version.
-gnattools3: ../stamp-tools
-ifneq ($(EXTRA_GNATTOOLS),)
-	$(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
-	  TOOLSCASE=native top_builddir=../../.. $(EXTRA_GNATTOOLS)
-endif
-
-# those tools are only built for the cross version
-gnattools4: ../stamp-tools
-	$(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \
-	  TOOLSCASE=cross top_buildir=../../.. \
-           ../../vxaddr2line$(exeext)
 
-../../gnatchop$(exeext): ../stamp-tools
+../../gnatchop$(exeext): 
 	$(GNATMAKE) -c $(ADA_INCLUDES) gnatchop --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatchop 
 	$(GNATLINK) -v gnatchop -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
 
-../../gnat$(exeext): ../stamp-tools
+../../gnat$(exeext): 
 	$(GNATMAKE) -c $(ADA_INCLUDES) gnatcmd --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatcmd 
 	$(GNATLINK) -v gnatcmd -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
 
-../../gnatkr$(exeext): ../stamp-tools
+../../gnatkr$(exeext): 
 	$(GNATMAKE) -c $(ADA_INCLUDES) gnatkr --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatkr 
 	$(GNATLINK) -v gnatkr -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
 
-../../gnatls$(exeext): ../stamp-tools
+../../gnatls$(exeext): 
 	$(GNATMAKE) -c $(ADA_INCLUDES) gnatls --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatls 
 	$(GNATLINK) -v gnatls -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
 
-../../gnatname$(exeext): ../stamp-tools
+../../gnatname$(exeext): 
 	$(GNATMAKE) -c $(ADA_INCLUDES) gnatname --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatname 
 	$(GNATLINK) -v gnatname -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
 
-../../gprmake$(exeext): ../stamp-tools
+../../gprmake$(exeext): 
 	$(GNATMAKE) -c $(ADA_INCLUDES) gprmake --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gprmake
 	$(GNATLINK) -v gprmake -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
 
-../../gnatprep$(exeext): ../stamp-tools
+../../gnatprep$(exeext): 
 	$(GNATMAKE) -c $(ADA_INCLUDES) gnatprep --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatprep 
 	$(GNATLINK) -v gnatprep -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
 
-../../gnatxref$(exeext): ../stamp-tools
+../../gnatxref$(exeext): 
 	$(GNATMAKE) -c $(ADA_INCLUDES) gnatxref --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatxref 
 	$(GNATLINK) -v gnatxref -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
 
-../../gnatfind$(exeext): ../stamp-tools
+../../gnatfind$(exeext): 
 	$(GNATMAKE) -c $(ADA_INCLUDES) gnatfind --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatfind 
 	$(GNATLINK) -v gnatfind -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
 
-../../gnatclean$(exeext): ../stamp-tools
+../../gnatclean$(exeext): 
 	$(GNATMAKE) -c $(ADA_INCLUDES) gnatclean --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatclean
 	$(GNATLINK) -v gnatclean -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
 
-../../gnatsym$(exeext): ../stamp-tools
+../../gnatsym$(exeext): 
 	$(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym
 	$(GNATLINK) -v gnatsym -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
 
-../../gnatdll$(exeext): ../stamp-tools
+../../gnatdll$(exeext): 
 	$(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) $(GNATBIND_FLAGS) gnatdll
 	$(GNATLINK) -v gnatdll -o $@ --GCC=$(GCC_LINK) $(TOOLS_LIBS)
 
-../../vxaddr2line$(exeext): ../stamp-tools
+../../vxaddr2line$(exeext): 
 	$(GNATMAKE) -c  $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line 
 	$(GNATLINK) -v vxaddr2line -o $@ --GCC=$(GCC_LINK) $(CLIB)
 
-gnatmake-re: ../stamp-tools link.o
+gnatmake-re:  link.o
 	$(GNATMAKE) $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)"
 	$(GNATMAKE) -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake 
@@ -1650,7 +1576,7 @@
 
 # Note the use of the "mv" command in order to allow gnatlink to be linked with
 # with the former version of gnatlink itself which cannot override itself.
-gnatlink-re: ../stamp-tools link.o
+gnatlink-re:  link.o
 	$(GNATMAKE) -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)"
 	$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink 
 	$(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \
Index: gcc/ada/config-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/config-lang.in,v
retrieving revision 1.14
diff -u -r1.14 config-lang.in
--- gcc/ada/config-lang.in	11 Aug 2004 04:10:11 -0000	1.14
+++ gcc/ada/config-lang.in	12 Feb 2005 00:48:34 -0000
@@ -39,6 +39,7 @@
 outputs=ada/Makefile
 
 target_libs="target-libada"
+lang_dirs="gnattools"
 
 # Ada will not work until the front end starts emitting GIMPLE trees.
 build_by_default=no

Index: gnattools/Makefile.in
===================================================================
RCS file: gnattools/Makefile.in
diff -N gnattools/Makefile.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnattools/Makefile.in	12 Feb 2005 00:48:53 -0000
@@ -0,0 +1,338 @@
+# Makefile for gnattools
+#   Copyright 2003, 2004 Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT 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
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Default target; must be first.
+all: gnattools
+
+# Standard autoconf-set variables.
+SHELL = @SHELL@
+srcdir = @srcdir@
+build = @build@
+target = @target@
+prefix = @prefix@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+
+# Nonstandard autoconf-set variables.
+LN_S=@LN_S@
+target_noncanonical=@target_noncanonical@
+
+# Variables for the user (or the top level) to override.
+objext=.o
+TRACE=no
+ADA_FOR_BUILD=
+ADA_FOR_TARGET=
+LDFLAGS=
+STAGE_PREFIX=
+PWD_COMMAND = $${PWDCMD-pwd}
+
+# The tedious process of getting CFLAGS right.
+CFLAGS=-g
+LOOSE_WARN = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
+GCC_WARN_CFLAGS = $(LOOSE_WARN) $(NOCOMMON_FLAG)
+
+ADA_CFLAGS=
+T_ADA_CFLAGS=
+# HPPA is literally the only target which sets X_ADA_CFLAGS
+X_ADA_CFLAGS=@x_ada_cflags@
+ALL_ADA_CFLAGS=$(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS)
+
+# Variables for gnattools.
+ADAFLAGS= -gnatpg -gnata
+ADA_INCLUDE_DIR = $(libsubdir)/adainclude
+ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
+
+# For finding the GCC build dir, which is used far too much
+GCC_DIR=../gcc
+# Include fragment generated by GCC configure; shared with libada for now.
+include $(GCC_DIR)/libada-mk
+# Variables based on those gleaned from the GCC makefile.  :-P
+libsubdir=$(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
+
+# Get possible host-specific override for libsubdir (ick).
+xmake_file=$(subst /config,/../gcc/config,$(gcc_xmake_file))
+ifneq ($(xmake_file),)
+include $(xmake_file)
+endif
+
+# Absolute srcdir for gcc/ada (why do we want absolute?  I dunno)
+fsrcdir := $(shell cd $(srcdir)/../gcc/ada/; ${PWD_COMMAND})
+
+# Useful "subroutines" for the excess includes
+INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir) -I$(fsrcdir)/../config \
+	-I$(fsrcdir)/../../include -I$(fsrcdir)/..
+ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)
+
+# Variables for gnattools1, native
+TOOLS_FLAGS_TO_PASS_1= \
+	"CC=../../xgcc -B../../" \
+	"CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
+	"LDFLAGS=$(LDFLAGS)" \
+	"ADAFLAGS=$(ADAFLAGS)" \
+	"INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
+	"ADA_INCLUDES=-I- -I../rts $(ADA_INCLUDES_FOR_SUBDIR)"\
+	"exeext=$(exeext)" \
+	"fsrcdir=$(fsrcdir)" \
+	"srcdir=$(fsrcdir)" \
+	"GNATBIND=../../gnatbind" \
+	"TOOLSCASE=native"
+
+# Variables for regnattools
+TOOLS_FLAGS_TO_PASS_1re= \
+	"CC=../../xgcc -B../../" \
+	"CFLAGS=$(CFLAGS)" \
+	"ADAFLAGS=$(ADAFLAGS)" \
+	"INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
+	"ADA_INCLUDES=-I../rts $(ADA_INCLUDES_FOR_SUBDIR)"\
+	"exeext=$(exeext)" \
+	"fsrcdir=$(fsrcdir)" \
+	"srcdir=$(fsrcdir)" \
+	"GNATMAKE=../../gnatmake" \
+	"GNATLINK=../../gnatlink" \
+	"GNATBIND=../../gnatbind" \
+	"TOOLSCASE=cross" \
+	"INCLUDES="
+
+# Variables for gnattools2, native
+TOOLS_FLAGS_TO_PASS_NATIVE= \
+	"CC=../../xgcc -B../../" \
+	"CFLAGS=$(CFLAGS)" \
+	"ADAFLAGS=$(ADAFLAGS)" \
+	"INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
+	"ADA_INCLUDES=-I../rts $(ADA_INCLUDES_FOR_SUBDIR)" \
+	"exeext=$(exeext)" \
+	"fsrcdir=$(fsrcdir)" \
+	"srcdir=$(fsrcdir)" \
+	"GNATMAKE=../../gnatmake" \
+	"GNATLINK=../../gnatlink" \
+	"GNATBIND=../../gnatbind" \
+	"TOOLSCASE=native"
+
+# Variables for gnattools, cross
+TOOLS_FLAGS_TO_PASS_CROSS= \
+	"CC=$(CC)" \
+	"CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
+	"LDFLAGS=$(LDFLAGS)" \
+	"ADAFLAGS=$(ADAFLAGS)"	\
+	"INCLUDES=$(INCLUDES_FOR_SUBDIR)" \
+	"ADA_INCLUDES=-I$(RTS_DIR)../adainclude -I$(RTS_DIR) $(ADA_INCLUDES_FOR_SUBDIR)" \
+	"exeext=$(exeext)" \
+	"fsrcdir=$(fsrcdir)" \
+	"srcdir=$(fsrcdir)" \
+	"GNATMAKE=gnatmake" \
+	"GNATLINK=gnatlink" \
+	"GNATBIND=gnatbind" \
+	"TOOLSCASE=cross" \
+	"LIBGNAT="
+
+# File lists
+# ----------
+
+# File associations set by configure
+EXTRA_GNATTOOLS = @EXTRA_GNATTOOLS@
+TOOLS_TARGET_PAIRS = @TOOLS_TARGET_PAIRS@
+
+# These are built by gnatmake, and in both native and cross configurations.
+GNATTOOLS2_FILES = \
+	../../gnatchop$(exeext) \
+	../../gnat$(exeext) \
+	../../gnatkr$(exeext) \
+	../../gnatls$(exeext) \
+	../../gnatprep$(exeext) \
+	../../gnatxref$(exeext) \
+	../../gnatfind$(exeext) \
+	../../gnatname$(exeext) \
+	../../gnatclean$(exeext) \
+	../../gprmake$(exeext)
+
+# Makefile targets
+# ----------------
+
+.PHONY: gnattools gnattools-native gnattools-cross regnattools
+gnattools: @default_gnattools_target@
+
+# Sanity check
+$(GCC_DIR)/stamp-gnatlib:
+	@if [ ! -f $(GCC_DIR)/stamp-gnatlib ] ; \
+        then \
+          echo Can't build gnattools while gnatlib is out of date or unbuilt ; \
+          false; \
+        else \
+          true; \
+        fi
+
+
+# Build directory for the tools. Let's copy the target-dependent
+# sources using the same mechanism as for gnatlib. The other sources are
+# accessed using the vpath directive in ada/Makefile.in
+
+$(GCC_DIR)/stamp-tools:
+	-rm -rf $(GCC_DIR)/ada/tools
+	-mkdir -p $(GCC_DIR)/ada/tools
+	-(cd $(GCC_DIR)/ada/tools; $(LN_S) ../sdefault.adb .)
+	-$(foreach PAIR,$(TOOLS_TARGET_PAIRS), \
+	          rm -f $(GCC_DIR)/ada/tools/$(word 1,$(subst <, ,$(PAIR)));\
+	          $(LN_S) $(fsrcdir)/$(word 2,$(subst <, ,$(PAIR))) \
+	                $(GCC_DIR)/ada/tools/$(word 1,$(subst <, ,$(PAIR)));)
+	touch $(GCC_DIR)/stamp-tools
+
+# gnatmake/link tools cannot always be built with gnatmake/link for bootstrap 
+# reasons: gnatmake should be built with a recent compiler, a recent compiler
+# may not generate ALI files compatible with an old gnatmake so it is important
+# to be able to build gnatmake without a version of gnatmake around. Once 
+# everything has been compiled once, gnatmake can be recompiled with itself 
+# (see target regnattools) 
+gnattools-native: $(GCC_DIR)/stamp-tools $(GCC_DIR)/stamp-gnatlib
+	# gnattools1
+	$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
+	  $(TOOLS_FLAGS_TO_PASS_1) \
+	  ../../gnatmake$(exeext) ../../gnatlink$(exeext) ../../gnatbl$(exeext)
+	# gnattools2
+	$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
+	  $(TOOLS_FLAGS_TO_PASS_NATIVE) \
+	  $(GNATTOOLS2_FILES)
+
+# gnatmake/link can be built with recent gnatmake/link if they are available.
+# This is especially convenient for building cross tools or for rebuilding
+# the tools when the original bootstrap has already be done.
+regnattools: $(GCC_DIR)/stamp-gnatlib
+	# gnattools1-re
+	$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
+	  $(TOOLS_FLAGS_TO_PASS_1re) \
+	  gnatmake-re gnatlink-re
+	# gnattools2
+	$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
+	  $(TOOLS_FLAGS_TO_PASS_NATIVE) \
+	  $(GNATTOOLS2_FILES)
+
+# For cross builds of gnattools,
+# put the host RTS dir first in the PATH to hide the default runtime
+# files that are among the sources
+# FIXME: This should be done in configure.
+RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib )))
+gnattools-cross: $(GCC_DIR)/stamp-tools $(GCC_DIR)/stamp-gnatlib
+	# gnattools1-re
+	$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
+	  $(TOOLS_FLAGS_TO_PASS_CROSS) INCLUDES="" \
+	  gnatmake-re gnatlink-re
+	# gnattools2
+	$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
+	  $(TOOLS_FLAGS_TO_PASS_CROSS) \
+	  $(GNATTOOLS2_FILES)
+	# gnattools4 (cross only)
+	$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
+	  $(TOOLS_FLAGS_TO_PASS_CROSS) \
+	  top_buildir=../../.. \
+           ../../vxaddr2line$(exeext)
+	# Rename cross tools to where the GCC makefile wants them when
+	# installing.  FIXME: installation should be done elsewhere.
+	if [ -f $(GCC_DIR)/gnatbind$(exeext) ] ; then \
+	  mv $(GCC_DIR)/gnatbind$(exeext) $(GCC_DIR)/gnatbind-cross$(exeext); \
+	fi
+	if [ -f $(GCC_DIR)/gnatbl$(exeext) ] ; then \
+	  mv $(GCC_DIR)/gnatbl$(exeext) $(GCC_DIR)/gnatbl-cross$(exeext); \
+	fi
+	if [ -f $(GCC_DIR)/gnatchop$(exeext) ] ; then \
+	  mv $(GCC_DIR)/gnatchop$(exeext) $(GCC_DIR)/gnatchop-cross$(exeext); \
+	fi
+	if [ -f $(GCC_DIR)/gnat$(exeext) ] ; then \
+	  mv $(GCC_DIR)/gnat$(exeext) $(GCC_DIR)/gnat-cross$(exeext); \
+	fi
+	if [ -f $(GCC_DIR)/gnatkr$(exeext) ] ; then \
+	  mv $(GCC_DIR)/gnatkr$(exeext) $(GCC_DIR)/gnatkr-cross$(exeext); \
+	fi
+	if [ -f $(GCC_DIR)/gnatlink$(exeext) ] ; then \
+	  mv $(GCC_DIR)/gnatlink$(exeext) $(GCC_DIR)/gnatlink-cross$(exeext); \
+	fi
+	if [ -f $(GCC_DIR)/gnatls$(exeext) ] ; then \
+	  mv $(GCC_DIR)/gnatls$(exeext) $(GCC_DIR)/gnatls-cross$(exeext); \
+	fi
+	if [ -f $(GCC_DIR)/gnatmake$(exeext) ] ; then \
+	  mv $(GCC_DIR)/gnatmake$(exeext) $(GCC_DIR)/gnatmake-cross$(exeext); \
+	fi
+	if [ -f $(GCC_DIR)/gnatmem$(exeext) ] ; then \
+	  mv $(GCC_DIR)/gnatmem$(exeext) $(GCC_DIR)/gnatmem-cross$(exeext); \
+	fi
+	if [ -f $(GCC_DIR)/gnatname$(exeext) ] ; then \
+	  mv $(GCC_DIR)/gnatname$(exeext) $(GCC_DIR)/gnatname-cross$(exeext); \
+	fi
+	if [ -f $(GCC_DIR)/gnatprep$(exeext) ] ; then \
+	  mv $(GCC_DIR)/gnatprep$(exeext) $(GCC_DIR)/gnatprep-cross$(exeext); \
+	fi
+	if [ -f $(GCC_DIR)/gnatxref$(exeext) ] ; then \
+	  mv $(GCC_DIR)/gnatxref$(exeext) $(GCC_DIR)/gnatxref-cross$(exeext); \
+	fi
+	if [ -f $(GCC_DIR)/gnatfind$(exeext) ] ; then \
+	  mv $(GCC_DIR)/gnatfind$(exeext) $(GCC_DIR)/gnatfind-cross$(exeext); \
+	fi
+	if [ -f $(GCC_DIR)/gnatclean$(exeext) ] ; then \
+	  mv $(GCC_DIR)/gnatclean$(exeext) $(GCC_DIR)/gnatclean-cross$(exeext); \
+	fi
+	if [ -f $(GCC_DIR)/gnatsym$(exeext) ] ; then \
+	  mv $(GCC_DIR)/gnatsym$(exeext) $(GCC_DIR)/gnatsym-cross$(exeext); \
+	fi
+
+# Other
+# -----
+
+# Check uninstalled version.
+check:
+
+# Check installed version.
+installcheck:
+
+# Build info (none here).
+info:
+
+# Build DVI (none here).
+dvi:
+
+# Build TAGS (none here).
+TAGS:
+
+# Installation rules.
+install:
+
+install-info:
+
+# Cleaning rules.
+mostlyclean:
+
+clean:
+
+distclean:
+	$(RM) Makefile config.status config.log
+
+maintainer-clean:
+
+# Rules for rebuilding this Makefile.
+Makefile: $(srcdir)/Makefile.in config.status
+	CONFIG_FILES=$@ ; \
+	CONFIG_HEADERS= ; \
+	$(SHELL) ./config.status
+
+config.status: $(srcdir)/configure
+	$(SHELL) ./config.status --recheck
+
+$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac
+	cd $(srcdir) && autoconf
+
+# Don't export variables to the environment, in order to not confuse
+# configure.
+.NOEXPORT:
+
Index: gnattools/configure.ac
===================================================================
RCS file: gnattools/configure.ac
diff -N gnattools/configure.ac
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnattools/configure.ac	12 Feb 2005 00:48:55 -0000
@@ -0,0 +1,163 @@
+# Configure script for libada.
+#   Copyright 2003, 2004 Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT 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
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+AC_INIT
+AC_PREREQ([2.59])
+
+AC_CONFIG_SRCDIR([Makefile.in])
+
+# Command-line options.
+# Very limited version of AC_MAINTAINER_MODE.
+AC_ARG_ENABLE([maintainer-mode],
+  [AC_HELP_STRING([--enable-maintainer-mode],
+                 [enable make rules and dependencies not useful (and
+                  sometimes confusing) to the casual installer])],
+  [case ${enable_maintainer_mode} in
+     yes) MAINT='' ;;
+     no) MAINT='#' ;;
+     *) AC_MSG_ERROR([--enable-maintainer-mode must be yes or no]) ;;
+   esac
+   maintainer_mode=${enableval}],
+  [MAINT='#'])
+AC_SUBST([MAINT])dnl
+
+# Start of actual configure tests
+
+AC_PROG_INSTALL
+
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+
+sinclude(../config/acx.m4)
+ACX_NONCANONICAL_TARGET
+
+# Need to pass this down for now :-P
+AC_PROG_LN_S
+
+# Determine x_ada_cflags
+case $host in
+  hppa*) x_ada_cflags=-mdisable-indexing ;;
+  *) x_ada_cflags= ;;
+esac
+AC_SUBST([x_ada_cflags])
+
+# Determine what to build for 'gnattools'
+if test $build = $target ; then
+  # Note that build=target is almost certainly the wrong test; FIXME
+  default_gnattools_target="gnattools-native"
+else
+  default_gnattools_target="gnattools-cross"
+fi
+AC_SUBST([default_gnattools_target])
+
+# Target-specific stuff (defaults)
+TOOLS_TARGET_PAIRS=
+AC_SUBST(TOOLS_TARGET_PAIRS)
+EXTRA_GNATTOOLS=
+AC_SUBST(EXTRA_GNATTOOLS)
+
+# Per-target case statement
+# -------------------------
+case "${target}" in
+  alpha*-dec-vx*) # Unlike all other Vxworks
+    ;;
+  m68k*-wrs-vx* \
+  | powerpc*-wrs-vxworks \
+  | sparc*-wrs-vx* \
+  | *86-wrs-vxworks \
+  | xscale*-wrs-vx* \
+  | xscale*-wrs-coff \
+  | mips*-wrs-vx*)
+    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-vxworks.adb"
+    ;;
+  sparc-sun-solaris*)
+    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-solaris.adb"
+    ;;
+  *86-*-solaris2*)
+    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-solaris.adb"
+    ;;
+  *86-*-linux* \
+  | powerpc*-*-linux*)
+    TOOLS_TARGET_PAIRS="\
+    mlib-tgt.adb<mlib-tgt-linux.adb \
+    indepsw.adb<indepsw-linux.adb"
+    ;;
+  *ia64-*-linux* \
+  | alpha*-*-linux )
+    TOOLS_TARGET_PAIRS="\
+    mlib-tgt.adb<mlib-tgt-linux.adb \
+    indepsw.adb<indepsw-linux.adb"
+    ;;
+  *x86_64-*-linux* \
+  | s390*-*-linux*)
+    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-linux.adb"
+    ;;
+  *86-*-freebsd*)
+    TOOLS_TARGET_PAIRS="\
+    mlib-tgt.adb<mlib-tgt-linux.adb"
+    ;;
+  mips-sgi-irix*)
+    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-irix.adb"
+    ;;
+  hppa*-hp-hpux10*) # Unlike hpux11
+    ;;
+  hppa*-hp-hpux11*)
+    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-hpux.adb"
+    ;;
+  *-ibm-aix*)
+    TOOLS_TARGET_PAIRS="\
+    mlib-tgt.adb<mlib-tgt-aix.adb \
+    indepsw.adb<indepsw-aix.adb"
+    ;;
+  alpha*-dec-osf*)
+    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-tru64.adb"
+    ;;
+  alpha*-dec-vms* | alpha*-dec-openvms* | alpha*-dec-vms* \
+  | alpha*-hp-vms* | alpha*-hp-openvms* | alpha*-hp-vms*)
+    TOOLS_TARGET_PAIRS="\
+    mlib-tgt.adb<mlib-tgt-vms-alpha.adb \
+    symbols.adb<symbols-vms-alpha.adb"
+
+    EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
+    ;;
+  ia64*-dec-vms* | ia64*-dec-openvms* | ia64*-dec-vms* \
+  | ia64*-hp-vms* | ia64*-hp-openvms* | ia64*-hp-vms*)
+    TOOLS_TARGET_PAIRS="\
+    mlib-tgt.adb<mlib-tgt-vms-ia64.adb \
+    symbols.adb<symbols-vms-ia64.adb"
+
+    EXTRA_GNATTOOLS='../../gnatlbr$(exeext) ../../gnatsym$(exeext)'
+    ;;
+  *-*-cygwin32* | *-*-mingw32* | *-*-pe)
+    TOOLS_TARGET_PAIRS="\
+    mlib-tgt.adb<mlib-tgt-mingw.adb \
+    indepsw.adb<indepsw-mingw.adb"
+    EXTRA_GNATTOOLS='../../gnatdll$(exeext)'
+    ;;
+  powerpc-*-darwin*)
+    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-darwin.adb"
+    ;;
+  *-*-lynxos)
+    TOOLS_TARGET_PAIRS="mlib-tgt.adb<mlib-tgt-lynxos.adb"
+    ;;
+esac
+
+# Output: create a Makefile.
+AC_CONFIG_FILES([Makefile])
+
+AC_OUTPUT
Index: libada/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/libada/Makefile.in,v
retrieving revision 1.8
diff -u -r1.8 Makefile.in
--- libada/Makefile.in	25 May 2004 19:37:01 -0000	1.8
+++ libada/Makefile.in	12 Feb 2005 00:48:55 -0000
@@ -16,7 +16,7 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 # Default target; must be first.
-all: gnatlib gnattools
+all: gnatlib
 
 # Standard autoconf-set variables.
 SHELL = @SHELL@
@@ -24,23 +24,16 @@
 build = @build@
 target = @target@
 prefix = @prefix@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
 
 # Nonstandard autoconf-set variables.
 enable_shared = @enable_shared@
 LN_S=@LN_S@
-target_noncanonical=@target_noncanonical@
 
 # Variables for the user (or the top level) to override.
 objext=.o
 GNATLIBFLAGS= -W -Wall -gnatpg
 THREAD_KIND=native
 TRACE=no
-GNATLIBLDFLAGS=
-ADA_FOR_BUILD=
-ADA_FOR_TARGET=
 LDFLAGS=
 STAGE_PREFIX=
 
@@ -55,17 +48,10 @@
 X_ADA_CFLAGS=@x_ada_cflags@
 ALL_ADA_CFLAGS=$(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS)
 
-# Variables for gnattools.
-ADAFLAGS= -gnatpg -gnata
-ADA_INCLUDE_DIR = $(libsubdir)/adainclude
-ADA_RTL_OBJ_DIR = $(libsubdir)/adalib
-
 # For finding the GCC build dir, which is used far too much
 GCC_DIR=../../gcc
 # Include fragment generated by GCC configure.
 include $(GCC_DIR)/libada-mk
-# Variables based on those gleaned from the GCC makefile.  :-P
-libsubdir=$(libdir)/gcc/$(target_noncanonical)/$(gcc_version)
 
 TARGET_LIBGCC2_CFLAGS=
 GNATLIBCFLAGS= -g -O2
@@ -79,12 +65,6 @@
 include $(tmake_file)
 endif
 
-# Get possible host-specific override for libsubdir (ick).
-xmake_file=$(subst /config,/../gcc/config,$(gcc_xmake_file))
-ifneq ($(xmake_file),)
-include $(xmake_file)
-endif
-
 FLAGS_TO_PASS = \
         "MAKEOVERRIDES=" \
         "LDFLAGS=$(LDFLAGS)" \
@@ -94,139 +74,34 @@
         "objext=$(objext)" \
         "prefix=$(prefix)" \
         "STAGE_PREFIX=$(STAGE_PREFIX)" \
-	"CC=$(cc_set_by_configure)" \
+	"CC=$(host_cc_for_libada)" \
         "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)"
 
-ADA_FLAGS_TO_PASS = \
-        "ADA_FOR_BUILD=$(ADA_FOR_BUILD)"        \
-        "ADA_INCLUDE_DIR=$(ADA_INCLUDE_DIR)"    \
-        "ADA_RTL_OBJ_DIR=$(ADA_RTL_OBJ_DIR)"    \
-        "ADAFLAGS=$(ADAFLAGS)"                  \
-        "ADA_FOR_TARGET=$(ADA_FOR_TARGET)"      \
-        "INSTALL=$(INSTALL)"                    \
-        "INSTALL_DATA=$(INSTALL_DATA)"          \
-        "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
-
-ADA_TOOLS_FLAGS_TO_PASS=\
-        "CC=../../xgcc -B../../"        \
-        "CFLAGS=$(CFLAGS)"              \
-        "exeext=$(exeext)"              \
-        "ADAFLAGS=$(ADAFLAGS)"          \
-        "ADA_INCLUDES=-I../rts"         \
-        "GNATMAKE=../../gnatmake"       \
-        "GNATLINK=../../gnatlink"       \
-        "GNATBIND=../../gnatbind"
-
 # Rules to build gnatlib.
 .PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared
 gnatlib: @default_gnatlib_target@
 
-gnatlib-plain:
+gnatlib-plain: $(GCC_DIR)/ada/Makefile
+	test -f stamp-libada || \
 	$(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
 	  GNATLIBFLAGS="$(GNATLIBFLAGS)" \
 	  GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
 	  TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
 	  THREAD_KIND="$(THREAD_KIND)" \
 	  TRACE="$(TRACE)" \
-	  gnatlib
+	  gnatlib \
+	&& touch stamp-libada
 
-gnatlib-sjlj gnatlib-zcx gnatlib-shared:
+gnatlib-sjlj gnatlib-zcx gnatlib-shared: $(GCC_DIR)/ada/Makefile
+	test -f stamp-libada || \
 	$(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
 	  GNATLIBFLAGS="$(GNATLIBFLAGS)" \
 	  GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
 	  TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
 	  THREAD_KIND="$(THREAD_KIND)" \
 	  TRACE="$(TRACE)" \
-	  $@
-
-.PHONY: rts-zfp rts-ravenscar
-rts-zfp rts-ravenscar:
-	$(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) \
-	  GNATMAKE=../gnatmake-cross \
-	  $@
-
-# Rules to build gnattools.
-.PHONY: gnattools gnattools-native gnattools-cross regnattools
-gnattools: @default_gnattools_target@
-
-gnattools-native: gnatlib
-	$(MAKE) -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
-	  ADA_INCLUDES="-I- -I../rts" \
-	  CC="../../xgcc -B../../" STAGE_PREFIX=../../  gnattools1
-	$(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
-	$(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3
-
-# For cross builds of gnattools,
-# put the host RTS dir first in the PATH to hide the default runtime
-# files that are among the sources
-# FIXME: This should be done in configure.
-RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib )))
-gnattools-cross: gnatlib
-	$(MAKE)  -C $(GCC_DIR)/ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
-	  ADA_INCLUDES="-I$(RTS_DIR)../adainclude -I$(RTS_DIR)" \
-	  GNATMAKE="gnatmake" \
-	  GNATBIND="gnatbind" \
-	  GNATLINK="gnatlink" \
-	  LIBGNAT="" \
-	  gnattools1-re gnattools2 gnattools4
-	# Rename cross tools to where the GCC makefile wants them when
-	# installing.  FIXME: installation should be done elsewhere.
-	if [ -f $(GCC_DIR)/gnatbind$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatbind$(exeext) $(GCC_DIR)/gnatbind-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatbl$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatbl$(exeext) $(GCC_DIR)/gnatbl-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatchop$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatchop$(exeext) $(GCC_DIR)/gnatchop-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnat$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnat$(exeext) $(GCC_DIR)/gnat-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatkr$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatkr$(exeext) $(GCC_DIR)/gnatkr-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatlink$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatlink$(exeext) $(GCC_DIR)/gnatlink-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatls$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatls$(exeext) $(GCC_DIR)/gnatls-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatmake$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatmake$(exeext) $(GCC_DIR)/gnatmake-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatmem$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatmem$(exeext) $(GCC_DIR)/gnatmem-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatname$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatname$(exeext) $(GCC_DIR)/gnatname-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatprep$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatprep$(exeext) $(GCC_DIR)/gnatprep-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatxref$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatxref$(exeext) $(GCC_DIR)/gnatxref-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatfind$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatfind$(exeext) $(GCC_DIR)/gnatfind-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatclean$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatclean$(exeext) $(GCC_DIR)/gnatclean-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gnatsym$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gnatsym$(exeext) $(GCC_DIR)/gnatsym-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gpr2make$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gpr2make$(exeext) $(GCC_DIR)/gpr2make-cross$(exeext); \
-	fi
-	if [ -f $(GCC_DIR)/gprcmd$(exeext) ] ; then \
-	  mv $(GCC_DIR)/gprcmd$(exeext) $(GCC_DIR)/gprcmd-cross$(exeext); \
-	fi
-
-regnattools:
-	$(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1-re
-	$(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
-	$(MAKE) -C $(GCC_DIR)/ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools3
+	  $@ \
+	&& touch stamp-libada
 
 # Check uninstalled version.
 check:
Index: libada/configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/libada/configure.ac,v
retrieving revision 1.5
diff -u -r1.5 configure.ac
--- libada/configure.ac	25 Apr 2004 21:29:37 -0000	1.5
+++ libada/configure.ac	12 Feb 2005 00:48:57 -0000
@@ -58,13 +58,9 @@
 
 # Start of actual configure tests
 
-AC_PROG_INSTALL
-
-AC_CANONICAL_SYSTEM
-
-sinclude(../config/acx.m4)
-_GCC_TOPLEV_NONCANONICAL_TARGET
-AC_SUBST(target_noncanonical)
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
 
 # Need to pass this down for now :-P
 AC_PROG_LN_S
@@ -86,15 +82,6 @@
 fi
 AC_SUBST([default_gnatlib_target])
 
-# Determine what to build for 'gnattools'
-if test $build = $target ; then
-  # Note that build=target is almost certainly the wrong test; FIXME
-  default_gnattools_target="gnattools-native"
-else
-  default_gnattools_target="gnattools-cross"
-fi
-AC_SUBST([default_gnattools_target])
-
 # Output: create a Makefile.
 AC_CONFIG_FILES([Makefile])
 

-- 
This space intentionally left blank.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]