OSDN Git Service

* config/libgloss.h: Add a note discouraging use with ELF.
[pf3gnuchains/gcc-fork.git] / gcc / configure.in
index 834d8d2..f104a09 100644 (file)
@@ -53,7 +53,7 @@ AC_MSG_RESULT($library_path_setting)
 if test "$library_path_setting" != "ok"; then
 AC_MSG_ERROR([
 *** LIBRARY_PATH shouldn't contain the current directory when
-*** building egcs. Please change the environment variable
+*** building gcc. Please change the environment variable
 *** and run configure again.])
 fi
 
@@ -79,7 +79,7 @@ AC_MSG_RESULT($gcc_exec_prefix_setting)
 if test "$gcc_exec_prefix_setting" != "ok"; then
 AC_MSG_ERROR([
 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
-*** building egcs. Please change the environment variable
+*** building gcc. Please change the environment variable
 *** and run configure again.])
 fi
 
@@ -183,6 +183,20 @@ no)        ;;
 *)     AC_MSG_ERROR(bad value ${enableval} given for checking option) ;;
 esac])
 
+AC_ARG_ENABLE(cpp,
+[  --disable-cpp           don't provide a user-visible C preprocessor.],
+[], [enable_cpp=yes])
+
+AC_ARG_WITH(cpp_install_dir,
+[  --with-cpp-install-dir=DIR
+                          install the user visible C preprocessor in DIR
+                          (relative to PREFIX) as well as PREFIX/bin.],
+[if test x$withval = xyes; then
+  AC_MSG_ERROR([option --with-cpp-install-dir requires an argument])
+elif test x$withval != xno; then
+  cpp_install_dir=$withval
+fi])
+
 # Use cpplib+cppmain for the preprocessor, but don't link it with the compiler.
 cpp_main=cccp
 AC_ARG_ENABLE(cpplib,
@@ -194,7 +208,7 @@ fi)
 # Link cpplib into the compiler proper, for C/C++/ObjC.
 AC_ARG_ENABLE(c-cpplib,
 [  --enable-c-cpplib       link cpplib directly into C and C++ compilers
-                          (implies --enable-cpplib).],
+                          (EXPERIMENTAL) (implies --enable-cpplib).],
 if test x$enable_c_cpplib != xno; then
   extra_c_objs="${extra_c_objs} libcpp.a"
   extra_cxx_objs="${extra_cxx_objs} ../libcpp.a"
@@ -208,7 +222,16 @@ AC_ARG_ENABLE(c-mbchar,
 if test x$enable_c_mbchar != xno; then
   extra_c_flags=-DMULTIBYTE_CHARS=1
 fi)
-  
+
+# Disable fast fixincludes
+AC_ARG_ENABLE(fast-fixincludes,
+[  --disable-fast-fixincludes
+                         Disable the new fast fixincludes.
+                         Run the old fixincludes script unconditionally],
+if test x$enable_fast_fixincludes = xno ; then
+  cp $srcdir/fixincludes ./fixinc.sh
+fi)
+
 # Enable Haifa scheduler.
 AC_ARG_ENABLE(haifa,
 [  --enable-haifa          use the experimental scheduler.
@@ -323,7 +346,7 @@ AC_HEADER_STDC
 AC_HEADER_TIME
 GCC_HEADER_STRING
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h sys/stat.h)
+AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h sys/stat.h direct.h)
 
 # Check for thread headers.
 AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
@@ -383,7 +406,7 @@ AC_FUNC_VFORK
 
 GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \
        index rindex getenv atol sbrk abort atof strerror getcwd getwd \
-       strsignal putc_unlocked fputs_unlocked)
+       strsignal putc_unlocked fputs_unlocked strstr)
 
 GCC_NEED_DECLARATIONS(getrlimit setrlimit, [
 #include <sys/types.h>
@@ -394,6 +417,9 @@ GCC_NEED_DECLARATIONS(getrlimit setrlimit, [
 
 AC_DECL_SYS_SIGLIST
 
+# mkdir takes a single argument on some systems. 
+GCC_FUNC_MKDIR_TAKES_ONE_ARG
+
 # File extensions
 manext='.1'
 objext='.o'
@@ -410,9 +436,6 @@ host_xmake_file=
 host_truncate_target=
 host_exeext=
 
-# It is relative to $prefix.
-cpp_install_dir=
-
 # Decode the host machine, then the target machine.
 # For the host machine, we save the xm_file variable as host_xm_file;
 # then we decode the target machine and forget everything else
@@ -496,6 +519,13 @@ changequote([,])dnl
        tm_file=${cpu_type}/${cpu_type}.h
        xm_file=${cpu_type}/xm-${cpu_type}.h
        
+       # On a.out targets, we need to use collect2.
+       case $machine in
+       *-*-*aout*)
+               use_collect2=yes
+               ;;
+       esac    
+
        # Common parts for linux-gnu and openbsd systems
        case $machine in
        *-*-linux-gnu*)
@@ -503,11 +533,11 @@ changequote([,])dnl
                ;;
        *-*-openbsd*)
                tm_file=${cpu_type}/openbsd.h
-               # On OpenBSD systems, the headers are okay
-               fixincludes=Makefile.in
                tmake_file="t-libc-ok t-openbsd"
                # avoid surprises, always provide an xm-openbsd file 
                xm_file=${cpu_type}/xm-openbsd.h
+               # don't depend on processor x-fragments as well
+               xmake_file=none
                if test x$enable_threads = xyes; then
                        thread_file='posix'
                        tmake_file="${tmake_file} t-openbsd-thread"
@@ -556,16 +586,14 @@ changequote([,])dnl
                tm_file="${tm_file} alpha/alpha32.h interix.h alpha/alpha-interix.h"
 
                # GAS + IEEE_CONFORMANT+IEEE (no inexact);
-               #  see alpha.h for bitmasks
-               #target_cpu_default=$((4+8+16))
+               #target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT|MASK_IEEE"
 
-               # GAS + IEEE_CONFORMANT; see alpha.h for bitmasks
-               target_cpu_default=$((4+8))
+               # GAS + IEEE_CONFORMANT
+               target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT"
 
                xm_file="alpha/xm-alpha-interix.h xm-interix.h"
                xmake_file="x-interix alpha/t-pe"
-               tmake_file="alpha/t-interix"
-               fixincludes=fixinc.interix
+               tmake_file="alpha/t-interix alpha/t-ieee"
                if test x$enable_threads = xyes ; then
                        thread_file='posix'
                fi
@@ -578,6 +606,7 @@ changequote([,])dnl
        alpha*-*-linux-gnuecoff*)
                tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
                target_cpu_default="MASK_GAS"
