diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/gcc/gcc-4.1.1 | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/gcc/gcc-4.1.1')
32 files changed, 11278 insertions, 0 deletions
diff --git a/recipes/gcc/gcc-4.1.1/100-uclibc-conf.patch b/recipes/gcc/gcc-4.1.1/100-uclibc-conf.patch new file mode 100644 index 0000000000..49d576c7dd --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/100-uclibc-conf.patch @@ -0,0 +1,544 @@ +--- gcc-4.1.0/gcc/config/t-linux-uclibc ++++ gcc-4.1.0/gcc/config/t-linux-uclibc +@@ -0,0 +1,5 @@ ++# Remove glibc specific files added in t-linux ++SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES)) ++ ++# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc ++LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH)) +--- gcc-4.1.0/gcc/config.gcc ++++ gcc-4.1.0/gcc/config.gcc +@@ -1887,7 +1887,7 @@ s390x-ibm-tpf*) + ;; + sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \ + sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \ +- sh-*-linux* | sh[346lbe]*-*-linux* | \ ++ sh*-*-linux* | sh[346lbe]*-*-linux* | \ + sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ + sh64-*-netbsd* | sh64l*-*-netbsd*) + tmake_file="${tmake_file} sh/t-sh sh/t-elf" +@@ -2341,6 +2341,12 @@ m32c-*-elf*) + ;; + esac + ++# Rather than hook into each target, just do it after all the linux ++# targets have been processed ++case ${target} in ++*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc" ++esac ++ + case ${target} in + i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1) + tmake_file="${tmake_file} i386/t-gmm_malloc" +--- gcc-4.1.0/boehm-gc/configure ++++ gcc-4.1.0/boehm-gc/configure +@@ -4320,6 +4320,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++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]+$' +--- gcc-4.1.0/configure ++++ gcc-4.1.0/configure +@@ -1133,7 +1133,7 @@ no) + ;; + "") + case "${target}" in +- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) ++ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) + # Enable libmudflap by default in GNU and friends. + ;; + *-*-freebsd*) +--- gcc-4.1.0/configure.in ++++ gcc-4.1.0/configure.in +@@ -341,7 +341,7 @@ no) + ;; + "") + case "${target}" in +- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) ++ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) + # Enable libmudflap by default in GNU and friends. + ;; + *-*-freebsd*) +--- gcc-4.1.0/contrib/regression/objs-gcc.sh ++++ gcc-4.1.0/contrib/regression/objs-gcc.sh +@@ -105,6 +105,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 +--- gcc-4.1.0/gcc/config/alpha/linux-elf.h ++++ gcc-4.1.0/gcc/config/alpha/linux-elf.h +@@ -27,7 +27,11 @@ Boston, MA 02110-1301, USA. */ + #define SUBTARGET_EXTRA_SPECS \ + { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, + ++#if defined USE_UCLIBC ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#else + #define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#endif + + #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ + %{O*:-O3} %{!O*:-O1} \ +--- gcc-4.1.0/gcc/config/arm/linux-elf.h ++++ gcc-4.1.0/gcc/config/arm/linux-elf.h +@@ -51,7 +51,11 @@ + + #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" + ++#ifdef USE_UCLIBC ++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0" ++#else + #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2" ++#endif + + #define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \ + %{b} \ +--- gcc-4.1.0/gcc/config/cris/linux.h ++++ gcc-4.1.0/gcc/config/cris/linux.h +@@ -73,6 +73,25 @@ Boston, MA 02110-1301, USA. */ + #undef CRIS_DEFAULT_CPU_VERSION + #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG + ++#ifdef USE_UCLIBC ++ ++#undef CRIS_SUBTARGET_VERSION ++#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc" ++ ++#undef CRIS_LINK_SUBTARGET_SPEC ++#define CRIS_LINK_SUBTARGET_SPEC \ ++ "-mcrislinux\ ++ -rpath-link include/asm/../..%s\ ++ %{shared} %{static}\ ++ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\ ++ %{!shared: \ ++ %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \ ++ %{!r:%{O2|O3: --gc-sections}}" ++ ++#else /* USE_UCLIBC */ ++ + #undef CRIS_SUBTARGET_VERSION + #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" + +@@ -87,6 +106,8 @@ Boston, MA 02110-1301, USA. */ + %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\ + %{!r:%{O2|O3: --gc-sections}}" + ++#endif /* USE_UCLIBC */ ++ + + /* Node: Run-time Target */ + +--- gcc-4.1.0/gcc/config/i386/linux.h ++++ gcc-4.1.0/gcc/config/i386/linux.h +@@ -107,6 +107,11 @@ Boston, MA 02110-1301, USA. */ + #define LINK_EMULATION "elf_i386" + #define DYNAMIC_LINKER "/lib/ld-linux.so.2" + ++#if defined USE_UCLIBC ++#undef DYNAMIC_LINKER ++#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#endif ++ + #undef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS \ + { "link_emulation", LINK_EMULATION },\ +--- gcc-4.1.0/gcc/config/i386/linux64.h ++++ gcc-4.1.0/gcc/config/i386/linux64.h +@@ -54,14 +54,21 @@ Boston, MA 02110-1301, USA. */ + When the -shared link option is used a final link is not being + done. */ + ++#ifdef USE_UCLIBC ++#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0" ++#else ++#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2" ++#endif + #undef LINK_SPEC + #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ +- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \ ++ %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \ ++ %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \ + %{static:-static}}" + + /* Similar to standard Linux, but adding -ffast-math support. */ +--- gcc-4.1.0/gcc/config/ia64/linux.h ++++ gcc-4.1.0/gcc/config/ia64/linux.h +@@ -37,13 +37,18 @@ do { \ + /* Define this for shared library support because it isn't in the main + linux.h file. */ + ++#ifdef USE_UCLIBC ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#else ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" ++#endif + #undef LINK_SPEC + #define LINK_SPEC "\ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \ ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ + %{static:-static}}" + + +--- gcc-4.1.0/gcc/config/m68k/linux.h ++++ gcc-4.1.0/gcc/config/m68k/linux.h +@@ -123,12 +123,17 @@ Boston, MA 02110-1301, USA. */ + + /* If ELF is the default format, we should not use /lib/elf. */ + ++#ifdef USE_UCLIBC ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#else ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" ++#endif + #undef LINK_SPEC + #define LINK_SPEC "-m m68kelf %{shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \ ++ %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ + %{static}}" + + /* For compatibility with linux/a.out */ +--- gcc-4.1.0/gcc/config/mips/linux.h ++++ gcc-4.1.0/gcc/config/mips/linux.h +@@ -105,6 +105,11 @@ Boston, MA 02110-1301, USA. */ + + /* Borrowed from sparc/linux.h */ + #undef LINK_SPEC ++#ifdef USE_UCLIBC ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#else ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" ++#endif + #define LINK_SPEC \ + "%(endian_spec) \ + %{shared:-shared} \ +@@ -112,7 +117,7 @@ Boston, MA 02110-1301, USA. */ + %{!ibcs: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ + %{static:-static}}}" + + #undef SUBTARGET_ASM_SPEC +--- gcc-4.1.0/gcc/config/pa/pa-linux.h ++++ gcc-4.1.0/gcc/config/pa/pa-linux.h +@@ -49,13 +49,18 @@ Boston, MA 02110-1301, USA. */ + /* Define this for shared library support because it isn't in the main + linux.h file. */ + ++#ifdef USE_UCLIBC ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#else ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" ++#endif + #undef LINK_SPEC + #define LINK_SPEC "\ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ + %{static:-static}}" + + /* glibc's profiling functions don't need gcc to allocate counters. */ +--- gcc-4.1.0/gcc/config/rs6000/linux.h ++++ gcc-4.1.0/gcc/config/rs6000/linux.h +@@ -72,7 +72,11 @@ + #define LINK_START_DEFAULT_SPEC "%(link_start_linux)" + + #undef LINK_OS_DEFAULT_SPEC ++#ifdef USE_UCLIBC ++#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)" ++#else + #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" ++#endif + + #define LINK_GCC_C_SEQUENCE_SPEC \ + "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" +--- gcc-4.1.0/gcc/config/rs6000/sysv4.h ++++ gcc-4.1.0/gcc/config/rs6000/sysv4.h +@@ -866,6 +866,7 @@ extern int fixuplabelno; + mcall-linux : %(link_os_linux) ; \ + mcall-gnu : %(link_os_gnu) ; \ + mcall-netbsd : %(link_os_netbsd) ; \ ++ mcall-linux-uclibc : %(link_os_linux_uclibc); \ + mcall-openbsd: %(link_os_openbsd) ; \ + : %(link_os_default) }" + +@@ -1043,6 +1044,10 @@ extern int fixuplabelno; + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}" + ++#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}" ++ + #if defined(HAVE_LD_EH_FRAME_HDR) + # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " + #endif +@@ -1209,6 +1214,7 @@ ncrtn.o%s" + { "link_os_sim", LINK_OS_SIM_SPEC }, \ + { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \ + { "link_os_linux", LINK_OS_LINUX_SPEC }, \ ++ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \ + { "link_os_gnu", LINK_OS_GNU_SPEC }, \ + { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \ + { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ +--- gcc-4.1.0/gcc/config/s390/linux.h ++++ gcc-4.1.0/gcc/config/s390/linux.h +@@ -77,6 +77,13 @@ Software Foundation, 51 Franklin Street, + #define MULTILIB_DEFAULTS { "m31" } + #endif + ++#ifdef USE_UCLIBC ++#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0" ++#else ++#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1" ++#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1" ++#endif + #undef LINK_SPEC + #define LINK_SPEC \ + "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ +@@ -86,8 +93,8 @@ Software Foundation, 51 Franklin Street, + %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker: \ +- %{m31:-dynamic-linker /lib/ld.so.1} \ +- %{m64:-dynamic-linker /lib/ld64.so.1}}}}" ++ %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \ ++ %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}" + + + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack +--- gcc-4.1.0/gcc/config/sh/linux.h ++++ gcc-4.1.0/gcc/config/sh/linux.h +@@ -56,12 +56,21 @@ Boston, MA 02110-1301, USA. */ + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" + #undef SUBTARGET_LINK_SPEC ++#ifdef USE_UCLIBC ++#define SUBTARGET_LINK_SPEC \ ++ "%{shared:-shared} \ ++ %{!static: \ ++ %{rdynamic:-export-dynamic} \ ++ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ ++ %{static:-static}" ++#else + #define SUBTARGET_LINK_SPEC \ + "%{shared:-shared} \ + %{!static: \ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{static:-static}" ++#endif + + /* Output assembler code to STREAM to call the profiler. */ + +--- gcc-4.1.0/gcc/config/sparc/linux.h ++++ gcc-4.1.0/gcc/config/sparc/linux.h +@@ -125,6 +125,11 @@ Boston, MA 02110-1301, USA. */ + + /* If ELF is the default format, we should not use /lib/elf. */ + ++#ifdef USE_UCLIBC ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#else ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#endif + #undef LINK_SPEC + #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ + %{!mno-relax:%{!r:-relax}} \ +@@ -132,7 +137,7 @@ Boston, MA 02110-1301, USA. */ + %{!ibcs: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ + %{static:-static}}}" + + /* The sun bundled assembler doesn't accept -Yd, (and neither does gas). +--- gcc-4.1.0/gcc/config/sparc/linux64.h ++++ gcc-4.1.0/gcc/config/sparc/linux64.h +@@ -162,12 +162,17 @@ Boston, MA 02110-1301, USA. */ + { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ + { "link_arch", LINK_ARCH_SPEC }, + ++#ifdef USE_UCLIBC ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#else ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#endif + #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ + %{!shared: \ + %{!ibcs: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ ++ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ + %{static:-static}}} \ + " + +--- gcc-4.1.0/libffi/configure ++++ gcc-4.1.0/libffi/configure +@@ -3457,6 +3457,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++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]+$' +--- gcc-4.1.0/libgfortran/configure ++++ gcc-4.1.0/libgfortran/configure +@@ -3699,6 +3699,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++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]+$' +--- gcc-4.1.0/libjava/configure ++++ gcc-4.1.0/libjava/configure +@@ -5137,6 +5137,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++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]+$' +--- gcc-4.1.0/libmudflap/configure ++++ gcc-4.1.0/libmudflap/configure +@@ -5382,6 +5382,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++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]+$' +--- gcc-4.1.0/libobjc/configure ++++ gcc-4.1.0/libobjc/configure +@@ -3312,6 +3312,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++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]+$' +--- gcc-4.1.0/libtool.m4 ++++ gcc-4.1.0/libtool.m4 +@@ -743,6 +743,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++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]+$'] +--- gcc-4.1.0/ltconfig ++++ gcc-4.1.0/ltconfig +@@ -603,6 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- + + # 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 +@@ -1274,6 +1275,23 @@ linux-gnu*) + dynamic_linker='GNU/Linux ld.so' + ;; + ++linux-uclibc*) ++ version_type=linux ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' ++ soname_spec='${libname}${release}.so$major' ++ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=no ++ # This implies no fast_install, which is unacceptable. ++ # Some rework will be needed to allow for fast_install ++ # before this can be enabled. ++ hardcode_into_libs=yes ++ # Assume using the uClibc dynamic linker. ++ dynamic_linker="uClibc ld.so" ++ ;; ++ + netbsd*) + need_lib_prefix=no + need_version=no +--- gcc-4.1.0/zlib/configure ++++ gcc-4.1.0/zlib/configure +@@ -3426,6 +3426,11 @@ linux-gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + ++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]+$' diff --git a/recipes/gcc/gcc-4.1.1/110-arm-eabi.patch b/recipes/gcc/gcc-4.1.1/110-arm-eabi.patch new file mode 100644 index 0000000000..acebe5308f --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/110-arm-eabi.patch @@ -0,0 +1,27 @@ +--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300 ++++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300 +@@ -674,7 +674,7 @@ + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" + tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm" + case ${target} in +- arm*-*-linux-gnueabi) ++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) + tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h" + tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi" + # The BPABI long long divmod functions return a 128-bit value in + +diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h +--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300 ++++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400 +@@ -53,7 +53,11 @@ + /* Use ld-linux.so.3 so that it will be possible to run "classic" + GNU/Linux binaries on an EABI system. */ + #undef LINUX_TARGET_INTERPRETER ++#ifdef USE_UCLIBC ++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0" ++#else + #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3" ++#endif + + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ diff --git a/recipes/gcc/gcc-4.1.1/200-uclibc-locale.patch b/recipes/gcc/gcc-4.1.1/200-uclibc-locale.patch new file mode 100644 index 0000000000..9d65a6234e --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/200-uclibc-locale.patch @@ -0,0 +1,3261 @@ +diff -urN gcc-4.1.0-dist/libstdc++-v3/acinclude.m4 gcc-4.1.0/libstdc++-v3/acinclude.m4 +--- gcc-4.1.0-dist/libstdc++-v3/acinclude.m4 2006-03-26 12:08:28.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/acinclude.m4 2006-03-25 22:06:30.000000000 -0700 +@@ -1071,7 +1071,7 @@ + AC_MSG_CHECKING([for C locale to use]) + GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], + [use MODEL for target locale package], +- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto]) ++ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto]) + + # If they didn't use this option switch, or if they specified --enable + # with no specific model, we'll have to look for one. If they +@@ -1087,6 +1087,9 @@ + # Default to "generic". + if test $enable_clocale_flag = auto; then + case ${target_os} in ++ *-uclibc*) ++ enable_clocale_flag=uclibc ++ ;; + linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) + AC_EGREP_CPP([_GLIBCXX_ok], [ + #include <features.h> +@@ -1230,6 +1233,40 @@ + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; ++ uclibc) ++ AC_MSG_RESULT(uclibc) ++ ++ # Declare intention to use gettext, and add support for specific ++ # languages. ++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT ++ ALL_LINGUAS="de fr" ++ ++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. ++ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) ++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then ++ USE_NLS=yes ++ fi ++ # Export the build objects. ++ for ling in $ALL_LINGUAS; do \ ++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ ++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ ++ done ++ AC_SUBST(glibcxx_MOFILES) ++ AC_SUBST(glibcxx_POFILES) ++ ++ CLOCALE_H=config/locale/uclibc/c_locale.h ++ CLOCALE_CC=config/locale/uclibc/c_locale.cc ++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc ++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc ++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc ++ CMESSAGES_H=config/locale/uclibc/messages_members.h ++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc ++ CMONEY_CC=config/locale/uclibc/monetary_members.cc ++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc ++ CTIME_H=config/locale/uclibc/time_members.h ++ CTIME_CC=config/locale/uclibc/time_members.cc ++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h ++ ;; + esac + + # This is where the testsuite looks for locale catalogs, using the +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,63 @@ ++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- ++ ++// Copyright (C) 2002, 2004, 2005 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. ++ ++// Written by Jakub Jelinek <jakub@redhat.com> ++ ++#include <bits/c++config.h> ++#include <clocale> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning clean this up ++#endif ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ ++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l; ++extern "C" __typeof(strcoll_l) __strcoll_l; ++extern "C" __typeof(strftime_l) __strftime_l; ++extern "C" __typeof(strtod_l) __strtod_l; ++extern "C" __typeof(strtof_l) __strtof_l; ++extern "C" __typeof(strtold_l) __strtold_l; ++extern "C" __typeof(strxfrm_l) __strxfrm_l; ++extern "C" __typeof(newlocale) __newlocale; ++extern "C" __typeof(freelocale) __freelocale; ++extern "C" __typeof(duplocale) __duplocale; ++extern "C" __typeof(uselocale) __uselocale; ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++extern "C" __typeof(iswctype_l) __iswctype_l; ++extern "C" __typeof(towlower_l) __towlower_l; ++extern "C" __typeof(towupper_l) __towupper_l; ++extern "C" __typeof(wcscoll_l) __wcscoll_l; ++extern "C" __typeof(wcsftime_l) __wcsftime_l; ++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; ++extern "C" __typeof(wctype_l) __wctype_l; ++#endif ++ ++#endif // GLIBC 2.3 and later +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,152 @@ ++// Wrapper for underlying C-language localization -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 ++// 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. ++ ++// ++// ISO C++ 14882: 22.8 Standard locale categories. ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#include <cerrno> // For errno ++#include <locale> ++#include <stdexcept> ++#include <langinfo.h> ++#include <bits/c++locale_internal.h> ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) ++#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) ++#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) ++#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) ++#define __strtof_l(S, E, L) strtof((S), (E)) ++#define __strtod_l(S, E, L) strtod((S), (E)) ++#define __strtold_l(S, E, L) strtold((S), (E)) ++#warning should dummy __newlocale check for C|POSIX ? ++#define __newlocale(a, b, c) NULL ++#define __freelocale(a) ((void)0) ++#define __duplocale(a) __c_locale() ++#endif ++ ++namespace std ++{ ++ template<> ++ void ++ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, ++ const __c_locale& __cloc) ++ { ++ char* __sanity; ++ errno = 0; ++ float __f = __strtof_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __f; ++ else ++ __err |= ios_base::failbit; ++ } ++ ++ template<> ++ void ++ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, ++ const __c_locale& __cloc) ++ { ++ char* __sanity; ++ errno = 0; ++ double __d = __strtod_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __d; ++ else ++ __err |= ios_base::failbit; ++ } ++ ++ template<> ++ void ++ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, ++ const __c_locale& __cloc) ++ { ++ char* __sanity; ++ errno = 0; ++ long double __ld = __strtold_l(__s, &__sanity, __cloc); ++ if (__sanity != __s && errno != ERANGE) ++ __v = __ld; ++ else ++ __err |= ios_base::failbit; ++ } ++ ++ void ++ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, ++ __c_locale __old) ++ { ++ __cloc = __newlocale(1 << LC_ALL, __s, __old); ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ if (!__cloc) ++ { ++ // This named locale is not supported by the underlying OS. ++ __throw_runtime_error(__N("locale::facet::_S_create_c_locale " ++ "name not valid")); ++ } ++#endif ++ } ++ ++ void ++ locale::facet::_S_destroy_c_locale(__c_locale& __cloc) ++ { ++ if (__cloc && _S_get_c_locale() != __cloc) ++ __freelocale(__cloc); ++ } ++ ++ __c_locale ++ locale::facet::_S_clone_c_locale(__c_locale& __cloc) ++ { return __duplocale(__cloc); } ++} // namespace std ++ ++namespace __gnu_cxx ++{ ++ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = ++ { ++ "LC_CTYPE", ++ "LC_NUMERIC", ++ "LC_TIME", ++ "LC_COLLATE", ++ "LC_MONETARY", ++ "LC_MESSAGES", ++#if _GLIBCXX_NUM_CATEGORIES != 0 ++ "LC_PAPER", ++ "LC_NAME", ++ "LC_ADDRESS", ++ "LC_TELEPHONE", ++ "LC_MEASUREMENT", ++ "LC_IDENTIFICATION" ++#endif ++ }; ++} ++ ++namespace std ++{ ++ const char* const* const locale::_S_categories = __gnu_cxx::category_names; ++} // namespace std +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-26 13:03:42.000000000 -0700 +@@ -0,0 +1,117 @@ ++// Wrapper for underlying C-language localization -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 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. ++ ++// ++// ISO C++ 14882: 22.8 Standard locale categories. ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#ifndef _C_LOCALE_H ++#define _C_LOCALE_H 1 ++ ++#pragma GCC system_header ++ ++#include <cstring> // get std::strlen ++#include <cstdio> // get std::snprintf or std::sprintf ++#include <clocale> ++#include <langinfo.h> // For codecvt ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this ++#endif ++#ifdef __UCLIBC_HAS_LOCALE__ ++#include <iconv.h> // For codecvt using iconv, iconv_t ++#endif ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++#include <libintl.h> // For messages ++#endif ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning what is _GLIBCXX_C_LOCALE_GNU for ++#endif ++#define _GLIBCXX_C_LOCALE_GNU 1 ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix categories ++#endif ++// #define _GLIBCXX_NUM_CATEGORIES 6 ++#define _GLIBCXX_NUM_CATEGORIES 0 ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++namespace __gnu_cxx ++{ ++ extern "C" __typeof(uselocale) __uselocale; ++} ++#endif ++ ++namespace std ++{ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ typedef __locale_t __c_locale; ++#else ++ typedef int* __c_locale; ++#endif ++ ++ // Convert numeric value of type _Tv to string and return length of ++ // string. If snprintf is available use it, otherwise fall back to ++ // the unsafe sprintf which, in general, can be dangerous and should ++ // be avoided. ++ template<typename _Tv> ++ int ++ __convert_from_v(char* __out, ++ const int __size __attribute__ ((__unused__)), ++ const char* __fmt, ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ _Tv __v, const __c_locale& __cloc, int __prec) ++ { ++ __c_locale __old = __gnu_cxx::__uselocale(__cloc); ++#else ++ _Tv __v, const __c_locale&, int __prec) ++ { ++# ifdef __UCLIBC_HAS_LOCALE__ ++ char* __old = std::setlocale(LC_ALL, NULL); ++ char* __sav = new char[std::strlen(__old) + 1]; ++ std::strcpy(__sav, __old); ++ std::setlocale(LC_ALL, "C"); ++# endif ++#endif ++ ++ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __gnu_cxx::__uselocale(__old); ++#elif defined __UCLIBC_HAS_LOCALE__ ++ std::setlocale(LC_ALL, __sav); ++ delete [] __sav; ++#endif ++ return __ret; ++ } ++} ++ ++#endif +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,306 @@ ++// std::codecvt implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2002, 2003 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. ++ ++// ++// ISO C++ 14882: 22.2.1.5 - Template class codecvt ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#include <locale> ++#include <bits/c++locale_internal.h> ++ ++namespace std ++{ ++ // Specializations. ++#ifdef _GLIBCXX_USE_WCHAR_T ++ codecvt_base::result ++ codecvt<wchar_t, char, mbstate_t>:: ++ do_out(state_type& __state, const intern_type* __from, ++ const intern_type* __from_end, const intern_type*& __from_next, ++ extern_type* __to, extern_type* __to_end, ++ extern_type*& __to_next) const ++ { ++ result __ret = ok; ++ state_type __tmp_state(__state); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ ++ // wcsnrtombs is *very* fast but stops if encounters NUL characters: ++ // in case we fall back to wcrtomb and then continue, in a loop. ++ // NB: wcsnrtombs is a GNU extension ++ for (__from_next = __from, __to_next = __to; ++ __from_next < __from_end && __to_next < __to_end ++ && __ret == ok;) ++ { ++ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0', ++ __from_end - __from_next); ++ if (!__from_chunk_end) ++ __from_chunk_end = __from_end; ++ ++ __from = __from_next; ++ const size_t __conv = wcsnrtombs(__to_next, &__from_next, ++ __from_chunk_end - __from_next, ++ __to_end - __to_next, &__state); ++ if (__conv == static_cast<size_t>(-1)) ++ { ++ // In case of error, in order to stop at the exact place we ++ // have to start again from the beginning with a series of ++ // wcrtomb. ++ for (; __from < __from_next; ++__from) ++ __to_next += wcrtomb(__to_next, *__from, &__tmp_state); ++ __state = __tmp_state; ++ __ret = error; ++ } ++ else if (__from_next && __from_next < __from_chunk_end) ++ { ++ __to_next += __conv; ++ __ret = partial; ++ } ++ else ++ { ++ __from_next = __from_chunk_end; ++ __to_next += __conv; ++ } ++ ++ if (__from_next < __from_end && __ret == ok) ++ { ++ extern_type __buf[MB_LEN_MAX]; ++ __tmp_state = __state; ++ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state); ++ if (__conv > static_cast<size_t>(__to_end - __to_next)) ++ __ret = partial; ++ else ++ { ++ memcpy(__to_next, __buf, __conv); ++ __state = __tmp_state; ++ __to_next += __conv; ++ ++__from_next; ++ } ++ } ++ } ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ ++ return __ret; ++ } ++ ++ codecvt_base::result ++ codecvt<wchar_t, char, mbstate_t>:: ++ do_in(state_type& __state, const extern_type* __from, ++ const extern_type* __from_end, const extern_type*& __from_next, ++ intern_type* __to, intern_type* __to_end, ++ intern_type*& __to_next) const ++ { ++ result __ret = ok; ++ state_type __tmp_state(__state); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ ++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: ++ // in case we store a L'\0' and then continue, in a loop. ++ // NB: mbsnrtowcs is a GNU extension ++ for (__from_next = __from, __to_next = __to; ++ __from_next < __from_end && __to_next < __to_end ++ && __ret == ok;) ++ { ++ const extern_type* __from_chunk_end; ++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0', ++ __from_end ++ - __from_next)); ++ if (!__from_chunk_end) ++ __from_chunk_end = __from_end; ++ ++ __from = __from_next; ++ size_t __conv = mbsnrtowcs(__to_next, &__from_next, ++ __from_chunk_end - __from_next, ++ __to_end - __to_next, &__state); ++ if (__conv == static_cast<size_t>(-1)) ++ { ++ // In case of error, in order to stop at the exact place we ++ // have to start again from the beginning with a series of ++ // mbrtowc. ++ for (;; ++__to_next, __from += __conv) ++ { ++ __conv = mbrtowc(__to_next, __from, __from_end - __from, ++ &__tmp_state); ++ if (__conv == static_cast<size_t>(-1) ++ || __conv == static_cast<size_t>(-2)) ++ break; ++ } ++ __from_next = __from; ++ __state = __tmp_state; ++ __ret = error; ++ } ++ else if (__from_next && __from_next < __from_chunk_end) ++ { ++ // It is unclear what to return in this case (see DR 382). ++ __to_next += __conv; ++ __ret = partial; ++ } ++ else ++ { ++ __from_next = __from_chunk_end; ++ __to_next += __conv; ++ } ++ ++ if (__from_next < __from_end && __ret == ok) ++ { ++ if (__to_next < __to_end) ++ { ++ // XXX Probably wrong for stateful encodings ++ __tmp_state = __state; ++ ++__from_next; ++ *__to_next++ = L'\0'; ++ } ++ else ++ __ret = partial; ++ } ++ } ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ ++ return __ret; ++ } ++ ++ int ++ codecvt<wchar_t, char, mbstate_t>:: ++ do_encoding() const throw() ++ { ++ // XXX This implementation assumes that the encoding is ++ // stateless and is either single-byte or variable-width. ++ int __ret = 0; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ if (MB_CUR_MAX == 1) ++ __ret = 1; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return __ret; ++ } ++ ++ int ++ codecvt<wchar_t, char, mbstate_t>:: ++ do_max_length() const throw() ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ // XXX Probably wrong for stateful encodings. ++ int __ret = MB_CUR_MAX; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return __ret; ++ } ++ ++ int ++ codecvt<wchar_t, char, mbstate_t>:: ++ do_length(state_type& __state, const extern_type* __from, ++ const extern_type* __end, size_t __max) const ++ { ++ int __ret = 0; ++ state_type __tmp_state(__state); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_codecvt); ++#endif ++ ++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters: ++ // in case we advance past it and then continue, in a loop. ++ // NB: mbsnrtowcs is a GNU extension ++ ++ // A dummy internal buffer is needed in order for mbsnrtocws to consider ++ // its fourth parameter (it wouldn't with NULL as first parameter). ++ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) ++ * __max)); ++ while (__from < __end && __max) ++ { ++ const extern_type* __from_chunk_end; ++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0', ++ __end ++ - __from)); ++ if (!__from_chunk_end) ++ __from_chunk_end = __end; ++ ++ const extern_type* __tmp_from = __from; ++ size_t __conv = mbsnrtowcs(__to, &__from, ++ __from_chunk_end - __from, ++ __max, &__state); ++ if (__conv == static_cast<size_t>(-1)) ++ { ++ // In case of error, in order to stop at the exact place we ++ // have to start again from the beginning with a series of ++ // mbrtowc. ++ for (__from = __tmp_from;; __from += __conv) ++ { ++ __conv = mbrtowc(NULL, __from, __end - __from, ++ &__tmp_state); ++ if (__conv == static_cast<size_t>(-1) ++ || __conv == static_cast<size_t>(-2)) ++ break; ++ } ++ __state = __tmp_state; ++ __ret += __from - __tmp_from; ++ break; ++ } ++ if (!__from) ++ __from = __from_chunk_end; ++ ++ __ret += __from - __tmp_from; ++ __max -= __conv; ++ ++ if (__from < __end && __max) ++ { ++ // XXX Probably wrong for stateful encodings ++ __tmp_state = __state; ++ ++__from; ++ ++__ret; ++ --__max; ++ } ++ } ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ ++ return __ret; ++ } ++#endif ++} +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,80 @@ ++// std::collate implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002 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. ++ ++// ++// ISO C++ 14882: 22.2.4.1.2 collate virtual functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#include <locale> ++#include <bits/c++locale_internal.h> ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) ++#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) ++#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) ++#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) ++#endif ++ ++namespace std ++{ ++ // These are basically extensions to char_traits, and perhaps should ++ // be put there instead of here. ++ template<> ++ int ++ collate<char>::_M_compare(const char* __one, const char* __two) const ++ { ++ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate); ++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); ++ } ++ ++ template<> ++ size_t ++ collate<char>::_M_transform(char* __to, const char* __from, ++ size_t __n) const ++ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ int ++ collate<wchar_t>::_M_compare(const wchar_t* __one, ++ const wchar_t* __two) const ++ { ++ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate); ++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); ++ } ++ ++ template<> ++ size_t ++ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from, ++ size_t __n) const ++ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } ++#endif ++} +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,314 @@ ++// std::ctype implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 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. ++ ++// ++// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions. ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#define _LIBC ++#include <locale> ++#undef _LIBC ++#include <bits/c++locale_internal.h> ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __wctype_l(S, L) wctype((S)) ++#define __towupper_l(C, L) towupper((C)) ++#define __towlower_l(C, L) towlower((C)) ++#define __iswctype_l(C, M, L) iswctype((C), (M)) ++#endif ++ ++namespace std ++{ ++ // NB: The other ctype<char> specializations are in src/locale.cc and ++ // various /config/os/* files. ++ template<> ++ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs) ++ : ctype<char>(0, false, __refs) ++ { ++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) ++ { ++ this->_S_destroy_c_locale(this->_M_c_locale_ctype); ++ this->_S_create_c_locale(this->_M_c_locale_ctype, __s); ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; ++ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; ++ this->_M_table = this->_M_c_locale_ctype->__ctype_b; ++#endif ++ } ++ } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ ctype<wchar_t>::__wmask_type ++ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const ++ { ++ __wmask_type __ret; ++ switch (__m) ++ { ++ case space: ++ __ret = __wctype_l("space", _M_c_locale_ctype); ++ break; ++ case print: ++ __ret = __wctype_l("print", _M_c_locale_ctype); ++ break; ++ case cntrl: ++ __ret = __wctype_l("cntrl", _M_c_locale_ctype); ++ break; ++ case upper: ++ __ret = __wctype_l("upper", _M_c_locale_ctype); ++ break; ++ case lower: ++ __ret = __wctype_l("lower", _M_c_locale_ctype); ++ break; ++ case alpha: ++ __ret = __wctype_l("alpha", _M_c_locale_ctype); ++ break; ++ case digit: ++ __ret = __wctype_l("digit", _M_c_locale_ctype); ++ break; ++ case punct: ++ __ret = __wctype_l("punct", _M_c_locale_ctype); ++ break; ++ case xdigit: ++ __ret = __wctype_l("xdigit", _M_c_locale_ctype); ++ break; ++ case alnum: ++ __ret = __wctype_l("alnum", _M_c_locale_ctype); ++ break; ++ case graph: ++ __ret = __wctype_l("graph", _M_c_locale_ctype); ++ break; ++ default: ++ __ret = __wmask_type(); ++ } ++ return __ret; ++ } ++ ++ wchar_t ++ ctype<wchar_t>::do_toupper(wchar_t __c) const ++ { return __towupper_l(__c, _M_c_locale_ctype); } ++ ++ const wchar_t* ++ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const ++ { ++ while (__lo < __hi) ++ { ++ *__lo = __towupper_l(*__lo, _M_c_locale_ctype); ++ ++__lo; ++ } ++ return __hi; ++ } ++ ++ wchar_t ++ ctype<wchar_t>::do_tolower(wchar_t __c) const ++ { return __towlower_l(__c, _M_c_locale_ctype); } ++ ++ const wchar_t* ++ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const ++ { ++ while (__lo < __hi) ++ { ++ *__lo = __towlower_l(*__lo, _M_c_locale_ctype); ++ ++__lo; ++ } ++ return __hi; ++ } ++ ++ bool ++ ctype<wchar_t>:: ++ do_is(mask __m, wchar_t __c) const ++ { ++ // The case of __m == ctype_base::space is particularly important, ++ // due to its use in many istream functions. Therefore we deal with ++ // it first, exploiting the knowledge that on GNU systems _M_bit[5] ++ // is the mask corresponding to ctype_base::space. NB: an encoding ++ // change would not affect correctness! ++ bool __ret = false; ++ if (__m == _M_bit[5]) ++ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype); ++ else ++ { ++ // Highest bitmask in ctype_base == 10, but extra in "C" ++ // library for blank. ++ const size_t __bitmasksize = 11; ++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) ++ if (__m & _M_bit[__bitcur]) ++ { ++ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) ++ { ++ __ret = true; ++ break; ++ } ++ else if (__m == _M_bit[__bitcur]) ++ break; ++ } ++ } ++ return __ret; ++ } ++ ++ const wchar_t* ++ ctype<wchar_t>:: ++ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const ++ { ++ for (; __lo < __hi; ++__vec, ++__lo) ++ { ++ // Highest bitmask in ctype_base == 10, but extra in "C" ++ // library for blank. ++ const size_t __bitmasksize = 11; ++ mask __m = 0; ++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) ++ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype)) ++ __m |= _M_bit[__bitcur]; ++ *__vec = __m; ++ } ++ return __hi; ++ } ++ ++ const wchar_t* ++ ctype<wchar_t>:: ++ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const ++ { ++ while (__lo < __hi && !this->do_is(__m, *__lo)) ++ ++__lo; ++ return __lo; ++ } ++ ++ const wchar_t* ++ ctype<wchar_t>:: ++ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const ++ { ++ while (__lo < __hi && this->do_is(__m, *__lo) != 0) ++ ++__lo; ++ return __lo; ++ } ++ ++ wchar_t ++ ctype<wchar_t>:: ++ do_widen(char __c) const ++ { return _M_widen[static_cast<unsigned char>(__c)]; } ++ ++ const char* ++ ctype<wchar_t>:: ++ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const ++ { ++ while (__lo < __hi) ++ { ++ *__dest = _M_widen[static_cast<unsigned char>(*__lo)]; ++ ++__lo; ++ ++__dest; ++ } ++ return __hi; ++ } ++ ++ char ++ ctype<wchar_t>:: ++ do_narrow(wchar_t __wc, char __dfault) const ++ { ++ if (__wc >= 0 && __wc < 128 && _M_narrow_ok) ++ return _M_narrow[__wc]; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_ctype); ++#endif ++ const int __c = wctob(__wc); ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return (__c == EOF ? __dfault : static_cast<char>(__c)); ++ } ++ ++ const wchar_t* ++ ctype<wchar_t>:: ++ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, ++ char* __dest) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_ctype); ++#endif ++ if (_M_narrow_ok) ++ while (__lo < __hi) ++ { ++ if (*__lo >= 0 && *__lo < 128) ++ *__dest = _M_narrow[*__lo]; ++ else ++ { ++ const int __c = wctob(*__lo); ++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c)); ++ } ++ ++__lo; ++ ++__dest; ++ } ++ else ++ while (__lo < __hi) ++ { ++ const int __c = wctob(*__lo); ++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c)); ++ ++__lo; ++ ++__dest; ++ } ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ return __hi; ++ } ++ ++ void ++ ctype<wchar_t>::_M_initialize_ctype() ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_ctype); ++#endif ++ wint_t __i; ++ for (__i = 0; __i < 128; ++__i) ++ { ++ const int __c = wctob(__i); ++ if (__c == EOF) ++ break; ++ else ++ _M_narrow[__i] = static_cast<char>(__c); ++ } ++ if (__i == 128) ++ _M_narrow_ok = true; ++ else ++ _M_narrow_ok = false; ++ for (size_t __j = 0; ++ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j) ++ _M_widen[__j] = btowc(__j); ++ ++ for (size_t __k = 0; __k <= 11; ++__k) ++ { ++ _M_bit[__k] = static_cast<mask>(_ISbit(__k)); ++ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]); ++ } ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#endif ++ } ++#endif // _GLIBCXX_USE_WCHAR_T ++} +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,100 @@ ++// std::messages implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002 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. ++ ++// ++// ISO C++ 14882: 22.2.7.1.2 messages virtual functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#include <locale> ++#include <bits/c++locale_internal.h> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix gettext stuff ++#endif ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++extern "C" char *__dcgettext(const char *domainname, ++ const char *msgid, int category); ++#undef gettext ++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) ++#else ++#undef gettext ++#define gettext(msgid) (msgid) ++#endif ++ ++namespace std ++{ ++ // Specializations. ++ template<> ++ string ++ messages<char>::do_get(catalog, int, int, const string& __dfault) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_messages); ++ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str())); ++ __uselocale(__old); ++ return string(__msg); ++#elif defined __UCLIBC_HAS_LOCALE__ ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_messages); ++ const char* __msg = gettext(__dfault.c_str()); ++ setlocale(LC_ALL, __old); ++ free(__old); ++ return string(__msg); ++#else ++ const char* __msg = gettext(__dfault.c_str()); ++ return string(__msg); ++#endif ++ } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ wstring ++ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const ++ { ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(_M_c_locale_messages); ++ char* __msg = gettext(_M_convert_to_char(__dfault)); ++ __uselocale(__old); ++ return _M_convert_from_char(__msg); ++# elif defined __UCLIBC_HAS_LOCALE__ ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_messages); ++ char* __msg = gettext(_M_convert_to_char(__dfault)); ++ setlocale(LC_ALL, __old); ++ free(__old); ++ return _M_convert_from_char(__msg); ++# else ++ char* __msg = gettext(_M_convert_to_char(__dfault)); ++ return _M_convert_from_char(__msg); ++# endif ++ } ++#endif ++} +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,121 @@ ++// std::messages implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 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. ++ ++// ++// ISO C++ 14882: 22.2.7.1.2 messages functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix prototypes for *textdomain funcs ++#endif ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ ++extern "C" char *__textdomain(const char *domainname); ++extern "C" char *__bindtextdomain(const char *domainname, ++ const char *dirname); ++#else ++#undef __textdomain ++#undef __bindtextdomain ++#define __textdomain(D) ((void)0) ++#define __bindtextdomain(D,P) ((void)0) ++#endif ++ ++ // Non-virtual member functions. ++ template<typename _CharT> ++ messages<_CharT>::messages(size_t __refs) ++ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), ++ _M_name_messages(_S_get_c_name()) ++ { } ++ ++ template<typename _CharT> ++ messages<_CharT>::messages(__c_locale __cloc, const char* __s, ++ size_t __refs) ++ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL) ++ { ++ const size_t __len = std::strlen(__s) + 1; ++ char* __tmp = new char[__len]; ++ std::memcpy(__tmp, __s, __len); ++ _M_name_messages = __tmp; ++ ++ // Last to avoid leaking memory if new throws. ++ _M_c_locale_messages = _S_clone_c_locale(__cloc); ++ } ++ ++ template<typename _CharT> ++ typename messages<_CharT>::catalog ++ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, ++ const char* __dir) const ++ { ++ __bindtextdomain(__s.c_str(), __dir); ++ return this->do_open(__s, __loc); ++ } ++ ++ // Virtual member functions. ++ template<typename _CharT> ++ messages<_CharT>::~messages() ++ { ++ if (_M_name_messages != _S_get_c_name()) ++ delete [] _M_name_messages; ++ _S_destroy_c_locale(_M_c_locale_messages); ++ } ++ ++ template<typename _CharT> ++ typename messages<_CharT>::catalog ++ messages<_CharT>::do_open(const basic_string<char>& __s, ++ const locale&) const ++ { ++ // No error checking is done, assume the catalog exists and can ++ // be used. ++ __textdomain(__s.c_str()); ++ return 0; ++ } ++ ++ template<typename _CharT> ++ void ++ messages<_CharT>::do_close(catalog) const ++ { } ++ ++ // messages_byname ++ template<typename _CharT> ++ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) ++ : messages<_CharT>(__refs) ++ { ++ if (this->_M_name_messages != locale::facet::_S_get_c_name()) ++ delete [] this->_M_name_messages; ++ char* __tmp = new char[std::strlen(__s) + 1]; ++ std::strcpy(__tmp, __s); ++ this->_M_name_messages = __tmp; ++ ++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) ++ { ++ this->_S_destroy_c_locale(this->_M_c_locale_messages); ++ this->_S_create_c_locale(this->_M_c_locale_messages, __s); ++ } ++ } +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,692 @@ ++// std::moneypunct implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 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. ++ ++// ++// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#define _LIBC ++#include <locale> ++#undef _LIBC ++#include <bits/c++locale_internal.h> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning optimize this for uclibc ++#warning tailor for stub locale support ++#endif ++ ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __nl_langinfo_l(N, L) nl_langinfo((N)) ++#endif ++ ++namespace std ++{ ++ // Construct and return valid pattern consisting of some combination of: ++ // space none symbol sign value ++ money_base::pattern ++ money_base::_S_construct_pattern(char __precedes, char __space, char __posn) ++ { ++ pattern __ret; ++ ++ // This insanely complicated routine attempts to construct a valid ++ // pattern for use with monyepunct. A couple of invariants: ++ ++ // if (__precedes) symbol -> value ++ // else value -> symbol ++ ++ // if (__space) space ++ // else none ++ ++ // none == never first ++ // space never first or last ++ ++ // Any elegant implementations of this are welcome. ++ switch (__posn) ++ { ++ case 0: ++ case 1: ++ // 1 The sign precedes the value and symbol. ++ __ret.field[0] = sign; ++ if (__space) ++ { ++ // Pattern starts with sign. ++ if (__precedes) ++ { ++ __ret.field[1] = symbol; ++ __ret.field[3] = value; ++ } ++ else ++ { ++ __ret.field[1] = value; ++ __ret.field[3] = symbol; ++ } ++ __ret.field[2] = space; ++ } ++ else ++ { ++ // Pattern starts with sign and ends with none. ++ if (__precedes) ++ { ++ __ret.field[1] = symbol; ++ __ret.field[2] = value; ++ } ++ else ++ { ++ __ret.field[1] = value; ++ __ret.field[2] = symbol; ++ } ++ __ret.field[3] = none; ++ } ++ break; ++ case 2: ++ // 2 The sign follows the value and symbol. ++ if (__space) ++ { ++ // Pattern either ends with sign. ++ if (__precedes) ++ { ++ __ret.field[0] = symbol; ++ __ret.field[2] = value; ++ } ++ else ++ { ++ __ret.field[0] = value; ++ __ret.field[2] = symbol; ++ } ++ __ret.field[1] = space; ++ __ret.field[3] = sign; ++ } ++ else ++ { ++ // Pattern ends with sign then none. ++ if (__precedes) ++ { ++ __ret.field[0] = symbol; ++ __ret.field[1] = value; ++ } ++ else ++ { ++ __ret.field[0] = value; ++ __ret.field[1] = symbol; ++ } ++ __ret.field[2] = sign; ++ __ret.field[3] = none; ++ } ++ break; ++ case 3: ++ // 3 The sign immediately precedes the symbol. ++ if (__precedes) ++ { ++ __ret.field[0] = sign; ++ __ret.field[1] = symbol; ++ if (__space) ++ { ++ __ret.field[2] = space; ++ __ret.field[3] = value; ++ } ++ else ++ { ++ __ret.field[2] = value; ++ __ret.field[3] = none; ++ } ++ } ++ else ++ { ++ __ret.field[0] = value; ++ if (__space) ++ { ++ __ret.field[1] = space; ++ __ret.field[2] = sign; ++ __ret.field[3] = symbol; ++ } ++ else ++ { ++ __ret.field[1] = sign; ++ __ret.field[2] = symbol; ++ __ret.field[3] = none; ++ } ++ } ++ break; ++ case 4: ++ // 4 The sign immediately follows the symbol. ++ if (__precedes) ++ { ++ __ret.field[0] = symbol; ++ __ret.field[1] = sign; ++ if (__space) ++ { ++ __ret.field[2] = space; ++ __ret.field[3] = value; ++ } ++ else ++ { ++ __ret.field[2] = value; ++ __ret.field[3] = none; ++ } ++ } ++ else ++ { ++ __ret.field[0] = value; ++ if (__space) ++ { ++ __ret.field[1] = space; ++ __ret.field[2] = symbol; ++ __ret.field[3] = sign; ++ } ++ else ++ { ++ __ret.field[1] = symbol; ++ __ret.field[2] = sign; ++ __ret.field[3] = none; ++ } ++ } ++ break; ++ default: ++ __ret = pattern(); ++ } ++ return __ret; ++ } ++ ++ template<> ++ void ++ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc, ++ const char*) ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache<char, true>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = '.'; ++ _M_data->_M_thousands_sep = ','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = ""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = ""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = ""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; ++ } ++ else ++ { ++ // Named locale. ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, ++ __cloc)); ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, ++ __cloc)); ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); ++ ++ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); ++ if (!__nposn) ++ _M_data->_M_negative_sign = "()"; ++ else ++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, ++ __cloc); ++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); ++ ++ // _Intl == true ++ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); ++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, ++ __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ } ++ } ++ ++ template<> ++ void ++ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, ++ const char*) ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache<char, false>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = '.'; ++ _M_data->_M_thousands_sep = ','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = ""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = ""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = ""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; ++ } ++ else ++ { ++ // Named locale. ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, ++ __cloc)); ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, ++ __cloc)); ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); ++ ++ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); ++ if (!__nposn) ++ _M_data->_M_negative_sign = "()"; ++ else ++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, ++ __cloc); ++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); ++ ++ // _Intl == false ++ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); ++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ } ++ } ++ ++ template<> ++ moneypunct<char, true>::~moneypunct() ++ { delete _M_data; } ++ ++ template<> ++ moneypunct<char, false>::~moneypunct() ++ { delete _M_data; } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ void ++ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc, ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ const char*) ++#else ++ const char* __name) ++#endif ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache<wchar_t, true>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = L'.'; ++ _M_data->_M_thousands_sep = L','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ // Use ctype::widen code without the facet... ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = ++ static_cast<wchar_t>(money_base::_S_atoms[__i]); ++ } ++ else ++ { ++ // Named locale. ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(__cloc); ++#else ++ // Switch to named locale so that mbsrtowcs will work. ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, __name); ++#endif ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this... should be monetary ++#endif ++#ifdef __UCLIBC__ ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc; ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; ++# else ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else ++ union { char *__s; wchar_t __w; } __u; ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); ++ _M_data->_M_decimal_point = __u.__w; ++ ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); ++ _M_data->_M_thousands_sep = __u.__w; ++#endif ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ ++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); ++ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); ++ ++ wchar_t* __wcs_ps = 0; ++ wchar_t* __wcs_ns = 0; ++ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); ++ try ++ { ++ mbstate_t __state; ++ size_t __len = strlen(__cpossign); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ps = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); ++ _M_data->_M_positive_sign = __wcs_ps; ++ } ++ else ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); ++ ++ __len = strlen(__cnegsign); ++ if (!__nposn) ++ _M_data->_M_negative_sign = L"()"; ++ else if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ns = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); ++ _M_data->_M_negative_sign = __wcs_ns; ++ } ++ else ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); ++ ++ // _Intl == true. ++ __len = strlen(__ccurr); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ wchar_t* __wcs = new wchar_t[__len]; ++ mbsrtowcs(__wcs, &__ccurr, __len, &__state); ++ _M_data->_M_curr_symbol = __wcs; ++ } ++ else ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); ++ } ++ catch (...) ++ { ++ delete _M_data; ++ _M_data = 0; ++ delete __wcs_ps; ++ delete __wcs_ns; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ __throw_exception_again; ++ } ++ ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, ++ __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ } ++ } ++ ++ template<> ++ void ++ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc, ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ const char*) ++#else ++ const char* __name) ++#endif ++ { ++ if (!_M_data) ++ _M_data = new __moneypunct_cache<wchar_t, false>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_decimal_point = L'.'; ++ _M_data->_M_thousands_sep = L','; ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = 0; ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = 0; ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = 0; ++ _M_data->_M_frac_digits = 0; ++ _M_data->_M_pos_format = money_base::_S_default_pattern; ++ _M_data->_M_neg_format = money_base::_S_default_pattern; ++ ++ // Use ctype::widen code without the facet... ++ for (size_t __i = 0; __i < money_base::_S_end; ++__i) ++ _M_data->_M_atoms[__i] = ++ static_cast<wchar_t>(money_base::_S_atoms[__i]); ++ } ++ else ++ { ++ // Named locale. ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __c_locale __old = __uselocale(__cloc); ++#else ++ // Switch to named locale so that mbsrtowcs will work. ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, __name); ++#endif ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this... should be monetary ++#endif ++#ifdef __UCLIBC__ ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc; ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; ++# else ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else ++ union { char *__s; wchar_t __w; } __u; ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); ++ _M_data->_M_decimal_point = __u.__w; ++ ++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); ++ _M_data->_M_thousands_sep = __u.__w; ++#endif ++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ ++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); ++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); ++ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); ++ ++ wchar_t* __wcs_ps = 0; ++ wchar_t* __wcs_ns = 0; ++ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); ++ try ++ { ++ mbstate_t __state; ++ size_t __len; ++ __len = strlen(__cpossign); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ps = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); ++ _M_data->_M_positive_sign = __wcs_ps; ++ } ++ else ++ _M_data->_M_positive_sign = L""; ++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); ++ ++ __len = strlen(__cnegsign); ++ if (!__nposn) ++ _M_data->_M_negative_sign = L"()"; ++ else if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ __wcs_ns = new wchar_t[__len]; ++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); ++ _M_data->_M_negative_sign = __wcs_ns; ++ } ++ else ++ _M_data->_M_negative_sign = L""; ++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); ++ ++ // _Intl == true. ++ __len = strlen(__ccurr); ++ if (__len) ++ { ++ ++__len; ++ memset(&__state, 0, sizeof(mbstate_t)); ++ wchar_t* __wcs = new wchar_t[__len]; ++ mbsrtowcs(__wcs, &__ccurr, __len, &__state); ++ _M_data->_M_curr_symbol = __wcs; ++ } ++ else ++ _M_data->_M_curr_symbol = L""; ++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); ++ } ++ catch (...) ++ { ++ delete _M_data; ++ _M_data = 0; ++ delete __wcs_ps; ++ delete __wcs_ns; ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ __throw_exception_again; ++ } ++ ++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); ++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); ++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); ++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); ++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, ++ __pposn); ++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); ++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); ++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, ++ __nposn); ++ ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __uselocale(__old); ++#else ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ } ++ } ++ ++ template<> ++ moneypunct<wchar_t, true>::~moneypunct() ++ { ++ if (_M_data->_M_positive_sign_size) ++ delete [] _M_data->_M_positive_sign; ++ if (_M_data->_M_negative_sign_size ++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) ++ delete [] _M_data->_M_negative_sign; ++ if (_M_data->_M_curr_symbol_size) ++ delete [] _M_data->_M_curr_symbol; ++ delete _M_data; ++ } ++ ++ template<> ++ moneypunct<wchar_t, false>::~moneypunct() ++ { ++ if (_M_data->_M_positive_sign_size) ++ delete [] _M_data->_M_positive_sign; ++ if (_M_data->_M_negative_sign_size ++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0) ++ delete [] _M_data->_M_negative_sign; ++ if (_M_data->_M_curr_symbol_size) ++ delete [] _M_data->_M_curr_symbol; ++ delete _M_data; ++ } ++#endif ++} +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,173 @@ ++// std::numpunct implementation details, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 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. ++ ++// ++// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#define _LIBC ++#include <locale> ++#undef _LIBC ++#include <bits/c++locale_internal.h> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning tailor for stub locale support ++#endif ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __nl_langinfo_l(N, L) nl_langinfo((N)) ++#endif ++ ++namespace std ++{ ++ template<> ++ void ++ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __numpunct_cache<char>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_use_grouping = false; ++ ++ _M_data->_M_decimal_point = '.'; ++ _M_data->_M_thousands_sep = ','; ++ ++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) ++ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i]; ++ ++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) ++ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j]; ++ } ++ else ++ { ++ // Named locale. ++ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, ++ __cloc)); ++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, ++ __cloc)); ++ ++ // Check for NULL, which implies no grouping. ++ if (_M_data->_M_thousands_sep == '\0') ++ _M_data->_M_grouping = ""; ++ else ++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ } ++ ++ // NB: There is no way to extact this info from posix locales. ++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); ++ _M_data->_M_truename = "true"; ++ _M_data->_M_truename_size = 4; ++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); ++ _M_data->_M_falsename = "false"; ++ _M_data->_M_falsename_size = 5; ++ } ++ ++ template<> ++ numpunct<char>::~numpunct() ++ { delete _M_data; } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ void ++ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __numpunct_cache<wchar_t>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_data->_M_grouping = ""; ++ _M_data->_M_grouping_size = 0; ++ _M_data->_M_use_grouping = false; ++ ++ _M_data->_M_decimal_point = L'.'; ++ _M_data->_M_thousands_sep = L','; ++ ++ // Use ctype::widen code without the facet... ++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) ++ _M_data->_M_atoms_out[__i] = ++ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]); ++ ++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) ++ _M_data->_M_atoms_in[__j] = ++ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]); ++ } ++ else ++ { ++ // Named locale. ++ // NB: In the GNU model wchar_t is always 32 bit wide. ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning fix this ++#endif ++#ifdef __UCLIBC__ ++# ifdef __UCLIBC_HAS_XLOCALE__ ++ _M_data->_M_decimal_point = __cloc->decimal_point_wc; ++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; ++# else ++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc; ++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; ++# endif ++#else ++ union { char *__s; wchar_t __w; } __u; ++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); ++ _M_data->_M_decimal_point = __u.__w; ++ ++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); ++ _M_data->_M_thousands_sep = __u.__w; ++#endif ++ ++ if (_M_data->_M_thousands_sep == L'\0') ++ _M_data->_M_grouping = ""; ++ else ++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); ++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); ++ } ++ ++ // NB: There is no way to extact this info from posix locales. ++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc); ++ _M_data->_M_truename = L"true"; ++ _M_data->_M_truename_size = 4; ++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); ++ _M_data->_M_falsename = L"false"; ++ _M_data->_M_falsename_size = 5; ++ } ++ ++ template<> ++ numpunct<wchar_t>::~numpunct() ++ { delete _M_data; } ++ #endif ++} +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-25 22:18:37.000000000 -0700 +@@ -0,0 +1,406 @@ ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004 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. ++ ++// ++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions ++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++#include <locale> ++#include <bits/c++locale_internal.h> ++ ++#ifdef __UCLIBC_MJN3_ONLY__ ++#warning tailor for stub locale support ++#endif ++#ifndef __UCLIBC_HAS_XLOCALE__ ++#define __nl_langinfo_l(N, L) nl_langinfo((N)) ++#endif ++ ++namespace std ++{ ++ template<> ++ void ++ __timepunct<char>:: ++ _M_put(char* __s, size_t __maxlen, const char* __format, ++ const tm* __tm) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, ++ _M_c_locale_timepunct); ++#else ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_timepunct); ++ const size_t __len = strftime(__s, __maxlen, __format, __tm); ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ // Make sure __s is null terminated. ++ if (__len == 0) ++ __s[0] = '\0'; ++ } ++ ++ template<> ++ void ++ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __timepunct_cache<char>; ++ ++ if (!__cloc) ++ { ++ // "C" locale ++ _M_c_locale_timepunct = _S_get_c_locale(); ++ ++ _M_data->_M_date_format = "%m/%d/%y"; ++ _M_data->_M_date_era_format = "%m/%d/%y"; ++ _M_data->_M_time_format = "%H:%M:%S"; ++ _M_data->_M_time_era_format = "%H:%M:%S"; ++ _M_data->_M_date_time_format = ""; ++ _M_data->_M_date_time_era_format = ""; ++ _M_data->_M_am = "AM"; ++ _M_data->_M_pm = "PM"; ++ _M_data->_M_am_pm_format = ""; ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = "Sunday"; ++ _M_data->_M_day2 = "Monday"; ++ _M_data->_M_day3 = "Tuesday"; ++ _M_data->_M_day4 = "Wednesday"; ++ _M_data->_M_day5 = "Thursday"; ++ _M_data->_M_day6 = "Friday"; ++ _M_data->_M_day7 = "Saturday"; ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = "Sun"; ++ _M_data->_M_aday2 = "Mon"; ++ _M_data->_M_aday3 = "Tue"; ++ _M_data->_M_aday4 = "Wed"; ++ _M_data->_M_aday5 = "Thu"; ++ _M_data->_M_aday6 = "Fri"; ++ _M_data->_M_aday7 = "Sat"; ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = "January"; ++ _M_data->_M_month02 = "February"; ++ _M_data->_M_month03 = "March"; ++ _M_data->_M_month04 = "April"; ++ _M_data->_M_month05 = "May"; ++ _M_data->_M_month06 = "June"; ++ _M_data->_M_month07 = "July"; ++ _M_data->_M_month08 = "August"; ++ _M_data->_M_month09 = "September"; ++ _M_data->_M_month10 = "October"; ++ _M_data->_M_month11 = "November"; ++ _M_data->_M_month12 = "December"; ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = "Jan"; ++ _M_data->_M_amonth02 = "Feb"; ++ _M_data->_M_amonth03 = "Mar"; ++ _M_data->_M_amonth04 = "Apr"; ++ _M_data->_M_amonth05 = "May"; ++ _M_data->_M_amonth06 = "Jun"; ++ _M_data->_M_amonth07 = "Jul"; ++ _M_data->_M_amonth08 = "Aug"; ++ _M_data->_M_amonth09 = "Sep"; ++ _M_data->_M_amonth10 = "Oct"; ++ _M_data->_M_amonth11 = "Nov"; ++ _M_data->_M_amonth12 = "Dec"; ++ } ++ else ++ { ++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); ++ ++ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc); ++ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc); ++ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc); ++ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc); ++ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc); ++ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, ++ __cloc); ++ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc); ++ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc); ++ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc); ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc); ++ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc); ++ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc); ++ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc); ++ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc); ++ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc); ++ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc); ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc); ++ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc); ++ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc); ++ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc); ++ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc); ++ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc); ++ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc); ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc); ++ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc); ++ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc); ++ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc); ++ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc); ++ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc); ++ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc); ++ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc); ++ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc); ++ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc); ++ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc); ++ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc); ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc); ++ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc); ++ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc); ++ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc); ++ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc); ++ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc); ++ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc); ++ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc); ++ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc); ++ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc); ++ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc); ++ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc); ++ } ++ } ++ ++#ifdef _GLIBCXX_USE_WCHAR_T ++ template<> ++ void ++ __timepunct<wchar_t>:: ++ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, ++ const tm* __tm) const ++ { ++#ifdef __UCLIBC_HAS_XLOCALE__ ++ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct); ++ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, ++ _M_c_locale_timepunct); ++#else ++ char* __old = strdup(setlocale(LC_ALL, NULL)); ++ setlocale(LC_ALL, _M_name_timepunct); ++ const size_t __len = wcsftime(__s, __maxlen, __format, __tm); ++ setlocale(LC_ALL, __old); ++ free(__old); ++#endif ++ // Make sure __s is null terminated. ++ if (__len == 0) ++ __s[0] = L'\0'; ++ } ++ ++ template<> ++ void ++ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc) ++ { ++ if (!_M_data) ++ _M_data = new __timepunct_cache<wchar_t>; ++ ++#warning wide time stuff ++// if (!__cloc) ++ { ++ // "C" locale ++ _M_c_locale_timepunct = _S_get_c_locale(); ++ ++ _M_data->_M_date_format = L"%m/%d/%y"; ++ _M_data->_M_date_era_format = L"%m/%d/%y"; ++ _M_data->_M_time_format = L"%H:%M:%S"; ++ _M_data->_M_time_era_format = L"%H:%M:%S"; ++ _M_data->_M_date_time_format = L""; ++ _M_data->_M_date_time_era_format = L""; ++ _M_data->_M_am = L"AM"; ++ _M_data->_M_pm = L"PM"; ++ _M_data->_M_am_pm_format = L""; ++ ++ // Day names, starting with "C"'s Sunday. ++ _M_data->_M_day1 = L"Sunday"; ++ _M_data->_M_day2 = L"Monday"; ++ _M_data->_M_day3 = L"Tuesday"; ++ _M_data->_M_day4 = L"Wednesday"; ++ _M_data->_M_day5 = L"Thursday"; ++ _M_data->_M_day6 = L"Friday"; ++ _M_data->_M_day7 = L"Saturday"; ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ _M_data->_M_aday1 = L"Sun"; ++ _M_data->_M_aday2 = L"Mon"; ++ _M_data->_M_aday3 = L"Tue"; ++ _M_data->_M_aday4 = L"Wed"; ++ _M_data->_M_aday5 = L"Thu"; ++ _M_data->_M_aday6 = L"Fri"; ++ _M_data->_M_aday7 = L"Sat"; ++ ++ // Month names, starting with "C"'s January. ++ _M_data->_M_month01 = L"January"; ++ _M_data->_M_month02 = L"February"; ++ _M_data->_M_month03 = L"March"; ++ _M_data->_M_month04 = L"April"; ++ _M_data->_M_month05 = L"May"; ++ _M_data->_M_month06 = L"June"; ++ _M_data->_M_month07 = L"July"; ++ _M_data->_M_month08 = L"August"; ++ _M_data->_M_month09 = L"September"; ++ _M_data->_M_month10 = L"October"; ++ _M_data->_M_month11 = L"November"; ++ _M_data->_M_month12 = L"December"; ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ _M_data->_M_amonth01 = L"Jan"; ++ _M_data->_M_amonth02 = L"Feb"; ++ _M_data->_M_amonth03 = L"Mar"; ++ _M_data->_M_amonth04 = L"Apr"; ++ _M_data->_M_amonth05 = L"May"; ++ _M_data->_M_amonth06 = L"Jun"; ++ _M_data->_M_amonth07 = L"Jul"; ++ _M_data->_M_amonth08 = L"Aug"; ++ _M_data->_M_amonth09 = L"Sep"; ++ _M_data->_M_amonth10 = L"Oct"; ++ _M_data->_M_amonth11 = L"Nov"; ++ _M_data->_M_amonth12 = L"Dec"; ++ } ++#if 0 ++ else ++ { ++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc); ++ ++ union { char *__s; wchar_t *__w; } __u; ++ ++ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc); ++ _M_data->_M_date_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc); ++ _M_data->_M_date_era_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc); ++ _M_data->_M_time_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc); ++ _M_data->_M_time_era_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc); ++ _M_data->_M_date_time_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc); ++ _M_data->_M_date_time_era_format = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc); ++ _M_data->_M_am = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc); ++ _M_data->_M_pm = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc); ++ _M_data->_M_am_pm_format = __u.__w; ++ ++ // Day names, starting with "C"'s Sunday. ++ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc); ++ _M_data->_M_day1 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc); ++ _M_data->_M_day2 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc); ++ _M_data->_M_day3 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc); ++ _M_data->_M_day4 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc); ++ _M_data->_M_day5 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc); ++ _M_data->_M_day6 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc); ++ _M_data->_M_day7 = __u.__w; ++ ++ // Abbreviated day names, starting with "C"'s Sun. ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc); ++ _M_data->_M_aday1 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc); ++ _M_data->_M_aday2 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc); ++ _M_data->_M_aday3 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc); ++ _M_data->_M_aday4 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc); ++ _M_data->_M_aday5 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc); ++ _M_data->_M_aday6 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc); ++ _M_data->_M_aday7 = __u.__w; ++ ++ // Month names, starting with "C"'s January. ++ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc); ++ _M_data->_M_month01 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc); ++ _M_data->_M_month02 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc); ++ _M_data->_M_month03 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc); ++ _M_data->_M_month04 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc); ++ _M_data->_M_month05 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc); ++ _M_data->_M_month06 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc); ++ _M_data->_M_month07 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc); ++ _M_data->_M_month08 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc); ++ _M_data->_M_month09 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc); ++ _M_data->_M_month10 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc); ++ _M_data->_M_month11 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc); ++ _M_data->_M_month12 = __u.__w; ++ ++ // Abbreviated month names, starting with "C"'s Jan. ++ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc); ++ _M_data->_M_amonth01 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc); ++ _M_data->_M_amonth02 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc); ++ _M_data->_M_amonth03 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc); ++ _M_data->_M_amonth04 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc); ++ _M_data->_M_amonth05 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc); ++ _M_data->_M_amonth06 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc); ++ _M_data->_M_amonth07 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc); ++ _M_data->_M_amonth08 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc); ++ _M_data->_M_amonth09 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc); ++ _M_data->_M_amonth10 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc); ++ _M_data->_M_amonth11 = __u.__w; ++ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc); ++ _M_data->_M_amonth12 = __u.__w; ++ } ++#endif // 0 ++ } ++#endif ++} +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h 2005-10-21 02:34:06.000000000 -0600 +@@ -0,0 +1,76 @@ ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*- ++ ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 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. ++ ++// ++// ISO C++ 14882: 22.2.5.1.2 - time_get functions ++// ISO C++ 14882: 22.2.5.3.2 - time_put functions ++// ++ ++// Written by Benjamin Kosnik <bkoz@redhat.com> ++ ++ template<typename _CharT> ++ __timepunct<_CharT>::__timepunct(size_t __refs) ++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), ++ _M_name_timepunct(_S_get_c_name()) ++ { _M_initialize_timepunct(); } ++ ++ template<typename _CharT> ++ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) ++ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), ++ _M_name_timepunct(_S_get_c_name()) ++ { _M_initialize_timepunct(); } ++ ++ template<typename _CharT> ++ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, ++ size_t __refs) ++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), ++ _M_name_timepunct(NULL) ++ { ++ const size_t __len = std::strlen(__s) + 1; ++ char* __tmp = new char[__len]; ++ std::memcpy(__tmp, __s, __len); ++ _M_name_timepunct = __tmp; ++ ++ try ++ { _M_initialize_timepunct(__cloc); } ++ catch(...) ++ { ++ delete [] _M_name_timepunct; ++ __throw_exception_again; ++ } ++ } ++ ++ template<typename _CharT> ++ __timepunct<_CharT>::~__timepunct() ++ { ++ if (_M_name_timepunct != _S_get_c_name()) ++ delete [] _M_name_timepunct; ++ delete _M_data; ++ _S_destroy_c_locale(_M_c_locale_timepunct); ++ } +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_base.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h 2006-03-25 22:06:30.000000000 -0700 +@@ -0,0 +1,64 @@ ++// Locale support -*- C++ -*- ++ ++// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004 ++// 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// 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. ++ ++// ++// ISO C++ 14882: 22.1 Locales ++// ++ ++/** @file ctype_base.h ++ * This is an internal header file, included by other library headers. ++ * You should not attempt to use it directly. ++ */ ++ ++// Information as gleaned from /usr/include/ctype.h ++ ++ /// @brief Base class for ctype. ++ struct ctype_base ++ { ++ // Note: In uClibc, the following two types depend on configuration. ++ ++ // Non-standard typedefs. ++ typedef const __ctype_touplow_t* __to_type; ++ ++ // NB: Offsets into ctype<char>::_M_table force a particular size ++ // on the mask type. Because of this, we don't use an enum. ++ typedef __ctype_mask_t mask; ++ static const mask upper = _ISupper; ++ static const mask lower = _ISlower; ++ static const mask alpha = _ISalpha; ++ static const mask digit = _ISdigit; ++ static const mask xdigit = _ISxdigit; ++ static const mask space = _ISspace; ++ static const mask print = _ISprint; ++ static const mask graph = _ISalpha | _ISdigit | _ISpunct; ++ static const mask cntrl = _IScntrl; ++ static const mask punct = _ISpunct; ++ static const mask alnum = _ISalpha | _ISdigit; ++ }; +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h 2006-03-25 22:06:30.000000000 -0700 +@@ -0,0 +1,69 @@ ++// Locale support -*- C++ -*- ++ ++// Copyright (C) 2000, 2002 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// 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. ++ ++// ++// ISO C++ 14882: 22.1 Locales ++// ++ ++// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) ++// functions go in ctype.cc ++ ++ bool ++ ctype<char>:: ++ is(mask __m, char __c) const ++ { return _M_table[static_cast<unsigned char>(__c)] & __m; } ++ ++ const char* ++ ctype<char>:: ++ is(const char* __low, const char* __high, mask* __vec) const ++ { ++ while (__low < __high) ++ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; ++ return __high; ++ } ++ ++ const char* ++ ctype<char>:: ++ scan_is(mask __m, const char* __low, const char* __high) const ++ { ++ while (__low < __high ++ && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) ++ ++__low; ++ return __low; ++ } ++ ++ const char* ++ ctype<char>:: ++ scan_not(mask __m, const char* __low, const char* __high) const ++ { ++ while (__low < __high ++ && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) ++ ++__low; ++ return __low; ++ } +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h 2006-03-25 22:06:30.000000000 -0700 +@@ -0,0 +1,92 @@ ++// Locale support -*- C++ -*- ++ ++// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004 ++// 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// 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. ++ ++// ++// ISO C++ 14882: 22.1 Locales ++// ++ ++// Information as gleaned from /usr/include/ctype.h ++ ++ const ctype_base::mask* ++ ctype<char>::classic_table() throw() ++ { return __C_ctype_b; } ++ ++ ctype<char>::ctype(__c_locale, const mask* __table, bool __del, ++ size_t __refs) ++ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), ++ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) ++ { ++ _M_toupper = __C_ctype_toupper; ++ _M_tolower = __C_ctype_tolower; ++ _M_table = __table ? __table : __C_ctype_b; ++ memset(_M_widen, 0, sizeof(_M_widen)); ++ memset(_M_narrow, 0, sizeof(_M_narrow)); ++ } ++ ++ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) ++ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), ++ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) ++ { ++ _M_toupper = __C_ctype_toupper; ++ _M_tolower = __C_ctype_tolower; ++ _M_table = __table ? __table : __C_ctype_b; ++ memset(_M_widen, 0, sizeof(_M_widen)); ++ memset(_M_narrow, 0, sizeof(_M_narrow)); ++ } ++ ++ char ++ ctype<char>::do_toupper(char __c) const ++ { return _M_toupper[static_cast<unsigned char>(__c)]; } ++ ++ const char* ++ ctype<char>::do_toupper(char* __low, const char* __high) const ++ { ++ while (__low < __high) ++ { ++ *__low = _M_toupper[static_cast<unsigned char>(*__low)]; ++ ++__low; ++ } ++ return __high; ++ } ++ ++ char ++ ctype<char>::do_tolower(char __c) const ++ { return _M_tolower[static_cast<unsigned char>(__c)]; } ++ ++ const char* ++ ctype<char>::do_tolower(char* __low, const char* __high) const ++ { ++ while (__low < __high) ++ { ++ *__low = _M_tolower[static_cast<unsigned char>(*__low)]; ++ ++__low; ++ } ++ return __high; ++ } +diff -urN gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/os_defines.h gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/os_defines.h 1969-12-31 17:00:00.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h 2006-03-25 22:06:30.000000000 -0700 +@@ -0,0 +1,44 @@ ++// Specific definitions for GNU/Linux -*- C++ -*- ++ ++// Copyright (C) 2000, 2001, 2002, 2003 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, ++// 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. ++ ++#ifndef _GLIBCXX_OS_DEFINES ++#define _GLIBCXX_OS_DEFINES 1 ++ ++// System-specific #define, typedefs, corrections, etc, go here. This ++// file will come before all others. ++ ++// This keeps isanum, et al from being propagated as macros. ++#define __NO_CTYPE 1 ++ ++#include <features.h> ++ ++// We must not see the optimized string functions GNU libc defines. ++#define __NO_STRING_INLINES ++ ++#endif +diff -urN gcc-4.1.0-dist/libstdc++-v3/configure gcc-4.1.0/libstdc++-v3/configure +--- gcc-4.1.0-dist/libstdc++-v3/configure 2006-03-26 12:08:28.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/configure 2006-03-25 22:06:30.000000000 -0700 +@@ -4005,6 +4005,11 @@ + lt_cv_deplibs_check_method=pass_all + ;; + ++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]+$' +@@ -5740,7 +5745,7 @@ + enableval="$enable_clocale" + + case "$enableval" in +- generic|gnu|ieee_1003.1-2001|yes|no|auto) ;; ++ generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;; + *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5 + echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;} + { (exit 1); exit 1; }; } ;; +@@ -5765,6 +5770,9 @@ + # Default to "generic". + if test $enable_clocale_flag = auto; then + case ${target_os} in ++ linux-uclibc*) ++ enable_clocale_flag=uclibc ++ ;; + linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ +@@ -5995,6 +6003,76 @@ + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; ++ uclibc) ++ echo "$as_me:$LINENO: result: uclibc" >&5 ++echo "${ECHO_T}uclibc" >&6 ++ ++ # Declare intention to use gettext, and add support for specific ++ # languages. ++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT ++ ALL_LINGUAS="de fr" ++ ++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. ++ # Extract the first word of "msgfmt", so it can be a program name with args. ++set dummy msgfmt; ac_word=$2 ++echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++if test "${ac_cv_prog_check_msgfmt+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test -n "$check_msgfmt"; then ++ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ ac_cv_prog_check_msgfmt="yes" ++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi ++done ++done ++ ++ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no" ++fi ++fi ++check_msgfmt=$ac_cv_prog_check_msgfmt ++if test -n "$check_msgfmt"; then ++ echo "$as_me:$LINENO: result: $check_msgfmt" >&5 ++echo "${ECHO_T}$check_msgfmt" >&6 ++else ++ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6 ++fi ++ ++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then ++ USE_NLS=yes ++ fi ++ # Export the build objects. ++ for ling in $ALL_LINGUAS; do \ ++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ ++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ ++ done ++ ++ ++ ++ CLOCALE_H=config/locale/uclibc/c_locale.h ++ CLOCALE_CC=config/locale/uclibc/c_locale.cc ++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc ++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc ++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc ++ CMESSAGES_H=config/locale/uclibc/messages_members.h ++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc ++ CMONEY_CC=config/locale/uclibc/monetary_members.cc ++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc ++ CTIME_H=config/locale/uclibc/time_members.h ++ CTIME_CC=config/locale/uclibc/time_members.cc ++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h ++ ;; + esac + + # This is where the testsuite looks for locale catalogs, using the +diff -urN gcc-4.1.0-dist/libstdc++-v3/configure.host gcc-4.1.0/libstdc++-v3/configure.host +--- gcc-4.1.0-dist/libstdc++-v3/configure.host 2006-03-26 12:08:28.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/configure.host 2006-03-25 22:06:30.000000000 -0700 +@@ -261,6 +261,12 @@ + ;; + esac + ++# Override for uClibc since linux-uclibc gets mishandled above. ++case "${host_os}" in ++ *-uclibc*) ++ os_include_dir="os/uclibc" ++ ;; ++esac + + # Set any OS-dependent and CPU-dependent bits. + # THIS TABLE IS SORTED. KEEP IT THAT WAY. +diff -urN gcc-4.1.0-dist/libstdc++-v3/crossconfig.m4 gcc-4.1.0/libstdc++-v3/crossconfig.m4 +--- gcc-4.1.0-dist/libstdc++-v3/crossconfig.m4 2006-03-26 12:08:28.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/crossconfig.m4 2006-03-25 22:06:30.000000000 -0700 +@@ -143,6 +143,99 @@ + ;; + esac + ;; ++ *-uclibc*) ++# Temporary hack until we implement the float versions of the libm funcs ++ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ ++ machine/endian.h machine/param.h sys/machine.h sys/types.h \ ++ fp.h float.h endian.h inttypes.h locale.h float.h stdint.h]) ++ SECTION_FLAGS='-ffunction-sections -fdata-sections' ++ AC_SUBST(SECTION_FLAGS) ++ GLIBCXX_CHECK_LINKER_FEATURES ++ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ++ GLIBCXX_CHECK_WCHAR_T_SUPPORT ++ ++ # For LFS. ++ AC_DEFINE(HAVE_INT64_T) ++ case "$target" in ++ *-uclinux*) ++ # Don't enable LFS with uClinux ++ ;; ++ *) ++ AC_DEFINE(_GLIBCXX_USE_LFS) ++ esac ++ ++ # For showmanyc_helper(). ++ AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h) ++ GLIBCXX_CHECK_POLL ++ GLIBCXX_CHECK_S_ISREG_OR_S_IFREG ++ ++ # For xsputn_2(). ++ AC_CHECK_HEADERS(sys/uio.h) ++ GLIBCXX_CHECK_WRITEV ++ ++# AC_DEFINE(HAVE_ACOSF) ++# AC_DEFINE(HAVE_ASINF) ++# AC_DEFINE(HAVE_ATANF) ++# AC_DEFINE(HAVE_ATAN2F) ++ AC_DEFINE(HAVE_CEILF) ++ AC_DEFINE(HAVE_COPYSIGN) ++# AC_DEFINE(HAVE_COPYSIGNF) ++# AC_DEFINE(HAVE_COSF) ++# AC_DEFINE(HAVE_COSHF) ++# AC_DEFINE(HAVE_EXPF) ++# AC_DEFINE(HAVE_FABSF) ++ AC_DEFINE(HAVE_FINITE) ++ AC_DEFINE(HAVE_FINITEF) ++ AC_DEFINE(HAVE_FLOORF) ++# AC_DEFINE(HAVE_FMODF) ++# AC_DEFINE(HAVE_FREXPF) ++ AC_DEFINE(HAVE_HYPOT) ++# AC_DEFINE(HAVE_HYPOTF) ++ AC_DEFINE(HAVE_ISINF) ++ AC_DEFINE(HAVE_ISINFF) ++ AC_DEFINE(HAVE_ISNAN) ++ AC_DEFINE(HAVE_ISNANF) ++# AC_DEFINE(HAVE_LOGF) ++# AC_DEFINE(HAVE_LOG10F) ++# AC_DEFINE(HAVE_MODFF) ++# AC_DEFINE(HAVE_SINF) ++# AC_DEFINE(HAVE_SINHF) ++# AC_DEFINE(HAVE_SINCOS) ++# AC_DEFINE(HAVE_SINCOSF) ++ AC_DEFINE(HAVE_SQRTF) ++# AC_DEFINE(HAVE_TANF) ++# AC_DEFINE(HAVE_TANHF) ++ if test x"long_double_math_on_this_cpu" = x"yes"; then ++ AC_MSG_ERROR([long_double_math_on_this_cpu is yes!]) ++# AC_DEFINE(HAVE_ACOSL) ++# AC_DEFINE(HAVE_ASINL) ++# AC_DEFINE(HAVE_ATANL) ++# AC_DEFINE(HAVE_ATAN2L) ++# AC_DEFINE(HAVE_CEILL) ++# AC_DEFINE(HAVE_COPYSIGNL) ++# AC_DEFINE(HAVE_COSL) ++# AC_DEFINE(HAVE_COSHL) ++# AC_DEFINE(HAVE_EXPL) ++# AC_DEFINE(HAVE_FABSL) ++# AC_DEFINE(HAVE_FINITEL) ++# AC_DEFINE(HAVE_FLOORL) ++# AC_DEFINE(HAVE_FMODL) ++# AC_DEFINE(HAVE_FREXPL) ++# AC_DEFINE(HAVE_HYPOTL) ++# AC_DEFINE(HAVE_ISINFL) ++# AC_DEFINE(HAVE_ISNANL) ++# AC_DEFINE(HAVE_LOGL) ++# AC_DEFINE(HAVE_LOG10L) ++# AC_DEFINE(HAVE_MODFL) ++# AC_DEFINE(HAVE_POWL) ++# AC_DEFINE(HAVE_SINL) ++# AC_DEFINE(HAVE_SINHL) ++# AC_DEFINE(HAVE_SINCOSL) ++# AC_DEFINE(HAVE_SQRTL) ++# AC_DEFINE(HAVE_TANL) ++# AC_DEFINE(HAVE_TANHL) ++ fi ++ ;; + *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu) + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ + machine/endian.h machine/param.h sys/machine.h sys/types.h \ +@@ -157,7 +250,7 @@ + AC_DEFINE(HAVE_INT64_T) + case "$target" in + *-uclinux*) +- # Don't enable LFS with uClibc ++ # Don't enable LFS with uClinux + ;; + *) + AC_DEFINE(_GLIBCXX_USE_LFS) +diff -urN gcc-4.1.0-dist/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h +--- gcc-4.1.0-dist/libstdc++-v3/include/c_compatibility/wchar.h 2006-03-26 12:08:28.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h 2006-03-25 22:06:30.000000000 -0700 +@@ -101,7 +101,9 @@ + using std::wmemcpy; + using std::wmemmove; + using std::wmemset; ++#if _GLIBCXX_HAVE_WCSFTIME + using std::wcsftime; ++#endif + + #if _GLIBCXX_USE_C99 + using std::wcstold; +diff -urN gcc-4.1.0-dist/libstdc++-v3/include/c_std/std_cwchar.h gcc-4.1.0/libstdc++-v3/include/c_std/std_cwchar.h +--- gcc-4.1.0-dist/libstdc++-v3/include/c_std/std_cwchar.h 2006-03-26 12:08:28.000000000 -0700 ++++ gcc-4.1.0/libstdc++-v3/include/c_std/std_cwchar.h 2006-03-25 22:06:30.000000000 -0700 +@@ -180,7 +180,9 @@ + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; ++#if _GLIBCXX_HAVE_WCSFTIME + using ::wcsftime; ++#endif + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; diff --git a/recipes/gcc/gcc-4.1.1/300-libstdc++-pic.patch b/recipes/gcc/gcc-4.1.1/300-libstdc++-pic.patch new file mode 100644 index 0000000000..89d03a85e5 --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/300-libstdc++-pic.patch @@ -0,0 +1,46 @@ +# DP: Build and install libstdc++_pic.a library. + +--- gcc-4.1.0/libstdc++-v3/src/Makefile.am 2004-11-15 17:33:05.000000000 -0600 ++++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.am 2005-04-25 20:05:59.186930896 -0500 +@@ -214,6 +214,10 @@ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@ + + ++install-exec-local: ++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) ++ + # Added bits to build debug library. + if GLIBCXX_BUILD_DEBUG + all-local: build_debug +--- gcc-4.1.0/libstdc++-v3/src/Makefile.in 2005-04-11 19:13:08.000000000 -0500 ++++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.in 2005-04-25 20:12:33.284316275 -0500 +@@ -627,7 +627,7 @@ + + install-data-am: install-data-local + +-install-exec-am: install-toolexeclibLTLIBRARIES ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local + + install-info: install-info-am + +@@ -660,6 +660,7 @@ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-data-local install-exec \ ++ install-exec-local \ + install-exec-am install-info install-info-am install-man \ + install-strip install-toolexeclibLTLIBRARIES installcheck \ + installcheck-am installdirs maintainer-clean \ +@@ -745,6 +746,11 @@ + install_debug: + (cd ${debugdir} && $(MAKE) \ + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) ++ ++install-exec-local: ++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/recipes/gcc/gcc-4.1.1/301-missing-execinfo_h.patch b/recipes/gcc/gcc-4.1.1/301-missing-execinfo_h.patch new file mode 100644 index 0000000000..0e2092f3fb --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/301-missing-execinfo_h.patch @@ -0,0 +1,11 @@ +--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500 ++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500 +@@ -500,7 +500,7 @@ + #ifdef __linux__ + # include <features.h> + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/recipes/gcc/gcc-4.1.1/302-c99-snprintf.patch b/recipes/gcc/gcc-4.1.1/302-c99-snprintf.patch new file mode 100644 index 0000000000..dfb22d681b --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/302-c99-snprintf.patch @@ -0,0 +1,11 @@ +--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500 ++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500 +@@ -142,7 +142,7 @@ + using ::vsprintf; + } + +-#if _GLIBCXX_USE_C99 ++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf diff --git a/recipes/gcc/gcc-4.1.1/303-c99-complex-ugly-hack.patch b/recipes/gcc/gcc-4.1.1/303-c99-complex-ugly-hack.patch new file mode 100644 index 0000000000..2ccc80d9bb --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/303-c99-complex-ugly-hack.patch @@ -0,0 +1,12 @@ +--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500 ++++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500 +@@ -7194,6 +7194,9 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <complex.h> ++#ifdef __UCLIBC__ ++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs ++#endif + int + main () + { diff --git a/recipes/gcc/gcc-4.1.1/304-index_macro.patch b/recipes/gcc/gcc-4.1.1/304-index_macro.patch new file mode 100644 index 0000000000..1fac112fa9 --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/304-index_macro.patch @@ -0,0 +1,24 @@ +--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100 ++++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100 +@@ -59,6 +59,9 @@ + #include <bits/allocator.h> + #include <ext/hash_fun.h> + ++/* cope w/ index defined as macro, SuSv3 proposal */ ++#undef index ++ + # ifdef __GC + # define __GC_CONST const + # else +--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100 ++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100 +@@ -53,6 +53,9 @@ + #include <ext/memory> // For uninitialized_copy_n + #include <ext/numeric> // For power + ++/* cope w/ index defined as macro, SuSv3 proposal */ ++#undef index ++ + namespace __gnu_cxx + { + using std::size_t; diff --git a/recipes/gcc/gcc-4.1.1/602-sdk-libstdc++-includes.patch b/recipes/gcc/gcc-4.1.1/602-sdk-libstdc++-includes.patch new file mode 100644 index 0000000000..23fce7544d --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/602-sdk-libstdc++-includes.patch @@ -0,0 +1,20 @@ +--- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600 ++++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500 +@@ -21,5 +21,5 @@ + $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once + + # -I/-D flags to pass when compiling. +-AM_CPPFLAGS = $(GLIBCXX_INCLUDES) ++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include + +--- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600 ++++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500 +@@ -35,7 +35,7 @@ + + libmath_la_SOURCES = stubs.c + +-AM_CPPFLAGS = $(CANADIAN_INCLUDES) ++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include + + # Only compiling "C" sources in this directory. + LIBTOOL = @LIBTOOL@ --tag CC diff --git a/recipes/gcc/gcc-4.1.1/740-sh-pr24836.patch b/recipes/gcc/gcc-4.1.1/740-sh-pr24836.patch new file mode 100644 index 0000000000..7992282cff --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/740-sh-pr24836.patch @@ -0,0 +1,25 @@ +http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836 + +--- gcc/gcc/configure.ac (revision 106699) ++++ gcc/gcc/configure.ac (working copy) +@@ -2446,7 +2446,7 @@ + tls_first_minor=14 + tls_as_opt="-m64 -Aesame --fatal-warnings" + ;; +- sh-*-* | sh[34]-*-*) ++ sh-*-* | sh[34]*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 +--- gcc/gcc/configure ++++ gcc/gcc/configure +@@ -14846,7 +14846,7 @@ + tls_first_minor=14 + tls_as_opt="-m64 -Aesame --fatal-warnings" + ;; +- sh-*-* | sh[34]-*-*) ++ sh-*-* | sh[34]*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 diff --git a/recipes/gcc/gcc-4.1.1/800-arm-bigendian.patch b/recipes/gcc/gcc-4.1.1/800-arm-bigendian.patch new file mode 100644 index 0000000000..1fa5ae1cd2 --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/800-arm-bigendian.patch @@ -0,0 +1,67 @@ +By Lennert Buytenhek <buytenh@wantstofly.org> +Adds support for arm*b-linux* big-endian ARM targets + +See http://gcc.gnu.org/PR16350 + +--- gcc-4.1.0/gcc/config/arm/linux-elf.h ++++ gcc-4.1.0/gcc/config/arm/linux-elf.h +@@ -28,19 +28,33 @@ + #undef TARGET_VERSION + #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr); + ++/* ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* ++ * (big endian) configurations. ++ */ ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END ++#define TARGET_ENDIAN_OPTION "mbig-endian" ++#define TARGET_LINKER_EMULATION "armelfb_linux" ++#else ++#define TARGET_ENDIAN_DEFAULT 0 ++#define TARGET_ENDIAN_OPTION "mlittle-endian" ++#define TARGET_LINKER_EMULATION "armelf_linux" ++#endif ++ + #undef TARGET_DEFAULT_FLOAT_ABI + #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD + + #undef TARGET_DEFAULT +-#define TARGET_DEFAULT (0) ++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT) + + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6 + +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p" ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p" + + #undef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" } ++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" } + + /* Now we define the strings used to build the spec file. */ + #undef LIB_SPEC +@@ -61,7 +75,7 @@ + %{rdynamic:-export-dynamic} \ + %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \ + -X \ +- %{mbig-endian:-EB}" \ ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + + #undef LINK_SPEC +--- gcc-4.1.0/gcc/config.gcc ++++ gcc-4.1.0/gcc/config.gcc +@@ -672,6 +672,11 @@ + ;; + arm*-*-linux*) # ARM GNU/Linux with ELF + tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" ++ case $target in ++ arm*b-*) ++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ++ ;; ++ esac + tmake_file="${tmake_file} t-linux arm/t-arm" + case ${target} in + arm*-*-linux-gnueabi) diff --git a/recipes/gcc/gcc-4.1.1/801-arm-bigendian-eabi.patch b/recipes/gcc/gcc-4.1.1/801-arm-bigendian-eabi.patch new file mode 100644 index 0000000000..54490fc24f --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/801-arm-bigendian-eabi.patch @@ -0,0 +1,14 @@ +Index: gcc-4.1.1/gcc/config/arm/linux-eabi.h +=================================================================== +--- gcc-4.1.1.orig/gcc/config/arm/linux-eabi.h 2007-02-20 14:51:33.416193250 +0100 ++++ gcc-4.1.1/gcc/config/arm/linux-eabi.h 2007-02-20 14:52:11.622581000 +0100 +@@ -48,7 +48,8 @@ + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + #undef SUBTARGET_EXTRA_LINK_SPEC +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi" ++#define SUBTARGET_EXTRA_LINK_SPEC \ ++ " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} " + + /* Use ld-linux.so.3 so that it will be possible to run "classic" + GNU/Linux binaries on an EABI system. */ diff --git a/recipes/gcc/gcc-4.1.1/README b/recipes/gcc/gcc-4.1.1/README new file mode 100644 index 0000000000..b85840dc20 --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/README @@ -0,0 +1,4 @@ +The numbered patches come from +http://www.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/gcc/4.1.1/ +Other patches are locally added to fix things (mostly inherited and reapplied +from gcc 3.4.4 where applicable) diff --git a/recipes/gcc/gcc-4.1.1/arm-nolibfloat.patch b/recipes/gcc/gcc-4.1.1/arm-nolibfloat.patch new file mode 100644 index 0000000000..c4897c0330 --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/arm-nolibfloat.patch @@ -0,0 +1,24 @@ +# Dimitry Andric <dimitry@andric.com>, 2004-05-01 +# +# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed +# anymore. (The required functions are now in libgcc.) +# +# Fixes errors like +# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat +# collect2: ld returned 1 exit status +# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1 +# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat + +Index: gcc-4.0.2/gcc/config/arm/linux-elf.h +=================================================================== +--- gcc-4.0.2.orig/gcc/config/arm/linux-elf.h 2005-03-04 16:14:01.000000000 +0000 ++++ gcc-4.0.2/gcc/config/arm/linux-elf.h 2005-11-11 18:02:54.000000000 +0000 +@@ -56,7 +56,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add + the GNU/Linux magical crtbegin.o file (see crtstuff.c) which diff --git a/recipes/gcc/gcc-4.1.1/arm-softfloat.patch b/recipes/gcc/gcc-4.1.1/arm-softfloat.patch new file mode 100644 index 0000000000..c86c83ed15 --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/arm-softfloat.patch @@ -0,0 +1,16 @@ +Index: gcc-4.0.2/gcc/config/arm/t-linux +=================================================================== +--- gcc-4.0.2.orig/gcc/config/arm/t-linux 2004-05-15 12:41:35.000000000 +0000 ++++ gcc-4.0.2/gcc/config/arm/t-linux 2005-11-11 16:07:53.000000000 +0000 +@@ -4,7 +4,10 @@ + LIBGCC2_DEBUG_CFLAGS = -g0 + + LIB1ASMSRC = arm/lib1funcs.asm +-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx ++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ ++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ ++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ ++ _fixsfsi _fixunssfsi _floatdidf _floatdisf + + # MULTILIB_OPTIONS = mhard-float/msoft-float + # MULTILIB_DIRNAMES = hard-float soft-float diff --git a/recipes/gcc/gcc-4.1.1/arm-thumb-cache.patch b/recipes/gcc/gcc-4.1.1/arm-thumb-cache.patch new file mode 100644 index 0000000000..fa63846c8c --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/arm-thumb-cache.patch @@ -0,0 +1,29 @@ +--- gcc-4.1.1/gcc/config/arm/linux-gas.h- 2005-06-25 03:22:41.000000000 +0200 ++++ gcc-4.1.1/gcc/config/arm/linux-gas.h 2006-06-18 10:23:46.000000000 +0200 +@@ -44,6 +44,7 @@ + + /* Clear the instruction cache from `beg' to `end'. This makes an + inline system call to SYS_cacheflush. */ ++#if !defined(__thumb__) + #define CLEAR_INSN_CACHE(BEG, END) \ + { \ + register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ +@@ -53,3 +54,18 @@ + : "=r" (_beg) \ + : "0" (_beg), "r" (_end), "r" (_flg)); \ + } ++#else ++#define CLEAR_INSN_CACHE(BEG, END) \ ++{ \ ++ register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ ++ register unsigned long _end __asm ("a2") = (unsigned long) (END); \ ++ register unsigned long _flg __asm ("a3") = 0; \ ++ register unsigned long _swi __asm ("a4") = 0xf0002; \ ++ __asm __volatile ("push {r7}\n" \ ++ " mov r7,a4\n" \ ++ " swi 0 @ sys_cacheflush\n" \ ++ " pop {r7}\n" \ ++ : "=r" (_beg) \ ++ : "0" (_beg), "r" (_end), "r" (_flg), "r" (_swi)); \ ++} ++#endif diff --git a/recipes/gcc/gcc-4.1.1/arm-thumb.patch b/recipes/gcc/gcc-4.1.1/arm-thumb.patch new file mode 100644 index 0000000000..69e2f68cf2 --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/arm-thumb.patch @@ -0,0 +1,64 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- gcc-4.1.1/gcc/config/arm/lib1funcs.asm~gcc ++++ gcc-4.1.1/gcc/config/arm/lib1funcs.asm +@@ -995,10 +995,24 @@ + .code 32 + FUNC_START div0 + ++#if ! defined __thumb__ + stmfd sp!, {r1, lr} + mov r0, #SIGFPE + bl SYM(raise) __PLT__ + RETLDM r1 ++#else ++ push {r1, lr} ++ mov r0, #SIGFPE ++ bl SYM(raise) __PLT__ ++#if __ARM_ARCH__ > 4 ++ pop {r1, pc} ++#else ++ @ on 4T that won't work ++ pop {r1} ++ pop {r3} ++ bx r3 ++#endif ++#endif + + FUNC_END div0 + +@@ -1141,11 +1155,12 @@ + code here switches to the correct mode before executing the function. */ + + .text +- .align 0 ++ .align 1 + .force_thumb + + .macro call_via register + THUMB_FUNC_START _call_via_\register ++ .hidden SYM (_call_via_\register) + + bx \register + nop +@@ -1242,6 +1257,7 @@ + .code 16 + + THUMB_FUNC_START _interwork_call_via_\register ++ .hidden SYM (_interwork_call_via_\register) + + bx pc + nop +--- gcc-4.1.1/gcc/config/arm/t-linux~gcc ++++ gcc-4.1.1/gcc/config/arm/t-linux +@@ -7,6 +7,7 @@ + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ + _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ + _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ ++ _call_via_rX \ + _fixsfsi _fixunssfsi _floatdidf _floatdisf + + # MULTILIB_OPTIONS = mhard-float/msoft-float diff --git a/recipes/gcc/gcc-4.1.1/cse.patch b/recipes/gcc/gcc-4.1.1/cse.patch new file mode 100644 index 0000000000..88b22c714f --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/cse.patch @@ -0,0 +1,75 @@ +-- gcc-4_1-branch/gcc/cse.c 2006/07/20 14:20:26 115619 ++++ gcc-4_1-branch/gcc/cse.c 2006/07/20 15:07:25 115620 +@@ -4697,6 +4697,8 @@ + unsigned src_const_hash; + /* Table entry for constant equivalent for SET_SRC, if any. */ + struct table_elt *src_const_elt; ++ /* Table entry for the destination address. */ ++ struct table_elt *dest_addr_elt; + }; + + static void +@@ -5936,6 +5938,40 @@ + so that the destination goes into that class. */ + sets[i].src_elt = src_eqv_elt; + ++ /* Record destination addresses in the hash table. This allows us to ++ check if they are invalidated by other sets. */ ++ for (i = 0; i < n_sets; i++) ++ { ++ if (sets[i].rtl) ++ { ++ rtx x = sets[i].inner_dest; ++ struct table_elt *elt; ++ enum machine_mode mode; ++ unsigned hash; ++ ++ if (MEM_P (x)) ++ { ++ x = XEXP (x, 0); ++ mode = GET_MODE (x); ++ hash = HASH (x, mode); ++ elt = lookup (x, hash, mode); ++ if (!elt) ++ { ++ if (insert_regs (x, NULL, 0)) ++ { ++ rehash_using_reg (x); ++ hash = HASH (x, mode); ++ } ++ elt = insert (x, NULL, hash, mode); ++ } ++ ++ sets[i].dest_addr_elt = elt; ++ } ++ else ++ sets[i].dest_addr_elt = NULL; ++ } ++ } ++ + invalidate_from_clobbers (x); + + /* Some registers are invalidated by subroutine calls. Memory is +@@ -6028,12 +6064,20 @@ + } + + /* We may have just removed some of the src_elt's from the hash table. +- So replace each one with the current head of the same class. */ ++ So replace each one with the current head of the same class. ++ Also check if destination addresses have been removed. */ + + for (i = 0; i < n_sets; i++) + if (sets[i].rtl) + { +- if (sets[i].src_elt && sets[i].src_elt->first_same_value == 0) ++ if (sets[i].dest_addr_elt ++ && sets[i].dest_addr_elt->first_same_value == 0) ++ { ++ /* The elt was removed, which means this destination s not ++ valid after this instruction. */ ++ sets[i].rtl = NULL_RTX; ++ } ++ else if (sets[i].src_elt && sets[i].src_elt->first_same_value == 0) + /* If elt was removed, find current head of same class, + or 0 if nothing remains of that class. */ + { diff --git a/recipes/gcc/gcc-4.1.1/fix-ICE-in-arm_unwind_emit_set.diff b/recipes/gcc/gcc-4.1.1/fix-ICE-in-arm_unwind_emit_set.diff new file mode 100644 index 0000000000..568e15abff --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/fix-ICE-in-arm_unwind_emit_set.diff @@ -0,0 +1,18 @@ +--- trunk/gcc/config/arm/arm.c 2006/09/19 13:18:27 117055 ++++ trunk/gcc/config/arm/arm.c 2006/09/19 13:19:24 117056 +@@ -15415,6 +15415,15 @@ + /* Move from sp to reg. */ + asm_fprintf (asm_out_file, "\t.movsp %r\n", REGNO (e0)); + } ++ else if (GET_CODE (e1) == PLUS ++ && GET_CODE (XEXP (e1, 0)) == REG ++ && REGNO (XEXP (e1, 0)) == SP_REGNUM ++ && GET_CODE (XEXP (e1, 1)) == CONST_INT) ++ { ++ /* Set reg to offset from sp. */ ++ asm_fprintf (asm_out_file, "\t.movsp %r, #%d\n", ++ REGNO (e0), (int)INTVAL(XEXP (e1, 1))); ++ } + else + abort (); + break; diff --git a/recipes/gcc/gcc-4.1.1/gcc-4.1.1-e300cx.patch b/recipes/gcc/gcc-4.1.1/gcc-4.1.1-e300cx.patch new file mode 100644 index 0000000000..f94f7d5cb4 --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/gcc-4.1.1-e300cx.patch @@ -0,0 +1,301 @@ +diff -uNr gcc-4.1.1-orig/gcc/config/rs6000/e300c2c3.md gcc-4.1.1/gcc/config/rs6000/e300c2c3.md +--- gcc-4.1.1-orig/gcc/config/rs6000/e300c2c3.md 1970-01-01 02:00:00.000000000 +0200 ++++ gcc-4.1.1/gcc/config/rs6000/e300c2c3.md 2007-10-31 23:56:39.000000000 +0200 +@@ -0,0 +1,189 @@ ++;; Pipeline description for Motorola PowerPC e300c3 core. ++;; Copyright (C) 2003 Free Software Foundation, Inc. ++;; ++;; This file is part of GCC. ++ ++;; GCC is free software; you can redistribute it and/or modify it ++;; under the terms of the GNU General Public License as published ++;; by the Free Software Foundation; either version 2, or (at your ++;; option) any later version. ++ ++;; GCC is distributed in the hope that it will be useful, but WITHOUT ++;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public ++;; License for more details. ++ ++;; You should have received a copy of the GNU General Public License ++;; along with GCC; see the file COPYING. If not, write to the ++;; Free Software Foundation, 59 Temple Place - Suite 330, Boston, ++;; MA 02111-1307, USA. ++ ++(define_automaton "ppce300c3_most,ppce300c3_long,ppce300c3_retire") ++(define_cpu_unit "ppce300c3_decode_0,ppce300c3_decode_1" "ppce300c3_most") ++ ++;; We don't simulate general issue queue (GIC). If we have SU insn ++;; and then SU1 insn, they can not be issued on the same cycle ++;; (although SU1 insn and then SU insn can be issued) because the SU ++;; insn will go to SU1 from GIC0 entry. Fortunately, the first cycle ++;; multipass insn scheduling will find the situation and issue the SU1 ++;; insn and then the SU insn. ++(define_cpu_unit "ppce300c3_issue_0,ppce300c3_issue_1" "ppce300c3_most") ++ ++;; We could describe completion buffers slots in combination with the ++;; retirement units and the order of completion but the result ++;; automaton would behave in the same way because we can not describe ++;; real latency time with taking in order completion into account. ++;; Actually we could define the real latency time by querying reserved ++;; automaton units but the current scheduler uses latency time before ++;; issuing insns and making any reservations. ++;; ++;; So our description is aimed to achieve a insn schedule in which the ++;; insns would not wait in the completion buffer. ++(define_cpu_unit "ppce300c3_retire_0,ppce300c3_retire_1" "ppce300c3_retire") ++ ++;; Branch unit: ++(define_cpu_unit "ppce300c3_bu" "ppce300c3_most") ++ ++;; IU: ++(define_cpu_unit "ppce300c3_iu0_stage0,ppce300c3_iu1_stage0" "ppce300c3_most") ++ ++;; IU: This used to describe non-pipelined division. ++(define_cpu_unit "ppce300c3_mu_div" "ppce300c3_long") ++ ++;; SRU: ++(define_cpu_unit "ppce300c3_sru_stage0" "ppce300c3_most") ++ ++;; Here we simplified LSU unit description not describing the stages. ++(define_cpu_unit "ppce300c3_lsu" "ppce300c3_most") ++ ++;; FPU: ++(define_cpu_unit "ppce300c3_fpu" "ppce300c3_most") ++ ++;; The following units are used to make automata deterministic ++(define_cpu_unit "present_ppce300c3_decode_0" "ppce300c3_most") ++(define_cpu_unit "present_ppce300c3_issue_0" "ppce300c3_most") ++(define_cpu_unit "present_ppce300c3_retire_0" "ppce300c3_retire") ++(define_cpu_unit "present_ppce300c3_iu0_stage0" "ppce300c3_most") ++ ++;; The following sets to make automata deterministic when option ndfa is used. ++(presence_set "present_ppce300c3_decode_0" "ppce300c3_decode_0") ++(presence_set "present_ppce300c3_issue_0" "ppce300c3_issue_0") ++(presence_set "present_ppce300c3_retire_0" "ppce300c3_retire_0") ++(presence_set "present_ppce300c3_iu0_stage0" "ppce300c3_iu0_stage0") ++ ++;; Some useful abbreviations. ++(define_reservation "ppce300c3_decode" ++ "ppce300c3_decode_0|ppce300c3_decode_1+present_ppce300c3_decode_0") ++(define_reservation "ppce300c3_issue" ++ "ppce300c3_issue_0|ppce300c3_issue_1+present_ppce300c3_issue_0") ++(define_reservation "ppce300c3_retire" ++ "ppce300c3_retire_0|ppce300c3_retire_1+present_ppce300c3_retire_0") ++(define_reservation "ppce300c3_iu_stage0" ++ "ppce300c3_iu0_stage0|ppce300c3_iu1_stage0+present_ppce300c3_iu0_stage0") ++ ++;; Compares can be executed either one of the IU or SRU ++(define_insn_reservation "ppce300c3_cmp" 1 ++ (and (eq_attr "type" "cmp,compare,delayed_compare,fast_compare") ++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3"))) ++ "ppce300c3_decode,ppce300c3_issue+(ppce300c3_iu_stage0|ppce300c3_sru_stage0) \ ++ +ppce300c3_retire") ++ ++;; Other one cycle IU insns ++(define_insn_reservation "ppce300c3_iu" 1 ++ (and (eq_attr "type" "integer,insert_word") ++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3"))) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_retire") ++ ++;; Branch. Actually this latency time is not used by the scheduler. ++(define_insn_reservation "ppce300c3_branch" 1 ++ (and (eq_attr "type" "jmpreg,branch") ++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3"))) ++ "ppce300c3_decode,ppce300c3_bu,ppce300c3_retire") ++ ++;; Multiply is non-pipelined but can be executed in any IU ++(define_insn_reservation "ppce300c3_multiply" 2 ++ (and (eq_attr "type" "imul,imul2,imul3,imul_compare") ++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3"))) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0, \ ++ ppce300c3_iu_stage0+ppce300c3_retire") ++ ++;; Divide. We use the average latency time here. We omit reserving a ++;; retire unit because of the result automata will be huge. ++(define_insn_reservation "ppce300c3_divide" 20 ++ (and (eq_attr "type" "idiv") ++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3"))) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_mu_div,\ ++ ppce300c3_mu_div*19") ++ ++;; CR logical ++(define_insn_reservation "ppce300c3_cr_logical" 1 ++ (and (eq_attr "type" "cr_logical,delayed_cr") ++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3"))) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire") ++ ++;; Mfcr ++(define_insn_reservation "ppce300c3_mfcr" 1 ++ (and (eq_attr "type" "mfcr") ++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3"))) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire") ++ ++;; Mtcrf ++(define_insn_reservation "ppce300c3_mtcrf" 1 ++ (and (eq_attr "type" "mtcr") ++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3"))) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire") ++ ++;; Mtjmpr ++(define_insn_reservation "ppce300c3_mtjmpr" 1 ++ (and (eq_attr "type" "mtjmpr,mfjmpr") ++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3"))) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire") ++ ++;; Float point instructions ++(define_insn_reservation "ppce300c3_fpcompare" 3 ++ (and (eq_attr "type" "fpcompare") ++ (eq_attr "cpu" "ppce300c3")) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire") ++ ++(define_insn_reservation "ppce300c3_fp" 3 ++ (and (eq_attr "type" "fp") ++ (eq_attr "cpu" "ppce300c3")) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire") ++ ++(define_insn_reservation "ppce300c3_dmul" 4 ++ (and (eq_attr "type" "dmul") ++ (eq_attr "cpu" "ppce300c3")) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu,nothing,ppce300c3_retire") ++ ++; Divides are not pipelined ++(define_insn_reservation "ppce300c3_sdiv" 18 ++ (and (eq_attr "type" "sdiv") ++ (eq_attr "cpu" "ppce300c3")) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*17") ++ ++(define_insn_reservation "ppce300c3_ddiv" 33 ++ (and (eq_attr "type" "ddiv") ++ (eq_attr "cpu" "ppce300c3")) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*32") ++ ++;; Loads ++(define_insn_reservation "ppce300c3_load" 2 ++ (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u") ++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3"))) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire") ++ ++(define_insn_reservation "ppce300c3_fpload" 2 ++ (and (eq_attr "type" "fpload,fpload_ux,fpload_u") ++ (eq_attr "cpu" "ppce300c3")) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire") ++ ++;; Stores. ++(define_insn_reservation "ppce300c3_store" 2 ++ (and (eq_attr "type" "store,store_ux,store_u") ++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3"))) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire") ++ ++(define_insn_reservation "ppce300c3_fpstore" 2 ++ (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u") ++ (eq_attr "cpu" "ppce300c3")) ++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire") +diff -uNr gcc-4.1.1-orig/gcc/config/rs6000/rs6000.c gcc-4.1.1/gcc/config/rs6000/rs6000.c +--- gcc-4.1.1-orig/gcc/config/rs6000/rs6000.c 2006-04-13 08:46:01.000000000 +0300 ++++ gcc-4.1.1/gcc/config/rs6000/rs6000.c 2007-10-31 23:58:24.000000000 +0200 +@@ -557,6 +557,21 @@ + COSTS_N_INSNS (29), /* ddiv */ + }; + ++/* Instruction costs on E300C2 and E300C3 cores. */ ++static const ++struct processor_costs ppce300c2c3_cost = { ++ COSTS_N_INSNS (4), /* mulsi */ ++ COSTS_N_INSNS (4), /* mulsi_const */ ++ COSTS_N_INSNS (4), /* mulsi_const9 */ ++ COSTS_N_INSNS (4), /* muldi */ ++ COSTS_N_INSNS (19), /* divsi */ ++ COSTS_N_INSNS (19), /* divdi */ ++ COSTS_N_INSNS (3), /* fp */ ++ COSTS_N_INSNS (4), /* dmul */ ++ COSTS_N_INSNS (18), /* sdiv */ ++ COSTS_N_INSNS (33), /* ddiv */ ++}; ++ + /* Instruction costs on POWER4 and POWER5 processors. */ + static const + struct processor_costs power4_cost = { +@@ -1138,6 +1153,8 @@ + {"8540", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_PPC_GFXOPT}, + /* 8548 has a dummy entry for now. */ + {"8548", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_PPC_GFXOPT}, ++ {"e300c2", PROCESSOR_PPCE300C2, POWERPC_BASE_MASK | MASK_SOFT_FLOAT}, ++ {"e300c3", PROCESSOR_PPCE300C3, POWERPC_BASE_MASK}, + {"860", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT}, + {"970", PROCESSOR_POWER4, + POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64}, +@@ -1524,6 +1541,11 @@ + rs6000_cost = &ppc8540_cost; + break; + ++ case PROCESSOR_PPCE300C2: ++ case PROCESSOR_PPCE300C3: ++ rs6000_cost = &ppce300c2c3_cost; ++ break; ++ + case PROCESSOR_POWER4: + case PROCESSOR_POWER5: + rs6000_cost = &power4_cost; +@@ -16578,6 +16600,8 @@ + case CPU_PPC750: + case CPU_PPC7400: + case CPU_PPC8540: ++ case CPU_PPCE300C2: ++ case CPU_PPCE300C3: + return 2; + case CPU_RIOS2: + case CPU_PPC604: +diff -uNr gcc-4.1.1-orig/gcc/config/rs6000/rs6000.h gcc-4.1.1/gcc/config/rs6000/rs6000.h +--- gcc-4.1.1-orig/gcc/config/rs6000/rs6000.h 2006-04-13 23:33:51.000000000 +0300 ++++ gcc-4.1.1/gcc/config/rs6000/rs6000.h 2007-10-31 23:56:39.000000000 +0200 +@@ -110,6 +110,8 @@ + %{mcpu=970: -mpower4 -maltivec} \ + %{mcpu=G5: -mpower4 -maltivec} \ + %{mcpu=8540: -me500} \ ++%{mcpu=e300c2: -mppc} \ ++%{mcpu=e300c3: -mppc -mpmr} \ + %{maltivec: -maltivec} \ + -many" + +@@ -210,6 +212,8 @@ + PROCESSOR_PPC7400, + PROCESSOR_PPC7450, + PROCESSOR_PPC8540, ++ PROCESSOR_PPCE300C2, ++ PROCESSOR_PPCE300C3, + PROCESSOR_POWER4, + PROCESSOR_POWER5 + }; +diff -uNr gcc-4.1.1-orig/gcc/config/rs6000/rs6000.md gcc-4.1.1/gcc/config/rs6000/rs6000.md +--- gcc-4.1.1-orig/gcc/config/rs6000/rs6000.md 2006-05-04 23:43:57.000000000 +0300 ++++ gcc-4.1.1/gcc/config/rs6000/rs6000.md 2007-10-31 23:56:39.000000000 +0200 +@@ -103,7 +103,7 @@ + ;; Processor type -- this attribute must exactly match the processor_type + ;; enumeration in rs6000.h. + +-(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5" ++(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,ppce300c2,ppce300c3,power4,power5" + (const (symbol_ref "rs6000_cpu_attr"))) + + (automata_option "ndfa") +@@ -119,6 +119,7 @@ + (include "7xx.md") + (include "7450.md") + (include "8540.md") ++(include "e300c2c3.md") + (include "power4.md") + (include "power5.md") + +diff -uNr gcc-4.1.1-orig/gcc/config.gcc gcc-4.1.1/gcc/config.gcc +--- gcc-4.1.1-orig/gcc/config.gcc 2006-05-09 23:02:29.000000000 +0300 ++++ gcc-4.1.1/gcc/config.gcc 2007-10-31 23:56:39.000000000 +0200 +@@ -2699,7 +2699,7 @@ + | rios | rios1 | rios2 | rsc | rsc1 | rs64a \ + | 401 | 403 | 405 | 405fp | 440 | 440fp | 505 \ + | 601 | 602 | 603 | 603e | ec603e | 604 \ +- | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \ ++ | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 | e300c[23] \ + | 854[08] | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5) + # OK + ;; diff --git a/recipes/gcc/gcc-4.1.1/gcc-4.1.1-pr13685-1.patch b/recipes/gcc/gcc-4.1.1/gcc-4.1.1-pr13685-1.patch new file mode 100644 index 0000000000..c1e1dec408 --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/gcc-4.1.1-pr13685-1.patch @@ -0,0 +1,26 @@ +Submitted By: Alexander E. Patrakov +Date: 2006-12-11 +Initial Package Version: 4.1.1 +Upstream Status: backport +Origin: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28621 +Description: Fix crash of programs compiled with -Os -ffast-math +(affects procps on the LiveCD) +--- gcc-4.1.1/gcc/config/i386/i386.c ++++ gcc-4.1.1/gcc/config/i386/i386.c +@@ -1502,12 +1502,10 @@ + } + + /* Validate -mpreferred-stack-boundary= value, or provide default. +- The default of 128 bits is for Pentium III's SSE __m128, but we +- don't want additional code to keep the stack aligned when +- optimizing for code size. */ +- ix86_preferred_stack_boundary = (optimize_size +- ? TARGET_64BIT ? 128 : 32 +- : 128); ++ The default of 128 bits is for Pentium III's SSE __m128, We can't ++ change it because of optimize_size. Otherwise, we can't mix object ++ files compiled with -Os and -On. */ ++ ix86_preferred_stack_boundary = 128; + if (ix86_preferred_stack_boundary_string) + { + i = atoi (ix86_preferred_stack_boundary_string); diff --git a/recipes/gcc/gcc-4.1.1/gcc-ignore-cache.patch b/recipes/gcc/gcc-4.1.1/gcc-ignore-cache.patch new file mode 100644 index 0000000000..396b4b2345 --- /dev/null +++ b/recipes/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/recipes/gcc/gcc-4.1.1/gcc41-configure.in.patch b/recipes/gcc/gcc-4.1.1/gcc41-configure.in.patch new file mode 100644 index 0000000000..3d33bcb978 --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/gcc41-configure.in.patch @@ -0,0 +1,22 @@ +--- gcc-3.4.4/configure.in.orig 2005-08-09 19:57:51.504323183 -0700 ++++ gcc-3.4.4/configure.in 2005-08-09 20:00:12.073168623 -0700 +@@ -1907,7 +1907,7 @@ + *) gxx_include_dir=${with_gxx_include_dir} ;; + esac + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in +--- gcc-3.4.4/configure.orig 2005-08-09 21:02:29.668360660 -0700 ++++ gcc-3.4.4/configure 2005-08-09 21:02:50.157649970 -0700 +@@ -2669,7 +2669,7 @@ + *) gxx_include_dir=${with_gxx_include_dir} ;; + esac + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in diff --git a/recipes/gcc/gcc-4.1.1/ldflags.patch b/recipes/gcc/gcc-4.1.1/ldflags.patch new file mode 100644 index 0000000000..9576f60778 --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/ldflags.patch @@ -0,0 +1,22 @@ +--- /tmp/Makefile.in 2006-02-23 20:56:01.399758728 +0100 ++++ gcc-4.1-20060217/Makefile.in 2006-02-23 20:56:16.874406224 +0100 +@@ -334,7 +334,7 @@ + CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) + LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) + LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates +-LDFLAGS_FOR_TARGET = ++LDFLAGS_FOR_TARGET = @LDFLAGS@ + PICFLAG_FOR_TARGET = + + # ------------------------------------ +--- /tmp/Makefile.tpl 2006-02-23 20:50:34.077519272 +0100 ++++ gcc-4.1-20060217/Makefile.tpl 2006-02-23 21:04:31.092273688 +0100 +@@ -337,7 +337,7 @@ + CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) + LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) + LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates +-LDFLAGS_FOR_TARGET = ++LDFLAGS_FOR_TARGET = @LDFLAGS@ + PICFLAG_FOR_TARGET = + + # ------------------------------------ diff --git a/recipes/gcc/gcc-4.1.1/ppc-gcc-41-20060515.patch b/recipes/gcc/gcc-4.1.1/ppc-gcc-41-20060515.patch new file mode 100644 index 0000000000..166e79c7e9 --- /dev/null +++ b/recipes/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/recipes/gcc/gcc-4.1.1/ppc-sfp-long-double-gcc411-7.patch b/recipes/gcc/gcc-4.1.1/ppc-sfp-long-double-gcc411-7.patch new file mode 100644 index 0000000000..e3a87c87d0 --- /dev/null +++ b/recipes/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/recipes/gcc/gcc-4.1.1/pr34130.patch b/recipes/gcc/gcc-4.1.1/pr34130.patch new file mode 100644 index 0000000000..415335f4b4 --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/pr34130.patch @@ -0,0 +1,16 @@ +Index: gcc-4.1.2/gcc/fold-const.c +=================================================================== +--- gcc-4.1.2.orig/gcc/fold-const.c 2007-11-21 18:53:42.000000000 +0100 ++++ gcc-4.1.2/gcc/fold-const.c 2007-11-21 18:56:26.000000000 +0100 +@@ -5339,7 +5339,10 @@ + } + break; + } +- /* FALLTHROUGH */ ++ /* If the constant is negative, we cannot simplify this. */ ++ if (tree_int_cst_sgn (c) == -1) ++ break; ++ /* FALLTHROUGH */ + case NEGATE_EXPR: + if ((t1 = extract_muldiv (op0, c, code, wide_type)) != 0) + return fold_build1 (tcode, ctype, fold_convert (ctype, t1)); diff --git a/recipes/gcc/gcc-4.1.1/sed-fixinc-backslash.patch b/recipes/gcc/gcc-4.1.1/sed-fixinc-backslash.patch new file mode 100644 index 0000000000..9aff951bdc --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/sed-fixinc-backslash.patch @@ -0,0 +1,18 @@ +2006-09-06 Matthias Klose <doko@debian.org> + + * Makefile.in (s-macro_list): Conform to POSIX rules in single quoted + strings. + +--- s/gcc/Makefile.in~ 2008-10-18 08:53:56.000000000 +0100 ++++ s/gcc/Makefile.in 2008-10-18 08:55:16.000000000 +0100 +@@ -3146,8 +3146,8 @@ + macro_list: s-macro_list; @true + s-macro_list : $(GCC_PASSES) + echo | $(GCC_FOR_TARGET) -E -dM - | \ +- sed -n 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p ; \ +- s/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \ ++ sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \ ++ -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \ + sort -u > tmp-macro_list + $(SHELL) $(srcdir)/../move-if-change tmp-macro_list macro_list + $(STAMP) s-macro_list diff --git a/recipes/gcc/gcc-4.1.1/sh3-installfix-fixheaders.patch b/recipes/gcc/gcc-4.1.1/sh3-installfix-fixheaders.patch new file mode 100644 index 0000000000..a06cd2e075 --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/sh3-installfix-fixheaders.patch @@ -0,0 +1,11 @@ +--- gcc-4.1.1/gcc/Makefile.in_orig 2007-01-31 21:24:23.000000000 +0000 ++++ gcc-4.1.1/gcc/Makefile.in 2007-01-31 21:24:43.000000000 +0000 +@@ -3772,8 +3772,6 @@ + $(INSTALL_SCRIPT) $(mkinstalldirs) \ + $(DESTDIR)$(itoolsdir)/mkinstalldirs ; \ + $(INSTALL_SCRIPT) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \ +- $(INSTALL_PROGRAM) build/fix-header$(build_exeext) \ +- $(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \ + else :; fi + echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \ + > $(DESTDIR)$(itoolsdatadir)/mkheaders.conf diff --git a/recipes/gcc/gcc-4.1.1/unbreak-armv4t.patch b/recipes/gcc/gcc-4.1.1/unbreak-armv4t.patch new file mode 100644 index 0000000000..b3399abfdb --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/unbreak-armv4t.patch @@ -0,0 +1,12 @@ +diff -urN gcc-4.1.1/gcc/config/arm/linux-eabi.h gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h +--- gcc-4.1.1/gcc/config/arm/linux-eabi.h 2006-10-22 11:11:49.000000000 -0700 ++++ gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h 2006-10-24 21:34:01.000000000 -0700 +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + #undef SUBTARGET_EXTRA_LINK_SPEC + #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi" diff --git a/recipes/gcc/gcc-4.1.1/zecke-no-host-includes.patch b/recipes/gcc/gcc-4.1.1/zecke-no-host-includes.patch new file mode 100644 index 0000000000..6afb10d6ef --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/zecke-no-host-includes.patch @@ -0,0 +1,31 @@ +Index: gcc-4.0.2/gcc/c-incpath.c +=================================================================== +--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100 ++++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200 +@@ -350,6 +350,26 @@ + p->construct = 0; + p->user_supplied_p = user_supplied_p; + ++#ifdef CROSS_COMPILE ++ /* A common error when cross compiling is including ++ host headers. This code below will try to fail fast ++ for cross compiling. Currently we consider /usr/include, ++ /opt/include and /sw/include as harmful. */ ++ { ++ /* printf("Adding Path: %s\n", p->name ); */ ++ if( strstr(p->name, "/usr/include" ) == p->name ) { ++ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name); ++ abort(); ++ } else if( strstr(p->name, "/sw/include") == p->name ) { ++ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name); ++ abort(); ++ } else if( strstr(p->name, "/opt/include") == p->name ) { ++ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name); ++ abort(); ++ } ++ } ++#endif ++ + add_cpp_dir_path (p, chain); + } + diff --git a/recipes/gcc/gcc-4.1.1/zecke-xgcc-cpp.patch b/recipes/gcc/gcc-4.1.1/zecke-xgcc-cpp.patch new file mode 100644 index 0000000000..3ccd124764 --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/zecke-xgcc-cpp.patch @@ -0,0 +1,16 @@ +upstream: n/a +comment: Use the preprocessor we have just compiled instead the one of +the system. There might be incompabilities between us and them. + +Index: gcc-4.1.1/Makefile.in +=================================================================== +--- gcc-4.1.1.orig/Makefile.in 2006-08-06 13:32:44.000000000 +0200 ++++ gcc-4.1.1/Makefile.in 2006-08-06 13:32:46.000000000 +0200 +@@ -194,6 +194,7 @@ + AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ ++ CPP="$(CC_FOR_TARGET) -E"; export CPP; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ |