⛏️ index : buildtools.git

author Jerome Duval <jerome.duval@gmail.com> 2013-04-19 20:57:06.0 +02:00:00
committer Jerome Duval <jerome.duval@gmail.com> 2013-04-19 20:57:06.0 +02:00:00
commit
86fff949210400f2738c5899ce466e3573be5575 [patch]
tree
a3ba50ec47363bb06b2f79114d3d01382d9f570b
parent
83284845923aadb6587d353d52e3ca2f630592ce
download
86fff949210400f2738c5899ce466e3573be5575.tar.gz

import gcc 4.6.3



Diff

 gcc/Makefile.in                     |   8 --------
 gcc/compile                         |   0 
 gcc/config.rpath                    |   2 --
 gcc/configure                       |  46 ++++++++++++++++------------------------------
 gcc/libtool.m4                      |  21 +++++++++++----------
 gcc/config/acx.m4                   |  36 +++++++++++++++---------------------
 gcc/gcc/Makefile.in                 |   2 +-
 gcc/gcc/config.gcc                  |  38 --------------------------------------
 gcc/gcc/configure                   |  31 ++++++++++++++-----------------
 gcc/gcc/configure.ac                |  11 +----------
 gcc/gcc/crtstuff.c                  |   4 ----
 gcc/gcc/defaults.h                  |   4 ----
 gcc/libcpp/configure                |   1 -
 gcc/libcpp/configure.ac             |   1 -
 gcc/libgcc/config.host              |  12 ------------
 gcc/libgomp/configure               |  19 +++++++++++++------
 gcc/libmudflap/configure            |  17 ++++++++++++-----
 gcc/libquadmath/configure           |   2 +-
 gcc/libssp/configure                |  17 ++++++++++++-----
 gcc/libstdc++-v3/configure          | 596 ++++++++++++--------------------------------------------------------------------
 gcc/libstdc++-v3/crossconfig.m4     |  42 ------------------------------------------
 gcc/lto-plugin/configure            |   2 +-
 gcc/zlib/configure                  |   2 +-
 gcc/gcc/config/haiku.h              | 179 --------------------------------------------------------------------------------
 gcc/gcc/config/t-haiku              |   4 ----
 gcc/gcc/doc/cppopts.texi            |   2 +-
 gcc/gcc/doc/generic.texi            |   4 ++--
 gcc/gcc/doc/invoke.texi             |  16 ++++++++--------
 gcc/gcc/doc/sourcebuild.texi        |   2 +-
 gcc/gcc/ginclude/stdarg.h           |   2 +-
 gcc/gcc/ginclude/stddef.h           |  10 +++++-----
 gcc/libstdc++-v3/libsupc++/tinfo.cc |   9 ---------
 gcc/gcc/config/arm/haiku.h          |  83 --------------------------------------------------------------------------------
 gcc/gcc/config/arm/t-haiku          |  21 ---------------------
 gcc/gcc/config/i386/haiku.h         |  79 -------------------------------------------------------------------------------
 gcc/gcc/config/i386/haiku64.h       | 139 --------------------------------------------------------------------------------
 gcc/gcc/config/i386/host-cygwin.c   |   0 
 gcc/gcc/config/i386/t-haiku64       |  16 ----------------
 gcc/gcc/config/i386/winnt-cxx.c     |   0 
 gcc/gcc/config/i386/winnt-stubs.c   |   0 
 gcc/gcc/config/m68k/haiku.h         | 270 --------------------------------------------------------------------------------
 gcc/gcc/config/mips/haiku.h         |  47 -----------------------------------------------
 gcc/gcc/config/rs6000/haiku.h       |  59 -----------------------------------------------------------
 gcc/libgcc/config/i386/t-cygming    |   0 
 44 files changed, 128 insertions(+), 1728 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 90c36f4..51edbdf 100644
--- a/gcc/Makefile.in
+++ a/gcc/Makefile.in
@@ -17721,7 +17721,6 @@
	esac; \
	srcdiroption="--srcdir=$${topdir}/mpfr"; \
	libsrcdir="$$s/mpfr"; \
	cp $(s)/gmp/gmp-impl.h $(s)/gmp/longlong.h ../gmp/ ; \
	$(SHELL) $${libsrcdir}/configure \
	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
	  --target=${target_alias} $${srcdiroption} --disable-shared @extra_mpfr_configure_flags@ \
@@ -17755,7 +17754,6 @@
	esac; \
	srcdiroption="--srcdir=$${topdir}/mpfr"; \
	libsrcdir="$$s/mpfr"; \
	cp $(s)/gmp/gmp-impl.h $(s)/gmp/longlong.h ../gmp/ ; \
	$(SHELL) $${libsrcdir}/configure \
	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
	  --target=${target_alias} $${srcdiroption} \
@@ -17789,7 +17787,6 @@
	esac; \
	srcdiroption="--srcdir=$${topdir}/mpfr"; \
	libsrcdir="$$s/mpfr"; \
	cp $(s)/gmp/gmp-impl.h $(s)/gmp/longlong.h ../gmp/ ; \
	$(SHELL) $${libsrcdir}/configure \
	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
	  --target=${target_alias} $${srcdiroption} \
@@ -17798,7 +17795,6 @@
	  --disable-shared @extra_mpfr_configure_flags@
@endif mpfr-bootstrap


.PHONY: configure-stage3-mpfr maybe-configure-stage3-mpfr
maybe-configure-stage3-mpfr:
@if mpfr-bootstrap
@@ -17825,7 +17821,6 @@
	esac; \
	srcdiroption="--srcdir=$${topdir}/mpfr"; \
	libsrcdir="$$s/mpfr"; \
	cp $(s)/gmp/gmp-impl.h $(s)/gmp/longlong.h ../gmp/ ; \
	$(SHELL) $${libsrcdir}/configure \
	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
	  --target=${target_alias} $${srcdiroption} \
@@ -17860,7 +17855,6 @@
	esac; \
	srcdiroption="--srcdir=$${topdir}/mpfr"; \
	libsrcdir="$$s/mpfr"; \
	cp $(s)/gmp/gmp-impl.h $(s)/gmp/longlong.h ../gmp/ ; \
	$(SHELL) $${libsrcdir}/configure \
	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
	  --target=${target_alias} $${srcdiroption} \
@@ -17895,7 +17889,6 @@
	esac; \
	srcdiroption="--srcdir=$${topdir}/mpfr"; \
	libsrcdir="$$s/mpfr"; \
	cp $(s)/gmp/gmp-impl.h $(s)/gmp/longlong.h ../gmp/ ; \
	$(SHELL) $${libsrcdir}/configure \
	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
	  --target=${target_alias} $${srcdiroption} \
@@ -17930,7 +17923,6 @@
	esac; \
	srcdiroption="--srcdir=$${topdir}/mpfr"; \
	libsrcdir="$$s/mpfr"; \
	cp $(s)/gmp/gmp-impl.h $(s)/gmp/longlong.h ../gmp/ ; \
	$(SHELL) $${libsrcdir}/configure \
	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
	  --target=${target_alias} $${srcdiroption} \
diff --git a/gcc/compile b/gcc/compile
index ec64c62..ec64c62 100644
--- a/gcc/compile
+++ a/gcc/compile
diff --git a/gcc/config.rpath b/gcc/config.rpath
index 5bcc5be..4dea759 100755
--- a/gcc/config.rpath
+++ a/gcc/config.rpath
@@ -161,8 +161,6 @@
      ;;
    netbsd*)
      ;;
    haiku*)
      ;;
    solaris* | sysv5*)
      if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
        ld_shlibs=no
diff --git a/gcc/configure b/gcc/configure
index bf04ee4..6be5e9d 100755
--- a/gcc/configure
+++ a/gcc/configure
@@ -2991,9 +2991,6 @@
  *-*-cygwin*)
    noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
    ;;
  *-*-haiku*)
    noconfigdirs="$noconfigdirs tk itcl libgui gdb"
    ;;
  *-*-netbsd*)
    noconfigdirs="$noconfigdirs rcs"
    ;;
@@ -3148,9 +3145,6 @@
	noconfigdirs="$noconfigdirs ${libgcj}"
	;;
    esac
    ;;
  *-*-haiku)
    noconfigdirs="$noconfigdirs target-libiberty"
    ;;
  *-*-kaos*)
    # Remove unsupported stuff on all kaOS configurations.
@@ -3607,9 +3601,6 @@
    ;;
  ip2k-*-*)
    noconfigdirs="$noconfigdirs target-libstdc++-v3 ${libgcj}"
    ;;
  *-*-haiku*)
    noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
    ;;
  *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