+               tmake_file="alpha/t-ieee"
                gas=no
                xmake_file=none
                gas=yes gnu_ld=yes
@@ -585,7 +614,7 @@ changequote([,])dnl
        alpha*-*-linux-gnulibc1*)
                tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
                target_cpu_default="MASK_GAS"
-               tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe"
+               tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe alpha/t-ieee"
                extra_parts="crtbegin.o crtend.o"
                xmake_file=none
                gas=yes gnu_ld=yes
@@ -596,7 +625,7 @@ changequote([,])dnl
        alpha*-*-linux-gnu*)
                tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
                target_cpu_default="MASK_GAS"
-               tmake_file="t-linux alpha/t-linux alpha/t-crtbe"
+               tmake_file="t-linux alpha/t-linux alpha/t-crtbe alpha/t-ieee"
                extra_parts="crtbegin.o crtend.o"
                xmake_file=none
                gas=yes gnu_ld=yes
@@ -607,7 +636,7 @@ changequote([,])dnl
        alpha*-*-netbsd*)
                tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
                target_cpu_default="MASK_GAS"
-               tmake_file="alpha/t-crtbe"
+               tmake_file="alpha/t-crtbe alpha/t-ieee"
                extra_parts="crtbegin.o crtend.o"
                xmake_file=none
                gas=yes gnu_ld=yes
@@ -616,7 +645,7 @@ changequote([,])dnl
        alpha*-*-openbsd*)
                # default x-alpha is only appropriate for dec-osf.
                target_cpu_default="MASK_GAS"
-               xmake_file=none
+               tmake_file="alpha/t-ieee"
                ;;
                
        alpha*-dec-osf*)
@@ -629,6 +658,7 @@ changequote([,])dnl
                        extra_passes="mips-tfile mips-tdump"
                fi
                use_collect2=yes
+               tmake_file="alpha/t-ieee"
                case $machine in
                  *-*-osf1*)
                    tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
@@ -655,6 +685,7 @@ changequote([,])dnl
                ;;
        alpha*-*-vxworks*)
                tm_file="${tm_file} dbx.h alpha/vxworks.h"
+               tmake_file="alpha/t-ieee"
                if [ x$gas != xyes ]
                then
                        extra_passes="mips-tfile mips-tdump"
@@ -665,7 +696,7 @@ changequote([,])dnl
        alpha*-*-winnt*)
                tm_file="${tm_file} alpha/alpha32.h alpha/win-nt.h winnt/win-nt.h"
                xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
