[gnu.gcc] Using gcc as a cross-compiler

zuhn@umn-cs.CS.UMN.EDU (David D "Zoo" Zuhn) (05/29/89)

I am interested in using gcc as a cross compiler.  Our ACM chapter
has several HP 9000/300 machines (310/320s) with limited memory/swap
space, and gcc often complains about VM exhausted.  Many of use have 
access to the departmental Sequent with lots of space.

Has anyone tried to setup gcc on a Sequent (or Sun) to compile to
HP code.  Has anyone tried anything similar but w/ different machines?

Any pointers to what is/will be required are appreciated.

Dave Zuhn
ACM HP System Administrator
zuhn@umn-cs.cs.umn.edu

meissner@DG-RTP.DG.COM (Michael Meissner) (06/02/89)

In article <13200@umn-cs.CS.UMN.EDU> zuhn@umn-cs.cs.umn.edu (David D "Zoo" Zuhn) writes:
| I am interested in using gcc as a cross compiler.  Our ACM chapter
| has several HP 9000/300 machines (310/320s) with limited memory/swap
| space, and gcc often complains about VM exhausted.  Many of use have 
| access to the departmental Sequent with lots of space.
| 
| Has anyone tried to setup gcc on a Sequent (or Sun) to compile to
| HP code.  Has anyone tried anything similar but w/ different machines?

Yes I have.  In doing so, I generalized the process, and added a
configuration script, which asks you every bell and whistle that can
be turned from the Makefile, and then generates a make shell script in
the current directory, which sets the defaults, and calls the real
make.  It probably needs some tuning as it causes GNUmake to core dump
(I haven't taken the time to figure out why, System V based makes
handle it fine).  After unpacking the files, do the following:

	config.gcc -m -h host-system target-system