@@ -5137,30 +5128,25 @@
if test "${gcc_cv_prog_cmp_skip+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  # comparing object files via cmp doesn't work on haiku (files will seemingly
  # always differ), so we disassemble both files and compare the results:
  if uname -o | grep -iq haiku; then
    gcc_cv_prog_cmp_skip='objdump -Dz $$f1 | tail +6 >tmp-foo1; objdump -Dz $$f2 | tail +6 >tmp-foo2; cmp tmp-foo1 tmp-foo2'
  else 
    gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
    echo abfoo >t1
    echo cdfoo >t2
    if cmp t1 t2 2 2 > /dev/null 2>&1; then
      if cmp t1 t2 1 1 > /dev/null 2>&1; then
        :
      else
        gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
      fi
   echo abfoo >t1
  echo cdfoo >t2
  gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
  if cmp t1 t2 2 2 > /dev/null 2>&1; then
    if cmp t1 t2 1 1 > /dev/null 2>&1; then
      :
    else
      gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
    fi
    if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
      if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
        :
      else
        gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
      fi
  fi
  if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
    if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
      :
    else
      gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
    fi
    rm t1 t2
  fi
  rm t1 t2

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_cmp_skip" >&5
$as_echo "$gcc_cv_prog_cmp_skip" >&6; }
diff --git a/gcc/libtool.m4 b/gcc/libtool.m4
index bda1c60..67321a7 100644
--- a/gcc/libtool.m4
+++ a/gcc/libtool.m4
@@ -1709,7 +1709,7 @@
  lt_cv_dlopen_libs=

  case $host_os in
  beos* | haiku* )
  beos*)
    lt_cv_dlopen="load_add_on"
    lt_cv_dlopen_libs=
    lt_cv_dlopen_self=yes
@@ -2171,7 +2171,7 @@
  esac
  ;;

beos* | haiku*)
beos*)
  library_names_spec='${libname}${shared_ext}'
  dynamic_linker="$host_os ld.so"
  shlibpath_var=LIBRARY_PATH
@@ -2329,7 +2329,7 @@
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
  hardcode_into_libs=yes
  ;;

@@ -2978,7 +2978,7 @@
  lt_cv_deplibs_check_method=pass_all
  ;;

beos* | haiku*)
beos*)
  lt_cv_deplibs_check_method=pass_all
  ;;

@@ -3589,7 +3589,8 @@
        ;;
      esac
      ;;
    beos* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)

    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
      # PIC is the default for these OSes.
      ;;
    mingw* | cygwin* | os2* | pw32* | cegcc*)
@@ -3900,7 +3901,7 @@
      esac
      ;;

    beos* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
      # PIC is the default for these OSes.
      ;;

@@ -4414,8 +4415,8 @@
      ;;

    haiku*)
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
      _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
      _LT_TAGVAR(link_all_deplibs, $1)=yes
      ;;

    interix[[3-9]]*)
@@ -5770,8 +5771,8 @@
        ;;

      haiku*)
        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
        _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
        _LT_TAGVAR(link_all_deplibs, $1)=yes
        ;;

      hpux9*)
diff --git a/gcc/config/acx.m4 b/gcc/config/acx.m4
index 4b319f0..9ff31eb 100644
--- a/gcc/config/acx.m4
+++ a/gcc/config/acx.m4
@@ -402,30 +402,24 @@
dnl accepted by cmp on some systems.
AC_DEFUN([ACX_PROG_CMP_IGNORE_INITIAL],
[AC_CACHE_CHECK([how to compare bootstrapped objects], gcc_cv_prog_cmp_skip,
[# comparing object files via cmp doesn't work on haiku (files will seemingly
  # always differ), so we disassemble both files and compare the results:
  if uname -o | grep -iq haiku; then
    gcc_cv_prog_cmp_skip='objdump -Dz $$f1 | tail +6 >tmp-foo1; objdump -Dz $$f2 | tail +6 >tmp-foo2; cmp tmp-foo1 tmp-foo2'
  else 
    gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
    echo abfoo >t1
    echo cdfoo >t2
    if cmp t1 t2 2 2 > /dev/null 2>&1; then
      if cmp t1 t2 1 1 > /dev/null 2>&1; then
        :
      else
        gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
      fi
[ echo abfoo >t1
  echo cdfoo >t2
  gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
  if cmp t1 t2 2 2 > /dev/null 2>&1; then
    if cmp t1 t2 1 1 > /dev/null 2>&1; then
      :
    else
      gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
    fi
    if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
      if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
        :
      else
        gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
      fi
  fi
  if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
    if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
      :
    else
      gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
    fi
    rm t1 t2
  fi
  rm t1 t2
])
do_compare="$gcc_cv_prog_cmp_skip"
AC_SUBST(do_compare)
diff --git a/gcc/gcc/Makefile.in b/gcc/gcc/Makefile.in
index a5af5a0..872956d 100644
--- a/gcc/gcc/Makefile.in
+++ a/gcc/gcc/Makefile.in
@@ -3929,7 +3929,7 @@
genprog = $(genprogerr) check checksum condmd

# These programs need libs over and above what they get from the above list.
build/genautomata$(build_exeext) : BUILD_LIBS += @math_library@
build/genautomata$(build_exeext) : BUILD_LIBS += -lm

# These programs are not linked with the MD reader.
build/gengtype$(build_exeext) : build/gengtype-lex.o build/gengtype-parse.o \
diff --git a/gcc/gcc/config.gcc b/gcc/gcc/config.gcc
index 02dfbd5..39d9a19 100644
--- a/gcc/gcc/config.gcc
+++ a/gcc/gcc/config.gcc
@@ -814,17 +814,6 @@
	extra_parts=""
	use_collect2=yes
	;;
arm*-*-haiku*)
	tmake_file="${tmake_file} t-haiku arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-haiku"
	tm_file="dbxelf.h elfos.h haiku.h arm/elf.h arm/bpabi.h arm/haiku.h"
	tm_file="$tm_file ../../libgcc/config/arm/bpabi-lib.h"
	# The BPABI long long divmod functions return a 128-bit value in
	# registers r0-r3.  Correctly modeling that requires the use of
	# TImode.
	need_64bit_hwint=yes
	default_use_cxa_atexit=yes
	tm_file="${tm_file} arm/aout.h arm/arm.h"
	;;
arm*-*-linux*)			# ARM GNU/Linux with ELF
	tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
	case $target in
@@ -1230,16 +1219,6 @@
	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
	tmake_file="${tmake_file} i386/t-crtstuff"
	;;
i[34567]86-*-haiku*)
	tmake_file='t-haiku i386/t-crtpic'
	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h haiku.h i386/haiku.h"
	extra_parts='crtbegin.o crtend.o'
	;;
x86_64-*-haiku*)
	tmake_file='t-haiku i386/t-haiku64'
	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h haiku.h i386/haiku64.h"
	extra_parts='crtbegin.o crtend.o'
	;;
i[34567]86-*-netbsdelf*)
	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
	extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
@@ -1833,13 +1812,6 @@
	tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h m68k/rtemself.h rtems.h newlib-stdint.h"
	tm_defines="${tm_defines} MOTOROLA=1"
	extra_parts="crtbegin.o crtend.o"
	;;
m68k-*-haiku*)
	default_m68k_cpu=68020
	default_cf_cpu=5206
	tmake_file="m68k/t-m68kbare m68k/t-crtstuff t-haiku" #??
	tm_file="${tm_file} dbxelf.h elfos.h haiku.h m68k/haiku.h"
	tm_defines="${tm_defines} MOTOROLA=1"
	;;
mcore-*-elf)
	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
@@ -2032,11 +2004,6 @@
	tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
	tmake_file="mips/t-elf mips/t-libgcc-mips16"
	;;
mipsel-*-haiku*)
	tmake_file='mips/t-elf t-haiku'
	tm_file="elfos.h ${tm_file} haiku.h mips/haiku.h"
	extra_parts='crtbegin.o crtend.o'
	;;
mips64-*-elf* | mips64el-*-elf*)
	tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
	tmake_file="mips/t-elf mips/t-libgcc-mips16"
@@ -2170,11 +2137,6 @@
	extra_options="${extra_options} rs6000/sysv4.opt"
	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
	use_gcc_stdint=wrap
	;;
powerpc-*-haiku*)
	tmake_file="rs6000/t-fprules rs6000/t-ppcos rs6000/t-ppccomm t-haiku"
	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h haiku.h rs6000/haiku.h"
	extra_options="${extra_options} rs6000/sysv4.opt"
	;;
powerpc-*-rtems*)
	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
diff --git a/gcc/gcc/configure b/gcc/gcc/configure
index e99b74d..1960d5a 100755
--- a/gcc/gcc/configure
+++ a/gcc/gcc/configure
@@ -599,7 +599,6 @@
#endif"

ac_subst_vars='LTLIBOBJS
math_library
LIBOBJS
enable_plugin
pluginlibs
@@ -8613,15 +8612,6 @@
# UNSORTED
# --------

# Configure -lm usage for host tools that need it
math_library="-lm"
case $host in
  *-*-haiku*)
    # no separate math library needed
    math_library=
    ;;
esac


# These libraries may be used by collect2.
# We may need a special search path to get them linked.
@@ -10789,7 +10779,7 @@
    # default
    target_thread_file='single'
    ;;
  aix | dce | gnat | haiku | irix | posix | posix95 | rtems | \
  aix | dce | gnat | irix | posix | posix95 | rtems | \
  single | solaris | vxworks | win32 | mipssde)
    target_thread_file=${enable_threads}
    ;;
@@ -14576,7 +14566,7 @@
      esac
      ;;

    beos* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
      # PIC is the default for these OSes.
      ;;

@@ -15266,8 +15256,8 @@
      ;;

    haiku*)
      allow_undefined_flag=unsupported
      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
      link_all_deplibs=yes
      ;;

    interix[3-9]*)
@@ -16701,9 +16691,16 @@
  ;;