-               tmake_file=t-libc-ok
+               tmake_file="t-libc-ok alpha/t-ieee"
                xmake_file=winnt/x-winnt
                extra_host_objs=oldnames.o
                extra_gcc_objs="spawnv.o oldnames.o"
@@ -680,7 +711,7 @@ changequote([,])dnl
        alpha*-dec-vms*)
                tm_file=alpha/vms.h
                xm_file="${xm_file} alpha/xm-vms.h"
-               tmake_file=alpha/t-vms
+               tmake_file="alpha/t-vms alpha/t-ieee"
                ;;
        arc-*-elf*)
                extra_parts="crtinit.o crtfini.o"
@@ -723,6 +754,7 @@ changequote([,])dnl
                tm_file=arm/netbsd.h
                xm_file="arm/xm-netbsd.h ${xm_file}"
                tmake_file="t-netbsd arm/t-netbsd"
+       use_collect2=yes
                ;;
        arm*-*-linux-gnuaout*)          # ARM GNU/Linux with a.out
                cpu_type=arm
@@ -751,6 +783,10 @@ changequote([,])dnl
                        ;;
                esac
                ;;
+       arm*-*-uclinux*)                # ARM ucLinux
+               tm_file=arm/uclinux-elf.h
+               tmake_file=arm/t-arm-elf
+               ;;
        arm*-*-aout)
                tm_file=arm/aout.h
                tmake_file=arm/t-bare
@@ -767,6 +803,11 @@ changequote([,])dnl
                tm_file=arm/unknown-elf-oabi.h
                tmake_file=arm/t-arm-elf
                ;;
+       arm-*-pe*)
+               tm_file=arm/pe.h
+               tmake_file=arm/t-pe
+               extra_objs=pe.o
+               ;;
        c1-convex-*)                    # Convex C1
                target_cpu_default=1
                use_collect2=yes
@@ -810,38 +851,53 @@ changequote([,])dnl
        h8300-*-*)
                float_format=i32
                ;;
+       hppa*-*-linux*)
+               target_cpu_default="(MASK_PA_11 | MASK_GAS | MASK_JUMP_IN_DELAY)"
+               tm_file="${tm_file} pa/elf.h linux.h pa/pa-linux.h"
+               tmake_file="t-linux pa/t-linux"
+               extra_parts="crtbegin.o crtend.o"
+               xmake_file=none
+               gas=yes gnu_ld=yes
+               if test x$enable_threads = xyes; then
+                       thread_file='posix'
+               fi
+               ;;
        hppa*-*-openbsd*)
-               target_cpu_default="MASK_SNAKE"
+               target_cpu_default="MASK_PA_11"
                tmake_file=pa/t-openbsd
                ;;
        hppa1.1-*-pro*)
-               tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
+               target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
+               tm_file="${tm_file} elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h"
                xm_file=pa/xm-papro.h
                tmake_file=pa/t-pro
                ;;
        hppa1.1-*-osf*)
-               target_cpu_default="MASK_SNAKE"
-               tm_file="${tm_file} pa/pa-osf.h"
+               target_cpu_default="MASK_PA_11"
+               tm_file="${tm_file} pa/som.h pa/pa-osf.h"
                use_collect2=yes
                ;;
        hppa1.1-*-rtems*)
-               tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
+               target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
+               tm_file="${tm_file} elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h"
                xm_file=pa/xm-papro.h
                tmake_file=pa/t-pro
                ;;
        hppa1.0-*-osf*)
-               tm_file="${tm_file} pa/pa-osf.h"
+               tm_file="${tm_file} pa/som.h pa/pa-osf.h"
                use_collect2=yes
                ;;
        hppa1.1-*-bsd*)
-               target_cpu_default="MASK_SNAKE"
+               tm_file="${tm_file} pa/som.h"
+               target_cpu_default="MASK_PA_11"
                use_collect2=yes
                ;;
        hppa1.0-*-bsd*)
+               tm_file="${tm_file} pa/som.h"
                use_collect2=yes
                ;;
        hppa1.0-*-hpux7*)
-               tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
+               tm_file="pa/pa-oldas.h ${tm_file} pa/som.h pa/pa-hpux7.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -854,7 +910,7 @@ changequote([,])dnl
 changequote(,)dnl
        hppa1.0-*-hpux8.0[0-2]*)
 changequote([,])dnl
-               tm_file="${tm_file} pa/pa-hpux.h"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -869,8 +925,8 @@ changequote([,])dnl
 changequote(,)dnl
        hppa1.1-*-hpux8.0[0-2]*)
 changequote([,])dnl
