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] Ada toplevel config patch planned for next stage 1 or 2


This separates out gnattools from libada at the top level.  gnattools are
actually tools which run on the host, unlike libada which runs on the target.
This is a correctness matter.  It will be necessary before any more of
libada/gnattools can be cleanly migrated out of the gcc/ada directory into
top level directories, because target subdirs aren't really designed to handle
host tools.  (In the long run, this should clean up cross builds of Ada and
make them more reliable, which is a Good Thing.)

Bootstrapped and fully regression tested on i686-pc-linux-gnu.

Once mainline goes back into stage 2, I plan to commit this, since the
changes currently involved are entirely configuration and Makefile changes
(since no C or Ada files have actually been moved to the top level directories
yet).

I'm posting this now to get it over with; the patch was actually ready long
ago, but I couldn't regression test it for a long time because Ada didn't
build, and then I was out of town.

(top level)
	* 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.

(gnattools)
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.

(libada)
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.

Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.333
diff -u -r1.333 configure.in
--- configure.in	26 Nov 2004 01:24:42 -0000	1.333
+++ configure.in	27 Nov 2004 07:59:29 -0000
@@ -150,7 +150,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 \
@@ -322,6 +322,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: Makefile.def
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.def,v
retrieving revision 1.41
diff -u -r1.41 Makefile.def
--- Makefile.def	13 Nov 2004 07:32:48 -0000	1.41
+++ Makefile.def	27 Nov 2004 07:59:37 -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; };
@@ -272,6 +273,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: 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	27 Nov 2004 18:04:58 -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)" \
@@ -97,26 +77,6 @@
 	"CC=$(cc_set_by_configure)" \
         "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@
@@ -139,95 +99,6 @@
 	  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
-
 # 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	27 Nov 2004 18:05:00 -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])
 
--- /dev/null	2004-09-26 13:07:27.000000000 -0400
+++ gnattools/configure.ac	2004-08-16 15:33:31.000000000 -0400
@@ -0,0 +1,71 @@
+# 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])
+
+# Output: create a Makefile.
+AC_CONFIG_FILES([Makefile])
+
+AC_OUTPUT
--- /dev/null	2004-09-26 13:07:27.000000000 -0400
+++ gnattools/Makefile.in	2004-07-18 04:25:51.000000000 -0400
@@ -0,0 +1,230 @@
+# 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=
+
+# 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
+
+FLAGS_TO_PASS = \
+        "MAKEOVERRIDES=" \
+        "LDFLAGS=$(LDFLAGS)" \
+        "LN_S=$(LN_S)" \
+        "SHELL=$(SHELL)" \
+        "exeext=$(exeext)" \
+        "objext=$(objext)" \
+        "prefix=$(prefix)" \
+        "STAGE_PREFIX=$(STAGE_PREFIX)" \
+	"CC=$(cc_set_by_configure)" \
+        "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"
+
+.PHONY: gnattools gnattools-native gnattools-cross regnattools
+gnattools: @default_gnattools_target@
+
+gnattools-native:
+	$(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:
+	$(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
+
+# 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:
v

-- 
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]