haiku*)
  library_names_spec='${libname}${shared_ext}'
  dynamic_linker="$host_os ld.so"
  version_type=linux
  need_lib_prefix=no
  need_version=no
  dynamic_linker="$host_os runtime_loader"
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
  hardcode_into_libs=yes
  ;;

hpux9* | hpux10* | hpux11*)
@@ -20361,7 +20358,7 @@
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
  hardcode_into_libs=yes
  ;;

diff --git a/gcc/gcc/configure.ac b/gcc/gcc/configure.ac
index 5e68548..505a54d 100644
--- a/gcc/gcc/configure.ac
+++ a/gcc/gcc/configure.ac
@@ -922,15 +922,6 @@
# --------


# Configure -lm usage for host tools that need it
math_library="-lm"
case $host in
  *-*-haiku*)
    # no separate math library needed
    math_library=
    ;;
esac

# These libraries may be used by collect2.
# We may need a special search path to get them linked.
AC_CACHE_CHECK(for collect2 libraries, gcc_cv_collect2_libs,
@@ -1330,7 +1321,7 @@
    # default
    target_thread_file='single'
    ;;
  aix | dce | gnat | haiku | irix | posix | posix95 | rtems | \
  aix | dce | gnat | irix | posix | posix95 | rtems | \
  single | solaris | vxworks | win32 | mipssde)
    target_thread_file=${enable_threads}
    ;;
diff --git a/gcc/gcc/crtstuff.c b/gcc/gcc/crtstuff.c
index 82e37e2..b65f490 100644
--- a/gcc/gcc/crtstuff.c
+++ a/gcc/gcc/crtstuff.c
@@ -102,9 +102,7 @@
    && defined(HAVE_LD_EH_FRAME_HDR) \
    && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
    && defined(__GLIBC__) && __GLIBC__ >= 2
#if !(defined(__BEOS__) || defined(__HAIKU__))

#include <link.h>
#endif
/* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h.
   But it doesn't use PT_GNU_EH_FRAME ELF segment currently.  */
# if !defined(__UCLIBC__) \
@@ -161,9 +159,7 @@
extern void __do_global_ctors_1 (void);

/* Likewise for _Jv_RegisterClasses.  */
#ifdef JCR_SECTION_NAME
extern void _Jv_RegisterClasses (void *) TARGET_ATTRIBUTE_WEAK;
#endif

#ifdef OBJECT_FORMAT_ELF

diff --git a/gcc/gcc/defaults.h b/gcc/gcc/defaults.h
index a8f0664..815ddd2 100644
--- a/gcc/gcc/defaults.h
+++ a/gcc/gcc/defaults.h
@@ -385,11 +385,7 @@
   at program start-up time.  */
#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK

#ifndef JCR_SECTION_NAME
/* Hack to remove _Jv crap on BeOS. i know it should be made somehow through
	config files, but i don't know how (in which file ;) */
#if !defined(__BEOS__) && !defined(__HAIKU__)

#define JCR_SECTION_NAME ".jcr"
#endif
#endif
#endif

diff --git a/gcc/libcpp/configure b/gcc/libcpp/configure
index d7d875d..41677ce 100755
--- a/gcc/libcpp/configure
+++ a/gcc/libcpp/configure
@@ -7090,7 +7090,6 @@
case $target in
	alpha*-*-* | \
	arm*-*-*eabi* | \
	arm*-*-haiku* | \
	arm*-*-symbianelf* | \
	x86_64-*-* | \
	ia64-*-* | \
diff --git a/gcc/libcpp/configure.ac b/gcc/libcpp/configure.ac
index 1d5ef51..1c67eaf 100644
--- a/gcc/libcpp/configure.ac
+++ a/gcc/libcpp/configure.ac
@@ -140,7 +140,6 @@
case $target in
	alpha*-*-* | \
	arm*-*-*eabi* | \
	arm*-*-haiku* | \
	arm*-*-symbianelf* | \
	x86_64-*-* | \
	ia64-*-* | \
diff --git a/gcc/libgcc/config.host b/gcc/libgcc/config.host
index 99036e9..25e949e 100644
--- a/gcc/libgcc/config.host
+++ a/gcc/libgcc/config.host
@@ -201,8 +201,6 @@
	;;
arm*-*-netbsd*)
	;;
arm-*-haiku*)
	;;
arm*-*-linux*)			# ARM GNU/Linux with ELF
	;;
arm*-*-uclinux*)		# ARM ucLinux
@@ -279,10 +277,6 @@
	;;
x86_64-*-freebsd*)
	tmake_file="${tmake_file} i386/t-freebsd"
	;;
i[34567]86-*-haiku*)
	;;
x86_64-*-haiku*)
	;;
i[34567]86-*-netbsdelf*)
	;;
@@ -381,8 +375,6 @@
        ;;
m68hc12-*-*|m6812-*-*)
        ;;
m68k-*-haiku*)
	;;
m68k-*-elf*)
	;;
m68k*-*-netbsdelf*)
@@ -418,8 +410,6 @@
	;;
mips*-*-openbsd*)
	;;
mips*-*-haiku*)
	;;
mipsisa32-*-elf* | mipsisa32el-*-elf*)
	;;
mipsisa32r2-*-elf* | mipsisa32r2el-*-elf*)
@@ -466,8 +456,6 @@
	;;
powerpc-*-freebsd*)
	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-freebsd t-softfp"
	;;
powerpc-*-haiku*)
	;;
powerpc-*-netbsd*)
	;;
diff --git a/gcc/libgomp/configure b/gcc/libgomp/configure
index 36e33c1..6f25c6f 100755
--- a/gcc/libgomp/configure
+++ a/gcc/libgomp/configure
@@ -8153,7 +8153,7 @@
      esac
      ;;

    beos* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
      # PIC is the default for these OSes.
      ;;

@@ -8843,8 +8843,8 @@
      ;;

    haiku*)
      allow_undefined_flag=unsupported
      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
      link_all_deplibs=yes
      ;;

    interix[3-9]*)
@@ -10278,9 +10278,16 @@
  ;;

haiku*)
  library_names_spec='${libname}${shared_ext}'
  dynamic_linker="$host_os ld.so"
  version_type=linux
  need_lib_prefix=no
  need_version=no
  dynamic_linker="$host_os runtime_loader"
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
  hardcode_into_libs=yes
  ;;

hpux9* | hpux10* | hpux11*)
@@ -13918,7 +13925,7 @@
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
  hardcode_into_libs=yes
  ;;

diff --git a/gcc/libmudflap/configure b/gcc/libmudflap/configure
index 61ea143..441299f 100755
--- a/gcc/libmudflap/configure
+++ a/gcc/libmudflap/configure
@@ -7654,7 +7654,7 @@
      esac
      ;;

    beos* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
      # PIC is the default for these OSes.
      ;;

@@ -8344,8 +8344,8 @@
      ;;

    haiku*)
      allow_undefined_flag=unsupported
      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
      link_all_deplibs=yes
      ;;

    interix[3-9]*)
@@ -9779,9 +9779,16 @@
  ;;

haiku*)
  library_names_spec='${libname}${shared_ext}'
  dynamic_linker="$host_os ld.so"
  version_type=linux
  need_lib_prefix=no
  need_version=no
  dynamic_linker="$host_os runtime_loader"
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
  hardcode_into_libs=yes
  ;;

hpux9* | hpux10* | hpux11*)
diff --git a/gcc/libquadmath/configure b/gcc/libquadmath/configure
index 8fbcfa7..9d97933 100755
--- a/gcc/libquadmath/configure
+++ a/gcc/libquadmath/configure
@@ -9699,7 +9699,7 @@
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
  hardcode_into_libs=yes
  ;;

diff --git a/gcc/libssp/configure b/gcc/libssp/configure
index 720abd7..bd3f566 100755
--- a/gcc/libssp/configure
+++ a/gcc/libssp/configure
@@ -7694,7 +7694,7 @@
      esac
      ;;

    beos* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
      # PIC is the default for these OSes.
      ;;

@@ -8384,8 +8384,8 @@
      ;;

    haiku*)
      allow_undefined_flag=unsupported
      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
      link_all_deplibs=yes
      ;;

    interix[3-9]*)
@@ -9828,9 +9828,16 @@
  ;;

haiku*)
  library_names_spec='${libname}${shared_ext}'
  dynamic_linker="$host_os ld.so"
  version_type=linux
  need_lib_prefix=no
  need_version=no
  dynamic_linker="$host_os runtime_loader"
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
  hardcode_into_libs=yes
  ;;

hpux9* | hpux10* | hpux11*)
diff --git a/gcc/libstdc++-v3/configure b/gcc/libstdc++-v3/configure
index 19e32c1..c6a0336 100755
--- a/gcc/libstdc++-v3/configure
+++ a/gcc/libstdc++-v3/configure
@@ -6206,7 +6206,7 @@
  lt_cv_deplibs_check_method=pass_all
  ;;

beos* | haiku*)
beos*)
  lt_cv_deplibs_check_method=pass_all
  ;;

@@ -8528,7 +8528,7 @@
      esac
      ;;

    beos* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
      # PIC is the default for these OSes.
      ;;

@@ -9218,8 +9218,8 @@
      ;;

    haiku*)
      allow_undefined_flag=unsupported
      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
      link_all_deplibs=yes
      ;;

    interix[3-9]*)
@@ -10512,7 +10512,7 @@
  esac
  ;;