-               target_cpu_default="MASK_SNAKE"
-               tm_file="${tm_file} pa/pa-hpux.h"
+               target_cpu_default="MASK_PA_11"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -883,8 +939,8 @@ changequote([,])dnl
                use_collect2=yes
                ;;
        hppa1.1-*-hpux8*)
-               target_cpu_default="MASK_SNAKE"
-               tm_file="${tm_file} pa/pa-hpux.h"
+               target_cpu_default="MASK_PA_11"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -895,7 +951,7 @@ changequote([,])dnl
                use_collect2=yes
                ;;
        hppa1.0-*-hpux8*)
-               tm_file="${tm_file} pa/pa-hpux.h"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -906,8 +962,8 @@ changequote([,])dnl
                use_collect2=yes
                ;;
        hppa1.1-*-hpux10* | hppa2*-*-hpux10*)
-               target_cpu_default="MASK_SNAKE"
-               tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
+               target_cpu_default="MASK_PA_11"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                tmake_file=pa/t-pa
@@ -926,7 +982,7 @@ changequote([,])dnl
                use_collect2=yes
                ;;
        hppa1.0-*-hpux10*)
-               tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                tmake_file=pa/t-pa
@@ -944,9 +1000,47 @@ changequote([,])dnl
                install_headers_dir=install-headers-cpio
                use_collect2=yes
                ;;
+       hppa1.1-*-hpux11* | hppa2*-*-hpux11*)
+               target_cpu_default="MASK_PA_11"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
+               xm_file=pa/xm-pahpux.h
+               xmake_file=pa/x-pa-hpux
+               tmake_file=pa/t-pa
+               if [[ x$gas = xyes ]]
+               then
+                       tm_file="${tm_file} pa/pa-gas.h"
+               fi
+#              if [[ x$enable_threads = x ]]; then
+#                  enable_threads=$have_pthread_h
+#              fi
+#              if [[ x$enable_threads = xyes ]]; then
+#                      thread_file='dce'
+#                      tmake_file="${tmake_file} pa/t-dce-thr"
+#              fi
+               install_headers_dir=install-headers-cpio
+               use_collect2=yes
+               ;;
+       hppa1.0-*-hpux11*)
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
+               xm_file=pa/xm-pahpux.h
+               xmake_file=pa/x-pa-hpux
+               if [[ x$gas = xyes ]]
+               then
+                       tm_file="${tm_file} pa/pa-gas.h"
+               fi
+#              if [[ x$enable_threads = x ]]; then
+#                  enable_threads=$have_pthread_h
+#              fi
+#              if [[ x$enable_threads = xyes ]]; then
+#                      thread_file='dce'
+#                      tmake_file="${tmake_file} pa/t-dce-thr"
+#              fi
+               install_headers_dir=install-headers-cpio
+               use_collect2=yes
+               ;;
        hppa1.1-*-hpux* | hppa2*-*-hpux*)
-               target_cpu_default="MASK_SNAKE"
-               tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
+               target_cpu_default="MASK_PA_11"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -957,7 +1051,7 @@ changequote([,])dnl
                use_collect2=yes
                ;;
        hppa1.0-*-hpux*)
-               tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -968,8 +1062,8 @@ changequote([,])dnl
                use_collect2=yes
                ;;
        hppa1.1-*-hiux* | hppa2*-*-hiux*)
-               target_cpu_default="MASK_SNAKE"
-               tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
+               target_cpu_default="MASK_PA_11"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -980,7 +1074,7 @@ changequote([,])dnl
                use_collect2=yes
                ;;
        hppa1.0-*-hiux*)
-               tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
+               tm_file="${tm_file} pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
                xm_file=pa/xm-pahpux.h
                xmake_file=pa/x-pa-hpux
                if test x$gas = xyes
@@ -991,12 +1085,21 @@ changequote([,])dnl
                use_collect2=yes
                ;;
        hppa*-*-lites*)
-               target_cpu_default="MASK_SNAKE"
+               tm_file="${tm_file} elfos.h pa/elf.h"
+               target_cpu_default="MASK_PA_11"
                use_collect2=yes
                ;;
        i370-*-mvs*)
                ;;
 changequote(,)dnl
+       i[34567]86-*-elf*)
+changequote([,])dnl
+               xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h"
+               tm_file=i386/i386elf.h
+               tmake_file=i386/t-i386elf
+               xmake_file=x-svr4
+               ;;
+changequote(,)dnl
        i[34567]86-ibm-aix*)            # IBM PS/2 running AIX
 changequote([,])dnl
                 if test x$gas = xyes
