summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS8
-rw-r--r--conf/distro/foonas.conf4
-rw-r--r--conf/distro/include/oplinux.inc51
-rw-r--r--conf/distro/oplinux-uclibc.conf81
-rw-r--r--conf/distro/oplinux.conf131
-rw-r--r--packages/aircrack/aircrack-ng_0.7.bb5
-rw-r--r--packages/binutils/binutils-2.17.50.0.12/.mtn2git_empty (renamed from packages/linux/linux-turbostation/2.6.20.1/.mtn2git_empty)0
-rw-r--r--packages/binutils/binutils-2.17.50.0.12/110-arm-eabi-conf.patch24
-rw-r--r--packages/binutils/binutils-2.17.50.0.12/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch31
-rw-r--r--packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-100-uclibc-conf.patch139
-rw-r--r--packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-300-001_ld_makefile_patch.patch50
-rw-r--r--packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-300-006_better_file_error.patch43
-rw-r--r--packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-300-012_check_ldrunpath_length.patch47
-rw-r--r--packages/binutils/binutils-cross_2.17.50.0.12.bb32
-rw-r--r--packages/binutils/binutils_2.17.50.0.12.bb12
-rw-r--r--packages/exmap-console/.mtn2git_empty0
-rw-r--r--packages/exmap-console/exmap-console.inc61
-rw-r--r--packages/exmap-console/exmap-console_0.4.bb2
-rw-r--r--packages/exmap-console/exmap-console_svn.bb10
-rw-r--r--packages/gcc/gcc-4.1.1/gcc-ignore-cache.patch15
-rw-r--r--packages/gcc/gcc-4.1.1/ppc-gcc-41-20060515.patch2225
-rw-r--r--packages/gcc/gcc-4.1.1/ppc-sfp-long-double-gcc411-7.patch4271
-rw-r--r--packages/gcc/gcc_4.1.1.bb6
-rw-r--r--packages/glibc/files/ppc-ld-nofpu-20070104.patch190
-rw-r--r--packages/glibc/files/ppc-ports-ld-nofpu-20070114.patch38
-rw-r--r--packages/glibc/files/ppc-sfp-machine.patch297
-rw-r--r--packages/glibc/files/ppc-soft-fp-20070115.patch182
-rw-r--r--packages/glibc/glibc_2.5.bb9
-rw-r--r--packages/gpe-conf/gpe-conf-0.2.4/.mtn2git_empty0
-rw-r--r--packages/gpe-conf/gpe-conf-0.2.4/scriptname.patch13
-rw-r--r--packages/gpe-conf/gpe-conf_0.2.4.bb6
-rw-r--r--packages/images/foonas-image.bb2
-rw-r--r--packages/linux/linux-efika_2.6.20.bb3
-rw-r--r--packages/linux/linux-turbostation/defconfig5
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_arch_ppc_syslib_open_pic.c14
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_drivers_i2c_chips_Kconfig17
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_drivers_i2c_chips_Makefile12
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_drivers_mtd_maps_physmap.c38
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_drivers_net_r8169.c13
-rw-r--r--packages/linux/linux-turbostation_2.6.20.2.bb (renamed from packages/linux/linux-turbostation_2.6.20.1.bb)6
-rw-r--r--packages/meta/foonas-packages.bb2
-rw-r--r--packages/perl/perl-5.8.7/config.sh-powerpc-linux2
-rw-r--r--packages/picocom/picocom/.mtn2git_empty0
-rw-r--r--packages/picocom/picocom/gcc4.patch12
-rw-r--r--packages/picocom/picocom/nolock.patch35
-rw-r--r--packages/picocom/picocom_1.4.bb9
-rw-r--r--packages/procps/procps.inc14
-rw-r--r--packages/procps/procps_3.1.15.bb15
-rw-r--r--packages/procps/procps_3.2.1.bb16
-rw-r--r--packages/procps/procps_3.2.5.bb19
-rw-r--r--packages/procps/procps_3.2.7.bb19
-rw-r--r--packages/rglueap/rglueap_0.1.bb8
-rw-r--r--packages/speex/speex_1.1.12+1.2beta1.bb3
-rw-r--r--packages/tasks/task-mokogateway.bb7
-rw-r--r--packages/xorg-xserver/xserver-kdrive/kdrive-imageon.patch1104
-rw-r--r--packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb2
-rw-r--r--site/powerpc-linux5
57 files changed, 8802 insertions, 563 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 0dd848a2d9..fd221071d7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -118,12 +118,12 @@ Recipes: mx31ads-kernel*
Person: Marcin Juszkiewicz
Mail: hrw@openembedded.org
Website: http://www.hrw.one.pl/
-Machines: collie, spitz, tosa, progear
+Machines: collie, tosa, progear
Distros: OpenZaurus, celinux-test
Interests: WiFi, Opie, Qtopia fonts, Native SDK
Recipes: linux, hostap*, orinoco*, wpa-supplicant*, wireless-tools, keymaps
-Recipes: linux-rp, kdepimpi, subapplet, corsair, gammu, iqnotes, zbedic
-Recipes: ttf-fonts/* qpf-fonts/*
+Recipes: linux-rp, gammu
+Recipes: ttf-fonts/*
Person: Michael 'Mickey' Lauer
Mail: mlauer@vanille-media.de
@@ -164,7 +164,7 @@ Website: http://zerochaos.aircrack-ng.org
Interests: wifi, packet injection, security
Distros: Angstrom
Machines: akita
-Recipes: aircrack-ng, kismet, mdk2, rfakeap, void11
+Recipes: aircrack-ng, kismet, mdk2, rfakeap, void11, rglueap
Person: Rolf 'Laibsch' Leggewie
Mail: OE-recipes@rolf.leggewie.biz
diff --git a/conf/distro/foonas.conf b/conf/distro/foonas.conf
index 6d5385c338..dc0a1a9cae 100644
--- a/conf/distro/foonas.conf
+++ b/conf/distro/foonas.conf
@@ -10,7 +10,7 @@ DISTRO_VERSION = ".dev-snapshot-${SRCDATE}"
DISTRO_TYPE = "alpha"
# These should be merged once the bogofeed change has been committed.
FEED_URIS = "foonas-packages##http://ipkg.foonas.org/${MACHINE}/cross/1.0-dev/packages"
-FEED_URIS += "foonas-kernel##http://ipkg.foonas.org/{MACHINE}/cross/1.0-dev/kernel"
+FEED_URIS += "foonas-kernel##http://ipkg.foonas.org/${MACHINE}/cross/1.0-dev/kernel"
#
# Naming schemes
@@ -46,7 +46,7 @@ PREFERRED_PROVIDER_virtual/db-native = "db-native"
PREFERRED_VERSION_binutils = "2.16"
PREFERRED_VERSION_binutils-cross = "2.16"
-PREFERRED_VERSION_gcc = "4.1.2"
+PREFERRED_VERSION_gcc = "4.1.1"
PREFERRED_VERSION_gcc-cross = "4.1.1"
PREFERRED_VERSION_gcc-cross-initial = "4.1.1"
diff --git a/conf/distro/include/oplinux.inc b/conf/distro/include/oplinux.inc
new file mode 100644
index 0000000000..ecf08322fa
--- /dev/null
+++ b/conf/distro/include/oplinux.inc
@@ -0,0 +1,51 @@
+#
+# extra checking for needed tools
+#
+
+# set minimal version of BitBake needed
+BB_MIN_VERSION = "1.6.3"
+
+#oplinux is a multimachine distro
+INHERIT += "multimachine"
+
+# check for required tools and minimal BitBake version
+INHERIT += "sanity"
+
+
+# Specifies a location to search for pre-generated tarballs when fetching
+# a cvs:// URI. Outcomment this, if you always want to pull directly from CVS.
+#CVS_TARBALL_STASH = "http://www.digital-opsis.com/oplinux/source/current/"
+
+#INHERIT += "owmnr-mirrors"
+
+#Uncommend this is if you are using bitbake multithread and you have multiple cpu's or cores you are running on
+#BB_NUMBER_THREADS = "5"
+
+#Uncommend this if you hava icecc installed
+#INHERIT += "icecc"
+#PARALLEL_MAKE = "-j6"
+#ICECC_PATH = "/usr/bin/icecc"
+#ICECC_ENV_EXEC = "/home/stelios/icecc-create-env"
+
+#
+# Bootstrap & Init
+PREFERRED_PROVIDER_task-bootstrap = "task-base"
+
+# We want images supporting the following features (for task-base
+DISTRO_FEATURES = "nfs smbfs ext2 pcmcia usbgadget usbhost pci"
+
+
+OPLINUX_URI = "http://www.ifaistos.awmn"
+
+#Dir config
+IMAGE_ROOTFS = "${TMPDIR}/rootfs/${MACHINE}"
+
+#
+#Preferred versions of packages we need
+#
+PREFERRED_VERSION_busybox = "1.2.1"
+PREFERRED_VERSION_u-boot ?= "1.1.4"
+# Latest linphone supports yeaphone
+PREFERRED_VERSION_linphone ?= "1.6.0"
+
+
diff --git a/conf/distro/oplinux-uclibc.conf b/conf/distro/oplinux-uclibc.conf
new file mode 100644
index 0000000000..2ab34603e6
--- /dev/null
+++ b/conf/distro/oplinux-uclibc.conf
@@ -0,0 +1,81 @@
+#-----------------------------------------------------------------------------
+#@TYPE: Distribution
+#@NAME: OPLinux uClibC
+#@DESCRIPTION: OPLinux uClibC Embedded Linux Distribution Configuration
+#
+#@COMMENT: This is a distribution for a number of embedded targets
+#@COMMENT: currently supported are
+#@COMMENT: generic x86
+#@COMMENT: wrap (x86)
+#@COMMENT: dht-walnut (ppc405)
+#@COMMENT: efika (ppc603)
+#@COMMENT: rb5xx (mips)
+#@COMMENT:
+#@COMMENT: for additional info please check www.digital-opsis.com
+#-----------------------------------------------------------------------------
+
+require conf/distro/include/oplinux.inc
+require conf/distro/include/sane-srcdates.inc
+
+
+#
+# Header
+#
+DISTRO_NAME = "OPLinux-uClibC"
+DISTRO_VERSION = ".dev-snapshot-${SRCDATE}"
+#DISTRO_TYPE = "release"
+DISTRO_TYPE = "debug"
+
+#
+# Target OS & FPU system
+#
+TARGET_OS = "linux-uclibc"
+PREFERRED_PROVIDER_virtual/libiconv = "libiconv"
+PREFERRED_PROVIDER_virtual/libintl = "libintl"
+
+#
+# Naming schemes
+#
+PARALLEL_INSTALL_MODULES = "1"
+INHERIT += "package_ipk debian"
+
+#
+# Packaging and output format
+
+IMAGE_FSTYPES = "tar.gz ext2.gz jffs2"
+
+#
+# Kernel
+#
+KERNEL = "kernel26"
+MACHINE_KERNEL_VERSION = "2.6"
+
+
+#
+# Binutils & Compiler
+#
+PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial"
+PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross"
+PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"
+
+PREFERRED_VERSION_gcc ?= "4.1.1"
+PREFERRED_VERSION_gcc-cross ?= "4.1.1"
+PREFERRED_VERSION_gcc-cross-initial ?= "4.1.1"
+PREFERRED_VERSION_binutils ?= "2.17.50.0.5"
+PREFERRED_VERSION_binutils-cross ?= "2.17.50.0.5"
+
+
+#PREFERRED_VERSION_linux-libc-headers = "2.6.15.99"
+PREFERRED_VERSION_linux-libc-headers = "2.6.11.1"
+
+SRCDATE_uclibc ?= "20061128"
+PREFERRED_VERSION_uclibc ?= "0.9.28+svn${SRCDATE_uclibc}"
+
+
+
+#Other packages we need
+#try to keep it minimal :)
+DISTRO_EXTRA_RDEPENDS += "\
+ nano pciutils"
+
+
diff --git a/conf/distro/oplinux.conf b/conf/distro/oplinux.conf
new file mode 100644
index 0000000000..61756239e0
--- /dev/null
+++ b/conf/distro/oplinux.conf
@@ -0,0 +1,131 @@
+#-----------------------------------------------------------------------------
+#@TYPE: Distribution
+#@NAME: OPLinux uClibC
+#@DESCRIPTION: OPLinux uClibC Embedded Linux Distribution Configuration
+#
+#@COMMENT: This is a distribution for a number of embedded targets
+#@COMMENT: currently supported are
+#@COMMENT: generic x86
+#@COMMENT: wrap (x86)
+#@COMMENT: dht-walnut (ppc405)
+#@COMMENT: efika (ppc603)
+#@COMMENT: rb5xx (mips)
+#@COMMENT:
+#@COMMENT: for additional info please check www.digital-opsis.com
+#-----------------------------------------------------------------------------
+
+require conf/distro/include/oplinux.inc
+require conf/distro/include/sane-srcdates.inc
+
+
+#
+# Header
+#
+DISTRO_NAME = "OPLinux"
+DISTRO_VERSION = ".dev-snapshot-${SRCDATE}"
+#DISTRO_TYPE = "release"
+DISTRO_TYPE = "debug"
+
+#
+# Target OS & FPU system
+#
+TARGET_OS = "linux"
+#
+# Naming schemes
+#
+PARALLEL_INSTALL_MODULES = "1"
+INHERIT += "package_ipk debian"
+
+#
+# Packaging and output format
+
+IMAGE_FSTYPES = "tar.gz ext2.gz"
+
+
+
+PREFERRED_PROVIDER_dbus-glib = "dbus-glib"
+PREFERRED_PROVIDER_virtual/libsdl ?= "libsdl-x11"
+PREFERRED_PROVIDER_virtual/libxine ?= "libxine-x11"
+PREFERRED_PROVIDER_esound ?= "pulseaudio"
+PREFERRED_PROVIDER_virtual/libiconv ?= "libiconv"
+PREFERRED_PROVIDER_virtual/libintl ?= "libintl"
+
+
+
+PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial"
+PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}gcc:gcc-cross"
+PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}g++:gcc-cross"
+
+
+#EABI stuff
+PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "glibc-intermediate"
+PREFERRED_PROVIDER_virtual/powerpc-linux-libc-for-gcc ="glibc-intermediate"
+
+
+
+# Virtuals:
+PREFERRED_PROVIDER_virtual/db ?= "db"
+PREFERRED_PROVIDER_virtual/db-native ?= "db-native"
+PREFERRED_PROVIDER_virtual/xserver ?= "xserver-kdrive"
+
+# Others:
+PREFERRED_PROVIDER_virtual/libx11 ?= "diet-x11"
+PREFERRED_PROVIDER_gconf ?= "gconf-dbus"
+PREFERRED_PROVIDER_gnome-vfs ?= "gnome-vfs"
+PREFERRED_PROVIDER_gnome-vfs-plugin-file ?= "gnome-vfs"
+PREFERRED_PROVIDER_tslib ?= "tslib"
+PREFERRED_PROVIDER_tslib-conf ?= "tslib"
+PREFERRED_PROVIDER_libgpewidget ?= "libgpewidget"
+PREFERRED_PROVIDER_ntp = "ntp"
+PREFERRED_PROVIDER_hotplug = "udev"
+PREFERRED_PROVIDER_libxss = "libxss"
+
+
+PREFERRED_VERSION_gcc ?= "4.1.1"
+PREFERRED_VERSION_gcc-cross ?= "4.1.1"
+PREFERRED_VERSION_gcc-cross-sdk ?= "4.1.1"
+PREFERRED_VERSION_gcc-cross-initial ?= "4.1.1"
+
+PREFERRED_VERSION_binutils ?= "2.17.50.0.5"
+PREFERRED_VERSION_binutils-cross ?= "2.17.50.0.5"
+PREFERRED_VERSION_binutils-cross-sdk ?= "2.17.50.0.5"
+
+PREFERRED_VERSION_linux-libc-headers_i486 ?= "2.6.18"
+PREFERRED_VERSION_linux-libc-headers_i586 ?= "2.6.18"
+PREFERRED_VERSION_linux-libc-headers_i686 ?= "2.6.18"
+
+PREFERRED_VERSION_linux-libc-headers_powerpc ?= "2.6.18"
+PREFERRED_VERSION_linux-libc-headers ?= "2.6.18"
+
+PREFERRED_VERSION_glibc ?= "2.5"
+PREFERRED_VERSION_glibc_efika ?= "2.5"
+
+PREFERRED_VERSION_glibc-intermediate_i686 ?= "2.4"
+PREFERRED_VERSION_glibc-intermediate ?= "2.5"
+PREFERRED_VERSION_glibc-intermediate ?= "2.5"
+PREFERRED_VERSION_glibc-initial ?= "2.5"
+
+
+PCMCIA_MANAGER = "pcmciautils"
+
+PREFERRED_VERSION_dbus ?= "1.0.2"
+PREFERRED_VERSION_dbus-glib ?= "0.71"
+
+
+#
+# Kernel
+#
+KERNEL = "kernel26"
+MACHINE_KERNEL_VERSION = "2.6"
+
+
+
+#Other packages we need
+#try to keep it minimal :)
+DISTRO_EXTRA_RDEPENDS += "\
+ nano pciutils"
+
+
+
+
+
diff --git a/packages/aircrack/aircrack-ng_0.7.bb b/packages/aircrack/aircrack-ng_0.7.bb
index 3093c39955..bf5bd27d9d 100644
--- a/packages/aircrack/aircrack-ng_0.7.bb
+++ b/packages/aircrack/aircrack-ng_0.7.bb
@@ -2,10 +2,7 @@ SECTION = "console/network"
DESCRIPTION = "Aircrack-ng is a set of tools for wep key statistical cracking"
HOMEPAGE = "http://www.aircrack-ng.org/"
LICENSE = "GPLv2"
-MAINTAINER = "Zero_Chaos <sidhayn@gmail.com>"
-DEPENDS = ""
-RDEPENDS = ""
-PR="r2"
+PR = "r2"
SRC_URI = "http://download.aircrack-ng.org/aircrack-ng-${PV}.tar.gz"
diff --git a/packages/linux/linux-turbostation/2.6.20.1/.mtn2git_empty b/packages/binutils/binutils-2.17.50.0.12/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/linux/linux-turbostation/2.6.20.1/.mtn2git_empty
+++ b/packages/binutils/binutils-2.17.50.0.12/.mtn2git_empty
diff --git a/packages/binutils/binutils-2.17.50.0.12/110-arm-eabi-conf.patch b/packages/binutils/binutils-2.17.50.0.12/110-arm-eabi-conf.patch
new file mode 100644
index 0000000000..be85ceb109
--- /dev/null
+++ b/packages/binutils/binutils-2.17.50.0.12/110-arm-eabi-conf.patch
@@ -0,0 +1,24 @@
+diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
+--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300
+@@ -1299,7 +1299,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
+diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
+--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300
+@@ -497,7 +497,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
diff --git a/packages/binutils/binutils-2.17.50.0.12/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch b/packages/binutils/binutils-2.17.50.0.12/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
new file mode 100644
index 0000000000..4461bedd4e
--- /dev/null
+++ b/packages/binutils/binutils-2.17.50.0.12/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
@@ -0,0 +1,31 @@
+# strip (and objcopy) fail to set the error code if there is no
+# output file name and the rename of the stripped (or copied) file
+# fails, yet the command fails to do anything. This fixes both
+# objcopy and strip.
+#
+# modification by bero: Ported to 2.16.91.0.6
+#
+#Signed-off-by: John Bowler <jbowler@acm.org>
+#Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org>
+--- binutils-2.16.91.0.6/binutils/objcopy.c.ark 2006-03-11 15:59:07.000000000 +0100
++++ binutils-2.16.91.0.6/binutils/objcopy.c 2006-03-11 15:59:45.000000000 +0100
+@@ -2593,7 +2593,8 @@
+ if (preserve_dates)
+ set_times (tmpname, &statbuf);
+ if (output_file == NULL)
+- smart_rename (tmpname, argv[i], preserve_dates);
++ if(smart_rename (tmpname, argv[i], preserve_dates))
++ hold_status = 1;
+ status = hold_status;
+ }
+ else
+@@ -3184,7 +3185,8 @@
+ {
+ if (preserve_dates)
+ set_times (tmpname, &statbuf);
+- smart_rename (tmpname, input_filename, preserve_dates);
++ if (smart_rename (tmpname, input_filename, preserve_dates))
++ status = 1;
+ }
+ else
+ unlink (tmpname);
diff --git a/packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-100-uclibc-conf.patch b/packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-100-uclibc-conf.patch
new file mode 100644
index 0000000000..25222e5df2
--- /dev/null
+++ b/packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-100-uclibc-conf.patch
@@ -0,0 +1,139 @@
+--- binutils-2.16.91.0.7/bfd/configure
++++ binutils-2.16.91.0.7/bfd/configure
+@@ -3576,7 +3576,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/binutils/configure
++++ binutils-2.16.91.0.7/binutils/configure
+@@ -3411,7 +3411,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/configure
++++ binutils-2.16.91.0.7/configure
+@@ -1270,7 +1270,7 @@
+ am33_2.0-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+- sh-*-linux*)
++ sh*-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+ sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+@@ -1578,7 +1578,7 @@
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${host}" in
+ i[3456789]86-*-vsta) ;; # don't add gprof back in
+ i[3456789]86-*-go32*) ;; # don't add gprof back in
+--- binutils-2.16.91.0.7/configure.in
++++ binutils-2.16.91.0.7/configure.in
+@@ -468,7 +468,7 @@
+ am33_2.0-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+- sh-*-linux*)
++ sh*-*-linux*)
+ noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+ ;;
+ sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+@@ -776,7 +776,7 @@
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
+ ;;
+- sh-*-* | sh64-*-*)
++ sh*-*-* | sh64-*-*)
+ case "${host}" in
+ i[[3456789]]86-*-vsta) ;; # don't add gprof back in
+ i[[3456789]]86-*-go32*) ;; # don't add gprof back in
+--- binutils-2.16.91.0.7/gas/configure
++++ binutils-2.16.91.0.7/gas/configure
+@@ -3411,7 +3411,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/gprof/configure
++++ binutils-2.16.91.0.7/gprof/configure
+@@ -3419,6 +3419,11 @@
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
+
++linux-uclibc*)
++ lt_cv_deplibs_check_method=pass_all
++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
++ ;;
++
+ netbsd* | knetbsd*-gnu)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+--- binutils-2.16.91.0.7/ld/configure
++++ binutils-2.16.91.0.7/ld/configure
+@@ -3413,7 +3413,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/libtool.m4
++++ binutils-2.16.91.0.7/libtool.m4
+@@ -739,7 +739,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- binutils-2.16.91.0.7/ltconfig
++++ binutils-2.16.91.0.7/ltconfig
+@@ -602,6 +602,7 @@
+
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
++linux-uclibc*) ;;
+ linux-gnu*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+@@ -1247,7 +1248,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+--- binutils-2.16.91.0.7/opcodes/configure
++++ binutils-2.16.91.0.7/opcodes/configure
+@@ -3579,7 +3579,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux-gnu*|linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
diff --git a/packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-300-001_ld_makefile_patch.patch b/packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-300-001_ld_makefile_patch.patch
new file mode 100644
index 0000000000..04a7e61e25
--- /dev/null
+++ b/packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-300-006_better_file_error.patch b/packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-300-006_better_file_error.patch
new file mode 100644
index 0000000000..f337611edf
--- /dev/null
+++ b/packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-300-012_check_ldrunpath_length.patch b/packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-300-012_check_ldrunpath_length.patch
new file mode 100644
index 0000000000..498651a90c
--- /dev/null
+++ b/packages/binutils/binutils-2.17.50.0.12/binutils-uclibc-300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/packages/binutils/binutils-cross_2.17.50.0.12.bb b/packages/binutils/binutils-cross_2.17.50.0.12.bb
new file mode 100644
index 0000000000..1f2f43ecf8
--- /dev/null
+++ b/packages/binutils/binutils-cross_2.17.50.0.12.bb
@@ -0,0 +1,32 @@
+SECTION = "devel"
+require binutils_${PV}.bb
+inherit cross
+DEPENDS += "flex-native bison-native"
+PROVIDES = "virtual/${TARGET_PREFIX}binutils"
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
+PACKAGES = ""
+EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
+ --program-prefix=${TARGET_PREFIX}"
+
+do_stage () {
+ oe_runmake install
+
+ # We don't really need these, so we'll remove them...
+ rm -rf ${CROSS_DIR}/lib/ldscripts
+ rm -rf ${CROSS_DIR}/share/info
+ rm -rf ${CROSS_DIR}/share/locale
+ rm -rf ${CROSS_DIR}/share/man
+ rmdir ${CROSS_DIR}/share || :
+ rmdir ${CROSS_DIR}/${libdir}/gcc-lib || :
+ rmdir ${CROSS_DIR}/${libdir} || :
+ rmdir ${CROSS_DIR}/${prefix} || :
+
+ # We want to move this into the target specific location
+ mkdir -p ${CROSS_DIR}/${TARGET_SYS}/lib
+ mv -f ${CROSS_DIR}/lib/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib
+ rmdir ${CROSS_DIR}/lib || :
+}
+
+do_install () {
+ :
+}
diff --git a/packages/binutils/binutils_2.17.50.0.12.bb b/packages/binutils/binutils_2.17.50.0.12.bb
new file mode 100644
index 0000000000..f832d97cd1
--- /dev/null
+++ b/packages/binutils/binutils_2.17.50.0.12.bb
@@ -0,0 +1,12 @@
+require binutils.inc
+
+
+SRC_URI = \
+ "${KERNELORG_MIRROR}/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \
+ file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch;patch=1 \
+ file://binutils-uclibc-100-uclibc-conf.patch;patch=1 \
+ file://110-arm-eabi-conf.patch;patch=1 \
+ file://binutils-uclibc-300-001_ld_makefile_patch.patch;patch=1 \
+ file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
+ file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
+ "
diff --git a/packages/exmap-console/.mtn2git_empty b/packages/exmap-console/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/exmap-console/.mtn2git_empty
diff --git a/packages/exmap-console/exmap-console.inc b/packages/exmap-console/exmap-console.inc
new file mode 100644
index 0000000000..4c107d5f07
--- /dev/null
+++ b/packages/exmap-console/exmap-console.inc
@@ -0,0 +1,61 @@
+DESCRIPTION = "Console based version of exmap, a memory usage analysis tool"
+HOMEPAGE = "http://projects.o-hand.com/exmap-console"
+SECTION = "devel"
+LICENSE = "GPL"
+DEPENDS = "virtual/kernel"
+
+SRC_URI = "http://projects.o-hand.com/sources/exmap-console/exmap-console-${PV}.tgz"
+
+inherit module-base
+inherit autotools
+
+MYPV := "${PV}"
+
+PACKAGES += "exmap-server kernel-module-exmap"
+
+FILES_exmap-console = "${bindir}/exmap ${bindir}/exmapd"
+PACKAGE_ARCH_exmap-console = "${TARGET_ARCH}"
+RDEPENDS_exmap-console += "kernel-module-exmap"
+
+FILES_exmap-server = "${bindir}/exmapserver"
+PACKAGE_ARCH_exmap-server = "${TARGET_ARCH}"
+RDEPENDS_exmap-server += "kernel-module-exmap"
+
+FILES_kernel-module-exmap = "${base_libdir}"
+PACKAGE_ARCH_kernel-module-exmap = "${MACHINE_ARCH}"
+PV_kernel-module-exmap = "${MYPV}-${KERNEL_VERSION}"
+RDEPENDS_kernel-module-exmap += "kernel (${KERNEL_VERSION})"
+
+S = "${WORKDIR}/exmap-console-${PV}"
+
+export MODULE_PATH="${D}${base_libdir}/modules/${KERNEL_VERSION}"
+
+do_compile() {
+ cd ${S}/src
+ make
+
+ cd ${S}/kernel
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
+ KERNEL_SRC=${STAGING_KERNEL_DIR} \
+ KERNEL_VERSION=${KERNEL_VERSION} \
+ CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
+ ${MAKE_TARGETS}
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' 'DEPMOD=/bin/true' install
+}
+
+pkg_postinst_append_kernel-module-exmap () {
+ if [ -n "$D" ]; then
+ exit 1
+ fi
+ depmod -a
+ update-modules || true
+}
+
+pkg_postrm_append_kernel-module-exmap () {
+ update-modules || true
+}
+
diff --git a/packages/exmap-console/exmap-console_0.4.bb b/packages/exmap-console/exmap-console_0.4.bb
new file mode 100644
index 0000000000..5d89f04937
--- /dev/null
+++ b/packages/exmap-console/exmap-console_0.4.bb
@@ -0,0 +1,2 @@
+require exmap-console.inc
+
diff --git a/packages/exmap-console/exmap-console_svn.bb b/packages/exmap-console/exmap-console_svn.bb
new file mode 100644
index 0000000000..9e6ca80dc0
--- /dev/null
+++ b/packages/exmap-console/exmap-console_svn.bb
@@ -0,0 +1,10 @@
+PR = "r10"
+PV = "0.4+svn${SRCDATE}"
+
+SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=exmap-console;proto=http"
+
+S = "${WORKDIR}/exmap-console"
+
+MYPV := "${PV}"
+PV_kernel-module-exmap = "${MYPV}-${KERNEL_VERSION}"
+
diff --git a/packages/gcc/gcc-4.1.1/gcc-ignore-cache.patch b/packages/gcc/gcc-4.1.1/gcc-ignore-cache.patch
new file mode 100644
index 0000000000..396b4b2345
--- /dev/null
+++ b/packages/gcc/gcc-4.1.1/gcc-ignore-cache.patch
@@ -0,0 +1,15 @@
+--- /gcc/orig-configure 2007-03-11 21:50:28.000000000 +0200
++++ /gcc/configure 2007-03-11 21:53:27.000000000 +0200
+@@ -12272,9 +12272,11 @@
+ esac
+ saved_CFLAGS="${CFLAGS}"
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
++ CONFIG_SITE=""
+ ${realsrcdir}/configure \
+ --enable-languages=${enable_languages-all} \
+- --target=$target_alias --host=$build_alias --build=$build_alias
++ --target=$target_alias --host=$build_alias --build=$build_alias \
++ --cache-file=./tmp-cache
+ CFLAGS="${saved_CFLAGS}"
+
+ # We just finished tests for the build machine, so rename
diff --git a/packages/gcc/gcc-4.1.1/ppc-gcc-41-20060515.patch b/packages/gcc/gcc-4.1.1/ppc-gcc-41-20060515.patch
new file mode 100644
index 0000000000..166e79c7e9
--- /dev/null
+++ b/packages/gcc/gcc-4.1.1/ppc-gcc-41-20060515.patch
@@ -0,0 +1,2225 @@
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/ChangeLog gcc-41-20060515/gcc/ChangeLog
+--- gcc-41-20060515.orig/gcc/ChangeLog 2006-05-15 11:14:20.000000000 -0500
++++ gcc-41-20060515/gcc/ChangeLog 2006-05-15 14:00:27.693964000 -0500
+@@ -724,6 +724,51 @@
+ * reload1.c (choose_reload_regs): Added call of regno_clobbered_p
+ with new meaning of SETS.
+
++2006-02-14 Jakub Jelinek <jakub@redhat.com>
++ Aldy Hernandez <aldyh@redhat.com>
++
++ PR target/25864
++ * configure.ac: Add --with{out}-long-double-128 configure option.
++ (TARGET_DEFAULT_LONG_DOUBLE_128): New test.
++ * configure: Rebuilt.
++ * config.in: Rebuilt.
++ * doc/install.texi (Options specification): Document
++ --with-long-double-128.
++
++ * config.gcc (sparc-*-linux*): Add sparc/t-linux to tmake_file.
++ (sparc64-*-linux*): Likewise.
++ * config/sparc/t-linux64 (SHLIB_MAPFILES): Removed.
++ * config/sparc/t-linux: New file.
++ * config/sparc/libgcc-sparc-glibc.ver (__fixtfdi, __fixunstfdi,
++ __floatditf): Export at GCC_LDBL_3.0 if -m32 -mlong-double-128.
++ (__divtc3, __multc3, __powitf2): Export at GCC_LDBL_4.0.0 if
++ -m32 -mlong-double-128.
++
++ * config.gcc (alpha*-*-linux*): Add alpha/t-linux to tmake_file.
++ * config/alpha/t-linux: New file.
++ * config/alpha/libgcc-alpha-ldbl.ver: New file.
++
++ * config/sparc/linux.h (TARGET_OS_CPP_BUILTINS): Define
++ __LONG_DOUBLE_128__ if TARGET_LONG_DOUBLE_128.
++ (CPP_SUBTARGET_SPEC): Don't add -D__LONG_DOUBLE_128__ here.
++ * config/sparc/linux64.h (TARGET_OS_CPP_BUILTINS): Define
++ __LONG_DOUBLE_128__ if TARGET_LONG_DOUBLE_128 and TARGET_ARCH32.
++ (CPP_ARCH32_SPEC): Remove.
++
++ * config/s390/s390.c (override_options): Handle
++ TARGET_DEFAULT_LONG_DOUBLE_128.
++
++ * config/alpha/alpha.c (override_options): Handle
++ TARGET_DEFAULT_LONG_DOUBLE_128.
++
++ * config/sparc/sparc.c (sparc_override_options): Handle
++ TARGET_DEFAULT_LONG_DOUBLE_128.
++
++ * config/rs6000/linux.h [TARGET_DEFAULT_LONG_DOUBLE_128]
++ (RS6000_DEFAULT_LONG_DOUBLE_SIZE): Define to 128.
++ * config/rs6000/linux64.h [TARGET_DEFAULT_LONG_DOUBLE_128]
++ (RS6000_DEFAULT_LONG_DOUBLE_SIZE): Define to 128.
++
+ 2006-02-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * doc/install.texi: Add missing `@samp'.
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/alpha/alpha.c gcc-41-20060515/gcc/config/alpha/alpha.c
+--- gcc-41-20060515.orig/gcc/config/alpha/alpha.c 2006-05-15 11:13:49.000000000 -0500
++++ gcc-41-20060515/gcc/config/alpha/alpha.c 2006-05-15 13:47:27.566272961 -0500
+@@ -516,6 +516,11 @@ override_options (void)
+ REAL_MODE_FORMAT (DFmode) = &vax_g_format;
+ REAL_MODE_FORMAT (TFmode) = NULL;
+ }
++
++#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
++ if (!(target_flags_explicit & MASK_LONG_DOUBLE_128))
++ target_flags |= MASK_LONG_DOUBLE_128;
++#endif
+ }
+
+ /* Returns 1 if VALUE is a mask that contains full bytes of zero or ones. */
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/alpha/libgcc-alpha-ldbl.ver gcc-41-20060515/gcc/config/alpha/libgcc-alpha-ldbl.ver
+--- gcc-41-20060515.orig/gcc/config/alpha/libgcc-alpha-ldbl.ver 1969-12-31 18:00:00.000000000 -0600
++++ gcc-41-20060515/gcc/config/alpha/libgcc-alpha-ldbl.ver 2006-05-15 13:47:27.566272961 -0500
+@@ -0,0 +1,32 @@
++%ifdef __LONG_DOUBLE_128__
++
++# long double 128 bit support in libgcc_s.so.1 is only available
++# when configured with --with-long-double-128. Make sure all the
++# symbols are available at @@GCC_LDBL_* versions to make it clear
++# there is a configurable symbol set.
++
++%exclude {
++ __fixtfdi
++ __fixunstfdi
++ __floatditf
++
++ __divtc3
++ __multc3
++ __powitf2
++}
++
++%inherit GCC_LDBL_3.0 GCC_3.0
++GCC_LDBL_3.0 {
++ __fixtfdi
++ __fixunstfdi
++ __floatditf
++}
++
++%inherit GCC_LDBL_4.0.0 GCC_4.0.0
++GCC_LDBL_4.0.0 {
++ __divtc3
++ __multc3
++ __powitf2
++}
++
++%endif
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/alpha/t-linux gcc-41-20060515/gcc/config/alpha/t-linux
+--- gcc-41-20060515.orig/gcc/config/alpha/t-linux 1969-12-31 18:00:00.000000000 -0600
++++ gcc-41-20060515/gcc/config/alpha/t-linux 2006-05-15 13:47:27.567272807 -0500
+@@ -0,0 +1 @@
++SHLIB_MAPFILES += $(srcdir)/config/alpha/libgcc-alpha-ldbl.ver
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/rs6000/linux64.h gcc-41-20060515/gcc/config/rs6000/linux64.h
+--- gcc-41-20060515.orig/gcc/config/rs6000/linux64.h 2006-05-15 11:14:02.000000000 -0500
++++ gcc-41-20060515/gcc/config/rs6000/linux64.h 2006-05-15 13:47:27.568272653 -0500
+@@ -570,3 +570,8 @@ while (0)
+ #endif
+
+ #define POWERPC_LINUX
++
++/* ppc{32,64} linux has 128-bit long double support in glibc 2.4 and later. */
++#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
++#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
++#endif
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/rs6000/linux.h gcc-41-20060515/gcc/config/rs6000/linux.h
+--- gcc-41-20060515.orig/gcc/config/rs6000/linux.h 2006-05-15 11:14:02.000000000 -0500
++++ gcc-41-20060515/gcc/config/rs6000/linux.h 2006-05-15 13:47:27.567272807 -0500
+@@ -120,3 +120,8 @@
+ #endif
+
+ #define POWERPC_LINUX
++
++/* ppc linux has 128-bit long double support in glibc 2.4 and later. */
++#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
++#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
++#endif
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/s390/s390.c gcc-41-20060515/gcc/config/s390/s390.c
+--- gcc-41-20060515.orig/gcc/config/s390/s390.c 2006-05-15 11:13:50.000000000 -0500
++++ gcc-41-20060515/gcc/config/s390/s390.c 2006-05-15 13:47:27.574271730 -0500
+@@ -1415,6 +1415,11 @@ override_options (void)
+ }
+ else if (s390_stack_guard)
+ error ("-mstack-guard implies use of -mstack-size");
++
++#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
++ if (!(target_flags_explicit & MASK_LONG_DOUBLE_128))
++ target_flags |= MASK_LONG_DOUBLE_128;
++#endif
+ }
+
+ /* Map for smallest class containing reg regno. */
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/sparc/libgcc-sparc-glibc.ver gcc-41-20060515/gcc/config/sparc/libgcc-sparc-glibc.ver
+--- gcc-41-20060515.orig/gcc/config/sparc/libgcc-sparc-glibc.ver 2006-05-15 11:13:55.000000000 -0500
++++ gcc-41-20060515/gcc/config/sparc/libgcc-sparc-glibc.ver 2006-05-15 13:47:27.574271730 -0500
+@@ -26,3 +26,36 @@ GLIBC_VER {
+ __frame_state_for
+ __register_frame_info_table
+ }
++
++%if !defined (__arch64__) && defined (__LONG_DOUBLE_128__)
++
++# long double 128 bit support from 32-bit libgcc_s.so.1 is only available
++# when configured with --with-long-double-128. Make sure all the
++# symbols are available at @@GCC_LDBL_* versions to make it clear
++# there is a configurable symbol set.
++
++%exclude {
++ __fixtfdi
++ __fixunstfdi
++ __floatditf
++
++ __divtc3
++ __multc3
++ __powitf2
++}
++
++%inherit GCC_LDBL_3.0 GCC_3.0
++GCC_LDBL_3.0 {
++ __fixtfdi
++ __fixunstfdi
++ __floatditf
++}
++
++%inherit GCC_LDBL_4.0.0 GCC_4.0.0
++GCC_LDBL_4.0.0 {
++ __divtc3
++ __multc3
++ __powitf2
++}
++
++%endif
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/sparc/linux64.h gcc-41-20060515/gcc/config/sparc/linux64.h
+--- gcc-41-20060515.orig/gcc/config/sparc/linux64.h 2006-05-15 11:13:55.000000000 -0500
++++ gcc-41-20060515/gcc/config/sparc/linux64.h 2006-05-15 13:47:27.576271422 -0500
+@@ -20,22 +20,24 @@ along with GCC; see the file COPYING. I
+ the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+-#define TARGET_OS_CPP_BUILTINS() \
+- do \
+- { \
+- builtin_define_std ("unix"); \
+- builtin_define_std ("linux"); \
+- builtin_define ("_LONGLONG"); \
+- builtin_define ("__gnu_linux__"); \
+- builtin_assert ("system=linux"); \
+- builtin_assert ("system=unix"); \
+- builtin_assert ("system=posix"); \
+- if (flag_pic) \
+- { \
+- builtin_define ("__PIC__"); \
+- builtin_define ("__pic__"); \
+- } \
+- } \
++#define TARGET_OS_CPP_BUILTINS() \
++ do \
++ { \
++ builtin_define_std ("unix"); \
++ builtin_define_std ("linux"); \
++ builtin_define ("_LONGLONG"); \
++ builtin_define ("__gnu_linux__"); \
++ builtin_assert ("system=linux"); \
++ builtin_assert ("system=unix"); \
++ builtin_assert ("system=posix"); \
++ if (flag_pic) \
++ { \
++ builtin_define ("__PIC__"); \
++ builtin_define ("__pic__"); \
++ } \
++ if (TARGET_ARCH32 && TARGET_LONG_DOUBLE_128) \
++ builtin_define ("__LONG_DOUBLE_128__"); \
++ } \
+ while (0)
+
+ /* Don't assume anything about the header files. */
+@@ -59,13 +61,6 @@ Boston, MA 02110-1301, USA. */
+ #undef ASM_CPU_DEFAULT_SPEC
+ #define ASM_CPU_DEFAULT_SPEC "-Av9a"
+
+-#ifdef SPARC_BI_ARCH
+-
+-#undef CPP_ARCH32_SPEC
+-#define CPP_ARCH32_SPEC "%{mlong-double-128:-D__LONG_DOUBLE_128__}"
+-
+-#endif
+-
+ /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
+ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
+ provides part of the support for getting C++ file-scope static
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/sparc/linux.h gcc-41-20060515/gcc/config/sparc/linux.h
+--- gcc-41-20060515.orig/gcc/config/sparc/linux.h 2006-05-15 11:13:55.000000000 -0500
++++ gcc-41-20060515/gcc/config/sparc/linux.h 2006-05-15 13:47:27.575271576 -0500
+@@ -23,17 +23,19 @@ Boston, MA 02110-1301, USA. */
+ #define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+- builtin_define_std ("unix"); \
+- builtin_define_std ("linux"); \
+- builtin_define ("__gnu_linux__"); \
+- builtin_assert ("system=linux"); \
+- builtin_assert ("system=unix"); \
+- builtin_assert ("system=posix"); \
+- if (flag_pic) \
+- { \
+- builtin_define ("__PIC__"); \
+- builtin_define ("__pic__"); \
+- } \
++ builtin_define_std ("unix"); \
++ builtin_define_std ("linux"); \
++ builtin_define ("__gnu_linux__"); \
++ builtin_assert ("system=linux"); \
++ builtin_assert ("system=unix"); \
++ builtin_assert ("system=posix"); \
++ if (flag_pic) \
++ { \
++ builtin_define ("__PIC__"); \
++ builtin_define ("__pic__"); \
++ } \
++ if (TARGET_LONG_DOUBLE_128) \
++ builtin_define ("__LONG_DOUBLE_128__"); \
+ } \
+ while (0)
+
+@@ -100,8 +102,7 @@ Boston, MA 02110-1301, USA. */
+
+ #undef CPP_SUBTARGET_SPEC
+ #define CPP_SUBTARGET_SPEC \
+-"%{posix:-D_POSIX_SOURCE} \
+-%{pthread:-D_REENTRANT} %{mlong-double-128:-D__LONG_DOUBLE_128__}"
++"%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+
+ #undef LIB_SPEC
+ #define LIB_SPEC \
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/sparc/sparc.c gcc-41-20060515/gcc/config/sparc/sparc.c
+--- gcc-41-20060515.orig/gcc/config/sparc/sparc.c 2006-05-15 11:13:55.000000000 -0500
++++ gcc-41-20060515/gcc/config/sparc/sparc.c 2006-05-15 13:47:27.581270653 -0500
+@@ -790,6 +790,11 @@ sparc_override_options (void)
+ sparc_costs = &ultrasparc3_costs;
+ break;
+ };
++
++#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
++ if (!(target_flags_explicit & MASK_LONG_DOUBLE_128))
++ target_flags |= MASK_LONG_DOUBLE_128;
++#endif
+ }
+
+ #ifdef SUBTARGET_ATTRIBUTE_TABLE
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/sparc/t-linux gcc-41-20060515/gcc/config/sparc/t-linux
+--- gcc-41-20060515.orig/gcc/config/sparc/t-linux 1969-12-31 18:00:00.000000000 -0600
++++ gcc-41-20060515/gcc/config/sparc/t-linux 2006-05-15 13:47:27.582270499 -0500
+@@ -0,0 +1,5 @@
++# Override t-slibgcc-elf-ver to export some libgcc symbols with
++# the symbol versions that glibc used.
++# Avoid the t-linux version file.
++SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver \
++ $(srcdir)/config/sparc/libgcc-sparc-glibc.ver
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/sparc/t-linux64 gcc-41-20060515/gcc/config/sparc/t-linux64
+--- gcc-41-20060515.orig/gcc/config/sparc/t-linux64 2006-05-15 11:13:55.000000000 -0500
++++ gcc-41-20060515/gcc/config/sparc/t-linux64 2006-05-15 13:47:27.582270499 -0500
+@@ -8,12 +8,6 @@ INSTALL_LIBGCC = install-multilib
+ EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o \
+ crtfastmath.o
+
+-# Override t-slibgcc-elf-ver to export some libgcc symbols with
+-# the symbol versions that glibc used.
+-# Avoid the t-linux version file.
+-SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver \
+- $(srcdir)/config/sparc/libgcc-sparc-glibc.ver
+-
+ CRTSTUFF_T_CFLAGS = `if test x$$($(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) \
+ -print-multi-os-directory) \
+ = x../lib64; then echo -mcmodel=medany; fi`
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config.gcc gcc-41-20060515/gcc/config.gcc
+--- gcc-41-20060515.orig/gcc/config.gcc 2006-05-15 11:14:20.000000000 -0500
++++ gcc-41-20060515/gcc/config.gcc 2006-05-15 13:47:27.555274654 -0500
+@@ -568,7 +568,7 @@ alpha*-*-unicosmk*)
+ alpha*-*-linux*)
+ tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
+ target_cpu_default="MASK_GAS"
+- tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
++ tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee alpha/t-linux"
+ ;;
+ alpha*-*-gnu*)
+ target_cpu_default="MASK_GAS"
+@@ -2056,7 +2056,7 @@ sparc-*-elf*)
+ sparc-*-linux*) # SPARC's running GNU/Linux, libc6
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h"
+ extra_options="${extra_options} sparc/long-double-switch.opt"
+- tmake_file="${tmake_file} sparc/t-crtfm"
++ tmake_file="${tmake_file} sparc/t-linux sparc/t-crtfm"
+ ;;
+ sparc-*-rtems*)
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h"
+@@ -2175,7 +2175,7 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*
+ sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux
+ tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux64.h"
+ extra_options="${extra_options} sparc/long-double-switch.opt"
+- tmake_file="${tmake_file} sparc/t-linux64 sparc/t-crtfm"
++ tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm"
+ ;;
+ sparc64-*-netbsd*)
+ tm_file="sparc/biarch64.h ${tm_file}"
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config.in gcc-41-20060515/gcc/config.in
+--- gcc-41-20060515.orig/gcc/config.in 2006-05-15 11:14:20.000000000 -0500
++++ gcc-41-20060515/gcc/config.in 2006-05-15 13:47:27.559274038 -0500
+@@ -1277,6 +1277,12 @@
+ #endif
+
+
++/* Define if TFmode long double should be the default */
++#ifndef USED_FOR_TARGET
++#undef TARGET_DEFAULT_LONG_DOUBLE_128
++#endif
++
++
+ /* Define if your target C library provides stack protector support */
+ #ifndef USED_FOR_TARGET
+ #undef TARGET_LIBC_PROVIDES_SSP
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/configure gcc-41-20060515/gcc/configure
+--- gcc-41-20060515.orig/gcc/configure 2006-05-15 11:14:19.000000000 -0500
++++ gcc-41-20060515/gcc/configure 2006-05-15 13:47:27.594268652 -0500
+@@ -931,6 +931,7 @@ Optional Packages:
+ --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
+ --without-libiconv-prefix don't search for libiconv in includedir and libdir
+ --with-system-libunwind use installed libunwind
++ --with-long-double-128 Use 128-bit long double by default.
+ --with-gc={page,zone} choose the garbage collection mechanism to use
+ with the compiler
+ --with-system-zlib use installed libz
+@@ -7492,7 +7493,7 @@ if test "${gcc_cv_prog_makeinfo_modern+s
+ else
+ ac_prog_version=`$MAKEINFO --version 2>&1 |
+ sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
+- echo "configure:7495: version of makeinfo is $ac_prog_version" >&5
++ echo "configure:7496: version of makeinfo is $ac_prog_version" >&5
+ case $ac_prog_version in
+ '') gcc_cv_prog_makeinfo_modern=no;;
+ 4.[2-9]*)
+@@ -16213,6 +16214,46 @@ _ACEOF
+
+ fi
+
++# Check if TFmode long double should be used by default or not.
++# Some glibc targets used DFmode long double, but with glibc 2.4
++# and later they can use TFmode.
++case "$target" in
++ powerpc*-*-*gnu* | \
++ sparc*-*-linux* | \
++ s390*-*-linux* | \
++ alpha*-*-linux*)
++
++# Check whether --with-long-double-128 or --without-long-double-128 was given.
++if test "${with_long_double_128+set}" = set; then
++ withval="$with_long_double_128"
++ gcc_cv_target_ldbl128="$with_long_double_128"
++else
++ gcc_cv_target_ldbl128=no
++ if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
++ if test "x$with_sysroot" = x; then
++ glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
++ elif test "x$with_sysroot" = xyes; then
++ glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
++ else
++ glibc_header_dir="${with_sysroot}/usr/include"
++ fi
++ else
++ glibc_header_dir=/usr/include
++ fi
++ grep '^ *#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
++ $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
++ && gcc_cv_target_ldbl128=yes
++fi;
++ ;;
++esac
++if test x$gcc_cv_target_ldbl128 = xyes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define TARGET_DEFAULT_LONG_DOUBLE_128 1
++_ACEOF
++
++fi
++
+ # Find out what GC implementation we want, or may, use.
+
+ # Check whether --with-gc or --without-gc was given.
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/configure.ac gcc-41-20060515/gcc/configure.ac
+--- gcc-41-20060515.orig/gcc/configure.ac 2006-05-15 11:14:20.000000000 -0500
++++ gcc-41-20060515/gcc/configure.ac 2006-05-15 13:47:27.597400000 -0500
+@@ -3130,6 +3130,39 @@ if test x$gcc_cv_libc_provides_ssp = xye
+ [Define if your target C library provides stack protector support])
+ fi
+
++# Check if TFmode long double should be used by default or not.
++# Some glibc targets used DFmode long double, but with glibc 2.4
++# and later they can use TFmode.
++case "$target" in
++ powerpc*-*-*gnu* | \
++ sparc*-*-linux* | \
++ s390*-*-linux* | \
++ alpha*-*-linux*)
++ AC_ARG_WITH(long-double-128,
++[ --with-long-double-128 Use 128-bit long double by default.],
++ gcc_cv_target_ldbl128="$with_long_double_128",
++ [gcc_cv_target_ldbl128=no
++ if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
++ if test "x$with_sysroot" = x; then
++ glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
++ elif test "x$with_sysroot" = xyes; then
++ glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
++ else
++ glibc_header_dir="${with_sysroot}/usr/include"
++ fi
++ else
++ glibc_header_dir=/usr/include
++ fi
++ grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \
++ $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
++ && gcc_cv_target_ldbl128=yes])
++ ;;
++esac
++if test x$gcc_cv_target_ldbl128 = xyes; then
++ AC_DEFINE(TARGET_DEFAULT_LONG_DOUBLE_128, 1,
++ [Define if TFmode long double should be the default])
++fi
++
+ # Find out what GC implementation we want, or may, use.
+ AC_ARG_WITH(gc,
+ [ --with-gc={page,zone} choose the garbage collection mechanism to use
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/doc/install.texi gcc-41-20060515/gcc/doc/install.texi
+--- gcc-41-20060515.orig/gcc/doc/install.texi 2006-05-15 11:10:10.000000000 -0500
++++ gcc-41-20060515/gcc/doc/install.texi 2006-05-15 13:47:27.600399538 -0500
+@@ -1224,6 +1224,14 @@ error message.
+ All support for systems which have been obsoleted in one release of GCC
+ is removed entirely in the next major release, unless someone steps
+ forward to maintain the port.
++
++@item --with-long-double-128
++Specify if @code{long double} type should be 128-bit by default on selected
++GNU/Linux architectures. If using @code{--without-long-double-128},
++@code{long double} will be by default 64-bit, the same as @code{double} type.
++When neither of these configure options are used, the default will be
++128-bit @code{long double} when built against GNU C Library 2.4 and later,
++64-bit @code{long double} otherwise.
+ @end table
+
+ @subheading Cross-Compiler-Specific Options
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/ChangeLog gcc-41-20060515/libstdc++-v3/ChangeLog
+--- gcc-41-20060515.orig/libstdc++-v3/ChangeLog 2006-05-15 11:15:42.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/ChangeLog 2006-05-15 14:02:07.401662657 -0500
+@@ -153,6 +153,64 @@
+ Likewise.
+ * docs/html/ext/pb_assoc/tree_assoc_cntnr_node_iterator.html: Likewise.
+
++2006-02-07 Jakub Jelinek <jakub@redhat.com>
++ Benjamin Kosnik <bkoz@redhat.com>
++
++ PR target/25864
++ * configure.ac (_GLIBCXX_LONG_DOUBLE_COMPAT): New check.
++ If true, set also port_specific_symbol_files and create
++ as_symver_specs.
++ (GLIBCXX_LDBL_COMPAT): New GLIBCXX_CONDITIONAL.
++ * configure: Rebuilt.
++ * config.h.in: Rebuilt.
++ * config/os/gnu-linux/ldbl-extra.ver: New file.
++ * config/linker-map.gnu: Make sure no __float128 symbols are
++ exported.
++ * include/bits/c++config (_GLIBCXX_LONG_DOUBLE_COMPAT,
++ _GLIBCXX_LDBL_NAMESPACE, _GLIBCXX_BEGIN_LDBL_NAMESPACE,
++ _GLIBCXX_END_LDBL_NAMESPACE): Define.
++ * include/bits/localefwd.h: Use them to conditionally scope facets.
++ * include/bits/locale_facets.h: Surround std::{money,num}_{get,put}
++ with _GLIBCXX_BEGIN_LDBL_NAMESPACE and _GLIBCXX_END_LDBL_NAMESPACE.
++ [_GLIBCXX_LONG_DOUBLE_COMPAT] (std::money_get): Add __do_get method.
++ [_GLIBCXX_LONG_DOUBLE_COMPAT] (std::money_put): Add __do_put method.
++ [_GLIBCXX_LONG_DOUBLE_COMPAT] (std::num_get): Add __do_get method.
++ [_GLIBCXX_LONG_DOUBLE_COMPAT] (std::num_put): Add __do_put method.
++ * include/bits/locale_facets.tcc: Surround std::{money,num}_{get,put}
++ with _GLIBCXX_BEGIN_LDBL_NAMESPACE and _GLIBCXX_END_LDBL_NAMESPACE.
++ (std::money_get::__do_get, std::money_put::__do_put,
++ std::num_get::__do_get, std::num_put::__do_put): New
++ specializations.
++ * include/Makefile.am: Conditionally define
++ _GLIBCXX_LONG_DOUBLE_COMPAT in c++config.
++ * include/Makefile.in: Regenerate.
++ * src/locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT] (_GLIBCXX_LOC_ID,
++ _GLIBCXX_SYNC_ID): Define, use them.
++ * src/compatibility-ldbl.cc: New file.
++ * src/complex_io.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Add compatibility
++ symbols.
++ * src/limits.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
++ * src/locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
++ * src/locale-inst.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
++ * src/locale-misc-inst.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
++ * src/istream-inst.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
++ * src/ostream-inst.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
++ * src/locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
++ * src/wlocale-inst.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
++ * src/compatibility.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
++ * config/locale/generic/c_locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]:
++ Likewise.
++ * config/locale/gnu/c_locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]:
++ Likewise.
++ * src/Makefile.am (libstdc++-symbol.ver): Append instead of
++ insert in the middle if port specific symbol file requests it.
++ (ldbl_compat_sources): New variable.
++ (sources): Use it.
++ (compatibility-ldbl.lo, compatibility-ldbl.o): New rules.
++ * src/Makefile.in: Rebuilt.
++ * testsuite/testsuite_abi.cc: Recognize GLIBCXX_LDBL_3.4,
++ GLIBCXX_LDBL_3.4.7, CXXABI_LDBL_1.3.
++
+ 2006-02-07 Paolo Carlini <pcarlini@suse.de>
+
+ * include/tr1/hashtable: Trivial formatting fixes.
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/config/linker-map.gnu gcc-41-20060515/libstdc++-v3/config/linker-map.gnu
+--- gcc-41-20060515.orig/libstdc++-v3/config/linker-map.gnu 2006-05-15 11:15:41.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/config/linker-map.gnu 2006-05-15 13:47:27.603399076 -0500
+@@ -1,6 +1,6 @@
+ ## Linker script for GNU ld 2.13.91+ only.
+ ##
+-## Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++## Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ ##
+ ## This file is part of the libstdc++ version 3 distribution.
+ ##
+@@ -44,7 +44,10 @@ GLIBCXX_3.4 {
+ std::basic_[j-n]*;
+ std::basic_o[a-e]*;
+ # std::basic_ofstream;
+- std::basic_o[g-z]*;
++# std::basic_o[g-z]*;
++ std::basic_o[g-r]*;
++ std::basic_ostr[a-d]*;
++ std::basic_ostr[f-z]*;
+ std::basic_[p-r]*;
+ std::basic_streambuf*;
+ # std::basic_string
+@@ -88,7 +91,14 @@ GLIBCXX_3.4 {
+ std::locale::_[J-Ra-z]*;
+ std::locale::_S_normalize_category*;
+ std::locale::_[T-Za-z]*;
+- std::[A-Zm-r]*;
++# std::[A-Zm-r]*;
++ std::[A-Zmp-r]*;
++ std::n[^u]*;
++ std::nu[^m]*;
++ std::num[^e]*;
++ std::ostrstream*;
++ std::out_of_range*;
++ std::overflow_error*;
+ std::set_new_handler*;
+ std::set_terminate*;
+ std::set_unexpected*;
+@@ -256,7 +266,7 @@ GLIBCXX_3.4 {
+ _ZNSi[0-9][a-h]*;
+ _ZNSi[0-9][j-z]*;
+ _ZNSi6ignoreE[il][il];
+- _ZNSirsE*;
++ _ZNSirsE*[^g];
+
+ # std::basic_istream<wchar_t>
+ _ZNSt13basic_istreamIwSt11char_traitsIwEEC*;
+@@ -265,7 +275,7 @@ GLIBCXX_3.4 {
+ _ZNSt13basic_istreamIwSt11char_traitsIwEE[0-9][a-h]*;
+ _ZNSt13basic_istreamIwSt11char_traitsIwEE[0-9][j-z]*;
+ _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreE[il][ijlm];
+- _ZNSt13basic_istreamIwSt11char_traitsIwEErsE*;
++ _ZNSt13basic_istreamIwSt11char_traitsIwEErsE*[^g];
+
+ # std::istream operators and inserters
+ _ZSt7getlineI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_istream*;
+@@ -277,6 +287,37 @@ GLIBCXX_3.4 {
+ _ZStrsIe[cw]St11char_traitsI[cw]EERSt13basic_istream*;
+ _ZStrsIf[cw]St11char_traitsI[cw]EERSt13basic_istream*;
+
++ # std::basic_ostream<char>
++ _ZNSoC*;
++ _ZNSoD*;
++ _ZNKSo6sentrycvbEv;
++ _ZNSo8_M_write*;
++ _ZNSo[0-9][a-z]*;
++ _ZNSolsE*[^g];
++
++ # std::basic_ostream<wchar_t>
++ _ZNSt13basic_ostreamIwSt11char_traitsIwEEC*;
++ _ZNSt13basic_ostreamIwSt11char_traitsIwEED*;
++ _ZNKSt13basic_ostreamIwSt11char_traitsIwEE[0-9][a-z]*;
++ _ZNSt13basic_ostreamIwSt11char_traitsIwEE3putEw;
++ _ZNSt13basic_ostreamIwSt11char_traitsIwEE5flushEv;
++ _ZNSt13basic_ostreamIwSt11char_traitsIwEE5seekpE*;
++ _ZNSt13basic_ostreamIwSt11char_traitsIwEE5tellpEv;
++ _ZNSt13basic_ostreamIwSt11char_traitsIwEE5writeEPKw*;
++ _ZNSt13basic_ostreamIwSt11char_traitsIwEE6sentry*;
++ _ZNSt13basic_ostreamIwSt11char_traitsIwEE8_M_write*;
++ _ZNSt13basic_ostreamIwSt11char_traitsIwEElsE*[^g];
++
++ # std::ostream operators and inserters
++ _ZSt4end[ls]I[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
++ _ZSt5flushI[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
++ _ZStlsI[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
++ _ZStlsI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_ostream*;
++ _ZStlsISt11char_traitsI[cw]EERSt13basic_ostream*;
++ _ZStlsId[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
++ _ZStlsIe[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
++ _ZStlsIf[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
++
+ # std::locale destructors
+ _ZNSt6localeD*;
+
+@@ -292,14 +333,23 @@ GLIBCXX_3.4 {
+ _ZNSt8ios_base4InitD*;
+
+ # bool std::has_facet
+- _ZSt9has_facet*;
++ _ZSt9has_facetIS*;
+
+ # std::num_get
+ _ZNKSt7num_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
+
++ # std::num_put
++ _ZNKSt7num_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
++
+ # std::money_get
+ _ZNKSt9money_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
+
++ # std::money_put
++ _ZNKSt9money_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
++
++ # std::numeric_limits
++ _ZNSt14numeric_limitsI[^g]*;
++
+ # std::_Rb_tree
+ _ZSt18_Rb_tree_decrementPKSt18_Rb_tree_node_base;
+ _ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base;
+@@ -327,7 +377,7 @@ GLIBCXX_3.4 {
+ _ZNSt12__basic_fileIcED*;
+
+ # std::__convert_to_v
+- _ZSt14__convert_to_v*;
++ _ZSt14__convert_to_vI[^g]*;
+
+ # __gnu_cxx::stdio_sync_filebuf
+ _ZTVN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EEE;
+@@ -399,7 +449,8 @@ GLIBCXX_3.4 {
+ _ZTSN9__gnu_cxx13stdio_filebufI[cw]St11char_traitsI[cw]EEE;
+
+ # function-scope static objects requires a guard variable.
+- _ZGVNSt*;
++ _ZGVNSt[^1]*;
++ _ZGVNSt1[^7]*;
+
+ # virtual function thunks
+ _ZThn8_NS*;
+@@ -665,9 +716,9 @@ CXXABI_1.3 {
+ _ZTVN10__cxxabiv121__vmi_class_type_infoE;
+
+ # typeinfo structure (and some names)
+- _ZTI[a-z];
+- _ZTIP[a-z];
+- _ZTIPK[a-z];
++ _ZTI[a-fh-z];
++ _ZTIP[a-fh-z];
++ _ZTIPK[a-fh-z];
+ _ZTIN10__cxxabiv117__array_type_infoE;
+ _ZTIN10__cxxabiv117__class_type_infoE;
+ _ZTIN10__cxxabiv116__enum_type_infoE;
+@@ -680,9 +731,9 @@ CXXABI_1.3 {
+ _ZTIN10__cxxabiv121__vmi_class_type_infoE;
+
+ # typeinfo name
+- _ZTS[a-z];
+- _ZTSP[a-z];
+- _ZTSPK[a-z];
++ _ZTS[a-fh-z];
++ _ZTSP[a-fh-z];
++ _ZTSPK[a-fh-z];
+ _ZTSN10__cxxabiv117__array_type_infoE;
+ _ZTSN10__cxxabiv117__class_type_infoE;
+ _ZTSN10__cxxabiv116__enum_type_infoE;
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/config/locale/generic/c_locale.cc gcc-41-20060515/libstdc++-v3/config/locale/generic/c_locale.cc
+--- gcc-41-20060515.orig/libstdc++-v3/config/locale/generic/c_locale.cc 2006-05-15 11:15:39.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/config/locale/generic/c_locale.cc 2006-05-15 13:47:27.605398768 -0500
+@@ -1,6 +1,6 @@
+ // Wrapper for underlying C-language localization -*- C++ -*-
+
+-// Copyright (C) 2001, 2002, 2003, 2004, 2005
++// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+ // Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+@@ -168,3 +168,10 @@ namespace std
+ {
+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
+ } // namespace std
++
++// XXX GLIBCXX_ABI Deprecated
++#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
++#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
++ extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
++_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
++#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/config/locale/gnu/c_locale.cc gcc-41-20060515/libstdc++-v3/config/locale/gnu/c_locale.cc
+--- gcc-41-20060515.orig/libstdc++-v3/config/locale/gnu/c_locale.cc 2006-05-15 11:15:39.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/config/locale/gnu/c_locale.cc 2006-05-15 13:47:27.606398615 -0500
+@@ -1,6 +1,6 @@
+ // Wrapper for underlying C-language localization -*- C++ -*-
+
+-// Copyright (C) 2001, 2002, 2003, 2004, 2005
++// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
+ // Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+@@ -132,3 +132,10 @@ namespace std
+ {
+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
+ } // namespace std
++
++// XXX GLIBCXX_ABI Deprecated
++#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
++#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
++ extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
++_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKP15__locale_struct, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKP15__locale_struct);
++#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/config/os/gnu-linux/ldbl-extra.ver gcc-41-20060515/libstdc++-v3/config/os/gnu-linux/ldbl-extra.ver
+--- gcc-41-20060515.orig/libstdc++-v3/config/os/gnu-linux/ldbl-extra.ver 1969-12-31 18:00:00.000000000 -0600
++++ gcc-41-20060515/libstdc++-v3/config/os/gnu-linux/ldbl-extra.ver 2006-05-15 13:47:27.606398615 -0500
+@@ -0,0 +1,19 @@
++# Appended to version file.
++
++GLIBCXX_LDBL_3.4 {
++ _ZNSt14numeric_limitsIg*;
++ _ZNSirsERg;
++ _ZNSolsEg;
++ _ZNSt13basic_istreamIwSt11char_traitsIwEErsERg;
++ _ZNSt13basic_ostreamIwSt11char_traitsIwEElsEg;
++ _ZSt14__convert_to_vIgEvPKcRT_RSt12_Ios_IostateRKP*;
++ _ZStlsIg[cw]St11char_traitsI[cw]EERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E;
++ _ZStrsIg[cw]St11char_traitsI[cw]EERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E;
++ *__gnu_cxx_ldbl128*;
++};
++
++CXXABI_LDBL_1.3 {
++ _ZT[IS]g;
++ _ZT[IS]Pg;
++ _ZT[IS]PKg;
++};
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/config.h.in gcc-41-20060515/libstdc++-v3/config.h.in
+--- gcc-41-20060515.orig/libstdc++-v3/config.h.in 2006-05-15 11:15:42.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/config.h.in 2006-05-15 13:47:27.601399384 -0500
+@@ -658,6 +658,9 @@
+ /* Define to 1 if a full hosted library is built, or 0 if freestanding. */
+ #undef _GLIBCXX_HOSTED
+
++/* Define if compatibility should be provided for -mlong-double-64. */
++#undef _GLIBCXX_LONG_DOUBLE_COMPAT
++
+ /* Define if ptrdiff_t is int. */
+ #undef _GLIBCXX_PTRDIFF_T_IS_INT
+
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/configure gcc-41-20060515/libstdc++-v3/configure
+--- gcc-41-20060515.orig/libstdc++-v3/configure 2006-05-15 11:15:42.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/configure 2006-05-15 13:47:27.664389689 -0500
+@@ -309,7 +309,7 @@ ac_includes_default="\
+ # include <unistd.h>
+ #endif"
+
+-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOL CXXCPP CPPFLAGS enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC CPP EGREP check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS glibcxx_thread_h WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_MAP port_specific_symbol_files ENABLE_SYMVERS_GNU_TRUE ENABLE_SYMVERS_GNU_FALSE ENABLE_SYMVERS_DARWIN_EXPORT_TRUE ENABLE_SYMVERS_DARWIN_EXPORT_FALSE baseline_dir ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR CPU_DEFINES_SRCDIR ABI_TWEAKS_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS'
++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOL CXXCPP CPPFLAGS enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC CPP EGREP check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS glibcxx_thread_h WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_MAP port_specific_symbol_files ENABLE_SYMVERS_GNU_TRUE ENABLE_SYMVERS_GNU_FALSE ENABLE_SYMVERS_DARWIN_EXPORT_TRUE ENABLE_SYMVERS_DARWIN_EXPORT_FALSE GLIBCXX_LDBL_COMPAT_TRUE GLIBCXX_LDBL_COMPAT_FALSE baseline_dir ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR CPU_DEFINES_SRCDIR ABI_TWEAKS_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS'
+ ac_subst_files=''
+
+ # Initialize some variables set by options.
+@@ -87959,6 +87959,72 @@ echo "${ECHO_T}$glibcxx_ptrdiff_t_is_i"
+ echo "$as_me: versioning on shared library symbols is $enable_symvers" >&6;}
+
+
++ac_ldbl_compat=no
++case "$target" in
++ powerpc*-*-*gnu* | \
++ sparc*-*-linux* | \
++ s390*-*-linux* | \
++ alpha*-*-linux*)
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++#if !defined __LONG_DOUBLE_128__ || (defined(__sparc__) && defined(__arch64__))
++#error no need for long double compatibility
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
++ { (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); }; } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (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
++ ac_ldbl_compat=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_ldbl_compat=no
++fi
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++ if test "$ac_ldbl_compat" = yes; then
++
++cat >>confdefs.h <<\_ACEOF
++#define _GLIBCXX_LONG_DOUBLE_COMPAT 1
++_ACEOF
++
++ port_specific_symbol_files="\$(top_srcdir)/config/os/gnu-linux/ldbl-extra.ver"
++ fi
++esac
++
++
+ # This depends on GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE.
+
+ if $GLIBCXX_IS_NATIVE ; then
+@@ -88811,6 +88877,17 @@ fi
+
+
+
++if test $ac_ldbl_compat = yes; then
++ GLIBCXX_LDBL_COMPAT_TRUE=
++ GLIBCXX_LDBL_COMPAT_FALSE='#'
++else
++ GLIBCXX_LDBL_COMPAT_TRUE='#'
++ GLIBCXX_LDBL_COMPAT_FALSE=
++fi
++
++
++
++
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+@@ -89166,6 +89243,13 @@ echo "$as_me: error: conditional \"ENABL
+ Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
++if test -z "${GLIBCXX_LDBL_COMPAT_TRUE}" && test -z "${GLIBCXX_LDBL_COMPAT_FALSE}"; then
++ { { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_LDBL_COMPAT\" was never defined.
++Usually this means the macro was only invoked conditionally." >&5
++echo "$as_me: error: conditional \"GLIBCXX_LDBL_COMPAT\" was never defined.
++Usually this means the macro was only invoked conditionally." >&2;}
++ { (exit 1); exit 1; }; }
++fi
+
+ : ${CONFIG_STATUS=./config.status}
+ ac_clean_files_save=$ac_clean_files
+@@ -89836,6 +89920,8 @@ s,@ENABLE_SYMVERS_GNU_TRUE@,$ENABLE_SYMV
+ s,@ENABLE_SYMVERS_GNU_FALSE@,$ENABLE_SYMVERS_GNU_FALSE,;t t
+ s,@ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@,$ENABLE_SYMVERS_DARWIN_EXPORT_TRUE,;t t
+ s,@ENABLE_SYMVERS_DARWIN_EXPORT_FALSE@,$ENABLE_SYMVERS_DARWIN_EXPORT_FALSE,;t t
++s,@GLIBCXX_LDBL_COMPAT_TRUE@,$GLIBCXX_LDBL_COMPAT_TRUE,;t t
++s,@GLIBCXX_LDBL_COMPAT_FALSE@,$GLIBCXX_LDBL_COMPAT_FALSE,;t t
+ s,@baseline_dir@,$baseline_dir,;t t
+ s,@ATOMICITY_SRCDIR@,$ATOMICITY_SRCDIR,;t t
+ s,@ATOMIC_WORD_SRCDIR@,$ATOMIC_WORD_SRCDIR,;t t
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/configure.ac gcc-41-20060515/libstdc++-v3/configure.ac
+--- gcc-41-20060515.orig/libstdc++-v3/configure.ac 2006-05-15 11:15:42.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/configure.ac 2006-05-15 13:47:27.665389535 -0500
+@@ -281,6 +281,25 @@ fi
+ # This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no.
+ GLIBCXX_ENABLE_SYMVERS([yes])
+
++ac_ldbl_compat=no
++case "$target" in
++ powerpc*-*-*gnu* | \
++ sparc*-*-linux* | \
++ s390*-*-linux* | \
++ alpha*-*-linux*)
++ AC_TRY_COMPILE(, [
++#if !defined __LONG_DOUBLE_128__ || (defined(__sparc__) && defined(__arch64__))
++#error no need for long double compatibility
++#endif
++ ], [ac_ldbl_compat=yes], [ac_ldbl_compat=no])
++ if test "$ac_ldbl_compat" = yes; then
++ AC_DEFINE([_GLIBCXX_LONG_DOUBLE_COMPAT],1,
++ [Define if compatibility should be provided for -mlong-double-64.])
++ port_specific_symbol_files="\$(top_srcdir)/config/os/gnu-linux/ldbl-extra.ver"
++ fi
++esac
++GLIBCXX_CONDITIONAL(GLIBCXX_LDBL_COMPAT, test $ac_ldbl_compat = yes)
++
+ # This depends on GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE.
+ GLIBCXX_CONFIGURE_TESTSUITE
+
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/include/bits/c++config gcc-41-20060515/libstdc++-v3/include/bits/c++config
+--- gcc-41-20060515.orig/libstdc++-v3/include/bits/c++config 2006-05-15 11:14:38.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/include/bits/c++config 2006-05-15 13:47:27.668389073 -0500
+@@ -1,6 +1,6 @@
+ // Predefined symbols and macros -*- C++ -*-
+
+-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
++// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ // Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+@@ -65,6 +65,26 @@ namespace std
+ # define _GLIBCXX_STD std
+ #endif
+
++/* Define if compatibility should be provided for -mlong-double-64. */
++#undef _GLIBCXX_LONG_DOUBLE_COMPAT
++
++// XXX GLIBCXX_ABI Deprecated
++// Namespace associations for long double 128 mode.
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
++# define _GLIBCXX_LDBL_NAMESPACE __gnu_cxx_ldbl128::
++# define _GLIBCXX_BEGIN_LDBL_NAMESPACE namespace __gnu_cxx_ldbl128 {
++# define _GLIBCXX_END_LDBL_NAMESPACE }
++namespace std
++{
++ namespace __gnu_cxx_ldbl128 { }
++ using namespace __gnu_cxx_ldbl128 __attribute__((__strong__));
++}
++#else
++# define _GLIBCXX_LDBL_NAMESPACE
++# define _GLIBCXX_BEGIN_LDBL_NAMESPACE
++# define _GLIBCXX_END_LDBL_NAMESPACE
++#endif
++
+ // Allow use of "export template." This is currently not a feature
+ // that g++ supports.
+ // #define _GLIBCXX_EXPORT_TEMPLATE 1
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/include/bits/locale_facets.h gcc-41-20060515/libstdc++-v3/include/bits/locale_facets.h
+--- gcc-41-20060515.orig/libstdc++-v3/include/bits/locale_facets.h 2006-05-15 11:14:38.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/include/bits/locale_facets.h 2006-05-15 13:47:27.673388304 -0500
+@@ -1,6 +1,6 @@
+ // Locale support -*- C++ -*-
+
+-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
++// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ // Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+@@ -1910,6 +1910,7 @@ namespace std
+ ~numpunct_byname() { }
+ };
+
++_GLIBCXX_BEGIN_LDBL_NAMESPACE
+ /**
+ * @brief Facet for parsing number strings.
+ *
+@@ -2176,13 +2177,27 @@ namespace std
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ double&) const;
+
++ // XXX GLIBCXX_ABI Deprecated
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
++ virtual iter_type
++ __do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
++ double&) const;
++#else
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ long double&) const;
++#endif
+
+ virtual iter_type
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ void*&) const;
++
++ // XXX GLIBCXX_ABI Deprecated
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
++ virtual iter_type
++ do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
++ long double&) const;
++#endif
+ //@}
+ };
+
+@@ -2438,17 +2453,30 @@ namespace std
+ virtual iter_type
+ do_put(iter_type, ios_base&, char_type __fill, double __v) const;
+
++ // XXX GLIBCXX_ABI Deprecated
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
++ virtual iter_type
++ __do_put(iter_type, ios_base&, char_type __fill, double __v) const;
++#else
+ virtual iter_type
+ do_put(iter_type, ios_base&, char_type __fill, long double __v) const;
++#endif
+
+ virtual iter_type
+ do_put(iter_type, ios_base&, char_type __fill, const void* __v) const;
++
++ // XXX GLIBCXX_ABI Deprecated
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
++ virtual iter_type
++ do_put(iter_type, ios_base&, char_type __fill, long double __v) const;
++#endif
+ //@}
+ };
+
+ template <typename _CharT, typename _OutIter>
+ locale::id num_put<_CharT, _OutIter>::id;
+
++_GLIBCXX_END_LDBL_NAMESPACE
+
+ /**
+ * @brief Facet for localized string comparison.
+@@ -3953,6 +3981,7 @@ namespace std
+ template<typename _CharT, bool _Intl>
+ const bool moneypunct_byname<_CharT, _Intl>::intl;
+
++_GLIBCXX_BEGIN_LDBL_NAMESPACE
+ /**
+ * @brief Facet for parsing monetary amounts.
+ *
+@@ -4064,9 +4093,16 @@ namespace std
+ * value. This function is a hook for derived classes to change the
+ * value returned. @see get() for details.
+ */
++ // XXX GLIBCXX_ABI Deprecated
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
++ virtual iter_type
++ __do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
++ ios_base::iostate& __err, double& __units) const;
++#else
+ virtual iter_type
+ do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, long double& __units) const;
++#endif
+
+ /**
+ * @brief Read and parse a monetary value.
+@@ -4079,6 +4115,13 @@ namespace std
+ do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+ ios_base::iostate& __err, string_type& __digits) const;
+
++ // XXX GLIBCXX_ABI Deprecated
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
++ virtual iter_type
++ do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
++ ios_base::iostate& __err, long double& __units) const;
++#endif
++
+ template<bool _Intl>
+ iter_type
+ _M_extract(iter_type __s, iter_type __end, ios_base& __io,
+@@ -4191,9 +4234,16 @@ namespace std
+ * @param units Place to store result of parsing.
+ * @return Iterator after writing.
+ */
++ // XXX GLIBCXX_ABI Deprecated
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
++ virtual iter_type
++ __do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
++ double __units) const;
++#else
+ virtual iter_type
+ do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+ long double __units) const;
++#endif
+
+ /**
+ * @brief Format and output a monetary value.
+@@ -4217,6 +4267,13 @@ namespace std
+ do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+ const string_type& __digits) const;
+
++ // XXX GLIBCXX_ABI Deprecated
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
++ virtual iter_type
++ do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
++ long double __units) const;
++#endif
++
+ template<bool _Intl>
+ iter_type
+ _M_insert(iter_type __s, ios_base& __io, char_type __fill,
+@@ -4226,6 +4283,8 @@ namespace std
+ template<typename _CharT, typename _OutIter>
+ locale::id money_put<_CharT, _OutIter>::id;
+
++_GLIBCXX_END_LDBL_NAMESPACE
++
+ /**
+ * @brief Messages facet base class providing catalog typedef.
+ */
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/include/bits/locale_facets.tcc gcc-41-20060515/libstdc++-v3/include/bits/locale_facets.tcc
+--- gcc-41-20060515.orig/libstdc++-v3/include/bits/locale_facets.tcc 2006-05-15 11:14:38.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/include/bits/locale_facets.tcc 2006-05-15 13:47:27.676387842 -0500
+@@ -1,6 +1,6 @@
+ // Locale support -*- C++ -*-
+
+-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
++// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ // Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+@@ -272,6 +272,8 @@ namespace std
+ __verify_grouping(const char* __grouping, size_t __grouping_size,
+ const string& __grouping_tmp);
+
++_GLIBCXX_BEGIN_LDBL_NAMESPACE
++
+ template<typename _CharT, typename _InIter>
+ _InIter
+ num_get<_CharT, _InIter>::
+@@ -446,6 +448,8 @@ namespace std
+ return __beg;
+ }
+
++_GLIBCXX_END_LDBL_NAMESPACE
++
+ template<typename _ValueT>
+ struct __to_unsigned_type
+ { typedef _ValueT __type; };
+@@ -460,6 +464,8 @@ namespace std
+ { typedef unsigned long long __type; };
+ #endif
+
++_GLIBCXX_BEGIN_LDBL_NAMESPACE
++
+ template<typename _CharT, typename _InIter>
+ template<typename _ValueT>
+ _InIter
+@@ -772,6 +778,21 @@ namespace std
+ return __beg;
+ }
+
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
++ template<typename _CharT, typename _InIter>
++ _InIter
++ num_get<_CharT, _InIter>::
++ __do_get(iter_type __beg, iter_type __end, ios_base& __io,
++ ios_base::iostate& __err, double& __v) const
++ {
++ string __xtrc;
++ __xtrc.reserve(32);
++ __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
++ std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
++ return __beg;
++ }
++#endif
++
+ template<typename _CharT, typename _InIter>
+ _InIter
+ num_get<_CharT, _InIter>::
+@@ -822,6 +843,8 @@ namespace std
+ __len = static_cast<int>(__w);
+ }
+
++_GLIBCXX_END_LDBL_NAMESPACE
++
+ // Forwarding functions to peel signed from unsigned integer types and
+ // either cast or compute the absolute value for the former, depending
+ // on __basefield.
+@@ -911,6 +934,8 @@ namespace std
+ return __bufend - __buf;
+ }
+
++_GLIBCXX_BEGIN_LDBL_NAMESPACE
++
+ template<typename _CharT, typename _OutIter>
+ void
+ num_put<_CharT, _OutIter>::
+@@ -1233,6 +1258,14 @@ namespace std
+ do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
+ { return _M_insert_float(__s, __io, __fill, char(), __v); }
+
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
++ template<typename _CharT, typename _OutIter>
++ _OutIter
++ num_put<_CharT, _OutIter>::
++ __do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
++ { return _M_insert_float(__s, __io, __fill, char(), __v); }
++#endif
++
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ num_put<_CharT, _OutIter>::
+@@ -1474,6 +1507,23 @@ namespace std
+ return __beg;
+ }
+
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
++ template<typename _CharT, typename _InIter>
++ _InIter
++ money_get<_CharT, _InIter>::
++ __do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
++ ios_base::iostate& __err, double& __units) const
++ {
++ string __str;
++ if (__intl)
++ __beg = _M_extract<true>(__beg, __end, __io, __err, __str);
++ else
++ __beg = _M_extract<false>(__beg, __end, __io, __err, __str);
++ std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale());
++ return __beg;
++ }
++#endif
++
+ template<typename _CharT, typename _InIter>
+ _InIter
+ money_get<_CharT, _InIter>::
+@@ -1678,7 +1728,18 @@ namespace std
+ __io.width(0);
+ return __s;
+ }
+-
++
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
++ template<typename _CharT, typename _OutIter>
++ _OutIter
++ money_put<_CharT, _OutIter>::
++ __do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
++ double __units) const
++ {
++ return this->do_put(__s, __intl, __io, __fill, (long double) __units);
++ }
++#endif
++
+ template<typename _CharT, typename _OutIter>
+ _OutIter
+ money_put<_CharT, _OutIter>::
+@@ -1726,6 +1787,7 @@ namespace std
+ { return __intl ? _M_insert<true>(__s, __io, __fill, __digits)
+ : _M_insert<false>(__s, __io, __fill, __digits); }
+
++_GLIBCXX_END_LDBL_NAMESPACE
+
+ // NB: Not especially useful. Without an ios_base object or some
+ // kind of locale reference, we are left clawing at the air where
+@@ -2511,12 +2573,12 @@ namespace std
+ extern template class moneypunct<char, true>;
+ extern template class moneypunct_byname<char, false>;
+ extern template class moneypunct_byname<char, true>;
+- extern template class money_get<char>;
+- extern template class money_put<char>;
++ extern template class _GLIBCXX_LDBL_NAMESPACE money_get<char>;
++ extern template class _GLIBCXX_LDBL_NAMESPACE money_put<char>;
+ extern template class numpunct<char>;
+ extern template class numpunct_byname<char>;
+- extern template class num_get<char>;
+- extern template class num_put<char>;
++ extern template class _GLIBCXX_LDBL_NAMESPACE num_get<char>;
++ extern template class _GLIBCXX_LDBL_NAMESPACE num_put<char>;
+ extern template class __timepunct<char>;
+ extern template class time_put<char>;
+ extern template class time_put_byname<char>;
+@@ -2638,12 +2700,12 @@ namespace std
+ extern template class moneypunct<wchar_t, true>;
+ extern template class moneypunct_byname<wchar_t, false>;
+ extern template class moneypunct_byname<wchar_t, true>;
+- extern template class money_get<wchar_t>;
+- extern template class money_put<wchar_t>;
++ extern template class _GLIBCXX_LDBL_NAMESPACE money_get<wchar_t>;
++ extern template class _GLIBCXX_LDBL_NAMESPACE money_put<wchar_t>;
+ extern template class numpunct<wchar_t>;
+ extern template class numpunct_byname<wchar_t>;
+- extern template class num_get<wchar_t>;
+- extern template class num_put<wchar_t>;
++ extern template class _GLIBCXX_LDBL_NAMESPACE num_get<wchar_t>;
++ extern template class _GLIBCXX_LDBL_NAMESPACE num_put<wchar_t>;
+ extern template class __timepunct<wchar_t>;
+ extern template class time_put<wchar_t>;
+ extern template class time_put_byname<wchar_t>;
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/include/bits/localefwd.h gcc-41-20060515/libstdc++-v3/include/bits/localefwd.h
+--- gcc-41-20060515.orig/libstdc++-v3/include/bits/localefwd.h 2006-05-15 11:14:38.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/include/bits/localefwd.h 2006-05-15 13:47:27.676387842 -0500
+@@ -129,10 +129,12 @@ namespace std
+ class codecvt_byname;
+
+ // 22.2.2 and 22.2.3 numeric
++_GLIBCXX_BEGIN_LDBL_NAMESPACE
+ template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
+ class num_get;
+ template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
+ class num_put;
++_GLIBCXX_END_LDBL_NAMESPACE
+ template<typename _CharT> class numpunct;
+ template<typename _CharT> class numpunct_byname;
+
+@@ -155,10 +157,12 @@ namespace std
+
+ // 22.2.6 money
+ class money_base;
++_GLIBCXX_BEGIN_LDBL_NAMESPACE
+ template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
+ class money_get;
+ template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
+ class money_put;
++_GLIBCXX_END_LDBL_NAMESPACE
+ template<typename _CharT, bool _Intl = false>
+ class moneypunct;
+ template<typename _CharT, bool _Intl = false>
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/include/Makefile.am gcc-41-20060515/libstdc++-v3/include/Makefile.am
+--- gcc-41-20060515.orig/libstdc++-v3/include/Makefile.am 2006-05-15 11:14:39.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/include/Makefile.am 2006-05-15 13:47:27.666389381 -0500
+@@ -825,13 +825,18 @@ ${host_builddir}/c++config.h: ${top_buil
+ ${glibcxx_srcdir}/include/bits/c++config \
+ stamp-${host_alias} \
+ ${toplevel_srcdir}/gcc/DATESTAMP
+- @cat ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
++ @ldbl_compat='' ;\
++ grep "^[ ]*#[ ]*define[ ][ ]*_GLIBCXX_LONG_DOUBLE_COMPAT[ ][ ]*1[ ]*$$" \
++ ${CONFIG_HEADER} > /dev/null 2>&1 \
++ && ldbl_compat='s,^#undef _GLIBCXX_LONG_DOUBLE_COMPAT$$,#define _GLIBCXX_LONG_DOUBLE_COMPAT 1,' ;\
++ sed -e "$$ldbl_compat" ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
+ sed -e 's/^/#define __GLIBCXX__ /' \
+- < ${toplevel_srcdir}/gcc/DATESTAMP >> $@ ;\
++ < ${toplevel_srcdir}/gcc/DATESTAMP >> $@ ;\
+ sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
+ -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \
+ -e 's/VERSION/_GLIBCXX_VERSION/g' \
+ -e 's/WORDS_/_GLIBCXX_WORDS_/g' \
++ -e '/[ ]_GLIBCXX_LONG_DOUBLE_COMPAT[ ]/d' \
+ < ${CONFIG_HEADER} >> $@ ;\
+ echo "#endif // _CXXCONFIG_" >>$@
+
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/include/Makefile.in gcc-41-20060515/libstdc++-v3/include/Makefile.in
+--- gcc-41-20060515.orig/libstdc++-v3/include/Makefile.in 2006-05-15 11:14:39.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/include/Makefile.in 2006-05-15 13:47:27.668389073 -0500
+@@ -1203,13 +1203,18 @@ ${host_builddir}/c++config.h: ${top_buil
+ ${glibcxx_srcdir}/include/bits/c++config \
+ stamp-${host_alias} \
+ ${toplevel_srcdir}/gcc/DATESTAMP
+- @cat ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
++ @ldbl_compat='' ;\
++ grep "^[ ]*#[ ]*define[ ][ ]*_GLIBCXX_LONG_DOUBLE_COMPAT[ ][ ]*1[ ]*$$" \
++ ${CONFIG_HEADER} > /dev/null 2>&1 \
++ && ldbl_compat='s,^#undef _GLIBCXX_LONG_DOUBLE_COMPAT$$,#define _GLIBCXX_LONG_DOUBLE_COMPAT 1,' ;\
++ sed -e "$$ldbl_compat" ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
+ sed -e 's/^/#define __GLIBCXX__ /' \
+- < ${toplevel_srcdir}/gcc/DATESTAMP >> $@ ;\
++ < ${toplevel_srcdir}/gcc/DATESTAMP >> $@ ;\
+ sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
+ -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \
+ -e 's/VERSION/_GLIBCXX_VERSION/g' \
+ -e 's/WORDS_/_GLIBCXX_WORDS_/g' \
++ -e '/[ ]_GLIBCXX_LONG_DOUBLE_COMPAT[ ]/d' \
+ < ${CONFIG_HEADER} >> $@ ;\
+ echo "#endif // _CXXCONFIG_" >>$@
+
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/compatibility.cc gcc-41-20060515/libstdc++-v3/src/compatibility.cc
+--- gcc-41-20060515.orig/libstdc++-v3/src/compatibility.cc 2006-05-15 11:14:42.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/src/compatibility.cc 2006-05-15 13:47:27.681387073 -0500
+@@ -1,6 +1,6 @@
+ // Compatibility symbols for previous versions -*- C++ -*-
+
+-// Copyright (C) 2005
++// Copyright (C) 2005, 2006
+ // Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+@@ -49,6 +49,7 @@
+ #include <istream>
+ #include <fstream>
+ #include <sstream>
++#include <cmath>
+
+ namespace std
+ {
+@@ -362,6 +363,107 @@ namespace std
+
+ #endif
+
++// gcc-4.1.0
++#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
++#define _GLIBCXX_MATHL_WRAPPER(name, argdecl, args, ver) \
++extern "C" double \
++__ ## name ## l_wrapper argdecl \
++{ \
++ return name args; \
++} \
++asm (".symver __" #name "l_wrapper, " #name "l@" #ver)
++
++#define _GLIBCXX_MATHL_WRAPPER1(name, ver) \
++ _GLIBCXX_MATHL_WRAPPER (name, (double x), (x), ver)
++
++#define _GLIBCXX_MATHL_WRAPPER2(name, ver) \
++ _GLIBCXX_MATHL_WRAPPER (name, (double x, double y), (x, y), ver)
++
++#ifdef _GLIBCXX_HAVE_ACOSL
++_GLIBCXX_MATHL_WRAPPER1 (acos, GLIBCXX_3.4.3);
++#endif
++#ifdef _GLIBCXX_HAVE_ASINL
++_GLIBCXX_MATHL_WRAPPER1 (asin, GLIBCXX_3.4.3);
++#endif
++#ifdef _GLIBCXX_HAVE_ATAN2L
++_GLIBCXX_MATHL_WRAPPER2 (atan2, GLIBCXX_3.4);
++#endif
++#ifdef _GLIBCXX_HAVE_ATANL
++_GLIBCXX_MATHL_WRAPPER1 (atan, GLIBCXX_3.4.3);
++#endif
++#ifdef _GLIBCXX_HAVE_CEILL
++_GLIBCXX_MATHL_WRAPPER1 (ceil, GLIBCXX_3.4.3);
++#endif
++#ifdef _GLIBCXX_HAVE_COSHL
++_GLIBCXX_MATHL_WRAPPER1 (cosh, GLIBCXX_3.4);
++#endif
++#ifdef _GLIBCXX_HAVE_COSL
++_GLIBCXX_MATHL_WRAPPER1 (cos, GLIBCXX_3.4);
++#endif
++#ifdef _GLIBCXX_HAVE_EXPL
++_GLIBCXX_MATHL_WRAPPER1 (exp, GLIBCXX_3.4);
++#endif
++#ifdef _GLIBCXX_HAVE_FLOORL
++_GLIBCXX_MATHL_WRAPPER1 (floor, GLIBCXX_3.4.3);
++#endif
++#ifdef _GLIBCXX_HAVE_FMODL
++_GLIBCXX_MATHL_WRAPPER2 (fmod, GLIBCXX_3.4.3);
++#endif
++#ifdef _GLIBCXX_HAVE_FREXPL
++_GLIBCXX_MATHL_WRAPPER (frexp, (double x, int *y), (x, y), GLIBCXX_3.4.3);
++#endif
++#ifdef _GLIBCXX_HAVE_HYPOTL
++_GLIBCXX_MATHL_WRAPPER2 (hypot, GLIBCXX_3.4);
++#endif
++#ifdef _GLIBCXX_HAVE_LDEXPL
++_GLIBCXX_MATHL_WRAPPER (ldexp, (double x, int y), (x, y), GLIBCXX_3.4.3);
++#endif
++#ifdef _GLIBCXX_HAVE_LOG10L
++_GLIBCXX_MATHL_WRAPPER1 (log10, GLIBCXX_3.4);
++#endif
++#ifdef _GLIBCXX_HAVE_LOGL
++_GLIBCXX_MATHL_WRAPPER1 (log, GLIBCXX_3.4);
++#endif
++#ifdef _GLIBCXX_HAVE_MODFL
++_GLIBCXX_MATHL_WRAPPER (modf, (double x, double *y), (x, y), GLIBCXX_3.4.3);
++#endif
++#ifdef _GLIBCXX_HAVE_POWL
++_GLIBCXX_MATHL_WRAPPER2 (pow, GLIBCXX_3.4);
++#endif
++#ifdef _GLIBCXX_HAVE_SINHL
++_GLIBCXX_MATHL_WRAPPER1 (sinh, GLIBCXX_3.4);
++#endif
++#ifdef _GLIBCXX_HAVE_SINL
++_GLIBCXX_MATHL_WRAPPER1 (sin, GLIBCXX_3.4);
++#endif
++#ifdef _GLIBCXX_HAVE_SQRTL
++_GLIBCXX_MATHL_WRAPPER1 (sqrt, GLIBCXX_3.4);
++#endif
++#ifdef _GLIBCXX_HAVE_TANHL
++_GLIBCXX_MATHL_WRAPPER1 (tanh, GLIBCXX_3.4);
++#endif
++#ifdef _GLIBCXX_HAVE_TANL
++_GLIBCXX_MATHL_WRAPPER1 (tan, GLIBCXX_3.4);
++#endif
++#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
++
++#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
++extern void *_ZTVN10__cxxabiv123__fundamental_type_infoE[];
++extern void *_ZTVN10__cxxabiv119__pointer_type_infoE[];
++extern __attribute__((used, weak)) const char _ZTSe[2] = "e";
++extern __attribute__((used, weak)) const char _ZTSPe[3] = "Pe";
++extern __attribute__((used, weak)) const char _ZTSPKe[4] = "PKe";
++extern __attribute__((used, weak)) const void *_ZTIe[2]
++ = { (void *) &_ZTVN10__cxxabiv123__fundamental_type_infoE[2],
++ (void *) _ZTSe };
++extern __attribute__((used, weak)) const void *_ZTIPe[4]
++ = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2],
++ (void *) _ZTSPe, (void *) 0L, (void *) _ZTIe };
++extern __attribute__((used, weak)) const void *_ZTIPKe[4]
++ = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2],
++ (void *) _ZTSPKe, (void *) 1L, (void *) _ZTIe };
++#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
++
+ #ifdef __APPLE__
+ #if (defined(__ppc__) || defined (__ppc64__)) && defined (PIC)
+ /* __eprintf shouldn't have been made visible from libstdc++, or
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/compatibility-ldbl.cc gcc-41-20060515/libstdc++-v3/src/compatibility-ldbl.cc
+--- gcc-41-20060515.orig/libstdc++-v3/src/compatibility-ldbl.cc 1969-12-31 18:00:00.000000000 -0600
++++ gcc-41-20060515/libstdc++-v3/src/compatibility-ldbl.cc 2006-05-15 13:47:27.680387227 -0500
+@@ -0,0 +1,73 @@
++// Compatibility symbols for -mlong-double-64 compatibility -*- C++ -*-
++
++// Copyright (C) 2006
++// Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This 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 General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++#include <locale>
++
++#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
++
++#ifdef __LONG_DOUBLE_128__
++#error "compatibility-ldbl.cc must be compiled with -mlong-double-64"
++#endif
++
++namespace std
++{
++#define C char
++ template class num_get<C, istreambuf_iterator<C> >;
++ template class num_put<C, ostreambuf_iterator<C> >;
++ template class money_get<C, istreambuf_iterator<C> >;
++ template class money_put<C, ostreambuf_iterator<C> >;
++ template const num_put<C>& use_facet<num_put<C> >(const locale&);
++ template const num_get<C>& use_facet<num_get<C> >(const locale&);
++ template const money_put<C>& use_facet<money_put<C> >(const locale&);
++ template const money_get<C>& use_facet<money_get<C> >(const locale&);
++ template bool has_facet<num_put<C> >(const locale&);
++ template bool has_facet<num_get<C> >(const locale&);
++ template bool has_facet<money_put<C> >(const locale&);
++ template bool has_facet<money_get<C> >(const locale&);
++#undef C
++#ifdef _GLIBCXX_USE_WCHAR_T
++#define C wchar_t
++ template class num_get<C, istreambuf_iterator<C> >;
++ template class num_put<C, ostreambuf_iterator<C> >;
++ template class money_get<C, istreambuf_iterator<C> >;
++ template class money_put<C, ostreambuf_iterator<C> >;
++ template const num_put<C>& use_facet<num_put<C> >(const locale&);
++ template const num_get<C>& use_facet<num_get<C> >(const locale&);
++ template const money_put<C>& use_facet<money_put<C> >(const locale&);
++ template const money_get<C>& use_facet<money_get<C> >(const locale&);
++ template bool has_facet<num_put<C> >(const locale&);
++ template bool has_facet<num_get<C> >(const locale&);
++ template bool has_facet<money_put<C> >(const locale&);
++ template bool has_facet<money_get<C> >(const locale&);
++#undef C
++#endif
++}
++
++#endif
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/complex_io.cc gcc-41-20060515/libstdc++-v3/src/complex_io.cc
+--- gcc-41-20060515.orig/libstdc++-v3/src/complex_io.cc 2006-05-15 11:14:42.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/src/complex_io.cc 2006-05-15 13:47:27.681387073 -0500
+@@ -1,6 +1,6 @@
+ // The template and inlines for the -*- C++ -*- complex number classes.
+
+-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
++// Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+@@ -91,3 +91,20 @@ namespace std
+ const complex<long double>&);
+ #endif //_GLIBCXX_USE_WCHAR_T
+ } // namespace std
++
++// XXX GLIBCXX_ABI Deprecated
++#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
++
++#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
++ extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
++
++_GLIBCXX_LDBL_COMPAT (_ZStlsIdcSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E,
++ _ZStlsIecSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E);
++_GLIBCXX_LDBL_COMPAT (_ZStlsIdwSt11char_traitsIwEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E,
++ _ZStlsIewSt11char_traitsIwEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E);
++_GLIBCXX_LDBL_COMPAT (_ZStrsIdcSt11char_traitsIcEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E,
++ _ZStrsIecSt11char_traitsIcEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E);
++_GLIBCXX_LDBL_COMPAT (_ZStrsIdwSt11char_traitsIwEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E,
++ _ZStrsIewSt11char_traitsIwEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E);
++
++#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/istream-inst.cc gcc-41-20060515/libstdc++-v3/src/istream-inst.cc
+--- gcc-41-20060515.orig/libstdc++-v3/src/istream-inst.cc 2006-05-15 11:14:42.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/src/istream-inst.cc 2006-05-15 13:47:27.682386919 -0500
+@@ -1,6 +1,6 @@
+ // Explicit instantiation file.
+
+-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
++// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2006
+ // Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+@@ -68,3 +68,19 @@ namespace std
+ template wistream& operator>>(wistream&, _Setw);
+ #endif
+ } // namespace std
++
++// XXX GLIBCXX_ABI Deprecated
++#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
++
++#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
++ extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
++_GLIBCXX_LDBL_COMPAT (_ZNSirsERd, _ZNSirsERe);
++_GLIBCXX_LDBL_COMPAT (_ZNSt13basic_istreamIwSt11char_traitsIwEErsERd,
++ _ZNSt13basic_istreamIwSt11char_traitsIwEErsERe);
++// These 2 are in GCC 4.2+ only so far
++// _GLIBCXX_LDBL_COMPAT (_ZNSi10_M_extractIdEERSiRT_,
++// _ZNSi10_M_extractIeEERSiRT_);
++// _GLIBCXX_LDBL_COMPAT (_ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractIdEERS2_RT_,
++// _ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractIeEERS2_RT_);
++
++#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/limits.cc gcc-41-20060515/libstdc++-v3/src/limits.cc
+--- gcc-41-20060515.orig/libstdc++-v3/src/limits.cc 2006-05-15 11:14:42.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/src/limits.cc 2006-05-15 13:47:27.683386765 -0500
+@@ -1,6 +1,6 @@
+ // Static data members of -*- C++ -*- numeric_limits classes
+
+-// Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
++// Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+@@ -447,3 +447,34 @@ namespace std
+ const bool numeric_limits<long double>::tinyness_before;
+ const float_round_style numeric_limits<long double>::round_style;
+ } // namespace std
++
++// XXX GLIBCXX_ABI Deprecated
++#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
++
++#define _GLIBCXX_NUM_LIM_COMPAT(type, member, len) \
++ extern "C" type _ZNSt14numeric_limitsIeE ## len ## member ## E \
++ __attribute__ ((alias ("_ZNSt14numeric_limitsIdE" #len #member "E")))
++_GLIBCXX_NUM_LIM_COMPAT (bool, is_specialized, 14);
++_GLIBCXX_NUM_LIM_COMPAT (int, digits, 6);
++_GLIBCXX_NUM_LIM_COMPAT (int, digits10, 8);
++_GLIBCXX_NUM_LIM_COMPAT (bool, is_signed, 9);
++_GLIBCXX_NUM_LIM_COMPAT (bool, is_integer, 10);
++_GLIBCXX_NUM_LIM_COMPAT (bool, is_exact, 8);
++_GLIBCXX_NUM_LIM_COMPAT (int, radix, 5);
++_GLIBCXX_NUM_LIM_COMPAT (int, min_exponent, 12);
++_GLIBCXX_NUM_LIM_COMPAT (int, min_exponent10, 14);
++_GLIBCXX_NUM_LIM_COMPAT (int, max_exponent, 12);
++_GLIBCXX_NUM_LIM_COMPAT (int, max_exponent10, 14);
++_GLIBCXX_NUM_LIM_COMPAT (bool, has_infinity, 12);
++_GLIBCXX_NUM_LIM_COMPAT (bool, has_quiet_NaN, 13);
++_GLIBCXX_NUM_LIM_COMPAT (bool, has_signaling_NaN, 17);
++_GLIBCXX_NUM_LIM_COMPAT (std::float_denorm_style, has_denorm, 10);
++_GLIBCXX_NUM_LIM_COMPAT (bool, has_denorm_loss, 15);
++_GLIBCXX_NUM_LIM_COMPAT (bool, is_iec559, 9);
++_GLIBCXX_NUM_LIM_COMPAT (bool, is_bounded, 10);
++_GLIBCXX_NUM_LIM_COMPAT (bool, is_modulo, 9);
++_GLIBCXX_NUM_LIM_COMPAT (bool, traps, 5);
++_GLIBCXX_NUM_LIM_COMPAT (bool, tinyness_before, 15);
++_GLIBCXX_NUM_LIM_COMPAT (std::float_round_style, round_style, 11);
++
++#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/locale.cc gcc-41-20060515/libstdc++-v3/src/locale.cc
+--- gcc-41-20060515.orig/libstdc++-v3/src/locale.cc 2006-05-15 11:14:42.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/src/locale.cc 2006-05-15 14:06:44.932155273 -0500
+@@ -41,6 +41,21 @@ namespace __gnu_internal
+ static __glibcxx_mutex_define_initialized(locale_cache_mutex);
+ }
+
++// XXX GLIBCXX_ABI Deprecated
++#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
++# define _GLIBCXX_LOC_ID(mangled) extern std::locale::id mangled
++_GLIBCXX_LOC_ID (_ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE);
++_GLIBCXX_LOC_ID (_ZNSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE);
++_GLIBCXX_LOC_ID (_ZNSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE);
++_GLIBCXX_LOC_ID (_ZNSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE);
++# ifdef _GLIBCXX_USE_WCHAR_T
++_GLIBCXX_LOC_ID (_ZNSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE2idE);
++_GLIBCXX_LOC_ID (_ZNSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE2idE);
++_GLIBCXX_LOC_ID (_ZNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE2idE);
++_GLIBCXX_LOC_ID (_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE2idE);
++# endif
++#endif
++
+ namespace std
+ {
+ // Definitions for static const data members of locale.
+@@ -397,9 +412,29 @@ namespace std
+ locale::id::_M_id() const
+ {
+ if (!_M_index)
+- _M_index = 1 + __gnu_cxx::__exchange_and_add(&_S_refcount, 1);
++ {
++ // XXX GLIBCXX_ABI Deprecated
++#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
++ locale::id *f = 0;
++# define _GLIBCXX_SYNC_ID(facet, mangled) \
++ if (this == &::mangled) \
++ f = &facet::id
++ _GLIBCXX_SYNC_ID (num_get<char>, _ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE);
++ _GLIBCXX_SYNC_ID (num_put<char>, _ZNSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE);
++ _GLIBCXX_SYNC_ID (money_get<char>, _ZNSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE);
++ _GLIBCXX_SYNC_ID (money_put<char>, _ZNSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE);
++# ifdef _GLIBCXX_USE_WCHAR_T
++ _GLIBCXX_SYNC_ID (num_get<wchar_t>, _ZNSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE2idE);
++ _GLIBCXX_SYNC_ID (num_put<wchar_t>, _ZNSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE2idE);
++ _GLIBCXX_SYNC_ID (money_get<wchar_t>, _ZNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE2idE);
++ _GLIBCXX_SYNC_ID (money_put<wchar_t>, _ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE2idE);
++# endif
++ if (f)
++ _M_index = 1 + f->_M_id();
++ else
++#endif
++ _M_index = 1 + __gnu_cxx::__exchange_and_add(&_S_refcount, 1);
++ }
+ return _M_index - 1;
+ }
+ } // namespace std
+-
+-
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/locale-inst.cc gcc-41-20060515/libstdc++-v3/src/locale-inst.cc
+--- gcc-41-20060515.orig/libstdc++-v3/src/locale-inst.cc 2006-05-15 11:14:42.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/src/locale-inst.cc 2006-05-15 13:47:27.684386611 -0500
+@@ -1,6 +1,6 @@
+ // Locale support -*- C++ -*-
+
+-// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
++// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006
+ // Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+@@ -37,6 +37,7 @@
+ // Instantiation configuration.
+ #ifndef C
+ # define C char
++# define C_is_char
+ #endif
+
+ namespace std
+@@ -48,6 +49,7 @@ namespace std
+ template struct __moneypunct_cache<C, true>;
+ template class moneypunct_byname<C, false>;
+ template class moneypunct_byname<C, true>;
++_GLIBCXX_BEGIN_LDBL_NAMESPACE
+ template class money_get<C, istreambuf_iterator<C> >;
+ template class money_put<C, ostreambuf_iterator<C> >;
+ template
+@@ -73,11 +75,13 @@ namespace std
+ money_put<C, ostreambuf_iterator<C> >::
+ _M_insert<false>(ostreambuf_iterator<C>, ios_base&, C,
+ const string_type&) const;
++_GLIBCXX_END_LDBL_NAMESPACE
+
+ // numpunct, numpunct_byname, num_get, and num_put
+ template class numpunct<C>;
+ template struct __numpunct_cache<C>;
+ template class numpunct_byname<C>;
++_GLIBCXX_BEGIN_LDBL_NAMESPACE
+ template class num_get<C, istreambuf_iterator<C> >;
+ template class num_put<C, ostreambuf_iterator<C> >;
+ template
+@@ -161,7 +165,8 @@ namespace std
+ num_put<C, ostreambuf_iterator<C> >::
+ _M_insert_float(ostreambuf_iterator<C>, ios_base&, C, char,
+ long double) const;
+-
++_GLIBCXX_END_LDBL_NAMESPACE
++
+ // time_get and time_put
+ template class __timepunct<C>;
+ template struct __timepunct_cache<C>;
+@@ -314,3 +319,44 @@ namespace std
+ ios_base::fmtflags, bool);
+ #endif
+ } // namespace std
++
++// XXX GLIBCXX_ABI Deprecated
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined C_is_char
++
++#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
++ extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
++
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIjEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
++ _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIjEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIlEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
++ _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIlEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intImEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
++ _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intImEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intItEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
++ _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intItEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIxEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
++ _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIxEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIyEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
++ _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIyEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES4_S4_RSt8ios_basecT_,
++ _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES3_S3_RSt8ios_basecT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intImEES4_S4_RSt8ios_basecT_,
++ _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intImEES3_S3_RSt8ios_basecT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIxEES4_S4_RSt8ios_basecT_,
++ _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIxEES3_S3_RSt8ios_basecT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIyEES4_S4_RSt8ios_basecT_,
++ _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIyEES3_S3_RSt8ios_basecT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES4_S4_RSt8ios_baseccT_,
++ _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_,
++ _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIeEES3_S3_RSt8ios_baseccT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb0EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
++ _ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb0EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb1EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
++ _ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb1EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES4_S4_RSt8ios_basecRKSs,
++ _ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES3_S3_RSt8ios_basecRKSs);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb1EEES4_S4_RSt8ios_basecRKSs,
++ _ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb1EEES3_S3_RSt8ios_basecRKSs);
++
++#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/locale-misc-inst.cc gcc-41-20060515/libstdc++-v3/src/locale-misc-inst.cc
+--- gcc-41-20060515.orig/libstdc++-v3/src/locale-misc-inst.cc 2006-05-15 11:14:42.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/src/locale-misc-inst.cc 2006-05-15 13:47:27.685386457 -0500
+@@ -1,6 +1,7 @@
+ // Locale support -*- C++ -*-
+
+-// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
++// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006
++// Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+@@ -45,3 +46,19 @@ namespace std
+ __convert_from_v(char*, const int, const char*, long double,
+ const __c_locale&, int);
+ } // namespace std
++
++// XXX GLIBCXX_ABI Deprecated
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT
++
++#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
++ extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
++
++# if _GLIBCXX_C_LOCALE_GNU
++_GLIBCXX_LDBL_COMPAT(_ZSt16__convert_from_vIdEiPciPKcT_RKP15__locale_structi,
++ _ZSt16__convert_from_vIeEiPciPKcT_RKP15__locale_structi);
++# else
++_GLIBCXX_LDBL_COMPAT(_ZSt16__convert_from_vIdEiPciPKcT_RKPii,
++ _ZSt16__convert_from_vIeEiPciPKcT_RKPii);
++# endif
++
++#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/Makefile.am gcc-41-20060515/libstdc++-v3/src/Makefile.am
+--- gcc-41-20060515.orig/libstdc++-v3/src/Makefile.am 2006-05-15 11:14:42.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/src/Makefile.am 2006-05-15 13:47:27.677387688 -0500
+@@ -35,10 +35,15 @@ libstdc++-symbol.ver: ${glibcxx_srcdir}
+ $(port_specific_symbol_files)
+ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
+ if test "x$(port_specific_symbol_files)" != x; then \
+- sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
+- sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
+- cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
+- rm tmp.top tmp.bottom; \
++ if grep '^# Appended to version file.' \
++ $(port_specific_symbol_files) /dev/null > /dev/null 2>&1; then \
++ cat $(port_specific_symbol_files) >> $@; \
++ else \
++ sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
++ sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
++ cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
++ rm tmp.top tmp.bottom; \
++ fi; \
+ fi
+
+ if ENABLE_SYMVERS_GNU
+@@ -113,6 +118,12 @@ c++locale.cc: ${glibcxx_srcdir}/$(CLOCAL
+ basic_file.cc: ${glibcxx_srcdir}/$(BASIC_FILE_CC)
+ $(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_CC) ./$@ || true
+
++if GLIBCXX_LDBL_COMPAT
++ldbl_compat_sources = compatibility-ldbl.cc
++else
++ldbl_compat_sources =
++endif
++
+ # Sources present in the src directory.
+ sources = \
+ bitmap_allocator.cc \
+@@ -160,7 +171,8 @@ sources = \
+ wlocale-inst.cc \
+ wstring-inst.cc \
+ ${host_sources} \
+- ${host_sources_extra}
++ ${host_sources_extra} \
++ ${ldbl_compat_sources}
+
+ VPATH = $(top_srcdir)/src:$(top_srcdir)
+
+@@ -191,6 +203,15 @@ concept-inst.lo: concept-inst.cc
+ concept-inst.o: concept-inst.cc
+ $(CXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $<
+
++if GLIBCXX_LDBL_COMPAT
++# Use special rules for compatibility-ldbl.cc compilation, as we need to
++# pass -mlong-double-64.
++compatibility-ldbl.lo: compatibility-ldbl.cc
++ $(LTCXXCOMPILE) -mlong-double-64 -c $<
++compatibility-ldbl.o: compatibility-ldbl.cc
++ $(CXXCOMPILE) -mlong-double-64 -c $<
++endif
++
+ # AM_CXXFLAGS needs to be in each subdirectory so that it can be
+ # modified in a per-library or per-sub-library way. Need to manually
+ # set this option because CONFIG_CXXFLAGS has to be after
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/Makefile.in gcc-41-20060515/libstdc++-v3/src/Makefile.in
+--- gcc-41-20060515.orig/libstdc++-v3/src/Makefile.in 2006-05-15 11:14:42.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/src/Makefile.in 2006-05-15 13:47:27.679387380 -0500
+@@ -59,11 +59,27 @@ am__strip_dir = `echo $$p | sed -e 's|^.
+ am__installdirs = "$(DESTDIR)$(toolexeclibdir)"
+ toolexeclibLTLIBRARIES_INSTALL = $(INSTALL)
+ LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
++am__libstdc___la_SOURCES_DIST = bitmap_allocator.cc pool_allocator.cc \
++ mt_allocator.cc codecvt.cc compatibility.cc complex_io.cc \
++ ctype.cc debug.cc debug_list.cc functexcept.cc \
++ globals_locale.cc globals_io.cc ios.cc ios_failure.cc \
++ ios_init.cc ios_locale.cc limits.cc list.cc locale.cc \
++ locale_init.cc locale_facets.cc localename.cc stdexcept.cc \
++ strstream.cc tree.cc allocator-inst.cc concept-inst.cc \
++ fstream-inst.cc ext-inst.cc ios-inst.cc iostream-inst.cc \
++ istream-inst.cc istream.cc locale-inst.cc locale-misc-inst.cc \
++ misc-inst.cc ostream-inst.cc sstream-inst.cc streambuf-inst.cc \
++ streambuf.cc string-inst.cc valarray-inst.cc wlocale-inst.cc \
++ wstring-inst.cc atomicity.cc codecvt_members.cc \
++ collate_members.cc ctype_members.cc messages_members.cc \
++ monetary_members.cc numeric_members.cc time_members.cc \
++ basic_file.cc c++locale.cc compatibility-ldbl.cc
+ am__objects_1 = atomicity.lo codecvt_members.lo collate_members.lo \
+ ctype_members.lo messages_members.lo monetary_members.lo \
+ numeric_members.lo time_members.lo
+ am__objects_2 = basic_file.lo c++locale.lo
+-am__objects_3 = bitmap_allocator.lo pool_allocator.lo mt_allocator.lo \
++@GLIBCXX_LDBL_COMPAT_TRUE@am__objects_3 = compatibility-ldbl.lo
++am__objects_4 = bitmap_allocator.lo pool_allocator.lo mt_allocator.lo \
+ codecvt.lo compatibility.lo complex_io.lo ctype.lo debug.lo \
+ debug_list.lo functexcept.lo globals_locale.lo globals_io.lo \
+ ios.lo ios_failure.lo ios_init.lo ios_locale.lo limits.lo \
+@@ -74,8 +90,9 @@ am__objects_3 = bitmap_allocator.lo pool
+ locale-inst.lo locale-misc-inst.lo misc-inst.lo \
+ ostream-inst.lo sstream-inst.lo streambuf-inst.lo streambuf.lo \
+ string-inst.lo valarray-inst.lo wlocale-inst.lo \
+- wstring-inst.lo $(am__objects_1) $(am__objects_2)
+-am_libstdc___la_OBJECTS = $(am__objects_3)
++ wstring-inst.lo $(am__objects_1) $(am__objects_2) \
++ $(am__objects_3)
++am_libstdc___la_OBJECTS = $(am__objects_4)
+ libstdc___la_OBJECTS = $(am_libstdc___la_OBJECTS)
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+ depcomp =
+@@ -84,7 +101,7 @@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_IN
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+ CXXLD = $(CXX)
+ SOURCES = $(libstdc___la_SOURCES)
+-DIST_SOURCES = $(libstdc___la_SOURCES)
++DIST_SOURCES = $(am__libstdc___la_SOURCES_DIST)
+ ETAGS = etags
+ CTAGS = ctags
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+@@ -152,6 +169,8 @@ GLIBCXX_C_HEADERS_C_TRUE = @GLIBCXX_C_HE
+ GLIBCXX_HOSTED_FALSE = @GLIBCXX_HOSTED_FALSE@
+ GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@
+ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
++GLIBCXX_LDBL_COMPAT_FALSE = @GLIBCXX_LDBL_COMPAT_FALSE@
++GLIBCXX_LDBL_COMPAT_TRUE = @GLIBCXX_LDBL_COMPAT_TRUE@
+ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+@@ -302,6 +321,8 @@ host_sources_extra = \
+ basic_file.cc \
+ c++locale.cc
+
++@GLIBCXX_LDBL_COMPAT_FALSE@ldbl_compat_sources =
++@GLIBCXX_LDBL_COMPAT_TRUE@ldbl_compat_sources = compatibility-ldbl.cc
+
+ # Sources present in the src directory.
+ sources = \
+@@ -350,7 +371,8 @@ sources = \
+ wlocale-inst.cc \
+ wstring-inst.cc \
+ ${host_sources} \
+- ${host_sources_extra}
++ ${host_sources_extra} \
++ ${ldbl_compat_sources}
+
+ libstdc___la_SOURCES = $(sources)
+ libstdc___la_LIBADD = \
+@@ -677,10 +699,15 @@ libstdc++-symbol.ver: ${glibcxx_srcdir}
+ $(port_specific_symbol_files)
+ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
+ if test "x$(port_specific_symbol_files)" != x; then \
+- sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
+- sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
+- cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
+- rm tmp.top tmp.bottom; \
++ if grep '^# Appended to version file.' \
++ $(port_specific_symbol_files) /dev/null > /dev/null 2>&1; then \
++ cat $(port_specific_symbol_files) >> $@; \
++ else \
++ sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
++ sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
++ cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
++ rm tmp.top tmp.bottom; \
++ fi; \
+ fi
+ @ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@libstdc++-symbol.explist : libstdc++-symbol.ver \
+ @ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@ ${glibcxx_srcdir}/scripts/make_exports.pl \
+@@ -733,6 +760,13 @@ concept-inst.lo: concept-inst.cc
+ concept-inst.o: concept-inst.cc
+ $(CXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $<
+
++# Use special rules for compatibility-ldbl.cc compilation, as we need to
++# pass -mlong-double-64.
++@GLIBCXX_LDBL_COMPAT_TRUE@compatibility-ldbl.lo: compatibility-ldbl.cc
++@GLIBCXX_LDBL_COMPAT_TRUE@ $(LTCXXCOMPILE) -mlong-double-64 -c $<
++@GLIBCXX_LDBL_COMPAT_TRUE@compatibility-ldbl.o: compatibility-ldbl.cc
++@GLIBCXX_LDBL_COMPAT_TRUE@ $(CXXCOMPILE) -mlong-double-64 -c $<
++
+ # Added bits to build debug library.
+ @GLIBCXX_BUILD_DEBUG_TRUE@all-local: build_debug
+ @GLIBCXX_BUILD_DEBUG_TRUE@install-data-local: install_debug
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/ostream-inst.cc gcc-41-20060515/libstdc++-v3/src/ostream-inst.cc
+--- gcc-41-20060515.orig/libstdc++-v3/src/ostream-inst.cc 2006-05-15 11:14:42.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/src/ostream-inst.cc 2006-05-15 13:47:27.685386457 -0500
+@@ -1,6 +1,6 @@
+ // Explicit instantiation file.
+
+-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
++// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2006
+ // Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+@@ -74,3 +74,19 @@ namespace std
+ template wostream& operator<<(wostream&, _Setw);
+ #endif
+ } // namespace std
++
++// XXX GLIBCXX_ABI Deprecated
++#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
++
++#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
++ extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
++_GLIBCXX_LDBL_COMPAT (_ZNSolsEd, _ZNSolsEe);
++_GLIBCXX_LDBL_COMPAT (_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEd,
++ _ZNSt13basic_ostreamIwSt11char_traitsIwEElsEe);
++// These 2 are in GCC 4.2+ only so far
++// _GLIBCXX_LDBL_COMPAT (_ZNSo9_M_insertIdEERSoT_,
++// _ZNSo9_M_insertIeEERSoT_);
++// _GLIBCXX_LDBL_COMPAT (_ZNSt13basic_ostreamIwSt11char_traitsIwEE9_M_insertIdEERS2_T_,
++// _ZNSt13basic_ostreamIwSt11char_traitsIwEE9_M_insertIeEERS2_T_);
++
++#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/wlocale-inst.cc gcc-41-20060515/libstdc++-v3/src/wlocale-inst.cc
+--- gcc-41-20060515.orig/libstdc++-v3/src/wlocale-inst.cc 2006-05-15 11:14:42.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/src/wlocale-inst.cc 2006-05-15 13:47:27.686386303 -0500
+@@ -1,6 +1,7 @@
+ // Locale support -*- C++ -*-
+
+-// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
++// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006
++// Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+@@ -36,4 +37,45 @@
+ #ifdef _GLIBCXX_USE_WCHAR_T
+ #define C wchar_t
+ #include "locale-inst.cc"
++
++// XXX GLIBCXX_ABI Deprecated
++#if defined _GLIBCXX_LONG_DOUBLE_COMPAT
++
++#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
++ extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
++
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIjEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
++ _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIjEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIlEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
++ _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIlEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intImEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
++ _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intImEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intItEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
++ _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intItEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIxEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
++ _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIxEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIyEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
++ _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIyEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIlEES4_S4_RSt8ios_basewT_,
++ _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIlEES3_S3_RSt8ios_basewT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intImEES4_S4_RSt8ios_basewT_,
++ _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intImEES3_S3_RSt8ios_basewT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIxEES4_S4_RSt8ios_basewT_,
++ _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIxEES3_S3_RSt8ios_basewT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIyEES4_S4_RSt8ios_basewT_,
++ _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIyEES3_S3_RSt8ios_basewT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIdEES4_S4_RSt8ios_basewcT_,
++ _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIdEES3_S3_RSt8ios_basewcT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIdEES3_S3_RSt8ios_basewcT_,
++ _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIeEES3_S3_RSt8ios_basewcT_);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb0EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
++ _ZNKSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb0EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb1EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
++ _ZNKSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb1EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb0EEES4_S4_RSt8ios_basewRKSbIwS3_SaIwEE,
++ _ZNKSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb0EEES3_S3_RSt8ios_basewRKSbIwS2_SaIwEE);
++_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb1EEES4_S4_RSt8ios_basewRKSbIwS3_SaIwEE,
++ _ZNKSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb1EEES3_S3_RSt8ios_basewRKSbIwS2_SaIwEE);
++
++#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
+ #endif
+diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/testsuite/testsuite_abi.cc gcc-41-20060515/libstdc++-v3/testsuite/testsuite_abi.cc
+--- gcc-41-20060515.orig/libstdc++-v3/testsuite/testsuite_abi.cc 2006-05-15 11:15:38.000000000 -0500
++++ gcc-41-20060515/libstdc++-v3/testsuite/testsuite_abi.cc 2006-05-15 14:14:57.231341148 -0500
+@@ -187,8 +187,11 @@ check_version(symbol& test, bool added)
+ known_versions.push_back("GLIBCXX_3.4.6");
+ known_versions.push_back("GLIBCXX_3.4.7");
+ known_versions.push_back("GLIBCXX_3.4.8");
++ known_versions.push_back("GLIBCXX_LDBL_3.4");
++ known_versions.push_back("GLIBCXX_LDBL_3.4.7");
+ known_versions.push_back("CXXABI_1.3");
+ known_versions.push_back("CXXABI_1.3.1");
++ known_versions.push_back("CXXABI_LDBL_1.3");
+ }
+ compat_list::iterator begin = known_versions.begin();
+ compat_list::iterator end = known_versions.end();
+@@ -224,9 +227,7 @@ check_version(symbol& test, bool added)
+ // New version labels are ok. The rest are not.
+ compat_list::iterator it2 = find(begin, end, test.name);
+ if (it2 != end)
+- {
+- test.version_status = symbol::compatible;
+- }
++ test.version_status = symbol::compatible;
+ else
+ test.version_status = symbol::incompatible;
+ }
+@@ -370,7 +371,7 @@ compare_symbols(const char* baseline_fil
+ added_names.erase(it);
+ }
+ else
+- missing_names.push_back(what);
++ missing_names.push_back(what);
+ }
+
+ // Check missing names for compatibility.
diff --git a/packages/gcc/gcc-4.1.1/ppc-sfp-long-double-gcc411-7.patch b/packages/gcc/gcc-4.1.1/ppc-sfp-long-double-gcc411-7.patch
new file mode 100644
index 0000000000..e3a87c87d0
--- /dev/null
+++ b/packages/gcc/gcc-4.1.1/ppc-sfp-long-double-gcc411-7.patch
@@ -0,0 +1,4271 @@
+ * config/rs6000/darwin-ldouble.c: Build file for SOFT_FLOAT.
+ (strong_alias): Define.
+ (__gcc_qmul): Provide non-FMA for soft-float.
+ (__gcc_qdiv): Same.
+ (__gcc_qneg): New.
+ (__gcc_qeq): New.
+ (__gcc_qle): New.
+ (__gcc_qge): New.
+ (__gcc_qunord): New.
+ (__gcc_stoq): New.
+ (__gcc_dtoq): New.
+ (__gcc_qtos): New.
+ (__gcc_qtod): New.
+ (__gcc_qtoi): New.
+ (__gcc_qtou): New.
+ (__gcc_itoq): New.
+ (__gcc_utoq): New.
+ (fmsub): New.
+ * config/rs6000/rs6000.c (rs6000_emit_move): Handle TFmode
+ constant for soft-float.
+ (rs6000_init_libfuncs): Initialize soft-float functions.
+ * config/rs6000/libgcc-ppc-glibc.ver: Version soft-float symbols.
+ * config/rs6000/rs6000.md (movtf): Allow soft-float.
+ (movtf_softfloat): New.
+ * config/rs6000/t-ppccomm (TARGET_LIBGCC2_CFLAGS): Add
+ -mlong-double-128.
+ (ldblspecs): Remove.
+ * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Do not warn
+ about long double soft float.
+
+diff -urN gcc-4.1.1/gcc/config/rs6000/darwin-ldouble.c gcc-4.1.1-patched/gcc/config/rs6000/darwin-ldouble.c
+--- gcc-4.1.1/gcc/config/rs6000/darwin-ldouble.c 2006-03-23 16:23:58.000000000 -0600
++++ gcc-4.1.1-patched/gcc/config/rs6000/darwin-ldouble.c 2006-09-12 14:30:16.000000000 -0500
+@@ -49,7 +49,8 @@
+
+ This code currently assumes big-endian. */
+
+-#if (!defined (__NO_FPRS__) && !defined (__LITTLE_ENDIAN__) \
++#if ((!defined (__NO_FPRS__) || defined (_SOFT_FLOAT)) \
++ && !defined (__LITTLE_ENDIAN__) \
+ && (defined (__MACH__) || defined (__powerpc__) || defined (_AIX)))
+
+ #define fabs(x) __builtin_fabs(x)
+@@ -60,14 +61,19 @@
+
+ #define nonfinite(a) unlikely (! isless (fabs (a), inf ()))
+
++/* Define ALIASNAME as a strong alias for NAME. */
++# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
++# define _strong_alias(name, aliasname) \
++ extern __typeof (name) aliasname __attribute__ ((alias (#name)));
++
+ /* All these routines actually take two long doubles as parameters,
+ but GCC currently generates poor code when a union is used to turn
+ a long double into a pair of doubles. */
+
+-extern long double __gcc_qadd (double, double, double, double);
+-extern long double __gcc_qsub (double, double, double, double);
+-extern long double __gcc_qmul (double, double, double, double);
+-extern long double __gcc_qdiv (double, double, double, double);
++long double __gcc_qadd (double, double, double, double);
++long double __gcc_qsub (double, double, double, double);
++long double __gcc_qmul (double, double, double, double);
++long double __gcc_qdiv (double, double, double, double);
+
+ #if defined __ELF__ && defined SHARED \
+ && (defined __powerpc64__ || !(defined __linux__ || defined __gnu_hurd__))
+@@ -139,6 +145,10 @@
+ return __gcc_qadd (a, b, -c, -d);
+ }
+
++#ifdef _SOFT_FLOAT
++static double fmsub (double, double, double);
++#endif
++
+ long double
+ __gcc_qmul (double a, double b, double c, double d)
+ {
+@@ -154,7 +164,11 @@
+ /* Sum terms of two highest orders. */
+
+ /* Use fused multiply-add to get low part of a * c. */
++#ifndef _SOFT_FLOAT
+ asm ("fmsub %0,%1,%2,%3" : "=f"(tau) : "f"(a), "f"(c), "f"(t));
++#else
++ tau = fmsub (a, c, t);
++#endif
+ v = a*d;
+ w = b*c;
+ tau += v + w; /* Add in other second-order terms. */
+@@ -187,7 +201,11 @@
+ numerically necessary. */
+
+ /* Use fused multiply-add to get low part of c * t. */
++#ifndef _SOFT_FLOAT
+ asm ("fmsub %0,%1,%2,%3" : "=f"(sigma) : "f"(c), "f"(t), "f"(s));
++#else
++ sigma = fmsub (c, t, s);
++#endif
+ v = a - s;
+
+ tau = ((v-sigma)+w)/c; /* Correction to t. */
+@@ -201,4 +219,3959 @@
+ return z.ldval;
+ }
+
++#ifdef _SOFT_FLOAT
++
++long double __gcc_qneg (double, double);
++int __gcc_qeq (double, double, double, double);
++int __gcc_qne (double, double, double, double);
++int __gcc_qge (double, double, double, double);
++int __gcc_qle (double, double, double, double);
++int __gcc_qunord (double, double, double, double);
++long double __gcc_stoq (float);
++long double __gcc_dtoq (double);
++float __gcc_qtos (double, double);
++double __gcc_qtod (double, double);
++int __gcc_qtoi (double, double);
++unsigned int __gcc_qtou (double, double);
++long double __gcc_itoq (int);
++long double __gcc_utoq (unsigned int);
++
++extern int __eqdf2 (double, double);
++extern int __ledf2 (double, double);
++extern int __gedf2 (double, double);
++extern int __unorddf2 (double, double);
++
++/* Negate 'long double' value and return the result. */
++long double
++__gcc_qneg (double a, double aa)
++{
++ longDblUnion x;
++
++ x.dval[0] = -a;
++ x.dval[1] = -aa;
++ return x.ldval;
++}
++
++/* Compare two 'long double' values for equality. */
++int
++__gcc_qeq (double a, double aa, double c, double cc)
++{
++ if (__eqdf2 (a, c) == 0)
++ return __eqdf2 (aa, cc);
++ return 1;
++}
++
++strong_alias (__gcc_qeq, __gcc_qne);
++
++/* Compare two 'long double' values for less than or equal. */
++int
++__gcc_qle (double a, double aa, double c, double cc)
++{
++ if (__eqdf2 (a, c) == 0)
++ return __ledf2 (aa, cc);
++ return __ledf2 (a, c);
++}
++
++strong_alias (__gcc_qle, __gcc_qlt);
++
++/* Compare two 'long double' values for greater than or equal. */
++int
++__gcc_qge (double a, double aa, double c, double cc)
++{
++ if (__eqdf2 (a, c) == 0)
++ return __gedf2 (aa, cc);
++ return __gedf2 (a, c);
++}
++
++strong_alias (__gcc_qge, __gcc_qgt);
++
++/* Compare two 'long double' values for unordered. */
++int
++__gcc_qunord (double a, double aa, double c, double cc)
++{
++ if (__eqdf2 (a, c) == 0)
++ return __unorddf2 (aa, cc);
++ return __unorddf2 (a, c);
++}
++
++/* Convert single to long double. */
++long double
++__gcc_stoq (float a)
++{
++ longDblUnion x;
++
++ x.dval[0] = (double) a;
++ x.dval[1] = 0.0;
++
++ return x.ldval;
++}
++
++/* Convert double to long double. */
++long double
++__gcc_dtoq (double a)
++{
++ longDblUnion x;
++
++ x.dval[0] = a;
++ x.dval[1] = 0.0;
++
++ return x.ldval;
++}
++
++/* Convert long double to single. */
++float
++__gcc_qtos (double a, double aa __attribute__ ((__unused__)))
++{
++ return (float) a;
++}
++
++/* Convert long double to double. */
++double
++__gcc_qtod (double a, double aa __attribute__ ((__unused__)))
++{
++ return a;
++}
++
++/* Convert long double to int. */
++int
++__gcc_qtoi (double a, double aa)
++{
++ double z = a + aa;
++ return (int) z;
++}
++
++/* Convert long double to unsigned int. */
++unsigned int
++__gcc_qtou (double a, double aa)
++{
++ double z = a + aa;
++ return (unsigned int) z;
++}
++
++/* Convert int to long double. */
++long double
++__gcc_itoq (int a)
++{
++ return __gcc_dtoq ((double) a);
++}
++
++/* Convert unsigned int to long double. */
++long double
++__gcc_utoq (unsigned int a)
++{
++ return __gcc_dtoq ((double) a);
++}
++
++typedef int QItype __attribute__ ((mode (QI)));
++typedef int SItype __attribute__ ((mode (SI)));
++typedef int DItype __attribute__ ((mode (DI)));
++typedef unsigned int UQItype __attribute__ ((mode (QI)));
++typedef unsigned int USItype __attribute__ ((mode (SI)));
++typedef unsigned int UDItype __attribute__ ((mode (DI)));
++
++typedef unsigned int UHWtype __attribute__ ((mode (HI)));
++extern const UQItype __clz_tab[256];
++extern void abort (void);
++typedef float DFtype __attribute__ ((mode (DF)));
++
++union _FP_UNION_D
++{
++ DFtype flt;
++ struct
++ {
++
++ unsigned sign:1;
++ unsigned exp:11;
++ unsigned frac1:53 - (((unsigned long) 1 << (53 - 1) % 32) != 0) - 32;
++ unsigned frac0:32;
++ } bits __attribute__ ((packed));
++};
++typedef float TFtype __attribute__ ((mode (TF)));
++
++union _FP_UNION_Q
++{
++ TFtype flt;
++ struct
++ {
++
++ unsigned sign:1;
++ unsigned exp:15;
++ unsigned long frac3:113 - (((unsigned long) 1 << (113 - 1) % 32) !=
++ 0) - (32 * 3);
++ unsigned long frac2:32;
++ unsigned long frac1:32;
++ unsigned long frac0:32;
++ } bits __attribute__ ((packed));
++};
++
++static double
++fmsub (double a, double b, double c)
++{
++ int _fex = 0;
++ long A_c __attribute__ ((unused)), A_s, A_e;
++ unsigned long A_f0, A_f1;
++ long B_c __attribute__ ((unused)), B_s, B_e;
++ unsigned long B_f0, B_f1;
++ long C_c __attribute__ ((unused)), C_s, C_e;
++ unsigned long C_f0, C_f1;
++ long X_c __attribute__ ((unused)), X_s, X_e;
++ unsigned long X_f[4];
++ long Y_c __attribute__ ((unused)), Y_s, Y_e;
++ unsigned long Y_f[4];
++ long Z_c __attribute__ ((unused)), Z_s, Z_e;
++ unsigned long Z_f[4];
++ long U_c __attribute__ ((unused)), U_s, U_e;
++ unsigned long U_f[4];
++ long V_c __attribute__ ((unused)), V_s, V_e;
++ unsigned long V_f[4];
++ long R_c __attribute__ ((unused)), R_s, R_e;
++ unsigned long R_f0, R_f1;
++ double r;
++ long double u, v, x, y, z;
++
++/* FP_INIT_ROUNDMODE */
++ do
++ {
++ }
++ while (0);
++
++/* FP_UNPACK_RAW_D (A, a) */
++ do
++ {
++ union _FP_UNION_D _flo;
++ _flo.flt = (a);
++ A_f0 = _flo.bits.frac0;
++ A_f1 = _flo.bits.frac1;
++ A_e = _flo.bits.exp;
++ A_s = _flo.bits.sign;
++ }
++ while (0);
++
++/* FP_UNPACK_RAW_D (B, b) */
++ do
++ {
++ union _FP_UNION_D _flo;
++ _flo.flt = (b);
++ B_f0 = _flo.bits.frac0;
++ B_f1 = _flo.bits.frac1;
++ B_e = _flo.bits.exp;
++ B_s = _flo.bits.sign;
++ }
++ while (0);
++
++/* FP_UNPACK_RAW_D (C, c) */
++ do
++ {
++ union _FP_UNION_D _flo;
++ _flo.flt = (c);
++ C_f0 = _flo.bits.frac0;
++ C_f1 = _flo.bits.frac1;
++ C_e = _flo.bits.exp;
++ C_s = _flo.bits.sign;
++ }
++ while (0);
++
++ /* Extend double to quad. */
++/* FP_EXTEND(Q,D,4,2,X,A) */
++ do
++ {
++ if (113 < 53 || (32767 - 16383 < 2047 - 1023) || 16383 < 1023 + 53 - 1)
++ abort ();
++ X_s = A_s;
++ do
++ {
++ X_f[0] = A_f0;
++ X_f[1] = A_f1;
++ X_f[2] = X_f[3] = 0;
++ }
++ while (0);
++ if ((((A_e + 1) & 2047) > 1))
++ {
++ X_e = A_e + 16383 - 1023;
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = ((113 - 53)) / 32;
++ _up = ((113 - 53)) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ X_f[_i] = X_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ X_f[_i] =
++ X_f[_i - _skip] << _up | X_f[_i - _skip - 1] >> _down;
++ X_f[_i--] = X_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ X_f[_i] = 0;
++ }
++ while (0);
++ }
++ else
++ {
++ if (A_e == 0)
++ {
++ if (((A_f1 | A_f0) == 0))
++ X_e = 0;
++ else
++ {
++ int _lz;
++ _fex |= (0);
++ do
++ {
++ if (A_f1)
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ _lz = __builtin_clz (A_f1);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ _lz = __builtin_clzl (A_f1);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ _lz = __builtin_clzll (A_f1);
++ else
++ abort ();
++ }
++ while (0);
++ else
++ {
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ _lz = __builtin_clz (A_f0);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ _lz = __builtin_clzl (A_f0);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ _lz = __builtin_clzll (A_f0);
++ else
++ abort ();
++ }
++ while (0);
++ _lz += 32;
++ }
++ }
++ while (0);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (_lz + 113 - (2 * 32)) / 32;
++ _up = (_lz + 113 - (2 * 32)) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ X_f[_i] = X_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ X_f[_i] =
++ X_f[_i - _skip] << _up | X_f[_i - _skip -
++ 1] >> _down;
++ X_f[_i--] = X_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ X_f[_i] = 0;
++ }
++ while (0);
++ X_e = (16383 - 1023 + 1 + ((2 * 32) - 53) - _lz);
++ }
++ }
++ else
++ {
++ X_e = 32767;
++ if (!((A_f1 | A_f0) == 0))
++ {
++ if (!((A_f1) & ((unsigned long) 1 << (53 - 2) % 32)))
++ _fex |= (0);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = ((113 - 53)) / 32;
++ _up = ((113 - 53)) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ X_f[_i] = X_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ X_f[_i] =
++ X_f[_i - _skip] << _up | X_f[_i - _skip -
++ 1] >> _down;
++ X_f[_i--] = X_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ X_f[_i] = 0;
++ }
++ while (0);
++ }
++ }
++ }
++ }
++ while (0);
++
++/* FP_EXTEND(Q,D,4,2,Y,B) */
++ do
++ {
++ if (113 < 53 || (32767 - 16383 < 2047 - 1023) || 16383 < 1023 + 53 - 1)
++ abort ();
++ Y_s = B_s;
++ do
++ {
++ Y_f[0] = B_f0;
++ Y_f[1] = B_f1;
++ Y_f[2] = Y_f[3] = 0;
++ }
++ while (0);
++ if ((((B_e + 1) & 2047) > 1))
++ {
++ Y_e = B_e + 16383 - 1023;
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = ((113 - 53)) / 32;
++ _up = ((113 - 53)) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ Y_f[_i] = Y_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ Y_f[_i] =
++ Y_f[_i - _skip] << _up | Y_f[_i - _skip - 1] >> _down;
++ Y_f[_i--] = Y_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ Y_f[_i] = 0;
++ }
++ while (0);
++ }
++ else
++ {
++ if (B_e == 0)
++ {
++ if (((B_f1 | B_f0) == 0))
++ Y_e = 0;
++ else
++ {
++ int _lz;
++ _fex |= (0);
++ do
++ {
++ if (B_f1)
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ _lz = __builtin_clz (B_f1);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ _lz = __builtin_clzl (B_f1);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ _lz = __builtin_clzll (B_f1);
++ else
++ abort ();
++ }
++ while (0);
++ else
++ {
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ _lz = __builtin_clz (B_f0);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ _lz = __builtin_clzl (B_f0);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ _lz = __builtin_clzll (B_f0);
++ else
++ abort ();
++ }
++ while (0);
++ _lz += 32;
++ }
++ }
++ while (0);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (_lz + 113 - (2 * 32)) / 32;
++ _up = (_lz + 113 - (2 * 32)) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ Y_f[_i] = Y_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ Y_f[_i] =
++ Y_f[_i - _skip] << _up | Y_f[_i - _skip -
++ 1] >> _down;
++ Y_f[_i--] = Y_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ Y_f[_i] = 0;
++ }
++ while (0);
++ Y_e = (16383 - 1023 + 1 + ((2 * 32) - 53) - _lz);
++ }
++ }
++ else
++ {
++ Y_e = 32767;
++ if (!((B_f1 | B_f0) == 0))
++ {
++ if (!((B_f1) & ((unsigned long) 1 << (53 - 2) % 32)))
++ _fex |= (0);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = ((113 - 53)) / 32;
++ _up = ((113 - 53)) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ Y_f[_i] = Y_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ Y_f[_i] =
++ Y_f[_i - _skip] << _up | Y_f[_i - _skip -
++ 1] >> _down;
++ Y_f[_i--] = Y_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ Y_f[_i] = 0;
++ }
++ while (0);
++ }
++ }
++ }
++ }
++ while (0);
++
++/* FP_EXTEND(Q,D,4,2,Z,C) */
++ do
++ {
++ if (113 < 53 || (32767 - 16383 < 2047 - 1023) || 16383 < 1023 + 53 - 1)
++ abort ();
++ Z_s = C_s;
++ do
++ {
++ Z_f[0] = C_f0;
++ Z_f[1] = C_f1;
++ Z_f[2] = Z_f[3] = 0;
++ }
++ while (0);
++ if ((((C_e + 1) & 2047) > 1))
++ {
++ Z_e = C_e + 16383 - 1023;
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = ((113 - 53)) / 32;
++ _up = ((113 - 53)) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ Z_f[_i] = Z_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ Z_f[_i] =
++ Z_f[_i - _skip] << _up | Z_f[_i - _skip - 1] >> _down;
++ Z_f[_i--] = Z_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ Z_f[_i] = 0;
++ }
++ while (0);
++ }
++ else
++ {
++ if (C_e == 0)
++ {
++ if (((C_f1 | C_f0) == 0))
++ Z_e = 0;
++ else
++ {
++ int _lz;
++ _fex |= (0);
++ do
++ {
++ if (C_f1)
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ _lz = __builtin_clz (C_f1);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ _lz = __builtin_clzl (C_f1);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ _lz = __builtin_clzll (C_f1);
++ else
++ abort ();
++ }
++ while (0);
++ else
++ {
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ _lz = __builtin_clz (C_f0);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ _lz = __builtin_clzl (C_f0);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ _lz = __builtin_clzll (C_f0);
++ else
++ abort ();
++ }
++ while (0);
++ _lz += 32;
++ }
++ }
++ while (0);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (_lz + 113 - (2 * 32)) / 32;
++ _up = (_lz + 113 - (2 * 32)) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ Z_f[_i] = Z_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ Z_f[_i] =
++ Z_f[_i - _skip] << _up | Z_f[_i - _skip -
++ 1] >> _down;
++ Z_f[_i--] = Z_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ Z_f[_i] = 0;
++ }
++ while (0);
++ Z_e = (16383 - 1023 + 1 + ((2 * 32) - 53) - _lz);
++ }
++ }
++ else
++ {
++ Z_e = 32767;
++ if (!((C_f1 | C_f0) == 0))
++ {
++ if (!((C_f1) & ((unsigned long) 1 << (53 - 2) % 32)))
++ _fex |= (0);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = ((113 - 53)) / 32;
++ _up = ((113 - 53)) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ Z_f[_i] = Z_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ Z_f[_i] =
++ Z_f[_i - _skip] << _up | Z_f[_i - _skip -
++ 1] >> _down;
++ Z_f[_i--] = Z_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ Z_f[_i] = 0;
++ }
++ while (0);
++ }
++ }
++ }
++ }
++ while (0);
++
++/* FP_PACK_RAW_Q(x,X) */
++ do
++ {
++ union _FP_UNION_Q _flo;
++ _flo.bits.frac0 = X_f[0];
++ _flo.bits.frac1 = X_f[1];
++ _flo.bits.frac2 = X_f[2];
++ _flo.bits.frac3 = X_f[3];
++ _flo.bits.exp = X_e;
++ _flo.bits.sign = X_s;
++ (x) = _flo.flt;
++ }
++ while (0);
++
++/* FP_PACK_RAW_Q(y,Y) */
++ do
++ {
++ union _FP_UNION_Q _flo;
++ _flo.bits.frac0 = Y_f[0];
++ _flo.bits.frac1 = Y_f[1];
++ _flo.bits.frac2 = Y_f[2];
++ _flo.bits.frac3 = Y_f[3];
++ _flo.bits.exp = Y_e;
++ _flo.bits.sign = Y_s;
++ (y) = _flo.flt;
++ }
++ while (0);
++
++/* FP_PACK_RAW_Q(z,Z) */
++ do
++ {
++ union _FP_UNION_Q _flo;
++ _flo.bits.frac0 = Z_f[0];
++ _flo.bits.frac1 = Z_f[1];
++ _flo.bits.frac2 = Z_f[2];
++ _flo.bits.frac3 = Z_f[3];
++ _flo.bits.exp = Z_e;
++ _flo.bits.sign = Z_s;
++ (z) = _flo.flt;
++ }
++ while (0);
++
++/* FP_HANDLE_EXCEPTIONS */
++ do
++ {
++ }
++ while (0);
++
++ /* Multiply. */
++/* FP_INIT_ROUNDMODE */
++ do
++ {
++ }
++ while (0);
++
++/* FP_UNPACK_Q(X,x) */
++ do
++ {
++ do
++ {
++ union _FP_UNION_Q _flo;
++ _flo.flt = (x);
++ X_f[0] = _flo.bits.frac0;
++ X_f[1] = _flo.bits.frac1;
++ X_f[2] = _flo.bits.frac2;
++ X_f[3] = _flo.bits.frac3;
++ X_e = _flo.bits.exp;
++ X_s = _flo.bits.sign;
++ }
++ while (0);
++ do
++ {
++ switch (X_e)
++ {
++ default:
++ (X_f[3]) |= ((unsigned long) 1 << (113 - 1) % 32);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (3) / 32;
++ _up = (3) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ X_f[_i] = X_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ X_f[_i] =
++ X_f[_i - _skip] << _up | X_f[_i - _skip -
++ 1] >> _down;
++ X_f[_i--] = X_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ X_f[_i] = 0;
++ }
++ while (0);
++ X_e -= 16383;
++ X_c = 0;
++ break;
++ case 0:
++ if (((X_f[0] | X_f[1] | X_f[2] | X_f[3]) == 0))
++ X_c = 1;
++ else
++ {
++ long _shift;
++ do
++ {
++ if (X_f[3])
++ {
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ _shift = __builtin_clz (X_f[3]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ _shift = __builtin_clzl (X_f[3]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ _shift = __builtin_clzll (X_f[3]);
++ else
++ abort ();
++ }
++ while (0);
++ }
++ else if (X_f[2])
++ {
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ _shift = __builtin_clz (X_f[2]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ _shift = __builtin_clzl (X_f[2]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ _shift = __builtin_clzll (X_f[2]);
++ else
++ abort ();
++ }
++ while (0);
++ _shift += 32;
++ }
++ else if (X_f[1])
++ {
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ _shift = __builtin_clz (X_f[1]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ _shift = __builtin_clzl (X_f[1]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ _shift = __builtin_clzll (X_f[1]);
++ else
++ abort ();
++ }
++ while (0);
++ _shift += 32 * 2;
++ }
++ else
++ {
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ _shift = __builtin_clz (X_f[0]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ _shift = __builtin_clzl (X_f[0]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ _shift = __builtin_clzll (X_f[0]);
++ else
++ abort ();
++ }
++ while (0);
++ _shift += 32 * 3;
++ }
++ }
++ while (0);
++ _shift -= ((4 * 32) - 113);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = ((_shift + 3)) / 32;
++ _up = ((_shift + 3)) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ X_f[_i] = X_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ X_f[_i] =
++ X_f[_i - _skip] << _up | X_f[_i - _skip -
++ 1] >> _down;
++ X_f[_i--] = X_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ X_f[_i] = 0;
++ }
++ while (0);
++ X_e -= 16383 - 1 + _shift;
++ X_c = 0;
++ _fex |= (0);
++ }
++ break;
++ case 32767:
++ if (((X_f[0] | X_f[1] | X_f[2] | X_f[3]) == 0))
++ X_c = 2;
++ else
++ {
++ X_c = 3;
++ if (!((X_f[3]) & ((unsigned long) 1 << (113 - 2) % 32)))
++ _fex |= (0);
++ } break;
++ }
++ }
++ while (0);
++ }
++ while (0);
++
++/* FP_UNPACK_Q(Y,y) */
++ do
++ {
++ do
++ {
++ union _FP_UNION_Q _flo;
++ _flo.flt = (y);
++ Y_f[0] = _flo.bits.frac0;
++ Y_f[1] = _flo.bits.frac1;
++ Y_f[2] = _flo.bits.frac2;
++ Y_f[3] = _flo.bits.frac3;
++ Y_e = _flo.bits.exp;
++ Y_s = _flo.bits.sign;
++ }
++ while (0);
++ do
++ {
++ switch (Y_e)
++ {
++ default:
++ (Y_f[3]) |= ((unsigned long) 1 << (113 - 1) % 32);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (3) / 32;
++ _up = (3) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ Y_f[_i] = Y_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ Y_f[_i] =
++ Y_f[_i - _skip] << _up | Y_f[_i - _skip -
++ 1] >> _down;
++ Y_f[_i--] = Y_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ Y_f[_i] = 0;
++ }
++ while (0);
++ Y_e -= 16383;
++ Y_c = 0;
++ break;
++ case 0:
++ if (((Y_f[0] | Y_f[1] | Y_f[2] | Y_f[3]) == 0))
++ Y_c = 1;
++ else
++ {
++ long _shift;
++ do
++ {
++ if (Y_f[3])
++ {
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ _shift = __builtin_clz (Y_f[3]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ _shift = __builtin_clzl (Y_f[3]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ _shift = __builtin_clzll (Y_f[3]);
++ else
++ abort ();
++ }
++ while (0);
++ }
++ else if (Y_f[2])
++ {
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ _shift = __builtin_clz (Y_f[2]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ _shift = __builtin_clzl (Y_f[2]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ _shift = __builtin_clzll (Y_f[2]);
++ else
++ abort ();
++ }
++ while (0);
++ _shift += 32;
++ }
++ else if (Y_f[1])
++ {
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ _shift = __builtin_clz (Y_f[1]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ _shift = __builtin_clzl (Y_f[1]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ _shift = __builtin_clzll (Y_f[1]);
++ else
++ abort ();
++ }
++ while (0);
++ _shift += 32 * 2;
++ }
++ else
++ {
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ _shift = __builtin_clz (Y_f[0]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ _shift = __builtin_clzl (Y_f[0]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ _shift = __builtin_clzll (Y_f[0]);
++ else
++ abort ();
++ }
++ while (0);
++ _shift += 32 * 3;
++ }
++ }
++ while (0);
++ _shift -= ((4 * 32) - 113);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = ((_shift + 3)) / 32;
++ _up = ((_shift + 3)) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ Y_f[_i] = Y_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ Y_f[_i] =
++ Y_f[_i - _skip] << _up | Y_f[_i - _skip -
++ 1] >> _down;
++ Y_f[_i--] = Y_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ Y_f[_i] = 0;
++ }
++ while (0);
++ Y_e -= 16383 - 1 + _shift;
++ Y_c = 0;
++ _fex |= (0);
++ }
++ break;
++ case 32767:
++ if (((Y_f[0] | Y_f[1] | Y_f[2] | Y_f[3]) == 0))
++ Y_c = 2;
++ else
++ {
++ Y_c = 3;
++ if (!((Y_f[3]) & ((unsigned long) 1 << (113 - 2) % 32)))
++ _fex |= (0);
++ } break;
++ }
++ }
++ while (0);
++ }
++ while (0);
++
++/* FP_MUL_Q(U,X,Y) */
++ do
++ {
++ U_s = X_s ^ Y_s;
++ switch ((((X_c) << 2) | (Y_c)))
++ {
++ case (((0) << 2) | (0)):
++ U_c = 0;
++ U_e = X_e + Y_e + 1;
++ do
++ {
++ unsigned long _z_f[8];
++ unsigned long _b_f0, _b_f1;
++ unsigned long _c_f0, _c_f1;
++ unsigned long _d_f0, _d_f1;
++ unsigned long _e_f0, _e_f1;
++ unsigned long _f_f0, _f_f1;
++ do
++ {
++ USItype __m0 = (X_f[0]), __m1 = (Y_f[0]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" ((_z_f[1])):"%r" (X_f[0]),
++ "r" (Y_f
++ [0]));
++ ((_z_f[0])) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ USItype __m0 = (X_f[0]), __m1 = (Y_f[1]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" (_b_f1):"%r" (X_f[0]),
++ "r" (Y_f
++ [1]));
++ (_b_f0) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ USItype __m0 = (X_f[1]), __m1 = (Y_f[0]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" (_c_f1):"%r" (X_f[1]),
++ "r" (Y_f
++ [0]));
++ (_c_f0) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ USItype __m0 = (X_f[1]), __m1 = (Y_f[1]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" (_d_f1):"%r" (X_f[1]),
++ "r" (Y_f
++ [1]));
++ (_d_f0) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ USItype __m0 = (X_f[0]), __m1 = (Y_f[2]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" (_e_f1):"%r" (X_f[0]),
++ "r" (Y_f
++ [2]));
++ (_e_f0) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ USItype __m0 = (X_f[2]), __m1 = (Y_f[0]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" (_f_f1):"%r" (X_f[2]),
++ "r" (Y_f
++ [0]));
++ (_f_f0) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ unsigned long _c1, _c2;
++ (_z_f[1]) = _b_f0 + (_z_f[1]);
++ _c1 = (_z_f[1]) < _b_f0;
++ (_z_f[2]) = _b_f1 + 0;
++ _c2 = (_z_f[2]) < _b_f1;
++ (_z_f[2]) += _c1;
++ _c2 |= (_z_f[2]) < _c1;
++ (_z_f[3]) = 0 + 0 + _c2;
++ }
++ while (0);
++ do
++ {
++ unsigned long _c1, _c2;
++ (_z_f[1]) = _c_f0 + (_z_f[1]);
++ _c1 = (_z_f[1]) < _c_f0;
++ (_z_f[2]) = _c_f1 + (_z_f[2]);
++ _c2 = (_z_f[2]) < _c_f1;
++ (_z_f[2]) += _c1;
++ _c2 |= (_z_f[2]) < _c1;
++ (_z_f[3]) = 0 + (_z_f[3]) + _c2;
++ }
++ while (0);
++ do
++ {
++ unsigned long _c1, _c2;
++ (_z_f[2]) = _d_f0 + (_z_f[2]);
++ _c1 = (_z_f[2]) < _d_f0;
++ (_z_f[3]) = _d_f1 + (_z_f[3]);
++ _c2 = (_z_f[3]) < _d_f1;
++ (_z_f[3]) += _c1;
++ _c2 |= (_z_f[3]) < _c1;
++ (_z_f[4]) = 0 + 0 + _c2;
++ }
++ while (0);
++ do
++ {
++ unsigned long _c1, _c2;
++ (_z_f[2]) = _e_f0 + (_z_f[2]);
++ _c1 = (_z_f[2]) < _e_f0;
++ (_z_f[3]) = _e_f1 + (_z_f[3]);
++ _c2 = (_z_f[3]) < _e_f1;
++ (_z_f[3]) += _c1;
++ _c2 |= (_z_f[3]) < _c1;
++ (_z_f[4]) = 0 + (_z_f[4]) + _c2;
++ }
++ while (0);
++ do
++ {
++ unsigned long _c1, _c2;
++ (_z_f[2]) = _f_f0 + (_z_f[2]);
++ _c1 = (_z_f[2]) < _f_f0;
++ (_z_f[3]) = _f_f1 + (_z_f[3]);
++ _c2 = (_z_f[3]) < _f_f1;
++ (_z_f[3]) += _c1;
++ _c2 |= (_z_f[3]) < _c1;
++ (_z_f[4]) = 0 + (_z_f[4]) + _c2;
++ }
++ while (0);
++ do
++ {
++ USItype __m0 = (X_f[0]), __m1 = (Y_f[3]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" (_b_f1):"%r" (X_f[0]),
++ "r" (Y_f
++ [3]));
++ (_b_f0) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ USItype __m0 = (X_f[3]), __m1 = (Y_f[0]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" (_c_f1):"%r" (X_f[3]),
++ "r" (Y_f
++ [0]));
++ (_c_f0) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ USItype __m0 = (X_f[1]), __m1 = (Y_f[2]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" (_d_f1):"%r" (X_f[1]),
++ "r" (Y_f
++ [2]));
++ (_d_f0) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ USItype __m0 = (X_f[2]), __m1 = (Y_f[1]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" (_e_f1):"%r" (X_f[2]),
++ "r" (Y_f
++ [1]));
++ (_e_f0) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ unsigned long _c1, _c2;
++ (_z_f[3]) = _b_f0 + (_z_f[3]);
++ _c1 = (_z_f[3]) < _b_f0;
++ (_z_f[4]) = _b_f1 + (_z_f[4]);
++ _c2 = (_z_f[4]) < _b_f1;
++ (_z_f[4]) += _c1;
++ _c2 |= (_z_f[4]) < _c1;
++ (_z_f[5]) = 0 + 0 + _c2;
++ }
++ while (0);
++ do
++ {
++ unsigned long _c1, _c2;
++ (_z_f[3]) = _c_f0 + (_z_f[3]);
++ _c1 = (_z_f[3]) < _c_f0;
++ (_z_f[4]) = _c_f1 + (_z_f[4]);
++ _c2 = (_z_f[4]) < _c_f1;
++ (_z_f[4]) += _c1;
++ _c2 |= (_z_f[4]) < _c1;
++ (_z_f[5]) = 0 + (_z_f[5]) + _c2;
++ }
++ while (0);
++ do
++ {
++ unsigned long _c1, _c2;
++ (_z_f[3]) = _d_f0 + (_z_f[3]);
++ _c1 = (_z_f[3]) < _d_f0;
++ (_z_f[4]) = _d_f1 + (_z_f[4]);
++ _c2 = (_z_f[4]) < _d_f1;
++ (_z_f[4]) += _c1;
++ _c2 |= (_z_f[4]) < _c1;
++ (_z_f[5]) = 0 + (_z_f[5]) + _c2;
++ }
++ while (0);
++ do
++ {
++ unsigned long _c1, _c2;
++ (_z_f[3]) = _e_f0 + (_z_f[3]);
++ _c1 = (_z_f[3]) < _e_f0;
++ (_z_f[4]) = _e_f1 + (_z_f[4]);
++ _c2 = (_z_f[4]) < _e_f1;
++ (_z_f[4]) += _c1;
++ _c2 |= (_z_f[4]) < _c1;
++ (_z_f[5]) = 0 + (_z_f[5]) + _c2;
++ }
++ while (0);
++ do
++ {
++ USItype __m0 = (X_f[2]), __m1 = (Y_f[2]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" (_b_f1):"%r" (X_f[2]),
++ "r" (Y_f
++ [2]));
++ (_b_f0) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ USItype __m0 = (X_f[1]), __m1 = (Y_f[3]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" (_c_f1):"%r" (X_f[1]),
++ "r" (Y_f
++ [3]));
++ (_c_f0) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ USItype __m0 = (X_f[3]), __m1 = (Y_f[1]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" (_d_f1):"%r" (X_f[3]),
++ "r" (Y_f
++ [1]));
++ (_d_f0) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ USItype __m0 = (X_f[2]), __m1 = (Y_f[3]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" (_e_f1):"%r" (X_f[2]),
++ "r" (Y_f
++ [3]));
++ (_e_f0) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ USItype __m0 = (X_f[3]), __m1 = (Y_f[2]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" (_f_f1):"%r" (X_f[3]),
++ "r" (Y_f
++ [2]));
++ (_f_f0) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ unsigned long _c1, _c2;
++ (_z_f[4]) = _b_f0 + (_z_f[4]);
++ _c1 = (_z_f[4]) < _b_f0;
++ (_z_f[5]) = _b_f1 + (_z_f[5]);
++ _c2 = (_z_f[5]) < _b_f1;
++ (_z_f[5]) += _c1;
++ _c2 |= (_z_f[5]) < _c1;
++ (_z_f[6]) = 0 + 0 + _c2;
++ }
++ while (0);
++ do
++ {
++ unsigned long _c1, _c2;
++ (_z_f[4]) = _c_f0 + (_z_f[4]);
++ _c1 = (_z_f[4]) < _c_f0;
++ (_z_f[5]) = _c_f1 + (_z_f[5]);
++ _c2 = (_z_f[5]) < _c_f1;
++ (_z_f[5]) += _c1;
++ _c2 |= (_z_f[5]) < _c1;
++ (_z_f[6]) = 0 + (_z_f[6]) + _c2;
++ }
++ while (0);
++ do
++ {
++ unsigned long _c1, _c2;
++ (_z_f[4]) = _d_f0 + (_z_f[4]);
++ _c1 = (_z_f[4]) < _d_f0;
++ (_z_f[5]) = _d_f1 + (_z_f[5]);
++ _c2 = (_z_f[5]) < _d_f1;
++ (_z_f[5]) += _c1;
++ _c2 |= (_z_f[5]) < _c1;
++ (_z_f[6]) = 0 + (_z_f[6]) + _c2;
++ }
++ while (0);
++ do
++ {
++ unsigned long _c1, _c2;
++ (_z_f[5]) = _e_f0 + (_z_f[5]);
++ _c1 = (_z_f[5]) < _e_f0;
++ (_z_f[6]) = _e_f1 + (_z_f[6]);
++ _c2 = (_z_f[6]) < _e_f1;
++ (_z_f[6]) += _c1;
++ _c2 |= (_z_f[6]) < _c1;
++ (_z_f[7]) = 0 + 0 + _c2;
++ }
++ while (0);
++ do
++ {
++ unsigned long _c1, _c2;
++ (_z_f[5]) = _f_f0 + (_z_f[5]);
++ _c1 = (_z_f[5]) < _f_f0;
++ (_z_f[6]) = _f_f1 + (_z_f[6]);
++ _c2 = (_z_f[6]) < _f_f1;
++ (_z_f[6]) += _c1;
++ _c2 |= (_z_f[6]) < _c1;
++ (_z_f[7]) = 0 + (_z_f[7]) + _c2;
++ }
++ while (0);
++ do
++ {
++ USItype __m0 = (X_f[3]), __m1 = (Y_f[3]);
++ __asm__ ("mulhwu %0,%1,%2": "=r" (_b_f1):"%r" (X_f[3]),
++ "r" (Y_f
++ [3]));
++ (_b_f0) = __m0 * __m1;
++ }
++ while (0);
++ do
++ {
++ if (__builtin_constant_p ((_z_f[7])) && ((_z_f[7])) == 0)
++ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2": "=r" ((_z_f[7])), "=&r" ((_z_f[6])):"r" (_b_f1), "%r" (_b_f0),
++ "rI" ((_z_f
++ [6])));
++ else if (__builtin_constant_p ((_z_f[7]))
++ && ((_z_f[7])) == ~(USItype) 0)
++ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2": "=r" ((_z_f[7])), "=&r" ((_z_f[6])):"r" (_b_f1), "%r" (_b_f0),
++ "rI" ((_z_f
++ [6])));
++ else
++ __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3": "=r" ((_z_f[7])), "=&r" ((_z_f[6])):"%r" (_b_f1), "r" ((_z_f[7])), "%r" (_b_f0),
++ "rI" ((_z_f
++ [6])));
++ }
++ while (0);
++ do
++ {
++ long _up, _down, _skip, _i;
++ unsigned long _s;
++ _skip = ((3 + 113) - 1) / 32;
++ _down = ((3 + 113) - 1) % 32;
++ _up = 32 - _down;
++ for (_s = _i = 0; _i < _skip; ++_i)
++ _s |= _z_f[_i];
++ if (!_down)
++ for (_i = 0; _i <= 7 - _skip; ++_i)
++ _z_f[_i] = _z_f[_i + _skip];
++ else
++ {
++ _s |= _z_f[_i] << _up;
++ for (_i = 0; _i < 7 - _skip; ++_i)
++ _z_f[_i] =
++ _z_f[_i + _skip] >> _down | _z_f[_i + _skip +
++ 1] << _up;
++ _z_f[_i++] = _z_f[7] >> _down;
++ }
++ for (; _i < 8; ++_i)
++ _z_f[_i] = 0;
++ _z_f[0] |= (_s != 0);
++ }
++ while (0);
++ (U_f[3] = (_z_f[3]), U_f[2] = (_z_f[2]), U_f[1] =
++ (_z_f[1]), U_f[0] = (_z_f[0]));
++ }
++ while (0);
++ if (((U_f[3]) & ((unsigned long) 1 << ((3 + 113) % 32))))
++ do
++ {
++ int _sticky;
++ do
++ {
++ long _up, _down, _skip, _i;
++ unsigned long _s;
++ _skip = (1) / 32;
++ _down = (1) % 32;
++ _up = 32 - _down;
++ for (_s = _i = 0; _i < _skip; ++_i)
++ _s |= U_f[_i];
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ U_f[_i] = U_f[_i + _skip];
++ else
++ {
++ _s |= U_f[_i] << _up;
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ U_f[_i] =
++ U_f[_i + _skip] >> _down | U_f[_i + _skip +
++ 1] << _up;
++ U_f[_i++] = U_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ U_f[_i] = 0;
++ _sticky = (_s != 0);
++ }
++ while (0);
++ U_f[0] |= _sticky;
++ }
++ while (0);
++ else
++ U_e--;
++ break;
++ case (((3) << 2) | (3)):
++ do
++ {
++ if (((X_f[3]) & ((unsigned long) 1 << (113 - 2) % 32))
++ && !((Y_f[3]) & ((unsigned long) 1 << (113 - 2) % 32)))
++ {
++ U_s = Y_s;
++ (U_f[0] = Y_f[0], U_f[1] = Y_f[1], U_f[2] = Y_f[2], U_f[3] =
++ Y_f[3]);
++ }
++ else
++ {
++ U_s = X_s;
++ (U_f[0] = X_f[0], U_f[1] = X_f[1], U_f[2] = X_f[2], U_f[3] =
++ X_f[3]);
++ }
++ U_c = 3;
++ }
++ while (0);
++ break;
++ case (((3) << 2) | (0)):
++ case (((3) << 2) | (2)):
++ case (((3) << 2) | (1)):
++ U_s = X_s;
++ case (((2) << 2) | (2)):
++ case (((2) << 2) | (0)):
++ case (((1) << 2) | (0)):
++ case (((1) << 2) | (1)):
++ (U_f[0] = X_f[0], U_f[1] = X_f[1], U_f[2] = X_f[2], U_f[3] =
++ X_f[3]);
++ U_c = X_c;
++ break;
++ case (((0) << 2) | (3)):
++ case (((2) << 2) | (3)):
++ case (((1) << 2) | (3)):
++ U_s = Y_s;
++ case (((0) << 2) | (2)):
++ case (((0) << 2) | (1)):
++ (U_f[0] = Y_f[0], U_f[1] = Y_f[1], U_f[2] = Y_f[2], U_f[3] =
++ Y_f[3]);
++ U_c = Y_c;
++ break;
++ case (((2) << 2) | (1)):
++ case (((1) << 2) | (2)):
++ U_s = 0;
++ U_c = 3;
++ (U_f[3] =
++ ((((unsigned long) 1 << (113 - 2) % 32) << 1) - 1), U_f[2] =
++ -1, U_f[1] = -1, U_f[0] = -1);
++ _fex |= (0);
++ break;
++ default:
++ abort ();
++ }
++ }
++ while (0);
++
++/* FP_PACK_Q(u,U) */
++ do
++ {
++ do
++ {
++ switch (U_c)
++ {
++ case 0:
++ U_e += 16383;
++ if (U_e > 0)
++ {
++ do
++ {
++ if ((U_f[0]) & 7)
++ _fex |= (0);
++ switch (0)
++ {
++ case 0:
++ do
++ {
++ if (((U_f[0]) & 15) != ((unsigned long) 1 << 2))
++ do
++ {
++ unsigned long _t;
++ _t =
++ ((U_f[0] +=
++ ((unsigned long) 1 << 2)) <
++ ((unsigned long) 1 << 2));
++ U_f[1] += _t;
++ _t = (U_f[1] < _t);
++ U_f[2] += _t;
++ _t = (U_f[2] < _t);
++ U_f[3] += _t;
++ }
++ while (0);
++ }
++ while (0);
++ break;
++ case 1:
++ (void) 0;
++ break;
++ case 2:
++ do
++ {
++ if (!U_s && ((U_f[0]) & 7))
++ do
++ {
++ unsigned long _t;
++ _t =
++ ((U_f[0] +=
++ ((unsigned long) 1 << 3)) <
++ ((unsigned long) 1 << 3));
++ U_f[1] += _t;
++ _t = (U_f[1] < _t);
++ U_f[2] += _t;
++ _t = (U_f[2] < _t);
++ U_f[3] += _t;
++ }
++ while (0);
++ }
++ while (0);
++ break;
++ case 3:
++ do
++ {
++ if (U_s && ((U_f[0]) & 7))
++ do
++ {
++ unsigned long _t;
++ _t =
++ ((U_f[0] +=
++ ((unsigned long) 1 << 3)) <
++ ((unsigned long) 1 << 3));
++ U_f[1] += _t;
++ _t = (U_f[1] < _t);
++ U_f[2] += _t;
++ _t = (U_f[2] < _t);
++ U_f[3] += _t;
++ }
++ while (0);
++ }
++ while (0);
++ break;
++ }
++ }
++ while (0);
++ if (((U_f[3]) & ((unsigned long) 1 << ((3 + 113) % 32))))
++ {
++ ((U_f[3]) &= ~((unsigned long) 1 << ((3 + 113) % 32)));
++ U_e++;
++ }
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (3) / 32;
++ _down = (3) % 32;
++ _up = 32 - _down;
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ U_f[_i] = U_f[_i + _skip];
++ else
++ {
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ U_f[_i] =
++ U_f[_i + _skip] >> _down | U_f[_i + _skip +
++ 1] << _up;
++ U_f[_i++] = U_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ U_f[_i] = 0;
++ }
++ while (0);
++ if (U_e >= 32767)
++ {
++ switch (0)
++ {
++ case 0:
++ U_c = 2;
++ break;
++ case 2:
++ if (!U_s)
++ U_c = 2;
++ break;
++ case 3:
++ if (U_s)
++ U_c = 2;
++ break;
++ }
++ if (U_c == 2)
++ {
++ U_e = 32767;
++ (U_f[3] = 0, U_f[2] = 0, U_f[1] = 0, U_f[0] = 0);
++ }
++ else
++ {
++ U_e = 32767 - 1;
++ (U_f[3] = (~(signed long) 0), U_f[2] =
++ (~(signed long) 0), U_f[1] =
++ (~(signed long) 0), U_f[0] = (~(signed long) 0));
++ } _fex |= (0);
++ _fex |= (0);
++ }
++ }
++ else
++ {
++ U_e = -U_e + 1;
++ if (U_e <= (3 + 113))
++ {
++ do
++ {
++ int _sticky;
++ do
++ {
++ long _up, _down, _skip, _i;
++ unsigned long _s;
++ _skip = (U_e) / 32;
++ _down = (U_e) % 32;
++ _up = 32 - _down;
++ for (_s = _i = 0; _i < _skip; ++_i)
++ _s |= U_f[_i];
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ U_f[_i] = U_f[_i + _skip];
++ else
++ {
++ _s |= U_f[_i] << _up;
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ U_f[_i] =
++ U_f[_i + _skip] >> _down | U_f[_i +
++ _skip +
++ 1] <<
++ _up;
++ U_f[_i++] = U_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ U_f[_i] = 0;
++ _sticky = (_s != 0);
++ }
++ while (0);
++ U_f[0] |= _sticky;
++ }
++ while (0);
++ do
++ {
++ if ((U_f[0]) & 7)
++ _fex |= (0);
++ switch (0)
++ {
++ case 0:
++ do
++ {
++ if (((U_f[0]) & 15) !=
++ ((unsigned long) 1 << 2))
++ do
++ {
++ unsigned long _t;
++ _t =
++ ((U_f[0] +=
++ ((unsigned long) 1 << 2)) <
++ ((unsigned long) 1 << 2));
++ U_f[1] += _t;
++ _t = (U_f[1] < _t);
++ U_f[2] += _t;
++ _t = (U_f[2] < _t);
++ U_f[3] += _t;
++ }
++ while (0);
++ }
++ while (0);
++ break;
++ case 1:
++ (void) 0;
++ break;
++ case 2:
++ do
++ {
++ if (!U_s && ((U_f[0]) & 7))
++ do
++ {
++ unsigned long _t;
++ _t =
++ ((U_f[0] +=
++ ((unsigned long) 1 << 3)) <
++ ((unsigned long) 1 << 3));
++ U_f[1] += _t;
++ _t = (U_f[1] < _t);
++ U_f[2] += _t;
++ _t = (U_f[2] < _t);
++ U_f[3] += _t;
++ }
++ while (0);
++ }
++ while (0);
++ break;
++ case 3:
++ do
++ {
++ if (U_s && ((U_f[0]) & 7))
++ do
++ {
++ unsigned long _t;
++ _t =
++ ((U_f[0] +=
++ ((unsigned long) 1 << 3)) <
++ ((unsigned long) 1 << 3));
++ U_f[1] += _t;
++ _t = (U_f[1] < _t);
++ U_f[2] += _t;
++ _t = (U_f[2] < _t);
++ U_f[3] += _t;
++ }
++ while (0);
++ }
++ while (0);
++ break;
++ }
++ }
++ while (0);
++ if ((U_f[3]) &
++ (((unsigned long) 1 << ((3 + 113) % 32)) >> 1))
++ {
++ U_e = 1;
++ (U_f[3] = 0, U_f[2] = 0, U_f[1] = 0, U_f[0] = 0);
++ }
++ else
++ {
++ U_e = 0;
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (3) / 32;
++ _down = (3) % 32;
++ _up = 32 - _down;
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ U_f[_i] = U_f[_i + _skip];
++ else
++ {
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ U_f[_i] =
++ U_f[_i + _skip] >> _down | U_f[_i +
++ _skip +
++ 1] <<
++ _up;
++ U_f[_i++] = U_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ U_f[_i] = 0;
++ }
++ while (0);
++ _fex |= (0);
++ }
++ }
++ else
++ {
++ U_e = 0;
++ if (!((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0))
++ {
++ (U_f[3] = 0, U_f[2] = 0, U_f[1] = 0, U_f[0] = 1);
++ do
++ {
++ if ((U_f[0]) & 7)
++ _fex |= (0);
++ switch (0)
++ {
++ case 0:
++ do
++ {
++ if (((U_f[0]) & 15) !=
++ ((unsigned long) 1 << 2))
++ do
++ {
++ unsigned long _t;
++ _t =
++ ((U_f[0] +=
++ ((unsigned long) 1 << 2)) <
++ ((unsigned long) 1 << 2));
++ U_f[1] += _t;
++ _t = (U_f[1] < _t);
++ U_f[2] += _t;
++ _t = (U_f[2] < _t);
++ U_f[3] += _t;
++ }
++ while (0);
++ }
++ while (0);
++ break;
++ case 1:
++ (void) 0;
++ break;
++ case 2:
++ do
++ {
++ if (!U_s && ((U_f[0]) & 7))
++ do
++ {
++ unsigned long _t;
++ _t =
++ ((U_f[0] +=
++ ((unsigned long) 1 << 3)) <
++ ((unsigned long) 1 << 3));
++ U_f[1] += _t;
++ _t = (U_f[1] < _t);
++ U_f[2] += _t;
++ _t = (U_f[2] < _t);
++ U_f[3] += _t;
++ }
++ while (0);
++ }
++ while (0);
++ break;
++ case 3:
++ do
++ {
++ if (U_s && ((U_f[0]) & 7))
++ do
++ {
++ unsigned long _t;
++ _t =
++ ((U_f[0] +=
++ ((unsigned long) 1 << 3)) <
++ ((unsigned long) 1 << 3));
++ U_f[1] += _t;
++ _t = (U_f[1] < _t);
++ U_f[2] += _t;
++ _t = (U_f[2] < _t);
++ U_f[3] += _t;
++ }
++ while (0);
++ }
++ while (0);
++ break;
++ }
++ }
++ while (0);
++ (U_f[0]) >>= (3);
++ }
++ _fex |= (0);
++ }
++ }
++ break;
++ case 1:
++ U_e = 0;
++ (U_f[3] = 0, U_f[2] = 0, U_f[1] = 0, U_f[0] = 0);
++ break;
++ case 2:
++ U_e = 32767;
++ (U_f[3] = 0, U_f[2] = 0, U_f[1] = 0, U_f[0] = 0);
++ break;
++ case 3:
++ U_e = 32767;
++ if (!1)
++ {
++ (U_f[3] =
++ ((((unsigned long) 1 << (113 - 2) % 32) << 1) - 1),
++ U_f[2] = -1, U_f[1] = -1, U_f[0] = -1);
++ U_s = 0;
++ }
++ else
++ (U_f[3]) |= ((unsigned long) 1 << (113 - 2) % 32);
++ break;
++ }
++ }
++ while (0);
++ do
++ {
++ union _FP_UNION_Q _flo;
++ _flo.bits.frac0 = U_f[0];
++ _flo.bits.frac1 = U_f[1];
++ _flo.bits.frac2 = U_f[2];
++ _flo.bits.frac3 = U_f[3];
++ _flo.bits.exp = U_e;
++ _flo.bits.sign = U_s;
++ (u) = _flo.flt;
++ }
++ while (0);
++ }
++ while (0);
++
++/* FP_HANDLE_EXCEPTIONS */
++ do
++ {
++ }
++ while (0);
++
++ /* Subtract. */
++/* FP_INIT_ROUNDMODE */
++ do
++ {
++ }
++ while (0);
++
++/* FP_UNPACK_SEMIRAW_Q(U,u) */
++ do
++ {
++ do
++ {
++ union _FP_UNION_Q _flo;
++ _flo.flt = (u);
++ U_f[0] = _flo.bits.frac0;
++ U_f[1] = _flo.bits.frac1;
++ U_f[2] = _flo.bits.frac2;
++ U_f[3] = _flo.bits.frac3;
++ U_e = _flo.bits.exp;
++ U_s = _flo.bits.sign;
++ }
++ while (0);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (3) / 32;
++ _up = (3) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ U_f[_i] = U_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ U_f[_i] =
++ U_f[_i - _skip] << _up | U_f[_i - _skip - 1] >> _down;
++ U_f[_i--] = U_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ U_f[_i] = 0;
++ }
++ while (0);
++ }
++ while (0);
++
++/* FP_UNPACK_SEMIRAW_Q(Z,z) */
++ do
++ {
++ do
++ {
++ union _FP_UNION_Q _flo;
++ _flo.flt = (z);
++ Z_f[0] = _flo.bits.frac0;
++ Z_f[1] = _flo.bits.frac1;
++ Z_f[2] = _flo.bits.frac2;
++ Z_f[3] = _flo.bits.frac3;
++ Z_e = _flo.bits.exp;
++ Z_s = _flo.bits.sign;
++ }
++ while (0);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (3) / 32;
++ _up = (3) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ Z_f[_i] = Z_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ Z_f[_i] =
++ Z_f[_i - _skip] << _up | Z_f[_i - _skip - 1] >> _down;
++ Z_f[_i--] = Z_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ Z_f[_i] = 0;
++ }
++ while (0);
++ }
++ while (0);
++
++/* FP_SUB_Q(V,U,Z) */
++ do
++ {
++ if (!(Z_e == 32767 && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0)))
++ Z_s ^= 1;
++ do
++ {
++ if (U_s == Z_s)
++ {
++ V_s = U_s;
++ int ediff = U_e - Z_e;
++ if (ediff > 0)
++ {
++ V_e = U_e;
++ if (Z_e == 0)
++ {
++ if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0))
++ {
++ do
++ {
++ if (U_e == 32767
++ && !((U_f[0] | U_f[1] | U_f[2] | U_f[3]) ==
++ 0)
++ && !((U_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3) %
++ 32)))
++ _fex |= (0);
++ }
++ while (0);
++ (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] =
++ U_f[2], V_f[3] = U_f[3]);
++ goto add_done;
++ }
++ else
++ {
++ _fex |= (0);
++ ediff--;
++ if (ediff == 0)
++ {
++ do
++ {
++ unsigned long _c1, _c2, _c3;
++ V_f[0] = U_f[0] + Z_f[0];
++ _c1 = V_f[0] < U_f[0];
++ V_f[1] = U_f[1] + Z_f[1];
++ _c2 = V_f[1] < U_f[1];
++ V_f[1] += _c1;
++ _c2 |= V_f[1] < _c1;
++ V_f[2] = U_f[2] + Z_f[2];
++ _c3 = V_f[2] < U_f[2];
++ V_f[2] += _c2;
++ _c3 |= V_f[2] < _c2;
++ V_f[3] = U_f[3] + Z_f[3] + _c3;
++ }
++ while (0);
++ goto add3;
++ }
++ if (U_e == 32767)
++ {
++ do
++ {
++ if (U_e == 32767
++ && !((U_f[0] | U_f[1] | U_f[2] | U_f[3])
++ == 0)
++ && !((U_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3)
++ % 32)))
++ _fex |= (0);
++ }
++ while (0);
++ (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] =
++ U_f[2], V_f[3] = U_f[3]);
++ goto add_done;
++ }
++ goto add1;
++ }
++ }
++ else if (U_e == 32767)
++ {
++ do
++ {
++ if (U_e == 32767
++ && !((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0)
++ && !((U_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3) % 32)))
++ _fex |= (0);
++ }
++ while (0);
++ (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] =
++ U_f[2], V_f[3] = U_f[3]);
++ goto add_done;
++ }
++ (Z_f[3]) |= ((unsigned long) 1 << (113 - 1 + 3) % 32);
++ add1:if (ediff <= (3 + 113))
++ do
++ {
++ int _sticky;
++ do
++ {
++ long _up, _down, _skip, _i;
++ unsigned long _s;
++ _skip = (ediff) / 32;
++ _down = (ediff) % 32;
++ _up = 32 - _down;
++ for (_s = _i = 0; _i < _skip; ++_i)
++ _s |= Z_f[_i];
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ Z_f[_i] = Z_f[_i + _skip];
++ else
++ {
++ _s |= Z_f[_i] << _up;
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ Z_f[_i] =
++ Z_f[_i + _skip] >> _down | Z_f[_i +
++ _skip +
++ 1] << _up;
++ Z_f[_i++] = Z_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ Z_f[_i] = 0;
++ _sticky = (_s != 0);
++ }
++ while (0);
++ Z_f[0] |= _sticky;
++ }
++ while (0);
++ else if (!((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0))
++ (Z_f[3] = 0, Z_f[2] = 0, Z_f[1] = 0, Z_f[0] = 1);
++ do
++ {
++ unsigned long _c1, _c2, _c3;
++ V_f[0] = U_f[0] + Z_f[0];
++ _c1 = V_f[0] < U_f[0];
++ V_f[1] = U_f[1] + Z_f[1];
++ _c2 = V_f[1] < U_f[1];
++ V_f[1] += _c1;
++ _c2 |= V_f[1] < _c1;
++ V_f[2] = U_f[2] + Z_f[2];
++ _c3 = V_f[2] < U_f[2];
++ V_f[2] += _c2;
++ _c3 |= V_f[2] < _c2;
++ V_f[3] = U_f[3] + Z_f[3] + _c3;
++ }
++ while (0);
++ }
++ else if (ediff < 0)
++ {
++ ediff = -ediff;
++ V_e = Z_e;
++ if (U_e == 0)
++ {
++ if (((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0))
++ {
++ do
++ {
++ if (Z_e == 32767
++ && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) ==
++ 0)
++ && !((Z_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3) %
++ 32)))
++ _fex |= (0);
++ }
++ while (0);
++ (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] =
++ Z_f[2], V_f[3] = Z_f[3]);
++ goto add_done;
++ }
++ else
++ {
++ _fex |= (0);
++ ediff--;
++ if (ediff == 0)
++ {
++ do
++ {
++ unsigned long _c1, _c2, _c3;
++ V_f[0] = Z_f[0] + U_f[0];
++ _c1 = V_f[0] < Z_f[0];
++ V_f[1] = Z_f[1] + U_f[1];
++ _c2 = V_f[1] < Z_f[1];
++ V_f[1] += _c1;
++ _c2 |= V_f[1] < _c1;
++ V_f[2] = Z_f[2] + U_f[2];
++ _c3 = V_f[2] < Z_f[2];
++ V_f[2] += _c2;
++ _c3 |= V_f[2] < _c2;
++ V_f[3] = Z_f[3] + U_f[3] + _c3;
++ }
++ while (0);
++ goto add3;
++ }
++ if (Z_e == 32767)
++ {
++ do
++ {
++ if (Z_e == 32767
++ && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3])
++ == 0)
++ && !((Z_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3)
++ % 32)))
++ _fex |= (0);
++ }
++ while (0);
++ (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] =
++ Z_f[2], V_f[3] = Z_f[3]);
++ goto add_done;
++ }
++ goto add2;
++ }
++ }
++ else if (Z_e == 32767)
++ {
++ do
++ {
++ if (Z_e == 32767
++ && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0)
++ && !((Z_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3) % 32)))
++ _fex |= (0);
++ }
++ while (0);
++ (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] =
++ Z_f[2], V_f[3] = Z_f[3]);
++ goto add_done;
++ }
++ (U_f[3]) |= ((unsigned long) 1 << (113 - 1 + 3) % 32);
++ add2:if (ediff <= (3 + 113))
++ do
++ {
++ int _sticky;
++ do
++ {
++ long _up, _down, _skip, _i;
++ unsigned long _s;
++ _skip = (ediff) / 32;
++ _down = (ediff) % 32;
++ _up = 32 - _down;
++ for (_s = _i = 0; _i < _skip; ++_i)
++ _s |= U_f[_i];
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ U_f[_i] = U_f[_i + _skip];
++ else
++ {
++ _s |= U_f[_i] << _up;
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ U_f[_i] =
++ U_f[_i + _skip] >> _down | U_f[_i +
++ _skip +
++ 1] << _up;
++ U_f[_i++] = U_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ U_f[_i] = 0;
++ _sticky = (_s != 0);
++ }
++ while (0);
++ U_f[0] |= _sticky;
++ }
++ while (0);
++ else if (!((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0))
++ (U_f[3] = 0, U_f[2] = 0, U_f[1] = 0, U_f[0] = 1);
++ do
++ {
++ unsigned long _c1, _c2, _c3;
++ V_f[0] = Z_f[0] + U_f[0];
++ _c1 = V_f[0] < Z_f[0];
++ V_f[1] = Z_f[1] + U_f[1];
++ _c2 = V_f[1] < Z_f[1];
++ V_f[1] += _c1;
++ _c2 |= V_f[1] < _c1;
++ V_f[2] = Z_f[2] + U_f[2];
++ _c3 = V_f[2] < Z_f[2];
++ V_f[2] += _c2;
++ _c3 |= V_f[2] < _c2;
++ V_f[3] = Z_f[3] + U_f[3] + _c3;
++ }
++ while (0);
++ }
++ else
++ {
++ if (!(((U_e + 1) & 32767) > 1))
++ {
++ if (U_e == 0)
++ {
++ V_e = 0;
++ if (((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0))
++ {
++ if (!((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0))
++ _fex |= (0);
++ (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] =
++ Z_f[2], V_f[3] = Z_f[3]);
++ goto add_done;
++ }
++ else if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0))
++ {
++ _fex |= (0);
++ (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] =
++ U_f[2], V_f[3] = U_f[3]);
++ goto add_done;
++ }
++ else
++ {
++ _fex |= (0);
++ do
++ {
++ unsigned long _c1, _c2, _c3;
++ V_f[0] = U_f[0] + Z_f[0];
++ _c1 = V_f[0] < U_f[0];
++ V_f[1] = U_f[1] + Z_f[1];
++ _c2 = V_f[1] < U_f[1];
++ V_f[1] += _c1;
++ _c2 |= V_f[1] < _c1;
++ V_f[2] = U_f[2] + Z_f[2];
++ _c3 = V_f[2] < U_f[2];
++ V_f[2] += _c2;
++ _c3 |= V_f[2] < _c2;
++ V_f[3] = U_f[3] + Z_f[3] + _c3;
++ }
++ while (0);
++ if ((V_f[3]) &
++ ((unsigned long) 1 << (113 - 1 + 3) % 32))
++ {
++ (V_f[3]) &=
++ ~(unsigned long) ((unsigned long) 1 <<
++ (113 - 1 + 3) % 32);
++ V_e = 1;
++ }
++ goto add_done;
++ }
++ }
++ else
++ {
++ do
++ {
++ if (U_e == 32767
++ && !((U_f[0] | U_f[1] | U_f[2] | U_f[3]) ==
++ 0)
++ && !((U_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3) %
++ 32)))
++ _fex |= (0);
++ }
++ while (0);
++ do
++ {
++ if (Z_e == 32767
++ && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) ==
++ 0)
++ && !((Z_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3) %
++ 32)))
++ _fex |= (0);
++ }
++ while (0);
++ V_e = 32767;
++ if (((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0))
++ (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] =
++ Z_f[2], V_f[3] = Z_f[3]);
++ else if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0))
++ (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] =
++ U_f[2], V_f[3] = U_f[3]);
++ else
++ do
++ {
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (3) / 32;
++ _down = (3) % 32;
++ _up = 32 - _down;
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ U_f[_i] = U_f[_i + _skip];
++ else
++ {
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ U_f[_i] =
++ U_f[_i +
++ _skip] >> _down | U_f[_i +
++ _skip +
++ 1] <<
++ _up;
++ U_f[_i++] = U_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ U_f[_i] = 0;
++ }
++ while (0);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (3) / 32;
++ _down = (3) % 32;
++ _up = 32 - _down;
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ Z_f[_i] = Z_f[_i + _skip];
++ else
++ {
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ Z_f[_i] =
++ Z_f[_i +
++ _skip] >> _down | Z_f[_i +
++ _skip +
++ 1] <<
++ _up;
++ Z_f[_i++] = Z_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ Z_f[_i] = 0;
++ }
++ while (0);
++ do
++ {
++ if (((U_f[3]) &
++ ((unsigned long) 1 << (113 - 2) %
++ 32))
++ && !((Z_f[3]) &
++ ((unsigned long) 1 << (113 - 2) %
++ 32)))
++ {
++ V_s = Z_s;
++ (V_f[0] = Z_f[0], V_f[1] =
++ Z_f[1], V_f[2] = Z_f[2], V_f[3] =
++ Z_f[3]);
++ }
++ else
++ {
++ V_s = U_s;
++ (V_f[0] = U_f[0], V_f[1] =
++ U_f[1], V_f[2] = U_f[2], V_f[3] =
++ U_f[3]);
++ }
++ V_c = 3;
++ }
++ while (0);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (3) / 32;
++ _up = (3) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ V_f[_i] = V_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ V_f[_i] =
++ V_f[_i - _skip] << _up | V_f[_i -
++ _skip
++ -
++ 1] >>
++ _down;
++ V_f[_i--] = V_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ V_f[_i] = 0;
++ }
++ while (0);
++ }
++ while (0);
++ goto add_done;
++ }
++ }
++ do
++ {
++ unsigned long _c1, _c2, _c3;
++ V_f[0] = U_f[0] + Z_f[0];
++ _c1 = V_f[0] < U_f[0];
++ V_f[1] = U_f[1] + Z_f[1];
++ _c2 = V_f[1] < U_f[1];
++ V_f[1] += _c1;
++ _c2 |= V_f[1] < _c1;
++ V_f[2] = U_f[2] + Z_f[2];
++ _c3 = V_f[2] < U_f[2];
++ V_f[2] += _c2;
++ _c3 |= V_f[2] < _c2;
++ V_f[3] = U_f[3] + Z_f[3] + _c3;
++ }
++ while (0);
++ V_e = U_e + 1;
++ do
++ {
++ int _sticky;
++ do
++ {
++ long _up, _down, _skip, _i;
++ unsigned long _s;
++ _skip = (1) / 32;
++ _down = (1) % 32;
++ _up = 32 - _down;
++ for (_s = _i = 0; _i < _skip; ++_i)
++ _s |= V_f[_i];
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ V_f[_i] = V_f[_i + _skip];
++ else
++ {
++ _s |= V_f[_i] << _up;
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ V_f[_i] =
++ V_f[_i + _skip] >> _down | V_f[_i + _skip +
++ 1] << _up;
++ V_f[_i++] = V_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ V_f[_i] = 0;
++ _sticky = (_s != 0);
++ }
++ while (0);
++ V_f[0] |= _sticky;
++ }
++ while (0);
++ if (V_e == 32767)
++ do
++ {
++ if (0 == 0 || (0 == 2 && !V_s) || (0 == 3 && V_s))
++ {
++ V_e = 32767;
++ (V_f[3] = 0, V_f[2] = 0, V_f[1] = 0, V_f[0] = 0);
++ }
++ else
++ {
++ V_e = 32767 - 1;
++ _fex |= (0);
++ _fex |= (0);
++ (V_f[3] = (~(signed long) 0), V_f[2] =
++ (~(signed long) 0), V_f[1] =
++ (~(signed long) 0), V_f[0] = (~(signed long) 0));
++ }
++ }
++ while (0);
++ goto add_done;
++ }
++ add3:if ((V_f[3]) &
++ ((unsigned long) 1 << (113 - 1 + 3) % 32))
++ {
++ (V_f[3]) &=
++ ~(unsigned long) ((unsigned long) 1 << (113 - 1 + 3) %
++ 32);
++ V_e++;
++ do
++ {
++ int _sticky;
++ do
++ {
++ long _up, _down, _skip, _i;
++ unsigned long _s;
++ _skip = (1) / 32;
++ _down = (1) % 32;
++ _up = 32 - _down;
++ for (_s = _i = 0; _i < _skip; ++_i)
++ _s |= V_f[_i];
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ V_f[_i] = V_f[_i + _skip];
++ else
++ {
++ _s |= V_f[_i] << _up;
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ V_f[_i] =
++ V_f[_i + _skip] >> _down | V_f[_i + _skip +
++ 1] << _up;
++ V_f[_i++] = V_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ V_f[_i] = 0;
++ _sticky = (_s != 0);
++ }
++ while (0);
++ V_f[0] |= _sticky;
++ }
++ while (0);
++ if (V_e == 32767)
++ do
++ {
++ if (0 == 0 || (0 == 2 && !V_s) || (0 == 3 && V_s))
++ {
++ V_e = 32767;
++ (V_f[3] = 0, V_f[2] = 0, V_f[1] = 0, V_f[0] = 0);
++ }
++ else
++ {
++ V_e = 32767 - 1;
++ _fex |= (0);
++ _fex |= (0);
++ (V_f[3] = (~(signed long) 0), V_f[2] =
++ (~(signed long) 0), V_f[1] =
++ (~(signed long) 0), V_f[0] = (~(signed long) 0));
++ }
++ }
++ while (0);
++ }
++ add_done:;
++ }
++ else
++ {
++ int ediff = U_e - Z_e;
++ if (ediff > 0)
++ {
++ V_e = U_e;
++ V_s = U_s;
++ if (Z_e == 0)
++ {
++ if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0))
++ {
++ do
++ {
++ if (U_e == 32767
++ && !((U_f[0] | U_f[1] | U_f[2] | U_f[3]) ==
++ 0)
++ && !((U_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3) %
++ 32)))
++ _fex |= (0);
++ }
++ while (0);
++ (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] =
++ U_f[2], V_f[3] = U_f[3]);
++ goto sub_done;
++ }
++ else
++ {
++ _fex |= (0);
++ ediff--;
++ if (ediff == 0)
++ {
++ do
++ {
++ unsigned long _c1, _c2, _c3;
++ V_f[0] = U_f[0] - Z_f[0];
++ _c1 = V_f[0] > U_f[0];
++ V_f[1] = U_f[1] - Z_f[1];
++ _c2 = V_f[1] > U_f[1];
++ V_f[1] -= _c1;
++ _c2 |= _c1 && (Z_f[1] == U_f[1]);
++ V_f[2] = U_f[2] - Z_f[2];
++ _c3 = V_f[2] > U_f[2];
++ V_f[2] -= _c2;
++ _c3 |= _c2 && (Z_f[2] == U_f[2]);
++ V_f[3] = U_f[3] - Z_f[3] - _c3;
++ }
++ while (0);
++ goto sub3;
++ }
++ if (U_e == 32767)
++ {
++ do
++ {
++ if (U_e == 32767
++ && !((U_f[0] | U_f[1] | U_f[2] | U_f[3])
++ == 0)
++ && !((U_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3)
++ % 32)))
++ _fex |= (0);
++ }
++ while (0);
++ (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] =
++ U_f[2], V_f[3] = U_f[3]);
++ goto sub_done;
++ }
++ goto sub1;
++ }
++ }
++ else if (U_e == 32767)
++ {
++ do
++ {
++ if (U_e == 32767
++ && !((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0)
++ && !((U_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3) % 32)))
++ _fex |= (0);
++ }
++ while (0);
++ (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] =
++ U_f[2], V_f[3] = U_f[3]);
++ goto sub_done;
++ }
++ (Z_f[3]) |= ((unsigned long) 1 << (113 - 1 + 3) % 32);
++ sub1:if (ediff <= (3 + 113))
++ do
++ {
++ int _sticky;
++ do
++ {
++ long _up, _down, _skip, _i;
++ unsigned long _s;
++ _skip = (ediff) / 32;
++ _down = (ediff) % 32;
++ _up = 32 - _down;
++ for (_s = _i = 0; _i < _skip; ++_i)
++ _s |= Z_f[_i];
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ Z_f[_i] = Z_f[_i + _skip];
++ else
++ {
++ _s |= Z_f[_i] << _up;
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ Z_f[_i] =
++ Z_f[_i + _skip] >> _down | Z_f[_i +
++ _skip +
++ 1] << _up;
++ Z_f[_i++] = Z_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ Z_f[_i] = 0;
++ _sticky = (_s != 0);
++ }
++ while (0);
++ Z_f[0] |= _sticky;
++ }
++ while (0);
++ else if (!((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0))
++ (Z_f[3] = 0, Z_f[2] = 0, Z_f[1] = 0, Z_f[0] = 1);
++ do
++ {
++ unsigned long _c1, _c2, _c3;
++ V_f[0] = U_f[0] - Z_f[0];
++ _c1 = V_f[0] > U_f[0];
++ V_f[1] = U_f[1] - Z_f[1];
++ _c2 = V_f[1] > U_f[1];
++ V_f[1] -= _c1;
++ _c2 |= _c1 && (Z_f[1] == U_f[1]);
++ V_f[2] = U_f[2] - Z_f[2];
++ _c3 = V_f[2] > U_f[2];
++ V_f[2] -= _c2;
++ _c3 |= _c2 && (Z_f[2] == U_f[2]);
++ V_f[3] = U_f[3] - Z_f[3] - _c3;
++ }
++ while (0);
++ }
++ else if (ediff < 0)
++ {
++ ediff = -ediff;
++ V_e = Z_e;
++ V_s = Z_s;
++ if (U_e == 0)
++ {
++ if (((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0))
++ {
++ do
++ {
++ if (Z_e == 32767
++ && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) ==
++ 0)
++ && !((Z_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3) %
++ 32)))
++ _fex |= (0);
++ }
++ while (0);
++ (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] =
++ Z_f[2], V_f[3] = Z_f[3]);
++ goto sub_done;
++ }
++ else
++ {
++ _fex |= (0);
++ ediff--;
++ if (ediff == 0)
++ {
++ do
++ {
++ unsigned long _c1, _c2, _c3;
++ V_f[0] = Z_f[0] - U_f[0];
++ _c1 = V_f[0] > Z_f[0];
++ V_f[1] = Z_f[1] - U_f[1];
++ _c2 = V_f[1] > Z_f[1];
++ V_f[1] -= _c1;
++ _c2 |= _c1 && (U_f[1] == Z_f[1]);
++ V_f[2] = Z_f[2] - U_f[2];
++ _c3 = V_f[2] > Z_f[2];
++ V_f[2] -= _c2;
++ _c3 |= _c2 && (U_f[2] == Z_f[2]);
++ V_f[3] = Z_f[3] - U_f[3] - _c3;
++ }
++ while (0);
++ goto sub3;
++ }
++ if (Z_e == 32767)
++ {
++ do
++ {
++ if (Z_e == 32767
++ && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3])
++ == 0)
++ && !((Z_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3)
++ % 32)))
++ _fex |= (0);
++ }
++ while (0);
++ (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] =
++ Z_f[2], V_f[3] = Z_f[3]);
++ goto sub_done;
++ }
++ goto sub2;
++ }
++ }
++ else if (Z_e == 32767)
++ {
++ do
++ {
++ if (Z_e == 32767
++ && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0)
++ && !((Z_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3) % 32)))
++ _fex |= (0);
++ }
++ while (0);
++ (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] =
++ Z_f[2], V_f[3] = Z_f[3]);
++ goto sub_done;
++ }
++ (U_f[3]) |= ((unsigned long) 1 << (113 - 1 + 3) % 32);
++ sub2:if (ediff <= (3 + 113))
++ do
++ {
++ int _sticky;
++ do
++ {
++ long _up, _down, _skip, _i;
++ unsigned long _s;
++ _skip = (ediff) / 32;
++ _down = (ediff) % 32;
++ _up = 32 - _down;
++ for (_s = _i = 0; _i < _skip; ++_i)
++ _s |= U_f[_i];
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ U_f[_i] = U_f[_i + _skip];
++ else
++ {
++ _s |= U_f[_i] << _up;
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ U_f[_i] =
++ U_f[_i + _skip] >> _down | U_f[_i +
++ _skip +
++ 1] << _up;
++ U_f[_i++] = U_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ U_f[_i] = 0;
++ _sticky = (_s != 0);
++ }
++ while (0);
++ U_f[0] |= _sticky;
++ }
++ while (0);
++ else if (!((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0))
++ (U_f[3] = 0, U_f[2] = 0, U_f[1] = 0, U_f[0] = 1);
++ do
++ {
++ unsigned long _c1, _c2, _c3;
++ V_f[0] = Z_f[0] - U_f[0];
++ _c1 = V_f[0] > Z_f[0];
++ V_f[1] = Z_f[1] - U_f[1];
++ _c2 = V_f[1] > Z_f[1];
++ V_f[1] -= _c1;
++ _c2 |= _c1 && (U_f[1] == Z_f[1]);
++ V_f[2] = Z_f[2] - U_f[2];
++ _c3 = V_f[2] > Z_f[2];
++ V_f[2] -= _c2;
++ _c3 |= _c2 && (U_f[2] == Z_f[2]);
++ V_f[3] = Z_f[3] - U_f[3] - _c3;
++ }
++ while (0);
++ }
++ else
++ {
++ if (!(((U_e + 1) & 32767) > 1))
++ {
++ if (U_e == 0)
++ {
++ V_e = 0;
++ if (((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0))
++ {
++ (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] =
++ Z_f[2], V_f[3] = Z_f[3]);
++ if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0))
++ V_s = (0 == 3);
++ else
++ {
++ _fex |= (0);
++ V_s = Z_s;
++ }
++ goto sub_done;
++ }
++ else if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0))
++ {
++ _fex |= (0);
++ (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] =
++ U_f[2], V_f[3] = U_f[3]);
++ V_s = U_s;
++ goto sub_done;
++ }
++ else
++ {
++ _fex |= (0);
++ do
++ {
++ unsigned long _c1, _c2, _c3;
++ V_f[0] = U_f[0] - Z_f[0];
++ _c1 = V_f[0] > U_f[0];
++ V_f[1] = U_f[1] - Z_f[1];
++ _c2 = V_f[1] > U_f[1];
++ V_f[1] -= _c1;
++ _c2 |= _c1 && (Z_f[1] == U_f[1]);
++ V_f[2] = U_f[2] - Z_f[2];
++ _c3 = V_f[2] > U_f[2];
++ V_f[2] -= _c2;
++ _c3 |= _c2 && (Z_f[2] == U_f[2]);
++ V_f[3] = U_f[3] - Z_f[3] - _c3;
++ }
++ while (0);
++ V_s = U_s;
++ if ((V_f[3]) &
++ ((unsigned long) 1 << (113 - 1 + 3) % 32))
++ {
++ do
++ {
++ unsigned long _c1, _c2, _c3;
++ V_f[0] = Z_f[0] - U_f[0];
++ _c1 = V_f[0] > Z_f[0];
++ V_f[1] = Z_f[1] - U_f[1];
++ _c2 = V_f[1] > Z_f[1];
++ V_f[1] -= _c1;
++ _c2 |= _c1 && (U_f[1] == Z_f[1]);
++ V_f[2] = Z_f[2] - U_f[2];
++ _c3 = V_f[2] > Z_f[2];
++ V_f[2] -= _c2;
++ _c3 |= _c2 && (U_f[2] == Z_f[2]);
++ V_f[3] = Z_f[3] - U_f[3] - _c3;
++ }
++ while (0);
++ V_s = Z_s;
++ }
++ else
++ if (((V_f[0] | V_f[1] | V_f[2] | V_f[3]) ==
++ 0))
++ V_s = (0 == 3);
++ goto sub_done;
++ }
++ }
++ else
++ {
++ do
++ {
++ if (U_e == 32767
++ && !((U_f[0] | U_f[1] | U_f[2] | U_f[3]) ==
++ 0)
++ && !((U_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3) %
++ 32)))
++ _fex |= (0);
++ }
++ while (0);
++ do
++ {
++ if (Z_e == 32767
++ && !((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) ==
++ 0)
++ && !((Z_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3) %
++ 32)))
++ _fex |= (0);
++ }
++ while (0);
++ V_e = 32767;
++ if (((U_f[0] | U_f[1] | U_f[2] | U_f[3]) == 0))
++ {
++ if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0))
++ {
++ V_s = 0;
++ (V_f[3] =
++ ((((unsigned long) 1 << (113 - 2) %
++ 32) << 1) - 1), V_f[2] = -1, V_f[1] =
++ -1, V_f[0] = -1);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (3) / 32;
++ _up = (3) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ V_f[_i] = V_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ V_f[_i] =
++ V_f[_i -
++ _skip] << _up | V_f[_i -
++ _skip -
++ 1] >>
++ _down;
++ V_f[_i--] = V_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ V_f[_i] = 0;
++ }
++ while (0);
++ _fex |= (0);
++ }
++ else
++ {
++ V_s = Z_s;
++ (V_f[0] = Z_f[0], V_f[1] = Z_f[1], V_f[2] =
++ Z_f[2], V_f[3] = Z_f[3]);
++ }
++ }
++ else
++ {
++ if (((Z_f[0] | Z_f[1] | Z_f[2] | Z_f[3]) == 0))
++ {
++ V_s = U_s;
++ (V_f[0] = U_f[0], V_f[1] = U_f[1], V_f[2] =
++ U_f[2], V_f[3] = U_f[3]);
++ }
++ else
++ {
++ do
++ {
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (3) / 32;
++ _down = (3) % 32;
++ _up = 32 - _down;
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip;
++ ++_i)
++ U_f[_i] = U_f[_i + _skip];
++ else
++ {
++ for (_i = 0; _i < 3 - _skip;
++ ++_i)
++ U_f[_i] =
++ U_f[_i +
++ _skip] >> _down | U_f[_i
++ +
++ _skip
++ +
++ 1]
++ << _up;
++ U_f[_i++] = U_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ U_f[_i] = 0;
++ }
++ while (0);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (3) / 32;
++ _down = (3) % 32;
++ _up = 32 - _down;
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip;
++ ++_i)
++ Z_f[_i] = Z_f[_i + _skip];
++ else
++ {
++ for (_i = 0; _i < 3 - _skip;
++ ++_i)
++ Z_f[_i] =
++ Z_f[_i +
++ _skip] >> _down | Z_f[_i
++ +
++ _skip
++ +
++ 1]
++ << _up;
++ Z_f[_i++] = Z_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ Z_f[_i] = 0;
++ }
++ while (0);
++ do
++ {
++ if (((U_f[3]) &
++ ((unsigned long) 1 << (113 - 2)
++ % 32))
++ && !((Z_f[3]) &
++ ((unsigned long) 1 <<
++ (113 - 2) % 32)))
++ {
++ V_s = Z_s;
++ (V_f[0] = Z_f[0], V_f[1] =
++ Z_f[1], V_f[2] =
++ Z_f[2], V_f[3] = Z_f[3]);
++ }
++ else
++ {
++ V_s = U_s;
++ (V_f[0] = U_f[0], V_f[1] =
++ U_f[1], V_f[2] =
++ U_f[2], V_f[3] = U_f[3]);
++ }
++ V_c = 3;
++ }
++ while (0);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (3) / 32;
++ _up = (3) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ V_f[_i] = V_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ V_f[_i] =
++ V_f[_i -
++ _skip] << _up | V_f[_i -
++ _skip
++ -
++ 1]
++ >> _down;
++ V_f[_i--] = V_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ V_f[_i] = 0;
++ }
++ while (0);
++ }
++ while (0);
++ }
++ }
++ goto sub_done;
++ }
++ }
++ V_e = U_e;
++ do
++ {
++ unsigned long _c1, _c2, _c3;
++ V_f[0] = U_f[0] - Z_f[0];
++ _c1 = V_f[0] > U_f[0];
++ V_f[1] = U_f[1] - Z_f[1];
++ _c2 = V_f[1] > U_f[1];
++ V_f[1] -= _c1;
++ _c2 |= _c1 && (Z_f[1] == U_f[1]);
++ V_f[2] = U_f[2] - Z_f[2];
++ _c3 = V_f[2] > U_f[2];
++ V_f[2] -= _c2;
++ _c3 |= _c2 && (Z_f[2] == U_f[2]);
++ V_f[3] = U_f[3] - Z_f[3] - _c3;
++ }
++ while (0);
++ V_s = U_s;
++ if ((V_f[3]) & ((unsigned long) 1 << (113 - 1 + 3) % 32))
++ {
++ do
++ {
++ unsigned long _c1, _c2, _c3;
++ V_f[0] = Z_f[0] - U_f[0];
++ _c1 = V_f[0] > Z_f[0];
++ V_f[1] = Z_f[1] - U_f[1];
++ _c2 = V_f[1] > Z_f[1];
++ V_f[1] -= _c1;
++ _c2 |= _c1 && (U_f[1] == Z_f[1]);
++ V_f[2] = Z_f[2] - U_f[2];
++ _c3 = V_f[2] > Z_f[2];
++ V_f[2] -= _c2;
++ _c3 |= _c2 && (U_f[2] == Z_f[2]);
++ V_f[3] = Z_f[3] - U_f[3] - _c3;
++ }
++ while (0);
++ V_s = Z_s;
++ }
++ else if (((V_f[0] | V_f[1] | V_f[2] | V_f[3]) == 0))
++ {
++ V_e = 0;
++ V_s = (0 == 3);
++ goto sub_done;
++ }
++ goto norm;
++ }
++ sub3:if ((V_f[3]) &
++ ((unsigned long) 1 << (113 - 1 + 3) % 32))
++ {
++ int diff;
++ (V_f[3]) &= ((unsigned long) 1 << (113 - 1 + 3) % 32) - 1;
++ norm:do
++ {
++ if (V_f[3])
++ {
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ diff = __builtin_clz (V_f[3]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ diff = __builtin_clzl (V_f[3]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ diff = __builtin_clzll (V_f[3]);
++ else
++ abort ();
++ }
++ while (0);
++ }
++ else if (V_f[2])
++ {
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ diff = __builtin_clz (V_f[2]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ diff = __builtin_clzl (V_f[2]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ diff = __builtin_clzll (V_f[2]);
++ else
++ abort ();
++ }
++ while (0);
++ diff += 32;
++ }
++ else if (V_f[1])
++ {
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ diff = __builtin_clz (V_f[1]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ diff = __builtin_clzl (V_f[1]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ diff = __builtin_clzll (V_f[1]);
++ else
++ abort ();
++ }
++ while (0);
++ diff += 32 * 2;
++ }
++ else
++ {
++ do
++ {
++ if (sizeof (unsigned long) ==
++ sizeof (unsigned int))
++ diff = __builtin_clz (V_f[0]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long))
++ diff = __builtin_clzl (V_f[0]);
++ else if (sizeof (unsigned long) ==
++ sizeof (unsigned long long))
++ diff = __builtin_clzll (V_f[0]);
++ else
++ abort ();
++ }
++ while (0);
++ diff += 32 * 3;
++ }
++ }
++ while (0);
++ diff -= ((4 * 32) - (3 + 113));
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (diff) / 32;
++ _up = (diff) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ V_f[_i] = V_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ V_f[_i] =
++ V_f[_i - _skip] << _up | V_f[_i - _skip -
++ 1] >> _down;
++ V_f[_i--] = V_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ V_f[_i] = 0;
++ }
++ while (0);
++ if (V_e <= diff)
++ {
++ diff = diff - V_e + 1;
++ do
++ {
++ int _sticky;
++ do
++ {
++ long _up, _down, _skip, _i;
++ unsigned long _s;
++ _skip = (diff) / 32;
++ _down = (diff) % 32;
++ _up = 32 - _down;
++ for (_s = _i = 0; _i < _skip; ++_i)
++ _s |= V_f[_i];
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ V_f[_i] = V_f[_i + _skip];
++ else
++ {
++ _s |= V_f[_i] << _up;
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ V_f[_i] =
++ V_f[_i + _skip] >> _down | V_f[_i +
++ _skip +
++ 1] <<
++ _up;
++ V_f[_i++] = V_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ V_f[_i] = 0;
++ _sticky = (_s != 0);
++ }
++ while (0);
++ V_f[0] |= _sticky;
++ }
++ while (0);
++ V_e = 0;
++ }
++ else
++ {
++ V_e -= diff;
++ (V_f[3]) &=
++ ~(unsigned long) ((unsigned long) 1 << (113 - 1 + 3) %
++ 32);
++ }
++ }
++ sub_done:;
++ }
++ }
++ while (0);
++ }
++ while (0);
++
++/* FP_PACK_SEMIRAW_Q(v,V) */
++ do
++ {
++ do
++ {
++ do
++ {
++ if ((V_f[0]) & 7)
++ _fex |= (0);
++ switch (0)
++ {
++ case 0:
++ do
++ {
++ if (((V_f[0]) & 15) != ((unsigned long) 1 << 2))
++ do
++ {
++ unsigned long _t;
++ _t =
++ ((V_f[0] +=
++ ((unsigned long) 1 << 2)) <
++ ((unsigned long) 1 << 2));
++ V_f[1] += _t;
++ _t = (V_f[1] < _t);
++ V_f[2] += _t;
++ _t = (V_f[2] < _t);
++ V_f[3] += _t;
++ }
++ while (0);
++ }
++ while (0);
++ break;
++ case 1:
++ (void) 0;
++ break;
++ case 2:
++ do
++ {
++ if (!V_s && ((V_f[0]) & 7))
++ do
++ {
++ unsigned long _t;
++ _t =
++ ((V_f[0] +=
++ ((unsigned long) 1 << 3)) <
++ ((unsigned long) 1 << 3));
++ V_f[1] += _t;
++ _t = (V_f[1] < _t);
++ V_f[2] += _t;
++ _t = (V_f[2] < _t);
++ V_f[3] += _t;
++ }
++ while (0);
++ }
++ while (0);
++ break;
++ case 3:
++ do
++ {
++ if (V_s && ((V_f[0]) & 7))
++ do
++ {
++ unsigned long _t;
++ _t =
++ ((V_f[0] +=
++ ((unsigned long) 1 << 3)) <
++ ((unsigned long) 1 << 3));
++ V_f[1] += _t;
++ _t = (V_f[1] < _t);
++ V_f[2] += _t;
++ _t = (V_f[2] < _t);
++ V_f[3] += _t;
++ }
++ while (0);
++ }
++ while (0);
++ break;
++ }
++ }
++ while (0);
++ if ((V_f[3]) & (((unsigned long) 1 << ((3 + 113) % 32)) >> 1))
++ {
++ (V_f[3]) &= ~(((unsigned long) 1 << ((3 + 113) % 32)) >> 1);
++ V_e++;
++ if (V_e == 32767)
++ do
++ {
++ if (0 == 0 || (0 == 2 && !V_s) || (0 == 3 && V_s))
++ {
++ V_e = 32767;
++ (V_f[3] = 0, V_f[2] = 0, V_f[1] = 0, V_f[0] = 0);
++ }
++ else
++ {
++ V_e = 32767 - 1;
++ _fex |= (0);
++ _fex |= (0);
++ (V_f[3] = (~(signed long) 0), V_f[2] =
++ (~(signed long) 0), V_f[1] =
++ (~(signed long) 0), V_f[0] = (~(signed long) 0));
++ }
++ }
++ while (0);
++ }
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (3) / 32;
++ _down = (3) % 32;
++ _up = 32 - _down;
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ V_f[_i] = V_f[_i + _skip];
++ else
++ {
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ V_f[_i] =
++ V_f[_i + _skip] >> _down | V_f[_i + _skip + 1] << _up;
++ V_f[_i++] = V_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ V_f[_i] = 0;
++ }
++ while (0);
++ if (!(((V_e + 1) & 32767) > 1)
++ && !((V_f[0] | V_f[1] | V_f[2] | V_f[3]) == 0))
++ {
++ if (V_e == 0)
++ _fex |= (0);
++ else
++ {
++ if (!1)
++ {
++ (V_f[3] =
++ ((((unsigned long) 1 << (113 - 2) % 32) << 1) - 1),
++ V_f[2] = -1, V_f[1] = -1, V_f[0] = -1);
++ V_s = 0;
++ }
++ else
++ (V_f[3]) |= ((unsigned long) 1 << (113 - 2) % 32);
++ }
++ }
++ }
++ while (0);
++ do
++ {
++ union _FP_UNION_Q _flo;
++ _flo.bits.frac0 = V_f[0];
++ _flo.bits.frac1 = V_f[1];
++ _flo.bits.frac2 = V_f[2];
++ _flo.bits.frac3 = V_f[3];
++ _flo.bits.exp = V_e;
++ _flo.bits.sign = V_s;
++ (v) = _flo.flt;
++ }
++ while (0);
++ }
++ while (0);
++
++/* FP_HANDLE_EXCEPTIONS */
++ do
++ {
++ }
++ while (0);
++
++ /* Truncate quad to double. */
++/* FP_INIT_ROUNDMODE */
++ do
++ {
++ }
++ while (0);
++
++/* FP_UNPACK_SEMIRAW_Q(V,v) */
++ do
++ {
++ do
++ {
++ union _FP_UNION_Q _flo;
++ _flo.flt = (v);
++ V_f[0] = _flo.bits.frac0;
++ V_f[1] = _flo.bits.frac1;
++ V_f[2] = _flo.bits.frac2;
++ V_f[3] = _flo.bits.frac3;
++ V_e = _flo.bits.exp;
++ V_s = _flo.bits.sign;
++ }
++ while (0);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (3) / 32;
++ _up = (3) % 32;
++ _down = 32 - _up;
++ if (!_up)
++ for (_i = 3; _i >= _skip; --_i)
++ V_f[_i] = V_f[_i - _skip];
++ else
++ {
++ for (_i = 3; _i > _skip; --_i)
++ V_f[_i] =
++ V_f[_i - _skip] << _up | V_f[_i - _skip - 1] >> _down;
++ V_f[_i--] = V_f[0] << _up;
++ }
++ for (; _i >= 0; --_i)
++ V_f[_i] = 0;
++ }
++ while (0);
++ }
++ while (0);
++
++/* FP_TRUNC(D,Q,2,4,R,V) */
++ do
++ {
++ if (113 < 53 || 16383 < 1023 + 53 - 1)
++ abort ();
++ R_s = V_s;
++ if ((((V_e + 1) & 32767) > 1))
++ {
++ R_e = V_e + 1023 - 16383;
++ if (R_e >= 2047)
++ do
++ {
++ if (0 == 0 || (0 == 2 && !R_s) || (0 == 3 && R_s))
++ {
++ R_e = 2047;
++ (R_f0 = 0, R_f1 = 0);
++ }
++ else
++ {
++ R_e = 2047 - 1;
++ _fex |= (0);
++ _fex |= (0);
++ (R_f0 = (~(signed long) 0), R_f1 = (~(signed long) 0));
++ }
++ }
++ while (0);
++ else
++ {
++ if (R_e <= 0)
++ {
++ if (R_e <= 1 - 53)
++ (V_f[3] = 0, V_f[2] = 0, V_f[1] = 0, V_f[0] = 0);
++ else
++ {
++ (V_f[3]) |= ((unsigned long) 1 << (113 - 1 + 3) % 32);
++ do
++ {
++ int _sticky;
++ do
++ {
++ long _up, _down, _skip, _i;
++ unsigned long _s;
++ _skip = (((3 + 113) - (3 + 53) + 1 - R_e)) / 32;
++ _down = (((3 + 113) - (3 + 53) + 1 - R_e)) % 32;
++ _up = 32 - _down;
++ for (_s = _i = 0; _i < _skip; ++_i)
++ _s |= V_f[_i];
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ V_f[_i] = V_f[_i + _skip];
++ else
++ {
++ _s |= V_f[_i] << _up;
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ V_f[_i] =
++ V_f[_i + _skip] >> _down | V_f[_i +
++ _skip +
++ 1] <<
++ _up;
++ V_f[_i++] = V_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ V_f[_i] = 0;
++ _sticky = (_s != 0);
++ }
++ while (0);
++ V_f[0] |= _sticky;
++ }
++ while (0);
++ }
++ R_e = 0;
++ }
++ else
++ do
++ {
++ int _sticky;
++ do
++ {
++ long _up, _down, _skip, _i;
++ unsigned long _s;
++ _skip = (((3 + 113) - (3 + 53))) / 32;
++ _down = (((3 + 113) - (3 + 53))) % 32;
++ _up = 32 - _down;
++ for (_s = _i = 0; _i < _skip; ++_i)
++ _s |= V_f[_i];
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ V_f[_i] = V_f[_i + _skip];
++ else
++ {
++ _s |= V_f[_i] << _up;
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ V_f[_i] =
++ V_f[_i + _skip] >> _down | V_f[_i + _skip +
++ 1] << _up;
++ V_f[_i++] = V_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ V_f[_i] = 0;
++ _sticky = (_s != 0);
++ }
++ while (0);
++ V_f[0] |= _sticky;
++ }
++ while (0);
++ do
++ {
++ R_f0 = V_f[0];
++ R_f1 = V_f[1];
++ }
++ while (0);
++ }
++ }
++ else
++ {
++ if (V_e == 0)
++ {
++ R_e = 0;
++ (R_f0 = 0, R_f1 = 0);
++ if (!((V_f[0] | V_f[1] | V_f[2] | V_f[3]) == 0))
++ {
++ _fex |= (0);
++ _fex |= (0);
++ }
++ }
++ else
++ {
++ R_e = 2047;
++ if (((V_f[0] | V_f[1] | V_f[2] | V_f[3]) == 0))
++ (R_f0 = 0, R_f1 = 0);
++ else
++ {
++ do
++ {
++ if (V_e == 32767
++ && !((V_f[0] | V_f[1] | V_f[2] | V_f[3]) == 0)
++ && !((V_f[3]) &
++ ((unsigned long) 1 << (113 - 2 + 3) % 32)))
++ _fex |= (0);
++ }
++ while (0);
++ do
++ {
++ long _up, _down, _skip, _i;
++ _skip = (((3 + 113) - (3 + 53))) / 32;
++ _down = (((3 + 113) - (3 + 53))) % 32;
++ _up = 32 - _down;
++ if (!_down)
++ for (_i = 0; _i <= 3 - _skip; ++_i)
++ V_f[_i] = V_f[_i + _skip];
++ else
++ {
++ for (_i = 0; _i < 3 - _skip; ++_i)
++ V_f[_i] =
++ V_f[_i + _skip] >> _down | V_f[_i + _skip +
++ 1] << _up;
++ V_f[_i++] = V_f[3] >> _down;
++ }
++ for (; _i < 4; ++_i)
++ V_f[_i] = 0;
++ }
++ while (0);
++ do
++ {
++ R_f0 = V_f[0];
++ R_f1 = V_f[1];
++ }
++ while (0);
++ (R_f1) |= ((unsigned long) 1 << (53 - 2 + 3) % 32);
++ }
++ }
++ }
++ }
++ while (0);
++
++/* FP_PACK_SEMIRAW_D(r,R) */
++ do
++ {
++ do
++ {
++ do
++ {
++ if ((R_f0) & 7)
++ _fex |= (0);
++ switch (0)
++ {
++ case 0:
++ do
++ {
++ if (((R_f0) & 15) != ((unsigned long) 1 << 2))
++ do
++ {
++ if (__builtin_constant_p (0) && (0) == 0)
++ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2": "=r" (R_f1), "=&r" (R_f0):"r" (R_f1), "%r" (R_f0),
++ "rI" (((unsigned long) 1 <<
++ 2)));
++ else if (__builtin_constant_p (0)
++ && (0) == ~(USItype) 0)
++ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2": "=r" (R_f1), "=&r" (R_f0):"r" (R_f1), "%r" (R_f0),
++ "rI" (((unsigned long) 1 <<
++ 2)));
++ else
++ __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3": "=r" (R_f1), "=&r" (R_f0):"%r" (R_f1), "r" (0), "%r" (R_f0),
++ "rI" (((unsigned long) 1 <<
++ 2)));
++ }
++ while (0);
++ }
++ while (0);
++ break;
++ case 1:
++ (void) 0;
++ break;
++ case 2:
++ do
++ {
++ if (!R_s && ((R_f0) & 7))
++ do
++ {
++ if (__builtin_constant_p (0) && (0) == 0)
++ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2": "=r" (R_f1), "=&r" (R_f0):"r" (R_f1), "%r" (R_f0),
++ "rI" (((unsigned long) 1 <<
++ 3)));
++ else if (__builtin_constant_p (0)
++ && (0) == ~(USItype) 0)
++ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2": "=r" (R_f1), "=&r" (R_f0):"r" (R_f1), "%r" (R_f0),
++ "rI" (((unsigned long) 1 <<
++ 3)));
++ else
++ __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3": "=r" (R_f1), "=&r" (R_f0):"%r" (R_f1), "r" (0), "%r" (R_f0),
++ "rI" (((unsigned long) 1 <<
++ 3)));
++ }
++ while (0);
++ }
++ while (0);
++ break;
++ case 3:
++ do
++ {
++ if (R_s && ((R_f0) & 7))
++ do
++ {
++ if (__builtin_constant_p (0) && (0) == 0)
++ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2": "=r" (R_f1), "=&r" (R_f0):"r" (R_f1), "%r" (R_f0),
++ "rI" (((unsigned long) 1 <<
++ 3)));
++ else if (__builtin_constant_p (0)
++ && (0) == ~(USItype) 0)
++ __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2": "=r" (R_f1), "=&r" (R_f0):"r" (R_f1), "%r" (R_f0),
++ "rI" (((unsigned long) 1 <<
++ 3)));
++ else
++ __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3": "=r" (R_f1), "=&r" (R_f0):"%r" (R_f1), "r" (0), "%r" (R_f0),
++ "rI" (((unsigned long) 1 <<
++ 3)));
++ }
++ while (0);
++ }
++ while (0);
++ break;
++ }
++ }
++ while (0);
++ if ((R_f1) & (((unsigned long) 1 << (3 + 53) % 32) >> 1))
++ {
++ (R_f1) &= ~(((unsigned long) 1 << (3 + 53) % 32) >> 1);
++ R_e++;
++ if (R_e == 2047)
++ do
++ {
++ if (0 == 0 || (0 == 2 && !R_s) || (0 == 3 && R_s))
++ {
++ R_e = 2047;
++ (R_f0 = 0, R_f1 = 0);
++ }
++ else
++ {
++ R_e = 2047 - 1;
++ _fex |= (0);
++ _fex |= (0);
++ (R_f0 = (~(signed long) 0), R_f1 =
++ (~(signed long) 0));
++ }
++ }
++ while (0);
++ }
++ (void) (((3) < 32) ? (
++ {
++ R_f0 = R_f0 >> (3) | R_f1 << (32 - (3)); R_f1 >>= (3);}):(
++ {
++ R_f0 = R_f1 >> ((3) - 32); R_f1 = 0;}));
++ if (!(((R_e + 1) & 2047) > 1) && !((R_f1 | R_f0) == 0))
++ {
++ if (R_e == 0)
++ _fex |= (0);
++ else
++ {
++ if (!1)
++ {
++ (R_f0 = -1, R_f1 =
++ ((((unsigned long) 1 << (53 - 2) % 32) << 1) - 1));
++ R_s = 0;
++ }
++ else
++ (R_f1) |= ((unsigned long) 1 << (53 - 2) % 32);
++ }
++ }
++ }
++ while (0);
++ do
++ {
++ union _FP_UNION_D _flo;
++ _flo.bits.frac0 = R_f0;
++ _flo.bits.frac1 = R_f1;
++ _flo.bits.exp = R_e;
++ _flo.bits.sign = R_s;
++ (r) = _flo.flt;
++ }
++ while (0);
++ }
++ while (0);
++
++/* FP_HANDLE_EXCEPTIONS */
++ do
++ {
++ }
++ while (0);
++
++ return r;
++}
++
++
++#endif
++
+ #endif
+diff -urN gcc42-trunc-20060802/gcc/config/rs6000/libgcc-ppc-glibc.ver gcc42-patched-20060802/gcc/config/rs6000/libgcc-ppc-glibc.ver
+--- gcc42-trunc-20060802/gcc/config/rs6000/libgcc-ppc-glibc.ver 2006-08-02 11:07:16.000000000 -0500
++++ gcc42-patched-20060802/gcc/config/rs6000/libgcc-ppc-glibc.ver 2006-09-01 08:28:29.000000000 -0500
+@@ -21,11 +21,32 @@
+ %else
+ GCC_3.4.4 {
+ %endif
++%else
++GCC_4.2.0 {
++%endif
+
+ # long double support
+ __gcc_qadd
+ __gcc_qsub
+ __gcc_qmul
+ __gcc_qdiv
+-}
++
++%ifdef _SOFT_FLOAT
++ __gcc_qneg
++ __gcc_qeq
++ __gcc_qne
++ __gcc_ggt
++ __gcc_qge
++ __gcc_qlt
++ __gcc_qle
++ __gcc_qunord
++ __gcc_stoq
++ __gcc_dtoq
++ __gcc_qtos
++ __gcc_qtod
++ __gcc_qtoi
++ __gcc_qtou
++ __gcc_itoq
++ __gcc_utoq
+ %endif
++}
+diff -urN gcc42-trunc-20060802/gcc/config/rs6000/rs6000.c gcc42-patched-20060802/gcc/config/rs6000/rs6000.c
+--- gcc42-trunc-20060802/gcc/config/rs6000/rs6000.c 2006-08-02 11:07:16.000000000 -0500
++++ gcc42-patched-20060802/gcc/config/rs6000/rs6000.c 2006-09-01 08:28:29.000000000 -0500
+@@ -4016,8 +4016,7 @@
+
+ /* 128-bit constant floating-point values on Darwin should really be
+ loaded as two parts. */
+- if (!TARGET_IEEEQUAD
+- && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128
++ if (!TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128
+ && mode == TFmode && GET_CODE (operands[1]) == CONST_DOUBLE)
+ {
+ /* DImode is used, not DFmode, because simplify_gen_subreg doesn't
+@@ -9175,9 +9174,6 @@
+ static void
+ rs6000_init_libfuncs (void)
+ {
+- if (!TARGET_HARD_FLOAT)
+- return;
+-
+ if (DEFAULT_ABI != ABI_V4 && TARGET_XCOFF
+ && !TARGET_POWER2 && !TARGET_POWERPC)
+ {
+@@ -9196,6 +9192,27 @@
+ set_optab_libfunc (sub_optab, TFmode, "__gcc_qsub");
+ set_optab_libfunc (smul_optab, TFmode, "__gcc_qmul");
+ set_optab_libfunc (sdiv_optab, TFmode, "__gcc_qdiv");
++
++ if (TARGET_SOFT_FLOAT)
++ {
++ set_optab_libfunc (neg_optab, TFmode, "__gcc_qneg");
++ set_optab_libfunc (eq_optab, TFmode, "__gcc_qeq");
++ set_optab_libfunc (ne_optab, TFmode, "__gcc_qne");
++ set_optab_libfunc (gt_optab, TFmode, "__gcc_qgt");
++ set_optab_libfunc (ge_optab, TFmode, "__gcc_qge");
++ set_optab_libfunc (lt_optab, TFmode, "__gcc_qlt");
++ set_optab_libfunc (le_optab, TFmode, "__gcc_qle");
++ set_optab_libfunc (unord_optab, TFmode, "__gcc_qunord");
++
++ set_conv_libfunc (sext_optab, TFmode, SFmode, "__gcc_stoq");
++ set_conv_libfunc (sext_optab, TFmode, DFmode, "__gcc_dtoq");
++ set_conv_libfunc (trunc_optab, SFmode, TFmode, "__gcc_qtos");
++ set_conv_libfunc (trunc_optab, DFmode, TFmode, "__gcc_qtod");
++ set_conv_libfunc (sfix_optab, SImode, TFmode, "__gcc_qtoi");
++ set_conv_libfunc (ufix_optab, SImode, TFmode, "__gcc_qtou");
++ set_conv_libfunc (sfloat_optab, TFmode, SImode, "__gcc_itoq");
++ set_conv_libfunc (ufloat_optab, TFmode, SImode, "__gcc_utoq");
++ }
+ }
+ else
+ {
+diff -urN gcc42-trunc-20060802/gcc/config/rs6000/rs6000.md gcc42-patched-20060802/gcc/config/rs6000/rs6000.md
+--- gcc42-trunc-20060802/gcc/config/rs6000/rs6000.md 2006-08-02 11:07:16.000000000 -0500
++++ gcc42-patched-20060802/gcc/config/rs6000/rs6000.md 2006-09-01 08:28:29.000000000 -0500
+@@ -7920,42 +7920,44 @@
+ "")
+
+ (define_insn "*movcc_internal1"
+- [(set (match_operand:CC 0 "nonimmediate_operand" "=y,x,?y,r,r,r,r,q,cl,r,m")
+- (match_operand:CC 1 "nonimmediate_operand" "y,r,r,x,y,r,h,r,r,m,r"))]
++ [(set (match_operand:CC 0 "nonimmediate_operand" "=y,x,?y,y,r,r,r,r,r,q,cl,r,m")
++ (match_operand:CC 1 "general_operand" "y,r,r,O,x,y,r,I,h,r,r,m,r"))]
+ "register_operand (operands[0], CCmode)
+ || register_operand (operands[1], CCmode)"
+ "@
+ mcrf %0,%1
+ mtcrf 128,%1
+ {rlinm|rlwinm} %1,%1,%F0,0xffffffff\;mtcrf %R0,%1\;{rlinm|rlwinm} %1,%1,%f0,0xffffffff
++ crxor %0,%0,%0
+ mfcr %0%Q1
+ mfcr %0%Q1\;{rlinm|rlwinm} %0,%0,%f1,0xf0000000
+ mr %0,%1
++ {lil|li} %0,%1
+ mf%1 %0
+ mt%0 %1
+ mt%0 %1
+ {l%U1%X1|lwz%U1%X1} %0,%1
+ {st%U0%U1|stw%U0%U1} %1,%0"
+ [(set (attr "type")
+- (cond [(eq_attr "alternative" "0")
++ (cond [(eq_attr "alternative" "0,3")
+ (const_string "cr_logical")
+ (eq_attr "alternative" "1,2")
+ (const_string "mtcr")
+- (eq_attr "alternative" "5,7")
++ (eq_attr "alternative" "6,7,9")
+ (const_string "integer")
+- (eq_attr "alternative" "6")
+- (const_string "mfjmpr")
+ (eq_attr "alternative" "8")
++ (const_string "mfjmpr")
++ (eq_attr "alternative" "10")
+ (const_string "mtjmpr")
+- (eq_attr "alternative" "9")
++ (eq_attr "alternative" "11")
+ (const_string "load")
+- (eq_attr "alternative" "10")
++ (eq_attr "alternative" "12")
+ (const_string "store")
+ (ne (symbol_ref "TARGET_MFCRF") (const_int 0))
+ (const_string "mfcrf")
+ ]
+ (const_string "mfcr")))
+- (set_attr "length" "4,4,12,4,8,4,4,4,4,4,4")])
++ (set_attr "length" "4,4,12,4,4,8,4,4,4,4,4,4,4")])
+
+ ;; For floating-point, we normally deal with the floating-point registers
+ ;; unless -msoft-float is used. The sole exception is that parameter passing
+@@ -8313,8 +8315,7 @@
+ (define_expand "movtf"
+ [(set (match_operand:TF 0 "general_operand" "")
+ (match_operand:TF 1 "any_operand" ""))]
+- "!TARGET_IEEEQUAD
+- && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128"
++ "!TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128"
+ "{ rs6000_emit_move (operands[0], operands[1], TFmode); DONE; }")
+
+ ; It's important to list the o->f and f->o moves before f->f because
+@@ -8333,6 +8334,19 @@
+ { rs6000_split_multireg_move (operands[0], operands[1]); DONE; }
+ [(set_attr "length" "8,8,8,20,20,16")])
+
++(define_insn_and_split "*movtf_softfloat"
++ [(set (match_operand:TF 0 "nonimmediate_operand" "=r,Y,r")
++ (match_operand:TF 1 "input_operand" "YGHF,r,r"))]
++ "!TARGET_IEEEQUAD
++ && (TARGET_SOFT_FLOAT || !TARGET_FPRS) && TARGET_LONG_DOUBLE_128
++ && (gpc_reg_operand (operands[0], TFmode)
++ || gpc_reg_operand (operands[1], TFmode))"
++ "#"
++ "&& reload_completed"
++ [(pc)]
++{ rs6000_split_multireg_move (operands[0], operands[1]); DONE; }
++ [(set_attr "length" "20,20,16")])
++
+ (define_expand "extenddftf2"
+ [(parallel [(set (match_operand:TF 0 "nonimmediate_operand" "")
+ (float_extend:TF (match_operand:DF 1 "input_operand" "")))
+diff -urN gcc42-trunc-20060802/gcc/config/rs6000/sysv4.h gcc42-patched-20060802/gcc/config/rs6000/sysv4.h
+--- gcc42-trunc-20060802/gcc/config/rs6000/sysv4.h 2006-08-02 11:07:16.000000000 -0500
++++ gcc42-patched-20060802/gcc/config/rs6000/sysv4.h 2006-09-01 08:28:29.000000000 -0500
+@@ -215,10 +215,6 @@
+ error ("-msecure-plt not supported by your assembler"); \
+ } \
+ \
+- if (TARGET_SOFT_FLOAT && TARGET_LONG_DOUBLE_128 \
+- && rs6000_explicit_options.long_double) \
+- warning (0, "-msoft-float and -mlong-double-128 not supported"); \
+- \
+ /* Treat -fPIC the same as -mrelocatable. */ \
+ if (flag_pic > 1 && DEFAULT_ABI != ABI_AIX) \
+ { \
+diff -urN gcc42-trunc-20060802/gcc/config/rs6000/t-ppccomm gcc42-patched-20060802/gcc/config/rs6000/t-ppccomm
+--- gcc42-trunc-20060802/gcc/config/rs6000/t-ppccomm 2006-08-02 11:07:16.000000000 -0500
++++ gcc42-patched-20060802/gcc/config/rs6000/t-ppccomm 2006-09-01 08:28:29.000000000 -0500
+@@ -12,15 +12,8 @@
+ cat $(srcdir)/config/rs6000/tramp.asm > tramp.S
+
+ ifneq (,$findstring gnu,$(target))
+-TARGET_LIBGCC2_CFLAGS += -specs=ldblspecs
+-
++TARGET_LIBGCC2_CFLAGS += -mlong-double-128
+ SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ppc-glibc.ver
+-
+-# Hack to use -mlong-double-128 only when not compiling nof libgcc
+-mklibgcc: ldblspecs
+-
+-ldblspecs: specs
+- sed -e '/cc1_options/{ n; s/$$/ %{!msoft-float:-mlong-double-128}/; }' < specs > $@
+ endif
+
+ # Switch synonyms
diff --git a/packages/gcc/gcc_4.1.1.bb b/packages/gcc/gcc_4.1.1.bb
index 104a8abb76..b668769ceb 100644
--- a/packages/gcc/gcc_4.1.1.bb
+++ b/packages/gcc/gcc_4.1.1.bb
@@ -1,4 +1,4 @@
-PR = "r10"
+PR = "r12"
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
@@ -32,11 +32,15 @@ SRC_URI = "http://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.1/gcc-4.1.1.tar.bz2 \
file://unbreak-armv4t.patch;patch=1 \
file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
file://gcc-4.1.1-pr13685-1.patch;patch=1 \
+ file://gcc-ignore-cache.patch;patch=1 \
"
SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
+SRC_URI_append_powerpc = " file://ppc-gcc-41-20060515.patch;patch=1 \
+ file://ppc-sfp-long-double-gcc411-7.patch;patch=1 "
+
#Set the fortran bits
# 'fortran' or '', not 'f77' like gcc3 had
FORTRAN = ""
diff --git a/packages/glibc/files/ppc-ld-nofpu-20070104.patch b/packages/glibc/files/ppc-ld-nofpu-20070104.patch
new file mode 100644
index 0000000000..d5b1d31774
--- /dev/null
+++ b/packages/glibc/files/ppc-ld-nofpu-20070104.patch
@@ -0,0 +1,190 @@
+2007-01-12 Steven Munroe <sjmunroe@us.ibm.com>
+ Joe Kerian <jkerian@us.us.ibm.com>
+
+ [BZ #2749]
+ * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c:
+ Include <math_ldbl_opt.h>.
+ Remove weak_alias. Use long_double_symbol macro.
+ (__copysignl): Use signbit() for comparison.
+ * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: Correct parms for
+ SET_LDOUBLE_WORDS64.
+
+ [BZ #2423, #2749]
+ * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: Don't include <fenv_libc.h>.
+ (__ceill): Remove calls to fegetround(), fesetround().
+ * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: Likewise.
+
+diff -urN libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_ceill.c libc24/sysdeps/ieee754/ldbl-128ibm/s_ceill.c
+--- libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_ceill.c 2006-03-16 05:46:37.000000000 -0600
++++ libc24/sysdeps/ieee754/ldbl-128ibm/s_ceill.c 2007-01-11 10:30:12.856890432 -0600
+@@ -19,7 +19,6 @@
+ 02111-1307 USA. */
+
+ #include <math.h>
+-#include <fenv_libc.h>
+ #include <math_ldbl_opt.h>
+ #include <float.h>
+ #include <ieee754.h>
+@@ -44,11 +43,9 @@
+ __builtin_inf ()), 1))
+ {
+ double orig_xh;
+- int save_round = fegetround ();
+
+ /* Long double arithmetic, including the canonicalisation below,
+ only works in round-to-nearest mode. */
+- fesetround (FE_TONEAREST);
+
+ /* Convert the high double to integer. */
+ orig_xh = xh;
+@@ -81,8 +78,6 @@
+ /* Ensure we return -0 rather than +0 when appropriate. */
+ if (orig_xh < 0.0)
+ xh = -__builtin_fabs (xh);
+-
+- fesetround (save_round);
+ }
+
+ return ldbl_pack (xh, xl);
+diff -urN libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c libc24/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c
+--- libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c 2006-01-27 18:07:25.000000000 -0600
++++ libc24/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c 2007-01-11 10:30:12.857890280 -0600
+@@ -25,6 +25,7 @@
+
+ #include "math.h"
+ #include "math_private.h"
++#include <math_ldbl_opt.h>
+
+ #ifdef __STDC__
+ long double __copysignl(long double x, long double y)
+@@ -33,13 +34,13 @@
+ long double x,y;
+ #endif
+ {
+- if (y < 0.0)
+- {
+- if (x >= 0.0)
+- x = -x;
+- }
+- else if (x < 0.0)
++ if( signbit(x) != signbit(y) )
+ x = -x;
+ return x;
+ }
+-weak_alias (__copysignl, copysignl)
++
++#ifdef IS_IN_libm
++long_double_symbol (libm, __copysignl, copysignl);
++#else
++long_double_symbol (libc, __copysignl, copysignl);
++#endif
+diff -urN libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c libc24/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c
+--- libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c 2006-01-27 18:07:25.000000000 -0600
++++ libc24/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c 2007-01-11 10:30:12.857890280 -0600
+@@ -37,7 +37,7 @@
+ GET_LDOUBLE_WORDS64(hx,lx,x);
+ lx = lx ^ ( hx & 0x8000000000000000LL );
+ hx = hx & 0x7fffffffffffffffLL;
+- SET_LDOUBLE_WORDS64(hx,lx,x);
++ SET_LDOUBLE_WORDS64(x,hx,lx);
+ return x;
+ }
+ long_double_symbol (libm, __fabsl, fabsl);
+diff -urN libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_floorl.c libc24/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
+--- libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_floorl.c 2006-03-16 05:46:37.000000000 -0600
++++ libc24/sysdeps/ieee754/ldbl-128ibm/s_floorl.c 2007-01-11 10:30:12.858890128 -0600
+@@ -19,7 +19,6 @@
+ 02111-1307 USA. */
+
+ #include <math.h>
+-#include <fenv_libc.h>
+ #include <math_ldbl_opt.h>
+ #include <float.h>
+ #include <ieee754.h>
+@@ -43,11 +42,8 @@
+ && __builtin_isless (__builtin_fabs (xh),
+ __builtin_inf ()), 1))
+ {
+- int save_round = fegetround ();
+-
+ /* Long double arithmetic, including the canonicalisation below,
+ only works in round-to-nearest mode. */
+- fesetround (FE_TONEAREST);
+
+ /* Convert the high double to integer. */
+ hi = ldbl_nearbyint (xh);
+@@ -75,8 +71,6 @@
+ xh = hi;
+ xl = lo;
+ ldbl_canonicalize (&xh, &xl);
+-
+- fesetround (save_round);
+ }
+
+ return ldbl_pack (xh, xl);
+diff -urN libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_roundl.c libc24/sysdeps/ieee754/ldbl-128ibm/s_roundl.c
+--- libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_roundl.c 2006-03-16 05:46:37.000000000 -0600
++++ libc24/sysdeps/ieee754/ldbl-128ibm/s_roundl.c 2007-01-11 10:30:12.859889976 -0600
+@@ -22,7 +22,6 @@
+ when it's coded in C. */
+
+ #include <math.h>
+-#include <fenv_libc.h>
+ #include <math_ldbl_opt.h>
+ #include <float.h>
+ #include <ieee754.h>
+@@ -47,11 +46,9 @@
+ __builtin_inf ()), 1))
+ {
+ double orig_xh;
+- int save_round = fegetround ();
+
+ /* Long double arithmetic, including the canonicalisation below,
+ only works in round-to-nearest mode. */
+- fesetround (FE_TONEAREST);
+
+ /* Convert the high double to integer. */
+ orig_xh = xh;
+@@ -88,8 +85,6 @@
+ xh = hi;
+ xl = lo;
+ ldbl_canonicalize (&xh, &xl);
+-
+- fesetround (save_round);
+ }
+
+ return ldbl_pack (xh, xl);
+diff -urN libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_truncl.c libc24/sysdeps/ieee754/ldbl-128ibm/s_truncl.c
+--- libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_truncl.c 2006-03-16 05:46:37.000000000 -0600
++++ libc24/sysdeps/ieee754/ldbl-128ibm/s_truncl.c 2007-01-11 10:30:12.860889824 -0600
+@@ -22,7 +22,6 @@
+ when it's coded in C. */
+
+ #include <math.h>
+-#include <fenv_libc.h>
+ #include <math_ldbl_opt.h>
+ #include <float.h>
+ #include <ieee754.h>
+@@ -47,11 +46,9 @@
+ __builtin_inf ()), 1))
+ {
+ double orig_xh;
+- int save_round = fegetround ();
+
+ /* Long double arithmetic, including the canonicalisation below,
+ only works in round-to-nearest mode. */
+- fesetround (FE_TONEAREST);
+
+ /* Convert the high double to integer. */
+ orig_xh = xh;
+@@ -92,8 +89,6 @@
+ /* Ensure we return -0 rather than +0 when appropriate. */
+ if (orig_xh < 0.0)
+ xh = -__builtin_fabs (xh);
+-
+- fesetround (save_round);
+ }
+
+ return ldbl_pack (xh, xl);
diff --git a/packages/glibc/files/ppc-ports-ld-nofpu-20070114.patch b/packages/glibc/files/ppc-ports-ld-nofpu-20070114.patch
new file mode 100644
index 0000000000..b4d99592f6
--- /dev/null
+++ b/packages/glibc/files/ppc-ports-ld-nofpu-20070114.patch
@@ -0,0 +1,38 @@
+2007-01-14 Steven Munroe <sjmunroe@us.ibm.com>
+
+ [BZ #2749]
+ * sysdeps/powerpc/nofpu/fenv_libc.h: New file.
+
+diff -urN dummy-libc/ports-cvstip-20070104/sysdeps/powerpc/nofpu/fenv_libc.h libc25/ports/sysdeps/powerpc/nofpu/fenv_libc.h
+--- dummy-libc/ports-cvstip-20070104/sysdeps/powerpc/nofpu/fenv_libc.h Wed Dec 31 18:00:00 1969
++++ libc25/ports/sysdeps/powerpc/nofpu/fenv_libc.h Thu Jan 11 11:00:53 2007
+@@ -0,0 +1,29 @@
++/* Internal libc stuff for floating point environment routines.
++ Copyright (C) 2007 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 _FENV_LIBC_H
++#define _FENV_LIBC_H 1
++
++/* fenv_libc.h is used in libm implementations of ldbl-128ibm. So we
++ need this version in the soft-fp to at minimum include fenv.h to
++ get the fegetround definition. */
++
++#include <fenv.h>
++
++#endif /* fenv_libc.h */
diff --git a/packages/glibc/files/ppc-sfp-machine.patch b/packages/glibc/files/ppc-sfp-machine.patch
new file mode 100644
index 0000000000..6171a03411
--- /dev/null
+++ b/packages/glibc/files/ppc-sfp-machine.patch
@@ -0,0 +1,297 @@
+This patch combined with the other patches from Bugzilla #2749 allows
+powerpc32 to build. The Subdirs pulls in the soft-fp directory from
+libc, The Implies pulls in the ports powerpc/soft-fp directory which
+includes sfp-machine.h
+
+The get/set/swapcontext changes overide the common implimentation in
+libc to avoid using hardware FP instructions.
+
+
+
+2006-06-01 Steven Munroe <sjmunroe@us.ibm.com>
+
+ [BZ #2749]
+ * sysdeps/powerpc/soft-fp/Subdirs: New file.
+ * sysdeps/powerpc/soft-fp/sfp-machine.h: New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies: New file.
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S:
+ New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S:
+ New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S:
+ New file.
+
+diff -urN dummy-libc/ports-cvstip-20060512/sysdeps/powerpc/soft-fp/Subdirs
+libc24/ports/sysdeps/powerpc/soft-fp/Subdirs
+--- dummy-libc/ports-cvstip-20060512/sysdeps/powerpc/soft-fp/Subdirs Wed Dec 31 18:00:00 1969
++++ libc24/ports/sysdeps/powerpc/soft-fp/Subdirs Wed May 31 16:58:44 2006
+@@ -0,0 +1,1 @@
++soft-fp
+diff -urN dummy-libc/ports-cvstip-20060512/sysdeps/powerpc/soft-fp/sfp-machine.h
+libc24/ports/sysdeps/powerpc/soft-fp/sfp-machine.h
+--- dummy-libc/ports-cvstip-20060512/sysdeps/powerpc/soft-fp/sfp-machine.h Wed Dec 31 18:00:00 1969
++++ libc24/ports/sysdeps/powerpc/soft-fp/sfp-machine.h Wed May 31 13:57:07 2006
+@@ -0,0 +1,63 @@
++#define _FP_W_TYPE_SIZE 32
++#define _FP_W_TYPE unsigned long
++#define _FP_WS_TYPE signed long
++#define _FP_I_TYPE long
++
++#define _FP_MUL_MEAT_S(R,X,Y) \
++ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
++#define _FP_MUL_MEAT_D(R,X,Y) \
++ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
++#define _FP_MUL_MEAT_Q(R,X,Y) \
++ _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
++
++#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y)
++#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y)
++#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y)
++
++#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1)
++#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1
++#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1
++#define _FP_NANSIGN_S 0
++#define _FP_NANSIGN_D 0
++#define _FP_NANSIGN_Q 0
++
++#define _FP_KEEPNANFRACP 1
++
++/* Someone please check this. */
++#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
++ do { \
++ if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \
++ && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \
++ { \
++ R##_s = Y##_s; \
++ _FP_FRAC_COPY_##wc(R,Y); \
++ } \
++ else \
++ { \
++ R##_s = X##_s; \
++ _FP_FRAC_COPY_##wc(R,X); \
++ } \
++ R##_c = FP_CLS_NAN; \
++ } while (0)
++
++/* Exception flags. We use the bit positions of the appropriate bits
++ in the FPSCR, which also correspond to the FE_* bits. This makes
++ everything easier ;-). */
++#define FP_EX_INVALID (1 << (31 - 2))
++#define FP_EX_OVERFLOW (1 << (31 - 3))
++#define FP_EX_UNDERFLOW (1 << (31 - 4))
++#define FP_EX_DENORM FP_EX_UNDERFLOW
++#define FP_EX_DIVZERO (1 << (31 - 5))
++#define FP_EX_INEXACT (1 << (31 - 6))
++
++#define FP_HANDLE_EXCEPTIONS __simulate_exceptions (_fex)
++#define FP_ROUNDMODE __sim_round_mode
++
++extern int __sim_exceptions;
++libc_hidden_proto (__sim_exceptions);
++extern int __sim_disabled_exceptions;
++libc_hidden_proto (__sim_disabled_exceptions);
++extern int __sim_round_mode;
++libc_hidden_proto (__sim_round_mode);
++
++extern void __simulate_exceptions (int x) attribute_hidden;
+diff -urN dummy-libc/ports-cvstip-20060512/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies
+libc24/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies
+--- dummy-libc/ports-cvstip-20060512/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies Wed Dec 31 18:00:00 1969
++++ libc24/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies Wed May 31 15:46:44 2006
+@@ -0,0 +1,1 @@
++powerpc/soft-fp
+diff -urN dummy-libc/ports-cvstip-20060512/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S
+libc24/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S
+--- dummy-libc/ports-cvstip-20060512/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S Wed Dec 31 18:00:00 1969
++++ libc24/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S Thu Jun 01 15:31:03 2006
+@@ -0,0 +1,59 @@
++/* Save current context.
++ Copyright (C) 2002, 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. */
++
++#include <sysdep.h>
++#include <rtld-global-offsets.h>
++#include <shlib-compat.h>
++
++#define __ASSEMBLY__
++#include <asm/ptrace.h>
++#include "ucontext_i.h"
++
++#define __CONTEXT_FUNC_NAME __getcontext
++#undef __CONTEXT_ENABLE_FPRS
++#undef __CONTEXT_ENABLE_VRS
++
++#include "getcontext-common.S"
++
++versioned_symbol (libc, __getcontext, getcontext, GLIBC_2_3_4)
++
++#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
++
++/* For the nofpu case the old/new versions are the same function. */
++strong_alias (__getcontext, __novec_getcontext)
++
++compat_symbol (libc, __novec_getcontext, getcontext, GLIBC_2_3_3)
++
++#endif
++
++#if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_3_3)
++
++#define _ERRNO_H 1
++#include <bits/errno.h>
++
++ compat_text_section
++ENTRY (__getcontext_stub)
++ li r3,ENOSYS
++ b __syscall_error@local
++END (__getcontext_stub)
++ .previous
++
++compat_symbol (libc, __getcontext_stub, getcontext, GLIBC_2_1)
++
++#endif
+diff -urN dummy-libc/ports-cvstip-20060512/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S
+libc24/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S
+--- dummy-libc/ports-cvstip-20060512/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S Wed Dec 31 18:00:00 1969
++++ libc24/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S Thu Jun 01 15:31:03 2006
+@@ -0,0 +1,59 @@
++/* Jump to a new context.
++ Copyright (C) 2002, 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. */
++
++#include <sysdep.h>
++#include <rtld-global-offsets.h>
++#include <shlib-compat.h>
++
++#define __ASSEMBLY__
++#include <asm/ptrace.h>
++#include "ucontext_i.h"
++
++#define __CONTEXT_FUNC_NAME __setcontext
++#undef __CONTEXT_ENABLE_FPRS
++#undef __CONTEXT_ENABLE_VRS
++
++#include "setcontext-common.S"
++
++versioned_symbol (libc, __setcontext, setcontext, GLIBC_2_3_4)
++
++#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
++
++/* For the nofpu case the old/new versions are the same function. */
++strong_alias (__setcontext, __novec_setcontext)
++
++compat_symbol (libc, __novec_setcontext, setcontext, GLIBC_2_3_3)
++
++#endif
++
++#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_3)
++
++#define _ERRNO_H 1
++#include <bits/errno.h>
++
++ compat_text_section
++ENTRY (__setcontext_stub)
++ li r3,ENOSYS
++ b __syscall_error@local
++END (__setcontext_stub)
++ .previous
++
++compat_symbol (libc, __setcontext_stub, setcontext, GLIBC_2_0)
++
++#endif
+diff -urN dummy-libc/ports-cvstip-20060512/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S
+libc24/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S
+--- dummy-libc/ports-cvstip-20060512/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S Wed Dec 31 18:00:00 1969
++++ libc24/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S Thu Jun 01 15:31:03 2006
+@@ -0,0 +1,59 @@
++/* Save current context and jump to a new context.
++ Copyright (C) 2002, 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. */
++
++#include <sysdep.h>
++#include <rtld-global-offsets.h>
++#include <shlib-compat.h>
++
++#define __ASSEMBLY__
++#include <asm/ptrace.h>
++#include "ucontext_i.h"
++
++#define __CONTEXT_FUNC_NAME __swapcontext
++#undef __CONTEXT_ENABLE_FPRS
++#undef __CONTEXT_ENABLE_VRS
++
++# include "swapcontext-common.S"
++
++versioned_symbol (libc, __swapcontext, swapcontext, GLIBC_2_3_4)
++
++#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
++
++/* For the nofpu case the old/new versions are the same function. */
++strong_alias (__swapcontext, __novec_swapcontext)
++
++compat_symbol (libc, __novec_swapcontext, swapcontext, GLIBC_2_3_3)
++
++#endif
++
++#if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_3_3)
++
++#define _ERRNO_H 1
++#include <bits/errno.h>
++
++ compat_text_section
++ENTRY (__swapcontext_stub)
++ li r3,ENOSYS
++ b __syscall_error@local
++END (__swapcontext_stub)
++ .previous
++
++compat_symbol (libc, __swapcontext_stub, swapcontext, GLIBC_2_1)
++
++#endif
+
diff --git a/packages/glibc/files/ppc-soft-fp-20070115.patch b/packages/glibc/files/ppc-soft-fp-20070115.patch
new file mode 100644
index 0000000000..a84bc2f7cb
--- /dev/null
+++ b/packages/glibc/files/ppc-soft-fp-20070115.patch
@@ -0,0 +1,182 @@
+2007-01-14 Steven Munroe <sjmunroe@us.ibm.com>
+ Joe Kerian <jkerian@us.us.ibm.com>
+
+ [BZ #2749]
+ * soft-fp/op-4.h (__FP_FRAC_SUB_3, __FP_FRAC_SUB_4): Correct borrow
+ handling for high words.
+ * soft-fp/op-common.h (_FP_OVERFLOW_SEMIRAW): Always set inexact
+ and overflow for infinity.
+ (_FP_PACK_SEMIRAW): Update comment. Do not round if NaN or Inf.
+
+ * math/basic-test.c (truncdfsf_test): New function.
+ [!NO_LONG_DOUBLE] (trunctfsf_test): New function.
+ [!NO_LONG_DOUBLE] (trunctfdf_test): New function.
+ Change main() to do_test. Define TEST_FUNCTION. Include test-skeleton.c.
+ (do_test): Run new tests.
+
+2007-01-15 Jakub Jelinek <jakub@redhat.com>
+
+ * soft-fp/op-common.h (FP_TRUNC): When truncating a NaN, clear
+ workbits in semi-raw fraction.
+
+
+diff -urN libc25-cvstip-20070104/math/basic-test.c libc24/math/basic-test.c
+--- libc25-cvstip-20070104/math/basic-test.c 2001-07-05 23:55:35.000000000 -0500
++++ libc24/math/basic-test.c 2007-01-15 11:41:17.260963824 -0600
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1999 Free Software Foundation, Inc.
++/* Copyright (C) 1999, 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@suse.de>, 1999.
+
+@@ -107,17 +107,90 @@
+ TEST_FUNC (double_test, double, nan, DBL_EPSILON, HUGE_VAL)
+ #ifndef NO_LONG_DOUBLE
+ TEST_FUNC (ldouble_test, long double, nanl, LDBL_EPSILON, HUGE_VALL)
++
++void
++trunctfsf_test(void)
++{
++ volatile long double Inf_var, NaN_var, zero_var, one_var;
++ float x1, x2;
++
++ zero_var = 0.0;
++ one_var = 1.0;
++ NaN_var = zero_var/zero_var;
++ Inf_var = one_var / zero_var;
++
++ (void) &zero_var;
++ (void) &one_var;
++ (void) &NaN_var;
++ (void) &Inf_var;
++
++ x1 = (float)NaN_var;
++ check (" float x = (float)((long double)NaN))", isnan (x1) != 0);
++ x2 = (float)Inf_var;
++ check (" float x = (float)((long double)Inf))", isinf (x2) != 0);
++}
++
++void
++trunctfdf_test(void)
++{
++ volatile long double Inf_var, NaN_var, zero_var, one_var;
++ double x1, x2;
++
++ zero_var = 0.0;
++ one_var = 1.0;
++ NaN_var = zero_var/zero_var;
++ Inf_var = one_var / zero_var;
++
++ (void) &zero_var;
++ (void) &one_var;
++ (void) &NaN_var;
++ (void) &Inf_var;
++
++ x1 = (double)NaN_var;
++ check (" double x = (double)((long double)NaN))", isnan (x1) != 0);
++ x2 = (double)Inf_var;
++ check (" double x = (double)((long double)Inf))", isinf (x2) != 0);
++}
++
+ #endif
+
++void
++truncdfsf_test(void)
++{
++ volatile double Inf_var, NaN_var, zero_var, one_var;
++ float x1, x2;
++
++ zero_var = 0.0;
++ one_var = 1.0;
++ NaN_var = zero_var/zero_var;
++ Inf_var = one_var / zero_var;
++
++ (void) &zero_var;
++ (void) &one_var;
++ (void) &NaN_var;
++ (void) &Inf_var;
++
++ x1 = (float)NaN_var;
++ check (" float x = (float)((double)NaN))", isnan (x1) != 0);
++ x2 = (float)Inf_var;
++ check (" float x = (float)((double)Inf))", isinf (x2) != 0);
++}
++
+ int
+-main (void)
++do_test (void)
+ {
+ float_test ();
+ double_test ();
++ truncdfsf_test();
+
+ #ifndef NO_LONG_DOUBLE
+ ldouble_test ();
++ trunctfsf_test();
++ trunctfdf_test();
+ #endif
+
+ return errors != 0;
+ }
++
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+diff -urN libc25-cvstip-20070104/soft-fp/op-4.h libc24/soft-fp/op-4.h
+--- libc25-cvstip-20070104/soft-fp/op-4.h 2006-04-04 03:24:47.000000000 -0500
++++ libc24/soft-fp/op-4.h 2007-01-11 11:00:53.000000000 -0600
+@@ -564,7 +564,7 @@
+ r1 = x1 - y1; \
+ _c2 = r1 > x1; \
+ r1 -= _c1; \
+- _c2 |= r1 > _c1; \
++ _c2 |= _c1 && (y1 == x1); \
+ r2 = x2 - y2 - _c2; \
+ } while (0)
+ #endif
+@@ -578,11 +578,11 @@
+ r1 = x1 - y1; \
+ _c2 = r1 > x1; \
+ r1 -= _c1; \
+- _c2 |= r1 > _c1; \
++ _c2 |= _c1 && (y1 == x1); \
+ r2 = x2 - y2; \
+ _c3 = r2 > x2; \
+ r2 -= _c2; \
+- _c3 |= r2 > _c2; \
++ _c3 |= _c2 && (y2 == x2); \
+ r3 = x3 - y3 - _c3; \
+ } while (0)
+ #endif
+diff -urN libc25-cvstip-20070104/soft-fp/op-common.h libc24/soft-fp/op-common.h
+--- libc25-cvstip-20070104/soft-fp/op-common.h 2006-04-04 03:24:47.000000000 -0500
++++ libc24/soft-fp/op-common.h 2007-01-15 11:46:17.290882288 -0600
+@@ -1,5 +1,5 @@
+ /* Software floating-point emulation. Common operations.
+- Copyright (C) 1997,1998,1999,2006 Free Software Foundation, Inc.
++ Copyright (C) 1997,1998,1999,2006,2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com),
+ Jakub Jelinek (jj@ultra.linux.cz),
+@@ -99,10 +99,10 @@
+ else \
+ { \
+ X##_e = _FP_EXPMAX_##fs - 1; \
+- FP_SET_EXCEPTION(FP_EX_OVERFLOW); \
+- FP_SET_EXCEPTION(FP_EX_INEXACT); \
+ _FP_FRAC_SET_##wc(X, _FP_MAXFRAC_##wc); \
+ } \
++ FP_SET_EXCEPTION(FP_EX_INEXACT); \
++ FP_SET_EXCEPTION(FP_EX_OVERFLOW); \
+ } while (0)
+
+ /* Check for a semi-raw value being a signaling NaN and raise the
+@@ -1252,6 +1252,9 @@
+ _FP_FRAC_SRL_##swc(S, (_FP_WFRACBITS_##sfs \
+ - _FP_WFRACBITS_##dfs)); \
+ _FP_FRAC_COPY_##dwc##_##swc(D, S); \
++ /* Semi-raw NaN must have all workbits cleared. */ \
++ _FP_FRAC_LOW_##dwc(D) \
++ &= ~(_FP_W_TYPE) ((1 << _FP_WORKBITS) - 1); \
+ _FP_FRAC_HIGH_##dfs(D) |= _FP_QNANBIT_SH_##dfs; \
+ } \
+ } \
diff --git a/packages/glibc/glibc_2.5.bb b/packages/glibc/glibc_2.5.bb
index f9f24bbe7f..e34bf99a59 100644
--- a/packages/glibc/glibc_2.5.bb
+++ b/packages/glibc/glibc_2.5.bb
@@ -5,7 +5,7 @@ ARM_INSTRUCTION_SET = "arm"
PACKAGES_DYNAMIC = "libc6*"
RPROVIDES_${PN}-dev = "libc6-dev"
-PR = "r4"
+PR = "r5"
# the -isystem in bitbake.conf screws up glibc do_stage
BUILD_CPPFLAGS = "-I${STAGING_DIR}/${BUILD_SYS}/include"
@@ -74,7 +74,12 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.bz2 \
SRC_URI_append_sh3 = " file://no-z-defs.patch;patch=1"
SRC_URI_append_sh4 = " file://no-z-defs.patch;patch=1"
-SRC_URI_append_powerpc = " file://powerpc-sqrt-hack.diff;patch=1"
+#powerpc patches to add support for soft-float
+SRC_URI_append_powerpc= " file://ppc-sfp-machine.patch;patch=1 \
+ file://ppc-soft-fp-20070115.patch;patch=1 \
+ file://ppc-ld-nofpu-20070104.patch;patch=1 \
+ file://ppc-ports-ld-nofpu-20070114.patch;patch=1 \
+ file://powerpc-sqrt-hack.diff;patch=1""
S = "${WORKDIR}/glibc-${PV}"
B = "${WORKDIR}/build-${TARGET_SYS}"
diff --git a/packages/gpe-conf/gpe-conf-0.2.4/.mtn2git_empty b/packages/gpe-conf/gpe-conf-0.2.4/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/gpe-conf/gpe-conf-0.2.4/.mtn2git_empty
diff --git a/packages/gpe-conf/gpe-conf-0.2.4/scriptname.patch b/packages/gpe-conf/gpe-conf-0.2.4/scriptname.patch
new file mode 100644
index 0000000000..e66d509c9f
--- /dev/null
+++ b/packages/gpe-conf/gpe-conf-0.2.4/scriptname.patch
@@ -0,0 +1,13 @@
+Index: Makefile.am
+===================================================================
+--- Makefile.am (revision 9037)
++++ Makefile.am (working copy)
+@@ -178,7 +178,7 @@
+
+ install-data-hook:
+ chmod u+s $(DESTDIR)$(bindir)/gpe-conf
+- cd $(DESTDIR)/$(xscriptsdir) && mv soundsettings.sh S30soundsettings
++ cd $(DESTDIR)/$(xscriptsdir) && mv soundsettings.sh 30soundsettings
+
+ deb: dist
+ -mkdir $(top_builddir)/debian-build
diff --git a/packages/gpe-conf/gpe-conf_0.2.4.bb b/packages/gpe-conf/gpe-conf_0.2.4.bb
index 4a45b599a1..aa458d089e 100644
--- a/packages/gpe-conf/gpe-conf_0.2.4.bb
+++ b/packages/gpe-conf/gpe-conf_0.2.4.bb
@@ -3,8 +3,8 @@ SECTION = "gpe"
PRIORITY = "optional"
LICENSE = "GPL"
-DEPENDS = "gtk+ esound audiofile libgpewidget libxsettings libxsettings-client"
-RDEPENDS_${PN} = "xst xset ntpdate gpe-login gpe-icons timezones"
+DEPENDS = "gtk+ esound audiofile libgpewidget libxsettings libxsettings-client libxrandr"
+RDEPENDS_${PN} = "xst xset ntpdate gpe-login gpe-icons timezones xrandr"
RDEPENDS_gpe-conf-panel = "gpe-conf"
PR = "r1"
@@ -13,6 +13,8 @@ GPE_TARBALL_SUFFIX = "bz2"
inherit gpe autotools pkgconfig
+SRC_URI += "file://scriptname.patch;patch=1;pnum=0"
+
PACKAGES += "gpe-conf-panel"
FILES_${PN} = "${sysconfdir} ${bindir} ${datadir}/pixmaps \
diff --git a/packages/images/foonas-image.bb b/packages/images/foonas-image.bb
index f5a258b3d9..8d3541c114 100644
--- a/packages/images/foonas-image.bb
+++ b/packages/images/foonas-image.bb
@@ -75,7 +75,7 @@ turbostation_pack_image() {
PADFILE=${DEPLOY_DIR_IMAGE}/padfile.zzz
HEX_MAX_KERN_SIZE=200000
DEC_MAX_KERN_SIZE=`echo "ibase=16; $HEX_MAX_KERN_SIZE" | bc `
- HEX_MAX_ROOT_SIZE=C80000
+ HEX_MAX_ROOT_SIZE=D00000
DEC_MAX_ROOT_SIZE=`echo "ibase=16; $HEX_MAX_ROOT_SIZE" | bc `
KERNEL_SIZE=`ls -l $KERNEL | awk '{print $5}'`
if [ $KERNEL_SIZE -gt $DEC_MAX_KERN_SIZE ]; then
diff --git a/packages/linux/linux-efika_2.6.20.bb b/packages/linux/linux-efika_2.6.20.bb
index c74b6b8c4c..bb2a6dc815 100644
--- a/packages/linux/linux-efika_2.6.20.bb
+++ b/packages/linux/linux-efika_2.6.20.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "Linux Kernel for the EFIKA dev platform"
SECTION = "kernel"
LICENSE = "GPL"
-PR = "r1"
+PR = "r2"
COMPATIBLE_MACHINE = "efika"
@@ -37,6 +37,7 @@ SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
file://0030-POWERPC-Add-mpc52xx-lite5200-PCI-support.txt;p=1;patch=1 \
file://0031-sound-Add-support-for-the-MPC52xx-PSC-AC97-Link.txt;p=1;patch=1 \
file://0032-POWERPC-EFIKA-Adds-missing-interrupts-from-bestcomm-node.txt;p=1;patch=1 \
+ file://0033-EFIKA-fullduplex-prpl_aln.txt;p=1;patch=1 \
file://v4l.diff;p=1;patch=1 \
file://defconfig \
diff --git a/packages/linux/linux-turbostation/defconfig b/packages/linux/linux-turbostation/defconfig
index 4930877637..094f6f3708 100644
--- a/packages/linux/linux-turbostation/defconfig
+++ b/packages/linux/linux-turbostation/defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.20.1
-# Thu Mar 8 19:11:26 2007
+# Linux kernel version: 2.6.20.2
+# Sun Mar 11 15:29:33 2007
#
CONFIG_MMU=y
CONFIG_GENERIC_HARDIRQS=y
@@ -958,7 +958,6 @@ CONFIG_I2C_MPC=y
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_SENSORS_M41T00 is not set
# CONFIG_SENSORS_MAX6875 is not set
-# CONFIG_SENSORS_S35390A is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
diff --git a/packages/linux/linux-turbostation/linux-2.6.16_arch_ppc_syslib_open_pic.c b/packages/linux/linux-turbostation/linux-2.6.16_arch_ppc_syslib_open_pic.c
deleted file mode 100644
index 05b2a41e7f..0000000000
--- a/packages/linux/linux-turbostation/linux-2.6.16_arch_ppc_syslib_open_pic.c
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: linux-2.6.20.1/arch/ppc/syslib/open_pic.c
-===================================================================
---- linux-2.6.20.1.orig/arch/ppc/syslib/open_pic.c 2007-02-20 07:34:32.000000000 +0100
-+++ linux-2.6.20.1/arch/ppc/syslib/open_pic.c 2007-02-26 02:26:56.000000000 +0100
-@@ -318,7 +318,8 @@
- #ifdef CONFIG_EPIC_SERIAL_MODE
- /* Have to start from ground zero.
- */
-- openpic_reset();
-+ // 2005.09.06, JohnsonCheng Fixed USB device Oops bug
-+ //openpic_reset();
- #endif
-
- if (ppc_md.progress) ppc_md.progress("openpic: enter", 0x122);
diff --git a/packages/linux/linux-turbostation/linux-2.6.16_drivers_i2c_chips_Kconfig b/packages/linux/linux-turbostation/linux-2.6.16_drivers_i2c_chips_Kconfig
deleted file mode 100644
index 6cd91368f4..0000000000
--- a/packages/linux/linux-turbostation/linux-2.6.16_drivers_i2c_chips_Kconfig
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: linux-2.6.20.1/drivers/i2c/chips/Kconfig
-===================================================================
---- linux-2.6.20.1.orig/drivers/i2c/chips/Kconfig 2007-02-20 07:34:32.000000000 +0100
-+++ linux-2.6.20.1/drivers/i2c/chips/Kconfig 2007-02-26 02:27:27.000000000 +0100
-@@ -125,4 +125,12 @@
- This driver can also be built as a module. If so, the module
- will be called max6875.
-
-+config SENSORS_S35390A
-+ tristate "S-35390A RTC chip"
-+ depends on I2C && PPC32 && SANDPOINT
-+ help
-+ If you say yes here you get support for the S-35390A RTC chip/
-+
-+ This driver can also be built as a module. If so, the module
-+ will be called i2c-s3531a
- endmenu
diff --git a/packages/linux/linux-turbostation/linux-2.6.16_drivers_i2c_chips_Makefile b/packages/linux/linux-turbostation/linux-2.6.16_drivers_i2c_chips_Makefile
deleted file mode 100644
index 3378609724..0000000000
--- a/packages/linux/linux-turbostation/linux-2.6.16_drivers_i2c_chips_Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: linux-2.6.20.1/drivers/i2c/chips/Makefile
-===================================================================
---- linux-2.6.20.1.orig/drivers/i2c/chips/Makefile 2007-02-20 07:34:32.000000000 +0100
-+++ linux-2.6.20.1/drivers/i2c/chips/Makefile 2007-02-26 02:27:43.000000000 +0100
-@@ -12,6 +12,7 @@
- obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o
- obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o
- obj-$(CONFIG_TPS65010) += tps65010.o
-+obj-$(CONFIG_SENSORS_S35390A) += i2c-s3531a.o
-
- ifeq ($(CONFIG_I2C_DEBUG_CHIP),y)
- EXTRA_CFLAGS += -DDEBUG
diff --git a/packages/linux/linux-turbostation/linux-2.6.16_drivers_mtd_maps_physmap.c b/packages/linux/linux-turbostation/linux-2.6.16_drivers_mtd_maps_physmap.c
index b73b227220..e1895af53a 100644
--- a/packages/linux/linux-turbostation/linux-2.6.16_drivers_mtd_maps_physmap.c
+++ b/packages/linux/linux-turbostation/linux-2.6.16_drivers_mtd_maps_physmap.c
@@ -1,8 +1,8 @@
-Index: linux-2.6.21-rc2-git3/drivers/mtd/maps/physmap.c
+Index: linux-2.6.20.2/drivers/mtd/maps/physmap.c
===================================================================
---- linux-2.6.21-rc2-git3.orig/drivers/mtd/maps/physmap.c 2007-03-06 01:06:56.000000000 +0100
-+++ linux-2.6.21-rc2-git3/drivers/mtd/maps/physmap.c 2007-03-06 01:12:35.000000000 +0100
-@@ -134,13 +134,43 @@
+--- linux-2.6.20.2.orig/drivers/mtd/maps/physmap.c 2007-03-11 15:22:25.000000000 +0100
++++ linux-2.6.20.2/drivers/mtd/maps/physmap.c 2007-03-11 15:28:18.000000000 +0100
+@@ -134,13 +134,53 @@
}
info->mtd->owner = THIS_MODULE;
@@ -11,27 +11,37 @@ Index: linux-2.6.21-rc2-git3/drivers/mtd/maps/physmap.c
+ .name = "u-boot",
+ .offset = 0x00F00000,
+ .size = 0x00040000,
-+ .mask_flags = MTD_WRITEABLE, /* force read-only */
++ .mask_flags = MTD_WRITEABLE,
+ },
+ {
-+ .name = "kernel", /* default kernel image */
++ .name = "kernel",
+ .offset = 0x00000000,
-+ .size = 0x00280000,
++ .size = 0x00200000,
+ },
+ {
+ .name = "rootfs",
-+ .offset = 0x00280000,
-+ .size = 0x00C80000,
++ .offset = 0x00200000,
++ .size = 0x00D00000,
+ },
+ {
-+ .name = "empty",
++ .name = "u-boot env",
+ .offset = 0x00F40000,
-+ .size = 0x000A0000,
++ .size = 0x00020000,
+ },
+ {
-+ .name = "u-boot env",
-+ .offset = 0x00FE0000,
++ .name = "u-boot2",
++ .offset = 0x00F60000,
++ .size = 0x00040000,
++ },
++ {
++ .name = "u-boot2 env",
++ .offset = 0x00FA0000,
+ .size = 0x00020000,
++ },
++ {
++ .name = "sysconf",
++ .offset = 0x00FC0000,
++ .size = 0x00040000,
+ }
+};
+
@@ -43,7 +53,7 @@ Index: linux-2.6.21-rc2-git3/drivers/mtd/maps/physmap.c
return 0;
}
-
-+ physmap_set_partitions(TS101_partitions, 5);
++ physmap_set_partitions(TS101_partitions, 7);
if (physmap_data->nr_parts) {
printk(KERN_NOTICE "Using physmap partition information\n");
add_mtd_partitions(info->mtd, physmap_data->parts,
diff --git a/packages/linux/linux-turbostation/linux-2.6.16_drivers_net_r8169.c b/packages/linux/linux-turbostation/linux-2.6.16_drivers_net_r8169.c
deleted file mode 100644
index 8ba15e1a84..0000000000
--- a/packages/linux/linux-turbostation/linux-2.6.16_drivers_net_r8169.c
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: linux-2.6.20.1/drivers/net/r8169.c
-===================================================================
---- linux-2.6.20.1.orig/drivers/net/r8169.c 2007-02-26 03:33:53.000000000 +0100
-+++ linux-2.6.20.1/drivers/net/r8169.c 2007-02-26 03:34:21.000000000 +0100
-@@ -1522,7 +1522,7 @@
- goto err_out_disable_2;
-
- /* save power state before pci_enable_device overwrites it */
-- pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
-+ pm_cap = 220; // pci_find_capability(pdev, PCI_CAP_ID_PM)
- if (pm_cap) {
- u16 pwr_command, acpi_idle_state;
-
diff --git a/packages/linux/linux-turbostation_2.6.20.1.bb b/packages/linux/linux-turbostation_2.6.20.2.bb
index a74bf1475a..84701e4a6a 100644
--- a/packages/linux/linux-turbostation_2.6.20.1.bb
+++ b/packages/linux/linux-turbostation_2.6.20.2.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Linux Kernel for the QNAP TurboStation platform"
SECTION = "kernel"
LICENSE = "GPL"
DEPENDS = "uboot-utils"
-PR = "r6"
+PR = "r1"
COMPATIBLE_MACHINE = "turbostation"
@@ -11,17 +11,13 @@ RDEPENDS_kernel-module-zd1211rw += "zd1211-firmware"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
file://001_r1000.diff;patch=1 \
file://linux-2.6.16_arch_ppc_platforms_sandpoint.h;patch=1 \
- file://linux-2.6.16_drivers_i2c_chips_Makefile;patch=1 \
file://002_qnap-pic.diff;patch=1 \
file://linux-2.6.16_arch_ppc_syslib_Makefile;patch=1 \
file://linux-2.6.16_drivers_mtd_maps_physmap.c;patch=1 \
file://linux-2.6.16_arch_ppc_syslib_mpc10x_common.c;patch=1 \
- file://linux-2.6.16_drivers_net_r8169.c;patch=1 \
file://linux-2.6.16_arch_ppc_platforms_Makefile;patch=1 \
- file://linux-2.6.16_arch_ppc_syslib_open_pic.c;patch=1 \
file://linux-2.6.16_include_asm-ppc_mpc10x.h;patch=1 \
file://linux-2.6.16_arch_ppc_platforms_sandpoint.c;patch=1 \
- file://linux-2.6.16_drivers_i2c_chips_Kconfig;patch=1 \
file://defconfig"
S = "${WORKDIR}/linux-${PV}"
diff --git a/packages/meta/foonas-packages.bb b/packages/meta/foonas-packages.bb
index 822b7afb2d..da3cb40de7 100644
--- a/packages/meta/foonas-packages.bb
+++ b/packages/meta/foonas-packages.bb
@@ -45,6 +45,7 @@ FOONAS_PACKAGES = "\
flite \
gallery \
gawk \
+ gcc \
gdbm \
gnu-config \
grep \
@@ -119,6 +120,7 @@ FOONAS_PACKAGES = "\
syslog-ng \
tar \
thttpd \
+ tzdata \
tiff \
unzip \
usbutils \
diff --git a/packages/perl/perl-5.8.7/config.sh-powerpc-linux b/packages/perl/perl-5.8.7/config.sh-powerpc-linux
index d0b79ae484..0ca31c1230 100644
--- a/packages/perl/perl-5.8.7/config.sh-powerpc-linux
+++ b/packages/perl/perl-5.8.7/config.sh-powerpc-linux
@@ -971,7 +971,7 @@ useperlio='define'
useposix='true'
usereentrant='undef'
usesfio='false'
-useshrplib='true'
+useshrplib='fasle'
usesitecustomize='undef'
usesocks='undef'
usethreads='undef'
diff --git a/packages/picocom/picocom/.mtn2git_empty b/packages/picocom/picocom/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/picocom/picocom/.mtn2git_empty
diff --git a/packages/picocom/picocom/gcc4.patch b/packages/picocom/picocom/gcc4.patch
new file mode 100644
index 0000000000..867ca11bf3
--- /dev/null
+++ b/packages/picocom/picocom/gcc4.patch
@@ -0,0 +1,12 @@
+Index: picocom-1.4/picocom.c
+===================================================================
+--- picocom-1.4.orig/picocom.c 2004-08-12 13:45:11.000000000 +0200
++++ picocom-1.4/picocom.c 2007-03-08 14:40:30.000000000 +0100
+@@ -37,6 +37,7 @@
+ #include <sys/stat.h>
+ #include <sys/wait.h>
+ #include <limits.h>
++#include <bits/posix1_lim.h>
+
+ #define _GNU_SOURCE
+ #include <getopt.h>
diff --git a/packages/picocom/picocom/nolock.patch b/packages/picocom/picocom/nolock.patch
new file mode 100644
index 0000000000..42ca57f927
--- /dev/null
+++ b/packages/picocom/picocom/nolock.patch
@@ -0,0 +1,35 @@
+diff -Naur picocom-1.4.orig/picocom.c picocom-1.4/picocom.c
+--- picocom-1.4.orig/picocom.c 2004-08-12 13:45:11.000000000 +0200
++++ picocom-1.4/picocom.c 2007-03-12 00:23:01.000000000 +0100
+@@ -790,7 +790,9 @@
+ {"escape", required_argument, 0, 'e'},
+ {"noinit", no_argument, 0, 'i'},
+ {"noreset", no_argument, 0, 'r'},
++#ifdef UUCP_LOCK_DIR
+ {"nolock", no_argument, 0, 'l'},
++#endif
+ {"flow", required_argument, 0, 'f'},
+ {"baud", required_argument, 0, 'b'},
+ {"parity", required_argument, 0, 'p'},
+@@ -827,9 +829,11 @@
+ case 'r':
+ opts.noreset = 1;
+ break;
++#ifdef UUCP_LOCK_DIR
+ case 'l':
+ opts.nolock = 1;
+ break;
++#endif
+ case 'e':
+ if ( isupper(optarg[0]) )
+ opts.escape = optarg[0] - 'A' + 1;
+@@ -930,7 +934,9 @@
+ printf("escape is : C-%c\n", 'a' + opts.escape - 1);
+ printf("noinit is : %s\n", opts.noinit ? "yes" : "no");
+ printf("noreset is : %s\n", opts.noreset ? "yes" : "no");
++#ifdef UUCP_LOCK_DIR
+ printf("nolock is : %s\n", opts.nolock ? "yes" : "no");
++#endif
+ printf("send_cmd is : %s\n", opts.send_cmd);
+ printf("receive_cmd is : %s\n", opts.receive_cmd);
+ printf("\n");
diff --git a/packages/picocom/picocom_1.4.bb b/packages/picocom/picocom_1.4.bb
index 04640903b5..8bc3b89e8c 100644
--- a/packages/picocom/picocom_1.4.bb
+++ b/packages/picocom/picocom_1.4.bb
@@ -1,10 +1,13 @@
-DESCRIPTION = "Picocom is a lightweight and minimal (~20K) dumb-terminal emulation program. "
+DESCRIPTION = "Lightweight and minimal (~20K) dumb-terminal emulation program."
SECTION = "console/utils"
PRIORITY = "optional"
LICENSE = "GPL"
-SRC_URI = "http://efault.net/npat/hacks/picocom/dist/picocom-${PV}.tar.gz"
+PR = "r1"
-CFLAGS_append = ' -DVERSION_STR=\\"${PV}\\"'
+SRC_URI = "http://efault.net/npat/hacks/picocom/dist/picocom-${PV}.tar.gz \
+ file://gcc4.patch;patch=1"
+
+CFLAGS_append = ' -DVERSION_STR=\\"${PV}\\" -DUUCP_LOCK_DIR'
do_install () {
install -d ${D}${bindir}
diff --git a/packages/procps/procps.inc b/packages/procps/procps.inc
new file mode 100644
index 0000000000..ddc8030077
--- /dev/null
+++ b/packages/procps/procps.inc
@@ -0,0 +1,14 @@
+DESCRIPTION = "Procps is the package that has a bunch \
+of small useful utilities that give information \
+about processes using the /proc filesystem. The package \
+includes the programs ps, top, vmstat, w, kill, and skill."
+HOMEPAGE = "http://procps.sf.net"
+SECTION = "base"
+PRIORITY = "optional"
+LICENSE = "GPL"
+DEPENDS = "ncurses"
+
+SRC_URI = "http://procps.sourceforge.net/procps-${PV}.tar.gz \
+ file://install.patch;patch=1"
+
+inherit autotools
diff --git a/packages/procps/procps_3.1.15.bb b/packages/procps/procps_3.1.15.bb
index 12d6a43fd2..01114e80dc 100644
--- a/packages/procps/procps_3.1.15.bb
+++ b/packages/procps/procps_3.1.15.bb
@@ -1,17 +1,6 @@
-LICENSE = "GPL"
-DESCRIPTION = "Procps is the package that has a bunch \
-of small useful utilities that give information \
-about processes using the /proc filesystem. The package \
-includes the programs ps, top, vmstat, w, kill, and skill."
-SECTION = "base"
-PRIORITY = "optional"
-DEPENDS = "ncurses"
+require procps.inc
-SRC_URI = "http://procps.sourceforge.net/procps-${PV}.tar.gz \
- file://procps_${PV}-2.diff;patch=1 \
- file://install.patch;patch=1"
-
-inherit autotools
+SRC_URI += "file://procps_${PV}-2.diff;patch=1"
EXTRA_OEMAKE = "CFLAGS=-I${STAGING_INCDIR} \
LDFLAGS=-L${STAGING_LIBDIR} -Wl,--rpath-link,${STAGING_LIBDIR} \
diff --git a/packages/procps/procps_3.2.1.bb b/packages/procps/procps_3.2.1.bb
index 3c0aaf547a..33df399c5f 100644
--- a/packages/procps/procps_3.2.1.bb
+++ b/packages/procps/procps_3.2.1.bb
@@ -1,18 +1,8 @@
-LICENSE = "GPL"
-DESCRIPTION = "Procps is the package that has a bunch \
-of small useful utilities that give information \
-about processes using the /proc filesystem. The package \
-includes the programs ps, top, vmstat, w, kill, and skill."
-SECTION = "base"
-PRIORITY = "optional"
-DEPENDS = "ncurses"
-PR = "r1"
+require procps.inc
-SRC_URI = "http://procps.sourceforge.net/procps-${PV}.tar.gz \
- file://install.patch;patch=1 \
- file://pagesz-not-constant.patch;patch=1"
+PR = "r1"
-inherit autotools
+SRC_URI += "file://pagesz-not-constant.patch;patch=1"
EXTRA_OEMAKE = "CFLAGS=-I${STAGING_INCDIR} \
LDFLAGS=-L${STAGING_LIBDIR} -Wl,--rpath-link,${STAGING_LIBDIR} \
diff --git a/packages/procps/procps_3.2.5.bb b/packages/procps/procps_3.2.5.bb
index 5101874a5b..de7524b2cb 100644
--- a/packages/procps/procps_3.2.5.bb
+++ b/packages/procps/procps_3.2.5.bb
@@ -1,21 +1,10 @@
-LICENSE = "GPL"
-DESCRIPTION = "Procps is the package that has a bunch \
-of small useful utilities that give information \
-about processes using the /proc filesystem. The package \
-includes the programs ps, top, vmstat, w, kill, and skill."
-SECTION = "base"
-PRIORITY = "optional"
-DEPENDS = "ncurses"
-PR = "r5"
-
-SRC_URI = "http://procps.sourceforge.net/procps-${PV}.tar.gz \
- file://install.patch;patch=1 \
- file://procmodule.patch;patch=1 \
- file://psmodule.patch;patch=1"
+require procps.inc
+PR = "r5"
+SRC_URI += "file://procmodule.patch;patch=1 \
+ file://psmodule.patch;patch=1"
-inherit autotools
FILES = "${bindir}/top.${PN} ${base_bindir}/ps.${PN} ${bindir}/uptime.${PN} ${base_bindir}/kill.${PN} \
${bindir}/free.${PN} ${bindir}/w ${bindir}/watch ${bindir}/pgrep ${bindir}/pmap ${bindir}/pwdx \
${bindir}/snice ${bindir}/vmstat ${bindir}/slabtop ${bindir}/pkill ${bindir}/skill ${bindir}/tload \
diff --git a/packages/procps/procps_3.2.7.bb b/packages/procps/procps_3.2.7.bb
index 5101874a5b..de7524b2cb 100644
--- a/packages/procps/procps_3.2.7.bb
+++ b/packages/procps/procps_3.2.7.bb
@@ -1,21 +1,10 @@
-LICENSE = "GPL"
-DESCRIPTION = "Procps is the package that has a bunch \
-of small useful utilities that give information \
-about processes using the /proc filesystem. The package \
-includes the programs ps, top, vmstat, w, kill, and skill."
-SECTION = "base"
-PRIORITY = "optional"
-DEPENDS = "ncurses"
-PR = "r5"
-
-SRC_URI = "http://procps.sourceforge.net/procps-${PV}.tar.gz \
- file://install.patch;patch=1 \
- file://procmodule.patch;patch=1 \
- file://psmodule.patch;patch=1"
+require procps.inc
+PR = "r5"
+SRC_URI += "file://procmodule.patch;patch=1 \
+ file://psmodule.patch;patch=1"
-inherit autotools
FILES = "${bindir}/top.${PN} ${base_bindir}/ps.${PN} ${bindir}/uptime.${PN} ${base_bindir}/kill.${PN} \
${bindir}/free.${PN} ${bindir}/w ${bindir}/watch ${bindir}/pgrep ${bindir}/pmap ${bindir}/pwdx \
${bindir}/snice ${bindir}/vmstat ${bindir}/slabtop ${bindir}/pkill ${bindir}/skill ${bindir}/tload \
diff --git a/packages/rglueap/rglueap_0.1.bb b/packages/rglueap/rglueap_0.1.bb
index 2d6cd2c41b..c26bf31eaa 100644
--- a/packages/rglueap/rglueap_0.1.bb
+++ b/packages/rglueap/rglueap_0.1.bb
@@ -1,10 +1,12 @@
-DESCRIPTION = "Raw Glue AP"
-SECTION = "console/network"
+DESCRIPTION = "Raw Glue AP, wireless intrusion detection"
+AUTHOR = "Laurent Butti"
HOMEPAGE = "http://rfakeap.tuxfamily.org/#Raw_Glue_AP"
+SECTION = "console/network"
+PRIORITY = "optional"
LICENSE = "GPLv2"
DEPENDS = "libpcap"
-SRC_URI = "http://rfakeap.tuxfamily.org/rglueap-${PV}.tar.gz"
+SRC_URI = "http://rfakeap.tuxfamily.org/${P}.tar.gz"
LDFLAGS += "-lpcap"
diff --git a/packages/speex/speex_1.1.12+1.2beta1.bb b/packages/speex/speex_1.1.12+1.2beta1.bb
index d0f33bf681..01bd93909e 100644
--- a/packages/speex/speex_1.1.12+1.2beta1.bb
+++ b/packages/speex/speex_1.1.12+1.2beta1.bb
@@ -3,7 +3,7 @@ SECTION = "libs"
LICENSE = "BSD"
HOMEPAGE = "http://www.speex.org"
DEPENDS = "libogg"
-PR = "r0"
+PR = "r1"
SRC_URI = "http://downloads.us.xiph.org/releases/speex/speex-1.2beta1.tar.gz"
S = "${WORKDIR}/${PN}-1.2beta1"
@@ -22,6 +22,7 @@ inherit autotools pkgconfig
EXTRA_OECONF_append_openmn = " --enable-arm5e-asm --enable-fixed-point"
EXTRA_OECONF_append_amsdelta = " --enable-arm4-asm --enable-fixed-point"
EXTRA_OECONF_append_arm = " --enable-fixed-point "
+EXTRA_OECONF_append_dht-walnut = " --enable-fixed-point "
do_configure_append() {
sed -i s/"^OGG_CFLAGS.*$"/"OGG_CFLAGS = "/g Makefile */Makefile */*/Makefile
diff --git a/packages/tasks/task-mokogateway.bb b/packages/tasks/task-mokogateway.bb
index 1d05af8c4f..fe8672381a 100644
--- a/packages/tasks/task-mokogateway.bb
+++ b/packages/tasks/task-mokogateway.bb
@@ -3,7 +3,7 @@ ALLOW_EMPTY = "1"
PACKAGE_ARCH = "all"
LICENSE = "MIT"
PROVIDES = "task-mokogateway-everything"
-PR = "2"
+PR = "r3"
PACKAGES = "\
task-mokogateway-everything \
@@ -53,9 +53,10 @@ RRECOMMENDS_task-mokogateway-bluetooth = "\
DESCRIPTION_task-mokogateway-wifi = "MokoGateway: WiFi"
RDEPENDS_task-mokogateway-wifi = "\
+ bridge-utils \
wireless-tools \
- ${@base_contains("COMBINED_FEATURES", "pcmcia", "hostap-utils", "",d)} \
- ${@base_contains("COMBINED_FEATURES", "pci", "hostap-utils", "",d)} \
+ ${@base_contains("COMBINED_FEATURES", "pci", "madwifi-ng-modules", "",d)} \
+ ${@base_contains("COMBINED_FEATURES", "pci", "madwifi-ng-tools", "",d)} \
wpa-supplicant \
"
RRECOMMENDS_task-mokogateway-wifi = "\
diff --git a/packages/xorg-xserver/xserver-kdrive/kdrive-imageon.patch b/packages/xorg-xserver/xserver-kdrive/kdrive-imageon.patch
index 376074951f..86ab49e1b2 100644
--- a/packages/xorg-xserver/xserver-kdrive/kdrive-imageon.patch
+++ b/packages/xorg-xserver/xserver-kdrive/kdrive-imageon.patch
@@ -1,4 +1,3 @@
-
# Author: Manuel Teira <manuel.teira@telefonica.net> (sirfred in #oe)
# Description: New driver for the Imageon ATI Card. Implementing:
# -Hardware solid fills
@@ -12,8 +11,8 @@
# Patch managed by http://www.holgerschurig.de/patcher.html
#
---- xorg-server-X11R7.1-1.1.0.orig/configure.ac~kdrive-imageon
-+++ xorg-server-X11R7.1-1.1.0.orig/configure.ac
+--- xorg-server-X11R7.1-1.1.0.work/configure.ac~kdrive-imageon
++++ xorg-server-X11R7.1-1.1.0.work/configure.ac
@@ -435,6 +435,7 @@
AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no])
AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto])
@@ -42,8 +41,8 @@
hw/kdrive/i810/Makefile
hw/kdrive/linux/Makefile
hw/kdrive/mach64/Makefile
---- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/Makefile.am~kdrive-imageon
-+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/Makefile.am
+--- xorg-server-X11R7.1-1.1.0.work/hw/kdrive/Makefile.am~kdrive-imageon
++++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/Makefile.am
@@ -1,18 +1,9 @@
-if KDRIVEVESA
-VESA_SUBDIRS = vesa ati chips epson i810 mach64 mga neomagic nvidia pm2 r128 \
@@ -78,7 +77,7 @@
DIST_SUBDIRS = vesa ati chips epson i810 mach64 mga neomagic nvidia pm2 r128 \
smi via fbdev sdl ephyr src linux fake sis300
--- /dev/null
-+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/imageon/Makefile.am
++++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/Makefile.am
@@ -0,0 +1,47 @@
+if KDRIVEFBDEV
+FBDEV_INCLUDES =-I$(top_srcdir)/hw/kdrive/fbdev
@@ -128,8 +127,8 @@
+ libimageon.a \
+ $(FBDEV_LIBS)
--- /dev/null
-+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/imageon/imageon.c
-@@ -0,0 +1,523 @@
++++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon.c
+@@ -0,0 +1,607 @@
+/*
+ * Copyright © 2007 Manuel Teira
+ *
@@ -157,19 +156,69 @@
+#endif
+#include "imageon.h"
+#include "imageon_regs.h"
++#include "imageon_support.h"
++
++W100CardEntry w100_cards[] = {
++ {0x1002, 0x5644, 0, "ATI Imageon 3200"},
++ {0x1002, 0x5741, W100XVSupport, "ATI Imageon 100"},
++ {0x1002, 0x5744, 0, "ATI Imageon 3220"},
++ {0, 0, 0, NULL}
++};
+
-+struct pci_id_entry w100_pci_ids[] = {
-+ {0x1002, 0x5644, 0, "ATI Imageon 3200"},
-+ {0x1002, 0x5741, 0, "ATI Imageon 100"},
-+ {0x1002, 0x5744, 0, "ATI Imageon 3220"},
-+ {0, 0, 0, NULL}
++W100ModeSpec w100_modes[] = {
++ {800, 600, 16, W100_EXTMEM, FALSE},
++ {640, 480, 16, W100_EXTMEM, FALSE},
++ {320, 240, 16, W100_INTMEM, FALSE},
++ { 0, 0, 0, 0, FALSE}
+};
+
++W100StartupInfo w100StartupInfo;
++
++extern void (*tslib_transform_coords)(long *x, long *y, void *closure);
++extern void *tslib_transform_closure;
++
++static void
++W100Startup(W100CardInfo *w100c)
++{
++ int i;
++ DBG_IMAGEON(("--W100Startup\n"));
++ W100ModeSpec *modes;
++ /* Take the current graphics mode */
++ if (!W100GetFbMode(w100c, &w100StartupInfo.mode)) {
++ ErrorF("(E) Unable to get current mode\n");
++ }
++ w100StartupInfo.randr = W100GetRotation(w100c);
++ w100StartupInfo.portrait = w100StartupInfo.mode.width < w100StartupInfo.mode.height;
++
++ /* Test the valid modes */
++ for (modes = w100_modes; modes->width; modes++) {
++ modes->supported = W100CheckFbMode(w100c, modes);
++ }
++
++ DBG_IMAGEON(("Startup Mode: %dx%d@%d, rot: %d, portrait: %s\n",
++ w100StartupInfo.mode.width,
++ w100StartupInfo.mode.height,
++ w100StartupInfo.mode.bpp,
++ w100StartupInfo.randr,
++ w100StartupInfo.portrait ? "Yes" : "No"));
++
++ /* Tell the kernel to never switch off external memory */
++ W100SysFsSet(w100c, W100_SYSFS_BASE "extmem", "1");
++
++ /* Disable framebuffer accel */
++ W100SysFsSet(w100c, W100_SYSFS_BASE "accel", "0");
++
++ /* Enable fastsysclk */
++ W100SysFsSet(w100c, W100_SYSFS_BASE "fastpllclk", "1");
++
++}
++
++
+static Bool
+W100Map(KdCardInfo * card, W100CardInfo *w100c)
+{
-+ w100c->mem_base = (CARD8 *) KdMapDevice(W100_MEM_BASE,
-+ W100_MEM_SIZE);
++ DBG_IMAGEON(("--W100Map\n"));
++ w100c->mem_base = (CARD8 *) KdMapDevice(W100_MEM_BASE, W100_MEM_SIZE);
+
+ if (w100c->mem_base == NULL) {
+ return FALSE;
@@ -182,8 +231,7 @@
+ * There's only difference when HAVE_ASM_MTRR_H is defined.
+ * So, this call is doing nothing.
+ */
-+ KdSetMappedMode(W100_MEM_BASE, W100_MEM_SIZE,
-+ KD_MAPPED_MODE_REGISTERS);
++ KdSetMappedMode(W100_MEM_BASE, W100_MEM_SIZE, KD_MAPPED_MODE_REGISTERS);
+
+ return TRUE;
+}
@@ -191,77 +239,108 @@
+static void
+W100Unmap(KdCardInfo * card, W100CardInfo *w100c)
+{
++ DBG_IMAGEON(("--W100Unmap\n"));
+ if (w100c->mem_base) {
-+ KdResetMappedMode(W100_MEM_BASE, W100_MEM_SIZE,
++ KdResetMappedMode(W100_MEM_BASE, W100_MEM_SIZE,
+ KD_MAPPED_MODE_REGISTERS);
+ KdUnmapDevice((void *) w100c->mem_base, W100_MEM_SIZE);
+ w100c->mem_base = w100c->reg_base = 0;
+ }
+}
+
++static void W100MemSetup(W100CardInfo *w100c)
++{
++ int reg_value;
++ int int_start, int_size;
++ int ext_start, ext_size;
++ int i;
++ DBG_IMAGEON(("--W100MemSetup\n"));
++
++ for (i = 0; i < w100c->num_memareas; i++) {
++ xfree(w100c->memareas[i]);
++ }
++ xfree(w100c->memareas);
++
++ reg_value = MMIO_IN32(mmMC_FB_LOCATION);
++ int_start = (reg_value & 0xffff) << 8;
++ int_size = (((reg_value >> 16) & 0xffff) - (reg_value & 0xffff)) << 8;
++ DBG_IMAGEON(("(I) MC_FB_LOCATION: 0x%08x. Start: 0x%08x, size: %d\n",
++ reg_value, int_start, int_size));
++
++ reg_value = MMIO_IN32(mmMC_EXT_MEM_LOCATION);
++ ext_start = (reg_value & 0xffff) << 8;
++ ext_size = (((reg_value >> 16) & 0xffff) - (reg_value & 0xffff)) << 8;
++ DBG_IMAGEON(("(I) MC_EXT_MEM_LOCATION: 0x%08x. Start: 0x%08x, size: %d\n",
++ reg_value, ext_start, ext_size));
++
++ w100c->num_memareas = (ext_size > 0) ? 2 : 1;
++ w100c->memareas = xcalloc(sizeof(W100MemArea *), w100c->num_memareas);
++
++ w100c->memareas[W100_INTMEM] = xcalloc(sizeof(W100MemArea), 1);
++ w100c->memareas[W100_INTMEM]->priority = KD_VIDMEM_MAXPRIO;
++ w100c->memareas[W100_INTMEM]->start = (CARD8 *) int_start;
++ w100c->memareas[W100_INTMEM]->size = int_size;
++
++ if (w100c->num_memareas == 2) {
++ w100c->memareas[W100_EXTMEM] = xcalloc(sizeof(W100MemArea), 1);
++ w100c->memareas[W100_EXTMEM]->priority = KD_VIDMEM_MINPRIO;
++ w100c->memareas[W100_EXTMEM]->start = (CARD8 *) ext_start;
++ w100c->memareas[W100_EXTMEM]->size = ext_size;
++ }
++
++ for (i = 0; i < w100c->num_memareas; i++) {
++ DBG_IMAGEON(("(I) Memory mapped at 0x%08x(0x%08x), size %d bytes\n",
++ W100_CARD2HOST(w100c->memareas[i]->start),
++ w100c->memareas[i]->start,
++ w100c->memareas[i]->size));
++ }
++
++}
++
+static Bool
+W100CardInit(KdCardInfo * card)
+{
+ W100CardInfo *w100c;
-+ int i;
-+ int ext_mem;
-+ int int_mem;
-+ Bool initialized = FALSE;
++
++ W100CardEntry *model = &w100_cards[0];
++ static Bool initialized = FALSE;
++
++ DBG_IMAGEON(("--W100CardInit\n"));
+
+ w100c = xcalloc(sizeof(W100CardInfo), 1);
+ if (w100c == NULL)
+ return FALSE;
+
-+ if (!initialized && fbdevInitialize(card, &w100c->fbdev)) {
-+ initialized = TRUE;
++ if (!fbdevInitialize(card, &w100c->fbdev)) {
++ return FALSE;
+ }
+
-+ if (!initialized || !W100Map(card, w100c)) {
++ if (!W100Map(card, w100c)) {
+ xfree(w100c);
+ return FALSE;
+ }
+ card->driver = w100c;
+
-+ for (i = 0; w100_pci_ids[i].name != NULL; i++) {
-+ if (w100_pci_ids[i].device == card->attr.deviceID) {
-+ w100c->pci_id = &w100_pci_ids[i];
++ while (model->name) {
++ if (model->device == card->attr.deviceID) {
++ w100c->card_id = model;
+ break;
+ }
++ model++;
+ }
-+ ErrorF("Using ATI card: %s\n", w100c->pci_id->name);
-+
-+ ext_mem = MMIO_IN32(mmMC_EXT_MEM_LOCATION);
-+ int_mem = MMIO_IN32(mmMC_FB_LOCATION);
-+
-+ w100c->memareas[0].priority = KD_VIDMEM_MAXPRIO;
-+ w100c->memareas[0].start = (CARD8 *) ((int_mem & 0xffff) << 8);
-+ w100c->memareas[0].size =
-+ (((int_mem >> 16) & 0xffff) - (int_mem & 0xffff)) << 8;
+
++ ErrorF("(I) Using ATI card: %s\n", w100c->card_id->name);
+
-+ w100c->memareas[1].priority = KD_VIDMEM_MINPRIO;
-+ w100c->memareas[1].start = (CARD8 *)((ext_mem & 0xffff) << 8);
-+ w100c->memareas[1].size =
-+ (((ext_mem >> 16) & 0xffff) - (ext_mem & 0xffff)) << 8;
++ if (!initialized) {
++ initialized = TRUE;
++ W100Startup(w100c);
++ }
+
-+ /* Get some register values */
-+ w100c->regs.ENG_CNTL = MMIO_IN32(mmENG_CNTL);
-+ w100c->regs.VIDEO_CTRL = MMIO_IN32(mmVIDEO_CTRL);
-+ w100c->regs.GRAPHIC_H_DISP = MMIO_IN32(mmGRAPHIC_H_DISP);
-+ w100c->regs.GRAPHIC_V_DISP = MMIO_IN32(mmGRAPHIC_V_DISP);
++ w100c->hw_window.mode = W100GetModeSpec(w100c, &w100StartupInfo.mode);
++ w100c->hw_window.randr = w100StartupInfo.randr;
+
-+ DBG_IMAGEON(("Internal memory at 0x%08x(0x%08x), size %d bytes\n"
-+ "External memory at 0x%08x(0x%08x), size %d bytes\n",
-+ w100c->memareas[0].start,
-+ W100_CARD2HOST(w100c->memareas[0].start),
-+ w100c->memareas[0].size,
-+ w100c->memareas[1].start,
-+ W100_CARD2HOST(w100c->memareas[1].start),
-+ w100c->memareas[1].size));
-+
-+ /* TODO: Change this to honour the framebuffer initial orientation? */
-+ w100c->defaultRandR = RR_Rotate_90;
-+ w100c->hwScreen.randr = w100c->defaultRandR;
++ tslib_transform_closure = w100c;
++ tslib_transform_coords = W100TransformTsLibCoordinates;
+ return TRUE;
+}
+
@@ -271,45 +350,63 @@
+{
+ W100CardInfo *w100c = (W100CardInfo *) card->driver;
+
++ DBG_IMAGEON(("--W100CardFini\n"));
+ W100Unmap(card, w100c);
+ fbdevCardFini(card);
+}
+
+static void
-+W100MemSetup(KdScreenInfo *screen)
++W100Setup(KdScreenInfo *screen)
+{
+ W100CardInfo(screen);
+ W100MemArea *mem;
++ KdMouseMatrix m;
+ int fb_size, i;
+
++ DBG_IMAGEON(("--W100Setup\n"));
++
++ /* Adjust mode */
++ w100c->hw_window.width = screen->width;
++ w100c->hw_window.height = screen->height;
++ w100c->hw_window.bpp = screen->fb[0].bitsPerPixel;
++ W100SetupGraphicWindow(w100c);
++
++ /* Get some register values */
++ w100c->regs.ENG_CNTL = MMIO_IN32(mmENG_CNTL);
++ w100c->regs.VIDEO_CTRL = MMIO_IN32(mmVIDEO_CTRL);
++ w100c->regs.GRAPHIC_H_DISP = MMIO_IN32(mmGRAPHIC_H_DISP);
++ w100c->regs.GRAPHIC_V_DISP = MMIO_IN32(mmGRAPHIC_V_DISP);
++ w100c->regs.DISP_DEBUG2 = MMIO_IN32(mmDISP_DEBUG2);
++
++ W100MemSetup(w100c);
++
+ /* Clear the VideoMemAreas set up by the framebuffer initialization */
+ for (i = 0; i < screen->num_videomem_areas; i++) {
+ xfree(screen->videomem_areas[i]);
+ }
+ xfree(screen->videomem_areas);
+
-+ screen->videomem_areas = xcalloc(sizeof(KdVideoMemArea *),
-+ W100_MEMAREAS);
-+ screen->num_videomem_areas = W100_MEMAREAS;
++ screen->videomem_areas = xcalloc(sizeof(KdVideoMemArea *),
++ w100c->num_memareas);
++ screen->num_videomem_areas = w100c->num_memareas;
+
++ screen->fb[0].byteStride = screen->width * screen->fb[0].bitsPerPixel / 8;
+ fb_size = screen->fb[0].byteStride * screen->height;
-+ DBG_IMAGEON(("Framebuffer required size: %d bytes\n", fb_size));
-+ /* Try to place the framebuffer in the best VideoMemArea */
-+ for (i = 0; i < W100_MEMAREAS; i++) {
-+ mem = &w100c->memareas[i];
++
++ DBG_IMAGEON(("(I) Framebuffer required size: %d bytes\n", fb_size));
++
++ for (i = 0; i < w100c->num_memareas; i++) {
++ mem = w100c->memareas[i];
+ screen->videomem_areas[i] = xcalloc(sizeof(KdVideoMemArea), 1);
-+ if (fb_size <= mem->size) {
-+ DBG_IMAGEON(("Setting FrameBuffer to w100 address 0x%08x\n",
-+ mem->start));
-+ screen->fb[0].frameBuffer = W100_CARD2HOST(mem->start);
-+ screen->videomem_areas[i]->priority = mem->priority;
-+ screen->videomem_areas[i]->base = W100_CARD2HOST(mem->start);
-+ screen->videomem_areas[i]->size = mem->size;
++ screen->videomem_areas[i]->priority = mem->priority;
++ screen->videomem_areas[i]->base = W100_CARD2HOST(mem->start);
++ screen->videomem_areas[i]->size = mem->size;
++ if (w100c->hw_window.mode->fbpool == i) {
++ DBG_IMAGEON(("(I) FrameBuffer in w100 memzone 0x%08x(0x%08x)\n",
++ W100_CARD2HOST(mem->start), mem->start));
+ screen->videomem_areas[i]->available_offset = fb_size;
++ screen->fb[0].frameBuffer = W100_CARD2HOST(mem->start);
+ } else {
-+ screen->videomem_areas[i]->priority = mem->priority;
-+ screen->videomem_areas[i]->base = W100_CARD2HOST(mem->start);
-+ screen->videomem_areas[i]->size = mem->size;
+ screen->videomem_areas[i]->available_offset = 0;
+ }
+ DBG_IMAGEON(("New videomem_area(priority:%d, start:0x%08x, size:%d, available_offset:%d\n",
@@ -319,24 +416,29 @@
+ screen->videomem_areas[i]->available_offset));
+ }
+
-+ w100c->hwScreen.x = 0;
-+ w100c->hwScreen.y = 0;
-+ w100c->hwScreen.width = screen->width;
-+ w100c->hwScreen.height = screen->height;
-+ w100c->hwScreen.bpp = screen->fb[0].bitsPerPixel;
-+ w100c->hwScreen.offset = W100_HOST2CARD(screen->fb[0].frameBuffer);
+
++ w100c->hw_window.offset = W100_HOST2CARD(screen->fb[0].frameBuffer);
++
++
++ W100ComputeMouseMatrix(&m, screen->randr,
++ w100StartupInfo.portrait ?
++ W100_MIN(screen->width, screen->height) :
++ W100_MAX(screen->width, screen->height),
++ w100StartupInfo.portrait ?
++ W100_MAX(screen->width, screen->height) :
++ W100_MIN(screen->width, screen->height));
++
++ KdSetMouseMatrix(&m);
+
-+ DBG_IMAGEON(("HWScreen(x:%d,y:%d,width:%d,height:%d,bpp:%d,offset:0x%08x"
++ DBG_IMAGEON(("Window(width:%d,height:%d,bpp:%d,offset:0x%08x"
+ "(0x%08x), randr:%d)\n",
-+ w100c->hwScreen.x,
-+ w100c->hwScreen.y,
-+ w100c->hwScreen.width,
-+ w100c->hwScreen.height,
-+ w100c->hwScreen.bpp,
-+ w100c->hwScreen.offset,
++ w100c->hw_window.width,
++ w100c->hw_window.height,
++ w100c->hw_window.bpp,
++ w100c->hw_window.offset,
+ screen->fb[0].frameBuffer,
-+ w100c->hwScreen.randr));
++ w100c->hw_window.randr));
++
+}
+
+static Bool
@@ -346,6 +448,7 @@
+ W100CardInfo(screen);
+ Bool success = FALSE;
+
++ DBG_IMAGEON(("--W100ScreenInit\n"));
+ w100s = xcalloc(sizeof(W100ScreenInfo), 1);
+ if (w100s == NULL)
+ return FALSE;
@@ -354,10 +457,6 @@
+ w100s->screen = screen;
+ screen->driver = w100s;
+
-+ if (screen->fb[0].depth == 0) {
-+ screen->fb[0].depth = 16;
-+ }
-+
+ success = fbdevScreenInitialize(screen, &w100s->fbdev);
+
+ if (!success) {
@@ -366,7 +465,7 @@
+ return FALSE;
+ }
+
-+ W100MemSetup(screen);
++ W100Setup(screen);
+
+ return TRUE;
+}
@@ -375,8 +474,7 @@
+W100ScreenFini(KdScreenInfo * screen)
+{
+ W100ScreenInfo *w100s = (W100ScreenInfo *) screen->driver;
-+ W100CardInfo *w100c = screen->card->driver;
-+
++ DBG_IMAGEON(("--W100ScreenFini\n"));
+ fbdevScreenFini(screen);
+ xfree(w100s);
+ screen->driver = 0;
@@ -388,7 +486,10 @@
+ KdScreenPriv(pScreen);
+ W100CardInfo(pScreenPriv);
+
-+ W100InitVideo(pScreen);
++ DBG_IMAGEON(("--W100InitScreen\n"));
++ if (w100c->card_id->caps & W100XVSupport) {
++ W100InitVideo(pScreen);
++ }
+ return fbdevInitScreen(pScreen);
+}
+
@@ -403,35 +504,42 @@
+ KdScreenInfo *screen = pScreenPriv->screen;
+ W100CardInfo(pScreenPriv);
+ Bool screenEnabled = pScreenPriv->enabled;
-+ KdMouseMatrix m;
+
-+ DBG_IMAGEON(("W100RandRSetConfig(randr:%d,pSize:%dx%d)\n",
++ DBG_IMAGEON(("--W100RandRSetConfig(randr:%d,pSize:%dx%d)\n",
+ randr, pSize->width, pSize->height));
+
-+
+ if (screenEnabled) {
+ KdDisableScreen(pScreen);
+ }
-+ KdOffscreenSwapOut(screen->pScreen);
+
+ if (randr & (RR_Rotate_0|RR_Rotate_180)) {
-+ pScreen->width = w100c->fbdev.var.xres;
-+ pScreen->height = w100c->fbdev.var.yres;
+ pScreen->mmWidth = screen->width_mm;
+ pScreen->mmHeight = screen->height_mm;
++ pScreen->width = pSize->width;
++ pScreen->height = pSize->height;
+ } else {
-+ pScreen->width = w100c->fbdev.var.yres;
-+ pScreen->height = w100c->fbdev.var.xres;
+ pScreen->mmWidth = screen->height_mm;
+ pScreen->mmHeight = screen->width_mm;
++ pScreen->width = pSize->height;
++ pScreen->height = pSize->width;
+ }
+
-+ KdComputeMouseMatrix(&m, randr, screen->width, screen->height);
-+ KdSetMouseMatrix(&m);
-+
++ screen->randr = randr;
+ screen->width = pScreen->width;
+ screen->height = pScreen->height;
-+ screen->fb[0].byteStride = screen->width * screen->fb[0].bitsPerPixel / 8;
++ w100c->hw_window.randr = KdAddRotation(randr, w100StartupInfo.randr);
++ w100c->hw_window.mode = W100GetBestMode(w100c, pScreen->width, pScreen->height);
++
++ KdOffscreenSwapOut(screen->pScreen);
++
++ W100Setup(screen);
++
++ DBG_IMAGEON(("ModifyPixMapHeader(width:%d,height:%d,depth:%d,bpp:%d,bs:%d,fb:0x%08x)\n", pScreen->width, pScreen->height,
++ screen->fb[0].depth,
++ screen->fb[0].bitsPerPixel,
++ screen->fb[0].byteStride,
++ screen->fb[0].frameBuffer));
++
+
+ (*pScreen->ModifyPixmapHeader) (fbGetScreenPixmap(pScreen),
+ pScreen->width,
@@ -442,77 +550,38 @@
+ screen->fb[0].frameBuffer);
+
+
-+ w100c->hwScreen.randr &= ~RR_Rotate_All;
-+ switch (randr & RR_Rotate_All) {
-+ case RR_Rotate_0:
-+ switch (w100c->defaultRandR) {
-+ case RR_Rotate_0:
-+ w100c->hwScreen.randr |= RR_Rotate_0;
-+ break;
-+ case RR_Rotate_90:
-+ w100c->hwScreen.randr |= RR_Rotate_90;
-+ break;
-+ case RR_Rotate_180:
-+ w100c->hwScreen.randr |= RR_Rotate_180;
-+ break;
-+ case RR_Rotate_270:
-+ w100c->hwScreen.randr |= RR_Rotate_270;
-+ break;
-+ }
-+ break;
-+ case RR_Rotate_90:
-+ switch (w100c->defaultRandR) {
-+ case RR_Rotate_0:
-+ w100c->hwScreen.randr |= RR_Rotate_90;
-+ break;
-+ case RR_Rotate_90:
-+ w100c->hwScreen.randr |= RR_Rotate_0;
-+ break;
-+ case RR_Rotate_180:
-+ w100c->hwScreen.randr |= RR_Rotate_270;
-+ break;
-+ case RR_Rotate_270:
-+ w100c->hwScreen.randr |= RR_Rotate_180;
-+ break;
-+ }
-+ break;
-+ case RR_Rotate_180:
-+ switch (w100c->defaultRandR) {
-+ case RR_Rotate_0:
-+ w100c->hwScreen.randr |= RR_Rotate_180;
-+ break;
-+ case RR_Rotate_90:
-+ w100c->hwScreen.randr |= RR_Rotate_270;
-+ break;
-+ case RR_Rotate_180:
-+ w100c->hwScreen.randr |= RR_Rotate_0;
-+ break;
-+ case RR_Rotate_270:
-+ w100c->hwScreen.randr |= RR_Rotate_90;
-+ break;
-+ }
-+ break;
-+ case RR_Rotate_270:
-+ switch (w100c->defaultRandR) {
-+ case RR_Rotate_0:
-+ w100c->hwScreen.randr |= RR_Rotate_270;
-+ break;
-+ case RR_Rotate_90:
-+ w100c->hwScreen.randr |= RR_Rotate_180;
-+ break;
-+ case RR_Rotate_180:
-+ w100c->hwScreen.randr |= RR_Rotate_90;
-+ break;
-+ case RR_Rotate_270:
-+ w100c->hwScreen.randr |= RR_Rotate_0;
-+ break;
-+ }
-+ break;
-+ }
-+
+ if (screenEnabled) {
+ KdEnableScreen(pScreen);
+ }
++ return TRUE;
++}
++
++static Bool W100RandRGetInfo(ScreenPtr pScreen, Rotation *rotations)
++{
++ KdScreenPriv(pScreen);
++ KdScreenInfo *screen = pScreenPriv->screen;
++ W100CardInfo(pScreenPriv);
++ RRScreenSizePtr pSize;
++ Rotation randr;
++ W100ModeSpec *modes;
++ int i;
++
++ DBG_IMAGEON(("--W100RandRGetInfo\n"));
++
++ *rotations = RR_Rotate_All;
++
++ for (modes = w100_modes; modes->width; modes++) {
++ if (modes->supported) {
++ pSize = RRRegisterSize(pScreen,
++ modes->width,
++ modes->height,
++ screen->width_mm,
++ screen->height_mm);
++ if (modes == w100c->hw_window.mode) {
++ RRSetCurrentConfig(pScreen, screen->randr, 0, pSize);
++ }
++ }
++ }
+
+ return TRUE;
+}
@@ -520,8 +589,9 @@
+static Bool W100RandRInit(ScreenPtr pScreen)
+{
+ rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
-+
++ DBG_IMAGEON(("--W100RandRInit\n"));
+ pScrPriv->rrSetConfig = W100RandRSetConfig;
++ pScrPriv->rrGetInfo = W100RandRGetInfo;
+ return TRUE;
+}
+
@@ -532,7 +602,7 @@
+{
+ KdScreenPriv(pScreen);
+ W100CardInfo(pScreenPriv);
-+
++ DBG_IMAGEON(("--W100FinishInitScreen\n"));
+ if (!fbdevFinishInitScreen(pScreen))
+ return FALSE;
+
@@ -556,6 +626,7 @@
+W100Preserve(KdCardInfo * card)
+{
+ W100CardInfo *w100c = card->driver;
++ DBG_IMAGEON(("--W100Preserve\n"));
+
+ fbdevPreserve(card);
+}
@@ -564,6 +635,7 @@
+W100Restore(KdCardInfo * card)
+{
+ W100CardInfo *w100c = card->driver;
++ DBG_IMAGEON(("--W100Restore\n"));
+ fbdevRestore(card);
+}
+
@@ -572,7 +644,7 @@
+{
+ KdScreenPriv(pScreen);
+ W100CardInfo(pScreenPriv);
-+
++ DBG_IMAGEON(("--W100DPMS\n"));
+ return fbdevDPMS(pScreen, mode);
+}
+
@@ -582,17 +654,28 @@
+ KdScreenPriv(pScreen);
+ W100CardInfo(pScreenPriv);
+
-+ DBG_IMAGEON(("W100Enable\n"));
++ DBG_IMAGEON(("--W100Enable\n"));
+
++ /*
+ if (!fbdevEnable(pScreen))
+ return FALSE;
++ */
+
+ if (w100c->mem_base == NULL) {
+ if (!W100Map(pScreenPriv->screen->card, w100c)) {
+ return FALSE;
+ }
-+ W100MemSetup(pScreenPriv->screen);
++ W100Setup(pScreenPriv->screen);
+ }
++ W100SetupGraphicEngine(w100c);
++
++ graphic_offset_u go;
++ go.val = MMIO_IN32(mmGRAPHIC_OFFSET);
++ DBG_IMAGEON(("Graphic offset is 0x%08x(0x%08x)\n",
++ go.f.graphic_offset,
++ W100_CARD2HOST(go.f.graphic_offset)));
++
++
+ return TRUE;
+}
+
@@ -601,8 +684,8 @@
+{
+ KdScreenPriv(pScreen);
+ W100CardInfo(pScreenPriv);
-+ DBG_IMAGEON(("W100Disable\n"));
-+ W100Unmap(pScreenPriv->card, w100c);
++ DBG_IMAGEON(("--W100Disable\n"));
++ //W100Unmap(pScreenPriv->card, w100c);
+
+ fbdevDisable(pScreen);
+}
@@ -654,7 +737,7 @@
+ W100PutColors, /* putColors */
+};
--- /dev/null
-+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/imageon/imageon_const.h
++++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon_const.h
@@ -0,0 +1,161 @@
+/*
+ * Copyright © 2007 Manuel Teira
@@ -818,8 +901,8 @@
+
+#endif
--- /dev/null
-+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/imageon/imageon_cursor.c
-@@ -0,0 +1,571 @@
++++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon_cursor.c
+@@ -0,0 +1,563 @@
+/*
+ * Copyright © 2007 Manuel Teira
+ *
@@ -949,7 +1032,7 @@
+ x1 = 0;
+ y1 = 0;
+ for (y2 = W100_CURSOR_HEIGHT - 1; y2 >= 0; --y2) {
-+ for (x2 = W100_CURSOR_WIDTH - 1; x2 >= 0; --x2) {
++ for (x2 = 0; x2 < W100_CURSOR_WIDTH; x2++) {
+ SetPixelVal(dst, x2, y2, PixelVal(src, x1, y1));
+ ++x1;
+ if (x1 >= W100_CURSOR_WIDTH) {
@@ -963,7 +1046,7 @@
+ x1 = 0;
+ y1 = 0;
+ for (x2 = 0; x2 < W100_CURSOR_WIDTH; x2++) {
-+ for (y2 = W100_CURSOR_HEIGHT - 1; y2 >= 0; --y2) {
++ for (y2 = 0; y2 < W100_CURSOR_HEIGHT; y2++) {
+ SetPixelVal(dst, x2, y2, PixelVal(src, x1, y1));
+ ++x1;
+ if (x1 >= W100_CURSOR_WIDTH) {
@@ -1030,9 +1113,6 @@
+ int line, i;
+ int h, w;
+
-+ DBG_IMAGEON(("W100LoadCursor(xhot:%d,yhot:%d,width:%d,height:%d)\n",
-+ bits->xhot, bits->yhot,
-+ bits->width, bits->height));
+
+ pCurPriv->pCursor = pCursor;
+ pCurPriv->xhot = bits->xhot;
@@ -1073,13 +1153,18 @@
+ }
+
+ /* Rotate the pixmap to get the correct orientation */
-+ W100RotateCursor(w100c->hwScreen.randr,
++ W100RotateCursor(w100c->hw_window.randr,
+ (CARD32*) tmpCursor0,
+ (CARD32*) tmpCursor1);
+
+ /* Correct endianness */
+ src = (CARD32*) tmpCursor1;
+ dst = (CARD32*) (pCurPriv->area->vidmem->base + pCurPriv->area->offset);
++ DBG_IMAGEON(("W100LoadCursor(xhot:%d,yhot:%d,width:%d,height:%d) dst(0x%08x)\n",
++ bits->xhot, bits->yhot,
++ bits->width, bits->height,
++ dst));
++
+ for (line = 0; line < h; line++) {
+ for (i = 0; i < lwsrc; i++) {
+ dst[i] = BigEndian(src[i]);
@@ -1087,6 +1172,7 @@
+ src += lwsrc;
+ dst += lwsrc;
+ }
++
+ W100SetCursorColors(pScreen);
+}
+
@@ -1117,13 +1203,14 @@
+ W100CardInfo(pScreenPriv);
+ W100ScreenInfo(pScreenPriv);
+ W100Cursor *pCurPriv = &w100s->cursor;
-+ CARD16 xoffs, yoffs;
++ int xoffs, yoffs;
+ cursor_offset_u cursor_offset;
+ cursor_h_pos_u hpos;
+ cursor_v_pos_u vpos;
+ graphic_h_disp_u graphic_hdisp;
+ graphic_v_disp_u graphic_vdisp;
-+ int tx, ty;
++ int tx, ty, tw, th;
++
+
+ if (!pCurPriv->has_cursor) {
+ return;
@@ -1132,60 +1219,42 @@
+ return;
+ }
+
-+ DBG_IMAGEON(("W100MoveCursor(x:%d,y:%d)\n", x, y));
-+
+ graphic_hdisp.val = w100c->regs.GRAPHIC_H_DISP;
+ graphic_vdisp.val = w100c->regs.GRAPHIC_V_DISP;
-+
+ xoffs = 0;
+ yoffs = 0;
-+
+ x -= pCurPriv->xhot;
-+ if (x < 0) {
-+ switch(w100c->hwScreen.randr & RR_Rotate_All) {
-+ case RR_Rotate_0:
-+ case RR_Rotate_180:
-+ xoffs = -x;
-+ break;
-+ case RR_Rotate_90:
-+ case RR_Rotate_270:
-+ yoffs = -y;
-+ break;
-+ }
-+ x = 0;
-+ }
+ y -= pCurPriv->yhot;
-+ if (y < 0) {
-+ switch(w100c->hwScreen.randr & RR_Rotate_All) {
-+ case RR_Rotate_0:
-+ case RR_Rotate_180:
-+ yoffs = -y;
-+ break;
-+ case RR_Rotate_90:
-+ case RR_Rotate_270:
-+ xoffs = -y;
-+ break;
-+ }
-+ y = 0;
-+ }
-+
+ tx = W100MapToHWX(w100c, x, y, pCurPriv->width, pCurPriv->height);
+ ty = W100MapToHWY(w100c, x, y, pCurPriv->width, pCurPriv->height);
++ tw = W100MapToHWW(w100c, x, y, pCurPriv->width, pCurPriv->height);
++ th = W100MapToHWH(w100c, x, y, pCurPriv->width, pCurPriv->height);
+
-+ DBG_IMAGEON(("W100MoveCursor dst(x:%d,y:%d),"
-+ "mapped(x:%d,y:%d,xoffs:%d,yoffs:%d\n",
-+ x, y, tx, ty, xoffs, yoffs));
++ if (tx < 0) {
++ xoffs = -tx;
++ tw -= xoffs;
++ tx = 0;
++ }
+
++ if (ty < 0) {
++ yoffs = -ty;
++ th -= yoffs;
++ ty = 0;
++ }
++
++ hpos.f.cur_h_start = graphic_hdisp.f.graphic_h_start + tx;
++ hpos.f.cur_h_end = hpos.f.cur_h_start + tw;
++ hpos.f.cur_en = 1;
++ vpos.f.cur_v_start = graphic_vdisp.f.graphic_v_start + ty;
++ vpos.f.cur_v_end = vpos.f.cur_v_start + th;
+ cursor_offset.f.cur_x_offset = xoffs;
+ cursor_offset.f.cur_y_offset = yoffs;
+ cursor_offset.f.cur_offset = (CARD32)
+ W100_HOST2CARD(pCurPriv->area->vidmem->base
+ + pCurPriv->area->offset);
-+ hpos.f.cur_en = 1;
-+ hpos.f.cur_h_start = graphic_hdisp.f.graphic_h_start + tx;
-+ hpos.f.cur_h_end = hpos.f.cur_h_start + pCurPriv->width;
-+ vpos.f.cur_v_start = graphic_vdisp.f.graphic_v_start + ty;
-+ vpos.f.cur_v_end = vpos.f.cur_v_start + pCurPriv->height;
++ DBG_IMAGEON(("W100MoveCursor dst(x:%d,y:%d),"
++ "mapped(x:%d,y:%d,xoffs:%d,yoffs:%d)\n",
++ x, y, tx, ty, xoffs, yoffs));
+
+ W100DisableDisplayUpdate(w100c);
+ MMIO_OUT32(mmCURSOR1_OFFSET, cursor_offset.val);
@@ -1199,7 +1268,6 @@
+
+}
+
-+
+static Bool
+W100RealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
+{
@@ -1320,6 +1388,11 @@
+ }
+ if (pCurPriv->area == NULL) {
+ FatalError("Couldn't allocate offscreen memory for cursor.\n");
++ } else {
++ DBG_IMAGEON(("Cursor memory at 0x%08x(0x%08x)\n",
++ pCurPriv->area->vidmem->base + pCurPriv->area->offset,
++ W100_HOST2CARD(pCurPriv->area->vidmem->base
++ + pCurPriv->area->offset)));
+ }
+ if (pCurPriv->pCursor) {
+ int x, y;
@@ -1348,6 +1421,8 @@
+ if (pCurPriv->pCursor) {
+ W100UnloadCursor(pScreen);
+ }
++
++ pCurPriv->area = NULL;
+}
+
+Bool
@@ -1392,8 +1467,8 @@
+ pCurPriv->pCursor = NULL;
+}
--- /dev/null
-+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/imageon/imageon_draw.c
-@@ -0,0 +1,241 @@
++++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon_draw.c
+@@ -0,0 +1,237 @@
+/*
+ * Copyright © 2007 Manuel Teira
+ *
@@ -1574,7 +1649,7 @@
+ W100ScreenInfo(pScreenPriv);
+
+
-+ DBG_IMAGEON(("W100InitAccel: %d/%d depth/bpp\n",
++ DBG_IMAGEON(("--W100InitAccel: %d/%d depth/bpp\n",
+ pScreenPriv->screen->fb[0].depth,
+ pScreenPriv->screen->fb[0].bitsPerPixel));
+
@@ -1588,7 +1663,7 @@
+ w100s->kaa.DoneCopy = W100DoneCopy;
+
+ w100s->kaa.flags |= KAA_OFFSCREEN_PIXMAPS;
-+ /* Offset alignment, not sure if this is enough */
++ /* Offset alignment, not sure if this is enought */
+ w100s->kaa.offsetAlign = 0;
+ w100s->kaa.pitchAlign = 16;
+
@@ -1606,7 +1681,7 @@
+ W100ScreenInfo(pScreenPriv);
+ W100CardInfo(pScreenPriv);
+
-+ DBG_IMAGEON(("W100EnableAccel\n"));
++ DBG_IMAGEON(("--W100EnableAccel\n"));
+
+ w100s->kaa.PrepareBlend = NULL;
+ w100s->kaa.Blend = NULL;
@@ -1617,27 +1692,23 @@
+ w100s->kaa.DoneComposite = NULL;
+ w100s->kaa.UploadToScreen = NULL;
+ w100s->kaa.UploadToScratch = NULL;
-+
-+ W100SetupGraphicEngine(w100c);
-+ W100SetupGraphicWindow(w100c);
-+
+ kaaMarkSync(pScreen);
+}
+
+void
+W100DisableAccel(ScreenPtr pScreen)
+{
-+ DBG_IMAGEON(("W100DisableAccel\n"));
++ DBG_IMAGEON(("--W100DisableAccel\n"));
+}
+
+void
+W100FiniAccel(ScreenPtr pScreen)
+{
-+ DBG_IMAGEON(("W100FiniAccel\n"));
++ DBG_IMAGEON(("--W100FiniAccel\n"));
+}
--- /dev/null
-+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/imageon/imageon.h
-@@ -0,0 +1,229 @@
++++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon.h
+@@ -0,0 +1,261 @@
+/*
+ * Copyright © 2007 Manuel Teira
+ *
@@ -1689,6 +1760,10 @@
+#define W100_CARD2HOST(x) (w100c->mem_base + (CARD32)(x))
+#define W100_HOST2CARD(x) ((x) - (CARD32)(w100c->mem_base))
+#define W100_MEMAREAS (2)
++#define W100_INTMEM (0)
++#define W100_EXTMEM (1)
++
++#define W100_SYSFS_BASE "/sys/bus/platform/devices/w100fb/"
+
+#define MMIO_OUT32(a, v) (*(VOL32 *)((w100c->reg_base) + (a)) = (v))
+#define MMIO_IN32(a) (*(VOL32 *)((w100c->reg_base) + (a)))
@@ -1696,6 +1771,8 @@
+#define W100_MAX(x, y) ((x) > (y) ? x : y)
+#define W100_MIN(x, y) ((x) < (y) ? x : y)
+
++#define W100_ALIGN(q, a) ((q + a - 1) & ~(a - 1))
++
+#define TIMEOUT_LOCALS struct timeval _target, _curtime;
+
+static inline Bool
@@ -1722,12 +1799,31 @@
+typedef volatile CARD16 VOL16;
+typedef volatile CARD32 VOL32;
+
-+struct pci_id_entry {
++typedef struct _W100CardEntry {
+ CARD16 vendor;
+ CARD16 device;
+ CARD8 caps;
+ char *name;
-+};
++} W100CardEntry;
++
++
++typedef enum _W100Caps {
++ W100XVSupport = 1
++} W100Caps;
++
++typedef struct _W100ModeSpec {
++ CARD16 width;
++ CARD16 height;
++ CARD8 bpp;
++ CARD8 fbpool;
++ Bool supported;
++} W100ModeSpec;
++
++typedef struct _W100Mode {
++ CARD16 width;
++ CARD16 height;
++ CARD8 bpp;
++} W100Mode;
+
+typedef struct _W100MemArea {
+ CARD8 *start;
@@ -1735,29 +1831,36 @@
+ CARD8 priority;
+} W100MemArea;
+
++typedef struct _W100StartupInfo {
++ W100CardEntry *card_id;
++ W100Mode mode;
++ Bool portrait;
++ int randr;
++} W100StartupInfo;
++
+typedef struct _W100CardInfo {
+ FbdevPriv fbdev;
-+ struct pci_id_entry *pci_id;
++ W100CardEntry *card_id;
+ CARD8 *mem_base;
+ CARD8 *reg_base;
-+ W100MemArea memareas[W100_MEMAREAS];
++ W100MemArea **memareas;
++ int num_memareas;
+ int cmdfifo_entries;
+ struct {
+ CARD32 ENG_CNTL;
+ CARD32 VIDEO_CTRL;
+ CARD32 GRAPHIC_H_DISP;
+ CARD32 GRAPHIC_V_DISP;
++ CARD32 DISP_DEBUG2;
+ } regs;
+ struct {
+ CARD8 *offset;
-+ CARD16 x;
-+ CARD16 y;
+ CARD16 width;
+ CARD16 height;
+ int randr;
++ W100ModeSpec *mode;
+ CARD8 bpp;
-+ } hwScreen;
-+ int defaultRandR;
++ } hw_window;
+ CARD8 last_dst_videomem;
+ CARD8 last_src_videomem;
+ struct {
@@ -1868,7 +1971,7 @@
+
+#endif /* _IMAGEON_H_ */
--- /dev/null
-+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/imageon/imageon_regs.h
++++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon_regs.h
@@ -0,0 +1,4155 @@
+/*
+ * Copyright © 2007 Manuel Teira
@@ -6026,7 +6129,7 @@
+
+#endif
--- /dev/null
-+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/imageon/imageon_stub.c
++++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon_stub.c
@@ -0,0 +1,95 @@
+/*
+ * Copyright © 2007 Manuel Teira
@@ -6057,10 +6160,10 @@
+#include "imageon_regs.h"
+#include "klinux.h"
+
-+extern struct pci_id_entry w100_pci_ids[];
++extern W100CardEntry w100_cards[];
+
+static Bool
-+FindW100(CARD16 vendor, CARD16 device, CARD32 count, KdCardAttr * attr)
++FindW100(CARD16 vendor, CARD16 device, KdCardAttr * attr)
+{
+ CARD8 *mmio;
+ CARD32 chip_id;
@@ -6072,7 +6175,7 @@
+
+ chip_id = (*(VOL32 *)(mmio + mmCHIP_ID));
+ if ((vendor | (device << 16)) == chip_id) {
-+ ErrorF("Found W100 Chip ID: %08x\n\n", chip_id);
++ ErrorF("(I) Found W100 Chip ID: %08x\n\n", chip_id);
+ attr->deviceID = device;
+ attr->vendorID = vendor;
+ found = TRUE;
@@ -6085,12 +6188,12 @@
+void
+InitCard(char *name)
+{
-+ struct pci_id_entry *id;
++ int i;
++ W100CardEntry *entry;
+ KdCardAttr attr;
+
-+ for (id = w100_pci_ids; id->name != NULL; id++) {
-+ int j = 0;
-+ if (FindW100(id->vendor, id->device, j++, &attr)) {
++ for (entry = w100_cards; entry->name; entry++) {
++ if (FindW100(entry->vendor, entry->device, &attr)) {
+ KdCardInfoAdd(&W100Funcs, &attr, 0);
+ break;
+ }
@@ -6124,8 +6227,8 @@
+ return KdProcessArgument(argc, argv, i);
+}
--- /dev/null
-+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/imageon/imageon_support.c
-@@ -0,0 +1,1306 @@
++++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon_support.c
+@@ -0,0 +1,1477 @@
+/*
+ * Copyright © 2007 Manuel Teira
+ *
@@ -6196,6 +6299,9 @@
+ /* GXset */ 0xff, /* 1 */
+};
+
++extern W100ModeSpec w100_modes[];
++extern W100StartupInfo w100StartupInfo;
++
+void W100DisableDisplayUpdate(W100CardInfo *w100c)
+{
+ disp_db_buf_cntl_wr_u disp_db_buf_cntl;
@@ -6234,8 +6340,8 @@
+ dp_datatype_u dp_datatype;
+
+ DBG_IMAGEON(("W100SetupGraphicEngine(offset:%p, pitch:%d)\n",
-+ w100c->hwScreen.offset,
-+ w100c->hwScreen.width));
++ w100c->hw_window.offset,
++ w100c->hw_window.width));
+
+ eng_cntl.val = MMIO_IN32(mmENG_CNTL);
+ eng_cntl.f.erc_reg_wr_ws = 0;
@@ -6253,18 +6359,18 @@
+ MMIO_OUT32(mmDEFAULT_SC_BOTTOM_RIGHT, bottomright.val);
+
+ dpitch.val = 0;
-+ dpitch.f.dst_pitch = w100c->hwScreen.width;
++ dpitch.f.dst_pitch = w100c->hw_window.width;
+ MMIO_OUT32(mmDST_PITCH, dpitch.val);
+
+ doffset.val = 0;
-+ doffset.f.dst_offset = (CARD32) w100c->hwScreen.offset;
++ doffset.f.dst_offset = (CARD32) w100c->hw_window.offset;
+ MMIO_OUT32(mmDST_OFFSET, doffset.val);
+
+ spitch.val = 0;
-+ spitch.f.src_pitch = w100c->hwScreen.width;
++ spitch.f.src_pitch = w100c->hw_window.width;
+ MMIO_OUT32(mmSRC_PITCH, spitch.val);
+ soffset.val = 0;
-+ soffset.f.src_offset = (CARD32) w100c->hwScreen.offset;
++ soffset.f.src_offset = (CARD32) w100c->hw_window.offset;
+ MMIO_OUT32(mmSRC_OFFSET, soffset.val);
+
+ tl.f.sc_left = tl.f.sc_top = 0;
@@ -6340,90 +6446,126 @@
+ ErrorF("<-W100ResetGraphicEngine\n");
+}
+
-+void W100SetupGraphicWindow(W100CardInfo *w100c)
++W100ModeSpec *W100GetModeSpec(W100CardInfo *w100c, W100Mode *mode)
+{
-+ CARD32 offset = 0;
-+ graphic_ctrl_u gc;
-+ graphic_pitch_u gp;
-+ graphic_offset_u go;
-+ pclk_cntl_u pclk_cntl;
-+
-+ DBG_IMAGEON(("W100SetupGraphicWindow(offset:%p, x:%d, y:%d, "
-+ "width:%d, height:%d, randr:%d)\n",
-+ w100c->hwScreen.offset,
-+ w100c->hwScreen.x,
-+ w100c->hwScreen.y,
-+ w100c->hwScreen.width,
-+ w100c->hwScreen.height,
-+ w100c->hwScreen.randr));
-+
-+ gc.val = 0;
-+ gc.f.color_depth = COLOR_DEPTH_A555;
-+ gc.f.en_crtc = 1;
-+ gc.f.en_graphic_crtc = 1;
-+ gc.f.en_graphic_req = 1;
-+ gc.f.lcd_pclk_on = 1;
-+ gc.f.lcd_sclk_on = 1;
-+ gc.f.low_power_on = 0;
-+
-+ pclk_cntl.val = 0;
-+
-+ switch (w100c->hwScreen.width) {
-+ case 240:
-+ case 320:
-+ gc.f.total_req_graphic = 0xa0;
-+ gc.f.req_freq = 0;
-+ pclk_cntl.f.pclk_post_div = 1;
-+ pclk_cntl.f.pclk_src_sel = W100_CLK_SRC_XTAL;
-+ break;
-+ case 480:
-+ case 640:
-+ pclk_cntl.f.pclk_src_sel = W100_CLK_SRC_PLL;
-+ gc.f.total_req_graphic = 0xf0;
-+ if (w100c->hwScreen.randr & (RR_Rotate_0 | RR_Rotate_180)) {
-+ gc.f.low_power_on = 1;
-+ gc.f.req_freq = 5;
-+ pclk_cntl.f.pclk_post_div = 2;
-+ } else {
-+ gc.f.req_freq = 4;
-+ pclk_cntl.f.pclk_post_div = 6;
++ W100ModeSpec *modes;
++ for (modes = w100_modes; modes->width; modes++) {
++ if ((modes->bpp == mode->bpp) &&
++ (((modes->width == mode->width) &&
++ (modes->height == mode->height)) ||
++ ((modes->width == mode->height) &&
++ (modes->height == mode->width)))) {
++ return modes;
+ }
-+ break;
+ }
++ ErrorF("No matching mode spec for %dx%d@%d\n",
++ mode->width, mode->height, mode->bpp);
++ return NULL;
++}
++
++W100ModeSpec *W100GetBestMode(W100CardInfo *w100c, int width, int height)
++{
++ unsigned int best_x = 0xffffffff;
++ unsigned int best_y = 0xffffffff;
++ W100ModeSpec *modes, *best_mode = NULL;
++ for (modes = w100_modes; modes->width; modes++) {
++ if (modes->supported) {
++ if (((modes->width >= width) && (modes->width < best_x)) &&
++ ((modes->height >= height) && (modes->height < best_y))) {
++ best_mode = modes;
++ best_x = modes->width;
++ best_y = modes->height;
++ } else if (((modes->width >= height) && (modes->width < best_y)) &&
++ ((modes->height >= width) && (modes->height < best_x))) {
++ best_mode = modes;
++ best_x = modes->height;
++ best_y = modes->width;
++ }
++ }
++ }
++ if (!best_mode) {
++ ErrorF("No matching mode spec for %dx%d\n", width, height);
++ }
++ return best_mode;
++}
++
++Bool W100GetFbMode(W100CardInfo *w100c, W100Mode *mode)
++{
++ struct fb_var_screeninfo vinfo;
++ int i;
++
++ if (ioctl(w100c->fbdev.fd, FBIOGET_VSCREENINFO, &vinfo) != 0) {
++ ErrorF("Unable to get framebuffer mode\n");
++ return FALSE;
++ }
++
++ mode->width = vinfo.xres;
++ mode->height = vinfo.yres;
++ mode->bpp = vinfo.bits_per_pixel;
++}
++
++Bool W100CheckFbMode(W100CardInfo *w100c, W100ModeSpec *modes)
++{
++ struct fb_var_screeninfo vinfo;
+
-+ gp.val = 0;
-+ gp.f.graphic_pitch = w100c->hwScreen.width * w100c->hwScreen.bpp / 8;
++ vinfo.xres = vinfo.xres_virtual = modes->width;
++ vinfo.yres = vinfo.yres_virtual = modes->height;
++ vinfo.bits_per_pixel = modes->bpp;
++ vinfo.activate = FB_ACTIVATE_TEST;
+
-+ go.val = 0;
-+ go.f.graphic_offset = (CARD32) w100c->hwScreen.offset;
++ if (ioctl(w100c->fbdev.fd, FBIOPUT_VSCREENINFO, &vinfo) != 0) {
++ ErrorF("(W) Mode %dx%d@%d not supported\n",
++ vinfo.xres,
++ vinfo.yres,
++ vinfo.bits_per_pixel);
++ return FALSE;
++ }
++ DBG_IMAGEON(("(I) Mode %dx%d@%d supported\n",
++ vinfo.xres,
++ vinfo.yres,
++ vinfo.bits_per_pixel));
++ return TRUE;
++}
+
-+ switch(w100c->hwScreen.randr & RR_Rotate_All) {
-+ case RR_Rotate_0:
-+ gc.f.portrait_mode = 0;
-+ offset = 0;
-+ break;
-+ case RR_Rotate_90:
-+ gc.f.portrait_mode = 1;
-+ offset = w100c->hwScreen.width * (w100c->hwScreen.height - 1);
-+ break;
-+ case RR_Rotate_180:
-+ gc.f.portrait_mode = 3;
-+ offset = w100c->hwScreen.width * w100c->hwScreen.height - 1;
-+ break;
-+ case RR_Rotate_270:
-+ gc.f.portrait_mode = 2;
-+ offset = w100c->hwScreen.width - 1;
-+ break;
++Bool W100SetFbMode(W100CardInfo *w100c)
++{
++ struct fb_var_screeninfo vinfo;
++ int randr = KdSubRotation(w100c->hw_window.randr, w100StartupInfo.randr);
++
++ if (randr & (RR_Rotate_0 | RR_Rotate_180)) {
++ vinfo.xres = vinfo.xres_virtual = w100c->hw_window.mode->width;
++ vinfo.yres = vinfo.yres_virtual = w100c->hw_window.mode->height;
++ } else {
++ vinfo.xres = vinfo.xres_virtual = w100c->hw_window.mode->height;
++ vinfo.yres = vinfo.yres_virtual = w100c->hw_window.mode->width;
+ }
-+ offset = (offset * w100c->hwScreen.bpp / 8) & ~0x03;
-+ go.f.graphic_offset += offset;
++ vinfo.bits_per_pixel = w100c->hw_window.mode->bpp;
++ vinfo.activate = FB_ACTIVATE_NOW;
++ int flip = (w100c->hw_window.randr > RR_Rotate_90) ? 1 : 0;
++
++ DBG_IMAGEON(("Asking framebuffer for mode %dx%d@%d. Flipped:%d\n",
++ vinfo.xres, vinfo.yres, vinfo.bits_per_pixel, flip));
++ if (ioctl(w100c->fbdev.fd, FBIOPUT_VSCREENINFO, &vinfo) != 0) {
++ ErrorF("Error setting mode %dx%d@%d\n",
++ vinfo.xres,
++ vinfo.yres,
++ vinfo.bits_per_pixel);
++ return FALSE;
++ }
++ W100SysFsSet(w100c, W100_SYSFS_BASE "flip", flip ? "1" : "0");
++ return TRUE;
++}
+
-+ W100DisableDisplayUpdate(w100c);
-+ MMIO_OUT32(mmPCLK_CNTL, pclk_cntl.val);
-+ MMIO_OUT32(mmGRAPHIC_CTRL, gc.val);
-+ MMIO_OUT32(mmGRAPHIC_OFFSET, go.val);
-+ MMIO_OUT32(mmGRAPHIC_PITCH, gp.val);
-+ W100EnableDisplayUpdate(w100c);
++void W100SetupGraphicWindow(W100CardInfo *w100c)
++{
++ DBG_IMAGEON(("W100SetupGraphicWindow(width:%d,height:%d,randr:%d)\n",
++ w100c->hw_window.width,
++ w100c->hw_window.height,
++ w100c->hw_window.randr));
++
++ if (!W100SetFbMode(w100c)) {
++ ErrorF("Error Setting Graphic Window\n");
++ }
+}
+
+void W100EnableGraphicWindow(W100CardInfo *w100c)
@@ -6817,19 +6959,19 @@
+ pPix->drawable.bitsPerPixel);
+}
+
-+CARD16 W100MapToHWX(W100CardInfo *w100c,
-+ CARD16 x, CARD16 y, CARD16 w, CARD16 h)
++int W100MapToHWX(W100CardInfo *w100c,
++ int x, int y, int w, int h)
+{
-+ CARD16 tx;
-+ switch (w100c->hwScreen.randr & RR_Rotate_All) {
++ int tx;
++ switch (w100c->hw_window.randr & RR_Rotate_All) {
+ case RR_Rotate_0:
+ tx = x;
+ break;
+ case RR_Rotate_90:
-+ tx = w100c->hwScreen.height - (y + w - 1);
++ tx = w100c->hw_window.height - (y + h);
+ break;
+ case RR_Rotate_180:
-+ tx = w100c->hwScreen.width - (x + w);
++ tx = w100c->hw_window.width - (x + w);
+ break;
+ case RR_Rotate_270:
+ tx = y;
@@ -6840,11 +6982,11 @@
+ return tx;
+}
+
-+CARD16 W100MapToHWY(W100CardInfo *w100c,
-+ CARD16 x, CARD16 y, CARD16 w, CARD16 h)
++int W100MapToHWY(W100CardInfo *w100c,
++ int x, int y, int w, int h)
+{
-+ CARD16 ty;
-+ switch (w100c->hwScreen.randr & RR_Rotate_All) {
++ int ty;
++ switch (w100c->hw_window.randr & RR_Rotate_All) {
+ case RR_Rotate_0:
+ ty = y;
+ break;
@@ -6852,10 +6994,10 @@
+ ty = x;
+ break;
+ case RR_Rotate_180:
-+ ty = w100c->hwScreen.height - (y + h - 1);
++ ty = w100c->hw_window.height - (y + h);
+ break;
+ case RR_Rotate_270:
-+ ty = w100c->hwScreen.width - (x + w);
++ ty = w100c->hw_window.width - (x + w);
+ break;
+ default:
+ ty = y;
@@ -6863,6 +7005,40 @@
+ return ty;
+}
+
++int W100MapToHWW(W100CardInfo *w100c,
++ int x, int y, int w, int h)
++{
++ int tw;
++ switch (w100c->hw_window.randr & RR_Rotate_All) {
++ case RR_Rotate_0:
++ case RR_Rotate_180:
++ tw = w;
++ break;
++ case RR_Rotate_90:
++ case RR_Rotate_270:
++ tw = h;
++ break;
++ }
++ return tw;
++}
++
++int W100MapToHWH(W100CardInfo *w100c,
++ int x, int y, int w, int h)
++{
++ int th;
++ switch (w100c->hw_window.randr & RR_Rotate_All) {
++ case RR_Rotate_0:
++ case RR_Rotate_180:
++ th = h;
++ break;
++ case RR_Rotate_90:
++ case RR_Rotate_270:
++ th = w;
++ break;
++ }
++ return th;
++}
++
+CARD16 W100XformX(W100CardInfo *w100c,
+ CARD16 x, CARD16 y, CARD16 w, CARD16 h)
+{
@@ -7432,9 +7608,107 @@
+ return brightness.f.brightness;
+}
+
++int W100GetRotation(W100CardInfo *w100c)
++{
++ graphic_ctrl_u gc;
++ int randr;
++
++ gc.val = MMIO_IN32(mmGRAPHIC_CTRL);
++
++ switch (gc.f.portrait_mode) {
++ case 0:
++ randr = RR_Rotate_0;
++ break;
++ case 1:
++ randr = RR_Rotate_90;
++ break;
++ case 2:
++ randr = RR_Rotate_270;
++ break;
++ case 3:
++ randr = RR_Rotate_180;
++ break;
++ }
++ return randr;
++}
++
++Bool W100SysFsSet(W100CardInfo *w100c, const char *path, const char *value)
++{
++ FILE *fd;
++ if ((fd = fopen(path, "w")) == NULL) {
++ ErrorF("(E) Error in W100SysFsSet: Unable to open '%s'\n", path);
++ return FALSE;
++ }
++ fprintf(fd, "%s", value);
++ fclose(fd);
++ return TRUE;
++}
++
++Bool W100SysFsGet(W100CardInfo *w100c, const char *path, char *value)
++{
++ FILE *fd;
++ if ((fd = fopen(path, "r")) == NULL) {
++ ErrorF("(E) Error in W100SysFsGet: Unable to open '%s'\n", path);
++ return FALSE;
++ }
++ fscanf(fd, "%s", value);
++ fclose(fd);
++ return TRUE;
++}
++
++void
++W100ComputeMouseMatrix(KdMouseMatrix *m, Rotation randr, int width, int height)
++{
++ int x_dir = 1, y_dir = 1;
++ int i, j;
++ int size[2];
++
++ size[0] = width; size[1] = height;
++ if (randr & RR_Reflect_X)
++ x_dir = -1;
++ if (randr & RR_Reflect_Y)
++ y_dir = -1;
++ switch (randr & (RR_Rotate_All)) {
++ case RR_Rotate_0:
++ m->matrix[0][0] = x_dir; m->matrix[0][1] = 0;
++ m->matrix[1][0] = 0; m->matrix[1][1] = y_dir;
++ break;
++ case RR_Rotate_90:
++ m->matrix[0][0] = 0; m->matrix[0][1] = x_dir;
++ m->matrix[1][0] = -y_dir; m->matrix[1][1] = 0;
++ break;
++ case RR_Rotate_180:
++ m->matrix[0][0] = -x_dir; m->matrix[0][1] = 0;
++ m->matrix[1][0] = 0; m->matrix[1][1] = -y_dir;
++ break;
++ case RR_Rotate_270:
++ m->matrix[0][0] = 0; m->matrix[0][1] = -x_dir;
++ m->matrix[1][0] = y_dir; m->matrix[1][1] = 0;
++ break;
++ }
++ for (i = 0; i < 2; i++)
++ {
++ m->matrix[i][2] = 0;
++ for (j = 0 ; j < 2; j++)
++ if (m->matrix[i][j] < 0)
++ m->matrix[i][2] = size[j] - 1;
++ }
++}
++
++void W100TransformTsLibCoordinates(long *x, long *y, void *closure)
++{
++ W100CardInfo *w100c = closure;
++
++ if (w100c->hw_window.mode->width == 320) {
++ *x >>= 1;
++ *y >>= 1;
++ }
++}
++
++
--- /dev/null
-+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/imageon/imageon_video.c
-@@ -0,0 +1,1056 @@
++++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon_video.c
+@@ -0,0 +1,1051 @@
+/*
+ * Copyright © 2007 Manuel Teira
+ *
@@ -7589,7 +7863,6 @@
+ W100CardInfo(screen);
+ W100PortPrivPtr pPortPriv = w100s->pAdaptor->pPortPrivates[0].ptr;
+
-+ CARD32 disp_debug = 0;
+ video_ctrl_u video_ctrl;
+ video_y_offset_u video_y_offset;
+ video_y_pitch_u video_y_pitch;
@@ -7607,7 +7880,7 @@
+
+ DBG_IMAGEON(("W100OverlaySetup(ovlX:%d,ovlY:%d,ovlWidth:%d,ovlHeight:%d,"
+ "videoHorExp:%d,videoVerExp:%d,YPlane:0x%08x,UPlane:0x%08x,"
-+ "VPlane:0x%08x\n",
++ "VPlane:0x%08x)\n",
+ pPortPriv->ovlX, pPortPriv->ovlY,
+ pPortPriv->ovlWidth, pPortPriv->ovlHeight,
+ pPortPriv->videoHorExp, pPortPriv->videoVerExp,
@@ -7618,8 +7891,8 @@
+ return;
+ }
+
-+ w = pPortPriv->ovlWidth * (pPortPriv->videoHorExp + 1);
-+ h = pPortPriv->ovlHeight * (pPortPriv->videoVerExp + 1);
++ w = pPortPriv->ovlWidth << pPortPriv->videoHorExp;
++ h = pPortPriv->ovlHeight << pPortPriv->videoVerExp;
+
+ video_ctrl.val = w100c->regs.VIDEO_CTRL;
+
@@ -7660,12 +7933,10 @@
+ graphic_v_disp.val = w100c->regs.GRAPHIC_V_DISP;
+
+ video_hpos.f.video_h_start = graphic_h_disp.f.graphic_h_start
-+ + W100MapToHWX(w100c,
-+ pPortPriv->ovlX, pPortPriv->ovlY, w, h);
++ + pPortPriv->ovlX;
+ video_hpos.f.video_h_end = video_hpos.f.video_h_start + w;
+ video_vpos.f.video_v_start = graphic_v_disp.f.graphic_v_start
-+ + W100MapToHWY(w100c,
-+ pPortPriv->ovlX, pPortPriv->ovlY, w, h);
++ + pPortPriv->ovlY;
+ video_vpos.f.video_v_end = video_vpos.f.video_v_start + h;
+ if (video_hpos.f.video_h_end > graphic_h_disp.f.graphic_h_end) {
+ w = graphic_h_disp.f.graphic_h_end - video_hpos.f.video_h_start;
@@ -7675,6 +7946,10 @@
+ video_ctrl.f.total_req_video = (w + 3) / 4;
+
+ W100DisableDisplayUpdate(w100c);
++ //This need to be tuned deeply, to get an stable
++ //overlay image
++ MMIO_OUT32(mmDISP_DEBUG2,
++ (w100c->regs.DISP_DEBUG2 & ~0xff000000) | 0x80000000 );
+ MMIO_OUT32(mmGRAPHIC_KEY, graphic_key.val);
+ MMIO_OUT32(mmVIDEO_Y_OFFSET, video_y_offset.val);
+ MMIO_OUT32(mmVIDEO_Y_PITCH, video_y_pitch.val);
@@ -8075,7 +8350,7 @@
+ W100ScreenInfo(pScreenPriv);
+ W100PortPrivPtr pPortPriv = (W100PortPrivPtr)data;
+ CARD32 baseAddr;
-+ int randr = w100c->hwScreen.randr;
++ int randr = w100c->hw_window.randr;
+ int offWidth, offHeight;
+ int ovlWidth, ovlHeight;
+ int ovlX, ovlY;
@@ -8129,47 +8404,41 @@
+ offWidth = src_w;
+ offHeight = src_h;
+
-+ ovlX = drw_x;
-+ ovlY = drw_y;
++ ovlX = W100MapToHWX(w100c, drw_x, drw_y, drw_w, drw_h);
++ ovlY = W100MapToHWY(w100c, drw_x, drw_y, drw_w, drw_h);
+
+ for (i = 0; i < NUM_OVL_RESIZERS; i++) {
-+ CARD16 candidate_w;
-+ CARD16 candidate_h;
++ CARD16 candidate_w = drw_w >> ovlResizers[i].xfactor;
++ CARD16 candidate_h = drw_h >> ovlResizers[i].yfactor;
+
-+ pPortPriv->videoHorExp = ovlResizers[i].xfactor;
-+ pPortPriv->videoVerExp = ovlResizers[i].yfactor;
-+
-+ candidate_w = drw_w >> ovlResizers[i].xfactor;
-+ candidate_h = drw_h >> ovlResizers[i].yfactor;
-+
+ switch (randr & RR_Rotate_All) {
+ case RR_Rotate_0:
-+ ovlWidth = (candidate_w + OVL_W_ALIGN - 1) & ~(OVL_W_ALIGN - 1);
-+ ovlHeight = (candidate_h + OVL_H_ALIGN - 1) & ~(OVL_H_ALIGN - 1);
++ ovlWidth = W100_ALIGN(candidate_w, OVL_W_ALIGN);
++ ovlHeight = W100_ALIGN(candidate_h, OVL_H_ALIGN);
+ dstX = 0;
+ dstY = 0;
+ pPortPriv->videoHorExp = ovlResizers[i].xfactor;
+ pPortPriv->videoVerExp = ovlResizers[i].yfactor;
+ break;
+ case RR_Rotate_180:
-+ ovlWidth = (candidate_w + OVL_W_ALIGN - 1) & ~(OVL_W_ALIGN - 1);
-+ ovlHeight = (candidate_h + OVL_H_ALIGN - 1) & ~(OVL_H_ALIGN - 1);
++ ovlWidth = W100_ALIGN(candidate_w, OVL_W_ALIGN);
++ ovlHeight = W100_ALIGN(candidate_h, OVL_H_ALIGN);
+ dstX = ovlWidth - candidate_w;
+ dstY = ovlHeight - candidate_h;
+ pPortPriv->videoHorExp = ovlResizers[i].xfactor;
+ pPortPriv->videoVerExp = ovlResizers[i].yfactor;
+ break;
+ case RR_Rotate_90:
-+ ovlWidth = (candidate_h + OVL_W_ALIGN - 1) & ~(OVL_W_ALIGN - 1);
-+ ovlHeight = (candidate_w + OVL_H_ALIGN - 1) & ~(OVL_H_ALIGN - 1);
-+ dstX = ovlWidth - candidate_h;
-+ dstY = 0;
++ ovlWidth = W100_ALIGN(candidate_h, OVL_W_ALIGN);
++ ovlHeight = W100_ALIGN(candidate_w, OVL_H_ALIGN);
++ dstX = (ovlWidth - candidate_h) / 2;
++ dstY = (ovlHeight - candidate_w) / 2;
+ pPortPriv->videoHorExp = ovlResizers[i].yfactor;
+ pPortPriv->videoVerExp = ovlResizers[i].xfactor;
+ break;
+ case RR_Rotate_270:
-+ ovlWidth = (candidate_h + OVL_W_ALIGN - 1) & ~(OVL_W_ALIGN - 1);
-+ ovlHeight = (candidate_w + OVL_H_ALIGN - 1) & ~(OVL_H_ALIGN - 1);
++ ovlWidth = W100_ALIGN(candidate_h, OVL_W_ALIGN);
++ ovlHeight = W100_ALIGN(candidate_w, OVL_H_ALIGN);
+ dstX = 0;
+ dstY = ovlHeight - candidate_w;
+ pPortPriv->videoHorExp = ovlResizers[i].yfactor;
@@ -8492,8 +8761,8 @@
+}
+
--- /dev/null
-+++ xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/imageon/imageon_support.h
-@@ -0,0 +1,87 @@
++++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/imageon/imageon_support.h
+@@ -0,0 +1,98 @@
+/*
+ * Copyright © 2007 Manuel Teira
+ *
@@ -8546,10 +8815,14 @@
+ CARD32 dstOffset, CARD8 bpp);
+Bool W100SetSourcePixmap(PixmapPtr pPix);
+Bool W100SetDestinationPixmap(PixmapPtr pPix);
-+CARD16 W100MapToHWX(W100CardInfo *w100c,
-+ CARD16 x, CARD16 y, CARD16 w, CARD16 h);
-+CARD16 W100MapToHWY(W100CardInfo *w100c,
-+ CARD16 x, CARD16 y, CARD16 w, CARD16 h);
++int W100MapToHWX(W100CardInfo *w100c,
++ int x, int y, int w, int h);
++int W100MapToHWY(W100CardInfo *w100c,
++ int x, int y, int w, int h);
++int W100MapToHWW(W100CardInfo *w100c,
++ int x, int y, int w, int h);
++int W100MapToHWH(W100CardInfo *w100c,
++ int x, int y, int w, int h);
+CARD16 W100XformX(W100CardInfo *w100c, CARD16 x, CARD16 y, CARD16 w, CARD16 h);
+CARD16 W100XformY(W100CardInfo *w100c, CARD16 x, CARD16 y, CARD16 w, CARD16 h);
+CARD16 W100XformW(W100CardInfo *w100c, CARD16 x, CARD16 y, CARD16 w, CARD16 h);
@@ -8579,5 +8852,36 @@
+ int dstX, int dstY);
+CARD8 W100GetBrightness(W100CardInfo *w100c);
+void W100SetBrightness(W100CardInfo *w100c, CARD8 value);
-+
++int W100GetRotation(W100CardInfo *w100c);
++W100ModeSpec *W100GetModeSpec(W100CardInfo *w100c, W100Mode *mode);
++Bool W100GetFbMode(W100CardInfo *w100c, W100Mode *mode);
++Bool W100CheckFbMode(W100CardInfo *w100c, W100ModeSpec *modes);
++W100ModeSpec *W100GetBestMode(W100CardInfo *w100c, int width, int height);
++void W100TransformTsLibCoordinates(long *x, long *y, void *closure);
++Bool W100SysFsGet(W100CardInfo *w100c, const char *path, char *value);
++Bool W100SysFsSet(W100CardInfo *w100c, const char *path, const char *value);
+#endif
+--- xorg-server-X11R7.1-1.1.0.work/hw/kdrive/linux/tslib.c~kdrive-imageon
++++ xorg-server-X11R7.1-1.1.0.work/hw/kdrive/linux/tslib.c
+@@ -92,6 +92,10 @@
+ void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure);
+ void *tslib_raw_event_closure;
+
++/* To support randr hot resolution change */
++void (*tslib_transform_coords)(long *x, long *y, void *closure);
++void *tslib_transform_closure;
++
+ int TsInputType = 0;
+ int KdTsPhyScreen = 0; /* XXX Togo .. */
+
+@@ -121,7 +125,9 @@
+ flags = (event.pressure) ? KD_BUTTON_1 : 0;
+ x = event.x;
+ y = event.y;
+-
++ if (tslib_transform_coords) {
++ tslib_transform_coords(&x, &y, tslib_transform_closure);
++ }
+ KdEnqueueMouseEvent (mi, flags, x, y);
+ }
+ }
diff --git a/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb b/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb
index 1fdee510e2..e3fd09f602 100644
--- a/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb
+++ b/packages/xorg-xserver/xserver-kdrive_X11R7.1-1.1.0.bb
@@ -1,7 +1,7 @@
LICENSE = "MIT"
DEPENDS = "tslib virtual/libsdl xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext libxrandr fixesproto damageproto libxfont resourceproto compositeproto xcalibrateext recordproto videoproto scrnsaverproto"
-PR = "r7"
+PR = "r8"
PROVIDES = "virtual/xserver"
RPROVIDES = "virtual/xserver"
diff --git a/site/powerpc-linux b/site/powerpc-linux
index 361450e5dd..b946ca9e1e 100644
--- a/site/powerpc-linux
+++ b/site/powerpc-linux
@@ -323,3 +323,8 @@ samba_cv_have_setresuid=${samba_cv_have_setresuid=yes}
#monotone
ac_cv_sync_with_stdio=${ac_cv_sync_with_stdio=yes}
ac_cv_sync_with_stdio_2=${ac_cv_sync_with_stdio_2=yes}
+
+# mysql
+mysql_cv_func_atomic_sub=${mysql_cv_func_atomic_sub=no}
+mysql_cv_func_atomic_add=${mysql_cv_func_atomic_add=no}
+ac_cv_conv_longlong_to_float=${ac_cv_conv_longlong_to_float=yes}