beos* | haiku*)
beos*)
  library_names_spec='${libname}${shared_ext}'
  dynamic_linker="$host_os ld.so"
  shlibpath_var=LIBRARY_PATH
@@ -10670,7 +10670,7 @@
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
  hardcode_into_libs=yes
  ;;

@@ -11191,7 +11191,7 @@
  lt_cv_dlopen_libs=

  case $host_os in
  beos* | haiku*)
  beos*)
    lt_cv_dlopen="load_add_on"
    lt_cv_dlopen_libs=
    lt_cv_dlopen_self=yes
@@ -12542,8 +12542,8 @@
        ;;

      haiku*)
        allow_undefined_flag=unsupported
        archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
        archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
        link_all_deplibs_CXX=yes
        ;;

      hpux9*)
@@ -13410,7 +13410,7 @@
      esac
      ;;

    beos* | haiku* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
      # PIC is the default for these OSes.
      ;;
    mingw* | cygwin* | os2* | pw32* | cegcc*)
@@ -14197,7 +14197,7 @@
  esac
  ;;

beos* | haiku*)
beos*)
  library_names_spec='${libname}${shared_ext}'
  dynamic_linker="$host_os ld.so"
  shlibpath_var=LIBRARY_PATH
@@ -14353,7 +14353,7 @@
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
  hardcode_into_libs=yes
  ;;

@@ -44225,578 +44225,6 @@
      $as_echo "#define HAVE_ISNANL 1" >>confdefs.h

    fi
    ;;
  *haiku*)















for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h \
      machine/endian.h machine/param.h sys/machine.h sys/types.h \
      fp.h float.h endian.h inttypes.h locale.h float.h stdint.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

    SECTION_FLAGS='-ffunction-sections -fdata-sections'


    cat >>confdefs.h <<\_ACEOF
#define HAVE_INT64_T 1
_ACEOF


    cat >>confdefs.h <<\_ACEOF
#define HAVE_ACOSF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_ASINF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_ATANF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_ATAN2F 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_CEILF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_COPYSIGN 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_COPYSIGNF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_COSF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_COSHF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_EXPF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_FABSF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_FINITE 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_FINITEF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_FLOORF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_FMODF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_FREXPF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_HYPOT 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_HYPOTF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_ISINF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_ISINFF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_ISNAN 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_ISNANF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_LOGF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_LOG10F 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_MODFF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_SINF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_SINHF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_SQRTF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_TANF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_TANHF 1
_ACEOF

    ;;
  *haiku*)















for ac_header in nan.h ieeefp.h endian.h sys/isa_defs.h \
      machine/endian.h machine/param.h sys/machine.h sys/types.h \
      fp.h float.h endian.h inttypes.h locale.h float.h stdint.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  { echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }
else
  # Is the header compilable?
{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }

# Is the header present?
{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$ac_header>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
    ac_header_preproc=yes
    ;;
  no:yes:* )
    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}

    ;;
esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  eval "$as_ac_Header=\$ac_header_preproc"
fi
ac_res=`eval echo '${'$as_ac_Header'}'`
	       { echo "$as_me:$LINENO: result: $ac_res" >&5
echo "${ECHO_T}$ac_res" >&6; }

fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
  cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF

fi

done

    SECTION_FLAGS='-ffunction-sections -fdata-sections'


    cat >>confdefs.h <<\_ACEOF
#define HAVE_INT64_T 1
_ACEOF


    cat >>confdefs.h <<\_ACEOF
#define HAVE_ACOSF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_ASINF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_ATANF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_ATAN2F 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_CEILF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_COPYSIGN 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_COPYSIGNF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_COSF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_COSHF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_EXPF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_FABSF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_FINITE 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_FINITEF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_FLOORF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_FMODF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_FREXPF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_HYPOT 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_HYPOTF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_ISINF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_ISINFF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_ISNAN 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_ISNANF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_LOGF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_LOG10F 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_MODFF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_SINF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_SINHF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_SQRTF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_TANF 1
_ACEOF

    cat >>confdefs.h <<\_ACEOF
#define HAVE_TANHF 1
_ACEOF

    ;;
  *-hpux*)
    SECTION_FLAGS='-ffunction-sections -fdata-sections'
diff --git a/gcc/libstdc++-v3/crossconfig.m4 b/gcc/libstdc++-v3/crossconfig.m4
index 6a352f1..2d0a4a8 100644
--- a/gcc/libstdc++-v3/crossconfig.m4
+++ a/gcc/libstdc++-v3/crossconfig.m4
@@ -99,48 +99,6 @@
      AC_DEFINE(HAVE_ISNANL)
    fi
    ;;

  *-haiku*)
    AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
      machine/endian.h machine/param.h sys/machine.h sys/types.h \
      fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
    SECTION_FLAGS='-ffunction-sections -fdata-sections'
    AC_SUBST(SECTION_FLAGS)

    AC_DEFINE(HAVE_INT64_T)

    AC_DEFINE(HAVE_ACOSF)
    AC_DEFINE(HAVE_ASINF)
    AC_DEFINE(HAVE_ATANF)
    AC_DEFINE(HAVE_ATAN2F)
    AC_DEFINE(HAVE_CEILF)
    AC_DEFINE(HAVE_COPYSIGN)
    AC_DEFINE(HAVE_COPYSIGNF)
    AC_DEFINE(HAVE_COSF)
    AC_DEFINE(HAVE_COSHF)
    AC_DEFINE(HAVE_EXPF)
    AC_DEFINE(HAVE_FABSF)
    AC_DEFINE(HAVE_FINITE)
    AC_DEFINE(HAVE_FINITEF)
    AC_DEFINE(HAVE_FLOORF)
    AC_DEFINE(HAVE_FMODF)
    AC_DEFINE(HAVE_FREXPF)
    AC_DEFINE(HAVE_HYPOT)
    AC_DEFINE(HAVE_HYPOTF)
    AC_DEFINE(HAVE_ISINF)
    AC_DEFINE(HAVE_ISINFF)
    AC_DEFINE(HAVE_ISNAN)
    AC_DEFINE(HAVE_ISNANF)
    AC_DEFINE(HAVE_LOGF)
    AC_DEFINE(HAVE_LOG10F)
    AC_DEFINE(HAVE_MODFF)
    AC_DEFINE(HAVE_SINF)
    AC_DEFINE(HAVE_SINHF)
    AC_DEFINE(HAVE_SQRTF)
    AC_DEFINE(HAVE_TANF)
    AC_DEFINE(HAVE_TANHF)
    ;;

  *-hpux*)
    SECTION_FLAGS='-ffunction-sections -fdata-sections'
    AC_SUBST(SECTION_FLAGS)
diff --git a/gcc/lto-plugin/configure b/gcc/lto-plugin/configure
index 923df74..48b414e 100755
--- a/gcc/lto-plugin/configure
+++ a/gcc/lto-plugin/configure
@@ -9742,7 +9742,7 @@
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
  hardcode_into_libs=yes
  ;;

diff --git a/gcc/zlib/configure b/gcc/zlib/configure
index 0c9726c..f7fe2b7 100755
--- a/gcc/zlib/configure
+++ a/gcc/zlib/configure
@@ -9572,7 +9572,7 @@
  soname_spec='${libname}${release}${shared_ext}$major'
  shlibpath_var=LIBRARY_PATH
  shlibpath_overrides_runpath=yes
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
  hardcode_into_libs=yes
  ;;

diff --git a/gcc/gcc/config/haiku.h b/gcc/gcc/config/haiku.h
deleted file mode 100644
index 64f8e02..0000000 100644
--- a/gcc/gcc/config/haiku.h
+++ /dev/null
@@ -1,179 +1,0 @@
/* Definitions of target machine for GCC.
   Common Haiku definitions for all architectures.
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005
   Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING.  If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.  */


/* Change debugging to Dwarf2.  */
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG

#undef MCOUNT_NAME
#define MCOUNT_NAME "_mcount"

#define TARGET_DECLSPEC 1

#undef SIZE_TYPE
#define SIZE_TYPE "long unsigned int"

#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "long int"

#undef WCHAR_TYPE
#define WCHAR_TYPE "int"

#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 32

/* Haiku uses lots of multichars, so don't warn about them unless the
   user explicitly asks for the warnings with -Wmultichar.  Note that
   CC1_SPEC is used for both cc1 and cc1plus.  */
#undef CC1_SPEC
#define CC1_SPEC "%{!no-fpic:%{!fno-pic:%{!fno-pie:%{!fpie:%{!fPIC:%{!fPIE:-fpic}}}}}} %{!Wmultichar: -Wno-multichar} %(cc1_cpu) %{profile:-p}"

#undef CC1PLUS_SPEC
#define CC1PLUS_SPEC "%{!Wctor-dtor-privacy:-Wno-ctor-dtor-privacy}"

/* LIB_SPEC for Haiku */
#undef LIB_SPEC
#define LIB_SPEC "-lroot"

/* gcc runtime lib is built into libroot.so on Haiku */
/* ??? This is gonna be lovely when the next release of gcc has
   some new symbol in, so that links start failing.  */
#undef LIBGCC_SPEC
#define LIBGCC_SPEC ""


#undef  STARTFILE_SPEC
#define STARTFILE_SPEC "crti.o%s crtbegin.o%s %{!shared:%{!nostart:start_dyn.o%s}} init_term_dyn.o%s"

#undef  ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"