@@ -1117,11 +1220,9 @@ changequote([,])dnl
 changequote(,)dnl
        i[34567]86-*-freebsdelf*)
 changequote([,])dnl
-               tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
-               # On FreeBSD, the headers are already ok, except for math.h.
-               fixincludes=fixinc.wrap
+               tm_file="i386/i386.h i386/att.h svr4.h i386/freebsd-elf.h i386/perform.h"
                extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
-               tmake_file=i386/t-freebsd
+               tmake_file=t-freebsd
                gas=yes
                gnu_ld=yes
                stabs=yes
@@ -1130,18 +1231,18 @@ changequote(,)dnl
        i[34567]86-*-freebsd*)
 changequote([,])dnl
                tm_file=i386/freebsd.h
-               tmake_file=i386/t-freebsd
+               tmake_file=t-freebsd
                ;;
 changequote(,)dnl
        i[34567]86-*-netbsd*)
 changequote([,])dnl
                tm_file=i386/netbsd.h
                tmake_file=t-netbsd
+       use_collect2=yes
                ;;
 changequote(,)dnl
        i[34567]86-*-openbsd*)
 changequote([,])dnl
-               # Remove when the math emulator is fixed
                # we need collect2 until our bug is fixed...
                use_collect2=yes
                ;;
@@ -1402,6 +1503,9 @@ changequote([,])dnl
                tmake_file=i386/t-crtpic
                xmake_file=x-svr4
                extra_parts="crtbegin.o crtend.o"
+              if test x$enable_threads = xyes; then
+                      thread_file='posix'
+              fi
                ;;
 changequote(,)dnl
        i[34567]86-*-sysv4*)            # Intel 80386's running system V.4
@@ -1426,6 +1530,7 @@ changequote([,])dnl
                tmake_file="i386/t-crtpic i386/t-udk"
                xmake_file=x-svr4
                extra_parts="crtbegin.o crtend.o"
+               install_headers_dir=install-headers-cpio
                ;;
 changequote(,)dnl
        i[34567]86-*-osf1*)             # Intel 80386's running OSF/1 1.3+
@@ -1527,7 +1632,6 @@ changequote([,])dnl
                tmake_file="i386/t-cygwin i386/t-uwin"
                extra_objs=winnt.o
                xmake_file=i386/x-cygwin
-               fixincludes=Makefile.in
                if test x$enable_threads = xyes; then
                        thread_file='win32'
                fi
@@ -1542,7 +1646,6 @@ changequote([,])dnl
                tmake_file="i386/t-interix"
                extra_objs=interix.o
                xmake_file=x-interix
-               fixincludes=fixinc.interix
                if test x$enable_threads = xyes ; then
                        thread_file='posix'
                fi
@@ -1990,7 +2093,7 @@ changequote([,])dnl
                float_format=m68k
                ;;
        m68020-*-elf* | m68k-*-elf*)
-               tm_file="m68k/m68020-elf.h libgloss.h"
+               tm_file="m68k/m68020-elf.h"
                xm_file=m68k/xm-m68kv.h
                tmake_file=m68k/t-m68kelf
                header_files=math-68881.h
@@ -2012,6 +2115,7 @@ changequote([,])dnl
                tm_file=m68k/netbsd.h
                tmake_file=t-netbsd
                float_format=m68k
+       use_collect2=yes
                ;;
        m68k*-*-openbsd*)
                float_format=m68k
@@ -2157,16 +2261,21 @@ changequote([,])dnl
                tmake_file=m88k/t-sysv4
                ;;
        mips-sgi-irix6*)                # SGI System V.4., IRIX 6
-               tm_file=mips/iris6.h
+               if test "x$gnu_ld" = xyes
+               then
+                       tm_file="mips/iris6.h mips/iris6gld.h"
+               else
+                       tm_file=mips/iris6.h
+               fi
+               tmake_file=mips/t-iris6
                xm_file=mips/xm-iris6.h
                xmake_file=mips/x-iris6
-               tmake_file=mips/t-iris6
 #              if test x$enable_threads = xyes; then
 #                      thread_file='irix'
 #              fi
                ;;
        mips-wrs-vxworks)
-               tm_file="mips/elf.h libgloss.h"
+               tm_file="mips/elf.h mips/vxworks.h"
                tmake_file=mips/t-ecoff
                gas=yes
                gnu_ld=yes
@@ -2341,17 +2450,14 @@ changequote([,])dnl
                extra_parts="crtbegin.o crtend.o"
                gnu_ld=yes
                gas=yes