where host-system is the system that the compiler itself will run on,
and target-system is the system to generate code for.  Config.gcc will
then call config.make (that's the -m option to config.gcc), which will
ask you various questions about defaults.

Obviously, you have to get a linker and assembler from somewhere.  Put
all of these tools in the directory you indicated the default prefix
to use.  For example, for the 88k cross compiler, I use
/usr/local/lib, like the native compiler, but use gcc88- for the
prefix, instead of the normal gcc-, to distinguish the native compiler
from the cross compiler.  You should put all of the include files from
the target system somewhere (such as /usr/local/lib/gcc88-include in
my example), and invoke gcc with the -nostdinc and -I<dir> options.

The above is just a brief diagram of the steps needed.  I probably am
missing something.  If so, send me mail, or post:

Michael Meissner, Data General.
Uucp:		...!mcnc!rti!xyzzy!meissner
Internet:	meissner@dg-rtp.DG.COM
Old Internet:	meissner%dg-rtp.DG.COM@relay.cs.net

Shell archive follows:

#! /bin/sh
: Run this shell script with "sh" not "csh"
PATH=/bin:/usr/bin:/usr/ucb:/etc:$PATH
export PATH
if [ -r Makefile ]; then
	echo Makefile exists, moving to Makefile.orig
	mv Makefile Makefile.orig
fi
echo Extracting Makefile
sed 's/^X//' <<'//go.sysin dd *' >Makefile
X# Makefile for GNU C compiler.
X#   Copyright (C) 1987, 1988 Free Software Foundation, Inc.
X
X#This file is part of GNU CC.
X
X#GNU CC is free software; you can redistribute it and/or modify
X#it under the terms of the GNU General Public License as published by
X#the Free Software Foundation; either version 1, or (at your option)
X#any later version.
X
X#GNU CC is distributed in the hope that it will be useful,
X#but WITHOUT ANY WARRANTY; without even the implied warranty of
X#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
X#GNU General Public License for more details.
X
X#You should have received a copy of the GNU General Public License
X#along with GNU CC; see the file COPYING.  If not, write to
X#the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
X
X
X# These are what you would need on HPUX:
X# CFLAGS = -Wc,-Ns2000 -Wc,-Ne700 -Wc,-Np300
X# If you are using the GNU assembler and linker on HPUX,
X# add -I../hp-include to CFLAGS.
X# -g is desirable in CFLAGS, but a compiler bug in HPUX version 5
X# bites whenever tree.def, rtl.def or machmode.def is included
X# (ie., on every source file).
X# CCLIBFLAGS = -Wc,-Ns2000 -Wc,-Ne700 -O
X# For CCLIBFLAGS you might want to specify the switch that
X# forces only 68000 instructions to be used.
X
X# If you are making gcc for the first time, and if you are compiling it with
X# a non-gcc compiler, and if your system doesn't have a working alloca() in any
X# of the standard libraries (as is true for HP/UX or Genix),
X# un-comment the following line(s):
X# ALLOCA = alloca.o
X# HOST_ALLOCA = $(HOST_PREFIX)alloca.o
X
X# If your system's malloc() routine fails for any reason (as it does on
X# certain versions of Genix), try getting the files
X# malloc.c and getpagesize.h from GNU Emacs and un-comment the following line(s):
X# MALLOC = malloc.o
X# HOST_MALLOC = $(HOST_PREFIX)malloc.o
X
X# If you are running GCC on an Apollo (SR10.x),
X# go into a Berkeley environment and use this:
X# CFLAGS = -g -A nansi -A cpu,3000 -A runtype,bsd4.3 -A systype,any -DSHORT_ENUM_BUG
X# (Says vasta@apollo.com.)
X
X
X# Variables that exist for you to override.
X
X# OLDCC should not be the GNU C compiler -- it is used to compile
X# gnulib for the target environment.  CCLIBFLAGS specifies the
X# flags needed to compile gnulib with OLDCC.
X
X# HOST_CC, HOST_CFLAGS, HOST_LDFLAGS, & HOST_PREFIX are for when
X# cross-compiling GNU for the tools that run on the host (genextract,
X# etc).  Also, see HOST_LIBS below.  HOST_PREFIX should be set to
X# host- for such an environment
X
X# OTHER_CC1_OBJS, OTHER_CPP_OBJS, OTHER_GCC_OBJS, & OTHER_LIBS are for
X# adding additional objects, and libraries.  OTHER_UTIL_OBJS, &
X# HOST_OTHER_LIBS perform a similar service for the compiler utilities.
X
XCFLAGS = -g $(XCFLAGS)
XCC = cc
X# OLDCC should not be the GNU C compiler.
XOLDCC = cc
XCCLIBFLAGS = -O
XHOST_CC = $(CC)
XHOST_CFLAGS = $(CFLAGS)
XHOST_LDFLAGS = $(LDFLAGS)
X# HOST_PREFIX = host-
X
XOTHER_CC1_OBJS =
XOTHER_CPP_OBJS =
XOTHER_GCC_OBJS =
XOTHER_LIBS =
XOTHER_UTIL_OBJS =
XHOST_OTHER_LIBS = $(OTHER_LIBS)
X
XBISON = bison
XBISONFLAGS = -v
XAR = ar
XAR_FLAGS = qc
XRANLIB = /usr/bin/ranlib
XRANLIB_FLAGS =
XSHELL = /bin/sh
X# on sysV, define this as cp.
XINSTALL = install -c
X
X# Additional system libraries to link with.
XCLIB=
XHOST_CLIB=
X
X# Directory where sources are, from where we are.
Xsrcdir = .
X# Directory in which to put the executable for the command `gcc'
Xbindir = $(prefix)/usr/local/bin
X# Pathname to install GCC as
XGCC = $(bindir)/gcc
X# Directory in which to put the subprograms used by the compiler.
Xlibdir = $(prefix)/usr/local/lib
X# Directory in which to put man pages.
Xmandir = $(prefix)/usr/local/man/man1
X# Number to put in man-page filename.
Xmanext = 1
X
X# Prefix to use in gcc to look for GNU tools before system tools
XEXEC_PREFIX = $(libdir)/gcc-
X
X# Directories to find GNU C and G++ private include files
XINCDIR_GCC = $(libdir)/gcc-include
XINCDIR_GPLUSPLUS = $(libdir)/g++-include
X
X# Files for building TAGS file
XETAGS = etags
XETAGS_FLAGS = -t
XETAGS_OBJS = $(C_OBJS)
X
X# Change this to a null string if obstacks are installed in the
X# system library.
XOBSTACK=obstack.o
XHOST_OBSTACK=$(HOST_PREFIX)obstack.o
X
X# Dependency on obstack, alloca, malloc or whatever library facilities
X# are not installed in the system libraries.
XLIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
XHOST_LIBDEPS= $(HOST_OBSTACK) $(HOST_ALLOCA) $(HOST_MALLOC) $(OTHER_UTIL_OBJS)
X
X# How to link with both our special library facilities
X# and the system's installed libraries.
XLIBS = $(OBSTACK) $(ALLOCA) $(MALLOC) $(CLIB) $(OTHER_LIBS)
XHOST_LIBS = $(HOST_OBSTACK) $(HOST_ALLOCA) $(HOST_MALLOC) $(OTHER_UTIL_OBJS) \
X	$(HOST_CLIB) $(HOST_OTHER_LIBS)
X
XDIR = ../gcc
X
X# End of variables for you to override.
X
X# Always use -I$(srcdir)/config when compiling.
X.c.o:
X	$(CC) -c $(CFLAGS) $(CPPFLAGS) -I$(srcdir)/config $<
X
X# Language-specific object files for C.
XC_OBJS = c-parse.tab.o c-decl.o c-typeck.o c-convert.o
X
X# Language-specific object files for C++.
X# (These are not yet released.)
XCPLUS_OBJS = cplus-parse.o cplus-decl.o cplus-typeck.o \
X   cplus-cvt.o cplus-search.o cplus-lex.o \
X   cplus-class.o cplus-init.o cplus-method.o
X
X# Language-independent object files.
XOBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
X rtl.o expr.o stmt.o expmed.o explow.o optabs.o varasm.o \
X symout.o dbxout.o sdbout.o emit-rtl.o insn-emit.o \
X integrate.o jump.o cse.o loop.o flow.o stupid.o combine.o \
X regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \
X insn-peep.o final.o recog.o insn-recog.o insn-extract.o insn-output.o
X
X# Files to be copied away after each stage in building.
XSTAGE_GCC=gcc
XSTAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
X insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
X genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
X cc1 cpp cccp # cc1plus
X
X# Members of gnulib.
XLIBFUNCS = _eprintf _builtin_new _builtin_New _builtin_del \
X   _umulsi3 _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
X   _lshrsi3 _lshlsi3 _ashrsi3 _ashlsi3 _cmpdi2 _ucmpdi2 \
X   _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 _cmpdf2 \
X   _fixunsdfsi _fixunsdfdi _fixdfsi _fixdfdi \
X   _floatsidf _floatdidf _truncdfsf2 _extendsfdf2 \
X   _addsf3 _negsf2 _subsf3 _cmpsf2 _mulsf3 _divsf3 _varargs
X
X# Library members defined in gnulib2.c.
XLIB2FUNCS = _adddi3 _subdi3 _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
X    _div_internal
X
X# Header files that are made available to programs compiled with gcc.
XUSER_H = stddef.h stdarg.h assert.h varargs.h va-*.h limits.h
X
X# If you want to recompile everything, just do rm *.o.
X# CONFIG_H = config.h tm.h
XCONFIG_H =
X# Alternate means of recompilation, recompiles gcc.c, toplev.c, final.c,
X# and varasm.c (funcs dealing in assembly language output & switches)
XCONFIG2_H =
XRTL_H = rtl.h rtl.def machmode.def
XTREE_H = tree.h real.h tree.def machmode.def
XCPLUS_TREE_H = $(TREE_H) cplus-tree.h c-tree.h
X
Xall: gnulib gcc cc1 cpp # cc1plus gnulib2
X
X# Print out the current values for the Make config variables, for use
X# in the config.make script.
Xprint_vars:
X	@echo "ALLOCA='$(ALLOCA)'"
X	@echo "AR='$(AR)'"
X	@echo "AR_FLAGS='$(AR_FLAGS)'"
X	@echo "BISON='$(BISON)'"
X	@echo "BISONFLAGS='$(BISONFLAGS)'"
X	@echo "CC='$(CC)'"
X	@echo "CCLIBFLAGS='$(CCLIBFLAGS)'"
X	@echo "CFLAGS='$(CFLAGS)'"
X	@echo "CLIB='$(CLIB)'"
X	@echo "CONFIG_H='$(CONFIG_H)'"
X	@echo "CONFIG2_H='$(CONFIG2_H)'"
X	@echo "ETAGS='$(ETAGS)'"
X	@echo "ETAGS_FLAGS='$(ETAGS_FLAGS)'"
X	@echo "ETAGS_OBJS='$(ETAGS_OBJS)'"
X	@echo "EXEC_PREFIX='$(EXEC_PREFIX)'"
X	@echo "GCC='${GCC}'"
X	@echo "HOST_ALLOCA='$(HOST_ALLOCA)'"
X	@echo "HOST_CC='$(HOST_CC)'"
X	@echo "HOST_CFLAGS='$(HOST_CFLAGS)'"
X	@echo "HOST_CLIB='$(HOST_CLIB)'"
X	@echo "HOST_LDFLAGS='$(HOST_LDFLAGS)'"
X	@echo "HOST_MALLOC='$(HOST_MALLOC)'"
X	@echo "HOST_OBSTACK='$(HOST_OBSTACK)'"
X	@echo "HOST_OTHER_LIBS='$(HOST_OTHER_LIBS)'"
X	@echo "HOST_PREFIX='$(HOST_PREFIX)'"
X	@echo "LDFLAGS='$(LDFLAGS)'"
X	@echo "INCDIR_GCC='$(INCDIR_GCC)'"
X	@echo "INCDIR_GPLUSPLUS='$(INCDIR_GPLUSPLUS)'"
X	@echo "INSTALL='$(INSTALL)'"
X	@echo "MALLOC='$(MALLOC)'"
X	@echo "OBSTACK='$(OBSTACK)'"
X	@echo "OLDCC='$(OLDCC)'"
X	@echo "OTHER_CC1_OBJS='$(OTHER_CC1_OBJS)'"
X	@echo "OTHER_CPP_OBJS='$(OTHER_CPP_OBJS)'"
X	@echo "OTHER_GCC_OBJS='$(OTHER_GCC_OBJS)'"
X	@echo "OTHER_LIBS='$(OTHER_LIBS)'"
X	@echo "OTHER_UTIL_OBJS='$(OTHER_UTIL_OBJS)'"
X	@echo "RANLIB='$(RANLIB)'"
X	@echo "RANLIB_FLAGS='$(RANLIB_FLAGS)'"
X	@echo "SHELL='$(SHELL)'"
X	@echo "XCFLAGS='$(XCFLAGS)'"
X	@echo "bindir='$(bindir)'"
X	@echo "libdir='$(libdir)'"
X	@echo "mandir='$(mandir)'"
X	@echo "manext='$(manext)'"
X	@echo "srcdir='$(srcdir)'"
X
X# gnulib2 is commented out in 1.35 since it's too late for real testing.
X# Do `make gnulib2' explicitly if you want `long long' support.
Xlang-c: gnulib gcc cc1 cpp # gnulib2
X# lang-cplus: gnulib gcc cc1plus cpp
X
Xdoc: cpp.info gplus.info gcc.info
X
Xcompilations: ${OBJS}
X
Xgcc: gcc.o version.o $(LIBDEPS) $(OTHER_GCC_OBJS)
X	$(CC) $(CFLAGS) $(LDFLAGS) -o gccnew gcc.o version.o $(OTHER_GCC_OBJS) $(LIBS)
X# Go via `gccnew' to avoid `file busy' if $(CC) is `gcc'.
X	mv gccnew gcc
X
Xgcc.o: gcc.c $(CONFIG_H) $(CONFIG2_H)
X	$(CC) $(CFLAGS) -I$(srcdir)/config \
X  -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
X  -DSTANDARD_EXEC_PREFIX=\"$(EXEC_PREFIX)\" -c gcc.c
X
Xcc1: $(C_OBJS) $(OBJS) $(LIBDEPS) $(OTHER_CC1_OBJS)
X	$(CC) $(CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(OTHER_CC1_OBJS) $(LIBS)
X
Xcc1plus: $(CPLUS_OBJS) $(OBJS) $(LIBDEPS)
X	$(CC) $(CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(LIBS)
X
X#Library of arithmetic subroutines
X# Don't compile this with gcc!
X# (That would cause most arithmetic functions to call themselves.)
Xgnulib: gnulib.c
X	-mkdir libtemp
X	cd libtemp; \
X	rm -f gnulib; \
X	for name in $(LIBFUNCS); \
X	do \
X	  echo $${name}; \
X	  rm -f $${name}.c; \
X	  cp ../gnulib.c $${name}.c; \
X	  $(OLDCC) $(CCLIBFLAGS) -I.. -I../config -c -DL$${name} $${name}.c; \
X	  $(AR) $(AR_FLAGS) gnulib $${name}.o; \
X	done
X	mv libtemp/gnulib .
X	rm -rf libtemp
X	if [ -f $(RANLIB) ] ; then  $(RANLIB) $(RANLIB_FLAGS) gnulib ;fi
X# On HPUX, if you are working with the GNU assembler and linker,
X# the previous line must be replaced with the following two lines.
X# No change is needed here if you are using the HPUX assembler and linker.
X#	mv gnulib gnulib-hp
X#	../hp-bin/hpxt gnulib-hp gnulib
X
Xgnulib2: stamp-gnulib2 ;
Xstamp-gnulib2: gnulib2.c
X	-mkdir libtemp
X	cd libtemp; \
X	cp ../gnulib .; \
X	for name in $(LIB2FUNCS); \
X	do \
X	  echo $${name}; \
X	  rm -f $${name}.c; \
X	  cp ../gnulib2.c $${name}.c; \
X	  ../gcc -B../ -fstrength-reduce -O -I.. -I../config -c -DL$${name} $${name}.c; \
X	  $(AR) qc gnulib $${name}.o; \
X	done
X	mv libtemp/gnulib .
X	rm -rf libtemp
X	if [ -f /usr/bin/ranlib ] ; then  ranlib gnulib ;fi
X	touch stamp-gnulib2
X# On HPUX, this might require some change; no one has tried it.
X
X# C language specific files.
X
Xc-parse.tab.o : c-parse.tab.c $(CONFIG_H) $(TREE_H) c-parse.h c-tree.h
Xc-parse.tab.c : c-parse.y
X	$(BISON) $(BISONFLAGS) c-parse.y
X
Xc-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-parse.h flags.h
Xc-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
Xc-convert.o : c-convert.c $(CONFIG_H) $(TREE_H)
X
X# C++ language specific files.
X
Xcplus-parse.o : cplus-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
X	$(CC) -c $(CFLAGS) -I$(srcdir)/config \
X -DPARSE_OUTPUT=\"$(PWD)/cplus-parse.output\" cplus-parse.c
X
Xcplus-parse.h cplus-parse.c : cplus-parse.y
X	@echo expect 49 shift/reduce conflicts and 4 reduce/reduce conflicts
X	$(BISON) $(BISONFLAGS) -d -o cplus-parse.c cplus-parse.y
X
Xcplus-lex.o : cplus-lex.c $(CONFIG_H) $(CPLUS_TREE_H) cplus-parse.h
Xcplus-decl.o : cplus-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
Xcplus-typeck.o : cplus-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
Xcplus-class.o : cplus-class.c $(CONFIG_H) $(CPLUS_TREE_H)
Xcplus-init.o : cplus-init.c $(CONFIG_H) $(CPLUS_TREE_H)
Xcplus-method.o : cplus-method.c $(CONFIG_H) $(CPLUS_TREE_H)
Xcplus-cvt.o : cplus-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
Xcplus-search.o : cplus-search.c $(CONFIG_H) $(CPLUS_TREE_H)
Xnew-method.o : new-method.c $(CONFIG_H) $(CPLUS_TREE_H)
X
X# Language-independent files.
X
Xtree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h
Xprint-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
Xstor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H)
Xfold-const.o : fold-const.c $(CONFIG_H) $(TREE_H)
Xtoplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(CONFIG2_H) flags.h
X
Xrtl.o : rtl.c $(CONFIG_H) $(RTL_H)
X
Xhost-rtl.o: rtl.c $(CONFIG_H) $(RTL_H)
X	rm -f host-rtl.c
X	cp rtl.c host-rtl.c
X	$(HOST_CC) $(HOST_CFLAGS) -I$(srcdir)/config -c host-rtl.c
X
Xvarasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) $(CONFIG2_H) flags.h expr.h \
X   insn-codes.h hard-reg-set.h
Xstmt.o : stmt.c $(CONFIG_H) $(CONFIG2_H) $(RTL_H) $(TREE_H) flags.h  \
X   insn-flags.h expr.h insn-config.h regs.h insn-codes.h
Xexpr.o : expr.c $(CONFIG_H) $(CONFIG2_H) $(RTL_H) $(TREE_H) flags.h  \
X   insn-flags.h insn-codes.h expr.h insn-config.h recog.h
Xexpmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
X   insn-flags.h insn-codes.h expr.h insn-config.h recog.h
Xexplow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h
Xoptabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
X   insn-flags.h insn-codes.h expr.h insn-config.h recog.h
Xsymout.o : symout.c $(CONFIG_H) $(TREE_H) $(RTL_H) symseg.h gdbfiles.h
Xdbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h
Xsdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h
Xemit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h real.h
X
Xintegrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h \
X   insn-flags.h insn-codes.h
X
Xjump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h regs.h
Xstupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h
X
Xcse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h
Xloop.o : loop.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
X   regs.h recog.h flags.h expr.h
Xflow.o : flow.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h
Xcombine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h  \
X   insn-config.h regs.h basic-block.h recog.h
Xregclass.o : regclass.c $(CONFIG_H) $(RTL_H) flags.h regs.h \
X   insn-config.h recog.h hard-reg-set.h
Xlocal-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h \
X   insn-config.h recog.h hard-reg-set.h
Xglobal-alloc.o : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h  \
X   basic-block.h regs.h hard-reg-set.h insn-config.h
X
Xreload.o : reload.c $(CONFIG_H) $(RTL_H)  \
X   reload.h recog.h hard-reg-set.h insn-config.h regs.h
Xreload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h  \
X   reload.h regs.h hard-reg-set.h insn-config.h basic-block.h
Xcaller-save.o: caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
X  reload.h regs.h hard-reg-set.h insn-config.h basic-block.h recog.h
Xfinal.o : final.c $(CONFIG_H) $(RTL_H) $(CONFIG2_H) regs.h recog.h conditions.h \
X   gdbfiles.h insn-config.h real.h
Xrecog.o : recog.c $(CONFIG_H) $(RTL_H)  \
X   regs.h recog.h hard-reg-set.h insn-config.h
X
X# Normally this target is not used; but it is used if you
X# define ALLOCA=alloca.o.  In that case, you must get a suitable alloca.c
X# from the GNU Emacs distribution.
X# Note some machines won't allow $(CC) without -S on this source file.
Xalloca.o:	alloca.c
X	$(CC) $(CFLAGS) -I$(srcdir)/config -S alloca.c
X	$(CC) alloca.s -c
X
Xhost-alloca.o:	alloca.c
X	rm -f host-alloca.c
X	cp alloca.c host-alloca.c
X	$(HOST_CC) $(HOST_CFLAGS) -I$(srcdir)/config -S host-alloca.c
X	$(HOST_CC) -c host-alloca.s
X
Xhost-obstack.o: obstack.c
X	rm -f host-obstack.c
X	cp obstack.c host-obstack.c
X	$(HOST_CC) $(HOST_CFLAGS) -I$(srcdir)/config -c host-obstack.c
X
Xhost-malloc.o: malloc.c
X	rm -f host-malloc.c
X	cp malloc.c host-malloc.c
X	$(HOST_CC) $(HOST_CFLAGS) -I$(srcdir)/config -c host-malloc.c
X
X# Now the source files that are generated from the machine description.
X
X.PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
X  insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c
X
X# The following pair of rules has this effect:
X# genconfig is run only if the md has changed since genconfig was last run;
X# but the file insn-config.h is touched only when its contents actually change.
X
X# Each of the other insn-* files is handled by a similar pair of rules.
X
Xinsn-config.h: stamp-config.h ;
Xstamp-config.h : md genconfig
X	./genconfig md > tmp-insn-config.h
X	./move-if-change tmp-insn-config.h insn-config.h
X	touch stamp-config.h
X
Xinsn-flags.h: stamp-flags.h ;
Xstamp-flags.h : md genflags
X	./genflags md > tmp-insn-flags.h
X	./move-if-change tmp-insn-flags.h insn-flags.h
X	touch stamp-flags.h
X
Xinsn-codes.h: stamp-codes.h ;
Xstamp-codes.h : md gencodes
X	./gencodes md > tmp-insn-codes.h
X	./move-if-change tmp-insn-codes.h insn-codes.h
X	touch stamp-codes.h
X
Xinsn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h insn-config.h real.h
X	$(CC) $(CFLAGS) -I$(srcdir)/config -c insn-emit.c
X
Xinsn-emit.c: stamp-emit.c ;
Xstamp-emit.c : md genemit
X	./genemit md > tmp-insn-emit.c
X	./move-if-change tmp-insn-emit.c insn-emit.c
X	touch stamp-emit.c
X
Xinsn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h
X	$(CC) $(CFLAGS) -I$(srcdir)/config -c insn-recog.c
X
Xinsn-recog.c: stamp-recog.c ;
Xstamp-recog.c : md genrecog
X	./genrecog md > tmp-insn-recog.c
X	./move-if-change tmp-insn-recog.c insn-recog.c
X	touch stamp-recog.c
X
Xinsn-extract.o : insn-extract.c $(RTL_H)
X	$(CC) $(CFLAGS) -I$(srcdir)/config -c insn-extract.c
X
Xinsn-extract.c: stamp-extract.c ;
Xstamp-extract.c : md genextract
X	./genextract md > tmp-insn-extract.c
X	./move-if-change tmp-insn-extract.c insn-extract.c
X	touch stamp-extract.c
X
Xinsn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h real.h
X	$(CC) $(CFLAGS) -I$(srcdir)/config -c insn-peep.c
X
Xinsn-peep.c: stamp-peep.c ;
Xstamp-peep.c : md genpeep
X	./genpeep md > tmp-insn-peep.c
X	./move-if-change tmp-insn-peep.c insn-peep.c
X	touch stamp-peep.c
X
Xinsn-output.o : insn-output.c $(CONFIG_H) $(CONFIG2_H) $(RTL_H) regs.h real.h conditions.h \
X    insn-config.h insn-flags.h output.h aux-output.c
X	$(CC) $(CFLAGS) -I$(srcdir)/config -c insn-output.c
X
Xinsn-output.c: stamp-output.c ;
Xstamp-output.c : md genoutput
X	./genoutput md > tmp-insn-output.c
X	./move-if-change tmp-insn-output.c insn-output.c
X	touch stamp-output.c
X
X# Now the programs that generate those files.
X
Xgenconfig : genconfig.o $(HOST_PREFIX)rtl.o $(HOST_LIBDEPS)
X	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genconfig genconfig.o $(HOST_PREFIX)rtl.o $(HOST_LIBS)
X
Xgenconfig.o : genconfig.c $(RTL_H)
X	$(HOST_CC) $(HOST_CFLAGS) -I$(srcdir)/config -c genconfig.c
X
Xgenflags : genflags.o $(HOST_PREFIX)rtl.o $(HOST_LIBDEPS)
X	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genflags genflags.o $(HOST_PREFIX)rtl.o $(HOST_LIBS)
X
Xgenflags.o : genflags.c $(RTL_H)
X	$(HOST_CC) $(HOST_CFLAGS) -I$(srcdir)/config -c genflags.c
X
Xgencodes : gencodes.o $(HOST_PREFIX)rtl.o $(HOST_LIBDEPS)
X	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gencodes gencodes.o $(HOST_PREFIX)rtl.o $(HOST_LIBS)
X
Xgencodes.o : gencodes.c $(RTL_H)
X	$(HOST_CC) $(HOST_CFLAGS) -I$(srcdir)/config -c gencodes.c
X
Xgenemit : genemit.o $(HOST_PREFIX)rtl.o $(HOST_LIBDEPS)
X	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genemit genemit.o $(HOST_PREFIX)rtl.o $(HOST_LIBS)
X
Xgenemit.o : genemit.c $(RTL_H)
X	$(HOST_CC) $(HOST_CFLAGS) -I$(srcdir)/config -c genemit.c
X
Xgenrecog : genrecog.o $(HOST_PREFIX)rtl.o $(HOST_LIBDEPS)
X	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genrecog genrecog.o $(HOST_PREFIX)rtl.o $(HOST_LIBS)
X
Xgenrecog.o : genrecog.c $(RTL_H)
X	$(HOST_CC) $(HOST_CFLAGS) -I$(srcdir)/config -c genrecog.c
X
Xgenextract : genextract.o $(HOST_PREFIX)rtl.o $(HOST_LIBDEPS)
X	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genextract genextract.o $(HOST_PREFIX)rtl.o $(HOST_LIBS)
X
Xgenextract.o : genextract.c $(RTL_H)
X	$(HOST_CC) $(HOST_CFLAGS) -I$(srcdir)/config -c genextract.c
X
Xgenpeep : genpeep.o $(HOST_PREFIX)rtl.o $(HOST_LIBDEPS)
X	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genpeep genpeep.o $(HOST_PREFIX)rtl.o $(HOST_LIBS)
X
Xgenpeep.o : genpeep.c $(RTL_H)
X	$(HOST_CC) $(HOST_CFLAGS) -I$(srcdir)/config -c genpeep.c
X
Xgenoutput : genoutput.o $(HOST_PREFIX)rtl.o $(HOST_LIBDEPS)
X	$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genoutput genoutput.o $(HOST_PREFIX)rtl.o $(HOST_LIBS)
X
Xgenoutput.o : genoutput.c $(RTL_H)
X	$(HOST_CC) $(HOST_CFLAGS) -I$(srcdir)/config -c genoutput.c
X
X# Making the preprocessor
Xcpp: cccp
X	-rm -f cpp
X	ln cccp cpp
Xcccp: cccp.o cexp.o version.o $(LIBDEPS) $(OTHER_CPP_OBJS)
X	$(CC) $(CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(OTHER_CPP_OBJS) $(LIBS)
Xcexp.o: cexp.c
Xcexp.c: cexp.y
X	$(BISON) cexp.y
X	mv cexp.tab.c cexp.c
Xcccp.o: cccp.c
X	$(CC) $(CFLAGS) -I$(srcdir)/config \
X -DGCC_INCLUDE_DIR=\"$(INCDIR_GCC)\" \
X -DGPLUSPLUS_INCLUDE_DIR=\"$(INCDIR_GPLUSPLUS)\" -c cccp.c
X
Xcpp.info: cpp.texinfo
X	makeinfo $<
X
Xgplus.info: gplus.texinfo
X	makeinfo $<
X
Xgcc.info: gcc.texinfo
X	makeinfo $<
X
X# gnulib is not deleted because deleting it would be inconvenient
X# for most uses of this target.
Xclean:
X	-rm -f $(STAGESTUFF) $(STAGE_GCC)
X	-rm -f stamp-*.[ch] host-*.c
X	-rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
X	-rm -f *.s.filter* *.jump2
X	-rm -f core
X
X# Like clean but also delete the links made to configure gcc.
Xcleanlinks: clean
X	-rm -f tm.h aux-output.c config.h md config.status
X
X# Get rid of every file that's generated from some other file (except INSTALL).
Xrealclean: cleanlinks
X	-rm -f cpp.aux cpp.cps cpp.fns cpp.info cpp.kys cpp.pgs cpp.tps cpp.vrs
X#	-rm -f cplus-parse.tab.c cplus-parse.output
X	-rm -f c-parse.tab.c c-parse.output
X	-rm -f gnulib cexp.c TAGS 
X	-rm -f cpp.info* cpp.?? cpp.??s cpp.log cpp.toc cpp.*aux
X	-rm -f gcc.info* gcc.?? gcc.??s gcc.log gcc.toc gcc.*aux
X	-rm -f gplus.info* gplus.?? gplus.??s gplus.log gplus.toc gplus.*aux
X	-rm -f *.dvi
X
X# Like realclean but also delete the links made to configure gcc.
Xcleanlinks: realclean
X	-rm -f tm.h aux-output.c config.h md config.status
X
X# Copy the files into directories where they will be run.
Xinstall:
X	-mkdir $(libdir)
X	-if [ -f cc1 ] ; then $(INSTALL) cc1 $(EXEC_PREFIX)cc1 ;fi
X	-if [ -f cc1plus ] ; then $(INSTALL) cc1plus $(EXEC_PREFIX)cc1plus ;fi
X	$(INSTALL) gnulib $(EXEC_PREFIX)gnulib
X	-if [ -f $(RANLIB) ] ; then (cd $(libdir); $(RANLIB) $(RANLIB_FLAGS) gcc-gnulib) ;fi
X	$(INSTALL) cpp $(EXEC_PREFIX)cpp
X	$(INSTALL) gcc $(GCC)
X	-mkdir $(EXEC_PREFIX)include
X	chmod ugo+rx $(EXEC_PREFIX)include
X	for file in $(USER_H); do $(INSTALL) $${file} $(EXEC_PREFIX)include; done
X	$(INSTALL) gcc.1 $(mandir)/gcc.$(manext)
X	chmod +x fixincludes
X	fixincludes
X
X# do make -f ../gcc/Makefile maketest DIR=../gcc
X# in the intended test directory to make it a suitable test directory.
Xmaketest:
X	ln -s $(DIR)/*.[chy] .
X	ln -s $(DIR)/*.def .
X	ln -s $(DIR)/*.md .
X	-rm -f =*
X	ln -s $(DIR)/.gdbinit .
X	-ln -s $(DIR)/bison.simple .
X	ln -s $(DIR)/config.gcc .
X	ln -s $(DIR)/move-if-change .
X	if [ -f Makefile ] ; then false; else ln -s $(DIR)/Makefile . ; fi
X	-rm tm.h aux-output.c config.h md
X	make clean
X# You must then run config.gcc to set up for compilation.
X
Xbootstrap: all force
X	$(MAKE) stage1
X	$(MAKE) CC="stage1/gcc -Bstage1/" CFLAGS="-O $(CFLAGS)"
X	$(MAKE) stage2
X	$(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="-O $(CFLAGS)"
X
Xbootstrap2: force
X	$(MAKE) CC="stage1/gcc -Bstage1/" CFLAGS="-O $(CFLAGS)"
X	$(MAKE) stage2
X	$(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="-O $(CFLAGS)"
X
Xbootstrap3: force
X	$(MAKE) CC="stage2/gcc -Bstage2/" CFLAGS="-O $(CFLAGS)"
X
X# Copy the object files from a particular stage into a subdirectory.
Xstage1: force
X	-mkdir stage1
X	-mv $(STAGESTUFF) $(STAGE_GCC) stage1
X	-rm -f stage1/gnulib
X	-ln gnulib stage1 || (cp gnulib stage1 && $(RANLIB) $(RANLIB_FLAGS) stage1/gnulib)
X
Xstage2: force
X	-mkdir stage2
X	-mv $(STAGESTUFF) $(STAGE_GCC) stage2
X	-rm -f stage2/gnulib
X	-ln gnulib stage2 || (cp gnulib stage2 && $(RANLIB) $(RANLIB_FLAGS) stage2/gnulib)
X
Xstage3: force
X	-mkdir stage3
X	-mv $(STAGESTUFF) $(STAGE_GCC) stage3
X	-rm -f stage3/gnulib
X	-ln gnulib stage3 || (cp gnulib stage3 && $(RANLIB) $(RANLIB_FLAGS) stage3/gnulib)
X
XTAGS: force
X	mkdir temp
X	-mv c-parse.tab.c cplus-parse.c cplus-parse.h cexp.c temp
X	$(ETAGS) $(ETAGS_FLAGS) *.y *.h *.c
X	mv temp/* .
X	rmdir temp
X  
XTAGS.local: force
X	rm -f junk.c .sources
X	> TAGS
X	mkdir temp
X	-mv c-parse.tab.c cplus-parse.c cplus-parse.h cexp.c temp
X	-mv insn-recog.c insn-extract.c insn-output.c stamp-*.[ch] temp
X	echo '#include "config.h"' > junk.c
X	ls -l tm.h config.h | \
X		awk '{ if ( $$10 == "->" ) print $$11; else print $$1 }' >.sources
X	cc -E -I. -I$(srcdir)/config junk.c | egrep '# 1 "[.]/' | \
X		sed -e '/config[.]h/d' \
X		    -e '/tm[.]h/d' \
X		    -e 's;^# 1 "[.]/;;' \
X		    -e 's;".*$$;;' >> .sources
X	rm -f junk.c
X	ls *.h | egrep -v '^config[.]h$$|^tm[.]h$$' >> .sources
X	ls *.y | egrep -v '^cexp.y' >> .sources
X	ls -l aux-output.c | \
X		awk '{ if ( $$10 == "->" ) print $$11; else print $$1 }'>> .sources
X	-mv aux-output.c temp
X	ls *.c | egrep -v '^gen|^gcc[.]c$$|^cccp[.]c$$|^gnulib.*[.]c$$' >> .sources
X	ls gcc.c cccp.c cexp.y gnulib.c >> .sources
X	ls gen*.c >> .sources
X	$(ETAGS) $(ETAGS_FLAGS) `cat .sources`
X	mv temp/* .
X	rmdir temp
X
X#In GNU Make, ignore whether `stage*' exists.
X.PHONY: stage1 stage2 stage3 clean realclean TAGS TAGS.local bootstrap
X
Xforce:
//go.sysin dd *
if [ `wc -c < Makefile` != 25097 ]; then
	echo error transmitting Makefile --
	echo length should be 25097, not `wc -c < Makefile`
fi
if [ -r config.make ]; then
	echo config.make exists, moving to config.make.orig
	mv config.make config.make.orig
fi
echo Extracting config.make
sed 's/^X//' <<'//go.sysin dd *' >config.make
X#!/bin/sh
X# Configuration for default make actions for GNU CC
X#   Copyright (C) 1989 Free Software Foundation, Inc.
X
X#This file is part of GNU CC.
X
X#GNU CC is free software; you can redistribute it and/or modify
X#it under the terms of the GNU General Public License as published by
X#the Free Software Foundation; either version 1, or (at your option)
X#any later version.
X
X#GNU CC is distributed in the hope that it will be useful,
X#but WITHOUT ANY WARRANTY; without even the implied warranty of
X#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
X#GNU General Public License for more details.
X
X#You should have received a copy of the GNU General Public License
X#along with GNU CC; see the file COPYING.  If not, write to
X#the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
X#This file is part of GNU CC.
X
X#This script queries the user about default make actions and rules,
X#and builds a shell script `make' in the current directory that sets
X#things up as the user specified, and then invokes the system make.
X
X#from Larry Wall's rn Configure script
X
X: some greps do not return status, grrr.
Xecho "grimblepritz" >grimble
Xif grep blurfldyick grimble >/dev/null 2>&1 ; then
X    contains=contains
Xelse
X    if grep grimblepritz grimble >/dev/null 2>&1 ; then
X	contains=grep
X    else
X	contains=contains
X    fi
Xfi
Xrm grimble
X: the following should work in any shell
Xcase $contains in
Xcontains*)
X    echo " "
X    echo "AGH!  Grep doesn't return a status.  Attempting remedial action."
X    cat >contains <<'EOSS'
Xgrep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
XEOSS
Xchmod 755 contains
Xesac
X
X: first determine how to suppress newline on echo command
X
Xecho
Xecho "Checking echo to see how to suppress newlines..."
X(echo "hi there\c" ; echo " ") >.echotmp
Xif $contains c .echotmp >/dev/null 2>&1 ; then
X    echo "...using -n."
X    n='-n'
X    c=''
Xelse
X    echo "...using \\\c."
X    n=''
X    c='\c'
Xfi
Xecho $n "Type carriage return to continue.  Your cursor should be here-->$c"
Xread ans
Xrm .echotmp
X
Xecho
Xif [ -r ./make ]; then
X	echo "It appears that config.make was run before, picking up the"
X	echo "defaults from that script"
X	sed -n <make >.defaults \
X	    -e "/FIRST_VAR=/,/LAST_VAR=/s/^[ \\t]*\\([^=]*='[^']*'\\).*$/\\1/p"
X	rm -f make.save
X	mv make make.save
X
Xelif [ -r ./make.save ]; then
X	echo "It appears that config.make was run before, and you interrupted at"
X	echo "the wrong time, picking up the defaults from the save file"
X	sed -n <make.save >.defaults \
X	    -e "/FIRST_VAR=/,/LAST_VAR=/s/^[ \\t]*\\([^=]*='[^']*'\\).*$/\\1/p"
X
Xelse
X	echo "Picking up defaults from Makefile with make print_vars $@"
X	make print_vars $@ >.defaults
Xfi
X. .defaults
X#rm -f .defaults
X
X
Xif [ "$HOST_PREFIX" = "" ]; then
X	cross="no"
Xelse
X	cross="yes"
Xfi
X
Xecho
Xecho "You will be prompted for input.  If you hit newline, the default"
Xecho "answer which is printed inside of square brackets, will be used."
X
Xif [ x"$MAKE" = x"" ]; then
X	if [ -x /usr/ucb/which ]; then
X		MAKE=`/usr/ucb/which make`
X	elif [ -x /bin/make ]; then
X		MAKE=/bin/make
X	fi
Xfi
Xecho
Xecho $n "What is the pathname of the real MAKE on your system [$MAKE]? $c"
Xread ans
XMAKE="${ans:=$MAKE}"
X
Xecho
Xecho $n "What flags should always be passed to MAKE [$MAKEFLAGS]? $c"
Xread ans
XMAKEFLAGS="${ans:=$MAKEFLAGS}"
X
Xecho
Xecho $n "Are you building GCC to run on a different system [$cross]? $c"
Xread ans
Xcase ${ans:="$cross"} in
X	[yY]*)	cross="yes"; HOST_PREFIX="host-";;
X	*)	cross="no";  HOST_PREFIX="";;
Xesac
X
Xecho
Xif [ "$cross" = "no" ]; then
X	echo $n "What C compiler do you wish to use to compile GCC [$CC]? $c"
X	read ans
X	CC=${ans:="$CC"}
X	HOST_CC="$CC"
Xelse
X	echo "What C compiler do you wish to use to compile GCC for the target"
X	echo $n "system [$CC]? $c"
X	read ans
X	CC=${ans:="$CC"}
X
X	echo
X	echo "What C compiler do you wish to use to compile the utility programs"
X	echo $n "that run on the host [$HOST_CC]? $c"
X	read ans
X	HOST_CC=${ans:="$HOST_CC"}
Xfi
X
Xecho
Xecho "It is suggested that on HP/UX, you use the following options if you use"
Xecho "the system compiler, assembler and linker:"
Xecho "    -Wc,-Ns2000 -Wc,-Ne700 -Wc,-Np300"
Xecho
Xecho "It is suggested that on HP/UX, you use the following options if you use"
Xecho "the system compiler, with the GNU assembler and linker:"
Xecho "    -Wc,-Ns2000 -Wc,-Ne700 -Wc,-Np300 -I../hp-include"
Xecho
Xecho "It is suggested that on Apollo (SR10.x), go into the Berkeley environment"
Xecho "and use the following:"
Xecho "    -g -A nansi -A cpu,3000 -A runtype,bsd4.3 -A systype,any -DSHORT_ENUM_BUG"
Xecho
X
Xif [ "$cross" = "no" ]; then
X	echo $n "What options do you wish to use to compile with [$CFLAGS]? $c"
X	read ans
X	CFLAGS=${ans:="$CFLAGS"}
X	HOST_CFLAGS="$CFLAGS"
Xelse
X	echo $n "What options do you wish to use to compile GCC with [$CFLAGS]? $c"
X	read ans
X	CFLAGS=${ans:="$CFLAGS"}
X
X	echo
X	echo "What options do you wish to use to compile the host utility programs"
X	echo $n "with [$HOST_CFLAGS]? $c"
X	read ans
X	HOST_CFLAGS=${ans:="$HOST_CFLAGS"}
Xfi
X
Xecho
Xif [ "$cross" = "no" ]; then
X	echo $n "What options do you wish to use to link with [$LDFLAGS]? $c"
X	read ans
X	LDFLAGS=${ans:="$LDFLAGS"}
X	HOST_LDFLAGS="$LDFLAGS"
Xelse
X	echo $n "What options do you wish to use to link GCC with [$LDFLAGS]? $c"
X	read ans
X	LDFLAGS=${ans:="$LDFLAGS"}
X
X	echo
X	echo "What options do you wish to use to link the host utility programs"
X	echo $n "with [$HOST_LDFLAGS]? $c"
X	read ans
X	HOST_LDFLAGS=${ans:="$HOST_LDFLAGS"}
Xfi
X
Xecho
Xecho "What source files when changed, do you want to force recompilation of"
Xecho $n "the entire compiler? [$CONFIG_H]? $c"
Xread ans
XCONFIG_H=${ans:="$CONFIG_H"}
X
Xecho
Xecho "What source files when changed, do you want to force recompilation of"
Xecho "the modules dealing with target switches and assembly language"
Xecho $n "output? [$CONFIG2_H]? $c"
Xread ans
XCONFIG2_H=${ans:="$CONFIG2_H"}
X
X
Xif [ "$ALLOCA" = "" ]; then
X	need_alloca=no
Xelse
X	need_alloca=yes
Xfi
X
Xecho
Xecho $n "Do you need the special C version alloca for GCC [$need_alloca] $c"
Xread ans
X
Xcase ${ans:="$need_alloca"} in
X	[yY]*)	ALLOCA="alloca.o";;
X	*)	ALLOCA="";;
Xesac
X
Xif [ "$cross" = "no" ]; then
X	HOST_ALLOCA="$ALLOCA"
Xelse
X	if [ "$HOST_ALLOCA" = "" ]; then
X		need_alloca=no
X	else
X		need_alloca=yes
X	fi
X
X	echo
X	echo $n "Do you need the special C version alloca for the utilities [$need_alloca] $c"
X	read ans
X
X	case ${ans:="$need_alloca"} in
X		[yY]*)	HOST_ALLOCA="host-alloca.o";;
X		*)	HOST_ALLOCA="";;
X	esac
Xfi
X
X
Xif [ "$ALLOCA" = "" ]; then
X	if [ "$CLIB" = "" ]; then
X		need_clib=no
X	else
X		need_clib=yes
X	fi
X
X	echo
X	echo $n "Is a suitable alloca for GCC available in libPW.a [$need_clib]? $c"
X	read ans
X	case ${ans:="$need_clib"} in
X		[yY]*)	CLIB="-lPW";;
X		*)	CLIB="";;
X	esac
Xfi
X
Xif [ "$cross" = "no" ]; then
X	HOST_CLIB="$CLIB"
Xelse
X	if [ "$HOST_ALLOCA" = "" ]; then
X		if [ "$HOST_CLIB" = "" ]; then
X			need_clib=no
X		else
X			need_clib=yes
X		fi
X	
X		echo
X		echo $n "Is a suitable alloca for the utilities in libPW.a [$need_clib]? $c"
X		read ans
X		case ${ans:="$need_clib"} in
X			[yY]*)	HOST_CLIB="-lPW";;
X			*)	HOST_CLIB="";;
X		esac
X	fi
Xfi
X
X
Xif [ "$MALLOC" = "" ]; then
X	need_malloc=no
Xelse
X	need_malloc=yes
Xfi
Xecho
Xecho $n "Do you need GNU emacs' malloc for GCC [$need_malloc] $c"
Xread ans
X
Xcase ${ans:="$need_malloc"} in
X	[yY]*)	MALLOC="malloc.o";;
X	*)	MALLOC="";;
Xesac
X
Xif [ "$cross" = "no" ]; then
X	HOST_MALLOC="$MALLOC"
Xelse
X	if [ "$HOST_MALLOC" = "" ]; then
X		need_malloc=no
X	else
X		need_malloc=yes
X	fi
X
X	echo
X	echo $n "Do you need GNU emacs' malloc for the utilities [$need_malloc] $c"
X	read ans
X
X	case ${ans:="$need_malloc"} in
X		[yY]*)	HOST_MALLOC="host-malloc.o";;
X		*)	HOST_MALLOC="";;
X	esac
Xfi
X
X
Xif [ "$OBSTACK" = "" ]; then
X	need_obstack=yes
Xelse
X	need_obstack=no
Xfi
Xecho
Xecho $n "Is obstack installed in the normal library for GCC [$need_obstack] $c"
Xread ans
X
Xcase ${ans:="$need_obstack"} in
X	[yY]*)	OBSTACK="";;
X	*)	OBSTACK="obstack.o";;
Xesac
X
Xif [ "$cross" = "no" ]; then
X	HOST_OBSTACK="$OBSTACK"
Xelse
X	if [ "$HOST_OBSTACK" = "" ]; then
X		need_obstack=yes
X	else
X		need_obstack=no
X	fi
X
X	echo
X	echo $n "Is obstack installed in the normal library for utilities [$need_obstack] $c"
X	read ans
X
X	case ${ans:="$need_obstack"} in
X		[yY]*)	HOST_OBSTACK="";;
X		*)	HOST_OBSTACK="host-obstack.o";;
X	esac
Xfi
X
Xecho
Xecho $n "What other object modules do you wish to link GCC with [$OTHER_GCC_OBJS]? $c"
Xread ans
XOTHER_GCC_OBJS=${ans:="$OTHER_GCC_OBJS"}
X
Xecho
Xecho $n "What other object modules do you wish to link CC1 with [$OTHER_CC1_OBJS]? $c"
Xread ans
XOTHER_CC1_OBJS=${ans:="$OTHER_CC1_OBJS"}
X
Xecho
Xecho $n "What other object modules do you wish to link CPP with [$OTHER_CPP_OBJS]? $c"
Xread ans
XOTHER_CPP_OBJS=${ans:="$OTHER_CPP_OBJS"}
X
Xecho
Xecho "What other object modules do you wish to link the utilities"
Xecho $n "with [$OTHER_UTIL_OBJS]? $c"
Xread ans
XOTHER_UTIL_OBJS=${ans:="$OTHER_UTIL_OBJS"}
X
Xecho
Xif [ "$cross" = "no" ]; then
X	echo $n "What other libraries (-l format) do you wish to link with [$OTHER_LIBS]? $c"
X	read ans
X	OTHER_LIBS=${ans:="$OTHER_LIBS"}
X	HOST_OTHER_LIBS="$OTHER_LIBS"
Xelse
X	echo $n "What libraries (-l format) do you wish to link GCC with [$OTHER_LIBS]? $c"
X	read ans
X	OTHER_LIBS=${ans:="$OTHER_LIBS"}
X
X	echo
X	echo "What libraries (-l format) do you wish to link the utilities"
X	echo $n "with [$HOST_OTHER_LIBS]? $c"
X	read ans
X	HOST_OTHER_LIBS=${ans:="$HOST_OTHER_LIBS"}
Xfi
X
X
Xecho
Xecho $n "What shell do you wish to use to run make commands [$SHELL]? $c"
Xread ans
XSHELL=${ans:="$SHELL"}
X
Xecho
Xecho $n "How do you invoke bison [$BISON]? $c"
Xread ans
XBISON=${ans:="$BISON"}
X
Xecho
Xecho $n "What flags do you wish to invoke bison with [$BISONFLAGS]? $c"
Xread ans
XBISONFLAGS=${ans:="$BISONFLAGS"}
X
Xecho
Xecho "What C compiler do you wish to use to build gnulib with (not GCC)"
Xecho $n "[$OLDCC]? $c"
Xread ans
XOLDCC=${ans:="$OLDCC"}
X
Xecho
Xecho $n "What options do you wish to use to build gnulib with [$CCLIBFLAGS]? $c"
Xread ans
XCCLIBFLAGS=${ans:="$CCLIBFLAGS"}
X
Xecho
Xecho $n "Where is the archiver for building gnulib [$AR]? $c"
Xread ans
XAR=${ans:="$AR"}
X
Xecho
Xecho $n "What options to wish to use in building archives [$AR_FLAGS]? $c"
Xread ans
XAR_FLAGS=${ans:="$AR_FLAGS"}
X
Xecho
Xecho "On Berkeley based systems, you typically need to run /usr/bin/ranlib"
Xecho "on libraries after archiving them.  On System V based systems, you"
Xecho "may need to run the archiver with the 's' option.  If you don't need"
Xecho "to do anything, just use something harmless, like touch.  Due to the way"
Xecho "the Makefile is organized, the ranlib program should be a complete"
Xecho "pathname, instead of a simple program name."
Xecho
Xecho $n "What is the ranlib program? [$RANLIB] $c"
Xread ans
XRANLIB=${ans:="$RANLIB"}
X
Xecho
Xecho $n "What flags do you want to invoke $RANLIB with [$RANLIB_FLAGS] $c"
Xread ans
XRANLIB_FLAGS=${ans:="$RANLIB_FLAGS"}
X
Xecho
Xecho "What is the default prefix for finding GNU executables"
Xecho $n "[$EXEC_PREFIX]? $c"
Xread ans
XEXEC_PREFIX=${ans:="$EXEC_PREFIX"}
X
Xecho
Xecho "Where should GCC find private include files"
Xecho $n "[$INCDIR_GCC]? $c"
Xread ans
XINCDIR_GCC=${ans:="$INCDIR_GCC"}
X
Xecho
Xecho "Where should G++ find private include files"
Xecho $n "[$INCDIR_GPLUSPLUS]? $c"
Xread ans
XINCDIR_GPLUSPLUS=${ans:="$INCDIR_GPLUSPLUS"}
X
Xecho
Xecho "What name should GCC be installed as"
Xecho $n "[$GCC]? $c"
Xread ans
XGCC=${ans:="$GCC"}
Xbindir=`dirname $GCC`
Xlibdir=`dirname $EXEC_PREFIX`
X
Xecho
Xecho "What directory should the man page be installed in"
Xecho $n "[$mandir]? $c"
Xread ans
Xmandir=${ans:="$mandir"}
X
Xecho
Xecho $n "What extension should the man page have [$manext]? $c"
Xread ans
Xmanext=${ans:="$manext"}
X
Xrm -f make
Xecho > make '#!/bin/sh'
Xecho >>make ''
Xecho >>make '#Automatically generated script which sets compile time options'
Xecho >>make '#without forcing the user to change the Makefile'
Xecho >>make ''
Xecho >>make 'if [ \( $# -gt 0 \) -a \( "$1" = "-#" \) ]; then'
Xecho >>make '	set -x'
Xecho >>make '	shift'
Xecho >>make 'fi'
Xecho >>make
Xecho >>make "#defaults set by config.make"
Xecho >>make "FIRST_VAR='true'"
Xecho >>make "ALLOCA='${ALLOCA}'"
Xecho >>make "AR='${AR}'"
Xecho >>make "AR_FLAGS='${AR_FLAGS}'"
Xecho >>make "BISON='${BISON}'"
Xecho >>make "BISONFLAGS='${BISONFLAGS}'"
Xecho >>make "CC='${CC}'"
Xecho >>make "CCLIBFLAGS='${CCLIBFLAGS}'"
Xecho >>make "CFLAGS='${CFLAGS}'"
Xecho >>make "CLIB='${CLIB}'"
Xecho >>make "CONFIG_H='${CONFIG_H}'"
Xecho >>make "CONFIG2_H='${CONFIG2_H}'"
Xecho >>make "EXEC_PREFIX='${EXEC_PREFIX}'"
Xecho >>make "GCC='${GCC}'"
Xif [ "$cross" = "yes" ]; then
X	echo >>make "HOST_ALLOCA='${HOST_ALLOCA}'"
X	echo >>make "HOST_CC='${HOST_CC}'"
X	echo >>make "HOST_CFLAGS='${HOST_CFLAGS}'"
X	echo >>make "HOST_CLIB='${HOST_CLIB}'"
X	echo >>make "HOST_LDFLAGS='${HOST_LDFLAGS}'"
X	echo >>make "HOST_MALLOC='${HOST_MALLOC}'"
X	echo >>make "HOST_OBSTACK='${HOST_OBSTACK}'"
X	echo >>make "HOST_OTHER_LIBS='${HOST_OTHER_LIBS}'"
X	echo >>make "HOST_PREFIX='${HOST_PREFIX}'"
Xfi
Xecho >>make "INCDIR_GCC='${INCDIR_GCC}'"
Xecho >>make "INCDIR_GPLUSPLUS='${INCDIR_GPLUSPLUS}'"
Xecho >>make "INSTALL='${INSTALL}'"
Xecho >>make "LDFLAGS='${LDFLAGS}'"
Xecho >>make "MALLOC='${MALLOC}'"
Xecho >>make "MAKE='${MAKE}'"
Xecho >>make "MAKEFLAGS='${MAKEFLAGS}'"
Xecho >>make "OBSTACK='${OBSTACK}'"
Xecho >>make "OLDCC='${OLDCC}'"
Xecho >>make "OTHER_CC1_OBJS='${OTHER_CC1_OBJS}'"
Xecho >>make "OTHER_CPP_OBJS='${OTHER_CPP_OBJS}'"
Xecho >>make "OTHER_GCC_OBJS='${OTHER_GCC_OBJS}'"
Xecho >>make "OTHER_LIBS='${OTHER_LIBS}'"
Xecho >>make "OTHER_UTIL_OBJS='${OTHER_UTIL_OBJS}'"
Xecho >>make "RANLIB='${RANLIB}'"
Xecho >>make "RANLIB_FLAGS='${RANLIB_FLAGS}'"
Xecho >>make "SHELL='${SHELL}'"
Xecho >>make "bindir='${bindir}'"
Xecho >>make "libdir='${libdir}'"
Xecho >>make "mandir='${mandir}'"
Xecho >>make "manext='${manext}'"
Xecho >>make "LAST_VAR='true'"
Xecho >>make ""
Xecho >>make 'MAKE_ARGS=""'
Xecho >>make 'while [ $# -gt 0 ]; do'
Xecho >>make '	arg="$1"'
Xecho >>make '	shift'
Xecho >>make '	case "$arg" in'
Xecho >>make '		*=*" "*) arg=`echo "$arg" | sed -e "s/=\\(.*\\)/='"'\\\\1'/\"\`;;"
Xecho >>make '	esac'
Xecho >>make
Xecho >>make '	case "$arg" in'
Xecho >>make '		ALLOCA=*)		eval "$arg";;'
Xecho >>make '		AR=*)			eval "$arg";;'
Xecho >>make '		AR_FLAGS=*)		eval "$arg";;'
Xecho >>make '		BISON=*)		eval "$arg";;'
Xecho >>make '		BISONFLAGS=*)		eval "$arg";;'
Xecho >>make '		CC=*)			eval "$arg";;'
Xecho >>make '		CCLIBFLAGS=*)		eval "$arg";;'
Xecho >>make '		CFLAGS=*)		eval "$arg";;'
Xecho >>make '		CLIB=*)			eval "$arg";;'
Xecho >>make '		CONFIG_H=*)		eval "$arg";;'
Xecho >>make '		CONFIG2_H=*)		eval "$arg";;'
Xecho >>make '		EXEC_PREFIX=*)		eval "$arg";;'
Xecho >>make '		GCC=*)			eval "$arg";;'
Xif [ "$cross" = "yes" ]; then
X	echo >>make '		HOST_ALLOCA=*)		eval "$arg";;'
X	echo >>make '		HOST_CC=*)		eval "$arg";;'
X	echo >>make '		HOST_CFLAGS=*)		eval "$arg";;'
X	echo >>make '		HOST_CLIB=*)		eval "$arg";;'
X	echo >>make '		HOST_LDFLAGS=*)		eval "$arg";;'
X	echo >>make '		HOST_MALLOC=*)		eval "$arg";;'
X	echo >>make '		HOST_OBSTACK=*)		eval "$arg";;'
X	echo >>make '		HOST_OTHER_LIBS=*)	eval "$arg";;'
X	echo >>make '		HOST_PREFIX=*)		eval "$arg";;'
Xfi
Xecho >>make '		INCDIR_GCC=*)		eval "$arg";;'
Xecho >>make '		INCDIR_GPLUSPLUS=*)	eval "$arg";;'
Xecho >>make '		INSTALL=*)		eval "$arg";;'
Xecho >>make '		LDFLAGS=*)		eval "$arg";;'
Xecho >>make '		MALLOC=*)		eval "$arg";;'
Xecho >>make '		MAKE=*)			eval "$arg";;'
Xecho >>make '		MAKEFLAGS=*)		eval "$arg";;'
Xecho >>make '		OBSTACK=*)		eval "$arg";;'
Xecho >>make '		OLDCC=*)		eval "$arg";;'
Xecho >>make '		OTHER_CC1_OBJS=*)	eval "$arg";;'
Xecho >>make '		OTHER_CPP_OBJS=*)	eval "$arg";;'
Xecho >>make '		OTHER_GCC_OBJS=*)	eval "$arg";;'
Xecho >>make '		OTHER_LIBS=*)		eval "$arg";;'
Xecho >>make '		OTHER_UTIL_OBJS=*)	eval "$arg";;'
Xecho >>make '		RANLIB=*)		eval "$arg";;'
Xecho >>make '		RANLIB_FLAGS=*)		eval "$arg";;'
Xecho >>make '		SHELL=*)		eval "$arg";;'
Xecho >>make '		bindir=*)		eval "$arg";;'
Xecho >>make '		libdir=*)		eval "$arg";;'
Xecho >>make '		mandir=*)		eval "$arg";;'
Xecho >>make '		manext=*)		eval "$arg";;'
Xecho >>make '		*)			MAKE_ARGS="$MAKE_ARGS $arg";;'
Xecho >>make '	esac'
Xecho >>make 'done'
Xecho >>make ""
Xecho >>make 'exec $MAKE $MAKEFLAGS $MAKE_ARGS \'
Xecho >>make '	ALLOCA="${ALLOCA}" \'
Xecho >>make '	AR="${AR}" \'
Xecho >>make '	AR_FLAGS="${AR_FLAGS}" \'
Xecho >>make '	BISON="${BISON}" \'
Xecho >>make '	BISONFLAGS="${BISONFLAGS}" \'
Xecho >>make '	CC="${CC}" \'
Xecho >>make '	CCLIBFLAGS="${CCLIBFLAGS}" \'
Xecho >>make '	CFLAGS="${CFLAGS}" \'
Xecho >>make '	CLIB="${CLIB}" \'
Xecho >>make '	CONFIG_H="${CONFIG_H}" \'
Xecho >>make '	CONFIG2_H="${CONFIG2_H}" \'
Xecho >>make '	EXEC_PREFIX="${EXEC_PREFIX}" \'
Xecho >>make '	GCC="${GCC}" \'
Xif [ "$cross" = "yes" ]; then
X	echo >>make '	HOST_ALLOCA="${HOST_ALLOCA}" \'
X	echo >>make '	HOST_CC="${HOST_CC}" \'
X	echo >>make '	HOST_CFLAGS="${HOST_CFLAGS}" \'
X	echo >>make '	HOST_CLIB="${HOST_CLIB}" \'
X	echo >>make '	HOST_LDFLAGS="${HOST_LDFLAGS}" \'
X	echo >>make '	HOST_MALLOC="${HOST_MALLOC}" \'
X	echo >>make '	HOST_OBSTACK="${HOST_OBSTACK}" \'
X	echo >>make '	HOST_OTHER_LIBS="${HOST_OTHER_LIBS}" \'
X	echo >>make '	HOST_PREFIX="${HOST_PREFIX}" \'
Xfi
Xecho >>make '	INCDIR_GCC="${INCDIR_GCC}" \'
Xecho >>make '	INCDIR_GPLUSPLUS="${INCDIR_GPLUSPLUS}" \'
Xecho >>make '	INSTALL="${INSTALL}" \'
Xecho >>make '	LDFLAGS="${LDFLAGS}" \'
Xecho >>make '	MALLOC="${MALLOC}" \'
Xecho >>make '	OBSTACK="${OBSTACK}" \'
Xecho >>make '	OLDCC="${OLDCC}" \'
Xecho >>make '	OTHER_CC1_OBJS="${OTHER_CC1_OBJS}" \'
Xecho >>make '	OTHER_CPP_OBJS="${OTHER_CPP_OBJS}" \'
Xecho >>make '	OTHER_GCC_OBJS="${OTHER_GCC_OBJS}" \'
Xecho >>make '	OTHER_LIBS="${OTHER_LIBS}" \'
Xecho >>make '	OTHER_UTIL_OBJS="${OTHER_UTIL_OBJS}" \'
Xecho >>make '	RANLIB="${RANLIB}" \'
Xecho >>make '	RANLIB_FLAGS="${RANLIB_FLAGS}" \'
Xecho >>make '	SHELL="${SHELL}" \'
Xecho >>make '	bindir="${bindir}" \'
Xecho >>make '	libdir="${libdir}" \'
Xecho >>make '	mandir="${mandir}" \'
Xecho >>make '	manext="${manext}"'
X
Xchmod 775 make
Xrm -f make.save
Xexit 0
//go.sysin dd *
if [ `wc -c < config.make` != 17826 ]; then
	echo error transmitting config.make --
	echo length should be 17826, not `wc -c < config.make`
else
	chmod +x config.make
fi
if [ -r config.gcc ]; then
	echo config.gcc exists, moving to config.gcc.orig
	mv config.gcc config.gcc.orig
fi
echo Extracting config.gcc
sed 's/^X//' <<'//go.sysin dd *' >config.gcc
X#!/bin/sh
X# Configuration script for GNU CC
X#   Copyright (C) 1988 Free Software Foundation, Inc.
X
X#This file is part of GNU CC.
X
X#GNU CC is free software; you can redistribute it and/or modify
X#it under the terms of the GNU General Public License as published by
X#the Free Software Foundation; either version 1, or (at your option)
X#any later version.
X
X#GNU CC is distributed in the hope that it will be useful,
X#but WITHOUT ANY WARRANTY; without even the implied warranty of
X#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
X#GNU General Public License for more details.
X
X#You should have received a copy of the GNU General Public License
X#along with GNU CC; see the file COPYING.  If not, write to
X#the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
X
X#
X# Shell script to create proper links to machine-dependent files in
X# preparation for compiling gcc.
X#
X# Usage: config.gcc [-h host] [-m] [vint] machine
X#
X# If config.gcc succeeds, it leaves its status in config.status.
X# If config.gcc fails after disturbing the status quo, 
X# 	config.status is removed.
X#
X# If -m is specified, config.make will be called to make a shell script
X# `make' which sets the default options that the users wishes and then
X# invoke the real make.
X#
X# if -h is specified, the next argument is the host system on which the
X# compiler actually runs on (as opposed to the target system, the compiler
X# generates code for).
X
Xprogname=$0
X
Xremove=rm
Xhard_link=ln
Xsymbolic_link='ln -s'
X
X#for Test
X#remove="echo rm"
X#hard_link="echo ln"
X#symbolic_link="echo ln -s"
X
Xgen_make=false
Xwhile [ $# -gt 0 ]; do
X
X	case $1 in
X	-m)	gen_make=true
X		shift;;
X
X	-h)	case $2 in
X		vax | vms)		# for BSD vaxen or VMS
X			configuration_file=xm-vax.h;;
X
X		vax-sysv | vaxv)	# for vaxen running system V
X			configuration_file=xm-vaxv.h;;
X
X		sequent-i386)		# for Intel 80386's on Sequent Symmetry
X			configuration_file=xm-i386.h;;
X
X		i386-sysv | i386v | i386-sysv-gas | i386g)
X			configuration_file=xm-i386v.h;;
X
X		next)
X			configuration_file=xm-m68k.h;;
X
X		sun4 | sun-4)
X			configuration_file=xm-sparc.h;;
X
X		sun*-os4)
X			configuration_file=xm-sunos4.h;;
X
X		sun386 | sun386i | roadrunner)
X			configuration_file=xm-sun386i.h;;
X
X		sun[23]* | sun-[23]*)
X			configuration_file=xm-m68k.h;;
X
X		hp9k320*)
X			configuration_file=xm-hp9k320.h;;
X
X		isi68 | news800)
X			configuration_file=xm-m68k.h;;
X
X		3b1)
X			configuration_file=xm-3b1.h;;
X
X		sequent-ns32k | sequent | encore)
X			configuration_file=xm-ns32k.h;;
X
X		genix)
X			configuration_file=xm-gnx.h;;
X
X		dgux-*88* | *88*-dgux)
X			configuration_file=xm-m88kdgux.h;;
X
X		88000 | m88k | 88k)
X			configuration_file=xm-m88k.h;;
X
X		alliant)			# Alliant FX/8
X			configuration_file=xm-alliant.h;;
X
X		convex-c[12] | convex)
X			configuration_file=xm-convex.h;;
X
X		mips)
X			configuration_file=xm-mips.h;;
X
X#		370)
X#			configuration_file=xm-370;;
X
X		*)
X			if [ -f xm-$2.h ]; then
X				configuration_file=xm-$2.h
X			else
X				echo Unknown machine: $2
X				exit 1
X			fi;;
X
X		esac
X		shift
X		shift;;
X
X	*)	break;;
X	esac
Xdone
X
Xcase $# in
X2)
X	vint=on
X	shift
X	;;
X*)
X	;;
Xesac
X
Xcase $# in
X1)
X	machine=$1
X
X	case $machine in
X	vax)					# for vaxen running bsd
X		;;
X	vms)					# for vaxen running VMS
X		cpu_type=vax
X		configuration_file=${configuration_file-xm-${machine}.h}
X		target_machine=tm-${machine}.h
X		;;
X	vax-sysv | vaxv)			# for vaxen running system V
X		cpu_type=vax
X		configuration_file=${configuration_file-xm-vaxv.h}
X		target_machine=tm-vaxv.h
X		;;
X	sequent-i386)			# for Intel 80386's on Sequent Symmetry
X		cpu_type=i386
X		configuration_file=${configuration_file-xm-i386.h}
X		target_machine=tm-seq386.h
X		;;
X	i386-sysv | i386v)		# for Intel 80386's running system V
X		machine=i386v
X		cpu_type=i386
X		configuration_file=${configuration_file-xm-${machine}.h}
X		target_machine=tm-${machine}.h
X		;;
X	i386-sysv-gas | i386g)
X		cpu_type=i386
X		configuration_file=${configuration_file-xm-i386v.h}
X		target_machine=tm-i386gas.h
X		;;		
X	next )
X		cpu_type=m68k
X		configuration_file=${configuration_file-xm-m68k.h}
X		target_machine=tm-next.h
X	;;
X	sun4 | sun-4)
X		cpu_type=sparc
X		configuration_file=${configuration_file-xm-sparc.h}
X		target_machine=tm-sun4os3.h
X		;;
X	sun3 | sun-3)
X		cpu_type=m68k
X		configuration_file=${configuration_file-xm-m68k.h}
X		target_machine=tm-sun3.h
X		;;
X	sun3-nfp | sun-3-nfp)
X		cpu_type=m68k
X		configuration_file=${configuration_file-xm-m68k.h}
X		target_machine=tm-sun3-nfp.h
X		;;
X	sun3-fpa | sun-3-fpa)
X		cpu_type=m68k
X		configuration_file=${configuration_file-xm-m68k.h}
X		target_machine=tm-sun3-fpa.h
X		;;
X	sun2 | sun-2)
X		cpu_type=m68k
X		configuration_file=${configuration_file-xm-m68k.h}
X		target_machine=tm-sun2.h
X		;;
X	sun386 | sun386i | roadrunner)
X		cpu_type=i386
X		configuration_file=${configuration_file-xm-sun386i.h}
X		target_machine=tm-sun386i.h
X		;;
X	sun4-os4 | sun-4-os4)
X		cpu_type=sparc
X		configuration_file=${configuration_file-xm-sunos4.h}
X		target_machine=tm-sparc.h
X		;;
X	sun3-os4 | sun-3-os4)
X		cpu_type=m68k
X		configuration_file=${configuration_file-xm-sunos4.h}
X		target_machine=tm-sun3.h
X		;;
X	sun3-nfp-os4 | sun-3-nfp-os4)
X		cpu_type=m68k
X		configuration_file=${configuration_file-xm-sunos4.h}
X		target_machine=tm-sun3-nfp.h
X		;;
X	sun3-fpa-os4 | sun-3-fpa-os4)
X		cpu_type=m68k
X		configuration_file=${configuration_file-xm-sunos4.h}
X		target_machine=tm-sun3-fpa.h
X		;;
X	sun2-os4 |sun-2-os4)
X		cpu_type=m68k
X		configuration_file=${configuration_file-xm-sunos4.h}
X		target_machine=tm-sun2.h
X		;;
X	hp9k320)			# HP 9000 series 300 with gcc alone
X		cpu_type=m68k
X		configuration_file=${configuration_file-xm-hp9k320.h}
X		;;
X	hp9k320-gas | hp9k320g)		#    with gnu as, ld and gdb
X		cpu_type=m68k
X		configuration_file=${configuration_file-xm-hp9k320.h}
X		;;
X	isi68)
X		cpu_type=m68k
X		;;
X	news | news800)
X	        configuration_file=${configuration_file-xm-news.h}
X	        target_machine=tm-news.h
X		cpu_type=m68k
X		;;
X	news-gas | news-g)
X	        configuration_file=${configuration_file-xm-news.h}
X	        target_machine=tm-newsgas.h
X		cpu_type=m68k
X		;;
X	altos | altos3068)        # Altos 3068 with gnu as, ld and gdb
X        	cpu_type=m68k
X	        configuration_file=${configuration_file-xm-altos3068.h}
X	        target_machine=tm-altos3068.h
X	        ;;
X	3b1)
X		cpu_type=m68k
X		configuration_file=${configuration_file-xm-${machine}.h}
X		;;
X	sequent-ns32k | sequent)
X		cpu_type=ns32k
X		aux_output=out-ns32k.c
X		;;
X	encore)
X		cpu_type=ns32k
X		aux_output=out-ns32k.c
X		;;
X	genix)
X		machine=ns32k
X		cpu_type=ns32k
X		configuration_file=${configuration_file-xm-gnx.h}
X		;;
X	dgux-*88* | *88*-dgux)
X		machine=m88k
X		cpu_type=m88k
X		target_machine=tm-m88kdgux.h
X		configuration_file=${configuration_file-xm-m88kdgux.h}
X		;;
X	88000 | m88k | 88k)
X		cpu_type=m88k
X		target_machine=tm-${cpu_type}.h
X		configuration_file=${configuration_file-xm-m88k.h}
X		;;
X	alliant)				# Alliant FX/8
X		;;
X	convex-c1)				# Convex C1
X		target_machine=tm-convex1.h
X		cpu_type=convex
X		;;
X	convex-c2)				# Convex C2
X		target_machine=tm-convex2.h
X		cpu_type=convex
X		;;
X	mips)
X		machine=mips
X		;;
X#	370)
X#		machine=370
X#		;;
X	esac
X
X		# if cpu_type is not set, define cpu_type to machine.
X		#
X	cpu_type=${cpu_type-$machine}
X	configuration_file=${configuration_file-xm-$cpu_type.h}
X	target_machine=${target_machine-tm-$machine.h}
X	machine_description=${cpu_type}.md
X	aux_output=${aux_output-out-$cpu_type.c}
X
X	if [ xx${vint} = xx ]
X	then
X		files="$configuration_file $target_machine
X			$machine_description $aux_output"
X		links="config.h tm.h md aux-output.c"
X	else
X		files="$configuration_file tm-vmc.h $target_machine
X			$machine_description $aux_output"
X		links="config.h tm.h tm-pre.h md aux-output.c"
X	fi
X
X	while [ -n "$files" ]
X	do
X		# set file to car of files, files to cdr of files
X		set $files; file=$1; shift; files=$*
X		set $links; link=$1; shift; links=$*
X
X		if [ ! -r config/$file ]
X		then
X			echo "$progname: cannot create a link \`$link',"
X			echo "since the file \`config/$file' does not exist."
X			exit 1
X		fi
X
X		$remove -f $link
X		rm -f config.status
X		# Make a symlink if possible, otherwise try a hard link
X		$symbolic_link config/$file $link 2>/dev/null || $hard_link config/$file $link
X
X		if [ ! -r $link ]
X		then
X			echo "$progname: unable to link \`$link' to \`config/$file'."
X			exit 1
X		fi
X		echo "Linked \`$link' to \`config/$file'."
X	done
X
X	if [ xx${vint} = xx ]
X	then
X		echo "Links are now set up for use with a $machine." \
X			| tee config.status
X	else
X		echo "Links are now set up for use with a $machine (vint)." \
X			| tee config.status
X	fi
X
X
X	if [ "$gen_make" = "true" ]; then
X		chmod +x config.make
X		./config.make
X	fi
X
X	exit 0
X
X	;;
X*)
X	echo "Usage: $progname [-h host] [-m] machine"
X	echo -n "Where \`machine' is something like "
X	echo "\`vax', \`sun3', \`umax', etc."
X	echo "-h is specified if you want to build a cross"
X	echo "compiler on a different system."
X	echo "and -m is specified if you want to configure"
X	echo "default make actions."
X	if [ -r config.status ]
X	then
X		cat config.status
X	fi
X	exit 1
X	;;
Xesac
//go.sysin dd *
if [ `wc -c < config.gcc` != 8971 ]; then
	echo error transmitting config.gcc --
	echo length should be 8971, not `wc -c < config.gcc`
else
	chmod +x config.gcc
fi
exit