/* For native compiler, use standard Haiku include file search paths
   rooted in /boot/develop/headers.  For a cross compiler, don't
   expect the host to use the Haiku directory scheme, and instead look
   for the Haiku include files relative to TOOL_INCLUDE_DIR.  Yes, we
   use ANSI string concatenation here (FIXME) */

#ifndef CROSS_DIRECTORY_STRUCTURE
#undef INCLUDE_DEFAULTS
#define INCLUDE_DEFAULTS \
    { \
    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, \
    { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, \
    { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, \
    { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, \
    { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, \
    { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 }, \
    { "/boot/common/include", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/app", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/device", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/drivers", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/game", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/interface", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/kernel", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/locale", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/mail", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/media", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/midi", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/midi2", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/net", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/opengl", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/storage", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/support", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/translation", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/add-ons/graphics", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/add-ons/input_server", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/add-ons/screen_saver", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/add-ons/tracker", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/be_apps/Deskbar", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/be_apps/NetPositive", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/os/be_apps/Tracker", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/cpp", 0, 1, 1, 0, 0 }, \
    { "/boot/develop/headers/3rdparty", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/bsd", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/glibc", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/gnu", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers/posix", 0, 0, 0, 0, 0 }, \
    { "/boot/develop/headers", 0, 0, 0, 0, 0 }, \
    { 0, 0, 0, 0, 0, 0 } \
    }
#else /* CROSS_DIRECTORY_STRUCTURE */
#undef	INCLUDE_DEFAULTS
#define INCLUDE_DEFAULTS				\
    { \
    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 1, 0 }, \
    { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 1, 0 }, \
    { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 1, 0 }, \
    { GCC_INCLUDE_DIR, "GCC", 0, 0, 1, 0 }, \
    { FIXED_INCLUDE_DIR, "GCC", 0, 0, 1, 0 }, \
    { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/app", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/device", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/drivers", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/game", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/interface", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/kernel", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/locale", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/mail", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/media", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/midi", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/midi2", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/net", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/opengl", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/storage", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/support", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/translation", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/add-ons/graphics", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/add-ons/input_server", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/add-ons/screen_saver", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/add-ons/tracker", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/be_apps/Deskbar", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/be_apps/NetPositive", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/os/be_apps/Tracker", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/cpp", 0, 1, 1, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/3rdparty", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/bsd", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/glibc", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/gnu", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR "/posix", 0, 0, 0, 1, 0 }, \
    { CROSS_INCLUDE_DIR , 0, 0, 0, 1, 0 }, \
    { 0, 0, 0, 0, 0, 0 } \
    }
#endif /* CROSS_DIRECTORY_STRUCTURE */

/* Whee.  LIBRARY_PATH is Be's LD_LIBRARY_PATH, which of course will
   cause nasty problems if we override it.  */
#define LIBRARY_PATH_ENV        "BELIBRARIES"

/* Haiku doesn't have a separate math library.  */
#define MATH_LIBRARY ""

/* Haiku headers are C++-aware (and often use C++).  */
#define NO_IMPLICIT_EXTERN_C

/* Only allow -lssp for SSP, as -lssp_nonshared is problematic in Haiku */
#ifndef TARGET_LIBC_PROVIDES_SSP
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp}"
#endif
diff --git a/gcc/gcc/config/t-haiku b/gcc/gcc/config/t-haiku
deleted file mode 100644
index 59fa413..0000000 100644
--- a/gcc/gcc/config/t-haiku
+++ /dev/null
@@ -1,4 +1,0 @@
# There are system headers elsewhere, but these are the ones that
# we are most likely to want to apply any fixes to.
NATIVE_SYSTEM_HEADER_DIR = /boot/develop/headers
LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/posix/limits.h ]
diff --git a/gcc/gcc/doc/cppopts.texi b/gcc/gcc/doc/cppopts.texi
index 52d5997..5212478 100644
--- a/gcc/gcc/doc/cppopts.texi
+++ a/gcc/gcc/doc/cppopts.texi
@@ -769,7 +769,7 @@
Enable special code to work around file systems which only permit very
short file names, such as MS-DOS@.

@item --help
@itemx --help
@itemx --target-help
@opindex help
@opindex target-help
diff --git a/gcc/gcc/doc/generic.texi b/gcc/gcc/doc/generic.texi
index 79af22f..5874c55 100644
--- a/gcc/gcc/doc/generic.texi
+++ a/gcc/gcc/doc/generic.texi
@@ -1415,13 +1415,13 @@
not matter.  The type of the operands and that of the result are
always of @code{BOOLEAN_TYPE} or @code{INTEGER_TYPE}.

@item POINTER_PLUS_EXPR
@itemx POINTER_PLUS_EXPR
This node represents pointer arithmetic.  The first operand is always
a pointer/reference type.  The second operand is always an unsigned
integer type compatible with sizetype.  This is the only binary
arithmetic operand that can operate on pointer types.

@item PLUS_EXPR
@itemx PLUS_EXPR
@itemx MINUS_EXPR
@itemx MULT_EXPR
These nodes represent various binary arithmetic operations.
diff --git a/gcc/gcc/doc/invoke.texi b/gcc/gcc/doc/invoke.texi
index c071595..4ed31b6 100644
--- a/gcc/gcc/doc/invoke.texi
+++ a/gcc/gcc/doc/invoke.texi
@@ -165,7 +165,7 @@
-pipe  -pass-exit-codes  @gol
-x @var{language}  -v  -###  --help@r{[}=@var{class}@r{[},@dots{}@r{]]}  --target-help  @gol
--version -wrapper @@@var{file} -fplugin=@var{file} -fplugin-arg-@var{name}=@var{arg}  @gol
-fdump-ada-spec@r{[}-slim@r{]} -fdump-go-spec=@var{file}}
-fdump-ada-spec@r{[}-slim@r{]}} -fdump-go-spec=@var{file}

@item C Language Options
@xref{C Dialect Options,,Options Controlling C Dialect}.
@@ -5085,11 +5085,11 @@
@option{-fdump-rtl-ce3} enable dumping after the three
if conversion passes.

@item -fdump-rtl-cprop_hardreg
@itemx -fdump-rtl-cprop_hardreg
@opindex fdump-rtl-cprop_hardreg
Dump after hard register copy propagation.

@item -fdump-rtl-csa
@itemx -fdump-rtl-csa
@opindex fdump-rtl-csa
Dump after combining stack adjustments.

@@ -5100,11 +5100,11 @@
@option{-fdump-rtl-cse1} and @option{-fdump-rtl-cse2} enable dumping after
the two common sub-expression elimination passes.

@item -fdump-rtl-dce
@itemx -fdump-rtl-dce
@opindex fdump-rtl-dce
Dump after the standalone dead code elimination passes.

@item -fdump-rtl-dbr
@itemx -fdump-rtl-dbr
@opindex fdump-rtl-dbr
Dump after delayed branch scheduling.

@@ -5149,7 +5149,7 @@
@opindex fdump-rtl-initvals
Dump after the computation of the initial value sets.

@item -fdump-rtl-into_cfglayout
@itemx -fdump-rtl-into_cfglayout
@opindex fdump-rtl-into_cfglayout
Dump after converting to cfglayout mode.

@@ -5179,7 +5179,7 @@
@opindex fdump-rtl-rnreg
Dump after register renumbering.

@item -fdump-rtl-outof_cfglayout
@itemx -fdump-rtl-outof_cfglayout
@opindex fdump-rtl-outof_cfglayout
Dump after converting from cfglayout mode.

@@ -5191,7 +5191,7 @@
@opindex fdump-rtl-postreload
Dump after post-reload optimizations.

@item -fdump-rtl-pro_and_epilogue
@itemx -fdump-rtl-pro_and_epilogue
@opindex fdump-rtl-pro_and_epilogue
Dump after generating the function pro and epilogues.

diff --git a/gcc/gcc/doc/sourcebuild.texi b/gcc/gcc/doc/sourcebuild.texi
index 3d3e348..f4a2807 100644
--- a/gcc/gcc/doc/sourcebuild.texi
+++ a/gcc/gcc/doc/sourcebuild.texi
@@ -676,7 +676,7 @@
@code{lang_checks}.

@table @code
@item all.cross
@itemx all.cross
@itemx start.encap
@itemx rest.encap
FIXME: exactly what goes in each of these targets?
diff --git a/gcc/gcc/ginclude/stdarg.h b/gcc/gcc/ginclude/stdarg.h
index f07b4a6..54dc2e7 100644
--- a/gcc/gcc/ginclude/stdarg.h
+++ a/gcc/gcc/ginclude/stdarg.h
@@ -97,7 +97,7 @@
#ifndef _VA_LIST
/* The macro _VA_LIST_T_H is used in the Bull dpx2  */
#ifndef _VA_LIST_T_H
/* The macro __va_list__ is used by BeOS and Haiku.  */
/* The macro __va_list__ is used by BeOS.  */
#ifndef __va_list__
typedef __gnuc_va_list va_list;
#endif /* not __va_list__ */
diff --git a/gcc/gcc/ginclude/stddef.h b/gcc/gcc/ginclude/stddef.h
index b006c28..565ef7b 100644
--- a/gcc/gcc/ginclude/stddef.h
+++ a/gcc/gcc/ginclude/stddef.h
@@ -167,7 +167,7 @@
/* Define this type if we are doing the whole job,
   or if we want this type in particular.  */