-               fixincludes=Makefile.in 
                ;;
        mips*el-*-openbsd*)     # mips little endian
                target_cpu_default="MASK_GAS|MASK_ABICALLS"
                tm_file=mips/openbsd.h
-               xmake_file=none
                ;;
        mips*-*-openbsd*)               # mips big endian
                target_cpu_default="MASK_GAS|MASK_ABICALLS"
                tm_file=mips/openbsd-be.h
-               xmake_file=none
                ;;
        mips-sony-bsd* | mips-sony-newsos*)     # Sony NEWS 3600 or risc/news.
                tm_file="mips/news4.h ${tm_file}"
@@ -2584,42 +2690,40 @@ changequote([,])dnl
                tmake_file=mips/t-ecoff
                ;;
        mipsel-*-elf*)
-               tm_file="mips/elfl.h libgloss.h"
-               tmake_file=mips/t-ecoff
+               tm_file="mips/elfl.h"
+               tmake_file=mips/t-elf
                ;;
        mips-*-elf*)
-               tm_file="mips/elf.h libgloss.h"
-               tmake_file=mips/t-ecoff
+               tm_file="mips/elf.h"
+               tmake_file=mips/t-elf
                ;;
        mips64el-*-elf*)
-               tm_file="mips/elfl64.h libgloss.h"
-               tmake_file=mips/t-ecoff
+               tm_file="mips/elfl64.h"
+               tmake_file=mips/t-elf
                ;;
        mips64orionel-*-elf*)
-               tm_file="mips/elforion.h mips/elfl64.h libgloss.h"
-               tmake_file=mips/t-ecoff
+               tm_file="mips/elforion.h mips/elfl64.h"
+               tmake_file=mips/t-elf
                ;;
        mips64-*-elf*)
-               tm_file="mips/elf64.h libgloss.h"
-               tmake_file=mips/t-ecoff
+               tm_file="mips/elf64.h"
+               tmake_file=mips/t-elf
                ;;
        mips64orion-*-elf*)
-               tm_file="mips/elforion.h mips/elf64.h libgloss.h"
-               tmake_file=mips/t-ecoff
+               tm_file="mips/elforion.h mips/elf64.h"
+               tmake_file=mips/t-elf
                ;;
        mips64orion-*-rtems*)
                tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
                tmake_file="mips/t-ecoff t-rtems"
                ;;
        mipstx39el-*-elf*)
-               tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
+               tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
                tmake_file=mips/t-r3900
                ;;
        mipstx39-*-elf*)
-               tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
+               tm_file="mips/r3900.h mips/elf.h mips/abi64.h"
                tmake_file=mips/t-r3900
-               # FIXME mips-elf should be fixed to use crtstuff.
-               use_collect2=yes
                ;;
        mips-*-*)                               # Default MIPS RISC-OS 4.0.
                if test x$stabs = xyes; then
@@ -2696,6 +2800,7 @@ changequote([,])dnl
                xm_file="ns32k/xm-netbsd.h ${xm_file}"
                # On NetBSD, the headers are already okay, except for math.h.
                tmake_file=t-netbsd
+       use_collect2=yes
                ;;
         pdp11-*-bsd)
                tm_file="${tm_file} pdp11/2bsd.h"
@@ -2722,7 +2827,6 @@ changequote([,])dnl
                ;;
        powerpc-*-openbsd*)
                tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
-               xmake_file=none
                ;;
        powerpc-*-beos*)
                cpu_type=rs6000
@@ -2904,24 +3008,24 @@ changequote([,])dnl
 changequote(,)dnl
        rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
 changequote([,])dnl
-               if test "$gnu_ld" = yes
-               then
-                       tm_file=rs6000/aix41-gld.h
-               else
-                       tm_file=rs6000/aix41.h
-               fi
+               tm_file=rs6000/aix41.h
                if test x$host != x$target
                then
                        tmake_file=rs6000/t-xnewas
                else
                        tmake_file=rs6000/t-newas
                fi
-               xmake_file=rs6000/x-aix41
+               if test "$gnu_ld" = yes
+               then
+                       xmake_file=rs6000/x-aix41-gld
+               else
+                       xmake_file=rs6000/x-aix41
+               fi
                float_format=none
                use_collect2=yes
                ;;
 changequote(,)dnl
-       rs6000-ibm-aix4.[3456789].* | powerpc-ibm-aix4.[3456789].*)
+       rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
 changequote([,])dnl
                tm_file=rs6000/aix43.h
                if test x$host != x$target
