summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Kconfig104
-rw-r--r--TODO5
-rw-r--r--arm-ep93xx-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig47
-rw-r--r--arm-iwmmx-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig47
-rw-r--r--arm-v4t-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig47
-rw-r--r--arm-xscale-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig47
-rw-r--r--armeb-xscale-linux-gnu_gcc-4.0.3_glibc-2.3.6/ptxconfig49
-rw-r--r--armeb-xscale-linux-gnu_gcc-4.1.1_glibc-2.3.6_broken/ptxconfig46
-rw-r--r--armeb-xscale-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig47
-rwxr-xr-xautobuild14
-rw-r--r--external/build-arm-linux-3.4.4214
-rw-r--r--external/build.sh231
-rw-r--r--external/mk-arm-hard276
-rw-r--r--external/mk-arm-soft277
-rw-r--r--i586-unknown-linux-gnu_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig46
-rw-r--r--kernelconfigs/kernelconfig.arm1135
-rw-r--r--kernelconfigs/kernelconfig.i5861466
-rw-r--r--kernelconfigs/kernelconfig.mips883
-rw-r--r--kernelconfigs/kernelconfig.powerpc882
-rw-r--r--mips-r6000-linux-gnu_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig49
-rwxr-xr-xoldconfig7
-rw-r--r--patches/gcc-4.0.3/generic/arm-softfloat.diff38
-rw-r--r--patches/gcc-4.0.3/generic/gcc-4.0-arm-bigendian.patch83
-rw-r--r--patches/gcc-4.0.3/generic/series2
-rw-r--r--patches/gcc-4.1.1/generic/gcc-4.1.0-arm-bigendian.patch102
-rw-r--r--patches/gcc-4.1.1/generic/series1
-rw-r--r--patches/gcc-TODO/PR27363.diff164
-rw-r--r--patches/glibc-2.3.6/generic/make-install-lib-all.patch26
-rw-r--r--patches/glibc-2.3.6/generic/series5
-rw-r--r--patches/glibc-2.3.6/generic/sysdeps_arm-fp-byteorder.diff205
-rw-r--r--patches/glibc-2.3.6/generic/sysdeps_arm_dl-machine_h-fix_bad_pc24.diff35
-rw-r--r--patches/glibc-2.3.6/generic/sysdeps_unix_sysv_linux_arm_ioperm_c-BUS_ISA.diff53
-rw-r--r--patches/glibc-2.3.6/generic/sysdeps_unix_sysv_linux_arm_socket_S-alias.diff64
-rw-r--r--patches/glibc-2.4/generic/glibc-200607252100.diff.bz2bin0 -> 441712 bytes
-rw-r--r--patches/glibc-2.4/generic/make-install-lib-all.patch40
-rw-r--r--patches/glibc-ports-2.4/generic/ports-cvs-200607250000-arm-kernel-features.diff53
-rw-r--r--patches/glibc-ports-2.4/generic/ports-cvs-200607250000-mips-bootstrap.diff35
-rw-r--r--patches/glibc-ports-2.4/generic/ports-cvs-200607250000-socket.diff135
-rw-r--r--patches/glibc-ports-2.4/generic/ports-cvs-200607250000.diff10153
-rw-r--r--patches/glibc-ports-2.4/generic/series2
-rw-r--r--powerpc-603e-linux-gnu_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig45
-rw-r--r--rules/cross-binutils.in29
-rw-r--r--rules/cross-binutils.make114
-rw-r--r--rules/cross-gcc-first.in30
-rw-r--r--rules/cross-gcc-first.make173
-rw-r--r--rules/cross-gcc-second.in12
-rw-r--r--rules/cross-gcc-second.make116
-rw-r--r--rules/cross-gdb.in9
-rw-r--r--rules/cross-gdb.make113
-rw-r--r--rules/gdb.make1
-rw-r--r--rules/glibc-crt.in6
-rw-r--r--rules/glibc-crt.make120
-rw-r--r--rules/glibc-final.in4
-rw-r--r--rules/glibc-final.make96
-rw-r--r--rules/glibc-headers.in7
-rw-r--r--rules/glibc-headers.make151
-rw-r--r--rules/glibc-linuxthreads.in7
-rw-r--r--rules/glibc-linuxthreads.make107
-rw-r--r--rules/glibc-ports.in7
-rw-r--r--rules/glibc-ports.make107
-rw-r--r--rules/glibc.in65
-rw-r--r--rules/glibc.make175
-rw-r--r--rules/kernel-headers.in30
-rw-r--r--rules/kernel-headers.make125
-rw-r--r--rules/pre/toolchain.make5
65 files changed, 18769 insertions, 0 deletions
diff --git a/Kconfig b/Kconfig
new file mode 100644
index 0000000..3d95261
--- /dev/null
+++ b/Kconfig
@@ -0,0 +1,104 @@
+#
+# Kconfig: Main menu structure definition
+# Copyright (C) Robert Schwebel <r.schwebel@pengutronix.de> 2005, 2006
+#
+
+#
+# TODO
+#
+# GLIBC_EXTRA_CC_ARGS
+# EXTRA_TARGET_CFLAGS
+# GCC_BUILD
+# GCC_HOST
+# SHARED_MODE
+#
+
+source "workspace/rules/glibc.in"
+source "workspace/rules/glibc-headers.in"
+source "workspace/rules/glibc-crt.in"
+source "workspace/rules/glibc-final.in"
+source "workspace/rules/glibc-ports.in"
+source "workspace/rules/glibc-linuxthreads.in"
+
+source "workspace/rules/cross-binutils.in"
+source "workspace/rules/kernel-headers.in"
+source "workspace/rules/cross-gcc-first.in"
+source "workspace/rules/cross-gcc-second.in"
+source "workspace/rules/cross-gdb.in"
+
+comment " "
+
+choice
+ prompt "architecture "
+
+ config ARCH_ARM
+ bool "arm "
+
+ config ARCH_MIPS
+ bool "mips "
+
+ config ARCH_POWERPC
+ bool "powerpc"
+
+ config ARCH_I386
+ bool "i368 "
+
+ help
+ This option specifies the toolchain architecture. It corresponds to
+ the arch/ directory of the Linux kernel.
+
+endchoice
+
+config ARCH
+ string
+ default "arm" if ARCH_ARM
+ default "mips" if ARCH_MIPS
+ default "powerpc" if ARCH_POWERPC
+ default "i386" if ARCH_I386
+
+config GNU_TARGET
+ string
+ prompt "toolchain target"
+ help
+ The GNU_TARGET specifies which toolchain variant is to be
+ built.
+
+config COMPILER_PREFIX
+ string
+ default "${PTXCONF_GNU_TARGET}-"
+ help
+ This is the prefix used to create the correct cross compiler name. If the
+ prefix is equal to the GNU Target you can use "${PTXCONF_GNU_TARGET}-" to
+ use it.
+
+
+menu "misc "
+
+config CONFIGFILE_VERSION
+ string
+ prompt "ptxdist version"
+ default "0.10.4"
+ help
+ Specify the PTXdist version this configuration was tested with
+ here. This is an additional sanity check to make sure that
+ only tested versions are built.
+
+config PREFIX
+ string
+ prompt "prefix"
+ default "/opt/ptxdist-${FULLVERSION}/${PTXCONF_GNU_TARGET}/gcc-${PTXCONF_CROSS_GCC_SECOND_VERSION}-glibc-${PTXCONF_GLIBC_VERSION}"
+ help
+ This option specifies the host side sysroot file, also known
+ as PTXCONF_PREFIX.
+
+config HOST_PREFIX
+ prompt "Prefix for host tools development environment"
+ string
+ default "${PTXCONF_PREFIX}"
+
+config CROSS_PREFIX
+ prompt "Prefix for cross tools development environment"
+ string
+ default "${PTXCONF_PREFIX}"
+
+endmenu
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..1f05a97
--- /dev/null
+++ b/TODO
@@ -0,0 +1,5 @@
+- audit softfloat stuff
+
+- dependency generator doesn't work for CROSS_BINUTILS -> HOST_KERNEL
+- find out a better way than installing the different gcc stages ontop
+ of each other...
diff --git a/arm-ep93xx-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig b/arm-ep93xx-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
new file mode 100644
index 0000000..cbdadf3
--- /dev/null
+++ b/arm-ep93xx-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
@@ -0,0 +1,47 @@
+#
+# Automatically generated make config: don't edit
+# PTXdist version: 0.10.svn
+# Sun Aug 13 11:37:57 2006
+#
+PTXCONF_GLIBC=y
+PTXCONF_GLIBC_VERSION="2.4"
+PTXCONF_GLIBC_EXTRA_CONFIG="--without-fp"
+# PTXCONF_GLIBC_ADDON_LINUXTHREADS is not set
+PTXCONF_GLIBC_ADDON_NPTL=y
+PTXCONF_GLIBC_TLS=y
+PTXCONF_GLIBC_HEADERS=y
+PTXCONF_GLIBC_CRT=y
+PTXCONF_GLIBC_FINAL=y
+PTXCONF_GLIBC_PORTS=y
+PTXCONF_GLIBC_PORTS_VERSION="${PTXCONF_GLIBC_VERSION}"
+PTXCONF_CROSS_BINUTILS=y
+PTXCONF_CROSS_BINUTILS_VERSION="2.17"
+PTXCONF_CROSS_BINUTILS_EXTRA_CONFIG=""
+PTXCONF_CROSS_BINUTILS_EXTRA_ENV=""
+PTXCONF_KERNEL_HEADERS=y
+PTXCONF_KERNEL_HEADERS_VERSION="2.6.17"
+# PTXCONF_KERNEL_HEADERS_SANIZIZED is not set
+PTXCONF_KERNEL_HEADERS_CONFIG="kernelconfig.${PTXCONF_ARCH}"
+PTXCONF_CROSS_GCC_FIRST=y
+PTXCONF_CROSS_GCC_FIRST_VERSION="4.1.1"
+PTXCONF_CROSS_GCC_FIRST_EXTRA_CONFIG="--with-cpu=ep9312"
+PTXCONF_CROSS_GCC_SECOND=y
+PTXCONF_CROSS_GCC_SECOND_LANG="c,c++"
+PTXCONF_CROSS_GDB=y
+
+#
+#
+#
+PTXCONF_ARCH_ARM=y
+# PTXCONF_ARCH_POWERPC is not set
+PTXCONF_ARCH="arm"
+PTXCONF_GNU_TARGET="arm-ep93xx-linux-gnueabi"
+PTXCONF_COMPILER_PREFIX="${PTXCONF_GNU_TARGET}-"
+
+#
+# misc
+#
+PTXCONF_CONFIGFILE_VERSION="0.10.svn"
+PTXCONF_PREFIX="/opt/ptxdist-${FULLVERSION}/${PTXCONF_GNU_TARGET}/gcc-${PTXCONF_CROSS_GCC_FIRST_VERSION}-glibc-${PTXCONF_GLIBC_VERSION}"
+PTXCONF_HOST_PREFIX="${PTXCONF_PREFIX}"
+PTXCONF_CROSS_PREFIX="${PTXCONF_PREFIX}"
diff --git a/arm-iwmmx-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig b/arm-iwmmx-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
new file mode 100644
index 0000000..42c2dfb
--- /dev/null
+++ b/arm-iwmmx-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
@@ -0,0 +1,47 @@
+#
+# Automatically generated make config: don't edit
+# PTXdist version: 0.10.svn
+# Sun Aug 13 11:37:57 2006
+#
+PTXCONF_GLIBC=y
+PTXCONF_GLIBC_VERSION="2.4"
+PTXCONF_GLIBC_EXTRA_CONFIG="--without-fp"
+# PTXCONF_GLIBC_ADDON_LINUXTHREADS is not set
+PTXCONF_GLIBC_ADDON_NPTL=y
+PTXCONF_GLIBC_TLS=y
+PTXCONF_GLIBC_HEADERS=y
+PTXCONF_GLIBC_CRT=y
+PTXCONF_GLIBC_FINAL=y
+PTXCONF_GLIBC_PORTS=y
+PTXCONF_GLIBC_PORTS_VERSION="${PTXCONF_GLIBC_VERSION}"
+PTXCONF_CROSS_BINUTILS=y
+PTXCONF_CROSS_BINUTILS_VERSION="2.17"
+PTXCONF_CROSS_BINUTILS_EXTRA_CONFIG=""
+PTXCONF_CROSS_BINUTILS_EXTRA_ENV=""
+PTXCONF_KERNEL_HEADERS=y
+PTXCONF_KERNEL_HEADERS_VERSION="2.6.17"
+# PTXCONF_KERNEL_HEADERS_SANIZIZED is not set
+PTXCONF_KERNEL_HEADERS_CONFIG="kernelconfig.${PTXCONF_ARCH}"
+PTXCONF_CROSS_GCC_FIRST=y
+PTXCONF_CROSS_GCC_FIRST_VERSION="4.1.1"
+PTXCONF_CROSS_GCC_FIRST_EXTRA_CONFIG="--with-cpu=iwmmxt --with-float=soft"
+PTXCONF_CROSS_GCC_SECOND=y
+PTXCONF_CROSS_GCC_SECOND_LANG="c,c++"
+PTXCONF_CROSS_GDB=y
+
+#
+#
+#
+PTXCONF_ARCH_ARM=y
+# PTXCONF_ARCH_POWERPC is not set
+PTXCONF_ARCH="arm"
+PTXCONF_GNU_TARGET="arm-iwmmx-linux-gnueabi"
+PTXCONF_COMPILER_PREFIX="${PTXCONF_GNU_TARGET}-"
+
+#
+# misc
+#
+PTXCONF_CONFIGFILE_VERSION="0.10.svn"
+PTXCONF_PREFIX="/opt/ptxdist-${FULLVERSION}/${PTXCONF_GNU_TARGET}/gcc-${PTXCONF_CROSS_GCC_FIRST_VERSION}-glibc-${PTXCONF_GLIBC_VERSION}"
+PTXCONF_HOST_PREFIX="${PTXCONF_PREFIX}"
+PTXCONF_CROSS_PREFIX="${PTXCONF_PREFIX}"
diff --git a/arm-v4t-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig b/arm-v4t-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
new file mode 100644
index 0000000..a4e6a55
--- /dev/null
+++ b/arm-v4t-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
@@ -0,0 +1,47 @@
+#
+# Automatically generated make config: don't edit
+# PTXdist version: 0.10.svn
+# Sun Aug 13 11:37:57 2006
+#
+PTXCONF_GLIBC=y
+PTXCONF_GLIBC_VERSION="2.4"
+PTXCONF_GLIBC_EXTRA_CONFIG="--without-fp"
+# PTXCONF_GLIBC_ADDON_LINUXTHREADS is not set
+PTXCONF_GLIBC_ADDON_NPTL=y
+PTXCONF_GLIBC_TLS=y
+PTXCONF_GLIBC_HEADERS=y
+PTXCONF_GLIBC_CRT=y
+PTXCONF_GLIBC_FINAL=y
+PTXCONF_GLIBC_PORTS=y
+PTXCONF_GLIBC_PORTS_VERSION="${PTXCONF_GLIBC_VERSION}"
+PTXCONF_CROSS_BINUTILS=y
+PTXCONF_CROSS_BINUTILS_VERSION="2.17"
+PTXCONF_CROSS_BINUTILS_EXTRA_CONFIG=""
+PTXCONF_CROSS_BINUTILS_EXTRA_ENV=""
+PTXCONF_KERNEL_HEADERS=y
+PTXCONF_KERNEL_HEADERS_VERSION="2.6.17"
+# PTXCONF_KERNEL_HEADERS_SANIZIZED is not set
+PTXCONF_KERNEL_HEADERS_CONFIG="kernelconfig.${PTXCONF_ARCH}"
+PTXCONF_CROSS_GCC_FIRST=y
+PTXCONF_CROSS_GCC_FIRST_VERSION="4.1.1"
+PTXCONF_CROSS_GCC_FIRST_EXTRA_CONFIG="--with-arch=armv4t --with-float=soft"
+PTXCONF_CROSS_GCC_SECOND=y
+PTXCONF_CROSS_GCC_SECOND_LANG="c,c++"
+PTXCONF_CROSS_GDB=y
+
+#
+#
+#
+PTXCONF_ARCH_ARM=y
+# PTXCONF_ARCH_POWERPC is not set
+PTXCONF_ARCH="arm"
+PTXCONF_GNU_TARGET="arm-v4t-linux-gnueabi"
+PTXCONF_COMPILER_PREFIX="${PTXCONF_GNU_TARGET}-"
+
+#
+# misc
+#
+PTXCONF_CONFIGFILE_VERSION="0.10.svn"
+PTXCONF_PREFIX="/opt/ptxdist-${FULLVERSION}/${PTXCONF_GNU_TARGET}/gcc-${PTXCONF_CROSS_GCC_FIRST_VERSION}-glibc-${PTXCONF_GLIBC_VERSION}"
+PTXCONF_HOST_PREFIX="${PTXCONF_PREFIX}"
+PTXCONF_CROSS_PREFIX="${PTXCONF_PREFIX}"
diff --git a/arm-xscale-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig b/arm-xscale-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
new file mode 100644
index 0000000..8e8743e
--- /dev/null
+++ b/arm-xscale-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
@@ -0,0 +1,47 @@
+#
+# Automatically generated make config: don't edit
+# PTXdist version: 0.10.svn
+# Sun Aug 13 11:37:57 2006
+#
+PTXCONF_GLIBC=y
+PTXCONF_GLIBC_VERSION="2.4"
+PTXCONF_GLIBC_EXTRA_CONFIG="--without-fp"
+# PTXCONF_GLIBC_ADDON_LINUXTHREADS is not set
+PTXCONF_GLIBC_ADDON_NPTL=y
+PTXCONF_GLIBC_TLS=y
+PTXCONF_GLIBC_HEADERS=y
+PTXCONF_GLIBC_CRT=y
+PTXCONF_GLIBC_FINAL=y
+PTXCONF_GLIBC_PORTS=y
+PTXCONF_GLIBC_PORTS_VERSION="${PTXCONF_GLIBC_VERSION}"
+PTXCONF_CROSS_BINUTILS=y
+PTXCONF_CROSS_BINUTILS_VERSION="2.17"
+PTXCONF_CROSS_BINUTILS_EXTRA_CONFIG=""
+PTXCONF_CROSS_BINUTILS_EXTRA_ENV=""
+PTXCONF_KERNEL_HEADERS=y
+PTXCONF_KERNEL_HEADERS_VERSION="2.6.17"
+# PTXCONF_KERNEL_HEADERS_SANIZIZED is not set
+PTXCONF_KERNEL_HEADERS_CONFIG="kernelconfig.${PTXCONF_ARCH}"
+PTXCONF_CROSS_GCC_FIRST=y
+PTXCONF_CROSS_GCC_FIRST_VERSION="4.1.1"
+PTXCONF_CROSS_GCC_FIRST_EXTRA_CONFIG="--with-cpu=xscale --with-float=soft"
+PTXCONF_CROSS_GCC_SECOND=y
+PTXCONF_CROSS_GCC_SECOND_LANG="c,c++"
+PTXCONF_CROSS_GDB=y
+
+#
+#
+#
+PTXCONF_ARCH_ARM=y
+# PTXCONF_ARCH_POWERPC is not set
+PTXCONF_ARCH="arm"
+PTXCONF_GNU_TARGET="arm-xscale-linux-gnueabi"
+PTXCONF_COMPILER_PREFIX="${PTXCONF_GNU_TARGET}-"
+
+#
+# misc
+#
+PTXCONF_CONFIGFILE_VERSION="0.10.svn"
+PTXCONF_PREFIX="/opt/ptxdist-${FULLVERSION}/${PTXCONF_GNU_TARGET}/gcc-${PTXCONF_CROSS_GCC_FIRST_VERSION}-glibc-${PTXCONF_GLIBC_VERSION}"
+PTXCONF_HOST_PREFIX="${PTXCONF_PREFIX}"
+PTXCONF_CROSS_PREFIX="${PTXCONF_PREFIX}"
diff --git a/armeb-xscale-linux-gnu_gcc-4.0.3_glibc-2.3.6/ptxconfig b/armeb-xscale-linux-gnu_gcc-4.0.3_glibc-2.3.6/ptxconfig
new file mode 100644
index 0000000..31d6721
--- /dev/null
+++ b/armeb-xscale-linux-gnu_gcc-4.0.3_glibc-2.3.6/ptxconfig
@@ -0,0 +1,49 @@
+#
+# Automatically generated make config: don't edit
+# PTXdist version: 0.10.svn
+# Mon Aug 14 13:35:28 2006
+#
+PTXCONF_GLIBC=y
+PTXCONF_GLIBC_VERSION="2.3.6"
+PTXCONF_GLIBC_EXTRA_CONFIG="--without-fp"
+PTXCONF_GLIBC_ADDON_LINUXTHREADS=y
+# PTXCONF_GLIBC_ADDON_NPTL is not set
+# PTXCONF_GLIBC_TLS is not set
+PTXCONF_GLIBC_HEADERS=y
+PTXCONF_GLIBC_CRT=y
+PTXCONF_GLIBC_FINAL=y
+PTXCONF_GLIBC_LINUXTHREADS=y
+PTXCONF_GLIBC_LINUXTHREADS_VERSION="${PTXCONF_GLIBC_VERSION}"
+PTXCONF_CROSS_BINUTILS=y
+PTXCONF_CROSS_BINUTILS_VERSION="2.17"
+PTXCONF_CROSS_BINUTILS_EXTRA_CONFIG=""
+PTXCONF_CROSS_BINUTILS_EXTRA_ENV=""
+PTXCONF_KERNEL_HEADERS=y
+PTXCONF_KERNEL_HEADERS_VERSION="2.6.17"
+# PTXCONF_KERNEL_HEADERS_SANIZIZED is not set
+PTXCONF_KERNEL_HEADERS_CONFIG="kernelconfig.${PTXCONF_ARCH}"
+PTXCONF_CROSS_GCC_FIRST=y
+PTXCONF_CROSS_GCC_FIRST_VERSION="4.0.3"
+PTXCONF_CROSS_GCC_FIRST_EXTRA_CONFIG="--with-cpu=xscale --with-float=soft --with-fpu=vfp"
+PTXCONF_CROSS_GCC_SECOND=y
+PTXCONF_CROSS_GCC_SECOND_LANG="c,c++"
+PTXCONF_CROSS_GDB=y
+
+#
+#
+#
+PTXCONF_ARCH_ARM=y
+# PTXCONF_ARCH_MIPS is not set
+# PTXCONF_ARCH_POWERPC is not set
+# PTXCONF_ARCH_I386 is not set
+PTXCONF_ARCH="arm"
+PTXCONF_GNU_TARGET="armeb-xscale-linux-gnu"
+PTXCONF_COMPILER_PREFIX="${PTXCONF_GNU_TARGET}-"
+
+#
+# misc
+#
+PTXCONF_CONFIGFILE_VERSION="0.10.svn"
+PTXCONF_PREFIX="/opt/ptxdist-${FULLVERSION}/${PTXCONF_GNU_TARGET}/gcc-${PTXCONF_CROSS_GCC_FIRST_VERSION}-glibc-${PTXCONF_GLIBC_VERSION}"
+PTXCONF_HOST_PREFIX="${PTXCONF_PREFIX}"
+PTXCONF_CROSS_PREFIX="${PTXCONF_PREFIX}"
diff --git a/armeb-xscale-linux-gnu_gcc-4.1.1_glibc-2.3.6_broken/ptxconfig b/armeb-xscale-linux-gnu_gcc-4.1.1_glibc-2.3.6_broken/ptxconfig
new file mode 100644
index 0000000..5df4d37
--- /dev/null
+++ b/armeb-xscale-linux-gnu_gcc-4.1.1_glibc-2.3.6_broken/ptxconfig
@@ -0,0 +1,46 @@
+#
+# Automatically generated make config: don't edit
+# PTXdist version: 0.10.svn
+# Sat Aug 12 18:34:18 2006
+#
+PTXCONF_GLIBC=y
+PTXCONF_GLIBC_VERSION="2.3.6"
+PTXCONF_GLIBC_EXTRA_CONFIG="--without-fp"
+PTXCONF_GLIBC_ADDON_LINUXTHREADS=y
+# PTXCONF_GLIBC_ADDON_NPTL is not set
+# PTXCONF_GLIBC_TLS is not set
+PTXCONF_GLIBC_HEADERS=y
+PTXCONF_GLIBC_CRT=y
+PTXCONF_GLIBC_LINUXTHREADS=y
+PTXCONF_GLIBC_LINUXTHREADS_VERSION="${PTXCONF_GLIBC_VERSION}"
+PTXCONF_CROSS_BINUTILS=y
+PTXCONF_CROSS_BINUTILS_VERSION="2.17"
+PTXCONF_CROSS_BINUTILS_EXTRA_CONFIG=""
+PTXCONF_CROSS_BINUTILS_EXTRA_ENV=""
+PTXCONF_KERNEL_HEADERS=y
+PTXCONF_KERNEL_HEADERS_VERSION="2.6.17"
+# PTXCONF_KERNEL_HEADERS_SANIZIZED is not set
+PTXCONF_KERNEL_HEADERS_CONFIG="kernelconfig.${PTXCONF_ARCH}"
+PTXCONF_CROSS_GCC_FIRST=y
+PTXCONF_CROSS_GCC_FIRST_VERSION="4.1.1"
+PTXCONF_CROSS_GCC_FIRST_EXTRA_CONFIG="--with-cpu=xscale --with-float=soft --with-fpu=vfp"
+PTXCONF_CROSS_GCC_SECOND=y
+PTXCONF_CROSS_GCC_SECOND_LANG="c,c++"
+# PTXCONF_CROSS_GDB is not set
+
+#
+#
+#
+PTXCONF_ARCH_ARM=y
+# PTXCONF_ARCH_POWERPC is not set
+PTXCONF_ARCH="arm"
+PTXCONF_GNU_TARGET="armeb-xscale-linux-gnu"
+PTXCONF_COMPILER_PREFIX="${PTXCONF_GNU_TARGET}-"
+
+#
+# misc
+#
+PTXCONF_CONFIGFILE_VERSION="0.10.svn"
+PTXCONF_PREFIX="/opt/ptxdist-${FULLVERSION}/${PTXCONF_GNU_TARGET}/gcc-${PTXCONF_CROSS_GCC_FIRST_VERSION}-glibc-${PTXCONF_GLIBC_VERSION}"
+PTXCONF_HOST_PREFIX="${PTXCONF_PREFIX}"
+PTXCONF_CROSS_PREFIX="${PTXCONF_PREFIX}"
diff --git a/armeb-xscale-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig b/armeb-xscale-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
new file mode 100644
index 0000000..27d9575
--- /dev/null
+++ b/armeb-xscale-linux-gnueabi_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
@@ -0,0 +1,47 @@
+#
+# Automatically generated make config: don't edit
+# PTXdist version: 0.10.svn
+# Sat Aug 12 18:32:07 2006
+#
+PTXCONF_GLIBC=y
+PTXCONF_GLIBC_VERSION="2.4"
+PTXCONF_GLIBC_EXTRA_CONFIG="--without-fp"
+# PTXCONF_GLIBC_ADDON_LINUXTHREADS is not set
+PTXCONF_GLIBC_ADDON_NPTL=y
+PTXCONF_GLIBC_TLS=y
+PTXCONF_GLIBC_HEADERS=y
+PTXCONF_GLIBC_CRT=y
+PTXCONF_GLIBC_FINAL=y
+PTXCONF_GLIBC_PORTS=y
+PTXCONF_GLIBC_PORTS_VERSION="${PTXCONF_GLIBC_VERSION}"
+PTXCONF_CROSS_BINUTILS=y
+PTXCONF_CROSS_BINUTILS_VERSION="2.17"
+PTXCONF_CROSS_BINUTILS_EXTRA_CONFIG=""
+PTXCONF_CROSS_BINUTILS_EXTRA_ENV=""
+PTXCONF_KERNEL_HEADERS=y
+PTXCONF_KERNEL_HEADERS_VERSION="2.6.17"
+# PTXCONF_KERNEL_HEADERS_SANIZIZED is not set
+PTXCONF_KERNEL_HEADERS_CONFIG="kernelconfig.${PTXCONF_ARCH}"
+PTXCONF_CROSS_GCC_FIRST=y
+PTXCONF_CROSS_GCC_FIRST_VERSION="4.1.1"
+PTXCONF_CROSS_GCC_FIRST_EXTRA_CONFIG="--with-cpu=xscale --with-float=soft"
+PTXCONF_CROSS_GCC_SECOND=y
+PTXCONF_CROSS_GCC_SECOND_LANG="c,c++"
+PTXCONF_CROSS_GDB=y
+
+#
+#
+#
+PTXCONF_ARCH_ARM=y
+# PTXCONF_ARCH_POWERPC is not set
+PTXCONF_ARCH="arm"
+PTXCONF_GNU_TARGET="armeb-xscale-linux-gnueabi"
+PTXCONF_COMPILER_PREFIX="${PTXCONF_GNU_TARGET}-"
+
+#
+# misc
+#
+PTXCONF_CONFIGFILE_VERSION="0.10.svn"
+PTXCONF_PREFIX="/opt/ptxdist-${FULLVERSION}/${PTXCONF_GNU_TARGET}/gcc-${PTXCONF_CROSS_GCC_FIRST_VERSION}-glibc-${PTXCONF_GLIBC_VERSION}"
+PTXCONF_HOST_PREFIX="${PTXCONF_PREFIX}"
+PTXCONF_CROSS_PREFIX="${PTXCONF_PREFIX}"
diff --git a/autobuild b/autobuild
new file mode 100755
index 0000000..b9252cf
--- /dev/null
+++ b/autobuild
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+for conf in ptxconfig-*; do
+ test -e ptxconfig && rm ptxconfig
+ ptxdist select ${conf}
+ ptxdist compile foobar
+done
+
+for conf in ptxconfig-*; do
+ test -e ptxconfig && rm ptxconfig
+ ptxdist select ${conf}
+ ptxdist go | tee logfile-${conf}
+ ptxdist clean
+done
diff --git a/external/build-arm-linux-3.4.4 b/external/build-arm-linux-3.4.4
new file mode 100644
index 0000000..655c0d9
--- /dev/null
+++ b/external/build-arm-linux-3.4.4
@@ -0,0 +1,214 @@
+
+HOWTO build arm-linux toolchain for ARM/XSCALE
+----------------------------------------------
+
+These instructions document how to build an arm-linux tool chain
+that contains both little-endian and big-endian target libraries.
+
+
+1. Packages used:
+
+ binutils-2.16.tar.gz
+ gcc-3.4.4.tar.gz
+ glibc-2.3.3.tar.gz
+ glibc-linuxthreads-2.3.3.tar.gz
+
+
+2. binutils-2.16
+
+ tar xvzf binutils-2.16.tar.gz
+ cd binutils-2.16
+ mkdir arm-linux
+ cd arm-linux
+ ../configure --target=arm-linux --with-lib-path=/usr/local/arm-linux/lib:/usr/local/arm-linux/lib/be:/usr/local/arm-linux/lib/soft-float:/usr/local/arm-linux/lib/be/soft-float
+ make
+ make install
+ chmod 777 /usr/local/arm-linux
+
+
+3. gcc-3.4.4
+
+ tar xvzf gcc-3.4.4.tar.gz
+ cd gcc-3.4.4
+
+ cp $(ATTACHED t-linux file) gcc/config/arm/
+ vi gcc/config/arm/linux-elf.h
+ -- remove line that defines LIBGCC_SPEC
+
+ mkdir arm-linux
+ cd arm-linux
+ ../configure --target=arm-linux --disable-shared --disable-threads \
+ --prefix=/usr/local --with-headers=linux-2.4.x/include \
+ --with-gnu-as --with-gnu-ld --enable-multilib --enable-languages=c
+ make
+ make install
+
+
+4. glibc-2.3.3 (big-endian)
+
+ tar xvzf glibc-2.3.3.tar.gz
+ cd glibc-2.3.3
+ tar xvzf glibc-linuxthreads-2.3.3.tar.gz
+
+ rm -rf nptl
+ vi sysdeps/unix/sysv/linux/arm/ioperm.c
+ - change "BUS_ISA" to be "CTL_BUS_ISA" lines 103 and 104
+ vi config.make.in
+ - change "slibdir = @...@" to "slibdir = @libdir@"
+ vi Makeconfig
+ - change all occurrances of "O2" to "O"
+ - remove any occurrances of -lgcc_eh
+ vi configure
+ - change all occurrances of "O2" to "O"
+ touch sysdeps/arm/framestate.c
+
+ mkdir arm-linux
+ cd arm-linux
+ CC="arm-linux-gcc -mbig-endian -finline-limit=10000" \
+ AS="arm-linux-as -mbig-endian" \
+ LD="arm-linux-ld -EB" \
+ ../configure --host=arm-linux --build=i686-pc-linux-gnu \
+ --with-headers=linux-2.4.x/include \
+ --enable-add-ons --enable-shared --prefix=/usr/local/arm-linux \
+ --libdir=/usr/local/arm-linux/lib/be
+ make
+ make install
+
+
+5. glibc-2.3.3 (little-endian)
+
+ tar xvzf glibc-2.3.3.tar.gz
+ cd glibc-2.3.3
+ tar xvzf glibc-linuxthreads-2.3.3.tar.gz
+
+ [ Apply same fixes as above ]
+
+ mkdir arm-linux
+ cd arm-linux
+ CC="arm-linux-gcc -finline-limit=10000" \
+ AS="arm-linux-as" \
+ LD="arm-linux-ld" \
+ ../configure --host=arm-linux --build=i686-pc-linux-gnu \
+ --with-headers=linux-2.4.x/include \
+ --enable-add-ons --enable-shared --prefix=/usr/local/arm-linux
+ make
+ make install
+
+
+
+6. glibc-2.3.3 (big-endian/soft-float)
+
+ tar xvzf glibc-2.3.3.tar.gz
+ cd glibc-2.3.3
+ tar xvzf glibc-linuxthreads-2.3.3.tar.gz
+
+ [ Apply same fixes as above ]
+
+ mkdir arm-linux
+ cd arm-linux
+ CC="arm-linux-gcc -mbig-endian -msoft-float -finline-limit=10000" \
+ AS="arm-linux-as -mbig-endian" \
+ LD="arm-linux-ld -EB" \
+ ../configure --host=arm-linux --build=i686-pc-linux-gnu \
+ --with-headers=linux-2.4.x/include \
+ --enable-add-ons --enable-shared --prefix=/usr/local/arm-linux \
+ --without-fp --libdir=/usr/local/arm-linux/lib/be/soft-float
+ make
+ make install
+
+
+
+7. glibc-2.3.3 (little-endian/soft-float)
+
+ tar xvzf glibc-2.3.3.tar.gz
+ cd glibc-2.3.3
+ tar xvzf glibc-linuxthreads-2.3.3.tar.gz
+
+ [ Apply same fixes as above ]
+
+ mkdir arm-linux
+ cd arm-linux
+
+ CC="arm-linux-gcc -msoft-float -finline-limit=10000" \
+ AS="arm-linux-as" \
+ LD="arm-linux-ld" \
+ ../configure --host=arm-linux --build=i686-pc-linux-gnu \
+ --with-headers=linux-2.4.x/include \
+ --enable-add-ons --enable-shared --prefix=/usr/local/arm-linux \
+ --without-fp --libdir=/usr/local/arm-linux/lib/soft-float
+ make
+ make install
+
+
+8. gcc-3.4.4 (c++, etc)
+
+ tar xvzf gcc-3.4.4.tar.gz
+ cd gcc-3.4.4
+
+ cp $(ATTACHED t-linux file) gcc/config/arm/
+ vi gcc/config/arm/t-linux
+ - remove all "-Dinhibit_libc" occruances
+ vi gcc/config/arm/linux-elf.h
+ -- remove line that defines LIBGCC_SPEC
+ perl -pi -e 's/int namelen/unsigned int namelen/' libjava/java/net/natInetAddressPosix.cc
+
+ mkdir arm-linux
+ cd arm-linux
+ ../configure --target=arm-linux --disable-shared \
+ --prefix=/usr/local --with-headers=linux-2.4.x/include \
+ --with-gnu-as --with-gnu-ld --enable-multilib
+ make
+ make install
+
+
+9. cd /
+ find /usr/local/arm-linux -name CVS -type d | xargs rm -rf
+ strip /usr/local/arm-linux/bin/*
+ strip /usr/local/bin/arm-linux-*
+ tar cvzf /tmp/arm-linux-tools-xxxxxxxx.tar.gz \
+ /usr/local/arm-linux \
+ /usr/local/lib/gcc/arm-linux \
+ /usr/local/include/c++/3.4.4 \
+ /usr/local/bin/arm-linux-* \
+ /usr/local/libexec/gcc/arm-linux/3.4.4 \
+ /usr/local/bin/genext2fs
+
+
+------------------------------------------------------------------------------
+
+APPENDIX A -- modified t-linux for gcc-3.4.4
+
+------------------------------------------------------------------------------
+# Just for these, we omit the frame pointer since it makes such a big
+# difference. It is then pointless adding debugging.
+TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC -Dinhibit_libc -D__gthr_posix
+LIBGCC2_DEBUG_CFLAGS = -g0
+
+# Don't build enquire
+ENQUIRE=
+
+LIB1ASMSRC = arm/lib1funcs.asm
+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
+ _bb_init_func _call_via_rX _interwork_call_via_rX \
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
+ _fixsfsi _fixunssfsi
+
+MULTILIB_OPTIONS = mlittle-endian/mbig-endian mhard-float/msoft-float
+MULTILIB_DIRNAMES = le be hard-float soft-float
+
+EXTRA_MULTILIB_PARTS = crtbegin.o crtbeginS.o crtend.o crtendS.o crti.o crtn.o
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+T_CFLAGS = -Dinhibit_libc -D__gthr_posix_h
+
+# Assemble startup files.
+$(T)crti.o: $(srcdir)/config/arm/crti.asm $(GCC_PASSES)
+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
+ -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/arm/crti.asm
+
+$(T)crtn.o: $(srcdir)/config/arm/crtn.asm $(GCC_PASSES)
+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
+ -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/arm/crtn.asm
+------------------------------------------------------------------------------
diff --git a/external/build.sh b/external/build.sh
new file mode 100644
index 0000000..ae44209
--- /dev/null
+++ b/external/build.sh
@@ -0,0 +1,231 @@
+#!/bin/sh
+# http://yann.poupet.free.fr/ep93xx/
+
+TCDIR='ep93xx'
+WHEREAMI=`pwd`
+TOOLCHAINDIR='/home/yannouch/KURZFMB/ToolChains'
+SRCDIR="SOMEWHERE"
+GCCVERS='3.4.4'
+BINUTILVERS='2.16'
+GLIBCVERS='2.3.5'
+GLIBCKHVERS='2.3.5'
+SRCEXT='tar.bz2'
+KERNHEADVERS='2.6.11.7-eb'
+
+unset LD_LIBRARY_PATH
+export CPPFLAGS="-D__MAVERICK__"
+
+while [ "x$ANS" == "x" ];
+do
+ clear
+ echo -n "Destination directory ? "
+ read ANS
+done
+
+if [ -d $ANS ]; then
+ while [ "x$DEL" == "x" ];
+ do
+ clear
+ echo Directory $ANS allready exists
+ echo -n "Delete it [y/n] ? "
+ read DEL
+ DEL=`echo $DEL | sed -e 's|[^yYnN]||'`
+ if [ "x$DEL" == "xn" -o "x$DEL" == "xN" ]; then
+ echo "Okay, abort ..."
+ exit 0
+ elif [ "x$DEL" == "xy" -o "x$DEL" == "xY" ]; then
+ echo "Deleting $ANS ..."
+ rm -fr $ANS
+ echo "Done"
+ else
+ DEL=""
+ fi
+ done
+fi
+
+if [ -e $ANS ]; then
+ echo "$ANS is an existing file. Abort."
+ exit 0
+fi
+
+DESTDIR=$ANS
+mkdir -p "$DESTDIR/$TCDIR"
+cd "$DESTDIR/$TCDIR"
+mkdir arm-linux
+mkdir lib
+cd arm-linux
+ln -s ../lib .
+
+cd $DESTDIR
+# BINUTILS
+if [ ! -e "$SRCDIR/binutils-$BINUTILVERS.$SRCEXT" ]; then
+ echo "ERROR : missing $SRCDIR/binutils-$BINUTILVERS.$SRCEXT file"
+ echo Abort.
+ exit 0
+fi
+
+mkdir "binutils-${BINUTILVERS}.build"
+echo "Unpacking $SRCDIR/binutils-$BINUTILVERS.$SRCEXT ..."
+tar -jxf "$SRCDIR/binutils-$BINUTILVERS.$SRCEXT"
+echo "Done."
+
+if [ -e "$SRCDIR/binutils-$BINUTILVERS.patch" ]; then
+ echo "Applying $SRCDIR/binutils-$BINUTILVERS.patch"
+ cd "$DESTDIR/binutils-$BINUTILVERS"
+ cat "$SRCDIR/binutils-$BINUTILVERS.patch" | patch -p1
+ echo "Done."
+fi
+
+cd "$DESTDIR/binutils-$BINUTILVERS.build"
+$DESTDIR/binutils-$BINUTILVERS/configure --target=arm-linux --build=arm-linux --prefix=$DESTDIR/$TCDIR
+make -j4
+RETCODE=$?
+if [ "x$RETCODE" != "x0" ]; then
+ echo "Build binutils-$BINUTILVERS failed"
+ exit 1
+fi
+make install
+RETCODE=$?
+if [ "x$RETCODE" != "x0" ]; then
+ echo "Install binutils-$BINUTILVERS failed"
+ exit 1
+fi
+#KERNEL HEADERS
+cd "$DESTDIR/$TCDIR"
+if [ ! -e "$SRCDIR/linux-kernel-headers-$KERNHEADVERS.$SRCEXT" ]; then
+ echo "ERROR : missing $SRCDIR/linux-kernel-headers-$KERNHEADVERS.$SRCEXT file"
+ echo Abort.
+ exit 0
+fi
+
+echo "Unpacking linux-kernel-headers-$KERNHEADVERS"
+tar -jxf "$SRCDIR/linux-kernel-headers-$KERNHEADVERS.$SRCEXT"
+echo "Done."
+
+cd arm-linux
+ln -s ../include/ .
+ln -s ../include/ ./sys-include
+cd ../include
+ln -s ../include/ include
+
+export PATH=$DESTDIR/$TCDIR/bin:$PATH
+
+cd $DESTDIR
+#GCC 1ST PASS
+if [ ! -e "$SRCDIR/gcc-$GCCVERS.$SRCEXT" ]; then
+ echo "ERROR : missing $SRCDIR/gcc-$GCCVERS.$SRCEXT file"
+ echo Abort.
+ exit 0
+fi
+
+mkdir "gcc-${GCCVERS}.build-1"
+echo "Unpacking $SRCDIR/gcc-$GCCVERS.$SRCEXT ..."
+tar -jxf "$SRCDIR/gcc-$GCCVERS.$SRCEXT"
+echo "Done."
+
+if [ -e "$SRCDIR/gcc-$GCCVERS.patch" ]; then
+ echo "Applying $SRCDIR/gcc-$GCCVERS.patch"
+ cd "$DESTDIR/gcc-$GCCVERS"
+ cat "$SRCDIR/gcc-$GCCVERS.patch" | patch -p1
+ echo "Done."
+fi
+
+cd "$DESTDIR/gcc-$GCCVERS.build-1"
+$DESTDIR/gcc-$GCCVERS/configure --target=arm-linux --prefix=$DESTDIR/$TCDIR --disable-shared --disable-threads --enable-languages=c --disable-multilib
+
+make -j4
+
+RETCODE=$?
+if [ "x$RETCODE" != "x0" ]; then
+ echo "Build gcc-${GCCVERS} failed"
+ exit 1
+fi
+
+make install
+
+RETCODE=$?
+if [ "x$RETCODE" != "x0" ]; then
+ echo "Install gcc-${GCCVERS} failed"
+ exit 1
+fi
+
+cd $DESTDIR
+#GLIBC
+if [ ! -e "$SRCDIR/glibc-$GLIBCVERS.$SRCEXT" ]; then
+ echo "ERROR : missing $SRCDIR/glibc-$GLIBCVERS.$SRCEXT file"
+ echo Abort.
+ exit 0
+fi
+
+mkdir "glibc-${GLIBCVERS}.build"
+echo "Unpacking $SRCDIR/glibc-$GLIBCVERS.$SRCEXT ..."
+tar -jxf "$SRCDIR/glibc-$GLIBCVERS.$SRCEXT"
+echo "Done."
+
+if [ -e "$SRCDIR/glibc-$GLIBCVERS.patch" ]; then
+ echo "Applying $SRCDIR/glibc-$GLIBCVERS.patch"
+ cd "$DESTDIR/glibc-$GLIBCVERS"
+ cat "$SRCDIR/glibc-$GLIBCVERS.patch" | patch -p1
+ echo "Done."
+fi
+# GLIBC LINUXTHREADS
+cd "$DESTDIR/glibc-$GLIBCVERS"
+if [ ! -e "$SRCDIR/glibc-linuxthreads-$GLIBCKHVERS.$SRCEXT" ]; then
+ echo "ERROR : missing $SRCDIR/glibc-linuxthreads-$GLIBCKHVERS.$SRCEXT file"
+ echo Abort.
+ exit 0
+fi
+tar -jxf $SRCDIR/glibc-linuxthreads-$GLIBCKHVERS.$SRCEXT
+# BUILD
+cd "$DESTDIR/glibc-$GLIBCVERS.build"
+$DESTDIR/glibc-$GLIBCVERS/configure --host=arm-linux --prefix=$DESTDIR/$TCDIR --enable-add-ons=linuxthreads --disable-profile --enable-kernel=2.6.0 --without-cvs --with-headers=$DESTDIR/$TCDIR/include --with-__thread
+perl -pi -e 's/^CC = .*/CC = arm-linux-gcc -mcpu=ep9312/' config.make
+perl -pi -e 's/CFLAGS = -g -O2/CFLAGS = -g -O1 -mfix-crunch-d1/' config.make
+
+make -j4
+
+RETCODE=$?
+if [ "x$RETCODE" != "x0" ]; then
+ echo "Build glibc-$GLIBCVERS failed"
+ exit 1
+fi
+
+make install
+
+RETCODE=$?
+if [ "x$RETCODE" != "x0" ]; then
+ echo "Install glibc-$GLIBCVERS failed"
+ exit 1
+fi
+
+perl -pi -e 's/.*BUG in libc.*$//' $DESTDIR/$TCDIR/lib/libc.so
+perl -pi -e 's/.*BUG in libc.*$//' $DESTDIR/$TCDIR/lib/libpthread.so
+
+# GCC 2ND PASS
+cd $DESTDIR
+mkdir "gcc-${GCCVERS}.build-2"
+cd "gcc-${GCCVERS}.build-2"
+$DESTDIR/gcc-$GCCVERS/configure --target=arm-linux --prefix=$DESTDIR/$TCDIR --disable-multilib --disable-nls --enable-languages=c,c++
+perl -pi -e 's/CFLAGS_FOR_BUILD =/CFLAGS_FOR_BUILD = -g -O1 /' Makefile
+perl -pi -e 's/CFLAGS =/CFLAGS = -g -O1 /' Makefile
+perl -pi -e 's/CXXFLAGS = -g -O2/CXXFLAGS = -g -O1/' Makefile
+perl -pi -e 's/CFLAGS_FOR_TARGET = -O2/CFLAGS_FOR_TARGET = -O2 -mcpu=ep9312 -mfix-crunch-d1/' Makefile
+perl -pi -e "s/CXXFLAGS_FOR_TARGET = \$(CXXFLAGS)/CXXFLAGS_FOR_TARGET = -mcpu=ep9312 -mfix-crunch-d1 \$(CXXFLAGS)/" Makefile
+
+make -j4
+
+RETCODE=$?
+if [ "x$RETCODE" != "x0" ]; then
+ echo "Build gcc-${GCCVERS} failed"
+ exit 1
+fi
+
+make install
+
+RETCODE=$?
+if [ "x$RETCODE" != "x0" ]; then
+ echo "Install gcc-${GCCVERS} failed"
+ exit 1
+fi
+
+echo "Installation successfully finished."
diff --git a/external/mk-arm-hard b/external/mk-arm-hard
new file mode 100644
index 0000000..14cb6bf
--- /dev/null
+++ b/external/mk-arm-hard
@@ -0,0 +1,276 @@
+#! /bin/sh
+
+INSTDIR=/opt/cross/arm-unknown
+ARCH=arm
+TARGET=arm-unknown-linux-gnu
+HOST=i686-pc-linux-gnu
+
+SYSROOT=$INSTDIR/sys-root-hard
+HEADERDIR=$SYSROOT/usr/include
+BINDIR=linuxthreads-hard
+
+SYSROOTNPTL=$INSTDIR/sys-root-nptl-hard
+HEADERDIRNPTL=$SYSROOTNPTL/usr/include
+BINDIRNPTL=nptl-hard
+
+ORIGPATH=$PATH
+
+cleanup() {
+ # cleanup
+ sudo rm -rf ep-hard-*
+ sudo rm -rf $SYSROOT
+ sudo rm -rf $SYSROOTNPTL
+ sudo rm -rf $BINDIR
+ sudo rm -rf $BINDIRNPTL
+}
+
+create_sys_root() {
+ # create sys-root
+ mkdir -p $SYSROOT/lib
+ mkdir -p $SYSROOT/usr/lib
+ mkdir -p $HEADERDIR
+}
+
+create_sys_root_nptl() {
+ # create sys-root-nptl
+ mkdir -p $SYSROOTNPTL/lib
+ mkdir -p $SYSROOTNPTL/usr/lib
+ mkdir -p $HEADERDIRNPTL
+}
+
+prepare_kernel() {
+ # prepare kernel
+ pushd linux
+ make distclean
+ make ARCH=$ARCH edb7211_defconfig
+ make ARCH=$ARCH include/asm include/linux/version.h include/asm-$ARCH/.arch
+
+ cp -r include/linux $HEADERDIR
+ cp -r include/asm-${ARCH} $HEADERDIR/asm
+ cp -r include/asm-generic $HEADERDIR/asm-generic
+
+ cp -r include/linux $HEADERDIRNPTL
+ cp -r include/asm-${ARCH} $HEADERDIRNPTL/asm
+ cp -r include/asm-generic $HEADERDIRNPTL/asm-generic
+
+ popd
+}
+
+build_binutils() {
+ # build binutils
+ mkdir -p ep-hard-binutils
+
+ pushd ep-hard-binutils
+ ../binutils/configure --target=$TARGET --host=$HOST --with-sysroot=$SYSROOT \
+ --prefix=$INSTDIR/$BINDIR
+ make
+ sudo make install
+
+ ../binutils/configure --target=$TARGET --host=$HOST \
+ --with-sysroot=$SYSROOTNPTL --prefix=$INSTDIR/$BINDIRNPTL
+ make
+ sudo make install
+
+ popd
+}
+
+glibc_header() {
+ # glibc-header
+ mkdir -p ep-hard-glibc-header
+
+ pushd ep-hard-glibc-header
+ libc_cv_ppc_machine=yes ../libc/configure --prefix=/usr \
+ --build=$HOST --host=$TARGET --without-cvs \
+ --disable-sanity-checks --with-headers=$HEADERDIR \
+ --enable-hacker-mode
+
+ libc_cv_ppc_machine=yes make sysdeps/gnu/errlist.c
+ mkdir -p stdio-common
+ touch stdio-common/errlist-compat.c
+
+ libc_cv_ppc_machine=yes make cross-compiling=yes install_root=$SYSROOT \
+ install-headers
+ mkdir -p $HEADERDIR/gnu
+ touch $HEADERDIR/gnu/stubs.h
+ cp ../libc/include/features.h $HEADERDIR/features.h
+ cp bits/stdio_lim.h $HEADERDIR/bits/stdio_lim.h
+
+ libc_cv_ppc_machine=yes make cross-compiling=yes install_root=$SYSROOTNPTL \
+ install-headers
+ mkdir -p $HEADERDIRNPTL/gnu
+ touch $HEADERDIRNPTL/gnu/stubs.h
+ cp ../libc/include/features.h $HEADERDIRNPTL/features.h
+ cp bits/stdio_lim.h $HEADERDIRNPTL/bits/stdio_lim.h
+
+ popd
+}
+
+build_gcc_core() {
+ # build gcc-core
+ export PATH=$INSTDIR/$BINDIR/bin:$ORIGPATH
+ mkdir -p ep-hard-gcc-core
+
+ pushd ep-hard-gcc-core
+ ../gcc-arm/configure --target=$TARGET --host=$HOST \
+ --with-local-prefix=$SYSROOT --disable-multilib --with-newlib \
+ --with-sysroot=$SYSROOT --enable-threads=no \
+ --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c \
+ --disable-shared --prefix=$INSTDIR/$BINDIR
+ make all-gcc
+ sudo make PATH=$INSTDIR/$BINDIR/bin:$ORIGPATH install-gcc
+ popd
+}
+
+build_glibc_linuxthreads() {
+ # build glibc/linuxthreads
+ export PATH=$INSTDIR/$BINDIR/bin:$ORIGPATH
+
+ mkdir -p ep-hard-glibc
+ sudo touch $INSTDIR/$BINDIR/lib/gcc/arm-unknown-linux-gnu/3.4.3/libgcc_s.a
+
+ pushd ep-hard-glibc
+ #BUILD_CC=gcc CFLAGS="-O2 -funroll-loops -mcpu=ep9312 -mfpu=maverick" \
+ BUILD_CC=gcc CFLAGS="-O2 -funroll-loops" \
+ CC=$TARGET-gcc AR=$TARGET-ar RANLIB=$TARGET-ranlib \
+ ../libc/configure --prefix=/usr \
+ --build=$HOST --host=$TARGET \
+ --enable-kernel=2.4.3 --without-cvs --disable-profile \
+ --disable-debug --without-gd --without-tls --without-__thread \
+ --enable-shared --enable-add-ons=linuxthreads --enable-omitfp \
+ --without-fp --with-headers=$HEADERDIR
+ make LD=$TARGET-ld RANLIB=$TARGET-ranlib lib
+ make install_root=$SYSROOT install-lib-all install-headers
+ popd
+
+ sudo rm $INSTDIR/$BINDIR/lib/gcc/arm-unknown-linux-gnu/3.4.3/libgcc_s.a
+}
+
+build_final_gcc() {
+ # build final gcc
+ export PATH=$INSTDIR/$BINDIR/bin:$ORIGPATH
+
+ mkdir -p ep-hard-gcc
+ pushd ep-hard-gcc
+ ac_cv_lib_m_main=yes ../gcc-arm/configure --target=$TARGET --host=$HOST \
+ --with-local-prefix=$SYSROOT --with-sysroot=$SYSROOT \
+ --enable-threads=posix --enable-symvers=gnu \
+ --enable-__cxa_atexit --enable-languages="c,c++" \
+ --enable-shared --enable-c99 --enable-long-long \
+ --prefix=$INSTDIR/$BINDIR --enable-multilib
+ make all
+ sudo make PATH=$INSTDIR/$BINDIR/bin:$ORIGPATH install
+ popd
+}
+
+build_glibc_NPTL() {
+ # build glibc-NPTL
+ export PATH=$INSTDIR/$BINDIR/bin:$ORIGPATH
+
+ mkdir -p ep-hard-glibc-nptl
+ pushd ep-hard-glibc-nptl
+ #BUILD_CC=gcc CFLAGS="-O2 -funroll-loops -mcpu=ep9312 -mfpu=maverick" -mtp=linux" \
+ BUILD_CC=gcc CFLAGS="-O2 -funroll-loops -mtp=soft" \
+ CC=$TARGET-gcc AR=$TARGET-ar RANLIB=$TARGET-ranlib \
+ ../libc/configure --prefix=/usr \
+ --build=$HOST --host=$TARGET \
+ --enable-kernel=2.4.3 --without-cvs --disable-profile \
+ --enable-debug --without-gd --with-tls --with-__thread \
+ --enable-shared --enable-add-ons=nptl --enable-profile \
+ --without-fp --with-headers=$HEADERDIRNPTL
+ make LD=$TARGET-ld RANLIB=$TARGET-ranlib lib
+ make install_root=$SYSROOTNPTL install-lib-all install-headers
+ popd
+}
+
+build_final_nptl_gcc() {
+ # build final nptl gcc
+ export PATH=$INSTDIR/$BINDIRNPTL/bin:$ORIGPATH
+ mkdir -p ep-hard-gcc-nptl
+
+ pushd ep-hard-gcc-nptl
+ ac_cv_lib_m_main=yes ../gcc-arm/configure --target=$TARGET --host=$HOST \
+ --with-local-prefix=$SYSROOTNPTL --with-sysroot=$SYSROOTNPTL \
+ --enable-threads=posix --enable-symvers=gnu \
+ --enable-__cxa_atexit --enable-languages="c,c++" \
+ --enable-shared --enable-c99 --enable-long-long \
+ --prefix=$INSTDIR/$BINDIRNPTL \
+ # --enable-cxx-flags='-mcpu=ep9312 -mfpu=maverick'
+ make all
+ sudo make PATH=$INSTDIR/$BINDIRNPTL/bin:$ORIGPATH install
+ popd
+}
+
+build_gdb() {
+ # build gdb
+ pushd ep-hard-binutils
+
+ mkdir readline
+ cd readline
+ ../../binutils-complete/readline/configure --target=$TARGET --host=$HOST
+ make
+ cd ..
+ mkdir gdb
+ cd gdb
+ ../../binutils-complete/gdb/configure --target=$TARGET --host=$HOST \
+ --with-sysroot=$SYSROOT --prefix=$INSTDIR/$BINDIR \
+ --enable-tui --disable-gdbtk
+ make
+ sudo make install
+
+ ../../binutils-complete/gdb/configure --target=$TARGET --host=$HOST \
+ --with-sysroot=$SYSROOTNPTL --prefix=$INSTDIR/$BINDIRNPTL \
+ --enable-tui --disable-gdbtk
+ make
+ sudo make install
+
+ cd ..
+ popd
+}
+
+err() {
+ echo Failed to build $1
+ exec false
+}
+
+keystroke() {
+# read -n1 -p "$@ [key to continue]"
+ echo "*** $@ ***"
+}
+
+### MAIN ###
+
+keystroke "cleanup"
+cleanup
+
+keystroke "create sys_root"
+create_sys_root
+
+keystroke "create sys_root_nptl"
+create_sys_root_nptl
+
+keystroke "prepare kernel"
+prepare_kernel
+
+keystroke "binutils"
+build_binutils
+
+keystroke "glibc header"
+glibc_header
+
+keystroke "gcc core"
+build_gcc_core
+
+keystroke "glibc linuxthreads"
+build_glibc_linuxthreads
+
+keystroke "final gcc linuxthreads"
+build_final_gcc
+
+keystroke "glibc nptl"
+build_glibc_NPTL
+
+keystroke "final gcc nptl"
+build_final_nptl_gcc
+
+keystroke "gdb"
+build_gdb
diff --git a/external/mk-arm-soft b/external/mk-arm-soft
new file mode 100644
index 0000000..e4992de
--- /dev/null
+++ b/external/mk-arm-soft
@@ -0,0 +1,277 @@
+#! /bin/sh
+
+INSTDIR=/opt/cross/arm-unknown
+ARCH=arm
+TARGET=arm-unknown-linux-gnu
+HOST=i686-pc-linux-gnu
+
+SYSROOT=$INSTDIR/sys-root-soft
+HEADERDIR=$SYSROOT/usr/include
+BINDIR=linuxthreads-soft
+
+SYSROOTNPTL=$INSTDIR/sys-root-nptl-soft
+HEADERDIRNPTL=$SYSROOTNPTL/usr/include
+BINDIRNPTL=nptl-soft
+
+ORIGPATH=$PATH
+
+cleanup() {
+ # cleanup
+ sudo rm -rf ep-soft-*
+ sudo rm -rf $SYSROOT
+ sudo rm -rf $SYSROOTNPTL
+ sudo rm -rf $BINDIR
+ sudo rm -rf $BINDIRNPTL
+}
+
+create_sys_root() {
+ # create sys-root
+ mkdir -p $SYSROOT/lib
+ mkdir -p $SYSROOT/usr/lib
+ mkdir -p $HEADERDIR
+}
+
+create_sys_root_nptl() {
+ # create sys-root-nptl
+ mkdir -p $SYSROOTNPTL/lib
+ mkdir -p $SYSROOTNPTL/usr/lib
+ mkdir -p $HEADERDIRNPTL
+}
+
+prepare_kernel() {
+ # prepare kernel
+ pushd linux
+ make distclean
+ make ARCH=$ARCH edb7211_defconfig
+ make ARCH=$ARCH include/asm include/linux/version.h include/asm-$ARCH/.arch
+
+ cp -r include/linux $HEADERDIR
+ cp -r include/asm-${ARCH} $HEADERDIR/asm
+ cp -r include/asm-generic $HEADERDIR/asm-generic
+
+ cp -r include/linux $HEADERDIRNPTL
+ cp -r include/asm-${ARCH} $HEADERDIRNPTL/asm
+ cp -r include/asm-generic $HEADERDIRNPTL/asm-generic
+
+ popd
+}
+
+build_binutils() {
+ # build binutils
+ mkdir -p ep-soft-binutils
+
+ pushd ep-soft-binutils
+ ../binutils/configure --target=$TARGET --host=$HOST --with-sysroot=$SYSROOT \
+ --prefix=$INSTDIR/$BINDIR
+ make
+ sudo make install
+
+ ../binutils/configure --target=$TARGET --host=$HOST \
+ --with-sysroot=$SYSROOTNPTL --prefix=$INSTDIR/$BINDIRNPTL
+ make
+ sudo make install
+
+ popd
+}
+
+glibc_header() {
+ # glibc-header
+ mkdir -p ep-soft-glibc-header
+
+ pushd ep-soft-glibc-header
+ libc_cv_ppc_machine=yes ../libc/configure --prefix=/usr \
+ --build=$HOST --host=$TARGET --without-cvs \
+ --disable-sanity-checks --with-headers=$HEADERDIR \
+ --enable-hacker-mode
+
+ libc_cv_ppc_machine=yes make sysdeps/gnu/errlist.c
+ mkdir -p stdio-common
+ touch stdio-common/errlist-compat.c
+
+ libc_cv_ppc_machine=yes make cross-compiling=yes install_root=$SYSROOT \
+ install-headers
+ mkdir -p $HEADERDIR/gnu
+ touch $HEADERDIR/gnu/stubs.h
+ cp ../libc/include/features.h $HEADERDIR/features.h
+ cp bits/stdio_lim.h $HEADERDIR/bits/stdio_lim.h
+
+ libc_cv_ppc_machine=yes make cross-compiling=yes install_root=$SYSROOTNPTL \
+ install-headers
+ mkdir -p $HEADERDIRNPTL/gnu
+ touch $HEADERDIRNPTL/gnu/stubs.h
+ cp ../libc/include/features.h $HEADERDIRNPTL/features.h
+ cp bits/stdio_lim.h $HEADERDIRNPTL/bits/stdio_lim.h
+
+ popd
+}
+
+build_gcc_core() {
+ # build gcc-core
+ export PATH=$INSTDIR/$BINDIR/bin:$ORIGPATH
+ mkdir -p ep-soft-gcc-core
+
+ pushd ep-soft-gcc-core
+ ../gcc-arm/configure --target=$TARGET --host=$HOST \
+ --with-local-prefix=$SYSROOT --disable-multilib --with-newlib \
+ --with-sysroot=$SYSROOT --enable-threads=no --with-softfloat-supp \
+ --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c \
+ --disable-shared --prefix=$INSTDIR/$BINDIR --with-float=soft
+ make all-gcc
+ sudo make PATH=$INSTDIR/$BINDIR/bin:$ORIGPATH install-gcc
+ popd
+}
+
+build_glibc_linuxthreads() {
+ # build glibc/linuxthreads
+ export PATH=$INSTDIR/$BINDIR/bin:$ORIGPATH
+
+ mkdir -p ep-soft-glibc
+ sudo touch $INSTDIR/$BINDIR/lib/gcc/arm-unknown-linux-gnu/3.4.3/libgcc_s.a
+
+ pushd ep-soft-glibc
+ #BUILD_CC=gcc CFLAGS="-O2 -funroll-loops -mcpu=ep9312 -mfpu=maverick" \
+ BUILD_CC=gcc CFLAGS="-O2 -funroll-loops" \
+ CC=$TARGET-gcc AR=$TARGET-ar RANLIB=$TARGET-ranlib \
+ ../libc/configure --prefix=/usr \
+ --build=$HOST --host=$TARGET \
+ --enable-kernel=2.4.3 --without-cvs --disable-profile \
+ --disable-debug --without-gd --without-tls --without-__thread \
+ --enable-shared --enable-add-ons=linuxthreads --enable-omitfp \
+ --without-fp --with-headers=$HEADERDIR
+ make LD=$TARGET-ld RANLIB=$TARGET-ranlib lib
+ make install_root=$SYSROOT install-lib-all install-headers
+ popd
+
+ sudo rm $INSTDIR/$BINDIR/lib/gcc/arm-unknown-linux-gnu/3.4.3/libgcc_s.a
+}
+
+build_final_gcc() {
+ # build final gcc
+ export PATH=$INSTDIR/$BINDIR/bin:$ORIGPATH
+
+ mkdir -p ep-soft-gcc
+ pushd ep-soft-gcc
+ ac_cv_lib_m_main=yes ../gcc-arm/configure --target=$TARGET --host=$HOST \
+ --with-local-prefix=$SYSROOT --with-sysroot=$SYSROOT \
+ --enable-threads=posix --enable-symvers=gnu \
+ --enable-__cxa_atexit --enable-languages="c,c++" \
+ --enable-shared --enable-c99 --enable-long-long \
+ --prefix=$INSTDIR/$BINDIR --with-float=soft \
+ --enable-multilib --with-softfloat-supp
+ make all
+ sudo make PATH=$INSTDIR/$BINDIR/bin:$ORIGPATH install
+ popd
+}
+
+build_glibc_NPTL() {
+ # build glibc-NPTL
+ export PATH=$INSTDIR/$BINDIR/bin:$ORIGPATH
+
+ mkdir -p ep-soft-glibc-nptl
+ pushd ep-soft-glibc-nptl
+ #BUILD_CC=gcc CFLAGS="-O2 -funroll-loops -mcpu=ep9312 -mfpu=maverick" -mtp=linux" \
+ BUILD_CC=gcc CFLAGS="-O2 -funroll-loops -mtp=soft" \
+ CC=$TARGET-gcc AR=$TARGET-ar RANLIB=$TARGET-ranlib \
+ ../libc/configure --prefix=/usr \
+ --build=$HOST --host=$TARGET \
+ --enable-kernel=2.4.3 --without-cvs --disable-profile \
+ --enable-debug --without-gd --with-tls --with-__thread \
+ --enable-shared --enable-add-ons=nptl --enable-profile \
+ --without-fp --with-headers=$HEADERDIRNPTL
+ make LD=$TARGET-ld RANLIB=$TARGET-ranlib lib
+ make install_root=$SYSROOTNPTL install-lib-all install-headers
+ popd
+}
+
+build_final_nptl_gcc() {
+ # build final nptl gcc
+ export PATH=$INSTDIR/$BINDIRNPTL/bin:$ORIGPATH
+ mkdir -p ep-soft-gcc-nptl
+
+ pushd ep-soft-gcc-nptl
+ ac_cv_lib_m_main=yes ../gcc-arm/configure --target=$TARGET --host=$HOST \
+ --with-local-prefix=$SYSROOTNPTL --with-sysroot=$SYSROOTNPTL \
+ --enable-threads=posix --enable-symvers=gnu \
+ --enable-__cxa_atexit --enable-languages="c,c++" \
+ --enable-shared --enable-c99 --enable-long-long \
+ --prefix=$INSTDIR/$BINDIRNPTL --with-float=soft --with-softfloat-supp \
+ # --enable-cxx-flags='-mcpu=ep9312 -mfpu=maverick'
+ make all
+ sudo make PATH=$INSTDIR/$BINDIRNPTL/bin:$ORIGPATH install
+ popd
+}
+
+build_gdb() {
+ # build gdb
+ pushd ep-soft-binutils
+
+ mkdir readline
+ cd readline
+ ../../binutils-complete/readline/configure --target=$TARGET --host=$HOST
+ make
+ cd ..
+ mkdir gdb
+ cd gdb
+ ../../binutils-complete/gdb/configure --target=$TARGET --host=$HOST \
+ --with-sysroot=$SYSROOT --prefix=$INSTDIR/$BINDIR \
+ --enable-tui --disable-gdbtk
+ make
+ sudo make install
+
+ ../../binutils-complete/gdb/configure --target=$TARGET --host=$HOST \
+ --with-sysroot=$SYSROOTNPTL --prefix=$INSTDIR/$BINDIRNPTL \
+ --enable-tui --disable-gdbtk
+ make
+ sudo make install
+
+ cd ..
+ popd
+}
+
+err() {
+ echo Failed to build $1
+ exec false
+}
+
+keystroke() {
+# read -n1 -p "$@ [key to continue]"
+ echo "*** $@ ***"
+}
+
+### MAIN ###
+
+keystroke "cleanup"
+cleanup
+
+keystroke "create sys_root"
+create_sys_root
+
+keystroke "create sys_root_nptl"
+create_sys_root_nptl
+
+keystroke "prepare kernel"
+prepare_kernel
+
+keystroke "binutils"
+build_binutils
+
+keystroke "glibc header"
+glibc_header
+
+keystroke "gcc core"
+build_gcc_core
+
+keystroke "glibc linuxthreads"
+build_glibc_linuxthreads
+
+keystroke "final gcc linuxthreads"
+build_final_gcc
+
+keystroke "glibc nptl"
+build_glibc_NPTL
+
+keystroke "final gcc nptl"
+build_final_nptl_gcc
+
+keystroke "gdb"
+build_gdb
diff --git a/i586-unknown-linux-gnu_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig b/i586-unknown-linux-gnu_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
new file mode 100644
index 0000000..0c9eeb9
--- /dev/null
+++ b/i586-unknown-linux-gnu_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
@@ -0,0 +1,46 @@
+#
+# Automatically generated make config: don't edit
+# PTXdist version: 0.10.svn
+# Sun Aug 13 13:52:59 2006
+#
+PTXCONF_GLIBC=y
+PTXCONF_GLIBC_VERSION="2.4"
+PTXCONF_GLIBC_EXTRA_CONFIG=""
+# PTXCONF_GLIBC_ADDON_LINUXTHREADS is not set
+PTXCONF_GLIBC_ADDON_NPTL=y
+PTXCONF_GLIBC_TLS=y
+PTXCONF_GLIBC_HEADERS=y
+PTXCONF_GLIBC_CRT=y
+PTXCONF_GLIBC_FINAL=y
+PTXCONF_CROSS_BINUTILS=y
+PTXCONF_CROSS_BINUTILS_VERSION="2.17"
+PTXCONF_CROSS_BINUTILS_EXTRA_CONFIG=""
+PTXCONF_CROSS_BINUTILS_EXTRA_ENV=""
+PTXCONF_KERNEL_HEADERS=y
+PTXCONF_KERNEL_HEADERS_VERSION="2.6.17"
+# PTXCONF_KERNEL_HEADERS_SANIZIZED is not set
+PTXCONF_KERNEL_HEADERS_CONFIG="kernelconfig.i586"
+PTXCONF_CROSS_GCC_FIRST=y
+PTXCONF_CROSS_GCC_FIRST_VERSION="4.1.1"
+PTXCONF_CROSS_GCC_FIRST_EXTRA_CONFIG=""
+PTXCONF_CROSS_GCC_SECOND=y
+PTXCONF_CROSS_GCC_SECOND_LANG="c,c++"
+PTXCONF_CROSS_GDB=y
+
+#
+#
+#
+# PTXCONF_ARCH_ARM is not set
+# PTXCONF_ARCH_POWERPC is not set
+PTXCONF_ARCH_I386=y
+PTXCONF_ARCH="i386"
+PTXCONF_GNU_TARGET="i586-unknown-linux-gnu"
+PTXCONF_COMPILER_PREFIX="${PTXCONF_GNU_TARGET}-"
+
+#
+# misc
+#
+PTXCONF_CONFIGFILE_VERSION="0.10.svn"
+PTXCONF_PREFIX="/opt/ptxdist-${FULLVERSION}/${PTXCONF_GNU_TARGET}/gcc-${PTXCONF_CROSS_GCC_FIRST_VERSION}-glibc-${PTXCONF_GLIBC_VERSION}"
+PTXCONF_HOST_PREFIX="${PTXCONF_PREFIX}"
+PTXCONF_CROSS_PREFIX="${PTXCONF_PREFIX}"
diff --git a/kernelconfigs/kernelconfig.arm b/kernelconfigs/kernelconfig.arm
new file mode 100644
index 0000000..bd543d9
--- /dev/null
+++ b/kernelconfigs/kernelconfig.arm
@@ -0,0 +1,1135 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.17
+# Sun Jul 2 17:25:02 2006
+#
+CONFIG_ARM=y
+CONFIG_MMU=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_VECTORS_BASE=0xffff0000
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+# CONFIG_MODULES is not set
+
+#
+# Block layer
+#
+# CONFIG_BLK_DEV_IO_TRACE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+CONFIG_ARCH_FOOTBRIDGE=y
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_IOP3XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_AT91RM9200 is not set
+
+#
+# Footbridge Implementations
+#
+# CONFIG_ARCH_CATS is not set
+# CONFIG_ARCH_PERSONAL_SERVER is not set
+# CONFIG_ARCH_EBSA285_ADDIN is not set
+# CONFIG_ARCH_EBSA285_HOST is not set
+CONFIG_ARCH_NETWINDER=y
+CONFIG_FOOTBRIDGE=y
+CONFIG_FOOTBRIDGE_HOST=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_SA110=y
+CONFIG_CPU_32v4=y
+CONFIG_CPU_ABRT_EV4=y
+CONFIG_CPU_CACHE_V4WB=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WB=y
+
+#
+# Processor Features
+#
+
+#
+# Bus support
+#
+CONFIG_ISA=y
+CONFIG_ISA_DMA=y
+CONFIG_ISA_DMA_API=y
+CONFIG_PCI=y
+# CONFIG_PCI_DEBUG is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+# CONFIG_PREEMPT is not set
+# CONFIG_NO_IDLE_HZ is not set
+CONFIG_HZ=100
+# CONFIG_AEABI is not set
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+CONFIG_LEDS=y
+# CONFIG_LEDS_TIMER is not set
+CONFIG_LEDS_CPU=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=0x301"
+# CONFIG_XIP_KERNEL is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_ARTHUR is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+# CONFIG_APM is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NETFILTER_XTABLES is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=y
+# CONFIG_IP_NF_CT_ACCT is not set
+# CONFIG_IP_NF_CONNTRACK_MARK is not set
+# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
+# CONFIG_IP_NF_CT_PROTO_SCTP is not set
+CONFIG_IP_NF_FTP=y
+# CONFIG_IP_NF_IRC is not set
+# CONFIG_IP_NF_NETBIOS_NS is not set
+# CONFIG_IP_NF_TFTP is not set
+# CONFIG_IP_NF_AMANDA is not set
+# CONFIG_IP_NF_PPTP is not set
+# CONFIG_IP_NF_H323 is not set
+CONFIG_IP_NF_QUEUE=y
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+CONFIG_PARPORT=y
+CONFIG_PARPORT_PC=y
+# CONFIG_PARPORT_SERIAL is not set
+# CONFIG_PARPORT_PC_FIFO is not set
+CONFIG_PARPORT_PC_SUPERIO=y
+# CONFIG_PARPORT_ARC is not set
+# CONFIG_PARPORT_GSC is not set
+# CONFIG_PARPORT_1284 is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=y
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+CONFIG_BLK_DEV_IDEPCI=y
+# CONFIG_IDEPCI_SHARE_IRQ is not set
+# CONFIG_BLK_DEV_OFFBOARD is not set
+# CONFIG_BLK_DEV_GENERIC is not set
+# CONFIG_BLK_DEV_OPTI621 is not set
+CONFIG_BLK_DEV_SL82C105=y
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
+CONFIG_IDEDMA_PCI_AUTO=y
+# CONFIG_IDEDMA_ONLYDISK is not set
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_BLK_DEV_AMD74XX is not set
+# CONFIG_BLK_DEV_CMD64X is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CY82C693 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+# CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_IT821X is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
+# CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_IDE_CHIPSETS is not set
+CONFIG_BLK_DEV_IDEDMA=y
+# CONFIG_IDEDMA_IVB is not set
+CONFIG_IDEDMA_AUTO=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+# CONFIG_DE2104X is not set
+CONFIG_TULIP=y
+# CONFIG_TULIP_MWI is not set
+CONFIG_TULIP_MMIO=y
+# CONFIG_TULIP_NAPI is not set
+# CONFIG_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_DM9102 is not set
+# CONFIG_ULI526X is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_ISA is not set
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_AC3200 is not set
+# CONFIG_APRICOT is not set
+# CONFIG_B44 is not set
+# CONFIG_FORCEDETH is not set
+# CONFIG_CS89x0 is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+# CONFIG_E100 is not set
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+CONFIG_NE2K_PCI=y
+# CONFIG_8139CP is not set
+# CONFIG_8139TOO is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PLIP is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_SERIAL=y
+# CONFIG_MOUSE_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=y
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_PARKBD is not set
+# CONFIG_SERIO_PCIPS2 is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_21285 is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_PRINTER=y
+# CONFIG_LP_CONSOLE is not set
+# CONFIG_PPDEV is not set
+# CONFIG_TIPAR is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_21285_WATCHDOG is not set
+# CONFIG_977_WATCHDOG is not set
+
+#
+# ISA-based Watchdog Cards
+#
+# CONFIG_PCWATCHDOG is not set
+# CONFIG_MIXCOMWD is not set
+# CONFIG_WDT is not set
+
+#
+# PCI-based Watchdog Cards
+#
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+CONFIG_DS1620=y
+CONFIG_NWBUTTON=y
+CONFIG_NWBUTTON_REBOOT=y
+CONFIG_NWFLASH=y
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Misc devices
+#
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_MACMODES is not set
+CONFIG_FB_FIRMWARE_EDID=y
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+CONFIG_FB_CYBER2000=y
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_VGACON_SOFT_SCROLLBACK is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=y
+# CONFIG_SOUND_BT878 is not set
+# CONFIG_SOUND_EMU10K1 is not set
+# CONFIG_SOUND_FUSION is not set
+# CONFIG_SOUND_ES1371 is not set
+# CONFIG_SOUND_ICH is not set
+# CONFIG_SOUND_TRIDENT is not set
+# CONFIG_SOUND_VIA82CXXX is not set
+CONFIG_SOUND_OSS=y
+CONFIG_SOUND_TRACEINIT=y
+CONFIG_SOUND_DMAP=y
+# CONFIG_SOUND_AD1816 is not set
+# CONFIG_SOUND_AD1889 is not set
+# CONFIG_SOUND_ADLIB is not set
+# CONFIG_SOUND_ACI_MIXER is not set
+# CONFIG_SOUND_CS4232 is not set
+# CONFIG_SOUND_VMIDI is not set
+# CONFIG_SOUND_TRIX is not set
+# CONFIG_SOUND_MSS is not set
+# CONFIG_SOUND_MPU401 is not set
+# CONFIG_SOUND_NM256 is not set
+# CONFIG_SOUND_PAS is not set
+# CONFIG_SOUND_PSS is not set
+# CONFIG_SOUND_SB is not set
+# CONFIG_SOUND_YM3812 is not set
+# CONFIG_SOUND_OPL3SA2 is not set
+# CONFIG_SOUND_UART6850 is not set
+# CONFIG_SOUND_AEDSP16 is not set
+CONFIG_SOUND_WAVEARTIST=y
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+CONFIG_AUTOFS_FS=y
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=y
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+# CONFIG_NFSD_TCP is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=y
+# CONFIG_SMB_NLS_DEFAULT is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+CONFIG_NLS_CODEPAGE_850=y
+CONFIG_NLS_CODEPAGE_852=y
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=y
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+CONFIG_NLS_ISO8859_15=y
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_DEBUG_VM is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_UNWIND_INFO is not set
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+CONFIG_DEBUG_USER=y
+# CONFIG_DEBUG_WAITQ is not set
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
diff --git a/kernelconfigs/kernelconfig.i586 b/kernelconfigs/kernelconfig.i586
new file mode 100644
index 0000000..e3d6cfd
--- /dev/null
+++ b/kernelconfigs/kernelconfig.i586
@@ -0,0 +1,1466 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.17
+# Sun Aug 13 13:51:07 2006
+#
+CONFIG_X86_32=y
+CONFIG_SEMAPHORE_SLEEPERS=y
+CONFIG_X86=y
+CONFIG_MMU=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+# CONFIG_CPUSETS is not set
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_VM86=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_STOP_MACHINE=y
+
+#
+# Block layer
+#
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# Processor type and features
+#
+CONFIG_SMP=y
+CONFIG_X86_PC=y
+# CONFIG_X86_ELAN is not set
+# CONFIG_X86_VOYAGER is not set
+# CONFIG_X86_NUMAQ is not set
+# CONFIG_X86_SUMMIT is not set
+# CONFIG_X86_BIGSMP is not set
+# CONFIG_X86_VISWS is not set
+# CONFIG_X86_GENERICARCH is not set
+# CONFIG_X86_ES7000 is not set
+# CONFIG_M386 is not set
+# CONFIG_M486 is not set
+CONFIG_M586=y
+# CONFIG_M586TSC is not set
+# CONFIG_M586MMX is not set
+# CONFIG_M686 is not set
+# CONFIG_MPENTIUMII is not set
+# CONFIG_MPENTIUMIII is not set
+# CONFIG_MPENTIUMM is not set
+# CONFIG_MPENTIUM4 is not set
+# CONFIG_MK6 is not set
+# CONFIG_MK7 is not set
+# CONFIG_MK8 is not set
+# CONFIG_MCRUSOE is not set
+# CONFIG_MEFFICEON is not set
+# CONFIG_MWINCHIPC6 is not set
+# CONFIG_MWINCHIP2 is not set
+# CONFIG_MWINCHIP3D is not set
+# CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
+# CONFIG_MCYRIXIII is not set
+# CONFIG_MVIAC3_2 is not set
+# CONFIG_X86_GENERIC is not set
+CONFIG_X86_CMPXCHG=y
+CONFIG_X86_XADD=y
+CONFIG_X86_L1_CACHE_SHIFT=5
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_X86_PPRO_FENCE=y
+CONFIG_X86_F00F_BUG=y
+CONFIG_X86_WP_WORKS_OK=y
+CONFIG_X86_INVLPG=y
+CONFIG_X86_BSWAP=y
+CONFIG_X86_POPAD_OK=y
+CONFIG_X86_CMPXCHG64=y
+CONFIG_X86_ALIGNMENT_16=y
+CONFIG_HPET_TIMER=y
+CONFIG_HPET_EMULATE_RTC=y
+CONFIG_NR_CPUS=32
+# CONFIG_SCHED_SMT is not set
+CONFIG_SCHED_MC=y
+# CONFIG_PREEMPT_NONE is not set
+# CONFIG_PREEMPT_VOLUNTARY is not set
+CONFIG_PREEMPT=y
+CONFIG_PREEMPT_BKL=y
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_X86_IO_APIC=y
+CONFIG_X86_MCE=y
+CONFIG_X86_MCE_NONFATAL=y
+CONFIG_X86_MCE_P4THERMAL=y
+# CONFIG_TOSHIBA is not set
+# CONFIG_I8K is not set
+# CONFIG_X86_REBOOTFIXUPS is not set
+CONFIG_MICROCODE=m
+CONFIG_X86_MSR=m
+CONFIG_X86_CPUID=m
+
+#
+# Firmware Drivers
+#
+CONFIG_EDD=m
+# CONFIG_DELL_RBU is not set
+# CONFIG_DCDBAS is not set
+# CONFIG_NOHIGHMEM is not set
+CONFIG_HIGHMEM4G=y
+# CONFIG_HIGHMEM64G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_HIGHMEM=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_SPARSEMEM_STATIC=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_HIGHPTE is not set
+CONFIG_MATH_EMULATION=y
+CONFIG_MTRR=y
+# CONFIG_EFI is not set
+CONFIG_IRQBALANCE=y
+# CONFIG_REGPARM is not set
+CONFIG_SECCOMP=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+# CONFIG_KEXEC is not set
+# CONFIG_CRASH_DUMP is not set
+CONFIG_PHYSICAL_START=0x100000
+# CONFIG_HOTPLUG_CPU is not set
+
+#
+# Power management options (ACPI, APM)
+#
+CONFIG_PM=y
+CONFIG_PM_LEGACY=y
+# CONFIG_PM_DEBUG is not set
+
+#
+# ACPI (Advanced Configuration and Power Interface) Support
+#
+CONFIG_ACPI=y
+CONFIG_ACPI_AC=m
+CONFIG_ACPI_BATTERY=m
+CONFIG_ACPI_BUTTON=m
+CONFIG_ACPI_VIDEO=y
+# CONFIG_ACPI_HOTKEY is not set
+CONFIG_ACPI_FAN=m
+CONFIG_ACPI_PROCESSOR=m
+CONFIG_ACPI_THERMAL=m
+# CONFIG_ACPI_ASUS is not set
+# CONFIG_ACPI_IBM is not set
+# CONFIG_ACPI_TOSHIBA is not set
+CONFIG_ACPI_BLACKLIST_YEAR=0
+CONFIG_ACPI_DEBUG=y
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_SYSTEM=y
+CONFIG_X86_PM_TIMER=y
+# CONFIG_ACPI_CONTAINER is not set
+
+#
+# APM (Advanced Power Management) BIOS Support
+#
+# CONFIG_APM is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
+#
+CONFIG_PCI=y
+# CONFIG_PCI_GOBIOS is not set
+# CONFIG_PCI_GOMMCONFIG is not set
+# CONFIG_PCI_GODIRECT is not set
+CONFIG_PCI_GOANY=y
+CONFIG_PCI_BIOS=y
+CONFIG_PCI_DIRECT=y
+CONFIG_PCI_MMCONFIG=y
+# CONFIG_PCIEPORTBUS is not set
+# CONFIG_PCI_MSI is not set
+# CONFIG_PCI_DEBUG is not set
+CONFIG_ISA_DMA_API=y
+# CONFIG_ISA is not set
+# CONFIG_MCA is not set
+# CONFIG_SCx200 is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PCI Hotplug Support
+#
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=y
+CONFIG_BINFMT_MISC=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+CONFIG_NET_KEY=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+CONFIG_NET_IPGRE=m
+# CONFIG_NET_IPGRE_BROADCAST is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=y
+CONFIG_INET_ESP=y
+CONFIG_INET_IPCOMP=y
+CONFIG_INET_XFRM_TUNNEL=y
+CONFIG_INET_TUNNEL=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+# CONFIG_IPV6_TUNNEL is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NETFILTER_XTABLES is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=m
+# CONFIG_IP_NF_CT_ACCT is not set
+# CONFIG_IP_NF_CONNTRACK_MARK is not set
+# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
+# CONFIG_IP_NF_CT_PROTO_SCTP is not set
+CONFIG_IP_NF_FTP=m
+CONFIG_IP_NF_IRC=m
+# CONFIG_IP_NF_NETBIOS_NS is not set
+CONFIG_IP_NF_TFTP=m
+CONFIG_IP_NF_AMANDA=m
+# CONFIG_IP_NF_PPTP is not set
+# CONFIG_IP_NF_H323 is not set
+CONFIG_IP_NF_QUEUE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+CONFIG_PARPORT=m
+CONFIG_PARPORT_PC=m
+# CONFIG_PARPORT_SERIAL is not set
+CONFIG_PARPORT_PC_FIFO=y
+# CONFIG_PARPORT_PC_SUPERIO is not set
+CONFIG_PARPORT_NOT_PC=y
+# CONFIG_PARPORT_GSC is not set
+CONFIG_PARPORT_1284=y
+
+#
+# Plug and Play support
+#
+# CONFIG_PNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+# CONFIG_BLK_DEV_UB is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_CONSTANTS=y
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI Transport Attributes
+#
+CONFIG_SCSI_SPI_ATTRS=y
+CONFIG_SCSI_FC_ATTRS=m
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_3W_9XXX is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AACRAID is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+CONFIG_SCSI_AIC79XX=y
+CONFIG_AIC79XX_CMDS_PER_DEVICE=32
+CONFIG_AIC79XX_RESET_DELAY_MS=15000
+CONFIG_AIC79XX_ENABLE_RD_STRM=y
+# CONFIG_AIC79XX_DEBUG_ENABLE is not set
+CONFIG_AIC79XX_DEBUG_MASK=0
+# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_MEGARAID_NEWGEN is not set
+# CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_MEGARAID_SAS is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_PPA is not set
+# CONFIG_SCSI_IMM is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_IPR is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_LPFC is not set
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=y
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=y
+CONFIG_MD_RAID1=m
+# CONFIG_MD_RAID10 is not set
+CONFIG_MD_RAID5=m
+# CONFIG_MD_RAID5_RESHAPE is not set
+# CONFIG_MD_RAID6 is not set
+CONFIG_MD_MULTIPATH=m
+# CONFIG_MD_FAULTY is not set
+# CONFIG_BLK_DEV_DM is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+# CONFIG_FUSION_SPI is not set
+# CONFIG_FUSION_FC is not set
+# CONFIG_FUSION_SAS is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
+# CONFIG_FORCEDETH is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+CONFIG_E100=y
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
+# CONFIG_8139TOO is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+CONFIG_E1000=y
+CONFIG_E1000_NAPI=y
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PLIP is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_SLIP is not set
+# CONFIG_NET_FC is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_PCSPKR=y
+# CONFIG_INPUT_WISTRON_BTNS is not set
+CONFIG_INPUT_UINPUT=y
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+CONFIG_SERIO_PCIPS2=y
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_PRINTER=m
+# CONFIG_LP_CONSOLE is not set
+# CONFIG_PPDEV is not set
+# CONFIG_TIPAR is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=m
+CONFIG_NVRAM=m
+CONFIG_RTC=y
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_SONYPI is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_MWAVE is not set
+# CONFIG_CS5535_GPIO is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_HPET is not set
+# CONFIG_HANGCHECK_TIMER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=m
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_ALGOPCF=m
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+CONFIG_I2C_AMD756=m
+# CONFIG_I2C_AMD756_S4882 is not set
+CONFIG_I2C_AMD8111=m
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_PIIX4 is not set
+CONFIG_I2C_ISA=m
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_PARPORT is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_SCx200_ACB is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+CONFIG_SENSORS_EEPROM=m
+CONFIG_SENSORS_PCF8574=m
+# CONFIG_SENSORS_PCA9539 is not set
+CONFIG_SENSORS_PCF8591=m
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+CONFIG_HWMON_VID=m
+CONFIG_SENSORS_ADM1021=m
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+CONFIG_SENSORS_ASB100=m
+# CONFIG_SENSORS_ATXP1 is not set
+CONFIG_SENSORS_DS1621=m
+# CONFIG_SENSORS_F71805F is not set
+CONFIG_SENSORS_FSCHER=m
+# CONFIG_SENSORS_FSCPOS is not set
+CONFIG_SENSORS_GL518SM=m
+# CONFIG_SENSORS_GL520SM is not set
+CONFIG_SENSORS_IT87=m
+# CONFIG_SENSORS_LM63 is not set
+CONFIG_SENSORS_LM75=m
+# CONFIG_SENSORS_LM77 is not set
+CONFIG_SENSORS_LM78=m
+CONFIG_SENSORS_LM80=m
+CONFIG_SENSORS_LM83=m
+CONFIG_SENSORS_LM85=m
+# CONFIG_SENSORS_LM87 is not set
+CONFIG_SENSORS_LM90=m
+# CONFIG_SENSORS_LM92 is not set
+CONFIG_SENSORS_MAX1619=m
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_SIS5595 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+CONFIG_SENSORS_VIA686A=m
+# CONFIG_SENSORS_VT8231 is not set
+CONFIG_SENSORS_W83781D=m
+# CONFIG_SENSORS_W83792D is not set
+CONFIG_SENSORS_W83L785TS=m
+CONFIG_SENSORS_W83627HF=m
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_SENSORS_HDAPS is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Misc devices
+#
+# CONFIG_IBM_ASM is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+# CONFIG_VIDEO_SELECT is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_VGACON_SOFT_SCROLLBACK is not set
+CONFIG_DUMMY_CONSOLE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=m
+CONFIG_USB_DEBUG=y
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_BANDWIDTH is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_SPLIT_ISO=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_BIG_ENDIAN is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_UHCI_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+CONFIG_USB_STORAGE_DEBUG=y
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+CONFIG_USB_HIDINPUT=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+# CONFIG_USB_AIPTEK is not set
+# CONFIG_USB_WACOM is not set
+# CONFIG_USB_ACECAD is not set
+# CONFIG_USB_KBTAB is not set
+# CONFIG_USB_POWERMATE is not set
+# CONFIG_USB_TOUCHSCREEN is not set
+# CONFIG_USB_YEALINK is not set
+# CONFIG_USB_XPAD is not set
+# CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
+# CONFIG_USB_APPLETOUCH is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_GL620A is not set
+CONFIG_USB_NET_NET1080=m
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+CONFIG_USB_NET_ZAURUS=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+CONFIG_USB_USS720=m
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+# CONFIG_USB_SERIAL_GENERIC is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ANYDATA is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_WHITEHEAT=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+# CONFIG_USB_SERIAL_GARMIN is not set
+# CONFIG_USB_SERIAL_IPW is not set
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+CONFIG_USB_SERIAL_SAFE_PADDED=y
+# CONFIG_USB_SERIAL_TI is not set
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGETKIT is not set
+# CONFIG_USB_PHIDGETSERVO is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+CONFIG_USB_TEST=m
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+# CONFIG_EDAC is not set
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+# CONFIG_EXT2_FS_SECURITY is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+# CONFIG_EXT3_FS_SECURITY is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+CONFIG_JFS_FS=m
+CONFIG_JFS_POSIX_ACL=y
+# CONFIG_JFS_SECURITY is not set
+# CONFIG_JFS_DEBUG is not set
+CONFIG_JFS_STATISTICS=y
+CONFIG_FS_POSIX_ACL=y
+CONFIG_XFS_FS=y
+CONFIG_XFS_EXPORT=y
+CONFIG_XFS_QUOTA=y
+# CONFIG_XFS_SECURITY is not set
+CONFIG_XFS_POSIX_ACL=y
+# CONFIG_XFS_RT is not set
+# CONFIG_OCFS2_FS is not set
+CONFIG_MINIX_FS=m
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+# CONFIG_QUOTA is not set
+CONFIG_QUOTACTL=y
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=y
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_ZISOFS_FS=m
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_CRAMFS=m
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+CONFIG_UFS_FS=m
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="cp850"
+CONFIG_CIFS=y
+CONFIG_CIFS_STATS=y
+# CONFIG_CIFS_STATS2 is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-15"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=y
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=y
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+
+#
+# Instrumentation Support
+#
+# CONFIG_PROFILING is not set
+# CONFIG_KPROBES is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_LOG_BUF_SHIFT=17
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_HIGHMEM is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_FRAME_POINTER is not set
+# CONFIG_UNWIND_INFO is not set
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+CONFIG_EARLY_PRINTK=y
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+CONFIG_STACK_BACKTRACE_COLS=2
+# CONFIG_DEBUG_RODATA is not set
+# CONFIG_4KSTACKS is not set
+CONFIG_X86_FIND_SMP_CONFIG=y
+CONFIG_X86_MPPARSE=y
+CONFIG_DOUBLEFAULT=y
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_SERPENT=m
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_AES_586 is not set
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+# CONFIG_CRYPTO_DEV_PADLOCK is not set
+
+#
+# Library routines
+#
+CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=m
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_GENERIC_PENDING_IRQ=y
+CONFIG_X86_SMP=y
+CONFIG_X86_HT=y
+CONFIG_X86_BIOS_REBOOT=y
+CONFIG_X86_TRAMPOLINE=y
+CONFIG_KTIME_SCALAR=y
diff --git a/kernelconfigs/kernelconfig.mips b/kernelconfigs/kernelconfig.mips
new file mode 100644
index 0000000..f4a12eb
--- /dev/null
+++ b/kernelconfigs/kernelconfig.mips
@@ -0,0 +1,883 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.17
+# Sun Aug 13 15:04:31 2006
+#
+CONFIG_MIPS=y
+
+#
+# Machine selection
+#
+# CONFIG_MIPS_MTX1 is not set
+# CONFIG_MIPS_BOSPORUS is not set
+# CONFIG_MIPS_PB1000 is not set
+# CONFIG_MIPS_PB1100 is not set
+# CONFIG_MIPS_PB1500 is not set
+# CONFIG_MIPS_PB1550 is not set
+# CONFIG_MIPS_PB1200 is not set
+# CONFIG_MIPS_DB1000 is not set
+# CONFIG_MIPS_DB1100 is not set
+# CONFIG_MIPS_DB1500 is not set
+# CONFIG_MIPS_DB1550 is not set
+# CONFIG_MIPS_DB1200 is not set
+# CONFIG_MIPS_MIRAGE is not set
+# CONFIG_MIPS_COBALT is not set
+# CONFIG_MACH_DECSTATION is not set
+# CONFIG_MIPS_EV64120 is not set
+# CONFIG_MIPS_EV96100 is not set
+# CONFIG_MIPS_IVR is not set
+# CONFIG_MIPS_ITE8172 is not set
+# CONFIG_MACH_JAZZ is not set
+# CONFIG_LASAT is not set
+# CONFIG_MIPS_ATLAS is not set
+# CONFIG_MIPS_MALTA is not set
+# CONFIG_MIPS_SEAD is not set
+# CONFIG_MIPS_SIM is not set
+# CONFIG_MOMENCO_JAGUAR_ATX is not set
+# CONFIG_MOMENCO_OCELOT is not set
+# CONFIG_MOMENCO_OCELOT_3 is not set
+# CONFIG_MOMENCO_OCELOT_C is not set
+# CONFIG_MOMENCO_OCELOT_G is not set
+# CONFIG_MIPS_XXS1500 is not set
+# CONFIG_PNX8550_V2PCI is not set
+# CONFIG_PNX8550_JBS is not set
+# CONFIG_DDB5074 is not set
+# CONFIG_DDB5476 is not set
+# CONFIG_DDB5477 is not set
+# CONFIG_MACH_VR41XX is not set
+CONFIG_PMC_YOSEMITE=y
+# CONFIG_QEMU is not set
+# CONFIG_SGI_IP22 is not set
+# CONFIG_SGI_IP27 is not set
+# CONFIG_SGI_IP32 is not set
+# CONFIG_SIBYTE_BIGSUR is not set
+# CONFIG_SIBYTE_SWARM is not set
+# CONFIG_SIBYTE_SENTOSA is not set
+# CONFIG_SIBYTE_RHONE is not set
+# CONFIG_SIBYTE_CARMEL is not set
+# CONFIG_SIBYTE_PTSWARM is not set
+# CONFIG_SIBYTE_LITTLESUR is not set
+# CONFIG_SIBYTE_CRHINE is not set
+# CONFIG_SIBYTE_CRHONE is not set
+# CONFIG_SNI_RM200_PCI is not set
+# CONFIG_TOSHIBA_JMR3927 is not set
+# CONFIG_TOSHIBA_RBTX4927 is not set
+# CONFIG_TOSHIBA_RBTX4938 is not set
+CONFIG_HYPERTRANSPORT=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_DMA_COHERENT=y
+CONFIG_CPU_BIG_ENDIAN=y
+# CONFIG_CPU_LITTLE_ENDIAN is not set
+CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
+CONFIG_IRQ_CPU=y
+CONFIG_IRQ_CPU_RM7K=y
+CONFIG_IRQ_CPU_RM9K=y
+CONFIG_SWAP_IO_SPACE=y
+CONFIG_MIPS_L1_CACHE_SHIFT=5
+
+#
+# CPU selection
+#
+# CONFIG_CPU_MIPS32_R1 is not set
+# CONFIG_CPU_MIPS32_R2 is not set
+# CONFIG_CPU_MIPS64_R1 is not set
+# CONFIG_CPU_MIPS64_R2 is not set
+# CONFIG_CPU_R3000 is not set
+# CONFIG_CPU_TX39XX is not set
+# CONFIG_CPU_VR41XX is not set
+# CONFIG_CPU_R4300 is not set
+# CONFIG_CPU_R4X00 is not set
+# CONFIG_CPU_TX49XX is not set
+# CONFIG_CPU_R5000 is not set
+# CONFIG_CPU_R5432 is not set
+# CONFIG_CPU_R6000 is not set
+# CONFIG_CPU_NEVADA is not set
+# CONFIG_CPU_R8000 is not set
+# CONFIG_CPU_R10000 is not set
+# CONFIG_CPU_RM7000 is not set
+CONFIG_CPU_RM9000=y
+# CONFIG_CPU_SB1 is not set
+CONFIG_SYS_HAS_CPU_RM9000=y
+CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
+
+#
+# Kernel type
+#
+CONFIG_32BIT=y
+# CONFIG_64BIT is not set
+CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_8KB is not set
+# CONFIG_PAGE_SIZE_16KB is not set
+# CONFIG_PAGE_SIZE_64KB is not set
+CONFIG_CPU_HAS_PREFETCH=y
+# CONFIG_MIPS_MT is not set
+# CONFIG_64BIT_PHYS_ADDR is not set
+CONFIG_CPU_HAS_LLSC=y
+CONFIG_CPU_HAS_SYNC=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+# CONFIG_HIGHMEM is not set
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_SYS_SUPPORTS_HIGHMEM=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_SMP is not set
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_EMBEDDED=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+# CONFIG_HOTPLUG is not set
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODULE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# Bus options (PCI, PCMCIA, EISA, ISA, TC)
+#
+CONFIG_HW_HAS_PCI=y
+CONFIG_PCI=y
+CONFIG_MMU=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PCI Hotplug Support
+#
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+CONFIG_TRAD_SIGNALS=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=y
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=y
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI Transport Attributes
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_3W_9XXX is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AACRAID is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_MEGARAID_NEWGEN is not set
+# CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_MEGARAID_SAS is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_IPR is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_LPFC is not set
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+# CONFIG_FUSION_SPI is not set
+# CONFIG_FUSION_FC is not set
+# CONFIG_FUSION_SAS is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_DM9000 is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
+# CONFIG_FORCEDETH is not set
+# CONFIG_DGRS is not set
+CONFIG_EEPRO100=y
+# CONFIG_E100 is not set
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
+# CONFIG_8139TOO is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+# CONFIG_LAN_SAA9730 is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+CONFIG_E1000=y
+# CONFIG_E1000_NAPI is not set
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NET_FC is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+# CONFIG_INPUT is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_PCIPS2 is not set
+# CONFIG_SERIO_LIBPS2 is not set
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+CONFIG_SERIAL_NONSTANDARD=y
+# CONFIG_COMPUTONE is not set
+# CONFIG_ROCKETPORT is not set
+# CONFIG_CYCLADES is not set
+# CONFIG_DIGIEPCA is not set
+# CONFIG_MOXA_INTELLIO is not set
+# CONFIG_MOXA_SMARTIO is not set
+# CONFIG_ISI is not set
+# CONFIG_SYNCLINKMP is not set
+# CONFIG_SYNCLINK_GT is not set
+# CONFIG_N_HDLC is not set
+# CONFIG_RISCOM8 is not set
+# CONFIG_SPECIALIX is not set
+# CONFIG_SX is not set
+# CONFIG_RIO is not set
+# CONFIG_STALDRV is not set
+# CONFIG_AU1000_UART is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# File systems
+#
+# CONFIG_EXT2_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+# CONFIG_PROC_KCORE is not set
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_DEBUG_FS is not set
+CONFIG_CROSSCOMPILE=y
+CONFIG_CMDLINE=""
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
diff --git a/kernelconfigs/kernelconfig.powerpc b/kernelconfigs/kernelconfig.powerpc
new file mode 100644
index 0000000..2c8e515
--- /dev/null
+++ b/kernelconfigs/kernelconfig.powerpc
@@ -0,0 +1,882 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.17
+# Sat Aug 12 22:46:04 2006
+#
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_EMBEDDED=y
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+CONFIG_OBSOLETE_INTERMODULE=y
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# Processor
+#
+CONFIG_6xx=y
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_8xx is not set
+# CONFIG_E200 is not set
+# CONFIG_E500 is not set
+CONFIG_PPC_FPU=y
+# CONFIG_ALTIVEC is not set
+# CONFIG_TAU is not set
+# CONFIG_KEXEC is not set
+# CONFIG_CPU_FREQ is not set
+# CONFIG_WANT_EARLY_SERIAL is not set
+CONFIG_PPC_STD_MMU=y
+
+#
+# Platform options
+#
+# CONFIG_PPC_PREP is not set
+# CONFIG_APUS is not set
+# CONFIG_KATANA is not set
+# CONFIG_WILLOW is not set
+# CONFIG_CPCI690 is not set
+# CONFIG_POWERPMC250 is not set
+# CONFIG_CHESTNUT is not set
+# CONFIG_SPRUCE is not set
+# CONFIG_HDPU is not set
+# CONFIG_EV64260 is not set
+# CONFIG_LOPEC is not set
+# CONFIG_MVME5100 is not set
+# CONFIG_PPLUS is not set
+# CONFIG_PRPMC750 is not set
+# CONFIG_PRPMC800 is not set
+# CONFIG_SANDPOINT is not set
+# CONFIG_RADSTONE_PPC7D is not set
+# CONFIG_PAL4 is not set
+# CONFIG_GEMINI is not set
+# CONFIG_EST8260 is not set
+# CONFIG_SBC82xx is not set
+# CONFIG_SBS8260 is not set
+# CONFIG_RPX8260 is not set
+# CONFIG_TQM8260 is not set
+# CONFIG_ADS8272 is not set
+# CONFIG_PQ2FADS is not set
+CONFIG_LITE5200=y
+CONFIG_LITE5200B=y
+# CONFIG_MPC834x_SYS is not set
+# CONFIG_EV64360 is not set
+CONFIG_PPC_MPC52xx=y
+# CONFIG_SMP is not set
+# CONFIG_HIGHMEM is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+# CONFIG_PREEMPT_NONE is not set
+# CONFIG_PREEMPT_VOLUNTARY is not set
+CONFIG_PREEMPT=y
+CONFIG_PREEMPT_BKL=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_CMDLINE_BOOL is not set
+# CONFIG_PM is not set
+# CONFIG_SOFTWARE_SUSPEND is not set
+CONFIG_SECCOMP=y
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+CONFIG_GENERIC_ISA_DMA=y
+# CONFIG_PPC_I8259 is not set
+# CONFIG_PPC_INDIRECT_PCI is not set
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_PCI_DEBUG is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_PCI is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Macintosh device drivers
+#
+# CONFIG_WINDFARM is not set
+
+#
+# Network device support
+#
+# CONFIG_NETDEVICES is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_PCI is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_EVBUG=y
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_I8042 is not set
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_PCIPS2 is not set
+# CONFIG_SERIO_LIBPS2 is not set
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_MPC52xx is not set
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=32
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=m
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_PREEMPT=y
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_SPINLOCK_SLEEP=y
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_FS is not set
+# CONFIG_DEBUG_VM is not set
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_XMON is not set
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_SERIAL_TEXT_DEBUG is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Hardware crypto devices
+#
diff --git a/mips-r6000-linux-gnu_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig b/mips-r6000-linux-gnu_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
new file mode 100644
index 0000000..3d8a3c4
--- /dev/null
+++ b/mips-r6000-linux-gnu_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
@@ -0,0 +1,49 @@
+#
+# Automatically generated make config: don't edit
+# PTXdist version: 0.10.svn
+# Sun Aug 13 15:35:26 2006
+#
+PTXCONF_GLIBC=y
+PTXCONF_GLIBC_VERSION="2.4"
+PTXCONF_GLIBC_EXTRA_CONFIG=""
+# PTXCONF_GLIBC_ADDON_LINUXTHREADS is not set
+PTXCONF_GLIBC_ADDON_NPTL=y
+PTXCONF_GLIBC_TLS=y
+PTXCONF_GLIBC_HEADERS=y
+PTXCONF_GLIBC_CRT=y
+PTXCONF_GLIBC_FINAL=y
+PTXCONF_GLIBC_PORTS=y
+PTXCONF_GLIBC_PORTS_VERSION="${PTXCONF_GLIBC_VERSION}"
+PTXCONF_CROSS_BINUTILS=y
+PTXCONF_CROSS_BINUTILS_VERSION="2.17"
+PTXCONF_CROSS_BINUTILS_EXTRA_CONFIG=""
+PTXCONF_CROSS_BINUTILS_EXTRA_ENV=""
+PTXCONF_KERNEL_HEADERS=y
+PTXCONF_KERNEL_HEADERS_VERSION="2.6.17"
+# PTXCONF_KERNEL_HEADERS_SANIZIZED is not set
+PTXCONF_KERNEL_HEADERS_CONFIG="kernelconfig.${PTXCONF_ARCH}"
+PTXCONF_CROSS_GCC_FIRST=y
+PTXCONF_CROSS_GCC_FIRST_VERSION="4.1.1"
+PTXCONF_CROSS_GCC_FIRST_EXTRA_CONFIG="--with-arch=r6000 --with-tune=r6000 --with-abi=32 --with-numa-policy=no"
+PTXCONF_CROSS_GCC_SECOND=y
+PTXCONF_CROSS_GCC_SECOND_LANG="c,c++"
+PTXCONF_CROSS_GDB=y
+
+#
+#
+#
+# PTXCONF_ARCH_ARM is not set
+PTXCONF_ARCH_MIPS=y
+# PTXCONF_ARCH_POWERPC is not set
+# PTXCONF_ARCH_I386 is not set
+PTXCONF_ARCH="mips"
+PTXCONF_GNU_TARGET="mips-r6000-linux-gnu"
+PTXCONF_COMPILER_PREFIX="${PTXCONF_GNU_TARGET}-"
+
+#
+# misc
+#
+PTXCONF_CONFIGFILE_VERSION="0.10.svn"
+PTXCONF_PREFIX="/opt/ptxdist-${FULLVERSION}/${PTXCONF_GNU_TARGET}/gcc-${PTXCONF_CROSS_GCC_FIRST_VERSION}-glibc-${PTXCONF_GLIBC_VERSION}"
+PTXCONF_HOST_PREFIX="${PTXCONF_PREFIX}"
+PTXCONF_CROSS_PREFIX="${PTXCONF_PREFIX}"
diff --git a/oldconfig b/oldconfig
new file mode 100755
index 0000000..fd08659
--- /dev/null
+++ b/oldconfig
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+for i in ptxconfig-*; do
+ rm ptxconfig
+ ln -sf $i ptxconfig
+ ptxdist oldconfig
+done
diff --git a/patches/gcc-4.0.3/generic/arm-softfloat.diff b/patches/gcc-4.0.3/generic/arm-softfloat.diff
new file mode 100644
index 0000000..21aae77
--- /dev/null
+++ b/patches/gcc-4.0.3/generic/arm-softfloat.diff
@@ -0,0 +1,38 @@
+Index: gcc/config/arm/linux-elf.h
+===================================================================
+--- a/gcc/config/arm/linux-elf.h.orig
++++ b/gcc/config/arm/linux-elf.h
+@@ -57,7 +57,7 @@
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "msoft-float" "mhard-float", "mno-thumb-interwork" }
+
+ /* The GNU C++ standard library requires that these macros be defined. */
+ #undef CPLUSPLUS_CPP_SPEC
+@@ -70,7 +70,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+
+ /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
+ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
+Index: gcc/config/arm/t-linux
+===================================================================
+--- a/gcc/config/arm/t-linux.orig
++++ b/gcc/config/arm/t-linux
+@@ -4,7 +4,10 @@ TARGET_LIBGCC2_CFLAGS = -fomit-frame-poi
+ LIBGCC2_DEBUG_CFLAGS = -g0
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi _floatdidf _floatdisf
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
diff --git a/patches/gcc-4.0.3/generic/gcc-4.0-arm-bigendian.patch b/patches/gcc-4.0.3/generic/gcc-4.0-arm-bigendian.patch
new file mode 100644
index 0000000..266879a
--- /dev/null
+++ b/patches/gcc-4.0.3/generic/gcc-4.0-arm-bigendian.patch
@@ -0,0 +1,83 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+Fixes following build error for big-endian ARM targets:
+
+armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/bin/../lib/gcc/armeb-unknown-linux-gnu/4.0.0/../../../../armeb-unknown-linux-gnu/bin/ld: unrecognised emulation mode: armelf_linux
+Supported emulations: armelfb_linux armelfb
+collect2: ld returned 1 exit status
+make[2]: *** [crosstool-0.32/build/armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/csu/crt1.o] Error 1
+make[2]: Leaving directory `crosstool-0.32/build/armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/glibc-2.3.4/csu'
+make[1]: *** [csu/subdir_lib] Error 2
+make[1]: Leaving directory `crosstool-0.32/build/armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/glibc-2.3.4'
+make: *** [lib] Error 2
+
+
+See http://gcc.gnu.org/PR16350
+
+Index: gcc/config/arm/linux-elf.h
+===================================================================
+--- a/gcc/config/arm/linux-elf.h.orig
++++ b/gcc/config/arm/linux-elf.h
+@@ -31,19 +31,33 @@
+ /* Do not assume anything about header files. */
+ #define NO_IMPLICIT_EXTERN_C
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for
++ * arm*b-*-linux* (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ #undef TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (0)
++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* The GNU C++ standard library requires that these macros be defined. */
+ #undef CPLUSPLUS_CPP_SPEC
+@@ -90,7 +104,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+
+ #define TARGET_OS_CPP_BUILTINS() \
+Index: gcc/config.gcc
+===================================================================
+--- a/gcc/config.gcc.orig
++++ b/gcc/config.gcc
+@@ -672,6 +672,11 @@ arm*-*-netbsd*)
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
++ case $target in
++ arm*b-*-linux*)
++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
++ ;;
++ esac
+ tmake_file="${tmake_file} arm/t-arm arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
diff --git a/patches/gcc-4.0.3/generic/series b/patches/gcc-4.0.3/generic/series
new file mode 100644
index 0000000..302eaa7
--- /dev/null
+++ b/patches/gcc-4.0.3/generic/series
@@ -0,0 +1,2 @@
+gcc-4.0-arm-bigendian.patch
+arm-softfloat.diff
diff --git a/patches/gcc-4.1.1/generic/gcc-4.1.0-arm-bigendian.patch b/patches/gcc-4.1.1/generic/gcc-4.1.0-arm-bigendian.patch
new file mode 100644
index 0000000..7579656
--- /dev/null
+++ b/patches/gcc-4.1.1/generic/gcc-4.1.0-arm-bigendian.patch
@@ -0,0 +1,102 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+Index: gcc/config/arm/linux-elf.h
+===================================================================
+--- a/gcc/config/arm/linux-elf.h.orig
++++ b/gcc/config/arm/linux-elf.h
+@@ -28,19 +28,33 @@
+ #undef TARGET_VERSION
+ #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ #undef TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (0)
++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* Now we define the strings used to build the spec file. */
+ #undef LIB_SPEC
+@@ -61,7 +75,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+
+ #undef LINK_SPEC
+Index: gcc/config.gcc
+===================================================================
+--- a/gcc/config.gcc.orig
++++ b/gcc/config.gcc
+@@ -672,6 +672,11 @@ arm*-*-netbsd*)
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
++ case $target in
++ arm*b-*)
++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
++ ;;
++ esac
+ tmake_file="${tmake_file} t-linux arm/t-arm"
+ case ${target} in
+ arm*-*-linux-gnueabi)
+Index: gcc/config/arm/linux-eabi.h
+===================================================================
+--- a/gcc/config/arm/linux-eabi.h.orig
++++ b/gcc/config/arm/linux-eabi.h
+@@ -20,6 +20,17 @@
+ the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#undef TARGET_LINKER_EMULATION
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_LINKER_EMULATION "armelfb_linux_eabi"
++#else
++#define TARGET_LINKER_EMULATION "armelf_linux_eabi"
++#endif
++
+ /* On EABI GNU/Linux, we want both the BPABI builtins and the
+ GNU/Linux builtins. */
+ #undef TARGET_OS_CPP_BUILTINS
+@@ -48,7 +59,7 @@
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
+
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+ GNU/Linux binaries on an EABI system. */
diff --git a/patches/gcc-4.1.1/generic/series b/patches/gcc-4.1.1/generic/series
new file mode 100644
index 0000000..7961db4
--- /dev/null
+++ b/patches/gcc-4.1.1/generic/series
@@ -0,0 +1 @@
+gcc-4.1.0-arm-bigendian.patch
diff --git a/patches/gcc-TODO/PR27363.diff b/patches/gcc-TODO/PR27363.diff
new file mode 100644
index 0000000..98460ad
--- /dev/null
+++ b/patches/gcc-TODO/PR27363.diff
@@ -0,0 +1,164 @@
+#
+# Submitted-By: Robert Schwebel, 2006-07-20
+# Committed-By: Robert Schwebel
+#
+# Error:
+#
+# The following construction is broken:
+#
+# struct = *some_other_struct;
+#
+# For details see bugzilla entry below.
+#
+# Description:
+#
+# This is a patch against gcc-trunk which fixes the following bug from
+# gcc bugzilla:
+#
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27363
+#
+# The patch was taken from upstream cvs for trunk and has to be adapted
+# to random gcc versions. It is at least necessary until gcc 4.1.0
+#
+# State:
+#
+# fixed in upstream cvs
+#
+
+--- trunk/gcc/ChangeLog 2006/07/20 08:34:53 115613
++++ trunk/gcc/ChangeLog 2006/07/20 13:57:31 115614
+@@ -1,3 +1,9 @@
++2006-07-20 Paul Brook <paul@codesourcery.com>
++
++ PR 27363
++ * cse.c (cse_insn): Add destination addresses to hash table. Check if
++ they are invalidated by this instruction.
++
+ 2006-07-21 Danny Smith <dannysmith@users.sourceforge.net>
+
+ PR target/28427
+--- trunk/gcc/cse.c 2006/07/20 08:34:53 115613
++++ trunk/gcc/cse.c 2006/07/20 13:57:31 115614
+@@ -4739,6 +4739,8 @@
+ unsigned src_const_hash;
+ /* Table entry for constant equivalent for SET_SRC, if any. */
+ struct table_elt *src_const_elt;
++ /* Table entry for the destination address. */
++ struct table_elt *dest_addr_elt;
+ };
+
+ static void
+@@ -5970,6 +5972,40 @@
+ so that the destination goes into that class. */
+ sets[i].src_elt = src_eqv_elt;
+
++ /* Record destination addresses in the hash table. This allows us to
++ check if they are invalidated by other sets. */
++ for (i = 0; i < n_sets; i++)
++ {
++ if (sets[i].rtl)
++ {
++ rtx x = sets[i].inner_dest;
++ struct table_elt *elt;
++ enum machine_mode mode;
++ unsigned hash;
++
++ if (MEM_P (x))
++ {
++ x = XEXP (x, 0);
++ mode = GET_MODE (x);
++ hash = HASH (x, mode);
++ elt = lookup (x, hash, mode);
++ if (!elt)
++ {
++ if (insert_regs (x, NULL, 0))
++ {
++ rehash_using_reg (x);
++ hash = HASH (x, mode);
++ }
++ elt = insert (x, NULL, hash, mode);
++ }
++
++ sets[i].dest_addr_elt = elt;
++ }
++ else
++ sets[i].dest_addr_elt = NULL;
++ }
++ }
++
+ invalidate_from_clobbers (x);
+
+ /* Some registers are invalidated by subroutine calls. Memory is
+@@ -6062,12 +6098,20 @@
+ }
+
+ /* We may have just removed some of the src_elt's from the hash table.
+- So replace each one with the current head of the same class. */
++ So replace each one with the current head of the same class.
++ Also check if destination addresses have been removed. */
+
+ for (i = 0; i < n_sets; i++)
+ if (sets[i].rtl)
+ {
+- if (sets[i].src_elt && sets[i].src_elt->first_same_value == 0)
++ if (sets[i].dest_addr_elt
++ && sets[i].dest_addr_elt->first_same_value == 0)
++ {
++ /* The elt was removed, which means this destination s not
++ valid after this instruction. */
++ sets[i].rtl = NULL_RTX;
++ }
++ else if (sets[i].src_elt && sets[i].src_elt->first_same_value == 0)
+ /* If elt was removed, find current head of same class,
+ or 0 if nothing remains of that class. */
+ {
+/* PR27363. CSE was breaking on the arm store multiple insn used for
+ structure copies. */
+/* { dg-do run } */
+/* { dg-options "-Os" } */
+extern void abort (void);
+
+struct snd_mask {
+ unsigned int bits[6];
+};
+
+static int __attribute__((noinline))
+snd_mask_refine(struct snd_mask *mask)
+{
+ struct snd_mask old;
+
+ old = *mask;
+ if (mask->bits[0]==0 && mask->bits[1]==0)
+ return 1;
+
+ return old.bits[0] != mask->bits[0];
+}
+
+int main(int argc, char *argv[])
+{
+ struct snd_mask mask;
+
+
+ mask.bits[0] = 23;
+ mask.bits[1] = 42;
+ mask.bits[2] = 0;
+ mask.bits[3] = 0;
+ mask.bits[4] = 0;
+ mask.bits[5] = 0;
+
+
+ if (snd_mask_refine(&mask))
+ abort();
+ return 0;
+}
+--- trunk/gcc/testsuite/ChangeLog 2006/07/20 08:34:53 115613
++++ trunk/gcc/testsuite/ChangeLog 2006/07/20 13:57:31 115614
+@@ -1,3 +1,8 @@
++2006-07-20 Paul Brook <paul@codesourcery.com>
++
++ PR 27363
++ * gcc.dg/pr27363.c: New test.
++
+ 2006-07-19 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/28338
diff --git a/patches/glibc-2.3.6/generic/make-install-lib-all.patch b/patches/glibc-2.3.6/generic/make-install-lib-all.patch
new file mode 100644
index 0000000..1e69bb2
--- /dev/null
+++ b/patches/glibc-2.3.6/generic/make-install-lib-all.patch
@@ -0,0 +1,26 @@
+From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
+Rule to install all needed libraries, not just the ones installed by install-lib,
+yet not install programs.
+Needed because we can't use the main install target, as we can't build programs before
+we have the final gcc installed; linking fails because libeh.a is not present,
+and glibc insists on linking programs with that library.
+
+diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
+--- glibc-2.3.4.orig/Makerules 2004-12-15 20:52:39.000000000 +0200
++++ glibc-2.3.4/Makerules 2005-02-19 15:16:31.415125176 +0200
+@@ -844,6 +844,13 @@
+ installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
+ $(inst_libdir)/$(patsubst %,$(libtype$o),\
+ $(libprefix)$(libc-name)))
++
++install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
++ $(inst_slibdir)/libc-$(version).so \
++ $(inst_libdir)/libc.so \
++ $(inst_libdir)/libc.a \
++ install-lib
++
+ install: $(installed-libcs)
+ $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
+ $(make-target-directory)
+
+Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
diff --git a/patches/glibc-2.3.6/generic/series b/patches/glibc-2.3.6/generic/series
new file mode 100644
index 0000000..e2d0141
--- /dev/null
+++ b/patches/glibc-2.3.6/generic/series
@@ -0,0 +1,5 @@
+make-install-lib-all.patch
+sysdeps_arm_dl-machine_h-fix_bad_pc24.diff
+sysdeps_unix_sysv_linux_arm_ioperm_c-BUS_ISA.diff
+sysdeps_unix_sysv_linux_arm_socket_S-alias.diff
+sysdeps_arm-fp-byteorder.diff
diff --git a/patches/glibc-2.3.6/generic/sysdeps_arm-fp-byteorder.diff b/patches/glibc-2.3.6/generic/sysdeps_arm-fp-byteorder.diff
new file mode 100644
index 0000000..d45cdbc
--- /dev/null
+++ b/patches/glibc-2.3.6/generic/sysdeps_arm-fp-byteorder.diff
@@ -0,0 +1,205 @@
+Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
+Author: addsub@eyou.com
+Target: ARM
+
+Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
+and makes printf("%f", 1.0) work.
+
+Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
+ It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
+ is broken' on my big-endian hardfloat FPA ARM platform. ...
+ It's definitely needed for hardfloat. So I'd think it's needed for
+ big-endian systems in any case, and for VFP on little-endian systems
+ too. Someone would have to verify that though.
+
+Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
+ I just had a look at glibc-20040830, and [this patch] is still needed and useful
+ for this version. glibc-20040830 out-of-the-box still contains the
+ following wrong assumptions:
+ - sysdeps/arm/bits/endian.h: float word order is big endian (which it is
+ not on vfp systems)
+ - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
+ are not on big endian systems, neither on vfp systems)
+ - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
+ (which they are not on big endian systems)
+ [This patch] seems the right solution for all of these issues.
+
+Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
+ It's even needed for glibc CVS, AFAICS.
+ The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
+ (currently at version 1.4) is only needed for proper VFP operation.
+ But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
+ that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
+ for proper operation of *any* FP model on big endian ARM.
+
+See also discussion in followups to
+http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
+
+Message-ID: <276985760.37584@eyou.com>
+Received: from unknown (HELO eyou.com) (172.16.2.2)
+ by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
+Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
+Date: 17 Feb 2004 10:42:38 +0800
+Message-ID: <20040217104238.8237.qmail@eyou.com>
+From: "add" <addsub@eyou.com>
+To: dank@kegel.com
+Reply-To: "add" <addsub@eyou.com>
+Subject: Re:&nbsp;&nbsp;&nbsp;problem&nbsp;while&nbsp;building&nbsp;arm&nbsp;vfp&nbsp;softfloat&nbsp;gcc&nbsp;`
+
+Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
+toolchain can printf("%f\n",1.0). So you may have a try of this
+
+
+diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
+--- glibc.old/sysdeps/arm/bits/endian.h 1999-04-12 11:59:13.000000000 -0400
++++ glibc.new/sysdeps/arm/bits/endian.h 2004-02-12 09:15:13.000000000 -0500
+@@ -9,4 +9,9 @@
+ #else
+ #define __BYTE_ORDER __LITTLE_ENDIAN
+ #endif
++
++#ifdef __VFP_FP__
++#define __FLOAT_WORD_ORDER __BYTE_ORDER
++#else
+ #define __FLOAT_WORD_ORDER __BIG_ENDIAN
++#endif
+diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
+--- glibc.old/sysdeps/arm/gmp-mparam.h 2001-07-07 15:21:19.000000000 -0400
++++ glibc.new/sysdeps/arm/gmp-mparam.h 2004-02-12 09:15:13.000000000 -0500
+@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
+ #define BITS_PER_SHORTINT 16
+ #define BITS_PER_CHAR 8
+
+-#define IEEE_DOUBLE_BIG_ENDIAN 0
+-#define IEEE_DOUBLE_MIXED_ENDIAN 1
++#if defined(__ARMEB__)
++# define IEEE_DOUBLE_MIXED_ENDIAN 0
++# define IEEE_DOUBLE_BIG_ENDIAN 1
++#elif defined(__VFP_FP__)
++# define IEEE_DOUBLE_MIXED_ENDIAN 0
++# define IEEE_DOUBLE_BIG_ENDIAN 0
++#else
++# define IEEE_DOUBLE_BIG_ENDIAN 0
++# define IEEE_DOUBLE_MIXED_ENDIAN 1
++#endif
+diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
+--- glibc.old/sysdeps/arm/ieee754.h 2001-07-07 15:21:19.000000000 -0400
++++ glibc.new/sysdeps/arm/ieee754.h 1969-12-31 19:00:00.000000000 -0500
+@@ -1,115 +0,0 @@
+-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+-
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Lesser General Public
+- License as published by the Free Software Foundation; either
+- version 2.1 of the License, or (at your option) any later version.
+-
+- The GNU C Library 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
+- Lesser General Public License for more details.
+-
+- You should have received a copy of the GNU Lesser General Public
+- License along with the GNU C Library; if not, write to the Free
+- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+- 02111-1307 USA. */
+-
+-#ifndef _IEEE754_H
+-
+-#define _IEEE754_H 1
+-#include <features.h>
+-
+-#include <endian.h>
+-
+-__BEGIN_DECLS
+-
+-union ieee754_float
+- {
+- float f;
+-
+- /* This is the IEEE 754 single-precision format. */
+- struct
+- {
+- unsigned int mantissa:23;
+- unsigned int exponent:8;
+- unsigned int negative:1;
+- } ieee;
+-
+- /* This format makes it easier to see if a NaN is a signalling NaN. */
+- struct
+- {
+- unsigned int mantissa:22;
+- unsigned int quiet_nan:1;
+- unsigned int exponent:8;
+- unsigned int negative:1;
+- } ieee_nan;
+- };
+-
+-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
+-
+-
+-union ieee754_double
+- {
+- double d;
+-
+- /* This is the IEEE 754 double-precision format. */
+- struct
+- {
+- unsigned int mantissa0:20;
+- unsigned int exponent:11;
+- unsigned int negative:1;
+- unsigned int mantissa1:32;
+- } ieee;
+-
+- /* This format makes it easier to see if a NaN is a signalling NaN. */
+- struct
+- {
+- unsigned int mantissa0:19;
+- unsigned int quiet_nan:1;
+- unsigned int exponent:11;
+- unsigned int negative:1;
+- unsigned int mantissa1:32;
+- } ieee_nan;
+- };
+-
+-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
+-
+-
+-/* The following two structures are correct for `new' floating point systems but
+- wrong for the old FPPC. The only solution seems to be to avoid their use on
+- old hardware. */
+-
+-union ieee854_long_double
+- {
+- long double d;
+-
+- /* This is the IEEE 854 double-extended-precision format. */
+- struct
+- {
+- unsigned int exponent:15;
+- unsigned int empty:16;
+- unsigned int negative:1;
+- unsigned int mantissa1:32;
+- unsigned int mantissa0:32;
+- } ieee;
+-
+- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
+- struct
+- {
+- unsigned int exponent:15;
+- unsigned int empty:16;
+- unsigned int negative:1;
+- unsigned int mantissa1:32;
+- unsigned int mantissa0:30;
+- unsigned int quiet_nan:1;
+- unsigned int one:1;
+- } ieee_nan;
+- };
+-
+-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
+-
+-__END_DECLS
+-
+-#endif /* ieee754.h */
+
+Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
diff --git a/patches/glibc-2.3.6/generic/sysdeps_arm_dl-machine_h-fix_bad_pc24.diff b/patches/glibc-2.3.6/generic/sysdeps_arm_dl-machine_h-fix_bad_pc24.diff
new file mode 100644
index 0000000..9506e45
--- /dev/null
+++ b/patches/glibc-2.3.6/generic/sysdeps_arm_dl-machine_h-fix_bad_pc24.diff
@@ -0,0 +1,35 @@
+Fixes
+In file included from dynamic-link.h:22,
+ from dl-reloc.c:265:
+../sysdeps/arm/dl-machine.h: In function '_dl_relocate_object':
+../sysdeps/arm/dl-machine.h:371: error: invalid storage class for function 'fix_bad_pc24'
+make[2]: Leaving directory `/home/dank/queue/jobdir.k8/crosstool-dev/build/arm-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.6/glibc-2.3.6/elf'
+
+when building glibc-2.3.6 with gcc-4.0
+
+Like
+http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/arm/dl-machine.h.diff?r1=1.51&r2=1.52&cvsroot=glibc
+but fixes fix_bad_pc24.
+
+
+--- a/sysdeps/arm/dl-machine.h Sun Mar 20 17:54:37 2005
++++ b/sysdeps/arm/dl-machine.h Sun Mar 20 17:57:32 2005
+@@ -357,7 +357,14 @@
+ #ifdef RESOLVE
+
+ /* Deal with an out-of-range PC24 reloc. */
+-static Elf32_Addr
++#if __GNUC__ >= 4
++ auto inline Elf32_Addr
++#else
++ static inline Elf32_Addr
++#endif
++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
++ __attribute ((always_inline))
++#endif
+ fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
+ {
+ static void *fix_page;
+
+Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
+with a little editing by dank@kegel.com
diff --git a/patches/glibc-2.3.6/generic/sysdeps_unix_sysv_linux_arm_ioperm_c-BUS_ISA.diff b/patches/glibc-2.3.6/generic/sysdeps_unix_sysv_linux_arm_ioperm_c-BUS_ISA.diff
new file mode 100644
index 0000000..413c685
--- /dev/null
+++ b/patches/glibc-2.3.6/generic/sysdeps_unix_sysv_linux_arm_ioperm_c-BUS_ISA.diff
@@ -0,0 +1,53 @@
+Applies to both glibc-2.2.5 and glibc-2.3.2, and probably glibc cvs as of Aug 2004.
+Needed to build glibc with linux kernels 2.4.23 or higher on ARM,
+Fixes following error:
+
+../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
+../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
+../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
+../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
+../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
+../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
+../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
+../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
+make[2]: *** [/home/dank/crosstool-0.28/build/arm-softfloat-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/misc/ioperm.o] Error 1
+
+cf. "[SYSCTL] BUS_ISA -> CTL_BUS_ISA", http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html
+
+--- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c.old 2003-02-20 14:22:24.000000000 -0800
++++ glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c 2004-01-31 16:01:50.000000000 -0800
+@@ -47,6 +47,12 @@
+ #include <asm/page.h>
+ #include <sys/sysctl.h>
+
++/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
++#include <linux/version.h>
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
++#define CTL_BUS_ISA BUS_ISA /* and hope it's not the one from linux/input.h */
++#endif
++
+ #define PATH_ARM_SYSTYPE "/etc/arm_systype"
+ #define PATH_CPUINFO "/proc/cpuinfo"
+
+@@ -80,7 +86,7 @@
+ * Initialize I/O system. There are several ways to get the information
+ * we need. Each is tried in turn until one succeeds.
+ *
+- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*). This is the preferred method
++ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*). This is the preferred method
+ * but not all kernels support it.
+ *
+ * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
+@@ -100,8 +106,8 @@
+ {
+ char systype[256];
+ int i, n;
+- static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
+- static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
++ static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
++ static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
+ size_t len = sizeof(io.base);
+
+ if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
+
+Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
diff --git a/patches/glibc-2.3.6/generic/sysdeps_unix_sysv_linux_arm_socket_S-alias.diff b/patches/glibc-2.3.6/generic/sysdeps_unix_sysv_linux_arm_socket_S-alias.diff
new file mode 100644
index 0000000..1819990
--- /dev/null
+++ b/patches/glibc-2.3.6/generic/sysdeps_unix_sysv_linux_arm_socket_S-alias.diff
@@ -0,0 +1,64 @@
+#
+# Submitted-By: Marc Kleine-Budde, 2006-08-13
+# Committed-By: Marc Kleine-Budde
+#
+# Error:
+#
+# armeb-xscale-linux-gnu-gcc ../sysdeps/unix/sysv/linux/bind.S -c
+#-I../include
+#-I. -I/home/frogger/pengutronix/ptxdist/build/toolchain-armv5b-softfloat-linux-gnu/build-target/glibc-2.3.6-build/socket
+#-I.. -I../libio
+#-I/home/frogger/pengutronix/ptxdist/build/toolchain-armv5b-softfloat-linux-gnu/build-target/glibc-2.3.6-build
+#-I../sysdeps/arm/elf -I../linuxthreads/sysdeps/unix/sysv/linux/arm
+#-I../linuxthreads/sysdeps/unix/sysv/linux
+#-I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread
+#-I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix
+#-I../linuxthreads/sysdeps/arm -I../sysdeps/unix/sysv/linux/arm
+#-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu
+#-I../sysdeps/unix/common -I../sysdeps/unix/mman
+#-I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/arm
+#-I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/arm
+#-I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32
+#-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754
+#-I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem
+#/usr/opt/ptxdist-0.10.svn/armeb-xscale-linux-gnu/gcc-4.1.1-glibc-2.3.6/bin/../lib/gcc/armeb-xscale-linux-gnu/4.1.1/include
+#-isystem
+#/opt/ptxdist-0.10.svn/armeb-xscale-linux-gnu/gcc-4.1.1-glibc-2.3.6/sysroot-armeb-xscale-linux-gnu/usr/include
+#-D_LIBC_REENTRANT -include ../include/libc-symbols.h -DASSEMBLER -g
+#-o
+#/home/frogger/pengutronix/ptxdist/build/toolchain-armv5b-softfloat-linux-gnu/build-target/glibc-2.3.6-build/socket/bind.o
+#-MD -MP -MF
+#/home/frogger/pengutronix/ptxdist/build/toolchain-armv5b-softfloat-linux-gnu/build-target/glibc-2.3.6-build/socket/bind.o.dt
+#-MT
+#/home/frogger/pengutronix/ptxdist/build/toolchain-armv5b-softfloat-linux-gnu/build-target/glibc-2.3.6-build/socket/bind.o
+#../sysdeps/unix/sysv/linux/bind.S: Assembler messages:
+#../sysdeps/unix/sysv/linux/bind.S:5: Error: symbol `__bind' is already defined
+#
+# State:
+#
+# fixed in glibc-ports-2.4
+#
+Index: sysdeps/unix/sysv/linux/arm/socket.S
+===================================================================
+--- a/sysdeps/unix/sysv/linux/arm/socket.S.orig
++++ b/sysdeps/unix/sysv/linux/arm/socket.S
+@@ -32,7 +32,11 @@
+ The .S files for the other calls just #define socket and #include this. */
+
+ #ifndef __socket
+-#define __socket P(__,socket)
++# ifndef NO_WEAK_ALIAS
++# define __socket P(__,socket)
++# else
++# define __socket socket
++# endif
+ #endif
+
+ #define PUSHARGS_1 str a1, [sp, $-4]!
+@@ -120,4 +124,6 @@ ENTRY (__socket)
+
+ PSEUDO_END (__socket)
+
++#ifndef NO_WEAK_ALIAS
+ weak_alias (__socket, socket)
++#endif
diff --git a/patches/glibc-2.4/generic/glibc-200607252100.diff.bz2 b/patches/glibc-2.4/generic/glibc-200607252100.diff.bz2
new file mode 100644
index 0000000..3c2fd88
--- /dev/null
+++ b/patches/glibc-2.4/generic/glibc-200607252100.diff.bz2
Binary files differ
diff --git a/patches/glibc-2.4/generic/make-install-lib-all.patch b/patches/glibc-2.4/generic/make-install-lib-all.patch
new file mode 100644
index 0000000..616b626
--- /dev/null
+++ b/patches/glibc-2.4/generic/make-install-lib-all.patch
@@ -0,0 +1,40 @@
+# --- T2-COPYRIGHT-NOTE-BEGIN ---
+# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+#
+# T2 SDE: package/.../glibc32/make-install-lib-all.patch
+# Copyright (C) 2004 - 2005 The T2 SDE Project
+#
+# More information can be found in the files COPYING and README.
+#
+# This patch file is dual-licensed. It is available under the license the
+# patched project is licensed under, as long as it is an OpenSource license
+# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
+# of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+# --- T2-COPYRIGHT-NOTE-END ---
+diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
+--- glibc-2.3.4.orig/Makerules 2004-12-15 20:52:39.000000000 +0200
++++ glibc-2.3.4/Makerules 2005-02-19 15:16:31.415125176 +0200
+@@ -844,6 +844,13 @@
+ installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
+ $(inst_libdir)/$(patsubst %,$(libtype$o),\
+ $(libprefix)$(libc-name)))
++
++install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
++ $(inst_slibdir)/libc-$(version).so \
++ $(inst_libdir)/libc.so \
++ $(inst_libdir)/libc.a \
++ install-lib
++
+ install: $(installed-libcs)
+ $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
+ $(make-target-directory)
+@@ -867,6 +874,7 @@
+ install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so))
+ install-lib := $(filter-out %.so %_pic.a,$(install-lib))
+
++
+ ifeq (yes,$(build-shared))
+ # Find which .so's have versions.
+ versioned := $(strip $(foreach so,$(install-lib.so),\
diff --git a/patches/glibc-ports-2.4/generic/ports-cvs-200607250000-arm-kernel-features.diff b/patches/glibc-ports-2.4/generic/ports-cvs-200607250000-arm-kernel-features.diff
new file mode 100644
index 0000000..f97903f
--- /dev/null
+++ b/patches/glibc-ports-2.4/generic/ports-cvs-200607250000-arm-kernel-features.diff
@@ -0,0 +1,53 @@
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/kernel-features.h ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/kernel-features.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/arm/kernel-features.h 2006-05-30 17:12:30.000000000 +0200
+@@ -0,0 +1,49 @@
++/* Set flags signalling availability of kernel features based on given
++ kernel version number.
++ Copyright (C) 2006 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++/* The utimes syscall was added before 2.6.1. */
++#if __LINUX_KERNEL_VERSION >= 132609
++# define __ASSUME_UTIMES 1
++#endif
++
++/* The new getrlimit syscall was added sometime before 2.4.6. */
++#if __LINUX_KERNEL_VERSION >= 132102
++#define __ASSUME_NEW_GETRLIMIT_SYSCALL 1
++#endif
++
++/* On ARM the truncate64/ftruncate64/mmap2/stat64/lstat64/fstat64
++ syscalls were introduced in 2.3.35. */
++#if __LINUX_KERNEL_VERSION >= 131875
++# define __ASSUME_TRUNCATE64_SYSCALL 1
++# define __ASSUME_MMAP2_SYSCALL 1
++# define __ASSUME_STAT64_SYSCALL 1
++#endif
++
++/* Arm got fcntl64 in 2.4.4. */
++#if __LINUX_KERNEL_VERSION >= 132100
++# define __ASSUME_FCNTL64 1
++#endif
++
++/* The vfork syscall on arm was definitely available in 2.4. */
++#if __LINUX_KERNEL_VERSION >= 132097 && defined __i386__
++# define __ASSUME_VFORK_SYSCALL 1
++#endif
++
++#include_next <kernel-features.h>
diff --git a/patches/glibc-ports-2.4/generic/ports-cvs-200607250000-mips-bootstrap.diff b/patches/glibc-ports-2.4/generic/ports-cvs-200607250000-mips-bootstrap.diff
new file mode 100644
index 0000000..2f4611b
--- /dev/null
+++ b/patches/glibc-ports-2.4/generic/ports-cvs-200607250000-mips-bootstrap.diff
@@ -0,0 +1,35 @@
+http://sourceware.org/ml/crossgcc/2005-05/msg00165.html
+Fixes a MIPS build problem (unrelated to NPTL)
+
+Message-ID: <428E8B24.1000201@realitydiluted.com>
+Date: Fri, 20 May 2005 20:13:08 -0500
+From: "Steven J dot Hill" <sjhill at realitydiluted dot com>
+To: crossgcc at sources dot redhat dot com, toolchain at gentoo dot org,
+ Shay_Gal-On at pmc-sierra dot com, TheNop at gmx dot net
+Subject: New NPTL patches for crosstools and MIPS NPTL patches....
+
+Greetings.
+
+I have uploaded the latest NPTL patch for crosstool-0.34. I have also
+uploaded a tarball of the patches necessary to build a MIPS NPTL
+cross toolchain. To build a MIPS NPTL toolchain you will need the
+released version of binutils-2.16 and the absolute latest GCC and
+glibc code from the HEAD of cvs. Use the 'demo-mips-nptl.sh' script
+to build the toolchain. Please report bugs or issues to the crossgcc
+mailing list. Here is the link off of my FTP site:
+
+ ftp://ftp.realitydiluted.com/crosstools/crosstool-0.34/
+
+[Note: BOOTSTRAP_GCC is set by crosstool.sh when invoking make install-headers]
+
+diff -urN glibc-ports-2.4-orig/sysdeps/mips/mips32/Makefile glibc-ports-2.4/sysdeps/mips/mips32/Makefile
+--- glibc-ports-2.4-orig/sysdeps/mips/mips32/Makefile 2003-03-29 09:15:28.000000000 +0100
++++ glibc-ports-2.4/sysdeps/mips/mips32/Makefile 2006-08-14 12:25:00.000000000 +0200
+@@ -1,3 +1,7 @@
++ifeq ($(filter -DBOOTSTRAP_GCC,$(CFLAGS)),)
+ ifeq ($(filter -mabi=32,$(CC)),)
+ CC += -mabi=32
+ endif
++else
++CC += -D"_MIPS_SZPTR=32"
++endif
diff --git a/patches/glibc-ports-2.4/generic/ports-cvs-200607250000-socket.diff b/patches/glibc-ports-2.4/generic/ports-cvs-200607250000-socket.diff
new file mode 100644
index 0000000..6954ebe
--- /dev/null
+++ b/patches/glibc-ports-2.4/generic/ports-cvs-200607250000-socket.diff
@@ -0,0 +1,135 @@
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/eabi/socket.S ports/sysdeps/unix/sysv/linux/arm/eabi/socket.S
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/eabi/socket.S 2005-11-16 20:03:42.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/arm/eabi/socket.S 1970-01-01 01:00:00.000000000 +0100
+@@ -1,131 +0,0 @@
+-/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2005
+- Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+-
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Lesser General Public
+- License as published by the Free Software Foundation; either
+- version 2.1 of the License, or (at your option) any later version.
+-
+- The GNU C Library 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
+- Lesser General Public License for more details.
+-
+- You should have received a copy of the GNU Lesser General Public
+- License along with the GNU C Library; if not, write to the Free
+- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+- 02111-1307 USA. */
+-
+-#include <sysdep-cancel.h>
+-#include <socketcall.h>
+-
+-#define P(a, b) P2(a, b)
+-#define P2(a, b) a##b
+-
+- .text
+-/* The socket-oriented system calls are handled unusally in Linux.
+- They are all gated through the single `socketcall' system call number.
+- `socketcall' takes two arguments: the first is the subcode, specifying
+- which socket function is being called; and the second is a pointer to
+- the arguments to the specific function.
+-
+- The .S files for the other calls just #define socket and #include this. */
+-
+-#ifndef __socket
+-# ifndef NO_WEAK_ALIAS
+-# define __socket P(__,socket)
+-# else
+-# define __socket socket
+-# endif
+-#endif
+-
+-#define PUSHARGS_1 str a1, [sp, $-8]!; .pad #8
+-#define PUSHARGS_2 stmfd sp!, {a1, a2}; .pad #8
+-#define PUSHARGS_3 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* a4 pushed for padding */
+-#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4}; .pad #16
+-#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* Caller has already pushed arg 5 */
+-#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4}; .pad #16
+-
+-#define POPARGS_1 add sp, sp, #8
+-#define POPARGS_2 add sp, sp, #8
+-#define POPARGS_3 add sp, sp, #16
+-#define POPARGS_4 add sp, sp, #16
+-#define POPARGS_5 add sp, sp, #16
+-#define POPARGS_6 add sp, sp, #16
+-
+-#ifndef NARGS
+-#define NARGS 3 /* If we were called with no wrapper, this is really socket() */
+-#endif
+-
+-#if defined NEED_CANCELLATION && defined CENABLE
+- PSEUDO_PROLOGUE
+-#endif
+-
+-.globl __socket
+-ENTRY (__socket)
+- .fnstart
+-
+- /* This code previously moved sp into ip and stored the args using
+- stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
+- to be restored after the syscall completed. It saved an
+- instruction and meant no stack cleanup work was required.
+-
+- This will not work in the case of a socket call being interrupted
+- by a signal. If the signal handler uses any stack the arguments
+- to socket will be trashed. The results of a restart of any
+- socket call are then unpredictable. */
+-
+- /* Push args onto the stack. */
+- P(PUSHARGS_,NARGS)
+-
+-#if defined NEED_CANCELLATION && defined CENABLE
+- SINGLE_THREAD_P
+- bne 1f
+-#endif
+-
+- /* Do the system call trap. */
+- mov a1, $P(SOCKOP_,socket)
+- mov a2, sp
+- DO_CALL (socketcall, 0)
+-
+- /* Pop args off the stack */
+- P(POPARGS_,NARGS)
+-
+- /* r0 is < 0 if there was an error. */
+- cmn r0, $124
+- RETINSTR(cc, r14)
+- b PLTJMP(SYSCALL_ERROR)
+-
+-#if defined NEED_CANCELLATION && defined CENABLE
+-1:
+- stmfd sp!, {r7, lr}
+- .save {r7, lr}
+- CENABLE
+- mov ip, r0
+-
+- mov r0, #P(SOCKOP_,socket)
+- add r1, sp, #8
+- mov r7, #SYS_ify(socketcall)
+- swi 0x0
+-
+- mov r7, r0
+- mov r0, ip
+- CDISABLE
+- mov r0, r7
+- ldmfd sp!, {r7, lr}
+-
+- P(POPARGS_,NARGS)
+-
+- /* r0 is < 0 if there was an error. */
+- cmn r0, $124
+- RETINSTR(cc, r14)
+- b PLTJMP(SYSCALL_ERROR)
+-#endif
+-
+- .fnend
+-PSEUDO_END (__socket)
+-
+-#ifndef NO_WEAK_ALIAS
+-weak_alias (__socket, socket)
+-#endif
diff --git a/patches/glibc-ports-2.4/generic/ports-cvs-200607250000.diff b/patches/glibc-ports-2.4/generic/ports-cvs-200607250000.diff
new file mode 100644
index 0000000..a84fbc3
--- /dev/null
+++ b/patches/glibc-ports-2.4/generic/ports-cvs-200607250000.diff
@@ -0,0 +1,10153 @@
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/ChangeLog.arm ports/ChangeLog.arm
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/ChangeLog.arm 2006-03-02 16:23:41.000000000 +0100
++++ ports/ChangeLog.arm 2006-07-24 17:43:02.000000000 +0200
+@@ -1,3 +1,77 @@
++2006-07-24 Daniel Jacobowitz <dan@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/arm/sigaction.c: If WRAPPER_INCLUDE is
++ defined, include the named file.
++
++2006-07-05 Daniel Jacobowitz <dan@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Include
++ <bits/sigcontext.h>.
++ (NGREG, mcontext_t, struct ucontext): Update to match the kernel.
++
++2006-07-05 Daniel Jacobowitz <dan@codesourcery.com>
++
++ * sysdeps/arm/dl-machine.h (elf_machine_dynamic): Correct GOT access to
++ load the _DYNAMIC slot.
++
++2006-06-08 Mark Shinwell <shinwell@codesourcery.com>
++
++ * sysdeps/arm/nptl/pthreaddef.h (CURRENT_STACK_FRAME): Add -12.
++
++2006-06-08 Daniel Jacobowitz <dan@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Reformat.
++ (SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT):
++ Define.
++
++2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
++
++ * sysdeps/arm/initfini.c: New file.
++
++2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
++
++ * sysdeps/arm/dl-machine.h (elf_machine_dynamic): Rewrite to load
++ _GLOBAL_OFFSET_TABLE_ explicitly.
++
++2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/arm/kernel-features.h: Add conditionals
++ for __ASSUME_TRUNCATE64_SYSCALL, __ASSUME_MMAP2_SYSCALL,
++ __ASSUME_STAT64_SYSCALL, __ASSUME_FCNTL64, and
++ __ASSUME_VFORK_SYSCALL.
++
++2006-05-05 Daniel Jacobowitz <dan@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/arm/bits/mman.h: Update error message
++ for consistency with other ports.
++ (MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK): Define.
++
++2006-05-05 Lior Balkohen <balkohen@gmail.com>
++
++ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Remove
++ LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT.
++ Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE
++ and SYNC_FILE_RANGE_WAIT_AFTER.
++ Declare sync_file_range, vmsplice, splice and tee.
++
++2006-03-27 Lior Balkohen <balkohen@gmail.com>
++
++ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define
++ LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT.
++
++2006-03-21 Daniel Jacobowitz <dan@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/arm/eabi/socket.S: Delete.
++ * sysdeps/unix/sysv/linux/arm/eabi/syscalls.list,
++ sysdeps/unix/sysv/linux/arm/kernel-features.h,
++ sysdeps/unix/sysv/linux/arm/eabi/umount.c: New files.
++ * sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h
++ (DOCARGS_6, UNDOCARGS_6, RESTORE_LR_6): Define.
++ * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
++ (DOCARGS_6, UNDOCARGS_6, RESTORE_LR_6): Define.
++ * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h: Undefine
++ __NR_stime and __NR_alarm.
++
+ 2006-03-02 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/ChangeLog.hppa ports/ChangeLog.hppa
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/ChangeLog.hppa 2006-02-28 23:20:13.000000000 +0100
++++ ports/ChangeLog.hppa 2006-07-19 00:46:12.000000000 +0200
+@@ -1,3 +1,182 @@
++2006-07-18 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/hppa/nptl/pthread_spin_lock.c (pthread_spin_lock): Swap
++ newval and oldval.
++ * sysdeps/hppa/nptl/pthread_spin_trylock.c (pthread_spin_trylock):
++ Likewise.
++
++2006-07-16 Jeff Bailey <jbailey@ubuntu.com>
++
++ * sysdeps/hppa/tst-audit.h: New file.
++
++2006-07-16 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/hppa/tls-macros.h: Cleanup formatting.
++
++2006-07-15 Jeff Bailey <jbailey@ubuntu.com>
++
++ * sysdeps/hppa/nptl/tls.h (TLS_INIT_TP): Return NULL.
++
++2006-07-13 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/unix/sysv/linux/hppa/xstat.c: New file.
++ * sysdeps/unix/sysv/linux/hppa/lxstat.c: Likewise.
++ * sysdeps/unix/sysv/linux/hppa/fxstat.c: Likewise.
++ * sysdeps/unix/sysv/linux/hppa/fxstatat.c: Likewise.
++
++2006-07-13 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/hppa/nptl/Makefile: New file
++ * sysdeps/hppa/nptl/jmpbuf-unwind.h: Likewise
++ * sysdeps/hppa/nptl/pthread_spin_lock.c: Likewise
++ * sysdeps/hppa/nptl/pthread_spin_trylock.c: Likewise
++ * sysdeps/hppa/nptl/pthread_spin_unlock.c: Likewise
++ * sysdeps/hppa/nptl/pthreaddef.h: Likewise
++ * sysdeps/hppa/nptl/tcb-offsets.sym: Likewise
++ * sysdeps/hppa/nptl/tls.h: Likewise
++ * sysdeps/unix/sysv/linux/hppa/nptl/bits: Likewise
++ * sysdeps/unix/sysv/linux/hppa/nptl/createthread.c: Likewise
++ * sysdeps/unix/sysv/linux/hppa/nptl/fork.c: Likewise
++ * sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h: Likewise
++ * sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c: Likewise
++ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c: Likewise
++ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Likewise
++ * sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c: Likewise
++ * sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Likewise
++ * sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c: Likewise
++ * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise
++ * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: Likewise
++ * sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Likewise
++
++2006-06-08 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/unix/sysv/linux/hppa/Versions: new errlist compat entry
++ for up to 256 errnos
++
++2006-06-08 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/hppa/hppa1.1/Implies: Remove ieee754/ldbl-128.
++ * sysdeps/unix/sysv/linux/hppa/kernel-features.h
++ [__LINUX_KERNEL_VERSION >= 0x020609]: Define __ASSUME_LWS_CAS.
++ * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: New file.
++
++2006-06-08 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Reformat
++ (SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT):
++ Define.
++
++2006-05-24 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/unix/sysv/linux/hppa/clone.S: .LerrorRest
++ is a label.
++
++2006-05-24 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/hppa/ldsodefs.h: New file.
++ * sysdeps/unix/sysv/linux/hppa/bits/mman.h:
++ Only define MADV_* macros when __USE_BSD is present.
++ (MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK): Define.
++
++2006-05-15 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/unix/sysv/linux/hppa/clone.S: Accept extra arguments
++ required for NPTL.
++ * sysdeps/unix/sysv/linux/hppa/sysdep.c: Use var args for 6 arg
++ syscall.
++ * sysdeps/unix/sysv/linux/hppa/sysdep.h: Move DOARGS and UNDOARGS
++ into PSEUDO_*'s.
++ (ENTRY_LEAF): Define.
++ (PSEUDO_NOERRNO, PSEUDO_ERRVAL): Use ENTRY_LEAF.
++ (DO_CALL): Create frame.
++
++2006-05-15 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/hppa/dl-machine.h: Include tls.h
++ (elf_machine_fixup_plt): Returns fdesc.
++ (elf_machine_profile_fixup_plt): Remove.
++ (elf_machine_plt_value): Returns fdesc.
++ (elf_machine_runtime_setup): Check that dl_profile != NULL.
++ (ARCH_LA_PLTENT, ARCH_LA_PLTEXIT): Define.
++ (RTLD_START): Use iitlbp with sr0.
++ (elf_machine_type_class): Include TLS relocs.
++ (reassemble_21, reassemble_14): Define.
++ (elf_machine_rela): Add DIR21L, DIR14R, PLABEL21L, PLABEL14R,
++ TLS_DTPMOD32, TLS_TPREL32, TLS_DTPOFF32 support.
++ (TRAMPOLINE_TEMPLATE): Move to ...
++ * sysdeps/hppa/dl-trampoline.S: ... here.
++ * sysdeps/hppa/abort-instr.h: Use iitlbp with sr0.
++ * sysdeps/hppa/dl-lookupcfg.h: Inlcude dl-fptr.h.
++ (DL_FIXUP_VALUE_TYPE, DL_FIXUP_MAKE_VALUE, DL_FIXUP_VALUE_CODE_ADDR,
++ DL_FIXUP_VALUE_ADD, DL_FIXUP_ADDR_VALUE): Define.
++ * sysdeps/hppa/sysdep.h: Use "!" as a separator. Cleanup comments.
++ * sysdeps/hppa/bits/link.h (La_hppa_regs, La_hppa_retval): Define.
++ Define prototypes for la_hppa_gnu_pltenter and la_hppa_gnu_pltexit.
++
++2006-04-27 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Include uio.h, and
++ define vmsplice.
++
++2006-04-21 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/hppa/dl-tls.h: New file
++ * sysdeps/hppa/libc-tls.c: Likewise.
++ * sysdeps/hppa/tls-macros.h: Likewise.
++ * sysdeps/hppa/elf/configure: Likewise.
++ * sysdeps/hppa/elf/configure.in: Likewise.
++
++2006-04-20 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/hppa/fpu/fclrexcpt.c (feclearexcept): Use union to
++ align parameters. Specify memory clobbers.
++ * sysdeps/hppa/fpu/fedisblxcpt.c (fedisableexcept): Likewise.
++ * sysdeps/hppa/fpu/feenablxcpt.c (feenableexcept): Likewise.
++ * sysdeps/hppa/fpu/fegetenv.c (fegetenv): Do not save exception
++ register. Use memcpy to align buffer.
++ * sysdeps/hppa/fpu/fegetexcept.c (fegetexcept): Store and reload
++ fr0. Use union to align parameters.
++ * sysdeps/hppa/fpu/fegetround.c (fegetround): Likewise.
++ * sysdeps/hppa/fpu/feholdexcpt.c (feholdexcept): Do not save
++ exception registers. Define libm_hidden_def.
++ * sysdeps/hppa/fpu/fesetenv.c (fesetenv): Do not save exception
++ registers.
++ * sysdeps/hppa/fpu/fesetround.c (fesetround): Use union to
++ align parameters, speficy memory clobbers. Define libm_hidde_def
++ * sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Use union to align
++ parameters. Use memcpy to align buffer.
++ * sysdeps/hppa/fpu/fgetexcptflg.c (fegetexceptflag): Likewise.
++ * sysdeps/hppa/fpu/fsetexcptflg.c (fesetexceptflag): Likewise.
++ * sysdeps/hppa/fpu/ftestexcept.c (fetestexcept): Likewise.
++ * sysdeps/hppa/fpu/libm-test-ulps: Update.
++ * sysdeps/hppa/fpu/bits/fenv.h: Add ABI comments.
++
++2006-04-19 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_GNU]:
++ Define MMAP_FIXED.
++ * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_GNU]:
++ Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE,
++ SYNC_FILE_RANGE_WAIT_AFTER, sync_file_range, splice, tee.
++
++2006-04-19 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/unix/sysv/linux/hppa/kernel-features.h: New file.
++
++2006-04-19 Carlos O'Donell <carlos@systemhalted.org>
++
++ * sysdeps/hppa/linuxthreads/pspinlock.c: New file.
++ * sysdeps/hppa/linuxthreads/pt-machine.h: Likewise.
++ * sysdeps/hppa/linuxthreads/tls.h: Likewise.
++ * sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c: Likewise.
++ * sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h:
++ Likewise.
++ * sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c: Likewise.
++ * sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h: Likewise.
++ * sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h: Likewise.
++ * sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h:
++ Likewise.
++
+ 2006-02-28 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/hppa/shlib-versions: New file.
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/ChangeLog.mips ports/ChangeLog.mips
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/ChangeLog.mips 2006-03-03 02:16:30.000000000 +0100
++++ ports/ChangeLog.mips 2006-07-24 17:51:49.000000000 +0200
+@@ -1,3 +1,115 @@
++2006-07-24 Joseph Myers <joseph@codesourcery.com>
++
++ * sysdeps/mips/mips64/n32/libm-test-ulps,
++ sysdeps/mips/mips64/n64/libm-test-ulps: New.
++
++2006-07-24 Joseph Myers <joseph@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/mips/sigaction.c: If WRAPPER_INCLUDE is
++ defined, include the named file.
++
++2006-06-08 Daniel Jacobowitz <dan@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Reformat.
++ (SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT):
++ Define.
++
++2006-06-02 Joseph Myers <joseph@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIM_INFINITY,
++ RLIM64_INFINITY): Define appropriately for N64. Use unsigned
++ types.
++
++2006-06-02 Joseph Myers <joseph@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/mips/kernel_stat.h (struct kernel_stat):
++ Don't use struct timespec.
++ * sysdeps/unix/sysv/linux/mips/xstatconv.c (__xstat_conv,
++ __xstat64_conv): Copy individual timespec fields.
++
++2006-06-02 Richard Sandiford <richard@codesourcery.com>
++
++ * sysdeps/mips/Makefile (ASFLAGS-.os): Define.
++
++2006-06-02 Joseph Myers <joseph@codesourcery.com>
++
++ * sysdeps/mips/fpu/feholdexcpt.c: Add libm_hidden_def.
++ * sysdeps/mips/fpu/fesetround.c: Likewise.
++
++2006-05-10 Richard Sandiford <richard@codesourcery.com>
++ Daniel Jacobowitz <dan@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/mips/register-dump.h (register_dump): Don't
++ dump sc_cause, sc_status or sc_badvaddr.
++ * sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: Rewrite. Update
++ structure definitions after DSP kernel changes.
++ * sysdeps/unix/sysv/linux/mips/sys/ucontext.h (mcontext_t): Update
++ after the same DSP changes.
++
++2006-05-08 Richard Sandiford <richard@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/mips/bits/stat.h (struct stat): Add
++ st_atim, st_mtim and st_ctim interface.
++ (struct stat64): Likewise.
++ * sysdeps/unix/sysv/linux/mips/kernel_stat.h (struct kernel_stat):
++ Replace st_atime and its padding field with st_atim. Likewise
++ st_mtime/st_mtim and st_ctime/st_ctim.
++ * sysdeps/unix/sysv/linux/mips/xstatconv.c (__xstat_conv): Update
++ after above changes.
++ (__xstat64_conv): Likewise.
++
++2006-05-08 Richard Sandiford <richard@codesourcery.com>
++
++ * sysdeps/mips/ldsodefs.h: New file.
++ * sysdeps/mips/tst-audit.h: New file.
++
++2006-05-05 Daniel Jacobowitz <dan@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/mips/bits/mman.h: Formatting changes
++ for consistency with other ports.
++ (MADV_REMOVE): Correct value.
++ (MADV_DONTFORK, MADV_DOFORK, POSIX_MADV_NORMAL,
++ POSIX_MADV_RANDOM, POSIX_MADV_SEQUENTIAL, POSIX_MADV_WILLNEED,
++ POSIX_MADV_DONTNEED): Define.
++
++2006-05-05 Lior Balkohen <balkohen@gmail.com>
++
++ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Remove
++ LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT.
++ Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE
++ and SYNC_FILE_RANGE_WAIT_AFTER.
++ Declare sync_file_range, vmsplice, splice and tee.
++
++2006-03-27 Lior Balkohen <balkohen@gmail.com>
++
++ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define
++ LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT. Add readahead
++ prototype.
++
++2006-03-27 Daniel Jacobowitz <dan@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/mips/bits/poll.h (POLLREMOVE, POLLRDHUP):
++ Define.
++
++2006-03-27 Denis Barbier <barbier@linuxfr.org>
++
++ * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIMIT_RTPRIO): Fix
++ typo.
++
++2006-03-11 Daniel Jacobowitz <dan@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/mips/nptl/fork.c: Correct path to
++ i386/fork.c.
++
++2006-03-11 Daniel Jacobowitz <dan@codesourcery.com>
++
++ * sysdeps/unix/sysv/linux/mips/configure.in: Set libc_cv_slibdir,
++ libc_cv_localedir, libdir, arch_minimum_kernel, and
++ libc_cv_gcc_unwind_find_fde.
++ * sysdeps/unix/sysv/linux/mips/mips64/configure.in: New file.
++ * sysdeps/unix/sysv/linux/mips/configure: Regenerated.
++ * sysdeps/unix/sysv/linux/mips/mips64/configure: Generated.
++
+ 2006-03-02 Lior Balkohen <balkohen@gmail.com>
+
+ * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/arm/dl-machine.h ports/sysdeps/arm/dl-machine.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/arm/dl-machine.h 2005-11-16 19:08:52.000000000 +0100
++++ ports/sysdeps/arm/dl-machine.h 2006-07-05 18:46:20.000000000 +0200
+@@ -46,13 +46,19 @@
+
+
+ /* Return the link-time address of _DYNAMIC. Conveniently, this is the
+- first element of the GOT. This must be inlined in a function which
+- uses global data. */
++ first element of the GOT. We used to use the PIC register to do this
++ without a constant pool reference, but GCC 4.2 will use a pseudo-register
++ for the PIC base, so it may not be in r10. */
+ static inline Elf32_Addr __attribute__ ((unused))
+ elf_machine_dynamic (void)
+ {
+- register Elf32_Addr *got asm ("r10");
+- return *got;
++ Elf32_Addr dynamic;
++ asm ("ldr %0, 2f\n"
++ "1: ldr %0, [pc, %0]\n"
++ "b 3f\n"
++ "2: .word _GLOBAL_OFFSET_TABLE_ - (1b+8)\n"
++ "3:" : "=r" (dynamic));
++ return dynamic;
+ }
+
+
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/arm/initfini.c ports/sysdeps/arm/initfini.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/arm/initfini.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/arm/initfini.c 2006-05-30 17:31:04.000000000 +0200
+@@ -0,0 +1,42 @@
++/* Special .init and .fini section support. ARM version.
++ Copyright (C) 2006 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ In addition to the permissions in the GNU Lesser General Public
++ License, the Free Software Foundation gives you unlimited
++ permission to link the compiled version of this file with other
++ programs, and to distribute those programs without any restriction
++ coming from the use of this file. (The GNU Lesser General Public
++ License restrictions do apply in other respects; for example, they
++ cover modification of the file, and distribution when not linked
++ into another program.)
++
++ Note that people who make modified versions of this file are not
++ obligated to grant this special exception for their modified
++ versions; it is their choice whether to do so. The GNU Lesser
++ General Public License gives permission to release a modified
++ version without this exception; this exception also makes it
++ possible to release a modified version which carries forward this
++ exception.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++/* Prevent this function from being inlined. Otherwise half of its
++ constant pool will end up in crti and the other half in crtn. */
++
++static void call_gmon_start (void) __attribute__((noinline));
++
++#include <sysdeps/generic/initfini.c>
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/arm/nptl/pthreaddef.h ports/sysdeps/arm/nptl/pthreaddef.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/arm/nptl/pthreaddef.h 2005-11-16 20:03:42.000000000 +0100
++++ ports/sysdeps/arm/nptl/pthreaddef.h 2006-06-08 19:38:55.000000000 +0200
+@@ -30,8 +30,16 @@
+ #define TCB_ALIGNMENT 16
+
+
+-/* Location of current stack frame. */
+-#define CURRENT_STACK_FRAME __builtin_frame_address (0)
++/* Location of current stack frame.
++
++ __builtin_frame_address (0) returns the value of the hard frame
++ pointer, which will point at the location of the saved PC on the
++ stack. Below this in memory is the remainder of the linkage info,
++ occupying 12 bytes. Therefore in order to address from
++ CURRENT_STACK_FRAME using "struct layout", we need to have the macro
++ return the hard FP minus 12. Of course, this makes no sense
++ without the obsolete APCS stack layout... */
++#define CURRENT_STACK_FRAME (__builtin_frame_address (0) - 12)
+
+
+ /* XXX Until we have a better place keep the definitions here. */
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/abort-instr.h ports/sysdeps/hppa/abort-instr.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/abort-instr.h 2002-09-23 05:30:34.000000000 +0200
++++ ports/sysdeps/hppa/abort-instr.h 2006-05-15 01:54:47.000000000 +0200
+@@ -3,4 +3,4 @@
+ We go with iitlbp because it has a history of being used to crash
+ programs. */
+
+-#define ABORT_INSTRUCTION asm ("iitlbp %r0,(%r0)")
++#define ABORT_INSTRUCTION asm ("iitlbp %r0,(%sr0, %r0)")
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/bits/link.h ports/sysdeps/hppa/bits/link.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/bits/link.h 2005-01-06 23:40:18.000000000 +0100
++++ ports/sysdeps/hppa/bits/link.h 2006-05-15 01:54:47.000000000 +0200
+@@ -0,0 +1,57 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifndef _LINK_H
++# error "Never include <bits/link.h> directly; use <link.h> instead."
++#endif
++
++/* Registers for entry into PLT on hppa. */
++typedef struct La_hppa_regs
++{
++ uint32_t lr_reg[4];
++ double lr_fpreg[4];
++ uint32_t lr_sp;
++ uint32_t lr_ra;
++} La_hppa_regs;
++
++/* Return values for calls from PLT on hppa. */
++typedef struct La_hppa_retval
++{
++ uint32_t lrv_r28;
++ uint32_t lrv_r29;
++ double lr_fr4;
++} La_hppa_retval;
++
++
++__BEGIN_DECLS
++
++extern Elf32_Addr la_hppa_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
++ uintptr_t *__refcook,
++ uintptr_t *__defcook,
++ La_hppa_regs *__regs,
++ unsigned int *__flags,
++ const char *__symname,
++ long int *__framesizep);
++extern unsigned int la_hppa_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
++ uintptr_t *__refcook,
++ uintptr_t *__defcook,
++ const La_hppa_regs *__inregs,
++ La_hppa_retval *__outregs,
++ const char *symname);
++
++__END_DECLS
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/dl-lookupcfg.h ports/sysdeps/hppa/dl-lookupcfg.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/dl-lookupcfg.h 2005-01-06 23:40:18.000000000 +0100
++++ ports/sysdeps/hppa/dl-lookupcfg.h 2006-05-15 01:54:47.000000000 +0200
+@@ -20,6 +20,8 @@
+ #define ELF_FUNCTION_PTR_IS_SPECIAL
+ #define DL_UNMAP_IS_SPECIAL
+
++#include <dl-fptr.h>
++
+ /* Forward declaration. */
+ struct link_map;
+
+@@ -63,3 +65,16 @@
+ ((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr))
+ #define DL_DT_FINI_ADDRESS(map, addr) \
+ ((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr))
++
++/* The type of the return value of fixup/profile_fixup */
++#define DL_FIXUP_VALUE_TYPE struct fdesc
++
++/* Construct a fixup value from the address and linkmap */
++#define DL_FIXUP_MAKE_VALUE(map, addr) \
++ ((struct fdesc) { (addr), (map)->l_info[DT_PLTGOT]->d_un.d_ptr })
++
++/* Extract the code address from a fixup value */
++#define DL_FIXUP_VALUE_CODE_ADDR(value) ((value).ip)
++#define DL_FIXUP_VALUE_ADDR(value) ((uintptr_t) &(value))
++#define DL_FIXUP_ADDR_VALUE(addr) (*(struct fdesc *) (addr))
++
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/dl-machine.h ports/sysdeps/hppa/dl-machine.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/dl-machine.h 2004-11-19 01:01:25.000000000 +0100
++++ ports/sysdeps/hppa/dl-machine.h 2006-05-15 01:54:46.000000000 +0200
+@@ -31,6 +31,7 @@
+ #include <errno.h>
+ #include <dl-fptr.h>
+ #include <abort-instr.h>
++#include <tls.h>
+
+ # define VALID_ELF_OSABI(osabi) ((osabi == ELFOSABI_SYSV) || (osabi == ELFOSABI_LINUX))
+ # define VALID_ELF_ABIVERSION(ver) (ver == 0)
+@@ -116,43 +117,28 @@
+ return dynamic - elf_machine_dynamic ();
+ }
+
+-/* Fixup a PLT entry to bounce directly to the function at VALUE.
+- Optimized non-profile version. */
+-static inline Elf32_Addr
++/* Fixup a PLT entry to bounce directly to the function at VALUE. */
++static inline struct fdesc __attribute__ ((always_inline))
+ elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const Elf32_Rela *reloc,
+- Elf32_Addr *reloc_addr, Elf32_Addr value)
++ Elf32_Addr *reloc_addr, struct fdesc value)
+ {
+ /* map is the link_map for the caller, t is the link_map for the object
+ being called */
+- reloc_addr[1] = D_PTR (t, l_info[DT_PLTGOT]);
+- reloc_addr[0] = value;
+- /* Return the PLT slot rather than the function value so that the
+- trampoline can load the new LTP. */
+- return (Elf32_Addr) reloc_addr;
+-}
+-
+-/* Fixup a PLT entry to bounce directly to the function at VALUE. */
+-#define ELF_MACHINE_PROFILE_FIXUP_PLT elf_machine_profile_fixup_plt
+-static inline Elf32_Addr
+-elf_machine_profile_fixup_plt (struct link_map *map, lookup_t t,
+- const Elf32_Rela *reloc,
+- Elf32_Addr *reloc_addr, Elf32_Addr value)
+-{
+- if(__builtin_expect (t == NULL, 1))
+- return (Elf32_Addr) reloc_addr;
+- /* Return the PLT slot rather than the function value so that the
+- trampoline can load the new LTP. */
+- return (Elf32_Addr) elf_machine_fixup_plt(map, t, reloc, reloc_addr, value);
++ reloc_addr[1] = value.gp;
++ /* Need to ensure that the gp is visible before the code
++ entry point is updated */
++ ((volatile Elf32_Addr *) reloc_addr)[0] = value.ip;
++ return value;
+ }
+
+ /* Return the final value of a plt relocation. */
+-static inline Elf32_Addr
++static inline struct fdesc
+ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
+- Elf32_Addr value)
++ struct fdesc value)
+ {
+- /* We are rela only */
+- return value + reloc->r_addend;
++ /* We are rela only, return a function descriptor as a plt entry. */
++ return (struct fdesc) { value.ip + reloc->r_addend, value.gp };
+ }
+
+ /* Set up the loaded object described by L so its unrelocated PLT
+@@ -181,7 +167,7 @@
+
+ extern void _dl_runtime_resolve (void);
+ extern void _dl_runtime_profile (void);
+-
++
+ /* Linking lazily */
+ if (lazy)
+ {
+@@ -215,9 +201,10 @@
+ {
+ /* Found the GOT! */
+ register Elf32_Addr ltp __asm__ ("%r19");
+- /* Identify this shared object. */
++
++ /* Identify this shared object. Second entry in the got. */
+ got[1] = (Elf32_Addr) l;
+-
++
+ /* This function will be called to perform the relocation. */
+ if (__builtin_expect (!profile, 1))
+ {
+@@ -236,7 +223,8 @@
+ }
+ else
+ {
+- if (_dl_name_match_p (GLRO(dl_profile), l))
++ if (GLRO(dl_profile) != NULL
++ && _dl_name_match_p (GLRO(dl_profile), l))
+ {
+ /* This is the object we are looking for. Say that
+ we really want profiling and the timers are
+@@ -316,6 +304,11 @@
+ return lazy;
+ }
+
++
++/* Names of the architecture-specific auditing callback functions. */
++#define ARCH_LA_PLTENTER hppa_gnu_pltenter
++#define ARCH_LA_PLTEXIT hppa_gnu_pltexit
++
+ /* Initial entry point code for the dynamic linker.
+ The C function `_dl_start' is the real entry point;
+ its return value is the user program's entry point. */
+@@ -367,7 +360,7 @@
+ " ldw,ma 8(%r26),%r19\n" \
+ \
+ /* Uh oh! We didn't find one. Abort. */ \
+-" iitlbp %r0,(%r0)\n" \
++" iitlbp %r0,(%sr0,%r0)\n" \
+ \
+ "2: ldw -4(%r26),%r19\n" /* Found it, load value. */ \
+ " add %r19,%r20,%r19\n" /* And add the load offset. */ \
+@@ -471,85 +464,28 @@
+ " ldw 4(%r3),%r19\n" /* load the object's gp */ \
+ " bv %r0(%r2)\n" \
+ " depi 2,31,2,%r23\n" /* delay slot */ \
+- );
+-
++);
+
+-/* This code gets called via the .plt stub, and is used in
+- dl-runtime.c to call the `fixup' function and then redirect to the
+- address it returns.
+-
+- WARNING: This template is also used by gcc's __cffc, and expects
+- that the "bl" for fixup() exist at a particular offset.
+- Do not change this template without changing gcc, while the prefix
+- "bl" should fix everything so gcc finds the right spot, it will
+- slow down __cffc when it attempts to call fixup to resolve function
+- descriptor references. Please refer to gcc/gcc/config/pa/fptr.c
+-
+- Enter with r19 = reloc offset, r20 = got-8, r21 = fixup ltp. */
+-#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \
+- extern void tramp_name (void); \
+- asm ( \
+- " .text\n" \
+- /* FAKE bl to provide gcc's __cffc with fixup's address */ \
+- " bl " #fixup_name ",%r2\n" /* Runtime address of fixup */ \
+- " .globl " #tramp_name "\n" \
+- " .type " #tramp_name ",@function\n" \
+- #tramp_name ":\n" \
+- " .proc\n" \
+- " .callinfo frame=64,calls,save_rp\n" \
+- " .entry\n" \
+- /* Save return pointer */ \
+- " stw %r2,-20(%sp)\n" \
+- /* Save argument registers in the call stack frame. */ \
+- " stw %r26,-36(%sp)\n" \
+- " stw %r25,-40(%sp)\n" \
+- " stw %r24,-44(%sp)\n" \
+- " stw %r23,-48(%sp)\n" \
+- /* Build a call frame, and save structure pointer. */ \
+- " stwm %r28,64(%sp)\n" \
+- \
+- /* Set up args to fixup func. */ \
+- " ldw 8+4(%r20),%r26\n" /* (1) got[1] == struct link_map */ \
+- " copy %r19,%r25\n" /* (2) reloc offset */ \
+- " copy %r2,%r24\n" /* (3) profile_fixup needs rp */ \
+- \
+- /* Call the real address resolver. */ \
+- " bl " #fixup_name ",%r2\n" \
+- " copy %r21,%r19\n" /* set fixup func ltp (DELAY SLOT)*/ \
+- \
+- " ldw 0(%r28),%r22\n" /* load up the returned func ptr */ \
+- " ldw 4(%r28),%r19\n" \
+- " ldwm -64(%sp),%r28\n" \
+- /* Arguments. */ \
+- " ldw -36(%sp),%r26\n" \
+- " ldw -40(%sp),%r25\n" \
+- " ldw -44(%sp),%r24\n" \
+- " ldw -48(%sp),%r23\n" \
+- /* Call the real function. */ \
+- " bv %r0(%r22)\n" \
+- /* Return pointer. */ \
+- " ldw -20(%sp),%r2\n" \
+- " .exit\n" \
+- " .procend\n");
+-
+-#ifndef PROF
+-#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+- TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \
+- TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup);
+-#else
+-#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+- TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \
+- strong_alias (_dl_runtime_resolve, _dl_runtime_profile);
+-#endif
+-
+-/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+- PLT entries should not be allowed to define the value.
++/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
++ a TLS variable, so references should not be allowed to define the value.
+ ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+ of the main executable's symbols, as for a COPY reloc. */
+-#define elf_machine_type_class(type) \
+- ((((type) == R_PARISC_IPLT || (type) == R_PARISC_EPLT) \
+- * ELF_RTYPE_CLASS_PLT) \
++#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
++# define elf_machine_type_class(type) \
++ ((((type) == R_PARISC_IPLT \
++ || (type) == R_PARISC_EPLT \
++ || (type) == R_PARISC_TLS_DTPMOD32 \
++ || (type) == R_PARISC_TLS_DTPOFF32 \
++ || (type) == R_PARISC_TLS_TPREL32) \
++ * ELF_RTYPE_CLASS_PLT) \
++ | (((type) == R_PARISC_COPY) * ELF_RTYPE_CLASS_COPY))
++#else
++#define elf_machine_type_class(type) \
++ ((((type) == R_PARISC_IPLT \
++ || (type) == R_PARISC_EPLT) \
++ * ELF_RTYPE_CLASS_PLT) \
+ | (((type) == R_PARISC_COPY) * ELF_RTYPE_CLASS_COPY))
++#endif
+
+ /* Used by the runtime in fixup to figure out if reloc is *really* PLT */
+ #define ELF_MACHINE_JMP_SLOT R_PARISC_IPLT
+@@ -579,9 +515,22 @@
+ /* These are only actually used where RESOLVE_MAP is defined, anyway. */
+ #ifdef RESOLVE_MAP
+
++#define reassemble_21(as21) \
++ ( (((as21) & 0x100000) >> 20) \
++ | (((as21) & 0x0ffe00) >> 8) \
++ | (((as21) & 0x000180) << 7) \
++ | (((as21) & 0x00007c) << 14) \
++ | (((as21) & 0x000003) << 12))
++
++#define reassemble_14(as14) \
++ ( (((as14) & 0x1fff) << 1) \
++ | (((as14) & 0x2000) >> 13))
++
+ auto void __attribute__((always_inline))
+-elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
+- const Elf32_Sym *sym, const struct r_found_version *version,
++elf_machine_rela (struct link_map *map,
++ const Elf32_Rela *reloc,
++ const Elf32_Sym *sym,
++ const struct r_found_version *version,
+ void *const reloc_addr_arg)
+ {
+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
+@@ -590,7 +539,7 @@
+ struct link_map *sym_map;
+ Elf32_Addr value;
+
+-# if !defined RTLD_BOOTSTRAP && !defined SHARED
++# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC && !defined SHARED
+ /* This is defined in rtld.c, but nowhere in the static libc.a; make the
+ reference weak so static programs can still link. This declaration
+ cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
+@@ -612,6 +561,7 @@
+ # else
+ sym_map = RESOLVE_MAP (&sym, version, r_type);
+ # endif
++
+ if (sym_map)
+ {
+ value = sym ? sym_map->l_addr + sym->st_value : 0;
+@@ -635,6 +585,27 @@
+ }
+ break;
+
++ case R_PARISC_DIR21L:
++ {
++ unsigned int insn = *(unsigned int *)reloc_addr;
++ value = sym_map->l_addr + sym->st_value
++ + ((reloc->r_addend + 0x1000) & -0x2000);
++ value = value >> 11;
++ insn = (insn &~ 0x1fffff) | reassemble_21 (value);
++ *(unsigned int *)reloc_addr = insn;
++ }
++ return;
++
++ case R_PARISC_DIR14R:
++ {
++ unsigned int insn = *(unsigned int *)reloc_addr;
++ value = ((sym_map->l_addr + sym->st_value) & 0x7ff)
++ + (((reloc->r_addend & 0x1fff) ^ 0x1000) - 0x1000);
++ insn = (insn &~ 0x3fff) | reassemble_14 (value);
++ *(unsigned int *)reloc_addr = insn;
++ }
++ return;
++
+ case R_PARISC_PLABEL32:
+ /* Easy rule: If there is a symbol and it is global, then we
+ need to make a dynamic function descriptor. Otherwise we
+@@ -653,15 +624,42 @@
+ value = (Elf32_Addr)((unsigned int)_dl_make_fptr (sym_map, sym, value) | 2);
+ break;
+
++ case R_PARISC_PLABEL21L:
++ case R_PARISC_PLABEL14R:
++ {
++ unsigned int insn = *(unsigned int *)reloc_addr;
++
++ if (__builtin_expect (sym == NULL, 0))
++ break;
++
++ value = (Elf32_Addr)((unsigned int)_dl_make_fptr (sym_map, sym, value) | 2);
++
++ if (r_type == R_PARISC_PLABEL21L)
++ {
++ value >>= 11;
++ insn = (insn &~ 0x1fffff) | reassemble_21 (value);
++ }
++ else
++ {
++ value &= 0x7ff;
++ insn = (insn &~ 0x3fff) | reassemble_14 (value);
++ }
++
++ *(unsigned int *)reloc_addr = insn;
++ }
++ return;
++
+ case R_PARISC_IPLT:
+ if (__builtin_expect (sym_map != NULL, 1))
+ {
+- elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr, value);
++ elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr,
++ DL_FIXUP_MAKE_VALUE(sym_map, value));
+ }
+ else
+ {
+ /* If we get here, it's a (weak) undefined sym. */
+- elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, value);
++ elf_machine_fixup_plt (NULL, map, reloc, reloc_addr,
++ DL_FIXUP_MAKE_VALUE(map, value));
+ }
+ return;
+
+@@ -685,6 +683,28 @@
+ memcpy (reloc_addr_arg, (void *) value,
+ MIN (sym->st_size, refsym->st_size));
+ return;
++
++#if defined USE_TLS && (!defined RTLD_BOOTSTRAP)
++ case R_PARISC_TLS_DTPMOD32:
++ value = sym_map->l_tls_modid;
++ break;
++
++ case R_PARISC_TLS_DTPOFF32:
++ /* During relocation all TLS symbols are defined and used.
++ Therefore the offset is already correct. */
++ if (sym != NULL)
++ *reloc_addr = sym->st_value;
++ return;
++
++ case R_PARISC_TLS_TPREL32:
++ /* The offset is negative, forward from the thread pointer */
++ if (sym != NULL)
++ {
++ CHECK_STATIC_TLS (map, sym_map);
++ value = sym_map->l_tls_offset + sym->st_value + reloc->r_addend;
++ }
++ break;
++#endif /* use TLS */
+
+ case R_PARISC_NONE: /* Alright, Wilbur. */
+ return;
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/dl-tls.h ports/sysdeps/hppa/dl-tls.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/dl-tls.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/dl-tls.h 2006-04-22 04:21:00.000000000 +0200
+@@ -0,0 +1,29 @@
++/* Thread-local storage handling in the ELF dynamic linker. hppa version.
++ Copyright (C) 2003 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++
++/* Type used for the representation of TLS information in the GOT. */
++typedef struct
++{
++ unsigned long int ti_module;
++ unsigned long int ti_offset;
++} tls_index;
++
++
++extern void *__tls_get_addr (tls_index *ti);
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/dl-trampoline.S ports/sysdeps/hppa/dl-trampoline.S
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/dl-trampoline.S 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/dl-trampoline.S 2006-05-15 01:54:47.000000000 +0200
+@@ -0,0 +1,197 @@
++/* PLT trampolines. hppa version.
++ Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <sysdep.h>
++
++/* This code gets called via the .plt stub, and is used in
++ dl-runtime.c to call the `_dl_fixup' function and then redirect
++ to the address it returns. `_dl_fixup' takes two
++ arguments, however `_dl_profile_fixup' takes a number of
++ parameters for use with library auditing (LA).
++
++ WARNING: This template is also used by gcc's __cffc, and expects
++ that the "bl" for _dl_runtime_resolve exist at a particular offset.
++ Do not change this template without changing gcc, while the prefix
++ "bl" should fix everything so gcc finds the right spot, it will
++ slow down __cffc when it attempts to call fixup to resolve function
++ descriptor references. Please refer to gcc/gcc/config/pa/fptr.c
++
++ Enter with r19 = reloc offset, r20 = got-8, r21 = fixup ltp. */
++
++ /* FAKE bl to provide gcc's __cffc with fixup loc. */
++ .text
++ bl _dl_fixup, %r2
++ .text
++ .align 4
++ .global _dl_runtime_resolve
++ .type _dl_runtime_resolve,@function
++_dl_runtime_resolve:
++ .PROC
++ .CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=3
++ .ENTRY
++ /* SAVE_RP says we do */
++ stw %rp, -20(%sp)
++
++ /* Save static link register */
++ stw %r29,-16(%sp)
++ /* Save argument registers in the call stack frame. */
++ stw %r26,-36(%sp)
++ stw %r25,-40(%sp)
++ stw %r24,-44(%sp)
++ stw %r23,-48(%sp)
++
++ /* Build a call frame, and save structure pointer. */
++ copy %sp, %r26 /* Copy previous sp */
++ /* Save function result address (on entry) */
++ stwm %r28,128(%sp)
++
++ /* Save floating point argument registers */
++ ldo -56(%sp),%r26
++ fstd,ma %fr4,-8(%r26)
++ fstd,ma %fr5,-8(%r26)
++ fstd,ma %fr6,-8(%r26)
++ fstd %fr7,0(%r26)
++
++ /* Fillin some frame info to follow ABI */
++ stw %r21,-32(%sp) /* PIC register value */
++ stw %r26,-4(%sp) /* Previous sp */
++
++ /* Set up args to fixup func, needs only two arguments */
++ ldw 8+4(%r20),%r26 /* (1) got[1] == struct link_map */
++ copy %r19,%r25 /* (2) reloc offset */
++
++ /* Call the real address resolver. */
++ bl _dl_fixup,%rp
++ copy %r21,%r19 /* set fixup func ltp */
++
++ /* Load up the returned func descriptor */
++ copy %ret0, %r22
++ copy %ret1, %r19
++
++ /* Reload arguments fp args */
++ ldo -80(%sp),%r26
++ fldd,ma 8(%r26),%fr7
++ fldd,ma 8(%r26),%fr6
++ fldd,ma 8(%r26),%fr5
++ fldd 0(%r26),%fr4
++
++ /* Adjust sp, and restore function result address*/
++ ldwm -128(%sp),%r28
++
++ /* Reload static link register */
++ ldw -16(%sp),%r29
++ /* Reload general args */
++ ldw -36(%sp),%r26
++ ldw -40(%sp),%r25
++ ldw -44(%sp),%r24
++ ldw -48(%sp),%r23
++
++ /* Jump to new function, but return to previous function */
++ bv %r0(%r22)
++ ldw -20(%sp),%rp
++ .EXIT
++ .PROCEND
++ .size _dl_runtime_resolve, . - _dl_runtime_resolve
++
++
++ /* FIXME:
++ Need to largely rewrite the bottom half of
++ this code in order to save and restore the
++ LA struct from the stack along with
++ interpreted parameters.
++ */
++ .text
++ .align 4
++ .global _dl_runtime_profile
++ .type _dl_runtime_profile,@function
++_dl_runtime_profile:
++ .PROC
++ .CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=3
++ .ENTRY
++
++ /* SAVE_RP says we do */
++ stw %rp, -20(%sp)
++
++ /* Save static link register */
++ stw %r29,-16(%sp)
++ /* Save argument registers in the call stack frame. */
++ stw %r26,-36(%sp)
++ stw %r25,-40(%sp)
++ stw %r24,-44(%sp)
++ stw %r23,-48(%sp)
++
++ /* Build a call frame, and save structure pointer. */
++ copy %sp, %r26 /* Copy previous sp */
++ /* Save function result address (on entry) */
++ stwm %r28,128(%sp)
++
++ /* Save floating point argument registers */
++ ldo -56(%sp),%r26
++ fstd,ma %fr4,-8(%r26)
++ fstd,ma %fr5,-8(%r26)
++ fstd,ma %fr6,-8(%r26)
++ fstd %fr7,0(%r26)
++
++ /* Fillin some frame info to follow ABI */
++ stw %r21,-32(%sp) /* PIC register value */
++ stw %r26,-4(%sp) /* Previous sp */
++
++ /* Set up args to fixup func, needs five arguments */
++ ldw 8+4(%r20),%r26 /* (1) got[1] == struct link_map */
++ copy %r19,%r25 /* (2) reloc offset */
++ copy %rp,%r24 /* (3) profile_fixup needs rp */
++ copy %r0,%r23 /* (4) regs */
++ ldo -56(%sp), %r1
++ stw %r1, -52(%sp) /* (5) long int *framesizep */
++
++ /* Call the real address resolver. */
++ bl _dl_profile_fixup,%rp
++ copy %r21,%r19 /* set fixup func ltp */
++
++ /* Load up the returned func descriptor */
++ copy %ret0, %r22
++ copy %ret1, %r19
++
++ /* Reload arguments fp args */
++ ldo -80(%sp),%r26
++ fldd,ma 8(%r26),%fr7
++ fldd,ma 8(%r26),%fr6
++ fldd,ma 8(%r26),%fr5
++ fldd 0(%r26),%fr4
++
++ /* Adjust sp, and restore function result address*/
++ ldwm -128(%sp),%r28
++
++ /* Reload static link register */
++ ldw -16(%sp),%r29
++ /* Reload general args */
++ ldw -36(%sp),%r26
++ ldw -40(%sp),%r25
++ ldw -44(%sp),%r24
++ ldw -48(%sp),%r23
++
++ /* Jump to new function, but return to previous function */
++ bv %r0(%r22)
++ ldw -20(%sp),%rp
++ .EXIT
++ .PROCEND
++ .size _dl_runtime_profile, . - _dl_runtime_profile
++
++
++
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/elf/configure ports/sysdeps/hppa/elf/configure
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/elf/configure 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/elf/configure 2006-04-22 04:21:00.000000000 +0200
+@@ -0,0 +1,63 @@
++# This file is generated from configure.in by Autoconf. DO NOT EDIT!
++ # Local configure fragment for sysdeps/hppa/elf.
++
++if test "$usetls" != no; then
++# Check for support of thread-local storage handling in assembler and
++# linker.
++echo "$as_me:$LINENO: checking for hppa TLS support" >&5
++echo $ECHO_N "checking for hppa TLS support... $ECHO_C" >&6
++if test "${libc_cv_hppa_tls+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat > conftest.s <<\EOF
++; Setup tls data
++.section ".tdata","awT",@progbits
++foo: .data 32
++ .text
++; Test general dyanmic relocations
++test0:
++ addil LT'foo-$tls_gdidx$, %r19
++ ldo RT'foo-$tls_gdidx$(%r1), %r26
++ b __tls_get_addr
++ nop
++; Test local dynamic relocations
++test1:
++ addil LT'foo-$tls_ldidx$, %r19
++ b __tls_get_addr
++ ldo RT'foo-$tls_ldidx$(%r1), %r26
++ ldo RR'foo-$tls_dtpoff$(%r1), %r25
++ ; More variables can be loaded...
++; Test initial exec reloctiosn
++test2:
++ mfctl %cr27, %r26
++ addil LT'foo-$tls_ieoff$, %r19
++ ldw RT'foo-$tls_ieoff$(%r1), %r25
++ add %r26, %r25, %r24
++; Test local exec relocations
++test3:
++ mfctl %cr27, %r26
++ addil LR'foo-$tls_leoff$, %r26
++ ldo RR'foo-$tls_leoff$(%r1), %r25
++; Done all the TLS tests.
++EOF
++if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ libc_cv_hppa_tls=yes
++else
++ libc_cv_hppa_tls=no
++fi
++rm -f conftest*
++fi
++echo "$as_me:$LINENO: result: $libc_cv_hppa_tls" >&5
++echo "${ECHO_T}$libc_cv_hppa_tls" >&6
++if test $libc_cv_hppa_tls = yes; then
++ cat >>confdefs.h <<\_ACEOF
++#define HAVE_TLS_SUPPORT 1
++_ACEOF
++
++fi
++fi
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/elf/configure.in ports/sysdeps/hppa/elf/configure.in
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/elf/configure.in 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/elf/configure.in 2006-04-22 04:21:00.000000000 +0200
+@@ -0,0 +1,49 @@
++GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
++# Local configure fragment for sysdeps/hppa/elf.
++
++if test "$usetls" != no; then
++# Check for support of thread-local storage handling in assembler and
++# linker.
++AC_CACHE_CHECK(for hppa TLS support, libc_cv_hppa_tls, [dnl
++cat > conftest.s <<\EOF
++; Setup tls data
++.section ".tdata","awT",@progbits
++foo: .data 32
++ .text
++; Test general dyanmic relocations
++test0:
++ addil LT'foo-$tls_gdidx$, %r19
++ ldo RT'foo-$tls_gdidx$(%r1), %r26
++ b __tls_get_addr
++ nop
++; Test local dynamic relocations
++test1:
++ addil LT'foo-$tls_ldidx$, %r19
++ b __tls_get_addr
++ ldo RT'foo-$tls_ldidx$(%r1), %r26
++ ldo RR'foo-$tls_dtpoff$(%r1), %r25
++ ; More variables can be loaded...
++; Test initial exec reloctiosn
++test2:
++ mfctl %cr27, %r26
++ addil LT'foo-$tls_ieoff$, %r19
++ ldw RT'foo-$tls_ieoff$(%r1), %r25
++ add %r26, %r25, %r24
++; Test local exec relocations
++test3:
++ mfctl %cr27, %r26
++ addil LR'foo-$tls_leoff$, %r26
++ ldo RR'foo-$tls_leoff$(%r1), %r25
++; Done all the TLS tests.
++EOF
++dnl
++if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
++ libc_cv_hppa_tls=yes
++else
++ libc_cv_hppa_tls=no
++fi
++rm -f conftest*])
++if test $libc_cv_hppa_tls = yes; then
++ AC_DEFINE(HAVE_TLS_SUPPORT)
++fi
++fi
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/bits/fenv.h ports/sysdeps/hppa/fpu/bits/fenv.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/bits/fenv.h 2001-07-06 06:55:52.000000000 +0200
++++ ports/sysdeps/hppa/fpu/bits/fenv.h 2006-04-21 02:27:20.000000000 +0200
+@@ -62,7 +62,12 @@
+
+ /* Type representing floating-point environment. This structure
+ corresponds to the layout of the status and exception words in the
+- register file. */
++ register file. The exception registers are never saved/stored by
++ userspace. This structure is also not correctly aligned ever, in
++ an ABI error we left out __aligned(8) and subsequently all of our
++ fenv functions must accept unaligned input, align the input, and
++ then use assembly to store fr0. This is a performance hit, but
++ means the ABI is stable. */
+ typedef struct
+ {
+ unsigned int __status_word;
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fclrexcpt.c ports/sysdeps/hppa/fpu/fclrexcpt.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fclrexcpt.c 2003-12-18 04:56:15.000000000 +0100
++++ ports/sysdeps/hppa/fpu/fclrexcpt.c 2006-04-21 02:27:20.000000000 +0200
+@@ -23,14 +23,13 @@
+ int
+ feclearexcept (int excepts)
+ {
+- unsigned int sw[2];
++ union { unsigned long long l; unsigned int sw[2]; } s;
+
+ /* Get the current status word. */
+- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+-
++ __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0");
+ /* Clear all the relevant bits. */
+- sw[0] &= ~((excepts & FE_ALL_EXCEPT) << 27);
+- __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
++ s.sw[0] &= ~((excepts & FE_ALL_EXCEPT) << 27);
++ __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0");
+
+ /* Success. */
+ return 0;
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fedisblxcpt.c ports/sysdeps/hppa/fpu/fedisblxcpt.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fedisblxcpt.c 2001-07-06 06:55:52.000000000 +0200
++++ ports/sysdeps/hppa/fpu/fedisblxcpt.c 2006-04-21 02:27:20.000000000 +0200
+@@ -23,15 +23,16 @@
+ int
+ fedisableexcept (int excepts)
+ {
+- unsigned int sw[2], old_exc;
++ union { unsigned long long l; unsigned int sw[2]; } s;
++ unsigned int old_exc;
+
+ /* Get the current status word. */
+- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
++ __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0");
+
+- old_exc = sw[0] & FE_ALL_EXCEPT;
++ old_exc = s.sw[0] & FE_ALL_EXCEPT;
+
+- sw[0] &= ~(excepts & FE_ALL_EXCEPT);
+- __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
++ s.sw[0] &= ~(excepts & FE_ALL_EXCEPT);
++ __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0");
+
+ return old_exc;
+ }
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/feenablxcpt.c ports/sysdeps/hppa/fpu/feenablxcpt.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/feenablxcpt.c 2001-07-06 06:55:52.000000000 +0200
++++ ports/sysdeps/hppa/fpu/feenablxcpt.c 2006-04-21 02:27:20.000000000 +0200
+@@ -23,15 +23,16 @@
+ int
+ feenableexcept (int excepts)
+ {
+- unsigned int sw[2], old_exc;
++ union { unsigned long long l; unsigned int sw[2]; } s;
++ unsigned int old_exc;
+
+ /* Get the current status word. */
+- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
++ __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0");
+
+- old_exc = sw[0] & FE_ALL_EXCEPT;
++ old_exc = s.sw[0] & FE_ALL_EXCEPT;
+
+- sw[0] |= (excepts & FE_ALL_EXCEPT);
+- __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
++ s.sw[0] |= (excepts & FE_ALL_EXCEPT);
++ __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0");
+
+ return old_exc;
+ }
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fegetenv.c ports/sysdeps/hppa/fpu/fegetenv.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fegetenv.c 2003-12-18 04:56:50.000000000 +0100
++++ ports/sysdeps/hppa/fpu/fegetenv.c 2006-04-21 02:27:20.000000000 +0200
+@@ -19,15 +19,17 @@
+ 02111-1307 USA. */
+
+ #include <fenv.h>
++#include <string.h>
+
+ int
+ fegetenv (fenv_t *envp)
+ {
++ unsigned long long buf[4], *bufptr = buf;
++
+ __asm__ (
+- "fstd,ma %%fr0,8(%1)\n"
+- "fstd,ma %%fr1,8(%1)\n"
+- "fstd,ma %%fr2,8(%1)\n"
+- "fstd %%fr3,0(%1)\n"
+- : "=m" (*envp), "+r" (envp));
++ "fstd,ma %%fr0,8(%1) \n\t"
++ "fldd -8(%1),%%fr0 \n\t"
++ : "=m" (buf), "+r" (bufptr) : : "%r0");
++ memcpy(envp, buf, sizeof (*envp));
+ return 0;
+ }
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fegetexcept.c ports/sysdeps/hppa/fpu/fegetexcept.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fegetexcept.c 2001-07-06 06:55:52.000000000 +0200
++++ ports/sysdeps/hppa/fpu/fegetexcept.c 2006-04-21 02:27:20.000000000 +0200
+@@ -23,10 +23,12 @@
+ int
+ fegetexcept (void)
+ {
+- unsigned int sw[2];
++ union { unsigned long long l; unsigned int sw[2] } s;
+
+ /* Get the current status word. */
+- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
++ __asm__ ("fstd %%fr0,0(%1) \n\t"
++ "fldd 0(%1),%%fr0 \n\t"
++ : "=m" (s.l) : "r" (&s.l) : "%r0");
+
+- return sw[0] & FE_ALL_EXCEPT;
++ return (s.sw[0] & FE_ALL_EXCEPT);
+ }
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fegetround.c ports/sysdeps/hppa/fpu/fegetround.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fegetround.c 2001-07-06 06:55:52.000000000 +0200
++++ ports/sysdeps/hppa/fpu/fegetround.c 2006-04-21 02:27:20.000000000 +0200
+@@ -23,10 +23,12 @@
+ int
+ fegetround (void)
+ {
+- unsigned int sw[2];
++ union { unsigned long long l; unsigned int sw[2] } s;
+
+ /* Get the current status word. */
+- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
++ __asm__ ("fstd %%fr0,0(%1) \n\t"
++ "fldd 0(%1),%%fr0 \n\t"
++ : "=m" (s.l) : "r" (&s.l));
+
+- return sw[0] & FE_DOWNWARD;
++ return (s.sw[0] & FE_DOWNWARD);
+ }
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/feholdexcpt.c ports/sysdeps/hppa/fpu/feholdexcpt.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/feholdexcpt.c 2004-02-21 03:10:01.000000000 +0100
++++ ports/sysdeps/hppa/fpu/feholdexcpt.c 2006-04-21 02:27:20.000000000 +0200
+@@ -24,33 +24,32 @@
+ int
+ feholdexcept (fenv_t *envp)
+ {
+- fenv_t clear;
+- fenv_t * _regs = envp;
++ union { unsigned long long buf[4]; fenv_t env; } clear;
++ unsigned long long *bufptr;
+
+ /* Store the environment. */
++ bufptr = clear.buf;
+ __asm__ (
+ "fstd,ma %%fr0,8(%1)\n"
+- "fstd,ma %%fr1,8(%1)\n"
+- "fstd,ma %%fr2,8(%1)\n"
+- "fstd %%fr3,0(%1)\n"
+- : "=m" (*_regs), "+r" (_regs));
+- memcpy (&clear, envp, sizeof (clear));
+-
+- /* Now clear all exceptions. */
+- clear.__status_word &= ~(FE_ALL_EXCEPT << 27);
+- memset (clear.__exception, 0, sizeof (clear.__exception));
++ : "=m" (clear), "+r" (bufptr) : : "%r0");
++ memcpy (envp, &clear.env, sizeof (fenv_t));
+
++ /* Clear exception queues */
++ memset (clear.env.__exception, 0, sizeof (clear.env.__exception));
+ /* And set all exceptions to non-stop. */
+- clear.__status_word &= ~FE_ALL_EXCEPT;
++ clear.env.__status_word &= ~FE_ALL_EXCEPT;
++ /* Now clear all flags */
++ clear.env.__status_word &= ~(FE_ALL_EXCEPT << 27);
+
+- /* Load the new environment. */
+- _regs = &clear;
++ /* Load the new environment. Note: fr0 must load last to enable T-bit
++ Thus we start bufptr at the end and work backwards */
++ bufptr = (unsigned int)(clear.buf) + sizeof(unsigned int)*4;
+ __asm__ (
+- "fldd,ma 8(%0),%%fr0\n"
+- "fldd,ma 8(%0),%%fr1\n"
+- "fldd,ma 8(%0),%%fr2\n"
+- "fldd 0(%0),%%fr3\n"
+- : : "r" (_regs));
++ "fldd,mb -8(%0),%%fr0\n"
++ : : "r" (bufptr), "m" (clear) : "%r0");
+
+ return 0;
+ }
++
++libm_hidden_def (feholdexcept)
++
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fesetenv.c ports/sysdeps/hppa/fpu/fesetenv.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fesetenv.c 2003-12-18 04:57:31.000000000 +0100
++++ ports/sysdeps/hppa/fpu/fesetenv.c 2006-04-21 02:27:20.000000000 +0200
+@@ -25,40 +25,38 @@
+ int
+ fesetenv (const fenv_t *envp)
+ {
+- fenv_t temp;
+- fenv_t * _regs = &temp;
++ union { unsigned long long buf[4]; fenv_t env; } temp;
++ unsigned long long *bufptr;
+
+ /* Install the environment specified by ENVP. But there are a few
+ values which we do not want to come from the saved environment.
+ Therefore, we get the current environment and replace the values
+ we want to use from the environment specified by the parameter. */
++ bufptr = temp.buf;
+ __asm__ (
+ "fstd,ma %%fr0,8(%1)\n"
+- "fstd,ma %%fr1,8(%1)\n"
+- "fstd,ma %%fr2,8(%1)\n"
+- "fstd %%fr3,0(%1)\n"
+- : "=m" (*_regs), "+r" (_regs));
++ : "=m" (temp), "+r" (bufptr) : : "%r0");
+
+- temp.__status_word &= ~(FE_ALL_EXCEPT
+- | (FE_ALL_EXCEPT << 27)
+- | FE_DOWNWARD);
++ temp.env.__status_word &= ~(FE_ALL_EXCEPT
++ | (FE_ALL_EXCEPT << 27)
++ | FE_DOWNWARD);
+ if (envp == FE_DFL_ENV)
+ ;
+ else if (envp == FE_NOMASK_ENV)
+- temp.__status_word |= FE_ALL_EXCEPT;
++ temp.env.__status_word |= FE_ALL_EXCEPT;
+ else
+- temp.__status_word |= (envp->__status_word
+- & (FE_ALL_EXCEPT
+- | FE_DOWNWARD
+- | (FE_ALL_EXCEPT << 27)));
++ temp.env.__status_word |= (envp->__status_word
++ & (FE_ALL_EXCEPT
++ | FE_DOWNWARD
++ | (FE_ALL_EXCEPT << 27)));
+
+- /* Load the new environment. */
++ /* Load the new environment. We use bufptr again since the
++ initial asm has modified the value of the register and here
++ we take advantage of that to load in reverse order so fr0
++ is loaded last and T-Bit is enabled. */
+ __asm__ (
+- "fldd,ma -8(%1),%%fr3\n"
+- "fldd,ma -8(%1),%%fr2\n"
+- "fldd,ma -8(%1),%%fr1\n"
+- "fldd 0(%1),%%fr0\n"
+- : "=m" (*_regs), "+r" (_regs));
++ "fldd,mb -8(%1),%%fr0\n"
++ : "=m" (temp), "+r" (bufptr) : : "%r0" );
+
+ /* Success. */
+ return 0;
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fesetround.c ports/sysdeps/hppa/fpu/fesetround.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fesetround.c 2002-12-03 03:50:52.000000000 +0100
++++ ports/sysdeps/hppa/fpu/fesetround.c 2006-04-21 02:27:20.000000000 +0200
+@@ -23,17 +23,19 @@
+ int
+ fesetround (int round)
+ {
+- unsigned int sw[2];
++ union { unsigned long long l; unsigned int sw[2]; } s;
+
+ if (round & ~FE_DOWNWARD)
+- /* ROUND is not a valid rounding mode. */
++ /* round is not a valid rounding mode. */
+ return 1;
+-
++
+ /* Get the current status word. */
+- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+- sw[0] &= ~FE_DOWNWARD;
+- sw[0] |= round;
+- __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
++ __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0");
++ s.sw[0] &= ~FE_DOWNWARD;
++ s.sw[0] |= round & FE_DOWNWARD;
++ __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0");
+
+ return 0;
+ }
++
++libm_hidden_def (fesetround)
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/feupdateenv.c ports/sysdeps/hppa/fpu/feupdateenv.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/feupdateenv.c 2004-04-18 00:51:43.000000000 +0200
++++ ports/sysdeps/hppa/fpu/feupdateenv.c 2006-04-21 02:27:20.000000000 +0200
+@@ -19,19 +19,22 @@
+ 02111-1307 USA. */
+
+ #include <fenv.h>
++#include <string.h>
+
+ int
+ feupdateenv (const fenv_t *envp)
+ {
+- unsigned int sw[2];
+-
+- /* Get the current exception status. */
+- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
++ union { unsigned long long l; unsigned int sw[2]; } s;
++ fenv_t temp;
++ /* Get the current exception status */
++ __asm__ ("fstd %%fr0,0(%1) \n\t"
++ "fldd 0(%1),%%fr0 \n\t"
++ : "=m" (s.l) : "r" (&s.l));
++ memcpy(&temp, envp, sizeof(fenv_t));
++ /* Currently raised exceptions not cleared */
++ temp.__status_word |= s.sw[0] & (FE_ALL_EXCEPT << 27);
+ /* Install new environment. */
+- fesetenv (envp);
+- /* Raise the saved exceptions */
+- feraiseexcept(sw[0] & FE_ALL_EXCEPT);
+-
++ fesetenv (&temp);
+ /* Success. */
+ return 0;
+ }
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fgetexcptflg.c ports/sysdeps/hppa/fpu/fgetexcptflg.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fgetexcptflg.c 2001-07-06 06:55:52.000000000 +0200
++++ ports/sysdeps/hppa/fpu/fgetexcptflg.c 2006-04-21 02:27:20.000000000 +0200
+@@ -23,12 +23,14 @@
+ int
+ fegetexceptflag (fexcept_t *flagp, int excepts)
+ {
+- unsigned int sw[2];
++ union { unsigned long long l; unsigned int sw[2]; } s;
+
+ /* Get the current status word. */
+- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
++ __asm__ ("fstd %%fr0,0(%1) \n\t"
++ "fldd 0(%1),%%fr0 \n\t"
++ : "=m" (s.l) : "r" (&s.l) : "%r0");
+
+- *flagp = (sw[0] >> 27) & excepts & FE_ALL_EXCEPT;
++ *flagp = (s.sw[0] >> 27) & excepts & FE_ALL_EXCEPT;
+
+ /* Success. */
+ return 0;
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fsetexcptflg.c ports/sysdeps/hppa/fpu/fsetexcptflg.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/fsetexcptflg.c 2003-12-18 04:58:26.000000000 +0100
++++ ports/sysdeps/hppa/fpu/fsetexcptflg.c 2006-04-21 02:27:20.000000000 +0200
+@@ -24,16 +24,14 @@
+ int
+ fesetexceptflag (const fexcept_t *flagp, int excepts)
+ {
+- unsigned int sw[2];
++ union { unsigned long long l; unsigned int sw[2]; } s;
+
+ /* Get the current status word. */
+- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+-
+- /* Install new enable trap bits */
+- sw[0] |= (*flagp & excepts & FE_ALL_EXCEPT) << 27;
+-
++ __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0");
++ /* Install new raised trap bits */
++ s.sw[0] |= (*flagp & excepts & FE_ALL_EXCEPT) << 27;
+ /* Store the new status word. */
+- __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
++ __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0");
+
+ /* Success. */
+ return 0;
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/ftestexcept.c ports/sysdeps/hppa/fpu/ftestexcept.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/ftestexcept.c 2001-07-06 06:55:52.000000000 +0200
++++ ports/sysdeps/hppa/fpu/ftestexcept.c 2006-04-21 02:27:20.000000000 +0200
+@@ -23,10 +23,12 @@
+ int
+ fetestexcept (int excepts)
+ {
+- unsigned int sw[2];
++ union { unsigned long long l; unsigned int sw[2] } s;
+
+ /* Get the current status word. */
+- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
++ __asm__ ("fstd %%fr0,0(%1) \n\t"
++ "fldd 0(%1),%%fr0 \n\t"
++ : "=m" (s.l) : "r" (&s.l));
+
+- return (sw[0] >> 27) & excepts & FE_ALL_EXCEPT;
++ return (s.sw[0] >> 27) & excepts & FE_ALL_EXCEPT;
+ }
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/libm-test-ulps ports/sysdeps/hppa/fpu/libm-test-ulps
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/fpu/libm-test-ulps 2006-01-15 18:59:37.000000000 +0100
++++ ports/sysdeps/hppa/fpu/libm-test-ulps 2006-04-21 02:27:20.000000000 +0200
+@@ -1,6 +1,9 @@
+ # Begin of automatic generation
+
+ # atan2
++Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994380":
++float: 6
++ifloat: 6
+ Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
+ float: 3
+ ifloat: 3
+@@ -258,9 +261,6 @@
+ ifloat: 1
+
+ # ctan
+-Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
+-double: 1
+-idouble: 1
+ Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
+ double: 1
+ idouble: 1
+@@ -479,6 +479,11 @@
+ float: 1
+ ifloat: 1
+
++# lround
++Test "lround (1071930.0008) == 1071930":
++double: -214511494
++idouble: -214511494
++
+ # sincos
+ Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
+ double: 1
+@@ -640,8 +645,8 @@
+
+ # Maximal error of functions:
+ Function: "atan2":
+-float: 3
+-ifloat: 3
++float: 6
++ifloat: 6
+
+ Function: "atanh":
+ float: 1
+@@ -777,10 +782,6 @@
+ float: 1
+ ifloat: 1
+
+-Function: Real part of "ctan":
+-double: 1
+-idouble: 1
+-
+ Function: Imaginary part of "ctan":
+ double: 1
+ idouble: 1
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/hppa1.1/Implies ports/sysdeps/hppa/hppa1.1/Implies
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/hppa1.1/Implies 2000-10-15 05:25:29.000000000 +0200
++++ ports/sysdeps/hppa/hppa1.1/Implies 2006-06-09 03:25:30.000000000 +0200
+@@ -1,4 +1,3 @@
+ wordsize-32
+ ieee754/flt-32
+ ieee754/dbl-64
+-ieee754/ldbl-128
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/ldsodefs.h ports/sysdeps/hppa/ldsodefs.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/ldsodefs.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/ldsodefs.h 2006-05-24 17:31:25.000000000 +0200
+@@ -0,0 +1,42 @@
++/* Run-time dynamic linker data structures for loaded ELF shared objects.
++ Copyright (C) 2006 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifndef _HPPA_LDSODEFS_H
++#define _HPPA_LDSODEFS_H 1
++
++#include <elf.h>
++
++struct La_hppa_regs;
++struct La_hppa_retval;
++
++#define ARCH_PLTENTER_MEMBERS \
++ Elf32_Addr (*hppa_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *, \
++ uintptr_t *, struct La_hppa_regs *, \
++ unsigned int *, const char *name, \
++ long int *framesizep);
++
++#define ARCH_PLTEXIT_MEMBERS \
++ unsigned int (*hppa_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, \
++ uintptr_t *, \
++ const struct La_hppa_regs *, \
++ struct La_hppa_retval *, const char *);
++
++#include_next <ldsodefs.h>
++
++#endif
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/libc-tls.c ports/sysdeps/hppa/libc-tls.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/libc-tls.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/libc-tls.c 2006-04-22 04:21:00.000000000 +0200
+@@ -0,0 +1,38 @@
++/* Thread-local storage handling in the ELF dynamic linker. hppa version.
++ Copyright (C) 2003 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <csu/libc-tls.c>
++#include <dl-tls.h>
++
++#if USE_TLS
++
++/* On hppa, linker optimizations are not required, so __tls_get_addr
++ can be called even in statically linked binaries. In this case module
++ must be always 1 and PT_TLS segment exist in the binary, otherwise it
++ would not link. */
++
++void *
++__tls_get_addr (tls_index *ti)
++{
++ dtv_t *dtv = THREAD_DTV ();
++ return (char *) dtv[1].pointer.val + ti->ti_offset;
++}
++
++#endif
++
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/linuxthreads/pspinlock.c ports/sysdeps/hppa/linuxthreads/pspinlock.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/linuxthreads/pspinlock.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/linuxthreads/pspinlock.c 2006-04-19 07:35:34.000000000 +0200
+@@ -0,0 +1,82 @@
++/* POSIX spinlock implementation. hppa version.
++ Copyright (C) 2000 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of the
++ License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; see the file COPYING.LIB. If not,
++ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ Boston, MA 02111-1307, USA. */
++
++#include <errno.h>
++#include <pthread.h>
++#include "internals.h"
++
++int
++__pthread_spin_lock (pthread_spinlock_t *lock)
++{
++ volatile unsigned int *addr = __ldcw_align (lock);
++
++ while (__ldcw (addr) == 0)
++ while (*addr == 0) ;
++
++ return 0;
++}
++weak_alias (__pthread_spin_lock, pthread_spin_lock)
++
++
++int
++__pthread_spin_trylock (pthread_spinlock_t *lock)
++{
++ volatile unsigned int *a = __ldcw_align (lock);
++
++ return __ldcw (a) ? 0 : EBUSY;
++}
++weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
++
++
++int
++__pthread_spin_unlock (pthread_spinlock_t *lock)
++{
++ volatile unsigned int *a = __ldcw_align (lock);
++ int tmp = 1;
++ /* This should be a memory barrier to newer compilers */
++ __asm__ __volatile__ ("stw,ma %1,0(%0)"
++ : : "r" (a), "r" (tmp) : "memory");
++ return 0;
++}
++weak_alias (__pthread_spin_unlock, pthread_spin_unlock)
++
++
++int
++__pthread_spin_init (pthread_spinlock_t *lock, int pshared)
++{
++ /* We can ignore the `pshared' parameter. Since we are busy-waiting
++ all processes which can access the memory location `lock' points
++ to can use the spinlock. */
++ volatile unsigned int *a = __ldcw_align (lock);
++ int tmp = 1;
++ /* This should be a memory barrier to newer compilers */
++ __asm__ __volatile__ ("stw,ma %1,0(%0)"
++ : : "r" (a), "r" (tmp) : "memory");
++ return 0;
++}
++weak_alias (__pthread_spin_init, pthread_spin_init)
++
++
++int
++__pthread_spin_destroy (pthread_spinlock_t *lock)
++{
++ /* Nothing to do. */
++ return 0;
++}
++weak_alias (__pthread_spin_destroy, pthread_spin_destroy)
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/linuxthreads/pt-machine.h ports/sysdeps/hppa/linuxthreads/pt-machine.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/linuxthreads/pt-machine.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/linuxthreads/pt-machine.h 2006-04-19 07:35:34.000000000 +0200
+@@ -0,0 +1,134 @@
++/* Machine-dependent pthreads configuration and inline functions.
++ hppa version.
++ Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Richard Henderson <rth@tamu.edu>.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of the
++ License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; see the file COPYING.LIB. If not,
++ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ Boston, MA 02111-1307, USA. */
++
++#ifndef _PT_MACHINE_H
++#define _PT_MACHINE_H 1
++
++#include <sys/types.h>
++#include <bits/initspin.h>
++
++#ifndef PT_EI
++# define PT_EI extern inline __attribute__ ((always_inline))
++#endif
++
++extern inline long int testandset (__atomic_lock_t *spinlock);
++extern inline int __compare_and_swap (long int *p, long int oldval, long int newval);
++extern inline int lock_held (__atomic_lock_t *spinlock);
++extern inline int __load_and_clear (__atomic_lock_t *spinlock);
++
++/* Get some notion of the current stack. Need not be exactly the top
++ of the stack, just something somewhere in the current frame. */
++#define CURRENT_STACK_FRAME stack_pointer
++register char * stack_pointer __asm__ ("%r30");
++
++/* Get/Set thread-specific pointer. We have to call into the kernel to
++ * modify it, but we can read it in user mode. */
++#ifndef THREAD_SELF
++#define THREAD_SELF __get_cr27()
++#endif
++
++#ifndef SET_THREAD_SELF
++#define SET_THREAD_SELF(descr) __set_cr27(descr)
++#endif
++/* Use this to determine type */
++struct _pthread_descr_struct *__thread_self;
++
++static inline struct _pthread_descr_struct * __get_cr27(void)
++{
++ long cr27;
++ asm ("mfctl %%cr27, %0" : "=r" (cr27) : );
++ return (struct _pthread_descr_struct *) cr27;
++}
++
++#ifndef INIT_THREAD_SELF
++#define INIT_THREAD_SELF(descr, nr) __set_cr27(descr)
++#endif
++
++static inline void __set_cr27(struct _pthread_descr_struct * cr27)
++{
++ asm ( "ble 0xe0(%%sr2, %%r0)\n\t"
++ "copy %0, %%r26"
++ : : "r" (cr27) : "r26" );
++}
++
++/* We want the OS to assign stack addresses. */
++#define FLOATING_STACKS 1
++#define ARCH_STACK_MAX_SIZE 8*1024*1024
++
++/* The hppa only has one atomic read and modify memory operation,
++ load and clear, so hppa spinlocks must use zero to signify that
++ someone is holding the lock. The address used for the ldcw
++ semaphore must be 16-byte aligned. */
++#define __ldcw(a) \
++({ \
++ unsigned int __ret; \
++ __asm__ __volatile__("ldcw 0(%1),%0" \
++ : "=r" (__ret) : "r" (a) : "memory"); \
++ __ret; \
++})
++
++/* Strongly ordered lock reset */
++#define __lock_reset(lock_addr, tmp) \
++({ \
++ __asm__ __volatile__ ("stw,ma %1,0(%0)" \
++ : : "r" (lock_addr), "r" (tmp) : "memory"); \
++})
++
++/* Because malloc only guarantees 8-byte alignment for malloc'd data,
++ and GCC only guarantees 8-byte alignment for stack locals, we can't
++ be assured of 16-byte alignment for atomic lock data even if we
++ specify "__attribute ((aligned(16)))" in the type declaration. So,
++ we use a struct containing an array of four ints for the atomic lock
++ type and dynamically select the 16-byte aligned int from the array
++ for the semaphore. */
++#define __PA_LDCW_ALIGNMENT 16
++#define __ldcw_align(a) ({ \
++ volatile unsigned int __ret = (unsigned int) a; \
++ if ((__ret & ~(__PA_LDCW_ALIGNMENT - 1)) < (unsigned int) a) \
++ __ret = (__ret & ~(__PA_LDCW_ALIGNMENT - 1)) + __PA_LDCW_ALIGNMENT; \
++ (unsigned int *) __ret; \
++})
++
++/* Spinlock implementation; required. */
++PT_EI int
++__load_and_clear (__atomic_lock_t *spinlock)
++{
++ volatile unsigned int *a = __ldcw_align (spinlock);
++
++ return __ldcw (a);
++}
++
++/* Emulate testandset */
++PT_EI long int
++testandset (__atomic_lock_t *spinlock)
++{
++ return (__load_and_clear(spinlock) == 0);
++}
++
++PT_EI int
++lock_held (__atomic_lock_t *spinlock)
++{
++ volatile unsigned int *a = __ldcw_align (spinlock);
++
++ return *a == 0;
++}
++
++#endif /* pt-machine.h */
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/linuxthreads/tls.h ports/sysdeps/hppa/linuxthreads/tls.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/linuxthreads/tls.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/linuxthreads/tls.h 2006-04-19 07:35:34.000000000 +0200
+@@ -0,0 +1,163 @@
++/* Definition for thread-local data handling. linuxthreads/hppa version.
++ Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifndef _TLS_H
++#define _TLS_H
++
++#ifndef __ASSEMBLER__
++# include <pt-machine.h>
++# include <stdbool.h>
++# include <stddef.h>
++
++/* Type for the dtv. */
++typedef union dtv
++{
++ size_t counter;
++ struct
++ {
++ void *val;
++ bool is_static;
++ } pointer;
++} dtv_t;
++
++#else /* __ASSEMBLER__ */
++# include <tcb-offsets.h>
++#endif /* __ASSEMBLER__ */
++
++
++#if defined HAVE_TLS_SUPPORT
++
++/* Signal that TLS support is available. */
++# define USE_TLS 1
++
++# ifndef __ASSEMBLER__
++
++typedef struct
++{
++ dtv_t *dtv;
++ void *private;
++} tcbhead_t;
++
++/* Include some syscall information for other headers */
++# include <sysdep.h>
++
++/* This is the size of the initial TCB. */
++# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
++
++/* Alignment requirements for the initial TCB. */
++# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
++
++/* This is the size of the TCB. */
++# define TLS_TCB_SIZE sizeof (tcbhead_t)
++
++/* This is the size we need before TCB. */
++# define TLS_PRE_TCB_SIZE sizeof (struct _pthread_descr_struct)
++
++/* Alignment requirements for the TCB. */
++# define TLS_TCB_ALIGN __alignof__ (struct _pthread_descr_struct)
++
++/* The TLS blocks start right after the TCB. */
++# define TLS_DTV_AT_TP 1
++
++/* Return the thread descriptor for the current thread. */
++# undef THREAD_SELF
++# define THREAD_SELF \
++ ({ struct _pthread_descr_struct *__self; \
++ __self = __get_cr27(); \
++ __self - 1; \
++ })
++
++# undef INIT_THREAD_SELF
++# define INIT_THREAD_SELF(descr, nr) \
++ ({ struct _pthread_descr_struct *__self = (void *)descr; \
++ __set_cr27(__self + 1); \
++ 0; \
++ })
++
++/* Access to data in the thread descriptor is easy. */
++#define THREAD_GETMEM(descr, member) \
++ ((void) sizeof (descr), THREAD_SELF->member)
++#define THREAD_GETMEM_NC(descr, member) \
++ ((void) sizeof (descr), THREAD_SELF->member)
++#define THREAD_SETMEM(descr, member, value) \
++ ((void) sizeof (descr), THREAD_SELF->member = (value))
++#define THREAD_SETMEM_NC(descr, member, value) \
++ ((void) sizeof (descr), THREAD_SELF->member = (value))
++
++/* Install the dtv pointer. The pointer passed is to the element with
++ index -1 which contain the length. */
++# define INSTALL_DTV(tcbp, dtvp) \
++ ((tcbhead_t *) (tcbp))->dtv = dtvp + 1
++
++/* Install new dtv for current thread. */
++# define INSTALL_NEW_DTV(dtv) \
++ ({ tcbhead_t *__tcbp = (tcbhead_t *)__get_cr27(); \
++ __tcbp->dtv = dtv; \
++ })
++
++/* Return dtv of given thread descriptor. */
++# define GET_DTV(tcbp) \
++ (((tcbhead_t *) (tcbp))->dtv)
++
++/* Code to initially initialize the thread pointer. This might need
++ special attention since 'errno' is not yet available and if the
++ operation can cause a failure 'errno' must not be touched. */
++# define TLS_INIT_TP(tcbp, secondcall) \
++ ({ __set_cr27(tcbp); 0; })
++
++/* Return the address of the dtv for the current thread. */
++# define THREAD_DTV() \
++ ({ tcbhead_t *__tcbp = (tcbhead_t *)__get_cr27(); \
++ __tcbp->dtv; \
++ })
++
++# define TLS_MULTIPLE_THREADS_IN_TCB 1
++
++/* Get the thread descriptor definition. This must be after the
++ the definition of THREAD_SELF for TLS. */
++# include <linuxthreads/descr.h>
++
++# endif /* __ASSEMBLER__ */
++
++#else
++
++# ifndef __ASSEMBLER__
++
++typedef struct
++{
++ void *tcb;
++ dtv_t *dtv;
++ void *self;
++ int multiple_threads;
++} tcbhead_t;
++
++/* Get the thread descriptor definition. */
++# include <linuxthreads/descr.h>
++
++# define NONTLS_INIT_TP \
++ do { \
++ static const tcbhead_t nontls_init_tp = { .multiple_threads = 0 }; \
++ INIT_THREAD_SELF(&nontls_init_tp, 0); \
++ } while (0)
++
++# endif /* __ASSEMBLER__ */
++
++#endif /* HAVE_TLS_SUPPORT */
++
++#endif /* tls.h */
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/jmpbuf-unwind.h ports/sysdeps/hppa/nptl/jmpbuf-unwind.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/nptl/jmpbuf-unwind.h 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,31 @@
++/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <setjmp.h>
++#include <jmpbuf-offsets.h>
++#include <stdint.h>
++#include <unwind.h>
++
++#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
++ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
++
++#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
++ ((uintptr_t) (_address) - (_adj) > (uintptr_t)(((unsigned long *) _jmpbuf)[JB_SP]) - (_adj))
++
++/* We use the normal longjmp for unwinding. */
++#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/Makefile ports/sysdeps/hppa/nptl/Makefile
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/nptl/Makefile 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,21 @@
++# Copyright (C) 2005 Free Software Foundation, Inc.
++# This file is part of the GNU C Library.
++#
++# The GNU C Library is free software; you can redistribute it and/or
++# modify it under the terms of the GNU Lesser General Public
++# License as published by the Free Software Foundation; either
++# version 2.1 of the License, or (at your option) any later version.
++#
++# The GNU C Library 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
++# Lesser General Public License for more details.
++#
++# You should have received a copy of the GNU Lesser General Public
++# License along with the GNU C Library; if not, write to the Free
++# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++# 02111-1307 USA.
++
++ifeq ($(subdir),csu)
++gen-as-const-headers += tcb-offsets.sym
++endif
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/pthreaddef.h ports/sysdeps/hppa/nptl/pthreaddef.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/pthreaddef.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/nptl/pthreaddef.h 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,40 @@
++/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++/* Default stack size. */
++#define ARCH_STACK_DEFAULT_SIZE (8 * 1024 * 1024)
++
++/* Required stack pointer alignment at beginning. */
++#define STACK_ALIGN 64
++
++/* Minimal stack size after allocating thread descriptor and guard size. */
++#define MINIMAL_REST_STACK 2048
++
++/* Alignment requirement for TCB, note that this must be larger than STACK_ALIGN */
++#define TCB_ALIGNMENT STACK_ALIGN
++
++
++/* Location of current stack frame. */
++#define CURRENT_STACK_FRAME stack_pointer
++register char * stack_pointer __asm__ ("%r30");
++
++
++/* XXX Until we have a better place keep the definitions here. */
++
++#define __exit_thread_inline(val) \
++ INLINE_SYSCALL (exit, 1, (val))
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/pthread_spin_lock.c ports/sysdeps/hppa/nptl/pthread_spin_lock.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/pthread_spin_lock.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/nptl/pthread_spin_lock.c 2006-07-19 00:46:12.000000000 +0200
+@@ -0,0 +1,38 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <atomic.h>
++#include "pthreadP.h"
++
++int
++pthread_spin_lock (pthread_spinlock_t *lock)
++{
++#if 0
++ volatile unsigned int *addr = __ldcw_align (lock);
++
++ while (__ldcw (addr) == 0)
++ while (*addr == 0) ;
++
++ return 0;
++#endif
++
++ while (atomic_compare_and_exchange_val_acq(lock, 1, 0) == 1)
++ while (*lock == 1);
++
++ return 0;
++}
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/pthread_spin_trylock.c ports/sysdeps/hppa/nptl/pthread_spin_trylock.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/pthread_spin_trylock.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/nptl/pthread_spin_trylock.c 2006-07-19 00:46:12.000000000 +0200
+@@ -0,0 +1,34 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <errno.h>
++#include <atomic.h>
++#include "pthreadP.h"
++
++int
++pthread_spin_trylock (pthread_spinlock_t *lock)
++{
++#if 0
++ volatile unsigned int *a = __ldcw_align (lock);
++
++ return __ldcw (a) ? 0 : EBUSY;
++#endif
++
++ return atomic_compare_and_exchange_val_acq(lock, 1, 0) ? EBUSY : 0;
++
++}
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/pthread_spin_unlock.c ports/sysdeps/hppa/nptl/pthread_spin_unlock.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/pthread_spin_unlock.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/nptl/pthread_spin_unlock.c 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,36 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++/* Ugly hack to avoid the declaration of pthread_spin_init. */
++#define pthread_spin_init pthread_spin_init_XXX
++#include "pthreadP.h"
++#undef pthread_spin_init
++
++int
++pthread_spin_unlock (pthread_spinlock_t *lock)
++{
++#if 0
++ volatile unsigned int *a = __ldcw_align (lock);
++#endif
++ int tmp = 0;
++ /* This should be a memory barrier to newer compilers */
++ __asm__ __volatile__ ("stw,ma %1,0(%0)"
++ : : "r" (lock), "r" (tmp) : "memory");
++ return 0;
++}
++strong_alias (pthread_spin_unlock, pthread_spin_init)
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/tcb-offsets.sym ports/sysdeps/hppa/nptl/tcb-offsets.sym
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/tcb-offsets.sym 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/nptl/tcb-offsets.sym 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,18 @@
++#include <sysdep.h>
++#include <tls.h>
++
++RESULT offsetof (struct pthread, result)
++TID offsetof (struct pthread, tid)
++PID offsetof (struct pthread, pid)
++CANCELHANDLING offsetof (struct pthread, cancelhandling)
++CLEANUP_JMP_BUF offsetof (struct pthread, cleanup_jmp_buf)
++MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads)
++TLS_PRE_TCB_SIZE sizeof (struct pthread)
++MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock)
++
++-- Use a thread_offset when working with asm to make things simpler
++-- This way we get the offset of a member in the struct pthread that
++-- preceeds the thread pointer (which points to the dtv).
++#define thread_offsetof(mem) (unsigned int)(offsetof(struct pthread, mem) - sizeof(struct pthread))
++PID_THREAD_OFFSET thread_offsetof (pid)
++MULTIPLE_THREADS_THREAD_OFFSET thread_offsetof (header.multiple_threads)
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/tls.h ports/sysdeps/hppa/nptl/tls.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/nptl/tls.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/nptl/tls.h 2006-07-16 20:25:24.000000000 +0200
+@@ -0,0 +1,151 @@
++/* Definition for thread-local data handling. NPTL/hppa version.
++ Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifndef _TLS_H
++#define _TLS_H 1
++
++#include <dl-sysdep.h>
++
++#ifndef __ASSEMBLER__
++# include <stdbool.h>
++# include <stddef.h>
++# include <stdint.h>
++
++/* Type for the dtv. */
++typedef union dtv
++{
++ size_t counter;
++ struct
++ {
++ void *val;
++ bool is_static;
++ } pointer;
++} dtv_t;
++
++#else /* __ASSEMBLER__ */
++# include <tcb-offsets.h>
++#endif /* __ASSEMBLER__ */
++
++
++/* We require TLS support in the tools. */
++#ifndef HAVE_TLS_SUPPORT
++# error "TLS support is required."
++#endif
++
++/* Signal that TLS support is available. */
++#define USE_TLS 1
++
++#ifndef __ASSEMBLER__
++
++/* Get system call information. */
++# include <sysdep.h>
++
++/* The TP points to the start of the thread blocks. */
++# define TLS_DTV_AT_TP 1
++
++/* Get the thread descriptor definition. */
++# include <nptl/descr.h>
++
++typedef struct
++{
++ dtv_t *dtv;
++ void *private;
++} tcbhead_t;
++
++/* This is the size of the initial TCB. */
++# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
++
++/* Alignment requirements for the initial TCB. */
++# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
++
++/* This is the size of the TCB. */
++# define TLS_TCB_SIZE sizeof (tcbhead_t)
++
++/* Alignment requirements for the TCB. */
++# define TLS_TCB_ALIGN __alignof__ (struct pthread)
++
++/* This is the size we need before TCB */
++# define TLS_PRE_TCB_SIZE sizeof (struct pthread)
++
++/* Install the dtv pointer. The pointer passed is to the element with
++ index -1 which contain the length. */
++# define INSTALL_DTV(tcbp, dtvp) \
++ ((tcbhead_t *) (tcbp))->dtv = (dtvp) + 1
++
++/* Install new dtv for current thread. */
++# define INSTALL_NEW_DTV(dtv) \
++ ({ tcbhead_t *__tcbp = (tcbhead_t *)__get_cr27(); \
++ __tcbp->dtv = dtv; \
++ })
++
++/* Return dtv of given thread descriptor. */
++# define GET_DTV(tcbp) \
++ (((tcbhead_t *) (tcbp))->dtv)
++
++/* Code to initially initialize the thread pointer. This might need
++ special attention since 'errno' is not yet available and if the
++ operation can cause a failure 'errno' must not be touched. */
++# define TLS_INIT_TP(tcbp, secondcall) \
++ ({ __set_cr27(tcbp); NULL; })
++
++/* Return the address of the dtv for the current thread. */
++# define THREAD_DTV() \
++ ({ tcbhead_t *__tcbp = (tcbhead_t *)__get_cr27(); \
++ __tcbp->dtv; \
++ })
++
++/* Return the thread descriptor for the current thread. */
++# define THREAD_SELF \
++ ({ struct pthread *__self; \
++ __self = __get_cr27(); \
++ __self - 1; \
++ })
++
++/* FIXME */
++/* Magic for libthread_db to know how to do THREAD_SELF. */
++# define DB_THREAD_SELF \
++ REGISTER (32, 32, 32 * 4, -sizeof (struct pthread))
++
++/* Access to data in the thread descriptor is easy. */
++# define THREAD_GETMEM(descr, member) \
++ descr->member
++# define THREAD_GETMEM_NC(descr, member, idx) \
++ descr->member[idx]
++# define THREAD_SETMEM(descr, member, value) \
++ descr->member = (value)
++# define THREAD_SETMEM_NC(descr, member, idx, value) \
++ descr->member[idx] = (value)
++
++static inline struct pthread *__get_cr27(void)
++{
++ long cr27;
++ asm ("mfctl %%cr27, %0" : "=r" (cr27) : );
++ return (struct pthread *) cr27;
++}
++
++static inline void __set_cr27(struct pthread *cr27)
++{
++ asm ( "ble 0xe0(%%sr2, %%r0)\n\t"
++ "copy %0, %%r26"
++ : : "r" (cr27) : "r26" );
++}
++
++#endif /* __ASSEMBLER__ */
++
++#endif /* tls.h */
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/sysdep.h ports/sysdeps/hppa/sysdep.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/sysdep.h 2003-10-15 07:31:42.000000000 +0200
++++ ports/sysdeps/hppa/sysdep.h 2006-05-15 01:54:47.000000000 +0200
+@@ -22,9 +22,8 @@
+ #include <sys/syscall.h>
+ #include "config.h"
+
+-#ifndef ASM_LINE_SEP
+-#define ASM_LINE_SEP ;
+-#endif
++#undef ASM_LINE_SEP
++#define ASM_LINE_SEP !
+
+ #ifdef __ASSEMBLER__
+
+@@ -51,13 +50,9 @@
+ #define END(name) \
+ .PROCEND
+
+-
+-/* If compiled for profiling, call `mcount' at the start of each function. */
++/* GCC does everything for us. */
+ #ifdef PROF
+-/* The mcount code relies on a normal frame pointer being on the stack
+- to locate our caller, so push one just for its benefit. */
+-#define CALL_MCOUNT \
+- XXX ASM_LINE_SEP
++#define CALL_MCOUNT
+ #else
+ #define CALL_MCOUNT /* Do nothing. */
+ #endif
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/tls-macros.h ports/sysdeps/hppa/tls-macros.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/tls-macros.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/tls-macros.h 2006-07-16 20:31:20.000000000 +0200
+@@ -0,0 +1,115 @@
++/* TLS Access Macros for HP PARISC Linux */
++
++/* HPPA Local Exec TLS access. */
++#define TLS_LE(x) \
++ ({ int * __result; \
++ unsigned long __tmp; \
++ asm ( \
++ " mfctl %%cr27, %1\n" \
++ " addil LR'" #x "-$tls_leoff$, %1\n" \
++ " ldo RR'" #x "-$tls_leoff$(%%r1), %0\n" \
++ : "=r" (__result), "=r" (__tmp) \
++ : \
++ : "r1" ); \
++ __result; \
++ })
++
++/* HPPA Initial Exec TLS access. */
++#ifdef PIC
++# define TLS_IE(x) \
++ ({ int * __result; \
++ unsigned long __tmp, __tmp2; \
++ asm ( \
++ " mfctl %%cr27, %1\n" \
++ " addil LT'" #x "-$tls_ieoff$, %%r19\n" \
++ " ldw RT'" #x "-$tls_ieoff$(%%r1), %2\n" \
++ " add %1, %2, %0\n" \
++ : "=r" (__result), "=r" (__tmp), "=r" (__tmp2) \
++ : \
++ : "r1" ); \
++ __result; \
++ })
++#else
++# define TLS_IE(x) \
++ ({ int * __result; \
++ unsigned long __tmp, __tmp2; \
++ asm ( \
++ " mfctl %%cr27, %1\n" \
++ " addil LR'" #x "-$tls_ieoff$, %%r27\n" \
++ " ldw RR'" #x "-$tls_ieoff$(%%r1), %2\n" \
++ " add %1, %2, %0\n" \
++ : "=r" (__result), "=r" (__tmp), "=r" (__tmp2) \
++ : \
++ : "r1" ); \
++ __result; \
++ })
++#endif
++
++#ifdef PIC
++/* HPPA Local Dynamic TLS access. */
++# define TLS_LD(x) \
++ ({ int * __result; \
++ asm ( \
++ " copy %%r19, %%r4\n" \
++ " addil LT'" #x "-$tls_ldidx$, %%r19\n" \
++ " bl __tls_get_addr, %%r2\n" \
++ " ldo RT'" #x "-$tls_ldidx$(%%r1), %%r26\n" \
++ " addil LR'" #x "-$tls_dtpoff$, %%r28\n" \
++ " ldo RR'" #x "-$tls_dtpoff$(%%r1), %0\n" \
++ " copy %%r4, %%r19\n" \
++ : "=r" (__result) \
++ : \
++ : "r1", "r2", "r4", "r20", "r21", "r22", "r23", "r24", \
++ "r25", "r26", "r28", "r29", "r31" ); \
++ __result; \
++ })
++#else
++# define TLS_LD(x) \
++ ({ int * __result; \
++ asm ( \
++ " addil LR'" #x "-$tls_ldidx$, %%r27\n" \
++ " bl __tls_get_addr, %%r2\n" \
++ " ldo RR'" #x "-$tls_ldidx$(%%r1), %%r26\n" \
++ " addil LR'" #x "-$tls_dtpoff$, %%r28\n" \
++ " ldo RR'" #x "-$tls_dtpoff$(%%r1), %0\n" \
++ : "=r" (__result) \
++ : \
++ : "r1", "r2", "r20", "r21", "r22", "r23", "r24", \
++ "r25", "r26", "r28", "r29", "r31" ); \
++ __result; \
++ })
++#endif
++
++/* HPPA General Dynamic TLS access. */
++#ifdef PIC
++# define TLS_GD(x) \
++ ({ int * __result; \
++ asm ( \
++ " copy %%r19, %%r4\n" \
++ " addil LT'" #x "-$tls_gdidx$, %%r19\n" \
++ " bl __tls_get_addr, %%r2\n" \
++ " ldo RT'" #x "-$tls_gdidx$(%%r1), %%r26\n" \
++ " copy %%r28, %0\n" \
++ " copy %%r4, %%r19\n" \
++ : "=r" (__result) \
++ : \
++ : "r1", "r2", "r4", "r20", "r21", "r22", "r23", "r24", \
++ "r25", "r26", "r28", "r29", "r31" ); \
++ __result; \
++ })
++#else
++# define TLS_GD(x) \
++ ({ int * __result; \
++ asm ( \
++ " addil LR'" #x "-$tls_gdidx$, %%r27\n" \
++ " bl __tls_get_addr, %%r2\n" \
++ " ldo RR'" #x "-$tls_gdidx$(%%r1), %%r26\n" \
++ " copy %%r28, %0\n" \
++ : "=r" (__result) \
++ : \
++ : "r1", "r2", "r20", "r21", "r22", "r23", "r24", \
++ "r25", "r26", "r28", "r29", "r31" ); \
++ __result; \
++ })
++#endif
++
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/tst-audit.h ports/sysdeps/hppa/tst-audit.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/hppa/tst-audit.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/hppa/tst-audit.h 2006-07-16 20:31:20.000000000 +0200
+@@ -0,0 +1,26 @@
++/* Definitions for testing PLT entry/exit auditing. HP-PARISC version.
++
++ Copyright (C) 2006 Free Software Foundation, Inc.
++
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#define pltenter la_hppa_gnu_pltenter
++#define pltexit la_hppa_gnu_pltexit
++#define La_regs La_hppa_regs
++#define La_retval La_hppa_retval
++#define int_retval lrv_r28
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/mips/fpu/feholdexcpt.c ports/sysdeps/mips/fpu/feholdexcpt.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/mips/fpu/feholdexcpt.c 2001-07-06 06:56:01.000000000 +0200
++++ ports/sysdeps/mips/fpu/feholdexcpt.c 2006-06-02 17:06:07.000000000 +0200
+@@ -36,3 +36,5 @@
+
+ return 0;
+ }
++
++libm_hidden_def (feholdexcept)
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/mips/fpu/fesetround.c ports/sysdeps/mips/fpu/fesetround.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/mips/fpu/fesetround.c 2001-07-06 06:56:01.000000000 +0200
++++ ports/sysdeps/mips/fpu/fesetround.c 2006-06-02 17:06:07.000000000 +0200
+@@ -41,3 +41,5 @@
+
+ return 0;
+ }
++
++libm_hidden_def (fesetround)
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/mips/ldsodefs.h ports/sysdeps/mips/ldsodefs.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/mips/ldsodefs.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/mips/ldsodefs.h 2006-05-08 21:19:56.000000000 +0200
+@@ -0,0 +1,66 @@
++/* Run-time dynamic linker data structures for loaded ELF shared objects.
++ Copyright (C) 2006 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifndef __LDSODEFS_H \
++#define _MIPS_LDSODEFS_H 1
++
++#include <elf.h>
++
++struct La_mips_32_regs;
++struct La_mips_32_retval;
++struct La_mips_64_regs;
++struct La_mips_64_retval;
++
++#define ARCH_PLTENTER_MEMBERS \
++ Elf32_Addr (*mips_o32_gnu_pltenter) (Elf32_Sym *, unsigned int, \
++ uintptr_t *, uintptr_t *, \
++ const struct La_mips_32_regs *, \
++ unsigned int *, const char *name, \
++ long int *framesizep); \
++ Elf32_Addr (*mips_n32_gnu_pltenter) (Elf32_Sym *, unsigned int, \
++ uintptr_t *, uintptr_t *, \
++ const struct La_mips_64_regs *, \
++ unsigned int *, const char *name, \
++ long int *framesizep); \
++ Elf64_Addr (*mips_n64_gnu_pltenter) (Elf64_Sym *, unsigned int, \
++ uintptr_t *, uintptr_t *, \
++ const struct La_mips_64_regs *, \
++ unsigned int *, const char *name, \
++ long int *framesizep);
++
++#define ARCH_PLTEXIT_MEMBERS \
++ unsigned int (*mips_o32_gnu_pltexit) (Elf32_Sym *, unsigned int, \
++ uintptr_t *, uintptr_t *, \
++ const struct La_mips_32_regs *, \
++ struct La_mips_32_retval *, \
++ const char *); \
++ unsigned int (*mips_n32_gnu_pltexit) (Elf32_Sym *, unsigned int, \
++ uintptr_t *, uintptr_t *, \
++ const struct La_mips_64_regs *, \
++ struct La_mips_64_retval *, \
++ const char *); \
++ unsigned int (*mips_n64_gnu_pltexit) (Elf64_Sym *, unsigned int, \
++ uintptr_t *, uintptr_t *, \
++ const struct La_mips_64_regs *, \
++ struct La_mips_64_retval *, \
++ const char *);
++
++#include_next <ldsodefs.h>
++
++#endif
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/mips/Makefile ports/sysdeps/mips/Makefile
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/mips/Makefile 2004-12-20 09:34:03.000000000 +0100
++++ ports/sysdeps/mips/Makefile 2006-06-02 17:09:39.000000000 +0200
+@@ -10,3 +10,5 @@
+ ifeq ($(subdir),rt)
+ librt-sysdep_routines += rt-sysdep
+ endif
++
++ASFLAGS-.os += $(pic-ccflag)
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/mips/mips64/n32/libm-test-ulps ports/sysdeps/mips/mips64/n32/libm-test-ulps
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/mips/mips64/n32/libm-test-ulps 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/mips/mips64/n32/libm-test-ulps 2006-07-24 17:51:49.000000000 +0200
+@@ -0,0 +1,1245 @@
++# Begin of automatic generation
++
++# atan2
++Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112":
++ildouble: 1
++ldouble: 1
++Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# atanh
++Test "atanh (0.75) == 0.972955074527656652552676371721589865":
++float: 1
++ifloat: 1
++
++# cacos
++Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i":
++ildouble: 1
++ldouble: 1
++
++# cacosh
++Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# casin
++Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
++ildouble: 1
++ldouble: 1
++
++# casinh
++Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
++double: 5
++float: 1
++idouble: 5
++ifloat: 1
++ildouble: 4
++ldouble: 4
++Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
++double: 3
++float: 6
++idouble: 3
++ifloat: 6
++ildouble: 2
++ldouble: 2
++Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# catan
++Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
++ildouble: 1
++ldouble: 1
++
++# catanh
++Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
++double: 4
++idouble: 4
++Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
++ildouble: 1
++ldouble: 1
++
++# cbrt
++Test "cbrt (-0.001) == -0.1":
++ildouble: 1
++ldouble: 1
++Test "cbrt (-27.0) == -3.0":
++double: 1
++idouble: 1
++Test "cbrt (0.75) == 0.908560296416069829445605878163630251":
++double: 1
++idouble: 1
++Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217":
++double: 1
++idouble: 1
++
++# ccos
++Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
++float: 1
++ifloat: 1
++
++# ccosh
++Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
++float: 1
++ifloat: 1
++
++# cexp
++Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
++float: 1
++ifloat: 1
++Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
++ildouble: 1
++ldouble: 1
++
++# clog
++Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# clog10
++Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i":
++double: 1
++idouble: 1
++Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
++float: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++
++# cos
++Test "cos (M_PI_6l * 2.0) == 0.5":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++Test "cos (M_PI_6l * 4.0) == -0.5":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# cpow
++Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
++float: 1
++ifloat: 1
++Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
++float: 1
++ifloat: 1
++Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
++double: 1
++float: 4
++idouble: 1
++ifloat: 4
++ildouble: 4
++ldouble: 4
++Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
++ildouble: 2
++ldouble: 2
++Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
++ildouble: 1
++ldouble: 1
++Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
++double: 2
++float: 3
++idouble: 2
++ifloat: 3
++ildouble: 10
++ldouble: 10
++Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
++ildouble: 2
++ldouble: 2
++Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
++double: 1
++float: 4
++idouble: 1
++ifloat: 4
++ildouble: 3
++ldouble: 3
++Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
++float: 2
++ifloat: 2
++Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
++double: 2
++float: 2
++idouble: 2
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++# csin
++Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i":
++ildouble: 1
++ldouble: 1
++Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i":
++ildouble: 1
++ldouble: 1
++
++# csinh
++Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
++double: 1
++idouble: 1
++Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
++float: 1
++ifloat: 1
++Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
++float: 1
++ifloat: 1
++
++# csqrt
++Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i":
++ildouble: 1
++ldouble: 1
++
++# ctan
++Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
++double: 1
++idouble: 1
++ildouble: 2
++ldouble: 2
++
++# ctanh
++Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
++float: 1
++ifloat: 1
++Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
++double: 1
++idouble: 1
++
++# erf
++Test "erf (1.25) == 0.922900128256458230136523481197281140":
++double: 1
++idouble: 1
++
++# erfc
++Test "erfc (2.0) == 0.00467773498104726583793074363274707139":
++double: 1
++idouble: 1
++Test "erfc (27.0) == 0.523704892378925568501606768284954709e-318":
++ildouble: 1
++ldouble: 1
++Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
++double: 1
++idouble: 1
++
++# exp10
++Test "exp10 (-1) == 0.1":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++Test "exp10 (0.75) == 5.62341325190349080394951039776481231":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "exp10 (3) == 1000":
++double: 6
++float: 2
++idouble: 6
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++# exp2
++Test "exp2 (10) == 1024":
++ildouble: 2
++ldouble: 2
++
++# expm1
++Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
++double: 1
++idouble: 1
++Test "expm1 (1) == M_El - 1.0":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# gamma
++Test "gamma (-0.5) == log(2*sqrt(pi))":
++ildouble: 1
++ldouble: 1
++
++# hypot
++Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++
++# j0
++Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "j0 (0.75) == 0.864242275166648623555731103820923211":
++float: 1
++ifloat: 1
++Test "j0 (10.0) == -0.245935764451348335197760862485328754":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++ildouble: 2
++ldouble: 2
++Test "j0 (2.0) == 0.223890779141235668051827454649948626":
++float: 2
++ifloat: 2
++ildouble: 2
++ldouble: 2
++Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "j0 (8.0) == 0.171650807137553906090869407851972001":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# j1
++Test "j1 (-1.0) == -0.440050585744933515959682203718914913":
++ildouble: 1
++ldouble: 1
++Test "j1 (0.75) == 0.349243602174862192523281016426251335":
++ildouble: 1
++ldouble: 1
++Test "j1 (1.0) == 0.440050585744933515959682203718914913":
++ildouble: 1
++ldouble: 1
++Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
++float: 2
++ifloat: 2
++ildouble: 2
++ldouble: 2
++Test "j1 (2.0) == 0.576724807756873387202448242269137087":
++double: 1
++idouble: 1
++Test "j1 (8.0) == 0.234636346853914624381276651590454612":
++double: 1
++idouble: 1
++ildouble: 4
++ldouble: 4
++
++# jn
++Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "jn (0, 0.75) == 0.864242275166648623555731103820923211":
++float: 1
++ifloat: 1
++Test "jn (0, 10.0) == -0.245935764451348335197760862485328754":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++ildouble: 2
++ldouble: 2
++Test "jn (0, 2.0) == 0.223890779141235668051827454649948626":
++float: 2
++ifloat: 2
++ildouble: 2
++ldouble: 2
++Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "jn (1, -1.0) == -0.440050585744933515959682203718914913":
++ildouble: 1
++ldouble: 1
++Test "jn (1, 0.75) == 0.349243602174862192523281016426251335":
++ildouble: 1
++ldouble: 1
++Test "jn (1, 1.0) == 0.440050585744933515959682203718914913":
++ildouble: 1
++ldouble: 1
++Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883":
++float: 2
++ifloat: 2
++ildouble: 2
++ldouble: 2
++Test "jn (1, 2.0) == 0.576724807756873387202448242269137087":
++double: 1
++idouble: 1
++Test "jn (1, 8.0) == 0.234636346853914624381276651590454612":
++double: 1
++idouble: 1
++ildouble: 4
++ldouble: 4
++Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9":
++ildouble: 1
++ldouble: 1
++Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9":
++ildouble: 1
++ldouble: 1
++Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
++double: 4
++float: 3
++idouble: 4
++ifloat: 3
++ildouble: 2
++ldouble: 2
++Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
++float: 4
++ifloat: 4
++Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563":
++double: 3
++float: 1
++idouble: 3
++ifloat: 1
++ildouble: 2
++ldouble: 2
++Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++
++# lgamma
++Test "lgamma (-0.5) == log(2*sqrt(pi))":
++ildouble: 1
++ldouble: 1
++Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++# log10
++Test "log10 (0.75) == -0.124938736608299953132449886193870744":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++Test "log10 (e) == log10(e)":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# log1p
++Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
++float: 1
++ifloat: 1
++
++# log2
++Test "log2 (0.75) == -.415037499278843818546261056052183492":
++ildouble: 1
++ldouble: 1
++
++# sincos
++Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
++float: 1
++ifloat: 1
++
++# sqrt
++Test "sqrt (2) == M_SQRT2l":
++ildouble: 1
++ldouble: 1
++
++# tanh
++Test "tanh (-0.75) == -0.635148952387287319214434357312496495":
++ildouble: 1
++ldouble: 1
++Test "tanh (-1.0) == -0.7615941559557648881194582826047935904":
++ildouble: 1
++ldouble: 1
++Test "tanh (0.75) == 0.635148952387287319214434357312496495":
++ildouble: 1
++ldouble: 1
++Test "tanh (1.0) == 0.7615941559557648881194582826047935904":
++ildouble: 1
++ldouble: 1
++
++# tgamma
++Test "tgamma (-0.5) == -2 sqrt (pi)":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "tgamma (0.5) == sqrt (pi)":
++float: 1
++ifloat: 1
++Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "tgamma (4) == 6":
++ildouble: 1
++ldouble: 1
++
++# y0
++Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++Test "y0 (1.5) == 0.382448923797758843955068554978089862":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
++float: 1
++ifloat: 1
++ildouble: 3
++ldouble: 3
++Test "y0 (8.0) == 0.223521489387566220527323400498620359":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 3
++ldouble: 3
++
++# y1
++Test "y1 (0.125) == -5.19993611253477499595928744876579921":
++double: 1
++idouble: 1
++Test "y1 (0.75) == -1.03759455076928541973767132140642198":
++ildouble: 1
++ldouble: 1
++Test "y1 (1.5) == -0.412308626973911295952829820633445323":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "y1 (10.0) == 0.249015424206953883923283474663222803":
++double: 3
++float: 1
++idouble: 3
++ifloat: 1
++Test "y1 (2.0) == -0.107032431540937546888370772277476637":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "y1 (8.0) == -0.158060461731247494255555266187483550":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++# yn
++Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++Test "yn (0, 1.5) == 0.382448923797758843955068554978089862":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
++float: 1
++ifloat: 1
++ildouble: 3
++ldouble: 3
++Test "yn (0, 8.0) == 0.223521489387566220527323400498620359":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 3
++ldouble: 3
++Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
++double: 1
++idouble: 1
++Test "yn (1, 0.75) == -1.03759455076928541973767132140642198":
++ildouble: 1
++ldouble: 1
++Test "yn (1, 1.5) == -0.412308626973911295952829820633445323":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
++double: 3
++float: 1
++idouble: 3
++ifloat: 1
++Test "yn (1, 2.0) == -0.107032431540937546888370772277476637":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 1
++ldouble: 1
++Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
++double: 1
++idouble: 1
++ildouble: 2
++ldouble: 2
++Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 5
++ldouble: 5
++Test "yn (10, 1.0) == -121618014.278689189288130426667971145":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 2
++ldouble: 2
++Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
++double: 2
++idouble: 2
++ildouble: 2
++ldouble: 2
++Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
++double: 1
++idouble: 1
++Test "yn (3, 0.75) == -12.9877176234475433186319774484809207":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 2
++ldouble: 2
++Test "yn (3, 10.0) == -0.251362657183837329779204747654240998":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
++double: 1
++idouble: 1
++
++# Maximal error of functions:
++Function: "atan2":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: "atanh":
++float: 1
++ifloat: 1
++
++Function: Imaginary part of "cacos":
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "cacosh":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "casin":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++
++Function: Imaginary part of "casin":
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "casinh":
++double: 5
++float: 1
++idouble: 5
++ifloat: 1
++ildouble: 4
++ldouble: 4
++
++Function: Imaginary part of "casinh":
++double: 3
++float: 6
++idouble: 3
++ifloat: 6
++ildouble: 2
++ldouble: 2
++
++Function: Imaginary part of "catan":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "catanh":
++double: 4
++idouble: 4
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "catanh":
++ildouble: 1
++ldouble: 1
++
++Function: "cbrt":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "ccos":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "ccos":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "ccosh":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "ccosh":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "cexp":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "cexp":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "clog":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "clog10":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "clog10":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: "cos":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "cpow":
++double: 2
++float: 4
++idouble: 2
++ifloat: 4
++ildouble: 10
++ldouble: 10
++
++Function: Imaginary part of "cpow":
++double: 2
++float: 2
++idouble: 2
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "csin":
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "csin":
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "csinh":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "csinh":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++
++Function: Real part of "csqrt":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "csqrt":
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "ctan":
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "ctan":
++double: 1
++idouble: 1
++ildouble: 2
++ldouble: 2
++
++Function: Real part of "ctanh":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "ctanh":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: "erf":
++double: 1
++idouble: 1
++
++Function: "erfc":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++
++Function: "exp10":
++double: 6
++float: 2
++idouble: 6
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++Function: "exp2":
++ildouble: 2
++ldouble: 2
++
++Function: "expm1":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: "gamma":
++ildouble: 1
++ldouble: 1
++
++Function: "hypot":
++float: 1
++ifloat: 1
++
++Function: "j0":
++double: 2
++float: 2
++idouble: 2
++ifloat: 2
++ildouble: 2
++ldouble: 2
++
++Function: "j1":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 4
++ldouble: 4
++
++Function: "jn":
++double: 4
++float: 4
++idouble: 4
++ifloat: 4
++ildouble: 4
++ldouble: 4
++
++Function: "lgamma":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++Function: "log10":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++Function: "log1p":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: "log2":
++ildouble: 1
++ldouble: 1
++
++Function: "sincos":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: "sqrt":
++ildouble: 1
++ldouble: 1
++
++Function: "tan":
++double: 1
++idouble: 1
++
++Function: "tanh":
++ildouble: 1
++ldouble: 1
++
++Function: "tgamma":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: "y0":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++ildouble: 3
++ldouble: 3
++
++Function: "y1":
++double: 3
++float: 2
++idouble: 3
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++Function: "yn":
++double: 3
++float: 2
++idouble: 3
++ifloat: 2
++ildouble: 5
++ldouble: 5
++
++# end of automatic generation
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/mips/mips64/n64/libm-test-ulps ports/sysdeps/mips/mips64/n64/libm-test-ulps
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/mips/mips64/n64/libm-test-ulps 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/mips/mips64/n64/libm-test-ulps 2006-07-24 17:51:50.000000000 +0200
+@@ -0,0 +1,1245 @@
++# Begin of automatic generation
++
++# atan2
++Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112":
++ildouble: 1
++ldouble: 1
++Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# atanh
++Test "atanh (0.75) == 0.972955074527656652552676371721589865":
++float: 1
++ifloat: 1
++
++# cacos
++Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i":
++ildouble: 1
++ldouble: 1
++
++# cacosh
++Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# casin
++Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
++ildouble: 1
++ldouble: 1
++
++# casinh
++Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
++double: 5
++float: 1
++idouble: 5
++ifloat: 1
++ildouble: 4
++ldouble: 4
++Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
++double: 3
++float: 6
++idouble: 3
++ifloat: 6
++ildouble: 2
++ldouble: 2
++Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# catan
++Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
++ildouble: 1
++ldouble: 1
++
++# catanh
++Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
++double: 4
++idouble: 4
++Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
++ildouble: 1
++ldouble: 1
++
++# cbrt
++Test "cbrt (-0.001) == -0.1":
++ildouble: 1
++ldouble: 1
++Test "cbrt (-27.0) == -3.0":
++double: 1
++idouble: 1
++Test "cbrt (0.75) == 0.908560296416069829445605878163630251":
++double: 1
++idouble: 1
++Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217":
++double: 1
++idouble: 1
++
++# ccos
++Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
++float: 1
++ifloat: 1
++
++# ccosh
++Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
++float: 1
++ifloat: 1
++
++# cexp
++Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
++float: 1
++ifloat: 1
++Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
++ildouble: 1
++ldouble: 1
++
++# clog
++Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# clog10
++Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i":
++double: 1
++idouble: 1
++Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
++float: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++
++# cos
++Test "cos (M_PI_6l * 2.0) == 0.5":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++Test "cos (M_PI_6l * 4.0) == -0.5":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# cpow
++Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
++float: 1
++ifloat: 1
++Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
++float: 1
++ifloat: 1
++Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
++double: 1
++float: 4
++idouble: 1
++ifloat: 4
++ildouble: 4
++ldouble: 4
++Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
++ildouble: 2
++ldouble: 2
++Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
++ildouble: 1
++ldouble: 1
++Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
++double: 2
++float: 3
++idouble: 2
++ifloat: 3
++ildouble: 10
++ldouble: 10
++Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
++ildouble: 2
++ldouble: 2
++Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
++double: 1
++float: 4
++idouble: 1
++ifloat: 4
++ildouble: 3
++ldouble: 3
++Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
++float: 2
++ifloat: 2
++Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
++double: 2
++float: 2
++idouble: 2
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++# csin
++Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i":
++ildouble: 1
++ldouble: 1
++Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i":
++ildouble: 1
++ldouble: 1
++
++# csinh
++Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
++double: 1
++idouble: 1
++Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
++float: 1
++ifloat: 1
++Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
++float: 1
++ifloat: 1
++
++# csqrt
++Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i":
++ildouble: 1
++ldouble: 1
++
++# ctan
++Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
++double: 1
++idouble: 1
++ildouble: 2
++ldouble: 2
++
++# ctanh
++Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
++ildouble: 1
++ldouble: 1
++Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
++float: 1
++ifloat: 1
++Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
++double: 1
++idouble: 1
++
++# erf
++Test "erf (1.25) == 0.922900128256458230136523481197281140":
++double: 1
++idouble: 1
++
++# erfc
++Test "erfc (2.0) == 0.00467773498104726583793074363274707139":
++double: 1
++idouble: 1
++Test "erfc (27.0) == 0.523704892378925568501606768284954709e-318":
++ildouble: 1
++ldouble: 1
++Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
++double: 1
++idouble: 1
++
++# exp10
++Test "exp10 (-1) == 0.1":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++Test "exp10 (0.75) == 5.62341325190349080394951039776481231":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "exp10 (3) == 1000":
++double: 6
++float: 2
++idouble: 6
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++# exp2
++Test "exp2 (10) == 1024":
++ildouble: 2
++ldouble: 2
++
++# expm1
++Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
++double: 1
++idouble: 1
++Test "expm1 (1) == M_El - 1.0":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# gamma
++Test "gamma (-0.5) == log(2*sqrt(pi))":
++ildouble: 1
++ldouble: 1
++
++# hypot
++Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
++float: 1
++ifloat: 1
++
++# j0
++Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "j0 (0.75) == 0.864242275166648623555731103820923211":
++float: 1
++ifloat: 1
++Test "j0 (10.0) == -0.245935764451348335197760862485328754":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++ildouble: 2
++ldouble: 2
++Test "j0 (2.0) == 0.223890779141235668051827454649948626":
++float: 2
++ifloat: 2
++ildouble: 2
++ldouble: 2
++Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "j0 (8.0) == 0.171650807137553906090869407851972001":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# j1
++Test "j1 (-1.0) == -0.440050585744933515959682203718914913":
++ildouble: 1
++ldouble: 1
++Test "j1 (0.75) == 0.349243602174862192523281016426251335":
++ildouble: 1
++ldouble: 1
++Test "j1 (1.0) == 0.440050585744933515959682203718914913":
++ildouble: 1
++ldouble: 1
++Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
++float: 2
++ifloat: 2
++ildouble: 2
++ldouble: 2
++Test "j1 (2.0) == 0.576724807756873387202448242269137087":
++double: 1
++idouble: 1
++Test "j1 (8.0) == 0.234636346853914624381276651590454612":
++double: 1
++idouble: 1
++ildouble: 4
++ldouble: 4
++
++# jn
++Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "jn (0, 0.75) == 0.864242275166648623555731103820923211":
++float: 1
++ifloat: 1
++Test "jn (0, 10.0) == -0.245935764451348335197760862485328754":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++ildouble: 2
++ldouble: 2
++Test "jn (0, 2.0) == 0.223890779141235668051827454649948626":
++float: 2
++ifloat: 2
++ildouble: 2
++ldouble: 2
++Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "jn (1, -1.0) == -0.440050585744933515959682203718914913":
++ildouble: 1
++ldouble: 1
++Test "jn (1, 0.75) == 0.349243602174862192523281016426251335":
++ildouble: 1
++ldouble: 1
++Test "jn (1, 1.0) == 0.440050585744933515959682203718914913":
++ildouble: 1
++ldouble: 1
++Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883":
++float: 2
++ifloat: 2
++ildouble: 2
++ldouble: 2
++Test "jn (1, 2.0) == 0.576724807756873387202448242269137087":
++double: 1
++idouble: 1
++Test "jn (1, 8.0) == 0.234636346853914624381276651590454612":
++double: 1
++idouble: 1
++ildouble: 4
++ldouble: 4
++Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9":
++ildouble: 1
++ldouble: 1
++Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9":
++ildouble: 1
++ldouble: 1
++Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
++double: 4
++float: 3
++idouble: 4
++ifloat: 3
++ildouble: 2
++ldouble: 2
++Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
++float: 4
++ifloat: 4
++Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563":
++double: 3
++float: 1
++idouble: 3
++ifloat: 1
++ildouble: 2
++ldouble: 2
++Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++
++# lgamma
++Test "lgamma (-0.5) == log(2*sqrt(pi))":
++ildouble: 1
++ldouble: 1
++Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++# log10
++Test "log10 (0.75) == -0.124938736608299953132449886193870744":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++Test "log10 (e) == log10(e)":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++# log1p
++Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
++float: 1
++ifloat: 1
++
++# log2
++Test "log2 (0.75) == -.415037499278843818546261056052183492":
++ildouble: 1
++ldouble: 1
++
++# sincos
++Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
++float: 1
++ifloat: 1
++
++# sqrt
++Test "sqrt (2) == M_SQRT2l":
++ildouble: 1
++ldouble: 1
++
++# tanh
++Test "tanh (-0.75) == -0.635148952387287319214434357312496495":
++ildouble: 1
++ldouble: 1
++Test "tanh (-1.0) == -0.7615941559557648881194582826047935904":
++ildouble: 1
++ldouble: 1
++Test "tanh (0.75) == 0.635148952387287319214434357312496495":
++ildouble: 1
++ldouble: 1
++Test "tanh (1.0) == 0.7615941559557648881194582826047935904":
++ildouble: 1
++ldouble: 1
++
++# tgamma
++Test "tgamma (-0.5) == -2 sqrt (pi)":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "tgamma (0.5) == sqrt (pi)":
++float: 1
++ifloat: 1
++Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++Test "tgamma (4) == 6":
++ildouble: 1
++ldouble: 1
++
++# y0
++Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++Test "y0 (1.5) == 0.382448923797758843955068554978089862":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
++float: 1
++ifloat: 1
++ildouble: 3
++ldouble: 3
++Test "y0 (8.0) == 0.223521489387566220527323400498620359":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 3
++ldouble: 3
++
++# y1
++Test "y1 (0.125) == -5.19993611253477499595928744876579921":
++double: 1
++idouble: 1
++Test "y1 (0.75) == -1.03759455076928541973767132140642198":
++ildouble: 1
++ldouble: 1
++Test "y1 (1.5) == -0.412308626973911295952829820633445323":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "y1 (10.0) == 0.249015424206953883923283474663222803":
++double: 3
++float: 1
++idouble: 3
++ifloat: 1
++Test "y1 (2.0) == -0.107032431540937546888370772277476637":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "y1 (8.0) == -0.158060461731247494255555266187483550":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++# yn
++Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++Test "yn (0, 1.5) == 0.382448923797758843955068554978089862":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
++float: 1
++ifloat: 1
++ildouble: 3
++ldouble: 3
++Test "yn (0, 8.0) == 0.223521489387566220527323400498620359":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 3
++ldouble: 3
++Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
++double: 1
++idouble: 1
++Test "yn (1, 0.75) == -1.03759455076928541973767132140642198":
++ildouble: 1
++ldouble: 1
++Test "yn (1, 1.5) == -0.412308626973911295952829820633445323":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
++double: 3
++float: 1
++idouble: 3
++ifloat: 1
++Test "yn (1, 2.0) == -0.107032431540937546888370772277476637":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 1
++ldouble: 1
++Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
++double: 1
++idouble: 1
++ildouble: 2
++ldouble: 2
++Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 5
++ldouble: 5
++Test "yn (10, 1.0) == -121618014.278689189288130426667971145":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 2
++ldouble: 2
++Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
++double: 2
++idouble: 2
++ildouble: 2
++ldouble: 2
++Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
++double: 1
++idouble: 1
++Test "yn (3, 0.75) == -12.9877176234475433186319774484809207":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 2
++ldouble: 2
++Test "yn (3, 10.0) == -0.251362657183837329779204747654240998":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
++double: 1
++idouble: 1
++
++# Maximal error of functions:
++Function: "atan2":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: "atanh":
++float: 1
++ifloat: 1
++
++Function: Imaginary part of "cacos":
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "cacosh":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "casin":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++
++Function: Imaginary part of "casin":
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "casinh":
++double: 5
++float: 1
++idouble: 5
++ifloat: 1
++ildouble: 4
++ldouble: 4
++
++Function: Imaginary part of "casinh":
++double: 3
++float: 6
++idouble: 3
++ifloat: 6
++ildouble: 2
++ldouble: 2
++
++Function: Imaginary part of "catan":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "catanh":
++double: 4
++idouble: 4
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "catanh":
++ildouble: 1
++ldouble: 1
++
++Function: "cbrt":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "ccos":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "ccos":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "ccosh":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "ccosh":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "cexp":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "cexp":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "clog":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "clog10":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "clog10":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: "cos":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "cpow":
++double: 2
++float: 4
++idouble: 2
++ifloat: 4
++ildouble: 10
++ldouble: 10
++
++Function: Imaginary part of "cpow":
++double: 2
++float: 2
++idouble: 2
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "csin":
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "csin":
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "csinh":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "csinh":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++
++Function: Real part of "csqrt":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "csqrt":
++ildouble: 1
++ldouble: 1
++
++Function: Real part of "ctan":
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "ctan":
++double: 1
++idouble: 1
++ildouble: 2
++ldouble: 2
++
++Function: Real part of "ctanh":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++Function: Imaginary part of "ctanh":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: "erf":
++double: 1
++idouble: 1
++
++Function: "erfc":
++double: 1
++idouble: 1
++ildouble: 1
++ldouble: 1
++
++Function: "exp10":
++double: 6
++float: 2
++idouble: 6
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++Function: "exp2":
++ildouble: 2
++ldouble: 2
++
++Function: "expm1":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: "gamma":
++ildouble: 1
++ldouble: 1
++
++Function: "hypot":
++float: 1
++ifloat: 1
++
++Function: "j0":
++double: 2
++float: 2
++idouble: 2
++ifloat: 2
++ildouble: 2
++ldouble: 2
++
++Function: "j1":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 4
++ldouble: 4
++
++Function: "jn":
++double: 4
++float: 4
++idouble: 4
++ifloat: 4
++ildouble: 4
++ldouble: 4
++
++Function: "lgamma":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++Function: "log10":
++double: 1
++float: 2
++idouble: 1
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++Function: "log1p":
++float: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: "log2":
++ildouble: 1
++ldouble: 1
++
++Function: "sincos":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: "sqrt":
++ildouble: 1
++ldouble: 1
++
++Function: "tan":
++double: 1
++idouble: 1
++
++Function: "tanh":
++ildouble: 1
++ldouble: 1
++
++Function: "tgamma":
++double: 1
++float: 1
++idouble: 1
++ifloat: 1
++ildouble: 1
++ldouble: 1
++
++Function: "y0":
++double: 2
++float: 1
++idouble: 2
++ifloat: 1
++ildouble: 3
++ldouble: 3
++
++Function: "y1":
++double: 3
++float: 2
++idouble: 3
++ifloat: 2
++ildouble: 1
++ldouble: 1
++
++Function: "yn":
++double: 3
++float: 2
++idouble: 3
++ifloat: 2
++ildouble: 5
++ldouble: 5
++
++# end of automatic generation
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/mips/tst-audit.h ports/sysdeps/mips/tst-audit.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/mips/tst-audit.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/mips/tst-audit.h 2006-05-08 21:19:56.000000000 +0200
+@@ -0,0 +1,40 @@
++/* Definitions for testing PLT entry/exit auditing. ARM version.
++
++ Copyright (C) 2005 Free Software Foundation, Inc.
++
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <sgidefs.h>
++
++#if _MIPS_SIM == _ABIO32
++#define pltenter la_mips_o32_gnu_pltenter
++#define pltexit la_mips_o32_gnu_pltexit
++#define La_regs La_mips_32_regs
++#define La_retval La_mips_32_retval
++#else
++#if _MIPS_SIM == _ABIN32
++#define pltenter la_mips_n32_gnu_pltenter
++#define pltexit la_mips_n32_gnu_pltexit
++#else
++#define pltenter la_mips_n64_gnu_pltenter
++#define pltexit la_mips_n64_gnu_pltexit
++#endif
++#define La_regs La_mips_64_regs
++#define La_retval La_mips_64_retval
++#endif
++#define int_retval lrv_v0
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/bits/fcntl.h ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/bits/fcntl.h 2004-08-23 09:28:44.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h 2006-06-08 19:16:08.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* O_*, F_*, FD_* bit values for Linux.
+- Copyright (C) 1995-1998, 2000, 2004 Free Software Foundation, Inc.
++ Copyright (C) 1995-1998, 2000, 2004, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -21,35 +21,34 @@
+ # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+ #endif
+
+-
+ #include <sys/types.h>
++#ifdef __USE_GNU
++# include <bits/uio.h>
++#endif
++
+
+ /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
+ located on an ext2 file system */
+-#define O_ACCMODE 0003
+-#define O_RDONLY 00
+-#define O_WRONLY 01
+-#define O_RDWR 02
+-#define O_CREAT 0100 /* not fcntl */
+-#define O_EXCL 0200 /* not fcntl */
+-#define O_NOCTTY 0400 /* not fcntl */
+-#define O_TRUNC 01000 /* not fcntl */
+-#define O_APPEND 02000
+-#define O_NONBLOCK 04000
++#define O_ACCMODE 0003
++#define O_RDONLY 00
++#define O_WRONLY 01
++#define O_RDWR 02
++#define O_CREAT 0100 /* not fcntl */
++#define O_EXCL 0200 /* not fcntl */
++#define O_NOCTTY 0400 /* not fcntl */
++#define O_TRUNC 01000 /* not fcntl */
++#define O_APPEND 02000
++#define O_NONBLOCK 04000
+ #define O_NDELAY O_NONBLOCK
+-#define O_SYNC 010000
+-#define O_FSYNC O_SYNC
+-#define O_ASYNC 020000
++#define O_SYNC 010000
++#define O_FSYNC O_SYNC
++#define O_ASYNC 020000
+
+ #ifdef __USE_GNU
+-# define O_DIRECTORY 040000 /* Must be a directory. */
++# define O_DIRECTORY 040000 /* Must be a directory. */
+ # define O_NOFOLLOW 0100000 /* Do not follow links. */
+ # define O_DIRECT 0200000 /* Direct disk access. */
+-# define O_NOATIME 01000000 /* Do not set atime. */
+-#endif
+-
+-#ifdef __USE_LARGEFILE64
+-# define O_LARGEFILE 0400000
++# define O_NOATIME 01000000 /* Do not set atime. */
+ #endif
+
+ /* For now Linux has synchronisity options for data and read operations.
+@@ -60,13 +59,16 @@
+ # define O_RSYNC O_SYNC /* Synchronize read operations. */
+ #endif
+
++#ifdef __USE_LARGEFILE64
++# define O_LARGEFILE 0400000
++#endif
++
+ /* Values for the second argument to `fcntl'. */
+ #define F_DUPFD 0 /* Duplicate file descriptor. */
+ #define F_GETFD 1 /* Get file descriptor flags. */
+ #define F_SETFD 2 /* Set file descriptor flags. */
+ #define F_GETFL 3 /* Get file status flags. */
+ #define F_SETFL 4 /* Set file status flags. */
+-
+ #ifndef __USE_FILE_OFFSET64
+ # define F_GETLK 5 /* Get record locking info. */
+ # define F_SETLK 6 /* Set record locking info (non-blocking). */
+@@ -104,12 +106,12 @@
+ #define F_WRLCK 1 /* Write lock. */
+ #define F_UNLCK 2 /* Remove lock. */
+
+-/* for old implementation of bsd flock () */
++/* For old implementation of bsd flock(). */
+ #define F_EXLCK 4 /* or 3 */
+ #define F_SHLCK 8 /* or 4 */
+
+ #ifdef __USE_BSD
+-/* Operations for bsd flock(), also used by the kernel implementation */
++/* Operations for bsd flock(), also used by the kernel implementation. */
+ # define LOCK_SH 1 /* shared lock */
+ # define LOCK_EX 2 /* exclusive lock */
+ # define LOCK_NB 4 /* or'd with one of the above to prevent
+@@ -180,10 +182,54 @@
+ # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
+ #endif
+
++
++#ifdef __USE_GNU
++/* Flags for SYNC_FILE_RANGE. */
++# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
++ in the range before performing the
++ write. */
++# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
++ dirty pages in the range which are
++ not presently under writeback. */
++# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
++ the range after performing the
++ write. */
++
++/* Flags for SPLICE and VMSPLICE. */
++# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
++# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
++ (but we may still block on the fd
++ we splice from/to). */
++# define SPLICE_F_MORE 4 /* Expect more data. */
++# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
++#endif
++
+ __BEGIN_DECLS
+
++#ifdef __USE_GNU
++
+ /* Provide kernel hint to read ahead. */
+ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
+ __THROW;
+
++
++/* Selective file content synch'ing. */
++extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
++ unsigned int __flags);
++
++
++/* Splice address range into a pipe. */
++extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
++ unsigned int __flags);
++
++/* Splice two files together. */
++extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
++ __THROW;
++
++/* In-kernel implementation of tee for pipe buffers. */
++extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
++ __THROW;
++
++#endif
++
+ __END_DECLS
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/bits/mman.h ports/sysdeps/unix/sysv/linux/arm/bits/mman.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/bits/mman.h 2005-10-31 21:41:32.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/arm/bits/mman.h 2006-05-05 16:17:13.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* Definitions for POSIX memory map interface. Linux/ARM version.
+- Copyright (C) 1997, 2000, 2003, 2005 Free Software Foundation, Inc.
++ Copyright (C) 1997, 2000, 2003, 2005, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -18,7 +18,7 @@
+ 02111-1307 USA. */
+
+ #ifndef _SYS_MMAN_H
+-# error "Never include this file directly. Use <sys/mman.h> instead"
++# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
+ #endif
+
+ /* The following definitions basically come from the kernel headers.
+@@ -88,6 +88,9 @@
+ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+ # define MADV_WILLNEED 3 /* Will need these pages. */
+ # define MADV_DONTNEED 4 /* Don't need these pages. */
++# define MADV_REMOVE 9 /* Remove these pages and resources. */
++# define MADV_DONTFORK 10 /* Do not inherit across fork. */
++# define MADV_DOFORK 11 /* Do inherit across fork. */
+ #endif
+
+ /* The POSIX people had to invent similar names for the same things. */
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h ports/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h 2005-11-16 19:08:53.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h 2006-03-21 21:54:56.000000000 +0100
+@@ -53,9 +53,9 @@
+ UNDOARGS_##args; \
+ cmn r0, $4096;
+
+-/* DOARGS pushes four bytes on the stack for five arguments, and nothing
+- otherwise. In order to preserve doubleword alignment, sometimes we must
+- save an extra register. */
++/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for
++ six arguments, and nothing for fewer. In order to preserve doubleword
++ alignment, sometimes we must save an extra register. */
+
+ # define DOCARGS_0 stmfd sp!, {r7, lr}
+ # define UNDOCARGS_0
+@@ -81,6 +81,10 @@
+ # define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}
+ # define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr}
+
++# define DOCARGS_6 stmfd sp!, {r0, r1, r2, r3, r7, lr}
++# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3}
++# define RESTORE_LR_6 RESTORE_LR_0
++
+ # ifdef IS_IN_libpthread
+ # define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
+ # define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h 2005-11-16 20:03:42.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h 2006-03-21 21:54:56.000000000 +0100
+@@ -64,9 +64,9 @@
+ UNDOARGS_##args; \
+ cmn r0, $4096;
+
+-/* DOARGS pushes four bytes on the stack for five arguments, and nothing
+- otherwise. In order to preserve doubleword alignment, sometimes we must
+- save an extra register. */
++/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for
++ six arguments, and nothing for fewer. In order to preserve doubleword
++ alignment, sometimes we must save an extra register. */
+
+ # define RESTART_UNWIND .fnend; .fnstart; .save {r7, lr}
+
+@@ -94,6 +94,10 @@
+ # define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4}; .save {r7, lr}; .pad #4
+ # define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr}
+
++# define DOCARGS_6 .save {r4, r5}; stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #20
++# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4, r5}; .save {r7, lr}
++# define RESTORE_LR_6 RESTORE_LR_0
++
+ # ifdef IS_IN_libpthread
+ # define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
+ # define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/eabi/socket.S ports/sysdeps/unix/sysv/linux/arm/eabi/socket.S
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/eabi/socket.S 2005-11-16 20:03:42.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/arm/eabi/socket.S 1970-01-01 01:00:00.000000000 +0100
+@@ -1,131 +0,0 @@
+-/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2005
+- Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+-
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Lesser General Public
+- License as published by the Free Software Foundation; either
+- version 2.1 of the License, or (at your option) any later version.
+-
+- The GNU C Library 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
+- Lesser General Public License for more details.
+-
+- You should have received a copy of the GNU Lesser General Public
+- License along with the GNU C Library; if not, write to the Free
+- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+- 02111-1307 USA. */
+-
+-#include <sysdep-cancel.h>
+-#include <socketcall.h>
+-
+-#define P(a, b) P2(a, b)
+-#define P2(a, b) a##b
+-
+- .text
+-/* The socket-oriented system calls are handled unusally in Linux.
+- They are all gated through the single `socketcall' system call number.
+- `socketcall' takes two arguments: the first is the subcode, specifying
+- which socket function is being called; and the second is a pointer to
+- the arguments to the specific function.
+-
+- The .S files for the other calls just #define socket and #include this. */
+-
+-#ifndef __socket
+-# ifndef NO_WEAK_ALIAS
+-# define __socket P(__,socket)
+-# else
+-# define __socket socket
+-# endif
+-#endif
+-
+-#define PUSHARGS_1 str a1, [sp, $-8]!; .pad #8
+-#define PUSHARGS_2 stmfd sp!, {a1, a2}; .pad #8
+-#define PUSHARGS_3 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* a4 pushed for padding */
+-#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4}; .pad #16
+-#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* Caller has already pushed arg 5 */
+-#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4}; .pad #16
+-
+-#define POPARGS_1 add sp, sp, #8
+-#define POPARGS_2 add sp, sp, #8
+-#define POPARGS_3 add sp, sp, #16
+-#define POPARGS_4 add sp, sp, #16
+-#define POPARGS_5 add sp, sp, #16
+-#define POPARGS_6 add sp, sp, #16
+-
+-#ifndef NARGS
+-#define NARGS 3 /* If we were called with no wrapper, this is really socket() */
+-#endif
+-
+-#if defined NEED_CANCELLATION && defined CENABLE
+- PSEUDO_PROLOGUE
+-#endif
+-
+-.globl __socket
+-ENTRY (__socket)
+- .fnstart
+-
+- /* This code previously moved sp into ip and stored the args using
+- stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
+- to be restored after the syscall completed. It saved an
+- instruction and meant no stack cleanup work was required.
+-
+- This will not work in the case of a socket call being interrupted
+- by a signal. If the signal handler uses any stack the arguments
+- to socket will be trashed. The results of a restart of any
+- socket call are then unpredictable. */
+-
+- /* Push args onto the stack. */
+- P(PUSHARGS_,NARGS)
+-
+-#if defined NEED_CANCELLATION && defined CENABLE
+- SINGLE_THREAD_P
+- bne 1f
+-#endif
+-
+- /* Do the system call trap. */
+- mov a1, $P(SOCKOP_,socket)
+- mov a2, sp
+- DO_CALL (socketcall, 0)
+-
+- /* Pop args off the stack */
+- P(POPARGS_,NARGS)
+-
+- /* r0 is < 0 if there was an error. */
+- cmn r0, $124
+- RETINSTR(cc, r14)
+- b PLTJMP(SYSCALL_ERROR)
+-
+-#if defined NEED_CANCELLATION && defined CENABLE
+-1:
+- stmfd sp!, {r7, lr}
+- .save {r7, lr}
+- CENABLE
+- mov ip, r0
+-
+- mov r0, #P(SOCKOP_,socket)
+- add r1, sp, #8
+- mov r7, #SYS_ify(socketcall)
+- swi 0x0
+-
+- mov r7, r0
+- mov r0, ip
+- CDISABLE
+- mov r0, r7
+- ldmfd sp!, {r7, lr}
+-
+- P(POPARGS_,NARGS)
+-
+- /* r0 is < 0 if there was an error. */
+- cmn r0, $124
+- RETINSTR(cc, r14)
+- b PLTJMP(SYSCALL_ERROR)
+-#endif
+-
+- .fnend
+-PSEUDO_END (__socket)
+-
+-#ifndef NO_WEAK_ALIAS
+-weak_alias (__socket, socket)
+-#endif
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list 2006-03-21 21:54:56.000000000 +0100
+@@ -0,0 +1,34 @@
++# File name Caller Syscall name # args Strong name Weak names
++
++# semaphore and shm system calls
++msgctl - msgctl i:iip __msgctl msgctl
++msgget - msgget i:ii __msgget msgget
++msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
++msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
++shmat - shmat i:ipi __shmat shmat
++shmctl - shmctl i:iip __shmctl shmctl
++shmdt - shmdt i:s __shmdt shmdt
++shmget - shmget i:iii __shmget shmget
++semop - semop i:ipi __semop semop
++semtimedop - semtimedop i:ipip semtimedop
++semget - semget i:iii __semget semget
++semctl - semctl i:iiii __semctl semctl
++
++# proper socket implementations:
++accept - accept Ci:iBN __libc_accept __accept accept
++bind - bind i:ipi __bind bind
++connect - connect Ci:ipi __libc_connect __connect_internal __connect connect
++getpeername - getpeername i:ipp __getpeername getpeername
++getsockname - getsockname i:ipp __getsockname getsockname
++getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
++listen - listen i:ii __listen listen
++recv - recv Ci:ibni __libc_recv __recv recv
++recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
++recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg
++send - send Ci:ibni __libc_send __send send
++sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg
++sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
++setsockopt - setsockopt i:iiibn __setsockopt setsockopt
++shutdown - shutdown i:ii __shutdown shutdown
++socket - socket i:iii __socket socket
++socketpair - socketpair i:iiif __socketpair socketpair
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h 2005-11-16 20:03:42.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h 2006-03-21 21:54:56.000000000 +0100
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2005
++/* Copyright (C) 2005, 2006
+ Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+@@ -29,6 +29,12 @@
+ # error Kernel headers are too old
+ #endif
+
++/* Don't use stime, even if the kernel headers define it. We have
++ settimeofday, and some EABI kernels have removed stime. Similarly
++ use setitimer to implement alarm. */
++#undef __NR_stime
++#undef __NR_alarm
++
+ /* The ARM EABI user interface passes the syscall number in r7, instead
+ of in the swi. This is more efficient, because the kernel does not need
+ to fetch the swi from memory to find out the number; which can be painful
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/eabi/umount.c ports/sysdeps/unix/sysv/linux/arm/eabi/umount.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/eabi/umount.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/arm/eabi/umount.c 2006-03-21 21:54:56.000000000 +0100
+@@ -0,0 +1,31 @@
++/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by David Huggins-Daines <dhd@debian.org>, 2000.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++/* Since we don't have an oldumount system call, do what the kernel
++ does down here. */
++
++extern long int __umount2 (const char *name, int flags);
++
++long int
++__umount (const char *name)
++{
++ return __umount2 (name, 0);
++}
++
++weak_alias (__umount, umount);
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/kernel-features.h ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/kernel-features.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/arm/kernel-features.h 2006-05-30 17:12:30.000000000 +0200
+@@ -0,0 +1,49 @@
++/* Set flags signalling availability of kernel features based on given
++ kernel version number.
++ Copyright (C) 2006 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++/* The utimes syscall was added before 2.6.1. */
++#if __LINUX_KERNEL_VERSION >= 132609
++# define __ASSUME_UTIMES 1
++#endif
++
++/* The new getrlimit syscall was added sometime before 2.4.6. */
++#if __LINUX_KERNEL_VERSION >= 132102
++#define __ASSUME_NEW_GETRLIMIT_SYSCALL 1
++#endif
++
++/* On ARM the truncate64/ftruncate64/mmap2/stat64/lstat64/fstat64
++ syscalls were introduced in 2.3.35. */
++#if __LINUX_KERNEL_VERSION >= 131875
++# define __ASSUME_TRUNCATE64_SYSCALL 1
++# define __ASSUME_MMAP2_SYSCALL 1
++# define __ASSUME_STAT64_SYSCALL 1
++#endif
++
++/* Arm got fcntl64 in 2.4.4. */
++#if __LINUX_KERNEL_VERSION >= 132100
++# define __ASSUME_FCNTL64 1
++#endif
++
++/* The vfork syscall on arm was definitely available in 2.4. */
++#if __LINUX_KERNEL_VERSION >= 132097 && defined __i386__
++# define __ASSUME_VFORK_SYSCALL 1
++#endif
++
++#include_next <kernel-features.h>
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/sigaction.c ports/sysdeps/unix/sysv/linux/arm/sigaction.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/sigaction.c 2005-11-16 20:03:42.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/arm/sigaction.c 2006-07-24 17:43:02.000000000 +0200
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
++/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005, 2006
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+@@ -151,6 +151,10 @@
+ }
+ libc_hidden_def (__libc_sigaction)
+
++#ifdef WRAPPER_INCLUDE
++# include WRAPPER_INCLUDE
++#endif
++
+ #ifndef LIBC_SIGACTION
+ weak_alias (__libc_sigaction, __sigaction)
+ libc_hidden_weak (__sigaction)
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/sys/ucontext.h ports/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/arm/sys/ucontext.h 2001-07-06 06:56:13.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/arm/sys/ucontext.h 2006-07-05 18:58:01.000000000 +0200
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
++/* Copyright (C) 1998, 1999, 2001, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -25,10 +25,14 @@
+ #include <signal.h>
+ #include <sys/procfs.h>
+
++/* We need the signal context definitions even if they are not used
++ included in <signal.h>. */
++#include <bits/sigcontext.h>
++
+ typedef int greg_t;
+
+ /* Number of general registers. */
+-#define NGREG 16
++#define NGREG 18
+
+ /* Container for all general registers. */
+ typedef elf_gregset_t gregset_t;
+@@ -73,22 +77,21 @@
+ /* Structure to describe FPU registers. */
+ typedef elf_fpregset_t fpregset_t;
+
+-/* Context to describe whole processor state. */
+-typedef struct
+- {
+- gregset_t gregs;
+- fpregset_t fpregs;
+- } mcontext_t;
++/* Context to describe whole processor state. This only describes
++ the core registers; coprocessor registers get saved elsewhere
++ (e.g. in uc_regspace, or somewhere unspecified on the stack
++ during non-RT signal handlers). */
++typedef struct sigcontext mcontext_t;
+
+ /* Userlevel context. */
+ typedef struct ucontext
+ {
+- unsigned long int uc_flags;
++ unsigned long uc_flags;
+ struct ucontext *uc_link;
+- __sigset_t uc_sigmask;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+- long int uc_filler[5];
++ __sigset_t uc_sigmask;
++ unsigned long uc_regspace[128] __attribute__((__aligned__(8)));
+ } ucontext_t;
+
+ #endif /* sys/ucontext.h */
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/bits/atomic.h ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/bits/atomic.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h 2006-06-09 03:25:30.000000000 +0200
+@@ -0,0 +1,120 @@
++/* Copyright (C) 2003 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Carlos O'Donell <carlos@baldric.uwo.ca>, 2005.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <stdint.h>
++#include <sysdep.h>
++#include <abort-instr.h>
++#include <kernel-features.h>
++
++/* We need EFAULT, ENONSYS, and EAGAIN */
++#if !defined EFAULT && !defined ENOSYS && !defined EAGAIN
++#undef EFAULT
++#undef ENOSYS
++#undef EAGAIN
++#define EFAULT 14
++#define ENOSYS 251
++#define EAGAIN 11
++#endif
++
++#ifndef _BITS_ATOMIC_H
++#define _BITS_ATOMIC_H 1
++
++typedef int8_t atomic8_t;
++typedef uint8_t uatomic8_t;
++typedef int_fast8_t atomic_fast8_t;
++typedef uint_fast8_t uatomic_fast8_t;
++
++typedef int32_t atomic32_t;
++typedef uint32_t uatomic32_t;
++typedef int_fast32_t atomic_fast32_t;
++typedef uint_fast32_t uatomic_fast32_t;
++
++typedef intptr_t atomicptr_t;
++typedef uintptr_t uatomicptr_t;
++typedef intmax_t atomic_max_t;
++typedef uintmax_t uatomic_max_t;
++
++/* prev = *addr;
++ if (prev == old)
++ *addr = new;
++ return prev; */
++
++/* Use the kernel atomic light weight syscalls on hppa */
++#define LWS "0xb0"
++#define LWS_CAS 0x0
++/* Note r31 is the link register */
++#define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory"
++#define ASM_EAGAIN "11"
++
++#if __ASSUME_LWS_CAS
++/* The only basic operation needed is compare and exchange. */
++# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
++ ({ \
++ volatile int lws_errno = EFAULT; \
++ volatile int lws_ret = 0xdeadbeef; \
++ asm volatile( \
++ "0: \n\t" \
++ "copy %3, %%r26 \n\t" \
++ "copy %4, %%r25 \n\t" \
++ "copy %5, %%r24 \n\t" \
++ "ble " LWS "(%%sr2, %%r0) \n\t" \
++ "ldi 0, %%r20 \n\t" \
++ "cmpib,=,n " ASM_EAGAIN ",%%r21,0 \n\t" \
++ "nop \n\t" \
++ "stw %%r28, %0 \n\t" \
++ "sub %%r0, %%r21, %%r21 \n\t" \
++ "stw %%r21, %1 \n\t" \
++ : "=m" (lws_ret), "=m" (lws_errno), "=m" (*mem) \
++ : "r" (mem), "r" (oldval), "r" (newval) \
++ : LWS_CLOBBER \
++ ); \
++ \
++ if(lws_errno == EFAULT || lws_errno == ENOSYS) \
++ ABORT_INSTRUCTION; \
++ \
++ lws_ret; \
++ })
++
++# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
++ ({ \
++ int ret; \
++ ret = atomic_compare_and_exchange_val_acq(mem, newval, oldval); \
++ /* Return 1 if it was already acquired */ \
++ (ret != oldval); \
++ })
++#else
++/* Non-atomic primitives. */
++# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
++ ({ __typeof (mem) __gmemp = (mem); \
++ __typeof (*mem) __gret = *__gmemp; \
++ __typeof (*mem) __gnewval = (newval); \
++ \
++ if (__gret == (oldval)) \
++ *__gmemp = __gnewval; \
++ __gret; })
++
++# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
++ ({ __typeof (mem) __gmemp = (mem); \
++ __typeof (*mem) __gnewval = (newval); \
++ \
++ *__gmemp == (oldval) ? (*__gmemp = __gnewval, 0) : 1; })
++#endif
++
++#endif /* bits/atomic.h */
++
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h 2004-08-23 09:28:44.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h 2006-06-09 02:48:17.000000000 +0200
+@@ -23,7 +23,9 @@
+ #endif
+
+ #include <sys/types.h>
+-
++#ifdef __USE_GNU
++# include <bits/uio.h>
++#endif
+
+ /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
+ located on an ext2 file system */
+@@ -44,10 +46,10 @@
+
+
+ #ifdef __USE_GNU
+-# define O_DIRECT 00040000 /* direct disk access hint - currently ignored */
+-# define O_DIRECTORY 00010000 /* must be a directory */
+-# define O_NOFOLLOW 00000200 /* don't follow links */
+-# define O_NOATIME 04000000 /* Do not set atime. */
++# define O_DIRECT 00040000 /* Direct disk access. */
++# define O_DIRECTORY 00010000 /* Must be a directory. */
++# define O_NOFOLLOW 00000200 /* Do not follow links. */
++# define O_NOATIME 04000000 /* Do not set atime. */
+ #endif
+
+ #ifdef __USE_LARGEFILE64
+@@ -74,7 +76,6 @@
+ # define F_SETLK F_SETLK64 /* Set record locking info (non-blocking). */
+ # define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
+ #endif
+-
+ #define F_GETLK64 8 /* Get record locking info. */
+ #define F_SETLK64 9 /* Set record locking info (non-blocking). */
+ #define F_SETLKW64 10 /* Set record locking info (blocking). */
+@@ -172,10 +173,50 @@
+ # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
+ #endif
+
++#ifdef __USE_GNU
++# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
++ in the range before performing the
++ write. */
++# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
++ dirty pages in the range which are
++ not presently under writeback. */
++# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
++ the range after performing the
++ write. */
++
++/* Flags for SPLICE and VMSPLICE. */
++# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
++# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
++ (but we may still block on the fd
++ we splice from/to). */
++# define SPLICE_F_MORE 4 /* Expect more data. */
++# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
++#endif
++
+ __BEGIN_DECLS
+
++#ifdef __USE_GNU
++
+ /* Provide kernel hint to read ahead. */
+ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
+ __THROW;
+
++/* Selective file content synch'ing. */
++extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
++ unsigned int __flags);
++
++/* Splice address range into a pipe. */
++extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
++ unsigned int __flags);
++
++/* Splice two files together. */
++extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
++ __THROW;
++
++/* In-kernel implementation of tee for pipe buffers. */
++extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
++ __THROW;
++
++#endif
++
+ __END_DECLS
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/bits/mman.h ports/sysdeps/unix/sysv/linux/hppa/bits/mman.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/bits/mman.h 2003-09-25 18:39:38.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/hppa/bits/mman.h 2006-05-24 17:31:25.000000000 +0200
+@@ -53,14 +53,20 @@
+ #define MCL_CURRENT 1 /* lock all current mappings */
+ #define MCL_FUTURE 2 /* lock all future mappings */
+
+-#define MADV_NORMAL 0 /* no further special treatment */
+-#define MADV_RANDOM 1 /* expect random page references */
+-#define MADV_SEQUENTIAL 2 /* expect sequential page references */
+-#define MADV_WILLNEED 3 /* will need these pages */
+-#define MADV_DONTNEED 4 /* dont need these pages */
+-#define MADV_SPACEAVAIL 5 /* insure that resources are reserved */
+-#define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */
+-#define MADV_VPS_INHERIT 7 /* Inherit parents page size */
++/* Advice to "madvise" */
++#ifdef __USE_BSD
++# define MADV_NORMAL 0 /* no further special treatment */
++# define MADV_RANDOM 1 /* expect random page references */
++# define MADV_SEQUENTIAL 2 /* expect sequential page references */
++# define MADV_WILLNEED 3 /* will need these pages */
++# define MADV_DONTNEED 4 /* dont need these pages */
++# define MADV_SPACEAVAIL 5 /* insure that resources are reserved */
++# define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */
++# define MADV_VPS_INHERIT 7 /* Inherit parents page size */
++# define MADV_REMOVE 9 /* Remove these pages and resources. */
++# define MADV_DONTFORK 10 /* Do not inherit across fork. */
++# define MADV_DOFORK 11 /* Do inherit across fork. */
++#endif
+
+ /* The range 12-64 is reserved for page size specification. */
+ #define MADV_4K_PAGES 12 /* Use 4K pages */
+@@ -80,4 +86,7 @@
+ /* Flags for `mremap'. */
+ #ifdef __USE_GNU
+ # define MREMAP_MAYMOVE 1
++# define MREMAP_FIXED 2
+ #endif
++
++
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/clone.S ports/sysdeps/unix/sysv/linux/hppa/clone.S
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/clone.S 2005-05-26 16:30:47.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/hppa/clone.S 2006-05-24 17:33:28.000000000 +0200
+@@ -26,35 +26,62 @@
+ #define _ERRNO_H 1
+ #include <bits/errno.h>
+
+-/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
++/* Non-thread code calls __clone with the following parameters:
++ int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg)
++
++ NPTL Code will call __clone with the following parameters:
++ int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
++ int *parent_tidptr, struct user_desc *newtls, int *child_pidptr)
++
++ The code should not mangle the extra input registers.
++ Syscall expects: Input to __clone:
++ 4(r25) - function pointer (r26, arg0)
++ 0(r25) - argument (r23, arg3)
++ r26 - clone flags. (r24, arg2)
++ r25+64 - user stack pointer. (r25, arg1)
++ r24 - parent tid pointer. (stack - 52)
++ r23 - struct user_desc newtls pointer. (stack - 56)
++ r22 - child tid pointer. (stack - 60)
++ r20 - clone syscall number (constant)
++ */
+
+ .text
+ ENTRY(__clone)
+- /* FIXME: I have no idea how profiling works on hppa. */
+
+ /* Sanity check arguments. */
+- comib,= 0,%arg0,.Lerror /* no NULL function pointers */
+ ldi -EINVAL,%ret0
+- comib,= 0,%arg1,.Lerror /* no NULL stack pointers */
+- nop
++ comib,=,n 0,%arg0,.Lerror /* no NULL function pointers */
++ comib,=,n 0,%arg1,.Lerror /* no NULL stack pointers */
+
+ /* Save the fn ptr and arg on the new stack. */
+- stwm %arg0,64(%arg1)
+- stw %arg3,-60(%arg1)
++ stwm %r26,64(%r25)
++ stw %r23,-60(%r25)
++ /* Clone arguments are (int flags, void * child_stack) */
++ copy %r24,%r26 /* flags are first */
++ /* User stack pointer is in the correct register already */
++
++ /* Load args from stack... */
++ ldw -52(%sp), %r24 /* Load parent_tidptr */
++ ldw -56(%sp), %r23 /* Load newtls */
++ ldw -60(%sp), %r22 /* Load child_tidptr */
++
++ /* Create frame to get r3 free */
++ copy %sp, %r21
++ stwm %r3, 64(%sp)
++ stw %r21, -4(%sp)
+
+ /* Save the PIC register. */
+ #ifdef PIC
+- stw %r19,-32(%sr0, %sp) /* parent */
++ copy %r19, %r3 /* parent */
+ #endif
+
+ /* Do the system call */
+- copy %arg2,%arg0
+ ble 0x100(%sr2,%r0)
+ ldi __NR_clone,%r20
+
+ ldi -4096,%r1
+ comclr,>>= %r1,%ret0,%r0 /* Note: unsigned compare. */
+- b,n .Lerror
++ b,n .LerrorRest
+
+ comib,=,n 0,%ret0,thread_start
+
+@@ -63,18 +90,25 @@
+ since we return immediately. */
+
+ bv %r0(%rp)
+- nop
+-
+- /* Something bad happened -- no child created */
+-.Lerror:
++ ldwm -64(%sp), %r3
+
++.LerrorRest:
+ /* Restore the PIC register on error */
+ #ifdef PIC
+- ldw -32(%sr0, %sp), %r19 /* parent */
++ copy %r3, %r19 /* parent */
+ #endif
+
++ /* Something bad happened -- no child created */
++.Lerror:
++
++ /* Set errno, save ret0 so we return with that value. */
++ copy %ret0, %r3
+ b __syscall_error
+ sub %r0,%ret0,%arg0
++ copy %r3, %ret0
++ /* Return after setting errno, and restoring ret0 */
++ bv %r0(%rp)
++ ldwm -64(%sp), %r3
+
+ thread_start:
+
+@@ -92,7 +126,7 @@
+ copy %ret0,%arg0
+
+ /* Die horribly. */
+- iitlbp %r0,(%r0)
++ iitlbp %r0,(%sr0,%r0)
+
+ PSEUDO_END(__clone)
+
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/fxstatat.c ports/sysdeps/unix/sysv/linux/hppa/fxstatat.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/fxstatat.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/fxstatat.c 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1 @@
++#include <sysdeps/unix/sysv/linux/i386/fxstatat.c>
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/fxstat.c ports/sysdeps/unix/sysv/linux/hppa/fxstat.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/fxstat.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/fxstat.c 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1 @@
++#include <sysdeps/unix/sysv/linux/i386/fxstat.c>
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/kernel-features.h ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/kernel-features.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h 2006-06-09 03:25:30.000000000 +0200
+@@ -0,0 +1,39 @@
++/* Set flags signalling availability of kernel features based on given
++ kernel version number.
++ Copyright (C) 2006 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++
++/* There are an infinite number of PA-RISC kernel versions numbered
++ 2.4.0. But they've not really been released as such. We require
++ and expect the final version here. */
++#define __ASSUME_32BITUIDS 1
++#define __ASSUME_TRUNCATE64_SYSCALL 1
++#define __ASSUME_MMAP2_SYSCALL 1
++#define __ASSUME_STAT64_SYSCALL 1
++#define __ASSUME_IPC64 1
++#define __ASSUME_ST_INO_64_BIT 1
++#define __ASSUME_FCNTL64 1
++#define __ASSUME_GETDENTS64_SYSCALL 1
++
++/* PA-RISC 2.6.9 kernels had the first LWS CAS support */
++#if __LINUX_KERNEL_VERSION >= 0x020609
++# define __ASSUME_LWS_CAS 1
++#endif
++
++#include_next <kernel-features.h>
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c ports/sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c 2006-04-19 07:35:34.000000000 +0200
+@@ -0,0 +1,33 @@
++#include <shlib-compat.h>
++
++#define aio_cancel64 XXX
++#include <aio.h>
++#undef aio_cancel64
++#include <errno.h>
++
++extern __typeof (aio_cancel) __new_aio_cancel;
++extern __typeof (aio_cancel) __old_aio_cancel;
++
++#define aio_cancel __new_aio_cancel
++
++#include <sysdeps/pthread/aio_cancel.c>
++
++#undef aio_cancel
++strong_alias (__new_aio_cancel, __new_aio_cancel64);
++versioned_symbol (librt, __new_aio_cancel, aio_cancel, GLIBC_2_3);
++versioned_symbol (librt, __new_aio_cancel64, aio_cancel64, GLIBC_2_3);
++
++#if SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_3)
++
++#undef ECANCELED
++#define aio_cancel __old_aio_cancel
++#define ECANCELED 125
++
++#include <sysdeps/pthread/aio_cancel.c>
++
++#undef aio_cancel
++strong_alias (__old_aio_cancel, __old_aio_cancel64);
++compat_symbol (librt, __old_aio_cancel, aio_cancel, GLIBC_2_1);
++compat_symbol (librt, __old_aio_cancel64, aio_cancel64, GLIBC_2_1);
++
++#endif
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h ports/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h 2006-04-19 07:35:34.000000000 +0200
+@@ -0,0 +1,41 @@
++/* PA-RISC specific definitions for spinlock initializers.
++ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of the
++ License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; see the file COPYING.LIB. If not,
++ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ Boston, MA 02111-1307, USA. */
++
++/* Initial value of a spinlock. PA-RISC only implements atomic load
++ and clear so this must be non-zero. */
++#define __LT_SPINLOCK_INIT ((__atomic_lock_t) { { 1, 1, 1, 1 } })
++
++/* Initialize global spinlocks without cast, generally macro wrapped */
++#define __LT_SPINLOCK_ALT_INIT { { 1, 1, 1, 1 } }
++
++/* Macros for lock initializers, not using the above definition.
++ The above definition is not used in the case that static initializers
++ use this value. */
++#define __LOCK_ALT_INITIALIZER { __LT_SPINLOCK_ALT_INIT, 0 }
++
++/* Used to initialize _pthread_fastlock's in non-static case */
++#define __LOCK_INITIALIZER ((struct _pthread_fastlock){ __LT_SPINLOCK_INIT, 0 })
++
++/* Used in pthread_atomic initialization */
++#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_ALT_INIT }
++
++/* Tell the rest of the code that the initializer is non-zero without
++ explaining it's internal structure */
++#define __LT_INITIALIZER_NOT_ZERO
++
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h ports/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h 2006-04-19 07:35:34.000000000 +0200
+@@ -0,0 +1,160 @@
++/* Linuxthreads - a simple clone()-based implementation of Posix */
++/* threads for Linux. */
++/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
++/* */
++/* This program is free software; you can redistribute it and/or */
++/* modify it under the terms of the GNU Library General Public License */
++/* as published by the Free Software Foundation; either version 2 */
++/* of the License, or (at your option) any later version. */
++/* */
++/* This program is distributed in the hope that it will be useful, */
++/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
++/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
++/* GNU Library General Public License for more details. */
++
++#if !defined _BITS_TYPES_H && !defined _PTHREAD_H
++# error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead."
++#endif
++
++#ifndef _BITS_PTHREADTYPES_H
++#define _BITS_PTHREADTYPES_H 1
++
++#define __need_schedparam
++#include <bits/sched.h>
++
++/* We need 128-bit alignment for the ldcw semaphore. At most, we are
++ assured of 64-bit alignment for stack locals and malloc'd data. Thus,
++ we use a struct with four ints for the atomic lock type. The locking
++ code will figure out which of the four to use for the ldcw semaphore. */
++typedef volatile struct {
++ int lock[4];
++} __attribute__ ((aligned(16))) __atomic_lock_t;
++
++/* Fast locks (not abstract because mutexes and conditions aren't abstract). */
++struct _pthread_fastlock
++{
++ __atomic_lock_t __spinlock; /* Used by compare_and_swap emulation. Also,
++ adaptive SMP lock stores spin count here. */
++ long int __status; /* "Free" or "taken" or head of waiting list */
++};
++
++#ifndef _PTHREAD_DESCR_DEFINED
++/* Thread descriptors */
++typedef struct _pthread_descr_struct *_pthread_descr;
++# define _PTHREAD_DESCR_DEFINED
++#endif
++
++
++/* Attributes for threads. */
++typedef struct __pthread_attr_s
++{
++ int __detachstate;
++ int __schedpolicy;
++ struct __sched_param __schedparam;
++ int __inheritsched;
++ int __scope;
++ size_t __guardsize;
++ int __stackaddr_set;
++ void *__stackaddr;
++ size_t __stacksize;
++} pthread_attr_t;
++
++
++/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */
++
++#ifdef __GLIBC_HAVE_LONG_LONG
++__extension__ typedef long long __pthread_cond_align_t;
++#else
++typedef long __pthread_cond_align_t;
++#endif
++
++typedef struct
++{
++ struct _pthread_fastlock __c_lock; /* Protect against concurrent access */
++ _pthread_descr __c_waiting; /* Threads waiting on this condition */
++ char __padding[48 - sizeof (struct _pthread_fastlock)
++ - sizeof (_pthread_descr) - sizeof (__pthread_cond_align_t)];
++ __pthread_cond_align_t __align;
++} pthread_cond_t;
++
++
++/* Attribute for conditionally variables. */
++typedef struct
++{
++ int __dummy;
++} pthread_condattr_t;
++
++/* Keys for thread-specific data */
++typedef unsigned int pthread_key_t;
++
++
++/* Mutexes (not abstract because of PTHREAD_MUTEX_INITIALIZER). */
++/* (The layout is unnatural to maintain binary compatibility
++ with earlier releases of LinuxThreads.) */
++typedef struct
++{
++ int __m_reserved; /* Reserved for future use */
++ int __m_count; /* Depth of recursive locking */
++ _pthread_descr __m_owner; /* Owner thread (if recursive or errcheck) */
++ int __m_kind; /* Mutex kind: fast, recursive or errcheck */
++ struct _pthread_fastlock __m_lock; /* Underlying fast lock */
++} pthread_mutex_t;
++
++
++/* Attribute for mutex. */
++typedef struct
++{
++ int __mutexkind;
++} pthread_mutexattr_t;
++
++
++/* Once-only execution */
++typedef int pthread_once_t;
++
++
++#ifdef __USE_UNIX98
++/* Read-write locks. */
++typedef struct _pthread_rwlock_t
++{
++ struct _pthread_fastlock __rw_lock; /* Lock to guarantee mutual exclusion */
++ int __rw_readers; /* Number of readers */
++ _pthread_descr __rw_writer; /* Identity of writer, or NULL if none */
++ _pthread_descr __rw_read_waiting; /* Threads waiting for reading */
++ _pthread_descr __rw_write_waiting; /* Threads waiting for writing */
++ int __rw_kind; /* Reader/Writer preference selection */
++ int __rw_pshared; /* Shared between processes or not */
++} pthread_rwlock_t;
++
++
++/* Attribute for read-write locks. */
++typedef struct
++{
++ int __lockkind;
++ int __pshared;
++} pthread_rwlockattr_t;
++#endif
++
++#ifdef __USE_XOPEN2K
++/* POSIX spinlock data type. */
++typedef __atomic_lock_t pthread_spinlock_t;
++
++/* POSIX barrier. */
++typedef struct {
++ struct _pthread_fastlock __ba_lock; /* Lock to guarantee mutual exclusion */
++ int __ba_required; /* Threads needed for completion */
++ int __ba_present; /* Threads waiting */
++ _pthread_descr __ba_waiting; /* Queue of waiting threads */
++} pthread_barrier_t;
++
++/* barrier attribute */
++typedef struct {
++ int __pshared;
++} pthread_barrierattr_t;
++
++#endif
++
++
++/* Thread identifiers */
++typedef unsigned long int pthread_t;
++
++#endif /* bits/pthreadtypes.h */
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h ports/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h 2006-04-19 07:35:34.000000000 +0200
+@@ -0,0 +1,73 @@
++/* HP-PARISC macro definitions for mutexes, thread-specific data
++ and parameters for malloc.
++ Copyright (C) 2003 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Carlos O'Donell <carlos@baldric.uwo.ca>, 2003.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifndef _MALLOC_MACHINE_H
++#define _MALLOC_MACHINE_H
++
++#undef thread_atfork_static
++
++#include <atomic.h>
++#include <bits/libc-lock.h>
++
++__libc_lock_define (typedef, mutex_t)
++
++/* Since our lock structure does not tolerate being initialized to zero, we must
++ modify the standard function calls made by malloc */
++# define mutex_init(m) \
++ __libc_maybe_call (__pthread_mutex_init, (m, NULL), \
++ (((m)->__m_lock.__spinlock = __LT_SPINLOCK_INIT),(*(int *)(m))) )
++# define mutex_lock(m) \
++ __libc_maybe_call (__pthread_mutex_lock, (m), \
++ (__load_and_clear(&((m)->__m_lock.__spinlock)), 0))
++# define mutex_trylock(m) \
++ __libc_maybe_call (__pthread_mutex_trylock, (m), \
++ (*(int *)(m) ? 1 : (__load_and_clear(&((m)->__m_lock.__spinlock)), 0)))
++# define mutex_unlock(m) \
++ __libc_maybe_call (__pthread_mutex_unlock, (m), \
++ (((m)->__m_lock.__spinlock = __LT_SPINLOCK_INIT), (*(int *)(m))) )
++
++/* This is defined by newer gcc version unique for each module. */
++extern void *__dso_handle __attribute__ ((__weak__));
++
++#include <fork.h>
++
++#ifdef SHARED
++# define thread_atfork(prepare, parent, child) \
++ __register_atfork (prepare, parent, child, __dso_handle)
++#else
++# define thread_atfork(prepare, parent, child) \
++ __register_atfork (prepare, parent, child, \
++ &__dso_handle == NULL ? NULL : __dso_handle)
++#endif
++
++/* thread specific data for glibc */
++
++#include <bits/libc-tsd.h>
++
++typedef int tsd_key_t[1]; /* no key data structure, libc magic does it */
++__libc_tsd_define (static, MALLOC) /* declaration/common definition */
++#define tsd_key_create(key, destr) ((void) (key))
++#define tsd_setspecific(key, data) __libc_tsd_set (MALLOC, (data))
++#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (MALLOC))
++
++#include <sysdeps/generic/malloc-machine.h>
++
++#endif /* !defined(_MALLOC_MACHINE_H) */
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c ports/sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c 2006-04-19 07:35:34.000000000 +0200
+@@ -0,0 +1,109 @@
++/* Special .init and .fini section support for HPPA. Linuxthreads version.
++ Copyright (C) 2001, 2003 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it
++ and/or modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ In addition to the permissions in the GNU Lesser General Public
++ License, the Free Software Foundation gives you unlimited
++ permission to link the compiled version of this file with other
++ programs, and to distribute those programs without any restriction
++ coming from the use of this file. (The Lesser General Public
++ License restrictions do apply in other respects; for example, they
++ cover modification of the file, and distribution when not linked
++ into another program.)
++
++ The GNU C Library 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; see the file COPYING.LIB. If not,
++ write to the Free Software Foundation, 59 Temple Place - Suite 330,
++ Boston, MA 02111-1307, USA. */
++
++/* This file is compiled into assembly code which is then munged by a sed
++ script into two files: crti.s and crtn.s.
++
++ * crti.s puts a function prologue at the beginning of the
++ .init and .fini sections and defines global symbols for
++ those addresses, so they can be called as functions.
++
++ * crtn.s puts the corresponding function epilogues
++ in the .init and .fini sections. */
++
++/* If we use the standard C version, the linkage table pointer won't
++ be properly preserved due to the splitting up of function prologues
++ and epilogues. Therefore we write these in assembly to make sure
++ they do the right thing. */
++
++__asm__ (
++"#include \"defs.h\"\n"
++"\n"
++"/*@HEADER_ENDS*/\n"
++"\n"
++"/*@_init_PROLOG_BEGINS*/\n"
++" .section .init\n"
++" .align 4\n"
++" .globl _init\n"
++" .type _init,@function\n"
++"_init:\n"
++" stw %rp,-20(%sp)\n"
++" stwm %r4,64(%sp)\n"
++" stw %r19,-32(%sp)\n"
++" bl __pthread_initialize_minimal,%rp\n"
++" copy %r19,%r4 /* delay slot */\n"
++" copy %r4,%r19\n"
++"/*@_init_PROLOG_ENDS*/\n"
++"\n"
++"/*@_init_EPILOG_BEGINS*/\n"
++"/* Here is the tail end of _init. */\n"
++" .section .init\n"
++" ldw -84(%sp),%rp\n"
++" copy %r4,%r19\n"
++" bv %r0(%rp)\n"
++"_end_init:\n"
++" ldwm -64(%sp),%r4\n"
++"\n"
++"/* Our very own unwind info, because the assembler can't handle\n"
++" functions split into two or more pieces. */\n"
++" .section .PARISC.unwind,\"a\",@progbits\n"
++" .extern _init\n"
++" .word _init, _end_init\n"
++" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n"
++"\n"
++"/*@_init_EPILOG_ENDS*/\n"
++"\n"
++"/*@_fini_PROLOG_BEGINS*/\n"
++" .section .fini\n"
++" .align 4\n"
++" .globl _fini\n"
++" .type _fini,@function\n"
++"_fini:\n"
++" stw %rp,-20(%sp)\n"
++" stwm %r4,64(%sp)\n"
++" stw %r19,-32(%sp)\n"
++" copy %r19,%r4\n"
++"/*@_fini_PROLOG_ENDS*/\n"
++"\n"
++"/*@_fini_EPILOG_BEGINS*/\n"
++" .section .fini\n"
++" ldw -84(%sp),%rp\n"
++" copy %r4,%r19\n"
++" bv %r0(%rp)\n"
++"_end_fini:\n"
++" ldwm -64(%sp),%r4\n"
++"\n"
++" .section .PARISC.unwind,\"a\",@progbits\n"
++" .extern _fini\n"
++" .word _fini, _end_fini\n"
++" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n"
++"\n"
++"/*@_fini_EPILOG_ENDS*/\n"
++"\n"
++"/*@TRAILER_BEGINS*/\n"
++);
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h ports/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h 2006-04-19 07:35:34.000000000 +0200
+@@ -0,0 +1,238 @@
++/* cancellable system calls for Linux/HPPA.
++ Copyright (C) 2003 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Carlos O'Donell <carlos@baldric.uwo.ca>, 2003.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <sysdep.h>
++#include <tls.h>
++#ifndef __ASSEMBLER__
++# include <linuxthreads/internals.h>
++#endif
++
++#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
++
++# ifndef NO_ERROR
++# define NO_ERROR -0x1000
++# endif
++
++/* The syscall cancellation mechanism requires userspace
++ assistance, the following code does roughly this:
++
++ do arguments (read arg5 and arg6 to registers)
++ setup frame
++
++ check if there are threads, yes jump to pseudo_cancel
++
++ unthreaded:
++ syscall
++ check syscall return (jump to pre_end)
++ set errno
++ set return to -1
++ (jump to pre_end)
++
++ pseudo_cancel:
++ cenable
++ syscall
++ cdisable
++ check syscall return (jump to pre_end)
++ set errno
++ set return to -1
++
++ pre_end
++ restore stack
++
++ It is expected that 'ret' and 'END' macros will
++ append an 'undo arguments' and 'return' to the
++ this PSEUDO macro. */
++
++# undef PSEUDO
++# define PSEUDO(name, syscall_name, args) \
++ ENTRY (name) \
++ DOARGS_##args ASM_LINE_SEP \
++ copy TREG, %r1 ASM_LINE_SEP \
++ copy %sp, TREG ASM_LINE_SEP \
++ stwm %r1, 64(%sp) ASM_LINE_SEP \
++ stw %rp, -20(%sp) ASM_LINE_SEP \
++ stw TREG, -4(%sp) ASM_LINE_SEP \
++ /* Done setting up frame, continue... */ ASM_LINE_SEP \
++ SINGLE_THREAD_P ASM_LINE_SEP \
++ cmpib,<>,n 0,%ret0,L(pseudo_cancel) ASM_LINE_SEP \
++L(unthreaded): ASM_LINE_SEP \
++ /* Save r19 */ ASM_LINE_SEP \
++ SAVE_PIC(TREG) ASM_LINE_SEP \
++ /* Do syscall, delay loads # */ ASM_LINE_SEP \
++ ble 0x100(%sr2,%r0) ASM_LINE_SEP \
++ ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \
++ ldi NO_ERROR,%r1 ASM_LINE_SEP \
++ cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \
++ /* Restore r19 from TREG */ ASM_LINE_SEP \
++ LOAD_PIC(TREG) /* delay */ ASM_LINE_SEP \
++ SYSCALL_ERROR_HANDLER ASM_LINE_SEP \
++ /* Use TREG for temp storage */ ASM_LINE_SEP \
++ copy %ret0, TREG /* delay */ ASM_LINE_SEP \
++ /* OPTIMIZE: Don't reload r19 */ ASM_LINE_SEP \
++ /* do a -1*syscall_ret0 */ ASM_LINE_SEP \
++ sub %r0, TREG, TREG ASM_LINE_SEP \
++ /* Store into errno location */ ASM_LINE_SEP \
++ stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \
++ b L(pre_end) ASM_LINE_SEP \
++ /* return -1 as error */ ASM_LINE_SEP \
++ ldo -1(%r0), %ret0 /* delay */ ASM_LINE_SEP \
++L(pseudo_cancel): ASM_LINE_SEP \
++ PUSHARGS_##args /* Save args */ ASM_LINE_SEP \
++ /* Save r19 into TREG */ ASM_LINE_SEP \
++ CENABLE /* FUNC CALL */ ASM_LINE_SEP \
++ SAVE_PIC(TREG) /* delay */ ASM_LINE_SEP \
++ /* restore syscall args */ ASM_LINE_SEP \
++ POPARGS_##args ASM_LINE_SEP \
++ /* save mask from cenable (use stub rp slot) */ ASM_LINE_SEP \
++ stw %ret0, -24(%sp) ASM_LINE_SEP \
++ /* ... SYSCALL ... */ ASM_LINE_SEP \
++ ble 0x100(%sr2,%r0) ASM_LINE_SEP \
++ ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \
++ /* ............... */ ASM_LINE_SEP \
++ LOAD_PIC(TREG) ASM_LINE_SEP \
++ /* pass mask as arg0 to cdisable */ ASM_LINE_SEP \
++ ldw -24(%sp), %r26 ASM_LINE_SEP \
++ CDISABLE ASM_LINE_SEP \
++ stw %ret0, -24(%sp) /* delay */ ASM_LINE_SEP \
++ /* Restore syscall return */ ASM_LINE_SEP \
++ ldw -24(%sp), %ret0 ASM_LINE_SEP \
++ /* compare error */ ASM_LINE_SEP \
++ ldi NO_ERROR,%r1 ASM_LINE_SEP \
++ /* branch if no error */ ASM_LINE_SEP \
++ cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \
++ LOAD_PIC(TREG) /* cond. nullify */ ASM_LINE_SEP \
++ copy %ret0, TREG /* save syscall return */ ASM_LINE_SEP \
++ SYSCALL_ERROR_HANDLER ASM_LINE_SEP \
++ /* make syscall res value positive */ ASM_LINE_SEP \
++ sub %r0, TREG, TREG /* delay */ ASM_LINE_SEP \
++ /* No need to LOAD_PIC */ ASM_LINE_SEP \
++ /* store into errno location */ ASM_LINE_SEP \
++ stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \
++ /* return -1 */ ASM_LINE_SEP \
++ ldo -1(%r0), %ret0 ASM_LINE_SEP \
++L(pre_end): ASM_LINE_SEP \
++ /* Restore rp before exit */ ASM_LINE_SEP \
++ ldw -84(%sr0,%sp), %rp ASM_LINE_SEP \
++ /* Undo frame */ ASM_LINE_SEP \
++ ldwm -64(%sp),TREG ASM_LINE_SEP \
++ /* No need to LOAD_PIC */ ASM_LINE_SEP
++
++/* Save arguments into our frame */
++# define PUSHARGS_0 /* nothing to do */
++# define PUSHARGS_1 PUSHARGS_0 stw %r26, -36(%sr0,%sp) ASM_LINE_SEP
++# define PUSHARGS_2 PUSHARGS_1 stw %r25, -40(%sr0,%sp) ASM_LINE_SEP
++# define PUSHARGS_3 PUSHARGS_2 stw %r24, -44(%sr0,%sp) ASM_LINE_SEP
++# define PUSHARGS_4 PUSHARGS_3 stw %r23, -48(%sr0,%sp) ASM_LINE_SEP
++# define PUSHARGS_5 PUSHARGS_4 stw %r22, -52(%sr0,%sp) ASM_LINE_SEP
++# define PUSHARGS_6 PUSHARGS_5 stw %r21, -56(%sr0,%sp) ASM_LINE_SEP
++
++/* Bring them back from the stack */
++# define POPARGS_0 /* nothing to do */
++# define POPARGS_1 POPARGS_0 ldw -36(%sr0,%sp), %r26 ASM_LINE_SEP
++# define POPARGS_2 POPARGS_1 ldw -40(%sr0,%sp), %r25 ASM_LINE_SEP
++# define POPARGS_3 POPARGS_2 ldw -44(%sr0,%sp), %r24 ASM_LINE_SEP
++# define POPARGS_4 POPARGS_3 ldw -48(%sr0,%sp), %r23 ASM_LINE_SEP
++# define POPARGS_5 POPARGS_4 ldw -52(%sr0,%sp), %r22 ASM_LINE_SEP
++# define POPARGS_6 POPARGS_5 ldw -56(%sr0,%sp), %r21 ASM_LINE_SEP
++
++# ifdef IS_IN_libpthread
++# ifdef PIC
++# define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \
++ bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP
++# define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \
++ bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP
++# else
++# define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \
++ bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP
++# define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \
++ bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP
++# endif
++# elif !defined NOT_IN_libc
++# ifdef PIC
++# define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \
++ bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP
++# define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \
++ bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP
++# else
++# define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \
++ bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP
++# define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \
++ bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP
++# endif
++# else
++# ifdef PIC
++# define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \
++ bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP
++# define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \
++ bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP
++# else
++# define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \
++ bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP
++# define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \
++ bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP
++# endif
++# endif
++
++/* p_header.multiple_threads is +12 from the pthread_descr struct start,
++ We could have called __get_cr27() but we really want less overhead */
++# define MULTIPLE_THREADS_OFFSET 0xC
++
++/* cr27 has been initialized to 0x0 by kernel */
++# define NO_THREAD_CR27 0x0
++
++# ifdef IS_IN_libpthread
++# define __local_multiple_threads __pthread_multiple_threads
++# elif !defined NOT_IN_libc
++# define __local_multiple_threads __libc_multiple_threads
++# else
++# define __local_multiple_threads __librt_multiple_threads
++# endif
++
++# ifndef __ASSEMBLER__
++ extern int __local_multiple_threads attribute_hidden;
++# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
++# else
++/* This ALT version requires newer kernel support */
++# define SINGLE_THREAD_P_MFCTL \
++ mfctl %cr27, %ret0 ASM_LINE_SEP \
++ cmpib,= NO_THREAD_CR27,%ret0,L(stp) ASM_LINE_SEP \
++ nop ASM_LINE_SEP \
++ ldw MULTIPLE_THREADS_OFFSET(%sr0,%ret0),%ret0 ASM_LINE_SEP \
++L(stp): ASM_LINE_SEP
++# ifdef PIC
++/* Slower version uses GOT to get value of __local_multiple_threads */
++# define SINGLE_THREAD_P \
++ addil LT%__local_multiple_threads, %r19 ASM_LINE_SEP \
++ ldw RT%__local_multiple_threads(%sr0,%r1), %ret0 ASM_LINE_SEP \
++ ldw 0(%sr0,%ret0), %ret0 ASM_LINE_SEP
++# else
++/* Slow non-pic version using DP */
++# define SINGLE_THREAD_P \
++ addil LR%__local_multiple_threads-$global$,%r27 ASM_LINE_SEP \
++ ldw RR%__local_multiple_threads-$global$(%sr0,%r1),%ret0 ASM_LINE_SEP
++# endif
++# endif
++#elif !defined __ASSEMBLER__
++
++/* This code should never be used but we define it anyhow. */
++# define SINGLE_THREAD_P (1)
++
++#endif
++/* !defined NOT_IN_libc || defined IS_IN_libpthread */
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/lxstat.c ports/sysdeps/unix/sysv/linux/hppa/lxstat.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/lxstat.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/lxstat.c 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1 @@
++#include <sysdeps/unix/sysv/linux/i386/lxstat.c>
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,192 @@
++/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifndef _BITS_PTHREADTYPES_H
++#define _BITS_PTHREADTYPES_H 1
++
++/* Linuxthread type sizes:
++ sizeof(pthread_attr_t) = 0x24 (36)
++ sizeof(pthread_mutex_t) = 0x30 (48)
++ sizeof(pthread_mutexattr_t) = 0x4 (4)
++ sizeof(pthread_cond_t) = 0x30 (48)
++ No pthread_cond_compat_t ...
++ sizeof(pthread_condattr_t) = 0x4 (4)
++ sizeof(pthread_rwlock_t) = 0x40 (64)
++ sizeof(pthread_rwlockattr_t) = 0x8 (8)
++ sizeof(pthread_barrier_t) = 0x30 (48)
++ sizeof(pthread_barrierattr_t) = 0x4 (4) */
++
++#define __SIZEOF_PTHREAD_ATTR_T 36
++#define __SIZEOF_PTHREAD_MUTEX_T 48
++#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
++#define __SIZEOF_PTHREAD_COND_T 48
++#define __SIZEOF_PTHREAD_COND_COMPAT_T 12
++#define __SIZEOF_PTHREAD_CONDATTR_T 4
++#define __SIZEOF_PTHREAD_RWLOCK_T 64
++#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
++#define __SIZEOF_PTHREAD_BARRIER_T 48
++#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
++
++#define __PAD_ATOMIC_LOCK_T 12
++
++/* Thread identifiers. The structure of the attribute type is not
++ exposed on purpose. */
++typedef unsigned long int pthread_t;
++
++/* Our old basic lock type, listed here for posterity.
++ We needed self-aligning locks for linuxthreads LDCW
++ implementation. For NPTL we use LWS Compare and
++ Exchange to implement primitives. */
++#if 0
++typedef struct {
++ int lock[4];
++} __atomic_lock_t;
++#endif
++
++typedef union
++{
++ char __size[__SIZEOF_PTHREAD_ATTR_T];
++ long int __align;
++} pthread_attr_t;
++
++
++typedef struct __pthread_internal_slist
++{
++ struct __pthread_internal_slist *__next;
++} __pthread_slist_t;
++
++
++/* Data structures for mutex handling. The structure of the attribute
++ type is not exposed on purpose. */
++typedef union
++{
++ struct __pthread_mutex_s
++ {
++ int __lock;
++ char __size[__PAD_ATOMIC_LOCK_T];
++ unsigned int __count;
++ int __owner;
++ /* KIND must stay at this position in the structure to maintain
++ binary compatibility. */
++ int __kind;
++ unsigned int __nusers;
++ __extension__ union
++ {
++ int __spins;
++ __pthread_slist_t __list;
++ };
++ } __data;
++ char __size[__SIZEOF_PTHREAD_MUTEX_T];
++ long int __align;
++} pthread_mutex_t;
++
++typedef union
++{
++ char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
++ long int __align;
++} pthread_mutexattr_t;
++
++
++/* Data structure for conditional variable handling. The structure of
++ the attribute type is not exposed on purpose. */
++typedef union
++{
++ struct
++ {
++ int __lock;
++ char __size[__PAD_ATOMIC_LOCK_T];
++ unsigned int __futex;
++ __extension__ unsigned long long int __total_seq;
++ __extension__ unsigned long long int __wakeup_seq;
++ __extension__ unsigned long long int __woken_seq;
++ void *__mutex;
++ unsigned int __nwaiters;
++ unsigned int __broadcast_seq;
++ } __data;
++ char __size[__SIZEOF_PTHREAD_COND_T];
++ __extension__ long long int __align;
++} pthread_cond_t;
++
++typedef union
++{
++ char __size[__SIZEOF_PTHREAD_CONDATTR_T];
++ long int __align;
++} pthread_condattr_t;
++
++
++/* Keys for thread-specific data */
++typedef unsigned int pthread_key_t;
++
++
++/* Once-only execution */
++typedef int pthread_once_t;
++
++
++#if defined __USE_UNIX98 || defined __USE_XOPEN2K
++/* Data structure for read-write lock variable handling. The
++ structure of the attribute type is not exposed on purpose. */
++typedef union
++{
++ struct
++ {
++ int __lock;
++ char __size[__PAD_ATOMIC_LOCK_T];
++ unsigned int __nr_readers;
++ unsigned int __readers_wakeup;
++ unsigned int __writer_wakeup;
++ unsigned int __nr_readers_queued;
++ unsigned int __nr_writers_queued;
++ /* FLAGS must stay at this position in the structure to maintain
++ binary compatibility. */
++ unsigned int __flags;
++ int __writer;
++ } __data;
++ char __size[__SIZEOF_PTHREAD_RWLOCK_T];
++ long int __align;
++} pthread_rwlock_t;
++
++typedef union
++{
++ char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
++ long int __align;
++} pthread_rwlockattr_t;
++#endif
++
++
++#ifdef __USE_XOPEN2K
++/* POSIX spinlock data type. */
++typedef volatile int pthread_spinlock_t;
++
++
++/* POSIX barriers data type. The structure of the type is
++ deliberately not exposed. */
++typedef union
++{
++ char __size[__SIZEOF_PTHREAD_BARRIER_T];
++ long int __align;
++} pthread_barrier_t;
++
++typedef union
++{
++ char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
++ int __align;
++} pthread_barrierattr_t;
++#endif
++
++
++#endif /* bits/pthreadtypes.h */
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,39 @@
++/* Copyright (C) 2002, 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifndef _SEMAPHORE_H
++# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
++#endif
++
++
++#define __SIZEOF_SEM_T 16
++
++
++/* Value returned if `sem_open' failed. */
++#define SEM_FAILED ((sem_t *) 0)
++
++/* Maximum value the semaphore can have. */
++#define SEM_VALUE_MAX ((int) ((~0u) >> 1))
++
++
++typedef union
++{
++ char __size[__SIZEOF_SEM_T];
++ long int __align;
++} sem_t;
++
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c ports/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,23 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++/* Value passed to 'clone' for initialization of the thread register. */
++#define TLS_VALUE (pd + 1)
++
++/* Get the real implementation. */
++#include <nptl/sysdeps/pthread/createthread.c>
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/fork.c ports/sysdeps/unix/sysv/linux/hppa/nptl/fork.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/fork.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/nptl/fork.c 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,34 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <sched.h>
++#include <signal.h>
++#include <sysdep.h>
++#include <tls.h>
++
++/* Argument 1 - Clone flags.
++ 2 - Child stack pointer.
++ 3 - Parent tid pointer.
++ 4 - New TLS area pointer.
++ 5 - Child tid pointer. */
++#define ARCH_FORK() \
++ INLINE_SYSCALL (clone, 5, \
++ CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \
++ NULL, NULL, NULL, &THREAD_SELF->tid)
++
++#include <nptl/sysdeps/unix/sysv/linux/fork.c>
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h ports/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,153 @@
++/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifndef _INTERNALTYPES_H
++#define _INTERNALTYPES_H 1
++
++#include <stdint.h>
++
++
++struct pthread_attr
++{
++ /* Scheduler parameters and priority. */
++ struct sched_param schedparam;
++ int schedpolicy;
++ /* Various flags like detachstate, scope, etc. */
++ int flags;
++ /* Size of guard area. */
++ size_t guardsize;
++ /* Stack handling. */
++ void *stackaddr;
++ size_t stacksize;
++ /* Affinity map. */
++ cpu_set_t *cpuset;
++ size_t cpusetsize;
++};
++
++#define ATTR_FLAG_DETACHSTATE 0x0001
++#define ATTR_FLAG_NOTINHERITSCHED 0x0002
++#define ATTR_FLAG_SCOPEPROCESS 0x0004
++#define ATTR_FLAG_STACKADDR 0x0008
++#define ATTR_FLAG_OLDATTR 0x0010
++#define ATTR_FLAG_SCHED_SET 0x0020
++#define ATTR_FLAG_POLICY_SET 0x0040
++
++
++/* Mutex attribute data structure. */
++struct pthread_mutexattr
++{
++ /* Identifier for the kind of mutex.
++
++ Bit 31 is set if the mutex is to be shared between processes.
++
++ Bit 0 to 30 contain one of the PTHREAD_MUTEX_ values to identify
++ the type of the mutex. */
++ int mutexkind;
++};
++
++
++/* Conditional variable attribute data structure. */
++struct pthread_condattr
++{
++ /* Combination of values:
++
++ Bit 0 : flag whether coditional variable will be shareable between
++ processes.
++
++ Bit 1-7: clock ID. */
++ int value;
++};
++
++
++/* The __NWAITERS field is used as a counter and to house the number
++ of bits which represent the clock. COND_CLOCK_BITS is the number
++ of bits reserved for the clock. */
++#define COND_CLOCK_BITS 1
++
++
++/* Read-write lock variable attribute data structure. */
++struct pthread_rwlockattr
++{
++ int lockkind;
++ int pshared;
++};
++
++
++/* Barrier data structure. */
++struct pthread_barrier
++{
++ unsigned int curr_event;
++ int lock;
++ unsigned int left;
++ unsigned int init_count;
++};
++
++
++/* Barrier variable attribute data structure. */
++struct pthread_barrierattr
++{
++ int pshared;
++};
++
++
++/* Thread-local data handling. */
++struct pthread_key_struct
++{
++ /* Sequence numbers. Even numbers indicated vacant entries. Note
++ that zero is even. We use uintptr_t to not require padding on
++ 32- and 64-bit machines. On 64-bit machines it helps to avoid
++ wrapping, too. */
++ uintptr_t seq;
++
++ /* Destructor for the data. */
++ void (*destr) (void *);
++};
++
++/* Check whether an entry is unused. */
++#define KEY_UNUSED(p) (((p) & 1) == 0)
++/* Check whether a key is usable. We cannot reuse an allocated key if
++ the sequence counter would overflow after the next destroy call.
++ This would mean that we potentially free memory for a key with the
++ same sequence. This is *very* unlikely to happen, A program would
++ have to create and destroy a key 2^31 times (on 32-bit platforms,
++ on 64-bit platforms that would be 2^63). If it should happen we
++ simply don't use this specific key anymore. */
++#define KEY_USABLE(p) (((uintptr_t) (p)) < ((uintptr_t) ((p) + 2)))
++
++
++/* Handling of read-write lock data. */
++// XXX For now there is only one flag. Maybe more in future.
++#define RWLOCK_RECURSIVE(rwlock) ((rwlock)->__data.__flags != 0)
++
++
++/* Semaphore variable structure. */
++struct sem
++{
++ unsigned int count;
++};
++
++
++/* Compatibility type for old conditional variable interfaces. */
++typedef struct
++{
++ pthread_cond_t *cond;
++} pthread_cond_2_0_t;
++
++#endif /* internaltypes.h */
++
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c ports/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,21 @@
++/* low level locking for pthread library. Generic futex-using version.
++ Copyright (C) 2003 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include "lowlevellock.c"
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,130 @@
++/* low level locking for pthread library. Generic futex-using version.
++ Copyright (C) 2003 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <errno.h>
++#include <sysdep.h>
++#include <lowlevellock.h>
++#include <sys/time.h>
++
++
++void
++__lll_lock_wait (lll_lock_t *futex)
++{
++ do
++ {
++ int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
++ if (oldval != 0)
++ lll_futex_wait (futex, 2);
++ }
++ while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
++}
++
++
++int
++__lll_timedlock_wait (lll_lock_t *futex, const struct timespec *abstime)
++{
++ /* Reject invalid timeouts. */
++ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
++ return EINVAL;
++
++ do
++ {
++ struct timeval tv;
++ struct timespec rt;
++
++ /* Get the current time. */
++ (void) __gettimeofday (&tv, NULL);
++
++ /* Compute relative timeout. */
++ rt.tv_sec = abstime->tv_sec - tv.tv_sec;
++ rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000;
++ if (rt.tv_nsec < 0)
++ {
++ rt.tv_nsec += 1000000000;
++ --rt.tv_sec;
++ }
++
++ /* Already timed out? */
++ if (rt.tv_sec < 0)
++ return ETIMEDOUT;
++
++ /* Wait. */
++ int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
++ if (oldval != 0)
++ lll_futex_timed_wait (futex, 2, &rt);
++ }
++ while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
++ return 0;
++}
++
++
++/* These don't get included in libc.so */
++#ifdef IS_IN_libpthread
++int
++lll_unlock_wake_cb (lll_lock_t *futex)
++{
++ int val = atomic_exchange_rel (futex, 0);
++
++ if (__builtin_expect (val > 1, 0))
++ lll_futex_wake (futex, 1);
++ return 0;
++}
++
++
++int
++__lll_timedwait_tid (int *tidp, const struct timespec *abstime)
++{
++ int tid;
++
++ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
++ return EINVAL;
++
++ /* Repeat until thread terminated. */
++ while ((tid = *tidp) != 0)
++ {
++ struct timeval tv;
++ struct timespec rt;
++
++ /* Get the current time. */
++ (void) __gettimeofday (&tv, NULL);
++
++ /* Compute relative timeout. */
++ rt.tv_sec = abstime->tv_sec - tv.tv_sec;
++ rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000;
++ if (rt.tv_nsec < 0)
++ {
++ rt.tv_nsec += 1000000000;
++ --rt.tv_sec;
++ }
++
++ /* Already timed out? */
++ if (rt.tv_sec < 0)
++ return ETIMEDOUT;
++
++ /* Wait until thread terminates. */
++ if (lll_futex_timed_wait (tidp, tid, &rt) == -ETIMEDOUT)
++ return ETIMEDOUT;
++ }
++
++ return 0;
++}
++
++#endif
++
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,336 @@
++/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#ifndef _LOWLEVELLOCK_H
++#define _LOWLEVELLOCK_H 1
++
++#include <time.h>
++#include <sys/param.h>
++#include <bits/pthreadtypes.h>
++#include <sysdep.h>
++#include <atomic.h>
++
++#if 0
++/* The hppa only has one atomic read and modify memory operation,
++ load and clear, so hppa spinlocks must use zero to signify that
++ someone is holding the lock. The address used for the ldcw
++ semaphore must be 16-byte aligned. */
++#define __ldcw(a) \
++({ \
++ unsigned int __ret; \
++ __asm__ __volatile__("ldcw 0(%1),%0" \
++ : "=r" (__ret) : "r" (a) : "memory"); \
++ __ret; \
++})
++
++/* Because malloc only guarantees 8-byte alignment for malloc'd data,
++ and GCC only guarantees 8-byte alignment for stack locals, we can't
++ be assured of 16-byte alignment for atomic lock data even if we
++ specify "__attribute ((aligned(16)))" in the type declaration. So,
++ we use a struct containing an array of four ints for the atomic lock
++ type and dynamically select the 16-byte aligned int from the array
++ for the semaphore. */
++#define __PA_LDCW_ALIGNMENT 16
++#define __ldcw_align(a) ({ \
++ volatile unsigned int __ret = (unsigned int) a; \
++ if ((__ret & ~(__PA_LDCW_ALIGNMENT - 1)) < (unsigned int) a) \
++ __ret = (__ret & ~(__PA_LDCW_ALIGNMENT - 1)) + __PA_LDCW_ALIGNMENT; \
++ (unsigned int *) __ret; \
++})
++#endif
++
++#define FUTEX_WAIT 0
++#define FUTEX_WAKE 1
++#define FUTEX_REQUEUE 3
++#define FUTEX_CMP_REQUEUE 4
++#define FUTEX_WAKE_OP 5
++#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
++
++/* Initializer for compatibility lock. */
++#if 0
++#define LLL_INITIALIZER_NOT_ZERO
++#define LLL_MUTEX_LOCK_INITIALIZER ((__atomic_lock_t){ { 1, 1, 1, 1 } })
++#endif
++#define LLL_MUTEX_LOCK_INITIALIZER (0)
++
++
++/* Type for lock object. */
++typedef int lll_lock_t;
++
++
++#define lll_futex_wait(futexp, val) \
++ ({ \
++ INTERNAL_SYSCALL_DECL (__err); \
++ long int __ret; \
++ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
++ (futexp), FUTEX_WAIT, (val), 0); \
++ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
++ })
++
++#define lll_futex_timed_wait(futexp, val, timespec) \
++ ({ \
++ INTERNAL_SYSCALL_DECL (__err); \
++ long int __ret; \
++ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
++ (futexp), FUTEX_WAIT, (val), (timespec)); \
++ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
++ })
++
++#define lll_futex_wake(futexp, nr) \
++ ({ \
++ INTERNAL_SYSCALL_DECL (__err); \
++ long int __ret; \
++ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
++ (futexp), FUTEX_WAKE, (nr), 0); \
++ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
++ })
++
++#define lll_robust_mutex_dead(futexv) \
++ do \
++ { \
++ int *__futexp = &(futexv); \
++ atomic_or (__futexp, FUTEX_OWNER_DIED); \
++ lll_futex_wake (__futexp, 1); \
++ } \
++ while (0)
++
++/* Returns non-zero if error happened, zero if success. */
++#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \
++ ({ \
++ INTERNAL_SYSCALL_DECL (__err); \
++ long int __ret; \
++ __ret = INTERNAL_SYSCALL (futex, __err, 6, \
++ (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \
++ (nr_move), (mutex), (val)); \
++ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
++ })
++
++/* Returns non-zero if error happened, zero if success. */
++#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \
++ ({ \
++ INTERNAL_SYSCALL_DECL (__err); \
++ long int __ret; \
++ __ret = INTERNAL_SYSCALL (futex, __err, 6, \
++ (futexp), FUTEX_WAKE_OP, (nr_wake), \
++ (nr_wake2), (futexp2), \
++ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
++ __ret; \
++ })
++
++static inline int __attribute__((always_inline))
++__lll_mutex_trylock(lll_lock_t *futex)
++{
++ return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0;
++}
++#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock))
++
++static inline int __attribute__((always_inline))
++__lll_robust_mutex_trylock(int *futex, int id)
++{
++ return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0;
++}
++#define lll_robust_mutex_trylock(lock, id) \
++ __lll_robust_mutex_trylock (&(lock), id)
++
++
++static inline int __attribute__((always_inline))
++__lll_mutex_cond_trylock(lll_lock_t *futex)
++{
++ return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0;
++}
++#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock))
++
++
++extern void __lll_lock_wait (lll_lock_t *futex) attribute_hidden;
++
++static inline void __attribute__((always_inline))
++__lll_mutex_lock(lll_lock_t *futex)
++{
++ if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
++ __lll_lock_wait (futex);
++}
++#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
++
++extern int __lll_robust_lock_wait (int *futex) attribute_hidden;
++
++static inline int __attribute__ ((always_inline))
++__lll_robust_mutex_lock (int *futex, int id)
++{
++ int result = 0;
++ if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
++ result = __lll_robust_lock_wait (futex);
++ return result;
++}
++#define lll_robust_mutex_lock(futex, id) \
++ __lll_robust_mutex_lock (&(futex), id)
++
++static inline void __attribute__ ((always_inline))
++__lll_mutex_cond_lock (lll_lock_t *futex)
++{
++ if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0)
++ __lll_lock_wait (futex);
++}
++#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
++
++
++#define lll_robust_mutex_cond_lock(futex, id) \
++ __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS)
++
++
++extern int __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *)
++ attribute_hidden;
++extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *)
++ attribute_hidden;
++
++static inline int __attribute__ ((always_inline))
++__lll_mutex_timedlock (lll_lock_t *futex, const struct timespec *abstime)
++{
++ int result = 0;
++ if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
++ result = __lll_timedlock_wait (futex, abstime);
++ return result;
++}
++#define lll_mutex_timedlock(futex, abstime) \
++ __lll_mutex_timedlock (&(futex), abstime)
++
++static inline int __attribute__ ((always_inline))
++__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime,
++ int id)
++{
++ int result = 0;
++ if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
++ result = __lll_robust_timedlock_wait (futex, abstime);
++ return result;
++}
++#define lll_robust_mutex_timedlock(futex, abstime, id) \
++ __lll_robust_mutex_timedlock (&(futex), abstime, id)
++
++
++static inline void __attribute__ ((always_inline))
++__lll_mutex_unlock (lll_lock_t *futex)
++{
++ int val = atomic_exchange_rel (futex, 0);
++ if (__builtin_expect (val > 1, 0))
++ lll_futex_wake (futex, 1);
++}
++#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex))
++
++
++static inline void __attribute__ ((always_inline))
++__lll_robust_mutex_unlock (int *futex, int mask)
++{
++ int val = atomic_exchange_rel (futex, 0);
++ if (__builtin_expect (val & mask, 0))
++ lll_futex_wake (futex, 1);
++}
++#define lll_robust_mutex_unlock(futex) \
++ __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS)
++
++
++static inline void __attribute__ ((always_inline))
++__lll_mutex_unlock_force (lll_lock_t *futex)
++{
++ (void) atomic_exchange_rel (futex, 0);
++ lll_futex_wake (futex, 1);
++}
++#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex))
++
++
++static inline int __attribute__ ((always_inline))
++__lll_mutex_islocked (lll_lock_t *futex)
++{
++ return (*futex != 0);
++}
++#define lll_mutex_islocked(futex) __lll_mutex_islocked(&(futex))
++
++
++/* Our internal lock implementation is identical to the binary-compatible
++ mutex implementation. */
++
++/* Initializers for lock. */
++#if 0
++#define LLL_LOCK_INITIALIZER ((__atomic_lock_t){ { 1, 1, 1, 1 } })
++#define LLL_LOCK_INITIALIZER_CONST { { 1, 1, 1, 1 } }
++#define LLL_LOCK_INITIALIZER_LOCKED ((__atomic_lock_t){ { 0, 0, 0, 0 } })
++#endif
++
++#define LLL_LOCK_INITIALIZER (0)
++#define LLL_LOCK_INITIALIZER_CONST (0)
++#define LLL_LOCK_INITIALIZER_LOCKED (1)
++
++
++#define THREAD_INIT_LOCK(PD, LOCK) \
++ (PD)->LOCK = LLL_LOCK_INITIALIZER
++
++extern int lll_unlock_wake_cb (lll_lock_t *__futex) attribute_hidden;
++
++/* The states of a lock are:
++ 0 - untaken
++ 1 - taken by one user
++ >1 - taken by more users */
++
++#define lll_trylock(lock) lll_mutex_trylock (lock)
++#define lll_lock(lock) lll_mutex_lock (lock)
++#define lll_unlock(lock) lll_mutex_unlock (lock)
++#define lll_islocked(lock) lll_mutex_islocked (lock)
++
++/* The kernel notifies a process which uses CLONE_CLEARTID via futex
++ wakeup when the clone terminates. The memory location contains the
++ thread ID while the clone is running and is reset to zero
++ afterwards. */
++#define lll_wait_tid(tid) \
++ do { \
++ __typeof (tid) __tid; \
++ while ((__tid = (tid)) != 0) \
++ lll_futex_wait (&(tid), __tid); \
++ } while (0)
++
++extern int __lll_timedwait_tid (int *, const struct timespec *)
++ attribute_hidden;
++
++#define lll_timedwait_tid(tid, abstime) \
++ ({ \
++ int __res = 0; \
++ if ((tid) != 0) \
++ __res = __lll_timedwait_tid (&(tid), (abstime)); \
++ __res; \
++ })
++
++
++/* Conditional variable handling. */
++
++extern void __lll_cond_wait (pthread_cond_t *cond)
++ attribute_hidden;
++extern int __lll_cond_timedwait (pthread_cond_t *cond,
++ const struct timespec *abstime)
++ attribute_hidden;
++extern void __lll_cond_wake (pthread_cond_t *cond)
++ attribute_hidden;
++extern void __lll_cond_broadcast (pthread_cond_t *cond)
++ attribute_hidden;
++
++#define lll_cond_wait(cond) \
++ __lll_cond_wait (cond)
++#define lll_cond_timedwait(cond, abstime) \
++ __lll_cond_timedwait (cond, abstime)
++#define lll_cond_wake(cond) \
++ __lll_cond_wake (cond)
++#define lll_cond_broadcast(cond) \
++ __lll_cond_broadcast (cond)
++
++#endif /* lowlevellock.h */
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,94 @@
++/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++ Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include "pthreadP.h"
++#include <lowlevellock.h>
++
++
++unsigned long int __fork_generation attribute_hidden;
++
++
++static void
++clear_once_control (void *arg)
++{
++ pthread_once_t *once_control = (pthread_once_t *) arg;
++
++ *once_control = 0;
++ lll_futex_wake (once_control, INT_MAX);
++}
++
++
++int
++__pthread_once (once_control, init_routine)
++ pthread_once_t *once_control;
++ void (*init_routine) (void);
++{
++ while (1)
++ {
++ int oldval, val, newval;
++
++ val = *once_control;
++ do
++ {
++ /* Check if the initialized has already been done. */
++ if ((val & 2) != 0)
++ return 0;
++
++ oldval = val;
++ newval = (oldval & 3) | __fork_generation | 1;
++ val = atomic_compare_and_exchange_val_acq (once_control, newval,
++ oldval);
++ }
++ while (__builtin_expect (val != oldval, 0));
++
++ /* Check if another thread already runs the initializer. */
++ if ((oldval & 1) != 0)
++ {
++ /* Check whether the initializer execution was interrupted
++ by a fork. */
++ if (((oldval ^ newval) & -4) == 0)
++ {
++ /* Same generation, some other thread was faster. Wait. */
++ lll_futex_wait (once_control, newval);
++ continue;
++ }
++ }
++
++ /* This thread is the first here. Do the initialization.
++ Register a cleanup handler so that in case the thread gets
++ interrupted the initialization can be restarted. */
++ pthread_cleanup_push (clear_once_control, once_control);
++
++ init_routine ();
++
++ pthread_cleanup_pop (0);
++
++
++ /* Add one to *once_control. */
++ atomic_increment (once_control);
++
++ /* Wake up all other threads. */
++ lll_futex_wake (once_control, INT_MAX);
++ break;
++ }
++
++ return 0;
++}
++weak_alias (__pthread_once, pthread_once)
++strong_alias (__pthread_once, __pthread_once_internal)
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,109 @@
++/* Special .init and .fini section support for HPPA. NPTL version.
++ Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it
++ and/or modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ In addition to the permissions in the GNU Lesser General Public
++ License, the Free Software Foundation gives you unlimited
++ permission to link the compiled version of this file with other
++ programs, and to distribute those programs without any restriction
++ coming from the use of this file. (The Lesser General Public
++ License restrictions do apply in other respects; for example, they
++ cover modification of the file, and distribution when not linked
++ into another program.)
++
++ The GNU C Library 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 Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; see the file COPYING.LIB. If not,
++ write to the Free Software Foundation, 59 Temple Place - Suite 330,
++ Boston, MA 02111-1307, USA. */
++
++/* This file is compiled into assembly code which is then munged by a sed
++ script into two files: crti.s and crtn.s.
++
++ * crti.s puts a function prologue at the beginning of the
++ .init and .fini sections and defines global symbols for
++ those addresses, so they can be called as functions.
++
++ * crtn.s puts the corresponding function epilogues
++ in the .init and .fini sections. */
++
++/* If we use the standard C version, the linkage table pointer won't
++ be properly preserved due to the splitting up of function prologues
++ and epilogues. Therefore we write these in assembly to make sure
++ they do the right thing. */
++
++__asm__ (
++"#include \"defs.h\"\n"
++"\n"
++"/*@HEADER_ENDS*/\n"
++"\n"
++"/*@_init_PROLOG_BEGINS*/\n"
++" .section .init\n"
++" .align 4\n"
++" .globl _init\n"
++" .type _init,@function\n"
++"_init:\n"
++" stw %rp,-20(%sp)\n"
++" stwm %r4,64(%sp)\n"
++" stw %r19,-32(%sp)\n"
++" bl __pthread_initialize_minimal_internal,%rp\n"
++" copy %r19,%r4 /* delay slot */\n"
++" copy %r4,%r19\n"
++"/*@_init_PROLOG_ENDS*/\n"
++"\n"
++"/*@_init_EPILOG_BEGINS*/\n"
++"/* Here is the tail end of _init. */\n"
++" .section .init\n"
++" ldw -84(%sp),%rp\n"
++" copy %r4,%r19\n"
++" bv %r0(%rp)\n"
++"_end_init:\n"
++" ldwm -64(%sp),%r4\n"
++"\n"
++"/* Our very own unwind info, because the assembler can't handle\n"
++" functions split into two or more pieces. */\n"
++" .section .PARISC.unwind,\"a\",@progbits\n"
++" .extern _init\n"
++" .word _init, _end_init\n"
++" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n"
++"\n"
++"/*@_init_EPILOG_ENDS*/\n"
++"\n"
++"/*@_fini_PROLOG_BEGINS*/\n"
++" .section .fini\n"
++" .align 4\n"
++" .globl _fini\n"
++" .type _fini,@function\n"
++"_fini:\n"
++" stw %rp,-20(%sp)\n"
++" stwm %r4,64(%sp)\n"
++" stw %r19,-32(%sp)\n"
++" copy %r19,%r4\n"
++"/*@_fini_PROLOG_ENDS*/\n"
++"\n"
++"/*@_fini_EPILOG_BEGINS*/\n"
++" .section .fini\n"
++" ldw -84(%sp),%rp\n"
++" copy %r4,%r19\n"
++" bv %r0(%rp)\n"
++"_end_fini:\n"
++" ldwm -64(%sp),%r4\n"
++"\n"
++" .section .PARISC.unwind,\"a\",@progbits\n"
++" .extern _fini\n"
++" .word _fini, _end_fini\n"
++" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n"
++"\n"
++"/*@_fini_EPILOG_ENDS*/\n"
++"\n"
++"/*@TRAILER_BEGINS*/\n"
++);
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,90 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <sysdep.h>
++#define _ERRNO_H 1
++#include <bits/errno.h>
++#include <tcb-offsets.h>
++
++/* Clone the calling process, but without copying the whole address space.
++ The calling process is suspended until the new process exits or is
++ replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
++ and the process ID of the new process to the old process. */
++
++/* Load the thread register.
++ Load the saved PID value.
++ Negate the value.
++ Store the temporary PID. */
++#define SAVE_PID \
++ mfctl %cr27, %r26 ASM_LINE_SEP \
++ ldw PID_THREAD_OFFSET(%r26),%r1 ASM_LINE_SEP \
++ sub %r0,%r1,%r1 ASM_LINE_SEP \
++ stw %r1,PID_THREAD_OFFSET(%r26) ASM_LINE_SEP
++/* If we are the parent...
++ Get the thread pointer.
++ Load the saved PID.
++ Negate the value (got back original)
++ Restore the PID. */
++#define RESTORE_PID \
++ cmpb,=,n %r0,%ret0,.Lthread_start ASM_LINE_SEP \
++ mfctl %cr27, %r26 ASM_LINE_SEP \
++ ldw PID_THREAD_OFFSET(%r26),%r1 ASM_LINE_SEP \
++ sub %r0,%r1,%r1 ASM_LINE_SEP \
++ stw %r1,PID_THREAD_OFFSET(%r26) ASM_LINE_SEP \
++.Lthread_start: ASM_LINE_SEP
++
++ /* r26, r25, r24, r23 are free since vfork has no arguments */
++ENTRY(__vfork)
++
++ /* Save the PIC register. */
++#ifdef PIC
++ copy %r19, %r25 /* parent */
++#endif
++
++ /* Save the process PID */
++ SAVE_PID
++
++ /* Syscall saves and restores all register states */
++ ble 0x100(%sr2,%r0)
++ ldi __NR_vfork,%r20
++
++ /* Conditionally restore the PID */
++ RESTORE_PID
++
++ /* Check for error */
++ ldi -4096,%r1
++ comclr,>>= %r1,%ret0,%r0 /* Note: unsigned compare. */
++ b,n .Lerror
++
++ /* Return, no need to restore the PIC register. */
++ bv,n %r0(%rp)
++
++.Lerror:
++ SYSCALL_ERROR_HANDLER
++ /* Restore the PIC register (in delay slot) on error */
++#ifdef PIC
++ copy %r25, %r19 /* parent */
++#else
++ nop
++#endif
++ sub %r0,%ret0,%arg0
++ /* Return error */
++PSEUDO_END (__vfork)
++libc_hidden_def (__vfork)
++weak_alias (__vfork, vfork)
++
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h ports/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,217 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <sysdep.h>
++#include <sysdeps/generic/sysdep.h>
++#include <tls.h>
++#ifndef __ASSEMBLER__
++# include <nptl/pthreadP.h>
++#endif
++
++#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
++
++# ifndef NO_ERROR
++# define NO_ERROR -0x1000
++# endif
++
++/* The syscall cancellation mechanism requires userspace
++ assistance, the following code does roughly this:
++
++ do arguments (read arg5 and arg6 to registers)
++ setup frame
++
++ check if there are threads, yes jump to pseudo_cancel
++
++ unthreaded:
++ syscall
++ check syscall return (jump to pre_end)
++ set errno
++ set return to -1
++ (jump to pre_end)
++
++ pseudo_cancel:
++ cenable
++ syscall
++ cdisable
++ check syscall return (jump to pre_end)
++ set errno
++ set return to -1
++
++ pre_end
++ restore stack
++
++ It is expected that 'ret' and 'END' macros will
++ append an 'undo arguments' and 'return' to the
++ this PSEUDO macro. */
++
++# undef PSEUDO
++# define PSEUDO(name, syscall_name, args) \
++ ENTRY (name) \
++ DOARGS_##args ASM_LINE_SEP \
++ copy TREG, %r1 ASM_LINE_SEP \
++ copy %sp, TREG ASM_LINE_SEP \
++ stwm %r1, 64(%sp) ASM_LINE_SEP \
++ stw %rp, -20(%sp) ASM_LINE_SEP \
++ stw TREG, -4(%sp) ASM_LINE_SEP \
++ /* Done setting up frame, continue... */ ASM_LINE_SEP \
++ SINGLE_THREAD_P ASM_LINE_SEP \
++ cmpib,<>,n 0,%ret0,L(pseudo_cancel) ASM_LINE_SEP \
++L(unthreaded): ASM_LINE_SEP \
++ /* Save r19 */ ASM_LINE_SEP \
++ SAVE_PIC(TREG) ASM_LINE_SEP \
++ /* Do syscall, delay loads # */ ASM_LINE_SEP \
++ ble 0x100(%sr2,%r0) ASM_LINE_SEP \
++ ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \
++ ldi NO_ERROR,%r1 ASM_LINE_SEP \
++ cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \
++ /* Restore r19 from TREG */ ASM_LINE_SEP \
++ LOAD_PIC(TREG) /* delay */ ASM_LINE_SEP \
++ SYSCALL_ERROR_HANDLER ASM_LINE_SEP \
++ /* Use TREG for temp storage */ ASM_LINE_SEP \
++ copy %ret0, TREG /* delay */ ASM_LINE_SEP \
++ /* OPTIMIZE: Don't reload r19 */ ASM_LINE_SEP \
++ /* do a -1*syscall_ret0 */ ASM_LINE_SEP \
++ sub %r0, TREG, TREG ASM_LINE_SEP \
++ /* Store into errno location */ ASM_LINE_SEP \
++ stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \
++ b L(pre_end) ASM_LINE_SEP \
++ /* return -1 as error */ ASM_LINE_SEP \
++ ldo -1(%r0), %ret0 /* delay */ ASM_LINE_SEP \
++L(pseudo_cancel): ASM_LINE_SEP \
++ PUSHARGS_##args /* Save args */ ASM_LINE_SEP \
++ /* Save r19 into TREG */ ASM_LINE_SEP \
++ CENABLE /* FUNC CALL */ ASM_LINE_SEP \
++ SAVE_PIC(TREG) /* delay */ ASM_LINE_SEP \
++ /* restore syscall args */ ASM_LINE_SEP \
++ POPARGS_##args ASM_LINE_SEP \
++ /* save mask from cenable (use stub rp slot) */ ASM_LINE_SEP \
++ stw %ret0, -24(%sp) ASM_LINE_SEP \
++ /* ... SYSCALL ... */ ASM_LINE_SEP \
++ ble 0x100(%sr2,%r0) ASM_LINE_SEP \
++ ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \
++ /* ............... */ ASM_LINE_SEP \
++ LOAD_PIC(TREG) ASM_LINE_SEP \
++ /* pass mask as arg0 to cdisable */ ASM_LINE_SEP \
++ ldw -24(%sp), %r26 ASM_LINE_SEP \
++ CDISABLE ASM_LINE_SEP \
++ stw %ret0, -24(%sp) /* delay */ ASM_LINE_SEP \
++ /* Restore syscall return */ ASM_LINE_SEP \
++ ldw -24(%sp), %ret0 ASM_LINE_SEP \
++ /* compare error */ ASM_LINE_SEP \
++ ldi NO_ERROR,%r1 ASM_LINE_SEP \
++ /* branch if no error */ ASM_LINE_SEP \
++ cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \
++ LOAD_PIC(TREG) /* cond. nullify */ ASM_LINE_SEP \
++ copy %ret0, TREG /* save syscall return */ ASM_LINE_SEP \
++ SYSCALL_ERROR_HANDLER ASM_LINE_SEP \
++ /* make syscall res value positive */ ASM_LINE_SEP \
++ sub %r0, TREG, TREG /* delay */ ASM_LINE_SEP \
++ /* No need to LOAD_PIC */ ASM_LINE_SEP \
++ /* store into errno location */ ASM_LINE_SEP \
++ stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \
++ /* return -1 */ ASM_LINE_SEP \
++ ldo -1(%r0), %ret0 ASM_LINE_SEP \
++L(pre_end): ASM_LINE_SEP \
++ /* Restore rp before exit */ ASM_LINE_SEP \
++ ldw -84(%sr0,%sp), %rp ASM_LINE_SEP \
++ /* Undo frame */ ASM_LINE_SEP \
++ ldwm -64(%sp),TREG ASM_LINE_SEP \
++ /* No need to LOAD_PIC */ ASM_LINE_SEP
++
++/* Save arguments into our frame */
++# define PUSHARGS_0 /* nothing to do */
++# define PUSHARGS_1 PUSHARGS_0 stw %r26, -36(%sr0,%sp) ASM_LINE_SEP
++# define PUSHARGS_2 PUSHARGS_1 stw %r25, -40(%sr0,%sp) ASM_LINE_SEP
++# define PUSHARGS_3 PUSHARGS_2 stw %r24, -44(%sr0,%sp) ASM_LINE_SEP
++# define PUSHARGS_4 PUSHARGS_3 stw %r23, -48(%sr0,%sp) ASM_LINE_SEP
++# define PUSHARGS_5 PUSHARGS_4 stw %r22, -52(%sr0,%sp) ASM_LINE_SEP
++# define PUSHARGS_6 PUSHARGS_5 stw %r21, -56(%sr0,%sp) ASM_LINE_SEP
++
++/* Bring them back from the stack */
++# define POPARGS_0 /* nothing to do */
++# define POPARGS_1 POPARGS_0 ldw -36(%sr0,%sp), %r26 ASM_LINE_SEP
++# define POPARGS_2 POPARGS_1 ldw -40(%sr0,%sp), %r25 ASM_LINE_SEP
++# define POPARGS_3 POPARGS_2 ldw -44(%sr0,%sp), %r24 ASM_LINE_SEP
++# define POPARGS_4 POPARGS_3 ldw -48(%sr0,%sp), %r23 ASM_LINE_SEP
++# define POPARGS_5 POPARGS_4 ldw -52(%sr0,%sp), %r22 ASM_LINE_SEP
++# define POPARGS_6 POPARGS_5 ldw -56(%sr0,%sp), %r21 ASM_LINE_SEP
++
++# ifdef IS_IN_libpthread
++# ifdef PIC
++# define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \
++ bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP
++# define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \
++ bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP
++# else
++# define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \
++ bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP
++# define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \
++ bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP
++# endif
++# elif !defined NOT_IN_libc
++# ifdef PIC
++# define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \
++ bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP
++# define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \
++ bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP
++# else
++# define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \
++ bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP
++# define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \
++ bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP
++# endif
++# else
++# ifdef PIC
++# define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \
++ bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP
++# define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \
++ bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP
++# else
++# define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \
++ bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP
++# define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \
++ bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP
++# endif
++# endif
++
++# ifdef IS_IN_libpthread
++# define __local_multiple_threads __pthread_multiple_threads
++# elif !defined NOT_IN_libc
++# define __local_multiple_threads __libc_multiple_threads
++# else
++# define __local_multiple_threads __librt_multiple_threads
++# endif
++
++# ifndef __ASSEMBLER__
++# define SINGLE_THREAD_P \
++ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
++ header.multiple_threads) == 0, 1)
++# else
++/* Read the value of header.multiple_threads from the thread pointer */
++# define SINGLE_THREAD_P \
++ mfctl %cr27, %ret0 ASM_LINE_SEP \
++ ldw MULTIPLE_THREADS_THREAD_OFFSET(%sr0,%ret0),%ret0 ASM_LINE_SEP
++# endif
++#elif !defined __ASSEMBLER__
++
++/* This code should never be used but we define it anyhow. */
++# define SINGLE_THREAD_P (1)
++# define NO_CANCELLATION 1
++
++#endif
++/* !defined NOT_IN_libc || defined IS_IN_libpthread */
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c ports/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,21 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of the
++ License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; see the file COPYING.LIB. If not,
++ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ Boston, MA 02111-1307, USA. */
++
++#define LIBGCC_S_SO "libgcc_s.so.2"
++#include <sysdeps/pthread/unwind-forcedunwind.c>
++
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c ports/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1,21 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public License as
++ published by the Free Software Foundation; either version 2.1 of the
++ License, or (at your option) any later version.
++
++ The GNU C Library 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
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; see the file COPYING.LIB. If not,
++ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ Boston, MA 02111-1307, USA. */
++
++#define LIBGCC_S_SO "libgcc_s.so.2"
++#include <sysdeps/pthread/unwind-resume.c>
++
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/sysdep.c ports/sysdeps/unix/sysv/linux/hppa/sysdep.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/sysdep.c 2003-10-15 07:45:16.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/hppa/sysdep.c 2006-05-15 02:44:14.000000000 +0200
+@@ -16,12 +16,12 @@
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
++#include <stdarg.h>
+ #include <sysdep.h>
+ #include <errno.h>
+
+ extern int __syscall_error(int err_no);
+-extern int syscall (int sysnum, int arg0, int arg1, int arg2,
+- int arg3, int arg4, int arg5);
++extern long int syscall (long int __sysno, ...) __THROW;
+
+ /* This routine is jumped to by all the syscall handlers, to stash
+ an error number into errno. */
+@@ -37,22 +37,35 @@
+ typically be in syscall.S. Also note that we have INLINE_SYSCALL,
+ INTERNAL_SYSCALL, and all the generated pure assembly syscall wrappers.
+ How often the function is used is unknown. */
+-int
+-syscall (int sysnum, int arg0, int arg1, int arg2, int arg3, int arg4,
+- int arg5)
++
++long int
++syscall (long int __sysno, ...)
+ {
+ /* FIXME: Keep this matching INLINE_SYSCALL for hppa */
++ va_list args;
++ long int arg0, arg1, arg2, arg3, arg4, arg5;
+ long int __sys_res;
++
++ /* Load varargs */
++ va_start (args, __sysno);
++ arg0 = va_arg (args, long int);
++ arg1 = va_arg (args, long int);
++ arg2 = va_arg (args, long int);
++ arg3 = va_arg (args, long int);
++ arg4 = va_arg (args, long int);
++ arg5 = va_arg (args, long int);
++ va_end (args);
++
+ {
+ register unsigned long int __res asm("r28");
+ LOAD_ARGS_6 (arg0, arg1, arg2, arg3, arg4, arg5)
+- asm volatile (STW_ASM_PIC
++ asm volatile (SAVE_ASM_PIC
+ " ble 0x100(%%sr2, %%r0) \n"
+ " copy %1, %%r20 \n"
+- LDW_ASM_PIC
++ LOAD_ASM_PIC
+ : "=r" (__res)
+- : "r" (sysnum) ASM_ARGS_6
+- : CALL_CLOB_REGS CLOB_ARGS_6);
++ : "r" (__sysno) ASM_ARGS_6
++ : "memory", CALL_CLOB_REGS CLOB_ARGS_6);
+ __sys_res = __res;
+ }
+ if ((unsigned long int) __sys_res >= (unsigned long int) -4095)
+@@ -62,3 +75,4 @@
+ }
+ return __sys_res;
+ }
++
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/sysdep.h ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/sysdep.h 2003-11-03 18:18:38.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/sysdep.h 2006-05-15 02:44:14.000000000 +0200
+@@ -22,28 +22,34 @@
+ #include <asm/unistd.h>
+ #include <sysdeps/generic/sysdep.h>
+ #include <sys/syscall.h>
+-#include "config.h"
+
+-#ifndef ASM_LINE_SEP
+-# define ASM_LINE_SEP ;
+-#endif
++#undef ASM_LINE_SEP
++#define ASM_LINE_SEP !
+
+ #undef SYS_ify
+ #define SYS_ify(syscall_name) (__NR_##syscall_name)
+
++/* WARNING: TREG must be a callee saves register so
++ that it doesn't have to be restored after a call
++ to another function */
+ #ifdef PIC
+-/* WARNING: CANNOT BE USED IN A NOP! */
+-# define STW_PIC stw %r19, -32(%sr0, %sp) ASM_LINE_SEP
+-# define LDW_PIC ldw -32(%sr0, %sp), %r19 ASM_LINE_SEP
+-# define STW_ASM_PIC " copy %%r19, %%r4\n"
+-# define LDW_ASM_PIC " copy %%r4, %%r19\n"
+-# define USING_GR4 "%r4",
++# define TREG %r3
++# define SAVE_PIC(SREG) copy %r19, SREG ASM_LINE_SEP
++# define LOAD_PIC(LREG) copy LREG, %r19 ASM_LINE_SEP
++/* Inline assembly defines */
++# define TREG_ASM "%r4" /* Cant clobber r3, it holds framemarker */
++# define SAVE_ASM_PIC " copy %%r19, %" TREG_ASM "\n"
++# define LOAD_ASM_PIC " copy %" TREG_ASM ", %%r19\n"
++# define USING_TREG TREG_ASM,
+ #else
+-# define STW_PIC ASM_LINE_SEP
+-# define LDW_PIC ASM_LINE_SEP
+-# define STW_ASM_PIC " \n"
+-# define LDW_ASM_PIC " \n"
+-# define USING_GR4
++# define TREG %r3
++# define SAVE_PIC(SREG) nop ASM_LINE_SEP
++# define LOAD_PIC(LREG) nop ASM_LINE_SEP
++/* Inline assembly defines */
++# define TREG_ASM
++# define SAVE_ASM_PIC "nop \n"
++# define LOAD_ASM_PIC "nop \n"
++# define USING_TREG
+ #endif
+
+ #ifdef __ASSEMBLER__
+@@ -76,31 +82,73 @@
+
+ /* We don't want the label for the error handle to be global when we define
+ it here. */
+-#ifdef PIC
++/*#ifdef PIC
+ # define SYSCALL_ERROR_LABEL 0f
+ #else
+ # define SYSCALL_ERROR_LABEL syscall_error
+-#endif
++#endif*/
++
++/* Argument manipulation from the stack for preparing to
++ make a syscall */
++
++#define DOARGS_0 /* nothing */
++#define DOARGS_1 /* nothing */
++#define DOARGS_2 /* nothing */
++#define DOARGS_3 /* nothing */
++#define DOARGS_4 /* nothing */
++#define DOARGS_5 ldw -52(%sp), %r22 ASM_LINE_SEP
++#define DOARGS_6 DOARGS_5 ldw -56(%sp), %r21 ASM_LINE_SEP
++
++#define UNDOARGS_0 /* nothing */
++#define UNDOARGS_1 /* nothing */
++#define UNDOARGS_2 /* nothing */
++#define UNDOARGS_3 /* nothing */
++#define UNDOARGS_4 /* nothing */
++#define UNDOARGS_5 /* nothing */
++#define UNDOARGS_6 /* nothing */
+
+ /* Define an entry point visible from C.
+
+ There is currently a bug in gdb which prevents us from specifying
+ incomplete stabs information. Fake some entries here which specify
+ the current source file. */
+-#define ENTRY(name) \
+- .text ASM_LINE_SEP \
+- .export C_SYMBOL_NAME(name) ASM_LINE_SEP \
+- .type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \
+- C_LABEL(name) ASM_LINE_SEP \
+- CALL_MCOUNT ASM_LINE_SEP
++#define ENTRY(name) \
++ .text ASM_LINE_SEP \
++ .align ALIGNARG(4) ASM_LINE_SEP \
++ .export C_SYMBOL_NAME(name) ASM_LINE_SEP \
++ .type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \
++ C_LABEL(name) ASM_LINE_SEP \
++ .PROC ASM_LINE_SEP \
++ .CALLINFO FRAME=64,CALLS,SAVE_RP,ENTRY_GR=3 ASM_LINE_SEP \
++ .ENTRY ASM_LINE_SEP \
++ /* SAVE_RP says we do */ ASM_LINE_SEP \
++ stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \
++ /*FIXME: Call mcount? (carefull with stack!) */
++
++/* Some syscall wrappers do not call other functions, and
++ hence are classified as leaf, so add NO_CALLS for gdb */
++#define ENTRY_LEAF(name) \
++ .text ASM_LINE_SEP \
++ .align ALIGNARG(4) ASM_LINE_SEP \
++ .export C_SYMBOL_NAME(name) ASM_LINE_SEP \
++ .type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \
++ C_LABEL(name) ASM_LINE_SEP \
++ .PROC ASM_LINE_SEP \
++ .CALLINFO FRAME=64,NO_CALLS,SAVE_RP,ENTRY_GR=3 ASM_LINE_SEP \
++ .ENTRY ASM_LINE_SEP \
++ /* SAVE_RP says we do */ ASM_LINE_SEP \
++ stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \
++ /*FIXME: Call mcount? (carefull with stack!) */
+
+ #undef END
+ #define END(name) \
+-1: ASM_LINE_SEP \
+-.size C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name) ASM_LINE_SEP
+-
+-/* If compiled for profiling, call `mcount' at the start of each function. */
+-/* No, don't bother. gcc will put the call in for us. */
++ .EXIT ASM_LINE_SEP \
++ .PROCEND ASM_LINE_SEP \
++.size C_SYMBOL_NAME(name), .-C_SYMBOL_NAME(name) ASM_LINE_SEP
++
++/* If compiled for profiling, call `mcount' at the start
++ of each function. No, don't bother. gcc will put the
++ call in for us. */
+ #define CALL_MCOUNT /* Do nothing. */
+
+ /* syscall wrappers consist of
+@@ -118,14 +166,16 @@
+ */
+
+ #define PSEUDO(name, syscall_name, args) \
+- ENTRY (name) \
+- DO_CALL(syscall_name, args) ASM_LINE_SEP \
++ ENTRY (name) ASM_LINE_SEP \
++ /* If necc. load args from stack */ ASM_LINE_SEP \
++ DOARGS_##args ASM_LINE_SEP \
++ DO_CALL (syscall_name, args) ASM_LINE_SEP \
++ UNDOARGS_##args ASM_LINE_SEP \
+ nop ASM_LINE_SEP
+
+ #define ret \
+- /* Return value set by ERRNO code */ ASM_LINE_SEP \
+- bv 0(2) ASM_LINE_SEP \
+- nop ASM_LINE_SEP
++ /* Return value set by ERRNO code */ ASM_LINE_SEP \
++ bv,n 0(2) ASM_LINE_SEP
+
+ #undef PSEUDO_END
+ #define PSEUDO_END(name) \
+@@ -133,8 +183,10 @@
+
+ /* We don't set the errno on the return from the syscall */
+ #define PSEUDO_NOERRNO(name, syscall_name, args) \
+- ENTRY (name) \
+- DO_CALL_NOERRNO(syscall_name, args) ASM_LINE_SEP \
++ ENTRY_LEAF (name) ASM_LINE_SEP \
++ DOARGS_##args ASM_LINE_SEP \
++ DO_CALL_NOERRNO (syscall_name, args) ASM_LINE_SEP \
++ UNDOARGS_##args ASM_LINE_SEP \
+ nop ASM_LINE_SEP
+
+ #define ret_NOERRNO ret
+@@ -146,9 +198,11 @@
+ /* This has to return the error value */
+ #undef PSEUDO_ERRVAL
+ #define PSEUDO_ERRVAL(name, syscall_name, args) \
+- ENTRY(name) \
+- DO_CALL_ERRVAL(syscall_name, args) ASM_LINE_SEP \
+- nop ASM_LINE_SEP
++ ENTRY_LEAF (name) ASM_LINE_SEP \
++ DOARGS_##args ASM_LINE_SEP \
++ DO_CALL_ERRVAL (syscall_name, args) ASM_LINE_SEP \
++ UNDOARGS_##args ASM_LINE_SEP \
++ nop ASM_LINE_SEP
+
+ #define ret_ERRVAL ret
+
+@@ -161,7 +215,8 @@
+ #define SYSCALL_PIC_SETUP /* Nothing. */
+
+
+-/* All the syscall assembly macros rely on finding the approriate
++/* FIXME: This comment is not true.
++ * All the syscall assembly macros rely on finding the approriate
+ SYSCALL_ERROR_LABEL or rather HANDLER. */
+
+ /* int * __errno_location(void) so you have to store your value
+@@ -209,8 +264,8 @@
+ arg 2 gr25
+ arg 3 gr24
+ arg 4 gr23
+- arg 5 -52(gr30)
+- arg 6 -56(gr30)
++ arg 5 -52(sp)
++ arg 6 -56(sp)
+
+ gr22 and gr21 are caller-saves, so we can just load the arguments
+ there and generally be happy. */
+@@ -219,46 +274,48 @@
+ * is intended to mimic the if (__sys_res...)
+ * code inside INLINE_SYSCALL
+ */
++#define NO_ERROR -0x1000
+
+ #undef DO_CALL
+ #define DO_CALL(syscall_name, args) \
+- DOARGS_##args ASM_LINE_SEP \
+- STW_PIC ASM_LINE_SEP \
++ copy TREG,%r1 ASM_LINE_SEP \
++ copy %sp,TREG ASM_LINE_SEP \
++ /* Create a frame */ ASM_LINE_SEP \
++ stwm %r1, 64(%sp) ASM_LINE_SEP \
++ stw %rp, -20(%sp) ASM_LINE_SEP \
++ stw TREG, -4(%sp) ASM_LINE_SEP \
++ /* Save r19 */ ASM_LINE_SEP \
++ SAVE_PIC(TREG) ASM_LINE_SEP \
+ /* Do syscall, delay loads # */ ASM_LINE_SEP \
+ ble 0x100(%sr2,%r0) ASM_LINE_SEP \
+ ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \
+- ldi -0x1000,%r1 ASM_LINE_SEP \
+- cmpb,>>=,n %r1,%ret0,0f ASM_LINE_SEP \
+- /* save rp or we get lost */ ASM_LINE_SEP \
+- stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \
+- /* Restore r19 from frame */ ASM_LINE_SEP \
+- LDW_PIC ASM_LINE_SEP \
+- stw %ret0, -24(%sr0,%sp) ASM_LINE_SEP \
++ ldi NO_ERROR,%r1 ASM_LINE_SEP \
++ cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \
++ /* Restore r19 from TREG */ ASM_LINE_SEP \
++ LOAD_PIC(TREG) /* delay */ ASM_LINE_SEP \
+ SYSCALL_ERROR_HANDLER ASM_LINE_SEP \
+- /* create frame */ ASM_LINE_SEP \
+- ldo 64(%sp), %sp ASM_LINE_SEP \
+- ldo -64(%sp), %sp ASM_LINE_SEP \
++ /* Use TREG for temp storage */ ASM_LINE_SEP \
++ copy %ret0, TREG /* delay */ ASM_LINE_SEP \
+ /* OPTIMIZE: Don't reload r19 */ ASM_LINE_SEP \
+ /* do a -1*syscall_ret0 */ ASM_LINE_SEP \
+- ldw -24(%sr0,%sp), %r26 ASM_LINE_SEP \
+- sub %r0, %r26, %r26 ASM_LINE_SEP \
++ sub %r0, TREG, TREG ASM_LINE_SEP \
+ /* Store into errno location */ ASM_LINE_SEP \
+- stw %r26, 0(%sr0,%ret0) ASM_LINE_SEP \
++ stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \
+ /* return -1 as error */ ASM_LINE_SEP \
+ ldo -1(%r0), %ret0 ASM_LINE_SEP \
+- ldw -20(%sr0,%sp), %rp ASM_LINE_SEP \
+-0: ASM_LINE_SEP \
+- UNDOARGS_##args ASM_LINE_SEP
++L(pre_end): ASM_LINE_SEP \
++ /* Restore return pointer */ ASM_LINE_SEP \
++ ldw -84(%sp),%rp ASM_LINE_SEP \
++ /* Restore our frame, restoring TREG */ ASM_LINE_SEP \
++ ldwm -64(%sp), TREG ASM_LINE_SEP
+
+ /* We do nothing with the return, except hand it back to someone else */
+ #undef DO_CALL_NOERRNO
+ #define DO_CALL_NOERRNO(syscall_name, args) \
+- DOARGS_##args \
+ /* No need to store r19 */ ASM_LINE_SEP \
+ ble 0x100(%sr2,%r0) ASM_LINE_SEP \
+ ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \
+- /* Caller will restore r19 */ ASM_LINE_SEP \
+- UNDOARGS_##args
++ /* Caller will restore r19 */ ASM_LINE_SEP
+
+ /* Here, we return the ERRVAL in assembly, note we don't call the
+ error handler function, but we do 'negate' the return _IF_
+@@ -266,35 +323,16 @@
+
+ #undef DO_CALL_ERRVAL
+ #define DO_CALL_ERRVAL(syscall_name, args) \
+- DOARGS_##args ASM_LINE_SEP \
+ /* No need to store r19 */ ASM_LINE_SEP \
+ ble 0x100(%sr2,%r0) ASM_LINE_SEP \
+ ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \
+ /* Caller will restore r19 */ ASM_LINE_SEP \
+- ldi -0x1000,%r1 ASM_LINE_SEP \
++ ldi NO_ERROR,%r1 ASM_LINE_SEP \
+ cmpb,>>=,n %r1,%ret0,0f ASM_LINE_SEP \
+ sub %r0, %ret0, %ret0 ASM_LINE_SEP \
+-0: ASM_LINE_SEP \
+- UNDOARGS_##args ASM_LINE_SEP
+-
+-#define DOARGS_0 /* nothing */
+-#define DOARGS_1 /* nothing */
+-#define DOARGS_2 /* nothing */
+-#define DOARGS_3 /* nothing */
+-#define DOARGS_4 /* nothing */
+-#define DOARGS_5 ldw -52(%r30), %r22 ASM_LINE_SEP
+-#define DOARGS_6 ldw -52(%r30), %r22 ASM_LINE_SEP \
+- ldw -56(%r30), %r21 ASM_LINE_SEP
++0: ASM_LINE_SEP
+
+
+-#define UNDOARGS_0 /* nothing */
+-#define UNDOARGS_1 /* nothing */
+-#define UNDOARGS_2 /* nothing */
+-#define UNDOARGS_3 /* nothing */
+-#define UNDOARGS_4 /* nothing */
+-#define UNDOARGS_5 /* nothing */
+-#define UNDOARGS_6 /* nothing */
+-
+ #else
+
+ /* GCC has to be warned that a syscall may clobber all the ABI
+@@ -305,27 +343,28 @@
+ registers r20 -> r26 will conflict with the list so they
+ are treated specially. Although r19 is clobbered by the syscall
+ we cannot say this because it would violate ABI, thus we say
+- r4 is clobbered and use that register to save/restore r19
++ TREG is clobbered and use that register to save/restore r19
+ across the syscall. */
+
+-#define CALL_CLOB_REGS "%r1", "%r2", USING_GR4 \
++#define CALL_CLOB_REGS "%r1", "%r2", USING_TREG \
+ "%r20", "%r29", "%r31"
+
+ #undef INLINE_SYSCALL
+-#define INLINE_SYSCALL(name, nr, args...) ({ \
++#define INLINE_SYSCALL(name, nr, args...) \
++({ \
+ long __sys_res; \
+ { \
+ register unsigned long __res asm("r28"); \
+ LOAD_ARGS_##nr(args) \
+- /* FIXME: HACK stw/ldw r19 around syscall */ \
++ /* FIXME: HACK save/load r19 around syscall */ \
+ asm volatile( \
+- STW_ASM_PIC \
++ SAVE_ASM_PIC \
+ " ble 0x100(%%sr2, %%r0)\n" \
+ " ldi %1, %%r20\n" \
+- LDW_ASM_PIC \
++ LOAD_ASM_PIC \
+ : "=r" (__res) \
+ : "i" (SYS_ify(name)) ASM_ARGS_##nr \
+- : CALL_CLOB_REGS CLOB_ARGS_##nr \
++ : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
+ ); \
+ __sys_res = (long)__res; \
+ } \
+@@ -339,13 +378,13 @@
+ /* INTERNAL_SYSCALL_DECL - Allows us to setup some function static
+ value to use within the context of the syscall
+ INTERNAL_SYSCALL_ERROR_P - Returns 0 if it wasn't an error, 1 otherwise
+- You are allowed to use the syscall result (val) and the DECL error variable
+- to determine what went wrong.
++ You are allowed to use the syscall result (val) and the DECL error
++ variable to determine what went wrong.
+ INTERLAL_SYSCALL_ERRNO - Munges the val/err pair into the error number.
+ In our case we just flip the sign. */
+
+ #undef INTERNAL_SYSCALL_DECL
+-#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
++#define INTERNAL_SYSCALL_DECL(err)
+
+ /* Equivalent to (val < 0)&&(val > -4095) which is what we want */
+ #undef INTERNAL_SYSCALL_ERROR_P
+@@ -357,46 +396,72 @@
+
+ /* Similar to INLINE_SYSCALL but we don't set errno */
+ #undef INTERNAL_SYSCALL
+-#define INTERNAL_SYSCALL(name, err, nr, args...) \
+-({ \
+- long __sys_res; \
+- { \
+- register unsigned long __res asm("r28"); \
+- LOAD_ARGS_##nr(args) \
+- /* FIXME: HACK stw/ldw r19 around syscall */ \
+- asm volatile( \
+- STW_ASM_PIC \
+- " ble 0x100(%%sr2, %%r0)\n" \
+- " ldi %1, %%r20\n" \
+- LDW_ASM_PIC \
+- : "=r" (__res) \
+- : "i" (SYS_ify(name)) ASM_ARGS_##nr \
+- : CALL_CLOB_REGS CLOB_ARGS_##nr \
+- ); \
+- __sys_res = (long)__res; \
+- } \
+- __sys_res; \
++#define INTERNAL_SYSCALL(name, err, nr, args...) \
++({ \
++ long __sys_res; \
++ { \
++ register unsigned long __res asm("r28"); \
++ LOAD_ARGS_##nr(args) \
++ /* FIXME: HACK save/load r19 around syscall */ \
++ asm volatile( \
++ SAVE_ASM_PIC \
++ " ble 0x100(%%sr2, %%r0)\n" \
++ " ldi %1, %%r20\n" \
++ LOAD_ASM_PIC \
++ : "=r" (__res) \
++ : "i" (SYS_ify(name)) ASM_ARGS_##nr \
++ : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
++ ); \
++ __sys_res = (long)__res; \
++ } \
++ __sys_res; \
+ })
+
++
++/* The _NCS variant allows non-constant syscall numbers. */
++#undef INTERNAL_SYSCALL_NCS
++#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
++({ \
++ long __sys_res; \
++ { \
++ register unsigned long __res asm("r28"); \
++ LOAD_ARGS_##nr(args) \
++ /* FIXME: HACK save/load r19 around syscall */ \
++ asm volatile( \
++ SAVE_ASM_PIC \
++ " ble 0x100(%%sr2, %%r0)\n" \
++ " copy %1, %%r20\n" \
++ LOAD_ASM_PIC \
++ : "=r" (__res) \
++ : "r" (name) ASM_ARGS_##nr \
++ : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
++ ); \
++ __sys_res = (long)__res; \
++ } \
++ __sys_res; \
++ })
++
++
++
+ #define LOAD_ARGS_0()
+-#define LOAD_ARGS_1(r26) \
+- register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \
+- LOAD_ARGS_0()
+-#define LOAD_ARGS_2(r26,r25) \
+- register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \
+- LOAD_ARGS_1(r26)
+-#define LOAD_ARGS_3(r26,r25,r24) \
+- register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \
+- LOAD_ARGS_2(r26,r25)
+-#define LOAD_ARGS_4(r26,r25,r24,r23) \
+- register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \
+- LOAD_ARGS_3(r26,r25,r24)
+-#define LOAD_ARGS_5(r26,r25,r24,r23,r22) \
+- register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \
+- LOAD_ARGS_4(r26,r25,r24,r23)
+-#define LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \
+- register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \
+- LOAD_ARGS_5(r26,r25,r24,r23,r22)
++#define LOAD_ARGS_1(r26) \
++ register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \
++ LOAD_ARGS_0()
++#define LOAD_ARGS_2(r26,r25) \
++ register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \
++ LOAD_ARGS_1(r26)
++#define LOAD_ARGS_3(r26,r25,r24) \
++ register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \
++ LOAD_ARGS_2(r26,r25)
++#define LOAD_ARGS_4(r26,r25,r24,r23) \
++ register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \
++ LOAD_ARGS_3(r26,r25,r24)
++#define LOAD_ARGS_5(r26,r25,r24,r23,r22) \
++ register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \
++ LOAD_ARGS_4(r26,r25,r24,r23)
++#define LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \
++ register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \
++ LOAD_ARGS_5(r26,r25,r24,r23,r22)
+
+ /* Even with zero args we use r20 for the syscall number */
+ #define ASM_ARGS_0
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/Versions ports/sysdeps/unix/sysv/linux/hppa/Versions
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/Versions 2002-08-29 01:55:01.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/hppa/Versions 2006-07-13 18:24:19.000000000 +0200
+@@ -16,6 +16,9 @@
+ #errlist-compat 254
+ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+ }
++ GLIBC_2.4 {
++ #errlist-compat 256
++ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+ }
+ librt {
+ GLIBC_2.3 {
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/xstat.c ports/sysdeps/unix/sysv/linux/hppa/xstat.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/hppa/xstat.c 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/hppa/xstat.c 2006-07-14 15:51:24.000000000 +0200
+@@ -0,0 +1 @@
++#include <sysdeps/unix/sysv/linux/i386/xstat.c>
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/bits/fcntl.h ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/bits/fcntl.h 2004-11-24 05:37:34.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h 2006-06-08 19:16:29.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* O_*, F_*, FD_* bit values for Linux.
+- Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004
++ Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+@@ -18,32 +18,33 @@
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+-#ifndef _FCNTL_H
++#ifndef _FCNTL_H
+ # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+ #endif
+
+ #include <sgidefs.h>
+ #include <sys/types.h>
++#ifdef __USE_GNU
++# include <bits/uio.h>
++#endif
++
+
+ /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
+ located on an ext2 file system */
+-#define O_ACCMODE 0x0003
+-#define O_RDONLY 0x0000
+-#define O_WRONLY 0x0001
+-#define O_RDWR 0x0002
+-#define O_APPEND 0x0008
+-#define O_SYNC 0x0010
+-#define O_NONBLOCK 0x0080
+-#define O_CREAT 0x0100 /* not fcntl */
+-#define O_TRUNC 0x0200 /* not fcntl */
+-#define O_EXCL 0x0400 /* not fcntl */
+-#define O_NOCTTY 0x0800 /* not fcntl */
+-#define O_FSYNC O_SYNC
+-#define O_ASYNC 0x1000
+-
+-#ifdef __USE_LARGEFILE64
+-# define O_LARGEFILE 0x2000 /* Allow large file opens. */
+-#endif
++#define O_ACCMODE 0003
++#define O_RDONLY 00
++#define O_WRONLY 01
++#define O_RDWR 02
++#define O_APPEND 0x0008
++#define O_SYNC 0x0010
++#define O_NONBLOCK 0x0080
++#define O_NDELAY O_NONBLOCK
++#define O_CREAT 0x0100 /* not fcntl */
++#define O_TRUNC 0x0200 /* not fcntl */
++#define O_EXCL 0x0400 /* not fcntl */
++#define O_NOCTTY 0x0800 /* not fcntl */
++#define O_FSYNC O_SYNC
++#define O_ASYNC 0x1000
+
+ #ifdef __USE_GNU
+ # define O_NOFOLLOW 0x20000 /* Do not follow links. */
+@@ -52,16 +53,18 @@
+ # define O_NOATIME 0x40000 /* Do not set atime. */
+ #endif
+
+-#define O_NDELAY O_NONBLOCK
+-
+-/* For now Linux has no synchronisity options for data and read
+- operations. We define the symbols here but let them do the same as
+- O_SYNC since this is a superset. */
++/* For now Linux has no synchronisity options for data and read operations.
++ We define the symbols here but let them do the same as O_SYNC since
++ this is a superset. */
+ #if defined __USE_POSIX199309 || defined __USE_UNIX98
+ # define O_DSYNC O_SYNC /* Synchronize data. */
+ # define O_RSYNC O_SYNC /* Synchronize read operations. */
+ #endif
+
++#ifdef __USE_LARGEFILE64
++# define O_LARGEFILE 0x2000 /* Allow large file opens. */
++#endif
++
+ /* Values for the second argument to `fcntl'. */
+ #define F_DUPFD 0 /* Duplicate file descriptor. */
+ #define F_GETFD 1 /* Get file descriptor flags. */
+@@ -98,7 +101,7 @@
+ # define F_NOTIFY 1026 /* Request notfications on a directory. */
+ #endif
+
+-/* for F_[GET|SET]FL */
++/* For F_[GET|SET]FL. */
+ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */
+
+ /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
+@@ -106,12 +109,12 @@
+ #define F_WRLCK 1 /* Write lock. */
+ #define F_UNLCK 2 /* Remove lock. */
+
+-/* for old implementation of bsd flock () */
++/* For old implementation of bsd flock(). */
+ #define F_EXLCK 4 /* or 3 */
+ #define F_SHLCK 8 /* or 4 */
+
+ #ifdef __USE_BSD
+-/* Operations for bsd flock(), also used by the kernel implementation */
++/* Operations for bsd flock(), also used by the kernel implementation. */
+ # define LOCK_SH 1 /* shared lock */
+ # define LOCK_EX 2 /* exclusive lock */
+ # define LOCK_NB 4 /* or'd with one of the above to prevent
+@@ -137,7 +140,7 @@
+ # define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+ #endif
+
+-typedef struct flock
++struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+@@ -159,7 +162,8 @@
+ flock in o32 and n32, never has this field. */
+ long int pad[4];
+ #endif
+-} flock_t;
++ };
++typedef struct flock flock_t;
+
+ #ifdef __USE_LARGEFILE64
+ struct flock64
+@@ -172,7 +176,6 @@
+ };
+ #endif
+
+-
+ /* Define some more compatibility macros to be backward compatible with
+ BSD systems which did not managed to hide these kernel macros. */
+ #ifdef __USE_BSD
+@@ -192,3 +195,55 @@
+ # define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
+ # define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
+ #endif
++
++
++#ifdef __USE_GNU
++/* Flags for SYNC_FILE_RANGE. */
++# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
++ in the range before performing the
++ write. */
++# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
++ dirty pages in the range which are
++ not presently under writeback. */
++# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
++ the range after performing the
++ write. */
++
++/* Flags for SPLICE and VMSPLICE. */
++# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
++# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
++ (but we may still block on the fd
++ we splice from/to). */
++# define SPLICE_F_MORE 4 /* Expect more data. */
++# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
++#endif
++
++__BEGIN_DECLS
++
++#ifdef __USE_GNU
++
++/* Provide kernel hint to read ahead. */
++extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
++ __THROW;
++
++
++/* Selective file content synch'ing. */
++extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
++ unsigned int __flags);
++
++
++/* Splice address range into a pipe. */
++extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
++ unsigned int __flags);
++
++/* Splice two files together. */
++extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
++ __THROW;
++
++/* In-kernel implementation of tee for pipe buffers. */
++extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
++ __THROW;
++
++#endif
++
++__END_DECLS
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/bits/mman.h ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/bits/mman.h 2006-01-31 02:26:05.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/mips/bits/mman.h 2006-05-05 16:17:22.000000000 +0200
+@@ -50,7 +50,7 @@
+ /* Other flags. */
+ #define MAP_FIXED 0x10 /* Interpret addr exactly. */
+ #ifdef __USE_MISC
+-# define MAP_FILE 0x00
++# define MAP_FILE 0
+ # define MAP_ANONYMOUS 0x0800 /* Don't use a file. */
+ # define MAP_ANON MAP_ANONYMOUS
+ # define MAP_RENAME MAP_ANONYMOUS
+@@ -70,26 +70,37 @@
+
+ /* Flags to `msync'. */
+ #define MS_ASYNC 1 /* Sync memory asynchronously. */
+-#define MS_INVALIDATE 2 /* Invalidate the caches. */
+ #define MS_SYNC 4 /* Synchronous memory sync. */
++#define MS_INVALIDATE 2 /* Invalidate the caches. */
+
+ /* Flags for `mlockall'. */
+ #define MCL_CURRENT 1 /* Lock all currently mapped pages. */
+ #define MCL_FUTURE 2 /* Lock all additions to address
+ space. */
+
+-/* Advice to `madvise'. */
+-#ifdef __USE_BSD
+-#define MADV_NORMAL 0 /* default page-in behavior */
+-#define MADV_RANDOM 1 /* page-in minimum required */
+-#define MADV_SEQUENTIAL 2 /* read-ahead aggressively */
+-#define MADV_WILLNEED 3 /* pre-fault pages */
+-#define MADV_DONTNEED 4 /* discard these pages */
+-#define MADV_REMOVE 5 /* remove these pages & resources */
+-#endif
+-
+ /* Flags for `mremap'. */
+ #ifdef __USE_GNU
+ # define MREMAP_MAYMOVE 1
+ # define MREMAP_FIXED 2
+ #endif
++
++/* Advice to `madvise'. */
++#ifdef __USE_BSD
++# define MADV_NORMAL 0 /* No further special treatment. */
++# define MADV_RANDOM 1 /* Expect random page references. */
++# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
++# define MADV_WILLNEED 3 /* Will need these pages. */
++# define MADV_DONTNEED 4 /* Don't need these pages. */
++# define MADV_REMOVE 9 /* Remove these pages and resources. */
++# define MADV_DONTFORK 10 /* Do not inherit across fork. */
++# define MADV_DOFORK 11 /* Do inherit across fork. */
++#endif
++
++/* The POSIX people had to invent similar names for the same things. */
++#ifdef __USE_XOPEN2K
++# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
++# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
++# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
++# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
++# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
++#endif
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/bits/poll.h ports/sysdeps/unix/sysv/linux/mips/bits/poll.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/bits/poll.h 2001-07-31 09:46:05.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/mips/bits/poll.h 2006-03-28 06:25:50.000000000 +0200
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1997, 2001 Free Software Foundation, Inc.
++/* Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -36,8 +36,10 @@
+ #endif
+
+ #ifdef __USE_GNU
+-/* This is an extension for Linux. */
++/* These are extensions for Linux. */
+ # define POLLMSG 0x400
++# define POLLREMOVE 0x1000
++# define POLLRDHUP 0x2000
+ #endif
+
+ /* Event types always implicitly polled for. These bits need not be set in
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/bits/resource.h ports/sysdeps/unix/sysv/linux/mips/bits/resource.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/bits/resource.h 2005-06-20 17:07:34.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/mips/bits/resource.h 2006-06-02 17:37:27.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* Bit values & structures for resource limits. Linux/MIPS version.
+- Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005
++ Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+@@ -98,7 +98,7 @@
+ /* Maximum realtime priority allowed for non-priviledged
+ processes. */
+ __RLIMIT_RTPRIO = 14,
+-#define RLIMIT_RTPRIO _RLIMIT_RTPRIO
++#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
+
+ __RLIMIT_NLIMITS = 15,
+ __RLIM_NLIMITS = __RLIMIT_NLIMITS
+@@ -107,14 +107,22 @@
+ };
+
+ /* Value to indicate that there is no limit. */
+-#ifndef __USE_FILE_OFFSET64
+-# define RLIM_INFINITY ((long int)(~0UL >> 1))
++#if _MIPS_SIM == _ABI64
++/* The N64 syscall uses this value. */
++# define RLIM_INFINITY 0xffffffffffffffffUL
++# ifdef __USE_LARGEFILE64
++# define RLIM64_INFINITY 0xffffffffffffffffUL
++# endif
+ #else
+-# define RLIM_INFINITY 0x7fffffffffffffffLL
+-#endif
+-
+-#ifdef __USE_LARGEFILE64
+-# define RLIM64_INFINITY 0x7fffffffffffffffLL
++/* The O32 and N32 syscalls use 0x7fffffff. */
++# ifndef __USE_FILE_OFFSET64
++# define RLIM_INFINITY ((long int)(~0UL >> 1))
++# else
++# define RLIM_INFINITY 0x7fffffffffffffffULL
++# endif
++# ifdef __USE_LARGEFILE64
++# define RLIM64_INFINITY 0x7fffffffffffffffULL
++# endif
+ #endif
+
+ /* We can represent all limits. */
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h ports/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h 2004-11-24 05:37:34.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h 2006-05-10 20:57:03.000000000 +0200
+@@ -1,5 +1,5 @@
+-/* Copyright (C) 1996, 1997, 1998, 2003, 2004 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
++/* Copyright (C) 1996, 1997, 1998, 2003, 2004, 2006 Free Software
++ Foundation, Inc. This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+@@ -16,90 +16,69 @@
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
++#ifndef _BITS_SIGCONTEXT_H
++#define _BITS_SIGCONTEXT_H 1
++
+ #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
+ # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+ #endif
+
+ #include <sgidefs.h>
+
+-#ifndef sigcontext_struct
+-/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
+- we need sigcontext. */
+-# define sigcontext_struct sigcontext
+-
+-/* # include <asm/sigcontext.h> */
+-/* Instead of including the kernel header, that will vary depending on
+- whether the 32- or the 64-bit kernel is installed, we paste the
+- contents here. In case you're wondering about the different
+- licenses, the fact that the file is pasted, instead of included,
+- doesn't really make any difference for the program that includes
+- this header. */
+ #if _MIPS_SIM == _ABIO32
+-/*
+- * This file is subject to the terms and conditions of the GNU General Public
+- * License. See the file "COPYING" in the main directory of this archive
+- * for more details.
+- *
+- * Copyright (C) 1996, 1997, 2000 by Ralf Baechle
+- */
+-#ifndef _ASM_SIGCONTEXT_H
+-#define _ASM_SIGCONTEXT_H
+-
+-/*
+- * Keep this struct definition in sync with the sigcontext fragment
+- * in arch/mips/tools/offset.c
+- */
+-struct sigcontext {
+- unsigned int sc_regmask; /* Unused */
+- unsigned int sc_status;
+- unsigned long long sc_pc;
+- unsigned long long sc_regs[32];
+- unsigned long long sc_fpregs[32];
+- unsigned int sc_ownedfp; /* Unused */
+- unsigned int sc_fpc_csr;
+- unsigned int sc_fpc_eir; /* Unused */
+- unsigned int sc_used_math;
+- unsigned int sc_ssflags; /* Unused */
+- unsigned long long sc_mdhi;
+- unsigned long long sc_mdlo;
+
+- unsigned int sc_cause; /* Unused */
+- unsigned int sc_badvaddr; /* Unused */
++/* Certain unused fields were replaced with new ones in 2.6.12-rc4.
++ The changes were as follows:
++
++ sc_cause -> sc_hi1
++ sc_badvaddr -> sc_lo1
++ sc_sigset[0] -> sc_hi2
++ sc_sigset[1] -> sc_lo2
++ sc_sigset[2] -> sc_hi3
++ sc_sigset[3] -> sc_lo3
+
+- unsigned long sc_sigset[4]; /* kernel's sigset_t */
++ sc_regmask, sc_ownedfp and sc_fpc_eir are not used. */
++struct sigcontext {
++ unsigned int sc_regmask;
++ unsigned int sc_status;
++ unsigned long long sc_pc;
++ unsigned long long sc_regs[32];
++ unsigned long long sc_fpregs[32];
++ unsigned int sc_ownedfp;
++ unsigned int sc_fpc_csr;
++ unsigned int sc_fpc_eir;
++ unsigned int sc_used_math;
++ unsigned int sc_dsp;
++ unsigned long long sc_mdhi;
++ unsigned long long sc_mdlo;
++ unsigned long sc_hi1;
++ unsigned long sc_lo1;
++ unsigned long sc_hi2;
++ unsigned long sc_lo2;
++ unsigned long sc_hi3;
++ unsigned long sc_lo3;
+ };
+
+-#endif /* _ASM_SIGCONTEXT_H */
+-#else /* _MIPS_SIM != _ABIO32 */
+-/*
+- * This file is subject to the terms and conditions of the GNU General Public
+- * License. See the file "COPYING" in the main directory of this archive
+- * for more details.
+- *
+- * Copyright (C) 1996, 1997, 1999 by Ralf Baechle
+- * Copyright (C) 1999 Silicon Graphics, Inc.
+- */
+-#ifndef _ASM_SIGCONTEXT_H
+-#define _ASM_SIGCONTEXT_H
+-
+-/*
+- * Keep this struct definition in sync with the sigcontext fragment
+- * in arch/mips/tools/offset.c
+- */
++#else
++
++/* This structure changed in 2.6.12-rc4 when DSP support was added. */
+ struct sigcontext {
+- unsigned long long sc_regs[32];
+- unsigned long long sc_fpregs[32];
+- unsigned long long sc_mdhi;
+- unsigned long long sc_mdlo;
+- unsigned long long sc_pc;
+- unsigned int sc_status;
+- unsigned int sc_fpc_csr;
+- unsigned int sc_fpc_eir;
+- unsigned int sc_used_math;
+- unsigned int sc_cause;
+- unsigned int sc_badvaddr;
++ unsigned long long sc_regs[32];
++ unsigned long long sc_fpregs[32];
++ unsigned long long sc_mdhi;
++ unsigned long long sc_hi1;
++ unsigned long long sc_hi2;
++ unsigned long long sc_hi3;
++ unsigned long long sc_mdlo;
++ unsigned long long sc_lo1;
++ unsigned long long sc_lo2;
++ unsigned long long sc_lo3;
++ unsigned long long sc_pc;
++ unsigned int sc_fpc_csr;
++ unsigned int sc_used_math;
++ unsigned int sc_dsp;
++ unsigned int sc_reserved;
+ };
+
+-#endif /* _ASM_SIGCONTEXT_H */
+ #endif /* _MIPS_SIM != _ABIO32 */
+ #endif
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/bits/stat.h ports/sysdeps/unix/sysv/linux/mips/bits/stat.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/bits/stat.h 2004-11-24 05:37:34.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/mips/bits/stat.h 2006-05-08 21:23:37.000000000 +0200
+@@ -61,16 +61,27 @@
+ long int st_pad2[3];
+ __off64_t st_size; /* Size of file, in bytes. */
+ #endif
+- /*
+- * Actually this should be timestruc_t st_atime, st_mtime and
+- * st_ctime but we don't have it under Linux.
+- */
++#ifdef __USE_MISC
++ /* Nanosecond resolution timestamps are stored in a format
++ equivalent to 'struct timespec'. This is the type used
++ whenever possible but the Unix namespace rules do not allow the
++ identifier 'timespec' to appear in the <sys/stat.h> header.
++ Therefore we have to handle the use of this header in strictly
++ standard-compliant sources special. */
++ struct timespec st_atim; /* Time of last access. */
++ struct timespec st_mtim; /* Time of last modification. */
++ struct timespec st_ctim; /* Time of last status change. */
++# define st_atime st_atim.tv_sec /* Backward compatibility. */
++# define st_mtime st_mtim.tv_sec
++# define st_ctime st_ctim.tv_sec
++#else
+ __time_t st_atime; /* Time of last access. */
+ long int __reserved0;
+ __time_t st_mtime; /* Time of last modification. */
+ long int __reserved1;
+ __time_t st_ctime; /* Time of last status change. */
+ long int __reserved2;
++#endif
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+ #ifndef __USE_FILE_OFFSET64
+ __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
+@@ -94,16 +105,24 @@
+ unsigned long int st_rdev; /* Device number, if device. */
+ long int st_pad2[3];
+ __off64_t st_size; /* Size of file, in bytes. */
+- /*
+- * Actually this should be timestruc_t st_atime, st_mtime and
+- * st_ctime but we don't have it under Linux.
+- */
++#ifdef __USE_MISC
++ /* Nanosecond resolution timestamps are stored in a format
++ equivalent to 'struct timespec'. This is the type used
++ whenever possible but the Unix namespace rules do not allow the
++ identifier 'timespec' to appear in the <sys/stat.h> header.
++ Therefore we have to handle the use of this header in strictly
++ standard-compliant sources special. */
++ struct timespec st_atim; /* Time of last access. */
++ struct timespec st_mtim; /* Time of last modification. */
++ struct timespec st_ctim; /* Time of last status change. */
++#else
+ __time_t st_atime; /* Time of last access. */
+ long int __reserved0;
+ __time_t st_mtime; /* Time of last modification. */
+ long int __reserved1;
+ __time_t st_ctime; /* Time of last status change. */
+ long int __reserved2;
++#endif
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+ long int st_pad3;
+ __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
+@@ -133,12 +152,27 @@
+ unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
+ __off64_t st_size;
+ #endif
++#ifdef __USE_MISC
++ /* Nanosecond resolution timestamps are stored in a format
++ equivalent to 'struct timespec'. This is the type used
++ whenever possible but the Unix namespace rules do not allow the
++ identifier 'timespec' to appear in the <sys/stat.h> header.
++ Therefore we have to handle the use of this header in strictly
++ standard-compliant sources special. */
++ struct timespec st_atim; /* Time of last access. */
++ struct timespec st_mtim; /* Time of last modification. */
++ struct timespec st_ctim; /* Time of last status change. */
++# define st_atime st_atim.tv_sec /* Backward compatibility. */
++# define st_mtime st_mtim.tv_sec
++# define st_ctime st_ctim.tv_sec
++#else
+ __time_t st_atime;
+ int __reserved0;
+ __time_t st_mtime;
+ int __reserved1;
+ __time_t st_ctime;
+ int __reserved2;
++#endif
+ __blksize_t st_blksize;
+ unsigned int st_pad4;
+ #ifndef __USE_FILE_OFFSET64
+@@ -162,12 +196,24 @@
+ __dev_t st_rdev;
+ unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
+ __off64_t st_size;
++#ifdef __USE_MISC
++ /* Nanosecond resolution timestamps are stored in a format
++ equivalent to 'struct timespec'. This is the type used
++ whenever possible but the Unix namespace rules do not allow the
++ identifier 'timespec' to appear in the <sys/stat.h> header.
++ Therefore we have to handle the use of this header in strictly
++ standard-compliant sources special. */
++ struct timespec st_atim; /* Time of last access. */
++ struct timespec st_mtim; /* Time of last modification. */
++ struct timespec st_ctim; /* Time of last status change. */
++#else
+ __time_t st_atime;
+ int __reserved0;
+ __time_t st_mtime;
+ int __reserved1;
+ __time_t st_ctime;
+ int __reserved2;
++#endif
+ __blksize_t st_blksize;
+ unsigned int st_pad3;
+ __blkcnt64_t st_blocks;
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/configure ports/sysdeps/unix/sysv/linux/mips/configure
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/configure 2006-03-06 12:11:40.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/mips/configure 2006-03-11 17:18:41.000000000 +0100
+@@ -76,3 +76,37 @@
+ echo '#include <asm/unistd.h>' > asm-unistd.h
+ ;;
+ esac
++
++case "$prefix" in
++/usr | /usr/)
++ # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
++ # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
++ # and libc_cv_localedir.
++ test -n "$libc_cv_slibdir" || \
++ case $machine in
++ mips/mips64/n64/* )
++ libc_cv_slibdir="/lib64"
++ if test "$libdir" = '${exec_prefix}/lib'; then
++ libdir='${exec_prefix}/lib64';
++ # Locale data can be shared between 32bit and 64bit libraries
++ libc_cv_localedir='${exec_prefix}/lib/locale'
++ fi
++ ;;
++ mips/mips64/n32/* )
++ libc_cv_slibdir="/lib32"
++ if test "$libdir" = '${exec_prefix}/lib'; then
++ libdir='${exec_prefix}/lib32';
++ # Locale data can be shared between 32bit and 64bit libraries
++ libc_cv_localedir='${exec_prefix}/lib/locale'
++ fi
++ ;;
++ *)
++ libc_cv_slibdir="/lib"
++ ;;
++ esac
++esac
++
++if test -z "$arch_minimum_kernel"; then
++ arch_minimum_kernel=2.4.0
++ libc_cv_gcc_unwind_find_fde=yes
++fi
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/configure.in ports/sysdeps/unix/sysv/linux/mips/configure.in
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/configure.in 2005-02-25 16:18:06.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/mips/configure.in 2006-03-11 17:18:41.000000000 +0100
+@@ -76,3 +76,37 @@
+ echo '#include <asm/unistd.h>' > asm-unistd.h
+ ;;
+ esac
++
++case "$prefix" in
++/usr | /usr/)
++ # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
++ # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
++ # and libc_cv_localedir.
++ test -n "$libc_cv_slibdir" || \
++ case $machine in
++ mips/mips64/n64/* )
++ libc_cv_slibdir="/lib64"
++ if test "$libdir" = '${exec_prefix}/lib'; then
++ libdir='${exec_prefix}/lib64';
++ # Locale data can be shared between 32bit and 64bit libraries
++ libc_cv_localedir='${exec_prefix}/lib/locale'
++ fi
++ ;;
++ mips/mips64/n32/* )
++ libc_cv_slibdir="/lib32"
++ if test "$libdir" = '${exec_prefix}/lib'; then
++ libdir='${exec_prefix}/lib32';
++ # Locale data can be shared between 32bit and 64bit libraries
++ libc_cv_localedir='${exec_prefix}/lib/locale'
++ fi
++ ;;
++ *)
++ libc_cv_slibdir="/lib"
++ ;;
++ esac
++esac
++
++if test -z "$arch_minimum_kernel"; then
++ arch_minimum_kernel=2.4.0
++ libc_cv_gcc_unwind_find_fde=yes
++fi
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/kernel_stat.h ports/sysdeps/unix/sysv/linux/mips/kernel_stat.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/kernel_stat.h 2004-11-24 05:37:35.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/mips/kernel_stat.h 2006-06-02 17:29:03.000000000 +0200
+@@ -16,12 +16,12 @@
+ unsigned int st_rdev;
+ unsigned int __pad2[3];
+ long long st_size;
+- unsigned int st_atime;
+- unsigned int __unused1;
+- unsigned int st_mtime;
+- unsigned int __unused2;
+- unsigned int st_ctime;
+- unsigned int __unused3;
++ unsigned int st_atime_sec;
++ unsigned int st_atime_nsec;
++ unsigned int st_mtime_sec;
++ unsigned int st_mtime_nsec;
++ unsigned int st_ctime_sec;
++ unsigned int st_ctime_nsec;
+ unsigned int st_blksize;
+ unsigned int __pad3;
+ unsigned long long st_blocks;
+@@ -40,12 +40,12 @@
+ long int __pad2[2];
+ long int st_size;
+ long int __pad3;
+- long int st_atime;
+- long int __unused1;
+- long int st_mtime;
+- long int __unused2;
+- long int st_ctime;
+- long int __unused3;
++ unsigned int st_atime_sec;
++ unsigned int st_atime_nsec;
++ unsigned int st_mtime_sec;
++ unsigned int st_mtime_nsec;
++ unsigned int st_ctime_sec;
++ unsigned int st_ctime_nsec;
+ long int st_blksize;
+ long int st_blocks;
+ char st_fstype[16]; /* Filesystem type name, unsupported */
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/mips64/configure ports/sysdeps/unix/sysv/linux/mips/mips64/configure
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/mips64/configure 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/mips/mips64/configure 2006-03-11 17:18:41.000000000 +0100
+@@ -0,0 +1,4 @@
++# This file is generated from configure.in by Autoconf. DO NOT EDIT!
++ # Local configure fragment for sysdeps/unix/sysv/linux/mips/mips64.
++
++ldd_rewrite_script=$dest/ldd-rewrite.sed
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/mips64/configure.in ports/sysdeps/unix/sysv/linux/mips/mips64/configure.in
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/mips64/configure.in 1970-01-01 01:00:00.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/mips/mips64/configure.in 2006-03-11 17:18:41.000000000 +0100
+@@ -0,0 +1,5 @@
++sinclude(./aclocal.m4)dnl Autoconf lossage
++GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
++# Local configure fragment for sysdeps/unix/sysv/linux/mips/mips64.
++
++ldd_rewrite_script=$dest/ldd-rewrite.sed
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/nptl/fork.c ports/sysdeps/unix/sysv/linux/mips/nptl/fork.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/nptl/fork.c 2005-03-28 11:21:52.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/mips/nptl/fork.c 2006-03-11 17:20:03.000000000 +0100
+@@ -1 +1 @@
+-#include "../i386/fork.c"
++#include <sysdeps/unix/sysv/linux/i386/fork.c>
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/register-dump.h ports/sysdeps/unix/sysv/linux/mips/register-dump.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/register-dump.h 2002-07-13 01:25:56.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/mips/register-dump.h 2006-05-10 20:57:03.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* Dump registers.
+- Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
++ Copyright (C) 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@suse.de>, 2000.
+
+@@ -27,8 +27,8 @@
+ R8 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
+ R16 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
+ R24 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
+- pc cause status badvaddr lo hi
+- XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
++ pc lo hi
++ XXXXXXXX XXXXXXXX XXXXXXXX
+ The FPU registers will not be printed.
+ */
+
+@@ -61,11 +61,8 @@
+ for (i = 0; i < 32; i++)
+ hexvalue (ctx->sc_regs[i], regs[i], 8);
+ hexvalue (ctx->sc_pc, regs[32], 8);
+- hexvalue (ctx->sc_cause, regs[33], 8);
+- hexvalue (ctx->sc_status, regs[34], 8);
+- hexvalue (ctx->sc_badvaddr, regs[35], 8);
+- hexvalue (ctx->sc_mdhi, regs[36], 8);
+- hexvalue (ctx->sc_mdlo, regs[37], 8);
++ hexvalue (ctx->sc_mdhi, regs[33], 8);
++ hexvalue (ctx->sc_mdlo, regs[34], 8);
+
+ /* Generate the output. */
+ ADD_STRING ("Register dump:\n\n R0 ");
+@@ -92,8 +89,8 @@
+ ADD_MEM (regs[i], 8);
+ ADD_STRING (" ");
+ }
+- ADD_STRING ("\n pc cause status badvaddr lo hi\n ");
+- for (i = 32; i < 38; i++)
++ ADD_STRING ("\n pc lo hi\n ");
++ for (i = 32; i < 35; i++)
+ {
+ ADD_MEM (regs[i], 8);
+ ADD_STRING (" ");
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/sigaction.c ports/sysdeps/unix/sysv/linux/mips/sigaction.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/sigaction.c 2006-01-08 09:21:17.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/mips/sigaction.c 2006-07-24 17:42:07.000000000 +0200
+@@ -153,6 +153,10 @@
+ }
+ libc_hidden_def (__libc_sigaction)
+
++#ifdef WRAPPER_INCLUDE
++# include WRAPPER_INCLUDE
++#endif
++
+ #ifndef LIBC_SIGACTION
+ weak_alias (__libc_sigaction, __sigaction)
+ libc_hidden_weak (__sigaction)
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/sys/ucontext.h ports/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/sys/ucontext.h 2004-11-24 05:36:11.000000000 +0100
++++ ports/sysdeps/unix/sysv/linux/mips/sys/ucontext.h 2006-05-10 20:57:03.000000000 +0200
+@@ -1,5 +1,5 @@
+-/* Copyright (C) 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
++/* Copyright (C) 1997, 1998, 2000, 2003, 2004, 2006 Free Software
++ Foundation, Inc. This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+@@ -73,11 +73,15 @@
+ unsigned int fpc_csr;
+ unsigned int fpc_eir;
+ unsigned int used_math;
+- unsigned int ssflags;
++ unsigned int dsp;
+ greg_t mdhi;
+ greg_t mdlo;
+- unsigned int cause;
+- unsigned int badvaddr;
++ unsigned long hi1;
++ unsigned long lo1;
++ unsigned long hi2;
++ unsigned long lo2;
++ unsigned long hi3;
++ unsigned long lo3;
+ } mcontext_t;
+ #else
+ typedef struct
+@@ -85,14 +89,18 @@
+ gregset_t gregs;
+ fpregset_t fpregs;
+ greg_t mdhi;
++ greg_t hi1;
++ greg_t hi2;
++ greg_t hi3;
+ greg_t mdlo;
++ greg_t lo1;
++ greg_t lo2;
++ greg_t lo3;
+ greg_t pc;
+- unsigned int status;
+ unsigned int fpc_csr;
+- unsigned int fpc_eir;
+ unsigned int used_math;
+- unsigned int cause;
+- unsigned int badvaddr;
++ unsigned int dsp;
++ unsigned int reserved;
+ } mcontext_t;
+ #endif
+
+diff -x .cvs -x .svn -x CVS -urN /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/xstatconv.c ports/sysdeps/unix/sysv/linux/mips/xstatconv.c
+--- /home/rsc/svn/oselas/toolchain/build-cross/glibc-ports-2.4/sysdeps/unix/sysv/linux/mips/xstatconv.c 2003-06-30 11:33:13.000000000 +0200
++++ ports/sysdeps/unix/sysv/linux/mips/xstatconv.c 2006-06-02 17:29:03.000000000 +0200
+@@ -62,9 +62,12 @@
+ buf->st_blksize = kbuf->st_blksize;
+ buf->st_blocks = kbuf->st_blocks;
+
+- buf->st_atime = kbuf->st_atime; buf->__reserved0 = 0;
+- buf->st_mtime = kbuf->st_mtime; buf->__reserved1 = 0;
+- buf->st_ctime = kbuf->st_ctime; buf->__reserved2 = 0;
++ buf->st_atim.tv_sec = kbuf->st_atime_sec;
++ buf->st_atim.tv_nsec = kbuf->st_atime_nsec;
++ buf->st_mtim.tv_sec = kbuf->st_mtime_sec;
++ buf->st_mtim.tv_nsec = kbuf->st_mtime_nsec;
++ buf->st_ctim.tv_sec = kbuf->st_ctime_sec;
++ buf->st_ctim.tv_nsec = kbuf->st_ctime_nsec;
+
+ buf->st_pad5[0] = 0; buf->st_pad5[1] = 0;
+ buf->st_pad5[2] = 0; buf->st_pad5[3] = 0;
+@@ -107,9 +110,12 @@
+ buf->st_blksize = kbuf->st_blksize;
+ buf->st_blocks = kbuf->st_blocks;
+
+- buf->st_atime = kbuf->st_atime; buf->__reserved0 = 0;
+- buf->st_mtime = kbuf->st_mtime; buf->__reserved1 = 0;
+- buf->st_ctime = kbuf->st_ctime; buf->__reserved2 = 0;
++ buf->st_atim.tv_sec = kbuf->st_atime_sec;
++ buf->st_atim.tv_nsec = kbuf->st_atime_nsec;
++ buf->st_mtim.tv_sec = kbuf->st_mtime_sec;
++ buf->st_mtim.tv_nsec = kbuf->st_mtime_nsec;
++ buf->st_ctim.tv_sec = kbuf->st_ctime_sec;
++ buf->st_ctim.tv_nsec = kbuf->st_ctime_nsec;
+
+ buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
+ buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
diff --git a/patches/glibc-ports-2.4/generic/series b/patches/glibc-ports-2.4/generic/series
new file mode 100644
index 0000000..7225bc5
--- /dev/null
+++ b/patches/glibc-ports-2.4/generic/series
@@ -0,0 +1,2 @@
+ports-cvs-200607250000.diff
+ports-cvs-200607250000-mips-bootstrap.diff
diff --git a/powerpc-603e-linux-gnu_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig b/powerpc-603e-linux-gnu_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
new file mode 100644
index 0000000..8b2643b
--- /dev/null
+++ b/powerpc-603e-linux-gnu_gcc-4.1.1_glibc-2.4_linux-2.6.17/ptxconfig
@@ -0,0 +1,45 @@
+#
+# Automatically generated make config: don't edit
+# PTXdist version: 0.10.svn
+# Sat Aug 12 22:28:48 2006
+#
+PTXCONF_GLIBC=y
+PTXCONF_GLIBC_VERSION="2.4"
+PTXCONF_GLIBC_EXTRA_CONFIG=""
+# PTXCONF_GLIBC_ADDON_LINUXTHREADS is not set
+PTXCONF_GLIBC_ADDON_NPTL=y
+PTXCONF_GLIBC_TLS=y
+PTXCONF_GLIBC_HEADERS=y
+PTXCONF_GLIBC_CRT=y
+PTXCONF_GLIBC_FINAL=y
+PTXCONF_CROSS_BINUTILS=y
+PTXCONF_CROSS_BINUTILS_VERSION="2.17"
+PTXCONF_CROSS_BINUTILS_EXTRA_CONFIG=""
+PTXCONF_CROSS_BINUTILS_EXTRA_ENV=""
+PTXCONF_KERNEL_HEADERS=y
+PTXCONF_KERNEL_HEADERS_VERSION="2.6.17"
+# PTXCONF_KERNEL_HEADERS_SANIZIZED is not set
+PTXCONF_KERNEL_HEADERS_CONFIG="kernelconfig.${PTXCONF_ARCH}"
+PTXCONF_CROSS_GCC_FIRST=y
+PTXCONF_CROSS_GCC_FIRST_VERSION="4.1.1"
+PTXCONF_CROSS_GCC_FIRST_EXTRA_CONFIG="--with-cpu=603e --disable-altivec"
+PTXCONF_CROSS_GCC_SECOND=y
+PTXCONF_CROSS_GCC_SECOND_LANG="c,c++"
+PTXCONF_CROSS_GDB=y
+
+#
+#
+#
+# PTXCONF_ARCH_ARM is not set
+PTXCONF_ARCH_POWERPC=y
+PTXCONF_ARCH="powerpc"
+PTXCONF_GNU_TARGET="powerpc-603e-linux-gnu"
+PTXCONF_COMPILER_PREFIX="${PTXCONF_GNU_TARGET}-"
+
+#
+# misc
+#
+PTXCONF_CONFIGFILE_VERSION="0.10.svn"
+PTXCONF_PREFIX="/opt/ptxdist-${FULLVERSION}/${PTXCONF_GNU_TARGET}/gcc-${PTXCONF_CROSS_GCC_FIRST_VERSION}-glibc-${PTXCONF_GLIBC_VERSION}"
+PTXCONF_HOST_PREFIX="${PTXCONF_PREFIX}"
+PTXCONF_CROSS_PREFIX="${PTXCONF_PREFIX}"
diff --git a/rules/cross-binutils.in b/rules/cross-binutils.in
new file mode 100644
index 0000000..29ed5c5
--- /dev/null
+++ b/rules/cross-binutils.in
@@ -0,0 +1,29 @@
+# config for cross-binutils
+
+menuconfig CROSS_BINUTILS
+ bool
+ prompt "binutils "
+ select KERNEL_HEADERS
+
+config CROSS_BINUTILS_VERSION
+ depends on CROSS_BINUTILS
+ string
+ prompt "binutils version"
+ default "2.17"
+ help
+ Specify the binutils version here.
+
+config CROSS_BINUTILS_EXTRA_CONFIG
+ depends on CROSS_BINUTILS
+ string
+ prompt "extra configure options"
+ help
+ Add these extra options to binutils' configure script.
+
+config CROSS_BINUTILS_EXTRA_ENV
+ depends on CROSS_BINUTILS
+ string
+ prompt "extra environment"
+ help
+ Add this to the binutils' environment.
+
diff --git a/rules/cross-binutils.make b/rules/cross-binutils.make
new file mode 100644
index 0000000..ae23fe0
--- /dev/null
+++ b/rules/cross-binutils.make
@@ -0,0 +1,114 @@
+# -*-makefile-*-
+# $Id$
+#
+# Copyright (C) 2006 by Robert Schwebel
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+CROSS_PACKAGES-$(PTXCONF_CROSS_BINUTILS) += cross-binutils
+
+#
+# Paths and names
+#
+CROSS_BINUTILS_VERSION := $(call remove_quotes,$(PTXCONF_CROSS_BINUTILS_VERSION))
+CROSS_BINUTILS := binutils-$(CROSS_BINUTILS_VERSION)
+CROSS_BINUTILS_SUFFIX := tar.bz2
+CROSS_BINUTILS_URL := $(PTXCONF_SETUP_GNUMIRROR)/binutils/$(CROSS_BINUTILS).$(CROSS_BINUTILS_SUFFIX)
+CROSS_BINUTILS_SOURCE := $(SRCDIR)/$(CROSS_BINUTILS).$(CROSS_BINUTILS_SUFFIX)
+CROSS_BINUTILS_DIR := $(CROSS_BUILDDIR)/$(CROSS_BINUTILS)
+CROSS_BINUTILS_BUILDDIR := $(CROSS_BUILDDIR)/$(CROSS_BINUTILS)-build
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+cross-binutils_get: $(STATEDIR)/cross-binutils.get
+
+$(STATEDIR)/cross-binutils.get: $(cross-binutils_get_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+$(CROSS_BINUTILS_SOURCE):
+ @$(call targetinfo, $@)
+ @$(call get, CROSS_BINUTILS)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+cross-binutils_extract: $(STATEDIR)/cross-binutils.extract
+
+$(STATEDIR)/cross-binutils.extract: $(cross-binutils_extract_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(CROSS_BINUTILS_DIR))
+ @$(call extract, CROSS_BINUTILS, $(CROSS_BUILDDIR))
+ @$(call patchin, CROSS_BINUTILS, $(CROSS_BINUTILS_DIR))
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+cross-binutils_prepare: $(STATEDIR)/cross-binutils.prepare
+
+CROSS_BINUTILS_PATH := PATH=$(CROSS_PATH)
+CROSS_BINUTILS_ENV := $(HOST_ENV)
+
+#
+# autoconf
+#
+CROSS_BINUTILS_AUTOCONF := \
+ --prefix=$(PTXCONF_PREFIX) \
+ --build=$(GNU_HOST) \
+ --host=$(GNU_HOST) \
+ --target=$(PTXCONF_GNU_TARGET) \
+ --with-sysroot=$(SYSROOT)
+
+$(STATEDIR)/cross-binutils.prepare: $(cross-binutils_prepare_deps_default)
+ @$(call targetinfo, $@)
+ rm -fr $(CROSS_BINUTILS_BUILDDIR)
+ mkdir -p $(CROSS_BINUTILS_BUILDDIR)
+ cd $(CROSS_BINUTILS_BUILDDIR) && \
+ $(CROSS_BINUTILS_PATH) $(CROSS_BINUTILS_ENV) \
+ $(CROSS_BINUTILS_DIR)/configure $(CROSS_BINUTILS_AUTOCONF)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+cross-binutils_compile: $(STATEDIR)/cross-binutils.compile
+
+$(STATEDIR)/cross-binutils.compile: $(cross-binutils_compile_deps_default)
+ @$(call targetinfo, $@)
+ cd $(CROSS_BINUTILS_BUILDDIR) && $(CROSS_BINUTILS_PATH) \
+ $(MAKE) $(PARALLELMFLAGS)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+cross-binutils_install: $(STATEDIR)/cross-binutils.install
+
+$(STATEDIR)/cross-binutils.install: $(cross-binutils_install_deps_default)
+ @$(call targetinfo, $@)
+ @$(call install, CROSS_BINUTILS,$(CROSS_BINUTILS_BUILDDIR),h)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+cross-binutils_clean:
+ rm -rf $(STATEDIR)/cross-binutils.*
+ rm -rf $(CROSS_BINUTILS_DIR)
+
+# vim: syntax=make
diff --git a/rules/cross-gcc-first.in b/rules/cross-gcc-first.in
new file mode 100644
index 0000000..52b6859
--- /dev/null
+++ b/rules/cross-gcc-first.in
@@ -0,0 +1,30 @@
+# config for cross-gcc-first
+
+menuconfig CROSS_GCC_FIRST
+ bool
+ select CROSS_BINUTILS
+ select GLIBC_HEADERS
+ prompt "gcc (first stage) "
+
+config CROSS_GCC_FIRST_VERSION
+ depends on CROSS_GCC_FIRST
+ string
+ prompt "gcc (first stage) version"
+ default "4.1.1"
+ help
+ Specify the version of the first stage gcc here.
+
+config CROSS_GCC_FIRST_EXTRA_CONFIG
+ depends on CROSS_GCC_FIRST
+ string
+ prompt "extra configure options"
+ help
+ Add these extra options to the first stage gcc configure script.
+
+#config CROSS_GCC_FIRST_EXTRA_ENV
+# depends on CROSS_GCC_FIRST
+# string
+# prompt "extra environment"
+# help
+# Add this to the first stage gcc environment.
+
diff --git a/rules/cross-gcc-first.make b/rules/cross-gcc-first.make
new file mode 100644
index 0000000..af29d0a
--- /dev/null
+++ b/rules/cross-gcc-first.make
@@ -0,0 +1,173 @@
+# -*-makefile-*-
+# $Id$
+#
+# Copyright (C) 2006 by Robert Schwebel
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+CROSS_PACKAGES-$(PTXCONF_CROSS_GCC_FIRST) += cross-gcc-first
+
+#
+# Paths and names
+#
+CROSS_GCC_FIRST_VERSION := $(call remove_quotes,$(PTXCONF_CROSS_GCC_FIRST_VERSION))
+CROSS_GCC_FIRST := gcc-$(CROSS_GCC_FIRST_VERSION)
+CROSS_GCC_FIRST_SUFFIX := tar.bz2
+CROSS_GCC_FIRST_URL := ftp://ftp.gnu.org/gnu/gcc/gcc-$(CROSS_GCC_FIRST_VERSION)/$(CROSS_GCC_FIRST).$(CROSS_GCC_FIRST_SUFFIX)
+CROSS_GCC_FIRST_SOURCE := $(SRCDIR)/$(CROSS_GCC_FIRST).$(CROSS_GCC_FIRST_SUFFIX)
+CROSS_GCC_FIRST_DIR := $(CROSS_BUILDDIR)/$(CROSS_GCC_FIRST)
+CROSS_GCC_FIRST_BUILDDIR := $(CROSS_GCC_FIRST_DIR)-first-build
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+cross-gcc-first_get: $(STATEDIR)/cross-gcc-first.get
+
+$(STATEDIR)/cross-gcc-first.get: $(cross-gcc-first_get_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+$(CROSS_GCC_FIRST_SOURCE):
+ @$(call targetinfo, $@)
+ @$(call get, CROSS_GCC_FIRST)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+cross-gcc-first_extract: $(STATEDIR)/cross-gcc-first.extract
+
+$(STATEDIR)/cross-gcc-first.extract: $(cross-gcc-first_extract_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(CROSS_GCC_FIRST_DIR))
+ @$(call clean, $(CROSS_GCC_FIRST_BUILDDIR))
+ @$(call extract, CROSS_GCC_FIRST, $(CROSS_BUILDDIR))
+ @$(call patchin, CROSS_GCC_FIRST, $(CROSS_GCC_FIRST_DIR))
+ mkdir -p $(CROSS_GCC_FIRST_BUILDDIR)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+cross-gcc-first_prepare: $(STATEDIR)/cross-gcc-first.prepare
+
+CROSS_GCC_FIRST_PATH := PATH=$(CROSS_PATH)
+CROSS_GCC_FIRST_ENV := $(HOSTCC_ENV)
+
+#
+# autoconf
+#
+CROSS_GCC_FIRST_AUTOCONF := \
+ --host=$(GNU_HOST) \
+ --target=$(call remove_quotes,$(PTXCONF_GNU_TARGET)) \
+ --prefix=$(PTXCONF_PREFIX) \
+ --with-sysroot=$(SYSROOT) \
+ $(call remove_quotes,$(PTXCONF_CROSS_GCC_FIRST_EXTRA_CONFIG)) \
+ \
+ --disable-nls \
+ --enable-symvers=gnu \
+ --enable-__cxa_atexit \
+ \
+ --disable-multilib \
+ --disable-shared \
+ --enable-threads=no \
+ --enable-languages=c
+
+# --with-local-prefix=$(SYSROOT) \
+
+$(STATEDIR)/cross-gcc-first.prepare: $(cross-gcc-first_prepare_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(CROSS_GCC_FIRST_BUILDDIR)/config.cache)
+ cd $(CROSS_GCC_FIRST_BUILDDIR) && \
+ $(CROSS_GCC_FIRST_PATH) $(CROSS_GCC_FIRST_ENV) \
+ $(CROSS_GCC_FIRST_DIR)/configure $(CROSS_GCC_FIRST_AUTOCONF)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+# From crosstool:
+#
+# HACK: we need to override SHLIB_LC from gcc/config/t-slibgcc-elf-ver or
+# gcc/config/t-libunwind so -lc is removed from the link for
+# libgcc_s.so, as we do not have a target -lc yet.
+# This is not as ugly as it appears to be ;-) All symbols get resolved
+# during the glibc build, and we provide a proper libgcc_s.so for the
+# cross toolchain during the final gcc build.
+#
+# As we cannot modify the source tree, nor override SHLIB_LC itself
+# during configure or make, we have to edit the resultant
+# gcc/libgcc.mk itself to remove -lc from the link.
+# This causes us to have to jump through some hoops...
+#
+# To produce libgcc.mk to edit we firstly require libiberty.a,
+# so we configure then build it.
+# Next we have to configure gcc, create libgcc.mk then edit it...
+# So much easier if we just edit the source tree, but hey...
+
+cross-gcc-first_compile: $(STATEDIR)/cross-gcc-first.compile
+
+$(STATEDIR)/cross-gcc-first.compile: $(cross-gcc-first_compile_deps_default)
+ @$(call targetinfo, $@)
+ ( \
+ $(CROSS_GCC_FIRST_PATH); \
+ cd $(CROSS_GCC_FIRST_BUILDDIR); \
+ if test '!' -f gcc/BASE-VER; then \
+ $(MAKE) configure-libiberty; \
+ $(MAKE) -C libiberty libiberty.a; \
+ $(MAKE) configure-gcc; \
+ else \
+ if test -d libdecnumber; then \
+ $(MAKE) configure-libdecnumber; \
+ $(MAKE) all-libdecnumber; \
+ fi; \
+ $(MAKE) configure-gcc; \
+ $(MAKE) configure-libcpp; \
+ $(MAKE) configure-build-libiberty; \
+ $(MAKE) all-libcpp; \
+ $(MAKE) all-build-libiberty; \
+ fi; \
+ $(MAKE) -C gcc libgcc.mk; \
+ \
+ if test '!' -f gcc/libgcc.mk-ORIG ; then \
+ cp -p gcc/libgcc.mk gcc/libgcc.mk-ORIG; \
+ fi; \
+ \
+ sed 's@-lc@@g' < gcc/libgcc.mk-ORIG > gcc/libgcc.mk; \
+ \
+ $(MAKE) all-gcc; \
+ )
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+cross-gcc-first_install: $(STATEDIR)/cross-gcc-first.install
+
+$(STATEDIR)/cross-gcc-first.install: $(cross-gcc-first_install_deps_default)
+ @$(call targetinfo, $@)
+ cd $(CROSS_GCC_FIRST_BUILDDIR) && \
+ $(CROSS_GCC_FIRST_PATH) $(MAKE) install-gcc;
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+cross-gcc-first_clean:
+ rm -rf $(STATEDIR)/cross-gcc-first.*
+ rm -rf $(CROSS_GCC_FIRST_DIR)
+ rm -rf $(CROSS_GCC_FIRST_BUILDDIR)
+
+# vim: syntax=make
diff --git a/rules/cross-gcc-second.in b/rules/cross-gcc-second.in
new file mode 100644
index 0000000..026dd83
--- /dev/null
+++ b/rules/cross-gcc-second.in
@@ -0,0 +1,12 @@
+# config for cross-gcc-second
+
+menuconfig CROSS_GCC_SECOND
+ bool
+ prompt "gcc (second stage) "
+ select GLIBC
+
+config CROSS_GCC_SECOND_LANG
+ depends on CROSS_GCC_SECOND
+ string
+ prompt "languages"
+ default "c,c++"
diff --git a/rules/cross-gcc-second.make b/rules/cross-gcc-second.make
new file mode 100644
index 0000000..c58cdd5
--- /dev/null
+++ b/rules/cross-gcc-second.make
@@ -0,0 +1,116 @@
+# -*-makefile-*-
+# $Id$
+#
+# Copyright (C) 2006 by Robert Schwebel
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+CROSS_PACKAGES-$(PTXCONF_CROSS_GCC_SECOND) += cross-gcc-second
+
+#
+# Paths and names
+#
+CROSS_GCC_SECOND_BUILDDIR = $(CROSS_GCC_FIRST_DIR)-second-build
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+cross-gcc-second_get: $(STATEDIR)/cross-gcc-second.get
+
+$(STATEDIR)/cross-gcc-second.get: $(STATEDIR)/cross-gcc-first.get
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+cross-gcc-second_extract: $(STATEDIR)/cross-gcc-second.extract
+
+$(STATEDIR)/cross-gcc-second.extract: $(cross-gcc-second_extract_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(CROSS_GCC_SECOND_BUILDDIR))
+ mkdir -p $(CROSS_GCC_SECOND_BUILDDIR)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+cross-gcc-second_prepare: $(STATEDIR)/cross-gcc-second.prepare
+
+CROSS_GCC_SECOND_PATH := PATH=$(CROSS_PATH)
+CROSS_GCC_SECOND_ENV := $(HOSTCC_ENV)
+
+#
+# autoconf
+#
+CROSS_GCC_SECOND_AUTOCONF := \
+ --host=$(GNU_HOST) \
+ --target=$(call remove_quotes,$(PTXCONF_GNU_TARGET)) \
+ --prefix=$(PTXCONF_PREFIX) \
+ --with-sysroot=$(SYSROOT) \
+ $(call remove_quotes,$(PTXCONF_CROSS_GCC_FIRST_EXTRA_CONFIG)) \
+ \
+ --disable-nls \
+ --enable-symvers=gnu \
+ --enable-__cxa_atexit \
+ \
+ --enable-multilib \
+ --enable-c99 \
+ --enable-long-long \
+ --enable-shared \
+ --enable-threads=posix \
+ --enable-languages=$(PTXCONF_CROSS_GCC_SECOND_LANG)
+
+# --with-local-prefix=$(SYSROOT) \
+
+$(STATEDIR)/cross-gcc-second.prepare: $(cross-gcc-second_prepare_deps_default)
+ @$(call targetinfo, $@)
+ cd $(CROSS_GCC_SECOND_BUILDDIR) && \
+ $(CROSS_GCC_SECOND_PATH) $(CROSS_GCC_SECOND_ENV) \
+ $(CROSS_GCC_FIRST_DIR)/configure $(CROSS_GCC_SECOND_AUTOCONF)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+cross-gcc-second_compile: $(STATEDIR)/cross-gcc-second.compile
+
+$(STATEDIR)/cross-gcc-second.compile: $(cross-gcc-second_compile_deps_default)
+ @$(call targetinfo, $@)
+ cd $(CROSS_GCC_SECOND_BUILDDIR) && $(CROSS_GCC_SECOND_PATH) \
+ $(MAKE) $(PARALLELMFLAGS) all
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+cross-gcc-second_install: $(STATEDIR)/cross-gcc-second.install
+
+$(STATEDIR)/cross-gcc-second.install: $(cross-gcc-second_install_deps_default)
+ @$(call targetinfo, $@)
+ cd $(CROSS_GCC_SECOND_BUILDDIR) && \
+ $(CROSS_GCC_SECOND_PATH) $(MAKE) $(PARALLELMFLAGS) install
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+cross-gcc-second_clean:
+ rm -rf $(STATEDIR)/cross-gcc-second.*
+ rm -rf $(CROSS_GCC_SECOND_DIR)
+ rm -rf $(CROSS_GCC_SECOND_BUILDDIR)
+
+# vim: syntax=make
diff --git a/rules/cross-gdb.in b/rules/cross-gdb.in
new file mode 100644
index 0000000..b452d96
--- /dev/null
+++ b/rules/cross-gdb.in
@@ -0,0 +1,9 @@
+config CROSS_GDB
+ bool "cross gdb"
+ select GLIBC_FINAL
+ help
+ GDB is a source-level debugger, capable of breaking programs
+ at any specific line, displaying variable values, and
+ determining where errors occurred. Currently, it works for C,
+ C++, Fortran, Modula 2 and Java programs. A must-have for any
+ serious programmer.
diff --git a/rules/cross-gdb.make b/rules/cross-gdb.make
new file mode 100644
index 0000000..3cc8c21
--- /dev/null
+++ b/rules/cross-gdb.make
@@ -0,0 +1,113 @@
+# -*-makefile-*-
+# $Id$
+#
+# Copyright (C) 2006 by Marc Kleine-Budde <mkl@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+CROSS_PACKAGES-$(PTXCONF_CROSS_GDB) += cross-gdb
+
+#
+# Paths and names
+#
+CROSS_GDB_VERSION := 6.5
+CROSS_GDB := gdb-$(CROSS_GDB_VERSION)
+CROSS_GDB_SUFFIX := tar.bz2
+CROSS_GDB_URL := $(PTXCONF_SETUP_GNUMIRROR)/gdb/$(CROSS_GDB).$(CROSS_GDB_SUFFIX)
+CROSS_GDB_SOURCE := $(SRCDIR)/$(CROSS_GDB).$(CROSS_GDB_SUFFIX)
+CROSS_GDB_DIR := $(CROSS_BUILDDIR)/$(CROSS_GDB)
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+cross-gdb_get: $(STATEDIR)/cross-gdb.get
+
+$(STATEDIR)/cross-gdb.get: $(cross-gdb_get_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+$(CROSS_GDB_SOURCE):
+ @$(call targetinfo, $@)
+ @$(call get, CROSS_GDB)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+cross-gdb_extract: $(STATEDIR)/cross-gdb.extract
+
+$(STATEDIR)/cross-gdb.extract: $(cross-gdb_extract_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(CROSS_GDB_DIR))
+ @$(call extract, CROSS_GDB, $(CROSS_BUILDDIR))
+ @$(call patchin, CROSS_GDB, $(CROSS_GDB_DIR))
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+cross-gdb_prepare: $(STATEDIR)/cross-gdb.prepare
+
+CROSS_GDB_PATH := PATH=$(CROSS_PATH)
+CROSS_GDB_ENV := $(HOST_ENV)
+
+#
+# autoconf
+#
+CROSS_GDB_AUTOCONF := \
+ --prefix=$(PTXCONF_PREFIX) \
+ --build=$(GNU_HOST) \
+ --host=$(GNU_HOST) \
+ --target=$(PTXCONF_GNU_TARGET) \
+ --with-sysroot=$(SYSROOT) \
+ --enable-tui
+# --enable-gdbtk
+
+$(STATEDIR)/cross-gdb.prepare: $(cross-gdb_prepare_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(CROSS_GDB_DIR)/config.cache)
+ cd $(CROSS_GDB_DIR) && \
+ $(CROSS_GDB_PATH) $(CROSS_GDB_ENV) \
+ ./configure $(CROSS_GDB_AUTOCONF)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+cross-gdb_compile: $(STATEDIR)/cross-gdb.compile
+
+$(STATEDIR)/cross-gdb.compile: $(cross-gdb_compile_deps_default)
+ @$(call targetinfo, $@)
+ cd $(CROSS_GDB_DIR) && $(CROSS_GDB_PATH) $(MAKE) $(PARALLELMFLAGS)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+cross-gdb_install: $(STATEDIR)/cross-gdb.install
+
+$(STATEDIR)/cross-gdb.install: $(cross-gdb_install_deps_default)
+ @$(call targetinfo, $@)
+ @$(call install, CROSS_GDB,,h)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+cross-gdb_clean:
+ rm -rf $(STATEDIR)/cross-gdb.*
+ rm -rf $(CROSS_GDB_DIR)
+
+# vim: syntax=make
diff --git a/rules/gdb.make b/rules/gdb.make
new file mode 100644
index 0000000..04e0b0b
--- /dev/null
+++ b/rules/gdb.make
@@ -0,0 +1 @@
+# this file is left intentionally blank
diff --git a/rules/glibc-crt.in b/rules/glibc-crt.in
new file mode 100644
index 0000000..d0c9674
--- /dev/null
+++ b/rules/glibc-crt.in
@@ -0,0 +1,6 @@
+# config for glibc-crt
+
+config GLIBC_CRT
+ bool
+ # no prompt
+ select CROSS_GCC_FIRST
diff --git a/rules/glibc-crt.make b/rules/glibc-crt.make
new file mode 100644
index 0000000..f3c7212
--- /dev/null
+++ b/rules/glibc-crt.make
@@ -0,0 +1,120 @@
+# -*-makefile-*-
+# $Id$
+#
+# Copyright (C) 2006 by Robert Schwebel <r.schwebel@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_GLIBC_CRT) += glibc-crt
+
+#
+# Paths and names
+#
+GLIBC_CRT_DIR = $(BUILDDIR)/$(GLIBC)-crt
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+glibc-crt_get: $(STATEDIR)/glibc-crt.get
+
+$(STATEDIR)/glibc-crt.get: $(STATEDIR)/glibc.get
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+glibc-crt_extract: $(STATEDIR)/glibc-crt.extract
+
+$(STATEDIR)/glibc-crt.extract: $(glibc-crt_extract_deps_default) $(STATEDIR)/glibc.extract
+ @$(call targetinfo, $@)
+ @$(call clean, $(GLIBC_CRT_DIR))
+ mkdir -p $(GLIBC_CRT_DIR)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+glibc-crt_prepare: $(STATEDIR)/glibc-crt.prepare
+
+GLIBC_CRT_PATH := PATH=$(CROSS_PATH)
+GLIBC_CRT_ENV := \
+ BUILD_CC=$(HOSTCC) \
+ libc_cv_forced_unwind=yes \
+ libc_cv_c_cleanup=yes
+
+#
+# libc_cv_forced_unwind=yes
+# libc_cv_c_cleanup=yes
+#
+# is needed for nptl (mkl)
+#
+
+
+#
+# autoconf
+#
+GLIBC_CRT_AUTOCONF = $(GLIBC_AUTOCONF)
+
+$(STATEDIR)/glibc-crt.prepare: $(glibc-crt_prepare_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(GLIBC_CRT_DIR)/config.cache)
+ cd $(GLIBC_CRT_DIR) && \
+ $(GLIBC_CRT_PATH) $(GLIBC_CRT_ENV) \
+ $(GLIBC_DIR)/configure $(GLIBC_CRT_AUTOCONF)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+glibc-crt_compile: $(STATEDIR)/glibc-crt.compile
+
+$(STATEDIR)/glibc-crt.compile: $(glibc-crt_compile_deps_default)
+ @$(call targetinfo, $@)
+ cd $(GLIBC_CRT_DIR) && $(GLIBC_CRT_ENV) $(GLIBC_CRT_PATH) $(MAKE) csu/subdir_lib
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+glibc-crt_install: $(STATEDIR)/glibc-crt.install
+
+$(STATEDIR)/glibc-crt.install: $(glibc-crt_install_deps_default)
+ @$(call targetinfo, $@)
+ for file in crt1.o crti.o crtn.o; do \
+ $(INSTALL) -m 644 -D $(GLIBC_CRT_DIR)/csu/$$file \
+ $(SYSROOT)/usr/lib/$$file; \
+ done
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+glibc-crt_targetinstall: $(STATEDIR)/glibc-crt.targetinstall
+
+$(STATEDIR)/glibc-crt.targetinstall: $(glibc-crt_targetinstall_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+glibc-crt_clean:
+ rm -rf $(STATEDIR)/glibc-crt.*
+ rm -rf $(GLIBC_CRT_DIR)
+
+# vim: syntax=make
diff --git a/rules/glibc-final.in b/rules/glibc-final.in
new file mode 100644
index 0000000..2d54a87
--- /dev/null
+++ b/rules/glibc-final.in
@@ -0,0 +1,4 @@
+config GLIBC_FINAL
+ bool
+ select CROSS_GCC_SECOND
+
diff --git a/rules/glibc-final.make b/rules/glibc-final.make
new file mode 100644
index 0000000..ce7c836
--- /dev/null
+++ b/rules/glibc-final.make
@@ -0,0 +1,96 @@
+# -*-makefile-*-
+# $Id$
+#
+# Copyright (C) 2006 by Marc Kleine-Budde <mkl@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_GLIBC_FINAL) += glibc_final
+
+#
+# Paths and names
+#
+GLIBC_FINAL_DIR = $(BUILDDIR)/$(GLIBC)-build
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+glibc_final_get: $(STATEDIR)/glibc_final.get
+
+$(STATEDIR)/glibc_final.get: $(glibc_final_get_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+glibc_final_extract: $(STATEDIR)/glibc_final.extract
+
+$(STATEDIR)/glibc_final.extract: $(glibc_final_extract_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+glibc_final_prepare: $(STATEDIR)/glibc_final.prepare
+
+$(STATEDIR)/glibc_final.prepare: $(glibc_final_prepare_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+glibc_final_compile: $(STATEDIR)/glibc_final.compile
+
+$(STATEDIR)/glibc_final.compile: $(glibc_final_compile_deps_default)
+ @$(call targetinfo, $@)
+ cd $(GLIBC_BUILDDIR) && $(GLIBC_PATH) $(MAKE) $(PARALLELMFLAGS)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+glibc_final_install: $(STATEDIR)/glibc_final.install
+
+$(STATEDIR)/glibc_final.install: $(glibc_final_install_deps_default)
+ @$(call targetinfo, $@)
+ cd $(GLIBC_BUILDDIR) && \
+ $(GLIBC_PATH) $(MAKE) $(PARALLELMFLAGS) install_root=$(SYSROOT) \
+ install-bin install-rootsbin \
+ install-sbin install-data install-others
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+glibc_final_targetinstall: $(STATEDIR)/glibc_final.targetinstall
+
+$(STATEDIR)/glibc_final.targetinstall: $(glibc_final_targetinstall_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+glibc_final_clean:
+ rm -rf $(STATEDIR)/glibc_final.*
+ rm -rf $(IMAGEDIR)/glibc_final_*
+ rm -rf $(GLIBC_FINAL_DIR)
+
+# vim: syntax=make
diff --git a/rules/glibc-headers.in b/rules/glibc-headers.in
new file mode 100644
index 0000000..4792de3
--- /dev/null
+++ b/rules/glibc-headers.in
@@ -0,0 +1,7 @@
+# config for glibc-headers
+
+config GLIBC_HEADERS
+ bool
+ # no prompt
+ select CROSS_BINUTILS
+
diff --git a/rules/glibc-headers.make b/rules/glibc-headers.make
new file mode 100644
index 0000000..3ed1367
--- /dev/null
+++ b/rules/glibc-headers.make
@@ -0,0 +1,151 @@
+# -*-makefile-*-
+# $Id$
+#
+# Copyright (C) 2006 by Robert Schwebel
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_GLIBC_HEADERS) += glibc-headers
+
+#
+# Paths and names
+#
+GLIBC_HEADERS_DIR = $(BUILDDIR)/$(GLIBC)-headers
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+glibc-headers_get: $(STATEDIR)/glibc-headers.get
+
+$(STATEDIR)/glibc-headers.get: $(glibc-headers_get_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+glibc-headers_extract: $(STATEDIR)/glibc-headers.extract
+
+$(STATEDIR)/glibc-headers.extract: $(glibc-headers_extract_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(GLIBC_HEADERS_DIR))
+ mkdir -p $(GLIBC_HEADERS_DIR)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+glibc-headers_prepare: $(STATEDIR)/glibc-headers.prepare
+
+GLIBC_HEADERS_PATH := PATH=$(PATH)
+
+GLIBC_HEADERS_ENV := \
+ $(HOST_ENV) \
+ CFLAGS=-DBOOTSTRAP_GCC
+
+#
+# needed for powerpc:
+#
+# glibc checks for several binutils properties during configure; because
+# we don't have binutils yet and we only want to build the headers, fake
+# the tests:
+#
+# - libc_cv_ppc_machine: avoid altivec test
+#
+ifdef PTXCONF_ARCH_POWERPC
+GLIBC_HEADERS_ENV += \
+ libc_cv_mlong_double_128ibm=set \
+ libc_cv_mlong_double_128=set \
+ libc_cv_ppc_machine=yes
+endif
+
+#
+# autoconf
+#
+GLIBC_HEADERS_AUTOCONF := \
+ --prefix=/usr \
+ --build=$(GNU_HOST) \
+ --host=$(PTXCONF_GNU_TARGET) \
+ --with-headers=$(SYSROOT)/usr/include \
+ --without-cvs \
+ --disable-sanity-checks \
+ --enable-hacker-mode
+
+ifdef PTXCONF_GLIBC_TLS
+GLIBC_HEADERS_AUTOCONF += --with-tls
+endif
+
+glibc-headers_prepare_deps := \
+ $(glibc-headers_prepare_deps_default) \
+ $(STATEDIR)/glibc.extract
+
+$(STATEDIR)/glibc-headers.prepare: $(glibc-headers_prepare_deps)
+ @$(call targetinfo, $@)
+ cd $(GLIBC_HEADERS_DIR) && \
+ $(GLIBC_HEADERS_PATH) $(GLIBC_HEADERS_ENV) \
+ $(GLIBC_DIR)/configure $(GLIBC_HEADERS_AUTOCONF)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+glibc-headers_compile: $(STATEDIR)/glibc-headers.compile
+
+$(STATEDIR)/glibc-headers.compile: $(glibc-headers_compile_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+glibc-headers_install: $(STATEDIR)/glibc-headers.install
+
+$(STATEDIR)/glibc-headers.install: $(glibc-headers_install_deps_default)
+ @$(call targetinfo, $@)
+
+ ( \
+ cd $(GLIBC_HEADERS_DIR); \
+ $(GLIBC_HEADERS_PATH) $(GLIBC_HEADERS_ENV) \
+ $(MAKE) sysdeps/gnu/errlist.c; \
+ mkdir -p stdio-common; \
+ touch stdio-common/errlist-compat.c; \
+ $(GLIBC_HEADERS_PATH) $(GLIBC_HEADERS_ENV) \
+ $(MAKE) compiling=yes install_root=$(SYSROOT) install-headers; \
+ mkdir -p $(SYSROOT)/usr/include/gnu; \
+ touch $(SYSROOT)/usr/include/gnu/stubs.h; \
+ cp $(GLIBC_DIR)/include/features.h $(SYSROOT)/usr/include/features.h; \
+ cp bits/stdio_lim.h $(SYSROOT)/usr/include/bits/stdio_lim.h; \
+ )
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+glibc-headers_targetinstall: $(STATEDIR)/glibc-headers.targetinstall
+
+$(STATEDIR)/glibc-headers.targetinstall: $(glibc-headers_targetinstall_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+glibc-headers_clean:
+ rm -rf $(STATEDIR)/glibc-headers.*
+ rm -rf $(GLIBC_HEADERS_DIR)
+
+# vim: syntax=make
diff --git a/rules/glibc-linuxthreads.in b/rules/glibc-linuxthreads.in
new file mode 100644
index 0000000..f6158c8
--- /dev/null
+++ b/rules/glibc-linuxthreads.in
@@ -0,0 +1,7 @@
+config GLIBC_LINUXTHREADS
+ bool
+
+config GLIBC_LINUXTHREADS_VERSION
+ depends on GLIBC_LINUXTHREADS
+ string
+ default "${PTXCONF_GLIBC_VERSION}"
diff --git a/rules/glibc-linuxthreads.make b/rules/glibc-linuxthreads.make
new file mode 100644
index 0000000..c0f5b90
--- /dev/null
+++ b/rules/glibc-linuxthreads.make
@@ -0,0 +1,107 @@
+# -*-makefile-*-
+# $Id: template 6001 2006-08-12 10:15:00Z mkl $
+#
+# Copyright (C) 2006 by Marc Kleine-Budde <mkl@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_GLIBC_LINUXTHREADS) += glibc-linuxthreads
+
+#
+# Paths and names
+#
+GLIBC_LINUXTHREADS_VERSION := $(call remove_quotes,$(PTXCONF_GLIBC_LINUXTHREADS_VERSION))
+GLIBC_LINUXTHREADS := glibc-linuxthreads-$(GLIBC_LINUXTHREADS_VERSION)
+GLIBC_LINUXTHREADS_SUFFIX := tar.bz2
+GLIBC_LINUXTHREADS_URL := $(PTXCONF_SETUP_GNUMIRROR)/glibc/$(GLIBC_LINUXTHREADS).$(GLIBC_LINUXTHREADS_SUFFIX)
+GLIBC_LINUXTHREADS_SOURCE := $(SRCDIR)/$(GLIBC_LINUXTHREADS).$(GLIBC_LINUXTHREADS_SUFFIX)
+GLIBC_LINUXTHREADS_DIR := $(BUILDDIR)/$(GLIBC_LINUXTHREADS)
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+glibc-linuxthreads_get: $(STATEDIR)/glibc-linuxthreads.get
+
+$(STATEDIR)/glibc-linuxthreads.get: $(glibc-linuxthreads_get_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+$(GLIBC_LINUXTHREADS_SOURCE):
+ @$(call targetinfo, $@)
+ @$(call get, GLIBC_LINUXTHREADS)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+ifdef PTXCONF_GLIBC_LINUXTHREADS
+$(STATEDIR)/glibc.extract: $(STATEDIR)/glibc-linuxthreads.extract
+endif
+
+glibc-linuxthreads_extract: $(STATEDIR)/glibc-linuxthreads.extract
+
+$(STATEDIR)/glibc-linuxthreads.extract: $(glibc-linuxthreads_extract_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(GLIBC_LINUXTHREADS_DIR))
+ @$(call extract, GLIBC_LINUXTHREADS, $(GLIBC_LINUXTHREADS_DIR))
+ @$(call patchin, GLIBC_LINUXTHREADS, $(GLIBC_LINUXTHREADS_DIR))
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+glibc-linuxthreads_prepare: $(STATEDIR)/glibc-linuxthreads.prepare
+
+$(STATEDIR)/glibc-linuxthreads.prepare: $(glibc-linuxthreads_prepare_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+glibc-linuxthreads_compile: $(STATEDIR)/glibc-linuxthreads.compile
+
+$(STATEDIR)/glibc-linuxthreads.compile: $(glibc-linuxthreads_compile_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+glibc-linuxthreads_install: $(STATEDIR)/glibc-linuxthreads.install
+
+$(STATEDIR)/glibc-linuxthreads.install: $(glibc-linuxthreads_install_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+glibc-linuxthreads_targetinstall: $(STATEDIR)/glibc-linuxthreads.targetinstall
+
+$(STATEDIR)/glibc-linuxthreads.targetinstall: $(glibc-linuxthreads_targetinstall_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+glibc-linuxthreads_clean:
+ rm -rf $(STATEDIR)/glibc-linuxthreads.*
+ rm -rf $(IMAGEDIR)/glibc-linuxthreads_*
+ rm -rf $(GLIBC_LINUXTHREADS_DIR)
+
+# vim: syntax=make
diff --git a/rules/glibc-ports.in b/rules/glibc-ports.in
new file mode 100644
index 0000000..ea5ae73
--- /dev/null
+++ b/rules/glibc-ports.in
@@ -0,0 +1,7 @@
+config GLIBC_PORTS
+ bool
+
+config GLIBC_PORTS_VERSION
+ depends on GLIBC_PORTS
+ string
+ default "${PTXCONF_GLIBC_VERSION}"
diff --git a/rules/glibc-ports.make b/rules/glibc-ports.make
new file mode 100644
index 0000000..7cfc43d
--- /dev/null
+++ b/rules/glibc-ports.make
@@ -0,0 +1,107 @@
+# -*-makefile-*-
+# $Id$
+#
+# Copyright (C) 2006 by Robert Schwebel
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_GLIBC_PORTS) += glibc-ports
+
+#
+# Paths and names
+#
+GLIBC_PROTS_VERSION := $(call remove_quotes,$(PTXCONF_GLIBC_PORTS_VERSION))
+GLIBC_PORTS := glibc-ports-$(GLIBC_PROTS_VERSION)
+GLIBC_PORTS_SUFFIX := tar.bz2
+GLIBC_PORTS_URL := $(PTXCONF_SETUP_GNUMIRROR)/glibc/$(GLIBC_PORTS).$(GLIBC_PORTS_SUFFIX)
+GLIBC_PORTS_SOURCE := $(SRCDIR)/$(GLIBC_PORTS).$(GLIBC_PORTS_SUFFIX)
+GLIBC_PORTS_DIR := $(BUILDDIR)/$(GLIBC_PORTS)
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+glibc-ports_get: $(STATEDIR)/glibc-ports.get
+
+$(STATEDIR)/glibc-ports.get: $(glibc-ports_get_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+$(GLIBC_PORTS_SOURCE):
+ @$(call targetinfo, $@)
+ @$(call get, GLIBC_PORTS)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+ifdef PTXCONF_GLIBC_PORTS
+$(STATEDIR)/glibc.extract: $(STATEDIR)/glibc-ports.extract
+endif
+
+glibc-ports_extract: $(STATEDIR)/glibc-ports.extract
+
+$(STATEDIR)/glibc-ports.extract: $(glibc-ports_extract_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(GLIBC_PORTS_DIR))
+ @$(call extract, GLIBC_PORTS, $(BUILDDIR))
+ @$(call patchin, GLIBC_PORTS, $(GLIBC_PORTS_DIR))
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+glibc-ports_prepare: $(STATEDIR)/glibc-ports.prepare
+
+$(STATEDIR)/glibc-ports.prepare: $(glibc-ports_prepare_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+glibc-ports_compile: $(STATEDIR)/glibc-ports.compile
+
+$(STATEDIR)/glibc-ports.compile: $(glibc-ports_compile_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+glibc-ports_install: $(STATEDIR)/glibc-ports.install
+
+$(STATEDIR)/glibc-ports.install: $(glibc-ports_install_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+glibc-ports_targetinstall: $(STATEDIR)/glibc-ports.targetinstall
+
+$(STATEDIR)/glibc-ports.targetinstall: $(glibc-ports_targetinstall_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+glibc-ports_clean:
+ rm -rf $(STATEDIR)/glibc-ports.*
+ rm -rf $(IMAGEDIR)/glibc_ports_*
+ rm -rf $(GLIBC_PORTS_DIR)
+
+# vim: syntax=make
diff --git a/rules/glibc.in b/rules/glibc.in
new file mode 100644
index 0000000..8824fca
--- /dev/null
+++ b/rules/glibc.in
@@ -0,0 +1,65 @@
+# config for glibc
+
+menuconfig GLIBC
+ bool
+ select GLIBC_PORTS if GLIBC_ADDON_NPTL && ( ARCH_ARM || ARCH_MIPS )
+ select GLIBC_LINUXTHREADS if GLIBC_ADDON_LINUXTHREADS
+ select GLIBC_CRT
+ select CROSS_GCC_FIRST
+ prompt "glibc "
+
+config GLIBC_VERSION
+ depends on GLIBC
+ string
+ prompt "glibc version"
+ default "2.4"
+ help
+ Specify the glibc version here.
+
+config GLIBC_EXTRA_CONFIG
+ depends on GLIBC
+ string
+ prompt "extra configure options"
+ help
+ Add these extra options to glibc's configure script.
+
+#config GLIBC_EXTRA_ENV
+# depends on GLIBC
+# string
+# prompt "extra environment"
+# help
+# Add this to the glibc environment.
+
+#config GLIBC_ADDON_CRYPT
+# depends on GLIBC
+# bool
+# prompt "addon: crypt"
+# help
+# Activate the crypt addon. This is only necessary for glibc
+# versions <= 2.1
+
+choice
+ prompt "Thread implementation"
+ depends on GLIBC
+ default GLIBC_ADDON_NPTL
+
+ config GLIBC_ADDON_LINUXTHREADS
+ bool
+ prompt "linuxthreads"
+ help
+ Activate the linuxthreads addon.
+
+ config GLIBC_ADDON_NPTL
+ bool
+ prompt "nptl"
+ select GLIBC_TLS
+ help
+ Activate the NPTL addon.
+endchoice
+
+config GLIBC_TLS
+ depends on GLIBC
+ bool
+ prompt "enable TLS"
+ help
+ Activate Thread Local Storage.
diff --git a/rules/glibc.make b/rules/glibc.make
new file mode 100644
index 0000000..fcc623f
--- /dev/null
+++ b/rules/glibc.make
@@ -0,0 +1,175 @@
+# -*-makefile-*-
+# $Id$
+#
+# Copyright (C) 2006 by Robert Schwebel
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_GLIBC) += glibc
+
+#
+# Paths and names
+#
+GLIBC_VERSION := $(call remove_quotes,$(PTXCONF_GLIBC_VERSION))
+GLIBC := glibc-$(GLIBC_VERSION)
+GLIBC_SUFFIX := tar.bz2
+GLIBC_URL := $(PTXCONF_SETUP_GNUMIRROR)/glibc/$(GLIBC).$(GLIBC_SUFFIX)
+GLIBC_SOURCE := $(SRCDIR)/$(GLIBC).$(GLIBC_SUFFIX)
+GLIBC_DIR := $(BUILDDIR)/$(GLIBC)
+GLIBC_BUILDDIR := $(BUILDDIR)/$(GLIBC)-build
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+glibc_get: $(STATEDIR)/glibc.get
+
+$(STATEDIR)/glibc.get: $(glibc_get_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+$(GLIBC_SOURCE):
+ @$(call targetinfo, $@)
+ @$(call get, GLIBC)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+glibc_extract: $(STATEDIR)/glibc.extract
+
+$(STATEDIR)/glibc.extract: $(glibc_extract_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(GLIBC_DIR))
+ @$(call clean, $(GLIBC_BUILDDIR))
+ @$(call extract, GLIBC)
+ @$(call patchin, GLIBC)
+
+ifdef PTXCONF_GLIBC_LINUXTHREADS
+ cp -r $(GLIBC_LINUXTHREADS_DIR)/linuxthreads $(GLIBC_DIR)
+ cp -r $(GLIBC_LINUXTHREADS_DIR)/linuxthreads_db $(GLIBC_DIR)
+endif
+ifdef PTXCONF_GLIBC_PORTS
+ ln -sf $(GLIBC_PORTS_DIR) $(GLIBC_DIR)/ports
+endif
+ mkdir -p $(GLIBC_BUILDDIR)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+glibc_prepare: $(STATEDIR)/glibc.prepare
+
+GLIBC_PATH := PATH=$(CROSS_PATH)
+
+GLIBC_ENV := \
+ BUILD_CC=$(HOSTCC) \
+ libc_cv_forced_unwind=yes \
+ libc_cv_c_cleanup=yes
+
+#
+# libc_cv_forced_unwind=yes
+# libc_cv_c_cleanup=yes
+#
+# is needed for nptl (mkl)
+#
+
+#
+# autoconf
+#
+ifdef PTXCONF_GLIBC_PORTS
+GLIBC_ADDONS += ports
+endif
+ifdef PTXCONF_GLIBC_ADDON_NPTL
+GLIBC_ADDONS += nptl
+endif
+ifdef PTXCONF_GLIBC_ADDON_LINUXTHREADS
+GLIBC_ADDONS += linuxthreads
+endif
+
+GLIBC_AUTOCONF := \
+ --prefix=/usr \
+ --build=$(GNU_BUILD) \
+ --host=$(PTXCONF_GNU_TARGET) \
+ $(call remove_quotes,$(PTXCONF_GLIBC_EXTRA_CONFIG)) \
+ --enable-add-ons=$(subst $(space),$(comma),$(GLIBC_ADDONS)) \
+ --with-headers=$(SYSROOT)/usr/include \
+ --enable-kernel=2.4.3 \
+ --without-cvs \
+ --disable-profile \
+ --enable-debug \
+ --without-gd \
+ --with-__thread \
+ --enable-shared
+
+ifdef PTXCONF_GLIBC_TLS
+GLIBC_AUTOCONF += --with-tls
+endif
+
+#
+# --enable-profile
+#
+# is broken, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28516
+#
+
+
+$(STATEDIR)/glibc.prepare: $(glibc_prepare_deps_default)
+ @$(call targetinfo, $@)
+ cd $(GLIBC_BUILDDIR) && \
+ $(GLIBC_ENV) $(GLIBC_PATH) \
+ $(GLIBC_DIR)/configure $(GLIBC_AUTOCONF)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+glibc_compile: $(STATEDIR)/glibc.compile
+
+$(STATEDIR)/glibc.compile: $(glibc_compile_deps_default)
+ @$(call targetinfo, $@)
+ cd $(GLIBC_BUILDDIR) && $(GLIBC_PATH) \
+ $(MAKE) $(PARALLELMFLAGS) lib
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+glibc_install: $(STATEDIR)/glibc.install
+
+$(STATEDIR)/glibc.install: $(glibc_install_deps_default)
+ @$(call targetinfo, $@)
+ cd $(GLIBC_BUILDDIR) && \
+ $(GLIBC_PATH) \
+ $(MAKE) $(PARALLELMFLAGS) \
+ install_root=$(SYSROOT) install-lib-all install-headers
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+glibc_targetinstall: $(STATEDIR)/glibc.targetinstall
+
+$(STATEDIR)/glibc.targetinstall: $(glibc_targetinstall_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+glibc_clean:
+ rm -rf $(STATEDIR)/glibc.*
+ rm -rf $(GLIBC_DIR)
+
+# vim: syntax=make
diff --git a/rules/kernel-headers.in b/rules/kernel-headers.in
new file mode 100644
index 0000000..5f77dc9
--- /dev/null
+++ b/rules/kernel-headers.in
@@ -0,0 +1,30 @@
+# config for kernel-headers
+
+menuconfig KERNEL_HEADERS
+ bool
+ prompt "kernel "
+
+config KERNEL_HEADERS_VERSION
+ depends on KERNEL_HEADERS
+ string
+ prompt "kernel version"
+ default "2.6.17"
+ help
+ Specify the kernel version here.
+
+config KERNEL_HEADERS_SANIZIZED
+ depends on KERNEL_HEADERS
+ bool
+ prompt "use sanitized headers"
+ help
+ If selected we use the sanitized kernel headers instead of the
+ original kernel headers.
+
+config KERNEL_HEADERS_CONFIG
+ depends on KERNEL_HEADERS
+ string
+ default "kernelconfig.${PTXCONF_ARCH}"
+ prompt "kernel config file"
+ help
+ This kernel .config file is being used.
+
diff --git a/rules/kernel-headers.make b/rules/kernel-headers.make
new file mode 100644
index 0000000..478d3f2
--- /dev/null
+++ b/rules/kernel-headers.make
@@ -0,0 +1,125 @@
+# -*-makefile-*-
+# $Id$
+#
+# Copyright (C) 2006 by Robert Schwebel
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_KERNEL_HEADERS) += kernel-headers
+
+#
+# Paths and names
+#
+KERNEL-HEADERS_VERSION := $(PTXCONF_KERNEL_HEADERS_VERSION)
+KERNEL-HEADERS := linux-$(call remove_quotes,$(KERNEL-HEADERS_VERSION))
+KERNEL-HEADERS_SUFFIX := tar.bz2
+KERNEL-HEADERS_URL := http://www.kernel.org/pub/linux/kernel/v2.6/$(KERNEL-HEADERS).$(KERNEL-HEADERS_SUFFIX)
+KERNEL-HEADERS_SOURCE := $(SRCDIR)/$(KERNEL-HEADERS).$(KERNEL-HEADERS_SUFFIX)
+KERNEL-HEADERS_DIR := $(BUILDDIR)/$(KERNEL-HEADERS)
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+kernel-headers_get: $(STATEDIR)/kernel-headers.get
+
+$(STATEDIR)/kernel-headers.get: $(kernel-headers_get_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+$(KERNEL-HEADERS_SOURCE):
+ @$(call targetinfo, $@)
+ @$(call get, KERNEL-HEADERS)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+kernel-headers_extract: $(STATEDIR)/kernel-headers.extract
+
+$(STATEDIR)/kernel-headers.extract: $(kernel-headers_extract_deps_default)
+ @$(call targetinfo, $@)
+ @$(call clean, $(KERNEL-HEADERS_DIR))
+ @$(call extract, KERNEL-HEADERS)
+ @$(call patchin, KERNEL-HEADERS)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+kernel-headers_prepare: $(STATEDIR)/kernel-headers.prepare
+
+KERNEL-HEADERS_PATH := PATH=$(HOST_PATH)
+KERNEL-HEADERS_ENV := $(HOST_ENV)
+
+$(STATEDIR)/kernel-headers.prepare: $(kernel-headers_prepare_deps_default)
+ @$(call targetinfo, $@)
+ cp $(PTXDIST_WORKSPACE)/$(PTXCONF_KERNEL_HEADERS_CONFIG) \
+ $(KERNEL-HEADERS_DIR)/.config
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+kernel-headers_compile: $(STATEDIR)/kernel-headers.compile
+
+$(STATEDIR)/kernel-headers.compile: $(kernel-headers_compile_deps_default)
+ @$(call targetinfo, $@)
+ ( \
+ cd $(KERNEL-HEADERS_DIR); \
+ $(MAKE) ARCH=$(PTXCONF_ARCH) oldconfig; \
+ $(MAKE) ARCH=$(PTXCONF_ARCH) include/asm include/linux/version.h; \
+ )
+ifdef PTXCONF_ARCH_ARM
+ cd $(KERNEL-HEADERS_DIR) && $(MAKE) ARCH=$(PTXCONF_ARCH) include/asm-$(PTXCONF_ARCH)/.arch
+endif
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+kernel-headers_install: $(STATEDIR)/kernel-headers.install
+
+$(STATEDIR)/kernel-headers.install: $(kernel-headers_install_deps_default)
+ @$(call targetinfo, $@)
+ ( \
+ cd $(KERNEL-HEADERS_DIR); \
+ rm -fr $(SYSROOT)/usr/include/linux; \
+ mkdir -p $(SYSROOT)/usr/include; \
+ cp -r include/linux $(SYSROOT)/usr/include/; \
+ rm -fr $(SYSROOT)/usr/include/asm; \
+ cp -r include/asm-$(PTXCONF_ARCH) $(SYSROOT)/usr/include/asm; \
+ rm -fr $(SYSROOT)/usr/include/asm-generic; \
+ cp -r include/asm-generic $(SYSROOT)/usr/include/asm-generic; \
+ )
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+kernel-headers_targetinstall: $(STATEDIR)/kernel-headers.targetinstall
+
+$(STATEDIR)/kernel-headers.targetinstall: $(kernel-headers_targetinstall_deps_default)
+ @$(call targetinfo, $@)
+ @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+kernel-headers_clean:
+ rm -rf $(STATEDIR)/kernel-headers.*
+ rm -rf $(KERNEL-HEADERS_DIR)
+
+# vim: syntax=make
diff --git a/rules/pre/toolchain.make b/rules/pre/toolchain.make
new file mode 100644
index 0000000..0dd44ea
--- /dev/null
+++ b/rules/pre/toolchain.make
@@ -0,0 +1,5 @@
+# -*-makefile-*-
+
+SYSROOT=$(call remove_quotes,$(PTXCONF_PREFIX)/sysroot-$(PTXCONF_GNU_TARGET))
+
+# vim: syntax=make