#if defined (_STDDEF_H) || defined (__need_size_t)

#ifndef __size_t__	/* BeOS, Haiku */
#ifndef __size_t__	/* BeOS */
#ifndef __SIZE_T__	/* Cray Unicos/Mk */
#ifndef _SIZE_T	/* in case <sys/types.h> has defined it. */
#ifndef _SYS_SIZE_T_H
@@ -184,7 +184,7 @@
#ifndef _GCC_SIZE_T
#ifndef _SIZET_
#ifndef __size_t
#define __size_t__	/* BeOS, Haiku */
#define __size_t__	/* BeOS */
#define __SIZE_T__	/* Cray Unicos/Mk */
#define _SIZE_T
#define _SYS_SIZE_T_H
@@ -210,7 +210,7 @@
#endif
#if !(defined (__GNUG__) && defined (size_t))

typedef __SIZE_TYPE__ size_t;
#if defined(__BEOS__)

#ifdef __BEOS__
typedef long ssize_t;
#endif /* __BEOS__ */
#endif /* !(defined (__GNUG__) && defined (size_t)) */
@@ -243,7 +243,7 @@
/* Define this type if we are doing the whole job,
   or if we want this type in particular.  */
#if defined (_STDDEF_H) || defined (__need_wchar_t)

#ifndef __wchar_t__	/* BeOS, Haiku */
#ifndef __wchar_t__	/* BeOS */
#ifndef __WCHAR_T__	/* Cray Unicos/Mk */
#ifndef _WCHAR_T
#ifndef _T_WCHAR_
@@ -260,7 +260,7 @@
#ifndef ___int_wchar_t_h
#ifndef __INT_WCHAR_T_H
#ifndef _GCC_WCHAR_T
#define __wchar_t__	/* BeOS, Haiku */
#define __wchar_t__	/* BeOS */
#define __WCHAR_T__	/* Cray Unicos/Mk */
#define _WCHAR_T
#define _T_WCHAR_
diff --git a/gcc/libstdc++-v3/libsupc++/tinfo.cc b/gcc/libstdc++-v3/libsupc++/tinfo.cc
index 4210a93..d939a3f 100644
--- a/gcc/libstdc++-v3/libsupc++/tinfo.cc
+++ a/gcc/libstdc++-v3/libsupc++/tinfo.cc
@@ -32,15 +32,6 @@
~type_info ()
{ }

#ifdef __HAIKU__
#ifndef __GXX_MERGED_TYPEINFO_NAMES
#define __GXX_MERGED_TYPEINFO_NAMES 0
#endif
#ifndef __GXX_TYPEINFO_EQUALITY_INLINE
#define __GXX_TYPEINFO_EQUALITY_INLINE 0
#endif
#endif

#if !__GXX_TYPEINFO_EQUALITY_INLINE


// We can't rely on common symbols being shared between shared objects.
diff --git a/gcc/gcc/config/arm/haiku.h b/gcc/gcc/config/arm/haiku.h
deleted file mode 100644
index 5fd59fb..0000000 100644
--- a/gcc/gcc/config/arm/haiku.h
+++ /dev/null
@@ -1,83 +1,0 @@
/*	Definitions for ARM running Haiku systems using ELF
	Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
	2005 Free Software Foundation, Inc.

	This file is part of GCC.

	GCC is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2, or (at your option)
	any later version.

	GCC is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with GCC; see the file COPYING.  If not, write to
	the Free Software Foundation, 59 Temple Place - Suite 330,
	Boston, MA 02111-1307, USA.  */

#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (ARM Haiku/ELF)");

/* Unsigned chars produces much better code than signed.  */
#define DEFAULT_SIGNED_CHAR  0

#undef  TARGET_DEFAULT_FLOAT_ABI
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT

/* We default to the "aapcs-linux" ABI so that enums are int-sized by
   default.  */
#undef  ARM_DEFAULT_ABI
#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX

/* bpabi.h sets FPUTYPE_DEFAULT to VFP */

#undef  MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS \
  { "marm", "mlittle-endian", "msoft-float", "mno-thumb-interwork" }

/* Default is set by bpabi.h */
/*
#undef TARGET_DEFAULT
*/

#undef SUBTARGET_CPU_DEFAULT
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6

/* Now we define the strings used to build the spec file.  */
/* interestingly, bpabi defines __GXX_TYPEINFO_EQUALITY_INLINE=0 too as we do. */

#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS()		\
  do									\
    {									\
      builtin_define ("__HAIKU__");					\
      builtin_define ("__ARM__");					\
      builtin_define ("__arm__");					\
      builtin_define ("__stdcall=__attribute__((__stdcall__))");	\
      builtin_define ("__cdecl=__attribute__((__cdecl__))");		\
      builtin_define ("__STDC_ISO_10646__=201103L"); \
      builtin_assert ("system=haiku");					\
      /* Haiku apparently doesn't support merging of symbols across shared \
		 object boundaries. Hence we need to explicitly specify that \
         type_infos are not merged, so that they get compared by name \
         instead of by pointer. */ \
      builtin_define ("__GXX_MERGED_TYPEINFO_NAMES=0"); \
      /*builtin_define ("__GXX_TYPEINFO_EQUALITY_INLINE=0"); done in bpabi: */\
      TARGET_BPABI_CPP_BUILTINS();					\
    }									\
  while (0)

/* Use the default LIBGCC_SPEC, not the empty version in haiku.h, as we
   do not use multilib (needed ??).  */
#undef LIBGCC_SPEC

/* If ELF is the default format, we should not use /lib/elf.  */

#undef	LINK_SPEC
#define LINK_SPEC "%{!o*:-o %b} -m armelf -shared -no-undefined %{nostart:-e 0} \
  %{mbig-endian:-EB} %{mlittle-endian:-EL} -X"

diff --git a/gcc/gcc/config/arm/t-haiku b/gcc/gcc/config/arm/t-haiku
deleted file mode 100644
index 3f7f488..0000000 100644
--- a/gcc/gcc/config/arm/t-haiku
+++ /dev/null
@@ -1,21 +1,0 @@
# build multilib for soft float and VFP 
# (unsure about how it should be done...)
# mix from t-symbian & t-wince-pe

#LIB1ASMSRC = arm/lib1funcs.asm
#LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _call_via_rX _interwork_call_via_rX


#MULTILIB_OPTIONS    += mhard-float
#MULTILIB_DIRNAMES   += fpu

MULTILIB_OPTIONS    += msoft-float
MULTILIB_DIRNAMES   += fpu soft
MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*

MULTILIB_OPTIONS    += mfloat-abi=softfp
MULTILIB_DIRNAMES   += softfp

#LIBGCC = stmp-multilib
#INSTALL_LIBGCC = install-multilib
#TARGET_LIBGCC2_CFLAGS = 
diff --git a/gcc/gcc/config/i386/haiku.h b/gcc/gcc/config/i386/haiku.h
deleted file mode 100644
index 2a3aaf4..0000000 100644
--- a/gcc/gcc/config/i386/haiku.h
+++ /dev/null
@@ -1,79 +1,0 @@
/* Definitions for Intel x86 running Haiku
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004
   Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING.  If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.  */


#define TARGET_VERSION fprintf (stderr, " (i386 Haiku/ELF)");

#undef ASM_COMMENT_START
#define ASM_COMMENT_START " #"

/* The SVR4 ABI for the i386 says that records and unions are returned
   in memory.  */
#undef DEFAULT_PCC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 1

#undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) \
  (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])

#define TARGET_OS_CPP_BUILTINS()					\
  do									\
    {									\
	builtin_define ("__HAIKU__");					\
	builtin_define ("__INTEL__");					\
	builtin_define ("_X86_");					\
	builtin_define ("__stdcall=__attribute__((__stdcall__))");	\
	builtin_define ("__cdecl=__attribute__((__cdecl__))");		\
    builtin_define ("__STDC_ISO_10646__=201103L"); \
	builtin_assert ("system=haiku");					\
    }									\
  while (0)

/* Provide a LINK_SPEC appropriate for Haiku.  Here we provide support
   for the special GCC options -static and -shared, which allow us to
   link things in one of these three modes by applying the appropriate
   combinations of options at link-time.  */

/* If ELF is the default format, we should not use /lib/elf.  */

#undef	LINK_SPEC
#define LINK_SPEC "-m elf_i386_haiku -shared %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"

/* A C statement (sans semicolon) to output to the stdio stream
   FILE the assembler definition of uninitialized global DECL named
   NAME whose size is SIZE bytes and alignment is ALIGN bytes.
   Try to use asm_output_aligned_bss to implement this macro.  */

#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
  asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)

/* A C statement to output to the stdio stream FILE an assembler
   command to advance the location counter to a multiple of 1<<LOG
   bytes if it is within MAX_SKIP bytes.

   This is used to align code labels according to Intel recommendations.  */

#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
  if ((LOG)!=0) \
    if ((MAX_SKIP)==0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
    else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP))
#endif
diff --git a/gcc/gcc/config/i386/haiku64.h b/gcc/gcc/config/i386/haiku64.h
deleted file mode 100644
index 649816b..0000000 100644
--- a/gcc/gcc/config/i386/haiku64.h
+++ /dev/null
@@ -1,139 +1,0 @@
/* Definitions for AMD x86_64 running Haiku with ELF format.
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004
   Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING.  If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.  */