@@ -3004,6 +3108,7 @@ changequote([,])dnl
        sparc-*-netbsd*)
                tm_file=sparc/netbsd.h
                tmake_file=t-netbsd
+       use_collect2=yes
                ;;
        sparc-*-openbsd*)
                # we need collect2 until our bug is fixed...
@@ -3032,6 +3137,7 @@ changequote([,])dnl
                tmake_file="t-linux t-linux-gnulibc1"
                extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
                gnu_ld=yes
+               float_format=sparc
                ;;
        sparc-*-linux-gnu*)             # Sparc's running GNU/Linux, libc6
                xm_file="${xm_file} sparc/xm-linux.h"
@@ -3043,6 +3149,7 @@ changequote([,])dnl
                if test x$enable_threads = xyes; then
                        thread_file='posix'
                fi
+               float_format=sparc
                ;;
        sparc-*-lynxos*)
                if test x$gas = xyes
@@ -3087,7 +3194,6 @@ changequote([,])dnl
                 tmake_file="sparc/t-halos sparc/t-sol2"
                 xmake_file=sparc/x-sysv4
                 extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
-                fixincludes=fixinc.svr4
                 broken_install=yes
                 ;;
        sparc-*-solaris2*)
@@ -3186,6 +3292,7 @@ changequote([,])dnl
                xmake_file=x-linux
                extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
                gnu_ld=yes
+               float_format=sparc
                ;;
 # This hasn't been upgraded to GCC 2.
 #      tahoe-harris-*)                 # Harris tahoe, using COFF.
@@ -3200,6 +3307,27 @@ changequote([,])dnl
                md_file=arm/thumb.md
                tmake_file=arm/t-thumb
                ;;
+       thumb-*-elf* | thumbel-*-elf*)
+               tm_file=arm/telf.h
+               out_file=arm/thumb.c
+               xm_file=arm/xm-thumb.h
+               md_file=arm/thumb.md
+               tmake_file=arm/t-thumb-elf
+               ;;
+       thumb-*-linux-gnu*)
+               tm_file=arm/linux-telf.h
+               out_file=arm/thumb.c
+               xm_file=arm/xm-thumb.h
+               md_file=arm/thumb.md
+               tmake_file=arm/t-thumb-linux
+               ;;
+       thumb-*-uclinux*)
+               tm_file=arm/uclinux-telf.h
+               out_file=arm/thumb.c
+               md_file=arm/thumb.md
+               tmake_file=arm/t-thumb-linux
+               xm_file=arm/xm-thumb.h
+               ;;
        thumb-wrs-vxworks)
                tm_file=arm/tcoff.h
                out_file=arm/thumb.c
@@ -3208,6 +3336,14 @@ changequote([,])dnl
                tmake_file=arm/t-thumb
                thread_file='vxworks'
                ;;
+       thumb-*-pe)
+               tm_file=arm/tpe.h
+               out_file=arm/thumb.c
+               xm_file=arm/xm-thumb.h
+               md_file=arm/thumb.md
+               tmake_file=arm/t-pe-thumb
+               extra_objs=pe.o
+               ;;
 # This hasn't been upgraded to GCC 2.
 #      tron-*-*)
 #              cpu_type=gmicro
@@ -3237,9 +3373,10 @@ changequote([,])dnl
                tm_file="${tm_file} netbsd.h vax/netbsd.h"
                tmake_file=t-netbsd
                float_format=vax
+       use_collect2=yes
                ;;
        vax-*-openbsd*)
-               tmake_file="${tm_file} vax/t-openbsd"
+               tmake_file="${tmake_file} vax/t-openbsd"
                ;;
        vax-*-ultrix*)                  # vaxen running ultrix
                tm_file="${tm_file} vax/ultrix.h"
@@ -3315,7 +3452,7 @@ changequote([,])dnl
        alpha*-*-*)
                case $machine in
                        alphaev6*)
-                               target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_CIX|MASK_MAX"
+                               target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX"
                                ;;
                        alphapca56*)
                                target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
@@ -3528,7 +3665,7 @@ then
 fi
 
 # Handle cpp installation.
-if [[ x$enable_cpp != x ]]
+if test x$enable_cpp != xno
 then
   tmake_file="$tmake_file t-install-cpp"
 fi
@@ -3917,7 +4054,55 @@ changequote([,])dnl
        fi
 elif test x$host = x$target; then
        # Native build.
