AC_INIT(tree.c)
AC_CONFIG_HEADER(config.h:config.in)
-native_prefix=/usr
remove=rm
hard_link=ln
symbolic_link='ln -s'
# Find some useful tools
AC_PROG_AWK
AC_PROG_LEX
-AC_PROG_LN_S
+GCC_PROG_LN
+GCC_PROG_LN_S
AC_PROG_RANLIB
AC_PROG_YACC
-AC_PROG_INSTALL
+EGCS_PROG_INSTALL
# Find the native compiler
AC_PROG_CC
AC_PROG_MAKE_SET
-AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
+AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h varargs.h sys/varargs.h)
GCC_NEED_DECLARATION(malloc)
GCC_NEED_DECLARATION(realloc)
AC_DECL_SYS_SIGLIST
-AC_CHECK_FUNCS(strerror)
+AC_CHECK_FUNCS(strerror strtoul bsearch)
# File extensions
manext='.1'
tmake_file=alpha/t-vms
fixincludes=Makefile.in
;;
+ arc-*-elf*)
+ extra_parts="crtinit.o crtfini.o"
+ ;;
arm-*-coff* | armel-*-coff*)
tm_file=arm/coff.h
tmake_file=arm/t-bare
tm_file=arm/netbsd.h
xm_file=arm/xm-netbsd.h
tmake_file=arm/t-netbsd
- # On NetBSD, the headers are already okay.
- fixincludes=Makefile.in
+ # On NetBSD, the headers are already okay, except for math.h.
+ fixincludes=fixinc.math
use_collect2=yes
;;
arm-*-linux-gnuaout*) # ARM Linux
i[[3456]]86-*-freebsdelf*)
tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
xm_file=i386/xm-freebsd.h
- # On FreeBSD, the headers are already ok.
- fixincludes=Makefile.in
+ # On FreeBSD, the headers are already ok, except for math.h.
+ fixincludes=fixinc.math
tmake_file=i386/t-freebsd
gas=yes
gnu_ld=yes
i[[3456]]86-*-freebsd*)
tm_file=i386/freebsd.h
xm_file=i386/xm-freebsd.h
- # On FreeBSD, the headers are already ok.
- fixincludes=Makefile.in
+ # On FreeBSD, the headers are already ok, except for math.h.
+ fixincludes=fixinc.math
tmake_file=i386/t-freebsd
;;
i[[3456]]86-*-netbsd*)
tm_file=i386/netbsd.h
xm_file=i386/xm-netbsd.h
- # On NetBSD, the headers are already okay.
- fixincludes=Makefile.in
+ # On NetBSD, the headers are already okay, except for math.h.
+ fixincludes=fixinc.math
tmake_file=t-netbsd
;;
i[[3456]]86-*-coff*)
m68k-*-netbsd*)
tm_file=m68k/netbsd.h
xm_file=m68k/xm-netbsd.h
- # On NetBSD, the headers are already okay.
- fixincludes=Makefile.in
+ # On NetBSD, the headers are already okay, except for math.h.
+ fixincludes=fixinc.math
tmake_file=t-netbsd
;;
m68k-*-sysv3*) # Motorola m68k's running system V.3
mips-dec-netbsd*) # Decstation running NetBSD
tm_file=mips/netbsd.h
xm_file=mips/xm-netbsd.h
- # On NetBSD, the headers are already okay.
- fixincludes=Makefile.in
+ # On NetBSD, the headers are already okay, except for math.h.
+ fixincludes=fixinc.math
tmake_file=t-netbsd
- if [[ x$prefix = xNONE ]]; then
- prefix=$native_prefix
- fi
- prefix=$native_prefix
;;
mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
tm_file=mips/news4.h
ns32k-pc532-netbsd*)
tm_file=ns32k/netbsd.h
xm_file=ns32k/xm-netbsd.h
- # On NetBSD, the headers are already okay.
- fixincludes=Makefile.in
+ # On NetBSD, the headers are already okay, except for math.h.
+ fixincludes=fixinc.math
tmake_file=t-netbsd
;;
pdp11-*-bsd)
sparc-*-netbsd*)
tm_file=sparc/netbsd.h
xm_file=sparc/xm-netbsd.h
- # On NetBSD, the headers are already okay.
- fixincludes=Makefile.in
+ # On NetBSD, the headers are already okay, except for math.h.
+ fixincludes=fixinc.math
tmake_file=t-netbsd
;;
sparc-*-bsd*)
tm_file=sparc/bsd.h
;;
sparc-*-linux-gnuaout*) # Sparc's running Linux, a.out
- xm_file=sparc/xm-linux.h
+ xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
tm_file=sparc/linux-aout.h
xmake_file=x-linux
fixincludes=Makefile.in #On Linux, the headers are ok already.
gnu_ld=yes
;;
- sparc-*-linux-gnulibc1*) # Sparc's running Linux
- xm_file=sparc/xm-linux.h # with ELF format using the
- xmake_file=x-linux # Linux C library 5.
+ sparc-*-linux-gnulibc1*) # Sparc's running Linux, libc5
+ xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
+ xmake_file=x-linux
tm_file=sparc/linux.h
tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
fixincludes=Makefile.in #On Linux, the headers are ok already.
gnu_ld=yes
;;
- sparc-*-linux-gnu*) # Sparc's running Linux
- xm_file=sparc/xm-linux.h # with ELF format using glibc 2
- xmake_file=x-linux # aka the Linux C library 6.
+ sparc-*-linux-gnu*) # Sparc's running Linux, libc6
+ xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
+ xmake_file=x-linux
tm_file=sparc/linux.h
tmake_file="t-linux sparc/t-linux"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
tm_file=sparc/sunos4.h
tmake_file=sparc/t-sunos41
use_collect2=yes
+ if [[ x$gas = xyes ]]; then
+ tm_file="${tm_file} sparc/sun4gas.h"
+ fi
;;
sparc-*-sunos3*)
tm_file=sparc/sun4o3.h
tm_file=sparc/sp64-elf.h
extra_parts="crtbegin.o crtend.o"
;;
+ sparc64-*-linux*) # 64-bit Sparc's running Linux
+ tmake_file=sparc/t-sp64
+ xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
+ tm_file=sparc/linux64.h
+ xmake_file=x-linux
+ fixincludes=Makefile.in # On Linux, the headers are ok already.
+ gnu_ld=yes
+ ;;
# This hasn't been upgraded to GCC 2.
# tahoe-harris-*) # Harris tahoe, using COFF.
# tm_file=tahoe/harris.h
vax-*-netbsd*)
tm_file="${tm_file} netbsd.h vax/netbsd.h"
xm_file="${xm_file} xm-netbsd.h"
- # On NetBSD, the headers are already okay.
- fixincludes=Makefile.in
+ # On NetBSD, the headers are already okay, except for math.h.
+ fixincludes=fixinc.math
tmake_file=t-netbsd
float_format=vax
;;
# Get the version number from the toplevel
version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
-# Are we using gcc as the native compiler?
-case $host in
-*linux*) # All Linux's use gcc as the native compiler.
- if [[ x$prefix = xNONE ]]; then
- prefix=$native_prefix
- fi
- ;;
-esac
-
# Get an absolute path to the GCC top-level source directory
holddir=`pwd`
cd $srcdir
# If we have gas in the build tree, make a link to it.
if [[ -f ../gas/Makefile ]]; then
- rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
+ rm -f as; $symbolic_link ../gas/as-new as 2>/dev/null
fi
# If we have ld in the build tree, make a link to it.
if [[ -f ../ld/Makefile ]]; then
# if [[ x$use_collect2 = x ]]; then
-# rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
+# rm -f ld; $symbolic_link ../ld/ld-new ld 2>/dev/null
# else
- rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
+ rm -f collect-ld; $symbolic_link ../ld/ld-new collect-ld 2>/dev/null
# fi
fi
echo "source ${srcdir}/.gdbinit" >> .gdbinit
fi
+# If this is using newlib, then define inhibit_libc in
+# LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
+# libgcc.a, but that's OK because newib should have its own version of
+# assert.h.
+inhibit_libc=
+if [[ x$with_newlib = xyes ]]; then
+ inhibit_libc=-Dinhibit_libc
+fi
+AC_SUBST(inhibit_libc)
+
# Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
sched_prefix=
sched_cflags=
AC_SUBST(maybe_use_collect2)
AC_SUBST(cc_set_by_configure)
AC_SUBST(stage_prefix_set_by_configure)
+AC_SUBST(install)
AC_SUBST_FILE(target_overrides)
AC_SUBST_FILE(host_overrides)
xconfig.h:config.in)
echo > cstamp-h ;;
esac
+# If the host supports symlinks, point stage[1234] at ../stage[1234] so
+# bootstrapping and the installation procedure can still use
+# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
+# FLAGS_TO_PASS has been modified to solve the problem there.
+# This is virtually a duplicate of what happens in configure.lang; we do
+# an extra check to make sure this only happens if ln -s can be used.
+if [[ "$symbolic_link" = "ln -s" ]]; then
+ for d in .. ${subdirs} ; do
+ if [[ $d != .. ]]; then
+ STARTDIR=`pwd`
+ cd $d
+ for t in stage1 stage2 stage3 stage4 include
+ do
+ rm -f $t
+ $symbolic_link ../$t $t 2>/dev/null
+ done
+ cd $STARTDIR
+ fi
+ done
+else true ; fi
],
[
host='${host}'
local_prefix='${local_prefix}'
build_install_headers_dir='${build_install_headers_dir}'
build_exeext='${build_exeext}'
+out_file='${out_file}'
gdb_needs_out_file_path='${gdb_needs_out_file_path}'
SET_MAKE='${SET_MAKE}'
target_list='${target_list}'