#if TARGET_64BIT_DEFAULT

#define TARGET_VERSION fprintf (stderr, " (x86-64 Haiku/ELF)");
#else
#define TARGET_VERSION fprintf (stderr, " (i386 Haiku/ELF)");
#endif

#undef ASM_COMMENT_START
#define ASM_COMMENT_START " #"

/* The SVR4 ABI for the i386 says that records and unions are returned
 * in memory. For 64-bit compilation this definition is ignored, however
 * it is necessary for correct 32-bit code generation.
 */
#undef DEFAULT_PCC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 1

#undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) \
  (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])

#define TARGET_OS_CPP_BUILTINS()					\
  do									\
    {									\
      builtin_define ("__HAIKU__");					\
      if (!TARGET_64BIT)						\
        {								\
          builtin_define ("__INTEL__");					\
          builtin_define ("__X86__");					\
        }								\
      builtin_define ("__stdcall=__attribute__((__stdcall__))");	\
      builtin_define ("__cdecl=__attribute__((__cdecl__))");		\
      builtin_define ("__STDC_ISO_10646__=201103L");			\
      builtin_assert ("system=haiku");					\
    }									\
  while (0)

/* Provide a LINK_SPEC appropriate for Haiku.  Here we provide support
   for the special GCC options -static and -shared, which allow us to
   link things in one of these three modes by applying the appropriate
   combinations of options at link-time.  */

#if TARGET_64BIT_DEFAULT

#define SPEC_32 "m32"
#define SPEC_64 "!m32"
#else
#define SPEC_32 "!m64"
#define SPEC_64 "m64"
#endif

#undef	LINK_SPEC
#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386_haiku} \
	-shared %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"

/* A C statement (sans semicolon) to output to the stdio stream
   FILE the assembler definition of uninitialized global DECL named
   NAME whose size is SIZE bytes and alignment is ALIGN bytes.
   Try to use x86_output_aligned_bss to implement this macro.  */

#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
  x86_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)

/* This is used to align code labels according to Intel recommendations.  */

#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP)			\
  do {									\
    if ((LOG) != 0) {							\
      if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG));	\
      else {								\
        fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP));	\
        /* Make sure that we have at least 8 byte alignment if > 8 byte	\
           alignment is preferred.  */					\
        if ((LOG) > 3							\
            && (1 << (LOG)) > ((MAX_SKIP) + 1)				\
            && (MAX_SKIP) >= 7)						\
          fputs ("\t.p2align 3\n", (FILE));				\
      }									\
    }									\
  } while (0)
#undef  ASM_OUTPUT_MAX_SKIP_PAD
#define ASM_OUTPUT_MAX_SKIP_PAD(FILE, LOG, MAX_SKIP)			\
  if ((LOG) != 0)							\
    {									\
      if ((MAX_SKIP) == 0)						\
        fprintf ((FILE), "\t.p2align %d\n", (LOG));			\
      else								\
        fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP));	\
    }
#endif


/* Output assembler code to FILE to call the profiler.  */
#define NO_PROFILE_COUNTERS 1

#undef ASM_SPEC
#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
 %{Wa,*:%*} %{" SPEC_32 ":--32} %{" SPEC_64 ":--64}"

#undef  ASM_OUTPUT_ALIGNED_COMMON
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)		\
  x86_elf_aligned_common (FILE, NAME, SIZE, ALIGN);


/* i386 System V Release 4 uses DWARF debugging info.
   x86-64 ABI specifies DWARF2.  */

#define DWARF2_DEBUGGING_INFO 1
#define DWARF2_UNWIND_INFO 1

#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG

#undef TARGET_ASM_SELECT_SECTION
#define TARGET_ASM_SELECT_SECTION  x86_64_elf_select_section

#undef TARGET_ASM_UNIQUE_SECTION
#define TARGET_ASM_UNIQUE_SECTION  x86_64_elf_unique_section
diff --git a/gcc/gcc/config/i386/host-cygwin.c b/gcc/gcc/config/i386/host-cygwin.c
index 7d975af..7d975af 100755
--- a/gcc/gcc/config/i386/host-cygwin.c
+++ a/gcc/gcc/config/i386/host-cygwin.c
diff --git a/gcc/gcc/config/i386/t-haiku64 b/gcc/gcc/config/i386/t-haiku64
deleted file mode 100644
index 9c8f8e6..0000000 100644
--- a/gcc/gcc/config/i386/t-haiku64
+++ /dev/null
@@ -1,16 +1,0 @@
MULTILIB_OPTIONS = m32 
MULTILIB_DIRNAMES = 32

LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib

EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o

# The pushl in CTOR initialization interferes with frame pointer elimination.
# crtend*.o cannot be compiled without -fno-asynchronous-unwind-tables,
# because then __FRAME_END__ might not be the last thing in .eh_frame
# section.
CRTSTUFF_T_CFLAGS = -fno-omit-frame-pointer -fno-asynchronous-unwind-tables

# Compile libgcc2.a with pic.
TARGET_LIBGCC2_CFLAGS = -fPIC
diff --git a/gcc/gcc/config/i386/winnt-cxx.c b/gcc/gcc/config/i386/winnt-cxx.c
index 0c47e3a..0c47e3a 100755
--- a/gcc/gcc/config/i386/winnt-cxx.c
+++ a/gcc/gcc/config/i386/winnt-cxx.c
diff --git a/gcc/gcc/config/i386/winnt-stubs.c b/gcc/gcc/config/i386/winnt-stubs.c
index eb4f124..eb4f124 100755
--- a/gcc/gcc/config/i386/winnt-stubs.c
+++ a/gcc/gcc/config/i386/winnt-stubs.c
diff --git a/gcc/gcc/config/m68k/haiku.h b/gcc/gcc/config/m68k/haiku.h
deleted file mode 100644
index 6fe9f46..0000000 100644
--- a/gcc/gcc/config/m68k/haiku.h
+++ /dev/null
@@ -1,270 +1,0 @@
/* Definitions for Motorola 68k running Haiku
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2007
   Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING.  If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.  */

#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (68k Haiku/ELF)");

/* Default target comes from config.gcc.  */

#undef TARGET_DEFAULT
#ifdef TARGET_CPU_DEFAULT
#define TARGET_DEFAULT TARGET_CPU_DEFAULT
#else
#define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020)
#endif

/* for 68k machines this only needs to be TRUE for the 68000 */

#undef STRICT_ALIGNMENT
#define STRICT_ALIGNMENT 0

/* Here are four prefixes that are used by asm_fprintf to
   facilitate customization for alternate assembler syntaxes.
   Machines with no likelihood of an alternate syntax need not
   define these and need not use asm_fprintf.  */

/* The prefix for register names.  Note that REGISTER_NAMES
   is supposed to include this prefix. Also note that this is NOT an
   fprintf format string, it is a literal string */

#undef REGISTER_PREFIX
#define REGISTER_PREFIX "%"

/* The prefix for local (compiler generated) labels.
   These labels will not appear in the symbol table.  */

#undef LOCAL_LABEL_PREFIX
#define LOCAL_LABEL_PREFIX "."

/* The prefix to add to user-visible assembler symbols.  */

#undef USER_LABEL_PREFIX
#define USER_LABEL_PREFIX ""

#undef ASM_COMMENT_START
#define ASM_COMMENT_START "|"

/* Target OS builtins.  */

#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS()					\
  do									\
    {									\
	builtin_define ("__HAIKU__");					\
	builtin_define ("__M68K__");					\
	builtin_define_std ("mc68000");					\
	builtin_define_std ("mc68020");					\
	builtin_define ("__stdcall=__attribute__((__stdcall__))");	\
	builtin_define ("__cdecl=__attribute__((__cdecl__))");		\
    builtin_define ("__STDC_ISO_10646__=201103L"); \
	builtin_assert ("system=haiku");				\
    }									\
  while (0)

#define TARGET_OBJFMT_CPP_BUILTINS()		\
  do						\
    {						\
	builtin_define ("__ELF__");		\
    }						\
  while (0)

#undef CPP_SPEC
#if TARGET_DEFAULT & MASK_68881

#define CPP_SPEC \
  "%{fPIC|fpic|fPIE|fpie:-D__PIC__ -D__pic__} %{!msoft-float:-D__HAVE_68881__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
#else
#define CPP_SPEC \
  "%{fPIC|fpic|fPIE|fpie:-D__PIC__ -D__pic__} %{m68881:-D__HAVE_68881__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
#endif

/* We override the ASM_SPEC from svr4.h because we must pass -m68040 down
   to the assembler.  */
#undef ASM_SPEC
#define ASM_SPEC \
  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \

%{m68040} %{m68060:-m68040}"

/* Provide a LINK_SPEC appropriate for Haiku.  Here we provide support
   for the special GCC options -static and -shared, which allow us to
   link things in one of these three modes by applying the appropriate
   combinations of options at link-time.  */

/* If ELF is the default format, we should not use /lib/elf.  */

#undef	LINK_SPEC
/*#define LINK_SPEC "%{!o*:-o %b} -m elf_m68k_haiku -shared -no-undefined %{nostart:-e 0}"*/
#define LINK_SPEC "%{!o*:-o %b} -m m68kelf -shared -no-undefined %{nostart:-e 0}"

/* XXX: not sure for the rest there... */