-       gcc_cv_as=as$host_exeext
+       # Search the same directories that the installed compiler will
+       # search.  Else we may find the wrong assembler and lose.  If we
+       # do not find a suitable assembler binary, then try the user's
+       # path.
+       #
+       # Also note we have to check MD_EXEC_PREFIX before checking the
+       # user's path.  Unfortunately, there is no good way to get at the
+       # value of MD_EXEC_PREFIX here.  So we do a brute force search
+       # through all the known MD_EXEC_PREFIX values.  Ugh.  This needs
+       # to be fixed as part of the make/configure rewrite too.
+
+       if test "x$exec_prefix" = xNONE; then
+               if test "x$prefix" = xNONE; then
+                       test_prefix=/usr/local
+               else
+                       test_prefix=$prefix
+               fi
+       else
+               test_prefix=$exec_prefix
+       fi
+
+       # If the loop below does not find an assembler, then use whatever
+       # one we can find in the users's path.
+       # user's path.
+       as=as$host_exeext
+
+       test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
+                  $test_prefix/lib/gcc-lib/$target \
+                  /usr/lib/gcc/$target/$gcc_version \
+                  /usr/lib/gcc/$target \
+                  $test_prefix/$target/bin/$target/$gcc_version \
+                  $test_prefix/$target/bin \
+                  /usr/libexec \
+                  /usr/ccs/gcc \
+                  /usr/ccs/bin \
+                  /udk/usr/ccs/bin \
+                  /bsd43/usr/lib/cmplrs/cc \
+                  /usr/cross64/usr/bin \
+                  /usr/lib/cmplrs/cc \
+                  /sysv/usr/lib/cmplrs/cc \
+                  /svr4/usr/lib/cmplrs/cc \
+                  /usr/bin"
+
+       for dir in $test_dirs; do
+               if test -f $dir/as$host_exeext; then
+                       gcc_cv_as=$dir/as$host_exeext
+                       break;
+               fi
+       done
 fi
 if test x$gcc_cv_as != x; then
        # Check if we have .balign and .p2align
@@ -3975,6 +4160,71 @@ EOF
 fi
 AC_MSG_RESULT($gcc_cv_as_subsections)
 
+case "$target" in 
+  sparc*-*-*)
+    AC_MSG_CHECKING(assembler .register pseudo-op support)
+    gcc_cv_as_register_pseudo_op=
+    if test x$gcc_cv_as != x; then
+       # Check if we have .register
+       echo ".register %g2, #scratch" > conftest.s
+       if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+               gcc_cv_as_register_pseudo_op=yes
+               AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP)
+       fi
+       rm -f conftest.s conftest.o
+    fi
+    AC_MSG_RESULT($gcc_cv_as_register_pseudo_op)
+
+    AC_MSG_CHECKING([assembler offsetable %lo() support])
+    gcc_cv_as_offsetable_lo10=
+    if test x$gcc_cv_as != x; then
+       # Check if assembler has offsetable %lo()
+       echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
+       echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
+       gcc_cv_as_flags64="-xarch=v9"
+       if ! $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s > /dev/null 2>&1; then
+               gcc_cv_as_flags64="-64"
+               if ! $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s > /dev/null 2>&1; then
+                       gcc_cv_as_flags64=""
+               fi
+       fi
+       if test -n "$gcc_cv_as_flags64" ; then
+               if $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s > /dev/null 2>&1; then
+                       if cmp conftest.o conftest1.o > /dev/null 2>&1; then
+                               :
+                       else
+                               gcc_cv_as_offsetable_lo10=yes
+                               AC_DEFINE(HAVE_AS_OFFSETABLE_LO10)
+                       fi
+               fi
+       fi
+       rm -f conftest.s conftest.o conftest1.s conftest1.o
+    fi
+    AC_MSG_RESULT($gcc_cv_as_offsetable_lo10)
+    ;;
+
+changequote(,)dnl
+  i[34567]86-*-*)
+changequote([,])dnl
+    AC_MSG_CHECKING(assembler instructions)
+    gcc_cv_as_instructions=
+    if test x$gcc_cv_as != x; then
+       set "filds fists" "filds mem; fists mem"
+       while test $# -gt 0
+       do
+               echo "$2" > conftest.s
+               if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+                       gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
+                       AC_DEFINE_UNQUOTED(HAVE_GAS_`echo "$1" | tr '[a-z ]' '[A-Z_]'`)
+               fi
+               shift 2
+       done
+       rm -f conftest.s conftest.o
+    fi
+    AC_MSG_RESULT($gcc_cv_as_instructions)
+    ;;
+esac
+
 # Figure out what language subdirectories are present.
 # Look if the user specified --enable-languages="..."; if not, use
 # the environment variable $LANGUAGES if defined. $LANGUAGES might