/* Currently, JUMP_TABLES_IN_TEXT_SECTION must be defined in order to
   keep switch tables in the text section.  */

#define JUMP_TABLES_IN_TEXT_SECTION 1

/* This is how to output an assembler line that says to advance the
   location counter to a multiple of 2**LOG bytes.  */

/* Use the default action for outputting the case label.  */
#undef ASM_OUTPUT_CASE_LABEL
#define ASM_RETURN_CASE_JUMP				\
  do {							\
    if (TARGET_COLDFIRE)				\
      {							\
	if (ADDRESS_REG_P (operands[0]))		\
	  return "jmp %%pc@(2,%0:l)";			\
	else						\
	  return "ext%.l %0\n\tjmp %%pc@(2,%0:l)";	\
      }							\
    else						\
      return "jmp %%pc@(2,%0:w)";			\
  } while (0)

#undef ASM_OUTPUT_ALIGN
#define ASM_OUTPUT_ALIGN(FILE,LOG)				\
  if ((LOG) > 0)						\
    fprintf ((FILE), "%s%u\n", ALIGN_ASM_OP, 1 << (LOG));

/* If defined, a C expression whose value is a string containing the
   assembler operation to identify the following data as uninitialized global
   data.  */

#define BSS_SECTION_ASM_OP "\t.section\t.bss"

/* A C statement (sans semicolon) to output to the stdio stream
   FILE the assembler definition of uninitialized global DECL named
   NAME whose size is SIZE bytes and alignment is ALIGN bytes.
   Try to use asm_output_aligned_bss to implement this macro.  */

#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
  asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)

/* Output assembler code to FILE to increment profiler label # LABELNO
   for profiling a function entry.  */

#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
{									\
  asm_fprintf (FILE, "\tlea (%LLP%d,%Rpc),%Ra1\n", (LABELNO));		\
  if (flag_pic)								\
    fprintf (FILE, "\tbsr.l _mcount@PLTPC\n");				\
  else									\
    fprintf (FILE, "\tjbsr _mcount\n");					\
}

/* How to renumber registers for dbx and gdb.
   On the Sun-3, the floating point registers have numbers
   18 to 25, not 16 to 23 as they do in the compiler.  */

#define DBX_REGISTER_NUMBER(REGNO) ((REGNO) < 16 ? (REGNO) : (REGNO) + 2)

/* Do not break .stabs pseudos into continuations.  */

#define DBX_CONTIN_LENGTH 0

/* 1 if N is a possible register number for a function value.  For
   m68k/SVR4 allow d0, a0, or fp0 as return registers, for integral,
   pointer, or floating types, respectively.  Reject fp0 if not using
   a 68881 coprocessor.  */

#undef FUNCTION_VALUE_REGNO_P
#define FUNCTION_VALUE_REGNO_P(N) \
  ((N) == 0 || (N) == 8 || (TARGET_68881 && (N) == 16))

/* Define this to be true when FUNCTION_VALUE_REGNO_P is true for
   more than one register.  */

#undef NEEDS_UNTYPED_CALL
#define NEEDS_UNTYPED_CALL 1

/* Define how to generate (in the callee) the output value of a
   function and how to find (in the caller) the value returned by a
   function.  VALTYPE is the data type of the value (as a tree).  If
   the precise function being called is known, FUNC is its
   FUNCTION_DECL; otherwise, FUNC is 0.  For m68k/SVR4 generate the
   result in d0, a0, or fp0 as appropriate.  */

#undef FUNCTION_VALUE
#define FUNCTION_VALUE(VALTYPE, FUNC)					\
  (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881			\
   ? gen_rtx_REG (TYPE_MODE (VALTYPE), 16)				\
   : (POINTER_TYPE_P (VALTYPE)						\
      ? gen_rtx_REG (TYPE_MODE (VALTYPE), 8)				\
      : gen_rtx_REG (TYPE_MODE (VALTYPE), 0)))

/* For compatibility with the large body of existing code which does
   not always properly declare external functions returning pointer
   types, the m68k/SVR4 convention is to copy the value returned for
   pointer functions from a0 to d0 in the function epilogue, so that
   callers that have neglected to properly declare the callee can
   still find the correct return value.  */

#define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE)				\
do {									\
  if (current_function_returns_pointer					\
      && ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode))	\
    asm_fprintf (FILE, "\tmove.l %Ra0,%Rd0\n");				\
} while (0);

/* Define how to find the value returned by a library function
   assuming the value has mode MODE.
   For m68k/SVR4 look for integer values in d0, pointer values in d0
   (returned in both d0 and a0), and floating values in fp0.  */

#undef LIBCALL_VALUE
#define LIBCALL_VALUE(MODE)						\
  ((((MODE) == SFmode || (MODE) == DFmode || (MODE) == XFmode)		\
    && TARGET_68881)							\
   ? gen_rtx_REG ((MODE), 16)						\
   : gen_rtx_REG ((MODE), 0))

/* For m68k SVR4, structures are returned using the reentrant
   technique.  */
#undef PCC_STATIC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 0

/* Finalize the trampoline by flushing the insn cache.  */

#undef FINALIZE_TRAMPOLINE
#define FINALIZE_TRAMPOLINE(TRAMP)					\
  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"),	\
		     0, VOIDmode, 2, TRAMP, Pmode,			\
		     plus_constant (TRAMP, TRAMPOLINE_SIZE), Pmode);

/* Clear the instruction cache from `beg' to `end'.  This makes an
   inline system call to SYS_cacheflush.  The arguments are as
   follows:

	cacheflush (addr, scope, cache, len)

   addr	  - the start address for the flush
   scope  - the scope of the flush (see the cpush insn)
   cache  - which cache to flush (see the cpush insn)
   len    - a factor relating to the number of flushes to perform:
	    len/16 lines, or len/4096 pages.  */

#define CLEAR_INSN_CACHE(BEG, END)					\
{									\
extern void clear_caches(void *address, int length, unsigned long flags); \
  void *ptr = BEG;							\
  int len = (END - BEG + 32);						\
  clear_caches(ptr, len, 0x0005);					\
}
diff --git a/gcc/gcc/config/mips/haiku.h b/gcc/gcc/config/mips/haiku.h
deleted file mode 100644
index a832e52..0000000 100644
--- a/gcc/gcc/config/mips/haiku.h
+++ /dev/null
@@ -1,47 +1,0 @@
/* Definitions for MIPS running Haiku
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004
   Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING.  If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.  */


#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (MIPSEL Haiku/ELF)");

#define TARGET_OS_CPP_BUILTINS()					\
  do									\
    {									\
	builtin_define ("__HAIKU__");					\
	builtin_define ("__MIPS__");					\
	builtin_define ("__MIPSEL__");					\
	builtin_define ("_MIPSEL_");					\
	builtin_define ("__stdcall=__attribute__((__stdcall__))");	\
	builtin_define ("__cdecl=__attribute__((__cdecl__))");		\
    builtin_define ("__STDC_ISO_10646__=201103L"); \
	builtin_assert ("system=haiku");					\
	if (flag_pic)							\
	  {								\
	    builtin_define ("__PIC__");					\
	    builtin_define ("__pic__");					\
	  }								\
    }									\
  while (0)

#undef	LINK_SPEC
#define LINK_SPEC "%{!o*:-o %b} -m elf_mipsel_haiku -shared %{nostart:-e 0}"

diff --git a/gcc/gcc/config/rs6000/haiku.h b/gcc/gcc/config/rs6000/haiku.h
deleted file mode 100644
index cc7b77c..0000000 100644
--- a/gcc/gcc/config/rs6000/haiku.h
+++ /dev/null
@@ -1,59 +1,0 @@
/* Definitions for PowerPC running Haiku
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005
   Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING.  If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.  */


#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (PowerPC Haiku/ELF)");

/* long double is 128 bits wide; the documentation claims
   LIBGCC2_LONG_DOUBLE_TYPE_SIZE to default to LONG_DOUBLE_TYPE_SIZE, but
   it apparently does not */
/*#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE 128
#undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128*/

#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS()					\
  do									\
    {									\
	builtin_define ("__HAIKU__");					\
	builtin_define ("__POWERPC__");					\
	builtin_define ("__powerpc__");					\
	builtin_define ("__stdcall=__attribute__((__stdcall__))");	\
	builtin_define ("__cdecl=__attribute__((__cdecl__))");		\
    builtin_define ("__STDC_ISO_10646__=201103L"); \
	builtin_assert ("system=haiku");					\
	builtin_assert ("cpu=powerpc");					\
	builtin_assert ("machine=powerpc");					\
	TARGET_OS_SYSV_CPP_BUILTINS ();					\
    }									\
  while (0)

/* Provide a LINK_SPEC appropriate for Haiku.  Here we provide support
   for the special GCC options -static and -shared, which allow us to
   link things in one of these three modes by applying the appropriate
   combinations of options at link-time.  */

/* If ELF is the default format, we should not use /lib/elf.  */

#undef	LINK_SPEC
#define LINK_SPEC "%{!o*:-o %b} -m elf_ppc_haiku -shared -no-undefined %{nostart:-e 0}"
diff --git a/gcc/libgcc/config/i386/t-cygming b/gcc/libgcc/config/i386/t-cygming
index 048cadb..048cadb 100755
--- a/gcc/libgcc/config/i386/t-cygming
+++ a/gcc/libgcc/config/i386/t-cygming