Add the full crosstool-NG sources to the new repository of its own.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1eeea35fbf182
parent 0 fb871400e0c8
child 2 687f86f2a01c
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
.cdtproject
.project
.settings/org.eclipse.cdt.core.prefs
COPYING
CREDITS
LICENSES
Makefile
README
config/binutils.in
config/cc.in
config/cc_core_gcc.in
config/cc_core_tcc.in
config/cc_gcc.in
config/cc_tcc.in
config/config.in
config/global.in
config/kernel.in
config/kernel_cygwin.in
config/kernel_linux.in
config/kernel_linux_headers_copy.in
config/kernel_linux_headers_install.in
config/kernel_linux_headers_sanitised.in
config/libc.in
config/libc_glibc.in
config/libc_uClibc.in
config/target.in
docs/overview.txt
kconfig/Makefile
kconfig/conf.c
kconfig/confdata.c
kconfig/expr.c
kconfig/expr.h
kconfig/lex.zconf.c_shipped
kconfig/lkc.h
kconfig/lkc_proto.h
kconfig/lxdialog/BIG.FAT.WARNING
kconfig/lxdialog/check-lxdialog.sh
kconfig/lxdialog/checklist.c
kconfig/lxdialog/dialog.h
kconfig/lxdialog/inputbox.c
kconfig/lxdialog/menubox.c
kconfig/lxdialog/textbox.c
kconfig/lxdialog/util.c
kconfig/lxdialog/yesno.c
kconfig/mconf.c
kconfig/menu.c
kconfig/symbol.c
kconfig/util.c
kconfig/zconf.hash.c_shipped
kconfig/zconf.tab.c_shipped
licenses/by-sa/deed.en
licenses/by-sa/deed_files/deed.gif
licenses/by-sa/deed_files/deed_002.gif
licenses/by-sa/deed_files/deeds.css
licenses/by-sa/deed_files/logo_deed.gif
licenses/by-sa/deed_files/popup.gif
licenses/by-sa/legalcode
licenses/by-sa/legalcode_files/deeds.css
licenses/by-sa/legalcode_files/logo_code.gif
licenses/gpl.txt
licenses/lgpl.txt
patches/binutils/2.11.2/gcc-pr3106.patch
patches/binutils/2.13.90.0.2/README
patches/binutils/2.13.90.0.2/rh62-binutils-2.11.93.0.2-sparc-nonpic.patch
patches/binutils/2.13.90.0.2/rh62-binutils-2.13.90.0.2-glibc21.patch
patches/binutils/2.13.90.0.2/rh62-binutils-2.13.90.0.2-gotpc.patch
patches/binutils/2.13.90.0.2/rh62-binutils-2.13.90.0.2-tpoff32.patch
patches/binutils/2.14.90.0.5/binutils-cross-demangler.patch
patches/binutils/2.14.90.0.5/binutils-sh-relocs.patch
patches/binutils/2.14.90.0.7/binutils-cross-demangler.patch
patches/binutils/2.14.92/binutils-skip-comments.patch
patches/binutils/2.14.92/gccpr15247-fix.patch
patches/binutils/2.14/binutils-sh-relocs.patch
patches/binutils/2.15.90.0.3/binutils-20040817-linkonce.patch
patches/binutils/2.15.90.0.3/binutils-20040820-duplicates.patch
patches/binutils/2.15.90.0.3/binutils-skip-comments.patch
patches/binutils/2.15.90.0.3/gccpr15247-fix.patch
patches/binutils/2.15.91.0.2/binutils-20040817-linkonce.patch
patches/binutils/2.15.91.0.2/binutils-dup-sections.patch
patches/binutils/2.15.91.0.2/binutils-skip-comments.patch
patches/binutils/2.15/002-uclibc.patch
patches/binutils/2.15/100-uclibc-conf.patch
patches/binutils/2.15/210-cflags.patch
patches/binutils/2.15/400-mips-ELF_MAXPAGESIZE-4K.patch
patches/binutils/2.15/600-arm-textrel.patch
patches/binutils/2.15/bfd-hash-tweak.patch
patches/binutils/2.15/binutils-2.15-allow-gcc-4.0.patch
patches/binutils/2.15/binutils-2.15-psignal.patch
patches/binutils/2.15/binutils-2.15-solaris-qsort.patch
patches/binutils/2.15/binutils-2.15-vmx.patch
patches/binutils/2.15/binutils-arm-undef-imm.patch
patches/binutils/2.15/binutils-skip-comments.patch
patches/binutils/2.15/cross-gprof.patch
patches/binutils/2.15/gccpr15247-fix.patch
patches/binutils/2.15/ld-2.15-callahan.patch
patches/binutils/2.15/ld-2.15-stabs-tweak.patch
patches/binutils/2.15/s390-invalid-insn-format.patch
patches/binutils/2.16.1/bfd-hash-tweak.patch
patches/binutils/2.16.1/binutils-2.15-psignal.patch
patches/binutils/2.16.1/binutils-skip-comments.patch
patches/binutils/2.16.1/callahan.patch
patches/binutils/2.16.1/cross-gprof.patch
patches/binutils/2.16.1/stabs-tweak.patch
patches/binutils/2.17.50.0.10/100-uclibc-conf.patch
patches/binutils/2.17.50.0.10/110-arm-eabi-conf.patch
patches/binutils/2.17.50.0.10/300-001_ld_makefile_patch.patch
patches/binutils/2.17.50.0.10/300-012_check_ldrunpath_length.patch
patches/binutils/2.17.50.0.8/100-uclibc-conf.patch
patches/binutils/2.17.50.0.8/110-arm-eabi-conf.patch
patches/binutils/2.17.50.0.8/300-001_ld_makefile_patch.patch
patches/binutils/2.17.50.0.8/300-012_check_ldrunpath_length.patch
patches/binutils/2.17.50.0.9/100-uclibc-conf.patch
patches/binutils/2.17.50.0.9/110-arm-eabi-conf.patch
patches/binutils/2.17.50.0.9/300-001_ld_makefile_patch.patch
patches/binutils/2.17.50.0.9/300-012_check_ldrunpath_length.patch
patches/cygwin/1.5.15-1/cygwin-1.5.15-1-crossbuild.patch
patches/gcc/2.95.3/arm-linux.patch
patches/gcc/2.95.3/backport-config.gcc-1.4.patch
patches/gcc/2.95.3/backport-config.gcc-1.92.patch
patches/gcc/2.95.3/config.sub.patch
patches/gcc/2.95.3/deque-leak-fix.patch
patches/gcc/2.95.3/gcc-2.95.3-cygwin-020611.patch
patches/gcc/2.95.3/gcc-2.95.3-trap-posix.patch
patches/gcc/2.95.3/gcc-pr3106.patch
patches/gcc/2.95.3/threads_snafu.patch
patches/gcc/3.2.3/README-mips
patches/gcc/3.2.3/README-sh
patches/gcc/3.2.3/config.sub.patch
patches/gcc/3.2.3/gcc-20020722-ppc405erratum77.patch
patches/gcc/3.2.3/gcc-20030210-sh-linux-1.patch
patches/gcc/3.2.3/gcc-3.2.3-g++.exp.patch
patches/gcc/3.2.3/gcc-3.2.3-libffi-1.patch
patches/gcc/3.2.3/gcc-3.2.3-ppc-asm-spec.patch
patches/gcc/3.2.3/gcc-3.2.3-trap-posix.patch
patches/gcc/3.2.3/gcc-3.3-libstdc++-v3-dg.exp.patch
patches/gcc/3.2.3/gcc-sh-linux.spec
patches/gcc/3.3.1/compat.exp.patch
patches/gcc/3.3.1/config.sub.patch
patches/gcc/3.3.1/empty6.patch
patches/gcc/3.3.1/gcc-3.2.3-g++.exp.patch
patches/gcc/3.3.1/gcc-3.3-libstdc++-v3-dg.exp.patch
patches/gcc/3.3.1/gcc-3.3.1-trap-posix.patch
patches/gcc/3.3.1/pr10392-1-test.patch
patches/gcc/3.3.1/pr10412-1-test.patch
patches/gcc/3.3.1/pr10589-1-test.patch
patches/gcc/3.3.1/pr11162-1-test.patch
patches/gcc/3.3.1/pr11587-1-test.patch
patches/gcc/3.3.1/pr11736-1-test.patch
patches/gcc/3.3.1/pr11864-1-test.patch
patches/gcc/3.3.1/pr11949-fix.patch
patches/gcc/3.3.1/pr9365-1-test.patch
patches/gcc/3.3.1/sh-pic-set_fpscr.patch
patches/gcc/3.3.1/sh-spec.patch
patches/gcc/3.3.1/sh4-pthread.patch
patches/gcc/3.3.1/thunk3.patch
patches/gcc/3.3.2/empty6.patch
patches/gcc/3.3.2/gcc-3.2.3-g++.exp.patch
patches/gcc/3.3.2/gcc-3.3-libstdc++-v3-dg.exp.patch
patches/gcc/3.3.2/gcc-3.3.2-arm-bigendian.patch
patches/gcc/3.3.2/gcc-3.3.2-trap-posix.patch
patches/gcc/3.3.2/pr10392-1-test.patch
patches/gcc/3.3.2/pr10412-1-test.patch
patches/gcc/3.3.2/pr10589-1-test.patch
patches/gcc/3.3.2/pr11162-1-test.patch
patches/gcc/3.3.2/pr11587-1-test.patch
patches/gcc/3.3.2/pr11608-fix.patch
patches/gcc/3.3.2/pr11736-1-test.patch
patches/gcc/3.3.2/pr11864-1-test.patch
patches/gcc/3.3.2/pr13260-test.patch
patches/gcc/3.3.2/pr9365-1-test.patch
patches/gcc/3.3.2/sh-lib1funcs_sizeAndType.patch
patches/gcc/3.3.2/sh-libgcc-hidden.patch
patches/gcc/3.3.2/sh-pic-set_fpscr-gcc-3.3.2.patch
patches/gcc/3.3.2/thunk3.patch
patches/gcc/3.3.3/config.sub.patch
patches/gcc/3.3.3/empty6.patch
patches/gcc/3.3.3/gcc-3.3.2-arm-bigendian.patch
patches/gcc/3.3.3/gcc-3.3.3-trap-posix.patch
patches/gcc/3.3.3/pr10392-1-test.patch
patches/gcc/3.3.3/pr10412-1-test.patch
patches/gcc/3.3.3/pr10589-1-test.patch
patches/gcc/3.3.3/pr11162-1-test.patch
patches/gcc/3.3.3/pr11587-1-test.patch
patches/gcc/3.3.3/pr11608.patch
patches/gcc/3.3.3/pr11736-1-test.patch
patches/gcc/3.3.3/pr11864-1-test.patch
patches/gcc/3.3.3/pr12009.patch
patches/gcc/3.3.3/pr12010.patch
patches/gcc/3.3.3/pr13250-fix.patch
patches/gcc/3.3.3/pr13260-fix-3.3.3.patch
patches/gcc/3.3.3/pr13260-test.patch
patches/gcc/3.3.3/pr15089-fix.patch
patches/gcc/3.3.3/pr9365-1-test.patch
patches/gcc/3.3.3/sh-lib1funcs_sizeAndType.patch
patches/gcc/3.3.3/sh-pic-set_fpscr-gcc-3.3.2.patch
patches/gcc/3.3.3/thunk3.patch
patches/gcc/3.3.4/gcc-3.3.4-arm-bigendian.patch
patches/gcc/3.3.4/gcc-3.3.4-arm-pr22528.patch
patches/gcc/3.3.4/gcc-3.3.4-libstdcxx-sh.patch
patches/gcc/3.3.4/gcc-3.3.4-ppc-asm-spec.patch
patches/gcc/3.3.4/gcc-3.3.4-trap-posix.patch
patches/gcc/3.3.5/gcc-3.3.4-arm-bigendian.patch
patches/gcc/3.3.5/gcc-3.3.4-arm-pr22528.patch
patches/gcc/3.3.6/fix-fixincl.patch
patches/gcc/3.3.6/gcc-3.3.4-arm-bigendian.patch
patches/gcc/3.3.6/gcc-3.3.4-arm-pr22528.patch
patches/gcc/3.3/compat.exp.patch
patches/gcc/3.3/config.sub.patch
patches/gcc/3.3/gcc-3.2.3-g++.exp.patch
patches/gcc/3.3/gcc-3.3-libstdc++-v3-dg.exp.patch
patches/gcc/3.3/sh-pic-set_fpscr.patch
patches/gcc/3.3/sh-predef-gnu_source.patch
patches/gcc/3.3/sh-spec.patch
patches/gcc/3.3/sh4-kaz-workaround.patch
patches/gcc/3.3/sh4-no-fix-protos.patch
patches/gcc/3.3/sh4-pthread.patch
patches/gcc/3.4.0/gcc-3.3.3h-ppc-asm-spec.patch
patches/gcc/3.4.0/gcc-3.4.0-arm-bigendian.patch
patches/gcc/3.4.0/gcc-3.4.0-arm-lib1asm.patch
patches/gcc/3.4.0/gcc-3.4.0-arm-nolibfloat.patch
patches/gcc/3.4.0/gcc-3.4.0-pr14808-refix.patch
patches/gcc/3.4.0/gcc-3.4.0-ultrasparc3-default64.patch
patches/gcc/3.4.0/pr13250-fix.patch
patches/gcc/3.4.0/pr15647-fix.patch
patches/gcc/3.4.1/fix-fixincl.patch
patches/gcc/3.4.1/gcc-3.4-sparc-pr16430-fix.patch
patches/gcc/3.4.1/gcc-3.4.0-arm-bigendian.patch
patches/gcc/3.4.1/gcc-3.4.0-arm-lib1asm.patch
patches/gcc/3.4.1/gcc-3.4.0-arm-nolibfloat.patch
patches/gcc/3.4.1/pr15068-fix.patch
patches/gcc/3.4.2/gcc-3.4.0-arm-bigendian.patch
patches/gcc/3.4.2/gcc-3.4.0-arm-lib1asm.patch
patches/gcc/3.4.2/gcc-3.4.0-arm-nolibfloat.patch
patches/gcc/3.4.3/fix-fixincl.patch
patches/gcc/3.4.3/gcc-3.4.0-arm-bigendian.patch
patches/gcc/3.4.3/gcc-3.4.0-arm-lib1asm.patch
patches/gcc/3.4.3/gcc-3.4.0-arm-nolibfloat.patch
patches/gcc/3.4.3/pr15068-fix.patch
patches/gcc/3.4.3/pr16201-fix.patch
patches/gcc/3.4.3/pr18508-fix.patch
patches/gcc/3.4.4/100-uclibc-conf.patch
patches/gcc/3.4.4/200-uclibc-locale.patch
patches/gcc/3.4.4/300-libstdc++-pic.patch
patches/gcc/3.4.4/600-gcc34-arm-ldm-peephole.patch
patches/gcc/3.4.4/601-gcc34-arm-ldm-peephole2.patch
patches/gcc/3.4.4/601-gcc34-arm-ldm.patch
patches/gcc/3.4.4/602-sdk-libstdc++-includes.patch
patches/gcc/3.4.4/700-pr15068-fix.patch
patches/gcc/3.4.4/71_all_sh-pr16665-fix.patch
patches/gcc/3.4.4/72_all_sh-no-reorder-blocks.patch
patches/gcc/3.4.4/73_all_sh-pr20617.patch
patches/gcc/3.4.4/800-arm-bigendian.patch
patches/gcc/3.4.4/800-powerpc-libc_stack_end-uclibc.patch
patches/gcc/3.4.4/830-gcc-bug-num-22167.patch
patches/gcc/3.4.4/900-nios2.patch
patches/gcc/3.4.4/arm-softfloat.patch
patches/gcc/3.4.4/fix-fixincl.patch
patches/gcc/3.4.5/fix-fixincl.patch
patches/gcc/3.4.5/gcc-3.4.0-arm-bigendian.patch
patches/gcc/3.4.5/gcc-3.4.0-arm-lib1asm.patch
patches/gcc/3.4.5/gcc-3.4.0-arm-nolibfloat.patch
patches/gcc/3.4.5/pr15068-fix.patch
patches/gcc/4.0.0/fix-fixincl.patch
patches/gcc/4.0.0/gcc-4.0-arm-bigendian.patch
patches/gcc/4.0.0/pr20815-fix.patch
patches/gcc/4.0.0/pr20973-fix.patch
patches/gcc/4.0.0/pr21173-fix.patch
patches/gcc/4.0.0/pr21951.patch
patches/gcc/4.0.1/fix-fixincl.patch
patches/gcc/4.0.1/pr20815-fix.patch
patches/gcc/4.0.1/pr21951-fix2.patch
patches/gcc/4.0.2/fix-fixincl.patch
patches/gcc/4.0.2/pr20815-fix.patch
patches/gcc/4.0.2/pr21623-workaround.patch
patches/gcc/4.0.3/100-uclibc-conf.patch
patches/gcc/4.0.3/200-uclibc-locale.patch
patches/gcc/4.0.3/300-libstdc++-pic.patch
patches/gcc/4.0.3/301-missing-execinfo_h.patch
patches/gcc/4.0.3/302-c99-snprintf.patch
patches/gcc/4.0.3/303-c99-complex-ugly-hack.patch
patches/gcc/4.0.3/304-index_macro.patch
patches/gcc/4.0.3/602-sdk-libstdc++-includes.patch
patches/gcc/4.0.3/800-arm-bigendian.patch
patches/gcc/4.0.4/100-uclibc-conf.patch
patches/gcc/4.0.4/200-uclibc-locale.patch
patches/gcc/4.0.4/300-libstdc++-pic.patch
patches/gcc/4.0.4/301-missing-execinfo_h.patch
patches/gcc/4.0.4/302-c99-snprintf.patch
patches/gcc/4.0.4/303-c99-complex-ugly-hack.patch
patches/gcc/4.0.4/304-index_macro.patch
patches/gcc/4.0.4/602-sdk-libstdc++-includes.patch
patches/gcc/4.0.4/800-arm-bigendian.patch
patches/gcc/4.0.4/801-arm-softfloat.patch
patches/gcc/4.1.0/gcc-4.1-fix-fixincl.patch
patches/gcc/4.1.1/100-uclibc-conf.patch
patches/gcc/4.1.1/110-arm-eabi.patch
patches/gcc/4.1.1/200-uclibc-locale.patch
patches/gcc/4.1.1/300-libstdc++-pic.patch
patches/gcc/4.1.1/301-missing-execinfo_h.patch
patches/gcc/4.1.1/302-c99-snprintf.patch
patches/gcc/4.1.1/303-c99-complex-ugly-hack.patch
patches/gcc/4.1.1/304-index_macro.patch
patches/gcc/4.1.1/740-sh-pr24836.patch
patches/gcc/4.1.1/800-arm-bigendian.patch
patches/gcc/4.1.1/801-softfloat-fix.patch
patches/gcc/4.1.2/100-uclibc-conf.patch
patches/gcc/4.1.2/110-arm-eabi.patch
patches/gcc/4.1.2/200-uclibc-locale.patch
patches/gcc/4.1.2/300-libstdc++-pic.patch
patches/gcc/4.1.2/301-missing-execinfo_h.patch
patches/gcc/4.1.2/302-c99-snprintf.patch
patches/gcc/4.1.2/303-c99-complex-ugly-hack.patch
patches/gcc/4.1.2/304-index_macro.patch
patches/gcc/4.1.2/402-libbackend_dep_gcov-iov.h.patch
patches/gcc/4.1.2/740-sh-pr24836.patch
patches/gcc/4.1.2/800-arm-bigendian.patch
patches/glibc/2.1.3/README
patches/glibc/2.1.3/arm-ctl_bus_isa.patch
patches/glibc/2.1.3/backport-config.sub.patch
patches/glibc/2.1.3/el.po.patch
patches/glibc/2.1.3/glibc-2.1.3-ac_cv_prog_cc_cross.patch
patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-db2.patch
patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-dns.patch
patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-fixup.patch
patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-generic.patch
patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-grp.patch
patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-locale.patch
patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-mntent.patch
patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-sunrpc.patch
patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-configure.patch
patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-dl-machine-i386.patch
patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-errlist.patch
patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-longlong.patch
patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-sscanf.patch
patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-syscall.patch
patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-versioninfo.patch
patches/glibc/2.1.3/glibc-2.1.3-cygwin.patch
patches/glibc/2.1.3/glibc-2.1.3-override.patch
patches/glibc/2.1.3/glibc-2.2.2-export_fp_hw.patch
patches/glibc/2.1.3/glibc-manual-stdin.texi-1.127.patch
patches/glibc/2.1.3/glibc-rpcgen-cpp.patch
patches/glibc/2.1.3/rh62-00-glibc-2.1.3.patch
patches/glibc/2.1.3/rh62-01-glibc-2.1.3-security.patch
patches/glibc/2.1.3/rh62-02-glibc-2.1.3-locale.patch
patches/glibc/2.1.3/rh62-03-glibc-2.1.3-crypt.patch
patches/glibc/2.1.3/rh62-04-glibc-2.1.3-tzfile.patch
patches/glibc/2.1.3/rh62-06-glibc-2.1.3-preload.patch
patches/glibc/2.1.3/rh62-07-glibc-2.1.3-alpha.patch
patches/glibc/2.1.3/rh62-08-glibc-2.1.3-glob.patch
patches/glibc/2.1.3/rh62-09-glibc-2.1.3-security2.patch
patches/glibc/2.1.3/rh62-10-glibc-2.1.3-xdr_array.patch
patches/glibc/2.1.3/rh62-11-glibc-2.1.3-calloc.patch
patches/glibc/2.1.3/rh62-12-glibc-2.1.3-maxpacket.patch
patches/glibc/2.1.3/rh62-99-glibc-2.1.3-allow-gcc-3.4-dns.patch
patches/glibc/2.1.3/rh62-99-glibc-2.1.3-allow-gcc-3.4-gconv_stubs.patch
patches/glibc/2.1.3/sk.po.patch
patches/glibc/2.2.2/arm-ctl_bus_isa.patch
patches/glibc/2.2.2/glibc-2.1.3-allow-gcc-3.4-grp.patch
patches/glibc/2.2.2/glibc-2.1.3-allow-gcc3-sscanf.patch
patches/glibc/2.2.2/glibc-2.1.3-allow-gcc3-versioninfo.patch
patches/glibc/2.2.2/glibc-2.2.2-allow-gcc-3-configure.patch
patches/glibc/2.2.2/glibc-2.2.2-allow-gcc3-dl-machine-i386.patch
patches/glibc/2.2.2/glibc-2.2.2-allow-gcc3-errlist.patch
patches/glibc/2.2.2/glibc-2.2.2-allow-gcc3-longlong.patch
patches/glibc/2.2.2/glibc-2.2.2-export_fp_hw.patch
patches/glibc/2.2.2/glibc-2.2.2-printf-not-macro.patch
patches/glibc/2.2.2/glibc-2.2.2-syslog-bugfix.patch
patches/glibc/2.2.2/glibc-2.2.5-alpha-pwrite64.patch
patches/glibc/2.2.2/glibc-2.2.5-arm-pwrite64.patch
patches/glibc/2.2.2/glibc-2.2.5-i386-pwrite64.patch
patches/glibc/2.2.2/glibc-2.2.5-m68k-pwrite.patch
patches/glibc/2.2.2/glibc-manual-stdin.texi-1.127.patch
patches/glibc/2.2.2/glibc-nss-noopt.patch
patches/glibc/2.2.2/tst-pathopt-cross.patch
patches/glibc/2.2.3/errlist-1.9.patch
patches/glibc/2.2.3/errlist-arm.patch
patches/glibc/2.2.3/glibc-2.2.3-mips-base-addr-got.patch
patches/glibc/2.2.3/glibc-2.2.5-mips-clone-local-label.patch
patches/glibc/2.2.3/glibc-manual-stdin.texi-1.127.patch
patches/glibc/2.2.5/alpha-build-failure.patch
patches/glibc/2.2.5/arm-asm-clobber.patch
patches/glibc/2.2.5/arm-ctl_bus_isa.patch
patches/glibc/2.2.5/cris-libc-symbols.patch
patches/glibc/2.2.5/cris-stack-direction.patch
patches/glibc/2.2.5/dl-machine-alpha.patch
patches/glibc/2.2.5/dl-machine-arm.patch
patches/glibc/2.2.5/dl-machine-m68k.patch
patches/glibc/2.2.5/dl-machine-sh.patch
patches/glibc/2.2.5/dl-machine-sparc.patch
patches/glibc/2.2.5/errlist-1.9.patch
patches/glibc/2.2.5/errlist-arm.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-3.4-fixup.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-3.4-grp.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-3.4-weakextern.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-configure.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-elf-2.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-elf.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-gconv.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-i386.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-iconv.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-iconvdata.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-locale.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-malloc.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-mipsel.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-msort.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-powerpc-procfs.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-powerpc.patch
patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-sunrpc.patch
patches/glibc/2.2.5/glibc-2.2.5-alpha-pwrite64.patch
patches/glibc/2.2.5/glibc-2.2.5-arm-pwrite64.patch
patches/glibc/2.2.5/glibc-2.2.5-crosstest.patch
patches/glibc/2.2.5/glibc-2.2.5-crossyes.patch
patches/glibc/2.2.5/glibc-2.2.5-cygwin.patch
patches/glibc/2.2.5/glibc-2.2.5-hhl-powerpc-fpu.patch
patches/glibc/2.2.5/glibc-2.2.5-i386-pwrite64.patch
patches/glibc/2.2.5/glibc-2.2.5-m68k-pwrite.patch
patches/glibc/2.2.5/glibc-2.2.5-mips-build-gmon.patch
patches/glibc/2.2.5/glibc-2.2.5-mips-clone-local-label.patch
patches/glibc/2.2.5/glibc-2.2.5-mips-dl-machine-1.56.patch
patches/glibc/2.2.5/glibc-2.2.5-mips-dl-machine-1.57.patch
patches/glibc/2.2.5/glibc-2.2.5-mips-dl-machine-1.59-kinda.patch
patches/glibc/2.2.5/glibc-2.2.5-mips-dl-machine-1.60.patch
patches/glibc/2.2.5/glibc-2.2.5-powerpc-as.patch
patches/glibc/2.2.5/glibc-2.2.5-ppc405erratum77.patch
patches/glibc/2.2.5/glibc-2.3.2-allow-gcc-3.5-xdr.patch
patches/glibc/2.2.5/glibc-drow-sh.patch
patches/glibc/2.2.5/glibc-test-lowram.patch
patches/glibc/2.2.5/initfini-alpha.patch
patches/glibc/2.2.5/initfini-ia64.patch
patches/glibc/2.2.5/initfini-sh.patch
patches/glibc/2.2.5/longjmp-sparc.patch
patches/glibc/2.2.5/sh-setjmp-fix.patch
patches/glibc/2.2.5/sprintf-prototype.patch
patches/glibc/2.2.5/sscanf.patch
patches/glibc/2.2.5/unwind-arm.patch
patches/glibc/2.3.2/README-hppa
patches/glibc/2.3.2/arm-asm-clobber.patch
patches/glibc/2.3.2/arm-ctl_bus_isa.patch
patches/glibc/2.3.2/arm-mcount_internal.patch
patches/glibc/2.3.2/epoll-epollet.patch
patches/glibc/2.3.2/epoll-stdint.patch
patches/glibc/2.3.2/errlist-awk.patch
patches/glibc/2.3.2/fixup.patch
patches/glibc/2.3.2/gcc-pr-9552-workaround.patch
patches/glibc/2.3.2/glibc-2.2.5-crosstest.patch
patches/glibc/2.3.2/glibc-2.2.5-mips-clone-local-label.patch
patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.4-inline.patch
patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.4-nounit.patch
patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-PR14096.patch
patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-elf.patch
patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-gconv.patch
patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-msort.patch
patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-sunrpc.patch
patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-xdr.patch
patches/glibc/2.3.2/glibc-2.3.2-alpha-pwrite64.patch
patches/glibc/2.3.2/glibc-2.3.2-arm-fix-strlen.patch
patches/glibc/2.3.2/glibc-2.3.2-cross-2.patch
patches/glibc/2.3.2/glibc-2.3.2-cross.patch
patches/glibc/2.3.2/glibc-2.3.2-cygwin.patch
patches/glibc/2.3.2/glibc-2.3.2-mips-user.patch
patches/glibc/2.3.2/glibc-2.3.2-mips.patch
patches/glibc/2.3.2/glibc-2.3.2-override.patch
patches/glibc/2.3.2/glibc-2.3.2-powerpc-as.patch
patches/glibc/2.3.2/glibc-2.3.2-pr139-fix.patch
patches/glibc/2.3.2/glibc-2.3.2-sh4-socket.patch
patches/glibc/2.3.2/glibc-2.3.2-sh4-trapa.patch
patches/glibc/2.3.2/glibc-2.3.2-sparc32-sysdep.patch
patches/glibc/2.3.2/glibc-2.3.2-sparc64-dl-machine.patch
patches/glibc/2.3.2/glibc-2.3.2-sparc64-pause.patch
patches/glibc/2.3.2/glibc-2.3.2-sparc64-pwrite64.patch
patches/glibc/2.3.2/glibc-2.3.2-without-fp.patch
patches/glibc/2.3.2/glibc-2.3.3-allow-gcc-4.0-configure.patch
patches/glibc/2.3.2/glibc-2.3.3-allow-gcc-4.0-powerpc-procfs.patch
patches/glibc/2.3.2/glibc-configure-apple-as.patch
patches/glibc/2.3.2/glibc-drow-sh.patch
patches/glibc/2.3.2/glibc-fp-byteorder.patch
patches/glibc/2.3.2/glibc-test-lowram.patch
patches/glibc/2.3.2/nobits.patch
patches/glibc/2.3.2/old/glibc-2.3.2-powerpc-procfs.patch
patches/glibc/2.3.2/sscanf.patch
patches/glibc/2.3.2/string2-typedef.patch
patches/glibc/2.3.3/arm-ctl_bus_isa.patch
patches/glibc/2.3.3/bad/glibc-2.3.3-alpha-pwrite64.patch
patches/glibc/2.3.3/fixup.patch
patches/glibc/2.3.3/glibc-2.2.5-allow-gcc-4.0-malloc.patch
patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.4-inline.patch
patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.5-elf.patch
patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.5-gconv.patch
patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.5-msort.patch
patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.5-sunrpc.patch
patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.5-xdr.patch
patches/glibc/2.3.3/glibc-2.3.2-arm-fix-strlen.patch
patches/glibc/2.3.3/glibc-2.3.2-pr139-fix.patch
patches/glibc/2.3.3/glibc-2.3.2-sparc32-sysdep.patch
patches/glibc/2.3.3/glibc-2.3.2-sparc64-dl-machine.patch
patches/glibc/2.3.3/glibc-2.3.2-without-fp.patch
patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-configure.patch
patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-elf-2.patch
patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-elf-3.patch
patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-i386.patch
patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-iconv.patch
patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-iconvdata-2.patch
patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-iconvdata.patch
patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-locale.patch
patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-posix.patch
patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-powerpc-procfs.patch
patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-x86_64.patch
patches/glibc/2.3.3/glibc-2.3.3-alpha-pwrite64.patch
patches/glibc/2.3.3/glibc-2.3.3-cygwin.patch
patches/glibc/2.3.3/glibc-2.3.3-libeh-kludge.patch
patches/glibc/2.3.3/glibc-2.3.3-s390-fadvise64.patch
patches/glibc/2.3.3/glibc-2.3.3-unwind-dw2.patch
patches/glibc/2.3.3/glibc-2.3.4-allow-gcc-4.0-arm.patch
patches/glibc/2.3.3/glibc-2.3.4-allow-gcc-4.0-elf.patch
patches/glibc/2.3.3/glibc-2.3.4-allow-gcc-4.0-powerpc32.patch
patches/glibc/2.3.3/glibc-2.3.4-allow-gcc-4.0-powerpc64.patch
patches/glibc/2.3.3/glibc-configure-apple-as.patch
patches/glibc/2.3.3/glibc-fp-byteorder.patch
patches/glibc/2.3.4/arm-ctl_bus_isa.patch
patches/glibc/2.3.4/bad/glibc-2.3.4-cygwin.patch
patches/glibc/2.3.4/fix-pr398.patch
patches/glibc/2.3.4/glibc-2.3.4-allow-gcc-4.0-arm.patch
patches/glibc/2.3.4/glibc-2.3.4-allow-gcc-4.0-elf.patch
patches/glibc/2.3.4/glibc-2.3.4-allow-gcc-4.0-iconvdata.patch
patches/glibc/2.3.4/glibc-2.3.4-allow-gcc-4.0-powerpc-procfs.patch
patches/glibc/2.3.4/glibc-2.3.4-allow-gcc-4.0-powerpc32.patch
patches/glibc/2.3.4/glibc-2.3.4-allow-gcc-4.0-powerpc64.patch
patches/glibc/2.3.4/glibc-2.3.4-cygwin.patch
patches/glibc/2.3.4/glibc-2.3.4-memcmp.patch
patches/glibc/2.3.4/glibc-2.3.5-allow-gcc4-string.patch
patches/glibc/2.3.4/glibc-2.3.5-allow-gcc4-symbols.patch
patches/glibc/2.3.4/glibc-2.3.5-allow-gcc4-wcstol_l.patch
patches/glibc/2.3.4/glibc-configure-apple-as.patch
patches/glibc/2.3.4/glibc-fp-byteorder.patch
patches/glibc/2.3.4/make-install-lib-all.patch
patches/glibc/2.3.4/pr758.patch
patches/glibc/2.3.5/arm-ctl_bus_isa.patch
patches/glibc/2.3.5/fix-pr398.patch
patches/glibc/2.3.5/glibc-2.3.4-allow-gcc-4.0-arm.patch
patches/glibc/2.3.5/glibc-2.3.4-allow-gcc-4.0-elf.patch
patches/glibc/2.3.5/glibc-2.3.4-allow-gcc-4.0-iconvdata.patch
patches/glibc/2.3.5/glibc-2.3.4-allow-gcc-4.0-powerpc-procfs.patch
patches/glibc/2.3.5/glibc-2.3.4-allow-gcc-4.0-powerpc32.patch
patches/glibc/2.3.5/glibc-2.3.4-allow-gcc-4.0-powerpc64.patch
patches/glibc/2.3.5/glibc-2.3.4-memcmp.patch
patches/glibc/2.3.5/glibc-2.3.5-allow-gcc-4.0-wordexp.patch
patches/glibc/2.3.5/glibc-2.3.5-allow-gcc4-string.patch
patches/glibc/2.3.5/glibc-2.3.5-allow-gcc4-symbols.patch
patches/glibc/2.3.5/glibc-2.3.5-allow-gcc4-wcstol_l.patch
patches/glibc/2.3.5/glibc-2.3.5-cygwin.patch
patches/glibc/2.3.5/glibc-2.3.5-fix-pr631.patch
patches/glibc/2.3.5/glibc-2.3.5-sh-memset.patch
patches/glibc/2.3.5/glibc-configure-apple-as.patch
patches/glibc/2.3.5/glibc-fp-byteorder.patch
patches/glibc/2.3.5/glibc-mips-bootstrap-gcc-header-install.patch
patches/glibc/2.3.5/make-install-lib-all.patch
patches/glibc/2.3.5/pr758.patch
patches/glibc/2.3.6/arm-ctl_bus_isa.patch
patches/glibc/2.3.6/fix-pr398.patch
patches/glibc/2.3.6/glibc-2.3.5-allow-gcc-4.0-wordexp.patch
patches/glibc/2.3.6/glibc-2.3.5-allow-gcc4-wcstol_l.patch
patches/glibc/2.3.6/glibc-2.3.5-cygwin.patch
patches/glibc/2.3.6/glibc-2.3.5-sh-lowlevellock.patch
patches/glibc/2.3.6/glibc-2.3.5-sh-memset.patch
patches/glibc/2.3.6/glibc-2.3.6-allow-gcc-4.0-arm.patch
patches/glibc/2.3.6/glibc-2.3.6-allow-gcc-4.0-elf.patch
patches/glibc/2.3.6/glibc-2.3.6-configure-apple-as.patch
patches/glibc/2.3.6/glibc-2.3.6-fix-pr631.patch
patches/glibc/2.3.6/glibc-fp-byteorder.patch
patches/glibc/2.3.6/glibc-mips-bootstrap-gcc-header-install.patch
patches/glibc/2.3.6/make-install-lib-all.patch
patches/glibc/2.3.6/maybe/glibc-2.3.6-allow-gcc-4.0-powerpc32.patch
patches/glibc/2.3.6/maybe/glibc-2.3.6-allow-gcc-4.0-powerpc64.patch
patches/glibc/20040827/arm-ctl_bus_isa.patch
patches/glibc/20040827/glibc-2.3.2-sparc64-dl-machine.patch
patches/glibc/20040827/glibc-2.3.3-cygwin.patch
patches/glibc/20040827/glibc-2.3.3-libeh-kludge.patch
patches/glibc/20040827/glibc-configure-apple-as.patch
patches/glibc/20040827/glibc-fp-byteorder.patch
patches/glibc/20050502/make-install-lib-all.patch
patches/glibc/compat-2.1/rh62-09-glibc-compat-2.1.3-security2.patch
patches/glibc/compat-2.1/rh62-12-glibc-compat-2.1.3-maxpacket.patch
patches/glibc/linuxthreads-2.1.3/glibc-2.1.3-allow-gcc3-pthread.patch
patches/glibc/linuxthreads-2.1.3/glibc-2.1.3-allow-gcc3-pthread2.patch
patches/glibc/linuxthreads-2.1.3/rh62-05-glibc-2.1.3-pthread.patch
patches/glibc/linuxthreads-2.1.3/rh62-99-glibc-2.1.3-allow-gcc-3.4-td.patch
patches/glibc/linuxthreads-2.2.2/glibc-linuxthreads-2.2.2-allow-gcc3.patch
patches/glibc/linuxthreads-2.2.2/threadparam.patch
patches/glibc/linuxthreads-2.2.5/glibc-2.2.5-allow-gcc-3.4-td.patch
patches/glibc/linuxthreads-2.2.5/glibc-2.2.5-alpha-self-clobber.patch
patches/glibc/linuxthreads-2.2.5/linuxthreads-2.2.5-ppc405erratum77.patch
patches/glibc/linuxthreads-2.2.5/pt-initfini-alpha.patch
patches/glibc/linuxthreads-2.2.5/pt-initfini-sh.patch
patches/glibc/linuxthreads-2.2.5/threadparam.patch
patches/glibc/linuxthreads-2.3.2/alpha_cfi1.patch
patches/glibc/linuxthreads-2.3.2/alpha_cfi2.patch
patches/glibc/linuxthreads-2.3.2/glibc-2.3.2-sparc64-sigproc.patch
patches/glibc/linuxthreads-2.3.2/glibc-linuxthreads-2.3.2-allow-3.4.patch
patches/glibc/linuxthreads-2.3.2/glibc-linuxthreads-2.3.2-cygwin.patch
patches/glibc/linuxthreads-2.3.2/sysdep-cancel-arm-1.2-1.6.patch
patches/glibc/linuxthreads-2.3.3/glibc-2.3.3-alpha-prolog.patch
patches/glibc/linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
patches/glibc/linuxthreads-2.3.4/glibc-linuxthreads-2.3.3-cygwin.patch
patches/glibc/linuxthreads-2.3.4/glibc-linuxthreads-2.3.4-allow-gcc-4.0-rtld.patch
patches/glibc/linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
patches/glibc/linuxthreads-2.3.6/glibc-linuxthreads-2.3.5-cygwin.patch
patches/glibc/linuxthreads-20040827/glibc-linuxthreads-2.3.3-cygwin.patch
patches/libfloat/990616/100-libfloat_990616-3-lib-versioning.patch
patches/libfloat/990616/200-cross_compile.patch
patches/linux/2.4.26/01-kmap-types-cleanup.patch
patches/linux/2.4.26/kaz-types.patch
patches/linux/2.4.26/linux-2.4-bsd-expr.patch
patches/linux/2.4.26/linux-2.4.21-allow-gcc-3.3-arm-lib.patch
patches/linux/2.4.26/linux-2.4.26-allow-gcc-3.4-arm-kernel.patch
patches/linux/2.4.26/linux-2.4.26-arm-nonofpu.patch
patches/linux/2.4.26/linux-2.4.26-mkdep-xargs.patch
patches/linux/2.4.26/linux-2.4.26-wdt977-uaccess.patch
patches/linux/2.6.11.3/arch_alpha_kernel_srcons.patch
patches/linux/2.6.11.3/kaz-types.patch
patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-asm-i386.patch
patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-asm-m68k.patch
patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-asm-ppc64.patch
patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-asm-x86_64.patch
patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-i2c.patch
patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-ppc-mikpe.patch
patches/linux/2.6.5/linux-2.6.5-x86_64-unistd.patch
patches/linux/2.6.6/kaz-types.patch
patches/linux/2.6.6/linux-2.6.5-x86_64-unistd.patch
patches/linux/2.6.6/linux-2.6.8-noshared-kconfig.patch
patches/linux/2.6.7/kaz-types.patch
patches/linux/2.6.7/linux-2.6.7-build_on_case_insensitive_fs-1.patch
patches/linux/2.6.7/linux-2.6.8-noshared-kconfig.patch
patches/linux/2.6.8/kaz-types.patch
patches/linux/2.6.8/linux-2.6.8-allow-gcc-4.0-asm-i386.patch
patches/linux/2.6.8/linux-2.6.8-arm-nonofpu.patch
patches/linux/2.6.8/linux-2.6.8-build_on_case_insensitive_fs.patch
patches/linux/2.6.8/linux-2.6.8-m68k-kludge.patch
patches/linux/2.6.8/linux-2.6.8-noshared-kconfig.patch
patches/uClibc/0.9.28.1/000-string-functions.patch
patches/uClibc/0.9.28.1/001-install_dev.patch
patches/uClibc/0.9.28.1/002-no_LFS-no_readahead.patch
patches/uClibc/0.9.28.1/003-time-locale.patch
patches/uClibc/0.9.28.1/004-uClibc_ctype.patch
patches/uClibc/0.9.28.1/200-custom-ISA.patch
patches/uClibc/0.9.28.1/201-mips-asm.h.patch
patches/uClibc/0.9.28.2/000-string-functions.patch
patches/uClibc/0.9.28.2/001-install_dev.patch
patches/uClibc/0.9.28.2/002-no_LFS-no_readahead.patch
patches/uClibc/0.9.28.2/004-uClibc_ctype.patch
patches/uClibc/0.9.28.2/200-custom-ISA.patch
patches/uClibc/0.9.28.2/201-mips-asm.h.patch
patches/uClibc/0.9.28/000-string-functions.patch
patches/uClibc/0.9.28/001-install_dev.patch
patches/uClibc/0.9.28/002-no_LFS-no_readahead.patch
patches/uClibc/0.9.28/004-uClibc_ctype.patch
patches/uClibc/0.9.28/005-fix_includes.sh.patch
patches/uClibc/0.9.28/200-custom-ISA.patch
patches/uClibc/0.9.28/201-mips-asm.h.patch
samples/arm-qemu-linux-uclibc/crosstool.config
samples/arm-qemu-linux-uclibc/linux-2.6.20.config
samples/arm-qemu-linux-uclibc/uClibc-0.9.28.1.config
samples/armeb-unknown-linux-gnu/crosstool.config
samples/armeb-unknown-linux-gnu/linux-2.6.19.1.config
samples/armeb-unknown-linux-uclibc/crosstool.config
samples/armeb-unknown-linux-uclibc/linux-2.6.19.2.config
samples/armeb-unknown-linux-uclibc/uClibc-0.9.28.2.config
samples/i586-geode-linux-uclibc/crosstool.config
samples/i586-geode-linux-uclibc/linux-2.6.19.2.config
samples/i586-geode-linux-uclibc/uClibc-0.9.28.1.config
samples/i686-unknown-linux-uclibc/linux-2.6.19.2.config
samples/i686-unknown-linux-uclibc/uClibc-0.9.28.1.config
scripts/build/binutils.sh
scripts/build/cc_core_gcc.sh
scripts/build/cc_core_tcc.sh
scripts/build/cc_gcc.sh
scripts/build/cc_tcc.sh
scripts/build/kernel_cygwin.sh
scripts/build/kernel_linux-libc-headers.sh
scripts/build/kernel_linux.sh
scripts/build/libc_glibc.sh
scripts/build/libc_libfloat.sh
scripts/build/libc_uClibc.sh
scripts/buildToolchain.sh
scripts/crosstool.sh
scripts/functions
scripts/getExtractPatch.sh
tools/Makefile
tools/addToolVersion.sh
tools/config.guess
tools/config.sub
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/.cdtproject	Sat Feb 24 11:00:05 2007 +0000
     1.3 @@ -0,0 +1,67 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     1.5 +<?eclipse-cdt version="2.0"?>
     1.6 +
     1.7 +<cdtproject id="org.eclipse.cdt.make.core.make">
     1.8 +<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
     1.9 +<data>
    1.10 +<item id="scannerConfiguration">
    1.11 +<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
    1.12 +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
    1.13 +<buildOutputProvider>
    1.14 +<openAction enabled="true" filePath=""/>
    1.15 +<parser enabled="true"/>
    1.16 +</buildOutputProvider>
    1.17 +<scannerInfoProvider id="specsFile">
    1.18 +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
    1.19 +<parser enabled="true"/>
    1.20 +</scannerInfoProvider>
    1.21 +</profile>
    1.22 +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
    1.23 +<buildOutputProvider>
    1.24 +<openAction enabled="false" filePath=""/>
    1.25 +<parser enabled="true"/>
    1.26 +</buildOutputProvider>
    1.27 +<scannerInfoProvider id="makefileGenerator">
    1.28 +<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
    1.29 +<parser enabled="false"/>
    1.30 +</scannerInfoProvider>
    1.31 +</profile>
    1.32 +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
    1.33 +<buildOutputProvider>
    1.34 +<openAction enabled="false" filePath=""/>
    1.35 +<parser enabled="true"/>
    1.36 +</buildOutputProvider>
    1.37 +<scannerInfoProvider id="specsFile">
    1.38 +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
    1.39 +<parser enabled="false"/>
    1.40 +</scannerInfoProvider>
    1.41 +</profile>
    1.42 +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
    1.43 +<buildOutputProvider>
    1.44 +<openAction enabled="false" filePath=""/>
    1.45 +<parser enabled="true"/>
    1.46 +</buildOutputProvider>
    1.47 +<scannerInfoProvider id="specsFile">
    1.48 +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
    1.49 +<parser enabled="false"/>
    1.50 +</scannerInfoProvider>
    1.51 +</profile>
    1.52 +</item>
    1.53 +<item id="org.eclipse.cdt.core.pathentry">
    1.54 +<pathentry kind="src" path=""/>
    1.55 +<pathentry kind="out" path=""/>
    1.56 +<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
    1.57 +</item>
    1.58 +<item id="org.eclipse.cdt.make.core.buildtargets">
    1.59 +<buildTargets>
    1.60 +<target name="Build toolchain" path="" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
    1.61 +<buildCommand>make</buildCommand>
    1.62 +<buildArguments/>
    1.63 +<buildTarget>all</buildTarget>
    1.64 +<stopOnError>true</stopOnError>
    1.65 +<useDefaultCommand>true</useDefaultCommand>
    1.66 +</target>
    1.67 +</buildTargets>
    1.68 +</item>
    1.69 +</data>
    1.70 +</cdtproject>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/.project	Sat Feb 24 11:00:05 2007 +0000
     2.3 @@ -0,0 +1,34 @@
     2.4 +<?xml version="1.0" encoding="UTF-8"?>
     2.5 +<projectDescription>
     2.6 +	<name>crosstool-ng</name>
     2.7 +	<comment></comment>
     2.8 +	<projects>
     2.9 +	</projects>
    2.10 +	<buildSpec>
    2.11 +		<buildCommand>
    2.12 +			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
    2.13 +			<triggers>full,incremental,</triggers>
    2.14 +			<arguments>
    2.15 +				<dictionary>
    2.16 +					<key>LaunchConfigHandle</key>
    2.17 +					<value>&lt;project&gt;/.externalToolBuilders/org.eclipse.cdt.make.core.makeBuilder.launch</value>
    2.18 +				</dictionary>
    2.19 +			</arguments>
    2.20 +		</buildCommand>
    2.21 +		<buildCommand>
    2.22 +			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
    2.23 +			<triggers>full,incremental,</triggers>
    2.24 +			<arguments>
    2.25 +				<dictionary>
    2.26 +					<key>LaunchConfigHandle</key>
    2.27 +					<value>&lt;project&gt;/.externalToolBuilders/org.eclipse.cdt.make.core.ScannerConfigBuilder.launch</value>
    2.28 +				</dictionary>
    2.29 +			</arguments>
    2.30 +		</buildCommand>
    2.31 +	</buildSpec>
    2.32 +	<natures>
    2.33 +		<nature>org.eclipse.cdt.core.cnature</nature>
    2.34 +		<nature>org.eclipse.cdt.make.core.makeNature</nature>
    2.35 +		<nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
    2.36 +	</natures>
    2.37 +</projectDescription>
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/.settings/org.eclipse.cdt.core.prefs	Sat Feb 24 11:00:05 2007 +0000
     3.3 @@ -0,0 +1,3 @@
     3.4 +#Sat Feb 17 16:17:18 CET 2007
     3.5 +eclipse.preferences.version=1
     3.6 +indexerId=org.eclipse.cdt.core.fastIndexer
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/COPYING	Sat Feb 24 11:00:05 2007 +0000
     4.3 @@ -0,0 +1,21 @@
     4.4 +Unless otherwise stated in individaul files, this work is licensed to you under
     4.5 +the following terms.
     4.6 +
     4.7 +- Files in docs/ are available under the Creative Commons Attribution, Share
     4.8 +  Alike (by-sa), v2.5, to be found there:
     4.9 +    licenses/by-sa/deed.en     (human-readable summary)
    4.10 +    licenses/by-sa/legalcode   (legal code, the full license)
    4.11 +    
    4.12 +- Files found in patches/uClibc/*/ are available under the GNU Lesser General
    4.13 +  Public License (LGPL), v2.1, to be found here:
    4.14 +    licenses/lgpl.txt
    4.15 +
    4.16 +- Files found in patches/glibc/*/ are available under the GNU Lesser General
    4.17 +  Public License (LGPL), v2.1, to be found there:
    4.18 +    licenses/lgpl.txt
    4.19 +
    4.20 +- Other files not covered by the above licenses, and not covered by an
    4.21 +  individual license specified in the file itself, or an accompanying file,
    4.22 +  are available under the GNU General Public License (GPL), v2, to be found
    4.23 +  here:
    4.24 +    licenses/gpl.txt
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/CREDITS	Sat Feb 24 11:00:05 2007 +0000
     5.3 @@ -0,0 +1,9 @@
     5.4 +I would like to thank these fine people for making crosstool-NG possible:
     5.5 +
     5.6 +  Dan KEGEL, the original author of crosstool: http://www.kegel.com/
     5.7 +    Dan was very helpfull and willing to help when I build my first toolchains.
     5.8 +    I owe him one. Thank you Dan!
     5.9 +    Some crosstool-NG scripts have code snippets coming almost as-is from the
    5.10 +    original work by Dan.
    5.11 +
    5.12 +More to come as they help.
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/LICENSES	Sat Feb 24 11:00:05 2007 +0000
     6.3 @@ -0,0 +1,1 @@
     6.4 +COPYING
     6.5 \ No newline at end of file
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/Makefile	Sat Feb 24 11:00:05 2007 +0000
     7.3 @@ -0,0 +1,46 @@
     7.4 +# Makefile for crosstool-NG.
     7.5 +# Copyright 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
     7.6 +
     7.7 +# The project version
     7.8 +export PROJECTVERSION=0.0.1
     7.9 +
    7.10 +# This should eventually be computed if compiling out-of-tree is implemented
    7.11 +export CT_TOP_DIR=$(shell pwd)
    7.12 +
    7.13 +.PHONY: all
    7.14 +all: build
    7.15 +
    7.16 +HOST_CC = gcc -funsigned-char
    7.17 +
    7.18 +help::
    7.19 +	@echo  'Available make targets (*: default target):'
    7.20 +	@echo
    7.21 +
    7.22 +include $(CT_TOP_DIR)/kconfig/Makefile
    7.23 +#include $(CT_TOP_DIR)/samples/Makefile
    7.24 +
    7.25 +help::
    7.26 +	@echo  'Build targets:'
    7.27 +	@echo  '* build		  - Build the toolchain'
    7.28 +	@echo  '  clean		  - Remove generated files'
    7.29 +	@echo  '  distclean	  - Remove generated files and configuration'
    7.30 +
    7.31 +include $(CT_TOP_DIR)/tools/Makefile
    7.32 +
    7.33 +.config: config/*.in
    7.34 +	@make menuconfig
    7.35 +	@# Because exiting menuconfig without saving is not an error to menuconfig
    7.36 +	@test -f .config
    7.37 +
    7.38 +# Actual build
    7.39 +build: .config
    7.40 +	@$(CT_TOP_DIR)/scripts/crosstool.sh
    7.41 +
    7.42 +.PHONY: clean
    7.43 +clean::
    7.44 +	@rm -f .crosstool.config
    7.45 +
    7.46 +.PHONY: distclean
    7.47 +distclean:: clean
    7.48 +	@rm -f .config* ..config.tmp
    7.49 +
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/README	Sat Feb 24 11:00:05 2007 +0000
     8.3 @@ -0,0 +1,9 @@
     8.4 +This is the README for crosstool-NG
     8.5 +
     8.6 +To get you started, hust enter:
     8.7 +  make help
     8.8 +
     8.9 +You can find a (terse and WIP) documentation in docs/.
    8.10 +
    8.11 +You can also point your browser to
    8.12 +  http://ymorin.is-a-geek.org/dokuwiki/doku.php?id=projects:crosstool
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/config/binutils.in	Sat Feb 24 11:00:05 2007 +0000
     9.3 @@ -0,0 +1,133 @@
     9.4 +# binutils options
     9.5 +
     9.6 +menu "binutils"
     9.7 +
     9.8 +config BINUTILS_VERSION
     9.9 +    string
    9.10 +
    9.11 +choice
    9.12 +    bool
    9.13 +    prompt "binutils version"
    9.14 +
    9.15 +config BINUTILS_V_2_11_2
    9.16 +    bool
    9.17 +    prompt "2.11.2"
    9.18 +
    9.19 +config BINUTILS_V_2_13_90
    9.20 +    bool
    9.21 +    prompt "2.13.90"
    9.22 +
    9.23 +config BINUTILS_V_2_14
    9.24 +    bool
    9.25 +    prompt "2.14"
    9.26 +
    9.27 +config BINUTILS_V_2_14_90
    9.28 +    bool
    9.29 +    prompt "2.14.90"
    9.30 +
    9.31 +config BINUTILS_V_2_14_92
    9.32 +    bool
    9.33 +    prompt "2.14.92"
    9.34 +
    9.35 +config BINUTILS_V_2_15
    9.36 +    bool
    9.37 +    prompt "2.15"
    9.38 +
    9.39 +config BINUTILS_V_2_15_90
    9.40 +    bool
    9.41 +    prompt "2.15.90"
    9.42 +
    9.43 +config BINUTILS_V_2_15_91
    9.44 +    bool
    9.45 +    prompt "2.15.91"
    9.46 +
    9.47 +config BINUTILS_V_2_16
    9.48 +    bool
    9.49 +    prompt "2.16"
    9.50 +
    9.51 +config BINUTILS_V_2_16_1
    9.52 +    bool
    9.53 +    prompt "2.16.1"
    9.54 +
    9.55 +config BINUTILS_V_2_17
    9.56 +    bool
    9.57 +    prompt "2.17"
    9.58 +
    9.59 +config BINUTILS_V_2_17_50_0_1
    9.60 +    bool
    9.61 +    prompt "2.17.50.0.1"
    9.62 +
    9.63 +config BINUTILS_V_2_17_50_0_2
    9.64 +    bool
    9.65 +    prompt "2.17.50.0.2"
    9.66 +
    9.67 +config BINUTILS_V_2_17_50_0_3
    9.68 +    bool
    9.69 +    prompt "2.17.50.0.3"
    9.70 +
    9.71 +config BINUTILS_V_2_17_50_0_4
    9.72 +    bool
    9.73 +    prompt "2.17.50.0.4"
    9.74 +
    9.75 +config BINUTILS_V_2_17_50_0_5
    9.76 +    bool
    9.77 +    prompt "2.17.50.0.5"
    9.78 +
    9.79 +config BINUTILS_V_2_17_50_0_6
    9.80 +    bool
    9.81 +    prompt "2.17.50.0.6"
    9.82 +
    9.83 +config BINUTILS_V_2_17_50_0_7
    9.84 +    bool
    9.85 +    prompt "2.17.50.0.7"
    9.86 +
    9.87 +config BINUTILS_V_2_17_50_0_8
    9.88 +    bool
    9.89 +    prompt "2.17.50.0.8"
    9.90 +
    9.91 +config BINUTILS_V_2_17_50_0_9
    9.92 +    bool
    9.93 +    prompt "2.17.50.0.9"
    9.94 +
    9.95 +config BINUTILS_V_2_17_50_0_10
    9.96 +    bool
    9.97 +    prompt "2.17.50.0.10"
    9.98 +
    9.99 +# CT_INSERT_VERSION_ABOVE
   9.100 +# Don't remove qbove line!
   9.101 +endchoice
   9.102 +
   9.103 +config BINUTILS_VERSION
   9.104 +    string
   9.105 +    default "2.11.2" if BINUTILS_V_2_11_2
   9.106 +    default "2.13.90" if BINUTILS_V_2_13_90
   9.107 +    default "2.14" if BINUTILS_V_2_14
   9.108 +    default "2.14.90" if BINUTILS_V_2_14_90
   9.109 +    default "2.14.92" if BINUTILS_V_2_14_92
   9.110 +    default "2.15" if BINUTILS_V_2_15
   9.111 +    default "2.15.90" if BINUTILS_V_2_15_90
   9.112 +    default "2.15.91" if BINUTILS_V_2_15_91
   9.113 +    default "2.16" if BINUTILS_V_2_16
   9.114 +    default "2.16.1" if BINUTILS_V_2_16_1
   9.115 +    default "2.17" if BINUTILS_V_2_17
   9.116 +    default "2.17.50.0.1" if BINUTILS_V_2_17_50_0_1
   9.117 +    default "2.17.50.0.2" if BINUTILS_V_2_17_50_0_2
   9.118 +    default "2.17.50.0.3" if BINUTILS_V_2_17_50_0_3
   9.119 +    default "2.17.50.0.4" if BINUTILS_V_2_17_50_0_4
   9.120 +    default "2.17.50.0.5" if BINUTILS_V_2_17_50_0_5
   9.121 +    default "2.17.50.0.6" if BINUTILS_V_2_17_50_0_6
   9.122 +    default "2.17.50.0.7" if BINUTILS_V_2_17_50_0_7
   9.123 +    default "2.17.50.0.8" if BINUTILS_V_2_17_50_0_8
   9.124 +    default "2.17.50.0.9" if BINUTILS_V_2_17_50_0_9
   9.125 +    default "2.17.50.0.10" if BINUTILS_V_2_17_50_0_10
   9.126 +# CT_INSERT_VERSION_STRING_ABOVE
   9.127 +# Don't remove qbove line!
   9.128 +
   9.129 +config BINUTILS_EXTRA_CONFIG
   9.130 +    string
   9.131 +    prompt "binutils extra config"
   9.132 +    default ""
   9.133 +    help
   9.134 +      Extra flags passed onto ./configure when configuring
   9.135 +
   9.136 +endmenu
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/config/cc.in	Sat Feb 24 11:00:05 2007 +0000
    10.3 @@ -0,0 +1,185 @@
    10.4 +# Compiler options
    10.5 +
    10.6 +menu "C compiler"
    10.7 +
    10.8 +comment "Core C Compiler (used to build the C library)"
    10.9 +
   10.10 +config CC_USE_CORE
   10.11 +    bool
   10.12 +    prompt "Use a different core C compiler"
   10.13 +    default n
   10.14 +    help
   10.15 +      Use a different compiler to build the C library than the one
   10.16 +      in the final toolchain.
   10.17 +      
   10.18 +      You can change the compiler used, or only the version used.
   10.19 +
   10.20 +      You most probably don't need that.
   10.21 +
   10.22 +config CC_CORE_GCC
   10.23 +    bool
   10.24 +    default y if ! CC_USE_CORE && CC_GCC
   10.25 +    default n if CC_USE_CORE || ! CC_GCC
   10.26 +
   10.27 +config CC_CORE_TCC
   10.28 +    bool
   10.29 +    default y if ! CC_USE_CORE && CC_TCC
   10.30 +    default n if CC_USE_CORE || ! CC_TCC
   10.31 +
   10.32 +choice
   10.33 +    bool
   10.34 +    prompt "Core C compiler:"
   10.35 +    depends on CC_USE_CORE
   10.36 +
   10.37 +config CC_CORE_GCC
   10.38 +    bool
   10.39 +    prompt "gcc"
   10.40 +
   10.41 +#config CC_CORE_TCC
   10.42 +#    bool
   10.43 +#    prompt "tcc (EXPERIMENTAL)"
   10.44 +
   10.45 +endchoice
   10.46 +
   10.47 +config CC_CORE_VERSION
   10.48 +    string
   10.49 +
   10.50 +config CC_CORE
   10.51 +    string
   10.52 +    default "gcc" if CC_CORE_GCC
   10.53 +    default "tcc" if CC_CORE_TCC
   10.54 +
   10.55 +if CC_CORE_GCC && CC_USE_CORE
   10.56 +source config/cc_core_gcc.in
   10.57 +endif
   10.58 +
   10.59 +if CC_CORE_TCC && CC_USE_CORE
   10.60 +source config/cc_core_tcc.in
   10.61 +endif
   10.62 +
   10.63 +comment "Final C compiler"
   10.64 +
   10.65 +choice
   10.66 +    bool
   10.67 +    prompt "Final C compiler"
   10.68 +    default CC_GCC
   10.69 +
   10.70 +config CC_GCC
   10.71 +    bool
   10.72 +    prompt "gcc"
   10.73 +    select CC_SUPPORT_CXX
   10.74 +    select CC_SUPPORT_FORTRAN
   10.75 +    select CC_SUPPORT_JAVA
   10.76 +    select CC_SUPPORT_ADA
   10.77 +    select CC_SUPPORT_OBJC
   10.78 +    select CC_SUPPORT_OBJCXX
   10.79 +
   10.80 +#config CC_TCC
   10.81 +#    bool
   10.82 +#    prompt "tcc (EXPERIMENTAL)"
   10.83 +#    select CC_LANG_C
   10.84 +
   10.85 +endchoice
   10.86 +
   10.87 +config CC_VERSION
   10.88 +    string
   10.89 +
   10.90 +config CC
   10.91 +    string
   10.92 +    default "gcc" if CC_GCC
   10.93 +    default "tcc" if CC_TCC
   10.94 +
   10.95 +if CC_GCC
   10.96 +source config/cc_gcc.in
   10.97 +endif
   10.98 +
   10.99 +if CC_GCC
  10.100 +source config/cc_tcc.in
  10.101 +endif
  10.102 +
  10.103 +config CC_SUPPORT_CXX
  10.104 +    bool
  10.105 +
  10.106 +config CC_SUPPORT_FORTRAN
  10.107 +    bool
  10.108 +
  10.109 +config CC_SUPPORT_JAVA
  10.110 +    bool
  10.111 +
  10.112 +config CC_SUPPORT_ADA
  10.113 +    bool
  10.114 +
  10.115 +config CC_SUPPORT_OBJC
  10.116 +    bool
  10.117 +
  10.118 +config CC_SUPPORT_OBJCXX
  10.119 +    bool
  10.120 +
  10.121 +comment "Additionnal supported languages:"
  10.122 +
  10.123 +config CC_LANG_CXX
  10.124 +    bool
  10.125 +    prompt "C++"
  10.126 +    default n
  10.127 +    depends on CC_SUPPORT_CXX
  10.128 +    help
  10.129 +      Only select this if you know that your specific combination of
  10.130 +      compiler and its version does support this language.
  10.131 +
  10.132 +config CC_LANG_FORTRAN
  10.133 +    bool
  10.134 +    prompt "Fortran"
  10.135 +    default n
  10.136 +    depends on CC_SUPPORT_FORTRAN
  10.137 +    help
  10.138 +      Only select this if you know that your specific combination of
  10.139 +      compiler and its version does support this language.
  10.140 +
  10.141 +config CC_LANG_JAVA
  10.142 +    bool
  10.143 +    prompt "Java"
  10.144 +    default n
  10.145 +    depends on CC_SUPPORT_JAVA
  10.146 +    help
  10.147 +      Only select this if you know that your specific combination of
  10.148 +      compiler and its version does support this language.
  10.149 +
  10.150 +config CC_LANG_ADA
  10.151 +    bool
  10.152 +    prompt "ADA"
  10.153 +    default n
  10.154 +    depends on CC_SUPPORT_ADA
  10.155 +    help
  10.156 +      Only select this if you know that your specific combination of
  10.157 +      compiler and its version does support this language.
  10.158 +
  10.159 +config CC_LANG_OBJC
  10.160 +    bool
  10.161 +    prompt "Objective-C"
  10.162 +    default n
  10.163 +    depends on CC_SUPPORT_OBJC
  10.164 +    help
  10.165 +      Only select this if you know that your specific combination of
  10.166 +      compiler and its version does support this language.
  10.167 +
  10.168 +config CC_LANG_OBJCXX
  10.169 +    bool
  10.170 +    prompt "Objective-C++"
  10.171 +    default n
  10.172 +    depends on CC_SUPPORT_OBJCXX
  10.173 +    help
  10.174 +      Only select this if you know that your specific combination of
  10.175 +      compiler and its version does support this language.
  10.176 +
  10.177 +config CC_LANG_OTHERS
  10.178 +    string
  10.179 +    prompt "Other languages"
  10.180 +    default ""
  10.181 +    help
  10.182 +      Enter here a comma-separated list of languages that you know your compiler
  10.183 +      supports, besides those listed above.
  10.184 +
  10.185 +      Eg. gcc-4.1+ has a toy programming language, treelang. As it is not usefull
  10.186 +      in real life, it is not available in the selection above.
  10.187 +
  10.188 +endmenu
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/config/cc_core_gcc.in	Sat Feb 24 11:00:05 2007 +0000
    11.3 @@ -0,0 +1,137 @@
    11.4 +# Compiler options
    11.5 +
    11.6 +choice
    11.7 +    bool
    11.8 +    prompt "Core gcc version"
    11.9 +
   11.10 +config CC_CORE_V_2_95_3
   11.11 +    bool
   11.12 +    prompt "2.95.3"
   11.13 +
   11.14 +config CC_CORE_V_3_2_3
   11.15 +    bool
   11.16 +    prompt "3.2.3"
   11.17 +
   11.18 +config CC_CORE_V_3_3
   11.19 +    bool
   11.20 +    prompt "3.3"
   11.21 +
   11.22 +config CC_CORE_V_3_3_1
   11.23 +    bool
   11.24 +    prompt "3.3.1"
   11.25 +
   11.26 +config CC_CORE_V_3_3_2
   11.27 +    bool
   11.28 +    prompt "3.3.2"
   11.29 +
   11.30 +config CC_CORE_V_3_3_3
   11.31 +    bool
   11.32 +    prompt "3.3.3"
   11.33 +
   11.34 +config CC_CORE_V_3_3_4
   11.35 +    bool
   11.36 +    prompt "3.3.4"
   11.37 +
   11.38 +config CC_CORE_V_3_3_5
   11.39 +    bool
   11.40 +    prompt "3.3.5"
   11.41 +
   11.42 +config CC_CORE_V_3_3_6
   11.43 +    bool
   11.44 +    prompt "3.3.6"
   11.45 +
   11.46 +config CC_CORE_V_3_4_0
   11.47 +    bool
   11.48 +    prompt "3.4.0"
   11.49 +
   11.50 +config CC_CORE_V_3_4_1
   11.51 +    bool
   11.52 +    prompt "3.4.1"
   11.53 +
   11.54 +config CC_CORE_V_3_4_2
   11.55 +    bool
   11.56 +    prompt "3.4.2"
   11.57 +
   11.58 +config CC_CORE_V_3_4_3
   11.59 +    bool
   11.60 +    prompt "3.4.3"
   11.61 +
   11.62 +config CC_CORE_V_3_4_4
   11.63 +    bool
   11.64 +    prompt "3.4.4"
   11.65 +
   11.66 +config CC_CORE_V_3_4_5
   11.67 +    bool
   11.68 +    prompt "3.4.5"
   11.69 +
   11.70 +config CC_CORE_V_3_4_6
   11.71 +    bool
   11.72 +    prompt "3.4.6"
   11.73 +
   11.74 +config CC_CORE_V_4_0_0
   11.75 +    bool
   11.76 +    prompt "4.0.0"
   11.77 +
   11.78 +config CC_CORE_V_4_0_1
   11.79 +    bool
   11.80 +    prompt "4.0.1"
   11.81 +
   11.82 +config CC_CORE_V_4_0_2
   11.83 +    bool
   11.84 +    prompt "4.0.2"
   11.85 +
   11.86 +config CC_CORE_V_4_0_3
   11.87 +    bool
   11.88 +    prompt "4.0.3"
   11.89 +
   11.90 +config CC_CORE_V_4_0_4
   11.91 +    bool
   11.92 +    prompt "4.0.4"
   11.93 +
   11.94 +config CC_CORE_V_4_1_0
   11.95 +    bool
   11.96 +    prompt "4.1.0"
   11.97 +
   11.98 +config CC_CORE_V_4_1_1
   11.99 +    bool
  11.100 +    prompt "4.1.1"
  11.101 +
  11.102 +# CT_INSERT_VERSION_ABOVE
  11.103 +# Don't remove above line!
  11.104 +endchoice
  11.105 +
  11.106 +config CC_CORE_VERSION
  11.107 +    string
  11.108 +    default "2.95.3" if CC_CORE_V_2_95_3
  11.109 +    default "3.2.3" if CC_CORE_V_3_2_3
  11.110 +    default "3.3" if CC_CORE_V_3_3
  11.111 +    default "3.3.1" if CC_CORE_V_3_3_1
  11.112 +    default "3.3.2" if CC_CORE_V_3_3_2
  11.113 +    default "3.3.3" if CC_CORE_V_3_3_3
  11.114 +    default "3.3.4" if CC_CORE_V_3_3_4
  11.115 +    default "3.3.5" if CC_CORE_V_3_3_5
  11.116 +    default "3.3.6" if CC_CORE_V_3_3_6
  11.117 +    default "3.4.0" if CC_CORE_V_3_4_0
  11.118 +    default "3.4.1" if CC_CORE_V_3_4_1
  11.119 +    default "3.4.2" if CC_CORE_V_3_4_2
  11.120 +    default "3.4.3" if CC_CORE_V_3_4_3
  11.121 +    default "3.4.4" if CC_CORE_V_3_4_4
  11.122 +    default "3.4.5" if CC_CORE_V_3_4_5
  11.123 +    default "3.4.6" if CC_CORE_V_3_4_6
  11.124 +    default "4.0.0" if CC_CORE_V_4_0_0
  11.125 +    default "4.0.1" if CC_CORE_V_4_0_1
  11.126 +    default "4.0.2" if CC_CORE_V_4_0_2
  11.127 +    default "4.0.3" if CC_CORE_V_4_0_3
  11.128 +    default "4.0.4" if CC_CORE_V_4_0_4
  11.129 +    default "4.1.0" if CC_CORE_V_4_1_0
  11.130 +    default "4.1.1" if CC_CORE_V_4_1_1
  11.131 +# CT_INSERT_VERSION_STRING_ABOVE
  11.132 +# Don't remove above line!
  11.133 +
  11.134 +config CC_CORE_EXTRA_CONFIG
  11.135 +    string
  11.136 +    prompt "Core gcc extra config"
  11.137 +    default ""
  11.138 +    depends on CC_USE_CORE && CC_CORE_GCC || ! CC_USE_CORE && CC_GCC
  11.139 +    help
  11.140 +      Extra flags to pass onto ./configure when configuring the core gcc.
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/config/cc_gcc.in	Sat Feb 24 11:00:05 2007 +0000
    12.3 @@ -0,0 +1,131 @@
    12.4 +# Compiler options
    12.5 +
    12.6 +choice
    12.7 +    bool
    12.8 +    prompt "Final gcc version"
    12.9 +
   12.10 +config CC_V_2_95_3
   12.11 +    bool
   12.12 +    prompt "2.95.3"
   12.13 +
   12.14 +config CC_V_3_2_3
   12.15 +    bool
   12.16 +    prompt "3.2.3"
   12.17 +
   12.18 +config CC_V_3_3
   12.19 +    bool
   12.20 +    prompt "3.3"
   12.21 +
   12.22 +config CC_V_3_3_1
   12.23 +    bool
   12.24 +    prompt "3.3.1"
   12.25 +
   12.26 +config CC_V_3_3_2
   12.27 +    bool
   12.28 +    prompt "3.3.2"
   12.29 +
   12.30 +config CC_V_3_3_3
   12.31 +    bool
   12.32 +    prompt "3.3.3"
   12.33 +
   12.34 +config CC_V_3_3_4
   12.35 +    bool
   12.36 +    prompt "3.3.4"
   12.37 +
   12.38 +config CC_V_3_3_5
   12.39 +    bool
   12.40 +    prompt "3.3.5"
   12.41 +
   12.42 +config CC_V_3_3_6
   12.43 +    bool
   12.44 +    prompt "3.3.6"
   12.45 +
   12.46 +config CC_V_3_4_0
   12.47 +    bool
   12.48 +    prompt "3.4.0"
   12.49 +
   12.50 +config CC_V_3_4_1
   12.51 +    bool
   12.52 +    prompt "3.4.1"
   12.53 +
   12.54 +config CC_V_3_4_2
   12.55 +    bool
   12.56 +    prompt "3.4.2"
   12.57 +
   12.58 +config CC_V_3_4_3
   12.59 +    bool
   12.60 +    prompt "3.4.3"
   12.61 +
   12.62 +config CC_V_3_4_4
   12.63 +    bool
   12.64 +    prompt "3.4.4"
   12.65 +
   12.66 +config CC_V_3_4_5
   12.67 +    bool
   12.68 +    prompt "3.4.5"
   12.69 +
   12.70 +config CC_V_4_0_0
   12.71 +    bool
   12.72 +    prompt "4.0.0"
   12.73 +
   12.74 +config CC_V_4_0_1
   12.75 +    bool
   12.76 +    prompt "4.0.1"
   12.77 +
   12.78 +config CC_V_4_0_2
   12.79 +    bool
   12.80 +    prompt "4.0.2"
   12.81 +
   12.82 +config CC_V_4_0_3
   12.83 +    bool
   12.84 +    prompt "4.0.3"
   12.85 +
   12.86 +config CC_V_4_0_4
   12.87 +    bool
   12.88 +    prompt "4.0.4"
   12.89 +
   12.90 +config CC_V_4_1_0
   12.91 +    bool
   12.92 +    prompt "4.1.0"
   12.93 +
   12.94 +config CC_V_4_1_1
   12.95 +    bool
   12.96 +    prompt "4.1.1"
   12.97 +
   12.98 +# CT_INSERT_VERSION_ABOVE
   12.99 +# Don't remove above line!
  12.100 +endchoice
  12.101 +
  12.102 +config CC_VERSION
  12.103 +    string
  12.104 +    default "2.95.3" if CC_V_2_95_3
  12.105 +    default "3.2.3" if CC_V_3_2_3
  12.106 +    default "3.3" if CC_V_3_3
  12.107 +    default "3.3.1" if CC_V_3_3_1
  12.108 +    default "3.3.2" if CC_V_3_3_2
  12.109 +    default "3.3.3" if CC_V_3_3_3
  12.110 +    default "3.3.4" if CC_V_3_3_4
  12.111 +    default "3.3.5" if CC_V_3_3_5
  12.112 +    default "3.3.6" if CC_V_3_3_6
  12.113 +    default "3.4.0" if CC_V_3_4_0
  12.114 +    default "3.4.1" if CC_V_3_4_1
  12.115 +    default "3.4.2" if CC_V_3_4_2
  12.116 +    default "3.4.3" if CC_V_3_4_3
  12.117 +    default "3.4.4" if CC_V_3_4_4
  12.118 +    default "3.4.5" if CC_V_3_4_5
  12.119 +    default "4.0.0" if CC_V_4_0_0
  12.120 +    default "4.0.1" if CC_V_4_0_1
  12.121 +    default "4.0.2" if CC_V_4_0_2
  12.122 +    default "4.0.3" if CC_V_4_0_3
  12.123 +    default "4.0.4" if CC_V_4_0_4
  12.124 +    default "4.1.0" if CC_V_4_1_0
  12.125 +    default "4.1.1" if CC_V_4_1_1
  12.126 +# CT_INSERT_VERSION_STRING_ABOVE
  12.127 +# Don't remove above line!
  12.128 +
  12.129 +config CC_EXTRA_CONFIG
  12.130 +    string
  12.131 +    prompt "Final gcc extra config"
  12.132 +    default ""
  12.133 +    help
  12.134 +      Extra flags to pass onto ./configure when configuring gcc.
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/config/config.in	Sat Feb 24 11:00:05 2007 +0000
    13.3 @@ -0,0 +1,6 @@
    13.4 +source config/global.in
    13.5 +source config/target.in
    13.6 +source config/kernel.in
    13.7 +source config/binutils.in
    13.8 +source config/cc.in
    13.9 +source config/libc.in
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/config/global.in	Sat Feb 24 11:00:05 2007 +0000
    14.3 @@ -0,0 +1,256 @@
    14.4 +# Overall toolchain configuration: paths, jobs, etc...
    14.5 +
    14.6 +menu "Paths and misc options"
    14.7 +
    14.8 +config PARALLEL_JOBS
    14.9 +    int
   14.10 +    prompt "Number of parallel jobs"
   14.11 +    default 1
   14.12 +    help
   14.13 +      Number of jobs make will be allowed to run concurently.
   14.14 +      Set this higher than the number of processors you have, but not too high.
   14.15 +      A good rule of thumb is twice the number of processors you have.
   14.16 +      
   14.17 +      Enter 1 (or 0) to have only one job at a time.
   14.18 +
   14.19 +config LOAD
   14.20 +    int
   14.21 +    prompt "Maximum allowed load"
   14.22 +    default 0
   14.23 +    help
   14.24 +      Specifies that no new jobs should be started if there are others jobs
   14.25 +      running and the load average is at least this value.
   14.26 +      
   14.27 +      Makes sense on SMP machines only.
   14.28 +      
   14.29 +      Enter 0 to have no limit on the load average.
   14.30 +      
   14.31 +      Note: only the integer part of the load is allowed here (you can't enter
   14.32 +            0.75 for example).
   14.33 +
   14.34 +config NICE
   14.35 +    int
   14.36 +    prompt "Nice level"
   14.37 +    default 0
   14.38 +    range 0 19
   14.39 +    help
   14.40 +      Renices the build process up.
   14.41 +
   14.42 +config USE_PIPES
   14.43 +    bool
   14.44 +    prompt "Use -pipe"
   14.45 +    default y
   14.46 +    help
   14.47 +      Use gcc's option -pipe to use pipes rather than temp files when building
   14.48 +      the toolchain.
   14.49 +
   14.50 +comment "Paths"
   14.51 +
   14.52 +config TARBALLS_DIR
   14.53 +    string
   14.54 +    prompt "Tarballs directory"
   14.55 +    default "`pwd`/tarballs"
   14.56 +    help
   14.57 +      This is the directory into which tarballs are going to be stored once
   14.58 +      they are downloaded (or otherwise retrieved).
   14.59 +
   14.60 +config SRC_DIR
   14.61 +    string
   14.62 +    prompt "Extract directory"
   14.63 +    default "`pwd`/${CT_TARGET}/src"
   14.64 +    help
   14.65 +      This is the directory into which tarballs will be extracted.
   14.66 +      
   14.67 +      If you will build multiple toolchains, you should arrange to have one
   14.68 +      SRC_DIR for each toolchain, as different targets may require different
   14.69 +      patches to be applied.
   14.70 +
   14.71 +config BUILD_DIR
   14.72 +    string
   14.73 +    prompt "Build directory"
   14.74 +    default "`pwd`/${CT_TARGET}/gcc-${CT_CC_VERSION}-${CT_LIBC}-${CT_LIBC_VERSION}"
   14.75 +    help
   14.76 +      This is the directory into which builds will occur.
   14.77 +      
   14.78 +      Once again, arrange for one build directory for each toolchain you build,
   14.79 +      to avoid collision.
   14.80 +
   14.81 +config PREFIX_DIR
   14.82 +    string
   14.83 +    prompt "Prefix directory"
   14.84 +    default "${HOME}/${CT_TARGET}"
   14.85 +    help
   14.86 +      This is the path the toolchain will run from.
   14.87 +
   14.88 +config INSTALL_DIR
   14.89 +    string
   14.90 +#    prompt "Install directory"
   14.91 +    default "${CT_PREFIX_DIR}"
   14.92 +#    help
   14.93 +#      This is the path the target will be installed into.
   14.94 +#      
   14.95 +#      Normally, you would set this to ${CT_PREFIX_DIR}, but if for some reasons
   14.96 +#      you can't write there, you can install somewhere else and have a third
   14.97 +#      person do the install for you.
   14.98 +#      The reason you might also want to install elsewhere is if you are going
   14.99 +#      to package your shinny new toolchain for distribution.
  14.100 +
  14.101 +config CUSTOM_PATCH
  14.102 +    bool
  14.103 +    prompt "Use custom patch directory"
  14.104 +    default n
  14.105 +    help
  14.106 +      If you have custom patches that you want to be applied, say 'Y' here and
  14.107 +      enter the path directory below.
  14.108 +      
  14.109 +      Note that you must ensure that the patch directory is arranged the same
  14.110 +      way the official directory is.
  14.111 +
  14.112 +config CUSTOM_PATCH_ONLY
  14.113 +    bool
  14.114 +    prompt "Only use custom patches"
  14.115 +    default n
  14.116 +    depends on CUSTOM_PATCH
  14.117 +    help
  14.118 +      Don't apply patches coming with CT-NG, only those patches available in
  14.119 +      the directory below.
  14.120 +      
  14.121 +      If you say 'N' here, then the patches provided with CT-NG will be applied
  14.122 +      first, and then your patches.
  14.123 +
  14.124 +config CUSTOM_PATCH_DIR
  14.125 +    string
  14.126 +    prompt "Custom patch directory"
  14.127 +    default ""
  14.128 +    depends on CUSTOM_PATCH
  14.129 +    help
  14.130 +      Enter the custom patch directory here.
  14.131 +
  14.132 +comment "Downloading and extracting"
  14.133 +
  14.134 +config NO_DOWNLOAD
  14.135 +    bool
  14.136 +    prompt "Avoid downloads"
  14.137 +    default n
  14.138 +    help
  14.139 +      Avoid downloading anything. Bail out if a tarball is missing.
  14.140 +
  14.141 +config ONLY_DOWNLOAD
  14.142 +    bool
  14.143 +    prompt "Only download tarballs"
  14.144 +    default n
  14.145 +    depends on ! NO_DOWNLOAD
  14.146 +    help
  14.147 +      Only download the tarballs. Exit once it done.
  14.148 +      
  14.149 +      Usefull to pre-retrieve the tarballs before going off-line.
  14.150 +
  14.151 +config FORCE_DOWNLOAD
  14.152 +    bool
  14.153 +    prompt "Force downloads"
  14.154 +    default n
  14.155 +    depends on ! NO_DOWNLOAD
  14.156 +    help
  14.157 +      Force downloading tarballs, even if one already exists.
  14.158 +      Usefull if you suspect a tarball to be damaged.
  14.159 +
  14.160 +config FORCE_EXTRACT
  14.161 +    bool
  14.162 +    prompt "Force extractions"
  14.163 +    depends on ! ONLY_DOWNLOAD
  14.164 +    default n
  14.165 +    help
  14.166 +      Force extraction of already exctracted tarballs.
  14.167 +      
  14.168 +      Usefull if you suspect a previous extract did not complete (eg. broken
  14.169 +      tarball), or you added a new set of patches for this component.
  14.170 +
  14.171 +comment "Logging"
  14.172 +
  14.173 +choice
  14.174 +    bool
  14.175 +    prompt "Maximum log level to see:"
  14.176 +    default LOG_INFO
  14.177 +
  14.178 +config LOG_ERROR
  14.179 +    bool
  14.180 +    prompt "ERROR"
  14.181 +    help
  14.182 +      The build will be silent.
  14.183 +      Only if there is an error will you see a mesage.
  14.184 +
  14.185 +config LOG_WARN
  14.186 +    bool
  14.187 +    prompt "WARN"
  14.188 +    help
  14.189 +      The same as above, plus warnings.
  14.190 +
  14.191 +config LOG_INFO
  14.192 +    bool
  14.193 +    prompt "INFO"
  14.194 +    help
  14.195 +      The same as above, plus informational messages (main steps).
  14.196 +
  14.197 +config LOG_EXTRA
  14.198 +    bool
  14.199 +    prompt "EXTRA"
  14.200 +    help
  14.201 +      The same as above, plus extra messages (sub-steps).
  14.202 +
  14.203 +config LOG_DEBUG
  14.204 +    bool
  14.205 +    prompt "DEBUG"
  14.206 +    help
  14.207 +      The same as above, plus lots of debug information, of which each
  14.208 +      component's build messages (very noisy!).
  14.209 +
  14.210 +endchoice
  14.211 +
  14.212 +config LOG_LEVEL_MAX
  14.213 +    string
  14.214 +    default "ERROR"   if LOG_ERROR
  14.215 +    default "WARN"    if LOG_WARN
  14.216 +    default "INFO"    if LOG_INFO
  14.217 +    default "EXTRA"   if LOG_EXTRA
  14.218 +    default "DEBUG"   if LOG_DEBUG
  14.219 +
  14.220 +config LOG_PROGRESS_BAR
  14.221 +    bool
  14.222 +    prompt "Progress bar"
  14.223 +    default n
  14.224 +    depends on ! LOG_DEBUG
  14.225 +    help
  14.226 +      This option will print a "rotating bar" (/-\|) below the last log line
  14.227 +      to show work is not stalled.
  14.228 +      
  14.229 +      Available when not in DEBUG log level.
  14.230 +
  14.231 +config LOG_USE_COLORS
  14.232 +    bool
  14.233 +    prompt "Use colors for logging to console"
  14.234 +    default n
  14.235 +    help
  14.236 +      Use colors to highlight important messages.
  14.237 +      ERROR: bright red
  14.238 +      WARN : bright yellow
  14.239 +      INFO : bright green
  14.240 +      EXTRA: dim green
  14.241 +      DEBUG: dim white
  14.242 +
  14.243 +config LOG_TO_FILE
  14.244 +    bool
  14.245 +    prompt "Log to a file"
  14.246 +    default y
  14.247 +    help
  14.248 +      Save *full* logs to a file. Even log levels you didn't specify above
  14.249 +      will be available in this file.
  14.250 +
  14.251 +config LOG_FILE
  14.252 +    string
  14.253 +    prompt "Log file"
  14.254 +    default "${CT_PREFIX_DIR}/${CT_TARGET}.log"
  14.255 +    depends on LOG_TO_FILE
  14.256 +    help
  14.257 +      File name into which to put logs.
  14.258 +
  14.259 +endmenu
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/config/kernel.in	Sat Feb 24 11:00:05 2007 +0000
    15.3 @@ -0,0 +1,36 @@
    15.4 +# Kernel options
    15.5 +
    15.6 +menu "Kernel"
    15.7 +
    15.8 +choice
    15.9 +    bool
   15.10 +    prompt "\"Kernel\" to use:"
   15.11 +    default KERNEL_LINUX
   15.12 +
   15.13 +config KERNEL_LINUX
   15.14 +    bool
   15.15 +    prompt "linux"
   15.16 +    help
   15.17 +      Build a toolchain targeting systems running Linux as a kernel.
   15.18 +
   15.19 +config KERNEL_CYGWIN
   15.20 +    bool
   15.21 +    prompt "cygwin"
   15.22 +    depends on ARCH_x86 || ARCH_x86_64
   15.23 +    help
   15.24 +      Build a toolchain targeting systems running Windows/cygwin as a kernel.
   15.25 +
   15.26 +endchoice
   15.27 +
   15.28 +config KERNEL_VERSION
   15.29 +    string
   15.30 +
   15.31 +if KERNEL_LINUX
   15.32 +source config/kernel_linux.in
   15.33 +endif
   15.34 +
   15.35 +if KERNEL_CYGWIN
   15.36 +source config/kernel_cygwin.in
   15.37 +endif
   15.38 +
   15.39 +endmenu
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/config/kernel_cygwin.in	Sat Feb 24 11:00:05 2007 +0000
    16.3 @@ -0,0 +1,5 @@
    16.4 +# Cygwin 'kernel' options
    16.5 +
    16.6 +config KERNEL
    16.7 +    string
    16.8 +    default "cygwin"
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/config/kernel_linux.in	Sat Feb 24 11:00:05 2007 +0000
    17.3 @@ -0,0 +1,102 @@
    17.4 +# Linux kernel options
    17.5 +
    17.6 +choice
    17.7 +    bool
    17.8 +    prompt "Get kernel headers from:"
    17.9 +
   17.10 +config KERNEL_LINUX_HEADERS_INSTALL
   17.11 +    bool
   17.12 +    prompt "kernel's 'headers_install'"
   17.13 +    help
   17.14 +      This will make use of the new headers_install rule in recent kernels.
   17.15 +      This is most probably what you want to use.
   17.16 +
   17.17 +config KERNEL_LINUX_HEADERS_SANITISED
   17.18 +    bool
   17.19 +    prompt "Mazur's sanitized headers (OBSOLETE)"
   17.20 +    help
   17.21 +      M. Mazur used to maintain a tree of sanitised headers, but it is now
   17.22 +      obsoleted by the headers_install rule (above), and has not seen eny
   17.23 +      update since 2.6.12
   17.24 +
   17.25 +config KERNEL_LINUX_HEADERS_COPY
   17.26 +    bool
   17.27 +    prompt "pure kernel headers (NOT RECOMMENDED)"
   17.28 +    help
   17.29 +      This will simply copy the kernel headers to the toolchain.
   17.30 +
   17.31 +      You do NOT want this. It's badly broken because it leaks kernel internals
   17.32 +      to userspace.
   17.33 +
   17.34 +endchoice
   17.35 +
   17.36 +config KERNEL
   17.37 +    string
   17.38 +    default "linux" if KERNEL_LINUX_HEADERS_INSTALL || KERNEL_LINUX_HEADERS_COPY
   17.39 +    default "linux-libc-headers" if KERNEL_LINUX_HEADERS_SANITISED
   17.40 +
   17.41 +config KERNEL_VERSION_SEE_EXTRAVERSION
   17.42 +    bool
   17.43 +    prompt "See extra versions"
   17.44 +    default n
   17.45 +    depends on ! KERNEL_LINUX_HEADERS_SANITISED
   17.46 +    help
   17.47 +      See extra versions (kernel with 4 numbers, eg 2.6.19.1).
   17.48 +
   17.49 +      If you say 'no', you'll only see sub-level, 3-digit versions.
   17.50 +      If you say 'yes', you'll see far more versions!
   17.51 +
   17.52 +      It is recommended that you say 'no', unless you _*know*_
   17.53 +      that an extra version fixes a headers bug.
   17.54 +
   17.55 +if KERNEL_LINUX_HEADERS_INSTALL
   17.56 +source config/kernel_linux_headers_install.in
   17.57 +endif
   17.58 +
   17.59 +if KERNEL_LINUX_HEADERS_COPY
   17.60 +source config/kernel_linux_headers_copy.in
   17.61 +endif
   17.62 +
   17.63 +if KERNEL_LINUX_HEADERS_SANITISED
   17.64 +source config/kernel_linux_headers_sanitised.in
   17.65 +endif
   17.66 +
   17.67 +choice
   17.68 +    bool
   17.69 +    prompt "Kernel verbosity:"
   17.70 +    default KERNEL_LINUX_VERBOSITY_0
   17.71 +
   17.72 +config KERNEL_LINUX_VERBOSITY_0
   17.73 +    bool
   17.74 +    prompt "Simplified"
   17.75 +    help
   17.76 +      Print simplified command lines.
   17.77 +
   17.78 +config KERNEL_LINUX_VERBOSITY_1
   17.79 +    bool
   17.80 +    prompt "Full commands"
   17.81 +    help
   17.82 +      Print full command lines.
   17.83 +
   17.84 +config KERNEL_LINUX_VERBOSITY_2
   17.85 +    bool
   17.86 +    prompt "Exec reasons"
   17.87 +    help
   17.88 +      Print the reasons why a make target is rebuild.
   17.89 +
   17.90 +endchoice
   17.91 +
   17.92 +config KERNEL_LINUX_VERBOSE_LEVEL
   17.93 +    int
   17.94 +    default 0 if KERNEL_LINUX_VERBOSITY_0
   17.95 +    default 1 if KERNEL_LINUX_VERBOSITY_1
   17.96 +    default 2 if KERNEL_LINUX_VERBOSITY_2
   17.97 +
   17.98 +config KERNEL_LINUX_CONFIG_FILE
   17.99 +    string
  17.100 +    prompt "Configuration file"
  17.101 +    default ""
  17.102 +    help
  17.103 +      Path to the kernel configuration file.
  17.104 +      
  17.105 +      You _must_ provide one (for now).
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/config/kernel_linux_headers_copy.in	Sat Feb 24 11:00:05 2007 +0000
    18.3 @@ -0,0 +1,682 @@
    18.4 +choice
    18.5 +    bool
    18.6 +    prompt "Linux kernel version"
    18.7 +
    18.8 +config KERNEL_COPY_V_2_6_0
    18.9 +    bool
   18.10 +    prompt "2.6.0"
   18.11 +
   18.12 +config KERNEL_COPY_V_2_6_1
   18.13 +    bool
   18.14 +    prompt "2.6.1"
   18.15 +
   18.16 +config KERNEL_COPY_V_2_6_2
   18.17 +    bool
   18.18 +    prompt "2.6.2"
   18.19 +
   18.20 +config KERNEL_COPY_V_2_6_3
   18.21 +    bool
   18.22 +    prompt "2.6.3"
   18.23 +
   18.24 +config KERNEL_COPY_V_2_6_4
   18.25 +    bool
   18.26 +    prompt "2.6.4"
   18.27 +
   18.28 +config KERNEL_COPY_V_2_6_5
   18.29 +    bool
   18.30 +    prompt "2.6.5"
   18.31 +
   18.32 +config KERNEL_COPY_V_2_6_6
   18.33 +    bool
   18.34 +    prompt "2.6.6"
   18.35 +
   18.36 +config KERNEL_COPY_V_2_6_7
   18.37 +    bool
   18.38 +    prompt "2.6.7"
   18.39 +
   18.40 +config KERNEL_COPY_V_2_6_8
   18.41 +    bool
   18.42 +    prompt "2.6.8"
   18.43 +
   18.44 +config KERNEL_COPY_V_2_6_8_1
   18.45 +    bool
   18.46 +    prompt "2.6.8.1"
   18.47 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   18.48 +
   18.49 +config KERNEL_COPY_V_2_6_9
   18.50 +    bool
   18.51 +    prompt "2.6.9"
   18.52 +
   18.53 +config KERNEL_COPY_V_2_6_10
   18.54 +    bool
   18.55 +    prompt "2.6.10"
   18.56 +
   18.57 +config KERNEL_COPY_V_2_6_11
   18.58 +    bool
   18.59 +    prompt "2.6.11"
   18.60 +
   18.61 +config KERNEL_COPY_V_2_6_11_1
   18.62 +    bool
   18.63 +    prompt "2.6.11.1"
   18.64 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   18.65 +
   18.66 +config KERNEL_COPY_V_2_6_11_10
   18.67 +    bool
   18.68 +    prompt "2.6.11.10"
   18.69 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   18.70 +
   18.71 +config KERNEL_COPY_V_2_6_11_11
   18.72 +    bool
   18.73 +    prompt "2.6.11.11"
   18.74 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   18.75 +
   18.76 +config KERNEL_COPY_V_2_6_11_12
   18.77 +    bool
   18.78 +    prompt "2.6.11.12"
   18.79 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   18.80 +
   18.81 +config KERNEL_COPY_V_2_6_11_2
   18.82 +    bool
   18.83 +    prompt "2.6.11.2"
   18.84 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   18.85 +
   18.86 +config KERNEL_COPY_V_2_6_11_3
   18.87 +    bool
   18.88 +    prompt "2.6.11.3"
   18.89 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   18.90 +
   18.91 +config KERNEL_COPY_V_2_6_11_4
   18.92 +    bool
   18.93 +    prompt "2.6.11.4"
   18.94 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   18.95 +
   18.96 +config KERNEL_COPY_V_2_6_11_5
   18.97 +    bool
   18.98 +    prompt "2.6.11.5"
   18.99 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.100 +
  18.101 +config KERNEL_COPY_V_2_6_11_6
  18.102 +    bool
  18.103 +    prompt "2.6.11.6"
  18.104 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.105 +
  18.106 +config KERNEL_COPY_V_2_6_11_7
  18.107 +    bool
  18.108 +    prompt "2.6.11.7"
  18.109 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.110 +
  18.111 +config KERNEL_COPY_V_2_6_11_8
  18.112 +    bool
  18.113 +    prompt "2.6.11.8"
  18.114 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.115 +
  18.116 +config KERNEL_COPY_V_2_6_11_9
  18.117 +    bool
  18.118 +    prompt "2.6.11.9"
  18.119 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.120 +
  18.121 +config KERNEL_COPY_V_2_6_12
  18.122 +    bool
  18.123 +    prompt "2.6.12"
  18.124 +
  18.125 +config KERNEL_COPY_V_2_6_12_1
  18.126 +    bool
  18.127 +    prompt "2.6.12.1"
  18.128 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.129 +
  18.130 +config KERNEL_COPY_V_2_6_12_2
  18.131 +    bool
  18.132 +    prompt "2.6.12.2"
  18.133 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.134 +
  18.135 +config KERNEL_COPY_V_2_6_12_3
  18.136 +    bool
  18.137 +    prompt "2.6.12.3"
  18.138 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.139 +
  18.140 +config KERNEL_COPY_V_2_6_12_4
  18.141 +    bool
  18.142 +    prompt "2.6.12.4"
  18.143 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.144 +
  18.145 +config KERNEL_COPY_V_2_6_12_5
  18.146 +    bool
  18.147 +    prompt "2.6.12.5"
  18.148 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.149 +
  18.150 +config KERNEL_COPY_V_2_6_12_6
  18.151 +    bool
  18.152 +    prompt "2.6.12.6"
  18.153 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.154 +
  18.155 +config KERNEL_COPY_V_2_6_13
  18.156 +    bool
  18.157 +    prompt "2.6.13"
  18.158 +
  18.159 +config KERNEL_COPY_V_2_6_13_1
  18.160 +    bool
  18.161 +    prompt "2.6.13.1"
  18.162 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.163 +
  18.164 +config KERNEL_COPY_V_2_6_13_2
  18.165 +    bool
  18.166 +    prompt "2.6.13.2"
  18.167 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.168 +
  18.169 +config KERNEL_COPY_V_2_6_13_3
  18.170 +    bool
  18.171 +    prompt "2.6.13.3"
  18.172 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.173 +
  18.174 +config KERNEL_COPY_V_2_6_13_4
  18.175 +    bool
  18.176 +    prompt "2.6.13.4"
  18.177 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.178 +
  18.179 +config KERNEL_COPY_V_2_6_13_5
  18.180 +    bool
  18.181 +    prompt "2.6.13.5"
  18.182 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.183 +
  18.184 +config KERNEL_COPY_V_2_6_14
  18.185 +    bool
  18.186 +    prompt "2.6.14"
  18.187 +
  18.188 +config KERNEL_COPY_V_2_6_14_1
  18.189 +    bool
  18.190 +    prompt "2.6.14.1"
  18.191 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.192 +
  18.193 +config KERNEL_COPY_V_2_6_14_2
  18.194 +    bool
  18.195 +    prompt "2.6.14.2"
  18.196 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.197 +
  18.198 +config KERNEL_COPY_V_2_6_14_3
  18.199 +    bool
  18.200 +    prompt "2.6.14.3"
  18.201 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.202 +
  18.203 +config KERNEL_COPY_V_2_6_14_4
  18.204 +    bool
  18.205 +    prompt "2.6.14.4"
  18.206 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.207 +
  18.208 +config KERNEL_COPY_V_2_6_14_5
  18.209 +    bool
  18.210 +    prompt "2.6.14.5"
  18.211 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.212 +
  18.213 +config KERNEL_COPY_V_2_6_14_6
  18.214 +    bool
  18.215 +    prompt "2.6.14.6"
  18.216 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.217 +
  18.218 +config KERNEL_COPY_V_2_6_14_7
  18.219 +    bool
  18.220 +    prompt "2.6.14.7"
  18.221 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.222 +
  18.223 +config KERNEL_COPY_V_2_6_15
  18.224 +    bool
  18.225 +    prompt "2.6.15"
  18.226 +
  18.227 +config KERNEL_COPY_V_2_6_15_1
  18.228 +    bool
  18.229 +    prompt "2.6.15.1"
  18.230 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.231 +
  18.232 +config KERNEL_COPY_V_2_6_15_2
  18.233 +    bool
  18.234 +    prompt "2.6.15.2"
  18.235 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.236 +
  18.237 +config KERNEL_COPY_V_2_6_15_3
  18.238 +    bool
  18.239 +    prompt "2.6.15.3"
  18.240 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.241 +
  18.242 +config KERNEL_COPY_V_2_6_15_4
  18.243 +    bool
  18.244 +    prompt "2.6.15.4"
  18.245 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.246 +
  18.247 +config KERNEL_COPY_V_2_6_15_5
  18.248 +    bool
  18.249 +    prompt "2.6.15.5"
  18.250 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.251 +
  18.252 +config KERNEL_COPY_V_2_6_15_6
  18.253 +    bool
  18.254 +    prompt "2.6.15.6"
  18.255 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.256 +
  18.257 +config KERNEL_COPY_V_2_6_15_7
  18.258 +    bool
  18.259 +    prompt "2.6.15.7"
  18.260 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.261 +
  18.262 +config KERNEL_COPY_V_2_6_16
  18.263 +    bool
  18.264 +    prompt "2.6.16"
  18.265 +
  18.266 +config KERNEL_COPY_V_2_6_16_1
  18.267 +    bool
  18.268 +    prompt "2.6.16.1"
  18.269 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.270 +
  18.271 +config KERNEL_COPY_V_2_6_16_10
  18.272 +    bool
  18.273 +    prompt "2.6.16.10"
  18.274 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.275 +
  18.276 +config KERNEL_COPY_V_2_6_16_11
  18.277 +    bool
  18.278 +    prompt "2.6.16.11"
  18.279 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.280 +
  18.281 +config KERNEL_COPY_V_2_6_16_12
  18.282 +    bool
  18.283 +    prompt "2.6.16.12"
  18.284 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.285 +
  18.286 +config KERNEL_COPY_V_2_6_16_13
  18.287 +    bool
  18.288 +    prompt "2.6.16.13"
  18.289 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.290 +
  18.291 +config KERNEL_COPY_V_2_6_16_14
  18.292 +    bool
  18.293 +    prompt "2.6.16.14"
  18.294 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.295 +
  18.296 +config KERNEL_COPY_V_2_6_16_15
  18.297 +    bool
  18.298 +    prompt "2.6.16.15"
  18.299 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.300 +
  18.301 +config KERNEL_COPY_V_2_6_16_16
  18.302 +    bool
  18.303 +    prompt "2.6.16.16"
  18.304 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.305 +
  18.306 +config KERNEL_COPY_V_2_6_16_17
  18.307 +    bool
  18.308 +    prompt "2.6.16.17"
  18.309 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.310 +
  18.311 +config KERNEL_COPY_V_2_6_16_18
  18.312 +    bool
  18.313 +    prompt "2.6.16.18"
  18.314 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.315 +
  18.316 +config KERNEL_COPY_V_2_6_16_19
  18.317 +    bool
  18.318 +    prompt "2.6.16.19"
  18.319 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.320 +
  18.321 +config KERNEL_COPY_V_2_6_16_2
  18.322 +    bool
  18.323 +    prompt "2.6.16.2"
  18.324 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.325 +
  18.326 +config KERNEL_COPY_V_2_6_16_20
  18.327 +    bool
  18.328 +    prompt "2.6.16.20"
  18.329 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.330 +
  18.331 +config KERNEL_COPY_V_2_6_16_21
  18.332 +    bool
  18.333 +    prompt "2.6.16.21"
  18.334 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.335 +
  18.336 +config KERNEL_COPY_V_2_6_16_22
  18.337 +    bool
  18.338 +    prompt "2.6.16.22"
  18.339 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.340 +
  18.341 +config KERNEL_COPY_V_2_6_16_23
  18.342 +    bool
  18.343 +    prompt "2.6.16.23"
  18.344 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.345 +
  18.346 +config KERNEL_COPY_V_2_6_16_24
  18.347 +    bool
  18.348 +    prompt "2.6.16.24"
  18.349 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.350 +
  18.351 +config KERNEL_COPY_V_2_6_16_25
  18.352 +    bool
  18.353 +    prompt "2.6.16.25"
  18.354 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.355 +
  18.356 +config KERNEL_COPY_V_2_6_16_26
  18.357 +    bool
  18.358 +    prompt "2.6.16.26"
  18.359 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.360 +
  18.361 +config KERNEL_COPY_V_2_6_16_27
  18.362 +    bool
  18.363 +    prompt "2.6.16.27"
  18.364 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.365 +
  18.366 +config KERNEL_COPY_V_2_6_16_28
  18.367 +    bool
  18.368 +    prompt "2.6.16.28"
  18.369 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.370 +
  18.371 +config KERNEL_COPY_V_2_6_16_29
  18.372 +    bool
  18.373 +    prompt "2.6.16.29"
  18.374 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.375 +
  18.376 +config KERNEL_COPY_V_2_6_16_3
  18.377 +    bool
  18.378 +    prompt "2.6.16.3"
  18.379 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.380 +
  18.381 +config KERNEL_COPY_V_2_6_16_30
  18.382 +    bool
  18.383 +    prompt "2.6.16.30"
  18.384 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.385 +
  18.386 +config KERNEL_COPY_V_2_6_16_31
  18.387 +    bool
  18.388 +    prompt "2.6.16.31"
  18.389 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.390 +
  18.391 +config KERNEL_COPY_V_2_6_16_32
  18.392 +    bool
  18.393 +    prompt "2.6.16.32"
  18.394 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.395 +
  18.396 +config KERNEL_COPY_V_2_6_16_33
  18.397 +    bool
  18.398 +    prompt "2.6.16.33"
  18.399 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.400 +
  18.401 +config KERNEL_COPY_V_2_6_16_34
  18.402 +    bool
  18.403 +    prompt "2.6.16.34"
  18.404 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.405 +
  18.406 +config KERNEL_COPY_V_2_6_16_35
  18.407 +    bool
  18.408 +    prompt "2.6.16.35"
  18.409 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.410 +
  18.411 +config KERNEL_COPY_V_2_6_16_36
  18.412 +    bool
  18.413 +    prompt "2.6.16.36"
  18.414 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.415 +
  18.416 +config KERNEL_COPY_V_2_6_16_4
  18.417 +    bool
  18.418 +    prompt "2.6.16.4"
  18.419 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.420 +
  18.421 +config KERNEL_COPY_V_2_6_16_5
  18.422 +    bool
  18.423 +    prompt "2.6.16.5"
  18.424 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.425 +
  18.426 +config KERNEL_COPY_V_2_6_16_6
  18.427 +    bool
  18.428 +    prompt "2.6.16.6"
  18.429 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.430 +
  18.431 +config KERNEL_COPY_V_2_6_16_7
  18.432 +    bool
  18.433 +    prompt "2.6.16.7"
  18.434 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.435 +
  18.436 +config KERNEL_COPY_V_2_6_16_8
  18.437 +    bool
  18.438 +    prompt "2.6.16.8"
  18.439 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.440 +
  18.441 +config KERNEL_COPY_V_2_6_16_9
  18.442 +    bool
  18.443 +    prompt "2.6.16.9"
  18.444 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.445 +
  18.446 +config KERNEL_COPY_V_2_6_17
  18.447 +    bool
  18.448 +    prompt "2.6.17"
  18.449 +
  18.450 +config KERNEL_COPY_V_2_6_17_1
  18.451 +    bool
  18.452 +    prompt "2.6.17.1"
  18.453 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.454 +
  18.455 +config KERNEL_COPY_V_2_6_17_10
  18.456 +    bool
  18.457 +    prompt "2.6.17.10"
  18.458 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.459 +
  18.460 +config KERNEL_COPY_V_2_6_17_11
  18.461 +    bool
  18.462 +    prompt "2.6.17.11"
  18.463 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.464 +
  18.465 +config KERNEL_COPY_V_2_6_17_12
  18.466 +    bool
  18.467 +    prompt "2.6.17.12"
  18.468 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.469 +
  18.470 +config KERNEL_COPY_V_2_6_17_13
  18.471 +    bool
  18.472 +    prompt "2.6.17.13"
  18.473 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.474 +
  18.475 +config KERNEL_COPY_V_2_6_17_14
  18.476 +    bool
  18.477 +    prompt "2.6.17.14"
  18.478 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.479 +
  18.480 +config KERNEL_COPY_V_2_6_17_2
  18.481 +    bool
  18.482 +    prompt "2.6.17.2"
  18.483 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.484 +
  18.485 +config KERNEL_COPY_V_2_6_17_3
  18.486 +    bool
  18.487 +    prompt "2.6.17.3"
  18.488 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.489 +
  18.490 +config KERNEL_COPY_V_2_6_17_4
  18.491 +    bool
  18.492 +    prompt "2.6.17.4"
  18.493 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.494 +
  18.495 +config KERNEL_COPY_V_2_6_17_5
  18.496 +    bool
  18.497 +    prompt "2.6.17.5"
  18.498 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.499 +
  18.500 +config KERNEL_COPY_V_2_6_17_6
  18.501 +    bool
  18.502 +    prompt "2.6.17.6"
  18.503 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.504 +
  18.505 +config KERNEL_COPY_V_2_6_17_7
  18.506 +    bool
  18.507 +    prompt "2.6.17.7"
  18.508 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.509 +
  18.510 +config KERNEL_COPY_V_2_6_17_8
  18.511 +    bool
  18.512 +    prompt "2.6.17.8"
  18.513 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.514 +
  18.515 +config KERNEL_COPY_V_2_6_17_9
  18.516 +    bool
  18.517 +    prompt "2.6.17.9"
  18.518 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.519 +
  18.520 +config KERNEL_COPY_V_2_6_18
  18.521 +    bool
  18.522 +    prompt "2.6.18"
  18.523 +
  18.524 +config KERNEL_COPY_V_2_6_18_1
  18.525 +    bool
  18.526 +    prompt "2.6.18.1"
  18.527 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.528 +
  18.529 +config KERNEL_COPY_V_2_6_18_2
  18.530 +    bool
  18.531 +    prompt "2.6.18.2"
  18.532 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.533 +
  18.534 +config KERNEL_COPY_V_2_6_18_3
  18.535 +    bool
  18.536 +    prompt "2.6.18.3"
  18.537 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.538 +
  18.539 +config KERNEL_COPY_V_2_6_18_4
  18.540 +    bool
  18.541 +    prompt "2.6.18.4"
  18.542 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.543 +
  18.544 +config KERNEL_COPY_V_2_6_18_5
  18.545 +    bool
  18.546 +    prompt "2.6.18.5"
  18.547 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.548 +
  18.549 +config KERNEL_COPY_V_2_6_18_6
  18.550 +    bool
  18.551 +    prompt "2.6.18.6"
  18.552 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.553 +
  18.554 +config KERNEL_COPY_V_2_6_19
  18.555 +    bool
  18.556 +    prompt "2.6.19"
  18.557 +
  18.558 +config KERNEL_COPY_V_2_6_19_1
  18.559 +    bool
  18.560 +    prompt "2.6.19.1"
  18.561 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
  18.562 +
  18.563 +# CT_INSERT_VERSION_ABOVE
  18.564 +# Don't remove above line!
  18.565 +endchoice
  18.566 +
  18.567 +config KERNEL_VERSION
  18.568 +    string
  18.569 +    default "2.6.0" if KERNEL_COPY_V_2_6_0
  18.570 +    default "2.6.1" if KERNEL_COPY_V_2_6_1
  18.571 +    default "2.6.2" if KERNEL_COPY_V_2_6_2
  18.572 +    default "2.6.3" if KERNEL_COPY_V_2_6_3
  18.573 +    default "2.6.4" if KERNEL_COPY_V_2_6_4
  18.574 +    default "2.6.5" if KERNEL_COPY_V_2_6_5
  18.575 +    default "2.6.6" if KERNEL_COPY_V_2_6_6
  18.576 +    default "2.6.7" if KERNEL_COPY_V_2_6_7
  18.577 +    default "2.6.8" if KERNEL_COPY_V_2_6_8
  18.578 +    default "2.6.8.1" if KERNEL_COPY_V_2_6_8_1
  18.579 +    default "2.6.9" if KERNEL_COPY_V_2_6_9
  18.580 +    default "2.6.10" if KERNEL_COPY_V_2_6_10
  18.581 +    default "2.6.11" if KERNEL_COPY_V_2_6_11
  18.582 +    default "2.6.11.1" if KERNEL_COPY_V_2_6_11_1
  18.583 +    default "2.6.11.10" if KERNEL_COPY_V_2_6_11_10
  18.584 +    default "2.6.11.11" if KERNEL_COPY_V_2_6_11_11
  18.585 +    default "2.6.11.12" if KERNEL_COPY_V_2_6_11_12
  18.586 +    default "2.6.11.2" if KERNEL_COPY_V_2_6_11_2
  18.587 +    default "2.6.11.3" if KERNEL_COPY_V_2_6_11_3
  18.588 +    default "2.6.11.4" if KERNEL_COPY_V_2_6_11_4
  18.589 +    default "2.6.11.5" if KERNEL_COPY_V_2_6_11_5
  18.590 +    default "2.6.11.6" if KERNEL_COPY_V_2_6_11_6
  18.591 +    default "2.6.11.7" if KERNEL_COPY_V_2_6_11_7
  18.592 +    default "2.6.11.8" if KERNEL_COPY_V_2_6_11_8
  18.593 +    default "2.6.11.9" if KERNEL_COPY_V_2_6_11_9
  18.594 +    default "2.6.12" if KERNEL_COPY_V_2_6_12
  18.595 +    default "2.6.12.1" if KERNEL_COPY_V_2_6_12_1
  18.596 +    default "2.6.12.2" if KERNEL_COPY_V_2_6_12_2
  18.597 +    default "2.6.12.3" if KERNEL_COPY_V_2_6_12_3
  18.598 +    default "2.6.12.4" if KERNEL_COPY_V_2_6_12_4
  18.599 +    default "2.6.12.5" if KERNEL_COPY_V_2_6_12_5
  18.600 +    default "2.6.12.6" if KERNEL_COPY_V_2_6_12_6
  18.601 +    default "2.6.13" if KERNEL_COPY_V_2_6_13
  18.602 +    default "2.6.13.1" if KERNEL_COPY_V_2_6_13_1
  18.603 +    default "2.6.13.2" if KERNEL_COPY_V_2_6_13_2
  18.604 +    default "2.6.13.3" if KERNEL_COPY_V_2_6_13_3
  18.605 +    default "2.6.13.4" if KERNEL_COPY_V_2_6_13_4
  18.606 +    default "2.6.13.5" if KERNEL_COPY_V_2_6_13_5
  18.607 +    default "2.6.14" if KERNEL_COPY_V_2_6_14
  18.608 +    default "2.6.14.1" if KERNEL_COPY_V_2_6_14_1
  18.609 +    default "2.6.14.2" if KERNEL_COPY_V_2_6_14_2
  18.610 +    default "2.6.14.3" if KERNEL_COPY_V_2_6_14_3
  18.611 +    default "2.6.14.4" if KERNEL_COPY_V_2_6_14_4
  18.612 +    default "2.6.14.5" if KERNEL_COPY_V_2_6_14_5
  18.613 +    default "2.6.14.6" if KERNEL_COPY_V_2_6_14_6
  18.614 +    default "2.6.14.7" if KERNEL_COPY_V_2_6_14_7
  18.615 +    default "2.6.15" if KERNEL_COPY_V_2_6_15
  18.616 +    default "2.6.15.1" if KERNEL_COPY_V_2_6_15_1
  18.617 +    default "2.6.15.2" if KERNEL_COPY_V_2_6_15_2
  18.618 +    default "2.6.15.3" if KERNEL_COPY_V_2_6_15_3
  18.619 +    default "2.6.15.4" if KERNEL_COPY_V_2_6_15_4
  18.620 +    default "2.6.15.5" if KERNEL_COPY_V_2_6_15_5
  18.621 +    default "2.6.15.6" if KERNEL_COPY_V_2_6_15_6
  18.622 +    default "2.6.15.7" if KERNEL_COPY_V_2_6_15_7
  18.623 +    default "2.6.16" if KERNEL_COPY_V_2_6_16
  18.624 +    default "2.6.16.1" if KERNEL_COPY_V_2_6_16_1
  18.625 +    default "2.6.16.10" if KERNEL_COPY_V_2_6_16_10
  18.626 +    default "2.6.16.11" if KERNEL_COPY_V_2_6_16_11
  18.627 +    default "2.6.16.12" if KERNEL_COPY_V_2_6_16_12
  18.628 +    default "2.6.16.13" if KERNEL_COPY_V_2_6_16_13
  18.629 +    default "2.6.16.14" if KERNEL_COPY_V_2_6_16_14
  18.630 +    default "2.6.16.15" if KERNEL_COPY_V_2_6_16_15
  18.631 +    default "2.6.16.16" if KERNEL_COPY_V_2_6_16_16
  18.632 +    default "2.6.16.17" if KERNEL_COPY_V_2_6_16_17
  18.633 +    default "2.6.16.18" if KERNEL_COPY_V_2_6_16_18
  18.634 +    default "2.6.16.19" if KERNEL_COPY_V_2_6_16_19
  18.635 +    default "2.6.16.2" if KERNEL_COPY_V_2_6_16_2
  18.636 +    default "2.6.16.20" if KERNEL_COPY_V_2_6_16_20
  18.637 +    default "2.6.16.21" if KERNEL_COPY_V_2_6_16_21
  18.638 +    default "2.6.16.22" if KERNEL_COPY_V_2_6_16_22
  18.639 +    default "2.6.16.23" if KERNEL_COPY_V_2_6_16_23
  18.640 +    default "2.6.16.24" if KERNEL_COPY_V_2_6_16_24
  18.641 +    default "2.6.16.25" if KERNEL_COPY_V_2_6_16_25
  18.642 +    default "2.6.16.26" if KERNEL_COPY_V_2_6_16_26
  18.643 +    default "2.6.16.27" if KERNEL_COPY_V_2_6_16_27
  18.644 +    default "2.6.16.28" if KERNEL_COPY_V_2_6_16_28
  18.645 +    default "2.6.16.29" if KERNEL_COPY_V_2_6_16_29
  18.646 +    default "2.6.16.3" if KERNEL_COPY_V_2_6_16_3
  18.647 +    default "2.6.16.30" if KERNEL_COPY_V_2_6_16_30
  18.648 +    default "2.6.16.31" if KERNEL_COPY_V_2_6_16_31
  18.649 +    default "2.6.16.32" if KERNEL_COPY_V_2_6_16_32
  18.650 +    default "2.6.16.33" if KERNEL_COPY_V_2_6_16_33
  18.651 +    default "2.6.16.34" if KERNEL_COPY_V_2_6_16_34
  18.652 +    default "2.6.16.35" if KERNEL_COPY_V_2_6_16_35
  18.653 +    default "2.6.16.36" if KERNEL_COPY_V_2_6_16_36
  18.654 +    default "2.6.16.4" if KERNEL_COPY_V_2_6_16_4
  18.655 +    default "2.6.16.5" if KERNEL_COPY_V_2_6_16_5
  18.656 +    default "2.6.16.6" if KERNEL_COPY_V_2_6_16_6
  18.657 +    default "2.6.16.7" if KERNEL_COPY_V_2_6_16_7
  18.658 +    default "2.6.16.8" if KERNEL_COPY_V_2_6_16_8
  18.659 +    default "2.6.16.9" if KERNEL_COPY_V_2_6_16_9
  18.660 +    default "2.6.17" if KERNEL_COPY_V_2_6_17
  18.661 +    default "2.6.17.1" if KERNEL_COPY_V_2_6_17_1
  18.662 +    default "2.6.17.10" if KERNEL_COPY_V_2_6_17_10
  18.663 +    default "2.6.17.11" if KERNEL_COPY_V_2_6_17_11
  18.664 +    default "2.6.17.12" if KERNEL_COPY_V_2_6_17_12
  18.665 +    default "2.6.17.13" if KERNEL_COPY_V_2_6_17_13
  18.666 +    default "2.6.17.14" if KERNEL_COPY_V_2_6_17_14
  18.667 +    default "2.6.17.2" if KERNEL_COPY_V_2_6_17_2
  18.668 +    default "2.6.17.3" if KERNEL_COPY_V_2_6_17_3
  18.669 +    default "2.6.17.4" if KERNEL_COPY_V_2_6_17_4
  18.670 +    default "2.6.17.5" if KERNEL_COPY_V_2_6_17_5
  18.671 +    default "2.6.17.6" if KERNEL_COPY_V_2_6_17_6
  18.672 +    default "2.6.17.7" if KERNEL_COPY_V_2_6_17_7
  18.673 +    default "2.6.17.8" if KERNEL_COPY_V_2_6_17_8
  18.674 +    default "2.6.17.9" if KERNEL_COPY_V_2_6_17_9
  18.675 +    default "2.6.18" if KERNEL_COPY_V_2_6_18
  18.676 +    default "2.6.18.1" if KERNEL_COPY_V_2_6_18_1
  18.677 +    default "2.6.18.2" if KERNEL_COPY_V_2_6_18_2
  18.678 +    default "2.6.18.3" if KERNEL_COPY_V_2_6_18_3
  18.679 +    default "2.6.18.4" if KERNEL_COPY_V_2_6_18_4
  18.680 +    default "2.6.18.5" if KERNEL_COPY_V_2_6_18_5
  18.681 +    default "2.6.18.6" if KERNEL_COPY_V_2_6_18_6
  18.682 +    default "2.6.19" if KERNEL_COPY_V_2_6_19
  18.683 +    default "2.6.19.1" if KERNEL_COPY_V_2_6_19_1
  18.684 +# CT_INSERT_VERSION_STRING_ABOVE
  18.685 +# Don't remove above line!
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/config/kernel_linux_headers_install.in	Sat Feb 24 11:00:05 2007 +0000
    19.3 @@ -0,0 +1,75 @@
    19.4 +choice
    19.5 +    bool
    19.6 +    prompt "Linux kernel version"
    19.7 +
    19.8 +config KERNEL_INSTALL_V_2_6_18
    19.9 +    bool
   19.10 +    prompt "2.6.18"
   19.11 +
   19.12 +config KERNEL_INSTALL_V_2_6_18_1
   19.13 +    bool
   19.14 +    prompt "2.6.18.1"
   19.15 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   19.16 +
   19.17 +config KERNEL_INSTALL_V_2_6_18_2
   19.18 +    bool
   19.19 +    prompt "2.6.18.2"
   19.20 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   19.21 +
   19.22 +config KERNEL_INSTALL_V_2_6_18_3
   19.23 +    bool
   19.24 +    prompt "2.6.18.3"
   19.25 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   19.26 +
   19.27 +config KERNEL_INSTALL_V_2_6_18_4
   19.28 +    bool
   19.29 +    prompt "2.6.18.4"
   19.30 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   19.31 +
   19.32 +config KERNEL_INSTALL_V_2_6_18_5
   19.33 +    bool
   19.34 +    prompt "2.6.18.5"
   19.35 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   19.36 +
   19.37 +config KERNEL_INSTALL_V_2_6_18_6
   19.38 +    bool
   19.39 +    prompt "2.6.18.6"
   19.40 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   19.41 +
   19.42 +config KERNEL_INSTALL_V_2_6_19
   19.43 +    bool
   19.44 +    prompt "2.6.19"
   19.45 +
   19.46 +config KERNEL_INSTALL_V_2_6_19_1
   19.47 +    bool
   19.48 +    prompt "2.6.19.1"
   19.49 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   19.50 +
   19.51 +config KERNEL_INSTALL_V_2_6_19_2
   19.52 +    bool
   19.53 +    prompt "2.6.19.2"
   19.54 +    depends on KERNEL_VERSION_SEE_EXTRAVERSION
   19.55 +
   19.56 +config KERNEL_INSTALL_V_2_6_20
   19.57 +    bool
   19.58 +    prompt "2.6.20"
   19.59 +
   19.60 +# CT_INSERT_VERSION_ABOVE
   19.61 +# Don't remove above line!
   19.62 +endchoice
   19.63 +
   19.64 +config KERNEL_VERSION
   19.65 +    string
   19.66 +    default "2.6.18" if KERNEL_INSTALL_V_2_6_18
   19.67 +    default "2.6.18.1" if KERNEL_INSTALL_V_2_6_18_1
   19.68 +    default "2.6.18.2" if KERNEL_INSTALL_V_2_6_18_2
   19.69 +    default "2.6.18.3" if KERNEL_INSTALL_V_2_6_18_3
   19.70 +    default "2.6.18.4" if KERNEL_INSTALL_V_2_6_18_4
   19.71 +    default "2.6.18.5" if KERNEL_INSTALL_V_2_6_18_5
   19.72 +    default "2.6.18.6" if KERNEL_INSTALL_V_2_6_18_6
   19.73 +    default "2.6.19" if KERNEL_INSTALL_V_2_6_19
   19.74 +    default "2.6.19.1" if KERNEL_INSTALL_V_2_6_19_1
   19.75 +    default "2.6.19.2" if KERNEL_INSTALL_V_2_6_19_2
   19.76 +    default "2.6.20" if KERNEL_INSTALL_V_2_6_20
   19.77 +# CT_INSERT_VERSION_STRING_ABOVE
   19.78 +# Don't remove above line!
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/config/kernel_linux_headers_sanitised.in	Sat Feb 24 11:00:05 2007 +0000
    20.3 @@ -0,0 +1,62 @@
    20.4 +choice
    20.5 +    bool
    20.6 +    prompt "Linux headers version"
    20.7 +
    20.8 +config KERNEL_SANITISED_V_2_6_7_0
    20.9 +    bool
   20.10 +    prompt "2.6.7.0"
   20.11 +
   20.12 +config KERNEL_SANITISED_V_2_6_8_0
   20.13 +    bool
   20.14 +    prompt "2.6.8.0"
   20.15 +
   20.16 +config KERNEL_SANITISED_V_2_6_8_1
   20.17 +    bool
   20.18 +    prompt "2.6.8.1"
   20.19 +
   20.20 +config KERNEL_SANITISED_V_2_6_9_0
   20.21 +    bool
   20.22 +    prompt "2.6.9.0"
   20.23 +
   20.24 +config KERNEL_SANITISED_V_2_6_9_1
   20.25 +    bool
   20.26 +    prompt "2.6.9.1"
   20.27 +
   20.28 +config KERNEL_SANITISED_V_2_6_10_0
   20.29 +    bool
   20.30 +    prompt "2.6.10.0"
   20.31 +
   20.32 +config KERNEL_SANITISED_V_2_6_11_0
   20.33 +    bool
   20.34 +    prompt "2.6.11.0"
   20.35 +
   20.36 +config KERNEL_SANITISED_V_2_6_11_1
   20.37 +    bool
   20.38 +    prompt "2.6.11.1"
   20.39 +
   20.40 +config KERNEL_SANITISED_V_2_6_11_2
   20.41 +    bool
   20.42 +    prompt "2.6.11.2"
   20.43 +
   20.44 +config KERNEL_SANITISED_V_2_6_12_0
   20.45 +    bool
   20.46 +    prompt "2.6.12.0"
   20.47 +
   20.48 +# CT_INSERT_VERSION_ABOVE
   20.49 +# Don't remove above line!
   20.50 +endchoice
   20.51 +
   20.52 +config KERNEL_VERSION
   20.53 +    string
   20.54 +    default "2.6.7.0" if KERNEL_SANITISED_V_2_6_7_0
   20.55 +    default "2.6.8.0" if KERNEL_SANITISED_V_2_6_8_0
   20.56 +    default "2.6.8.1" if KERNEL_SANITISED_V_2_6_8_1
   20.57 +    default "2.6.9.0" if KERNEL_SANITISED_V_2_6_9_0
   20.58 +    default "2.6.9.1" if KERNEL_SANITISED_V_2_6_9_1
   20.59 +    default "2.6.10.0" if KERNEL_SANITISED_V_2_6_10_0
   20.60 +    default "2.6.11.0" if KERNEL_SANITISED_V_2_6_11_0
   20.61 +    default "2.6.11.1" if KERNEL_SANITISED_V_2_6_11_1
   20.62 +    default "2.6.11.2" if KERNEL_SANITISED_V_2_6_11_2
   20.63 +    default "2.6.12.0" if KERNEL_SANITISED_V_2_6_12_0
   20.64 +# CT_INSERT_VERSION_STRING_ABOVE
   20.65 +# Don't remove above line!
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/config/libc.in	Sat Feb 24 11:00:05 2007 +0000
    21.3 @@ -0,0 +1,36 @@
    21.4 +# C library options
    21.5 +
    21.6 +menu "C-library"
    21.7 +
    21.8 +choice
    21.9 +    bool
   21.10 +    prompt "C-library to use:"
   21.11 +    default LIBC_GLIBC
   21.12 +
   21.13 +config LIBC_GLIBC
   21.14 +    bool
   21.15 +    prompt "glibc"
   21.16 +
   21.17 +config LIBC_UCLIBC
   21.18 +    bool
   21.19 +    prompt "uClibc"
   21.20 +
   21.21 +endchoice
   21.22 +
   21.23 +config LIBC_VERSION
   21.24 +    string
   21.25 +
   21.26 +config LIBC
   21.27 +    string
   21.28 +    default "glibc" if LIBC_GLIBC
   21.29 +    default "uClibc" if LIBC_UCLIBC
   21.30 +
   21.31 +if LIBC_GLIBC
   21.32 +source config/libc_glibc.in
   21.33 +endif
   21.34 +
   21.35 +if LIBC_UCLIBC
   21.36 +source config/libc_uClibc.in
   21.37 +endif
   21.38 +
   21.39 +endmenu
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/config/libc_glibc.in	Sat Feb 24 11:00:05 2007 +0000
    22.3 @@ -0,0 +1,199 @@
    22.4 +# glibc options
    22.5 +
    22.6 +choice
    22.7 +    bool
    22.8 +    prompt "glibc version"
    22.9 +
   22.10 +config LIBC_V_1_09_1
   22.11 +    bool
   22.12 +    prompt "1.09.1"
   22.13 +
   22.14 +config LIBC_V_2_0_1
   22.15 +    bool
   22.16 +    prompt "2.0.1"
   22.17 +
   22.18 +config LIBC_V_2_0_6
   22.19 +    bool
   22.20 +    prompt "2.0.6"
   22.21 +
   22.22 +config LIBC_V_2_1_1
   22.23 +    bool
   22.24 +    prompt "2.1.1"
   22.25 +
   22.26 +config LIBC_V_2_1_2
   22.27 +    bool
   22.28 +    prompt "2.1.2"
   22.29 +
   22.30 +config LIBC_V_2_1_3
   22.31 +    bool
   22.32 +    prompt "2.1.3"
   22.33 +
   22.34 +config LIBC_V_2_2
   22.35 +    bool
   22.36 +    prompt "2.2"
   22.37 +
   22.38 +config LIBC_V_2_2_1
   22.39 +    bool
   22.40 +    prompt "2.2.1"
   22.41 +
   22.42 +config LIBC_V_2_2_2
   22.43 +    bool
   22.44 +    prompt "2.2.2"
   22.45 +
   22.46 +config LIBC_V_2_2_3
   22.47 +    bool
   22.48 +    prompt "2.2.3"
   22.49 +
   22.50 +config LIBC_V_2_2_4
   22.51 +    bool
   22.52 +    prompt "2.2.4"
   22.53 +
   22.54 +config LIBC_V_2_2_5
   22.55 +    bool
   22.56 +    prompt "2.2.5"
   22.57 +
   22.58 +config LIBC_V_2_3
   22.59 +    bool
   22.60 +    prompt "2.3"
   22.61 +
   22.62 +config LIBC_V_2_3_1
   22.63 +    bool
   22.64 +    prompt "2.3.1"
   22.65 +
   22.66 +config LIBC_V_2_3_2
   22.67 +    bool
   22.68 +    prompt "2.3.2"
   22.69 +
   22.70 +config LIBC_V_2_3_3
   22.71 +    bool
   22.72 +    prompt "2.3.3"
   22.73 +
   22.74 +config LIBC_V_2_3_4
   22.75 +    bool
   22.76 +    prompt "2.3.4"
   22.77 +
   22.78 +config LIBC_V_2_3_5
   22.79 +    bool
   22.80 +    prompt "2.3.5"
   22.81 +
   22.82 +config LIBC_V_2_3_6
   22.83 +    bool
   22.84 +    prompt "2.3.6"
   22.85 +
   22.86 +config LIBC_V_2_4
   22.87 +    bool
   22.88 +    prompt "2.4"
   22.89 +
   22.90 +config LIBC_V_2_5
   22.91 +    bool
   22.92 +    prompt "2.5"
   22.93 +
   22.94 +# CT_INSERT_VERSION_ABOVE
   22.95 +# Don't remove qbove line!
   22.96 +endchoice
   22.97 +
   22.98 +config LIBC_VERSION
   22.99 +    string
  22.100 +    default "1.09.1" if LIBC_V_1_09_1
  22.101 +    default "2.0.1" if LIBC_V_2_0_1
  22.102 +    default "2.0.6" if LIBC_V_2_0_6
  22.103 +    default "2.1.1" if LIBC_V_2_1_1
  22.104 +    default "2.1.2" if LIBC_V_2_1_2
  22.105 +    default "2.1.3" if LIBC_V_2_1_3
  22.106 +    default "2.2" if LIBC_V_2_2
  22.107 +    default "2.2.1" if LIBC_V_2_2_1
  22.108 +    default "2.2.2" if LIBC_V_2_2_2
  22.109 +    default "2.2.3" if LIBC_V_2_2_3
  22.110 +    default "2.2.4" if LIBC_V_2_2_4
  22.111 +    default "2.2.5" if LIBC_V_2_2_5
  22.112 +    default "2.3" if LIBC_V_2_3
  22.113 +    default "2.3.1" if LIBC_V_2_3_1
  22.114 +    default "2.3.2" if LIBC_V_2_3_2
  22.115 +    default "2.3.3" if LIBC_V_2_3_3
  22.116 +    default "2.3.4" if LIBC_V_2_3_4
  22.117 +    default "2.3.5" if LIBC_V_2_3_5
  22.118 +    default "2.3.6" if LIBC_V_2_3_6
  22.119 +    default "2.4" if LIBC_V_2_4
  22.120 +    default "2.5" if LIBC_V_2_5
  22.121 +# CT_INSERT_VERSION_STRING_ABOVE
  22.122 +# Don't remove above line!
  22.123 +
  22.124 +choice
  22.125 +    bool
  22.126 +    prompt "Threading implentation to use:"
  22.127 +    default LIBC_GLIBC_THREADS_LINUXTHREADS
  22.128 +
  22.129 +config LIBC_GLIBC_THREADS_NPTL
  22.130 +    bool
  22.131 +    prompt "nptl (not implemented)"
  22.132 +
  22.133 +config LIBC_GLIBC_THREADS_LINUXTHREADS
  22.134 +    bool
  22.135 +    prompt "linuxthreads"
  22.136 +
  22.137 +config LIBC_GLIBC_THREADS_NONE
  22.138 +    bool
  22.139 +    prompt "none"
  22.140 +
  22.141 +endchoice
  22.142 +
  22.143 +config LIBC_GLIBC_EXTRA_CONFIG
  22.144 +    string
  22.145 +    prompt "glibc extra config"
  22.146 +    default ""
  22.147 +    help
  22.148 +      Extra flags to pass onto ./configure when configuring glibc.
  22.149 +
  22.150 +      Eg.: --enable-static-nss
  22.151 +
  22.152 +config LIBC_GLIBC_EXTRA_CFLAGS
  22.153 +    string
  22.154 +    prompt "glibc extra target CFLAGS"
  22.155 +    default ""
  22.156 +    help
  22.157 +      Extra target CFLAGS to use when building glibc.
  22.158 +
  22.159 +config LIBC_EXTRA_CC_ARGS
  22.160 +    string
  22.161 +    prompt "gcc extra flags"
  22.162 +    default ""
  22.163 +    help
  22.164 +      Extra flags to pass gcc when building glibc.
  22.165 +
  22.166 +      Seldom used, except for sparc64 which seems to need the flag -64
  22.167 +      to be passed onto gcc.
  22.168 +
  22.169 +# Please note: This is not used for now (no sh support).
  22.170 +config LIBC_GLIBC_CONFIGPARMS
  22.171 +    string
  22.172 +    prompt "Extra config params (READ HELP)"
  22.173 +    default "" if ARCH != "sh3" && ARCH != "sh4"
  22.174 +    default "no-z-defs=yes" if ARCH = "sh3" || ARCH = "sh4"
  22.175 +    help
  22.176 +      Some architectures need to set options in the file configparms.
  22.177 +      This is the case for sh3/4, which really need to set configparms as of
  22.178 +      gcc-3.4/glibc-2.3.2.
  22.179 +
  22.180 +      Unless you are building a toolchain for sh3/4, you should leave that empty.
  22.181 +
  22.182 +      Note: this is awkward, doesn't work well if you need more than one
  22.183 +            line in configparms
  22.184 +
  22.185 +config LIBC_ADDONS
  22.186 +    bool
  22.187 +    prompt "Pass extra addons list"
  22.188 +    default n
  22.189 +    help
  22.190 +      If you say Y here, you'll be able to give the list of addons you want to
  22.191 +      include in your C library.
  22.192 +
  22.193 +config LIBC_ADDONS_LIST
  22.194 +    string
  22.195 +    prompt "Extra addons"
  22.196 +    default ""
  22.197 +    help
  22.198 +      Extra addons to include in glibc.
  22.199 +      
  22.200 +      Eg.: crypt        (for very old glibces)
  22.201 +           ports        (for the ports addon, with other architectures)
  22.202 +           linuxthreads (for the linuxthreads implementation of threads)
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/config/libc_uClibc.in	Sat Feb 24 11:00:05 2007 +0000
    23.3 @@ -0,0 +1,92 @@
    23.4 +# uClibc options
    23.5 +
    23.6 +choice
    23.7 +    bool
    23.8 +    prompt "uClibc version"
    23.9 +
   23.10 +config LIBC_V_snapshot
   23.11 +    bool
   23.12 +    prompt "latest snapshot"
   23.13 +
   23.14 +config LIBC_V_specific_date
   23.15 +    bool
   23.16 +    prompt "<specific date>"
   23.17 +
   23.18 +config LIBC_V_0_9_26
   23.19 +    bool
   23.20 +    prompt "0.9.26"
   23.21 +
   23.22 +config LIBC_V_0_9_27
   23.23 +    bool
   23.24 +    prompt "0.9.27"
   23.25 +
   23.26 +config LIBC_V_0_9_28
   23.27 +    bool
   23.28 +    prompt "0.9.28"
   23.29 +
   23.30 +config LIBC_V_0_9_28_1
   23.31 +    bool
   23.32 +    prompt "0.9.28.1"
   23.33 +
   23.34 +config LIBC_V_0_9_28_2
   23.35 +    bool
   23.36 +    prompt "0.9.28.2"
   23.37 +
   23.38 +# CT_INSERT_VERSION_ABOVE
   23.39 +# Don't remove above line!
   23.40 +endchoice
   23.41 +
   23.42 +config LIBC_VERSION
   23.43 +    string
   23.44 +    prompt "Enter date (YYYYMMDD)" if LIBC_V_specific_date
   23.45 +    default "snapshot" if LIBC_V_snapshot
   23.46 +    default "0.9.26" if LIBC_V_0_9_26
   23.47 +    default "0.9.27" if LIBC_V_0_9_27
   23.48 +    default "0.9.28" if LIBC_V_0_9_28
   23.49 +    default "0.9.28.1" if LIBC_V_0_9_28_1
   23.50 +    default "0.9.28.2" if LIBC_V_0_9_28_2
   23.51 +# CT_INSERT_VERSION_STRING_ABOVE
   23.52 +# Don't remove qbove line!
   23.53 +
   23.54 +choice
   23.55 +    bool
   23.56 +    prompt "Debug level"
   23.57 +    default LIBC_UCLIBC_DEBUG_LEVEL_0
   23.58 +
   23.59 +config LIBC_UCLIBC_DEBUG_LEVEL_0
   23.60 +    bool
   23.61 +    prompt "none"
   23.62 +
   23.63 +config LIBC_UCLIBC_DEBUG_LEVEL_1
   23.64 +    bool
   23.65 +    prompt "minimal"
   23.66 +
   23.67 +config LIBC_UCLIBC_DEBUG_LEVEL_2
   23.68 +    bool
   23.69 +    prompt "all"
   23.70 +
   23.71 +endchoice
   23.72 +
   23.73 +config LIBC_UCLIBC_DEBUG_LEVEL
   23.74 +    int
   23.75 +    default 0 if LIBC_UCLIBC_DEBUG_LEVEL_0
   23.76 +    default 1 if LIBC_UCLIBC_DEBUG_LEVEL_1
   23.77 +    default 2 if LIBC_UCLIBC_DEBUG_LEVEL_2
   23.78 +
   23.79 +config LIBC_UCLIBC_CONFIG_FILE
   23.80 +    string
   23.81 +    prompt "Configuration file"
   23.82 +    default ""
   23.83 +    help
   23.84 +      Path to the configuration file.
   23.85 +      
   23.86 +      You _must_ provide one (for now).
   23.87 +
   23.88 +config LIBC_UCLIBC_LOCALES
   23.89 +    bool
   23.90 +    prompt "Add support for locales"
   23.91 +    default n
   23.92 +    help
   23.93 +      Say y if you want uClibc to support localisation.
   23.94 +
   23.95 +      Note that seems to be broken on recent uClibc releases.
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/config/target.in	Sat Feb 24 11:00:05 2007 +0000
    24.3 @@ -0,0 +1,300 @@
    24.4 +# Target definition: architecture, optimisations, etc...
    24.5 +
    24.6 +menu "Target options"
    24.7 +
    24.8 +comment "General target options"
    24.9 +
   24.10 +choice
   24.11 +    bool
   24.12 +    prompt "Target architecture:"
   24.13 +    default ARCH_x86
   24.14 +
   24.15 +config ARCH_ARM
   24.16 +    bool
   24.17 +    prompt "arm"
   24.18 +
   24.19 +config ARCH_MIPS
   24.20 +    bool
   24.21 +    prompt "mips"
   24.22 +
   24.23 +config ARCH_x86
   24.24 +    bool
   24.25 +    prompt "x86"
   24.26 +
   24.27 +config ARCH_x86_64
   24.28 +    bool
   24.29 +    prompt "x86_64"
   24.30 +
   24.31 +endchoice
   24.32 +
   24.33 +choice
   24.34 +    bool
   24.35 +    prompt "Endianness:"
   24.36 +
   24.37 +config ARCH_BE
   24.38 +    bool
   24.39 +    prompt "Big endian"
   24.40 +
   24.41 +config ARCH_LE
   24.42 +    bool
   24.43 +    prompt "Little endian"
   24.44 +
   24.45 +endchoice
   24.46 +
   24.47 +comment "Target optimisations"
   24.48 +
   24.49 +config ARCH_CPU
   24.50 +    string
   24.51 +    prompt "Emit assembly for CPU"
   24.52 +    default ""
   24.53 +    help
   24.54 +      This specifies the name of the target ARM processor. GCC uses this name
   24.55 +      to determine what kind of instructions it can emit when generating
   24.56 +      assembly code.
   24.57 +      
   24.58 +      Pick a value from the gcc manual for your choosen gcc version and your
   24.59 +      target CPU.
   24.60 +      
   24.61 +      Leave blank if you don't know, or if your target architecture does not
   24.62 +      offer this option.
   24.63 +
   24.64 +config ARCH_TUNE
   24.65 +    string
   24.66 +    prompt "Tune for CPU"
   24.67 +    default ""
   24.68 +    help
   24.69 +      This option is very similar to the ARCH_CPU option (above), except
   24.70 +      that instead of specifying the actual target processor type, and hence
   24.71 +      restricting which instructions can be used, it specifies that GCC should
   24.72 +      tune the performance of the code as if the target were of the type
   24.73 +      specified in this option, but still choosing the instructions that it
   24.74 +      will generate based on the cpu specified by the ARCH_CPU option
   24.75 +      (above), or a (command-line) -mcpu= option.
   24.76 +      
   24.77 +      Pick a value from the gcc manual for your choosen gcc version and your
   24.78 +      target CPU.
   24.79 +      
   24.80 +      Leave blank if you don't know, or if your target architecture does not
   24.81 +      offer this option.
   24.82 +
   24.83 +config ARCH_ARCH
   24.84 +    string
   24.85 +    prompt "Achitecture level"
   24.86 +    default ""
   24.87 +    help
   24.88 +      GCC uses this name to determine what kind of instructions it can emit
   24.89 +      when generating assembly code. This option can be used in conjunction
   24.90 +      with or instead of the ARCH_CPU option (above), or a (command-line)
   24.91 +      -mcpu= option.
   24.92 +      
   24.93 +      Pick a value from the gcc manual for your choosen gcc version and your
   24.94 +      target CPU.
   24.95 +      
   24.96 +      Leave blank if you don't know, or if your target architecture does not
   24.97 +      offer this option.
   24.98 +
   24.99 +config ARCH_FPU
  24.100 +    string
  24.101 +    prompt "Use FPU"
  24.102 +    default ""
  24.103 +    help
  24.104 +      On some targets (eg. ARM), you can specify the kind of FPU to emit
  24.105 +      code for.
  24.106 +      
  24.107 +      See below wether to actually emit FP opcodes, or to emulate them.
  24.108 +      
  24.109 +      Pick a value from the gcc manual for your choosen gcc version and your
  24.110 +      target CPU.
  24.111 +      
  24.112 +      Leave blank if you don't know, or if your target architecture does not
  24.113 +      offer this option.
  24.114 +
  24.115 +choice
  24.116 +    bool
  24.117 +    prompt "Floating point:"
  24.118 +
  24.119 +config ARCH_FLOAT_HW
  24.120 +    bool
  24.121 +    prompt "hardware (FPU)"
  24.122 +    help
  24.123 +      Emit hardware floating point opcodes.
  24.124 +      
  24.125 +      If you've got a processor with a FPU, then you want that.
  24.126 +      If your hardware has no FPU, you still can use HW floating point, but
  24.127 +      need to compile support for FPU emulation in your kernel. Needless to
  24.128 +      say that emulating the FPU is /slooowwwww/...
  24.129 +      
  24.130 +      One situation you'd want HW floating point without a FPU is if you get
  24.131 +      binary blobs from different vendors that are compiling this way and
  24.132 +      can't (don't wan't to) change.
  24.133 +
  24.134 +config ARCH_FLOAT_SW
  24.135 +    bool
  24.136 +    prompt "software"
  24.137 +    help
  24.138 +      Do not emit any hardware floating point opcode.
  24.139 +      
  24.140 +      If your processor has no FPU, then you most probably want this, as it
  24.141 +      is faster than emulating the FPU in the kernel.
  24.142 +
  24.143 +endchoice
  24.144 +
  24.145 +config ARCH_FLOAT_SW_LIBFLOAT
  24.146 +    bool
  24.147 +    prompt "Use libfloat"
  24.148 +    default n
  24.149 +    depends on ARCH_FLOAT_SW
  24.150 +    help
  24.151 +      For those targets upporting it, you can use libfloat for the software
  24.152 +      floating point emulation.
  24.153 +      
  24.154 +      Note that some versions of gcc have support code that supersedes libfloat,
  24.155 +      while others don't. Known version of gcc that don't have support code are
  24.156 +      versions prior to 3.0, and version above 4.0.
  24.157 +      
  24.158 +      You should check gcc before deciding to use libfloat.
  24.159 +
  24.160 +config TARGET_CFLAGS
  24.161 +    string
  24.162 +    prompt "Default target CFLAGS"
  24.163 +    default ""
  24.164 +    help
  24.165 +      Used to add specific options when compiling libraries of the toolchain,
  24.166 +      that will run on the target (eg. libc.so).
  24.167 +      
  24.168 +      Note that the options above for CPU, tune, arch and FPU will be
  24.169 +      automaticaly used. You don't need to specify them here.
  24.170 +      
  24.171 +      Leave blank if you don't know better.
  24.172 +
  24.173 +comment "Toolchain options"
  24.174 +
  24.175 +config USE_SYSROOT
  24.176 +    bool
  24.177 +    prompt "Use sysroot'ed toolchain"
  24.178 +    default y
  24.179 +    help
  24.180 +      Use the 'shinny new' sysroot feature of gcc: libraries split between
  24.181 +      prefix/target/sys-root/lib and prefix/target/sys-root/usr/lib
  24.182 +      
  24.183 +      You definitely want to say 'Y' here. Yes you do. I know you do. Say 'Y'.
  24.184 +
  24.185 +config SHARED_LIBS
  24.186 +    bool
  24.187 +    prompt "Build shared libraries"
  24.188 +    default y
  24.189 +    help
  24.190 +      Say 'y' here, unless you don't want shared libraries.
  24.191 +      
  24.192 +      You might not want shared librries if you're building for a target that
  24.193 +      don't support it (maybe some nommu targets, for example, or bare metal).
  24.194 +
  24.195 +config TARGET_MULTILIB
  24.196 +    bool
  24.197 +#    prompt "Enable 'multilib' support (EXPERIMENTAL)"
  24.198 +    default n
  24.199 +    help
  24.200 +      Enable the so-called 'multilib' support.
  24.201 +      
  24.202 +      With the same toolchain, and on some architectures, you will be able to
  24.203 +      build big and little endian binaries, soft- and hard-float, etc...
  24.204 +      
  24.205 +      See the gcc configure manual at http://gcc.gnu.org/install/configure.html
  24.206 +      to see what multilib your target supports.
  24.207 +      
  24.208 +      It's preferable for now to build two (or more) toolchains, one for each
  24.209 +      configuration you need to support (eg. one for thumb and one for ARM,
  24.210 +      etc...). You can use the vendor string to diferentiate those toolchains.
  24.211 +
  24.212 +config TARGET_VENDOR
  24.213 +    string
  24.214 +    prompt "Vendor string"
  24.215 +    default "unknown"
  24.216 +    help
  24.217 +      Vendor part of the machine triplet.
  24.218 +      
  24.219 +      A triplet is of the form arch-vendor-kernel-system.
  24.220 +      You can set the second part, vendor, to whatever you see fit.
  24.221 +      Use a single word, or use underscores "_" to separate words.
  24.222 +      
  24.223 +      Keep the default (unkown) if you don't know better.
  24.224 +
  24.225 +config TARGET_ALIAS
  24.226 +    string
  24.227 +    prompt "Target alias"
  24.228 +    default ""
  24.229 +    help
  24.230 +      Normaly, you'd call your toolchain component (especially gcc) by
  24.231 +      prefixing the target triplet followed by a dash and the component name
  24.232 +      (eg. armeb-unknown-linux-uclibc-gcc).
  24.233 +      
  24.234 +      You can enter a shortcut here. This string will be used to create
  24.235 +      symbolic links to the toolchain tools (eg. if you enter "foo-bar" here,
  24.236 +      then gcc for your toolchain will also be available as "foo-bar-gcc" along
  24.237 +      with the original name).
  24.238 +      
  24.239 +      You shouldn't need to enter anything here, unless you plan to manually
  24.240 +      call the tools (autotools-based ./configure will use the standard name).
  24.241 +
  24.242 +config ARCH
  24.243 +    string
  24.244 +    default "arm"     if ARCH_ARM
  24.245 +    default "mips"    if ARCH_MIPS
  24.246 +    default "x86"     if ARCH_x86
  24.247 +    default "x86_64"  if ARCH_x86_64
  24.248 +
  24.249 +config BUILD 
  24.250 +    string
  24.251 +    prompt "Build system triplet"
  24.252 +    default ""
  24.253 +    help
  24.254 +      Canonical name of the machine building the toolchain.
  24.255 +      You should leave empty, unless you really now what you're doing.
  24.256 +
  24.257 +config CC_NATIVE
  24.258 +    string
  24.259 +    prompt "Native gcc"
  24.260 +    default "gcc"
  24.261 +    help
  24.262 +      The native C compiler.
  24.263 +      
  24.264 +      You can set this to an alternative compiler if you have more than one
  24.265 +      installed (eg. gcc is gcc-4.1.1 and you want to use gcc-3.4.6).
  24.266 +      
  24.267 +      You can leave this empty as well, in which case gcc will be used.
  24.268 +
  24.269 +config CANADIAN
  24.270 +    bool
  24.271 +    prompt "Canadian build (EXPERIMENTAL)"
  24.272 +    default n
  24.273 +    help
  24.274 +      A canadian build allows to build a compiler on a first machine
  24.275 +      (build system), that will run on second machine (host system),
  24.276 +      targetting a third machine (target system).
  24.277 +      
  24.278 +      An example where you'd want a candian cross-compiler is to create
  24.279 +      a native compiler for your target. In this case host and target
  24.280 +      are the same.
  24.281 +
  24.282 +config HOST
  24.283 +    string
  24.284 +    prompt "Host system triplet"
  24.285 +    default ""
  24.286 +    depends on CANADIAN
  24.287 +    help
  24.288 +      Canonical name of the machine serving as host.
  24.289 +
  24.290 +config HOST_CC
  24.291 +    string
  24.292 +    prompt "Host system compiler"
  24.293 +    default "${CT_HOST}-"
  24.294 +    depends on CANADIAN
  24.295 +    help
  24.296 +      C compiler targeting the host system.
  24.297 +      If HOST_CC ends with a dash (-), then it is considered to be the
  24.298 +      prefix to gcc (eg. x86-pc-linuc-gnu-).
  24.299 +      If it is empty, it is formed by appending '-gcc' to HOST.
  24.300 +      Else it is considered to be the complete name of the compiler, with
  24.301 +      full path, or without path (provided that it can be found in PATH).
  24.302 +
  24.303 +endmenu
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/docs/overview.txt	Sat Feb 24 11:00:05 2007 +0000
    25.3 @@ -0,0 +1,108 @@
    25.4 +File.........: overview.txt
    25.5 +Content......: Overview of how ct-ng works.
    25.6 +Copyrigth....: (C) 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
    25.7 +License......: see COPYING in the root of this package
    25.8 +________________
    25.9 +               /
   25.10 +Introduction  /
   25.11 +_____________/
   25.12 +
   25.13 +crosstool-NG aims at building toolchains. Toolchains are an essential component
   25.14 +in a software development project. It will compile, assemble and link the code
   25.15 +that is being developped. Some pieces of the toolchain will eventually end up
   25.16 +in the resulting binary/ies: static libraries are but an example.
   25.17 +
   25.18 +So, a toolchain is a very sensitive piece of software, as any bug in one of the
   25.19 +components, or a poorly configured component, can lead to execution problems,
   25.20 +ranging from poor performance, to applications ending unexpectedly, to
   25.21 +mis-behaving software (which more than often is hard to detect), to hardware
   25.22 +damage, or even to human risks (which is more than regretable).
   25.23 +
   25.24 +Toolchains are made of different piece of software, each being quite complex
   25.25 +and requiring specially crafted options to build and work seamlessly. This
   25.26 +is usually not that easy, even in the not-so-trivial case of native toolchains.
   25.27 +The work reaches a higher degree of complexity when it comes to cross-
   25.28 +compilation, where it can becomes quite a nightmare...
   25.29 +
   25.30 +Some cross-toolchain exits on the internet, and can be used for general
   25.31 +development, but they have a number of limitations:
   25.32 +  - they can be general purpose, in that they are configured for the majority:
   25.33 +    no optimisation for your specific target,
   25.34 +  - they can be prepared for a specific target and thus are not easy to use,
   25.35 +    nor optimised for, or even supporting your target,
   25.36 +  - they often are using ageing components (compiler, C library, etc...) not
   25.37 +    supporting special features of your shiny new processor;
   25.38 +On the other side, these toolchain offer some advantages:
   25.39 +  - they are ready to use and quite easy to install and setup,
   25.40 +  - they are proven if used by a wide community.
   25.41 +
   25.42 +But once you want to get all the juice out of your specific hardware, you will
   25.43 +want to build your own toolchain. This is where crosstool-ng comes into play.
   25.44 +
   25.45 +There are also a number of tools that builds toolchains for specific needs,
   25.46 +which is not really scalable. Examples are:
   25.47 +  - buildroot (buildroot.uclibc.org) whose main puprpose is to build root file
   25.48 +    systems, hence the name. But once you have your toolchain with buildroot,
   25.49 +    part of it is installed in the root-to-be, so if you want to build a whole
   25.50 +    new root, you either have to save the existing one as a template and
   25.51 +    restore it later, or restart again from scratch. This is not convenient,
   25.52 +  - ptxdist (www.pengutronix.de/software/ptxdist), whose purpose is very
   25.53 +    similar to buildroot,
   25.54 +  - other projects (openembeded.org for example), which is again used to
   25.55 +    build root file systems.
   25.56 +
   25.57 +crosstool-NG is really targetted at building toolchains, and only toolchains.
   25.58 +It is then up to you to use it the way you want.
   25.59 +
   25.60 +___________
   25.61 +          /
   25.62 +History  /
   25.63 +________/
   25.64 +
   25.65 +crosstool was first 'conceived' by Dan Kegel, which offered it to the community,
   25.66 +as a set of scripts, a repository of patches, and some pre-configured, general
   25.67 +purpose setup files to be used to configure crosstool. This is available at
   25.68 +www.kegel.com/crosstool, and the subversion repository is hosted on google at
   25.69 +http://code.google.com/p/crosstool/.
   25.70 +
   25.71 +At the time of writing, crosstool only supports building with one C library,
   25.72 +namely glibc, and one C compiler, gcc; it is cripled with historical support
   25.73 +for legacy components, and is some kind of a mess to upgrade.
   25.74 +
   25.75 +I once managed to add support for uClibc-based toolchains, but it did not make
   25.76 +into mainline, mostly because I don't have time to port the patch forward to
   25.77 +the new versions, due in part to the big effort it was taking.
   25.78 +
   25.79 +So I decided to clean up crosstool in the state it was, re-order the things
   25.80 +in place, and add appropriate support for what I needed, that is uClibc
   25.81 +support.
   25.82 +
   25.83 +The only option left to me was rewrite crosstool from scratch. I decided to go
   25.84 +this way, and name the new implementation ct-ng, standing for crosstool Next
   25.85 +Generation, as many other comunity projects do, and as a wink at the TV series
   25.86 +"Star Trek: The Next Generation". ;-)
   25.87 +
   25.88 +_____________
   25.89 +            /
   25.90 +Operation  /
   25.91 +__________/
   25.92 +
   25.93 +ct-ng is configured by a configurator presenting a menu-stuctured set of
   25.94 +options. These options let you specify the way you want your toolchain built,
   25.95 +where you want it installed, what architecture and specific processor it
   25.96 +will support, the version of the components you want to use, etc... The
   25.97 +value for those options are then stored in a configuration file.
   25.98 +
   25.99 +You then simply run make. It will use this configuration file to retrieve,
  25.100 +extract and patch the components, build, install and test your newly built
  25.101 +toolchain.
  25.102 +
  25.103 +You are then free to add the toolchain /bin directory in your PATH to use
  25.104 +it at will.
  25.105 +
  25.106 +_____________
  25.107 +            /
  25.108 +Internals  /
  25.109 +__________/
  25.110 +
  25.111 +<To be completed>
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/kconfig/Makefile	Sat Feb 24 11:00:05 2007 +0000
    26.3 @@ -0,0 +1,71 @@
    26.4 +# ===========================================================================
    26.5 +# crosstool-ng configuration targets
    26.6 +# These targets are used from top-level makefile
    26.7 +
    26.8 +KCONFIG_TOP = config/config.in
    26.9 +obj = ./kconfig
   26.10 +PHONY += clean help oldconfig menuconfig config silentoldconfig \
   26.11 +	randconfig allyesconfig allnoconfig allmodconfig defconfig
   26.12 +
   26.13 +menuconfig: $(obj)/mconf
   26.14 +	@$< $(KCONFIG_TOP)
   26.15 +
   26.16 +config: $(obj)/conf
   26.17 +	@$< $(KCONFIG_TOP)
   26.18 +
   26.19 +oldconfig: $(obj)/conf
   26.20 +	@$< -s $(KCONFIG_TOP)
   26.21 +
   26.22 +randconfig: $(obj)/conf
   26.23 +	@$< -r $(KCONFIG_TOP)
   26.24 +
   26.25 +allyesconfig: $(obj)/conf
   26.26 +	@$< -y $(KCONFIG_TOP)
   26.27 +
   26.28 +allnoconfig: $(obj)/conf
   26.29 +	@$< -n $(KCONFIG_TOP)
   26.30 +
   26.31 +defconfig: $(obj)/conf
   26.32 +	@$< -d $(KCONFIG_TOP)
   26.33 +
   26.34 +# Build a list of all available samples
   26.35 +SAMPLES = $(patsubst $(CT_TOP_DIR)/samples/%,%,$(filter-out %Makefile,$(wildcard $(CT_TOP_DIR)/samples/*)))
   26.36 +SAMPLES_CONFIG = $(patsubst %,%_config,$(SAMPLES))
   26.37 +.PHONY: $(SAMPLES_CONFIG)
   26.38 +$(SAMPLES_CONFIG):
   26.39 +	@cp "$(CT_TOP_DIR)/samples/$(patsubst %_config,%,$@)/crosstool.config" "$(CT_TOP_DIR)/.config"
   26.40 +	@$(MAKE) oldconfig
   26.41 +
   26.42 +# Help text used by make help
   26.43 +help::
   26.44 +	@echo  'General purpose configuration targets:'
   26.45 +	@echo  '  config	  - Update current config utilising a line-oriented program'
   26.46 +	@echo  '  menuconfig	  - Update current config utilising a menu based program'
   26.47 +	@echo  '  oldconfig	  - Update current config utilising a provided .config as base'
   26.48 +	@echo  '  randconfig	  - New config with random answer to all options'
   26.49 +	@echo  '  defconfig	  - New config with default answer to all options'
   26.50 +	@echo  '  allyesconfig	  - New config where all options are accepted with yes'
   26.51 +	@echo  '  allnoconfig	  - New config where all options are answered with no'
   26.52 +	@echo
   26.53 +	@echo  'Preconfigured configuration targets:'
   26.54 +	@for s in $(SAMPLES_CONFIG); do   \
   26.55 +	    echo  "  $${s}"; \
   26.56 +	 done
   26.57 +	@echo  ''
   26.58 +
   26.59 +# Cheesy build
   26.60 +
   26.61 +SHIPPED = kconfig/zconf.tab.c kconfig/lex.zconf.c kconfig/zconf.hash.c
   26.62 +
   26.63 +%.c: %.c_shipped
   26.64 +	@ln -s $(notdir $<) $@
   26.65 +
   26.66 +kconfig/mconf: $(SHIPPED) kconfig/mconf.c
   26.67 +	@$(HOST_CC) -o $@ kconfig/{mconf.c,zconf.tab.c,lxdialog/*.c} \
   26.68 +		-lcurses "-DCURSES_LOC=<ncurses.h>"
   26.69 +
   26.70 +kconfig/conf: $(SHIPPED) kconfig/conf.c
   26.71 +	@$(HOST_CC) -o $@ kconfig/{conf.c,zconf.tab.c}
   26.72 +
   26.73 +clean::
   26.74 +	@rm -f $(wildcard kconfig/*zconf*.c) kconfig/{conf,mconf}
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/kconfig/conf.c	Sat Feb 24 11:00:05 2007 +0000
    27.3 @@ -0,0 +1,623 @@
    27.4 +/*
    27.5 + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
    27.6 + * Released under the terms of the GNU GPL v2.0.
    27.7 + */
    27.8 +
    27.9 +#include <ctype.h>
   27.10 +#include <stdlib.h>
   27.11 +#include <stdio.h>
   27.12 +#include <string.h>
   27.13 +#include <unistd.h>
   27.14 +#include <time.h>
   27.15 +#include <sys/stat.h>
   27.16 +
   27.17 +#define LKC_DIRECT_LINK
   27.18 +#include "lkc.h"
   27.19 +
   27.20 +static void conf(struct menu *menu);
   27.21 +static void check_conf(struct menu *menu);
   27.22 +
   27.23 +enum {
   27.24 +	ask_all,
   27.25 +	ask_new,
   27.26 +	ask_silent,
   27.27 +	set_default,
   27.28 +	set_yes,
   27.29 +	set_mod,
   27.30 +	set_no,
   27.31 +	set_random
   27.32 +} input_mode = ask_all;
   27.33 +char *defconfig_file;
   27.34 +
   27.35 +static int indent = 1;
   27.36 +static int valid_stdin = 1;
   27.37 +static int conf_cnt;
   27.38 +static char line[128];
   27.39 +static struct menu *rootEntry;
   27.40 +
   27.41 +static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
   27.42 +
   27.43 +static void strip(char *str)
   27.44 +{
   27.45 +	char *p = str;
   27.46 +	int l;
   27.47 +
   27.48 +	while ((isspace(*p)))
   27.49 +		p++;
   27.50 +	l = strlen(p);
   27.51 +	if (p != str)
   27.52 +		memmove(str, p, l + 1);
   27.53 +	if (!l)
   27.54 +		return;
   27.55 +	p = str + l - 1;
   27.56 +	while ((isspace(*p)))
   27.57 +		*p-- = 0;
   27.58 +}
   27.59 +
   27.60 +static void check_stdin(void)
   27.61 +{
   27.62 +	if (!valid_stdin && input_mode == ask_silent) {
   27.63 +		printf(_("aborted!\n\n"));
   27.64 +		printf(_("Console input/output is redirected. "));
   27.65 +		printf(_("Run 'make oldconfig' to update configuration.\n\n"));
   27.66 +		exit(1);
   27.67 +	}
   27.68 +}
   27.69 +
   27.70 +static void conf_askvalue(struct symbol *sym, const char *def)
   27.71 +{
   27.72 +	enum symbol_type type = sym_get_type(sym);
   27.73 +	tristate val;
   27.74 +
   27.75 +	if (!sym_has_value(sym))
   27.76 +		printf("(NEW) ");
   27.77 +
   27.78 +	line[0] = '\n';
   27.79 +	line[1] = 0;
   27.80 +
   27.81 +	if (!sym_is_changable(sym)) {
   27.82 +		printf("%s\n", def);
   27.83 +		line[0] = '\n';
   27.84 +		line[1] = 0;
   27.85 +		return;
   27.86 +	}
   27.87 +
   27.88 +	switch (input_mode) {
   27.89 +	case set_no:
   27.90 +	case set_mod:
   27.91 +	case set_yes:
   27.92 +	case set_random:
   27.93 +		if (sym_has_value(sym)) {
   27.94 +			printf("%s\n", def);
   27.95 +			return;
   27.96 +		}
   27.97 +		break;
   27.98 +	case ask_new:
   27.99 +	case ask_silent:
  27.100 +		if (sym_has_value(sym)) {
  27.101 +			printf("%s\n", def);
  27.102 +			return;
  27.103 +		}
  27.104 +		check_stdin();
  27.105 +	case ask_all:
  27.106 +		fflush(stdout);
  27.107 +		fgets(line, 128, stdin);
  27.108 +		return;
  27.109 +	case set_default:
  27.110 +		printf("%s\n", def);
  27.111 +		return;
  27.112 +	default:
  27.113 +		break;
  27.114 +	}
  27.115 +
  27.116 +	switch (type) {
  27.117 +	case S_INT:
  27.118 +	case S_HEX:
  27.119 +	case S_STRING:
  27.120 +		printf("%s\n", def);
  27.121 +		return;
  27.122 +	default:
  27.123 +		;
  27.124 +	}
  27.125 +	switch (input_mode) {
  27.126 +	case set_yes:
  27.127 +		if (sym_tristate_within_range(sym, yes)) {
  27.128 +			line[0] = 'y';
  27.129 +			line[1] = '\n';
  27.130 +			line[2] = 0;
  27.131 +			break;
  27.132 +		}
  27.133 +	case set_mod:
  27.134 +		if (type == S_TRISTATE) {
  27.135 +			if (sym_tristate_within_range(sym, mod)) {
  27.136 +				line[0] = 'm';
  27.137 +				line[1] = '\n';
  27.138 +				line[2] = 0;
  27.139 +				break;
  27.140 +			}
  27.141 +		} else {
  27.142 +			if (sym_tristate_within_range(sym, yes)) {
  27.143 +				line[0] = 'y';
  27.144 +				line[1] = '\n';
  27.145 +				line[2] = 0;
  27.146 +				break;
  27.147 +			}
  27.148 +		}
  27.149 +	case set_no:
  27.150 +		if (sym_tristate_within_range(sym, no)) {
  27.151 +			line[0] = 'n';
  27.152 +			line[1] = '\n';
  27.153 +			line[2] = 0;
  27.154 +			break;
  27.155 +		}
  27.156 +	case set_random:
  27.157 +		do {
  27.158 +			val = (tristate)(random() % 3);
  27.159 +		} while (!sym_tristate_within_range(sym, val));
  27.160 +		switch (val) {
  27.161 +		case no: line[0] = 'n'; break;
  27.162 +		case mod: line[0] = 'm'; break;
  27.163 +		case yes: line[0] = 'y'; break;
  27.164 +		}
  27.165 +		line[1] = '\n';
  27.166 +		line[2] = 0;
  27.167 +		break;
  27.168 +	default:
  27.169 +		break;
  27.170 +	}
  27.171 +	printf("%s", line);
  27.172 +}
  27.173 +
  27.174 +int conf_string(struct menu *menu)
  27.175 +{
  27.176 +	struct symbol *sym = menu->sym;
  27.177 +	const char *def, *help;
  27.178 +
  27.179 +	while (1) {
  27.180 +		printf("%*s%s ", indent - 1, "", menu->prompt->text);
  27.181 +		printf("(%s) ", sym->name);
  27.182 +		def = sym_get_string_value(sym);
  27.183 +		if (sym_get_string_value(sym))
  27.184 +			printf("[%s] ", def);
  27.185 +		conf_askvalue(sym, def);
  27.186 +		switch (line[0]) {
  27.187 +		case '\n':
  27.188 +			break;
  27.189 +		case '?':
  27.190 +			/* print help */
  27.191 +			if (line[1] == '\n') {
  27.192 +				help = nohelp_text;
  27.193 +				if (menu->sym->help)
  27.194 +					help = menu->sym->help;
  27.195 +				printf("\n%s\n", menu->sym->help);
  27.196 +				def = NULL;
  27.197 +				break;
  27.198 +			}
  27.199 +		default:
  27.200 +			line[strlen(line)-1] = 0;
  27.201 +			def = line;
  27.202 +		}
  27.203 +		if (def && sym_set_string_value(sym, def))
  27.204 +			return 0;
  27.205 +	}
  27.206 +}
  27.207 +
  27.208 +static int conf_sym(struct menu *menu)
  27.209 +{
  27.210 +	struct symbol *sym = menu->sym;
  27.211 +	int type;
  27.212 +	tristate oldval, newval;
  27.213 +	const char *help;
  27.214 +
  27.215 +	while (1) {
  27.216 +		printf("%*s%s ", indent - 1, "", menu->prompt->text);
  27.217 +		if (sym->name)
  27.218 +			printf("(%s) ", sym->name);
  27.219 +		type = sym_get_type(sym);
  27.220 +		putchar('[');
  27.221 +		oldval = sym_get_tristate_value(sym);
  27.222 +		switch (oldval) {
  27.223 +		case no:
  27.224 +			putchar('N');
  27.225 +			break;
  27.226 +		case mod:
  27.227 +			putchar('M');
  27.228 +			break;
  27.229 +		case yes:
  27.230 +			putchar('Y');
  27.231 +			break;
  27.232 +		}
  27.233 +		if (oldval != no && sym_tristate_within_range(sym, no))
  27.234 +			printf("/n");
  27.235 +		if (oldval != mod && sym_tristate_within_range(sym, mod))
  27.236 +			printf("/m");
  27.237 +		if (oldval != yes && sym_tristate_within_range(sym, yes))
  27.238 +			printf("/y");
  27.239 +		if (sym->help)
  27.240 +			printf("/?");
  27.241 +		printf("] ");
  27.242 +		conf_askvalue(sym, sym_get_string_value(sym));
  27.243 +		strip(line);
  27.244 +
  27.245 +		switch (line[0]) {
  27.246 +		case 'n':
  27.247 +		case 'N':
  27.248 +			newval = no;
  27.249 +			if (!line[1] || !strcmp(&line[1], "o"))
  27.250 +				break;
  27.251 +			continue;
  27.252 +		case 'm':
  27.253 +		case 'M':
  27.254 +			newval = mod;
  27.255 +			if (!line[1])
  27.256 +				break;
  27.257 +			continue;
  27.258 +		case 'y':
  27.259 +		case 'Y':
  27.260 +			newval = yes;
  27.261 +			if (!line[1] || !strcmp(&line[1], "es"))
  27.262 +				break;
  27.263 +			continue;
  27.264 +		case 0:
  27.265 +			newval = oldval;
  27.266 +			break;
  27.267 +		case '?':
  27.268 +			goto help;
  27.269 +		default:
  27.270 +			continue;
  27.271 +		}
  27.272 +		if (sym_set_tristate_value(sym, newval))
  27.273 +			return 0;
  27.274 +help:
  27.275 +		help = nohelp_text;
  27.276 +		if (sym->help)
  27.277 +			help = sym->help;
  27.278 +		printf("\n%s\n", help);
  27.279 +	}
  27.280 +}
  27.281 +
  27.282 +static int conf_choice(struct menu *menu)
  27.283 +{
  27.284 +	struct symbol *sym, *def_sym;
  27.285 +	struct menu *child;
  27.286 +	int type;
  27.287 +	bool is_new;
  27.288 +
  27.289 +	sym = menu->sym;
  27.290 +	type = sym_get_type(sym);
  27.291 +	is_new = !sym_has_value(sym);
  27.292 +	if (sym_is_changable(sym)) {
  27.293 +		conf_sym(menu);
  27.294 +		sym_calc_value(sym);
  27.295 +		switch (sym_get_tristate_value(sym)) {
  27.296 +		case no:
  27.297 +			return 1;
  27.298 +		case mod:
  27.299 +			return 0;
  27.300 +		case yes:
  27.301 +			break;
  27.302 +		}
  27.303 +	} else {
  27.304 +		switch (sym_get_tristate_value(sym)) {
  27.305 +		case no:
  27.306 +			return 1;
  27.307 +		case mod:
  27.308 +			printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu));
  27.309 +			return 0;
  27.310 +		case yes:
  27.311 +			break;
  27.312 +		}
  27.313 +	}
  27.314 +
  27.315 +	while (1) {
  27.316 +		int cnt, def;
  27.317 +
  27.318 +		printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu));
  27.319 +		def_sym = sym_get_choice_value(sym);
  27.320 +		cnt = def = 0;
  27.321 +		line[0] = 0;
  27.322 +		for (child = menu->list; child; child = child->next) {
  27.323 +			if (!menu_is_visible(child))
  27.324 +				continue;
  27.325 +			if (!child->sym) {
  27.326 +				printf("%*c %s\n", indent, '*', menu_get_prompt(child));
  27.327 +				continue;
  27.328 +			}
  27.329 +			cnt++;
  27.330 +			if (child->sym == def_sym) {
  27.331 +				def = cnt;
  27.332 +				printf("%*c", indent, '>');
  27.333 +			} else
  27.334 +				printf("%*c", indent, ' ');
  27.335 +			printf(" %d. %s", cnt, menu_get_prompt(child));
  27.336 +			if (child->sym->name)
  27.337 +				printf(" (%s)", child->sym->name);
  27.338 +			if (!sym_has_value(child->sym))
  27.339 +				printf(" (NEW)");
  27.340 +			printf("\n");
  27.341 +		}
  27.342 +		printf("%*schoice", indent - 1, "");
  27.343 +		if (cnt == 1) {
  27.344 +			printf("[1]: 1\n");
  27.345 +			goto conf_childs;
  27.346 +		}
  27.347 +		printf("[1-%d", cnt);
  27.348 +		if (sym->help)
  27.349 +			printf("?");
  27.350 +		printf("]: ");
  27.351 +		switch (input_mode) {
  27.352 +		case ask_new:
  27.353 +		case ask_silent:
  27.354 +			if (!is_new) {
  27.355 +				cnt = def;
  27.356 +				printf("%d\n", cnt);
  27.357 +				break;
  27.358 +			}
  27.359 +			check_stdin();
  27.360 +		case ask_all:
  27.361 +			fflush(stdout);
  27.362 +			fgets(line, 128, stdin);
  27.363 +			strip(line);
  27.364 +			if (line[0] == '?') {
  27.365 +				printf("\n%s\n", menu->sym->help ?
  27.366 +					menu->sym->help : nohelp_text);
  27.367 +				continue;
  27.368 +			}
  27.369 +			if (!line[0])
  27.370 +				cnt = def;
  27.371 +			else if (isdigit(line[0]))
  27.372 +				cnt = atoi(line);
  27.373 +			else
  27.374 +				continue;
  27.375 +			break;
  27.376 +		case set_random:
  27.377 +			def = (random() % cnt) + 1;
  27.378 +		case set_default:
  27.379 +		case set_yes:
  27.380 +		case set_mod:
  27.381 +		case set_no:
  27.382 +			cnt = def;
  27.383 +			printf("%d\n", cnt);
  27.384 +			break;
  27.385 +		}
  27.386 +
  27.387 +	conf_childs:
  27.388 +		for (child = menu->list; child; child = child->next) {
  27.389 +			if (!child->sym || !menu_is_visible(child))
  27.390 +				continue;
  27.391 +			if (!--cnt)
  27.392 +				break;
  27.393 +		}
  27.394 +		if (!child)
  27.395 +			continue;
  27.396 +		if (line[strlen(line) - 1] == '?') {
  27.397 +			printf("\n%s\n", child->sym->help ?
  27.398 +				child->sym->help : nohelp_text);
  27.399 +			continue;
  27.400 +		}
  27.401 +		sym_set_choice_value(sym, child->sym);
  27.402 +		if (child->list) {
  27.403 +			indent += 2;
  27.404 +			conf(child->list);
  27.405 +			indent -= 2;
  27.406 +		}
  27.407 +		return 1;
  27.408 +	}
  27.409 +}
  27.410 +
  27.411 +static void conf(struct menu *menu)
  27.412 +{
  27.413 +	struct symbol *sym;
  27.414 +	struct property *prop;
  27.415 +	struct menu *child;
  27.416 +
  27.417 +	if (!menu_is_visible(menu))
  27.418 +		return;
  27.419 +
  27.420 +	sym = menu->sym;
  27.421 +	prop = menu->prompt;
  27.422 +	if (prop) {
  27.423 +		const char *prompt;
  27.424 +
  27.425 +		switch (prop->type) {
  27.426 +		case P_MENU:
  27.427 +			if (input_mode == ask_silent && rootEntry != menu) {
  27.428 +				check_conf(menu);
  27.429 +				return;
  27.430 +			}
  27.431 +		case P_COMMENT:
  27.432 +			prompt = menu_get_prompt(menu);
  27.433 +			if (prompt)
  27.434 +				printf("%*c\n%*c %s\n%*c\n",
  27.435 +					indent, '*',
  27.436 +					indent, '*', prompt,
  27.437 +					indent, '*');
  27.438 +		default:
  27.439 +			;
  27.440 +		}
  27.441 +	}
  27.442 +
  27.443 +	if (!sym)
  27.444 +		goto conf_childs;
  27.445 +
  27.446 +	if (sym_is_choice(sym)) {
  27.447 +		conf_choice(menu);
  27.448 +		if (sym->curr.tri != mod)
  27.449 +			return;
  27.450 +		goto conf_childs;
  27.451 +	}
  27.452 +
  27.453 +	switch (sym->type) {
  27.454 +	case S_INT:
  27.455 +	case S_HEX:
  27.456 +	case S_STRING:
  27.457 +		conf_string(menu);
  27.458 +		break;
  27.459 +	default:
  27.460 +		conf_sym(menu);
  27.461 +		break;
  27.462 +	}
  27.463 +
  27.464 +conf_childs:
  27.465 +	if (sym)
  27.466 +		indent += 2;
  27.467 +	for (child = menu->list; child; child = child->next)
  27.468 +		conf(child);
  27.469 +	if (sym)
  27.470 +		indent -= 2;
  27.471 +}
  27.472 +
  27.473 +static void check_conf(struct menu *menu)
  27.474 +{
  27.475 +	struct symbol *sym;
  27.476 +	struct menu *child;
  27.477 +
  27.478 +	if (!menu_is_visible(menu))
  27.479 +		return;
  27.480 +
  27.481 +	sym = menu->sym;
  27.482 +	if (sym && !sym_has_value(sym)) {
  27.483 +		if (sym_is_changable(sym) ||
  27.484 +		    (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {
  27.485 +			if (!conf_cnt++)
  27.486 +				printf(_("*\n* Restart config...\n*\n"));
  27.487 +			rootEntry = menu_get_parent_menu(menu);
  27.488 +			conf(rootEntry);
  27.489 +		}
  27.490 +	}
  27.491 +
  27.492 +	for (child = menu->list; child; child = child->next)
  27.493 +		check_conf(child);
  27.494 +}
  27.495 +
  27.496 +int main(int ac, char **av)
  27.497 +{
  27.498 +	int i = 1;
  27.499 +	const char *name;
  27.500 +	struct stat tmpstat;
  27.501 +
  27.502 +	if (ac > i && av[i][0] == '-') {
  27.503 +		switch (av[i++][1]) {
  27.504 +		case 'o':
  27.505 +			input_mode = ask_new;
  27.506 +			break;
  27.507 +		case 's':
  27.508 +			input_mode = ask_silent;
  27.509 +			valid_stdin = isatty(0) && isatty(1) && isatty(2);
  27.510 +			break;
  27.511 +		case 'd':
  27.512 +			input_mode = set_default;
  27.513 +			break;
  27.514 +		case 'D':
  27.515 +			input_mode = set_default;
  27.516 +			defconfig_file = av[i++];
  27.517 +			if (!defconfig_file) {
  27.518 +				printf(_("%s: No default config file specified\n"),
  27.519 +					av[0]);
  27.520 +				exit(1);
  27.521 +			}
  27.522 +			break;
  27.523 +		case 'n':
  27.524 +			input_mode = set_no;
  27.525 +			break;
  27.526 +		case 'm':
  27.527 +			input_mode = set_mod;
  27.528 +			break;
  27.529 +		case 'y':
  27.530 +			input_mode = set_yes;
  27.531 +			break;
  27.532 +		case 'r':
  27.533 +			input_mode = set_random;
  27.534 +			srandom(time(NULL));
  27.535 +			break;
  27.536 +		case 'h':
  27.537 +		case '?':
  27.538 +			fprintf(stderr, "See README for usage info\n");
  27.539 +			exit(0);
  27.540 +		}
  27.541 +	}
  27.542 +  	name = av[i];
  27.543 +	if (!name) {
  27.544 +		printf(_("%s: Kconfig file missing\n"), av[0]);
  27.545 +		exit(1);
  27.546 +	}
  27.547 +	conf_parse(name);
  27.548 +	//zconfdump(stdout);
  27.549 +	switch (input_mode) {
  27.550 +	case set_default:
  27.551 +		if (!defconfig_file)
  27.552 +			defconfig_file = conf_get_default_confname();
  27.553 +		if (conf_read(defconfig_file)) {
  27.554 +			printf("***\n"
  27.555 +				"*** Can't find default configuration \"%s\"!\n"
  27.556 +				"***\n", defconfig_file);
  27.557 +			exit(1);
  27.558 +		}
  27.559 +		break;
  27.560 +	case ask_silent:
  27.561 +		if (stat(".config", &tmpstat)) {
  27.562 +			printf(_("***\n"
  27.563 +				"*** You have not yet configured your "PROJECT_NAME"!\n"
  27.564 +				"***\n"
  27.565 +				"*** Please run some configurator (e.g. \"make oldconfig\" or\n"
  27.566 +				"*** \"make menuconfig\" or \"make xconfig\").\n"
  27.567 +				"***\n"));
  27.568 +			exit(1);
  27.569 +		}
  27.570 +	case ask_all:
  27.571 +	case ask_new:
  27.572 +		conf_read(NULL);
  27.573 +		break;
  27.574 +	case set_no:
  27.575 +	case set_mod:
  27.576 +	case set_yes:
  27.577 +	case set_random:
  27.578 +		name = getenv("KCONFIG_ALLCONFIG");
  27.579 +		if (name && !stat(name, &tmpstat)) {
  27.580 +			conf_read_simple(name, S_DEF_USER);
  27.581 +			break;
  27.582 +		}
  27.583 +		switch (input_mode) {
  27.584 +		case set_no:	 name = "allno.config"; break;
  27.585 +		case set_mod:	 name = "allmod.config"; break;
  27.586 +		case set_yes:	 name = "allyes.config"; break;
  27.587 +		case set_random: name = "allrandom.config"; break;
  27.588 +		default: break;
  27.589 +		}
  27.590 +		if (!stat(name, &tmpstat))
  27.591 +			conf_read_simple(name, S_DEF_USER);
  27.592 +		else if (!stat("all.config", &tmpstat))
  27.593 +			conf_read_simple("all.config", S_DEF_USER);
  27.594 +		break;
  27.595 +	default:
  27.596 +		break;
  27.597 +	}
  27.598 +
  27.599 +	if (input_mode != ask_silent) {
  27.600 +		rootEntry = &rootmenu;
  27.601 +		conf(&rootmenu);
  27.602 +		if (input_mode == ask_all) {
  27.603 +			input_mode = ask_silent;
  27.604 +			valid_stdin = 1;
  27.605 +		}
  27.606 +	} else if (sym_change_count) {
  27.607 +		name = getenv("KCONFIG_NOSILENTUPDATE");
  27.608 +		if (name && *name) {
  27.609 +			fprintf(stderr, _("\n*** "PROJECT_NAME" configuration requires explicit update.\n\n"));
  27.610 +			return 1;
  27.611 +		}
  27.612 +	} else
  27.613 +		goto skip_check;
  27.614 +
  27.615 +	do {
  27.616 +		conf_cnt = 0;
  27.617 +		check_conf(&rootmenu);
  27.618 +	} while (conf_cnt);
  27.619 +
  27.620 +	if (!conf_write(NULL)) {
  27.621 +skip_check:
  27.622 +		return 0;
  27.623 +	}
  27.624 +	fprintf(stderr, _("\n*** Error writing "PROJECT_NAME" configuration.\n\n"));
  27.625 +	return 1;
  27.626 +}
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/kconfig/confdata.c	Sat Feb 24 11:00:05 2007 +0000
    28.3 @@ -0,0 +1,800 @@
    28.4 +/*
    28.5 + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
    28.6 + * Released under the terms of the GNU GPL v2.0.
    28.7 + */
    28.8 +
    28.9 +#include <sys/stat.h>
   28.10 +#include <ctype.h>
   28.11 +#include <errno.h>
   28.12 +#include <fcntl.h>
   28.13 +#include <limits.h>
   28.14 +#include <stdio.h>
   28.15 +#include <stdlib.h>
   28.16 +#include <string.h>
   28.17 +#include <time.h>
   28.18 +#include <unistd.h>
   28.19 +
   28.20 +#define LKC_DIRECT_LINK
   28.21 +#include "lkc.h"
   28.22 +
   28.23 +static void conf_warning(const char *fmt, ...)
   28.24 +	__attribute__ ((format (printf, 1, 2)));
   28.25 +
   28.26 +static const char *conf_filename;
   28.27 +static int conf_lineno, conf_warnings, conf_unsaved;
   28.28 +
   28.29 +#ifndef conf_defname
   28.30 +const char conf_defname[] = "arch/$ARCH/defconfig";
   28.31 +#endif
   28.32 +
   28.33 +static void conf_warning(const char *fmt, ...)
   28.34 +{
   28.35 +	va_list ap;
   28.36 +	va_start(ap, fmt);
   28.37 +	fprintf(stderr, "%s:%d:warning: ", conf_filename, conf_lineno);
   28.38 +	vfprintf(stderr, fmt, ap);
   28.39 +	fprintf(stderr, "\n");
   28.40 +	va_end(ap);
   28.41 +	conf_warnings++;
   28.42 +}
   28.43 +
   28.44 +const char *conf_get_configname(void)
   28.45 +{
   28.46 +	char *name = getenv("KCONFIG_CONFIG");
   28.47 +
   28.48 +	return name ? name : ".config";
   28.49 +}
   28.50 +
   28.51 +static char *conf_expand_value(const char *in)
   28.52 +{
   28.53 +	struct symbol *sym;
   28.54 +	const char *src;
   28.55 +	static char res_value[SYMBOL_MAXLENGTH];
   28.56 +	char *dst, name[SYMBOL_MAXLENGTH];
   28.57 +
   28.58 +	res_value[0] = 0;
   28.59 +	dst = name;
   28.60 +	while ((src = strchr(in, '$'))) {
   28.61 +		strncat(res_value, in, src - in);
   28.62 +		src++;
   28.63 +		dst = name;
   28.64 +		while (isalnum(*src) || *src == '_')
   28.65 +			*dst++ = *src++;
   28.66 +		*dst = 0;
   28.67 +		sym = sym_lookup(name, 0);
   28.68 +		sym_calc_value(sym);
   28.69 +		strcat(res_value, sym_get_string_value(sym));
   28.70 +		in = src;
   28.71 +	}
   28.72 +	strcat(res_value, in);
   28.73 +
   28.74 +	return res_value;
   28.75 +}
   28.76 +
   28.77 +char *conf_get_default_confname(void)
   28.78 +{
   28.79 +	struct stat buf;
   28.80 +	static char fullname[PATH_MAX+1];
   28.81 +	char *env, *name;
   28.82 +
   28.83 +	name = conf_expand_value(conf_defname);
   28.84 +	env = getenv(SRCTREE);
   28.85 +	if (env) {
   28.86 +		sprintf(fullname, "%s/%s", env, name);
   28.87 +		if (!stat(fullname, &buf))
   28.88 +			return fullname;
   28.89 +	}
   28.90 +	return name;
   28.91 +}
   28.92 +
   28.93 +int conf_read_simple(const char *name, int def)
   28.94 +{
   28.95 +	FILE *in = NULL;
   28.96 +	char line[1024];
   28.97 +	char *p, *p2;
   28.98 +	struct symbol *sym;
   28.99 +	int i, def_flags;
  28.100 +
  28.101 +	if (name) {
  28.102 +		in = zconf_fopen(name);
  28.103 +	} else {
  28.104 +		struct property *prop;
  28.105 +
  28.106 +		name = conf_get_configname();
  28.107 +		in = zconf_fopen(name);
  28.108 +		if (in)
  28.109 +			goto load;
  28.110 +		sym_change_count++;
  28.111 +		if (!sym_defconfig_list)
  28.112 +			return 1;
  28.113 +
  28.114 +		for_all_defaults(sym_defconfig_list, prop) {
  28.115 +			if (expr_calc_value(prop->visible.expr) == no ||
  28.116 +			    prop->expr->type != E_SYMBOL)
  28.117 +				continue;
  28.118 +			name = conf_expand_value(prop->expr->left.sym->name);
  28.119 +			in = zconf_fopen(name);
  28.120 +			if (in) {
  28.121 +				printf(_("#\n"
  28.122 +					 "# using defaults found in %s\n"
  28.123 +					 "#\n"), name);
  28.124 +				goto load;
  28.125 +			}
  28.126 +		}
  28.127 +	}
  28.128 +	if (!in)
  28.129 +		return 1;
  28.130 +
  28.131 +load:
  28.132 +	conf_filename = name;
  28.133 +	conf_lineno = 0;
  28.134 +	conf_warnings = 0;
  28.135 +	conf_unsaved = 0;
  28.136 +
  28.137 +	def_flags = SYMBOL_DEF << def;
  28.138 +	for_all_symbols(i, sym) {
  28.139 +		sym->flags |= SYMBOL_CHANGED;
  28.140 +		sym->flags &= ~(def_flags|SYMBOL_VALID);
  28.141 +		if (sym_is_choice(sym))
  28.142 +			sym->flags |= def_flags;
  28.143 +		switch (sym->type) {
  28.144 +		case S_INT:
  28.145 +		case S_HEX:
  28.146 +		case S_STRING:
  28.147 +			if (sym->def[def].val)
  28.148 +				free(sym->def[def].val);
  28.149 +		default:
  28.150 +			sym->def[def].val = NULL;
  28.151 +			sym->def[def].tri = no;
  28.152 +		}
  28.153 +	}
  28.154 +
  28.155 +	while (fgets(line, sizeof(line), in)) {
  28.156 +		conf_lineno++;
  28.157 +		sym = NULL;
  28.158 +		switch (line[0]) {
  28.159 +		case '#':
  28.160 +			if (memcmp(line + 2, "CT_", 3))
  28.161 +				continue;
  28.162 +			p = strchr(line + 5, ' ');
  28.163 +			if (!p)
  28.164 +				continue;
  28.165 +			*p++ = 0;
  28.166 +			if (strncmp(p, "is not set", 10))
  28.167 +				continue;
  28.168 +			if (def == S_DEF_USER) {
  28.169 +				sym = sym_find(line + 5);
  28.170 +				if (!sym) {
  28.171 +					conf_warning("trying to assign nonexistent symbol %s", line + 5);
  28.172 +					break;
  28.173 +				}
  28.174 +			} else {
  28.175 +				sym = sym_lookup(line + 5, 0);
  28.176 +				if (sym->type == S_UNKNOWN)
  28.177 +					sym->type = S_BOOLEAN;
  28.178 +			}
  28.179 +			if (sym->flags & def_flags) {
  28.180 +				conf_warning("trying to reassign symbol %s", sym->name);
  28.181 +				break;
  28.182 +			}
  28.183 +			switch (sym->type) {
  28.184 +			case S_BOOLEAN:
  28.185 +			case S_TRISTATE:
  28.186 +				sym->def[def].tri = no;
  28.187 +				sym->flags |= def_flags;
  28.188 +				break;
  28.189 +			default:
  28.190 +				;
  28.191 +			}
  28.192 +			break;
  28.193 +		case 'C':
  28.194 +			if (memcmp(line, "CT_", 3)) {
  28.195 +				conf_warning("unexpected data");
  28.196 +				continue;
  28.197 +			}
  28.198 +			p = strchr(line + 3, '=');
  28.199 +			if (!p)
  28.200 +				continue;
  28.201 +			*p++ = 0;
  28.202 +			p2 = strchr(p, '\n');
  28.203 +			if (p2) {
  28.204 +				*p2-- = 0;
  28.205 +				if (*p2 == '\r')
  28.206 +					*p2 = 0;
  28.207 +			}
  28.208 +			if (def == S_DEF_USER) {
  28.209 +				sym = sym_find(line + 3);
  28.210 +				if (!sym) {
  28.211 +					conf_warning("trying to assign nonexistent symbol %s", line + 3);
  28.212 +					break;
  28.213 +				}
  28.214 +			} else {
  28.215 +				sym = sym_lookup(line + 3, 0);
  28.216 +				if (sym->type == S_UNKNOWN)
  28.217 +					sym->type = S_OTHER;
  28.218 +			}
  28.219 +			if (sym->flags & def_flags) {
  28.220 +				conf_warning("trying to reassign symbol %s", sym->name);
  28.221 +				break;
  28.222 +			}
  28.223 +			switch (sym->type) {
  28.224 +			case S_TRISTATE:
  28.225 +				if (p[0] == 'm') {
  28.226 +					sym->def[def].tri = mod;
  28.227 +					sym->flags |= def_flags;
  28.228 +					break;
  28.229 +				}
  28.230 +			case S_BOOLEAN:
  28.231 +				if (p[0] == 'y') {
  28.232 +					sym->def[def].tri = yes;
  28.233 +					sym->flags |= def_flags;
  28.234 +					break;
  28.235 +				}
  28.236 +				if (p[0] == 'n') {
  28.237 +					sym->def[def].tri = no;
  28.238 +					sym->flags |= def_flags;
  28.239 +					break;
  28.240 +				}
  28.241 +				conf_warning("symbol value '%s' invalid for %s", p, sym->name);
  28.242 +				break;
  28.243 +			case S_OTHER:
  28.244 +				if (*p != '"') {
  28.245 +					for (p2 = p; *p2 && !isspace(*p2); p2++)
  28.246 +						;
  28.247 +					sym->type = S_STRING;
  28.248 +					goto done;
  28.249 +				}
  28.250 +			case S_STRING:
  28.251 +				if (*p++ != '"')
  28.252 +					break;
  28.253 +				for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) {
  28.254 +					if (*p2 == '"') {
  28.255 +						*p2 = 0;
  28.256 +						break;
  28.257 +					}
  28.258 +					memmove(p2, p2 + 1, strlen(p2));
  28.259 +				}
  28.260 +				if (!p2) {
  28.261 +					conf_warning("invalid string found");
  28.262 +					continue;
  28.263 +				}
  28.264 +			case S_INT:
  28.265 +			case S_HEX:
  28.266 +			done:
  28.267 +				if (sym_string_valid(sym, p)) {
  28.268 +					sym->def[def].val = strdup(p);
  28.269 +					sym->flags |= def_flags;
  28.270 +				} else {
  28.271 +					conf_warning("symbol value '%s' invalid for %s", p, sym->name);
  28.272 +					continue;
  28.273 +				}
  28.274 +				break;
  28.275 +			default:
  28.276 +				;
  28.277 +			}
  28.278 +			break;
  28.279 +		case '\r':
  28.280 +		case '\n':
  28.281 +			break;
  28.282 +		default:
  28.283 +			conf_warning("unexpected data");
  28.284 +			continue;
  28.285 +		}
  28.286 +		if (sym && sym_is_choice_value(sym)) {
  28.287 +			struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
  28.288 +			switch (sym->def[def].tri) {
  28.289 +			case no:
  28.290 +				break;
  28.291 +			case mod:
  28.292 +				if (cs->def[def].tri == yes) {
  28.293 +					conf_warning("%s creates inconsistent choice state", sym->name);
  28.294 +					cs->flags &= ~def_flags;
  28.295 +				}
  28.296 +				break;
  28.297 +			case yes:
  28.298 +				if (cs->def[def].tri != no) {
  28.299 +					conf_warning("%s creates inconsistent choice state", sym->name);
  28.300 +					cs->flags &= ~def_flags;
  28.301 +				} else
  28.302 +					cs->def[def].val = sym;
  28.303 +				break;
  28.304 +			}
  28.305 +			cs->def[def].tri = E_OR(cs->def[def].tri, sym->def[def].tri);
  28.306 +		}
  28.307 +	}
  28.308 +	fclose(in);
  28.309 +
  28.310 +	if (modules_sym)
  28.311 +		sym_calc_value(modules_sym);
  28.312 +	return 0;
  28.313 +}
  28.314 +
  28.315 +int conf_read(const char *name)
  28.316 +{
  28.317 +	struct symbol *sym;
  28.318 +	struct property *prop;
  28.319 +	struct expr *e;
  28.320 +	int i, flags;
  28.321 +
  28.322 +	sym_change_count = 0;
  28.323 +
  28.324 +	if (conf_read_simple(name, S_DEF_USER))
  28.325 +		return 1;
  28.326 +
  28.327 +	for_all_symbols(i, sym) {
  28.328 +		sym_calc_value(sym);
  28.329 +		if (sym_is_choice(sym) || (sym->flags & SYMBOL_AUTO))
  28.330 +			goto sym_ok;
  28.331 +		if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) {
  28.332 +			/* check that calculated value agrees with saved value */
  28.333 +			switch (sym->type) {
  28.334 +			case S_BOOLEAN:
  28.335 +			case S_TRISTATE:
  28.336 +				if (sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym))
  28.337 +					break;
  28.338 +				if (!sym_is_choice(sym))
  28.339 +					goto sym_ok;
  28.340 +			default:
  28.341 +				if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))
  28.342 +					goto sym_ok;
  28.343 +				break;
  28.344 +			}
  28.345 +		} else if (!sym_has_value(sym) && !(sym->flags & SYMBOL_WRITE))
  28.346 +			/* no previous value and not saved */
  28.347 +			goto sym_ok;
  28.348 +		conf_unsaved++;
  28.349 +		/* maybe print value in verbose mode... */
  28.350 +	sym_ok:
  28.351 +		if (sym_has_value(sym) && !sym_is_choice_value(sym)) {
  28.352 +			if (sym->visible == no)
  28.353 +				sym->flags &= ~SYMBOL_DEF_USER;
  28.354 +			switch (sym->type) {
  28.355 +			case S_STRING:
  28.356 +			case S_INT:
  28.357 +			case S_HEX:
  28.358 +				if (!sym_string_within_range(sym, sym->def[S_DEF_USER].val))
  28.359 +					sym->flags &= ~(SYMBOL_VALID|SYMBOL_DEF_USER);
  28.360 +			default:
  28.361 +				break;
  28.362 +			}
  28.363 +		}
  28.364 +		if (!sym_is_choice(sym))
  28.365 +			continue;
  28.366 +		prop = sym_get_choice_prop(sym);
  28.367 +		flags = sym->flags;
  28.368 +		for (e = prop->expr; e; e = e->left.expr)
  28.369 +			if (e->right.sym->visible != no)
  28.370 +				flags &= e->right.sym->flags;
  28.371 +		sym->flags &= flags | ~SYMBOL_DEF_USER;
  28.372 +	}
  28.373 +
  28.374 +	sym_change_count += conf_warnings || conf_unsaved;
  28.375 +
  28.376 +	return 0;
  28.377 +}
  28.378 +
  28.379 +struct menu *next_menu(struct menu *menu)
  28.380 +{
  28.381 +	if (menu->list) return menu->list;
  28.382 +	do {
  28.383 +		if (menu->next) {
  28.384 +			menu = menu->next;
  28.385 +			break;
  28.386 +		}
  28.387 +	} while ((menu = menu->parent));
  28.388 +
  28.389 +	return menu;
  28.390 +}
  28.391 +
  28.392 +#define SYMBOL_FORCEWRITE (1<<31)
  28.393 +
  28.394 +int conf_write(const char *name)
  28.395 +{
  28.396 +	FILE *out;
  28.397 +	struct symbol *sym;
  28.398 +	struct menu *menu;
  28.399 +	const char *basename;
  28.400 +	char dirname[128], tmpname[128], newname[128];
  28.401 +	int type, l, writetype;
  28.402 +	const char *str;
  28.403 +	time_t now;
  28.404 +	int use_timestamp = 1;
  28.405 +	char *env;
  28.406 +
  28.407 +	dirname[0] = 0;
  28.408 +	if (name && name[0]) {
  28.409 +		struct stat st;
  28.410 +		char *slash;
  28.411 +
  28.412 +		if (!stat(name, &st) && S_ISDIR(st.st_mode)) {
  28.413 +			strcpy(dirname, name);
  28.414 +			strcat(dirname, "/");
  28.415 +			basename = conf_get_configname();
  28.416 +		} else if ((slash = strrchr(name, '/'))) {
  28.417 +			int size = slash - name + 1;
  28.418 +			memcpy(dirname, name, size);
  28.419 +			dirname[size] = 0;
  28.420 +			if (slash[1])
  28.421 +				basename = slash + 1;
  28.422 +			else
  28.423 +				basename = conf_get_configname();
  28.424 +		} else
  28.425 +			basename = name;
  28.426 +	} else
  28.427 +		basename = conf_get_configname();
  28.428 +
  28.429 +	sprintf(newname, "%s%s", dirname, basename);
  28.430 +	env = getenv("KCONFIG_OVERWRITECONFIG");
  28.431 +	if (!env || !*env) {
  28.432 +		sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
  28.433 +		out = fopen(tmpname, "w");
  28.434 +	} else {
  28.435 +		*tmpname = 0;
  28.436 +		out = fopen(newname, "w");
  28.437 +	}
  28.438 +	if (!out)
  28.439 +		return 1;
  28.440 +
  28.441 +	sym = sym_lookup("PROJECTVERSION", 0);
  28.442 +	sym_calc_value(sym);
  28.443 +	time(&now);
  28.444 +	env = getenv("KCONFIG_NOTIMESTAMP");
  28.445 +	if (env && *env)
  28.446 +		use_timestamp = 0;
  28.447 +
  28.448 +	fprintf(out, _("#\n"
  28.449 +		       "# Automatically generated make config: don't edit\n"
  28.450 +		       "# "PROJECT_NAME" version: %s\n"
  28.451 +		       "%s%s"
  28.452 +		       "#\n"),
  28.453 +		     sym_get_string_value(sym),
  28.454 +		     use_timestamp ? "# " : "",
  28.455 +		     use_timestamp ? ctime(&now) : "");
  28.456 +
  28.457 +	if (!sym_change_count)
  28.458 +		sym_clear_all_valid();
  28.459 +
  28.460 +	// Write out all symbols (even in closed sub-menus).
  28.461 +	if (1) {
  28.462 +		for (menu = rootmenu.list; menu; menu = next_menu(menu))
  28.463 +			if (menu->sym) menu->sym->flags |= SYMBOL_FORCEWRITE;
  28.464 +		writetype = SYMBOL_FORCEWRITE;
  28.465 +
  28.466 +	// Don't write  out symbols in closed menus.
  28.467 +
  28.468 +	} else writetype = SYMBOL_WRITE;
  28.469 +
  28.470 +
  28.471 +	menu = rootmenu.list;
  28.472 +	while (menu) {
  28.473 +		sym = menu->sym;
  28.474 +		if (!sym) {
  28.475 +			if (!menu_is_visible(menu))
  28.476 +				goto next;
  28.477 +			str = menu_get_prompt(menu);
  28.478 +			fprintf(out, "\n"
  28.479 +				     "#\n"
  28.480 +				     "# %s\n"
  28.481 +				     "#\n", str);
  28.482 +		} else if (!(sym->flags & SYMBOL_CHOICE)) {
  28.483 +			sym_calc_value(sym);
  28.484 +			if (!(sym->flags & writetype))
  28.485 +				goto next;
  28.486 +			sym->flags &= ~writetype;
  28.487 +			type = sym->type;
  28.488 +			if (type == S_TRISTATE) {
  28.489 +				sym_calc_value(modules_sym);
  28.490 +				if (modules_sym->curr.tri == no)
  28.491 +					type = S_BOOLEAN;
  28.492 +			}
  28.493 +			switch (type) {
  28.494 +			case S_BOOLEAN:
  28.495 +			case S_TRISTATE:
  28.496 +				switch (sym_get_tristate_value(sym)) {
  28.497 +				case no:
  28.498 +					fprintf(out, "# CT_%s is not set\n", sym->name);
  28.499 +					break;
  28.500 +				case mod:
  28.501 +					fprintf(out, "CT_%s=m\n", sym->name);
  28.502 +					break;
  28.503 +				case yes:
  28.504 +					fprintf(out, "CT_%s=y\n", sym->name);
  28.505 +					break;
  28.506 +				}
  28.507 +				break;
  28.508 +			case S_STRING:
  28.509 +				str = sym_get_string_value(sym);
  28.510 +				fprintf(out, "CT_%s=\"", sym->name);
  28.511 +				while (1) {
  28.512 +					l = strcspn(str, "\"\\");
  28.513 +					if (l) {
  28.514 +						fwrite(str, l, 1, out);
  28.515 +						str += l;
  28.516 +					}
  28.517 +					if (!*str)
  28.518 +						break;
  28.519 +					fprintf(out, "\\%c", *str++);
  28.520 +				}
  28.521 +				fputs("\"\n", out);
  28.522 +				break;
  28.523 +			case S_HEX:
  28.524 +				str = sym_get_string_value(sym);
  28.525 +				if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
  28.526 +					fprintf(out, "CT_%s=%s\n", sym->name, *str ? str : "0");
  28.527 +					break;
  28.528 +				}
  28.529 +			case S_INT:
  28.530 +				str = sym_get_string_value(sym);
  28.531 +				fprintf(out, "CT_%s=%s\n", sym->name, *str ? str : "0");
  28.532 +				break;
  28.533 +			}
  28.534 +		}
  28.535 +
  28.536 +	next:
  28.537 +		if (writetype == SYMBOL_WRITE) {
  28.538 +			if (menu->list) {
  28.539 +				menu = menu->list;
  28.540 +				continue;
  28.541 +			}
  28.542 +			if (menu->next)
  28.543 +				menu = menu->next;
  28.544 +			else while ((menu = menu->parent)) {
  28.545 +				if (menu->next) {
  28.546 +					menu = menu->next;
  28.547 +					break;
  28.548 +				}
  28.549 +			}
  28.550 +		} else
  28.551 +			menu = next_menu(menu);
  28.552 +	}
  28.553 +	fclose(out);
  28.554 +
  28.555 +	if (*tmpname) {
  28.556 +		strcat(dirname, basename);
  28.557 +		strcat(dirname, ".old");
  28.558 +		rename(newname, dirname);
  28.559 +		if (rename(tmpname, newname))
  28.560 +			return 1;
  28.561 +	}
  28.562 +
  28.563 +	printf(_("#\n"
  28.564 +		 "# configuration written to %s\n"
  28.565 +		 "#\n"), newname);
  28.566 +
  28.567 +	sym_change_count = 0;
  28.568 +
  28.569 +	return 0;
  28.570 +}
  28.571 +
  28.572 +int conf_split_config(void)
  28.573 +{
  28.574 +	char *name, path[128];
  28.575 +	char *s, *d, c;
  28.576 +	struct symbol *sym;
  28.577 +	struct stat sb;
  28.578 +	int res, i, fd;
  28.579 +
  28.580 +	name = getenv("KCONFIG_AUTOCONFIG");
  28.581 +	if (!name)
  28.582 +		name = "include/config/auto.conf";
  28.583 +	conf_read_simple(name, S_DEF_AUTO);
  28.584 +
  28.585 +	if (chdir("include/config"))
  28.586 +		return 1;
  28.587 +
  28.588 +	res = 0;
  28.589 +	for_all_symbols(i, sym) {
  28.590 +		sym_calc_value(sym);
  28.591 +		if ((sym->flags & SYMBOL_AUTO) || !sym->name)
  28.592 +			continue;
  28.593 +		if (sym->flags & SYMBOL_WRITE) {
  28.594 +			if (sym->flags & SYMBOL_DEF_AUTO) {
  28.595 +				/*
  28.596 +				 * symbol has old and new value,
  28.597 +				 * so compare them...
  28.598 +				 */
  28.599 +				switch (sym->type) {
  28.600 +				case S_BOOLEAN:
  28.601 +				case S_TRISTATE:
  28.602 +					if (sym_get_tristate_value(sym) ==
  28.603 +					    sym->def[S_DEF_AUTO].tri)
  28.604 +						continue;
  28.605 +					break;
  28.606 +				case S_STRING:
  28.607 +				case S_HEX:
  28.608 +				case S_INT:
  28.609 +					if (!strcmp(sym_get_string_value(sym),
  28.610 +						    sym->def[S_DEF_AUTO].val))
  28.611 +						continue;
  28.612 +					break;
  28.613 +				default:
  28.614 +					break;
  28.615 +				}
  28.616 +			} else {
  28.617 +				/*
  28.618 +				 * If there is no old value, only 'no' (unset)
  28.619 +				 * is allowed as new value.
  28.620 +				 */
  28.621 +				switch (sym->type) {
  28.622 +				case S_BOOLEAN:
  28.623 +				case S_TRISTATE:
  28.624 +					if (sym_get_tristate_value(sym) == no)
  28.625 +						continue;
  28.626 +					break;
  28.627 +				default:
  28.628 +					break;
  28.629 +				}
  28.630 +			}
  28.631 +		} else if (!(sym->flags & SYMBOL_DEF_AUTO))
  28.632 +			/* There is neither an old nor a new value. */
  28.633 +			continue;
  28.634 +		/* else
  28.635 +		 *	There is an old value, but no new value ('no' (unset)
  28.636 +		 *	isn't saved in auto.conf, so the old value is always
  28.637 +		 *	different from 'no').
  28.638 +		 */
  28.639 +
  28.640 +		/* Replace all '_' and append ".h" */
  28.641 +		s = sym->name;
  28.642 +		d = path;
  28.643 +		while ((c = *s++)) {
  28.644 +			c = tolower(c);
  28.645 +			*d++ = (c == '_') ? '/' : c;
  28.646 +		}
  28.647 +		strcpy(d, ".h");
  28.648 +
  28.649 +		/* Assume directory path already exists. */
  28.650 +		fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
  28.651 +		if (fd == -1) {
  28.652 +			if (errno != ENOENT) {
  28.653 +				res = 1;
  28.654 +				break;
  28.655 +			}
  28.656 +			/*
  28.657 +			 * Create directory components,
  28.658 +			 * unless they exist already.
  28.659 +			 */
  28.660 +			d = path;
  28.661 +			while ((d = strchr(d, '/'))) {
  28.662 +				*d = 0;
  28.663 +				if (stat(path, &sb) && mkdir(path, 0755)) {
  28.664 +					res = 1;
  28.665 +					goto out;
  28.666 +				}
  28.667 +				*d++ = '/';
  28.668 +			}
  28.669 +			/* Try it again. */
  28.670 +			fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
  28.671 +			if (fd == -1) {
  28.672 +				res = 1;
  28.673 +				break;
  28.674 +			}
  28.675 +		}
  28.676 +		close(fd);
  28.677 +	}
  28.678 +out:
  28.679 +	if (chdir("../.."))
  28.680 +		return 1;
  28.681 +
  28.682 +	return res;
  28.683 +}
  28.684 +
  28.685 +int conf_write_autoconf(void)
  28.686 +{
  28.687 +	struct symbol *sym;
  28.688 +	const char *str;
  28.689 +	char *name;
  28.690 +	FILE *out, *out_h;
  28.691 +	time_t now;
  28.692 +	int i, l;
  28.693 +
  28.694 +	sym_clear_all_valid();
  28.695 +
  28.696 +	file_write_dep("include/config/auto.conf.cmd");
  28.697 +
  28.698 +	if (conf_split_config())
  28.699 +		return 1;
  28.700 +
  28.701 +	out = fopen(".tmpconfig", "w");
  28.702 +	if (!out)
  28.703 +		return 1;
  28.704 +
  28.705 +	out_h = fopen(".tmpconfig.h", "w");
  28.706 +	if (!out_h) {
  28.707 +		fclose(out);
  28.708 +		return 1;
  28.709 +	}
  28.710 +
  28.711 +	sym = sym_lookup("PROJECTVERSION", 0);
  28.712 +	sym_calc_value(sym);
  28.713 +	time(&now);
  28.714 +	fprintf(out, "#\n"
  28.715 +		     "# Automatically generated make config: don't edit\n"
  28.716 +		     "# "PROJECT_NAME" version: %s\n"
  28.717 +		     "# %s"
  28.718 +		     "#\n",
  28.719 +		     sym_get_string_value(sym), ctime(&now));
  28.720 +	fprintf(out_h, "/*\n"
  28.721 +		       " * Automatically generated C config: don't edit\n"
  28.722 +		       " * "PROJECT_NAME" version: %s\n"
  28.723 +		       " * %s"
  28.724 +		       " */\n"
  28.725 +		       "#define AUTOCONF_INCLUDED\n",
  28.726 +		       sym_get_string_value(sym), ctime(&now));
  28.727 +
  28.728 +	for_all_symbols(i, sym) {
  28.729 +		sym_calc_value(sym);
  28.730 +		if (!(sym->flags & SYMBOL_WRITE) || !sym->name)
  28.731 +			continue;
  28.732 +		switch (sym->type) {
  28.733 +		case S_BOOLEAN:
  28.734 +		case S_TRISTATE:
  28.735 +			switch (sym_get_tristate_value(sym)) {
  28.736 +			case no:
  28.737 +				break;
  28.738 +			case mod:
  28.739 +				fprintf(out, "CT_%s=m\n", sym->name);
  28.740 +				fprintf(out_h, "#define CT_%s_MODULE 1\n", sym->name);
  28.741 +				break;
  28.742 +			case yes:
  28.743 +				fprintf(out, "CT_%s=y\n", sym->name);
  28.744 +				fprintf(out_h, "#define CT_%s 1\n", sym->name);
  28.745 +				break;
  28.746 +			}
  28.747 +			break;
  28.748 +		case S_STRING:
  28.749 +			str = sym_get_string_value(sym);
  28.750 +			fprintf(out, "CT_%s=\"", sym->name);
  28.751 +			fprintf(out_h, "#define CT_%s \"", sym->name);
  28.752 +			while (1) {
  28.753 +				l = strcspn(str, "\"\\");
  28.754 +				if (l) {
  28.755 +					fwrite(str, l, 1, out);
  28.756 +					fwrite(str, l, 1, out_h);
  28.757 +					str += l;
  28.758 +				}
  28.759 +				if (!*str)
  28.760 +					break;
  28.761 +				fprintf(out, "\\%c", *str);
  28.762 +				fprintf(out_h, "\\%c", *str);
  28.763 +				str++;
  28.764 +			}
  28.765 +			fputs("\"\n", out);
  28.766 +			fputs("\"\n", out_h);
  28.767 +			break;
  28.768 +		case S_HEX:
  28.769 +			str = sym_get_string_value(sym);
  28.770 +			if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
  28.771 +				fprintf(out, "CT_%s=%s\n", sym->name, str);
  28.772 +				fprintf(out_h, "#define CT_%s 0x%s\n", sym->name, str);
  28.773 +				break;
  28.774 +			}
  28.775 +		case S_INT:
  28.776 +			str = sym_get_string_value(sym);
  28.777 +			fprintf(out, "CT_%s=%s\n", sym->name, str);
  28.778 +			fprintf(out_h, "#define CT_%s %s\n", sym->name, str);
  28.779 +			break;
  28.780 +		default:
  28.781 +			break;
  28.782 +		}
  28.783 +	}
  28.784 +	fclose(out);
  28.785 +	fclose(out_h);
  28.786 +
  28.787 +	name = getenv("KCONFIG_AUTOHEADER");
  28.788 +	if (!name)
  28.789 +		name = "include/linux/autoconf.h";
  28.790 +	if (rename(".tmpconfig.h", name))
  28.791 +		return 1;
  28.792 +	name = getenv("KCONFIG_AUTOCONFIG");
  28.793 +	if (!name)
  28.794 +		name = "include/config/auto.conf";
  28.795 +	/*
  28.796 +	 * This must be the last step, kbuild has a dependency on auto.conf
  28.797 +	 * and this marks the successful completion of the previous steps.
  28.798 +	 */
  28.799 +	if (rename(".tmpconfig", name))
  28.800 +		return 1;
  28.801 +
  28.802 +	return 0;
  28.803 +}
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/kconfig/expr.c	Sat Feb 24 11:00:05 2007 +0000
    29.3 @@ -0,0 +1,1100 @@
    29.4 +/*
    29.5 + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
    29.6 + * Released under the terms of the GNU GPL v2.0.
    29.7 + */
    29.8 +
    29.9 +#include <stdio.h>
   29.10 +#include <stdlib.h>
   29.11 +#include <string.h>
   29.12 +
   29.13 +#define LKC_DIRECT_LINK
   29.14 +#include "lkc.h"
   29.15 +
   29.16 +#define DEBUG_EXPR	0
   29.17 +
   29.18 +struct expr *expr_alloc_symbol(struct symbol *sym)
   29.19 +{
   29.20 +	struct expr *e = malloc(sizeof(*e));
   29.21 +	memset(e, 0, sizeof(*e));
   29.22 +	e->type = E_SYMBOL;
   29.23 +	e->left.sym = sym;
   29.24 +	return e;
   29.25 +}
   29.26 +
   29.27 +struct expr *expr_alloc_one(enum expr_type type, struct expr *ce)
   29.28 +{
   29.29 +	struct expr *e = malloc(sizeof(*e));
   29.30 +	memset(e, 0, sizeof(*e));
   29.31 +	e->type = type;
   29.32 +	e->left.expr = ce;
   29.33 +	return e;
   29.34 +}
   29.35 +
   29.36 +struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2)
   29.37 +{
   29.38 +	struct expr *e = malloc(sizeof(*e));
   29.39 +	memset(e, 0, sizeof(*e));
   29.40 +	e->type = type;
   29.41 +	e->left.expr = e1;
   29.42 +	e->right.expr = e2;
   29.43 +	return e;
   29.44 +}
   29.45 +
   29.46 +struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2)
   29.47 +{
   29.48 +	struct expr *e = malloc(sizeof(*e));
   29.49 +	memset(e, 0, sizeof(*e));
   29.50 +	e->type = type;
   29.51 +	e->left.sym = s1;
   29.52 +	e->right.sym = s2;
   29.53 +	return e;
   29.54 +}
   29.55 +
   29.56 +struct expr *expr_alloc_and(struct expr *e1, struct expr *e2)
   29.57 +{
   29.58 +	if (!e1)
   29.59 +		return e2;
   29.60 +	return e2 ? expr_alloc_two(E_AND, e1, e2) : e1;
   29.61 +}
   29.62 +
   29.63 +struct expr *expr_alloc_or(struct expr *e1, struct expr *e2)
   29.64 +{
   29.65 +	if (!e1)
   29.66 +		return e2;
   29.67 +	return e2 ? expr_alloc_two(E_OR, e1, e2) : e1;
   29.68 +}
   29.69 +
   29.70 +struct expr *expr_copy(struct expr *org)
   29.71 +{
   29.72 +	struct expr *e;
   29.73 +
   29.74 +	if (!org)
   29.75 +		return NULL;
   29.76 +
   29.77 +	e = malloc(sizeof(*org));
   29.78 +	memcpy(e, org, sizeof(*org));
   29.79 +	switch (org->type) {
   29.80 +	case E_SYMBOL:
   29.81 +		e->left = org->left;
   29.82 +		break;
   29.83 +	case E_NOT:
   29.84 +		e->left.expr = expr_copy(org->left.expr);
   29.85 +		break;
   29.86 +	case E_EQUAL:
   29.87 +	case E_UNEQUAL:
   29.88 +		e->left.sym = org->left.sym;
   29.89 +		e->right.sym = org->right.sym;
   29.90 +		break;
   29.91 +	case E_AND:
   29.92 +	case E_OR:
   29.93 +	case E_CHOICE:
   29.94 +		e->left.expr = expr_copy(org->left.expr);
   29.95 +		e->right.expr = expr_copy(org->right.expr);
   29.96 +		break;
   29.97 +	default:
   29.98 +		printf("can't copy type %d\n", e->type);
   29.99 +		free(e);
  29.100 +		e = NULL;
  29.101 +		break;
  29.102 +	}
  29.103 +
  29.104 +	return e;
  29.105 +}
  29.106 +
  29.107 +void expr_free(struct expr *e)
  29.108 +{
  29.109 +	if (!e)
  29.110 +		return;
  29.111 +
  29.112 +	switch (e->type) {
  29.113 +	case E_SYMBOL:
  29.114 +		break;
  29.115 +	case E_NOT:
  29.116 +		expr_free(e->left.expr);
  29.117 +		return;
  29.118 +	case E_EQUAL:
  29.119 +	case E_UNEQUAL:
  29.120 +		break;
  29.121 +	case E_OR:
  29.122 +	case E_AND:
  29.123 +		expr_free(e->left.expr);
  29.124 +		expr_free(e->right.expr);
  29.125 +		break;
  29.126 +	default:
  29.127 +		printf("how to free type %d?\n", e->type);
  29.128 +		break;
  29.129 +	}
  29.130 +	free(e);
  29.131 +}
  29.132 +
  29.133 +static int trans_count;
  29.134 +
  29.135 +#define e1 (*ep1)
  29.136 +#define e2 (*ep2)
  29.137 +
  29.138 +static void __expr_eliminate_eq(enum expr_type type, struct expr **ep1, struct expr **ep2)
  29.139 +{
  29.140 +	if (e1->type == type) {
  29.141 +		__expr_eliminate_eq(type, &e1->left.expr, &e2);
  29.142 +		__expr_eliminate_eq(type, &e1->right.expr, &e2);
  29.143 +		return;
  29.144 +	}
  29.145 +	if (e2->type == type) {
  29.146 +		__expr_eliminate_eq(type, &e1, &e2->left.expr);
  29.147 +		__expr_eliminate_eq(type, &e1, &e2->right.expr);
  29.148 +		return;
  29.149 +	}
  29.150 +	if (e1->type == E_SYMBOL && e2->type == E_SYMBOL &&
  29.151 +	    e1->left.sym == e2->left.sym &&
  29.152 +	    (e1->left.sym == &symbol_yes || e1->left.sym == &symbol_no))
  29.153 +		return;
  29.154 +	if (!expr_eq(e1, e2))
  29.155 +		return;
  29.156 +	trans_count++;
  29.157 +	expr_free(e1); expr_free(e2);
  29.158 +	switch (type) {
  29.159 +	case E_OR:
  29.160 +		e1 = expr_alloc_symbol(&symbol_no);
  29.161 +		e2 = expr_alloc_symbol(&symbol_no);
  29.162 +		break;
  29.163 +	case E_AND:
  29.164 +		e1 = expr_alloc_symbol(&symbol_yes);
  29.165 +		e2 = expr_alloc_symbol(&symbol_yes);
  29.166 +		break;
  29.167 +	default:
  29.168 +		;
  29.169 +	}
  29.170 +}
  29.171 +
  29.172 +void expr_eliminate_eq(struct expr **ep1, struct expr **ep2)
  29.173 +{
  29.174 +	if (!e1 || !e2)
  29.175 +		return;
  29.176 +	switch (e1->type) {
  29.177 +	case E_OR:
  29.178 +	case E_AND:
  29.179 +		__expr_eliminate_eq(e1->type, ep1, ep2);
  29.180 +	default:
  29.181 +		;
  29.182 +	}
  29.183 +	if (e1->type != e2->type) switch (e2->type) {
  29.184 +	case E_OR:
  29.185 +	case E_AND:
  29.186 +		__expr_eliminate_eq(e2->type, ep1, ep2);
  29.187 +	default:
  29.188 +		;
  29.189 +	}
  29.190 +	e1 = expr_eliminate_yn(e1);
  29.191 +	e2 = expr_eliminate_yn(e2);
  29.192 +}
  29.193 +
  29.194 +#undef e1
  29.195 +#undef e2
  29.196 +
  29.197 +int expr_eq(struct expr *e1, struct expr *e2)
  29.198 +{
  29.199 +	int res, old_count;
  29.200 +
  29.201 +	if (e1->type != e2->type)
  29.202 +		return 0;
  29.203 +	switch (e1->type) {
  29.204 +	case E_EQUAL:
  29.205 +	case E_UNEQUAL:
  29.206 +		return e1->left.sym == e2->left.sym && e1->right.sym == e2->right.sym;
  29.207 +	case E_SYMBOL:
  29.208 +		return e1->left.sym == e2->left.sym;
  29.209 +	case E_NOT:
  29.210 +		return expr_eq(e1->left.expr, e2->left.expr);
  29.211 +	case E_AND:
  29.212 +	case E_OR:
  29.213 +		e1 = expr_copy(e1);
  29.214 +		e2 = expr_copy(e2);
  29.215 +		old_count = trans_count;
  29.216 +		expr_eliminate_eq(&e1, &e2);
  29.217 +		res = (e1->type == E_SYMBOL && e2->type == E_SYMBOL &&
  29.218 +		       e1->left.sym == e2->left.sym);
  29.219 +		expr_free(e1);
  29.220 +		expr_free(e2);
  29.221 +		trans_count = old_count;
  29.222 +		return res;
  29.223 +	case E_CHOICE:
  29.224 +	case E_RANGE:
  29.225 +	case E_NONE:
  29.226 +		/* panic */;
  29.227 +	}
  29.228 +
  29.229 +	if (DEBUG_EXPR) {
  29.230 +		expr_fprint(e1, stdout);
  29.231 +		printf(" = ");
  29.232 +		expr_fprint(e2, stdout);
  29.233 +		printf(" ?\n");
  29.234 +	}
  29.235 +
  29.236 +	return 0;
  29.237 +}
  29.238 +
  29.239 +struct expr *expr_eliminate_yn(struct expr *e)
  29.240 +{
  29.241 +	struct expr *tmp;
  29.242 +
  29.243 +	if (e) switch (e->type) {
  29.244 +	case E_AND:
  29.245 +		e->left.expr = expr_eliminate_yn(e->left.expr);
  29.246 +		e->right.expr = expr_eliminate_yn(e->right.expr);
  29.247 +		if (e->left.expr->type == E_SYMBOL) {
  29.248 +			if (e->left.expr->left.sym == &symbol_no) {
  29.249 +				expr_free(e->left.expr);
  29.250 +				expr_free(e->right.expr);
  29.251 +				e->type = E_SYMBOL;
  29.252 +				e->left.sym = &symbol_no;
  29.253 +				e->right.expr = NULL;
  29.254 +				return e;
  29.255 +			} else if (e->left.expr->left.sym == &symbol_yes) {
  29.256 +				free(e->left.expr);
  29.257 +				tmp = e->right.expr;
  29.258 +				*e = *(e->right.expr);
  29.259 +				free(tmp);
  29.260 +				return e;
  29.261 +			}
  29.262 +		}
  29.263 +		if (e->right.expr->type == E_SYMBOL) {
  29.264 +			if (e->right.expr->left.sym == &symbol_no) {
  29.265 +				expr_free(e->left.expr);
  29.266 +				expr_free(e->right.expr);
  29.267 +				e->type = E_SYMBOL;
  29.268 +				e->left.sym = &symbol_no;
  29.269 +				e->right.expr = NULL;
  29.270 +				return e;
  29.271 +			} else if (e->right.expr->left.sym == &symbol_yes) {
  29.272 +				free(e->right.expr);
  29.273 +				tmp = e->left.expr;
  29.274 +				*e = *(e->left.expr);
  29.275 +				free(tmp);
  29.276 +				return e;
  29.277 +			}
  29.278 +		}
  29.279 +		break;
  29.280 +	case E_OR:
  29.281 +		e->left.expr = expr_eliminate_yn(e->left.expr);
  29.282 +		e->right.expr = expr_eliminate_yn(e->right.expr);
  29.283 +		if (e->left.expr->type == E_SYMBOL) {
  29.284 +			if (e->left.expr->left.sym == &symbol_no) {
  29.285 +				free(e->left.expr);
  29.286 +				tmp = e->right.expr;
  29.287 +				*e = *(e->right.expr);
  29.288 +				free(tmp);
  29.289 +				return e;
  29.290 +			} else if (e->left.expr->left.sym == &symbol_yes) {
  29.291 +				expr_free(e->left.expr);
  29.292 +				expr_free(e->right.expr);
  29.293 +				e->type = E_SYMBOL;
  29.294 +				e->left.sym = &symbol_yes;
  29.295 +				e->right.expr = NULL;
  29.296 +				return e;
  29.297 +			}
  29.298 +		}
  29.299 +		if (e->right.expr->type == E_SYMBOL) {
  29.300 +			if (e->right.expr->left.sym == &symbol_no) {
  29.301 +				free(e->right.expr);
  29.302 +				tmp = e->left.expr;
  29.303 +				*e = *(e->left.expr);
  29.304 +				free(tmp);
  29.305 +				return e;
  29.306 +			} else if (e->right.expr->left.sym == &symbol_yes) {
  29.307 +				expr_free(e->left.expr);
  29.308 +				expr_free(e->right.expr);
  29.309 +				e->type = E_SYMBOL;
  29.310 +				e->left.sym = &symbol_yes;
  29.311 +				e->right.expr = NULL;
  29.312 +				return e;
  29.313 +			}
  29.314 +		}
  29.315 +		break;
  29.316 +	default:
  29.317 +		;
  29.318 +	}
  29.319 +	return e;
  29.320 +}
  29.321 +
  29.322 +/*
  29.323 + * bool FOO!=n => FOO
  29.324 + */
  29.325 +struct expr *expr_trans_bool(struct expr *e)
  29.326 +{
  29.327 +	if (!e)
  29.328 +		return NULL;
  29.329 +	switch (e->type) {
  29.330 +	case E_AND:
  29.331 +	case E_OR:
  29.332 +	case E_NOT:
  29.333 +		e->left.expr = expr_trans_bool(e->left.expr);
  29.334 +		e->right.expr = expr_trans_bool(e->right.expr);
  29.335 +		break;
  29.336 +	case E_UNEQUAL:
  29.337 +		// FOO!=n -> FOO
  29.338 +		if (e->left.sym->type == S_TRISTATE) {
  29.339 +			if (e->right.sym == &symbol_no) {
  29.340 +				e->type = E_SYMBOL;
  29.341 +				e->right.sym = NULL;
  29.342 +			}
  29.343 +		}
  29.344 +		break;
  29.345 +	default:
  29.346 +		;
  29.347 +	}
  29.348 +	return e;
  29.349 +}
  29.350 +
  29.351 +/*
  29.352 + * e1 || e2 -> ?
  29.353 + */
  29.354 +struct expr *expr_join_or(struct expr *e1, struct expr *e2)
  29.355 +{
  29.356 +	struct expr *tmp;
  29.357 +	struct symbol *sym1, *sym2;
  29.358 +
  29.359 +	if (expr_eq(e1, e2))
  29.360 +		return expr_copy(e1);
  29.361 +	if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT)
  29.362 +		return NULL;
  29.363 +	if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT)
  29.364 +		return NULL;
  29.365 +	if (e1->type == E_NOT) {
  29.366 +		tmp = e1->left.expr;
  29.367 +		if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL)
  29.368 +			return NULL;
  29.369 +		sym1 = tmp->left.sym;
  29.370 +	} else
  29.371 +		sym1 = e1->left.sym;
  29.372 +	if (e2->type == E_NOT) {
  29.373 +		if (e2->left.expr->type != E_SYMBOL)
  29.374 +			return NULL;
  29.375 +		sym2 = e2->left.expr->left.sym;
  29.376 +	} else
  29.377 +		sym2 = e2->left.sym;
  29.378 +	if (sym1 != sym2)
  29.379 +		return NULL;
  29.380 +	if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE)
  29.381 +		return NULL;
  29.382 +	if (sym1->type == S_TRISTATE) {
  29.383 +		if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
  29.384 +		    ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) ||
  29.385 +		     (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) {
  29.386 +			// (a='y') || (a='m') -> (a!='n')
  29.387 +			return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_no);
  29.388 +		}
  29.389 +		if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
  29.390 +		    ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) ||
  29.391 +		     (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) {
  29.392 +			// (a='y') || (a='n') -> (a!='m')
  29.393 +			return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_mod);
  29.394 +		}
  29.395 +		if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
  29.396 +		    ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) ||
  29.397 +		     (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) {
  29.398 +			// (a='m') || (a='n') -> (a!='y')
  29.399 +			return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes);
  29.400 +		}
  29.401 +	}
  29.402 +	if (sym1->type == S_BOOLEAN && sym1 == sym2) {
  29.403 +		if ((e1->type == E_NOT && e1->left.expr->type == E_SYMBOL && e2->type == E_SYMBOL) ||
  29.404 +		    (e2->type == E_NOT && e2->left.expr->type == E_SYMBOL && e1->type == E_SYMBOL))
  29.405 +			return expr_alloc_symbol(&symbol_yes);
  29.406 +	}
  29.407 +
  29.408 +	if (DEBUG_EXPR) {
  29.409 +		printf("optimize (");
  29.410 +		expr_fprint(e1, stdout);
  29.411 +		printf(") || (");
  29.412 +		expr_fprint(e2, stdout);
  29.413 +		printf(")?\n");
  29.414 +	}
  29.415 +	return NULL;
  29.416 +}
  29.417 +
  29.418 +struct expr *expr_join_and(struct expr *e1, struct expr *e2)
  29.419 +{
  29.420 +	struct expr *tmp;
  29.421 +	struct symbol *sym1, *sym2;
  29.422 +
  29.423 +	if (expr_eq(e1, e2))
  29.424 +		return expr_copy(e1);
  29.425 +	if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT)
  29.426 +		return NULL;
  29.427 +	if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT)
  29.428 +		return NULL;
  29.429 +	if (e1->type == E_NOT) {
  29.430 +		tmp = e1->left.expr;
  29.431 +		if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL)
  29.432 +			return NULL;
  29.433 +		sym1 = tmp->left.sym;
  29.434 +	} else
  29.435 +		sym1 = e1->left.sym;
  29.436 +	if (e2->type == E_NOT) {
  29.437 +		if (e2->left.expr->type != E_SYMBOL)
  29.438 +			return NULL;
  29.439 +		sym2 = e2->left.expr->left.sym;
  29.440 +	} else
  29.441 +		sym2 = e2->left.sym;
  29.442 +	if (sym1 != sym2)
  29.443 +		return NULL;
  29.444 +	if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE)
  29.445 +		return NULL;
  29.446 +
  29.447 +	if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) ||
  29.448 +	    (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_yes))
  29.449 +		// (a) && (a='y') -> (a='y')
  29.450 +		return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
  29.451 +
  29.452 +	if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_no) ||
  29.453 +	    (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_no))
  29.454 +		// (a) && (a!='n') -> (a)
  29.455 +		return expr_alloc_symbol(sym1);
  29.456 +
  29.457 +	if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_mod) ||
  29.458 +	    (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_mod))
  29.459 +		// (a) && (a!='m') -> (a='y')
  29.460 +		return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
  29.461 +
  29.462 +	if (sym1->type == S_TRISTATE) {
  29.463 +		if (e1->type == E_EQUAL && e2->type == E_UNEQUAL) {
  29.464 +			// (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b'
  29.465 +			sym2 = e1->right.sym;
  29.466 +			if ((e2->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST))
  29.467 +				return sym2 != e2->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2)
  29.468 +							     : expr_alloc_symbol(&symbol_no);
  29.469 +		}
  29.470 +		if (e1->type == E_UNEQUAL && e2->type == E_EQUAL) {
  29.471 +			// (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b'
  29.472 +			sym2 = e2->right.sym;
  29.473 +			if ((e1->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST))
  29.474 +				return sym2 != e1->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2)
  29.475 +							     : expr_alloc_symbol(&symbol_no);
  29.476 +		}
  29.477 +		if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
  29.478 +			   ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) ||
  29.479 +			    (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes)))
  29.480 +			// (a!='y') && (a!='n') -> (a='m')
  29.481 +			return expr_alloc_comp(E_EQUAL, sym1, &symbol_mod);
  29.482 +
  29.483 +		if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
  29.484 +			   ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) ||
  29.485 +			    (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes)))
  29.486 +			// (a!='y') && (a!='m') -> (a='n')
  29.487 +			return expr_alloc_comp(E_EQUAL, sym1, &symbol_no);
  29.488 +
  29.489 +		if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
  29.490 +			   ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) ||
  29.491 +			    (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod)))
  29.492 +			// (a!='m') && (a!='n') -> (a='m')
  29.493 +			return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
  29.494 +
  29.495 +		if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_mod) ||
  29.496 +		    (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_mod) ||
  29.497 +		    (e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_yes) ||
  29.498 +		    (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_yes))
  29.499 +			return NULL;
  29.500 +	}
  29.501 +
  29.502 +	if (DEBUG_EXPR) {
  29.503 +		printf("optimize (");
  29.504 +		expr_fprint(e1, stdout);
  29.505 +		printf(") && (");
  29.506 +		expr_fprint(e2, stdout);
  29.507 +		printf(")?\n");
  29.508 +	}
  29.509 +	return NULL;
  29.510 +}
  29.511 +
  29.512 +static void expr_eliminate_dups1(enum expr_type type, struct expr **ep1, struct expr **ep2)
  29.513 +{
  29.514 +#define e1 (*ep1)
  29.515 +#define e2 (*ep2)
  29.516 +	struct expr *tmp;
  29.517 +
  29.518 +	if (e1->type == type) {
  29.519 +		expr_eliminate_dups1(type, &e1->left.expr, &e2);
  29.520 +		expr_eliminate_dups1(type, &e1->right.expr, &e2);
  29.521 +		return;
  29.522 +	}
  29.523 +	if (e2->type == type) {
  29.524 +		expr_eliminate_dups1(type, &e1, &e2->left.expr);
  29.525 +		expr_eliminate_dups1(type, &e1, &e2->right.expr);
  29.526 +		return;
  29.527 +	}
  29.528 +	if (e1 == e2)
  29.529 +		return;
  29.530 +
  29.531 +	switch (e1->type) {
  29.532 +	case E_OR: case E_AND:
  29.533 +		expr_eliminate_dups1(e1->type, &e1, &e1);
  29.534 +	default:
  29.535 +		;
  29.536 +	}
  29.537 +
  29.538 +	switch (type) {
  29.539 +	case E_OR:
  29.540 +		tmp = expr_join_or(e1, e2);
  29.541 +		if (tmp) {
  29.542 +			expr_free(e1); expr_free(e2);
  29.543 +			e1 = expr_alloc_symbol(&symbol_no);
  29.544 +			e2 = tmp;
  29.545 +			trans_count++;
  29.546 +		}
  29.547 +		break;
  29.548 +	case E_AND:
  29.549 +		tmp = expr_join_and(e1, e2);
  29.550 +		if (tmp) {
  29.551 +			expr_free(e1); expr_free(e2);
  29.552 +			e1 = expr_alloc_symbol(&symbol_yes);
  29.553 +			e2 = tmp;
  29.554 +			trans_count++;
  29.555 +		}
  29.556 +		break;
  29.557 +	default:
  29.558 +		;
  29.559 +	}
  29.560 +#undef e1
  29.561 +#undef e2
  29.562 +}
  29.563 +
  29.564 +static void expr_eliminate_dups2(enum expr_type type, struct expr **ep1, struct expr **ep2)
  29.565 +{
  29.566 +#define e1 (*ep1)
  29.567 +#define e2 (*ep2)
  29.568 +	struct expr *tmp, *tmp1, *tmp2;
  29.569 +
  29.570 +	if (e1->type == type) {
  29.571 +		expr_eliminate_dups2(type, &e1->left.expr, &e2);
  29.572 +		expr_eliminate_dups2(type, &e1->right.expr, &e2);
  29.573 +		return;
  29.574 +	}
  29.575 +	if (e2->type == type) {
  29.576 +		expr_eliminate_dups2(type, &e1, &e2->left.expr);
  29.577 +		expr_eliminate_dups2(type, &e1, &e2->right.expr);
  29.578 +	}
  29.579 +	if (e1 == e2)
  29.580 +		return;
  29.581 +
  29.582 +	switch (e1->type) {
  29.583 +	case E_OR:
  29.584 +		expr_eliminate_dups2(e1->type, &e1, &e1);
  29.585 +		// (FOO || BAR) && (!FOO && !BAR) -> n
  29.586 +		tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1)));
  29.587 +		tmp2 = expr_copy(e2);
  29.588 +		tmp = expr_extract_eq_and(&tmp1, &tmp2);
  29.589 +		if (expr_is_yes(tmp1)) {
  29.590 +			expr_free(e1);
  29.591 +			e1 = expr_alloc_symbol(&symbol_no);
  29.592 +			trans_count++;
  29.593 +		}
  29.594 +		expr_free(tmp2);
  29.595 +		expr_free(tmp1);
  29.596 +		expr_free(tmp);
  29.597 +		break;
  29.598 +	case E_AND:
  29.599 +		expr_eliminate_dups2(e1->type, &e1, &e1);
  29.600 +		// (FOO && BAR) || (!FOO || !BAR) -> y
  29.601 +		tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1)));
  29.602 +		tmp2 = expr_copy(e2);
  29.603 +		tmp = expr_extract_eq_or(&tmp1, &tmp2);
  29.604 +		if (expr_is_no(tmp1)) {
  29.605 +			expr_free(e1);
  29.606 +			e1 = expr_alloc_symbol(&symbol_yes);
  29.607 +			trans_count++;
  29.608 +		}
  29.609 +		expr_free(tmp2);
  29.610 +		expr_free(tmp1);
  29.611 +		expr_free(tmp);
  29.612 +		break;
  29.613 +	default:
  29.614 +		;
  29.615 +	}
  29.616 +#undef e1
  29.617 +#undef e2
  29.618 +}
  29.619 +
  29.620 +struct expr *expr_eliminate_dups(struct expr *e)
  29.621 +{
  29.622 +	int oldcount;
  29.623 +	if (!e)
  29.624 +		return e;
  29.625 +
  29.626 +	oldcount = trans_count;
  29.627 +	while (1) {
  29.628 +		trans_count = 0;
  29.629 +		switch (e->type) {
  29.630 +		case E_OR: case E_AND:
  29.631 +			expr_eliminate_dups1(e->type, &e, &e);
  29.632 +			expr_eliminate_dups2(e->type, &e, &e);
  29.633 +		default:
  29.634 +			;
  29.635 +		}
  29.636 +		if (!trans_count)
  29.637 +			break;
  29.638 +		e = expr_eliminate_yn(e);
  29.639 +	}
  29.640 +	trans_count = oldcount;
  29.641 +	return e;
  29.642 +}
  29.643 +
  29.644 +struct expr *expr_transform(struct expr *e)
  29.645 +{
  29.646 +	struct expr *tmp;
  29.647 +
  29.648 +	if (!e)
  29.649 +		return NULL;
  29.650 +	switch (e->type) {
  29.651 +	case E_EQUAL:
  29.652 +	case E_UNEQUAL:
  29.653 +	case E_SYMBOL:
  29.654 +	case E_CHOICE:
  29.655 +		break;
  29.656 +	default:
  29.657 +		e->left.expr = expr_transform(e->left.expr);
  29.658 +		e->right.expr = expr_transform(e->right.expr);
  29.659 +	}
  29.660 +
  29.661 +	switch (e->type) {
  29.662 +	case E_EQUAL:
  29.663 +		if (e->left.sym->type != S_BOOLEAN)
  29.664 +			break;
  29.665 +		if (e->right.sym == &symbol_no) {
  29.666 +			e->type = E_NOT;
  29.667 +			e->left.expr = expr_alloc_symbol(e->left.sym);
  29.668 +			e->right.sym = NULL;
  29.669 +			break;
  29.670 +		}
  29.671 +		if (e->right.sym == &symbol_mod) {
  29.672 +			printf("boolean symbol %s tested for 'm'? test forced to 'n'\n", e->left.sym->name);
  29.673 +			e->type = E_SYMBOL;
  29.674 +			e->left.sym = &symbol_no;
  29.675 +			e->right.sym = NULL;
  29.676 +			break;
  29.677 +		}
  29.678 +		if (e->right.sym == &symbol_yes) {
  29.679 +			e->type = E_SYMBOL;
  29.680 +			e->right.sym = NULL;
  29.681 +			break;
  29.682 +		}
  29.683 +		break;
  29.684 +	case E_UNEQUAL:
  29.685 +		if (e->left.sym->type != S_BOOLEAN)
  29.686 +			break;
  29.687 +		if (e->right.sym == &symbol_no) {
  29.688 +			e->type = E_SYMBOL;
  29.689 +			e->right.sym = NULL;
  29.690 +			break;
  29.691 +		}
  29.692 +		if (e->right.sym == &symbol_mod) {
  29.693 +			printf("boolean symbol %s tested for 'm'? test forced to 'y'\n", e->left.sym->name);
  29.694 +			e->type = E_SYMBOL;
  29.695 +			e->left.sym = &symbol_yes;
  29.696 +			e->right.sym = NULL;
  29.697 +			break;
  29.698 +		}
  29.699 +		if (e->right.sym == &symbol_yes) {
  29.700 +			e->type = E_NOT;
  29.701 +			e->left.expr = expr_alloc_symbol(e->left.sym);
  29.702 +			e->right.sym = NULL;
  29.703 +			break;
  29.704 +		}
  29.705 +		break;
  29.706 +	case E_NOT:
  29.707 +		switch (e->left.expr->type) {
  29.708 +		case E_NOT:
  29.709 +			// !!a -> a
  29.710 +			tmp = e->left.expr->left.expr;
  29.711 +			free(e->left.expr);
  29.712 +			free(e);
  29.713 +			e = tmp;
  29.714 +			e = expr_transform(e);
  29.715 +			break;
  29.716 +		case E_EQUAL:
  29.717 +		case E_UNEQUAL:
  29.718 +			// !a='x' -> a!='x'
  29.719 +			tmp = e->left.expr;
  29.720 +			free(e);
  29.721 +			e = tmp;
  29.722 +			e->type = e->type == E_EQUAL ? E_UNEQUAL : E_EQUAL;
  29.723 +			break;
  29.724 +		case E_OR:
  29.725 +			// !(a || b) -> !a && !b
  29.726 +			tmp = e->left.expr;
  29.727 +			e->type = E_AND;
  29.728 +			e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr);
  29.729 +			tmp->type = E_NOT;
  29.730 +			tmp->right.expr = NULL;
  29.731 +			e = expr_transform(e);
  29.732 +			break;
  29.733 +		case E_AND:
  29.734 +			// !(a && b) -> !a || !b
  29.735 +			tmp = e->left.expr;
  29.736 +			e->type = E_OR;
  29.737 +			e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr);
  29.738 +			tmp->type = E_NOT;
  29.739 +			tmp->right.expr = NULL;
  29.740 +			e = expr_transform(e);
  29.741 +			break;
  29.742 +		case E_SYMBOL:
  29.743 +			if (e->left.expr->left.sym == &symbol_yes) {
  29.744 +				// !'y' -> 'n'
  29.745 +				tmp = e->left.expr;
  29.746 +				free(e);
  29.747 +				e = tmp;
  29.748 +				e->type = E_SYMBOL;
  29.749 +				e->left.sym = &symbol_no;
  29.750 +				break;
  29.751 +			}
  29.752 +			if (e->left.expr->left.sym == &symbol_mod) {
  29.753 +				// !'m' -> 'm'
  29.754 +				tmp = e->left.expr;
  29.755 +				free(e);
  29.756 +				e = tmp;
  29.757 +				e->type = E_SYMBOL;
  29.758 +				e->left.sym = &symbol_mod;
  29.759 +				break;
  29.760 +			}
  29.761 +			if (e->left.expr->left.sym == &symbol_no) {
  29.762 +				// !'n' -> 'y'
  29.763 +				tmp = e->left.expr;
  29.764 +				free(e);
  29.765 +				e = tmp;
  29.766 +				e->type = E_SYMBOL;
  29.767 +				e->left.sym = &symbol_yes;
  29.768 +				break;
  29.769 +			}
  29.770 +			break;
  29.771 +		default:
  29.772 +			;
  29.773 +		}
  29.774 +		break;
  29.775 +	default:
  29.776 +		;
  29.777 +	}
  29.778 +	return e;
  29.779 +}
  29.780 +
  29.781 +int expr_contains_symbol(struct expr *dep, struct symbol *sym)
  29.782 +{
  29.783 +	if (!dep)
  29.784 +		return 0;
  29.785 +
  29.786 +	switch (dep->type) {
  29.787 +	case E_AND:
  29.788 +	case E_OR:
  29.789 +		return expr_contains_symbol(dep->left.expr, sym) ||
  29.790 +		       expr_contains_symbol(dep->right.expr, sym);
  29.791 +	case E_SYMBOL:
  29.792 +		return dep->left.sym == sym;
  29.793 +	case E_EQUAL:
  29.794 +	case E_UNEQUAL:
  29.795 +		return dep->left.sym == sym ||
  29.796 +		       dep->right.sym == sym;
  29.797 +	case E_NOT:
  29.798 +		return expr_contains_symbol(dep->left.expr, sym);
  29.799 +	default:
  29.800 +		;
  29.801 +	}
  29.802 +	return 0;
  29.803 +}
  29.804 +
  29.805 +bool expr_depends_symbol(struct expr *dep, struct symbol *sym)
  29.806 +{
  29.807 +	if (!dep)
  29.808 +		return false;
  29.809 +
  29.810 +	switch (dep->type) {
  29.811 +	case E_AND:
  29.812 +		return expr_depends_symbol(dep->left.expr, sym) ||
  29.813 +		       expr_depends_symbol(dep->right.expr, sym);
  29.814 +	case E_SYMBOL:
  29.815 +		return dep->left.sym == sym;
  29.816 +	case E_EQUAL:
  29.817 +		if (dep->left.sym == sym) {
  29.818 +			if (dep->right.sym == &symbol_yes || dep->right.sym == &symbol_mod)
  29.819 +				return true;
  29.820 +		}
  29.821 +		break;
  29.822 +	case E_UNEQUAL:
  29.823 +		if (dep->left.sym == sym) {
  29.824 +			if (dep->right.sym == &symbol_no)
  29.825 +				return true;
  29.826 +		}
  29.827 +		break;
  29.828 +	default:
  29.829 +		;
  29.830 +	}
  29.831 + 	return false;
  29.832 +}
  29.833 +
  29.834 +struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2)
  29.835 +{
  29.836 +	struct expr *tmp = NULL;
  29.837 +	expr_extract_eq(E_AND, &tmp, ep1, ep2);
  29.838 +	if (tmp) {
  29.839 +		*ep1 = expr_eliminate_yn(*ep1);
  29.840 +		*ep2 = expr_eliminate_yn(*ep2);
  29.841 +	}
  29.842 +	return tmp;
  29.843 +}
  29.844 +
  29.845 +struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2)
  29.846 +{
  29.847 +	struct expr *tmp = NULL;
  29.848 +	expr_extract_eq(E_OR, &tmp, ep1, ep2);
  29.849 +	if (tmp) {
  29.850 +		*ep1 = expr_eliminate_yn(*ep1);
  29.851 +		*ep2 = expr_eliminate_yn(*ep2);
  29.852 +	}
  29.853 +	return tmp;
  29.854 +}
  29.855 +
  29.856 +void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2)
  29.857 +{
  29.858 +#define e1 (*ep1)
  29.859 +#define e2 (*ep2)
  29.860 +	if (e1->type == type) {
  29.861 +		expr_extract_eq(type, ep, &e1->left.expr, &e2);
  29.862 +		expr_extract_eq(type, ep, &e1->right.expr, &e2);
  29.863 +		return;
  29.864 +	}
  29.865 +	if (e2->type == type) {
  29.866 +		expr_extract_eq(type, ep, ep1, &e2->left.expr);
  29.867 +		expr_extract_eq(type, ep, ep1, &e2->right.expr);
  29.868 +		return;
  29.869 +	}
  29.870 +	if (expr_eq(e1, e2)) {
  29.871 +		*ep = *ep ? expr_alloc_two(type, *ep, e1) : e1;
  29.872 +		expr_free(e2);
  29.873 +		if (type == E_AND) {
  29.874 +			e1 = expr_alloc_symbol(&symbol_yes);
  29.875 +			e2 = expr_alloc_symbol(&symbol_yes);
  29.876 +		} else if (type == E_OR) {
  29.877 +			e1 = expr_alloc_symbol(&symbol_no);
  29.878 +			e2 = expr_alloc_symbol(&symbol_no);
  29.879 +		}
  29.880 +	}
  29.881 +#undef e1
  29.882 +#undef e2
  29.883 +}
  29.884 +
  29.885 +struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym)
  29.886 +{
  29.887 +	struct expr *e1, *e2;
  29.888 +
  29.889 +	if (!e) {
  29.890 +		e = expr_alloc_symbol(sym);
  29.891 +		if (type == E_UNEQUAL)
  29.892 +			e = expr_alloc_one(E_NOT, e);
  29.893 +		return e;
  29.894 +	}
  29.895 +	switch (e->type) {
  29.896 +	case E_AND:
  29.897 +		e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym);
  29.898 +		e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym);
  29.899 +		if (sym == &symbol_yes)
  29.900 +			e = expr_alloc_two(E_AND, e1, e2);
  29.901 +		if (sym == &symbol_no)
  29.902 +			e = expr_alloc_two(E_OR, e1, e2);
  29.903 +		if (type == E_UNEQUAL)
  29.904 +			e = expr_alloc_one(E_NOT, e);
  29.905 +		return e;
  29.906 +	case E_OR:
  29.907 +		e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym);
  29.908 +		e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym);
  29.909 +		if (sym == &symbol_yes)
  29.910 +			e = expr_alloc_two(E_OR, e1, e2);
  29.911 +		if (sym == &symbol_no)
  29.912 +			e = expr_alloc_two(E_AND, e1, e2);
  29.913 +		if (type == E_UNEQUAL)
  29.914 +			e = expr_alloc_one(E_NOT, e);
  29.915 +		return e;
  29.916 +	case E_NOT:
  29.917 +		return expr_trans_compare(e->left.expr, type == E_EQUAL ? E_UNEQUAL : E_EQUAL, sym);
  29.918 +	case E_UNEQUAL:
  29.919 +	case E_EQUAL:
  29.920 +		if (type == E_EQUAL) {
  29.921 +			if (sym == &symbol_yes)
  29.922 +				return expr_copy(e);
  29.923 +			if (sym == &symbol_mod)
  29.924 +				return expr_alloc_symbol(&symbol_no);
  29.925 +			if (sym == &symbol_no)
  29.926 +				return expr_alloc_one(E_NOT, expr_copy(e));
  29.927 +		} else {
  29.928 +			if (sym == &symbol_yes)
  29.929 +				return expr_alloc_one(E_NOT, expr_copy(e));
  29.930 +			if (sym == &symbol_mod)
  29.931 +				return expr_alloc_symbol(&symbol_yes);
  29.932 +			if (sym == &symbol_no)
  29.933 +				return expr_copy(e);
  29.934 +		}
  29.935 +		break;
  29.936 +	case E_SYMBOL:
  29.937 +		return expr_alloc_comp(type, e->left.sym, sym);
  29.938 +	case E_CHOICE:
  29.939 +	case E_RANGE:
  29.940 +	case E_NONE:
  29.941 +		/* panic */;
  29.942 +	}
  29.943 +	return NULL;
  29.944 +}
  29.945 +
  29.946 +tristate expr_calc_value(struct expr *e)
  29.947 +{
  29.948 +	tristate val1, val2;
  29.949 +	const char *str1, *str2;
  29.950 +
  29.951 +	if (!e)
  29.952 +		return yes;
  29.953 +
  29.954 +	switch (e->type) {
  29.955 +	case E_SYMBOL:
  29.956 +		sym_calc_value(e->left.sym);
  29.957 +		return e->left.sym->curr.tri;
  29.958 +	case E_AND:
  29.959 +		val1 = expr_calc_value(e->left.expr);
  29.960 +		val2 = expr_calc_value(e->right.expr);
  29.961 +		return E_AND(val1, val2);
  29.962 +	case E_OR:
  29.963 +		val1 = expr_calc_value(e->left.expr);
  29.964 +		val2 = expr_calc_value(e->right.expr);
  29.965 +		return E_OR(val1, val2);
  29.966 +	case E_NOT:
  29.967 +		val1 = expr_calc_value(e->left.expr);
  29.968 +		return E_NOT(val1);
  29.969 +	case E_EQUAL:
  29.970 +		sym_calc_value(e->left.sym);
  29.971 +		sym_calc_value(e->right.sym);
  29.972 +		str1 = sym_get_string_value(e->left.sym);
  29.973 +		str2 = sym_get_string_value(e->right.sym);
  29.974 +		return !strcmp(str1, str2) ? yes : no;
  29.975 +	case E_UNEQUAL:
  29.976 +		sym_calc_value(e->left.sym);
  29.977 +		sym_calc_value(e->right.sym);
  29.978 +		str1 = sym_get_string_value(e->left.sym);
  29.979 +		str2 = sym_get_string_value(e->right.sym);
  29.980 +		return !strcmp(str1, str2) ? no : yes;
  29.981 +	default:
  29.982 +		printf("expr_calc_value: %d?\n", e->type);
  29.983 +		return no;
  29.984 +	}
  29.985 +}
  29.986 +
  29.987 +int expr_compare_type(enum expr_type t1, enum expr_type t2)
  29.988 +{
  29.989 +#if 0
  29.990 +	return 1;
  29.991 +#else
  29.992 +	if (t1 == t2)
  29.993 +		return 0;
  29.994 +	switch (t1) {
  29.995 +	case E_EQUAL:
  29.996 +	case E_UNEQUAL:
  29.997 +		if (t2 == E_NOT)
  29.998 +			return 1;
  29.999 +	case E_NOT:
 29.1000 +		if (t2 == E_AND)
 29.1001 +			return 1;
 29.1002 +	case E_AND:
 29.1003 +		if (t2 == E_OR)
 29.1004 +			return 1;
 29.1005 +	case E_OR:
 29.1006 +		if (t2 == E_CHOICE)
 29.1007 +			return 1;
 29.1008 +	case E_CHOICE:
 29.1009 +		if (t2 == 0)
 29.1010 +			return 1;
 29.1011 +	default:
 29.1012 +		return -1;
 29.1013 +	}
 29.1014 +	printf("[%dgt%d?]", t1, t2);
 29.1015 +	return 0;
 29.1016 +#endif
 29.1017 +}
 29.1018 +
 29.1019 +void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken)
 29.1020 +{
 29.1021 +	if (!e) {
 29.1022 +		fn(data, NULL, "y");
 29.1023 +		return;
 29.1024 +	}
 29.1025 +
 29.1026 +	if (expr_compare_type(prevtoken, e->type) > 0)
 29.1027 +		fn(data, NULL, "(");
 29.1028 +	switch (e->type) {
 29.1029 +	case E_SYMBOL:
 29.1030 +		if (e->left.sym->name)
 29.1031 +			fn(data, e->left.sym, e->left.sym->name);
 29.1032 +		else
 29.1033 +			fn(data, NULL, "<choice>");
 29.1034 +		break;
 29.1035 +	case E_NOT:
 29.1036 +		fn(data, NULL, "!");
 29.1037 +		expr_print(e->left.expr, fn, data, E_NOT);
 29.1038 +		break;
 29.1039 +	case E_EQUAL:
 29.1040 +		fn(data, e->left.sym, e->left.sym->name);
 29.1041 +		fn(data, NULL, "=");
 29.1042 +		fn(data, e->right.sym, e->right.sym->name);
 29.1043 +		break;
 29.1044 +	case E_UNEQUAL:
 29.1045 +		fn(data, e->left.sym, e->left.sym->name);
 29.1046 +		fn(data, NULL, "!=");
 29.1047 +		fn(data, e->right.sym, e->right.sym->name);
 29.1048 +		break;
 29.1049 +	case E_OR:
 29.1050 +		expr_print(e->left.expr, fn, data, E_OR);
 29.1051 +		fn(data, NULL, " || ");
 29.1052 +		expr_print(e->right.expr, fn, data, E_OR);
 29.1053 +		break;
 29.1054 +	case E_AND:
 29.1055 +		expr_print(e->left.expr, fn, data, E_AND);
 29.1056 +		fn(data, NULL, " && ");
 29.1057 +		expr_print(e->right.expr, fn, data, E_AND);
 29.1058 +		break;
 29.1059 +	case E_CHOICE:
 29.1060 +		fn(data, e->right.sym, e->right.sym->name);
 29.1061 +		if (e->left.expr) {
 29.1062 +			fn(data, NULL, " ^ ");
 29.1063 +			expr_print(e->left.expr, fn, data, E_CHOICE);
 29.1064 +		}
 29.1065 +		break;
 29.1066 +	case E_RANGE:
 29.1067 +		fn(data, NULL, "[");
 29.1068 +		fn(data, e->left.sym, e->left.sym->name);
 29.1069 +		fn(data, NULL, " ");
 29.1070 +		fn(data, e->right.sym, e->right.sym->name);
 29.1071 +		fn(data, NULL, "]");
 29.1072 +		break;
 29.1073 +	default:
 29.1074 +	  {
 29.1075 +		char buf[32];
 29.1076 +		sprintf(buf, "<unknown type %d>", e->type);
 29.1077 +		fn(data, NULL, buf);
 29.1078 +		break;
 29.1079 +	  }
 29.1080 +	}
 29.1081 +	if (expr_compare_type(prevtoken, e->type) > 0)
 29.1082 +		fn(data, NULL, ")");
 29.1083 +}
 29.1084 +
 29.1085 +static void expr_print_file_helper(void *data, struct symbol *sym, const char *str)
 29.1086 +{
 29.1087 +	fwrite(str, strlen(str), 1, data);
 29.1088 +}
 29.1089 +
 29.1090 +void expr_fprint(struct expr *e, FILE *out)
 29.1091 +{
 29.1092 +	expr_print(e, expr_print_file_helper, out, E_NONE);
 29.1093 +}
 29.1094 +
 29.1095 +static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str)
 29.1096 +{
 29.1097 +	str_append((struct gstr*)data, str);
 29.1098 +}
 29.1099 +
 29.1100 +void expr_gstr_print(struct expr *e, struct gstr *gs)
 29.1101 +{
 29.1102 +	expr_print(e, expr_print_gstr_helper, gs, E_NONE);
 29.1103 +}
    30.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.2 +++ b/kconfig/expr.h	Sat Feb 24 11:00:05 2007 +0000
    30.3 @@ -0,0 +1,202 @@
    30.4 +/*
    30.5 + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
    30.6 + * Released under the terms of the GNU GPL v2.0.
    30.7 + */
    30.8 +
    30.9 +#ifndef EXPR_H
   30.10 +#define EXPR_H
   30.11 +
   30.12 +#ifdef __cplusplus
   30.13 +extern "C" {
   30.14 +#endif
   30.15 +
   30.16 +#include <stdio.h>
   30.17 +#ifndef __cplusplus
   30.18 +#include <stdbool.h>
   30.19 +#endif
   30.20 +
   30.21 +struct file {
   30.22 +	struct file *next;
   30.23 +	struct file *parent;
   30.24 +	char *name;
   30.25 +	int lineno;
   30.26 +	int flags;
   30.27 +};
   30.28 +
   30.29 +#define FILE_BUSY		0x0001
   30.30 +#define FILE_SCANNED		0x0002
   30.31 +#define FILE_PRINTED		0x0004
   30.32 +
   30.33 +typedef enum tristate {
   30.34 +	no, mod, yes
   30.35 +} tristate;
   30.36 +
   30.37 +enum expr_type {
   30.38 +	E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_CHOICE, E_SYMBOL, E_RANGE
   30.39 +};
   30.40 +
   30.41 +union expr_data {
   30.42 +	struct expr *expr;
   30.43 +	struct symbol *sym;
   30.44 +};
   30.45 +
   30.46 +struct expr {
   30.47 +	enum expr_type type;
   30.48 +	union expr_data left, right;
   30.49 +};
   30.50 +
   30.51 +#define E_OR(dep1, dep2)	(((dep1)>(dep2))?(dep1):(dep2))
   30.52 +#define E_AND(dep1, dep2)	(((dep1)<(dep2))?(dep1):(dep2))
   30.53 +#define E_NOT(dep)		(2-(dep))
   30.54 +
   30.55 +struct expr_value {
   30.56 +	struct expr *expr;
   30.57 +	tristate tri;
   30.58 +};
   30.59 +
   30.60 +struct symbol_value {
   30.61 +	void *val;
   30.62 +	tristate tri;
   30.63 +};
   30.64 +
   30.65 +enum symbol_type {
   30.66 +	S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER
   30.67 +};
   30.68 +
   30.69 +enum {
   30.70 +	S_DEF_USER,		/* main user value */
   30.71 +	S_DEF_AUTO,
   30.72 +};
   30.73 +
   30.74 +struct symbol {
   30.75 +	struct symbol *next;
   30.76 +	char *name;
   30.77 +	char *help;
   30.78 +	enum symbol_type type;
   30.79 +	struct symbol_value curr;
   30.80 +	struct symbol_value def[4];
   30.81 +	tristate visible;
   30.82 +	int flags;
   30.83 +	struct property *prop;
   30.84 +	struct expr *dep, *dep2;
   30.85 +	struct expr_value rev_dep;
   30.86 +};
   30.87 +
   30.88 +#define for_all_symbols(i, sym) for (i = 0; i < 257; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER)
   30.89 +
   30.90 +#define SYMBOL_CONST		0x0001
   30.91 +#define SYMBOL_CHECK		0x0008
   30.92 +#define SYMBOL_CHOICE		0x0010
   30.93 +#define SYMBOL_CHOICEVAL	0x0020
   30.94 +#define SYMBOL_PRINTED		0x0040
   30.95 +#define SYMBOL_VALID		0x0080
   30.96 +#define SYMBOL_OPTIONAL		0x0100
   30.97 +#define SYMBOL_WRITE		0x0200
   30.98 +#define SYMBOL_CHANGED		0x0400
   30.99 +#define SYMBOL_AUTO		0x1000
  30.100 +#define SYMBOL_CHECKED		0x2000
  30.101 +#define SYMBOL_WARNED		0x8000
  30.102 +#define SYMBOL_DEF		0x10000
  30.103 +#define SYMBOL_DEF_USER		0x10000
  30.104 +#define SYMBOL_DEF_AUTO		0x20000
  30.105 +#define SYMBOL_DEF3		0x40000
  30.106 +#define SYMBOL_DEF4		0x80000
  30.107 +
  30.108 +#define SYMBOL_MAXLENGTH	256
  30.109 +#define SYMBOL_HASHSIZE		257
  30.110 +#define SYMBOL_HASHMASK		0xff
  30.111 +
  30.112 +enum prop_type {
  30.113 +	P_UNKNOWN, P_PROMPT, P_COMMENT, P_MENU, P_DEFAULT, P_CHOICE, P_SELECT, P_RANGE
  30.114 +};
  30.115 +
  30.116 +struct property {
  30.117 +	struct property *next;
  30.118 +	struct symbol *sym;
  30.119 +	enum prop_type type;
  30.120 +	const char *text;
  30.121 +	struct expr_value visible;
  30.122 +	struct expr *expr;
  30.123 +	struct menu *menu;
  30.124 +	struct file *file;
  30.125 +	int lineno;
  30.126 +};
  30.127 +
  30.128 +#define for_all_properties(sym, st, tok) \
  30.129 +	for (st = sym->prop; st; st = st->next) \
  30.130 +		if (st->type == (tok))
  30.131 +#define for_all_defaults(sym, st) for_all_properties(sym, st, P_DEFAULT)
  30.132 +#define for_all_choices(sym, st) for_all_properties(sym, st, P_CHOICE)
  30.133 +#define for_all_prompts(sym, st) \
  30.134 +	for (st = sym->prop; st; st = st->next) \
  30.135 +		if (st->text)
  30.136 +
  30.137 +struct menu {
  30.138 +	struct menu *next;
  30.139 +	struct menu *parent;
  30.140 +	struct menu *list;
  30.141 +	struct symbol *sym;
  30.142 +	struct property *prompt;
  30.143 +	struct expr *dep;
  30.144 +	unsigned int flags;
  30.145 +	//char *help;
  30.146 +	struct file *file;
  30.147 +	int lineno;
  30.148 +	void *data;
  30.149 +};
  30.150 +
  30.151 +#define MENU_CHANGED		0x0001
  30.152 +#define MENU_ROOT		0x0002
  30.153 +
  30.154 +#ifndef SWIG
  30.155 +
  30.156 +extern struct file *file_list;
  30.157 +extern struct file *current_file;
  30.158 +struct file *lookup_file(const char *name);
  30.159 +
  30.160 +extern struct symbol symbol_yes, symbol_no, symbol_mod;
  30.161 +extern struct symbol *modules_sym;
  30.162 +extern struct symbol *sym_defconfig_list;
  30.163 +extern int cdebug;
  30.164 +struct expr *expr_alloc_symbol(struct symbol *sym);
  30.165 +struct expr *expr_alloc_one(enum expr_type type, struct expr *ce);
  30.166 +struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2);
  30.167 +struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2);
  30.168 +struct expr *expr_alloc_and(struct expr *e1, struct expr *e2);
  30.169 +struct expr *expr_alloc_or(struct expr *e1, struct expr *e2);
  30.170 +struct expr *expr_copy(struct expr *org);
  30.171 +void expr_free(struct expr *e);
  30.172 +int expr_eq(struct expr *e1, struct expr *e2);
  30.173 +void expr_eliminate_eq(struct expr **ep1, struct expr **ep2);
  30.174 +tristate expr_calc_value(struct expr *e);
  30.175 +struct expr *expr_eliminate_yn(struct expr *e);
  30.176 +struct expr *expr_trans_bool(struct expr *e);
  30.177 +struct expr *expr_eliminate_dups(struct expr *e);
  30.178 +struct expr *expr_transform(struct expr *e);
  30.179 +int expr_contains_symbol(struct expr *dep, struct symbol *sym);
  30.180 +bool expr_depends_symbol(struct expr *dep, struct symbol *sym);
  30.181 +struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2);
  30.182 +struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2);
  30.183 +void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2);
  30.184 +struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym);
  30.185 +
  30.186 +void expr_fprint(struct expr *e, FILE *out);
  30.187 +struct gstr; /* forward */
  30.188 +void expr_gstr_print(struct expr *e, struct gstr *gs);
  30.189 +
  30.190 +static inline int expr_is_yes(struct expr *e)
  30.191 +{
  30.192 +	return !e || (e->type == E_SYMBOL && e->left.sym == &symbol_yes);
  30.193 +}
  30.194 +
  30.195 +static inline int expr_is_no(struct expr *e)
  30.196 +{
  30.197 +	return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no);
  30.198 +}
  30.199 +#endif
  30.200 +
  30.201 +#ifdef __cplusplus
  30.202 +}
  30.203 +#endif
  30.204 +
  30.205 +#endif /* EXPR_H */
    31.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.2 +++ b/kconfig/lex.zconf.c_shipped	Sat Feb 24 11:00:05 2007 +0000
    31.3 @@ -0,0 +1,2350 @@
    31.4 +
    31.5 +#line 3 "scripts/kconfig/lex.zconf.c"
    31.6 +
    31.7 +#define  YY_INT_ALIGNED short int
    31.8 +
    31.9 +/* A lexical scanner generated by flex */
   31.10 +
   31.11 +#define FLEX_SCANNER
   31.12 +#define YY_FLEX_MAJOR_VERSION 2
   31.13 +#define YY_FLEX_MINOR_VERSION 5
   31.14 +#define YY_FLEX_SUBMINOR_VERSION 33
   31.15 +#if YY_FLEX_SUBMINOR_VERSION > 0
   31.16 +#define FLEX_BETA
   31.17 +#endif
   31.18 +
   31.19 +/* First, we deal with  platform-specific or compiler-specific issues. */
   31.20 +
   31.21 +/* begin standard C headers. */
   31.22 +#include <stdio.h>
   31.23 +#include <string.h>
   31.24 +#include <errno.h>
   31.25 +#include <stdlib.h>
   31.26 +
   31.27 +/* end standard C headers. */
   31.28 +
   31.29 +/* flex integer type definitions */
   31.30 +
   31.31 +#ifndef FLEXINT_H
   31.32 +#define FLEXINT_H
   31.33 +
   31.34 +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
   31.35 +
   31.36 +#if __STDC_VERSION__ >= 199901L
   31.37 +
   31.38 +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
   31.39 + * if you want the limit (max/min) macros for int types.
   31.40 + */
   31.41 +#ifndef __STDC_LIMIT_MACROS
   31.42 +#define __STDC_LIMIT_MACROS 1
   31.43 +#endif
   31.44 +
   31.45 +#include <inttypes.h>
   31.46 +typedef int8_t flex_int8_t;
   31.47 +typedef uint8_t flex_uint8_t;
   31.48 +typedef int16_t flex_int16_t;
   31.49 +typedef uint16_t flex_uint16_t;
   31.50 +typedef int32_t flex_int32_t;
   31.51 +typedef uint32_t flex_uint32_t;
   31.52 +#else
   31.53 +typedef signed char flex_int8_t;
   31.54 +typedef short int flex_int16_t;
   31.55 +typedef int flex_int32_t;
   31.56 +typedef unsigned char flex_uint8_t; 
   31.57 +typedef unsigned short int flex_uint16_t;
   31.58 +typedef unsigned int flex_uint32_t;
   31.59 +#endif /* ! C99 */
   31.60 +
   31.61 +/* Limits of integral types. */
   31.62 +#ifndef INT8_MIN
   31.63 +#define INT8_MIN               (-128)
   31.64 +#endif
   31.65 +#ifndef INT16_MIN
   31.66 +#define INT16_MIN              (-32767-1)
   31.67 +#endif
   31.68 +#ifndef INT32_MIN
   31.69 +#define INT32_MIN              (-2147483647-1)
   31.70 +#endif
   31.71 +#ifndef INT8_MAX
   31.72 +#define INT8_MAX               (127)
   31.73 +#endif
   31.74 +#ifndef INT16_MAX
   31.75 +#define INT16_MAX              (32767)
   31.76 +#endif
   31.77 +#ifndef INT32_MAX
   31.78 +#define INT32_MAX              (2147483647)
   31.79 +#endif
   31.80 +#ifndef UINT8_MAX
   31.81 +#define UINT8_MAX              (255U)
   31.82 +#endif
   31.83 +#ifndef UINT16_MAX
   31.84 +#define UINT16_MAX             (65535U)
   31.85 +#endif
   31.86 +#ifndef UINT32_MAX
   31.87 +#define UINT32_MAX             (4294967295U)
   31.88 +#endif
   31.89 +
   31.90 +#endif /* ! FLEXINT_H */
   31.91 +
   31.92 +#ifdef __cplusplus
   31.93 +
   31.94 +/* The "const" storage-class-modifier is valid. */
   31.95 +#define YY_USE_CONST
   31.96 +
   31.97 +#else	/* ! __cplusplus */
   31.98 +
   31.99 +#if __STDC__
  31.100 +
  31.101 +#define YY_USE_CONST
  31.102 +
  31.103 +#endif	/* __STDC__ */
  31.104 +#endif	/* ! __cplusplus */
  31.105 +
  31.106 +#ifdef YY_USE_CONST
  31.107 +#define yyconst const
  31.108 +#else
  31.109 +#define yyconst
  31.110 +#endif
  31.111 +
  31.112 +/* Returned upon end-of-file. */
  31.113 +#define YY_NULL 0
  31.114 +
  31.115 +/* Promotes a possibly negative, possibly signed char to an unsigned
  31.116 + * integer for use as an array index.  If the signed char is negative,
  31.117 + * we want to instead treat it as an 8-bit unsigned char, hence the
  31.118 + * double cast.
  31.119 + */
  31.120 +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
  31.121 +
  31.122 +/* Enter a start condition.  This macro really ought to take a parameter,
  31.123 + * but we do it the disgusting crufty way forced on us by the ()-less
  31.124 + * definition of BEGIN.
  31.125 + */
  31.126 +#define BEGIN (yy_start) = 1 + 2 *
  31.127 +
  31.128 +/* Translate the current start state into a value that can be later handed
  31.129 + * to BEGIN to return to the state.  The YYSTATE alias is for lex
  31.130 + * compatibility.
  31.131 + */
  31.132 +#define YY_START (((yy_start) - 1) / 2)
  31.133 +#define YYSTATE YY_START
  31.134 +
  31.135 +/* Action number for EOF rule of a given start state. */
  31.136 +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  31.137 +
  31.138 +/* Special action meaning "start processing a new file". */
  31.139 +#define YY_NEW_FILE zconfrestart(zconfin  )
  31.140 +
  31.141 +#define YY_END_OF_BUFFER_CHAR 0
  31.142 +
  31.143 +/* Size of default input buffer. */
  31.144 +#ifndef YY_BUF_SIZE
  31.145 +#define YY_BUF_SIZE 16384
  31.146 +#endif
  31.147 +
  31.148 +/* The state buf must be large enough to hold one state per character in the main buffer.
  31.149 + */
  31.150 +#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
  31.151 +
  31.152 +#ifndef YY_TYPEDEF_YY_BUFFER_STATE
  31.153 +#define YY_TYPEDEF_YY_BUFFER_STATE
  31.154 +typedef struct yy_buffer_state *YY_BUFFER_STATE;
  31.155 +#endif
  31.156 +
  31.157 +extern int zconfleng;
  31.158 +
  31.159 +extern FILE *zconfin, *zconfout;
  31.160 +
  31.161 +#define EOB_ACT_CONTINUE_SCAN 0
  31.162 +#define EOB_ACT_END_OF_FILE 1
  31.163 +#define EOB_ACT_LAST_MATCH 2
  31.164 +
  31.165 +    #define YY_LESS_LINENO(n)
  31.166 +    
  31.167 +/* Return all but the first "n" matched characters back to the input stream. */
  31.168 +#define yyless(n) \
  31.169 +	do \
  31.170 +		{ \
  31.171 +		/* Undo effects of setting up zconftext. */ \
  31.172 +        int yyless_macro_arg = (n); \
  31.173 +        YY_LESS_LINENO(yyless_macro_arg);\
  31.174 +		*yy_cp = (yy_hold_char); \
  31.175 +		YY_RESTORE_YY_MORE_OFFSET \
  31.176 +		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
  31.177 +		YY_DO_BEFORE_ACTION; /* set up zconftext again */ \
  31.178 +		} \
  31.179 +	while ( 0 )
  31.180 +
  31.181 +#define unput(c) yyunput( c, (yytext_ptr)  )
  31.182 +
  31.183 +/* The following is because we cannot portably get our hands on size_t
  31.184 + * (without autoconf's help, which isn't available because we want
  31.185 + * flex-generated scanners to compile on their own).
  31.186 + */
  31.187 +
  31.188 +#ifndef YY_TYPEDEF_YY_SIZE_T
  31.189 +#define YY_TYPEDEF_YY_SIZE_T
  31.190 +typedef unsigned int yy_size_t;
  31.191 +#endif
  31.192 +
  31.193 +#ifndef YY_STRUCT_YY_BUFFER_STATE
  31.194 +#define YY_STRUCT_YY_BUFFER_STATE
  31.195 +struct yy_buffer_state
  31.196 +	{
  31.197 +	FILE *yy_input_file;
  31.198 +
  31.199 +	char *yy_ch_buf;		/* input buffer */
  31.200 +	char *yy_buf_pos;		/* current position in input buffer */
  31.201 +
  31.202 +	/* Size of input buffer in bytes, not including room for EOB
  31.203 +	 * characters.
  31.204 +	 */
  31.205 +	yy_size_t yy_buf_size;
  31.206 +
  31.207 +	/* Number of characters read into yy_ch_buf, not including EOB
  31.208 +	 * characters.
  31.209 +	 */
  31.210 +	int yy_n_chars;
  31.211 +
  31.212 +	/* Whether we "own" the buffer - i.e., we know we created it,
  31.213 +	 * and can realloc() it to grow it, and should free() it to
  31.214 +	 * delete it.
  31.215 +	 */
  31.216 +	int yy_is_our_buffer;
  31.217 +
  31.218 +	/* Whether this is an "interactive" input source; if so, and
  31.219 +	 * if we're using stdio for input, then we want to use getc()
  31.220 +	 * instead of fread(), to make sure we stop fetching input after
  31.221 +	 * each newline.
  31.222 +	 */
  31.223 +	int yy_is_interactive;
  31.224 +
  31.225 +	/* Whether we're considered to be at the beginning of a line.
  31.226 +	 * If so, '^' rules will be active on the next match, otherwise
  31.227 +	 * not.
  31.228 +	 */
  31.229 +	int yy_at_bol;
  31.230 +
  31.231 +    int yy_bs_lineno; /**< The line count. */
  31.232 +    int yy_bs_column; /**< The column count. */
  31.233 +    
  31.234 +	/* Whether to try to fill the input buffer when we reach the
  31.235 +	 * end of it.
  31.236 +	 */
  31.237 +	int yy_fill_buffer;
  31.238 +
  31.239 +	int yy_buffer_status;
  31.240 +
  31.241 +#define YY_BUFFER_NEW 0
  31.242 +#define YY_BUFFER_NORMAL 1
  31.243 +	/* When an EOF's been seen but there's still some text to process
  31.244 +	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  31.245 +	 * shouldn't try reading from the input source any more.  We might
  31.246 +	 * still have a bunch of tokens to match, though, because of
  31.247 +	 * possible backing-up.
  31.248 +	 *
  31.249 +	 * When we actually see the EOF, we change the status to "new"
  31.250 +	 * (via zconfrestart()), so that the user can continue scanning by
  31.251 +	 * just pointing zconfin at a new input file.
  31.252 +	 */
  31.253 +#define YY_BUFFER_EOF_PENDING 2
  31.254 +
  31.255 +	};
  31.256 +#endif /* !YY_STRUCT_YY_BUFFER_STATE */
  31.257 +
  31.258 +/* Stack of input buffers. */
  31.259 +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
  31.260 +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
  31.261 +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
  31.262 +
  31.263 +/* We provide macros for accessing buffer states in case in the
  31.264 + * future we want to put the buffer states in a more general
  31.265 + * "scanner state".
  31.266 + *
  31.267 + * Returns the top of the stack, or NULL.
  31.268 + */
  31.269 +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
  31.270 +                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
  31.271 +                          : NULL)
  31.272 +
  31.273 +/* Same as previous macro, but useful when we know that the buffer stack is not
  31.274 + * NULL or when we need an lvalue. For internal use only.
  31.275 + */
  31.276 +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
  31.277 +
  31.278 +/* yy_hold_char holds the character lost when zconftext is formed. */
  31.279 +static char yy_hold_char;
  31.280 +static int yy_n_chars;		/* number of characters read into yy_ch_buf */
  31.281 +int zconfleng;
  31.282 +
  31.283 +/* Points to current character in buffer. */
  31.284 +static char *yy_c_buf_p = (char *) 0;
  31.285 +static int yy_init = 0;		/* whether we need to initialize */
  31.286 +static int yy_start = 0;	/* start state number */
  31.287 +
  31.288 +/* Flag which is used to allow zconfwrap()'s to do buffer switches
  31.289 + * instead of setting up a fresh zconfin.  A bit of a hack ...
  31.290 + */
  31.291 +static int yy_did_buffer_switch_on_eof;
  31.292 +
  31.293 +void zconfrestart (FILE *input_file  );
  31.294 +void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
  31.295 +YY_BUFFER_STATE zconf_create_buffer (FILE *file,int size  );
  31.296 +void zconf_delete_buffer (YY_BUFFER_STATE b  );
  31.297 +void zconf_flush_buffer (YY_BUFFER_STATE b  );
  31.298 +void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer  );
  31.299 +void zconfpop_buffer_state (void );
  31.300 +
  31.301 +static void zconfensure_buffer_stack (void );
  31.302 +static void zconf_load_buffer_state (void );
  31.303 +static void zconf_init_buffer (YY_BUFFER_STATE b,FILE *file  );
  31.304 +
  31.305 +#define YY_FLUSH_BUFFER zconf_flush_buffer(YY_CURRENT_BUFFER )
  31.306 +
  31.307 +YY_BUFFER_STATE zconf_scan_buffer (char *base,yy_size_t size  );
  31.308 +YY_BUFFER_STATE zconf_scan_string (yyconst char *yy_str  );
  31.309 +YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,int len  );
  31.310 +
  31.311 +void *zconfalloc (yy_size_t  );
  31.312 +void *zconfrealloc (void *,yy_size_t  );
  31.313 +void zconffree (void *  );
  31.314 +
  31.315 +#define yy_new_buffer zconf_create_buffer
  31.316 +
  31.317 +#define yy_set_interactive(is_interactive) \
  31.318 +	{ \
  31.319 +	if ( ! YY_CURRENT_BUFFER ){ \
  31.320 +        zconfensure_buffer_stack (); \
  31.321 +		YY_CURRENT_BUFFER_LVALUE =    \
  31.322 +            zconf_create_buffer(zconfin,YY_BUF_SIZE ); \
  31.323 +	} \
  31.324 +	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
  31.325 +	}
  31.326 +
  31.327 +#define yy_set_bol(at_bol) \
  31.328 +	{ \
  31.329 +	if ( ! YY_CURRENT_BUFFER ){\
  31.330 +        zconfensure_buffer_stack (); \
  31.331 +		YY_CURRENT_BUFFER_LVALUE =    \
  31.332 +            zconf_create_buffer(zconfin,YY_BUF_SIZE ); \
  31.333 +	} \
  31.334 +	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
  31.335 +	}
  31.336 +
  31.337 +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
  31.338 +
  31.339 +/* Begin user sect3 */
  31.340 +
  31.341 +#define zconfwrap() 1
  31.342 +#define YY_SKIP_YYWRAP
  31.343 +
  31.344 +typedef unsigned char YY_CHAR;
  31.345 +
  31.346 +FILE *zconfin = (FILE *) 0, *zconfout = (FILE *) 0;
  31.347 +
  31.348 +typedef int yy_state_type;
  31.349 +
  31.350 +extern int zconflineno;
  31.351 +
  31.352 +int zconflineno = 1;
  31.353 +
  31.354 +extern char *zconftext;
  31.355 +#define yytext_ptr zconftext
  31.356 +static yyconst flex_int16_t yy_nxt[][17] =
  31.357 +    {
  31.358 +    {
  31.359 +        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  31.360 +        0,    0,    0,    0,    0,    0,    0
  31.361 +    },
  31.362 +
  31.363 +    {
  31.364 +       11,   12,   13,   14,   12,   12,   15,   12,   12,   12,
  31.365 +       12,   12,   12,   12,   12,   12,   12
  31.366 +    },
  31.367 +
  31.368 +    {
  31.369 +       11,   12,   13,   14,   12,   12,   15,   12,   12,   12,
  31.370 +       12,   12,   12,   12,   12,   12,   12
  31.371 +    },
  31.372 +
  31.373 +    {
  31.374 +       11,   16,   16,   17,   16,   16,   16,   16,   16,   16,
  31.375 +       16,   16,   16,   18,   16,   16,   16
  31.376 +    },
  31.377 +
  31.378 +    {
  31.379 +       11,   16,   16,   17,   16,   16,   16,   16,   16,   16,
  31.380 +       16,   16,   16,   18,   16,   16,   16
  31.381 +
  31.382 +    },
  31.383 +
  31.384 +    {
  31.385 +       11,   19,   20,   21,   19,   19,   19,   19,   19,   19,
  31.386 +       19,   19,   19,   19,   19,   19,   19
  31.387 +    },
  31.388 +
  31.389 +    {
  31.390 +       11,   19,   20,   21,   19,   19,   19,   19,   19,   19,
  31.391 +       19,   19,   19,   19,   19,   19,   19
  31.392 +    },
  31.393 +
  31.394 +    {
  31.395 +       11,   22,   22,   23,   22,   24,   22,   22,   24,   22,
  31.396 +       22,   22,   22,   22,   22,   25,   22
  31.397 +    },
  31.398 +
  31.399 +    {
  31.400 +       11,   22,   22,   23,   22,   24,   22,   22,   24,   22,
  31.401 +       22,   22,   22,   22,   22,   25,   22
  31.402 +    },
  31.403 +
  31.404 +    {
  31.405 +       11,   26,   26,   27,   28,   29,   30,   31,   29,   32,
  31.406 +       33,   34,   35,   35,   36,   37,   38
  31.407 +
  31.408 +    },
  31.409 +
  31.410 +    {
  31.411 +       11,   26,   26,   27,   28,   29,   30,   31,   29,   32,
  31.412 +       33,   34,   35,   35,   36,   37,   38
  31.413 +    },
  31.414 +
  31.415 +    {
  31.416 +      -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,  -11,
  31.417 +      -11,  -11,  -11,  -11,  -11,  -11,  -11
  31.418 +    },
  31.419 +
  31.420 +    {
  31.421 +       11,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,  -12,
  31.422 +      -12,  -12,  -12,  -12,  -12,  -12,  -12
  31.423 +    },
  31.424 +
  31.425 +    {
  31.426 +       11,  -13,   39,   40,  -13,  -13,   41,  -13,  -13,  -13,
  31.427 +      -13,  -13,  -13,  -13,  -13,  -13,  -13
  31.428 +    },
  31.429 +
  31.430 +    {
  31.431 +       11,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,  -14,
  31.432 +      -14,  -14,  -14,  -14,  -14,  -14,  -14
  31.433 +
  31.434 +    },
  31.435 +
  31.436 +    {
  31.437 +       11,   42,   42,   43,   42,   42,   42,   42,   42,   42,
  31.438 +       42,   42,   42,   42,   42,   42,   42
  31.439 +    },
  31.440 +
  31.441 +    {
  31.442 +       11,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,  -16,
  31.443 +      -16,  -16,  -16,  -16,  -16,  -16,  -16
  31.444 +    },
  31.445 +
  31.446 +    {
  31.447 +       11,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,  -17,
  31.448 +      -17,  -17,  -17,  -17,  -17,  -17,  -17
  31.449 +    },
  31.450 +
  31.451 +    {
  31.452 +       11,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,
  31.453 +      -18,  -18,  -18,   44,  -18,  -18,  -18
  31.454 +    },
  31.455 +
  31.456 +    {
  31.457 +       11,   45,   45,  -19,   45,   45,   45,   45,   45,   45,
  31.458 +       45,   45,   45,   45,   45,   45,   45
  31.459 +
  31.460 +    },
  31.461 +
  31.462 +    {
  31.463 +       11,  -20,   46,   47,  -20,  -20,  -20,  -20,  -20,  -20,
  31.464 +      -20,  -20,  -20,  -20,  -20,  -20,  -20
  31.465 +    },
  31.466 +
  31.467 +    {
  31.468 +       11,   48,  -21,  -21,   48,   48,   48,   48,   48,   48,
  31.469 +       48,   48,   48,   48,   48,   48,   48
  31.470 +    },
  31.471 +
  31.472 +    {
  31.473 +       11,   49,   49,   50,   49,  -22,   49,   49,  -22,   49,
  31.474 +       49,   49,   49,   49,   49,  -22,   49
  31.475 +    },
  31.476 +
  31.477 +    {
  31.478 +       11,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,
  31.479 +      -23,  -23,  -23,  -23,  -23,  -23,  -23
  31.480 +    },
  31.481 +
  31.482 +    {
  31.483 +       11,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,
  31.484 +      -24,  -24,  -24,  -24,  -24,  -24,  -24
  31.485 +
  31.486 +    },
  31.487 +
  31.488 +    {
  31.489 +       11,   51,   51,   52,   51,   51,   51,   51,   51,   51,
  31.490 +       51,   51,   51,   51,   51,   51,   51
  31.491 +    },
  31.492 +
  31.493 +    {
  31.494 +       11,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
  31.495 +      -26,  -26,  -26,  -26,  -26,  -26,  -26
  31.496 +    },
  31.497 +
  31.498 +    {
  31.499 +       11,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,
  31.500 +      -27,  -27,  -27,  -27,  -27,  -27,  -27
  31.501 +    },
  31.502 +
  31.503 +    {
  31.504 +       11,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
  31.505 +      -28,  -28,  -28,  -28,   53,  -28,  -28
  31.506 +    },
  31.507 +
  31.508 +    {
  31.509 +       11,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
  31.510 +      -29,  -29,  -29,  -29,  -29,  -29,  -29
  31.511 +
  31.512 +    },
  31.513 +
  31.514 +    {
  31.515 +       11,   54,   54,  -30,   54,   54,   54,   54,   54,   54,
  31.516 +       54,   54,   54,   54,   54,   54,   54
  31.517 +    },
  31.518 +
  31.519 +    {
  31.520 +       11,  -31,  -31,  -31,  -31,  -31,  -31,   55,  -31,  -31,
  31.521 +      -31,  -31,  -31,  -31,  -31,  -31,  -31
  31.522 +    },
  31.523 +
  31.524 +    {
  31.525 +       11,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,
  31.526 +      -32,  -32,  -32,  -32,  -32,  -32,  -32
  31.527 +    },
  31.528 +
  31.529 +    {
  31.530 +       11,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,  -33,
  31.531 +      -33,  -33,  -33,  -33,  -33,  -33,  -33
  31.532 +    },
  31.533 +
  31.534 +    {
  31.535 +       11,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,  -34,
  31.536 +      -34,   56,   57,   57,  -34,  -34,  -34
  31.537 +
  31.538 +    },
  31.539 +
  31.540 +    {
  31.541 +       11,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,  -35,
  31.542 +      -35,   57,   57,   57,  -35,  -35,  -35
  31.543 +    },
  31.544 +
  31.545 +    {
  31.546 +       11,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,  -36,
  31.547 +      -36,  -36,  -36,  -36,  -36,  -36,  -36
  31.548 +    },
  31.549 +
  31.550 +    {
  31.551 +       11,  -37,  -37,   58,  -37,  -37,  -37,  -37,  -37,  -37,
  31.552 +      -37,  -37,  -37,  -37,  -37,  -37,  -37
  31.553 +    },
  31.554 +
  31.555 +    {
  31.556 +       11,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,  -38,
  31.557 +      -38,  -38,  -38,  -38,  -38,  -38,   59
  31.558 +    },
  31.559 +
  31.560 +    {
  31.561 +       11,  -39,   39,   40,  -39,  -39,   41,  -39,  -39,  -39,
  31.562 +      -39,  -39,  -39,  -39,  -39,  -39,  -39
  31.563 +
  31.564 +    },
  31.565 +
  31.566 +    {
  31.567 +       11,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,
  31.568 +      -40,  -40,  -40,  -40,  -40,  -40,  -40
  31.569 +    },
  31.570 +
  31.571 +    {
  31.572 +       11,   42,   42,   43,   42,   42,   42,   42,   42,   42,
  31.573 +       42,   42,   42,   42,   42,   42,   42
  31.574 +    },
  31.575 +
  31.576 +    {
  31.577 +       11,   42,   42,   43,   42,   42,   42,   42,   42,   42,
  31.578 +       42,   42,   42,   42,   42,   42,   42
  31.579 +    },
  31.580 +
  31.581 +    {
  31.582 +       11,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,  -43,
  31.583 +      -43,  -43,  -43,  -43,  -43,  -43,  -43
  31.584 +    },
  31.585 +
  31.586 +    {
  31.587 +       11,  -44,  -44,  -44,  -44,  -44,  -44,  -44,  -44,  -44,
  31.588 +      -44,  -44,  -44,   44,  -44,  -44,  -44
  31.589 +
  31.590 +    },
  31.591 +
  31.592 +    {
  31.593 +       11,   45,   45,  -45,   45,   45,   45,   45,   45,   45,
  31.594 +       45,   45,   45,   45,   45,   45,   45
  31.595 +    },
  31.596 +
  31.597 +    {
  31.598 +       11,  -46,   46,   47,  -46,  -46,  -46,  -46,  -46,  -46,
  31.599 +      -46,  -46,  -46,  -46,  -46,  -46,  -46
  31.600 +    },
  31.601 +
  31.602 +    {
  31.603 +       11,   48,  -47,  -47,   48,   48,   48,   48,   48,   48,
  31.604 +       48,   48,   48,   48,   48,   48,   48
  31.605 +    },
  31.606 +
  31.607 +    {
  31.608 +       11,  -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48,
  31.609 +      -48,  -48,  -48,  -48,  -48,  -48,  -48
  31.610 +    },
  31.611 +
  31.612 +    {
  31.613 +       11,   49,   49,   50,   49,  -49,   49,   49,  -49,   49,
  31.614 +       49,   49,   49,   49,   49,  -49,   49
  31.615 +
  31.616 +    },
  31.617 +
  31.618 +    {
  31.619 +       11,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,
  31.620 +      -50,  -50,  -50,  -50,  -50,  -50,  -50
  31.621 +    },
  31.622 +
  31.623 +    {
  31.624 +       11,  -51,  -51,   52,  -51,  -51,  -51,  -51,  -51,  -51,
  31.625 +      -51,  -51,  -51,  -51,  -51,  -51,  -51
  31.626 +    },
  31.627 +
  31.628 +    {
  31.629 +       11,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,
  31.630 +      -52,  -52,  -52,  -52,  -52,  -52,  -52
  31.631 +    },
  31.632 +
  31.633 +    {
  31.634 +       11,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,
  31.635 +      -53,  -53,  -53,  -53,  -53,  -53,  -53
  31.636 +    },
  31.637 +
  31.638 +    {
  31.639 +       11,   54,   54,  -54,   54,   54,   54,   54,   54,   54,
  31.640 +       54,   54,   54,   54,   54,   54,   54
  31.641 +
  31.642 +    },
  31.643 +
  31.644 +    {
  31.645 +       11,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,
  31.646 +      -55,  -55,  -55,  -55,  -55,  -55,  -55
  31.647 +    },
  31.648 +
  31.649 +    {
  31.650 +       11,  -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56,
  31.651 +      -56,   60,   57,   57,  -56,  -56,  -56
  31.652 +    },
  31.653 +
  31.654 +    {
  31.655 +       11,  -57,  -57,  -57,  -57,  -57,  -57,  -57,  -57,  -57,
  31.656 +      -57,   57,   57,   57,  -57,  -57,  -57
  31.657 +    },
  31.658 +
  31.659 +    {
  31.660 +       11,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,
  31.661 +      -58,  -58,  -58,  -58,  -58,  -58,  -58
  31.662 +    },
  31.663 +
  31.664 +    {
  31.665 +       11,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,
  31.666 +      -59,  -59,  -59,  -59,  -59,  -59,  -59
  31.667 +
  31.668 +    },
  31.669 +
  31.670 +    {
  31.671 +       11,  -60,  -60,  -60,  -60,  -60,  -60,  -60,  -60,  -60,
  31.672 +      -60,   57,   57,   57,  -60,  -60,  -60
  31.673 +    },
  31.674 +
  31.675 +    } ;
  31.676 +
  31.677 +static yy_state_type yy_get_previous_state (void );
  31.678 +static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
  31.679 +static int yy_get_next_buffer (void );
  31.680 +static void yy_fatal_error (yyconst char msg[]  );
  31.681 +
  31.682 +/* Done after the current pattern has been matched and before the
  31.683 + * corresponding action - sets up zconftext.
  31.684 + */
  31.685 +#define YY_DO_BEFORE_ACTION \
  31.686 +	(yytext_ptr) = yy_bp; \
  31.687 +	zconfleng = (size_t) (yy_cp - yy_bp); \
  31.688 +	(yy_hold_char) = *yy_cp; \
  31.689 +	*yy_cp = '\0'; \
  31.690 +	(yy_c_buf_p) = yy_cp;
  31.691 +
  31.692 +#define YY_NUM_RULES 33
  31.693 +#define YY_END_OF_BUFFER 34
  31.694 +/* This struct is not used in this scanner,
  31.695 +   but its presence is necessary. */
  31.696 +struct yy_trans_info
  31.697 +	{
  31.698 +	flex_int32_t yy_verify;
  31.699 +	flex_int32_t yy_nxt;
  31.700 +	};
  31.701 +static yyconst flex_int16_t yy_accept[61] =
  31.702 +    {   0,
  31.703 +        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  31.704 +       34,    5,    4,    2,    3,    7,    8,    6,   32,   29,
  31.705 +       31,   24,   28,   27,   26,   22,   17,   13,   16,   20,
  31.706 +       22,   11,   12,   19,   19,   14,   22,   22,    4,    2,
  31.707 +        3,    3,    1,    6,   32,   29,   31,   30,   24,   23,
  31.708 +       26,   25,   15,   20,    9,   19,   19,   21,   10,   18
  31.709 +    } ;
  31.710 +
  31.711 +static yyconst flex_int32_t yy_ec[256] =
  31.712 +    {   0,
  31.713 +        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
  31.714 +        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  31.715 +        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  31.716 +        1,    2,    4,    5,    6,    1,    1,    7,    8,    9,
  31.717 +       10,    1,    1,    1,   11,   12,   12,   13,   13,   13,
  31.718 +       13,   13,   13,   13,   13,   13,   13,    1,    1,    1,
  31.719 +       14,    1,    1,    1,   13,   13,   13,   13,   13,   13,
  31.720 +       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
  31.721 +       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
  31.722 +        1,   15,    1,    1,   13,    1,   13,   13,   13,   13,
  31.723 +
  31.724 +       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
  31.725 +       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
  31.726 +       13,   13,    1,   16,    1,    1,    1,    1,    1,    1,
  31.727 +        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  31.728 +        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  31.729 +        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  31.730 +        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  31.731 +        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  31.732 +        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  31.733 +        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  31.734 +
  31.735 +        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  31.736 +        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  31.737 +        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  31.738 +        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  31.739 +        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  31.740 +        1,    1,    1,    1,    1
  31.741 +    } ;
  31.742 +
  31.743 +extern int zconf_flex_debug;
  31.744 +int zconf_flex_debug = 0;
  31.745 +
  31.746 +/* The intent behind this definition is that it'll catch
  31.747 + * any uses of REJECT which flex missed.
  31.748 + */
  31.749 +#define REJECT reject_used_but_not_detected
  31.750 +#define yymore() yymore_used_but_not_detected
  31.751 +#define YY_MORE_ADJ 0
  31.752 +#define YY_RESTORE_YY_MORE_OFFSET
  31.753 +char *zconftext;
  31.754 +
  31.755 +/*
  31.756 + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
  31.757 + * Released under the terms of the GNU GPL v2.0.
  31.758 + */
  31.759 +
  31.760 +#include <limits.h>
  31.761 +#include <stdio.h>
  31.762 +#include <stdlib.h>
  31.763 +#include <string.h>
  31.764 +#include <unistd.h>
  31.765 +
  31.766 +#define LKC_DIRECT_LINK
  31.767 +#include "lkc.h"
  31.768 +
  31.769 +#define START_STRSIZE	16
  31.770 +
  31.771 +static struct {
  31.772 +	struct file *file;
  31.773 +	int lineno;
  31.774 +} current_pos;
  31.775 +
  31.776 +static char *text;
  31.777 +static int text_size, text_asize;
  31.778 +
  31.779 +struct buffer {
  31.780 +        struct buffer *parent;
  31.781 +        YY_BUFFER_STATE state;
  31.782 +};
  31.783 +
  31.784 +struct buffer *current_buf;
  31.785 +
  31.786 +static int last_ts, first_ts;
  31.787 +
  31.788 +static void zconf_endhelp(void);
  31.789 +static void zconf_endfile(void);
  31.790 +
  31.791 +void new_string(void)
  31.792 +{
  31.793 +	text = malloc(START_STRSIZE);
  31.794 +	text_asize = START_STRSIZE;
  31.795 +	text_size = 0;
  31.796 +	*text = 0;
  31.797 +}
  31.798 +
  31.799 +void append_string(const char *str, int size)
  31.800 +{
  31.801 +	int new_size = text_size + size + 1;
  31.802 +	if (new_size > text_asize) {
  31.803 +		new_size += START_STRSIZE - 1;
  31.804 +		new_size &= -START_STRSIZE;
  31.805 +		text = realloc(text, new_size);
  31.806 +		text_asize = new_size;
  31.807 +	}
  31.808 +	memcpy(text + text_size, str, size);
  31.809 +	text_size += size;
  31.810 +	text[text_size] = 0;
  31.811 +}
  31.812 +
  31.813 +void alloc_string(const char *str, int size)
  31.814 +{
  31.815 +	text = malloc(size + 1);
  31.816 +	memcpy(text, str, size);
  31.817 +	text[size] = 0;
  31.818 +}
  31.819 +
  31.820 +#define INITIAL 0
  31.821 +#define COMMAND 1
  31.822 +#define HELP 2
  31.823 +#define STRING 3
  31.824 +#define PARAM 4
  31.825 +
  31.826 +#ifndef YY_NO_UNISTD_H
  31.827 +/* Special case for "unistd.h", since it is non-ANSI. We include it way
  31.828 + * down here because we want the user's section 1 to have been scanned first.
  31.829 + * The user has a chance to override it with an option.
  31.830 + */
  31.831 +#include <unistd.h>
  31.832 +#endif
  31.833 +
  31.834 +#ifndef YY_EXTRA_TYPE
  31.835 +#define YY_EXTRA_TYPE void *
  31.836 +#endif
  31.837 +
  31.838 +static int yy_init_globals (void );
  31.839 +
  31.840 +/* Macros after this point can all be overridden by user definitions in
  31.841 + * section 1.
  31.842 + */
  31.843 +
  31.844 +#ifndef YY_SKIP_YYWRAP
  31.845 +#ifdef __cplusplus
  31.846 +extern "C" int zconfwrap (void );
  31.847 +#else
  31.848 +extern int zconfwrap (void );
  31.849 +#endif
  31.850 +#endif
  31.851 +
  31.852 +    static void yyunput (int c,char *buf_ptr  );
  31.853 +    
  31.854 +#ifndef yytext_ptr
  31.855 +static void yy_flex_strncpy (char *,yyconst char *,int );
  31.856 +#endif
  31.857 +
  31.858 +#ifdef YY_NEED_STRLEN
  31.859 +static int yy_flex_strlen (yyconst char * );
  31.860 +#endif
  31.861 +
  31.862 +#ifndef YY_NO_INPUT
  31.863 +
  31.864 +#ifdef __cplusplus
  31.865 +static int yyinput (void );
  31.866 +#else
  31.867 +static int input (void );
  31.868 +#endif
  31.869 +
  31.870 +#endif
  31.871 +
  31.872 +/* Amount of stuff to slurp up with each read. */
  31.873 +#ifndef YY_READ_BUF_SIZE
  31.874 +#define YY_READ_BUF_SIZE 8192
  31.875 +#endif
  31.876 +
  31.877 +/* Copy whatever the last rule matched to the standard output. */
  31.878 +#ifndef ECHO
  31.879 +/* This used to be an fputs(), but since the string might contain NUL's,
  31.880 + * we now use fwrite().
  31.881 + */
  31.882 +#define ECHO (void) fwrite( zconftext, zconfleng, 1, zconfout )
  31.883 +#endif
  31.884 +
  31.885 +/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  31.886 + * is returned in "result".
  31.887 + */
  31.888 +#ifndef YY_INPUT
  31.889 +#define YY_INPUT(buf,result,max_size) \
  31.890 +	errno=0; \
  31.891 +	while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0 ) \
  31.892 +	{ \
  31.893 +		if( errno != EINTR) \
  31.894 +		{ \
  31.895 +			YY_FATAL_ERROR( "input in flex scanner failed" ); \
  31.896 +			break; \
  31.897 +		} \
  31.898 +		errno=0; \
  31.899 +		clearerr(zconfin); \
  31.900 +	}\
  31.901 +\
  31.902 +
  31.903 +#endif
  31.904 +
  31.905 +/* No semi-colon after return; correct usage is to write "yyterminate();" -
  31.906 + * we don't want an extra ';' after the "return" because that will cause
  31.907 + * some compilers to complain about unreachable statements.
  31.908 + */
  31.909 +#ifndef yyterminate
  31.910 +#define yyterminate() return YY_NULL
  31.911 +#endif
  31.912 +
  31.913 +/* Number of entries by which start-condition stack grows. */
  31.914 +#ifndef YY_START_STACK_INCR
  31.915 +#define YY_START_STACK_INCR 25
  31.916 +#endif
  31.917 +
  31.918 +/* Report a fatal error. */
  31.919 +#ifndef YY_FATAL_ERROR
  31.920 +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
  31.921 +#endif
  31.922 +
  31.923 +/* end tables serialization structures and prototypes */
  31.924 +
  31.925 +/* Default declaration of generated scanner - a define so the user can
  31.926 + * easily add parameters.
  31.927 + */
  31.928 +#ifndef YY_DECL
  31.929 +#define YY_DECL_IS_OURS 1
  31.930 +
  31.931 +extern int zconflex (void);
  31.932 +
  31.933 +#define YY_DECL int zconflex (void)
  31.934 +#endif /* !YY_DECL */
  31.935 +
  31.936 +/* Code executed at the beginning of each rule, after zconftext and zconfleng
  31.937 + * have been set up.
  31.938 + */
  31.939 +#ifndef YY_USER_ACTION
  31.940 +#define YY_USER_ACTION
  31.941 +#endif
  31.942 +
  31.943 +/* Code executed at the end of each rule. */
  31.944 +#ifndef YY_BREAK
  31.945 +#define YY_BREAK break;
  31.946 +#endif
  31.947 +
  31.948 +#define YY_RULE_SETUP \
  31.949 +	YY_USER_ACTION
  31.950 +
  31.951 +/** The main scanner function which does all the work.
  31.952 + */
  31.953 +YY_DECL
  31.954 +{
  31.955 +	register yy_state_type yy_current_state;
  31.956 +	register char *yy_cp, *yy_bp;
  31.957 +	register int yy_act;
  31.958 +    
  31.959 +	int str = 0;
  31.960 +	int ts, i;
  31.961 +
  31.962 +	if ( !(yy_init) )
  31.963 +		{
  31.964 +		(yy_init) = 1;
  31.965 +
  31.966 +#ifdef YY_USER_INIT
  31.967 +		YY_USER_INIT;
  31.968 +#endif
  31.969 +
  31.970 +		if ( ! (yy_start) )
  31.971 +			(yy_start) = 1;	/* first start state */
  31.972 +
  31.973 +		if ( ! zconfin )
  31.974 +			zconfin = stdin;
  31.975 +
  31.976 +		if ( ! zconfout )
  31.977 +			zconfout = stdout;
  31.978 +
  31.979 +		if ( ! YY_CURRENT_BUFFER ) {
  31.980 +			zconfensure_buffer_stack ();
  31.981 +			YY_CURRENT_BUFFER_LVALUE =
  31.982 +				zconf_create_buffer(zconfin,YY_BUF_SIZE );
  31.983 +		}
  31.984 +
  31.985 +		zconf_load_buffer_state( );
  31.986 +		}
  31.987 +
  31.988 +	while ( 1 )		/* loops until end-of-file is reached */
  31.989 +		{
  31.990 +		yy_cp = (yy_c_buf_p);
  31.991 +
  31.992 +		/* Support of zconftext. */
  31.993 +		*yy_cp = (yy_hold_char);
  31.994 +
  31.995 +		/* yy_bp points to the position in yy_ch_buf of the start of
  31.996 +		 * the current run.
  31.997 +		 */
  31.998 +		yy_bp = yy_cp;
  31.999 +
 31.1000 +		yy_current_state = (yy_start);
 31.1001 +yy_match:
 31.1002 +		while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)]  ]) > 0 )
 31.1003 +			++yy_cp;
 31.1004 +
 31.1005 +		yy_current_state = -yy_current_state;
 31.1006 +
 31.1007 +yy_find_action:
 31.1008 +		yy_act = yy_accept[yy_current_state];
 31.1009 +
 31.1010 +		YY_DO_BEFORE_ACTION;
 31.1011 +
 31.1012 +do_action:	/* This label is used only to access EOF actions. */
 31.1013 +
 31.1014 +		switch ( yy_act )
 31.1015 +	{ /* beginning of action switch */
 31.1016 +case 1:
 31.1017 +/* rule 1 can match eol */
 31.1018 +case 2:
 31.1019 +/* rule 2 can match eol */
 31.1020 +YY_RULE_SETUP
 31.1021 +{
 31.1022 +	current_file->lineno++;
 31.1023 +	return T_EOL;
 31.1024 +}
 31.1025 +	YY_BREAK
 31.1026 +case 3:
 31.1027 +YY_RULE_SETUP
 31.1028 +
 31.1029 +	YY_BREAK
 31.1030 +case 4:
 31.1031 +YY_RULE_SETUP
 31.1032 +{
 31.1033 +	BEGIN(COMMAND);
 31.1034 +}
 31.1035 +	YY_BREAK
 31.1036 +case 5:
 31.1037 +YY_RULE_SETUP
 31.1038 +{
 31.1039 +	unput(zconftext[0]);
 31.1040 +	BEGIN(COMMAND);
 31.1041 +}
 31.1042 +	YY_BREAK
 31.1043 +
 31.1044 +case 6:
 31.1045 +YY_RULE_SETUP
 31.1046 +{
 31.1047 +		struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
 31.1048 +		BEGIN(PARAM);
 31.1049 +		current_pos.file = current_file;
 31.1050 +		current_pos.lineno = current_file->lineno;
 31.1051 +		if (id && id->flags & TF_COMMAND) {
 31.1052 +			zconflval.id = id;
 31.1053 +			return id->token;
 31.1054 +		}
 31.1055 +		alloc_string(zconftext, zconfleng);
 31.1056 +		zconflval.string = text;
 31.1057 +		return T_WORD;
 31.1058 +	}
 31.1059 +	YY_BREAK
 31.1060 +case 7:
 31.1061 +YY_RULE_SETUP
 31.1062 +
 31.1063 +	YY_BREAK
 31.1064 +case 8:
 31.1065 +/* rule 8 can match eol */
 31.1066 +YY_RULE_SETUP
 31.1067 +{
 31.1068 +		BEGIN(INITIAL);
 31.1069 +		current_file->lineno++;
 31.1070 +		return T_EOL;
 31.1071 +	}
 31.1072 +	YY_BREAK
 31.1073 +
 31.1074 +case 9:
 31.1075 +YY_RULE_SETUP
 31.1076 +return T_AND;
 31.1077 +	YY_BREAK
 31.1078 +case 10:
 31.1079 +YY_RULE_SETUP
 31.1080 +return T_OR;
 31.1081 +	YY_BREAK
 31.1082 +case 11:
 31.1083 +YY_RULE_SETUP
 31.1084 +return T_OPEN_PAREN;
 31.1085 +	YY_BREAK
 31.1086 +case 12:
 31.1087 +YY_RULE_SETUP
 31.1088 +return T_CLOSE_PAREN;
 31.1089 +	YY_BREAK
 31.1090 +case 13:
 31.1091 +YY_RULE_SETUP
 31.1092 +return T_NOT;
 31.1093 +	YY_BREAK
 31.1094 +case 14:
 31.1095 +YY_RULE_SETUP
 31.1096 +return T_EQUAL;
 31.1097 +	YY_BREAK
 31.1098 +case 15:
 31.1099 +YY_RULE_SETUP
 31.1100 +return T_UNEQUAL;
 31.1101 +	YY_BREAK
 31.1102 +case 16:
 31.1103 +YY_RULE_SETUP
 31.1104 +{
 31.1105 +		str = zconftext[0];
 31.1106 +		new_string();
 31.1107 +		BEGIN(STRING);
 31.1108 +	}
 31.1109 +	YY_BREAK
 31.1110 +case 17:
 31.1111 +/* rule 17 can match eol */
 31.1112 +YY_RULE_SETUP
 31.1113 +BEGIN(INITIAL); current_file->lineno++; return T_EOL;
 31.1114 +	YY_BREAK
 31.1115 +case 18:
 31.1116 +YY_RULE_SETUP
 31.1117 +/* ignore */
 31.1118 +	YY_BREAK
 31.1119 +case 19:
 31.1120 +YY_RULE_SETUP
 31.1121 +{
 31.1122 +		struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
 31.1123 +		if (id && id->flags & TF_PARAM) {
 31.1124 +			zconflval.id = id;
 31.1125 +			return id->token;
 31.1126 +		}
 31.1127 +		alloc_string(zconftext, zconfleng);
 31.1128 +		zconflval.string = text;
 31.1129 +		return T_WORD;
 31.1130 +	}
 31.1131 +	YY_BREAK
 31.1132 +case 20:
 31.1133 +YY_RULE_SETUP
 31.1134 +/* comment */
 31.1135 +	YY_BREAK
 31.1136 +case 21:
 31.1137 +/* rule 21 can match eol */
 31.1138 +YY_RULE_SETUP
 31.1139 +current_file->lineno++;
 31.1140 +	YY_BREAK
 31.1141 +case 22:
 31.1142 +YY_RULE_SETUP
 31.1143 +
 31.1144 +	YY_BREAK
 31.1145 +case YY_STATE_EOF(PARAM):
 31.1146 +{
 31.1147 +		BEGIN(INITIAL);
 31.1148 +	}
 31.1149 +	YY_BREAK
 31.1150 +
 31.1151 +case 23:
 31.1152 +/* rule 23 can match eol */
 31.1153 +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
 31.1154 +(yy_c_buf_p) = yy_cp -= 1;
 31.1155 +YY_DO_BEFORE_ACTION; /* set up zconftext again */
 31.1156 +YY_RULE_SETUP
 31.1157 +{
 31.1158 +		append_string(zconftext, zconfleng);
 31.1159 +		zconflval.string = text;
 31.1160 +		return T_WORD_QUOTE;
 31.1161 +	}
 31.1162 +	YY_BREAK
 31.1163 +case 24:
 31.1164 +YY_RULE_SETUP
 31.1165 +{
 31.1166 +		append_string(zconftext, zconfleng);
 31.1167 +	}
 31.1168 +	YY_BREAK
 31.1169 +case 25:
 31.1170 +/* rule 25 can match eol */
 31.1171 +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
 31.1172 +(yy_c_buf_p) = yy_cp -= 1;
 31.1173 +YY_DO_BEFORE_ACTION; /* set up zconftext again */
 31.1174 +YY_RULE_SETUP
 31.1175 +{
 31.1176 +		append_string(zconftext + 1, zconfleng - 1);
 31.1177 +		zconflval.string = text;
 31.1178 +		return T_WORD_QUOTE;
 31.1179 +	}
 31.1180 +	YY_BREAK
 31.1181 +case 26:
 31.1182 +YY_RULE_SETUP
 31.1183 +{
 31.1184 +		append_string(zconftext + 1, zconfleng - 1);
 31.1185 +	}
 31.1186 +	YY_BREAK
 31.1187 +case 27:
 31.1188 +YY_RULE_SETUP
 31.1189 +{
 31.1190 +		if (str == zconftext[0]) {
 31.1191 +			BEGIN(PARAM);
 31.1192 +			zconflval.string = text;
 31.1193 +			return T_WORD_QUOTE;
 31.1194 +		} else
 31.1195 +			append_string(zconftext, 1);
 31.1196 +	}
 31.1197 +	YY_BREAK
 31.1198 +case 28:
 31.1199 +/* rule 28 can match eol */
 31.1200 +YY_RULE_SETUP
 31.1201 +{
 31.1202 +		printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno());
 31.1203 +		current_file->lineno++;
 31.1204 +		BEGIN(INITIAL);
 31.1205 +		return T_EOL;
 31.1206 +	}
 31.1207 +	YY_BREAK
 31.1208 +case YY_STATE_EOF(STRING):
 31.1209 +{
 31.1210 +		BEGIN(INITIAL);
 31.1211 +	}
 31.1212 +	YY_BREAK
 31.1213 +
 31.1214 +case 29:
 31.1215 +YY_RULE_SETUP
 31.1216 +{
 31.1217 +		ts = 0;
 31.1218 +		for (i = 0; i < zconfleng; i++) {
 31.1219 +			if (zconftext[i] == '\t')
 31.1220 +				ts = (ts & ~7) + 8;
 31.1221 +			else
 31.1222 +				ts++;
 31.1223 +		}
 31.1224 +		last_ts = ts;
 31.1225 +		if (first_ts) {
 31.1226 +			if (ts < first_ts) {
 31.1227 +				zconf_endhelp();
 31.1228 +				return T_HELPTEXT;
 31.1229 +			}
 31.1230 +			ts -= first_ts;
 31.1231 +			while (ts > 8) {
 31.1232 +				append_string("        ", 8);
 31.1233 +				ts -= 8;
 31.1234 +			}
 31.1235 +			append_string("        ", ts);
 31.1236 +		}
 31.1237 +	}
 31.1238 +	YY_BREAK
 31.1239 +case 30:
 31.1240 +/* rule 30 can match eol */
 31.1241 +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
 31.1242 +(yy_c_buf_p) = yy_cp -= 1;
 31.1243 +YY_DO_BEFORE_ACTION; /* set up zconftext again */
 31.1244 +YY_RULE_SETUP
 31.1245 +{
 31.1246 +		current_file->lineno++;
 31.1247 +		zconf_endhelp();
 31.1248 +		return T_HELPTEXT;
 31.1249 +	}
 31.1250 +	YY_BREAK
 31.1251 +case 31:
 31.1252 +/* rule 31 can match eol */
 31.1253 +YY_RULE_SETUP
 31.1254 +{
 31.1255 +		current_file->lineno++;
 31.1256 +		append_string("\n", 1);
 31.1257 +	}
 31.1258 +	YY_BREAK
 31.1259 +case 32:
 31.1260 +YY_RULE_SETUP
 31.1261 +{
 31.1262 +		append_string(zconftext, zconfleng);
 31.1263 +		if (!first_ts)
 31.1264 +			first_ts = last_ts;
 31.1265 +	}
 31.1266 +	YY_BREAK
 31.1267 +case YY_STATE_EOF(HELP):
 31.1268 +{
 31.1269 +		zconf_endhelp();
 31.1270 +		return T_HELPTEXT;
 31.1271 +	}
 31.1272 +	YY_BREAK
 31.1273 +
 31.1274 +case YY_STATE_EOF(INITIAL):
 31.1275 +case YY_STATE_EOF(COMMAND):
 31.1276 +{
 31.1277 +	if (current_file) {
 31.1278 +		zconf_endfile();
 31.1279 +		return T_EOL;
 31.1280 +	}
 31.1281 +	fclose(zconfin);
 31.1282 +	yyterminate();
 31.1283 +}
 31.1284 +	YY_BREAK
 31.1285 +case 33:
 31.1286 +YY_RULE_SETUP
 31.1287 +YY_FATAL_ERROR( "flex scanner jammed" );
 31.1288 +	YY_BREAK
 31.1289 +
 31.1290 +	case YY_END_OF_BUFFER:
 31.1291 +		{
 31.1292 +		/* Amount of text matched not including the EOB char. */
 31.1293 +		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
 31.1294 +
 31.1295 +		/* Undo the effects of YY_DO_BEFORE_ACTION. */
 31.1296 +		*yy_cp = (yy_hold_char);
 31.1297 +		YY_RESTORE_YY_MORE_OFFSET
 31.1298 +
 31.1299 +		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
 31.1300 +			{
 31.1301 +			/* We're scanning a new file or input source.  It's
 31.1302 +			 * possible that this happened because the user
 31.1303 +			 * just pointed zconfin at a new source and called
 31.1304 +			 * zconflex().  If so, then we have to assure
 31.1305 +			 * consistency between YY_CURRENT_BUFFER and our
 31.1306 +			 * globals.  Here is the right place to do so, because
 31.1307 +			 * this is the first action (other than possibly a
 31.1308 +			 * back-up) that will match for the new input source.
 31.1309 +			 */
 31.1310 +			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
 31.1311 +			YY_CURRENT_BUFFER_LVALUE->yy_input_file = zconfin;
 31.1312 +			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
 31.1313 +			}
 31.1314 +
 31.1315 +		/* Note that here we test for yy_c_buf_p "<=" to the position
 31.1316 +		 * of the first EOB in the buffer, since yy_c_buf_p will
 31.1317 +		 * already have been incremented past the NUL character
 31.1318 +		 * (since all states make transitions on EOB to the
 31.1319 +		 * end-of-buffer state).  Contrast this with the test
 31.1320 +		 * in input().
 31.1321 +		 */
 31.1322 +		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
 31.1323 +			{ /* This was really a NUL. */
 31.1324 +			yy_state_type yy_next_state;
 31.1325 +
 31.1326 +			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
 31.1327 +
 31.1328 +			yy_current_state = yy_get_previous_state(  );
 31.1329 +
 31.1330 +			/* Okay, we're now positioned to make the NUL
 31.1331 +			 * transition.  We couldn't have
 31.1332 +			 * yy_get_previous_state() go ahead and do it
 31.1333 +			 * for us because it doesn't know how to deal
 31.1334 +			 * with the possibility of jamming (and we don't
 31.1335 +			 * want to build jamming into it because then it
 31.1336 +			 * will run more slowly).
 31.1337 +			 */
 31.1338 +
 31.1339 +			yy_next_state = yy_try_NUL_trans( yy_current_state );
 31.1340 +
 31.1341 +			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
 31.1342 +
 31.1343 +			if ( yy_next_state )
 31.1344 +				{
 31.1345 +				/* Consume the NUL. */
 31.1346 +				yy_cp = ++(yy_c_buf_p);
 31.1347 +				yy_current_state = yy_next_state;
 31.1348 +				goto yy_match;
 31.1349 +				}
 31.1350 +
 31.1351 +			else
 31.1352 +				{
 31.1353 +				yy_cp = (yy_c_buf_p);
 31.1354 +				goto yy_find_action;
 31.1355 +				}
 31.1356 +			}
 31.1357 +
 31.1358 +		else switch ( yy_get_next_buffer(  ) )
 31.1359 +			{
 31.1360 +			case EOB_ACT_END_OF_FILE:
 31.1361 +				{
 31.1362 +				(yy_did_buffer_switch_on_eof) = 0;
 31.1363 +
 31.1364 +				if ( zconfwrap( ) )
 31.1365 +					{
 31.1366 +					/* Note: because we've taken care in
 31.1367 +					 * yy_get_next_buffer() to have set up
 31.1368 +					 * zconftext, we can now set up
 31.1369 +					 * yy_c_buf_p so that if some total
 31.1370 +					 * hoser (like flex itself) wants to
 31.1371 +					 * call the scanner after we return the
 31.1372 +					 * YY_NULL, it'll still work - another
 31.1373 +					 * YY_NULL will get returned.
 31.1374 +					 */
 31.1375 +					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
 31.1376 +
 31.1377 +					yy_act = YY_STATE_EOF(YY_START);
 31.1378 +					goto do_action;
 31.1379 +					}
 31.1380 +
 31.1381 +				else
 31.1382 +					{
 31.1383 +					if ( ! (yy_did_buffer_switch_on_eof) )
 31.1384 +						YY_NEW_FILE;
 31.1385 +					}
 31.1386 +				break;
 31.1387 +				}
 31.1388 +
 31.1389 +			case EOB_ACT_CONTINUE_SCAN:
 31.1390 +				(yy_c_buf_p) =
 31.1391 +					(yytext_ptr) + yy_amount_of_matched_text;
 31.1392 +
 31.1393 +				yy_current_state = yy_get_previous_state(  );
 31.1394 +
 31.1395 +				yy_cp = (yy_c_buf_p);
 31.1396 +				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
 31.1397 +				goto yy_match;
 31.1398 +
 31.1399 +			case EOB_ACT_LAST_MATCH:
 31.1400 +				(yy_c_buf_p) =
 31.1401 +				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
 31.1402 +
 31.1403 +				yy_current_state = yy_get_previous_state(  );
 31.1404 +
 31.1405 +				yy_cp = (yy_c_buf_p);
 31.1406 +				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
 31.1407 +				goto yy_find_action;
 31.1408 +			}
 31.1409 +		break;
 31.1410 +		}
 31.1411 +
 31.1412 +	default:
 31.1413 +		YY_FATAL_ERROR(
 31.1414 +			"fatal flex scanner internal error--no action found" );
 31.1415 +	} /* end of action switch */
 31.1416 +		} /* end of scanning one token */
 31.1417 +} /* end of zconflex */
 31.1418 +
 31.1419 +/* yy_get_next_buffer - try to read in a new buffer
 31.1420 + *
 31.1421 + * Returns a code representing an action:
 31.1422 + *	EOB_ACT_LAST_MATCH -
 31.1423 + *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 31.1424 + *	EOB_ACT_END_OF_FILE - end of file
 31.1425 + */
 31.1426 +static int yy_get_next_buffer (void)
 31.1427 +{
 31.1428 +    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
 31.1429 +	register char *source = (yytext_ptr);
 31.1430 +	register int number_to_move, i;
 31.1431 +	int ret_val;
 31.1432 +
 31.1433 +	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
 31.1434 +		YY_FATAL_ERROR(
 31.1435 +		"fatal flex scanner internal error--end of buffer missed" );
 31.1436 +
 31.1437 +	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
 31.1438 +		{ /* Don't try to fill the buffer, so this is an EOF. */
 31.1439 +		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
 31.1440 +			{
 31.1441 +			/* We matched a single character, the EOB, so
 31.1442 +			 * treat this as a final EOF.
 31.1443 +			 */
 31.1444 +			return EOB_ACT_END_OF_FILE;
 31.1445 +			}
 31.1446 +
 31.1447 +		else
 31.1448 +			{
 31.1449 +			/* We matched some text prior to the EOB, first
 31.1450 +			 * process it.
 31.1451 +			 */
 31.1452 +			return EOB_ACT_LAST_MATCH;
 31.1453 +			}
 31.1454 +		}
 31.1455 +
 31.1456 +	/* Try to read more data. */
 31.1457 +
 31.1458 +	/* First move last chars to start of buffer. */
 31.1459 +	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
 31.1460 +
 31.1461 +	for ( i = 0; i < number_to_move; ++i )
 31.1462 +		*(dest++) = *(source++);
 31.1463 +
 31.1464 +	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
 31.1465 +		/* don't do the read, it's not guaranteed to return an EOF,
 31.1466 +		 * just force an EOF
 31.1467 +		 */
 31.1468 +		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
 31.1469 +
 31.1470 +	else
 31.1471 +		{
 31.1472 +			int num_to_read =
 31.1473 +			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
 31.1474 +
 31.1475 +		while ( num_to_read <= 0 )
 31.1476 +			{ /* Not enough room in the buffer - grow it. */
 31.1477 +
 31.1478 +			/* just a shorter name for the current buffer */
 31.1479 +			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
 31.1480 +
 31.1481 +			int yy_c_buf_p_offset =
 31.1482 +				(int) ((yy_c_buf_p) - b->yy_ch_buf);
 31.1483 +
 31.1484 +			if ( b->yy_is_our_buffer )
 31.1485 +				{
 31.1486 +				int new_size = b->yy_buf_size * 2;
 31.1487 +
 31.1488 +				if ( new_size <= 0 )
 31.1489 +					b->yy_buf_size += b->yy_buf_size / 8;
 31.1490 +				else
 31.1491 +					b->yy_buf_size *= 2;
 31.1492 +
 31.1493 +				b->yy_ch_buf = (char *)
 31.1494 +					/* Include room in for 2 EOB chars. */
 31.1495 +					zconfrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
 31.1496 +				}
 31.1497 +			else
 31.1498 +				/* Can't grow it, we don't own it. */
 31.1499 +				b->yy_ch_buf = 0;
 31.1500 +
 31.1501 +			if ( ! b->yy_ch_buf )
 31.1502 +				YY_FATAL_ERROR(
 31.1503 +				"fatal error - scanner input buffer overflow" );
 31.1504 +
 31.1505 +			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
 31.1506 +
 31.1507 +			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
 31.1508 +						number_to_move - 1;
 31.1509 +
 31.1510 +			}
 31.1511 +
 31.1512 +		if ( num_to_read > YY_READ_BUF_SIZE )
 31.1513 +			num_to_read = YY_READ_BUF_SIZE;
 31.1514 +
 31.1515 +		/* Read in more data. */
 31.1516 +		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
 31.1517 +			(yy_n_chars), num_to_read );
 31.1518 +
 31.1519 +		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
 31.1520 +		}
 31.1521 +
 31.1522 +	if ( (yy_n_chars) == 0 )
 31.1523 +		{
 31.1524 +		if ( number_to_move == YY_MORE_ADJ )
 31.1525 +			{
 31.1526 +			ret_val = EOB_ACT_END_OF_FILE;
 31.1527 +			zconfrestart(zconfin  );
 31.1528 +			}
 31.1529 +
 31.1530 +		else
 31.1531 +			{
 31.1532 +			ret_val = EOB_ACT_LAST_MATCH;
 31.1533 +			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
 31.1534 +				YY_BUFFER_EOF_PENDING;
 31.1535 +			}
 31.1536 +		}
 31.1537 +
 31.1538 +	else
 31.1539 +		ret_val = EOB_ACT_CONTINUE_SCAN;
 31.1540 +
 31.1541 +	(yy_n_chars) += number_to_move;
 31.1542 +	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
 31.1543 +	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
 31.1544 +
 31.1545 +	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
 31.1546 +
 31.1547 +	return ret_val;
 31.1548 +}
 31.1549 +
 31.1550 +/* yy_get_previous_state - get the state just before the EOB char was reached */
 31.1551 +
 31.1552 +    static yy_state_type yy_get_previous_state (void)
 31.1553 +{
 31.1554 +	register yy_state_type yy_current_state;
 31.1555 +	register char *yy_cp;
 31.1556 +    
 31.1557 +	yy_current_state = (yy_start);
 31.1558 +
 31.1559 +	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
 31.1560 +		{
 31.1561 +		yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)];
 31.1562 +		}
 31.1563 +
 31.1564 +	return yy_current_state;
 31.1565 +}
 31.1566 +
 31.1567 +/* yy_try_NUL_trans - try to make a transition on the NUL character
 31.1568 + *
 31.1569 + * synopsis
 31.1570 + *	next_state = yy_try_NUL_trans( current_state );
 31.1571 + */
 31.1572 +    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
 31.1573 +{
 31.1574 +	register int yy_is_jam;
 31.1575 +    
 31.1576 +	yy_current_state = yy_nxt[yy_current_state][1];
 31.1577 +	yy_is_jam = (yy_current_state <= 0);
 31.1578 +
 31.1579 +	return yy_is_jam ? 0 : yy_current_state;
 31.1580 +}
 31.1581 +
 31.1582 +    static void yyunput (int c, register char * yy_bp )
 31.1583 +{
 31.1584 +	register char *yy_cp;
 31.1585 +    
 31.1586 +    yy_cp = (yy_c_buf_p);
 31.1587 +
 31.1588 +	/* undo effects of setting up zconftext */
 31.1589 +	*yy_cp = (yy_hold_char);
 31.1590 +
 31.1591 +	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
 31.1592 +		{ /* need to shift things up to make room */
 31.1593 +		/* +2 for EOB chars. */
 31.1594 +		register int number_to_move = (yy_n_chars) + 2;
 31.1595 +		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
 31.1596 +					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
 31.1597 +		register char *source =
 31.1598 +				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
 31.1599 +
 31.1600 +		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
 31.1601 +			*--dest = *--source;
 31.1602 +
 31.1603 +		yy_cp += (int) (dest - source);
 31.1604 +		yy_bp += (int) (dest - source);
 31.1605 +		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
 31.1606 +			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
 31.1607 +
 31.1608 +		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
 31.1609 +			YY_FATAL_ERROR( "flex scanner push-back overflow" );
 31.1610 +		}
 31.1611 +
 31.1612 +	*--yy_cp = (char) c;
 31.1613 +
 31.1614 +	(yytext_ptr) = yy_bp;
 31.1615 +	(yy_hold_char) = *yy_cp;
 31.1616 +	(yy_c_buf_p) = yy_cp;
 31.1617 +}
 31.1618 +
 31.1619 +#ifndef YY_NO_INPUT
 31.1620 +#ifdef __cplusplus
 31.1621 +    static int yyinput (void)
 31.1622 +#else
 31.1623 +    static int input  (void)
 31.1624 +#endif
 31.1625 +
 31.1626 +{
 31.1627 +	int c;
 31.1628 +    
 31.1629 +	*(yy_c_buf_p) = (yy_hold_char);
 31.1630 +
 31.1631 +	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
 31.1632 +		{
 31.1633 +		/* yy_c_buf_p now points to the character we want to return.
 31.1634 +		 * If this occurs *before* the EOB characters, then it's a
 31.1635 +		 * valid NUL; if not, then we've hit the end of the buffer.
 31.1636 +		 */
 31.1637 +		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
 31.1638 +			/* This was really a NUL. */
 31.1639 +			*(yy_c_buf_p) = '\0';
 31.1640 +
 31.1641 +		else
 31.1642 +			{ /* need more input */
 31.1643 +			int offset = (yy_c_buf_p) - (yytext_ptr);
 31.1644 +			++(yy_c_buf_p);
 31.1645 +
 31.1646 +			switch ( yy_get_next_buffer(  ) )
 31.1647 +				{
 31.1648 +				case EOB_ACT_LAST_MATCH:
 31.1649 +					/* This happens because yy_g_n_b()
 31.1650 +					 * sees that we've accumulated a
 31.1651 +					 * token and flags that we need to
 31.1652 +					 * try matching the token before
 31.1653 +					 * proceeding.  But for input(),
 31.1654 +					 * there's no matching to consider.
 31.1655 +					 * So convert the EOB_ACT_LAST_MATCH
 31.1656 +					 * to EOB_ACT_END_OF_FILE.
 31.1657 +					 */
 31.1658 +
 31.1659 +					/* Reset buffer status. */
 31.1660 +					zconfrestart(zconfin );
 31.1661 +
 31.1662 +					/*FALLTHROUGH*/
 31.1663 +
 31.1664 +				case EOB_ACT_END_OF_FILE:
 31.1665 +					{
 31.1666 +					if ( zconfwrap( ) )
 31.1667 +						return EOF;
 31.1668 +
 31.1669 +					if ( ! (yy_did_buffer_switch_on_eof) )
 31.1670 +						YY_NEW_FILE;
 31.1671 +#ifdef __cplusplus
 31.1672 +					return yyinput();
 31.1673 +#else
 31.1674 +					return input();
 31.1675 +#endif
 31.1676 +					}
 31.1677 +
 31.1678 +				case EOB_ACT_CONTINUE_SCAN:
 31.1679 +					(yy_c_buf_p) = (yytext_ptr) + offset;
 31.1680 +					break;
 31.1681 +				}
 31.1682 +			}
 31.1683 +		}
 31.1684 +
 31.1685 +	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
 31.1686 +	*(yy_c_buf_p) = '\0';	/* preserve zconftext */
 31.1687 +	(yy_hold_char) = *++(yy_c_buf_p);
 31.1688 +
 31.1689 +	return c;
 31.1690 +}
 31.1691 +#endif	/* ifndef YY_NO_INPUT */
 31.1692 +
 31.1693 +/** Immediately switch to a different input stream.
 31.1694 + * @param input_file A readable stream.
 31.1695 + * 
 31.1696 + * @note This function does not reset the start condition to @c INITIAL .
 31.1697 + */
 31.1698 +    void zconfrestart  (FILE * input_file )
 31.1699 +{
 31.1700 +    
 31.1701 +	if ( ! YY_CURRENT_BUFFER ){
 31.1702 +        zconfensure_buffer_stack ();
 31.1703 +		YY_CURRENT_BUFFER_LVALUE =
 31.1704 +            zconf_create_buffer(zconfin,YY_BUF_SIZE );
 31.1705 +	}
 31.1706 +
 31.1707 +	zconf_init_buffer(YY_CURRENT_BUFFER,input_file );
 31.1708 +	zconf_load_buffer_state( );
 31.1709 +}
 31.1710 +
 31.1711 +/** Switch to a different input buffer.
 31.1712 + * @param new_buffer The new input buffer.
 31.1713 + * 
 31.1714 + */
 31.1715 +    void zconf_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
 31.1716 +{
 31.1717 +    
 31.1718 +	/* TODO. We should be able to replace this entire function body
 31.1719 +	 * with
 31.1720 +	 *		zconfpop_buffer_state();
 31.1721 +	 *		zconfpush_buffer_state(new_buffer);
 31.1722 +     */
 31.1723 +	zconfensure_buffer_stack ();
 31.1724 +	if ( YY_CURRENT_BUFFER == new_buffer )
 31.1725 +		return;
 31.1726 +
 31.1727 +	if ( YY_CURRENT_BUFFER )
 31.1728 +		{
 31.1729 +		/* Flush out information for old buffer. */
 31.1730 +		*(yy_c_buf_p) = (yy_hold_char);
 31.1731 +		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
 31.1732 +		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
 31.1733 +		}
 31.1734 +
 31.1735 +	YY_CURRENT_BUFFER_LVALUE = new_buffer;
 31.1736 +	zconf_load_buffer_state( );
 31.1737 +
 31.1738 +	/* We don't actually know whether we did this switch during
 31.1739 +	 * EOF (zconfwrap()) processing, but the only time this flag
 31.1740 +	 * is looked at is after zconfwrap() is called, so it's safe
 31.1741 +	 * to go ahead and always set it.
 31.1742 +	 */
 31.1743 +	(yy_did_buffer_switch_on_eof) = 1;
 31.1744 +}
 31.1745 +
 31.1746 +static void zconf_load_buffer_state  (void)
 31.1747 +{
 31.1748 +    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
 31.1749 +	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
 31.1750 +	zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
 31.1751 +	(yy_hold_char) = *(yy_c_buf_p);
 31.1752 +}
 31.1753 +
 31.1754 +/** Allocate and initialize an input buffer state.
 31.1755 + * @param file A readable stream.
 31.1756 + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 31.1757 + * 
 31.1758 + * @return the allocated buffer state.
 31.1759 + */
 31.1760 +    YY_BUFFER_STATE zconf_create_buffer  (FILE * file, int  size )
 31.1761 +{
 31.1762 +	YY_BUFFER_STATE b;
 31.1763 +    
 31.1764 +	b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state )  );
 31.1765 +	if ( ! b )
 31.1766 +		YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );
 31.1767 +
 31.1768 +	b->yy_buf_size = size;
 31.1769 +
 31.1770 +	/* yy_ch_buf has to be 2 characters longer than the size given because
 31.1771 +	 * we need to put in 2 end-of-buffer characters.
 31.1772 +	 */
 31.1773 +	b->yy_ch_buf = (char *) zconfalloc(b->yy_buf_size + 2  );
 31.1774 +	if ( ! b->yy_ch_buf )
 31.1775 +		YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );
 31.1776 +
 31.1777 +	b->yy_is_our_buffer = 1;
 31.1778 +
 31.1779 +	zconf_init_buffer(b,file );
 31.1780 +
 31.1781 +	return b;
 31.1782 +}
 31.1783 +
 31.1784 +/** Destroy the buffer.
 31.1785 + * @param b a buffer created with zconf_create_buffer()
 31.1786 + * 
 31.1787 + */
 31.1788 +    void zconf_delete_buffer (YY_BUFFER_STATE  b )
 31.1789 +{
 31.1790 +    
 31.1791 +	if ( ! b )
 31.1792 +		return;
 31.1793 +
 31.1794 +	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
 31.1795 +		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
 31.1796 +
 31.1797 +	if ( b->yy_is_our_buffer )
 31.1798 +		zconffree((void *) b->yy_ch_buf  );
 31.1799 +
 31.1800 +	zconffree((void *) b  );
 31.1801 +}
 31.1802 +
 31.1803 +/* Initializes or reinitializes a buffer.
 31.1804 + * This function is sometimes called more than once on the same buffer,
 31.1805 + * such as during a zconfrestart() or at EOF.
 31.1806 + */
 31.1807 +    static void zconf_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
 31.1808 +
 31.1809 +{
 31.1810 +	int oerrno = errno;
 31.1811 +    
 31.1812 +	zconf_flush_buffer(b );
 31.1813 +
 31.1814 +	b->yy_input_file = file;
 31.1815 +	b->yy_fill_buffer = 1;
 31.1816 +
 31.1817 +    /* If b is the current buffer, then zconf_init_buffer was _probably_
 31.1818 +     * called from zconfrestart() or through yy_get_next_buffer.
 31.1819 +     * In that case, we don't want to reset the lineno or column.
 31.1820 +     */
 31.1821 +    if (b != YY_CURRENT_BUFFER){
 31.1822 +        b->yy_bs_lineno = 1;
 31.1823 +        b->yy_bs_column = 0;
 31.1824 +    }
 31.1825 +
 31.1826 +        b->yy_is_interactive = 0;
 31.1827 +    
 31.1828 +	errno = oerrno;
 31.1829 +}
 31.1830 +
 31.1831 +/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 31.1832 + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 31.1833 + * 
 31.1834 + */
 31.1835 +    void zconf_flush_buffer (YY_BUFFER_STATE  b )
 31.1836 +{
 31.1837 +    	if ( ! b )
 31.1838 +		return;
 31.1839 +
 31.1840 +	b->yy_n_chars = 0;
 31.1841 +
 31.1842 +	/* We always need two end-of-buffer characters.  The first causes
 31.1843 +	 * a transition to the end-of-buffer state.  The second causes
 31.1844 +	 * a jam in that state.
 31.1845 +	 */
 31.1846 +	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
 31.1847 +	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
 31.1848 +
 31.1849 +	b->yy_buf_pos = &b->yy_ch_buf[0];
 31.1850 +
 31.1851 +	b->yy_at_bol = 1;
 31.1852 +	b->yy_buffer_status = YY_BUFFER_NEW;
 31.1853 +
 31.1854 +	if ( b == YY_CURRENT_BUFFER )
 31.1855 +		zconf_load_buffer_state( );
 31.1856 +}
 31.1857 +
 31.1858 +/** Pushes the new state onto the stack. The new state becomes
 31.1859 + *  the current state. This function will allocate the stack
 31.1860 + *  if necessary.
 31.1861 + *  @param new_buffer The new state.
 31.1862 + *  
 31.1863 + */
 31.1864 +void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer )
 31.1865 +{
 31.1866 +    	if (new_buffer == NULL)
 31.1867 +		return;
 31.1868 +
 31.1869 +	zconfensure_buffer_stack();
 31.1870 +
 31.1871 +	/* This block is copied from zconf_switch_to_buffer. */
 31.1872 +	if ( YY_CURRENT_BUFFER )
 31.1873 +		{
 31.1874 +		/* Flush out information for old buffer. */
 31.1875 +		*(yy_c_buf_p) = (yy_hold_char);
 31.1876 +		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
 31.1877 +		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
 31.1878 +		}
 31.1879 +
 31.1880 +	/* Only push if top exists. Otherwise, replace top. */
 31.1881 +	if (YY_CURRENT_BUFFER)
 31.1882 +		(yy_buffer_stack_top)++;
 31.1883 +	YY_CURRENT_BUFFER_LVALUE = new_buffer;
 31.1884 +
 31.1885 +	/* copied from zconf_switch_to_buffer. */
 31.1886 +	zconf_load_buffer_state( );
 31.1887 +	(yy_did_buffer_switch_on_eof) = 1;
 31.1888 +}
 31.1889 +
 31.1890 +/** Removes and deletes the top of the stack, if present.
 31.1891 + *  The next element becomes the new top.
 31.1892 + *  
 31.1893 + */
 31.1894 +void zconfpop_buffer_state (void)
 31.1895 +{
 31.1896 +    	if (!YY_CURRENT_BUFFER)
 31.1897 +		return;
 31.1898 +
 31.1899 +	zconf_delete_buffer(YY_CURRENT_BUFFER );
 31.1900 +	YY_CURRENT_BUFFER_LVALUE = NULL;
 31.1901 +	if ((yy_buffer_stack_top) > 0)
 31.1902 +		--(yy_buffer_stack_top);
 31.1903 +
 31.1904 +	if (YY_CURRENT_BUFFER) {
 31.1905 +		zconf_load_buffer_state( );
 31.1906 +		(yy_did_buffer_switch_on_eof) = 1;
 31.1907 +	}
 31.1908 +}
 31.1909 +
 31.1910 +/* Allocates the stack if it does not exist.
 31.1911 + *  Guarantees space for at least one push.
 31.1912 + */
 31.1913 +static void zconfensure_buffer_stack (void)
 31.1914 +{
 31.1915 +	int num_to_alloc;
 31.1916 +    
 31.1917 +	if (!(yy_buffer_stack)) {
 31.1918 +
 31.1919 +		/* First allocation is just for 2 elements, since we don't know if this
 31.1920 +		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
 31.1921 +		 * immediate realloc on the next call.
 31.1922 +         */
 31.1923 +		num_to_alloc = 1;
 31.1924 +		(yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc
 31.1925 +								(num_to_alloc * sizeof(struct yy_buffer_state*)
 31.1926 +								);
 31.1927 +		
 31.1928 +		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
 31.1929 +				
 31.1930 +		(yy_buffer_stack_max) = num_to_alloc;
 31.1931 +		(yy_buffer_stack_top) = 0;
 31.1932 +		return;
 31.1933 +	}
 31.1934 +
 31.1935 +	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
 31.1936 +
 31.1937 +		/* Increase the buffer to prepare for a possible push. */
 31.1938 +		int grow_size = 8 /* arbitrary grow size */;
 31.1939 +
 31.1940 +		num_to_alloc = (yy_buffer_stack_max) + grow_size;
 31.1941 +		(yy_buffer_stack) = (struct yy_buffer_state**)zconfrealloc
 31.1942 +								((yy_buffer_stack),
 31.1943 +								num_to_alloc * sizeof(struct yy_buffer_state*)
 31.1944 +								);
 31.1945 +
 31.1946 +		/* zero only the new slots.*/
 31.1947 +		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
 31.1948 +		(yy_buffer_stack_max) = num_to_alloc;
 31.1949 +	}
 31.1950 +}
 31.1951 +
 31.1952 +/** Setup the input buffer state to scan directly from a user-specified character buffer.
 31.1953 + * @param base the character buffer
 31.1954 + * @param size the size in bytes of the character buffer
 31.1955 + * 
 31.1956 + * @return the newly allocated buffer state object. 
 31.1957 + */
 31.1958 +YY_BUFFER_STATE zconf_scan_buffer  (char * base, yy_size_t  size )
 31.1959 +{
 31.1960 +	YY_BUFFER_STATE b;
 31.1961 +    
 31.1962 +	if ( size < 2 ||
 31.1963 +	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
 31.1964 +	     base[size-1] != YY_END_OF_BUFFER_CHAR )
 31.1965 +		/* They forgot to leave room for the EOB's. */
 31.1966 +		return 0;
 31.1967 +
 31.1968 +	b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state )  );
 31.1969 +	if ( ! b )
 31.1970 +		YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_buffer()" );
 31.1971 +
 31.1972 +	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
 31.1973 +	b->yy_buf_pos = b->yy_ch_buf = base;
 31.1974 +	b->yy_is_our_buffer = 0;
 31.1975 +	b->yy_input_file = 0;
 31.1976 +	b->yy_n_chars = b->yy_buf_size;
 31.1977 +	b->yy_is_interactive = 0;
 31.1978 +	b->yy_at_bol = 1;
 31.1979 +	b->yy_fill_buffer = 0;
 31.1980 +	b->yy_buffer_status = YY_BUFFER_NEW;
 31.1981 +
 31.1982 +	zconf_switch_to_buffer(b  );
 31.1983 +
 31.1984 +	return b;
 31.1985 +}
 31.1986 +
 31.1987 +/** Setup the input buffer state to scan a string. The next call to zconflex() will
 31.1988 + * scan from a @e copy of @a str.
 31.1989 + * @param yystr a NUL-terminated string to scan
 31.1990 + * 
 31.1991 + * @return the newly allocated buffer state object.
 31.1992 + * @note If you want to scan bytes that may contain NUL values, then use
 31.1993 + *       zconf_scan_bytes() instead.
 31.1994 + */
 31.1995 +YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
 31.1996 +{
 31.1997 +    
 31.1998 +	return zconf_scan_bytes(yystr,strlen(yystr) );
 31.1999 +}
 31.2000 +
 31.2001 +/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
 31.2002 + * scan from a @e copy of @a bytes.
 31.2003 + * @param bytes the byte buffer to scan
 31.2004 + * @param len the number of bytes in the buffer pointed to by @a bytes.
 31.2005 + * 
 31.2006 + * @return the newly allocated buffer state object.
 31.2007 + */
 31.2008 +YY_BUFFER_STATE zconf_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
 31.2009 +{
 31.2010 +	YY_BUFFER_STATE b;
 31.2011 +	char *buf;
 31.2012 +	yy_size_t n;
 31.2013 +	int i;
 31.2014 +    
 31.2015 +	/* Get memory for full buffer, including space for trailing EOB's. */
 31.2016 +	n = _yybytes_len + 2;
 31.2017 +	buf = (char *) zconfalloc(n  );
 31.2018 +	if ( ! buf )
 31.2019 +		YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" );
 31.2020 +
 31.2021 +	for ( i = 0; i < _yybytes_len; ++i )
 31.2022 +		buf[i] = yybytes[i];
 31.2023 +
 31.2024 +	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
 31.2025 +
 31.2026 +	b = zconf_scan_buffer(buf,n );
 31.2027 +	if ( ! b )
 31.2028 +		YY_FATAL_ERROR( "bad buffer in zconf_scan_bytes()" );
 31.2029 +
 31.2030 +	/* It's okay to grow etc. this buffer, and we should throw it
 31.2031 +	 * away when we're done.
 31.2032 +	 */
 31.2033 +	b->yy_is_our_buffer = 1;
 31.2034 +
 31.2035 +	return b;
 31.2036 +}
 31.2037 +
 31.2038 +#ifndef YY_EXIT_FAILURE
 31.2039 +#define YY_EXIT_FAILURE 2
 31.2040 +#endif
 31.2041 +
 31.2042 +static void yy_fatal_error (yyconst char* msg )
 31.2043 +{
 31.2044 +    	(void) fprintf( stderr, "%s\n", msg );
 31.2045 +	exit( YY_EXIT_FAILURE );
 31.2046 +}
 31.2047 +
 31.2048 +/* Redefine yyless() so it works in section 3 code. */
 31.2049 +
 31.2050 +#undef yyless
 31.2051 +#define yyless(n) \
 31.2052 +	do \
 31.2053 +		{ \
 31.2054 +		/* Undo effects of setting up zconftext. */ \
 31.2055 +        int yyless_macro_arg = (n); \
 31.2056 +        YY_LESS_LINENO(yyless_macro_arg);\
 31.2057 +		zconftext[zconfleng] = (yy_hold_char); \
 31.2058 +		(yy_c_buf_p) = zconftext + yyless_macro_arg; \
 31.2059 +		(yy_hold_char) = *(yy_c_buf_p); \
 31.2060 +		*(yy_c_buf_p) = '\0'; \
 31.2061 +		zconfleng = yyless_macro_arg; \
 31.2062 +		} \
 31.2063 +	while ( 0 )
 31.2064 +
 31.2065 +/* Accessor  methods (get/set functions) to struct members. */
 31.2066 +
 31.2067 +/** Get the current line number.
 31.2068 + * 
 31.2069 + */
 31.2070 +int zconfget_lineno  (void)
 31.2071 +{
 31.2072 +        
 31.2073 +    return zconflineno;
 31.2074 +}
 31.2075 +
 31.2076 +/** Get the input stream.
 31.2077 + * 
 31.2078 + */
 31.2079 +FILE *zconfget_in  (void)
 31.2080 +{
 31.2081 +        return zconfin;
 31.2082 +}
 31.2083 +
 31.2084 +/** Get the output stream.
 31.2085 + * 
 31.2086 + */
 31.2087 +FILE *zconfget_out  (void)
 31.2088 +{
 31.2089 +        return zconfout;
 31.2090 +}
 31.2091 +
 31.2092 +/** Get the length of the current token.
 31.2093 + * 
 31.2094 + */
 31.2095 +int zconfget_leng  (void)
 31.2096 +{
 31.2097 +        return zconfleng;
 31.2098 +}
 31.2099 +
 31.2100 +/** Get the current token.
 31.2101 + * 
 31.2102 + */
 31.2103 +
 31.2104 +char *zconfget_text  (void)
 31.2105 +{
 31.2106 +        return zconftext;
 31.2107 +}
 31.2108 +
 31.2109 +/** Set the current line number.
 31.2110 + * @param line_number
 31.2111 + * 
 31.2112 + */
 31.2113 +void zconfset_lineno (int  line_number )
 31.2114 +{
 31.2115 +    
 31.2116 +    zconflineno = line_number;
 31.2117 +}
 31.2118 +
 31.2119 +/** Set the input stream. This does not discard the current
 31.2120 + * input buffer.
 31.2121 + * @param in_str A readable stream.
 31.2122 + * 
 31.2123 + * @see zconf_switch_to_buffer
 31.2124 + */
 31.2125 +void zconfset_in (FILE *  in_str )
 31.2126 +{
 31.2127 +        zconfin = in_str ;
 31.2128 +}
 31.2129 +
 31.2130 +void zconfset_out (FILE *  out_str )
 31.2131 +{
 31.2132 +        zconfout = out_str ;
 31.2133 +}
 31.2134 +
 31.2135 +int zconfget_debug  (void)
 31.2136 +{
 31.2137 +        return zconf_flex_debug;
 31.2138 +}
 31.2139 +
 31.2140 +void zconfset_debug (int  bdebug )
 31.2141 +{
 31.2142 +        zconf_flex_debug = bdebug ;
 31.2143 +}
 31.2144 +
 31.2145 +static int yy_init_globals (void)
 31.2146 +{
 31.2147 +        /* Initialization is the same as for the non-reentrant scanner.
 31.2148 +     * This function is called from zconflex_destroy(), so don't allocate here.
 31.2149 +     */
 31.2150 +
 31.2151 +    (yy_buffer_stack) = 0;
 31.2152 +    (yy_buffer_stack_top) = 0;
 31.2153 +    (yy_buffer_stack_max) = 0;
 31.2154 +    (yy_c_buf_p) = (char *) 0;
 31.2155 +    (yy_init) = 0;
 31.2156 +    (yy_start) = 0;
 31.2157 +
 31.2158 +/* Defined in main.c */
 31.2159 +#ifdef YY_STDINIT
 31.2160 +    zconfin = stdin;
 31.2161 +    zconfout = stdout;
 31.2162 +#else
 31.2163 +    zconfin = (FILE *) 0;
 31.2164 +    zconfout = (FILE *) 0;
 31.2165 +#endif
 31.2166 +
 31.2167 +    /* For future reference: Set errno on error, since we are called by
 31.2168 +     * zconflex_init()
 31.2169 +     */
 31.2170 +    return 0;
 31.2171 +}
 31.2172 +
 31.2173 +/* zconflex_destroy is for both reentrant and non-reentrant scanners. */
 31.2174 +int zconflex_destroy  (void)
 31.2175 +{
 31.2176 +    
 31.2177 +    /* Pop the buffer stack, destroying each element. */
 31.2178 +	while(YY_CURRENT_BUFFER){
 31.2179 +		zconf_delete_buffer(YY_CURRENT_BUFFER  );
 31.2180 +		YY_CURRENT_BUFFER_LVALUE = NULL;
 31.2181 +		zconfpop_buffer_state();
 31.2182 +	}
 31.2183 +
 31.2184 +	/* Destroy the stack itself. */
 31.2185 +	zconffree((yy_buffer_stack) );
 31.2186 +	(yy_buffer_stack) = NULL;
 31.2187 +
 31.2188 +    /* Reset the globals. This is important in a non-reentrant scanner so the next time
 31.2189 +     * zconflex() is called, initialization will occur. */
 31.2190 +    yy_init_globals( );
 31.2191 +
 31.2192 +    return 0;
 31.2193 +}
 31.2194 +
 31.2195 +/*
 31.2196 + * Internal utility routines.
 31.2197 + */
 31.2198 +
 31.2199 +#ifndef yytext_ptr
 31.2200 +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
 31.2201 +{
 31.2202 +	register int i;
 31.2203 +	for ( i = 0; i < n; ++i )
 31.2204 +		s1[i] = s2[i];
 31.2205 +}
 31.2206 +#endif
 31.2207 +
 31.2208 +#ifdef YY_NEED_STRLEN
 31.2209 +static int yy_flex_strlen (yyconst char * s )
 31.2210 +{
 31.2211 +	register int n;
 31.2212 +	for ( n = 0; s[n]; ++n )
 31.2213 +		;
 31.2214 +
 31.2215 +	return n;
 31.2216 +}
 31.2217 +#endif
 31.2218 +
 31.2219 +void *zconfalloc (yy_size_t  size )
 31.2220 +{
 31.2221 +	return (void *) malloc( size );
 31.2222 +}
 31.2223 +
 31.2224 +void *zconfrealloc  (void * ptr, yy_size_t  size )
 31.2225 +{
 31.2226 +	/* The cast to (char *) in the following accommodates both
 31.2227 +	 * implementations that use char* generic pointers, and those
 31.2228 +	 * that use void* generic pointers.  It works with the latter
 31.2229 +	 * because both ANSI C and C++ allow castless assignment from
 31.2230 +	 * any pointer type to void*, and deal with argument conversions
 31.2231 +	 * as though doing an assignment.
 31.2232 +	 */
 31.2233 +	return (void *) realloc( (char *) ptr, size );
 31.2234 +}
 31.2235 +
 31.2236 +void zconffree (void * ptr )
 31.2237 +{
 31.2238 +	free( (char *) ptr );	/* see zconfrealloc() for (char *) cast */
 31.2239 +}
 31.2240 +
 31.2241 +#define YYTABLES_NAME "yytables"
 31.2242 +
 31.2243 +void zconf_starthelp(void)
 31.2244 +{
 31.2245 +	new_string();
 31.2246 +	last_ts = first_ts = 0;
 31.2247 +	BEGIN(HELP);
 31.2248 +}
 31.2249 +
 31.2250 +static void zconf_endhelp(void)
 31.2251 +{
 31.2252 +	zconflval.string = text;
 31.2253 +	BEGIN(INITIAL);
 31.2254 +}
 31.2255 +
 31.2256 +/*
 31.2257 + * Try to open specified file with following names:
 31.2258 + * ./name
 31.2259 + * $(srctree)/name
 31.2260 + * The latter is used when srctree is separate from objtree
 31.2261 + * when compiling the kernel.
 31.2262 + * Return NULL if file is not found.
 31.2263 + */
 31.2264 +FILE *zconf_fopen(const char *name)
 31.2265 +{
 31.2266 +	char *env, fullname[PATH_MAX+1];
 31.2267 +	FILE *f;
 31.2268 +
 31.2269 +	f = fopen(name, "r");
 31.2270 +	if (!f && name[0] != '/') {
 31.2271 +		env = getenv(SRCTREE);
 31.2272 +		if (env) {
 31.2273 +			sprintf(fullname, "%s/%s", env, name);
 31.2274 +			f = fopen(fullname, "r");
 31.2275 +		}
 31.2276 +	}
 31.2277 +	return f;
 31.2278 +}
 31.2279 +
 31.2280 +void zconf_initscan(const char *name)
 31.2281 +{
 31.2282 +	zconfin = zconf_fopen(name);
 31.2283 +	if (!zconfin) {
 31.2284 +		printf("can't find file %s\n", name);
 31.2285 +		exit(1);
 31.2286 +	}
 31.2287 +
 31.2288 +	current_buf = malloc(sizeof(*current_buf));
 31.2289 +	memset(current_buf, 0, sizeof(*current_buf));
 31.2290 +
 31.2291 +	current_file = file_lookup(name);
 31.2292 +	current_file->lineno = 1;
 31.2293 +	current_file->flags = FILE_BUSY;
 31.2294 +}
 31.2295 +
 31.2296 +void zconf_nextfile(const char *name)
 31.2297 +{
 31.2298 +	struct file *file = file_lookup(name);
 31.2299 +	struct buffer *buf = malloc(sizeof(*buf));
 31.2300 +	memset(buf, 0, sizeof(*buf));
 31.2301 +
 31.2302 +	current_buf->state = YY_CURRENT_BUFFER;
 31.2303 +	zconfin = zconf_fopen(name);
 31.2304 +	if (!zconfin) {
 31.2305 +		printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name);
 31.2306 +		exit(1);
 31.2307 +	}
 31.2308 +	zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE));
 31.2309 +	buf->parent = current_buf;
 31.2310 +	current_buf = buf;
 31.2311 +
 31.2312 +	if (file->flags & FILE_BUSY) {
 31.2313 +		printf("recursive scan (%s)?\n", name);
 31.2314 +		exit(1);
 31.2315 +	}
 31.2316 +	if (file->flags & FILE_SCANNED) {
 31.2317 +		printf("file %s already scanned?\n", name);
 31.2318 +		exit(1);
 31.2319 +	}
 31.2320 +	file->flags |= FILE_BUSY;
 31.2321 +	file->lineno = 1;
 31.2322 +	file->parent = current_file;
 31.2323 +	current_file = file;
 31.2324 +}
 31.2325 +
 31.2326 +static void zconf_endfile(void)
 31.2327 +{
 31.2328 +	struct buffer *parent;
 31.2329 +
 31.2330 +	current_file->flags |= FILE_SCANNED;
 31.2331 +	current_file->flags &= ~FILE_BUSY;
 31.2332 +	current_file = current_file->parent;
 31.2333 +
 31.2334 +	parent = current_buf->parent;
 31.2335 +	if (parent) {
 31.2336 +		fclose(zconfin);
 31.2337 +		zconf_delete_buffer(YY_CURRENT_BUFFER);
 31.2338 +		zconf_switch_to_buffer(parent->state);
 31.2339 +	}
 31.2340 +	free(current_buf);
 31.2341 +	current_buf = parent;
 31.2342 +}
 31.2343 +
 31.2344 +int zconf_lineno(void)
 31.2345 +{
 31.2346 +	return current_pos.lineno;
 31.2347 +}
 31.2348 +
 31.2349 +char *zconf_curname(void)
 31.2350 +{
 31.2351 +	return current_pos.file ? current_pos.file->name : "<none>";
 31.2352 +}
 31.2353 +
    32.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.2 +++ b/kconfig/lkc.h	Sat Feb 24 11:00:05 2007 +0000
    32.3 @@ -0,0 +1,157 @@
    32.4 +/*
    32.5 + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
    32.6 + * Released under the terms of the GNU GPL v2.0.
    32.7 + */
    32.8 +
    32.9 +#ifndef LKC_H
   32.10 +#define LKC_H
   32.11 +
   32.12 +#define PROJECT_NAME "crosstool-NG"
   32.13 +
   32.14 +// Make some warnings go away
   32.15 +#define YYENABLE_NLS 0
   32.16 +#define YYLTYPE_IS_TRIVIAL 0
   32.17 +
   32.18 +#include "expr.h"
   32.19 +
   32.20 +#ifndef KBUILD_NO_NLS
   32.21 +# include <libintl.h>
   32.22 +#else
   32.23 +# define gettext(Msgid) ((const char *) (Msgid))
   32.24 +# define textdomain(Domainname) ((const char *) (Domainname))
   32.25 +# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
   32.26 +#endif
   32.27 +
   32.28 +#ifdef __cplusplus
   32.29 +extern "C" {
   32.30 +#endif
   32.31 +
   32.32 +#ifdef LKC_DIRECT_LINK
   32.33 +#define P(name,type,arg)	extern type name arg
   32.34 +#else
   32.35 +#include "lkc_defs.h"
   32.36 +#define P(name,type,arg)	extern type (*name ## _p) arg
   32.37 +#endif
   32.38 +#include "lkc_proto.h"
   32.39 +#undef P
   32.40 +
   32.41 +#define SRCTREE "srctree"
   32.42 +
   32.43 +#define PACKAGE "crosstool-NG"
   32.44 +#define LOCALEDIR "/usr/share/locale"
   32.45 +
   32.46 +#define _(text) gettext(text)
   32.47 +#define N_(text) (text)
   32.48 +
   32.49 +
   32.50 +#define TF_COMMAND	0x0001
   32.51 +#define TF_PARAM	0x0002
   32.52 +#define TF_OPTION	0x0004
   32.53 +
   32.54 +#define T_OPT_MODULES		1
   32.55 +#define T_OPT_DEFCONFIG_LIST	2
   32.56 +
   32.57 +struct kconf_id {
   32.58 +	int name;
   32.59 +	int token;
   32.60 +	unsigned int flags;
   32.61 +	enum symbol_type stype;
   32.62 +};
   32.63 +
   32.64 +int zconfparse(void);
   32.65 +void zconfdump(FILE *out);
   32.66 +
   32.67 +extern int zconfdebug;
   32.68 +void zconf_starthelp(void);
   32.69 +FILE *zconf_fopen(const char *name);
   32.70 +void zconf_initscan(const char *name);
   32.71 +void zconf_nextfile(const char *name);
   32.72 +int zconf_lineno(void);
   32.73 +char *zconf_curname(void);
   32.74 +
   32.75 +/* confdata.c */
   32.76 +char *conf_get_default_confname(void);
   32.77 +
   32.78 +/* kconfig_load.c */
   32.79 +void kconfig_load(void);
   32.80 +
   32.81 +/* menu.c */
   32.82 +void menu_init(void);
   32.83 +struct menu *menu_add_menu(void);
   32.84 +void menu_end_menu(void);
   32.85 +void menu_add_entry(struct symbol *sym);
   32.86 +void menu_end_entry(void);
   32.87 +void menu_add_dep(struct expr *dep);
   32.88 +struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
   32.89 +struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
   32.90 +void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
   32.91 +void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
   32.92 +void menu_add_option(int token, char *arg);
   32.93 +void menu_finalize(struct menu *parent);
   32.94 +void menu_set_type(int type);
   32.95 +
   32.96 +/* util.c */
   32.97 +struct file *file_lookup(const char *name);
   32.98 +int file_write_dep(const char *name);
   32.99 +
  32.100 +struct gstr {
  32.101 +	size_t len;
  32.102 +	char  *s;
  32.103 +};
  32.104 +struct gstr str_new(void);
  32.105 +struct gstr str_assign(const char *s);
  32.106 +void str_free(struct gstr *gs);
  32.107 +void str_append(struct gstr *gs, const char *s);
  32.108 +void str_printf(struct gstr *gs, const char *fmt, ...);
  32.109 +const char *str_get(struct gstr *gs);
  32.110 +
  32.111 +/* symbol.c */
  32.112 +void sym_init(void);
  32.113 +void sym_clear_all_valid(void);
  32.114 +void sym_set_all_changed(void);
  32.115 +void sym_set_changed(struct symbol *sym);
  32.116 +struct symbol *sym_check_deps(struct symbol *sym);
  32.117 +struct property *prop_alloc(enum prop_type type, struct symbol *sym);
  32.118 +struct symbol *prop_get_symbol(struct property *prop);
  32.119 +
  32.120 +static inline tristate sym_get_tristate_value(struct symbol *sym)
  32.121 +{
  32.122 +	return sym->curr.tri;
  32.123 +}
  32.124 +
  32.125 +
  32.126 +static inline struct symbol *sym_get_choice_value(struct symbol *sym)
  32.127 +{
  32.128 +	return (struct symbol *)sym->curr.val;
  32.129 +}
  32.130 +
  32.131 +static inline bool sym_set_choice_value(struct symbol *ch, struct symbol *chval)
  32.132 +{
  32.133 +	return sym_set_tristate_value(chval, yes);
  32.134 +}
  32.135 +
  32.136 +static inline bool sym_is_choice(struct symbol *sym)
  32.137 +{
  32.138 +	return sym->flags & SYMBOL_CHOICE ? true : false;
  32.139 +}
  32.140 +
  32.141 +static inline bool sym_is_choice_value(struct symbol *sym)
  32.142 +{
  32.143 +	return sym->flags & SYMBOL_CHOICEVAL ? true : false;
  32.144 +}
  32.145 +
  32.146 +static inline bool sym_is_optional(struct symbol *sym)
  32.147 +{
  32.148 +	return sym->flags & SYMBOL_OPTIONAL ? true : false;
  32.149 +}
  32.150 +
  32.151 +static inline bool sym_has_value(struct symbol *sym)
  32.152 +{
  32.153 +	return sym->flags & SYMBOL_DEF_USER ? true : false;
  32.154 +}
  32.155 +
  32.156 +#ifdef __cplusplus
  32.157 +}
  32.158 +#endif
  32.159 +
  32.160 +#endif /* LKC_H */
    33.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.2 +++ b/kconfig/lkc_proto.h	Sat Feb 24 11:00:05 2007 +0000
    33.3 @@ -0,0 +1,42 @@
    33.4 +
    33.5 +/* confdata.c */
    33.6 +P(conf_parse,void,(const char *name));
    33.7 +P(conf_read,int,(const char *name));
    33.8 +P(conf_read_simple,int,(const char *name, int));
    33.9 +P(conf_write,int,(const char *name));
   33.10 +P(conf_write_autoconf,int,(void));
   33.11 +
   33.12 +/* menu.c */
   33.13 +P(rootmenu,struct menu,);
   33.14 +
   33.15 +P(menu_is_visible,bool,(struct menu *menu));
   33.16 +P(menu_get_prompt,const char *,(struct menu *menu));
   33.17 +P(menu_get_root_menu,struct menu *,(struct menu *menu));
   33.18 +P(menu_get_parent_menu,struct menu *,(struct menu *menu));
   33.19 +
   33.20 +/* symbol.c */
   33.21 +P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
   33.22 +P(sym_change_count,int,);
   33.23 +
   33.24 +P(sym_lookup,struct symbol *,(const char *name, int isconst));
   33.25 +P(sym_find,struct symbol *,(const char *name));
   33.26 +P(sym_re_search,struct symbol **,(const char *pattern));
   33.27 +P(sym_type_name,const char *,(enum symbol_type type));
   33.28 +P(sym_calc_value,void,(struct symbol *sym));
   33.29 +P(sym_get_type,enum symbol_type,(struct symbol *sym));
   33.30 +P(sym_tristate_within_range,bool,(struct symbol *sym,tristate tri));
   33.31 +P(sym_set_tristate_value,bool,(struct symbol *sym,tristate tri));
   33.32 +P(sym_toggle_tristate_value,tristate,(struct symbol *sym));
   33.33 +P(sym_string_valid,bool,(struct symbol *sym, const char *newval));
   33.34 +P(sym_string_within_range,bool,(struct symbol *sym, const char *str));
   33.35 +P(sym_set_string_value,bool,(struct symbol *sym, const char *newval));
   33.36 +P(sym_is_changable,bool,(struct symbol *sym));
   33.37 +P(sym_get_choice_prop,struct property *,(struct symbol *sym));
   33.38 +P(sym_get_default_prop,struct property *,(struct symbol *sym));
   33.39 +P(sym_get_string_value,const char *,(struct symbol *sym));
   33.40 +
   33.41 +P(prop_get_type_name,const char *,(enum prop_type type));
   33.42 +
   33.43 +/* expr.c */
   33.44 +P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2));
   33.45 +P(expr_print,void,(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken));
    34.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.2 +++ b/kconfig/lxdialog/BIG.FAT.WARNING	Sat Feb 24 11:00:05 2007 +0000
    34.3 @@ -0,0 +1,4 @@
    34.4 +This is NOT the official version of dialog.  This version has been
    34.5 +significantly modified from the original.  It is for use by the Linux
    34.6 +kernel configuration script.  Please do not bother Savio Lam with 
    34.7 +questions about this program.
    35.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.2 +++ b/kconfig/lxdialog/check-lxdialog.sh	Sat Feb 24 11:00:05 2007 +0000
    35.3 @@ -0,0 +1,84 @@
    35.4 +#!/bin/sh
    35.5 +# Check ncurses compatibility
    35.6 +
    35.7 +# What library to link
    35.8 +ldflags()
    35.9 +{
   35.10 +	$cc -print-file-name=libncursesw.so | grep -q /
   35.11 +	if [ $? -eq 0 ]; then
   35.12 +		echo '-lncursesw'
   35.13 +		exit
   35.14 +	fi
   35.15 +	$cc -print-file-name=libncurses.so | grep -q /
   35.16 +	if [ $? -eq 0 ]; then
   35.17 +		echo '-lncurses'
   35.18 +		exit
   35.19 +	fi
   35.20 +	$cc -print-file-name=libcurses.so | grep -q /
   35.21 +	if [ $? -eq 0 ]; then
   35.22 +		echo '-lcurses'
   35.23 +		exit
   35.24 +	fi
   35.25 +	exit 1
   35.26 +}
   35.27 +
   35.28 +# Where is ncurses.h?
   35.29 +ccflags()
   35.30 +{
   35.31 +	if [ -f /usr/include/ncurses/ncurses.h ]; then
   35.32 +		echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
   35.33 +	elif [ -f /usr/include/ncurses/curses.h ]; then
   35.34 +		echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"'
   35.35 +	elif [ -f /usr/include/ncurses.h ]; then
   35.36 +		echo '-DCURSES_LOC="<ncurses.h>"'
   35.37 +	else
   35.38 +		echo '-DCURSES_LOC="<curses.h>"'
   35.39 +	fi
   35.40 +}
   35.41 +
   35.42 +# Temp file, try to clean up after us
   35.43 +tmp=.lxdialog.tmp
   35.44 +trap "rm -f $tmp" 0 1 2 3 15
   35.45 +
   35.46 +# Check if we can link to ncurses
   35.47 +check() {
   35.48 +	echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null
   35.49 +	if [ $? != 0 ]; then
   35.50 +		echo " *** Unable to find the ncurses libraries."          1>&2
   35.51 +		echo " *** make menuconfig require the ncurses libraries"  1>&2
   35.52 +		echo " *** "                                               1>&2
   35.53 +		echo " *** Install ncurses (ncurses-devel) and try again"  1>&2
   35.54 +		echo " *** "                                               1>&2
   35.55 +		exit 1
   35.56 +	fi
   35.57 +}
   35.58 +
   35.59 +usage() {
   35.60 +	printf "Usage: $0 [-check compiler options|-header|-library]\n"
   35.61 +}
   35.62 +
   35.63 +if [ $# == 0 ]; then
   35.64 +	usage
   35.65 +	exit 1
   35.66 +fi
   35.67 +
   35.68 +cc=""
   35.69 +case "$1" in
   35.70 +	"-check")
   35.71 +		shift
   35.72 +		cc="$@"
   35.73 +		check
   35.74 +		;;
   35.75 +	"-ccflags")
   35.76 +		ccflags
   35.77 +		;;
   35.78 +	"-ldflags")
   35.79 +		shift
   35.80 +		cc="$@"
   35.81 +		ldflags
   35.82 +		;;
   35.83 +	"*")
   35.84 +		usage
   35.85 +		exit 1
   35.86 +		;;
   35.87 +esac
    36.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.2 +++ b/kconfig/lxdialog/checklist.c	Sat Feb 24 11:00:05 2007 +0000
    36.3 @@ -0,0 +1,325 @@
    36.4 +/*
    36.5 + *  checklist.c -- implements the checklist box
    36.6 + *
    36.7 + *  ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
    36.8 + *     Stuart Herbert - S.Herbert@sheffield.ac.uk: radiolist extension
    36.9 + *     Alessandro Rubini - rubini@ipvvis.unipv.it: merged the two
   36.10 + *  MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com)
   36.11 + *
   36.12 + *  This program is free software; you can redistribute it and/or
   36.13 + *  modify it under the terms of the GNU General Public License
   36.14 + *  as published by the Free Software Foundation; either version 2
   36.15 + *  of the License, or (at your option) any later version.
   36.16 + *
   36.17 + *  This program is distributed in the hope that it will be useful,
   36.18 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   36.19 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   36.20 + *  GNU General Public License for more details.
   36.21 + *
   36.22 + *  You should have received a copy of the GNU General Public License
   36.23 + *  along with this program; if not, write to the Free Software
   36.24 + *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   36.25 + */
   36.26 +
   36.27 +#include "dialog.h"
   36.28 +
   36.29 +static int list_width, check_x, item_x;
   36.30 +
   36.31 +/*
   36.32 + * Print list item
   36.33 + */
   36.34 +static void print_item(WINDOW * win, int choice, int selected)
   36.35 +{
   36.36 +	int i;
   36.37 +
   36.38 +	/* Clear 'residue' of last item */
   36.39 +	wattrset(win, dlg.menubox.atr);
   36.40 +	wmove(win, choice, 0);
   36.41 +	for (i = 0; i < list_width; i++)
   36.42 +		waddch(win, ' ');
   36.43 +
   36.44 +	wmove(win, choice, check_x);
   36.45 +	wattrset(win, selected ? dlg.check_selected.atr
   36.46 +		 : dlg.check.atr);
   36.47 +	wprintw(win, "(%c)", item_is_tag('X') ? 'X' : ' ');
   36.48 +
   36.49 +	wattrset(win, selected ? dlg.tag_selected.atr : dlg.tag.atr);
   36.50 +	mvwaddch(win, choice, item_x, item_str()[0]);
   36.51 +	wattrset(win, selected ? dlg.item_selected.atr : dlg.item.atr);
   36.52 +	waddstr(win, (char *)item_str() + 1);
   36.53 +	if (selected) {
   36.54 +		wmove(win, choice, check_x + 1);
   36.55 +		wrefresh(win);
   36.56 +	}
   36.57 +}
   36.58 +
   36.59 +/*
   36.60 + * Print the scroll indicators.
   36.61 + */
   36.62 +static void print_arrows(WINDOW * win, int choice, int item_no, int scroll,
   36.63 +	     int y, int x, int height)
   36.64 +{
   36.65 +	wmove(win, y, x);
   36.66 +
   36.67 +	if (scroll > 0) {
   36.68 +		wattrset(win, dlg.uarrow.atr);
   36.69 +		waddch(win, ACS_UARROW);
   36.70 +		waddstr(win, "(-)");
   36.71 +	} else {
   36.72 +		wattrset(win, dlg.menubox.atr);
   36.73 +		waddch(win, ACS_HLINE);
   36.74 +		waddch(win, ACS_HLINE);
   36.75 +		waddch(win, ACS_HLINE);
   36.76 +		waddch(win, ACS_HLINE);
   36.77 +	}
   36.78 +
   36.79 +	y = y + height + 1;
   36.80 +	wmove(win, y, x);
   36.81 +
   36.82 +	if ((height < item_no) && (scroll + choice < item_no - 1)) {
   36.83 +		wattrset(win, dlg.darrow.atr);
   36.84 +		waddch(win, ACS_DARROW);
   36.85 +		waddstr(win, "(+)");
   36.86 +	} else {
   36.87 +		wattrset(win, dlg.menubox_border.atr);
   36.88 +		waddch(win, ACS_HLINE);
   36.89 +		waddch(win, ACS_HLINE);
   36.90 +		waddch(win, ACS_HLINE);
   36.91 +		waddch(win, ACS_HLINE);
   36.92 +	}
   36.93 +}
   36.94 +
   36.95 +/*
   36.96 + *  Display the termination buttons
   36.97 + */
   36.98 +static void print_buttons(WINDOW * dialog, int height, int width, int selected)
   36.99 +{
  36.100 +	int x = width / 2 - 11;
  36.101 +	int y = height - 2;
  36.102 +
  36.103 +	print_button(dialog, "Select", y, x, selected == 0);
  36.104 +	print_button(dialog, " Help ", y, x + 14, selected == 1);
  36.105 +
  36.106 +	wmove(dialog, y, x + 1 + 14 * selected);
  36.107 +	wrefresh(dialog);
  36.108 +}
  36.109 +
  36.110 +/*
  36.111 + * Display a dialog box with a list of options that can be turned on or off
  36.112 + * in the style of radiolist (only one option turned on at a time).
  36.113 + */
  36.114 +int dialog_checklist(const char *title, const char *prompt, int height,
  36.115 +		     int width, int list_height)
  36.116 +{
  36.117 +	int i, x, y, box_x, box_y;
  36.118 +	int key = 0, button = 0, choice = 0, scroll = 0, max_choice;
  36.119 +	WINDOW *dialog, *list;
  36.120 +
  36.121 +	/* which item to highlight */
  36.122 +	item_foreach() {
  36.123 +		if (item_is_tag('X'))
  36.124 +			choice = item_n();
  36.125 +		if (item_is_selected()) {
  36.126 +			choice = item_n();
  36.127 +			break;
  36.128 +		}
  36.129 +	}
  36.130 +
  36.131 +do_resize:
  36.132 +	if (getmaxy(stdscr) < (height + 6))
  36.133 +		return -ERRDISPLAYTOOSMALL;
  36.134 +	if (getmaxx(stdscr) < (width + 6))
  36.135 +		return -ERRDISPLAYTOOSMALL;
  36.136 +
  36.137 +	max_choice = MIN(list_height, item_count());
  36.138 +
  36.139 +	/* center dialog box on screen */
  36.140 +	x = (COLS - width) / 2;
  36.141 +	y = (LINES - height) / 2;
  36.142 +
  36.143 +	draw_shadow(stdscr, y, x, height, width);
  36.144 +
  36.145 +	dialog = newwin(height, width, y, x);
  36.146 +	keypad(dialog, TRUE);
  36.147 +
  36.148 +	draw_box(dialog, 0, 0, height, width,
  36.149 +		 dlg.dialog.atr, dlg.border.atr);
  36.150 +	wattrset(dialog, dlg.border.atr);
  36.151 +	mvwaddch(dialog, height - 3, 0, ACS_LTEE);
  36.152 +	for (i = 0; i < width - 2; i++)
  36.153 +		waddch(dialog, ACS_HLINE);
  36.154 +	wattrset(dialog, dlg.dialog.atr);
  36.155 +	waddch(dialog, ACS_RTEE);
  36.156 +
  36.157 +	print_title(dialog, title, width);
  36.158 +
  36.159 +	wattrset(dialog, dlg.dialog.atr);
  36.160 +	print_autowrap(dialog, prompt, width - 2, 1, 3);
  36.161 +
  36.162 +	list_width = width - 6;
  36.163 +	box_y = height - list_height - 5;
  36.164 +	box_x = (width - list_width) / 2 - 1;
  36.165 +
  36.166 +	/* create new window for the list */
  36.167 +	list = subwin(dialog, list_height, list_width, y + box_y + 1,
  36.168 +	              x + box_x + 1);
  36.169 +
  36.170 +	keypad(list, TRUE);
  36.171 +
  36.172 +	/* draw a box around the list items */
  36.173 +	draw_box(dialog, box_y, box_x, list_height + 2, list_width + 2,
  36.174 +	         dlg.menubox_border.atr, dlg.menubox.atr);
  36.175 +
  36.176 +	/* Find length of longest item in order to center checklist */
  36.177 +	check_x = 0;
  36.178 +	item_foreach()
  36.179 +		check_x = MAX(check_x, strlen(item_str()) + 4);
  36.180 +
  36.181 +	check_x = (list_width - check_x) / 2;
  36.182 +	item_x = check_x + 4;
  36.183 +
  36.184 +	if (choice >= list_height) {
  36.185 +		scroll = choice - list_height + 1;
  36.186 +		choice -= scroll;
  36.187 +	}
  36.188 +
  36.189 +	/* Print the list */
  36.190 +	for (i = 0; i < max_choice; i++) {
  36.191 +		item_set(scroll + i);
  36.192 +		print_item(list, i, i == choice);
  36.193 +	}
  36.194 +
  36.195 +	print_arrows(dialog, choice, item_count(), scroll,
  36.196 +		     box_y, box_x + check_x + 5, list_height);
  36.197 +
  36.198 +	print_buttons(dialog, height, width, 0);
  36.199 +
  36.200 +	wnoutrefresh(dialog);
  36.201 +	wnoutrefresh(list);
  36.202 +	doupdate();
  36.203 +
  36.204 +	while (key != KEY_ESC) {
  36.205 +		key = wgetch(dialog);
  36.206 +
  36.207 +		for (i = 0; i < max_choice; i++) {
  36.208 +			item_set(i + scroll);
  36.209 +			if (toupper(key) == toupper(item_str()[0]))
  36.210 +				break;
  36.211 +		}
  36.212 +
  36.213 +		if (i < max_choice || key == KEY_UP || key == KEY_DOWN ||
  36.214 +		    key == '+' || key == '-') {
  36.215 +			if (key == KEY_UP || key == '-') {
  36.216 +				if (!choice) {
  36.217 +					if (!scroll)
  36.218 +						continue;
  36.219 +					/* Scroll list down */
  36.220 +					if (list_height > 1) {
  36.221 +						/* De-highlight current first item */
  36.222 +						item_set(scroll);
  36.223 +						print_item(list, 0, FALSE);
  36.224 +						scrollok(list, TRUE);
  36.225 +						wscrl(list, -1);
  36.226 +						scrollok(list, FALSE);
  36.227 +					}
  36.228 +					scroll--;
  36.229 +					item_set(scroll);
  36.230 +					print_item(list, 0, TRUE);
  36.231 +					print_arrows(dialog, choice, item_count(),
  36.232 +						     scroll, box_y, box_x + check_x + 5, list_height);
  36.233 +
  36.234 +					wnoutrefresh(dialog);
  36.235 +					wrefresh(list);
  36.236 +
  36.237 +					continue;	/* wait for another key press */
  36.238 +				} else
  36.239 +					i = choice - 1;
  36.240 +			} else if (key == KEY_DOWN || key == '+') {
  36.241 +				if (choice == max_choice - 1) {
  36.242 +					if (scroll + choice >= item_count() - 1)
  36.243 +						continue;
  36.244 +					/* Scroll list up */
  36.245 +					if (list_height > 1) {
  36.246 +						/* De-highlight current last item before scrolling up */
  36.247 +						item_set(scroll + max_choice - 1);
  36.248 +						print_item(list,
  36.249 +							    max_choice - 1,
  36.250 +							    FALSE);
  36.251 +						scrollok(list, TRUE);
  36.252 +						wscrl(list, 1);
  36.253 +						scrollok(list, FALSE);
  36.254 +					}
  36.255 +					scroll++;
  36.256 +					item_set(scroll + max_choice - 1);
  36.257 +					print_item(list, max_choice - 1, TRUE);
  36.258 +
  36.259 +					print_arrows(dialog, choice, item_count(),
  36.260 +						     scroll, box_y, box_x + check_x + 5, list_height);
  36.261 +
  36.262 +					wnoutrefresh(dialog);
  36.263 +					wrefresh(list);
  36.264 +
  36.265 +					continue;	/* wait for another key press */
  36.266 +				} else
  36.267 +					i = choice + 1;
  36.268 +			}
  36.269 +			if (i != choice) {
  36.270 +				/* De-highlight current item */
  36.271 +				item_set(scroll + choice);
  36.272 +				print_item(list, choice, FALSE);
  36.273 +				/* Highlight new item */
  36.274 +				choice = i;
  36.275 +				item_set(scroll + choice);
  36.276 +				print_item(list, choice, TRUE);
  36.277 +				wnoutrefresh(dialog);
  36.278 +				wrefresh(list);
  36.279 +			}
  36.280 +			continue;	/* wait for another key press */
  36.281 +		}
  36.282 +		switch (key) {
  36.283 +		case 'H':
  36.284 +		case 'h':
  36.285 +		case '?':
  36.286 +			button = 1;
  36.287 +			/* fall-through */
  36.288 +		case 'S':
  36.289 +		case 's':
  36.290 +		case ' ':
  36.291 +		case '\n':
  36.292 +			item_foreach()
  36.293 +				item_set_selected(0);
  36.294 +			item_set(scroll + choice);
  36.295 +			item_set_selected(1);
  36.296 +			delwin(list);
  36.297 +			delwin(dialog);
  36.298 +			return button;
  36.299 +		case TAB:
  36.300 +		case KEY_LEFT:
  36.301 +		case KEY_RIGHT:
  36.302 +			button = ((key == KEY_LEFT ? --button : ++button) < 0)
  36.303 +			    ? 1 : (button > 1 ? 0 : button);
  36.304 +
  36.305 +			print_buttons(dialog, height, width, button);
  36.306 +			wrefresh(dialog);
  36.307 +			break;
  36.308 +		case 'X':
  36.309 +		case 'x':
  36.310 +			key = KEY_ESC;
  36.311 +			break;
  36.312 +		case KEY_ESC:
  36.313 +			key = on_key_esc(dialog);
  36.314 +			break;
  36.315 +		case KEY_RESIZE:
  36.316 +			delwin(list);
  36.317 +			delwin(dialog);
  36.318 +			on_key_resize();
  36.319 +			goto do_resize;
  36.320 +		}
  36.321 +
  36.322 +		/* Now, update everything... */
  36.323 +		doupdate();
  36.324 +	}
  36.325 +	delwin(list);
  36.326 +	delwin(dialog);
  36.327 +	return key;		/* ESC pressed */
  36.328 +}
    37.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.2 +++ b/kconfig/lxdialog/dialog.h	Sat Feb 24 11:00:05 2007 +0000
    37.3 @@ -0,0 +1,224 @@
    37.4 +/*
    37.5 + *  dialog.h -- common declarations for all dialog modules
    37.6 + *
    37.7 + *  AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
    37.8 + *
    37.9 + *  This program is free software; you can redistribute it and/or
   37.10 + *  modify it under the terms of the GNU General Public License
   37.11 + *  as published by the Free Software Foundation; either version 2
   37.12 + *  of the License, or (at your option) any later version.
   37.13 + *
   37.14 + *  This program is distributed in the hope that it will be useful,
   37.15 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   37.16 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   37.17 + *  GNU General Public License for more details.
   37.18 + *
   37.19 + *  You should have received a copy of the GNU General Public License
   37.20 + *  along with this program; if not, write to the Free Software
   37.21 + *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   37.22 + */
   37.23 +
   37.24 +#include <sys/types.h>
   37.25 +#include <fcntl.h>
   37.26 +#include <unistd.h>
   37.27 +#include <ctype.h>
   37.28 +#include <stdlib.h>
   37.29 +#include <string.h>
   37.30 +#include <stdbool.h>
   37.31 +
   37.32 +#ifdef __sun__
   37.33 +#define CURS_MACROS
   37.34 +#endif
   37.35 +#include CURSES_LOC
   37.36 +
   37.37 +/*
   37.38 + * Colors in ncurses 1.9.9e do not work properly since foreground and
   37.39 + * background colors are OR'd rather than separately masked.  This version
   37.40 + * of dialog was hacked to work with ncurses 1.9.9e, making it incompatible
   37.41 + * with standard curses.  The simplest fix (to make this work with standard
   37.42 + * curses) uses the wbkgdset() function, not used in the original hack.
   37.43 + * Turn it off if we're building with 1.9.9e, since it just confuses things.
   37.44 + */
   37.45 +#if defined(NCURSES_VERSION) && defined(_NEED_WRAP) && !defined(GCC_PRINTFLIKE)
   37.46 +#define OLD_NCURSES 1
   37.47 +#undef  wbkgdset
   37.48 +#define wbkgdset(w,p)		/*nothing */
   37.49 +#else
   37.50 +#define OLD_NCURSES 0
   37.51 +#endif
   37.52 +
   37.53 +#define TR(params) _tracef params
   37.54 +
   37.55 +#define KEY_ESC 27
   37.56 +#define TAB 9
   37.57 +#define MAX_LEN 2048
   37.58 +#define BUF_SIZE (10*1024)
   37.59 +#define MIN(x,y) (x < y ? x : y)
   37.60 +#define MAX(x,y) (x > y ? x : y)
   37.61 +
   37.62 +#ifndef ACS_ULCORNER
   37.63 +#define ACS_ULCORNER '+'
   37.64 +#endif
   37.65 +#ifndef ACS_LLCORNER
   37.66 +#define ACS_LLCORNER '+'
   37.67 +#endif
   37.68 +#ifndef ACS_URCORNER
   37.69 +#define ACS_URCORNER '+'
   37.70 +#endif
   37.71 +#ifndef ACS_LRCORNER
   37.72 +#define ACS_LRCORNER '+'
   37.73 +#endif
   37.74 +#ifndef ACS_HLINE
   37.75 +#define ACS_HLINE '-'
   37.76 +#endif
   37.77 +#ifndef ACS_VLINE
   37.78 +#define ACS_VLINE '|'
   37.79 +#endif
   37.80 +#ifndef ACS_LTEE
   37.81 +#define ACS_LTEE '+'
   37.82 +#endif
   37.83 +#ifndef ACS_RTEE
   37.84 +#define ACS_RTEE '+'
   37.85 +#endif
   37.86 +#ifndef ACS_UARROW
   37.87 +#define ACS_UARROW '^'
   37.88 +#endif
   37.89 +#ifndef ACS_DARROW
   37.90 +#define ACS_DARROW 'v'
   37.91 +#endif
   37.92 +
   37.93 +/* error return codes */
   37.94 +#define ERRDISPLAYTOOSMALL (KEY_MAX + 1)
   37.95 +
   37.96 +/*
   37.97 + *   Color definitions
   37.98 + */
   37.99 +struct dialog_color {
  37.100 +	chtype atr;	/* Color attribute */
  37.101 +	int fg;		/* foreground */
  37.102 +	int bg;		/* background */
  37.103 +	int hl;		/* highlight this item */
  37.104 +};
  37.105 +
  37.106 +struct dialog_info {
  37.107 +	const char *backtitle;
  37.108 +	struct dialog_color screen;
  37.109 +	struct dialog_color shadow;
  37.110 +	struct dialog_color dialog;
  37.111 +	struct dialog_color title;
  37.112 +	struct dialog_color border;
  37.113 +	struct dialog_color button_active;
  37.114 +	struct dialog_color button_inactive;
  37.115 +	struct dialog_color button_key_active;
  37.116 +	struct dialog_color button_key_inactive;
  37.117 +	struct dialog_color button_label_active;
  37.118 +	struct dialog_color button_label_inactive;
  37.119 +	struct dialog_color inputbox;
  37.120 +	struct dialog_color inputbox_border;
  37.121 +	struct dialog_color searchbox;
  37.122 +	struct dialog_color searchbox_title;
  37.123 +	struct dialog_color searchbox_border;
  37.124 +	struct dialog_color position_indicator;
  37.125 +	struct dialog_color menubox;
  37.126 +	struct dialog_color menubox_border;
  37.127 +	struct dialog_color item;
  37.128 +	struct dialog_color item_selected;
  37.129 +	struct dialog_color tag;
  37.130 +	struct dialog_color tag_selected;
  37.131 +	struct dialog_color tag_key;
  37.132 +	struct dialog_color tag_key_selected;
  37.133 +	struct dialog_color check;
  37.134 +	struct dialog_color check_selected;
  37.135 +	struct dialog_color uarrow;
  37.136 +	struct dialog_color darrow;
  37.137 +};
  37.138 +
  37.139 +/*
  37.140 + * Global variables
  37.141 + */
  37.142 +extern struct dialog_info dlg;
  37.143 +extern char dialog_input_result[];
  37.144 +
  37.145 +/*
  37.146 + * Function prototypes
  37.147 + */
  37.148 +
  37.149 +/* item list as used by checklist and menubox */
  37.150 +void item_reset(void);
  37.151 +void item_make(const char *fmt, ...);
  37.152 +void item_add_str(const char *fmt, ...);
  37.153 +void item_set_tag(char tag);
  37.154 +void item_set_data(void *p);
  37.155 +void item_set_selected(int val);
  37.156 +int item_activate_selected(void);
  37.157 +void *item_data(void);
  37.158 +char item_tag(void);
  37.159 +
  37.160 +/* item list manipulation for lxdialog use */
  37.161 +#define MAXITEMSTR 200
  37.162 +struct dialog_item {
  37.163 +	char str[MAXITEMSTR];	/* promtp displayed */
  37.164 +	char tag;
  37.165 +	void *data;	/* pointer to menu item - used by menubox+checklist */
  37.166 +	int selected;	/* Set to 1 by dialog_*() function if selected. */
  37.167 +};
  37.168 +
  37.169 +/* list of lialog_items */
  37.170 +struct dialog_list {
  37.171 +	struct dialog_item node;
  37.172 +	struct dialog_list *next;
  37.173 +};
  37.174 +
  37.175 +extern struct dialog_list *item_cur;
  37.176 +extern struct dialog_list item_nil;
  37.177 +extern struct dialog_list *item_head;
  37.178 +
  37.179 +int item_count(void);
  37.180 +void item_set(int n);
  37.181 +int item_n(void);
  37.182 +const char *item_str(void);
  37.183 +int item_is_selected(void);
  37.184 +int item_is_tag(char tag);
  37.185 +#define item_foreach() \
  37.186 +	for (item_cur = item_head ? item_head: item_cur; \
  37.187 +	     item_cur && (item_cur != &item_nil); item_cur = item_cur->next)
  37.188 +
  37.189 +/* generic key handlers */
  37.190 +int on_key_esc(WINDOW *win);
  37.191 +int on_key_resize(void);
  37.192 +
  37.193 +void init_dialog(const char *backtitle);
  37.194 +void reset_dialog(void);
  37.195 +void end_dialog(void);
  37.196 +void attr_clear(WINDOW * win, int height, int width, chtype attr);
  37.197 +void dialog_clear(void);
  37.198 +void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x);
  37.199 +void print_button(WINDOW * win, const char *label, int y, int x, int selected);
  37.200 +void print_title(WINDOW *dialog, const char *title, int width);
  37.201 +void draw_box(WINDOW * win, int y, int x, int height, int width, chtype box,
  37.202 +	      chtype border);
  37.203 +void draw_shadow(WINDOW * win, int y, int x, int height, int width);
  37.204 +
  37.205 +int first_alpha(const char *string, const char *exempt);
  37.206 +int dialog_yesno(const char *title, const char *prompt, int height, int width);
  37.207 +int dialog_msgbox(const char *title, const char *prompt, int height,
  37.208 +		  int width, int pause);
  37.209 +int dialog_textbox(const char *title, const char *file, int height, int width);
  37.210 +int dialog_menu(const char *title, const char *prompt,
  37.211 +		const void *selected, int *s_scroll);
  37.212 +int dialog_checklist(const char *title, const char *prompt, int height,
  37.213 +		     int width, int list_height);
  37.214 +extern char dialog_input_result[];
  37.215 +int dialog_inputbox(const char *title, const char *prompt, int height,
  37.216 +		    int width, const char *init);
  37.217 +
  37.218 +/*
  37.219 + * This is the base for fictitious keys, which activate
  37.220 + * the buttons.
  37.221 + *
  37.222 + * Mouse-generated keys are the following:
  37.223 + *   -- the first 32 are used as numbers, in addition to '0'-'9'
  37.224 + *   -- the lowercase are used to signal mouse-enter events (M_EVENT + 'o')
  37.225 + *   -- uppercase chars are used to invoke the button (M_EVENT + 'O')
  37.226 + */
  37.227 +#define M_EVENT (KEY_MAX+1)
    38.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    38.2 +++ b/kconfig/lxdialog/inputbox.c	Sat Feb 24 11:00:05 2007 +0000
    38.3 @@ -0,0 +1,238 @@
    38.4 +/*
    38.5 + *  inputbox.c -- implements the input box
    38.6 + *
    38.7 + *  ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
    38.8 + *  MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com)
    38.9 + *
   38.10 + *  This program is free software; you can redistribute it and/or
   38.11 + *  modify it under the terms of the GNU General Public License
   38.12 + *  as published by the Free Software Foundation; either version 2
   38.13 + *  of the License, or (at your option) any later version.
   38.14 + *
   38.15 + *  This program is distributed in the hope that it will be useful,
   38.16 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   38.17 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   38.18 + *  GNU General Public License for more details.
   38.19 + *
   38.20 + *  You should have received a copy of the GNU General Public License
   38.21 + *  along with this program; if not, write to the Free Software
   38.22 + *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   38.23 + */
   38.24 +
   38.25 +#include "dialog.h"
   38.26 +
   38.27 +char dialog_input_result[MAX_LEN + 1];
   38.28 +
   38.29 +/*
   38.30 + *  Print the termination buttons
   38.31 + */
   38.32 +static void print_buttons(WINDOW * dialog, int height, int width, int selected)
   38.33 +{
   38.34 +	int x = width / 2 - 11;
   38.35 +	int y = height - 2;
   38.36 +
   38.37 +	print_button(dialog, "  Ok  ", y, x, selected == 0);
   38.38 +	print_button(dialog, " Help ", y, x + 14, selected == 1);
   38.39 +
   38.40 +	wmove(dialog, y, x + 1 + 14 * selected);
   38.41 +	wrefresh(dialog);
   38.42 +}
   38.43 +
   38.44 +/*
   38.45 + * Display a dialog box for inputing a string
   38.46 + */
   38.47 +int dialog_inputbox(const char *title, const char *prompt, int height, int width,
   38.48 +                    const char *init)
   38.49 +{
   38.50 +	int i, x, y, box_y, box_x, box_width;
   38.51 +	int input_x = 0, scroll = 0, key = 0, button = -1;
   38.52 +	char *instr = dialog_input_result;
   38.53 +	WINDOW *dialog;
   38.54 +
   38.55 +	if (!init)
   38.56 +		instr[0] = '\0';
   38.57 +	else
   38.58 +		strcpy(instr, init);
   38.59 +
   38.60 +do_resize:
   38.61 +	if (getmaxy(stdscr) <= (height - 2))
   38.62 +		return -ERRDISPLAYTOOSMALL;
   38.63 +	if (getmaxx(stdscr) <= (width - 2))
   38.64 +		return -ERRDISPLAYTOOSMALL;
   38.65 +
   38.66 +	/* center dialog box on screen */
   38.67 +	x = (COLS - width) / 2;
   38.68 +	y = (LINES - height) / 2;
   38.69 +
   38.70 +	draw_shadow(stdscr, y, x, height, width);
   38.71 +
   38.72 +	dialog = newwin(height, width, y, x);
   38.73 +	keypad(dialog, TRUE);
   38.74 +
   38.75 +	draw_box(dialog, 0, 0, height, width,
   38.76 +		 dlg.dialog.atr, dlg.border.atr);
   38.77 +	wattrset(dialog, dlg.border.atr);
   38.78 +	mvwaddch(dialog, height - 3, 0, ACS_LTEE);
   38.79 +	for (i = 0; i < width - 2; i++)
   38.80 +		waddch(dialog, ACS_HLINE);
   38.81 +	wattrset(dialog, dlg.dialog.atr);
   38.82 +	waddch(dialog, ACS_RTEE);
   38.83 +
   38.84 +	print_title(dialog, title, width);
   38.85 +
   38.86 +	wattrset(dialog, dlg.dialog.atr);
   38.87 +	print_autowrap(dialog, prompt, width - 2, 1, 3);
   38.88 +
   38.89 +	/* Draw the input field box */
   38.90 +	box_width = width - 6;
   38.91 +	getyx(dialog, y, x);
   38.92 +	box_y = y + 2;
   38.93 +	box_x = (width - box_width) / 2;
   38.94 +	draw_box(dialog, y + 1, box_x - 1, 3, box_width + 2,
   38.95 +		 dlg.border.atr, dlg.dialog.atr);
   38.96 +
   38.97 +	print_buttons(dialog, height, width, 0);
   38.98 +
   38.99 +	/* Set up the initial value */
  38.100 +	wmove(dialog, box_y, box_x);
  38.101 +	wattrset(dialog, dlg.inputbox.atr);
  38.102 +
  38.103 +	input_x = strlen(instr);
  38.104 +
  38.105 +	if (input_x >= box_width) {
  38.106 +		scroll = input_x - box_width + 1;
  38.107 +		input_x = box_width - 1;
  38.108 +		for (i = 0; i < box_width - 1; i++)
  38.109 +			waddch(dialog, instr[scroll + i]);
  38.110 +	} else {
  38.111 +		waddstr(dialog, instr);
  38.112 +	}
  38.113 +
  38.114 +	wmove(dialog, box_y, box_x + input_x);
  38.115 +
  38.116 +	wrefresh(dialog);
  38.117 +
  38.118 +	while (key != KEY_ESC) {
  38.119 +		key = wgetch(dialog);
  38.120 +
  38.121 +		if (button == -1) {	/* Input box selected */
  38.122 +			switch (key) {
  38.123 +			case TAB:
  38.124 +			case KEY_UP:
  38.125 +			case KEY_DOWN:
  38.126 +				break;
  38.127 +			case KEY_LEFT:
  38.128 +				continue;
  38.129 +			case KEY_RIGHT:
  38.130 +				continue;
  38.131 +			case KEY_BACKSPACE:
  38.132 +			case 127:
  38.133 +				if (input_x || scroll) {
  38.134 +					wattrset(dialog, dlg.inputbox.atr);
  38.135 +					if (!input_x) {
  38.136 +						scroll = scroll < box_width - 1 ? 0 : scroll - (box_width - 1);
  38.137 +						wmove(dialog, box_y, box_x);
  38.138 +						for (i = 0; i < box_width; i++)
  38.139 +							waddch(dialog,
  38.140 +							       instr[scroll + input_x + i] ?
  38.141 +							       instr[scroll + input_x + i] : ' ');
  38.142 +						input_x = strlen(instr) - scroll;
  38.143 +					} else
  38.144 +						input_x--;
  38.145 +					instr[scroll + input_x] = '\0';
  38.146 +					mvwaddch(dialog, box_y, input_x + box_x, ' ');
  38.147 +					wmove(dialog, box_y, input_x + box_x);
  38.148 +					wrefresh(dialog);
  38.149 +				}
  38.150 +				continue;
  38.151 +			default:
  38.152 +				if (key < 0x100 && isprint(key)) {
  38.153 +					if (scroll + input_x < MAX_LEN) {
  38.154 +						wattrset(dialog, dlg.inputbox.atr);
  38.155 +						instr[scroll + input_x] = key;
  38.156 +						instr[scroll + input_x + 1] = '\0';
  38.157 +						if (input_x == box_width - 1) {
  38.158 +							scroll++;
  38.159 +							wmove(dialog, box_y, box_x);
  38.160 +							for (i = 0; i < box_width - 1; i++)
  38.161 +								waddch(dialog, instr [scroll + i]);
  38.162 +						} else {
  38.163 +							wmove(dialog, box_y, input_x++ + box_x);
  38.164 +							waddch(dialog, key);
  38.165 +						}
  38.166 +						wrefresh(dialog);
  38.167 +					} else
  38.168 +						flash();	/* Alarm user about overflow */
  38.169 +					continue;
  38.170 +				}
  38.171 +			}
  38.172 +		}
  38.173 +		switch (key) {
  38.174 +		case 'O':
  38.175 +		case 'o':
  38.176 +			delwin(dialog);
  38.177 +			return 0;
  38.178 +		case 'H':
  38.179 +		case 'h':
  38.180 +			delwin(dialog);
  38.181 +			return 1;
  38.182 +		case KEY_UP:
  38.183 +		case KEY_LEFT:
  38.184 +			switch (button) {
  38.185 +			case -1:
  38.186 +				button = 1;	/* Indicates "Cancel" button is selected */
  38.187 +				print_buttons(dialog, height, width, 1);
  38.188 +				break;
  38.189 +			case 0:
  38.190 +				button = -1;	/* Indicates input box is selected */
  38.191 +				print_buttons(dialog, height, width, 0);
  38.192 +				wmove(dialog, box_y, box_x + input_x);
  38.193 +				wrefresh(dialog);
  38.194 +				break;
  38.195 +			case 1:
  38.196 +				button = 0;	/* Indicates "OK" button is selected */
  38.197 +				print_buttons(dialog, height, width, 0);
  38.198 +				break;
  38.199 +			}
  38.200 +			break;
  38.201 +		case TAB:
  38.202 +		case KEY_DOWN:
  38.203 +		case KEY_RIGHT:
  38.204 +			switch (button) {
  38.205 +			case -1:
  38.206 +				button = 0;	/* Indicates "OK" button is selected */
  38.207 +				print_buttons(dialog, height, width, 0);
  38.208 +				break;
  38.209 +			case 0:
  38.210 +				button = 1;	/* Indicates "Cancel" button is selected */
  38.211 +				print_buttons(dialog, height, width, 1);
  38.212 +				break;
  38.213 +			case 1:
  38.214 +				button = -1;	/* Indicates input box is selected */
  38.215 +				print_buttons(dialog, height, width, 0);
  38.216 +				wmove(dialog, box_y, box_x + input_x);
  38.217 +				wrefresh(dialog);
  38.218 +				break;
  38.219 +			}
  38.220 +			break;
  38.221 +		case ' ':
  38.222 +		case '\n':
  38.223 +			delwin(dialog);
  38.224 +			return (button == -1 ? 0 : button);
  38.225 +		case 'X':
  38.226 +		case 'x':
  38.227 +			key = KEY_ESC;
  38.228 +			break;
  38.229 +		case KEY_ESC:
  38.230 +			key = on_key_esc(dialog);
  38.231 +			break;
  38.232 +		case KEY_RESIZE:
  38.233 +			delwin(dialog);
  38.234 +			on_key_resize();
  38.235 +			goto do_resize;
  38.236 +		}
  38.237 +	}
  38.238 +
  38.239 +	delwin(dialog);
  38.240 +	return KEY_ESC;		/* ESC pressed */
  38.241 +}
    39.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    39.2 +++ b/kconfig/lxdialog/menubox.c	Sat Feb 24 11:00:05 2007 +0000
    39.3 @@ -0,0 +1,434 @@
    39.4 +/*
    39.5 + *  menubox.c -- implements the menu box
    39.6 + *
    39.7 + *  ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
    39.8 + *  MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcapw@cfw.com)
    39.9 + *
   39.10 + *  This program is free software; you can redistribute it and/or
   39.11 + *  modify it under the terms of the GNU General Public License
   39.12 + *  as published by the Free Software Foundation; either version 2
   39.13 + *  of the License, or (at your option) any later version.
   39.14 + *
   39.15 + *  This program is distributed in the hope that it will be useful,
   39.16 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   39.17 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   39.18 + *  GNU General Public License for more details.
   39.19 + *
   39.20 + *  You should have received a copy of the GNU General Public License
   39.21 + *  along with this program; if not, write to the Free Software
   39.22 + *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   39.23 + */
   39.24 +
   39.25 +/*
   39.26 + *  Changes by Clifford Wolf (god@clifford.at)
   39.27 + *
   39.28 + *  [ 1998-06-13 ]
   39.29 + *
   39.30 + *    *)  A bugfix for the Page-Down problem
   39.31 + *
   39.32 + *    *)  Formerly when I used Page Down and Page Up, the cursor would be set 
   39.33 + *        to the first position in the menu box.  Now lxdialog is a bit
   39.34 + *        smarter and works more like other menu systems (just have a look at
   39.35 + *        it).
   39.36 + *
   39.37 + *    *)  Formerly if I selected something my scrolling would be broken because
   39.38 + *        lxdialog is re-invoked by the Menuconfig shell script, can't
   39.39 + *        remember the last scrolling position, and just sets it so that the
   39.40 + *        cursor is at the bottom of the box.  Now it writes the temporary file
   39.41 + *        lxdialog.scrltmp which contains this information. The file is
   39.42 + *        deleted by lxdialog if the user leaves a submenu or enters a new
   39.43 + *        one, but it would be nice if Menuconfig could make another "rm -f"
   39.44 + *        just to be sure.  Just try it out - you will recognise a difference!
   39.45 + *
   39.46 + *  [ 1998-06-14 ]
   39.47 + *
   39.48 + *    *)  Now lxdialog is crash-safe against broken "lxdialog.scrltmp" files
   39.49 + *        and menus change their size on the fly.
   39.50 + *
   39.51 + *    *)  If for some reason the last scrolling position is not saved by
   39.52 + *        lxdialog, it sets the scrolling so that the selected item is in the
   39.53 + *        middle of the menu box, not at the bottom.
   39.54 + *
   39.55 + * 02 January 1999, Michael Elizabeth Chastain (mec@shout.net)
   39.56 + * Reset 'scroll' to 0 if the value from lxdialog.scrltmp is bogus.
   39.57 + * This fixes a bug in Menuconfig where using ' ' to descend into menus
   39.58 + * would leave mis-synchronized lxdialog.scrltmp files lying around,
   39.59 + * fscanf would read in 'scroll', and eventually that value would get used.
   39.60 + */
   39.61 +
   39.62 +#include "dialog.h"
   39.63 +
   39.64 +static int menu_width, item_x;
   39.65 +
   39.66 +/*
   39.67 + * Print menu item
   39.68 + */
   39.69 +static void do_print_item(WINDOW * win, const char *item, int line_y,
   39.70 +                          int selected, int hotkey)
   39.71 +{
   39.72 +	int j;
   39.73 +	char *menu_item = malloc(menu_width + 1);
   39.74 +
   39.75 +	strncpy(menu_item, item, menu_width - item_x);
   39.76 +	menu_item[menu_width - item_x] = '\0';
   39.77 +	j = first_alpha(menu_item, "YyNnMmHh");
   39.78 +
   39.79 +	/* Clear 'residue' of last item */
   39.80 +	wattrset(win, dlg.menubox.atr);
   39.81 +	wmove(win, line_y, 0);
   39.82 +#if OLD_NCURSES
   39.83 +	{
   39.84 +		int i;
   39.85 +		for (i = 0; i < menu_width; i++)
   39.86 +			waddch(win, ' ');
   39.87 +	}
   39.88 +#else
   39.89 +	wclrtoeol(win);
   39.90 +#endif
   39.91 +	wattrset(win, selected ? dlg.item_selected.atr : dlg.item.atr);
   39.92 +	mvwaddstr(win, line_y, item_x, menu_item);
   39.93 +	if (hotkey) {
   39.94 +		wattrset(win, selected ? dlg.tag_key_selected.atr
   39.95 +			 : dlg.tag_key.atr);
   39.96 +		mvwaddch(win, line_y, item_x + j, menu_item[j]);
   39.97 +	}
   39.98 +	if (selected) {
   39.99 +		wmove(win, line_y, item_x + 1);
  39.100 +	}
  39.101 +	free(menu_item);
  39.102 +	wrefresh(win);
  39.103 +}
  39.104 +
  39.105 +#define print_item(index, choice, selected)				\
  39.106 +do {									\
  39.107 +	item_set(index);						\
  39.108 +	do_print_item(menu, item_str(), choice, selected, !item_is_tag(':')); \
  39.109 +} while (0)
  39.110 +
  39.111 +/*
  39.112 + * Print the scroll indicators.
  39.113 + */
  39.114 +static void print_arrows(WINDOW * win, int item_no, int scroll, int y, int x,
  39.115 +			 int height)
  39.116 +{
  39.117 +	int cur_y, cur_x;
  39.118 +
  39.119 +	getyx(win, cur_y, cur_x);
  39.120 +
  39.121 +	wmove(win, y, x);
  39.122 +
  39.123 +	if (scroll > 0) {
  39.124 +		wattrset(win, dlg.uarrow.atr);
  39.125 +		waddch(win, ACS_UARROW);
  39.126 +		waddstr(win, "(-)");
  39.127 +	} else {
  39.128 +		wattrset(win, dlg.menubox.atr);
  39.129 +		waddch(win, ACS_HLINE);
  39.130 +		waddch(win, ACS_HLINE);
  39.131 +		waddch(win, ACS_HLINE);
  39.132 +		waddch(win, ACS_HLINE);
  39.133 +	}
  39.134 +
  39.135 +	y = y + height + 1;
  39.136 +	wmove(win, y, x);
  39.137 +	wrefresh(win);
  39.138 +
  39.139 +	if ((height < item_no) && (scroll + height < item_no)) {
  39.140 +		wattrset(win, dlg.darrow.atr);
  39.141 +		waddch(win, ACS_DARROW);
  39.142 +		waddstr(win, "(+)");
  39.143 +	} else {
  39.144 +		wattrset(win, dlg.menubox_border.atr);
  39.145 +		waddch(win, ACS_HLINE);
  39.146 +		waddch(win, ACS_HLINE);
  39.147 +		waddch(win, ACS_HLINE);
  39.148 +		waddch(win, ACS_HLINE);
  39.149 +	}
  39.150 +
  39.151 +	wmove(win, cur_y, cur_x);
  39.152 +	wrefresh(win);
  39.153 +}
  39.154 +
  39.155 +/*
  39.156 + * Display the termination buttons.
  39.157 + */
  39.158 +static void print_buttons(WINDOW * win, int height, int width, int selected)
  39.159 +{
  39.160 +	int x = width / 2 - 16;
  39.161 +	int y = height - 2;
  39.162 +
  39.163 +	print_button(win, "Select", y, x, selected == 0);
  39.164 +	print_button(win, " Exit ", y, x + 12, selected == 1);
  39.165 +	print_button(win, " Help ", y, x + 24, selected == 2);
  39.166 +
  39.167 +	wmove(win, y, x + 1 + 12 * selected);
  39.168 +	wrefresh(win);
  39.169 +}
  39.170 +
  39.171 +/* scroll up n lines (n may be negative) */
  39.172 +static void do_scroll(WINDOW *win, int *scroll, int n)
  39.173 +{
  39.174 +	/* Scroll menu up */
  39.175 +	scrollok(win, TRUE);
  39.176 +	wscrl(win, n);
  39.177 +	scrollok(win, FALSE);
  39.178 +	*scroll = *scroll + n;
  39.179 +	wrefresh(win);
  39.180 +}
  39.181 +
  39.182 +/*
  39.183 + * Display a menu for choosing among a number of options
  39.184 + */
  39.185 +int dialog_menu(const char *title, const char *prompt,
  39.186 +                const void *selected, int *s_scroll)
  39.187 +{
  39.188 +	int i, j, x, y, box_x, box_y;
  39.189 +	int height, width, menu_height;
  39.190 +	int key = 0, button = 0, scroll = 0, choice = 0;
  39.191 +	int first_item =  0, max_choice;
  39.192 +	WINDOW *dialog, *menu;
  39.193 +
  39.194 +do_resize:
  39.195 +	height = getmaxy(stdscr);
  39.196 +	width = getmaxx(stdscr);
  39.197 +	if (height < 15 || width < 65)
  39.198 +		return -ERRDISPLAYTOOSMALL;
  39.199 +
  39.200 +	height -= 4;
  39.201 +	width  -= 5;
  39.202 +	menu_height = height - 10;
  39.203 +
  39.204 +	max_choice = MIN(menu_height, item_count());
  39.205 +
  39.206 +	/* center dialog box on screen */
  39.207 +	x = (COLS - width) / 2;
  39.208 +	y = (LINES - height) / 2;
  39.209 +
  39.210 +	draw_shadow(stdscr, y, x, height, width);
  39.211 +
  39.212 +	dialog = newwin(height, width, y, x);
  39.213 +	keypad(dialog, TRUE);
  39.214 +
  39.215 +	draw_box(dialog, 0, 0, height, width,
  39.216 +		 dlg.dialog.atr, dlg.border.atr);
  39.217 +	wattrset(dialog, dlg.border.atr);
  39.218 +	mvwaddch(dialog, height - 3, 0, ACS_LTEE);
  39.219 +	for (i = 0; i < width - 2; i++)
  39.220 +		waddch(dialog, ACS_HLINE);
  39.221 +	wattrset(dialog, dlg.dialog.atr);
  39.222 +	wbkgdset(dialog, dlg.dialog.atr & A_COLOR);
  39.223 +	waddch(dialog, ACS_RTEE);
  39.224 +
  39.225 +	print_title(dialog, title, width);
  39.226 +
  39.227 +	wattrset(dialog, dlg.dialog.atr);
  39.228 +	print_autowrap(dialog, prompt, width - 2, 1, 3);
  39.229 +
  39.230 +	menu_width = width - 6;
  39.231 +	box_y = height - menu_height - 5;
  39.232 +	box_x = (width - menu_width) / 2 - 1;
  39.233 +
  39.234 +	/* create new window for the menu */
  39.235 +	menu = subwin(dialog, menu_height, menu_width,
  39.236 +		      y + box_y + 1, x + box_x + 1);
  39.237 +	keypad(menu, TRUE);
  39.238 +
  39.239 +	/* draw a box around the menu items */
  39.240 +	draw_box(dialog, box_y, box_x, menu_height + 2, menu_width + 2,
  39.241 +		 dlg.menubox_border.atr, dlg.menubox.atr);
  39.242 +
  39.243 +	if (menu_width >= 80)
  39.244 +		item_x = (menu_width - 70) / 2;
  39.245 +	else
  39.246 +		item_x = 4;
  39.247 +
  39.248 +	/* Set choice to default item */
  39.249 +	item_foreach()
  39.250 +		if (selected && (selected == item_data()))
  39.251 +			choice = item_n();
  39.252 +	/* get the saved scroll info */
  39.253 +	scroll = *s_scroll;
  39.254 +	if ((scroll <= choice) && (scroll + max_choice > choice) &&
  39.255 +	   (scroll >= 0) && (scroll + max_choice <= item_count())) {
  39.256 +		first_item = scroll;
  39.257 +		choice = choice - scroll;
  39.258 +	} else {
  39.259 +		scroll = 0;
  39.260 +	}
  39.261 +	if ((choice >= max_choice)) {
  39.262 +		if (choice >= item_count() - max_choice / 2)
  39.263 +			scroll = first_item = item_count() - max_choice;
  39.264 +		else
  39.265 +			scroll = first_item = choice - max_choice / 2;
  39.266 +		choice = choice - scroll;
  39.267 +	}
  39.268 +
  39.269 +	/* Print the menu */
  39.270 +	for (i = 0; i < max_choice; i++) {
  39.271 +		print_item(first_item + i, i, i == choice);
  39.272 +	}
  39.273 +
  39.274 +	wnoutrefresh(menu);
  39.275 +
  39.276 +	print_arrows(dialog, item_count(), scroll,
  39.277 +		     box_y, box_x + item_x + 1, menu_height);
  39.278 +
  39.279 +	print_buttons(dialog, height, width, 0);
  39.280 +	wmove(menu, choice, item_x + 1);
  39.281 +	wrefresh(menu);
  39.282 +
  39.283 +	while (key != KEY_ESC) {
  39.284 +		key = wgetch(menu);
  39.285 +
  39.286 +		if (key < 256 && isalpha(key))
  39.287 +			key = tolower(key);
  39.288 +
  39.289 +		if (strchr("ynmh", key))
  39.290 +			i = max_choice;
  39.291 +		else {
  39.292 +			for (i = choice + 1; i < max_choice; i++) {
  39.293 +				item_set(scroll + i);
  39.294 +				j = first_alpha(item_str(), "YyNnMmHh");
  39.295 +				if (key == tolower(item_str()[j]))
  39.296 +					break;
  39.297 +			}
  39.298 +			if (i == max_choice)
  39.299 +				for (i = 0; i < max_choice; i++) {
  39.300 +					item_set(scroll + i);
  39.301 +					j = first_alpha(item_str(), "YyNnMmHh");
  39.302 +					if (key == tolower(item_str()[j]))
  39.303 +						break;
  39.304 +				}
  39.305 +		}
  39.306 +
  39.307 +		if (i < max_choice ||
  39.308 +		    key == KEY_UP || key == KEY_DOWN ||
  39.309 +		    key == '-' || key == '+' ||
  39.310 +		    key == KEY_PPAGE || key == KEY_NPAGE) {
  39.311 +			/* Remove highligt of current item */
  39.312 +			print_item(scroll + choice, choice, FALSE);
  39.313 +
  39.314 +			if (key == KEY_UP || key == '-') {
  39.315 +				if (choice < 2 && scroll) {
  39.316 +					/* Scroll menu down */
  39.317 +					do_scroll(menu, &scroll, -1);
  39.318 +
  39.319 +					print_item(scroll, 0, FALSE);
  39.320 +				} else
  39.321 +					choice = MAX(choice - 1, 0);
  39.322 +
  39.323 +			} else if (key == KEY_DOWN || key == '+') {
  39.324 +				print_item(scroll+choice, choice, FALSE);
  39.325 +
  39.326 +				if ((choice > max_choice - 3) &&
  39.327 +				    (scroll + max_choice < item_count())) {
  39.328 +					/* Scroll menu up */
  39.329 +					do_scroll(menu, &scroll, 1);
  39.330 +
  39.331 +					print_item(scroll+max_choice - 1,
  39.332 +						   max_choice - 1, FALSE);
  39.333 +				} else
  39.334 +					choice = MIN(choice + 1, max_choice - 1);
  39.335 +
  39.336 +			} else if (key == KEY_PPAGE) {
  39.337 +				scrollok(menu, TRUE);
  39.338 +				for (i = 0; (i < max_choice); i++) {
  39.339 +					if (scroll > 0) {
  39.340 +						do_scroll(menu, &scroll, -1);
  39.341 +						print_item(scroll, 0, FALSE);
  39.342 +					} else {
  39.343 +						if (choice > 0)
  39.344 +							choice--;
  39.345 +					}
  39.346 +				}
  39.347 +
  39.348 +			} else if (key == KEY_NPAGE) {
  39.349 +				for (i = 0; (i < max_choice); i++) {
  39.350 +					if (scroll + max_choice < item_count()) {
  39.351 +						do_scroll(menu, &scroll, 1);
  39.352 +						print_item(scroll+max_choice-1,
  39.353 +							   max_choice - 1, FALSE);
  39.354 +					} else {
  39.355 +						if (choice + 1 < max_choice)
  39.356 +							choice++;
  39.357 +					}
  39.358 +				}
  39.359 +			} else
  39.360 +				choice = i;
  39.361 +
  39.362 +			print_item(scroll + choice, choice, TRUE);
  39.363 +
  39.364 +			print_arrows(dialog, item_count(), scroll,
  39.365 +				     box_y, box_x + item_x + 1, menu_height);
  39.366 +
  39.367 +			wnoutrefresh(dialog);
  39.368 +			wrefresh(menu);
  39.369 +
  39.370 +			continue;	/* wait for another key press */
  39.371 +		}
  39.372 +
  39.373 +		switch (key) {
  39.374 +		case KEY_LEFT:
  39.375 +		case TAB:
  39.376 +		case KEY_RIGHT:
  39.377 +			button = ((key == KEY_LEFT ? --button : ++button) < 0)
  39.378 +			    ? 2 : (button > 2 ? 0 : button);
  39.379 +
  39.380 +			print_buttons(dialog, height, width, button);
  39.381 +			wrefresh(menu);
  39.382 +			break;
  39.383 +		case ' ':
  39.384 +		case 's':
  39.385 +		case 'y':
  39.386 +		case 'n':
  39.387 +		case 'm':
  39.388 +		case '/':
  39.389 +			/* save scroll info */
  39.390 +			*s_scroll = scroll;
  39.391 +			delwin(menu);
  39.392 +			delwin(dialog);
  39.393 +			item_set(scroll + choice);
  39.394 +			item_set_selected(1);
  39.395 +			switch (key) {
  39.396 +			case 's':
  39.397 +				return 3;
  39.398 +			case 'y':
  39.399 +				return 3;
  39.400 +			case 'n':
  39.401 +				return 4;
  39.402 +			case 'm':
  39.403 +				return 5;
  39.404 +			case ' ':
  39.405 +				return 6;
  39.406 +			case '/':
  39.407 +				return 7;
  39.408 +			}
  39.409 +			return 0;
  39.410 +		case 'h':
  39.411 +		case '?':
  39.412 +			button = 2;
  39.413 +		case '\n':
  39.414 +			*s_scroll = scroll;
  39.415 +			delwin(menu);
  39.416 +			delwin(dialog);
  39.417 +			item_set(scroll + choice);
  39.418 +			item_set_selected(1);
  39.419 +			return button;
  39.420 +		case 'e':
  39.421 +		case 'x':
  39.422 +			key = KEY_ESC;
  39.423 +			break;
  39.424 +		case KEY_ESC:
  39.425 +			key = on_key_esc(menu);
  39.426 +			break;
  39.427 +		case KEY_RESIZE:
  39.428 +			on_key_resize();
  39.429 +			delwin(menu);
  39.430 +			delwin(dialog);
  39.431 +			goto do_resize;
  39.432 +		}
  39.433 +	}
  39.434 +	delwin(menu);
  39.435 +	delwin(dialog);
  39.436 +	return key;		/* ESC pressed */
  39.437 +}
    40.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    40.2 +++ b/kconfig/lxdialog/textbox.c	Sat Feb 24 11:00:05 2007 +0000
    40.3 @@ -0,0 +1,391 @@
    40.4 +/*
    40.5 + *  textbox.c -- implements the text box
    40.6 + *
    40.7 + *  ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
    40.8 + *  MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com)
    40.9 + *
   40.10 + *  This program is free software; you can redistribute it and/or
   40.11 + *  modify it under the terms of the GNU General Public License
   40.12 + *  as published by the Free Software Foundation; either version 2
   40.13 + *  of the License, or (at your option) any later version.
   40.14 + *
   40.15 + *  This program is distributed in the hope that it will be useful,
   40.16 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   40.17 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   40.18 + *  GNU General Public License for more details.
   40.19 + *
   40.20 + *  You should have received a copy of the GNU General Public License
   40.21 + *  along with this program; if not, write to the Free Software
   40.22 + *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   40.23 + */
   40.24 +
   40.25 +#include "dialog.h"
   40.26 +
   40.27 +static void back_lines(int n);
   40.28 +static void print_page(WINDOW * win, int height, int width);
   40.29 +static void print_line(WINDOW * win, int row, int width);
   40.30 +static char *get_line(void);
   40.31 +static void print_position(WINDOW * win);
   40.32 +
   40.33 +static int hscroll;
   40.34 +static int begin_reached, end_reached, page_length;
   40.35 +static const char *buf;
   40.36 +static const char *page;
   40.37 +
   40.38 +/*
   40.39 + * refresh window content
   40.40 + */
   40.41 +static void refresh_text_box(WINDOW *dialog, WINDOW *box, int boxh, int boxw,
   40.42 +							  int cur_y, int cur_x)
   40.43 +{
   40.44 +	print_page(box, boxh, boxw);
   40.45 +	print_position(dialog);
   40.46 +	wmove(dialog, cur_y, cur_x);	/* Restore cursor position */
   40.47 +	wrefresh(dialog);
   40.48 +}
   40.49 +
   40.50 +
   40.51 +/*
   40.52 + * Display text from a file in a dialog box.
   40.53 + */
   40.54 +int dialog_textbox(const char *title, const char *tbuf,
   40.55 +		   int initial_height, int initial_width)
   40.56 +{
   40.57 +	int i, x, y, cur_x, cur_y, key = 0;
   40.58 +	int height, width, boxh, boxw;
   40.59 +	int passed_end;
   40.60 +	WINDOW *dialog, *box;
   40.61 +
   40.62 +	begin_reached = 1;
   40.63 +	end_reached = 0;
   40.64 +	page_length = 0;
   40.65 +	hscroll = 0;
   40.66 +	buf = tbuf;
   40.67 +	page = buf;	/* page is pointer to start of page to be displayed */
   40.68 +
   40.69 +do_resize:
   40.70 +	getmaxyx(stdscr, height, width);
   40.71 +	if (height < 8 || width < 8)
   40.72 +		return -ERRDISPLAYTOOSMALL;
   40.73 +	if (initial_height != 0)
   40.74 +		height = initial_height;
   40.75 +	else
   40.76 +		if (height > 4)
   40.77 +			height -= 4;
   40.78 +		else
   40.79 +			height = 0;
   40.80 +	if (initial_width != 0)
   40.81 +		width = initial_width;
   40.82 +	else
   40.83 +		if (width > 5)
   40.84 +			width -= 5;
   40.85 +		else
   40.86 +			width = 0;
   40.87 +
   40.88 +	/* center dialog box on screen */
   40.89 +	x = (COLS - width) / 2;
   40.90 +	y = (LINES - height) / 2;
   40.91 +
   40.92 +	draw_shadow(stdscr, y, x, height, width);
   40.93 +
   40.94 +	dialog = newwin(height, width, y, x);
   40.95 +	keypad(dialog, TRUE);
   40.96 +
   40.97 +	/* Create window for box region, used for scrolling text */
   40.98 +	boxh = height - 4;
   40.99 +	boxw = width - 2;
  40.100 +	box = subwin(dialog, boxh, boxw, y + 1, x + 1);
  40.101 +	wattrset(box, dlg.dialog.atr);
  40.102 +	wbkgdset(box, dlg.dialog.atr & A_COLOR);
  40.103 +
  40.104 +	keypad(box, TRUE);
  40.105 +
  40.106 +	/* register the new window, along with its borders */
  40.107 +	draw_box(dialog, 0, 0, height, width,
  40.108 +		 dlg.dialog.atr, dlg.border.atr);
  40.109 +
  40.110 +	wattrset(dialog, dlg.border.atr);
  40.111 +	mvwaddch(dialog, height - 3, 0, ACS_LTEE);
  40.112 +	for (i = 0; i < width - 2; i++)
  40.113 +		waddch(dialog, ACS_HLINE);
  40.114 +	wattrset(dialog, dlg.dialog.atr);
  40.115 +	wbkgdset(dialog, dlg.dialog.atr & A_COLOR);
  40.116 +	waddch(dialog, ACS_RTEE);
  40.117 +
  40.118 +	print_title(dialog, title, width);
  40.119 +
  40.120 +	print_button(dialog, " Exit ", height - 2, width / 2 - 4, TRUE);
  40.121 +	wnoutrefresh(dialog);
  40.122 +	getyx(dialog, cur_y, cur_x);	/* Save cursor position */
  40.123 +
  40.124 +	/* Print first page of text */
  40.125 +	attr_clear(box, boxh, boxw, dlg.dialog.atr);
  40.126 +	refresh_text_box(dialog, box, boxh, boxw, cur_y, cur_x);
  40.127 +
  40.128 +	while ((key != KEY_ESC) && (key != '\n')) {
  40.129 +		key = wgetch(dialog);
  40.130 +		switch (key) {
  40.131 +		case 'E':	/* Exit */
  40.132 +		case 'e':
  40.133 +		case 'X':
  40.134 +		case 'x':
  40.135 +			delwin(box);
  40.136 +			delwin(dialog);
  40.137 +			return 0;
  40.138 +		case 'g':	/* First page */
  40.139 +		case KEY_HOME:
  40.140 +			if (!begin_reached) {
  40.141 +				begin_reached = 1;
  40.142 +				page = buf;
  40.143 +				refresh_text_box(dialog, box, boxh, boxw,
  40.144 +						 cur_y, cur_x);
  40.145 +			}
  40.146 +			break;
  40.147 +		case 'G':	/* Last page */
  40.148 +		case KEY_END:
  40.149 +
  40.150 +			end_reached = 1;
  40.151 +			/* point to last char in buf */
  40.152 +			page = buf + strlen(buf);
  40.153 +			back_lines(boxh);
  40.154 +			refresh_text_box(dialog, box, boxh, boxw,
  40.155 +					 cur_y, cur_x);
  40.156 +			break;
  40.157 +		case 'K':	/* Previous line */
  40.158 +		case 'k':
  40.159 +		case KEY_UP:
  40.160 +			if (!begin_reached) {
  40.161 +				back_lines(page_length + 1);
  40.162 +
  40.163 +				/* We don't call print_page() here but use
  40.164 +				 * scrolling to ensure faster screen update.
  40.165 +				 * However, 'end_reached' and 'page_length'
  40.166 +				 * should still be updated, and 'page' should
  40.167 +				 * point to start of next page. This is done
  40.168 +				 * by calling get_line() in the following
  40.169 +				 * 'for' loop. */
  40.170 +				scrollok(box, TRUE);
  40.171 +				wscrl(box, -1);	/* Scroll box region down one line */
  40.172 +				scrollok(box, FALSE);
  40.173 +				page_length = 0;
  40.174 +				passed_end = 0;
  40.175 +				for (i = 0; i < boxh; i++) {
  40.176 +					if (!i) {
  40.177 +						/* print first line of page */
  40.178 +						print_line(box, 0, boxw);
  40.179 +						wnoutrefresh(box);
  40.180 +					} else
  40.181 +						/* Called to update 'end_reached' and 'page' */
  40.182 +						get_line();
  40.183 +					if (!passed_end)
  40.184 +						page_length++;
  40.185 +					if (end_reached && !passed_end)
  40.186 +						passed_end = 1;
  40.187 +				}
  40.188 +
  40.189 +				print_position(dialog);
  40.190 +				wmove(dialog, cur_y, cur_x);	/* Restore cursor position */
  40.191 +				wrefresh(dialog);
  40.192 +			}
  40.193 +			break;
  40.194 +		case 'B':	/* Previous page */
  40.195 +		case 'b':
  40.196 +		case KEY_PPAGE:
  40.197 +			if (begin_reached)
  40.198 +				break;
  40.199 +			back_lines(page_length + boxh);
  40.200 +			refresh_text_box(dialog, box, boxh, boxw,
  40.201 +					 cur_y, cur_x);
  40.202 +			break;
  40.203 +		case 'J':	/* Next line */
  40.204 +		case 'j':
  40.205 +		case KEY_DOWN:
  40.206 +			if (!end_reached) {
  40.207 +				begin_reached = 0;
  40.208 +				scrollok(box, TRUE);
  40.209 +				scroll(box);	/* Scroll box region up one line */
  40.210 +				scrollok(box, FALSE);
  40.211 +				print_line(box, boxh - 1, boxw);
  40.212 +				wnoutrefresh(box);
  40.213 +				print_position(dialog);
  40.214 +				wmove(dialog, cur_y, cur_x);	/* Restore cursor position */
  40.215 +				wrefresh(dialog);
  40.216 +			}
  40.217 +			break;
  40.218 +		case KEY_NPAGE:	/* Next page */
  40.219 +		case ' ':
  40.220 +			if (end_reached)
  40.221 +				break;
  40.222 +
  40.223 +			begin_reached = 0;
  40.224 +			refresh_text_box(dialog, box, boxh, boxw,
  40.225 +					 cur_y, cur_x);
  40.226 +			break;
  40.227 +		case '0':	/* Beginning of line */
  40.228 +		case 'H':	/* Scroll left */
  40.229 +		case 'h':
  40.230 +		case KEY_LEFT:
  40.231 +			if (hscroll <= 0)
  40.232 +				break;
  40.233 +
  40.234 +			if (key == '0')
  40.235 +				hscroll = 0;
  40.236 +			else
  40.237 +				hscroll--;
  40.238 +			/* Reprint current page to scroll horizontally */
  40.239 +			back_lines(page_length);
  40.240 +			refresh_text_box(dialog, box, boxh, boxw,
  40.241 +					 cur_y, cur_x);
  40.242 +			break;
  40.243 +		case 'L':	/* Scroll right */
  40.244 +		case 'l':
  40.245 +		case KEY_RIGHT:
  40.246 +			if (hscroll >= MAX_LEN)
  40.247 +				break;
  40.248 +			hscroll++;
  40.249 +			/* Reprint current page to scroll horizontally */
  40.250 +			back_lines(page_length);
  40.251 +			refresh_text_box(dialog, box, boxh, boxw,
  40.252 +					 cur_y, cur_x);
  40.253 +			break;
  40.254 +		case KEY_ESC:
  40.255 +			key = on_key_esc(dialog);
  40.256 +			break;
  40.257 +		case KEY_RESIZE:
  40.258 +			back_lines(height);
  40.259 +			delwin(box);
  40.260 +			delwin(dialog);
  40.261 +			on_key_resize();
  40.262 +			goto do_resize;
  40.263 +		}
  40.264 +	}
  40.265 +	delwin(box);
  40.266 +	delwin(dialog);
  40.267 +	return key;		/* ESC pressed */
  40.268 +}
  40.269 +
  40.270 +/*
  40.271 + * Go back 'n' lines in text. Called by dialog_textbox().
  40.272 + * 'page' will be updated to point to the desired line in 'buf'.
  40.273 + */
  40.274 +static void back_lines(int n)
  40.275 +{
  40.276 +	int i;
  40.277 +
  40.278 +	begin_reached = 0;
  40.279 +	/* Go back 'n' lines */
  40.280 +	for (i = 0; i < n; i++) {
  40.281 +		if (*page == '\0') {
  40.282 +			if (end_reached) {
  40.283 +				end_reached = 0;
  40.284 +				continue;
  40.285 +			}
  40.286 +		}
  40.287 +		if (page == buf) {
  40.288 +			begin_reached = 1;
  40.289 +			return;
  40.290 +		}
  40.291 +		page--;
  40.292 +		do {
  40.293 +			if (page == buf) {
  40.294 +				begin_reached = 1;
  40.295 +				return;
  40.296 +			}
  40.297 +			page--;
  40.298 +		} while (*page != '\n');
  40.299 +		page++;
  40.300 +	}
  40.301 +}
  40.302 +
  40.303 +/*
  40.304 + * Print a new page of text. Called by dialog_textbox().
  40.305 + */
  40.306 +static void print_page(WINDOW * win, int height, int width)
  40.307 +{
  40.308 +	int i, passed_end = 0;
  40.309 +
  40.310 +	page_length = 0;
  40.311 +	for (i = 0; i < height; i++) {
  40.312 +		print_line(win, i, width);
  40.313 +		if (!passed_end)
  40.314 +			page_length++;
  40.315 +		if (end_reached && !passed_end)
  40.316 +			passed_end = 1;
  40.317 +	}
  40.318 +	wnoutrefresh(win);
  40.319 +}
  40.320 +
  40.321 +/*
  40.322 + * Print a new line of text. Called by dialog_textbox() and print_page().
  40.323 + */
  40.324 +static void print_line(WINDOW * win, int row, int width)
  40.325 +{
  40.326 +	int y, x;
  40.327 +	char *line;
  40.328 +
  40.329 +	line = get_line();
  40.330 +	line += MIN(strlen(line), hscroll);	/* Scroll horizontally */
  40.331 +	wmove(win, row, 0);	/* move cursor to correct line */
  40.332 +	waddch(win, ' ');
  40.333 +	waddnstr(win, line, MIN(strlen(line), width - 2));
  40.334 +
  40.335 +	getyx(win, y, x);
  40.336 +	/* Clear 'residue' of previous line */
  40.337 +#if OLD_NCURSES
  40.338 +	{
  40.339 +		int i;
  40.340 +		for (i = 0; i < width - x; i++)
  40.341 +			waddch(win, ' ');
  40.342 +	}
  40.343 +#else
  40.344 +	wclrtoeol(win);
  40.345 +#endif
  40.346 +}
  40.347 +
  40.348 +/*
  40.349 + * Return current line of text. Called by dialog_textbox() and print_line().
  40.350 + * 'page' should point to start of current line before calling, and will be
  40.351 + * updated to point to start of next line.
  40.352 + */
  40.353 +static char *get_line(void)
  40.354 +{
  40.355 +	int i = 0;
  40.356 +	static char line[MAX_LEN + 1];
  40.357 +
  40.358 +	end_reached = 0;
  40.359 +	while (*page != '\n') {
  40.360 +		if (*page == '\0') {
  40.361 +			if (!end_reached) {
  40.362 +				end_reached = 1;
  40.363 +				break;
  40.364 +			}
  40.365 +		} else if (i < MAX_LEN)
  40.366 +			line[i++] = *(page++);
  40.367 +		else {
  40.368 +			/* Truncate lines longer than MAX_LEN characters */
  40.369 +			if (i == MAX_LEN)
  40.370 +				line[i++] = '\0';
  40.371 +			page++;
  40.372 +		}
  40.373 +	}
  40.374 +	if (i <= MAX_LEN)
  40.375 +		line[i] = '\0';
  40.376 +	if (!end_reached)
  40.377 +		page++;		/* move pass '\n' */
  40.378 +
  40.379 +	return line;
  40.380 +}
  40.381 +
  40.382 +/*
  40.383 + * Print current position
  40.384 + */
  40.385 +static void print_position(WINDOW * win)
  40.386 +{
  40.387 +	int percent;
  40.388 +
  40.389 +	wattrset(win, dlg.position_indicator.atr);
  40.390 +	wbkgdset(win, dlg.position_indicator.atr & A_COLOR);
  40.391 +	percent = (page - buf) * 100 / strlen(buf);
  40.392 +	wmove(win, getmaxy(win) - 3, getmaxx(win) - 9);
  40.393 +	wprintw(win, "(%3d%%)", percent);
  40.394 +}
    41.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    41.2 +++ b/kconfig/lxdialog/util.c	Sat Feb 24 11:00:05 2007 +0000
    41.3 @@ -0,0 +1,642 @@
    41.4 +/*
    41.5 + *  util.c
    41.6 + *
    41.7 + *  ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
    41.8 + *  MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com)
    41.9 + *
   41.10 + *  This program is free software; you can redistribute it and/or
   41.11 + *  modify it under the terms of the GNU General Public License
   41.12 + *  as published by the Free Software Foundation; either version 2
   41.13 + *  of the License, or (at your option) any later version.
   41.14 + *
   41.15 + *  This program is distributed in the hope that it will be useful,
   41.16 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   41.17 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   41.18 + *  GNU General Public License for more details.
   41.19 + *
   41.20 + *  You should have received a copy of the GNU General Public License
   41.21 + *  along with this program; if not, write to the Free Software
   41.22 + *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   41.23 + */
   41.24 +
   41.25 +#include "dialog.h"
   41.26 +
   41.27 +struct dialog_info dlg;
   41.28 +
   41.29 +static void set_mono_theme(void)
   41.30 +{
   41.31 +	dlg.screen.atr = A_NORMAL;
   41.32 +	dlg.shadow.atr = A_NORMAL;
   41.33 +	dlg.dialog.atr = A_NORMAL;
   41.34 +	dlg.title.atr = A_BOLD;
   41.35 +	dlg.border.atr = A_NORMAL;
   41.36 +	dlg.button_active.atr = A_REVERSE;
   41.37 +	dlg.button_inactive.atr = A_DIM;
   41.38 +	dlg.button_key_active.atr = A_REVERSE;
   41.39 +	dlg.button_key_inactive.atr = A_BOLD;
   41.40 +	dlg.button_label_active.atr = A_REVERSE;
   41.41 +	dlg.button_label_inactive.atr = A_NORMAL;
   41.42 +	dlg.inputbox.atr = A_NORMAL;
   41.43 +	dlg.inputbox_border.atr = A_NORMAL;
   41.44 +	dlg.searchbox.atr = A_NORMAL;
   41.45 +	dlg.searchbox_title.atr = A_BOLD;
   41.46 +	dlg.searchbox_border.atr = A_NORMAL;
   41.47 +	dlg.position_indicator.atr = A_BOLD;
   41.48 +	dlg.menubox.atr = A_NORMAL;
   41.49 +	dlg.menubox_border.atr = A_NORMAL;
   41.50 +	dlg.item.atr = A_NORMAL;
   41.51 +	dlg.item_selected.atr = A_REVERSE;
   41.52 +	dlg.tag.atr = A_BOLD;
   41.53 +	dlg.tag_selected.atr = A_REVERSE;
   41.54 +	dlg.tag_key.atr = A_BOLD;
   41.55 +	dlg.tag_key_selected.atr = A_REVERSE;
   41.56 +	dlg.check.atr = A_BOLD;
   41.57 +	dlg.check_selected.atr = A_REVERSE;
   41.58 +	dlg.uarrow.atr = A_BOLD;
   41.59 +	dlg.darrow.atr = A_BOLD;
   41.60 +}
   41.61 +
   41.62 +#define DLG_COLOR(dialog, f, b, h) \
   41.63 +do {                               \
   41.64 +	dlg.dialog.fg = (f);       \
   41.65 +	dlg.dialog.bg = (b);       \
   41.66 +	dlg.dialog.hl = (h);       \
   41.67 +} while (0)
   41.68 +
   41.69 +static void set_classic_theme(void)
   41.70 +{
   41.71 +	DLG_COLOR(screen,                COLOR_CYAN,   COLOR_BLUE,   true);
   41.72 +	DLG_COLOR(shadow,                COLOR_BLACK,  COLOR_BLACK,  true);
   41.73 +	DLG_COLOR(dialog,                COLOR_BLACK,  COLOR_WHITE,  false);
   41.74 +	DLG_COLOR(title,                 COLOR_YELLOW, COLOR_WHITE,  true);
   41.75 +	DLG_COLOR(border,                COLOR_WHITE,  COLOR_WHITE,  true);
   41.76 +	DLG_COLOR(button_active,         COLOR_WHITE,  COLOR_BLUE,   true);
   41.77 +	DLG_COLOR(button_inactive,       COLOR_BLACK,  COLOR_WHITE,  false);
   41.78 +	DLG_COLOR(button_key_active,     COLOR_WHITE,  COLOR_BLUE,   true);
   41.79 +	DLG_COLOR(button_key_inactive,   COLOR_RED,    COLOR_WHITE,  false);
   41.80 +	DLG_COLOR(button_label_active,   COLOR_YELLOW, COLOR_BLUE,   true);
   41.81 +	DLG_COLOR(button_label_inactive, COLOR_BLACK,  COLOR_WHITE,  true);
   41.82 +	DLG_COLOR(inputbox,              COLOR_BLACK,  COLOR_WHITE,  false);
   41.83 +	DLG_COLOR(inputbox_border,       COLOR_BLACK,  COLOR_WHITE,  false);
   41.84 +	DLG_COLOR(searchbox,             COLOR_BLACK,  COLOR_WHITE,  false);
   41.85 +	DLG_COLOR(searchbox_title,       COLOR_YELLOW, COLOR_WHITE,  true);
   41.86 +	DLG_COLOR(searchbox_border,      COLOR_WHITE,  COLOR_WHITE,  true);
   41.87 +	DLG_COLOR(position_indicator,    COLOR_YELLOW, COLOR_WHITE,  true);
   41.88 +	DLG_COLOR(menubox,               COLOR_BLACK,  COLOR_WHITE,  false);
   41.89 +	DLG_COLOR(menubox_border,        COLOR_WHITE,  COLOR_WHITE,  true);
   41.90 +	DLG_COLOR(item,                  COLOR_BLACK,  COLOR_WHITE,  false);
   41.91 +	DLG_COLOR(item_selected,         COLOR_WHITE,  COLOR_BLUE,   true);
   41.92 +	DLG_COLOR(tag,                   COLOR_YELLOW, COLOR_WHITE,  true);
   41.93 +	DLG_COLOR(tag_selected,          COLOR_YELLOW, COLOR_BLUE,   true);
   41.94 +	DLG_COLOR(tag_key,               COLOR_YELLOW, COLOR_WHITE,  true);
   41.95 +	DLG_COLOR(tag_key_selected,      COLOR_YELLOW, COLOR_BLUE,   true);
   41.96 +	DLG_COLOR(check,                 COLOR_BLACK,  COLOR_WHITE,  false);
   41.97 +	DLG_COLOR(check_selected,        COLOR_WHITE,  COLOR_BLUE,   true);
   41.98 +	DLG_COLOR(uarrow,                COLOR_GREEN,  COLOR_WHITE,  true);
   41.99 +	DLG_COLOR(darrow,                COLOR_GREEN,  COLOR_WHITE,  true);
  41.100 +}
  41.101 +
  41.102 +static void set_blackbg_theme(void)
  41.103 +{
  41.104 +	DLG_COLOR(screen, COLOR_RED,   COLOR_BLACK, true);
  41.105 +	DLG_COLOR(shadow, COLOR_BLACK, COLOR_BLACK, false);
  41.106 +	DLG_COLOR(dialog, COLOR_WHITE, COLOR_BLACK, false);
  41.107 +	DLG_COLOR(title,  COLOR_RED,   COLOR_BLACK, false);
  41.108 +	DLG_COLOR(border, COLOR_BLACK, COLOR_BLACK, true);
  41.109 +
  41.110 +	DLG_COLOR(button_active,         COLOR_YELLOW, COLOR_RED,   false);
  41.111 +	DLG_COLOR(button_inactive,       COLOR_YELLOW, COLOR_BLACK, false);
  41.112 +	DLG_COLOR(button_key_active,     COLOR_YELLOW, COLOR_RED,   true);
  41.113 +	DLG_COLOR(button_key_inactive,   COLOR_RED,    COLOR_BLACK, false);
  41.114 +	DLG_COLOR(button_label_active,   COLOR_WHITE,  COLOR_RED,   false);
  41.115 +	DLG_COLOR(button_label_inactive, COLOR_BLACK,  COLOR_BLACK, true);
  41.116 +
  41.117 +	DLG_COLOR(inputbox,         COLOR_YELLOW, COLOR_BLACK, false);
  41.118 +	DLG_COLOR(inputbox_border,  COLOR_YELLOW, COLOR_BLACK, false);
  41.119 +
  41.120 +	DLG_COLOR(searchbox,        COLOR_YELLOW, COLOR_BLACK, false);
  41.121 +	DLG_COLOR(searchbox_title,  COLOR_YELLOW, COLOR_BLACK, true);
  41.122 +	DLG_COLOR(searchbox_border, COLOR_BLACK,  COLOR_BLACK, true);
  41.123 +
  41.124 +	DLG_COLOR(position_indicator, COLOR_RED, COLOR_BLACK,  false);
  41.125 +
  41.126 +	DLG_COLOR(menubox,          COLOR_YELLOW, COLOR_BLACK, false);
  41.127 +	DLG_COLOR(menubox_border,   COLOR_BLACK,  COLOR_BLACK, true);
  41.128 +
  41.129 +	DLG_COLOR(item,             COLOR_WHITE, COLOR_BLACK, false);
  41.130 +	DLG_COLOR(item_selected,    COLOR_WHITE, COLOR_RED,   false);
  41.131 +
  41.132 +	DLG_COLOR(tag,              COLOR_RED,    COLOR_BLACK, false);
  41.133 +	DLG_COLOR(tag_selected,     COLOR_YELLOW, COLOR_RED,   true);
  41.134 +	DLG_COLOR(tag_key,          COLOR_RED,    COLOR_BLACK, false);
  41.135 +	DLG_COLOR(tag_key_selected, COLOR_YELLOW, COLOR_RED,   true);
  41.136 +
  41.137 +	DLG_COLOR(check,            COLOR_YELLOW, COLOR_BLACK, false);
  41.138 +	DLG_COLOR(check_selected,   COLOR_YELLOW, COLOR_RED,   true);
  41.139 +
  41.140 +	DLG_COLOR(uarrow, COLOR_RED, COLOR_BLACK, false);
  41.141 +	DLG_COLOR(darrow, COLOR_RED, COLOR_BLACK, false);
  41.142 +}
  41.143 +
  41.144 +static void set_bluetitle_theme(void)
  41.145 +{
  41.146 +	set_classic_theme();
  41.147 +	DLG_COLOR(title,               COLOR_BLUE,   COLOR_WHITE, true);
  41.148 +	DLG_COLOR(button_key_active,   COLOR_YELLOW, COLOR_BLUE,  true);
  41.149 +	DLG_COLOR(button_label_active, COLOR_WHITE,  COLOR_BLUE,  true);
  41.150 +	DLG_COLOR(searchbox_title,     COLOR_BLUE,   COLOR_WHITE, true);
  41.151 +	DLG_COLOR(position_indicator,  COLOR_BLUE,   COLOR_WHITE, true);
  41.152 +	DLG_COLOR(tag,                 COLOR_BLUE,   COLOR_WHITE, true);
  41.153 +	DLG_COLOR(tag_key,             COLOR_BLUE,   COLOR_WHITE, true);
  41.154 +
  41.155 +}
  41.156 +
  41.157 +/*
  41.158 + * Select color theme
  41.159 + */
  41.160 +static int set_theme(const char *theme)
  41.161 +{
  41.162 +	int use_color = 1;
  41.163 +	if (!theme)
  41.164 +		set_bluetitle_theme();
  41.165 +	else if (strcmp(theme, "classic") == 0)
  41.166 +		set_classic_theme();
  41.167 +	else if (strcmp(theme, "bluetitle") == 0)
  41.168 +		set_bluetitle_theme();
  41.169 +	else if (strcmp(theme, "blackbg") == 0)
  41.170 +		set_blackbg_theme();
  41.171 +	else if (strcmp(theme, "mono") == 0)
  41.172 +		use_color = 0;
  41.173 +
  41.174 +	return use_color;
  41.175 +}
  41.176 +
  41.177 +static void init_one_color(struct dialog_color *color)
  41.178 +{
  41.179 +	static int pair = 0;
  41.180 +
  41.181 +	pair++;
  41.182 +	init_pair(pair, color->fg, color->bg);
  41.183 +	if (color->hl)
  41.184 +		color->atr = A_BOLD | COLOR_PAIR(pair);
  41.185 +	else
  41.186 +		color->atr = COLOR_PAIR(pair);
  41.187 +}
  41.188 +
  41.189 +static void init_dialog_colors(void)
  41.190 +{
  41.191 +	init_one_color(&dlg.screen);
  41.192 +	init_one_color(&dlg.shadow);
  41.193 +	init_one_color(&dlg.dialog);
  41.194 +	init_one_color(&dlg.title);
  41.195 +	init_one_color(&dlg.border);
  41.196 +	init_one_color(&dlg.button_active);
  41.197 +	init_one_color(&dlg.button_inactive);
  41.198 +	init_one_color(&dlg.button_key_active);
  41.199 +	init_one_color(&dlg.button_key_inactive);
  41.200 +	init_one_color(&dlg.button_label_active);
  41.201 +	init_one_color(&dlg.button_label_inactive);
  41.202 +	init_one_color(&dlg.inputbox);
  41.203 +	init_one_color(&dlg.inputbox_border);
  41.204 +	init_one_color(&dlg.searchbox);
  41.205 +	init_one_color(&dlg.searchbox_title);
  41.206 +	init_one_color(&dlg.searchbox_border);
  41.207 +	init_one_color(&dlg.position_indicator);
  41.208 +	init_one_color(&dlg.menubox);
  41.209 +	init_one_color(&dlg.menubox_border);
  41.210 +	init_one_color(&dlg.item);
  41.211 +	init_one_color(&dlg.item_selected);
  41.212 +	init_one_color(&dlg.tag);
  41.213 +	init_one_color(&dlg.tag_selected);
  41.214 +	init_one_color(&dlg.tag_key);
  41.215 +	init_one_color(&dlg.tag_key_selected);
  41.216 +	init_one_color(&dlg.check);
  41.217 +	init_one_color(&dlg.check_selected);
  41.218 +	init_one_color(&dlg.uarrow);
  41.219 +	init_one_color(&dlg.darrow);
  41.220 +}
  41.221 +
  41.222 +/*
  41.223 + * Setup for color display
  41.224 + */
  41.225 +static void color_setup(const char *theme)
  41.226 +{
  41.227 +	if (set_theme(theme)) {
  41.228 +		if (has_colors()) {	/* Terminal supports color? */
  41.229 +			start_color();
  41.230 +			init_dialog_colors();
  41.231 +		}
  41.232 +	}
  41.233 +	else
  41.234 +	{
  41.235 +		set_mono_theme();
  41.236 +	}
  41.237 +}
  41.238 +
  41.239 +/*
  41.240 + * Set window to attribute 'attr'
  41.241 + */
  41.242 +void attr_clear(WINDOW * win, int height, int width, chtype attr)
  41.243 +{
  41.244 +	int i, j;
  41.245 +
  41.246 +	wattrset(win, attr);
  41.247 +	for (i = 0; i < height; i++) {
  41.248 +		wmove(win, i, 0);
  41.249 +		for (j = 0; j < width; j++)
  41.250 +			waddch(win, ' ');
  41.251 +	}
  41.252 +	touchwin(win);
  41.253 +}
  41.254 +
  41.255 +void dialog_clear(void)
  41.256 +{
  41.257 +	attr_clear(stdscr, LINES, COLS, dlg.screen.atr);
  41.258 +	/* Display background title if it exists ... - SLH */
  41.259 +	if (dlg.backtitle != NULL) {
  41.260 +		int i;
  41.261 +
  41.262 +		wattrset(stdscr, dlg.screen.atr);
  41.263 +		mvwaddstr(stdscr, 0, 1, (char *)dlg.backtitle);
  41.264 +		wmove(stdscr, 1, 1);
  41.265 +		for (i = 1; i < COLS - 1; i++)
  41.266 +			waddch(stdscr, ACS_HLINE);
  41.267 +	}
  41.268 +	wnoutrefresh(stdscr);
  41.269 +}
  41.270 +
  41.271 +/*
  41.272 + * Do some initialization for dialog
  41.273 + */
  41.274 +void init_dialog(const char *backtitle)
  41.275 +{
  41.276 +	dlg.backtitle = backtitle;
  41.277 +	color_setup(getenv("MENUCONFIG_COLOR"));
  41.278 +}
  41.279 +
  41.280 +void reset_dialog(void)
  41.281 +{
  41.282 +	initscr();		/* Init curses */
  41.283 +	keypad(stdscr, TRUE);
  41.284 +	cbreak();
  41.285 +	noecho();
  41.286 +	dialog_clear();
  41.287 +}
  41.288 +
  41.289 +/*
  41.290 + * End using dialog functions.
  41.291 + */
  41.292 +void end_dialog(void)
  41.293 +{
  41.294 +	endwin();
  41.295 +}
  41.296 +
  41.297 +/* Print the title of the dialog. Center the title and truncate
  41.298 + * tile if wider than dialog (- 2 chars).
  41.299 + **/
  41.300 +void print_title(WINDOW *dialog, const char *title, int width)
  41.301 +{
  41.302 +	if (title) {
  41.303 +		int tlen = MIN(width - 2, strlen(title));
  41.304 +		wattrset(dialog, dlg.title.atr);
  41.305 +		mvwaddch(dialog, 0, (width - tlen) / 2 - 1, ' ');
  41.306 +		mvwaddnstr(dialog, 0, (width - tlen)/2, title, tlen);
  41.307 +		waddch(dialog, ' ');
  41.308 +	}
  41.309 +}
  41.310 +
  41.311 +/*
  41.312 + * Print a string of text in a window, automatically wrap around to the
  41.313 + * next line if the string is too long to fit on one line. Newline
  41.314 + * characters '\n' are replaced by spaces.  We start on a new line
  41.315 + * if there is no room for at least 4 nonblanks following a double-space.
  41.316 + */
  41.317 +void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x)
  41.318 +{
  41.319 +	int newl, cur_x, cur_y;
  41.320 +	int i, prompt_len, room, wlen;
  41.321 +	char tempstr[MAX_LEN + 1], *word, *sp, *sp2;
  41.322 +
  41.323 +	strcpy(tempstr, prompt);
  41.324 +
  41.325 +	prompt_len = strlen(tempstr);
  41.326 +
  41.327 +	/*
  41.328 +	 * Remove newlines
  41.329 +	 */
  41.330 +	for (i = 0; i < prompt_len; i++) {
  41.331 +		if (tempstr[i] == '\n')
  41.332 +			tempstr[i] = ' ';
  41.333 +	}
  41.334 +
  41.335 +	if (prompt_len <= width - x * 2) {	/* If prompt is short */
  41.336 +		wmove(win, y, (width - prompt_len) / 2);
  41.337 +		waddstr(win, tempstr);
  41.338 +	} else {
  41.339 +		cur_x = x;
  41.340 +		cur_y = y;
  41.341 +		newl = 1;
  41.342 +		word = tempstr;
  41.343 +		while (word && *word) {
  41.344 +			sp = index(word, ' ');
  41.345 +			if (sp)
  41.346 +				*sp++ = 0;
  41.347 +
  41.348 +			/* Wrap to next line if either the word does not fit,
  41.349 +			   or it is the first word of a new sentence, and it is
  41.350 +			   short, and the next word does not fit. */
  41.351 +			room = width - cur_x;
  41.352 +			wlen = strlen(word);
  41.353 +			if (wlen > room ||
  41.354 +			    (newl && wlen < 4 && sp
  41.355 +			     && wlen + 1 + strlen(sp) > room
  41.356 +			     && (!(sp2 = index(sp, ' '))
  41.357 +				 || wlen + 1 + (sp2 - sp) > room))) {
  41.358 +				cur_y++;
  41.359 +				cur_x = x;
  41.360 +			}
  41.361 +			wmove(win, cur_y, cur_x);
  41.362 +			waddstr(win, word);
  41.363 +			getyx(win, cur_y, cur_x);
  41.364 +			cur_x++;
  41.365 +			if (sp && *sp == ' ') {
  41.366 +				cur_x++;	/* double space */
  41.367 +				while (*++sp == ' ') ;
  41.368 +				newl = 1;
  41.369 +			} else
  41.370 +				newl = 0;
  41.371 +			word = sp;
  41.372 +		}
  41.373 +	}
  41.374 +}
  41.375 +
  41.376 +/*
  41.377 + * Print a button
  41.378 + */
  41.379 +void print_button(WINDOW * win, const char *label, int y, int x, int selected)
  41.380 +{
  41.381 +	int i, temp;
  41.382 +
  41.383 +	wmove(win, y, x);
  41.384 +	wattrset(win, selected ? dlg.button_active.atr
  41.385 +		 : dlg.button_inactive.atr);
  41.386 +	waddstr(win, "<");
  41.387 +	temp = strspn(label, " ");
  41.388 +	label += temp;
  41.389 +	wattrset(win, selected ? dlg.button_label_active.atr
  41.390 +		 : dlg.button_label_inactive.atr);
  41.391 +	for (i = 0; i < temp; i++)
  41.392 +		waddch(win, ' ');
  41.393 +	wattrset(win, selected ? dlg.button_key_active.atr
  41.394 +		 : dlg.button_key_inactive.atr);
  41.395 +	waddch(win, label[0]);
  41.396 +	wattrset(win, selected ? dlg.button_label_active.atr
  41.397 +		 : dlg.button_label_inactive.atr);
  41.398 +	waddstr(win, (char *)label + 1);
  41.399 +	wattrset(win, selected ? dlg.button_active.atr
  41.400 +		 : dlg.button_inactive.atr);
  41.401 +	waddstr(win, ">");
  41.402 +	wmove(win, y, x + temp + 1);
  41.403 +}
  41.404 +
  41.405 +/*
  41.406 + * Draw a rectangular box with line drawing characters
  41.407 + */
  41.408 +void
  41.409 +draw_box(WINDOW * win, int y, int x, int height, int width,
  41.410 +	 chtype box, chtype border)
  41.411 +{
  41.412 +	int i, j;
  41.413 +
  41.414 +	wattrset(win, 0);
  41.415 +	for (i = 0; i < height; i++) {
  41.416 +		wmove(win, y + i, x);
  41.417 +		for (j = 0; j < width; j++)
  41.418 +			if (!i && !j)
  41.419 +				waddch(win, border | ACS_ULCORNER);
  41.420 +			else if (i == height - 1 && !j)
  41.421 +				waddch(win, border | ACS_LLCORNER);
  41.422 +			else if (!i && j == width - 1)
  41.423 +				waddch(win, box | ACS_URCORNER);
  41.424 +			else if (i == height - 1 && j == width - 1)
  41.425 +				waddch(win, box | ACS_LRCORNER);
  41.426 +			else if (!i)
  41.427 +				waddch(win, border | ACS_HLINE);
  41.428 +			else if (i == height - 1)
  41.429 +				waddch(win, box | ACS_HLINE);
  41.430 +			else if (!j)
  41.431 +				waddch(win, border | ACS_VLINE);
  41.432 +			else if (j == width - 1)
  41.433 +				waddch(win, box | ACS_VLINE);
  41.434 +			else
  41.435 +				waddch(win, box | ' ');
  41.436 +	}
  41.437 +}
  41.438 +
  41.439 +/*
  41.440 + * Draw shadows along the right and bottom edge to give a more 3D look
  41.441 + * to the boxes
  41.442 + */
  41.443 +void draw_shadow(WINDOW * win, int y, int x, int height, int width)
  41.444 +{
  41.445 +	int i;
  41.446 +
  41.447 +	if (has_colors()) {	/* Whether terminal supports color? */
  41.448 +		wattrset(win, dlg.shadow.atr);
  41.449 +		wmove(win, y + height, x + 2);
  41.450 +		for (i = 0; i < width; i++)
  41.451 +			waddch(win, winch(win) & A_CHARTEXT);
  41.452 +		for (i = y + 1; i < y + height + 1; i++) {
  41.453 +			wmove(win, i, x + width);
  41.454 +			waddch(win, winch(win) & A_CHARTEXT);
  41.455 +			waddch(win, winch(win) & A_CHARTEXT);
  41.456 +		}
  41.457 +		wnoutrefresh(win);
  41.458 +	}
  41.459 +}
  41.460 +
  41.461 +/*
  41.462 + *  Return the position of the first alphabetic character in a string.
  41.463 + */
  41.464 +int first_alpha(const char *string, const char *exempt)
  41.465 +{
  41.466 +	int i, in_paren = 0, c;
  41.467 +
  41.468 +	for (i = 0; i < strlen(string); i++) {
  41.469 +		c = tolower(string[i]);
  41.470 +
  41.471 +		if (strchr("<[(", c))
  41.472 +			++in_paren;
  41.473 +		if (strchr(">])", c) && in_paren > 0)
  41.474 +			--in_paren;
  41.475 +
  41.476 +		if ((!in_paren) && isalpha(c) && strchr(exempt, c) == 0)
  41.477 +			return i;
  41.478 +	}
  41.479 +
  41.480 +	return 0;
  41.481 +}
  41.482 +
  41.483 +/*
  41.484 + * ncurses uses ESC to detect escaped char sequences. This resutl in
  41.485 + * a small timeout before ESC is actually delivered to the application.
  41.486 + * lxdialog suggest <ESC> <ESC> which is correctly translated to two
  41.487 + * times esc. But then we need to ignore the second esc to avoid stepping
  41.488 + * out one menu too much. Filter away all escaped key sequences since
  41.489 + * keypad(FALSE) turn off ncurses support for escape sequences - and thats
  41.490 + * needed to make notimeout() do as expected.
  41.491 + */
  41.492 +int on_key_esc(WINDOW *win)
  41.493 +{
  41.494 +	int key;
  41.495 +	int key2;
  41.496 +	int key3;
  41.497 +
  41.498 +	nodelay(win, TRUE);
  41.499 +	keypad(win, FALSE);
  41.500 +	key = wgetch(win);
  41.501 +	key2 = wgetch(win);
  41.502 +	do {
  41.503 +		key3 = wgetch(win);
  41.504 +	} while (key3 != ERR);
  41.505 +	nodelay(win, FALSE);
  41.506 +	keypad(win, TRUE);
  41.507 +	if (key == KEY_ESC && key2 == ERR)
  41.508 +		return KEY_ESC;
  41.509 +	else if (key != ERR && key != KEY_ESC && key2 == ERR)
  41.510 +		ungetch(key);
  41.511 +
  41.512 +	return -1;
  41.513 +}
  41.514 +
  41.515 +/* redraw screen in new size */
  41.516 +int on_key_resize(void)
  41.517 +{
  41.518 +	dialog_clear();
  41.519 +	return KEY_RESIZE;
  41.520 +}
  41.521 +
  41.522 +struct dialog_list *item_cur;
  41.523 +struct dialog_list item_nil;
  41.524 +struct dialog_list *item_head;
  41.525 +
  41.526 +void item_reset(void)
  41.527 +{
  41.528 +	struct dialog_list *p, *next;
  41.529 +
  41.530 +	for (p = item_head; p; p = next) {
  41.531 +		next = p->next;
  41.532 +		free(p);
  41.533 +	}
  41.534 +	item_head = NULL;
  41.535 +	item_cur = &item_nil;
  41.536 +}
  41.537 +
  41.538 +void item_make(const char *fmt, ...)
  41.539 +{
  41.540 +	va_list ap;
  41.541 +	struct dialog_list *p = malloc(sizeof(*p));
  41.542 +
  41.543 +	if (item_head)
  41.544 +		item_cur->next = p;
  41.545 +	else
  41.546 +		item_head = p;
  41.547 +	item_cur = p;
  41.548 +	memset(p, 0, sizeof(*p));
  41.549 +
  41.550 +	va_start(ap, fmt);
  41.551 +	vsnprintf(item_cur->node.str, sizeof(item_cur->node.str), fmt, ap);
  41.552 +	va_end(ap);
  41.553 +}
  41.554 +
  41.555 +void item_add_str(const char *fmt, ...)
  41.556 +{
  41.557 +	va_list ap;
  41.558 +        size_t avail;
  41.559 +
  41.560 +	avail = sizeof(item_cur->node.str) - strlen(item_cur->node.str);
  41.561 +
  41.562 +	va_start(ap, fmt);
  41.563 +	vsnprintf(item_cur->node.str + strlen(item_cur->node.str),
  41.564 +		  avail, fmt, ap);
  41.565 +	item_cur->node.str[sizeof(item_cur->node.str) - 1] = '\0';
  41.566 +	va_end(ap);
  41.567 +}
  41.568 +
  41.569 +void item_set_tag(char tag)
  41.570 +{
  41.571 +	item_cur->node.tag = tag;
  41.572 +}
  41.573 +void item_set_data(void *ptr)
  41.574 +{
  41.575 +	item_cur->node.data = ptr;
  41.576 +}
  41.577 +
  41.578 +void item_set_selected(int val)
  41.579 +{
  41.580 +	item_cur->node.selected = val;
  41.581 +}
  41.582 +
  41.583 +int item_activate_selected(void)
  41.584 +{
  41.585 +	item_foreach()
  41.586 +		if (item_is_selected())
  41.587 +			return 1;
  41.588 +	return 0;
  41.589 +}
  41.590 +
  41.591 +void *item_data(void)
  41.592 +{
  41.593 +	return item_cur->node.data;
  41.594 +}
  41.595 +
  41.596 +char item_tag(void)
  41.597 +{
  41.598 +	return item_cur->node.tag;
  41.599 +}
  41.600 +
  41.601 +int item_count(void)
  41.602 +{
  41.603 +	int n = 0;
  41.604 +	struct dialog_list *p;
  41.605 +
  41.606 +	for (p = item_head; p; p = p->next)
  41.607 +		n++;
  41.608 +	return n;
  41.609 +}
  41.610 +
  41.611 +void item_set(int n)
  41.612 +{
  41.613 +	int i = 0;
  41.614 +	item_foreach()
  41.615 +		if (i++ == n)
  41.616 +			return;
  41.617 +}
  41.618 +
  41.619 +int item_n(void)
  41.620 +{
  41.621 +	int n = 0;
  41.622 +	struct dialog_list *p;
  41.623 +
  41.624 +	for (p = item_head; p; p = p->next) {
  41.625 +		if (p == item_cur)
  41.626 +			return n;
  41.627 +		n++;
  41.628 +	}
  41.629 +	return 0;
  41.630 +}
  41.631 +
  41.632 +const char *item_str(void)
  41.633 +{
  41.634 +	return item_cur->node.str;
  41.635 +}
  41.636 +
  41.637 +int item_is_selected(void)
  41.638 +{
  41.639 +	return (item_cur->node.selected != 0);
  41.640 +}
  41.641 +
  41.642 +int item_is_tag(char tag)
  41.643 +{
  41.644 +	return (item_cur->node.tag == tag);
  41.645 +}
    42.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    42.2 +++ b/kconfig/lxdialog/yesno.c	Sat Feb 24 11:00:05 2007 +0000
    42.3 @@ -0,0 +1,114 @@
    42.4 +/*
    42.5 + *  yesno.c -- implements the yes/no box
    42.6 + *
    42.7 + *  ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
    42.8 + *  MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com)
    42.9 + *
   42.10 + *  This program is free software; you can redistribute it and/or
   42.11 + *  modify it under the terms of the GNU General Public License
   42.12 + *  as published by the Free Software Foundation; either version 2
   42.13 + *  of the License, or (at your option) any later version.
   42.14 + *
   42.15 + *  This program is distributed in the hope that it will be useful,
   42.16 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   42.17 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   42.18 + *  GNU General Public License for more details.
   42.19 + *
   42.20 + *  You should have received a copy of the GNU General Public License
   42.21 + *  along with this program; if not, write to the Free Software
   42.22 + *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   42.23 + */
   42.24 +
   42.25 +#include "dialog.h"
   42.26 +
   42.27 +/*
   42.28 + * Display termination buttons
   42.29 + */
   42.30 +static void print_buttons(WINDOW * dialog, int height, int width, int selected)
   42.31 +{
   42.32 +	int x = width / 2 - 10;
   42.33 +	int y = height - 2;
   42.34 +
   42.35 +	print_button(dialog, " Yes ", y, x, selected == 0);
   42.36 +	print_button(dialog, "  No  ", y, x + 13, selected == 1);
   42.37 +
   42.38 +	wmove(dialog, y, x + 1 + 13 * selected);
   42.39 +	wrefresh(dialog);
   42.40 +}
   42.41 +
   42.42 +/*
   42.43 + * Display a dialog box with two buttons - Yes and No
   42.44 + */
   42.45 +int dialog_yesno(const char *title, const char *prompt, int height, int width)
   42.46 +{
   42.47 +	int i, x, y, key = 0, button = 0;
   42.48 +	WINDOW *dialog;
   42.49 +
   42.50 +do_resize:
   42.51 +	if (getmaxy(stdscr) < (height + 4))
   42.52 +		return -ERRDISPLAYTOOSMALL;
   42.53 +	if (getmaxx(stdscr) < (width + 4))
   42.54 +		return -ERRDISPLAYTOOSMALL;
   42.55 +
   42.56 +	/* center dialog box on screen */
   42.57 +	x = (COLS - width) / 2;
   42.58 +	y = (LINES - height) / 2;
   42.59 +
   42.60 +	draw_shadow(stdscr, y, x, height, width);
   42.61 +
   42.62 +	dialog = newwin(height, width, y, x);
   42.63 +	keypad(dialog, TRUE);
   42.64 +
   42.65 +	draw_box(dialog, 0, 0, height, width,
   42.66 +		 dlg.dialog.atr, dlg.border.atr);
   42.67 +	wattrset(dialog, dlg.border.atr);
   42.68 +	mvwaddch(dialog, height - 3, 0, ACS_LTEE);
   42.69 +	for (i = 0; i < width - 2; i++)
   42.70 +		waddch(dialog, ACS_HLINE);
   42.71 +	wattrset(dialog, dlg.dialog.atr);
   42.72 +	waddch(dialog, ACS_RTEE);
   42.73 +
   42.74 +	print_title(dialog, title, width);
   42.75 +
   42.76 +	wattrset(dialog, dlg.dialog.atr);
   42.77 +	print_autowrap(dialog, prompt, width - 2, 1, 3);
   42.78 +
   42.79 +	print_buttons(dialog, height, width, 0);
   42.80 +
   42.81 +	while (key != KEY_ESC) {
   42.82 +		key = wgetch(dialog);
   42.83 +		switch (key) {
   42.84 +		case 'Y':
   42.85 +		case 'y':
   42.86 +			delwin(dialog);
   42.87 +			return 0;
   42.88 +		case 'N':
   42.89 +		case 'n':
   42.90 +			delwin(dialog);
   42.91 +			return 1;
   42.92 +
   42.93 +		case TAB:
   42.94 +		case KEY_LEFT:
   42.95 +		case KEY_RIGHT:
   42.96 +			button = ((key == KEY_LEFT ? --button : ++button) < 0) ? 1 : (button > 1 ? 0 : button);
   42.97 +
   42.98 +			print_buttons(dialog, height, width, button);
   42.99 +			wrefresh(dialog);
  42.100 +			break;
  42.101 +		case ' ':
  42.102 +		case '\n':
  42.103 +			delwin(dialog);
  42.104 +			return button;
  42.105 +		case KEY_ESC:
  42.106 +			key = on_key_esc(dialog);
  42.107 +			break;
  42.108 +		case KEY_RESIZE:
  42.109 +			delwin(dialog);
  42.110 +			on_key_resize();
  42.111 +			goto do_resize;
  42.112 +		}
  42.113 +	}
  42.114 +
  42.115 +	delwin(dialog);
  42.116 +	return key;		/* ESC pressed */
  42.117 +}
    43.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    43.2 +++ b/kconfig/mconf.c	Sat Feb 24 11:00:05 2007 +0000
    43.3 @@ -0,0 +1,919 @@
    43.4 +/*
    43.5 + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
    43.6 + * Released under the terms of the GNU GPL v2.0.
    43.7 + *
    43.8 + * Introduced single menu mode (show all sub-menus in one large tree).
    43.9 + * 2002-11-06 Petr Baudis <pasky@ucw.cz>
   43.10 + *
   43.11 + * i18n, 2005, Arnaldo Carvalho de Melo <acme@conectiva.com.br>
   43.12 + */
   43.13 +
   43.14 +#include <sys/ioctl.h>
   43.15 +#include <sys/wait.h>
   43.16 +#include <ctype.h>
   43.17 +#include <errno.h>
   43.18 +#include <fcntl.h>
   43.19 +#include <limits.h>
   43.20 +#include <signal.h>
   43.21 +#include <stdarg.h>
   43.22 +#include <stdlib.h>
   43.23 +#include <string.h>
   43.24 +#include <termios.h>
   43.25 +#include <unistd.h>
   43.26 +#include <locale.h>
   43.27 +
   43.28 +#define LKC_DIRECT_LINK
   43.29 +#include "lkc.h"
   43.30 +#include "lxdialog/dialog.h"
   43.31 +
   43.32 +static char menu_backtitle[128];
   43.33 +static const char mconf_readme[] = N_(
   43.34 +"Overview\n"
   43.35 +"--------\n"
   43.36 +"Some kernel features may be built directly into the kernel.\n"
   43.37 +"Some may be made into loadable runtime modules.  Some features\n"
   43.38 +"may be completely removed altogether.  There are also certain\n"
   43.39 +"kernel parameters which are not really features, but must be\n"
   43.40 +"entered in as decimal or hexadecimal numbers or possibly text.\n"
   43.41 +"\n"
   43.42 +"Menu items beginning with [*], <M> or [ ] represent features\n"
   43.43 +"configured to be built in, modularized or removed respectively.\n"
   43.44 +"Pointed brackets <> represent module capable features.\n"
   43.45 +"\n"
   43.46 +"To change any of these features, highlight it with the cursor\n"
   43.47 +"keys and press <Y> to build it in, <M> to make it a module or\n"
   43.48 +"<N> to removed it.  You may also press the <Space Bar> to cycle\n"
   43.49 +"through the available options (ie. Y->N->M->Y).\n"
   43.50 +"\n"
   43.51 +"Some additional keyboard hints:\n"
   43.52 +"\n"
   43.53 +"Menus\n"
   43.54 +"----------\n"
   43.55 +"o  Use the Up/Down arrow keys (cursor keys) to highlight the item\n"
   43.56 +"   you wish to change or submenu wish to select and press <Enter>.\n"
   43.57 +"   Submenus are designated by \"--->\".\n"
   43.58 +"\n"
   43.59 +"   Shortcut: Press the option's highlighted letter (hotkey).\n"
   43.60 +"             Pressing a hotkey more than once will sequence\n"
   43.61 +"             through all visible items which use that hotkey.\n"
   43.62 +"\n"
   43.63 +"   You may also use the <PAGE UP> and <PAGE DOWN> keys to scroll\n"
   43.64 +"   unseen options into view.\n"
   43.65 +"\n"
   43.66 +"o  To exit a menu use the cursor keys to highlight the <Exit> button\n"
   43.67 +"   and press <ENTER>.\n"
   43.68 +"\n"
   43.69 +"   Shortcut: Press <ESC><ESC> or <E> or <X> if there is no hotkey\n"
   43.70 +"             using those letters.  You may press a single <ESC>, but\n"
   43.71 +"             there is a delayed response which you may find annoying.\n"
   43.72 +"\n"
   43.73 +"   Also, the <TAB> and cursor keys will cycle between <Select>,\n"
   43.74 +"   <Exit> and <Help>\n"
   43.75 +"\n"
   43.76 +"o  To get help with an item, use the cursor keys to highlight <Help>\n"
   43.77 +"   and Press <ENTER>.\n"
   43.78 +"\n"
   43.79 +"   Shortcut: Press <H> or <?>.\n"
   43.80 +"\n"
   43.81 +"\n"
   43.82 +"Radiolists  (Choice lists)\n"
   43.83 +"-----------\n"
   43.84 +"o  Use the cursor keys to select the option you wish to set and press\n"
   43.85 +"   <S> or the <SPACE BAR>.\n"
   43.86 +"\n"
   43.87 +"   Shortcut: Press the first letter of the option you wish to set then\n"
   43.88 +"             press <S> or <SPACE BAR>.\n"
   43.89 +"\n"
   43.90 +"o  To see available help for the item, use the cursor keys to highlight\n"
   43.91 +"   <Help> and Press <ENTER>.\n"
   43.92 +"\n"
   43.93 +"   Shortcut: Press <H> or <?>.\n"
   43.94 +"\n"
   43.95 +"   Also, the <TAB> and cursor keys will cycle between <Select> and\n"
   43.96 +"   <Help>\n"
   43.97 +"\n"
   43.98 +"\n"
   43.99 +"Data Entry\n"
  43.100 +"-----------\n"
  43.101 +"o  Enter the requested information and press <ENTER>\n"
  43.102 +"   If you are entering hexadecimal values, it is not necessary to\n"
  43.103 +"   add the '0x' prefix to the entry.\n"
  43.104 +"\n"
  43.105 +"o  For help, use the <TAB> or cursor keys to highlight the help option\n"
  43.106 +"   and press <ENTER>.  You can try <TAB><H> as well.\n"
  43.107 +"\n"
  43.108 +"\n"
  43.109 +"Text Box    (Help Window)\n"
  43.110 +"--------\n"
  43.111 +"o  Use the cursor keys to scroll up/down/left/right.  The VI editor\n"
  43.112 +"   keys h,j,k,l function here as do <SPACE BAR> and <B> for those\n"
  43.113 +"   who are familiar with less and lynx.\n"
  43.114 +"\n"
  43.115 +"o  Press <E>, <X>, <Enter> or <Esc><Esc> to exit.\n"
  43.116 +"\n"
  43.117 +"\n"
  43.118 +"Alternate Configuration Files\n"
  43.119 +"-----------------------------\n"
  43.120 +"Menuconfig supports the use of alternate configuration files for\n"
  43.121 +"those who, for various reasons, find it necessary to switch\n"
  43.122 +"between different kernel configurations.\n"
  43.123 +"\n"
  43.124 +"At the end of the main menu you will find two options.  One is\n"
  43.125 +"for saving the current configuration to a file of your choosing.\n"
  43.126 +"The other option is for loading a previously saved alternate\n"
  43.127 +"configuration.\n"
  43.128 +"\n"
  43.129 +"Even if you don't use alternate configuration files, but you\n"
  43.130 +"find during a Menuconfig session that you have completely messed\n"
  43.131 +"up your settings, you may use the \"Load Alternate...\" option to\n"
  43.132 +"restore your previously saved settings from \".config\" without\n"
  43.133 +"restarting Menuconfig.\n"
  43.134 +"\n"
  43.135 +"Other information\n"
  43.136 +"-----------------\n"
  43.137 +"If you use Menuconfig in an XTERM window make sure you have your\n"
  43.138 +"$TERM variable set to point to a xterm definition which supports color.\n"
  43.139 +"Otherwise, Menuconfig will look rather bad.  Menuconfig will not\n"
  43.140 +"display correctly in a RXVT window because rxvt displays only one\n"
  43.141 +"intensity of color, bright.\n"
  43.142 +"\n"
  43.143 +"Menuconfig will display larger menus on screens or xterms which are\n"
  43.144 +"set to display more than the standard 25 row by 80 column geometry.\n"
  43.145 +"In order for this to work, the \"stty size\" command must be able to\n"
  43.146 +"display the screen's current row and column geometry.  I STRONGLY\n"
  43.147 +"RECOMMEND that you make sure you do NOT have the shell variables\n"
  43.148 +"LINES and COLUMNS exported into your environment.  Some distributions\n"
  43.149 +"export those variables via /etc/profile.  Some ncurses programs can\n"
  43.150 +"become confused when those variables (LINES & COLUMNS) don't reflect\n"
  43.151 +"the true screen size.\n"
  43.152 +"\n"
  43.153 +"Optional personality available\n"
  43.154 +"------------------------------\n"
  43.155 +"If you prefer to have all of the kernel options listed in a single\n"
  43.156 +"menu, rather than the default multimenu hierarchy, run the menuconfig\n"
  43.157 +"with MENUCONFIG_MODE environment variable set to single_menu. Example:\n"
  43.158 +"\n"
  43.159 +"make MENUCONFIG_MODE=single_menu menuconfig\n"
  43.160 +"\n"
  43.161 +"<Enter> will then unroll the appropriate category, or enfold it if it\n"
  43.162 +"is already unrolled.\n"
  43.163 +"\n"
  43.164 +"Note that this mode can eventually be a little more CPU expensive\n"
  43.165 +"(especially with a larger number of unrolled categories) than the\n"
  43.166 +"default mode.\n"
  43.167 +"\n"
  43.168 +"Different color themes available\n"
  43.169 +"--------------------------------\n"
  43.170 +"It is possible to select different color themes using the variable\n"
  43.171 +"MENUCONFIG_COLOR. To select a theme use:\n"
  43.172 +"\n"
  43.173 +"make MENUCONFIG_COLOR=<theme> menuconfig\n"
  43.174 +"\n"
  43.175 +"Available themes are\n"
  43.176 +" mono       => selects colors suitable for monochrome displays\n"
  43.177 +" blackbg    => selects a color scheme with black background\n"
  43.178 +" classic    => theme with blue background. The classic look\n"
  43.179 +" bluetitle  => a LCD friendly version of classic. (default)\n"
  43.180 +"\n"),
  43.181 +menu_instructions[] = N_(
  43.182 +	"Arrow keys navigate the menu.  "
  43.183 +	"<Enter> selects submenus --->.  "
  43.184 +	"Highlighted letters are hotkeys.  "
  43.185 +	"Pressing <Y> includes, <N> excludes, <M> modularizes features.  "
  43.186 +	"Press <Esc><Esc> to exit, <?> for Help, </> for Search.  "
  43.187 +	"Legend: [*] built-in  [ ] excluded  <M> module  < > module capable"),
  43.188 +radiolist_instructions[] = N_(
  43.189 +	"Use the arrow keys to navigate this window or "
  43.190 +	"press the hotkey of the item you wish to select "
  43.191 +	"followed by the <SPACE BAR>. "
  43.192 +	"Press <?> for additional information about this option."),
  43.193 +inputbox_instructions_int[] = N_(
  43.194 +	"Please enter a decimal value. "
  43.195 +	"Fractions will not be accepted.  "
  43.196 +	"Use the <TAB> key to move from the input field to the buttons below it."),
  43.197 +inputbox_instructions_hex[] = N_(
  43.198 +	"Please enter a hexadecimal value. "
  43.199 +	"Use the <TAB> key to move from the input field to the buttons below it."),
  43.200 +inputbox_instructions_string[] = N_(
  43.201 +	"Please enter a string value. "
  43.202 +	"Use the <TAB> key to move from the input field to the buttons below it."),
  43.203 +setmod_text[] = N_(
  43.204 +	"This feature depends on another which has been configured as a module.\n"
  43.205 +	"As a result, this feature will be built as a module."),
  43.206 +nohelp_text[] = N_(
  43.207 +	"There is no help available for this kernel option.\n"),
  43.208 +load_config_text[] = N_(
  43.209 +	"Enter the name of the configuration file you wish to load.  "
  43.210 +	"Accept the name shown to restore the configuration you "
  43.211 +	"last retrieved.  Leave blank to abort."),
  43.212 +load_config_help[] = N_(
  43.213 +	"\n"
  43.214 +	"For various reasons, one may wish to keep several different kernel\n"
  43.215 +	"configurations available on a single machine.\n"
  43.216 +	"\n"
  43.217 +	"If you have saved a previous configuration in a file other than the\n"
  43.218 +	"kernel's default, entering the name of the file here will allow you\n"
  43.219 +	"to modify that configuration.\n"
  43.220 +	"\n"
  43.221 +	"If you are uncertain, then you have probably never used alternate\n"
  43.222 +	"configuration files.  You should therefor leave this blank to abort.\n"),
  43.223 +save_config_text[] = N_(
  43.224 +	"Enter a filename to which this configuration should be saved "
  43.225 +	"as an alternate.  Leave blank to abort."),
  43.226 +save_config_help[] = N_(
  43.227 +	"\n"
  43.228 +	"For various reasons, one may wish to keep different kernel\n"
  43.229 +	"configurations available on a single machine.\n"
  43.230 +	"\n"
  43.231 +	"Entering a file name here will allow you to later retrieve, modify\n"
  43.232 +	"and use the current configuration as an alternate to whatever\n"
  43.233 +	"configuration options you have selected at that time.\n"
  43.234 +	"\n"
  43.235 +	"If you are uncertain what all this means then you should probably\n"
  43.236 +	"leave this blank.\n"),
  43.237 +search_help[] = N_(
  43.238 +	"\n"
  43.239 +	"Search for CT_ symbols and display their relations.\n"
  43.240 +	"Regular expressions are allowed.\n"
  43.241 +	"Example: search for \"^FOO\"\n"
  43.242 +	"Result:\n"
  43.243 +	"-----------------------------------------------------------------\n"
  43.244 +	"Symbol: FOO [=m]\n"
  43.245 +	"Prompt: Foo bus is used to drive the bar HW\n"
  43.246 +	"Defined at drivers/pci/Kconfig:47\n"
  43.247 +	"Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n"
  43.248 +	"Location:\n"
  43.249 +	"  -> Bus options (PCI, PCMCIA, EISA, MCA, ISA)\n"
  43.250 +	"    -> PCI support (PCI [=y])\n"
  43.251 +	"      -> PCI access mode (<choice> [=y])\n"
  43.252 +	"Selects: LIBCRC32\n"
  43.253 +	"Selected by: BAR\n"
  43.254 +	"-----------------------------------------------------------------\n"
  43.255 +	"o The line 'Prompt:' shows the text used in the menu structure for\n"
  43.256 +	"  this CT_ symbol\n"
  43.257 +	"o The 'Defined at' line tell at what file / line number the symbol\n"
  43.258 +	"  is defined\n"
  43.259 +	"o The 'Depends on:' line tell what symbols needs to be defined for\n"
  43.260 +	"  this symbol to be visible in the menu (selectable)\n"
  43.261 +	"o The 'Location:' lines tell where in the menu structure this symbol\n"
  43.262 +	"  is located\n"
  43.263 +	"    A location followed by a [=y] indicate that this is a selectable\n"
  43.264 +	"    menu item - and current value is displayed inside brackets.\n"
  43.265 +	"o The 'Selects:' line tell what symbol will be automatically\n"
  43.266 +	"  selected if this symbol is selected (y or m)\n"
  43.267 +	"o The 'Selected by' line tell what symbol has selected this symbol\n"
  43.268 +	"\n"
  43.269 +	"Only relevant lines are shown.\n"
  43.270 +	"\n\n"
  43.271 +	"Search examples:\n"
  43.272 +	"Examples: USB	=> find all CT_ symbols containing USB\n"
  43.273 +	"          ^USB => find all CT_ symbols starting with USB\n"
  43.274 +	"          USB$ => find all CT_ symbols ending with USB\n"
  43.275 +	"\n");
  43.276 +
  43.277 +static char filename[PATH_MAX+1] = ".config";
  43.278 +static int indent;
  43.279 +static struct termios ios_org;
  43.280 +static int rows = 0, cols = 0;
  43.281 +static struct menu *current_menu;
  43.282 +static int child_count;
  43.283 +static int single_menu_mode;
  43.284 +
  43.285 +static void conf(struct menu *menu);
  43.286 +static void conf_choice(struct menu *menu);
  43.287 +static void conf_string(struct menu *menu);
  43.288 +static void conf_load(void);
  43.289 +static void conf_save(void);
  43.290 +static void show_textbox(const char *title, const char *text, int r, int c);
  43.291 +static void show_helptext(const char *title, const char *text);
  43.292 +static void show_help(struct menu *menu);
  43.293 +
  43.294 +static void init_wsize(void)
  43.295 +{
  43.296 +	struct winsize ws;
  43.297 +	char *env;
  43.298 +
  43.299 +	if (!ioctl(STDIN_FILENO, TIOCGWINSZ, &ws)) {
  43.300 +		rows = ws.ws_row;
  43.301 +		cols = ws.ws_col;
  43.302 +	}
  43.303 +
  43.304 +	if (!rows) {
  43.305 +		env = getenv("LINES");
  43.306 +		if (env)
  43.307 +			rows = atoi(env);
  43.308 +		if (!rows)
  43.309 +			rows = 24;
  43.310 +	}
  43.311 +	if (!cols) {
  43.312 +		env = getenv("COLUMNS");
  43.313 +		if (env)
  43.314 +			cols = atoi(env);
  43.315 +		if (!cols)
  43.316 +			cols = 80;
  43.317 +	}
  43.318 +
  43.319 +	if (rows < 19 || cols < 80) {
  43.320 +		fprintf(stderr, N_("Your display is too small to run Menuconfig!\n"));
  43.321 +		fprintf(stderr, N_("It must be at least 19 lines by 80 columns.\n"));
  43.322 +		exit(1);
  43.323 +	}
  43.324 +
  43.325 +	rows -= 4;
  43.326 +	cols -= 5;
  43.327 +}
  43.328 +
  43.329 +static void get_prompt_str(struct gstr *r, struct property *prop)
  43.330 +{
  43.331 +	int i, j;
  43.332 +	struct menu *submenu[8], *menu;
  43.333 +
  43.334 +	str_printf(r, "Prompt: %s\n", prop->text);
  43.335 +	str_printf(r, "  Defined at %s:%d\n", prop->menu->file->name,
  43.336 +		prop->menu->lineno);
  43.337 +	if (!expr_is_yes(prop->visible.expr)) {
  43.338 +		str_append(r, "  Depends on: ");
  43.339 +		expr_gstr_print(prop->visible.expr, r);
  43.340 +		str_append(r, "\n");
  43.341 +	}
  43.342 +	menu = prop->menu->parent;
  43.343 +	for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent)
  43.344 +		submenu[i++] = menu;
  43.345 +	if (i > 0) {
  43.346 +		str_printf(r, "  Location:\n");
  43.347 +		for (j = 4; --i >= 0; j += 2) {
  43.348 +			menu = submenu[i];
  43.349 +			str_printf(r, "%*c-> %s", j, ' ', menu_get_prompt(menu));
  43.350 +			if (menu->sym) {
  43.351 +				str_printf(r, " (%s [=%s])", menu->sym->name ?
  43.352 +					menu->sym->name : "<choice>",
  43.353 +					sym_get_string_value(menu->sym));
  43.354 +			}
  43.355 +			str_append(r, "\n");
  43.356 +		}
  43.357 +	}
  43.358 +}
  43.359 +
  43.360 +static void get_symbol_str(struct gstr *r, struct symbol *sym)
  43.361 +{
  43.362 +	bool hit;
  43.363 +	struct property *prop;
  43.364 +
  43.365 +	str_printf(r, "Symbol: %s [=%s]\n", sym->name,
  43.366 +	                               sym_get_string_value(sym));
  43.367 +	for_all_prompts(sym, prop)
  43.368 +		get_prompt_str(r, prop);
  43.369 +	hit = false;
  43.370 +	for_all_properties(sym, prop, P_SELECT) {
  43.371 +		if (!hit) {
  43.372 +			str_append(r, "  Selects: ");
  43.373 +			hit = true;
  43.374 +		} else
  43.375 +			str_printf(r, " && ");
  43.376 +		expr_gstr_print(prop->expr, r);
  43.377 +	}
  43.378 +	if (hit)
  43.379 +		str_append(r, "\n");
  43.380 +	if (sym->rev_dep.expr) {
  43.381 +		str_append(r, "  Selected by: ");
  43.382 +		expr_gstr_print(sym->rev_dep.expr, r);
  43.383 +		str_append(r, "\n");
  43.384 +	}
  43.385 +	str_append(r, "\n\n");
  43.386 +}
  43.387 +
  43.388 +static struct gstr get_relations_str(struct symbol **sym_arr)
  43.389 +{
  43.390 +	struct symbol *sym;
  43.391 +	struct gstr res = str_new();
  43.392 +	int i;
  43.393 +
  43.394 +	for (i = 0; sym_arr && (sym = sym_arr[i]); i++)
  43.395 +		get_symbol_str(&res, sym);
  43.396 +	if (!i)
  43.397 +		str_append(&res, "No matches found.\n");
  43.398 +	return res;
  43.399 +}
  43.400 +
  43.401 +static void search_conf(void)
  43.402 +{
  43.403 +	struct symbol **sym_arr;
  43.404 +	struct gstr res;
  43.405 +	int dres;
  43.406 +again:
  43.407 +	dialog_clear();
  43.408 +	dres = dialog_inputbox(_("Search Configuration Parameter"),
  43.409 +			      _("Enter CT_ (sub)string to search for (omit CT_)"),
  43.410 +			      10, 75, "");
  43.411 +	switch (dres) {
  43.412 +	case 0:
  43.413 +		break;
  43.414 +	case 1:
  43.415 +		show_helptext(_("Search Configuration"), search_help);
  43.416 +		goto again;
  43.417 +	default:
  43.418 +		return;
  43.419 +	}
  43.420 +
  43.421 +	sym_arr = sym_re_search(dialog_input_result);
  43.422 +	res = get_relations_str(sym_arr);
  43.423 +	free(sym_arr);
  43.424 +	show_textbox(_("Search Results"), str_get(&res), 0, 0);
  43.425 +	str_free(&res);
  43.426 +}
  43.427 +
  43.428 +static void build_conf(struct menu *menu)
  43.429 +{
  43.430 +	struct symbol *sym;
  43.431 +	struct property *prop;
  43.432 +	struct menu *child;
  43.433 +	int type, tmp, doint = 2;
  43.434 +	tristate val;
  43.435 +	char ch;
  43.436 +
  43.437 +	if (!menu_is_visible(menu))
  43.438 +		return;
  43.439 +
  43.440 +	sym = menu->sym;
  43.441 +	prop = menu->prompt;
  43.442 +	if (!sym) {
  43.443 +		if (prop && menu != current_menu) {
  43.444 +			const char *prompt = menu_get_prompt(menu);
  43.445 +			switch (prop->type) {
  43.446 +			case P_MENU:
  43.447 +				child_count++;
  43.448 +				if (single_menu_mode) {
  43.449 +					item_make("%s%*c%s",
  43.450 +						  menu->data ? "-->" : "++>",
  43.451 +						  indent + 1, ' ', prompt);
  43.452 +				} else
  43.453 +					item_make("   %*c%s  --->", indent + 1, ' ', prompt);
  43.454 +
  43.455 +				item_set_tag('m');
  43.456 +				item_set_data(menu);
  43.457 +				if (single_menu_mode && menu->data)
  43.458 +					goto conf_childs;
  43.459 +				return;
  43.460 +			default:
  43.461 +				if (prompt) {
  43.462 +					child_count++;
  43.463 +					item_make("---%*c%s", indent + 1, ' ', prompt);
  43.464 +					item_set_tag(':');
  43.465 +					item_set_data(menu);
  43.466 +				}
  43.467 +			}
  43.468 +		} else
  43.469 +			doint = 0;
  43.470 +		goto conf_childs;
  43.471 +	}
  43.472 +
  43.473 +	type = sym_get_type(sym);
  43.474 +	if (sym_is_choice(sym)) {
  43.475 +		struct symbol *def_sym = sym_get_choice_value(sym);
  43.476 +		struct menu *def_menu = NULL;
  43.477 +
  43.478 +		child_count++;
  43.479 +		for (child = menu->list; child; child = child->next) {
  43.480 +			if (menu_is_visible(child) && child->sym == def_sym)
  43.481 +				def_menu = child;
  43.482 +		}
  43.483 +
  43.484 +		val = sym_get_tristate_value(sym);
  43.485 +		if (sym_is_changable(sym)) {
  43.486 +			switch (type) {
  43.487 +			case S_BOOLEAN:
  43.488 +				item_make("[%c]", val == no ? ' ' : '*');
  43.489 +				break;
  43.490 +			case S_TRISTATE:
  43.491 +				switch (val) {
  43.492 +				case yes: ch = '*'; break;
  43.493 +				case mod: ch = 'M'; break;
  43.494 +				default:  ch = ' '; break;
  43.495 +				}
  43.496 +				item_make("<%c>", ch);
  43.497 +				break;
  43.498 +			}
  43.499 +			item_set_tag('t');
  43.500 +			item_set_data(menu);
  43.501 +		} else {
  43.502 +			item_make("   ");
  43.503 +			item_set_tag(def_menu ? 't' : ':');
  43.504 +			item_set_data(menu);
  43.505 +		}
  43.506 +
  43.507 +		item_add_str("%*c%s", indent + 1, ' ', menu_get_prompt(menu));
  43.508 +		if (val == yes) {
  43.509 +			if (def_menu) {
  43.510 +				item_add_str(" (%s)", menu_get_prompt(def_menu));
  43.511 +				item_add_str("  --->");
  43.512 +				if (def_menu->list) {
  43.513 +					indent += 2;
  43.514 +					build_conf(def_menu);
  43.515 +					indent -= 2;
  43.516 +				}
  43.517 +			}
  43.518 +			return;
  43.519 +		}
  43.520 +	} else {
  43.521 +		if (menu == current_menu) {
  43.522 +			item_make("---%*c%s", indent + 1, ' ', menu_get_prompt(menu));
  43.523 +			item_set_tag(':');
  43.524 +			item_set_data(menu);
  43.525 +			goto conf_childs;
  43.526 +		}
  43.527 +		child_count++;
  43.528 +		val = sym_get_tristate_value(sym);
  43.529 +		if (sym_is_choice_value(sym) && val == yes) {
  43.530 +			item_make("   ");
  43.531 +			item_set_tag(':');
  43.532 +			item_set_data(menu);
  43.533 +		} else {
  43.534 +			switch (type) {
  43.535 +			case S_BOOLEAN:
  43.536 +				if (sym_is_changable(sym))
  43.537 +					item_make("[%c]", val == no ? ' ' : '*');
  43.538 +				else
  43.539 +					item_make("---");
  43.540 +				item_set_tag('t');
  43.541 +				item_set_data(menu);
  43.542 +				break;
  43.543 +			case S_TRISTATE:
  43.544 +				switch (val) {
  43.545 +				case yes: ch = '*'; break;
  43.546 +				case mod: ch = 'M'; break;
  43.547 +				default:  ch = ' '; break;
  43.548 +				}
  43.549 +				if (sym_is_changable(sym))
  43.550 +					item_make("<%c>", ch);
  43.551 +				else
  43.552 +					item_make("---");
  43.553 +				item_set_tag('t');
  43.554 +				item_set_data(menu);
  43.555 +				break;
  43.556 +			default:
  43.557 +				tmp = 2 + strlen(sym_get_string_value(sym)); /* () = 2 */
  43.558 +				item_make("(%s)", sym_get_string_value(sym));
  43.559 +				tmp = indent - tmp + 4;
  43.560 +				if (tmp < 0)
  43.561 +					tmp = 0;
  43.562 +				item_add_str("%*c%s%s", tmp, ' ', menu_get_prompt(menu),
  43.563 +					     (sym_has_value(sym) || !sym_is_changable(sym)) ?
  43.564 +					     "" : " (NEW)");
  43.565 +				item_set_tag('s');
  43.566 +				item_set_data(menu);
  43.567 +				goto conf_childs;
  43.568 +			}
  43.569 +		}
  43.570 +		item_add_str("%*c%s%s", indent + 1, ' ', menu_get_prompt(menu),
  43.571 +			  (sym_has_value(sym) || !sym_is_changable(sym)) ?
  43.572 +			  "" : " (NEW)");
  43.573 +		if (menu->prompt->type == P_MENU) {
  43.574 +			item_add_str("  --->");
  43.575 +			return;
  43.576 +		}
  43.577 +	}
  43.578 +
  43.579 +conf_childs:
  43.580 +	indent += doint;
  43.581 +	for (child = menu->list; child; child = child->next)
  43.582 +		build_conf(child);
  43.583 +	indent -= doint;
  43.584 +}
  43.585 +
  43.586 +static void conf(struct menu *menu)
  43.587 +{
  43.588 +	struct menu *submenu;
  43.589 +	const char *prompt = menu_get_prompt(menu);
  43.590 +	struct symbol *sym;
  43.591 +	struct menu *active_menu = NULL;
  43.592 +	int res;
  43.593 +	int s_scroll = 0;
  43.594 +
  43.595 +	while (1) {
  43.596 +		item_reset();
  43.597 +		current_menu = menu;
  43.598 +		build_conf(menu);
  43.599 +		if (!child_count)
  43.600 +			break;
  43.601 +		if (menu == &rootmenu) {
  43.602 +			item_make("--- ");
  43.603 +			item_set_tag(':');
  43.604 +			item_make(_("    Load an Alternate Configuration File"));
  43.605 +			item_set_tag('L');
  43.606 +			item_make(_("    Save an Alternate Configuration File"));
  43.607 +			item_set_tag('S');
  43.608 +		}
  43.609 +		dialog_clear();
  43.610 +		res = dialog_menu(prompt ? prompt : _("Main Menu"),
  43.611 +				  _(menu_instructions),
  43.612 +				  active_menu, &s_scroll);
  43.613 +		if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL)
  43.614 +			break;
  43.615 +		if (!item_activate_selected())
  43.616 +			continue;
  43.617 +		if (!item_tag())
  43.618 +			continue;
  43.619 +
  43.620 +		submenu = item_data();
  43.621 +		active_menu = item_data();
  43.622 +		if (submenu)
  43.623 +			sym = submenu->sym;
  43.624 +		else
  43.625 +			sym = NULL;
  43.626 +
  43.627 +		switch (res) {
  43.628 +		case 0:
  43.629 +			switch (item_tag()) {
  43.630 +			case 'm':
  43.631 +				if (single_menu_mode)
  43.632 +					submenu->data = (void *) (long) !submenu->data;
  43.633 +				else
  43.634 +					conf(submenu);
  43.635 +				break;
  43.636 +			case 't':
  43.637 +				if (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)
  43.638 +					conf_choice(submenu);
  43.639 +				else if (submenu->prompt->type == P_MENU)
  43.640 +					conf(submenu);
  43.641 +				break;
  43.642 +			case 's':
  43.643 +				conf_string(submenu);
  43.644 +				break;
  43.645 +			case 'L':
  43.646 +				conf_load();
  43.647 +				break;
  43.648 +			case 'S':
  43.649 +				conf_save();
  43.650 +				break;
  43.651 +			}
  43.652 +			break;
  43.653 +		case 2:
  43.654 +			if (sym)
  43.655 +				show_help(submenu);
  43.656 +			else
  43.657 +				show_helptext("README", _(mconf_readme));
  43.658 +			break;
  43.659 +		case 3:
  43.660 +			if (item_is_tag('t')) {
  43.661 +				if (sym_set_tristate_value(sym, yes))
  43.662 +					break;
  43.663 +				if (sym_set_tristate_value(sym, mod))
  43.664 +					show_textbox(NULL, setmod_text, 6, 74);
  43.665 +			}
  43.666 +			break;
  43.667 +		case 4:
  43.668 +			if (item_is_tag('t'))
  43.669 +				sym_set_tristate_value(sym, no);
  43.670 +			break;
  43.671 +		case 5:
  43.672 +			if (item_is_tag('t'))
  43.673 +				sym_set_tristate_value(sym, mod);
  43.674 +			break;
  43.675 +		case 6:
  43.676 +			if (item_is_tag('t'))
  43.677 +				sym_toggle_tristate_value(sym);
  43.678 +			else if (item_is_tag('m'))
  43.679 +				conf(submenu);
  43.680 +			break;
  43.681 +		case 7:
  43.682 +			search_conf();
  43.683 +			break;
  43.684 +		}
  43.685 +	}
  43.686 +}
  43.687 +
  43.688 +static void show_textbox(const char *title, const char *text, int r, int c)
  43.689 +{
  43.690 +	dialog_clear();
  43.691 +	dialog_textbox(title, text, r, c);
  43.692 +}
  43.693 +
  43.694 +static void show_helptext(const char *title, const char *text)
  43.695 +{
  43.696 +	show_textbox(title, text, 0, 0);
  43.697 +}
  43.698 +
  43.699 +static void show_help(struct menu *menu)
  43.700 +{
  43.701 +	struct gstr help = str_new();
  43.702 +	struct symbol *sym = menu->sym;
  43.703 +
  43.704 +	if (sym->help)
  43.705 +	{
  43.706 +		if (sym->name) {
  43.707 +			str_printf(&help, "CT_%s:\n\n", sym->name);
  43.708 +			str_append(&help, _(sym->help));
  43.709 +			str_append(&help, "\n");
  43.710 +		}
  43.711 +	} else {
  43.712 +		str_append(&help, nohelp_text);
  43.713 +	}
  43.714 +	get_symbol_str(&help, sym);
  43.715 +	show_helptext(menu_get_prompt(menu), str_get(&help));
  43.716 +	str_free(&help);
  43.717 +}
  43.718 +
  43.719 +static void conf_choice(struct menu *menu)
  43.720 +{
  43.721 +	const char *prompt = menu_get_prompt(menu);
  43.722 +	struct menu *child;
  43.723 +	struct symbol *active;
  43.724 +
  43.725 +	active = sym_get_choice_value(menu->sym);
  43.726 +	while (1) {
  43.727 +		int res;
  43.728 +		int selected;
  43.729 +		item_reset();
  43.730 +
  43.731 +		current_menu = menu;
  43.732 +		for (child = menu->list; child; child = child->next) {
  43.733 +			if (!menu_is_visible(child))
  43.734 +				continue;
  43.735 +			item_make("%s", menu_get_prompt(child));
  43.736 +			item_set_data(child);
  43.737 +			if (child->sym == active)
  43.738 +				item_set_selected(1);
  43.739 +			if (child->sym == sym_get_choice_value(menu->sym))
  43.740 +				item_set_tag('X');
  43.741 +		}
  43.742 +		dialog_clear();
  43.743 +		res = dialog_checklist(prompt ? prompt : _("Main Menu"),
  43.744 +					_(radiolist_instructions),
  43.745 +					 15, 70, 6);
  43.746 +		selected = item_activate_selected();
  43.747 +		switch (res) {
  43.748 +		case 0:
  43.749 +			if (selected) {
  43.750 +				child = item_data();
  43.751 +				sym_set_tristate_value(child->sym, yes);
  43.752 +			}
  43.753 +			return;
  43.754 +		case 1:
  43.755 +			if (selected) {
  43.756 +				child = item_data();
  43.757 +				show_help(child);
  43.758 +				active = child->sym;
  43.759 +			} else
  43.760 +				show_help(menu);
  43.761 +			break;
  43.762 +		case KEY_ESC:
  43.763 +			return;
  43.764 +		case -ERRDISPLAYTOOSMALL:
  43.765 +			return;
  43.766 +		}
  43.767 +	}
  43.768 +}
  43.769 +
  43.770 +static void conf_string(struct menu *menu)
  43.771 +{
  43.772 +	const char *prompt = menu_get_prompt(menu);
  43.773 +
  43.774 +	while (1) {
  43.775 +		int res;
  43.776 +		char *heading;
  43.777 +
  43.778 +		switch (sym_get_type(menu->sym)) {
  43.779 +		case S_INT:
  43.780 +			heading = _(inputbox_instructions_int);
  43.781 +			break;
  43.782 +		case S_HEX:
  43.783 +			heading = _(inputbox_instructions_hex);
  43.784 +			break;
  43.785 +		case S_STRING:
  43.786 +			heading = _(inputbox_instructions_string);
  43.787 +			break;
  43.788 +		default:
  43.789 +			heading = "Internal mconf error!";
  43.790 +		}
  43.791 +		dialog_clear();
  43.792 +		res = dialog_inputbox(prompt ? prompt : _("Main Menu"),
  43.793 +				      heading, 10, 75,
  43.794 +				      sym_get_string_value(menu->sym));
  43.795 +		switch (res) {
  43.796 +		case 0:
  43.797 +			if (sym_set_string_value(menu->sym, dialog_input_result))
  43.798 +				return;
  43.799 +			show_textbox(NULL, _("You have made an invalid entry."), 5, 43);
  43.800 +			break;
  43.801 +		case 1:
  43.802 +			show_help(menu);
  43.803 +			break;
  43.804 +		case KEY_ESC:
  43.805 +			return;
  43.806 +		}
  43.807 +	}
  43.808 +}
  43.809 +
  43.810 +static void conf_load(void)
  43.811 +{
  43.812 +
  43.813 +	while (1) {
  43.814 +		int res;
  43.815 +		dialog_clear();
  43.816 +		res = dialog_inputbox(NULL, load_config_text,
  43.817 +				      11, 55, filename);
  43.818 +		switch(res) {
  43.819 +		case 0:
  43.820 +			if (!dialog_input_result[0])
  43.821 +				return;
  43.822 +			if (!conf_read(dialog_input_result))
  43.823 +				return;
  43.824 +			show_textbox(NULL, _("File does not exist!"), 5, 38);
  43.825 +			break;
  43.826 +		case 1:
  43.827 +			show_helptext(_("Load Alternate Configuration"), load_config_help);
  43.828 +			break;
  43.829 +		case KEY_ESC:
  43.830 +			return;
  43.831 +		}
  43.832 +	}
  43.833 +}
  43.834 +
  43.835 +static void conf_save(void)
  43.836 +{
  43.837 +	while (1) {
  43.838 +		int res;
  43.839 +		dialog_clear();
  43.840 +		res = dialog_inputbox(NULL, save_config_text,
  43.841 +				      11, 55, filename);
  43.842 +		switch(res) {
  43.843 +		case 0:
  43.844 +			if (!dialog_input_result[0])
  43.845 +				return;
  43.846 +			if (!conf_write(dialog_input_result))
  43.847 +				return;
  43.848 +			show_textbox(NULL, _("Can't create file!  Probably a nonexistent directory."), 5, 60);
  43.849 +			break;
  43.850 +		case 1:
  43.851 +			show_helptext(_("Save Alternate Configuration"), save_config_help);
  43.852 +			break;
  43.853 +		case KEY_ESC:
  43.854 +			return;
  43.855 +		}
  43.856 +	}
  43.857 +}
  43.858 +
  43.859 +static void conf_cleanup(void)
  43.860 +{
  43.861 +	tcsetattr(1, TCSAFLUSH, &ios_org);
  43.862 +}
  43.863 +
  43.864 +int main(int ac, char **av)
  43.865 +{
  43.866 +	struct symbol *sym;
  43.867 +	char *mode;
  43.868 +	int res;
  43.869 +
  43.870 +	setlocale(LC_ALL, "");
  43.871 +	bindtextdomain(PACKAGE, LOCALEDIR);
  43.872 +	textdomain(PACKAGE);
  43.873 +
  43.874 +	conf_parse(av[1] ? av[1] : "");
  43.875 +	conf_read(NULL);
  43.876 +
  43.877 +	sym = sym_lookup("PROJECTVERSION", 0);
  43.878 +	sym_calc_value(sym);
  43.879 +	sprintf(menu_backtitle, _(PROJECT_NAME" v%s Configuration"),
  43.880 +		sym_get_string_value(sym));
  43.881 +
  43.882 +	mode = getenv("MENUCONFIG_MODE");
  43.883 +	if (mode) {
  43.884 +		if (!strcasecmp(mode, "single_menu"))
  43.885 +			single_menu_mode = 1;
  43.886 +	}
  43.887 +
  43.888 +	tcgetattr(1, &ios_org);
  43.889 +	atexit(conf_cleanup);
  43.890 +	init_wsize();
  43.891 +	reset_dialog();
  43.892 +	init_dialog(menu_backtitle);
  43.893 +	do {
  43.894 +		conf(&rootmenu);
  43.895 +		dialog_clear();
  43.896 +		res = dialog_yesno(NULL,
  43.897 +				   _("Do you wish to save your "
  43.898 +				     "new "PROJECT_NAME" configuration?\n"
  43.899 +				     "<ESC><ESC> to continue."),
  43.900 +				   6, 60);
  43.901 +	} while (res == KEY_ESC);
  43.902 +	end_dialog();
  43.903 +	if (res == 0) {
  43.904 +		if (conf_write(NULL)) {
  43.905 +			fprintf(stderr, _("\n\n"
  43.906 +				"Error writing "PROJECT_NAME" configuration.\n"
  43.907 +				"Your configuration changes were NOT saved."
  43.908 +				"\n\n"));
  43.909 +			return 1;
  43.910 +		}
  43.911 +		printf(_("\n\n"
  43.912 +			"*** End of "PROJECT_NAME" configuration.\n"
  43.913 +			"*** Execute 'make' to build, or try 'make help'."
  43.914 +			"\n\n"));
  43.915 +	} else {
  43.916 +		fprintf(stderr, _("\n\n"
  43.917 +			"Your configuration changes were NOT saved."
  43.918 +			"\n\n"));
  43.919 +	}
  43.920 +
  43.921 +	return 0;
  43.922 +}
    44.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    44.2 +++ b/kconfig/menu.c	Sat Feb 24 11:00:05 2007 +0000
    44.3 @@ -0,0 +1,419 @@
    44.4 +/*
    44.5 + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
    44.6 + * Released under the terms of the GNU GPL v2.0.
    44.7 + */
    44.8 +
    44.9 +#include <stdlib.h>
   44.10 +#include <string.h>
   44.11 +
   44.12 +#define LKC_DIRECT_LINK
   44.13 +#include "lkc.h"
   44.14 +
   44.15 +struct menu rootmenu;
   44.16 +static struct menu **last_entry_ptr;
   44.17 +
   44.18 +struct file *file_list;
   44.19 +struct file *current_file;
   44.20 +
   44.21 +static void menu_warn(struct menu *menu, const char *fmt, ...)
   44.22 +{
   44.23 +	va_list ap;
   44.24 +	va_start(ap, fmt);
   44.25 +	fprintf(stderr, "%s:%d:warning: ", menu->file->name, menu->lineno);
   44.26 +	vfprintf(stderr, fmt, ap);
   44.27 +	fprintf(stderr, "\n");
   44.28 +	va_end(ap);
   44.29 +}
   44.30 +
   44.31 +static void prop_warn(struct property *prop, const char *fmt, ...)
   44.32 +{
   44.33 +	va_list ap;
   44.34 +	va_start(ap, fmt);
   44.35 +	fprintf(stderr, "%s:%d:warning: ", prop->file->name, prop->lineno);
   44.36 +	vfprintf(stderr, fmt, ap);
   44.37 +	fprintf(stderr, "\n");
   44.38 +	va_end(ap);
   44.39 +}
   44.40 +
   44.41 +void menu_init(void)
   44.42 +{
   44.43 +	current_entry = current_menu = &rootmenu;
   44.44 +	last_entry_ptr = &rootmenu.list;
   44.45 +}
   44.46 +
   44.47 +void menu_add_entry(struct symbol *sym)
   44.48 +{
   44.49 +	struct menu *menu;
   44.50 +
   44.51 +	menu = malloc(sizeof(*menu));
   44.52 +	memset(menu, 0, sizeof(*menu));
   44.53 +	menu->sym = sym;
   44.54 +	menu->parent = current_menu;
   44.55 +	menu->file = current_file;
   44.56 +	menu->lineno = zconf_lineno();
   44.57 +
   44.58 +	*last_entry_ptr = menu;
   44.59 +	last_entry_ptr = &menu->next;
   44.60 +	current_entry = menu;
   44.61 +}
   44.62 +
   44.63 +void menu_end_entry(void)
   44.64 +{
   44.65 +}
   44.66 +
   44.67 +struct menu *menu_add_menu(void)
   44.68 +{
   44.69 +	menu_end_entry();
   44.70 +	last_entry_ptr = &current_entry->list;
   44.71 +	return current_menu = current_entry;
   44.72 +}
   44.73 +
   44.74 +void menu_end_menu(void)
   44.75 +{
   44.76 +	last_entry_ptr = &current_menu->next;
   44.77 +	current_menu = current_menu->parent;
   44.78 +}
   44.79 +
   44.80 +struct expr *menu_check_dep(struct expr *e)
   44.81 +{
   44.82 +	if (!e)
   44.83 +		return e;
   44.84 +
   44.85 +	switch (e->type) {
   44.86 +	case E_NOT:
   44.87 +		e->left.expr = menu_check_dep(e->left.expr);
   44.88 +		break;
   44.89 +	case E_OR:
   44.90 +	case E_AND:
   44.91 +		e->left.expr = menu_check_dep(e->left.expr);
   44.92 +		e->right.expr = menu_check_dep(e->right.expr);
   44.93 +		break;
   44.94 +	case E_SYMBOL:
   44.95 +		/* change 'm' into 'm' && MODULES */
   44.96 +		if (e->left.sym == &symbol_mod)
   44.97 +			return expr_alloc_and(e, expr_alloc_symbol(modules_sym));
   44.98 +		break;
   44.99 +	default:
  44.100 +		break;
  44.101 +	}
  44.102 +	return e;
  44.103 +}
  44.104 +
  44.105 +void menu_add_dep(struct expr *dep)
  44.106 +{
  44.107 +	current_entry->dep = expr_alloc_and(current_entry->dep, menu_check_dep(dep));
  44.108 +}
  44.109 +
  44.110 +void menu_set_type(int type)
  44.111 +{
  44.112 +	struct symbol *sym = current_entry->sym;
  44.113 +
  44.114 +	if (sym->type == type)
  44.115 +		return;
  44.116 +	if (sym->type == S_UNKNOWN) {
  44.117 +		sym->type = type;
  44.118 +		return;
  44.119 +	}
  44.120 +	menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'",
  44.121 +	    sym->name ? sym->name : "<choice>",
  44.122 +	    sym_type_name(sym->type), sym_type_name(type));
  44.123 +}
  44.124 +
  44.125 +struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep)
  44.126 +{
  44.127 +	struct property *prop = prop_alloc(type, current_entry->sym);
  44.128 +
  44.129 +	prop->menu = current_entry;
  44.130 +	prop->expr = expr;
  44.131 +	prop->visible.expr = menu_check_dep(dep);
  44.132 +
  44.133 +	if (prompt) {
  44.134 +		if (isspace(*prompt)) {
  44.135 +			prop_warn(prop, "leading whitespace ignored");
  44.136 +			while (isspace(*prompt))
  44.137 +				prompt++;
  44.138 +		}
  44.139 +		if (current_entry->prompt)
  44.140 +			prop_warn(prop, "prompt redefined");
  44.141 +		current_entry->prompt = prop;
  44.142 +	}
  44.143 +	prop->text = prompt;
  44.144 +
  44.145 +	return prop;
  44.146 +}
  44.147 +
  44.148 +struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep)
  44.149 +{
  44.150 +	return menu_add_prop(type, prompt, NULL, dep);
  44.151 +}
  44.152 +
  44.153 +void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep)
  44.154 +{
  44.155 +	menu_add_prop(type, NULL, expr, dep);
  44.156 +}
  44.157 +
  44.158 +void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep)
  44.159 +{
  44.160 +	menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep);
  44.161 +}
  44.162 +
  44.163 +void menu_add_option(int token, char *arg)
  44.164 +{
  44.165 +	struct property *prop;
  44.166 +
  44.167 +	switch (token) {
  44.168 +	case T_OPT_MODULES:
  44.169 +		prop = prop_alloc(P_DEFAULT, modules_sym);
  44.170 +		prop->expr = expr_alloc_symbol(current_entry->sym);
  44.171 +		break;
  44.172 +	case T_OPT_DEFCONFIG_LIST:
  44.173 +		if (!sym_defconfig_list)
  44.174 +			sym_defconfig_list = current_entry->sym;
  44.175 +		else if (sym_defconfig_list != current_entry->sym)
  44.176 +			zconf_error("trying to redefine defconfig symbol");
  44.177 +		break;
  44.178 +	}
  44.179 +}
  44.180 +
  44.181 +static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2)
  44.182 +{
  44.183 +	return sym2->type == S_INT || sym2->type == S_HEX ||
  44.184 +	       (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name));
  44.185 +}
  44.186 +
  44.187 +void sym_check_prop(struct symbol *sym)
  44.188 +{
  44.189 +	struct property *prop;
  44.190 +	struct symbol *sym2;
  44.191 +	for (prop = sym->prop; prop; prop = prop->next) {
  44.192 +		switch (prop->type) {
  44.193 +		case P_DEFAULT:
  44.194 +			if ((sym->type == S_STRING || sym->type == S_INT || sym->type == S_HEX) &&
  44.195 +			    prop->expr->type != E_SYMBOL)
  44.196 +				prop_warn(prop,
  44.197 +				    "default for config symbol '%'"
  44.198 +				    " must be a single symbol", sym->name);
  44.199 +			break;
  44.200 +		case P_SELECT:
  44.201 +			sym2 = prop_get_symbol(prop);
  44.202 +			if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE)
  44.203 +				prop_warn(prop,
  44.204 +				    "config symbol '%s' uses select, but is "
  44.205 +				    "not boolean or tristate", sym->name);
  44.206 +			else if (sym2->type == S_UNKNOWN)
  44.207 +				prop_warn(prop,
  44.208 +				    "'select' used by config symbol '%s' "
  44.209 +				    "refer to undefined symbol '%s'",
  44.210 +				    sym->name, sym2->name);
  44.211 +			else if (sym2->type != S_BOOLEAN && sym2->type != S_TRISTATE)
  44.212 +				prop_warn(prop,
  44.213 +				    "'%s' has wrong type. 'select' only "
  44.214 +				    "accept arguments of boolean and "
  44.215 +				    "tristate type", sym2->name);
  44.216 +			break;
  44.217 +		case P_RANGE:
  44.218 +			if (sym->type != S_INT && sym->type != S_HEX)
  44.219 +				prop_warn(prop, "range is only allowed "
  44.220 +				                "for int or hex symbols");
  44.221 +			if (!menu_range_valid_sym(sym, prop->expr->left.sym) ||
  44.222 +			    !menu_range_valid_sym(sym, prop->expr->right.sym))
  44.223 +				prop_warn(prop, "range is invalid");
  44.224 +			break;
  44.225 +		default:
  44.226 +			;
  44.227 +		}
  44.228 +	}
  44.229 +}
  44.230 +
  44.231 +void menu_finalize(struct menu *parent)
  44.232 +{
  44.233 +	struct menu *menu, *last_menu;
  44.234 +	struct symbol *sym;
  44.235 +	struct property *prop;
  44.236 +	struct expr *parentdep, *basedep, *dep, *dep2, **ep;
  44.237 +
  44.238 +	sym = parent->sym;
  44.239 +	if (parent->list) {
  44.240 +		if (sym && sym_is_choice(sym)) {
  44.241 +			/* find the first choice value and find out choice type */
  44.242 +			for (menu = parent->list; menu; menu = menu->next) {
  44.243 +				if (menu->sym) {
  44.244 +					current_entry = parent;
  44.245 +					menu_set_type(menu->sym->type);
  44.246 +					current_entry = menu;
  44.247 +					menu_set_type(sym->type);
  44.248 +					break;
  44.249 +				}
  44.250 +			}
  44.251 +			parentdep = expr_alloc_symbol(sym);
  44.252 +		} else if (parent->prompt)
  44.253 +			parentdep = parent->prompt->visible.expr;
  44.254 +		else
  44.255 +			parentdep = parent->dep;
  44.256 +
  44.257 +		for (menu = parent->list; menu; menu = menu->next) {
  44.258 +			basedep = expr_transform(menu->dep);
  44.259 +			basedep = expr_alloc_and(expr_copy(parentdep), basedep);
  44.260 +			basedep = expr_eliminate_dups(basedep);
  44.261 +			menu->dep = basedep;
  44.262 +			if (menu->sym)
  44.263 +				prop = menu->sym->prop;
  44.264 +			else
  44.265 +				prop = menu->prompt;
  44.266 +			for (; prop; prop = prop->next) {
  44.267 +				if (prop->menu != menu)
  44.268 +					continue;
  44.269 +				dep = expr_transform(prop->visible.expr);
  44.270 +				dep = expr_alloc_and(expr_copy(basedep), dep);
  44.271 +				dep = expr_eliminate_dups(dep);
  44.272 +				if (menu->sym && menu->sym->type != S_TRISTATE)
  44.273 +					dep = expr_trans_bool(dep);
  44.274 +				prop->visible.expr = dep;
  44.275 +				if (prop->type == P_SELECT) {
  44.276 +					struct symbol *es = prop_get_symbol(prop);
  44.277 +					es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr,
  44.278 +							expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep)));
  44.279 +				}
  44.280 +			}
  44.281 +		}
  44.282 +		for (menu = parent->list; menu; menu = menu->next)
  44.283 +			menu_finalize(menu);
  44.284 +	} else if (sym) {
  44.285 +		basedep = parent->prompt ? parent->prompt->visible.expr : NULL;
  44.286 +		basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no);
  44.287 +		basedep = expr_eliminate_dups(expr_transform(basedep));
  44.288 +		last_menu = NULL;
  44.289 +		for (menu = parent->next; menu; menu = menu->next) {
  44.290 +			dep = menu->prompt ? menu->prompt->visible.expr : menu->dep;
  44.291 +			if (!expr_contains_symbol(dep, sym))
  44.292 +				break;
  44.293 +			if (expr_depends_symbol(dep, sym))
  44.294 +				goto next;
  44.295 +			dep = expr_trans_compare(dep, E_UNEQUAL, &symbol_no);
  44.296 +			dep = expr_eliminate_dups(expr_transform(dep));
  44.297 +			dep2 = expr_copy(basedep);
  44.298 +			expr_eliminate_eq(&dep, &dep2);
  44.299 +			expr_free(dep);
  44.300 +			if (!expr_is_yes(dep2)) {
  44.301 +				expr_free(dep2);
  44.302 +				break;
  44.303 +			}
  44.304 +			expr_free(dep2);
  44.305 +		next:
  44.306 +			menu_finalize(menu);
  44.307 +			menu->parent = parent;
  44.308 +			last_menu = menu;
  44.309 +		}
  44.310 +		if (last_menu) {
  44.311 +			parent->list = parent->next;
  44.312 +			parent->next = last_menu->next;
  44.313 +			last_menu->next = NULL;
  44.314 +		}
  44.315 +	}
  44.316 +	for (menu = parent->list; menu; menu = menu->next) {
  44.317 +		if (sym && sym_is_choice(sym) && menu->sym) {
  44.318 +			menu->sym->flags |= SYMBOL_CHOICEVAL;
  44.319 +			if (!menu->prompt)
  44.320 +				menu_warn(menu, "choice value must have a prompt");
  44.321 +			for (prop = menu->sym->prop; prop; prop = prop->next) {
  44.322 +				if (prop->type == P_PROMPT && prop->menu != menu) {
  44.323 +					prop_warn(prop, "choice values "
  44.324 +					    "currently only support a "
  44.325 +					    "single prompt");
  44.326 +				}
  44.327 +				if (prop->type == P_DEFAULT)
  44.328 +					prop_warn(prop, "defaults for choice "
  44.329 +					    "values not supported");
  44.330 +			}
  44.331 +			current_entry = menu;
  44.332 +			menu_set_type(sym->type);
  44.333 +			menu_add_symbol(P_CHOICE, sym, NULL);
  44.334 +			prop = sym_get_choice_prop(sym);
  44.335 +			for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr)
  44.336 +				;
  44.337 +			*ep = expr_alloc_one(E_CHOICE, NULL);
  44.338 +			(*ep)->right.sym = menu->sym;
  44.339 +		}
  44.340 +		if (menu->list && (!menu->prompt || !menu->prompt->text)) {
  44.341 +			for (last_menu = menu->list; ; last_menu = last_menu->next) {
  44.342 +				last_menu->parent = parent;
  44.343 +				if (!last_menu->next)
  44.344 +					break;
  44.345 +			}
  44.346 +			last_menu->next = menu->next;
  44.347 +			menu->next = menu->list;
  44.348 +			menu->list = NULL;
  44.349 +		}
  44.350 +	}
  44.351 +
  44.352 +	if (sym && !(sym->flags & SYMBOL_WARNED)) {
  44.353 +		if (sym->type == S_UNKNOWN)
  44.354 +			menu_warn(parent, "config symbol defined without type");
  44.355 +
  44.356 +		if (sym_is_choice(sym) && !parent->prompt)
  44.357 +			menu_warn(parent, "choice must have a prompt");
  44.358 +
  44.359 +		/* Check properties connected to this symbol */
  44.360 +		sym_check_prop(sym);
  44.361 +		sym->flags |= SYMBOL_WARNED;
  44.362 +	}
  44.363 +
  44.364 +	if (sym && !sym_is_optional(sym) && parent->prompt) {
  44.365 +		sym->rev_dep.expr = expr_alloc_or(sym->rev_dep.expr,
  44.366 +				expr_alloc_and(parent->prompt->visible.expr,
  44.367 +					expr_alloc_symbol(&symbol_mod)));
  44.368 +	}
  44.369 +}
  44.370 +
  44.371 +bool menu_is_visible(struct menu *menu)
  44.372 +{
  44.373 +	struct menu *child;
  44.374 +	struct symbol *sym;
  44.375 +	tristate visible;
  44.376 +
  44.377 +	if (!menu->prompt)
  44.378 +		return false;
  44.379 +	sym = menu->sym;
  44.380 +	if (sym) {
  44.381 +		sym_calc_value(sym);
  44.382 +		visible = menu->prompt->visible.tri;
  44.383 +	} else
  44.384 +		visible = menu->prompt->visible.tri = expr_calc_value(menu->prompt->visible.expr);
  44.385 +
  44.386 +	if (visible != no)
  44.387 +		return true;
  44.388 +	if (!sym || sym_get_tristate_value(menu->sym) == no)
  44.389 +		return false;
  44.390 +
  44.391 +	for (child = menu->list; child; child = child->next)
  44.392 +		if (menu_is_visible(child))
  44.393 +			return true;
  44.394 +	return false;
  44.395 +}
  44.396 +
  44.397 +const char *menu_get_prompt(struct menu *menu)
  44.398 +{
  44.399 +	if (menu->prompt)
  44.400 +		return _(menu->prompt->text);
  44.401 +	else if (menu->sym)
  44.402 +		return _(menu->sym->name);
  44.403 +	return NULL;
  44.404 +}
  44.405 +
  44.406 +struct menu *menu_get_root_menu(struct menu *menu)
  44.407 +{
  44.408 +	return &rootmenu;
  44.409 +}
  44.410 +
  44.411 +struct menu *menu_get_parent_menu(struct menu *menu)
  44.412 +{
  44.413 +	enum prop_type type;
  44.414 +
  44.415 +	for (; menu != &rootmenu; menu = menu->parent) {
  44.416 +		type = menu->prompt ? menu->prompt->type : 0;
  44.417 +		if (type == P_MENU)
  44.418 +			break;
  44.419 +	}
  44.420 +	return menu;
  44.421 +}
  44.422 +
    45.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    45.2 +++ b/kconfig/symbol.c	Sat Feb 24 11:00:05 2007 +0000
    45.3 @@ -0,0 +1,882 @@
    45.4 +/*
    45.5 + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
    45.6 + * Released under the terms of the GNU GPL v2.0.
    45.7 + */
    45.8 +
    45.9 +#include <ctype.h>
   45.10 +#include <stdlib.h>
   45.11 +#include <string.h>
   45.12 +#include <regex.h>
   45.13 +#include <sys/utsname.h>
   45.14 +
   45.15 +#define LKC_DIRECT_LINK
   45.16 +#include "lkc.h"
   45.17 +
   45.18 +struct symbol symbol_yes = {
   45.19 +	.name = "y",
   45.20 +	.curr = { "y", yes },
   45.21 +	.flags = SYMBOL_CONST|SYMBOL_VALID,
   45.22 +}, symbol_mod = {
   45.23 +	.name = "m",
   45.24 +	.curr = { "m", mod },
   45.25 +	.flags = SYMBOL_CONST|SYMBOL_VALID,
   45.26 +}, symbol_no = {
   45.27 +	.name = "n",
   45.28 +	.curr = { "n", no },
   45.29 +	.flags = SYMBOL_CONST|SYMBOL_VALID,
   45.30 +}, symbol_empty = {
   45.31 +	.name = "",
   45.32 +	.curr = { "", no },
   45.33 +	.flags = SYMBOL_VALID,
   45.34 +};
   45.35 +
   45.36 +int sym_change_count;
   45.37 +struct symbol *sym_defconfig_list;
   45.38 +struct symbol *modules_sym;
   45.39 +tristate modules_val;
   45.40 +
   45.41 +void sym_add_default(struct symbol *sym, const char *def)
   45.42 +{
   45.43 +	struct property *prop = prop_alloc(P_DEFAULT, sym);
   45.44 +
   45.45 +	prop->expr = expr_alloc_symbol(sym_lookup(def, 1));
   45.46 +}
   45.47 +
   45.48 +void sym_init(void)
   45.49 +{
   45.50 +	struct symbol *sym;
   45.51 +	struct utsname uts;
   45.52 +	char *p;
   45.53 +	static bool inited = false;
   45.54 +
   45.55 +	if (inited)
   45.56 +		return;
   45.57 +	inited = true;
   45.58 +
   45.59 +	uname(&uts);
   45.60 +
   45.61 +	sym = sym_lookup("ARCH", 0);
   45.62 +	sym->type = S_STRING;
   45.63 +	sym->flags |= SYMBOL_AUTO;
   45.64 +	p = getenv("ARCH");
   45.65 +	if (p)
   45.66 +		sym_add_default(sym, p);
   45.67 +
   45.68 +	sym = sym_lookup("PROJECTVERSION", 0);
   45.69 +	sym->type = S_STRING;
   45.70 +	sym->flags |= SYMBOL_AUTO;
   45.71 +	p = getenv("PROJECTVERSION");
   45.72 +	if (p)
   45.73 +		sym_add_default(sym, p);
   45.74 +
   45.75 +	sym = sym_lookup("UNAME_RELEASE", 0);
   45.76 +	sym->type = S_STRING;
   45.77 +	sym->flags |= SYMBOL_AUTO;
   45.78 +	sym_add_default(sym, uts.release);
   45.79 +}
   45.80 +
   45.81 +enum symbol_type sym_get_type(struct symbol *sym)
   45.82 +{
   45.83 +	enum symbol_type type = sym->type;
   45.84 +
   45.85 +	if (type == S_TRISTATE) {
   45.86 +		if (sym_is_choice_value(sym) && sym->visible == yes)
   45.87 +			type = S_BOOLEAN;
   45.88 +		else if (modules_val == no)
   45.89 +			type = S_BOOLEAN;
   45.90 +	}
   45.91 +	return type;
   45.92 +}
   45.93 +
   45.94 +const char *sym_type_name(enum symbol_type type)
   45.95 +{
   45.96 +	switch (type) {
   45.97 +	case S_BOOLEAN:
   45.98 +		return "boolean";
   45.99 +	case S_TRISTATE:
  45.100 +		return "tristate";
  45.101 +	case S_INT:
  45.102 +		return "integer";
  45.103 +	case S_HEX:
  45.104 +		return "hex";
  45.105 +	case S_STRING:
  45.106 +		return "string";
  45.107 +	case S_UNKNOWN:
  45.108 +		return "unknown";
  45.109 +	case S_OTHER:
  45.110 +		break;
  45.111 +	}
  45.112 +	return "???";
  45.113 +}
  45.114 +
  45.115 +struct property *sym_get_choice_prop(struct symbol *sym)
  45.116 +{
  45.117 +	struct property *prop;
  45.118 +
  45.119 +	for_all_choices(sym, prop)
  45.120 +		return prop;
  45.121 +	return NULL;
  45.122 +}
  45.123 +
  45.124 +struct property *sym_get_default_prop(struct symbol *sym)
  45.125 +{
  45.126 +	struct property *prop;
  45.127 +
  45.128 +	for_all_defaults(sym, prop) {
  45.129 +		prop->visible.tri = expr_calc_value(prop->visible.expr);
  45.130 +		if (prop->visible.tri != no)
  45.131 +			return prop;
  45.132 +	}
  45.133 +	return NULL;
  45.134 +}
  45.135 +
  45.136 +struct property *sym_get_range_prop(struct symbol *sym)
  45.137 +{
  45.138 +	struct property *prop;
  45.139 +
  45.140 +	for_all_properties(sym, prop, P_RANGE) {
  45.141 +		prop->visible.tri = expr_calc_value(prop->visible.expr);
  45.142 +		if (prop->visible.tri != no)
  45.143 +			return prop;
  45.144 +	}
  45.145 +	return NULL;
  45.146 +}
  45.147 +
  45.148 +static int sym_get_range_val(struct symbol *sym, int base)
  45.149 +{
  45.150 +	sym_calc_value(sym);
  45.151 +	switch (sym->type) {
  45.152 +	case S_INT:
  45.153 +		base = 10;
  45.154 +		break;
  45.155 +	case S_HEX:
  45.156 +		base = 16;
  45.157 +		break;
  45.158 +	default:
  45.159 +		break;
  45.160 +	}
  45.161 +	return strtol(sym->curr.val, NULL, base);
  45.162 +}
  45.163 +
  45.164 +static void sym_validate_range(struct symbol *sym)
  45.165 +{
  45.166 +	struct property *prop;
  45.167 +	int base, val, val2;
  45.168 +	char str[64];
  45.169 +
  45.170 +	switch (sym->type) {
  45.171 +	case S_INT:
  45.172 +		base = 10;
  45.173 +		break;
  45.174 +	case S_HEX:
  45.175 +		base = 16;
  45.176 +		break;
  45.177 +	default:
  45.178 +		return;
  45.179 +	}
  45.180 +	prop = sym_get_range_prop(sym);
  45.181 +	if (!prop)
  45.182 +		return;
  45.183 +	val = strtol(sym->curr.val, NULL, base);
  45.184 +	val2 = sym_get_range_val(prop->expr->left.sym, base);
  45.185 +	if (val >= val2) {
  45.186 +		val2 = sym_get_range_val(prop->expr->right.sym, base);
  45.187 +		if (val <= val2)
  45.188 +			return;
  45.189 +	}
  45.190 +	if (sym->type == S_INT)
  45.191 +		sprintf(str, "%d", val2);
  45.192 +	else
  45.193 +		sprintf(str, "0x%x", val2);
  45.194 +	sym->curr.val = strdup(str);
  45.195 +}
  45.196 +
  45.197 +static void sym_calc_visibility(struct symbol *sym)
  45.198 +{
  45.199 +	struct property *prop;
  45.200 +	tristate tri;
  45.201 +
  45.202 +	/* any prompt visible? */
  45.203 +	tri = no;
  45.204 +	for_all_prompts(sym, prop) {
  45.205 +		prop->visible.tri = expr_calc_value(prop->visible.expr);
  45.206 +		tri = E_OR(tri, prop->visible.tri);
  45.207 +	}
  45.208 +	if (tri == mod && (sym->type != S_TRISTATE || modules_val == no))
  45.209 +		tri = yes;
  45.210 +	if (sym->visible != tri) {
  45.211 +		sym->visible = tri;
  45.212 +		sym_set_changed(sym);
  45.213 +	}
  45.214 +	if (sym_is_choice_value(sym))
  45.215 +		return;
  45.216 +	tri = no;
  45.217 +	if (sym->rev_dep.expr)
  45.218 +		tri = expr_calc_value(sym->rev_dep.expr);
  45.219 +	if (tri == mod && sym_get_type(sym) == S_BOOLEAN)
  45.220 +		tri = yes;
  45.221 +	if (sym->rev_dep.tri != tri) {
  45.222 +		sym->rev_dep.tri = tri;
  45.223 +		sym_set_changed(sym);
  45.224 +	}
  45.225 +}
  45.226 +
  45.227 +static struct symbol *sym_calc_choice(struct symbol *sym)
  45.228 +{
  45.229 +	struct symbol *def_sym;
  45.230 +	struct property *prop;
  45.231 +	struct expr *e;
  45.232 +
  45.233 +	/* is the user choice visible? */
  45.234 +	def_sym = sym->def[S_DEF_USER].val;
  45.235 +	if (def_sym) {
  45.236 +		sym_calc_visibility(def_sym);
  45.237 +		if (def_sym->visible != no)
  45.238 +			return def_sym;
  45.239 +	}
  45.240 +
  45.241 +	/* any of the defaults visible? */
  45.242 +	for_all_defaults(sym, prop) {
  45.243 +		prop->visible.tri = expr_calc_value(prop->visible.expr);
  45.244 +		if (prop->visible.tri == no)
  45.245 +			continue;
  45.246 +		def_sym = prop_get_symbol(prop);
  45.247 +		sym_calc_visibility(def_sym);
  45.248 +		if (def_sym->visible != no)
  45.249 +			return def_sym;
  45.250 +	}
  45.251 +
  45.252 +	/* just get the first visible value */
  45.253 +	prop = sym_get_choice_prop(sym);
  45.254 +	for (e = prop->expr; e; e = e->left.expr) {
  45.255 +		def_sym = e->right.sym;
  45.256 +		sym_calc_visibility(def_sym);
  45.257 +		if (def_sym->visible != no)
  45.258 +			return def_sym;
  45.259 +	}
  45.260 +
  45.261 +	/* no choice? reset tristate value */
  45.262 +	sym->curr.tri = no;
  45.263 +	return NULL;
  45.264 +}
  45.265 +
  45.266 +void sym_calc_value(struct symbol *sym)
  45.267 +{
  45.268 +	struct symbol_value newval, oldval;
  45.269 +	struct property *prop;
  45.270 +	struct expr *e;
  45.271 +
  45.272 +	if (!sym)
  45.273 +		return;
  45.274 +
  45.275 +	if (sym->flags & SYMBOL_VALID)
  45.276 +		return;
  45.277 +	sym->flags |= SYMBOL_VALID;
  45.278 +
  45.279 +	oldval = sym->curr;
  45.280 +
  45.281 +	switch (sym->type) {
  45.282 +	case S_INT:
  45.283 +	case S_HEX:
  45.284 +	case S_STRING:
  45.285 +		newval = symbol_empty.curr;
  45.286 +		break;
  45.287 +	case S_BOOLEAN:
  45.288 +	case S_TRISTATE:
  45.289 +		newval = symbol_no.curr;
  45.290 +		break;
  45.291 +	default:
  45.292 +		sym->curr.val = sym->name;
  45.293 +		sym->curr.tri = no;
  45.294 +		return;
  45.295 +	}
  45.296 +	if (!sym_is_choice_value(sym))
  45.297 +		sym->flags &= ~SYMBOL_WRITE;
  45.298 +
  45.299 +	sym_calc_visibility(sym);
  45.300 +
  45.301 +	/* set default if recursively called */
  45.302 +	sym->curr = newval;
  45.303 +
  45.304 +	switch (sym_get_type(sym)) {
  45.305 +	case S_BOOLEAN:
  45.306 +	case S_TRISTATE:
  45.307 +		if (sym_is_choice_value(sym) && sym->visible == yes) {
  45.308 +			prop = sym_get_choice_prop(sym);
  45.309 +			newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no;
  45.310 +		} else if (E_OR(sym->visible, sym->rev_dep.tri) != no) {
  45.311 +			sym->flags |= SYMBOL_WRITE;
  45.312 +			if (sym_has_value(sym))
  45.313 +				newval.tri = sym->def[S_DEF_USER].tri;
  45.314 +			else if (!sym_is_choice(sym)) {
  45.315 +				prop = sym_get_default_prop(sym);
  45.316 +				if (prop)
  45.317 +					newval.tri = expr_calc_value(prop->expr);
  45.318 +			}
  45.319 +			newval.tri = E_OR(E_AND(newval.tri, sym->visible), sym->rev_dep.tri);
  45.320 +		} else if (!sym_is_choice(sym)) {
  45.321 +			prop = sym_get_default_prop(sym);
  45.322 +			if (prop) {
  45.323 +				sym->flags |= SYMBOL_WRITE;
  45.324 +				newval.tri = expr_calc_value(prop->expr);
  45.325 +			}
  45.326 +		}
  45.327 +		if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN)
  45.328 +			newval.tri = yes;
  45.329 +		break;
  45.330 +	case S_STRING:
  45.331 +	case S_HEX:
  45.332 +	case S_INT:
  45.333 +		if (sym->visible != no) {
  45.334 +			sym->flags |= SYMBOL_WRITE;
  45.335 +			if (sym_has_value(sym)) {
  45.336 +				newval.val = sym->def[S_DEF_USER].val;
  45.337 +				break;
  45.338 +			}
  45.339 +		}
  45.340 +		prop = sym_get_default_prop(sym);
  45.341 +		if (prop) {
  45.342 +			struct symbol *ds = prop_get_symbol(prop);
  45.343 +			if (ds) {
  45.344 +				sym->flags |= SYMBOL_WRITE;
  45.345 +				sym_calc_value(ds);
  45.346 +				newval.val = ds->curr.val;
  45.347 +			}
  45.348 +		}
  45.349 +		break;
  45.350 +	default:
  45.351 +		;
  45.352 +	}
  45.353 +
  45.354 +	sym->curr = newval;
  45.355 +	if (sym_is_choice(sym) && newval.tri == yes)
  45.356 +		sym->curr.val = sym_calc_choice(sym);
  45.357 +	sym_validate_range(sym);
  45.358 +
  45.359 +	if (memcmp(&oldval, &sym->curr, sizeof(oldval))) {
  45.360 +		sym_set_changed(sym);
  45.361 +		if (modules_sym == sym) {
  45.362 +			sym_set_all_changed();
  45.363 +			modules_val = modules_sym->curr.tri;
  45.364 +		}
  45.365 +	}
  45.366 +
  45.367 +	if (sym_is_choice(sym)) {
  45.368 +		int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE);
  45.369 +		prop = sym_get_choice_prop(sym);
  45.370 +		for (e = prop->expr; e; e = e->left.expr) {
  45.371 +			e->right.sym->flags |= flags;
  45.372 +			if (flags & SYMBOL_CHANGED)
  45.373 +				sym_set_changed(e->right.sym);
  45.374 +		}
  45.375 +	}
  45.376 +}
  45.377 +
  45.378 +void sym_clear_all_valid(void)
  45.379 +{
  45.380 +	struct symbol *sym;
  45.381 +	int i;
  45.382 +
  45.383 +	for_all_symbols(i, sym)
  45.384 +		sym->flags &= ~SYMBOL_VALID;
  45.385 +	sym_change_count++;
  45.386 +	if (modules_sym)
  45.387 +		sym_calc_value(modules_sym);
  45.388 +}
  45.389 +
  45.390 +void sym_set_changed(struct symbol *sym)
  45.391 +{
  45.392 +	struct property *prop;
  45.393 +
  45.394 +	sym->flags |= SYMBOL_CHANGED;
  45.395 +	for (prop = sym->prop; prop; prop = prop->next) {
  45.396 +		if (prop->menu)
  45.397 +			prop->menu->flags |= MENU_CHANGED;
  45.398 +	}
  45.399 +}
  45.400 +
  45.401 +void sym_set_all_changed(void)
  45.402 +{
  45.403 +	struct symbol *sym;
  45.404 +	int i;
  45.405 +
  45.406 +	for_all_symbols(i, sym)
  45.407 +		sym_set_changed(sym);
  45.408 +}
  45.409 +
  45.410 +bool sym_tristate_within_range(struct symbol *sym, tristate val)
  45.411 +{
  45.412 +	int type = sym_get_type(sym);
  45.413 +
  45.414 +	if (sym->visible == no)
  45.415 +		return false;
  45.416 +
  45.417 +	if (type != S_BOOLEAN && type != S_TRISTATE)
  45.418 +		return false;
  45.419 +
  45.420 +	if (type == S_BOOLEAN && val == mod)
  45.421 +		return false;
  45.422 +	if (sym->visible <= sym->rev_dep.tri)
  45.423 +		return false;
  45.424 +	if (sym_is_choice_value(sym) && sym->visible == yes)
  45.425 +		return val == yes;
  45.426 +	return val >= sym->rev_dep.tri && val <= sym->visible;
  45.427 +}
  45.428 +
  45.429 +bool sym_set_tristate_value(struct symbol *sym, tristate val)
  45.430 +{
  45.431 +	tristate oldval = sym_get_tristate_value(sym);
  45.432 +
  45.433 +	if (oldval != val && !sym_tristate_within_range(sym, val))
  45.434 +		return false;
  45.435 +
  45.436 +	if (!(sym->flags & SYMBOL_DEF_USER)) {
  45.437 +		sym->flags |= SYMBOL_DEF_USER;
  45.438 +		sym_set_changed(sym);
  45.439 +	}
  45.440 +	/*
  45.441 +	 * setting a choice value also resets the new flag of the choice
  45.442 +	 * symbol and all other choice values.
  45.443 +	 */
  45.444 +	if (sym_is_choice_value(sym) && val == yes) {
  45.445 +		struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
  45.446 +		struct property *prop;
  45.447 +		struct expr *e;
  45.448 +
  45.449 +		cs->def[S_DEF_USER].val = sym;
  45.450 +		cs->flags |= SYMBOL_DEF_USER;
  45.451 +		prop = sym_get_choice_prop(cs);
  45.452 +		for (e = prop->expr; e; e = e->left.expr) {
  45.453 +			if (e->right.sym->visible != no)
  45.454 +				e->right.sym->flags |= SYMBOL_DEF_USER;
  45.455 +		}
  45.456 +	}
  45.457 +
  45.458 +	sym->def[S_DEF_USER].tri = val;
  45.459 +	if (oldval != val)
  45.460 +		sym_clear_all_valid();
  45.461 +
  45.462 +	return true;
  45.463 +}
  45.464 +
  45.465 +tristate sym_toggle_tristate_value(struct symbol *sym)
  45.466 +{
  45.467 +	tristate oldval, newval;
  45.468 +
  45.469 +	oldval = newval = sym_get_tristate_value(sym);
  45.470 +	do {
  45.471 +		switch (newval) {
  45.472 +		case no:
  45.473 +			newval = mod;
  45.474 +			break;
  45.475 +		case mod:
  45.476 +			newval = yes;
  45.477 +			break;
  45.478 +		case yes:
  45.479 +			newval = no;
  45.480 +			break;
  45.481 +		}
  45.482 +		if (sym_set_tristate_value(sym, newval))
  45.483 +			break;
  45.484 +	} while (oldval != newval);
  45.485 +	return newval;
  45.486 +}
  45.487 +
  45.488 +bool sym_string_valid(struct symbol *sym, const char *str)
  45.489 +{
  45.490 +	signed char ch;
  45.491 +
  45.492 +	switch (sym->type) {
  45.493 +	case S_STRING:
  45.494 +		return true;
  45.495 +	case S_INT:
  45.496 +		ch = *str++;
  45.497 +		if (ch == '-')
  45.498 +			ch = *str++;
  45.499 +		if (!isdigit(ch))
  45.500 +			return false;
  45.501 +		if (ch == '0' && *str != 0)
  45.502 +			return false;
  45.503 +		while ((ch = *str++)) {
  45.504 +			if (!isdigit(ch))
  45.505 +				return false;
  45.506 +		}
  45.507 +		return true;
  45.508 +	case S_HEX:
  45.509 +		if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X'))
  45.510 +			str += 2;
  45.511 +		ch = *str++;
  45.512 +		do {
  45.513 +			if (!isxdigit(ch))
  45.514 +				return false;
  45.515 +		} while ((ch = *str++));
  45.516 +		return true;
  45.517 +	case S_BOOLEAN:
  45.518 +	case S_TRISTATE:
  45.519 +		switch (str[0]) {
  45.520 +		case 'y': case 'Y':
  45.521 +		case 'm': case 'M':
  45.522 +		case 'n': case 'N':
  45.523 +			return true;
  45.524 +		}
  45.525 +		return false;
  45.526 +	default:
  45.527 +		return false;
  45.528 +	}
  45.529 +}
  45.530 +
  45.531 +bool sym_string_within_range(struct symbol *sym, const char *str)
  45.532 +{
  45.533 +	struct property *prop;
  45.534 +	int val;
  45.535 +
  45.536 +	switch (sym->type) {
  45.537 +	case S_STRING:
  45.538 +		return sym_string_valid(sym, str);
  45.539 +	case S_INT:
  45.540 +		if (!sym_string_valid(sym, str))
  45.541 +			return false;
  45.542 +		prop = sym_get_range_prop(sym);
  45.543 +		if (!prop)
  45.544 +			return true;
  45.545 +		val = strtol(str, NULL, 10);
  45.546 +		return val >= sym_get_range_val(prop->expr->left.sym, 10) &&
  45.547 +		       val <= sym_get_range_val(prop->expr->right.sym, 10);
  45.548 +	case S_HEX:
  45.549 +		if (!sym_string_valid(sym, str))
  45.550 +			return false;
  45.551 +		prop = sym_get_range_prop(sym);
  45.552 +		if (!prop)
  45.553 +			return true;
  45.554 +		val = strtol(str, NULL, 16);
  45.555 +		return val >= sym_get_range_val(prop->expr->left.sym, 16) &&
  45.556 +		       val <= sym_get_range_val(prop->expr->right.sym, 16);
  45.557 +	case S_BOOLEAN:
  45.558 +	case S_TRISTATE:
  45.559 +		switch (str[0]) {
  45.560 +		case 'y': case 'Y':
  45.561 +			return sym_tristate_within_range(sym, yes);
  45.562 +		case 'm': case 'M':
  45.563 +			return sym_tristate_within_range(sym, mod);
  45.564 +		case 'n': case 'N':
  45.565 +			return sym_tristate_within_range(sym, no);
  45.566 +		}
  45.567 +		return false;
  45.568 +	default:
  45.569 +		return false;
  45.570 +	}
  45.571 +}
  45.572 +
  45.573 +bool sym_set_string_value(struct symbol *sym, const char *newval)
  45.574 +{
  45.575 +	const char *oldval;
  45.576 +	char *val;
  45.577 +	int size;
  45.578 +
  45.579 +	switch (sym->type) {
  45.580 +	case S_BOOLEAN:
  45.581 +	case S_TRISTATE:
  45.582 +		switch (newval[0]) {
  45.583 +		case 'y': case 'Y':
  45.584 +			return sym_set_tristate_value(sym, yes);
  45.585 +		case 'm': case 'M':
  45.586 +			return sym_set_tristate_value(sym, mod);
  45.587 +		case 'n': case 'N':
  45.588 +			return sym_set_tristate_value(sym, no);
  45.589 +		}
  45.590 +		return false;
  45.591 +	default:
  45.592 +		;
  45.593 +	}
  45.594 +
  45.595 +	if (!sym_string_within_range(sym, newval))
  45.596 +		return false;
  45.597 +
  45.598 +	if (!(sym->flags & SYMBOL_DEF_USER)) {
  45.599 +		sym->flags |= SYMBOL_DEF_USER;
  45.600 +		sym_set_changed(sym);
  45.601 +	}
  45.602 +
  45.603 +	oldval = sym->def[S_DEF_USER].val;
  45.604 +	size = strlen(newval) + 1;
  45.605 +	if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) {
  45.606 +		size += 2;
  45.607 +		sym->def[S_DEF_USER].val = val = malloc(size);
  45.608 +		*val++ = '0';
  45.609 +		*val++ = 'x';
  45.610 +	} else if (!oldval || strcmp(oldval, newval))
  45.611 +		sym->def[S_DEF_USER].val = val = malloc(size);
  45.612 +	else
  45.613 +		return true;
  45.614 +
  45.615 +	strcpy(val, newval);
  45.616 +	free((void *)oldval);
  45.617 +	sym_clear_all_valid();
  45.618 +
  45.619 +	return true;
  45.620 +}
  45.621 +
  45.622 +const char *sym_get_string_value(struct symbol *sym)
  45.623 +{
  45.624 +	tristate val;
  45.625 +
  45.626 +	switch (sym->type) {
  45.627 +	case S_BOOLEAN:
  45.628 +	case S_TRISTATE:
  45.629 +		val = sym_get_tristate_value(sym);
  45.630 +		switch (val) {
  45.631 +		case no:
  45.632 +			return "n";
  45.633 +		case mod:
  45.634 +			return "m";
  45.635 +		case yes:
  45.636 +			return "y";
  45.637 +		}
  45.638 +		break;
  45.639 +	default:
  45.640 +		;
  45.641 +	}
  45.642 +	return (const char *)sym->curr.val;
  45.643 +}
  45.644 +
  45.645 +bool sym_is_changable(struct symbol *sym)
  45.646 +{
  45.647 +	return sym->visible > sym->rev_dep.tri;
  45.648 +}
  45.649 +
  45.650 +struct symbol *sym_lookup(const char *name, int isconst)
  45.651 +{
  45.652 +	struct symbol *symbol;
  45.653 +	const char *ptr;
  45.654 +	char *new_name;
  45.655 +	int hash = 0;
  45.656 +
  45.657 +	if (name) {
  45.658 +		if (name[0] && !name[1]) {
  45.659 +			switch (name[0]) {
  45.660 +			case 'y': return &symbol_yes;
  45.661 +			case 'm': return &symbol_mod;
  45.662 +			case 'n': return &symbol_no;
  45.663 +			}
  45.664 +		}
  45.665 +		for (ptr = name; *ptr; ptr++)
  45.666 +			hash += *ptr;
  45.667 +		hash &= 0xff;
  45.668 +
  45.669 +		for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) {
  45.670 +			if (!strcmp(symbol->name, name)) {
  45.671 +				if ((isconst && symbol->flags & SYMBOL_CONST) ||
  45.672 +				    (!isconst && !(symbol->flags & SYMBOL_CONST)))
  45.673 +					return symbol;
  45.674 +			}
  45.675 +		}
  45.676 +		new_name = strdup(name);
  45.677 +	} else {
  45.678 +		new_name = NULL;
  45.679 +		hash = 256;
  45.680 +	}
  45.681 +
  45.682 +	symbol = malloc(sizeof(*symbol));
  45.683 +	memset(symbol, 0, sizeof(*symbol));
  45.684 +	symbol->name = new_name;
  45.685 +	symbol->type = S_UNKNOWN;
  45.686 +	if (isconst)
  45.687 +		symbol->flags |= SYMBOL_CONST;
  45.688 +
  45.689 +	symbol->next = symbol_hash[hash];
  45.690 +	symbol_hash[hash] = symbol;
  45.691 +
  45.692 +	return symbol;
  45.693 +}
  45.694 +
  45.695 +struct symbol *sym_find(const char *name)
  45.696 +{
  45.697 +	struct symbol *symbol = NULL;
  45.698 +	const char *ptr;
  45.699 +	int hash = 0;
  45.700 +
  45.701 +	if (!name)
  45.702 +		return NULL;
  45.703 +
  45.704 +	if (name[0] && !name[1]) {
  45.705 +		switch (name[0]) {
  45.706 +		case 'y': return &symbol_yes;
  45.707 +		case 'm': return &symbol_mod;
  45.708 +		case 'n': return &symbol_no;
  45.709 +		}
  45.710 +	}
  45.711 +	for (ptr = name; *ptr; ptr++)
  45.712 +		hash += *ptr;
  45.713 +	hash &= 0xff;
  45.714 +
  45.715 +	for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) {
  45.716 +		if (!strcmp(symbol->name, name) &&
  45.717 +		    !(symbol->flags & SYMBOL_CONST))
  45.718 +				break;
  45.719 +	}
  45.720 +
  45.721 +	return symbol;
  45.722 +}
  45.723 +
  45.724 +struct symbol **sym_re_search(const char *pattern)
  45.725 +{
  45.726 +	struct symbol *sym, **sym_arr = NULL;
  45.727 +	int i, cnt, size;
  45.728 +	regex_t re;
  45.729 +
  45.730 +	cnt = size = 0;
  45.731 +	/* Skip if empty */
  45.732 +	if (strlen(pattern) == 0)
  45.733 +		return NULL;
  45.734 +	if (regcomp(&re, pattern, REG_EXTENDED|REG_NOSUB|REG_ICASE))
  45.735 +		return NULL;
  45.736 +
  45.737 +	for_all_symbols(i, sym) {
  45.738 +		if (sym->flags & SYMBOL_CONST || !sym->name)
  45.739 +			continue;
  45.740 +		if (regexec(&re, sym->name, 0, NULL, 0))
  45.741 +			continue;
  45.742 +		if (cnt + 1 >= size) {
  45.743 +			void *tmp = sym_arr;
  45.744 +			size += 16;
  45.745 +			sym_arr = realloc(sym_arr, size * sizeof(struct symbol *));
  45.746 +			if (!sym_arr) {
  45.747 +				free(tmp);
  45.748 +				return NULL;
  45.749 +			}
  45.750 +		}
  45.751 +		sym_arr[cnt++] = sym;
  45.752 +	}
  45.753 +	if (sym_arr)
  45.754 +		sym_arr[cnt] = NULL;
  45.755 +	regfree(&re);
  45.756 +
  45.757 +	return sym_arr;
  45.758 +}
  45.759 +
  45.760 +
  45.761 +struct symbol *sym_check_deps(struct symbol *sym);
  45.762 +
  45.763 +static struct symbol *sym_check_expr_deps(struct expr *e)
  45.764 +{
  45.765 +	struct symbol *sym;
  45.766 +
  45.767 +	if (!e)
  45.768 +		return NULL;
  45.769 +	switch (e->type) {
  45.770 +	case E_OR:
  45.771 +	case E_AND:
  45.772 +		sym = sym_check_expr_deps(e->left.expr);
  45.773 +		if (sym)
  45.774 +			return sym;
  45.775 +		return sym_check_expr_deps(e->right.expr);
  45.776 +	case E_NOT:
  45.777 +		return sym_check_expr_deps(e->left.expr);
  45.778 +	case E_EQUAL:
  45.779 +	case E_UNEQUAL:
  45.780 +		sym = sym_check_deps(e->left.sym);
  45.781 +		if (sym)
  45.782 +			return sym;
  45.783 +		return sym_check_deps(e->right.sym);
  45.784 +	case E_SYMBOL:
  45.785 +		return sym_check_deps(e->left.sym);
  45.786 +	default:
  45.787 +		break;
  45.788 +	}
  45.789 +	printf("Oops! How to check %d?\n", e->type);
  45.790 +	return NULL;
  45.791 +}
  45.792 +
  45.793 +struct symbol *sym_check_deps(struct symbol *sym)
  45.794 +{
  45.795 +	struct symbol *sym2;
  45.796 +	struct property *prop;
  45.797 +
  45.798 +	if (sym->flags & SYMBOL_CHECK) {
  45.799 +		printf("Warning! Found recursive dependency: %s", sym->name);
  45.800 +		return sym;
  45.801 +	}
  45.802 +	if (sym->flags & SYMBOL_CHECKED)
  45.803 +		return NULL;
  45.804 +
  45.805 +	sym->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED);
  45.806 +	sym2 = sym_check_expr_deps(sym->rev_dep.expr);
  45.807 +	if (sym2)
  45.808 +		goto out;
  45.809 +
  45.810 +	for (prop = sym->prop; prop; prop = prop->next) {
  45.811 +		if (prop->type == P_CHOICE || prop->type == P_SELECT)
  45.812 +			continue;
  45.813 +		sym2 = sym_check_expr_deps(prop->visible.expr);
  45.814 +		if (sym2)
  45.815 +			goto out;
  45.816 +		if (prop->type != P_DEFAULT || sym_is_choice(sym))
  45.817 +			continue;
  45.818 +		sym2 = sym_check_expr_deps(prop->expr);
  45.819 +		if (sym2)
  45.820 +			goto out;
  45.821 +	}
  45.822 +out:
  45.823 +	if (sym2) {
  45.824 +		printf(" %s", sym->name);
  45.825 +		if (sym2 == sym) {
  45.826 +			printf("\n");
  45.827 +			sym2 = NULL;
  45.828 +		}
  45.829 +	}
  45.830 +	sym->flags &= ~SYMBOL_CHECK;
  45.831 +	return sym2;
  45.832 +}
  45.833 +
  45.834 +struct property *prop_alloc(enum prop_type type, struct symbol *sym)
  45.835 +{
  45.836 +	struct property *prop;
  45.837 +	struct property **propp;
  45.838 +
  45.839 +	prop = malloc(sizeof(*prop));
  45.840 +	memset(prop, 0, sizeof(*prop));
  45.841 +	prop->type = type;
  45.842 +	prop->sym = sym;
  45.843 +	prop->file = current_file;
  45.844 +	prop->lineno = zconf_lineno();
  45.845 +
  45.846 +	/* append property to the prop list of symbol */
  45.847 +	if (sym) {
  45.848 +		for (propp = &sym->prop; *propp; propp = &(*propp)->next)
  45.849 +			;
  45.850 +		*propp = prop;
  45.851 +	}
  45.852 +
  45.853 +	return prop;
  45.854 +}
  45.855 +
  45.856 +struct symbol *prop_get_symbol(struct property *prop)
  45.857 +{
  45.858 +	if (prop->expr && (prop->expr->type == E_SYMBOL ||
  45.859 +			   prop->expr->type == E_CHOICE))
  45.860 +		return prop->expr->left.sym;
  45.861 +	return NULL;
  45.862 +}
  45.863 +
  45.864 +const char *prop_get_type_name(enum prop_type type)
  45.865 +{
  45.866 +	switch (type) {
  45.867 +	case P_PROMPT:
  45.868 +		return "prompt";
  45.869 +	case P_COMMENT:
  45.870 +		return "comment";
  45.871 +	case P_MENU:
  45.872 +		return "menu";
  45.873 +	case P_DEFAULT:
  45.874 +		return "default";
  45.875 +	case P_CHOICE:
  45.876 +		return "choice";
  45.877 +	case P_SELECT:
  45.878 +		return "select";
  45.879 +	case P_RANGE:
  45.880 +		return "range";
  45.881 +	case P_UNKNOWN:
  45.882 +		break;
  45.883 +	}
  45.884 +	return "unknown";
  45.885 +}
    46.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    46.2 +++ b/kconfig/util.c	Sat Feb 24 11:00:05 2007 +0000
    46.3 @@ -0,0 +1,111 @@
    46.4 +/*
    46.5 + * Copyright (C) 2002-2005 Roman Zippel <zippel@linux-m68k.org>
    46.6 + * Copyright (C) 2002-2005 Sam Ravnborg <sam@ravnborg.org>
    46.7 + *
    46.8 + * Released under the terms of the GNU GPL v2.0.
    46.9 + */
   46.10 +
   46.11 +#include <string.h>
   46.12 +#include "lkc.h"
   46.13 +
   46.14 +/* file already present in list? If not add it */
   46.15 +struct file *file_lookup(const char *name)
   46.16 +{
   46.17 +	struct file *file;
   46.18 +
   46.19 +	for (file = file_list; file; file = file->next) {
   46.20 +		if (!strcmp(name, file->name))
   46.21 +			return file;
   46.22 +	}
   46.23 +
   46.24 +	file = malloc(sizeof(*file));
   46.25 +	memset(file, 0, sizeof(*file));
   46.26 +	file->name = strdup(name);
   46.27 +	file->next = file_list;
   46.28 +	file_list = file;
   46.29 +	return file;
   46.30 +}
   46.31 +
   46.32 +/* write a dependency file as used by kbuild to track dependencies */
   46.33 +int file_write_dep(const char *name)
   46.34 +{
   46.35 +	struct file *file;
   46.36 +	FILE *out;
   46.37 +
   46.38 +	if (!name)
   46.39 +		name = ".kconfig.d";
   46.40 +	out = fopen("..config.tmp", "w");
   46.41 +	if (!out)
   46.42 +		return 1;
   46.43 +	fprintf(out, "deps_config := \\\n");
   46.44 +	for (file = file_list; file; file = file->next) {
   46.45 +		if (file->next)
   46.46 +			fprintf(out, "\t%s \\\n", file->name);
   46.47 +		else
   46.48 +			fprintf(out, "\t%s\n", file->name);
   46.49 +	}
   46.50 +	fprintf(out, "\ninclude/config/auto.conf: \\\n"
   46.51 +		     "\t$(deps_config)\n\n"
   46.52 +		     "$(deps_config): ;\n");
   46.53 +	fclose(out);
   46.54 +	rename("..config.tmp", name);
   46.55 +	return 0;
   46.56 +}
   46.57 +
   46.58 +
   46.59 +/* Allocate initial growable sting */
   46.60 +struct gstr str_new(void)
   46.61 +{
   46.62 +	struct gstr gs;
   46.63 +	gs.s = malloc(sizeof(char) * 64);
   46.64 +	gs.len = 16;
   46.65 +	strcpy(gs.s, "\0");
   46.66 +	return gs;
   46.67 +}
   46.68 +
   46.69 +/* Allocate and assign growable string */
   46.70 +struct gstr str_assign(const char *s)
   46.71 +{
   46.72 +	struct gstr gs;
   46.73 +	gs.s = strdup(s);
   46.74 +	gs.len = strlen(s) + 1;
   46.75 +	return gs;
   46.76 +}
   46.77 +
   46.78 +/* Free storage for growable string */
   46.79 +void str_free(struct gstr *gs)
   46.80 +{
   46.81 +	if (gs->s)
   46.82 +		free(gs->s);
   46.83 +	gs->s = NULL;
   46.84 +	gs->len = 0;
   46.85 +}
   46.86 +
   46.87 +/* Append to growable string */
   46.88 +void str_append(struct gstr *gs, const char *s)
   46.89 +{
   46.90 +	size_t l = strlen(gs->s) + strlen(s) + 1;
   46.91 +	if (l > gs->len) {
   46.92 +		gs->s   = realloc(gs->s, l);
   46.93 +		gs->len = l;
   46.94 +	}
   46.95 +	strcat(gs->s, s);
   46.96 +}
   46.97 +
   46.98 +/* Append printf formatted string to growable string */
   46.99 +void str_printf(struct gstr *gs, const char *fmt, ...)
  46.100 +{
  46.101 +	va_list ap;
  46.102 +	char s[10000]; /* big enough... */
  46.103 +	va_start(ap, fmt);
  46.104 +	vsnprintf(s, sizeof(s), fmt, ap);
  46.105 +	str_append(gs, s);
  46.106 +	va_end(ap);
  46.107 +}
  46.108 +
  46.109 +/* Retrieve value of growable string */
  46.110 +const char *str_get(struct gstr *gs)
  46.111 +{
  46.112 +	return gs->s;
  46.113 +}
  46.114 +
    47.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    47.2 +++ b/kconfig/zconf.hash.c_shipped	Sat Feb 24 11:00:05 2007 +0000
    47.3 @@ -0,0 +1,242 @@
    47.4 +/* ANSI-C code produced by gperf version 3.0.1 */
    47.5 +/* Command-line: gperf  */
    47.6 +/* Computed positions: -k'1,3' */
    47.7 +
    47.8 +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
    47.9 +      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
   47.10 +      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
   47.11 +      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
   47.12 +      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
   47.13 +      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
   47.14 +      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
   47.15 +      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
   47.16 +      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
   47.17 +      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
   47.18 +      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
   47.19 +      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
   47.20 +      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
   47.21 +      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
   47.22 +      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
   47.23 +      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
   47.24 +      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
   47.25 +      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
   47.26 +      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
   47.27 +      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
   47.28 +      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
   47.29 +      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
   47.30 +      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
   47.31 +/* The character set is not based on ISO-646.  */
   47.32 +#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
   47.33 +#endif
   47.34 +
   47.35 +struct kconf_id;
   47.36 +/* maximum key range = 45, duplicates = 0 */
   47.37 +
   47.38 +#ifdef __GNUC__
   47.39 +__inline
   47.40 +#else
   47.41 +#ifdef __cplusplus
   47.42 +inline
   47.43 +#endif
   47.44 +#endif
   47.45 +static unsigned int
   47.46 +kconf_id_hash (register const char *str, register unsigned int len)
   47.47 +{
   47.48 +  static unsigned char asso_values[] =
   47.49 +    {
   47.50 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.51 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.52 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.53 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.54 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.55 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.56 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.57 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.58 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.59 +      47, 47, 47, 47, 47, 47, 47, 25, 30, 15,
   47.60 +       0, 15,  0, 47,  5, 15, 47, 47, 30, 20,
   47.61 +       5,  0, 25, 15,  0,  0, 10, 35, 47, 47,
   47.62 +       5, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.63 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.64 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.65 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.66 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.67 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.68 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.69 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.70 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.71 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.72 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.73 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.74 +      47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
   47.75 +      47, 47, 47, 47, 47, 47
   47.76 +    };
   47.77 +  register int hval = len;
   47.78 +
   47.79 +  switch (hval)
   47.80 +    {
   47.81 +      default:
   47.82 +        hval += asso_values[(unsigned char)str[2]];
   47.83 +      /*FALLTHROUGH*/
   47.84 +      case 2:
   47.85 +      case 1:
   47.86 +        hval += asso_values[(unsigned char)str[0]];
   47.87 +        break;
   47.88 +    }
   47.89 +  return hval;
   47.90 +}
   47.91 +
   47.92 +struct kconf_id_strings_t
   47.93 +  {
   47.94 +    char kconf_id_strings_str2[sizeof("on")];
   47.95 +    char kconf_id_strings_str6[sizeof("string")];
   47.96 +    char kconf_id_strings_str7[sizeof("default")];
   47.97 +    char kconf_id_strings_str8[sizeof("def_bool")];
   47.98 +    char kconf_id_strings_str10[sizeof("range")];
   47.99 +    char kconf_id_strings_str11[sizeof("def_boolean")];
  47.100 +    char kconf_id_strings_str12[sizeof("def_tristate")];
  47.101 +    char kconf_id_strings_str13[sizeof("hex")];
  47.102 +    char kconf_id_strings_str14[sizeof("defconfig_list")];
  47.103 +    char kconf_id_strings_str16[sizeof("option")];
  47.104 +    char kconf_id_strings_str17[sizeof("if")];
  47.105 +    char kconf_id_strings_str18[sizeof("optional")];
  47.106 +    char kconf_id_strings_str20[sizeof("endif")];
  47.107 +    char kconf_id_strings_str21[sizeof("choice")];
  47.108 +    char kconf_id_strings_str22[sizeof("endmenu")];
  47.109 +    char kconf_id_strings_str23[sizeof("requires")];
  47.110 +    char kconf_id_strings_str24[sizeof("endchoice")];
  47.111 +    char kconf_id_strings_str26[sizeof("config")];
  47.112 +    char kconf_id_strings_str27[sizeof("modules")];
  47.113 +    char kconf_id_strings_str28[sizeof("int")];
  47.114 +    char kconf_id_strings_str29[sizeof("menu")];
  47.115 +    char kconf_id_strings_str31[sizeof("prompt")];
  47.116 +    char kconf_id_strings_str32[sizeof("depends")];
  47.117 +    char kconf_id_strings_str33[sizeof("tristate")];
  47.118 +    char kconf_id_strings_str34[sizeof("bool")];
  47.119 +    char kconf_id_strings_str35[sizeof("menuconfig")];
  47.120 +    char kconf_id_strings_str36[sizeof("select")];
  47.121 +    char kconf_id_strings_str37[sizeof("boolean")];
  47.122 +    char kconf_id_strings_str39[sizeof("help")];
  47.123 +    char kconf_id_strings_str41[sizeof("source")];
  47.124 +    char kconf_id_strings_str42[sizeof("comment")];
  47.125 +    char kconf_id_strings_str43[sizeof("mainmenu")];
  47.126 +    char kconf_id_strings_str46[sizeof("enable")];
  47.127 +  };
  47.128 +static struct kconf_id_strings_t kconf_id_strings_contents =
  47.129 +  {
  47.130 +    "on",
  47.131 +    "string",
  47.132 +    "default",
  47.133 +    "def_bool",
  47.134 +    "range",
  47.135 +    "def_boolean",
  47.136 +    "def_tristate",
  47.137 +    "hex",
  47.138 +    "defconfig_list",
  47.139 +    "option",
  47.140 +    "if",
  47.141 +    "optional",
  47.142 +    "endif",
  47.143 +    "choice",
  47.144 +    "endmenu",
  47.145 +    "requires",
  47.146 +    "endchoice",
  47.147 +    "config",
  47.148 +    "modules",
  47.149 +    "int",
  47.150 +    "menu",
  47.151 +    "prompt",
  47.152 +    "depends",
  47.153 +    "tristate",
  47.154 +    "bool",
  47.155 +    "menuconfig",
  47.156 +    "select",
  47.157 +    "boolean",
  47.158 +    "help",
  47.159 +    "source",
  47.160 +    "comment",
  47.161 +    "mainmenu",
  47.162 +    "enable"
  47.163 +  };
  47.164 +#define kconf_id_strings ((const char *) &kconf_id_strings_contents)
  47.165 +#ifdef __GNUC__
  47.166 +__inline
  47.167 +#endif
  47.168 +struct kconf_id *
  47.169 +kconf_id_lookup (register const char *str, register unsigned int len)
  47.170 +{
  47.171 +  enum
  47.172 +    {
  47.173 +      TOTAL_KEYWORDS = 33,
  47.174 +      MIN_WORD_LENGTH = 2,
  47.175 +      MAX_WORD_LENGTH = 14,
  47.176 +      MIN_HASH_VALUE = 2,
  47.177 +      MAX_HASH_VALUE = 46
  47.178 +    };
  47.179 +
  47.180 +  static struct kconf_id wordlist[] =
  47.181 +    {
  47.182 +      {-1}, {-1},
  47.183 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2,		T_ON,		TF_PARAM},
  47.184 +      {-1}, {-1}, {-1},
  47.185 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6,		T_TYPE,		TF_COMMAND, S_STRING},
  47.186 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7,	T_DEFAULT,	TF_COMMAND, S_UNKNOWN},
  47.187 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8,	T_DEFAULT,	TF_COMMAND, S_BOOLEAN},
  47.188 +      {-1},
  47.189 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10,		T_RANGE,	TF_COMMAND},
  47.190 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11,	T_DEFAULT,	TF_COMMAND, S_BOOLEAN},
  47.191 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12,	T_DEFAULT,	TF_COMMAND, S_TRISTATE},
  47.192 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13,		T_TYPE,		TF_COMMAND, S_HEX},
  47.193 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14,	T_OPT_DEFCONFIG_LIST,TF_OPTION},
  47.194 +      {-1},
  47.195 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16,		T_OPTION,	TF_COMMAND},
  47.196 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17,		T_IF,		TF_COMMAND|TF_PARAM},
  47.197 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18,	T_OPTIONAL,	TF_COMMAND},
  47.198 +      {-1},
  47.199 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str20,		T_ENDIF,	TF_COMMAND},
  47.200 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21,		T_CHOICE,	TF_COMMAND},
  47.201 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22,	T_ENDMENU,	TF_COMMAND},
  47.202 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23,	T_REQUIRES,	TF_COMMAND},
  47.203 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str24,	T_ENDCHOICE,	TF_COMMAND},
  47.204 +      {-1},
  47.205 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26,		T_CONFIG,	TF_COMMAND},
  47.206 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27,	T_OPT_MODULES,	TF_OPTION},
  47.207 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28,		T_TYPE,		TF_COMMAND, S_INT},
  47.208 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29,		T_MENU,		TF_COMMAND},
  47.209 +      {-1},
  47.210 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31,		T_PROMPT,	TF_COMMAND},
  47.211 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32,	T_DEPENDS,	TF_COMMAND},
  47.212 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33,	T_TYPE,		TF_COMMAND, S_TRISTATE},
  47.213 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str34,		T_TYPE,		TF_COMMAND, S_BOOLEAN},
  47.214 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35,	T_MENUCONFIG,	TF_COMMAND},
  47.215 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36,		T_SELECT,	TF_COMMAND},
  47.216 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37,	T_TYPE,		TF_COMMAND, S_BOOLEAN},
  47.217 +      {-1},
  47.218 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39,		T_HELP,		TF_COMMAND},
  47.219 +      {-1},
  47.220 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41,		T_SOURCE,	TF_COMMAND},
  47.221 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42,	T_COMMENT,	TF_COMMAND},
  47.222 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43,	T_MAINMENU,	TF_COMMAND},
  47.223 +      {-1}, {-1},
  47.224 +      {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46,		T_SELECT,	TF_COMMAND}
  47.225 +    };
  47.226 +
  47.227 +  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
  47.228 +    {
  47.229 +      register int key = kconf_id_hash (str, len);
  47.230 +
  47.231 +      if (key <= MAX_HASH_VALUE && key >= 0)
  47.232 +        {
  47.233 +          register int o = wordlist[key].name;
  47.234 +          if (o >= 0)
  47.235 +            {
  47.236 +              register const char *s = o + kconf_id_strings;
  47.237 +
  47.238 +              if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
  47.239 +                return &wordlist[key];
  47.240 +            }
  47.241 +        }
  47.242 +    }
  47.243 +  return 0;
  47.244 +}
  47.245 +
    48.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    48.2 +++ b/kconfig/zconf.tab.c_shipped	Sat Feb 24 11:00:05 2007 +0000
    48.3 @@ -0,0 +1,2345 @@
    48.4 +/* A Bison parser, made by GNU Bison 2.1.  */
    48.5 +
    48.6 +/* Skeleton parser for Yacc-like parsing with Bison,
    48.7 +   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
    48.8 +
    48.9 +   This program is free software; you can redistribute it and/or modify
   48.10 +   it under the terms of the GNU General Public License as published by
   48.11 +   the Free Software Foundation; either version 2, or (at your option)
   48.12 +   any later version.
   48.13 +
   48.14 +   This program is distributed in the hope that it will be useful,
   48.15 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
   48.16 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   48.17 +   GNU General Public License for more details.
   48.18 +
   48.19 +   You should have received a copy of the GNU General Public License
   48.20 +   along with this program; if not, write to the Free Software
   48.21 +   Foundation, Inc., 51 Franklin Street, Fifth Floor,
   48.22 +   Boston, MA 02110-1301, USA.  */
   48.23 +
   48.24 +/* As a special exception, when this file is copied by Bison into a
   48.25 +   Bison output file, you may use that output file without restriction.
   48.26 +   This special exception was added by the Free Software Foundation
   48.27 +   in version 1.24 of Bison.  */
   48.28 +
   48.29 +/* Written by Richard Stallman by simplifying the original so called
   48.30 +   ``semantic'' parser.  */
   48.31 +
   48.32 +/* All symbols defined below should begin with yy or YY, to avoid
   48.33 +   infringing on user name space.  This should be done even for local
   48.34 +   variables, as they might otherwise be expanded by user macros.
   48.35 +   There are some unavoidable exceptions within include files to
   48.36 +   define necessary library symbols; they are noted "INFRINGES ON
   48.37 +   USER NAME SPACE" below.  */
   48.38 +
   48.39 +/* Identify Bison output.  */
   48.40 +#define YYBISON 1
   48.41 +
   48.42 +/* Bison version.  */
   48.43 +#define YYBISON_VERSION "2.1"
   48.44 +
   48.45 +/* Skeleton name.  */
   48.46 +#define YYSKELETON_NAME "yacc.c"
   48.47 +
   48.48 +/* Pure parsers.  */
   48.49 +#define YYPURE 0
   48.50 +
   48.51 +/* Using locations.  */
   48.52 +#define YYLSP_NEEDED 0
   48.53 +
   48.54 +/* Substitute the variable and function names.  */
   48.55 +#define yyparse zconfparse
   48.56 +#define yylex   zconflex
   48.57 +#define yyerror zconferror
   48.58 +#define yylval  zconflval
   48.59 +#define yychar  zconfchar
   48.60 +#define yydebug zconfdebug
   48.61 +#define yynerrs zconfnerrs
   48.62 +
   48.63 +
   48.64 +/* Tokens.  */
   48.65 +#ifndef YYTOKENTYPE
   48.66 +# define YYTOKENTYPE
   48.67 +   /* Put the tokens into the symbol table, so that GDB and other debuggers
   48.68 +      know about them.  */
   48.69 +   enum yytokentype {
   48.70 +     T_MAINMENU = 258,
   48.71 +     T_MENU = 259,
   48.72 +     T_ENDMENU = 260,
   48.73 +     T_SOURCE = 261,
   48.74 +     T_CHOICE = 262,
   48.75 +     T_ENDCHOICE = 263,
   48.76 +     T_COMMENT = 264,
   48.77 +     T_CONFIG = 265,
   48.78 +     T_MENUCONFIG = 266,
   48.79 +     T_HELP = 267,
   48.80 +     T_HELPTEXT = 268,
   48.81 +     T_IF = 269,
   48.82 +     T_ENDIF = 270,
   48.83 +     T_DEPENDS = 271,
   48.84 +     T_REQUIRES = 272,
   48.85 +     T_OPTIONAL = 273,
   48.86 +     T_PROMPT = 274,
   48.87 +     T_TYPE = 275,
   48.88 +     T_DEFAULT = 276,
   48.89 +     T_SELECT = 277,
   48.90 +     T_RANGE = 278,
   48.91 +     T_OPTION = 279,
   48.92 +     T_ON = 280,
   48.93 +     T_WORD = 281,
   48.94 +     T_WORD_QUOTE = 282,
   48.95 +     T_UNEQUAL = 283,
   48.96 +     T_CLOSE_PAREN = 284,
   48.97 +     T_OPEN_PAREN = 285,
   48.98 +     T_EOL = 286,
   48.99 +     T_OR = 287,
  48.100 +     T_AND = 288,
  48.101 +     T_EQUAL = 289,
  48.102 +     T_NOT = 290
  48.103 +   };
  48.104 +#endif
  48.105 +/* Tokens.  */
  48.106 +#define T_MAINMENU 258
  48.107 +#define T_MENU 259
  48.108 +#define T_ENDMENU 260
  48.109 +#define T_SOURCE 261
  48.110 +#define T_CHOICE 262
  48.111 +#define T_ENDCHOICE 263
  48.112 +#define T_COMMENT 264
  48.113 +#define T_CONFIG 265
  48.114 +#define T_MENUCONFIG 266
  48.115 +#define T_HELP 267
  48.116 +#define T_HELPTEXT 268
  48.117 +#define T_IF 269
  48.118 +#define T_ENDIF 270
  48.119 +#define T_DEPENDS 271
  48.120 +#define T_REQUIRES 272
  48.121 +#define T_OPTIONAL 273
  48.122 +#define T_PROMPT 274
  48.123 +#define T_TYPE 275
  48.124 +#define T_DEFAULT 276
  48.125 +#define T_SELECT 277
  48.126 +#define T_RANGE 278
  48.127 +#define T_OPTION 279
  48.128 +#define T_ON 280
  48.129 +#define T_WORD 281
  48.130 +#define T_WORD_QUOTE 282
  48.131 +#define T_UNEQUAL 283
  48.132 +#define T_CLOSE_PAREN 284
  48.133 +#define T_OPEN_PAREN 285
  48.134 +#define T_EOL 286
  48.135 +#define T_OR 287
  48.136 +#define T_AND 288
  48.137 +#define T_EQUAL 289
  48.138 +#define T_NOT 290
  48.139 +
  48.140 +
  48.141 +
  48.142 +
  48.143 +/* Copy the first part of user declarations.  */
  48.144 +
  48.145 +
  48.146 +/*
  48.147 + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
  48.148 + * Released under the terms of the GNU GPL v2.0.
  48.149 + */
  48.150 +
  48.151 +#include <ctype.h>
  48.152 +#include <stdarg.h>
  48.153 +#include <stdio.h>
  48.154 +#include <stdlib.h>
  48.155 +#include <string.h>
  48.156 +#include <stdbool.h>
  48.157 +
  48.158 +#define LKC_DIRECT_LINK
  48.159 +#include "lkc.h"
  48.160 +
  48.161 +#include "zconf.hash.c"
  48.162 +
  48.163 +#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
  48.164 +
  48.165 +#define PRINTD		0x0001
  48.166 +#define DEBUG_PARSE	0x0002
  48.167 +
  48.168 +int cdebug = PRINTD;
  48.169 +
  48.170 +extern int zconflex(void);
  48.171 +static void zconfprint(const char *err, ...);
  48.172 +static void zconf_error(const char *err, ...);
  48.173 +static void zconferror(const char *err);
  48.174 +static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken);
  48.175 +
  48.176 +struct symbol *symbol_hash[257];
  48.177 +
  48.178 +static struct menu *current_menu, *current_entry;
  48.179 +
  48.180 +#define YYDEBUG 0
  48.181 +#if YYDEBUG
  48.182 +#define YYERROR_VERBOSE
  48.183 +#endif
  48.184 +
  48.185 +
  48.186 +/* Enabling traces.  */
  48.187 +#ifndef YYDEBUG
  48.188 +# define YYDEBUG 0
  48.189 +#endif
  48.190 +
  48.191 +/* Enabling verbose error messages.  */
  48.192 +#ifdef YYERROR_VERBOSE
  48.193 +# undef YYERROR_VERBOSE
  48.194 +# define YYERROR_VERBOSE 1
  48.195 +#else
  48.196 +# define YYERROR_VERBOSE 0
  48.197 +#endif
  48.198 +
  48.199 +/* Enabling the token table.  */
  48.200 +#ifndef YYTOKEN_TABLE
  48.201 +# define YYTOKEN_TABLE 0
  48.202 +#endif
  48.203 +
  48.204 +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
  48.205 +
  48.206 +typedef union YYSTYPE {
  48.207 +	char *string;
  48.208 +	struct file *file;
  48.209 +	struct symbol *symbol;
  48.210 +	struct expr *expr;
  48.211 +	struct menu *menu;
  48.212 +	struct kconf_id *id;
  48.213 +} YYSTYPE;
  48.214 +/* Line 196 of yacc.c.  */
  48.215 +
  48.216 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
  48.217 +# define YYSTYPE_IS_DECLARED 1
  48.218 +# define YYSTYPE_IS_TRIVIAL 1
  48.219 +#endif
  48.220 +
  48.221 +
  48.222 +
  48.223 +/* Copy the second part of user declarations.  */
  48.224 +
  48.225 +
  48.226 +/* Line 219 of yacc.c.  */
  48.227 +
  48.228 +
  48.229 +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
  48.230 +# define YYSIZE_T __SIZE_TYPE__
  48.231 +#endif
  48.232 +#if ! defined (YYSIZE_T) && defined (size_t)
  48.233 +# define YYSIZE_T size_t
  48.234 +#endif
  48.235 +#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
  48.236 +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  48.237 +# define YYSIZE_T size_t
  48.238 +#endif
  48.239 +#if ! defined (YYSIZE_T)
  48.240 +# define YYSIZE_T unsigned int
  48.241 +#endif
  48.242 +
  48.243 +#ifndef YY_
  48.244 +# if YYENABLE_NLS
  48.245 +#  if ENABLE_NLS
  48.246 +#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
  48.247 +#   define YY_(msgid) dgettext ("bison-runtime", msgid)
  48.248 +#  endif
  48.249 +# endif
  48.250 +# ifndef YY_
  48.251 +#  define YY_(msgid) msgid
  48.252 +# endif
  48.253 +#endif
  48.254 +
  48.255 +#if ! defined (yyoverflow) || YYERROR_VERBOSE
  48.256 +
  48.257 +/* The parser invokes alloca or malloc; define the necessary symbols.  */
  48.258 +
  48.259 +# ifdef YYSTACK_USE_ALLOCA
  48.260 +#  if YYSTACK_USE_ALLOCA
  48.261 +#   ifdef __GNUC__
  48.262 +#    define YYSTACK_ALLOC __builtin_alloca
  48.263 +#   else
  48.264 +#    define YYSTACK_ALLOC alloca
  48.265 +#    if defined (__STDC__) || defined (__cplusplus)
  48.266 +#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  48.267 +#     define YYINCLUDED_STDLIB_H
  48.268 +#    endif
  48.269 +#   endif
  48.270 +#  endif
  48.271 +# endif
  48.272 +
  48.273 +# ifdef YYSTACK_ALLOC
  48.274 +   /* Pacify GCC's `empty if-body' warning. */
  48.275 +#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
  48.276 +#  ifndef YYSTACK_ALLOC_MAXIMUM
  48.277 +    /* The OS might guarantee only one guard page at the bottom of the stack,
  48.278 +       and a page size can be as small as 4096 bytes.  So we cannot safely
  48.279 +       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
  48.280 +       to allow for a few compiler-allocated temporary stack slots.  */
  48.281 +#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
  48.282 +#  endif
  48.283 +# else
  48.284 +#  define YYSTACK_ALLOC YYMALLOC
  48.285 +#  define YYSTACK_FREE YYFREE
  48.286 +#  ifndef YYSTACK_ALLOC_MAXIMUM
  48.287 +#   define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
  48.288 +#  endif
  48.289 +#  ifdef __cplusplus
  48.290 +extern "C" {
  48.291 +#  endif
  48.292 +#  ifndef YYMALLOC
  48.293 +#   define YYMALLOC malloc
  48.294 +#   if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
  48.295 +	&& (defined (__STDC__) || defined (__cplusplus)))
  48.296 +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
  48.297 +#   endif
  48.298 +#  endif
  48.299 +#  ifndef YYFREE
  48.300 +#   define YYFREE free
  48.301 +#   if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
  48.302 +	&& (defined (__STDC__) || defined (__cplusplus)))
  48.303 +void free (void *); /* INFRINGES ON USER NAME SPACE */
  48.304 +#   endif
  48.305 +#  endif
  48.306 +#  ifdef __cplusplus
  48.307 +}
  48.308 +#  endif
  48.309 +# endif
  48.310 +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
  48.311 +
  48.312 +
  48.313 +#if (! defined (yyoverflow) \
  48.314 +     && (! defined (__cplusplus) \
  48.315 +	 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
  48.316 +
  48.317 +/* A type that is properly aligned for any stack member.  */
  48.318 +union yyalloc
  48.319 +{
  48.320 +  short int yyss;
  48.321 +  YYSTYPE yyvs;
  48.322 +  };
  48.323 +
  48.324 +/* The size of the maximum gap between one aligned stack and the next.  */
  48.325 +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
  48.326 +
  48.327 +/* The size of an array large to enough to hold all stacks, each with
  48.328 +   N elements.  */
  48.329 +# define YYSTACK_BYTES(N) \
  48.330 +     ((N) * (sizeof (short int) + sizeof (YYSTYPE))			\
  48.331 +      + YYSTACK_GAP_MAXIMUM)
  48.332 +
  48.333 +/* Copy COUNT objects from FROM to TO.  The source and destination do
  48.334 +   not overlap.  */
  48.335 +# ifndef YYCOPY
  48.336 +#  if defined (__GNUC__) && 1 < __GNUC__
  48.337 +#   define YYCOPY(To, From, Count) \
  48.338 +      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
  48.339 +#  else
  48.340 +#   define YYCOPY(To, From, Count)		\
  48.341 +      do					\
  48.342 +	{					\
  48.343 +	  YYSIZE_T yyi;				\
  48.344 +	  for (yyi = 0; yyi < (Count); yyi++)	\
  48.345 +	    (To)[yyi] = (From)[yyi];		\
  48.346 +	}					\
  48.347 +      while (0)
  48.348 +#  endif
  48.349 +# endif
  48.350 +
  48.351 +/* Relocate STACK from its old location to the new one.  The
  48.352 +   local variables YYSIZE and YYSTACKSIZE give the old and new number of
  48.353 +   elements in the stack, and YYPTR gives the new location of the
  48.354 +   stack.  Advance YYPTR to a properly aligned location for the next
  48.355 +   stack.  */
  48.356 +# define YYSTACK_RELOCATE(Stack)					\
  48.357 +    do									\
  48.358 +      {									\
  48.359 +	YYSIZE_T yynewbytes;						\
  48.360 +	YYCOPY (&yyptr->Stack, Stack, yysize);				\
  48.361 +	Stack = &yyptr->Stack;						\
  48.362 +	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
  48.363 +	yyptr += yynewbytes / sizeof (*yyptr);				\
  48.364 +      }									\
  48.365 +    while (0)
  48.366 +
  48.367 +#endif
  48.368 +
  48.369 +#if defined (__STDC__) || defined (__cplusplus)
  48.370 +   typedef signed char yysigned_char;
  48.371 +#else
  48.372 +   typedef short int yysigned_char;
  48.373 +#endif
  48.374 +
  48.375 +/* YYFINAL -- State number of the termination state. */
  48.376 +#define YYFINAL  3
  48.377 +/* YYLAST -- Last index in YYTABLE.  */
  48.378 +#define YYLAST   275
  48.379 +
  48.380 +/* YYNTOKENS -- Number of terminals. */
  48.381 +#define YYNTOKENS  36
  48.382 +/* YYNNTS -- Number of nonterminals. */
  48.383 +#define YYNNTS  45
  48.384 +/* YYNRULES -- Number of rules. */
  48.385 +#define YYNRULES  110
  48.386 +/* YYNRULES -- Number of states. */
  48.387 +#define YYNSTATES  183
  48.388 +
  48.389 +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
  48.390 +#define YYUNDEFTOK  2
  48.391 +#define YYMAXUTOK   290
  48.392 +
  48.393 +#define YYTRANSLATE(YYX)						\
  48.394 +  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
  48.395 +
  48.396 +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
  48.397 +static const unsigned char yytranslate[] =
  48.398 +{
  48.399 +       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.400 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.401 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.402 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.403 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.404 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.405 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.406 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.407 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.408 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.409 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.410 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.411 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.412 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.413 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.414 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.415 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.416 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.417 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.418 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.419 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.420 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.421 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.422 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.423 +       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  48.424 +       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
  48.425 +       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
  48.426 +      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
  48.427 +      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
  48.428 +      35
  48.429 +};
  48.430 +
  48.431 +#if YYDEBUG
  48.432 +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
  48.433 +   YYRHS.  */
  48.434 +static const unsigned short int yyprhs[] =
  48.435 +{
  48.436 +       0,     0,     3,     5,     6,     9,    12,    15,    20,    23,
  48.437 +      28,    33,    37,    39,    41,    43,    45,    47,    49,    51,
  48.438 +      53,    55,    57,    59,    61,    63,    67,    70,    74,    77,
  48.439 +      81,    84,    85,    88,    91,    94,    97,   100,   103,   107,
  48.440 +     112,   117,   122,   128,   132,   133,   137,   138,   141,   144,
  48.441 +     147,   149,   153,   154,   157,   160,   163,   166,   169,   174,
  48.442 +     178,   181,   186,   187,   190,   194,   196,   200,   201,   204,
  48.443 +     207,   210,   214,   217,   219,   223,   224,   227,   230,   233,
  48.444 +     237,   241,   244,   247,   250,   251,   254,   257,   260,   265,
  48.445 +     269,   273,   274,   277,   279,   281,   284,   287,   290,   292,
  48.446 +     295,   296,   299,   301,   305,   309,   313,   316,   320,   324,
  48.447 +     326
  48.448 +};
  48.449 +
  48.450 +/* YYRHS -- A `-1'-separated list of the rules' RHS. */
  48.451 +static const yysigned_char yyrhs[] =
  48.452 +{
  48.453 +      37,     0,    -1,    38,    -1,    -1,    38,    40,    -1,    38,
  48.454 +      54,    -1,    38,    65,    -1,    38,     3,    75,    77,    -1,
  48.455 +      38,    76,    -1,    38,    26,     1,    31,    -1,    38,    39,
  48.456 +       1,    31,    -1,    38,     1,    31,    -1,    16,    -1,    19,
  48.457 +      -1,    20,    -1,    22,    -1,    18,    -1,    23,    -1,    21,
  48.458 +      -1,    31,    -1,    60,    -1,    69,    -1,    43,    -1,    45,
  48.459 +      -1,    67,    -1,    26,     1,    31,    -1,     1,    31,    -1,
  48.460 +      10,    26,    31,    -1,    42,    46,    -1,    11,    26,    31,
  48.461 +      -1,    44,    46,    -1,    -1,    46,    47,    -1,    46,    48,
  48.462 +      -1,    46,    73,    -1,    46,    71,    -1,    46,    41,    -1,
  48.463 +      46,    31,    -1,    20,    74,    31,    -1,    19,    75,    78,
  48.464 +      31,    -1,    21,    79,    78,    31,    -1,    22,    26,    78,
  48.465 +      31,    -1,    23,    80,    80,    78,    31,    -1,    24,    49,
  48.466 +      31,    -1,    -1,    49,    26,    50,    -1,    -1,    34,    75,
  48.467 +      -1,     7,    31,    -1,    51,    55,    -1,    76,    -1,    52,
  48.468 +      57,    53,    -1,    -1,    55,    56,    -1,    55,    73,    -1,
  48.469 +      55,    71,    -1,    55,    31,    -1,    55,    41,    -1,    19,
  48.470 +      75,    78,    31,    -1,    20,    74,    31,    -1,    18,    31,
  48.471 +      -1,    21,    26,    78,    31,    -1,    -1,    57,    40,    -1,
  48.472 +      14,    79,    77,    -1,    76,    -1,    58,    61,    59,    -1,
  48.473 +      -1,    61,    40,    -1,    61,    65,    -1,    61,    54,    -1,
  48.474 +       4,    75,    31,    -1,    62,    72,    -1,    76,    -1,    63,
  48.475 +      66,    64,    -1,    -1,    66,    40,    -1,    66,    65,    -1,
  48.476 +      66,    54,    -1,     6,    75,    31,    -1,     9,    75,    31,
  48.477 +      -1,    68,    72,    -1,    12,    31,    -1,    70,    13,    -1,
  48.478 +      -1,    72,    73,    -1,    72,    31,    -1,    72,    41,    -1,
  48.479 +      16,    25,    79,    31,    -1,    16,    79,    31,    -1,    17,
  48.480 +      79,    31,    -1,    -1,    75,    78,    -1,    26,    -1,    27,
  48.481 +      -1,     5,    31,    -1,     8,    31,    -1,    15,    31,    -1,
  48.482 +      31,    -1,    77,    31,    -1,    -1,    14,    79,    -1,    80,
  48.483 +      -1,    80,    34,    80,    -1,    80,    28,    80,    -1,    30,
  48.484 +      79,    29,    -1,    35,    79,    -1,    79,    32,    79,    -1,
  48.485 +      79,    33,    79,    -1,    26,    -1,    27,    -1
  48.486 +};
  48.487 +
  48.488 +/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
  48.489 +static const unsigned short int yyrline[] =
  48.490 +{
  48.491 +       0,   105,   105,   107,   109,   110,   111,   112,   113,   114,
  48.492 +     115,   119,   123,   123,   123,   123,   123,   123,   123,   127,
  48.493 +     128,   129,   130,   131,   132,   136,   137,   143,   151,   157,
  48.494 +     165,   175,   177,   178,   179,   180,   181,   182,   185,   193,
  48.495 +     199,   209,   215,   221,   224,   226,   237,   238,   243,   252,
  48.496 +     257,   265,   268,   270,   271,   272,   273,   274,   277,   283,
  48.497 +     294,   300,   310,   312,   317,   325,   333,   336,   338,   339,
  48.498 +     340,   345,   352,   357,   365,   368,   370,   371,   372,   375,
  48.499 +     383,   390,   397,   403,   410,   412,   413,   414,   417,   422,
  48.500 +     427,   435,   437,   442,   443,   446,   447,   448,   452,   453,
  48.501 +     456,   457,   460,   461,   462,   463,   464,   465,   466,   469,
  48.502 +     470
  48.503 +};
  48.504 +#endif
  48.505 +
  48.506 +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
  48.507 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  48.508 +   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
  48.509 +static const char *const yytname[] =
  48.510 +{
  48.511 +  "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU",
  48.512 +  "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG",
  48.513 +  "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS",
  48.514 +  "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT",
  48.515 +  "T_SELECT", "T_RANGE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE",
  48.516 +  "T_UNEQUAL", "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND",
  48.517 +  "T_EQUAL", "T_NOT", "$accept", "input", "stmt_list", "option_name",
  48.518 +  "common_stmt", "option_error", "config_entry_start", "config_stmt",
  48.519 +  "menuconfig_entry_start", "menuconfig_stmt", "config_option_list",
  48.520 +  "config_option", "symbol_option", "symbol_option_list",
  48.521 +  "symbol_option_arg", "choice", "choice_entry", "choice_end",
  48.522 +  "choice_stmt", "choice_option_list", "choice_option", "choice_block",
  48.523 +  "if_entry", "if_end", "if_stmt", "if_block", "menu", "menu_entry",
  48.524 +  "menu_end", "menu_stmt", "menu_block", "source_stmt", "comment",
  48.525 +  "comment_stmt", "help_start", "help", "depends_list", "depends",
  48.526 +  "prompt_stmt_opt", "prompt", "end", "nl", "if_expr", "expr", "symbol", 0
  48.527 +};
  48.528 +#endif
  48.529 +
  48.530 +# ifdef YYPRINT
  48.531 +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
  48.532 +   token YYLEX-NUM.  */
  48.533 +static const unsigned short int yytoknum[] =
  48.534 +{
  48.535 +       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
  48.536 +     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
  48.537 +     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
  48.538 +     285,   286,   287,   288,   289,   290
  48.539 +};
  48.540 +# endif
  48.541 +
  48.542 +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
  48.543 +static const unsigned char yyr1[] =
  48.544 +{
  48.545 +       0,    36,    37,    38,    38,    38,    38,    38,    38,    38,
  48.546 +      38,    38,    39,    39,    39,    39,    39,    39,    39,    40,
  48.547 +      40,    40,    40,    40,    40,    41,    41,    42,    43,    44,
  48.548 +      45,    46,    46,    46,    46,    46,    46,    46,    47,    47,
  48.549 +      47,    47,    47,    48,    49,    49,    50,    50,    51,    52,
  48.550 +      53,    54,    55,    55,    55,    55,    55,    55,    56,    56,
  48.551 +      56,    56,    57,    57,    58,    59,    60,    61,    61,    61,
  48.552 +      61,    62,    63,    64,    65,    66,    66,    66,    66,    67,
  48.553 +      68,    69,    70,    71,    72,    72,    72,    72,    73,    73,
  48.554 +      73,    74,    74,    75,    75,    76,    76,    76,    77,    77,
  48.555 +      78,    78,    79,    79,    79,    79,    79,    79,    79,    80,
  48.556 +      80
  48.557 +};
  48.558 +
  48.559 +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
  48.560 +static const unsigned char yyr2[] =
  48.561 +{
  48.562 +       0,     2,     1,     0,     2,     2,     2,     4,     2,     4,
  48.563 +       4,     3,     1,     1,     1,     1,     1,     1,     1,     1,
  48.564 +       1,     1,     1,     1,     1,     3,     2,     3,     2,     3,
  48.565 +       2,     0,     2,     2,     2,     2,     2,     2,     3,     4,
  48.566 +       4,     4,     5,     3,     0,     3,     0,     2,     2,     2,
  48.567 +       1,     3,     0,     2,     2,     2,     2,     2,     4,     3,
  48.568 +       2,     4,     0,     2,     3,     1,     3,     0,     2,     2,
  48.569 +       2,     3,     2,     1,     3,     0,     2,     2,     2,     3,
  48.570 +       3,     2,     2,     2,     0,     2,     2,     2,     4,     3,
  48.571 +       3,     0,     2,     1,     1,     2,     2,     2,     1,     2,
  48.572 +       0,     2,     1,     3,     3,     3,     2,     3,     3,     1,
  48.573 +       1
  48.574 +};
  48.575 +
  48.576 +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
  48.577 +   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
  48.578 +   means the default is an error.  */
  48.579 +static const unsigned char yydefact[] =
  48.580 +{
  48.581 +       3,     0,     0,     1,     0,     0,     0,     0,     0,     0,
  48.582 +       0,     0,     0,     0,     0,     0,    12,    16,    13,    14,
  48.583 +      18,    15,    17,     0,    19,     0,     4,    31,    22,    31,
  48.584 +      23,    52,    62,     5,    67,    20,    84,    75,     6,    24,
  48.585 +      84,    21,     8,    11,    93,    94,     0,     0,    95,     0,
  48.586 +      48,    96,     0,     0,     0,   109,   110,     0,     0,     0,
  48.587 +     102,    97,     0,     0,     0,     0,     0,     0,     0,     0,
  48.588 +       0,     0,    98,     7,    71,    79,    80,    27,    29,     0,
  48.589 +     106,     0,     0,    64,     0,     0,     9,    10,     0,     0,
  48.590 +       0,     0,     0,    91,     0,     0,     0,    44,     0,    37,
  48.591 +      36,    32,    33,     0,    35,    34,     0,     0,    91,     0,
  48.592 +      56,    57,    53,    55,    54,    63,    51,    50,    68,    70,
  48.593 +      66,    69,    65,    86,    87,    85,    76,    78,    74,    77,
  48.594 +      73,    99,   105,   107,   108,   104,   103,    26,    82,     0,
  48.595 +       0,     0,   100,     0,   100,   100,   100,     0,     0,     0,
  48.596 +      83,    60,   100,     0,   100,     0,    89,    90,     0,     0,
  48.597 +      38,    92,     0,     0,   100,    46,    43,    25,     0,    59,
  48.598 +       0,    88,   101,    39,    40,    41,     0,     0,    45,    58,
  48.599 +      61,    42,    47
  48.600 +};
  48.601 +
  48.602 +/* YYDEFGOTO[NTERM-NUM]. */
  48.603 +static const short int yydefgoto[] =
  48.604 +{
  48.605 +      -1,     1,     2,    25,    26,   100,    27,    28,    29,    30,
  48.606 +      64,   101,   102,   148,   178,    31,    32,   116,    33,    66,
  48.607 +     112,    67,    34,   120,    35,    68,    36,    37,   128,    38,
  48.608 +      70,    39,    40,    41,   103,   104,    69,   105,   143,   144,
  48.609 +      42,    73,   159,    59,    60
  48.610 +};
  48.611 +
  48.612 +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  48.613 +   STATE-NUM.  */
  48.614 +#define YYPACT_NINF -135
  48.615 +static const short int yypact[] =
  48.616 +{
  48.617 +    -135,     2,   170,  -135,   -14,    56,    56,    -8,    56,    24,
  48.618 +      67,    56,     7,    14,    62,    97,  -135,  -135,  -135,  -135,
  48.619 +    -135,  -135,  -135,   156,  -135,   166,  -135,  -135,  -135,  -135,
  48.620 +    -135,  -135,  -135,  -135,  -135,  -135,  -135,  -135,  -135,  -135,
  48.621 +    -135,  -135,  -135,  -135,  -135,  -135,   138,   151,  -135,   152,
  48.622 +    -135,  -135,   163,   167,   176,  -135,  -135,    62,    62,   185,
  48.623 +     -19,  -135,   188,   190,    42,   103,   194,    85,    70,   222,
  48.624 +      70,   132,  -135,   191,  -135,  -135,  -135,  -135,  -135,   127,
  48.625 +    -135,    62,    62,   191,   104,   104,  -135,  -135,   193,   203,
  48.626 +       9,    62,    56,    56,    62,   161,   104,  -135,   196,  -135,
  48.627 +    -135,  -135,  -135,   233,  -135,  -135,   204,    56,    56,   221,
  48.628 +    -135,  -135,  -135,  -135,  -135,  -135,  -135,  -135,  -135,  -135,
  48.629 +    -135,  -135,  -135,  -135,  -135,  -135,  -135,  -135,  -135,  -135,
  48.630 +    -135,  -135,  -135,   219,  -135,  -135,  -135,  -135,  -135,    62,
  48.631 +     209,   212,   240,   224,   240,    -1,   240,   104,    41,   225,
  48.632 +    -135,  -135,   240,   226,   240,   218,  -135,  -135,    62,   227,
  48.633 +    -135,  -135,   228,   229,   240,   230,  -135,  -135,   231,  -135,
  48.634 +     232,  -135,   112,  -135,  -135,  -135,   234,    56,  -135,  -135,
  48.635 +    -135,  -135,  -135
  48.636 +};
  48.637 +
  48.638 +/* YYPGOTO[NTERM-NUM].  */
  48.639 +static const short int yypgoto[] =
  48.640 +{
  48.641 +    -135,  -135,  -135,  -135,    94,   -45,  -135,  -135,  -135,  -135,
  48.642 +     237,  -135,  -135,  -135,  -135,  -135,  -135,  -135,   -54,  -135,
  48.643 +    -135,  -135,  -135,  -135,  -135,  -135,  -135,  -135,  -135,     1,
  48.644 +    -135,  -135,  -135,  -135,  -135,   195,   235,   -44,   159,    -5,
  48.645 +      98,   210,  -134,   -53,   -77
  48.646 +};
  48.647 +
  48.648 +/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
  48.649 +   positive, shift that token.  If negative, reduce the rule which
  48.650 +   number is the opposite.  If zero, do what YYDEFACT says.
  48.651 +   If YYTABLE_NINF, syntax error.  */
  48.652 +#define YYTABLE_NINF -82
  48.653 +static const short int yytable[] =
  48.654 +{
  48.655 +      46,    47,     3,    49,    79,    80,    52,   135,   136,    84,
  48.656 +     161,   162,   163,   158,   119,    85,   127,    43,   168,   147,
  48.657 +     170,   111,   114,    48,   124,   125,   124,   125,   133,   134,
  48.658 +     176,    81,    82,    53,   139,    55,    56,   140,   141,    57,
  48.659 +      54,   145,   -28,    88,    58,   -28,   -28,   -28,   -28,   -28,
  48.660 +     -28,   -28,   -28,   -28,    89,    50,   -28,   -28,    90,    91,
  48.661 +     -28,    92,    93,    94,    95,    96,    97,   165,    98,   121,
  48.662 +     164,   129,   166,    99,     6,     7,     8,     9,    10,    11,
  48.663 +      12,    13,    44,    45,    14,    15,   155,   142,    55,    56,
  48.664 +       7,     8,    57,    10,    11,    12,    13,    58,    51,    14,
  48.665 +      15,    24,   152,   -30,    88,   172,   -30,   -30,   -30,   -30,
  48.666 +     -30,   -30,   -30,   -30,   -30,    89,    24,   -30,   -30,    90,
  48.667 +      91,   -30,    92,    93,    94,    95,    96,    97,    61,    98,
  48.668 +      55,    56,   -81,    88,    99,   -81,   -81,   -81,   -81,   -81,
  48.669 +     -81,   -81,   -81,   -81,    81,    82,   -81,   -81,    90,    91,
  48.670 +     -81,   -81,   -81,   -81,   -81,   -81,   132,    62,    98,    81,
  48.671 +      82,   115,   118,   123,   126,   117,   122,    63,   130,    72,
  48.672 +      -2,     4,   182,     5,     6,     7,     8,     9,    10,    11,
  48.673 +      12,    13,    74,    75,    14,    15,    16,   146,    17,    18,
  48.674 +      19,    20,    21,    22,    76,    88,    23,   149,    77,   -49,
  48.675 +     -49,    24,   -49,   -49,   -49,   -49,    89,    78,   -49,   -49,
  48.676 +      90,    91,   106,   107,   108,   109,    72,    81,    82,    86,
  48.677 +      98,    87,   131,    88,   137,   110,   -72,   -72,   -72,   -72,
  48.678 +     -72,   -72,   -72,   -72,   138,   151,   -72,   -72,    90,    91,
  48.679 +     156,    81,    82,   157,    81,    82,   150,   154,    98,   171,
  48.680 +      81,    82,    82,   123,   158,   160,   167,   169,   173,   174,
  48.681 +     175,   113,   179,   180,   177,   181,    65,   153,     0,    83,
  48.682 +       0,     0,     0,     0,     0,    71
  48.683 +};
  48.684 +
  48.685 +static const short int yycheck[] =
  48.686 +{
  48.687 +       5,     6,     0,     8,    57,    58,    11,    84,    85,    28,
  48.688 +     144,   145,   146,    14,    68,    34,    70,    31,   152,    96,
  48.689 +     154,    66,    66,    31,    69,    69,    71,    71,    81,    82,
  48.690 +     164,    32,    33,    26,    25,    26,    27,    90,    91,    30,
  48.691 +      26,    94,     0,     1,    35,     3,     4,     5,     6,     7,
  48.692 +       8,     9,    10,    11,    12,    31,    14,    15,    16,    17,
  48.693 +      18,    19,    20,    21,    22,    23,    24,    26,    26,    68,
  48.694 +     147,    70,    31,    31,     4,     5,     6,     7,     8,     9,
  48.695 +      10,    11,    26,    27,    14,    15,   139,    92,    26,    27,
  48.696 +       5,     6,    30,     8,     9,    10,    11,    35,    31,    14,
  48.697 +      15,    31,   107,     0,     1,   158,     3,     4,     5,     6,
  48.698 +       7,     8,     9,    10,    11,    12,    31,    14,    15,    16,
  48.699 +      17,    18,    19,    20,    21,    22,    23,    24,    31,    26,
  48.700 +      26,    27,     0,     1,    31,     3,     4,     5,     6,     7,
  48.701 +       8,     9,    10,    11,    32,    33,    14,    15,    16,    17,
  48.702 +      18,    19,    20,    21,    22,    23,    29,     1,    26,    32,
  48.703 +      33,    67,    68,    31,    70,    67,    68,     1,    70,    31,
  48.704 +       0,     1,   177,     3,     4,     5,     6,     7,     8,     9,
  48.705 +      10,    11,    31,    31,    14,    15,    16,    26,    18,    19,
  48.706 +      20,    21,    22,    23,    31,     1,    26,     1,    31,     5,
  48.707 +       6,    31,     8,     9,    10,    11,    12,    31,    14,    15,
  48.708 +      16,    17,    18,    19,    20,    21,    31,    32,    33,    31,
  48.709 +      26,    31,    31,     1,    31,    31,     4,     5,     6,     7,
  48.710 +       8,     9,    10,    11,    31,    31,    14,    15,    16,    17,
  48.711 +      31,    32,    33,    31,    32,    33,    13,    26,    26,    31,
  48.712 +      32,    33,    33,    31,    14,    31,    31,    31,    31,    31,
  48.713 +      31,    66,    31,    31,    34,    31,    29,   108,    -1,    59,
  48.714 +      -1,    -1,    -1,    -1,    -1,    40
  48.715 +};
  48.716 +
  48.717 +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  48.718 +   symbol of state STATE-NUM.  */
  48.719 +static const unsigned char yystos[] =
  48.720 +{
  48.721 +       0,    37,    38,     0,     1,     3,     4,     5,     6,     7,
  48.722 +       8,     9,    10,    11,    14,    15,    16,    18,    19,    20,
  48.723 +      21,    22,    23,    26,    31,    39,    40,    42,    43,    44,
  48.724 +      45,    51,    52,    54,    58,    60,    62,    63,    65,    67,
  48.725 +      68,    69,    76,    31,    26,    27,    75,    75,    31,    75,
  48.726 +      31,    31,    75,    26,    26,    26,    27,    30,    35,    79,
  48.727 +      80,    31,     1,     1,    46,    46,    55,    57,    61,    72,
  48.728 +      66,    72,    31,    77,    31,    31,    31,    31,    31,    79,
  48.729 +      79,    32,    33,    77,    28,    34,    31,    31,     1,    12,
  48.730 +      16,    17,    19,    20,    21,    22,    23,    24,    26,    31,
  48.731 +      41,    47,    48,    70,    71,    73,    18,    19,    20,    21,
  48.732 +      31,    41,    56,    71,    73,    40,    53,    76,    40,    54,
  48.733 +      59,    65,    76,    31,    41,    73,    40,    54,    64,    65,
  48.734 +      76,    31,    29,    79,    79,    80,    80,    31,    31,    25,
  48.735 +      79,    79,    75,    74,    75,    79,    26,    80,    49,     1,
  48.736 +      13,    31,    75,    74,    26,    79,    31,    31,    14,    78,
  48.737 +      31,    78,    78,    78,    80,    26,    31,    31,    78,    31,
  48.738 +      78,    31,    79,    31,    31,    31,    78,    34,    50,    31,
  48.739 +      31,    31,    75
  48.740 +};
  48.741 +
  48.742 +#define yyerrok		(yyerrstatus = 0)
  48.743 +#define yyclearin	(yychar = YYEMPTY)
  48.744 +#define YYEMPTY		(-2)
  48.745 +#define YYEOF		0
  48.746 +
  48.747 +#define YYACCEPT	goto yyacceptlab
  48.748 +#define YYABORT		goto yyabortlab
  48.749 +#define YYERROR		goto yyerrorlab
  48.750 +
  48.751 +
  48.752 +/* Like YYERROR except do call yyerror.  This remains here temporarily
  48.753 +   to ease the transition to the new meaning of YYERROR, for GCC.
  48.754 +   Once GCC version 2 has supplanted version 1, this can go.  */
  48.755 +
  48.756 +#define YYFAIL		goto yyerrlab
  48.757 +
  48.758 +#define YYRECOVERING()  (!!yyerrstatus)
  48.759 +
  48.760 +#define YYBACKUP(Token, Value)					\
  48.761 +do								\
  48.762 +  if (yychar == YYEMPTY && yylen == 1)				\
  48.763 +    {								\
  48.764 +      yychar = (Token);						\
  48.765 +      yylval = (Value);						\
  48.766 +      yytoken = YYTRANSLATE (yychar);				\
  48.767 +      YYPOPSTACK;						\
  48.768 +      goto yybackup;						\
  48.769 +    }								\
  48.770 +  else								\
  48.771 +    {								\
  48.772 +      yyerror (YY_("syntax error: cannot back up")); \
  48.773 +      YYERROR;							\
  48.774 +    }								\
  48.775 +while (0)
  48.776 +
  48.777 +
  48.778 +#define YYTERROR	1
  48.779 +#define YYERRCODE	256
  48.780 +
  48.781 +
  48.782 +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
  48.783 +   If N is 0, then set CURRENT to the empty location which ends
  48.784 +   the previous symbol: RHS[0] (always defined).  */
  48.785 +
  48.786 +#define YYRHSLOC(Rhs, K) ((Rhs)[K])
  48.787 +#ifndef YYLLOC_DEFAULT
  48.788 +# define YYLLOC_DEFAULT(Current, Rhs, N)				\
  48.789 +    do									\
  48.790 +      if (N)								\
  48.791 +	{								\
  48.792 +	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
  48.793 +	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
  48.794 +	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
  48.795 +	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
  48.796 +	}								\
  48.797 +      else								\
  48.798 +	{								\
  48.799 +	  (Current).first_line   = (Current).last_line   =		\
  48.800 +	    YYRHSLOC (Rhs, 0).last_line;				\
  48.801 +	  (Current).first_column = (Current).last_column =		\
  48.802 +	    YYRHSLOC (Rhs, 0).last_column;				\
  48.803 +	}								\
  48.804 +    while (0)
  48.805 +#endif
  48.806 +
  48.807 +
  48.808 +/* YY_LOCATION_PRINT -- Print the location on the stream.
  48.809 +   This macro was not mandated originally: define only if we know
  48.810 +   we won't break user code: when these are the locations we know.  */
  48.811 +
  48.812 +#ifndef YY_LOCATION_PRINT
  48.813 +# if YYLTYPE_IS_TRIVIAL
  48.814 +#  define YY_LOCATION_PRINT(File, Loc)			\
  48.815 +     fprintf (File, "%d.%d-%d.%d",			\
  48.816 +              (Loc).first_line, (Loc).first_column,	\
  48.817 +              (Loc).last_line,  (Loc).last_column)
  48.818 +# else
  48.819 +#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
  48.820 +# endif
  48.821 +#endif
  48.822 +
  48.823 +
  48.824 +/* YYLEX -- calling `yylex' with the right arguments.  */
  48.825 +
  48.826 +#ifdef YYLEX_PARAM
  48.827 +# define YYLEX yylex (YYLEX_PARAM)
  48.828 +#else
  48.829 +# define YYLEX yylex ()
  48.830 +#endif
  48.831 +
  48.832 +/* Enable debugging if requested.  */
  48.833 +#if YYDEBUG
  48.834 +
  48.835 +# ifndef YYFPRINTF
  48.836 +#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  48.837 +#  define YYFPRINTF fprintf
  48.838 +# endif
  48.839 +
  48.840 +# define YYDPRINTF(Args)			\
  48.841 +do {						\
  48.842 +  if (yydebug)					\
  48.843 +    YYFPRINTF Args;				\
  48.844 +} while (0)
  48.845 +
  48.846 +# define YY_SYMBOL_PRINT(Title, Type, Value, Location)		\
  48.847 +do {								\
  48.848 +  if (yydebug)							\
  48.849 +    {								\
  48.850 +      YYFPRINTF (stderr, "%s ", Title);				\
  48.851 +      yysymprint (stderr,					\
  48.852 +                  Type, Value);	\
  48.853 +      YYFPRINTF (stderr, "\n");					\
  48.854 +    }								\
  48.855 +} while (0)
  48.856 +
  48.857 +/*------------------------------------------------------------------.
  48.858 +| yy_stack_print -- Print the state stack from its BOTTOM up to its |
  48.859 +| TOP (included).                                                   |
  48.860 +`------------------------------------------------------------------*/
  48.861 +
  48.862 +#if defined (__STDC__) || defined (__cplusplus)
  48.863 +static void
  48.864 +yy_stack_print (short int *bottom, short int *top)
  48.865 +#else
  48.866 +static void
  48.867 +yy_stack_print (bottom, top)
  48.868 +    short int *bottom;
  48.869 +    short int *top;
  48.870 +#endif
  48.871 +{
  48.872 +  YYFPRINTF (stderr, "Stack now");
  48.873 +  for (/* Nothing. */; bottom <= top; ++bottom)
  48.874 +    YYFPRINTF (stderr, " %d", *bottom);
  48.875 +  YYFPRINTF (stderr, "\n");
  48.876 +}
  48.877 +
  48.878 +# define YY_STACK_PRINT(Bottom, Top)				\
  48.879 +do {								\
  48.880 +  if (yydebug)							\
  48.881 +    yy_stack_print ((Bottom), (Top));				\
  48.882 +} while (0)
  48.883 +
  48.884 +
  48.885 +/*------------------------------------------------.
  48.886 +| Report that the YYRULE is going to be reduced.  |
  48.887 +`------------------------------------------------*/
  48.888 +
  48.889 +#if defined (__STDC__) || defined (__cplusplus)
  48.890 +static void
  48.891 +yy_reduce_print (int yyrule)
  48.892 +#else
  48.893 +static void
  48.894 +yy_reduce_print (yyrule)
  48.895 +    int yyrule;
  48.896 +#endif
  48.897 +{
  48.898 +  int yyi;
  48.899 +  unsigned long int yylno = yyrline[yyrule];
  48.900 +  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
  48.901 +             yyrule - 1, yylno);
  48.902 +  /* Print the symbols being reduced, and their result.  */
  48.903 +  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
  48.904 +    YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
  48.905 +  YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
  48.906 +}
  48.907 +
  48.908 +# define YY_REDUCE_PRINT(Rule)		\
  48.909 +do {					\
  48.910 +  if (yydebug)				\
  48.911 +    yy_reduce_print (Rule);		\
  48.912 +} while (0)
  48.913 +
  48.914 +/* Nonzero means print parse trace.  It is left uninitialized so that
  48.915 +   multiple parsers can coexist.  */
  48.916 +int yydebug;
  48.917 +#else /* !YYDEBUG */
  48.918 +# define YYDPRINTF(Args)
  48.919 +# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
  48.920 +# define YY_STACK_PRINT(Bottom, Top)
  48.921 +# define YY_REDUCE_PRINT(Rule)
  48.922 +#endif /* !YYDEBUG */
  48.923 +
  48.924 +
  48.925 +/* YYINITDEPTH -- initial size of the parser's stacks.  */
  48.926 +#ifndef	YYINITDEPTH
  48.927 +# define YYINITDEPTH 200
  48.928 +#endif
  48.929 +
  48.930 +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
  48.931 +   if the built-in stack extension method is used).
  48.932 +
  48.933 +   Do not make this value too large; the results are undefined if
  48.934 +   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
  48.935 +   evaluated with infinite-precision integer arithmetic.  */
  48.936 +
  48.937 +#ifndef YYMAXDEPTH
  48.938 +# define YYMAXDEPTH 10000
  48.939 +#endif
  48.940 +
  48.941 +
  48.942 +
  48.943 +#if YYERROR_VERBOSE
  48.944 +
  48.945 +# ifndef yystrlen
  48.946 +#  if defined (__GLIBC__) && defined (_STRING_H)
  48.947 +#   define yystrlen strlen
  48.948 +#  else
  48.949 +/* Return the length of YYSTR.  */
  48.950 +static YYSIZE_T
  48.951 +#   if defined (__STDC__) || defined (__cplusplus)
  48.952 +yystrlen (const char *yystr)
  48.953 +#   else
  48.954 +yystrlen (yystr)
  48.955 +     const char *yystr;
  48.956 +#   endif
  48.957 +{
  48.958 +  const char *yys = yystr;
  48.959 +
  48.960 +  while (*yys++ != '\0')
  48.961 +    continue;
  48.962 +
  48.963 +  return yys - yystr - 1;
  48.964 +}
  48.965 +#  endif
  48.966 +# endif
  48.967 +
  48.968 +# ifndef yystpcpy
  48.969 +#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
  48.970 +#   define yystpcpy stpcpy
  48.971 +#  else
  48.972 +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
  48.973 +   YYDEST.  */
  48.974 +static char *
  48.975 +#   if defined (__STDC__) || defined (__cplusplus)
  48.976 +yystpcpy (char *yydest, const char *yysrc)
  48.977 +#   else
  48.978 +yystpcpy (yydest, yysrc)
  48.979 +     char *yydest;
  48.980 +     const char *yysrc;
  48.981 +#   endif
  48.982 +{
  48.983 +  char *yyd = yydest;
  48.984 +  const char *yys = yysrc;
  48.985 +
  48.986 +  while ((*yyd++ = *yys++) != '\0')
  48.987 +    continue;
  48.988 +
  48.989 +  return yyd - 1;
  48.990 +}
  48.991 +#  endif
  48.992 +# endif
  48.993 +
  48.994 +# ifndef yytnamerr
  48.995 +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
  48.996 +   quotes and backslashes, so that it's suitable for yyerror.  The
  48.997 +   heuristic is that double-quoting is unnecessary unless the string
  48.998 +   contains an apostrophe, a comma, or backslash (other than
  48.999 +   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
 48.1000 +   null, do not copy; instead, return the length of what the result
 48.1001 +   would have been.  */
 48.1002 +static YYSIZE_T
 48.1003 +yytnamerr (char *yyres, const char *yystr)
 48.1004 +{
 48.1005 +  if (*yystr == '"')
 48.1006 +    {
 48.1007 +      size_t yyn = 0;
 48.1008 +      char const *yyp = yystr;
 48.1009 +
 48.1010 +      for (;;)
 48.1011 +	switch (*++yyp)
 48.1012 +	  {
 48.1013 +	  case '\'':
 48.1014 +	  case ',':
 48.1015 +	    goto do_not_strip_quotes;
 48.1016 +
 48.1017 +	  case '\\':
 48.1018 +	    if (*++yyp != '\\')
 48.1019 +	      goto do_not_strip_quotes;
 48.1020 +	    /* Fall through.  */
 48.1021 +	  default:
 48.1022 +	    if (yyres)
 48.1023 +	      yyres[yyn] = *yyp;
 48.1024 +	    yyn++;
 48.1025 +	    break;
 48.1026 +
 48.1027 +	  case '"':
 48.1028 +	    if (yyres)
 48.1029 +	      yyres[yyn] = '\0';
 48.1030 +	    return yyn;
 48.1031 +	  }
 48.1032 +    do_not_strip_quotes: ;
 48.1033 +    }
 48.1034 +
 48.1035 +  if (! yyres)
 48.1036 +    return yystrlen (yystr);
 48.1037 +
 48.1038 +  return yystpcpy (yyres, yystr) - yyres;
 48.1039 +}
 48.1040 +# endif
 48.1041 +
 48.1042 +#endif /* YYERROR_VERBOSE */
 48.1043 +
 48.1044 +
 48.1045 +
 48.1046 +#if YYDEBUG
 48.1047 +/*--------------------------------.
 48.1048 +| Print this symbol on YYOUTPUT.  |
 48.1049 +`--------------------------------*/
 48.1050 +
 48.1051 +#if defined (__STDC__) || defined (__cplusplus)
 48.1052 +static void
 48.1053 +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
 48.1054 +#else
 48.1055 +static void
 48.1056 +yysymprint (yyoutput, yytype, yyvaluep)
 48.1057 +    FILE *yyoutput;
 48.1058 +    int yytype;
 48.1059 +    YYSTYPE *yyvaluep;
 48.1060 +#endif
 48.1061 +{
 48.1062 +  /* Pacify ``unused variable'' warnings.  */
 48.1063 +  (void) yyvaluep;
 48.1064 +
 48.1065 +  if (yytype < YYNTOKENS)
 48.1066 +    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
 48.1067 +  else
 48.1068 +    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
 48.1069 +
 48.1070 +
 48.1071 +# ifdef YYPRINT
 48.1072 +  if (yytype < YYNTOKENS)
 48.1073 +    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
 48.1074 +# endif
 48.1075 +  switch (yytype)
 48.1076 +    {
 48.1077 +      default:
 48.1078 +        break;
 48.1079 +    }
 48.1080 +  YYFPRINTF (yyoutput, ")");
 48.1081 +}
 48.1082 +
 48.1083 +#endif /* ! YYDEBUG */
 48.1084 +/*-----------------------------------------------.
 48.1085 +| Release the memory associated to this symbol.  |
 48.1086 +`-----------------------------------------------*/
 48.1087 +
 48.1088 +#if defined (__STDC__) || defined (__cplusplus)
 48.1089 +static void
 48.1090 +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
 48.1091 +#else
 48.1092 +static void
 48.1093 +yydestruct (yymsg, yytype, yyvaluep)
 48.1094 +    const char *yymsg;
 48.1095 +    int yytype;
 48.1096 +    YYSTYPE *yyvaluep;
 48.1097 +#endif
 48.1098 +{
 48.1099 +  /* Pacify ``unused variable'' warnings.  */
 48.1100 +  (void) yyvaluep;
 48.1101 +
 48.1102 +  if (!yymsg)
 48.1103 +    yymsg = "Deleting";
 48.1104 +  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
 48.1105 +
 48.1106 +  switch (yytype)
 48.1107 +    {
 48.1108 +      case 52: /* "choice_entry" */
 48.1109 +
 48.1110 +        {
 48.1111 +	fprintf(stderr, "%s:%d: missing end statement for this entry\n",
 48.1112 +		(yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno);
 48.1113 +	if (current_menu == (yyvaluep->menu))
 48.1114 +		menu_end_menu();
 48.1115 +};
 48.1116 +
 48.1117 +        break;
 48.1118 +      case 58: /* "if_entry" */
 48.1119 +
 48.1120 +        {
 48.1121 +	fprintf(stderr, "%s:%d: missing end statement for this entry\n",
 48.1122 +		(yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno);
 48.1123 +	if (current_menu == (yyvaluep->menu))
 48.1124 +		menu_end_menu();
 48.1125 +};
 48.1126 +
 48.1127 +        break;
 48.1128 +      case 63: /* "menu_entry" */
 48.1129 +
 48.1130 +        {
 48.1131 +	fprintf(stderr, "%s:%d: missing end statement for this entry\n",
 48.1132 +		(yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno);
 48.1133 +	if (current_menu == (yyvaluep->menu))
 48.1134 +		menu_end_menu();
 48.1135 +};
 48.1136 +
 48.1137 +        break;
 48.1138 +
 48.1139 +      default:
 48.1140 +        break;
 48.1141 +    }
 48.1142 +}
 48.1143 +
 48.1144 +
 48.1145 +/* Prevent warnings from -Wmissing-prototypes.  */
 48.1146 +
 48.1147 +#ifdef YYPARSE_PARAM
 48.1148 +# if defined (__STDC__) || defined (__cplusplus)
 48.1149 +int yyparse (void *YYPARSE_PARAM);
 48.1150 +# else
 48.1151 +int yyparse ();
 48.1152 +# endif
 48.1153 +#else /* ! YYPARSE_PARAM */
 48.1154 +#if defined (__STDC__) || defined (__cplusplus)
 48.1155 +int yyparse (void);
 48.1156 +#else
 48.1157 +int yyparse ();
 48.1158 +#endif
 48.1159 +#endif /* ! YYPARSE_PARAM */
 48.1160 +
 48.1161 +
 48.1162 +
 48.1163 +/* The look-ahead symbol.  */
 48.1164 +int yychar;
 48.1165 +
 48.1166 +/* The semantic value of the look-ahead symbol.  */
 48.1167 +YYSTYPE yylval;
 48.1168 +
 48.1169 +/* Number of syntax errors so far.  */
 48.1170 +int yynerrs;
 48.1171 +
 48.1172 +
 48.1173 +
 48.1174 +/*----------.
 48.1175 +| yyparse.  |
 48.1176 +`----------*/
 48.1177 +
 48.1178 +#ifdef YYPARSE_PARAM
 48.1179 +# if defined (__STDC__) || defined (__cplusplus)
 48.1180 +int yyparse (void *YYPARSE_PARAM)
 48.1181 +# else
 48.1182 +int yyparse (YYPARSE_PARAM)
 48.1183 +  void *YYPARSE_PARAM;
 48.1184 +# endif
 48.1185 +#else /* ! YYPARSE_PARAM */
 48.1186 +#if defined (__STDC__) || defined (__cplusplus)
 48.1187 +int
 48.1188 +yyparse (void)
 48.1189 +#else
 48.1190 +int
 48.1191 +yyparse ()
 48.1192 +    ;
 48.1193 +#endif
 48.1194 +#endif
 48.1195 +{
 48.1196 +  
 48.1197 +  int yystate;
 48.1198 +  int yyn;
 48.1199 +  int yyresult;
 48.1200 +  /* Number of tokens to shift before error messages enabled.  */
 48.1201 +  int yyerrstatus;
 48.1202 +  /* Look-ahead token as an internal (translated) token number.  */
 48.1203 +  int yytoken = 0;
 48.1204 +
 48.1205 +  /* Three stacks and their tools:
 48.1206 +     `yyss': related to states,
 48.1207 +     `yyvs': related to semantic values,
 48.1208 +     `yyls': related to locations.
 48.1209 +
 48.1210 +     Refer to the stacks thru separate pointers, to allow yyoverflow
 48.1211 +     to reallocate them elsewhere.  */
 48.1212 +
 48.1213 +  /* The state stack.  */
 48.1214 +  short int yyssa[YYINITDEPTH];
 48.1215 +  short int *yyss = yyssa;
 48.1216 +  short int *yyssp;
 48.1217 +
 48.1218 +  /* The semantic value stack.  */
 48.1219 +  YYSTYPE yyvsa[YYINITDEPTH];
 48.1220 +  YYSTYPE *yyvs = yyvsa;
 48.1221 +  YYSTYPE *yyvsp;
 48.1222 +
 48.1223 +
 48.1224 +
 48.1225 +#define YYPOPSTACK   (yyvsp--, yyssp--)
 48.1226 +
 48.1227 +  YYSIZE_T yystacksize = YYINITDEPTH;
 48.1228 +
 48.1229 +  /* The variables used to return semantic value and location from the
 48.1230 +     action routines.  */
 48.1231 +  YYSTYPE yyval;
 48.1232 +
 48.1233 +
 48.1234 +  /* When reducing, the number of symbols on the RHS of the reduced
 48.1235 +     rule.  */
 48.1236 +  int yylen;
 48.1237 +
 48.1238 +  YYDPRINTF ((stderr, "Starting parse\n"));
 48.1239 +
 48.1240 +  yystate = 0;
 48.1241 +  yyerrstatus = 0;
 48.1242 +  yynerrs = 0;
 48.1243 +  yychar = YYEMPTY;		/* Cause a token to be read.  */
 48.1244 +
 48.1245 +  /* Initialize stack pointers.
 48.1246 +     Waste one element of value and location stack
 48.1247 +     so that they stay on the same level as the state stack.
 48.1248 +     The wasted elements are never initialized.  */
 48.1249 +
 48.1250 +  yyssp = yyss;
 48.1251 +  yyvsp = yyvs;
 48.1252 +
 48.1253 +  goto yysetstate;
 48.1254 +
 48.1255 +/*------------------------------------------------------------.
 48.1256 +| yynewstate -- Push a new state, which is found in yystate.  |
 48.1257 +`------------------------------------------------------------*/
 48.1258 + yynewstate:
 48.1259 +  /* In all cases, when you get here, the value and location stacks
 48.1260 +     have just been pushed. so pushing a state here evens the stacks.
 48.1261 +     */
 48.1262 +  yyssp++;
 48.1263 +
 48.1264 + yysetstate:
 48.1265 +  *yyssp = yystate;
 48.1266 +
 48.1267 +  if (yyss + yystacksize - 1 <= yyssp)
 48.1268 +    {
 48.1269 +      /* Get the current used size of the three stacks, in elements.  */
 48.1270 +      YYSIZE_T yysize = yyssp - yyss + 1;
 48.1271 +
 48.1272 +#ifdef yyoverflow
 48.1273 +      {
 48.1274 +	/* Give user a chance to reallocate the stack. Use copies of
 48.1275 +	   these so that the &'s don't force the real ones into
 48.1276 +	   memory.  */
 48.1277 +	YYSTYPE *yyvs1 = yyvs;
 48.1278 +	short int *yyss1 = yyss;
 48.1279 +
 48.1280 +
 48.1281 +	/* Each stack pointer address is followed by the size of the
 48.1282 +	   data in use in that stack, in bytes.  This used to be a
 48.1283 +	   conditional around just the two extra args, but that might
 48.1284 +	   be undefined if yyoverflow is a macro.  */
 48.1285 +	yyoverflow (YY_("memory exhausted"),
 48.1286 +		    &yyss1, yysize * sizeof (*yyssp),
 48.1287 +		    &yyvs1, yysize * sizeof (*yyvsp),
 48.1288 +
 48.1289 +		    &yystacksize);
 48.1290 +
 48.1291 +	yyss = yyss1;
 48.1292 +	yyvs = yyvs1;
 48.1293 +      }
 48.1294 +#else /* no yyoverflow */
 48.1295 +# ifndef YYSTACK_RELOCATE
 48.1296 +      goto yyexhaustedlab;
 48.1297 +# else
 48.1298 +      /* Extend the stack our own way.  */
 48.1299 +      if (YYMAXDEPTH <= yystacksize)
 48.1300 +	goto yyexhaustedlab;
 48.1301 +      yystacksize *= 2;
 48.1302 +      if (YYMAXDEPTH < yystacksize)
 48.1303 +	yystacksize = YYMAXDEPTH;
 48.1304 +
 48.1305 +      {
 48.1306 +	short int *yyss1 = yyss;
 48.1307 +	union yyalloc *yyptr =
 48.1308 +	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 48.1309 +	if (! yyptr)
 48.1310 +	  goto yyexhaustedlab;
 48.1311 +	YYSTACK_RELOCATE (yyss);
 48.1312 +	YYSTACK_RELOCATE (yyvs);
 48.1313 +
 48.1314 +#  undef YYSTACK_RELOCATE
 48.1315 +	if (yyss1 != yyssa)
 48.1316 +	  YYSTACK_FREE (yyss1);
 48.1317 +      }
 48.1318 +# endif
 48.1319 +#endif /* no yyoverflow */
 48.1320 +
 48.1321 +      yyssp = yyss + yysize - 1;
 48.1322 +      yyvsp = yyvs + yysize - 1;
 48.1323 +
 48.1324 +
 48.1325 +      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
 48.1326 +		  (unsigned long int) yystacksize));
 48.1327 +
 48.1328 +      if (yyss + yystacksize - 1 <= yyssp)
 48.1329 +	YYABORT;
 48.1330 +    }
 48.1331 +
 48.1332 +  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
 48.1333 +
 48.1334 +  goto yybackup;
 48.1335 +
 48.1336 +/*-----------.
 48.1337 +| yybackup.  |
 48.1338 +`-----------*/
 48.1339 +yybackup:
 48.1340 +
 48.1341 +/* Do appropriate processing given the current state.  */
 48.1342 +/* Read a look-ahead token if we need one and don't already have one.  */
 48.1343 +/* yyresume: */
 48.1344 +
 48.1345 +  /* First try to decide what to do without reference to look-ahead token.  */
 48.1346 +
 48.1347 +  yyn = yypact[yystate];
 48.1348 +  if (yyn == YYPACT_NINF)
 48.1349 +    goto yydefault;
 48.1350 +
 48.1351 +  /* Not known => get a look-ahead token if don't already have one.  */
 48.1352 +
 48.1353 +  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
 48.1354 +  if (yychar == YYEMPTY)
 48.1355 +    {
 48.1356 +      YYDPRINTF ((stderr, "Reading a token: "));
 48.1357 +      yychar = YYLEX;
 48.1358 +    }
 48.1359 +
 48.1360 +  if (yychar <= YYEOF)
 48.1361 +    {
 48.1362 +      yychar = yytoken = YYEOF;
 48.1363 +      YYDPRINTF ((stderr, "Now at end of input.\n"));
 48.1364 +    }
 48.1365 +  else
 48.1366 +    {
 48.1367 +      yytoken = YYTRANSLATE (yychar);
 48.1368 +      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
 48.1369 +    }
 48.1370 +
 48.1371 +  /* If the proper action on seeing token YYTOKEN is to reduce or to
 48.1372 +     detect an error, take that action.  */
 48.1373 +  yyn += yytoken;
 48.1374 +  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
 48.1375 +    goto yydefault;
 48.1376 +  yyn = yytable[yyn];
 48.1377 +  if (yyn <= 0)
 48.1378 +    {
 48.1379 +      if (yyn == 0 || yyn == YYTABLE_NINF)
 48.1380 +	goto yyerrlab;
 48.1381 +      yyn = -yyn;
 48.1382 +      goto yyreduce;
 48.1383 +    }
 48.1384 +
 48.1385 +  if (yyn == YYFINAL)
 48.1386 +    YYACCEPT;
 48.1387 +
 48.1388 +  /* Shift the look-ahead token.  */
 48.1389 +  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 48.1390 +
 48.1391 +  /* Discard the token being shifted unless it is eof.  */
 48.1392 +  if (yychar != YYEOF)
 48.1393 +    yychar = YYEMPTY;
 48.1394 +
 48.1395 +  *++yyvsp = yylval;
 48.1396 +
 48.1397 +
 48.1398 +  /* Count tokens shifted since error; after three, turn off error
 48.1399 +     status.  */
 48.1400 +  if (yyerrstatus)
 48.1401 +    yyerrstatus--;
 48.1402 +
 48.1403 +  yystate = yyn;
 48.1404 +  goto yynewstate;
 48.1405 +
 48.1406 +
 48.1407 +/*-----------------------------------------------------------.
 48.1408 +| yydefault -- do the default action for the current state.  |
 48.1409 +`-----------------------------------------------------------*/
 48.1410 +yydefault:
 48.1411 +  yyn = yydefact[yystate];
 48.1412 +  if (yyn == 0)
 48.1413 +    goto yyerrlab;
 48.1414 +  goto yyreduce;
 48.1415 +
 48.1416 +
 48.1417 +/*-----------------------------.
 48.1418 +| yyreduce -- Do a reduction.  |
 48.1419 +`-----------------------------*/
 48.1420 +yyreduce:
 48.1421 +  /* yyn is the number of a rule to reduce with.  */
 48.1422 +  yylen = yyr2[yyn];
 48.1423 +
 48.1424 +  /* If YYLEN is nonzero, implement the default value of the action:
 48.1425 +     `$$ = $1'.
 48.1426 +
 48.1427 +     Otherwise, the following line sets YYVAL to garbage.
 48.1428 +     This behavior is undocumented and Bison
 48.1429 +     users should not rely upon it.  Assigning to YYVAL
 48.1430 +     unconditionally makes the parser a bit smaller, and it avoids a
 48.1431 +     GCC warning that YYVAL may be used uninitialized.  */
 48.1432 +  yyval = yyvsp[1-yylen];
 48.1433 +
 48.1434 +
 48.1435 +  YY_REDUCE_PRINT (yyn);
 48.1436 +  switch (yyn)
 48.1437 +    {
 48.1438 +        case 8:
 48.1439 +
 48.1440 +    { zconf_error("unexpected end statement"); ;}
 48.1441 +    break;
 48.1442 +
 48.1443 +  case 9:
 48.1444 +
 48.1445 +    { zconf_error("unknown statement \"%s\"", (yyvsp[-2].string)); ;}
 48.1446 +    break;
 48.1447 +
 48.1448 +  case 10:
 48.1449 +
 48.1450 +    {
 48.1451 +	zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[-2].id)->name);
 48.1452 +;}
 48.1453 +    break;
 48.1454 +
 48.1455 +  case 11:
 48.1456 +
 48.1457 +    { zconf_error("invalid statement"); ;}
 48.1458 +    break;
 48.1459 +
 48.1460 +  case 25:
 48.1461 +
 48.1462 +    { zconf_error("unknown option \"%s\"", (yyvsp[-2].string)); ;}
 48.1463 +    break;
 48.1464 +
 48.1465 +  case 26:
 48.1466 +
 48.1467 +    { zconf_error("invalid option"); ;}
 48.1468 +    break;
 48.1469 +
 48.1470 +  case 27:
 48.1471 +
 48.1472 +    {
 48.1473 +	struct symbol *sym = sym_lookup((yyvsp[-1].string), 0);
 48.1474 +	sym->flags |= SYMBOL_OPTIONAL;
 48.1475 +	menu_add_entry(sym);
 48.1476 +	printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string));
 48.1477 +;}
 48.1478 +    break;
 48.1479 +
 48.1480 +  case 28:
 48.1481 +
 48.1482 +    {
 48.1483 +	menu_end_entry();
 48.1484 +	printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
 48.1485 +;}
 48.1486 +    break;
 48.1487 +
 48.1488 +  case 29:
 48.1489 +
 48.1490 +    {
 48.1491 +	struct symbol *sym = sym_lookup((yyvsp[-1].string), 0);
 48.1492 +	sym->flags |= SYMBOL_OPTIONAL;
 48.1493 +	menu_add_entry(sym);
 48.1494 +	printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string));
 48.1495 +;}
 48.1496 +    break;
 48.1497 +
 48.1498 +  case 30:
 48.1499 +
 48.1500 +    {
 48.1501 +	if (current_entry->prompt)
 48.1502 +		current_entry->prompt->type = P_MENU;
 48.1503 +	else
 48.1504 +		zconfprint("warning: menuconfig statement without prompt");
 48.1505 +	menu_end_entry();
 48.1506 +	printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
 48.1507 +;}
 48.1508 +    break;
 48.1509 +
 48.1510 +  case 38:
 48.1511 +
 48.1512 +    {
 48.1513 +	menu_set_type((yyvsp[-2].id)->stype);
 48.1514 +	printd(DEBUG_PARSE, "%s:%d:type(%u)\n",
 48.1515 +		zconf_curname(), zconf_lineno(),
 48.1516 +		(yyvsp[-2].id)->stype);
 48.1517 +;}
 48.1518 +    break;
 48.1519 +
 48.1520 +  case 39:
 48.1521 +
 48.1522 +    {
 48.1523 +	menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr));
 48.1524 +	printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
 48.1525 +;}
 48.1526 +    break;
 48.1527 +
 48.1528 +  case 40:
 48.1529 +
 48.1530 +    {
 48.1531 +	menu_add_expr(P_DEFAULT, (yyvsp[-2].expr), (yyvsp[-1].expr));
 48.1532 +	if ((yyvsp[-3].id)->stype != S_UNKNOWN)
 48.1533 +		menu_set_type((yyvsp[-3].id)->stype);
 48.1534 +	printd(DEBUG_PARSE, "%s:%d:default(%u)\n",
 48.1535 +		zconf_curname(), zconf_lineno(),
 48.1536 +		(yyvsp[-3].id)->stype);
 48.1537 +;}
 48.1538 +    break;
 48.1539 +
 48.1540 +  case 41:
 48.1541 +
 48.1542 +    {
 48.1543 +	menu_add_symbol(P_SELECT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr));
 48.1544 +	printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno());
 48.1545 +;}
 48.1546 +    break;
 48.1547 +
 48.1548 +  case 42:
 48.1549 +
 48.1550 +    {
 48.1551 +	menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[-3].symbol), (yyvsp[-2].symbol)), (yyvsp[-1].expr));
 48.1552 +	printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());
 48.1553 +;}
 48.1554 +    break;
 48.1555 +
 48.1556 +  case 45:
 48.1557 +
 48.1558 +    {
 48.1559 +	struct kconf_id *id = kconf_id_lookup((yyvsp[-1].string), strlen((yyvsp[-1].string)));
 48.1560 +	if (id && id->flags & TF_OPTION)
 48.1561 +		menu_add_option(id->token, (yyvsp[0].string));
 48.1562 +	else
 48.1563 +		zconfprint("warning: ignoring unknown option %s", (yyvsp[-1].string));
 48.1564 +	free((yyvsp[-1].string));
 48.1565 +;}
 48.1566 +    break;
 48.1567 +
 48.1568 +  case 46:
 48.1569 +
 48.1570 +    { (yyval.string) = NULL; ;}
 48.1571 +    break;
 48.1572 +
 48.1573 +  case 47:
 48.1574 +
 48.1575 +    { (yyval.string) = (yyvsp[0].string); ;}
 48.1576 +    break;
 48.1577 +
 48.1578 +  case 48:
 48.1579 +
 48.1580 +    {
 48.1581 +	struct symbol *sym = sym_lookup(NULL, 0);
 48.1582 +	sym->flags |= SYMBOL_CHOICE;
 48.1583 +	menu_add_entry(sym);
 48.1584 +	menu_add_expr(P_CHOICE, NULL, NULL);
 48.1585 +	printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
 48.1586 +;}
 48.1587 +    break;
 48.1588 +
 48.1589 +  case 49:
 48.1590 +
 48.1591 +    {
 48.1592 +	(yyval.menu) = menu_add_menu();
 48.1593 +;}
 48.1594 +    break;
 48.1595 +
 48.1596 +  case 50:
 48.1597 +
 48.1598 +    {
 48.1599 +	if (zconf_endtoken((yyvsp[0].id), T_CHOICE, T_ENDCHOICE)) {
 48.1600 +		menu_end_menu();
 48.1601 +		printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno());
 48.1602 +	}
 48.1603 +;}
 48.1604 +    break;
 48.1605 +
 48.1606 +  case 58:
 48.1607 +
 48.1608 +    {
 48.1609 +	menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr));
 48.1610 +	printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
 48.1611 +;}
 48.1612 +    break;
 48.1613 +
 48.1614 +  case 59:
 48.1615 +
 48.1616 +    {
 48.1617 +	if ((yyvsp[-2].id)->stype == S_BOOLEAN || (yyvsp[-2].id)->stype == S_TRISTATE) {
 48.1618 +		menu_set_type((yyvsp[-2].id)->stype);
 48.1619 +		printd(DEBUG_PARSE, "%s:%d:type(%u)\n",
 48.1620 +			zconf_curname(), zconf_lineno(),
 48.1621 +			(yyvsp[-2].id)->stype);
 48.1622 +	} else
 48.1623 +		YYERROR;
 48.1624 +;}
 48.1625 +    break;
 48.1626 +
 48.1627 +  case 60:
 48.1628 +
 48.1629 +    {
 48.1630 +	current_entry->sym->flags |= SYMBOL_OPTIONAL;
 48.1631 +	printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno());
 48.1632 +;}
 48.1633 +    break;
 48.1634 +
 48.1635 +  case 61:
 48.1636 +
 48.1637 +    {
 48.1638 +	if ((yyvsp[-3].id)->stype == S_UNKNOWN) {
 48.1639 +		menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr));
 48.1640 +		printd(DEBUG_PARSE, "%s:%d:default\n",
 48.1641 +			zconf_curname(), zconf_lineno());
 48.1642 +	} else
 48.1643 +		YYERROR;
 48.1644 +;}
 48.1645 +    break;
 48.1646 +
 48.1647 +  case 64:
 48.1648 +
 48.1649 +    {
 48.1650 +	printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
 48.1651 +	menu_add_entry(NULL);
 48.1652 +	menu_add_dep((yyvsp[-1].expr));
 48.1653 +	(yyval.menu) = menu_add_menu();
 48.1654 +;}
 48.1655 +    break;
 48.1656 +
 48.1657 +  case 65:
 48.1658 +
 48.1659 +    {
 48.1660 +	if (zconf_endtoken((yyvsp[0].id), T_IF, T_ENDIF)) {
 48.1661 +		menu_end_menu();
 48.1662 +		printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno());
 48.1663 +	}
 48.1664 +;}
 48.1665 +    break;
 48.1666 +
 48.1667 +  case 71:
 48.1668 +
 48.1669 +    {
 48.1670 +	menu_add_entry(NULL);
 48.1671 +	menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL);
 48.1672 +	printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
 48.1673 +;}
 48.1674 +    break;
 48.1675 +
 48.1676 +  case 72:
 48.1677 +
 48.1678 +    {
 48.1679 +	(yyval.menu) = menu_add_menu();
 48.1680 +;}
 48.1681 +    break;
 48.1682 +
 48.1683 +  case 73:
 48.1684 +
 48.1685 +    {
 48.1686 +	if (zconf_endtoken((yyvsp[0].id), T_MENU, T_ENDMENU)) {
 48.1687 +		menu_end_menu();
 48.1688 +		printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno());
 48.1689 +	}
 48.1690 +;}
 48.1691 +    break;
 48.1692 +
 48.1693 +  case 79:
 48.1694 +
 48.1695 +    {
 48.1696 +	printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string));
 48.1697 +	zconf_nextfile((yyvsp[-1].string));
 48.1698 +;}
 48.1699 +    break;
 48.1700 +
 48.1701 +  case 80:
 48.1702 +
 48.1703 +    {
 48.1704 +	menu_add_entry(NULL);
 48.1705 +	menu_add_prompt(P_COMMENT, (yyvsp[-1].string), NULL);
 48.1706 +	printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno());
 48.1707 +;}
 48.1708 +    break;
 48.1709 +
 48.1710 +  case 81:
 48.1711 +
 48.1712 +    {
 48.1713 +	menu_end_entry();
 48.1714 +;}
 48.1715 +    break;
 48.1716 +
 48.1717 +  case 82:
 48.1718 +
 48.1719 +    {
 48.1720 +	printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
 48.1721 +	zconf_starthelp();
 48.1722 +;}
 48.1723 +    break;
 48.1724 +
 48.1725 +  case 83:
 48.1726 +
 48.1727 +    {
 48.1728 +	current_entry->sym->help = (yyvsp[0].string);
 48.1729 +;}
 48.1730 +    break;
 48.1731 +
 48.1732 +  case 88:
 48.1733 +
 48.1734 +    {
 48.1735 +	menu_add_dep((yyvsp[-1].expr));
 48.1736 +	printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
 48.1737 +;}
 48.1738 +    break;
 48.1739 +
 48.1740 +  case 89:
 48.1741 +
 48.1742 +    {
 48.1743 +	menu_add_dep((yyvsp[-1].expr));
 48.1744 +	printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno());
 48.1745 +;}
 48.1746 +    break;
 48.1747 +
 48.1748 +  case 90:
 48.1749 +
 48.1750 +    {
 48.1751 +	menu_add_dep((yyvsp[-1].expr));
 48.1752 +	printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno());
 48.1753 +;}
 48.1754 +    break;
 48.1755 +
 48.1756 +  case 92:
 48.1757 +
 48.1758 +    {
 48.1759 +	menu_add_prompt(P_PROMPT, (yyvsp[-1].string), (yyvsp[0].expr));
 48.1760 +;}
 48.1761 +    break;
 48.1762 +
 48.1763 +  case 95:
 48.1764 +
 48.1765 +    { (yyval.id) = (yyvsp[-1].id); ;}
 48.1766 +    break;
 48.1767 +
 48.1768 +  case 96:
 48.1769 +
 48.1770 +    { (yyval.id) = (yyvsp[-1].id); ;}
 48.1771 +    break;
 48.1772 +
 48.1773 +  case 97:
 48.1774 +
 48.1775 +    { (yyval.id) = (yyvsp[-1].id); ;}
 48.1776 +    break;
 48.1777 +
 48.1778 +  case 100:
 48.1779 +
 48.1780 +    { (yyval.expr) = NULL; ;}
 48.1781 +    break;
 48.1782 +
 48.1783 +  case 101:
 48.1784 +
 48.1785 +    { (yyval.expr) = (yyvsp[0].expr); ;}
 48.1786 +    break;
 48.1787 +
 48.1788 +  case 102:
 48.1789 +
 48.1790 +    { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); ;}
 48.1791 +    break;
 48.1792 +
 48.1793 +  case 103:
 48.1794 +
 48.1795 +    { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;}
 48.1796 +    break;
 48.1797 +
 48.1798 +  case 104:
 48.1799 +
 48.1800 +    { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;}
 48.1801 +    break;
 48.1802 +
 48.1803 +  case 105:
 48.1804 +
 48.1805 +    { (yyval.expr) = (yyvsp[-1].expr); ;}
 48.1806 +    break;
 48.1807 +
 48.1808 +  case 106:
 48.1809 +
 48.1810 +    { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); ;}
 48.1811 +    break;
 48.1812 +
 48.1813 +  case 107:
 48.1814 +
 48.1815 +    { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;}
 48.1816 +    break;
 48.1817 +
 48.1818 +  case 108:
 48.1819 +
 48.1820 +    { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); ;}
 48.1821 +    break;
 48.1822 +
 48.1823 +  case 109:
 48.1824 +
 48.1825 +    { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); ;}
 48.1826 +    break;
 48.1827 +
 48.1828 +  case 110:
 48.1829 +
 48.1830 +    { (yyval.symbol) = sym_lookup((yyvsp[0].string), 1); free((yyvsp[0].string)); ;}
 48.1831 +    break;
 48.1832 +
 48.1833 +
 48.1834 +      default: break;
 48.1835 +    }
 48.1836 +
 48.1837 +/* Line 1126 of yacc.c.  */
 48.1838 +
 48.1839 +
 48.1840 +  yyvsp -= yylen;
 48.1841 +  yyssp -= yylen;
 48.1842 +
 48.1843 +
 48.1844 +  YY_STACK_PRINT (yyss, yyssp);
 48.1845 +
 48.1846 +  *++yyvsp = yyval;
 48.1847 +
 48.1848 +
 48.1849 +  /* Now `shift' the result of the reduction.  Determine what state
 48.1850 +     that goes to, based on the state we popped back to and the rule
 48.1851 +     number reduced by.  */
 48.1852 +
 48.1853 +  yyn = yyr1[yyn];
 48.1854 +
 48.1855 +  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
 48.1856 +  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
 48.1857 +    yystate = yytable[yystate];
 48.1858 +  else
 48.1859 +    yystate = yydefgoto[yyn - YYNTOKENS];
 48.1860 +
 48.1861 +  goto yynewstate;
 48.1862 +
 48.1863 +
 48.1864 +/*------------------------------------.
 48.1865 +| yyerrlab -- here on detecting error |
 48.1866 +`------------------------------------*/
 48.1867 +yyerrlab:
 48.1868 +  /* If not already recovering from an error, report this error.  */
 48.1869 +  if (!yyerrstatus)
 48.1870 +    {
 48.1871 +      ++yynerrs;
 48.1872 +#if YYERROR_VERBOSE
 48.1873 +      yyn = yypact[yystate];
 48.1874 +
 48.1875 +      if (YYPACT_NINF < yyn && yyn < YYLAST)
 48.1876 +	{
 48.1877 +	  int yytype = YYTRANSLATE (yychar);
 48.1878 +	  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
 48.1879 +	  YYSIZE_T yysize = yysize0;
 48.1880 +	  YYSIZE_T yysize1;
 48.1881 +	  int yysize_overflow = 0;
 48.1882 +	  char *yymsg = 0;
 48.1883 +#	  define YYERROR_VERBOSE_ARGS_MAXIMUM 5
 48.1884 +	  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
 48.1885 +	  int yyx;
 48.1886 +
 48.1887 +#if 0
 48.1888 +	  /* This is so xgettext sees the translatable formats that are
 48.1889 +	     constructed on the fly.  */
 48.1890 +	  YY_("syntax error, unexpected %s");
 48.1891 +	  YY_("syntax error, unexpected %s, expecting %s");
 48.1892 +	  YY_("syntax error, unexpected %s, expecting %s or %s");
 48.1893 +	  YY_("syntax error, unexpected %s, expecting %s or %s or %s");
 48.1894 +	  YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
 48.1895 +#endif
 48.1896 +	  char *yyfmt;
 48.1897 +	  char const *yyf;
 48.1898 +	  static char const yyunexpected[] = "syntax error, unexpected %s";
 48.1899 +	  static char const yyexpecting[] = ", expecting %s";
 48.1900 +	  static char const yyor[] = " or %s";
 48.1901 +	  char yyformat[sizeof yyunexpected
 48.1902 +			+ sizeof yyexpecting - 1
 48.1903 +			+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
 48.1904 +			   * (sizeof yyor - 1))];
 48.1905 +	  char const *yyprefix = yyexpecting;
 48.1906 +
 48.1907 +	  /* Start YYX at -YYN if negative to avoid negative indexes in
 48.1908 +	     YYCHECK.  */
 48.1909 +	  int yyxbegin = yyn < 0 ? -yyn : 0;
 48.1910 +
 48.1911 +	  /* Stay within bounds of both yycheck and yytname.  */
 48.1912 +	  int yychecklim = YYLAST - yyn;
 48.1913 +	  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
 48.1914 +	  int yycount = 1;
 48.1915 +
 48.1916 +	  yyarg[0] = yytname[yytype];
 48.1917 +	  yyfmt = yystpcpy (yyformat, yyunexpected);
 48.1918 +
 48.1919 +	  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
 48.1920 +	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
 48.1921 +	      {
 48.1922 +		if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
 48.1923 +		  {
 48.1924 +		    yycount = 1;
 48.1925 +		    yysize = yysize0;
 48.1926 +		    yyformat[sizeof yyunexpected - 1] = '\0';
 48.1927 +		    break;
 48.1928 +		  }
 48.1929 +		yyarg[yycount++] = yytname[yyx];
 48.1930 +		yysize1 = yysize + yytnamerr (0, yytname[yyx]);
 48.1931 +		yysize_overflow |= yysize1 < yysize;
 48.1932 +		yysize = yysize1;
 48.1933 +		yyfmt = yystpcpy (yyfmt, yyprefix);
 48.1934 +		yyprefix = yyor;
 48.1935 +	      }
 48.1936 +
 48.1937 +	  yyf = YY_(yyformat);
 48.1938 +	  yysize1 = yysize + yystrlen (yyf);
 48.1939 +	  yysize_overflow |= yysize1 < yysize;
 48.1940 +	  yysize = yysize1;
 48.1941 +
 48.1942 +	  if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
 48.1943 +	    yymsg = (char *) YYSTACK_ALLOC (yysize);
 48.1944 +	  if (yymsg)
 48.1945 +	    {
 48.1946 +	      /* Avoid sprintf, as that infringes on the user's name space.
 48.1947 +		 Don't have undefined behavior even if the translation
 48.1948 +		 produced a string with the wrong number of "%s"s.  */
 48.1949 +	      char *yyp = yymsg;
 48.1950 +	      int yyi = 0;
 48.1951 +	      while ((*yyp = *yyf))
 48.1952 +		{
 48.1953 +		  if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
 48.1954 +		    {
 48.1955 +		      yyp += yytnamerr (yyp, yyarg[yyi++]);
 48.1956 +		      yyf += 2;
 48.1957 +		    }
 48.1958 +		  else
 48.1959 +		    {
 48.1960 +		      yyp++;
 48.1961 +		      yyf++;
 48.1962 +		    }
 48.1963 +		}
 48.1964 +	      yyerror (yymsg);
 48.1965 +	      YYSTACK_FREE (yymsg);
 48.1966 +	    }
 48.1967 +	  else
 48.1968 +	    {
 48.1969 +	      yyerror (YY_("syntax error"));
 48.1970 +	      goto yyexhaustedlab;
 48.1971 +	    }
 48.1972 +	}
 48.1973 +      else
 48.1974 +#endif /* YYERROR_VERBOSE */
 48.1975 +	yyerror (YY_("syntax error"));
 48.1976 +    }
 48.1977 +
 48.1978 +
 48.1979 +
 48.1980 +  if (yyerrstatus == 3)
 48.1981 +    {
 48.1982 +      /* If just tried and failed to reuse look-ahead token after an
 48.1983 +	 error, discard it.  */
 48.1984 +
 48.1985 +      if (yychar <= YYEOF)
 48.1986 +        {
 48.1987 +	  /* Return failure if at end of input.  */
 48.1988 +	  if (yychar == YYEOF)
 48.1989 +	    YYABORT;
 48.1990 +        }
 48.1991 +      else
 48.1992 +	{
 48.1993 +	  yydestruct ("Error: discarding", yytoken, &yylval);
 48.1994 +	  yychar = YYEMPTY;
 48.1995 +	}
 48.1996 +    }
 48.1997 +
 48.1998 +  /* Else will try to reuse look-ahead token after shifting the error
 48.1999 +     token.  */
 48.2000 +  goto yyerrlab1;
 48.2001 +
 48.2002 +
 48.2003 +/*---------------------------------------------------.
 48.2004 +| yyerrorlab -- error raised explicitly by YYERROR.  |
 48.2005 +`---------------------------------------------------*/
 48.2006 +yyerrorlab:
 48.2007 +
 48.2008 +  /* Pacify compilers like GCC when the user code never invokes
 48.2009 +     YYERROR and the label yyerrorlab therefore never appears in user
 48.2010 +     code.  */
 48.2011 +  if (0)
 48.2012 +     goto yyerrorlab;
 48.2013 +
 48.2014 +yyvsp -= yylen;
 48.2015 +  yyssp -= yylen;
 48.2016 +  yystate = *yyssp;
 48.2017 +  goto yyerrlab1;
 48.2018 +
 48.2019 +
 48.2020 +/*-------------------------------------------------------------.
 48.2021 +| yyerrlab1 -- common code for both syntax error and YYERROR.  |
 48.2022 +`-------------------------------------------------------------*/
 48.2023 +yyerrlab1:
 48.2024 +  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
 48.2025 +
 48.2026 +  for (;;)
 48.2027 +    {
 48.2028 +      yyn = yypact[yystate];
 48.2029 +      if (yyn != YYPACT_NINF)
 48.2030 +	{
 48.2031 +	  yyn += YYTERROR;
 48.2032 +	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
 48.2033 +	    {
 48.2034 +	      yyn = yytable[yyn];
 48.2035 +	      if (0 < yyn)
 48.2036 +		break;
 48.2037 +	    }
 48.2038 +	}
 48.2039 +
 48.2040 +      /* Pop the current state because it cannot handle the error token.  */
 48.2041 +      if (yyssp == yyss)
 48.2042 +	YYABORT;
 48.2043 +
 48.2044 +
 48.2045 +      yydestruct ("Error: popping", yystos[yystate], yyvsp);
 48.2046 +      YYPOPSTACK;
 48.2047 +      yystate = *yyssp;
 48.2048 +      YY_STACK_PRINT (yyss, yyssp);
 48.2049 +    }
 48.2050 +
 48.2051 +  if (yyn == YYFINAL)
 48.2052 +    YYACCEPT;
 48.2053 +
 48.2054 +  *++yyvsp = yylval;
 48.2055 +
 48.2056 +
 48.2057 +  /* Shift the error token. */
 48.2058 +  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
 48.2059 +
 48.2060 +  yystate = yyn;
 48.2061 +  goto yynewstate;
 48.2062 +
 48.2063 +
 48.2064 +/*-------------------------------------.
 48.2065 +| yyacceptlab -- YYACCEPT comes here.  |
 48.2066 +`-------------------------------------*/
 48.2067 +yyacceptlab:
 48.2068 +  yyresult = 0;
 48.2069 +  goto yyreturn;
 48.2070 +
 48.2071 +/*-----------------------------------.
 48.2072 +| yyabortlab -- YYABORT comes here.  |
 48.2073 +`-----------------------------------*/
 48.2074 +yyabortlab:
 48.2075 +  yyresult = 1;
 48.2076 +  goto yyreturn;
 48.2077 +
 48.2078 +#ifndef yyoverflow
 48.2079 +/*-------------------------------------------------.
 48.2080 +| yyexhaustedlab -- memory exhaustion comes here.  |
 48.2081 +`-------------------------------------------------*/
 48.2082 +yyexhaustedlab:
 48.2083 +  yyerror (YY_("memory exhausted"));
 48.2084 +  yyresult = 2;
 48.2085 +  /* Fall through.  */
 48.2086 +#endif
 48.2087 +
 48.2088 +yyreturn:
 48.2089 +  if (yychar != YYEOF && yychar != YYEMPTY)
 48.2090 +     yydestruct ("Cleanup: discarding lookahead",
 48.2091 +		 yytoken, &yylval);
 48.2092 +  while (yyssp != yyss)
 48.2093 +    {
 48.2094 +      yydestruct ("Cleanup: popping",
 48.2095 +		  yystos[*yyssp], yyvsp);
 48.2096 +      YYPOPSTACK;
 48.2097 +    }
 48.2098 +#ifndef yyoverflow
 48.2099 +  if (yyss != yyssa)
 48.2100 +    YYSTACK_FREE (yyss);
 48.2101 +#endif
 48.2102 +  return yyresult;
 48.2103 +}
 48.2104 +
 48.2105 +
 48.2106 +
 48.2107 +
 48.2108 +
 48.2109 +void conf_parse(const char *name)
 48.2110 +{
 48.2111 +	struct symbol *sym;
 48.2112 +	int i;
 48.2113 +
 48.2114 +	zconf_initscan(name);
 48.2115 +
 48.2116 +	sym_init();
 48.2117 +	menu_init();
 48.2118 +	modules_sym = sym_lookup(NULL, 0);
 48.2119 +	modules_sym->type = S_BOOLEAN;
 48.2120 +	modules_sym->flags |= SYMBOL_AUTO;
 48.2121 +	rootmenu.prompt = menu_add_prompt(P_MENU, PROJECT_NAME" Configuration", NULL);
 48.2122 +
 48.2123 +#if YYDEBUG
 48.2124 +	if (getenv("ZCONF_DEBUG"))
 48.2125 +		zconfdebug = 1;
 48.2126 +#endif
 48.2127 +	zconfparse();
 48.2128 +	if (zconfnerrs)
 48.2129 +		exit(1);
 48.2130 +	if (!modules_sym->prop) {
 48.2131 +		struct property *prop;
 48.2132 +
 48.2133 +		prop = prop_alloc(P_DEFAULT, modules_sym);
 48.2134 +		prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
 48.2135 +	}
 48.2136 +	menu_finalize(&rootmenu);
 48.2137 +	for_all_symbols(i, sym) {
 48.2138 +		sym_check_deps(sym);
 48.2139 +        }
 48.2140 +
 48.2141 +	sym_change_count = 1;
 48.2142 +}
 48.2143 +
 48.2144 +const char *zconf_tokenname(int token)
 48.2145 +{
 48.2146 +	switch (token) {
 48.2147 +	case T_MENU:		return "menu";
 48.2148 +	case T_ENDMENU:		return "endmenu";
 48.2149 +	case T_CHOICE:		return "choice";
 48.2150 +	case T_ENDCHOICE:	return "endchoice";
 48.2151 +	case T_IF:		return "if";
 48.2152 +	case T_ENDIF:		return "endif";
 48.2153 +	case T_DEPENDS:		return "depends";
 48.2154 +	}
 48.2155 +	return "<token>";
 48.2156 +}
 48.2157 +
 48.2158 +static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken)
 48.2159 +{
 48.2160 +	if (id->token != endtoken) {
 48.2161 +		zconf_error("unexpected '%s' within %s block",
 48.2162 +			kconf_id_strings + id->name, zconf_tokenname(starttoken));
 48.2163 +		zconfnerrs++;
 48.2164 +		return false;
 48.2165 +	}
 48.2166 +	if (current_menu->file != current_file) {
 48.2167 +		zconf_error("'%s' in different file than '%s'",
 48.2168 +			kconf_id_strings + id->name, zconf_tokenname(starttoken));
 48.2169 +		fprintf(stderr, "%s:%d: location of the '%s'\n",
 48.2170 +			current_menu->file->name, current_menu->lineno,
 48.2171 +			zconf_tokenname(starttoken));
 48.2172 +		zconfnerrs++;
 48.2173 +		return false;
 48.2174 +	}
 48.2175 +	return true;
 48.2176 +}
 48.2177 +
 48.2178 +static void zconfprint(const char *err, ...)
 48.2179 +{
 48.2180 +	va_list ap;
 48.2181 +
 48.2182 +	fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno());
 48.2183 +	va_start(ap, err);
 48.2184 +	vfprintf(stderr, err, ap);
 48.2185 +	va_end(ap);
 48.2186 +	fprintf(stderr, "\n");
 48.2187 +}
 48.2188 +
 48.2189 +static void zconf_error(const char *err, ...)
 48.2190 +{
 48.2191 +	va_list ap;
 48.2192 +
 48.2193 +	zconfnerrs++;
 48.2194 +	fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno());
 48.2195 +	va_start(ap, err);
 48.2196 +	vfprintf(stderr, err, ap);
 48.2197 +	va_end(ap);
 48.2198 +	fprintf(stderr, "\n");
 48.2199 +}
 48.2200 +
 48.2201 +static void zconferror(const char *err)
 48.2202 +{
 48.2203 +#if YYDEBUG
 48.2204 +	fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
 48.2205 +#endif
 48.2206 +}
 48.2207 +
 48.2208 +void print_quoted_string(FILE *out, const char *str)
 48.2209 +{
 48.2210 +	const char *p;
 48.2211 +	int len;
 48.2212 +
 48.2213 +	putc('"', out);
 48.2214 +	while ((p = strchr(str, '"'))) {
 48.2215 +		len = p - str;
 48.2216 +		if (len)
 48.2217 +			fprintf(out, "%.*s", len, str);
 48.2218 +		fputs("\\\"", out);
 48.2219 +		str = p + 1;
 48.2220 +	}
 48.2221 +	fputs(str, out);
 48.2222 +	putc('"', out);
 48.2223 +}
 48.2224 +
 48.2225 +void print_symbol(FILE *out, struct menu *menu)
 48.2226 +{
 48.2227 +	struct symbol *sym = menu->sym;
 48.2228 +	struct property *prop;
 48.2229 +
 48.2230 +	if (sym_is_choice(sym))
 48.2231 +		fprintf(out, "choice\n");
 48.2232 +	else
 48.2233 +		fprintf(out, "config %s\n", sym->name);
 48.2234 +	switch (sym->type) {
 48.2235 +	case S_BOOLEAN:
 48.2236 +		fputs("  boolean\n", out);
 48.2237 +		break;
 48.2238 +	case S_TRISTATE:
 48.2239 +		fputs("  tristate\n", out);
 48.2240 +		break;
 48.2241 +	case S_STRING:
 48.2242 +		fputs("  string\n", out);
 48.2243 +		break;
 48.2244 +	case S_INT:
 48.2245 +		fputs("  integer\n", out);
 48.2246 +		break;
 48.2247 +	case S_HEX:
 48.2248 +		fputs("  hex\n", out);
 48.2249 +		break;
 48.2250 +	default:
 48.2251 +		fputs("  ???\n", out);
 48.2252 +		break;
 48.2253 +	}
 48.2254 +	for (prop = sym->prop; prop; prop = prop->next) {
 48.2255 +		if (prop->menu != menu)
 48.2256 +			continue;
 48.2257 +		switch (prop->type) {
 48.2258 +		case P_PROMPT:
 48.2259 +			fputs("  prompt ", out);
 48.2260 +			print_quoted_string(out, prop->text);
 48.2261 +			if (!expr_is_yes(prop->visible.expr)) {
 48.2262 +				fputs(" if ", out);
 48.2263 +				expr_fprint(prop->visible.expr, out);
 48.2264 +			}
 48.2265 +			fputc('\n', out);
 48.2266 +			break;
 48.2267 +		case P_DEFAULT:
 48.2268 +			fputs( "  default ", out);
 48.2269 +			expr_fprint(prop->expr, out);
 48.2270 +			if (!expr_is_yes(prop->visible.expr)) {
 48.2271 +				fputs(" if ", out);
 48.2272 +				expr_fprint(prop->visible.expr, out);
 48.2273 +			}
 48.2274 +			fputc('\n', out);
 48.2275 +			break;
 48.2276 +		case P_CHOICE:
 48.2277 +			fputs("  #choice value\n", out);
 48.2278 +			break;
 48.2279 +		default:
 48.2280 +			fprintf(out, "  unknown prop %d!\n", prop->type);
 48.2281 +			break;
 48.2282 +		}
 48.2283 +	}
 48.2284 +	if (sym->help) {
 48.2285 +		int len = strlen(sym->help);
 48.2286 +		while (sym->help[--len] == '\n')
 48.2287 +			sym->help[len] = 0;
 48.2288 +		fprintf(out, "  help\n%s\n", sym->help);
 48.2289 +	}
 48.2290 +	fputc('\n', out);
 48.2291 +}
 48.2292 +
 48.2293 +void zconfdump(FILE *out)
 48.2294 +{
 48.2295 +	struct property *prop;
 48.2296 +	struct symbol *sym;
 48.2297 +	struct menu *menu;
 48.2298 +
 48.2299 +	menu = rootmenu.list;
 48.2300 +	while (menu) {
 48.2301 +		if ((sym = menu->sym))
 48.2302 +			print_symbol(out, menu);
 48.2303 +		else if ((prop = menu->prompt)) {
 48.2304 +			switch (prop->type) {
 48.2305 +			case P_COMMENT:
 48.2306 +				fputs("\ncomment ", out);
 48.2307 +				print_quoted_string(out, prop->text);
 48.2308 +				fputs("\n", out);
 48.2309 +				break;
 48.2310 +			case P_MENU:
 48.2311 +				fputs("\nmenu ", out);
 48.2312 +				print_quoted_string(out, prop->text);
 48.2313 +				fputs("\n", out);
 48.2314 +				break;
 48.2315 +			default:
 48.2316 +				;
 48.2317 +			}
 48.2318 +			if (!expr_is_yes(prop->visible.expr)) {
 48.2319 +				fputs("  depends ", out);
 48.2320 +				expr_fprint(prop->visible.expr, out);
 48.2321 +				fputc('\n', out);
 48.2322 +			}
 48.2323 +			fputs("\n", out);
 48.2324 +		}
 48.2325 +
 48.2326 +		if (menu->list)
 48.2327 +			menu = menu->list;
 48.2328 +		else if (menu->next)
 48.2329 +			menu = menu->next;
 48.2330 +		else while ((menu = menu->parent)) {
 48.2331 +			if (menu->prompt && menu->prompt->type == P_MENU)
 48.2332 +				fputs("\nendmenu\n", out);
 48.2333 +			if (menu->next) {
 48.2334 +				menu = menu->next;
 48.2335 +				break;
 48.2336 +			}
 48.2337 +		}
 48.2338 +	}
 48.2339 +}
 48.2340 +
 48.2341 +#include "lex.zconf.c"
 48.2342 +#include "util.c"
 48.2343 +#include "confdata.c"
 48.2344 +#include "expr.c"
 48.2345 +#include "symbol.c"
 48.2346 +#include "menu.c"
 48.2347 +
 48.2348 +
    49.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    49.2 +++ b/licenses/by-sa/deed.en	Sat Feb 24 11:00:05 2007 +0000
    49.3 @@ -0,0 +1,306 @@
    49.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
    49.5 +<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Creative Commons Deed</title>
    49.6 +
    49.7 +
    49.8 +
    49.9 +<meta http-equiv="content-type" content="text/html;charset=utf-8">
   49.10 +<link rel="stylesheet" type="text/css" href="deed_files/deeds.css">
   49.11 +<link rel="alternate" type="application/rdf+xml" href="http://creativecommons.org/licenses/by-sa/2.5/rdf"> 
   49.12 +
   49.13 +<script language="javascript">
   49.14 +function setCookie(name, value, expires, path, domain, secure) {
   49.15 +    document.cookie= name + "=" + escape(value) +
   49.16 +        ((expires) ? "; expires=" + expires.toGMTString() : "") +
   49.17 +        ((path) ? "; path=" + path : "") +
   49.18 +        ((domain) ? "; domain=" + domain : "") +
   49.19 +        ((secure) ? "; secure" : "");
   49.20 +}
   49.21 +var expiry = new Date();
   49.22 +expiry.setTime(expiry.getTime()+(5*365*24*60*60*1000));
   49.23 +setCookie('lang','en', expiry, '/');
   49.24 +</script></head><body>
   49.25 +
   49.26 +<!--
   49.27 +
   49.28 +<rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires
   49.29 +    rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF>
   49.30 +
   49.31 +
   49.32 +-->
   49.33 +
   49.34 +<p align="center"><a href="http://creativecommons.org/">Creative Commons</a></p>
   49.35 +
   49.36 +
   49.37 +
   49.38 +<div style="width: 620px; margin-left: auto; margin-right: auto;"><div style="text-align: center;">
   49.39 +This page is available in the following languages:
   49.40 +<br>
   49.41 +
   49.42 +
   49.43 +
   49.44 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.bg" title="българÑки" hreflang="bg" rel="alternate" lang="bg">българÑки</a>
   49.45 +
   49.46 +
   49.47 +
   49.48 +
   49.49 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.ca" title="Català" hreflang="ca" rel="alternate" lang="ca">Català</a>
   49.50 +
   49.51 +
   49.52 +
   49.53 +
   49.54 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.da" title="Dansk" hreflang="da" rel="alternate" lang="da">Dansk</a>
   49.55 +
   49.56 +
   49.57 +
   49.58 +
   49.59 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.de" title="Deutsch" hreflang="de" rel="alternate" lang="de">Deutsch</a>
   49.60 +
   49.61 +
   49.62 +
   49.63 +
   49.64 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.en" title="English" hreflang="en" rel="alternate" lang="en">English</a>
   49.65 +
   49.66 +
   49.67 +
   49.68 +
   49.69 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.en_CA" title="English (CA)" hreflang="en_CA" rel="alternate" lang="en_CA">English (CA)</a>
   49.70 +
   49.71 +
   49.72 +
   49.73 +
   49.74 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.en_GB" title="English (GB)" hreflang="en_GB" rel="alternate" lang="en_GB">English (GB)</a>
   49.75 +
   49.76 +
   49.77 +
   49.78 +
   49.79 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.es" title="Castellano" hreflang="es" rel="alternate" lang="es">Castellano</a>
   49.80 +
   49.81 +
   49.82 +
   49.83 +
   49.84 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.es_AR" title="Spanish (AR)" hreflang="es_AR" rel="alternate" lang="es_AR">Castellano (AR)</a>
   49.85 +
   49.86 +
   49.87 +
   49.88 +
   49.89 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.es_CL" title="Spanish (CL)" hreflang="es_CL" rel="alternate" lang="es_CL">Español (CL)</a>
   49.90 +
   49.91 +
   49.92 +
   49.93 +
   49.94 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.es_MX" title="Spanish (MX)" hreflang="es_MX" rel="alternate" lang="es_MX">Castellano (MX)</a>
   49.95 +
   49.96 +
   49.97 +
   49.98 +
   49.99 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.eu" title="Euskara" hreflang="eu" rel="alternate" lang="eu">Euskara</a>
  49.100 +
  49.101 +
  49.102 +
  49.103 +
  49.104 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.fi" title="Suomeksi" hreflang="fi" rel="alternate" lang="fi">Suomeksi</a>
  49.105 +
  49.106 +
  49.107 +
  49.108 +
  49.109 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.fr" title="français" hreflang="fr" rel="alternate" lang="fr">français</a>
  49.110 +
  49.111 +
  49.112 +
  49.113 +
  49.114 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.fr_CA" title="French (CA)" hreflang="fr_CA" rel="alternate" lang="fr_CA">français (CA)</a>
  49.115 +
  49.116 +
  49.117 +
  49.118 +
  49.119 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.gl" title="Galego" hreflang="gl" rel="alternate" lang="gl">Galego</a>
  49.120 +
  49.121 +
  49.122 +
  49.123 +
  49.124 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.he" title="עברית" hreflang="he" rel="alternate" lang="he">עברית</a>
  49.125 +
  49.126 +
  49.127 +
  49.128 +
  49.129 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.hr" title="hrvatski" hreflang="hr" rel="alternate" lang="hr">hrvatski</a>
  49.130 +
  49.131 +
  49.132 +
  49.133 +
  49.134 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.hu" title="Magyar" hreflang="hu" rel="alternate" lang="hu">Magyar</a>
  49.135 +
  49.136 +
  49.137 +
  49.138 +
  49.139 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.it" title="Italiano" hreflang="it" rel="alternate" lang="it">Italiano</a>
  49.140 +
  49.141 +
  49.142 +
  49.143 +
  49.144 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.ja" title="日本語" hreflang="ja" rel="alternate" lang="ja">日本語</a>
  49.145 +
  49.146 +
  49.147 +
  49.148 +
  49.149 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.ko" title="한국어" hreflang="ko" rel="alternate" lang="ko">한국어</a>
  49.150 +
  49.151 +
  49.152 +
  49.153 +
  49.154 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.ms" title="Melayu" hreflang="ms" rel="alternate" lang="ms">Melayu</a>
  49.155 +
  49.156 +
  49.157 +
  49.158 +
  49.159 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.nl" title="Nederlands" hreflang="nl" rel="alternate" lang="nl">Nederlands</a>
  49.160 +
  49.161 +
  49.162 +
  49.163 +
  49.164 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.pl" title="polski" hreflang="pl" rel="alternate" lang="pl">polski</a>
  49.165 +
  49.166 +
  49.167 +
  49.168 +
  49.169 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.pt" title="Português" hreflang="pt" rel="alternate" lang="pt">Português</a>
  49.170 +
  49.171 +
  49.172 +
  49.173 +
  49.174 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.pt_PT" hreflang="pt_PT" rel="alternate" lang="pt_PT">Português (PT)</a>
  49.175 +
  49.176 +
  49.177 +
  49.178 +
  49.179 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.se" title="svenska" hreflang="se" rel="alternate" lang="se">svenska</a>
  49.180 +
  49.181 +
  49.182 +
  49.183 +
  49.184 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.sl" title="slovenski jezik" hreflang="sl" rel="alternate" lang="sl">slovenski jezik</a>
  49.185 +
  49.186 +
  49.187 +
  49.188 +
  49.189 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.zh" title="简体中文" hreflang="zh" rel="alternate" lang="zh">简体中文</a>
  49.190 +
  49.191 +
  49.192 +
  49.193 +
  49.194 +<a href="http://creativecommons.org/licenses/by-sa/2.5/deed.zh_TW" title="Chinese (Taiwan)" hreflang="zh_TW" rel="alternate" lang="zh_TW">è¯èªž (å°ç£)</a>
  49.195 +
  49.196 +
  49.197 +</div></div>
  49.198 +
  49.199 +
  49.200 +
  49.201 +
  49.202 +<div id="deed">
  49.203 +
  49.204 +	<div align="center">
  49.205 +
  49.206 +	<img src="deed_files/logo_deed.gif" alt="Creative Commons Deed" border="0" height="79" vspace="14" width="280">
  49.207 +
  49.208 +	<p><b>Attribution-ShareAlike 2.5 </b></p>
  49.209 +
  49.210 +
  49.211 +
  49.212 +	<div class="text">
  49.213 +
  49.214 +        
  49.215 +
  49.216 +		<p><strong>You are free:</strong></p>
  49.217 +
  49.218 +			<ul>
  49.219 +
  49.220 +				<li>to copy, distribute, display, and perform the work</li>
  49.221 +
  49.222 +				<li>to make derivative works</li>
  49.223 +
  49.224 +				<li>to make commercial use of the work</li>
  49.225 +
  49.226 +			</ul>
  49.227 +
  49.228 +
  49.229 +
  49.230 +		<p><strong>Under the following conditions:</strong></p>
  49.231 +
  49.232 +	        <div align="center"><table class="draft" border="0" cellpadding="4" cellspacing="0" width="500">
  49.233 +
  49.234 +		<tbody>
  49.235 +
  49.236 +                <tr>
  49.237 +                   <td>
  49.238 +                     <img src="deed_files/deed.gif" alt="by" align="left" border="0" hspace="4">
  49.239 +                   </td>
  49.240 +                   <td align="left">
  49.241 +                      <div class="tiny"><strong>Attribution</strong>. 
  49.242 +                             You must attribute the work in the manner specified by the author or licensor.</div>
  49.243 +                   </td>
  49.244 +                </tr>
  49.245 +                <tr>
  49.246 +                   <td>
  49.247 +                     <img src="deed_files/deed_002.gif" alt="sa" align="left" border="0" hspace="4">
  49.248 +                   </td>
  49.249 +                   <td align="left">
  49.250 +                      <div class="tiny"><strong>Share Alike</strong>.
  49.251 +If you alter, transform, or build upon this work, you may distribute
  49.252 +the resulting work only under a license identical to this one.</div>
  49.253 +                   </td>
  49.254 +                </tr>
  49.255 +
  49.256 +                </tbody></table></div>
  49.257 +
  49.258 +		
  49.259 +
  49.260 +    <ul>
  49.261 +
  49.262 +    <li>For any reuse or distribution, you must make clear to others the license terms of this work.</li>
  49.263 +
  49.264 +    <li>Any of these conditions can be waived if you get permission from the copyright holder.</li>
  49.265 +
  49.266 +    </ul>
  49.267 +
  49.268 +
  49.269 +
  49.270 +<p style="margin-top: 40px;" align="center"><strong>Your fair use and other rights are in no way affected by the above.</strong></p>
  49.271 +
  49.272 +
  49.273 +
  49.274 +		
  49.275 +
  49.276 +		<p align="center">
  49.277 +
  49.278 +                
  49.279 +                This is a human-readable summary of the <a href="http://creativecommons.org/licenses/by-sa/2.5/legalcode" class="fulltext">Legal Code (the full license)</a>.
  49.280 +
  49.281 +                </p>
  49.282 +
  49.283 +
  49.284 +
  49.285 +                        
  49.286 +
  49.287 +			<div align="center">
  49.288 +
  49.289 +<a href="http://creativecommons.org/licenses/disclaimer-popup?lang=en" onclick="window.open('/licenses/disclaimer-popup?lang=en', 'characteristic_help', 'width=375,height=300,scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=yes,menubar=no,status=yes'); return false;">Disclaimer</a> 
  49.290 +<a href="http://creativecommons.org/licenses/disclaimer-popup?lang=en" onclick="window.open('/licenses/disclaimer-popup?lang=en', 'characteristic_help', 'width=375,height=300,scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=yes,menubar=no,status=yes'); return false;"><img src="deed_files/popup.gif" alt="disclaimer" border="0" height="13" width="15"></a></div>
  49.291 +
  49.292 +			<p>&nbsp;</p>
  49.293 +
  49.294 +		</div>
  49.295 +
  49.296 +	</div>
  49.297 +
  49.298 +</div>
  49.299 +
  49.300 +<p>
  49.301 +
  49.302 +<a href="http://creativecommons.org/about/licenses">Learn how to distribute your work using this license</a>
  49.303 +
  49.304 +</p>
  49.305 +
  49.306 +
  49.307 +
  49.308 +
  49.309 +</body></html>
  49.310 \ No newline at end of file
    50.1 Binary file licenses/by-sa/deed_files/deed.gif has changed
    51.1 Binary file licenses/by-sa/deed_files/deed_002.gif has changed
    52.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    52.2 +++ b/licenses/by-sa/deed_files/deeds.css	Sat Feb 24 11:00:05 2007 +0000
    52.3 @@ -0,0 +1,54 @@
    52.4 +body {
    52.5 +	margin: 0px;
    52.6 +	padding: 0px;
    52.7 +	font-family: verdana, arial, helvetica, sans-serif;
    52.8 +	color: black;
    52.9 +	background-color: white;
   52.10 +	text-align: center;
   52.11 +	font-size:11px;
   52.12 +	/* part 1 of 2 centering hack */
   52.13 +	}
   52.14 +
   52.15 +#deed {
   52.16 +	width: 620px; 
   52.17 +	padding: 15px;
   52.18 +	margin-top: 20px;
   52.19 +	margin-bottom: 20px;
   52.20 +	margin-right: auto;
   52.21 +	margin-left: auto; 	
   52.22 +	/* opera does not like 'margin:20px auto' */
   52.23 +	background: #ffc;
   52.24 +	border: 3px groove #333;
   52.25 +	text-align:left; 
   52.26 +	/* part 2 of 2 centering hack */
   52.27 +	width: 620px; /* ie5win fudge begins */
   52.28 +	voice-family: "\"}\"";
   52.29 +	voice-family:inherit;
   52.30 +	width: 584px;
   52.31 +	}
   52.32 +	
   52.33 +html>body #content {
   52.34 +	width: 584px; /* ie5win fudge ends */
   52.35 +	}
   52.36 +	
   52.37 +.fineprint {
   52.38 +	border:1px solid black; 
   52.39 +	padding:8px; 
   52.40 +	background:#ffffff;
   52.41 +	text-align:justify;
   52.42 +}
   52.43 +
   52.44 +.text, li {
   52.45 +	font-family:verdana, sans-serif;
   52.46 +	font-size:11px;
   52.47 +	margin-left:20px;
   52.48 +	margin-right:20px;
   52.49 +	line-height:140%;
   52.50 +	text-align:left;
   52.51 +}
   52.52 +
   52.53 +.tiny {
   52.54 +	font-family:verdana, sans-serif;
   52.55 +	font-size:11px;
   52.56 +	margin-bottom:10px;
   52.57 +}
   52.58 \ No newline at end of file
    53.1 Binary file licenses/by-sa/deed_files/logo_deed.gif has changed
    54.1 Binary file licenses/by-sa/deed_files/popup.gif has changed
    55.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    55.2 +++ b/licenses/by-sa/legalcode	Sat Feb 24 11:00:05 2007 +0000
    55.3 @@ -0,0 +1,378 @@
    55.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
    55.5 +<html><head><title>Creative Commons Legal Code</title>
    55.6 +
    55.7 +
    55.8 +
    55.9 +<link rel="stylesheet" type="text/css" href="legalcode_files/deeds.css">
   55.10 +<style type="text/css">
   55.11 +
   55.12 +li {
   55.13 +margin-bottom:12px;
   55.14 +}
   55.15 +
   55.16 +</style></head><body>
   55.17 +
   55.18 +<p align="center"><a href="http://creativecommons.org/">Creative Commons</a></p>
   55.19 +
   55.20 +
   55.21 +
   55.22 +<div id="deed">
   55.23 +<div align="center"><img src="legalcode_files/logo_code.gif" alt="Creative Commons Legal Code" border="0" height="79" vspace="14" width="280"></div>
   55.24 +
   55.25 +
   55.26 +<p align="center"><b>Attribution-ShareAlike 2.5</b></p>
   55.27 +
   55.28 +
   55.29 +<div class="text">
   55.30 +
   55.31 +
   55.32 +<div class="fineprint" style="background: transparent none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
   55.33 +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL
   55.34 +SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
   55.35 +ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON
   55.36 +AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE
   55.37 +INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
   55.38 +ITS USE.</div>
   55.39 +
   55.40 +
   55.41 +
   55.42 +
   55.43 +<p><em>License</em> </p>
   55.44 +
   55.45 +<p>THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
   55.46 +CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS
   55.47 +PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK
   55.48 +OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS
   55.49 +PROHIBITED. </p>
   55.50 +
   55.51 +<p>BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND
   55.52 +AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU
   55.53 +THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH
   55.54 +TERMS AND CONDITIONS. </p>
   55.55 +
   55.56 +
   55.57 +<p><strong>1. Definitions</strong> </p>
   55.58 +
   55.59 +<ol type="a">
   55.60 +<li>
   55.61 +<strong>"Collective Work"</strong> means a work, such as a periodical
   55.62 +issue, anthology or encyclopedia, in which the Work in its entirety in
   55.63 +unmodified form, along with a number of other contributions,
   55.64 +constituting separate and independent works in themselves, are
   55.65 +assembled into a collective whole. A work that constitutes a Collective
   55.66 +Work will not be considered a Derivative Work (as defined below) for
   55.67 +the purposes of this License.
   55.68 +</li>
   55.69 +
   55.70 +<li>
   55.71 +<strong>"Derivative Work"</strong> means a work based upon the Work or
   55.72 +upon the Work and other pre-existing works, such as a translation,
   55.73 +musical arrangement, dramatization, fictionalization, motion picture
   55.74 +version, sound recording, art reproduction, abridgment, condensation,
   55.75 +or any other form in which the Work may be recast, transformed, or
   55.76 +adapted, except that a work that constitutes a Collective Work will not
   55.77 +be considered a Derivative Work for the purpose of this License. For
   55.78 +the avoidance of doubt, where the Work is a musical composition or
   55.79 +sound recording, the synchronization of the Work in timed-relation with
   55.80 +a moving image ("synching") will be considered a Derivative Work for
   55.81 +the purpose of this License.
   55.82 +</li>
   55.83 +
   55.84 +<li>
   55.85 +<strong>"Licensor"</strong> means the individual or entity that offers the Work under the terms of this License.
   55.86 +</li>
   55.87 +
   55.88 +<li>
   55.89 +<strong>"Original Author"</strong> means the individual or entity who created the Work.
   55.90 +</li>
   55.91 +
   55.92 +<li>
   55.93 +<strong>"Work"</strong> means the copyrightable work of authorship offered under the terms of this License.
   55.94 +</li>
   55.95 +
   55.96 +<li>
   55.97 +<strong>"You"</strong> means an individual or entity exercising rights
   55.98 +under this License who has not previously violated the terms of this
   55.99 +License with respect to the Work, or who has received express
  55.100 +permission from the Licensor to exercise rights under this License
  55.101 +despite a previous violation.
  55.102 +</li>
  55.103 +
  55.104 +<li><strong>"License Elements"</strong> means the following high-level
  55.105 +license attributes as selected by Licensor and indicated in the title
  55.106 +of this License: Attribution, ShareAlike.</li></ol>
  55.107 +
  55.108 +<p><strong>2. Fair Use Rights.</strong> Nothing in this license is
  55.109 +intended to reduce, limit, or restrict any rights arising from fair
  55.110 +use, first sale or other limitations on the exclusive rights of the
  55.111 +copyright owner under copyright law or other applicable laws. </p>
  55.112 +
  55.113 +
  55.114 +<p><strong>3. License Grant.</strong> Subject to the terms and
  55.115 +conditions of this License, Licensor hereby grants You a worldwide,
  55.116 +royalty-free, non-exclusive, perpetual (for the duration of the
  55.117 +applicable copyright) license to exercise the rights in the Work as
  55.118 +stated below: </p>
  55.119 +
  55.120 +
  55.121 +<ol type="a">
  55.122 +<li>
  55.123 +to reproduce the Work, to incorporate the Work into one or more
  55.124 +Collective Works, and to reproduce the Work as incorporated in the
  55.125 +Collective Works;
  55.126 +</li>
  55.127 +
  55.128 +<li>
  55.129 +to create and reproduce Derivative Works;
  55.130 +</li>
  55.131 +
  55.132 +<li>to distribute copies or phonorecords of, display publicly, perform
  55.133 +publicly, and perform publicly by means of a digital audio transmission
  55.134 +the Work including as incorporated in Collective Works;
  55.135 +</li>
  55.136 +
  55.137 +<li>to distribute copies or phonorecords of, display publicly, perform
  55.138 +publicly, and perform publicly by means of a digital audio transmission
  55.139 +Derivative Works.
  55.140 +</li>
  55.141 +
  55.142 +<li><p>For the avoidance of doubt, where the work is a musical composition:</p>
  55.143 +
  55.144 +<ol type="i">
  55.145 +<li><strong>Performance Royalties Under Blanket Licenses</strong>.
  55.146 +Licensor waives the exclusive right to collect, whether individually or
  55.147 +via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties
  55.148 +for the public performance or public digital performance (e.g. webcast)
  55.149 +of the Work.</li>
  55.150 +
  55.151 +<li><strong>Mechanical Rights and Statutory Royalties</strong>.
  55.152 +Licensor waives the exclusive right to collect, whether individually or
  55.153 +via a music rights society or designated agent (e.g. Harry Fox Agency),
  55.154 +royalties for any phonorecord You create from the Work ("cover
  55.155 +version") and distribute, subject to the compulsory license created by
  55.156 +17 USC Section 115 of the US Copyright Act (or the equivalent in other
  55.157 +jurisdictions).
  55.158 +</li>
  55.159 +</ol>
  55.160 +</li>
  55.161 +
  55.162 +<li><strong>Webcasting Rights and Statutory Royalties</strong>. For the
  55.163 +avoidance of doubt, where the Work is a sound recording, Licensor
  55.164 +waives the exclusive right to collect, whether individually or via a
  55.165 +performance-rights society (e.g. SoundExchange), royalties for the
  55.166 +public digital performance (e.g. webcast) of the Work, subject to the
  55.167 +compulsory license created by 17 USC Section 114 of the US Copyright
  55.168 +Act (or the equivalent in other jurisdictions).</li>
  55.169 +</ol>
  55.170 +
  55.171 +
  55.172 +<p>The above rights may be exercised in all media and formats whether
  55.173 +now known or hereafter devised. The above rights include the right to
  55.174 +make such modifications as are technically necessary to exercise the
  55.175 +rights in other media and formats. All rights not expressly granted by
  55.176 +Licensor are hereby reserved.</p>
  55.177 +
  55.178 +<p><strong>4. Restrictions.</strong>The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: </p>
  55.179 +
  55.180 +
  55.181 +<ol type="a">
  55.182 +<li>
  55.183 +You may distribute, publicly display, publicly perform, or publicly
  55.184 +digitally perform the Work only under the terms of this License, and
  55.185 +You must include a copy of, or the Uniform Resource Identifier for,
  55.186 +this License with every copy or phonorecord of the Work You distribute,
  55.187 +publicly display, publicly perform, or publicly digitally perform. You
  55.188 +may not offer or impose any terms on the Work that alter or restrict
  55.189 +the terms of this License or the recipients' exercise of the rights
  55.190 +granted hereunder. You may not sublicense the Work. You must keep
  55.191 +intact all notices that refer to this License and to the disclaimer of
  55.192 +warranties. You may not distribute, publicly display, publicly perform,
  55.193 +or publicly digitally perform the Work with any technological measures
  55.194 +that control access or use of the Work in a manner inconsistent with
  55.195 +the terms of this License Agreement. The above applies to the Work as
  55.196 +incorporated in a Collective Work, but this does not require the
  55.197 +Collective Work apart from the Work itself to be made subject to the
  55.198 +terms of this License. If You create a Collective Work, upon notice
  55.199 +from any Licensor You must, to the extent practicable, remove from the
  55.200 +Collective Work any credit as required by clause 4(c), as requested. If
  55.201 +You create a Derivative Work, upon notice from any Licensor You must,
  55.202 +to the extent practicable, remove from the Derivative Work any credit
  55.203 +as required by clause 4(c), as requested.
  55.204 +</li>
  55.205 +
  55.206 +<li>You may distribute, publicly display, publicly perform, or publicly
  55.207 +digitally perform a Derivative Work only under the terms of this
  55.208 +License, a later version of this License with the same License Elements
  55.209 +as this License, or a Creative Commons iCommons license that contains
  55.210 +the same License Elements as this License (e.g. Attribution-ShareAlike
  55.211 +2.5 Japan). You must include a copy of, or the Uniform Resource
  55.212 +Identifier for, this License or other license specified in the previous
  55.213 +sentence with every copy or phonorecord of each Derivative Work You
  55.214 +distribute, publicly display, publicly perform, or publicly digitally
  55.215 +perform. You may not offer or impose any terms on the Derivative Works
  55.216 +that alter or restrict the terms of this License or the recipients'
  55.217 +exercise of the rights granted hereunder, and You must keep intact all
  55.218 +notices that refer to this License and to the disclaimer of warranties.
  55.219 +You may not distribute, publicly display, publicly perform, or publicly
  55.220 +digitally perform the Derivative Work with any technological measures
  55.221 +that control access or use of the Work in a manner inconsistent with
  55.222 +the terms of this License Agreement. The above applies to the
  55.223 +Derivative Work as incorporated in a Collective Work, but this does not
  55.224 +require the Collective Work apart from the Derivative Work itself to be
  55.225 +made subject to the terms of this License.
  55.226 +</li>
  55.227 +
  55.228 +<li>If you distribute, publicly display, publicly perform, or publicly
  55.229 +digitally perform the Work or any Derivative Works or Collective Works,
  55.230 +You must keep intact all copyright notices for the Work and provide,
  55.231 +reasonable to the medium or means You are utilizing: (i) the name of
  55.232 +the Original Author (or pseudonym, if applicable) if supplied, and/or
  55.233 +(ii) if the Original Author and/or Licensor designate another party or
  55.234 +parties (e.g. a sponsor institute, publishing entity, journal) for
  55.235 +attribution in Licensor's copyright notice, terms of service or by
  55.236 +other reasonable means, the name of such party or parties; the title of
  55.237 +the Work if supplied; to the extent reasonably practicable, the Uniform
  55.238 +Resource Identifier, if any, that Licensor specifies to be associated
  55.239 +with the Work, unless such URI does not refer to the copyright notice
  55.240 +or licensing information for the Work; and in the case of a Derivative
  55.241 +Work, a credit identifying the use of the Work in the Derivative Work
  55.242 +(e.g., "French translation of the Work by Original Author," or
  55.243 +"Screenplay based on original Work by Original Author"). Such credit
  55.244 +may be implemented in any reasonable manner; provided, however, that in
  55.245 +the case of a Derivative Work or Collective Work, at a minimum such
  55.246 +credit will appear where any other comparable authorship credit appears
  55.247 +and in a manner at least as prominent as such other comparable
  55.248 +authorship credit.
  55.249 +</li>
  55.250 +
  55.251 +
  55.252 +
  55.253 +
  55.254 +</ol>
  55.255 +
  55.256 +
  55.257 +
  55.258 +
  55.259 +
  55.260 +<p><strong>5. Representations, Warranties and Disclaimer</strong></p>
  55.261 +
  55.262 +<p>UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR
  55.263 +OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
  55.264 +KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR
  55.265 +OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE,
  55.266 +MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR
  55.267 +THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF
  55.268 +ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO
  55.269 +NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY
  55.270 +NOT APPLY TO YOU.</p>
  55.271 +
  55.272 +
  55.273 +<p><strong>6. Limitation on Liability.</strong> EXCEPT TO THE EXTENT
  55.274 +REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU
  55.275 +ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL,
  55.276 +PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF
  55.277 +THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
  55.278 +DAMAGES. </p>
  55.279 +
  55.280 +<p><strong>7. Termination</strong> </p>
  55.281 +
  55.282 +<ol type="a">
  55.283 +
  55.284 +<li>
  55.285 +This License and the rights granted hereunder will terminate
  55.286 +automatically upon any breach by You of the terms of this License.
  55.287 +Individuals or entities who have received Derivative Works or
  55.288 +Collective Works from You under this License, however, will not have
  55.289 +their licenses terminated provided such individuals or entities remain
  55.290 +in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8
  55.291 +will survive any termination of this License.
  55.292 +</li>
  55.293 +
  55.294 +<li>Subject to the above terms and conditions, the license granted here
  55.295 +is perpetual (for the duration of the applicable copyright in the
  55.296 +Work). Notwithstanding the above, Licensor reserves the right to
  55.297 +release the Work under different license terms or to stop distributing
  55.298 +the Work at any time; provided, however that any such election will not
  55.299 +serve to withdraw this License (or any other license that has been, or
  55.300 +is required to be, granted under the terms of this License), and this
  55.301 +License will continue in full force and effect unless terminated as
  55.302 +stated above.
  55.303 +</li>
  55.304 +</ol>
  55.305 +
  55.306 +<p><strong>8. Miscellaneous</strong> </p>
  55.307 +
  55.308 +<ol type="a">
  55.309 +
  55.310 +<li>Each time You distribute or publicly digitally perform the Work or
  55.311 +a Collective Work, the Licensor offers to the recipient a license to
  55.312 +the Work on the same terms and conditions as the license granted to You
  55.313 +under this License.
  55.314 +</li>
  55.315 +
  55.316 +<li>Each time You distribute or publicly digitally perform a Derivative
  55.317 +Work, Licensor offers to the recipient a license to the original Work
  55.318 +on the same terms and conditions as the license granted to You under
  55.319 +this License.
  55.320 +</li>
  55.321 +
  55.322 +<li>If any provision of this License is invalid or unenforceable under
  55.323 +applicable law, it shall not affect the validity or enforceability of
  55.324 +the remainder of the terms of this License, and without further action
  55.325 +by the parties to this agreement, such provision shall be reformed to
  55.326 +the minimum extent necessary to make such provision valid and
  55.327 +enforceable.
  55.328 +</li>
  55.329 +
  55.330 +<li>No term or provision of this License shall be deemed waived and no
  55.331 +breach consented to unless such waiver or consent shall be in writing
  55.332 +and signed by the party to be charged with such waiver or consent.
  55.333 +</li>
  55.334 +
  55.335 +<li>This License constitutes the entire agreement between the parties
  55.336 +with respect to the Work licensed here. There are no understandings,
  55.337 +agreements or representations with respect to the Work not specified
  55.338 +here. Licensor shall not be bound by any additional provisions that may
  55.339 +appear in any communication from You. This License may not be modified
  55.340 +without the mutual written agreement of the Licensor and You.
  55.341 +</li>
  55.342 +</ol>
  55.343 +
  55.344 +
  55.345 +<!-- BREAKOUT FOR CC NOTICE. NOT A PART OF THE LICENSE -->
  55.346 +<div class="fineprint">
  55.347 +
  55.348 +
  55.349 +<p>Creative Commons is not a party to this License, and makes no
  55.350 +warranty whatsoever in connection with the Work. Creative Commons will
  55.351 +not be liable to You or any party on any legal theory for any damages
  55.352 +whatsoever, including without limitation any general, special,
  55.353 +incidental or consequential damages arising in connection to this
  55.354 +license. Notwithstanding the foregoing two (2) sentences, if Creative
  55.355 +Commons has expressly identified itself as the Licensor hereunder, it
  55.356 +shall have all rights and obligations of Licensor. </p>
  55.357 +
  55.358 +
  55.359 +<p>Except for the limited purpose of indicating to the public that the
  55.360 +Work is licensed under the CCPL, neither party will use the trademark
  55.361 +"Creative Commons" or any related trademark or logo of Creative Commons
  55.362 +without the prior written consent of Creative Commons. Any permitted
  55.363 +use will be in compliance with Creative Commons' then-current trademark
  55.364 +usage guidelines, as may be published on its website or otherwise made
  55.365 +available upon request from time to time.</p>
  55.366 +
  55.367 +
  55.368 +<p>Creative Commons may be contacted at <a href="http://creativecommons.org/">http://creativecommons.org/</a>.</p>
  55.369 +
  55.370 +
  55.371 +</div>
  55.372 +<!-- END CC NOTICE -->
  55.373 +
  55.374 +
  55.375 +</div>
  55.376 +
  55.377 +
  55.378 +<div style="margin-bottom: 10px;" align="right"><a href="http://creativecommons.org/licenses/by-sa/2.5/" class="fulltext">« Back to Commons Deed</a></div>
  55.379 +
  55.380 +</div>
  55.381 +</body></html>
  55.382 \ No newline at end of file
    56.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    56.2 +++ b/licenses/by-sa/legalcode_files/deeds.css	Sat Feb 24 11:00:05 2007 +0000
    56.3 @@ -0,0 +1,54 @@
    56.4 +body {
    56.5 +	margin: 0px;
    56.6 +	padding: 0px;
    56.7 +	font-family: verdana, arial, helvetica, sans-serif;
    56.8 +	color: black;
    56.9 +	background-color: white;
   56.10 +	text-align: center;
   56.11 +	font-size:11px;
   56.12 +	/* part 1 of 2 centering hack */
   56.13 +	}
   56.14 +
   56.15 +#deed {
   56.16 +	width: 620px; 
   56.17 +	padding: 15px;
   56.18 +	margin-top: 20px;
   56.19 +	margin-bottom: 20px;
   56.20 +	margin-right: auto;
   56.21 +	margin-left: auto; 	
   56.22 +	/* opera does not like 'margin:20px auto' */
   56.23 +	background: #ffc;
   56.24 +	border: 3px groove #333;
   56.25 +	text-align:left; 
   56.26 +	/* part 2 of 2 centering hack */
   56.27 +	width: 620px; /* ie5win fudge begins */
   56.28 +	voice-family: "\"}\"";
   56.29 +	voice-family:inherit;
   56.30 +	width: 584px;
   56.31 +	}
   56.32 +	
   56.33 +html>body #content {
   56.34 +	width: 584px; /* ie5win fudge ends */
   56.35 +	}
   56.36 +	
   56.37 +.fineprint {
   56.38 +	border:1px solid black; 
   56.39 +	padding:8px; 
   56.40 +	background:#ffffff;
   56.41 +	text-align:justify;
   56.42 +}
   56.43 +
   56.44 +.text, li {
   56.45 +	font-family:verdana, sans-serif;
   56.46 +	font-size:11px;
   56.47 +	margin-left:20px;
   56.48 +	margin-right:20px;
   56.49 +	line-height:140%;
   56.50 +	text-align:left;
   56.51 +}
   56.52 +
   56.53 +.tiny {
   56.54 +	font-family:verdana, sans-serif;
   56.55 +	font-size:11px;
   56.56 +	margin-bottom:10px;
   56.57 +}
   56.58 \ No newline at end of file
    57.1 Binary file licenses/by-sa/legalcode_files/logo_code.gif has changed
    58.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    58.2 +++ b/licenses/gpl.txt	Sat Feb 24 11:00:05 2007 +0000
    58.3 @@ -0,0 +1,339 @@
    58.4 +		    GNU GENERAL PUBLIC LICENSE
    58.5 +		       Version 2, June 1991
    58.6 +
    58.7 + Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
    58.8 + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    58.9 + Everyone is permitted to copy and distribute verbatim copies
   58.10 + of this license document, but changing it is not allowed.
   58.11 +
   58.12 +			    Preamble
   58.13 +
   58.14 +  The licenses for most software are designed to take away your
   58.15 +freedom to share and change it.  By contrast, the GNU General Public
   58.16 +License is intended to guarantee your freedom to share and change free
   58.17 +software--to make sure the software is free for all its users.  This
   58.18 +General Public License applies to most of the Free Software
   58.19 +Foundation's software and to any other program whose authors commit to
   58.20 +using it.  (Some other Free Software Foundation software is covered by
   58.21 +the GNU Lesser General Public License instead.)  You can apply it to
   58.22 +your programs, too.
   58.23 +
   58.24 +  When we speak of free software, we are referring to freedom, not
   58.25 +price.  Our General Public Licenses are designed to make sure that you
   58.26 +have the freedom to distribute copies of free software (and charge for
   58.27 +this service if you wish), that you receive source code or can get it
   58.28 +if you want it, that you can change the software or use pieces of it
   58.29 +in new free programs; and that you know you can do these things.
   58.30 +
   58.31 +  To protect your rights, we need to make restrictions that forbid
   58.32 +anyone to deny you these rights or to ask you to surrender the rights.
   58.33 +These restrictions translate to certain responsibilities for you if you
   58.34 +distribute copies of the software, or if you modify it.
   58.35 +
   58.36 +  For example, if you distribute copies of such a program, whether
   58.37 +gratis or for a fee, you must give the recipients all the rights that
   58.38 +you have.  You must make sure that they, too, receive or can get the
   58.39 +source code.  And you must show them these terms so they know their
   58.40 +rights.
   58.41 +
   58.42 +  We protect your rights with two steps: (1) copyright the software, and
   58.43 +(2) offer you this license which gives you legal permission to copy,
   58.44 +distribute and/or modify the software.
   58.45 +
   58.46 +  Also, for each author's protection and ours, we want to make certain
   58.47 +that everyone understands that there is no warranty for this free
   58.48 +software.  If the software is modified by someone else and passed on, we
   58.49 +want its recipients to know that what they have is not the original, so
   58.50 +that any problems introduced by others will not reflect on the original
   58.51 +authors' reputations.
   58.52 +
   58.53 +  Finally, any free program is threatened constantly by software
   58.54 +patents.  We wish to avoid the danger that redistributors of a free
   58.55 +program will individually obtain patent licenses, in effect making the
   58.56 +program proprietary.  To prevent this, we have made it clear that any
   58.57 +patent must be licensed for everyone's free use or not licensed at all.
   58.58 +
   58.59 +  The precise terms and conditions for copying, distribution and
   58.60 +modification follow.
   58.61 +
   58.62 +		    GNU GENERAL PUBLIC LICENSE
   58.63 +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
   58.64 +
   58.65 +  0. This License applies to any program or other work which contains
   58.66 +a notice placed by the copyright holder saying it may be distributed
   58.67 +under the terms of this General Public License.  The "Program", below,
   58.68 +refers to any such program or work, and a "work based on the Program"
   58.69 +means either the Program or any derivative work under copyright law:
   58.70 +that is to say, a work containing the Program or a portion of it,
   58.71 +either verbatim or with modifications and/or translated into another
   58.72 +language.  (Hereinafter, translation is included without limitation in
   58.73 +the term "modification".)  Each licensee is addressed as "you".
   58.74 +
   58.75 +Activities other than copying, distribution and modification are not
   58.76 +covered by this License; they are outside its scope.  The act of
   58.77 +running the Program is not restricted, and the output from the Program
   58.78 +is covered only if its contents constitute a work based on the
   58.79 +Program (independent of having been made by running the Program).
   58.80 +Whether that is true depends on what the Program does.
   58.81 +
   58.82 +  1. You may copy and distribute verbatim copies of the Program's
   58.83 +source code as you receive it, in any medium, provided that you
   58.84 +conspicuously and appropriately publish on each copy an appropriate
   58.85 +copyright notice and disclaimer of warranty; keep intact all the
   58.86 +notices that refer to this License and to the absence of any warranty;
   58.87 +and give any other recipients of the Program a copy of this License
   58.88 +along with the Program.
   58.89 +
   58.90 +You may charge a fee for the physical act of transferring a copy, and
   58.91 +you may at your option offer warranty protection in exchange for a fee.
   58.92 +
   58.93 +  2. You may modify your copy or copies of the Program or any portion
   58.94 +of it, thus forming a work based on the Program, and copy and
   58.95 +distribute such modifications or work under the terms of Section 1
   58.96 +above, provided that you also meet all of these conditions:
   58.97 +
   58.98 +    a) You must cause the modified files to carry prominent notices
   58.99 +    stating that you changed the files and the date of any change.
  58.100 +
  58.101 +    b) You must cause any work that you distribute or publish, that in
  58.102 +    whole or in part contains or is derived from the Program or any
  58.103 +    part thereof, to be licensed as a whole at no charge to all third
  58.104 +    parties under the terms of this License.
  58.105 +
  58.106 +    c) If the modified program normally reads commands interactively
  58.107 +    when run, you must cause it, when started running for such
  58.108 +    interactive use in the most ordinary way, to print or display an
  58.109 +    announcement including an appropriate copyright notice and a
  58.110 +    notice that there is no warranty (or else, saying that you provide
  58.111 +    a warranty) and that users may redistribute the program under
  58.112 +    these conditions, and telling the user how to view a copy of this
  58.113 +    License.  (Exception: if the Program itself is interactive but
  58.114 +    does not normally print such an announcement, your work based on
  58.115 +    the Program is not required to print an announcement.)
  58.116 +
  58.117 +These requirements apply to the modified work as a whole.  If
  58.118 +identifiable sections of that work are not derived from the Program,
  58.119 +and can be reasonably considered independent and separate works in
  58.120 +themselves, then this License, and its terms, do not apply to those
  58.121 +sections when you distribute them as separate works.  But when you
  58.122 +distribute the same sections as part of a whole which is a work based
  58.123 +on the Program, the distribution of the whole must be on the terms of
  58.124 +this License, whose permissions for other licensees extend to the
  58.125 +entire whole, and thus to each and every part regardless of who wrote it.
  58.126 +
  58.127 +Thus, it is not the intent of this section to claim rights or contest
  58.128 +your rights to work written entirely by you; rather, the intent is to
  58.129 +exercise the right to control the distribution of derivative or
  58.130 +collective works based on the Program.
  58.131 +
  58.132 +In addition, mere aggregation of another work not based on the Program
  58.133 +with the Program (or with a work based on the Program) on a volume of
  58.134 +a storage or distribution medium does not bring the other work under
  58.135 +the scope of this License.
  58.136 +
  58.137 +  3. You may copy and distribute the Program (or a work based on it,
  58.138 +under Section 2) in object code or executable form under the terms of
  58.139 +Sections 1 and 2 above provided that you also do one of the following:
  58.140 +
  58.141 +    a) Accompany it with the complete corresponding machine-readable
  58.142 +    source code, which must be distributed under the terms of Sections
  58.143 +    1 and 2 above on a medium customarily used for software interchange; or,
  58.144 +
  58.145 +    b) Accompany it with a written offer, valid for at least three
  58.146 +    years, to give any third party, for a charge no more than your
  58.147 +    cost of physically performing source distribution, a complete
  58.148 +    machine-readable copy of the corresponding source code, to be
  58.149 +    distributed under the terms of Sections 1 and 2 above on a medium
  58.150 +    customarily used for software interchange; or,
  58.151 +
  58.152 +    c) Accompany it with the information you received as to the offer
  58.153 +    to distribute corresponding source code.  (This alternative is
  58.154 +    allowed only for noncommercial distribution and only if you
  58.155 +    received the program in object code or executable form with such
  58.156 +    an offer, in accord with Subsection b above.)
  58.157 +
  58.158 +The source code for a work means the preferred form of the work for
  58.159 +making modifications to it.  For an executable work, complete source
  58.160 +code means all the source code for all modules it contains, plus any
  58.161 +associated interface definition files, plus the scripts used to
  58.162 +control compilation and installation of the executable.  However, as a
  58.163 +special exception, the source code distributed need not include
  58.164 +anything that is normally distributed (in either source or binary
  58.165 +form) with the major components (compiler, kernel, and so on) of the
  58.166 +operating system on which the executable runs, unless that component
  58.167 +itself accompanies the executable.
  58.168 +
  58.169 +If distribution of executable or object code is made by offering
  58.170 +access to copy from a designated place, then offering equivalent
  58.171 +access to copy the source code from the same place counts as
  58.172 +distribution of the source code, even though third parties are not
  58.173 +compelled to copy the source along with the object code.
  58.174 +
  58.175 +  4. You may not copy, modify, sublicense, or distribute the Program
  58.176 +except as expressly provided under this License.  Any attempt
  58.177 +otherwise to copy, modify, sublicense or distribute the Program is
  58.178 +void, and will automatically terminate your rights under this License.
  58.179 +However, parties who have received copies, or rights, from you under
  58.180 +this License will not have their licenses terminated so long as such
  58.181 +parties remain in full compliance.
  58.182 +
  58.183 +  5. You are not required to accept this License, since you have not
  58.184 +signed it.  However, nothing else grants you permission to modify or
  58.185 +distribute the Program or its derivative works.  These actions are
  58.186 +prohibited by law if you do not accept this License.  Therefore, by
  58.187 +modifying or distributing the Program (or any work based on the
  58.188 +Program), you indicate your acceptance of this License to do so, and
  58.189 +all its terms and conditions for copying, distributing or modifying
  58.190 +the Program or works based on it.
  58.191 +
  58.192 +  6. Each time you redistribute the Program (or any work based on the
  58.193 +Program), the recipient automatically receives a license from the
  58.194 +original licensor to copy, distribute or modify the Program subject to
  58.195 +these terms and conditions.  You may not impose any further
  58.196 +restrictions on the recipients' exercise of the rights granted herein.
  58.197 +You are not responsible for enforcing compliance by third parties to
  58.198 +this License.
  58.199 +
  58.200 +  7. If, as a consequence of a court judgment or allegation of patent
  58.201 +infringement or for any other reason (not limited to patent issues),
  58.202 +conditions are imposed on you (whether by court order, agreement or
  58.203 +otherwise) that contradict the conditions of this License, they do not
  58.204 +excuse you from the conditions of this License.  If you cannot
  58.205 +distribute so as to satisfy simultaneously your obligations under this
  58.206 +License and any other pertinent obligations, then as a consequence you
  58.207 +may not distribute the Program at all.  For example, if a patent
  58.208 +license would not permit royalty-free redistribution of the Program by
  58.209 +all those who receive copies directly or indirectly through you, then
  58.210 +the only way you could satisfy both it and this License would be to
  58.211 +refrain entirely from distribution of the Program.
  58.212 +
  58.213 +If any portion of this section is held invalid or unenforceable under
  58.214 +any particular circumstance, the balance of the section is intended to
  58.215 +apply and the section as a whole is intended to apply in other
  58.216 +circumstances.
  58.217 +
  58.218 +It is not the purpose of this section to induce you to infringe any
  58.219 +patents or other property right claims or to contest validity of any
  58.220 +such claims; this section has the sole purpose of protecting the
  58.221 +integrity of the free software distribution system, which is
  58.222 +implemented by public license practices.  Many people have made
  58.223 +generous contributions to the wide range of software distributed
  58.224 +through that system in reliance on consistent application of that
  58.225 +system; it is up to the author/donor to decide if he or she is willing
  58.226 +to distribute software through any other system and a licensee cannot
  58.227 +impose that choice.
  58.228 +
  58.229 +This section is intended to make thoroughly clear what is believed to
  58.230 +be a consequence of the rest of this License.
  58.231 +
  58.232 +  8. If the distribution and/or use of the Program is restricted in
  58.233 +certain countries either by patents or by copyrighted interfaces, the
  58.234 +original copyright holder who places the Program under this License
  58.235 +may add an explicit geographical distribution limitation excluding
  58.236 +those countries, so that distribution is permitted only in or among
  58.237 +countries not thus excluded.  In such case, this License incorporates
  58.238 +the limitation as if written in the body of this License.
  58.239 +
  58.240 +  9. The Free Software Foundation may publish revised and/or new versions
  58.241 +of the General Public License from time to time.  Such new versions will
  58.242 +be similar in spirit to the present version, but may differ in detail to
  58.243 +address new problems or concerns.
  58.244 +
  58.245 +Each version is given a distinguishing version number.  If the Program
  58.246 +specifies a version number of this License which applies to it and "any
  58.247 +later version", you have the option of following the terms and conditions
  58.248 +either of that version or of any later version published by the Free
  58.249 +Software Foundation.  If the Program does not specify a version number of
  58.250 +this License, you may choose any version ever published by the Free Software
  58.251 +Foundation.
  58.252 +
  58.253 +  10. If you wish to incorporate parts of the Program into other free
  58.254 +programs whose distribution conditions are different, write to the author
  58.255 +to ask for permission.  For software which is copyrighted by the Free
  58.256 +Software Foundation, write to the Free Software Foundation; we sometimes
  58.257 +make exceptions for this.  Our decision will be guided by the two goals
  58.258 +of preserving the free status of all derivatives of our free software and
  58.259 +of promoting the sharing and reuse of software generally.
  58.260 +
  58.261 +			    NO WARRANTY
  58.262 +
  58.263 +  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  58.264 +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
  58.265 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  58.266 +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  58.267 +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  58.268 +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
  58.269 +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  58.270 +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  58.271 +REPAIR OR CORRECTION.
  58.272 +
  58.273 +  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  58.274 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  58.275 +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  58.276 +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  58.277 +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  58.278 +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  58.279 +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  58.280 +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  58.281 +POSSIBILITY OF SUCH DAMAGES.
  58.282 +
  58.283 +		     END OF TERMS AND CONDITIONS
  58.284 +
  58.285 +	    How to Apply These Terms to Your New Programs
  58.286 +
  58.287 +  If you develop a new program, and you want it to be of the greatest
  58.288 +possible use to the public, the best way to achieve this is to make it
  58.289 +free software which everyone can redistribute and change under these terms.
  58.290 +
  58.291 +  To do so, attach the following notices to the program.  It is safest
  58.292 +to attach them to the start of each source file to most effectively
  58.293 +convey the exclusion of warranty; and each file should have at least
  58.294 +the "copyright" line and a pointer to where the full notice is found.
  58.295 +
  58.296 +    <one line to give the program's name and a brief idea of what it does.>
  58.297 +    Copyright (C) <year>  <name of author>
  58.298 +
  58.299 +    This program is free software; you can redistribute it and/or modify
  58.300 +    it under the terms of the GNU General Public License as published by
  58.301 +    the Free Software Foundation; either version 2 of the License, or
  58.302 +    (at your option) any later version.
  58.303 +
  58.304 +    This program is distributed in the hope that it will be useful,
  58.305 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
  58.306 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  58.307 +    GNU General Public License for more details.
  58.308 +
  58.309 +    You should have received a copy of the GNU General Public License along
  58.310 +    with this program; if not, write to the Free Software Foundation, Inc.,
  58.311 +    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  58.312 +
  58.313 +Also add information on how to contact you by electronic and paper mail.
  58.314 +
  58.315 +If the program is interactive, make it output a short notice like this
  58.316 +when it starts in an interactive mode:
  58.317 +
  58.318 +    Gnomovision version 69, Copyright (C) year name of author
  58.319 +    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  58.320 +    This is free software, and you are welcome to redistribute it
  58.321 +    under certain conditions; type `show c' for details.
  58.322 +
  58.323 +The hypothetical commands `show w' and `show c' should show the appropriate
  58.324 +parts of the General Public License.  Of course, the commands you use may
  58.325 +be called something other than `show w' and `show c'; they could even be
  58.326 +mouse-clicks or menu items--whatever suits your program.
  58.327 +
  58.328 +You should also get your employer (if you work as a programmer) or your
  58.329 +school, if any, to sign a "copyright disclaimer" for the program, if
  58.330 +necessary.  Here is a sample; alter the names:
  58.331 +
  58.332 +  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  58.333 +  `Gnomovision' (which makes passes at compilers) written by James Hacker.
  58.334 +
  58.335 +  <signature of Ty Coon>, 1 April 1989
  58.336 +  Ty Coon, President of Vice
  58.337 +
  58.338 +This General Public License does not permit incorporating your program into
  58.339 +proprietary programs.  If your program is a subroutine library, you may
  58.340 +consider it more useful to permit linking proprietary applications with the
  58.341 +library.  If this is what you want to do, use the GNU Lesser General
  58.342 +Public License instead of this License.
    59.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    59.2 +++ b/licenses/lgpl.txt	Sat Feb 24 11:00:05 2007 +0000
    59.3 @@ -0,0 +1,504 @@
    59.4 +		  GNU LESSER GENERAL PUBLIC LICENSE
    59.5 +		       Version 2.1, February 1999
    59.6 +
    59.7 + Copyright (C) 1991, 1999 Free Software Foundation, Inc.
    59.8 + 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
    59.9 + Everyone is permitted to copy and distribute verbatim copies
   59.10 + of this license document, but changing it is not allowed.
   59.11 +
   59.12 +[This is the first released version of the Lesser GPL.  It also counts
   59.13 + as the successor of the GNU Library Public License, version 2, hence
   59.14 + the version number 2.1.]
   59.15 +
   59.16 +			    Preamble
   59.17 +
   59.18 +  The licenses for most software are designed to take away your
   59.19 +freedom to share and change it.  By contrast, the GNU General Public
   59.20 +Licenses are intended to guarantee your freedom to share and change
   59.21 +free software--to make sure the software is free for all its users.
   59.22 +
   59.23 +  This license, the Lesser General Public License, applies to some
   59.24 +specially designated software packages--typically libraries--of the
   59.25 +Free Software Foundation and other authors who decide to use it.  You
   59.26 +can use it too, but we suggest you first think carefully about whether
   59.27 +this license or the ordinary General Public License is the better
   59.28 +strategy to use in any particular case, based on the explanations below.
   59.29 +
   59.30 +  When we speak of free software, we are referring to freedom of use,
   59.31 +not price.  Our General Public Licenses are designed to make sure that
   59.32 +you have the freedom to distribute copies of free software (and charge
   59.33 +for this service if you wish); that you receive source code or can get
   59.34 +it if you want it; that you can change the software and use pieces of
   59.35 +it in new free programs; and that you are informed that you can do
   59.36 +these things.
   59.37 +
   59.38 +  To protect your rights, we need to make restrictions that forbid
   59.39 +distributors to deny you these rights or to ask you to surrender these
   59.40 +rights.  These restrictions translate to certain responsibilities for
   59.41 +you if you distribute copies of the library or if you modify it.
   59.42 +
   59.43 +  For example, if you distribute copies of the library, whether gratis
   59.44 +or for a fee, you must give the recipients all the rights that we gave
   59.45 +you.  You must make sure that they, too, receive or can get the source
   59.46 +code.  If you link other code with the library, you must provide
   59.47 +complete object files to the recipients, so that they can relink them
   59.48 +with the library after making changes to the library and recompiling
   59.49 +it.  And you must show them these terms so they know their rights.
   59.50 +
   59.51 +  We protect your rights with a two-step method: (1) we copyright the
   59.52 +library, and (2) we offer you this license, which gives you legal
   59.53 +permission to copy, distribute and/or modify the library.
   59.54 +
   59.55 +  To protect each distributor, we want to make it very clear that
   59.56 +there is no warranty for the free library.  Also, if the library is
   59.57 +modified by someone else and passed on, the recipients should know
   59.58 +that what they have is not the original version, so that the original
   59.59 +author's reputation will not be affected by problems that might be
   59.60 +introduced by others.
   59.61 +
   59.62 +  Finally, software patents pose a constant threat to the existence of
   59.63 +any free program.  We wish to make sure that a company cannot
   59.64 +effectively restrict the users of a free program by obtaining a
   59.65 +restrictive license from a patent holder.  Therefore, we insist that
   59.66 +any patent license obtained for a version of the library must be
   59.67 +consistent with the full freedom of use specified in this license.
   59.68 +
   59.69 +  Most GNU software, including some libraries, is covered by the
   59.70 +ordinary GNU General Public License.  This license, the GNU Lesser
   59.71 +General Public License, applies to certain designated libraries, and
   59.72 +is quite different from the ordinary General Public License.  We use
   59.73 +this license for certain libraries in order to permit linking those
   59.74 +libraries into non-free programs.
   59.75 +
   59.76 +  When a program is linked with a library, whether statically or using
   59.77 +a shared library, the combination of the two is legally speaking a
   59.78 +combined work, a derivative of the original library.  The ordinary
   59.79 +General Public License therefore permits such linking only if the
   59.80 +entire combination fits its criteria of freedom.  The Lesser General
   59.81 +Public License permits more lax criteria for linking other code with
   59.82 +the library.
   59.83 +
   59.84 +  We call this license the "Lesser" General Public License because it
   59.85 +does Less to protect the user's freedom than the ordinary General
   59.86 +Public License.  It also provides other free software developers Less
   59.87 +of an advantage over competing non-free programs.  These disadvantages
   59.88 +are the reason we use the ordinary General Public License for many
   59.89 +libraries.  However, the Lesser license provides advantages in certain
   59.90 +special circumstances.
   59.91 +
   59.92 +  For example, on rare occasions, there may be a special need to
   59.93 +encourage the widest possible use of a certain library, so that it becomes
   59.94 +a de-facto standard.  To achieve this, non-free programs must be
   59.95 +allowed to use the library.  A more frequent case is that a free
   59.96 +library does the same job as widely used non-free libraries.  In this
   59.97 +case, there is little to gain by limiting the free library to free
   59.98 +software only, so we use the Lesser General Public License.
   59.99 +
  59.100 +  In other cases, permission to use a particular library in non-free
  59.101 +programs enables a greater number of people to use a large body of
  59.102 +free software.  For example, permission to use the GNU C Library in
  59.103 +non-free programs enables many more people to use the whole GNU
  59.104 +operating system, as well as its variant, the GNU/Linux operating
  59.105 +system.
  59.106 +
  59.107 +  Although the Lesser General Public License is Less protective of the
  59.108 +users' freedom, it does ensure that the user of a program that is
  59.109 +linked with the Library has the freedom and the wherewithal to run
  59.110 +that program using a modified version of the Library.
  59.111 +
  59.112 +  The precise terms and conditions for copying, distribution and
  59.113 +modification follow.  Pay close attention to the difference between a
  59.114 +"work based on the library" and a "work that uses the library".  The
  59.115 +former contains code derived from the library, whereas the latter must
  59.116 +be combined with the library in order to run.
  59.117 +
  59.118 +		  GNU LESSER GENERAL PUBLIC LICENSE
  59.119 +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  59.120 +
  59.121 +  0. This License Agreement applies to any software library or other
  59.122 +program which contains a notice placed by the copyright holder or
  59.123 +other authorized party saying it may be distributed under the terms of
  59.124 +this Lesser General Public License (also called "this License").
  59.125 +Each licensee is addressed as "you".
  59.126 +
  59.127 +  A "library" means a collection of software functions and/or data
  59.128 +prepared so as to be conveniently linked with application programs
  59.129 +(which use some of those functions and data) to form executables.
  59.130 +
  59.131 +  The "Library", below, refers to any such software library or work
  59.132 +which has been distributed under these terms.  A "work based on the
  59.133 +Library" means either the Library or any derivative work under
  59.134 +copyright law: that is to say, a work containing the Library or a
  59.135 +portion of it, either verbatim or with modifications and/or translated
  59.136 +straightforwardly into another language.  (Hereinafter, translation is
  59.137 +included without limitation in the term "modification".)
  59.138 +
  59.139 +  "Source code" for a work means the preferred form of the work for
  59.140 +making modifications to it.  For a library, complete source code means
  59.141 +all the source code for all modules it contains, plus any associated
  59.142 +interface definition files, plus the scripts used to control compilation
  59.143 +and installation of the library.
  59.144 +
  59.145 +  Activities other than copying, distribution and modification are not
  59.146 +covered by this License; they are outside its scope.  The act of
  59.147 +running a program using the Library is not restricted, and output from
  59.148 +such a program is covered only if its contents constitute a work based
  59.149 +on the Library (independent of the use of the Library in a tool for
  59.150 +writing it).  Whether that is true depends on what the Library does
  59.151 +and what the program that uses the Library does.
  59.152 +  
  59.153 +  1. You may copy and distribute verbatim copies of the Library's
  59.154 +complete source code as you receive it, in any medium, provided that
  59.155 +you conspicuously and appropriately publish on each copy an
  59.156 +appropriate copyright notice and disclaimer of warranty; keep intact
  59.157 +all the notices that refer to this License and to the absence of any
  59.158 +warranty; and distribute a copy of this License along with the
  59.159 +Library.
  59.160 +
  59.161 +  You may charge a fee for the physical act of transferring a copy,
  59.162 +and you may at your option offer warranty protection in exchange for a
  59.163 +fee.
  59.164 +
  59.165 +  2. You may modify your copy or copies of the Library or any portion
  59.166 +of it, thus forming a work based on the Library, and copy and
  59.167 +distribute such modifications or work under the terms of Section 1
  59.168 +above, provided that you also meet all of these conditions:
  59.169 +
  59.170 +    a) The modified work must itself be a software library.
  59.171 +
  59.172 +    b) You must cause the files modified to carry prominent notices
  59.173 +    stating that you changed the files and the date of any change.
  59.174 +
  59.175 +    c) You must cause the whole of the work to be licensed at no
  59.176 +    charge to all third parties under the terms of this License.
  59.177 +
  59.178 +    d) If a facility in the modified Library refers to a function or a
  59.179 +    table of data to be supplied by an application program that uses
  59.180 +    the facility, other than as an argument passed when the facility
  59.181 +    is invoked, then you must make a good faith effort to ensure that,
  59.182 +    in the event an application does not supply such function or
  59.183 +    table, the facility still operates, and performs whatever part of
  59.184 +    its purpose remains meaningful.
  59.185 +
  59.186 +    (For example, a function in a library to compute square roots has
  59.187 +    a purpose that is entirely well-defined independent of the
  59.188 +    application.  Therefore, Subsection 2d requires that any
  59.189 +    application-supplied function or table used by this function must
  59.190 +    be optional: if the application does not supply it, the square
  59.191 +    root function must still compute square roots.)
  59.192 +
  59.193 +These requirements apply to the modified work as a whole.  If
  59.194 +identifiable sections of that work are not derived from the Library,
  59.195 +and can be reasonably considered independent and separate works in
  59.196 +themselves, then this License, and its terms, do not apply to those
  59.197 +sections when you distribute them as separate works.  But when you
  59.198 +distribute the same sections as part of a whole which is a work based
  59.199 +on the Library, the distribution of the whole must be on the terms of
  59.200 +this License, whose permissions for other licensees extend to the
  59.201 +entire whole, and thus to each and every part regardless of who wrote
  59.202 +it.
  59.203 +
  59.204 +Thus, it is not the intent of this section to claim rights or contest
  59.205 +your rights to work written entirely by you; rather, the intent is to
  59.206 +exercise the right to control the distribution of derivative or
  59.207 +collective works based on the Library.
  59.208 +
  59.209 +In addition, mere aggregation of another work not based on the Library
  59.210 +with the Library (or with a work based on the Library) on a volume of
  59.211 +a storage or distribution medium does not bring the other work under
  59.212 +the scope of this License.
  59.213 +
  59.214 +  3. You may opt to apply the terms of the ordinary GNU General Public
  59.215 +License instead of this License to a given copy of the Library.  To do
  59.216 +this, you must alter all the notices that refer to this License, so
  59.217 +that they refer to the ordinary GNU General Public License, version 2,
  59.218 +instead of to this License.  (If a newer version than version 2 of the
  59.219 +ordinary GNU General Public License has appeared, then you can specify
  59.220 +that version instead if you wish.)  Do not make any other change in
  59.221 +these notices.
  59.222 +
  59.223 +  Once this change is made in a given copy, it is irreversible for
  59.224 +that copy, so the ordinary GNU General Public License applies to all
  59.225 +subsequent copies and derivative works made from that copy.
  59.226 +
  59.227 +  This option is useful when you wish to copy part of the code of
  59.228 +the Library into a program that is not a library.
  59.229 +
  59.230 +  4. You may copy and distribute the Library (or a portion or
  59.231 +derivative of it, under Section 2) in object code or executable form
  59.232 +under the terms of Sections 1 and 2 above provided that you accompany
  59.233 +it with the complete corresponding machine-readable source code, which
  59.234 +must be distributed under the terms of Sections 1 and 2 above on a
  59.235 +medium customarily used for software interchange.
  59.236 +
  59.237 +  If distribution of object code is made by offering access to copy
  59.238 +from a designated place, then offering equivalent access to copy the
  59.239 +source code from the same place satisfies the requirement to
  59.240 +distribute the source code, even though third parties are not
  59.241 +compelled to copy the source along with the object code.
  59.242 +
  59.243 +  5. A program that contains no derivative of any portion of the
  59.244 +Library, but is designed to work with the Library by being compiled or
  59.245 +linked with it, is called a "work that uses the Library".  Such a
  59.246 +work, in isolation, is not a derivative work of the Library, and
  59.247 +therefore falls outside the scope of this License.
  59.248 +
  59.249 +  However, linking a "work that uses the Library" with the Library
  59.250 +creates an executable that is a derivative of the Library (because it
  59.251 +contains portions of the Library), rather than a "work that uses the
  59.252 +library".  The executable is therefore covered by this License.
  59.253 +Section 6 states terms for distribution of such executables.
  59.254 +
  59.255 +  When a "work that uses the Library" uses material from a header file
  59.256 +that is part of the Library, the object code for the work may be a
  59.257 +derivative work of the Library even though the source code is not.
  59.258 +Whether this is true is especially significant if the work can be
  59.259 +linked without the Library, or if the work is itself a library.  The
  59.260 +threshold for this to be true is not precisely defined by law.
  59.261 +
  59.262 +  If such an object file uses only numerical parameters, data
  59.263 +structure layouts and accessors, and small macros and small inline
  59.264 +functions (ten lines or less in length), then the use of the object
  59.265 +file is unrestricted, regardless of whether it is legally a derivative
  59.266 +work.  (Executables containing this object code plus portions of the
  59.267 +Library will still fall under Section 6.)
  59.268 +
  59.269 +  Otherwise, if the work is a derivative of the Library, you may
  59.270 +distribute the object code for the work under the terms of Section 6.
  59.271 +Any executables containing that work also fall under Section 6,
  59.272 +whether or not they are linked directly with the Library itself.
  59.273 +
  59.274 +  6. As an exception to the Sections above, you may also combine or
  59.275 +link a "work that uses the Library" with the Library to produce a
  59.276 +work containing portions of the Library, and distribute that work
  59.277 +under terms of your choice, provided that the terms permit
  59.278 +modification of the work for the customer's own use and reverse
  59.279 +engineering for debugging such modifications.
  59.280 +
  59.281 +  You must give prominent notice with each copy of the work that the
  59.282 +Library is used in it and that the Library and its use are covered by
  59.283 +this License.  You must supply a copy of this License.  If the work
  59.284 +during execution displays copyright notices, you must include the
  59.285 +copyright notice for the Library among them, as well as a reference
  59.286 +directing the user to the copy of this License.  Also, you must do one
  59.287 +of these things:
  59.288 +
  59.289 +    a) Accompany the work with the complete corresponding
  59.290 +    machine-readable source code for the Library including whatever
  59.291 +    changes were used in the work (which must be distributed under
  59.292 +    Sections 1 and 2 above); and, if the work is an executable linked
  59.293 +    with the Library, with the complete machine-readable "work that
  59.294 +    uses the Library", as object code and/or source code, so that the
  59.295 +    user can modify the Library and then relink to produce a modified
  59.296 +    executable containing the modified Library.  (It is understood
  59.297 +    that the user who changes the contents of definitions files in the
  59.298 +    Library will not necessarily be able to recompile the application
  59.299 +    to use the modified definitions.)
  59.300 +
  59.301 +    b) Use a suitable shared library mechanism for linking with the
  59.302 +    Library.  A suitable mechanism is one that (1) uses at run time a
  59.303 +    copy of the library already present on the user's computer system,
  59.304 +    rather than copying library functions into the executable, and (2)
  59.305 +    will operate properly with a modified version of the library, if
  59.306 +    the user installs one, as long as the modified version is
  59.307 +    interface-compatible with the version that the work was made with.
  59.308 +
  59.309 +    c) Accompany the work with a written offer, valid for at
  59.310 +    least three years, to give the same user the materials
  59.311 +    specified in Subsection 6a, above, for a charge no more
  59.312 +    than the cost of performing this distribution.
  59.313 +
  59.314 +    d) If distribution of the work is made by offering access to copy
  59.315 +    from a designated place, offer equivalent access to copy the above
  59.316 +    specified materials from the same place.
  59.317 +
  59.318 +    e) Verify that the user has already received a copy of these
  59.319 +    materials or that you have already sent this user a copy.
  59.320 +
  59.321 +  For an executable, the required form of the "work that uses the
  59.322 +Library" must include any data and utility programs needed for
  59.323 +reproducing the executable from it.  However, as a special exception,
  59.324 +the materials to be distributed need not include anything that is
  59.325 +normally distributed (in either source or binary form) with the major
  59.326 +components (compiler, kernel, and so on) of the operating system on
  59.327 +which the executable runs, unless that component itself accompanies
  59.328 +the executable.
  59.329 +
  59.330 +  It may happen that this requirement contradicts the license
  59.331 +restrictions of other proprietary libraries that do not normally
  59.332 +accompany the operating system.  Such a contradiction means you cannot
  59.333 +use both them and the Library together in an executable that you
  59.334 +distribute.
  59.335 +
  59.336 +  7. You may place library facilities that are a work based on the
  59.337 +Library side-by-side in a single library together with other library
  59.338 +facilities not covered by this License, and distribute such a combined
  59.339 +library, provided that the separate distribution of the work based on
  59.340 +the Library and of the other library facilities is otherwise
  59.341 +permitted, and provided that you do these two things:
  59.342 +
  59.343 +    a) Accompany the combined library with a copy of the same work
  59.344 +    based on the Library, uncombined with any other library
  59.345 +    facilities.  This must be distributed under the terms of the
  59.346 +    Sections above.
  59.347 +
  59.348 +    b) Give prominent notice with the combined library of the fact
  59.349 +    that part of it is a work based on the Library, and explaining
  59.350 +    where to find the accompanying uncombined form of the same work.
  59.351 +
  59.352 +  8. You may not copy, modify, sublicense, link with, or distribute
  59.353 +the Library except as expressly provided under this License.  Any
  59.354 +attempt otherwise to copy, modify, sublicense, link with, or
  59.355 +distribute the Library is void, and will automatically terminate your
  59.356 +rights under this License.  However, parties who have received copies,
  59.357 +or rights, from you under this License will not have their licenses
  59.358 +terminated so long as such parties remain in full compliance.
  59.359 +
  59.360 +  9. You are not required to accept this License, since you have not
  59.361 +signed it.  However, nothing else grants you permission to modify or
  59.362 +distribute the Library or its derivative works.  These actions are
  59.363 +prohibited by law if you do not accept this License.  Therefore, by
  59.364 +modifying or distributing the Library (or any work based on the
  59.365 +Library), you indicate your acceptance of this License to do so, and
  59.366 +all its terms and conditions for copying, distributing or modifying
  59.367 +the Library or works based on it.
  59.368 +
  59.369 +  10. Each time you redistribute the Library (or any work based on the
  59.370 +Library), the recipient automatically receives a license from the
  59.371 +original licensor to copy, distribute, link with or modify the Library
  59.372 +subject to these terms and conditions.  You may not impose any further
  59.373 +restrictions on the recipients' exercise of the rights granted herein.
  59.374 +You are not responsible for enforcing compliance by third parties with
  59.375 +this License.
  59.376 +
  59.377 +  11. If, as a consequence of a court judgment or allegation of patent
  59.378 +infringement or for any other reason (not limited to patent issues),
  59.379 +conditions are imposed on you (whether by court order, agreement or
  59.380 +otherwise) that contradict the conditions of this License, they do not
  59.381 +excuse you from the conditions of this License.  If you cannot
  59.382 +distribute so as to satisfy simultaneously your obligations under this
  59.383 +License and any other pertinent obligations, then as a consequence you
  59.384 +may not distribute the Library at all.  For example, if a patent
  59.385 +license would not permit royalty-free redistribution of the Library by
  59.386 +all those who receive copies directly or indirectly through you, then
  59.387 +the only way you could satisfy both it and this License would be to
  59.388 +refrain entirely from distribution of the Library.
  59.389 +
  59.390 +If any portion of this section is held invalid or unenforceable under any
  59.391 +particular circumstance, the balance of the section is intended to apply,
  59.392 +and the section as a whole is intended to apply in other circumstances.
  59.393 +
  59.394 +It is not the purpose of this section to induce you to infringe any
  59.395 +patents or other property right claims or to contest validity of any
  59.396 +such claims; this section has the sole purpose of protecting the
  59.397 +integrity of the free software distribution system which is
  59.398 +implemented by public license practices.  Many people have made
  59.399 +generous contributions to the wide range of software distributed
  59.400 +through that system in reliance on consistent application of that
  59.401 +system; it is up to the author/donor to decide if he or she is willing
  59.402 +to distribute software through any other system and a licensee cannot
  59.403 +impose that choice.
  59.404 +
  59.405 +This section is intended to make thoroughly clear what is believed to
  59.406 +be a consequence of the rest of this License.
  59.407 +
  59.408 +  12. If the distribution and/or use of the Library is restricted in
  59.409 +certain countries either by patents or by copyrighted interfaces, the
  59.410 +original copyright holder who places the Library under this License may add
  59.411 +an explicit geographical distribution limitation excluding those countries,
  59.412 +so that distribution is permitted only in or among countries not thus
  59.413 +excluded.  In such case, this License incorporates the limitation as if
  59.414 +written in the body of this License.
  59.415 +
  59.416 +  13. The Free Software Foundation may publish revised and/or new
  59.417 +versions of the Lesser General Public License from time to time.
  59.418 +Such new versions will be similar in spirit to the present version,
  59.419 +but may differ in detail to address new problems or concerns.
  59.420 +
  59.421 +Each version is given a distinguishing version number.  If the Library
  59.422 +specifies a version number of this License which applies to it and
  59.423 +"any later version", you have the option of following the terms and
  59.424 +conditions either of that version or of any later version published by
  59.425 +the Free Software Foundation.  If the Library does not specify a
  59.426 +license version number, you may choose any version ever published by
  59.427 +the Free Software Foundation.
  59.428 +
  59.429 +  14. If you wish to incorporate parts of the Library into other free
  59.430 +programs whose distribution conditions are incompatible with these,
  59.431 +write to the author to ask for permission.  For software which is
  59.432 +copyrighted by the Free Software Foundation, write to the Free
  59.433 +Software Foundation; we sometimes make exceptions for this.  Our
  59.434 +decision will be guided by the two goals of preserving the free status
  59.435 +of all derivatives of our free software and of promoting the sharing
  59.436 +and reuse of software generally.
  59.437 +
  59.438 +			    NO WARRANTY
  59.439 +
  59.440 +  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
  59.441 +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
  59.442 +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
  59.443 +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
  59.444 +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
  59.445 +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  59.446 +PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
  59.447 +LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
  59.448 +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
  59.449 +
  59.450 +  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  59.451 +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
  59.452 +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
  59.453 +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
  59.454 +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
  59.455 +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
  59.456 +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
  59.457 +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
  59.458 +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
  59.459 +DAMAGES.
  59.460 +
  59.461 +		     END OF TERMS AND CONDITIONS
  59.462 +
  59.463 +           How to Apply These Terms to Your New Libraries
  59.464 +
  59.465 +  If you develop a new library, and you want it to be of the greatest
  59.466 +possible use to the public, we recommend making it free software that
  59.467 +everyone can redistribute and change.  You can do so by permitting
  59.468 +redistribution under these terms (or, alternatively, under the terms of the
  59.469 +ordinary General Public License).
  59.470 +
  59.471 +  To apply these terms, attach the following notices to the library.  It is
  59.472 +safest to attach them to the start of each source file to most effectively
  59.473 +convey the exclusion of warranty; and each file should have at least the
  59.474 +"copyright" line and a pointer to where the full notice is found.
  59.475 +
  59.476 +    <one line to give the library's name and a brief idea of what it does.>
  59.477 +    Copyright (C) <year>  <name of author>
  59.478 +
  59.479 +    This library is free software; you can redistribute it and/or
  59.480 +    modify it under the terms of the GNU Lesser General Public
  59.481 +    License as published by the Free Software Foundation; either
  59.482 +    version 2.1 of the License, or (at your option) any later version.
  59.483 +
  59.484 +    This library is distributed in the hope that it will be useful,
  59.485 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
  59.486 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  59.487 +    Lesser General Public License for more details.
  59.488 +
  59.489 +    You should have received a copy of the GNU Lesser General Public
  59.490 +    License along with this library; if not, write to the Free Software
  59.491 +    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  59.492 +
  59.493 +Also add information on how to contact you by electronic and paper mail.
  59.494 +
  59.495 +You should also get your employer (if you work as a programmer) or your
  59.496 +school, if any, to sign a "copyright disclaimer" for the library, if
  59.497 +necessary.  Here is a sample; alter the names:
  59.498 +
  59.499 +  Yoyodyne, Inc., hereby disclaims all copyright interest in the
  59.500 +  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
  59.501 +
  59.502 +  <signature of Ty Coon>, 1 April 1990
  59.503 +  Ty Coon, President of Vice
  59.504 +
  59.505 +That's all there is to it!
  59.506 +
  59.507 +
    60.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    60.2 +++ b/patches/binutils/2.11.2/gcc-pr3106.patch	Sat Feb 24 11:00:05 2007 +0000
    60.3 @@ -0,0 +1,28 @@
    60.4 +See http://gcc.gnu.org/PR3106
    60.5 +Backported from gcc-3.0.x
    60.6 +
    60.7 +Fixes error
    60.8 +  .../binutils-2.11.2/libiberty/strerror.c:468: error: conflicting types for `sys_nerr'
    60.9 +  /usr/include/stdio.h:258: error: previous declaration of `sys_nerr'
   60.10 +  make[1]: *** [strerror.o] Error 1
   60.11 +  make: *** [all-libiberty] Error 2
   60.12 +on Mac OS X.
   60.13 +
   60.14 +--- binutils-2.11.2/libiberty/strerror.c.old	2004-03-24 16:23:19.000000000 -0800
   60.15 ++++ binutils-2.11.2/libiberty/strerror.c	2004-03-24 16:23:48.000000000 -0800
   60.16 +@@ -13,6 +13,7 @@
   60.17 +    incompatible with our later declaration, perhaps by using const
   60.18 +    attributes.  So we hide the declaration in errno.h (if any) using a
   60.19 +    macro. */
   60.20 ++#define sys_nerr sys_nerr__
   60.21 + #define sys_errlist sys_errlist__
   60.22 + #endif
   60.23 + 
   60.24 +@@ -20,6 +21,7 @@
   60.25 + #include <errno.h>
   60.26 + 
   60.27 + #ifdef HAVE_SYS_ERRLIST
   60.28 ++#undef sys_nerr
   60.29 + #undef sys_errlist
   60.30 + #endif
   60.31 + 
    61.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    61.2 +++ b/patches/binutils/2.13.90.0.2/README	Sat Feb 24 11:00:05 2007 +0000
    61.3 @@ -0,0 +1,6 @@
    61.4 +The files rh62*.patch are from the Red Hat 6.2 file
    61.5 +binutils-2.13.90.0.2-2.src.rpm
    61.6 +
    61.7 +I am trusting here that Red Hat's patches are appropriate for all CPU
    61.8 +types.  If I'm wrong, just remove the offending patch...
    61.9 +- Dan Kegel
    62.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    62.2 +++ b/patches/binutils/2.13.90.0.2/rh62-binutils-2.11.93.0.2-sparc-nonpic.patch	Sat Feb 24 11:00:05 2007 +0000
    62.3 @@ -0,0 +1,96 @@
    62.4 +2002-04-20  Jakub Jelinek  <jakub@redhat.com>
    62.5 +
    62.6 +	* elf32-sparc.c (elf32_sparc_relocate_section): Find real output
    62.7 +	section with SEC_MERGE.
    62.8 +	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
    62.9 +
   62.10 +--- binutils/bfd/elf32-sparc.c.jj	Sat Apr 20 22:11:57 2002
   62.11 ++++ binutils/bfd/elf32-sparc.c	Sat Apr 20 23:06:33 2002
   62.12 +@@ -1144,7 +1144,7 @@ elf32_sparc_relocate_section (output_bfd
   62.13 +       struct elf_link_hash_entry *h;
   62.14 +       Elf_Internal_Sym *sym;
   62.15 +       asection *sec;
   62.16 +-      bfd_vma relocation, off;
   62.17 ++      bfd_vma relocation, off, orig_addend = 0;
   62.18 +       bfd_reloc_status_type r;
   62.19 +       boolean is_plt = false;
   62.20 +       boolean unresolved_reloc;
   62.21 +@@ -1192,6 +1192,7 @@ elf32_sparc_relocate_section (output_bfd
   62.22 + 	{
   62.23 + 	  sym = local_syms + r_symndx;
   62.24 + 	  sec = local_sections[r_symndx];
   62.25 ++	  orig_addend = rel->r_addend;
   62.26 + 	  relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
   62.27 + 	}
   62.28 +       else
   62.29 +@@ -1527,6 +1528,25 @@ elf32_sparc_relocate_section (output_bfd
   62.30 + 			  asection *osec;
   62.31 + 
   62.32 + 			  osec = sec->output_section;
   62.33 ++			  /* FIXME: As soon as making sections zero size
   62.34 ++			     is possible, this if can go away.  */
   62.35 ++			  if (bfd_is_abs_section (osec)
   62.36 ++			      && h == NULL
   62.37 ++			      && (sec->flags & SEC_MERGE)
   62.38 ++			      && ELF_ST_TYPE (sym->st_info) == STT_SECTION
   62.39 ++			      && (elf_section_data (sec)->sec_info_type
   62.40 ++				  == ELF_INFO_TYPE_MERGE))
   62.41 ++			    {
   62.42 ++			      asection *msec;
   62.43 ++
   62.44 ++			      msec = sec;
   62.45 ++			      _bfd_merged_section_offset (output_bfd, &msec,
   62.46 ++					elf_section_data (sec)->sec_info,
   62.47 ++					sym->st_value + orig_addend,
   62.48 ++					(bfd_vma) 0);
   62.49 ++			      osec = msec->output_section;
   62.50 ++			     }
   62.51 ++
   62.52 + 			  indx = elf_section_data (osec)->dynindx;
   62.53 + 
   62.54 + 			  /* FIXME: we really should be able to link non-pic
   62.55 +--- binutils/bfd/elf64-sparc.c.jj	Sat Apr 20 22:11:57 2002
   62.56 ++++ binutils/bfd/elf64-sparc.c	Sat Apr 20 23:12:18 2002
   62.57 +@@ -1939,7 +1939,7 @@ sparc64_elf_relocate_section (output_bfd
   62.58 +       struct elf_link_hash_entry *h;
   62.59 +       Elf_Internal_Sym *sym;
   62.60 +       asection *sec;
   62.61 +-      bfd_vma relocation, off;
   62.62 ++      bfd_vma relocation, off, orig_addend = 0;
   62.63 +       bfd_reloc_status_type r;
   62.64 +       boolean is_plt = false;
   62.65 +       boolean unresolved_reloc;
   62.66 +@@ -1982,6 +1982,7 @@ sparc64_elf_relocate_section (output_bfd
   62.67 + 	{
   62.68 + 	  sym = local_syms + r_symndx;
   62.69 + 	  sec = local_sections[r_symndx];
   62.70 ++	  orig_addend = rel->r_addend;
   62.71 + 	  relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
   62.72 + 	}
   62.73 +       else
   62.74 +@@ -2211,6 +2212,25 @@ sparc64_elf_relocate_section (output_bfd
   62.75 + 			    asection *osec;
   62.76 + 
   62.77 + 			    osec = sec->output_section;
   62.78 ++			    /* FIXME: As soon as making sections zero size
   62.79 ++			       is possible, this if can go away.  */
   62.80 ++			    if (bfd_is_abs_section (osec)
   62.81 ++				&& h == NULL
   62.82 ++				&& (sec->flags & SEC_MERGE)
   62.83 ++				&& ELF_ST_TYPE (sym->st_info) == STT_SECTION
   62.84 ++				&& (elf_section_data (sec)->sec_info_type
   62.85 ++				    == ELF_INFO_TYPE_MERGE))
   62.86 ++			      {
   62.87 ++				asection *msec;
   62.88 ++
   62.89 ++				msec = sec;
   62.90 ++				_bfd_merged_section_offset (output_bfd, &msec,
   62.91 ++					elf_section_data (sec)->sec_info,
   62.92 ++					sym->st_value + orig_addend,
   62.93 ++					(bfd_vma) 0);
   62.94 ++				osec = msec->output_section;
   62.95 ++			      }
   62.96 ++
   62.97 + 			    indx = elf_section_data (osec)->dynindx;
   62.98 + 
   62.99 + 			    /* FIXME: we really should be able to link non-pic
    63.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    63.2 +++ b/patches/binutils/2.13.90.0.2/rh62-binutils-2.13.90.0.2-glibc21.patch	Sat Feb 24 11:00:05 2007 +0000
    63.3 @@ -0,0 +1,58 @@
    63.4 +--- binutils/ld/emulparams/elf_i386_glibc21.sh.jj	Sat Aug  3 17:04:41 2002
    63.5 ++++ binutils/ld/emulparams/elf_i386_glibc21.sh	Sat Aug  3 17:04:41 2002
    63.6 +@@ -0,0 +1,11 @@
    63.7 ++SCRIPT_NAME=elf
    63.8 ++OUTPUT_FORMAT="elf32-i386"
    63.9 ++TEXT_START_ADDR=0x08048000
   63.10 ++MAXPAGESIZE=0x1000
   63.11 ++NONPAGED_TEXT_START_ADDR=0x08048000
   63.12 ++ARCH=i386
   63.13 ++MACHINE=
   63.14 ++NOP=0x9090
   63.15 ++TEMPLATE_NAME=elf32
   63.16 ++GENERATE_SHLIB_SCRIPT=yes
   63.17 ++LIB_PATH=/usr/i386-glibc21-linux/lib:/usr/local/lib
   63.18 +--- binutils/ld/configure.tgt.jj	Thu Aug  1 20:49:32 2002
   63.19 ++++ binutils/ld/configure.tgt	Sat Aug  3 17:06:18 2002
   63.20 +@@ -143,7 +143,8 @@ i[3456]86-*-linux*aout*)	targ_emul=i386l
   63.21 + 			;;
   63.22 + i[3456]86-*-linux*oldld)	targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
   63.23 + i[3456]86-*-linux-gnu*)	targ_emul=elf_i386
   63.24 +-			targ_extra_emuls=i386linux
   63.25 ++			targ_extra_emuls="i386linux elf_i386_glibc21"
   63.26 ++			targ_extra_libpath=elf_i386_glibc21
   63.27 + 			if test x${want64} = xtrue; then
   63.28 + 			  targ_extra_emuls="$targ_extra_emuls elf_x86_64"
   63.29 + 			fi
   63.30 +--- binutils/ld/Makefile.am.jj	Thu Aug  1 20:49:32 2002
   63.31 ++++ binutils/ld/Makefile.am	Sat Aug  3 17:04:41 2002
   63.32 +@@ -181,6 +181,7 @@ ALL_EMULATIONS = \
   63.33 + 	eelf_i386.o \
   63.34 + 	eelf_i386_be.o \
   63.35 + 	eelf_i386_chaos.o \
   63.36 ++	eelf_i386_glibc21.o \
   63.37 + 	eelf_i386_fbsd.o \
   63.38 + 	eelf_i386_ldso.o \
   63.39 + 	eelf_s390.o \
   63.40 +@@ -718,6 +719,9 @@ eelf_i386_be.c: $(srcdir)/emulparams/elf
   63.41 + eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
   63.42 +   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
   63.43 + 	${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
   63.44 ++eelf_i386_glibc21.c: $(srcdir)/emulparams/elf_i386_glibc21.sh \
   63.45 ++  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
   63.46 ++	${GENSCRIPTS} elf_i386_glibc21 "$(tdir_elf_i386_glibc21)"
   63.47 + eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
   63.48 +   $(srcdir)/emulparams/elf_i386.sh \
   63.49 +   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
   63.50 +--- binutils/ld/Makefile.in.jj	Thu Aug  1 20:49:32 2002
   63.51 ++++ binutils/ld/Makefile.in	Sat Aug  3 17:07:34 2002
   63.52 +@@ -1197,6 +1197,9 @@ eelf_i386_be.c: $(srcdir)/emulparams/elf
   63.53 + eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
   63.54 +   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
   63.55 + 	${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
   63.56 ++eelf_i386_glibc21.c: $(srcdir)/emulparams/elf_i386_glibc21.sh \
   63.57 ++  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
   63.58 ++	${GENSCRIPTS} elf_i386_glibc21 "$(tdir_elf_i386_glibc21)"
   63.59 + eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
   63.60 +   $(srcdir)/emulparams/elf_i386.sh \
   63.61 +   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    64.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    64.2 +++ b/patches/binutils/2.13.90.0.2/rh62-binutils-2.13.90.0.2-gotpc.patch	Sat Feb 24 11:00:05 2007 +0000
    64.3 @@ -0,0 +1,372 @@
    64.4 +2002-08-03  Jakub Jelinek  <jakub@redhat.com>
    64.5 +
    64.6 +	* config/tc-i386.c (output_insn): Save frag_now and frag_now_fix ()
    64.7 +	at start of insn, pass it to output_disp and output_imm.
    64.8 +	(output_disp): Added arguments.  If _GLOBAL_OFFSET_TABLE_ is seen
    64.9 +	in displacement for R_386_32 reloc, use R_386_GOTPC and compute
   64.10 +	properly addend.
   64.11 +	(output_imm): Added arguments.  Compute properly addend for
   64.12 +	R_386_GOTPC.
   64.13 +	(md_apply_fix3): Remove R_386_GOTPC handling.
   64.14 +	* testsuite/gas/i386/gotpc.s: New.
   64.15 +	* testsuite/gas/i386/gotpc.d: New.
   64.16 +	* testsuite/gas/i386/i386.exp: Add gotpc test.
   64.17 +
   64.18 +--- binutils/gas/config/tc-i386.c.jj	2002-07-18 11:35:39.000000000 +0200
   64.19 ++++ binutils/gas/config/tc-i386.c	2002-08-02 21:13:18.000000000 +0200
   64.20 +@@ -104,8 +104,10 @@ static void output_insn PARAMS ((void));
   64.21 + static void output_branch PARAMS ((void));
   64.22 + static void output_jump PARAMS ((void));
   64.23 + static void output_interseg_jump PARAMS ((void));
   64.24 +-static void output_imm PARAMS ((void));
   64.25 +-static void output_disp PARAMS ((void));
   64.26 ++static void output_imm PARAMS ((fragS *insn_start_frag,
   64.27 ++				offsetT insn_start_off));
   64.28 ++static void output_disp PARAMS ((fragS *insn_start_frag,
   64.29 ++				 offsetT insn_start_off));
   64.30 + #ifndef I386COFF
   64.31 + static void s_bss PARAMS ((int));
   64.32 + #endif
   64.33 +@@ -3101,14 +3103,21 @@ output_interseg_jump ()
   64.34 +   md_number_to_chars (p + size, (valueT) i.op[0].imms->X_add_number, 2);
   64.35 + }
   64.36 + 
   64.37 ++
   64.38 + static void
   64.39 + output_insn ()
   64.40 + {
   64.41 ++  fragS *insn_start_frag;
   64.42 ++  offsetT insn_start_off;
   64.43 ++
   64.44 +   /* Tie dwarf2 debug info to the address at the start of the insn.
   64.45 +      We can't do this after the insn has been output as the current
   64.46 +      frag may have been closed off.  eg. by frag_var.  */
   64.47 +   dwarf2_emit_insn (0);
   64.48 + 
   64.49 ++  insn_start_frag = frag_now;
   64.50 ++  insn_start_off = frag_now_fix ();
   64.51 ++
   64.52 +   /* Output jumps.  */
   64.53 +   if (i.tm.opcode_modifier & Jump)
   64.54 +     output_branch ();
   64.55 +@@ -3179,10 +3188,10 @@ output_insn ()
   64.56 + 	}
   64.57 + 
   64.58 +       if (i.disp_operands)
   64.59 +-	output_disp ();
   64.60 ++	output_disp (insn_start_frag, insn_start_off);
   64.61 + 
   64.62 +       if (i.imm_operands)
   64.63 +-	output_imm ();
   64.64 ++	output_imm (insn_start_frag, insn_start_off);
   64.65 +     }
   64.66 + 
   64.67 + #ifdef DEBUG386
   64.68 +@@ -3194,7 +3203,9 @@ output_insn ()
   64.69 + }
   64.70 + 
   64.71 + static void
   64.72 +-output_disp ()
   64.73 ++output_disp (insn_start_frag, insn_start_off)
   64.74 ++    fragS *insn_start_frag;
   64.75 ++    offsetT insn_start_off;
   64.76 + {
   64.77 +   char *p;
   64.78 +   unsigned int n;
   64.79 +@@ -3224,6 +3235,7 @@ output_disp ()
   64.80 + 	    }
   64.81 + 	  else
   64.82 + 	    {
   64.83 ++	      RELOC_ENUM reloc_type;
   64.84 + 	      int size = 4;
   64.85 + 	      int sign = 0;
   64.86 + 	      int pcrel = (i.flags[n] & Operand_PCrel) != 0;
   64.87 +@@ -3266,16 +3278,50 @@ output_disp ()
   64.88 + 		}
   64.89 + 
   64.90 + 	      p = frag_more (size);
   64.91 ++	      reloc_type = reloc (size, pcrel, sign, i.reloc[n]);
   64.92 ++#ifdef BFD_ASSEMBLER
   64.93 ++	      if (reloc_type == BFD_RELOC_32
   64.94 ++		  && GOT_symbol
   64.95 ++		  && GOT_symbol == i.op[n].disps->X_add_symbol
   64.96 ++		  && (i.op[n].disps->X_op == O_symbol
   64.97 ++		      || (i.op[n].disps->X_op == O_add
   64.98 ++			  && ((symbol_get_value_expression
   64.99 ++			       (i.op[n].disps->X_op_symbol)->X_op)
  64.100 ++			      == O_subtract))))
  64.101 ++		{
  64.102 ++		  offsetT add;
  64.103 ++
  64.104 ++		  if (insn_start_frag == frag_now)
  64.105 ++		    add = (p - frag_now->fr_literal) - insn_start_off;
  64.106 ++		  else
  64.107 ++		    {
  64.108 ++		      fragS *fr;
  64.109 ++
  64.110 ++		      add = insn_start_frag->fr_fix - insn_start_off;
  64.111 ++		      for (fr = insn_start_frag->fr_next;
  64.112 ++			   fr && fr != frag_now; fr = fr->fr_next)
  64.113 ++			add += fr->fr_fix;
  64.114 ++		      add += p - frag_now->fr_literal;
  64.115 ++		    }
  64.116 ++
  64.117 ++		  /* We don't support dynamic linking on x86-64 yet.  */
  64.118 ++		  if (flag_code == CODE_64BIT)
  64.119 ++		    abort ();
  64.120 ++		  reloc_type = BFD_RELOC_386_GOTPC;
  64.121 ++		  i.op[n].disps->X_add_number += add;
  64.122 ++		}
  64.123 ++#endif
  64.124 + 	      fix_new_exp (frag_now, p - frag_now->fr_literal, size,
  64.125 +-			   i.op[n].disps, pcrel,
  64.126 +-			   reloc (size, pcrel, sign, i.reloc[n]));
  64.127 ++			   i.op[n].disps, pcrel, reloc_type);
  64.128 + 	    }
  64.129 + 	}
  64.130 +     }
  64.131 + }
  64.132 + 
  64.133 + static void
  64.134 +-output_imm ()
  64.135 ++output_imm (insn_start_frag, insn_start_off)
  64.136 ++    fragS *insn_start_frag;
  64.137 ++    offsetT insn_start_off;
  64.138 + {
  64.139 +   char *p;
  64.140 +   unsigned int n;
  64.141 +@@ -3328,6 +3374,48 @@ output_imm ()
  64.142 + 	      p = frag_more (size);
  64.143 + 	      reloc_type = reloc (size, 0, sign, i.reloc[n]);
  64.144 + #ifdef BFD_ASSEMBLER
  64.145 ++	      /*   This is tough to explain.  We end up with this one if we
  64.146 ++	       * have operands that look like
  64.147 ++	       * "_GLOBAL_OFFSET_TABLE_+[.-.L284]".  The goal here is to
  64.148 ++	       * obtain the absolute address of the GOT, and it is strongly
  64.149 ++	       * preferable from a performance point of view to avoid using
  64.150 ++	       * a runtime relocation for this.  The actual sequence of
  64.151 ++	       * instructions often look something like:
  64.152 ++	       *
  64.153 ++	       *	call	.L66
  64.154 ++	       * .L66:
  64.155 ++	       *	popl	%ebx
  64.156 ++	       *	addl	$_GLOBAL_OFFSET_TABLE_+[.-.L66],%ebx
  64.157 ++	       *
  64.158 ++	       *   The call and pop essentially return the absolute address
  64.159 ++	       * of the label .L66 and store it in %ebx.  The linker itself
  64.160 ++	       * will ultimately change the first operand of the addl so
  64.161 ++	       * that %ebx points to the GOT, but to keep things simple, the
  64.162 ++	       * .o file must have this operand set so that it generates not
  64.163 ++	       * the absolute address of .L66, but the absolute address of
  64.164 ++	       * itself.  This allows the linker itself simply treat a GOTPC
  64.165 ++	       * relocation as asking for a pcrel offset to the GOT to be
  64.166 ++	       * added in, and the addend of the relocation is stored in the
  64.167 ++	       * operand field for the instruction itself.
  64.168 ++	       *
  64.169 ++	       *   Our job here is to fix the operand so that it would add
  64.170 ++	       * the correct offset so that %ebx would point to itself.  The
  64.171 ++	       * thing that is tricky is that .-.L66 will point to the
  64.172 ++	       * beginning of the instruction, so we need to further modify
  64.173 ++	       * the operand so that it will point to itself.  There are
  64.174 ++	       * other cases where you have something like:
  64.175 ++	       *
  64.176 ++	       *	.long	$_GLOBAL_OFFSET_TABLE_+[.-.L66]
  64.177 ++	       *
  64.178 ++	       * and here no correction would be required.  Internally in
  64.179 ++	       * the assembler we treat operands of this form as not being
  64.180 ++	       * pcrel since the '.' is explicitly mentioned, and I wonder
  64.181 ++	       * whether it would simplify matters to do it this way.  Who
  64.182 ++	       * knows.  In earlier versions of the PIC patches, the
  64.183 ++	       * pcrel_adjust field was used to store the correction, but
  64.184 ++	       * since the expression is not pcrel, I felt it would be
  64.185 ++	       * confusing to do it this way.  */
  64.186 ++
  64.187 + 	      if (reloc_type == BFD_RELOC_32
  64.188 + 		  && GOT_symbol
  64.189 + 		  && GOT_symbol == i.op[n].imms->X_add_symbol
  64.190 +@@ -3337,11 +3425,26 @@ output_imm ()
  64.191 + 			       (i.op[n].imms->X_op_symbol)->X_op)
  64.192 + 			      == O_subtract))))
  64.193 + 		{
  64.194 ++		  offsetT add;
  64.195 ++
  64.196 ++		  if (insn_start_frag == frag_now)
  64.197 ++		    add = (p - frag_now->fr_literal) - insn_start_off;
  64.198 ++		  else
  64.199 ++		    {
  64.200 ++		      fragS *fr;
  64.201 ++
  64.202 ++		      add = insn_start_frag->fr_fix - insn_start_off;
  64.203 ++		      for (fr = insn_start_frag->fr_next;
  64.204 ++			   fr && fr != frag_now; fr = fr->fr_next)
  64.205 ++			add += fr->fr_fix;
  64.206 ++		      add += p - frag_now->fr_literal;
  64.207 ++		    }
  64.208 ++
  64.209 + 		  /* We don't support dynamic linking on x86-64 yet.  */
  64.210 + 		  if (flag_code == CODE_64BIT)
  64.211 + 		    abort ();
  64.212 + 		  reloc_type = BFD_RELOC_386_GOTPC;
  64.213 +-		  i.op[n].imms->X_add_number += 3;
  64.214 ++		  i.op[n].imms->X_add_number += add;
  64.215 + 		}
  64.216 + #endif
  64.217 + 	      fix_new_exp (frag_now, p - frag_now->fr_literal, size,
  64.218 +@@ -4542,48 +4645,6 @@ md_apply_fix3 (fixP, valP, seg)
  64.219 + 	   runtime we merely add the offset to the actual PLT entry.  */
  64.220 + 	value = -4;
  64.221 + 	break;
  64.222 +-      case BFD_RELOC_386_GOTPC:
  64.223 +-
  64.224 +-/*   This is tough to explain.  We end up with this one if we have
  64.225 +- * operands that look like "_GLOBAL_OFFSET_TABLE_+[.-.L284]".  The goal
  64.226 +- * here is to obtain the absolute address of the GOT, and it is strongly
  64.227 +- * preferable from a performance point of view to avoid using a runtime
  64.228 +- * relocation for this.  The actual sequence of instructions often look
  64.229 +- * something like:
  64.230 +- *
  64.231 +- *	call	.L66
  64.232 +- * .L66:
  64.233 +- *	popl	%ebx
  64.234 +- *	addl	$_GLOBAL_OFFSET_TABLE_+[.-.L66],%ebx
  64.235 +- *
  64.236 +- *   The call and pop essentially return the absolute address of
  64.237 +- * the label .L66 and store it in %ebx.  The linker itself will
  64.238 +- * ultimately change the first operand of the addl so that %ebx points to
  64.239 +- * the GOT, but to keep things simple, the .o file must have this operand
  64.240 +- * set so that it generates not the absolute address of .L66, but the
  64.241 +- * absolute address of itself.  This allows the linker itself simply
  64.242 +- * treat a GOTPC relocation as asking for a pcrel offset to the GOT to be
  64.243 +- * added in, and the addend of the relocation is stored in the operand
  64.244 +- * field for the instruction itself.
  64.245 +- *
  64.246 +- *   Our job here is to fix the operand so that it would add the correct
  64.247 +- * offset so that %ebx would point to itself.  The thing that is tricky is
  64.248 +- * that .-.L66 will point to the beginning of the instruction, so we need
  64.249 +- * to further modify the operand so that it will point to itself.
  64.250 +- * There are other cases where you have something like:
  64.251 +- *
  64.252 +- *	.long	$_GLOBAL_OFFSET_TABLE_+[.-.L66]
  64.253 +- *
  64.254 +- * and here no correction would be required.  Internally in the assembler
  64.255 +- * we treat operands of this form as not being pcrel since the '.' is
  64.256 +- * explicitly mentioned, and I wonder whether it would simplify matters
  64.257 +- * to do it this way.  Who knows.  In earlier versions of the PIC patches,
  64.258 +- * the pcrel_adjust field was used to store the correction, but since the
  64.259 +- * expression is not pcrel, I felt it would be confusing to do it this
  64.260 +- * way.  */
  64.261 +-
  64.262 +-	value -= 1;
  64.263 +-	break;
  64.264 +       case BFD_RELOC_386_GOT32:
  64.265 +       case BFD_RELOC_386_TLS_GD:
  64.266 +       case BFD_RELOC_386_TLS_LDM:
  64.267 +--- binutils/gas/testsuite/gas/i386/gotpc.s.jj	2002-08-02 21:17:57.000000000 +0200
  64.268 ++++ binutils/gas/testsuite/gas/i386/gotpc.s	2002-08-03 22:55:47.000000000 +0200
  64.269 +@@ -0,0 +1,40 @@
  64.270 ++	.text
  64.271 ++test:
  64.272 ++	addl $_GLOBAL_OFFSET_TABLE_+[.-test], %eax
  64.273 ++	addl $_GLOBAL_OFFSET_TABLE_+[.-test], %ebx
  64.274 ++	addl $_GLOBAL_OFFSET_TABLE_, %eax
  64.275 ++	addl $_GLOBAL_OFFSET_TABLE_, %ebx
  64.276 ++	leal _GLOBAL_OFFSET_TABLE+[.-test](%eax), %ebx
  64.277 ++	leal _GLOBAL_OFFSET_TABLE+[.-test](%ebx), %eax
  64.278 ++	leal _GLOBAL_OFFSET_TABLE+[.-test](%eax), %eax
  64.279 ++	leal _GLOBAL_OFFSET_TABLE+[.-test](%ebx), %ebx
  64.280 ++	subl $_GLOBAL_OFFSET_TABLE_+[.-test], %eax
  64.281 ++	subl $_GLOBAL_OFFSET_TABLE_+[.-test], %ebx
  64.282 ++	subl $_GLOBAL_OFFSET_TABLE_, %eax
  64.283 ++	subl $_GLOBAL_OFFSET_TABLE_, %ebx
  64.284 ++	orl $_GLOBAL_OFFSET_TABLE_+[.-test], %eax
  64.285 ++	orl $_GLOBAL_OFFSET_TABLE_+[.-test], %ebx
  64.286 ++	orl $_GLOBAL_OFFSET_TABLE_, %eax
  64.287 ++	orl $_GLOBAL_OFFSET_TABLE_, %ebx
  64.288 ++	movl $_GLOBAL_OFFSET_TABLE_+[.-test], %eax
  64.289 ++	movl $_GLOBAL_OFFSET_TABLE_+[.-test], %ebx
  64.290 ++	movl $_GLOBAL_OFFSET_TABLE_, %eax
  64.291 ++	movl $_GLOBAL_OFFSET_TABLE_, %ebx
  64.292 ++	movl $_GLOBAL_OFFSET_TABLE_+[.-test], foo
  64.293 ++	movl $_GLOBAL_OFFSET_TABLE_+[.-test], %gs:foo
  64.294 ++	gs; movl $_GLOBAL_OFFSET_TABLE_+[.-test], foo
  64.295 ++	movl $_GLOBAL_OFFSET_TABLE_+[.-test], _GLOBAL_OFFSET_TABLE_
  64.296 ++	movl _GLOBAL_OFFSET_TABLE_+[.-test], %eax
  64.297 ++	movl _GLOBAL_OFFSET_TABLE_+[.-test], %ebx
  64.298 ++	movl %eax, _GLOBAL_OFFSET_TABLE_+[.-test]
  64.299 ++	movl %ebx, _GLOBAL_OFFSET_TABLE_+[.-test]
  64.300 ++	movl %eax, %gs:_GLOBAL_OFFSET_TABLE_+[.-test]
  64.301 ++	movl %ebx, %gs:_GLOBAL_OFFSET_TABLE_+[.-test]
  64.302 ++	gs; movl %eax, _GLOBAL_OFFSET_TABLE_+[.-test]
  64.303 ++	gs; movl %ebx, _GLOBAL_OFFSET_TABLE_+[.-test]
  64.304 ++	leal _GLOBAL_OFFSET_TABLE_@GOTOFF(%ebx), %eax
  64.305 ++	leal _GLOBAL_OFFSET_TABLE_@GOTOFF(%ebx), %ebx
  64.306 ++	movl _GLOBAL_OFFSET_TABLE_@GOTOFF(%ebx), %eax
  64.307 ++	movl _GLOBAL_OFFSET_TABLE_@GOTOFF(%ebx), %ebx
  64.308 ++	.long _GLOBAL_OFFSET_TABLE_+[.-test]
  64.309 ++	.long _GLOBAL_OFFSET_TABLE_@GOTOFF
  64.310 +--- binutils/gas/testsuite/gas/i386/gotpc.d.jj	2002-08-02 21:18:43.000000000 +0200
  64.311 ++++ binutils/gas/testsuite/gas/i386/gotpc.d	2002-08-03 23:05:43.000000000 +0200
  64.312 +@@ -0,0 +1,52 @@
  64.313 ++#objdump: -drw
  64.314 ++#name: i386 gotpc
  64.315 ++
  64.316 ++.*: +file format .*
  64.317 ++
  64.318 ++Disassembly of section .text:
  64.319 ++
  64.320 ++0+000 <test>:
  64.321 ++   0:	05 01 00 00 00 [ 	]*add    \$0x1,%eax	1: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.322 ++   5:	81 c3 07 00 00 00 [ 	]*add    \$0x7,%ebx	7: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.323 ++   b:	05 01 00 00 00 [ 	]*add    \$0x1,%eax	c: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.324 ++  10:	81 c3 02 00 00 00 [ 	]*add    \$0x2,%ebx	12: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.325 ++  16:	8d 98 16 00 00 00 [ 	]*lea    0x16\(%eax\),%ebx	18: (R_386_)?(dir)?32	_GLOBAL_OFFSET_TABLE
  64.326 ++  1c:	8d 83 1c 00 00 00 [ 	]*lea    0x1c\(%ebx\),%eax	1e: (R_386_)?(dir)?32	_GLOBAL_OFFSET_TABLE
  64.327 ++  22:	8d 80 22 00 00 00 [ 	]*lea    0x22\(%eax\),%eax	24: (R_386_)?(dir)?32	_GLOBAL_OFFSET_TABLE
  64.328 ++  28:	8d 9b 28 00 00 00 [ 	]*lea    0x28\(%ebx\),%ebx	2a: (R_386_)?(dir)?32	_GLOBAL_OFFSET_TABLE
  64.329 ++  2e:	2d 2f 00 00 00 [ 	]*sub    \$0x2f,%eax	2f: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.330 ++  33:	81 eb 35 00 00 00 [ 	]*sub    \$0x35,%ebx	35: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.331 ++  39:	2d 01 00 00 00 [ 	]*sub    \$0x1,%eax	3a: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.332 ++  3e:	81 eb 02 00 00 00 [ 	]*sub    \$0x2,%ebx	40: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.333 ++  44:	0d 45 00 00 00 [ 	]*or     \$0x45,%eax	45: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.334 ++  49:	81 cb 4b 00 00 00 [ 	]*or     \$0x4b,%ebx	4b: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.335 ++  4f:	0d 01 00 00 00 [ 	]*or     \$0x1,%eax	50: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.336 ++  54:	81 cb 02 00 00 00 [ 	]*or     \$0x2,%ebx	56: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.337 ++  5a:	b8 5b 00 00 00 [ 	]*mov    \$0x5b,%eax	5b: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.338 ++  5f:	bb 60 00 00 00 [ 	]*mov    \$0x60,%ebx	60: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.339 ++  64:	b8 01 00 00 00 [ 	]*mov    \$0x1,%eax	65: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.340 ++  69:	bb 01 00 00 00 [ 	]*mov    \$0x1,%ebx	6a: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.341 ++  6e:	c7 05 00 00 00 00 74 00 00 00 [ 	]*movl   \$0x74,0x0	70: (R_386_)?(dir)?32	foo
  64.342 ++[ 	]*74: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.343 ++  78:	65 c7 05 00 00 00 00 7f 00 00 00 [ 	]*movl   \$0x7f,%gs:0x0	7b: (R_386_)?(dir)?32	foo
  64.344 ++[ 	]*7f: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.345 ++  83:	65 c7 05 00 00 00 00 8a 00 00 00 [ 	]*movl   \$0x8a,%gs:0x0	86: (R_386_)?(dir)?32	foo
  64.346 ++[ 	]*8a: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.347 ++  8e:	c7 05 02 00 00 00 94 00 00 00 [ 	]*movl   \$0x94,0x2	90: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.348 ++[ 	]*94: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.349 ++  98:	a1 99 00 00 00 [ 	]*mov    0x99,%eax	99: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.350 ++  9d:	8b 1d 9f 00 00 00 [ 	]*mov    0x9f,%ebx	9f: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.351 ++  a3:	a3 a4 00 00 00 [ 	]*mov    %eax,0xa4	a4: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.352 ++  a8:	89 1d aa 00 00 00 [ 	]*mov    %ebx,0xaa	aa: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.353 ++  ae:	65 a3 b0 00 00 00 [ 	]*mov    %eax,%gs:0xb0	b0: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.354 ++  b4:	65 89 1d b7 00 00 00 [ 	]*mov    %ebx,%gs:0xb7	b7: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.355 ++  bb:	65 a3 bd 00 00 00 [ 	]*mov    %eax,%gs:0xbd	bd: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.356 ++  c1:	65 89 1d c4 00 00 00 [ 	]*mov    %ebx,%gs:0xc4	c4: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.357 ++  c8:	8d 83 00 00 00 00 [ 	]*lea    0x0\(%ebx\),%eax	ca: (R_386_)?GOTOFF	_GLOBAL_OFFSET_TABLE_
  64.358 ++  ce:	8d 9b 00 00 00 00 [ 	]*lea    0x0\(%ebx\),%ebx	d0: (R_386_)?GOTOFF	_GLOBAL_OFFSET_TABLE_
  64.359 ++  d4:	8b 83 00 00 00 00 [ 	]*mov    0x0\(%ebx\),%eax	d6: (R_386_)?GOTOFF	_GLOBAL_OFFSET_TABLE_
  64.360 ++  da:	8b 9b 00 00 00 00 [ 	]*mov    0x0\(%ebx\),%ebx	dc: (R_386_)?GOTOFF	_GLOBAL_OFFSET_TABLE_
  64.361 ++  e0:	e0 00 [ 	]*loopne e2 <test\+0xe2>	e0: (R_386_)?GOTPC	_GLOBAL_OFFSET_TABLE_
  64.362 ++  e2:	00 00 [ 	]*add    %al,\(%eax\)
  64.363 ++  e4:	00 00 [ 	]*add    %al,\(%eax\)	e4: (R_386_)?GOTOFF	_GLOBAL_OFFSET_TABLE_
  64.364 ++	...
  64.365 +--- binutils/gas/testsuite/gas/i386/i386.exp.jj	2002-07-18 11:35:39.000000000 +0200
  64.366 ++++ binutils/gas/testsuite/gas/i386/i386.exp	2002-08-02 21:57:46.000000000 +0200
  64.367 +@@ -53,6 +53,7 @@ if [expr ([istarget "i*86-*-*"] ||  [ist
  64.368 +     run_dump_test "jump"
  64.369 +     run_dump_test "ssemmx2"
  64.370 +     run_dump_test "sse2"
  64.371 ++    run_dump_test "gotpc"
  64.372 + 
  64.373 +     # PIC is only supported on ELF targets.
  64.374 +     if { ([istarget "*-*-elf*"] || [istarget "*-*-linux*"] )
  64.375 +
    65.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    65.2 +++ b/patches/binutils/2.13.90.0.2/rh62-binutils-2.13.90.0.2-tpoff32.patch	Sat Feb 24 11:00:05 2007 +0000
    65.3 @@ -0,0 +1,27 @@
    65.4 +2002-08-07  Jakub Jelinek  <jakub@redhat.com>
    65.5 +
    65.6 +	* elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
    65.7 +	for R_386_TLS_TPOFF32 relocs against symndx 0.
    65.8 +
    65.9 +--- binutils/bfd/elf32-i386.c.jj	2002-07-30 16:14:55.000000000 +0200
   65.10 ++++ binutils/bfd/elf32-i386.c	2002-08-07 23:41:48.000000000 +0200
   65.11 +@@ -2561,13 +2567,17 @@ elf_i386_relocate_section (output_bfd, i
   65.12 + 	      outrel.r_offset = (htab->sgot->output_section->vma
   65.13 + 				 + htab->sgot->output_offset + off);
   65.14 + 
   65.15 +-	      bfd_put_32 (output_bfd, 0,
   65.16 +-			  htab->sgot->contents + off);
   65.17 + 	      indx = h && h->dynindx != -1 ? h->dynindx : 0;
   65.18 + 	      if (r_type == R_386_TLS_GD)
   65.19 + 		dr_type = R_386_TLS_DTPMOD32;
   65.20 + 	      else
   65.21 + 		dr_type = R_386_TLS_TPOFF32;
   65.22 ++	      if (dr_type == R_386_TLS_TPOFF32 && indx == 0)
   65.23 ++		bfd_put_32 (output_bfd, relocation - dtpoff_base (info),
   65.24 ++			    htab->sgot->contents + off);
   65.25 ++	      else
   65.26 ++		bfd_put_32 (output_bfd, 0,
   65.27 ++			    htab->sgot->contents + off);
   65.28 + 	      outrel.r_info = ELF32_R_INFO (indx, dr_type);
   65.29 + 	      loc = (Elf32_External_Rel *) htab->srelgot->contents;
   65.30 + 	      loc += htab->srelgot->reloc_count++;
    66.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    66.2 +++ b/patches/binutils/2.14.90.0.5/binutils-cross-demangler.patch	Sat Feb 24 11:00:05 2007 +0000
    66.3 @@ -0,0 +1,11 @@
    66.4 +--- orig/Makefile.in	2004-05-12 18:22:30.000000000 -0700
    66.5 ++++ binutils-2.14.90.0.5/Makefile.in	2004-05-12 18:26:19.000000000 -0700
    66.6 +@@ -24384,6 +24384,8 @@
    66.7 + # Demangler depends on libiberty.
    66.8 + configure-demangler: maybe-configure-libiberty
    66.9 + all-demangler: maybe-all-libiberty
   66.10 ++configure-build-demangler: maybe-configure-build-libiberty
   66.11 ++all-build-demangler: maybe-all-build-libiberty
   66.12 + 
   66.13 + # The new demangler, which is included in libiberty, is written in C++.
   66.14 + # A working C++ compiler is required. For the target demangler, it may
    67.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    67.2 +++ b/patches/binutils/2.14.90.0.5/binutils-sh-relocs.patch	Sat Feb 24 11:00:05 2007 +0000
    67.3 @@ -0,0 +1,38 @@
    67.4 +Message-Id: <200307311239.h6VCdNe27056@r-rr.iij4u.or.jp>
    67.5 +To: dank@kegel.com
    67.6 +Cc: kkojima@rr.iij4u.or.jp
    67.7 +Subject: Re: Writing PIC version of __udivsi3_i4? (was: Re: "make tests" fails
    67.8 + with "libc.so: text relocations used" in glibc-2.3.2 for sh4)
    67.9 +In-Reply-To: Your message of "Wed, 30 Jul 2003 21:55:54 -0700"
   67.10 +	<3F28A15A.5010400@kegel.com>
   67.11 +References: <3F28A15A.5010400@kegel.com>
   67.12 +Date: Thu, 31 Jul 2003 21:47:38 +0900
   67.13 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
   67.14 +
   67.15 +Dan Kegel <dank@kegel.com> wrote:
   67.16 +>> I'll give binutils-2.14.90.0.5 a shot, then. 
   67.17 +> 
   67.18 +> No joy - same problem.  Guess I'll take this up on binutils and/or libc-alpha.
   67.19 +
   67.20 +Please try the patch below, though it's a diff against the current
   67.21 +binutils CVS.
   67.22 +
   67.23 +Regards,
   67.24 +	kaz
   67.25 +--
   67.26 +diff -u3p ORIG/src/bfd/elf32-sh.c LOCAL/src/bfd/elf32-sh.c
   67.27 +--- src/bfd/elf32-sh.c.old	Fri Jul 25 14:46:58 2003
   67.28 ++++ src/bfd/elf32-sh.c	Thu Jul 31 21:09:38 2003
   67.29 +@@ -6497,8 +6497,10 @@ sh_elf_check_relocs (bfd *abfd, struct b
   67.30 + 							  sreloc, 2))
   67.31 + 			return FALSE;
   67.32 + 		    }
   67.33 ++#if 0
   67.34 + 		  if (sec->flags & SEC_READONLY)
   67.35 + 		    info->flags |= DF_TEXTREL;
   67.36 ++#endif
   67.37 + 		  elf_section_data (sec)->sreloc = sreloc;
   67.38 + 		}
   67.39 + 
   67.40 +
   67.41 +
    68.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    68.2 +++ b/patches/binutils/2.14.90.0.7/binutils-cross-demangler.patch	Sat Feb 24 11:00:05 2007 +0000
    68.3 @@ -0,0 +1,11 @@
    68.4 +--- orig/Makefile.in	2004-05-12 18:22:30.000000000 -0700
    68.5 ++++ binutils-2.14.90.0.5/Makefile.in	2004-05-12 18:26:19.000000000 -0700
    68.6 +@@ -24384,6 +24384,8 @@
    68.7 + # Demangler depends on libiberty.
    68.8 + configure-demangler: maybe-configure-libiberty
    68.9 + all-demangler: maybe-all-libiberty
   68.10 ++configure-build-demangler: maybe-configure-build-libiberty
   68.11 ++all-build-demangler: maybe-all-build-libiberty
   68.12 + 
   68.13 + # The new demangler, which is included in libiberty, is written in C++.
   68.14 + # A working C++ compiler is required. For the target demangler, it may
    69.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    69.2 +++ b/patches/binutils/2.14.92/binutils-skip-comments.patch	Sat Feb 24 11:00:05 2007 +0000
    69.3 @@ -0,0 +1,101 @@
    69.4 +Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
    69.5 +Fixes
    69.6 +localealias.s:544: Error: junk at end of line, first unrecognized character is `,' 
    69.7 +when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
    69.8 +
    69.9 +Paths adjusted to match crosstool's patcher.
   69.10 +
   69.11 +Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
   69.12 +From: Andreas Schwab <schwab at suse dot de>
   69.13 +To: Nathan Sidwell <nathan at codesourcery dot com>
   69.14 +Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
   69.15 +Date: Fri, 23 Apr 2004 22:27:19 +0200
   69.16 +Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
   69.17 +
   69.18 +Nathan Sidwell <nathan@codesourcery.com> writes:
   69.19 +
   69.20 +> Index: read.c
   69.21 +> ===================================================================
   69.22 +> RCS file: /cvs/src/src/gas/read.c,v
   69.23 +> retrieving revision 1.76
   69.24 +> diff -c -3 -p -r1.76 read.c
   69.25 +> *** read.c	12 Mar 2004 17:48:12 -0000	1.76
   69.26 +> --- read.c	18 Mar 2004 09:56:05 -0000
   69.27 +> *************** read_a_source_file (char *name)
   69.28 +> *** 1053,1059 ****
   69.29 +>   #endif
   69.30 +>   	  input_line_pointer--;
   69.31 +>   	  /* Report unknown char as ignored.  */
   69.32 +> ! 	  ignore_rest_of_line ();
   69.33 +>   	}
   69.34 +>   
   69.35 +>   #ifdef md_after_pass_hook
   69.36 +> --- 1053,1059 ----
   69.37 +>   #endif
   69.38 +>   	  input_line_pointer--;
   69.39 +>   	  /* Report unknown char as ignored.  */
   69.40 +> ! 	  demand_empty_rest_of_line ();
   69.41 +>   	}
   69.42 +>   
   69.43 +>   #ifdef md_after_pass_hook
   69.44 +
   69.45 +This means that the unknown character is no longer ignored, despite the
   69.46 +comment.  As a side effect a line starting with a line comment character
   69.47 +not followed by APP in NO_APP mode now triggers an error instead of just a
   69.48 +warning, breaking builds of glibc on m68k-linux.  Earlier in
   69.49 +read_a_source_file where #APP is handled there is another comment that
   69.50 +claims that unknown comments are ignored, when in fact they aren't (only
   69.51 +the initial line comment character is skipped).
   69.52 +
   69.53 +Note that the presence of #APP will mess up the line counters, but
   69.54 +that appears to be difficult to fix.
   69.55 +
   69.56 +Andreas.
   69.57 +
   69.58 +2004-04-23  Andreas Schwab  <schwab@suse.de>
   69.59 +
   69.60 +	* read.c (read_a_source_file): Ignore unknown text after line
   69.61 +	comment character.  Fix misleading comment.
   69.62 +
   69.63 +--- binutils/gas/read.c.~1.78.~	2004-04-23 08:58:23.000000000 +0200
   69.64 ++++ binutils/gas/read.c	2004-04-23 21:49:01.000000000 +0200
   69.65 +@@ -1,6 +1,6 @@
   69.66 + /* read.c - read a source file -
   69.67 +    Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
   69.68 +-   1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
   69.69 ++   1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
   69.70 + 
   69.71 + This file is part of GAS, the GNU Assembler.
   69.72 + 
   69.73 +@@ -950,10 +950,14 @@ read_a_source_file (char *name)
   69.74 + 	      unsigned int new_length;
   69.75 + 	      char *tmp_buf = 0;
   69.76 + 
   69.77 +-	      bump_line_counters ();
   69.78 + 	      s = input_line_pointer;
   69.79 + 	      if (strncmp (s, "APP\n", 4))
   69.80 +-		continue;	/* We ignore it */
   69.81 ++		{
   69.82 ++		  /* We ignore it */
   69.83 ++		  ignore_rest_of_line ();
   69.84 ++		  continue;
   69.85 ++		}
   69.86 ++	      bump_line_counters ();
   69.87 + 	      s += 4;
   69.88 + 
   69.89 + 	      sb_new (&sbuf);
   69.90 +@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
   69.91 + 	    continue;
   69.92 + #endif
   69.93 + 	  input_line_pointer--;
   69.94 +-	  /* Report unknown char as ignored.  */
   69.95 ++	  /* Report unknown char as error.  */
   69.96 + 	  demand_empty_rest_of_line ();
   69.97 + 	}
   69.98 + 
   69.99 +
  69.100 +-- 
  69.101 +Andreas Schwab, SuSE Labs, schwab@suse.de
  69.102 +SuSE Linux AG, Maxfeldstra&#xC3;e 5, 90409 N&#xC3;rnberg, Germany
  69.103 +Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
  69.104 +"And now for something completely different."
    70.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    70.2 +++ b/patches/binutils/2.14.92/gccpr15247-fix.patch	Sat Feb 24 11:00:05 2007 +0000
    70.3 @@ -0,0 +1,192 @@
    70.4 +See
    70.5 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15247
    70.6 +
    70.7 +Fixes spurious error
    70.8 +/tmp/ccvNi4ou.s: Assembler messages:
    70.9 +/tmp/ccvNi4ou.s:2310: Error: Illegal operands: There are only 32 single precision f registers; [0-31]
   70.10 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc10/build/sparc64-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/math/dosincos.o] Error 1
   70.11 +
   70.12 +when compiling glibc's dosincos.c with gcc-3.4.0
   70.13 +
   70.14 +===================================================================
   70.15 +RCS file: /cvs/src/src/opcodes/sparc-opc.c,v
   70.16 +retrieving revision 1.9
   70.17 +retrieving revision 1.10
   70.18 +diff -u -r1.9 -r1.10
   70.19 +--- src/opcodes/sparc-opc.c	2004/01/18 23:46:32	1.9
   70.20 ++++ src/opcodes/sparc-opc.c	2004/04/20 10:23:51	1.10
   70.21 +@@ -1273,110 +1273,72 @@
   70.22 + #define FM_DF 2		/* v9 */
   70.23 + #define FM_QF 3		/* v9 */
   70.24 + 
   70.25 +-#define fmovicc(opcode, fpsize, cond, flags) /* v9 */ \
   70.26 +-{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z,f,g", flags, v9 }, \
   70.27 +-{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z,f,g", flags, v9 }
   70.28 +-
   70.29 +-#define fmovfcc(opcode, fpsize, fcond, flags) /* v9 */ \
   70.30 +-{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6,f,g", flags, v9 }, \
   70.31 +-{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7,f,g", flags, v9 }, \
   70.32 +-{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8,f,g", flags, v9 }, \
   70.33 +-{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9,f,g", flags, v9 }
   70.34 ++#define fmoviccx(opcode, fpsize, args, cond, flags) /* v9 */ \
   70.35 ++{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z," args, flags, v9 }, \
   70.36 ++{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z," args, flags, v9 }
   70.37 ++
   70.38 ++#define fmovfccx(opcode, fpsize, args, fcond, flags) /* v9 */ \
   70.39 ++{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags, v9 }, \
   70.40 ++{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags, v9 }, \
   70.41 ++{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags, v9 }, \
   70.42 ++{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags, v9 }
   70.43 + 
   70.44 + /* FIXME: use fmovicc/fmovfcc? */ /* v9 */
   70.45 +-#define fmovcc(opcode, fpsize, cond, fcond, flags) /* v9 */ \
   70.46 +-{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z,f,g", flags | F_FLOAT, v9 }, \
   70.47 +-{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6,f,g", flags | F_FLOAT, v9 }, \
   70.48 +-{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z,f,g", flags | F_FLOAT, v9 }, \
   70.49 +-{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7,f,g", flags | F_FLOAT, v9 }, \
   70.50 +-{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8,f,g", flags | F_FLOAT, v9 }, \
   70.51 +-{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9,f,g", flags | F_FLOAT, v9 }
   70.52 +-
   70.53 +-/* v9 */ fmovcc  ("fmovda",	FM_DF, CONDA, FCONDA, 0),
   70.54 +-/* v9 */ fmovcc  ("fmovqa",	FM_QF, CONDA, FCONDA, 0),
   70.55 +-/* v9 */ fmovcc  ("fmovsa",	FM_SF, CONDA, FCONDA, 0),
   70.56 +-/* v9 */ fmovicc ("fmovdcc",	FM_DF, CONDCC, 0),
   70.57 +-/* v9 */ fmovicc ("fmovqcc",	FM_QF, CONDCC, 0),
   70.58 +-/* v9 */ fmovicc ("fmovscc",	FM_SF, CONDCC, 0),
   70.59 +-/* v9 */ fmovicc ("fmovdcs",	FM_DF, CONDCS, 0),
   70.60 +-/* v9 */ fmovicc ("fmovqcs",	FM_QF, CONDCS, 0),
   70.61 +-/* v9 */ fmovicc ("fmovscs",	FM_SF, CONDCS, 0),
   70.62 +-/* v9 */ fmovcc  ("fmovde",	FM_DF, CONDE, FCONDE, 0),
   70.63 +-/* v9 */ fmovcc  ("fmovqe",	FM_QF, CONDE, FCONDE, 0),
   70.64 +-/* v9 */ fmovcc  ("fmovse",	FM_SF, CONDE, FCONDE, 0),
   70.65 +-/* v9 */ fmovcc  ("fmovdg",	FM_DF, CONDG, FCONDG, 0),
   70.66 +-/* v9 */ fmovcc  ("fmovqg",	FM_QF, CONDG, FCONDG, 0),
   70.67 +-/* v9 */ fmovcc  ("fmovsg",	FM_SF, CONDG, FCONDG, 0),
   70.68 +-/* v9 */ fmovcc  ("fmovdge",	FM_DF, CONDGE, FCONDGE, 0),
   70.69 +-/* v9 */ fmovcc  ("fmovqge",	FM_QF, CONDGE, FCONDGE, 0),
   70.70 +-/* v9 */ fmovcc  ("fmovsge",	FM_SF, CONDGE, FCONDGE, 0),
   70.71 +-/* v9 */ fmovicc ("fmovdgeu",	FM_DF, CONDGEU, F_ALIAS),
   70.72 +-/* v9 */ fmovicc ("fmovqgeu",	FM_QF, CONDGEU, F_ALIAS),
   70.73 +-/* v9 */ fmovicc ("fmovsgeu",	FM_SF, CONDGEU, F_ALIAS),
   70.74 +-/* v9 */ fmovicc ("fmovdgu",	FM_DF, CONDGU, 0),
   70.75 +-/* v9 */ fmovicc ("fmovqgu",	FM_QF, CONDGU, 0),
   70.76 +-/* v9 */ fmovicc ("fmovsgu",	FM_SF, CONDGU, 0),
   70.77 +-/* v9 */ fmovcc  ("fmovdl",	FM_DF, CONDL, FCONDL, 0),
   70.78 +-/* v9 */ fmovcc  ("fmovql",	FM_QF, CONDL, FCONDL, 0),
   70.79 +-/* v9 */ fmovcc  ("fmovsl",	FM_SF, CONDL, FCONDL, 0),
   70.80 +-/* v9 */ fmovcc  ("fmovdle",	FM_DF, CONDLE, FCONDLE, 0),
   70.81 +-/* v9 */ fmovcc  ("fmovqle",	FM_QF, CONDLE, FCONDLE, 0),
   70.82 +-/* v9 */ fmovcc  ("fmovsle",	FM_SF, CONDLE, FCONDLE, 0),
   70.83 +-/* v9 */ fmovicc ("fmovdleu",	FM_DF, CONDLEU, 0),
   70.84 +-/* v9 */ fmovicc ("fmovqleu",	FM_QF, CONDLEU, 0),
   70.85 +-/* v9 */ fmovicc ("fmovsleu",	FM_SF, CONDLEU, 0),
   70.86 +-/* v9 */ fmovfcc ("fmovdlg",	FM_DF, FCONDLG, 0),
   70.87 +-/* v9 */ fmovfcc ("fmovqlg",	FM_QF, FCONDLG, 0),
   70.88 +-/* v9 */ fmovfcc ("fmovslg",	FM_SF, FCONDLG, 0),
   70.89 +-/* v9 */ fmovicc ("fmovdlu",	FM_DF, CONDLU, F_ALIAS),
   70.90 +-/* v9 */ fmovicc ("fmovqlu",	FM_QF, CONDLU, F_ALIAS),
   70.91 +-/* v9 */ fmovicc ("fmovslu",	FM_SF, CONDLU, F_ALIAS),
   70.92 +-/* v9 */ fmovcc  ("fmovdn",	FM_DF, CONDN, FCONDN, 0),
   70.93 +-/* v9 */ fmovcc  ("fmovqn",	FM_QF, CONDN, FCONDN, 0),
   70.94 +-/* v9 */ fmovcc  ("fmovsn",	FM_SF, CONDN, FCONDN, 0),
   70.95 +-/* v9 */ fmovcc  ("fmovdne",	FM_DF, CONDNE, FCONDNE, 0),
   70.96 +-/* v9 */ fmovcc  ("fmovqne",	FM_QF, CONDNE, FCONDNE, 0),
   70.97 +-/* v9 */ fmovcc  ("fmovsne",	FM_SF, CONDNE, FCONDNE, 0),
   70.98 +-/* v9 */ fmovicc ("fmovdneg",	FM_DF, CONDNEG, 0),
   70.99 +-/* v9 */ fmovicc ("fmovqneg",	FM_QF, CONDNEG, 0),
  70.100 +-/* v9 */ fmovicc ("fmovsneg",	FM_SF, CONDNEG, 0),
  70.101 +-/* v9 */ fmovcc  ("fmovdnz",	FM_DF, CONDNZ, FCONDNZ, F_ALIAS),
  70.102 +-/* v9 */ fmovcc  ("fmovqnz",	FM_QF, CONDNZ, FCONDNZ, F_ALIAS),
  70.103 +-/* v9 */ fmovcc  ("fmovsnz",	FM_SF, CONDNZ, FCONDNZ, F_ALIAS),
  70.104 +-/* v9 */ fmovfcc ("fmovdo",	FM_DF, FCONDO, 0),
  70.105 +-/* v9 */ fmovfcc ("fmovqo",	FM_QF, FCONDO, 0),
  70.106 +-/* v9 */ fmovfcc ("fmovso",	FM_SF, FCONDO, 0),
  70.107 +-/* v9 */ fmovicc ("fmovdpos",	FM_DF, CONDPOS, 0),
  70.108 +-/* v9 */ fmovicc ("fmovqpos",	FM_QF, CONDPOS, 0),
  70.109 +-/* v9 */ fmovicc ("fmovspos",	FM_SF, CONDPOS, 0),
  70.110 +-/* v9 */ fmovfcc ("fmovdu",	FM_DF, FCONDU, 0),
  70.111 +-/* v9 */ fmovfcc ("fmovqu",	FM_QF, FCONDU, 0),
  70.112 +-/* v9 */ fmovfcc ("fmovsu",	FM_SF, FCONDU, 0),
  70.113 +-/* v9 */ fmovfcc ("fmovdue",	FM_DF, FCONDUE, 0),
  70.114 +-/* v9 */ fmovfcc ("fmovque",	FM_QF, FCONDUE, 0),
  70.115 +-/* v9 */ fmovfcc ("fmovsue",	FM_SF, FCONDUE, 0),
  70.116 +-/* v9 */ fmovfcc ("fmovdug",	FM_DF, FCONDUG, 0),
  70.117 +-/* v9 */ fmovfcc ("fmovqug",	FM_QF, FCONDUG, 0),
  70.118 +-/* v9 */ fmovfcc ("fmovsug",	FM_SF, FCONDUG, 0),
  70.119 +-/* v9 */ fmovfcc ("fmovduge",	FM_DF, FCONDUGE, 0),
  70.120 +-/* v9 */ fmovfcc ("fmovquge",	FM_QF, FCONDUGE, 0),
  70.121 +-/* v9 */ fmovfcc ("fmovsuge",	FM_SF, FCONDUGE, 0),
  70.122 +-/* v9 */ fmovfcc ("fmovdul",	FM_DF, FCONDUL, 0),
  70.123 +-/* v9 */ fmovfcc ("fmovqul",	FM_QF, FCONDUL, 0),
  70.124 +-/* v9 */ fmovfcc ("fmovsul",	FM_SF, FCONDUL, 0),
  70.125 +-/* v9 */ fmovfcc ("fmovdule",	FM_DF, FCONDULE, 0),
  70.126 +-/* v9 */ fmovfcc ("fmovqule",	FM_QF, FCONDULE, 0),
  70.127 +-/* v9 */ fmovfcc ("fmovsule",	FM_SF, FCONDULE, 0),
  70.128 +-/* v9 */ fmovicc ("fmovdvc",	FM_DF, CONDVC, 0),
  70.129 +-/* v9 */ fmovicc ("fmovqvc",	FM_QF, CONDVC, 0),
  70.130 +-/* v9 */ fmovicc ("fmovsvc",	FM_SF, CONDVC, 0),
  70.131 +-/* v9 */ fmovicc ("fmovdvs",	FM_DF, CONDVS, 0),
  70.132 +-/* v9 */ fmovicc ("fmovqvs",	FM_QF, CONDVS, 0),
  70.133 +-/* v9 */ fmovicc ("fmovsvs",	FM_SF, CONDVS, 0),
  70.134 +-/* v9 */ fmovcc  ("fmovdz",	FM_DF, CONDZ, FCONDZ, F_ALIAS),
  70.135 +-/* v9 */ fmovcc  ("fmovqz",	FM_QF, CONDZ, FCONDZ, F_ALIAS),
  70.136 +-/* v9 */ fmovcc  ("fmovsz",	FM_SF, CONDZ, FCONDZ, F_ALIAS),
  70.137 +-
  70.138 ++#define fmovccx(opcode, fpsize, args, cond, fcond, flags) /* v9 */ \
  70.139 ++{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z," args, flags | F_FLOAT, v9 }, \
  70.140 ++{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags | F_FLOAT, v9 }, \
  70.141 ++{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z," args, flags | F_FLOAT, v9 }, \
  70.142 ++{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags | F_FLOAT, v9 }, \
  70.143 ++{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags | F_FLOAT, v9 }, \
  70.144 ++{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags | F_FLOAT, v9 }
  70.145 ++
  70.146 ++#define fmovicc(suffix, cond, flags) /* v9 */ \
  70.147 ++fmoviccx("fmovd" suffix, FM_DF, "B,H", cond, flags),		\
  70.148 ++fmoviccx("fmovq" suffix, FM_QF, "R,J", cond, flags),		\
  70.149 ++fmoviccx("fmovs" suffix, FM_SF, "f,g", cond, flags)
  70.150 ++
  70.151 ++#define fmovfcc(suffix, fcond, flags) /* v9 */ \
  70.152 ++fmovfccx("fmovd" suffix, FM_DF, "B,H", fcond, flags),		\
  70.153 ++fmovfccx("fmovq" suffix, FM_QF, "R,J", fcond, flags),		\
  70.154 ++fmovfccx("fmovs" suffix, FM_SF, "f,g", fcond, flags)
  70.155 ++
  70.156 ++#define fmovcc(suffix, cond, fcond, flags) /* v9 */ \
  70.157 ++fmovccx("fmovd" suffix, FM_DF, "B,H", cond, fcond, flags),	\
  70.158 ++fmovccx("fmovq" suffix, FM_QF, "R,J", cond, fcond, flags),	\
  70.159 ++fmovccx("fmovs" suffix, FM_SF, "f,g", cond, fcond, flags)
  70.160 ++
  70.161 ++/* v9 */ fmovcc  ("a", CONDA, FCONDA, 0),
  70.162 ++/* v9 */ fmovicc ("cc", CONDCC, 0),
  70.163 ++/* v9 */ fmovicc ("cs", CONDCS, 0),
  70.164 ++/* v9 */ fmovcc  ("e", CONDE, FCONDE, 0),
  70.165 ++/* v9 */ fmovcc  ("g", CONDG, FCONDG, 0),
  70.166 ++/* v9 */ fmovcc  ("ge", CONDGE, FCONDGE, 0),
  70.167 ++/* v9 */ fmovicc ("geu", CONDGEU, F_ALIAS),
  70.168 ++/* v9 */ fmovicc ("gu", CONDGU, 0),
  70.169 ++/* v9 */ fmovcc  ("l", CONDL, FCONDL, 0),
  70.170 ++/* v9 */ fmovcc  ("le", CONDLE, FCONDLE, 0),
  70.171 ++/* v9 */ fmovicc ("leu", CONDLEU, 0),
  70.172 ++/* v9 */ fmovfcc ("lg", FCONDLG, 0),
  70.173 ++/* v9 */ fmovicc ("lu", CONDLU, F_ALIAS),
  70.174 ++/* v9 */ fmovcc  ("n", CONDN, FCONDN, 0),
  70.175 ++/* v9 */ fmovcc  ("ne", CONDNE, FCONDNE, 0),
  70.176 ++/* v9 */ fmovicc ("neg", CONDNEG, 0),
  70.177 ++/* v9 */ fmovcc  ("nz", CONDNZ, FCONDNZ, F_ALIAS),
  70.178 ++/* v9 */ fmovfcc ("o", FCONDO, 0),
  70.179 ++/* v9 */ fmovicc ("pos", CONDPOS, 0),
  70.180 ++/* v9 */ fmovfcc ("u", FCONDU, 0),
  70.181 ++/* v9 */ fmovfcc ("ue", FCONDUE, 0),
  70.182 ++/* v9 */ fmovfcc ("ug", FCONDUG, 0),
  70.183 ++/* v9 */ fmovfcc ("uge", FCONDUGE, 0),
  70.184 ++/* v9 */ fmovfcc ("ul", FCONDUL, 0),
  70.185 ++/* v9 */ fmovfcc ("ule", FCONDULE, 0),
  70.186 ++/* v9 */ fmovicc ("vc", CONDVC, 0),
  70.187 ++/* v9 */ fmovicc ("vs", CONDVS, 0),
  70.188 ++/* v9 */ fmovcc  ("z", CONDZ, FCONDZ, F_ALIAS),
  70.189 ++
  70.190 ++#undef fmoviccx /* v9 */
  70.191 ++#undef fmovfccx /* v9 */
  70.192 ++#undef fmovccx /* v9 */
  70.193 + #undef fmovicc /* v9 */
  70.194 + #undef fmovfcc /* v9 */
  70.195 + #undef fmovcc /* v9 */
    71.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    71.2 +++ b/patches/binutils/2.14/binutils-sh-relocs.patch	Sat Feb 24 11:00:05 2007 +0000
    71.3 @@ -0,0 +1,38 @@
    71.4 +Message-Id: <200307311239.h6VCdNe27056@r-rr.iij4u.or.jp>
    71.5 +To: dank@kegel.com
    71.6 +Cc: kkojima@rr.iij4u.or.jp
    71.7 +Subject: Re: Writing PIC version of __udivsi3_i4? (was: Re: "make tests" fails
    71.8 + with "libc.so: text relocations used" in glibc-2.3.2 for sh4)
    71.9 +In-Reply-To: Your message of "Wed, 30 Jul 2003 21:55:54 -0700"
   71.10 +	<3F28A15A.5010400@kegel.com>
   71.11 +References: <3F28A15A.5010400@kegel.com>
   71.12 +Date: Thu, 31 Jul 2003 21:47:38 +0900
   71.13 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
   71.14 +
   71.15 +Dan Kegel <dank@kegel.com> wrote:
   71.16 +>> I'll give binutils-2.14.90.0.5 a shot, then. 
   71.17 +> 
   71.18 +> No joy - same problem.  Guess I'll take this up on binutils and/or libc-alpha.
   71.19 +
   71.20 +Please try the patch below, though it's a diff against the current
   71.21 +binutils CVS.
   71.22 +
   71.23 +Regards,
   71.24 +	kaz
   71.25 +--
   71.26 +diff -u3p ORIG/src/bfd/elf32-sh.c LOCAL/src/bfd/elf32-sh.c
   71.27 +--- src/bfd/elf32-sh.c.old	Fri Jul 25 14:46:58 2003
   71.28 ++++ src/bfd/elf32-sh.c	Thu Jul 31 21:09:38 2003
   71.29 +@@ -6497,8 +6497,10 @@ sh_elf_check_relocs (bfd *abfd, struct b
   71.30 + 							  sreloc, 2))
   71.31 + 			return FALSE;
   71.32 + 		    }
   71.33 ++#if 0
   71.34 + 		  if (sec->flags & SEC_READONLY)
   71.35 + 		    info->flags |= DF_TEXTREL;
   71.36 ++#endif
   71.37 + 		  elf_section_data (sec)->sreloc = sreloc;
   71.38 + 		}
   71.39 + 
   71.40 +
   71.41 +
    72.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    72.2 +++ b/patches/binutils/2.15.90.0.3/binutils-20040817-linkonce.patch	Sat Feb 24 11:00:05 2007 +0000
    72.3 @@ -0,0 +1,118 @@
    72.4 +From http://sources.redhat.com/ml/binutils/2004-08/msg00190.html
    72.5 +
    72.6 +Date: Tue, 17 Aug 2004 12:04:29 +0200
    72.7 +From: Jakub Jelinek <jakub at redhat dot com>
    72.8 +To: binutils at sources dot redhat dot com
    72.9 +Subject: [PATCH] Fix `defined in discarded section' errors when building ia64 gcc
   72.10 +Message-ID: <20040817100429.GL30497@sunsite.ms.mff.cuni.cz>
   72.11 +Reply-To: Jakub Jelinek <jakub at redhat dot com>
   72.12 +References: <20040817090201.GK30497@sunsite.ms.mff.cuni.cz>
   72.13 +In-Reply-To: <20040817090201 dot GK30497 at sunsite dot ms dot mff dot cuni dot cz>
   72.14 +
   72.15 +On Tue, Aug 17, 2004 at 11:02:01AM +0200, Jakub Jelinek wrote:
   72.16 +> Current gcc 3.4.x (at least gcc-3_4-rhl-branch) doesn't build with CVS
   72.17 +> binutils (nor 2.15.91.0.2).
   72.18 +> The problem is that libstdc++.so linking fails with:
   72.19 +> `.gnu.linkonce.t._ZNSdD2Ev' referenced in section `.gnu.linkonce.ia64unw._ZNSdD2Ev' of .libs/sstream-inst.o: defined in discarded section `.gnu.linkonce.t._ZNSdD2Ev' of .libs/sstream-inst.o
   72.20 +> The problem is that both io-inst.s and sstream-inst.s have
   72.21 +> .gnu.linkonce.t._ZNSdD2Ev definition, but because io-inst.cc
   72.22 +> also instantiates some templates sstream-inst.cc doesn't instantiate,
   72.23 +> the inliner can do a better job in io-inst.cc.
   72.24 +> The result is that _ZNSdD2Ev in io-inst.cc is a leaf routine, while
   72.25 +> it is not in sstream-inst.cc (in assembly,
   72.26 +> _ZNSdD2Ev in io-inst.s starts with .prologue and no .save directives,
   72.27 +> while _ZNSdD2Ev] in sstream-inst.s has .prologue 12, 35 and some
   72.28 +> .save directives.
   72.29 +> IA-64 ABI allows leaf routines to have no unwind section at all,
   72.30 +> which means .gnu.linkonce.ia64unw._ZNSdD2Ev is not created in
   72.31 +> io-inst.o at all and as .gnu.linkonce.t._ZNSdD2Ev comes first
   72.32 +> and wins, .gnu.linkonce.ia64unw._ZNSdD2Ev in sstream.o suddenly
   72.33 +> references a discarded section.
   72.34 +> 
   72.35 +> Not sure what should be done here, but certainly the compiler
   72.36 +> isn't at fault here, it is a binutils problem.
   72.37 +> One fix could be to create empty .gnu.linkonce.ia64unw.* section
   72.38 +> in assembler, another special case ia64 unwind sections in the linker.
   72.39 +
   72.40 +Here is a patch for the first possibility.
   72.41 +It certainly makes libstdc++.so to link and even the unwind info looks
   72.42 +good on brief skimming.
   72.43 +
   72.44 +2004-08-17  Jakub Jelinek  <jakub@redhat.com>
   72.45 +
   72.46 +	* config/tc-ia64.c (start_unwind_section): Add linkonce_empty
   72.47 +	argument, don't do anything if current section is not
   72.48 +	.gnu.linkonce.t.* and linkonce_empty is set.
   72.49 +	(generate_unwind_image, dot_endp): Adjust callers, call
   72.50 +	start_unwind_section (*, 1) if nothing will be put into the
   72.51 +	section.
   72.52 +
   72.53 +--- binutils/gas/config/tc-ia64.c.jj	2004-07-30 11:42:24.000000000 +0200
   72.54 ++++ binutils/gas/config/tc-ia64.c	2004-08-17 13:45:04.288173205 +0200
   72.55 +@@ -1,5 +1,6 @@
   72.56 + /* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture.
   72.57 +-   Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
   72.58 ++   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
   72.59 ++   Free Software Foundation, Inc.
   72.60 +    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
   72.61 + 
   72.62 +    This file is part of GAS, the GNU Assembler.
   72.63 +@@ -3297,7 +3298,7 @@ static char *special_linkonce_name[] =
   72.64 +   };
   72.65 + 
   72.66 + static void
   72.67 +-start_unwind_section (const segT text_seg, int sec_index)
   72.68 ++start_unwind_section (const segT text_seg, int sec_index, int linkonce_empty)
   72.69 + {
   72.70 +   /*
   72.71 +     Use a slightly ugly scheme to derive the unwind section names from
   72.72 +@@ -3359,6 +3360,8 @@ start_unwind_section (const segT text_se
   72.73 +       prefix = special_linkonce_name [sec_index - SPECIAL_SECTION_UNWIND];
   72.74 +       suffix += sizeof (".gnu.linkonce.t.") - 1;
   72.75 +     }
   72.76 ++  else if (linkonce_empty)
   72.77 ++    return;
   72.78 + 
   72.79 +   prefix_len = strlen (prefix);
   72.80 +   suffix_len = strlen (suffix);
   72.81 +@@ -3444,7 +3447,7 @@ generate_unwind_image (const segT text_s
   72.82 +       expressionS exp;
   72.83 +       bfd_reloc_code_real_type reloc;
   72.84 + 
   72.85 +-      start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO);
   72.86 ++      start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO, 0);
   72.87 + 
   72.88 +       /* Make sure the section has 4 byte alignment for ILP32 and
   72.89 + 	 8 byte alignment for LP64.  */
   72.90 +@@ -3485,6 +3488,8 @@ generate_unwind_image (const segT text_s
   72.91 + 	  unwind.personality_routine = 0;
   72.92 + 	}
   72.93 +     }
   72.94 ++  else
   72.95 ++    start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO, 1);
   72.96 + 
   72.97 +   free_saved_prologue_counts ();
   72.98 +   unwind.list = unwind.tail = unwind.current_entry = NULL;
   72.99 +@@ -4164,7 +4169,7 @@ dot_endp (dummy)
  72.100 +       subseg_set (md.last_text_seg, 0);
  72.101 +       unwind.proc_end = expr_build_dot ();
  72.102 + 
  72.103 +-      start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND);
  72.104 ++      start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND, 0);
  72.105 + 
  72.106 +       /* Make sure that section has 4 byte alignment for ILP32 and
  72.107 +          8 byte alignment for LP64.  */
  72.108 +@@ -4204,6 +4209,9 @@ dot_endp (dummy)
  72.109 + 			    bytes_per_address);
  72.110 + 
  72.111 +     }
  72.112 ++  else
  72.113 ++    start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND, 1);
  72.114 ++
  72.115 +   subseg_set (saved_seg, saved_subseg);
  72.116 + 
  72.117 +   /* Parse names of main and alternate entry points and set symbol sizes.  */
  72.118 +
  72.119 +
  72.120 +	Jakub
  72.121 +
    73.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    73.2 +++ b/patches/binutils/2.15.90.0.3/binutils-20040820-duplicates.patch	Sat Feb 24 11:00:05 2007 +0000
    73.3 @@ -0,0 +1,74 @@
    73.4 +See http://sources.redhat.com/ml/binutils/2004-08/msg00256.html
    73.5 +
    73.6 +Date: Fri, 20 Aug 2004 21:13:43 -0400
    73.7 +From: Daniel Jacobowitz <drow at false dot org>
    73.8 +To: binutils at sources dot redhat dot com
    73.9 +Subject: Re: Handle SEC_LINK_DUPLICATES_SAME_CONTENTS for arm-linux
   73.10 +Message-ID: <20040821011342.GA30319@nevyn.them.org>
   73.11 +Mail-Followup-To: binutils at sources dot redhat dot com
   73.12 +References: <20040818145518.GA9774@nevyn.them.org> <20040819055040.GA11820@lucon.org> <20040819080034.GE21716@bubble.modra.org> <20040820173240.GA17678@nevyn.them.org> <20040821003737.GB16016@bubble.modra.org>
   73.13 +In-Reply-To: <20040821003737 dot GB16016 at bubble dot modra dot org>
   73.14 +
   73.15 +On Sat, Aug 21, 2004 at 10:07:38AM +0930, Alan Modra wrote:
   73.16 +> On Fri, Aug 20, 2004 at 01:32:40PM -0400, Daniel Jacobowitz wrote:
   73.17 +> > Thanks.  How's this?
   73.18 +> 
   73.19 +> As you might have guessed from my rather slack review of your previous
   73.20 +> patch, I trust you enough to give the OK without proper review.  But
   73.21 +> since you asked...  :)
   73.22 +
   73.23 +Checked in as so.
   73.24 +
   73.25 +-- 
   73.26 +Daniel Jacobowitz
   73.27 +
   73.28 +2004-08-20  Daniel Jacobowitz  <dan@debian.org>
   73.29 +
   73.30 +	* elflink.c (_bfd_elf_section_already_linked): Handle
   73.31 +	SEC_LINK_DUPLICATES_SAME_CONTENTS.
   73.32 +
   73.33 +Index: elflink.c
   73.34 +===================================================================
   73.35 +RCS file: /big/fsf/rsync/src-cvs/src/bfd/elflink.c,v
   73.36 +retrieving revision 1.97
   73.37 +diff -u -p -r1.97 elflink.c
   73.38 +--- binutils/bfd/elflink.c	18 Aug 2004 02:45:42 -0000	1.97
   73.39 ++++ binutils/bfd/elflink.c	21 Aug 2004 00:59:08 -0000
   73.40 +@@ -9366,6 +9366,36 @@ _bfd_elf_section_already_linked (bfd *ab
   73.41 + 		  (_("%B: duplicate section `%A' has different size\n"),
   73.42 + 		   abfd, sec);
   73.43 + 	      break;
   73.44 ++
   73.45 ++	    case SEC_LINK_DUPLICATES_SAME_CONTENTS:
   73.46 ++	      if (sec->size != l->sec->size)
   73.47 ++		(*_bfd_error_handler)
   73.48 ++		  (_("%B: duplicate section `%A' has different size\n"),
   73.49 ++		   abfd, sec);
   73.50 ++	      else if (sec->size != 0)
   73.51 ++		{
   73.52 ++		  bfd_byte *sec_contents, *l_sec_contents;
   73.53 ++
   73.54 ++		  if (!bfd_malloc_and_get_section (abfd, sec, &sec_contents))
   73.55 ++		    (*_bfd_error_handler)
   73.56 ++		      (_("%B: warning: could not read contents of section `%A'\n"),
   73.57 ++		       abfd, sec);
   73.58 ++		  else if (!bfd_malloc_and_get_section (l->sec->owner, l->sec,
   73.59 ++							&l_sec_contents))
   73.60 ++		    (*_bfd_error_handler)
   73.61 ++		      (_("%B: warning: could not read contents of section `%A'\n"),
   73.62 ++		       l->sec->owner, l->sec);
   73.63 ++		  else if (memcmp (sec_contents, l_sec_contents, sec->size) != 0)
   73.64 ++		    (*_bfd_error_handler)
   73.65 ++		      (_("%B: warning: duplicate section `%A' has different contents\n"),
   73.66 ++		       abfd, sec);
   73.67 ++
   73.68 ++		  if (sec_contents)
   73.69 ++		    free (sec_contents);
   73.70 ++		  if (l_sec_contents)
   73.71 ++		    free (l_sec_contents);
   73.72 ++		}
   73.73 ++	      break;
   73.74 + 	    }
   73.75 + 
   73.76 + 	  /* Set the output_section field so that lang_add_section
   73.77 +
    74.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    74.2 +++ b/patches/binutils/2.15.90.0.3/binutils-skip-comments.patch	Sat Feb 24 11:00:05 2007 +0000
    74.3 @@ -0,0 +1,101 @@
    74.4 +Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
    74.5 +Fixes
    74.6 +localealias.s:544: Error: junk at end of line, first unrecognized character is `,' 
    74.7 +when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
    74.8 +
    74.9 +Paths adjusted to match crosstool's patcher.
   74.10 +
   74.11 +Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
   74.12 +From: Andreas Schwab <schwab at suse dot de>
   74.13 +To: Nathan Sidwell <nathan at codesourcery dot com>
   74.14 +Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
   74.15 +Date: Fri, 23 Apr 2004 22:27:19 +0200
   74.16 +Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
   74.17 +
   74.18 +Nathan Sidwell <nathan@codesourcery.com> writes:
   74.19 +
   74.20 +> Index: read.c
   74.21 +> ===================================================================
   74.22 +> RCS file: /cvs/src/src/gas/read.c,v
   74.23 +> retrieving revision 1.76
   74.24 +> diff -c -3 -p -r1.76 read.c
   74.25 +> *** read.c	12 Mar 2004 17:48:12 -0000	1.76
   74.26 +> --- read.c	18 Mar 2004 09:56:05 -0000
   74.27 +> *************** read_a_source_file (char *name)
   74.28 +> *** 1053,1059 ****
   74.29 +>   #endif
   74.30 +>   	  input_line_pointer--;
   74.31 +>   	  /* Report unknown char as ignored.  */
   74.32 +> ! 	  ignore_rest_of_line ();
   74.33 +>   	}
   74.34 +>   
   74.35 +>   #ifdef md_after_pass_hook
   74.36 +> --- 1053,1059 ----
   74.37 +>   #endif
   74.38 +>   	  input_line_pointer--;
   74.39 +>   	  /* Report unknown char as ignored.  */
   74.40 +> ! 	  demand_empty_rest_of_line ();
   74.41 +>   	}
   74.42 +>   
   74.43 +>   #ifdef md_after_pass_hook
   74.44 +
   74.45 +This means that the unknown character is no longer ignored, despite the
   74.46 +comment.  As a side effect a line starting with a line comment character
   74.47 +not followed by APP in NO_APP mode now triggers an error instead of just a
   74.48 +warning, breaking builds of glibc on m68k-linux.  Earlier in
   74.49 +read_a_source_file where #APP is handled there is another comment that
   74.50 +claims that unknown comments are ignored, when in fact they aren't (only
   74.51 +the initial line comment character is skipped).
   74.52 +
   74.53 +Note that the presence of #APP will mess up the line counters, but
   74.54 +that appears to be difficult to fix.
   74.55 +
   74.56 +Andreas.
   74.57 +
   74.58 +2004-04-23  Andreas Schwab  <schwab@suse.de>
   74.59 +
   74.60 +	* read.c (read_a_source_file): Ignore unknown text after line
   74.61 +	comment character.  Fix misleading comment.
   74.62 +
   74.63 +--- binutils/gas/read.c.~1.78.~	2004-04-23 08:58:23.000000000 +0200
   74.64 ++++ binutils/gas/read.c	2004-04-23 21:49:01.000000000 +0200
   74.65 +@@ -1,6 +1,6 @@
   74.66 + /* read.c - read a source file -
   74.67 +    Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
   74.68 +-   1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
   74.69 ++   1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
   74.70 + 
   74.71 + This file is part of GAS, the GNU Assembler.
   74.72 + 
   74.73 +@@ -950,10 +950,14 @@ read_a_source_file (char *name)
   74.74 + 	      unsigned int new_length;
   74.75 + 	      char *tmp_buf = 0;
   74.76 + 
   74.77 +-	      bump_line_counters ();
   74.78 + 	      s = input_line_pointer;
   74.79 + 	      if (strncmp (s, "APP\n", 4))
   74.80 +-		continue;	/* We ignore it */
   74.81 ++		{
   74.82 ++		  /* We ignore it */
   74.83 ++		  ignore_rest_of_line ();
   74.84 ++		  continue;
   74.85 ++		}
   74.86 ++	      bump_line_counters ();
   74.87 + 	      s += 4;
   74.88 + 
   74.89 + 	      sb_new (&sbuf);
   74.90 +@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
   74.91 + 	    continue;
   74.92 + #endif
   74.93 + 	  input_line_pointer--;
   74.94 +-	  /* Report unknown char as ignored.  */
   74.95 ++	  /* Report unknown char as error.  */
   74.96 + 	  demand_empty_rest_of_line ();
   74.97 + 	}
   74.98 + 
   74.99 +
  74.100 +-- 
  74.101 +Andreas Schwab, SuSE Labs, schwab@suse.de
  74.102 +SuSE Linux AG, Maxfeldstra&#xC3;e 5, 90409 N&#xC3;rnberg, Germany
  74.103 +Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
  74.104 +"And now for something completely different."
    75.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    75.2 +++ b/patches/binutils/2.15.90.0.3/gccpr15247-fix.patch	Sat Feb 24 11:00:05 2007 +0000
    75.3 @@ -0,0 +1,192 @@
    75.4 +See
    75.5 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15247
    75.6 +
    75.7 +Fixes spurious error
    75.8 +/tmp/ccvNi4ou.s: Assembler messages:
    75.9 +/tmp/ccvNi4ou.s:2310: Error: Illegal operands: There are only 32 single precision f registers; [0-31]
   75.10 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc10/build/sparc64-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/math/dosincos.o] Error 1
   75.11 +
   75.12 +when compiling glibc's dosincos.c with gcc-3.4.0
   75.13 +
   75.14 +===================================================================
   75.15 +RCS file: /cvs/src/src/opcodes/sparc-opc.c,v
   75.16 +retrieving revision 1.9
   75.17 +retrieving revision 1.10
   75.18 +diff -u -r1.9 -r1.10
   75.19 +--- src/opcodes/sparc-opc.c	2004/01/18 23:46:32	1.9
   75.20 ++++ src/opcodes/sparc-opc.c	2004/04/20 10:23:51	1.10
   75.21 +@@ -1273,110 +1273,72 @@
   75.22 + #define FM_DF 2		/* v9 */
   75.23 + #define FM_QF 3		/* v9 */
   75.24 + 
   75.25 +-#define fmovicc(opcode, fpsize, cond, flags) /* v9 */ \
   75.26 +-{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z,f,g", flags, v9 }, \
   75.27 +-{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z,f,g", flags, v9 }
   75.28 +-
   75.29 +-#define fmovfcc(opcode, fpsize, fcond, flags) /* v9 */ \
   75.30 +-{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6,f,g", flags, v9 }, \
   75.31 +-{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7,f,g", flags, v9 }, \
   75.32 +-{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8,f,g", flags, v9 }, \
   75.33 +-{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9,f,g", flags, v9 }
   75.34 ++#define fmoviccx(opcode, fpsize, args, cond, flags) /* v9 */ \
   75.35 ++{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z," args, flags, v9 }, \
   75.36 ++{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z," args, flags, v9 }
   75.37 ++
   75.38 ++#define fmovfccx(opcode, fpsize, args, fcond, flags) /* v9 */ \
   75.39 ++{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags, v9 }, \
   75.40 ++{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags, v9 }, \
   75.41 ++{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags, v9 }, \
   75.42 ++{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags, v9 }
   75.43 + 
   75.44 + /* FIXME: use fmovicc/fmovfcc? */ /* v9 */
   75.45 +-#define fmovcc(opcode, fpsize, cond, fcond, flags) /* v9 */ \
   75.46 +-{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z,f,g", flags | F_FLOAT, v9 }, \
   75.47 +-{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6,f,g", flags | F_FLOAT, v9 }, \
   75.48 +-{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z,f,g", flags | F_FLOAT, v9 }, \
   75.49 +-{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7,f,g", flags | F_FLOAT, v9 }, \
   75.50 +-{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8,f,g", flags | F_FLOAT, v9 }, \
   75.51 +-{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9,f,g", flags | F_FLOAT, v9 }
   75.52 +-
   75.53 +-/* v9 */ fmovcc  ("fmovda",	FM_DF, CONDA, FCONDA, 0),
   75.54 +-/* v9 */ fmovcc  ("fmovqa",	FM_QF, CONDA, FCONDA, 0),
   75.55 +-/* v9 */ fmovcc  ("fmovsa",	FM_SF, CONDA, FCONDA, 0),
   75.56 +-/* v9 */ fmovicc ("fmovdcc",	FM_DF, CONDCC, 0),
   75.57 +-/* v9 */ fmovicc ("fmovqcc",	FM_QF, CONDCC, 0),
   75.58 +-/* v9 */ fmovicc ("fmovscc",	FM_SF, CONDCC, 0),
   75.59 +-/* v9 */ fmovicc ("fmovdcs",	FM_DF, CONDCS, 0),
   75.60 +-/* v9 */ fmovicc ("fmovqcs",	FM_QF, CONDCS, 0),
   75.61 +-/* v9 */ fmovicc ("fmovscs",	FM_SF, CONDCS, 0),
   75.62 +-/* v9 */ fmovcc  ("fmovde",	FM_DF, CONDE, FCONDE, 0),
   75.63 +-/* v9 */ fmovcc  ("fmovqe",	FM_QF, CONDE, FCONDE, 0),
   75.64 +-/* v9 */ fmovcc  ("fmovse",	FM_SF, CONDE, FCONDE, 0),
   75.65 +-/* v9 */ fmovcc  ("fmovdg",	FM_DF, CONDG, FCONDG, 0),
   75.66 +-/* v9 */ fmovcc  ("fmovqg",	FM_QF, CONDG, FCONDG, 0),
   75.67 +-/* v9 */ fmovcc  ("fmovsg",	FM_SF, CONDG, FCONDG, 0),
   75.68 +-/* v9 */ fmovcc  ("fmovdge",	FM_DF, CONDGE, FCONDGE, 0),
   75.69 +-/* v9 */ fmovcc  ("fmovqge",	FM_QF, CONDGE, FCONDGE, 0),
   75.70 +-/* v9 */ fmovcc  ("fmovsge",	FM_SF, CONDGE, FCONDGE, 0),
   75.71 +-/* v9 */ fmovicc ("fmovdgeu",	FM_DF, CONDGEU, F_ALIAS),
   75.72 +-/* v9 */ fmovicc ("fmovqgeu",	FM_QF, CONDGEU, F_ALIAS),
   75.73 +-/* v9 */ fmovicc ("fmovsgeu",	FM_SF, CONDGEU, F_ALIAS),
   75.74 +-/* v9 */ fmovicc ("fmovdgu",	FM_DF, CONDGU, 0),
   75.75 +-/* v9 */ fmovicc ("fmovqgu",	FM_QF, CONDGU, 0),
   75.76 +-/* v9 */ fmovicc ("fmovsgu",	FM_SF, CONDGU, 0),
   75.77 +-/* v9 */ fmovcc  ("fmovdl",	FM_DF, CONDL, FCONDL, 0),
   75.78 +-/* v9 */ fmovcc  ("fmovql",	FM_QF, CONDL, FCONDL, 0),
   75.79 +-/* v9 */ fmovcc  ("fmovsl",	FM_SF, CONDL, FCONDL, 0),
   75.80 +-/* v9 */ fmovcc  ("fmovdle",	FM_DF, CONDLE, FCONDLE, 0),
   75.81 +-/* v9 */ fmovcc  ("fmovqle",	FM_QF, CONDLE, FCONDLE, 0),
   75.82 +-/* v9 */ fmovcc  ("fmovsle",	FM_SF, CONDLE, FCONDLE, 0),
   75.83 +-/* v9 */ fmovicc ("fmovdleu",	FM_DF, CONDLEU, 0),
   75.84 +-/* v9 */ fmovicc ("fmovqleu",	FM_QF, CONDLEU, 0),
   75.85 +-/* v9 */ fmovicc ("fmovsleu",	FM_SF, CONDLEU, 0),
   75.86 +-/* v9 */ fmovfcc ("fmovdlg",	FM_DF, FCONDLG, 0),
   75.87 +-/* v9 */ fmovfcc ("fmovqlg",	FM_QF, FCONDLG, 0),
   75.88 +-/* v9 */ fmovfcc ("fmovslg",	FM_SF, FCONDLG, 0),
   75.89 +-/* v9 */ fmovicc ("fmovdlu",	FM_DF, CONDLU, F_ALIAS),
   75.90 +-/* v9 */ fmovicc ("fmovqlu",	FM_QF, CONDLU, F_ALIAS),
   75.91 +-/* v9 */ fmovicc ("fmovslu",	FM_SF, CONDLU, F_ALIAS),
   75.92 +-/* v9 */ fmovcc  ("fmovdn",	FM_DF, CONDN, FCONDN, 0),
   75.93 +-/* v9 */ fmovcc  ("fmovqn",	FM_QF, CONDN, FCONDN, 0),
   75.94 +-/* v9 */ fmovcc  ("fmovsn",	FM_SF, CONDN, FCONDN, 0),
   75.95 +-/* v9 */ fmovcc  ("fmovdne",	FM_DF, CONDNE, FCONDNE, 0),
   75.96 +-/* v9 */ fmovcc  ("fmovqne",	FM_QF, CONDNE, FCONDNE, 0),
   75.97 +-/* v9 */ fmovcc  ("fmovsne",	FM_SF, CONDNE, FCONDNE, 0),
   75.98 +-/* v9 */ fmovicc ("fmovdneg",	FM_DF, CONDNEG, 0),
   75.99 +-/* v9 */ fmovicc ("fmovqneg",	FM_QF, CONDNEG, 0),
  75.100 +-/* v9 */ fmovicc ("fmovsneg",	FM_SF, CONDNEG, 0),
  75.101 +-/* v9 */ fmovcc  ("fmovdnz",	FM_DF, CONDNZ, FCONDNZ, F_ALIAS),
  75.102 +-/* v9 */ fmovcc  ("fmovqnz",	FM_QF, CONDNZ, FCONDNZ, F_ALIAS),
  75.103 +-/* v9 */ fmovcc  ("fmovsnz",	FM_SF, CONDNZ, FCONDNZ, F_ALIAS),
  75.104 +-/* v9 */ fmovfcc ("fmovdo",	FM_DF, FCONDO, 0),
  75.105 +-/* v9 */ fmovfcc ("fmovqo",	FM_QF, FCONDO, 0),
  75.106 +-/* v9 */ fmovfcc ("fmovso",	FM_SF, FCONDO, 0),
  75.107 +-/* v9 */ fmovicc ("fmovdpos",	FM_DF, CONDPOS, 0),
  75.108 +-/* v9 */ fmovicc ("fmovqpos",	FM_QF, CONDPOS, 0),
  75.109 +-/* v9 */ fmovicc ("fmovspos",	FM_SF, CONDPOS, 0),
  75.110 +-/* v9 */ fmovfcc ("fmovdu",	FM_DF, FCONDU, 0),
  75.111 +-/* v9 */ fmovfcc ("fmovqu",	FM_QF, FCONDU, 0),
  75.112 +-/* v9 */ fmovfcc ("fmovsu",	FM_SF, FCONDU, 0),
  75.113 +-/* v9 */ fmovfcc ("fmovdue",	FM_DF, FCONDUE, 0),
  75.114 +-/* v9 */ fmovfcc ("fmovque",	FM_QF, FCONDUE, 0),
  75.115 +-/* v9 */ fmovfcc ("fmovsue",	FM_SF, FCONDUE, 0),
  75.116 +-/* v9 */ fmovfcc ("fmovdug",	FM_DF, FCONDUG, 0),
  75.117 +-/* v9 */ fmovfcc ("fmovqug",	FM_QF, FCONDUG, 0),
  75.118 +-/* v9 */ fmovfcc ("fmovsug",	FM_SF, FCONDUG, 0),
  75.119 +-/* v9 */ fmovfcc ("fmovduge",	FM_DF, FCONDUGE, 0),
  75.120 +-/* v9 */ fmovfcc ("fmovquge",	FM_QF, FCONDUGE, 0),
  75.121 +-/* v9 */ fmovfcc ("fmovsuge",	FM_SF, FCONDUGE, 0),
  75.122 +-/* v9 */ fmovfcc ("fmovdul",	FM_DF, FCONDUL, 0),
  75.123 +-/* v9 */ fmovfcc ("fmovqul",	FM_QF, FCONDUL, 0),
  75.124 +-/* v9 */ fmovfcc ("fmovsul",	FM_SF, FCONDUL, 0),
  75.125 +-/* v9 */ fmovfcc ("fmovdule",	FM_DF, FCONDULE, 0),
  75.126 +-/* v9 */ fmovfcc ("fmovqule",	FM_QF, FCONDULE, 0),
  75.127 +-/* v9 */ fmovfcc ("fmovsule",	FM_SF, FCONDULE, 0),
  75.128 +-/* v9 */ fmovicc ("fmovdvc",	FM_DF, CONDVC, 0),
  75.129 +-/* v9 */ fmovicc ("fmovqvc",	FM_QF, CONDVC, 0),
  75.130 +-/* v9 */ fmovicc ("fmovsvc",	FM_SF, CONDVC, 0),
  75.131 +-/* v9 */ fmovicc ("fmovdvs",	FM_DF, CONDVS, 0),
  75.132 +-/* v9 */ fmovicc ("fmovqvs",	FM_QF, CONDVS, 0),
  75.133 +-/* v9 */ fmovicc ("fmovsvs",	FM_SF, CONDVS, 0),
  75.134 +-/* v9 */ fmovcc  ("fmovdz",	FM_DF, CONDZ, FCONDZ, F_ALIAS),
  75.135 +-/* v9 */ fmovcc  ("fmovqz",	FM_QF, CONDZ, FCONDZ, F_ALIAS),
  75.136 +-/* v9 */ fmovcc  ("fmovsz",	FM_SF, CONDZ, FCONDZ, F_ALIAS),
  75.137 +-
  75.138 ++#define fmovccx(opcode, fpsize, args, cond, fcond, flags) /* v9 */ \
  75.139 ++{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z," args, flags | F_FLOAT, v9 }, \
  75.140 ++{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags | F_FLOAT, v9 }, \
  75.141 ++{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z," args, flags | F_FLOAT, v9 }, \
  75.142 ++{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags | F_FLOAT, v9 }, \
  75.143 ++{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags | F_FLOAT, v9 }, \
  75.144 ++{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags | F_FLOAT, v9 }
  75.145 ++
  75.146 ++#define fmovicc(suffix, cond, flags) /* v9 */ \
  75.147 ++fmoviccx("fmovd" suffix, FM_DF, "B,H", cond, flags),		\
  75.148 ++fmoviccx("fmovq" suffix, FM_QF, "R,J", cond, flags),		\
  75.149 ++fmoviccx("fmovs" suffix, FM_SF, "f,g", cond, flags)
  75.150 ++
  75.151 ++#define fmovfcc(suffix, fcond, flags) /* v9 */ \
  75.152 ++fmovfccx("fmovd" suffix, FM_DF, "B,H", fcond, flags),		\
  75.153 ++fmovfccx("fmovq" suffix, FM_QF, "R,J", fcond, flags),		\
  75.154 ++fmovfccx("fmovs" suffix, FM_SF, "f,g", fcond, flags)
  75.155 ++
  75.156 ++#define fmovcc(suffix, cond, fcond, flags) /* v9 */ \
  75.157 ++fmovccx("fmovd" suffix, FM_DF, "B,H", cond, fcond, flags),	\
  75.158 ++fmovccx("fmovq" suffix, FM_QF, "R,J", cond, fcond, flags),	\
  75.159 ++fmovccx("fmovs" suffix, FM_SF, "f,g", cond, fcond, flags)
  75.160 ++
  75.161 ++/* v9 */ fmovcc  ("a", CONDA, FCONDA, 0),
  75.162 ++/* v9 */ fmovicc ("cc", CONDCC, 0),
  75.163 ++/* v9 */ fmovicc ("cs", CONDCS, 0),
  75.164 ++/* v9 */ fmovcc  ("e", CONDE, FCONDE, 0),
  75.165 ++/* v9 */ fmovcc  ("g", CONDG, FCONDG, 0),
  75.166 ++/* v9 */ fmovcc  ("ge", CONDGE, FCONDGE, 0),
  75.167 ++/* v9 */ fmovicc ("geu", CONDGEU, F_ALIAS),
  75.168 ++/* v9 */ fmovicc ("gu", CONDGU, 0),
  75.169 ++/* v9 */ fmovcc  ("l", CONDL, FCONDL, 0),
  75.170 ++/* v9 */ fmovcc  ("le", CONDLE, FCONDLE, 0),
  75.171 ++/* v9 */ fmovicc ("leu", CONDLEU, 0),
  75.172 ++/* v9 */ fmovfcc ("lg", FCONDLG, 0),
  75.173 ++/* v9 */ fmovicc ("lu", CONDLU, F_ALIAS),
  75.174 ++/* v9 */ fmovcc  ("n", CONDN, FCONDN, 0),
  75.175 ++/* v9 */ fmovcc  ("ne", CONDNE, FCONDNE, 0),
  75.176 ++/* v9 */ fmovicc ("neg", CONDNEG, 0),
  75.177 ++/* v9 */ fmovcc  ("nz", CONDNZ, FCONDNZ, F_ALIAS),
  75.178 ++/* v9 */ fmovfcc ("o", FCONDO, 0),
  75.179 ++/* v9 */ fmovicc ("pos", CONDPOS, 0),
  75.180 ++/* v9 */ fmovfcc ("u", FCONDU, 0),
  75.181 ++/* v9 */ fmovfcc ("ue", FCONDUE, 0),
  75.182 ++/* v9 */ fmovfcc ("ug", FCONDUG, 0),
  75.183 ++/* v9 */ fmovfcc ("uge", FCONDUGE, 0),
  75.184 ++/* v9 */ fmovfcc ("ul", FCONDUL, 0),
  75.185 ++/* v9 */ fmovfcc ("ule", FCONDULE, 0),
  75.186 ++/* v9 */ fmovicc ("vc", CONDVC, 0),
  75.187 ++/* v9 */ fmovicc ("vs", CONDVS, 0),
  75.188 ++/* v9 */ fmovcc  ("z", CONDZ, FCONDZ, F_ALIAS),
  75.189 ++
  75.190 ++#undef fmoviccx /* v9 */
  75.191 ++#undef fmovfccx /* v9 */
  75.192 ++#undef fmovccx /* v9 */
  75.193 + #undef fmovicc /* v9 */
  75.194 + #undef fmovfcc /* v9 */
  75.195 + #undef fmovcc /* v9 */
    76.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    76.2 +++ b/patches/binutils/2.15.91.0.2/binutils-20040817-linkonce.patch	Sat Feb 24 11:00:05 2007 +0000
    76.3 @@ -0,0 +1,118 @@
    76.4 +From http://sources.redhat.com/ml/binutils/2004-08/msg00190.html
    76.5 +
    76.6 +Date: Tue, 17 Aug 2004 12:04:29 +0200
    76.7 +From: Jakub Jelinek <jakub at redhat dot com>
    76.8 +To: binutils at sources dot redhat dot com
    76.9 +Subject: [PATCH] Fix `defined in discarded section' errors when building ia64 gcc
   76.10 +Message-ID: <20040817100429.GL30497@sunsite.ms.mff.cuni.cz>
   76.11 +Reply-To: Jakub Jelinek <jakub at redhat dot com>
   76.12 +References: <20040817090201.GK30497@sunsite.ms.mff.cuni.cz>
   76.13 +In-Reply-To: <20040817090201 dot GK30497 at sunsite dot ms dot mff dot cuni dot cz>
   76.14 +
   76.15 +On Tue, Aug 17, 2004 at 11:02:01AM +0200, Jakub Jelinek wrote:
   76.16 +> Current gcc 3.4.x (at least gcc-3_4-rhl-branch) doesn't build with CVS
   76.17 +> binutils (nor 2.15.91.0.2).
   76.18 +> The problem is that libstdc++.so linking fails with:
   76.19 +> `.gnu.linkonce.t._ZNSdD2Ev' referenced in section `.gnu.linkonce.ia64unw._ZNSdD2Ev' of .libs/sstream-inst.o: defined in discarded section `.gnu.linkonce.t._ZNSdD2Ev' of .libs/sstream-inst.o
   76.20 +> The problem is that both io-inst.s and sstream-inst.s have
   76.21 +> .gnu.linkonce.t._ZNSdD2Ev definition, but because io-inst.cc
   76.22 +> also instantiates some templates sstream-inst.cc doesn't instantiate,
   76.23 +> the inliner can do a better job in io-inst.cc.
   76.24 +> The result is that _ZNSdD2Ev in io-inst.cc is a leaf routine, while
   76.25 +> it is not in sstream-inst.cc (in assembly,
   76.26 +> _ZNSdD2Ev in io-inst.s starts with .prologue and no .save directives,
   76.27 +> while _ZNSdD2Ev] in sstream-inst.s has .prologue 12, 35 and some
   76.28 +> .save directives.
   76.29 +> IA-64 ABI allows leaf routines to have no unwind section at all,
   76.30 +> which means .gnu.linkonce.ia64unw._ZNSdD2Ev is not created in
   76.31 +> io-inst.o at all and as .gnu.linkonce.t._ZNSdD2Ev comes first
   76.32 +> and wins, .gnu.linkonce.ia64unw._ZNSdD2Ev in sstream.o suddenly
   76.33 +> references a discarded section.
   76.34 +> 
   76.35 +> Not sure what should be done here, but certainly the compiler
   76.36 +> isn't at fault here, it is a binutils problem.
   76.37 +> One fix could be to create empty .gnu.linkonce.ia64unw.* section
   76.38 +> in assembler, another special case ia64 unwind sections in the linker.
   76.39 +
   76.40 +Here is a patch for the first possibility.
   76.41 +It certainly makes libstdc++.so to link and even the unwind info looks
   76.42 +good on brief skimming.
   76.43 +
   76.44 +2004-08-17  Jakub Jelinek  <jakub@redhat.com>
   76.45 +
   76.46 +	* config/tc-ia64.c (start_unwind_section): Add linkonce_empty
   76.47 +	argument, don't do anything if current section is not
   76.48 +	.gnu.linkonce.t.* and linkonce_empty is set.
   76.49 +	(generate_unwind_image, dot_endp): Adjust callers, call
   76.50 +	start_unwind_section (*, 1) if nothing will be put into the
   76.51 +	section.
   76.52 +
   76.53 +--- binutils/gas/config/tc-ia64.c.jj	2004-07-30 11:42:24.000000000 +0200
   76.54 ++++ binutils/gas/config/tc-ia64.c	2004-08-17 13:45:04.288173205 +0200
   76.55 +@@ -1,5 +1,6 @@
   76.56 + /* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture.
   76.57 +-   Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
   76.58 ++   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
   76.59 ++   Free Software Foundation, Inc.
   76.60 +    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
   76.61 + 
   76.62 +    This file is part of GAS, the GNU Assembler.
   76.63 +@@ -3297,7 +3298,7 @@ static char *special_linkonce_name[] =
   76.64 +   };
   76.65 + 
   76.66 + static void
   76.67 +-start_unwind_section (const segT text_seg, int sec_index)
   76.68 ++start_unwind_section (const segT text_seg, int sec_index, int linkonce_empty)
   76.69 + {
   76.70 +   /*
   76.71 +     Use a slightly ugly scheme to derive the unwind section names from
   76.72 +@@ -3359,6 +3360,8 @@ start_unwind_section (const segT text_se
   76.73 +       prefix = special_linkonce_name [sec_index - SPECIAL_SECTION_UNWIND];
   76.74 +       suffix += sizeof (".gnu.linkonce.t.") - 1;
   76.75 +     }
   76.76 ++  else if (linkonce_empty)
   76.77 ++    return;
   76.78 + 
   76.79 +   prefix_len = strlen (prefix);
   76.80 +   suffix_len = strlen (suffix);
   76.81 +@@ -3444,7 +3447,7 @@ generate_unwind_image (const segT text_s
   76.82 +       expressionS exp;
   76.83 +       bfd_reloc_code_real_type reloc;
   76.84 + 
   76.85 +-      start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO);
   76.86 ++      start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO, 0);
   76.87 + 
   76.88 +       /* Make sure the section has 4 byte alignment for ILP32 and
   76.89 + 	 8 byte alignment for LP64.  */
   76.90 +@@ -3485,6 +3488,8 @@ generate_unwind_image (const segT text_s
   76.91 + 	  unwind.personality_routine = 0;
   76.92 + 	}
   76.93 +     }
   76.94 ++  else
   76.95 ++    start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO, 1);
   76.96 + 
   76.97 +   free_saved_prologue_counts ();
   76.98 +   unwind.list = unwind.tail = unwind.current_entry = NULL;
   76.99 +@@ -4164,7 +4169,7 @@ dot_endp (dummy)
  76.100 +       subseg_set (md.last_text_seg, 0);
  76.101 +       unwind.proc_end = expr_build_dot ();
  76.102 + 
  76.103 +-      start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND);
  76.104 ++      start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND, 0);
  76.105 + 
  76.106 +       /* Make sure that section has 4 byte alignment for ILP32 and
  76.107 +          8 byte alignment for LP64.  */
  76.108 +@@ -4204,6 +4209,9 @@ dot_endp (dummy)
  76.109 + 			    bytes_per_address);
  76.110 + 
  76.111 +     }
  76.112 ++  else
  76.113 ++    start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND, 1);
  76.114 ++
  76.115 +   subseg_set (saved_seg, saved_subseg);
  76.116 + 
  76.117 +   /* Parse names of main and alternate entry points and set symbol sizes.  */
  76.118 +
  76.119 +
  76.120 +	Jakub
  76.121 +
    77.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    77.2 +++ b/patches/binutils/2.15.91.0.2/binutils-dup-sections.patch	Sat Feb 24 11:00:05 2007 +0000
    77.3 @@ -0,0 +1,68 @@
    77.4 +See http://sources.redhat.com/ml/binutils/2004-08/msg00256.html
    77.5 +
    77.6 +Date: Fri, 20 Aug 2004 21:13:43 -0400
    77.7 +From: Daniel Jacobowitz <drow at false dot org>
    77.8 +To: binutils at sources dot redhat dot com
    77.9 +Subject: Re: Handle SEC_LINK_DUPLICATES_SAME_CONTENTS for arm-linux
   77.10 +Message-ID: <20040821011342.GA30319@nevyn.them.org>
   77.11 +Mail-Followup-To: binutils at sources dot redhat dot com
   77.12 +References: <20040818145518.GA9774@nevyn.them.org> <20040819055040.GA11820@lucon.org> <20040819080034.GE21716@bubble.modra.org> <20040820173240.GA17678@nevyn.them.org> <20040821003737.GB16016@bubble.modra.org>
   77.13 +In-Reply-To: <20040821003737 dot GB16016 at bubble dot modra dot org>
   77.14 +
   77.15 +On Sat, Aug 21, 2004 at 10:07:38AM +0930, Alan Modra wrote:
   77.16 +> On Fri, Aug 20, 2004 at 01:32:40PM -0400, Daniel Jacobowitz wrote:
   77.17 +> > Thanks.  How's this?
   77.18 +> 
   77.19 +> As you might have guessed from my rather slack review of your previous
   77.20 +> patch, I trust you enough to give the OK without proper review.  But
   77.21 +> since you asked...  :)
   77.22 +
   77.23 +Checked in as so.
   77.24 +
   77.25 +-- 
   77.26 +Daniel Jacobowitz
   77.27 +
   77.28 +[ rediffed against binutils-2.15.91.0.2, with some elbow grease ]
   77.29 +
   77.30 +2004-08-20  Daniel Jacobowitz  <dan@debian.org>
   77.31 +
   77.32 +	* elflink.c (_bfd_elf_section_already_linked): Handle
   77.33 +	SEC_LINK_DUPLICATES_SAME_CONTENTS.
   77.34 +--- binutils-2.15.91.0.2/bfd/elflink.c.old	2004-07-27 21:36:08.000000000 -0700
   77.35 ++++ binutils-2.15.91.0.2/bfd/elflink.c	2004-08-26 06:38:07.000000000 -0700
   77.36 +@@ -9359,6 +9359,35 @@
   77.37 + 		  (_("%s: %s: warning: duplicate section `%s' has different size\n"),
   77.38 + 		   bfd_archive_filename (abfd), name);
   77.39 + 	      break;
   77.40 ++	    case SEC_LINK_DUPLICATES_SAME_CONTENTS:
   77.41 ++	      if (sec->size != l->sec->size)
   77.42 ++		(*_bfd_error_handler)
   77.43 ++		  (_("%B: duplicate section `%A' has different size\n"),
   77.44 ++		   bfd_archive_filename (abfd), sec);
   77.45 ++	      else if (sec->size != 0)
   77.46 ++		{
   77.47 ++		  bfd_byte *sec_contents, *l_sec_contents;
   77.48 ++
   77.49 ++		  if (!bfd_malloc_and_get_section (abfd, sec, &sec_contents))
   77.50 ++		    (*_bfd_error_handler)
   77.51 ++		      (_("%B: warning: could not read contents of section `%A'\n"),
   77.52 ++		       bfd_archive_filename (abfd), sec);
   77.53 ++		  else if (!bfd_malloc_and_get_section (l->sec->owner, l->sec,
   77.54 ++							&l_sec_contents))
   77.55 ++		    (*_bfd_error_handler)
   77.56 ++		      (_("%B: warning: could not read contents of section `%A'\n"),
   77.57 ++		       bfd_archive_filename(l->sec->owner), l->sec);
   77.58 ++		  else if (memcmp (sec_contents, l_sec_contents, sec->size) != 0)
   77.59 ++		    (*_bfd_error_handler)
   77.60 ++		      (_("%B: warning: duplicate section `%A' has different contents\n"),
   77.61 ++		       bfd_archive_filename (abfd), sec);
   77.62 ++
   77.63 ++		  if (sec_contents)
   77.64 ++		    free (sec_contents);
   77.65 ++		  if (l_sec_contents)
   77.66 ++		    free (l_sec_contents);
   77.67 ++		}
   77.68 ++	      break;
   77.69 + 	    }
   77.70 + 
   77.71 + 	  /* Set the output_section field so that lang_add_section
    78.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    78.2 +++ b/patches/binutils/2.15.91.0.2/binutils-skip-comments.patch	Sat Feb 24 11:00:05 2007 +0000
    78.3 @@ -0,0 +1,101 @@
    78.4 +Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
    78.5 +Fixes
    78.6 +localealias.s:544: Error: junk at end of line, first unrecognized character is `,' 
    78.7 +when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
    78.8 +
    78.9 +Paths adjusted to match crosstool's patcher.
   78.10 +
   78.11 +Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
   78.12 +From: Andreas Schwab <schwab at suse dot de>
   78.13 +To: Nathan Sidwell <nathan at codesourcery dot com>
   78.14 +Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
   78.15 +Date: Fri, 23 Apr 2004 22:27:19 +0200
   78.16 +Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
   78.17 +
   78.18 +Nathan Sidwell <nathan@codesourcery.com> writes:
   78.19 +
   78.20 +> Index: read.c
   78.21 +> ===================================================================
   78.22 +> RCS file: /cvs/src/src/gas/read.c,v
   78.23 +> retrieving revision 1.76
   78.24 +> diff -c -3 -p -r1.76 read.c
   78.25 +> *** read.c	12 Mar 2004 17:48:12 -0000	1.76
   78.26 +> --- read.c	18 Mar 2004 09:56:05 -0000
   78.27 +> *************** read_a_source_file (char *name)
   78.28 +> *** 1053,1059 ****
   78.29 +>   #endif
   78.30 +>   	  input_line_pointer--;
   78.31 +>   	  /* Report unknown char as ignored.  */
   78.32 +> ! 	  ignore_rest_of_line ();
   78.33 +>   	}
   78.34 +>   
   78.35 +>   #ifdef md_after_pass_hook
   78.36 +> --- 1053,1059 ----
   78.37 +>   #endif
   78.38 +>   	  input_line_pointer--;
   78.39 +>   	  /* Report unknown char as ignored.  */
   78.40 +> ! 	  demand_empty_rest_of_line ();
   78.41 +>   	}
   78.42 +>   
   78.43 +>   #ifdef md_after_pass_hook
   78.44 +
   78.45 +This means that the unknown character is no longer ignored, despite the
   78.46 +comment.  As a side effect a line starting with a line comment character
   78.47 +not followed by APP in NO_APP mode now triggers an error instead of just a
   78.48 +warning, breaking builds of glibc on m68k-linux.  Earlier in
   78.49 +read_a_source_file where #APP is handled there is another comment that
   78.50 +claims that unknown comments are ignored, when in fact they aren't (only
   78.51 +the initial line comment character is skipped).
   78.52 +
   78.53 +Note that the presence of #APP will mess up the line counters, but
   78.54 +that appears to be difficult to fix.
   78.55 +
   78.56 +Andreas.
   78.57 +
   78.58 +2004-04-23  Andreas Schwab  <schwab@suse.de>
   78.59 +
   78.60 +	* read.c (read_a_source_file): Ignore unknown text after line
   78.61 +	comment character.  Fix misleading comment.
   78.62 +
   78.63 +--- binutils/gas/read.c.~1.78.~	2004-04-23 08:58:23.000000000 +0200
   78.64 ++++ binutils/gas/read.c	2004-04-23 21:49:01.000000000 +0200
   78.65 +@@ -1,6 +1,6 @@
   78.66 + /* read.c - read a source file -
   78.67 +    Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
   78.68 +-   1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
   78.69 ++   1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
   78.70 + 
   78.71 + This file is part of GAS, the GNU Assembler.
   78.72 + 
   78.73 +@@ -950,10 +950,14 @@ read_a_source_file (char *name)
   78.74 + 	      unsigned int new_length;
   78.75 + 	      char *tmp_buf = 0;
   78.76 + 
   78.77 +-	      bump_line_counters ();
   78.78 + 	      s = input_line_pointer;
   78.79 + 	      if (strncmp (s, "APP\n", 4))
   78.80 +-		continue;	/* We ignore it */
   78.81 ++		{
   78.82 ++		  /* We ignore it */
   78.83 ++		  ignore_rest_of_line ();
   78.84 ++		  continue;
   78.85 ++		}
   78.86 ++	      bump_line_counters ();
   78.87 + 	      s += 4;
   78.88 + 
   78.89 + 	      sb_new (&sbuf);
   78.90 +@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
   78.91 + 	    continue;
   78.92 + #endif
   78.93 + 	  input_line_pointer--;
   78.94 +-	  /* Report unknown char as ignored.  */
   78.95 ++	  /* Report unknown char as error.  */
   78.96 + 	  demand_empty_rest_of_line ();
   78.97 + 	}
   78.98 + 
   78.99 +
  78.100 +-- 
  78.101 +Andreas Schwab, SuSE Labs, schwab@suse.de
  78.102 +SuSE Linux AG, Maxfeldstra&#xC3;e 5, 90409 N&#xC3;rnberg, Germany
  78.103 +Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
  78.104 +"And now for something completely different."
    79.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    79.2 +++ b/patches/binutils/2.15/002-uclibc.patch	Sat Feb 24 11:00:05 2007 +0000
    79.3 @@ -0,0 +1,144 @@
    79.4 +diff -uNr binutils-2.15-pristine/bfd/configure binutils-2.15/bfd/configure
    79.5 +--- binutils-2.15-pristine/bfd/configure	2004-05-17 12:35:57.000000000 -0700
    79.6 ++++ binutils-2.15/bfd/configure	2004-07-19 16:36:19.000000000 -0700
    79.7 +@@ -1009,7 +1009,7 @@
    79.8 + bfd_version_string="\"${VERSION}\""
    79.9 + if test x${is_release} = x; then
   79.10 +   bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
   79.11 +-  bfd_version_string="\"${VERSION} ${bfd_version_date}\""
   79.12 ++  bfd_version_string="\"${VERSION} ${bfd_version_date} uClibc\""
   79.13 + fi
   79.14 + 
   79.15 + 
   79.16 +diff -uNr binutils-2.15-pristine/bfd/elf32-arm.h binutils-2.15/bfd/elf32-arm.h
   79.17 +--- binutils-2.15-pristine/bfd/elf32-arm.h	2004-05-17 12:35:58.000000000 -0700
   79.18 ++++ binutils-2.15/bfd/elf32-arm.h	2004-07-19 16:37:06.000000000 -0700
   79.19 +@@ -124,7 +124,7 @@
   79.20 + 
   79.21 + /* The name of the dynamic interpreter.  This is put in the .interp
   79.22 +    section.  */
   79.23 +-#define ELF_DYNAMIC_INTERPRETER     "/usr/lib/ld.so.1"
   79.24 ++#define ELF_DYNAMIC_INTERPRETER     "/lib/ld-uClibc.so.0"
   79.25 + 
   79.26 + #ifdef FOUR_WORD_PLT
   79.27 + 
   79.28 +diff -uNr binutils-2.15-pristine/bfd/elf32-cris.c binutils-2.15/bfd/elf32-cris.c
   79.29 +--- binutils-2.15-pristine/bfd/elf32-cris.c	2004-05-17 12:35:58.000000000 -0700
   79.30 ++++ binutils-2.15/bfd/elf32-cris.c	2004-07-19 16:49:59.000000000 -0700
   79.31 +@@ -536,7 +536,7 @@
   79.32 + /* The name of the dynamic interpreter.  This is put in the .interp
   79.33 +    section.  */
   79.34 + 
   79.35 +-#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
   79.36 ++#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
   79.37 + 
   79.38 + /* The size in bytes of an entry in the procedure linkage table.  */
   79.39 + 
   79.40 +diff -uNr binutils-2.15-pristine/bfd/elf32-frv.c binutils-2.15/bfd/elf32-frv.c
   79.41 +--- binutils-2.15-pristine/bfd/elf32-frv.c	2004-05-17 12:35:58.000000000 -0700
   79.42 ++++ binutils-2.15/bfd/elf32-frv.c	2004-07-19 16:49:59.000000000 -0700
   79.43 +@@ -2913,7 +2913,7 @@
   79.44 + /* The name of the dynamic interpreter.  This is put in the .interp
   79.45 +    section.  */
   79.46 + 
   79.47 +-#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
   79.48 ++#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
   79.49 + 
   79.50 + #define DEFAULT_STACK_SIZE 0x20000
   79.51 + 
   79.52 +diff -uNr binutils-2.15-pristine/bfd/elf32-hppa.c binutils-2.15/bfd/elf32-hppa.c
   79.53 +--- binutils-2.15-pristine/bfd/elf32-hppa.c	2004-05-17 12:35:58.000000000 -0700
   79.54 ++++ binutils-2.15/bfd/elf32-hppa.c	2004-07-19 16:49:59.000000000 -0700
   79.55 +@@ -115,7 +115,7 @@
   79.56 + 
   79.57 + #define PLT_ENTRY_SIZE 8
   79.58 + #define GOT_ENTRY_SIZE 4
   79.59 +-#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
   79.60 ++#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
   79.61 + 
   79.62 + static const bfd_byte plt_stub[] =
   79.63 + {
   79.64 +diff -uNr binutils-2.15-pristine/bfd/elf32-ppc.c binutils-2.15/bfd/elf32-ppc.c
   79.65 +--- binutils-2.15-pristine/bfd/elf32-ppc.c	2004-05-17 12:35:59.000000000 -0700
   79.66 ++++ binutils-2.15/bfd/elf32-ppc.c	2004-07-19 16:49:59.000000000 -0700
   79.67 +@@ -49,7 +49,7 @@
   79.68 + 
   79.69 + /* The name of the dynamic interpreter.  This is put in the .interp
   79.70 +    section.  */
   79.71 +-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
   79.72 ++#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
   79.73 + 
   79.74 + /* The size in bytes of an entry in the procedure linkage table.  */
   79.75 + #define PLT_ENTRY_SIZE 12
   79.76 +diff -uNr binutils-2.15-pristine/bfd/elf32-s390.c binutils-2.15/bfd/elf32-s390.c
   79.77 +--- binutils-2.15-pristine/bfd/elf32-s390.c	2004-05-17 12:35:59.000000000 -0700
   79.78 ++++ binutils-2.15/bfd/elf32-s390.c	2004-07-19 16:49:59.000000000 -0700
   79.79 +@@ -452,7 +452,7 @@
   79.80 + /* The name of the dynamic interpreter.  This is put in the .interp
   79.81 +    section.  */
   79.82 + 
   79.83 +-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
   79.84 ++#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
   79.85 + 
   79.86 + /* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
   79.87 +    copying dynamic variables from a shared lib into an app's dynbss
   79.88 +diff -uNr binutils-2.15-pristine/bfd/elf32-sparc.c binutils-2.15/bfd/elf32-sparc.c
   79.89 +--- binutils-2.15-pristine/bfd/elf32-sparc.c	2004-05-17 12:36:00.000000000 -0700
   79.90 ++++ binutils-2.15/bfd/elf32-sparc.c	2004-07-19 16:49:59.000000000 -0700
   79.91 +@@ -536,7 +536,7 @@
   79.92 + /* The name of the dynamic interpreter.  This is put in the .interp
   79.93 +    section.  */
   79.94 + 
   79.95 +-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
   79.96 ++#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
   79.97 + 
   79.98 + /* The nop opcode we use.  */
   79.99 + 
  79.100 +diff -uNr binutils-2.15-pristine/bfd/elf64-ppc.c binutils-2.15/bfd/elf64-ppc.c
  79.101 +--- binutils-2.15-pristine/bfd/elf64-ppc.c	2004-05-17 12:36:01.000000000 -0700
  79.102 ++++ binutils-2.15/bfd/elf64-ppc.c	2004-07-19 16:49:59.000000000 -0700
  79.103 +@@ -99,7 +99,7 @@
  79.104 + 
  79.105 + /* The name of the dynamic interpreter.  This is put in the .interp
  79.106 +    section.  */
  79.107 +-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
  79.108 ++#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
  79.109 + 
  79.110 + /* The size in bytes of an entry in the procedure linkage table.  */
  79.111 + #define PLT_ENTRY_SIZE 24
  79.112 +diff -uNr binutils-2.15-pristine/bfd/elf64-s390.c binutils-2.15/bfd/elf64-s390.c
  79.113 +--- binutils-2.15-pristine/bfd/elf64-s390.c	2004-05-17 12:36:01.000000000 -0700
  79.114 ++++ binutils-2.15/bfd/elf64-s390.c	2004-07-19 16:49:59.000000000 -0700
  79.115 +@@ -473,7 +473,7 @@
  79.116 + /* The name of the dynamic interpreter.  This is put in the .interp
  79.117 +    section.  */
  79.118 + 
  79.119 +-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
  79.120 ++#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
  79.121 + 
  79.122 + /* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
  79.123 +    copying dynamic variables from a shared lib into an app's dynbss
  79.124 +diff -uNr binutils-2.15-pristine/bfd/elf-m10300.c binutils-2.15/bfd/elf-m10300.c
  79.125 +--- binutils-2.15-pristine/bfd/elf-m10300.c	2004-05-17 12:35:57.000000000 -0700
  79.126 ++++ binutils-2.15/bfd/elf-m10300.c	2004-07-19 16:49:59.000000000 -0700
  79.127 +@@ -4026,7 +4026,7 @@
  79.128 + /* The name of the dynamic interpreter.  This is put in the .interp
  79.129 +    section.  */
  79.130 + 
  79.131 +-#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
  79.132 ++#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
  79.133 + 
  79.134 + /* Create dynamic sections when linking against a dynamic object.  */
  79.135 + 
  79.136 +diff -uNr binutils-2.15-pristine/bfd/elfxx-ia64.c binutils-2.15/bfd/elfxx-ia64.c
  79.137 +--- binutils-2.15-pristine/bfd/elfxx-ia64.c	2004-05-17 12:36:02.000000000 -0700
  79.138 ++++ binutils-2.15/bfd/elfxx-ia64.c	2004-07-19 16:49:59.000000000 -0700
  79.139 +@@ -643,7 +643,7 @@
  79.140 +   0x60, 0x00, 0x80, 0x00               /*               br.few b6;;        */
  79.141 + };
  79.142 + 
  79.143 +-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
  79.144 ++#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
  79.145 + 
  79.146 + static const bfd_byte oor_brl[16] =
  79.147 + {
    80.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    80.2 +++ b/patches/binutils/2.15/100-uclibc-conf.patch	Sat Feb 24 11:00:05 2007 +0000
    80.3 @@ -0,0 +1,692 @@
    80.4 +diff -urN binutils-2.15-dist/bfd/config.bfd binutils-2.15/bfd/config.bfd
    80.5 +--- binutils-2.15-dist/bfd/config.bfd	2004-05-17 14:35:56.000000000 -0500
    80.6 ++++ binutils-2.15/bfd/config.bfd	2004-08-04 12:01:44.000000000 -0500
    80.7 +@@ -126,7 +126,7 @@
    80.8 +     targ_defvec=ecoffalpha_little_vec
    80.9 +     targ_selvecs=bfd_elf64_alpha_vec
   80.10 +     ;;
   80.11 +-  alpha*-*-linux-gnu* | alpha*-*-elf*)
   80.12 ++  alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
   80.13 +     targ_defvec=bfd_elf64_alpha_vec
   80.14 +     targ_selvecs=ecoffalpha_little_vec
   80.15 +     ;;
   80.16 +@@ -136,7 +136,7 @@
   80.17 +   alpha*-*-*)
   80.18 +     targ_defvec=ecoffalpha_little_vec
   80.19 +     ;;
   80.20 +-  ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
   80.21 ++  ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-linux-uclibc* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
   80.22 +     targ_defvec=bfd_elf64_ia64_little_vec
   80.23 +     targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
   80.24 +     ;;
   80.25 +@@ -213,7 +213,7 @@
   80.26 +     targ_defvec=bfd_elf32_littlearm_vec
   80.27 +     targ_selvecs=bfd_elf32_bigarm_vec
   80.28 +     ;;
   80.29 +-  armeb-*-elf | arm*b-*-linux-gnu*)
   80.30 ++  armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
   80.31 +     targ_defvec=bfd_elf32_bigarm_vec
   80.32 +     targ_selvecs=bfd_elf32_littlearm_vec
   80.33 +     ;;
   80.34 +@@ -221,7 +221,7 @@
   80.35 +     targ_defvec=bfd_elf32_littlearm_vec
   80.36 +     targ_selvecs=bfd_elf32_bigarm_vec
   80.37 +     ;;
   80.38 +-  arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
   80.39 ++  arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | arm*-*-conix* | \
   80.40 +   arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
   80.41 +     targ_defvec=bfd_elf32_littlearm_vec
   80.42 +     targ_selvecs=bfd_elf32_bigarm_vec
   80.43 +@@ -360,7 +360,7 @@
   80.44 +     ;;
   80.45 + 
   80.46 + #ifdef BFD64
   80.47 +-  hppa*64*-*-linux-gnu*)
   80.48 ++  hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
   80.49 +     targ_defvec=bfd_elf64_hppa_linux_vec
   80.50 +     targ_selvecs=bfd_elf64_hppa_vec
   80.51 +     ;;
   80.52 +@@ -371,7 +371,7 @@
   80.53 +     ;;
   80.54 + #endif
   80.55 + 
   80.56 +-  hppa*-*-linux-gnu* | hppa*-*-netbsd*)
   80.57 ++  hppa*-*-linux-gnu* | hppa*-*-linux-uclibc* | hppa*-*-netbsd*)
   80.58 +     targ_defvec=bfd_elf32_hppa_linux_vec
   80.59 +     targ_selvecs=bfd_elf32_hppa_vec
   80.60 +     ;;
   80.61 +@@ -494,7 +494,7 @@
   80.62 +     targ_selvecs=bfd_elf32_i386_vec
   80.63 +     targ_underscore=yes
   80.64 +     ;;
   80.65 +-  i[3-7]86-*-linux-gnu*)
   80.66 ++  i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
   80.67 +     targ_defvec=bfd_elf32_i386_vec
   80.68 +     targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
   80.69 +     targ64_selvecs=bfd_elf64_x86_64_vec
   80.70 +@@ -508,7 +508,7 @@
   80.71 +     targ_defvec=bfd_elf64_x86_64_vec
   80.72 +     targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
   80.73 +     ;;
   80.74 +-  x86_64-*-linux-gnu*)
   80.75 ++  x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
   80.76 +     targ_defvec=bfd_elf64_x86_64_vec
   80.77 +     targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
   80.78 +     ;;
   80.79 +@@ -683,7 +683,7 @@
   80.80 +     targ_selvecs=bfd_elf32_m68k_vec
   80.81 +     targ_underscore=yes
   80.82 +     ;;
   80.83 +-  m68*-*-linux-gnu*)
   80.84 ++  m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
   80.85 +     targ_defvec=bfd_elf32_m68k_vec
   80.86 +     targ_selvecs=m68klinux_vec
   80.87 +     ;;
   80.88 +@@ -955,7 +955,8 @@
   80.89 +     ;;
   80.90 + #endif
   80.91 +   powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
   80.92 +-  powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
   80.93 ++  powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \
   80.94 ++  powerpc-*-rtems* | \
   80.95 +   powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
   80.96 +     targ_defvec=bfd_elf32_powerpc_vec
   80.97 +     targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
   80.98 +@@ -987,8 +988,8 @@
   80.99 +     targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
  80.100 +     ;;
  80.101 +   powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
  80.102 +-  powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
  80.103 +-  powerpcle-*-rtems*)
  80.104 ++  powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* |\
  80.105 ++  powerpcle-*-vxworks* | powerpcle-*-rtems*)
  80.106 +     targ_defvec=bfd_elf32_powerpcle_vec
  80.107 +     targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
  80.108 +     targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
  80.109 +@@ -1149,7 +1150,7 @@
  80.110 +     targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
  80.111 +     targ_underscore=yes
  80.112 +     ;;
  80.113 +-  sparc-*-linux-gnu*)
  80.114 ++  sparc-*-linux-gnu* | sparc-*-linux-uclibc*)
  80.115 +     targ_defvec=bfd_elf32_sparc_vec
  80.116 +     targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
  80.117 +     ;;
  80.118 +@@ -1196,7 +1197,7 @@
  80.119 +     targ_defvec=sunos_big_vec
  80.120 +     targ_underscore=yes
  80.121 +     ;;
  80.122 +-  sparc64-*-linux-gnu*)
  80.123 ++  sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)
  80.124 +     targ_defvec=bfd_elf64_sparc_vec
  80.125 +     targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
  80.126 +     ;;
  80.127 +@@ -1265,7 +1266,7 @@
  80.128 +     targ_underscore=yes
  80.129 +     ;;
  80.130 + 
  80.131 +-  vax-*-linux-gnu*)
  80.132 ++  vax-*-linux-gnu* | vax-*-linux-uclibc*)
  80.133 +     targ_defvec=bfd_elf32_vax_vec
  80.134 +     ;;
  80.135 + 
  80.136 +diff -urN binutils-2.15-dist/bfd/configure binutils-2.15/bfd/configure
  80.137 +--- binutils-2.15-dist/bfd/configure	2004-05-17 14:35:57.000000000 -0500
  80.138 ++++ binutils-2.15/bfd/configure	2004-08-04 12:01:44.000000000 -0500
  80.139 +@@ -1699,6 +1699,11 @@
  80.140 +   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  80.141 +   ;;
  80.142 + 
  80.143 ++linux-uclibc*)
  80.144 ++  lt_cv_deplibs_check_method=pass_all
  80.145 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  80.146 ++  ;;
  80.147 ++
  80.148 + netbsd*)
  80.149 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  80.150 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  80.151 +@@ -5278,7 +5283,7 @@
  80.152 +   alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
  80.153 + 	COREFILE=''
  80.154 + 	;;
  80.155 +-  alpha*-*-linux-gnu*)
  80.156 ++  alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
  80.157 + 	COREFILE=trad-core.lo
  80.158 + 	TRAD_HEADER='"hosts/alphalinux.h"'
  80.159 + 	;;
  80.160 +@@ -5338,7 +5343,7 @@
  80.161 + 	COREFILE=trad-core.lo
  80.162 + 	TRAD_HEADER='"hosts/i386mach3.h"'
  80.163 + 	;;
  80.164 +-  i[3-7]86-*-linux-gnu*)
  80.165 ++  i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
  80.166 + 	COREFILE=trad-core.lo
  80.167 + 	TRAD_HEADER='"hosts/i386linux.h"'
  80.168 + 	;;
  80.169 +@@ -5376,7 +5381,7 @@
  80.170 + 	COREFILE=trad-core.lo
  80.171 + 	TRAD_HEADER='"hosts/hp300bsd.h"'
  80.172 + 	;;
  80.173 +-  m68*-*-linux-gnu*)
  80.174 ++  m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
  80.175 + 	COREFILE=trad-core.lo
  80.176 + 	TRAD_HEADER='"hosts/m68klinux.h"'
  80.177 + 	;;
  80.178 +@@ -5477,7 +5482,7 @@
  80.179 + 	COREFILE=trad-core.lo
  80.180 + 	TRAD_HEADER='"hosts/vaxult2.h"'
  80.181 + 	;;
  80.182 +-  vax-*-linux-gnu*)
  80.183 ++  vax-*-linux-gnu* | vax-*-linux-uclibc*)
  80.184 + 	COREFILE=trad-core.lo
  80.185 + 	TRAD_HEADER='"hosts/vaxlinux.h"'
  80.186 + 	;;
  80.187 +diff -urN binutils-2.15-dist/bfd/configure.in binutils-2.15/bfd/configure.in
  80.188 +--- binutils-2.15-dist/bfd/configure.in	2004-05-17 14:35:57.000000000 -0500
  80.189 ++++ binutils-2.15/bfd/configure.in	2004-08-04 12:01:44.000000000 -0500
  80.190 +@@ -178,7 +178,7 @@
  80.191 +   alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
  80.192 + 	COREFILE=''
  80.193 + 	;;
  80.194 +-  alpha*-*-linux-gnu*)
  80.195 ++  alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
  80.196 + 	COREFILE=trad-core.lo
  80.197 + 	TRAD_HEADER='"hosts/alphalinux.h"'
  80.198 + 	;;
  80.199 +@@ -259,7 +259,7 @@
  80.200 + 	TRAD_HEADER='"hosts/i386mach3.h"'
  80.201 + 	;;
  80.202 + changequote(,)dnl
  80.203 +-  i[3-7]86-*-linux-gnu*)
  80.204 ++  i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
  80.205 + changequote([,])dnl
  80.206 + 	COREFILE=trad-core.lo
  80.207 + 	TRAD_HEADER='"hosts/i386linux.h"'
  80.208 +@@ -300,7 +300,7 @@
  80.209 + 	COREFILE=trad-core.lo
  80.210 + 	TRAD_HEADER='"hosts/hp300bsd.h"'
  80.211 + 	;;
  80.212 +-  m68*-*-linux-gnu*)
  80.213 ++  m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
  80.214 + 	COREFILE=trad-core.lo
  80.215 + 	TRAD_HEADER='"hosts/m68klinux.h"'
  80.216 + 	;;
  80.217 +@@ -385,7 +385,7 @@
  80.218 + 	COREFILE=trad-core.lo
  80.219 + 	TRAD_HEADER='"hosts/vaxult2.h"'
  80.220 + 	;;
  80.221 +-  vax-*-linux-gnu*)
  80.222 ++  vax-*-linux-gnu* | vax-*-linux-uclibc*)
  80.223 + 	COREFILE=trad-core.lo
  80.224 + 	TRAD_HEADER='"hosts/vaxlinux.h"'
  80.225 + 	;;
  80.226 +diff -urN binutils-2.15-dist/binutils/configure binutils-2.15/binutils/configure
  80.227 +--- binutils-2.15-dist/binutils/configure	2004-01-02 11:08:04.000000000 -0600
  80.228 ++++ binutils-2.15/binutils/configure	2004-08-04 12:01:44.000000000 -0500
  80.229 +@@ -1585,6 +1585,11 @@
  80.230 +   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  80.231 +   ;;
  80.232 + 
  80.233 ++linux-uclibc*)
  80.234 ++  lt_cv_deplibs_check_method=pass_all
  80.235 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  80.236 ++  ;;
  80.237 ++
  80.238 + netbsd*)
  80.239 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  80.240 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  80.241 +diff -urN binutils-2.15-dist/configure binutils-2.15/configure
  80.242 +--- binutils-2.15-dist/configure	2004-05-17 14:36:20.000000000 -0500
  80.243 ++++ binutils-2.15/configure	2004-08-04 12:01:44.000000000 -0500
  80.244 +@@ -1288,6 +1288,18 @@
  80.245 +   i[3456789]86-*-freebsd* | i[3456789]86-*-kfreebsd*-gnu)
  80.246 +     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
  80.247 +     ;;
  80.248 ++  i[3456789]86-*-linux-uclibc*)
  80.249 ++    # This section makes it possible to build newlib natively on linux.
  80.250 ++    # If we are using a cross compiler then don't configure newlib.
  80.251 ++    if test x${is_cross_compiler} != xno ; then
  80.252 ++      noconfigdirs="$noconfigdirs target-newlib"
  80.253 ++    fi
  80.254 ++    noconfigdirs="$noconfigdirs target-libgloss"
  80.255 ++    # If we are not using a cross compiler, do configure newlib.
  80.256 ++    # Note however, that newlib will only be configured in this situation
  80.257 ++    # if the --with-newlib option has been given, because otherwise
  80.258 ++    # 'target-newlib' will appear in skipdirs.
  80.259 ++    ;;
  80.260 +   i[3456789]86-*-linux*)
  80.261 +     # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
  80.262 +     # not build java stuff by default.
  80.263 +diff -urN binutils-2.15-dist/configure.in binutils-2.15/configure.in
  80.264 +--- binutils-2.15-dist/configure.in	2004-05-17 14:40:54.000000000 -0500
  80.265 ++++ binutils-2.15/configure.in	2004-08-04 12:01:44.000000000 -0500
  80.266 +@@ -521,6 +521,18 @@
  80.267 +   i[[3456789]]86-*-freebsd* | i[[3456789]]86-*-kfreebsd*-gnu)
  80.268 +     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
  80.269 +     ;;
  80.270 ++  i[[3456789]]86-*-linux-uclibc*)
  80.271 ++    # This section makes it possible to build newlib natively on linux.
  80.272 ++    # If we are using a cross compiler then don't configure newlib.
  80.273 ++    if test x${is_cross_compiler} != xno ; then
  80.274 ++      noconfigdirs="$noconfigdirs target-newlib"
  80.275 ++    fi
  80.276 ++    noconfigdirs="$noconfigdirs target-libgloss"
  80.277 ++    # If we are not using a cross compiler, do configure newlib.
  80.278 ++    # Note however, that newlib will only be configured in this situation
  80.279 ++    # if the --with-newlib option has been given, because otherwise
  80.280 ++    # 'target-newlib' will appear in skipdirs.
  80.281 ++    ;;
  80.282 +   i[[3456789]]86-*-linux*)
  80.283 +     # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
  80.284 +     # not build java stuff by default.
  80.285 +diff -urN binutils-2.15-dist/gas/configure binutils-2.15/gas/configure
  80.286 +--- binutils-2.15-dist/gas/configure	2004-05-17 14:36:07.000000000 -0500
  80.287 ++++ binutils-2.15/gas/configure	2004-08-04 12:07:50.000000000 -0500
  80.288 +@@ -3400,6 +3400,11 @@
  80.289 +   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  80.290 +   ;;
  80.291 + 
  80.292 ++linux-uclibc*)
  80.293 ++  lt_cv_deplibs_check_method=pass_all
  80.294 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  80.295 ++  ;;
  80.296 ++
  80.297 + netbsd*)
  80.298 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  80.299 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  80.300 +@@ -4224,6 +4229,7 @@
  80.301 +       alpha*-*-osf*)			fmt=ecoff ;;
  80.302 +       alpha*-*-linuxecoff*)		fmt=ecoff ;;
  80.303 +       alpha*-*-linux-gnu*)		fmt=elf em=linux ;;
  80.304 ++      alpha*-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.305 +       alpha*-*-netbsd*)			fmt=elf em=nbsd ;;
  80.306 +       alpha*-*-openbsd*)		fmt=elf em=obsd ;;
  80.307 + 
  80.308 +@@ -4240,6 +4246,7 @@
  80.309 +       arm*-*-conix*)			fmt=elf ;;
  80.310 +       arm-*-linux*aout*)		fmt=aout em=linux ;;
  80.311 +       arm*-*-linux-gnu*)		fmt=elf  em=linux ;;
  80.312 ++      arm*-*-linux-uclibc*)		fmt=elf  em=linux ;;
  80.313 +       arm*-*-uclinux*)			fmt=elf  em=linux ;;
  80.314 +       arm-*-netbsdelf*)                 fmt=elf  em=nbsd ;;
  80.315 +       arm-*-*n*bsd*)			fmt=aout em=nbsd ;;
  80.316 +@@ -4253,6 +4260,7 @@
  80.317 +       avr-*-*)				fmt=elf ;;
  80.318 + 
  80.319 +       cris-*-linux-gnu*)		fmt=multi bfd_gas=yes em=linux ;;
  80.320 ++      cris-*-linux-uclibc*)		fmt=multi bfd_gas=yes em=linux ;;
  80.321 +       cris-*-*)				fmt=multi bfd_gas=yes ;;
  80.322 + 
  80.323 +       d10v-*-*)				fmt=elf ;;
  80.324 +@@ -4310,7 +4318,9 @@
  80.325 +       i386-*-linux*oldld)		fmt=aout em=linux ;;
  80.326 +       i386-*-linux*coff*)		fmt=coff em=linux ;;
  80.327 +       i386-*-linux-gnu*)		fmt=elf em=linux ;;
  80.328 ++      i386-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.329 +       x86_64-*-linux-gnu*)		fmt=elf em=linux ;;
  80.330 ++      x86_64-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.331 +       i386-*-lynxos*)			fmt=coff em=lynx ;;
  80.332 +       i386-*-sysv[45]*)			fmt=elf ;;
  80.333 +       i386-*-solaris*)			fmt=elf ;;
  80.334 +@@ -4370,6 +4380,7 @@
  80.335 +       ia64-*-elf*)			fmt=elf ;;
  80.336 +       ia64-*-aix*)			fmt=elf em=ia64aix ;;
  80.337 +       ia64-*-linux-gnu*)		fmt=elf em=linux ;;
  80.338 ++      ia64-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.339 +       ia64-*-hpux*)			fmt=elf em=hpux ;;
  80.340 +       ia64-*-netbsd*)			fmt=elf em=nbsd ;;
  80.341 + 
  80.342 +@@ -4397,6 +4408,7 @@
  80.343 +       m68k-*-hpux*)			fmt=hp300 em=hp300 ;;
  80.344 +       m68k-*-linux*aout*)		fmt=aout em=linux ;;
  80.345 +       m68k-*-linux-gnu*)		fmt=elf em=linux ;;
  80.346 ++      m68k-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.347 +       m68k-*-uclinux*)			fmt=elf ;;
  80.348 +       m68k-*-gnu*)			fmt=elf ;;
  80.349 +       m68k-*-lynxos*)			fmt=coff em=lynx ;;
  80.350 +@@ -4459,6 +4471,7 @@
  80.351 +       ppc-*-beos*)			fmt=coff ;;
  80.352 +       ppc-*-*n*bsd* | ppc-*-elf*)	fmt=elf ;;
  80.353 +       ppc-*-eabi* | ppc-*-sysv4*)	fmt=elf ;;
  80.354 ++      ppc-*-linux-uclibc* | \
  80.355 +       ppc-*-linux-gnu*)			fmt=elf em=linux
  80.356 + 	    case "$endian" in
  80.357 + 		big)  ;;
  80.358 +@@ -4486,7 +4499,9 @@
  80.359 +       ppc-*-kaos*)			fmt=elf ;;
  80.360 + 
  80.361 +       s390x-*-linux-gnu*)		fmt=elf em=linux ;;
  80.362 ++      s390x-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.363 +       s390-*-linux-gnu*)		fmt=elf em=linux ;;
  80.364 ++      s390-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.365 + 
  80.366 +       sh*-*-linux*)			fmt=elf em=linux
  80.367 + 	    case ${cpu} in
  80.368 +@@ -4519,6 +4534,7 @@
  80.369 +       sparc-*-coff)			fmt=coff ;;
  80.370 +       sparc-*-linux*aout*)		fmt=aout em=linux ;;
  80.371 +       sparc-*-linux-gnu*)		fmt=elf em=linux ;;
  80.372 ++      sparc-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.373 +       sparc-*-lynxos*)			fmt=coff em=lynx ;;
  80.374 +       sparc-fujitsu-none)		fmt=aout ;;
  80.375 +       sparc-*-elf)			fmt=elf ;;
  80.376 +diff -urN binutils-2.15-dist/gas/configure.in binutils-2.15/gas/configure.in
  80.377 +--- binutils-2.15-dist/gas/configure.in	2004-05-17 14:36:07.000000000 -0500
  80.378 ++++ binutils-2.15/gas/configure.in	2004-08-04 12:07:21.000000000 -0500
  80.379 +@@ -194,6 +194,7 @@
  80.380 +       alpha*-*-osf*)			fmt=ecoff ;;
  80.381 +       alpha*-*-linuxecoff*)		fmt=ecoff ;;
  80.382 +       alpha*-*-linux-gnu*)		fmt=elf em=linux ;;
  80.383 ++      alpha*-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.384 +       alpha*-*-netbsd*)			fmt=elf em=nbsd ;;
  80.385 +       alpha*-*-openbsd*)		fmt=elf em=obsd ;;
  80.386 + 
  80.387 +@@ -210,6 +211,7 @@
  80.388 +       arm*-*-conix*)			fmt=elf ;;
  80.389 +       arm-*-linux*aout*)		fmt=aout em=linux ;;
  80.390 +       arm*-*-linux-gnu*)		fmt=elf  em=linux ;;
  80.391 ++      arm*-*-linux-uclibc*)		fmt=elf  em=linux ;;
  80.392 +       arm*-*-uclinux*)			fmt=elf  em=linux ;;
  80.393 +       arm-*-netbsdelf*)                 fmt=elf  em=nbsd ;;
  80.394 +       arm-*-*n*bsd*)			fmt=aout em=nbsd ;;
  80.395 +@@ -223,6 +225,7 @@
  80.396 +       avr-*-*)				fmt=elf ;;
  80.397 + 
  80.398 +       cris-*-linux-gnu*)		fmt=multi bfd_gas=yes em=linux ;;
  80.399 ++      cris-*-linux-uclibc*)		fmt=multi bfd_gas=yes em=linux ;;
  80.400 +       cris-*-*)				fmt=multi bfd_gas=yes ;;
  80.401 + 
  80.402 +       d10v-*-*)				fmt=elf ;;
  80.403 +@@ -280,7 +283,9 @@
  80.404 +       i386-*-linux*oldld)		fmt=aout em=linux ;;
  80.405 +       i386-*-linux*coff*)		fmt=coff em=linux ;;
  80.406 +       i386-*-linux-gnu*)		fmt=elf em=linux ;;
  80.407 ++      i386-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.408 +       x86_64-*-linux-gnu*)		fmt=elf em=linux ;;
  80.409 ++      x86_64-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.410 +       i386-*-lynxos*)			fmt=coff em=lynx ;;
  80.411 + changequote(,)dnl
  80.412 +       i386-*-sysv[45]*)			fmt=elf ;;
  80.413 +@@ -333,6 +338,7 @@
  80.414 +       ia64-*-elf*)			fmt=elf ;;
  80.415 +       ia64-*-aix*)			fmt=elf em=ia64aix ;;
  80.416 +       ia64-*-linux-gnu*)		fmt=elf em=linux ;;
  80.417 ++      ia64-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.418 +       ia64-*-hpux*)			fmt=elf em=hpux ;;
  80.419 +       ia64-*-netbsd*)			fmt=elf em=nbsd ;;
  80.420 + 
  80.421 +@@ -360,6 +366,7 @@
  80.422 +       m68k-*-hpux*)			fmt=hp300 em=hp300 ;;
  80.423 +       m68k-*-linux*aout*)		fmt=aout em=linux ;;
  80.424 +       m68k-*-linux-gnu*)		fmt=elf em=linux ;;
  80.425 ++      m68k-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.426 +       m68k-*-uclinux*)			fmt=elf ;;
  80.427 +       m68k-*-gnu*)			fmt=elf ;;
  80.428 +       m68k-*-lynxos*)			fmt=coff em=lynx ;;
  80.429 +@@ -419,6 +426,7 @@
  80.430 +       ppc-*-beos*)			fmt=coff ;;
  80.431 +       ppc-*-*n*bsd* | ppc-*-elf*)	fmt=elf ;;
  80.432 +       ppc-*-eabi* | ppc-*-sysv4*)	fmt=elf ;;
  80.433 ++      ppc-*-linux-uclibc* | \
  80.434 +       ppc-*-linux-gnu*)			fmt=elf em=linux
  80.435 + 	    case "$endian" in
  80.436 + 		big)  ;;
  80.437 +@@ -439,7 +447,9 @@
  80.438 +       ppc-*-kaos*)			fmt=elf ;;
  80.439 + 
  80.440 +       s390x-*-linux-gnu*)		fmt=elf em=linux ;;
  80.441 ++      s390x-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.442 +       s390-*-linux-gnu*)		fmt=elf em=linux ;;
  80.443 ++      s390-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.444 + 
  80.445 +       sh*-*-linux*)			fmt=elf em=linux
  80.446 + 	    case ${cpu} in
  80.447 +@@ -472,6 +482,7 @@
  80.448 +       sparc-*-coff)			fmt=coff ;;
  80.449 +       sparc-*-linux*aout*)		fmt=aout em=linux ;;
  80.450 +       sparc-*-linux-gnu*)		fmt=elf em=linux ;;
  80.451 ++      sparc-*-linux-uclibc*)		fmt=elf em=linux ;;
  80.452 +       sparc-*-lynxos*)			fmt=coff em=lynx ;;
  80.453 +       sparc-fujitsu-none)		fmt=aout ;;
  80.454 +       sparc-*-elf)			fmt=elf ;;
  80.455 +diff -urN binutils-2.15-dist/gprof/configure binutils-2.15/gprof/configure
  80.456 +--- binutils-2.15-dist/gprof/configure	2003-08-26 12:19:19.000000000 -0500
  80.457 ++++ binutils-2.15/gprof/configure	2004-08-04 12:01:45.000000000 -0500
  80.458 +@@ -1581,6 +1581,11 @@
  80.459 +   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  80.460 +   ;;
  80.461 + 
  80.462 ++linux-uclibc*)
  80.463 ++  lt_cv_deplibs_check_method=pass_all
  80.464 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  80.465 ++  ;;
  80.466 ++
  80.467 + netbsd*)
  80.468 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  80.469 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  80.470 +diff -urN binutils-2.15-dist/ld/configure binutils-2.15/ld/configure
  80.471 +--- binutils-2.15-dist/ld/configure	2003-04-24 07:36:07.000000000 -0500
  80.472 ++++ binutils-2.15/ld/configure	2004-08-04 12:01:45.000000000 -0500
  80.473 +@@ -1589,6 +1589,11 @@
  80.474 +   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  80.475 +   ;;
  80.476 + 
  80.477 ++linux-uclibc*)
  80.478 ++  lt_cv_deplibs_check_method=pass_all
  80.479 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  80.480 ++  ;;
  80.481 ++
  80.482 + netbsd*)
  80.483 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  80.484 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  80.485 +diff -urN binutils-2.15-dist/ld/configure.tgt binutils-2.15/ld/configure.tgt
  80.486 +--- binutils-2.15-dist/ld/configure.tgt	2004-05-17 14:36:15.000000000 -0500
  80.487 ++++ binutils-2.15/ld/configure.tgt	2004-08-04 12:01:45.000000000 -0500
  80.488 +@@ -30,6 +30,7 @@
  80.489 + 			targ_extra_emuls="criself crislinux"
  80.490 + 			targ_extra_libpath=$targ_extra_emuls ;;
  80.491 + cris-*-linux-gnu*)	targ_emul=crislinux ;;
  80.492 ++cris-*-linux-uclibc*)	targ_emul=crislinux ;;
  80.493 + cris-*-*)		targ_emul=criself
  80.494 + 			targ_extra_emuls="crisaout crislinux"
  80.495 + 			targ_extra_libpath=$targ_extra_emuls ;;
  80.496 +@@ -59,14 +60,16 @@
  80.497 + 			tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
  80.498 + 			tdir_sun4=sparc-sun-sunos4
  80.499 + 			;;
  80.500 +-sparc64-*-linux-gnu*)	targ_emul=elf64_sparc
  80.501 ++sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)	 \
  80.502 ++			targ_emul=elf64_sparc
  80.503 + 			targ_extra_emuls="elf32_sparc sparclinux sun4"
  80.504 + 			targ_extra_libpath=elf32_sparc
  80.505 + 			tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
  80.506 + 			tdir_sparclinux=${tdir_elf32_sparc}aout
  80.507 + 			tdir_sun4=sparc-sun-sunos4
  80.508 + 			;;
  80.509 +-sparc*-*-linux-gnu*)	targ_emul=elf32_sparc
  80.510 ++sparc*-*-linux-gnu* | sparc*-*-linux-uclibc*) \
  80.511 ++			targ_emul=elf32_sparc
  80.512 + 			targ_extra_emuls="sparclinux elf64_sparc sun4"
  80.513 + 			targ_extra_libpath=elf64_sparc
  80.514 + 			tdir_sparclinux=${targ_alias}aout
  80.515 +@@ -118,7 +121,9 @@
  80.516 + m32r*le-*-elf*)         targ_emul=m32rlelf ;;
  80.517 + m32r*-*-elf*)           targ_emul=m32relf ;;
  80.518 + m32r*le-*-linux-gnu*)   targ_emul=m32rlelf_linux ;;
  80.519 ++m32r*le-*-linux-uclibc*) targ_emul=m32rlelf_linux ;;
  80.520 + m32r*-*-linux-gnu*)     targ_emul=m32relf_linux ;;
  80.521 ++m32r*-*-linux-uclibc*)  targ_emul=m32relf_linux ;;
  80.522 + m68hc11-*-*|m6811-*-*)	targ_emul=m68hc11elf 
  80.523 + 			targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
  80.524 + m68hc12-*-*|m6812-*-*)	targ_emul=m68hc12elf 
  80.525 +@@ -128,7 +133,7 @@
  80.526 + m68*-ericsson-ose)	targ_emul=sun3 ;;
  80.527 + m68*-apple-aux*)	targ_emul=m68kaux ;;
  80.528 + *-tandem-none)		targ_emul=st2000 ;;
  80.529 +-i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;;
  80.530 ++i370-*-elf* | i370-*-linux-gnu* | i370-*-linux-uclibc*) targ_emul=elf32i370 ;;
  80.531 + i[3-7]86-*-nto-qnx*)	targ_emul=i386nto ;;
  80.532 + i[3-7]86-*-vsta)	targ_emul=vsta ;;
  80.533 + i[3-7]86-go32-rtems*)	targ_emul=i386go32 ;;
  80.534 +@@ -152,14 +157,16 @@
  80.535 + 			tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
  80.536 + 			;;
  80.537 + i[3-7]86-*-linux*oldld)	targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
  80.538 +-i[3-7]86-*-linux-gnu*)	targ_emul=elf_i386
  80.539 ++i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) \
  80.540 ++			targ_emul=elf_i386
  80.541 + 			targ_extra_emuls=i386linux
  80.542 + 			if test x${want64} = xtrue; then
  80.543 + 			  targ_extra_emuls="$targ_extra_emuls elf_x86_64"
  80.544 + 			fi
  80.545 + 			tdir_i386linux=${targ_alias}aout
  80.546 + 			;;
  80.547 +-x86_64-*-linux-gnu*)	targ_emul=elf_x86_64
  80.548 ++x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*) \
  80.549 ++			targ_emul=elf_x86_64
  80.550 + 			targ_extra_emuls="elf_i386 i386linux"
  80.551 + 			targ_extra_libpath=elf_i386
  80.552 + 			tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
  80.553 +@@ -259,10 +266,13 @@
  80.554 + arm9e-*-elf)		targ_emul=armelf ;;
  80.555 + arm-*-oabi)		targ_emul=armelf_oabi ;;
  80.556 + arm*b-*-linux-gnu*)	targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
  80.557 ++arm*b-*-linux-uclibc*)	targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
  80.558 + arm*-*-linux-gnu*)	targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
  80.559 ++arm*-*-linux-uclibc*)	targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
  80.560 + arm*-*-uclinux*)	targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
  80.561 + arm*-*-conix*)		targ_emul=armelf ;;
  80.562 +-thumb-*-linux-gnu* | thumb-*-uclinux*)	targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
  80.563 ++thumb-*-linux-gnu* | thumb-*-linux-uclibc* | thumb-*-uclinux*) \
  80.564 ++			targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
  80.565 + strongarm-*-coff)	targ_emul=armcoff ;;
  80.566 + strongarm-*-elf)	targ_emul=armelf ;;
  80.567 + strongarm-*-kaos*)	targ_emul=armelf ;;
  80.568 +@@ -364,7 +374,8 @@
  80.569 + 			targ_extra_emuls=m68kelf
  80.570 + 			tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'`
  80.571 + 			;;
  80.572 +-m68k-*-linux-gnu*)	targ_emul=m68kelf
  80.573 ++m68k-*-linux-gnu* | m68k-*-linux-uclibc*) \
  80.574 ++			targ_emul=m68kelf
  80.575 + 			targ_extra_emuls=m68klinux
  80.576 + 			tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'`
  80.577 + 			;;
  80.578 +@@ -381,9 +392,9 @@
  80.579 + m68*-*-psos*)		targ_emul=m68kpsos ;;
  80.580 + m68*-*-rtemscoff*)	targ_emul=m68kcoff ;;
  80.581 + m68*-*-rtems*)		targ_emul=m68kelf ;;
  80.582 +-hppa*64*-*-linux-gnu*)	targ_emul=hppa64linux ;;
  80.583 ++hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)  targ_emul=hppa64linux ;;
  80.584 + hppa*64*-*)		targ_emul=elf64hppa ;;
  80.585 +-hppa*-*-linux-gnu*)	targ_emul=hppalinux ;;
  80.586 ++hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*)	targ_emul=hppalinux ;;
  80.587 + hppa*-*-*elf*)		targ_emul=hppaelf ;;
  80.588 + hppa*-*-lites*)		targ_emul=hppaelf ;;
  80.589 + hppa*-*-netbsd*)	targ_emul=hppanbsd ;;
  80.590 +@@ -396,6 +407,7 @@
  80.591 + 			targ_emul=vaxnbsd
  80.592 + 			targ_extra_emuls=elf32vax ;;
  80.593 + vax-*-linux-gnu*)	targ_emul=elf32vax ;;
  80.594 ++vax-*-linux-uclibc*)	targ_emul=elf32vax ;;
  80.595 + mips*-*-pe)		targ_emul=mipspe ;
  80.596 + 			targ_extra_ofiles="deffilep.o pe-dll.o" ;;
  80.597 + mips*-dec-ultrix*)	targ_emul=mipslit ;;
  80.598 +@@ -429,16 +441,16 @@
  80.599 + mips*-*-vxworks*)	targ_emul=elf32ebmip
  80.600 + 		        targ_extra_emuls="elf32elmip" ;;
  80.601 + mips*-*-windiss)	targ_emul=elf32mipswindiss ;;
  80.602 +-mips64*el-*-linux-gnu*)	targ_emul=elf32ltsmipn32
  80.603 ++mips64*el-*-linux-gnu* | mips64*el-*-linux-uclibc*)	targ_emul=elf32ltsmipn32
  80.604 + 			targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
  80.605 + 			;;
  80.606 +-mips64*-*-linux-gnu*)	targ_emul=elf32btsmipn32
  80.607 ++mips64*-*-linux-gnu* | mips64*-*-linux-uclibc*)	targ_emul=elf32btsmipn32
  80.608 + 			targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
  80.609 + 			;;
  80.610 +-mips*el-*-linux-gnu*)	targ_emul=elf32ltsmip
  80.611 ++mips*el-*-linux-gnu* | mips*el-*-linux-uclibc*)	targ_emul=elf32ltsmip
  80.612 + 			targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
  80.613 + 			;;
  80.614 +-mips*-*-linux-gnu*)	targ_emul=elf32btsmip
  80.615 ++mips*-*-linux-gnu* | mips*-*-linux-uclibc*)	targ_emul=elf32btsmip
  80.616 + 			targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
  80.617 + 			;;
  80.618 + mips*-*-lnews*)		targ_emul=mipslnews ;;
  80.619 +@@ -461,6 +473,10 @@
  80.620 + alpha*-*-linux-gnu*)	targ_emul=elf64alpha targ_extra_emuls=alpha
  80.621 + 			tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
  80.622 + 			;;
  80.623 ++alpha*-*-linux-uclibc*)	targ_emul=elf64alpha targ_extra_emuls=alpha
  80.624 ++			# The following needs to be checked...
  80.625 ++			tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
  80.626 ++			;;
  80.627 + alpha*-*-osf*)		targ_emul=alpha ;;
  80.628 + alpha*-*-gnu*)		targ_emul=elf64alpha ;;
  80.629 + alpha*-*-netware*)	targ_emul=alpha ;;
  80.630 +diff -urN binutils-2.15-dist/libtool.m4 binutils-2.15/libtool.m4
  80.631 +--- binutils-2.15-dist/libtool.m4	2003-04-10 22:58:39.000000000 -0500
  80.632 ++++ binutils-2.15/libtool.m4	2004-08-04 12:01:45.000000000 -0500
  80.633 +@@ -645,6 +645,11 @@
  80.634 +   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  80.635 +   ;;
  80.636 + 
  80.637 ++linux-uclibc*)
  80.638 ++  lt_cv_deplibs_check_method=pass_all
  80.639 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  80.640 ++  ;;
  80.641 ++
  80.642 + netbsd*)
  80.643 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  80.644 +     [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
  80.645 +diff -urN binutils-2.15-dist/ltconfig binutils-2.15/ltconfig
  80.646 +--- binutils-2.15-dist/ltconfig	2003-10-03 23:54:47.000000000 -0500
  80.647 ++++ binutils-2.15/ltconfig	2004-08-04 12:01:45.000000000 -0500
  80.648 +@@ -603,6 +603,7 @@
  80.649 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
  80.650 + case $host_os in
  80.651 + linux-gnu*) ;;
  80.652 ++linux-uclibc*) ;;
  80.653 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
  80.654 + esac
  80.655 + 
  80.656 +@@ -1259,6 +1260,24 @@
  80.657 +   dynamic_linker='GNU/Linux ld.so'
  80.658 +   ;;
  80.659 + 
  80.660 ++linux-uclibc*)
  80.661 ++  version_type=linux
  80.662 ++  need_lib_prefix=no
  80.663 ++  need_version=no
  80.664 ++  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  80.665 ++  soname_spec='${libname}${release}.so$major'
  80.666 ++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  80.667 ++  shlibpath_var=LD_LIBRARY_PATH
  80.668 ++  shlibpath_overrides_runpath=no
  80.669 ++  # This implies no fast_install, which is unacceptable.
  80.670 ++  # Some rework will be needed to allow for fast_install
  80.671 ++  # before this can be enabled.
  80.672 ++  # Note: copied from linux-gnu, and may not be appropriate.
  80.673 ++  hardcode_into_libs=yes
  80.674 ++  # Assume using the uClibc dynamic linker.
  80.675 ++  dynamic_linker="uClibc ld.so"
  80.676 ++  ;;
  80.677 ++
  80.678 + netbsd*)
  80.679 +   need_lib_prefix=no
  80.680 +   need_version=no
  80.681 +diff -urN binutils-2.15-dist/opcodes/configure binutils-2.15/opcodes/configure
  80.682 +--- binutils-2.15-dist/opcodes/configure	2003-08-05 04:39:31.000000000 -0500
  80.683 ++++ binutils-2.15/opcodes/configure	2004-08-04 12:01:45.000000000 -0500
  80.684 +@@ -1700,6 +1700,11 @@
  80.685 +   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  80.686 +   ;;
  80.687 + 
  80.688 ++linux-uclibc*)
  80.689 ++  lt_cv_deplibs_check_method=pass_all
  80.690 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  80.691 ++  ;;
  80.692 ++
  80.693 + netbsd*)
  80.694 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  80.695 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
    81.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    81.2 +++ b/patches/binutils/2.15/210-cflags.patch	Sat Feb 24 11:00:05 2007 +0000
    81.3 @@ -0,0 +1,32 @@
    81.4 +diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.am binutils-2.14.90.0.6.new/bfd/doc/Makefile.am
    81.5 +--- binutils-2.14.90.0.6/bfd/doc/Makefile.am	2003-07-23 10:08:09.000000000 -0500
    81.6 ++++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.am	2004-03-01 16:05:16.000000000 -0600
    81.7 +@@ -55,10 +55,10 @@
    81.8 + MKDOC = chew$(EXEEXT_FOR_BUILD)
    81.9 + 
   81.10 + $(MKDOC): chew.o
   81.11 +-	$(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
   81.12 ++	$(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS)
   81.13 + 
   81.14 + chew.o: chew.c
   81.15 +-	$(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
   81.16 ++	$(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
   81.17 + 
   81.18 + protos: libbfd.h libcoff.h bfd.h
   81.19 + 
   81.20 +diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.in binutils-2.14.90.0.6.new/bfd/doc/Makefile.in
   81.21 +--- binutils-2.14.90.0.6/bfd/doc/Makefile.in	2003-07-23 10:08:09.000000000 -0500
   81.22 ++++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.in	2004-03-01 16:05:03.000000000 -0600
   81.23 +@@ -469,10 +469,10 @@
   81.24 + 
   81.25 + 
   81.26 + $(MKDOC): chew.o
   81.27 +-	$(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
   81.28 ++	$(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS)
   81.29 + 
   81.30 + chew.o: chew.c
   81.31 +-	$(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
   81.32 ++	$(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
   81.33 + 
   81.34 + protos: libbfd.h libcoff.h bfd.h
   81.35 + 
    82.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    82.2 +++ b/patches/binutils/2.15/400-mips-ELF_MAXPAGESIZE-4K.patch	Sat Feb 24 11:00:05 2007 +0000
    82.3 @@ -0,0 +1,26 @@
    82.4 +--- binutils/bfd/elf32-mips.c~
    82.5 ++++ binutils/bfd/elf32-mips.c
    82.6 +@@ -1611,7 +1611,9 @@
    82.7 + 
    82.8 + /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
    82.9 +    page sizes of up to that limit, so we need to respect it.  */
   82.10 +-#define ELF_MAXPAGESIZE			0x10000
   82.11 ++/*#define ELF_MAXPAGESIZE			0x10000*/
   82.12 ++/* Use 4K to shrink the elf header.  NOT for general use! */
   82.13 ++#define ELF_MAXPAGESIZE			0x1000
   82.14 + #define elf32_bed			elf32_tradbed
   82.15 + 
   82.16 + /* Include the target file again for this target.  */
   82.17 +--- binutils/bfd/elfn32-mips.c~
   82.18 ++++ binutils/bfd/elfn32-mips.c
   82.19 +@@ -1976,7 +1976,9 @@
   82.20 + 
   82.21 + /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
   82.22 +    page sizes of up to that limit, so we need to respect it.  */
   82.23 +-#define ELF_MAXPAGESIZE			0x10000
   82.24 ++/*#define ELF_MAXPAGESIZE			0x10000*/
   82.25 ++/* Use 4K to shrink the elf header.  NOT for general use! */
   82.26 ++#define ELF_MAXPAGESIZE			0x1000
   82.27 + #define elf32_bed			elf32_tradbed
   82.28 + 
   82.29 + /* Include the target file again for this target.  */
    83.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    83.2 +++ b/patches/binutils/2.15/600-arm-textrel.patch	Sat Feb 24 11:00:05 2007 +0000
    83.3 @@ -0,0 +1,63 @@
    83.4 +http://sources.redhat.com/ml/binutils/2004-06/msg00010.html
    83.5 +--- binutils-2.15.90.0.3-old/bfd/elf32-arm.h	2004-04-12 14:56:33.000000000 -0500
    83.6 ++++ binutils-2.15.90.0.3/bfd/elf32-arm.h	2004-09-03 06:56:40.000000000 -0500
    83.7 +@@ -87,6 +87,8 @@
    83.8 + #endif
    83.9 + static bfd_boolean allocate_dynrelocs 
   83.10 +   PARAMS ((struct elf_link_hash_entry *h, PTR inf));
   83.11 ++static bfd_boolean elf32_arm_readonly_dynrelocs
   83.12 ++  PARAMS ((struct elf_link_hash_entry *, PTR));
   83.13 + static bfd_boolean create_got_section 
   83.14 +   PARAMS ((bfd * dynobj, struct bfd_link_info * info));
   83.15 + static bfd_boolean elf32_arm_create_dynamic_sections 
   83.16 +@@ -3531,6 +3533,37 @@
   83.17 +   return TRUE;
   83.18 + }
   83.19 + 
   83.20 ++/* Find any dynamic relocs that apply to read-only sections.  */
   83.21 ++
   83.22 ++static bfd_boolean
   83.23 ++elf32_arm_readonly_dynrelocs (h, inf)
   83.24 ++     struct elf_link_hash_entry *h;
   83.25 ++     PTR inf;
   83.26 ++{
   83.27 ++  struct elf32_arm_link_hash_entry *eh;
   83.28 ++  struct elf32_arm_relocs_copied *p;
   83.29 ++
   83.30 ++  if (h->root.type == bfd_link_hash_warning)
   83.31 ++    h = (struct elf_link_hash_entry *) h->root.u.i.link;
   83.32 ++
   83.33 ++  eh = (struct elf32_arm_link_hash_entry *) h;
   83.34 ++  for (p = eh->relocs_copied; p != NULL; p = p->next)
   83.35 ++    {
   83.36 ++      asection *s = p->section;
   83.37 ++
   83.38 ++      if (s != NULL && (s->flags & SEC_READONLY) != 0)
   83.39 ++       {
   83.40 ++         struct bfd_link_info *info = (struct bfd_link_info *) inf;
   83.41 ++
   83.42 ++         info->flags |= DF_TEXTREL;
   83.43 ++
   83.44 ++         /* Not an error, just cut short the traversal.  */
   83.45 ++         return FALSE;
   83.46 ++       }
   83.47 ++    }
   83.48 ++  return TRUE;
   83.49 ++}
   83.50 ++
   83.51 + /* Set the sizes of the dynamic sections.  */
   83.52 + 
   83.53 + static bfd_boolean
   83.54 +@@ -3740,6 +3773,12 @@
   83.55 + 	    return FALSE;
   83.56 + 	}
   83.57 + 
   83.58 ++      /* If any dynamic relocs apply to a read-only section,
   83.59 ++         then we need a DT_TEXTREL entry.  */
   83.60 ++      if ((info->flags & DF_TEXTREL) == 0)
   83.61 ++        elf_link_hash_traverse (&htab->root, elf32_arm_readonly_dynrelocs,
   83.62 ++                                (PTR) info);
   83.63 ++
   83.64 +       if ((info->flags & DF_TEXTREL) != 0)
   83.65 + 	{
   83.66 + 	  if (!add_dynamic_entry (DT_TEXTREL, 0))
    84.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    84.2 +++ b/patches/binutils/2.15/bfd-hash-tweak.patch	Sat Feb 24 11:00:05 2007 +0000
    84.3 @@ -0,0 +1,24 @@
    84.4 +Signed-off-by: dank@kegel.com
    84.5 +
    84.6 +Raising the size of the hash table is a noticable win when linking 
    84.7 +at least one large app.  
    84.8 +
    84.9 +There was a patch,
   84.10 +http://sources.redhat.com/ml/binutils/2004-06/msg00165.html
   84.11 +to do this dynamically.  No idea why that didn't make it in.
   84.12 +So this tiny change to raise the default size is just
   84.13 +a stopgap for now.
   84.14 +
   84.15 +
   84.16 +--- binutils-2.15/bfd/hash.c.old	2003-12-01 01:33:01.000000000 -0500
   84.17 ++++ binutils-2.15/bfd/hash.c	2006-03-01 16:26:26.701991000 -0500
   84.18 +@@ -295,7 +295,7 @@
   84.19 + */
   84.20 + 
   84.21 + /* The default number of entries to use when creating a hash table.  */
   84.22 +-#define DEFAULT_SIZE (4051)
   84.23 ++#define DEFAULT_SIZE (32749)
   84.24 + 
   84.25 + /* Create a new hash table, given a number of entries.  */
   84.26 + 
   84.27 +
    85.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    85.2 +++ b/patches/binutils/2.15/binutils-2.15-allow-gcc-4.0.patch	Sat Feb 24 11:00:05 2007 +0000
    85.3 @@ -0,0 +1,75 @@
    85.4 +Fix found here: http://www.freelists.org/archives/openbeos/11-2005/msg00090.html
    85.5 +
    85.6 +Fixes:
    85.7 +In file included from ./targ-cpu.h:1,
    85.8 +                 from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/config/obj-elf.h:42,
    85.9 +                 from ./obj-format.h:1,
   85.10 +                 from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/config/te-linux.h:4,
   85.11 +                 from ./targ-env.h:1,
   85.12 +                 from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/as.h:626,
   85.13 +                 from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/app.c:30:
   85.14 +/home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/config/tc-i386.h:451: error: array type has incomplete element type
   85.15 +make[3]: *** [app.o] Error 1
   85.16 +make[3]: Leaving directory `/home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/build-binutils/gas'
   85.17 +
   85.18 +when building binutils-2.15 with gcc-4.0
   85.19 +
   85.20 +
   85.21 +diff -ur binutils-2.15.old/gas/as.h binutils-2.15/gas/as.h
   85.22 +--- binutils-2.15.old/gas/as.h	2003-11-22 18:14:21.000000000 -0800
   85.23 ++++ binutils-2.15/gas/as.h	2006-02-14 22:05:35.000000000 -0800
   85.24 +@@ -605,7 +605,26 @@
   85.25 + struct expressionS;
   85.26 + struct fix;
   85.27 + typedef struct symbol symbolS;
   85.28 +-struct relax_type;
   85.29 ++
   85.30 ++/* JF moved this here from as.h under the theory that nobody except MACHINE.c
   85.31 ++   and write.c care about it anyway.  */
   85.32 ++/* [zooey]: the above no longer holds with gcc4, as it keeps bugging about
   85.33 ++            incomplete element types in arrays, if relax_type isn't defined
   85.34 ++            here. So I moved the definition back from tc.h to here. */
   85.35 ++struct relax_type
   85.36 ++{
   85.37 ++  /* Forward reach. Signed number. > 0.  */
   85.38 ++  long rlx_forward;
   85.39 ++  /* Backward reach. Signed number. < 0.  */
   85.40 ++  long rlx_backward;
   85.41 ++
   85.42 ++  /* Bytes length of this address.  */
   85.43 ++  unsigned char rlx_length;
   85.44 ++
   85.45 ++  /* Next longer relax-state.  0 means there is no 'next' relax-state.  */
   85.46 ++  relax_substateT rlx_more;
   85.47 ++};
   85.48 ++
   85.49 + typedef struct frag fragS;
   85.50 + 
   85.51 + #ifdef BFD_ASSEMBLER
   85.52 +diff -ur binutils-2.15.old/gas/tc.h binutils-2.15/gas/tc.h
   85.53 +--- binutils-2.15.old/gas/tc.h	2003-12-03 15:39:38.000000000 -0800
   85.54 ++++ binutils-2.15/gas/tc.h	2006-02-14 22:03:35.000000000 -0800
   85.55 +@@ -24,23 +24,6 @@
   85.56 + 
   85.57 + extern const pseudo_typeS md_pseudo_table[];
   85.58 + 
   85.59 +-/* JF moved this here from as.h under the theory that nobody except MACHINE.c
   85.60 +-   and write.c care about it anyway.  */
   85.61 +-
   85.62 +-struct relax_type
   85.63 +-{
   85.64 +-  /* Forward reach. Signed number. > 0.  */
   85.65 +-  long rlx_forward;
   85.66 +-  /* Backward reach. Signed number. < 0.  */
   85.67 +-  long rlx_backward;
   85.68 +-
   85.69 +-  /* Bytes length of this address.  */
   85.70 +-  unsigned char rlx_length;
   85.71 +-
   85.72 +-  /* Next longer relax-state.  0 means there is no 'next' relax-state.  */
   85.73 +-  relax_substateT rlx_more;
   85.74 +-};
   85.75 +-
   85.76 + typedef struct relax_type relax_typeS;
   85.77 + 
   85.78 + extern const int md_reloc_size;	/* Size of a relocation record */
    86.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    86.2 +++ b/patches/binutils/2.15/binutils-2.15-psignal.patch	Sat Feb 24 11:00:05 2007 +0000
    86.3 @@ -0,0 +1,40 @@
    86.4 +Make psignal prototype in libiberty match that in glibc.
    86.5 +
    86.6 +Fixes:
    86.7 +
    86.8 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c: In function `psignal':
    86.9 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `signo' doesn't match prototype
   86.10 +/usr/include/signal.h:131: prototype declaration
   86.11 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `message' doesn't match prototype
   86.12 +/usr/include/signal.h:131: prototype declaration
   86.13 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:568: warning: comparison between signed and unsigned
   86.14 +mprotect... make[1]: *** [strsignal.o] Error 1
   86.15 +make[1]: Leaving directory `/export/hda3/dkegel/queue/jobdir.produser_cpsm17/crosstool-0.32/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/build-binutils/libiberty'
   86.16 +make: *** [all-libiberty] Error 2
   86.17 +
   86.18 +when building on red hat 7.1
   86.19 +though it's a bit of a mystery why libiberty's psignal is being compiled at
   86.20 +all, since red hat 7.1's glibc supports psignal (hence the error message)
   86.21 +
   86.22 +--- binutils-2.15/libiberty/strsignal.c.old	2005-04-18 13:57:40.000000000 -0700
   86.23 ++++ binutils-2.15/libiberty/strsignal.c	2005-04-18 13:59:09.000000000 -0700
   86.24 +@@ -544,7 +544,7 @@
   86.25 + 
   86.26 + /*
   86.27 + 
   86.28 +-@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
   86.29 ++@deftypefn Supplemental void psignal (int @var{signo}, const char *@var{message})
   86.30 + 
   86.31 + Print @var{message} to the standard error, followed by a colon,
   86.32 + followed by the description of the signal specified by @var{signo},
   86.33 +@@ -557,9 +557,7 @@
   86.34 + #ifndef HAVE_PSIGNAL
   86.35 + 
   86.36 + void
   86.37 +-psignal (signo, message)
   86.38 +-  unsigned signo;
   86.39 +-  char *message;
   86.40 ++psignal (int signo, const char *message)
   86.41 + {
   86.42 +   if (signal_names == NULL)
   86.43 +     {
    87.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    87.2 +++ b/patches/binutils/2.15/binutils-2.15-solaris-qsort.patch	Sat Feb 24 11:00:05 2007 +0000
    87.3 @@ -0,0 +1,22 @@
    87.4 +See http://sources.redhat.com/ml/binutils/2004-06/msg00114.html
    87.5 +
    87.6 +--- src/bfd/elflink.c.org	2004-07-05 09:11:42.920597000 -0400
    87.7 ++++ src/bfd/elflink.c	2004-07-05 09:12:59.240847000 -0400
    87.8 +@@ -2700,7 +2700,7 @@
    87.9 +     return vdiff > 0 ? 1 : -1;
   87.10 +   else
   87.11 +     {
   87.12 +-      long sdiff = h1->root.u.def.section - h2->root.u.def.section;
   87.13 ++      long sdiff = h1->root.u.def.section->id - h2->root.u.def.section->id;
   87.14 +       if (sdiff != 0)
   87.15 + 	return sdiff > 0 ? 1 : -1;
   87.16 +     }
   87.17 +@@ -3954,7 +3954,7 @@
   87.18 + 		i = idx + 1;
   87.19 + 	      else
   87.20 + 		{
   87.21 +-		  long sdiff = slook - h->root.u.def.section;
   87.22 ++		  long sdiff = slook->id - h->root.u.def.section->id;
   87.23 + 		  if (sdiff < 0)
   87.24 + 		    j = idx;
   87.25 + 		  else if (sdiff > 0)
    88.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    88.2 +++ b/patches/binutils/2.15/binutils-2.15-vmx.patch	Sat Feb 24 11:00:05 2007 +0000
    88.3 @@ -0,0 +1,45 @@
    88.4 +Grabbed with
    88.5 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/opcodes/ppc-opc.c.diff?r1=1.70&r2=1.71&cvsroot=src'
    88.6 +See 
    88.7 +http://mail.gnu.org/archive/html/bug-binutils/2004-05/msg00071.html
    88.8 +and
    88.9 +http://sources.redhat.com/ml/binutils-cvs/2004-05/msg00111.html
   88.10 +
   88.11 +This fixes problems like
   88.12 +{standard input}: Assembler messages:
   88.13 +{standard input}:1: Error: Unrecognized opcode: `dssall' 
   88.14 +which show up in binutils-2.15 when building the Linux kernel,
   88.15 +or possibly failed compilations when building setjmp/longjmp in glibc.
   88.16 +
   88.17 +An alternative fix would be to pass -many to the assembler.
   88.18 +A patch to do that for glibc is at
   88.19 +wget 'http://sources.redhat.com/cgi-bin/get-raw-msg?listname=libc-alpha&date=2004-05&msgid=40B36E8C.9030609%40us.ibm.com'
   88.20 +Yet another, better, fix would be for gcc to generate assembly
   88.21 +that told the assembler which processor type to use.
   88.22 +Presumably the Linux kernel sources would need a fix, too.
   88.23 +Probably better to just fix binutils to accept sources that it used to.
   88.24 +
   88.25 +
   88.26 +===================================================================
   88.27 +RCS file: /cvs/src/src/opcodes/ppc-opc.c,v
   88.28 +retrieving revision 1.70
   88.29 +retrieving revision 1.71
   88.30 +diff -u -r1.70 -r1.71
   88.31 +--- src/opcodes/ppc-opc.c	2004/05/05 13:43:36	1.70
   88.32 ++++ src/opcodes/ppc-opc.c	2004/05/19 05:11:48	1.71
   88.33 +@@ -1004,8 +1004,13 @@
   88.34 + 
   88.35 +   /* If only one bit of the FXM field is set, we can use the new form
   88.36 +      of the instruction, which is faster.  Unlike the Power4 branch hint
   88.37 +-     encoding, this is not backward compatible.  */
   88.38 +-  else if ((dialect & PPC_OPCODE_POWER4) != 0 && (value & -value) == value)
   88.39 ++     encoding, this is not backward compatible.  Do not generate the
   88.40 ++     new form unless -mpower4 has been given, or -many and the two
   88.41 ++     operand form of mfcr was used.  */
   88.42 ++  else if ((value & -value) == value
   88.43 ++	   && ((dialect & PPC_OPCODE_POWER4) != 0
   88.44 ++	       || ((dialect & PPC_OPCODE_ANY) != 0
   88.45 ++		   && (insn & (0x3ff << 1)) == 19 << 1)))
   88.46 +     insn |= 1 << 20;
   88.47 + 
   88.48 +   /* Any other value on mfcr is an error.  */
    89.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    89.2 +++ b/patches/binutils/2.15/binutils-arm-undef-imm.patch	Sat Feb 24 11:00:05 2007 +0000
    89.3 @@ -0,0 +1,51 @@
    89.4 +From http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/config/tc-arm.c.diff?r1=1.168&r2=1.169&cvsroot=src
    89.5 +See also http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2004-July/023128.html,
    89.6 +"[CRITICAL PATCH] 2.6: fix silent build error]"
    89.7 +
    89.8 +Revision 1.169, Fri Jul 2 11:12:29 2004 UTC (19 hours, 4 minutes ago) by nickc
    89.9 +Branch: MAIN
   89.10 +CVS Tags: binutils_latest_snapshot, HEAD
   89.11 +Changes since 1.168: +14 -1 lines
   89.12 +
   89.13 +(md_apply_fix3:BFD_RELOC_ARM_IMMEDIATE): Do not allow values which have come
   89.14 +from undefined symbols.
   89.15 +Always consider this fixup to have been processed as a reloc cannot be
   89.16 +generated for it.
   89.17 +
   89.18 +
   89.19 +===================================================================
   89.20 +RCS file: /cvs/src/src/gas/config/tc-arm.c,v
   89.21 +retrieving revision 1.168
   89.22 +retrieving revision 1.169
   89.23 +diff -u -r1.168 -r1.169
   89.24 +--- src/gas/config/tc-arm.c	2004/04/30 10:51:12	1.168
   89.25 ++++ src/gas/config/tc-arm.c	2004/07/02 11:12:29	1.169
   89.26 +@@ -12186,6 +12186,20 @@
   89.27 +   switch (fixP->fx_r_type)
   89.28 +     {
   89.29 +     case BFD_RELOC_ARM_IMMEDIATE:
   89.30 ++      /* We claim that this fixup has been processed here,
   89.31 ++	 even if in fact we generate an error because we do
   89.32 ++	 not have a reloc for it, so tc_gen_reloc will reject it.  */
   89.33 ++      fixP->fx_done = 1;
   89.34 ++
   89.35 ++      if (fixP->fx_addsy
   89.36 ++	  && ! S_IS_DEFINED (fixP->fx_addsy))
   89.37 ++	{
   89.38 ++	  as_bad_where (fixP->fx_file, fixP->fx_line,
   89.39 ++			_("undefined symbol %s used as an immediate value"),
   89.40 ++			S_GET_NAME (fixP->fx_addsy));
   89.41 ++	  break;
   89.42 ++	}
   89.43 ++
   89.44 +       newimm = validate_immediate (value);
   89.45 +       temp = md_chars_to_number (buf, INSN_SIZE);
   89.46 + 
   89.47 +@@ -12202,7 +12216,6 @@
   89.48 + 
   89.49 +       newimm |= (temp & 0xfffff000);
   89.50 +       md_number_to_chars (buf, (valueT) newimm, INSN_SIZE);
   89.51 +-      fixP->fx_done = 1;
   89.52 +       break;
   89.53 + 
   89.54 +     case BFD_RELOC_ARM_ADRL_IMMEDIATE:
    90.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    90.2 +++ b/patches/binutils/2.15/binutils-skip-comments.patch	Sat Feb 24 11:00:05 2007 +0000
    90.3 @@ -0,0 +1,101 @@
    90.4 +Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
    90.5 +Fixes
    90.6 +localealias.s:544: Error: junk at end of line, first unrecognized character is `,' 
    90.7 +when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
    90.8 +
    90.9 +Paths adjusted to match crosstool's patcher.
   90.10 +
   90.11 +Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
   90.12 +From: Andreas Schwab <schwab at suse dot de>
   90.13 +To: Nathan Sidwell <nathan at codesourcery dot com>
   90.14 +Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
   90.15 +Date: Fri, 23 Apr 2004 22:27:19 +0200
   90.16 +Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
   90.17 +
   90.18 +Nathan Sidwell <nathan@codesourcery.com> writes:
   90.19 +
   90.20 +> Index: read.c
   90.21 +> ===================================================================
   90.22 +> RCS file: /cvs/src/src/gas/read.c,v
   90.23 +> retrieving revision 1.76
   90.24 +> diff -c -3 -p -r1.76 read.c
   90.25 +> *** read.c	12 Mar 2004 17:48:12 -0000	1.76
   90.26 +> --- read.c	18 Mar 2004 09:56:05 -0000
   90.27 +> *************** read_a_source_file (char *name)
   90.28 +> *** 1053,1059 ****
   90.29 +>   #endif
   90.30 +>   	  input_line_pointer--;
   90.31 +>   	  /* Report unknown char as ignored.  */
   90.32 +> ! 	  ignore_rest_of_line ();
   90.33 +>   	}
   90.34 +>   
   90.35 +>   #ifdef md_after_pass_hook
   90.36 +> --- 1053,1059 ----
   90.37 +>   #endif
   90.38 +>   	  input_line_pointer--;
   90.39 +>   	  /* Report unknown char as ignored.  */
   90.40 +> ! 	  demand_empty_rest_of_line ();
   90.41 +>   	}
   90.42 +>   
   90.43 +>   #ifdef md_after_pass_hook
   90.44 +
   90.45 +This means that the unknown character is no longer ignored, despite the
   90.46 +comment.  As a side effect a line starting with a line comment character
   90.47 +not followed by APP in NO_APP mode now triggers an error instead of just a
   90.48 +warning, breaking builds of glibc on m68k-linux.  Earlier in
   90.49 +read_a_source_file where #APP is handled there is another comment that
   90.50 +claims that unknown comments are ignored, when in fact they aren't (only
   90.51 +the initial line comment character is skipped).
   90.52 +
   90.53 +Note that the presence of #APP will mess up the line counters, but
   90.54 +that appears to be difficult to fix.
   90.55 +
   90.56 +Andreas.
   90.57 +
   90.58 +2004-04-23  Andreas Schwab  <schwab@suse.de>
   90.59 +
   90.60 +	* read.c (read_a_source_file): Ignore unknown text after line
   90.61 +	comment character.  Fix misleading comment.
   90.62 +
   90.63 +--- binutils/gas/read.c.~1.78.~	2004-04-23 08:58:23.000000000 +0200
   90.64 ++++ binutils/gas/read.c	2004-04-23 21:49:01.000000000 +0200
   90.65 +@@ -1,6 +1,6 @@
   90.66 + /* read.c - read a source file -
   90.67 +    Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
   90.68 +-   1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
   90.69 ++   1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
   90.70 + 
   90.71 + This file is part of GAS, the GNU Assembler.
   90.72 + 
   90.73 +@@ -950,10 +950,14 @@ read_a_source_file (char *name)
   90.74 + 	      unsigned int new_length;
   90.75 + 	      char *tmp_buf = 0;
   90.76 + 
   90.77 +-	      bump_line_counters ();
   90.78 + 	      s = input_line_pointer;
   90.79 + 	      if (strncmp (s, "APP\n", 4))
   90.80 +-		continue;	/* We ignore it */
   90.81 ++		{
   90.82 ++		  /* We ignore it */
   90.83 ++		  ignore_rest_of_line ();
   90.84 ++		  continue;
   90.85 ++		}
   90.86 ++	      bump_line_counters ();
   90.87 + 	      s += 4;
   90.88 + 
   90.89 + 	      sb_new (&sbuf);
   90.90 +@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
   90.91 + 	    continue;
   90.92 + #endif
   90.93 + 	  input_line_pointer--;
   90.94 +-	  /* Report unknown char as ignored.  */
   90.95 ++	  /* Report unknown char as error.  */
   90.96 + 	  demand_empty_rest_of_line ();
   90.97 + 	}
   90.98 + 
   90.99 +
  90.100 +-- 
  90.101 +Andreas Schwab, SuSE Labs, schwab@suse.de
  90.102 +SuSE Linux AG, Maxfeldstra&#xC3;e 5, 90409 N&#xC3;rnberg, Germany
  90.103 +Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
  90.104 +"And now for something completely different."
    91.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    91.2 +++ b/patches/binutils/2.15/cross-gprof.patch	Sat Feb 24 11:00:05 2007 +0000
    91.3 @@ -0,0 +1,22 @@
    91.4 +--- binutils-2.15/configure.old	2004-07-21 21:36:47.000000000 -0700
    91.5 ++++ binutils-2.15/configure	2004-07-21 21:37:08.000000000 -0700
    91.6 +@@ -999,7 +999,7 @@
    91.7 + 
    91.8 + # Some tools are only suitable for building in a "native" situation.
    91.9 + # Remove these if host!=target.  
   91.10 +-native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
   91.11 ++native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
   91.12 + 
   91.13 + # Similarly, some are only suitable for cross toolchains.
   91.14 + # Remove these if host=target.
   91.15 +--- binutils-2.15/configure.in.old	2004-07-21 21:37:19.000000000 -0700
   91.16 ++++ binutils-2.15/configure.in	2004-07-21 21:37:34.000000000 -0700
   91.17 +@@ -236,7 +236,7 @@
   91.18 + 
   91.19 + # Some tools are only suitable for building in a "native" situation.
   91.20 + # Remove these if host!=target.  
   91.21 +-native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
   91.22 ++native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
   91.23 + 
   91.24 + # Similarly, some are only suitable for cross toolchains.
   91.25 + # Remove these if host=target.
    92.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    92.2 +++ b/patches/binutils/2.15/gccpr15247-fix.patch	Sat Feb 24 11:00:05 2007 +0000
    92.3 @@ -0,0 +1,192 @@
    92.4 +See
    92.5 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15247
    92.6 +
    92.7 +Fixes spurious error
    92.8 +/tmp/ccvNi4ou.s: Assembler messages:
    92.9 +/tmp/ccvNi4ou.s:2310: Error: Illegal operands: There are only 32 single precision f registers; [0-31]
   92.10 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc10/build/sparc64-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/math/dosincos.o] Error 1
   92.11 +
   92.12 +when compiling glibc's dosincos.c with gcc-3.4.0
   92.13 +
   92.14 +===================================================================
   92.15 +RCS file: /cvs/src/src/opcodes/sparc-opc.c,v
   92.16 +retrieving revision 1.9
   92.17 +retrieving revision 1.10
   92.18 +diff -u -r1.9 -r1.10
   92.19 +--- src/opcodes/sparc-opc.c	2004/01/18 23:46:32	1.9
   92.20 ++++ src/opcodes/sparc-opc.c	2004/04/20 10:23:51	1.10
   92.21 +@@ -1273,110 +1273,72 @@
   92.22 + #define FM_DF 2		/* v9 */
   92.23 + #define FM_QF 3		/* v9 */
   92.24 + 
   92.25 +-#define fmovicc(opcode, fpsize, cond, flags) /* v9 */ \
   92.26 +-{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z,f,g", flags, v9 }, \
   92.27 +-{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z,f,g", flags, v9 }
   92.28 +-
   92.29 +-#define fmovfcc(opcode, fpsize, fcond, flags) /* v9 */ \
   92.30 +-{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6,f,g", flags, v9 }, \
   92.31 +-{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7,f,g", flags, v9 }, \
   92.32 +-{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8,f,g", flags, v9 }, \
   92.33 +-{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9,f,g", flags, v9 }
   92.34 ++#define fmoviccx(opcode, fpsize, args, cond, flags) /* v9 */ \
   92.35 ++{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z," args, flags, v9 }, \
   92.36 ++{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z," args, flags, v9 }
   92.37 ++
   92.38 ++#define fmovfccx(opcode, fpsize, args, fcond, flags) /* v9 */ \
   92.39 ++{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags, v9 }, \
   92.40 ++{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags, v9 }, \
   92.41 ++{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags, v9 }, \
   92.42 ++{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags, v9 }
   92.43 + 
   92.44 + /* FIXME: use fmovicc/fmovfcc? */ /* v9 */
   92.45 +-#define fmovcc(opcode, fpsize, cond, fcond, flags) /* v9 */ \
   92.46 +-{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z,f,g", flags | F_FLOAT, v9 }, \
   92.47 +-{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6,f,g", flags | F_FLOAT, v9 }, \
   92.48 +-{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z,f,g", flags | F_FLOAT, v9 }, \
   92.49 +-{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7,f,g", flags | F_FLOAT, v9 }, \
   92.50 +-{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8,f,g", flags | F_FLOAT, v9 }, \
   92.51 +-{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9,f,g", flags | F_FLOAT, v9 }
   92.52 +-
   92.53 +-/* v9 */ fmovcc  ("fmovda",	FM_DF, CONDA, FCONDA, 0),
   92.54 +-/* v9 */ fmovcc  ("fmovqa",	FM_QF, CONDA, FCONDA, 0),
   92.55 +-/* v9 */ fmovcc  ("fmovsa",	FM_SF, CONDA, FCONDA, 0),
   92.56 +-/* v9 */ fmovicc ("fmovdcc",	FM_DF, CONDCC, 0),
   92.57 +-/* v9 */ fmovicc ("fmovqcc",	FM_QF, CONDCC, 0),
   92.58 +-/* v9 */ fmovicc ("fmovscc",	FM_SF, CONDCC, 0),
   92.59 +-/* v9 */ fmovicc ("fmovdcs",	FM_DF, CONDCS, 0),
   92.60 +-/* v9 */ fmovicc ("fmovqcs",	FM_QF, CONDCS, 0),
   92.61 +-/* v9 */ fmovicc ("fmovscs",	FM_SF, CONDCS, 0),
   92.62 +-/* v9 */ fmovcc  ("fmovde",	FM_DF, CONDE, FCONDE, 0),
   92.63 +-/* v9 */ fmovcc  ("fmovqe",	FM_QF, CONDE, FCONDE, 0),
   92.64 +-/* v9 */ fmovcc  ("fmovse",	FM_SF, CONDE, FCONDE, 0),
   92.65 +-/* v9 */ fmovcc  ("fmovdg",	FM_DF, CONDG, FCONDG, 0),
   92.66 +-/* v9 */ fmovcc  ("fmovqg",	FM_QF, CONDG, FCONDG, 0),
   92.67 +-/* v9 */ fmovcc  ("fmovsg",	FM_SF, CONDG, FCONDG, 0),
   92.68 +-/* v9 */ fmovcc  ("fmovdge",	FM_DF, CONDGE, FCONDGE, 0),
   92.69 +-/* v9 */ fmovcc  ("fmovqge",	FM_QF, CONDGE, FCONDGE, 0),
   92.70 +-/* v9 */ fmovcc  ("fmovsge",	FM_SF, CONDGE, FCONDGE, 0),
   92.71 +-/* v9 */ fmovicc ("fmovdgeu",	FM_DF, CONDGEU, F_ALIAS),
   92.72 +-/* v9 */ fmovicc ("fmovqgeu",	FM_QF, CONDGEU, F_ALIAS),
   92.73 +-/* v9 */ fmovicc ("fmovsgeu",	FM_SF, CONDGEU, F_ALIAS),
   92.74 +-/* v9 */ fmovicc ("fmovdgu",	FM_DF, CONDGU, 0),
   92.75 +-/* v9 */ fmovicc ("fmovqgu",	FM_QF, CONDGU, 0),
   92.76 +-/* v9 */ fmovicc ("fmovsgu",	FM_SF, CONDGU, 0),
   92.77 +-/* v9 */ fmovcc  ("fmovdl",	FM_DF, CONDL, FCONDL, 0),
   92.78 +-/* v9 */ fmovcc  ("fmovql",	FM_QF, CONDL, FCONDL, 0),
   92.79 +-/* v9 */ fmovcc  ("fmovsl",	FM_SF, CONDL, FCONDL, 0),
   92.80 +-/* v9 */ fmovcc  ("fmovdle",	FM_DF, CONDLE, FCONDLE, 0),
   92.81 +-/* v9 */ fmovcc  ("fmovqle",	FM_QF, CONDLE, FCONDLE, 0),
   92.82 +-/* v9 */ fmovcc  ("fmovsle",	FM_SF, CONDLE, FCONDLE, 0),
   92.83 +-/* v9 */ fmovicc ("fmovdleu",	FM_DF, CONDLEU, 0),
   92.84 +-/* v9 */ fmovicc ("fmovqleu",	FM_QF, CONDLEU, 0),
   92.85 +-/* v9 */ fmovicc ("fmovsleu",	FM_SF, CONDLEU, 0),
   92.86 +-/* v9 */ fmovfcc ("fmovdlg",	FM_DF, FCONDLG, 0),
   92.87 +-/* v9 */ fmovfcc ("fmovqlg",	FM_QF, FCONDLG, 0),
   92.88 +-/* v9 */ fmovfcc ("fmovslg",	FM_SF, FCONDLG, 0),
   92.89 +-/* v9 */ fmovicc ("fmovdlu",	FM_DF, CONDLU, F_ALIAS),
   92.90 +-/* v9 */ fmovicc ("fmovqlu",	FM_QF, CONDLU, F_ALIAS),
   92.91 +-/* v9 */ fmovicc ("fmovslu",	FM_SF, CONDLU, F_ALIAS),
   92.92 +-/* v9 */ fmovcc  ("fmovdn",	FM_DF, CONDN, FCONDN, 0),
   92.93 +-/* v9 */ fmovcc  ("fmovqn",	FM_QF, CONDN, FCONDN, 0),
   92.94 +-/* v9 */ fmovcc  ("fmovsn",	FM_SF, CONDN, FCONDN, 0),
   92.95 +-/* v9 */ fmovcc  ("fmovdne",	FM_DF, CONDNE, FCONDNE, 0),
   92.96 +-/* v9 */ fmovcc  ("fmovqne",	FM_QF, CONDNE, FCONDNE, 0),
   92.97 +-/* v9 */ fmovcc  ("fmovsne",	FM_SF, CONDNE, FCONDNE, 0),
   92.98 +-/* v9 */ fmovicc ("fmovdneg",	FM_DF, CONDNEG, 0),
   92.99 +-/* v9 */ fmovicc ("fmovqneg",	FM_QF, CONDNEG, 0),
  92.100 +-/* v9 */ fmovicc ("fmovsneg",	FM_SF, CONDNEG, 0),
  92.101 +-/* v9 */ fmovcc  ("fmovdnz",	FM_DF, CONDNZ, FCONDNZ, F_ALIAS),
  92.102 +-/* v9 */ fmovcc  ("fmovqnz",	FM_QF, CONDNZ, FCONDNZ, F_ALIAS),
  92.103 +-/* v9 */ fmovcc  ("fmovsnz",	FM_SF, CONDNZ, FCONDNZ, F_ALIAS),
  92.104 +-/* v9 */ fmovfcc ("fmovdo",	FM_DF, FCONDO, 0),
  92.105 +-/* v9 */ fmovfcc ("fmovqo",	FM_QF, FCONDO, 0),
  92.106 +-/* v9 */ fmovfcc ("fmovso",	FM_SF, FCONDO, 0),
  92.107 +-/* v9 */ fmovicc ("fmovdpos",	FM_DF, CONDPOS, 0),
  92.108 +-/* v9 */ fmovicc ("fmovqpos",	FM_QF, CONDPOS, 0),
  92.109 +-/* v9 */ fmovicc ("fmovspos",	FM_SF, CONDPOS, 0),
  92.110 +-/* v9 */ fmovfcc ("fmovdu",	FM_DF, FCONDU, 0),
  92.111 +-/* v9 */ fmovfcc ("fmovqu",	FM_QF, FCONDU, 0),
  92.112 +-/* v9 */ fmovfcc ("fmovsu",	FM_SF, FCONDU, 0),
  92.113 +-/* v9 */ fmovfcc ("fmovdue",	FM_DF, FCONDUE, 0),
  92.114 +-/* v9 */ fmovfcc ("fmovque",	FM_QF, FCONDUE, 0),
  92.115 +-/* v9 */ fmovfcc ("fmovsue",	FM_SF, FCONDUE, 0),
  92.116 +-/* v9 */ fmovfcc ("fmovdug",	FM_DF, FCONDUG, 0),
  92.117 +-/* v9 */ fmovfcc ("fmovqug",	FM_QF, FCONDUG, 0),
  92.118 +-/* v9 */ fmovfcc ("fmovsug",	FM_SF, FCONDUG, 0),
  92.119 +-/* v9 */ fmovfcc ("fmovduge",	FM_DF, FCONDUGE, 0),
  92.120 +-/* v9 */ fmovfcc ("fmovquge",	FM_QF, FCONDUGE, 0),
  92.121 +-/* v9 */ fmovfcc ("fmovsuge",	FM_SF, FCONDUGE, 0),
  92.122 +-/* v9 */ fmovfcc ("fmovdul",	FM_DF, FCONDUL, 0),
  92.123 +-/* v9 */ fmovfcc ("fmovqul",	FM_QF, FCONDUL, 0),
  92.124 +-/* v9 */ fmovfcc ("fmovsul",	FM_SF, FCONDUL, 0),
  92.125 +-/* v9 */ fmovfcc ("fmovdule",	FM_DF, FCONDULE, 0),
  92.126 +-/* v9 */ fmovfcc ("fmovqule",	FM_QF, FCONDULE, 0),
  92.127 +-/* v9 */ fmovfcc ("fmovsule",	FM_SF, FCONDULE, 0),
  92.128 +-/* v9 */ fmovicc ("fmovdvc",	FM_DF, CONDVC, 0),
  92.129 +-/* v9 */ fmovicc ("fmovqvc",	FM_QF, CONDVC, 0),
  92.130 +-/* v9 */ fmovicc ("fmovsvc",	FM_SF, CONDVC, 0),
  92.131 +-/* v9 */ fmovicc ("fmovdvs",	FM_DF, CONDVS, 0),
  92.132 +-/* v9 */ fmovicc ("fmovqvs",	FM_QF, CONDVS, 0),
  92.133 +-/* v9 */ fmovicc ("fmovsvs",	FM_SF, CONDVS, 0),
  92.134 +-/* v9 */ fmovcc  ("fmovdz",	FM_DF, CONDZ, FCONDZ, F_ALIAS),
  92.135 +-/* v9 */ fmovcc  ("fmovqz",	FM_QF, CONDZ, FCONDZ, F_ALIAS),
  92.136 +-/* v9 */ fmovcc  ("fmovsz",	FM_SF, CONDZ, FCONDZ, F_ALIAS),
  92.137 +-
  92.138 ++#define fmovccx(opcode, fpsize, args, cond, fcond, flags) /* v9 */ \
  92.139 ++{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0),  "z," args, flags | F_FLOAT, v9 }, \
  92.140 ++{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags | F_FLOAT, v9 }, \
  92.141 ++{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0),  F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0),  "Z," args, flags | F_FLOAT, v9 }, \
  92.142 ++{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags | F_FLOAT, v9 }, \
  92.143 ++{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags | F_FLOAT, v9 }, \
  92.144 ++{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags | F_FLOAT, v9 }
  92.145 ++
  92.146 ++#define fmovicc(suffix, cond, flags) /* v9 */ \
  92.147 ++fmoviccx("fmovd" suffix, FM_DF, "B,H", cond, flags),		\
  92.148 ++fmoviccx("fmovq" suffix, FM_QF, "R,J", cond, flags),		\
  92.149 ++fmoviccx("fmovs" suffix, FM_SF, "f,g", cond, flags)
  92.150 ++
  92.151 ++#define fmovfcc(suffix, fcond, flags) /* v9 */ \
  92.152 ++fmovfccx("fmovd" suffix, FM_DF, "B,H", fcond, flags),		\
  92.153 ++fmovfccx("fmovq" suffix, FM_QF, "R,J", fcond, flags),		\
  92.154 ++fmovfccx("fmovs" suffix, FM_SF, "f,g", fcond, flags)
  92.155 ++
  92.156 ++#define fmovcc(suffix, cond, fcond, flags) /* v9 */ \
  92.157 ++fmovccx("fmovd" suffix, FM_DF, "B,H", cond, fcond, flags),	\
  92.158 ++fmovccx("fmovq" suffix, FM_QF, "R,J", cond, fcond, flags),	\
  92.159 ++fmovccx("fmovs" suffix, FM_SF, "f,g", cond, fcond, flags)
  92.160 ++
  92.161 ++/* v9 */ fmovcc  ("a", CONDA, FCONDA, 0),
  92.162 ++/* v9 */ fmovicc ("cc", CONDCC, 0),
  92.163 ++/* v9 */ fmovicc ("cs", CONDCS, 0),
  92.164 ++/* v9 */ fmovcc  ("e", CONDE, FCONDE, 0),
  92.165 ++/* v9 */ fmovcc  ("g", CONDG, FCONDG, 0),
  92.166 ++/* v9 */ fmovcc  ("ge", CONDGE, FCONDGE, 0),
  92.167 ++/* v9 */ fmovicc ("geu", CONDGEU, F_ALIAS),
  92.168 ++/* v9 */ fmovicc ("gu", CONDGU, 0),
  92.169 ++/* v9 */ fmovcc  ("l", CONDL, FCONDL, 0),
  92.170 ++/* v9 */ fmovcc  ("le", CONDLE, FCONDLE, 0),
  92.171 ++/* v9 */ fmovicc ("leu", CONDLEU, 0),
  92.172 ++/* v9 */ fmovfcc ("lg", FCONDLG, 0),
  92.173 ++/* v9 */ fmovicc ("lu", CONDLU, F_ALIAS),
  92.174 ++/* v9 */ fmovcc  ("n", CONDN, FCONDN, 0),
  92.175 ++/* v9 */ fmovcc  ("ne", CONDNE, FCONDNE, 0),
  92.176 ++/* v9 */ fmovicc ("neg", CONDNEG, 0),
  92.177 ++/* v9 */ fmovcc  ("nz", CONDNZ, FCONDNZ, F_ALIAS),
  92.178 ++/* v9 */ fmovfcc ("o", FCONDO, 0),
  92.179 ++/* v9 */ fmovicc ("pos", CONDPOS, 0),
  92.180 ++/* v9 */ fmovfcc ("u", FCONDU, 0),
  92.181 ++/* v9 */ fmovfcc ("ue", FCONDUE, 0),
  92.182 ++/* v9 */ fmovfcc ("ug", FCONDUG, 0),
  92.183 ++/* v9 */ fmovfcc ("uge", FCONDUGE, 0),
  92.184 ++/* v9 */ fmovfcc ("ul", FCONDUL, 0),
  92.185 ++/* v9 */ fmovfcc ("ule", FCONDULE, 0),
  92.186 ++/* v9 */ fmovicc ("vc", CONDVC, 0),
  92.187 ++/* v9 */ fmovicc ("vs", CONDVS, 0),
  92.188 ++/* v9 */ fmovcc  ("z", CONDZ, FCONDZ, F_ALIAS),
  92.189 ++
  92.190 ++#undef fmoviccx /* v9 */
  92.191 ++#undef fmovfccx /* v9 */
  92.192 ++#undef fmovccx /* v9 */
  92.193 + #undef fmovicc /* v9 */
  92.194 + #undef fmovfcc /* v9 */
  92.195 + #undef fmovcc /* v9 */
    93.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    93.2 +++ b/patches/binutils/2.15/ld-2.15-callahan.patch	Sat Feb 24 11:00:05 2007 +0000
    93.3 @@ -0,0 +1,677 @@
    93.4 +Signed-off-by: dank@kegel.com
    93.5 +Fixes ld speed issue. 
    93.6 +See http://weblogs.mozillazine.org/roc/archives/2005/02/optimizing_gnu.html
    93.7 +See thread "Re: optimizations for 3x speedup in ld",
    93.8 +http://sources.redhat.com/ml/binutils/2005-03/msg00847.html
    93.9 +
   93.10 +Wildcard section matching enhancement, backported from the binutils CVS tree.
   93.11 +Here's the CVS log comment from the original change to ldlang.c:
   93.12 +
   93.13 +revision 1.177
   93.14 +date: 2005/04/06 15:33:02;  author: jakub;  state: Exp;  lines: +438 -51
   93.15 +2005-04-06  Jakub Jelinek  <jakub@redhat.com>
   93.16 +
   93.17 +        * ldlang.c: Formatting.
   93.18 +        (walk_wild_consider_section): Remember return value from wildcardp.
   93.19 +        (is_simple_wild): Use strcspn instead of 2 strpbrk calls and strlen.
   93.20 +        (wild_spec_can_overlap): Use strcspn instead of strpbrk and strlen.
   93.21 +
   93.22 +2005-04-06  Robert O'Callahan  <rocallahan@novell.com>
   93.23 +
   93.24 +        * ld.h (lean_section_userdata_type): Remove.
   93.25 +        (fat_section_userdata_type): Remove file field.
   93.26 +        (SECTION_USERDATA_SIZE): Remove.
   93.27 +        * ldlang.c (init_os): Eliminate initialization of unused
   93.28 +        lean_section_userdata_type.
   93.29 +
   93.30 +        * ldlang.h (callback_t, walk_wild_section_handler_t): New
   93.31 +        typedefs.
   93.32 +        (struct lang_wild_statement_struct): Add walk_wild_section_handler
   93.33 +        and handler_data fields.
   93.34 +        * ldlang.c (callback_t): Removed.
   93.35 +        (walk_wild_consider_section, walk_wild_section_general,
   93.36 +        section_iterator_callback, find_section, is_simple_wild,
   93.37 +        match_simple_wild, walk_wild_section_specs1_wild0,
   93.38 +        walk_wild_section_specs1_wild1, walk_wild_section_specs2_wild1,
   93.39 +        walk_wild_section_specs3_wild2, walk_wild_section_specs4_wild2,
   93.40 +        wild_spec_can_overlap, analyze_walk_wild_section_handler): New
   93.41 +        functions.
   93.42 +        (lang_add_wild): Call analyze_walk_wild_section_handler.
   93.43 +        (walk_wild_section): Renamed to walk_wild_section_general and
   93.44 +        created a wrapper function.
   93.45 +        (section_iterator_callback_data): New typedef.
   93.46 +
   93.47 +Note that bfd_get_section_by_name_if didn't exist in 2.15, so it was backported
   93.48 +as well.
   93.49 +
   93.50 +--- binutils-2.15/bfd/bfd-in2.h.old	2004-05-17 15:35:56.000000000 -0400
   93.51 ++++ binutils-2.15/bfd/bfd-in2.h	2006-02-09 11:54:45.989940000 -0500
   93.52 +@@ -1425,6 +1425,10 @@
   93.53 + 
   93.54 + asection *bfd_get_section_by_name (bfd *abfd, const char *name);
   93.55 + 
   93.56 ++asection *bfd_get_section_by_name_if (bfd *abfd, const char *name,
   93.57 ++   bfd_boolean (*operation) (bfd *, asection *, void *),
   93.58 ++   void *user_storage);
   93.59 ++
   93.60 + char *bfd_get_unique_section_name
   93.61 +    (bfd *abfd, const char *templat, int *count);
   93.62 + 
   93.63 +--- binutils-2.15/bfd/section.c.old	2003-12-01 01:33:01.000000000 -0500
   93.64 ++++ binutils-2.15/bfd/section.c	2006-01-23 14:16:54.768993000 -0500
   93.65 +@@ -801,6 +801,57 @@
   93.66 + 
   93.67 + /*
   93.68 + FUNCTION
   93.69 ++	bfd_get_section_by_name_if
   93.70 ++
   93.71 ++SYNOPSIS
   93.72 ++	asection *bfd_get_section_by_name_if
   93.73 ++	  (bfd *abfd,
   93.74 ++	   const char *name,
   93.75 ++	   bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
   93.76 ++	   void *obj);
   93.77 ++
   93.78 ++DESCRIPTION
   93.79 ++	Call the provided function @var{func} for each section
   93.80 ++	attached to the BFD @var{abfd} whose name matches @var{name},
   93.81 ++	passing @var{obj} as an argument. The function will be called
   93.82 ++	as if by
   93.83 ++
   93.84 ++|	func (abfd, the_section, obj);
   93.85 ++
   93.86 ++	It returns the first section for which @var{func} returns true,
   93.87 ++	otherwise <<NULL>>.
   93.88 ++
   93.89 ++*/
   93.90 ++
   93.91 ++asection *
   93.92 ++bfd_get_section_by_name_if (bfd *abfd, const char *name,
   93.93 ++			    bfd_boolean (*operation) (bfd *,
   93.94 ++						      asection *,
   93.95 ++						      void *),
   93.96 ++			    void *user_storage)
   93.97 ++{
   93.98 ++  struct section_hash_entry *sh;
   93.99 ++  unsigned long hash;
  93.100 ++
  93.101 ++  sh = section_hash_lookup (&abfd->section_htab, name, FALSE, FALSE);
  93.102 ++  if (sh == NULL)
  93.103 ++    return NULL;
  93.104 ++
  93.105 ++  hash = sh->root.hash;
  93.106 ++  do
  93.107 ++    {
  93.108 ++      if ((*operation) (abfd, &sh->section, user_storage))
  93.109 ++	return &sh->section;
  93.110 ++      sh = (struct section_hash_entry *) sh->root.next;
  93.111 ++    }
  93.112 ++  while (sh != NULL && sh->root.hash == hash
  93.113 ++	 && strcmp (sh->root.string, name) == 0);
  93.114 ++
  93.115 ++  return NULL;
  93.116 ++}
  93.117 ++
  93.118 ++/*
  93.119 ++FUNCTION
  93.120 + 	bfd_get_unique_section_name
  93.121 + 
  93.122 + SYNOPSIS
  93.123 +--- binutils-2.15/ld/ldlang.c.old	2004-05-17 15:36:16.000000000 -0400
  93.124 ++++ binutils-2.15/ld/ldlang.c	2006-01-23 13:40:12.745499000 -0500
  93.125 +@@ -81,9 +81,6 @@
  93.126 + static void lang_record_phdrs (void);
  93.127 + static void lang_do_version_exports_section (void);
  93.128 + 
  93.129 +-typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
  93.130 +-			    asection *, lang_input_statement_type *, void *);
  93.131 +-
  93.132 + /* Exported variables.  */
  93.133 + lang_output_section_statement_type *abs_output_section;
  93.134 + lang_statement_list_type lang_output_section_statement;
  93.135 +@@ -138,21 +135,71 @@
  93.136 + 
  93.137 + /* Generic traversal routines for finding matching sections.  */
  93.138 + 
  93.139 ++/* Try processing a section against a wildcard.  This just calls
  93.140 ++   the callback unless the filename exclusion list is present
  93.141 ++   and excludes the file.  It's hardly ever present so this
  93.142 ++   function is very fast.  */
  93.143 ++
  93.144 ++static void
  93.145 ++walk_wild_consider_section (lang_wild_statement_type *ptr,
  93.146 ++			    lang_input_statement_type *file,
  93.147 ++			    asection *s,
  93.148 ++			    struct wildcard_list *sec,
  93.149 ++			    callback_t callback,
  93.150 ++			    void *data)
  93.151 ++{
  93.152 ++  bfd_boolean skip = FALSE;
  93.153 ++  struct name_list *list_tmp;
  93.154 ++
  93.155 ++  /* Don't process sections from files which were
  93.156 ++     excluded.  */
  93.157 ++  for (list_tmp = sec->spec.exclude_name_list;
  93.158 ++       list_tmp;
  93.159 ++       list_tmp = list_tmp->next)
  93.160 ++    {
  93.161 ++      bfd_boolean is_wildcard = wildcardp (list_tmp->name);
  93.162 ++      if (is_wildcard)
  93.163 ++	skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
  93.164 ++      else
  93.165 ++	skip = strcmp (list_tmp->name, file->filename) == 0;
  93.166 ++
  93.167 ++      /* If this file is part of an archive, and the archive is
  93.168 ++	 excluded, exclude this file.  */
  93.169 ++      if (! skip && file->the_bfd != NULL
  93.170 ++	  && file->the_bfd->my_archive != NULL
  93.171 ++	  && file->the_bfd->my_archive->filename != NULL)
  93.172 ++	{
  93.173 ++	  if (is_wildcard)
  93.174 ++	    skip = fnmatch (list_tmp->name,
  93.175 ++			    file->the_bfd->my_archive->filename,
  93.176 ++			    0) == 0;
  93.177 ++	  else
  93.178 ++	    skip = strcmp (list_tmp->name,
  93.179 ++			   file->the_bfd->my_archive->filename) == 0;
  93.180 ++	}
  93.181 ++
  93.182 ++      if (skip)
  93.183 ++	break;
  93.184 ++    }
  93.185 ++
  93.186 ++  if (!skip)
  93.187 ++    (*callback) (ptr, sec, s, file, data);
  93.188 ++}
  93.189 ++
  93.190 ++/* Lowest common denominator routine that can handle everything correctly,
  93.191 ++   but slowly.  */
  93.192 ++
  93.193 + static void
  93.194 +-walk_wild_section (lang_wild_statement_type *ptr,
  93.195 +-		   lang_input_statement_type *file,
  93.196 +-		   callback_t callback,
  93.197 +-		   void *data)
  93.198 ++walk_wild_section_general (lang_wild_statement_type *ptr,
  93.199 ++			   lang_input_statement_type *file,
  93.200 ++			   callback_t callback,
  93.201 ++			   void *data)
  93.202 + {
  93.203 +   asection *s;
  93.204 +-
  93.205 +-  if (file->just_syms_flag)
  93.206 +-    return;
  93.207 ++  struct wildcard_list *sec;
  93.208 + 
  93.209 +   for (s = file->the_bfd->sections; s != NULL; s = s->next)
  93.210 +     {
  93.211 +-      struct wildcard_list *sec;
  93.212 +-
  93.213 +       sec = ptr->section_list;
  93.214 +       if (sec == NULL)
  93.215 + 	(*callback) (ptr, sec, s, file, data);
  93.216 +@@ -160,39 +207,8 @@
  93.217 +       while (sec != NULL)
  93.218 + 	{
  93.219 + 	  bfd_boolean skip = FALSE;
  93.220 +-	  struct name_list *list_tmp;
  93.221 +-
  93.222 +-	  /* Don't process sections from files which were
  93.223 +-	     excluded.  */
  93.224 +-	  for (list_tmp = sec->spec.exclude_name_list;
  93.225 +-	       list_tmp;
  93.226 +-	       list_tmp = list_tmp->next)
  93.227 +-	    {
  93.228 +-	      if (wildcardp (list_tmp->name))
  93.229 +-		skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
  93.230 +-	      else
  93.231 +-		skip = strcmp (list_tmp->name, file->filename) == 0;
  93.232 +-
  93.233 +-	      /* If this file is part of an archive, and the archive is
  93.234 +-		 excluded, exclude this file.  */
  93.235 +-	      if (! skip && file->the_bfd != NULL
  93.236 +-		  && file->the_bfd->my_archive != NULL
  93.237 +-		  && file->the_bfd->my_archive->filename != NULL)
  93.238 +-		{
  93.239 +-		  if (wildcardp (list_tmp->name))
  93.240 +-		    skip = fnmatch (list_tmp->name,
  93.241 +-				    file->the_bfd->my_archive->filename,
  93.242 +-				    0) == 0;
  93.243 +-		  else
  93.244 +-		    skip = strcmp (list_tmp->name,
  93.245 +-				   file->the_bfd->my_archive->filename) == 0;
  93.246 +-		}
  93.247 +-
  93.248 +-	      if (skip)
  93.249 +-		break;
  93.250 +-	    }
  93.251 + 
  93.252 +-	  if (!skip && sec->spec.name != NULL)
  93.253 ++	  if (sec->spec.name != NULL)
  93.254 + 	    {
  93.255 + 	      const char *sname = bfd_get_section_name (file->the_bfd, s);
  93.256 + 
  93.257 +@@ -203,13 +219,381 @@
  93.258 + 	    }
  93.259 + 
  93.260 + 	  if (!skip)
  93.261 +-	    (*callback) (ptr, sec, s, file, data);
  93.262 ++	    walk_wild_consider_section (ptr, file, s, sec, callback, data);
  93.263 + 
  93.264 + 	  sec = sec->next;
  93.265 + 	}
  93.266 +     }
  93.267 + }
  93.268 + 
  93.269 ++/* Routines to find a single section given its name.  If there's more
  93.270 ++   than one section with that name, we report that.  */
  93.271 ++
  93.272 ++typedef struct
  93.273 ++{
  93.274 ++  asection *found_section;
  93.275 ++  bfd_boolean multiple_sections_found;
  93.276 ++} section_iterator_callback_data;
  93.277 ++
  93.278 ++static bfd_boolean
  93.279 ++section_iterator_callback (bfd *bfd ATTRIBUTE_UNUSED, asection *s, void *data)
  93.280 ++{
  93.281 ++  section_iterator_callback_data *d = data;
  93.282 ++
  93.283 ++  if (d->found_section != NULL)
  93.284 ++    {
  93.285 ++      d->multiple_sections_found = TRUE;
  93.286 ++      return TRUE;
  93.287 ++    }
  93.288 ++
  93.289 ++  d->found_section = s;
  93.290 ++  return FALSE;
  93.291 ++}
  93.292 ++
  93.293 ++static asection *
  93.294 ++find_section (lang_input_statement_type *file,
  93.295 ++	      struct wildcard_list *sec,
  93.296 ++	      bfd_boolean *multiple_sections_found)
  93.297 ++{
  93.298 ++  section_iterator_callback_data cb_data = { NULL, FALSE };
  93.299 ++
  93.300 ++  bfd_get_section_by_name_if (file->the_bfd, sec->spec.name, 
  93.301 ++			      section_iterator_callback, &cb_data);
  93.302 ++  *multiple_sections_found = cb_data.multiple_sections_found;
  93.303 ++  return cb_data.found_section;
  93.304 ++}
  93.305 ++
  93.306 ++/* Code for handling simple wildcards without going through fnmatch,
  93.307 ++   which can be expensive because of charset translations etc.  */
  93.308 ++
  93.309 ++/* A simple wild is a literal string followed by a single '*',
  93.310 ++   where the literal part is at least 4 characters long.  */
  93.311 ++
  93.312 ++static bfd_boolean
  93.313 ++is_simple_wild (const char *name)
  93.314 ++{
  93.315 ++  size_t len = strcspn (name, "*?[");
  93.316 ++  return len >= 4 && name[len] == '*' && name[len + 1] == '\0';
  93.317 ++}
  93.318 ++
  93.319 ++static bfd_boolean
  93.320 ++match_simple_wild (const char *pattern, const char *name)
  93.321 ++{
  93.322 ++  /* The first four characters of the pattern are guaranteed valid
  93.323 ++     non-wildcard characters.  So we can go faster.  */
  93.324 ++  if (pattern[0] != name[0] || pattern[1] != name[1]
  93.325 ++      || pattern[2] != name[2] || pattern[3] != name[3])
  93.326 ++    return FALSE;
  93.327 ++
  93.328 ++  pattern += 4;
  93.329 ++  name += 4;
  93.330 ++  while (*pattern != '*')
  93.331 ++    if (*name++ != *pattern++)
  93.332 ++      return FALSE;
  93.333 ++
  93.334 ++  return TRUE;
  93.335 ++}
  93.336 ++
  93.337 ++/* Specialized, optimized routines for handling different kinds of
  93.338 ++   wildcards */
  93.339 ++
  93.340 ++static void
  93.341 ++walk_wild_section_specs1_wild0 (lang_wild_statement_type *ptr,
  93.342 ++				lang_input_statement_type *file,
  93.343 ++				callback_t callback,
  93.344 ++				void *data)
  93.345 ++{
  93.346 ++  /* We can just do a hash lookup for the section with the right name.
  93.347 ++     But if that lookup discovers more than one section with the name
  93.348 ++     (should be rare), we fall back to the general algorithm because
  93.349 ++     we would otherwise have to sort the sections to make sure they
  93.350 ++     get processed in the bfd's order.  */
  93.351 ++  bfd_boolean multiple_sections_found;
  93.352 ++  struct wildcard_list *sec0 = ptr->handler_data[0];
  93.353 ++  asection *s0 = find_section (file, sec0, &multiple_sections_found);
  93.354 ++
  93.355 ++  if (multiple_sections_found)
  93.356 ++    walk_wild_section_general (ptr, file, callback, data);
  93.357 ++  else if (s0)
  93.358 ++    walk_wild_consider_section (ptr, file, s0, sec0, callback, data);
  93.359 ++}
  93.360 ++
  93.361 ++static void
  93.362 ++walk_wild_section_specs1_wild1 (lang_wild_statement_type *ptr,
  93.363 ++				lang_input_statement_type *file,
  93.364 ++				callback_t callback,
  93.365 ++				void *data)
  93.366 ++{
  93.367 ++  asection *s;
  93.368 ++  struct wildcard_list *wildsec0 = ptr->handler_data[0];
  93.369 ++
  93.370 ++  for (s = file->the_bfd->sections; s != NULL; s = s->next)
  93.371 ++    {
  93.372 ++      const char *sname = bfd_get_section_name (file->the_bfd, s);
  93.373 ++      bfd_boolean skip = !match_simple_wild (wildsec0->spec.name, sname);
  93.374 ++
  93.375 ++      if (!skip)
  93.376 ++	walk_wild_consider_section (ptr, file, s, wildsec0, callback, data);
  93.377 ++    }
  93.378 ++}
  93.379 ++
  93.380 ++static void
  93.381 ++walk_wild_section_specs2_wild1 (lang_wild_statement_type *ptr,
  93.382 ++				lang_input_statement_type *file,
  93.383 ++				callback_t callback,
  93.384 ++				void *data)
  93.385 ++{
  93.386 ++  asection *s;
  93.387 ++  struct wildcard_list *sec0 = ptr->handler_data[0];
  93.388 ++  struct wildcard_list *wildsec1 = ptr->handler_data[1];
  93.389 ++  bfd_boolean multiple_sections_found;
  93.390 ++  asection *s0 = find_section (file, sec0, &multiple_sections_found);
  93.391 ++
  93.392 ++  if (multiple_sections_found)
  93.393 ++    {
  93.394 ++      walk_wild_section_general (ptr, file, callback, data);
  93.395 ++      return;
  93.396 ++    }
  93.397 ++
  93.398 ++  /* Note that if the section was not found, s0 is NULL and
  93.399 ++     we'll simply never succeed the s == s0 test below.  */
  93.400 ++  for (s = file->the_bfd->sections; s != NULL; s = s->next)
  93.401 ++    {
  93.402 ++      /* Recall that in this code path, a section cannot satisfy more
  93.403 ++	 than one spec, so if s == s0 then it cannot match
  93.404 ++	 wildspec1.  */
  93.405 ++      if (s == s0)
  93.406 ++	walk_wild_consider_section (ptr, file, s, sec0, callback, data);
  93.407 ++      else
  93.408 ++	{
  93.409 ++	  const char *sname = bfd_get_section_name (file->the_bfd, s);
  93.410 ++	  bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
  93.411 ++
  93.412 ++	  if (!skip)
  93.413 ++	    walk_wild_consider_section (ptr, file, s, wildsec1, callback,
  93.414 ++					data);
  93.415 ++	}
  93.416 ++    }
  93.417 ++}
  93.418 ++
  93.419 ++static void
  93.420 ++walk_wild_section_specs3_wild2 (lang_wild_statement_type *ptr,
  93.421 ++				lang_input_statement_type *file,
  93.422 ++				callback_t callback,
  93.423 ++				void *data)
  93.424 ++{
  93.425 ++  asection *s;
  93.426 ++  struct wildcard_list *sec0 = ptr->handler_data[0];
  93.427 ++  struct wildcard_list *wildsec1 = ptr->handler_data[1];
  93.428 ++  struct wildcard_list *wildsec2 = ptr->handler_data[2];
  93.429 ++  bfd_boolean multiple_sections_found;
  93.430 ++  asection *s0 = find_section (file, sec0, &multiple_sections_found);
  93.431 ++
  93.432 ++  if (multiple_sections_found)
  93.433 ++    {
  93.434 ++      walk_wild_section_general (ptr, file, callback, data);
  93.435 ++      return;
  93.436 ++    }
  93.437 ++
  93.438 ++  for (s = file->the_bfd->sections; s != NULL; s = s->next)
  93.439 ++    {
  93.440 ++      if (s == s0)
  93.441 ++	walk_wild_consider_section (ptr, file, s, sec0, callback, data);
  93.442 ++      else
  93.443 ++	{
  93.444 ++	  const char *sname = bfd_get_section_name (file->the_bfd, s);
  93.445 ++	  bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
  93.446 ++
  93.447 ++	  if (!skip)
  93.448 ++	    walk_wild_consider_section (ptr, file, s, wildsec1, callback, data);
  93.449 ++	  else
  93.450 ++	    {
  93.451 ++	      skip = !match_simple_wild (wildsec2->spec.name, sname);
  93.452 ++	      if (!skip)
  93.453 ++		walk_wild_consider_section (ptr, file, s, wildsec2, callback,
  93.454 ++					    data);
  93.455 ++	    }
  93.456 ++	}
  93.457 ++    }
  93.458 ++}
  93.459 ++
  93.460 ++static void
  93.461 ++walk_wild_section_specs4_wild2 (lang_wild_statement_type *ptr,
  93.462 ++				lang_input_statement_type *file,
  93.463 ++				callback_t callback,
  93.464 ++				void *data)
  93.465 ++{
  93.466 ++  asection *s;
  93.467 ++  struct wildcard_list *sec0 = ptr->handler_data[0];
  93.468 ++  struct wildcard_list *sec1 = ptr->handler_data[1];
  93.469 ++  struct wildcard_list *wildsec2 = ptr->handler_data[2];
  93.470 ++  struct wildcard_list *wildsec3 = ptr->handler_data[3];
  93.471 ++  bfd_boolean multiple_sections_found;
  93.472 ++  asection *s0 = find_section (file, sec0, &multiple_sections_found), *s1;
  93.473 ++
  93.474 ++  if (multiple_sections_found)
  93.475 ++    {
  93.476 ++      walk_wild_section_general (ptr, file, callback, data);
  93.477 ++      return;
  93.478 ++    }
  93.479 ++
  93.480 ++  s1 = find_section (file, sec1, &multiple_sections_found);
  93.481 ++  if (multiple_sections_found)
  93.482 ++    {
  93.483 ++      walk_wild_section_general (ptr, file, callback, data);
  93.484 ++      return;
  93.485 ++    }
  93.486 ++
  93.487 ++  for (s = file->the_bfd->sections; s != NULL; s = s->next)
  93.488 ++    {
  93.489 ++      if (s == s0)
  93.490 ++	walk_wild_consider_section (ptr, file, s, sec0, callback, data);
  93.491 ++      else
  93.492 ++	if (s == s1)
  93.493 ++	  walk_wild_consider_section (ptr, file, s, sec1, callback, data);
  93.494 ++	else
  93.495 ++	  {
  93.496 ++	    const char *sname = bfd_get_section_name (file->the_bfd, s);
  93.497 ++	    bfd_boolean skip = !match_simple_wild (wildsec2->spec.name,
  93.498 ++						   sname);
  93.499 ++
  93.500 ++	    if (!skip)
  93.501 ++	      walk_wild_consider_section (ptr, file, s, wildsec2, callback,
  93.502 ++					  data);
  93.503 ++	    else
  93.504 ++	      {
  93.505 ++		skip = !match_simple_wild (wildsec3->spec.name, sname);
  93.506 ++		if (!skip)
  93.507 ++		  walk_wild_consider_section (ptr, file, s, wildsec3,
  93.508 ++					      callback, data);
  93.509 ++	      }
  93.510 ++	  }
  93.511 ++    }
  93.512 ++}
  93.513 ++
  93.514 ++static void
  93.515 ++walk_wild_section (lang_wild_statement_type *ptr,
  93.516 ++		   lang_input_statement_type *file,
  93.517 ++		   callback_t callback,
  93.518 ++		   void *data)
  93.519 ++{
  93.520 ++  if (file->just_syms_flag)
  93.521 ++    return;
  93.522 ++
  93.523 ++  (*ptr->walk_wild_section_handler) (ptr, file, callback, data);
  93.524 ++}
  93.525 ++
  93.526 ++/* Returns TRUE when name1 is a wildcard spec that might match
  93.527 ++   something name2 can match.  We're conservative: we return FALSE
  93.528 ++   only if the prefixes of name1 and name2 are different up to the
  93.529 ++   first wildcard character.  */
  93.530 ++
  93.531 ++static bfd_boolean
  93.532 ++wild_spec_can_overlap (const char *name1, const char *name2)
  93.533 ++{
  93.534 ++  size_t prefix1_len = strcspn (name1, "?*[");
  93.535 ++  size_t prefix2_len = strcspn (name2, "?*[");
  93.536 ++  size_t min_prefix_len;
  93.537 ++
  93.538 ++  /* Note that if there is no wildcard character, then we treat the
  93.539 ++     terminating 0 as part of the prefix.  Thus ".text" won't match
  93.540 ++     ".text." or ".text.*", for example.  */
  93.541 ++  if (name1[prefix1_len] == '\0')
  93.542 ++    prefix1_len++;
  93.543 ++  if (name2[prefix2_len] == '\0')
  93.544 ++    prefix2_len++;
  93.545 ++
  93.546 ++  min_prefix_len = prefix1_len < prefix2_len ? prefix1_len : prefix2_len;
  93.547 ++
  93.548 ++  return memcmp (name1, name2, min_prefix_len) == 0;
  93.549 ++}
  93.550 ++
  93.551 ++/* Select specialized code to handle various kinds of wildcard
  93.552 ++   statements.  */
  93.553 ++
  93.554 ++static void
  93.555 ++analyze_walk_wild_section_handler (lang_wild_statement_type *ptr)
  93.556 ++{
  93.557 ++  int sec_count = 0;
  93.558 ++  int wild_name_count = 0;
  93.559 ++  struct wildcard_list *sec;
  93.560 ++  int signature;
  93.561 ++  int data_counter;
  93.562 ++
  93.563 ++  ptr->walk_wild_section_handler = walk_wild_section_general;
  93.564 ++
  93.565 ++  /* Count how many wildcard_specs there are, and how many of those
  93.566 ++     actually use wildcards in the name.  Also, bail out if any of the
  93.567 ++     wildcard names are NULL. (Can this actually happen?
  93.568 ++     walk_wild_section used to test for it.)  And bail out if any
  93.569 ++     of the wildcards are more complex than a simple string
  93.570 ++     ending in a single '*'.  */
  93.571 ++  for (sec = ptr->section_list; sec != NULL; sec = sec->next)
  93.572 ++    {
  93.573 ++      ++sec_count;
  93.574 ++      if (sec->spec.name == NULL)
  93.575 ++	return;
  93.576 ++      if (wildcardp (sec->spec.name))
  93.577 ++	{
  93.578 ++	  ++wild_name_count;
  93.579 ++	  if (!is_simple_wild (sec->spec.name))
  93.580 ++	    return;
  93.581 ++	}
  93.582 ++    }
  93.583 ++
  93.584 ++  /* The zero-spec case would be easy to optimize but it doesn't
  93.585 ++     happen in practice.  Likewise, more than 4 specs doesn't
  93.586 ++     happen in practice.  */
  93.587 ++  if (sec_count == 0 || sec_count > 4)
  93.588 ++    return;
  93.589 ++
  93.590 ++  /* Check that no two specs can match the same section.  */
  93.591 ++  for (sec = ptr->section_list; sec != NULL; sec = sec->next)
  93.592 ++    {
  93.593 ++      struct wildcard_list *sec2;
  93.594 ++      for (sec2 = sec->next; sec2 != NULL; sec2 = sec2->next)
  93.595 ++	{
  93.596 ++	  if (wild_spec_can_overlap (sec->spec.name, sec2->spec.name))
  93.597 ++	    return;
  93.598 ++	}
  93.599 ++    }
  93.600 ++
  93.601 ++  signature = (sec_count << 8) + wild_name_count;
  93.602 ++  switch (signature)
  93.603 ++    {
  93.604 ++    case 0x0100:
  93.605 ++      ptr->walk_wild_section_handler = walk_wild_section_specs1_wild0;
  93.606 ++      break;
  93.607 ++    case 0x0101:
  93.608 ++      ptr->walk_wild_section_handler = walk_wild_section_specs1_wild1;
  93.609 ++      break;
  93.610 ++    case 0x0201:
  93.611 ++      ptr->walk_wild_section_handler = walk_wild_section_specs2_wild1;
  93.612 ++      break;
  93.613 ++    case 0x0302:
  93.614 ++      ptr->walk_wild_section_handler = walk_wild_section_specs3_wild2;
  93.615 ++      break;
  93.616 ++    case 0x0402:
  93.617 ++      ptr->walk_wild_section_handler = walk_wild_section_specs4_wild2;
  93.618 ++      break;
  93.619 ++    default:
  93.620 ++      return;
  93.621 ++    }
  93.622 ++
  93.623 ++  /* Now fill the data array with pointers to the specs, first the
  93.624 ++     specs with non-wildcard names, then the specs with wildcard
  93.625 ++     names.  It's OK to process the specs in different order from the
  93.626 ++     given order, because we've already determined that no section
  93.627 ++     will match more than one spec.  */
  93.628 ++  data_counter = 0;
  93.629 ++  for (sec = ptr->section_list; sec != NULL; sec = sec->next)
  93.630 ++    if (!wildcardp (sec->spec.name))
  93.631 ++      ptr->handler_data[data_counter++] = sec;
  93.632 ++  for (sec = ptr->section_list; sec != NULL; sec = sec->next)
  93.633 ++    if (wildcardp (sec->spec.name))
  93.634 ++      ptr->handler_data[data_counter++] = sec;
  93.635 ++}
  93.636 ++
  93.637 + /* Handle a wild statement for a single file F.  */
  93.638 + 
  93.639 + static void
  93.640 +@@ -4353,6 +4737,7 @@
  93.641 +   new->section_list = section_list;
  93.642 +   new->keep_sections = keep_sections;
  93.643 +   lang_list_init (&new->children);
  93.644 ++  analyze_walk_wild_section_handler (new);
  93.645 + }
  93.646 + 
  93.647 + void
  93.648 +--- binutils-2.15/ld/ldlang.h.old	2004-05-17 15:36:16.000000000 -0400
  93.649 ++++ binutils-2.15/ld/ldlang.h	2006-01-23 13:32:33.653292000 -0500
  93.650 +@@ -295,7 +295,17 @@
  93.651 +   union lang_statement_union *file;
  93.652 + } lang_afile_asection_pair_statement_type;
  93.653 + 
  93.654 +-typedef struct lang_wild_statement_struct
  93.655 ++typedef struct lang_wild_statement_struct lang_wild_statement_type;
  93.656 ++
  93.657 ++typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
  93.658 ++			    asection *, lang_input_statement_type *, void *);
  93.659 ++
  93.660 ++typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
  93.661 ++					     lang_input_statement_type *,
  93.662 ++					     callback_t callback,
  93.663 ++					     void *data);
  93.664 ++
  93.665 ++struct lang_wild_statement_struct
  93.666 + {
  93.667 +   lang_statement_header_type header;
  93.668 +   const char *filename;
  93.669 +@@ -303,7 +313,10 @@
  93.670 +   struct wildcard_list *section_list;
  93.671 +   bfd_boolean keep_sections;
  93.672 +   lang_statement_list_type children;
  93.673 +-} lang_wild_statement_type;
  93.674 ++
  93.675 ++  walk_wild_section_handler_t walk_wild_section_handler;
  93.676 ++  struct wildcard_list *handler_data[4];
  93.677 ++};
  93.678 + 
  93.679 + typedef struct lang_address_statement_struct
  93.680 + {
    94.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    94.2 +++ b/patches/binutils/2.15/ld-2.15-stabs-tweak.patch	Sat Feb 24 11:00:05 2007 +0000
    94.3 @@ -0,0 +1,33 @@
    94.4 +Signed-off-by: dank@kegel.com
    94.5 +
    94.6 +See http://sourceware.org/ml/binutils/2005-12/msg00270.html
    94.7 +http://sourceware.org/ml/binutils-cvs/2005-12/msg00139.html
    94.8 +
    94.9 +STABS hash table size change, backported from the binutils CVS tree.  Here's
   94.10 +the CVS log comment for the original change:
   94.11 +
   94.12 +revision 1.25
   94.13 +date: 2005/12/29 10:29:23;  author: nickc;  state: Exp;  lines: +2 -3
   94.14 +(_bfd_link_section_stabs): Use bfd_hash_table_init rather than
   94.15 +bfd_hash_table_init_n(...,251) so that the size of the hash table can be
   94.16 +controlled by the user.
   94.17 +
   94.18 +Note that tunable hash table size changes were added after 2.15.  The effect
   94.19 +of this change is to make bfd use its default hash table size for the stabs
   94.20 +hash as well.
   94.21 +
   94.22 +
   94.23 +--- binutils-2.15/bfd/stabs.c.old	2004-05-17 15:36:04.000000000 -0400
   94.24 ++++ binutils-2.15/bfd/stabs.c	2006-02-09 15:21:56.567014000 -0500
   94.25 +@@ -241,9 +241,8 @@
   94.26 + 	goto error_return;
   94.27 +       /* Make sure the first byte is zero.  */
   94.28 +       (void) _bfd_stringtab_add (sinfo->strings, "", TRUE, TRUE);
   94.29 +-      if (! bfd_hash_table_init_n (&sinfo->includes.root,
   94.30 +-				   stab_link_includes_newfunc,
   94.31 +-				   251))
   94.32 ++      if (! bfd_hash_table_init (&sinfo->includes.root,
   94.33 ++				   stab_link_includes_newfunc))
   94.34 + 	goto error_return;
   94.35 +       sinfo->stabstr = bfd_make_section_anyway (abfd, ".stabstr");
   94.36 +       sinfo->stabstr->flags |= SEC_HAS_CONTENTS | SEC_READONLY | SEC_DEBUGGING;
    95.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    95.2 +++ b/patches/binutils/2.15/s390-invalid-insn-format.patch	Sat Feb 24 11:00:05 2007 +0000
    95.3 @@ -0,0 +1,42 @@
    95.4 +Message-ID: <000801c48f60$cec16630$9103a8c0@ULOC5012>
    95.5 +From: "Michael Geiger" <mcgege@gmx.de>
    95.6 +To: <dank@kegel.com>
    95.7 +Subject: Patch for cross compiling s/390 kernel on linux host
    95.8 +Date: Tue, 31 Aug 2004 15:45:41 +0200
    95.9 +
   95.10 +Dear Dan,
   95.11 +
   95.12 +I had big problems compiling a kernel for s/390 on my linux host - I tried
   95.13 +different chains from crosstool-0.28-rc34 and finally succeded with
   95.14 +gcc-3.3.4-glibc-2.3.2 after applying another patch to binutils-2.15
   95.15 +(attached).
   95.16 +All compilations of the different kernel versions I tried stopped with
   95.17 +"Invalid .insn format" somewhere. I checked the recent cvs version of
   95.18 +binutils and applied the latest diff to gas/config/tc-s390.c and that solved
   95.19 +it.
   95.20 +
   95.21 +Greetings
   95.22 +
   95.23 +Michael Geiger
   95.24 +
   95.25 +
   95.26 +diff -u -r1.39 -r1.40
   95.27 +--- src/gas/config/tc-s390.c	2004/05/06 11:01:48	1.39
   95.28 ++++ src/gas/config/tc-s390.c	2004/06/15 12:38:08	1.40
   95.29 +@@ -1596,13 +1596,13 @@
   95.30 +   if (exp.X_op == O_constant)
   95.31 +     {
   95.32 +       if (   (   opformat->oplen == 6
   95.33 +-	      && exp.X_add_number >= 0
   95.34 ++	      && (addressT) exp.X_add_number >= 0
   95.35 + 	      && (addressT) exp.X_add_number < (1ULL << 48))
   95.36 + 	  || (   opformat->oplen == 4
   95.37 +-	      && exp.X_add_number >= 0
   95.38 ++	      && (addressT) exp.X_add_number >= 0
   95.39 + 	      && (addressT) exp.X_add_number < (1ULL << 32))
   95.40 + 	  || (   opformat->oplen == 2
   95.41 +-	      && exp.X_add_number >= 0
   95.42 ++	      && (addressT) exp.X_add_number >= 0
   95.43 + 	      && (addressT) exp.X_add_number < (1ULL << 16)))
   95.44 + 	md_number_to_chars (insn, exp.X_add_number, opformat->oplen);
   95.45 +       else
    96.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    96.2 +++ b/patches/binutils/2.16.1/bfd-hash-tweak.patch	Sat Feb 24 11:00:05 2007 +0000
    96.3 @@ -0,0 +1,23 @@
    96.4 +Signed-off-by: dank@kegel.com
    96.5 +
    96.6 +Raising the size of the hash table is a noticable win when linking 
    96.7 +at least one large app.  
    96.8 +
    96.9 +There was a patch,
   96.10 +http://sources.redhat.com/ml/binutils/2004-06/msg00165.html
   96.11 +to do this dynamically.  No idea why that didn't make it in.
   96.12 +So this tiny change to raise the default size is just
   96.13 +a stopgap for now.
   96.14 +
   96.15 +
   96.16 +--- binutils-2.16.1/bfd/hash.c.old	2006-03-02 23:01:39.000000000 -0800
   96.17 ++++ binutils-2.16.1/bfd/hash.c	2006-03-02 23:01:58.000000000 -0800
   96.18 +@@ -300,7 +300,7 @@
   96.19 + */
   96.20 + 
   96.21 + /* The default number of entries to use when creating a hash table.  */
   96.22 +-#define DEFAULT_SIZE 4051
   96.23 ++#define DEFAULT_SIZE 32749
   96.24 + static size_t bfd_default_hash_table_size = DEFAULT_SIZE;
   96.25 + 
   96.26 + /* Create a new hash table, given a number of entries.  */
    97.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    97.2 +++ b/patches/binutils/2.16.1/binutils-2.15-psignal.patch	Sat Feb 24 11:00:05 2007 +0000
    97.3 @@ -0,0 +1,40 @@
    97.4 +Make psignal prototype in libiberty match that in glibc.
    97.5 +
    97.6 +Fixes:
    97.7 +
    97.8 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c: In function `psignal':
    97.9 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `signo' doesn't match prototype
   97.10 +/usr/include/signal.h:131: prototype declaration
   97.11 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `message' doesn't match prototype
   97.12 +/usr/include/signal.h:131: prototype declaration
   97.13 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:568: warning: comparison between signed and unsigned
   97.14 +mprotect... make[1]: *** [strsignal.o] Error 1
   97.15 +make[1]: Leaving directory `/export/hda3/dkegel/queue/jobdir.produser_cpsm17/crosstool-0.32/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/build-binutils/libiberty'
   97.16 +make: *** [all-libiberty] Error 2
   97.17 +
   97.18 +when building on red hat 7.1
   97.19 +though it's a bit of a mystery why libiberty's psignal is being compiled at
   97.20 +all, since red hat 7.1's glibc supports psignal (hence the error message)
   97.21 +
   97.22 +--- binutils-2.15/libiberty/strsignal.c.old	2005-04-18 13:57:40.000000000 -0700
   97.23 ++++ binutils-2.15/libiberty/strsignal.c	2005-04-18 13:59:09.000000000 -0700
   97.24 +@@ -544,7 +544,7 @@
   97.25 + 
   97.26 + /*
   97.27 + 
   97.28 +-@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
   97.29 ++@deftypefn Supplemental void psignal (int @var{signo}, const char *@var{message})
   97.30 + 
   97.31 + Print @var{message} to the standard error, followed by a colon,
   97.32 + followed by the description of the signal specified by @var{signo},
   97.33 +@@ -557,9 +557,7 @@
   97.34 + #ifndef HAVE_PSIGNAL
   97.35 + 
   97.36 + void
   97.37 +-psignal (signo, message)
   97.38 +-  unsigned signo;
   97.39 +-  char *message;
   97.40 ++psignal (int signo, const char *message)
   97.41 + {
   97.42 +   if (signal_names == NULL)
   97.43 +     {
    98.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    98.2 +++ b/patches/binutils/2.16.1/binutils-skip-comments.patch	Sat Feb 24 11:00:05 2007 +0000
    98.3 @@ -0,0 +1,95 @@
    98.4 +[removed first hunk so it would apply to 2.16.1 - copyright date already updated - dank]
    98.5 +
    98.6 +Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
    98.7 +Fixes
    98.8 +localealias.s:544: Error: junk at end of line, first unrecognized character is `,' 
    98.9 +when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
   98.10 +
   98.11 +Paths adjusted to match crosstool's patcher.
   98.12 +
   98.13 +Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
   98.14 +From: Andreas Schwab <schwab at suse dot de>
   98.15 +To: Nathan Sidwell <nathan at codesourcery dot com>
   98.16 +Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
   98.17 +Date: Fri, 23 Apr 2004 22:27:19 +0200
   98.18 +Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
   98.19 +
   98.20 +Nathan Sidwell <nathan@codesourcery.com> writes:
   98.21 +
   98.22 +> Index: read.c
   98.23 +> ===================================================================
   98.24 +> RCS file: /cvs/src/src/gas/read.c,v
   98.25 +> retrieving revision 1.76
   98.26 +> diff -c -3 -p -r1.76 read.c
   98.27 +> *** read.c	12 Mar 2004 17:48:12 -0000	1.76
   98.28 +> --- read.c	18 Mar 2004 09:56:05 -0000
   98.29 +> *************** read_a_source_file (char *name)
   98.30 +> *** 1053,1059 ****
   98.31 +>   #endif
   98.32 +>   	  input_line_pointer--;
   98.33 +>   	  /* Report unknown char as ignored.  */
   98.34 +> ! 	  ignore_rest_of_line ();
   98.35 +>   	}
   98.36 +>   
   98.37 +>   #ifdef md_after_pass_hook
   98.38 +> --- 1053,1059 ----
   98.39 +>   #endif
   98.40 +>   	  input_line_pointer--;
   98.41 +>   	  /* Report unknown char as ignored.  */
   98.42 +> ! 	  demand_empty_rest_of_line ();
   98.43 +>   	}
   98.44 +>   
   98.45 +>   #ifdef md_after_pass_hook
   98.46 +
   98.47 +This means that the unknown character is no longer ignored, despite the
   98.48 +comment.  As a side effect a line starting with a line comment character
   98.49 +not followed by APP in NO_APP mode now triggers an error instead of just a
   98.50 +warning, breaking builds of glibc on m68k-linux.  Earlier in
   98.51 +read_a_source_file where #APP is handled there is another comment that
   98.52 +claims that unknown comments are ignored, when in fact they aren't (only
   98.53 +the initial line comment character is skipped).
   98.54 +
   98.55 +Note that the presence of #APP will mess up the line counters, but
   98.56 +that appears to be difficult to fix.
   98.57 +
   98.58 +Andreas.
   98.59 +
   98.60 +2004-04-23  Andreas Schwab  <schwab@suse.de>
   98.61 +
   98.62 +	* read.c (read_a_source_file): Ignore unknown text after line
   98.63 +	comment character.  Fix misleading comment.
   98.64 +
   98.65 +--- binutils/gas/read.c.~1.78.~	2004-04-23 08:58:23.000000000 +0200
   98.66 ++++ binutils/gas/read.c	2004-04-23 21:49:01.000000000 +0200
   98.67 +@@ -950,10 +950,14 @@ read_a_source_file (char *name)
   98.68 + 	      unsigned int new_length;
   98.69 + 	      char *tmp_buf = 0;
   98.70 + 
   98.71 +-	      bump_line_counters ();
   98.72 + 	      s = input_line_pointer;
   98.73 + 	      if (strncmp (s, "APP\n", 4))
   98.74 +-		continue;	/* We ignore it */
   98.75 ++		{
   98.76 ++		  /* We ignore it */
   98.77 ++		  ignore_rest_of_line ();
   98.78 ++		  continue;
   98.79 ++		}
   98.80 ++	      bump_line_counters ();
   98.81 + 	      s += 4;
   98.82 + 
   98.83 + 	      sb_new (&sbuf);
   98.84 +@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
   98.85 + 	    continue;
   98.86 + #endif
   98.87 + 	  input_line_pointer--;
   98.88 +-	  /* Report unknown char as ignored.  */
   98.89 ++	  /* Report unknown char as error.  */
   98.90 + 	  demand_empty_rest_of_line ();
   98.91 + 	}
   98.92 + 
   98.93 +
   98.94 +-- 
   98.95 +Andreas Schwab, SuSE Labs, schwab@suse.de
   98.96 +SuSE Linux AG, Maxfeldstra&#xC3;e 5, 90409 N&#xC3;rnberg, Germany
   98.97 +Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
   98.98 +"And now for something completely different."
    99.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    99.2 +++ b/patches/binutils/2.16.1/callahan.patch	Sat Feb 24 11:00:05 2007 +0000
    99.3 @@ -0,0 +1,693 @@
    99.4 +Signed-off-by: dank@kegel.com
    99.5 +Fixes ld speed issue. 
    99.6 +See http://weblogs.mozillazine.org/roc/archives/2005/02/optimizing_gnu.html
    99.7 +See thread "Re: optimizations for 3x speedup in ld",
    99.8 +http://sources.redhat.com/ml/binutils/2005-03/msg00847.html
    99.9 +
   99.10 +Wildcard section matching enhancement, backported from the binutils CVS tree.
   99.11 +Here's the CVS log comment from the original change to ldlang.c:
   99.12 +
   99.13 +revision 1.177
   99.14 +date: 2005/04/06 15:33:02;  author: jakub;  state: Exp;  lines: +438 -51
   99.15 +2005-04-06  Jakub Jelinek  <jakub@redhat.com>
   99.16 +
   99.17 +        * ldlang.c: Formatting.
   99.18 +        (walk_wild_consider_section): Remember return value from wildcardp.
   99.19 +        (is_simple_wild): Use strcspn instead of 2 strpbrk calls and strlen.
   99.20 +        (wild_spec_can_overlap): Use strcspn instead of strpbrk and strlen.
   99.21 +
   99.22 +2005-04-06  Robert O'Callahan  <rocallahan@novell.com>
   99.23 +
   99.24 +        * ld.h (lean_section_userdata_type): Remove.
   99.25 +        (fat_section_userdata_type): Remove file field.
   99.26 +        (SECTION_USERDATA_SIZE): Remove.
   99.27 +        * ldlang.c (init_os): Eliminate initialization of unused
   99.28 +        lean_section_userdata_type.
   99.29 +
   99.30 +        * ldlang.h (callback_t, walk_wild_section_handler_t): New
   99.31 +        typedefs.
   99.32 +        (struct lang_wild_statement_struct): Add walk_wild_section_handler
   99.33 +        and handler_data fields.
   99.34 +        * ldlang.c (callback_t): Removed.
   99.35 +        (walk_wild_consider_section, walk_wild_section_general,
   99.36 +        section_iterator_callback, find_section, is_simple_wild,
   99.37 +        match_simple_wild, walk_wild_section_specs1_wild0,
   99.38 +        walk_wild_section_specs1_wild1, walk_wild_section_specs2_wild1,
   99.39 +        walk_wild_section_specs3_wild2, walk_wild_section_specs4_wild2,
   99.40 +        wild_spec_can_overlap, analyze_walk_wild_section_handler): New
   99.41 +        functions.
   99.42 +        (lang_add_wild): Call analyze_walk_wild_section_handler.
   99.43 +        (walk_wild_section): Renamed to walk_wild_section_general and
   99.44 +        created a wrapper function.
   99.45 +        (section_iterator_callback_data): New typedef.
   99.46 +
   99.47 +
   99.48 +Index: src/ld/ld.h
   99.49 +===================================================================
   99.50 +RCS file: /cvs/src/src/ld/ld.h,v
   99.51 +retrieving revision 1.26
   99.52 +retrieving revision 1.27
   99.53 +diff -u -r1.26 -r1.27
   99.54 +--- binutils/ld/ld.h.old	16 Mar 2005 21:52:42 -0000	1.26
   99.55 ++++ binutils/ld/ld.h	6 Apr 2005 15:33:02 -0000	1.27
   99.56 +@@ -1,6 +1,6 @@
   99.57 + /* ld.h -- general linker header file
   99.58 +    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
   99.59 +-   2001, 2002, 2003, 2004
   99.60 ++   2001, 2002, 2003, 2004, 2005
   99.61 +    Free Software Foundation, Inc.
   99.62 + 
   99.63 +    This file is part of GLD, the Gnu Linker.
   99.64 +@@ -89,28 +89,15 @@
   99.65 +   struct map_symbol_def *next;
   99.66 + };
   99.67 + 
   99.68 +-/* Extra information we hold on sections */
   99.69 +-typedef struct lean_user_section_struct {
   99.70 +-  /* For output sections: pointer to the section where this data will go.  */
   99.71 +-  struct lang_input_statement_struct *file;
   99.72 +-} lean_section_userdata_type;
   99.73 +-
   99.74 + /* The initial part of fat_user_section_struct has to be idential with
   99.75 +    lean_user_section_struct.  */
   99.76 + typedef struct fat_user_section_struct {
   99.77 +-  /* For output sections: pointer to the section where this data will go.  */
   99.78 +-  struct lang_input_statement_struct *file;
   99.79 +   /* For input sections, when writing a map file: head / tail of a linked
   99.80 +      list of hash table entries for symbols defined in this section.  */
   99.81 +   struct map_symbol_def *map_symbol_def_head;
   99.82 +   struct map_symbol_def **map_symbol_def_tail;
   99.83 + } fat_section_userdata_type;
   99.84 + 
   99.85 +-#define SECTION_USERDATA_SIZE \
   99.86 +- (command_line.reduce_memory_overheads \
   99.87 +-  ? sizeof (lean_section_userdata_type) \
   99.88 +-  : sizeof (fat_section_userdata_type))
   99.89 +-
   99.90 + #define get_userdata(x) ((x)->userdata)
   99.91 + 
   99.92 + #define BYTE_SIZE	(1)
   99.93 +Index: src/ld/ldlang.c
   99.94 +===================================================================
   99.95 +RCS file: /cvs/src/src/ld/ldlang.c,v
   99.96 +retrieving revision 1.176
   99.97 +retrieving revision 1.177
   99.98 +diff -u -r1.176 -r1.177
   99.99 +--- binutils/ld/ldlang.c.old	18 Mar 2005 13:56:26 -0000	1.176
  99.100 ++++ binutils/ld/ldlang.c	6 Apr 2005 15:33:02 -0000	1.177
  99.101 +@@ -84,9 +84,6 @@
  99.102 + static void lang_record_phdrs (void);
  99.103 + static void lang_do_version_exports_section (void);
  99.104 + 
  99.105 +-typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
  99.106 +-			    asection *, lang_input_statement_type *, void *);
  99.107 +-
  99.108 + /* Exported variables.  */
  99.109 + lang_output_section_statement_type *abs_output_section;
  99.110 + lang_statement_list_type lang_output_section_statement;
  99.111 +@@ -155,21 +152,71 @@
  99.112 + 
  99.113 + /* Generic traversal routines for finding matching sections.  */
  99.114 + 
  99.115 ++/* Try processing a section against a wildcard.  This just calls
  99.116 ++   the callback unless the filename exclusion list is present
  99.117 ++   and excludes the file.  It's hardly ever present so this
  99.118 ++   function is very fast.  */
  99.119 ++
  99.120 ++static void
  99.121 ++walk_wild_consider_section (lang_wild_statement_type *ptr,
  99.122 ++			    lang_input_statement_type *file,
  99.123 ++			    asection *s,
  99.124 ++			    struct wildcard_list *sec,
  99.125 ++			    callback_t callback,
  99.126 ++			    void *data)
  99.127 ++{
  99.128 ++  bfd_boolean skip = FALSE;
  99.129 ++  struct name_list *list_tmp;
  99.130 ++
  99.131 ++  /* Don't process sections from files which were
  99.132 ++     excluded.  */
  99.133 ++  for (list_tmp = sec->spec.exclude_name_list;
  99.134 ++       list_tmp;
  99.135 ++       list_tmp = list_tmp->next)
  99.136 ++    {
  99.137 ++      bfd_boolean is_wildcard = wildcardp (list_tmp->name);
  99.138 ++      if (is_wildcard)
  99.139 ++	skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
  99.140 ++      else
  99.141 ++	skip = strcmp (list_tmp->name, file->filename) == 0;
  99.142 ++
  99.143 ++      /* If this file is part of an archive, and the archive is
  99.144 ++	 excluded, exclude this file.  */
  99.145 ++      if (! skip && file->the_bfd != NULL
  99.146 ++	  && file->the_bfd->my_archive != NULL
  99.147 ++	  && file->the_bfd->my_archive->filename != NULL)
  99.148 ++	{
  99.149 ++	  if (is_wildcard)
  99.150 ++	    skip = fnmatch (list_tmp->name,
  99.151 ++			    file->the_bfd->my_archive->filename,
  99.152 ++			    0) == 0;
  99.153 ++	  else
  99.154 ++	    skip = strcmp (list_tmp->name,
  99.155 ++			   file->the_bfd->my_archive->filename) == 0;
  99.156 ++	}
  99.157 ++
  99.158 ++      if (skip)
  99.159 ++	break;
  99.160 ++    }
  99.161 ++
  99.162 ++  if (!skip)
  99.163 ++    (*callback) (ptr, sec, s, file, data);
  99.164 ++}
  99.165 ++
  99.166 ++/* Lowest common denominator routine that can handle everything correctly,
  99.167 ++   but slowly.  */
  99.168 ++
  99.169 + static void
  99.170 +-walk_wild_section (lang_wild_statement_type *ptr,
  99.171 +-		   lang_input_statement_type *file,
  99.172 +-		   callback_t callback,
  99.173 +-		   void *data)
  99.174 ++walk_wild_section_general (lang_wild_statement_type *ptr,
  99.175 ++			   lang_input_statement_type *file,
  99.176 ++			   callback_t callback,
  99.177 ++			   void *data)
  99.178 + {
  99.179 +   asection *s;
  99.180 +-
  99.181 +-  if (file->just_syms_flag)
  99.182 +-    return;
  99.183 ++  struct wildcard_list *sec;
  99.184 + 
  99.185 +   for (s = file->the_bfd->sections; s != NULL; s = s->next)
  99.186 +     {
  99.187 +-      struct wildcard_list *sec;
  99.188 +-
  99.189 +       sec = ptr->section_list;
  99.190 +       if (sec == NULL)
  99.191 + 	(*callback) (ptr, sec, s, file, data);
  99.192 +@@ -177,39 +224,8 @@
  99.193 +       while (sec != NULL)
  99.194 + 	{
  99.195 + 	  bfd_boolean skip = FALSE;
  99.196 +-	  struct name_list *list_tmp;
  99.197 + 
  99.198 +-	  /* Don't process sections from files which were
  99.199 +-	     excluded.  */
  99.200 +-	  for (list_tmp = sec->spec.exclude_name_list;
  99.201 +-	       list_tmp;
  99.202 +-	       list_tmp = list_tmp->next)
  99.203 +-	    {
  99.204 +-	      if (wildcardp (list_tmp->name))
  99.205 +-		skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
  99.206 +-	      else
  99.207 +-		skip = strcmp (list_tmp->name, file->filename) == 0;
  99.208 +-
  99.209 +-	      /* If this file is part of an archive, and the archive is
  99.210 +-		 excluded, exclude this file.  */
  99.211 +-	      if (! skip && file->the_bfd != NULL
  99.212 +-		  && file->the_bfd->my_archive != NULL
  99.213 +-		  && file->the_bfd->my_archive->filename != NULL)
  99.214 +-		{
  99.215 +-		  if (wildcardp (list_tmp->name))
  99.216 +-		    skip = fnmatch (list_tmp->name,
  99.217 +-				    file->the_bfd->my_archive->filename,
  99.218 +-				    0) == 0;
  99.219 +-		  else
  99.220 +-		    skip = strcmp (list_tmp->name,
  99.221 +-				   file->the_bfd->my_archive->filename) == 0;
  99.222 +-		}
  99.223 +-
  99.224 +-	      if (skip)
  99.225 +-		break;
  99.226 +-	    }
  99.227 +-
  99.228 +-	  if (!skip && sec->spec.name != NULL)
  99.229 ++	  if (sec->spec.name != NULL)
  99.230 + 	    {
  99.231 + 	      const char *sname = bfd_get_section_name (file->the_bfd, s);
  99.232 + 
  99.233 +@@ -220,13 +236,381 @@
  99.234 + 	    }
  99.235 + 
  99.236 + 	  if (!skip)
  99.237 +-	    (*callback) (ptr, sec, s, file, data);
  99.238 ++	    walk_wild_consider_section (ptr, file, s, sec, callback, data);
  99.239 + 
  99.240 + 	  sec = sec->next;
  99.241 + 	}
  99.242 +     }
  99.243 + }
  99.244 + 
  99.245 ++/* Routines to find a single section given its name.  If there's more
  99.246 ++   than one section with that name, we report that.  */
  99.247 ++
  99.248 ++typedef struct
  99.249 ++{
  99.250 ++  asection *found_section;
  99.251 ++  bfd_boolean multiple_sections_found;
  99.252 ++} section_iterator_callback_data;
  99.253 ++
  99.254 ++static bfd_boolean
  99.255 ++section_iterator_callback (bfd *bfd ATTRIBUTE_UNUSED, asection *s, void *data)
  99.256 ++{
  99.257 ++  section_iterator_callback_data *d = data;
  99.258 ++
  99.259 ++  if (d->found_section != NULL)
  99.260 ++    {
  99.261 ++      d->multiple_sections_found = TRUE;
  99.262 ++      return TRUE;
  99.263 ++    }
  99.264 ++
  99.265 ++  d->found_section = s;
  99.266 ++  return FALSE;
  99.267 ++}
  99.268 ++
  99.269 ++static asection *
  99.270 ++find_section (lang_input_statement_type *file,
  99.271 ++	      struct wildcard_list *sec,
  99.272 ++	      bfd_boolean *multiple_sections_found)
  99.273 ++{
  99.274 ++  section_iterator_callback_data cb_data = { NULL, FALSE };
  99.275 ++
  99.276 ++  bfd_get_section_by_name_if (file->the_bfd, sec->spec.name, 
  99.277 ++			      section_iterator_callback, &cb_data);
  99.278 ++  *multiple_sections_found = cb_data.multiple_sections_found;
  99.279 ++  return cb_data.found_section;
  99.280 ++}
  99.281 ++
  99.282 ++/* Code for handling simple wildcards without going through fnmatch,
  99.283 ++   which can be expensive because of charset translations etc.  */
  99.284 ++
  99.285 ++/* A simple wild is a literal string followed by a single '*',
  99.286 ++   where the literal part is at least 4 characters long.  */
  99.287 ++
  99.288 ++static bfd_boolean
  99.289 ++is_simple_wild (const char *name)
  99.290 ++{
  99.291 ++  size_t len = strcspn (name, "*?[");
  99.292 ++  return len >= 4 && name[len] == '*' && name[len + 1] == '\0';
  99.293 ++}
  99.294 ++
  99.295 ++static bfd_boolean
  99.296 ++match_simple_wild (const char *pattern, const char *name)
  99.297 ++{
  99.298 ++  /* The first four characters of the pattern are guaranteed valid
  99.299 ++     non-wildcard characters.  So we can go faster.  */
  99.300 ++  if (pattern[0] != name[0] || pattern[1] != name[1]
  99.301 ++      || pattern[2] != name[2] || pattern[3] != name[3])
  99.302 ++    return FALSE;
  99.303 ++
  99.304 ++  pattern += 4;
  99.305 ++  name += 4;
  99.306 ++  while (*pattern != '*')
  99.307 ++    if (*name++ != *pattern++)
  99.308 ++      return FALSE;
  99.309 ++
  99.310 ++  return TRUE;
  99.311 ++}
  99.312 ++
  99.313 ++/* Specialized, optimized routines for handling different kinds of
  99.314 ++   wildcards */
  99.315 ++
  99.316 ++static void
  99.317 ++walk_wild_section_specs1_wild0 (lang_wild_statement_type *ptr,
  99.318 ++				lang_input_statement_type *file,
  99.319 ++				callback_t callback,
  99.320 ++				void *data)
  99.321 ++{
  99.322 ++  /* We can just do a hash lookup for the section with the right name.
  99.323 ++     But if that lookup discovers more than one section with the name
  99.324 ++     (should be rare), we fall back to the general algorithm because
  99.325 ++     we would otherwise have to sort the sections to make sure they
  99.326 ++     get processed in the bfd's order.  */
  99.327 ++  bfd_boolean multiple_sections_found;
  99.328 ++  struct wildcard_list *sec0 = ptr->handler_data[0];
  99.329 ++  asection *s0 = find_section (file, sec0, &multiple_sections_found);
  99.330 ++
  99.331 ++  if (multiple_sections_found)
  99.332 ++    walk_wild_section_general (ptr, file, callback, data);
  99.333 ++  else if (s0)
  99.334 ++    walk_wild_consider_section (ptr, file, s0, sec0, callback, data);
  99.335 ++}
  99.336 ++
  99.337 ++static void
  99.338 ++walk_wild_section_specs1_wild1 (lang_wild_statement_type *ptr,
  99.339 ++				lang_input_statement_type *file,
  99.340 ++				callback_t callback,
  99.341 ++				void *data)
  99.342 ++{
  99.343 ++  asection *s;
  99.344 ++  struct wildcard_list *wildsec0 = ptr->handler_data[0];
  99.345 ++
  99.346 ++  for (s = file->the_bfd->sections; s != NULL; s = s->next)
  99.347 ++    {
  99.348 ++      const char *sname = bfd_get_section_name (file->the_bfd, s);
  99.349 ++      bfd_boolean skip = !match_simple_wild (wildsec0->spec.name, sname);
  99.350 ++
  99.351 ++      if (!skip)
  99.352 ++	walk_wild_consider_section (ptr, file, s, wildsec0, callback, data);
  99.353 ++    }
  99.354 ++}
  99.355 ++
  99.356 ++static void
  99.357 ++walk_wild_section_specs2_wild1 (lang_wild_statement_type *ptr,
  99.358 ++				lang_input_statement_type *file,
  99.359 ++				callback_t callback,
  99.360 ++				void *data)
  99.361 ++{
  99.362 ++  asection *s;
  99.363 ++  struct wildcard_list *sec0 = ptr->handler_data[0];
  99.364 ++  struct wildcard_list *wildsec1 = ptr->handler_data[1];
  99.365 ++  bfd_boolean multiple_sections_found;
  99.366 ++  asection *s0 = find_section (file, sec0, &multiple_sections_found);
  99.367 ++
  99.368 ++  if (multiple_sections_found)
  99.369 ++    {
  99.370 ++      walk_wild_section_general (ptr, file, callback, data);
  99.371 ++      return;
  99.372 ++    }
  99.373 ++
  99.374 ++  /* Note that if the section was not found, s0 is NULL and
  99.375 ++     we'll simply never succeed the s == s0 test below.  */
  99.376 ++  for (s = file->the_bfd->sections; s != NULL; s = s->next)
  99.377 ++    {
  99.378 ++      /* Recall that in this code path, a section cannot satisfy more
  99.379 ++	 than one spec, so if s == s0 then it cannot match
  99.380 ++	 wildspec1.  */
  99.381 ++      if (s == s0)
  99.382 ++	walk_wild_consider_section (ptr, file, s, sec0, callback, data);
  99.383 ++      else
  99.384 ++	{
  99.385 ++	  const char *sname = bfd_get_section_name (file->the_bfd, s);
  99.386 ++	  bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
  99.387 ++
  99.388 ++	  if (!skip)
  99.389 ++	    walk_wild_consider_section (ptr, file, s, wildsec1, callback,
  99.390 ++					data);
  99.391 ++	}
  99.392 ++    }
  99.393 ++}
  99.394 ++
  99.395 ++static void
  99.396 ++walk_wild_section_specs3_wild2 (lang_wild_statement_type *ptr,
  99.397 ++				lang_input_statement_type *file,
  99.398 ++				callback_t callback,
  99.399 ++				void *data)
  99.400 ++{
  99.401 ++  asection *s;
  99.402 ++  struct wildcard_list *sec0 = ptr->handler_data[0];
  99.403 ++  struct wildcard_list *wildsec1 = ptr->handler_data[1];
  99.404 ++  struct wildcard_list *wildsec2 = ptr->handler_data[2];
  99.405 ++  bfd_boolean multiple_sections_found;
  99.406 ++  asection *s0 = find_section (file, sec0, &multiple_sections_found);
  99.407 ++
  99.408 ++  if (multiple_sections_found)
  99.409 ++    {
  99.410 ++      walk_wild_section_general (ptr, file, callback, data);
  99.411 ++      return;
  99.412 ++    }
  99.413 ++
  99.414 ++  for (s = file->the_bfd->sections; s != NULL; s = s->next)
  99.415 ++    {
  99.416 ++      if (s == s0)
  99.417 ++	walk_wild_consider_section (ptr, file, s, sec0, callback, data);
  99.418 ++      else
  99.419 ++	{
  99.420 ++	  const char *sname = bfd_get_section_name (file->the_bfd, s);
  99.421 ++	  bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
  99.422 ++
  99.423 ++	  if (!skip)
  99.424 ++	    walk_wild_consider_section (ptr, file, s, wildsec1, callback, data);
  99.425 ++	  else
  99.426 ++	    {
  99.427 ++	      skip = !match_simple_wild (wildsec2->spec.name, sname);
  99.428 ++	      if (!skip)
  99.429 ++		walk_wild_consider_section (ptr, file, s, wildsec2, callback,
  99.430 ++					    data);
  99.431 ++	    }
  99.432 ++	}
  99.433 ++    }
  99.434 ++}
  99.435 ++
  99.436 ++static void
  99.437 ++walk_wild_section_specs4_wild2 (lang_wild_statement_type *ptr,
  99.438 ++				lang_input_statement_type *file,
  99.439 ++				callback_t callback,
  99.440 ++				void *data)
  99.441 ++{
  99.442 ++  asection *s;
  99.443 ++  struct wildcard_list *sec0 = ptr->handler_data[0];
  99.444 ++  struct wildcard_list *sec1 = ptr->handler_data[1];
  99.445 ++  struct wildcard_list *wildsec2 = ptr->handler_data[2];
  99.446 ++  struct wildcard_list *wildsec3 = ptr->handler_data[3];
  99.447 ++  bfd_boolean multiple_sections_found;
  99.448 ++  asection *s0 = find_section (file, sec0, &multiple_sections_found), *s1;
  99.449 ++
  99.450 ++  if (multiple_sections_found)
  99.451 ++    {
  99.452 ++      walk_wild_section_general (ptr, file, callback, data);
  99.453 ++      return;
  99.454 ++    }
  99.455 ++
  99.456 ++  s1 = find_section (file, sec1, &multiple_sections_found);
  99.457 ++  if (multiple_sections_found)
  99.458 ++    {
  99.459 ++      walk_wild_section_general (ptr, file, callback, data);
  99.460 ++      return;
  99.461 ++    }
  99.462 ++
  99.463 ++  for (s = file->the_bfd->sections; s != NULL; s = s->next)
  99.464 ++    {
  99.465 ++      if (s == s0)
  99.466 ++	walk_wild_consider_section (ptr, file, s, sec0, callback, data);
  99.467 ++      else
  99.468 ++	if (s == s1)
  99.469 ++	  walk_wild_consider_section (ptr, file, s, sec1, callback, data);
  99.470 ++	else
  99.471 ++	  {
  99.472 ++	    const char *sname = bfd_get_section_name (file->the_bfd, s);
  99.473 ++	    bfd_boolean skip = !match_simple_wild (wildsec2->spec.name,
  99.474 ++						   sname);
  99.475 ++
  99.476 ++	    if (!skip)
  99.477 ++	      walk_wild_consider_section (ptr, file, s, wildsec2, callback,
  99.478 ++					  data);
  99.479 ++	    else
  99.480 ++	      {
  99.481 ++		skip = !match_simple_wild (wildsec3->spec.name, sname);
  99.482 ++		if (!skip)
  99.483 ++		  walk_wild_consider_section (ptr, file, s, wildsec3,
  99.484 ++					      callback, data);
  99.485 ++	      }
  99.486 ++	  }
  99.487 ++    }
  99.488 ++}
  99.489 ++
  99.490 ++static void
  99.491 ++walk_wild_section (lang_wild_statement_type *ptr,
  99.492 ++		   lang_input_statement_type *file,
  99.493 ++		   callback_t callback,
  99.494 ++		   void *data)
  99.495 ++{
  99.496 ++  if (file->just_syms_flag)
  99.497 ++    return;
  99.498 ++
  99.499 ++  (*ptr->walk_wild_section_handler) (ptr, file, callback, data);
  99.500 ++}
  99.501 ++
  99.502 ++/* Returns TRUE when name1 is a wildcard spec that might match
  99.503 ++   something name2 can match.  We're conservative: we return FALSE
  99.504 ++   only if the prefixes of name1 and name2 are different up to the
  99.505 ++   first wildcard character.  */
  99.506 ++
  99.507 ++static bfd_boolean
  99.508 ++wild_spec_can_overlap (const char *name1, const char *name2)
  99.509 ++{
  99.510 ++  size_t prefix1_len = strcspn (name1, "?*[");
  99.511 ++  size_t prefix2_len = strcspn (name2, "?*[");
  99.512 ++  size_t min_prefix_len;
  99.513 ++
  99.514 ++  /* Note that if there is no wildcard character, then we treat the
  99.515 ++     terminating 0 as part of the prefix.  Thus ".text" won't match
  99.516 ++     ".text." or ".text.*", for example.  */
  99.517 ++  if (name1[prefix1_len] == '\0')
  99.518 ++    prefix1_len++;
  99.519 ++  if (name2[prefix2_len] == '\0')
  99.520 ++    prefix2_len++;
  99.521 ++
  99.522 ++  min_prefix_len = prefix1_len < prefix2_len ? prefix1_len : prefix2_len;
  99.523 ++
  99.524 ++  return memcmp (name1, name2, min_prefix_len) == 0;
  99.525 ++}
  99.526 ++
  99.527 ++/* Select specialized code to handle various kinds of wildcard
  99.528 ++   statements.  */
  99.529 ++
  99.530 ++static void
  99.531 ++analyze_walk_wild_section_handler (lang_wild_statement_type *ptr)
  99.532 ++{
  99.533 ++  int sec_count = 0;
  99.534 ++  int wild_name_count = 0;
  99.535 ++  struct wildcard_list *sec;
  99.536 ++  int signature;
  99.537 ++  int data_counter;
  99.538 ++
  99.539 ++  ptr->walk_wild_section_handler = walk_wild_section_general;
  99.540 ++
  99.541 ++  /* Count how many wildcard_specs there are, and how many of those
  99.542 ++     actually use wildcards in the name.  Also, bail out if any of the
  99.543 ++     wildcard names are NULL. (Can this actually happen?
  99.544 ++     walk_wild_section used to test for it.)  And bail out if any
  99.545 ++     of the wildcards are more complex than a simple string
  99.546 ++     ending in a single '*'.  */
  99.547 ++  for (sec = ptr->section_list; sec != NULL; sec = sec->next)
  99.548 ++    {
  99.549 ++      ++sec_count;
  99.550 ++      if (sec->spec.name == NULL)
  99.551 ++	return;
  99.552 ++      if (wildcardp (sec->spec.name))
  99.553 ++	{
  99.554 ++	  ++wild_name_count;
  99.555 ++	  if (!is_simple_wild (sec->spec.name))
  99.556 ++	    return;
  99.557 ++	}
  99.558 ++    }
  99.559 ++
  99.560 ++  /* The zero-spec case would be easy to optimize but it doesn't
  99.561 ++     happen in practice.  Likewise, more than 4 specs doesn't
  99.562 ++     happen in practice.  */
  99.563 ++  if (sec_count == 0 || sec_count > 4)
  99.564 ++    return;
  99.565 ++
  99.566 ++  /* Check that no two specs can match the same section.  */
  99.567 ++  for (sec = ptr->section_list; sec != NULL; sec = sec->next)
  99.568 ++    {
  99.569 ++      struct wildcard_list *sec2;
  99.570 ++      for (sec2 = sec->next; sec2 != NULL; sec2 = sec2->next)
  99.571 ++	{
  99.572 ++	  if (wild_spec_can_overlap (sec->spec.name, sec2->spec.name))
  99.573 ++	    return;
  99.574 ++	}
  99.575 ++    }
  99.576 ++
  99.577 ++  signature = (sec_count << 8) + wild_name_count;
  99.578 ++  switch (signature)
  99.579 ++    {
  99.580 ++    case 0x0100:
  99.581 ++      ptr->walk_wild_section_handler = walk_wild_section_specs1_wild0;
  99.582 ++      break;
  99.583 ++    case 0x0101:
  99.584 ++      ptr->walk_wild_section_handler = walk_wild_section_specs1_wild1;
  99.585 ++      break;
  99.586 ++    case 0x0201:
  99.587 ++      ptr->walk_wild_section_handler = walk_wild_section_specs2_wild1;
  99.588 ++      break;
  99.589 ++    case 0x0302:
  99.590 ++      ptr->walk_wild_section_handler = walk_wild_section_specs3_wild2;
  99.591 ++      break;
  99.592 ++    case 0x0402:
  99.593 ++      ptr->walk_wild_section_handler = walk_wild_section_specs4_wild2;
  99.594 ++      break;
  99.595 ++    default:
  99.596 ++      return;
  99.597 ++    }
  99.598 ++
  99.599 ++  /* Now fill the data array with pointers to the specs, first the
  99.600 ++     specs with non-wildcard names, then the specs with wildcard
  99.601 ++     names.  It's OK to process the specs in different order from the
  99.602 ++     given order, because we've already determined that no section
  99.603 ++     will match more than one spec.  */
  99.604 ++  data_counter = 0;
  99.605 ++  for (sec = ptr->section_list; sec != NULL; sec = sec->next)
  99.606 ++    if (!wildcardp (sec->spec.name))
  99.607 ++      ptr->handler_data[data_counter++] = sec;
  99.608 ++  for (sec = ptr->section_list; sec != NULL; sec = sec->next)
  99.609 ++    if (wildcardp (sec->spec.name))
  99.610 ++      ptr->handler_data[data_counter++] = sec;
  99.611 ++}
  99.612 ++
  99.613 + /* Handle a wild statement for a single file F.  */
  99.614 + 
  99.615 + static void
  99.616 +@@ -1175,17 +1559,12 @@
  99.617 + static void
  99.618 + init_os (lang_output_section_statement_type *s)
  99.619 + {
  99.620 +-  lean_section_userdata_type *new;
  99.621 +-
  99.622 +   if (s->bfd_section != NULL)
  99.623 +     return;
  99.624 + 
  99.625 +   if (strcmp (s->name, DISCARD_SECTION_NAME) == 0)
  99.626 +     einfo (_("%P%F: Illegal use of `%s' section\n"), DISCARD_SECTION_NAME);
  99.627 + 
  99.628 +-  new = stat_alloc (SECTION_USERDATA_SIZE);
  99.629 +-  memset (new, 0, SECTION_USERDATA_SIZE);
  99.630 +-
  99.631 +   s->bfd_section = bfd_get_section_by_name (output_bfd, s->name);
  99.632 +   if (s->bfd_section == NULL)
  99.633 +     s->bfd_section = bfd_make_section (output_bfd, s->name);
  99.634 +@@ -1199,7 +1578,14 @@
  99.635 +   /* We initialize an output sections output offset to minus its own
  99.636 +      vma to allow us to output a section through itself.  */
  99.637 +   s->bfd_section->output_offset = 0;
  99.638 +-  get_userdata (s->bfd_section) = new;
  99.639 ++  if (!command_line.reduce_memory_overheads)
  99.640 ++    {
  99.641 ++      fat_section_userdata_type *new
  99.642 ++	= stat_alloc (sizeof (fat_section_userdata_type));
  99.643 ++      memset (new, 0, sizeof (fat_section_userdata_type));
  99.644 ++      get_userdata (s->bfd_section) = new;
  99.645 ++    }
  99.646 ++
  99.647 + 
  99.648 +   /* If there is a base address, make sure that any sections it might
  99.649 +      mention are initialized.  */
  99.650 +@@ -4939,6 +5325,7 @@
  99.651 +   new->section_list = section_list;
  99.652 +   new->keep_sections = keep_sections;
  99.653 +   lang_list_init (&new->children);
  99.654 ++  analyze_walk_wild_section_handler (new);
  99.655 + }
  99.656 + 
  99.657 + void
  99.658 +Index: src/ld/ldlang.h
  99.659 +===================================================================
  99.660 +RCS file: /cvs/src/src/ld/ldlang.h,v
  99.661 +retrieving revision 1.44
  99.662 +retrieving revision 1.45
  99.663 +diff -u -r1.44 -r1.45
  99.664 +--- binutils/ld/ldlang.h.old	3 Mar 2005 11:51:58 -0000	1.44
  99.665 ++++ binutils/ld/ldlang.h	6 Apr 2005 15:33:03 -0000	1.45
  99.666 +@@ -298,7 +298,17 @@
  99.667 +   union lang_statement_union *file;
  99.668 + } lang_afile_asection_pair_statement_type;
  99.669 + 
  99.670 +-typedef struct lang_wild_statement_struct
  99.671 ++typedef struct lang_wild_statement_struct lang_wild_statement_type;
  99.672 ++
  99.673 ++typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
  99.674 ++			    asection *, lang_input_statement_type *, void *);
  99.675 ++
  99.676 ++typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
  99.677 ++					     lang_input_statement_type *,
  99.678 ++					     callback_t callback,
  99.679 ++					     void *data);
  99.680 ++
  99.681 ++struct lang_wild_statement_struct
  99.682 + {
  99.683 +   lang_statement_header_type header;
  99.684 +   const char *filename;
  99.685 +@@ -306,7 +316,10 @@
  99.686 +   struct wildcard_list *section_list;
  99.687 +   bfd_boolean keep_sections;
  99.688 +   lang_statement_list_type children;
  99.689 +-} lang_wild_statement_type;
  99.690 ++
  99.691 ++  walk_wild_section_handler_t walk_wild_section_handler;
  99.692 ++  struct wildcard_list *handler_data[4];
  99.693 ++};
  99.694 + 
  99.695 + typedef struct lang_address_statement_struct
  99.696 + {
   100.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   100.2 +++ b/patches/binutils/2.16.1/cross-gprof.patch	Sat Feb 24 11:00:05 2007 +0000
   100.3 @@ -0,0 +1,22 @@
   100.4 +--- binutils-2.15/configure.old	2004-07-21 21:36:47.000000000 -0700
   100.5 ++++ binutils-2.15/configure	2004-07-21 21:37:08.000000000 -0700
   100.6 +@@ -999,7 +999,7 @@
   100.7 + 
   100.8 + # Some tools are only suitable for building in a "native" situation.
   100.9 + # Remove these if host!=target.  
  100.10 +-native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
  100.11 ++native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
  100.12 + 
  100.13 + # Similarly, some are only suitable for cross toolchains.
  100.14 + # Remove these if host=target.
  100.15 +--- binutils-2.15/configure.in.old	2004-07-21 21:37:19.000000000 -0700
  100.16 ++++ binutils-2.15/configure.in	2004-07-21 21:37:34.000000000 -0700
  100.17 +@@ -236,7 +236,7 @@
  100.18 + 
  100.19 + # Some tools are only suitable for building in a "native" situation.
  100.20 + # Remove these if host!=target.  
  100.21 +-native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
  100.22 ++native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
  100.23 + 
  100.24 + # Similarly, some are only suitable for cross toolchains.
  100.25 + # Remove these if host=target.
   101.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   101.2 +++ b/patches/binutils/2.16.1/stabs-tweak.patch	Sat Feb 24 11:00:05 2007 +0000
   101.3 @@ -0,0 +1,28 @@
   101.4 +Signed-off-by: dank@kegel.com
   101.5 +
   101.6 +See http://sourceware.org/ml/binutils/2005-12/msg00270.html
   101.7 +http://sourceware.org/ml/binutils-cvs/2005-12/msg00139.html
   101.8 +
   101.9 +STABS hash table size change, backported from the binutils CVS tree.  Here's
  101.10 +the CVS log comment for the original change:
  101.11 +
  101.12 +revision 1.25
  101.13 +date: 2005/12/29 10:29:23;  author: nickc;  state: Exp;  lines: +2 -3
  101.14 +(_bfd_link_section_stabs): Use bfd_hash_table_init rather than
  101.15 +bfd_hash_table_init_n(...,251) so that the size of the hash table can be
  101.16 +controlled by the user.
  101.17 +
  101.18 +--- binutils/bfd/stabs.c.old	4 May 2005 15:53:39 -0000	1.24
  101.19 ++++ binutils/bfd/stabs.c	29 Dec 2005 10:29:23 -0000	1.25
  101.20 +@@ -194,9 +194,8 @@
  101.21 + 	goto error_return;
  101.22 +       /* Make sure the first byte is zero.  */
  101.23 +       (void) _bfd_stringtab_add (sinfo->strings, "", TRUE, TRUE);
  101.24 +-      if (! bfd_hash_table_init_n (&sinfo->includes,
  101.25 +-				   stab_link_includes_newfunc,
  101.26 +-				   251))
  101.27 ++      if (! bfd_hash_table_init (&sinfo->includes,
  101.28 ++				 stab_link_includes_newfunc))
  101.29 + 	goto error_return;
  101.30 +       sinfo->stabstr = bfd_make_section_anyway (abfd, ".stabstr");
  101.31 +       if (sinfo->stabstr == NULL)
   102.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   102.2 +++ b/patches/binutils/2.17.50.0.10/100-uclibc-conf.patch	Sat Feb 24 11:00:05 2007 +0000
   102.3 @@ -0,0 +1,139 @@
   102.4 +--- binutils-2.16.91.0.7/bfd/configure
   102.5 ++++ binutils-2.16.91.0.7/bfd/configure
   102.6 +@@ -3576,7 +3576,7 @@
   102.7 +   ;;
   102.8 + 
   102.9 + # This must be Linux ELF.
  102.10 +-linux-gnu*)
  102.11 ++linux-gnu*|linux-uclibc*)
  102.12 +   lt_cv_deplibs_check_method=pass_all
  102.13 +   ;;
  102.14 + 
  102.15 +--- binutils-2.16.91.0.7/binutils/configure
  102.16 ++++ binutils-2.16.91.0.7/binutils/configure
  102.17 +@@ -3411,7 +3411,7 @@
  102.18 +   ;;
  102.19 + 
  102.20 + # This must be Linux ELF.
  102.21 +-linux-gnu*)
  102.22 ++linux-gnu*|linux-uclibc*)
  102.23 +   lt_cv_deplibs_check_method=pass_all
  102.24 +   ;;
  102.25 + 
  102.26 +--- binutils-2.16.91.0.7/configure
  102.27 ++++ binutils-2.16.91.0.7/configure
  102.28 +@@ -1270,7 +1270,7 @@
  102.29 +   am33_2.0-*-linux*)
  102.30 +     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
  102.31 +     ;;
  102.32 +-  sh-*-linux*)
  102.33 ++  sh*-*-linux*)
  102.34 +     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
  102.35 +     ;;    
  102.36 +   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
  102.37 +@@ -1578,7 +1578,7 @@
  102.38 +   romp-*-*)
  102.39 +     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
  102.40 +     ;;
  102.41 +-  sh-*-* | sh64-*-*)
  102.42 ++  sh*-*-* | sh64-*-*)
  102.43 +     case "${host}" in
  102.44 +       i[3456789]86-*-vsta) ;; # don't add gprof back in
  102.45 +       i[3456789]86-*-go32*) ;; # don't add gprof back in
  102.46 +--- binutils-2.16.91.0.7/configure.in
  102.47 ++++ binutils-2.16.91.0.7/configure.in
  102.48 +@@ -468,7 +468,7 @@
  102.49 +   am33_2.0-*-linux*)
  102.50 +     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
  102.51 +     ;;
  102.52 +-  sh-*-linux*)
  102.53 ++  sh*-*-linux*)
  102.54 +     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
  102.55 +     ;;    
  102.56 +   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
  102.57 +@@ -776,7 +776,7 @@
  102.58 +   romp-*-*)
  102.59 +     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
  102.60 +     ;;
  102.61 +-  sh-*-* | sh64-*-*)
  102.62 ++  sh*-*-* | sh64-*-*)
  102.63 +     case "${host}" in
  102.64 +       i[[3456789]]86-*-vsta) ;; # don't add gprof back in
  102.65 +       i[[3456789]]86-*-go32*) ;; # don't add gprof back in
  102.66 +--- binutils-2.16.91.0.7/gas/configure
  102.67 ++++ binutils-2.16.91.0.7/gas/configure
  102.68 +@@ -3411,7 +3411,7 @@
  102.69 +   ;;
  102.70 + 
  102.71 + # This must be Linux ELF.
  102.72 +-linux-gnu*)
  102.73 ++linux-gnu*|linux-uclibc*)
  102.74 +   lt_cv_deplibs_check_method=pass_all
  102.75 +   ;;
  102.76 + 
  102.77 +--- binutils-2.16.91.0.7/gprof/configure
  102.78 ++++ binutils-2.16.91.0.7/gprof/configure
  102.79 +@@ -3419,6 +3419,11 @@
  102.80 +   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  102.81 +   ;;
  102.82 + 
  102.83 ++linux-uclibc*)
  102.84 ++  lt_cv_deplibs_check_method=pass_all
  102.85 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  102.86 ++  ;;
  102.87 ++
  102.88 + netbsd* | knetbsd*-gnu)
  102.89 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  102.90 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  102.91 +--- binutils-2.16.91.0.7/ld/configure
  102.92 ++++ binutils-2.16.91.0.7/ld/configure
  102.93 +@@ -3413,7 +3413,7 @@
  102.94 +   ;;
  102.95 + 
  102.96 + # This must be Linux ELF.
  102.97 +-linux-gnu*)
  102.98 ++linux-gnu*|linux-uclibc*)
  102.99 +   lt_cv_deplibs_check_method=pass_all
 102.100 +   ;;
 102.101 + 
 102.102 +--- binutils-2.16.91.0.7/libtool.m4
 102.103 ++++ binutils-2.16.91.0.7/libtool.m4
 102.104 +@@ -739,7 +739,7 @@
 102.105 +   ;;
 102.106 + 
 102.107 + # This must be Linux ELF.
 102.108 +-linux-gnu*)
 102.109 ++linux-gnu*|linux-uclibc*)
 102.110 +   lt_cv_deplibs_check_method=pass_all
 102.111 +   ;;
 102.112 + 
 102.113 +--- binutils-2.16.91.0.7/ltconfig
 102.114 ++++ binutils-2.16.91.0.7/ltconfig
 102.115 +@@ -602,6 +602,7 @@
 102.116 + 
 102.117 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
 102.118 + case $host_os in
 102.119 ++linux-uclibc*) ;;
 102.120 + linux-gnu*) ;;
 102.121 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
 102.122 + esac
 102.123 +@@ -1247,7 +1248,7 @@
 102.124 +   ;;
 102.125 + 
 102.126 + # This must be Linux ELF.
 102.127 +-linux-gnu*)
 102.128 ++linux-gnu*|linux-uclibc*)
 102.129 +   version_type=linux
 102.130 +   need_lib_prefix=no
 102.131 +   need_version=no
 102.132 +--- binutils-2.16.91.0.7/opcodes/configure
 102.133 ++++ binutils-2.16.91.0.7/opcodes/configure
 102.134 +@@ -3579,7 +3579,7 @@
 102.135 +   ;;
 102.136 + 
 102.137 + # This must be Linux ELF.
 102.138 +-linux-gnu*)
 102.139 ++linux-gnu*|linux-uclibc*)
 102.140 +   lt_cv_deplibs_check_method=pass_all
 102.141 +   ;;
 102.142 + 
   103.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   103.2 +++ b/patches/binutils/2.17.50.0.10/110-arm-eabi-conf.patch	Sat Feb 24 11:00:05 2007 +0000
   103.3 @@ -0,0 +1,24 @@
   103.4 +diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
   103.5 +--- binutils-2.16.91.0.7.orig/configure	2006-05-31 14:54:24.000000000 +0300
   103.6 ++++ binutils-2.16.91.0.7/configure	2006-05-31 14:55:53.000000000 +0300
   103.7 +@@ -1299,7 +1299,7 @@
   103.8 +   arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
   103.9 +     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
  103.10 +     ;;
  103.11 +-  arm*-*-linux-gnueabi)
  103.12 ++  arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
  103.13 +     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
  103.14 +     noconfigdirs="$noconfigdirs target-libjava target-libobjc"
  103.15 +     ;;
  103.16 +diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
  103.17 +--- binutils-2.16.91.0.7.orig/configure.in	2006-05-31 14:54:24.000000000 +0300
  103.18 ++++ binutils-2.16.91.0.7/configure.in	2006-05-31 14:55:53.000000000 +0300
  103.19 +@@ -497,7 +497,7 @@
  103.20 +   arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
  103.21 +     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
  103.22 +     ;;
  103.23 +-  arm*-*-linux-gnueabi)
  103.24 ++  arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
  103.25 +     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
  103.26 +     noconfigdirs="$noconfigdirs target-libjava target-libobjc"
  103.27 +     ;;
   104.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   104.2 +++ b/patches/binutils/2.17.50.0.10/300-001_ld_makefile_patch.patch	Sat Feb 24 11:00:05 2007 +0000
   104.3 @@ -0,0 +1,50 @@
   104.4 +#!/bin/sh -e
   104.5 +## 001_ld_makefile_patch.dpatch
   104.6 +##
   104.7 +## All lines beginning with `## DP:' are a description of the patch.
   104.8 +## DP: Description: correct where ld scripts are installed
   104.9 +## DP: Author: Chris Chimelis <chris@debian.org>
  104.10 +## DP: Upstream status: N/A
  104.11 +## DP: Date: ??
  104.12 +
  104.13 +if [ $# -ne 1 ]; then
  104.14 +    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  104.15 +    exit 1
  104.16 +fi
  104.17 +
  104.18 +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
  104.19 +patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
  104.20 +
  104.21 +case "$1" in
  104.22 +       -patch) patch $patch_opts -p1 < $0;;
  104.23 +       -unpatch) patch $patch_opts -p1 -R < $0;;
  104.24 +        *)
  104.25 +                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  104.26 +                exit 1;;
  104.27 +esac
  104.28 +
  104.29 +exit 0
  104.30 +
  104.31 +@DPATCH@
  104.32 +--- binutils-2.16.91.0.1/ld/Makefile.am
  104.33 ++++ binutils-2.16.91.0.1/ld/Makefile.am
  104.34 +@@ -20,7 +20,7 @@
  104.35 + # We put the scripts in the directory $(scriptdir)/ldscripts.
  104.36 + # We can't put the scripts in $(datadir) because the SEARCH_DIR
  104.37 + # directives need to be different for native and cross linkers.
  104.38 +-scriptdir = $(tooldir)/lib
  104.39 ++scriptdir = $(libdir)
  104.40 + 
  104.41 + EMUL = @EMUL@
  104.42 + EMULATION_OFILES = @EMULATION_OFILES@
  104.43 +--- binutils-2.16.91.0.1/ld/Makefile.in
  104.44 ++++ binutils-2.16.91.0.1/ld/Makefile.in
  104.45 +@@ -268,7 +268,7 @@
  104.46 + # We put the scripts in the directory $(scriptdir)/ldscripts.
  104.47 + # We can't put the scripts in $(datadir) because the SEARCH_DIR
  104.48 + # directives need to be different for native and cross linkers.
  104.49 +-scriptdir = $(tooldir)/lib
  104.50 ++scriptdir = $(libdir)
  104.51 + BASEDIR = $(srcdir)/..
  104.52 + BFDDIR = $(BASEDIR)/bfd
  104.53 + INCDIR = $(BASEDIR)/include
   105.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   105.2 +++ b/patches/binutils/2.17.50.0.10/300-012_check_ldrunpath_length.patch	Sat Feb 24 11:00:05 2007 +0000
   105.3 @@ -0,0 +1,47 @@
   105.4 +#!/bin/sh -e
   105.5 +## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
   105.6 +##
   105.7 +## All lines beginning with `## DP:' are a description of the patch.
   105.8 +## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
   105.9 +## DP: cases where -rpath isn't specified. (#151024)
  105.10 +
  105.11 +if [ $# -ne 1 ]; then
  105.12 +    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  105.13 +    exit 1
  105.14 +fi
  105.15 +
  105.16 +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
  105.17 +patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
  105.18 +
  105.19 +case "$1" in
  105.20 +       -patch) patch $patch_opts -p1 < $0;;
  105.21 +       -unpatch) patch $patch_opts -p1 -R < $0;;
  105.22 +        *)
  105.23 +                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  105.24 +                exit 1;;
  105.25 +esac
  105.26 +
  105.27 +exit 0
  105.28 +
  105.29 +@DPATCH@
  105.30 +diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
  105.31 +--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em	2004-05-21 23:12:58.000000000 +0100
  105.32 ++++ binutils-2.15/ld/emultempl/elf32.em	2004-05-21 23:12:59.000000000 +0100
  105.33 +@@ -692,6 +692,8 @@
  105.34 + 	      && command_line.rpath == NULL)
  105.35 + 	    {
  105.36 + 	      lib_path = (const char *) getenv ("LD_RUN_PATH");
  105.37 ++	      if ((lib_path) && (strlen (lib_path) == 0))
  105.38 ++		  lib_path = NULL;
  105.39 + 	      if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
  105.40 + 						      force))
  105.41 + 		break;
  105.42 +@@ -871,6 +873,8 @@
  105.43 +   rpath = command_line.rpath;
  105.44 +   if (rpath == NULL)
  105.45 +     rpath = (const char *) getenv ("LD_RUN_PATH");
  105.46 ++  if ((rpath) && (strlen (rpath) == 0))
  105.47 ++      rpath = NULL;
  105.48 +   if (! (bfd_elf_size_dynamic_sections
  105.49 + 	 (output_bfd, command_line.soname, rpath,
  105.50 + 	  command_line.filter_shlib,
   106.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   106.2 +++ b/patches/binutils/2.17.50.0.8/100-uclibc-conf.patch	Sat Feb 24 11:00:05 2007 +0000
   106.3 @@ -0,0 +1,139 @@
   106.4 +--- binutils-2.16.91.0.7/bfd/configure
   106.5 ++++ binutils-2.16.91.0.7/bfd/configure
   106.6 +@@ -3576,7 +3576,7 @@
   106.7 +   ;;
   106.8 + 
   106.9 + # This must be Linux ELF.
  106.10 +-linux-gnu*)
  106.11 ++linux-gnu*|linux-uclibc*)
  106.12 +   lt_cv_deplibs_check_method=pass_all
  106.13 +   ;;
  106.14 + 
  106.15 +--- binutils-2.16.91.0.7/binutils/configure
  106.16 ++++ binutils-2.16.91.0.7/binutils/configure
  106.17 +@@ -3411,7 +3411,7 @@
  106.18 +   ;;
  106.19 + 
  106.20 + # This must be Linux ELF.
  106.21 +-linux-gnu*)
  106.22 ++linux-gnu*|linux-uclibc*)
  106.23 +   lt_cv_deplibs_check_method=pass_all
  106.24 +   ;;
  106.25 + 
  106.26 +--- binutils-2.16.91.0.7/configure
  106.27 ++++ binutils-2.16.91.0.7/configure
  106.28 +@@ -1270,7 +1270,7 @@
  106.29 +   am33_2.0-*-linux*)
  106.30 +     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
  106.31 +     ;;
  106.32 +-  sh-*-linux*)
  106.33 ++  sh*-*-linux*)
  106.34 +     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
  106.35 +     ;;    
  106.36 +   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
  106.37 +@@ -1578,7 +1578,7 @@
  106.38 +   romp-*-*)
  106.39 +     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
  106.40 +     ;;
  106.41 +-  sh-*-* | sh64-*-*)
  106.42 ++  sh*-*-* | sh64-*-*)
  106.43 +     case "${host}" in
  106.44 +       i[3456789]86-*-vsta) ;; # don't add gprof back in
  106.45 +       i[3456789]86-*-go32*) ;; # don't add gprof back in
  106.46 +--- binutils-2.16.91.0.7/configure.in
  106.47 ++++ binutils-2.16.91.0.7/configure.in
  106.48 +@@ -468,7 +468,7 @@
  106.49 +   am33_2.0-*-linux*)
  106.50 +     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
  106.51 +     ;;
  106.52 +-  sh-*-linux*)
  106.53 ++  sh*-*-linux*)
  106.54 +     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
  106.55 +     ;;    
  106.56 +   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
  106.57 +@@ -776,7 +776,7 @@
  106.58 +   romp-*-*)
  106.59 +     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
  106.60 +     ;;
  106.61 +-  sh-*-* | sh64-*-*)
  106.62 ++  sh*-*-* | sh64-*-*)
  106.63 +     case "${host}" in
  106.64 +       i[[3456789]]86-*-vsta) ;; # don't add gprof back in
  106.65 +       i[[3456789]]86-*-go32*) ;; # don't add gprof back in
  106.66 +--- binutils-2.16.91.0.7/gas/configure
  106.67 ++++ binutils-2.16.91.0.7/gas/configure
  106.68 +@@ -3411,7 +3411,7 @@
  106.69 +   ;;
  106.70 + 
  106.71 + # This must be Linux ELF.
  106.72 +-linux-gnu*)
  106.73 ++linux-gnu*|linux-uclibc*)
  106.74 +   lt_cv_deplibs_check_method=pass_all
  106.75 +   ;;
  106.76 + 
  106.77 +--- binutils-2.16.91.0.7/gprof/configure
  106.78 ++++ binutils-2.16.91.0.7/gprof/configure
  106.79 +@@ -3419,6 +3419,11 @@
  106.80 +   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  106.81 +   ;;
  106.82 + 
  106.83 ++linux-uclibc*)
  106.84 ++  lt_cv_deplibs_check_method=pass_all
  106.85 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  106.86 ++  ;;
  106.87 ++
  106.88 + netbsd* | knetbsd*-gnu)
  106.89 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  106.90 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  106.91 +--- binutils-2.16.91.0.7/ld/configure
  106.92 ++++ binutils-2.16.91.0.7/ld/configure
  106.93 +@@ -3413,7 +3413,7 @@
  106.94 +   ;;
  106.95 + 
  106.96 + # This must be Linux ELF.
  106.97 +-linux-gnu*)
  106.98 ++linux-gnu*|linux-uclibc*)
  106.99 +   lt_cv_deplibs_check_method=pass_all
 106.100 +   ;;
 106.101 + 
 106.102 +--- binutils-2.16.91.0.7/libtool.m4
 106.103 ++++ binutils-2.16.91.0.7/libtool.m4
 106.104 +@@ -739,7 +739,7 @@
 106.105 +   ;;
 106.106 + 
 106.107 + # This must be Linux ELF.
 106.108 +-linux-gnu*)
 106.109 ++linux-gnu*|linux-uclibc*)
 106.110 +   lt_cv_deplibs_check_method=pass_all
 106.111 +   ;;
 106.112 + 
 106.113 +--- binutils-2.16.91.0.7/ltconfig
 106.114 ++++ binutils-2.16.91.0.7/ltconfig
 106.115 +@@ -602,6 +602,7 @@
 106.116 + 
 106.117 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
 106.118 + case $host_os in
 106.119 ++linux-uclibc*) ;;
 106.120 + linux-gnu*) ;;
 106.121 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
 106.122 + esac
 106.123 +@@ -1247,7 +1248,7 @@
 106.124 +   ;;
 106.125 + 
 106.126 + # This must be Linux ELF.
 106.127 +-linux-gnu*)
 106.128 ++linux-gnu*|linux-uclibc*)
 106.129 +   version_type=linux
 106.130 +   need_lib_prefix=no
 106.131 +   need_version=no
 106.132 +--- binutils-2.16.91.0.7/opcodes/configure
 106.133 ++++ binutils-2.16.91.0.7/opcodes/configure
 106.134 +@@ -3579,7 +3579,7 @@
 106.135 +   ;;
 106.136 + 
 106.137 + # This must be Linux ELF.
 106.138 +-linux-gnu*)
 106.139 ++linux-gnu*|linux-uclibc*)
 106.140 +   lt_cv_deplibs_check_method=pass_all
 106.141 +   ;;
 106.142 + 
   107.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   107.2 +++ b/patches/binutils/2.17.50.0.8/110-arm-eabi-conf.patch	Sat Feb 24 11:00:05 2007 +0000
   107.3 @@ -0,0 +1,24 @@
   107.4 +diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
   107.5 +--- binutils-2.16.91.0.7.orig/configure	2006-05-31 14:54:24.000000000 +0300
   107.6 ++++ binutils-2.16.91.0.7/configure	2006-05-31 14:55:53.000000000 +0300
   107.7 +@@ -1299,7 +1299,7 @@
   107.8 +   arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
   107.9 +     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
  107.10 +     ;;
  107.11 +-  arm*-*-linux-gnueabi)
  107.12 ++  arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
  107.13 +     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
  107.14 +     noconfigdirs="$noconfigdirs target-libjava target-libobjc"
  107.15 +     ;;
  107.16 +diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
  107.17 +--- binutils-2.16.91.0.7.orig/configure.in	2006-05-31 14:54:24.000000000 +0300
  107.18 ++++ binutils-2.16.91.0.7/configure.in	2006-05-31 14:55:53.000000000 +0300
  107.19 +@@ -497,7 +497,7 @@
  107.20 +   arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
  107.21 +     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
  107.22 +     ;;
  107.23 +-  arm*-*-linux-gnueabi)
  107.24 ++  arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
  107.25 +     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
  107.26 +     noconfigdirs="$noconfigdirs target-libjava target-libobjc"
  107.27 +     ;;
   108.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   108.2 +++ b/patches/binutils/2.17.50.0.8/300-001_ld_makefile_patch.patch	Sat Feb 24 11:00:05 2007 +0000
   108.3 @@ -0,0 +1,50 @@
   108.4 +#!/bin/sh -e
   108.5 +## 001_ld_makefile_patch.dpatch
   108.6 +##
   108.7 +## All lines beginning with `## DP:' are a description of the patch.
   108.8 +## DP: Description: correct where ld scripts are installed
   108.9 +## DP: Author: Chris Chimelis <chris@debian.org>
  108.10 +## DP: Upstream status: N/A
  108.11 +## DP: Date: ??
  108.12 +
  108.13 +if [ $# -ne 1 ]; then
  108.14 +    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  108.15 +    exit 1
  108.16 +fi
  108.17 +
  108.18 +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
  108.19 +patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
  108.20 +
  108.21 +case "$1" in
  108.22 +       -patch) patch $patch_opts -p1 < $0;;
  108.23 +       -unpatch) patch $patch_opts -p1 -R < $0;;
  108.24 +        *)
  108.25 +                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  108.26 +                exit 1;;
  108.27 +esac
  108.28 +
  108.29 +exit 0
  108.30 +
  108.31 +@DPATCH@
  108.32 +--- binutils-2.16.91.0.1/ld/Makefile.am
  108.33 ++++ binutils-2.16.91.0.1/ld/Makefile.am
  108.34 +@@ -20,7 +20,7 @@
  108.35 + # We put the scripts in the directory $(scriptdir)/ldscripts.
  108.36 + # We can't put the scripts in $(datadir) because the SEARCH_DIR
  108.37 + # directives need to be different for native and cross linkers.
  108.38 +-scriptdir = $(tooldir)/lib
  108.39 ++scriptdir = $(libdir)
  108.40 + 
  108.41 + EMUL = @EMUL@
  108.42 + EMULATION_OFILES = @EMULATION_OFILES@
  108.43 +--- binutils-2.16.91.0.1/ld/Makefile.in
  108.44 ++++ binutils-2.16.91.0.1/ld/Makefile.in
  108.45 +@@ -268,7 +268,7 @@
  108.46 + # We put the scripts in the directory $(scriptdir)/ldscripts.
  108.47 + # We can't put the scripts in $(datadir) because the SEARCH_DIR
  108.48 + # directives need to be different for native and cross linkers.
  108.49 +-scriptdir = $(tooldir)/lib
  108.50 ++scriptdir = $(libdir)
  108.51 + BASEDIR = $(srcdir)/..
  108.52 + BFDDIR = $(BASEDIR)/bfd
  108.53 + INCDIR = $(BASEDIR)/include
   109.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   109.2 +++ b/patches/binutils/2.17.50.0.8/300-012_check_ldrunpath_length.patch	Sat Feb 24 11:00:05 2007 +0000
   109.3 @@ -0,0 +1,47 @@
   109.4 +#!/bin/sh -e
   109.5 +## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
   109.6 +##
   109.7 +## All lines beginning with `## DP:' are a description of the patch.
   109.8 +## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
   109.9 +## DP: cases where -rpath isn't specified. (#151024)
  109.10 +
  109.11 +if [ $# -ne 1 ]; then
  109.12 +    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  109.13 +    exit 1
  109.14 +fi
  109.15 +
  109.16 +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
  109.17 +patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
  109.18 +
  109.19 +case "$1" in
  109.20 +       -patch) patch $patch_opts -p1 < $0;;
  109.21 +       -unpatch) patch $patch_opts -p1 -R < $0;;
  109.22 +        *)
  109.23 +                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  109.24 +                exit 1;;
  109.25 +esac
  109.26 +
  109.27 +exit 0
  109.28 +
  109.29 +@DPATCH@
  109.30 +diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
  109.31 +--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em	2004-05-21 23:12:58.000000000 +0100
  109.32 ++++ binutils-2.15/ld/emultempl/elf32.em	2004-05-21 23:12:59.000000000 +0100
  109.33 +@@ -692,6 +692,8 @@
  109.34 + 	      && command_line.rpath == NULL)
  109.35 + 	    {
  109.36 + 	      lib_path = (const char *) getenv ("LD_RUN_PATH");
  109.37 ++	      if ((lib_path) && (strlen (lib_path) == 0))
  109.38 ++		  lib_path = NULL;
  109.39 + 	      if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
  109.40 + 						      force))
  109.41 + 		break;
  109.42 +@@ -871,6 +873,8 @@
  109.43 +   rpath = command_line.rpath;
  109.44 +   if (rpath == NULL)
  109.45 +     rpath = (const char *) getenv ("LD_RUN_PATH");
  109.46 ++  if ((rpath) && (strlen (rpath) == 0))
  109.47 ++      rpath = NULL;
  109.48 +   if (! (bfd_elf_size_dynamic_sections
  109.49 + 	 (output_bfd, command_line.soname, rpath,
  109.50 + 	  command_line.filter_shlib,
   110.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   110.2 +++ b/patches/binutils/2.17.50.0.9/100-uclibc-conf.patch	Sat Feb 24 11:00:05 2007 +0000
   110.3 @@ -0,0 +1,139 @@
   110.4 +--- binutils-2.16.91.0.7/bfd/configure
   110.5 ++++ binutils-2.16.91.0.7/bfd/configure
   110.6 +@@ -3576,7 +3576,7 @@
   110.7 +   ;;
   110.8 + 
   110.9 + # This must be Linux ELF.
  110.10 +-linux-gnu*)
  110.11 ++linux-gnu*|linux-uclibc*)
  110.12 +   lt_cv_deplibs_check_method=pass_all
  110.13 +   ;;
  110.14 + 
  110.15 +--- binutils-2.16.91.0.7/binutils/configure
  110.16 ++++ binutils-2.16.91.0.7/binutils/configure
  110.17 +@@ -3411,7 +3411,7 @@
  110.18 +   ;;
  110.19 + 
  110.20 + # This must be Linux ELF.
  110.21 +-linux-gnu*)
  110.22 ++linux-gnu*|linux-uclibc*)
  110.23 +   lt_cv_deplibs_check_method=pass_all
  110.24 +   ;;
  110.25 + 
  110.26 +--- binutils-2.16.91.0.7/configure
  110.27 ++++ binutils-2.16.91.0.7/configure
  110.28 +@@ -1270,7 +1270,7 @@
  110.29 +   am33_2.0-*-linux*)
  110.30 +     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
  110.31 +     ;;
  110.32 +-  sh-*-linux*)
  110.33 ++  sh*-*-linux*)
  110.34 +     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
  110.35 +     ;;    
  110.36 +   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
  110.37 +@@ -1578,7 +1578,7 @@
  110.38 +   romp-*-*)
  110.39 +     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
  110.40 +     ;;
  110.41 +-  sh-*-* | sh64-*-*)
  110.42 ++  sh*-*-* | sh64-*-*)
  110.43 +     case "${host}" in
  110.44 +       i[3456789]86-*-vsta) ;; # don't add gprof back in
  110.45 +       i[3456789]86-*-go32*) ;; # don't add gprof back in
  110.46 +--- binutils-2.16.91.0.7/configure.in
  110.47 ++++ binutils-2.16.91.0.7/configure.in
  110.48 +@@ -468,7 +468,7 @@
  110.49 +   am33_2.0-*-linux*)
  110.50 +     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
  110.51 +     ;;
  110.52 +-  sh-*-linux*)
  110.53 ++  sh*-*-linux*)
  110.54 +     noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
  110.55 +     ;;    
  110.56 +   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
  110.57 +@@ -776,7 +776,7 @@
  110.58 +   romp-*-*)
  110.59 +     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
  110.60 +     ;;
  110.61 +-  sh-*-* | sh64-*-*)
  110.62 ++  sh*-*-* | sh64-*-*)
  110.63 +     case "${host}" in
  110.64 +       i[[3456789]]86-*-vsta) ;; # don't add gprof back in
  110.65 +       i[[3456789]]86-*-go32*) ;; # don't add gprof back in
  110.66 +--- binutils-2.16.91.0.7/gas/configure
  110.67 ++++ binutils-2.16.91.0.7/gas/configure
  110.68 +@@ -3411,7 +3411,7 @@
  110.69 +   ;;
  110.70 + 
  110.71 + # This must be Linux ELF.
  110.72 +-linux-gnu*)
  110.73 ++linux-gnu*|linux-uclibc*)
  110.74 +   lt_cv_deplibs_check_method=pass_all
  110.75 +   ;;
  110.76 + 
  110.77 +--- binutils-2.16.91.0.7/gprof/configure
  110.78 ++++ binutils-2.16.91.0.7/gprof/configure
  110.79 +@@ -3419,6 +3419,11 @@
  110.80 +   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  110.81 +   ;;
  110.82 + 
  110.83 ++linux-uclibc*)
  110.84 ++  lt_cv_deplibs_check_method=pass_all
  110.85 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  110.86 ++  ;;
  110.87 ++
  110.88 + netbsd* | knetbsd*-gnu)
  110.89 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  110.90 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  110.91 +--- binutils-2.16.91.0.7/ld/configure
  110.92 ++++ binutils-2.16.91.0.7/ld/configure
  110.93 +@@ -3413,7 +3413,7 @@
  110.94 +   ;;
  110.95 + 
  110.96 + # This must be Linux ELF.
  110.97 +-linux-gnu*)
  110.98 ++linux-gnu*|linux-uclibc*)
  110.99 +   lt_cv_deplibs_check_method=pass_all
 110.100 +   ;;
 110.101 + 
 110.102 +--- binutils-2.16.91.0.7/libtool.m4
 110.103 ++++ binutils-2.16.91.0.7/libtool.m4
 110.104 +@@ -739,7 +739,7 @@
 110.105 +   ;;
 110.106 + 
 110.107 + # This must be Linux ELF.
 110.108 +-linux-gnu*)
 110.109 ++linux-gnu*|linux-uclibc*)
 110.110 +   lt_cv_deplibs_check_method=pass_all
 110.111 +   ;;
 110.112 + 
 110.113 +--- binutils-2.16.91.0.7/ltconfig
 110.114 ++++ binutils-2.16.91.0.7/ltconfig
 110.115 +@@ -602,6 +602,7 @@
 110.116 + 
 110.117 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
 110.118 + case $host_os in
 110.119 ++linux-uclibc*) ;;
 110.120 + linux-gnu*) ;;
 110.121 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
 110.122 + esac
 110.123 +@@ -1247,7 +1248,7 @@
 110.124 +   ;;
 110.125 + 
 110.126 + # This must be Linux ELF.
 110.127 +-linux-gnu*)
 110.128 ++linux-gnu*|linux-uclibc*)
 110.129 +   version_type=linux
 110.130 +   need_lib_prefix=no
 110.131 +   need_version=no
 110.132 +--- binutils-2.16.91.0.7/opcodes/configure
 110.133 ++++ binutils-2.16.91.0.7/opcodes/configure
 110.134 +@@ -3579,7 +3579,7 @@
 110.135 +   ;;
 110.136 + 
 110.137 + # This must be Linux ELF.
 110.138 +-linux-gnu*)
 110.139 ++linux-gnu*|linux-uclibc*)
 110.140 +   lt_cv_deplibs_check_method=pass_all
 110.141 +   ;;
 110.142 + 
   111.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   111.2 +++ b/patches/binutils/2.17.50.0.9/110-arm-eabi-conf.patch	Sat Feb 24 11:00:05 2007 +0000
   111.3 @@ -0,0 +1,24 @@
   111.4 +diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
   111.5 +--- binutils-2.16.91.0.7.orig/configure	2006-05-31 14:54:24.000000000 +0300
   111.6 ++++ binutils-2.16.91.0.7/configure	2006-05-31 14:55:53.000000000 +0300
   111.7 +@@ -1299,7 +1299,7 @@
   111.8 +   arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
   111.9 +     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
  111.10 +     ;;
  111.11 +-  arm*-*-linux-gnueabi)
  111.12 ++  arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
  111.13 +     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
  111.14 +     noconfigdirs="$noconfigdirs target-libjava target-libobjc"
  111.15 +     ;;
  111.16 +diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
  111.17 +--- binutils-2.16.91.0.7.orig/configure.in	2006-05-31 14:54:24.000000000 +0300
  111.18 ++++ binutils-2.16.91.0.7/configure.in	2006-05-31 14:55:53.000000000 +0300
  111.19 +@@ -497,7 +497,7 @@
  111.20 +   arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
  111.21 +     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
  111.22 +     ;;
  111.23 +-  arm*-*-linux-gnueabi)
  111.24 ++  arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
  111.25 +     noconfigdirs="$noconfigdirs target-libffi target-qthreads"
  111.26 +     noconfigdirs="$noconfigdirs target-libjava target-libobjc"
  111.27 +     ;;
   112.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   112.2 +++ b/patches/binutils/2.17.50.0.9/300-001_ld_makefile_patch.patch	Sat Feb 24 11:00:05 2007 +0000
   112.3 @@ -0,0 +1,50 @@
   112.4 +#!/bin/sh -e
   112.5 +## 001_ld_makefile_patch.dpatch
   112.6 +##
   112.7 +## All lines beginning with `## DP:' are a description of the patch.
   112.8 +## DP: Description: correct where ld scripts are installed
   112.9 +## DP: Author: Chris Chimelis <chris@debian.org>
  112.10 +## DP: Upstream status: N/A
  112.11 +## DP: Date: ??
  112.12 +
  112.13 +if [ $# -ne 1 ]; then
  112.14 +    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  112.15 +    exit 1
  112.16 +fi
  112.17 +
  112.18 +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
  112.19 +patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
  112.20 +
  112.21 +case "$1" in
  112.22 +       -patch) patch $patch_opts -p1 < $0;;
  112.23 +       -unpatch) patch $patch_opts -p1 -R < $0;;
  112.24 +        *)
  112.25 +                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  112.26 +                exit 1;;
  112.27 +esac
  112.28 +
  112.29 +exit 0
  112.30 +
  112.31 +@DPATCH@
  112.32 +--- binutils-2.16.91.0.1/ld/Makefile.am
  112.33 ++++ binutils-2.16.91.0.1/ld/Makefile.am
  112.34 +@@ -20,7 +20,7 @@
  112.35 + # We put the scripts in the directory $(scriptdir)/ldscripts.
  112.36 + # We can't put the scripts in $(datadir) because the SEARCH_DIR
  112.37 + # directives need to be different for native and cross linkers.
  112.38 +-scriptdir = $(tooldir)/lib
  112.39 ++scriptdir = $(libdir)
  112.40 + 
  112.41 + EMUL = @EMUL@
  112.42 + EMULATION_OFILES = @EMULATION_OFILES@
  112.43 +--- binutils-2.16.91.0.1/ld/Makefile.in
  112.44 ++++ binutils-2.16.91.0.1/ld/Makefile.in
  112.45 +@@ -268,7 +268,7 @@
  112.46 + # We put the scripts in the directory $(scriptdir)/ldscripts.
  112.47 + # We can't put the scripts in $(datadir) because the SEARCH_DIR
  112.48 + # directives need to be different for native and cross linkers.
  112.49 +-scriptdir = $(tooldir)/lib
  112.50 ++scriptdir = $(libdir)
  112.51 + BASEDIR = $(srcdir)/..
  112.52 + BFDDIR = $(BASEDIR)/bfd
  112.53 + INCDIR = $(BASEDIR)/include
   113.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   113.2 +++ b/patches/binutils/2.17.50.0.9/300-012_check_ldrunpath_length.patch	Sat Feb 24 11:00:05 2007 +0000
   113.3 @@ -0,0 +1,47 @@
   113.4 +#!/bin/sh -e
   113.5 +## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
   113.6 +##
   113.7 +## All lines beginning with `## DP:' are a description of the patch.
   113.8 +## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
   113.9 +## DP: cases where -rpath isn't specified. (#151024)
  113.10 +
  113.11 +if [ $# -ne 1 ]; then
  113.12 +    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  113.13 +    exit 1
  113.14 +fi
  113.15 +
  113.16 +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
  113.17 +patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
  113.18 +
  113.19 +case "$1" in
  113.20 +       -patch) patch $patch_opts -p1 < $0;;
  113.21 +       -unpatch) patch $patch_opts -p1 -R < $0;;
  113.22 +        *)
  113.23 +                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  113.24 +                exit 1;;
  113.25 +esac
  113.26 +
  113.27 +exit 0
  113.28 +
  113.29 +@DPATCH@
  113.30 +diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
  113.31 +--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em	2004-05-21 23:12:58.000000000 +0100
  113.32 ++++ binutils-2.15/ld/emultempl/elf32.em	2004-05-21 23:12:59.000000000 +0100
  113.33 +@@ -692,6 +692,8 @@
  113.34 + 	      && command_line.rpath == NULL)
  113.35 + 	    {
  113.36 + 	      lib_path = (const char *) getenv ("LD_RUN_PATH");
  113.37 ++	      if ((lib_path) && (strlen (lib_path) == 0))
  113.38 ++		  lib_path = NULL;
  113.39 + 	      if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
  113.40 + 						      force))
  113.41 + 		break;
  113.42 +@@ -871,6 +873,8 @@
  113.43 +   rpath = command_line.rpath;
  113.44 +   if (rpath == NULL)
  113.45 +     rpath = (const char *) getenv ("LD_RUN_PATH");
  113.46 ++  if ((rpath) && (strlen (rpath) == 0))
  113.47 ++      rpath = NULL;
  113.48 +   if (! (bfd_elf_size_dynamic_sections
  113.49 + 	 (output_bfd, command_line.soname, rpath,
  113.50 + 	  command_line.filter_shlib,
   114.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   114.2 +++ b/patches/cygwin/1.5.15-1/cygwin-1.5.15-1-crossbuild.patch	Sat Feb 24 11:00:05 2007 +0000
   114.3 @@ -0,0 +1,40 @@
   114.4 +Message-ID: <4269173F.7020705@zee2.com>
   114.5 +Date: Fri, 22 Apr 2005 16:24:47 +0100
   114.6 +From: Steve Papacharalambous <stevep@zee2.com>
   114.7 +To: "Robert P. J. Day" <rpjday@mindspring.com>
   114.8 +CC: crossgcc list <crossgcc@sources.redhat.com>
   114.9 +Subject: Re: cygwin source directory has moved
  114.10 +In-Reply-To: <Pine.LNX.4.61.0504181746050.11794@localhost.localdomain>
  114.11 +
  114.12 +Hi Robert,
  114.13 +
  114.14 +I've attached two patches:
  114.15 +
  114.16 +1/  For crosstool-0.31 which changes the CYGWIN_URL to one which has the
  114.17 +cygwin source archives.  The version of cygwin that is used to build the
  114.18 +cross toolchain has been changed to cygwin-1.5.15-1-src.tar.bz2 since
  114.19 +most of the mirror sites don't seem to have the original archive used.
  114.20 +[created gcc-3.3.2-cygwin-1.5.15-1.dat - dank]
  114.21 +
  114.22 +
  114.23 +2/ The later cygwin source archive fails to cross build with the error:
  114.24 +/opt/crosstool/i686-pc-cygwin/gcc-3.3.2-cygwin-1.5.15-1/lib/gcc-lib/i686-pc-cygwin/bin/ld:
  114.25 +cannot find -luser32
  114.26 +
  114.27 +unless the second patch is applied,
  114.28 +
  114.29 +
  114.30 +diff -uNr cygwin-1.5.15-1.orig/winsup/mingw/Makefile.in cygwin-1.5.15-1/winsup/mingw/Makefile.in
  114.31 +--- cygwin-1.5.15-1.orig/winsup/mingw/Makefile.in	2005-02-28 22:51:02.000000000 +0000
  114.32 ++++ cygwin-1.5.15-1/winsup/mingw/Makefile.in	2005-04-22 15:29:18.000000000 +0100
  114.33 +@@ -71,7 +71,7 @@
  114.34 + mkinstalldirs = $(SHELL) @MKINSTALLDIRS@
  114.35 + 
  114.36 + CC := @CC@
  114.37 +-override CC := ${filter-out -L% -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\)  *[^ ]*\( \|$$\)% %g'}}
  114.38 ++override CC := ${filter-out -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\)  *[^ ]*\( \|$$\)% %g'}}
  114.39 + # FIXME: Which is it, CC or CC_FOR_TARGET?
  114.40 + CC_FOR_TARGET = $(CC)
  114.41 + AS_FOR_TARGET = $(AS)
  114.42 +
  114.43 +
   115.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   115.2 +++ b/patches/gcc/2.95.3/arm-linux.patch	Sat Feb 24 11:00:05 2007 +0000
   115.3 @@ -0,0 +1,647 @@
   115.4 +--------- snip -------
   115.5 +Downloaded from ftp://ftp.linux.org.uk/pub/armlinux/toolchain/src-2.95.3/gcc-2.95.3.diff.bz2
   115.6 +Not sure what it fixes, but this appears to be The Patch used with gcc-2.95.3 on arm.
   115.7 +--------- snip -------
   115.8 +
   115.9 +diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.c gcc-2.95.3/gcc/config/arm/arm.c
  115.10 +--- gcc-2.95.3-orig/gcc/config/arm/arm.c	Thu Jan 25 15:03:24 2001
  115.11 ++++ gcc-2.95.3/gcc/config/arm/arm.c	Fri Jul 20 19:39:11 2001
  115.12 +@@ -1529,27 +1529,34 @@
  115.13 +       return gen_rtx_PLUS (Pmode, base, offset);
  115.14 +     }
  115.15 +   else if (GET_CODE (orig) == LABEL_REF)
  115.16 +-    current_function_uses_pic_offset_table = 1;
  115.17 +-
  115.18 +-  return orig;
  115.19 +-}
  115.20 ++    {
  115.21 ++      current_function_uses_pic_offset_table = 1;
  115.22 + 
  115.23 +-static rtx pic_rtx;
  115.24 ++      if (NEED_PLT_GOT)
  115.25 ++	{
  115.26 ++	  rtx pic_ref, address = gen_reg_rtx (Pmode);
  115.27 ++	  
  115.28 ++	  emit_insn (gen_pic_load_addr (address, orig));
  115.29 ++	  pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx,
  115.30 ++				  address);
  115.31 ++	  emit_move_insn (address, pic_ref);
  115.32 ++	  return address;
  115.33 ++	}
  115.34 ++    }
  115.35 + 
  115.36 +-int
  115.37 +-is_pic(x)
  115.38 +-     rtx x;
  115.39 +-{
  115.40 +-  if (x == pic_rtx)
  115.41 +-    return 1;
  115.42 +-  return 0;
  115.43 ++  return orig;
  115.44 + }
  115.45 + 
  115.46 ++/* Generate code to load the PIC register.  PROLOGUE is true if
  115.47 ++   called from arm_expand_prologue (in which case we want the 
  115.48 ++   generated insns at the start of the function);  false if called
  115.49 ++   by an exception receiver that needs the PIC register reloaded
  115.50 ++   (in which case the insns are just dumped at the current location).  */
  115.51 + void
  115.52 +-arm_finalize_pic ()
  115.53 ++arm_finalize_pic (int prologue)
  115.54 + {
  115.55 + #ifndef AOF_ASSEMBLER
  115.56 +-  rtx l1, pic_tmp, pic_tmp2, seq;
  115.57 ++  rtx l1, pic_tmp, pic_tmp2, seq, pic_rtx;
  115.58 +   rtx global_offset_table;
  115.59 + 
  115.60 +   if (current_function_uses_pic_offset_table == 0)
  115.61 +@@ -1578,7 +1585,10 @@
  115.62 + 
  115.63 +   seq = gen_sequence ();
  115.64 +   end_sequence ();
  115.65 +-  emit_insn_after (seq, get_insns ());
  115.66 ++  if (prologue)
  115.67 ++    emit_insn_after (seq, get_insns ());
  115.68 ++  else
  115.69 ++    emit_insn (seq);
  115.70 + 
  115.71 +   /* Need to emit this whether or not we obey regdecls,
  115.72 +      since setjmp/longjmp can cause life info to screw up.  */
  115.73 +@@ -5327,7 +5337,13 @@
  115.74 +   if (frame_pointer_needed)
  115.75 +     live_regs += 4;
  115.76 + 
  115.77 +-  if (live_regs)
  115.78 ++  if (live_regs == 1 && regs_ever_live[LR_REGNUM]
  115.79 ++      && ! lr_save_eliminated && ! really_return)
  115.80 ++    {
  115.81 ++      output_asm_insn (reverse ? "ldr%?%D0\t%|lr, [%|sp}, #4"
  115.82 ++      		       : "ldr%?%d0\t%|lr, [%|sp], #4", &operand);
  115.83 ++    }
  115.84 ++  else if (live_regs)
  115.85 +     {
  115.86 +       if (lr_save_eliminated || ! regs_ever_live[14])
  115.87 +         live_regs++;
  115.88 +@@ -5446,7 +5462,7 @@
  115.89 +   rtx           x;
  115.90 + 
  115.91 +   length = strlen (name);
  115.92 +-  alignlength = (length + 1) + 3 & ~3;
  115.93 ++  alignlength = ((length + 1) + 3) & ~3;
  115.94 +   
  115.95 +   ASM_OUTPUT_ASCII (stream, name, length + 1);
  115.96 +   ASM_OUTPUT_ALIGN (stream, 2);
  115.97 +@@ -5838,6 +5854,9 @@
  115.98 +   int store_arg_regs = 0;
  115.99 +   int volatile_func = (optimize > 0
 115.100 + 		       && TREE_THIS_VOLATILE (current_function_decl));
 115.101 ++  rtx ip_rtx;
 115.102 ++  int fp_offset = 0;
 115.103 ++  rtx insn;
 115.104 + 
 115.105 +   /* Naked functions don't have prologues.  */
 115.106 +   if (arm_naked_function_p (current_function_decl))
 115.107 +@@ -5859,11 +5878,59 @@
 115.108 + 	live_regs_mask |= 0x4000;
 115.109 +     }
 115.110 + 
 115.111 ++  ip_rtx = gen_rtx_REG (SImode, IP_REGNUM);
 115.112 ++
 115.113 +   if (frame_pointer_needed)
 115.114 +     {
 115.115 ++      if (current_function_needs_context)
 115.116 ++	{
 115.117 ++	  /* The Static chain register is the same as the IP register
 115.118 ++	     used as a scratch register during stack frame creation.
 115.119 ++	     To get around this need to find somewhere to store IP
 115.120 ++	     whilst the frame is being created.  We try the following
 115.121 ++	     places in order:
 115.122 ++	     
 115.123 ++	       1. An unused argument register.
 115.124 ++	       2. A slot on the stack above the frame.  (This only
 115.125 ++	          works if the function is not a varargs function).
 115.126 ++		  
 115.127 ++	     If neither of these places is available, we abort (for now).  */
 115.128 ++	  if (regs_ever_live[3] == 0)
 115.129 ++	    {
 115.130 ++	      insn = gen_rtx_REG (SImode, 3);
 115.131 ++	      insn = gen_rtx_SET (SImode, insn, ip_rtx);
 115.132 ++	      insn = emit_insn (insn);
 115.133 ++	      RTX_FRAME_RELATED_P (insn) = 1;	  
 115.134 ++	    }
 115.135 ++	  else if (current_function_pretend_args_size == 0)
 115.136 ++	    {
 115.137 ++	      insn = gen_rtx_PRE_DEC (SImode, stack_pointer_rtx);
 115.138 ++	      insn = gen_rtx_MEM (SImode, insn);
 115.139 ++	      insn = gen_rtx_SET (VOIDmode, insn, ip_rtx);
 115.140 ++	      insn = emit_insn (insn);
 115.141 ++	      RTX_FRAME_RELATED_P (insn) = 1;
 115.142 ++	      fp_offset = 4;
 115.143 ++	    }
 115.144 ++	  else
 115.145 ++	    /* FIXME - the way to handle this situation is to allow
 115.146 ++	       the pretend args to be dumped onto the stack, then
 115.147 ++	       reuse r3 to save IP.  This would involve moving the
 115.148 ++	       copying os SP into IP until after the pretend args
 115.149 ++	       have been dumped, but this is not too hard.  */
 115.150 ++	    error ("Unable to find a temporary location for static chanin register");
 115.151 ++	}
 115.152 ++
 115.153 +       live_regs_mask |= 0xD800;
 115.154 +-      emit_insn (gen_movsi (gen_rtx_REG (SImode, 12),
 115.155 +-			    stack_pointer_rtx));
 115.156 ++      if (fp_offset)
 115.157 ++	{
 115.158 ++	  insn = gen_rtx_PLUS (SImode, stack_pointer_rtx, GEN_INT (fp_offset));
 115.159 ++	  insn = gen_rtx_SET  (SImode, ip_rtx, insn);
 115.160 ++	}
 115.161 ++      else
 115.162 ++	insn = gen_movsi (ip_rtx, stack_pointer_rtx);
 115.163 ++      
 115.164 ++       insn = emit_insn (insn);
 115.165 ++       RTX_FRAME_RELATED_P (insn) = 1;
 115.166 +     }
 115.167 + 
 115.168 +   if (current_function_pretend_args_size)
 115.169 +@@ -5927,9 +5994,31 @@
 115.170 +     }
 115.171 + 
 115.172 +   if (frame_pointer_needed)
 115.173 +-    emit_insn (gen_addsi3 (hard_frame_pointer_rtx, gen_rtx_REG (SImode, 12),
 115.174 +-			   (GEN_INT
 115.175 +-			    (-(4 + current_function_pretend_args_size)))));
 115.176 ++    {
 115.177 ++      insn = GEN_INT (-(4 + current_function_pretend_args_size + fp_offset));
 115.178 ++      insn = emit_insn (gen_addsi3 (hard_frame_pointer_rtx, ip_rtx, insn));
 115.179 ++      RTX_FRAME_RELATED_P (insn) = 1;
 115.180 ++      
 115.181 ++      if (current_function_needs_context)
 115.182 ++	{
 115.183 ++	  /* Recover the static chain register.  */
 115.184 ++	  if (regs_ever_live [3] == 0)
 115.185 ++	    {
 115.186 ++	      insn = gen_rtx_REG (SImode, 3);
 115.187 ++	      insn = gen_rtx_SET (SImode, ip_rtx, insn);
 115.188 ++	      insn = emit_insn (insn);
 115.189 ++	      RTX_FRAME_RELATED_P (insn) = 1;	  
 115.190 ++	    }
 115.191 ++	  else /* if (current_function_pretend_args_size == 0) */
 115.192 ++	    {
 115.193 ++	      insn = gen_rtx_PLUS (SImode, hard_frame_pointer_rtx, GEN_INT (4));
 115.194 ++	      insn = gen_rtx_MEM (SImode, insn);
 115.195 ++	      insn = gen_rtx_SET (SImode, ip_rtx, insn);
 115.196 ++	      insn = emit_insn (insn);
 115.197 ++	      RTX_FRAME_RELATED_P (insn) = 1;	  
 115.198 ++	    }
 115.199 ++	}
 115.200 ++    }
 115.201 + 
 115.202 +   if (amount != const0_rtx)
 115.203 +     {
 115.204 +diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.h gcc-2.95.3/gcc/config/arm/arm.h
 115.205 +--- gcc-2.95.3-orig/gcc/config/arm/arm.h	Thu Jan 25 15:03:26 2001
 115.206 ++++ gcc-2.95.3/gcc/config/arm/arm.h	Fri Jul 20 19:39:11 2001
 115.207 +@@ -601,14 +601,20 @@
 115.208 +   (TREE_CODE (EXP) == STRING_CST        \
 115.209 +    && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
 115.210 + 
 115.211 ++#ifndef STRUCTURE_SIZE_BOUNDARY
 115.212 + /* Every structures size must be a multiple of 32 bits.  */
 115.213 + /* This is for compatibility with ARMCC.  ARM SDT Reference Manual
 115.214 +    (ARM DUI 0020D) page 2-20 says "Structures are aligned on word
 115.215 +    boundaries".  */
 115.216 +-#ifndef STRUCTURE_SIZE_BOUNDARY
 115.217 +-#define STRUCTURE_SIZE_BOUNDARY 32
 115.218 ++/* Setting this to 32 produces more efficient code, but the value set in previous
 115.219 ++   versions of this toolchain was 8, which produces more compact structures. The
 115.220 ++   command line option -mstructure_size_boundary=<n> can be used to change this
 115.221 ++   value.  */
 115.222 ++#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary
 115.223 + #endif
 115.224 + 
 115.225 ++extern int arm_structure_size_boundary;
 115.226 ++
 115.227 + /* Used when parsing command line option -mstructure_size_boundary.  */
 115.228 + extern const char * structure_size_string;
 115.229 + 
 115.230 +@@ -768,6 +774,9 @@
 115.231 + /* Specify the registers used for certain standard purposes.
 115.232 +    The values of these macros are register numbers.  */
 115.233 + 
 115.234 ++/* Register which holds return address from a subroutine call.  */
 115.235 ++#define LR_REGNUM		14
 115.236 ++
 115.237 + /* Define this if the program counter is overloaded on a register.  */
 115.238 + #define PC_REGNUM		15
 115.239 + 
 115.240 +@@ -777,6 +786,9 @@
 115.241 + /* Base register for access to local variables of the function.  */
 115.242 + #define FRAME_POINTER_REGNUM	25
 115.243 + 
 115.244 ++/* Scratch register - used in all kinds of places, eg trampolines.  */
 115.245 ++#define IP_REGNUM		12
 115.246 ++
 115.247 + /* Define this to be where the real frame pointer is if it is not possible to
 115.248 +    work out the offset between the frame pointer and the automatic variables
 115.249 +    until after register allocation has taken place.  FRAME_POINTER_REGNUM
 115.250 +@@ -798,7 +810,7 @@
 115.251 + /* The native (Norcroft) Pascal compiler for the ARM passes the static chain
 115.252 +    as an invisible last argument (possible since varargs don't exist in
 115.253 +    Pascal), so the following is not true.  */
 115.254 +-#define STATIC_CHAIN_REGNUM	8
 115.255 ++#define STATIC_CHAIN_REGNUM	12
 115.256 + 
 115.257 + /* Register in which address to store a structure value
 115.258 +    is passed to a function.  */
 115.259 +@@ -1248,7 +1260,12 @@
 115.260 + {									\
 115.261 +   int volatile_func = arm_volatile_func ();				\
 115.262 +   if ((FROM) == ARG_POINTER_REGNUM && (TO) == HARD_FRAME_POINTER_REGNUM)\
 115.263 +-    (OFFSET) = 0;							\
 115.264 ++    {                                                                   \
 115.265 ++      if (! current_function_needs_context || ! frame_pointer_needed)   \
 115.266 ++        (OFFSET) = 0;                                                   \
 115.267 ++      else                                                              \
 115.268 ++        (OFFSET) = 4;                                                   \
 115.269 ++    }                                                                   \
 115.270 +   else if ((FROM) == FRAME_POINTER_REGNUM				\
 115.271 + 	   && (TO) == STACK_POINTER_REGNUM)				\
 115.272 +     (OFFSET) = (current_function_outgoing_args_size			\
 115.273 +@@ -1379,8 +1396,10 @@
 115.274 + 
 115.275 +    On the ARM, allow any integer (invalid ones are removed later by insn
 115.276 +    patterns), nice doubles and symbol_refs which refer to the function's
 115.277 +-   constant pool XXX.  */
 115.278 +-#define LEGITIMATE_CONSTANT_P(X)	(! label_mentioned_p (X))
 115.279 ++   constant pool XXX.
 115.280 ++
 115.281 ++   When generating PIC code, allow anything.  */
 115.282 ++#define LEGITIMATE_CONSTANT_P(X)	(flag_pic || ! label_mentioned_p (X))
 115.283 + 
 115.284 + /* Symbols in the text segment can be accessed without indirecting via the
 115.285 +    constant pool; it may take an extra binary operation, but this is still
 115.286 +@@ -1496,9 +1515,8 @@
 115.287 + 	      && INTVAL (op) <= 31)					\
 115.288 + 	    goto LABEL;							\
 115.289 +         }								\
 115.290 +-      /* NASTY: Since this limits the addressing of unsigned byte loads */      \
 115.291 +       range = ((MODE) == HImode || (MODE) == QImode)                    \
 115.292 +-              ? (arm_arch4 ? 256 : 4095) : 4096;                        \
 115.293 ++              ? (((MODE) == HImode && arm_arch4) ? 256 : 4095) : 4096;  \
 115.294 +       if (code == CONST_INT && INTVAL (INDEX) < range			\
 115.295 + 	  && INTVAL (INDEX) > -range)  	      				\
 115.296 +         goto LABEL;							\
 115.297 +@@ -1812,14 +1830,15 @@
 115.298 +    data addresses in memory.  */
 115.299 + #define PIC_OFFSET_TABLE_REGNUM arm_pic_register
 115.300 + 
 115.301 +-#define FINALIZE_PIC arm_finalize_pic ()
 115.302 ++#define FINALIZE_PIC arm_finalize_pic (1)
 115.303 + 
 115.304 +-/* We can't directly access anything that contains a symbol,
 115.305 ++/* We can't directly access anything that contains a symbol or label,
 115.306 +    nor can we indirect via the constant pool.  */
 115.307 + #define LEGITIMATE_PIC_OPERAND_P(X)				\
 115.308 +-	(! symbol_mentioned_p (X)				\
 115.309 ++	(! symbol_mentioned_p (X) && ! label_mentioned_p (X)	\
 115.310 + 	 && (! CONSTANT_POOL_ADDRESS_P (X)			\
 115.311 +-	     || ! symbol_mentioned_p (get_pool_constant (X))))
 115.312 ++	     || (! symbol_mentioned_p (get_pool_constant (X)))  \
 115.313 ++		&& (! label_mentioned_p (get_pool_constant (X)))))
 115.314 +  
 115.315 + /* We need to know when we are making a constant pool; this determines
 115.316 +    whether data needs to be in the GOT or can be referenced via a GOT
 115.317 +@@ -2046,17 +2065,9 @@
 115.318 +   else output_addr_const(STREAM, X);					\
 115.319 + }
 115.320 + 
 115.321 +-/* Handles PIC addr specially */
 115.322 + #define OUTPUT_INT_ADDR_CONST(STREAM,X) \
 115.323 +   {									\
 115.324 +-    if (flag_pic && GET_CODE(X) == CONST && is_pic(X))			\
 115.325 +-      {									\
 115.326 +-	output_addr_const(STREAM, XEXP (XEXP (XEXP (X, 0), 0), 0));	\
 115.327 +-	fputs(" - (", STREAM);						\
 115.328 +-	output_addr_const(STREAM, XEXP (XEXP (XEXP (X, 0), 1), 0));	\
 115.329 +-	fputs(")", STREAM);						\
 115.330 +-      }									\
 115.331 +-    else output_addr_const(STREAM, X);					\
 115.332 ++    output_addr_const(STREAM, X);					\
 115.333 + 									\
 115.334 +     /* Mark symbols as position independent.  We only do this in the	\
 115.335 +       .text segment, not in the .data segment. */			\
 115.336 +@@ -2170,8 +2181,7 @@
 115.337 + int    arm_return_in_memory PROTO ((Tree));
 115.338 + int    legitimate_pic_operand_p PROTO ((Rtx));
 115.339 + Rtx    legitimize_pic_address PROTO ((Rtx, Mmode, Rtx));
 115.340 +-int    is_pic PROTO ((Rtx));
 115.341 +-void   arm_finalize_pic PROTO ((void));
 115.342 ++void   arm_finalize_pic PROTO ((int));
 115.343 + int    arm_rtx_costs RTX_CODE_PROTO ((Rtx, Rcode));
 115.344 + int    arm_adjust_cost PROTO ((Rtx, Rtx, Rtx, int));
 115.345 + int    const_double_rtx_ok_for_fpu PROTO ((Rtx));
 115.346 +diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.md gcc-2.95.3/gcc/config/arm/arm.md
 115.347 +--- gcc-2.95.3-orig/gcc/config/arm/arm.md	Thu Jan 25 15:03:27 2001
 115.348 ++++ gcc-2.95.3/gcc/config/arm/arm.md	Fri Jul 20 19:39:11 2001
 115.349 +@@ -2629,7 +2629,8 @@
 115.350 + 			   : preserve_subexpressions_p ()));
 115.351 +       DONE;
 115.352 +     }
 115.353 +-  if (CONSTANT_P (operands[1]) && flag_pic)
 115.354 ++  if ((CONSTANT_P (operands[1]) || symbol_mentioned_p (operands[1])
 115.355 ++        || label_mentioned_p (operands[1])) && flag_pic)
 115.356 +     operands[1] = legitimize_pic_address (operands[1], SImode,
 115.357 + 					  ((reload_in_progress
 115.358 + 					    || reload_completed)
 115.359 +@@ -2721,6 +2722,15 @@
 115.360 +   return \"add%?\\t%0, %|pc, %0\";
 115.361 + ")
 115.362 + 
 115.363 ++(define_expand "builtin_setjmp_receiver"
 115.364 ++  [(label_ref (match_operand 0 "" ""))]
 115.365 ++  "flag_pic"
 115.366 ++  "
 115.367 ++{
 115.368 ++  arm_finalize_pic (0);
 115.369 ++  DONE;
 115.370 ++}")
 115.371 ++
 115.372 + ;; If copying one reg to another we can set the condition codes according to
 115.373 + ;; its value.  Such a move is common after a return from subroutine and the
 115.374 + ;; result is being tested against zero.
 115.375 +@@ -6184,15 +6194,20 @@
 115.376 + 	abort ();
 115.377 +       return \"\";
 115.378 +     }
 115.379 +-  strcpy (pattern, \"stmfd\\t%m0!, {%1\");
 115.380 +-  for (i = 1; i < XVECLEN (operands[2], 0); i++)
 115.381 ++  if (XVECLEN (operands[2], 0) > 1)
 115.382 +     {
 115.383 +-      strcat (pattern, \", %|\");
 115.384 +-      strcat (pattern, reg_names[REGNO (XEXP (XVECEXP (operands[2], 0, i),
 115.385 ++      strcpy (pattern, \"stmfd\\t%m0!, {%1\");
 115.386 ++      for (i = 1; i < XVECLEN (operands[2], 0); i++)
 115.387 ++        {
 115.388 ++           strcat (pattern, \", %|\");
 115.389 ++           strcat (pattern, reg_names[REGNO (XEXP (XVECEXP (operands[2], 0, i),
 115.390 + 					      0))]);
 115.391 ++        }
 115.392 ++      strcat (pattern, \"}\");
 115.393 ++      output_asm_insn (pattern, operands);
 115.394 +     }
 115.395 +-  strcat (pattern, \"}\");
 115.396 +-  output_asm_insn (pattern, operands);
 115.397 ++  else
 115.398 ++    output_asm_insn (\"str\\t%1, [%m0, #-4]!\", operands);
 115.399 +   return \"\";
 115.400 + }"
 115.401 + [(set_attr "type" "store4")])
 115.402 +diff -urN gcc-2.95.3-orig/gcc/config/arm/elf.h gcc-2.95.3/gcc/config/arm/elf.h
 115.403 +--- gcc-2.95.3-orig/gcc/config/arm/elf.h	Mon May 31 10:21:53 1999
 115.404 ++++ gcc-2.95.3/gcc/config/arm/elf.h	Fri Jul 20 19:39:11 2001
 115.405 +@@ -167,15 +167,6 @@
 115.406 + #define MULTILIB_DEFAULTS { "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
 115.407 + #endif
 115.408 + 
 115.409 +-/* Setting this to 32 produces more efficient code, but the value set in previous
 115.410 +-   versions of this toolchain was 8, which produces more compact structures. The
 115.411 +-   command line option -mstructure_size_boundary=<n> can be used to change this
 115.412 +-   value.  */
 115.413 +-#undef  STRUCTURE_SIZE_BOUNDARY
 115.414 +-#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary
 115.415 +-
 115.416 +-extern int arm_structure_size_boundary;
 115.417 +-
 115.418 + /* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
 115.419 +    is a valid machine specific attribute for DECL.
 115.420 +    The attributes in ATTRIBUTES have previously been assigned to DECL.  */
 115.421 +diff -urN gcc-2.95.3-orig/gcc/config/arm/linux-gas.h gcc-2.95.3/gcc/config/arm/linux-gas.h
 115.422 +--- gcc-2.95.3-orig/gcc/config/arm/linux-gas.h	Mon Feb 22 17:47:57 1999
 115.423 ++++ gcc-2.95.3/gcc/config/arm/linux-gas.h	Fri Jul 20 19:39:11 2001
 115.424 +@@ -1,6 +1,6 @@
 115.425 + /* Definitions of target machine for GNU compiler.
 115.426 +    ARM Linux-based GNU systems version.
 115.427 +-   Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
 115.428 ++   Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 115.429 +    Contributed by Russell King  <rmk92@ecs.soton.ac.uk>.
 115.430 + 
 115.431 + This file is part of GNU CC.
 115.432 +@@ -79,5 +79,7 @@
 115.433 +   register unsigned long _beg __asm ("a1") = (unsigned long) (BEG);	\
 115.434 +   register unsigned long _end __asm ("a2") = (unsigned long) (END);	\
 115.435 +   register unsigned long _flg __asm ("a3") = 0;				\
 115.436 +-  __asm __volatile ("swi 0x9f0002");					\
 115.437 ++  __asm __volatile ("swi 0x9f0002		@ sys_cacheflush"	\
 115.438 ++		    : "=r" (_beg)					\
 115.439 ++		    : "0" (_beg), "r" (_end), "r" (_flg));		\
 115.440 + }
 115.441 +diff -urN gcc-2.95.3-orig/gcc/config/arm/t-linux gcc-2.95.3/gcc/config/arm/t-linux
 115.442 +--- gcc-2.95.3-orig/gcc/config/arm/t-linux	Fri Mar 26 16:30:20 1999
 115.443 ++++ gcc-2.95.3/gcc/config/arm/t-linux	Fri Jul 20 20:46:19 2001
 115.444 +@@ -1,6 +1,6 @@
 115.445 + # Just for these, we omit the frame pointer since it makes such a big
 115.446 + # difference.  It is then pointless adding debugging.
 115.447 +-TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
 115.448 ++TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC 
 115.449 + LIBGCC2_DEBUG_CFLAGS = -g0
 115.450 + 
 115.451 + # Don't build enquire
 115.452 +diff -urN gcc-2.95.3-orig/gcc/final.c gcc-2.95.3/gcc/final.c
 115.453 +--- gcc-2.95.3-orig/gcc/final.c	Mon Mar 12 13:07:59 2001
 115.454 ++++ gcc-2.95.3/gcc/final.c	Fri Jul 20 19:39:11 2001
 115.455 +@@ -3652,8 +3652,9 @@
 115.456 + 
 115.457 +       output_addr_const (file, XEXP (x, 0));
 115.458 +       fprintf (file, "-");
 115.459 +-      if (GET_CODE (XEXP (x, 1)) == CONST_INT
 115.460 +-	  && INTVAL (XEXP (x, 1)) < 0)
 115.461 ++      if ((GET_CODE (XEXP (x, 1)) == CONST_INT
 115.462 ++	   && INTVAL (XEXP (x, 1)) < 0)
 115.463 ++	  || GET_CODE (XEXP (x, 1)) != CONST_INT)
 115.464 + 	{
 115.465 + 	  fprintf (file, ASM_OPEN_PAREN);
 115.466 + 	  output_addr_const (file, XEXP (x, 1));
 115.467 +diff -urN gcc-2.95.3-orig/gcc/function.c gcc-2.95.3/gcc/function.c
 115.468 +--- gcc-2.95.3-orig/gcc/function.c	Thu Jan 25 15:03:15 2001
 115.469 ++++ gcc-2.95.3/gcc/function.c	Fri Jul 20 19:39:10 2001
 115.470 +@@ -3053,6 +3053,105 @@
 115.471 +    extracted by usage MEM with narrower mode. */
 115.472 + static rtx purge_addressof_replacements;
 115.473 + 
 115.474 ++/* Return 1 if X and Y are identical-looking rtx's.
 115.475 ++   This is the Lisp function EQUAL for rtx arguments.  */
 115.476 ++
 115.477 ++int
 115.478 ++rtx_equal_for_addressof_p (x, y)
 115.479 ++     rtx x, y;
 115.480 ++{
 115.481 ++  register int i;
 115.482 ++  register int j;
 115.483 ++  register enum rtx_code code;
 115.484 ++  register char *fmt;
 115.485 ++
 115.486 ++  if (x == y)
 115.487 ++    return 1;
 115.488 ++  if (x == 0 || y == 0)
 115.489 ++    return 0;
 115.490 ++
 115.491 ++  code = GET_CODE (x);
 115.492 ++  /* Rtx's of different codes cannot be equal.  */
 115.493 ++  if (code != GET_CODE (y))
 115.494 ++    return 0;
 115.495 ++
 115.496 ++  /* (MULT:SI x y) and (MULT:HI x y) are NOT equivalent.
 115.497 ++     (REG:SI x) and (REG:HI x) are NOT equivalent. 
 115.498 ++     But (MEM:SI x) and (MEM:HI x) are equivalent for our purposes.  */
 115.499 ++
 115.500 ++  if (code != MEM && (GET_MODE (x) != GET_MODE (y)))
 115.501 ++    return 0;
 115.502 ++
 115.503 ++  /* REG, LABEL_REF, and SYMBOL_REF can be compared nonrecursively.  */
 115.504 ++
 115.505 ++  if (code == REG)
 115.506 ++    return REGNO (x) == REGNO (y);
 115.507 ++  else if (code == LABEL_REF)
 115.508 ++    return XEXP (x, 0) == XEXP (y, 0);
 115.509 ++  else if (code == SYMBOL_REF)
 115.510 ++    return XSTR (x, 0) == XSTR (y, 0);
 115.511 ++  else if (code == SCRATCH || code == CONST_DOUBLE)
 115.512 ++    return 0;
 115.513 ++
 115.514 ++  /* Compare the elements.  If any pair of corresponding elements
 115.515 ++     fail to match, return 0 for the whole things.  */
 115.516 ++
 115.517 ++  fmt = GET_RTX_FORMAT (code);
 115.518 ++  for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
 115.519 ++    {
 115.520 ++      switch (fmt[i])
 115.521 ++	{
 115.522 ++	case 'w':
 115.523 ++	  if (XWINT (x, i) != XWINT (y, i))
 115.524 ++	    return 0;
 115.525 ++	  break;
 115.526 ++
 115.527 ++	case 'n':
 115.528 ++	case 'i':
 115.529 ++	  if (XINT (x, i) != XINT (y, i))
 115.530 ++	    return 0;
 115.531 ++	  break;
 115.532 ++
 115.533 ++	case 'V':
 115.534 ++	case 'E':
 115.535 ++	  /* Two vectors must have the same length.  */
 115.536 ++	  if (XVECLEN (x, i) != XVECLEN (y, i))
 115.537 ++	    return 0;
 115.538 ++
 115.539 ++	  /* And the corresponding elements must match.  */
 115.540 ++	  for (j = 0; j < XVECLEN (x, i); j++)
 115.541 ++	    if (rtx_equal_p (XVECEXP (x, i, j), XVECEXP (y, i, j)) == 0)
 115.542 ++	      return 0;
 115.543 ++	  break;
 115.544 ++
 115.545 ++	case 'e':
 115.546 ++	  if (rtx_equal_p (XEXP (x, i), XEXP (y, i)) == 0)
 115.547 ++	    return 0;
 115.548 ++	  break;
 115.549 ++
 115.550 ++	case 'S':
 115.551 ++	case 's':
 115.552 ++	  if (strcmp (XSTR (x, i), XSTR (y, i)))
 115.553 ++	    return 0;
 115.554 ++	  break;
 115.555 ++
 115.556 ++	case 'u':
 115.557 ++	  /* These are just backpointers, so they don't matter.  */
 115.558 ++	  break;
 115.559 ++
 115.560 ++	case '0':
 115.561 ++	  break;
 115.562 ++
 115.563 ++	  /* It is believed that rtx's at this level will never
 115.564 ++	     contain anything but integers and other rtx's,
 115.565 ++	     except for within LABEL_REFs and SYMBOL_REFs.  */
 115.566 ++	default:
 115.567 ++	  abort ();
 115.568 ++	}
 115.569 ++    }
 115.570 ++  return 1;
 115.571 ++}
 115.572 ++
 115.573 + /* Helper function for purge_addressof.  See if the rtx expression at *LOC
 115.574 +    in INSN needs to be changed.  If FORCE, always put any ADDRESSOFs into
 115.575 +    the stack.  */
 115.576 +@@ -3133,7 +3232,7 @@
 115.577 + 	      for (tem = purge_bitfield_addressof_replacements;
 115.578 + 		   tem != NULL_RTX;
 115.579 + 		   tem = XEXP (XEXP (tem, 1), 1))
 115.580 +-		if (rtx_equal_p (x, XEXP (tem, 0)))
 115.581 ++		if (rtx_equal_for_addressof_p (x, XEXP (tem, 0)))
 115.582 + 		  {
 115.583 + 		    *loc = XEXP (XEXP (tem, 1), 0);
 115.584 + 		    return;
 115.585 +@@ -3143,7 +3242,7 @@
 115.586 + 	      for (tem = purge_addressof_replacements;
 115.587 + 		   tem != NULL_RTX;
 115.588 + 		   tem = XEXP (XEXP (tem, 1), 1))
 115.589 +-		if (rtx_equal_p (XEXP (x, 0), XEXP (tem, 0)))
 115.590 ++		if (rtx_equal_for_addressof_p (XEXP (x, 0), XEXP (tem, 0)))
 115.591 + 		  {
 115.592 + 		    rtx z = XEXP (XEXP (tem, 1), 0);
 115.593 + 
 115.594 +diff -urN gcc-2.95.3-orig/gcc/jump.c gcc-2.95.3/gcc/jump.c
 115.595 +--- gcc-2.95.3-orig/gcc/jump.c	Thu Oct 21 08:24:03 1999
 115.596 ++++ gcc-2.95.3/gcc/jump.c	Fri Jul 20 19:39:10 2001
 115.597 +@@ -115,7 +115,7 @@
 115.598 + static rtx delete_unreferenced_labels	PROTO((rtx));
 115.599 + static void delete_noop_moves		PROTO((rtx));
 115.600 + static int calculate_can_reach_end	PROTO((rtx, int, int));
 115.601 +-static int duplicate_loop_exit_test	PROTO((rtx));
 115.602 ++static int duplicate_loop_exit_test	PROTO((rtx, int));
 115.603 + static void find_cross_jump		PROTO((rtx, rtx, int, rtx *, rtx *));
 115.604 + static void do_cross_jump		PROTO((rtx, rtx, rtx));
 115.605 + static int jump_back_p			PROTO((rtx, rtx));
 115.606 +@@ -338,7 +338,7 @@
 115.607 + 	      && simplejump_p (temp1))
 115.608 + 	    {
 115.609 + 	      temp = PREV_INSN (insn);
 115.610 +-	      if (duplicate_loop_exit_test (insn))
 115.611 ++	      if (duplicate_loop_exit_test (insn, after_regscan))
 115.612 + 		{
 115.613 + 		  changed = 1;
 115.614 + 		  next = NEXT_INSN (temp);
 115.615 +@@ -2548,8 +2548,9 @@
 115.616 +    values of regno_first_uid and regno_last_uid.  */
 115.617 + 
 115.618 + static int
 115.619 +-duplicate_loop_exit_test (loop_start)
 115.620 ++duplicate_loop_exit_test (loop_start, after_regscan)
 115.621 +      rtx loop_start;
 115.622 ++     int after_regscan;
 115.623 + {
 115.624 +   rtx insn, set, reg, p, link;
 115.625 +   rtx copy = 0, first_copy = 0;
 115.626 +@@ -2662,6 +2663,9 @@
 115.627 + 	    reg_map[REGNO (reg)] = gen_reg_rtx (GET_MODE (reg));
 115.628 + 	  }
 115.629 +       }
 115.630 ++
 115.631 ++  if (after_regscan)
 115.632 ++    reg_scan_update (exitcode, lastexit, max_reg);
 115.633 + 
 115.634 +   /* Now copy each insn.  */
 115.635 +   for (insn = exitcode; insn != lastexit; insn = NEXT_INSN (insn))
 115.636 +diff -urN gcc-2.95.3-orig/gcc/varasm.c gcc-2.95.3/gcc/varasm.c
 115.637 +--- gcc-2.95.3-orig/gcc/varasm.c	Mon Feb 19 15:02:02 2001
 115.638 ++++ gcc-2.95.3/gcc/varasm.c	Fri Jul 20 19:39:11 2001
 115.639 +@@ -3286,7 +3286,10 @@
 115.640 + 	  value->un.addr.offset = - INTVAL (XEXP (x, 1));
 115.641 + 	}
 115.642 +       else
 115.643 +-	abort ();
 115.644 ++	{
 115.645 ++	  value->un.addr.base = x;
 115.646 ++	  value->un.addr.offset = 0;
 115.647 ++	}
 115.648 +       break;
 115.649 + 
 115.650 +     default:
   116.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   116.2 +++ b/patches/gcc/2.95.3/backport-config.gcc-1.4.patch	Sat Feb 24 11:00:05 2007 +0000
   116.3 @@ -0,0 +1,35 @@
   116.4 +# Taken from http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config.gcc.diff?r1=1.3&r2=1.4
   116.5 +# Should fix error
   116.6 +#   Configuration powerpc-host_apple-darwin7.3.0 not supported
   116.7 +# when configuring gcc-2.95 on Mac OS X for i686 target
   116.8 +# Also create xm-darwin.h, seems to be required, else we get the error
   116.9 +#   In file included from .../gcc-2.95.3/gcc/gencheck.c:21:
  116.10 +#   hconfig.h:11:30: rs6000/xm-darwin.h: No such file or directory
  116.11 +#   make[1]: *** [gencheck.o] Error 1
  116.12 +
  116.13 +
  116.14 +--- gcc-2.95.3/gcc/configure.old	2004-03-24 12:17:44.000000000 -0800
  116.15 ++++ gcc-2.95.3/gcc/configure	2004-03-24 17:14:38.000000000 -0800
  116.16 +@@ -5079,6 +5079,10 @@
  116.17 + 		tmake_file=rs6000/t-beos
  116.18 + 		xmake_file=rs6000/x-beos
  116.19 + 		;;
  116.20 ++	powerpc-*-darwin*)
  116.21 ++		xm_file="rs6000/xm-rs6000.h rs6000/xm-darwin.h"
  116.22 ++		xmake_file=rs6000/x-darwin
  116.23 ++		;;
  116.24 + 	powerpc-*-sysv* | powerpc-*-elf*)
  116.25 + 		tm_file=rs6000/sysv4.h
  116.26 + 		xm_file="xm-siglist.h rs6000/xm-sysv4.h"
  116.27 +--- /dev/null	2003-01-30 02:24:37.000000000 -0800
  116.28 ++++ gcc-3.0.4/gcc/config/rs6000/xm-darwin.h	2000-11-20 19:02:09.000000000 -0800
  116.29 +@@ -0,0 +1,9 @@
  116.30 ++/* Undo the USG definition in xm-rs6000.h, Darwin is a BSD flavor.  */
  116.31 ++
  116.32 ++#undef USG
  116.33 ++
  116.34 ++/* Override the usual setting, since Apple's GCC has lame bugs and
  116.35 ++   can't handle the initializers.  Someday the bugs will be fixed and
  116.36 ++   we can get rid of this silliness.  */
  116.37 ++
  116.38 ++#define HAVE_DESIGNATED_INITIALIZERS 0
   117.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   117.2 +++ b/patches/gcc/2.95.3/backport-config.gcc-1.92.patch	Sat Feb 24 11:00:05 2007 +0000
   117.3 @@ -0,0 +1,39 @@
   117.4 +# Taken from http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config.gcc.diff?r1=1.91&r2=1.92
   117.5 +# Should fix error
   117.6 +#   Configuration x86_64-host_unknown-linux-gnu not supported
   117.7 +# when configuring gcc-2.95 on x86_64 build for i686 target
   117.8 +# It's a bit silly, since tm_file refers to files that don't exist,
   117.9 +# but as long as x86_64 is just the build machine, that doesn't matter.
  117.10 +
  117.11 +--- gcc-2.95.3/gcc/configure.old	2004-03-24 12:17:44.000000000 -0800
  117.12 ++++ gcc-2.95.3/gcc/configure	2004-03-24 12:19:30.000000000 -0800
  117.13 +@@ -2929,6 +2929,9 @@
  117.14 + 	i[34567]86-*-*)
  117.15 + 		cpu_type=i386
  117.16 + 		;;
  117.17 ++	x86_64-*-*)
  117.18 ++		cpu_type=i386
  117.19 ++		;;
  117.20 + 	hppa*-*-*)
  117.21 + 		cpu_type=pa
  117.22 + 		;;
  117.23 +@@ -3643,6 +3646,19 @@
  117.24 +  			thread_file='posix'
  117.25 +  		fi
  117.26 + 		;;
  117.27 ++	x86_64-*-linux*)
  117.28 ++		xmake_file=x-linux
  117.29 ++		tm_file="i386/biarch64.h i386/i386.h i386/att.h linux.h i386/x86-64.h \
  117.30 ++			 i386/linux64.h"
  117.31 ++		tmake_file="t-slibgcc-elf-ver t-linux i386/t-crtstuff"
  117.32 ++		extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  117.33 ++		gnu_ld=yes
  117.34 ++		float_format=i386
  117.35 ++		if test x$enable_threads = xyes; then
  117.36 ++			thread_file='posix'
  117.37 ++		fi
  117.38 ++		;;
  117.39 ++
  117.40 + 	i[34567]86-*-gnu*)
  117.41 + 		float_format=i386
  117.42 + 		;;
   118.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   118.2 +++ b/patches/gcc/2.95.3/config.sub.patch	Sat Feb 24 11:00:05 2007 +0000
   118.3 @@ -0,0 +1,1257 @@
   118.4 +# Backport from gcc-3.3.3
   118.5 +# Fixes errors like
   118.6 +#   Invalid configuration `x86_64-host_unknown-linux-gnu': machine `x86_64-host_unknown' not recognized
   118.7 +#   Unrecognized host system name x86_64-host_unknown-linux-gnu.
   118.8 +# when configuring on chip types or operating systems like x86_64 or Darwin
   118.9 +# which are newer than gcc-2.95
  118.10 +
  118.11 +--- gcc-2.95.3/config.sub.old	1999-08-04 01:09:26.000000000 -0700
  118.12 ++++ gcc-2.95.3/config.sub	2004-03-24 11:28:24.000000000 -0800
  118.13 +@@ -1,6 +1,10 @@
  118.14 + #! /bin/sh
  118.15 +-# Configuration validation subroutine script, version 1.1.
  118.16 +-#   Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
  118.17 ++# Configuration validation subroutine script.
  118.18 ++#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
  118.19 ++#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
  118.20 ++
  118.21 ++timestamp='2003-01-28'
  118.22 ++
  118.23 + # This file is (in principle) common to ALL GNU software.
  118.24 + # The presence of a machine in this file suggests that SOME GNU software
  118.25 + # can handle that machine.  It does not imply ALL GNU software can.
  118.26 +@@ -25,6 +29,9 @@
  118.27 + # configuration script generated by Autoconf, you may include it under
  118.28 + # the same distribution terms that you use for the rest of that program.
  118.29 + 
  118.30 ++# Please send patches to <config-patches@gnu.org>.  Submit a context
  118.31 ++# diff and a properly formatted ChangeLog entry.
  118.32 ++#
  118.33 + # Configuration subroutine to validate and canonicalize a configuration type.
  118.34 + # Supply the specified configuration type as an argument.
  118.35 + # If it is invalid, we print an error message on stderr and exit with code 1.
  118.36 +@@ -45,30 +52,73 @@
  118.37 + #	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
  118.38 + # It is wrong to echo any other type of specification.
  118.39 + 
  118.40 +-if [ x$1 = x ]
  118.41 +-then
  118.42 +-	echo Configuration name missing. 1>&2
  118.43 +-	echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
  118.44 +-	echo "or     $0 ALIAS" 1>&2
  118.45 +-	echo where ALIAS is a recognized configuration type. 1>&2
  118.46 +-	exit 1
  118.47 +-fi
  118.48 ++me=`echo "$0" | sed -e 's,.*/,,'`
  118.49 + 
  118.50 +-# First pass through any local machine types.
  118.51 +-case $1 in
  118.52 +-	*local*)
  118.53 +-		echo $1
  118.54 +-		exit 0
  118.55 +-		;;
  118.56 +-	*)
  118.57 +-	;;
  118.58 ++usage="\
  118.59 ++Usage: $0 [OPTION] CPU-MFR-OPSYS
  118.60 ++       $0 [OPTION] ALIAS
  118.61 ++
  118.62 ++Canonicalize a configuration name.
  118.63 ++
  118.64 ++Operation modes:
  118.65 ++  -h, --help         print this help, then exit
  118.66 ++  -t, --time-stamp   print date of last modification, then exit
  118.67 ++  -v, --version      print version number, then exit
  118.68 ++
  118.69 ++Report bugs and patches to <config-patches@gnu.org>."
  118.70 ++
  118.71 ++version="\
  118.72 ++GNU config.sub ($timestamp)
  118.73 ++
  118.74 ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
  118.75 ++Free Software Foundation, Inc.
  118.76 ++
  118.77 ++This is free software; see the source for copying conditions.  There is NO
  118.78 ++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  118.79 ++
  118.80 ++help="
  118.81 ++Try \`$me --help' for more information."
  118.82 ++
  118.83 ++# Parse command line
  118.84 ++while test $# -gt 0 ; do
  118.85 ++  case $1 in
  118.86 ++    --time-stamp | --time* | -t )
  118.87 ++       echo "$timestamp" ; exit 0 ;;
  118.88 ++    --version | -v )
  118.89 ++       echo "$version" ; exit 0 ;;
  118.90 ++    --help | --h* | -h )
  118.91 ++       echo "$usage"; exit 0 ;;
  118.92 ++    -- )     # Stop option processing
  118.93 ++       shift; break ;;
  118.94 ++    - )	# Use stdin as input.
  118.95 ++       break ;;
  118.96 ++    -* )
  118.97 ++       echo "$me: invalid option $1$help"
  118.98 ++       exit 1 ;;
  118.99 ++
 118.100 ++    *local*)
 118.101 ++       # First pass through any local machine types.
 118.102 ++       echo $1
 118.103 ++       exit 0;;
 118.104 ++
 118.105 ++    * )
 118.106 ++       break ;;
 118.107 ++  esac
 118.108 ++done
 118.109 ++
 118.110 ++case $# in
 118.111 ++ 0) echo "$me: missing argument$help" >&2
 118.112 ++    exit 1;;
 118.113 ++ 1) ;;
 118.114 ++ *) echo "$me: too many arguments$help" >&2
 118.115 ++    exit 1;;
 118.116 + esac
 118.117 + 
 118.118 + # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
 118.119 + # Here we must recognize all the valid KERNEL-OS combinations.
 118.120 + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 118.121 + case $maybe_os in
 118.122 +-  linux-gnu*)
 118.123 ++  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
 118.124 +     os=-$maybe_os
 118.125 +     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
 118.126 +     ;;
 118.127 +@@ -94,20 +144,28 @@
 118.128 + 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 118.129 + 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 118.130 + 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
 118.131 +-	-apple)
 118.132 ++	-apple | -axis)
 118.133 + 		os=
 118.134 + 		basic_machine=$1
 118.135 + 		;;
 118.136 +-	-sim | -cisco | -oki | -wec | -winbond )	# EGCS LOCAL
 118.137 ++	-sim | -cisco | -oki | -wec | -winbond)
 118.138 + 		os=
 118.139 + 		basic_machine=$1
 118.140 + 		;;
 118.141 +-	-scout)						# EGCS LOCAL
 118.142 ++	-scout)
 118.143 + 		;;
 118.144 +-	-wrs)						# EGCS LOCAL
 118.145 ++	-wrs)
 118.146 + 		os=-vxworks
 118.147 + 		basic_machine=$1
 118.148 + 		;;
 118.149 ++	-chorusos*)
 118.150 ++		os=-chorusos
 118.151 ++		basic_machine=$1
 118.152 ++		;;
 118.153 ++ 	-chorusrdb)
 118.154 ++ 		os=-chorusrdb
 118.155 ++		basic_machine=$1
 118.156 ++ 		;;
 118.157 + 	-hiux*)
 118.158 + 		os=-hiuxwe2
 118.159 + 		;;
 118.160 +@@ -156,49 +214,72 @@
 118.161 + 	-psos*)
 118.162 + 		os=-psos
 118.163 + 		;;
 118.164 ++	-mint | -mint[0-9]*)
 118.165 ++		basic_machine=m68k-atari
 118.166 ++		os=-mint
 118.167 ++		;;
 118.168 + esac
 118.169 + 
 118.170 + # Decode aliases for certain CPU-COMPANY combinations.
 118.171 + case $basic_machine in
 118.172 + 	# Recognize the basic CPU types without company name.
 118.173 + 	# Some are omitted here because they have special meanings below.
 118.174 +-	tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
 118.175 +-		| arme[lb] | pyramid | mn10200 | mn10300 \
 118.176 +-		| tron | a29k | 580 | i960 | h8300 \
 118.177 +-		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
 118.178 +-		| alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
 118.179 +-		| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
 118.180 +-		| 1750a | dsp16xx | pdp11 \
 118.181 +-		| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
 118.182 +-		| mipstx39 | mipstx39el \
 118.183 +-		| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x)
 118.184 +-		basic_machine=$basic_machine-unknown
 118.185 +-		;;
 118.186 +-	m88110 | m680[012346]0 | m683?2 | m68360 | m5200 | z8k | v70 \
 118.187 +-	        | h8500 | w65) # EGCS LOCAL
 118.188 +-		;;
 118.189 +-	thumb)
 118.190 +-		basic_machine=$basic_machine-unknown
 118.191 +-		;;
 118.192 +-	mips64vr4300 | mips64vr4300el) # EGCS LOCAL jsmith/vr4300
 118.193 ++	1750a | 580 \
 118.194 ++	| a29k \
 118.195 ++	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 118.196 ++	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 118.197 ++	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
 118.198 ++	| clipper \
 118.199 ++	| d10v | d30v | dlx | dsp16xx \
 118.200 ++	| fr30 | frv \
 118.201 ++	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 118.202 ++	| i370 | i860 | i960 | ia64 \
 118.203 ++	| ip2k \
 118.204 ++	| m32r | m68000 | m68k | m88k | mcore \
 118.205 ++	| mips | mipsbe | mipseb | mipsel | mipsle \
 118.206 ++	| mips16 \
 118.207 ++	| mips64 | mips64el \
 118.208 ++	| mips64vr | mips64vrel \
 118.209 ++	| mips64orion | mips64orionel \
 118.210 ++	| mips64vr4100 | mips64vr4100el \
 118.211 ++	| mips64vr4300 | mips64vr4300el \
 118.212 ++	| mips64vr5000 | mips64vr5000el \
 118.213 ++	| mipsisa32 | mipsisa32el \
 118.214 ++	| mipsisa32r2 | mipsisa32r2el \
 118.215 ++	| mipsisa64 | mipsisa64el \
 118.216 ++	| mipsisa64sb1 | mipsisa64sb1el \
 118.217 ++	| mipsisa64sr71k | mipsisa64sr71kel \
 118.218 ++	| mipstx39 | mipstx39el \
 118.219 ++	| mn10200 | mn10300 \
 118.220 ++	| msp430 \
 118.221 ++	| ns16k | ns32k \
 118.222 ++	| openrisc | or32 \
 118.223 ++	| pdp10 | pdp11 | pj | pjl \
 118.224 ++	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 118.225 ++	| pyramid \
 118.226 ++	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
 118.227 ++	| sh64 | sh64le \
 118.228 ++	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
 118.229 ++	| strongarm \
 118.230 ++	| tahoe | thumb | tic80 | tron \
 118.231 ++	| v850 | v850e \
 118.232 ++	| we32k \
 118.233 ++	| x86 | xscale | xstormy16 | xtensa \
 118.234 ++	| z8k)
 118.235 + 		basic_machine=$basic_machine-unknown
 118.236 + 		;;
 118.237 +-	mips64vr4100 | mips64vr4100el) # EGCS LOCAL jsmith/vr4100
 118.238 +-		basic_machine=$basic_machine-unknown
 118.239 +-		;;
 118.240 +-	mips64vr5000 | mips64vr5000el) # EGCS LOCAL ian/vr5000
 118.241 +-		basic_machine=$basic_machine-unknown
 118.242 +-		;;
 118.243 +-	mips16)
 118.244 ++	m6811 | m68hc11 | m6812 | m68hc12)
 118.245 ++		# Motorola 68HC11/12.
 118.246 + 		basic_machine=$basic_machine-unknown
 118.247 ++		os=-none
 118.248 + 		;;
 118.249 +-	d10v)
 118.250 +-		basic_machine=$basic_machine-unknown
 118.251 ++	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
 118.252 + 		;;
 118.253 ++
 118.254 + 	# We use `pc' rather than `unknown'
 118.255 + 	# because (1) that's what they normally are, and
 118.256 + 	# (2) the word "unknown" tends to confuse beginning users.
 118.257 +-	i[34567]86)
 118.258 ++	i*86 | x86_64)
 118.259 + 	  basic_machine=$basic_machine-pc
 118.260 + 	  ;;
 118.261 + 	# Object if more than one company name word.
 118.262 +@@ -207,44 +288,62 @@
 118.263 + 		exit 1
 118.264 + 		;;
 118.265 + 	# Recognize the basic CPU types with company name.
 118.266 +-	vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
 118.267 +-	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
 118.268 +-	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
 118.269 +-	      | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
 118.270 +-	      | xmp-* | ymp-* \
 118.271 +-	      | hppa-* | hppa1.0-* | hppa1.1-* \
 118.272 +-	      | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
 118.273 +-	      | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \
 118.274 +-	      | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
 118.275 +-	      | xps100-* | clipper-* | orion-* \
 118.276 +-	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
 118.277 +-	      | sparc64-* | sparcv9-* | sparc86x-* | mips64-* | mipsel-* \
 118.278 +-	      | mips64el-* | mips64orion-* | mips64orionel-*  \
 118.279 +-	      | mipstx39-* | mipstx39el-* \
 118.280 +-	      | f301-* | arm*-*)
 118.281 +-		;;
 118.282 +-	m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # EGCS LOCAL
 118.283 +-		;;
 118.284 +-	thumb-*) # EGCS LOCAL angela/thumb
 118.285 +-		;;
 118.286 +-	v850-*) # EGCS LOCAL
 118.287 +-	        ;;
 118.288 +-	d30v-*) # EGCS LOCAL
 118.289 +-	        ;;
 118.290 +-	mips64vr4300-* | mips64vr4300el-*) # EGCS LOCAL jsmith/vr4300
 118.291 +-		;;
 118.292 +-	mips64vr4100-* | mips64vr4100el-*) # EGCS LOCAL jsmith/vr4100
 118.293 +-		;;
 118.294 +-	mips16-*) # EGCS LOCAL krk/mips16
 118.295 +-		;;
 118.296 +-	tic30-*) # EGCS LOCAL ian/tic30
 118.297 +-		;;
 118.298 +-	c30-*) # EGCS LOCAL ian/tic30
 118.299 +-		basic_machine=tic30-unknown
 118.300 ++	580-* \
 118.301 ++	| a29k-* \
 118.302 ++	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 118.303 ++	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
 118.304 ++	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 118.305 ++	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 118.306 ++	| avr-* \
 118.307 ++	| bs2000-* \
 118.308 ++	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
 118.309 ++	| clipper-* | cydra-* \
 118.310 ++	| d10v-* | d30v-* | dlx-* \
 118.311 ++	| elxsi-* \
 118.312 ++	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
 118.313 ++	| h8300-* | h8500-* \
 118.314 ++	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 118.315 ++	| i*86-* | i860-* | i960-* | ia64-* \
 118.316 ++	| ip2k-* \
 118.317 ++	| m32r-* \
 118.318 ++	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
 118.319 ++	| m88110-* | m88k-* | mcore-* \
 118.320 ++	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 118.321 ++	| mips16-* \
 118.322 ++	| mips64-* | mips64el-* \
 118.323 ++	| mips64vr-* | mips64vrel-* \
 118.324 ++	| mips64orion-* | mips64orionel-* \
 118.325 ++	| mips64vr4100-* | mips64vr4100el-* \
 118.326 ++	| mips64vr4300-* | mips64vr4300el-* \
 118.327 ++	| mips64vr5000-* | mips64vr5000el-* \
 118.328 ++	| mipsisa32-* | mipsisa32el-* \
 118.329 ++	| mipsisa32r2-* | mipsisa32r2el-* \
 118.330 ++	| mipsisa64-* | mipsisa64el-* \
 118.331 ++	| mipsisa64sb1-* | mipsisa64sb1el-* \
 118.332 ++	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
 118.333 ++	| mipstx39-* | mipstx39el-* \
 118.334 ++	| msp430-* \
 118.335 ++	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
 118.336 ++	| orion-* \
 118.337 ++	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 118.338 ++	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 118.339 ++	| pyramid-* \
 118.340 ++	| romp-* | rs6000-* \
 118.341 ++	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
 118.342 ++	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 118.343 ++	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
 118.344 ++	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
 118.345 ++	| tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
 118.346 ++	| v850-* | v850e-* | vax-* \
 118.347 ++	| we32k-* \
 118.348 ++	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
 118.349 ++	| xtensa-* \
 118.350 ++	| ymp-* \
 118.351 ++	| z8k-*)
 118.352 + 		;;
 118.353 + 	# Recognize the various machine names and aliases which stand
 118.354 + 	# for a CPU type and a company and sometimes even an OS.
 118.355 +-	386bsd)						# EGCS LOCAL
 118.356 ++	386bsd)
 118.357 + 		basic_machine=i386-unknown
 118.358 + 		os=-bsd
 118.359 + 		;;
 118.360 +@@ -254,11 +353,11 @@
 118.361 + 	3b*)
 118.362 + 		basic_machine=we32k-att
 118.363 + 		;;
 118.364 +-	a29khif)					# EGCS LOCAL
 118.365 ++	a29khif)
 118.366 + 		basic_machine=a29k-amd
 118.367 + 		os=-udi
 118.368 + 		;;
 118.369 +-	adobe68k)					# EGCS LOCAL
 118.370 ++	adobe68k)
 118.371 + 		basic_machine=m68010-adobe
 118.372 + 		os=-scout
 118.373 + 		;;
 118.374 +@@ -277,21 +376,21 @@
 118.375 + 		os=-sysv
 118.376 + 		;;
 118.377 + 	amiga | amiga-*)
 118.378 +-		basic_machine=m68k-cbm
 118.379 ++		basic_machine=m68k-unknown
 118.380 + 		;;
 118.381 + 	amigaos | amigados)
 118.382 +-		basic_machine=m68k-cbm
 118.383 ++		basic_machine=m68k-unknown
 118.384 + 		os=-amigaos
 118.385 + 		;;
 118.386 + 	amigaunix | amix)
 118.387 +-		basic_machine=m68k-cbm
 118.388 ++		basic_machine=m68k-unknown
 118.389 + 		os=-sysv4
 118.390 + 		;;
 118.391 + 	apollo68)
 118.392 + 		basic_machine=m68k-apollo
 118.393 + 		os=-sysv
 118.394 + 		;;
 118.395 +-	apollo68bsd)					# EGCS LOCAL
 118.396 ++	apollo68bsd)
 118.397 + 		basic_machine=m68k-apollo
 118.398 + 		os=-bsd
 118.399 + 		;;
 118.400 +@@ -303,6 +402,10 @@
 118.401 + 		basic_machine=ns32k-sequent
 118.402 + 		os=-dynix
 118.403 + 		;;
 118.404 ++	c90)
 118.405 ++		basic_machine=c90-cray
 118.406 ++		os=-unicos
 118.407 ++		;;
 118.408 + 	convex-c1)
 118.409 + 		basic_machine=c1-convex
 118.410 + 		os=-bsd
 118.411 +@@ -323,27 +426,30 @@
 118.412 + 		basic_machine=c38-convex
 118.413 + 		os=-bsd
 118.414 + 		;;
 118.415 +-	cray | ymp)
 118.416 +-		basic_machine=ymp-cray
 118.417 +-		os=-unicos
 118.418 +-		;;
 118.419 +-	cray2)
 118.420 +-		basic_machine=cray2-cray
 118.421 +-		os=-unicos
 118.422 +-		;;
 118.423 +-	[ctj]90-cray)
 118.424 +-		basic_machine=c90-cray
 118.425 ++	cray | j90)
 118.426 ++		basic_machine=j90-cray
 118.427 + 		os=-unicos
 118.428 + 		;;
 118.429 + 	crds | unos)
 118.430 + 		basic_machine=m68k-crds
 118.431 + 		;;
 118.432 ++	cris | cris-* | etrax*)
 118.433 ++		basic_machine=cris-axis
 118.434 ++		;;
 118.435 + 	da30 | da30-*)
 118.436 + 		basic_machine=m68k-da30
 118.437 + 		;;
 118.438 + 	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
 118.439 + 		basic_machine=mips-dec
 118.440 + 		;;
 118.441 ++	decsystem10* | dec10*)
 118.442 ++		basic_machine=pdp10-dec
 118.443 ++		os=-tops10
 118.444 ++		;;
 118.445 ++	decsystem20* | dec20*)
 118.446 ++		basic_machine=pdp10-dec
 118.447 ++		os=-tops20
 118.448 ++		;;
 118.449 + 	delta | 3300 | motorola-3300 | motorola-delta \
 118.450 + 	      | 3300-motorola | delta-motorola)
 118.451 + 		basic_machine=m68k-motorola
 118.452 +@@ -371,7 +477,7 @@
 118.453 + 	encore | umax | mmax)
 118.454 + 		basic_machine=ns32k-encore
 118.455 + 		;;
 118.456 +-	es1800 | OSE68k | ose68k | ose | OSE)		# EGCS LOCAL
 118.457 ++	es1800 | OSE68k | ose68k | ose | OSE)
 118.458 + 		basic_machine=m68k-ericsson
 118.459 + 		os=-ose
 118.460 + 		;;
 118.461 +@@ -385,6 +491,10 @@
 118.462 + 		basic_machine=tron-gmicro
 118.463 + 		os=-sysv
 118.464 + 		;;
 118.465 ++	go32)
 118.466 ++		basic_machine=i386-pc
 118.467 ++		os=-go32
 118.468 ++		;;
 118.469 + 	h3050r* | hiux*)
 118.470 + 		basic_machine=hppa1.1-hitachi
 118.471 + 		os=-hiuxwe2
 118.472 +@@ -393,11 +503,11 @@
 118.473 + 		basic_machine=h8300-hitachi
 118.474 + 		os=-hms
 118.475 + 		;;
 118.476 +-	h8300xray)					# EGCS LOCAL
 118.477 ++	h8300xray)
 118.478 + 		basic_machine=h8300-hitachi
 118.479 + 		os=-xray
 118.480 + 		;;
 118.481 +-	h8500hms)					# EGCS LOCAL
 118.482 ++	h8500hms)
 118.483 + 		basic_machine=h8500-hitachi
 118.484 + 		os=-hms
 118.485 + 		;;
 118.486 +@@ -416,22 +526,6 @@
 118.487 + 		basic_machine=m68k-hp
 118.488 + 		os=-hpux
 118.489 + 		;;
 118.490 +-        w89k-*)						# EGCS LOCAL
 118.491 +-                basic_machine=hppa1.1-winbond
 118.492 +-                os=-proelf
 118.493 +-                ;;
 118.494 +-        op50n-*)					# EGCS LOCAL
 118.495 +-                basic_machine=hppa1.1-oki
 118.496 +-                os=-proelf
 118.497 +-                ;;
 118.498 +-        op60c-*)					# EGCS LOCAL
 118.499 +-                basic_machine=hppa1.1-oki
 118.500 +-                os=-proelf
 118.501 +-                ;;
 118.502 +-        hppro)						# EGCS LOCAL
 118.503 +-                basic_machine=hppa1.1-hp
 118.504 +-                os=-proelf
 118.505 +-                ;;
 118.506 + 	hp3k9[0-9][0-9] | hp9[0-9][0-9])
 118.507 + 		basic_machine=hppa1.0-hp
 118.508 + 		;;
 118.509 +@@ -441,22 +535,21 @@
 118.510 + 	hp9k3[2-9][0-9])
 118.511 + 		basic_machine=m68k-hp
 118.512 + 		;;
 118.513 +-	hp9k6[0-9][0-9] | hp6[0-9][0-9] )
 118.514 ++	hp9k6[0-9][0-9] | hp6[0-9][0-9])
 118.515 + 		basic_machine=hppa1.0-hp
 118.516 + 		;;
 118.517 +-	hp9k7[0-79][0-9] | hp7[0-79][0-9] )
 118.518 ++	hp9k7[0-79][0-9] | hp7[0-79][0-9])
 118.519 + 		basic_machine=hppa1.1-hp
 118.520 + 		;;
 118.521 +-	hp9k78[0-9] | hp78[0-9] )
 118.522 ++	hp9k78[0-9] | hp78[0-9])
 118.523 + 		# FIXME: really hppa2.0-hp
 118.524 + 		basic_machine=hppa1.1-hp
 118.525 + 		;;
 118.526 +-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | \
 118.527 +-	hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893 )
 118.528 ++	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
 118.529 + 		# FIXME: really hppa2.0-hp
 118.530 + 		basic_machine=hppa1.1-hp
 118.531 + 		;;
 118.532 +-	hp9k8[0-9][13679] | hp8[0-9][13679] )
 118.533 ++	hp9k8[0-9][13679] | hp8[0-9][13679])
 118.534 + 		basic_machine=hppa1.1-hp
 118.535 + 		;;
 118.536 + 	hp9k8[0-9][0-9] | hp8[0-9][0-9])
 118.537 +@@ -465,47 +558,42 @@
 118.538 + 	hppa-next)
 118.539 + 		os=-nextstep3
 118.540 + 		;;
 118.541 +-	hppaosf)					# EGCS LOCAL
 118.542 ++	hppaosf)
 118.543 + 		basic_machine=hppa1.1-hp
 118.544 + 		os=-osf
 118.545 + 		;;
 118.546 ++	hppro)
 118.547 ++		basic_machine=hppa1.1-hp
 118.548 ++		os=-proelf
 118.549 ++		;;
 118.550 + 	i370-ibm* | ibm*)
 118.551 + 		basic_machine=i370-ibm
 118.552 +-		os=-mvs
 118.553 + 		;;
 118.554 + # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
 118.555 +-	i[34567]86v32)
 118.556 ++	i*86v32)
 118.557 + 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 118.558 + 		os=-sysv32
 118.559 + 		;;
 118.560 +-	i[34567]86v4*)
 118.561 ++	i*86v4*)
 118.562 + 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 118.563 + 		os=-sysv4
 118.564 + 		;;
 118.565 +-	i[34567]86v)
 118.566 ++	i*86v)
 118.567 + 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 118.568 + 		os=-sysv
 118.569 + 		;;
 118.570 +-	i[34567]86sol2)
 118.571 ++	i*86sol2)
 118.572 + 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 118.573 + 		os=-solaris2
 118.574 + 		;;
 118.575 +-	i386mach)					# EGCS LOCAL
 118.576 ++	i386mach)
 118.577 + 		basic_machine=i386-mach
 118.578 + 		os=-mach
 118.579 + 		;;
 118.580 +-	i386-vsta | vsta)				# EGCS LOCAL
 118.581 ++	i386-vsta | vsta)
 118.582 + 		basic_machine=i386-unknown
 118.583 + 		os=-vsta
 118.584 + 		;;
 118.585 +-	i386-go32 | go32)				# EGCS LOCAL
 118.586 +-		basic_machine=i386-unknown
 118.587 +-		os=-go32
 118.588 +-		;;
 118.589 +-	i386-mingw32 | mingw32)
 118.590 +-		basic_machine=i386-unknown
 118.591 +-		os=-mingw32
 118.592 +-		;;
 118.593 + 	iris | iris4d)
 118.594 + 		basic_machine=mips-sgi
 118.595 + 		case $os in
 118.596 +@@ -531,16 +619,16 @@
 118.597 + 		basic_machine=ns32k-utek
 118.598 + 		os=-sysv
 118.599 + 		;;
 118.600 ++	mingw32)
 118.601 ++		basic_machine=i386-pc
 118.602 ++		os=-mingw32
 118.603 ++		;;
 118.604 + 	miniframe)
 118.605 + 		basic_machine=m68000-convergent
 118.606 + 		;;
 118.607 +-	mipsel*-linux*)
 118.608 +-		basic_machine=mipsel-unknown
 118.609 +-		os=-linux-gnu
 118.610 +-		;;
 118.611 +-	mips*-linux*)
 118.612 +-		basic_machine=mips-unknown
 118.613 +-		os=-linux-gnu
 118.614 ++	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
 118.615 ++		basic_machine=m68k-atari
 118.616 ++		os=-mint
 118.617 + 		;;
 118.618 + 	mips3*-*)
 118.619 + 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
 118.620 +@@ -548,24 +636,36 @@
 118.621 + 	mips3*)
 118.622 + 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
 118.623 + 		;;
 118.624 +-	monitor)					# EGCS LOCAL
 118.625 ++	mmix*)
 118.626 ++		basic_machine=mmix-knuth
 118.627 ++		os=-mmixware
 118.628 ++		;;
 118.629 ++	monitor)
 118.630 + 		basic_machine=m68k-rom68k
 118.631 + 		os=-coff
 118.632 + 		;;
 118.633 +-	msdos)						# EGCS LOCAL
 118.634 +-		basic_machine=i386-unknown	
 118.635 ++	morphos)
 118.636 ++		basic_machine=powerpc-unknown
 118.637 ++		os=-morphos
 118.638 ++		;;
 118.639 ++	msdos)
 118.640 ++		basic_machine=i386-pc
 118.641 + 		os=-msdos
 118.642 + 		;;
 118.643 ++	mvs)
 118.644 ++		basic_machine=i370-ibm
 118.645 ++		os=-mvs
 118.646 ++		;;
 118.647 + 	ncr3000)
 118.648 + 		basic_machine=i486-ncr
 118.649 + 		os=-sysv4
 118.650 + 		;;
 118.651 + 	netbsd386)
 118.652 +-		basic_machine=i386-unknown		# EGCS LOCAL
 118.653 ++		basic_machine=i386-unknown
 118.654 + 		os=-netbsd
 118.655 + 		;;
 118.656 + 	netwinder)
 118.657 +-		basic_machine=armv4l-corel
 118.658 ++		basic_machine=armv4l-rebel
 118.659 + 		os=-linux
 118.660 + 		;;
 118.661 + 	news | news700 | news800 | news900)
 118.662 +@@ -580,7 +680,7 @@
 118.663 + 		basic_machine=mips-sony
 118.664 + 		os=-newsos
 118.665 + 		;;
 118.666 +-	necv70)						# EGCS LOCAL
 118.667 ++	necv70)
 118.668 + 		basic_machine=v70-nec
 118.669 + 		os=-sysv
 118.670 + 		;;
 118.671 +@@ -609,18 +709,37 @@
 118.672 + 		basic_machine=i960-intel
 118.673 + 		os=-nindy
 118.674 + 		;;
 118.675 +-	mon960)						# EGCS LOCAL
 118.676 ++	mon960)
 118.677 + 		basic_machine=i960-intel
 118.678 + 		os=-mon960
 118.679 + 		;;
 118.680 ++	nonstopux)
 118.681 ++		basic_machine=mips-compaq
 118.682 ++		os=-nonstopux
 118.683 ++		;;
 118.684 + 	np1)
 118.685 + 		basic_machine=np1-gould
 118.686 + 		;;
 118.687 +-	OSE68000 | ose68000)				# EGCS LOCAL
 118.688 ++	nv1)
 118.689 ++		basic_machine=nv1-cray
 118.690 ++		os=-unicosmp
 118.691 ++		;;
 118.692 ++	nsr-tandem)
 118.693 ++		basic_machine=nsr-tandem
 118.694 ++		;;
 118.695 ++	op50n-* | op60c-*)
 118.696 ++		basic_machine=hppa1.1-oki
 118.697 ++		os=-proelf
 118.698 ++		;;
 118.699 ++	or32 | or32-*)
 118.700 ++		basic_machine=or32-unknown
 118.701 ++		os=-coff
 118.702 ++		;;
 118.703 ++	OSE68000 | ose68000)
 118.704 + 		basic_machine=m68000-ericsson
 118.705 + 		os=-ose
 118.706 + 		;;
 118.707 +-	os68k)						# EGCS LOCAL
 118.708 ++	os68k)
 118.709 + 		basic_machine=m68k-none
 118.710 + 		os=-os68k
 118.711 + 		;;
 118.712 +@@ -638,46 +757,60 @@
 118.713 + 	pbb)
 118.714 + 		basic_machine=m68k-tti
 118.715 + 		;;
 118.716 +-        pc532 | pc532-*)
 118.717 ++	pc532 | pc532-*)
 118.718 + 		basic_machine=ns32k-pc532
 118.719 + 		;;
 118.720 +-	pentium | p5 | k5 | k6 | nexen)
 118.721 ++	pentium | p5 | k5 | k6 | nexgen | viac3)
 118.722 + 		basic_machine=i586-pc
 118.723 + 		;;
 118.724 +-	pentiumpro | p6 | 6x86)
 118.725 ++	pentiumpro | p6 | 6x86 | athlon | athlon_*)
 118.726 + 		basic_machine=i686-pc
 118.727 + 		;;
 118.728 + 	pentiumii | pentium2)
 118.729 +-		basic_machine=i786-pc
 118.730 ++		basic_machine=i686-pc
 118.731 + 		;;
 118.732 +-	pentium-* | p5-* | k5-* | k6-* | nexen-*)
 118.733 ++	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
 118.734 + 		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
 118.735 + 		;;
 118.736 +-	pentiumpro-* | p6-* | 6x86-*)
 118.737 ++	pentiumpro-* | p6-* | 6x86-* | athlon-*)
 118.738 + 		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 118.739 + 		;;
 118.740 + 	pentiumii-* | pentium2-*)
 118.741 +-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
 118.742 ++		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 118.743 + 		;;
 118.744 + 	pn)
 118.745 + 		basic_machine=pn-gould
 118.746 + 		;;
 118.747 +-	power)	basic_machine=rs6000-ibm
 118.748 ++	power)	basic_machine=power-ibm
 118.749 + 		;;
 118.750 + 	ppc)	basic_machine=powerpc-unknown
 118.751 +-	        ;;
 118.752 ++		;;
 118.753 + 	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 118.754 + 		;;
 118.755 + 	ppcle | powerpclittle | ppc-le | powerpc-little)
 118.756 + 		basic_machine=powerpcle-unknown
 118.757 +-	        ;;
 118.758 ++		;;
 118.759 + 	ppcle-* | powerpclittle-*)
 118.760 + 		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
 118.761 + 		;;
 118.762 ++	ppc64)	basic_machine=powerpc64-unknown
 118.763 ++		;;
 118.764 ++	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
 118.765 ++		;;
 118.766 ++	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
 118.767 ++		basic_machine=powerpc64le-unknown
 118.768 ++		;;
 118.769 ++	ppc64le-* | powerpc64little-*)
 118.770 ++		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
 118.771 ++		;;
 118.772 + 	ps2)
 118.773 + 		basic_machine=i386-ibm
 118.774 + 		;;
 118.775 +-	rom68k)						# EGCS LOCAL
 118.776 ++	pw32)
 118.777 ++		basic_machine=i586-unknown
 118.778 ++		os=-pw32
 118.779 ++		;;
 118.780 ++	rom68k)
 118.781 + 		basic_machine=m68k-rom68k
 118.782 + 		os=-coff
 118.783 + 		;;
 118.784 +@@ -687,10 +820,22 @@
 118.785 + 	rtpc | rtpc-*)
 118.786 + 		basic_machine=romp-ibm
 118.787 + 		;;
 118.788 +-	sa29200)					# EGCS LOCAL
 118.789 ++	s390 | s390-*)
 118.790 ++		basic_machine=s390-ibm
 118.791 ++		;;
 118.792 ++	s390x | s390x-*)
 118.793 ++		basic_machine=s390x-ibm
 118.794 ++		;;
 118.795 ++	sa29200)
 118.796 + 		basic_machine=a29k-amd
 118.797 + 		os=-udi
 118.798 + 		;;
 118.799 ++	sb1)
 118.800 ++		basic_machine=mipsisa64sb1-unknown
 118.801 ++		;;
 118.802 ++	sb1el)
 118.803 ++		basic_machine=mipsisa64sb1el-unknown
 118.804 ++		;;
 118.805 + 	sequent)
 118.806 + 		basic_machine=i386-sequent
 118.807 + 		;;
 118.808 +@@ -698,7 +843,7 @@
 118.809 + 		basic_machine=sh-hitachi
 118.810 + 		os=-hms
 118.811 + 		;;
 118.812 +-	sparclite-wrs)					# EGCS LOCAL
 118.813 ++	sparclite-wrs | simso-wrs)
 118.814 + 		basic_machine=sparclite-wrs
 118.815 + 		os=-vxworks
 118.816 + 		;;
 118.817 +@@ -709,10 +854,10 @@
 118.818 + 	spur)
 118.819 + 		basic_machine=spur-unknown
 118.820 + 		;;
 118.821 +-	st2000)						# EGCS LOCAL
 118.822 ++	st2000)
 118.823 + 		basic_machine=m68k-tandem
 118.824 + 		;;
 118.825 +-	stratus)					# EGCS LOCAL
 118.826 ++	stratus)
 118.827 + 		basic_machine=i860-stratus
 118.828 + 		os=-sysv4
 118.829 + 		;;
 118.830 +@@ -756,16 +901,40 @@
 118.831 + 	sun386 | sun386i | roadrunner)
 118.832 + 		basic_machine=i386-sun
 118.833 + 		;;
 118.834 ++	sv1)
 118.835 ++		basic_machine=sv1-cray
 118.836 ++		os=-unicos
 118.837 ++		;;
 118.838 + 	symmetry)
 118.839 + 		basic_machine=i386-sequent
 118.840 + 		os=-dynix
 118.841 + 		;;
 118.842 ++	t3e)
 118.843 ++		basic_machine=alphaev5-cray
 118.844 ++		os=-unicos
 118.845 ++		;;
 118.846 ++	t90)
 118.847 ++		basic_machine=t90-cray
 118.848 ++		os=-unicos
 118.849 ++		;;
 118.850 ++        tic4x | c4x*)
 118.851 ++		basic_machine=tic4x-unknown
 118.852 ++		os=-coff
 118.853 ++		;;
 118.854 ++	tic54x | c54x*)
 118.855 ++		basic_machine=tic54x-unknown
 118.856 ++		os=-coff
 118.857 ++		;;
 118.858 + 	tx39)
 118.859 + 		basic_machine=mipstx39-unknown
 118.860 + 		;;
 118.861 + 	tx39el)
 118.862 + 		basic_machine=mipstx39el-unknown
 118.863 + 		;;
 118.864 ++	toad1)
 118.865 ++		basic_machine=pdp10-xkl
 118.866 ++		os=-tops20
 118.867 ++		;;
 118.868 + 	tower | tower-32)
 118.869 + 		basic_machine=m68k-ncr
 118.870 + 		;;
 118.871 +@@ -777,7 +946,7 @@
 118.872 + 		basic_machine=a29k-nyu
 118.873 + 		os=-sym1
 118.874 + 		;;
 118.875 +-	v810 | necv810)					# EGCS LOCAL
 118.876 ++	v810 | necv810)
 118.877 + 		basic_machine=v810-nec
 118.878 + 		os=-none
 118.879 + 		;;
 118.880 +@@ -790,8 +959,8 @@
 118.881 + 		os=-vms
 118.882 + 		;;
 118.883 + 	vpp*|vx|vx-*)
 118.884 +-               basic_machine=f301-fujitsu
 118.885 +-               ;;
 118.886 ++		basic_machine=f301-fujitsu
 118.887 ++		;;
 118.888 + 	vxworks960)
 118.889 + 		basic_machine=i960-wrs
 118.890 + 		os=-vxworks
 118.891 +@@ -804,18 +973,22 @@
 118.892 + 		basic_machine=a29k-wrs
 118.893 + 		os=-vxworks
 118.894 + 		;;
 118.895 +-	w65*)						# EGCS LOCAL
 118.896 +- 		basic_machine=w65-wdc
 118.897 +- 		os=-none
 118.898 ++	w65*)
 118.899 ++		basic_machine=w65-wdc
 118.900 ++		os=-none
 118.901 + 		;;
 118.902 +-	xmp)
 118.903 +-		basic_machine=xmp-cray
 118.904 +-		os=-unicos
 118.905 ++	w89k-*)
 118.906 ++		basic_machine=hppa1.1-winbond
 118.907 ++		os=-proelf
 118.908 + 		;;
 118.909 +-        xps | xps100)
 118.910 ++	xps | xps100)
 118.911 + 		basic_machine=xps100-honeywell
 118.912 + 		;;
 118.913 +-	z8k-*-coff)					# EGCS LOCAL
 118.914 ++	ymp)
 118.915 ++		basic_machine=ymp-cray
 118.916 ++		os=-unicos
 118.917 ++		;;
 118.918 ++	z8k-*-coff)
 118.919 + 		basic_machine=z8k-unknown
 118.920 + 		os=-sim
 118.921 + 		;;
 118.922 +@@ -826,22 +999,15 @@
 118.923 + 
 118.924 + # Here we handle the default manufacturer of certain CPU types.  It is in
 118.925 + # some cases the only manufacturer, in others, it is the most popular.
 118.926 +-	w89k)						# EGCS LOCAL
 118.927 ++	w89k)
 118.928 + 		basic_machine=hppa1.1-winbond
 118.929 + 		;;
 118.930 +-	op50n)						# EGCS LOCAL
 118.931 ++	op50n)
 118.932 + 		basic_machine=hppa1.1-oki
 118.933 + 		;;
 118.934 +-	op60c)						# EGCS LOCAL
 118.935 ++	op60c)
 118.936 + 		basic_machine=hppa1.1-oki
 118.937 + 		;;
 118.938 +-	mips)
 118.939 +-		if [ x$os = x-linux-gnu ]; then
 118.940 +-			basic_machine=mips-unknown
 118.941 +-		else
 118.942 +-			basic_machine=mips-mips
 118.943 +-		fi
 118.944 +-		;;
 118.945 + 	romp)
 118.946 + 		basic_machine=romp-ibm
 118.947 + 		;;
 118.948 +@@ -851,16 +1017,26 @@
 118.949 + 	vax)
 118.950 + 		basic_machine=vax-dec
 118.951 + 		;;
 118.952 ++	pdp10)
 118.953 ++		# there are many clones, so DEC is not a safe bet
 118.954 ++		basic_machine=pdp10-unknown
 118.955 ++		;;
 118.956 + 	pdp11)
 118.957 + 		basic_machine=pdp11-dec
 118.958 + 		;;
 118.959 + 	we32k)
 118.960 + 		basic_machine=we32k-att
 118.961 + 		;;
 118.962 +-	sparc | sparcv9)
 118.963 ++	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
 118.964 ++		basic_machine=sh-unknown
 118.965 ++		;;
 118.966 ++	sh64)
 118.967 ++		basic_machine=sh64-unknown
 118.968 ++		;;
 118.969 ++	sparc | sparcv9 | sparcv9b)
 118.970 + 		basic_machine=sparc-sun
 118.971 + 		;;
 118.972 +-        cydra)
 118.973 ++	cydra)
 118.974 + 		basic_machine=cydra-cydrome
 118.975 + 		;;
 118.976 + 	orion)
 118.977 +@@ -869,16 +1045,15 @@
 118.978 + 	orion105)
 118.979 + 		basic_machine=clipper-highlevel
 118.980 + 		;;
 118.981 +-	mac | mpw | mac-mpw)				# EGCS LOCAL
 118.982 ++	mac | mpw | mac-mpw)
 118.983 + 		basic_machine=m68k-apple
 118.984 + 		;;
 118.985 +-	pmac | pmac-mpw)				# EGCS LOCAL
 118.986 ++	pmac | pmac-mpw)
 118.987 + 		basic_machine=powerpc-apple
 118.988 + 		;;
 118.989 +- 	c4x*)
 118.990 +- 		basic_machine=c4x-none
 118.991 +- 		os=-coff
 118.992 +-  		;;
 118.993 ++	*-unknown)
 118.994 ++		# Make sure to match an already-canonicalized machine name.
 118.995 ++		;;
 118.996 + 	*)
 118.997 + 		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
 118.998 + 		exit 1
 118.999 +@@ -935,20 +1110,38 @@
118.1000 + 	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
118.1001 + 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
118.1002 + 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
118.1003 ++	      | -chorusos* | -chorusrdb* \
118.1004 + 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
118.1005 + 	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
118.1006 +-	      | -interix* | -uwin* )
118.1007 ++	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
118.1008 ++	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
118.1009 ++	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
118.1010 ++	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
118.1011 ++	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
118.1012 ++	      | -powermax* | -dnix* | -microbsd*)
118.1013 + 	# Remember, each alternative MUST END IN *, to match a version number.
118.1014 + 		;;
118.1015 +-	# EGCS LOCAL
118.1016 ++	-qnx*)
118.1017 ++		case $basic_machine in
118.1018 ++		    x86-* | i*86-*)
118.1019 ++			;;
118.1020 ++		    *)
118.1021 ++			os=-nto$os
118.1022 ++			;;
118.1023 ++		esac
118.1024 ++		;;
118.1025 ++	-nto-qnx*)
118.1026 ++		;;
118.1027 ++	-nto*)
118.1028 ++		os=`echo $os | sed -e 's|nto|nto-qnx|'`
118.1029 ++		;;
118.1030 + 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
118.1031 +-	      | -windows* | -osx | -abug |  -netware* | -os9* | -beos* \
118.1032 +-	      | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
118.1033 ++	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
118.1034 ++	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
118.1035 + 		;;
118.1036 + 	-mac*)
118.1037 + 		os=`echo $os | sed -e 's|mac|macos|'`
118.1038 + 		;;
118.1039 +-	# END EGCS LOCAL
118.1040 + 	-linux*)
118.1041 + 		os=`echo $os | sed -e 's|linux|linux-gnu|'`
118.1042 + 		;;
118.1043 +@@ -958,6 +1151,12 @@
118.1044 + 	-sunos6*)
118.1045 + 		os=`echo $os | sed -e 's|sunos6|solaris3|'`
118.1046 + 		;;
118.1047 ++	-opened*)
118.1048 ++		os=-openedition
118.1049 ++		;;
118.1050 ++	-wince*)
118.1051 ++		os=-wince
118.1052 ++		;;
118.1053 + 	-osfrose*)
118.1054 + 		os=-osfrose
118.1055 + 		;;
118.1056 +@@ -973,14 +1172,23 @@
118.1057 + 	-acis*)
118.1058 + 		os=-aos
118.1059 + 		;;
118.1060 +-	-386bsd)					# EGCS LOCAL
118.1061 ++	-atheos*)
118.1062 ++		os=-atheos
118.1063 ++		;;
118.1064 ++	-386bsd)
118.1065 + 		os=-bsd
118.1066 + 		;;
118.1067 + 	-ctix* | -uts*)
118.1068 + 		os=-sysv
118.1069 + 		;;
118.1070 ++	-nova*)
118.1071 ++		os=-rtmk-nova
118.1072 ++		;;
118.1073 + 	-ns2 )
118.1074 +-	        os=-nextstep2
118.1075 ++		os=-nextstep2
118.1076 ++		;;
118.1077 ++	-nsk*)
118.1078 ++		os=-nsk
118.1079 + 		;;
118.1080 + 	# Preserve the version number of sinix5.
118.1081 + 	-sinix5.*)
118.1082 +@@ -1007,15 +1215,21 @@
118.1083 + 	# This must come after -sysvr4.
118.1084 + 	-sysv*)
118.1085 + 		;;
118.1086 +-	-ose*)						# EGCS LOCAL
118.1087 ++	-ose*)
118.1088 + 		os=-ose
118.1089 + 		;;
118.1090 +-	-es1800*)					# EGCS LOCAL
118.1091 ++	-es1800*)
118.1092 + 		os=-ose
118.1093 + 		;;
118.1094 + 	-xenix)
118.1095 + 		os=-xenix
118.1096 + 		;;
118.1097 ++	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
118.1098 ++		os=-mint
118.1099 ++		;;
118.1100 ++	-aros*)
118.1101 ++		os=-aros
118.1102 ++		;;
118.1103 + 	-none)
118.1104 + 		;;
118.1105 + 	*)
118.1106 +@@ -1041,13 +1255,17 @@
118.1107 + 	*-acorn)
118.1108 + 		os=-riscix1.2
118.1109 + 		;;
118.1110 +-	arm*-corel)
118.1111 ++	arm*-rebel)
118.1112 + 		os=-linux
118.1113 + 		;;
118.1114 + 	arm*-semi)
118.1115 + 		os=-aout
118.1116 + 		;;
118.1117 +-        pdp11-*)
118.1118 ++	# This must come before the *-dec entry.
118.1119 ++	pdp10-*)
118.1120 ++		os=-tops20
118.1121 ++		;;
118.1122 ++	pdp11-*)
118.1123 + 		os=-none
118.1124 + 		;;
118.1125 + 	*-dec | vax-*)
118.1126 +@@ -1065,15 +1283,18 @@
118.1127 + 		# default.
118.1128 + 		# os=-sunos4
118.1129 + 		;;
118.1130 +-	m68*-cisco)					# EGCS LOCAL
118.1131 ++	m68*-cisco)
118.1132 + 		os=-aout
118.1133 + 		;;
118.1134 +-	mips*-cisco)					# EGCS LOCAL
118.1135 ++	mips*-cisco)
118.1136 + 		os=-elf
118.1137 + 		;;
118.1138 +-        mips*-*)                                        # EGCS LOCAL
118.1139 +-                os=-elf
118.1140 +-                ;;
118.1141 ++	mips*-*)
118.1142 ++		os=-elf
118.1143 ++		;;
118.1144 ++	or32-*)
118.1145 ++		os=-coff
118.1146 ++		;;
118.1147 + 	*-tti)	# must be before sparc entry or we get the wrong os.
118.1148 + 		os=-sysv3
118.1149 + 		;;
118.1150 +@@ -1086,13 +1307,13 @@
118.1151 + 	*-ibm)
118.1152 + 		os=-aix
118.1153 + 		;;
118.1154 +-	*-wec)						# EGCS LOCAL
118.1155 ++	*-wec)
118.1156 + 		os=-proelf
118.1157 + 		;;
118.1158 +-	*-winbond)					# EGCS LOCAL
118.1159 ++	*-winbond)
118.1160 + 		os=-proelf
118.1161 + 		;;
118.1162 +-	*-oki)						# EGCS LOCAL
118.1163 ++	*-oki)
118.1164 + 		os=-proelf
118.1165 + 		;;
118.1166 + 	*-hp)
118.1167 +@@ -1137,36 +1358,39 @@
118.1168 + 	*-next)
118.1169 + 		os=-nextstep3
118.1170 + 		;;
118.1171 +-        *-gould)
118.1172 ++	*-gould)
118.1173 + 		os=-sysv
118.1174 + 		;;
118.1175 +-        *-highlevel)
118.1176 ++	*-highlevel)
118.1177 + 		os=-bsd
118.1178 + 		;;
118.1179 + 	*-encore)
118.1180 + 		os=-bsd
118.1181 + 		;;
118.1182 +-        *-sgi)
118.1183 ++	*-sgi)
118.1184 + 		os=-irix
118.1185 + 		;;
118.1186 +-        *-siemens)
118.1187 ++	*-siemens)
118.1188 + 		os=-sysv4
118.1189 + 		;;
118.1190 + 	*-masscomp)
118.1191 + 		os=-rtu
118.1192 + 		;;
118.1193 +-	f301-fujitsu)
118.1194 ++	f30[01]-fujitsu | f700-fujitsu)
118.1195 + 		os=-uxpv
118.1196 + 		;;
118.1197 +-	*-rom68k)					# EGCS LOCAL
118.1198 ++	*-rom68k)
118.1199 + 		os=-coff
118.1200 + 		;;
118.1201 +-	*-*bug)						# EGCS LOCAL
118.1202 ++	*-*bug)
118.1203 + 		os=-coff
118.1204 + 		;;
118.1205 +-	*-apple)					# EGCS LOCAL
118.1206 ++	*-apple)
118.1207 + 		os=-macos
118.1208 + 		;;
118.1209 ++	*-atari*)
118.1210 ++		os=-mint
118.1211 ++		;;
118.1212 + 	*)
118.1213 + 		os=-none
118.1214 + 		;;
118.1215 +@@ -1212,27 +1436,41 @@
118.1216 + 			-genix*)
118.1217 + 				vendor=ns
118.1218 + 				;;
118.1219 +-			-mvs*)
118.1220 ++			-mvs* | -opened*)
118.1221 + 				vendor=ibm
118.1222 + 				;;
118.1223 + 			-ptx*)
118.1224 + 				vendor=sequent
118.1225 + 				;;
118.1226 +-			-vxsim* | -vxworks*)
118.1227 ++			-vxsim* | -vxworks* | -windiss*)
118.1228 + 				vendor=wrs
118.1229 + 				;;
118.1230 + 			-aux*)
118.1231 + 				vendor=apple
118.1232 + 				;;
118.1233 +-			-hms*)				# EGCS LOCAL
118.1234 ++			-hms*)
118.1235 + 				vendor=hitachi
118.1236 + 				;;
118.1237 +-			-mpw* | -macos*)		# EGCS LOCAL
118.1238 ++			-mpw* | -macos*)
118.1239 + 				vendor=apple
118.1240 + 				;;
118.1241 ++			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
118.1242 ++				vendor=atari
118.1243 ++				;;
118.1244 ++			-vos*)
118.1245 ++				vendor=stratus
118.1246 ++				;;
118.1247 + 		esac
118.1248 + 		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
118.1249 + 		;;
118.1250 + esac
118.1251 + 
118.1252 + echo $basic_machine$os
118.1253 ++exit 0
118.1254 ++
118.1255 ++# Local variables:
118.1256 ++# eval: (add-hook 'write-file-hooks 'time-stamp)
118.1257 ++# time-stamp-start: "timestamp='"
118.1258 ++# time-stamp-format: "%:y-%02m-%02d"
118.1259 ++# time-stamp-end: "'"
118.1260 ++# End:
   119.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   119.2 +++ b/patches/gcc/2.95.3/deque-leak-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   119.3 @@ -0,0 +1,31 @@
   119.4 +[See also http://gcc.gnu.org/ml/libstdc++/2001-11/msg00133.html ]
   119.5 +
   119.6 +Date: Fri, 16 Nov 2001 16:06:22 -0500
   119.7 +From: Phil Edwards <pedwards at disaster dot jaj dot com>
   119.8 +To: gcc-patches at gcc dot gnu dot org
   119.9 +Subject: [libstdc++ trunk & 3.0]  Fix deque memory leak
  119.10 +Message-ID: <20011116160622.A23094@disaster.jaj.com>
  119.11 +
  119.12 +
  119.13 +As discussed on the libstdc++ mailing list.  Tested on i686/linux.
  119.14 +
  119.15 +
  119.16 +
  119.17 +2001-11-16  Paolo Carlini  <pcarlini@unitus.it>
  119.18 +
  119.19 +	* include/bits/stl_deque.h (deque::erase()):  Fix memory leak.
  119.20 +
  119.21 +
  119.22 +[rediffed against 2.95.3 -- dank]
  119.23 +
  119.24 +--- gcc-2.95.3/libstdc++/stl/stl_deque.h.old	2001-01-01 09:48:22.000000000 -0800
  119.25 ++++ gcc-2.95.3/libstdc++/stl/stl_deque.h	2006-02-18 15:24:17.000000000 -0800
  119.26 +@@ -1052,7 +1052,7 @@
  119.27 +       copy_backward(_M_start, __first, __last);
  119.28 +       iterator __new_start = _M_start + __n;
  119.29 +       destroy(_M_start, __new_start);
  119.30 +-      _M_destroy_nodes(__new_start._M_node, _M_start._M_node);
  119.31 ++      _M_destroy_nodes(_M_start._M_node, __new_start._M_node);  /* fixed per http://gcc.gnu.org/ml/libstdc++/2001-11/msg00139.html */
  119.32 +       _M_start = __new_start;
  119.33 +     }
  119.34 +     else {
   120.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   120.2 +++ b/patches/gcc/2.95.3/gcc-2.95.3-cygwin-020611.patch	Sat Feb 24 11:00:05 2007 +0000
   120.3 @@ -0,0 +1,33 @@
   120.4 +[ Building gcc-2.95.3 on cygwin yields a compiler that sticks a .exe
   120.5 +  on the end of every executable, even if they're linux executable.
   120.6 +  This is highly annoying, and causes glibc build failures that look like this:
   120.7 +    mv: `.../bin/makedb.new' and `.../bin/makedb' are the same file
   120.8 +    make[2]: *** [.../bin/makedb] Error 1
   120.9 +    make[2]: Leaving directory `.../gcc-2.95.3-glibc-2.1.3/glibc-2.1.3/db2'
  120.10 +
  120.11 +  The mainline solves this with http://gcc.gnu.org/ml/gcc-cvs/2001-04/msg00440.html,
  120.12 +  but that doesn't apply cleanly to gcc-2.95.3.
  120.13 +
  120.14 +  So, I'm using
  120.15 +  http://www.uclinux.org/pub/uClinux/uclinux-elf-tools/tools-20030314/gcc-2.95.3-cygwin-020611.patch
  120.16 +  This is the only patch in crosstool that *isn't* suitable for the mainline.
  120.17 +  I can live with this patch simply because crosstool does not build
  120.18 +  compilers that target cygwin or VAX/VMS. 
  120.19 +  If that ever changes, I might need to try applying the real patch.
  120.20 +]
  120.21 +
  120.22 +
  120.23 +
  120.24 +#
  120.25 +# This patch can be found at http://www.uclinux.org/pub/uClinux/m68k-elf-tools/
  120.26 +#
  120.27 +--- gcc-2.95.3/gcc/config/i386/xm-cygwin.h	1999-04-22 16:40:56.000000000 +0200
  120.28 ++++ gcc-2.95.3-cygwin/gcc/config/i386/xm-cygwin.h	2002-06-11 08:23:18.000000000 +0200
  120.29 +@@ -19,7 +19,6 @@
  120.30 + the Free Software Foundation, 59 Temple Place - Suite 330,
  120.31 + Boston, MA 02111-1307, USA. */
  120.32 + 
  120.33 +-#define EXECUTABLE_SUFFIX ".exe"
  120.34 + #define NO_SYS_SIGLIST 1
  120.35 + 
  120.36 + /* We support both "/" and "\" since everybody tests both but we
   121.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   121.2 +++ b/patches/gcc/2.95.3/gcc-2.95.3-trap-posix.patch	Sat Feb 24 11:00:05 2007 +0000
   121.3 @@ -0,0 +1,44 @@
   121.4 +# 
   121.5 +# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
   121.6 +#
   121.7 +# Error:
   121.8 +#
   121.9 +# creating libintl.h
  121.10 +# Configuring etc...
  121.11 +# loading cache ../config.cache
  121.12 +# checking for a BSD compatible install... (cached) /usr/bin/install -c
  121.13 +# creating ./config.status
  121.14 +# creating Makefile
  121.15 +# trap: usage: trap [-lp] [[arg] signal_spec ...]
  121.16 +#
  121.17 +# Description:
  121.18 +#
  121.19 +# non-posix conform usage of trap causes bash >= 3.0 to fail
  121.20 +# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
  121.21 +#
  121.22 +# Status:
  121.23 +#
  121.24 +# fixed in gcc >= 3.3.5
  121.25 +# backport of gcc-3.3.5 fix
  121.26 +#
  121.27 +diff -ruN gcc-2.95.3-orig/configure gcc-2.95.3/configure
  121.28 +--- gcc-2.95.3-orig/configure	1999-04-02 16:17:40.000000000 +0200
  121.29 ++++ gcc-2.95.3/configure	2005-04-20 18:25:45.030488235 +0200
  121.30 +@@ -687,7 +687,7 @@
  121.31 + if test -f skip-this-dir; then
  121.32 + 	# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
  121.33 + 	# and reset the trap handler.
  121.34 +-	trap 0
  121.35 ++	trap '' 0
  121.36 + 	rm -f Makefile* ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
  121.37 + 	# Execute the final clean-up actions
  121.38 + 	${config_shell} skip-this-dir
  121.39 +@@ -1599,7 +1599,7 @@
  121.40 + # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
  121.41 + # and reset the trap handler.
  121.42 + rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
  121.43 +-trap 0
  121.44 ++trap '' 0
  121.45 + 
  121.46 + exit 0
  121.47 + 
   122.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   122.2 +++ b/patches/gcc/2.95.3/gcc-pr3106.patch	Sat Feb 24 11:00:05 2007 +0000
   122.3 @@ -0,0 +1,28 @@
   122.4 +See http://gcc.gnu.org/PR3106
   122.5 +Backported from gcc-3.0.x
   122.6 +
   122.7 +Fixes error
   122.8 +  .../binutils-2.11.2/libiberty/strerror.c:468: error: conflicting types for `sys_nerr'
   122.9 +  /usr/include/stdio.h:258: error: previous declaration of `sys_nerr'
  122.10 +  make[1]: *** [strerror.o] Error 1
  122.11 +  make: *** [all-libiberty] Error 2
  122.12 +on Mac OS X.
  122.13 +
  122.14 +--- gcc-2.95.3/libiberty/strerror.c.old	2004-03-24 16:23:19.000000000 -0800
  122.15 ++++ gcc-2.95.3/libiberty/strerror.c	2004-03-24 16:23:48.000000000 -0800
  122.16 +@@ -13,6 +13,7 @@
  122.17 +    incompatible with our later declaration, perhaps by using const
  122.18 +    attributes.  So we hide the declaration in errno.h (if any) using a
  122.19 +    macro. */
  122.20 ++#define sys_nerr sys_nerr__
  122.21 + #define sys_errlist sys_errlist__
  122.22 + #endif
  122.23 + 
  122.24 +@@ -20,6 +21,7 @@
  122.25 + #include <errno.h>
  122.26 + 
  122.27 + #ifdef HAVE_SYS_ERRLIST
  122.28 ++#undef sys_nerr
  122.29 + #undef sys_errlist
  122.30 + #endif
  122.31 + 
   123.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   123.2 +++ b/patches/gcc/2.95.3/threads_snafu.patch	Sat Feb 24 11:00:05 2007 +0000
   123.3 @@ -0,0 +1,28 @@
   123.4 +This fixes the error
   123.5 +
   123.6 +In file included from gthr-default.h:1,
   123.7 +                 from /build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/gcc-2.95.3/gcc/gthr.h:98,
   123.8 +                 from /build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/gcc-2.95.3/gcc/libgcc2.c:3034:
   123.9 +/build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/gcc-2.95.3/gcc/gthr-posix.h:37: pthread.h: No such file or directory
  123.10 +make[3]: *** [libgcc2.a] Error 1
  123.11 +make[3]: Leaving directory `/build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/build-gcc-core/gcc'
  123.12 +
  123.13 +in what I think is a nicer way than the patch used by the arm team,
  123.14 +i.e. "perl -pi -e 's/^(TARGET_LIBGCC2_CFLAGS.*)/$1 -Dinhibit_libc -D__gthr_posix_h/' gcc/config/arm/t-linux"
  123.15 +which seems a bit of a kludge.
  123.16 +
  123.17 +--- gcc-2.95.3/gcc/configure.old	Fri Mar 16 06:13:48 2001
  123.18 ++++ gcc-2.95.3/gcc/configure	Sun Jun  8 13:02:20 2003
  123.19 +@@ -853,9 +853,9 @@
  123.20 + # Check whether --enable-threads or --disable-threads was given.
  123.21 + if test "${enable_threads+set}" = set; then
  123.22 +   enableval="$enable_threads"
  123.23 +-  if test x$enable_threads = xno; then
  123.24 +-	enable_threads=''
  123.25 +-fi
  123.26 ++  #if test x$enable_threads = xno; then
  123.27 ++	#enable_threads=''
  123.28 ++  #fi
  123.29 + else
  123.30 +   enable_threads=''
  123.31 + fi
   124.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   124.2 +++ b/patches/gcc/3.2.3/README-mips	Sat Feb 24 11:00:05 2007 +0000
   124.3 @@ -0,0 +1,1648 @@
   124.4 +See also http://www.spinics.net/lists/mips/msg12236.html
   124.5 +
   124.6 +ftp://ftp.linux-mips.org/pub/linux/mips/redhat/7.3/test/SRPMS/gcc-3.2-7.1.src.rpm
   124.7 +contains the following patches and spec file.
   124.8 +You may wish to investigate some of these patches; I haven't.
   124.9 +I think this is mostly the Red Hat 8.0 srpm for a prerelease gcc-3.2, plus a couple
  124.10 +mips specific fixes, but you'd have to ask H.J.Lu or compare with the regular
  124.11 +Red Hat 8.0 srpm to find out.
  124.12 +In any case, the spec file is interesting reading.
  124.13 +- Dan K. 
  124.14 +
  124.15 +total 1164
  124.16 +   4 boehm-gc-LINUX.patch
  124.17 +   4 boehm-gc-mips.patch
  124.18 +   4 contrib-touch.patch
  124.19 +   8 gcc-arch.patch
  124.20 +   4 gcc-c++-template.patch
  124.21 +   4 gcc-copy.patch
  124.22 +   4 gcc-cross-bfd.patch
  124.23 +   4 gcc-cross.patch
  124.24 +   4 gcc-gcj-cross.patch
  124.25 +   4 gcc-libffi-mips.patch
  124.26 +   4 gcc-libgcc.patch
  124.27 + 480 gcc-libstdc++-glibc-2.2.patch
  124.28 +   4 gcc-libstdc++-mips.patch
  124.29 +   4 gcc-linux-atexit.patch
  124.30 +   8 gcc-linux-crt.patch
  124.31 +   4 gcc-mips-coff.patch
  124.32 +   4 gcc-mips-file.patch
  124.33 +   4 gcc-mips-ieee.patch
  124.34 +   4 gcc-mips-return.patch
  124.35 +   4 gcc-ppc-linux.patch
  124.36 +   8 gcc-sizeof.patch
  124.37 +   4 gcc-test-atexit.patch
  124.38 +   4 gcc-testsuite-c++.patch
  124.39 +   4 gcc-var.patch
  124.40 +   8 gcc32-2.96-RH-compat.patch
  124.41 +   4 gcc32-ada-addr2line.patch
  124.42 +   8 gcc32-ada-link.patch
  124.43 +  12 gcc32-attr-visibility.patch
  124.44 +   4 gcc32-attr-visibility2.patch
  124.45 +   4 gcc32-attr-visibility3.patch
  124.46 +   4 gcc32-attr-visibility4.patch
  124.47 +   4 gcc32-attr-visibility5.patch
  124.48 +   8 gcc32-boehm-gc-libs.patch
  124.49 +   4 gcc32-bogus-inline.patch
  124.50 +   4 gcc32-c++-nrv-test.patch
  124.51 +   4 gcc32-c++-pretty_function.patch
  124.52 +  16 gcc32-c++-tail-pad-backout.patch
  124.53 +   4 gcc32-c++-tsubst-asm.patch
  124.54 +   4 gcc32-cfg-eh.patch
  124.55 +   4 gcc32-debug-pr7241.patch
  124.56 +   4 gcc32-doc-gcov.patch
  124.57 +   4 gcc32-duplicate-decl.patch
  124.58 +   4 gcc32-dwarf2-pr6381.patch
  124.59 +   4 gcc32-dwarf2-pr6436-test.patch
  124.60 +   4 gcc32-fde-merge-compat.patch
  124.61 +   4 gcc32-fold-const-associate.patch
  124.62 +   4 gcc32-fold-const2.patch
  124.63 +  24 gcc32-hard-reg-sharing.patch
  124.64 +   4 gcc32-hard-reg-sharing2.patch
  124.65 +   4 gcc32-i386-default-momit-leaf-frame-pointer.patch
  124.66 +   4 gcc32-i386-memtest-test.patch
  124.67 +   4 gcc32-i386-no-default-momit-leaf-frame-pointer.patch
  124.68 +   4 gcc32-i386-pic-label-thunk.patch
  124.69 +   4 gcc32-i386-pr7242.patch
  124.70 +   4 gcc32-i386-profile-olfp.patch
  124.71 +   4 gcc32-inline-label.patch
  124.72 +   4 gcc32-interface_only.patch
  124.73 +   4 gcc32-java-no-rpath.patch
  124.74 +  20 gcc32-libstdc++-glibc23-1.patch
  124.75 +   4 gcc32-libstdc++-glibc23-2.patch
  124.76 +   4 gcc32-libstdc++-glibc23-3.patch
  124.77 +   4 gcc32-libstdc++-glibc23-4.patch
  124.78 +   4 gcc32-loop-prefetch.patch
  124.79 +   4 gcc32-pr6842.patch
  124.80 +   8 gcc32-rh69989.patch
  124.81 +  40 gcc32-s390-java.patch
  124.82 +   4 gcc32-sparc-sll1.patch
  124.83 +   4 gcc32-test-rh65771.patch
  124.84 +   8 gcc32-test-rotate.patch
  124.85 +  12 gcc32-tls-dwarf2.patch
  124.86 + 140 gcc32-tls.patch
  124.87 +   4 gcc32-tls2.patch
  124.88 +   4 gcc32-tls3.patch
  124.89 +   4 gcc32-tls4.patch
  124.90 +   4 gcc32-tls5.patch
  124.91 +  24 gcc32-tree-code.patch
  124.92 +   4 gcc32-trunc_int_for_mode.patch
  124.93 +   4 gcc32-typeof-asm.patch
  124.94 +   4 gcc32-x86_64-libiberty-pic.patch
  124.95 +   4 gcc32-x86_64-pr7559.patch
  124.96 +   4 gcc32-x86_64-q_regs_operand.patch
  124.97 +   4 gcc32-x86_64-rip-lowercase.patch
  124.98 +   4 libjava-cross.patch
  124.99 +   4 libtool-libs.patch
 124.100 +   4 libtool-mips.patch
 124.101 +
 124.102 +---------- gcc32.spec ---------
 124.103 +
 124.104 +%if %{_arch} != %{_build_arch}
 124.105 +%define cross_compile 1
 124.106 +%else
 124.107 +%define cross_compile 0
 124.108 +%endif
 124.109 +%{?_with_crosscompile: %{expand: %%define cross_compile 1}}
 124.110 +
 124.111 +%if %{cross_compile}
 124.112 +%define make_check 0
 124.113 +%else
 124.114 +%define make_check 1
 124.115 +%endif
 124.116 +%{?_without_check: %{expand: %%define make_check 0}}
 124.117 +%{?_with_check: %{expand: %%define make_check 1}}
 124.118 +
 124.119 +%define default 0
 124.120 +%{?_with_default: %{expand: %%define default 1}}
 124.121 +
 124.122 +%define gcconly 0
 124.123 +%{?_with_gcconly: %{expand: %%define gcconly 1}}
 124.124 +
 124.125 +%define DATE 20020903
 124.126 +%define gcc_version 3.2
 124.127 +%define gcc_release 7.1
 124.128 +%ifarch %{ix86} alpha ia64 ppc
 124.129 +%define build_ada 1
 124.130 +%else
 124.131 +%define build_ada 0
 124.132 +%endif
 124.133 +%{?_without_ada: %{expand: %%define build_ada 0}}
 124.134 +%if %{cross_compile}
 124.135 +%define build_ada 0
 124.136 +%endif
 124.137 +Summary: Various compilers (C, C++, Objective-C, Java, ...)
 124.138 +%if !%{gcconly}
 124.139 +Name: gcc
 124.140 +Version: 3.2
 124.141 +Release: %{gcc_release}
 124.142 +%else
 124.143 +Name: gcc-%{gcc_version}
 124.144 +Version: %{gcc_release}
 124.145 +Release: 1
 124.146 +%endif
 124.147 +Copyright: GPL
 124.148 +Group: Development/Languages
 124.149 +Source0: gcc-%{version}-%{DATE}.tar.bz2
 124.150 +URL: http://gcc.gnu.org
 124.151 +BuildRoot: %{_tmppath}/%{name}-%{version}-root
 124.152 +BuildRequires: binutils >= 2.12.90.0.9-1
 124.153 +BuildRequires: zlib-devel, gettext, dejagnu
 124.154 +# Make sure pthread.h doesn't contain __thread tokens
 124.155 +BuildRequires: glibc-devel >= 2.2.5-36.2
 124.156 +%if %{build_ada}
 124.157 +# Ada requires Ada to build
 124.158 +BuildRequires: gcc-gnat >= 3.1, libgnat >= 3.1
 124.159 +%endif
 124.160 +Requires: cpp = %{version}-%{release}
 124.161 +# Need .eh_frame ld optimizations
 124.162 +# Need proper visibility support
 124.163 +Requires: binutils >= 2.12.90.0.7-1
 124.164 +# Make sure gdb will understand DW_FORM_strp
 124.165 +Conflicts: gdb < 5.1-2
 124.166 +Requires: glibc-devel >= 2.2.5-36.2
 124.167 +Requires: libgcc >= %{version}-%{release}
 124.168 +%if !%{gcconly}
 124.169 +Obsoletes: gcc3
 124.170 +%endif
 124.171 +Prereq: /sbin/install-info
 124.172 +
 124.173 +Patch1: gcc32-2.96-RH-compat.patch
 124.174 +Patch2: gcc32-boehm-gc-libs.patch
 124.175 +Patch3: gcc32-bogus-inline.patch
 124.176 +Patch6: gcc32-fde-merge-compat.patch
 124.177 +Patch7: gcc32-attr-visibility.patch
 124.178 +Patch8: gcc32-attr-visibility2.patch
 124.179 +Patch9: gcc32-duplicate-decl.patch
 124.180 +Patch10: gcc32-trunc_int_for_mode.patch
 124.181 +Patch11: gcc32-sparc-sll1.patch
 124.182 +Patch12: gcc32-x86_64-q_regs_operand.patch
 124.183 +Patch13: gcc32-dwarf2-pr6381.patch
 124.184 +Patch14: gcc32-dwarf2-pr6436-test.patch
 124.185 +Patch15: gcc32-c++-pretty_function.patch
 124.186 +Patch16: gcc32-c++-tsubst-asm.patch
 124.187 +Patch18: gcc32-i386-memtest-test.patch
 124.188 +Patch19: gcc32-fold-const2.patch
 124.189 +Patch21: gcc32-ada-addr2line.patch
 124.190 +Patch22: gcc32-ada-link.patch
 124.191 +Patch23: gcc32-java-no-rpath.patch
 124.192 +Patch25: gcc32-s390-java.patch
 124.193 +Patch26: gcc32-test-rotate.patch
 124.194 +Patch27: gcc32-x86_64-libiberty-pic.patch
 124.195 +Patch29: gcc32-test-rh65771.patch
 124.196 +Patch30: gcc32-i386-default-momit-leaf-frame-pointer.patch
 124.197 +Patch31: gcc32-i386-pic-label-thunk.patch
 124.198 +Patch34: gcc32-pr6842.patch
 124.199 +Patch35: gcc32-tls.patch
 124.200 +Patch36: gcc32-i386-profile-olfp.patch
 124.201 +Patch37: gcc32-tree-code.patch
 124.202 +Patch38: gcc32-hard-reg-sharing.patch
 124.203 +Patch39: gcc32-hard-reg-sharing2.patch
 124.204 +Patch40: gcc32-c++-nrv-test.patch
 124.205 +Patch41: gcc32-debug-pr7241.patch
 124.206 +Patch42: gcc32-i386-pr7242.patch
 124.207 +Patch43: gcc32-cfg-eh.patch
 124.208 +Patch44: gcc32-attr-visibility3.patch
 124.209 +Patch45: gcc32-tls2.patch
 124.210 +Patch46: gcc32-fold-const-associate.patch
 124.211 +Patch47: gcc32-inline-label.patch
 124.212 +Patch48: gcc32-typeof-asm.patch
 124.213 +Patch50: gcc32-rh69989.patch
 124.214 +Patch51: gcc32-tls3.patch
 124.215 +Patch52: gcc32-tls4.patch
 124.216 +Patch54: gcc32-tls5.patch
 124.217 +Patch55: gcc32-tls-dwarf2.patch
 124.218 +Patch56: gcc32-x86_64-pr7559.patch
 124.219 +Patch57: gcc32-loop-prefetch.patch
 124.220 +Patch58: gcc32-doc-gcov.patch
 124.221 +Patch59: gcc32-attr-visibility4.patch
 124.222 +Patch60: gcc32-c++-tail-pad-backout.patch
 124.223 +Patch61: gcc32-attr-visibility5.patch
 124.224 +Patch62: gcc32-i386-no-default-momit-leaf-frame-pointer.patch
 124.225 +Patch64: gcc32-x86_64-rip-lowercase.patch
 124.226 +Patch65: gcc32-libstdc++-glibc23-1.patch
 124.227 +Patch66: gcc32-libstdc++-glibc23-2.patch
 124.228 +Patch67: gcc32-libstdc++-glibc23-3.patch
 124.229 +Patch68: gcc32-libstdc++-glibc23-4.patch
 124.230 +Patch69: gcc32-interface_only.patch
 124.231 +
 124.232 +%define _gnu %{nil}
 124.233 +
 124.234 +Patch10000: boehm-gc-mips.patch
 124.235 +Patch10001: boehm-gc-LINUX.patch
 124.236 +Patch10002: gcc-libffi-mips.patch
 124.237 +
 124.238 +Patch11000: gcc-mips-coff.patch
 124.239 +Patch11001: gcc-mips-file.patch
 124.240 +Patch11002: gcc-mips-ieee.patch
 124.241 +Patch11003: gcc-mips-return.patch
 124.242 +Patch11004: gcc-libstdc++-mips.patch
 124.243 +Patch11005: libtool-mips.patch
 124.244 +
 124.245 +Patch12000: gcc-libgcc.patch
 124.246 +
 124.247 +Patch13000: gcc-ppc-linux.patch
 124.248 +Patch13001: gcc-linux-crt.patch
 124.249 +
 124.250 +Patch14000: gcc-linux-atexit.patch
 124.251 +Patch14001: gcc-test-atexit.patch
 124.252 +
 124.253 +Patch15000: gcc-var.patch
 124.254 +Patch15001: gcc-copy.patch
 124.255 +
 124.256 +Patch16000: gcc-c++-template.patch
 124.257 +Patch16001: gcc-testsuite-c++.patch
 124.258 +
 124.259 +Patch17000: gcc-cross.patch
 124.260 +Patch17001: gcc-cross-bfd.patch
 124.261 +Patch17002: gcc-sizeof.patch
 124.262 +Patch17003: gcc-arch.patch
 124.263 +
 124.264 +Patch18000: libjava-cross.patch
 124.265 +Patch18001: gcc-gcj-cross.patch
 124.266 +
 124.267 +Patch19000: contrib-touch.patch
 124.268 +
 124.269 +Patch20000: libtool-libs.patch
 124.270 +
 124.271 +Patch21000: gcc-libstdc++-glibc-2.2.patch
 124.272 +
 124.273 +%description
 124.274 +The gcc package contains the GNU Compiler Collection version 3.2.
 124.275 +You'll need this package in order to compile C code.
 124.276 +
 124.277 +%package -n libgcc
 124.278 +Summary: GCC version 3.2 shared support library
 124.279 +Group: System Environment/Libraries
 124.280 +
 124.281 +%description -n libgcc
 124.282 +This package contains GCC shared support library which is needed
 124.283 +e.g. for exception handling support.
 124.284 +
 124.285 +%package c++
 124.286 +Summary: C++ support for GCC
 124.287 +Group: Development/Languages
 124.288 +Requires: gcc = %{version}-%{release}
 124.289 +Requires: libstdc++ = %{version}
 124.290 +Requires: libstdc++-devel = %{version}
 124.291 +Obsoletes: gcc3-c++
 124.292 +
 124.293 +%description c++
 124.294 +This package adds C++ support to the GNU Compiler Collection.
 124.295 +It includes support for most of the current C++ specification,
 124.296 +including templates and exception handling.
 124.297 +
 124.298 +%package -n libstdc++
 124.299 +Summary: GNU Standard C++ Library
 124.300 +Group: System Environment/Libraries
 124.301 +Obsoletes: libstdc++3
 124.302 +
 124.303 +%description -n libstdc++
 124.304 +The libstdc++ package contains a rewritten standard compliant GCC Standard
 124.305 +C++ Library.
 124.306 +
 124.307 +%package -n libstdc++-devel
 124.308 +Summary: Header files and libraries for C++ development
 124.309 +Group: Development/Libraries
 124.310 +Requires: libstdc++ = %{version}-%{release}
 124.311 +Obsoletes: libstdc++3-devel
 124.312 +
 124.313 +%description -n libstdc++-devel
 124.314 +This is the GNU implementation of the standard C++ libraries.  This
 124.315 +package includes the header files and libraries needed for C++
 124.316 +development. This includes rewritten implementation of STL.
 124.317 +
 124.318 +%package objc
 124.319 +Summary: Objective-C support for GCC
 124.320 +Group: Development/Languages
 124.321 +Requires: gcc = %{version}-%{release}
 124.322 +Requires: libobjc = %{version}-%{release}
 124.323 +Obsoletes: gcc3-objc
 124.324 +
 124.325 +%description objc
 124.326 +gcc-objc provides Objective-C support for the GCC.
 124.327 +Mainly used on systems running NeXTSTEP, Objective-C is an
 124.328 +object-oriented derivative of the C language.
 124.329 +
 124.330 +%package -n libobjc
 124.331 +Summary: Objective-C runtime
 124.332 +Group: System Environment/Libraries
 124.333 +
 124.334 +%description -n libobjc
 124.335 +This package contains Objective-C shared library which is needed to run
 124.336 +Objective-C dynamically linked programs.
 124.337 +
 124.338 +%package g77
 124.339 +Summary: Fortran 77 support
 124.340 +Group: Development/Languages
 124.341 +Requires: gcc = %{version}-%{release}
 124.342 +Requires: libf2c = %{version}-%{release}
 124.343 +Prereq: /sbin/install-info
 124.344 +Obsoletes: gcc3-g77
 124.345 +
 124.346 +%description g77
 124.347 +The gcc-g77 package provides support for compiling Fortran 77
 124.348 +programs with the GNU Compiler Collection.
 124.349 +
 124.350 +%package -n libf2c
 124.351 +Summary: Fortran 77 runtime
 124.352 +Group: System Environment/Libraries
 124.353 +
 124.354 +%description -n libf2c
 124.355 +This package contains Fortran 77 shared library which is needed to run
 124.356 +Fortran 77 dynamically linked programs.
 124.357 +
 124.358 +%package java
 124.359 +Summary: Java support for GCC
 124.360 +Group: Development/Languages
 124.361 +Requires: gcc = %{version}-%{release}
 124.362 +Requires: libgcj >= %{version}, libgcj-devel >= %{version}
 124.363 +Obsoletes: gcc3-java
 124.364 +Prereq: /sbin/install-info
 124.365 +
 124.366 +%description java
 124.367 +This package adds support for compiling Java(tm) programs and
 124.368 +bytecode into native code.
 124.369 +
 124.370 +%package -n libgcj
 124.371 +Summary: Java runtime library for gcc
 124.372 +Group: System Environment/Libraries
 124.373 +Requires: zip >= 2.1
 124.374 +Obsoletes: gcc-libgcj
 124.375 +Obsoletes: libgcj3
 124.376 +# Kaffe includes jar too
 124.377 +Conflicts: kaffe
 124.378 +
 124.379 +%description -n libgcj
 124.380 +The Java(tm) runtime library. You will need this package to run your Java
 124.381 +programs compiled using the Java compiler from GNU Compiler Collection (gcj).
 124.382 +
 124.383 +%package -n libgcj-devel
 124.384 +Summary: Libraries for Java development using GCC
 124.385 +Group: Development/Languages
 124.386 +Requires: zip >= 2.1, libgcj = %{version}
 124.387 +Obsoletes: libgcj3-devel
 124.388 +
 124.389 +%description -n libgcj-devel
 124.390 +The Java(tm) static libraries and C header files. You will need this
 124.391 +package to compile your Java programs using the GCC Java compiler (gcj).
 124.392 +
 124.393 +%package -n cpp
 124.394 +Summary: The C Preprocessor.
 124.395 +Group: Development/Languages
 124.396 +Prereq: /sbin/install-info
 124.397 +%ifarch ia64
 124.398 +Obsoletes: gnupro
 124.399 +%endif
 124.400 +
 124.401 +%description -n cpp
 124.402 +Cpp is the GNU C-Compatible Compiler Preprocessor.
 124.403 +Cpp is a macro processor which is used automatically
 124.404 +by the C compiler to transform your program before actual
 124.405 +compilation. It is called a macro processor because it allows
 124.406 +you to define macros, abbreviations for longer
 124.407 +constructs.
 124.408 +
 124.409 +The C preprocessor provides four separate functionalities: the
 124.410 +inclusion of header files (files of declarations that can be
 124.411 +substituted into your program); macro expansion (you can define macros,
 124.412 +and the C preprocessor will replace the macros with their definitions
 124.413 +throughout the program); conditional compilation (using special
 124.414 +preprocessing directives, you can include or exclude parts of the
 124.415 +program according to various conditions); and line control (if you use
 124.416 +a program to combine or rearrange source files into an intermediate
 124.417 +file which is then compiled, you can use line control to inform the
 124.418 +compiler about where each source line originated).
 124.419 +
 124.420 +You should install this package if you are a C programmer and you use
 124.421 +macros.
 124.422 +
 124.423 +%package gnat
 124.424 +Summary: Ada 95 support for GCC
 124.425 +Group: Development/Languages
 124.426 +Requires: gcc = %{version}-%{release}, libgnat = %{version}-%{release}
 124.427 +Obsoletes: gnat-devel, gcc3-gnat
 124.428 +Prereq: /sbin/install-info
 124.429 +
 124.430 +%description gnat
 124.431 +GNAT is a GNU Ada 95 front-end to GCC. This package includes development tools,
 124.432 +the documents and Ada 95 compiler.
 124.433 +
 124.434 +%package -n libgnat
 124.435 +Summary: GNU Ada 95 runtime shared libraries
 124.436 +Group: System Environment/Libraries
 124.437 +Obsoletes: gnat libgnat3
 124.438 +
 124.439 +%description -n libgnat
 124.440 +GNAT is a GNU Ada 95 front-end to GCC. This package includes shared libraries,
 124.441 +which are required to run programs compiled with the GNAT.
 124.442 +
 124.443 +%prep
 124.444 +%setup -q -n gcc-%{version}-%{DATE}
 124.445 +%patch1 -p0 -b .2.96-RH-compat~
 124.446 +%patch2 -p0 -b .boehm-gc-libs~
 124.447 +%patch3 -p0 -b .bogus-inline~
 124.448 +%patch6 -p0 -b .fde-merge-compat~
 124.449 +%patch7 -p0 -b .attr-visibility~
 124.450 +%patch8 -p0 -b .attr-visibility2~
 124.451 +%patch9 -p0 -b .duplicate-decl~
 124.452 +%patch10 -p0 -b .trunc_int_for_mode~
 124.453 +%patch11 -p0 -b .sparc-sll1~
 124.454 +%patch12 -p0 -b .x86_64-q_regs_operand~
 124.455 +%patch13 -p0 -b .dwarf2-pr6381~
 124.456 +%patch14 -p0 -b .dwarf2-pr6436-test~
 124.457 +%patch15 -p0 -b .c++-pretty_function~
 124.458 +%patch16 -p0 -b .c++-tsubst-asm~
 124.459 +%patch18 -p0 -b .i386-memtest-test~
 124.460 +%patch19 -p0 -b .fold-const2~
 124.461 +%patch21 -p0 -b .ada-addr2line~
 124.462 +%patch22 -p0 -b .ada-link~
 124.463 +%patch23 -p0 -b .java-no-rpath~
 124.464 +%patch25 -p0 -b .s390-java~
 124.465 +%patch26 -p0 -b .test-rotate~
 124.466 +%patch27 -p0 -b .x86_64-libiberty-pic~
 124.467 +%patch29 -p0 -b .test-rh65771~
 124.468 +%patch30 -p0 -b .i386-default-momit-leaf-frame-pointer~
 124.469 +%patch31 -p0 -b .i386-pic-label-thunk~
 124.470 +%patch34 -p0 -b .pr6842~
 124.471 +%patch35 -p0 -b .tls~
 124.472 +%patch36 -p0 -b .i386-profile-olfp~
 124.473 +%patch37 -p0 -b .tree-code~
 124.474 +%patch38 -p0 -b .hard-reg-sharing~
 124.475 +%patch39 -p0 -b .hard-reg-sharing2~
 124.476 +%patch40 -p0 -b .c++-nrv-test~
 124.477 +%patch41 -p0 -b .debug-pr7241~
 124.478 +%patch42 -p0 -b .i386-pr7242~
 124.479 +%patch43 -p0 -b .cfg-eh~
 124.480 +%patch44 -p0 -b .attr-visibility3~
 124.481 +%patch45 -p0 -b .tls2~
 124.482 +%patch46 -p0 -b .fold-const-associate~
 124.483 +%patch47 -p0 -b .inline-label~
 124.484 +%patch48 -p0 -b .typeof-asm~
 124.485 +%patch50 -p0 -b .rh69989~
 124.486 +%patch51 -p0 -b .tls3~
 124.487 +%patch52 -p0 -b .tls4~
 124.488 +%patch54 -p0 -b .tls5~
 124.489 +%patch55 -p0 -b .tls-dwarf2~
 124.490 +%patch56 -p0 -b .x86_64-pr7559~
 124.491 +%patch57 -p0 -b .loop-prefetch~
 124.492 +%patch58 -p0 -b .doc-gcov~
 124.493 +%patch59 -p0 -b .attr-visibility4~
 124.494 +%patch60 -p0 -b .c++-tail-pad-backout~
 124.495 +%patch61 -p0 -b .attr-visibility5~
 124.496 +%patch62 -p0 -b .i386-no-default-momit-leaf-frame-pointer~
 124.497 +%patch64 -p0 -b .x86_64-rip-lowercase~
 124.498 +%patch65 -p0 -b .libstdc++-glibc23-1~
 124.499 +%patch66 -p0 -b .libstdc++-glibc23-2~
 124.500 +%patch67 -p0 -b .libstdc++-glibc23-3~
 124.501 +%patch68 -p0 -b .libstdc++-glibc23-4~
 124.502 +%patch69 -p0 -b .interface_only
 124.503 +
 124.504 +%patch10000 -p0 -b .mips
 124.505 +%patch10001 -p0 -b .LINUX
 124.506 +%patch10002 -p0 -b .mips
 124.507 +pushd boehm-gc
 124.508 +autoconf
 124.509 +popd
 124.510 +pushd libffi
 124.511 +autoconf
 124.512 +# Ignore the error from automake
 124.513 +automake --cygnus Makefile || :
 124.514 +popd
 124.515 +
 124.516 +%patch11000 -p0 -b .coff
 124.517 +%patch11001 -p0 -b .file
 124.518 +%patch11002 -p0 -b .ieee
 124.519 +%patch11003 -p0 -b .return
 124.520 +%patch11004 -p0 -b .mips
 124.521 +%patch11005 -p1 -b .mips
 124.522 +
 124.523 +%patch12000 -p0 -b .libgcc
 124.524 +
 124.525 +%patch13000 -p0 -b .ppc
 124.526 +%patch13001 -p0 -b .crt
 124.527 +
 124.528 +%patch14000 -p0 -b .order
 124.529 +%patch14001 -p0 -b .order
 124.530 +
 124.531 +%patch15000 -p0 -b .var
 124.532 +%patch15001 -p0 -b .copy
 124.533 +
 124.534 +%patch16000 -p0 -b .template
 124.535 +%patch16001 -p0 -b .template
 124.536 +
 124.537 +%patch17000 -p1 -b .cross
 124.538 +%patch17001 -p0 -b .cross-bfd
 124.539 +%patch17002 -p1 -b .sizeof
 124.540 +%patch17003 -p0 -b .arch
 124.541 +pushd gcc
 124.542 +autoheader
 124.543 +autoconf
 124.544 +popd
 124.545 +pushd fastjar
 124.546 +aclocal
 124.547 +autoconf
 124.548 +popd
 124.549 +pushd libffi
 124.550 +aclocal
 124.551 +autoconf
 124.552 +popd
 124.553 +
 124.554 +%patch18000 -p0 -b .cross
 124.555 +%patch18001 -p0 -b .build
 124.556 +pushd libjava
 124.557 +autoconf
 124.558 +automake --foreign Makefile
 124.559 +popd
 124.560 +
 124.561 +%patch19000 -p0 -b .touch
 124.562 +
 124.563 +%patch20000 -p0 -b .libs
 124.564 +
 124.565 +%patch21000 -p0 -b .glibc-2.2
 124.566 +pushd libstdc++-v3
 124.567 +autoconf
 124.568 +popd
 124.569 +
 124.570 +perl -pi -e 's/3\.2\.1/3.2/' gcc/version.c gcc/f/version.c gcc/ada/gnatvsn.ads
 124.571 +perl -pi -e 's/"%{gcc_version}"/"%{gcc_version} \(release\)"/' gcc/version.c
 124.572 +perl -pi -e 's/\((prerelease|experimental|release)\)/\(Red Hat Linux 8.0 %{version}-%{gcc_release}\)/' gcc/version.c gcc/f/version.c
 124.573 +perl -pi -e 's/\((prerelease|experimental|release)\)/\(%{version}-%{gcc_release}\)/' gcc/ada/gnatvsn.ads
 124.574 +perl -pi -e 's/#define GCCBUGURL.*$/#define GCCBUGURL "<URL:http:\/\/bugzilla.redhat.com\/bugzilla\/>"/' gcc/system.h
 124.575 +# The version string is now longer than 32 bytes and the line containing it
 124.576 +# doesn't fit into 80 columns
 124.577 +#perl -pi -e 's/:= 32/:= 64/;s/(Gnat_Version_String.*:=)/\1\n    /' gcc/ada/gnatvsn.ads
 124.578 +
 124.579 +./contrib/gcc_update --touch
 124.580 +
 124.581 +%build
 124.582 +rm -fr obj-%{_target_platform}
 124.583 +mkdir obj-%{_target_platform}
 124.584 +cd obj-%{_target_platform}
 124.585 +
 124.586 +%if %{_arch} != %{_build_arch}
 124.587 +%ifos linux
 124.588 +export ac_cv_func_mmap_anywhere=yes
 124.589 +export ac_cv_func_mmap_file=yes
 124.590 +export ac_cv_func_mmap_fixed_mapped=yes
 124.591 +export ac_cv_func_strncmp_works=yes
 124.592 +export gcc_cv_func_printf_ptr=yes
 124.593 +%endif
 124.594 +%endif
 124.595 +
 124.596 +DEFAULT_FLAGS=
 124.597 +%if %{default}
 124.598 +%ifarch %{ix86}
 124.599 +TARGET_CPU="%{_target_cpu}"
 124.600 +DEFAULT_FLAGS="--with-arch=$TARGET_CPU --with-cpu=$TARGET_CPU"
 124.601 +%endif
 124.602 +%endif
 124.603 +
 124.604 +CC=%{__cc}
 124.605 +OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g'`
 124.606 +CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="$OPT_FLAGS" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \
 124.607 +	../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
 124.608 +	--enable-shared --enable-threads=posix --disable-checking --host=%{_target_platform} \
 124.609 +	$DEFAULT_FLAGS \
 124.610 +%if %{cross_compile}
 124.611 +	--target=%{_target_platform} --build=%{_build_alias} \
 124.612 +%endif
 124.613 +	--with-system-zlib --enable-__cxa_atexit
 124.614 +
 124.615 +# We have to make sure all gcc configure files are up to date for
 124.616 +# parallel build. We have to do it twice due to the stupid Makefile.
 124.617 +make -C gcc cstamp-h
 124.618 +make -C gcc cstamp-h
 124.619 +
 124.620 +# if RPM_BUILD_NCPUS unset, set it
 124.621 +if [ -z "$RPM_BUILD_NCPUS" ] ; then
 124.622 +  if [ -x /usr/bin/getconf ] ; then
 124.623 +    RPM_BUILD_NCPUS=$(/usr/bin/getconf _NPROCESSORS_ONLN)
 124.624 +    if [ $RPM_BUILD_NCPUS -eq 0 ]; then
 124.625 +      RPM_BUILD_NCPUS=1
 124.626 +    fi
 124.627 +  else
 124.628 +    RPM_BUILD_NCPUS=1
 124.629 +  fi
 124.630 +fi
 124.631 +
 124.632 +RPM_BUILD_NCPUS=`expr $RPM_BUILD_NCPUS + $RPM_BUILD_NCPUS`
 124.633 +
 124.634 +cat <<EOF > makefile
 124.635 +MAKE=make -j $RPM_BUILD_NCPUS
 124.636 +include Makefile
 124.637 +CFLAGS:=\$(CFLAGS) -pipe
 124.638 +CXXFLAGS:=\$(CXXFLAGS) -pipe
 124.639 +EOF
 124.640 +
 124.641 +# FIXME: It is a kludge.
 124.642 +export GCJFLAGS="$OPT_FLAGS"
 124.643 +
 124.644 +%if %{cross_compile}
 124.645 +make -j$RPM_BUILD_NCPUS \
 124.646 +	CC=%{__cc} \
 124.647 +	CXX=%{__cxx} \
 124.648 +	AR=%{__ar} \
 124.649 +	AS=%{__as} \
 124.650 +	LD=%{__ld} \
 124.651 +	NM=%{__nm} \
 124.652 +	RANLIB=%{__ranlib} \
 124.653 +	CC_FOR_TARGET=%{__cc} \
 124.654 +	GCC_FOR_TARGET=%{__cc} \
 124.655 +	CXX_FOR_TARGET=%{__cxx} \
 124.656 +	AR_FOR_TARGET=%{__ar} \
 124.657 +	AS_FOR_TARGET=%{__as} \
 124.658 +	LD_FOR_TARGET=%{__ld} \
 124.659 +	NM_FOR_TARGET=%{__nm} \
 124.660 +	RANLIB_FOR_TARGET=%{__ranlib} \
 124.661 +	HOST_CC=cc \
 124.662 +	CFLAGS_FOR_TARGET="$RPM_OPT_FLAGS -pipe" \
 124.663 +	CFLAGS_FOR_BUILD="-O -pipe" \
 124.664 +	CFLAGS="$RPM_OPT_FLAGS -pipe" \
 124.665 +	CXXFLAGS="$RPM_OPT_FLAGS -pipe"
 124.666 +%else
 124.667 +make -j$RPM_BUILD_NCPUS bootstrap-lean
 124.668 +#make -j$RPM_BUILD_NCPUS bootstrap
 124.669 +%endif
 124.670 +
 124.671 +%if %{build_ada}
 124.672 +# This doesn't work with -j$RPM_BUILD_NCPUS
 124.673 +make -C gcc gnatlib-shared
 124.674 +make -C gcc gnattools
 124.675 +make -C gcc/ada doc
 124.676 +%endif
 124.677 +
 124.678 +%if %{make_check}
 124.679 +# run the tests.
 124.680 +make -j$RPM_BUILD_NCPUS -k check || :
 124.681 +%ifarch %{ix86}
 124.682 +ln -sf i686-pc-linux-gnu ../libstdc++-v3/config/abi/%{_target_platform}
 124.683 +ln -sf i686-pc-linux-gnu ../libstdc++-v3/config/abi/%{_target_platform}-gnu
 124.684 +%endif
 124.685 +echo ====================TESTING=========================
 124.686 +( ../contrib/test_summary || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}'
 124.687 +%ifarch %{ix86}
 124.688 +make -C %{_target_platform}/libstdc++-v3 check-abi
 124.689 +%endif
 124.690 +echo ====================TESTING END=====================
 124.691 +#cd %{_target_platform}/libstdc++-v3
 124.692 +#./mkcheck 0
 124.693 +#cd ../..
 124.694 +%endif
 124.695 +
 124.696 +%if !%{cross_compile}
 124.697 +# Make protoize
 124.698 +make -C gcc CC="./xgcc -B ./ -O2" proto
 124.699 +%endif
 124.700 +
 124.701 +# Make generated man pages even if Pod::Man is not new enough
 124.702 +perl -pi -e 's/head3/head2/' ../contrib/texi2pod.pl
 124.703 +for i in ../gcc/doc/*.texi; do
 124.704 +  cp -a $i $i.orig; sed 's/ftable/table/' $i.orig > $i
 124.705 +done
 124.706 +make -C gcc generated-manpages
 124.707 +for i in ../gcc/doc/*.texi; do mv -f $i.orig $i; done
 124.708 +
 124.709 +# Copy various doc files here and there
 124.710 +cd ..
 124.711 +mkdir -p rpm.doc/g77 rpm.doc/objc
 124.712 +mkdir -p rpm.doc/boehm-gc rpm.doc/fastjar rpm.doc/libffi rpm.doc/libjava
 124.713 +
 124.714 +(cd gcc/f; for i in ChangeLog*; do
 124.715 +	cp -p $i ../../rpm.doc/g77/$i.f
 124.716 +done)
 124.717 +(cd libf2c; for i in ChangeLog*; do
 124.718 +	cp -p $i ../rpm.doc/g77/$i.libf2c
 124.719 +done)
 124.720 +(cd gcc/objc; for i in README*; do
 124.721 +	cp -p $i ../../rpm.doc/objc/$i.objc
 124.722 +done)
 124.723 +(cd libobjc; for i in README*; do
 124.724 +	cp -p $i ../rpm.doc/objc/$i.libobjc
 124.725 +done)
 124.726 +(cd boehm-gc; for i in ChangeLog*; do
 124.727 +	cp -p $i ../rpm.doc/boehm-gc/$i.gc
 124.728 +done)
 124.729 +(cd fastjar; for i in ChangeLog* README*; do
 124.730 +	cp -p $i ../rpm.doc/fastjar/$i.fastjar
 124.731 +done)
 124.732 +(cd libffi; for i in ChangeLog* README* LICENSE; do
 124.733 +	cp -p $i ../rpm.doc/libffi/$i.libffi
 124.734 +done)
 124.735 +(cd libjava; for i in ChangeLog* README*; do
 124.736 +	cp -p $i ../rpm.doc/libjava/$i.libjava
 124.737 +done)
 124.738 +
 124.739 +%install
 124.740 +rm -fr $RPM_BUILD_ROOT
 124.741 +
 124.742 +perl -pi -e \
 124.743 +  's~href="l(ibstdc|atest)~href="http://gcc.gnu.org/onlinedocs/libstdc++/l\1~' \
 124.744 +  libstdc++-v3/docs/html/documentation.html
 124.745 +ln -sf documentation.html libstdc++-v3/docs/html/index.html
 124.746 +find libstdc++-v3/docs/html -name CVS | xargs rm -rf
 124.747 +
 124.748 +cd obj-%{_target_platform}
 124.749 +TARGET_PLATFORM=%{_target_platform}
 124.750 +
 124.751 +# There are some MP bugs in libstdc++ and libjava Makefiles
 124.752 +make -C %{_target_platform}/libstdc++-v3
 124.753 +make -C %{_target_platform}/libjava
 124.754 +
 124.755 +make prefix=$RPM_BUILD_ROOT%{_prefix} mandir=$RPM_BUILD_ROOT%{_mandir} \
 124.756 +%if %{cross_compile}
 124.757 +	CC=%{__cc} \
 124.758 +	CXX=%{__cxx} \
 124.759 +	AR=%{__ar} \
 124.760 +	AS=%{__as} \
 124.761 +	LD=%{__ld} \
 124.762 +	NM=%{__nm} \
 124.763 +	RANLIB=%{__ranlib} \
 124.764 +	CC_FOR_TARGET=%{__cc} \
 124.765 +	GCC_FOR_TARGET=%{__cc} \
 124.766 +	CXX_FOR_TARGET=%{__cxx} \
 124.767 +	AR_FOR_TARGET=%{__ar} \
 124.768 +	AS_FOR_TARGET=%{__as} \
 124.769 +	LD_FOR_TARGET=%{__ld} \
 124.770 +	NM_FOR_TARGET=%{__nm} \
 124.771 +	RANLIB_FOR_TARGET=%{__ranlib} \
 124.772 +	HOST_CC=cc \
 124.773 +	CFLAGS_FOR_TARGET="$RPM_OPT_FLAGS -pipe" \
 124.774 +	CFLAGS_FOR_BUILD="-O -pipe" \
 124.775 +	CFLAGS="$RPM_OPT_FLAGS -pipe" \
 124.776 +	CXXFLAGS="$RPM_OPT_FLAGS -pipe" \
 124.777 +%endif
 124.778 +  infodir=$RPM_BUILD_ROOT%{_infodir} install
 124.779 +%if %{build_ada}
 124.780 +pushd gcc/ada
 124.781 +cp -a gnat-style.info* gnat_rm.info* $RPM_BUILD_ROOT%{_infodir}/
 124.782 +for i in gnat_ug_unx.info*; do
 124.783 +  sed 's/gnat_ug_unx/gnat_ug/g' $i > $RPM_BUILD_ROOT%{_infodir}/`echo $i | sed 's/gnat_ug_unx/gnat_ug/'`
 124.784 +done
 124.785 +chmod 644 $RPM_BUILD_ROOT%{_infodir}/gnat*
 124.786 +popd
 124.787 +%endif
 124.788 +
 124.789 +FULLPATH=$(dirname $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/cc1)
 124.790 +
 124.791 +file $RPM_BUILD_ROOT/%{_prefix}/bin/* | grep ELF | cut -d':' -f1 | xargs %{__strip} || :
 124.792 +%{__strip} $FULLPATH/{cc1,cc1obj,cc1plus,cpp0,tradcpp0,f771,jc1,jvgenmain}
 124.793 +
 124.794 +# fix some things
 124.795 +ln -sf gcc $RPM_BUILD_ROOT%{_prefix}/bin/cc
 124.796 +mkdir -p $RPM_BUILD_ROOT/lib
 124.797 +ln -sf ..%{_prefix}/bin/cpp $RPM_BUILD_ROOT/lib/cpp
 124.798 +ln -sf g77 $RPM_BUILD_ROOT%{_prefix}/bin/f77
 124.799 +rm -f $RPM_BUILD_ROOT%{_infodir}/dir
 124.800 +gzip -9 $RPM_BUILD_ROOT%{_infodir}/*.info*
 124.801 +ln -sf gcc $RPM_BUILD_ROOT%{_prefix}/bin/gnatgcc
 124.802 +
 124.803 +mv $RPM_BUILD_ROOT%{_prefix}/lib/libgcj.*a $FULLPATH/
 124.804 +sed 's/-lgcjgc//g;s/-lzgcj//g;s/-lpthread//g' $RPM_BUILD_ROOT%{_prefix}/lib/libgcj.spec > $FULLPATH/libgcj.spec
 124.805 +mv $RPM_BUILD_ROOT%{_prefix}/include/gc*.h $FULLPATH/include/
 124.806 +mv $RPM_BUILD_ROOT%{_prefix}/include/j*.h $FULLPATH/include/
 124.807 +mv -f $RPM_BUILD_ROOT%{_prefix}/include/{java,javax,gnu,org} $FULLPATH/include/
 124.808 +mkdir -p $FULLPATH/include/gcj
 124.809 +mv -f $RPM_BUILD_ROOT%{_prefix}/include/gcj/* $FULLPATH/include/gcj/
 124.810 +rmdir $RPM_BUILD_ROOT%{_prefix}/include/gcj
 124.811 +
 124.812 +mkdir -p $RPM_BUILD_ROOT/%{_lib}
 124.813 +mv -f `find $RPM_BUILD_ROOT%{_prefix}/lib -name libgcc_s.so.1` $RPM_BUILD_ROOT/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
 124.814 +chmod 755 $RPM_BUILD_ROOT/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
 124.815 +ln -sf libgcc_s-%{gcc_version}-%{DATE}.so.1 $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so.1
 124.816 +ln -sf ../../%{_lib}/libgcc_s.so.1 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgcc_s.so
 124.817 +#ln -sf `echo "%{_prefix}" | sed 's~/[^/]*~\.\./~g'`../%{_lib}/libgcc_s.so.1 \
 124.818 +#  $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgcc_s.so
 124.819 +#mv -f $FULLPATH/libobjc.so.1* $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
 124.820 +%if %{build_ada}
 124.821 +mv -f $FULLPATH/adalib/libgnarl-*.so.* $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
 124.822 +mv -f $FULLPATH/adalib/libgnat-*.so.* $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
 124.823 +rm -f $FULLPATH/adalib/libgnarl.so* $FULLPATH/adalib/libgnat.so*
 124.824 +%endif
 124.825 +pushd $FULLPATH
 124.826 +if [ "%{_lib}" = "lib" ]; then
 124.827 +ln -sf ../../../libobjc.so.1 libobjc.so
 124.828 +ln -sf ../../../libstdc++.so.5.* libstdc++.so
 124.829 +ln -sf ../../../libgcj.so.3.* libgcj.so
 124.830 +ln -sf ../../../libg2c.so.0.* libg2c.so
 124.831 +%if %{build_ada}
 124.832 +cd adalib
 124.833 +ln -sf ../../../../libgnarl-*.so.* libgnarl.so
 124.834 +ln -sf ../../../../libgnat-*.so.* libgnat.so
 124.835 +cd ..
 124.836 +%endif
 124.837 +else
 124.838 +ln -sf ../../../../%{_lib}/libobjc.so.1 libobjc.so
 124.839 +ln -sf ../../../../%{_lib}/libstdc++.so.5.* libstdc++.so
 124.840 +ln -sf ../../../../%{_lib}/libgcj.so.3.* libgcj.so
 124.841 +ln -sf ../../../../%{_lib}/libg2c.so.0.* libg2c.so
 124.842 +%if %{build_ada}
 124.843 +cd adalib
 124.844 +ln -sf ../../../../../%{_lib}/libgnarl-*.so.* libgnarl.so
 124.845 +ln -sf ../../../../../%{_lib}/libgnat-*.so.* libgnat.so
 124.846 +cd ..
 124.847 +%endif
 124.848 +fi
 124.849 +mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libstdc++.*a .
 124.850 +mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libsupc++.*a .
 124.851 +mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libg2c.*a .
 124.852 +mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libfrtbegin.*a .
 124.853 +mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libobjc.*a .
 124.854 +# Strip debug info from Fortran/ObjC/Java static libraries
 124.855 +%{__strip} -g libg2c.a libobjc.a libgcj.a
 124.856 +# Fix up .la files
 124.857 +for i in *.la; do
 124.858 +  sed -e '/^libdir/s_%{_prefix}/lib_%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}_' \
 124.859 +      -e '/^dependency_libs/s_%{_prefix}/lib_%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}_' \
 124.860 +      -e '/^dependency_libs/s~'\''$~ '\''~' \
 124.861 +      -e '/^dependency_libs/s~[ 	][ 	]*~ ~g' \
 124.862 +      -e '/^dependency_libs/s~-L[^ ]* ~~g' \
 124.863 +      -e '/^dependency_libs/s~-lgcc_s -lgcc -lc -lgcc_s -lgcc ~~g' \
 124.864 +      -e '/^dependency_libs/s~-lgcc -lc -lgcc ~~g' \
 124.865 +      -e '/^dependency_libs/s~-lc ~~g' \
 124.866 +      -e '/^dependency_libs/s~-lm \(-lm \)*~-lm ~g' \
 124.867 +      $i > $i.tmp
 124.868 +  mv -f $i.tmp $i
 124.869 +done
 124.870 +popd
 124.871 +chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib/libg2c.so.0.*
 124.872 +chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib/libobjc.so.1.*
 124.873 +%if %{build_ada}
 124.874 +chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib/libgnarl*so*
 124.875 +chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib/libgnat*so*
 124.876 +%endif
 124.877 +
 124.878 +cat > $RPM_BUILD_ROOT%{_prefix}/bin/c89 <<"EOF"
 124.879 +#!/bin/sh
 124.880 +fl="-std=c89"
 124.881 +for opt; do
 124.882 +  case "$opt" in
 124.883 +    -ansi|-std=c89|-std=iso9899:1990) fl="";;
 124.884 +    -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2
 124.885 +	    exit 1;;
 124.886 +  esac
 124.887 +done
 124.888 +exec %{_prefix}/bin/gcc $fl ${1+"$@"}
 124.889 +EOF
 124.890 +cat > $RPM_BUILD_ROOT%{_prefix}/bin/c99 <<"EOF"
 124.891 +#!/bin/sh
 124.892 +fl="-std=c99"
 124.893 +for opt; do
 124.894 +  case "$opt" in
 124.895 +    -std=c99|-std=iso9899:1999) fl="";;
 124.896 +    -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2
 124.897 +	    exit 1;;
 124.898 +  esac
 124.899 +done
 124.900 +exec %{_prefix}/bin/gcc $fl ${1+"$@"}
 124.901 +EOF
 124.902 +chmod 755 $RPM_BUILD_ROOT%{_prefix}/bin/c?9
 124.903 +
 124.904 +cd ..
 124.905 +%find_lang %{name}
 124.906 +
 124.907 +%if %{cross_compile}
 124.908 +# Install syslimits.h for canadian cross compile.
 124.909 +pushd $RPM_BUILD_DIR/gcc-%{gcc_version}-%{DATE}/obj-%{_target_platform}
 124.910 +cp -af ../gcc/gsyslimits.h $FULLPATH/include/syslimits.h
 124.911 +# Fix the specs file.
 124.912 +cat gcc/specs |
 124.913 +awk '
 124.914 +BEGIN {
 124.915 +  cross=0;
 124.916 +}
 124.917 +/cross_compile/ { print; cross = 1; next; }
 124.918 +/^1$/ {
 124.919 +  if (cross == 0) {
 124.920 +    print;
 124.921 +  }
 124.922 +  else {
 124.923 +    cross = 0;
 124.924 +    print "0";
 124.925 +  }
 124.926 +  next;
 124.927 +}
 124.928 +{ print; }
 124.929 +' > $FULLPATH/specs
 124.930 +popd
 124.931 +%endif
 124.932 +
 124.933 +%clean
 124.934 +rm -rf $RPM_BUILD_ROOT
 124.935 +
 124.936 +%post
 124.937 +/sbin/install-info \
 124.938 +  --info-dir=%{_infodir} %{_infodir}/gcc.info.gz
 124.939 +
 124.940 +%preun
 124.941 +if [ $1 = 0 ]; then
 124.942 +  /sbin/install-info --delete \
 124.943 +    --info-dir=%{_infodir} %{_infodir}/gcc.info.gz
 124.944 +fi
 124.945 +
 124.946 +%post -n cpp
 124.947 +/sbin/install-info \
 124.948 +  --info-dir=%{_infodir} %{_infodir}/cpp.info.gz
 124.949 +
 124.950 +%preun -n cpp
 124.951 +if [ $1 = 0 ]; then
 124.952 +  /sbin/install-info --delete \
 124.953 +    --info-dir=%{_infodir} %{_infodir}/cpp.info.gz
 124.954 +fi
 124.955 +
 124.956 +%post g77
 124.957 +/sbin/install-info \
 124.958 +  --info-dir=%{_infodir} %{_infodir}/g77.info.gz
 124.959 +
 124.960 +%preun g77
 124.961 +if [ $1 = 0 ]; then
 124.962 +  /sbin/install-info --delete \
 124.963 +    --info-dir=%{_infodir} %{_infodir}/g77.info.gz
 124.964 +fi
 124.965 +
 124.966 +%post java
 124.967 +/sbin/install-info \
 124.968 +  --info-dir=%{_infodir} %{_infodir}/gcj.info.gz
 124.969 +
 124.970 +%preun java
 124.971 +if [ $1 = 0 ]; then
 124.972 +  /sbin/install-info --delete \
 124.973 +    --info-dir=%{_infodir} %{_infodir}/gcj.info.gz
 124.974 +fi
 124.975 +
 124.976 +%post gnat
 124.977 +/sbin/install-info \
 124.978 +  --info-dir=%{_infodir} %{_infodir}/gnat_rm.info.gz
 124.979 +/sbin/install-info \
 124.980 +  --info-dir=%{_infodir} %{_infodir}/gnat_ug.info.gz
 124.981 +
 124.982 +%preun gnat
 124.983 +if [ $1 = 0 ]; then
 124.984 +  /sbin/install-info --delete \
 124.985 +    --info-dir=%{_infodir} %{_infodir}/gnat_rm.info.gz
 124.986 +  /sbin/install-info --delete \
 124.987 +    --info-dir=%{_infodir} %{_infodir}/gnat_ug.info.gz
 124.988 +fi
 124.989 +
 124.990 +%post -n libgcc -p /sbin/ldconfig
 124.991 +
 124.992 +%postun -n libgcc -p /sbin/ldconfig
 124.993 +
 124.994 +%post -n libstdc++ -p /sbin/ldconfig
 124.995 +
 124.996 +%postun -n libstdc++ -p /sbin/ldconfig
 124.997 +
 124.998 +%post -n libobjc -p /sbin/ldconfig
 124.999 +
124.1000 +%postun -n libobjc -p /sbin/ldconfig
124.1001 +
124.1002 +%post -n libgcj -p /sbin/ldconfig
124.1003 +
124.1004 +%postun -n libgcj -p /sbin/ldconfig
124.1005 +
124.1006 +%post -n libf2c -p /sbin/ldconfig
124.1007 +
124.1008 +%postun -n libf2c -p /sbin/ldconfig
124.1009 +
124.1010 +%post -n libgnat -p /sbin/ldconfig
124.1011 +
124.1012 +%postun -n libgnat -p /sbin/ldconfig
124.1013 +
124.1014 +%files -f %{name}.lang
124.1015 +%defattr(-,root,root)
124.1016 +%{_prefix}/bin/cc
124.1017 +%{_prefix}/bin/c89
124.1018 +%{_prefix}/bin/c99
124.1019 +%{_prefix}/bin/gcc
124.1020 +%{_prefix}/bin/gcov
124.1021 +%if !%{cross_compile}
124.1022 +%{_prefix}/bin/protoize
124.1023 +%{_prefix}/bin/unprotoize
124.1024 +%endif
124.1025 +%{_prefix}/bin/%{_target_platform}-gcc
124.1026 +%{_mandir}/man1/gcc.1*
124.1027 +%{_mandir}/man1/gcov.1*
124.1028 +%{_infodir}/gcc*
124.1029 +%dir %{_prefix}/lib/gcc-lib
124.1030 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}
124.1031 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}
124.1032 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include
124.1033 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/stddef.h
124.1034 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/stdarg.h
124.1035 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/varargs.h
124.1036 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/float.h
124.1037 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/limits.h
124.1038 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/stdbool.h
124.1039 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/iso646.h
124.1040 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/syslimits.h
124.1041 +%ifarch %{ix86} x86_64
124.1042 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/mmintrin.h
124.1043 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/xmmintrin.h
124.1044 +%endif
124.1045 +%ifarch ia64
124.1046 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/ia64intrin.h
124.1047 +%endif
124.1048 +%ifarch ppc
124.1049 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/ppc-asm.h
124.1050 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/altivec.h
124.1051 +%endif
124.1052 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/README
124.1053 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/cc1
124.1054 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/collect2
124.1055 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/crt*.o
124.1056 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libgcc.a
124.1057 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libgcc_eh.a
124.1058 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/specs
124.1059 +%{_prefix}/%{_lib}/libgcc_s.so
124.1060 +%doc gcc/README* gcc/*ChangeLog*
124.1061 +
124.1062 +%if !%{gcconly}
124.1063 +%files -n cpp
124.1064 +%defattr(-,root,root)
124.1065 +/lib/cpp
124.1066 +%endif
124.1067 +%{_prefix}/bin/cpp
124.1068 +%{_mandir}/man1/cpp.1*
124.1069 +%{_infodir}/cpp*
124.1070 +%dir %{_prefix}/lib/gcc-lib
124.1071 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}
124.1072 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}
124.1073 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/cpp0
124.1074 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/tradcpp0
124.1075 +
124.1076 +%files -n libgcc
124.1077 +%defattr(-,root,root)
124.1078 +/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
124.1079 +/%{_lib}/libgcc_s.so.1
124.1080 +
124.1081 +%if !%{gcconly}
124.1082 +%files c++
124.1083 +%defattr(-,root,root)
124.1084 +%{_prefix}/bin/%{_target_platform}-*++
124.1085 +%{_prefix}/bin/g++
124.1086 +%{_prefix}/bin/c++
124.1087 +%{_prefix}/bin/c++filt
124.1088 +%{_mandir}/man1/g++.1*
124.1089 +%dir %{_prefix}/lib/gcc-lib
124.1090 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}
124.1091 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}
124.1092 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/cc1plus
124.1093 +%doc gcc/cp/ChangeLog*
124.1094 +
124.1095 +%files -n libstdc++
124.1096 +%defattr(-,root,root)
124.1097 +%{_prefix}/%{_lib}/libstdc++.so.5*
124.1098 +
124.1099 +%files -n libstdc++-devel
124.1100 +%defattr(-,root,root)
124.1101 +%{_prefix}/include/c++
124.1102 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libstdc++.so
124.1103 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libstdc++.a
124.1104 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libsupc++.a
124.1105 +%doc libstdc++-v3/ChangeLog* libstdc++-v3/README* libstdc++-v3/docs/html/
124.1106 +
124.1107 +%files objc
124.1108 +%defattr(-,root,root)
124.1109 +%dir %{_prefix}/lib/gcc-lib
124.1110 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}
124.1111 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}
124.1112 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include
124.1113 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/objc
124.1114 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/cc1obj
124.1115 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libobjc.a
124.1116 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libobjc.so
124.1117 +%doc rpm.doc/objc/*
124.1118 +%doc libobjc/THREADS* libobjc/ChangeLog
124.1119 +
124.1120 +%files -n libobjc
124.1121 +%defattr(-,root,root)
124.1122 +%{_prefix}/%{_lib}/libobjc.so.1*
124.1123 +
124.1124 +%files g77
124.1125 +%defattr(-,root,root)
124.1126 +%{_prefix}/bin/g77
124.1127 +%{_prefix}/bin/f77
124.1128 +%{_mandir}/man1/g77.1*
124.1129 +%{_infodir}/g77*
124.1130 +%dir %{_prefix}/lib/gcc-lib
124.1131 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}
124.1132 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}
124.1133 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include
124.1134 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/f771
124.1135 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libfrtbegin.a
124.1136 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libg2c.a
124.1137 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libg2c.so
124.1138 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/g2c.h
124.1139 +%doc gcc/f/README rpm.doc/g77/*
124.1140 +
124.1141 +%files -n libf2c
124.1142 +%defattr(-,root,root)
124.1143 +%{_prefix}/%{_lib}/libg2c.so.0*
124.1144 +
124.1145 +%files java
124.1146 +%defattr(-,root,root)
124.1147 +%{_prefix}/bin/gcj
124.1148 +%{_prefix}/bin/gcjh
124.1149 +%{_prefix}/bin/jcf-dump
124.1150 +%{_prefix}/bin/jv-scan
124.1151 +%{_mandir}/man1/gcj.1*
124.1152 +%{_mandir}/man1/gcjh.1*
124.1153 +%{_mandir}/man1/jcf-dump.1*
124.1154 +%{_mandir}/man1/jv-scan.1*
124.1155 +%{_infodir}/gcj*
124.1156 +%dir %{_prefix}/lib/gcc-lib
124.1157 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}
124.1158 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}
124.1159 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/jc1
124.1160 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/jvgenmain
124.1161 +%doc gcc/java/ChangeLog*
124.1162 +
124.1163 +%files -n libgcj
124.1164 +%defattr(-,root,root)
124.1165 +%{_prefix}/bin/jv-convert
124.1166 +%{_prefix}/bin/gij
124.1167 +%{_prefix}/bin/jar
124.1168 +%{_prefix}/bin/grepjar
124.1169 +%{_prefix}/bin/rmic
124.1170 +%{_prefix}/bin/rmiregistry
124.1171 +%{_mandir}/man1/jv-convert.1*
124.1172 +%{_mandir}/man1/gij.1*
124.1173 +%{_mandir}/man1/rmic.1*
124.1174 +%{_mandir}/man1/rmiregistry.1*
124.1175 +%{_prefix}/%{_lib}/libgcj.so.*
124.1176 +%{_prefix}/share/java
124.1177 +%{_prefix}/lib/security
124.1178 +
124.1179 +%files -n libgcj-devel
124.1180 +%defattr(-,root,root)
124.1181 +%{_prefix}/bin/addr2name.awk
124.1182 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libgcj.a
124.1183 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libgcj.so
124.1184 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libgcj.spec
124.1185 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/gc*.h
124.1186 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/j*.h
124.1187 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/java
124.1188 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/javax
124.1189 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/gnu
124.1190 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/gcj
124.1191 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/org
124.1192 +%doc rpm.doc/boehm-gc/* rpm.doc/fastjar/* rpm.doc/libffi/*
124.1193 +%doc rpm.doc/libjava/*
124.1194 +
124.1195 +%if %{build_ada}
124.1196 +%files gnat
124.1197 +%defattr(-,root,root)
124.1198 +%{_prefix}/bin/gnat*
124.1199 +%{_infodir}/gnat*
124.1200 +%dir %{_prefix}/lib/gcc-lib
124.1201 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}
124.1202 +%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}
124.1203 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/adainclude
124.1204 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/adalib
124.1205 +%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/gnat1
124.1206 +%doc gcc/ada/ChangeLog
124.1207 +
124.1208 +%files -n libgnat
124.1209 +%defattr(-,root,root)
124.1210 +%{_prefix}/%{_lib}/libgnat-*.so.*
124.1211 +%{_prefix}/%{_lib}/libgnarl-*.so.*
124.1212 +%endif
124.1213 +%endif
124.1214 +
124.1215 +%changelog
124.1216 +* Tue Sep  3 2002 Bill Nottingham <notting@redhat.com> 3.2-7
124.1217 +- fix calling of C++ destructors in certain cases
124.1218 +
124.1219 +* Tue Sep  3 2002 Jakub Jelinek <jakub@redhat.com> 3.2-6
124.1220 +- update from CVS (but revert C++ tail padding patches
124.1221 +  for now)
124.1222 +- further fixes to make libstdc++-v3 build on glibc 2.3
124.1223 +- run libstdc++-v3 make check-abi on IA-32 during testing
124.1224 +
124.1225 +* Fri Aug 30 2002 Jakub Jelinek <jakub@redhat.com> 3.2-5
124.1226 +- disable tail copy patches, they seem to still have problems
124.1227 +- make libstdc++-v3 build on glibc 2.3 (and use thread-local
124.1228 +  locale model)
124.1229 +- fix c89 and c99 scripts (#73104)
124.1230 +
124.1231 +* Wed Aug 26 2002 Jakub Jelinek <jakub@redhat.com> 3.2-4
124.1232 +- reorder alpha_encode_section_info checks slightly to fix an ICE
124.1233 +  when building glibc and to take better advantage of visibility
124.1234 +  attribute on Alpha
124.1235 +- as gdb is not there yet, disable -momit-leaf-frame-pointer
124.1236 +  by default for now on IA-32
124.1237 +- fix IA-64 bootstrap with tail padding patch (Jason Merrill, Daniel Berlin)
124.1238 +- fix x86-64 %RIP to %rip, only output (%rip) if no other relocation
124.1239 +  is used (Richard Henderson)
124.1240 +
124.1241 +* Fri Aug 23 2002 Jakub Jelinek <jakub@redhat.com> 3.2-3
124.1242 +- take advantage of __attribute__((visibility())) on Alpha
124.1243 +- avoid copying tail padding (Jason Merrill)
124.1244 +
124.1245 +* Thu Aug 22 2002 Jakub Jelinek <jakub@redhat.com> 3.2-2
124.1246 +- fixed Dwarf2 DW_OP_GNU_push_tls_address patch from Richard Henderson
124.1247 +- don't mention removed -a and -ax options in the documentation
124.1248 +  (Nathan Sidwell, #72233)
124.1249 +- fixed __typeof() followed by __asm() redirection from Alexandre Oliva
124.1250 +
124.1251 +* Wed Aug 14 2002 Jakub Jelinek <jakub@redhat.com> 3.2-1
124.1252 +- update to 3.2 release
124.1253 +- fix x86-64 PR target/7559 (Jan Hubicka)
124.1254 +- fix -fprefetch-loop-arrays (Janis Johnson)
124.1255 +- fix x86-64 prefetch (Jan Hubicka)
124.1256 +
124.1257 +* Fri Aug  9 2002 Jakub Jelinek <jakub@redhat.com> 3.2-0.3
124.1258 +- istream fix (Benjamin Kosnik)
124.1259 +- emit Dwarf2 DW_OP_GNU_push_tls_address extension for TLS (Richard Henderson)
124.1260 +- temporarily disable __typeof() + __asm() fix
124.1261 +
124.1262 +* Thu Aug  8 2002 Jakub Jelinek <jakub@redhat.com> 3.2-0.2
124.1263 +- update from 3.2 branch
124.1264 +  - ABI incompatible changes in libstdc++.so.5, long long bitfield
124.1265 +    layout on IA-32 (both C and C++), oversized bitfields layout
124.1266 +    on IA-32 and bitfields with base type with __attribute__((aligned ()))
124.1267 +  - fix strstream segfaults (#68292, Benjamin Kosnik)
124.1268 +- fix __attribute__((visibility())) together with __asm__()
124.1269 +  function redirection
124.1270 +- fix __typeof() followed by __asm() redirection (Alexandre Oliva)
124.1271 +- fix TLS ICE on glibc (#70061)
124.1272 +- fix K6 ICE on linux kernel (#69989, Richard Sandiford, Jan Hubicka)
124.1273 +- fix inlining bug with labels (#70941)
124.1274 +- fix fold-const bug (#70541)
124.1275 +- fix PR preprocessor/7358 (Neil Booth)
124.1276 +- error when mixing __thread and non-__thread declarations
124.1277 +  (#70059, Aldy Hernandez)
124.1278 +- fix TLS bug on g++.dg/tls/diag-1.C (Jason Merrill)
124.1279 +- add -mcmodel= x86-64 documentation (Andreas Jaeger)
124.1280 +- avoid TLS emitting movl %gs:0, MEMORY on IA-32 (#71033)
124.1281 +
124.1282 +* Mon Jul 22 2002 Jakub Jelinek <jakub@redhat.com> 3.2-0.1
124.1283 +- first attempt for gcc 3.2
124.1284 +- remove .la files
124.1285 +
124.1286 +* Sat Jul 20 2002 Jakub Jelinek <jakub@redhat.com> 3.1-10
124.1287 +- update from 3.1 branch
124.1288 +  - add throw() to set_new_handler (Andreas Schwab)
124.1289 +  - fixed PR optimization/7147, optimization/7153
124.1290 +- make sure pic register is set up even when the only @PLT calls
124.1291 +  are done in EH basic blocks (Richard Henderson)
124.1292 +
124.1293 +* Sun Jul 14 2002 Jakub Jelinek <jakub@redhat.com> 3.1-9
124.1294 +- define %%_gnu to nothing for compatibility
124.1295 +
124.1296 +* Sat Jul 13 2002 Jakub Jelinek <jakub@redhat.com> 3.1-8
124.1297 +- update from 3.1 branch
124.1298 +  - fix OpenOffice miscompilation (PR c++/7279, Jason Merrill)
124.1299 +  - PRs c++/7224, c++/6255, optimization/7145, c++/6706, preprocessor/7070,
124.1300 +    middle-end/6963, target/6841, target/6770, target/6719,
124.1301 +    other/6836, libstdc++/7057, libstdc++/7097, libstdc++/3946,
124.1302 +    libstdc++/7173
124.1303 +  - fix a GC bug with named labels in C++ (Jim Wilson)
124.1304 +  - fix ICE on Mesa (Bernd Schmidt, #65771)
124.1305 +- added some NRV tests
124.1306 +- fix typo in i386 specs (PR c/7242)
124.1307 +- fix IA-32 ICE with shifts by negative values followed by compare
124.1308 +  (PR middle-end/7245, #68395)
124.1309 +- fixed DWARF-2 output for const char * (PR debug/7241)
124.1310 +- actually enable __cxa_atexit for standard compliance at configury time
124.1311 +- added PPC as Ada enabled architecture
124.1312 +
124.1313 +* Wed Jun 19 2002 Jakub Jelinek <jakub@redhat.com> 3.1-7
124.1314 +- update from 3.1 branch
124.1315 +  - PRs target/6922, opt/6722, c/7030, c/6677, objc/6834, c++/6892,
124.1316 +    c++/6723, opt/6793
124.1317 +- use __cxa_atexit for standard compliance:
124.1318 +  if your C++ project knows it won't call atexit from within its
124.1319 +  static constructors, use -fno-use-cxa-atexit to optimize it
124.1320 +- share hard register rtxs where possible to speed the compiler up (Jeff Law)
124.1321 +- optimize tree_code_* arrays (Kaveh Ghazi)
124.1322 +- don't link prefix.o into libgnat, link libgnat against libgcc_s and
124.1323 +  libgnarl against libgnat
124.1324 +- fix typo in GNAT %%post (#66847, #66941, #66639)
124.1325 +- add TLS support
124.1326 +
124.1327 +* Fri Jun  7 2002 Jakub Jelinek <jakub@redhat.com> 3.1-6
124.1328 +- add GNAT
124.1329 +- remove DT_RPATH from Java binaries (#66103)
124.1330 +- obsolete kaffe, install jar as %{_prefix}/bin/jar
124.1331 +- add include/org directory in java
124.1332 +- add rmic and rmiregistry programs to libgcj
124.1333 +- add info documentation for gcj and various man pages
124.1334 +- add message catalogues for da, el, es, fr, ja, nl, sv, tr
124.1335 +- don't put IA-64 vtables with relocations into read-only sections
124.1336 +  with -fpic
124.1337 +
124.1338 +* Tue Jun  4 2002 Jakub Jelinek <jakub@redhat.com> 3.1-5
124.1339 +- update from 3.1 branch
124.1340 +  - PRs optimization/6822, preprocessor/6844, target/6838, target/6788,
124.1341 +	libstdc++/6886, libstdc++/6795, libstdc++/6811
124.1342 +- m$ compatibility for unnamed fields as typedef of struct/union
124.1343 +  (PR c/6660)
124.1344 +- fix -fverbose-asm with unnamed fields (PR c/6809)
124.1345 +- fix -mmmx ICE (PR optimization/6842)
124.1346 +- default to -momit-leaf-frame-pointer on i386 (Richard Henderson)
124.1347 +- use linkonce section/hidden symbol for i686 pic getpc thunks
124.1348 +  (Richard Henderson)
124.1349 +
124.1350 +* Tue May 28 2002 Jakub Jelinek <jakub@redhat.com> 3.1-4
124.1351 +- rebuilt
124.1352 +
124.1353 +* Sat May 25 2002 Jakub Jelinek <jakub@redhat.com> 3.1-3
124.1354 +- update from 3.1 branch
124.1355 +  - PRs other/6782, preprocessor/6780, preprocessor/6517,
124.1356 +	libstdc++/6282, libstdc++/6701, libstdc++/6701
124.1357 +  - fix out << "" bug (Ben Kosnik, #65409, PR libstdc++/6750)
124.1358 +- 3 new patches
124.1359 +  - fix C++ __PRETTY_FUNCTION__ (PR c++/6794)
124.1360 +  - fix ICE on jikes (#65379)
124.1361 +  - add test for fixed mozilla miscompilation
124.1362 +- include intrinsic headers on IA-32/x86-64, include altivec.h on PPC
124.1363 +
124.1364 +* Wed May 22 2002 Jakub Jelinek <jakub@redhat.com> 3.1-2
124.1365 +- update from 3.1 branch
124.1366 +- 8 new patches
124.1367 +  - fix as version test for 2.12.1 and newer binutils non-CVS releases
124.1368 +  - fix ICE in do_subst (#65049)
124.1369 +  - fix SSE conditional move (PR target/6753)
124.1370 +  - fix SPARC CSE ICE (PR optimization/6759)
124.1371 +  - fix x86_64 dbx64_register_map typo (Jan Hubicka)
124.1372 +  - fix DWARF-2 with flag_asynchronous_unwind_tables set for leaf
124.1373 +    functions (Jan Hubicka)
124.1374 +  - fix DWARF-2 x86_64 __builtin_dwarf_reg_sizes (Jan Hubicka)
124.1375 +  - fix x86_64 movabsdi (Michael Matz)
124.1376 +
124.1377 +* Wed May 15 2002 Jakub Jelinek <jakub@redhat.com> 3.1-1
124.1378 +- update to 3.1 final
124.1379 +- 15 new patches
124.1380 +  - fix PR c/6643
124.1381 +  - fix fold-const.c typo
124.1382 +  - fix unitialized pointer-to-member values (Alexandre Oliva)
124.1383 +  - fix templates with asm inputs (Jason Merrill)
124.1384 +  - fix -fdata-section (Andreas Schwab)
124.1385 +  - readd warning about i386 -malign-double into documentation (Jan Hubicka)
124.1386 +  - fix PR libstdc++/6594 (Ben Kosnik)
124.1387 +  - fix PR PR libstdc++/6648 (Paolo Carlini)
124.1388 +  - fix libstdc++ testsuite rlimits (Rainer Orth)
124.1389 +  - s390 java support (Gerhard Tonn)
124.1390 +  - rotate testcases (Tom Rix)
124.1391 +  - build libiberty with -fpic on x86_64 (Andreas Schwab)
124.1392 +  - fix x86_64 multilib build (Bo Thorsen)
124.1393 +  - fix x86_64 ASM_OUTPUT_MI_THUNK (Jan Hubicka)
124.1394 +  - fix loop-2[cd].c tests on i386 (Eric Botcazou)
124.1395 +- fix typo in g77 info files tweaking
124.1396 +- fix libgcj.so symlink
124.1397 +
124.1398 +* Thu May  9 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.28
124.1399 +- update to CVS 3.1 branch
124.1400 +  - PR c++/6212, target/6429, opt/6534, c/6543, target/6561, c/6569
124.1401 +- fix x86_64 q_regs_operand (Jan Hubicka)
124.1402 +- better PR c++/6381 fix (Jason Merrill)
124.1403 +
124.1404 +* Fri May  3 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.27
124.1405 +- update to CVS 3.1 branch
124.1406 +  - PR target/5628, libstdc++/5820, c++/6396, preprocessor/6489,
124.1407 +    libstdc++/6501, libstdc++/6511, target/6512, libstdc++/6513,
124.1408 +    bootstrap/6514, opt/6516, bootstrap/6525, c++/6527, libstdc++/6533,
124.1409 +    target/6540
124.1410 +- fix PR target/6542, target/6522, libstdc++/6549
124.1411 +
124.1412 +* Mon Apr 29 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.26
124.1413 +- update to CVS 3.1 branch
124.1414 +  - PR c/3581, libstdc++/4150, libstdc++/4164, c/5154, c/5430, c++/5504,
124.1415 +    c++/5658, c++/5719, f/6138, libgcj/6158, middle-end/6205, c++/6256,
124.1416 +    c/6300, c++/6331, c/6343, c/6344, c++/6352, c/6358, libstdc++/6360,
124.1417 +    c++/6395, target/6413, libstdc++/6414, target/6422, bootstrap/6445,
124.1418 +    optimization/6475, target/6476, c++/6477, c++/6479, c++/6486, c++/6492,
124.1419 +    target/6494, target/6496, c/6497, target/6500
124.1420 +- fix PR c++/6396
124.1421 +- run make check as part of build process
124.1422 +
124.1423 +* Thu Apr 18 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.25
124.1424 +- update to CVS 3.1 branch
124.1425 +  - PR opt/420, c++/525, target/817, target/1538, opt/3967, target/3997,
124.1426 +    opt/4120, bootstrap/4191, opt/4311, optimization/4328, c++/4884, c++/4934,
124.1427 +    c/5078, c++/5104, opt/5120, c++/5189, c++/5373, target/5446, c/5484,
124.1428 +    c++/5507, c++/5571, c++/5636, target/5672, target/5715, target/5886,
124.1429 +    c++/5933, c++/5964, c++/5998, opt/6007, target/6032, target/6041,
124.1430 +    target/6054, c++/6073, target/6082, optimization/6086, target/6087,
124.1431 +    middle-end/6096, middle-end/6098, middle-end/6099, middle-end/6100,
124.1432 +    middle-end/6102, fortran/6106, c++/6119, opt/6165, optimization/6177,
124.1433 +    c++/6179, optimization/6189, c/6202, c/6223, optimization/6233,
124.1434 +    middle-end/6279, c/6290, optimization/6305, target/6305, bootstrap/6315,
124.1435 +    c++/6320...
124.1436 +- fix PR c++/6316
124.1437 +
124.1438 +* Wed Mar 27 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.24
124.1439 +- update to CVS 3.1 branch
124.1440 +  - PRs c/5656, c/5972, bootstrap/4192, target/4792, bootstrap/4195,
124.1441 +    optimization/5854, target/6043, c++/6037, bootstrap/4128, target/5740,
124.1442 +    c/5597, optimization/5863, optimization/5742, target/3177, c/5354,
124.1443 +    optimization/5999, target/5977, middle-end/5731, target/5312...
124.1444 +
124.1445 +* Fri Mar 15 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.23.1
124.1446 +- fix info and man page generation
124.1447 +
124.1448 +* Thu Mar 14 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.23
124.1449 +- update to CVS 3.1 branch
124.1450 +  - fix IA-64 packet selection (PR optimization/5892)
124.1451 +  - make highest_pow2_factor work for all constants (PR middle-end/5877)
124.1452 +  - fix -Wunused (#61047)
124.1453 +  - fix loop on mixed mode class assignments (#60923)
124.1454 +  - fix wide character literals
124.1455 +  - support SPARC v9 long distance branches (PR target/5626)
124.1456 +  - fix SPARC leaf functions
124.1457 +  - fix a rtl sharing problem (Richard Henderson, #60760,
124.1458 +    PR optimization/5844)
124.1459 +  - fix va_arg with variable size types (PR c/3711)
124.1460 +  - PRs optimization/5901, optimization/5878, 5693, preprocessor/5899
124.1461 +- fix C++ ?: at the end of stmt expr (PR c++/5373)
124.1462 +- fix loop unrolling with sibcalls (PR optimization/5891)
124.1463 +
124.1464 +* Thu Mar  7 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.22
124.1465 +- update to CVS 3.1 branch
124.1466 +  - fix ICE with volatile long long (#60650)
124.1467 +  - fix tempbuf.h (Philipp Thomas, #60212)
124.1468 +  - fix -fssa-ccp (Jeff Law, #60651)
124.1469 +  - versioned libstdc++
124.1470 +  - backport __attribute__((visibility("..."))) patches from trunk
124.1471 +- include libstdc++ html documentation
124.1472 +
124.1473 +* Tue Feb  5 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.21
124.1474 +- update to CVS HEAD
124.1475 +  - fix demangler (H.J. Lu, #59300, #59310)
124.1476 +  - fix typo in IA-32 specs file (#59081)
124.1477 +  - support moving SFmode values in MMX regs if -mmmx (#59083)
124.1478 +  - fix recog_for_combine (#59084)
124.1479 +  - don't ICE when inserting insns on edge from bb0 to bb0 (Bernd Schmidt,
124.1480 +    #59087)
124.1481 +  - make sure configure has not time in the future (#59203)
124.1482 +  - fix division/modulo by certain constants (#58065, PR c/5304)
124.1483 +  - fix -Wswitch (PR c/4475)
124.1484 +
124.1485 +* Thu Jan 31 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.20
124.1486 +- update to CVS HEAD
124.1487 +  - fix jar (Tom Tromey)
124.1488 +  - fix loop unrolling (Richard Henderson)
124.1489 +
124.1490 +* Wed Jan 30 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.19
124.1491 +- update to CVS HEAD
124.1492 +  - fix a reload bug on ia32 (#58579, #58648)
124.1493 +  - issue error about unknown -W* options (#58909)
124.1494 +  - fix ia64 libbfd miscompilation (#58694)
124.1495 +  - register all pending unparsed_text structures with GC (#58647)
124.1496 +  - fix __builtin_apply with ia32 -msse (#58447)
124.1497 +  - prevent ia64 prologue insns saving regs required for eh from being
124.1498 +    deleted (#58387)
124.1499 +
124.1500 +* Tue Jan 15 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.18
124.1501 +- update to CVS HEAD
124.1502 +  - handle static x[] = { [X...Y] = (foo) { Z } } (#58338)
124.1503 +  - fix getdents.os miscompilation (Richard Henderson, #58308)
124.1504 +  - fix ICE in try_forward_edges (#58125)
124.1505 +  - fix ICE with -fexceptions -foptimize-sibling-calls
124.1506 +
124.1507 +* Tue Jan  8 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.17
124.1508 +- avoid division by 0 when computing prediction probabilities (#57992)
124.1509 +- fix ICE due to store_expr not adjusting value back for mode
124.1510 +- increase -ftemplate-depth default value to 500
124.1511 +
124.1512 +* Mon Jan  7 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.16
124.1513 +- if using PT_GNU_EH_FRAME registry, work around assembler bug resp. feature
124.1514 +  and don't provide weak prototypes of functions which won't be used
124.1515 +- on Alpha, fix a typo so that crtbeginT.o is built and installed
124.1516 +- fix glibc inl-tester miscompilation on ia32
124.1517 +
124.1518 +* Sun Jan  6 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.15
124.1519 +- update to CVS HEAD (fix glibc bootstrap failure)
124.1520 +
124.1521 +* Thu Jan  3 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.14
124.1522 +- update to CVS HEAD (#57907)
124.1523 +  - fix alpha bootstrap (Richard Henderson)
124.1524 +- fix simplification of (div:SI (???:DI ???) (const_int 1))
124.1525 +  (#57916)
124.1526 +- add contrib/gcc_update --touch
124.1527 +
124.1528 +* Tue Jan  1 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.13
124.1529 +- update to CVS HEAD (fix glibc miscompilation on alpha)
124.1530 +- fix objc to not emit __objc_class_name_* without type and size
124.1531 +
124.1532 +* Mon Dec 31 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.12
124.1533 +- update to CVS HEAD
124.1534 +- fix sed commands for .la files
124.1535 +- make Alpha use PT_GNU_EH_FRAME
124.1536 +
124.1537 +* Thu Dec 27 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.11
124.1538 +- update to CVS HEAD (#57165, #57212, #57467, #57488, #57502,
124.1539 +  #57505, #57574)
124.1540 +- readd .la files after fixing them up by sed
124.1541 +- add %%defattr(-,root,root) to libobjc subpackage
124.1542 +
124.1543 +* Mon Dec  3 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.10
124.1544 +- one more gcc.spec fix for passing --gdwarf-2 resp. --gstabs to as
124.1545 +- fix conditional register dead computation on IA-64
124.1546 +- fix extern array of incomplete structures handling
124.1547 +- fix gcc -xc -
124.1548 +- fix Fortran ICEs with SAVE_EXPRs (Richard Kenner)
124.1549 +
124.1550 +* Tue Nov 27 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.9
124.1551 +- update to CVS HEAD
124.1552 +- make DWARF 2 preferred debugging format on Linux
124.1553 +
124.1554 +* Mon Nov 12 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.8
124.1555 +- don't ship .la files (#56072)
124.1556 +- include libfrtbegin.a (#56098)
124.1557 +
124.1558 +* Mon Nov 12 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.7
124.1559 +- update to CVS HEAD
124.1560 +- back out Nov 7th loop.c change for now
124.1561 +
124.1562 +* Fri Nov  9 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.6
124.1563 +- update to CVS HEAD
124.1564 +- frame unwind compatibility with 7.[12] binutils
124.1565 +
124.1566 +* Tue Nov  6 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.5
124.1567 +- update to CVS HEAD
124.1568 +- merge DW_EH_PE_indirect constants and their relocs
124.1569 +
124.1570 +* Thu Oct 25 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.4
124.1571 +- don't loop forever or ICE on bogus array initializers (#53704)
124.1572 +- fix store motion with pure calls
124.1573 +- disable store motion for now
124.1574 +
124.1575 +* Tue Oct 23 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.3
124.1576 +- fix inlining of C nested functions with auto prototypes
124.1577 +
124.1578 +* Mon Oct 22 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.2
124.1579 +- update to CVS HEAD
124.1580 +- tree inlining fix from Alexandre Oliva
124.1581 +- fix anonymous union ICE on alpha
124.1582 +
124.1583 +* Mon Oct 15 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.1
124.1584 +- switch package to main compiler from alternate compiler
124.1585 +- update to CVS HEAD
124.1586 +- early gcc-2.96-RH compatibility in __frame_state_for
124.1587 +- change weak function tests for functions always present in GLIBC 2.2
124.1588 +  into simple non-weak calls in crt*.o to avoid unnecessary symbol
124.1589 +  lookups and prelink conflicts
124.1590 +- don't link against libgcc_s C shared libraries
124.1591 +
124.1592 +* Tue Oct  2 2001 Jakub Jelinek <jakub@redhat.com> 3.0.1-4
124.1593 +- update from CVS 3.0 branch
124.1594 +  - ia64 function descriptors in vtables
124.1595 +- handle large files in Fortran (#53328)
124.1596 +- allow Java programs to be statically linked (#53605)
124.1597 +- remove #include_next patch, Benjamin commited it
124.1598 +
124.1599 +* Thu Sep  6 2001 Jakub Jelinek <jakub@redhat.com> 3.0.1-3
124.1600 +- don't use #include_next in <bits/std_c*> headers (Benjamin Kosnik, #53262)
124.1601 +
124.1602 +* Wed Sep  5 2001 Jakub Jelinek <jakub@redhat.com> 3.0.1-2
124.1603 +- update from CVS 3.0 branch
124.1604 +- check all gcc-2.96-RH patches whether they have made it into 3.0.1,
124.1605 +  and if not, whether they are appropriate for 3.0.1
124.1606 +- 8 new patches
124.1607 +  - add 36 testcases from gcc-2.96-RH
124.1608 +  - fix ICE on very questionable C++ code from JDK (#39858, #52960)
124.1609 +  - fix -frepo (Nathan Sidwell, #52877)
124.1610 +  - avoid generating bogus .stabs (#49214)
124.1611 +  - issue a clear error message about invalid ia32 floating point
124.1612 +    asm constraints (#27137)
124.1613 +  - fix some comment typos
124.1614 +  - fix ADDRESSOF recognition (#29686)
124.1615 +
124.1616 +* Mon Aug 27 2001 Jakub Jelinek <jakub@redhat.com> 3.0.1-1
124.1617 +- update from CVS (3.0.1 final)
124.1618 +- properly handle throw() exception specifiers in template decls (#51824)
124.1619 +- fix IA-64 varargs handling in presence of additional anonymous arguments
124.1620 +  (#50757)
124.1621 +- fix boehm-gc for prelink
124.1622 +- fix a typo in gcc3-c++ description (#52323)
124.1623 +- remove Chill from package summary (#51764)
124.1624 +
124.1625 +* Tue Aug  7 2001 Jakub Jelinek <jakub@redhat.com> 3.0-6
124.1626 +- update from CVS
124.1627 +  - fix glibc vfprintf miscompilation
124.1628 +- don't warn about if (&foo) if foo is weak (H.J.Lu, #50855)
124.1629 +
124.1630 +* Wed Jul 25 2001 Jakub Jelinek <jakub@redhat.com> 3.0-5
124.1631 +- include libgcjgc.a in libgcj3-devel
124.1632 +- include libgcjgc.so.* in libgcj3 on ia64
124.1633 +- remove dependency on libgcj on ia64
124.1634 +- add ldconfig to libgcj3 post/postun
124.1635 +
124.1636 +* Tue Jul 24 2001 Jakub Jelinek <jakub@redhat.com> 3.0-4
124.1637 +- update from CVS
124.1638 +- make gcc3-java/libgcj3* packages, so that they can coexist
124.1639 +  with 2.96-RH Java
124.1640 +- make sure shared Java libraries are built with proper dependencies
124.1641 +
124.1642 +* Wed Jul 11 2001 Jakub Jelinek <jakub@redhat.com> 3.0-3
124.1643 +- fix libgcc_s.so and libstdc++.so symlinks
124.1644 +- don't ship jar
124.1645 +
124.1646 +* Tue Jul 10 2001 Jakub Jelinek <jakub@redhat.com> 3.0-2
124.1647 +- move libstdc++.so into gcc-lib
124.1648 +- add libobjc.so symlink
124.1649 +
124.1650 +* Tue Jul 10 2001 Jakub Jelinek <jakub@redhat.com> 3.0-1
124.1651 +- new rpm
   125.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   125.2 +++ b/patches/gcc/3.2.3/README-sh	Sat Feb 24 11:00:05 2007 +0000
   125.3 @@ -0,0 +1,16 @@
   125.4 +http://mirror.sh-linux.org/rpm-2003/SRPMS/gcc-3.2.3-3.src.rpm contains the following patches:
   125.5 +
   125.6 +gcc-20030210-sh-linux-1.patch
   125.7 +gcc-3.2.3-libffi-1.patch
   125.8 +gcc-3.2.3-sh-linux-dwarf2-1.patch (*not* applied by the spec file, it's in there by accident)
   125.9 +
  125.10 +gcc-3.2.3-libffi-1.patch was needed just to build, I think.
  125.11 +
  125.12 +After that was applied, sh4 gcc seemed to compile fine, but c++ programs
  125.13 +failed to execute because libstdc++.so.5 was built without version
  125.14 +info.  This was caused directly by libstdc++-v3/configure setting
  125.15 +SYMVER_MAP=config/linker-map.dummy because it sees that 
  125.16 +no libgcc_s.so was generated; configure says
  125.17 +  checking for shared libgcc... no.
  125.18 +
  125.19 +Applying gcc-20030210-sh-linux-1.patch in hopes it makes those problems go away.
   126.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   126.2 +++ b/patches/gcc/3.2.3/config.sub.patch	Sat Feb 24 11:00:05 2007 +0000
   126.3 @@ -0,0 +1,72 @@
   126.4 +When configuring a s390->s390 or cris->cris crosscompiler
   126.5 +(ok, I haven't hit this yet, but one of these days I'll get me an account
   126.6 +on an s390, and then I'll need this patch :-), you'll get the
   126.7 +following error:
   126.8 +
   126.9 ++ /build/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/gcc-3.3/configure
  126.10 +--target=s390-unknown-linux-gnu --host=s390-host_unknown-linux-gnu
  126.11 +--prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2
  126.12 +--enable-languages=c
  126.13 +--with-local-prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/s390-
  126.14 +unknown-linux-gnu --enable-threads=no --without-headers --with-newlib
  126.15 +--disable-shared
  126.16 +...
  126.17 +*** --with-headers is only supported when cross compiling
  126.18 +
  126.19 +This error pops up only when you're using Daniel Jacobowitz's technique
  126.20 +of slightly changing the target and host tuples to make them different
  126.21 +enough to force gcc's build system to not try to pull in system libraries
  126.22 +or headers.  This technique is needed e.g. to build an x86 -> x86
  126.23 +cross-compiler.
  126.24 +(The LFS developers ran into the same bug that prompted me to use
  126.25 +this technique; they point people who run into it to
  126.26 +http://linuxfromscratch.org/~greg/pure_lfs.txt, which is a different
  126.27 +way of avoiding this problem.  I think the tuple tweak is the way to go, though.)
  126.28 +
  126.29 +config-patches@gnu.org rejected this patch, on the grounds that there
  126.30 +is only one vendor of each of those two architectures, so the 
  126.31 +canonicalization is by definition correct.  When I pointed out the
  126.32 +difficulty this causes for people building s390 -> s390 or
  126.33 +cris -> cris compilers that are incompatible with the system
  126.34 +libraries and thus must be built like cross-compilers, he grumped and said 
  126.35 +"autoconf should let you specify a cross-compiler in some other way than
  126.36 +comparing tuple strings".
  126.37 +
  126.38 +
  126.39 +
  126.40 +--- gcc-3.3/config.sub.old	Sun Jun  8 20:38:47 2003
  126.41 ++++ gcc-3.3/config.sub	Sun Jun  8 20:40:34 2003
  126.42 +@@ -433,9 +433,12 @@
  126.43 + 	crds | unos)
  126.44 + 		basic_machine=m68k-crds
  126.45 + 		;;
  126.46 +-	cris | cris-* | etrax*)
  126.47 ++	cris | etrax*)
  126.48 + 		basic_machine=cris-axis
  126.49 + 		;;
  126.50 ++	cris-*)
  126.51 ++		basic_machine=cris-`echo $basic_machine | sed 's/^[^-]*-//'`
  126.52 ++		;;
  126.53 + 	da30 | da30-*)
  126.54 + 		basic_machine=m68k-da30
  126.55 + 		;;
  126.56 +@@ -820,11 +823,17 @@
  126.57 + 	rtpc | rtpc-*)
  126.58 + 		basic_machine=romp-ibm
  126.59 + 		;;
  126.60 +-	s390 | s390-*)
  126.61 ++	s390)
  126.62 + 		basic_machine=s390-ibm
  126.63 + 		;;
  126.64 +-	s390x | s390x-*)
  126.65 ++	s390-*)
  126.66 ++		basic_machine=s390-`echo $basic_machine | sed 's/^[^-]*-//'`
  126.67 ++		;;
  126.68 ++	s390x)
  126.69 + 		basic_machine=s390x-ibm
  126.70 ++		;;
  126.71 ++	s390x-*)
  126.72 ++		basic_machine=s390x-`echo $basic_machine | sed 's/^[^-]*-//'`
  126.73 + 		;;
  126.74 + 	sa29200)
  126.75 + 		basic_machine=a29k-amd
   127.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   127.2 +++ b/patches/gcc/3.2.3/gcc-20020722-ppc405erratum77.patch	Sat Feb 24 11:00:05 2007 +0000
   127.3 @@ -0,0 +1,105 @@
   127.4 +# See http://gcc.gnu.org/PR7383, http://www.kegel.com/xgcc3/ppc405erratum77.html
   127.5 +# Fixed in gcc-3.3
   127.6 +
   127.7 +diff -aur gcc-20020722.orig/gcc/config/rs6000/rs6000.h gcc-20020722/gcc/config/rs6000/rs6000.h
   127.8 +--- gcc-20020722.orig/gcc/config/rs6000/rs6000.h	Thu Jul 25 09:32:21 2002
   127.9 ++++ gcc-20020722/gcc/config/rs6000/rs6000.h	Thu Jul 25 09:34:45 2002
  127.10 +@@ -66,7 +66,7 @@
  127.11 + %{mcpu=rsc1: -D_ARCH_PWR} \
  127.12 + %{mcpu=401: -D_ARCH_PPC} \
  127.13 + %{mcpu=403: -D_ARCH_PPC} \
  127.14 +-%{mcpu=405: -D_ARCH_PPC} \
  127.15 ++%{mcpu=405: -D_ARCH_PPC -D__PPC405__} \
  127.16 + %{mcpu=505: -D_ARCH_PPC} \
  127.17 + %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
  127.18 + %{mcpu=602: -D_ARCH_PPC} \
  127.19 +diff -aur gcc-20020722.orig/libjava/sysdep/powerpc/locks.h gcc-20020722/libjava/sysdep/powerpc/locks.h
  127.20 +--- gcc-20020722.orig/libjava/sysdep/powerpc/locks.h	Thu Jul 25 09:32:30 2002
  127.21 ++++ gcc-20020722/libjava/sysdep/powerpc/locks.h	Thu Jul 25 11:39:13 2002
  127.22 +@@ -11,6 +11,17 @@
  127.23 + #ifndef __SYSDEP_LOCKS_H__
  127.24 + #define __SYSDEP_LOCKS_H__
  127.25 + 
  127.26 ++#ifdef __PPC405__
  127.27 ++// workaround for PPC405 erratum #77 - 07/18/02 JRO, dank, NN.  References:
  127.28 ++// http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
  127.29 ++// http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
  127.30 ++// http://www.kegel.com/xgcc3/ppc405erratum77.html
  127.31 ++// FIXME: using dbct instead of sync would be faster
  127.32 ++#define __LIBGCJ_PPC405_ERR77_SYNC   "sync \n\t"
  127.33 ++#else
  127.34 ++#define __LIBGCJ_PPC405_ERR77_SYNC
  127.35 ++#endif
  127.36 ++
  127.37 + typedef size_t obj_addr_t;	/* Integer type big enough for object	*/
  127.38 + 				/* address.				*/
  127.39 + 
  127.40 +@@ -25,6 +36,7 @@
  127.41 + 	   "0:    lwarx %0,0,%1 ;"
  127.42 + 	   "      xor. %0,%3,%0;"
  127.43 + 	   "      bne 1f;"
  127.44 ++  	  __LIBGCJ_PPC405_ERR77_SYNC
  127.45 + 	   "      stwcx. %2,0,%1;"
  127.46 + 	   "      bne- 0b;"
  127.47 + 	   "1:    "
  127.48 +@@ -58,6 +70,7 @@
  127.49 + 	   "0:    lwarx %0,0,%1 ;"
  127.50 + 	   "      xor. %0,%3,%0;"
  127.51 + 	   "      bne 1f;"
  127.52 ++	   __LIBGCJ_PPC405_ERR77_SYNC	 
  127.53 + 	   "      stwcx. %2,0,%1;"
  127.54 + 	   "      bne- 0b;"
  127.55 + 	   "1:    "
  127.56 +diff -aur gcc-20020722.orig/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h gcc-20020722/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h
  127.57 +--- gcc-20020722.orig/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h	Thu Jul 25 09:32:31 2002
  127.58 ++++ gcc-20020722/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h	Thu Jul 25 09:34:45 2002
  127.59 +@@ -32,6 +32,17 @@
  127.60 + 
  127.61 + typedef int _Atomic_word;
  127.62 + 
  127.63 ++#ifdef __PPC405__
  127.64 ++// workaround for PPC405 erratum #77 - 07/18/02 JRO & dank.  References:
  127.65 ++// http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
  127.66 ++// http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
  127.67 ++// http://www.kegel.com/xgcc3/ppc405erratum77.html
  127.68 ++// FIXME: using dbct instead of sync would be faster
  127.69 ++#define	__LIBSTDCPP_PPC405_ERR77_SYNC	"sync \n\t"
  127.70 ++#else
  127.71 ++#define __LIBSTDCPP_PPC405_ERR77_SYNC
  127.72 ++#endif
  127.73 ++
  127.74 + static inline _Atomic_word
  127.75 + __attribute__ ((__unused__))
  127.76 + __exchange_and_add (volatile _Atomic_word* __mem, int __val)
  127.77 +@@ -42,6 +53,7 @@
  127.78 + 	"0:\t"
  127.79 + 	"lwarx    %0,0,%2 \n\t"
  127.80 + 	"add%I3   %1,%0,%3 \n\t"
  127.81 ++	__LIBSTDCPP_PPC405_ERR77_SYNC
  127.82 + 	"stwcx.   %1,0,%2 \n\t"
  127.83 + 	"bne-     0b \n\t"
  127.84 + 	"/* End exchange & add */"
  127.85 +@@ -61,6 +73,7 @@
  127.86 + 	"0:\t"
  127.87 + 	"lwarx    %0,0,%1 \n\t"
  127.88 + 	"add%I2   %0,%0,%2 \n\t"
  127.89 ++	__LIBSTDCPP_PPC405_ERR77_SYNC
  127.90 + 	"stwcx.   %0,0,%1 \n\t"
  127.91 + 	"bne-     0b \n\t"
  127.92 + 	"/* End atomic add */"
  127.93 +@@ -78,6 +91,7 @@
  127.94 + 	"/* Inline always swap */\n"
  127.95 + 	"0:\t"
  127.96 + 	"lwarx    %0,0,%1 \n\t"
  127.97 ++	__LIBSTDCPP_PPC405_ERR77_SYNC
  127.98 + 	"stwcx.   %2,0,%1 \n\t"
  127.99 + 	"bne-     0b \n\t"
 127.100 + 	"/* End always swap */"
 127.101 +@@ -98,6 +112,7 @@
 127.102 + 	"lwarx    %0,0,%1 \n\t"
 127.103 + 	"cmpwi    %0,0 \n\t"
 127.104 + 	"bne-     1f \n\t"
 127.105 ++	__LIBSTDCPP_PPC405_ERR77_SYNC
 127.106 + 	"stwcx.   %2,0,%1 \n\t"
 127.107 + 	"bne-     0b \n"
 127.108 + 	"1:\n\t"
   128.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   128.2 +++ b/patches/gcc/3.2.3/gcc-20030210-sh-linux-1.patch	Sat Feb 24 11:00:05 2007 +0000
   128.3 @@ -0,0 +1,1761 @@
   128.4 +diff -ruN gcc-20030210.orig/boehm-gc/configure gcc-20030210/boehm-gc/configure
   128.5 +--- gcc-20030210.orig/boehm-gc/configure	Fri Jan 31 19:17:00 2003
   128.6 ++++ gcc-20030210/boehm-gc/configure	Sat Feb 22 01:40:14 2003
   128.7 +@@ -1922,7 +1922,7 @@
   128.8 + # This must be Linux ELF.
   128.9 + linux-gnu*)
  128.10 +   case $host_cpu in
  128.11 +-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
  128.12 ++  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
  128.13 +     lt_cv_deplibs_check_method=pass_all ;;
  128.14 +   *)
  128.15 +     # glibc up to 2.1.1 does not perform some relocations on ARM
  128.16 +diff -ruN gcc-20030210.orig/config-ml.in gcc-20030210/config-ml.in
  128.17 +--- gcc-20030210.orig/config-ml.in	Fri Jan 31 19:16:59 2003
  128.18 ++++ gcc-20030210/config-ml.in	Sat Feb 22 01:40:14 2003
  128.19 +@@ -545,6 +545,7 @@
  128.20 + 	      if [ -d ../$${dir}/$${lib} ]; then \
  128.21 + 		flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
  128.22 + 		if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
  128.23 ++				DESTDIR="$(DESTDIR)" \
  128.24 + 				CFLAGS="$(CFLAGS) $${flags}" \
  128.25 + 				prefix="$(prefix)" \
  128.26 + 				exec_prefix="$(exec_prefix)" \
  128.27 +diff -ruN gcc-20030210.orig/debian/edit-specs.in gcc-20030210/debian/edit-specs.in
  128.28 +--- gcc-20030210.orig/debian/edit-specs.in	Thu Jan  1 09:00:00 1970
  128.29 ++++ gcc-20030210/debian/edit-specs.in	Sat Feb 22 01:40:14 2003
  128.30 +@@ -0,0 +1,45 @@
  128.31 ++/^*asm:$/ {
  128.32 ++n
  128.33 ++c\
  128.34 ++@AS_ENDIAN_FLAG@ %{mrelax:-relax}
  128.35 ++}
  128.36 ++/^*cpp:$/ {
  128.37 ++n
  128.38 ++c\
  128.39 ++%(cpp_default_cpu_spec)    %(subtarget_cpp_spec)    %(subtarget_cpp_ptr_spec)    %(subtarget_cpp_endian_spec)
  128.40 ++}
  128.41 ++/^*cc1:$/ {
  128.42 ++n
  128.43 ++c\
  128.44 ++-musermode @CC1_CPU_ENDIAN_FLAGS@  %{profile:-p}
  128.45 ++}
  128.46 ++/^*link:$/ {
  128.47 ++n
  128.48 ++c\
  128.49 ++%{!static:--eh-frame-hdr} @LINKER_CPU_ENDIAN_FLAGS@  @LINKER_RPATH_LINK_FLAG@ %{mrelax:-relax}  %{shared:-shared}  %{!static: %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} %{static:-static}
  128.50 ++}
  128.51 ++/^*multilib:$/ {
  128.52 ++n
  128.53 ++c\
  128.54 ++. ;
  128.55 ++}
  128.56 ++/^*multilib_matches:$/ {
  128.57 ++n
  128.58 ++c\
  128.59 ++
  128.60 ++}
  128.61 ++/^*multilib_options:$/ {
  128.62 ++n
  128.63 ++c\
  128.64 ++
  128.65 ++}
  128.66 ++/^*subtarget_cpp_endian_spec:$/ {
  128.67 ++n
  128.68 ++c\
  128.69 ++@CPP_ENDIAN_DEF@
  128.70 ++}
  128.71 ++/^*cpp_default_cpu_spec:$/ {
  128.72 ++n
  128.73 ++c\
  128.74 ++@CPP_CPU_DEFS@
  128.75 ++}
  128.76 +diff -ruN gcc-20030210.orig/debian/install-CPU-linux gcc-20030210/debian/install-CPU-linux
  128.77 +--- gcc-20030210.orig/debian/install-CPU-linux	Thu Jan  1 09:00:00 1970
  128.78 ++++ gcc-20030210/debian/install-CPU-linux	Sat Feb 22 01:40:14 2003
  128.79 +@@ -0,0 +1,111 @@
  128.80 ++#! /bin/sh
  128.81 ++
  128.82 ++VERSION=$1; shift
  128.83 ++CPU=$1
  128.84 ++
  128.85 ++# literally (binary-ly) same
  128.86 ++PROGS_C="cpp gcc"
  128.87 ++PROGS_ADDITIONAL="c++ g++ g77 gcj"
  128.88 ++
  128.89 ++DRIVERS_C="cc1 cpp0 tradcpp0"
  128.90 ++DRIVERS_ADDITIONAL="cc1obj cc1plus collect2 f771 jc1 jvgenmain"
  128.91 ++if [ -z "$STEP1_COMPILER_BUILD" ]; then
  128.92 ++  PROGS="$PROGS_C $PROGS_ADDITIONAL"
  128.93 ++  DRIVERS="$DRIVERS_C $DRIVERSADDITIONAL"
  128.94 ++  INITIAL=""
  128.95 ++else
  128.96 ++  PROGS=$PROGS_C
  128.97 ++  DRIVERS=$DRIVERS_C
  128.98 ++  INITIAL="-initial"
  128.99 ++fi
 128.100 ++
 128.101 ++OBJS="crtbegin.o crtbeginS.o crtend.o crtendS.o"
 128.102 ++LIBS_C="libgcc.a"
 128.103 ++LIBS_1="libgcc_s.so libgcc_s.so.1 libstdc++.so libstdc++.so.3 libstdc++.so.3.0.2"
 128.104 ++LIBS_2="libobjc.a libstdc++.a libsupc++.a"
 128.105 ++INCLUDE="include"
 128.106 ++
 128.107 ++cd debian/gcc-sh-linux-others${INITIAL} || exit 1
 128.108 ++
 128.109 ++# Make directories.
 128.110 ++mkdir -p usr/bin usr/share usr/share/man usr/share/man/man1 usr/lib \
 128.111 ++	 usr/lib/gcc-lib usr/lib/gcc-lib/${CPU}-linux \
 128.112 ++	 usr/lib/gcc-lib/${CPU}-linux/${VERSION} \
 128.113 ++	 usr/${CPU}-linux usr/${CPU}-linux/lib
 128.114 ++
 128.115 ++# Make symbolic links for include dir.
 128.116 ++(cd usr/${CPU}-linux; ln -s ../sh-linux/include .)
 128.117 ++
 128.118 ++# Make symbolic links for executables.
 128.119 ++(cd usr/bin;
 128.120 ++  for p in ${PROGS}; do
 128.121 ++    ln -s shCPU-linux-GCC ${CPU}-linux-$p
 128.122 ++  done)
 128.123 ++
 128.124 ++case "${CPU}" in
 128.125 ++    sh3)
 128.126 ++	MULTILIBDIR=
 128.127 ++	AS_ENDIAN_FLAG="-little"
 128.128 ++	CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
 128.129 ++	CPP_CPU_DEFS="-D__SH3__ -D__sh3__"
 128.130 ++	CC1_CPU_ENDIAN_FLAGS="-ml -m3"
 128.131 ++	LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh3"
 128.132 ++	LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh3-linux/lib"
 128.133 ++    ;;
 128.134 ++    sh3eb)
 128.135 ++	MULTILIBDIR=/mb
 128.136 ++	AS_ENDIAN_FLAG="-big"
 128.137 ++	CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
 128.138 ++	CPP_CPU_DEFS="-D__SH3__ -D__sh3__"
 128.139 ++	CC1_CPU_ENDIAN_FLAGS="-mb -m3"
 128.140 ++	LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh3"
 128.141 ++	LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh3eb-linux/lib"
 128.142 ++    ;;
 128.143 ++    sh4)
 128.144 ++	MULTILIBDIR=/m4
 128.145 ++	AS_ENDIAN_FLAG="-little"
 128.146 ++	CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
 128.147 ++	CPP_CPU_DEFS="-D__SH4__"
 128.148 ++	CC1_CPU_ENDIAN_FLAGS="-ml -m4"
 128.149 ++	LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh4"
 128.150 ++	LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh4-linux/lib"
 128.151 ++    ;;
 128.152 ++    sh4eb)
 128.153 ++	MULTILIBDIR=/mb/m4
 128.154 ++	AS_ENDIAN_FLAG="-big"
 128.155 ++	CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
 128.156 ++	CPP_CPU_DEFS="-D__SH4__"
 128.157 ++	CC1_CPU_ENDIAN_FLAGS="-mb -m4"
 128.158 ++	LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh4"
 128.159 ++	LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh4eb-linux/lib"
 128.160 ++    ;;
 128.161 ++esac
 128.162 ++
 128.163 ++# Make symbolic links for GCC drivers, objects, libraries, and include dir.
 128.164 ++(cd usr/lib/gcc-lib/${CPU}-linux/${VERSION};
 128.165 ++ for f in ${DRIVERS} ${INCLUDE}; do
 128.166 ++    ln -s ../../sh-linux/${VERSION}/$f $f;
 128.167 ++ done
 128.168 ++ for f in ${OBJS} ${LIBS_C}; do
 128.169 ++    ln -s ../../sh-linux/${VERSION}${MULTILIBDIR}/$f $f;
 128.170 ++ done)
 128.171 ++
 128.172 ++if [ -z "$STEP1_COMPILER_BUILD" ]; then
 128.173 ++  for f in ${LIBS_1} ${LIBS_2}; do
 128.174 ++    mv ../gcc-sh-linux/usr/sh-linux/lib${MULTILIBDIR}/$f usr/${CPU}-linux/lib/;
 128.175 ++  done
 128.176 ++fi
 128.177 ++
 128.178 ++sed -e "s+@AS_ENDIAN_FLAG@+${AS_ENDIAN_FLAG}+" \
 128.179 ++    -e "s+@CPP_ENDIAN_DEF@+${CPP_ENDIAN_DEF}+" \
 128.180 ++    -e "s+@CPP_CPU_DEFS@+${CPP_CPU_DEFS}+" \
 128.181 ++    -e "s+@CC1_CPU_ENDIAN_FLAGS@+${CC1_CPU_ENDIAN_FLAGS}+" \
 128.182 ++    -e "s+@LINKER_CPU_ENDIAN_FLAGS@+${LINKER_CPU_ENDIAN_FLAGS}+" \
 128.183 ++    -e "s+@LINKER_RPATH_LINK_FLAG@+${LINKER_RPATH_LINK_FLAG}+" \
 128.184 ++    ../edit-specs.in >../edit-specs-${CPU}.sed
 128.185 ++
 128.186 ++sed -f ../edit-specs-${CPU}.sed \
 128.187 ++    ../gcc-sh-linux${INITIAL}/usr/lib/gcc-lib/sh-linux/${VERSION}/specs \
 128.188 ++    > usr/lib/gcc-lib/${CPU}-linux/${VERSION}/specs
 128.189 ++
 128.190 ++exit 0
 128.191 +diff -ruN gcc-20030210.orig/debian/multilib-symlink gcc-20030210/debian/multilib-symlink
 128.192 +--- gcc-20030210.orig/debian/multilib-symlink	Thu Jan  1 09:00:00 1970
 128.193 ++++ gcc-20030210/debian/multilib-symlink	Sat Feb 22 01:40:14 2003
 128.194 +@@ -0,0 +1,10 @@
 128.195 ++#! /bin/sh
 128.196 ++
 128.197 ++cd /usr/sh-linux/lib
 128.198 ++ln -s ../../sh3-linux/lib/{*.a,*.so*,*.o} .
 128.199 ++cd m4
 128.200 ++ln -s ../../../sh4-linux/lib/{*.a,*.so*,*.o} .
 128.201 ++cd ../mb
 128.202 ++ln -s ../../../sh3eb-linux/lib/{*.a,*.so*,*.o} .
 128.203 ++cd m4
 128.204 ++ln -s ../../../../sh4eb-linux/lib/{*.a,*.so*,*.o} .
 128.205 +diff -ruN gcc-20030210.orig/debian/shCPU-linux-GCC gcc-20030210/debian/shCPU-linux-GCC
 128.206 +--- gcc-20030210.orig/debian/shCPU-linux-GCC	Thu Jan  1 09:00:00 1970
 128.207 ++++ gcc-20030210/debian/shCPU-linux-GCC	Sat Feb 22 01:40:14 2003
 128.208 +@@ -0,0 +1,59 @@
 128.209 ++#! /bin/bash
 128.210 ++
 128.211 ++BASENAME=${0##*/}
 128.212 ++PROG=${BASENAME##*-}
 128.213 ++CPU=${BASENAME%%-*}
 128.214 ++
 128.215 ++if [ "$PROG" = gcc ]; then
 128.216 ++    if [ "$1" = "-b" -a "$2" = "i386-linux" ]; then
 128.217 ++	shift 2
 128.218 ++	exec /usr/bin/gcc "$@"
 128.219 ++    elif [ "$1" = "-print-multi-lib" -o "$1" = "--print-multi-lib" ]; then
 128.220 ++	echo ".;"
 128.221 ++	exit 0
 128.222 ++    elif [ "$1" = "-print-multi-os-directory" -o "$1" = "--print-multi-os-directory" ]; then
 128.223 ++	echo "."
 128.224 ++	exit 0
 128.225 ++    elif [ "$1" = "-dumpspecs" ]; then
 128.226 ++	cat /usr/lib/gcc-lib/${CPU}-linux/@@VERSION@@/specs
 128.227 ++	exit 0
 128.228 ++    fi
 128.229 ++fi
 128.230 ++
 128.231 ++case "${CPU}" in
 128.232 ++    sh3)
 128.233 ++	ARCH=m3
 128.234 ++	DEFINES="-D__sh3__ -D__SH3__ -D__LITTLE_ENDIAN__"
 128.235 ++	ENDIAN=ml
 128.236 ++    ;;
 128.237 ++    sh3eb)
 128.238 ++	ARCH=m3
 128.239 ++	DEFINES="-D__sh3__ -D__SH3__ -D__BIG_ENDIAN__"
 128.240 ++	ENDIAN=mb
 128.241 ++    ;;
 128.242 ++    sh4)
 128.243 ++	ARCH=m4
 128.244 ++	DEFINES="-D__SH4__ -D__LITTLE_ENDIAN__"
 128.245 ++	ENDIAN=ml
 128.246 ++    ;;
 128.247 ++    sh4eb)
 128.248 ++	ARCH=m4
 128.249 ++	DEFINES="-D__SH4__ -D__BIG_ENDIAN__"
 128.250 ++	ENDIAN=mb
 128.251 ++    ;;
 128.252 ++esac
 128.253 ++
 128.254 ++# Prepend the appropriate options
 128.255 ++# If user specifies some options, it will be overridden
 128.256 ++
 128.257 ++case "${PROG}" in
 128.258 ++    cpp)
 128.259 ++	exec sh-linux-${PROG} $DEFINES "$@"
 128.260 ++    ;;
 128.261 ++    c++|g++|g77|gcc|gcj)
 128.262 ++	exec sh-linux-${PROG} -$ARCH -$ENDIAN "$@"
 128.263 ++    ;;
 128.264 ++esac
 128.265 ++
 128.266 ++echo "Something wrong..."
 128.267 ++exit 1
 128.268 +diff -ruN gcc-20030210.orig/gcc/config/sh/elf.h gcc-20030210/gcc/config/sh/elf.h
 128.269 +--- gcc-20030210.orig/gcc/config/sh/elf.h	Fri Feb 22 01:42:28 2002
 128.270 ++++ gcc-20030210/gcc/config/sh/elf.h	Sat Feb 22 01:40:14 2003
 128.271 +@@ -170,3 +170,7 @@
 128.272 + #undef ENDFILE_SPEC
 128.273 + #define ENDFILE_SPEC \
 128.274 +   "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
 128.275 ++
 128.276 ++/* ASM_OUTPUT_CASE_LABEL is defined in elfos.h.  With it, 
 128.277 ++   redundant .align will be generated.  */
 128.278 ++#undef  ASM_OUTPUT_CASE_LABEL
 128.279 +diff -ruN gcc-20030210.orig/gcc/config/sh/lib1funcs.asm gcc-20030210/gcc/config/sh/lib1funcs.asm
 128.280 +--- gcc-20030210.orig/gcc/config/sh/lib1funcs.asm	Fri Feb 22 01:42:28 2002
 128.281 ++++ gcc-20030210/gcc/config/sh/lib1funcs.asm	Sat Feb 22 01:40:14 2003
 128.282 +@@ -39,8 +39,13 @@
 128.283 + 
 128.284 + #ifdef __ELF__
 128.285 + #define LOCAL(X) .L_##X
 128.286 ++#define FUNC(X) .type X,@function; .hidden X
 128.287 ++#define _ENDFUNC(X) .Lfe_##X: .size X,.Lfe_##X-X
 128.288 ++#define ENDFUNC(X) _ENDFUNC(X)
 128.289 + #else
 128.290 + #define LOCAL(X) L_##X
 128.291 ++#define FUNC(X)
 128.292 ++#define ENDFUNC(X)
 128.293 + #endif
 128.294 + 
 128.295 + #ifdef __linux__
 128.296 +@@ -91,6 +96,40 @@
 128.297 + 	.global	GLOBAL(ashiftrt_r4_31)
 128.298 + 	.global	GLOBAL(ashiftrt_r4_32)
 128.299 + 
 128.300 ++	FUNC(GLOBAL(ashiftrt_r4_0))
 128.301 ++	FUNC(GLOBAL(ashiftrt_r4_1))
 128.302 ++	FUNC(GLOBAL(ashiftrt_r4_2))
 128.303 ++	FUNC(GLOBAL(ashiftrt_r4_3))
 128.304 ++	FUNC(GLOBAL(ashiftrt_r4_4))
 128.305 ++	FUNC(GLOBAL(ashiftrt_r4_5))
 128.306 ++	FUNC(GLOBAL(ashiftrt_r4_6))
 128.307 ++	FUNC(GLOBAL(ashiftrt_r4_7))
 128.308 ++	FUNC(GLOBAL(ashiftrt_r4_8))
 128.309 ++	FUNC(GLOBAL(ashiftrt_r4_9))
 128.310 ++	FUNC(GLOBAL(ashiftrt_r4_10))
 128.311 ++	FUNC(GLOBAL(ashiftrt_r4_11))
 128.312 ++	FUNC(GLOBAL(ashiftrt_r4_12))
 128.313 ++	FUNC(GLOBAL(ashiftrt_r4_13))
 128.314 ++	FUNC(GLOBAL(ashiftrt_r4_14))
 128.315 ++	FUNC(GLOBAL(ashiftrt_r4_15))
 128.316 ++	FUNC(GLOBAL(ashiftrt_r4_16))
 128.317 ++	FUNC(GLOBAL(ashiftrt_r4_17))
 128.318 ++	FUNC(GLOBAL(ashiftrt_r4_18))
 128.319 ++	FUNC(GLOBAL(ashiftrt_r4_19))
 128.320 ++	FUNC(GLOBAL(ashiftrt_r4_20))
 128.321 ++	FUNC(GLOBAL(ashiftrt_r4_21))
 128.322 ++	FUNC(GLOBAL(ashiftrt_r4_22))
 128.323 ++	FUNC(GLOBAL(ashiftrt_r4_23))
 128.324 ++	FUNC(GLOBAL(ashiftrt_r4_24))
 128.325 ++	FUNC(GLOBAL(ashiftrt_r4_25))
 128.326 ++	FUNC(GLOBAL(ashiftrt_r4_26))
 128.327 ++	FUNC(GLOBAL(ashiftrt_r4_27))
 128.328 ++	FUNC(GLOBAL(ashiftrt_r4_28))
 128.329 ++	FUNC(GLOBAL(ashiftrt_r4_29))
 128.330 ++	FUNC(GLOBAL(ashiftrt_r4_30))
 128.331 ++	FUNC(GLOBAL(ashiftrt_r4_31))
 128.332 ++	FUNC(GLOBAL(ashiftrt_r4_32))
 128.333 ++
 128.334 + 	.align	1
 128.335 + GLOBAL(ashiftrt_r4_32):
 128.336 + GLOBAL(ashiftrt_r4_31):
 128.337 +@@ -170,6 +209,41 @@
 128.338 + GLOBAL(ashiftrt_r4_0):
 128.339 + 	rts
 128.340 + 	nop
 128.341 ++
 128.342 ++	ENDFUNC(GLOBAL(ashiftrt_r4_0))
 128.343 ++	ENDFUNC(GLOBAL(ashiftrt_r4_1))
 128.344 ++	ENDFUNC(GLOBAL(ashiftrt_r4_2))
 128.345 ++	ENDFUNC(GLOBAL(ashiftrt_r4_3))
 128.346 ++	ENDFUNC(GLOBAL(ashiftrt_r4_4))
 128.347 ++	ENDFUNC(GLOBAL(ashiftrt_r4_5))
 128.348 ++	ENDFUNC(GLOBAL(ashiftrt_r4_6))
 128.349 ++	ENDFUNC(GLOBAL(ashiftrt_r4_7))
 128.350 ++	ENDFUNC(GLOBAL(ashiftrt_r4_8))
 128.351 ++	ENDFUNC(GLOBAL(ashiftrt_r4_9))
 128.352 ++	ENDFUNC(GLOBAL(ashiftrt_r4_10))
 128.353 ++	ENDFUNC(GLOBAL(ashiftrt_r4_11))
 128.354 ++	ENDFUNC(GLOBAL(ashiftrt_r4_12))
 128.355 ++	ENDFUNC(GLOBAL(ashiftrt_r4_13))
 128.356 ++	ENDFUNC(GLOBAL(ashiftrt_r4_14))
 128.357 ++	ENDFUNC(GLOBAL(ashiftrt_r4_15))
 128.358 ++	ENDFUNC(GLOBAL(ashiftrt_r4_16))
 128.359 ++	ENDFUNC(GLOBAL(ashiftrt_r4_17))
 128.360 ++	ENDFUNC(GLOBAL(ashiftrt_r4_18))
 128.361 ++	ENDFUNC(GLOBAL(ashiftrt_r4_19))
 128.362 ++	ENDFUNC(GLOBAL(ashiftrt_r4_20))
 128.363 ++	ENDFUNC(GLOBAL(ashiftrt_r4_21))
 128.364 ++	ENDFUNC(GLOBAL(ashiftrt_r4_22))
 128.365 ++	ENDFUNC(GLOBAL(ashiftrt_r4_23))
 128.366 ++	ENDFUNC(GLOBAL(ashiftrt_r4_24))
 128.367 ++	ENDFUNC(GLOBAL(ashiftrt_r4_25))
 128.368 ++	ENDFUNC(GLOBAL(ashiftrt_r4_26))
 128.369 ++	ENDFUNC(GLOBAL(ashiftrt_r4_27))
 128.370 ++	ENDFUNC(GLOBAL(ashiftrt_r4_28))
 128.371 ++	ENDFUNC(GLOBAL(ashiftrt_r4_29))
 128.372 ++	ENDFUNC(GLOBAL(ashiftrt_r4_30))
 128.373 ++	ENDFUNC(GLOBAL(ashiftrt_r4_31))
 128.374 ++	ENDFUNC(GLOBAL(ashiftrt_r4_32))
 128.375 ++
 128.376 + #endif
 128.377 + 
 128.378 + #ifdef L_ashiftrt_n
 128.379 +@@ -192,6 +266,7 @@
 128.380 + !
 128.381 + 
 128.382 + 	.global	GLOBAL(ashrsi3)
 128.383 ++	FUNC(GLOBAL(ashrsi3))
 128.384 + 	.align	2
 128.385 + GLOBAL(ashrsi3):
 128.386 + 	mov	#31,r0
 128.387 +@@ -319,6 +394,8 @@
 128.388 + 	rts
 128.389 + 	nop
 128.390 + 
 128.391 ++	ENDFUNC(GLOBAL(ashrsi3))
 128.392 ++
 128.393 + #endif
 128.394 + 
 128.395 + #ifdef L_ashiftlt
 128.396 +@@ -340,6 +417,7 @@
 128.397 + ! (none)
 128.398 + !
 128.399 + 	.global	GLOBAL(ashlsi3)
 128.400 ++	FUNC(GLOBAL(ashlsi3))
 128.401 + 	.align	2
 128.402 + GLOBAL(ashlsi3):
 128.403 + 	mov	#31,r0
 128.404 +@@ -476,6 +554,8 @@
 128.405 + 	rts
 128.406 + 	nop
 128.407 + 
 128.408 ++	ENDFUNC(GLOBAL(ashlsi3))
 128.409 ++
 128.410 + #endif
 128.411 + 
 128.412 + #ifdef L_lshiftrt
 128.413 +@@ -497,6 +577,7 @@
 128.414 + ! (none)
 128.415 + !
 128.416 + 	.global	GLOBAL(lshrsi3)
 128.417 ++	FUNC(GLOBAL(lshrsi3))
 128.418 + 	.align	2
 128.419 + GLOBAL(lshrsi3):
 128.420 + 	mov	#31,r0
 128.421 +@@ -633,6 +714,8 @@
 128.422 + 	rts
 128.423 + 	nop
 128.424 + 
 128.425 ++	ENDFUNC(GLOBAL(lshrsi3))
 128.426 ++
 128.427 + #endif
 128.428 + 
 128.429 + #ifdef L_movstr
 128.430 +@@ -649,76 +732,113 @@
 128.431 + 	add	#64,r4
 128.432 + 	.align	4
 128.433 + 	.global	GLOBAL(movstrSI64)
 128.434 ++	FUNC(GLOBAL(movstrSI64))
 128.435 + GLOBAL(movstrSI64):
 128.436 + 	mov.l	@(60,r5),r0
 128.437 + 	mov.l	r0,@(60,r4)
 128.438 + 	.global	GLOBAL(movstrSI60)
 128.439 ++	FUNC(GLOBAL(movstrSI60))
 128.440 + GLOBAL(movstrSI60):
 128.441 + 	mov.l	@(56,r5),r0
 128.442 + 	mov.l	r0,@(56,r4)
 128.443 + 	.global	GLOBAL(movstrSI56)
 128.444 ++	FUNC(GLOBAL(movstrSI56))
 128.445 + GLOBAL(movstrSI56):
 128.446 + 	mov.l	@(52,r5),r0
 128.447 + 	mov.l	r0,@(52,r4)
 128.448 + 	.global	GLOBAL(movstrSI52)
 128.449 ++	FUNC(GLOBAL(movstrSI52))
 128.450 + GLOBAL(movstrSI52):
 128.451 + 	mov.l	@(48,r5),r0
 128.452 + 	mov.l	r0,@(48,r4)
 128.453 + 	.global	GLOBAL(movstrSI48)
 128.454 ++	FUNC(GLOBAL(movstrSI48))
 128.455 + GLOBAL(movstrSI48):
 128.456 + 	mov.l	@(44,r5),r0
 128.457 + 	mov.l	r0,@(44,r4)
 128.458 + 	.global	GLOBAL(movstrSI44)
 128.459 ++	FUNC(GLOBAL(movstrSI44))
 128.460 + GLOBAL(movstrSI44):
 128.461 + 	mov.l	@(40,r5),r0
 128.462 + 	mov.l	r0,@(40,r4)
 128.463 + 	.global	GLOBAL(movstrSI40)
 128.464 ++	FUNC(GLOBAL(movstrSI40))
 128.465 + GLOBAL(movstrSI40):
 128.466 + 	mov.l	@(36,r5),r0
 128.467 + 	mov.l	r0,@(36,r4)
 128.468 + 	.global	GLOBAL(movstrSI36)
 128.469 ++	FUNC(GLOBAL(movstrSI36))
 128.470 + GLOBAL(movstrSI36):
 128.471 + 	mov.l	@(32,r5),r0
 128.472 + 	mov.l	r0,@(32,r4)
 128.473 + 	.global	GLOBAL(movstrSI32)
 128.474 ++	FUNC(GLOBAL(movstrSI32))
 128.475 + GLOBAL(movstrSI32):
 128.476 + 	mov.l	@(28,r5),r0
 128.477 + 	mov.l	r0,@(28,r4)
 128.478 + 	.global	GLOBAL(movstrSI28)
 128.479 ++	FUNC(GLOBAL(movstrSI28))
 128.480 + GLOBAL(movstrSI28):
 128.481 + 	mov.l	@(24,r5),r0
 128.482 + 	mov.l	r0,@(24,r4)
 128.483 + 	.global	GLOBAL(movstrSI24)
 128.484 ++	FUNC(GLOBAL(movstrSI24))
 128.485 + GLOBAL(movstrSI24):
 128.486 + 	mov.l	@(20,r5),r0
 128.487 + 	mov.l	r0,@(20,r4)
 128.488 + 	.global	GLOBAL(movstrSI20)
 128.489 ++	FUNC(GLOBAL(movstrSI20))
 128.490 + GLOBAL(movstrSI20):
 128.491 + 	mov.l	@(16,r5),r0
 128.492 + 	mov.l	r0,@(16,r4)
 128.493 + 	.global	GLOBAL(movstrSI16)
 128.494 ++	FUNC(GLOBAL(movstrSI16))
 128.495 + GLOBAL(movstrSI16):
 128.496 + 	mov.l	@(12,r5),r0
 128.497 + 	mov.l	r0,@(12,r4)
 128.498 + 	.global	GLOBAL(movstrSI12)
 128.499 ++	FUNC(GLOBAL(movstrSI12))
 128.500 + GLOBAL(movstrSI12):
 128.501 + 	mov.l	@(8,r5),r0
 128.502 + 	mov.l	r0,@(8,r4)
 128.503 + 	.global	GLOBAL(movstrSI8)
 128.504 ++	FUNC(GLOBAL(movstrSI8))
 128.505 + GLOBAL(movstrSI8):
 128.506 + 	mov.l	@(4,r5),r0
 128.507 + 	mov.l	r0,@(4,r4)
 128.508 + 	.global	GLOBAL(movstrSI4)
 128.509 ++	FUNC(GLOBAL(movstrSI4))
 128.510 + GLOBAL(movstrSI4):
 128.511 + 	mov.l	@(0,r5),r0
 128.512 + 	mov.l	r0,@(0,r4)
 128.513 ++	.global	GLOBAL(movstrSI0)
 128.514 ++	FUNC(GLOBAL(movstrSI0))
 128.515 + GLOBAL(movstrSI0):
 128.516 + 	rts
 128.517 + 	nop
 128.518 + 
 128.519 ++	ENDFUNC(GLOBAL(movstrSI64))
 128.520 ++	ENDFUNC(GLOBAL(movstrSI60))
 128.521 ++	ENDFUNC(GLOBAL(movstrSI56))
 128.522 ++	ENDFUNC(GLOBAL(movstrSI52))
 128.523 ++	ENDFUNC(GLOBAL(movstrSI48))
 128.524 ++	ENDFUNC(GLOBAL(movstrSI44))
 128.525 ++	ENDFUNC(GLOBAL(movstrSI40))
 128.526 ++	ENDFUNC(GLOBAL(movstrSI36))
 128.527 ++	ENDFUNC(GLOBAL(movstrSI32))
 128.528 ++	ENDFUNC(GLOBAL(movstrSI28))
 128.529 ++	ENDFUNC(GLOBAL(movstrSI24))
 128.530 ++	ENDFUNC(GLOBAL(movstrSI20))
 128.531 ++	ENDFUNC(GLOBAL(movstrSI16))
 128.532 ++	ENDFUNC(GLOBAL(movstrSI12))
 128.533 ++	ENDFUNC(GLOBAL(movstrSI8))
 128.534 ++	ENDFUNC(GLOBAL(movstrSI4))
 128.535 ++	ENDFUNC(GLOBAL(movstrSI0))
 128.536 ++
 128.537 + 	.align	4
 128.538 + 
 128.539 + 	.global	GLOBAL(movstr)
 128.540 ++	FUNC(GLOBAL(movstr))
 128.541 + GLOBAL(movstr):
 128.542 + 	mov.l	@(60,r5),r0
 128.543 + 	mov.l	r0,@(60,r4)
 128.544 +@@ -775,6 +895,8 @@
 128.545 + 	add	#64,r5
 128.546 + 	bra	GLOBAL(movstr)
 128.547 + 	add	#64,r4
 128.548 ++
 128.549 ++	FUNC(GLOBAL(movstr))
 128.550 + #endif
 128.551 + 
 128.552 + #ifdef L_movstr_i4
 128.553 +@@ -783,6 +905,10 @@
 128.554 + 	.global	GLOBAL(movstr_i4_odd)
 128.555 + 	.global	GLOBAL(movstrSI12_i4)
 128.556 + 
 128.557 ++	FUNC(GLOBAL(movstr_i4_even))
 128.558 ++	FUNC(GLOBAL(movstr_i4_odd))
 128.559 ++	FUNC(GLOBAL(movstrSI12_i4))
 128.560 ++
 128.561 + 	.p2align	5
 128.562 + L_movstr_2mod4_end:
 128.563 + 	mov.l	r0,@(16,r4)
 128.564 +@@ -791,6 +917,11 @@
 128.565 + 
 128.566 + 	.p2align	2
 128.567 + 
 128.568 ++GLOBAL(movstr_i4_even):
 128.569 ++	mov.l	@r5+,r0
 128.570 ++	bra	L_movstr_start_even
 128.571 ++	mov.l	@r5+,r1
 128.572 ++
 128.573 + GLOBAL(movstr_i4_odd):
 128.574 + 	mov.l	@r5+,r1
 128.575 + 	add	#-4,r4
 128.576 +@@ -817,10 +948,8 @@
 128.577 + 	rts
 128.578 + 	mov.l	r3,@(12,r4)
 128.579 + 
 128.580 +-GLOBAL(movstr_i4_even):
 128.581 +-	mov.l	@r5+,r0
 128.582 +-	bra	L_movstr_start_even
 128.583 +-	mov.l	@r5+,r1
 128.584 ++	ENDFUNC(GLOBAL(movstr_i4_even))
 128.585 ++	ENDFUNC(GLOBAL(movstr_i4_odd))
 128.586 + 
 128.587 + 	.p2align	4
 128.588 + GLOBAL(movstrSI12_i4):
 128.589 +@@ -831,12 +960,16 @@
 128.590 + 	mov.l	r1,@(4,r4)
 128.591 + 	rts
 128.592 + 	mov.l	r2,@(8,r4)
 128.593 ++
 128.594 ++	ENDFUNC(GLOBAL(movstrSI12_i4))
 128.595 ++
 128.596 + #endif
 128.597 + 
 128.598 + #ifdef L_mulsi3
 128.599 + 
 128.600 + 
 128.601 + 	.global	GLOBAL(mulsi3)
 128.602 ++	FUNC(GLOBAL(mulsi3))
 128.603 + 
 128.604 + ! r4 =       aabb
 128.605 + ! r5 =       ccdd
 128.606 +@@ -869,7 +1002,7 @@
 128.607 + 	rts
 128.608 + 	add	r2,r0
 128.609 + 
 128.610 +-
 128.611 ++	FUNC(GLOBAL(mulsi3))
 128.612 + #endif
 128.613 + #endif /* ! __SH5__ */
 128.614 + #ifdef L_sdivsi3_i4
 128.615 +@@ -879,6 +1012,7 @@
 128.616 + !! args in r4 and r5, result in fpul, clobber dr0, dr2
 128.617 + 
 128.618 + 	.global	GLOBAL(sdivsi3_i4)
 128.619 ++	FUNC(GLOBAL(sdivsi3_i4))
 128.620 + GLOBAL(sdivsi3_i4):
 128.621 + 	lds r4,fpul
 128.622 + 	float fpul,dr0
 128.623 +@@ -888,6 +1022,8 @@
 128.624 + 	rts
 128.625 + 	ftrc dr0,fpul
 128.626 + 
 128.627 ++	ENDFUNC(GLOBAL(sdivsi3_i4))
 128.628 ++
 128.629 + #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__)
 128.630 + !! args in r4 and r5, result in fpul, clobber r2, dr0, dr2
 128.631 + 
 128.632 +@@ -896,6 +1032,7 @@
 128.633 + 	.mode	SHcompact
 128.634 + #endif
 128.635 + 	.global	GLOBAL(sdivsi3_i4)
 128.636 ++	FUNC(GLOBAL(sdivsi3_i4))
 128.637 + GLOBAL(sdivsi3_i4):
 128.638 + 	sts.l fpscr,@-r15
 128.639 + 	mov #8,r2
 128.640 +@@ -910,6 +1047,8 @@
 128.641 + 	rts
 128.642 + 	lds.l @r15+,fpscr
 128.643 + 
 128.644 ++	ENDFUNC(GLOBAL(sdivsi3_i4))
 128.645 ++
 128.646 + #endif /* ! __SH5__ || __SH5__ == 32 */
 128.647 + #endif /* ! __SH4__ */
 128.648 + #endif
 128.649 +@@ -924,9 +1063,10 @@
 128.650 + !!
 128.651 + !!
 128.652 + 
 128.653 +-!! args in r4 and r5, result in r0 clobber r1,r2,r3
 128.654 ++!! args in r4 and r5, result in r0 clobber r1, r2, r3, and t bit
 128.655 + 
 128.656 + 	.global	GLOBAL(sdivsi3)
 128.657 ++	FUNC(GLOBAL(sdivsi3))
 128.658 + #if __SHMEDIA__
 128.659 + #if __SH5__ == 32
 128.660 + 	.section	.text..SHmedia32,"ax"
 128.661 +@@ -1076,6 +1216,7 @@
 128.662 + div0:	rts
 128.663 + 	mov	#0,r0
 128.664 + 
 128.665 ++	ENDFUNC(GLOBAL(sdivsi3))
 128.666 + #endif /* ! __SHMEDIA__ */
 128.667 + #endif /* ! __SH4__ */
 128.668 + #endif
 128.669 +@@ -1084,9 +1225,11 @@
 128.670 + 	.title "SH DIVIDE"
 128.671 + !! 4 byte integer Divide code for the Hitachi SH
 128.672 + #ifdef __SH4__
 128.673 +-!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
 128.674 ++!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4,
 128.675 ++!! and t bit
 128.676 + 
 128.677 + 	.global	GLOBAL(udivsi3_i4)
 128.678 ++	FUNC(GLOBAL(udivsi3_i4))
 128.679 + GLOBAL(udivsi3_i4):
 128.680 + 	mov #1,r1
 128.681 + 	cmp/hi r1,r5
 128.682 +@@ -1127,6 +1270,8 @@
 128.683 + L1:
 128.684 + 	.double 2147483648
 128.685 + 
 128.686 ++	ENDFUNC(GLOBAL(udivsi3_i4))
 128.687 ++
 128.688 + #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__)
 128.689 + !! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
 128.690 + 
 128.691 +@@ -1135,6 +1280,7 @@
 128.692 + 	.mode	SHcompact
 128.693 + #endif
 128.694 + 	.global	GLOBAL(udivsi3_i4)
 128.695 ++	FUNC(GLOBAL(udivsi3_i4))
 128.696 + GLOBAL(udivsi3_i4):
 128.697 + 	mov #1,r1
 128.698 + 	cmp/hi r1,r5
 128.699 +@@ -1183,6 +1329,8 @@
 128.700 + #endif
 128.701 + 	.double 2147483648
 128.702 + 
 128.703 ++	ENDFUNC(GLOBAL(udivsi3_i4))
 128.704 ++
 128.705 + #endif /* ! __SH5__ || __SH5__ == 32 */
 128.706 + #endif /* ! __SH4__ */
 128.707 + #endif
 128.708 +@@ -1199,6 +1347,7 @@
 128.709 + 
 128.710 + !! args in r4 and r5, result in r0, clobbers r4, pr, and t bit
 128.711 + 	.global	GLOBAL(udivsi3)
 128.712 ++	FUNC(GLOBAL(udivsi3))
 128.713 + 
 128.714 + #if __SHMEDIA__
 128.715 + #if __SH5__ == 32
 128.716 +@@ -1299,6 +1448,8 @@
 128.717 + ret:	rts
 128.718 + 	mov	r4,r0
 128.719 + 
 128.720 ++	ENDFUNC(GLOBAL(udivsi3))
 128.721 ++
 128.722 + #endif /* ! __SHMEDIA__ */
 128.723 + #endif /* __SH4__ */
 128.724 + #endif
 128.725 +@@ -1308,6 +1459,7 @@
 128.726 + 	.mode	SHcompact
 128.727 + #endif
 128.728 + 	.global GLOBAL(set_fpscr)
 128.729 ++	FUNC(GLOBAL(set_fpscr))
 128.730 + GLOBAL(set_fpscr):
 128.731 + 	lds r4,fpscr
 128.732 + 	mov.l LOCAL(set_fpscr_L1),r1
 128.733 +@@ -1340,11 +1492,16 @@
 128.734 + 	.align 2
 128.735 + LOCAL(set_fpscr_L1):
 128.736 + 	.long GLOBAL(fpscr_values)
 128.737 ++
 128.738 ++	ENDFUNC(GLOBAL(set_fpscr))
 128.739 ++
 128.740 ++#ifndef NO_FPSCR_VALUES
 128.741 + #ifdef __ELF__
 128.742 +         .comm   GLOBAL(fpscr_values),8,4
 128.743 + #else
 128.744 +         .comm   GLOBAL(fpscr_values),8
 128.745 + #endif /* ELF */
 128.746 ++#endif /* NO_FPSCR_VALUES */
 128.747 + #endif /* SH3E / SH4 */
 128.748 + #endif /* L_set_fpscr */
 128.749 + #ifdef L_ic_invalidate
 128.750 +@@ -1360,6 +1517,7 @@
 128.751 + 	blink	tr0, r63
 128.752 + #elif defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
 128.753 + 	.global GLOBAL(ic_invalidate)
 128.754 ++	FUNC(GLOBAL(ic_invalidate))
 128.755 + GLOBAL(ic_invalidate):
 128.756 + 	ocbwb	@r4
 128.757 + 	mova	0f,r0
 128.758 +@@ -1382,6 +1540,9 @@
 128.759 + 	nop
 128.760 + 	.endr
 128.761 + 	.endr
 128.762 ++
 128.763 ++	ENDFUNC(GLOBAL(ic_invalidate))
 128.764 ++
 128.765 + #endif /* SH4 */
 128.766 + #endif /* L_ic_invalidate */
 128.767 + 
 128.768 +diff -ruN gcc-20030210.orig/gcc/config/sh/libgcc-glibc.ver gcc-20030210/gcc/config/sh/libgcc-glibc.ver
 128.769 +--- gcc-20030210.orig/gcc/config/sh/libgcc-glibc.ver	Thu Jan  1 09:00:00 1970
 128.770 ++++ gcc-20030210/gcc/config/sh/libgcc-glibc.ver	Sat Feb 22 01:40:14 2003
 128.771 +@@ -0,0 +1,21 @@
 128.772 ++# In order to work around the very problems that force us to now generally
 128.773 ++# create a libgcc.so, glibc reexported a number of routines from libgcc.a.
 128.774 ++# By now choosing the same version tags for these specific routines, we
 128.775 ++# maintain enough binary compatibility to allow future versions of glibc
 128.776 ++# to defer implementation of these routines to libgcc.so via DT_AUXILIARY.
 128.777 ++
 128.778 ++# Note that we cannot use the default libgcc-glibc.ver file on sh,
 128.779 ++# because GLIBC_2.0 does not exist on this architecture, as the first 
 128.780 ++# ever glibc release on the platform was GLIBC_2.2.
 128.781 ++
 128.782 ++%inherit GCC_3.0 GLIBC_2.2
 128.783 ++GLIBC_2.2 {
 128.784 ++  __register_frame
 128.785 ++  __register_frame_table
 128.786 ++  __deregister_frame
 128.787 ++  __register_frame_info
 128.788 ++  __deregister_frame_info
 128.789 ++  __frame_state_for
 128.790 ++  __register_frame_info_table
 128.791 ++}
 128.792 ++
 128.793 +diff -ruN gcc-20030210.orig/gcc/config/sh/linux.h gcc-20030210/gcc/config/sh/linux.h
 128.794 +--- gcc-20030210.orig/gcc/config/sh/linux.h	Tue Apr 16 05:27:42 2002
 128.795 ++++ gcc-20030210/gcc/config/sh/linux.h	Sat Feb 22 01:40:14 2003
 128.796 +@@ -19,6 +19,10 @@
 128.797 + the Free Software Foundation, 59 Temple Place - Suite 330,
 128.798 + Boston, MA 02111-1307, USA.  */
 128.799 + 
 128.800 ++/* We're not SYSVR4, not having /usr/ccs */
 128.801 ++#undef MD_EXEC_PREFIX
 128.802 ++#undef MD_STARTFILE_PREFIX
 128.803 ++
 128.804 + /* Run-time Target Specification.  */
 128.805 + #undef TARGET_VERSION
 128.806 + #define TARGET_VERSION  fputs (" (SH GNU/Linux with ELF)", stderr);
 128.807 +@@ -39,6 +43,28 @@
 128.808 + #undef WCHAR_TYPE_SIZE
 128.809 + #define WCHAR_TYPE_SIZE BITS_PER_WORD
 128.810 + 
 128.811 ++/* This was defined in linux.h.  Define it here also. */
 128.812 ++#undef  DEFAULT_VTABLE_THUNKS
 128.813 ++#define DEFAULT_VTABLE_THUNKS   1
 128.814 ++
 128.815 ++/* Likewise.  */
 128.816 ++#define HANDLE_PRAGMA_PACK_PUSH_POP
 128.817 ++
 128.818 ++/* Pick up the return address upon entry to a procedure. Used for
 128.819 ++   dwarf2 unwind information.  This also enables the table driven
 128.820 ++   mechanism.  */
 128.821 ++
 128.822 ++#define INCOMING_RETURN_ADDR_RTX	gen_rtx_REG (Pmode, PR_REG)
 128.823 ++#define DWARF_FRAME_RETURN_COLUMN	DWARF_FRAME_REGNUM (PR_REG)
 128.824 ++
 128.825 ++#undef CPP_SPEC
 128.826 ++#define CPP_SPEC "\
 128.827 ++   %{m4:-D__SH4__} \
 128.828 ++   %{!m4:%(cpp_default_cpu_spec)} \
 128.829 ++   %(subtarget_cpp_spec) \
 128.830 ++   %(subtarget_cpp_ptr_spec) \
 128.831 ++   %(subtarget_cpp_endian_spec) "
 128.832 ++
 128.833 + #undef SUBTARGET_CPP_SPEC
 128.834 + #define SUBTARGET_CPP_SPEC "\
 128.835 +    %{fPIC:-D__PIC__ -D__pic__} \
 128.836 +@@ -55,36 +81,45 @@
 128.837 + #undef CPP_DEFAULT_CPU_SPEC
 128.838 + #define CPP_DEFAULT_CPU_SPEC "-D__SH3__ -D__sh3__"
 128.839 + 
 128.840 +-
 128.841 + #undef CPP_PREDEFINES
 128.842 + #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__sh__ -D__gnu_linux__ -Dlinux -Asystem=posix"
 128.843 + 
 128.844 ++/* The GNU C++ standard library requires that these macros be defined.  */
 128.845 ++#undef CPLUSPLUS_CPP_SPEC
 128.846 ++#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
 128.847 ++
 128.848 + #undef ASM_SPEC
 128.849 +-#define ASM_SPEC  "%{!mb:-little} %{mrelax:-relax}"
 128.850 ++#define ASM_SPEC  "%{mb:-big} %{!mb:-little} %{mrelax:-relax}"
 128.851 + 
 128.852 + #undef CC1_SPEC
 128.853 + #define CC1_SPEC \
 128.854 +-  "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}"
 128.855 +-
 128.856 +-#undef CC1PLUS_SPEC
 128.857 +-#define CC1PLUS_SPEC \
 128.858 +-  "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}"
 128.859 ++  "-musermode %{!mb:-ml} %{!m4:-m3} %{profile:-p}"
 128.860 + 
 128.861 ++/* XXX: It's wrong if prefix != /usr */
 128.862 + #undef LINK_SPEC
 128.863 + #define LINK_SPEC \
 128.864 +-  "%{!mb:-m shlelf_linux} %{mrelax:-relax} \
 128.865 ++  "%{!mb:-m shlelf_linux -EL} %{mb:-m shelf_linux -EB} %{mrelax:-relax} \
 128.866 +    %{shared:-shared} \
 128.867 +    %{!static: \
 128.868 +      %{rdynamic:-export-dynamic} \
 128.869 +      %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
 128.870 +-     %{!rpath:-rpath /lib}} \
 128.871 ++     %{!mb:%{!m4:-rpath-link /usr/sh-linux/lib }} \
 128.872 ++     %{!mb:%{m4:-rpath-link /usr/sh-linux/lib/m4 }} \
 128.873 ++     %{mb:%{!m4:-rpath-link /usr/sh-linux/lib/mb }} \
 128.874 ++     %{mb:%{m4:-rpath-link /usr/sh-linux/lib/mb/m4 }}} \
 128.875 +    %{static:-static}"
 128.876 + 
 128.877 + #undef LIB_SPEC
 128.878 ++#undef LIB_SPEC
 128.879 + #define LIB_SPEC \
 128.880 +   "%{shared: -lc} \
 128.881 +-   %{!shared: %{pthread:-lthread} \
 128.882 +-     %{profile:-lc_p} %{!profile: -lc}}"
 128.883 ++   %{!shared: %{mieee:-lieee} %{pthread:-lpthread} \
 128.884 ++	%{profile:-lc_p} %{!profile: -lc}}"
 128.885 ++
 128.886 ++#if defined(HAVE_LD_EH_FRAME_HDR)
 128.887 ++#undef LINK_EH_SPEC
 128.888 ++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
 128.889 ++#endif
 128.890 + 
 128.891 + #undef STARTFILE_SPEC
 128.892 + #define STARTFILE_SPEC \
 128.893 +@@ -92,4 +127,40 @@
 128.894 +      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
 128.895 + 		       %{!p:%{profile:gcrt1.o%s} \
 128.896 + 			 %{!profile:crt1.o%s}}}} \
 128.897 +-   crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
 128.898 ++   crti.o%s %{static:crtbeginT.o%s}\
 128.899 ++   %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
 128.900 ++
 128.901 ++#undef FUNCTION_PROFILER
 128.902 ++#define FUNCTION_PROFILER(STREAM,LABELNO)				\
 128.903 ++do									\
 128.904 ++{									\
 128.905 ++  if (flag_pic)								\
 128.906 ++    {									\
 128.907 ++      fprintf (STREAM, "	mov.l	3f,r1\n");			\
 128.908 ++      fprintf (STREAM, "	mova	3f,r0\n");			\
 128.909 ++      fprintf (STREAM, "	add	r1,r0\n");			\
 128.910 ++      fprintf (STREAM, "	mov.l	1f,r1\n");			\
 128.911 ++      fprintf (STREAM, "	mov.l	@(r0,r1),r1\n");		\
 128.912 ++    }									\
 128.913 ++  else									\
 128.914 ++    {									\
 128.915 ++      fprintf (STREAM, "	mov.l	1f,r1\n");			\
 128.916 ++    }									\
 128.917 ++  fprintf (STREAM, "	sts.l	pr,@-r15\n");				\
 128.918 ++  fprintf (STREAM, "	mova	2f,r0\n");				\
 128.919 ++  fprintf (STREAM, "	jmp	@r1\n");				\
 128.920 ++  fprintf (STREAM, "	lds	r0,pr\n");				\
 128.921 ++  fprintf (STREAM, "	.align	2\n");					\
 128.922 ++  if (flag_pic)								\
 128.923 ++    {									\
 128.924 ++      fprintf (STREAM, "1:	.long	mcount@GOT\n");			\
 128.925 ++      fprintf (STREAM, "3:	.long	_GLOBAL_OFFSET_TABLE_\n");	\
 128.926 ++    }									\
 128.927 ++  else									\
 128.928 ++    {									\
 128.929 ++      fprintf (STREAM, "1:	.long	mcount\n");			\
 128.930 ++    }									\
 128.931 ++  fprintf (STREAM, "2:	lds.l	@r15+,pr\n");				\
 128.932 ++} while (0)
 128.933 ++
 128.934 ++#define NO_SHARED_LIBGCC_MULTILIB
 128.935 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh-protos.h gcc-20030210/gcc/config/sh/sh-protos.h
 128.936 +--- gcc-20030210.orig/gcc/config/sh/sh-protos.h	Fri Feb 22 01:42:28 2002
 128.937 ++++ gcc-20030210/gcc/config/sh/sh-protos.h	Sat Feb 22 01:40:14 2003
 128.938 +@@ -74,6 +74,7 @@
 128.939 + extern int shl_sext_length PARAMS ((rtx));
 128.940 + extern int gen_shl_sext PARAMS ((rtx, rtx, rtx, rtx));
 128.941 + extern rtx gen_datalabel_ref PARAMS ((rtx));
 128.942 ++extern int shl_casesi_worker_length PARAMS ((rtx));
 128.943 + extern int regs_used PARAMS ((rtx, int));
 128.944 + extern void fixup_addr_diff_vecs PARAMS ((rtx));
 128.945 + extern int get_dest_uid PARAMS ((rtx, int));
 128.946 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh.c gcc-20030210/gcc/config/sh/sh.c
 128.947 +--- gcc-20030210.orig/gcc/config/sh/sh.c	Fri Feb 22 01:42:28 2002
 128.948 ++++ gcc-20030210/gcc/config/sh/sh.c	Sat Feb 22 01:40:14 2003
 128.949 +@@ -2143,6 +2143,48 @@
 128.950 +   return sym;
 128.951 + }
 128.952 + 
 128.953 ++
 128.954 ++/* Function to be used in the length attribute of the casesi_worker
 128.955 ++   instruction.  Returns number of instructions, which is half of the
 128.956 ++   length of bytes. */
 128.957 ++
 128.958 ++int
 128.959 ++shl_casesi_worker_length (insn)
 128.960 ++     rtx insn;
 128.961 ++{
 128.962 ++  rtx set_src, label;
 128.963 ++  rtx diff_vec;
 128.964 ++
 128.965 ++  set_src = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
 128.966 ++  if (!(GET_CODE (set_src) == UNSPEC
 128.967 ++	&& XINT (set_src, 1) == UNSPEC_CASESI))
 128.968 ++    abort ();
 128.969 ++
 128.970 ++  label = XVECEXP (set_src, 0, 2);
 128.971 ++  if (GET_CODE (label) != LABEL_REF)
 128.972 ++    abort ();
 128.973 ++
 128.974 ++  diff_vec = PATTERN (next_real_insn (XEXP (label, 0)));
 128.975 ++
 128.976 ++  if (GET_CODE (diff_vec) != ADDR_DIFF_VEC)
 128.977 ++    abort ();
 128.978 ++
 128.979 ++  switch (GET_MODE (diff_vec))
 128.980 ++    {
 128.981 ++    case SImode:
 128.982 ++      return 2;
 128.983 ++    case HImode:
 128.984 ++      if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
 128.985 ++	return 3;
 128.986 ++      return 2;
 128.987 ++    case QImode:
 128.988 ++      if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
 128.989 ++	return 2;
 128.990 ++      return 1;
 128.991 ++    default:
 128.992 ++      abort ();
 128.993 ++    }
 128.994 ++}
 128.995 + 
 128.996 + /* The SH cannot load a large constant into a register, constants have to
 128.997 +    come from a pc relative load.  The reference of a pc relative load
 128.998 +@@ -3190,7 +3232,7 @@
 128.999 +       vec_lab = XEXP (XEXP (pat, 0), 0);
128.1000 + 
128.1001 +       /* Search the matching casesi_jump_2.  */
128.1002 +-      for (prev = vec_lab; ; prev = PREV_INSN (prev))
128.1003 ++      for (prev = vec_lab; prev; prev = PREV_INSN (prev))
128.1004 + 	{
128.1005 + 	  if (GET_CODE (prev) != JUMP_INSN)
128.1006 + 	    continue;
128.1007 +@@ -3205,6 +3247,13 @@
128.1008 + 	    break;
128.1009 + 	}
128.1010 + 
128.1011 ++      if (prev == NULL)
128.1012 ++	{			/* Switch statement has been optimized out.  */
128.1013 ++	  delete_insn (PREV_INSN (insn));
128.1014 ++	  delete_insn (insn);
128.1015 ++	  continue;
128.1016 ++	}
128.1017 ++
128.1018 +       /* Emit the reference label of the braf where it belongs, right after
128.1019 + 	 the casesi_jump_2 (i.e. braf).  */
128.1020 +       braf_label = XEXP (XEXP (SET_SRC (XVECEXP (prevpat, 0, 0)), 1), 0);
128.1021 +@@ -3223,7 +3272,7 @@
128.1022 +      rtx barrier_or_label;
128.1023 + {
128.1024 +   rtx next = next_real_insn (barrier_or_label), pat, prev;
128.1025 +-  int slot, credit, jump_to_next;
128.1026 ++  int slot, credit, jump_to_next = 0;
128.1027 +  
128.1028 +   if (! next)
128.1029 +     return 0;
128.1030 +@@ -4507,7 +4556,8 @@
128.1031 +   if (current_function_varargs || current_function_stdarg)
128.1032 +     {
128.1033 +       /* This is not used by the SH3E calling convention  */
128.1034 +-      if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI)
128.1035 ++      if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI
128.1036 ++	  || TARGET_NO_IMPLICIT_FP)
128.1037 + 	{
128.1038 + 	  /* Push arg regs as if they'd been provided by caller in stack.  */
128.1039 + 	  for (i = 0; i < NPARM_REGS(SImode); i++)
128.1040 +@@ -5149,7 +5199,8 @@
128.1041 +   tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack;
128.1042 +   tree record;
128.1043 + 
128.1044 +-  if (TARGET_SH5 || (! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI)
128.1045 ++  if (TARGET_SH5 || (! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI
128.1046 ++      || TARGET_NO_IMPLICIT_FP)
128.1047 +     return ptr_type_node;
128.1048 + 
128.1049 +   record = make_node (RECORD_TYPE);
128.1050 +@@ -5211,7 +5262,8 @@
128.1051 +       return;
128.1052 +     }
128.1053 + 
128.1054 +-  if ((! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI)
128.1055 ++  if ((! TARGET_SH3E && ! TARGET_SH4)
128.1056 ++      || TARGET_HITACHI || TARGET_NO_IMPLICIT_FP)
128.1057 +     {
128.1058 +       std_expand_builtin_va_start (stdarg_p, valist, nextarg);
128.1059 +       return;
128.1060 +@@ -5289,7 +5341,8 @@
128.1061 +   rsize = (size + UNITS_PER_WORD - 1) & -UNITS_PER_WORD;
128.1062 +   pptr_type_node = build_pointer_type (ptr_type_node);
128.1063 + 
128.1064 +-  if (! TARGET_SH5 && (TARGET_SH3E || TARGET_SH4) && ! TARGET_HITACHI)
128.1065 ++  if (! TARGET_SH5 && (TARGET_SH3E || TARGET_SH4)
128.1066 ++      && ! TARGET_HITACHI && ! TARGET_NO_IMPLICIT_FP)
128.1067 +     {
128.1068 +       tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack;
128.1069 +       tree next_o, next_o_limit, next_fp, next_fp_limit, next_stack;
128.1070 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh.h gcc-20030210/gcc/config/sh/sh.h
128.1071 +--- gcc-20030210.orig/gcc/config/sh/sh.h	Fri Feb 22 01:42:28 2002
128.1072 ++++ gcc-20030210/gcc/config/sh/sh.h	Sat Feb 22 01:40:14 2003
128.1073 +@@ -147,10 +147,10 @@
128.1074 + #define HARD_SH4_BIT	(1<<5)
128.1075 + #define FPU_SINGLE_BIT	(1<<7)
128.1076 + #define SH4_BIT	       	(1<<12)
128.1077 ++#define NO_IMPLICIT_FP_BIT	(1<<3)
128.1078 + #define FMOVD_BIT	(1<<4)
128.1079 + #define SH5_BIT		(1<<0)
128.1080 + #define SPACE_BIT 	(1<<13)
128.1081 +-#define BIGTABLE_BIT  	(1<<14)
128.1082 + #define RELAX_BIT	(1<<15)
128.1083 + #define USERMODE_BIT	(1<<16)
128.1084 + #define HITACHI_BIT     (1<<22)
128.1085 +@@ -205,6 +205,9 @@
128.1086 + /* Nonzero if we should generate code for a SH5 CPU (either ISA).  */
128.1087 + #define TARGET_SH5 (target_flags & SH5_BIT)
128.1088 + 
128.1089 ++/* Nonzero if we should not use FPU implicitly.  */
128.1090 ++#define TARGET_NO_IMPLICIT_FP (target_flags & NO_IMPLICIT_FP_BIT)
128.1091 ++
128.1092 + /* Nonzero if we should generate code using the SHcompact instruction
128.1093 +    set and 32-bit ABI.  */
128.1094 + #define TARGET_SHCOMPACT (TARGET_SH5 && TARGET_SH1)
128.1095 +@@ -225,6 +228,7 @@
128.1096 + 
128.1097 + /* Nonzero if we should generate code using SHmedia FPU instructions.  */
128.1098 + #define TARGET_SHMEDIA_FPU (TARGET_SHMEDIA && TARGET_FPU_DOUBLE)
128.1099 ++
128.1100 + /* Nonzero if we should generate fmovd.  */
128.1101 + #define TARGET_FMOVD (target_flags & FMOVD_BIT)
128.1102 + 
128.1103 +@@ -234,9 +238,6 @@
128.1104 + /* Nonzero if we should generate smaller code rather than faster code.  */
128.1105 + #define TARGET_SMALLCODE   (target_flags & SPACE_BIT)
128.1106 + 
128.1107 +-/* Nonzero to use long jump tables.  */
128.1108 +-#define TARGET_BIGTABLE     (target_flags & BIGTABLE_BIT)
128.1109 +-
128.1110 + /* Nonzero to generate pseudo-ops needed by the assembler and linker
128.1111 +    to do function call relaxing.  */
128.1112 + #define TARGET_RELAX (target_flags & RELAX_BIT)
128.1113 +@@ -297,7 +298,6 @@
128.1114 +   {"5-compact-nofpu", TARGET_NONE, "" },	\
128.1115 +   {"5-compact-nofpu", SH5_BIT|SH3_BIT|SH2_BIT|SH1_BIT, "Generate FPU-less SHcompact code" }, \
128.1116 +   {"b",		-LITTLE_ENDIAN_BIT, "" },  	\
128.1117 +-  {"bigtable", 	BIGTABLE_BIT, "" },		\
128.1118 +   {"dalign",  	DALIGN_BIT, "" },		\
128.1119 +   {"fmovd",  	FMOVD_BIT, "" },		\
128.1120 +   {"hitachi",	HITACHI_BIT, "" },		\
128.1121 +@@ -306,6 +306,7 @@
128.1122 +   {"isize", 	ISIZE_BIT, "" },		\
128.1123 +   {"l",		LITTLE_ENDIAN_BIT, "" },  	\
128.1124 +   {"no-ieee",  	-IEEE_BIT, "" },		\
128.1125 ++  {"no-implicit-fp", NO_IMPLICIT_FP_BIT, "" },	\
128.1126 +   {"padstruct", PADSTRUCT_BIT, "" },    	\
128.1127 +   {"prefergot",	PREFERGOT_BIT, "" },		\
128.1128 +   {"relax",	RELAX_BIT, "" },		\
128.1129 +@@ -2493,16 +2494,22 @@
128.1130 +     goto LABEL;								\
128.1131 + }
128.1132 + 
128.1133 ++extern int optimize; /* needed for gen_casesi.  */
128.1134 ++extern int optimize_size;
128.1135 ++
128.1136 + /* Specify the machine mode that this machine uses
128.1137 +    for the index in the tablejump instruction.  */
128.1138 +-#define CASE_VECTOR_MODE (TARGET_BIGTABLE ? SImode : HImode)
128.1139 ++#define CASE_VECTOR_MODE SImode
128.1140 + 
128.1141 + #define CASE_VECTOR_SHORTEN_MODE(MIN_OFFSET, MAX_OFFSET, BODY) \
128.1142 + ((MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 127 \
128.1143 +  ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 0, QImode) \
128.1144 +  : (MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 255 \
128.1145 +  ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 1, QImode) \
128.1146 +- : (MIN_OFFSET) >= -32768 && (MAX_OFFSET) <= 32767 ? HImode \
128.1147 ++ : (MIN_OFFSET) >= -32768 && (MAX_OFFSET) <= 32767 \
128.1148 ++ ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 0, HImode) \
128.1149 ++ : optimize_size && (MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 65535 \
128.1150 ++ ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 1, HImode) \
128.1151 +  : SImode)
128.1152 + 
128.1153 + /* Define as C expression which evaluates to nonzero if the tablejump
128.1154 +@@ -3038,10 +3045,7 @@
128.1155 + /* Output an absolute table element.  */
128.1156 + 
128.1157 + #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE)  				\
128.1158 +-  if (TARGET_BIGTABLE) 							\
128.1159 +-    asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE)); 			\
128.1160 +-  else									\
128.1161 +-    asm_fprintf ((STREAM), "\t.word\t%LL%d\n", (VALUE)); 			\
128.1162 ++    asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE))
128.1163 + 
128.1164 + /* Output various types of constants.  */
128.1165 + 
128.1166 +@@ -3167,8 +3171,6 @@
128.1167 + #define sh_cpu_attr ((enum attr_cpu)sh_cpu)
128.1168 + extern enum processor_type sh_cpu;
128.1169 + 
128.1170 +-extern int optimize; /* needed for gen_casesi.  */
128.1171 +-
128.1172 + enum mdep_reorg_phase_e
128.1173 + {
128.1174 +   SH_BEFORE_MDEP_REORG,
128.1175 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh.md gcc-20030210/gcc/config/sh/sh.md
128.1176 +--- gcc-20030210.orig/gcc/config/sh/sh.md	Sat Nov 23 04:58:06 2002
128.1177 ++++ gcc-20030210/gcc/config/sh/sh.md	Sat Feb 22 01:40:14 2003
128.1178 +@@ -1242,7 +1242,7 @@
128.1179 +    (clobber (reg:SI PR_REG))
128.1180 +    (clobber (reg:SI R4_REG))
128.1181 +    (use (match_operand:SI 1 "arith_reg_operand" "r"))]
128.1182 +-  "TARGET_SH1 && ! TARGET_SH4"
128.1183 ++  "TARGET_SH1 && ! TARGET_SH4 || TARGET_NO_IMPLICIT_FP"
128.1184 +   "jsr	@%1%#"
128.1185 +   [(set_attr "type" "sfunc")
128.1186 +    (set_attr "needs_delay_slot" "yes")])
128.1187 +@@ -1336,7 +1336,7 @@
128.1188 + 
128.1189 +   operands[3] = gen_reg_rtx (Pmode);
128.1190 +   /* Emit the move of the address to a pseudo outside of the libcall.  */
128.1191 +-  if (TARGET_HARD_SH4 && TARGET_SH3E)
128.1192 ++  if (TARGET_HARD_SH4 && TARGET_SH3E && !TARGET_NO_IMPLICIT_FP)
128.1193 +     {
128.1194 +       emit_move_insn (operands[3],
128.1195 + 		      gen_rtx_SYMBOL_REF (SImode, \"__udivsi3_i4\"));
128.1196 +@@ -1391,7 +1391,7 @@
128.1197 +    (clobber (reg:SI R2_REG))
128.1198 +    (clobber (reg:SI R3_REG))
128.1199 +    (use (match_operand:SI 1 "arith_reg_operand" "r"))]
128.1200 +-  "TARGET_SH1 && ! TARGET_SH4"
128.1201 ++  "TARGET_SH1 && ! TARGET_SH4 || TARGET_NO_IMPLICIT_FP"
128.1202 +   "jsr	@%1%#"
128.1203 +   [(set_attr "type" "sfunc")
128.1204 +    (set_attr "needs_delay_slot" "yes")])
128.1205 +@@ -1476,7 +1476,7 @@
128.1206 + 
128.1207 +   operands[3] = gen_reg_rtx (Pmode);
128.1208 +   /* Emit the move of the address to a pseudo outside of the libcall.  */
128.1209 +-  if (TARGET_HARD_SH4 && TARGET_SH3E)
128.1210 ++  if (TARGET_HARD_SH4 && TARGET_SH3E && !TARGET_NO_IMPLICIT_FP)
128.1211 +     {
128.1212 +       emit_move_insn (operands[3],
128.1213 + 		      gen_rtx_SYMBOL_REF (SImode, \"__sdivsi3_i4\"));
128.1214 +@@ -6446,6 +6446,8 @@
128.1215 +     case SImode:
128.1216 +       return \"shll2	%1\;mov.l	@(r0,%1),%0\";
128.1217 +     case HImode:
128.1218 ++      if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
128.1219 ++	return \"add	%1,%1\;mov.w	@(r0,%1),%0\;extu.w	%0,%0\";
128.1220 +       return \"add	%1,%1\;mov.w	@(r0,%1),%0\";
128.1221 +     case QImode:
128.1222 +       if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
128.1223 +@@ -6455,7 +6457,15 @@
128.1224 +       abort ();
128.1225 +     }
128.1226 + }"
128.1227 +-  [(set_attr "length" "4")])
128.1228 ++  [(set (attr "length")
128.1229 ++	(cond [(eq (symbol_ref "shl_casesi_worker_length (insn)") (const_int 1))
128.1230 ++	       (const_string "2")
128.1231 ++	       (eq (symbol_ref "shl_casesi_worker_length (insn)") (const_int 2))
128.1232 ++	       (const_string "4")
128.1233 ++	       ;; Put "match_dup" here so that insn_variable_length_p return 1.
128.1234 ++	       (ne (match_dup 2) (match_dup 2))
128.1235 ++	       (const_string "4")]
128.1236 ++	      (const_string "6")))])
128.1237 + 
128.1238 + (define_insn "casesi_shift_media"
128.1239 +   [(set (match_operand 0 "arith_reg_operand" "=r")
128.1240 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh3-linux.h gcc-20030210/gcc/config/sh/sh3-linux.h
128.1241 +--- gcc-20030210.orig/gcc/config/sh/sh3-linux.h	Thu Jan  1 09:00:00 1970
128.1242 ++++ gcc-20030210/gcc/config/sh/sh3-linux.h	Sat Feb 22 01:40:14 2003
128.1243 +@@ -0,0 +1,29 @@
128.1244 ++#undef TARGET_VERSION
128.1245 ++#define TARGET_VERSION  fputs (" (SH3 GNU/Linux with ELF)", stderr);
128.1246 ++
128.1247 ++#undef CPP_SPEC
128.1248 ++#define CPP_SPEC \
128.1249 ++  "-D__LITTLE_ENDIAN__ \
128.1250 ++   -D__SH3__ -D__sh3__ \
128.1251 ++   -D__SIZE_TYPE__=unsigned\\ int \
128.1252 ++   -D__PTRDIFF_TYPE__=int \
128.1253 ++   %{fPIC:-D__PIC__ -D__pic__} \
128.1254 ++   %{fpic:-D__PIC__ -D__pic__} \
128.1255 ++   %{posix:-D_POSIX_SOURCE} \
128.1256 ++   %{pthread:-D_REENTRANT -D_PTHREADS}"
128.1257 ++
128.1258 ++#undef ASM_SPEC
128.1259 ++#define ASM_SPEC  "%{mrelax:-relax}"
128.1260 ++
128.1261 ++#undef CC1_SPEC
128.1262 ++#define CC1_SPEC \
128.1263 ++  "-musermode -ml -m3 %{profile:-p}"
128.1264 ++
128.1265 ++#undef LINK_SPEC
128.1266 ++#define LINK_SPEC \
128.1267 ++  "%{mrelax:-relax} \
128.1268 ++   %{shared:-shared} \
128.1269 ++   %{!static: \
128.1270 ++     %{rdynamic:-export-dynamic} \
128.1271 ++     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
128.1272 ++    %{static:-static}"
128.1273 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh3eb-linux.h gcc-20030210/gcc/config/sh/sh3eb-linux.h
128.1274 +--- gcc-20030210.orig/gcc/config/sh/sh3eb-linux.h	Thu Jan  1 09:00:00 1970
128.1275 ++++ gcc-20030210/gcc/config/sh/sh3eb-linux.h	Sat Feb 22 01:40:14 2003
128.1276 +@@ -0,0 +1,29 @@
128.1277 ++#undef TARGET_VERSION
128.1278 ++#define TARGET_VERSION  fputs (" (SH3EB GNU/Linux with ELF)", stderr);
128.1279 ++
128.1280 ++#undef CPP_SPEC
128.1281 ++#define CPP_SPEC \
128.1282 ++  "-D__BIG_ENDIAN__ \
128.1283 ++   -D__SH3__ -D__sh3__ \
128.1284 ++   -D__SIZE_TYPE__=unsigned\\ int \
128.1285 ++   -D__PTRDIFF_TYPE__=int \
128.1286 ++   %{fPIC:-D__PIC__ -D__pic__} \
128.1287 ++   %{fpic:-D__PIC__ -D__pic__} \
128.1288 ++   %{posix:-D_POSIX_SOURCE} \
128.1289 ++   %{pthread:-D_REENTRANT -D_PTHREADS}"
128.1290 ++
128.1291 ++#undef ASM_SPEC
128.1292 ++#define ASM_SPEC  "%{mrelax:-relax}"
128.1293 ++
128.1294 ++#undef CC1_SPEC
128.1295 ++#define CC1_SPEC \
128.1296 ++  "-musermode -mb -m3 %{profile:-p}"
128.1297 ++
128.1298 ++#undef LINK_SPEC
128.1299 ++#define LINK_SPEC \
128.1300 ++  "%{mrelax:-relax} \
128.1301 ++   %{shared:-shared} \
128.1302 ++   %{!static: \
128.1303 ++     %{rdynamic:-export-dynamic} \
128.1304 ++     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
128.1305 ++    %{static:-static}"
128.1306 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh4-linux.h gcc-20030210/gcc/config/sh/sh4-linux.h
128.1307 +--- gcc-20030210.orig/gcc/config/sh/sh4-linux.h	Thu Jan  1 09:00:00 1970
128.1308 ++++ gcc-20030210/gcc/config/sh/sh4-linux.h	Sat Feb 22 01:40:14 2003
128.1309 +@@ -0,0 +1,29 @@
128.1310 ++#undef TARGET_VERSION
128.1311 ++#define TARGET_VERSION  fputs (" (SH4 GNU/Linux with ELF)", stderr);
128.1312 ++
128.1313 ++#undef CPP_SPEC
128.1314 ++#define CPP_SPEC \
128.1315 ++  "-D__LITTLE_ENDIAN__ \
128.1316 ++   -D__SH4__ \
128.1317 ++   -D__SIZE_TYPE__=unsigned\\ int \
128.1318 ++   -D__PTRDIFF_TYPE__=int \
128.1319 ++   %{fPIC:-D__PIC__ -D__pic__} \
128.1320 ++   %{fpic:-D__PIC__ -D__pic__} \
128.1321 ++   %{posix:-D_POSIX_SOURCE} \
128.1322 ++   %{pthread:-D_REENTRANT -D_PTHREADS}"
128.1323 ++
128.1324 ++#undef ASM_SPEC
128.1325 ++#define ASM_SPEC  "%{mrelax:-relax}"
128.1326 ++
128.1327 ++#undef CC1_SPEC
128.1328 ++#define CC1_SPEC \
128.1329 ++  "-musermode -ml -m4 %{profile:-p}"
128.1330 ++
128.1331 ++#undef LINK_SPEC
128.1332 ++#define LINK_SPEC \
128.1333 ++  "%{mrelax:-relax} \
128.1334 ++   %{shared:-shared} \
128.1335 ++   %{!static: \
128.1336 ++     %{rdynamic:-export-dynamic} \
128.1337 ++     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
128.1338 ++    %{static:-static}"
128.1339 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh4eb-linux.h gcc-20030210/gcc/config/sh/sh4eb-linux.h
128.1340 +--- gcc-20030210.orig/gcc/config/sh/sh4eb-linux.h	Thu Jan  1 09:00:00 1970
128.1341 ++++ gcc-20030210/gcc/config/sh/sh4eb-linux.h	Sat Feb 22 01:40:14 2003
128.1342 +@@ -0,0 +1,29 @@
128.1343 ++#undef TARGET_VERSION
128.1344 ++#define TARGET_VERSION  fputs (" (SH4EB GNU/Linux with ELF)", stderr);
128.1345 ++
128.1346 ++#undef CPP_SPEC
128.1347 ++#define CPP_SPEC \
128.1348 ++  "-D__BIG_ENDIAN__ \
128.1349 ++   -D__SH4__ \
128.1350 ++   -D__SIZE_TYPE__=unsigned\\ int \
128.1351 ++   -D__PTRDIFF_TYPE__=int \
128.1352 ++   %{fPIC:-D__PIC__ -D__pic__} \
128.1353 ++   %{fpic:-D__PIC__ -D__pic__} \
128.1354 ++   %{posix:-D_POSIX_SOURCE} \
128.1355 ++   %{pthread:-D_REENTRANT -D_PTHREADS}"
128.1356 ++
128.1357 ++#undef ASM_SPEC
128.1358 ++#define ASM_SPEC  "%{mrelax:-relax}"
128.1359 ++
128.1360 ++#undef CC1_SPEC
128.1361 ++#define CC1_SPEC \
128.1362 ++  "-musermode -mb -m4 %{profile:-p}"
128.1363 ++
128.1364 ++#undef LINK_SPEC
128.1365 ++#define LINK_SPEC \
128.1366 ++  "%{mrelax:-relax} \
128.1367 ++   %{shared:-shared} \
128.1368 ++   %{!static: \
128.1369 ++     %{rdynamic:-export-dynamic} \
128.1370 ++     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
128.1371 ++    %{static:-static}"
128.1372 +diff -ruN gcc-20030210.orig/gcc/config/sh/t-linux gcc-20030210/gcc/config/sh/t-linux
128.1373 +--- gcc-20030210.orig/gcc/config/sh/t-linux	Thu May 17 12:16:12 2001
128.1374 ++++ gcc-20030210/gcc/config/sh/t-linux	Sat Feb 22 01:40:14 2003
128.1375 +@@ -1,10 +1,20 @@
128.1376 +-TARGET_LIBGCC2_CFLAGS = -fpic
128.1377 ++TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
128.1378 ++LIBGCC1 = libgcc1-asm.a
128.1379 ++CROSS_LIBGCC1 = libgcc1-asm.a
128.1380 ++LIBGCC1_TEST = libgcc1-test
128.1381 + LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \
128.1382 +   _movstr_i4 _mulsi3 _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
128.1383 +   _ic_invalidate
128.1384 ++LIB2ADDEH = $(srcdir)/unwind-sjlj.c
128.1385 ++LIB2ADDEHDEP = unwind.inc unwind-sjlj.c
128.1386 + 
128.1387 +-MULTILIB_OPTIONS= mb m3e/m4
128.1388 ++MULTILIB_OPTIONS= mb m4
128.1389 + MULTILIB_DIRNAMES= 
128.1390 + MULTILIB_MATCHES = 
128.1391 + 
128.1392 +-EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o
128.1393 ++EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
128.1394 ++
128.1395 ++# Override t-slibgcc-elf-ver to export some libgcc symbols with
128.1396 ++# the symbol versions that glibc used and SH specific.
128.1397 ++SHLIB_MAPFILES =  $(srcdir)/libgcc-std.ver \
128.1398 ++		  $(srcdir)/config/sh/libgcc-glibc.ver
128.1399 +diff -ruN gcc-20030210.orig/gcc/config/sh/t-linux-nomulti gcc-20030210/gcc/config/sh/t-linux-nomulti
128.1400 +--- gcc-20030210.orig/gcc/config/sh/t-linux-nomulti	Thu Jan  1 09:00:00 1970
128.1401 ++++ gcc-20030210/gcc/config/sh/t-linux-nomulti	Sat Feb 22 01:40:14 2003
128.1402 +@@ -0,0 +1,9 @@
128.1403 ++LIBGCC = libgcc.a
128.1404 ++EXTRA_PARTS = crtbegin.o crtbeginS.o crtend.o crtendS.o crtbeginT.o
128.1405 ++
128.1406 ++INSTALL_LIBGCC = install-libgcc
128.1407 ++
128.1408 ++MULTILIB_OPTIONS=
128.1409 ++MULTILIB_DIRNAMES= 
128.1410 ++MULTILIB_MATCHES = 
128.1411 ++EXTRA_MULTILIB_PARTS=
128.1412 +diff -ruN gcc-20030210.orig/gcc/config.gcc gcc-20030210/gcc/config.gcc
128.1413 +--- gcc-20030210.orig/gcc/config.gcc	Fri Jan 31 19:17:13 2003
128.1414 ++++ gcc-20030210/gcc/config.gcc	Sat Feb 22 01:40:14 2003
128.1415 +@@ -337,9 +337,9 @@
128.1416 + sparc*-*-*)
128.1417 + 	cpu_type=sparc
128.1418 + 	;;
128.1419 +-sh64-*-*)
128.1420 +-	cpu_type=sh
128.1421 +-	;;
128.1422 ++sh*-*-*)
128.1423 ++ 	cpu_type=sh
128.1424 ++ 	;;
128.1425 + esac
128.1426 + 
128.1427 + tm_file=${cpu_type}/${cpu_type}.h
128.1428 +@@ -3018,9 +3018,31 @@
128.1429 + 	  thread_file='rtems'
128.1430 + 	fi
128.1431 + 	;;
128.1432 +-sh-*-linux*)
128.1433 ++sh*-*-linux*)
128.1434 + 	tm_file="${tm_file} sh/elf.h sh/linux.h"
128.1435 +-	tmake_file="sh/t-sh sh/t-elf sh/t-linux"
128.1436 ++	tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux sh/t-linux"
128.1437 ++	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
128.1438 ++	case $machine in
128.1439 ++		sh3eb-*)
128.1440 ++			tm_file="${tm_file} sh/sh3eb-linux.h"
128.1441 ++			tmake_file="${tmake_file} sh/t-linux-nomulti"
128.1442 ++			;;
128.1443 ++		sh4eb-*)
128.1444 ++			tm_file="${tm_file} sh/sh4eb-linux.h"
128.1445 ++			tmake_file="${tmake_file} sh/t-linux-nomulti"
128.1446 ++			;;
128.1447 ++		sh3-*)
128.1448 ++			tm_file="${tm_file} sh/sh3-linux.h"
128.1449 ++			tmake_file="${tmake_file} sh/t-linux-nomulti"
128.1450 ++			;;
128.1451 ++		sh4-*)
128.1452 ++			tm_file="${tm_file} sh/sh4-linux.h"
128.1453 ++			tmake_file="${tmake_file} sh/t-linux-nomulti"
128.1454 ++			;;
128.1455 ++		*)
128.1456 ++			;;
128.1457 ++	esac
128.1458 ++	xmake_file=x-linux
128.1459 + 	gas=yes gnu_ld=yes
128.1460 + 	float_format=sh
128.1461 + 	;;
128.1462 +diff -ruN gcc-20030210.orig/gcc/dwarf2out.c gcc-20030210/gcc/dwarf2out.c
128.1463 +--- gcc-20030210.orig/gcc/dwarf2out.c	Mon Feb 10 19:36:25 2003
128.1464 ++++ gcc-20030210/gcc/dwarf2out.c	Sat Feb 22 01:40:14 2003
128.1465 +@@ -10224,7 +10224,9 @@
128.1466 + 	  /* We can have a normal definition following an inline one in the
128.1467 + 	     case of redefinition of GNU C extern inlines.
128.1468 + 	     It seems reasonable to use AT_specification in this case.  */
128.1469 +-	  && !get_AT_unsigned (old_die, DW_AT_inline))
128.1470 ++	  && !get_AT_unsigned (old_die, DW_AT_inline)
128.1471 ++	  /* Skip the nested function.  */
128.1472 ++	  && !decl_function_context (decl))
128.1473 + 	{
128.1474 + 	  /* ??? This can happen if there is a bug in the program, for
128.1475 + 	     instance, if it has duplicate function definitions.  Ideally,
128.1476 +diff -ruN gcc-20030210.orig/gcc/final.c gcc-20030210/gcc/final.c
128.1477 +--- gcc-20030210.orig/gcc/final.c	Fri Jan 31 19:17:20 2003
128.1478 ++++ gcc-20030210/gcc/final.c	Sat Feb 22 01:40:14 2003
128.1479 +@@ -1128,7 +1128,7 @@
128.1480 + 	    }
128.1481 + 	}
128.1482 + 
128.1483 +-      INSN_ADDRESSES (uid) = insn_current_address;
128.1484 ++      INSN_ADDRESSES (uid) = insn_current_address + insn_lengths[uid];
128.1485 + 
128.1486 +       if (GET_CODE (insn) == NOTE || GET_CODE (insn) == BARRIER
128.1487 + 	  || GET_CODE (insn) == CODE_LABEL)
128.1488 +diff -ruN gcc-20030210.orig/gcc/mkmap-symver.awk gcc-20030210/gcc/mkmap-symver.awk
128.1489 +--- gcc-20030210.orig/gcc/mkmap-symver.awk	Fri Jan 31 19:17:26 2003
128.1490 ++++ gcc-20030210/gcc/mkmap-symver.awk	Sat Feb 22 01:40:14 2003
128.1491 +@@ -89,7 +89,11 @@
128.1492 +     output(inherit[lib]);
128.1493 + 
128.1494 +   printf("%s {\n", lib);
128.1495 +-  printf("  global:\n");
128.1496 ++  for (sym in ver)
128.1497 ++    if ((ver[sym] == lib) && (sym in def))
128.1498 ++      count++;
128.1499 ++  if (count > 0)
128.1500 ++    printf("  global:\n");
128.1501 +   for (sym in ver)
128.1502 +     if ((ver[sym] == lib) && (sym in def))
128.1503 +       {
128.1504 +diff -ruN gcc-20030210.orig/gcc/reload1.c gcc-20030210/gcc/reload1.c
128.1505 +--- gcc-20030210.orig/gcc/reload1.c	Fri Jan 31 19:17:29 2003
128.1506 ++++ gcc-20030210/gcc/reload1.c	Sat Feb 22 01:40:14 2003
128.1507 +@@ -6103,6 +6103,7 @@
128.1508 + 	    for (j = 0; j < n_reloads; j++)
128.1509 + 	      if (rld[j].in != 0
128.1510 + 		  && rld[j].when_needed != RELOAD_OTHER
128.1511 ++		  && rld[j].when_needed != RELOAD_FOR_OUTPUT_ADDRESS
128.1512 + 		  && reg_overlap_mentioned_for_reload_p (rld[j].in,
128.1513 + 							 rld[i].in))
128.1514 + 		rld[j].when_needed
128.1515 +diff -ruN gcc-20030210.orig/gcc/reorg.c gcc-20030210/gcc/reorg.c
128.1516 +--- gcc-20030210.orig/gcc/reorg.c	Fri Jan 31 19:17:30 2003
128.1517 ++++ gcc-20030210/gcc/reorg.c	Sat Feb 22 01:40:14 2003
128.1518 +@@ -3265,6 +3265,14 @@
128.1519 + 		|| condjump_in_parallel_p (XVECEXP (PATTERN (insn), 0, 0))))
128.1520 + 	continue;
128.1521 + 
128.1522 ++#ifdef MD_CAN_REDIRECT_BRANCH
128.1523 ++      /* On some targets, branches with delay slots can have a limited
128.1524 ++	 displacement.  Give the back end a chance to tell us we can't do
128.1525 ++	 this.  */
128.1526 ++      if (! MD_CAN_REDIRECT_BRANCH (insn, delay_insn))
128.1527 ++	continue;
128.1528 ++#endif
128.1529 ++
128.1530 +       target_label = JUMP_LABEL (delay_insn);
128.1531 + 
128.1532 +       if (target_label)
128.1533 +diff -ruN gcc-20030210.orig/gcc/tree-inline.c gcc-20030210/gcc/tree-inline.c
128.1534 +--- gcc-20030210.orig/gcc/tree-inline.c	Fri Jan 31 19:17:33 2003
128.1535 ++++ gcc-20030210/gcc/tree-inline.c	Sat Feb 22 01:40:14 2003
128.1536 +@@ -836,11 +836,17 @@
128.1537 + 
128.1538 +   /* Don't try to inline functions that are not well-suited to
128.1539 +      inlining.  */
128.1540 +-  if (!inlinable_function_p (fn, id))
128.1541 +-    return NULL_TREE;
128.1542 ++  if (! inlinable_function_p (fn, id)
128.1543 ++      || ! (*lang_hooks.tree_inlining.start_inlining) (fn))
128.1544 ++    {
128.1545 ++      if (DECL_INLINE (fn) && warn_inline && ! flag_really_no_inline)
128.1546 ++	{
128.1547 ++	  warning_with_decl (fn, "inlining failed in call to `%s'");
128.1548 ++	  warning ("called from here");
128.1549 ++	}
128.1550 + 
128.1551 +-  if (! (*lang_hooks.tree_inlining.start_inlining) (fn))
128.1552 +-    return NULL_TREE;
128.1553 ++      return NULL_TREE;
128.1554 ++    }
128.1555 + 
128.1556 +   /* Set the current filename and line number to the function we are
128.1557 +      inlining so that when we create new _STMT nodes here they get
128.1558 +diff -ruN gcc-20030210.orig/libjava/Makefile.in gcc-20030210/libjava/Makefile.in
128.1559 +--- gcc-20030210.orig/libjava/Makefile.in	Tue Jan 28 10:44:37 2003
128.1560 ++++ gcc-20030210/libjava/Makefile.in	Sat Feb 22 01:40:14 2003
128.1561 +@@ -1637,6 +1637,7 @@
128.1562 + 	"AS=$(AS)" \
128.1563 + 	"CC=$(CC)" \
128.1564 + 	"CXX=$(CXX)" \
128.1565 ++	"GCJ=$(GCJ)" \
128.1566 + 	"LD=$(LD)" \
128.1567 + 	"LIBCFLAGS=$(LIBCFLAGS)" \
128.1568 + 	"NM=$(NM)" \
128.1569 +diff -ruN gcc-20030210.orig/libjava/configure gcc-20030210/libjava/configure
128.1570 +--- gcc-20030210.orig/libjava/configure	Tue Jan 28 10:44:37 2003
128.1571 ++++ gcc-20030210/libjava/configure	Sat Feb 22 01:42:11 2003
128.1572 +@@ -2031,7 +2031,7 @@
128.1573 + # This must be Linux ELF.
128.1574 + linux-gnu*)
128.1575 +   case $host_cpu in
128.1576 +-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
128.1577 ++  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
128.1578 +     lt_cv_deplibs_check_method=pass_all ;;
128.1579 +   *)
128.1580 +     # glibc up to 2.1.1 does not perform some relocations on ARM
128.1581 +diff -ruN gcc-20030210.orig/libjava/java/net/natInetAddress.cc gcc-20030210/libjava/java/net/natInetAddress.cc
128.1582 +--- gcc-20030210.orig/libjava/java/net/natInetAddress.cc	Tue Mar  5 05:02:19 2002
128.1583 ++++ gcc-20030210/libjava/java/net/natInetAddress.cc	Sat Feb 22 01:40:14 2003
128.1584 +@@ -56,7 +56,7 @@
128.1585 + #endif
128.1586 + 
128.1587 + #ifndef HAVE_GETHOSTNAME_DECL
128.1588 +-extern "C" int gethostname (char *name, int namelen);
128.1589 ++extern "C" int gethostname (char *name, unsigned int namelen);
128.1590 + #endif
128.1591 + 
128.1592 + #ifdef DISABLE_JAVA_NET
128.1593 +diff -ruN gcc-20030210.orig/libjava/libltdl/aclocal.m4 gcc-20030210/libjava/libltdl/aclocal.m4
128.1594 +--- gcc-20030210.orig/libjava/libltdl/aclocal.m4	Sun Sep 10 17:04:40 2000
128.1595 ++++ gcc-20030210/libjava/libltdl/aclocal.m4	Sat Feb 22 01:40:14 2003
128.1596 +@@ -573,7 +573,7 @@
128.1597 + # This must be Linux ELF.
128.1598 + linux-gnu*)
128.1599 +   case "$host_cpu" in
128.1600 +-  alpha* | i*86 | powerpc* | sparc* | ia64* )
128.1601 ++  alpha* | i*86 | powerpc* | sparc* | ia64* | sh*)
128.1602 +     lt_cv_deplibs_check_method=pass_all ;;
128.1603 +   *)
128.1604 +     # glibc up to 2.1.1 does not perform some relocations on ARM
128.1605 +diff -ruN gcc-20030210.orig/libjava/sysdep/sh/locks.h gcc-20030210/libjava/sysdep/sh/locks.h
128.1606 +--- gcc-20030210.orig/libjava/sysdep/sh/locks.h	Thu Jan  1 09:00:00 1970
128.1607 ++++ gcc-20030210/libjava/sysdep/sh/locks.h	Sat Feb 22 01:40:14 2003
128.1608 +@@ -0,0 +1,72 @@
128.1609 ++// locks.h - Thread synchronization primitives. SuperH implementation.
128.1610 ++
128.1611 ++/* Copyright (C) 2002  Free Software Foundation
128.1612 ++
128.1613 ++   This file is part of libgcj.
128.1614 ++
128.1615 ++This software is copyrighted work licensed under the terms of the
128.1616 ++Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
128.1617 ++details.  */
128.1618 ++
128.1619 ++#ifndef __SYSDEP_LOCKS_H__
128.1620 ++#define __SYSDEP_LOCKS_H__
128.1621 ++
128.1622 ++typedef size_t obj_addr_t;	/* Integer type big enough for object	*/
128.1623 ++				/* address.				*/
128.1624 ++
128.1625 ++static unsigned char __cas_lock = 0;
128.1626 ++
128.1627 ++inline static void
128.1628 ++__cas_start_atomic (void)
128.1629 ++{
128.1630 ++  unsigned int val;
128.1631 ++
128.1632 ++  do
128.1633 ++    __asm__ __volatile__ ("tas.b @%1; movt %0"
128.1634 ++			  : "=r" (val)
128.1635 ++			  : "r" (&__cas_lock)
128.1636 ++			  : "memory");
128.1637 ++  while (val == 0);
128.1638 ++}
128.1639 ++
128.1640 ++inline static void
128.1641 ++__cas_end_atomic (void)
128.1642 ++{
128.1643 ++  __asm__ __volatile__ (" " : : : "memory");
128.1644 ++  __cas_lock = 0;
128.1645 ++}
128.1646 ++
128.1647 ++inline static bool
128.1648 ++compare_and_swap (volatile obj_addr_t *addr, obj_addr_t old,
128.1649 ++		  obj_addr_t new_val)
128.1650 ++{
128.1651 ++  bool ret;
128.1652 ++
128.1653 ++  __cas_start_atomic ();
128.1654 ++  if (*addr != old)
128.1655 ++    ret = false;
128.1656 ++  else
128.1657 ++    {
128.1658 ++      *addr = new_val;
128.1659 ++      ret = true;
128.1660 ++    }
128.1661 ++  __cas_end_atomic ();
128.1662 ++
128.1663 ++  return ret;
128.1664 ++}
128.1665 ++
128.1666 ++inline static void
128.1667 ++release_set (volatile obj_addr_t *addr, obj_addr_t new_val)
128.1668 ++{
128.1669 ++  __asm__ __volatile__ (" " : : : "memory");
128.1670 ++  *(addr) = new_val;
128.1671 ++}
128.1672 ++
128.1673 ++inline static bool
128.1674 ++compare_and_swap_release (volatile obj_addr_t *addr, obj_addr_t old,
128.1675 ++			  obj_addr_t new_val)
128.1676 ++{
128.1677 ++  return compare_and_swap (addr, old, new_val);
128.1678 ++}
128.1679 ++
128.1680 ++#endif /* ! __SYSDEP_LOCKS_H__ */
128.1681 +diff -ruN gcc-20030210.orig/libstdc++-v3/acinclude.m4 gcc-20030210/libstdc++-v3/acinclude.m4
128.1682 +--- gcc-20030210.orig/libstdc++-v3/acinclude.m4	Tue Jan 28 02:30:41 2003
128.1683 ++++ gcc-20030210/libstdc++-v3/acinclude.m4	Sat Feb 22 01:40:14 2003
128.1684 +@@ -1828,9 +1828,10 @@
128.1685 +   GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
128.1686 + 
128.1687 +   # Passed down for canadian crosses.
128.1688 +-  if test x"$CANADIAN" = xyes; then
128.1689 +-    TOPLEVEL_INCLUDES='-I$(includedir)'
128.1690 +-  fi
128.1691 ++  #if test x"$CANADIAN" = xyes; then
128.1692 ++  #  TOPLEVEL_INCLUDES='-I$(includedir)'
128.1693 ++  #fi
128.1694 ++  TOPLEVEL_INCLUDES=''
128.1695 + 
128.1696 +   LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
128.1697 + 
128.1698 +diff -ruN gcc-20030210.orig/libstdc++-v3/aclocal.m4 gcc-20030210/libstdc++-v3/aclocal.m4
128.1699 +--- gcc-20030210.orig/libstdc++-v3/aclocal.m4	Mon Feb 10 19:36:47 2003
128.1700 ++++ gcc-20030210/libstdc++-v3/aclocal.m4	Sat Feb 22 01:40:14 2003
128.1701 +@@ -1840,9 +1840,10 @@
128.1702 +   GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
128.1703 + 
128.1704 +   # Passed down for canadian crosses.
128.1705 +-  if test x"$CANADIAN" = xyes; then
128.1706 +-    TOPLEVEL_INCLUDES='-I$(includedir)'
128.1707 +-  fi
128.1708 ++  #if test x"$CANADIAN" = xyes; then
128.1709 ++  #  TOPLEVEL_INCLUDES='-I$(includedir)'
128.1710 ++  #fi
128.1711 ++  TOPLEVEL_INCLUDES=''
128.1712 + 
128.1713 +   LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
128.1714 + 
128.1715 +diff -ruN gcc-20030210.orig/libstdc++-v3/configure gcc-20030210/libstdc++-v3/configure
128.1716 +--- gcc-20030210.orig/libstdc++-v3/configure	Mon Feb 10 19:37:17 2003
128.1717 ++++ gcc-20030210/libstdc++-v3/configure	Sat Feb 22 01:40:14 2003
128.1718 +@@ -1982,7 +1982,7 @@
128.1719 + # This must be Linux ELF.
128.1720 + linux-gnu*)
128.1721 +   case $host_cpu in
128.1722 +-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
128.1723 ++  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh*)
128.1724 +     lt_cv_deplibs_check_method=pass_all ;;
128.1725 +   *)
128.1726 +     # glibc up to 2.1.1 does not perform some relocations on ARM
128.1727 +@@ -22340,9 +22340,10 @@
128.1728 +   GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
128.1729 + 
128.1730 +   # Passed down for canadian crosses.
128.1731 +-  if test x"$CANADIAN" = xyes; then
128.1732 +-    TOPLEVEL_INCLUDES='-I$(includedir)'
128.1733 +-  fi
128.1734 ++  #if test x"$CANADIAN" = xyes; then
128.1735 ++  #  TOPLEVEL_INCLUDES='-I$(includedir)'
128.1736 ++  #fi
128.1737 ++  TOPLEVEL_INCLUDES=''
128.1738 + 
128.1739 +   LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
128.1740 + 
128.1741 +diff -ruN gcc-20030210.orig/libtool.m4 gcc-20030210/libtool.m4
128.1742 +--- gcc-20030210.orig/libtool.m4	Fri Jan 31 19:16:59 2003
128.1743 ++++ gcc-20030210/libtool.m4	Sat Feb 22 01:40:14 2003
128.1744 +@@ -597,7 +597,7 @@
128.1745 + # This must be Linux ELF.
128.1746 + linux-gnu*)
128.1747 +   case $host_cpu in
128.1748 +-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
128.1749 ++  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
128.1750 +     lt_cv_deplibs_check_method=pass_all ;;
128.1751 +   *)
128.1752 +     # glibc up to 2.1.1 does not perform some relocations on ARM
128.1753 +diff -ruN gcc-20030210.orig/zlib/configure gcc-20030210/zlib/configure
128.1754 +--- gcc-20030210.orig/zlib/configure	Tue Jan 28 10:44:15 2003
128.1755 ++++ gcc-20030210/zlib/configure	Sat Feb 22 01:40:14 2003
128.1756 +@@ -1571,7 +1571,7 @@
128.1757 + # This must be Linux ELF.
128.1758 + linux-gnu*)
128.1759 +   case $host_cpu in
128.1760 +-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
128.1761 ++  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
128.1762 +     lt_cv_deplibs_check_method=pass_all ;;
128.1763 +   *)
128.1764 +     # glibc up to 2.1.1 does not perform some relocations on ARM
   129.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   129.2 +++ b/patches/gcc/3.2.3/gcc-3.2.3-g++.exp.patch	Sat Feb 24 11:00:05 2007 +0000
   129.3 @@ -0,0 +1,98 @@
   129.4 +g++ testsuite fixes for cross-compilers, Dan Kegel, Ixia Communications, 12 July 2003
   129.5 +
   129.6 +The first hunk fixes the error
   129.7 +
   129.8 +/testsuite_flags: /testsuite_flags: No such file or directory
   129.9 +    while executing
  129.10 +"exec sh ${odir_v3}/testsuite_flags --build-includes"
  129.11 +    (procedure "g++_include_flags" line 21)
  129.12 +    invoked from within
  129.13 +"g++_include_flags [get_multilibs] "
  129.14 +    (procedure "g++_init" line 63)
  129.15 +    invoked from within
  129.16 +"${tool}_init $test_file_name"
  129.17 +    (procedure "runtest" line 19)
  129.18 +    invoked from within
  129.19 +"runtest $test_name"
  129.20 +    ("foreach" body line 42)
  129.21 +    invoked from within
  129.22 +...
  129.23 +make[1]: [check-g++] Error 1 (ignored)
  129.24 +
  129.25 +The fix isn't especially pretty, but it worked for me, and can't hurt the
  129.26 +more common native compiler case.  Maybe someone who knows the code better 
  129.27 +can come up with a better fix.
  129.28 +
  129.29 +The second hunk fixes the error
  129.30 +
  129.31 +sh: error while loading shared libraries: /opt/cegl-2.0/powerpc-405-linux-gnu/gcc-3.2.3-glibc-2.2.5/powerpc-405-linux-gnu/./lib/libdl.so.2: ELF file data encoding not little-endian
  129.32 +
  129.33 +when trying to compile g++ testcases (!); setting up
  129.34 +the shared library environment when running crosstests of g++ 
  129.35 +should either be done by a special board file, or by
  129.36 +setting up a remote chroot environment (see http://kegel.com/crosstool),
  129.37 +not by blithely setting LD_LIBRARY_PATH on the local system.
  129.38 +
  129.39 +--- gcc-3.2.3/gcc/testsuite/lib/g++.exp.old	Fri Jul 11 15:42:47 2003
  129.40 ++++ gcc-3.2.3/gcc/testsuite/lib/g++.exp	Sat Jul 12 12:57:07 2003
  129.41 +@@ -72,6 +72,8 @@
  129.42 + #
  129.43 + proc g++_include_flags { paths } {
  129.44 +     global srcdir
  129.45 ++    global objdir
  129.46 ++    global target_triplet
  129.47 +     global HAVE_LIBSTDCXX_V3
  129.48 +     global TESTING_IN_BUILD_TREE
  129.49 + 
  129.50 +@@ -90,6 +92,20 @@
  129.51 + 
  129.52 +     if { ${HAVE_LIBSTDCXX_V3} } {
  129.53 +       set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
  129.54 ++      if { $odir_v3 == "" } {
  129.55 ++          verbose "g++_include_flags: couldn't find libstdc++-v3 on first try, now looking in build directory $objdir"
  129.56 ++	  # first assume no multilibs
  129.57 ++          set odir_v3 [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
  129.58 ++      }
  129.59 ++      if { $odir_v3 == "" } {
  129.60 ++          verbose "g++_include_flags: couldn't find libstdc++-v3 on second try, trying multilib"
  129.61 ++	  # assume multilib only one level deep
  129.62 ++          set multisub [file tail $gccpath]
  129.63 ++          set odir_v3 [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
  129.64 ++      }
  129.65 ++      if { $odir_v3 == "" } {
  129.66 ++           error "Can't find libstdc++-v3"
  129.67 ++      }
  129.68 +       append flags [exec sh ${odir_v3}/testsuite_flags --build-includes]
  129.69 +     } else {
  129.70 +       set odir_v2 [lookfor_file ${gccpath} libstdc++]
  129.71 +@@ -192,16 +192,20 @@
  129.72 +       }
  129.73 +     }
  129.74 + 
  129.75 +-    # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
  129.76 +-    # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
  129.77 +-    # (for the 64-bit ABI).  The right way to do this would be to modify
  129.78 +-    # unix.exp -- but that's not an option since it's part of DejaGNU
  129.79 +-    # proper, so we do it here.  We really only need to do 
  129.80 +-    # this on IRIX, but it shouldn't hurt to do it anywhere else.
  129.81 +-    setenv  LD_LIBRARY_PATH     $ld_library_path
  129.82 +-    setenv  SHLIB_PATH          $ld_library_path
  129.83 +-    setenv  LD_LIBRARYN32_PATH  $ld_library_path
  129.84 +-    setenv  LD_LIBRARY64_PATH   $ld_library_path
  129.85 ++    if {![is_remote target]} {
  129.86 ++      # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
  129.87 ++      # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
  129.88 ++      # (for the 64-bit ABI).  The right way to do this would be to modify
  129.89 ++      # unix.exp -- but that's not an option since it's part of DejaGNU
  129.90 ++      # proper, so we do it here.  We really only need to do 
  129.91 ++      # this on IRIX, but it shouldn't hurt to do it anywhere else.
  129.92 ++
  129.93 ++      # Doing this causes us to be unable to run cross-compilers.
  129.94 ++      setenv  LD_LIBRARY_PATH     $ld_library_path
  129.95 ++      setenv  SHLIB_PATH          $ld_library_path
  129.96 ++      setenv  LD_LIBRARYN32_PATH  $ld_library_path
  129.97 ++      setenv  LD_LIBRARY64_PATH   $ld_library_path
  129.98 ++    }
  129.99 + 
 129.100 +     return "$flags"
 129.101 + }
   130.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   130.2 +++ b/patches/gcc/3.2.3/gcc-3.2.3-libffi-1.patch	Sat Feb 24 11:00:05 2007 +0000
   130.3 @@ -0,0 +1,6864 @@
   130.4 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/Makefile.am gcc/libffi/Makefile.am
   130.5 +--- gcc-3.2.2.orig/libffi/Makefile.am	Tue Jan 28 10:43:56 2003
   130.6 ++++ gcc/libffi/Makefile.am	Tue Jan 28 10:48:33 2003
   130.7 +@@ -8,14 +8,17 @@
   130.8 + 		src/mips/n32.s src/mips/o32.S src/mips/o32.s \
   130.9 + 		src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
  130.10 + 		src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
  130.11 ++		src/x86/ffi64.c src/x86/unix64.S \
  130.12 + 		src/alpha/ffi.c src/alpha/osf.S \
  130.13 + 		src/m68k/ffi.c src/m68k/sysv.S \
  130.14 + 		src/powerpc/ffi.c src/powerpc/sysv.S \
  130.15 + 		src/powerpc/ppc_closure.S src/powerpc/asm.h \
  130.16 + 		src/powerpc/ffi_darwin.c \
  130.17 + 		src/powerpc/darwin.S src/powerpc/aix.S \
  130.18 +-		src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \
  130.19 +-		src/arm/ffi.c src/arm/sysv.S
  130.20 ++		src/powerpc/darwin_closure.S src/powerpc/aix_closure.S \
  130.21 ++		src/arm/ffi.c src/arm/sysv.S \
  130.22 ++		src/s390/ffi.c src/s390/sysv.S \
  130.23 ++		src/sh/ffi.c src/sh/sysv.S
  130.24 + 
  130.25 + VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
  130.26 + 
  130.27 +@@ -83,6 +86,7 @@
  130.28 + ffitest_LDFLAGS = -shared-libgcc
  130.29 + 
  130.30 + TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
  130.31 ++TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S
  130.32 + TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
  130.33 + TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
  130.34 + TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S
  130.35 +@@ -91,9 +95,12 @@
  130.36 + TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
  130.37 + TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
  130.38 + TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
  130.39 +-TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S
  130.40 ++TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
  130.41 + TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
  130.42 + TARGET_SRC_ARM =  src/arm/sysv.S src/arm/ffi.c
  130.43 ++TARGET_SRC_S390 =  src/s390/sysv.S src/s390/ffi.c
  130.44 ++TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
  130.45 ++TARGET_SRC_SH =  src/sh/sysv.S src/sh/ffi.c
  130.46 + 
  130.47 + ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@)
  130.48 + ## Work around automake deficiency
  130.49 +@@ -103,6 +110,10 @@
  130.50 + libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
  130.51 + libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
  130.52 + endif
  130.53 ++if MIPS_LINUX
  130.54 ++libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
  130.55 ++libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
  130.56 ++endif
  130.57 + if MIPS_SGI
  130.58 + libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
  130.59 + libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
  130.60 +@@ -147,6 +158,18 @@
  130.61 + libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
  130.62 + libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
  130.63 + endif
  130.64 ++if S390
  130.65 ++libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
  130.66 ++libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
  130.67 ++endif
  130.68 ++if X86_64
  130.69 ++libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
  130.70 ++libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
  130.71 ++endif
  130.72 ++if SH
  130.73 ++libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
  130.74 ++libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
  130.75 ++endif
  130.76 + 
  130.77 + AM_CFLAGS = -fexceptions
  130.78 + 
  130.79 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/Makefile.in gcc/libffi/Makefile.in
  130.80 +--- gcc-3.2.2.orig/libffi/Makefile.in	Wed Jan 29 07:59:05 2003
  130.81 ++++ gcc/libffi/Makefile.in	Wed Jan 29 07:58:58 2003
  130.82 +@@ -91,14 +91,17 @@
  130.83 + 		src/mips/n32.s src/mips/o32.S src/mips/o32.s \
  130.84 + 		src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
  130.85 + 		src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
  130.86 ++		src/x86/ffi64.c src/x86/unix64.S \
  130.87 + 		src/alpha/ffi.c src/alpha/osf.S \
  130.88 + 		src/m68k/ffi.c src/m68k/sysv.S \
  130.89 + 		src/powerpc/ffi.c src/powerpc/sysv.S \
  130.90 + 		src/powerpc/ppc_closure.S src/powerpc/asm.h \
  130.91 + 		src/powerpc/ffi_darwin.c \
  130.92 + 		src/powerpc/darwin.S src/powerpc/aix.S \
  130.93 +-		src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \
  130.94 +-		src/arm/ffi.c src/arm/sysv.S
  130.95 ++		src/powerpc/darwin_closure.S src/powerpc/aix_closure.S \
  130.96 ++		src/arm/ffi.c src/arm/sysv.S \
  130.97 ++		src/s390/ffi.c src/s390/sysv.S \
  130.98 ++		src/sh/ffi.c src/sh/sysv.S
  130.99 + 
 130.100 + 
 130.101 + VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
 130.102 +@@ -162,6 +165,7 @@
 130.103 + ffitest_LDFLAGS = -shared-libgcc
 130.104 + 
 130.105 + TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
 130.106 ++TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S
 130.107 + TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
 130.108 + TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
 130.109 + TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S
 130.110 +@@ -170,14 +174,18 @@
 130.111 + TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
 130.112 + TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
 130.113 + TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
 130.114 +-TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S
 130.115 ++TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
 130.116 + TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
 130.117 + TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c
 130.118 ++TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c
 130.119 ++TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
 130.120 ++TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c
 130.121 + 
 130.122 + libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
 130.123 + 		src/raw_api.c src/java_raw_api.c
 130.124 + 
 130.125 + @MIPS_GCC_TRUE@libffi_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
 130.126 ++@MIPS_LINUX_TRUE@libffi_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
 130.127 + @MIPS_SGI_TRUE@libffi_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
 130.128 + @X86_TRUE@libffi_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
 130.129 + @X86_WIN32_TRUE@libffi_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
 130.130 +@@ -189,7 +197,11 @@
 130.131 + @POWERPC_AIX_TRUE@libffi_la_SOURCES = @POWERPC_AIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
 130.132 + @POWERPC_DARWIN_TRUE@libffi_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
 130.133 + @ARM_TRUE@libffi_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
 130.134 ++@S390_TRUE@libffi_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
 130.135 ++@X86_64_TRUE@libffi_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
 130.136 ++@SH_TRUE@libffi_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
 130.137 + @MIPS_GCC_TRUE@libffi_convenience_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
 130.138 ++@MIPS_LINUX_TRUE@libffi_convenience_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
 130.139 + @MIPS_SGI_TRUE@libffi_convenience_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
 130.140 + @X86_TRUE@libffi_convenience_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
 130.141 + @X86_WIN32_TRUE@libffi_convenience_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
 130.142 +@@ -201,6 +213,9 @@
 130.143 + @POWERPC_AIX_TRUE@libffi_convenience_la_SOURCES = @POWERPC_AIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
 130.144 + @POWERPC_DARWIN_TRUE@libffi_convenience_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
 130.145 + @ARM_TRUE@libffi_convenience_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
 130.146 ++@S390_TRUE@libffi_convenience_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
 130.147 ++@X86_64_TRUE@libffi_convenience_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
 130.148 ++@SH_TRUE@libfficonvenience_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
 130.149 + 
 130.150 + AM_CFLAGS = -fexceptions
 130.151 + 
 130.152 +@@ -208,7 +223,7 @@
 130.153 + 
 130.154 + INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
 130.155 + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 130.156 +-mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
 130.157 ++mkinstalldirs = $(SHELL) $(top_srcdir)/${libffi_basedir}/../mkinstalldirs
 130.158 + CONFIG_HEADER = fficonfig.h
 130.159 + CONFIG_CLEAN_FILES = 
 130.160 + LTLIBRARIES =  $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
 130.161 +@@ -220,10 +235,6 @@
 130.162 + LIBS = @LIBS@
 130.163 + libffi_convenience_la_LDFLAGS = 
 130.164 + libffi_convenience_la_LIBADD = 
 130.165 +-@POWERPC_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
 130.166 +-@POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
 130.167 +-@POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \
 130.168 +-@POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo
 130.169 + @ALPHA_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
 130.170 + @ALPHA_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
 130.171 + @ALPHA_TRUE@src/java_raw_api.lo src/alpha/ffi.lo src/alpha/osf.lo
 130.172 +@@ -234,12 +245,29 @@
 130.173 + @MIPS_GCC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
 130.174 + @MIPS_GCC_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
 130.175 + @MIPS_GCC_TRUE@src/mips/n32.lo
 130.176 +-@X86_WIN32_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
 130.177 +-@X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
 130.178 +-@X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo
 130.179 ++@S390_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.180 ++@S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.181 ++@S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo
 130.182 + @M68K_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.183 + @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.184 + @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
 130.185 ++@X86_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.186 ++@X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.187 ++@X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo
 130.188 ++@POWERPC_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
 130.189 ++@POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
 130.190 ++@POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \
 130.191 ++@POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo
 130.192 ++@MIPS_LINUX_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
 130.193 ++@MIPS_LINUX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
 130.194 ++@MIPS_LINUX_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo
 130.195 ++@X86_WIN32_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
 130.196 ++@X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
 130.197 ++@X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo
 130.198 ++@X86_64_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
 130.199 ++@X86_64_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
 130.200 ++@X86_64_TRUE@src/java_raw_api.lo src/x86/ffi64.lo src/x86/unix64.lo \
 130.201 ++@X86_64_TRUE@src/x86/ffi.lo src/x86/sysv.lo
 130.202 + @SPARC_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
 130.203 + @SPARC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
 130.204 + @SPARC_TRUE@src/java_raw_api.lo src/sparc/ffi.lo src/sparc/v8.lo \
 130.205 +@@ -247,62 +275,75 @@
 130.206 + @POWERPC_AIX_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
 130.207 + @POWERPC_AIX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
 130.208 + @POWERPC_AIX_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \
 130.209 +-@POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closures.lo
 130.210 +-@X86_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.211 +-@X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.212 +-@X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo
 130.213 +-@ARM_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.214 +-@ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.215 +-@ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo
 130.216 ++@POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closure.lo
 130.217 ++@MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
 130.218 ++@MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
 130.219 ++@MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
 130.220 ++@MIPS_SGI_TRUE@src/mips/n32.lo
 130.221 + @POWERPC_DARWIN_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
 130.222 + @POWERPC_DARWIN_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
 130.223 + @POWERPC_DARWIN_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \
 130.224 + @POWERPC_DARWIN_TRUE@src/powerpc/darwin.lo \
 130.225 + @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo
 130.226 +-@MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
 130.227 +-@MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
 130.228 +-@MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
 130.229 +-@MIPS_SGI_TRUE@src/mips/n32.lo
 130.230 ++@ARM_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.231 ++@ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.232 ++@ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo
 130.233 ++@SH_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.234 ++@SH_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.235 ++@SH_TRUE@src/sh/sysv.lo src/sh/ffi.lo
 130.236 + libffi_la_LIBADD = 
 130.237 ++@SH_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo src/types.lo \
 130.238 ++@SH_TRUE@src/raw_api.lo src/java_raw_api.lo src/sh/sysv.lo \
 130.239 ++@SH_TRUE@src/sh/ffi.lo
 130.240 ++@IA64_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.241 ++@IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.242 ++@IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo
 130.243 ++@X86_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo src/types.lo \
 130.244 ++@X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \
 130.245 ++@X86_TRUE@src/x86/sysv.lo
 130.246 + @POWERPC_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.247 + @POWERPC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.248 + @POWERPC_TRUE@src/powerpc/ffi.lo src/powerpc/sysv.lo \
 130.249 + @POWERPC_TRUE@src/powerpc/ppc_closure.lo
 130.250 +-@ALPHA_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.251 +-@ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.252 +-@ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo
 130.253 +-@IA64_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.254 +-@IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.255 +-@IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo
 130.256 +-@MIPS_GCC_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.257 +-@MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.258 +-@MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
 130.259 +-@X86_WIN32_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.260 +-@X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.261 +-@X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo
 130.262 +-@M68K_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.263 +-@M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.264 +-@M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
 130.265 ++@MIPS_LINUX_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.266 ++@MIPS_LINUX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.267 ++@MIPS_LINUX_TRUE@src/mips/ffi.lo src/mips/o32.lo
 130.268 + @SPARC_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.269 + @SPARC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.270 + @SPARC_TRUE@src/sparc/ffi.lo src/sparc/v8.lo src/sparc/v9.lo
 130.271 + @POWERPC_AIX_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.272 + @POWERPC_AIX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.273 + @POWERPC_AIX_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/aix.lo \
 130.274 +-@POWERPC_AIX_TRUE@src/powerpc/aix_closures.lo
 130.275 +-@X86_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo src/types.lo \
 130.276 +-@X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \
 130.277 +-@X86_TRUE@src/x86/sysv.lo
 130.278 ++@POWERPC_AIX_TRUE@src/powerpc/aix_closure.lo
 130.279 ++@MIPS_SGI_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.280 ++@MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.281 ++@MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
 130.282 + @ARM_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo src/types.lo \
 130.283 + @ARM_TRUE@src/raw_api.lo src/java_raw_api.lo src/arm/sysv.lo \
 130.284 + @ARM_TRUE@src/arm/ffi.lo
 130.285 ++@ALPHA_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.286 ++@ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.287 ++@ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo
 130.288 ++@MIPS_GCC_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.289 ++@MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.290 ++@MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
 130.291 ++@S390_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.292 ++@S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.293 ++@S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo
 130.294 ++@M68K_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.295 ++@M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.296 ++@M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
 130.297 ++@X86_WIN32_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.298 ++@X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.299 ++@X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo
 130.300 ++@X86_64_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.301 ++@X86_64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.302 ++@X86_64_TRUE@src/x86/ffi64.lo src/x86/unix64.lo src/x86/ffi.lo \
 130.303 ++@X86_64_TRUE@src/x86/sysv.lo
 130.304 + @POWERPC_DARWIN_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.305 + @POWERPC_DARWIN_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.306 + @POWERPC_DARWIN_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/darwin.lo \
 130.307 + @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo
 130.308 +-@MIPS_SGI_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
 130.309 +-@MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
 130.310 +-@MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
 130.311 + noinst_PROGRAMS =  ffitest$(EXEEXT)
 130.312 + PROGRAMS =  $(noinst_PROGRAMS)
 130.313 + 
 130.314 +@@ -578,8 +616,8 @@
 130.315 + 	-chmod 777 $(distdir)
 130.316 + 	$(mkinstalldirs) $(distdir)/src/alpha $(distdir)/src/arm \
 130.317 + 	   $(distdir)/src/m68k $(distdir)/src/mips \
 130.318 +-	   $(distdir)/src/powerpc $(distdir)/src/sparc \
 130.319 +-	   $(distdir)/src/x86
 130.320 ++	   $(distdir)/src/powerpc $(distdir)/src/s390 $(distdir)/src/sh \
 130.321 ++	   $(distdir)/src/sparc $(distdir)/src/x86
 130.322 + 	@for file in $(DISTFILES); do \
 130.323 + 	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
 130.324 + 	  if test -d $$d/$$file; then \
 130.325 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/acinclude.m4 gcc/libffi/acinclude.m4
 130.326 +--- gcc-3.2.2.orig/libffi/acinclude.m4	Sun Sep 10 16:43:14 2000
 130.327 ++++ gcc/libffi/acinclude.m4	Tue Dec 17 03:22:47 2002
 130.328 +@@ -4,5 +4,8 @@
 130.329 + dnl to add a definition of LIBTOOL to Makefile.in.
 130.330 + ifelse(yes,no,[
 130.331 + AC_DEFUN([AC_PROG_LIBTOOL],)
 130.332 ++AC_DEFUN([AM_PROG_LIBTOOL],)
 130.333 + AC_SUBST(LIBTOOL)
 130.334 + ])
 130.335 ++
 130.336 ++sinclude(../config/accross.m4)
 130.337 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/aclocal.m4 gcc/libffi/aclocal.m4
 130.338 +--- gcc-3.2.2.orig/libffi/aclocal.m4	Fri Feb  1 07:25:31 2002
 130.339 ++++ gcc/libffi/aclocal.m4	Tue Dec 17 03:22:47 2002
 130.340 +@@ -1,6 +1,6 @@
 130.341 +-dnl aclocal.m4 generated automatically by aclocal 1.4
 130.342 ++dnl aclocal.m4 generated automatically by aclocal 1.4-p5
 130.343 + 
 130.344 +-dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 130.345 ++dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
 130.346 + dnl This file is free software; the Free Software Foundation
 130.347 + dnl gives unlimited permission to copy and/or distribute it,
 130.348 + dnl with or without modifications, as long as this notice is preserved.
 130.349 +@@ -16,108 +16,15 @@
 130.350 + dnl to add a definition of LIBTOOL to Makefile.in.
 130.351 + ifelse(yes,no,[
 130.352 + AC_DEFUN([AC_PROG_LIBTOOL],)
 130.353 ++AC_DEFUN([AM_PROG_LIBTOOL],)
 130.354 + AC_SUBST(LIBTOOL)
 130.355 + ])
 130.356 + 
 130.357 +-AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
 130.358 +-[changequote(<<, >>)dnl
 130.359 +-dnl The name to #define.
 130.360 +-define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
 130.361 +-dnl The cache variable name.
 130.362 +-define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
 130.363 +-changequote([, ])dnl
 130.364 +-AC_MSG_CHECKING(size of $1)
 130.365 +-AC_CACHE_VAL(AC_CV_NAME,
 130.366 +-[for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
 130.367 +-  AC_TRY_COMPILE([#include "confdefs.h"
 130.368 +-#include <sys/types.h>
 130.369 +-$2
 130.370 +-], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
 130.371 +-  if test x$AC_CV_NAME != x ; then break; fi
 130.372 +-done
 130.373 +-])
 130.374 +-if test x$AC_CV_NAME = x ; then
 130.375 +-  AC_MSG_ERROR([cannot determine a size for $1])
 130.376 +-fi
 130.377 +-AC_MSG_RESULT($AC_CV_NAME)
 130.378 +-AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
 130.379 +-undefine([AC_TYPE_NAME])dnl
 130.380 +-undefine([AC_CV_NAME])dnl
 130.381 +-])
 130.382 +-
 130.383 +-AC_DEFUN([AC_C_BIGENDIAN_CROSS],
 130.384 +-[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
 130.385 +-[ac_cv_c_bigendian=unknown
 130.386 +-# See if sys/param.h defines the BYTE_ORDER macro.
 130.387 +-AC_TRY_COMPILE([#include <sys/types.h>
 130.388 +-#include <sys/param.h>], [
 130.389 +-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 130.390 +- bogus endian macros
 130.391 +-#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
 130.392 +-AC_TRY_COMPILE([#include <sys/types.h>
 130.393 +-#include <sys/param.h>], [
 130.394 +-#if BYTE_ORDER != BIG_ENDIAN
 130.395 +- not big endian
 130.396 +-#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
 130.397 +-if test $ac_cv_c_bigendian = unknown; then
 130.398 +-AC_TRY_RUN([main () {
 130.399 +-  /* Are we little or big endian?  From Harbison&Steele.  */
 130.400 +-  union
 130.401 +-  {
 130.402 +-    long l;
 130.403 +-    char c[sizeof (long)];
 130.404 +-  } u;
 130.405 +-  u.l = 1;
 130.406 +-  exit (u.c[sizeof (long) - 1] == 1);
 130.407 +-}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes,
 130.408 +-[ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ])
 130.409 +-fi])
 130.410 +-if test $ac_cv_c_bigendian = unknown; then
 130.411 +-AC_MSG_CHECKING(to probe for byte ordering)
 130.412 +-[
 130.413 +-cat >conftest.c <<EOF
 130.414 +-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
 130.415 +-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
 130.416 +-void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
 130.417 +-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
 130.418 +-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
 130.419 +-void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
 130.420 +-int main() { _ascii (); _ebcdic (); return 0; }
 130.421 +-EOF
 130.422 +-] if test -f conftest.c ; then
 130.423 +-     if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
 130.424 +-        if test `grep -l BIGenDianSyS conftest.o` ; then
 130.425 +-           echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG
 130.426 +-           ac_cv_c_bigendian=yes
 130.427 +-        fi
 130.428 +-        if test `grep -l LiTTleEnDian conftest.o` ; then
 130.429 +-           echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG
 130.430 +-           if test $ac_cv_c_bigendian = yes ; then
 130.431 +-            ac_cv_c_bigendian=unknown;
 130.432 +-           else
 130.433 +-            ac_cv_c_bigendian=no
 130.434 +-           fi
 130.435 +-        fi
 130.436 +-        echo $ac_n 'guessing bigendian ...  ' >&AC_FD_MSG
 130.437 +-     fi
 130.438 +-  fi
 130.439 +-AC_MSG_RESULT($ac_cv_c_bigendian)
 130.440 +-fi
 130.441 +-if test $ac_cv_c_bigendian = yes; then
 130.442 +-  AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian])
 130.443 +-  BYTEORDER=4321
 130.444 +-else
 130.445 +-  BYTEORDER=1234
 130.446 +-fi
 130.447 +-AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN])
 130.448 +-if test $ac_cv_c_bigendian = unknown; then
 130.449 +-  AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian)
 130.450 +-fi
 130.451 +-])
 130.452 ++sinclude(../config/accross.m4)
 130.453 + 
 130.454 + # Like AC_CONFIG_HEADER, but automatically create stamp file.
 130.455 + 
 130.456 +-AC_DEFUN(AM_CONFIG_HEADER,
 130.457 ++AC_DEFUN([AM_CONFIG_HEADER],
 130.458 + [AC_PREREQ([2.12])
 130.459 + AC_CONFIG_HEADER([$1])
 130.460 + dnl When config.status generates a header, we must update the stamp-h file.
 130.461 +@@ -147,7 +54,7 @@
 130.462 + dnl Usage:
 130.463 + dnl AM_INIT_AUTOMAKE(package,version, [no-define])
 130.464 + 
 130.465 +-AC_DEFUN(AM_INIT_AUTOMAKE,
 130.466 ++AC_DEFUN([AM_INIT_AUTOMAKE],
 130.467 + [AC_REQUIRE([AC_PROG_INSTALL])
 130.468 + PACKAGE=[$1]
 130.469 + AC_SUBST(PACKAGE)
 130.470 +@@ -175,7 +82,7 @@
 130.471 + # Check to make sure that the build environment is sane.
 130.472 + #
 130.473 + 
 130.474 +-AC_DEFUN(AM_SANITY_CHECK,
 130.475 ++AC_DEFUN([AM_SANITY_CHECK],
 130.476 + [AC_MSG_CHECKING([whether build environment is sane])
 130.477 + # Just in case
 130.478 + sleep 1
 130.479 +@@ -216,7 +123,7 @@
 130.480 + 
 130.481 + dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
 130.482 + dnl The program must properly implement --version.
 130.483 +-AC_DEFUN(AM_MISSING_PROG,
 130.484 ++AC_DEFUN([AM_MISSING_PROG],
 130.485 + [AC_MSG_CHECKING(for working $2)
 130.486 + # Run test in a subshell; some versions of sh will print an error if
 130.487 + # an executable is not found, even if stderr is redirected.
 130.488 +@@ -235,7 +142,7 @@
 130.489 + 
 130.490 + # serial 1
 130.491 + 
 130.492 +-AC_DEFUN(AM_MAINTAINER_MODE,
 130.493 ++AC_DEFUN([AM_MAINTAINER_MODE],
 130.494 + [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 130.495 +   dnl maintainer-mode is disabled by default
 130.496 +   AC_ARG_ENABLE(maintainer-mode,
 130.497 +@@ -252,7 +159,7 @@
 130.498 + 
 130.499 + # Define a conditional.
 130.500 + 
 130.501 +-AC_DEFUN(AM_CONDITIONAL,
 130.502 ++AC_DEFUN([AM_CONDITIONAL],
 130.503 + [AC_SUBST($1_TRUE)
 130.504 + AC_SUBST($1_FALSE)
 130.505 + if $2; then
 130.506 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/configure gcc/libffi/configure
 130.507 +--- gcc-3.2.2.orig/libffi/configure	Wed Jan 29 07:59:05 2003
 130.508 ++++ gcc/libffi/configure	Sat Feb  1 20:16:19 2003
 130.509 +@@ -633,17 +633,16 @@
 130.510 + 
 130.511 + if test "${srcdir}" = "."; then
 130.512 +   if test "${with_target_subdir}" != "."; then
 130.513 +-    libffi_basedir="${srcdir}/${with_multisrctop}.."
 130.514 ++    libffi_basedir="${with_multisrctop}../"
 130.515 +   else
 130.516 +-    libffi_basedir="${srcdir}/${with_multisrctop}"
 130.517 ++    libffi_basedir="${with_multisrctop}"
 130.518 +   fi
 130.519 + else
 130.520 +-  libffi_basedir="${srcdir}"
 130.521 ++  libffi_basedir=
 130.522 + fi
 130.523 + 
 130.524 +-
 130.525 + ac_aux_dir=
 130.526 +-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
 130.527 ++for ac_dir in ${libffi_basedir}.. $srcdir/${libffi_basedir}..; do
 130.528 +   if test -f $ac_dir/install-sh; then
 130.529 +     ac_aux_dir=$ac_dir
 130.530 +     ac_install_sh="$ac_aux_dir/install-sh -c"
 130.531 +@@ -655,13 +654,14 @@
 130.532 +   fi
 130.533 + done
 130.534 + if test -z "$ac_aux_dir"; then
 130.535 +-  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
 130.536 ++  { echo "configure: error: can not find install-sh or install.sh in ${libffi_basedir}.. $srcdir/${libffi_basedir}.." 1>&2; exit 1; }
 130.537 + fi
 130.538 + ac_config_guess=$ac_aux_dir/config.guess
 130.539 + ac_config_sub=$ac_aux_dir/config.sub
 130.540 + ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 130.541 + 
 130.542 + 
 130.543 ++
 130.544 + # Make sure we can run config.sub.
 130.545 + if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
 130.546 + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 130.547 +@@ -1238,9 +1238,18 @@
 130.548 +   ;;
 130.549 + 
 130.550 + hpux10.20*|hpux11*)
 130.551 +-  lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
 130.552 +-  lt_cv_file_magic_cmd=/usr/bin/file
 130.553 +-  lt_cv_file_magic_test_file=/usr/lib/libc.sl
 130.554 ++  case $host_cpu in
 130.555 ++  hppa*)
 130.556 ++    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
 130.557 ++    lt_cv_file_magic_cmd=/usr/bin/file
 130.558 ++    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 130.559 ++    ;;
 130.560 ++  ia64*)
 130.561 ++    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
 130.562 ++    lt_cv_file_magic_cmd=/usr/bin/file
 130.563 ++    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 130.564 ++    ;;
 130.565 ++  esac
 130.566 +   ;;
 130.567 + 
 130.568 + irix5* | irix6*)
 130.569 +@@ -1267,7 +1276,7 @@
 130.570 + # This must be Linux ELF.
 130.571 + linux-gnu*)
 130.572 +   case $host_cpu in
 130.573 +-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
 130.574 ++  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
 130.575 +     lt_cv_deplibs_check_method=pass_all ;;
 130.576 +   *)
 130.577 +     # glibc up to 2.1.1 does not perform some relocations on ARM
 130.578 +@@ -1330,13 +1339,13 @@
 130.579 + deplibs_check_method=$lt_cv_deplibs_check_method
 130.580 + 
 130.581 + echo $ac_n "checking for object suffix""... $ac_c" 1>&6
 130.582 +-echo "configure:1334: checking for object suffix" >&5
 130.583 ++echo "configure:1343: checking for object suffix" >&5
 130.584 + if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
 130.585 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.586 + else
 130.587 +   rm -f conftest*
 130.588 + echo 'int i = 1;' > conftest.$ac_ext
 130.589 +-if { (eval echo configure:1340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 130.590 ++if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 130.591 +   for ac_file in conftest.*; do
 130.592 +     case $ac_file in
 130.593 +     *.c) ;;
 130.594 +@@ -1356,7 +1365,7 @@
 130.595 + 
 130.596 + 
 130.597 + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
 130.598 +-echo "configure:1360: checking for executable suffix" >&5
 130.599 ++echo "configure:1369: checking for executable suffix" >&5
 130.600 + if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
 130.601 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.602 + else
 130.603 +@@ -1366,7 +1375,7 @@
 130.604 +   rm -f conftest*
 130.605 +   echo 'int main () { return 0; }' > conftest.$ac_ext
 130.606 +   ac_cv_exeext=
 130.607 +-  if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
 130.608 ++  if { (eval echo configure:1379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
 130.609 +     for file in conftest.*; do
 130.610 +       case $file in
 130.611 +       *.c | *.o | *.obj) ;;
 130.612 +@@ -1399,7 +1408,7 @@
 130.613 + file_magic*)
 130.614 +   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
 130.615 +     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
 130.616 +-echo "configure:1403: checking for ${ac_tool_prefix}file" >&5
 130.617 ++echo "configure:1412: checking for ${ac_tool_prefix}file" >&5
 130.618 + if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
 130.619 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.620 + else
 130.621 +@@ -1461,7 +1470,7 @@
 130.622 + if test -z "$lt_cv_path_MAGIC_CMD"; then
 130.623 +   if test -n "$ac_tool_prefix"; then
 130.624 +     echo $ac_n "checking for file""... $ac_c" 1>&6
 130.625 +-echo "configure:1465: checking for file" >&5
 130.626 ++echo "configure:1474: checking for file" >&5
 130.627 + if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
 130.628 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.629 + else
 130.630 +@@ -1532,7 +1541,7 @@
 130.631 + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 130.632 + set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 130.633 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 130.634 +-echo "configure:1536: checking for $ac_word" >&5
 130.635 ++echo "configure:1545: checking for $ac_word" >&5
 130.636 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
 130.637 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.638 + else
 130.639 +@@ -1564,7 +1573,7 @@
 130.640 +   # Extract the first word of "ranlib", so it can be a program name with args.
 130.641 + set dummy ranlib; ac_word=$2
 130.642 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 130.643 +-echo "configure:1568: checking for $ac_word" >&5
 130.644 ++echo "configure:1577: checking for $ac_word" >&5
 130.645 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
 130.646 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.647 + else
 130.648 +@@ -1599,7 +1608,7 @@
 130.649 + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
 130.650 + set dummy ${ac_tool_prefix}strip; ac_word=$2
 130.651 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 130.652 +-echo "configure:1603: checking for $ac_word" >&5
 130.653 ++echo "configure:1612: checking for $ac_word" >&5
 130.654 + if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
 130.655 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.656 + else
 130.657 +@@ -1631,7 +1640,7 @@
 130.658 +   # Extract the first word of "strip", so it can be a program name with args.
 130.659 + set dummy strip; ac_word=$2
 130.660 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 130.661 +-echo "configure:1635: checking for $ac_word" >&5
 130.662 ++echo "configure:1644: checking for $ac_word" >&5
 130.663 + if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
 130.664 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.665 + else
 130.666 +@@ -1698,8 +1707,8 @@
 130.667 + case $host in
 130.668 + *-*-irix6*)
 130.669 +   # Find out which ABI we are using.
 130.670 +-  echo '#line 1702 "configure"' > conftest.$ac_ext
 130.671 +-  if { (eval echo configure:1703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 130.672 ++  echo '#line 1711 "configure"' > conftest.$ac_ext
 130.673 ++  if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 130.674 +     case `/usr/bin/file conftest.$ac_objext` in
 130.675 +     *32-bit*)
 130.676 +       LD="${LD-ld} -32"
 130.677 +@@ -1715,12 +1724,70 @@
 130.678 +   rm -rf conftest*
 130.679 +   ;;
 130.680 + 
 130.681 ++ia64-*-hpux*)
 130.682 ++  # Find out which ABI we are using.
 130.683 ++  echo 'int i;' > conftest.$ac_ext
 130.684 ++  if { (eval echo configure:1731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 130.685 ++    case "`/usr/bin/file conftest.o`" in
 130.686 ++    *ELF-32*)
 130.687 ++      HPUX_IA64_MODE="32"
 130.688 ++      ;;
 130.689 ++    *ELF-64*)
 130.690 ++      HPUX_IA64_MODE="64"
 130.691 ++      ;;
 130.692 ++    esac
 130.693 ++  fi
 130.694 ++  rm -rf conftest*
 130.695 ++  ;;
 130.696 ++
 130.697 ++x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
 130.698 ++  # Find out which ABI we are using.
 130.699 ++  echo 'int i;' > conftest.$ac_ext
 130.700 ++  if { (eval echo configure:1747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 130.701 ++    case "`/usr/bin/file conftest.o`" in
 130.702 ++    *32-bit*)
 130.703 ++      case $host in
 130.704 ++        x86_64-*linux*)
 130.705 ++          LD="${LD-ld} -m elf_i386"
 130.706 ++          ;;
 130.707 ++        ppc64-*linux*)
 130.708 ++          LD="${LD-ld} -m elf32ppclinux"
 130.709 ++          ;;
 130.710 ++        s390x-*linux*)
 130.711 ++          LD="${LD-ld} -m elf_s390"
 130.712 ++          ;;
 130.713 ++        sparc64-*linux*)
 130.714 ++          LD="${LD-ld} -m elf32_sparc"
 130.715 ++          ;;
 130.716 ++      esac
 130.717 ++      ;;
 130.718 ++    *64-bit*)
 130.719 ++      case $host in
 130.720 ++        x86_64-*linux*)
 130.721 ++          LD="${LD-ld} -m elf_x86_64"
 130.722 ++          ;;
 130.723 ++        ppc*-*linux*|powerpc*-*linux*)
 130.724 ++          LD="${LD-ld} -m elf64ppc"
 130.725 ++          ;;
 130.726 ++        s390*-*linux*)
 130.727 ++          LD="${LD-ld} -m elf64_s390"
 130.728 ++          ;;
 130.729 ++        sparc*-*linux*)
 130.730 ++          LD="${LD-ld} -m elf64_sparc"
 130.731 ++          ;;
 130.732 ++      esac
 130.733 ++      ;;
 130.734 ++    esac
 130.735 ++  fi
 130.736 ++  rm -rf conftest*
 130.737 ++  ;;
 130.738 ++
 130.739 + *-*-sco3.2v5*)
 130.740 +   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 130.741 +   SAVE_CFLAGS="$CFLAGS"
 130.742 +   CFLAGS="$CFLAGS -belf"
 130.743 +   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
 130.744 +-echo "configure:1724: checking whether the C compiler needs -belf" >&5
 130.745 ++echo "configure:1791: checking whether the C compiler needs -belf" >&5
 130.746 + if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
 130.747 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.748 + else
 130.749 +@@ -1733,14 +1800,14 @@
 130.750 + cross_compiling=$ac_cv_prog_cc_cross
 130.751 + 
 130.752 +      cat > conftest.$ac_ext <<EOF
 130.753 +-#line 1737 "configure"
 130.754 ++#line 1804 "configure"
 130.755 + #include "confdefs.h"
 130.756 + 
 130.757 + int main() {
 130.758 + 
 130.759 + ; return 0; }
 130.760 + EOF
 130.761 +-if { (eval echo configure:1744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 130.762 ++if { (eval echo configure:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 130.763 +   rm -rf conftest*
 130.764 +   lt_cv_cc_needs_belf=yes
 130.765 + else
 130.766 +@@ -1868,7 +1935,7 @@
 130.767 + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 130.768 + # ./install, which can be erroneously created by make from ./install.sh.
 130.769 + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
 130.770 +-echo "configure:1872: checking for a BSD compatible install" >&5
 130.771 ++echo "configure:1939: checking for a BSD compatible install" >&5
 130.772 + if test -z "$INSTALL"; then
 130.773 + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
 130.774 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.775 +@@ -1921,7 +1988,7 @@
 130.776 + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 130.777 + 
 130.778 + echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
 130.779 +-echo "configure:1925: checking whether build environment is sane" >&5
 130.780 ++echo "configure:1992: checking whether build environment is sane" >&5
 130.781 + # Just in case
 130.782 + sleep 1
 130.783 + echo timestamp > conftestfile
 130.784 +@@ -1978,7 +2045,7 @@
 130.785 + test "$program_transform_name" = "" && program_transform_name="s,x,x,"
 130.786 + 
 130.787 + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
 130.788 +-echo "configure:1982: checking whether ${MAKE-make} sets \${MAKE}" >&5
 130.789 ++echo "configure:2049: checking whether ${MAKE-make} sets \${MAKE}" >&5
 130.790 + set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 130.791 + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
 130.792 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.793 +@@ -2017,7 +2084,7 @@
 130.794 + 
 130.795 + missing_dir=`cd $ac_aux_dir && pwd`
 130.796 + echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
 130.797 +-echo "configure:2021: checking for working aclocal" >&5
 130.798 ++echo "configure:2088: checking for working aclocal" >&5
 130.799 + # Run test in a subshell; some versions of sh will print an error if
 130.800 + # an executable is not found, even if stderr is redirected.
 130.801 + # Redirect stdin to placate older versions of autoconf.  Sigh.
 130.802 +@@ -2030,7 +2097,7 @@
 130.803 + fi
 130.804 + 
 130.805 + echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
 130.806 +-echo "configure:2034: checking for working autoconf" >&5
 130.807 ++echo "configure:2101: checking for working autoconf" >&5
 130.808 + # Run test in a subshell; some versions of sh will print an error if
 130.809 + # an executable is not found, even if stderr is redirected.
 130.810 + # Redirect stdin to placate older versions of autoconf.  Sigh.
 130.811 +@@ -2043,7 +2110,7 @@
 130.812 + fi
 130.813 + 
 130.814 + echo $ac_n "checking for working automake""... $ac_c" 1>&6
 130.815 +-echo "configure:2047: checking for working automake" >&5
 130.816 ++echo "configure:2114: checking for working automake" >&5
 130.817 + # Run test in a subshell; some versions of sh will print an error if
 130.818 + # an executable is not found, even if stderr is redirected.
 130.819 + # Redirect stdin to placate older versions of autoconf.  Sigh.
 130.820 +@@ -2056,7 +2123,7 @@
 130.821 + fi
 130.822 + 
 130.823 + echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
 130.824 +-echo "configure:2060: checking for working autoheader" >&5
 130.825 ++echo "configure:2127: checking for working autoheader" >&5
 130.826 + # Run test in a subshell; some versions of sh will print an error if
 130.827 + # an executable is not found, even if stderr is redirected.
 130.828 + # Redirect stdin to placate older versions of autoconf.  Sigh.
 130.829 +@@ -2069,7 +2136,7 @@
 130.830 + fi
 130.831 + 
 130.832 + echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
 130.833 +-echo "configure:2073: checking for working makeinfo" >&5
 130.834 ++echo "configure:2140: checking for working makeinfo" >&5
 130.835 + # Run test in a subshell; some versions of sh will print an error if
 130.836 + # an executable is not found, even if stderr is redirected.
 130.837 + # Redirect stdin to placate older versions of autoconf.  Sigh.
 130.838 +@@ -2086,7 +2153,7 @@
 130.839 + 
 130.840 + 
 130.841 + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
 130.842 +-echo "configure:2090: checking for executable suffix" >&5
 130.843 ++echo "configure:2157: checking for executable suffix" >&5
 130.844 + if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
 130.845 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.846 + else
 130.847 +@@ -2096,7 +2163,7 @@
 130.848 +   rm -f conftest*
 130.849 +   echo 'int main () { return 0; }' > conftest.$ac_ext
 130.850 +   ac_cv_exeext=
 130.851 +-  if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
 130.852 ++  if { (eval echo configure:2167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
 130.853 +     for file in conftest.*; do
 130.854 +       case $file in
 130.855 +       *.c | *.o | *.obj) ;;
 130.856 +@@ -2117,7 +2184,7 @@
 130.857 + ac_exeext=$EXEEXT
 130.858 + 
 130.859 + echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
 130.860 +-echo "configure:2121: checking whether to enable maintainer-specific portions of Makefiles" >&5
 130.861 ++echo "configure:2188: checking whether to enable maintainer-specific portions of Makefiles" >&5
 130.862 +     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
 130.863 + if test "${enable_maintainer_mode+set}" = set; then
 130.864 +   enableval="$enable_maintainer_mode"
 130.865 +@@ -2143,7 +2210,7 @@
 130.866 + # Extract the first word of "gcc", so it can be a program name with args.
 130.867 + set dummy gcc; ac_word=$2
 130.868 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 130.869 +-echo "configure:2147: checking for $ac_word" >&5
 130.870 ++echo "configure:2214: checking for $ac_word" >&5
 130.871 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
 130.872 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.873 + else
 130.874 +@@ -2173,7 +2240,7 @@
 130.875 +   # Extract the first word of "cc", so it can be a program name with args.
 130.876 + set dummy cc; ac_word=$2
 130.877 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 130.878 +-echo "configure:2177: checking for $ac_word" >&5
 130.879 ++echo "configure:2244: checking for $ac_word" >&5
 130.880 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
 130.881 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.882 + else
 130.883 +@@ -2224,7 +2291,7 @@
 130.884 +       # Extract the first word of "cl", so it can be a program name with args.
 130.885 + set dummy cl; ac_word=$2
 130.886 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 130.887 +-echo "configure:2228: checking for $ac_word" >&5
 130.888 ++echo "configure:2295: checking for $ac_word" >&5
 130.889 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
 130.890 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.891 + else
 130.892 +@@ -2256,7 +2323,7 @@
 130.893 + fi
 130.894 + 
 130.895 + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
 130.896 +-echo "configure:2260: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 130.897 ++echo "configure:2327: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 130.898 + 
 130.899 + ac_ext=c
 130.900 + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 130.901 +@@ -2267,12 +2334,12 @@
 130.902 + 
 130.903 + cat > conftest.$ac_ext << EOF
 130.904 + 
 130.905 +-#line 2271 "configure"
 130.906 ++#line 2338 "configure"
 130.907 + #include "confdefs.h"
 130.908 + 
 130.909 + main(){return(0);}
 130.910 + EOF
 130.911 +-if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 130.912 ++if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 130.913 +   ac_cv_prog_cc_works=yes
 130.914 +   # If we can't run a trivial program, we are probably using a cross compiler.
 130.915 +   if (./conftest; exit) 2>/dev/null; then
 130.916 +@@ -2298,12 +2365,12 @@
 130.917 +   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 130.918 + fi
 130.919 + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
 130.920 +-echo "configure:2302: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 130.921 ++echo "configure:2369: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 130.922 + echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 130.923 + cross_compiling=$ac_cv_prog_cc_cross
 130.924 + 
 130.925 + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
 130.926 +-echo "configure:2307: checking whether we are using GNU C" >&5
 130.927 ++echo "configure:2374: checking whether we are using GNU C" >&5
 130.928 + if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
 130.929 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.930 + else
 130.931 +@@ -2312,7 +2379,7 @@
 130.932 +   yes;
 130.933 + #endif
 130.934 + EOF
 130.935 +-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
 130.936 ++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
 130.937 +   ac_cv_prog_gcc=yes
 130.938 + else
 130.939 +   ac_cv_prog_gcc=no
 130.940 +@@ -2331,7 +2398,7 @@
 130.941 + ac_save_CFLAGS="$CFLAGS"
 130.942 + CFLAGS=
 130.943 + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
 130.944 +-echo "configure:2335: checking whether ${CC-cc} accepts -g" >&5
 130.945 ++echo "configure:2402: checking whether ${CC-cc} accepts -g" >&5
 130.946 + if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
 130.947 +   echo $ac_n "(cached) $ac_c" 1>&6
 130.948 + else
 130.949 +@@ -2381,17 +2448,23 @@
 130.950 + i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
 130.951 + sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
 130.952 + sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
 130.953 +-sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
 130.954 +-sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
 130.955 +-alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;;
 130.956 ++sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;;
 130.957 ++sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;;
 130.958 ++alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
 130.959 + ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
 130.960 + m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
 130.961 ++mips64*-*);;
 130.962 ++mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;;
 130.963 + powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
 130.964 + powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
 130.965 + powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
 130.966 + powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
 130.967 + rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
 130.968 + arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
 130.969 ++s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
 130.970 ++s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
 130.971 ++x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;;
 130.972 ++sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
 130.973 + esac
 130.974 + 
 130.975 + if test $TARGETDIR = unknown; then
 130.976 +@@ -2418,6 +2491,15 @@
 130.977 + fi
 130.978 + 
 130.979 + 
 130.980 ++if test x$TARGET = xMIPS_LINUX; then
 130.981 ++  MIPS_LINUX_TRUE=
 130.982 ++  MIPS_LINUX_FALSE='#'
 130.983 ++else
 130.984 ++  MIPS_LINUX_TRUE='#'
 130.985 ++  MIPS_LINUX_FALSE=
 130.986 ++fi
 130.987 ++
 130.988 ++
 130.989 + if test x$TARGET = xSPARC; then
 130.990 +   SPARC_TRUE=
 130.991 +   SPARC_FALSE='#'
 130.992 +@@ -2507,8 +2589,39 @@
 130.993 +   ARM_FALSE=
 130.994 + fi
 130.995 + 
 130.996 ++
 130.997 ++if test x$TARGET = xS390; then
 130.998 ++  S390_TRUE=
 130.999 ++  S390_FALSE='#'
130.1000 ++else
130.1001 ++  S390_TRUE='#'
130.1002 ++  S390_FALSE=
130.1003 ++fi
130.1004 ++
130.1005 ++
130.1006 ++if test x$TARGET = xX86_64; then
130.1007 ++  X86_64_TRUE=
130.1008 ++  X86_64_FALSE='#'
130.1009 ++else
130.1010 ++  X86_64_TRUE='#'
130.1011 ++  X86_64_FALSE=
130.1012 ++fi
130.1013 ++
130.1014 ++
130.1015 ++if test x$TARGET = xSH; then
130.1016 ++  SH_TRUE=
130.1017 ++  SH_FALSE='#'
130.1018 ++else
130.1019 ++  SH_TRUE='#'
130.1020 ++  SH_FALSE=
130.1021 ++fi
130.1022 ++
130.1023 ++if test x$TARGET = xMIPS_LINUX; then
130.1024 ++  TARGET=MIPS
130.1025 ++fi
130.1026 ++
130.1027 + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
130.1028 +-echo "configure:2512: checking how to run the C preprocessor" >&5
130.1029 ++echo "configure:2625: checking how to run the C preprocessor" >&5
130.1030 + # On Suns, sometimes $CPP names a directory.
130.1031 + if test -n "$CPP" && test -d "$CPP"; then
130.1032 +   CPP=
130.1033 +@@ -2523,13 +2636,13 @@
130.1034 +   # On the NeXT, cc -E runs the code through the compiler's parser,
130.1035 +   # not just through cpp.
130.1036 +   cat > conftest.$ac_ext <<EOF
130.1037 +-#line 2527 "configure"
130.1038 ++#line 2640 "configure"
130.1039 + #include "confdefs.h"
130.1040 + #include <assert.h>
130.1041 + Syntax Error
130.1042 + EOF
130.1043 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
130.1044 +-{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
130.1045 ++{ (eval echo configure:2646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
130.1046 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
130.1047 + if test -z "$ac_err"; then
130.1048 +   :
130.1049 +@@ -2540,13 +2653,13 @@
130.1050 +   rm -rf conftest*
130.1051 +   CPP="${CC-cc} -E -traditional-cpp"
130.1052 +   cat > conftest.$ac_ext <<EOF
130.1053 +-#line 2544 "configure"
130.1054 ++#line 2657 "configure"
130.1055 + #include "confdefs.h"
130.1056 + #include <assert.h>
130.1057 + Syntax Error
130.1058 + EOF
130.1059 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
130.1060 +-{ (eval echo configure:2550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
130.1061 ++{ (eval echo configure:2663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
130.1062 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
130.1063 + if test -z "$ac_err"; then
130.1064 +   :
130.1065 +@@ -2557,13 +2670,13 @@
130.1066 +   rm -rf conftest*
130.1067 +   CPP="${CC-cc} -nologo -E"
130.1068 +   cat > conftest.$ac_ext <<EOF
130.1069 +-#line 2561 "configure"
130.1070 ++#line 2674 "configure"
130.1071 + #include "confdefs.h"
130.1072 + #include <assert.h>
130.1073 + Syntax Error
130.1074 + EOF
130.1075 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
130.1076 +-{ (eval echo configure:2567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
130.1077 ++{ (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
130.1078 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
130.1079 + if test -z "$ac_err"; then
130.1080 +   :
130.1081 +@@ -2588,12 +2701,12 @@
130.1082 + echo "$ac_t""$CPP" 1>&6
130.1083 + 
130.1084 + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
130.1085 +-echo "configure:2592: checking for ANSI C header files" >&5
130.1086 ++echo "configure:2705: checking for ANSI C header files" >&5
130.1087 + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
130.1088 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1089 + else
130.1090 +   cat > conftest.$ac_ext <<EOF
130.1091 +-#line 2597 "configure"
130.1092 ++#line 2710 "configure"
130.1093 + #include "confdefs.h"
130.1094 + #include <stdlib.h>
130.1095 + #include <stdarg.h>
130.1096 +@@ -2601,7 +2714,7 @@
130.1097 + #include <float.h>
130.1098 + EOF
130.1099 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
130.1100 +-{ (eval echo configure:2605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
130.1101 ++{ (eval echo configure:2718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
130.1102 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
130.1103 + if test -z "$ac_err"; then
130.1104 +   rm -rf conftest*
130.1105 +@@ -2618,7 +2731,7 @@
130.1106 + if test $ac_cv_header_stdc = yes; then
130.1107 +   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
130.1108 + cat > conftest.$ac_ext <<EOF
130.1109 +-#line 2622 "configure"
130.1110 ++#line 2735 "configure"
130.1111 + #include "confdefs.h"
130.1112 + #include <string.h>
130.1113 + EOF
130.1114 +@@ -2636,7 +2749,7 @@
130.1115 + if test $ac_cv_header_stdc = yes; then
130.1116 +   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
130.1117 + cat > conftest.$ac_ext <<EOF
130.1118 +-#line 2640 "configure"
130.1119 ++#line 2753 "configure"
130.1120 + #include "confdefs.h"
130.1121 + #include <stdlib.h>
130.1122 + EOF
130.1123 +@@ -2657,7 +2770,7 @@
130.1124 +   :
130.1125 + else
130.1126 +   cat > conftest.$ac_ext <<EOF
130.1127 +-#line 2661 "configure"
130.1128 ++#line 2774 "configure"
130.1129 + #include "confdefs.h"
130.1130 + #include <ctype.h>
130.1131 + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
130.1132 +@@ -2668,7 +2781,7 @@
130.1133 + exit (0); }
130.1134 + 
130.1135 + EOF
130.1136 +-if { (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
130.1137 ++if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
130.1138 + then
130.1139 +   :
130.1140 + else
130.1141 +@@ -2694,12 +2807,12 @@
130.1142 + for ac_func in memcpy
130.1143 + do
130.1144 + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
130.1145 +-echo "configure:2698: checking for $ac_func" >&5
130.1146 ++echo "configure:2811: checking for $ac_func" >&5
130.1147 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
130.1148 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1149 + else
130.1150 +   cat > conftest.$ac_ext <<EOF
130.1151 +-#line 2703 "configure"
130.1152 ++#line 2816 "configure"
130.1153 + #include "confdefs.h"
130.1154 + /* System header to define __stub macros and hopefully few prototypes,
130.1155 +     which can conflict with char $ac_func(); below.  */
130.1156 +@@ -2722,7 +2835,7 @@
130.1157 + 
130.1158 + ; return 0; }
130.1159 + EOF
130.1160 +-if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
130.1161 ++if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
130.1162 +   rm -rf conftest*
130.1163 +   eval "ac_cv_func_$ac_func=yes"
130.1164 + else
130.1165 +@@ -2749,19 +2862,19 @@
130.1166 + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
130.1167 + # for constant arguments.  Useless!
130.1168 + echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
130.1169 +-echo "configure:2753: checking for working alloca.h" >&5
130.1170 ++echo "configure:2866: checking for working alloca.h" >&5
130.1171 + if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
130.1172 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1173 + else
130.1174 +   cat > conftest.$ac_ext <<EOF
130.1175 +-#line 2758 "configure"
130.1176 ++#line 2871 "configure"
130.1177 + #include "confdefs.h"
130.1178 + #include <alloca.h>
130.1179 + int main() {
130.1180 + char *p = alloca(2 * sizeof(int));
130.1181 + ; return 0; }
130.1182 + EOF
130.1183 +-if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
130.1184 ++if { (eval echo configure:2878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
130.1185 +   rm -rf conftest*
130.1186 +   ac_cv_header_alloca_h=yes
130.1187 + else
130.1188 +@@ -2782,12 +2895,12 @@
130.1189 + fi
130.1190 + 
130.1191 + echo $ac_n "checking for alloca""... $ac_c" 1>&6
130.1192 +-echo "configure:2786: checking for alloca" >&5
130.1193 ++echo "configure:2899: checking for alloca" >&5
130.1194 + if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
130.1195 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1196 + else
130.1197 +   cat > conftest.$ac_ext <<EOF
130.1198 +-#line 2791 "configure"
130.1199 ++#line 2904 "configure"
130.1200 + #include "confdefs.h"
130.1201 + 
130.1202 + #ifdef __GNUC__
130.1203 +@@ -2815,7 +2928,7 @@
130.1204 + char *p = (char *) alloca(1);
130.1205 + ; return 0; }
130.1206 + EOF
130.1207 +-if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
130.1208 ++if { (eval echo configure:2932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
130.1209 +   rm -rf conftest*
130.1210 +   ac_cv_func_alloca_works=yes
130.1211 + else
130.1212 +@@ -2847,12 +2960,12 @@
130.1213 + 
130.1214 + 
130.1215 + echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
130.1216 +-echo "configure:2851: checking whether alloca needs Cray hooks" >&5
130.1217 ++echo "configure:2964: checking whether alloca needs Cray hooks" >&5
130.1218 + if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
130.1219 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1220 + else
130.1221 +   cat > conftest.$ac_ext <<EOF
130.1222 +-#line 2856 "configure"
130.1223 ++#line 2969 "configure"
130.1224 + #include "confdefs.h"
130.1225 + #if defined(CRAY) && ! defined(CRAY2)
130.1226 + webecray
130.1227 +@@ -2877,12 +2990,12 @@
130.1228 + if test $ac_cv_os_cray = yes; then
130.1229 + for ac_func in _getb67 GETB67 getb67; do
130.1230 +   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
130.1231 +-echo "configure:2881: checking for $ac_func" >&5
130.1232 ++echo "configure:2994: checking for $ac_func" >&5
130.1233 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
130.1234 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1235 + else
130.1236 +   cat > conftest.$ac_ext <<EOF
130.1237 +-#line 2886 "configure"
130.1238 ++#line 2999 "configure"
130.1239 + #include "confdefs.h"
130.1240 + /* System header to define __stub macros and hopefully few prototypes,
130.1241 +     which can conflict with char $ac_func(); below.  */
130.1242 +@@ -2905,7 +3018,7 @@
130.1243 + 
130.1244 + ; return 0; }
130.1245 + EOF
130.1246 +-if { (eval echo configure:2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
130.1247 ++if { (eval echo configure:3022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
130.1248 +   rm -rf conftest*
130.1249 +   eval "ac_cv_func_$ac_func=yes"
130.1250 + else
130.1251 +@@ -2932,7 +3045,7 @@
130.1252 + fi
130.1253 + 
130.1254 + echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
130.1255 +-echo "configure:2936: checking stack direction for C alloca" >&5
130.1256 ++echo "configure:3049: checking stack direction for C alloca" >&5
130.1257 + if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
130.1258 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1259 + else
130.1260 +@@ -2940,7 +3053,7 @@
130.1261 +   ac_cv_c_stack_direction=0
130.1262 + else
130.1263 +   cat > conftest.$ac_ext <<EOF
130.1264 +-#line 2944 "configure"
130.1265 ++#line 3057 "configure"
130.1266 + #include "confdefs.h"
130.1267 + find_stack_direction ()
130.1268 + {
130.1269 +@@ -2959,7 +3072,7 @@
130.1270 +   exit (find_stack_direction() < 0);
130.1271 + }
130.1272 + EOF
130.1273 +-if { (eval echo configure:2963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
130.1274 ++if { (eval echo configure:3076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
130.1275 + then
130.1276 +   ac_cv_c_stack_direction=1
130.1277 + else
130.1278 +@@ -2982,13 +3095,13 @@
130.1279 + 
130.1280 + 
130.1281 + echo $ac_n "checking size of short""... $ac_c" 1>&6
130.1282 +-echo "configure:2986: checking size of short" >&5
130.1283 ++echo "configure:3099: checking size of short" >&5
130.1284 + if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
130.1285 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1286 + else
130.1287 +   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
130.1288 +   cat > conftest.$ac_ext <<EOF
130.1289 +-#line 2992 "configure"
130.1290 ++#line 3105 "configure"
130.1291 + #include "confdefs.h"
130.1292 + #include "confdefs.h"
130.1293 + #include <sys/types.h>
130.1294 +@@ -2998,7 +3111,7 @@
130.1295 + switch (0) case 0: case (sizeof (short) == $ac_size):;
130.1296 + ; return 0; }
130.1297 + EOF
130.1298 +-if { (eval echo configure:3002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1299 ++if { (eval echo configure:3115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1300 +   rm -rf conftest*
130.1301 +   ac_cv_sizeof_short=$ac_size
130.1302 + else
130.1303 +@@ -3021,13 +3134,13 @@
130.1304 + 
130.1305 + 
130.1306 + echo $ac_n "checking size of int""... $ac_c" 1>&6
130.1307 +-echo "configure:3025: checking size of int" >&5
130.1308 ++echo "configure:3138: checking size of int" >&5
130.1309 + if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
130.1310 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1311 + else
130.1312 +   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
130.1313 +   cat > conftest.$ac_ext <<EOF
130.1314 +-#line 3031 "configure"
130.1315 ++#line 3144 "configure"
130.1316 + #include "confdefs.h"
130.1317 + #include "confdefs.h"
130.1318 + #include <sys/types.h>
130.1319 +@@ -3037,7 +3150,7 @@
130.1320 + switch (0) case 0: case (sizeof (int) == $ac_size):;
130.1321 + ; return 0; }
130.1322 + EOF
130.1323 +-if { (eval echo configure:3041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1324 ++if { (eval echo configure:3154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1325 +   rm -rf conftest*
130.1326 +   ac_cv_sizeof_int=$ac_size
130.1327 + else
130.1328 +@@ -3060,13 +3173,13 @@
130.1329 + 
130.1330 + 
130.1331 + echo $ac_n "checking size of long""... $ac_c" 1>&6
130.1332 +-echo "configure:3064: checking size of long" >&5
130.1333 ++echo "configure:3177: checking size of long" >&5
130.1334 + if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
130.1335 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1336 + else
130.1337 +   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
130.1338 +   cat > conftest.$ac_ext <<EOF
130.1339 +-#line 3070 "configure"
130.1340 ++#line 3183 "configure"
130.1341 + #include "confdefs.h"
130.1342 + #include "confdefs.h"
130.1343 + #include <sys/types.h>
130.1344 +@@ -3076,7 +3189,7 @@
130.1345 + switch (0) case 0: case (sizeof (long) == $ac_size):;
130.1346 + ; return 0; }
130.1347 + EOF
130.1348 +-if { (eval echo configure:3080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1349 ++if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1350 +   rm -rf conftest*
130.1351 +   ac_cv_sizeof_long=$ac_size
130.1352 + else
130.1353 +@@ -3099,13 +3212,13 @@
130.1354 + 
130.1355 + 
130.1356 + echo $ac_n "checking size of long long""... $ac_c" 1>&6
130.1357 +-echo "configure:3103: checking size of long long" >&5
130.1358 ++echo "configure:3216: checking size of long long" >&5
130.1359 + if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
130.1360 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1361 + else
130.1362 +   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
130.1363 +   cat > conftest.$ac_ext <<EOF
130.1364 +-#line 3109 "configure"
130.1365 ++#line 3222 "configure"
130.1366 + #include "confdefs.h"
130.1367 + #include "confdefs.h"
130.1368 + #include <sys/types.h>
130.1369 +@@ -3115,7 +3228,7 @@
130.1370 + switch (0) case 0: case (sizeof (long long) == $ac_size):;
130.1371 + ; return 0; }
130.1372 + EOF
130.1373 +-if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1374 ++if { (eval echo configure:3232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1375 +   rm -rf conftest*
130.1376 +   ac_cv_sizeof_long_long=$ac_size
130.1377 + else
130.1378 +@@ -3138,13 +3251,13 @@
130.1379 + 
130.1380 + 
130.1381 + echo $ac_n "checking size of float""... $ac_c" 1>&6
130.1382 +-echo "configure:3142: checking size of float" >&5
130.1383 ++echo "configure:3255: checking size of float" >&5
130.1384 + if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
130.1385 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1386 + else
130.1387 +   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
130.1388 +   cat > conftest.$ac_ext <<EOF
130.1389 +-#line 3148 "configure"
130.1390 ++#line 3261 "configure"
130.1391 + #include "confdefs.h"
130.1392 + #include "confdefs.h"
130.1393 + #include <sys/types.h>
130.1394 +@@ -3154,7 +3267,7 @@
130.1395 + switch (0) case 0: case (sizeof (float) == $ac_size):;
130.1396 + ; return 0; }
130.1397 + EOF
130.1398 +-if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1399 ++if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1400 +   rm -rf conftest*
130.1401 +   ac_cv_sizeof_float=$ac_size
130.1402 + else
130.1403 +@@ -3177,13 +3290,13 @@
130.1404 + 
130.1405 + 
130.1406 + echo $ac_n "checking size of double""... $ac_c" 1>&6
130.1407 +-echo "configure:3181: checking size of double" >&5
130.1408 ++echo "configure:3294: checking size of double" >&5
130.1409 + if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
130.1410 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1411 + else
130.1412 +   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
130.1413 +   cat > conftest.$ac_ext <<EOF
130.1414 +-#line 3187 "configure"
130.1415 ++#line 3300 "configure"
130.1416 + #include "confdefs.h"
130.1417 + #include "confdefs.h"
130.1418 + #include <sys/types.h>
130.1419 +@@ -3193,7 +3306,7 @@
130.1420 + switch (0) case 0: case (sizeof (double) == $ac_size):;
130.1421 + ; return 0; }
130.1422 + EOF
130.1423 +-if { (eval echo configure:3197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1424 ++if { (eval echo configure:3310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1425 +   rm -rf conftest*
130.1426 +   ac_cv_sizeof_double=$ac_size
130.1427 + else
130.1428 +@@ -3216,13 +3329,13 @@
130.1429 + 
130.1430 + 
130.1431 + echo $ac_n "checking size of long double""... $ac_c" 1>&6
130.1432 +-echo "configure:3220: checking size of long double" >&5
130.1433 ++echo "configure:3333: checking size of long double" >&5
130.1434 + if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
130.1435 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1436 + else
130.1437 +   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
130.1438 +   cat > conftest.$ac_ext <<EOF
130.1439 +-#line 3226 "configure"
130.1440 ++#line 3339 "configure"
130.1441 + #include "confdefs.h"
130.1442 + #include "confdefs.h"
130.1443 + #include <sys/types.h>
130.1444 +@@ -3232,7 +3345,7 @@
130.1445 + switch (0) case 0: case (sizeof (long double) == $ac_size):;
130.1446 + ; return 0; }
130.1447 + EOF
130.1448 +-if { (eval echo configure:3236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1449 ++if { (eval echo configure:3349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1450 +   rm -rf conftest*
130.1451 +   ac_cv_sizeof_long_double=$ac_size
130.1452 + else
130.1453 +@@ -3256,13 +3369,13 @@
130.1454 + 
130.1455 + 
130.1456 + echo $ac_n "checking size of void *""... $ac_c" 1>&6
130.1457 +-echo "configure:3260: checking size of void *" >&5
130.1458 ++echo "configure:3373: checking size of void *" >&5
130.1459 + if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
130.1460 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1461 + else
130.1462 +   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
130.1463 +   cat > conftest.$ac_ext <<EOF
130.1464 +-#line 3266 "configure"
130.1465 ++#line 3379 "configure"
130.1466 + #include "confdefs.h"
130.1467 + #include "confdefs.h"
130.1468 + #include <sys/types.h>
130.1469 +@@ -3272,7 +3385,7 @@
130.1470 + switch (0) case 0: case (sizeof (void *) == $ac_size):;
130.1471 + ; return 0; }
130.1472 + EOF
130.1473 +-if { (eval echo configure:3276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1474 ++if { (eval echo configure:3389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1475 +   rm -rf conftest*
130.1476 +   ac_cv_sizeof_void_p=$ac_size
130.1477 + else
130.1478 +@@ -3295,14 +3408,14 @@
130.1479 + 
130.1480 + 
130.1481 + echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
130.1482 +-echo "configure:3299: checking whether byte ordering is bigendian" >&5
130.1483 ++echo "configure:3412: checking whether byte ordering is bigendian" >&5
130.1484 + if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
130.1485 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1486 + else
130.1487 +   ac_cv_c_bigendian=unknown
130.1488 + # See if sys/param.h defines the BYTE_ORDER macro.
130.1489 + cat > conftest.$ac_ext <<EOF
130.1490 +-#line 3306 "configure"
130.1491 ++#line 3419 "configure"
130.1492 + #include "confdefs.h"
130.1493 + #include <sys/types.h>
130.1494 + #include <sys/param.h>
130.1495 +@@ -3313,11 +3426,11 @@
130.1496 + #endif
130.1497 + ; return 0; }
130.1498 + EOF
130.1499 +-if { (eval echo configure:3317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1500 ++if { (eval echo configure:3430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1501 +   rm -rf conftest*
130.1502 +   # It does; now see whether it defined to BIG_ENDIAN or not.
130.1503 + cat > conftest.$ac_ext <<EOF
130.1504 +-#line 3321 "configure"
130.1505 ++#line 3434 "configure"
130.1506 + #include "confdefs.h"
130.1507 + #include <sys/types.h>
130.1508 + #include <sys/param.h>
130.1509 +@@ -3328,7 +3441,7 @@
130.1510 + #endif
130.1511 + ; return 0; }
130.1512 + EOF
130.1513 +-if { (eval echo configure:3332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1514 ++if { (eval echo configure:3445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
130.1515 +   rm -rf conftest*
130.1516 +   ac_cv_c_bigendian=yes
130.1517 + else
130.1518 +@@ -3348,7 +3461,7 @@
130.1519 +    echo $ac_n "cross-compiling... " 2>&6 
130.1520 + else
130.1521 +   cat > conftest.$ac_ext <<EOF
130.1522 +-#line 3352 "configure"
130.1523 ++#line 3465 "configure"
130.1524 + #include "confdefs.h"
130.1525 + main () {
130.1526 +   /* Are we little or big endian?  From Harbison&Steele.  */
130.1527 +@@ -3361,7 +3474,7 @@
130.1528 +   exit (u.c[sizeof (long) - 1] == 1);
130.1529 + }
130.1530 + EOF
130.1531 +-if { (eval echo configure:3365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
130.1532 ++if { (eval echo configure:3478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
130.1533 + then
130.1534 +   ac_cv_c_bigendian=no
130.1535 + else
130.1536 +@@ -3379,7 +3492,7 @@
130.1537 + echo "$ac_t""$ac_cv_c_bigendian" 1>&6
130.1538 + if test $ac_cv_c_bigendian = unknown; then
130.1539 + echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
130.1540 +-echo "configure:3383: checking to probe for byte ordering" >&5
130.1541 ++echo "configure:3496: checking to probe for byte ordering" >&5
130.1542 + 
130.1543 + cat >conftest.c <<EOF
130.1544 + short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
130.1545 +@@ -3414,6 +3527,10 @@
130.1546 + #define WORDS_BIGENDIAN 1
130.1547 + EOF
130.1548 + 
130.1549 ++  cat >> confdefs.h <<\EOF
130.1550 ++#define HOST_WORDS_BIG_ENDIAN 1
130.1551 ++EOF
130.1552 ++
130.1553 +   BYTEORDER=4321
130.1554 + else
130.1555 +   BYTEORDER=1234
130.1556 +@@ -3429,7 +3546,7 @@
130.1557 + 
130.1558 + if test x$TARGET = xSPARC; then
130.1559 +     echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
130.1560 +-echo "configure:3433: checking assembler and linker support unaligned pc related relocs" >&5
130.1561 ++echo "configure:3550: checking assembler and linker support unaligned pc related relocs" >&5
130.1562 + if eval "test \"`echo '$''{'libffi_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
130.1563 +   echo $ac_n "(cached) $ac_c" 1>&6
130.1564 + else
130.1565 +@@ -3439,14 +3556,14 @@
130.1566 + 	CFLAGS="$CFLAGS -fpic"
130.1567 + 	LDFLAGS="$LDFLAGS -shared"
130.1568 + 	cat > conftest.$ac_ext <<EOF
130.1569 +-#line 3443 "configure"
130.1570 ++#line 3560 "configure"
130.1571 + #include "confdefs.h"
130.1572 + asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text");
130.1573 + int main() {
130.1574 + 
130.1575 + ; return 0; }
130.1576 + EOF
130.1577 +-if { (eval echo configure:3450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
130.1578 ++if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
130.1579 +   rm -rf conftest*
130.1580 +   libffi_cv_as_sparc_ua_pcrel=yes
130.1581 + else
130.1582 +@@ -3709,6 +3826,8 @@
130.1583 + s%@MIPS_GCC_FALSE@%$MIPS_GCC_FALSE%g
130.1584 + s%@MIPS_SGI_TRUE@%$MIPS_SGI_TRUE%g
130.1585 + s%@MIPS_SGI_FALSE@%$MIPS_SGI_FALSE%g
130.1586 ++s%@MIPS_LINUX_TRUE@%$MIPS_LINUX_TRUE%g
130.1587 ++s%@MIPS_LINUX_FALSE@%$MIPS_LINUX_FALSE%g
130.1588 + s%@SPARC_TRUE@%$SPARC_TRUE%g
130.1589 + s%@SPARC_FALSE@%$SPARC_FALSE%g
130.1590 + s%@X86_TRUE@%$X86_TRUE%g
130.1591 +@@ -3729,6 +3848,12 @@
130.1592 + s%@POWERPC_DARWIN_FALSE@%$POWERPC_DARWIN_FALSE%g
130.1593 + s%@ARM_TRUE@%$ARM_TRUE%g
130.1594 + s%@ARM_FALSE@%$ARM_FALSE%g
130.1595 ++s%@S390_TRUE@%$S390_TRUE%g
130.1596 ++s%@S390_FALSE@%$S390_FALSE%g
130.1597 ++s%@X86_64_TRUE@%$X86_64_TRUE%g
130.1598 ++s%@X86_64_FALSE@%$X86_64_FALSE%g
130.1599 ++s%@SH_TRUE@%$SH_TRUE%g
130.1600 ++s%@SH_FALSE@%$SH_FALSE%g
130.1601 + s%@CPP@%$CPP%g
130.1602 + s%@ALLOCA@%$ALLOCA%g
130.1603 + s%@TARGET@%$TARGET%g
130.1604 +@@ -3969,7 +4094,7 @@
130.1605 + 
130.1606 + if test -n "$CONFIG_FILES"; then
130.1607 +    LD="${ORIGINAL_LD_FOR_MULTILIBS}"
130.1608 +-   ac_file=Makefile . ${libffi_basedir}/../config-ml.in
130.1609 ++   ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in
130.1610 + fi
130.1611 + 
130.1612 + exit 0
130.1613 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/configure.in gcc/libffi/configure.in
130.1614 +--- gcc-3.2.2.orig/libffi/configure.in	Tue Jan 28 10:43:56 2003
130.1615 ++++ gcc/libffi/configure.in	Sat Feb  1 20:16:19 2003
130.1616 +@@ -22,14 +22,15 @@
130.1617 + 
130.1618 + if test "${srcdir}" = "."; then
130.1619 +   if test "${with_target_subdir}" != "."; then
130.1620 +-    libffi_basedir="${srcdir}/${with_multisrctop}.."
130.1621 ++    libffi_basedir="${with_multisrctop}../"
130.1622 +   else
130.1623 +-    libffi_basedir="${srcdir}/${with_multisrctop}"
130.1624 ++    libffi_basedir="${with_multisrctop}"
130.1625 +   fi
130.1626 + else
130.1627 +-  libffi_basedir="${srcdir}"
130.1628 ++  libffi_basedir=
130.1629 + fi
130.1630 + AC_SUBST(libffi_basedir)
130.1631 ++AC_CONFIG_AUX_DIR(${libffi_basedir}..)
130.1632 + 
130.1633 + AC_CANONICAL_HOST
130.1634 + 
130.1635 +@@ -56,17 +57,23 @@
130.1636 + i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
130.1637 + sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
130.1638 + sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
130.1639 +-sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
130.1640 +-sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
130.1641 +-alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;;
130.1642 ++sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;;
130.1643 ++sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;;
130.1644 ++alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
130.1645 + ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
130.1646 + m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
130.1647 ++mips64*-*);;
130.1648 ++mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;;
130.1649 + powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
130.1650 + powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
130.1651 + powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
130.1652 + powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
130.1653 + rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
130.1654 + arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
130.1655 ++s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
130.1656 ++s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
130.1657 ++x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;;
130.1658 ++sh-*-linux* | sh[[34]]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
130.1659 + esac
130.1660 + 
130.1661 + if test $TARGETDIR = unknown; then
130.1662 +@@ -75,6 +82,7 @@
130.1663 + 
130.1664 + AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
130.1665 + AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
130.1666 ++AM_CONDITIONAL(MIPS_LINUX, test x$TARGET = xMIPS_LINUX)
130.1667 + AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
130.1668 + AM_CONDITIONAL(X86, test x$TARGET = xX86)
130.1669 + AM_CONDITIONAL(X86_WIN32, test x$TARGET = xX86_WIN32)
130.1670 +@@ -85,6 +93,13 @@
130.1671 + AM_CONDITIONAL(POWERPC_AIX, test x$TARGET = xPOWERPC_AIX)
130.1672 + AM_CONDITIONAL(POWERPC_DARWIN, test x$TARGET = xPOWERPC_DARWIN)
130.1673 + AM_CONDITIONAL(ARM, test x$TARGET = xARM)
130.1674 ++AM_CONDITIONAL(S390, test x$TARGET = xS390)
130.1675 ++AM_CONDITIONAL(X86_64, test x$TARGET = xX86_64)
130.1676 ++AM_CONDITIONAL(SH, test x$TARGET = xSH)
130.1677 ++
130.1678 ++if test x$TARGET = xMIPS_LINUX; then
130.1679 ++  TARGET=MIPS
130.1680 ++fi
130.1681 + 
130.1682 + AC_HEADER_STDC
130.1683 + AC_CHECK_FUNCS(memcpy)
130.1684 +@@ -171,7 +186,7 @@
130.1685 + [
130.1686 + if test -n "$CONFIG_FILES"; then
130.1687 +    LD="${ORIGINAL_LD_FOR_MULTILIBS}"
130.1688 +-   ac_file=Makefile . ${libffi_basedir}/../config-ml.in
130.1689 ++   ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in
130.1690 + fi
130.1691 + ],
130.1692 + srcdir=${srcdir}
130.1693 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/include/Makefile.in gcc/libffi/include/Makefile.in
130.1694 +--- gcc-3.2.2.orig/libffi/include/Makefile.in	Tue Oct  9 14:32:16 2001
130.1695 ++++ gcc/libffi/include/Makefile.in	Mon Apr 29 13:14:44 2002
130.1696 +@@ -99,7 +99,7 @@
130.1697 + 
130.1698 + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
130.1699 + 
130.1700 +-TAR = gnutar
130.1701 ++TAR = gtar
130.1702 + GZIP_ENV = --best
130.1703 + all: all-redirect
130.1704 + .SUFFIXES:
130.1705 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/include/ffi.h.in gcc/libffi/include/ffi.h.in
130.1706 +--- gcc-3.2.2.orig/libffi/include/ffi.h.in	Wed Mar 13 07:35:56 2002
130.1707 ++++ gcc/libffi/include/ffi.h.in	Wed Jan 29 00:54:28 2003
130.1708 +@@ -1,5 +1,5 @@
130.1709 + /* -----------------------------------------------------------------*-C-*-
130.1710 +-   libffi @VERSION@ - Copyright (c) 1996-2002  Cygnus Solutions
130.1711 ++   libffi @VERSION@ - Copyright (c) 1996-2003  Cygnus Solutions
130.1712 + 
130.1713 +    Permission is hereby granted, free of charge, to any person obtaining
130.1714 +    a copy of this software and associated documentation files (the
130.1715 +@@ -164,6 +164,12 @@
130.1716 + #endif
130.1717 + #endif
130.1718 + 
130.1719 ++#ifdef S390
130.1720 ++#if defined (__s390x__)
130.1721 ++#define S390X
130.1722 ++#endif
130.1723 ++#endif
130.1724 ++
130.1725 + #ifndef LIBFFI_ASM
130.1726 + 
130.1727 + /* ---- Generic type definitions ----------------------------------------- */
130.1728 +@@ -189,16 +195,23 @@
130.1729 + #endif
130.1730 + #endif
130.1731 + 
130.1732 +-  /* ---- Intel x86 ---------------- */
130.1733 +-#ifdef X86
130.1734 ++  /* ---- Intel x86 Win32 ---------- */
130.1735 ++#ifdef X86_WIN32
130.1736 +   FFI_SYSV,
130.1737 ++  FFI_STDCALL,
130.1738 ++  /* TODO: Add fastcall support for the sake of completeness */
130.1739 +   FFI_DEFAULT_ABI = FFI_SYSV,
130.1740 + #endif
130.1741 + 
130.1742 +-  /* ---- Intel x86 Win32 ---------- */
130.1743 +-#ifdef X86_WIN32
130.1744 ++  /* ---- Intel x86 and AMD x86-64 - */
130.1745 ++#if !defined(X86_WIN32) && (defined(__i386__) || defined(__x86_64__))
130.1746 +   FFI_SYSV,
130.1747 ++  FFI_UNIX64,   /* Unix variants all use the same ABI for x86-64  */
130.1748 ++#ifdef __i386__
130.1749 +   FFI_DEFAULT_ABI = FFI_SYSV,
130.1750 ++#else
130.1751 ++  FFI_DEFAULT_ABI = FFI_UNIX64,
130.1752 ++#endif
130.1753 + #endif
130.1754 + 
130.1755 +   /* ---- Intel ia64 ---------------- */
130.1756 +@@ -251,6 +264,18 @@
130.1757 +   FFI_DEFAULT_ABI = FFI_SYSV,
130.1758 + #endif
130.1759 + 
130.1760 ++  /* ---- S390 --------------------- */
130.1761 ++#ifdef S390
130.1762 ++  FFI_SYSV,
130.1763 ++  FFI_DEFAULT_ABI = FFI_SYSV,
130.1764 ++#endif
130.1765 ++
130.1766 ++  /* ---- SuperH ------------------- */
130.1767 ++#ifdef SH
130.1768 ++  FFI_SYSV,
130.1769 ++  FFI_DEFAULT_ABI = FFI_SYSV,
130.1770 ++#endif
130.1771 ++
130.1772 +   /* Leave this for debugging purposes */
130.1773 +   FFI_LAST_ABI
130.1774 + 
130.1775 +@@ -264,7 +289,7 @@
130.1776 +   /*@null@*/ struct _ffi_type **elements;
130.1777 + } ffi_type;
130.1778 + 
130.1779 +-/* These are defined in ffi.c */
130.1780 ++/* These are defined in types.c */
130.1781 + extern ffi_type ffi_type_void;
130.1782 + extern ffi_type ffi_type_uint8;
130.1783 + extern ffi_type ffi_type_sint8;
130.1784 +@@ -373,13 +398,7 @@
130.1785 + 
130.1786 + /* ---- Definitions for closures ----------------------------------------- */
130.1787 + 
130.1788 +-#ifdef X86
130.1789 +-
130.1790 +-#define FFI_CLOSURES 1		/* x86 supports closures */
130.1791 +-#define FFI_TRAMPOLINE_SIZE 10
130.1792 +-#define FFI_NATIVE_RAW_API 1	/* and has native raw api support */
130.1793 +-
130.1794 +-#elif defined(X86_WIN32)
130.1795 ++#ifdef __i386__
130.1796 + 
130.1797 + #define FFI_CLOSURES 1		/* x86 supports closures */
130.1798 + #define FFI_TRAMPOLINE_SIZE 10
130.1799 +@@ -424,6 +443,40 @@
130.1800 + #define FFI_TRAMPOLINE_SIZE 24 /* see struct below */ 
130.1801 + #define FFI_NATIVE_RAW_API 0
130.1802 + 
130.1803 ++#elif defined(SPARC64)
130.1804 ++
130.1805 ++#define FFI_CLOSURES 1
130.1806 ++#define FFI_TRAMPOLINE_SIZE 24
130.1807 ++#define FFI_NATIVE_RAW_API 0
130.1808 ++
130.1809 ++#elif defined(SPARC)
130.1810 ++
130.1811 ++#define FFI_CLOSURES 1
130.1812 ++#define FFI_TRAMPOLINE_SIZE 16
130.1813 ++#define FFI_NATIVE_RAW_API 0
130.1814 ++
130.1815 ++#elif defined(S390)
130.1816 ++
130.1817 ++#define FFI_CLOSURES 1
130.1818 ++#ifdef S390X
130.1819 ++#define FFI_TRAMPOLINE_SIZE 32
130.1820 ++#else
130.1821 ++#define FFI_TRAMPOLINE_SIZE 16
130.1822 ++#endif
130.1823 ++#define FFI_NATIVE_RAW_API 0
130.1824 ++
130.1825 ++#elif defined(SH)
130.1826 ++
130.1827 ++#define FFI_CLOSURES 1
130.1828 ++#define FFI_TRAMPOLINE_SIZE 16
130.1829 ++#define FFI_NATIVE_RAW_API 0
130.1830 ++
130.1831 ++#elif defined(__x86_64__)
130.1832 ++
130.1833 ++#define FFI_CLOSURES 1
130.1834 ++#define FFI_TRAMPOLINE_SIZE 24
130.1835 ++#define FFI_NATIVE_RAW_API 0
130.1836 ++
130.1837 + #else 
130.1838 + 
130.1839 + #define FFI_CLOSURES 0
130.1840 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/arm/ffi.c gcc/libffi/src/arm/ffi.c
130.1841 +--- gcc-3.2.2.orig/libffi/src/arm/ffi.c	Sat Mar  3 07:21:23 2001
130.1842 ++++ gcc/libffi/src/arm/ffi.c	Fri Jul 19 08:08:30 2002
130.1843 +@@ -36,13 +36,10 @@
130.1844 + /*@=exportheader@*/
130.1845 + {
130.1846 +   register unsigned int i;
130.1847 +-  register int tmp;
130.1848 +-  register unsigned int avn;
130.1849 +   register void **p_argv;
130.1850 +   register char *argp;
130.1851 +   register ffi_type **p_arg;
130.1852 + 
130.1853 +-  tmp = 0;
130.1854 +   argp = stack;
130.1855 + 
130.1856 +   if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT ) {
130.1857 +@@ -50,11 +47,10 @@
130.1858 +     argp += 4;
130.1859 +   }
130.1860 + 
130.1861 +-  avn = ecif->cif->nargs;
130.1862 +   p_argv = ecif->avalue;
130.1863 + 
130.1864 +   for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
130.1865 +-       (i != 0) && (avn != 0);
130.1866 ++       (i != 0);
130.1867 +        i--, p_arg++)
130.1868 +     {
130.1869 +       size_t z;
130.1870 +@@ -64,9 +60,6 @@
130.1871 + 	argp = (char *) ALIGN(argp, (*p_arg)->alignment);
130.1872 +       }
130.1873 + 
130.1874 +-      if (avn != 0) 
130.1875 +-	{
130.1876 +-	  avn--;
130.1877 + 	  z = (*p_arg)->size;
130.1878 + 	  if (z < sizeof(int))
130.1879 + 	    {
130.1880 +@@ -107,7 +100,6 @@
130.1881 + 	    }
130.1882 + 	  p_argv++;
130.1883 + 	  argp += z;
130.1884 +-	}
130.1885 +     }
130.1886 +   
130.1887 +   return;
130.1888 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/arm/sysv.S gcc/libffi/src/arm/sysv.S
130.1889 +--- gcc-3.2.2.orig/libffi/src/arm/sysv.S	Sat Mar  3 07:21:23 2001
130.1890 ++++ gcc/libffi/src/arm/sysv.S	Mon Sep 30 03:08:58 2002
130.1891 +@@ -28,8 +28,15 @@
130.1892 + #ifdef HAVE_MACHINE_ASM_H
130.1893 + #include <machine/asm.h>
130.1894 + #else
130.1895 +-/* XXX these lose for some platforms, I'm sure. */
130.1896 ++#ifdef __USER_LABEL_PREFIX__
130.1897 ++#define CONCAT1(a, b) CONCAT2(a, b)
130.1898 ++#define CONCAT2(a, b) a ## b
130.1899 ++
130.1900 ++/* Use the right prefix for global labels.  */
130.1901 ++#define CNAME(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
130.1902 ++#else
130.1903 + #define CNAME(x) x
130.1904 ++#endif
130.1905 + #define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x):
130.1906 + #endif
130.1907 + 	
130.1908 +@@ -96,12 +103,20 @@
130.1909 + 
130.1910 + # return FLOAT
130.1911 + 	cmp     a4, #FFI_TYPE_FLOAT
130.1912 ++#ifdef __SOFTFP__
130.1913 ++	streq	a1, [a3]
130.1914 ++#else
130.1915 + 	stfeqs  f0, [a3]
130.1916 ++#endif
130.1917 + 	beq     epilogue
130.1918 + 
130.1919 + # return DOUBLE or LONGDOUBLE
130.1920 + 	cmp     a4, #FFI_TYPE_DOUBLE
130.1921 ++#ifdef __SOFTFP__
130.1922 ++	stmeqia	a3, {a1, a2}
130.1923 ++#else
130.1924 + 	stfeqd  f0, [a3]
130.1925 ++#endif
130.1926 + 
130.1927 + epilogue:
130.1928 +         ldmfd sp!, {a1-a4, fp, pc}
130.1929 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/java_raw_api.c gcc/libffi/src/java_raw_api.c
130.1930 +--- gcc-3.2.2.orig/libffi/src/java_raw_api.c	Tue Apr  9 07:31:14 2002
130.1931 ++++ gcc/libffi/src/java_raw_api.c	Tue Oct  8 23:55:02 2002
130.1932 +@@ -81,21 +81,14 @@
130.1933 + 	{
130.1934 + 	case FFI_TYPE_UINT8:
130.1935 + 	case FFI_TYPE_SINT8:
130.1936 +-	  *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 1);
130.1937 ++	  *args = (void*) ((char*)(raw++) + 3);
130.1938 + 	  break;
130.1939 + 	  
130.1940 + 	case FFI_TYPE_UINT16:
130.1941 + 	case FFI_TYPE_SINT16:
130.1942 +-	  *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 2);
130.1943 ++	  *args = (void*) ((char*)(raw++) + 2);
130.1944 + 	  break;
130.1945 + 
130.1946 +-#if SIZEOF_ARG >= 4	  
130.1947 +-	case FFI_TYPE_UINT32:
130.1948 +-	case FFI_TYPE_SINT32:
130.1949 +-	  *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 4);
130.1950 +-	  break;
130.1951 +-#endif
130.1952 +-	
130.1953 + #if SIZEOF_ARG == 8	  
130.1954 + 	case FFI_TYPE_UINT64:
130.1955 + 	case FFI_TYPE_SINT64:
130.1956 +@@ -157,31 +150,54 @@
130.1957 +       switch ((*tp)->type)
130.1958 + 	{
130.1959 + 	case FFI_TYPE_UINT8:
130.1960 ++#if WORDS_BIGENDIAN
130.1961 ++	  *(UINT32*)(raw++) = *(UINT8*) (*args);
130.1962 ++#else
130.1963 + 	  (raw++)->uint = *(UINT8*) (*args);
130.1964 ++#endif
130.1965 + 	  break;
130.1966 + 
130.1967 + 	case FFI_TYPE_SINT8:
130.1968 ++#if WORDS_BIGENDIAN
130.1969 ++	  *(SINT32*)(raw++) = *(SINT8*) (*args);
130.1970 ++#else
130.1971 + 	  (raw++)->sint = *(SINT8*) (*args);
130.1972 ++#endif
130.1973 + 	  break;
130.1974 + 
130.1975 + 	case FFI_TYPE_UINT16:
130.1976 ++#if WORDS_BIGENDIAN
130.1977 ++	  *(UINT32*)(raw++) = *(UINT16*) (*args);
130.1978 ++#else
130.1979 + 	  (raw++)->uint = *(UINT16*) (*args);
130.1980 ++#endif
130.1981 + 	  break;
130.1982 + 
130.1983 + 	case FFI_TYPE_SINT16:
130.1984 ++#if WORDS_BIGENDIAN
130.1985 ++	  *(SINT32*)(raw++) = *(SINT16*) (*args);
130.1986 ++#else
130.1987 + 	  (raw++)->sint = *(SINT16*) (*args);
130.1988 ++#endif
130.1989 + 	  break;
130.1990 + 
130.1991 +-#if SIZEOF_ARG >= 4
130.1992 + 	case FFI_TYPE_UINT32:
130.1993 ++#if WORDS_BIGENDIAN
130.1994 ++	  *(UINT32*)(raw++) = *(UINT32*) (*args);
130.1995 ++#else
130.1996 + 	  (raw++)->uint = *(UINT32*) (*args);
130.1997 ++#endif
130.1998 + 	  break;
130.1999 + 
130.2000 + 	case FFI_TYPE_SINT32:
130.2001 ++#if WORDS_BIGENDIAN
130.2002 ++	  *(SINT32*)(raw++) = *(SINT32*) (*args);
130.2003 ++#else
130.2004 + 	  (raw++)->sint = *(SINT32*) (*args);
130.2005 +-	  break;
130.2006 + #endif
130.2007 +-        case FFI_TYPE_FLOAT:
130.2008 ++	  break;
130.2009 ++
130.2010 ++	case FFI_TYPE_FLOAT:
130.2011 + 	  (raw++)->flt = *(FLOAT32*) (*args);
130.2012 + 	  break;
130.2013 + 
130.2014 +@@ -211,6 +227,55 @@
130.2015 + 
130.2016 + #if !FFI_NATIVE_RAW_API
130.2017 + 
130.2018 ++static void
130.2019 ++ffi_java_rvalue_to_raw (ffi_cif *cif, void *rvalue)
130.2020 ++{
130.2021 ++#if WORDS_BIGENDIAN && SIZEOF_ARG == 8
130.2022 ++  switch (cif->rtype->type)
130.2023 ++    {
130.2024 ++    case FFI_TYPE_UINT8:
130.2025 ++    case FFI_TYPE_UINT16:
130.2026 ++    case FFI_TYPE_UINT32:
130.2027 ++      *(UINT64 *)rvalue <<= 32;
130.2028 ++      break;
130.2029 ++
130.2030 ++    case FFI_TYPE_SINT8:
130.2031 ++    case FFI_TYPE_SINT16:
130.2032 ++    case FFI_TYPE_SINT32:
130.2033 ++    case FFI_TYPE_INT:
130.2034 ++      *(SINT64 *)rvalue <<= 32;
130.2035 ++      break;
130.2036 ++
130.2037 ++    default:
130.2038 ++      break;
130.2039 ++    }
130.2040 ++#endif
130.2041 ++}
130.2042 ++
130.2043 ++static void
130.2044 ++ffi_java_raw_to_rvalue (ffi_cif *cif, void *rvalue)
130.2045 ++{
130.2046 ++#if WORDS_BIGENDIAN && SIZEOF_ARG == 8
130.2047 ++  switch (cif->rtype->type)
130.2048 ++    {
130.2049 ++    case FFI_TYPE_UINT8:
130.2050 ++    case FFI_TYPE_UINT16:
130.2051 ++    case FFI_TYPE_UINT32:
130.2052 ++      *(UINT64 *)rvalue >>= 32;
130.2053 ++      break;
130.2054 ++
130.2055 ++    case FFI_TYPE_SINT8:
130.2056 ++    case FFI_TYPE_SINT16:
130.2057 ++    case FFI_TYPE_SINT32:
130.2058 ++    case FFI_TYPE_INT:
130.2059 ++      *(SINT64 *)rvalue >>= 32;
130.2060 ++      break;
130.2061 ++
130.2062 ++    default:
130.2063 ++      break;
130.2064 ++    }
130.2065 ++#endif
130.2066 ++}
130.2067 + 
130.2068 + /* This is a generic definition of ffi_raw_call, to be used if the
130.2069 +  * native system does not provide a machine-specific implementation.
130.2070 +@@ -227,6 +292,7 @@
130.2071 +   void **avalue = (void**) alloca (cif->nargs * sizeof (void*));
130.2072 +   ffi_java_raw_to_ptrarray (cif, raw, avalue);
130.2073 +   ffi_call (cif, fn, rvalue, avalue);
130.2074 ++  ffi_java_rvalue_to_raw (cif, rvalue);
130.2075 + }
130.2076 + 
130.2077 + #if FFI_CLOSURES		/* base system provides closures */
130.2078 +@@ -240,6 +306,7 @@
130.2079 + 
130.2080 +   ffi_java_ptrarray_to_raw (cif, avalue, raw);
130.2081 +   (*cl->fun) (cif, rvalue, raw, cl->user_data);
130.2082 ++  ffi_java_raw_to_rvalue (cif, rvalue);
130.2083 + }
130.2084 + 
130.2085 + /* Again, here is the generic version of ffi_prep_raw_closure, which
130.2086 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/m68k/ffi.c gcc/libffi/src/m68k/ffi.c
130.2087 +--- gcc-3.2.2.orig/libffi/src/m68k/ffi.c	Sun Aug  8 22:27:19 1999
130.2088 ++++ gcc/libffi/src/m68k/ffi.c	Fri Jul 19 08:08:30 2002
130.2089 +@@ -16,14 +16,11 @@
130.2090 + ffi_prep_args (void *stack, extended_cif *ecif)
130.2091 + {
130.2092 +   unsigned int i;
130.2093 +-  int tmp;
130.2094 +-  unsigned int avn;
130.2095 +   void **p_argv;
130.2096 +   char *argp;
130.2097 +   ffi_type **p_arg;
130.2098 +   void *struct_value_ptr;
130.2099 + 
130.2100 +-  tmp = 0;
130.2101 +   argp = stack;
130.2102 + 
130.2103 +   if (ecif->cif->rtype->type == FFI_TYPE_STRUCT
130.2104 +@@ -32,11 +29,10 @@
130.2105 +   else
130.2106 +     struct_value_ptr = NULL;
130.2107 + 
130.2108 +-  avn = ecif->cif->nargs;
130.2109 +   p_argv = ecif->avalue;
130.2110 + 
130.2111 +   for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
130.2112 +-       i != 0 && avn != 0;
130.2113 ++       i != 0;
130.2114 +        i--, p_arg++)
130.2115 +     {
130.2116 +       size_t z;
130.2117 +@@ -45,9 +41,6 @@
130.2118 +       if (((*p_arg)->alignment - 1) & (unsigned) argp)
130.2119 + 	argp = (char *) ALIGN (argp, (*p_arg)->alignment);
130.2120 + 
130.2121 +-      if (avn != 0) 
130.2122 +-	{
130.2123 +-	  avn--;
130.2124 + 	  z = (*p_arg)->size;
130.2125 + 	  if (z < sizeof (int))
130.2126 + 	    {
130.2127 +@@ -82,7 +75,6 @@
130.2128 + 	    memcpy (argp, *p_argv, z);
130.2129 + 	  p_argv++;
130.2130 + 	  argp += z;
130.2131 +-	}
130.2132 +     }
130.2133 + 
130.2134 +   return struct_value_ptr;
130.2135 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/mips/ffi.c gcc/libffi/src/mips/ffi.c
130.2136 +--- gcc-3.2.2.orig/libffi/src/mips/ffi.c	Sat Mar  3 07:21:23 2001
130.2137 ++++ gcc/libffi/src/mips/ffi.c	Fri Jul 19 08:08:31 2002
130.2138 +@@ -23,6 +23,7 @@
130.2139 +    OTHER DEALINGS IN THE SOFTWARE.
130.2140 +    ----------------------------------------------------------------------- */
130.2141 + 
130.2142 ++#include <sgidefs.h>
130.2143 + #include <ffi.h>
130.2144 + #include <ffi_common.h>
130.2145 + 
130.2146 +@@ -50,7 +51,6 @@
130.2147 + 			  int flags)
130.2148 + {
130.2149 +   register int i;
130.2150 +-  register int avn;
130.2151 +   register void **p_argv;
130.2152 +   register char *argp;
130.2153 +   register ffi_type **p_arg;
130.2154 +@@ -80,12 +80,9 @@
130.2155 +       FIX_ARGP;
130.2156 +     }
130.2157 + 
130.2158 +-  avn = ecif->cif->nargs;
130.2159 +   p_argv = ecif->avalue;
130.2160 + 
130.2161 +-  for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
130.2162 +-       i && avn;
130.2163 +-       i--, p_arg++)
130.2164 ++  for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++)
130.2165 +     {
130.2166 +       size_t z;
130.2167 + 
130.2168 +@@ -101,9 +98,6 @@
130.2169 + #define OFFSET sizeof(int)
130.2170 + #endif      
130.2171 + 
130.2172 +-      if (avn) 
130.2173 +-	{
130.2174 +-	  avn--;
130.2175 + 	  z = (*p_arg)->size;
130.2176 + 	  if (z < sizeof(SLOT_TYPE_UNSIGNED))
130.2177 + 	    {
130.2178 +@@ -179,7 +173,6 @@
130.2179 + 	  p_argv++;
130.2180 + 	  argp += z;
130.2181 + 	  FIX_ARGP;
130.2182 +-	}
130.2183 +     }
130.2184 +   
130.2185 +   return;
130.2186 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/powerpc/darwin.S gcc/libffi/src/powerpc/darwin.S
130.2187 +--- gcc-3.2.2.orig/libffi/src/powerpc/darwin.S	Sat Jan 19 01:22:34 2002
130.2188 ++++ gcc/libffi/src/powerpc/darwin.S	Thu Jan 23 03:21:55 2003
130.2189 +@@ -3,8 +3,6 @@
130.2190 +    
130.2191 +    PowerPC Assembly glue.
130.2192 + 
130.2193 +-   $Id: darwin.S,v 1.2 2002/01/18 16:22:34 dje Exp $
130.2194 +-
130.2195 +    Permission is hereby granted, free of charge, to any person obtaining
130.2196 +    a copy of this software and associated documentation files (the
130.2197 +    ``Software''), to deal in the Software without restriction, including
130.2198 +@@ -39,30 +37,34 @@
130.2199 + .text
130.2200 + 	.align 2
130.2201 + _ffi_call_DARWIN:
130.2202 +-	mr      r12,r8 // We only need r12 until the call, so it doesn't have to be saved...
130.2203 ++LFB0:	
130.2204 ++	mr      r12,r8		/* We only need r12 until the call,
130.2205 ++				so it doesn't have to be saved...  */
130.2206 ++LFB1:	
130.2207 + 	/* Save the old stack pointer as AP.  */
130.2208 + 	mr	r8,r1
130.2209 +-
130.2210 ++LCFI0:	
130.2211 + 	/* Allocate the stack space we need.  */
130.2212 + 	stwux	r1,r1,r4	
130.2213 + 	
130.2214 + 	/* Save registers we use.  */
130.2215 + 	mflr	r9
130.2216 + 
130.2217 +-	stw	r28,-16(r8)
130.2218 ++	stw	r28,-16(r8)	
130.2219 + 	stw	r29,-12(r8)
130.2220 + 	stw	r30, -8(r8)
130.2221 + 	stw	r31, -4(r8)
130.2222 +-	
130.2223 +-	stw	r9,  8(r8)
130.2224 ++
130.2225 ++	stw	r9,  8(r8)	
130.2226 + 	stw	r2, 20(r1)
130.2227 ++LCFI1:	
130.2228 + 
130.2229 + 	/* Save arguments over call...  */
130.2230 +-	mr	r31,r5	/* flags, */
130.2231 +-	mr	r30,r6	/* rvalue, */
130.2232 +-	mr	r29,r7	/* function address, */
130.2233 +-	mr	r28,r8	/* our AP. */
130.2234 +-		
130.2235 ++	mr	r31,r5	/* flags,  */
130.2236 ++	mr	r30,r6	/* rvalue,  */
130.2237 ++	mr	r29,r7	/* function address,  */
130.2238 ++	mr	r28,r8	/* our AP.  */
130.2239 ++LCFI2:		
130.2240 + 	/* Call ffi_prep_args.  */
130.2241 + 	mr	r4,r1
130.2242 + 	li	r9,0
130.2243 +@@ -145,7 +147,8 @@
130.2244 + L(float_return_value):
130.2245 + 	stfs	f1,0(r30)
130.2246 + 	b	L(done_return_value)
130.2247 +-//END(_ffi_call_DARWIN)
130.2248 ++LFE1:	
130.2249 ++/* END(_ffi_call_DARWIN)  */
130.2250 + 
130.2251 + /* Provide a null definition of _ffi_call_AIX.  */
130.2252 + .text
130.2253 +@@ -155,5 +158,61 @@
130.2254 + 	.align 2
130.2255 + _ffi_call_AIX:
130.2256 + 	blr
130.2257 +-//END(_ffi_call_AIX)
130.2258 ++/* END(_ffi_call_AIX)  */
130.2259 + 
130.2260 ++.data
130.2261 ++.section __TEXT,__eh_frame
130.2262 ++Lframe1:
130.2263 ++	.set	L$set$0,LECIE1-LSCIE1
130.2264 ++	.long	L$set$0	; Length of Common Information Entry
130.2265 ++LSCIE1:
130.2266 ++	.long	0x0	; CIE Identifier Tag
130.2267 ++	.byte	0x1	; CIE Version
130.2268 ++	.ascii	"zR\0"	; CIE Augmentation
130.2269 ++	.byte	0x1	; uleb128 0x1; CIE Code Alignment Factor
130.2270 ++	.byte	0x7c	; sleb128 -4; CIE Data Alignment Factor
130.2271 ++	.byte	0x41	; CIE RA Column
130.2272 ++	.byte   0x1     ; uleb128 0x1; Augmentation size
130.2273 ++	.byte   0x10    ; FDE Encoding (pcrel)
130.2274 ++	.byte	0xc	; DW_CFA_def_cfa
130.2275 ++	.byte	0x1	; uleb128 0x1
130.2276 ++	.byte	0x0	; uleb128 0x0
130.2277 ++	.align	2
130.2278 ++LECIE1:
130.2279 ++LSFDE1:
130.2280 ++	.set	L$set$1,LEFDE1-LASFDE1
130.2281 ++	.long	L$set$1	; FDE Length
130.2282 ++LASFDE1:
130.2283 ++	.set	L$set$2,LASFDE1-Lframe1
130.2284 ++	.long	L$set$2	; FDE CIE offset
130.2285 ++	.long	LFB0-.	; FDE initial location
130.2286 ++	.set	L$set$3,LFE1-LFB0
130.2287 ++	.long	L$set$3	; FDE address range
130.2288 ++	.byte   0x0     ; uleb128 0x0; Augmentation size
130.2289 ++	.byte	0x4	; DW_CFA_advance_loc4
130.2290 ++	.set	L$set$4,LCFI0-LFB1
130.2291 ++	.long	L$set$4
130.2292 ++	.byte	0xd	; DW_CFA_def_cfa_register
130.2293 ++	.byte	0x08	; uleb128 0x08 
130.2294 ++	.byte	0x4	; DW_CFA_advance_loc4
130.2295 ++	.set	L$set$5,LCFI1-LCFI0
130.2296 ++	.long	L$set$5
130.2297 ++	.byte   0x11    ; DW_CFA_offset_extended_sf
130.2298 ++	.byte	0x41	; uleb128 0x41
130.2299 ++	.byte   0x7e    ; sleb128 -2
130.2300 ++	.byte	0x9f	; DW_CFA_offset, column 0x1f 
130.2301 ++	.byte	0x1	; uleb128 0x1 
130.2302 ++	.byte	0x9e	; DW_CFA_offset, column 0x1e
130.2303 ++	.byte	0x2	; uleb128 0x2
130.2304 ++	.byte	0x9d	; DW_CFA_offset, column 0x1d 
130.2305 ++	.byte	0x3	; uleb128 0x3 
130.2306 ++	.byte	0x9c	; DW_CFA_offset, column 0x1c 
130.2307 ++	.byte	0x4	; uleb128 0x4
130.2308 ++	.byte	0x4	; DW_CFA_advance_loc4 
130.2309 ++	.set	L$set$6,LCFI2-LCFI1
130.2310 ++	.long	L$set$6
130.2311 ++	.byte	0xd	; DW_CFA_def_cfa_register 
130.2312 ++	.byte	0x1c	; uleb128 0x1c 
130.2313 ++	.align 2
130.2314 ++LEFDE1:
130.2315 ++	
130.2316 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/prep_cif.c gcc/libffi/src/prep_cif.c
130.2317 +--- gcc-3.2.2.orig/libffi/src/prep_cif.c	Sat Mar  3 07:21:22 2001
130.2318 ++++ gcc/libffi/src/prep_cif.c	Mon Sep 30 20:59:42 2002
130.2319 +@@ -103,7 +103,8 @@
130.2320 +   /* Perform a sanity check on the return type */
130.2321 +   FFI_ASSERT(ffi_type_test(cif->rtype));
130.2322 + 
130.2323 +-#ifndef M68K
130.2324 ++  /* x86-64 and s390 stack space allocation is handled in prep_machdep.  */
130.2325 ++#if !defined M68K && !defined __x86_64__ && !defined S390
130.2326 +   /* Make space for the return structure pointer */
130.2327 +   if (cif->rtype->type == FFI_TYPE_STRUCT
130.2328 + #ifdef SPARC
130.2329 +@@ -122,6 +123,7 @@
130.2330 +       if (((*ptr)->size == 0) && (initialize_aggregate((*ptr)) != FFI_OK))
130.2331 + 	return FFI_BAD_TYPEDEF;
130.2332 + 
130.2333 ++#if !defined __x86_64__ && !defined S390
130.2334 + #ifdef SPARC
130.2335 +       if (((*ptr)->type == FFI_TYPE_STRUCT
130.2336 + 	   && ((*ptr)->size > 16 || cif->abi != FFI_V9))
130.2337 +@@ -137,6 +139,7 @@
130.2338 + 	  
130.2339 + 	  bytes += STACK_ARG_SIZE((*ptr)->size);
130.2340 + 	}
130.2341 ++#endif
130.2342 +     }
130.2343 + 
130.2344 +   cif->bytes = bytes;
130.2345 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/s390/ffi.c gcc/libffi/src/s390/ffi.c
130.2346 +--- gcc-3.2.2.orig/libffi/src/s390/ffi.c	Thu Jan  1 09:00:00 1970
130.2347 ++++ gcc/libffi/src/s390/ffi.c	Thu Feb  6 08:58:57 2003
130.2348 +@@ -0,0 +1,753 @@
130.2349 ++/* -----------------------------------------------------------------------
130.2350 ++   ffi.c - Copyright (c) 2000 Software AG
130.2351 ++ 
130.2352 ++   S390 Foreign Function Interface
130.2353 ++ 
130.2354 ++   Permission is hereby granted, free of charge, to any person obtaining
130.2355 ++   a copy of this software and associated documentation files (the
130.2356 ++   ``Software''), to deal in the Software without restriction, including
130.2357 ++   without limitation the rights to use, copy, modify, merge, publish,
130.2358 ++   distribute, sublicense, and/or sell copies of the Software, and to
130.2359 ++   permit persons to whom the Software is furnished to do so, subject to
130.2360 ++   the following conditions:
130.2361 ++ 
130.2362 ++   The above copyright notice and this permission notice shall be included
130.2363 ++   in all copies or substantial portions of the Software.
130.2364 ++ 
130.2365 ++   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
130.2366 ++   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
130.2367 ++   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
130.2368 ++   IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR
130.2369 ++   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
130.2370 ++   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
130.2371 ++   OTHER DEALINGS IN THE SOFTWARE.
130.2372 ++   ----------------------------------------------------------------------- */
130.2373 ++/*====================================================================*/
130.2374 ++/*                          Includes                                  */
130.2375 ++/*                          --------                                  */
130.2376 ++/*====================================================================*/
130.2377 ++ 
130.2378 ++#include <ffi.h>
130.2379 ++#include <ffi_common.h>
130.2380 ++ 
130.2381 ++#include <stdlib.h>
130.2382 ++#include <stdio.h>
130.2383 ++ 
130.2384 ++/*====================== End of Includes =============================*/
130.2385 ++ 
130.2386 ++/*====================================================================*/
130.2387 ++/*                           Defines                                  */
130.2388 ++/*                           -------                                  */
130.2389 ++/*====================================================================*/
130.2390 ++
130.2391 ++/* Maximum number of GPRs available for argument passing.  */ 
130.2392 ++#define MAX_GPRARGS 5
130.2393 ++
130.2394 ++/* Maximum number of FPRs available for argument passing.  */ 
130.2395 ++#ifdef __s390x__
130.2396 ++#define MAX_FPRARGS 4
130.2397 ++#else
130.2398 ++#define MAX_FPRARGS 2
130.2399 ++#endif
130.2400 ++
130.2401 ++/* Round to multiple of 16.  */
130.2402 ++#define ROUND_SIZE(size) (((size) + 15) & ~15)
130.2403 ++
130.2404 ++/* If these values change, sysv.S must be adapted!  */
130.2405 ++#define FFI390_RET_VOID		0
130.2406 ++#define FFI390_RET_STRUCT	1
130.2407 ++#define FFI390_RET_FLOAT	2
130.2408 ++#define FFI390_RET_DOUBLE	3
130.2409 ++#define FFI390_RET_INT32	4
130.2410 ++#define FFI390_RET_INT64	5
130.2411 ++
130.2412 ++/*===================== End of Defines ===============================*/
130.2413 ++ 
130.2414 ++/*====================================================================*/
130.2415 ++/*                          Prototypes                                */
130.2416 ++/*                          ----------                                */
130.2417 ++/*====================================================================*/
130.2418 ++ 
130.2419 ++static void ffi_prep_args (unsigned char *, extended_cif *);
130.2420 ++static int ffi_check_float_struct (ffi_type *);
130.2421 ++void
130.2422 ++#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2)
130.2423 ++__attribute__ ((visibility ("hidden")))
130.2424 ++#endif
130.2425 ++ffi_closure_helper_SYSV (ffi_closure *, unsigned long *, 
130.2426 ++			 unsigned long long *, unsigned long *);
130.2427 ++
130.2428 ++/*====================== End of Prototypes ===========================*/
130.2429 ++ 
130.2430 ++/*====================================================================*/
130.2431 ++/*                          Externals                                 */
130.2432 ++/*                          ---------                                 */
130.2433 ++/*====================================================================*/
130.2434 ++ 
130.2435 ++extern void ffi_call_SYSV(unsigned,
130.2436 ++			  extended_cif *,
130.2437 ++			  void (*)(unsigned char *, extended_cif *),
130.2438 ++			  unsigned,
130.2439 ++			  void *,
130.2440 ++			  void (*fn)());
130.2441 ++
130.2442 ++extern void ffi_closure_SYSV(void);
130.2443 ++ 
130.2444 ++/*====================== End of Externals ============================*/
130.2445 ++ 
130.2446 ++/*====================================================================*/
130.2447 ++/*                                                                    */
130.2448 ++/* Name     - ffi_check_struct_type.                                  */
130.2449 ++/*                                                                    */
130.2450 ++/* Function - Determine if a structure can be passed within a         */
130.2451 ++/*            general purpose or floating point register.             */
130.2452 ++/*                                                                    */
130.2453 ++/*====================================================================*/
130.2454 ++ 
130.2455 ++static int
130.2456 ++ffi_check_struct_type (ffi_type *arg)
130.2457 ++{
130.2458 ++  size_t size = arg->size;
130.2459 ++
130.2460 ++  /* If the struct has just one element, look at that element
130.2461 ++     to find out whether to consider the struct as floating point.  */
130.2462 ++  while (arg->type == FFI_TYPE_STRUCT 
130.2463 ++         && arg->elements[0] && !arg->elements[1])
130.2464 ++    arg = arg->elements[0];
130.2465 ++
130.2466 ++  /* Structs of size 1, 2, 4, and 8 are passed in registers,
130.2467 ++     just like the corresponding int/float types.  */
130.2468 ++  switch (size)
130.2469 ++    {
130.2470 ++      case 1:
130.2471 ++        return FFI_TYPE_UINT8;
130.2472 ++
130.2473 ++      case 2:
130.2474 ++        return FFI_TYPE_UINT16;
130.2475 ++
130.2476 ++      case 4:
130.2477 ++	if (arg->type == FFI_TYPE_FLOAT)
130.2478 ++          return FFI_TYPE_FLOAT;
130.2479 ++	else
130.2480 ++	  return FFI_TYPE_UINT32;
130.2481 ++
130.2482 ++      case 8:
130.2483 ++	if (arg->type == FFI_TYPE_DOUBLE)
130.2484 ++          return FFI_TYPE_DOUBLE;
130.2485 ++	else
130.2486 ++	  return FFI_TYPE_UINT64;
130.2487 ++
130.2488 ++      default:
130.2489 ++	break;
130.2490 ++    }
130.2491 ++
130.2492 ++  /* Other structs are passed via a pointer to the data.  */
130.2493 ++  return FFI_TYPE_POINTER;
130.2494 ++}
130.2495 ++ 
130.2496 ++/*======================== End of Routine ============================*/
130.2497 ++ 
130.2498 ++/*====================================================================*/
130.2499 ++/*                                                                    */
130.2500 ++/* Name     - ffi_prep_args.                                          */
130.2501 ++/*                                                                    */
130.2502 ++/* Function - Prepare parameters for call to function.                */
130.2503 ++/*                                                                    */
130.2504 ++/* ffi_prep_args is called by the assembly routine once stack space   */
130.2505 ++/* has been allocated for the function's arguments.                   */
130.2506 ++/*                                                                    */
130.2507 ++/*====================================================================*/
130.2508 ++ 
130.2509 ++static void
130.2510 ++ffi_prep_args (unsigned char *stack, extended_cif *ecif)
130.2511 ++{
130.2512 ++  /* The stack space will be filled with those areas:
130.2513 ++
130.2514 ++	FPR argument register save area     (highest addresses)
130.2515 ++	GPR argument register save area
130.2516 ++	temporary struct copies
130.2517 ++	overflow argument area              (lowest addresses)
130.2518 ++
130.2519 ++     We set up the following pointers:
130.2520 ++
130.2521 ++        p_fpr: bottom of the FPR area (growing upwards)
130.2522 ++	p_gpr: bottom of the GPR area (growing upwards)
130.2523 ++	p_ov: bottom of the overflow area (growing upwards)
130.2524 ++	p_struct: top of the struct copy area (growing downwards)
130.2525 ++
130.2526 ++     All areas are kept aligned to twice the word size.  */
130.2527 ++
130.2528 ++  int gpr_off = ecif->cif->bytes;
130.2529 ++  int fpr_off = gpr_off + ROUND_SIZE (MAX_GPRARGS * sizeof (long));
130.2530 ++
130.2531 ++  unsigned long long *p_fpr = (unsigned long long *)(stack + fpr_off);
130.2532 ++  unsigned long *p_gpr = (unsigned long *)(stack + gpr_off);
130.2533 ++  unsigned char *p_struct = (unsigned char *)p_gpr;
130.2534 ++  unsigned long *p_ov = (unsigned long *)stack;
130.2535 ++
130.2536 ++  int n_fpr = 0;
130.2537 ++  int n_gpr = 0;
130.2538 ++  int n_ov = 0;
130.2539 ++
130.2540 ++  ffi_type **ptr;
130.2541 ++  void **p_argv = ecif->avalue;
130.2542 ++  int i;
130.2543 ++ 
130.2544 ++  /* If we returning a structure then we set the first parameter register
130.2545 ++     to the address of where we are returning this structure.  */
130.2546 ++
130.2547 ++  if (ecif->cif->flags == FFI390_RET_STRUCT)
130.2548 ++    p_gpr[n_gpr++] = (unsigned long) ecif->rvalue;
130.2549 ++
130.2550 ++  /* Now for the arguments.  */
130.2551 ++ 
130.2552 ++  for (ptr = ecif->cif->arg_types, i = ecif->cif->nargs;
130.2553 ++       i > 0;
130.2554 ++       i--, ptr++, p_argv++)
130.2555 ++    {
130.2556 ++      void *arg = *p_argv;
130.2557 ++      int type = (*ptr)->type;
130.2558 ++
130.2559 ++      /* Check how a structure type is passed.  */
130.2560 ++      if (type == FFI_TYPE_STRUCT)
130.2561 ++	{
130.2562 ++	  type = ffi_check_struct_type (*ptr);
130.2563 ++
130.2564 ++	  /* If we pass the struct via pointer, copy the data.  */
130.2565 ++	  if (type == FFI_TYPE_POINTER)
130.2566 ++	    {
130.2567 ++	      p_struct -= ROUND_SIZE ((*ptr)->size);
130.2568 ++	      memcpy (p_struct, (char *)arg, (*ptr)->size);
130.2569 ++	      arg = &p_struct;
130.2570 ++	    }
130.2571 ++	}
130.2572 ++
130.2573 ++      /* Pointers are passed like UINTs of the same size.  */
130.2574 ++      if (type == FFI_TYPE_POINTER)
130.2575 ++#ifdef __s390x__
130.2576 ++	type = FFI_TYPE_UINT64;
130.2577 ++#else
130.2578 ++	type = FFI_TYPE_UINT32;
130.2579 ++#endif
130.2580 ++
130.2581 ++      /* Now handle all primitive int/float data types.  */
130.2582 ++      switch (type) 
130.2583 ++	{
130.2584 ++	  case FFI_TYPE_DOUBLE:
130.2585 ++	    if (n_fpr < MAX_FPRARGS)
130.2586 ++	      p_fpr[n_fpr++] = *(unsigned long long *) arg;
130.2587 ++	    else
130.2588 ++#ifdef __s390x__
130.2589 ++	      p_ov[n_ov++] = *(unsigned long *) arg;
130.2590 ++#else
130.2591 ++	      p_ov[n_ov++] = ((unsigned long *) arg)[0],
130.2592 ++	      p_ov[n_ov++] = ((unsigned long *) arg)[1];
130.2593 ++#endif
130.2594 ++	    break;
130.2595 ++	
130.2596 ++	  case FFI_TYPE_FLOAT:
130.2597 ++	    if (n_fpr < MAX_FPRARGS)
130.2598 ++	      p_fpr[n_fpr++] = (long long) *(unsigned int *) arg << 32;
130.2599 ++	    else
130.2600 ++	      p_ov[n_ov++] = *(unsigned int *) arg;
130.2601 ++	    break;
130.2602 ++ 
130.2603 ++	  case FFI_TYPE_UINT64:
130.2604 ++	  case FFI_TYPE_SINT64:
130.2605 ++#ifdef __s390x__
130.2606 ++	    if (n_gpr < MAX_GPRARGS)
130.2607 ++	      p_gpr[n_gpr++] = *(unsigned long *) arg;
130.2608 ++	    else
130.2609 ++	      p_ov[n_ov++] = *(unsigned long *) arg;
130.2610 ++#else
130.2611 ++	    if (n_gpr == MAX_GPRARGS-1)
130.2612 ++	      n_gpr = MAX_GPRARGS;
130.2613 ++	    if (n_gpr < MAX_GPRARGS)
130.2614 ++	      p_gpr[n_gpr++] = ((unsigned long *) arg)[0],
130.2615 ++	      p_gpr[n_gpr++] = ((unsigned long *) arg)[1];
130.2616 ++	    else
130.2617 ++	      p_ov[n_ov++] = ((unsigned long *) arg)[0],
130.2618 ++	      p_ov[n_ov++] = ((unsigned long *) arg)[1];
130.2619 ++#endif
130.2620 ++	    break;
130.2621 ++ 
130.2622 ++	  case FFI_TYPE_UINT32:
130.2623 ++	    if (n_gpr < MAX_GPRARGS)
130.2624 ++	      p_gpr[n_gpr++] = *(unsigned int *) arg;
130.2625 ++	    else
130.2626 ++	      p_ov[n_ov++] = *(unsigned int *) arg;
130.2627 ++	    break;
130.2628 ++ 
130.2629 ++	  case FFI_TYPE_INT:
130.2630 ++	  case FFI_TYPE_SINT32:
130.2631 ++	    if (n_gpr < MAX_GPRARGS)
130.2632 ++	      p_gpr[n_gpr++] = *(signed int *) arg;
130.2633 ++	    else
130.2634 ++	      p_ov[n_ov++] = *(signed int *) arg;
130.2635 ++	    break;
130.2636 ++ 
130.2637 ++	  case FFI_TYPE_UINT16:
130.2638 ++	    if (n_gpr < MAX_GPRARGS)
130.2639 ++	      p_gpr[n_gpr++] = *(unsigned short *) arg;
130.2640 ++	    else
130.2641 ++	      p_ov[n_ov++] = *(unsigned short *) arg;
130.2642 ++	    break;
130.2643 ++ 
130.2644 ++	  case FFI_TYPE_SINT16:
130.2645 ++	    if (n_gpr < MAX_GPRARGS)
130.2646 ++	      p_gpr[n_gpr++] = *(signed short *) arg;
130.2647 ++	    else
130.2648 ++	      p_ov[n_ov++] = *(signed short *) arg;
130.2649 ++	    break;
130.2650 ++
130.2651 ++	  case FFI_TYPE_UINT8:
130.2652 ++	    if (n_gpr < MAX_GPRARGS)
130.2653 ++	      p_gpr[n_gpr++] = *(unsigned char *) arg;
130.2654 ++	    else
130.2655 ++	      p_ov[n_ov++] = *(unsigned char *) arg;
130.2656 ++	    break;
130.2657 ++ 
130.2658 ++	  case FFI_TYPE_SINT8:
130.2659 ++	    if (n_gpr < MAX_GPRARGS)
130.2660 ++	      p_gpr[n_gpr++] = *(signed char *) arg;
130.2661 ++	    else
130.2662 ++	      p_ov[n_ov++] = *(signed char *) arg;
130.2663 ++	    break;
130.2664 ++ 
130.2665 ++	  default:
130.2666 ++	    FFI_ASSERT (0);
130.2667 ++	    break;
130.2668 ++        }
130.2669 ++    }
130.2670 ++}
130.2671 ++
130.2672 ++/*======================== End of Routine ============================*/
130.2673 ++ 
130.2674 ++/*====================================================================*/
130.2675 ++/*                                                                    */
130.2676 ++/* Name     - ffi_prep_cif_machdep.                                   */
130.2677 ++/*                                                                    */
130.2678 ++/* Function - Perform machine dependent CIF processing.               */
130.2679 ++/*                                                                    */
130.2680 ++/*====================================================================*/
130.2681 ++ 
130.2682 ++ffi_status
130.2683 ++ffi_prep_cif_machdep(ffi_cif *cif)
130.2684 ++{
130.2685 ++  size_t struct_size = 0;
130.2686 ++  int n_gpr = 0;
130.2687 ++  int n_fpr = 0;
130.2688 ++  int n_ov = 0;
130.2689 ++
130.2690 ++  ffi_type **ptr;
130.2691 ++  int i;
130.2692 ++
130.2693 ++  /* Determine return value handling.  */ 
130.2694 ++
130.2695 ++  switch (cif->rtype->type)
130.2696 ++    {
130.2697 ++      /* Void is easy.  */
130.2698 ++      case FFI_TYPE_VOID:
130.2699 ++	cif->flags = FFI390_RET_VOID;
130.2700 ++	break;
130.2701 ++
130.2702 ++      /* Structures are returned via a hidden pointer.  */
130.2703 ++      case FFI_TYPE_STRUCT:
130.2704 ++	cif->flags = FFI390_RET_STRUCT;
130.2705 ++	n_gpr++;  /* We need one GPR to pass the pointer.  */
130.2706 ++	break; 
130.2707 ++
130.2708 ++      /* Floating point values are returned in fpr 0.  */
130.2709 ++      case FFI_TYPE_FLOAT:
130.2710 ++	cif->flags = FFI390_RET_FLOAT;
130.2711 ++	break;
130.2712 ++
130.2713 ++      case FFI_TYPE_DOUBLE:
130.2714 ++	cif->flags = FFI390_RET_DOUBLE;
130.2715 ++	break;
130.2716 ++
130.2717 ++      /* Integer values are returned in gpr 2 (and gpr 3
130.2718 ++	 for 64-bit values on 31-bit machines).  */
130.2719 ++      case FFI_TYPE_UINT64:
130.2720 ++      case FFI_TYPE_SINT64:
130.2721 ++	cif->flags = FFI390_RET_INT64;
130.2722 ++	break;
130.2723 ++
130.2724 ++      case FFI_TYPE_POINTER:
130.2725 ++      case FFI_TYPE_INT:
130.2726 ++      case FFI_TYPE_UINT32:
130.2727 ++      case FFI_TYPE_SINT32:
130.2728 ++      case FFI_TYPE_UINT16:
130.2729 ++      case FFI_TYPE_SINT16:
130.2730 ++      case FFI_TYPE_UINT8:
130.2731 ++      case FFI_TYPE_SINT8:
130.2732 ++	/* These are to be extended to word size.  */
130.2733 ++#ifdef __s390x__
130.2734 ++	cif->flags = FFI390_RET_INT64;
130.2735 ++#else
130.2736 ++	cif->flags = FFI390_RET_INT32;
130.2737 ++#endif
130.2738 ++	break;
130.2739 ++ 
130.2740 ++      default:
130.2741 ++        FFI_ASSERT (0);
130.2742 ++        break;
130.2743 ++    }
130.2744 ++
130.2745 ++  /* Now for the arguments.  */
130.2746 ++ 
130.2747 ++  for (ptr = cif->arg_types, i = cif->nargs;
130.2748 ++       i > 0;
130.2749 ++       i--, ptr++)
130.2750 ++    {
130.2751 ++      int type = (*ptr)->type;
130.2752 ++
130.2753 ++      /* Check how a structure type is passed.  */
130.2754 ++      if (type == FFI_TYPE_STRUCT)
130.2755 ++	{
130.2756 ++	  type = ffi_check_struct_type (*ptr);
130.2757 ++
130.2758 ++	  /* If we pass the struct via pointer, we must reserve space
130.2759 ++	     to copy its data for proper call-by-value semantics.  */
130.2760 ++	  if (type == FFI_TYPE_POINTER)
130.2761 ++	    struct_size += ROUND_SIZE ((*ptr)->size);
130.2762 ++	}
130.2763 ++
130.2764 ++      /* Now handle all primitive int/float data types.  */
130.2765 ++      switch (type) 
130.2766 ++	{
130.2767 ++	  /* The first MAX_FPRARGS floating point arguments
130.2768 ++	     go in FPRs, the rest overflow to the stack.  */
130.2769 ++
130.2770 ++	  case FFI_TYPE_DOUBLE:
130.2771 ++	    if (n_fpr < MAX_FPRARGS)
130.2772 ++	      n_fpr++;
130.2773 ++	    else
130.2774 ++	      n_ov += sizeof (double) / sizeof (long);
130.2775 ++	    break;
130.2776 ++	
130.2777 ++	  case FFI_TYPE_FLOAT:
130.2778 ++	    if (n_fpr < MAX_FPRARGS)
130.2779 ++	      n_fpr++;
130.2780 ++	    else
130.2781 ++	      n_ov++;
130.2782 ++	    break;
130.2783 ++
130.2784 ++	  /* On 31-bit machines, 64-bit integers are passed in GPR pairs,
130.2785 ++	     if one is still available, or else on the stack.  If only one
130.2786 ++	     register is free, skip the register (it won't be used for any 
130.2787 ++	     subsequent argument either).  */
130.2788 ++	      
130.2789 ++#ifndef __s390x__
130.2790 ++	  case FFI_TYPE_UINT64:
130.2791 ++	  case FFI_TYPE_SINT64:
130.2792 ++	    if (n_gpr == MAX_GPRARGS-1)
130.2793 ++	      n_gpr = MAX_GPRARGS;
130.2794 ++	    if (n_gpr < MAX_GPRARGS)
130.2795 ++	      n_gpr += 2;
130.2796 ++	    else
130.2797 ++	      n_ov += 2;
130.2798 ++	    break;
130.2799 ++#endif
130.2800 ++
130.2801 ++	  /* Everything else is passed in GPRs (until MAX_GPRARGS
130.2802 ++	     have been used) or overflows to the stack.  */
130.2803 ++
130.2804 ++	  default: 
130.2805 ++	    if (n_gpr < MAX_GPRARGS)
130.2806 ++	      n_gpr++;
130.2807 ++	    else
130.2808 ++	      n_ov++;
130.2809 ++	    break;
130.2810 ++        }
130.2811 ++    }
130.2812 ++
130.2813 ++  /* Total stack space as required for overflow arguments
130.2814 ++     and temporary structure copies.  */
130.2815 ++
130.2816 ++  cif->bytes = ROUND_SIZE (n_ov * sizeof (long)) + struct_size;
130.2817 ++ 
130.2818 ++  return FFI_OK;
130.2819 ++}
130.2820 ++ 
130.2821 ++/*======================== End of Routine ============================*/
130.2822 ++ 
130.2823 ++/*====================================================================*/
130.2824 ++/*                                                                    */
130.2825 ++/* Name     - ffi_call.                                               */
130.2826 ++/*                                                                    */
130.2827 ++/* Function - Call the FFI routine.                                   */
130.2828 ++/*                                                                    */
130.2829 ++/*====================================================================*/
130.2830 ++ 
130.2831 ++void
130.2832 ++ffi_call(ffi_cif *cif,
130.2833 ++	 void (*fn)(),
130.2834 ++	 void *rvalue,
130.2835 ++	 void **avalue)
130.2836 ++{
130.2837 ++  int ret_type = cif->flags;
130.2838 ++  extended_cif ecif;
130.2839 ++ 
130.2840 ++  ecif.cif    = cif;
130.2841 ++  ecif.avalue = avalue;
130.2842 ++  ecif.rvalue = rvalue;
130.2843 ++
130.2844 ++  /* If we don't have a return value, we need to fake one.  */
130.2845 ++  if (rvalue == NULL)
130.2846 ++    {
130.2847 ++      if (ret_type == FFI390_RET_STRUCT)
130.2848 ++	ecif.rvalue = alloca (cif->rtype->size);
130.2849 ++      else
130.2850 ++	ret_type = FFI390_RET_VOID;
130.2851 ++    } 
130.2852 ++
130.2853 ++  switch (cif->abi)
130.2854 ++    {
130.2855 ++      case FFI_SYSV:
130.2856 ++        ffi_call_SYSV (cif->bytes, &ecif, ffi_prep_args,
130.2857 ++		       ret_type, ecif.rvalue, fn);
130.2858 ++        break;
130.2859 ++ 
130.2860 ++      default:
130.2861 ++        FFI_ASSERT (0);
130.2862 ++        break;
130.2863 ++    }
130.2864 ++}
130.2865 ++ 
130.2866 ++/*======================== End of Routine ============================*/
130.2867 ++
130.2868 ++/*====================================================================*/
130.2869 ++/*                                                                    */
130.2870 ++/* Name     - ffi_closure_helper_SYSV.                                */
130.2871 ++/*                                                                    */
130.2872 ++/* Function - Call a FFI closure target function.                     */
130.2873 ++/*                                                                    */
130.2874 ++/*====================================================================*/
130.2875 ++ 
130.2876 ++void
130.2877 ++ffi_closure_helper_SYSV (ffi_closure *closure,
130.2878 ++			 unsigned long *p_gpr,
130.2879 ++			 unsigned long long *p_fpr,
130.2880 ++			 unsigned long *p_ov)
130.2881 ++{
130.2882 ++  unsigned long long ret_buffer;
130.2883 ++
130.2884 ++  void *rvalue = &ret_buffer;
130.2885 ++  void **avalue;
130.2886 ++  void **p_arg;
130.2887 ++
130.2888 ++  int n_gpr = 0;
130.2889 ++  int n_fpr = 0;
130.2890 ++  int n_ov = 0;
130.2891 ++
130.2892 ++  ffi_type **ptr;
130.2893 ++  int i;
130.2894 ++
130.2895 ++  /* Allocate buffer for argument list pointers.  */
130.2896 ++
130.2897 ++  p_arg = avalue = alloca (closure->cif->nargs * sizeof (void *));
130.2898 ++
130.2899 ++  /* If we returning a structure, pass the structure address 
130.2900 ++     directly to the target function.  Otherwise, have the target 
130.2901 ++     function store the return value to the GPR save area.  */
130.2902 ++
130.2903 ++  if (closure->cif->flags == FFI390_RET_STRUCT)
130.2904 ++    rvalue = (void *) p_gpr[n_gpr++];
130.2905 ++
130.2906 ++  /* Now for the arguments.  */
130.2907 ++
130.2908 ++  for (ptr = closure->cif->arg_types, i = closure->cif->nargs;
130.2909 ++       i > 0;
130.2910 ++       i--, p_arg++, ptr++)
130.2911 ++    {
130.2912 ++      int deref_struct_pointer = 0;
130.2913 ++      int type = (*ptr)->type;
130.2914 ++
130.2915 ++      /* Check how a structure type is passed.  */
130.2916 ++      if (type == FFI_TYPE_STRUCT)
130.2917 ++	{
130.2918 ++	  type = ffi_check_struct_type (*ptr);
130.2919 ++
130.2920 ++	  /* If we pass the struct via pointer, remember to 
130.2921 ++	     retrieve the pointer later.  */
130.2922 ++	  if (type == FFI_TYPE_POINTER)
130.2923 ++	    deref_struct_pointer = 1;
130.2924 ++	}
130.2925 ++
130.2926 ++      /* Pointers are passed like UINTs of the same size.  */
130.2927 ++      if (type == FFI_TYPE_POINTER)
130.2928 ++#ifdef __s390x__
130.2929 ++	type = FFI_TYPE_UINT64;
130.2930 ++#else
130.2931 ++	type = FFI_TYPE_UINT32;
130.2932 ++#endif
130.2933 ++
130.2934 ++      /* Now handle all primitive int/float data types.  */
130.2935 ++      switch (type) 
130.2936 ++	{
130.2937 ++	  case FFI_TYPE_DOUBLE:
130.2938 ++	    if (n_fpr < MAX_FPRARGS)
130.2939 ++	      *p_arg = &p_fpr[n_fpr++];
130.2940 ++	    else
130.2941 ++	      *p_arg = &p_ov[n_ov], 
130.2942 ++	      n_ov += sizeof (double) / sizeof (long);
130.2943 ++	    break;
130.2944 ++	
130.2945 ++	  case FFI_TYPE_FLOAT:
130.2946 ++	    if (n_fpr < MAX_FPRARGS)
130.2947 ++	      *p_arg = &p_fpr[n_fpr++];
130.2948 ++	    else
130.2949 ++	      *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 4;
130.2950 ++	    break;
130.2951 ++ 
130.2952 ++	  case FFI_TYPE_UINT64:
130.2953 ++	  case FFI_TYPE_SINT64:
130.2954 ++#ifdef __s390x__
130.2955 ++	    if (n_gpr < MAX_GPRARGS)
130.2956 ++	      *p_arg = &p_gpr[n_gpr++];
130.2957 ++	    else
130.2958 ++	      *p_arg = &p_ov[n_ov++];
130.2959 ++#else
130.2960 ++	    if (n_gpr == MAX_GPRARGS-1)
130.2961 ++	      n_gpr = MAX_GPRARGS;
130.2962 ++	    if (n_gpr < MAX_GPRARGS)
130.2963 ++	      *p_arg = &p_gpr[n_gpr], n_gpr += 2;
130.2964 ++	    else
130.2965 ++	      *p_arg = &p_ov[n_ov], n_ov += 2;
130.2966 ++#endif
130.2967 ++	    break;
130.2968 ++ 
130.2969 ++	  case FFI_TYPE_INT:
130.2970 ++	  case FFI_TYPE_UINT32:
130.2971 ++	  case FFI_TYPE_SINT32:
130.2972 ++	    if (n_gpr < MAX_GPRARGS)
130.2973 ++	      *p_arg = (char *)&p_gpr[n_gpr++] + sizeof (long) - 4;
130.2974 ++	    else
130.2975 ++	      *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 4;
130.2976 ++	    break;
130.2977 ++ 
130.2978 ++	  case FFI_TYPE_UINT16:
130.2979 ++	  case FFI_TYPE_SINT16:
130.2980 ++	    if (n_gpr < MAX_GPRARGS)
130.2981 ++	      *p_arg = (char *)&p_gpr[n_gpr++] + sizeof (long) - 2;
130.2982 ++	    else
130.2983 ++	      *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 2;
130.2984 ++	    break;
130.2985 ++
130.2986 ++	  case FFI_TYPE_UINT8:
130.2987 ++	  case FFI_TYPE_SINT8:
130.2988 ++	    if (n_gpr < MAX_GPRARGS)
130.2989 ++	      *p_arg = (char *)&p_gpr[n_gpr++] + sizeof (long) - 1;
130.2990 ++	    else
130.2991 ++	      *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 1;
130.2992 ++	    break;
130.2993 ++ 
130.2994 ++	  default:
130.2995 ++	    FFI_ASSERT (0);
130.2996 ++	    break;
130.2997 ++        }
130.2998 ++
130.2999 ++      /* If this is a struct passed via pointer, we need to
130.3000 ++	 actually retrieve that pointer.  */
130.3001 ++      if (deref_struct_pointer)
130.3002 ++	*p_arg = *(void **)*p_arg;
130.3003 ++    }
130.3004 ++
130.3005 ++
130.3006 ++  /* Call the target function.  */
130.3007 ++  (closure->fun) (closure->cif, rvalue, avalue, closure->user_data);
130.3008 ++
130.3009 ++  /* Convert the return value.  */
130.3010 ++  switch (closure->cif->rtype->type)
130.3011 ++    {
130.3012 ++      /* Void is easy, and so is struct.  */
130.3013 ++      case FFI_TYPE_VOID:
130.3014 ++      case FFI_TYPE_STRUCT:
130.3015 ++	break;
130.3016 ++
130.3017 ++      /* Floating point values are returned in fpr 0.  */
130.3018 ++      case FFI_TYPE_FLOAT:
130.3019 ++	p_fpr[0] = (long long) *(unsigned int *) rvalue << 32;
130.3020 ++	break;
130.3021 ++
130.3022 ++      case FFI_TYPE_DOUBLE:
130.3023 ++	p_fpr[0] = *(unsigned long long *) rvalue;
130.3024 ++	break;
130.3025 ++
130.3026 ++      /* Integer values are returned in gpr 2 (and gpr 3
130.3027 ++	 for 64-bit values on 31-bit machines).  */
130.3028 ++      case FFI_TYPE_UINT64:
130.3029 ++      case FFI_TYPE_SINT64:
130.3030 ++#ifdef __s390x__
130.3031 ++	p_gpr[0] = *(unsigned long *) rvalue;
130.3032 ++#else
130.3033 ++	p_gpr[0] = ((unsigned long *) rvalue)[0],
130.3034 ++	p_gpr[1] = ((unsigned long *) rvalue)[1];
130.3035 ++#endif
130.3036 ++	break;
130.3037 ++
130.3038 ++      case FFI_TYPE_POINTER:
130.3039 ++      case FFI_TYPE_UINT32:
130.3040 ++      case FFI_TYPE_UINT16:
130.3041 ++      case FFI_TYPE_UINT8:
130.3042 ++	p_gpr[0] = *(unsigned long *) rvalue;
130.3043 ++	break;
130.3044 ++
130.3045 ++      case FFI_TYPE_INT:
130.3046 ++      case FFI_TYPE_SINT32:
130.3047 ++      case FFI_TYPE_SINT16:
130.3048 ++      case FFI_TYPE_SINT8:
130.3049 ++	p_gpr[0] = *(signed long *) rvalue;
130.3050 ++	break;
130.3051 ++
130.3052 ++      default:
130.3053 ++        FFI_ASSERT (0);
130.3054 ++        break;
130.3055 ++    }
130.3056 ++}
130.3057 ++ 
130.3058 ++/*======================== End of Routine ============================*/
130.3059 ++
130.3060 ++/*====================================================================*/
130.3061 ++/*                                                                    */
130.3062 ++/* Name     - ffi_prep_closure.                                       */
130.3063 ++/*                                                                    */
130.3064 ++/* Function - Prepare a FFI closure.                                  */
130.3065 ++/*                                                                    */
130.3066 ++/*====================================================================*/
130.3067 ++ 
130.3068 ++ffi_status
130.3069 ++ffi_prep_closure (ffi_closure *closure,
130.3070 ++                  ffi_cif *cif,
130.3071 ++                  void (*fun) (ffi_cif *, void *, void **, void *),
130.3072 ++                  void *user_data)
130.3073 ++{
130.3074 ++  FFI_ASSERT (cif->abi == FFI_SYSV);
130.3075 ++
130.3076 ++#ifndef __s390x__
130.3077 ++  *(short *)&closure->tramp [0] = 0x0d10;   /* basr %r1,0 */
130.3078 ++  *(short *)&closure->tramp [2] = 0x9801;   /* lm %r0,%r1,6(%r1) */
130.3079 ++  *(short *)&closure->tramp [4] = 0x1006;
130.3080 ++  *(short *)&closure->tramp [6] = 0x07f1;   /* br %r1 */
130.3081 ++  *(long  *)&closure->tramp [8] = (long)closure;
130.3082 ++  *(long  *)&closure->tramp[12] = (long)&ffi_closure_SYSV;
130.3083 ++#else
130.3084 ++  *(short *)&closure->tramp [0] = 0x0d10;   /* basr %r1,0 */
130.3085 ++  *(short *)&closure->tramp [2] = 0xeb01;   /* lmg %r0,%r1,14(%r1) */
130.3086 ++  *(short *)&closure->tramp [4] = 0x100e;
130.3087 ++  *(short *)&closure->tramp [6] = 0x0004;
130.3088 ++  *(short *)&closure->tramp [8] = 0x07f1;   /* br %r1 */
130.3089 ++  *(long  *)&closure->tramp[16] = (long)closure;
130.3090 ++  *(long  *)&closure->tramp[24] = (long)&ffi_closure_SYSV;
130.3091 ++#endif 
130.3092 ++ 
130.3093 ++  closure->cif = cif;
130.3094 ++  closure->user_data = user_data;
130.3095 ++  closure->fun = fun;
130.3096 ++ 
130.3097 ++  return FFI_OK;
130.3098 ++}
130.3099 ++
130.3100 ++/*======================== End of Routine ============================*/
130.3101 ++ 
130.3102 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/s390/sysv.S gcc/libffi/src/s390/sysv.S
130.3103 +--- gcc-3.2.2.orig/libffi/src/s390/sysv.S	Thu Jan  1 09:00:00 1970
130.3104 ++++ gcc/libffi/src/s390/sysv.S	Thu Nov 28 01:44:35 2002
130.3105 +@@ -0,0 +1,425 @@
130.3106 ++/* -----------------------------------------------------------------------
130.3107 ++   sysv.S - Copyright (c) 2000 Software AG
130.3108 ++ 
130.3109 ++   S390 Foreign Function Interface
130.3110 ++ 
130.3111 ++   Permission is hereby granted, free of charge, to any person obtaining
130.3112 ++   a copy of this software and associated documentation files (the
130.3113 ++   ``Software''), to deal in the Software without restriction, including
130.3114 ++   without limitation the rights to use, copy, modify, merge, publish,
130.3115 ++   distribute, sublicense, and/or sell copies of the Software, and to
130.3116 ++   permit persons to whom the Software is furnished to do so, subject to
130.3117 ++   the following conditions:
130.3118 ++ 
130.3119 ++   The above copyright notice and this permission notice shall be included
130.3120 ++   in all copies or substantial portions of the Software.
130.3121 ++ 
130.3122 ++   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
130.3123 ++   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
130.3124 ++   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
130.3125 ++   IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
130.3126 ++   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
130.3127 ++   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
130.3128 ++   OTHER DEALINGS IN THE SOFTWARE.
130.3129 ++   ----------------------------------------------------------------------- */
130.3130 ++
130.3131 ++#ifndef __s390x__
130.3132 ++ 
130.3133 ++.text
130.3134 ++
130.3135 ++	# r2:	cif->bytes
130.3136 ++	# r3:	&ecif
130.3137 ++	# r4:	ffi_prep_args
130.3138 ++	# r5:	ret_type
130.3139 ++	# r6:	ecif.rvalue
130.3140 ++	# ov:	fn 
130.3141 ++ 
130.3142 ++	# This assumes we are using gas.
130.3143 ++	.globl	ffi_call_SYSV
130.3144 ++	.type	ffi_call_SYSV,%function
130.3145 ++ffi_call_SYSV:
130.3146 ++.LFB1:
130.3147 ++	stm	%r6,%r15,24(%r15)		# Save registers
130.3148 ++.LCFI0:
130.3149 ++	basr	%r13,0				# Set up base register
130.3150 ++.Lbase:
130.3151 ++	lr	%r11,%r15			# Set up frame pointer
130.3152 ++.LCFI1:
130.3153 ++	sr	%r15,%r2
130.3154 ++	ahi	%r15,-96-48			# Allocate stack
130.3155 ++	lr	%r8,%r6				# Save ecif.rvalue
130.3156 ++	sr	%r9,%r9
130.3157 ++	ic	%r9,.Ltable-.Lbase(%r13,%r5)	# Load epilog address
130.3158 ++	l	%r7,96(%r11)			# Load function address
130.3159 ++	st	%r11,0(%r15)			# Set up back chain
130.3160 ++	ahi	%r11,-48			# Register save area
130.3161 ++.LCFI2:
130.3162 ++
130.3163 ++	la	%r2,96(%r15)			# Save area
130.3164 ++						# r3 already holds &ecif
130.3165 ++	basr	%r14,%r4			# Call ffi_prep_args
130.3166 ++
130.3167 ++	lm	%r2,%r6,0(%r11)			# Load arguments
130.3168 ++	ld	%f0,32(%r11)
130.3169 ++	ld	%f2,40(%r11)
130.3170 ++	la	%r14,0(%r13,%r9)		# Set return address
130.3171 ++	br	%r7				# ... and call function
130.3172 ++
130.3173 ++.LretNone:					# Return void
130.3174 ++	l	%r4,48+56(%r11)
130.3175 ++	lm	%r6,%r15,48+24(%r11)
130.3176 ++	br	%r4
130.3177 ++
130.3178 ++.LretFloat:
130.3179 ++	l	%r4,48+56(%r11)
130.3180 ++	ste	%f0,0(%r8)			# Return float
130.3181 ++	lm	%r6,%r15,48+24(%r11)
130.3182 ++	br	%r4
130.3183 ++ 
130.3184 ++.LretDouble:
130.3185 ++	l	%r4,48+56(%r11)
130.3186 ++	std	%f0,0(%r8)			# Return double
130.3187 ++	lm	%r6,%r15,48+24(%r11)
130.3188 ++	br	%r4
130.3189 ++
130.3190 ++.LretInt32:
130.3191 ++	l	%r4,48+56(%r11)
130.3192 ++	st	%r2,0(%r8)			# Return int
130.3193 ++	lm	%r6,%r15,48+24(%r11)
130.3194 ++	br	%r4
130.3195 ++ 
130.3196 ++.LretInt64:
130.3197 ++	l	%r4,48+56(%r11)
130.3198 ++	stm	%r2,%r3,0(%r8)			# Return long long
130.3199 ++	lm	%r6,%r15,48+24(%r11)
130.3200 ++	br	%r4
130.3201 ++ 
130.3202 ++.Ltable:
130.3203 ++	.byte	.LretNone-.Lbase		# FFI390_RET_VOID
130.3204 ++	.byte	.LretNone-.Lbase		# FFI390_RET_STRUCT
130.3205 ++	.byte	.LretFloat-.Lbase		# FFI390_RET_FLOAT
130.3206 ++	.byte	.LretDouble-.Lbase		# FFI390_RET_DOUBLE
130.3207 ++	.byte	.LretInt32-.Lbase		# FFI390_RET_INT32
130.3208 ++	.byte	.LretInt64-.Lbase		# FFI390_RET_INT64
130.3209 ++
130.3210 ++.LFE1: 
130.3211 ++.ffi_call_SYSV_end:
130.3212 ++	.size	 ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV
130.3213 ++
130.3214 ++
130.3215 ++	.globl	ffi_closure_SYSV
130.3216 ++	.type	ffi_closure_SYSV,%function
130.3217 ++ffi_closure_SYSV:
130.3218 ++.LFB2:
130.3219 ++	stm	%r12,%r15,48(%r15)		# Save registers
130.3220 ++.LCFI10:
130.3221 ++	basr	%r13,0				# Set up base register
130.3222 ++.Lcbase:
130.3223 ++	stm	%r2,%r6,8(%r15)			# Save arguments
130.3224 ++	std	%f0,64(%r15)
130.3225 ++	std	%f2,72(%r15)
130.3226 ++	lr	%r1,%r15			# Set up stack frame
130.3227 ++	ahi	%r15,-96
130.3228 ++.LCFI11:
130.3229 ++	l	%r12,.Lchelper-.Lcbase(%r13)	# Get helper function
130.3230 ++	lr	%r2,%r0				# Closure
130.3231 ++	la	%r3,8(%r1)			# GPRs
130.3232 ++	la	%r4,64(%r1)			# FPRs
130.3233 ++	la	%r5,96(%r1)			# Overflow
130.3234 ++	st	%r1,0(%r15)			# Set up back chain
130.3235 ++
130.3236 ++	bas	%r14,0(%r12,%r13)		# Call helper
130.3237 ++
130.3238 ++	l	%r4,96+56(%r15)
130.3239 ++	ld	%f0,96+64(%r15)			# Load return registers
130.3240 ++	lm	%r2,%r3,96+8(%r15)
130.3241 ++	lm	%r12,%r15,96+48(%r15)
130.3242 ++	br	%r4
130.3243 ++
130.3244 ++	.align 4
130.3245 ++.Lchelper:
130.3246 ++	.long	ffi_closure_helper_SYSV-.Lcbase
130.3247 ++
130.3248 ++.LFE2: 
130.3249 ++
130.3250 ++.ffi_closure_SYSV_end:
130.3251 ++	.size	 ffi_closure_SYSV,.ffi_closure_SYSV_end-ffi_closure_SYSV
130.3252 ++
130.3253 ++
130.3254 ++	.section	.eh_frame,"a",@progbits
130.3255 ++.Lframe1:
130.3256 ++	.4byte	.LECIE1-.LSCIE1	# Length of Common Information Entry
130.3257 ++.LSCIE1:
130.3258 ++	.4byte	0x0	# CIE Identifier Tag
130.3259 ++	.byte	0x1	# CIE Version
130.3260 ++	.ascii "zR\0"	# CIE Augmentation
130.3261 ++	.uleb128 0x1	# CIE Code Alignment Factor
130.3262 ++	.sleb128 -4	# CIE Data Alignment Factor
130.3263 ++	.byte	0xe	# CIE RA Column
130.3264 ++	.uleb128 0x1	# Augmentation size
130.3265 ++	.byte	0x1b	# FDE Encoding (pcrel sdata4)
130.3266 ++	.byte	0xc	# DW_CFA_def_cfa
130.3267 ++	.uleb128 0xf
130.3268 ++	.uleb128 0x60
130.3269 ++	.align	4
130.3270 ++.LECIE1:
130.3271 ++.LSFDE1:
130.3272 ++	.4byte	.LEFDE1-.LASFDE1	# FDE Length
130.3273 ++.LASFDE1:
130.3274 ++	.4byte	.LASFDE1-.Lframe1	# FDE CIE offset
130.3275 ++	.4byte	.LFB1-.	# FDE initial location
130.3276 ++	.4byte	.LFE1-.LFB1	# FDE address range
130.3277 ++	.uleb128 0x0	# Augmentation size
130.3278 ++	.byte	0x4	# DW_CFA_advance_loc4
130.3279 ++	.4byte	.LCFI0-.LFB1
130.3280 ++	.byte	0x8f	# DW_CFA_offset, column 0xf
130.3281 ++	.uleb128 0x9
130.3282 ++	.byte	0x8e	# DW_CFA_offset, column 0xe
130.3283 ++	.uleb128 0xa
130.3284 ++	.byte	0x8d	# DW_CFA_offset, column 0xd
130.3285 ++	.uleb128 0xb
130.3286 ++	.byte	0x8c	# DW_CFA_offset, column 0xc
130.3287 ++	.uleb128 0xc
130.3288 ++	.byte	0x8b	# DW_CFA_offset, column 0xb
130.3289 ++	.uleb128 0xd
130.3290 ++	.byte	0x8a	# DW_CFA_offset, column 0xa
130.3291 ++	.uleb128 0xe
130.3292 ++	.byte	0x89	# DW_CFA_offset, column 0x9
130.3293 ++	.uleb128 0xf
130.3294 ++	.byte	0x88	# DW_CFA_offset, column 0x8
130.3295 ++	.uleb128 0x10
130.3296 ++	.byte	0x87	# DW_CFA_offset, column 0x7
130.3297 ++	.uleb128 0x11
130.3298 ++	.byte	0x86	# DW_CFA_offset, column 0x6
130.3299 ++	.uleb128 0x12
130.3300 ++	.byte	0x4	# DW_CFA_advance_loc4
130.3301 ++	.4byte	.LCFI1-.LCFI0
130.3302 ++	.byte	0xd	# DW_CFA_def_cfa_register
130.3303 ++	.uleb128 0xb
130.3304 ++	.byte	0x4	# DW_CFA_advance_loc4
130.3305 ++	.4byte	.LCFI2-.LCFI1
130.3306 ++	.byte	0xe	# DW_CFA_def_cfa_offset
130.3307 ++	.uleb128 0x90
130.3308 ++	.align	4
130.3309 ++.LEFDE1:
130.3310 ++.LSFDE2:
130.3311 ++	.4byte	.LEFDE2-.LASFDE2	# FDE Length
130.3312 ++.LASFDE2:
130.3313 ++	.4byte	.LASFDE2-.Lframe1	# FDE CIE offset
130.3314 ++	.4byte	.LFB2-.	# FDE initial location
130.3315 ++	.4byte	.LFE2-.LFB2	# FDE address range
130.3316 ++	.uleb128 0x0	# Augmentation size
130.3317 ++	.byte	0x4	# DW_CFA_advance_loc4
130.3318 ++	.4byte	.LCFI10-.LFB2
130.3319 ++	.byte	0x8f	# DW_CFA_offset, column 0xf
130.3320 ++	.uleb128 0x9
130.3321 ++	.byte	0x8e	# DW_CFA_offset, column 0xe
130.3322 ++	.uleb128 0xa
130.3323 ++	.byte	0x8d	# DW_CFA_offset, column 0xd
130.3324 ++	.uleb128 0xb
130.3325 ++	.byte	0x8c	# DW_CFA_offset, column 0xc
130.3326 ++	.uleb128 0xc
130.3327 ++	.byte	0x4	# DW_CFA_advance_loc4
130.3328 ++	.4byte	.LCFI11-.LCFI10
130.3329 ++	.byte	0xe	# DW_CFA_def_cfa_offset
130.3330 ++	.uleb128 0xc0
130.3331 ++	.align	4
130.3332 ++.LEFDE2:
130.3333 ++
130.3334 ++#else
130.3335 ++ 
130.3336 ++.text
130.3337 ++ 
130.3338 ++	# r2:	cif->bytes
130.3339 ++	# r3:	&ecif
130.3340 ++	# r4:	ffi_prep_args
130.3341 ++	# r5:	ret_type
130.3342 ++	# r6:	ecif.rvalue
130.3343 ++	# ov:	fn 
130.3344 ++ 
130.3345 ++	# This assumes we are using gas.
130.3346 ++	.globl	ffi_call_SYSV
130.3347 ++	.type	ffi_call_SYSV,%function
130.3348 ++ffi_call_SYSV:
130.3349 ++.LFB1:
130.3350 ++	stmg	%r6,%r15,48(%r15)		# Save registers
130.3351 ++.LCFI0:
130.3352 ++	larl	%r13,.Lbase			# Set up base register
130.3353 ++	lgr	%r11,%r15			# Set up frame pointer
130.3354 ++.LCFI1:
130.3355 ++	sgr	%r15,%r2
130.3356 ++	aghi	%r15,-160-80			# Allocate stack
130.3357 ++	lgr	%r8,%r6				# Save ecif.rvalue
130.3358 ++	llgc	%r9,.Ltable-.Lbase(%r13,%r5)	# Load epilog address
130.3359 ++	lg	%r7,160(%r11)			# Load function address
130.3360 ++	stg	%r11,0(%r15)			# Set up back chain
130.3361 ++	aghi	%r11,-80			# Register save area
130.3362 ++.LCFI2:
130.3363 ++
130.3364 ++	la	%r2,160(%r15)			# Save area
130.3365 ++						# r3 already holds &ecif
130.3366 ++	basr	%r14,%r4			# Call ffi_prep_args
130.3367 ++
130.3368 ++	lmg	%r2,%r6,0(%r11)			# Load arguments
130.3369 ++	ld	%f0,48(%r11)
130.3370 ++	ld	%f2,56(%r11)
130.3371 ++	ld	%f4,64(%r11)
130.3372 ++	ld	%f6,72(%r11)
130.3373 ++	la	%r14,0(%r13,%r9)		# Set return address
130.3374 ++	br	%r7				# ... and call function
130.3375 ++
130.3376 ++.Lbase:
130.3377 ++.LretNone:					# Return void
130.3378 ++	lg	%r4,80+112(%r11)
130.3379 ++	lmg	%r6,%r15,80+48(%r11)
130.3380 ++	br	%r4
130.3381 ++
130.3382 ++.LretFloat:
130.3383 ++	lg	%r4,80+112(%r11)
130.3384 ++	ste	%f0,0(%r8)			# Return float
130.3385 ++	lmg	%r6,%r15,80+48(%r11)
130.3386 ++	br	%r4
130.3387 ++ 
130.3388 ++.LretDouble:
130.3389 ++	lg	%r4,80+112(%r11)
130.3390 ++	std	%f0,0(%r8)			# Return double
130.3391 ++	lmg	%r6,%r15,80+48(%r11)
130.3392 ++	br	%r4
130.3393 ++
130.3394 ++.LretInt32:
130.3395 ++	lg	%r4,80+112(%r11)
130.3396 ++	st	%r2,0(%r8)			# Return int
130.3397 ++	lmg	%r6,%r15,80+48(%r11)
130.3398 ++	br	%r4
130.3399 ++ 
130.3400 ++.LretInt64:
130.3401 ++	lg	%r4,80+112(%r11)
130.3402 ++	stg	%r2,0(%r8)			# Return long
130.3403 ++	lmg	%r6,%r15,80+48(%r11)
130.3404 ++	br	%r4
130.3405 ++ 
130.3406 ++.Ltable:
130.3407 ++	.byte	.LretNone-.Lbase		# FFI390_RET_VOID
130.3408 ++	.byte	.LretNone-.Lbase		# FFI390_RET_STRUCT
130.3409 ++	.byte	.LretFloat-.Lbase		# FFI390_RET_FLOAT
130.3410 ++	.byte	.LretDouble-.Lbase		# FFI390_RET_DOUBLE
130.3411 ++	.byte	.LretInt32-.Lbase		# FFI390_RET_INT32
130.3412 ++	.byte	.LretInt64-.Lbase		# FFI390_RET_INT64
130.3413 ++
130.3414 ++.LFE1: 
130.3415 ++.ffi_call_SYSV_end:
130.3416 ++	.size	 ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV
130.3417 ++
130.3418 ++
130.3419 ++	.globl	ffi_closure_SYSV
130.3420 ++	.type	ffi_closure_SYSV,%function
130.3421 ++ffi_closure_SYSV:
130.3422 ++.LFB2:
130.3423 ++	stmg	%r14,%r15,112(%r15)		# Save registers
130.3424 ++.LCFI10:
130.3425 ++	stmg	%r2,%r6,16(%r15)		# Save arguments
130.3426 ++	std	%f0,128(%r15)
130.3427 ++	std	%f2,136(%r15)
130.3428 ++	std	%f4,144(%r15)
130.3429 ++	std	%f6,152(%r15)
130.3430 ++	lgr	%r1,%r15			# Set up stack frame
130.3431 ++	aghi	%r15,-160
130.3432 ++.LCFI11:
130.3433 ++	lgr	%r2,%r0				# Closure
130.3434 ++	la	%r3,16(%r1)			# GPRs
130.3435 ++	la	%r4,128(%r1)			# FPRs
130.3436 ++	la	%r5,160(%r1)			# Overflow
130.3437 ++	stg	%r1,0(%r15)			# Set up back chain
130.3438 ++
130.3439 ++	brasl	%r14,ffi_closure_helper_SYSV	# Call helper
130.3440 ++
130.3441 ++	lg	%r14,160+112(%r15)
130.3442 ++	ld	%f0,160+128(%r15)		# Load return registers
130.3443 ++	lg	%r2,160+16(%r15)
130.3444 ++	la	%r15,160(%r15)
130.3445 ++	br	%r14
130.3446 ++.LFE2: 
130.3447 ++
130.3448 ++.ffi_closure_SYSV_end:
130.3449 ++	.size	 ffi_closure_SYSV,.ffi_closure_SYSV_end-ffi_closure_SYSV
130.3450 ++
130.3451 ++
130.3452 ++
130.3453 ++	.section	.eh_frame,"a",@progbits
130.3454 ++.Lframe1:
130.3455 ++	.4byte	.LECIE1-.LSCIE1	# Length of Common Information Entry
130.3456 ++.LSCIE1:
130.3457 ++	.4byte	0x0	# CIE Identifier Tag
130.3458 ++	.byte	0x1	# CIE Version
130.3459 ++	.ascii "zR\0"	# CIE Augmentation
130.3460 ++	.uleb128 0x1	# CIE Code Alignment Factor
130.3461 ++	.sleb128 -8	# CIE Data Alignment Factor
130.3462 ++	.byte	0xe	# CIE RA Column
130.3463 ++	.uleb128 0x1	# Augmentation size
130.3464 ++	.byte	0x1b	# FDE Encoding (pcrel sdata4)
130.3465 ++	.byte	0xc	# DW_CFA_def_cfa
130.3466 ++	.uleb128 0xf
130.3467 ++	.uleb128 0xa0
130.3468 ++	.align	8
130.3469 ++.LECIE1:
130.3470 ++.LSFDE1:
130.3471 ++	.4byte	.LEFDE1-.LASFDE1	# FDE Length
130.3472 ++.LASFDE1:
130.3473 ++	.4byte	.LASFDE1-.Lframe1	# FDE CIE offset
130.3474 ++	.4byte	.LFB1-.	# FDE initial location
130.3475 ++	.4byte	.LFE1-.LFB1	# FDE address range
130.3476 ++	.uleb128 0x0	# Augmentation size
130.3477 ++	.byte	0x4	# DW_CFA_advance_loc4
130.3478 ++	.4byte	.LCFI0-.LFB1
130.3479 ++	.byte	0x8f	# DW_CFA_offset, column 0xf
130.3480 ++	.uleb128 0x5
130.3481 ++	.byte	0x8e	# DW_CFA_offset, column 0xe
130.3482 ++	.uleb128 0x6
130.3483 ++	.byte	0x8d	# DW_CFA_offset, column 0xd
130.3484 ++	.uleb128 0x7
130.3485 ++	.byte	0x8c	# DW_CFA_offset, column 0xc
130.3486 ++	.uleb128 0x8
130.3487 ++	.byte	0x8b	# DW_CFA_offset, column 0xb
130.3488 ++	.uleb128 0x9
130.3489 ++	.byte	0x8a	# DW_CFA_offset, column 0xa
130.3490 ++	.uleb128 0xa
130.3491 ++	.byte	0x89	# DW_CFA_offset, column 0x9
130.3492 ++	.uleb128 0xb
130.3493 ++	.byte	0x88	# DW_CFA_offset, column 0x8
130.3494 ++	.uleb128 0xc
130.3495 ++	.byte	0x87	# DW_CFA_offset, column 0x7
130.3496 ++	.uleb128 0xd
130.3497 ++	.byte	0x86	# DW_CFA_offset, column 0x6
130.3498 ++	.uleb128 0xe
130.3499 ++	.byte	0x4	# DW_CFA_advance_loc4
130.3500 ++	.4byte	.LCFI1-.LCFI0
130.3501 ++	.byte	0xd	# DW_CFA_def_cfa_register
130.3502 ++	.uleb128 0xb
130.3503 ++	.byte	0x4	# DW_CFA_advance_loc4
130.3504 ++	.4byte	.LCFI2-.LCFI1
130.3505 ++	.byte	0xe	# DW_CFA_def_cfa_offset
130.3506 ++	.uleb128 0xf0
130.3507 ++	.align	8
130.3508 ++.LEFDE1:
130.3509 ++.LSFDE2:
130.3510 ++	.4byte	.LEFDE2-.LASFDE2	# FDE Length
130.3511 ++.LASFDE2:
130.3512 ++	.4byte	.LASFDE2-.Lframe1	# FDE CIE offset
130.3513 ++	.4byte	.LFB2-.	# FDE initial location
130.3514 ++	.4byte	.LFE2-.LFB2	# FDE address range
130.3515 ++	.uleb128 0x0	# Augmentation size
130.3516 ++	.byte	0x4	# DW_CFA_advance_loc4
130.3517 ++	.4byte	.LCFI10-.LFB2
130.3518 ++	.byte	0x8f	# DW_CFA_offset, column 0xf
130.3519 ++	.uleb128 0x5
130.3520 ++	.byte	0x8e	# DW_CFA_offset, column 0xe
130.3521 ++	.uleb128 0x6
130.3522 ++	.byte	0x4	# DW_CFA_advance_loc4
130.3523 ++	.4byte	.LCFI11-.LCFI10
130.3524 ++	.byte	0xe	# DW_CFA_def_cfa_offset
130.3525 ++	.uleb128 0x140
130.3526 ++	.align	8
130.3527 ++.LEFDE2:
130.3528 ++
130.3529 ++#endif
130.3530 ++
130.3531 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sh/ffi.c gcc/libffi/src/sh/ffi.c
130.3532 +--- gcc-3.2.2.orig/libffi/src/sh/ffi.c	Thu Jan  1 09:00:00 1970
130.3533 ++++ gcc/libffi/src/sh/ffi.c	Fri Jul 19 10:08:43 2002
130.3534 +@@ -0,0 +1,722 @@
130.3535 ++/* -----------------------------------------------------------------------
130.3536 ++   ffi.c - Copyright (c) 2002 Kaz Kojima
130.3537 ++   
130.3538 ++   SuperH Foreign Function Interface 
130.3539 ++
130.3540 ++   Permission is hereby granted, free of charge, to any person obtaining
130.3541 ++   a copy of this software and associated documentation files (the
130.3542 ++   ``Software''), to deal in the Software without restriction, including
130.3543 ++   without limitation the rights to use, copy, modify, merge, publish,
130.3544 ++   distribute, sublicense, and/or sell copies of the Software, and to
130.3545 ++   permit persons to whom the Software is furnished to do so, subject to
130.3546 ++   the following conditions:
130.3547 ++
130.3548 ++   The above copyright notice and this permission notice shall be included
130.3549 ++   in all copies or substantial portions of the Software.
130.3550 ++
130.3551 ++   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
130.3552 ++   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
130.3553 ++   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
130.3554 ++   IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
130.3555 ++   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
130.3556 ++   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
130.3557 ++   OTHER DEALINGS IN THE SOFTWARE.
130.3558 ++   ----------------------------------------------------------------------- */
130.3559 ++
130.3560 ++#include <ffi.h>
130.3561 ++#include <ffi_common.h>
130.3562 ++
130.3563 ++#include <stdlib.h>
130.3564 ++
130.3565 ++#define NGREGARG 4
130.3566 ++#if defined(__SH4__)
130.3567 ++#define NFREGARG 8
130.3568 ++#endif
130.3569 ++
130.3570 ++#if defined(__HITACHI__)
130.3571 ++#define STRUCT_VALUE_ADDRESS_WITH_ARG 1
130.3572 ++#else
130.3573 ++#define STRUCT_VALUE_ADDRESS_WITH_ARG 0
130.3574 ++#endif
130.3575 ++
130.3576 ++/* If the structure has essentialy an unique element, return its type.  */
130.3577 ++static int
130.3578 ++simple_type (ffi_type *arg)
130.3579 ++{
130.3580 ++  if (arg->type != FFI_TYPE_STRUCT)
130.3581 ++    return arg->type;
130.3582 ++  else if (arg->elements[1])
130.3583 ++    return FFI_TYPE_STRUCT;
130.3584 ++
130.3585 ++  return simple_type (arg->elements[0]);
130.3586 ++}
130.3587 ++
130.3588 ++static int
130.3589 ++return_type (ffi_type *arg)
130.3590 ++{
130.3591 ++  unsigned short type;
130.3592 ++
130.3593 ++  if (arg->type != FFI_TYPE_STRUCT)
130.3594 ++    return arg->type;
130.3595 ++
130.3596 ++  type = simple_type (arg->elements[0]);
130.3597 ++  if (! arg->elements[1])
130.3598 ++    {
130.3599 ++      switch (type)
130.3600 ++	{
130.3601 ++	case FFI_TYPE_SINT8:
130.3602 ++	case FFI_TYPE_UINT8:
130.3603 ++	case FFI_TYPE_SINT16:
130.3604 ++	case FFI_TYPE_UINT16:
130.3605 ++	case FFI_TYPE_SINT32:
130.3606 ++	case FFI_TYPE_UINT32:
130.3607 ++	  return FFI_TYPE_INT;
130.3608 ++
130.3609 ++	default:
130.3610 ++	  return type;
130.3611 ++	}
130.3612 ++    }
130.3613 ++
130.3614 ++  /* gcc uses r0/r1 pair for some kind of structures.  */
130.3615 ++  if (arg->size <= 2 * sizeof (int))
130.3616 ++    {
130.3617 ++      int i = 0;
130.3618 ++      ffi_type *e;
130.3619 ++
130.3620 ++      while ((e = arg->elements[i++]))
130.3621 ++	{
130.3622 ++	  type = simple_type (e);
130.3623 ++	  switch (type)
130.3624 ++	    {
130.3625 ++	    case FFI_TYPE_SINT32:
130.3626 ++	    case FFI_TYPE_UINT32:
130.3627 ++	    case FFI_TYPE_INT:
130.3628 ++	    case FFI_TYPE_FLOAT:
130.3629 ++	      return FFI_TYPE_UINT64;
130.3630 ++
130.3631 ++	    default:
130.3632 ++	      break;
130.3633 ++	    }
130.3634 ++	}
130.3635 ++    }
130.3636 ++
130.3637 ++  return FFI_TYPE_STRUCT;
130.3638 ++}
130.3639 ++
130.3640 ++/* ffi_prep_args is called by the assembly routine once stack space
130.3641 ++   has been allocated for the function's arguments */
130.3642 ++
130.3643 ++/*@-exportheader@*/
130.3644 ++void ffi_prep_args(char *stack, extended_cif *ecif)
130.3645 ++/*@=exportheader@*/
130.3646 ++{
130.3647 ++  register unsigned int i;
130.3648 ++  register int tmp;
130.3649 ++  register unsigned int avn;
130.3650 ++  register void **p_argv;
130.3651 ++  register char *argp;
130.3652 ++  register ffi_type **p_arg;
130.3653 ++  int greg, ireg;
130.3654 ++#if defined(__SH4__)
130.3655 ++  int freg = 0;
130.3656 ++#endif
130.3657 ++
130.3658 ++  tmp = 0;
130.3659 ++  argp = stack;
130.3660 ++
130.3661 ++  if (return_type (ecif->cif->rtype) == FFI_TYPE_STRUCT)
130.3662 ++    {
130.3663 ++      *(void **) argp = ecif->rvalue;
130.3664 ++      argp += 4;
130.3665 ++      ireg = STRUCT_VALUE_ADDRESS_WITH_ARG ? 1 : 0;
130.3666 ++    }
130.3667 ++  else
130.3668 ++    ireg = 0;
130.3669 ++
130.3670 ++  /* Set arguments for registers.  */
130.3671 ++  greg = ireg;
130.3672 ++  avn = ecif->cif->nargs;
130.3673 ++  p_argv = ecif->avalue;
130.3674 ++
130.3675 ++  for (i = 0, p_arg = ecif->cif->arg_types; i < avn; i++, p_arg++, p_argv++)
130.3676 ++    {
130.3677 ++      size_t z;
130.3678 ++
130.3679 ++      z = (*p_arg)->size;
130.3680 ++      if (z < sizeof(int))
130.3681 ++	{
130.3682 ++	  if (greg++ >= NGREGARG)
130.3683 ++	    continue;
130.3684 ++
130.3685 ++	  z = sizeof(int);
130.3686 ++	  switch ((*p_arg)->type)
130.3687 ++	    {
130.3688 ++	    case FFI_TYPE_SINT8:
130.3689 ++	      *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
130.3690 ++	      break;
130.3691 ++  
130.3692 ++	    case FFI_TYPE_UINT8:
130.3693 ++	      *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
130.3694 ++	      break;
130.3695 ++  
130.3696 ++	    case FFI_TYPE_SINT16:
130.3697 ++	      *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
130.3698 ++	      break;
130.3699 ++  
130.3700 ++	    case FFI_TYPE_UINT16:
130.3701 ++	      *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
130.3702 ++	      break;
130.3703 ++  
130.3704 ++	    case FFI_TYPE_STRUCT:
130.3705 ++	      *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
130.3706 ++	      break;
130.3707 ++
130.3708 ++	    default:
130.3709 ++	      FFI_ASSERT(0);
130.3710 ++	    }
130.3711 ++	  argp += z;
130.3712 ++	}
130.3713 ++      else if (z == sizeof(int))
130.3714 ++	{
130.3715 ++#if defined(__SH4__)
130.3716 ++	  if ((*p_arg)->type == FFI_TYPE_FLOAT)
130.3717 ++	    {
130.3718 ++	      if (freg++ >= NFREGARG)
130.3719 ++		continue;
130.3720 ++	    }
130.3721 ++	  else
130.3722 ++#endif
130.3723 ++	    {
130.3724 ++	      if (greg++ >= NGREGARG)
130.3725 ++		continue;
130.3726 ++	    }
130.3727 ++	  *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
130.3728 ++	  argp += z;
130.3729 ++	}
130.3730 ++#if defined(__SH4__)
130.3731 ++      else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
130.3732 ++	{
130.3733 ++	  if (freg + 1 >= NFREGARG)
130.3734 ++	    continue;
130.3735 ++	  freg = (freg + 1) & ~1;
130.3736 ++	  freg += 2;
130.3737 ++	  memcpy (argp, *p_argv, z);
130.3738 ++	  argp += z;
130.3739 ++	}
130.3740 ++#endif
130.3741 ++      else
130.3742 ++	{
130.3743 ++	  int n = (z + sizeof (int) - 1) / sizeof (int);
130.3744 ++#if defined(__SH4__)
130.3745 ++	  if (greg + n - 1 >= NGREGARG)
130.3746 ++	    continue;
130.3747 ++	  greg += n;
130.3748 ++#else
130.3749 ++	  if (greg >= NGREGARG)
130.3750 ++	    continue;
130.3751 ++	  else if (greg + n - 1 >= NGREGARG)
130.3752 ++	    greg = NGREGARG;
130.3753 ++	  else
130.3754 ++	    greg += n;
130.3755 ++#endif
130.3756 ++	  memcpy (argp, *p_argv, z);
130.3757 ++	  argp += z;
130.3758 ++	}
130.3759 ++    }
130.3760 ++
130.3761 ++  /* Set arguments on stack.  */
130.3762 ++  greg = ireg;
130.3763 ++#if defined(__SH4__)
130.3764 ++  freg = 0;
130.3765 ++#endif
130.3766 ++  p_argv = ecif->avalue;
130.3767 ++
130.3768 ++  for (i = 0, p_arg = ecif->cif->arg_types; i < avn; i++, p_arg++, p_argv++)
130.3769 ++    {
130.3770 ++      size_t z;
130.3771 ++
130.3772 ++      z = (*p_arg)->size;
130.3773 ++      if (z < sizeof(int))
130.3774 ++	{
130.3775 ++	  if (greg++ < NGREGARG)
130.3776 ++	    continue;
130.3777 ++
130.3778 ++	  z = sizeof(int);
130.3779 ++	  switch ((*p_arg)->type)
130.3780 ++	    {
130.3781 ++	    case FFI_TYPE_SINT8:
130.3782 ++	      *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
130.3783 ++	      break;
130.3784 ++  
130.3785 ++	    case FFI_TYPE_UINT8:
130.3786 ++	      *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
130.3787 ++	      break;
130.3788 ++  
130.3789 ++	    case FFI_TYPE_SINT16:
130.3790 ++	      *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
130.3791 ++	      break;
130.3792 ++  
130.3793 ++	    case FFI_TYPE_UINT16:
130.3794 ++	      *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
130.3795 ++	      break;
130.3796 ++  
130.3797 ++	    case FFI_TYPE_STRUCT:
130.3798 ++	      *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
130.3799 ++	      break;
130.3800 ++
130.3801 ++	    default:
130.3802 ++	      FFI_ASSERT(0);
130.3803 ++	    }
130.3804 ++	  argp += z;
130.3805 ++	}
130.3806 ++      else if (z == sizeof(int))
130.3807 ++	{
130.3808 ++#if defined(__SH4__)
130.3809 ++	  if ((*p_arg)->type == FFI_TYPE_FLOAT)
130.3810 ++	    {
130.3811 ++	      if (freg++ < NFREGARG)
130.3812 ++		continue;
130.3813 ++	    }
130.3814 ++	  else
130.3815 ++#endif
130.3816 ++	    {
130.3817 ++	      if (greg++ < NGREGARG)
130.3818 ++		continue;
130.3819 ++	    }
130.3820 ++	  *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
130.3821 ++	  argp += z;
130.3822 ++	}
130.3823 ++#if defined(__SH4__)
130.3824 ++      else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
130.3825 ++	{
130.3826 ++	  if (freg + 1 < NFREGARG)
130.3827 ++	    {
130.3828 ++	      freg = (freg + 1) & ~1;
130.3829 ++	      freg += 2;
130.3830 ++	      continue;
130.3831 ++	    }
130.3832 ++	  memcpy (argp, *p_argv, z);
130.3833 ++	  argp += z;
130.3834 ++	}
130.3835 ++#endif
130.3836 ++      else
130.3837 ++	{
130.3838 ++	  int n = (z + sizeof (int) - 1) / sizeof (int);
130.3839 ++	  if (greg + n - 1 < NGREGARG)
130.3840 ++	    {
130.3841 ++	      greg += n;
130.3842 ++	      continue;
130.3843 ++	    }
130.3844 ++#if (! defined(__SH4__))
130.3845 ++	  else if (greg < NGREGARG)
130.3846 ++	    {
130.3847 ++	      greg = NGREGARG;
130.3848 ++	      continue;
130.3849 ++	    }
130.3850 ++#endif
130.3851 ++	  memcpy (argp, *p_argv, z);
130.3852 ++	  argp += z;
130.3853 ++	}
130.3854 ++    }
130.3855 ++
130.3856 ++  return;
130.3857 ++}
130.3858 ++
130.3859 ++/* Perform machine dependent cif processing */
130.3860 ++ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
130.3861 ++{
130.3862 ++  int i, j;
130.3863 ++  int size, type;
130.3864 ++  int n, m;
130.3865 ++  int greg;
130.3866 ++#if defined(__SH4__)
130.3867 ++  int freg = 0;
130.3868 ++#endif
130.3869 ++
130.3870 ++  cif->flags = 0;
130.3871 ++
130.3872 ++  greg = ((return_type (cif->rtype) == FFI_TYPE_STRUCT) &&
130.3873 ++	  STRUCT_VALUE_ADDRESS_WITH_ARG) ? 1 : 0;
130.3874 ++
130.3875 ++#if defined(__SH4__)
130.3876 ++  for (i = j = 0; i < cif->nargs && j < 12; i++)
130.3877 ++    {
130.3878 ++      type = (cif->arg_types)[i]->type;
130.3879 ++      switch (type)
130.3880 ++	{
130.3881 ++	case FFI_TYPE_FLOAT:
130.3882 ++	  if (freg >= NFREGARG)
130.3883 ++	    continue;
130.3884 ++	  freg++;
130.3885 ++	  cif->flags += ((cif->arg_types)[i]->type) << (2 * j);
130.3886 ++	  j++;
130.3887 ++	  break;
130.3888 ++
130.3889 ++	case FFI_TYPE_DOUBLE:
130.3890 ++	  if ((freg + 1) >= NFREGARG)
130.3891 ++	    continue;
130.3892 ++	  freg = (freg + 1) & ~1;
130.3893 ++	  freg += 2;
130.3894 ++	  cif->flags += ((cif->arg_types)[i]->type) << (2 * j);
130.3895 ++	  j++;
130.3896 ++	  break;
130.3897 ++	      
130.3898 ++	default:
130.3899 ++	  size = (cif->arg_types)[i]->size;
130.3900 ++	  n = (size + sizeof (int) - 1) / sizeof (int);
130.3901 ++	  if (greg + n - 1 >= NGREGARG)
130.3902 ++		continue;
130.3903 ++	  greg += n;
130.3904 ++	  for (m = 0; m < n; m++)
130.3905 ++	    cif->flags += FFI_TYPE_INT << (2 * j++);
130.3906 ++	  break;
130.3907 ++	}
130.3908 ++    }
130.3909 ++#else
130.3910 ++  for (i = j = 0; i < cif->nargs && j < 4; i++)
130.3911 ++    {
130.3912 ++      size = (cif->arg_types)[i]->size;
130.3913 ++      n = (size + sizeof (int) - 1) / sizeof (int);
130.3914 ++      if (greg >= NGREGARG)
130.3915 ++	continue;
130.3916 ++      else if (greg + n - 1 >= NGREGARG)
130.3917 ++	greg = NGREGARG;
130.3918 ++      else
130.3919 ++	greg += n;
130.3920 ++      for (m = 0; m < n; m++)
130.3921 ++        cif->flags += FFI_TYPE_INT << (2 * j++);
130.3922 ++    }
130.3923 ++#endif
130.3924 ++
130.3925 ++  /* Set the return type flag */
130.3926 ++  switch (cif->rtype->type)
130.3927 ++    {
130.3928 ++    case FFI_TYPE_STRUCT:
130.3929 ++      cif->flags += (unsigned) (return_type (cif->rtype)) << 24;
130.3930 ++      break;
130.3931 ++
130.3932 ++    case FFI_TYPE_VOID:
130.3933 ++    case FFI_TYPE_FLOAT:
130.3934 ++    case FFI_TYPE_DOUBLE:
130.3935 ++    case FFI_TYPE_SINT64:
130.3936 ++    case FFI_TYPE_UINT64:
130.3937 ++      cif->flags += (unsigned) cif->rtype->type << 24;
130.3938 ++      break;
130.3939 ++
130.3940 ++    default:
130.3941 ++      cif->flags += FFI_TYPE_INT << 24;
130.3942 ++      break;
130.3943 ++    }
130.3944 ++
130.3945 ++  return FFI_OK;
130.3946 ++}
130.3947 ++
130.3948 ++/*@-declundef@*/
130.3949 ++/*@-exportheader@*/
130.3950 ++extern void ffi_call_SYSV(void (*)(char *, extended_cif *), 
130.3951 ++			  /*@out@*/ extended_cif *, 
130.3952 ++			  unsigned, unsigned, 
130.3953 ++			  /*@out@*/ unsigned *, 
130.3954 ++			  void (*fn)());
130.3955 ++/*@=declundef@*/
130.3956 ++/*@=exportheader@*/
130.3957 ++
130.3958 ++void ffi_call(/*@dependent@*/ ffi_cif *cif, 
130.3959 ++	      void (*fn)(), 
130.3960 ++	      /*@out@*/ void *rvalue, 
130.3961 ++	      /*@dependent@*/ void **avalue)
130.3962 ++{
130.3963 ++  extended_cif ecif;
130.3964 ++
130.3965 ++  ecif.cif = cif;
130.3966 ++  ecif.avalue = avalue;
130.3967 ++  
130.3968 ++  /* If the return value is a struct and we don't have a return	*/
130.3969 ++  /* value address then we need to make one		        */
130.3970 ++
130.3971 ++  if ((rvalue == NULL) && 
130.3972 ++      (cif->rtype->type == FFI_TYPE_STRUCT))
130.3973 ++    {
130.3974 ++      /*@-sysunrecog@*/
130.3975 ++      ecif.rvalue = alloca(cif->rtype->size);
130.3976 ++      /*@=sysunrecog@*/
130.3977 ++    }
130.3978 ++  else
130.3979 ++    ecif.rvalue = rvalue;
130.3980 ++    
130.3981 ++
130.3982 ++  switch (cif->abi) 
130.3983 ++    {
130.3984 ++    case FFI_SYSV:
130.3985 ++      /*@-usedef@*/
130.3986 ++      ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, 
130.3987 ++		    cif->flags, ecif.rvalue, fn);
130.3988 ++      /*@=usedef@*/
130.3989 ++      break;
130.3990 ++    default:
130.3991 ++      FFI_ASSERT(0);
130.3992 ++      break;
130.3993 ++    }
130.3994 ++}
130.3995 ++
130.3996 ++extern void ffi_closure_SYSV (void);
130.3997 ++#if defined(__SH4__)
130.3998 ++extern void __ic_invalidate (void *line);
130.3999 ++#endif
130.4000 ++
130.4001 ++ffi_status
130.4002 ++ffi_prep_closure (ffi_closure* closure,
130.4003 ++		  ffi_cif* cif,
130.4004 ++		  void (*fun)(ffi_cif*, void*, void**, void*),
130.4005 ++		  void *user_data)
130.4006 ++{
130.4007 ++  unsigned int *tramp;
130.4008 ++
130.4009 ++  FFI_ASSERT (cif->abi == FFI_GCC_SYSV);
130.4010 ++
130.4011 ++  tramp = (unsigned int *) &closure->tramp[0];
130.4012 ++#ifdef __LITTLE_ENDIAN__
130.4013 ++  tramp[0] = 0xd301d202;
130.4014 ++  tramp[1] = 0x0009422b;
130.4015 ++#else
130.4016 ++  tramp[0] = 0xd202d301;
130.4017 ++  tramp[1] = 0x422b0009;
130.4018 ++#endif
130.4019 ++  *(void **) &tramp[2] = (void *)closure;          /* ctx */
130.4020 ++  *(void **) &tramp[3] = (void *)ffi_closure_SYSV; /* funaddr */
130.4021 ++
130.4022 ++  closure->cif = cif;
130.4023 ++  closure->fun = fun;
130.4024 ++  closure->user_data = user_data;
130.4025 ++
130.4026 ++#if defined(__SH4__)
130.4027 ++  /* Flush the icache.  */
130.4028 ++  __ic_invalidate(&closure->tramp[0]);
130.4029 ++#endif
130.4030 ++
130.4031 ++  return FFI_OK;
130.4032 ++}
130.4033 ++
130.4034 ++/* Basically the trampoline invokes ffi_closure_SYSV, and on 
130.4035 ++ * entry, r3 holds the address of the closure.
130.4036 ++ * After storing the registers that could possibly contain
130.4037 ++ * parameters to be passed into the stack frame and setting
130.4038 ++ * up space for a return value, ffi_closure_SYSV invokes the 
130.4039 ++ * following helper function to do most of the work.
130.4040 ++ */
130.4041 ++
130.4042 ++#ifdef __LITTLE_ENDIAN__
130.4043 ++#define OFS_INT8	0
130.4044 ++#define OFS_INT16	2
130.4045 ++#else
130.4046 ++#define OFS_INT8	3
130.4047 ++#define OFS_INT16	2
130.4048 ++#endif
130.4049 ++
130.4050 ++int
130.4051 ++ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue, 
130.4052 ++			 unsigned long *pgr, unsigned long *pfr, 
130.4053 ++			 unsigned long *pst)
130.4054 ++{
130.4055 ++  void **avalue;
130.4056 ++  ffi_type **p_arg;
130.4057 ++  int i, avn;
130.4058 ++  int ireg, greg = 0;
130.4059 ++#if defined(__SH4__)
130.4060 ++  int freg = 0;
130.4061 ++#endif
130.4062 ++  ffi_cif *cif; 
130.4063 ++  double temp; 
130.4064 ++
130.4065 ++  cif = closure->cif;
130.4066 ++  avalue = alloca(cif->nargs * sizeof(void *));
130.4067 ++
130.4068 ++  /* Copy the caller's structure return value address so that the closure
130.4069 ++     returns the data directly to the caller.  */
130.4070 ++  if (cif->rtype->type == FFI_TYPE_STRUCT)
130.4071 ++    {
130.4072 ++      rvalue = *pgr++;
130.4073 ++      ireg = STRUCT_VALUE_ADDRESS_WITH_ARG ? 1 : 0;
130.4074 ++    }
130.4075 ++  else
130.4076 ++    ireg = 0;
130.4077 ++
130.4078 ++  cif = closure->cif;
130.4079 ++  greg = ireg;
130.4080 ++  avn = cif->nargs;
130.4081 ++
130.4082 ++  /* Grab the addresses of the arguments from the stack frame.  */
130.4083 ++  for (i = 0, p_arg = cif->arg_types; i < avn; i++, p_arg++)
130.4084 ++    {
130.4085 ++      size_t z;
130.4086 ++
130.4087 ++      z = (*p_arg)->size;
130.4088 ++      if (z < sizeof(int))
130.4089 ++	{
130.4090 ++	  if (greg++ >= NGREGARG)
130.4091 ++	    continue;
130.4092 ++
130.4093 ++	  z = sizeof(int);
130.4094 ++	  switch ((*p_arg)->type)
130.4095 ++	    {
130.4096 ++	    case FFI_TYPE_SINT8:
130.4097 ++	    case FFI_TYPE_UINT8:
130.4098 ++	      avalue[i] = (((char *)pgr) + OFS_INT8);
130.4099 ++	      break;
130.4100 ++  
130.4101 ++	    case FFI_TYPE_SINT16:
130.4102 ++	    case FFI_TYPE_UINT16:
130.4103 ++	      avalue[i] = (((char *)pgr) + OFS_INT16);
130.4104 ++	      break;
130.4105 ++  
130.4106 ++	    case FFI_TYPE_STRUCT:
130.4107 ++	      avalue[i] = pgr;
130.4108 ++	      break;
130.4109 ++
130.4110 ++	    default:
130.4111 ++	      FFI_ASSERT(0);
130.4112 ++	    }
130.4113 ++	  pgr++;
130.4114 ++	}
130.4115 ++      else if (z == sizeof(int))
130.4116 ++	{
130.4117 ++#if defined(__SH4__)
130.4118 ++	  if ((*p_arg)->type == FFI_TYPE_FLOAT)
130.4119 ++	    {
130.4120 ++	      if (freg++ >= NFREGARG)
130.4121 ++		continue;
130.4122 ++	      avalue[i] = pfr;
130.4123 ++	      pfr++;
130.4124 ++	    }
130.4125 ++	  else
130.4126 ++#endif
130.4127 ++	    {
130.4128 ++	      if (greg++ >= NGREGARG)
130.4129 ++		continue;
130.4130 ++	      avalue[i] = pgr;
130.4131 ++	      pgr++;
130.4132 ++	    }
130.4133 ++	}
130.4134 ++#if defined(__SH4__)
130.4135 ++      else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
130.4136 ++	{
130.4137 ++	  if (freg + 1 >= NFREGARG)
130.4138 ++	    continue;
130.4139 ++	  freg = (freg + 1) & ~1;
130.4140 ++	  freg += 2;
130.4141 ++	  avalue[i] = pfr;
130.4142 ++	  pfr += 2;
130.4143 ++	}
130.4144 ++#endif
130.4145 ++      else
130.4146 ++	{
130.4147 ++	  int n = (z + sizeof (int) - 1) / sizeof (int);
130.4148 ++#if defined(__SH4__)
130.4149 ++	  if (greg + n - 1 >= NGREGARG)
130.4150 ++	    continue;
130.4151 ++	  greg += n;
130.4152 ++#else
130.4153 ++	  if (greg >= NGREGARG)
130.4154 ++	    continue;
130.4155 ++	  else if (greg + n - 1 >= NGREGARG)
130.4156 ++	    greg = NGREGARG;
130.4157 ++	  else
130.4158 ++	    greg += n;
130.4159 ++#endif
130.4160 ++	  avalue[i] = pgr;
130.4161 ++	  pgr += n;
130.4162 ++	}
130.4163 ++    }
130.4164 ++
130.4165 ++  greg = ireg;
130.4166 ++#if defined(__SH4__)
130.4167 ++  freg = 0;
130.4168 ++#endif
130.4169 ++
130.4170 ++  for (i = 0, p_arg = cif->arg_types; i < avn; i++, p_arg++)
130.4171 ++    {
130.4172 ++      size_t z;
130.4173 ++
130.4174 ++      z = (*p_arg)->size;
130.4175 ++      if (z < sizeof(int))
130.4176 ++	{
130.4177 ++	  if (greg++ < NGREGARG)
130.4178 ++	    continue;
130.4179 ++
130.4180 ++	  z = sizeof(int);
130.4181 ++	  switch ((*p_arg)->type)
130.4182 ++	    {
130.4183 ++	    case FFI_TYPE_SINT8:
130.4184 ++	    case FFI_TYPE_UINT8:
130.4185 ++	      avalue[i] = (((char *)pst) + OFS_INT8);
130.4186 ++	      break;
130.4187 ++  
130.4188 ++	    case FFI_TYPE_SINT16:
130.4189 ++	    case FFI_TYPE_UINT16:
130.4190 ++	      avalue[i] = (((char *)pst) + OFS_INT16);
130.4191 ++	      break;
130.4192 ++  
130.4193 ++	    case FFI_TYPE_STRUCT:
130.4194 ++	      avalue[i] = pst;
130.4195 ++	      break;
130.4196 ++
130.4197 ++	    default:
130.4198 ++	      FFI_ASSERT(0);
130.4199 ++	    }
130.4200 ++	  pst++;
130.4201 ++	}
130.4202 ++      else if (z == sizeof(int))
130.4203 ++	{
130.4204 ++#if defined(__SH4__)
130.4205 ++	  if ((*p_arg)->type == FFI_TYPE_FLOAT)
130.4206 ++	    {
130.4207 ++	      if (freg++ < NFREGARG)
130.4208 ++		continue;
130.4209 ++	    }
130.4210 ++	  else
130.4211 ++#endif
130.4212 ++	    {
130.4213 ++	      if (greg++ < NGREGARG)
130.4214 ++		continue;
130.4215 ++	    }
130.4216 ++	  avalue[i] = pst;
130.4217 ++	  pst++;
130.4218 ++	}
130.4219 ++#if defined(__SH4__)
130.4220 ++      else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
130.4221 ++	{
130.4222 ++	  if (freg + 1 < NFREGARG)
130.4223 ++	    {
130.4224 ++	      freg = (freg + 1) & ~1;
130.4225 ++	      freg += 2;
130.4226 ++	      continue;
130.4227 ++	    }
130.4228 ++	  avalue[i] = pst;
130.4229 ++	  pst += 2;
130.4230 ++	}
130.4231 ++#endif
130.4232 ++      else
130.4233 ++	{
130.4234 ++	  int n = (z + sizeof (int) - 1) / sizeof (int);
130.4235 ++	  if (greg + n - 1 < NGREGARG)
130.4236 ++	    {
130.4237 ++	      greg += n;
130.4238 ++	      continue;
130.4239 ++	    }
130.4240 ++#if (! defined(__SH4__))
130.4241 ++	  else if (greg < NGREGARG)
130.4242 ++	    {
130.4243 ++	      greg = NGREGARG;
130.4244 ++	      continue;
130.4245 ++	    }
130.4246 ++#endif
130.4247 ++	  avalue[i] = pst;
130.4248 ++	  pst += n;
130.4249 ++	}
130.4250 ++    }
130.4251 ++
130.4252 ++  (closure->fun) (cif, rvalue, avalue, closure->user_data);
130.4253 ++
130.4254 ++  /* Tell ffi_closure_osf how to perform return type promotions.  */
130.4255 ++  return cif->rtype->type;
130.4256 ++}
130.4257 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sh/sysv.S gcc/libffi/src/sh/sysv.S
130.4258 +--- gcc-3.2.2.orig/libffi/src/sh/sysv.S	Thu Jan  1 09:00:00 1970
130.4259 ++++ gcc/libffi/src/sh/sysv.S	Tue Dec 17 03:22:48 2002
130.4260 +@@ -0,0 +1,773 @@
130.4261 ++/* -----------------------------------------------------------------------
130.4262 ++   sysv.S - Copyright (c) 2002 Kaz Kojima
130.4263 ++   
130.4264 ++   SuperH Foreign Function Interface 
130.4265 ++
130.4266 ++   Permission is hereby granted, free of charge, to any person obtaining
130.4267 ++   a copy of this software and associated documentation files (the
130.4268 ++   ``Software''), to deal in the Software without restriction, including
130.4269 ++   without limitation the rights to use, copy, modify, merge, publish,
130.4270 ++   distribute, sublicense, and/or sell copies of the Software, and to
130.4271 ++   permit persons to whom the Software is furnished to do so, subject to
130.4272 ++   the following conditions:
130.4273 ++
130.4274 ++   The above copyright notice and this permission notice shall be included
130.4275 ++   in all copies or substantial portions of the Software.
130.4276 ++
130.4277 ++   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
130.4278 ++   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
130.4279 ++   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
130.4280 ++   IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
130.4281 ++   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
130.4282 ++   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
130.4283 ++   OTHER DEALINGS IN THE SOFTWARE.
130.4284 ++   ----------------------------------------------------------------------- */
130.4285 ++
130.4286 ++#define LIBFFI_ASM	
130.4287 ++#include <ffi.h>
130.4288 ++#ifdef HAVE_MACHINE_ASM_H
130.4289 ++#include <machine/asm.h>
130.4290 ++#else
130.4291 ++/* XXX these lose for some platforms, I'm sure. */
130.4292 ++#define CNAME(x) x
130.4293 ++#define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x):
130.4294 ++#endif
130.4295 ++
130.4296 ++#if defined(__HITACHI__)
130.4297 ++#define STRUCT_VALUE_ADDRESS_WITH_ARG 1
130.4298 ++#else
130.4299 ++#define STRUCT_VALUE_ADDRESS_WITH_ARG 0
130.4300 ++#endif
130.4301 ++
130.4302 ++.text
130.4303 ++
130.4304 ++	# r4:	ffi_prep_args
130.4305 ++	# r5:	&ecif
130.4306 ++	# r6:	bytes
130.4307 ++	# r7:	flags
130.4308 ++	# sp+0: rvalue
130.4309 ++	# sp+4: fn
130.4310 ++
130.4311 ++	# This assumes we are using gas.
130.4312 ++ENTRY(ffi_call_SYSV)
130.4313 ++	# Save registers
130.4314 ++.LFB1:
130.4315 ++	mov.l	r8,@-r15
130.4316 ++.LCFI0:
130.4317 ++	mov.l	r9,@-r15
130.4318 ++.LCFI1:
130.4319 ++	mov.l	r10,@-r15
130.4320 ++.LCFI2:
130.4321 ++	mov.l	r12,@-r15
130.4322 ++.LCFI3:
130.4323 ++	mov.l	r14,@-r15
130.4324 ++.LCFI4:
130.4325 ++	sts.l	pr,@-r15
130.4326 ++.LCFI5:
130.4327 ++	mov	r15,r14
130.4328 ++.LCFI6:
130.4329 ++#if defined(__SH4__)
130.4330 ++	mov	r6,r8
130.4331 ++	mov	r7,r9
130.4332 ++
130.4333 ++	sub	r6,r15
130.4334 ++	add	#-16,r15
130.4335 ++	mov	#~7,r0
130.4336 ++	and	r0,r15
130.4337 ++
130.4338 ++	mov	r4,r0
130.4339 ++	jsr	@r0
130.4340 ++	 mov	r15,r4
130.4341 ++
130.4342 ++	mov	r9,r1
130.4343 ++	shlr8	r9
130.4344 ++	shlr8	r9
130.4345 ++	shlr8	r9
130.4346 ++
130.4347 ++	mov	#FFI_TYPE_STRUCT,r2
130.4348 ++	cmp/eq	r2,r9
130.4349 ++	bf	1f
130.4350 ++#if STRUCT_VALUE_ADDRESS_WITH_ARG
130.4351 ++ 	mov.l	@r15+,r4
130.4352 ++	bra	2f
130.4353 ++	 mov	#5,r2
130.4354 ++#else
130.4355 ++ 	mov.l	@r15+,r10
130.4356 ++#endif
130.4357 ++1:
130.4358 ++	mov	#4,r2
130.4359 ++2:
130.4360 ++	mov	#4,r3
130.4361 ++
130.4362 ++L_pass:
130.4363 ++	cmp/pl	r8
130.4364 ++	bf	L_call_it
130.4365 ++
130.4366 ++	mov	r1,r0
130.4367 ++	and	#3,r0
130.4368 ++
130.4369 ++L_pass_d:
130.4370 ++	cmp/eq	#FFI_TYPE_DOUBLE,r0
130.4371 ++	bf	L_pass_f
130.4372 ++
130.4373 ++	mov	r3,r0
130.4374 ++	and	#1,r0
130.4375 ++	tst	r0,r0
130.4376 ++	bt	1f
130.4377 ++	add	#1,r3
130.4378 ++1:
130.4379 ++	mov	r15,r0
130.4380 ++	and	#7,r0
130.4381 ++	tst	r0,r0
130.4382 ++	bt	2f
130.4383 ++	add	#4,r15
130.4384 ++2:
130.4385 ++	mov	#12,r0
130.4386 ++	cmp/hs	r0,r3
130.4387 ++	bt/s	3f
130.4388 ++	 shlr2	r1
130.4389 ++	bsr	L_pop_d
130.4390 ++	 nop
130.4391 ++3:
130.4392 ++	add	#2,r3
130.4393 ++	bra	L_pass
130.4394 ++	 add	#-8,r8
130.4395 ++
130.4396 ++L_pop_d:
130.4397 ++	mov	r3,r0
130.4398 ++	add	r0,r0
130.4399 ++	add	r3,r0
130.4400 ++	add	#-12,r0
130.4401 ++	braf	r0
130.4402 ++	 nop
130.4403 ++#ifdef __LITTLE_ENDIAN__
130.4404 ++	fmov.s	@r15+,fr5
130.4405 ++	rts
130.4406 ++	 fmov.s	@r15+,fr4
130.4407 ++	fmov.s	@r15+,fr7
130.4408 ++	rts
130.4409 ++	 fmov.s	@r15+,fr6
130.4410 ++	fmov.s	@r15+,fr9
130.4411 ++	rts
130.4412 ++	 fmov.s	@r15+,fr8
130.4413 ++	fmov.s	@r15+,fr11
130.4414 ++	rts
130.4415 ++	 fmov.s	@r15+,fr10
130.4416 ++#else
130.4417 ++	fmov.s	@r15+,fr4
130.4418 ++	rts
130.4419 ++	 fmov.s	@r15+,fr5
130.4420 ++	fmov.s	@r15+,fr6
130.4421 ++	rts
130.4422 ++	 fmov.s	@r15+,fr7
130.4423 ++	fmov.s	@r15+,fr8
130.4424 ++	rts
130.4425 ++	 fmov.s	@r15+,fr9
130.4426 ++	fmov.s	@r15+,fr10
130.4427 ++	rts
130.4428 ++	 fmov.s	@r15+,fr11
130.4429 ++#endif
130.4430 ++
130.4431 ++L_pass_f:
130.4432 ++	cmp/eq	#FFI_TYPE_FLOAT,r0
130.4433 ++	bf	L_pass_i
130.4434 ++
130.4435 ++	mov	#12,r0
130.4436 ++	cmp/hs	r0,r3
130.4437 ++	bt/s	2f
130.4438 ++	 shlr2	r1
130.4439 ++	bsr	L_pop_f
130.4440 ++	 nop
130.4441 ++2:
130.4442 ++	add	#1,r3
130.4443 ++	bra	L_pass
130.4444 ++	 add	#-4,r8
130.4445 ++
130.4446 ++L_pop_f:
130.4447 ++	mov	r3,r0
130.4448 ++	shll2	r0
130.4449 ++	add	#-16,r0
130.4450 ++	braf	r0
130.4451 ++	 nop
130.4452 ++#ifdef __LITTLE_ENDIAN__
130.4453 ++	rts
130.4454 ++	 fmov.s	@r15+,fr5
130.4455 ++	rts
130.4456 ++	 fmov.s	@r15+,fr4
130.4457 ++	rts
130.4458 ++	 fmov.s	@r15+,fr7
130.4459 ++	rts
130.4460 ++	 fmov.s	@r15+,fr6
130.4461 ++	rts
130.4462 ++	 fmov.s	@r15+,fr9
130.4463 ++	rts
130.4464 ++	 fmov.s	@r15+,fr8
130.4465 ++	rts
130.4466 ++	 fmov.s	@r15+,fr11
130.4467 ++	rts
130.4468 ++	 fmov.s	@r15+,fr10
130.4469 ++#else
130.4470 ++	rts
130.4471 ++	 fmov.s	@r15+,fr4
130.4472 ++	rts
130.4473 ++	 fmov.s	@r15+,fr5
130.4474 ++	rts
130.4475 ++	 fmov.s	@r15+,fr6
130.4476 ++	rts
130.4477 ++	 fmov.s	@r15+,fr7
130.4478 ++	rts
130.4479 ++	 fmov.s	@r15+,fr8
130.4480 ++	rts
130.4481 ++	 fmov.s	@r15+,fr9
130.4482 ++	rts
130.4483 ++	 fmov.s	@r15+,fr10
130.4484 ++	rts
130.4485 ++	 fmov.s	@r15+,fr11
130.4486 ++#endif
130.4487 ++
130.4488 ++L_pass_i:
130.4489 ++	cmp/eq	#FFI_TYPE_INT,r0
130.4490 ++	bf	L_call_it
130.4491 ++
130.4492 ++	mov	#8,r0
130.4493 ++	cmp/hs	r0,r2
130.4494 ++	bt/s	2f
130.4495 ++	 shlr2	r1
130.4496 ++	bsr	L_pop_i
130.4497 ++	 nop
130.4498 ++2:
130.4499 ++	add	#1,r2
130.4500 ++	bra	L_pass
130.4501 ++	 add	#-4,r8
130.4502 ++
130.4503 ++L_pop_i:
130.4504 ++	mov	r2,r0
130.4505 ++	shll2	r0
130.4506 ++	add	#-16,r0
130.4507 ++	braf	r0
130.4508 ++	 nop
130.4509 ++	rts
130.4510 ++	 mov.l	@r15+,r4
130.4511 ++	rts
130.4512 ++	 mov.l	@r15+,r5
130.4513 ++	rts
130.4514 ++	 mov.l	@r15+,r6
130.4515 ++	rts
130.4516 ++	 mov.l	@r15+,r7
130.4517 ++
130.4518 ++L_call_it:
130.4519 ++	# call function
130.4520 ++#if (! STRUCT_VALUE_ADDRESS_WITH_ARG)
130.4521 ++	mov	r10, r2
130.4522 ++#endif
130.4523 ++	mov.l  @(28,r14),r1
130.4524 ++	jsr    @r1
130.4525 ++	 nop
130.4526 ++
130.4527 ++L_ret_d:
130.4528 ++	mov	#FFI_TYPE_DOUBLE,r2
130.4529 ++	cmp/eq	r2,r9
130.4530 ++	bf	L_ret_ll
130.4531 ++
130.4532 ++	mov.l	@(24,r14),r1
130.4533 ++#ifdef __LITTLE_ENDIAN__
130.4534 ++	fmov.s	fr1,@r1
130.4535 ++	add	#4,r1
130.4536 ++	bra	L_epilogue
130.4537 ++	 fmov.s	fr0,@r1
130.4538 ++#else
130.4539 ++	fmov.s	fr0,@r1
130.4540 ++	add	#4,r1
130.4541 ++	bra	L_epilogue
130.4542 ++	 fmov.s	fr1,@r1
130.4543 ++#endif
130.4544 ++
130.4545 ++L_ret_ll:
130.4546 ++	mov	#FFI_TYPE_SINT64,r2
130.4547 ++	cmp/eq	r2,r9
130.4548 ++	bt/s	1f
130.4549 ++	 mov	#FFI_TYPE_UINT64,r2
130.4550 ++	cmp/eq	r2,r9
130.4551 ++	bf	L_ret_f
130.4552 ++
130.4553 ++1:
130.4554 ++	mov.l	@(24,r14),r2
130.4555 ++	mov.l	r0,@r2
130.4556 ++	bra	L_epilogue
130.4557 ++	 mov.l	r1,@(4,r2)
130.4558 ++
130.4559 ++L_ret_f:
130.4560 ++	mov	#FFI_TYPE_FLOAT,r2
130.4561 ++	cmp/eq	r2,r9
130.4562 ++	bf	L_ret_i
130.4563 ++
130.4564 ++	mov.l	@(24,r14),r1
130.4565 ++	bra	L_epilogue
130.4566 ++	 fmov.s	fr0,@r1
130.4567 ++
130.4568 ++L_ret_i:
130.4569 ++	mov	#FFI_TYPE_INT,r2
130.4570 ++	cmp/eq	r2,r9
130.4571 ++	bf	L_epilogue
130.4572 ++
130.4573 ++	mov.l	@(24,r14),r1
130.4574 ++	bra	L_epilogue
130.4575 ++	 mov.l	r0,@r1
130.4576 ++
130.4577 ++L_epilogue:
130.4578 ++	# Remove the space we pushed for the args
130.4579 ++	mov   r14,r15
130.4580 ++
130.4581 ++	lds.l  @r15+,pr
130.4582 ++	mov.l  @r15+,r14
130.4583 ++	mov.l  @r15+,r12
130.4584 ++	mov.l  @r15+,r10
130.4585 ++	mov.l  @r15+,r9
130.4586 ++	rts
130.4587 ++	 mov.l  @r15+,r8
130.4588 ++#else
130.4589 ++	mov	r6,r8
130.4590 ++	mov	r7,r9
130.4591 ++
130.4592 ++	sub	r6,r15
130.4593 ++	add	#-16,r15
130.4594 ++	mov	#~7,r0
130.4595 ++	and	r0,r15
130.4596 ++
130.4597 ++	mov	r4,r0
130.4598 ++	jsr	@r0
130.4599 ++	 mov	r15,r4
130.4600 ++
130.4601 ++	mov	r9,r3
130.4602 ++	shlr8	r9
130.4603 ++	shlr8	r9
130.4604 ++	shlr8	r9
130.4605 ++
130.4606 ++	mov	#FFI_TYPE_STRUCT,r2
130.4607 ++	cmp/eq	r2,r9
130.4608 ++	bf	1f
130.4609 ++#if STRUCT_VALUE_ADDRESS_WITH_ARG
130.4610 ++	mov.l	@r15+,r4
130.4611 ++	bra	2f
130.4612 ++	 mov	#5,r2
130.4613 ++#else
130.4614 ++	mov.l	@r15+,r10
130.4615 ++#endif
130.4616 ++1:
130.4617 ++	mov	#4,r2
130.4618 ++2:
130.4619 ++
130.4620 ++L_pass:
130.4621 ++	cmp/pl	r8
130.4622 ++	bf	L_call_it
130.4623 ++
130.4624 ++	mov	r3,r0
130.4625 ++	and	#3,r0
130.4626 ++
130.4627 ++L_pass_d:
130.4628 ++	cmp/eq	#FFI_TYPE_DOUBLE,r0
130.4629 ++	bf	L_pass_i
130.4630 ++
130.4631 ++	mov	r15,r0
130.4632 ++	and	#7,r0
130.4633 ++	tst	r0,r0
130.4634 ++	bt	1f
130.4635 ++	add	#4,r15
130.4636 ++1:
130.4637 ++	mov	#8,r0
130.4638 ++	cmp/hs	r0,r2
130.4639 ++	bt/s	2f
130.4640 ++	 shlr2	r3
130.4641 ++	bsr	L_pop_d
130.4642 ++	 nop
130.4643 ++2:
130.4644 ++	add	#2,r2
130.4645 ++	bra	L_pass
130.4646 ++	 add	#-8,r8
130.4647 ++
130.4648 ++L_pop_d:
130.4649 ++	mov	r2,r0
130.4650 ++	add	r0,r0
130.4651 ++	add	r2,r0
130.4652 ++	add	#-12,r0
130.4653 ++	add	r0,r0
130.4654 ++	braf	r0
130.4655 ++	 nop
130.4656 ++	mov.l	@r15+,r4
130.4657 ++	rts
130.4658 ++	 mov.l	@r15+,r5
130.4659 ++	mov.l	@r15+,r5
130.4660 ++	rts
130.4661 ++	 mov.l	@r15+,r6
130.4662 ++	mov.l	@r15+,r6
130.4663 ++	rts
130.4664 ++	 mov.l	@r15+,r7
130.4665 ++	rts
130.4666 ++	 mov.l	@r15+,r7
130.4667 ++
130.4668 ++L_pass_i:
130.4669 ++	mov	#8,r0
130.4670 ++	cmp/hs	r0,r2
130.4671 ++	bt/s	2f
130.4672 ++	 shlr2	r3
130.4673 ++	bsr	L_pop_i
130.4674 ++	 nop
130.4675 ++2:
130.4676 ++	add	#1,r2
130.4677 ++	bra	L_pass
130.4678 ++	 add	#-4,r8
130.4679 ++
130.4680 ++L_pop_i:
130.4681 ++	mov	r2,r0
130.4682 ++	shll2	r0
130.4683 ++	add	#-16,r0
130.4684 ++	braf	r0
130.4685 ++	 nop
130.4686 ++	rts
130.4687 ++	 mov.l	@r15+,r4
130.4688 ++	rts
130.4689 ++	 mov.l	@r15+,r5
130.4690 ++	rts
130.4691 ++	 mov.l	@r15+,r6
130.4692 ++	rts
130.4693 ++	 mov.l	@r15+,r7
130.4694 ++
130.4695 ++L_call_it:
130.4696 ++	# call function
130.4697 ++#if (! STRUCT_VALUE_ADDRESS_WITH_ARG)
130.4698 ++	mov	r10, r2
130.4699 ++#endif
130.4700 ++	mov.l  @(28,r14),r1
130.4701 ++	jsr    @r1
130.4702 ++	 nop
130.4703 ++
130.4704 ++L_ret_d:
130.4705 ++	mov	#FFI_TYPE_DOUBLE,r2
130.4706 ++	cmp/eq	r2,r9
130.4707 ++	bf	L_ret_ll
130.4708 ++
130.4709 ++	mov.l	@(24,r14),r2
130.4710 ++	mov.l	r0,@r2
130.4711 ++	bra	L_epilogue
130.4712 ++	 mov.l	r1,@(4,r2)
130.4713 ++
130.4714 ++L_ret_ll:
130.4715 ++	mov	#FFI_TYPE_SINT64,r2
130.4716 ++	cmp/eq	r2,r9
130.4717 ++	bt/s	1f
130.4718 ++	 mov	#FFI_TYPE_UINT64,r2
130.4719 ++	cmp/eq	r2,r9
130.4720 ++	bf	L_ret_i
130.4721 ++
130.4722 ++1:
130.4723 ++	mov.l	@(24,r14),r2
130.4724 ++	mov.l	r0,@r2
130.4725 ++	bra	L_epilogue
130.4726 ++	 mov.l	r1,@(4,r2)
130.4727 ++
130.4728 ++L_ret_i:
130.4729 ++	mov	#FFI_TYPE_FLOAT,r2
130.4730 ++	cmp/eq	r2,r9
130.4731 ++	bt	1f
130.4732 ++	mov	#FFI_TYPE_INT,r2
130.4733 ++	cmp/eq	r2,r9
130.4734 ++	bf	L_epilogue
130.4735 ++1:
130.4736 ++	mov.l	@(24,r14),r1
130.4737 ++	bra	L_epilogue
130.4738 ++	 mov.l	r0,@r1
130.4739 ++
130.4740 ++L_epilogue:
130.4741 ++	# Remove the space we pushed for the args
130.4742 ++	mov   r14,r15
130.4743 ++
130.4744 ++	lds.l  @r15+,pr
130.4745 ++	mov.l  @r15+,r14
130.4746 ++	mov.l  @r15+,r12
130.4747 ++	mov.l  @r15+,r10
130.4748 ++	mov.l  @r15+,r9
130.4749 ++	rts
130.4750 ++	 mov.l  @r15+,r8
130.4751 ++#endif
130.4752 ++.LFE1:
130.4753 ++.ffi_call_SYSV_end:
130.4754 ++        .size    CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV)
130.4755 ++
130.4756 ++.globl	ffi_closure_helper_SYSV
130.4757 ++
130.4758 ++ENTRY(ffi_closure_SYSV)
130.4759 ++.LFB2:
130.4760 ++	mov.l	r14,@-r15
130.4761 ++.LCFI7:
130.4762 ++	sts.l	pr,@-r15
130.4763 ++
130.4764 ++	/* Stack layout:	
130.4765 ++	   ...
130.4766 ++	   32 bytes (floating register parameters, SH-4 only)
130.4767 ++	   16 bytes (register parameters)
130.4768 ++	    4 bytes (result)
130.4769 ++	    4 bytes (5th arg)
130.4770 ++	   <- new stack pointer
130.4771 ++	*/
130.4772 ++.LCFI8:
130.4773 ++#if defined(__SH4__)
130.4774 ++	add	#-56,r15
130.4775 ++#else
130.4776 ++	add	#-24,r15
130.4777 ++#endif
130.4778 ++.LCFI9:
130.4779 ++	mov	r15,r14
130.4780 ++.LCFIA:
130.4781 ++	mov	r14,r1
130.4782 ++	add	#24,r1
130.4783 ++	mov.l	r7,@-r1
130.4784 ++	mov.l	r6,@-r1
130.4785 ++	mov.l	r5,@-r1
130.4786 ++	mov.l	r4,@-r1
130.4787 ++	mov	r1,r6
130.4788 ++
130.4789 ++#if defined(__SH4__)
130.4790 ++	mov	r14,r1
130.4791 ++	add	#56,r1
130.4792 ++#ifdef __LITTLE_ENDIAN__
130.4793 ++	fmov.s	fr10,@-r1
130.4794 ++	fmov.s	fr11,@-r1
130.4795 ++	fmov.s	fr8,@-r1
130.4796 ++	fmov.s	fr9,@-r1
130.4797 ++	fmov.s	fr6,@-r1
130.4798 ++	fmov.s	fr7,@-r1
130.4799 ++	fmov.s	fr4,@-r1
130.4800 ++	fmov.s	fr5,@-r1
130.4801 ++#else
130.4802 ++	fmov.s	fr11,@-r1
130.4803 ++	fmov.s	fr10,@-r1
130.4804 ++	fmov.s	fr9,@-r1
130.4805 ++	fmov.s	fr8,@-r1
130.4806 ++	fmov.s	fr7,@-r1
130.4807 ++	fmov.s	fr6,@-r1
130.4808 ++	fmov.s	fr5,@-r1
130.4809 ++	fmov.s	fr4,@-r1
130.4810 ++#endif
130.4811 ++	mov	r1,r7
130.4812 ++#endif
130.4813 ++
130.4814 ++	mov	r14,r1
130.4815 ++	add	#4,r1
130.4816 ++	mov	r1,r5
130.4817 ++
130.4818 ++	mov	r14,r1
130.4819 ++#if defined(__SH4__)
130.4820 ++	add	#64,r1
130.4821 ++#else
130.4822 ++	add	#32,r1
130.4823 ++#endif
130.4824 ++	mov.l	r1,@r14
130.4825 ++
130.4826 ++	mov.l	L_helper,r0
130.4827 ++	jsr	@r0
130.4828 ++	 mov	r3,r4
130.4829 ++
130.4830 ++	shll	r0
130.4831 ++	mov	r0,r1
130.4832 ++	mova	L_table,r0
130.4833 ++	add	r1,r0
130.4834 ++	mov.w	@r0,r0
130.4835 ++	mov	r14,r2
130.4836 ++	braf	r0
130.4837 ++	 add	#4,r2
130.4838 ++0:
130.4839 ++	.align 2
130.4840 ++L_helper:
130.4841 ++	.long	ffi_closure_helper_SYSV
130.4842 ++L_table:
130.4843 ++	.short L_case_v - 0b	/* FFI_TYPE_VOID */
130.4844 ++	.short L_case_i - 0b	/* FFI_TYPE_INT */
130.4845 ++#if defined(__SH4__)
130.4846 ++	.short L_case_f - 0b	/* FFI_TYPE_FLOAT */
130.4847 ++	.short L_case_d - 0b	/* FFI_TYPE_DOUBLE */
130.4848 ++	.short L_case_d - 0b	/* FFI_TYPE_LONGDOUBLE */
130.4849 ++#else
130.4850 ++	.short L_case_i - 0b	/* FFI_TYPE_FLOAT */
130.4851 ++	.short L_case_ll - 0b	/* FFI_TYPE_DOUBLE */
130.4852 ++	.short L_case_ll - 0b	/* FFI_TYPE_LONGDOUBLE */
130.4853 ++#endif
130.4854 ++	.short L_case_uq - 0b	/* FFI_TYPE_UINT8 */
130.4855 ++	.short L_case_q - 0b	/* FFI_TYPE_SINT8 */
130.4856 ++	.short L_case_uh - 0b	/* FFI_TYPE_UINT16 */
130.4857 ++	.short L_case_h - 0b	/* FFI_TYPE_SINT16 */
130.4858 ++	.short L_case_i - 0b	/* FFI_TYPE_UINT32 */
130.4859 ++	.short L_case_i - 0b	/* FFI_TYPE_SINT32 */
130.4860 ++	.short L_case_ll - 0b	/* FFI_TYPE_UINT64 */
130.4861 ++	.short L_case_ll - 0b	/* FFI_TYPE_SINT64 */
130.4862 ++	.short L_case_v - 0b	/* FFI_TYPE_STRUCT */
130.4863 ++	.short L_case_i - 0b	/* FFI_TYPE_POINTER */
130.4864 ++
130.4865 ++#if defined(__SH4__)
130.4866 ++L_case_d:
130.4867 ++#ifdef __LITTLE_ENDIAN__
130.4868 ++	fmov.s	@r2+,fr1
130.4869 ++	bra	L_case_v
130.4870 ++	 fmov.s	@r2,fr0
130.4871 ++#else
130.4872 ++	fmov.s	@r2+,fr0
130.4873 ++	bra	L_case_v
130.4874 ++	 fmov.s	@r2,fr1
130.4875 ++#endif
130.4876 ++
130.4877 ++L_case_f:
130.4878 ++	bra	L_case_v
130.4879 ++	 fmov.s	@r2,fr0
130.4880 ++#endif
130.4881 ++	
130.4882 ++L_case_ll:
130.4883 ++	mov.l	@r2+,r0
130.4884 ++	bra	L_case_v
130.4885 ++	 mov.l	@r2,r1
130.4886 ++	
130.4887 ++L_case_i:
130.4888 ++	bra	L_case_v
130.4889 ++	 mov.l	@r2,r0
130.4890 ++	
130.4891 ++L_case_q:
130.4892 ++#ifdef __LITTLE_ENDIAN__
130.4893 ++#else
130.4894 ++	add	#3,r2
130.4895 ++#endif
130.4896 ++	bra	L_case_v
130.4897 ++	 mov.b	@r2,r0
130.4898 ++
130.4899 ++L_case_uq:
130.4900 ++#ifdef __LITTLE_ENDIAN__
130.4901 ++#else
130.4902 ++	add	#3,r2
130.4903 ++#endif
130.4904 ++	mov.b	@r2,r0
130.4905 ++	bra	L_case_v
130.4906 ++	 extu.b r0,r0
130.4907 ++
130.4908 ++L_case_h:
130.4909 ++#ifdef __LITTLE_ENDIAN__
130.4910 ++#else
130.4911 ++	add	#2,r2
130.4912 ++#endif
130.4913 ++	bra	L_case_v
130.4914 ++	 mov.w	@r2,r0
130.4915 ++
130.4916 ++L_case_uh:
130.4917 ++#ifdef __LITTLE_ENDIAN__
130.4918 ++#else
130.4919 ++	add	#2,r2
130.4920 ++#endif
130.4921 ++	mov.w	@r2,r0
130.4922 ++	extu.w	r0,r0
130.4923 ++	/* fall through */
130.4924 ++
130.4925 ++L_case_v:
130.4926 ++#if defined(__SH4__)
130.4927 ++	add	#56,r15
130.4928 ++#else
130.4929 ++	add	#24,r15
130.4930 ++#endif
130.4931 ++	lds.l	@r15+,pr
130.4932 ++	rts
130.4933 ++	 mov.l	@r15+,r14
130.4934 ++.LFE2:
130.4935 ++.ffi_closure_SYSV_end:
130.4936 ++        .size    CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
130.4937 ++
130.4938 ++	.section	".eh_frame","aw",@progbits
130.4939 ++__FRAME_BEGIN__:
130.4940 ++	.4byte	.LECIE1-.LSCIE1	/* Length of Common Information Entry */
130.4941 ++.LSCIE1:
130.4942 ++	.4byte	0x0	/* CIE Identifier Tag */
130.4943 ++	.byte	0x1	/* CIE Version */
130.4944 ++	.byte	0x0	/* CIE Augmentation */
130.4945 ++	.byte	0x1	/* uleb128 0x1; CIE Code Alignment Factor */
130.4946 ++	.byte	0x7c	/* sleb128 -4; CIE Data Alignment Factor */
130.4947 ++	.byte	0x11	/* CIE RA Column */
130.4948 ++	.byte	0xc	/* DW_CFA_def_cfa */
130.4949 ++	.byte	0xf	/* uleb128 0xf */
130.4950 ++	.byte	0x0	/* uleb128 0x0 */
130.4951 ++	.align	2
130.4952 ++.LECIE1:
130.4953 ++.LSFDE1:
130.4954 ++	.4byte	.LEFDE1-.LASFDE1	/* FDE Length */
130.4955 ++.LASFDE1:
130.4956 ++	.4byte	.LASFDE1-__FRAME_BEGIN__	/* FDE CIE offset */
130.4957 ++	.4byte	.LFB1	/* FDE initial location */
130.4958 ++	.4byte	.LFE1-.LFB1	 /* FDE address range */
130.4959 ++	.byte	0x4	/* DW_CFA_advance_loc4 */
130.4960 ++	.4byte	.LCFI0-.LFB1
130.4961 ++	.byte	0xe	/* DW_CFA_def_cfa_offset */
130.4962 ++	.byte	0x4	/* uleb128 0x4 */
130.4963 ++	.byte	0x4	/* DW_CFA_advance_loc4 */
130.4964 ++	.4byte	.LCFI1-.LCFI0
130.4965 ++	.byte	0xe	/* DW_CFA_def_cfa_offset */
130.4966 ++	.byte	0x8	/* uleb128 0x4 */
130.4967 ++	.byte	0x4	/* DW_CFA_advance_loc4 */
130.4968 ++	.4byte	.LCFI2-.LCFI1
130.4969 ++	.byte	0xe	/* DW_CFA_def_cfa_offset */
130.4970 ++	.byte	0xc	/* uleb128 0x4 */
130.4971 ++	.byte	0x4	/* DW_CFA_advance_loc4 */
130.4972 ++	.4byte	.LCFI3-.LCFI2
130.4973 ++	.byte	0xe	/* DW_CFA_def_cfa_offset */
130.4974 ++	.byte	0x10	/* uleb128 0x4 */
130.4975 ++	.byte	0x4	/* DW_CFA_advance_loc4 */
130.4976 ++	.4byte	.LCFI4-.LCFI3
130.4977 ++	.byte	0xe	/* DW_CFA_def_cfa_offset */
130.4978 ++	.byte	0x14	/* uleb128 0x4 */
130.4979 ++	.byte	0x4	/* DW_CFA_advance_loc4 */
130.4980 ++	.4byte	.LCFI5-.LCFI4
130.4981 ++	.byte	0xe	/* DW_CFA_def_cfa_offset */
130.4982 ++	.byte	0x18	/* uleb128 0x4 */
130.4983 ++	.byte	0x91	/* DW_CFA_offset, column 0x11 */
130.4984 ++	.byte	0x6	/* uleb128 0x6 */
130.4985 ++	.byte	0x8e	/* DW_CFA_offset, column 0xe */
130.4986 ++	.byte	0x5	/* uleb128 0x5 */
130.4987 ++	.byte	0x8c	/* DW_CFA_offset, column 0xc */
130.4988 ++	.byte	0x4	/* uleb128 0x4 */
130.4989 ++	.byte	0x8a	/* DW_CFA_offset, column 0xa */
130.4990 ++	.byte	0x3	/* uleb128 0x3 */
130.4991 ++	.byte	0x89	/* DW_CFA_offset, column 0x9 */
130.4992 ++	.byte	0x2	/* uleb128 0x2 */
130.4993 ++	.byte	0x88	/* DW_CFA_offset, column 0x8 */
130.4994 ++	.byte	0x1	/* uleb128 0x1 */
130.4995 ++	.byte	0x4	/* DW_CFA_advance_loc4 */
130.4996 ++	.4byte	.LCFI6-.LCFI5
130.4997 ++	.byte	0xd	/* DW_CFA_def_cfa_register */
130.4998 ++	.byte	0xe	/* uleb128 0xe */
130.4999 ++	.align	2
130.5000 ++.LEFDE1:
130.5001 ++
130.5002 ++.LSFDE3:
130.5003 ++	.4byte	.LEFDE3-.LASFDE3	/* FDE Length */
130.5004 ++.LASFDE3:
130.5005 ++	.4byte	.LASFDE3-__FRAME_BEGIN__	/* FDE CIE offset */
130.5006 ++	.4byte	.LFB2	/* FDE initial location */
130.5007 ++	.4byte	.LFE2-.LFB2	 /* FDE address range */
130.5008 ++	.byte	0x4	/* DW_CFA_advance_loc4 */
130.5009 ++	.4byte	.LCFI7-.LFB2
130.5010 ++	.byte	0xe	/* DW_CFA_def_cfa_offset */
130.5011 ++	.byte	0x4	/* uleb128 0x4 */
130.5012 ++	.byte	0x4	/* DW_CFA_advance_loc4 */
130.5013 ++	.4byte	.LCFI8-.LCFI7
130.5014 ++	.byte	0xe	/* DW_CFA_def_cfa_offset */
130.5015 ++	.byte	0x8	/* uleb128 0x8 */
130.5016 ++	.byte	0x4	/* DW_CFA_advance_loc4 */
130.5017 ++	.4byte	.LCFI9-.LCFI8
130.5018 ++	.byte	0xe	/* DW_CFA_def_cfa_offset */
130.5019 ++#if defined(__SH4__)
130.5020 ++	.byte	8+56	/* uleb128 8+56 */
130.5021 ++#else
130.5022 ++	.byte	8+24	/* uleb128 8+24 */
130.5023 ++#endif
130.5024 ++	.byte	0x91	/* DW_CFA_offset, column 0x11 */
130.5025 ++        .byte	0x2
130.5026 ++        .byte	0x8e	/* DW_CFA_offset, column 0xe */
130.5027 ++        .byte	0x1
130.5028 ++	.byte	0x4	/* DW_CFA_advance_loc4 */
130.5029 ++	.4byte	.LCFIA-.LCFI9
130.5030 ++	.byte	0xd	/* DW_CFA_def_cfa_register */
130.5031 ++	.byte	0xe	/* uleb128 0xe */
130.5032 ++	.align	2
130.5033 ++.LEFDE3:
130.5034 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sparc/ffi.c gcc/libffi/src/sparc/ffi.c
130.5035 +--- gcc-3.2.2.orig/libffi/src/sparc/ffi.c	Sat Mar  3 07:21:23 2001
130.5036 ++++ gcc/libffi/src/sparc/ffi.c	Sat Jan  4 08:08:56 2003
130.5037 +@@ -1,5 +1,5 @@
130.5038 + /* -----------------------------------------------------------------------
130.5039 +-   ffi.c - Copyright (c) 1996 Cygnus Solutions
130.5040 ++   ffi.c - Copyright (c) 1996, 2003 Cygnus Solutions
130.5041 +    
130.5042 +    Sparc Foreign Function Interface 
130.5043 + 
130.5044 +@@ -28,20 +28,22 @@
130.5045 + 
130.5046 + #include <stdlib.h>
130.5047 + 
130.5048 ++#ifdef SPARC64
130.5049 ++extern void ffi_closure_v9(void);
130.5050 ++#else
130.5051 ++extern void ffi_closure_v8(void);
130.5052 ++#endif
130.5053 ++
130.5054 + /* ffi_prep_args is called by the assembly routine once stack space
130.5055 +    has been allocated for the function's arguments */
130.5056 + 
130.5057 + void ffi_prep_args_v8(char *stack, extended_cif *ecif)
130.5058 + {
130.5059 +   int i;
130.5060 +-  int tmp;
130.5061 +-  int avn;
130.5062 +   void **p_argv;
130.5063 +   char *argp;
130.5064 +   ffi_type **p_arg;
130.5065 + 
130.5066 +-  tmp = 0;
130.5067 +-
130.5068 +   /* Skip 16 words for the window save area */
130.5069 +   argp = stack + 16*sizeof(int);
130.5070 + 
130.5071 +@@ -66,18 +68,12 @@
130.5072 +   ((int*)argp)[5] = 0;
130.5073 + #endif
130.5074 + 
130.5075 +-  avn = ecif->cif->nargs;
130.5076 +   p_argv = ecif->avalue;
130.5077 + 
130.5078 +-  for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
130.5079 +-       i && avn;
130.5080 +-       i--, p_arg++)
130.5081 ++  for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++)
130.5082 +     {
130.5083 +       size_t z;
130.5084 + 
130.5085 +-      if (avn) 
130.5086 +-	{
130.5087 +-	  avn--;
130.5088 + 	  if ((*p_arg)->type == FFI_TYPE_STRUCT
130.5089 + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
130.5090 + 	      || (*p_arg)->type == FFI_TYPE_LONGDOUBLE
130.5091 +@@ -122,7 +118,6 @@
130.5092 + 	    }
130.5093 + 	  p_argv++;
130.5094 + 	  argp += z;
130.5095 +-	}
130.5096 +     }
130.5097 +   
130.5098 +   return;
130.5099 +@@ -420,3 +415,101 @@
130.5100 +     }
130.5101 + 
130.5102 + }
130.5103 ++
130.5104 ++ffi_status
130.5105 ++ffi_prep_closure (ffi_closure* closure,
130.5106 ++		  ffi_cif* cif,
130.5107 ++		  void (*fun)(ffi_cif*, void*, void**, void*),
130.5108 ++		  void *user_data)
130.5109 ++{
130.5110 ++  unsigned int *tramp = (unsigned int *) &closure->tramp[0];
130.5111 ++  unsigned long fn;
130.5112 ++  unsigned long ctx = (unsigned long) closure;
130.5113 ++
130.5114 ++#ifdef SPARC64
130.5115 ++  /* Trampoline address is equal to the closure address.  We take advantage
130.5116 ++     of that to reduce the trampoline size by 8 bytes. */
130.5117 ++  FFI_ASSERT (cif->abi == FFI_V9);
130.5118 ++  fn = (unsigned long) ffi_closure_v9;
130.5119 ++  tramp[0] = 0x83414000;	/* rd	%pc, %g1	*/
130.5120 ++  tramp[1] = 0xca586010;	/* ldx	[%g1+16], %g5	*/
130.5121 ++  tramp[2] = 0x81c14000;	/* jmp	%g5		*/
130.5122 ++  tramp[3] = 0x01000000;	/* nop			*/
130.5123 ++  *((unsigned long *) &tramp[4]) = fn;
130.5124 ++#else
130.5125 ++  FFI_ASSERT (cif->abi == FFI_V8);
130.5126 ++  fn = (unsigned long) ffi_closure_v8;
130.5127 ++  tramp[0] = 0x03000000 | fn >> 10;	/* sethi %hi(fn), %g1	*/
130.5128 ++  tramp[1] = 0x05000000 | ctx >> 10;	/* sethi %hi(ctx), %g2	*/
130.5129 ++  tramp[2] = 0x81c06000 | (fn & 0x3ff);	/* jmp   %g1+%lo(fn)	*/
130.5130 ++  tramp[3] = 0x8410a000 | (ctx & 0x3ff);/* or    %g2, %lo(ctx)	*/
130.5131 ++#endif
130.5132 ++
130.5133 ++  closure->cif = cif;
130.5134 ++  closure->fun = fun;
130.5135 ++  closure->user_data = user_data;
130.5136 ++
130.5137 ++  /* Flush the Icache.  FIXME: alignment isn't certain, assume 8 bytes */
130.5138 ++#ifdef SPARC64
130.5139 ++  asm volatile ("flush	%0" : : "r" (closure) : "memory");
130.5140 ++  asm volatile ("flush	%0" : : "r" (((char *) closure) + 8) : "memory");
130.5141 ++#else
130.5142 ++  asm volatile ("iflush	%0" : : "r" (closure) : "memory");
130.5143 ++  asm volatile ("iflush	%0" : : "r" (((char *) closure) + 8) : "memory");
130.5144 ++#endif
130.5145 ++
130.5146 ++  return FFI_OK;
130.5147 ++}
130.5148 ++
130.5149 ++int
130.5150 ++ffi_closure_sparc_inner(ffi_closure *closure,
130.5151 ++  void *rvalue, unsigned long *gpr, double *fpr)
130.5152 ++{
130.5153 ++  ffi_cif *cif;
130.5154 ++  void **avalue;
130.5155 ++  ffi_type **arg_types;
130.5156 ++  int i, avn, argn;
130.5157 ++
130.5158 ++  cif = closure->cif;
130.5159 ++  avalue = alloca(cif->nargs * sizeof(void *));
130.5160 ++
130.5161 ++  argn = 0;
130.5162 ++
130.5163 ++  /* Copy the caller's structure return address to that the closure
130.5164 ++     returns the data directly to the caller.  */
130.5165 ++  if (cif->flags == FFI_TYPE_STRUCT)
130.5166 ++    {
130.5167 ++      rvalue = (void *) gpr[0];
130.5168 ++      argn = 1;
130.5169 ++    }
130.5170 ++
130.5171 ++  i = 0;
130.5172 ++  avn = cif->nargs;
130.5173 ++  arg_types = cif->arg_types;
130.5174 ++  
130.5175 ++  /* Grab the addresses of the arguments from the stack frame.  */
130.5176 ++  while (i < avn)
130.5177 ++    {
130.5178 ++      /* Assume big-endian.  FIXME */
130.5179 ++      argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG;
130.5180 ++
130.5181 ++#ifdef SPARC64
130.5182 ++      if (i < 6 && (arg_types[i]->type == FFI_TYPE_FLOAT
130.5183 ++		 || arg_types[i]->type == FFI_TYPE_DOUBLE
130.5184 ++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
130.5185 ++		 || arg_types[i]->type == FFI_TYPE_LONGDOUBLE
130.5186 ++#endif
130.5187 ++		))
130.5188 ++        avalue[i] = ((char *) &fpr[argn]) - arg_types[i]->size;
130.5189 ++      else
130.5190 ++#endif
130.5191 ++        avalue[i] = ((char *) &gpr[argn]) - arg_types[i]->size;
130.5192 ++      i++;
130.5193 ++    }
130.5194 ++
130.5195 ++  /* Invoke the closure.  */
130.5196 ++  (closure->fun) (cif, rvalue, avalue, closure->user_data);
130.5197 ++
130.5198 ++  /* Tell ffi_closure_sparc how to perform return type promotions.  */
130.5199 ++  return cif->rtype->type;
130.5200 ++}
130.5201 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sparc/v8.S gcc/libffi/src/sparc/v8.S
130.5202 +--- gcc-3.2.2.orig/libffi/src/sparc/v8.S	Mon Apr 29 05:12:04 2002
130.5203 ++++ gcc/libffi/src/sparc/v8.S	Sat Jan  4 08:08:56 2003
130.5204 +@@ -1,5 +1,5 @@
130.5205 + /* -----------------------------------------------------------------------
130.5206 +-   v8.S - Copyright (c) 1996, 1997 Cygnus Solutions
130.5207 ++   v8.S - Copyright (c) 1996, 1997, 2003 Cygnus Solutions
130.5208 +    
130.5209 +    Sparc Foreign Function Interface 
130.5210 + 
130.5211 +@@ -94,6 +94,72 @@
130.5212 + .ffi_call_V8_end:
130.5213 + 	.size	ffi_call_V8,.ffi_call_V8_end-ffi_call_V8
130.5214 + 
130.5215 ++
130.5216 ++#define	STACKFRAME	104	/* 16*4 register window +
130.5217 ++				   1*4 struct return +	
130.5218 ++				   6*4 args backing store +
130.5219 ++				   3*4 locals */
130.5220 ++
130.5221 ++/* ffi_closure_v8(...)
130.5222 ++
130.5223 ++   Receives the closure argument in %g2.   */
130.5224 ++
130.5225 ++	.text
130.5226 ++	.align 8
130.5227 ++	.globl ffi_closure_v8
130.5228 ++
130.5229 ++ffi_closure_v8:
130.5230 ++	.register	%g2, #scratch
130.5231 ++.LLFB2:
130.5232 ++	save	%sp, -STACKFRAME, %sp
130.5233 ++.LLCFI1:
130.5234 ++
130.5235 ++	! Store all of the potential argument registers in va_list format.
130.5236 ++	st	%i0, [%fp+68+0]
130.5237 ++	st	%i1, [%fp+68+4]
130.5238 ++	st	%i2, [%fp+68+8]
130.5239 ++	st	%i3, [%fp+68+12]
130.5240 ++	st	%i4, [%fp+68+16]
130.5241 ++	st	%i5, [%fp+68+20]
130.5242 ++
130.5243 ++	! Call ffi_closure_sparc_inner to do the bulk of the work.
130.5244 ++	mov	%g2, %o0
130.5245 ++	add	%fp, -8, %o1
130.5246 ++	add	%fp,  68, %o2
130.5247 ++	call	ffi_closure_sparc_inner
130.5248 ++	 mov	0, %o3
130.5249 ++
130.5250 ++	! Load up the return value in the proper type.
130.5251 ++	cmp	%o0, FFI_TYPE_VOID
130.5252 ++	be	done1
130.5253 ++
130.5254 ++	cmp	%o0, FFI_TYPE_FLOAT
130.5255 ++	be,a	done1
130.5256 ++	 ld	[%fp-8], %f0
130.5257 ++
130.5258 ++	cmp	%o0, FFI_TYPE_DOUBLE
130.5259 ++	be,a	done1
130.5260 ++	 ldd	[%fp-8], %f0
130.5261 ++
130.5262 ++	cmp	%o0, FFI_TYPE_SINT64
130.5263 ++	be,a	integer
130.5264 ++	 ld	[%fp-4], %i1
130.5265 ++
130.5266 ++	cmp	%o0, FFI_TYPE_UINT64
130.5267 ++	be,a	integer
130.5268 ++	 ld	[%fp-4], %i1
130.5269 ++
130.5270 ++integer:
130.5271 ++	ld	[%fp-8], %i0
130.5272 ++
130.5273 ++done1:
130.5274 ++	ret
130.5275 ++	 restore
130.5276 ++.LLFE2:
130.5277 ++
130.5278 ++.ffi_closure_v8_end:
130.5279 ++	.size	ffi_closure_v8,.ffi_closure_v8_end-ffi_closure_v8
130.5280 ++
130.5281 + #ifdef SPARC64
130.5282 + #define WS 8
130.5283 + #define nword	xword
130.5284 +@@ -148,3 +214,26 @@
130.5285 + 	.byte	0x1f	! uleb128 0x1f
130.5286 + 	.align	WS
130.5287 + .LLEFDE1:
130.5288 ++.LLSFDE2:
130.5289 ++	.uaword	.LLEFDE2-.LLASFDE2	! FDE Length
130.5290 ++.LLASFDE2:
130.5291 ++	.uaword	.LLASFDE2-.LLframe1	! FDE CIE offset
130.5292 ++#ifdef HAVE_AS_SPARC_UA_PCREL
130.5293 ++	.uaword	%r_disp32(.LLFB2)
130.5294 ++	.uaword	.LLFE2-.LLFB2	! FDE address range
130.5295 ++#else
130.5296 ++	.align	WS
130.5297 ++	.nword	.LLFB2
130.5298 ++	.uanword .LLFE2-.LLFB2	! FDE address range
130.5299 ++#endif
130.5300 ++	.byte	0x0	! uleb128 0x0; Augmentation size
130.5301 ++	.byte	0x4	! DW_CFA_advance_loc4
130.5302 ++	.uaword	.LLCFI1-.LLFB2
130.5303 ++	.byte	0xd	! DW_CFA_def_cfa_register
130.5304 ++	.byte	0x1e	! uleb128 0x1e
130.5305 ++	.byte	0x2d	! DW_CFA_GNU_window_save
130.5306 ++	.byte	0x9	! DW_CFA_register
130.5307 ++	.byte	0xf	! uleb128 0xf
130.5308 ++	.byte	0x1f	! uleb128 0x1f
130.5309 ++	.align	WS
130.5310 ++.LLEFDE2:
130.5311 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sparc/v9.S gcc/libffi/src/sparc/v9.S
130.5312 +--- gcc-3.2.2.orig/libffi/src/sparc/v9.S	Mon Apr 29 05:12:04 2002
130.5313 ++++ gcc/libffi/src/sparc/v9.S	Sat Jan  4 08:08:56 2003
130.5314 +@@ -1,5 +1,5 @@
130.5315 + /* -----------------------------------------------------------------------
130.5316 +-   v9.S - Copyright (c) 2000 Cygnus Solutions
130.5317 ++   v9.S - Copyright (c) 2000, 2003 Cygnus Solutions
130.5318 +    
130.5319 +    Sparc 64bit Foreign Function Interface 
130.5320 + 
130.5321 +@@ -99,7 +99,7 @@
130.5322 + 	cmp	%i3, FFI_TYPE_STRUCT
130.5323 + 	be,pn	%icc, dostruct
130.5324 + 
130.5325 +-	 cmp	%i3, FFI_TYPE_LONGDOUBLE
130.5326 ++	cmp	%i3, FFI_TYPE_LONGDOUBLE
130.5327 + 	bne,pt	%icc, done
130.5328 + 	 nop
130.5329 + 	std	%f0, [%i4+0]
130.5330 +@@ -125,6 +125,88 @@
130.5331 + .ffi_call_V9_end:
130.5332 + 	.size	ffi_call_V9,.ffi_call_V9_end-ffi_call_V9
130.5333 + 
130.5334 ++
130.5335 ++#define	STACKFRAME	 240	/* 16*8 register window +
130.5336 ++				   6*8 args backing store +
130.5337 ++				   8*8 locals */
130.5338 ++#define	FP		%fp+STACK_BIAS
130.5339 ++
130.5340 ++/* ffi_closure_v9(...)
130.5341 ++
130.5342 ++   Receives the closure argument in %g1.   */
130.5343 ++
130.5344 ++	.text
130.5345 ++	.align 8
130.5346 ++	.globl ffi_closure_v9
130.5347 ++
130.5348 ++ffi_closure_v9:
130.5349 ++.LLFB2:
130.5350 ++	save	%sp, -STACKFRAME, %sp
130.5351 ++.LLCFI1:
130.5352 ++
130.5353 ++	! Store all of the potential argument registers in va_list format.
130.5354 ++	stx	%i0, [FP+128+0]
130.5355 ++	stx	%i1, [FP+128+8]
130.5356 ++	stx	%i2, [FP+128+16]
130.5357 ++	stx	%i3, [FP+128+24]
130.5358 ++	stx	%i4, [FP+128+32]
130.5359 ++	stx	%i5, [FP+128+40]
130.5360 ++
130.5361 ++	! Store possible floating point argument registers too.
130.5362 ++	std	%f0, [FP-48]
130.5363 ++	std	%f2, [FP-40]
130.5364 ++	std	%f4, [FP-32]
130.5365 ++	std	%f6, [FP-24]
130.5366 ++	std	%f8, [FP-16]
130.5367 ++	std	%f10, [FP-8]
130.5368 ++
130.5369 ++	! Call ffi_closure_sparc_inner to do the bulk of the work.
130.5370 ++	mov	%g1, %o0
130.5371 ++	add	%fp, STACK_BIAS-64, %o1
130.5372 ++	add	%fp, STACK_BIAS+128, %o2
130.5373 ++	call	ffi_closure_sparc_inner
130.5374 ++	 add	%fp, STACK_BIAS-48, %o3
130.5375 ++
130.5376 ++	! Load up the return value in the proper type.
130.5377 ++	cmp	%o0, FFI_TYPE_VOID
130.5378 ++	be,pn	%icc, done1
130.5379 ++
130.5380 ++	cmp	%o0, FFI_TYPE_FLOAT
130.5381 ++	be,a,pn	%icc, done1
130.5382 ++	 ld	[FP-64], %f0
130.5383 ++
130.5384 ++	cmp	%o0, FFI_TYPE_DOUBLE
130.5385 ++	be,a,pn	%icc, done1
130.5386 ++	 ldd	[FP-64], %f0
130.5387 ++
130.5388 ++	cmp	%o0, FFI_TYPE_LONGDOUBLE
130.5389 ++	be,a,pn	%icc, longdouble1
130.5390 ++	 ldd	[FP-64], %f0
130.5391 ++
130.5392 ++	cmp	%o0, FFI_TYPE_STRUCT
130.5393 ++	be,pn	%icc, struct1
130.5394 ++
130.5395 ++	! FFI_TYPE_UINT64 | FFI_TYPE_SINT64 | FFI_TYPE_POINTER
130.5396 ++	ldx	[FP-64], %i0
130.5397 ++
130.5398 ++done1:
130.5399 ++	ret
130.5400 ++	 restore
130.5401 ++
130.5402 ++struct1:
130.5403 ++	ldx [FP-56], %i2
130.5404 ++	ret
130.5405 ++	 restore
130.5406 ++
130.5407 ++longdouble1:
130.5408 ++	ldd	[FP-56], %f2
130.5409 ++	ret
130.5410 ++	 restore
130.5411 ++.LLFE2:
130.5412 ++
130.5413 ++.ffi_closure_v9_end:
130.5414 ++	.size	ffi_closure_v9,.ffi_closure_v9_end-ffi_closure_v9
130.5415 ++
130.5416 + 	.section	".eh_frame",#alloc,#write
130.5417 + .LLframe1:
130.5418 + 	.uaword	.LLECIE1-.LLSCIE1	! Length of Common Information Entry
130.5419 +@@ -169,5 +251,27 @@
130.5420 + 	.byte	0x1f	! uleb128 0x1f
130.5421 + 	.align 8
130.5422 + .LLEFDE1:
130.5423 +-
130.5424 ++.LLSFDE2:
130.5425 ++	.uaword	.LLEFDE2-.LLASFDE2	! FDE Length
130.5426 ++.LLASFDE2:
130.5427 ++	.uaword	.LLASFDE2-.LLframe1	! FDE CIE offset
130.5428 ++#ifdef HAVE_AS_SPARC_UA_PCREL
130.5429 ++	.uaword	%r_disp32(.LLFB2)
130.5430 ++	.uaword	.LLFE2-.LLFB2		! FDE address range
130.5431 ++#else
130.5432 ++	.align 8
130.5433 ++	.xword	.LLFB2
130.5434 ++	.uaxword	.LLFE2-.LLFB2	! FDE address range
130.5435 ++#endif
130.5436 ++	.byte	0x0	! uleb128 0x0; Augmentation size
130.5437 ++	.byte	0x4	! DW_CFA_advance_loc4
130.5438 ++	.uaword	.LLCFI1-.LLFB2
130.5439 ++	.byte	0xd	! DW_CFA_def_cfa_register
130.5440 ++	.byte	0x1e	! uleb128 0x1e
130.5441 ++	.byte	0x2d	! DW_CFA_GNU_window_save
130.5442 ++	.byte	0x9	! DW_CFA_register
130.5443 ++	.byte	0xf	! uleb128 0xf
130.5444 ++	.byte	0x1f	! uleb128 0x1f
130.5445 ++	.align 8
130.5446 ++.LLEFDE2:
130.5447 + #endif
130.5448 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/types.c gcc/libffi/src/types.c
130.5449 +--- gcc-3.2.2.orig/libffi/src/types.c	Tue Mar 27 11:39:16 2001
130.5450 ++++ gcc/libffi/src/types.c	Wed Nov 27 07:24:05 2002
130.5451 +@@ -42,7 +42,8 @@
130.5452 + FFI_INTEGRAL_TYPEDEF(sint32, 4, 4, FFI_TYPE_SINT32);
130.5453 + FFI_INTEGRAL_TYPEDEF(float, 4, 4, FFI_TYPE_FLOAT);
130.5454 + 
130.5455 +-#if defined ALPHA || defined SPARC64
130.5456 ++#if defined ALPHA || defined SPARC64 || defined X86_64 || defined S390X \
130.5457 ++    || defined IA64
130.5458 + 
130.5459 + FFI_INTEGRAL_TYPEDEF(pointer, 8, 8, FFI_TYPE_POINTER);
130.5460 + 
130.5461 +@@ -52,22 +53,12 @@
130.5462 + 
130.5463 + #endif
130.5464 + 
130.5465 +-#ifdef X86
130.5466 ++#if defined X86 || defined X86_WIN32 || defined ARM || defined M68K
130.5467 + 
130.5468 + FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
130.5469 + FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
130.5470 + 
130.5471 +-#elif defined X86_WIN32
130.5472 +-
130.5473 +-FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
130.5474 +-FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
130.5475 +-
130.5476 +-#elif defined ARM
130.5477 +-
130.5478 +-FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
130.5479 +-FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
130.5480 +-
130.5481 +-#elif defined M68K
130.5482 ++#elif defined SH
130.5483 + 
130.5484 + FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
130.5485 + FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
130.5486 +@@ -80,12 +71,7 @@
130.5487 + #endif
130.5488 + 
130.5489 + 
130.5490 +-#ifdef X86
130.5491 +-
130.5492 +-FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
130.5493 +-FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE);
130.5494 +-
130.5495 +-#elif defined X86_WIN32
130.5496 ++#if defined X86 || defined X86_WIN32 || defined M68K
130.5497 + 
130.5498 + FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
130.5499 + FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE);
130.5500 +@@ -95,25 +81,25 @@
130.5501 + FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
130.5502 + FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE);
130.5503 + 
130.5504 +-#elif defined M68K
130.5505 ++#elif defined SH
130.5506 + 
130.5507 + FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
130.5508 +-FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE);
130.5509 ++FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE);
130.5510 + 
130.5511 + #elif defined SPARC
130.5512 + 
130.5513 + FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE);
130.5514 +-
130.5515 + #ifdef SPARC64
130.5516 +-
130.5517 + FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE);
130.5518 +-
130.5519 + #else
130.5520 +-
130.5521 + FFI_INTEGRAL_TYPEDEF(longdouble, 16, 8, FFI_TYPE_LONGDOUBLE);
130.5522 +-
130.5523 + #endif
130.5524 + 
130.5525 ++#elif defined X86_64
130.5526 ++
130.5527 ++FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE);
130.5528 ++FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE);
130.5529 ++
130.5530 + #else
130.5531 + 
130.5532 + FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE);
130.5533 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/ffi.c gcc/libffi/src/x86/ffi.c
130.5534 +--- gcc-3.2.2.orig/libffi/src/x86/ffi.c	Tue May 28 18:22:08 2002
130.5535 ++++ gcc/libffi/src/x86/ffi.c	Fri Dec  6 10:16:45 2002
130.5536 +@@ -1,5 +1,8 @@
130.5537 + /* -----------------------------------------------------------------------
130.5538 +-   ffi.c - Copyright (c) 1996, 1998, 1999  Cygnus Solutions
130.5539 ++   ffi.c - Copyright (c) 1996, 1998, 1999, 2001  Red Hat, Inc.
130.5540 ++           Copyright (c) 2002  Ranjit Mathew
130.5541 ++           Copyright (c) 2002  Bo Thorsen
130.5542 ++           Copyright (c) 2002  Roger Sayle
130.5543 +    
130.5544 +    x86 Foreign Function Interface 
130.5545 + 
130.5546 +@@ -23,6 +26,8 @@
130.5547 +    OTHER DEALINGS IN THE SOFTWARE.
130.5548 +    ----------------------------------------------------------------------- */
130.5549 + 
130.5550 ++#ifndef __x86_64__
130.5551 ++
130.5552 + #include <ffi.h>
130.5553 + #include <ffi_common.h>
130.5554 + 
130.5555 +@@ -36,12 +41,10 @@
130.5556 + /*@=exportheader@*/
130.5557 + {
130.5558 +   register unsigned int i;
130.5559 +-  register int tmp;
130.5560 +   register void **p_argv;
130.5561 +   register char *argp;
130.5562 +   register ffi_type **p_arg;
130.5563 + 
130.5564 +-  tmp = 0;
130.5565 +   argp = stack;
130.5566 + 
130.5567 +   if (ecif->cif->rtype->type == FFI_TYPE_STRUCT)
130.5568 +@@ -148,6 +151,18 @@
130.5569 + /*@=declundef@*/
130.5570 + /*@=exportheader@*/
130.5571 + 
130.5572 ++#ifdef X86_WIN32
130.5573 ++/*@-declundef@*/
130.5574 ++/*@-exportheader@*/
130.5575 ++extern void ffi_call_STDCALL(void (*)(char *, extended_cif *),
130.5576 ++			  /*@out@*/ extended_cif *,
130.5577 ++			  unsigned, unsigned,
130.5578 ++			  /*@out@*/ unsigned *,
130.5579 ++			  void (*fn)());
130.5580 ++/*@=declundef@*/
130.5581 ++/*@=exportheader@*/
130.5582 ++#endif /* X86_WIN32 */
130.5583 ++
130.5584 + void ffi_call(/*@dependent@*/ ffi_cif *cif, 
130.5585 + 	      void (*fn)(), 
130.5586 + 	      /*@out@*/ void *rvalue, 
130.5587 +@@ -180,6 +195,14 @@
130.5588 + 		    cif->flags, ecif.rvalue, fn);
130.5589 +       /*@=usedef@*/
130.5590 +       break;
130.5591 ++#ifdef X86_WIN32
130.5592 ++    case FFI_STDCALL:
130.5593 ++      /*@-usedef@*/
130.5594 ++      ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes,
130.5595 ++		    cif->flags, ecif.rvalue, fn);
130.5596 ++      /*@=usedef@*/
130.5597 ++      break;
130.5598 ++#endif /* X86_WIN32 */
130.5599 +     default:
130.5600 +       FFI_ASSERT(0);
130.5601 +       break;
130.5602 +@@ -266,12 +289,10 @@
130.5603 + /*@=exportheader@*/
130.5604 + {
130.5605 +   register unsigned int i;
130.5606 +-  register int tmp;
130.5607 +   register void **p_argv;
130.5608 +   register char *argp;
130.5609 +   register ffi_type **p_arg;
130.5610 + 
130.5611 +-  tmp = 0;
130.5612 +   argp = stack;
130.5613 + 
130.5614 +   if ( cif->rtype->type == FFI_TYPE_STRUCT ) {
130.5615 +@@ -281,13 +302,14 @@
130.5616 + 
130.5617 +   p_argv = avalue;
130.5618 + 
130.5619 +-  for (i = cif->nargs, p_arg = cif->arg_types; i != 0; i--, p_arg++)
130.5620 ++  for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++)
130.5621 +     {
130.5622 +       size_t z;
130.5623 + 
130.5624 +       /* Align if necessary */
130.5625 +-      if (((*p_arg)->alignment - 1) & (unsigned) argp)
130.5626 ++      if (((*p_arg)->alignment - 1) & (unsigned) argp) {
130.5627 + 	argp = (char *) ALIGN(argp, (*p_arg)->alignment);
130.5628 ++      }
130.5629 + 
130.5630 +       z = (*p_arg)->size;
130.5631 + 
130.5632 +@@ -298,7 +320,7 @@
130.5633 +       p_argv++;
130.5634 +       argp += z;
130.5635 +     }
130.5636 +-
130.5637 ++  
130.5638 +   return;
130.5639 + }
130.5640 + 
130.5641 +@@ -449,6 +471,15 @@
130.5642 + 	      /*@out@*/ unsigned *, 
130.5643 + 	      void (*fn)());
130.5644 + 
130.5645 ++#ifdef X86_WIN32
130.5646 ++extern void
130.5647 ++ffi_call_STDCALL(void (*)(char *, extended_cif *),
130.5648 ++	      /*@out@*/ extended_cif *,
130.5649 ++	      unsigned, unsigned,
130.5650 ++	      /*@out@*/ unsigned *,
130.5651 ++	      void (*fn)());
130.5652 ++#endif /* X86_WIN32 */
130.5653 ++
130.5654 + void
130.5655 + ffi_raw_call(/*@dependent@*/ ffi_cif *cif, 
130.5656 + 	     void (*fn)(), 
130.5657 +@@ -483,6 +514,14 @@
130.5658 + 		    cif->flags, ecif.rvalue, fn);
130.5659 +       /*@=usedef@*/
130.5660 +       break;
130.5661 ++#ifdef X86_WIN32
130.5662 ++    case FFI_STDCALL:
130.5663 ++      /*@-usedef@*/
130.5664 ++      ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes,
130.5665 ++		    cif->flags, ecif.rvalue, fn);
130.5666 ++      /*@=usedef@*/
130.5667 ++      break;
130.5668 ++#endif /* X86_WIN32 */
130.5669 +     default:
130.5670 +       FFI_ASSERT(0);
130.5671 +       break;
130.5672 +@@ -490,3 +529,5 @@
130.5673 + }
130.5674 + 
130.5675 + #endif
130.5676 ++
130.5677 ++#endif /* __x86_64__  */
130.5678 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/ffi64.c gcc/libffi/src/x86/ffi64.c
130.5679 +--- gcc-3.2.2.orig/libffi/src/x86/ffi64.c	Thu Jan  1 09:00:00 1970
130.5680 ++++ gcc/libffi/src/x86/ffi64.c	Wed Jan 29 00:54:28 2003
130.5681 +@@ -0,0 +1,706 @@
130.5682 ++/* -----------------------------------------------------------------------
130.5683 ++   ffi.c - Copyright (c) 2002  Bo Thorsen <bo@suse.de>
130.5684 ++   
130.5685 ++   x86-64 Foreign Function Interface 
130.5686 ++
130.5687 ++   Permission is hereby granted, free of charge, to any person obtaining
130.5688 ++   a copy of this software and associated documentation files (the
130.5689 ++   ``Software''), to deal in the Software without restriction, including
130.5690 ++   without limitation the rights to use, copy, modify, merge, publish,
130.5691 ++   distribute, sublicense, and/or sell copies of the Software, and to
130.5692 ++   permit persons to whom the Software is furnished to do so, subject to
130.5693 ++   the following conditions:
130.5694 ++
130.5695 ++   The above copyright notice and this permission notice shall be included
130.5696 ++   in all copies or substantial portions of the Software.
130.5697 ++
130.5698 ++   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
130.5699 ++   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
130.5700 ++   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
130.5701 ++   IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
130.5702 ++   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
130.5703 ++   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
130.5704 ++   OTHER DEALINGS IN THE SOFTWARE.
130.5705 ++   ----------------------------------------------------------------------- */
130.5706 ++
130.5707 ++#include <ffi.h>
130.5708 ++#include <ffi_common.h>
130.5709 ++
130.5710 ++#include <stdlib.h>
130.5711 ++#include <stdarg.h>
130.5712 ++
130.5713 ++/* ffi_prep_args is called by the assembly routine once stack space
130.5714 ++   has been allocated for the function's arguments */
130.5715 ++
130.5716 ++#ifdef __x86_64__
130.5717 ++
130.5718 ++#define MAX_GPR_REGS 6
130.5719 ++#define MAX_SSE_REGS 8
130.5720 ++typedef struct
130.5721 ++{
130.5722 ++  /* Registers for argument passing.  */
130.5723 ++  long gpr[MAX_GPR_REGS];
130.5724 ++  __int128_t sse[MAX_SSE_REGS];
130.5725 ++
130.5726 ++  /* Stack space for arguments.  */
130.5727 ++  char argspace[0];
130.5728 ++} stackLayout;
130.5729 ++
130.5730 ++/* All reference to register classes here is identical to the code in
130.5731 ++   gcc/config/i386/i386.c. Do *not* change one without the other.  */
130.5732 ++
130.5733 ++/* Register class used for passing given 64bit part of the argument.
130.5734 ++   These represent classes as documented by the PS ABI, with the exception
130.5735 ++   of SSESF, SSEDF classes, that are basically SSE class, just gcc will
130.5736 ++   use SF or DFmode move instead of DImode to avoid reformating penalties.
130.5737 ++
130.5738 ++   Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves
130.5739 ++   whenever possible (upper half does contain padding).
130.5740 ++ */
130.5741 ++enum x86_64_reg_class
130.5742 ++  {
130.5743 ++    X86_64_NO_CLASS,
130.5744 ++    X86_64_INTEGER_CLASS,
130.5745 ++    X86_64_INTEGERSI_CLASS,
130.5746 ++    X86_64_SSE_CLASS,
130.5747 ++    X86_64_SSESF_CLASS,
130.5748 ++    X86_64_SSEDF_CLASS,
130.5749 ++    X86_64_SSEUP_CLASS,
130.5750 ++    X86_64_X87_CLASS,
130.5751 ++    X86_64_X87UP_CLASS,
130.5752 ++    X86_64_MEMORY_CLASS
130.5753 ++  };
130.5754 ++
130.5755 ++#define MAX_CLASSES 4
130.5756 ++
130.5757 ++/* x86-64 register passing implementation.  See x86-64 ABI for details.  Goal
130.5758 ++   of this code is to classify each 8bytes of incoming argument by the register
130.5759 ++   class and assign registers accordingly.  */
130.5760 ++
130.5761 ++/* Return the union class of CLASS1 and CLASS2.
130.5762 ++   See the x86-64 PS ABI for details.  */
130.5763 ++
130.5764 ++static enum x86_64_reg_class
130.5765 ++merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
130.5766 ++{
130.5767 ++  /* Rule #1: If both classes are equal, this is the resulting class.  */
130.5768 ++  if (class1 == class2)
130.5769 ++    return class1;
130.5770 ++
130.5771 ++  /* Rule #2: If one of the classes is NO_CLASS, the resulting class is
130.5772 ++     the other class.  */
130.5773 ++  if (class1 == X86_64_NO_CLASS)
130.5774 ++    return class2;
130.5775 ++  if (class2 == X86_64_NO_CLASS)
130.5776 ++    return class1;
130.5777 ++
130.5778 ++  /* Rule #3: If one of the classes is MEMORY, the result is MEMORY.  */
130.5779 ++  if (class1 == X86_64_MEMORY_CLASS || class2 == X86_64_MEMORY_CLASS)
130.5780 ++    return X86_64_MEMORY_CLASS;
130.5781 ++
130.5782 ++  /* Rule #4: If one of the classes is INTEGER, the result is INTEGER.  */
130.5783 ++  if ((class1 == X86_64_INTEGERSI_CLASS && class2 == X86_64_SSESF_CLASS)
130.5784 ++      || (class2 == X86_64_INTEGERSI_CLASS && class1 == X86_64_SSESF_CLASS))
130.5785 ++    return X86_64_INTEGERSI_CLASS;
130.5786 ++  if (class1 == X86_64_INTEGER_CLASS || class1 == X86_64_INTEGERSI_CLASS
130.5787 ++      || class2 == X86_64_INTEGER_CLASS || class2 == X86_64_INTEGERSI_CLASS)
130.5788 ++    return X86_64_INTEGER_CLASS;
130.5789 ++
130.5790 ++  /* Rule #5: If one of the classes is X87 or X87UP class, MEMORY is used.  */
130.5791 ++  if (class1 == X86_64_X87_CLASS || class1 == X86_64_X87UP_CLASS
130.5792 ++      || class2 == X86_64_X87_CLASS || class2 == X86_64_X87UP_CLASS)
130.5793 ++    return X86_64_MEMORY_CLASS;
130.5794 ++
130.5795 ++  /* Rule #6: Otherwise class SSE is used.  */
130.5796 ++  return X86_64_SSE_CLASS;
130.5797 ++}
130.5798 ++
130.5799 ++/* Classify the argument of type TYPE and mode MODE.
130.5800 ++   CLASSES will be filled by the register class used to pass each word
130.5801 ++   of the operand.  The number of words is returned.  In case the parameter
130.5802 ++   should be passed in memory, 0 is returned. As a special case for zero
130.5803 ++   sized containers, classes[0] will be NO_CLASS and 1 is returned.
130.5804 ++
130.5805 ++   See the x86-64 PS ABI for details.
130.5806 ++*/
130.5807 ++static int
130.5808 ++classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
130.5809 ++		   int *byte_offset)
130.5810 ++{
130.5811 ++  /* First, align to the right place.  */
130.5812 ++  *byte_offset = ALIGN(*byte_offset, type->alignment);
130.5813 ++
130.5814 ++  switch (type->type)
130.5815 ++    {
130.5816 ++    case FFI_TYPE_UINT8:
130.5817 ++    case FFI_TYPE_SINT8:
130.5818 ++    case FFI_TYPE_UINT16:
130.5819 ++    case FFI_TYPE_SINT16:
130.5820 ++    case FFI_TYPE_UINT32:
130.5821 ++    case FFI_TYPE_SINT32:
130.5822 ++    case FFI_TYPE_UINT64:
130.5823 ++    case FFI_TYPE_SINT64:
130.5824 ++    case FFI_TYPE_POINTER:
130.5825 ++      if (((*byte_offset) % 8 + type->size) <= 4)
130.5826 ++	classes[0] = X86_64_INTEGERSI_CLASS;
130.5827 ++      else
130.5828 ++	classes[0] = X86_64_INTEGER_CLASS;
130.5829 ++      return 1;
130.5830 ++    case FFI_TYPE_FLOAT:
130.5831 ++      if (((*byte_offset) % 8) == 0)
130.5832 ++	classes[0] = X86_64_SSESF_CLASS;
130.5833 ++      else
130.5834 ++	classes[0] = X86_64_SSE_CLASS;
130.5835 ++      return 1;
130.5836 ++    case FFI_TYPE_DOUBLE:
130.5837 ++      classes[0] = X86_64_SSEDF_CLASS;
130.5838 ++      return 1;
130.5839 ++    case FFI_TYPE_LONGDOUBLE:
130.5840 ++      classes[0] = X86_64_X87_CLASS;
130.5841 ++      classes[1] = X86_64_X87UP_CLASS;
130.5842 ++      return 2;
130.5843 ++    case FFI_TYPE_STRUCT:
130.5844 ++      {
130.5845 ++	const int UNITS_PER_WORD = 8;
130.5846 ++	int words = (type->size + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
130.5847 ++	ffi_type **ptr; 
130.5848 ++	int i;
130.5849 ++	enum x86_64_reg_class subclasses[MAX_CLASSES];
130.5850 ++
130.5851 ++	/* If the struct is larger than 16 bytes, pass it on the stack.  */
130.5852 ++	if (type->size > 16)
130.5853 ++	  return 0;
130.5854 ++
130.5855 ++	for (i = 0; i < words; i++)
130.5856 ++	  classes[i] = X86_64_NO_CLASS;
130.5857 ++
130.5858 ++	/* Merge the fields of structure.  */
130.5859 ++	for (ptr=type->elements; (*ptr)!=NULL; ptr++)
130.5860 ++	  {
130.5861 ++	    int num;
130.5862 ++
130.5863 ++	    num = classify_argument (*ptr, subclasses, byte_offset);
130.5864 ++	    if (num == 0)
130.5865 ++	      return 0;
130.5866 ++	    for (i = 0; i < num; i++)
130.5867 ++	      {
130.5868 ++		int pos = *byte_offset / 8;
130.5869 ++		classes[i + pos] =
130.5870 ++		  merge_classes (subclasses[i], classes[i + pos]);
130.5871 ++	      }
130.5872 ++
130.5873 ++	    if ((*ptr)->type != FFI_TYPE_STRUCT)
130.5874 ++	      *byte_offset += (*ptr)->size;
130.5875 ++	  }
130.5876 ++
130.5877 ++	/* Final merger cleanup.  */
130.5878 ++	for (i = 0; i < words; i++)
130.5879 ++	  {
130.5880 ++	    /* If one class is MEMORY, everything should be passed in
130.5881 ++	       memory.  */
130.5882 ++	    if (classes[i] == X86_64_MEMORY_CLASS)
130.5883 ++	      return 0;
130.5884 ++
130.5885 ++	    /* The X86_64_SSEUP_CLASS should be always preceded by
130.5886 ++	       X86_64_SSE_CLASS.  */
130.5887 ++	    if (classes[i] == X86_64_SSEUP_CLASS
130.5888 ++		&& (i == 0 || classes[i - 1] != X86_64_SSE_CLASS))
130.5889 ++	      classes[i] = X86_64_SSE_CLASS;
130.5890 ++
130.5891 ++	    /*  X86_64_X87UP_CLASS should be preceded by X86_64_X87_CLASS.  */
130.5892 ++	    if (classes[i] == X86_64_X87UP_CLASS
130.5893 ++		&& (i == 0 || classes[i - 1] != X86_64_X87_CLASS))
130.5894 ++	      classes[i] = X86_64_SSE_CLASS;
130.5895 ++	  }
130.5896 ++	return words;
130.5897 ++      }
130.5898 ++
130.5899 ++    default:
130.5900 ++      FFI_ASSERT(0);
130.5901 ++    }
130.5902 ++  return 0; /* Never reached.  */
130.5903 ++}
130.5904 ++
130.5905 ++/* Examine the argument and return set number of register required in each
130.5906 ++   class.  Return 0 iff parameter should be passed in memory.  */
130.5907 ++static int
130.5908 ++examine_argument (ffi_type *type, int in_return, int *int_nregs,int *sse_nregs)
130.5909 ++{
130.5910 ++  enum x86_64_reg_class class[MAX_CLASSES];
130.5911 ++  int offset = 0;
130.5912 ++  int n;
130.5913 ++
130.5914 ++  n = classify_argument (type, class, &offset);
130.5915 ++
130.5916 ++  if (n == 0)
130.5917 ++    return 0;
130.5918 ++
130.5919 ++  *int_nregs = 0;
130.5920 ++  *sse_nregs = 0;
130.5921 ++  for (n--; n>=0; n--)
130.5922 ++    switch (class[n])
130.5923 ++      {
130.5924 ++      case X86_64_INTEGER_CLASS:
130.5925 ++      case X86_64_INTEGERSI_CLASS:
130.5926 ++	(*int_nregs)++;
130.5927 ++	break;
130.5928 ++      case X86_64_SSE_CLASS:
130.5929 ++      case X86_64_SSESF_CLASS:
130.5930 ++      case X86_64_SSEDF_CLASS:
130.5931 ++	(*sse_nregs)++;
130.5932 ++	break;
130.5933 ++      case X86_64_NO_CLASS:
130.5934 ++      case X86_64_SSEUP_CLASS:
130.5935 ++	break;
130.5936 ++      case X86_64_X87_CLASS:
130.5937 ++      case X86_64_X87UP_CLASS:
130.5938 ++	if (!in_return)
130.5939 ++	  return 0;
130.5940 ++	break;
130.5941 ++      default:
130.5942 ++	abort ();
130.5943 ++      }
130.5944 ++  return 1;
130.5945 ++}
130.5946 ++
130.5947 ++/* Functions to load floats and double to an SSE register placeholder.  */
130.5948 ++extern void float2sse (float, __int128_t *);
130.5949 ++extern void double2sse (double, __int128_t *);
130.5950 ++extern void floatfloat2sse (void *, __int128_t *);
130.5951 ++
130.5952 ++/* Functions to put the floats and doubles back.  */
130.5953 ++extern float sse2float (__int128_t *);
130.5954 ++extern double sse2double (__int128_t *);
130.5955 ++extern void sse2floatfloat(__int128_t *, void *);
130.5956 ++
130.5957 ++/*@-exportheader@*/
130.5958 ++void
130.5959 ++ffi_prep_args (stackLayout *stack, extended_cif *ecif)
130.5960 ++/*@=exportheader@*/
130.5961 ++{
130.5962 ++  int gprcount, ssecount, i, g, s;
130.5963 ++  void **p_argv;
130.5964 ++  void *argp = &stack->argspace;
130.5965 ++  ffi_type **p_arg;
130.5966 ++
130.5967 ++  /* First check if the return value should be passed in memory. If so,
130.5968 ++     pass the pointer as the first argument.  */
130.5969 ++  gprcount = ssecount = 0;
130.5970 ++  if (ecif->cif->rtype->type != FFI_TYPE_VOID 
130.5971 ++      && examine_argument (ecif->cif->rtype, 1, &g, &s) == 0)
130.5972 ++    (void *)stack->gpr[gprcount++] = ecif->rvalue;
130.5973 ++
130.5974 ++  for (i=ecif->cif->nargs, p_arg=ecif->cif->arg_types, p_argv = ecif->avalue;
130.5975 ++       i!=0; i--, p_arg++, p_argv++)
130.5976 ++    {
130.5977 ++      int in_register = 0;
130.5978 ++
130.5979 ++      switch ((*p_arg)->type)
130.5980 ++	{
130.5981 ++	case FFI_TYPE_SINT8:
130.5982 ++	case FFI_TYPE_SINT16:
130.5983 ++	case FFI_TYPE_SINT32:
130.5984 ++	case FFI_TYPE_SINT64:
130.5985 ++	case FFI_TYPE_UINT8:
130.5986 ++	case FFI_TYPE_UINT16:
130.5987 ++	case FFI_TYPE_UINT32:
130.5988 ++	case FFI_TYPE_UINT64:
130.5989 ++	case FFI_TYPE_POINTER:
130.5990 ++	  if (gprcount < MAX_GPR_REGS)
130.5991 ++	    {
130.5992 ++	      stack->gpr[gprcount] = 0;
130.5993 ++	      stack->gpr[gprcount++] = *(long long *)(*p_argv);
130.5994 ++	      in_register = 1;
130.5995 ++	    }
130.5996 ++	  break;
130.5997 ++
130.5998 ++	case FFI_TYPE_FLOAT:
130.5999 ++	  if (ssecount < MAX_SSE_REGS)
130.6000 ++	    {
130.6001 ++	      float2sse (*(float *)(*p_argv), &stack->sse[ssecount++]);
130.6002 ++	      in_register = 1;
130.6003 ++	    }
130.6004 ++	  break;
130.6005 ++
130.6006 ++	case FFI_TYPE_DOUBLE:
130.6007 ++	  if (ssecount < MAX_SSE_REGS)
130.6008 ++	    {
130.6009 ++	      double2sse (*(double *)(*p_argv), &stack->sse[ssecount++]);
130.6010 ++	      in_register = 1;
130.6011 ++	    }
130.6012 ++	  break;
130.6013 ++	}
130.6014 ++
130.6015 ++      if (in_register)
130.6016 ++	continue;
130.6017 ++
130.6018 ++      /* Either all places in registers where filled, or this is a
130.6019 ++	 type that potentially goes into a memory slot.  */
130.6020 ++      if (examine_argument (*p_arg, 0, &g, &s) == 0
130.6021 ++	  || gprcount + g > MAX_GPR_REGS || ssecount + s > MAX_SSE_REGS)
130.6022 ++	{
130.6023 ++	  /* Pass this argument in memory.  */
130.6024 ++	  argp = (void *)ALIGN(argp, (*p_arg)->alignment);
130.6025 ++	  memcpy (argp, *p_argv, (*p_arg)->size);
130.6026 ++	  argp += (*p_arg)->size;
130.6027 ++	}
130.6028 ++      else
130.6029 ++	{
130.6030 ++	  /* All easy cases are eliminated. Now fire the big guns.  */
130.6031 ++
130.6032 ++	  enum x86_64_reg_class classes[MAX_CLASSES];
130.6033 ++	  int offset = 0, j, num;
130.6034 ++	  void *a;
130.6035 ++
130.6036 ++	  num = classify_argument (*p_arg, classes, &offset);
130.6037 ++	  for (j=0, a=*p_argv; j<num; j++, a+=8)
130.6038 ++	    {
130.6039 ++	      switch (classes[j])
130.6040 ++		{
130.6041 ++		case X86_64_INTEGER_CLASS:
130.6042 ++		case X86_64_INTEGERSI_CLASS:
130.6043 ++		  stack->gpr[gprcount++] = *(long long *)a;
130.6044 ++		  break;
130.6045 ++		case X86_64_SSE_CLASS:
130.6046 ++		  floatfloat2sse (a, &stack->sse[ssecount++]);
130.6047 ++		  break;
130.6048 ++		case X86_64_SSESF_CLASS:
130.6049 ++		  float2sse (*(float *)a, &stack->sse[ssecount++]);
130.6050 ++		  break;
130.6051 ++		case X86_64_SSEDF_CLASS:
130.6052 ++		  double2sse (*(double *)a, &stack->sse[ssecount++]);
130.6053 ++		  break;
130.6054 ++		default:
130.6055 ++		  abort();
130.6056 ++		}
130.6057 ++	    }
130.6058 ++	}
130.6059 ++    }
130.6060 ++}
130.6061 ++
130.6062 ++/* Perform machine dependent cif processing.  */
130.6063 ++ffi_status
130.6064 ++ffi_prep_cif_machdep (ffi_cif *cif)
130.6065 ++{
130.6066 ++  int gprcount, ssecount, i, g, s;
130.6067 ++
130.6068 ++  gprcount = ssecount = 0;
130.6069 ++
130.6070 ++  /* Reset the byte count. We handle this size estimation here.  */
130.6071 ++  cif->bytes = 0;
130.6072 ++
130.6073 ++  /* If the return value should be passed in memory, pass the pointer
130.6074 ++     as the first argument. The actual memory isn't allocated here.  */
130.6075 ++  if (cif->rtype->type != FFI_TYPE_VOID 
130.6076 ++      && examine_argument (cif->rtype, 1, &g, &s) == 0)
130.6077 ++    gprcount = 1;
130.6078 ++
130.6079 ++  /* Go over all arguments and determine the way they should be passed.
130.6080 ++     If it's in a register and there is space for it, let that be so. If
130.6081 ++     not, add it's size to the stack byte count.  */
130.6082 ++  for (i=0; i<cif->nargs; i++)
130.6083 ++    {
130.6084 ++      if (examine_argument (cif->arg_types[i], 0, &g, &s) == 0
130.6085 ++	  || gprcount + g > MAX_GPR_REGS || ssecount + s > MAX_SSE_REGS)
130.6086 ++	{
130.6087 ++	  /* This is passed in memory. First align to the basic type.  */
130.6088 ++	  cif->bytes = ALIGN(cif->bytes, cif->arg_types[i]->alignment);
130.6089 ++
130.6090 ++	  /* Stack arguments are *always* at least 8 byte aligned.  */
130.6091 ++	  cif->bytes = ALIGN(cif->bytes, 8);
130.6092 ++
130.6093 ++	  /* Now add the size of this argument.  */
130.6094 ++	  cif->bytes += cif->arg_types[i]->size;
130.6095 ++	}
130.6096 ++      else
130.6097 ++	{
130.6098 ++	  gprcount += g;
130.6099 ++	  ssecount += s;
130.6100 ++	}
130.6101 ++    }
130.6102 ++
130.6103 ++  /* Set the flag for the closures return.  */
130.6104 ++    switch (cif->rtype->type)
130.6105 ++    {
130.6106 ++    case FFI_TYPE_VOID:
130.6107 ++    case FFI_TYPE_STRUCT:
130.6108 ++    case FFI_TYPE_SINT64:
130.6109 ++    case FFI_TYPE_FLOAT:
130.6110 ++    case FFI_TYPE_DOUBLE:
130.6111 ++    case FFI_TYPE_LONGDOUBLE:
130.6112 ++      cif->flags = (unsigned) cif->rtype->type;
130.6113 ++      break;
130.6114 ++
130.6115 ++    case FFI_TYPE_UINT64:
130.6116 ++      cif->flags = FFI_TYPE_SINT64;
130.6117 ++      break;
130.6118 ++
130.6119 ++    default:
130.6120 ++      cif->flags = FFI_TYPE_INT;
130.6121 ++      break;
130.6122 ++    }
130.6123 ++
130.6124 ++  return FFI_OK;
130.6125 ++}
130.6126 ++
130.6127 ++typedef struct
130.6128 ++{
130.6129 ++  long gpr[2];
130.6130 ++  __int128_t sse[2];
130.6131 ++  long double st0;
130.6132 ++} return_value;
130.6133 ++
130.6134 ++void
130.6135 ++ffi_fill_return_value (return_value *rv, extended_cif *ecif)
130.6136 ++{
130.6137 ++  enum x86_64_reg_class classes[MAX_CLASSES];
130.6138 ++  int i = 0, num;
130.6139 ++  long *gpr = rv->gpr;
130.6140 ++  __int128_t *sse = rv->sse;
130.6141 ++  signed char sc;
130.6142 ++  signed short ss;
130.6143 ++
130.6144 ++  /* This is needed because of the way x86-64 handles signed short
130.6145 ++     integers.  */
130.6146 ++  switch (ecif->cif->rtype->type)
130.6147 ++    {
130.6148 ++    case FFI_TYPE_SINT8:
130.6149 ++      sc = *(signed char *)gpr;
130.6150 ++      *(long long *)ecif->rvalue = (long long)sc;
130.6151 ++      return;
130.6152 ++    case FFI_TYPE_SINT16:
130.6153 ++      ss = *(signed short *)gpr;
130.6154 ++      *(long long *)ecif->rvalue = (long long)ss;
130.6155 ++      return;
130.6156 ++    default:
130.6157 ++      /* Just continue.  */
130.6158 ++      ;
130.6159 ++    }
130.6160 ++
130.6161 ++  num = classify_argument (ecif->cif->rtype, classes, &i);
130.6162 ++
130.6163 ++  if (num == 0)
130.6164 ++    /* Return in memory.  */
130.6165 ++    ecif->rvalue = (void *) rv->gpr[0];
130.6166 ++  else if (num == 2 && classes[0] == X86_64_X87_CLASS &&
130.6167 ++	classes[1] == X86_64_X87UP_CLASS)
130.6168 ++    /* This is a long double (this is easiest to handle this way instead
130.6169 ++       of an eightbyte at a time as in the loop below.  */
130.6170 ++    *((long double *)ecif->rvalue) = rv->st0;
130.6171 ++  else
130.6172 ++    {
130.6173 ++      void *a;
130.6174 ++
130.6175 ++      for (i=0, a=ecif->rvalue; i<num; i++, a+=8)
130.6176 ++	{
130.6177 ++	  switch (classes[i])
130.6178 ++	    {
130.6179 ++	    case X86_64_INTEGER_CLASS:
130.6180 ++	    case X86_64_INTEGERSI_CLASS:
130.6181 ++	      *(long long *)a = *gpr;
130.6182 ++	      gpr++;
130.6183 ++	      break;
130.6184 ++	    case X86_64_SSE_CLASS:
130.6185 ++	      sse2floatfloat (sse++, a);
130.6186 ++	      break;
130.6187 ++	    case X86_64_SSESF_CLASS:
130.6188 ++	      *(float *)a = sse2float (sse++);
130.6189 ++	      break;
130.6190 ++	    case X86_64_SSEDF_CLASS:
130.6191 ++	      *(double *)a = sse2double (sse++);
130.6192 ++	      break;
130.6193 ++	    default:
130.6194 ++	      abort();
130.6195 ++	    }
130.6196 ++	}
130.6197 ++    }
130.6198 ++}
130.6199 ++
130.6200 ++/*@-declundef@*/
130.6201 ++/*@-exportheader@*/
130.6202 ++extern void ffi_call_UNIX64(void (*)(stackLayout *, extended_cif *),
130.6203 ++			    void (*) (return_value *, extended_cif *),
130.6204 ++			    /*@out@*/ extended_cif *, 
130.6205 ++			    unsigned, /*@out@*/ unsigned *, void (*fn)());
130.6206 ++/*@=declundef@*/
130.6207 ++/*@=exportheader@*/
130.6208 ++
130.6209 ++void ffi_call(/*@dependent@*/ ffi_cif *cif, 
130.6210 ++	      void (*fn)(), 
130.6211 ++	      /*@out@*/ void *rvalue, 
130.6212 ++	      /*@dependent@*/ void **avalue)
130.6213 ++{
130.6214 ++  extended_cif ecif;
130.6215 ++  int dummy;
130.6216 ++
130.6217 ++  ecif.cif = cif;
130.6218 ++  ecif.avalue = avalue;
130.6219 ++  
130.6220 ++  /* If the return value is a struct and we don't have a return	*/
130.6221 ++  /* value address then we need to make one		        */
130.6222 ++
130.6223 ++  if ((rvalue == NULL) && 
130.6224 ++      (examine_argument (cif->rtype, 1, &dummy, &dummy) == 0))
130.6225 ++    {
130.6226 ++      /*@-sysunrecog@*/
130.6227 ++      ecif.rvalue = alloca(cif->rtype->size);
130.6228 ++      /*@=sysunrecog@*/
130.6229 ++    }
130.6230 ++  else
130.6231 ++    ecif.rvalue = rvalue;
130.6232 ++    
130.6233 ++  /* Stack must always be 16byte aligned. Make it so.  */
130.6234 ++  cif->bytes = ALIGN(cif->bytes, 16);
130.6235 ++  
130.6236 ++  switch (cif->abi) 
130.6237 ++    {
130.6238 ++    case FFI_SYSV:
130.6239 ++      /* Calling 32bit code from 64bit is not possible  */
130.6240 ++      FFI_ASSERT(0);
130.6241 ++      break;
130.6242 ++
130.6243 ++    case FFI_UNIX64:
130.6244 ++      /*@-usedef@*/
130.6245 ++      ffi_call_UNIX64 (ffi_prep_args, ffi_fill_return_value, &ecif,
130.6246 ++		       cif->bytes, ecif.rvalue, fn);
130.6247 ++      /*@=usedef@*/
130.6248 ++      break;
130.6249 ++
130.6250 ++    default:
130.6251 ++      FFI_ASSERT(0);
130.6252 ++      break;
130.6253 ++    }
130.6254 ++}
130.6255 ++
130.6256 ++extern void ffi_closure_UNIX64(void);
130.6257 ++
130.6258 ++ffi_status
130.6259 ++ffi_prep_closure (ffi_closure* closure,
130.6260 ++		  ffi_cif* cif,
130.6261 ++		  void (*fun)(ffi_cif*, void*, void**, void*),
130.6262 ++		  void *user_data)
130.6263 ++{
130.6264 ++  volatile unsigned short *tramp;
130.6265 ++
130.6266 ++  /* FFI_ASSERT (cif->abi == FFI_OSF);  */
130.6267 ++
130.6268 ++  tramp = (volatile unsigned short *) &closure->tramp[0];
130.6269 ++  tramp[0] = 0xbb49;		/* mov <code>, %r11	*/
130.6270 ++  tramp[5] = 0xba49;		/* mov <data>, %r10	*/
130.6271 ++  tramp[10] = 0xff49;		/* jmp *%r11	*/
130.6272 ++  tramp[11] = 0x00e3;
130.6273 ++  *(void * volatile *) &tramp[1] = ffi_closure_UNIX64;
130.6274 ++  *(void * volatile *) &tramp[6] = closure;
130.6275 ++
130.6276 ++  closure->cif = cif;
130.6277 ++  closure->fun = fun;
130.6278 ++  closure->user_data = user_data;
130.6279 ++
130.6280 ++  return FFI_OK;
130.6281 ++}
130.6282 ++
130.6283 ++int
130.6284 ++ffi_closure_UNIX64_inner(ffi_closure *closure, va_list l, void *rp)
130.6285 ++{
130.6286 ++  ffi_cif *cif;
130.6287 ++  void **avalue;
130.6288 ++  ffi_type **arg_types;
130.6289 ++  long i, avn, argn;
130.6290 ++
130.6291 ++  cif = closure->cif;
130.6292 ++  avalue = alloca(cif->nargs * sizeof(void *));
130.6293 ++
130.6294 ++  argn = 0;
130.6295 ++
130.6296 ++  i = 0;
130.6297 ++  avn = cif->nargs;
130.6298 ++  arg_types = cif->arg_types;
130.6299 ++  
130.6300 ++  /* Grab the addresses of the arguments from the stack frame.  */
130.6301 ++  while (i < avn)
130.6302 ++    {
130.6303 ++      switch (arg_types[i]->type)
130.6304 ++	{
130.6305 ++	case FFI_TYPE_SINT8:
130.6306 ++	case FFI_TYPE_UINT8:
130.6307 ++	case FFI_TYPE_SINT16:
130.6308 ++	case FFI_TYPE_UINT16:
130.6309 ++	case FFI_TYPE_SINT32:
130.6310 ++	case FFI_TYPE_UINT32:
130.6311 ++	case FFI_TYPE_SINT64:
130.6312 ++	case FFI_TYPE_UINT64:
130.6313 ++	case FFI_TYPE_POINTER:
130.6314 ++	  {
130.6315 ++	    if (l->gp_offset > 48-8)
130.6316 ++	      {
130.6317 ++		avalue[i] = l->overflow_arg_area;
130.6318 ++		l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
130.6319 ++	      }
130.6320 ++	    else
130.6321 ++	      {
130.6322 ++		avalue[i] = (char *)l->reg_save_area + l->gp_offset;
130.6323 ++		l->gp_offset += 8;
130.6324 ++	      }
130.6325 ++	  }
130.6326 ++	  break;
130.6327 ++
130.6328 ++	case FFI_TYPE_STRUCT:
130.6329 ++	  /* FIXME  */
130.6330 ++	  FFI_ASSERT(0);
130.6331 ++	  break;
130.6332 ++
130.6333 ++	case FFI_TYPE_DOUBLE:
130.6334 ++	  {
130.6335 ++	    if (l->fp_offset > 176-16)
130.6336 ++	      {
130.6337 ++		avalue[i] = l->overflow_arg_area;
130.6338 ++		l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
130.6339 ++	      }
130.6340 ++	    else
130.6341 ++	      {
130.6342 ++		avalue[i] = (char *)l->reg_save_area + l->fp_offset;
130.6343 ++		l->fp_offset += 16;
130.6344 ++	      }
130.6345 ++	  }
130.6346 ++#if DEBUG_FFI
130.6347 ++	  fprintf (stderr, "double arg %d = %g\n", i, *(double *)avalue[i]);
130.6348 ++#endif
130.6349 ++	  break;
130.6350 ++	  
130.6351 ++	case FFI_TYPE_FLOAT:
130.6352 ++	  {
130.6353 ++	    if (l->fp_offset > 176-16)
130.6354 ++	      {
130.6355 ++		avalue[i] = l->overflow_arg_area;
130.6356 ++		l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
130.6357 ++	      }
130.6358 ++	    else
130.6359 ++	      {
130.6360 ++		avalue[i] = (char *)l->reg_save_area + l->fp_offset;
130.6361 ++		l->fp_offset += 16;
130.6362 ++	      }
130.6363 ++	  }
130.6364 ++#if DEBUG_FFI
130.6365 ++	  fprintf (stderr, "float arg %d = %g\n", i, *(float *)avalue[i]);
130.6366 ++#endif
130.6367 ++	  break;
130.6368 ++	  
130.6369 ++	default:
130.6370 ++	  FFI_ASSERT(0);
130.6371 ++	}
130.6372 ++
130.6373 ++      argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG;
130.6374 ++      i++;
130.6375 ++    }
130.6376 ++
130.6377 ++  /* Invoke the closure.  */
130.6378 ++  (closure->fun) (cif, rp, avalue, closure->user_data);
130.6379 ++
130.6380 ++  /* FIXME: Structs not supported.  */
130.6381 ++  FFI_ASSERT(cif->rtype->type != FFI_TYPE_STRUCT);
130.6382 ++
130.6383 ++  /* Tell ffi_closure_UNIX64 how to perform return type promotions.  */
130.6384 ++
130.6385 ++  return cif->rtype->type;
130.6386 ++}
130.6387 ++#endif /* ifndef __x86_64__ */
130.6388 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/sysv.S gcc/libffi/src/x86/sysv.S
130.6389 +--- gcc-3.2.2.orig/libffi/src/x86/sysv.S	Tue Jul 17 02:10:53 2001
130.6390 ++++ gcc/libffi/src/x86/sysv.S	Fri Jul 19 08:08:31 2002
130.6391 +@@ -1,5 +1,5 @@
130.6392 + /* -----------------------------------------------------------------------
130.6393 +-   sysv.S - Copyright (c) 1996, 1998, 2001  Cygnus Solutions
130.6394 ++   sysv.S - Copyright (c) 1996, 1998, 2001, 2002  Cygnus Solutions
130.6395 +    
130.6396 +    X86 Foreign Function Interface 
130.6397 + 
130.6398 +@@ -23,6 +23,8 @@
130.6399 +    OTHER DEALINGS IN THE SOFTWARE.
130.6400 +    ----------------------------------------------------------------------- */
130.6401 + 
130.6402 ++#ifndef __x86_64__
130.6403 ++
130.6404 + #define LIBFFI_ASM	
130.6405 + #include <ffi.h>
130.6406 + 
130.6407 +@@ -163,3 +165,5 @@
130.6408 + 	.align 4
130.6409 + .LEFDE1:
130.6410 + 	.set	.LLFDE1,.LEFDE1-.LSFDE1
130.6411 ++
130.6412 ++#endif /* ifndef __x86_64__ */
130.6413 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/unix64.S gcc/libffi/src/x86/unix64.S
130.6414 +--- gcc-3.2.2.orig/libffi/src/x86/unix64.S	Thu Jan  1 09:00:00 1970
130.6415 ++++ gcc/libffi/src/x86/unix64.S	Wed Jan 29 00:54:28 2003
130.6416 +@@ -0,0 +1,302 @@
130.6417 ++/* -----------------------------------------------------------------------
130.6418 ++   unix64.S - Copyright (c) 2002  Bo Thorsen <bo@suse.de>
130.6419 ++
130.6420 ++   x86-64 Foreign Function Interface 
130.6421 ++
130.6422 ++   Permission is hereby granted, free of charge, to any person obtaining
130.6423 ++   a copy of this software and associated documentation files (the
130.6424 ++   ``Software''), to deal in the Software without restriction, including
130.6425 ++   without limitation the rights to use, copy, modify, merge, publish,
130.6426 ++   distribute, sublicense, and/or sell copies of the Software, and to
130.6427 ++   permit persons to whom the Software is furnished to do so, subject to
130.6428 ++   the following conditions:
130.6429 ++
130.6430 ++   The above copyright notice and this permission notice shall be included
130.6431 ++   in all copies or substantial portions of the Software.
130.6432 ++
130.6433 ++   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
130.6434 ++   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
130.6435 ++   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
130.6436 ++   IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
130.6437 ++   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
130.6438 ++   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
130.6439 ++   OTHER DEALINGS IN THE SOFTWARE.
130.6440 ++   ----------------------------------------------------------------------- */
130.6441 ++
130.6442 ++#ifdef __x86_64__
130.6443 ++#define LIBFFI_ASM	
130.6444 ++#include <ffi.h>
130.6445 ++
130.6446 ++	.section	.rodata
130.6447 ++.LC0:
130.6448 ++	.string	"asm in progress %lld\n"
130.6449 ++.LC1:
130.6450 ++	.string	"asm in progress\n"
130.6451 ++.text
130.6452 ++	.align	2
130.6453 ++.globl ffi_call_UNIX64
130.6454 ++        .type	ffi_call_UNIX64,@function
130.6455 ++
130.6456 ++ffi_call_UNIX64:
130.6457 ++.LFB1:
130.6458 ++        pushq	%rbp
130.6459 ++.LCFI0:
130.6460 ++        movq	%rsp, %rbp
130.6461 ++.LCFI1:
130.6462 ++	/* Save all arguments */
130.6463 ++	subq	$48, %rsp
130.6464 ++.LCFI2:
130.6465 ++	movq	%rdi, -8(%rbp)		/* ffi_prep_args	 */
130.6466 ++	movq	%rsi, -16(%rbp)		/* ffi_fill_return_value */
130.6467 ++	movq	%rdx, -24(%rbp)		/* ecif			 */
130.6468 ++	movq	%rcx, -32(%rbp)		/* cif->bytes		 */
130.6469 ++	movq	%r8, -40(%rbp)		/* ecif.rvalue		 */
130.6470 ++	movq	%r9, -48(%rbp)		/* fn			 */
130.6471 ++
130.6472 ++	/* Make room for all of the new args and the register args */
130.6473 ++	addl	$176, %ecx
130.6474 ++.LCFI3:
130.6475 ++	subq	%rcx, %rsp
130.6476 ++.LCFI4:
130.6477 ++	/* Setup the call to ffi_prep_args.  */
130.6478 ++	movq	%rdi, %rax		/* &ffi_prep_args	*/
130.6479 ++	movq	%rsp, %rdi		/* stackLayout		*/
130.6480 ++	movq	%rdx, %rsi		/* ecif			*/
130.6481 ++	call	*%rax			/* ffi_prep_args(stackLayout, ecif);*/ 
130.6482 ++
130.6483 ++	/* ffi_prep_args have put all the register contents into the  */
130.6484 ++	/* stackLayout struct. Now put the register values in place.  */
130.6485 ++	movq	(%rsp), %rdi
130.6486 ++	movq	8(%rsp), %rsi
130.6487 ++	movq	16(%rsp), %rdx
130.6488 ++	movq	24(%rsp), %rcx
130.6489 ++	movq	32(%rsp), %r8
130.6490 ++	movq	40(%rsp), %r9
130.6491 ++	movaps	48(%rsp), %xmm0
130.6492 ++	movaps	64(%rsp), %xmm1
130.6493 ++	movaps	80(%rsp), %xmm2
130.6494 ++	movaps	96(%rsp), %xmm3
130.6495 ++	movaps	112(%rsp), %xmm4
130.6496 ++	movaps	128(%rsp), %xmm5
130.6497 ++	movaps	144(%rsp), %xmm6
130.6498 ++	movaps	160(%rsp), %xmm7
130.6499 ++
130.6500 ++	/* Remove space for stackLayout so stack arguments are placed
130.6501 ++	   correctly for the call.  */
130.6502 ++.LCFI5:
130.6503 ++	addq	$176, %rsp
130.6504 ++.LCFI6:
130.6505 ++	/* Call the user function.  */
130.6506 ++	call	*-48(%rbp)
130.6507 ++
130.6508 ++	/* Make stack space for the return_value struct.  */
130.6509 ++	subq	$64, %rsp
130.6510 ++
130.6511 ++	/* Fill in all potential return values to this struct.  */
130.6512 ++	movq	%rax, (%rsp)
130.6513 ++	movq	%rdx, 8(%rsp)
130.6514 ++	movaps	%xmm0, 16(%rsp)
130.6515 ++	movaps	%xmm1, 32(%rsp)
130.6516 ++	fstpt	48(%rsp)
130.6517 ++
130.6518 ++	/* Now call ffi_fill_return_value.  */
130.6519 ++	movq	%rsp, %rdi		/* struct return_value	  */
130.6520 ++	movq	-24(%rbp), %rsi		/* ecif			  */
130.6521 ++	movq	-16(%rbp), %rax		/* &ffi_fill_return_value */
130.6522 ++	call	*%rax			/* call it		  */
130.6523 ++
130.6524 ++	/* And the work is done.  */
130.6525 ++        leave
130.6526 ++        ret
130.6527 ++.LFE1:
130.6528 ++.ffi_call_UNIX64_end:
130.6529 ++        .size    ffi_call_UNIX64,.ffi_call_UNIX64_end-ffi_call_UNIX64
130.6530 ++
130.6531 ++.text
130.6532 ++	.align	2
130.6533 ++.globl float2sse
130.6534 ++        .type	float2sse,@function
130.6535 ++float2sse:
130.6536 ++	/* Save the contents of this sse-float in a pointer.  */
130.6537 ++	movaps	%xmm0, (%rdi)
130.6538 ++	ret
130.6539 ++
130.6540 ++	.align	2
130.6541 ++.globl floatfloat2sse
130.6542 ++        .type	floatfloat2sse,@function
130.6543 ++floatfloat2sse:
130.6544 ++	/* Save the contents of these two sse-floats in a pointer.  */
130.6545 ++	movq	(%rdi), %xmm0
130.6546 ++	movaps	%xmm0, (%rsi)
130.6547 ++	ret
130.6548 ++
130.6549 ++	.align	2
130.6550 ++.globl double2sse
130.6551 ++        .type	double2sse,@function
130.6552 ++double2sse:
130.6553 ++	/* Save the contents of this sse-double in a pointer.  */
130.6554 ++	movaps	%xmm0, (%rdi)
130.6555 ++	ret
130.6556 ++
130.6557 ++	.align	2
130.6558 ++.globl sse2float
130.6559 ++        .type	sse2float,@function
130.6560 ++sse2float:
130.6561 ++	/* Save the contents of this sse-float in a pointer.  */
130.6562 ++	movaps	(%rdi), %xmm0
130.6563 ++	ret
130.6564 ++
130.6565 ++	.align	2
130.6566 ++.globl sse2double
130.6567 ++        .type	sse2double,@function
130.6568 ++sse2double:
130.6569 ++	/* Save the contents of this pointer in a sse-double.  */
130.6570 ++	movaps	(%rdi), %xmm0
130.6571 ++	ret
130.6572 ++
130.6573 ++	.align	2
130.6574 ++.globl sse2floatfloat
130.6575 ++        .type	sse2floatfloat,@function
130.6576 ++sse2floatfloat:
130.6577 ++	/* Save the contents of this pointer in two sse-floats.  */
130.6578 ++	movaps	(%rdi), %xmm0
130.6579 ++	movq	%xmm0, (%rsi)
130.6580 ++	ret
130.6581 ++
130.6582 ++	.align	2
130.6583 ++.globl ffi_closure_UNIX64
130.6584 ++        .type	ffi_closure_UNIX64,@function
130.6585 ++
130.6586 ++ffi_closure_UNIX64:
130.6587 ++.LFB2:
130.6588 ++        pushq   %rbp
130.6589 ++.LCFI10:
130.6590 ++        movq    %rsp, %rbp
130.6591 ++.LCFI11:
130.6592 ++        subq    $240, %rsp
130.6593 ++.LCFI12:
130.6594 ++	movq	%rdi, -176(%rbp)
130.6595 ++        movq    %rsi, -168(%rbp)
130.6596 ++        movq    %rdx, -160(%rbp)
130.6597 ++        movq    %rcx, -152(%rbp)
130.6598 ++        movq    %r8, -144(%rbp)
130.6599 ++        movq    %r9, -136(%rbp)
130.6600 ++        /* FIXME: We can avoid all this stashing of XMM registers by
130.6601 ++	   (in ffi_prep_closure) computing the number of
130.6602 ++	   floating-point args and moving it into %rax before calling
130.6603 ++	   this function.  Once this is done, uncomment the next few
130.6604 ++	   lines and only the essential XMM registers will be written
130.6605 ++	   to memory.  This is a significant saving.  */
130.6606 ++/*         movzbl  %al, %eax  */
130.6607 ++/*         movq    %rax, %rdx */
130.6608 ++/*         leaq    0(,%rdx,4), %rax */
130.6609 ++/*         leaq    2f(%rip), %rdx */
130.6610 ++/*         subq    %rax, %rdx */
130.6611 ++        leaq    -1(%rbp), %rax
130.6612 ++/*         jmp     *%rdx */
130.6613 ++        movaps  %xmm7, -15(%rax)
130.6614 ++        movaps  %xmm6, -31(%rax)
130.6615 ++        movaps  %xmm5, -47(%rax)
130.6616 ++        movaps  %xmm4, -63(%rax)
130.6617 ++        movaps  %xmm3, -79(%rax)
130.6618 ++        movaps  %xmm2, -95(%rax)
130.6619 ++        movaps  %xmm1, -111(%rax)
130.6620 ++        movaps  %xmm0, -127(%rax)
130.6621 ++2:
130.6622 ++        movl    %edi, -180(%rbp)
130.6623 ++        movl    $0, -224(%rbp)
130.6624 ++        movl    $48, -220(%rbp)
130.6625 ++        leaq    16(%rbp), %rax
130.6626 ++        movq    %rax, -216(%rbp)
130.6627 ++        leaq    -176(%rbp), %rdx
130.6628 ++        movq    %rdx, -208(%rbp)
130.6629 ++        leaq    -224(%rbp), %rsi
130.6630 ++	movq	%r10, %rdi
130.6631 ++	movq	%rsp, %rdx
130.6632 ++        call    ffi_closure_UNIX64_inner@PLT
130.6633 ++
130.6634 ++	cmpl	$FFI_TYPE_FLOAT, %eax
130.6635 ++	je	1f
130.6636 ++	cmpl	$FFI_TYPE_DOUBLE, %eax
130.6637 ++	je	2f
130.6638 ++	cmpl	$FFI_TYPE_LONGDOUBLE, %eax
130.6639 ++	je	3f
130.6640 ++	cmpl	$FFI_TYPE_STRUCT, %eax
130.6641 ++	je	4f
130.6642 ++	popq	%rax
130.6643 ++        leave
130.6644 ++        ret
130.6645 ++1:
130.6646 ++2:
130.6647 ++3:	
130.6648 ++	movaps	-240(%rbp), %xmm0
130.6649 ++        leave
130.6650 ++        ret
130.6651 ++4:
130.6652 ++	leave
130.6653 ++	ret
130.6654 ++.LFE2:	
130.6655 ++		
130.6656 ++        .section        .eh_frame,"a",@progbits
130.6657 ++.Lframe0:
130.6658 ++        .long   .LECIE1-.LSCIE1
130.6659 ++.LSCIE1:
130.6660 ++        .long   0x0
130.6661 ++        .byte   0x1
130.6662 ++        .string "zR"
130.6663 ++        .uleb128 0x1
130.6664 ++        .sleb128 -8
130.6665 ++        .byte   0x10
130.6666 ++        .uleb128 0x1
130.6667 ++        .byte   0x1b
130.6668 ++        .byte   0xc
130.6669 ++        .uleb128 0x7
130.6670 ++        .uleb128 0x8
130.6671 ++        .byte   0x90
130.6672 ++        .uleb128 0x1
130.6673 ++        .align 8
130.6674 ++.LECIE1:
130.6675 ++.LSFDE1:
130.6676 ++	.long	.LEFDE1-.LASFDE1
130.6677 ++.LASFDE1:
130.6678 ++        .long   .LASFDE1-.Lframe0
130.6679 ++
130.6680 ++        .long   .LFB1-.
130.6681 ++        .long   .LFE1-.LFB1
130.6682 ++        .uleb128 0x0
130.6683 ++        .byte   0x4		# DW_CFA_advance_loc4
130.6684 ++        .long   .LCFI0-.LFB1
130.6685 ++        .byte   0xe		# DW_CFA_def_cfa_offset
130.6686 ++        .uleb128 0x10
130.6687 ++        .byte   0x86		# DW_CFA_offset: r6 at cfa-16
130.6688 ++        .uleb128 0x2
130.6689 ++        .byte   0x4		# DW_CFA_advance_loc4
130.6690 ++        .long   .LCFI1-.LCFI0
130.6691 ++        .byte   0x86		# DW_CFA_offset: r6 at cfa-16
130.6692 ++        .uleb128 0x2
130.6693 ++        .byte   0xd		# DW_CFA_def_cfa_reg: r6
130.6694 ++        .uleb128 0x6
130.6695 ++	.align 8
130.6696 ++.LEFDE1:
130.6697 ++.LSFDE3:
130.6698 ++        .long   .LEFDE3-.LASFDE3        # FDE Length
130.6699 ++.LASFDE3:
130.6700 ++        .long   .LASFDE3-.Lframe0       # FDE CIE offset
130.6701 ++
130.6702 ++        .long   .LFB2-. # FDE initial location
130.6703 ++        .long   .LFE2-.LFB2     # FDE address range
130.6704 ++        .uleb128 0x0    # Augmentation size
130.6705 ++        .byte   0x4     # DW_CFA_advance_loc4
130.6706 ++        .long   .LCFI10-.LFB2
130.6707 ++        .byte   0xe     # DW_CFA_def_cfa_offset
130.6708 ++        .uleb128 0x10
130.6709 ++        .byte   0x86    # DW_CFA_offset, column 0x6
130.6710 ++        .uleb128 0x2
130.6711 ++        .byte   0x4     # DW_CFA_advance_loc4
130.6712 ++        .long   .LCFI11-.LCFI10
130.6713 ++        .byte   0xd     # DW_CFA_def_cfa_register
130.6714 ++        .uleb128 0x6
130.6715 ++        .align 8
130.6716 ++.LEFDE3:
130.6717 ++
130.6718 ++#endif /* __x86_64__  */
130.6719 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/win32.S gcc/libffi/src/x86/win32.S
130.6720 +--- gcc-3.2.2.orig/libffi/src/x86/win32.S	Tue Mar 27 11:39:16 2001
130.6721 ++++ gcc/libffi/src/x86/win32.S	Fri Dec  6 10:16:45 2002
130.6722 +@@ -1,5 +1,8 @@
130.6723 + /* -----------------------------------------------------------------------
130.6724 +-   win32.S - Copyright (c) 1996, 1998, 2001  Cygnus Solutions
130.6725 ++   win32.S - Copyright (c) 1996, 1998, 2001, 2002  Red Hat, Inc.
130.6726 ++	     Copyright (c) 2001  John Beniton
130.6727 ++	     Copyright (c) 2002  Ranjit Mathew
130.6728 ++			
130.6729 +  
130.6730 +    X86 Foreign Function Interface
130.6731 +  
130.6732 +@@ -52,7 +55,10 @@
130.6733 +         # Return stack to previous state and call the function
130.6734 +         addl  $8,%esp
130.6735 +  
130.6736 +-        call  *28(%ebp)
130.6737 ++        # FIXME: Align the stack to a 128-bit boundary to avoid
130.6738 ++        # potential performance hits.
130.6739 ++
130.6740 ++	call  *28(%ebp)
130.6741 +  
130.6742 +         # Remove the space we pushed for the args
130.6743 +         movl  16(%ebp),%ecx
130.6744 +@@ -123,3 +129,98 @@
130.6745 +         ret
130.6746 +  
130.6747 + .ffi_call_SYSV_end:
130.6748 ++
130.6749 ++        # This assumes we are using gas.
130.6750 ++        .balign 16
130.6751 ++.globl _ffi_call_STDCALL
130.6752 ++
130.6753 ++_ffi_call_STDCALL:
130.6754 ++        pushl %ebp
130.6755 ++        movl  %esp,%ebp
130.6756 ++
130.6757 ++        # Make room for all of the new args.
130.6758 ++        movl  16(%ebp),%ecx 
130.6759 ++        subl  %ecx,%esp
130.6760 ++
130.6761 ++        movl  %esp,%eax
130.6762 ++
130.6763 ++        # Place all of the ffi_prep_args in position
130.6764 ++        pushl 12(%ebp)
130.6765 ++        pushl %eax
130.6766 ++        call  *8(%ebp)
130.6767 ++
130.6768 ++        # Return stack to previous state and call the function
130.6769 ++        addl  $8,%esp
130.6770 ++
130.6771 ++        # FIXME: Align the stack to a 128-bit boundary to avoid
130.6772 ++        # potential performance hits.
130.6773 ++
130.6774 ++        call  *28(%ebp)
130.6775 ++
130.6776 ++        # stdcall functions pop arguments off the stack themselves
130.6777 ++
130.6778 ++        # Load %ecx with the return type code
130.6779 ++        movl  20(%ebp),%ecx
130.6780 ++
130.6781 ++        # If the return value pointer is NULL, assume no return value.
130.6782 ++        cmpl  $0,24(%ebp)
130.6783 ++        jne   sc_retint
130.6784 ++
130.6785 ++        # Even if there is no space for the return value, we are
130.6786 ++        # obliged to handle floating-point values.
130.6787 ++        cmpl  $FFI_TYPE_FLOAT,%ecx
130.6788 ++        jne   sc_noretval
130.6789 ++        fstp  %st(0)
130.6790 ++
130.6791 ++        jmp   sc_epilogue
130.6792 ++
130.6793 ++sc_retint:
130.6794 ++        cmpl  $FFI_TYPE_INT,%ecx
130.6795 ++        jne   sc_retfloat
130.6796 ++        # Load %ecx with the pointer to storage for the return value
130.6797 ++        movl  24(%ebp),%ecx
130.6798 ++        movl  %eax,0(%ecx)
130.6799 ++        jmp   sc_epilogue
130.6800 ++
130.6801 ++sc_retfloat:
130.6802 ++        cmpl  $FFI_TYPE_FLOAT,%ecx
130.6803 ++        jne   sc_retdouble
130.6804 ++         # Load %ecx with the pointer to storage for the return value
130.6805 ++        movl  24(%ebp),%ecx
130.6806 ++        fstps (%ecx)
130.6807 ++        jmp   sc_epilogue
130.6808 ++
130.6809 ++sc_retdouble:
130.6810 ++        cmpl  $FFI_TYPE_DOUBLE,%ecx
130.6811 ++        jne   sc_retlongdouble
130.6812 ++        # Load %ecx with the pointer to storage for the return value
130.6813 ++        movl  24(%ebp),%ecx
130.6814 ++        fstpl (%ecx)
130.6815 ++        jmp   sc_epilogue
130.6816 ++
130.6817 ++sc_retlongdouble:
130.6818 ++        cmpl  $FFI_TYPE_LONGDOUBLE,%ecx
130.6819 ++        jne   sc_retint64
130.6820 ++        # Load %ecx with the pointer to storage for the return value
130.6821 ++        movl  24(%ebp),%ecx
130.6822 ++        fstpt (%ecx)
130.6823 ++        jmp   sc_epilogue
130.6824 ++
130.6825 ++sc_retint64:
130.6826 ++        cmpl  $FFI_TYPE_SINT64,%ecx
130.6827 ++        jne   sc_retstruct
130.6828 ++        # Load %ecx with the pointer to storage for the return value
130.6829 ++        movl  24(%ebp),%ecx
130.6830 ++        movl  %eax,0(%ecx)
130.6831 ++        movl  %edx,4(%ecx)
130.6832 ++
130.6833 ++sc_retstruct:
130.6834 ++        # Nothing to do!
130.6835 ++
130.6836 ++sc_noretval:
130.6837 ++sc_epilogue:
130.6838 ++        movl %ebp,%esp
130.6839 ++        popl %ebp
130.6840 ++        ret
130.6841 ++
130.6842 ++.ffi_call_STDCALL_end:
130.6843 +--- gcc-3.2.2.orig/libjava/configure.host	Mon Jun 10 13:15:26 2002
130.6844 ++++ gcc-3.2.2/libjava/configure.host	Sat Feb 15 19:57:25 2003
130.6845 +@@ -115,6 +115,12 @@
130.6846 + 	enable_getenv_properties_default=no
130.6847 + 	enable_main_args_default=no
130.6848 + 	;;
130.6849 ++  sh-* | sh[34]*-*)
130.6850 ++	sysdeps_dir=sh
130.6851 ++	libgcj_flags="${libgcj_flags} -mieee"
130.6852 ++	libgcj_interpreter=yes
130.6853 ++	enable_hash_synchronization_default=yes
130.6854 ++	;;
130.6855 + esac
130.6856 + 
130.6857 + # This case statement supports generic port properties and may refine
130.6858 +@@ -126,7 +132,8 @@
130.6859 +   powerpc*-linux* | \
130.6860 +   alpha*-linux* | \
130.6861 +   sparc*-linux* | \
130.6862 +-  ia64-*)
130.6863 ++  ia64-* | \
130.6864 ++  sh-linux* | sh[34]*-linux*)
130.6865 +   	can_unwind_signal=yes
130.6866 + 	;;
130.6867 +   *-*-darwin*)
   131.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   131.2 +++ b/patches/gcc/3.2.3/gcc-3.2.3-ppc-asm-spec.patch	Sat Feb 24 11:00:05 2007 +0000
   131.3 @@ -0,0 +1,54 @@
   131.4 +Based on gcc-3.4.0/gcc-3.3.3h-ppc-asm-spec.patch
   131.5 +
   131.6 +Fixes the following errors when building gcc for ppc7450:
   131.7 +
   131.8 +/tmp/ccYph3gd.s: Assembler messages:
   131.9 +/tmp/ccYph3gd.s:3823: Error: Unrecognized opcode: `mfvrsave'
  131.10 +/tmp/ccYph3gd.s:3857: Error: Unrecognized opcode: `stvx'
  131.11 +/tmp/ccYph3gd.s:4026: Error: Unrecognized opcode: `lvx'
  131.12 +/tmp/ccYph3gd.s:4027: Error: Unrecognized opcode: `mtvrsave'
  131.13 +make[2]: *** [libgcc/./unwind-dw2.o] Error 1
  131.14 +make[2]: Leaving directory `/opt/crosstool-0.28-rc35/build/powerpc-7450-linux-gnu/gcc-3.2.3-glibc-2.3.2/build-gcc-core/gcc'
  131.15 +make[1]: *** [stmp-multilib] Error 2
  131.16 +make[1]: Leaving directory `/opt/crosstool-0.28-rc35/build/powerpc-7450-linux-gnu/gcc-3.2.3-glibc-2.3.2/build-gcc-core/gcc'
  131.17 +make: *** [all-gcc] Error 2
  131.18 +
  131.19 +Note that the "-mcpu=7450" option must appear on the "gcc" command line in
  131.20 +order for "-maltivec" to be passed to the assembler.  Or, "-maltivec" itself
  131.21 +may be passed to the "gcc" command.
  131.22 +
  131.23 +Contributed by Tom Warzeka <waz@quahog.npt.nuwc.navy.mil>
  131.24 +
  131.25 +===================================================================
  131.26 +--- gcc-3.2.3/gcc/config/rs6000/rs6000.h~	2003-03-29 07:39:20.000000000 -0500
  131.27 ++++ gcc-3.2.3/gcc/config/rs6000/rs6000.h	2004-08-23 16:33:21.000000000 -0400
  131.28 +@@ -77,8 +77,8 @@
  131.29 + %{mcpu=604e: -D_ARCH_PPC} \
  131.30 + %{mcpu=620: -D_ARCH_PPC} \
  131.31 + %{mcpu=740: -D_ARCH_PPC} \
  131.32 +-%{mcpu=7400: -D_ARCH_PPC} \
  131.33 +-%{mcpu=7450: -D_ARCH_PPC} \
  131.34 ++%{mcpu=7400: -D_ARCH_PPC -D__ALTIVEC__} \
  131.35 ++%{mcpu=7450: -D_ARCH_PPC -D__ALTIVEC__} \
  131.36 + %{mcpu=750: -D_ARCH_PPC} \
  131.37 + %{mcpu=801: -D_ARCH_PPC} \
  131.38 + %{mcpu=821: -D_ARCH_PPC} \
  131.39 +@@ -117,14 +117,15 @@
  131.40 + %{mcpu=604e: -mppc} \
  131.41 + %{mcpu=620: -mppc} \
  131.42 + %{mcpu=740: -mppc} \
  131.43 +-%{mcpu=7400: -mppc} \
  131.44 +-%{mcpu=7450: -mppc} \
  131.45 ++%{mcpu=7400: -mppc -maltivec} \
  131.46 ++%{mcpu=7450: -mppc -maltivec} \
  131.47 + %{mcpu=750: -mppc} \
  131.48 + %{mcpu=801: -mppc} \
  131.49 + %{mcpu=821: -mppc} \
  131.50 + %{mcpu=823: -mppc} \
  131.51 + %{mcpu=860: -mppc} \
  131.52 +-%{maltivec: -maltivec}"
  131.53 ++%{maltivec: -maltivec} \
  131.54 ++-many"
  131.55 + 
  131.56 + #define CPP_DEFAULT_SPEC ""
  131.57 + 
   132.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   132.2 +++ b/patches/gcc/3.2.3/gcc-3.2.3-trap-posix.patch	Sat Feb 24 11:00:05 2007 +0000
   132.3 @@ -0,0 +1,45 @@
   132.4 +# 
   132.5 +# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
   132.6 +#
   132.7 +# Error:
   132.8 +#
   132.9 +# creating libintl.h
  132.10 +# Configuring etc...
  132.11 +# loading cache ../config.cache
  132.12 +# checking for a BSD compatible install... (cached) /usr/bin/install -c
  132.13 +# creating ./config.status
  132.14 +# creating Makefile
  132.15 +# trap: usage: trap [-lp] [[arg] signal_spec ...]
  132.16 +#
  132.17 +# Description:
  132.18 +#
  132.19 +# non-posix conform usage of trap causes bash >= 3.0 to fail
  132.20 +#
  132.21 +# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
  132.22 +#
  132.23 +# Status:
  132.24 +#
  132.25 +# fixed in gcc >= 3.3.5
  132.26 +# backport of gcc-3.3.5 fix
  132.27 +#
  132.28 +diff -ruN gcc-3.2.3-orig/configure gcc-3.2.3/configure
  132.29 +--- gcc-3.2.3-orig/configure	2002-06-24 18:14:28.000000000 +0200
  132.30 ++++ gcc-3.2.3/configure	2005-04-20 18:42:49.000000000 +0200
  132.31 +@@ -697,7 +697,7 @@
  132.32 + if test -f skip-this-dir; then
  132.33 + 	# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
  132.34 + 	# and reset the trap handler.
  132.35 +-	trap 0
  132.36 ++	trap '' 0
  132.37 + 	rm -rf Makefile* ${tmpdir}
  132.38 + 	# Execute the final clean-up actions
  132.39 + 	${config_shell} skip-this-dir
  132.40 +@@ -1615,7 +1615,7 @@
  132.41 + # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
  132.42 + # and reset the trap handler.
  132.43 + rm -rf ${tmpdir}
  132.44 +-trap 0
  132.45 ++trap '' 0
  132.46 + 
  132.47 + exit 0
  132.48 + 
   133.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   133.2 +++ b/patches/gcc/3.2.3/gcc-3.3-libstdc++-v3-dg.exp.patch	Sat Feb 24 11:00:05 2007 +0000
   133.3 @@ -0,0 +1,54 @@
   133.4 +Without this patch, the command
   133.5 +
   133.6 +RUNTESTFLAGS=--target=powerpc-750-linux-gnu -v -v -v -v make check-target-libstdc++-v3
   133.7 +
   133.8 +fails in two ways:
   133.9 +1. the -L option meant to locate the testsuite directory is incorrect, and
  133.10 +2. the wrong compiler is invoked, causing all sorts of havoc, not least of which
  133.11 +is the native compiler is invoked when we really wanted to invoke the cross-compiler
  133.12 +we just built.
  133.13 +
  133.14 +Here's an example log of the problem in action.  Every testcase fails, this shows just one:
  133.15 +-------------
  133.16 +Invoking the compiler as g++ -ggdb3 -DDEBUG_ASSERT -I/home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/libstdc++-v3/testsuite /home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/libstdc++-v3/testsuite/20_util/binders.cc   -g -O2 -DDEBUG_ASSERT  -L/testsuite -lv3test -lm  -o ./binders.exe
  133.17 +compiler exited with status 1
  133.18 +output is:
  133.19 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_function.h: In method `void binder2nd<mem_fun1_ref_t<void,Elem,int> >::operator ()(const Elem &) const':^M
  133.20 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_algo.h:83:   instantiated from `for_each<Elem *, binder2nd<mem_fun1_ref_t<void,Elem,int> > >(Elem *, Elem *, binder2nd<mem_fun1_ref_t<void,Elem,int> >)'^M
  133.21 +/home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/libstdc++-v3/testsuite/20_util/binders.cc:43:   instantiated from here^M
  133.22 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_function.h:224: conversion from `const Elem' to `Elem &' discards qualifiers^M
  133.23 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_function.h:622: in passing argument 1 of `mem_fun1_ref_t<void,Elem,int>::operator ()(Elem &, int) const'^M
  133.24 +...
  133.25 +FAIL: 20_util/binders.cc (test for excess errors)
  133.26 +WARNING: 20_util/binders.cc compilation failed to produce executable
  133.27 +-------------
  133.28 +
  133.29 +And here's the patch.  I'm not happy with it, and it probably gets some cases wrong,
  133.30 +but it seems to work for the common native case and for my cross-compiler case.
  133.31 +
  133.32 +--- gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp.old	Sun Jul 13 10:42:01 2003
  133.33 ++++ gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp	Sun Jul 13 11:39:54 2003
  133.34 +@@ -46,8 +46,23 @@
  133.35 +     global gluefile wrap_flags
  133.36 +     global ld_library_path
  133.37 +     global tool_root_dir
  133.38 ++    global target_triplet
  133.39 + 
  133.40 +     set blddir [lookfor_file [get_multilibs] libstdc++-v3]
  133.41 ++    if { $blddir == "" } {
  133.42 ++        set multilibs [get_multilibs]
  133.43 ++        # FIXME: assume multilib only one level deep
  133.44 ++        set multisub [file tail $multilibs]
  133.45 ++        verbose "libstdc++-v3-init: couldn't find libstdc++-v3 in $multilibs, trying $objdir"
  133.46 ++        set blddir [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
  133.47 ++    }
  133.48 ++    if { $blddir == "" } {
  133.49 ++        verbose "libstdc++-v3-init: couldn't find libstdc++-v3, trying $objdir without multilibs"
  133.50 ++        set blddir [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
  133.51 ++    }
  133.52 ++    if { $blddir == "" } {
  133.53 ++         error "Can't find libstdc++-v3"
  133.54 ++    }
  133.55 + 
  133.56 +     # By default, we assume we want to run program images.
  133.57 +     global dg-do-what-default
   134.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   134.2 +++ b/patches/gcc/3.2.3/gcc-sh-linux.spec	Sat Feb 24 11:00:05 2007 +0000
   134.3 @@ -0,0 +1,739 @@
   134.4 +Summary: The GNU Compiler Collection for SuperH.
   134.5 +%define GCC_VERSION 3.2.3
   134.6 +%define arch_list sh3-linux sh3eb-linux sh4-linux sh4eb-linux
   134.7 +%define TARGET_LIBSTDC 1
   134.8 +%define TARGET_JAVA 1
   134.9 +
  134.10 +Name: gcc
  134.11 +Version: 3.2.3
  134.12 +Release: 3
  134.13 +
  134.14 +Copyright: GPL
  134.15 +Group: Development/Languages
  134.16 +Source0: gcc-%{GCC_VERSION}.tar.bz2
  134.17 +Patch1: gcc-20030210-sh-linux-1.patch
  134.18 +Patch2: gcc-3.2.3-libffi-1.patch
  134.19 +Patch3: gcc-3.2.3-sh-linux-dwarf2-1.patch
  134.20 +Buildroot: /var/tmp/gcc-%{_target}-root
  134.21 +ExclusiveArch: i386 sh3 sh3eb sh4 sh4eb
  134.22 +
  134.23 +%description
  134.24 +This package contains the GNU Compiler Collection: gcc and g++.
  134.25 +You'll need this package in order to compile C/C++ code.
  134.26 +
  134.27 +%ifarch i386
  134.28 +
  134.29 +# ==================== Cross Compiler ===============================
  134.30 +
  134.31 +%package sh-linux
  134.32 +Summary: The GNU Compiler Collection for sh-linux.
  134.33 +Group: Development/Languages
  134.34 +Requires: binutils-sh-linux >= 2.13.2
  134.35 +Provides: gcc-sh-linux
  134.36 +Obsoletes: gcc-sh3-linux gcc-sh3eb-linux gcc-sh4-linux gcc-sh4eb-linux
  134.37 +Obsoletes: gcc-sh3-linux-c++ gcc-sh3eb-linux-c++ gcc-sh4-linux-c++ gcc-sh4eb-linux-c++
  134.38 +Obsoletes: libstdc++-sh3-linux libstdc++-sh3eb-linux libstdc++-sh4-linux libstdc++-sh4eb-linux
  134.39 +AutoReqProv: no
  134.40 +
  134.41 +%description sh-linux
  134.42 +The gcc-sh-linux package contains GNU Compiler Collection: gcc g++ and libstdc++-v3.
  134.43 +
  134.44 +It includes support for most of the current C++ specification, including templates and
  134.45 +exception handling. It does also include the standard C++ library and C++ header files.
  134.46 +You'll need this package in order to cross compile C/C++ code for sh-linux.
  134.47 +
  134.48 +%package -n libgcj-sh-linux
  134.49 +Summary: Header files and libraries for sh-linux Java development.
  134.50 +Group: Development/Libraries
  134.51 +Requires: gcc-sh-linux = %{version}-%{release}
  134.52 +AutoReqProv: no
  134.53 +
  134.54 +%description -n libgcj-sh-linux
  134.55 +The Java static libraries and C header files. You will need this
  134.56 +package to compile your Java programs for sh-linux using the gcc Java compiler (gcj).
  134.57 +
  134.58 +%else
  134.59 +# =========================== Native Compiler =================================
  134.60 +%package libgcc
  134.61 +Summary: runtime libraries for the GNU Compiler Collection.
  134.62 +Group: System Environment/Libraries
  134.63 +
  134.64 +%description libgcc
  134.65 +This package contains libgcc shared libraries for the GNU C Compiler Collection.
  134.66 +You'll need this package in order to execute C,C++,JAVA code
  134.67 +that uses shared libgcc.
  134.68 +
  134.69 +%package c++
  134.70 +Summary: C++ support for gcc
  134.71 +Group: Development/Languages
  134.72 +Requires: gcc = %{version}-%{release}
  134.73 +
  134.74 +%description c++
  134.75 +This package adds C++ support to the GNU Compiler Collection. It includes
  134.76 +support for most of the current C++ specification, including templates and
  134.77 +exception handling. It does include the static standard C++
  134.78 +library and C++ header files; the library for dynamically linking
  134.79 +programs is available separately.
  134.80 +
  134.81 +%package -n libstdc++
  134.82 +Summary: GNU c++ library.
  134.83 +Group: System Environment/Libraries
  134.84 +
  134.85 +%description -n libstdc++
  134.86 +The libstdc++ package contains a snapshot of the GCC Standard C++
  134.87 +Library v3, an ongoing project to implement the ISO 14882 Standard C++
  134.88 +library.
  134.89 +
  134.90 +%package -n libstdc++-devel
  134.91 +Summary: Header files and libraries for C++ development
  134.92 +Group: Development/Libraries
  134.93 +Requires: libstdc++ = %{version}-%{release}, gcc-c++ = %{version}-%{release}
  134.94 +
  134.95 +%description -n libstdc++-devel
  134.96 +This is the GNU implementation of the standard C++ libraries.  This
  134.97 +package includes the header files and libraries needed for C++
  134.98 +development. This includes SGI's implementation of the STL.
  134.99 +
 134.100 +%package java
 134.101 +Summary: Java support for gcc
 134.102 +Group: Development/Languages
 134.103 +Requires: gcc = %{version}-%{release}, libgcj = %{version}-%{release}, libgcj-devel = %{version}-%{release}
 134.104 +
 134.105 +%description java
 134.106 +This package adds experimental support for compiling Java(tm) programs and
 134.107 +bytecode into native code. To use this you will also need the libgcj and
 134.108 +libgcj-devel packages.
 134.109 +
 134.110 +%package -n libgcj
 134.111 +Summary: Java runtime library for gcc.
 134.112 +Group: System Environment/Libraries
 134.113 +
 134.114 +%description -n libgcj
 134.115 +The Java runtime library. You will need this package to run your Java
 134.116 +programs compiled using the gcc Java compiler (gcj).
 134.117 +
 134.118 +%package -n libgcj-devel
 134.119 +Summary: Header files and libraries for Java development.
 134.120 +Group: Development/Libraries
 134.121 +Requires: libgcj = %{version}-%{release}
 134.122 +
 134.123 +%description -n libgcj-devel
 134.124 +The Java static libraries and C header files. You will need this
 134.125 +package to compile your Java programs using the gcc Java compiler (gcj).
 134.126 +
 134.127 +%endif
 134.128 +
 134.129 +%prep
 134.130 +%setup -q -n gcc-%{GCC_VERSION}
 134.131 +%patch1 -p1
 134.132 +%patch2 -p1
 134.133 +##%patch3 -p1
 134.134 +
 134.135 +%build
 134.136 +%ifarch i386
 134.137 +# build cross compiler for i386-linux host
 134.138 +for arch in sh-linux; do
 134.139 +  rm -rf ${arch}
 134.140 +  mkdir ${arch}
 134.141 +
 134.142 +  CONFIG_ARGS="\
 134.143 +        --prefix=%{_prefix} \
 134.144 +        --mandir=%{_mandir} \
 134.145 +        --infodir=%{_infodir} \
 134.146 +        --target=${arch} \
 134.147 +        --host=%{_host} \
 134.148 +        --build=%{_build} \
 134.149 +        --enable-languages=c,c++,java \
 134.150 +        --with-system-zlib \
 134.151 +        --with-gxx-include-dir=%{_prefix}/${arch}/include/g++-v3 \
 134.152 +        --includedir=%{_prefix}/${arch}/include \
 134.153 +	--disable-checking \
 134.154 +	--disable-shared \
 134.155 +	--enable-__cxa_atexit \
 134.156 +	--enable-c99 \
 134.157 +        --enable-threads=posix \
 134.158 +        --enable-long-long"
 134.159 +  if [ %{TARGET_JAVA} -ne 0 ]; then
 134.160 +    CONFIG_ARGS="$CONFIG_ARGS --enable-libgcj"
 134.161 +  fi
 134.162 +  (  cd $arch
 134.163 +     ../configure ${CONFIG_ARGS}
 134.164 +  )
 134.165 +  if [ %{TARGET_LIBSTDC} -ne 0 -o %{TARGET_JAVA} -ne 0 ]; then
 134.166 +    sed -e s:-Dinhibit_libc::g ${arch}/gcc/Makefile >${arch}/gcc/Makefile.$$$
 134.167 +    mv -f ${arch}/gcc/Makefile.$$$ ${arch}/gcc/Makefile
 134.168 +  fi
 134.169 +  make all-gcc -C ${arch}
 134.170 +
 134.171 +  if [ %{TARGET_LIBSTDC} -ne 0 ]; then
 134.172 +    CONFIG_ARGS="`echo $CONFIG_ARGS | sed -e s/--disable-shared/--enable-shared/`"
 134.173 +    make TARGET_CONFIGARGS="${CONFIG_ARGS} --with-cross-host" all-target-libstdc++-v3 -C ${arch}
 134.174 +  fi
 134.175 +
 134.176 +  if [ %{TARGET_JAVA} -ne 0 ]; then
 134.177 +    make all-fastjar -C ${arch}
 134.178 +    CONFIG_ARGS="`echo $CONFIG_ARGS | sed -e s/--host=%{_host}/--host=${arch}/`"
 134.179 +    dir=`pwd`
 134.180 +
 134.181 +    ac_cv_file__proc_self_exe=yes \
 134.182 +    ac_cv_prog_GCJ="$dir/$arch/gcc/gcj -B$dir/$arch/$arch/libjava/ -B$dir/$arch/gcc/ -B%{_prefix}/$arch/bin/ -B%{_prefix}/$arch/lib/ -isystem %{_prefix}/$arch/include" \
 134.183 +      make TARGET_CONFIGARGS="${CONFIG_ARGS} --with-cross-host --enable-multilib --with-target-subdir=${arch} --with-x=no" \
 134.184 +      all-target-libjava -C ${arch}
 134.185 +  fi
 134.186 +
 134.187 +%else
 134.188 +# Canadian cross (build native compiler)
 134.189 +for arch in %{_target}; do
 134.190 +  rm -rf ${arch}
 134.191 +  mkdir -p ${arch}
 134.192 +  CONFIG_ARGS="\
 134.193 +        --prefix=%{_prefix} \
 134.194 +        --mandir=%{_mandir} \
 134.195 +        --infodir=%{_infodir} \
 134.196 +        --target=${arch} \
 134.197 +        --host=${arch} \
 134.198 +        --build=%{_build} \
 134.199 +        --enable-languages=c,c++,java \
 134.200 +        --with-system-zlib \
 134.201 +        --with-gxx-include-dir=%{_prefix}/include/g++-v3 \
 134.202 +	--disable-checking \
 134.203 +	--disable-shared \
 134.204 +	--enable-__cxa_atexit \
 134.205 +	--enable-c99 \
 134.206 +        --enable-threads=posix \
 134.207 +        --enable-long-long"
 134.208 +
 134.209 +  if [ %{TARGET_JAVA} -ne 0 ]; then
 134.210 +    CONFIG_ARGS="$CONFIG_ARGS --enable-libgcj"
 134.211 +  fi
 134.212 +
 134.213 +  (  cd ${arch}
 134.214 +     CC=${arch}-gcc AR=${arch}-ar RANLIB=${arch}-ranlib CXX=${arch}-g++ \
 134.215 +        ../configure $CONFIG_ARGS
 134.216 +  )
 134.217 +
 134.218 +  if [ %{TARGET_LIBSTDC} -ne 0 -o %{TARGET_JAVA} -ne 0 ]; then
 134.219 +    sed -e s:-Dinhibit_libc::g ${arch}/gcc/Makefile >${arch}/gcc/Makefile.$$$
 134.220 +    mv -f ${arch}/gcc/Makefile.$$$ ${arch}/gcc/Makefile
 134.221 +  fi
 134.222 +
 134.223 +  make all-build-libiberty all-gcc -C ${arch}
 134.224 +
 134.225 +  if [ %{TARGET_LIBSTDC} -ne 0 ]; then
 134.226 +    CONFIG_ARGS="`echo $CONFIG_ARGS | sed -e s/--disable-shared/--enable-shared/`"
 134.227 +    make TARGET_CONFIGARGS="${CONFIG_ARGS}" all-target-libstdc++-v3 -C ${arch}
 134.228 +    if [ %{TARGET_JAVA} -ne 0 ]; then
 134.229 +      ( mkdir -p ${arch}/fastjar; cd ${arch}/fastjar; rm *; ../../fastjar/configure --with-system-zlib; make )
 134.230 +      ac_cv_file__proc_self_exe=yes \
 134.231 +        CC=${arch}-gcc AR=${arch}-ar RANLIB=${arch}-ranlib CXX=${arch}-g++ GCJ=${arch}-gcj \
 134.232 +        make TARGET_CONFIGARGS="${CONFIG_ARGS} --with-x=no" configure-target-libjava -C ${arch}
 134.233 +
 134.234 +        make -C ${arch}/${arch}/libffi
 134.235 +        make -C ${arch}/${arch}/boehm-gc
 134.236 +        make -C ${arch}/${arch}/zlib
 134.237 +        make GCJ=${arch}-gcj GCJH=${arch}-gcjh ZIP=${arch}-jar -C ${arch}/${arch}/libjava
 134.238 +      (
 134.239 +        rm -rf ${arch}/${arch}/fastjar
 134.240 +        mkdir -p ${arch}/${arch}/fastjar
 134.241 +        cd ${arch}/${arch}/fastjar
 134.242 +
 134.243 +        ac_cv_sizeof_char=1 \
 134.244 +        ac_cv_sizeof_short=2 \
 134.245 +        ac_cv_sizeof_int=4 \
 134.246 +        ac_cv_sizeof_long=4 \
 134.247 +        ac_cv_sizeof_long_long=8 \
 134.248 +        ac_cv_sizeof_float=4 \
 134.249 +        ac_cv_sizeof_double=8 \
 134.250 +        ac_cv_sizeof_long_double=8 \
 134.251 +        ac_cv_sizeof_void_p=4 \
 134.252 +        ac_cv_file__proc_self_exe=yes \
 134.253 +        ac_cv_header_langinfo_h=yes \
 134.254 +        CC=${arch}-gcc ../../../fastjar/configure $CONFIG_ARGS
 134.255 +
 134.256 +        make
 134.257 +      )
 134.258 +
 134.259 +    fi
 134.260 +  fi
 134.261 +%endif
 134.262 +done
 134.263 +
 134.264 +%install
 134.265 +rm -rf $RPM_BUILD_ROOT
 134.266 +mkdir -p ${RPM_BUILD_ROOT}/{%{_prefix}/bin,lib}
 134.267 +
 134.268 +%ifarch i386
 134.269 +  ARCH_STRTIP=strip
 134.270 +  EXESUFFIX=""
 134.271 +  arch=sh-linux
 134.272 +  TOOLPREFIX=${arch}-
 134.273 +  mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/${arch}/{bin,include,lib,share}
 134.274 +  mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/${arch}/lib/{m4,mb/m4}
 134.275 +  make DESTDIR=${RPM_BUILD_ROOT} \
 134.276 +	install-gcc \
 134.277 +	install-fastjar \
 134.278 +	-C ${arch}
 134.279 +%if 0
 134.280 +  ( cd ${RPM_BUILD_ROOT}%{_prefix}/sh-linux/lib
 134.281 +    rm -f libgcc_s_*.so
 134.282 +    mv libgcc_s_mb.so.1 mb/libgcc_s.so.1
 134.283 +    mv libgcc_s_m4.so.1 m4/libgcc_s.so.1
 134.284 +    mv libgcc_s_mb_m4.so.1 mb/m4/libgcc_s.so.1
 134.285 +    ln -s libgcc_s.so.1 mb/libgcc_s.so
 134.286 +    ln -s libgcc_s.so.1 m4/libgcc_s.so
 134.287 +    ln -s libgcc_s.so.1 mb/m4/libgcc_s.so
 134.288 +  )
 134.289 +%endif
 134.290 +
 134.291 +  if [ %{TARGET_LIBSTDC} -ne 0 ]; then
 134.292 +    make DESTDIR=${RPM_BUILD_ROOT} \
 134.293 +      install-target-libstdc++-v3 \
 134.294 +      -C ${arch}
 134.295 +  fi
 134.296 +  if [ %{TARGET_JAVA} -ne 0 ]; then
 134.297 +    make DESTDIR=${RPM_BUILD_ROOT} \
 134.298 +      install-target-libjava \
 134.299 +      install-target-boehm-gc \
 134.300 +      install-target-zlib \
 134.301 +      -C ${arch}
 134.302 +    make DESTDIR=${RPM_BUILD_ROOT} prefix=%{_prefix}/${arch} \
 134.303 +      install -C ${arch}/${arch}/libffi
 134.304 +    mv -f $RPM_BUILD_ROOT%{_prefix}/share/java $RPM_BUILD_ROOT%{_prefix}/sh-linux/share/
 134.305 +  fi
 134.306 +  rm -f $RPM_BUILD_ROOT%{_prefix}/bin/{gcov,gccbug}
 134.307 +  rm -f $RPM_BUILD_ROOT%{_prefix}/${arch}/bin/{gij,jv-convert}
 134.308 +  sed -e 's/@@VERSION@@/%{GCC_VERSION}/g' debian/shCPU-linux-GCC >$RPM_BUILD_ROOT%{_prefix}/bin/shCPU-linux-GCC
 134.309 +  chmod 0755 $RPM_BUILD_ROOT%{_prefix}/bin/shCPU-linux-GCC
 134.310 +
 134.311 +  LIBSTDC=`cd $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib; echo libstdc++.so*`
 134.312 +  LIBGCJ=`cd $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib; echo libgcj.so*`
 134.313 +  LIBFFI=`cd $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib; echo libffi*.so*`
 134.314 +  # literally (binary-ly) same
 134.315 +  PROGS="cpp c++ g++ g77 gcc gcj"
 134.316 +  DRIVERS="cc1 cc1obj cc1plus collect2 cpp0 f771 jc1 tradcpp0 jvgenmain"
 134.317 +  OBJS="crtbegin.o crtbeginS.o crtend.o crtendS.o crtbeginT.o"
 134.318 +  LIBS="libgcc.a libgcc_eh.a libobjc.a"
 134.319 +  LIBS_1="$LIBSTDC \
 134.320 +          $LIBGCJ libgcj.spec \
 134.321 +          $LIBFFI "
 134.322 +  LIBS_2="libstdc++.a libstdc++.la \
 134.323 +	  libsupc++.a libsupc++.la \
 134.324 +	  libgcj.a libgcj.la \
 134.325 +          libffi.a libffi.la"
 134.326 +  INCLUDE="include"
 134.327 +
 134.328 +  for CPU in sh3 sh3eb sh4 sh4eb; do
 134.329 +    mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/gcc-lib/${CPU}-linux/%{GCC_VERSION}
 134.330 +    mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/${CPU}-linux/{lib,share/java}
 134.331 +    # Make symbolic links for include dir.
 134.332 +    ln -s ../sh-linux/include $RPM_BUILD_ROOT%{_prefix}/${CPU}-linux/include
 134.333 +
 134.334 +    # Make symbolic links for libgcj.jar
 134.335 +    ln -s ../../sh-linux/share/java/libgcj-%{GCC_VERSION}.jar $RPM_BUILD_ROOT%{_prefix}/${CPU}-linux/share/java/libgcj-%{GCC_VERSION}.jar
 134.336 +
 134.337 +    # Make symbolic links for executables.
 134.338 +    for p in ${PROGS}; do
 134.339 +      ln -s shCPU-linux-GCC $RPM_BUILD_ROOT%{_prefix}/bin/${CPU}-linux-$p
 134.340 +    done
 134.341 +    ln -s sh-linux-gcjh $RPM_BUILD_ROOT%{_prefix}/bin/${CPU}-linux-gcjh
 134.342 +
 134.343 +    case "${CPU}" in
 134.344 +        sh3)
 134.345 +	    MULTILIBDIR=
 134.346 +	    MULTIPARENTDIR=
 134.347 +	    AS_ENDIAN_FLAG="-little"
 134.348 +	    CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
 134.349 +	    CPP_CPU_DEFS='-D__SH3__ -D__sh3__'
 134.350 +	    CC1_CPU_ENDIAN_FLAGS="-ml -m3"
 134.351 +	    CC1PLUS_CPU_ENDIAN_FLAGS="-ml -m3"
 134.352 +	    LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh3"
 134.353 +	    LINKER_RPATH_LINK_FLAG="-rpath-link %{_prefix}/sh3-linux/lib"
 134.354 +        ;;
 134.355 +        sh3eb)
 134.356 +	    MULTILIBDIR=/mb
 134.357 +	    MULTIPARENTDIR=../
 134.358 +	    AS_ENDIAN_FLAG="-big"
 134.359 +	    CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
 134.360 +	    CPP_CPU_DEFS='-D__SH3__ -D__sh3__'
 134.361 +	    CC1_CPU_ENDIAN_FLAGS="-mb -m3"
 134.362 +	    CC1PLUS_CPU_ENDIAN_FLAGS="-mb -m3"
 134.363 +	    LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh3"
 134.364 +	    LINKER_RPATH_LINK_FLAG="-rpath-link %{_prefix}/sh3eb-linux/lib"
 134.365 +        ;;
 134.366 +        sh4)
 134.367 +	    MULTILIBDIR=/m4
 134.368 +	    MULTIPARENTDIR=../
 134.369 +	    AS_ENDIAN_FLAG="-little"
 134.370 +	    CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
 134.371 +	    CPP_CPU_DEFS="-D__SH4__"
 134.372 +	    CC1_CPU_ENDIAN_FLAGS="-ml -m4"
 134.373 +	    CC1PLUS_CPU_ENDIAN_FLAGS="-ml -m4"
 134.374 +	    LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh4"
 134.375 +	    LINKER_RPATH_LINK_FLAG="-rpath-link %{_prefix}/sh4-linux/lib"
 134.376 +        ;;
 134.377 +        sh4eb)
 134.378 +	    MULTILIBDIR=/mb/m4
 134.379 +	    MULTIPARENTDIR=../../
 134.380 +	    AS_ENDIAN_FLAG="-big"
 134.381 +	    CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
 134.382 +	    CPP_CPU_DEFS="-D__SH4__"
 134.383 +	    CC1_CPU_ENDIAN_FLAGS="-mb -m4"
 134.384 +	    CC1PLUS_CPU_ENDIAN_FLAGS="-mb -m4"
 134.385 +	    LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh4"
 134.386 +	    LINKER_RPATH_LINK_FLAG="-rpath-link %{_prefix}/sh4eb-linux/lib"
 134.387 +        ;;
 134.388 +    esac
 134.389 +
 134.390 +    # Make symbolic links for GCC drivers, objects, libraries, and include dir.
 134.391 +    for f in ${DRIVERS} ${INCLUDE}; do
 134.392 +       if [ -a $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/$f ]; then
 134.393 +         ln -s ../../sh-linux/%{GCC_VERSION}/$f $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/${CPU}-linux/%{GCC_VERSION}/$f
 134.394 +       fi
 134.395 +    done
 134.396 +    for f in ${OBJS} ${LIBS}; do
 134.397 +       if [ -a $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}${MULTILIBDIR}/$f ]; then
 134.398 +         ln -s ../../sh-linux/%{GCC_VERSION}${MULTILIBDIR}/$f $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/${CPU}-linux/%{GCC_VERSION}/$f
 134.399 +       fi
 134.400 +    done
 134.401 +
 134.402 +    for f in ${LIBS_1} ${LIBS_2}; do
 134.403 +      if [ -e $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib${MULTILIBDIR}/$f ]; then
 134.404 +        mv -f $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib${MULTILIBDIR}/$f $RPM_BUILD_ROOT%{_prefix}/${CPU}-linux/lib
 134.405 +        ln -s ${MULTIPARENTDIR}../../${CPU}-linux/lib/$f $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib${MULTILIBDIR}/$f
 134.406 +      fi
 134.407 +    done
 134.408 +
 134.409 +    sed -e "s+@AS_ENDIAN_FLAG@+${AS_ENDIAN_FLAG}+" \
 134.410 +        -e "s+@CPP_ENDIAN_DEF@+${CPP_ENDIAN_DEF}+" \
 134.411 +        -e "s+@CPP_CPU_DEFS@+${CPP_CPU_DEFS}+" \
 134.412 +        -e "s+@CC1_CPU_ENDIAN_FLAGS@+${CC1_CPU_ENDIAN_FLAGS}+" \
 134.413 +        -e "s+@CC1PLUS_CPU_ENDIAN_FLAGS@+${CC1PLUS_CPU_ENDIAN_FLAGS}+" \
 134.414 +        -e "s+@LINKER_CPU_ENDIAN_FLAGS@+${LINKER_CPU_ENDIAN_FLAGS}+" \
 134.415 +        -e "s+@LINKER_RPATH_LINK_FLAG@+${LINKER_RPATH_LINK_FLAG}+" \
 134.416 +        debian/edit-specs.in >${arch}/edit-specs-${CPU}.sed
 134.417 +
 134.418 +    sed -f ${arch}/edit-specs-${CPU}.sed \
 134.419 +        $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/specs \
 134.420 +        > $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/${CPU}-linux/%{GCC_VERSION}/specs
 134.421 +
 134.422 +  done
 134.423 +
 134.424 +%else
 134.425 +  ARCH_STRTIP=%{_target}-strip
 134.426 +  EXESUFFIX=""
 134.427 +  TOOLPREFIX=""
 134.428 +  ln -s ..%{_prefix}/bin/cpp ${RPM_BUILD_ROOT}/lib/cpp
 134.429 +  ln -s gcc ${RPM_BUILD_ROOT}%{_prefix}/bin/cc
 134.430 +  arch=%{_target}
 134.431 +  make DESTDIR=${RPM_BUILD_ROOT} \
 134.432 +	install -C ${arch}
 134.433 +  if [ %{TARGET_JAVA} -ne 0 ]; then
 134.434 +    make DESTDIR=${RPM_BUILD_ROOT} install -C ${arch}/${arch}/libffi
 134.435 +    make DESTDIR=${RPM_BUILD_ROOT} install -C ${arch}/${arch}/fastjar
 134.436 +    mv -f ${RPM_BUILD_ROOT}/%{_prefix}/%{_lib}/libgcj.spec \
 134.437 +          ${RPM_BUILD_ROOT}/%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/
 134.438 +  fi
 134.439 +  $ARCH_STRTIP $RPM_BUILD_ROOT%{_prefix}/bin/gcov$EXESUFFIX || :
 134.440 +
 134.441 +cat >${arch}/edit-specs <<EOF
 134.442 +/^*cross_compile:$/ {
 134.443 +n
 134.444 +c\\
 134.445 +0
 134.446 +}
 134.447 +EOF
 134.448 +  sed -f ${arch}/edit-specs -e 's#-rpath-link.*/usr/%{_target}/lib##' \
 134.449 +     ${RPM_BUILD_ROOT}%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/specs \
 134.450 +    >${RPM_BUILD_ROOT}%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/specs.$$
 134.451 +  mv -f ${RPM_BUILD_ROOT}%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/specs.$$ \
 134.452 +        ${RPM_BUILD_ROOT}%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/specs
 134.453 +
 134.454 +  sed -e "s/dependency_libs=.*/dependency_libs='-lm -lgcc -lc -lgcc'/" \
 134.455 +     ${RPM_BUILD_ROOT}%{_prefix}/lib/libstdc++.la \
 134.456 +    >${RPM_BUILD_ROOT}%{_prefix}/lib/libstdc++.la.$$
 134.457 +  mv -f ${RPM_BUILD_ROOT}%{_prefix}/lib/libstdc++.la.$$ \
 134.458 +        ${RPM_BUILD_ROOT}%{_prefix}/lib/libstdc++.la
 134.459 +
 134.460 +  sed -e "s/dependency_libs=.*/dependency_libs='-lpthread -ldl -lz -lm -lgcc -lc -lgcc'/" \
 134.461 +     ${RPM_BUILD_ROOT}%{_prefix}/lib/libgcj.la \
 134.462 +    >${RPM_BUILD_ROOT}%{_prefix}/lib/libgcj.la.$$
 134.463 +  mv -f ${RPM_BUILD_ROOT}%{_prefix}/lib/libgcj.la.$$ \
 134.464 +        ${RPM_BUILD_ROOT}%{_prefix}/lib/libgcj.la
 134.465 +
 134.466 +cat >$RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/syslimits.h <<EOF
 134.467 +#define _GCC_NEXT_LIMITS_H		/* tell gcc's limits.h to recurse */
 134.468 +#include_next <limits.h>
 134.469 +#undef _GCC_NEXT_LIMITS_H
 134.470 +EOF
 134.471 +
 134.472 +%endif
 134.473 +
 134.474 +  $ARCH_STRTIP $RPM_BUILD_ROOT%{_prefix}/bin/${TOOLPREFIX}{gcc,cpp,c++,c++filt,gcj,gcjh,gij,jar,grepjar,jcf-dump,jv-convert,jv-scan}$EXESUFFIX || :
 134.475 +  FULLPATH=$(dirname $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/cc1${EXESUFFIX})
 134.476 +  $ARCH_STRTIP $FULLPATH/{cc1${EXESUFFIX},cc1plus${EXESUFFIX},cpp0${EXESUFFIX},tradcpp0${EXESUFFIX},collect2${EXESUFFIX},jc1${EXESUFFIX},jvgenmain${EXESUFFIX}} || :
 134.477 +
 134.478 +  # Strip static libraries
 134.479 +  sh-linux-strip -S -R .comment `find $RPM_BUILD_ROOT -type f -name "*.a"` || :
 134.480 +
 134.481 +  # Strip ELF shared objects
 134.482 +  for f in `find $RPM_BUILD_ROOT -type f  \( -perm -0100 -or -perm -0010 -or -perm -0001 \) `; do
 134.483 +        if file $f | grep -q "shared object.*not stripped"; then
 134.484 +                sh-linux-strip --strip-unneeded -R .comment $f
 134.485 +        fi
 134.486 +  done
 134.487 +
 134.488 +%clean
 134.489 +rm -rf $RPM_BUILD_ROOT
 134.490 +
 134.491 +# ==================== Cross Compiler ===============================
 134.492 +%ifarch i386
 134.493 +
 134.494 +%files sh-linux
 134.495 +%defattr(-,root,root)
 134.496 +%{_prefix}/bin/sh*
 134.497 +%dir %{_prefix}/lib/gcc-lib/sh-linux
 134.498 +%dir %{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}
 134.499 +%dir %{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include
 134.500 +%dir %{_prefix}/lib/gcc-lib/sh3-linux
 134.501 +%dir %{_prefix}/lib/gcc-lib/sh3-linux/%{GCC_VERSION}
 134.502 +%dir %{_prefix}/lib/gcc-lib/sh3eb-linux
 134.503 +%dir %{_prefix}/lib/gcc-lib/sh3eb-linux/%{GCC_VERSION}
 134.504 +%dir %{_prefix}/lib/gcc-lib/sh4-linux
 134.505 +%dir %{_prefix}/lib/gcc-lib/sh4-linux/%{GCC_VERSION}
 134.506 +%dir %{_prefix}/lib/gcc-lib/sh4eb-linux
 134.507 +%dir %{_prefix}/lib/gcc-lib/sh4eb-linux/%{GCC_VERSION}
 134.508 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/cc1
 134.509 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/cc1plus
 134.510 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/collect2
 134.511 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/cpp0
 134.512 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/*.o
 134.513 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/libgcc*.a
 134.514 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/specs
 134.515 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/tradcpp0
 134.516 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/jc1
 134.517 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/jvgenmain
 134.518 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/m4
 134.519 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/mb
 134.520 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/stddef.h
 134.521 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/stdarg.h
 134.522 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/varargs.h
 134.523 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/float.h
 134.524 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/limits.h
 134.525 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/stdbool.h
 134.526 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/iso646.h
 134.527 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/syslimits.h
 134.528 +%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/README
 134.529 +%{_prefix}/lib/gcc-lib/sh3-linux/%{GCC_VERSION}/*
 134.530 +%{_prefix}/lib/gcc-lib/sh3eb-linux/%{GCC_VERSION}/*
 134.531 +%{_prefix}/lib/gcc-lib/sh4-linux/%{GCC_VERSION}/*
 134.532 +%{_prefix}/lib/gcc-lib/sh4eb-linux/%{GCC_VERSION}/*
 134.533 +%{_mandir}/man1/sh-linux-*
 134.534 +%dir %{_prefix}/sh-linux/include
 134.535 +%{_prefix}/sh3-linux/include
 134.536 +%{_prefix}/sh3eb-linux/include
 134.537 +%{_prefix}/sh4-linux/include
 134.538 +%{_prefix}/sh4eb-linux/include
 134.539 +%endif
 134.540 +
 134.541 +%if %{TARGET_LIBSTDC}
 134.542 +%ifarch i386
 134.543 +%{_prefix}/sh-linux/include/g++-v3
 134.544 +%{_prefix}/sh-linux/lib/libs*
 134.545 +%{_prefix}/sh-linux/lib/m4/libs*
 134.546 +%{_prefix}/sh-linux/lib/mb/libs*
 134.547 +%{_prefix}/sh-linux/lib/mb/m4/libs*
 134.548 +%{_prefix}/sh3-linux/lib/libs*
 134.549 +%{_prefix}/sh4-linux/lib/libs*
 134.550 +%{_prefix}/sh3eb-linux/lib/libs*
 134.551 +%{_prefix}/sh4eb-linux/lib/libs*
 134.552 +%endif
 134.553 +%endif
 134.554 +
 134.555 +%if %{TARGET_JAVA}
 134.556 +%ifarch i386
 134.557 +%files -n libgcj-sh-linux
 134.558 +%defattr(-,root,root)
 134.559 +%{_prefix}/sh-linux/include/*.h
 134.560 +%{_prefix}/sh-linux/include/gcj
 134.561 +%{_prefix}/sh-linux/include/gnu/*
 134.562 +%{_prefix}/sh-linux/include/java
 134.563 +%{_prefix}/sh-linux/lib/lib*gcj*
 134.564 +%{_prefix}/sh-linux/lib/m4/lib*gcj*
 134.565 +%{_prefix}/sh-linux/lib/mb/lib*gcj*
 134.566 +%{_prefix}/sh-linux/lib/mb/m4/lib*gcj*
 134.567 +%{_prefix}/sh-linux/lib/libffi*
 134.568 +%{_prefix}/sh-linux/lib/m4/libffi*
 134.569 +%{_prefix}/sh-linux/lib/mb/libffi*
 134.570 +%{_prefix}/sh-linux/lib/mb/m4/libffi*
 134.571 +%{_prefix}/sh-linux/share/java/libgcj-%{GCC_VERSION}.jar
 134.572 +%{_prefix}/sh3-linux/lib/lib*gcj*
 134.573 +%{_prefix}/sh3-linux/lib/libffi*
 134.574 +%{_prefix}/sh3-linux/share/java/libgcj-%{GCC_VERSION}.jar
 134.575 +%{_prefix}/sh4-linux/lib/lib*gcj*
 134.576 +%{_prefix}/sh4-linux/lib/libffi*
 134.577 +%{_prefix}/sh4-linux/share/java/libgcj-%{GCC_VERSION}.jar
 134.578 +%{_prefix}/sh3eb-linux/lib/lib*gcj*
 134.579 +%{_prefix}/sh3eb-linux/lib/libffi*
 134.580 +%{_prefix}/sh3eb-linux/share/java/libgcj-%{GCC_VERSION}.jar
 134.581 +%{_prefix}/sh4eb-linux/lib/lib*gcj*
 134.582 +%{_prefix}/sh4eb-linux/lib/libffi*
 134.583 +%{_prefix}/sh4eb-linux/share/java/libgcj-%{GCC_VERSION}.jar
 134.584 +%endif
 134.585 +%endif
 134.586 +
 134.587 +%ifarch sh3 sh3eb sh4 sh4eb
 134.588 +# =========================== Native Compiler =================================
 134.589 +%files
 134.590 +%defattr(-,root,root)
 134.591 +%dir %{_prefix}/lib/gcc-lib/%{_target}
 134.592 +%dir %{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}
 134.593 +%dir %{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include
 134.594 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/cc1
 134.595 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/collect2
 134.596 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/cpp0
 134.597 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/crt*.o
 134.598 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/libgcc*.a
 134.599 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/specs
 134.600 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/tradcpp0
 134.601 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/stddef.h
 134.602 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/stdarg.h
 134.603 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/varargs.h
 134.604 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/float.h
 134.605 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/limits.h
 134.606 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/stdbool.h
 134.607 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/iso646.h
 134.608 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/syslimits.h
 134.609 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/README
 134.610 +%{_prefix}/bin/gcc
 134.611 +%{_prefix}/bin/%{_target}-gcc
 134.612 +%{_prefix}/bin/cpp
 134.613 +%{_prefix}/bin/gccbug
 134.614 +%{_prefix}/bin/gcov
 134.615 +%{_prefix}/bin/cc
 134.616 +/lib/cpp
 134.617 +%{_infodir}/cpp*
 134.618 +%{_infodir}/gcc*
 134.619 +
 134.620 +%if 0
 134.621 +%files libgcc
 134.622 +%defattr(-,root,root)
 134.623 +/lib/libgcc_s.so*
 134.624 +%endif
 134.625 +
 134.626 +%files c++
 134.627 +%defattr(-,root,root)
 134.628 +%{_prefix}/bin/c++
 134.629 +%{_prefix}/bin/g++
 134.630 +%{_prefix}/bin/c++filt
 134.631 +%{_prefix}/bin/%{_target}-c++
 134.632 +%{_prefix}/bin/%{_target}-g++
 134.633 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/cc1plus
 134.634 +%endif
 134.635 +
 134.636 +%if %{TARGET_LIBSTDC}
 134.637 +%ifarch sh3 sh3eb sh4 sh4eb
 134.638 +%files -n libstdc++
 134.639 +%defattr(-,root,root)
 134.640 +%{_prefix}/lib/libstdc++.so*
 134.641 +
 134.642 +%files -n libstdc++-devel
 134.643 +%defattr(-,root,root)
 134.644 +%{_prefix}/include/g++-v3
 134.645 +%{_prefix}/lib/libstdc++.*a
 134.646 +%endif
 134.647 +%endif
 134.648 +
 134.649 +%if %{TARGET_JAVA}
 134.650 +%ifarch sh3 sh3eb sh4 sh4eb
 134.651 +%files java
 134.652 +%defattr(-,root,root)
 134.653 +%{_prefix}/bin/addr2name.awk
 134.654 +%{_prefix}/bin/gcj
 134.655 +%{_prefix}/bin/gcjh
 134.656 +%{_prefix}/bin/gij
 134.657 +%{_prefix}/bin/jar
 134.658 +%{_prefix}/bin/grepjar
 134.659 +%{_prefix}/bin/jcf-dump
 134.660 +%{_prefix}/bin/jv-convert
 134.661 +%{_prefix}/bin/jv-scan
 134.662 +%dir %{_prefix}/lib/gcc-lib
 134.663 +%dir %{_prefix}/lib/gcc-lib/%{_target}
 134.664 +%dir %{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}
 134.665 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/jc1
 134.666 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/jvgenmain
 134.667 +%{_infodir}/gcj*
 134.668 +
 134.669 +%files -n libgcj
 134.670 +%defattr(-,root,root)
 134.671 +%{_prefix}/%{_lib}/libgcj.so*
 134.672 +%{_prefix}/%{_lib}/libffi*.so*
 134.673 +%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/libgcj.spec
 134.674 +%{_prefix}/share/java/libgcj-%{GCC_VERSION}.jar
 134.675 +
 134.676 +%files -n libgcj-devel
 134.677 +%defattr(-,root,root)
 134.678 +%{_prefix}/include/*.h
 134.679 +%{_prefix}/include/gcj
 134.680 +%{_prefix}/include/gnu/*
 134.681 +%{_prefix}/include/java
 134.682 +%{_prefix}/lib/libgcj.*a
 134.683 +%{_prefix}/lib/libffi.*a
 134.684 +%endif
 134.685 +%endif
 134.686 +
 134.687 +%changelog
 134.688 +* Wed Feb 19 2003 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.689 +- version 3.2.2.
 134.690 +
 134.691 +* Tue Feb 19 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.692 +- version 3.0.4.
 134.693 +
 134.694 +* Tue Feb 12 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.695 +- add java support.
 134.696 +
 134.697 +* Thu Feb 7 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.698 +- follow debian/SH update.
 134.699 +
 134.700 +* Tue Feb 5 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.701 +- follow debian/SH update.
 134.702 +
 134.703 +* Thu Jan 24 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.704 +- rebuild with new binutils.
 134.705 +
 134.706 +* Tue Jan 22 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.707 +- leaf function optimization fixed.
 134.708 +
 134.709 +* Thu Dec 06 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.710 +- add gcc-ice-rml patch.
 134.711 +
 134.712 +* Tue Nov 13 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.713 +- add configure option.
 134.714 +
 134.715 +* Thu Nov 01 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.716 +- tablejump fix by gniibe.
 134.717 +
 134.718 +* Mon Oct 22 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.719 +- updated gcc patch.
 134.720 +
 134.721 +* Wed Oct 17 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.722 +- updated gcc patch.
 134.723 +
 134.724 +* Tue Oct 02 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.725 +- gcc/config/sh/sh.c bug fix.
 134.726 +
 134.727 +* Fri Aug 24 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.728 +- gcc version 3.0.1.
 134.729 +
 134.730 +* Thu Jun 28 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.731 +- gcc version 3.0.
 134.732 +- Add libstdc++ package.
 134.733 +
 134.734 +* Mon Apr 23 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.735 +- Add cygwin host.
 134.736 +
 134.737 +* Sat Dec 23 2000 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.738 +- fix file attribute.
 134.739 +- add asmspecs patch.
 134.740 +
 134.741 +* Sat Nov 11 2000 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
 134.742 +- initial version.
   135.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   135.2 +++ b/patches/gcc/3.3.1/compat.exp.patch	Sat Feb 24 11:00:05 2007 +0000
   135.3 @@ -0,0 +1,37 @@
   135.4 +Fixes the following problem when testing a cross-compiler:
   135.5 +
   135.6 +============================================
   135.7 +Testing g++.dg/compat/abi/bitfield1,
   135.8 +...
   135.9 +Invoking the compiler as /crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/build-gcc/gcc/testsuite/../g++  ...
  135.10 +/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/gcc/testsuite/g++.dg/compat/abi/bitfield1_main.C
  135.11 +pid is 16028 -16028
  135.12 +compiler exited with status 1
  135.13 +output is:
  135.14 +sh: error while loading shared libraries: /opt/cegl-2.0/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/powerpc-750-linux-gnu/./lib/libdl.so.2: ELF file data encoding not little-endian
  135.15 +/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/build-gcc/gcc/testsuite/../g++: error while loading shared libraries: /opt/cegl-2.0/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/powerpc-750-linux-gnu/./lib/libc.so.6: ELF file data encoding not little-endian
  135.16 +
  135.17 +FAIL: g++.dg/compat/abi/bitfield1 main_tst.o compile
  135.18 +============================================
  135.19 +
  135.20 +--- gcc-3.3/gcc/testsuite/g++.dg/compat/compat.exp.old	Thu Oct 17 17:22:57 2002
  135.21 ++++ gcc-3.3/gcc/testsuite/g++.dg/compat/compat.exp	Mon Jul 14 10:59:19 2003
  135.22 +@@ -42,11 +42,13 @@
  135.23 + proc compat-fix-library-path { } {
  135.24 +     global ld_library_path
  135.25 + 
  135.26 +-    # See comments in lib/g++.exp for why this is needed.
  135.27 +-    setenv  LD_LIBRARY_PATH     $ld_library_path
  135.28 +-    setenv  SHLIB_PATH          $ld_library_path
  135.29 +-    setenv  LD_LIBRARYN32_PATH  $ld_library_path
  135.30 +-    setenv  LD_LIBRARY64_PATH   $ld_library_path
  135.31 ++    if {![is_remote target]} {
  135.32 ++	# See comments in lib/g++.exp for why this is needed.
  135.33 ++	setenv  LD_LIBRARY_PATH     $ld_library_path
  135.34 ++	setenv  SHLIB_PATH          $ld_library_path
  135.35 ++	setenv  LD_LIBRARYN32_PATH  $ld_library_path
  135.36 ++	setenv  LD_LIBRARY64_PATH   $ld_library_path
  135.37 ++    }
  135.38 + }
  135.39 + 
  135.40 + #
   136.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   136.2 +++ b/patches/gcc/3.3.1/config.sub.patch	Sat Feb 24 11:00:05 2007 +0000
   136.3 @@ -0,0 +1,72 @@
   136.4 +When configuring a s390->s390 or cris->cris crosscompiler
   136.5 +(ok, I haven't hit this yet, but one of these days I'll get me an account
   136.6 +on an s390, and then I'll need this patch :-), you'll get the
   136.7 +following error:
   136.8 +
   136.9 ++ /build/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/gcc-3.3/configure
  136.10 +--target=s390-unknown-linux-gnu --host=s390-host_unknown-linux-gnu
  136.11 +--prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2
  136.12 +--enable-languages=c
  136.13 +--with-local-prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/s390-
  136.14 +unknown-linux-gnu --enable-threads=no --without-headers --with-newlib
  136.15 +--disable-shared
  136.16 +...
  136.17 +*** --with-headers is only supported when cross compiling
  136.18 +
  136.19 +This error pops up only when you're using Daniel Jacobowitz's technique
  136.20 +of slightly changing the target and host tuples to make them different
  136.21 +enough to force gcc's build system to not try to pull in system libraries
  136.22 +or headers.  This technique is needed e.g. to build an x86 -> x86
  136.23 +cross-compiler.
  136.24 +(The LFS developers ran into the same bug that prompted me to use
  136.25 +this technique; they point people who run into it to
  136.26 +http://linuxfromscratch.org/~greg/pure_lfs.txt, which is a different
  136.27 +way of avoiding this problem.  I think the tuple tweak is the way to go, though.)
  136.28 +
  136.29 +config-patches@gnu.org rejected this patch, on the grounds that there
  136.30 +is only one vendor of each of those two architectures, so the 
  136.31 +canonicalization is by definition correct.  When I pointed out the
  136.32 +difficulty this causes for people building s390 -> s390 or
  136.33 +cris -> cris compilers that are incompatible with the system
  136.34 +libraries and thus must be built like cross-compilers, he grumped and said 
  136.35 +"autoconf should let you specify a cross-compiler in some other way than
  136.36 +comparing tuple strings".
  136.37 +
  136.38 +
  136.39 +
  136.40 +--- gcc-3.3/config.sub.old	Sun Jun  8 20:38:47 2003
  136.41 ++++ gcc-3.3/config.sub	Sun Jun  8 20:40:34 2003
  136.42 +@@ -433,9 +433,12 @@
  136.43 + 	crds | unos)
  136.44 + 		basic_machine=m68k-crds
  136.45 + 		;;
  136.46 +-	cris | cris-* | etrax*)
  136.47 ++	cris | etrax*)
  136.48 + 		basic_machine=cris-axis
  136.49 + 		;;
  136.50 ++	cris-*)
  136.51 ++		basic_machine=cris-`echo $basic_machine | sed 's/^[^-]*-//'`
  136.52 ++		;;
  136.53 + 	da30 | da30-*)
  136.54 + 		basic_machine=m68k-da30
  136.55 + 		;;
  136.56 +@@ -820,11 +823,17 @@
  136.57 + 	rtpc | rtpc-*)
  136.58 + 		basic_machine=romp-ibm
  136.59 + 		;;
  136.60 +-	s390 | s390-*)
  136.61 ++	s390)
  136.62 + 		basic_machine=s390-ibm
  136.63 + 		;;
  136.64 +-	s390x | s390x-*)
  136.65 ++	s390-*)
  136.66 ++		basic_machine=s390-`echo $basic_machine | sed 's/^[^-]*-//'`
  136.67 ++		;;
  136.68 ++	s390x)
  136.69 + 		basic_machine=s390x-ibm
  136.70 ++		;;
  136.71 ++	s390x-*)
  136.72 ++		basic_machine=s390x-`echo $basic_machine | sed 's/^[^-]*-//'`
  136.73 + 		;;
  136.74 + 	sa29200)
  136.75 + 		basic_machine=a29k-amd
   137.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   137.2 +++ b/patches/gcc/3.3.1/empty6.patch	Sat Feb 24 11:00:05 2007 +0000
   137.3 @@ -0,0 +1,21 @@
   137.4 +From 3.4 branch.  Fixes test failure
   137.5 +FAIL: g++.dg/abi/empty6.C  (test for warnings, line 6)
   137.6 +
   137.7 +===================================================================
   137.8 +RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/abi/empty6.C,v
   137.9 +retrieving revision 1.1
  137.10 +retrieving revision 1.2
  137.11 +diff -u -r1.1 -r1.2
  137.12 +--- gcc/gcc/testsuite/g++.dg/abi/empty6.C	2002/09/25 19:07:35	1.1
  137.13 ++++ gcc/gcc/testsuite/g++.dg/abi/empty6.C	2003/06/03 19:10:09	1.2
  137.14 +@@ -5,4 +5,9 @@
  137.15 + struct B {
  137.16 +   A a; // { dg-warning "empty" }
  137.17 +   virtual void f () {}
  137.18 +-};
  137.19 ++} __attribute__((aligned(8)));
  137.20 ++/* The preceding attribute is necessary on targets with
  137.21 ++   BIGGEST_ALIGNMENT <= 32 to trigger the warning, as otherwise a 32 bit
  137.22 ++   offset is split into DECL_FIELD_OFFSET 4 and DECL_FIELD_BIT_OFFSET 0,
  137.23 ++   and then there is no discrepancy between DECL_FIELD_OFFSET and
  137.24 ++   byte_position to warn about.  */
   138.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   138.2 +++ b/patches/gcc/3.3.1/gcc-3.2.3-g++.exp.patch	Sat Feb 24 11:00:05 2007 +0000
   138.3 @@ -0,0 +1,100 @@
   138.4 +See http://gcc.gnu.org/PR12010
   138.5 +
   138.6 +g++ testsuite fixes for cross-compilers, Dan Kegel, Ixia Communications, 12 July 2003
   138.7 +
   138.8 +The first hunk fixes the error
   138.9 +
  138.10 +/testsuite_flags: /testsuite_flags: No such file or directory
  138.11 +    while executing
  138.12 +"exec sh ${odir_v3}/testsuite_flags --build-includes"
  138.13 +    (procedure "g++_include_flags" line 21)
  138.14 +    invoked from within
  138.15 +"g++_include_flags [get_multilibs] "
  138.16 +    (procedure "g++_init" line 63)
  138.17 +    invoked from within
  138.18 +"${tool}_init $test_file_name"
  138.19 +    (procedure "runtest" line 19)
  138.20 +    invoked from within
  138.21 +"runtest $test_name"
  138.22 +    ("foreach" body line 42)
  138.23 +    invoked from within
  138.24 +...
  138.25 +make[1]: [check-g++] Error 1 (ignored)
  138.26 +
  138.27 +The fix isn't especially pretty, but it worked for me, and can't hurt the
  138.28 +more common native compiler case.  Maybe someone who knows the code better 
  138.29 +can come up with a better fix.
  138.30 +
  138.31 +The second hunk fixes the error
  138.32 +
  138.33 +sh: error while loading shared libraries: /opt/cegl-2.0/powerpc-405-linux-gnu/gcc-3.2.3-glibc-2.2.5/powerpc-405-linux-gnu/./lib/libdl.so.2: ELF file data encoding not little-endian
  138.34 +
  138.35 +when trying to compile g++ testcases (!); setting up
  138.36 +the shared library environment when running crosstests of g++ 
  138.37 +should either be done by a special board file, or by
  138.38 +setting up a remote chroot environment (see http://kegel.com/crosstool),
  138.39 +not by blithely setting LD_LIBRARY_PATH on the local system.
  138.40 +
  138.41 +--- gcc-3.2.3/gcc/testsuite/lib/g++.exp.old	Fri Jul 11 15:42:47 2003
  138.42 ++++ gcc-3.2.3/gcc/testsuite/lib/g++.exp	Sat Jul 12 12:57:07 2003
  138.43 +@@ -72,6 +72,8 @@
  138.44 + #
  138.45 + proc g++_include_flags { paths } {
  138.46 +     global srcdir
  138.47 ++    global objdir
  138.48 ++    global target_triplet
  138.49 +     global HAVE_LIBSTDCXX_V3
  138.50 +     global TESTING_IN_BUILD_TREE
  138.51 + 
  138.52 +@@ -90,6 +92,20 @@
  138.53 + 
  138.54 +     if { ${HAVE_LIBSTDCXX_V3} } {
  138.55 +       set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
  138.56 ++      if { $odir_v3 == "" } {
  138.57 ++          verbose "g++_include_flags: couldn't find libstdc++-v3 on first try, now looking in build directory $objdir"
  138.58 ++	  # first assume no multilibs
  138.59 ++          set odir_v3 [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
  138.60 ++      }
  138.61 ++      if { $odir_v3 == "" } {
  138.62 ++          verbose "g++_include_flags: couldn't find libstdc++-v3 on second try, trying multilib"
  138.63 ++	  # assume multilib only one level deep
  138.64 ++          set multisub [file tail $gccpath]
  138.65 ++          set odir_v3 [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
  138.66 ++      }
  138.67 ++      if { $odir_v3 == "" } {
  138.68 ++           error "Can't find libstdc++-v3"
  138.69 ++      }
  138.70 +       append flags [exec sh ${odir_v3}/testsuite_flags --build-includes]
  138.71 +     } else {
  138.72 +       set odir_v2 [lookfor_file ${gccpath} libstdc++]
  138.73 +@@ -192,16 +192,20 @@
  138.74 +       }
  138.75 +     }
  138.76 + 
  138.77 +-    # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
  138.78 +-    # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
  138.79 +-    # (for the 64-bit ABI).  The right way to do this would be to modify
  138.80 +-    # unix.exp -- but that's not an option since it's part of DejaGNU
  138.81 +-    # proper, so we do it here.  We really only need to do 
  138.82 +-    # this on IRIX, but it shouldn't hurt to do it anywhere else.
  138.83 +-    setenv  LD_LIBRARY_PATH     $ld_library_path
  138.84 +-    setenv  SHLIB_PATH          $ld_library_path
  138.85 +-    setenv  LD_LIBRARYN32_PATH  $ld_library_path
  138.86 +-    setenv  LD_LIBRARY64_PATH   $ld_library_path
  138.87 ++    if {![is_remote target]} {
  138.88 ++      # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
  138.89 ++      # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
  138.90 ++      # (for the 64-bit ABI).  The right way to do this would be to modify
  138.91 ++      # unix.exp -- but that's not an option since it's part of DejaGNU
  138.92 ++      # proper, so we do it here.  We really only need to do 
  138.93 ++      # this on IRIX, but it shouldn't hurt to do it anywhere else.
  138.94 ++
  138.95 ++      # Doing this causes us to be unable to run cross-compilers.
  138.96 ++      setenv  LD_LIBRARY_PATH     $ld_library_path
  138.97 ++      setenv  SHLIB_PATH          $ld_library_path
  138.98 ++      setenv  LD_LIBRARYN32_PATH  $ld_library_path
  138.99 ++      setenv  LD_LIBRARY64_PATH   $ld_library_path
 138.100 ++    }
 138.101 + 
 138.102 +     return "$flags"
 138.103 + }
   139.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   139.2 +++ b/patches/gcc/3.3.1/gcc-3.3-libstdc++-v3-dg.exp.patch	Sat Feb 24 11:00:05 2007 +0000
   139.3 @@ -0,0 +1,54 @@
   139.4 +Without this patch, the command
   139.5 +
   139.6 +RUNTESTFLAGS=--target=powerpc-750-linux-gnu -v -v -v -v make check-target-libstdc++-v3
   139.7 +
   139.8 +fails in two ways:
   139.9 +1. the -L option meant to locate the testsuite directory is incorrect, and
  139.10 +2. the wrong compiler is invoked, causing all sorts of havoc, not least of which
  139.11 +is the native compiler is invoked when we really wanted to invoke the cross-compiler
  139.12 +we just built.
  139.13 +
  139.14 +Here's an example log of the problem in action.  Every testcase fails, this shows just one:
  139.15 +-------------
  139.16 +Invoking the compiler as g++ -ggdb3 -DDEBUG_ASSERT -I/home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/libstdc++-v3/testsuite /home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/libstdc++-v3/testsuite/20_util/binders.cc   -g -O2 -DDEBUG_ASSERT  -L/testsuite -lv3test -lm  -o ./binders.exe
  139.17 +compiler exited with status 1
  139.18 +output is:
  139.19 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_function.h: In method `void binder2nd<mem_fun1_ref_t<void,Elem,int> >::operator ()(const Elem &) const':^M
  139.20 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_algo.h:83:   instantiated from `for_each<Elem *, binder2nd<mem_fun1_ref_t<void,Elem,int> > >(Elem *, Elem *, binder2nd<mem_fun1_ref_t<void,Elem,int> >)'^M
  139.21 +/home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/libstdc++-v3/testsuite/20_util/binders.cc:43:   instantiated from here^M
  139.22 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_function.h:224: conversion from `const Elem' to `Elem &' discards qualifiers^M
  139.23 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_function.h:622: in passing argument 1 of `mem_fun1_ref_t<void,Elem,int>::operator ()(Elem &, int) const'^M
  139.24 +...
  139.25 +FAIL: 20_util/binders.cc (test for excess errors)
  139.26 +WARNING: 20_util/binders.cc compilation failed to produce executable
  139.27 +-------------
  139.28 +
  139.29 +And here's the patch.  I'm not happy with it, and it probably gets some cases wrong,
  139.30 +but it seems to work for the common native case and for my cross-compiler case.
  139.31 +
  139.32 +--- gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp.old	Sun Jul 13 10:42:01 2003
  139.33 ++++ gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp	Sun Jul 13 11:39:54 2003
  139.34 +@@ -46,8 +46,23 @@
  139.35 +     global gluefile wrap_flags
  139.36 +     global ld_library_path
  139.37 +     global tool_root_dir
  139.38 ++    global target_triplet
  139.39 + 
  139.40 +     set blddir [lookfor_file [get_multilibs] libstdc++-v3]
  139.41 ++    if { $blddir == "" } {
  139.42 ++        set multilibs [get_multilibs]
  139.43 ++        # FIXME: assume multilib only one level deep
  139.44 ++        set multisub [file tail $multilibs]
  139.45 ++        verbose "libstdc++-v3-init: couldn't find libstdc++-v3 in $multilibs, trying $objdir"
  139.46 ++        set blddir [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
  139.47 ++    }
  139.48 ++    if { $blddir == "" } {
  139.49 ++        verbose "libstdc++-v3-init: couldn't find libstdc++-v3, trying $objdir without multilibs"
  139.50 ++        set blddir [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
  139.51 ++    }
  139.52 ++    if { $blddir == "" } {
  139.53 ++         error "Can't find libstdc++-v3"
  139.54 ++    }
  139.55 + 
  139.56 +     # By default, we assume we want to run program images.
  139.57 +     global dg-do-what-default
   140.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   140.2 +++ b/patches/gcc/3.3.1/gcc-3.3.1-trap-posix.patch	Sat Feb 24 11:00:05 2007 +0000
   140.3 @@ -0,0 +1,44 @@
   140.4 +# 
   140.5 +# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
   140.6 +#
   140.7 +# Error:
   140.8 +#
   140.9 +# creating libintl.h
  140.10 +# Configuring etc...
  140.11 +# loading cache ../config.cache
  140.12 +# checking for a BSD compatible install... (cached) /usr/bin/install -c
  140.13 +# creating ./config.status
  140.14 +# creating Makefile
  140.15 +# trap: usage: trap [-lp] [[arg] signal_spec ...]
  140.16 +#
  140.17 +# Description:
  140.18 +#
  140.19 +# non-posix conform usage of trap causes bash >= 3.0 to fail
  140.20 +# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
  140.21 +#
  140.22 +# Status:
  140.23 +#
  140.24 +# fixed in gcc >= 3.3.5
  140.25 +# backport of gcc-3.3.5 fix
  140.26 +#
  140.27 +diff -ruN gcc-3.3.1-orig/configure gcc-3.3.1/configure
  140.28 +--- gcc-3.3.1-orig/configure	2002-09-29 18:11:24.000000000 +0200
  140.29 ++++ gcc-3.3.1/configure	2005-04-20 18:49:20.223220401 +0200
  140.30 +@@ -697,7 +697,7 @@
  140.31 + if test -f skip-this-dir; then
  140.32 + 	# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
  140.33 + 	# and reset the trap handler.
  140.34 +-	trap 0
  140.35 ++	trap '' 0
  140.36 + 	rm -rf Makefile* ${tmpdir}
  140.37 + 	# Execute the final clean-up actions
  140.38 + 	${config_shell} skip-this-dir
  140.39 +@@ -1596,7 +1596,7 @@
  140.40 + # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
  140.41 + # and reset the trap handler.
  140.42 + rm -rf ${tmpdir}
  140.43 +-trap 0
  140.44 ++trap '' 0
  140.45 + 
  140.46 + exit 0
  140.47 + 
   141.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   141.2 +++ b/patches/gcc/3.3.1/pr10392-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   141.3 @@ -0,0 +1,65 @@
   141.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   141.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr10392-1.c	Sun Sep 14 14:28:24 2003
   141.6 +@@ -0,0 +1,62 @@
   141.7 ++/* PR optimization/10392
   141.8 ++ * Reporter: marcus@mc.pp.se
   141.9 ++ * Summary: [3.3/3.4 regression] [SH] optimizer generates faulty array indexing
  141.10 ++ * Description:
  141.11 ++ * The address calculation of an index operation on an array on the stack 
  141.12 ++ * can _under some conditions_ get messed up completely
  141.13 ++ *
  141.14 ++ * Testcase tweaked by dank@kegel.com
  141.15 ++ * Problem only happens with -O2 -m4, so it should only happen on sh4,
  141.16 ++ * but what the heck, let's test other architectures, too.
  141.17 ++ * Not marked as xfail since it's a regression.
  141.18 ++*/
  141.19 ++/* { dg-do run } */
  141.20 ++/* { dg-options "-O2" } */
  141.21 ++/* { dg-options "-O2 -m4" { target sh4-*-* } } */
  141.22 ++const char *dont_optimize_function_away;
  141.23 ++
  141.24 ++const char *use(const char *str)
  141.25 ++{
  141.26 ++	dont_optimize_function_away = str;
  141.27 ++	if (str[0] != 'v')
  141.28 ++		abort();
  141.29 ++	if (str[1] < '1' || str[1] > '6')
  141.30 ++		abort();
  141.31 ++	if (str[2])
  141.32 ++		abort();
  141.33 ++	return str[2] ? "notused" : "v6";
  141.34 ++}
  141.35 ++
  141.36 ++const char *func(char *a, char *b)
  141.37 ++{
  141.38 ++	char buf[128];
  141.39 ++	unsigned char i;
  141.40 ++	const char *result;
  141.41 ++
  141.42 ++	char *item[] = {
  141.43 ++		"v1",
  141.44 ++		"v2",
  141.45 ++	};
  141.46 ++
  141.47 ++	buf[0] = 'v';
  141.48 ++	buf[1] = '3';
  141.49 ++	buf[2] = 0;
  141.50 ++
  141.51 ++	for (i = 0; i < 2; i++) {
  141.52 ++		/* bug is: following line passes wild pointer to use() on sh4 -O2 */
  141.53 ++		result = use(item[i]);
  141.54 ++
  141.55 ++		use(buf);
  141.56 ++		use(a);
  141.57 ++		use(b);
  141.58 ++		result = use(result);
  141.59 ++	}
  141.60 ++	return result;
  141.61 ++}
  141.62 ++
  141.63 ++int main()
  141.64 ++{
  141.65 ++	func("v4", "v5");
  141.66 ++	return 0;
  141.67 ++}
  141.68 ++
   142.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   142.2 +++ b/patches/gcc/3.3.1/pr10412-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   142.3 @@ -0,0 +1,46 @@
   142.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   142.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr10412-1.c	Sun Sep 14 16:15:21 2003
   142.6 +@@ -0,0 +1,43 @@
   142.7 ++/* PR target/10412
   142.8 ++ * Reporter: shrinivasa@kpitcummins.com 
   142.9 ++ * Summary: Renesas SH - Incorrect code generation
  142.10 ++ * Description:
  142.11 ++ * When following code is compiled  with
  142.12 ++ * sh-elf-gcc  -S -mhitachi -m2 -O2 bug1.c
  142.13 ++ * generates an incorrect code.
  142.14 ++ *
  142.15 ++ * Testcase tweaked by dank@kegel.com
  142.16 ++ * Problem only happens with -mhitachi -m2.  Not sure if I can give those
  142.17 ++ * options for all sh targets.  They work on sh4, though.
  142.18 ++ * Not marked as xfail as it's a regression relative to hardhat 2.0 gcc-2.97.
  142.19 ++*/
  142.20 ++/* { dg-do run } */
  142.21 ++/* { dg-options "-O2" } */
  142.22 ++int global_val;
  142.23 ++
  142.24 ++int func0(int x)
  142.25 ++{
  142.26 ++	global_val += x;
  142.27 ++	return (x != 99);
  142.28 ++}
  142.29 ++
  142.30 ++int func1(unsigned long addr)
  142.31 ++{
  142.32 ++	int err;
  142.33 ++
  142.34 ++	err = func0(addr);
  142.35 ++	if (err)
  142.36 ++		return (err);
  142.37 ++
  142.38 ++	err = func0(addr * 7);	/* address of func0 is lost during multiplication -> probable SIGSEGV */
  142.39 ++	return (err);
  142.40 ++}
  142.41 ++
  142.42 ++int main(int argc, char **argv)
  142.43 ++{
  142.44 ++	global_val = 0;
  142.45 ++	global_val += func1(99);
  142.46 ++	if (global_val != 99 * 8 + 1)
  142.47 ++		abort();
  142.48 ++	return 0;
  142.49 ++}
   143.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   143.2 +++ b/patches/gcc/3.3.1/pr10589-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   143.3 @@ -0,0 +1,17 @@
   143.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   143.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr10589-1.c	Mon Sep 15 08:57:58 2003
   143.6 +@@ -0,0 +1,14 @@
   143.7 ++/* PR target/10589
   143.8 ++ * Reporter: mathieu@thenesis.com
   143.9 ++ * Summary: For Hitachi SH target, GCC crashes when both -fomit-frame-pointer and -mdalign options are specified
  143.10 ++ * Keywords: ice-on-valid-code
  143.11 ++ * Testcase by Kazu Hirata, tweaked by dank@kegel.com
  143.12 ++ * Did not fail in Hard Hat 2.0 gcc-2.97, nor in dodes gcc-3.0.2, so this is a regression, so I'm not marking it xfail
  143.13 ++ */
  143.14 ++/* { dg-do compile { target sh*-*-* } } */
  143.15 ++/* { dg-options "-fomit-frame-pointer -mdalign" } */
  143.16 ++
  143.17 ++int foo(int a, int b)
  143.18 ++{
  143.19 ++	return a / b;
  143.20 ++}
   144.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   144.2 +++ b/patches/gcc/3.3.1/pr11162-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   144.3 @@ -0,0 +1,25 @@
   144.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   144.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr11162-1.c	Sun Sep 14 16:24:41 2003
   144.6 +@@ -0,0 +1,22 @@
   144.7 ++/*
   144.8 ++ * PR optimization/11162
   144.9 ++ * Reporter: Toshiyasu Morita <tm@kloo.net>
  144.10 ++ * Summary: [3.4 Regression] [-fnew-ra] ICE compiling channel.i on sh
  144.11 ++ * Keywords: ice-on-valid-code
  144.12 ++ * Description:
  144.13 ++ * [ICE] when channel.i from stress-1.17 is compiled with options:
  144.14 ++ * -O2 -m4 -fnew-ra
  144.15 ++ * ...
  144.16 ++ * The CFG code gets confused by the addition of a USE insn after a sibcall.
  144.17 ++ * Sibcalls are supposed to end the block (and the function!), so the fact
  144.18 ++ * that we have an instruction following one (even if its fake) is confusing.
  144.19 ++ *
  144.20 ++ * testcase tweaked by dank@kegel.com
  144.21 ++ */
  144.22 ++/* { dg-do compile } */
  144.23 ++/* { dg-options "-O2 -fnew-ra" } */
  144.24 ++
  144.25 ++int foo(char *p1)
  144.26 ++{
  144.27 ++	return bar(p1);
  144.28 ++}
   145.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   145.2 +++ b/patches/gcc/3.3.1/pr11587-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   145.3 @@ -0,0 +1,39 @@
   145.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   145.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr11587-1.c	Mon Sep 15 08:46:00 2003
   145.6 +@@ -0,0 +1,36 @@
   145.7 ++/* PR optimization/11587
   145.8 ++ * Reporter: Michael Eager <eager@mvista.com>
   145.9 ++ * Summary: [3.3/3.4 Regression] SH ICE in reload_cse_simplify_operand, postreload.c
  145.10 ++ * Keywords: ice-on-valid-code
  145.11 ++ *
  145.12 ++ * Note: a fix exists; see bugzilla
  145.13 ++ *
  145.14 ++ * Testcase tweaked by dank@kegel.com
  145.15 ++ * Not marked as xfail since it's a regression.
  145.16 ++ */
  145.17 ++
  145.18 ++/* { dg-do compile } */
  145.19 ++/* { dg-options "-O1" } */
  145.20 ++int foo1(void);
  145.21 ++int foo2();
  145.22 ++int foo3();
  145.23 ++
  145.24 ++static int goo()
  145.25 ++{
  145.26 ++	int i;
  145.27 ++
  145.28 ++	if (i <= 0)
  145.29 ++		return i;
  145.30 ++
  145.31 ++	if (foo1() > 1) {
  145.32 ++		i = foo2();
  145.33 ++		if (i < 0)
  145.34 ++			return i;
  145.35 ++		if (i) {
  145.36 ++			if (foo3())
  145.37 ++				return 1;
  145.38 ++			return 0;
  145.39 ++		}
  145.40 ++	}
  145.41 ++
  145.42 ++}
   146.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   146.2 +++ b/patches/gcc/3.3.1/pr11736-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   146.3 @@ -0,0 +1,48 @@
   146.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   146.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr11736-1.c	Sun Sep 14 14:26:33 2003
   146.6 +@@ -0,0 +1,45 @@
   146.7 ++/* PR optimization/11736
   146.8 ++ * Reporter: marcus@mc.pp.se
   146.9 ++ * Summary:  Stackpointer messed up on SuperH
  146.10 ++ * Keywords: wrong-code
  146.11 ++ * Description:
  146.12 ++ * When a function with 5 arguments is called in both branches of a
  146.13 ++ * conditional, and only the last argument differs, the code to push that
  146.14 ++ * last argument on the stack gets confused. 
  146.15 ++ * Space for the fifth argument is reserved on the stack by the
  146.16 ++ * instruction I have marked as "A".  However, if the else-branch is
  146.17 ++ * taken the stackpointer is decremented _again_ at "B".  This
  146.18 ++ * decrementation is never restored, and it is only due to the
  146.19 ++ * restoration of r15 from r14 that the function works at all.  With
  146.20 ++ * -fomit-frame-pointer it will crash.
  146.21 ++ *
  146.22 ++ * Testcase tweaked by dank@kegel.com
  146.23 ++ * Not marked as xfail since it's a regression from hardhat 2.0 gcc-2.97 
  146.24 ++ * and dodes gcc-3.0.2
  146.25 ++ */
  146.26 ++
  146.27 ++/* { dg-do run } */
  146.28 ++/* { dg-options "-O1 -fomit-frame-pointer" } */
  146.29 ++
  146.30 ++int expected_e;
  146.31 ++
  146.32 ++void bar(int a, int b, int c, int d, int e)
  146.33 ++{
  146.34 ++	if (e != expected_e)
  146.35 ++		abort();
  146.36 ++}
  146.37 ++
  146.38 ++void foo(int a)
  146.39 ++{
  146.40 ++	if (a)
  146.41 ++		bar(0, 0, 0, 0, 1);
  146.42 ++	else
  146.43 ++		bar(0, 0, 0, 0, 0);	/* stack pointer decremented extra time here, causing segfault */
  146.44 ++}
  146.45 ++
  146.46 ++int main(int argc, char **argv)
  146.47 ++{
  146.48 ++	for (expected_e = 0; expected_e < 2; expected_e++)
  146.49 ++		foo(expected_e);
  146.50 ++	return 0;
  146.51 ++}
   147.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   147.2 +++ b/patches/gcc/3.3.1/pr11864-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   147.3 @@ -0,0 +1,45 @@
   147.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   147.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr11864-1.c	Sun Sep 14 14:32:24 2003
   147.6 +@@ -0,0 +1,42 @@
   147.7 ++/* PR optimization/11864
   147.8 ++ * Reporter: Kazumoto Kojima <kkojima@gcc.gnu.org>
   147.9 ++ * Summary: [3.3/3.4 regression] miscompiles zero extension and test
  147.10 ++ * Description:
  147.11 ++ * gcc-3.3/3.4 -O2 for sh target may miscompile the combination of zero extension
  147.12 ++ * and test if it's zero.
  147.13 ++ *
  147.14 ++ * Testcase tweaked by dank@kegel.com.  Not marked as xfail because it's a regression.
  147.15 ++ */
  147.16 ++/* { dg-do run } */
  147.17 ++/* { dg-options "-O2" } */
  147.18 ++
  147.19 ++extern void abort(void);
  147.20 ++
  147.21 ++int val = 0xff00;
  147.22 ++
  147.23 ++int f(void)
  147.24 ++{
  147.25 ++	return val;
  147.26 ++}
  147.27 ++
  147.28 ++unsigned char a[1];
  147.29 ++
  147.30 ++void foo(void)
  147.31 ++{
  147.32 ++	a[0] = f() & 255;
  147.33 ++
  147.34 ++	if (!a[0])
  147.35 ++		a[0] = f() & 255;
  147.36 ++
  147.37 ++	if (!a[0])
  147.38 ++		a[0] = 1 + (f() & 127);
  147.39 ++}
  147.40 ++
  147.41 ++int main(int argc, char **argv)
  147.42 ++{
  147.43 ++	foo();
  147.44 ++	if (!a[0])
  147.45 ++		abort();
  147.46 ++
  147.47 ++	return 0;
  147.48 ++}
   148.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   148.2 +++ b/patches/gcc/3.3.1/pr11949-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   148.3 @@ -0,0 +1,61 @@
   148.4 +Message-Id: 20030822160024.GA305@ftbfs.org
   148.5 +From: Matt Kraai kraai at alumni dot cmu dot edu
   148.6 +To: gcc-patches at gcc dot gnu dot org
   148.7 +Date: Fri, 22 Aug 2003 09:00:24 -0700
   148.8 +Subject: PR 11949
   148.9 +
  148.10 +Howdy,
  148.11 +
  148.12 +I've backported the following patch from the mainline to the 3.3
  148.13 +branch to fix PR 11949.
  148.14 +
  148.15 +Bootstrapped and regression tested on powerpc-unknown-linux-gnu.
  148.16 +
  148.17 +OK to commit?
  148.18 +
  148.19 +	PR c/11949
  148.20 +	Backport from mainline:
  148.21 +
  148.22 +	2003-05-05  Aldy Hernandez  aldyh@redhat.com
  148.23 +
  148.24 +	* testsuite/gcc.c-torture/compile/simd-6.c: New.
  148.25 +
  148.26 +	* c-typeck.c (digest_init): Handle arrays of vector constants.
  148.27 +
  148.28 +Index: gcc/c-typeck.c
  148.29 +===================================================================
  148.30 +RCS file: /cvs/gcc/gcc/gcc/c-typeck.c,v
  148.31 +retrieving revision 1.213.2.8
  148.32 +diff -3 -c -p -r1.213.2.8 c-typeck.c
  148.33 +*** gcc/gcc/c-typeck.c	19 Aug 2003 01:42:35 -0000	1.213.2.8
  148.34 +--- gcc/gcc/c-typeck.c	22 Aug 2003 09:24:03 -0000
  148.35 +*************** digest_init (type, init, require_constan
  148.36 +*** 4765,4772 ****
  148.37 +    if (code == VECTOR_TYPE
  148.38 +        && comptypes (TREE_TYPE (inside_init), type)
  148.39 +        && TREE_CONSTANT (inside_init))
  148.40 +!     return build_vector (type, TREE_OPERAND (inside_init, 1));
  148.41 +! 
  148.42 +  
  148.43 +    /* Any type can be initialized
  148.44 +       from an expression of the same type, optionally with braces.  */
  148.45 +--- 4765,4778 ----
  148.46 +    if (code == VECTOR_TYPE
  148.47 +        && comptypes (TREE_TYPE (inside_init), type)
  148.48 +        && TREE_CONSTANT (inside_init))
  148.49 +!     {
  148.50 +!       if (TREE_CODE (inside_init) == VECTOR_CST
  148.51 +! 	  && comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)),
  148.52 +! 			TYPE_MAIN_VARIANT (type)))
  148.53 +! 	return inside_init;
  148.54 +!       else
  148.55 +! 	return build_vector (type, CONSTRUCTOR_ELTS (inside_init));
  148.56 +!     }
  148.57 +  
  148.58 +    /* Any type can be initialized
  148.59 +       from an expression of the same type, optionally with braces.  */
  148.60 +
  148.61 +typedef int __attribute__((mode(V2SI))) vec;
  148.62 +
  148.63 +vec a[] = {(vec) {1, 2}, {3, 4}};
  148.64 +
   149.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   149.2 +++ b/patches/gcc/3.3.1/pr9365-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   149.3 @@ -0,0 +1,43 @@
   149.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   149.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr9365-1.c	Sun Sep 14 09:34:37 2003
   149.6 +@@ -0,0 +1,40 @@
   149.7 ++/* PR target/9365
   149.8 ++ * Origin: marcus@mc.pp.se
   149.9 ++ * Testcase tweaked by dank@kegel.com
  149.10 ++ * [3.3 regression] [SH] segfault in gen_far_branch (config/sh/sh.c)
  149.11 ++ * ice-on-valid-code
  149.12 ++ * Not marked as xfail since it's a regression
  149.13 ++*/
  149.14 ++/* { dg-do compile } */
  149.15 ++/* { dg-options "-O2 -fomit-frame-pointer" } */
  149.16 ++
  149.17 ++
  149.18 ++void foo(int n, int *p)
  149.19 ++{
  149.20 ++	switch(n) {
  149.21 ++	case 100: case 110: case 120: case 130: case 140:
  149.22 ++	case 200: case 210: case 220: case 230: case 240:
  149.23 ++	case 300: case 310: case 320: case 330: case 340:
  149.24 ++	case 400: case 410: case 420: case 430: case 440:
  149.25 ++	case 500: case 510: case 520: case 530: case 540:
  149.26 ++	case 600: case 610: case 620: case 630: case 640:
  149.27 ++	case 700: case 710: case 720: case 730: case 740:
  149.28 ++	case 800: case 810: case 820: case 830: case 840:
  149.29 ++	case 900: case 910: case 920: case 930: case 940:
  149.30 ++		break;
  149.31 ++	default:
  149.32 ++		*p = n;
  149.33 ++		break;
  149.34 ++	}
  149.35 ++}
  149.36 ++
  149.37 ++int main(int argc, char **argv)
  149.38 ++{
  149.39 ++	int p;
  149.40 ++
  149.41 ++	(void) argv;
  149.42 ++
  149.43 ++	foo(argc, &p);
  149.44 ++
  149.45 ++	return p;
  149.46 ++}
   150.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   150.2 +++ b/patches/gcc/3.3.1/sh-pic-set_fpscr.patch	Sat Feb 24 11:00:05 2007 +0000
   150.3 @@ -0,0 +1,61 @@
   150.4 +See http://gcc.gnu.org/PR11901
   150.5 +Should fix
   150.6 +make[2]: *** [/gcc-3.3-glibc-2.3.2/build-glibc/elf/check-textrel.out] Error 1 
   150.7 +in glibc's "make tests".
   150.8 +
   150.9 +-------------
  150.10 +
  150.11 +Message-Id: <200307300255.h6U2tB906928@r-rr.iij4u.or.jp>
  150.12 +To: dank@kegel.com
  150.13 +Cc: linux-sh@m17n.org
  150.14 +Subject: Re: Writing PIC version of __udivsi3_i4? (was: Re: "make tests" fails
  150.15 + with "libc.so: text relocations used" in glibc-2.3.2 for sh4)
  150.16 +In-Reply-To: Your message of "Wed, 30 Jul 2003 11:20:49 +0900"
  150.17 +	<200307300212.h6U2CH901209@r-rr.iij4u.or.jp>
  150.18 +References: <200307300212.h6U2CH901209@r-rr.iij4u.or.jp>
  150.19 +Date: Wed, 30 Jul 2003 12:03:01 +0900
  150.20 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
  150.21 +
  150.22 +> I'll try to write the PIC version of it,
  150.23 +
  150.24 +Dan, does the attached patch work for you?
  150.25 +
  150.26 +[dank: original patch deleted; here's same thing rediffed against gcc-3.3 instead of HEAD]
  150.27 +
  150.28 +--- gcc-3.3/gcc/config/sh/lib1funcs.asm.old	Tue Jul 29 21:37:29 2003
  150.29 ++++ gcc-3.3/gcc/config/sh/lib1funcs.asm	Tue Jul 29 21:40:58 2003
  150.30 +@@ -1792,7 +1792,17 @@
  150.31 + 	.global GLOBAL(set_fpscr)
  150.32 + GLOBAL(set_fpscr):
  150.33 + 	lds r4,fpscr
  150.34 ++#ifdef __PIC__
  150.35 ++	mov.l	r12,@-r15
  150.36 ++	mova	LOCAL(set_fpscr_L0),r0
  150.37 ++	mov.l	LOCAL(set_fpscr_L0),r12
  150.38 ++	add	r0,r12
  150.39 ++	mov.l	LOCAL(set_fpscr_L1),r0
  150.40 ++	mov.l	@(r0,r12),r1
  150.41 ++	mov.l	@r15+,r12
  150.42 ++#else
  150.43 + 	mov.l LOCAL(set_fpscr_L1),r1
  150.44 ++#endif
  150.45 + 	swap.w r4,r0
  150.46 + 	or #24,r0
  150.47 + #ifndef FMOVD_WORKS
  150.48 +@@ -1820,8 +1830,16 @@
  150.49 + 	mov.l r3,@(4,r1)
  150.50 + #endif
  150.51 + 	.align 2
  150.52 ++#ifdef __PIC__
  150.53 ++LOCAL(set_fpscr_L0):
  150.54 ++	.long _GLOBAL_OFFSET_TABLE_
  150.55 ++LOCAL(set_fpscr_L1):
  150.56 ++	.long GLOBAL(fpscr_values@GOT)
  150.57 ++#else
  150.58 + LOCAL(set_fpscr_L1):
  150.59 + 	.long GLOBAL(fpscr_values)
  150.60 ++#endif
  150.61 ++
  150.62 + #ifdef __ELF__
  150.63 +         .comm   GLOBAL(fpscr_values),8,4
  150.64 + #else
   151.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   151.2 +++ b/patches/gcc/3.3.1/sh-spec.patch	Sat Feb 24 11:00:05 2007 +0000
   151.3 @@ -0,0 +1,52 @@
   151.4 +See http://gcc.gnu.org/PR11902
   151.5 +
   151.6 +Part of fix for abort on line
   151.7 +  assert (info[DT_RPATH] == NULL);
   151.8 +in glibc-2.3.2's ld.so, which makes all dynamically-linked
   151.9 +programs crash.
  151.10 +
  151.11 +Message-Id: <200308020452.h724q0n01509@r-rr.iij4u.or.jp>
  151.12 +To: dank@kegel.com
  151.13 +Cc: kkojima@rr.iij4u.or.jp
  151.14 +Subject: Re: Writing PIC version of __udivsi3_i4?
  151.15 +In-Reply-To: Your message of "Fri, 01 Aug 2003 21:15:27 -0700"
  151.16 +	<3F2B3ADF.6030206@kegel.com>
  151.17 +References: <3F2B3ADF.6030206@kegel.com>
  151.18 +Date: Sat, 02 Aug 2003 13:58:05 +0900
  151.19 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
  151.20 +
  151.21 +Dan Kegel <dank@kegel.com> wrote:
  151.22 +> It seems it might be from gcc's spec file:
  151.23 +> 
  151.24 +> *subtarget_link_spec:
  151.25 +> %{shared:-shared}    %{!static:      %{rdynamic:-export-dynamic}      %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}      %{!rpath:-rpath /lib}}    %{static:-static}
  151.26 +> 
  151.27 +> as the only place -rpath showed up was in the output of gcc -v as it
  151.28 +> was linking libc.so.
  151.29 +> 
  151.30 +> Well, that's a clue, anyway!  Guess I'll dig through the spec files
  151.31 +> tomorrow to see if I can figure it out some more.
  151.32 +
  151.33 +I've grepped gcc/config/*/*.h and found only SH and old libc1 stuffs
  151.34 +of i386/alpha include %{!rpath:-rpath ... in 3.3 release and the
  151.35 +current CVS. And my sh-gcc's specs doesn't have this :-(
  151.36 +It would be the Right Thing to remove this stuff simply. How about
  151.37 +the gcc patch below?
  151.38 +
  151.39 +Regards,
  151.40 +	kaz
  151.41 +--
  151.42 +--- gcc-3.3/gcc/config/sh/linux.h.orig	Sat Aug  2 13:20:57 2003
  151.43 ++++ gcc-3.3/gcc/config/sh/linux.h	Sat Aug  2 13:22:42 2003
  151.44 +@@ -48,8 +48,7 @@ do { \
  151.45 +   "%{shared:-shared} \
  151.46 +    %{!static: \
  151.47 +      %{rdynamic:-export-dynamic} \
  151.48 +-     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  151.49 +-     %{!rpath:-rpath /lib}} \
  151.50 ++     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
  151.51 +    %{static:-static}"
  151.52 + 
  151.53 + /* The GNU C++ standard library requires that these macros be defined.  */
  151.54 +
  151.55 +
   152.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   152.2 +++ b/patches/gcc/3.3.1/sh4-pthread.patch	Sat Feb 24 11:00:05 2007 +0000
   152.3 @@ -0,0 +1,44 @@
   152.4 +See http://gcc.gnu.org/PR11903
   152.5 +
   152.6 +Patch to fix following test case failure:
   152.7 +
   152.8 +		=== libstdc++-v3 tests ===
   152.9 +FAIL: thread/pthread1.cc (test for excess errors)
  152.10 +Excess errors:
  152.11 +/opt/cegl-2.0/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/sh4-unknown-linux-gnu/bin/ld: cannot find -lthread
  152.12 +collect2: ld returned 1 exit status
  152.13 +
  152.14 +Note that *any* program compiled with -pthread fails:
  152.15 +
  152.16 +/opt/cegl-2.0/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/bin/sh4-unknown-linux-gnu-gcc hello.c  -pthread
  152.17 +/opt/cegl-2.0/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/lib/gcc-lib/sh4-unknown-linux-gnu/3.3.1/../../../../sh4-unknown-linux-gnu/bin/ld: cannot find -lthread
  152.18 +collect2: ld returned 1 exit status
  152.19 +
  152.20 +Compiling with -lpthread on the other hand works fine:
  152.21 +/opt/cegl-2.0/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/bin/sh4-unknown-linux-gnu-gcc hello.c  -lpthread
  152.22 +
  152.23 +So -pthread is broken in some trivial way; it should invoke -lpthread, not -lthread,
  152.24 +at least when targeting Linux. 
  152.25 +
  152.26 +http://www.sh-linux.org/rpm-2003/SRPMS/gcc-3.2.3-3.src.rpm contains a jumbo patch,
  152.27 +gcc-20030210-sh-linux-1.patch, that includes a fix for this.  Here's the
  152.28 +appropriate hunk (brings in a fix for the documented -mieee option).
  152.29 +No idea if this fix is completely right, but it works for me...
  152.30 +- dank@kegel.com  20 Jul 2003
  152.31 +
  152.32 +Index: linux.h
  152.33 +===================================================================
  152.34 +RCS file: /cvsroot/gcc/gcc/gcc/config/sh/linux.h,v
  152.35 +retrieving revision 1.9.20.1
  152.36 +diff -u -d -u -r1.9.20.1 linux.h
  152.37 +--- gcc-ss-3_3-20030714/gcc/config/sh/linux.h.old	6 Jun 2003 02:30:59 -0000	1.9.20.1
  152.38 ++++ gcc-ss-3_3-20030714/gcc/config/sh/linux.h	20 Jul 2003 23:36:50 -0000
  152.39 +@@ -59,7 +59,7 @@
  152.40 + #undef LIB_SPEC
  152.41 + #define LIB_SPEC \
  152.42 +   "%{shared: -lc} \
  152.43 +-   %{!shared: %{pthread:-lthread} \
  152.44 ++   %{!shared: %{mieee:-lieee} %{pthread:-lpthread} \
  152.45 +      %{profile:-lc_p} %{!profile: -lc}}"
  152.46 + 
  152.47 + #undef STARTFILE_SPEC
   153.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   153.2 +++ b/patches/gcc/3.3.1/thunk3.patch	Sat Feb 24 11:00:05 2007 +0000
   153.3 @@ -0,0 +1,23 @@
   153.4 +Fixes 
   153.5 +FAIL: g++.jason/thunk3.C (test for excess errors)
   153.6 +on sh4-unknown-linux-gnu.
   153.7 +
   153.8 +Does any sh variant *not* use the generic thunk support?  If so, the patch should be
   153.9 +more cautious.  As it is, it excludes all sh processors from this test.
  153.10 +
  153.11 +Index: thunk3.C
  153.12 +===================================================================
  153.13 +RCS file: /cvsroot/gcc/gcc/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C,v
  153.14 +retrieving revision 1.13
  153.15 +diff -u -d -u -r1.13 thunk3.C
  153.16 +--- gcc-ss-3_3-20030714/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C.old	25 Mar 2002 17:57:03 -0000	1.13
  153.17 ++++ gcc-ss-3_3-20030714/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C	20 Jul 2003 16:57:38 -0000
  153.18 +@@ -2,7 +2,7 @@
  153.19 + // Note that this will break on any target that uses the generic thunk
  153.20 + //  support, because it doesn't support variadic functions.
  153.21 + 
  153.22 +-// excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3  mn10300-*-* mn10200-*-* v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa-*-*
  153.23 ++// excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3  mn10300-*-* mn10200-*-* v850-*-* sh*-*-* h8*-*-* xtensa-*-*
  153.24 + 
  153.25 + #include <stdarg.h>
  153.26 + 
   154.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   154.2 +++ b/patches/gcc/3.3.2/empty6.patch	Sat Feb 24 11:00:05 2007 +0000
   154.3 @@ -0,0 +1,21 @@
   154.4 +From 3.4 branch.  Fixes test failure
   154.5 +FAIL: g++.dg/abi/empty6.C  (test for warnings, line 6)
   154.6 +
   154.7 +===================================================================
   154.8 +RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/abi/empty6.C,v
   154.9 +retrieving revision 1.1
  154.10 +retrieving revision 1.2
  154.11 +diff -u -r1.1 -r1.2
  154.12 +--- gcc/gcc/testsuite/g++.dg/abi/empty6.C	2002/09/25 19:07:35	1.1
  154.13 ++++ gcc/gcc/testsuite/g++.dg/abi/empty6.C	2003/06/03 19:10:09	1.2
  154.14 +@@ -5,4 +5,9 @@
  154.15 + struct B {
  154.16 +   A a; // { dg-warning "empty" }
  154.17 +   virtual void f () {}
  154.18 +-};
  154.19 ++} __attribute__((aligned(8)));
  154.20 ++/* The preceding attribute is necessary on targets with
  154.21 ++   BIGGEST_ALIGNMENT <= 32 to trigger the warning, as otherwise a 32 bit
  154.22 ++   offset is split into DECL_FIELD_OFFSET 4 and DECL_FIELD_BIT_OFFSET 0,
  154.23 ++   and then there is no discrepancy between DECL_FIELD_OFFSET and
  154.24 ++   byte_position to warn about.  */
   155.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   155.2 +++ b/patches/gcc/3.3.2/gcc-3.2.3-g++.exp.patch	Sat Feb 24 11:00:05 2007 +0000
   155.3 @@ -0,0 +1,100 @@
   155.4 +See http://gcc.gnu.org/PR12010
   155.5 +
   155.6 +g++ testsuite fixes for cross-compilers, Dan Kegel, Ixia Communications, 12 July 2003
   155.7 +
   155.8 +The first hunk fixes the error
   155.9 +
  155.10 +/testsuite_flags: /testsuite_flags: No such file or directory
  155.11 +    while executing
  155.12 +"exec sh ${odir_v3}/testsuite_flags --build-includes"
  155.13 +    (procedure "g++_include_flags" line 21)
  155.14 +    invoked from within
  155.15 +"g++_include_flags [get_multilibs] "
  155.16 +    (procedure "g++_init" line 63)
  155.17 +    invoked from within
  155.18 +"${tool}_init $test_file_name"
  155.19 +    (procedure "runtest" line 19)
  155.20 +    invoked from within
  155.21 +"runtest $test_name"
  155.22 +    ("foreach" body line 42)
  155.23 +    invoked from within
  155.24 +...
  155.25 +make[1]: [check-g++] Error 1 (ignored)
  155.26 +
  155.27 +The fix isn't especially pretty, but it worked for me, and can't hurt the
  155.28 +more common native compiler case.  Maybe someone who knows the code better 
  155.29 +can come up with a better fix.
  155.30 +
  155.31 +The second hunk fixes the error
  155.32 +
  155.33 +sh: error while loading shared libraries: /opt/cegl-2.0/powerpc-405-linux-gnu/gcc-3.2.3-glibc-2.2.5/powerpc-405-linux-gnu/./lib/libdl.so.2: ELF file data encoding not little-endian
  155.34 +
  155.35 +when trying to compile g++ testcases (!); setting up
  155.36 +the shared library environment when running crosstests of g++ 
  155.37 +should either be done by a special board file, or by
  155.38 +setting up a remote chroot environment (see http://kegel.com/crosstool),
  155.39 +not by blithely setting LD_LIBRARY_PATH on the local system.
  155.40 +
  155.41 +--- gcc-3.2.3/gcc/testsuite/lib/g++.exp.old	Fri Jul 11 15:42:47 2003
  155.42 ++++ gcc-3.2.3/gcc/testsuite/lib/g++.exp	Sat Jul 12 12:57:07 2003
  155.43 +@@ -72,6 +72,8 @@
  155.44 + #
  155.45 + proc g++_include_flags { paths } {
  155.46 +     global srcdir
  155.47 ++    global objdir
  155.48 ++    global target_triplet
  155.49 +     global HAVE_LIBSTDCXX_V3
  155.50 +     global TESTING_IN_BUILD_TREE
  155.51 + 
  155.52 +@@ -90,6 +92,20 @@
  155.53 + 
  155.54 +     if { ${HAVE_LIBSTDCXX_V3} } {
  155.55 +       set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
  155.56 ++      if { $odir_v3 == "" } {
  155.57 ++          verbose "g++_include_flags: couldn't find libstdc++-v3 on first try, now looking in build directory $objdir"
  155.58 ++	  # first assume no multilibs
  155.59 ++          set odir_v3 [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
  155.60 ++      }
  155.61 ++      if { $odir_v3 == "" } {
  155.62 ++          verbose "g++_include_flags: couldn't find libstdc++-v3 on second try, trying multilib"
  155.63 ++	  # assume multilib only one level deep
  155.64 ++          set multisub [file tail $gccpath]
  155.65 ++          set odir_v3 [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
  155.66 ++      }
  155.67 ++      if { $odir_v3 == "" } {
  155.68 ++           error "Can't find libstdc++-v3"
  155.69 ++      }
  155.70 +       append flags [exec sh ${odir_v3}/testsuite_flags --build-includes]
  155.71 +     } else {
  155.72 +       set odir_v2 [lookfor_file ${gccpath} libstdc++]
  155.73 +@@ -192,16 +192,20 @@
  155.74 +       }
  155.75 +     }
  155.76 + 
  155.77 +-    # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
  155.78 +-    # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
  155.79 +-    # (for the 64-bit ABI).  The right way to do this would be to modify
  155.80 +-    # unix.exp -- but that's not an option since it's part of DejaGNU
  155.81 +-    # proper, so we do it here.  We really only need to do 
  155.82 +-    # this on IRIX, but it shouldn't hurt to do it anywhere else.
  155.83 +-    setenv  LD_LIBRARY_PATH     $ld_library_path
  155.84 +-    setenv  SHLIB_PATH          $ld_library_path
  155.85 +-    setenv  LD_LIBRARYN32_PATH  $ld_library_path
  155.86 +-    setenv  LD_LIBRARY64_PATH   $ld_library_path
  155.87 ++    if {![is_remote target]} {
  155.88 ++      # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
  155.89 ++      # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
  155.90 ++      # (for the 64-bit ABI).  The right way to do this would be to modify
  155.91 ++      # unix.exp -- but that's not an option since it's part of DejaGNU
  155.92 ++      # proper, so we do it here.  We really only need to do 
  155.93 ++      # this on IRIX, but it shouldn't hurt to do it anywhere else.
  155.94 ++
  155.95 ++      # Doing this causes us to be unable to run cross-compilers.
  155.96 ++      setenv  LD_LIBRARY_PATH     $ld_library_path
  155.97 ++      setenv  SHLIB_PATH          $ld_library_path
  155.98 ++      setenv  LD_LIBRARYN32_PATH  $ld_library_path
  155.99 ++      setenv  LD_LIBRARY64_PATH   $ld_library_path
 155.100 ++    }
 155.101 + 
 155.102 +     return "$flags"
 155.103 + }
   156.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   156.2 +++ b/patches/gcc/3.3.2/gcc-3.3-libstdc++-v3-dg.exp.patch	Sat Feb 24 11:00:05 2007 +0000
   156.3 @@ -0,0 +1,54 @@
   156.4 +Without this patch, the command
   156.5 +
   156.6 +RUNTESTFLAGS=--target=powerpc-750-linux-gnu -v -v -v -v make check-target-libstdc++-v3
   156.7 +
   156.8 +fails in two ways:
   156.9 +1. the -L option meant to locate the testsuite directory is incorrect, and
  156.10 +2. the wrong compiler is invoked, causing all sorts of havoc, not least of which
  156.11 +is the native compiler is invoked when we really wanted to invoke the cross-compiler
  156.12 +we just built.
  156.13 +
  156.14 +Here's an example log of the problem in action.  Every testcase fails, this shows just one:
  156.15 +-------------
  156.16 +Invoking the compiler as g++ -ggdb3 -DDEBUG_ASSERT -I/home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/libstdc++-v3/testsuite /home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/libstdc++-v3/testsuite/20_util/binders.cc   -g -O2 -DDEBUG_ASSERT  -L/testsuite -lv3test -lm  -o ./binders.exe
  156.17 +compiler exited with status 1
  156.18 +output is:
  156.19 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_function.h: In method `void binder2nd<mem_fun1_ref_t<void,Elem,int> >::operator ()(const Elem &) const':^M
  156.20 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_algo.h:83:   instantiated from `for_each<Elem *, binder2nd<mem_fun1_ref_t<void,Elem,int> > >(Elem *, Elem *, binder2nd<mem_fun1_ref_t<void,Elem,int> >)'^M
  156.21 +/home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/libstdc++-v3/testsuite/20_util/binders.cc:43:   instantiated from here^M
  156.22 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_function.h:224: conversion from `const Elem' to `Elem &' discards qualifiers^M
  156.23 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_function.h:622: in passing argument 1 of `mem_fun1_ref_t<void,Elem,int>::operator ()(Elem &, int) const'^M
  156.24 +...
  156.25 +FAIL: 20_util/binders.cc (test for excess errors)
  156.26 +WARNING: 20_util/binders.cc compilation failed to produce executable
  156.27 +-------------
  156.28 +
  156.29 +And here's the patch.  I'm not happy with it, and it probably gets some cases wrong,
  156.30 +but it seems to work for the common native case and for my cross-compiler case.
  156.31 +
  156.32 +--- gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp.old	Sun Jul 13 10:42:01 2003
  156.33 ++++ gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp	Sun Jul 13 11:39:54 2003
  156.34 +@@ -46,8 +46,23 @@
  156.35 +     global gluefile wrap_flags
  156.36 +     global ld_library_path
  156.37 +     global tool_root_dir
  156.38 ++    global target_triplet
  156.39 + 
  156.40 +     set blddir [lookfor_file [get_multilibs] libstdc++-v3]
  156.41 ++    if { $blddir == "" } {
  156.42 ++        set multilibs [get_multilibs]
  156.43 ++        # FIXME: assume multilib only one level deep
  156.44 ++        set multisub [file tail $multilibs]
  156.45 ++        verbose "libstdc++-v3-init: couldn't find libstdc++-v3 in $multilibs, trying $objdir"
  156.46 ++        set blddir [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
  156.47 ++    }
  156.48 ++    if { $blddir == "" } {
  156.49 ++        verbose "libstdc++-v3-init: couldn't find libstdc++-v3, trying $objdir without multilibs"
  156.50 ++        set blddir [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
  156.51 ++    }
  156.52 ++    if { $blddir == "" } {
  156.53 ++         error "Can't find libstdc++-v3"
  156.54 ++    }
  156.55 + 
  156.56 +     # By default, we assume we want to run program images.
  156.57 +     global dg-do-what-default
   157.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   157.2 +++ b/patches/gcc/3.3.2/gcc-3.3.2-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   157.3 @@ -0,0 +1,65 @@
   157.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
   157.5 +Adds support for arm*b-linux* big-endian ARM targets
   157.6 + 
   157.7 +See http://gcc.gnu.org/PR16350
   157.8 + 
   157.9 +diff -urN gcc-3.3.2.orig/gcc/config/arm/linux-elf.h gcc-3.3.2/gcc/config/arm/linux-elf.h
  157.10 +--- gcc-3.3.2.orig/gcc/config/arm/linux-elf.h	2003-09-16 17:39:23.000000000 +0200
  157.11 ++++ gcc-3.3.2/gcc/config/arm/linux-elf.h	2004-07-07 14:03:54.329839922 +0200
  157.12 +@@ -30,15 +30,29 @@
  157.13 + /* Do not assume anything about header files.  */
  157.14 + #define NO_IMPLICIT_EXTERN_C
  157.15 + 
  157.16 ++/*
  157.17 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  157.18 ++ * (big endian) configurations.
  157.19 ++ */
  157.20 ++#if TARGET_BIG_ENDIAN_DEFAULT
  157.21 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
  157.22 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  157.23 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  157.24 ++#else
  157.25 ++#define TARGET_ENDIAN_DEFAULT 0
  157.26 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  157.27 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  157.28 ++#endif
  157.29 ++
  157.30 + /* Default is to use APCS-32 mode.  */
  157.31 + #undef  TARGET_DEFAULT
  157.32 +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
  157.33 ++#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS | TARGET_ENDIAN_DEFAULT)
  157.34 + 
  157.35 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  157.36 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  157.37 + 
  157.38 + #undef  MULTILIB_DEFAULTS
  157.39 + #define MULTILIB_DEFAULTS \
  157.40 +-	{ "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  157.41 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  157.42 + 
  157.43 + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
  157.44 + 
  157.45 +@@ -86,7 +100,7 @@
  157.46 +    %{rdynamic:-export-dynamic} \
  157.47 +    %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  157.48 +    -X \
  157.49 +-   %{mbig-endian:-EB}" \
  157.50 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  157.51 +    SUBTARGET_EXTRA_LINK_SPEC
  157.52 + 
  157.53 + #define TARGET_OS_CPP_BUILTINS()		\
  157.54 +diff -urN gcc-3.3.2.orig/gcc/config.gcc gcc-3.3.2/gcc/config.gcc
  157.55 +--- gcc-3.3.2.orig/gcc/config.gcc	2003-10-01 21:07:01.000000000 +0200
  157.56 ++++ gcc-3.3.2/gcc/config.gcc	2004-07-07 14:04:59.046716638 +0200
  157.57 +@@ -699,6 +699,11 @@
  157.58 + 	;;
  157.59 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  157.60 + 	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
  157.61 ++	case $machine in
  157.62 ++	arm*b-*)
  157.63 ++		tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
  157.64 ++		;;
  157.65 ++	esac
  157.66 + 	tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
  157.67 + 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  157.68 + 	gnu_ld=yes
   158.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   158.2 +++ b/patches/gcc/3.3.2/gcc-3.3.2-trap-posix.patch	Sat Feb 24 11:00:05 2007 +0000
   158.3 @@ -0,0 +1,44 @@
   158.4 +# 
   158.5 +# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
   158.6 +#
   158.7 +# Error:
   158.8 +#
   158.9 +# creating libintl.h
  158.10 +# Configuring etc...
  158.11 +# loading cache ../config.cache
  158.12 +# checking for a BSD compatible install... (cached) /usr/bin/install -c
  158.13 +# creating ./config.status
  158.14 +# creating Makefile
  158.15 +# trap: usage: trap [-lp] [[arg] signal_spec ...]
  158.16 +#
  158.17 +# Description:
  158.18 +#
  158.19 +# non-posix conform usage of trap causes bash >= 3.0 to fail
  158.20 +# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
  158.21 +#
  158.22 +# Status:
  158.23 +#
  158.24 +# fixed in gcc >= 3.3.5
  158.25 +# backport of gcc-3.3.5 fix
  158.26 +#
  158.27 +diff -ruN gcc-3.3.2-orig/configure gcc-3.3.2/configure
  158.28 +--- gcc-3.3.2-orig/configure	2002-09-29 18:11:24.000000000 +0200
  158.29 ++++ gcc-3.3.2/configure	2005-04-20 20:55:51.000000000 +0200
  158.30 +@@ -697,7 +697,7 @@
  158.31 + if test -f skip-this-dir; then
  158.32 + 	# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
  158.33 + 	# and reset the trap handler.
  158.34 +-	trap 0
  158.35 ++	trap '' 0
  158.36 + 	rm -rf Makefile* ${tmpdir}
  158.37 + 	# Execute the final clean-up actions
  158.38 + 	${config_shell} skip-this-dir
  158.39 +@@ -1596,7 +1596,7 @@
  158.40 + # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
  158.41 + # and reset the trap handler.
  158.42 + rm -rf ${tmpdir}
  158.43 +-trap 0
  158.44 ++trap '' 0
  158.45 + 
  158.46 + exit 0
  158.47 + 
   159.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   159.2 +++ b/patches/gcc/3.3.2/pr10392-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   159.3 @@ -0,0 +1,1 @@
   159.4 +../3.3.1/pr10392-1-test.patch
   159.5 \ No newline at end of file
   160.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   160.2 +++ b/patches/gcc/3.3.2/pr10412-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   160.3 @@ -0,0 +1,1 @@
   160.4 +../3.3.1/pr10412-1-test.patch
   160.5 \ No newline at end of file
   161.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   161.2 +++ b/patches/gcc/3.3.2/pr10589-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   161.3 @@ -0,0 +1,1 @@
   161.4 +../3.3.1/pr10589-1-test.patch
   161.5 \ No newline at end of file
   162.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   162.2 +++ b/patches/gcc/3.3.2/pr11162-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   162.3 @@ -0,0 +1,1 @@
   162.4 +../3.3.1/pr11162-1-test.patch
   162.5 \ No newline at end of file
   163.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   163.2 +++ b/patches/gcc/3.3.2/pr11587-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   163.3 @@ -0,0 +1,1 @@
   163.4 +../3.3.1/pr11587-1-test.patch
   163.5 \ No newline at end of file
   164.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   164.2 +++ b/patches/gcc/3.3.2/pr11608-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   164.3 @@ -0,0 +1,31 @@
   164.4 +pr11608
   164.5 +
   164.6 +------------
   164.7 +I'm building and testing an x86->sh4 crosscompiler with http://kegel.com/crosstool
   164.8 +With either gcc-3.3 or gcc-ss-3_3-20030714 I get:
   164.9 +
  164.10 +Testing debug/20020327-1.c, -gstabs1
  164.11 +...
  164.12 +FAIL: gcc.dg/debug/20020327-1.c (test for excess errors)
  164.13 +Excess errors:
  164.14 +/tmp/cc8dFF7Y.s: Assembler messages:
  164.15 +/tmp/cc8dFF7Y.s:66: Error: symbol `Letext' is already defined
  164.16 +
  164.17 +------------
  164.18 +
  164.19 +Index: elf.h
  164.20 +===================================================================
  164.21 +RCS file: /cvs/gcc/gcc/gcc/config/sh/elf.h,v
  164.22 +retrieving revision 1.32
  164.23 +diff -u -p -r1.32 elf.h
  164.24 +--- gcc-orig/gcc/config/sh/elf.h	27 Sep 2003 04:48:28 -0000	1.32
  164.25 ++++ gcc-new/gcc/config/sh/elf.h	2 Jan 2004 07:23:23 -0000
  164.26 +@@ -95,7 +95,7 @@ while (0)
  164.27 + #define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME)			\
  164.28 + do {									\
  164.29 +   text_section ();							\
  164.30 +-  fprintf ((FILE), "\t.stabs \"\",%d,0,0,Letext\nLetext:\n", N_SO);	\
  164.31 ++  asm_fprintf ((FILE), "\t.stabs \"\",%d,0,0,%LLetext\n%LLetext:\n", N_SO); \
  164.32 + } while (0)
  164.33 + 
  164.34 + #undef STARTFILE_SPEC
   165.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   165.2 +++ b/patches/gcc/3.3.2/pr11736-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   165.3 @@ -0,0 +1,1 @@
   165.4 +../3.3.1/pr11736-1-test.patch
   165.5 \ No newline at end of file
   166.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   166.2 +++ b/patches/gcc/3.3.2/pr11864-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   166.3 @@ -0,0 +1,1 @@
   166.4 +../3.3.1/pr11864-1-test.patch
   166.5 \ No newline at end of file
   167.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   167.2 +++ b/patches/gcc/3.3.2/pr13260-test.patch	Sat Feb 24 11:00:05 2007 +0000
   167.3 @@ -0,0 +1,56 @@
   167.4 +See http://gcc.gnu.org/PR13260
   167.5 +
   167.6 +/cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/20031204-1.c,v  -->  standard output
   167.7 +revision 1.1
   167.8 +--- -	1970-01-01 00:00:00.000000000 +0000
   167.9 ++++ gcc/gcc/testsuite/gcc.c-torture/execute/20031204-1.c
  167.10 +@@ -0,0 +1,49 @@
  167.11 ++/* PR optimization/13260 */
  167.12 ++
  167.13 ++#include <string.h>
  167.14 ++
  167.15 ++typedef unsigned long u32;
  167.16 ++
  167.17 ++u32 in_aton(const char* x)
  167.18 ++{
  167.19 ++  return 0x0a0b0c0d;
  167.20 ++}
  167.21 ++
  167.22 ++u32 root_nfs_parse_addr(char *name)
  167.23 ++{
  167.24 ++ u32 addr;
  167.25 ++ int octets = 0;
  167.26 ++ char *cp, *cq;
  167.27 ++
  167.28 ++ cp = cq = name;
  167.29 ++ while (octets < 4) {
  167.30 ++  while (*cp >= '0' && *cp <= '9')
  167.31 ++   cp++;
  167.32 ++  if (cp == cq || cp - cq > 3)
  167.33 ++   break;
  167.34 ++  if (*cp == '.' || octets == 3)
  167.35 ++   octets++;
  167.36 ++  if (octets < 4)
  167.37 ++   cp++;
  167.38 ++  cq = cp;
  167.39 ++ }
  167.40 ++
  167.41 ++ if (octets == 4 && (*cp == ':' || *cp == '\0')) {
  167.42 ++  if (*cp == ':')
  167.43 ++   *cp++ = '\0';
  167.44 ++  addr = in_aton(name);
  167.45 ++  strcpy(name, cp);
  167.46 ++ } else
  167.47 ++  addr = (-1);
  167.48 ++
  167.49 ++ return addr;
  167.50 ++}
  167.51 ++
  167.52 ++int
  167.53 ++main()
  167.54 ++{
  167.55 ++  static char addr[] = "10.11.12.13:/hello";
  167.56 ++  u32 result = root_nfs_parse_addr(addr);
  167.57 ++  if (result != 0x0a0b0c0d) { abort(); }
  167.58 ++  return 0;
  167.59 ++}
   168.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   168.2 +++ b/patches/gcc/3.3.2/pr9365-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   168.3 @@ -0,0 +1,1 @@
   168.4 +../3.3.1/pr9365-1-test.patch
   168.5 \ No newline at end of file
   169.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   169.2 +++ b/patches/gcc/3.3.2/sh-lib1funcs_sizeAndType.patch	Sat Feb 24 11:00:05 2007 +0000
   169.3 @@ -0,0 +1,610 @@
   169.4 +Fixes the problem
   169.5 +	[ libdemo.so and main.o both use assignment on structures ]
   169.6 +	$ sh4-unknown-linux-gnu-gcc libdemo.so main.o
   169.7 +	sh4-unknown-linux-gnu/bin/ld: warning: type and size of dynamic symbol `__movstr_i4_even' are not defined
   169.8 +	[ resulting app links, but crashes at runtime ]
   169.9 +See testcase at http://tsukuba.m17n.org/linux-sh/ml/linux-sh/2003-11/msg00016.html
  169.10 +
  169.11 +Patch was posted as http://gcc.gnu.org/ml/gcc-patches/2002-11/msg01641.html
  169.12 +and is in cvs as http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sh/lib1funcs.asm.diff?r1=1.29.4.1&r2=1.29.4.2
  169.13 +
  169.14 +but see also sh-libgcc-hidden.patch
  169.15 +
  169.16 +===================================================================
  169.17 +
  169.18 +--- gcc/gcc/config/sh/lib1funcs.asm	2002/09/20 01:29:21	1.29.4.1
  169.19 ++++ gcc/gcc/config/sh/lib1funcs.asm	2003/11/18 12:27:31
  169.20 +@@ -38,9 +38,14 @@
  169.21 +    amylaar@cygnus.com  */
  169.22 + 
  169.23 + #ifdef __ELF__
  169.24 +-#define LOCAL(X) .L_##X
  169.25 +-#else
  169.26 +-#define LOCAL(X) L_##X
  169.27 ++#define LOCAL(X)	.L_##X
  169.28 ++#define FUNC(X)		.type X,@function
  169.29 ++#define ENDFUNC0(X)	.Lfe_##X: .size X,.Lfe_##X-X
  169.30 ++#define ENDFUNC(X)	ENDFUNC0(X)
  169.31 ++#else
  169.32 ++#define LOCAL(X)	L_##X
  169.33 ++#define FUNC(X)
  169.34 ++#define ENDFUNC(X)
  169.35 + #endif
  169.36 + 
  169.37 + #define	CONCAT(A,B)	A##B
  169.38 +@@ -87,6 +92,40 @@
  169.39 + 	.global	GLOBAL(ashiftrt_r4_31)
  169.40 + 	.global	GLOBAL(ashiftrt_r4_32)
  169.41 + 
  169.42 ++	FUNC(GLOBAL(ashiftrt_r4_0))
  169.43 ++	FUNC(GLOBAL(ashiftrt_r4_1))
  169.44 ++	FUNC(GLOBAL(ashiftrt_r4_2))
  169.45 ++	FUNC(GLOBAL(ashiftrt_r4_3))
  169.46 ++	FUNC(GLOBAL(ashiftrt_r4_4))
  169.47 ++	FUNC(GLOBAL(ashiftrt_r4_5))
  169.48 ++	FUNC(GLOBAL(ashiftrt_r4_6))
  169.49 ++	FUNC(GLOBAL(ashiftrt_r4_7))
  169.50 ++	FUNC(GLOBAL(ashiftrt_r4_8))
  169.51 ++	FUNC(GLOBAL(ashiftrt_r4_9))
  169.52 ++	FUNC(GLOBAL(ashiftrt_r4_10))
  169.53 ++	FUNC(GLOBAL(ashiftrt_r4_11))
  169.54 ++	FUNC(GLOBAL(ashiftrt_r4_12))
  169.55 ++	FUNC(GLOBAL(ashiftrt_r4_13))
  169.56 ++	FUNC(GLOBAL(ashiftrt_r4_14))
  169.57 ++	FUNC(GLOBAL(ashiftrt_r4_15))
  169.58 ++	FUNC(GLOBAL(ashiftrt_r4_16))
  169.59 ++	FUNC(GLOBAL(ashiftrt_r4_17))
  169.60 ++	FUNC(GLOBAL(ashiftrt_r4_18))
  169.61 ++	FUNC(GLOBAL(ashiftrt_r4_19))
  169.62 ++	FUNC(GLOBAL(ashiftrt_r4_20))
  169.63 ++	FUNC(GLOBAL(ashiftrt_r4_21))
  169.64 ++	FUNC(GLOBAL(ashiftrt_r4_22))
  169.65 ++	FUNC(GLOBAL(ashiftrt_r4_23))
  169.66 ++	FUNC(GLOBAL(ashiftrt_r4_24))
  169.67 ++	FUNC(GLOBAL(ashiftrt_r4_25))
  169.68 ++	FUNC(GLOBAL(ashiftrt_r4_26))
  169.69 ++	FUNC(GLOBAL(ashiftrt_r4_27))
  169.70 ++	FUNC(GLOBAL(ashiftrt_r4_28))
  169.71 ++	FUNC(GLOBAL(ashiftrt_r4_29))
  169.72 ++	FUNC(GLOBAL(ashiftrt_r4_30))
  169.73 ++	FUNC(GLOBAL(ashiftrt_r4_31))
  169.74 ++	FUNC(GLOBAL(ashiftrt_r4_32))
  169.75 ++
  169.76 + 	.align	1
  169.77 + GLOBAL(ashiftrt_r4_32):
  169.78 + GLOBAL(ashiftrt_r4_31):
  169.79 +@@ -166,6 +205,40 @@
  169.80 + GLOBAL(ashiftrt_r4_0):
  169.81 + 	rts
  169.82 + 	nop
  169.83 ++
  169.84 ++	ENDFUNC(GLOBAL(ashiftrt_r4_0))
  169.85 ++	ENDFUNC(GLOBAL(ashiftrt_r4_1))
  169.86 ++	ENDFUNC(GLOBAL(ashiftrt_r4_2))
  169.87 ++	ENDFUNC(GLOBAL(ashiftrt_r4_3))
  169.88 ++	ENDFUNC(GLOBAL(ashiftrt_r4_4))
  169.89 ++	ENDFUNC(GLOBAL(ashiftrt_r4_5))
  169.90 ++	ENDFUNC(GLOBAL(ashiftrt_r4_6))
  169.91 ++	ENDFUNC(GLOBAL(ashiftrt_r4_7))
  169.92 ++	ENDFUNC(GLOBAL(ashiftrt_r4_8))
  169.93 ++	ENDFUNC(GLOBAL(ashiftrt_r4_9))
  169.94 ++	ENDFUNC(GLOBAL(ashiftrt_r4_10))
  169.95 ++	ENDFUNC(GLOBAL(ashiftrt_r4_11))
  169.96 ++	ENDFUNC(GLOBAL(ashiftrt_r4_12))
  169.97 ++	ENDFUNC(GLOBAL(ashiftrt_r4_13))
  169.98 ++	ENDFUNC(GLOBAL(ashiftrt_r4_14))
  169.99 ++	ENDFUNC(GLOBAL(ashiftrt_r4_15))
 169.100 ++	ENDFUNC(GLOBAL(ashiftrt_r4_16))
 169.101 ++	ENDFUNC(GLOBAL(ashiftrt_r4_17))
 169.102 ++	ENDFUNC(GLOBAL(ashiftrt_r4_18))
 169.103 ++	ENDFUNC(GLOBAL(ashiftrt_r4_19))
 169.104 ++	ENDFUNC(GLOBAL(ashiftrt_r4_20))
 169.105 ++	ENDFUNC(GLOBAL(ashiftrt_r4_21))
 169.106 ++	ENDFUNC(GLOBAL(ashiftrt_r4_22))
 169.107 ++	ENDFUNC(GLOBAL(ashiftrt_r4_23))
 169.108 ++	ENDFUNC(GLOBAL(ashiftrt_r4_24))
 169.109 ++	ENDFUNC(GLOBAL(ashiftrt_r4_25))
 169.110 ++	ENDFUNC(GLOBAL(ashiftrt_r4_26))
 169.111 ++	ENDFUNC(GLOBAL(ashiftrt_r4_27))
 169.112 ++	ENDFUNC(GLOBAL(ashiftrt_r4_28))
 169.113 ++	ENDFUNC(GLOBAL(ashiftrt_r4_29))
 169.114 ++	ENDFUNC(GLOBAL(ashiftrt_r4_30))
 169.115 ++	ENDFUNC(GLOBAL(ashiftrt_r4_31))
 169.116 ++	ENDFUNC(GLOBAL(ashiftrt_r4_32))
 169.117 + #endif
 169.118 + 
 169.119 + #ifdef L_ashiftrt_n
 169.120 +@@ -188,6 +261,7 @@
 169.121 + !
 169.122 + 
 169.123 + 	.global	GLOBAL(ashrsi3)
 169.124 ++	FUNC(GLOBAL(ashrsi3))
 169.125 + 	.align	2
 169.126 + GLOBAL(ashrsi3):
 169.127 + 	mov	#31,r0
 169.128 +@@ -315,6 +389,7 @@
 169.129 + 	rts
 169.130 + 	nop
 169.131 + 
 169.132 ++	ENDFUNC(GLOBAL(ashrsi3))
 169.133 + #endif
 169.134 + 
 169.135 + #ifdef L_ashiftlt
 169.136 +@@ -336,6 +411,7 @@
 169.137 + ! (none)
 169.138 + !
 169.139 + 	.global	GLOBAL(ashlsi3)
 169.140 ++	FUNC(GLOBAL(ashlsi3))
 169.141 + 	.align	2
 169.142 + GLOBAL(ashlsi3):
 169.143 + 	mov	#31,r0
 169.144 +@@ -472,6 +548,7 @@
 169.145 + 	rts
 169.146 + 	nop
 169.147 + 
 169.148 ++	ENDFUNC(GLOBAL(ashlsi3))
 169.149 + #endif
 169.150 + 
 169.151 + #ifdef L_lshiftrt
 169.152 +@@ -493,6 +570,7 @@
 169.153 + ! (none)
 169.154 + !
 169.155 + 	.global	GLOBAL(lshrsi3)
 169.156 ++	FUNC(GLOBAL(lshrsi3))
 169.157 + 	.align	2
 169.158 + GLOBAL(lshrsi3):
 169.159 + 	mov	#31,r0
 169.160 +@@ -629,6 +707,7 @@
 169.161 + 	rts
 169.162 + 	nop
 169.163 + 
 169.164 ++	ENDFUNC(GLOBAL(lshrsi3))
 169.165 + #endif
 169.166 + 
 169.167 + #ifdef L_movstr
 169.168 +@@ -645,76 +724,113 @@
 169.169 + 	add	#64,r4
 169.170 + 	.align	4
 169.171 + 	.global	GLOBAL(movstrSI64)
 169.172 ++	FUNC(GLOBAL(movstrSI64))
 169.173 + GLOBAL(movstrSI64):
 169.174 + 	mov.l	@(60,r5),r0
 169.175 + 	mov.l	r0,@(60,r4)
 169.176 + 	.global	GLOBAL(movstrSI60)
 169.177 ++	FUNC(GLOBAL(movstrSI60))
 169.178 + GLOBAL(movstrSI60):
 169.179 + 	mov.l	@(56,r5),r0
 169.180 + 	mov.l	r0,@(56,r4)
 169.181 + 	.global	GLOBAL(movstrSI56)
 169.182 ++	FUNC(GLOBAL(movstrSI56))
 169.183 + GLOBAL(movstrSI56):
 169.184 + 	mov.l	@(52,r5),r0
 169.185 + 	mov.l	r0,@(52,r4)
 169.186 + 	.global	GLOBAL(movstrSI52)
 169.187 ++	FUNC(GLOBAL(movstrSI52))
 169.188 + GLOBAL(movstrSI52):
 169.189 + 	mov.l	@(48,r5),r0
 169.190 + 	mov.l	r0,@(48,r4)
 169.191 + 	.global	GLOBAL(movstrSI48)
 169.192 ++	FUNC(GLOBAL(movstrSI48))
 169.193 + GLOBAL(movstrSI48):
 169.194 + 	mov.l	@(44,r5),r0
 169.195 + 	mov.l	r0,@(44,r4)
 169.196 + 	.global	GLOBAL(movstrSI44)
 169.197 ++	FUNC(GLOBAL(movstrSI44))
 169.198 + GLOBAL(movstrSI44):
 169.199 + 	mov.l	@(40,r5),r0
 169.200 + 	mov.l	r0,@(40,r4)
 169.201 + 	.global	GLOBAL(movstrSI40)
 169.202 ++	FUNC(GLOBAL(movstrSI40))
 169.203 + GLOBAL(movstrSI40):
 169.204 + 	mov.l	@(36,r5),r0
 169.205 + 	mov.l	r0,@(36,r4)
 169.206 + 	.global	GLOBAL(movstrSI36)
 169.207 ++	FUNC(GLOBAL(movstrSI36))
 169.208 + GLOBAL(movstrSI36):
 169.209 + 	mov.l	@(32,r5),r0
 169.210 + 	mov.l	r0,@(32,r4)
 169.211 + 	.global	GLOBAL(movstrSI32)
 169.212 ++	FUNC(GLOBAL(movstrSI32))
 169.213 + GLOBAL(movstrSI32):
 169.214 + 	mov.l	@(28,r5),r0
 169.215 + 	mov.l	r0,@(28,r4)
 169.216 + 	.global	GLOBAL(movstrSI28)
 169.217 ++	FUNC(GLOBAL(movstrSI28))
 169.218 + GLOBAL(movstrSI28):
 169.219 + 	mov.l	@(24,r5),r0
 169.220 + 	mov.l	r0,@(24,r4)
 169.221 + 	.global	GLOBAL(movstrSI24)
 169.222 ++	FUNC(GLOBAL(movstrSI24))
 169.223 + GLOBAL(movstrSI24):
 169.224 + 	mov.l	@(20,r5),r0
 169.225 + 	mov.l	r0,@(20,r4)
 169.226 + 	.global	GLOBAL(movstrSI20)
 169.227 ++	FUNC(GLOBAL(movstrSI20))
 169.228 + GLOBAL(movstrSI20):
 169.229 + 	mov.l	@(16,r5),r0
 169.230 + 	mov.l	r0,@(16,r4)
 169.231 + 	.global	GLOBAL(movstrSI16)
 169.232 ++	FUNC(GLOBAL(movstrSI16))
 169.233 + GLOBAL(movstrSI16):
 169.234 + 	mov.l	@(12,r5),r0
 169.235 + 	mov.l	r0,@(12,r4)
 169.236 + 	.global	GLOBAL(movstrSI12)
 169.237 ++	FUNC(GLOBAL(movstrSI12))
 169.238 + GLOBAL(movstrSI12):
 169.239 + 	mov.l	@(8,r5),r0
 169.240 + 	mov.l	r0,@(8,r4)
 169.241 + 	.global	GLOBAL(movstrSI8)
 169.242 ++	FUNC(GLOBAL(movstrSI8))
 169.243 + GLOBAL(movstrSI8):
 169.244 + 	mov.l	@(4,r5),r0
 169.245 + 	mov.l	r0,@(4,r4)
 169.246 + 	.global	GLOBAL(movstrSI4)
 169.247 ++	FUNC(GLOBAL(movstrSI4))
 169.248 + GLOBAL(movstrSI4):
 169.249 + 	mov.l	@(0,r5),r0
 169.250 + 	mov.l	r0,@(0,r4)
 169.251 ++	.global	GLOBAL(movstrSI0)
 169.252 ++	FUNC(GLOBAL(movstrSI0))
 169.253 + GLOBAL(movstrSI0):
 169.254 + 	rts
 169.255 + 	nop
 169.256 + 
 169.257 ++	ENDFUNC(GLOBAL(movstrSI64))
 169.258 ++	ENDFUNC(GLOBAL(movstrSI60))
 169.259 ++	ENDFUNC(GLOBAL(movstrSI56))
 169.260 ++	ENDFUNC(GLOBAL(movstrSI52))
 169.261 ++	ENDFUNC(GLOBAL(movstrSI48))
 169.262 ++	ENDFUNC(GLOBAL(movstrSI44))
 169.263 ++	ENDFUNC(GLOBAL(movstrSI40))
 169.264 ++	ENDFUNC(GLOBAL(movstrSI36))
 169.265 ++	ENDFUNC(GLOBAL(movstrSI32))
 169.266 ++	ENDFUNC(GLOBAL(movstrSI28))
 169.267 ++	ENDFUNC(GLOBAL(movstrSI24))
 169.268 ++	ENDFUNC(GLOBAL(movstrSI20))
 169.269 ++	ENDFUNC(GLOBAL(movstrSI16))
 169.270 ++	ENDFUNC(GLOBAL(movstrSI12))
 169.271 ++	ENDFUNC(GLOBAL(movstrSI8))
 169.272 ++	ENDFUNC(GLOBAL(movstrSI4))
 169.273 ++	ENDFUNC(GLOBAL(movstrSI0))
 169.274 ++
 169.275 + 	.align	4
 169.276 + 
 169.277 + 	.global	GLOBAL(movstr)
 169.278 ++	FUNC(GLOBAL(movstr))
 169.279 + GLOBAL(movstr):
 169.280 + 	mov.l	@(60,r5),r0
 169.281 + 	mov.l	r0,@(60,r4)
 169.282 +@@ -771,6 +887,8 @@
 169.283 + 	add	#64,r5
 169.284 + 	bra	GLOBAL(movstr)
 169.285 + 	add	#64,r4
 169.286 ++
 169.287 ++	FUNC(GLOBAL(movstr))
 169.288 + #endif
 169.289 + 
 169.290 + #ifdef L_movstr_i4
 169.291 +@@ -779,6 +897,10 @@
 169.292 + 	.global	GLOBAL(movstr_i4_odd)
 169.293 + 	.global	GLOBAL(movstrSI12_i4)
 169.294 + 
 169.295 ++	FUNC(GLOBAL(movstr_i4_even))
 169.296 ++	FUNC(GLOBAL(movstr_i4_odd))
 169.297 ++	FUNC(GLOBAL(movstrSI12_i4))
 169.298 ++
 169.299 + 	.p2align	5
 169.300 + L_movstr_2mod4_end:
 169.301 + 	mov.l	r0,@(16,r4)
 169.302 +@@ -787,6 +909,11 @@
 169.303 + 
 169.304 + 	.p2align	2
 169.305 + 
 169.306 ++GLOBAL(movstr_i4_even):
 169.307 ++	mov.l	@r5+,r0
 169.308 ++	bra	L_movstr_start_even
 169.309 ++	mov.l	@r5+,r1
 169.310 ++
 169.311 + GLOBAL(movstr_i4_odd):
 169.312 + 	mov.l	@r5+,r1
 169.313 + 	add	#-4,r4
 169.314 +@@ -813,10 +940,8 @@
 169.315 + 	rts
 169.316 + 	mov.l	r3,@(12,r4)
 169.317 + 
 169.318 +-GLOBAL(movstr_i4_even):
 169.319 +-	mov.l	@r5+,r0
 169.320 +-	bra	L_movstr_start_even
 169.321 +-	mov.l	@r5+,r1
 169.322 ++	ENDFUNC(GLOBAL(movstr_i4_even))
 169.323 ++	ENDFUNC(GLOBAL(movstr_i4_odd))
 169.324 + 
 169.325 + 	.p2align	4
 169.326 + GLOBAL(movstrSI12_i4):
 169.327 +@@ -827,12 +952,15 @@
 169.328 + 	mov.l	r1,@(4,r4)
 169.329 + 	rts
 169.330 + 	mov.l	r2,@(8,r4)
 169.331 ++
 169.332 ++	ENDFUNC(GLOBAL(movstrSI12_i4))
 169.333 + #endif
 169.334 + 
 169.335 + #ifdef L_mulsi3
 169.336 + 
 169.337 + 
 169.338 + 	.global	GLOBAL(mulsi3)
 169.339 ++	FUNC(GLOBAL(mulsi3))
 169.340 + 
 169.341 + ! r4 =       aabb
 169.342 + ! r5 =       ccdd
 169.343 +@@ -865,7 +993,7 @@
 169.344 + 	rts
 169.345 + 	add	r2,r0
 169.346 + 
 169.347 +-
 169.348 ++	FUNC(GLOBAL(mulsi3))
 169.349 + #endif
 169.350 + #endif /* ! __SH5__ */
 169.351 + #ifdef L_sdivsi3_i4
 169.352 +@@ -875,6 +1003,7 @@
 169.353 + !! args in r4 and r5, result in fpul, clobber dr0, dr2
 169.354 + 
 169.355 + 	.global	GLOBAL(sdivsi3_i4)
 169.356 ++	FUNC(GLOBAL(sdivsi3_i4))
 169.357 + GLOBAL(sdivsi3_i4):
 169.358 + 	lds r4,fpul
 169.359 + 	float fpul,dr0
 169.360 +@@ -884,6 +1013,7 @@
 169.361 + 	rts
 169.362 + 	ftrc dr0,fpul
 169.363 + 
 169.364 ++	ENDFUNC(GLOBAL(sdivsi3_i4))
 169.365 + #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__)
 169.366 + !! args in r4 and r5, result in fpul, clobber r2, dr0, dr2
 169.367 + 
 169.368 +@@ -892,6 +1022,7 @@
 169.369 + 	.mode	SHcompact
 169.370 + #endif
 169.371 + 	.global	GLOBAL(sdivsi3_i4)
 169.372 ++	FUNC(GLOBAL(sdivsi3_i4))
 169.373 + GLOBAL(sdivsi3_i4):
 169.374 + 	sts.l fpscr,@-r15
 169.375 + 	mov #8,r2
 169.376 +@@ -906,6 +1037,7 @@
 169.377 + 	rts
 169.378 + 	lds.l @r15+,fpscr
 169.379 + 
 169.380 ++	ENDFUNC(GLOBAL(sdivsi3_i4))
 169.381 + #endif /* ! __SH5__ || __SH5__ == 32 */
 169.382 + #endif /* ! __SH4__ */
 169.383 + #endif
 169.384 +@@ -920,9 +1052,10 @@
 169.385 + !!
 169.386 + !!
 169.387 + 
 169.388 +-!! args in r4 and r5, result in r0 clobber r1,r2,r3
 169.389 ++!! args in r4 and r5, result in r0 clobber r1, r2, r3, and t bit
 169.390 + 
 169.391 + 	.global	GLOBAL(sdivsi3)
 169.392 ++	FUNC(GLOBAL(sdivsi3))
 169.393 + #if __SHMEDIA__
 169.394 + #if __SH5__ == 32
 169.395 + 	.section	.text..SHmedia32,"ax"
 169.396 +@@ -1166,6 +1299,7 @@
 169.397 + div0:	rts
 169.398 + 	mov	#0,r0
 169.399 + 
 169.400 ++	ENDFUNC(GLOBAL(sdivsi3))
 169.401 + #endif /* ! __SHMEDIA__ */
 169.402 + #endif /* ! __SH4__ */
 169.403 + #endif
 169.404 +@@ -1174,9 +1308,11 @@
 169.405 + 	.title "SH DIVIDE"
 169.406 + !! 4 byte integer Divide code for the Hitachi SH
 169.407 + #ifdef __SH4__
 169.408 +-!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
 169.409 ++!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4,
 169.410 ++!! and t bit
 169.411 + 
 169.412 + 	.global	GLOBAL(udivsi3_i4)
 169.413 ++	FUNC(GLOBAL(udivsi3_i4))
 169.414 + GLOBAL(udivsi3_i4):
 169.415 + 	mov #1,r1
 169.416 + 	cmp/hi r1,r5
 169.417 +@@ -1217,11 +1353,13 @@
 169.418 + L1:
 169.419 + 	.double 2147483648
 169.420 + 
 169.421 ++	ENDFUNC(GLOBAL(udivsi3_i4))
 169.422 + #elif defined (__SH5__) && ! defined (__SH4_NOFPU__)
 169.423 + #if ! __SH5__ || __SH5__ == 32
 169.424 + !! args in r4 and r5, result in fpul, clobber r20, r21, dr0, fr33
 169.425 + 	.mode	SHmedia
 169.426 + 	.global	GLOBAL(udivsi3_i4)
 169.427 ++	FUNC(GLOBAL(udivsi3_i4))
 169.428 + GLOBAL(udivsi3_i4):
 169.429 + 	addz.l	r4,r63,r20
 169.430 + 	addz.l	r5,r63,r21
 169.431 +@@ -1234,6 +1372,8 @@
 169.432 + 	ftrc.dq dr0,dr32
 169.433 + 	fmov.s fr33,fr32
 169.434 + 	blink tr0,r63
 169.435 ++
 169.436 ++	ENDFUNC(GLOBAL(udivsi3_i4))
 169.437 + #endif /* ! __SH5__ || __SH5__ == 32 */
 169.438 + #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__)
 169.439 + !! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
 169.440 +@@ -1287,6 +1427,7 @@
 169.441 + #endif
 169.442 + 	.double 2147483648
 169.443 + 
 169.444 ++	ENDFUNC(GLOBAL(udivsi3_i4))
 169.445 + #endif /* ! __SH4__ */
 169.446 + #endif
 169.447 + 
 169.448 +@@ -1297,6 +1438,7 @@
 169.449 + 
 169.450 + !! args in r4 and r5, result in r0, clobbers r4, pr, and t bit
 169.451 + 	.global	GLOBAL(udivsi3)
 169.452 ++	FUNC(GLOBAL(udivsi3))
 169.453 + 
 169.454 + #if __SHMEDIA__
 169.455 + #if __SH5__ == 32
 169.456 +@@ -1485,6 +1627,7 @@
 169.457 +  rts
 169.458 +  rotcl r0
 169.459 + 
 169.460 ++	ENDFUNC(GLOBAL(udivsi3))
 169.461 + #endif /* ! __SHMEDIA__ */
 169.462 + #endif /* __SH4__ */
 169.463 + #endif /* L_udivsi3 */
 169.464 +@@ -1790,6 +1933,7 @@
 169.465 + 	.mode	SHcompact
 169.466 + #endif
 169.467 + 	.global GLOBAL(set_fpscr)
 169.468 ++	FUNC(GLOBAL(set_fpscr))
 169.469 + GLOBAL(set_fpscr):
 169.470 + 	lds r4,fpscr
 169.471 + 	mov.l LOCAL(set_fpscr_L1),r1
 169.472 +@@ -1822,6 +1966,8 @@
 169.473 + 	.align 2
 169.474 + LOCAL(set_fpscr_L1):
 169.475 + 	.long GLOBAL(fpscr_values)
 169.476 ++
 169.477 ++	ENDFUNC(GLOBAL(set_fpscr))
 169.478 + #ifdef __ELF__
 169.479 +         .comm   GLOBAL(fpscr_values),8,4
 169.480 + #else
 169.481 +@@ -1860,6 +2006,7 @@
 169.482 + 	blink	tr0, r63
 169.483 + #elif defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
 169.484 + 	.global GLOBAL(ic_invalidate)
 169.485 ++	FUNC(GLOBAL(ic_invalidate))
 169.486 + GLOBAL(ic_invalidate):
 169.487 + 	ocbwb	@r4
 169.488 + 	mova	0f,r0
 169.489 +@@ -1882,6 +2029,8 @@
 169.490 + 	nop
 169.491 + 	.endr
 169.492 + 	.endr
 169.493 ++
 169.494 ++	ENDFUNC(GLOBAL(ic_invalidate))
 169.495 + #endif /* SH4 */
 169.496 + #endif /* L_ic_invalidate */
 169.497 + 
 169.498 +@@ -1940,6 +2089,7 @@
 169.499 + 	will be expanded into r2/r3 upon return.  */
 169.500 + 	
 169.501 + 	.global	GLOBAL(GCC_shcompact_call_trampoline)
 169.502 ++	FUNC(GLOBAL(GCC_shcompact_call_trampoline))
 169.503 + GLOBAL(GCC_shcompact_call_trampoline):
 169.504 + 	ptabs/l	r0, tr0	/* Prepare to call the actual function.  */
 169.505 + 	movi	((datalabel LOCAL(ct_main_table) - 31 * 2) >> 16) & 65535, r0
 169.506 +@@ -2290,6 +2440,8 @@
 169.507 + 	shari	r2, 32, r2
 169.508 + #endif
 169.509 + 	blink	tr0, r63
 169.510 ++
 169.511 ++	ENDFUNC(GLOBAL(GCC_shcompact_call_trampoline))
 169.512 + #endif /* L_shcompact_call_trampoline */
 169.513 + 
 169.514 + #ifdef L_shcompact_return_trampoline
 169.515 +@@ -2302,6 +2454,7 @@
 169.516 + 	.section	.text..SHmedia32, "ax"
 169.517 + 	.align	2
 169.518 + 	.global	GLOBAL(GCC_shcompact_return_trampoline)
 169.519 ++	FUNC(GLOBAL(GCC_shcompact_return_trampoline))
 169.520 + GLOBAL(GCC_shcompact_return_trampoline):
 169.521 + 	ptabs/l	r18, tr0
 169.522 + #if __LITTLE_ENDIAN__
 169.523 +@@ -2313,6 +2466,8 @@
 169.524 + #endif
 169.525 + 	or	r3, r2, r2
 169.526 + 	blink	tr0, r63
 169.527 ++
 169.528 ++	ENDFUNC(GLOBAL(GCC_shcompact_return_trampoline))
 169.529 + #endif /* L_shcompact_return_trampoline */
 169.530 + 
 169.531 + #ifdef L_shcompact_incoming_args
 169.532 +@@ -2367,6 +2522,7 @@
 169.533 + 	actual bit pattern.  */
 169.534 + 	
 169.535 + 	.global	GLOBAL(GCC_shcompact_incoming_args)
 169.536 ++	FUNC(GLOBAL(GCC_shcompact_incoming_args))
 169.537 + GLOBAL(GCC_shcompact_incoming_args):
 169.538 + 	ptabs/l	r18, tr0	/* Prepare to return.  */
 169.539 + 	shlri	r17, 32, r0	/* Load the cookie.  */
 169.540 +@@ -2519,6 +2675,7 @@
 169.541 + LOCAL(ia_return):	/* Return.  */
 169.542 + 	blink	tr0, r63
 169.543 + LOCAL(ia_end_of_push_seq): /* Label used to compute the first push instruction.  */
 169.544 ++	ENDFUNC(GLOBAL(GCC_shcompact_incoming_args))
 169.545 + #endif /* L_shcompact_incoming_args */
 169.546 + #endif
 169.547 + #if __SH5__
 169.548 +@@ -2530,6 +2687,7 @@
 169.549 + #endif
 169.550 + 	.align	3 /* It is copied in units of 8 bytes in SHmedia mode.  */
 169.551 + 	.global	GLOBAL(GCC_nested_trampoline)
 169.552 ++	FUNC(GLOBAL(GCC_nested_trampoline))
 169.553 + GLOBAL(GCC_nested_trampoline):
 169.554 + 	.mode	SHmedia
 169.555 + 	ptrel/u	r63, tr0
 169.556 +@@ -2546,6 +2704,8 @@
 169.557 + 	ld.l	r0, 28, r1
 169.558 + #endif
 169.559 + 	blink	tr1, r63
 169.560 ++
 169.561 ++	ENDFUNC(GLOBAL(GCC_nested_trampoline))
 169.562 + #endif /* L_nested_trampoline */
 169.563 + #endif /* __SH5__ */
 169.564 + #if __SH5__ == 32
 169.565 +@@ -2555,6 +2715,7 @@
 169.566 + 	.align	2
 169.567 + #ifndef __SH4_NOFPU__	
 169.568 + 	.global	GLOBAL(GCC_push_shmedia_regs)
 169.569 ++	FUNC(GLOBAL(GCC_push_shmedia_regs))
 169.570 + GLOBAL(GCC_push_shmedia_regs):
 169.571 + 	addi.l	r15, -14*8, r15
 169.572 + 	fst.d	r15, 13*8, dr62
 169.573 +@@ -2573,6 +2734,7 @@
 169.574 + 	fst.d	r15,  0*8, dr36
 169.575 + #endif
 169.576 + 	.global	GLOBAL(GCC_push_shmedia_regs_nofpu)
 169.577 ++	FUNC(GLOBAL(GCC_push_shmedia_regs_nofpu))
 169.578 + GLOBAL(GCC_push_shmedia_regs_nofpu):
 169.579 + 	ptabs/l	r18, tr0
 169.580 + 	addi.l	r15, -27*8, r15
 169.581 +@@ -2608,8 +2770,13 @@
 169.582 + 	st.q	r15,  0*8, r28
 169.583 + 	blink	tr0, r63
 169.584 + 
 169.585 ++#ifndef __SH4_NOFPU__	
 169.586 ++	ENDFUNC(GLOBAL(GCC_push_shmedia_regs))
 169.587 ++#endif
 169.588 ++	ENDFUNC(GLOBAL(GCC_push_shmedia_regs_nofpu))
 169.589 + #ifndef __SH4_NOFPU__
 169.590 + 	.global	GLOBAL(GCC_pop_shmedia_regs)
 169.591 ++	FUNC(GLOBAL(GCC_pop_shmedia_regs))
 169.592 + GLOBAL(GCC_pop_shmedia_regs):
 169.593 + 	pt	.L0, tr1
 169.594 + 	movi	41*8, r0
 169.595 +@@ -2630,6 +2797,7 @@
 169.596 + 	blink	tr1, r63
 169.597 + #endif
 169.598 + 	.global	GLOBAL(GCC_pop_shmedia_regs_nofpu)
 169.599 ++	FUNC(GLOBAL(GCC_pop_shmedia_regs_nofpu))
 169.600 + GLOBAL(GCC_pop_shmedia_regs_nofpu):
 169.601 + 	movi	27*8, r0
 169.602 + .L0:
 169.603 +@@ -2666,5 +2834,10 @@
 169.604 + 	ld.q	r15,  0*8, r28
 169.605 + 	add.l	r15, r0, r15
 169.606 + 	blink	tr0, r63
 169.607 ++
 169.608 ++#ifndef __SH4_NOFPU__
 169.609 ++	ENDFUNC(GLOBAL(GCC_pop_shmedia_regs))
 169.610 ++#endif
 169.611 ++	ENDFUNC(GLOBAL(GCC_pop_shmedia_regs_nofpu))
 169.612 + #endif /* __SH5__ == 32 */
 169.613 + #endif /* L_push_pop_shmedia_regs */
   170.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   170.2 +++ b/patches/gcc/3.3.2/sh-libgcc-hidden.patch	Sat Feb 24 11:00:05 2007 +0000
   170.3 @@ -0,0 +1,122 @@
   170.4 +[adjusted very slightly to apply to gcc-3.3.2 - dank]
   170.5 +
   170.6 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
   170.7 +
   170.8 +I've noticed one more problem about this issue.  In the testcase given
   170.9 +by ZhouChang, libdemo.so exports __movstr_i4_even which is a function
  170.10 +in libgcc.a. This itself is not a problem but it means that some functions
  170.11 +in libgcc.a which should not be exported from shared objects might be
  170.12 +exported from shared libs
  170.13 +
  170.14 +Date: Wed, 19 Nov 2003 09:04:12 +0900 (JST)
  170.15 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
  170.16 +Subject: [linux-sh:03096] Re: [linux]  Re: About tool chain in
  170.17 + http://kegel.com/crosstool/
  170.18 +To: dank@kegel.com
  170.19 +Cc: zjuzhou@yahoo.com.cn, linux-sh@m17n.org, zhan_sh@yahoo.com.cn,
  170.20 +	crossgcc@sources.redhat.com
  170.21 +Message-Id: <20031119.090412.85413542.kkojima@rr.iij4u.or.jp>
  170.22 +
  170.23 +Hi,
  170.24 +
  170.25 +Dan Kegel <dank@kegel.com> wrote:
  170.26 +> I'll try that, thanks.  I notice that the '.hidden' isn't in cvs yet.
  170.27 +> I also notice you've been trying to get that into CVS for two years
  170.28 +> now (http://gcc.gnu.org/ml/gcc-patches/2001-10/msg00053.html).
  170.29 +> Time for another try?  It'd be nice if gcc-3.4 (and maybe even gcc-3.3.3)
  170.30 +> didn't need a patch for this.
  170.31 +
  170.32 +The situation is a bit complicated. sh-linux target doesn't make
  170.33 +shared libgcc in gcc-3.3.x.
  170.34 +OTOH, I withdrew that .hidden patch because gcc-3.3 has a general
  170.35 +mechanism to make all libgcc functions .hidden. But I missed that
  170.36 +that mechanism was conditionalized later so that it's done only
  170.37 +when the target creates the shared libgcc.
  170.38 +In 3.4, sh-linux target becomes to use the shared libgcc like as
  170.39 +all other linux targets, so there is no problem.
  170.40 +
  170.41 +I inclined to backport 3.4 shared libgcc stuff to 3.3.3 rather
  170.42 +than the old .hidden patch. How do you think about it?
  170.43 +I'm happy if you or ZhouChang create a PR on gcc bugzilla about
  170.44 +this issue.
  170.45 +
  170.46 +Regards,
  170.47 +	kaz
  170.48 +--
  170.49 +	This is a backport of 3.4 shared libgcc stuff to 3.3 branch.
  170.50 +	* config.gcc (sh*-*-linux*): Add t-slibgcc-elf-ver and t-linux.
  170.51 +        to tmake_file.	* config/sh/libgcc-glibc.ver: New file.
  170.52 +	* config/sh/t-linux (SHLIB_LINK): Override to use a linker script
  170.53 +	libgcc_s.so.
  170.54 +	(SHLIB_INSTALL): Likewise.
  170.55 +
  170.56 +diff -u3prN ORIG/gcc-3.3/gcc/config/sh/libgcc-glibc.ver gcc-3.3/gcc/config/sh/libgcc-glibc.ver
  170.57 +--- ORIG/gcc-3.3/gcc/config/sh/libgcc-glibc.ver	Thu Jan  1 09:00:00 1970
  170.58 ++++ gcc-3.3/gcc/config/sh/libgcc-glibc.ver	Wed Nov 19 08:15:16 2003
  170.59 +@@ -0,0 +1,21 @@
  170.60 ++# In order to work around the very problems that force us to now generally
  170.61 ++# create a libgcc.so, glibc reexported a number of routines from libgcc.a.
  170.62 ++# By now choosing the same version tags for these specific routines, we
  170.63 ++# maintain enough binary compatibility to allow future versions of glibc
  170.64 ++# to defer implementation of these routines to libgcc.so via DT_AUXILIARY.
  170.65 ++
  170.66 ++# Note that we cannot use the default libgcc-glibc.ver file on sh,
  170.67 ++# because GLIBC_2.0 does not exist on this architecture, as the first 
  170.68 ++# ever glibc release on the platform was GLIBC_2.2.
  170.69 ++
  170.70 ++%inherit GCC_3.0 GLIBC_2.2
  170.71 ++GLIBC_2.2 {
  170.72 ++  __register_frame
  170.73 ++  __register_frame_table
  170.74 ++  __deregister_frame
  170.75 ++  __register_frame_info
  170.76 ++  __deregister_frame_info
  170.77 ++  __frame_state_for
  170.78 ++  __register_frame_info_table
  170.79 ++}
  170.80 ++
  170.81 +diff -u3prN ORIG/gcc-3.3/gcc/config/sh/t-linux gcc-3.3/gcc/config/sh/t-linux
  170.82 +--- ORIG/gcc-3.3/gcc/config/sh/t-linux	Fri Jun  6 11:07:14 2003
  170.83 ++++ gcc-3.3/gcc/config/sh/t-linux	Wed Nov 19 08:09:26 2003
  170.84 +@@ -12,3 +12,27 @@ MULTILIB_MATCHES = 
  170.85 + MULTILIB_EXCEPTIONS=
  170.86 + 
  170.87 + EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o
  170.88 ++
  170.89 ++# Override t-slibgcc-elf-ver to export some libgcc symbols with
  170.90 ++# the symbol versions that glibc used.
  170.91 ++SHLIB_MAPFILES =  $(srcdir)/libgcc-std.ver $(srcdir)/config/sh/libgcc-glibc.ver
  170.92 ++
  170.93 ++# Override SHLIB_LINK and SHLIB_INSTALL to use linker script
  170.94 ++# libgcc_s.so.
  170.95 ++SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
  170.96 ++	-Wl,--soname=$(SHLIB_SONAME) \
  170.97 ++	-Wl,--version-script=$(SHLIB_MAP) \
  170.98 ++	-o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \
  170.99 ++	rm -f $(SHLIB_SOLINK) && \
 170.100 ++	(echo "/* GNU ld script"; \
 170.101 ++	 echo "   Use the shared library, but some functions are only in"; \
 170.102 ++	 echo "   the static library.  */"; \
 170.103 ++	 echo "GROUP ( $(SHLIB_SONAME) libgcc.a )" \
 170.104 ++	) > $(SHLIB_SOLINK)
 170.105 ++SHLIB_INSTALL = \
 170.106 ++	$$(SHELL) $$(srcdir)/mkinstalldirs $$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
 170.107 ++	$(INSTALL_DATA) $(SHLIB_NAME) \
 170.108 ++	  $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
 170.109 ++	rm -f $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
 170.110 ++	$(INSTALL_DATA) $(SHLIB_SOLINK) \
 170.111 ++	  $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
 170.112 +diff -u3prN ORIG/gcc-3.3/gcc/config.gcc gcc-3.3/gcc/config.gcc
 170.113 +--- ORIG/gcc-3.3/gcc/config.gcc	Sat Aug  9 07:19:07 2003
 170.114 ++++ gcc-3.3/gcc/config.gcc	Wed Nov 19 08:07:53 2003
 170.115 +@@ -2308,7 +2308,7 @@ sh-*-rtems*)
 170.116 + 	fi
 170.117 + 	;;
 170.118 + sh-*-linux* | sh[2346lbe]*-*-linux*)
 170.119 +-	tmake_file="sh/t-sh sh/t-elf"
 170.120 ++	tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux"
 170.121 + 	case $machine in
 170.122 + 	sh*be-*-* | sh*eb-*-*) ;;
 170.123 + 	*)
 170.124 +
 170.125 +
   171.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   171.2 +++ b/patches/gcc/3.3.2/sh-pic-set_fpscr-gcc-3.3.2.patch	Sat Feb 24 11:00:05 2007 +0000
   171.3 @@ -0,0 +1,67 @@
   171.4 +See http://gcc.gnu.org/PR11901
   171.5 +Should fix
   171.6 +make[2]: *** [/gcc-3.3-glibc-2.3.2/build-glibc/elf/check-textrel.out] Error 1 
   171.7 +in glibc's "make tests".
   171.8 +
   171.9 +Note: this patch is named
  171.10 +sh-pic-set_fpscr-gcc-3.3.2.patch
  171.11 +and must be applied after 
  171.12 +sh-lib1funcs_sizeAndType.patch
  171.13 +but that'll happen naturally if you apply them in alphabetical order.
  171.14 +
  171.15 +-------------
  171.16 +
  171.17 +Date: Wed, 30 Jul 2003 12:03:01 +0900
  171.18 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
  171.19 +Subject: [linux-sh:02916] Re: Writing PIC version of __udivsi3_i4? (was: Re: "make tests" fails
  171.20 + with "libc.so: text relocations used" in glibc-2.3.2 for sh4)
  171.21 +To: dank@kegel.com
  171.22 +Cc: linux-sh@m17n.org
  171.23 +Message-Id: <200307300255.h6U2tB906928@r-rr.iij4u.or.jp>
  171.24 +
  171.25 +> I'll try to write the PIC version of it,
  171.26 +
  171.27 +Dan, does the attached patch work for you?
  171.28 +
  171.29 +Regards,
  171.30 +	kaz
  171.31 +--
  171.32 +diff -u3prN ORIG/gcc/gcc/config/sh/lib1funcs.asm LOCAL/gcc/gcc/config/sh/lib1funcs.asm
  171.33 +--- ORIG/gcc/gcc/config/sh/lib1funcs.asm	Thu Jun 19 07:38:59 2003
  171.34 ++++ gcc-3.3.2/gcc/config/sh/lib1funcs.asm	Wed Jul 30 11:08:49 2003
  171.35 +@@ -1936,7 +1944,17 @@ GLOBAL(moddi3):
  171.36 + 	FUNC(GLOBAL(set_fpscr))
  171.37 + GLOBAL(set_fpscr):
  171.38 + 	lds r4,fpscr
  171.39 ++#ifdef __PIC__
  171.40 ++	mov.l	r12,@-r15
  171.41 ++	mova	LOCAL(set_fpscr_L0),r0
  171.42 ++	mov.l	LOCAL(set_fpscr_L0),r12
  171.43 ++	add	r0,r12
  171.44 ++	mov.l	LOCAL(set_fpscr_L1),r0
  171.45 ++	mov.l	@(r0,r12),r1
  171.46 ++	mov.l	@r15+,r12
  171.47 ++#else
  171.48 + 	mov.l LOCAL(set_fpscr_L1),r1
  171.49 ++#endif
  171.50 + 	swap.w r4,r0
  171.51 + 	or #24,r0
  171.52 + #ifndef FMOVD_WORKS
  171.53 +@@ -1964,8 +1982,15 @@ GLOBAL(set_fpscr):
  171.54 + 	mov.l r3,@(4,r1)
  171.55 + #endif
  171.56 + 	.align 2
  171.57 ++#ifdef __PIC__
  171.58 ++LOCAL(set_fpscr_L0):
  171.59 ++	.long _GLOBAL_OFFSET_TABLE_
  171.60 ++LOCAL(set_fpscr_L1):
  171.61 ++	.long GLOBAL(fpscr_values@GOT)
  171.62 ++#else
  171.63 + LOCAL(set_fpscr_L1):
  171.64 + 	.long GLOBAL(fpscr_values)
  171.65 ++#endif
  171.66 + 
  171.67 + 	ENDFUNC(GLOBAL(set_fpscr))
  171.68 + #ifndef NO_FPSCR_VALUES
  171.69 +
  171.70 +
   172.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   172.2 +++ b/patches/gcc/3.3.2/thunk3.patch	Sat Feb 24 11:00:05 2007 +0000
   172.3 @@ -0,0 +1,23 @@
   172.4 +Fixes 
   172.5 +FAIL: g++.jason/thunk3.C (test for excess errors)
   172.6 +on sh4-unknown-linux-gnu.
   172.7 +
   172.8 +Does any sh variant *not* use the generic thunk support?  If so, the patch should be
   172.9 +more cautious.  As it is, it excludes all sh processors from this test.
  172.10 +
  172.11 +Index: thunk3.C
  172.12 +===================================================================
  172.13 +RCS file: /cvsroot/gcc/gcc/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C,v
  172.14 +retrieving revision 1.13
  172.15 +diff -u -d -u -r1.13 thunk3.C
  172.16 +--- gcc-ss-3_3-20030714/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C.old	25 Mar 2002 17:57:03 -0000	1.13
  172.17 ++++ gcc-ss-3_3-20030714/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C	20 Jul 2003 16:57:38 -0000
  172.18 +@@ -2,7 +2,7 @@
  172.19 + // Note that this will break on any target that uses the generic thunk
  172.20 + //  support, because it doesn't support variadic functions.
  172.21 + 
  172.22 +-// excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3  mn10300-*-* mn10200-*-* v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa-*-*
  172.23 ++// excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3  mn10300-*-* mn10200-*-* v850-*-* sh*-*-* h8*-*-* xtensa-*-*
  172.24 + 
  172.25 + #include <stdarg.h>
  172.26 + 
   173.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   173.2 +++ b/patches/gcc/3.3.3/config.sub.patch	Sat Feb 24 11:00:05 2007 +0000
   173.3 @@ -0,0 +1,72 @@
   173.4 +When configuring a s390->s390 or cris->cris crosscompiler
   173.5 +(ok, I haven't hit this yet, but one of these days I'll get me an account
   173.6 +on an s390, and then I'll need this patch :-), you'll get the
   173.7 +following error:
   173.8 +
   173.9 ++ /build/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/gcc-3.3/configure
  173.10 +--target=s390-unknown-linux-gnu --host=s390-host_unknown-linux-gnu
  173.11 +--prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2
  173.12 +--enable-languages=c
  173.13 +--with-local-prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/s390-
  173.14 +unknown-linux-gnu --enable-threads=no --without-headers --with-newlib
  173.15 +--disable-shared
  173.16 +...
  173.17 +*** --with-headers is only supported when cross compiling
  173.18 +
  173.19 +This error pops up only when you're using Daniel Jacobowitz's technique
  173.20 +of slightly changing the target and host tuples to make them different
  173.21 +enough to force gcc's build system to not try to pull in system libraries
  173.22 +or headers.  This technique is needed e.g. to build an x86 -> x86
  173.23 +cross-compiler.
  173.24 +(The LFS developers ran into the same bug that prompted me to use
  173.25 +this technique; they point people who run into it to
  173.26 +http://linuxfromscratch.org/~greg/pure_lfs.txt, which is a different
  173.27 +way of avoiding this problem.  I think the tuple tweak is the way to go, though.)
  173.28 +
  173.29 +config-patches@gnu.org rejected this patch, on the grounds that there
  173.30 +is only one vendor of each of those two architectures, so the 
  173.31 +canonicalization is by definition correct.  When I pointed out the
  173.32 +difficulty this causes for people building s390 -> s390 or
  173.33 +cris -> cris compilers that are incompatible with the system
  173.34 +libraries and thus must be built like cross-compilers, he grumped and said 
  173.35 +"autoconf should let you specify a cross-compiler in some other way than
  173.36 +comparing tuple strings".
  173.37 +
  173.38 +
  173.39 +
  173.40 +--- gcc-3.3/config.sub.old	Sun Jun  8 20:38:47 2003
  173.41 ++++ gcc-3.3/config.sub	Sun Jun  8 20:40:34 2003
  173.42 +@@ -433,9 +433,12 @@
  173.43 + 	crds | unos)
  173.44 + 		basic_machine=m68k-crds
  173.45 + 		;;
  173.46 +-	cris | cris-* | etrax*)
  173.47 ++	cris | etrax*)
  173.48 + 		basic_machine=cris-axis
  173.49 + 		;;
  173.50 ++	cris-*)
  173.51 ++		basic_machine=cris-`echo $basic_machine | sed 's/^[^-]*-//'`
  173.52 ++		;;
  173.53 + 	da30 | da30-*)
  173.54 + 		basic_machine=m68k-da30
  173.55 + 		;;
  173.56 +@@ -820,11 +823,17 @@
  173.57 + 	rtpc | rtpc-*)
  173.58 + 		basic_machine=romp-ibm
  173.59 + 		;;
  173.60 +-	s390 | s390-*)
  173.61 ++	s390)
  173.62 + 		basic_machine=s390-ibm
  173.63 + 		;;
  173.64 +-	s390x | s390x-*)
  173.65 ++	s390-*)
  173.66 ++		basic_machine=s390-`echo $basic_machine | sed 's/^[^-]*-//'`
  173.67 ++		;;
  173.68 ++	s390x)
  173.69 + 		basic_machine=s390x-ibm
  173.70 ++		;;
  173.71 ++	s390x-*)
  173.72 ++		basic_machine=s390x-`echo $basic_machine | sed 's/^[^-]*-//'`
  173.73 + 		;;
  173.74 + 	sa29200)
  173.75 + 		basic_machine=a29k-amd
   174.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   174.2 +++ b/patches/gcc/3.3.3/empty6.patch	Sat Feb 24 11:00:05 2007 +0000
   174.3 @@ -0,0 +1,21 @@
   174.4 +From 3.4 branch.  Fixes test failure
   174.5 +FAIL: g++.dg/abi/empty6.C  (test for warnings, line 6)
   174.6 +
   174.7 +===================================================================
   174.8 +RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/abi/empty6.C,v
   174.9 +retrieving revision 1.1
  174.10 +retrieving revision 1.2
  174.11 +diff -u -r1.1 -r1.2
  174.12 +--- gcc/gcc/testsuite/g++.dg/abi/empty6.C	2002/09/25 19:07:35	1.1
  174.13 ++++ gcc/gcc/testsuite/g++.dg/abi/empty6.C	2003/06/03 19:10:09	1.2
  174.14 +@@ -5,4 +5,9 @@
  174.15 + struct B {
  174.16 +   A a; // { dg-warning "empty" }
  174.17 +   virtual void f () {}
  174.18 +-};
  174.19 ++} __attribute__((aligned(8)));
  174.20 ++/* The preceding attribute is necessary on targets with
  174.21 ++   BIGGEST_ALIGNMENT <= 32 to trigger the warning, as otherwise a 32 bit
  174.22 ++   offset is split into DECL_FIELD_OFFSET 4 and DECL_FIELD_BIT_OFFSET 0,
  174.23 ++   and then there is no discrepancy between DECL_FIELD_OFFSET and
  174.24 ++   byte_position to warn about.  */
   175.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   175.2 +++ b/patches/gcc/3.3.3/gcc-3.3.2-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   175.3 @@ -0,0 +1,65 @@
   175.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
   175.5 +Adds support for arm*b-linux* big-endian ARM targets
   175.6 + 
   175.7 +See http://gcc.gnu.org/PR16350
   175.8 + 
   175.9 +diff -urN gcc-3.3.2.orig/gcc/config/arm/linux-elf.h gcc-3.3.2/gcc/config/arm/linux-elf.h
  175.10 +--- gcc-3.3.2.orig/gcc/config/arm/linux-elf.h	2003-09-16 17:39:23.000000000 +0200
  175.11 ++++ gcc-3.3.2/gcc/config/arm/linux-elf.h	2004-07-07 14:03:54.329839922 +0200
  175.12 +@@ -30,15 +30,29 @@
  175.13 + /* Do not assume anything about header files.  */
  175.14 + #define NO_IMPLICIT_EXTERN_C
  175.15 + 
  175.16 ++/*
  175.17 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  175.18 ++ * (big endian) configurations.
  175.19 ++ */
  175.20 ++#if TARGET_BIG_ENDIAN_DEFAULT
  175.21 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
  175.22 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  175.23 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  175.24 ++#else
  175.25 ++#define TARGET_ENDIAN_DEFAULT 0
  175.26 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  175.27 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  175.28 ++#endif
  175.29 ++
  175.30 + /* Default is to use APCS-32 mode.  */
  175.31 + #undef  TARGET_DEFAULT
  175.32 +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
  175.33 ++#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS | TARGET_ENDIAN_DEFAULT)
  175.34 + 
  175.35 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  175.36 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  175.37 + 
  175.38 + #undef  MULTILIB_DEFAULTS
  175.39 + #define MULTILIB_DEFAULTS \
  175.40 +-	{ "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  175.41 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  175.42 + 
  175.43 + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
  175.44 + 
  175.45 +@@ -86,7 +100,7 @@
  175.46 +    %{rdynamic:-export-dynamic} \
  175.47 +    %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  175.48 +    -X \
  175.49 +-   %{mbig-endian:-EB}" \
  175.50 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  175.51 +    SUBTARGET_EXTRA_LINK_SPEC
  175.52 + 
  175.53 + #define TARGET_OS_CPP_BUILTINS()		\
  175.54 +diff -urN gcc-3.3.2.orig/gcc/config.gcc gcc-3.3.2/gcc/config.gcc
  175.55 +--- gcc-3.3.2.orig/gcc/config.gcc	2003-10-01 21:07:01.000000000 +0200
  175.56 ++++ gcc-3.3.2/gcc/config.gcc	2004-07-07 14:04:59.046716638 +0200
  175.57 +@@ -699,6 +699,11 @@
  175.58 + 	;;
  175.59 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  175.60 + 	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
  175.61 ++	case $machine in
  175.62 ++	arm*b-*)
  175.63 ++		tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
  175.64 ++		;;
  175.65 ++	esac
  175.66 + 	tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
  175.67 + 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  175.68 + 	gnu_ld=yes
   176.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   176.2 +++ b/patches/gcc/3.3.3/gcc-3.3.3-trap-posix.patch	Sat Feb 24 11:00:05 2007 +0000
   176.3 @@ -0,0 +1,44 @@
   176.4 +# 
   176.5 +# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
   176.6 +#
   176.7 +# Error:
   176.8 +#
   176.9 +# creating libintl.h
  176.10 +# Configuring etc...
  176.11 +# loading cache ../config.cache
  176.12 +# checking for a BSD compatible install... (cached) /usr/bin/install -c
  176.13 +# creating ./config.status
  176.14 +# creating Makefile
  176.15 +# trap: usage: trap [-lp] [[arg] signal_spec ...]
  176.16 +#
  176.17 +# Description:
  176.18 +#
  176.19 +# non-posix conform usage of trap causes bash >= 3.0 to fail
  176.20 +# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
  176.21 +#
  176.22 +# Status:
  176.23 +#
  176.24 +# fixed in gcc >= 3.3.5
  176.25 +# backport of gcc-3.3.5 fix
  176.26 +#
  176.27 +diff -ruN gcc-3.3.3-orig/configure gcc-3.3.3/configure
  176.28 +--- gcc-3.3.3-orig/configure	2002-09-29 18:11:24.000000000 +0200
  176.29 ++++ gcc-3.3.3/configure	2005-04-20 21:03:51.000000000 +0200
  176.30 +@@ -697,7 +697,7 @@
  176.31 + if test -f skip-this-dir; then
  176.32 + 	# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
  176.33 + 	# and reset the trap handler.
  176.34 +-	trap 0
  176.35 ++	trap '' 0
  176.36 + 	rm -rf Makefile* ${tmpdir}
  176.37 + 	# Execute the final clean-up actions
  176.38 + 	${config_shell} skip-this-dir
  176.39 +@@ -1596,7 +1596,7 @@
  176.40 + # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
  176.41 + # and reset the trap handler.
  176.42 + rm -rf ${tmpdir}
  176.43 +-trap 0
  176.44 ++trap '' 0
  176.45 + 
  176.46 + exit 0
  176.47 + 
   177.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   177.2 +++ b/patches/gcc/3.3.3/pr10392-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   177.3 @@ -0,0 +1,65 @@
   177.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   177.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr10392-1.c	Sun Sep 14 14:28:24 2003
   177.6 +@@ -0,0 +1,62 @@
   177.7 ++/* PR optimization/10392
   177.8 ++ * Reporter: marcus@mc.pp.se
   177.9 ++ * Summary: [3.3/3.4 regression] [SH] optimizer generates faulty array indexing
  177.10 ++ * Description:
  177.11 ++ * The address calculation of an index operation on an array on the stack 
  177.12 ++ * can _under some conditions_ get messed up completely
  177.13 ++ *
  177.14 ++ * Testcase tweaked by dank@kegel.com
  177.15 ++ * Problem only happens with -O2 -m4, so it should only happen on sh4,
  177.16 ++ * but what the heck, let's test other architectures, too.
  177.17 ++ * Not marked as xfail since it's a regression.
  177.18 ++*/
  177.19 ++/* { dg-do run } */
  177.20 ++/* { dg-options "-O2" } */
  177.21 ++/* { dg-options "-O2 -m4" { target sh4-*-* } } */
  177.22 ++const char *dont_optimize_function_away;
  177.23 ++
  177.24 ++const char *use(const char *str)
  177.25 ++{
  177.26 ++	dont_optimize_function_away = str;
  177.27 ++	if (str[0] != 'v')
  177.28 ++		abort();
  177.29 ++	if (str[1] < '1' || str[1] > '6')
  177.30 ++		abort();
  177.31 ++	if (str[2])
  177.32 ++		abort();
  177.33 ++	return str[2] ? "notused" : "v6";
  177.34 ++}
  177.35 ++
  177.36 ++const char *func(char *a, char *b)
  177.37 ++{
  177.38 ++	char buf[128];
  177.39 ++	unsigned char i;
  177.40 ++	const char *result;
  177.41 ++
  177.42 ++	char *item[] = {
  177.43 ++		"v1",
  177.44 ++		"v2",
  177.45 ++	};
  177.46 ++
  177.47 ++	buf[0] = 'v';
  177.48 ++	buf[1] = '3';
  177.49 ++	buf[2] = 0;
  177.50 ++
  177.51 ++	for (i = 0; i < 2; i++) {
  177.52 ++		/* bug is: following line passes wild pointer to use() on sh4 -O2 */
  177.53 ++		result = use(item[i]);
  177.54 ++
  177.55 ++		use(buf);
  177.56 ++		use(a);
  177.57 ++		use(b);
  177.58 ++		result = use(result);
  177.59 ++	}
  177.60 ++	return result;
  177.61 ++}
  177.62 ++
  177.63 ++int main()
  177.64 ++{
  177.65 ++	func("v4", "v5");
  177.66 ++	return 0;
  177.67 ++}
  177.68 ++
   178.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   178.2 +++ b/patches/gcc/3.3.3/pr10412-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   178.3 @@ -0,0 +1,46 @@
   178.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   178.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr10412-1.c	Sun Sep 14 16:15:21 2003
   178.6 +@@ -0,0 +1,43 @@
   178.7 ++/* PR target/10412
   178.8 ++ * Reporter: shrinivasa@kpitcummins.com 
   178.9 ++ * Summary: Renesas SH - Incorrect code generation
  178.10 ++ * Description:
  178.11 ++ * When following code is compiled  with
  178.12 ++ * sh-elf-gcc  -S -mhitachi -m2 -O2 bug1.c
  178.13 ++ * generates an incorrect code.
  178.14 ++ *
  178.15 ++ * Testcase tweaked by dank@kegel.com
  178.16 ++ * Problem only happens with -mhitachi -m2.  Not sure if I can give those
  178.17 ++ * options for all sh targets.  They work on sh4, though.
  178.18 ++ * Not marked as xfail as it's a regression relative to hardhat 2.0 gcc-2.97.
  178.19 ++*/
  178.20 ++/* { dg-do run } */
  178.21 ++/* { dg-options "-O2" } */
  178.22 ++int global_val;
  178.23 ++
  178.24 ++int func0(int x)
  178.25 ++{
  178.26 ++	global_val += x;
  178.27 ++	return (x != 99);
  178.28 ++}
  178.29 ++
  178.30 ++int func1(unsigned long addr)
  178.31 ++{
  178.32 ++	int err;
  178.33 ++
  178.34 ++	err = func0(addr);
  178.35 ++	if (err)
  178.36 ++		return (err);
  178.37 ++
  178.38 ++	err = func0(addr * 7);	/* address of func0 is lost during multiplication -> probable SIGSEGV */
  178.39 ++	return (err);
  178.40 ++}
  178.41 ++
  178.42 ++int main(int argc, char **argv)
  178.43 ++{
  178.44 ++	global_val = 0;
  178.45 ++	global_val += func1(99);
  178.46 ++	if (global_val != 99 * 8 + 1)
  178.47 ++		abort();
  178.48 ++	return 0;
  178.49 ++}
   179.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   179.2 +++ b/patches/gcc/3.3.3/pr10589-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   179.3 @@ -0,0 +1,17 @@
   179.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   179.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr10589-1.c	Mon Sep 15 08:57:58 2003
   179.6 +@@ -0,0 +1,14 @@
   179.7 ++/* PR target/10589
   179.8 ++ * Reporter: mathieu@thenesis.com
   179.9 ++ * Summary: For Hitachi SH target, GCC crashes when both -fomit-frame-pointer and -mdalign options are specified
  179.10 ++ * Keywords: ice-on-valid-code
  179.11 ++ * Testcase by Kazu Hirata, tweaked by dank@kegel.com
  179.12 ++ * Did not fail in Hard Hat 2.0 gcc-2.97, nor in dodes gcc-3.0.2, so this is a regression, so I'm not marking it xfail
  179.13 ++ */
  179.14 ++/* { dg-do compile { target sh*-*-* } } */
  179.15 ++/* { dg-options "-fomit-frame-pointer -mdalign" } */
  179.16 ++
  179.17 ++int foo(int a, int b)
  179.18 ++{
  179.19 ++	return a / b;
  179.20 ++}
   180.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   180.2 +++ b/patches/gcc/3.3.3/pr11162-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   180.3 @@ -0,0 +1,25 @@
   180.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   180.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr11162-1.c	Sun Sep 14 16:24:41 2003
   180.6 +@@ -0,0 +1,22 @@
   180.7 ++/*
   180.8 ++ * PR optimization/11162
   180.9 ++ * Reporter: Toshiyasu Morita <tm@kloo.net>
  180.10 ++ * Summary: [3.4 Regression] [-fnew-ra] ICE compiling channel.i on sh
  180.11 ++ * Keywords: ice-on-valid-code
  180.12 ++ * Description:
  180.13 ++ * [ICE] when channel.i from stress-1.17 is compiled with options:
  180.14 ++ * -O2 -m4 -fnew-ra
  180.15 ++ * ...
  180.16 ++ * The CFG code gets confused by the addition of a USE insn after a sibcall.
  180.17 ++ * Sibcalls are supposed to end the block (and the function!), so the fact
  180.18 ++ * that we have an instruction following one (even if its fake) is confusing.
  180.19 ++ *
  180.20 ++ * testcase tweaked by dank@kegel.com
  180.21 ++ */
  180.22 ++/* { dg-do compile } */
  180.23 ++/* { dg-options "-O2 -fnew-ra" } */
  180.24 ++
  180.25 ++int foo(char *p1)
  180.26 ++{
  180.27 ++	return bar(p1);
  180.28 ++}
   181.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   181.2 +++ b/patches/gcc/3.3.3/pr11587-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   181.3 @@ -0,0 +1,39 @@
   181.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   181.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr11587-1.c	Mon Sep 15 08:46:00 2003
   181.6 +@@ -0,0 +1,36 @@
   181.7 ++/* PR optimization/11587
   181.8 ++ * Reporter: Michael Eager <eager@mvista.com>
   181.9 ++ * Summary: [3.3/3.4 Regression] SH ICE in reload_cse_simplify_operand, postreload.c
  181.10 ++ * Keywords: ice-on-valid-code
  181.11 ++ *
  181.12 ++ * Note: a fix exists; see bugzilla
  181.13 ++ *
  181.14 ++ * Testcase tweaked by dank@kegel.com
  181.15 ++ * Not marked as xfail since it's a regression.
  181.16 ++ */
  181.17 ++
  181.18 ++/* { dg-do compile } */
  181.19 ++/* { dg-options "-O1" } */
  181.20 ++int foo1(void);
  181.21 ++int foo2();
  181.22 ++int foo3();
  181.23 ++
  181.24 ++static int goo()
  181.25 ++{
  181.26 ++	int i;
  181.27 ++
  181.28 ++	if (i <= 0)
  181.29 ++		return i;
  181.30 ++
  181.31 ++	if (foo1() > 1) {
  181.32 ++		i = foo2();
  181.33 ++		if (i < 0)
  181.34 ++			return i;
  181.35 ++		if (i) {
  181.36 ++			if (foo3())
  181.37 ++				return 1;
  181.38 ++			return 0;
  181.39 ++		}
  181.40 ++	}
  181.41 ++
  181.42 ++}
   182.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   182.2 +++ b/patches/gcc/3.3.3/pr11608.patch	Sat Feb 24 11:00:05 2007 +0000
   182.3 @@ -0,0 +1,26 @@
   182.4 +# See http://gcc.gnu.org/PR11608
   182.5 +# Fixes following error when testing sh4 toolchain:
   182.6 +# 
   182.7 +# Testing debug/20020327-1.c, -gstabs1
   182.8 +# ...
   182.9 +# FAIL: gcc.dg/debug/20020327-1.c (test for excess errors)
  182.10 +# Excess errors:
  182.11 +# /tmp/cc8dFF7Y.s: Assembler messages:
  182.12 +# /tmp/cc8dFF7Y.s:66: Error: symbol `Letext' is already defined
  182.13 +
  182.14 +Index: elf.h
  182.15 +===================================================================
  182.16 +RCS file: /cvs/gcc/gcc/gcc/config/sh/elf.h,v
  182.17 +retrieving revision 1.32
  182.18 +diff -u -p -r1.32 elf.h
  182.19 +--- gcc/gcc/config/sh/elf.h.old	27 Sep 2003 04:48:28 -0000	1.32
  182.20 ++++ gcc/gcc/config/sh/elf.h	2 Jan 2004 07:23:23 -0000
  182.21 +@@ -95,7 +95,7 @@ while (0)
  182.22 + #define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME)			\
  182.23 + do {									\
  182.24 +   text_section ();							\
  182.25 +-  fprintf ((FILE), "\t.stabs \"\",%d,0,0,Letext\nLetext:\n", N_SO);	\
  182.26 ++  asm_fprintf ((FILE), "\t.stabs \"\",%d,0,0,%LLetext\n%LLetext:\n", N_SO); \
  182.27 + } while (0)
  182.28 + 
  182.29 + #undef STARTFILE_SPEC
   183.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   183.2 +++ b/patches/gcc/3.3.3/pr11736-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   183.3 @@ -0,0 +1,48 @@
   183.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   183.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr11736-1.c	Sun Sep 14 14:26:33 2003
   183.6 +@@ -0,0 +1,45 @@
   183.7 ++/* PR optimization/11736
   183.8 ++ * Reporter: marcus@mc.pp.se
   183.9 ++ * Summary:  Stackpointer messed up on SuperH
  183.10 ++ * Keywords: wrong-code
  183.11 ++ * Description:
  183.12 ++ * When a function with 5 arguments is called in both branches of a
  183.13 ++ * conditional, and only the last argument differs, the code to push that
  183.14 ++ * last argument on the stack gets confused. 
  183.15 ++ * Space for the fifth argument is reserved on the stack by the
  183.16 ++ * instruction I have marked as "A".  However, if the else-branch is
  183.17 ++ * taken the stackpointer is decremented _again_ at "B".  This
  183.18 ++ * decrementation is never restored, and it is only due to the
  183.19 ++ * restoration of r15 from r14 that the function works at all.  With
  183.20 ++ * -fomit-frame-pointer it will crash.
  183.21 ++ *
  183.22 ++ * Testcase tweaked by dank@kegel.com
  183.23 ++ * Not marked as xfail since it's a regression from hardhat 2.0 gcc-2.97 
  183.24 ++ * and dodes gcc-3.0.2
  183.25 ++ */
  183.26 ++
  183.27 ++/* { dg-do run } */
  183.28 ++/* { dg-options "-O1 -fomit-frame-pointer" } */
  183.29 ++
  183.30 ++int expected_e;
  183.31 ++
  183.32 ++void bar(int a, int b, int c, int d, int e)
  183.33 ++{
  183.34 ++	if (e != expected_e)
  183.35 ++		abort();
  183.36 ++}
  183.37 ++
  183.38 ++void foo(int a)
  183.39 ++{
  183.40 ++	if (a)
  183.41 ++		bar(0, 0, 0, 0, 1);
  183.42 ++	else
  183.43 ++		bar(0, 0, 0, 0, 0);	/* stack pointer decremented extra time here, causing segfault */
  183.44 ++}
  183.45 ++
  183.46 ++int main(int argc, char **argv)
  183.47 ++{
  183.48 ++	for (expected_e = 0; expected_e < 2; expected_e++)
  183.49 ++		foo(expected_e);
  183.50 ++	return 0;
  183.51 ++}
   184.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   184.2 +++ b/patches/gcc/3.3.3/pr11864-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   184.3 @@ -0,0 +1,45 @@
   184.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   184.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr11864-1.c	Sun Sep 14 14:32:24 2003
   184.6 +@@ -0,0 +1,42 @@
   184.7 ++/* PR optimization/11864
   184.8 ++ * Reporter: Kazumoto Kojima <kkojima@gcc.gnu.org>
   184.9 ++ * Summary: [3.3/3.4 regression] miscompiles zero extension and test
  184.10 ++ * Description:
  184.11 ++ * gcc-3.3/3.4 -O2 for sh target may miscompile the combination of zero extension
  184.12 ++ * and test if it's zero.
  184.13 ++ *
  184.14 ++ * Testcase tweaked by dank@kegel.com.  Not marked as xfail because it's a regression.
  184.15 ++ */
  184.16 ++/* { dg-do run } */
  184.17 ++/* { dg-options "-O2" } */
  184.18 ++
  184.19 ++extern void abort(void);
  184.20 ++
  184.21 ++int val = 0xff00;
  184.22 ++
  184.23 ++int f(void)
  184.24 ++{
  184.25 ++	return val;
  184.26 ++}
  184.27 ++
  184.28 ++unsigned char a[1];
  184.29 ++
  184.30 ++void foo(void)
  184.31 ++{
  184.32 ++	a[0] = f() & 255;
  184.33 ++
  184.34 ++	if (!a[0])
  184.35 ++		a[0] = f() & 255;
  184.36 ++
  184.37 ++	if (!a[0])
  184.38 ++		a[0] = 1 + (f() & 127);
  184.39 ++}
  184.40 ++
  184.41 ++int main(int argc, char **argv)
  184.42 ++{
  184.43 ++	foo();
  184.44 ++	if (!a[0])
  184.45 ++		abort();
  184.46 ++
  184.47 ++	return 0;
  184.48 ++}
   185.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   185.2 +++ b/patches/gcc/3.3.3/pr12009.patch	Sat Feb 24 11:00:05 2007 +0000
   185.3 @@ -0,0 +1,85 @@
   185.4 +See http://gcc.gnu.org/PR12009
   185.5 +
   185.6 +Fixes the following problems when testing a cross-compiler:
   185.7 +
   185.8 +============================================
   185.9 +Testing g++.dg/compat/abi/bitfield1,
  185.10 +...
  185.11 +Invoking the compiler as /crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-gli
  185.12 +bc-2.2.5/build-gcc/gcc/testsuite/../g++  ...
  185.13 +/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/gcc/test
  185.14 +suite/g++.dg/compat/abi/bitfield1_main.C
  185.15 +pid is 16028 -16028
  185.16 +compiler exited with status 1
  185.17 +output is:
  185.18 +sh: error while loading shared libraries: /opt/cegl-2.0/powerpc-750-linux-gnu/gc
  185.19 +c-3.3-glibc-2.2.5/powerpc-750-linux-gnu/./lib/libdl.so.2: ELF file data encoding
  185.20 + not little-endian
  185.21 +/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/build-gcc/gcc/te
  185.22 +stsuite/../g++: error while loading shared libraries: /opt/cegl-2.0/powerpc-750-
  185.23 +linux-gnu/gcc-3.3-glibc-2.2.5/powerpc-750-linux-gnu/./lib/libc.so.6: ELF file da
  185.24 +ta encoding not little-endian
  185.25 +
  185.26 +FAIL: g++.dg/compat/abi/bitfield1 main_tst.o compile
  185.27 +============================================
  185.28 +
  185.29 +and
  185.30 +
  185.31 +sh: error while loading shared libraries: /opt/cegl-2.0/powerpc-405-linux-gnu/gcc-3.2.3-glibc-2.2.5/powerpc-405-linux-gnu/./lib/libdl.so.2: ELF file data encoding not little-endian
  185.32 +
  185.33 +
  185.34 +
  185.35 +--- gcc-3.3/gcc/testsuite/g++.dg/compat/compat.exp.old	Thu Oct 17 17:22:57 2002
  185.36 ++++ gcc-3.3/gcc/testsuite/g++.dg/compat/compat.exp	Mon Jul 14 10:59:19 2003
  185.37 +@@ -42,11 +42,13 @@
  185.38 + proc compat-fix-library-path { } {
  185.39 +     global ld_library_path
  185.40 + 
  185.41 +-    # See comments in lib/g++.exp for why this is needed.
  185.42 +-    setenv  LD_LIBRARY_PATH     $ld_library_path
  185.43 +-    setenv  SHLIB_PATH          $ld_library_path
  185.44 +-    setenv  LD_LIBRARYN32_PATH  $ld_library_path
  185.45 +-    setenv  LD_LIBRARY64_PATH   $ld_library_path
  185.46 ++    if {![is_remote target]} {
  185.47 ++	# See comments in lib/g++.exp for why this is needed.
  185.48 ++	setenv  LD_LIBRARY_PATH     $ld_library_path
  185.49 ++	setenv  SHLIB_PATH          $ld_library_path
  185.50 ++	setenv  LD_LIBRARYN32_PATH  $ld_library_path
  185.51 ++	setenv  LD_LIBRARY64_PATH   $ld_library_path
  185.52 ++    }
  185.53 + }
  185.54 + 
  185.55 + #
  185.56 +--- gcc-3.4-20030813/gcc/testsuite/lib/g++.exp.orig	Tue Jun 17 18:56:45 2003
  185.57 ++++ gcc-3.4-20030813/gcc/testsuite/lib/g++.exp	Sun Aug 17 18:35:38 2003
  185.58 +@@ -166,16 +182,20 @@
  185.59 +       }
  185.60 +     }
  185.61 + 
  185.62 +-    # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
  185.63 +-    # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
  185.64 +-    # (for the 64-bit ABI).  The right way to do this would be to modify
  185.65 +-    # unix.exp -- but that's not an option since it's part of DejaGNU
  185.66 +-    # proper, so we do it here.  We really only need to do 
  185.67 +-    # this on IRIX, but it shouldn't hurt to do it anywhere else.
  185.68 +-    setenv  LD_LIBRARY_PATH     $ld_library_path
  185.69 +-    setenv  SHLIB_PATH          $ld_library_path
  185.70 +-    setenv  LD_LIBRARYN32_PATH  $ld_library_path
  185.71 +-    setenv  LD_LIBRARY64_PATH   $ld_library_path
  185.72 ++    if {![is_remote target]} {
  185.73 ++      # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
  185.74 ++      # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
  185.75 ++      # (for the 64-bit ABI).  The right way to do this would be to modify
  185.76 ++      # unix.exp -- but that's not an option since it's part of DejaGNU
  185.77 ++      # proper, so we do it here.  We really only need to do 
  185.78 ++      # this on IRIX, but it shouldn't hurt to do it anywhere else.
  185.79 ++
  185.80 ++      # Doing this causes us to be unable to run cross-compilers.
  185.81 ++      setenv  LD_LIBRARY_PATH     $ld_library_path
  185.82 ++      setenv  SHLIB_PATH          $ld_library_path
  185.83 ++      setenv  LD_LIBRARYN32_PATH  $ld_library_path
  185.84 ++      setenv  LD_LIBRARY64_PATH   $ld_library_path
  185.85 ++    }
  185.86 + 
  185.87 +     return "$flags"
  185.88 + }
   186.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   186.2 +++ b/patches/gcc/3.3.3/pr12010.patch	Sat Feb 24 11:00:05 2007 +0000
   186.3 @@ -0,0 +1,81 @@
   186.4 +Adjusted for gcc-3.3-20040119
   186.5 +
   186.6 +See http://gcc.gnu.org/PR12010
   186.7 +
   186.8 +Without this patch, one gets both compile and link time errors in
   186.9 +'make check' when configured for cross-compiling.
  186.10 +
  186.11 +In particular, 'make check' on a cross-compiler fails with
  186.12 +
  186.13 +/testsuite_flags: /testsuite_flags: No such file or directory
  186.14 +    while executing
  186.15 +"exec sh ${odir_v3}/testsuite_flags --build-includes"
  186.16 +    (procedure "g++_include_flags" line 21)
  186.17 +    invoked from within
  186.18 +"g++_include_flags [get_multilibs] "
  186.19 +    (procedure "g++_init" line 63)
  186.20 +    invoked from within
  186.21 +"${tool}_init $test_file_name"
  186.22 +    (procedure "runtest" line 19)
  186.23 +...
  186.24 +make[1]: [check-g++] Error 1 (ignored)
  186.25 +
  186.26 +--- gcc-3.3-20040119/gcc/testsuite/lib/g++.exp.orig	2004-01-25 17:56:24.000000000 -0800
  186.27 ++++ gcc-3.3-20040119/gcc/testsuite/lib/g++.exp	2004-01-25 18:29:44.000000000 -0800
  186.28 +@@ -72,6 +72,8 @@ proc g++_version { } {
  186.29 + #
  186.30 + proc g++_include_flags { paths } {
  186.31 +     global srcdir
  186.32 ++    global objdir
  186.33 ++    global target_triplet
  186.34 +     global HAVE_LIBSTDCXX_V3
  186.35 +     global TESTING_IN_BUILD_TREE
  186.36 + 
  186.37 +@@ -90,6 +92,20 @@ proc g++_include_flags { paths } {
  186.38 + 
  186.39 +     if { ${HAVE_LIBSTDCXX_V3} } {
  186.40 +       set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
  186.41 ++      if { $odir_v3 == "" } {
  186.42 ++          verbose "g++_include_flags: couldn't find libstdc++-v3 on first try, now looking in build directory $objdir"
  186.43 ++          # first assume no multilibs
  186.44 ++          set odir_v3 [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
  186.45 ++      }
  186.46 ++      if { $odir_v3 == "" } {
  186.47 ++          verbose "g++_include_flags: couldn't find libstdc++-v3 on second try, trying multilib"
  186.48 ++          # assume multilib only one level deep
  186.49 ++          set multisub [file tail $gccpath]
  186.50 ++          set odir_v3 [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
  186.51 ++      }
  186.52 ++      if { $odir_v3 == "" } {
  186.53 ++           error "Can't find libstdc++-v3"
  186.54 ++      }
  186.55 +       append flags [exec sh ${odir_v3}/testsuite_flags --build-includes]
  186.56 +     } else {
  186.57 +       set odir_v2 [lookfor_file ${gccpath} libstdc++]
  186.58 +
  186.59 +--- gcc-3.3-20040119/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp.old	Sun Jul 13 10:42:01 2003
  186.60 ++++ gcc-3.3-20040119/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp	Sun Jul 13 11:39:54 2003
  186.61 +@@ -48,8 +48,23 @@
  186.62 +     global ld_library_path
  186.63 +     global original_ld_library_path
  186.64 +     global tool_root_dir
  186.65 ++    global target_triplet
  186.66 + 
  186.67 +     set blddir [lookfor_file [get_multilibs] libstdc++-v3]
  186.68 ++    if { $blddir == "" } {
  186.69 ++        set multilibs [get_multilibs]
  186.70 ++        # FIXME: assume multilib only one level deep
  186.71 ++        set multisub [file tail $multilibs]
  186.72 ++        verbose "libstdc++-v3-init: couldn't find libstdc++-v3 in $multilibs, trying $objdir"
  186.73 ++        set blddir [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
  186.74 ++    }
  186.75 ++    if { $blddir == "" } {
  186.76 ++        verbose "libstdc++-v3-init: couldn't find libstdc++-v3, trying $objdir without multilibs"
  186.77 ++        set blddir [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
  186.78 ++    }
  186.79 ++    if { $blddir == "" } {
  186.80 ++         error "Can't find libstdc++-v3"
  186.81 ++    }
  186.82 + 
  186.83 +     # By default, we assume we want to run program images.
  186.84 +     global dg-do-what-default
   187.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   187.2 +++ b/patches/gcc/3.3.3/pr13250-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   187.3 @@ -0,0 +1,19 @@
   187.4 +See http://gcc.gnu.org/PR13250
   187.5 +Fixes bad code generated when compiling SHA256 for SH processor
   187.6 +
   187.7 +===================================================================
   187.8 +RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.md,v
   187.9 +retrieving revision 1.171
  187.10 +retrieving revision 1.172
  187.11 +diff -u -r1.171 -r1.172
  187.12 +--- gcc/gcc/config/sh/sh.md	2004/05/10 23:25:13	1.171
  187.13 ++++ gcc/gcc/config/sh/sh.md	2004/05/28 05:47:36	1.172
  187.14 +@@ -2194,7 +2194,7 @@
  187.15 + 	parts[0] = gen_reg_rtx (SImode);
  187.16 + 	parts[1] = gen_reg_rtx (SImode);
  187.17 + 	emit_insn (gen_rotlsi3_16 (parts[2-choice], operands[1]));
  187.18 +-	parts[choice-1] = operands[1];
  187.19 ++	emit_move_insn (parts[choice-1], operands[1]);
  187.20 + 	emit_insn (gen_ashlsi3 (parts[0], parts[0], GEN_INT (8)));
  187.21 + 	emit_insn (gen_lshrsi3 (parts[1], parts[1], GEN_INT (8)));
  187.22 + 	emit_insn (gen_iorsi3 (operands[0], parts[0], parts[1]));
   188.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   188.2 +++ b/patches/gcc/3.3.3/pr13260-fix-3.3.3.patch	Sat Feb 24 11:00:05 2007 +0000
   188.3 @@ -0,0 +1,246 @@
   188.4 +Date: Fri, 06 Feb 2004 12:35:58 +0900
   188.5 +From: SUGIOKA Toshinobu <sugioka@itonet.co.jp>
   188.6 +Subject: [linux-sh:03150] Re: gcc 3.3 optimisation problem
   188.7 +To: linux-sh@m17n.org
   188.8 +Message-Id: <4.2.0.58.J.20040206122503.04fe3058@router.itonet.co.jp>
   188.9 +List-Help: <mailto:linux-sh-ctl@m17n.org?body=help>
  188.10 +List-Id: linux-sh.m17n.org
  188.11 +
  188.12 +At 19:40 03/12/01 +0000, Stuart Menefy <stuart.menefy@st.com> wrote:
  188.13 +>On Sat, 29 Nov 2003 20:19:08 +0900 kkojima@rr.iij4u.or.jp wrote:
  188.14 +>
  188.15 +>> Dan Kegel <dank@kegel.com> wrote:
  188.16 +>> > Stuart Menefy wrote:
  188.17 +>> >> I've just been trying to put together a gcc 3.3.2 based toolchain, and
  188.18 +>> >> appear to be hitting a gcc optimisation bug. I was just wondering if
  188.19 +>> >> anyone else had seen anything similar.
  188.20 +>> >> 
  188.21 +>> >> The problem is seen when building the kernel, in the function
  188.22 +>> >> root_nfs_parse_addr(). I've extracted this into a small stand alone
  188.23 +>> >> program which demonstrates the problem.
  188.24 +>> > 
  188.25 +>> > Excellent work.  I haven't seen anything like this (doesn't mean much)
  188.26 +>> > and the sh-specific optimization bugs in the gcc bug database don't look
  188.27 +>> > similar.  I think you should submit this as a bug report at
  188.28 +>> > http://gcc.gnu.org/bugzilla/
  188.29 +>> > It would be good if you could make your test case call abort() if
  188.30 +>> > the problem is present, so the test case can be automated.
  188.31 +>> 
  188.32 +>> Indeed.  It'd be very nice to create a gcc PR for this issue.
  188.33 +>
  188.34 +>OK, I've done that. PR 13260.
  188.35 +
  188.36 +PR 13260 was fixed by amylaar@gcc.gnu.org at 2003-12-04 20:10:29 on mainline(gcc-3.4).
  188.37 +I have back-ported that patch to gcc-3.3.3 and seems fine for me.
  188.38 +
  188.39 +	* sh-protos.h (sh_expand_t_scc): Declare.
  188.40 +	* sh.h (PREDICATE_CODES): Add cmpsi_operand.
  188.41 +	* sh.c (cmpsi_operand, sh_expand_t_scc): New functions.
  188.42 +	* sh.md (cmpsi): Use cmpsi_operand.  If T_REG is compared to
  188.43 +	something that is not a CONST_INT, copy it into a pseudo register.
  188.44 +	(subc): Fix description of new T value.
  188.45 +	(slt, sgt, sge, sgtu): Don't clobber T after rtl generation is over.
  188.46 +	(sltu, sleu, sgeu): Likewise.
  188.47 +	(seq, sne): Likewise. Use sh_expand_t_scc.
  188.48 +
  188.49 +diff -ru gcc-3.3-20040126-1/gcc/config/sh/sh-protos.h gcc-3.3-20040126/gcc/config/sh/sh-protos.h
  188.50 +--- gcc-3.3-20040126-1/gcc/config/sh/sh-protos.h	Tue Jan 13 02:03:24 2004
  188.51 ++++ gcc-3.3-20040126/gcc/config/sh/sh-protos.h	Fri Jan 30 17:54:04 2004
  188.52 +@@ -102,6 +102,7 @@
  188.53 + extern int sh_can_redirect_branch PARAMS ((rtx, rtx));
  188.54 + extern void sh_expand_unop_v2sf PARAMS ((enum rtx_code, rtx, rtx));
  188.55 + extern void sh_expand_binop_v2sf PARAMS ((enum rtx_code, rtx, rtx, rtx));
  188.56 ++extern int sh_expand_t_scc (enum rtx_code code, rtx target);
  188.57 + #ifdef TREE_CODE
  188.58 + extern void sh_va_start PARAMS ((tree, rtx));
  188.59 + extern rtx sh_va_arg PARAMS ((tree, tree));
  188.60 +diff -ru gcc-3.3-20040126-1/gcc/config/sh/sh.c gcc-3.3-20040126/gcc/config/sh/sh.c
  188.61 +--- gcc-3.3-20040126-1/gcc/config/sh/sh.c	Thu Jan 15 03:11:36 2004
  188.62 ++++ gcc-3.3-20040126/gcc/config/sh/sh.c	Fri Jan 30 17:53:58 2004
  188.63 +@@ -7870,6 +7870,15 @@
  188.64 +   return register_operand (op, mode);
  188.65 + }
  188.66 + 
  188.67 ++int
  188.68 ++cmpsi_operand (rtx op, enum machine_mode mode)
  188.69 ++{
  188.70 ++  if (GET_CODE (op) == REG && REGNO (op) == T_REG
  188.71 ++      && GET_MODE (op) == SImode)
  188.72 ++    return 1;
  188.73 ++  return arith_operand (op, mode);
  188.74 ++}
  188.75 ++
  188.76 + /* INSN is an sfunc; return the rtx that describes the address used.  */
  188.77 + static rtx
  188.78 + extract_sfunc_addr (rtx insn)
  188.79 +@@ -7917,4 +7926,33 @@
  188.80 +   abort ();
  188.81 + }
  188.82 + 
  188.83 ++int
  188.84 ++sh_expand_t_scc (enum rtx_code code, rtx target)
  188.85 ++{
  188.86 ++  rtx result = target;
  188.87 ++  HOST_WIDE_INT val;
  188.88 ++
  188.89 ++  if (GET_CODE (sh_compare_op0) != REG || REGNO (sh_compare_op0) != T_REG
  188.90 ++      || GET_CODE (sh_compare_op1) != CONST_INT)
  188.91 ++    return 0;
  188.92 ++  if (GET_CODE (result) != REG)
  188.93 ++    result = gen_reg_rtx (SImode);
  188.94 ++  val = INTVAL (sh_compare_op1);
  188.95 ++  if ((code == EQ && val == 1) || (code == NE && val == 0))
  188.96 ++    emit_insn (gen_movt (result));
  188.97 ++  else if ((code == EQ && val == 0) || (code == NE && val == 1))
  188.98 ++    {
  188.99 ++      emit_insn (gen_rtx_CLOBBER (VOIDmode, result));
 188.100 ++      emit_insn (gen_subc (result, result, result));
 188.101 ++      emit_insn (gen_addsi3 (result, result, GEN_INT (1)));
 188.102 ++    }
 188.103 ++  else if (code == EQ || code == NE)
 188.104 ++    emit_insn (gen_move_insn (result, GEN_INT (code == NE)));
 188.105 ++  else
 188.106 ++    return 0;
 188.107 ++  if (result != target)
 188.108 ++    emit_move_insn (target, result);
 188.109 ++  return 1;
 188.110 ++}
 188.111 ++
 188.112 + #include "gt-sh.h"
 188.113 +diff -ru gcc-3.3-20040126-1/gcc/config/sh/sh.h gcc-3.3-20040126/gcc/config/sh/sh.h
 188.114 +--- gcc-3.3-20040126-1/gcc/config/sh/sh.h	Wed Apr 16 02:06:09 2003
 188.115 ++++ gcc-3.3-20040126/gcc/config/sh/sh.h	Fri Jan 30 17:53:51 2004
 188.116 +@@ -3231,6 +3231,7 @@
 188.117 +   {"arith_reg_or_0_operand", {SUBREG, REG, CONST_INT, CONST_VECTOR}},	\
 188.118 +   {"binary_float_operator", {PLUS, MINUS, MULT, DIV}},			\
 188.119 +   {"binary_logical_operator", {AND, IOR, XOR}},				\
 188.120 ++  {"cmpsi_operand", {SUBREG, REG, CONST_INT}},				\
 188.121 +   {"commutative_float_operator", {PLUS, MULT}},				\
 188.122 +   {"equality_comparison_operator", {EQ,NE}},				\
 188.123 +   {"extend_reg_operand", {SUBREG, REG, TRUNCATE}},			\
 188.124 +diff -ru gcc-3.3-20040126-1/gcc/config/sh/sh.md gcc-3.3-20040126/gcc/config/sh/sh.md
 188.125 +--- gcc-3.3-20040126-1/gcc/config/sh/sh.md	Tue Jan 13 02:03:25 2004
 188.126 ++++ gcc-3.3-20040126/gcc/config/sh/sh.md	Fri Jan 30 17:54:20 2004
 188.127 +@@ -685,11 +685,14 @@
 188.128 + 
 188.129 + (define_expand "cmpsi"
 188.130 +   [(set (reg:SI T_REG)
 188.131 +-	(compare (match_operand:SI 0 "arith_operand" "")
 188.132 ++	(compare (match_operand:SI 0 "cmpsi_operand" "")
 188.133 + 		 (match_operand:SI 1 "arith_operand" "")))]
 188.134 +   "TARGET_SH1"
 188.135 +   "
 188.136 + {
 188.137 ++  if (GET_CODE (operands[0]) == REG && REGNO (operands[0]) == T_REG
 188.138 ++      && GET_CODE (operands[1]) != CONST_INT)
 188.139 ++    operands[0] = copy_to_mode_reg (SImode, operands[0]);
 188.140 +   sh_compare_op0 = operands[0];
 188.141 +   sh_compare_op1 = operands[1];
 188.142 +   DONE;
 188.143 +@@ -1147,7 +1150,9 @@
 188.144 + 			    (match_operand:SI 2 "arith_reg_operand" "r"))
 188.145 + 		  (reg:SI T_REG)))
 188.146 +    (set (reg:SI T_REG)
 188.147 +-	(gtu:SI (minus:SI (match_dup 1) (match_dup 2)) (match_dup 1)))]
 188.148 ++	(gtu:SI (minus:SI (minus:SI (match_dup 1) (match_dup 2))
 188.149 ++			  (reg:SI T_REG))
 188.150 ++		(match_dup 1)))]
 188.151 +   "TARGET_SH1"
 188.152 +   "subc	%2,%0"
 188.153 +   [(set_attr "type" "arith")])
 188.154 +@@ -7223,6 +7228,10 @@
 188.155 + 	}
 188.156 +       DONE;
 188.157 +     }
 188.158 ++  if (sh_expand_t_scc (EQ, operands[0]))
 188.159 ++    DONE;
 188.160 ++  if (! rtx_equal_function_value_matters)
 188.161 ++    FAIL;
 188.162 +   operands[1] = prepare_scc_operands (EQ);
 188.163 + }")
 188.164 + 
 188.165 +@@ -7269,6 +7278,8 @@
 188.166 + 	}
 188.167 +       DONE;
 188.168 +     }
 188.169 ++  if (! rtx_equal_function_value_matters)
 188.170 ++    FAIL;
 188.171 +   operands[1] = prepare_scc_operands (LT);
 188.172 + }")
 188.173 + 
 188.174 +@@ -7371,6 +7382,8 @@
 188.175 + 	}
 188.176 +       DONE;
 188.177 +     }
 188.178 ++  if (! rtx_equal_function_value_matters)
 188.179 ++    FAIL;
 188.180 +   operands[1] = prepare_scc_operands (GT);
 188.181 + }")
 188.182 + 
 188.183 +@@ -7423,6 +7436,8 @@
 188.184 +       DONE;
 188.185 +     }
 188.186 + 
 188.187 ++  if (! rtx_equal_function_value_matters)
 188.188 ++    FAIL;
 188.189 +   if (GET_MODE_CLASS (GET_MODE (sh_compare_op0)) == MODE_FLOAT)
 188.190 +     {
 188.191 +       if (TARGET_IEEE)
 188.192 +@@ -7462,6 +7477,8 @@
 188.193 + 				     sh_compare_op0, sh_compare_op1));
 188.194 +       DONE;
 188.195 +     }
 188.196 ++  if (! rtx_equal_function_value_matters)
 188.197 ++    FAIL;
 188.198 +   operands[1] = prepare_scc_operands (GTU);
 188.199 + }")
 188.200 + 
 188.201 +@@ -7486,6 +7503,8 @@
 188.202 + 				     sh_compare_op1, sh_compare_op0));
 188.203 +       DONE;
 188.204 +     }
 188.205 ++  if (! rtx_equal_function_value_matters)
 188.206 ++    FAIL;
 188.207 +   operands[1] = prepare_scc_operands (LTU);
 188.208 + }")
 188.209 + 
 188.210 +@@ -7515,6 +7534,8 @@
 188.211 + 
 188.212 +       DONE;
 188.213 +     }
 188.214 ++  if (! rtx_equal_function_value_matters)
 188.215 ++    FAIL;
 188.216 +   operands[1] = prepare_scc_operands (LEU);
 188.217 + }")
 188.218 + 
 188.219 +@@ -7545,6 +7566,8 @@
 188.220 +       DONE;
 188.221 +     }
 188.222 + 
 188.223 ++  if (! rtx_equal_function_value_matters)
 188.224 ++    FAIL;
 188.225 +   operands[1] = prepare_scc_operands (GEU);
 188.226 + }")
 188.227 + 
 188.228 +@@ -7592,8 +7615,12 @@
 188.229 +       DONE;
 188.230 +     }
 188.231 + 
 188.232 +-   operands[1] = prepare_scc_operands (EQ);
 188.233 +-   operands[2] = gen_reg_rtx (SImode);
 188.234 ++  if (sh_expand_t_scc (NE, operands[0]))
 188.235 ++    DONE;
 188.236 ++  if (! rtx_equal_function_value_matters)
 188.237 ++    FAIL;
 188.238 ++  operands[1] = prepare_scc_operands (EQ);
 188.239 ++  operands[2] = gen_reg_rtx (SImode);
 188.240 + }")
 188.241 + 
 188.242 + (define_expand "sunordered"
 188.243 +
 188.244 +----
 188.245 +SUGIOKA Toshinobu
 188.246 +
 188.247 +
 188.248 +
 188.249 +
   189.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   189.2 +++ b/patches/gcc/3.3.3/pr13260-test.patch	Sat Feb 24 11:00:05 2007 +0000
   189.3 @@ -0,0 +1,56 @@
   189.4 +See http://gcc.gnu.org/PR13260
   189.5 +
   189.6 +/cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/20031204-1.c,v  -->  standard output
   189.7 +revision 1.1
   189.8 +--- -	1970-01-01 00:00:00.000000000 +0000
   189.9 ++++ gcc/gcc/testsuite/gcc.c-torture/execute/20031204-1.c
  189.10 +@@ -0,0 +1,49 @@
  189.11 ++/* PR optimization/13260 */
  189.12 ++
  189.13 ++#include <string.h>
  189.14 ++
  189.15 ++typedef unsigned long u32;
  189.16 ++
  189.17 ++u32 in_aton(const char* x)
  189.18 ++{
  189.19 ++  return 0x0a0b0c0d;
  189.20 ++}
  189.21 ++
  189.22 ++u32 root_nfs_parse_addr(char *name)
  189.23 ++{
  189.24 ++ u32 addr;
  189.25 ++ int octets = 0;
  189.26 ++ char *cp, *cq;
  189.27 ++
  189.28 ++ cp = cq = name;
  189.29 ++ while (octets < 4) {
  189.30 ++  while (*cp >= '0' && *cp <= '9')
  189.31 ++   cp++;
  189.32 ++  if (cp == cq || cp - cq > 3)
  189.33 ++   break;
  189.34 ++  if (*cp == '.' || octets == 3)
  189.35 ++   octets++;
  189.36 ++  if (octets < 4)
  189.37 ++   cp++;
  189.38 ++  cq = cp;
  189.39 ++ }
  189.40 ++
  189.41 ++ if (octets == 4 && (*cp == ':' || *cp == '\0')) {
  189.42 ++  if (*cp == ':')
  189.43 ++   *cp++ = '\0';
  189.44 ++  addr = in_aton(name);
  189.45 ++  strcpy(name, cp);
  189.46 ++ } else
  189.47 ++  addr = (-1);
  189.48 ++
  189.49 ++ return addr;
  189.50 ++}
  189.51 ++
  189.52 ++int
  189.53 ++main()
  189.54 ++{
  189.55 ++  static char addr[] = "10.11.12.13:/hello";
  189.56 ++  u32 result = root_nfs_parse_addr(addr);
  189.57 ++  if (result != 0x0a0b0c0d) { abort(); }
  189.58 ++  return 0;
  189.59 ++}
   190.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   190.2 +++ b/patches/gcc/3.3.3/pr15089-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   190.3 @@ -0,0 +1,25 @@
   190.4 +See http://gcc.gnu.org/PR15089
   190.5 +"In some cases the specified register for a local variable meant to be
   190.6 +used with inline assembly code is not respected.  This breaks code 
   190.7 +relying on this feature to implement non-standard calling convension."
   190.8 +
   190.9 +This fix is probably needed to properly implement linux syscalls in some architectures.
  190.10 +
  190.11 +First added to crosstool by Jamie Hicks, see
  190.12 +http://www.handhelds.org/hypermail/kernel-discuss/current/0066.html
  190.13 +
  190.14 +Index: gcc/loop.c
  190.15 +===================================================================
  190.16 +RCS file: /cvs/gcc/gcc/gcc/loop.c,v
  190.17 +retrieving revision 1.488.2.3
  190.18 +diff -u -r1.488.2.3 loop.c
  190.19 +--- gcc-old/gcc/loop.c	14 Feb 2004 14:46:03 -0000	1.488.2.3
  190.20 ++++ gcc-new/gcc/loop.c	28 Apr 2004 22:02:53 -0000
  190.21 +@@ -929,6 +929,7 @@
  190.22 + 			  || (! (GET_CODE (SET_SRC (set)) == REG
  190.23 + 				 && (REGNO (SET_SRC (set))
  190.24 + 				     < FIRST_PSEUDO_REGISTER))))
  190.25 ++		      && regno >= FIRST_PSEUDO_REGISTER 
  190.26 + 		      /* This test is not redundant; SET_SRC (set) might be
  190.27 + 			 a call-clobbered register and the life of REGNO
  190.28 + 			 might span a call.  */
   191.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   191.2 +++ b/patches/gcc/3.3.3/pr9365-1-test.patch	Sat Feb 24 11:00:05 2007 +0000
   191.3 @@ -0,0 +1,43 @@
   191.4 +--- /dev/null	Sat Dec 14 13:56:51 2002
   191.5 ++++ gcc-3.3.1/gcc/testsuite/gcc.dg/pr9365-1.c	Sun Sep 14 09:34:37 2003
   191.6 +@@ -0,0 +1,40 @@
   191.7 ++/* PR target/9365
   191.8 ++ * Origin: marcus@mc.pp.se
   191.9 ++ * Testcase tweaked by dank@kegel.com
  191.10 ++ * [3.3 regression] [SH] segfault in gen_far_branch (config/sh/sh.c)
  191.11 ++ * ice-on-valid-code
  191.12 ++ * Not marked as xfail since it's a regression
  191.13 ++*/
  191.14 ++/* { dg-do compile } */
  191.15 ++/* { dg-options "-O2 -fomit-frame-pointer" } */
  191.16 ++
  191.17 ++
  191.18 ++void foo(int n, int *p)
  191.19 ++{
  191.20 ++	switch(n) {
  191.21 ++	case 100: case 110: case 120: case 130: case 140:
  191.22 ++	case 200: case 210: case 220: case 230: case 240:
  191.23 ++	case 300: case 310: case 320: case 330: case 340:
  191.24 ++	case 400: case 410: case 420: case 430: case 440:
  191.25 ++	case 500: case 510: case 520: case 530: case 540:
  191.26 ++	case 600: case 610: case 620: case 630: case 640:
  191.27 ++	case 700: case 710: case 720: case 730: case 740:
  191.28 ++	case 800: case 810: case 820: case 830: case 840:
  191.29 ++	case 900: case 910: case 920: case 930: case 940:
  191.30 ++		break;
  191.31 ++	default:
  191.32 ++		*p = n;
  191.33 ++		break;
  191.34 ++	}
  191.35 ++}
  191.36 ++
  191.37 ++int main(int argc, char **argv)
  191.38 ++{
  191.39 ++	int p;
  191.40 ++
  191.41 ++	(void) argv;
  191.42 ++
  191.43 ++	foo(argc, &p);
  191.44 ++
  191.45 ++	return p;
  191.46 ++}
   192.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   192.2 +++ b/patches/gcc/3.3.3/sh-lib1funcs_sizeAndType.patch	Sat Feb 24 11:00:05 2007 +0000
   192.3 @@ -0,0 +1,610 @@
   192.4 +Fixes the problem
   192.5 +	[ libdemo.so and main.o both use assignment on structures ]
   192.6 +	$ sh4-unknown-linux-gnu-gcc libdemo.so main.o
   192.7 +	sh4-unknown-linux-gnu/bin/ld: warning: type and size of dynamic symbol `__movstr_i4_even' are not defined
   192.8 +	[ resulting app links, but crashes at runtime ]
   192.9 +See testcase at http://tsukuba.m17n.org/linux-sh/ml/linux-sh/2003-11/msg00016.html
  192.10 +
  192.11 +Patch was posted as http://gcc.gnu.org/ml/gcc-patches/2002-11/msg01641.html
  192.12 +and is in cvs as http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sh/lib1funcs.asm.diff?r1=1.29.4.1&r2=1.29.4.2
  192.13 +
  192.14 +but see also sh-libgcc-hidden.patch (part of gcc-3.3.3 as of 20040119 or so)
  192.15 +
  192.16 +===================================================================
  192.17 +
  192.18 +--- gcc/gcc/config/sh/lib1funcs.asm	2002/09/20 01:29:21	1.29.4.1
  192.19 ++++ gcc/gcc/config/sh/lib1funcs.asm	2003/11/18 12:27:31
  192.20 +@@ -38,9 +38,14 @@
  192.21 +    amylaar@cygnus.com  */
  192.22 + 
  192.23 + #ifdef __ELF__
  192.24 +-#define LOCAL(X) .L_##X
  192.25 +-#else
  192.26 +-#define LOCAL(X) L_##X
  192.27 ++#define LOCAL(X)	.L_##X
  192.28 ++#define FUNC(X)		.type X,@function
  192.29 ++#define ENDFUNC0(X)	.Lfe_##X: .size X,.Lfe_##X-X
  192.30 ++#define ENDFUNC(X)	ENDFUNC0(X)
  192.31 ++#else
  192.32 ++#define LOCAL(X)	L_##X
  192.33 ++#define FUNC(X)
  192.34 ++#define ENDFUNC(X)
  192.35 + #endif
  192.36 + 
  192.37 + #define	CONCAT(A,B)	A##B
  192.38 +@@ -87,6 +92,40 @@
  192.39 + 	.global	GLOBAL(ashiftrt_r4_31)
  192.40 + 	.global	GLOBAL(ashiftrt_r4_32)
  192.41 + 
  192.42 ++	FUNC(GLOBAL(ashiftrt_r4_0))
  192.43 ++	FUNC(GLOBAL(ashiftrt_r4_1))
  192.44 ++	FUNC(GLOBAL(ashiftrt_r4_2))
  192.45 ++	FUNC(GLOBAL(ashiftrt_r4_3))
  192.46 ++	FUNC(GLOBAL(ashiftrt_r4_4))
  192.47 ++	FUNC(GLOBAL(ashiftrt_r4_5))
  192.48 ++	FUNC(GLOBAL(ashiftrt_r4_6))
  192.49 ++	FUNC(GLOBAL(ashiftrt_r4_7))
  192.50 ++	FUNC(GLOBAL(ashiftrt_r4_8))
  192.51 ++	FUNC(GLOBAL(ashiftrt_r4_9))
  192.52 ++	FUNC(GLOBAL(ashiftrt_r4_10))
  192.53 ++	FUNC(GLOBAL(ashiftrt_r4_11))
  192.54 ++	FUNC(GLOBAL(ashiftrt_r4_12))
  192.55 ++	FUNC(GLOBAL(ashiftrt_r4_13))
  192.56 ++	FUNC(GLOBAL(ashiftrt_r4_14))
  192.57 ++	FUNC(GLOBAL(ashiftrt_r4_15))
  192.58 ++	FUNC(GLOBAL(ashiftrt_r4_16))
  192.59 ++	FUNC(GLOBAL(ashiftrt_r4_17))
  192.60 ++	FUNC(GLOBAL(ashiftrt_r4_18))
  192.61 ++	FUNC(GLOBAL(ashiftrt_r4_19))
  192.62 ++	FUNC(GLOBAL(ashiftrt_r4_20))
  192.63 ++	FUNC(GLOBAL(ashiftrt_r4_21))
  192.64 ++	FUNC(GLOBAL(ashiftrt_r4_22))
  192.65 ++	FUNC(GLOBAL(ashiftrt_r4_23))
  192.66 ++	FUNC(GLOBAL(ashiftrt_r4_24))
  192.67 ++	FUNC(GLOBAL(ashiftrt_r4_25))
  192.68 ++	FUNC(GLOBAL(ashiftrt_r4_26))
  192.69 ++	FUNC(GLOBAL(ashiftrt_r4_27))
  192.70 ++	FUNC(GLOBAL(ashiftrt_r4_28))
  192.71 ++	FUNC(GLOBAL(ashiftrt_r4_29))
  192.72 ++	FUNC(GLOBAL(ashiftrt_r4_30))
  192.73 ++	FUNC(GLOBAL(ashiftrt_r4_31))
  192.74 ++	FUNC(GLOBAL(ashiftrt_r4_32))
  192.75 ++
  192.76 + 	.align	1
  192.77 + GLOBAL(ashiftrt_r4_32):
  192.78 + GLOBAL(ashiftrt_r4_31):
  192.79 +@@ -166,6 +205,40 @@
  192.80 + GLOBAL(ashiftrt_r4_0):
  192.81 + 	rts
  192.82 + 	nop
  192.83 ++
  192.84 ++	ENDFUNC(GLOBAL(ashiftrt_r4_0))
  192.85 ++	ENDFUNC(GLOBAL(ashiftrt_r4_1))
  192.86 ++	ENDFUNC(GLOBAL(ashiftrt_r4_2))
  192.87 ++	ENDFUNC(GLOBAL(ashiftrt_r4_3))
  192.88 ++	ENDFUNC(GLOBAL(ashiftrt_r4_4))
  192.89 ++	ENDFUNC(GLOBAL(ashiftrt_r4_5))
  192.90 ++	ENDFUNC(GLOBAL(ashiftrt_r4_6))
  192.91 ++	ENDFUNC(GLOBAL(ashiftrt_r4_7))
  192.92 ++	ENDFUNC(GLOBAL(ashiftrt_r4_8))
  192.93 ++	ENDFUNC(GLOBAL(ashiftrt_r4_9))
  192.94 ++	ENDFUNC(GLOBAL(ashiftrt_r4_10))
  192.95 ++	ENDFUNC(GLOBAL(ashiftrt_r4_11))
  192.96 ++	ENDFUNC(GLOBAL(ashiftrt_r4_12))
  192.97 ++	ENDFUNC(GLOBAL(ashiftrt_r4_13))
  192.98 ++	ENDFUNC(GLOBAL(ashiftrt_r4_14))
  192.99 ++	ENDFUNC(GLOBAL(ashiftrt_r4_15))
 192.100 ++	ENDFUNC(GLOBAL(ashiftrt_r4_16))
 192.101 ++	ENDFUNC(GLOBAL(ashiftrt_r4_17))
 192.102 ++	ENDFUNC(GLOBAL(ashiftrt_r4_18))
 192.103 ++	ENDFUNC(GLOBAL(ashiftrt_r4_19))
 192.104 ++	ENDFUNC(GLOBAL(ashiftrt_r4_20))
 192.105 ++	ENDFUNC(GLOBAL(ashiftrt_r4_21))
 192.106 ++	ENDFUNC(GLOBAL(ashiftrt_r4_22))
 192.107 ++	ENDFUNC(GLOBAL(ashiftrt_r4_23))
 192.108 ++	ENDFUNC(GLOBAL(ashiftrt_r4_24))
 192.109 ++	ENDFUNC(GLOBAL(ashiftrt_r4_25))
 192.110 ++	ENDFUNC(GLOBAL(ashiftrt_r4_26))
 192.111 ++	ENDFUNC(GLOBAL(ashiftrt_r4_27))
 192.112 ++	ENDFUNC(GLOBAL(ashiftrt_r4_28))
 192.113 ++	ENDFUNC(GLOBAL(ashiftrt_r4_29))
 192.114 ++	ENDFUNC(GLOBAL(ashiftrt_r4_30))
 192.115 ++	ENDFUNC(GLOBAL(ashiftrt_r4_31))
 192.116 ++	ENDFUNC(GLOBAL(ashiftrt_r4_32))
 192.117 + #endif
 192.118 + 
 192.119 + #ifdef L_ashiftrt_n
 192.120 +@@ -188,6 +261,7 @@
 192.121 + !
 192.122 + 
 192.123 + 	.global	GLOBAL(ashrsi3)
 192.124 ++	FUNC(GLOBAL(ashrsi3))
 192.125 + 	.align	2
 192.126 + GLOBAL(ashrsi3):
 192.127 + 	mov	#31,r0
 192.128 +@@ -315,6 +389,7 @@
 192.129 + 	rts
 192.130 + 	nop
 192.131 + 
 192.132 ++	ENDFUNC(GLOBAL(ashrsi3))
 192.133 + #endif
 192.134 + 
 192.135 + #ifdef L_ashiftlt
 192.136 +@@ -336,6 +411,7 @@
 192.137 + ! (none)
 192.138 + !
 192.139 + 	.global	GLOBAL(ashlsi3)
 192.140 ++	FUNC(GLOBAL(ashlsi3))
 192.141 + 	.align	2
 192.142 + GLOBAL(ashlsi3):
 192.143 + 	mov	#31,r0
 192.144 +@@ -472,6 +548,7 @@
 192.145 + 	rts
 192.146 + 	nop
 192.147 + 
 192.148 ++	ENDFUNC(GLOBAL(ashlsi3))
 192.149 + #endif
 192.150 + 
 192.151 + #ifdef L_lshiftrt
 192.152 +@@ -493,6 +570,7 @@
 192.153 + ! (none)
 192.154 + !
 192.155 + 	.global	GLOBAL(lshrsi3)
 192.156 ++	FUNC(GLOBAL(lshrsi3))
 192.157 + 	.align	2
 192.158 + GLOBAL(lshrsi3):
 192.159 + 	mov	#31,r0
 192.160 +@@ -629,6 +707,7 @@
 192.161 + 	rts
 192.162 + 	nop
 192.163 + 
 192.164 ++	ENDFUNC(GLOBAL(lshrsi3))
 192.165 + #endif
 192.166 + 
 192.167 + #ifdef L_movstr
 192.168 +@@ -645,76 +724,113 @@
 192.169 + 	add	#64,r4
 192.170 + 	.align	4
 192.171 + 	.global	GLOBAL(movstrSI64)
 192.172 ++	FUNC(GLOBAL(movstrSI64))
 192.173 + GLOBAL(movstrSI64):
 192.174 + 	mov.l	@(60,r5),r0
 192.175 + 	mov.l	r0,@(60,r4)
 192.176 + 	.global	GLOBAL(movstrSI60)
 192.177 ++	FUNC(GLOBAL(movstrSI60))
 192.178 + GLOBAL(movstrSI60):
 192.179 + 	mov.l	@(56,r5),r0
 192.180 + 	mov.l	r0,@(56,r4)
 192.181 + 	.global	GLOBAL(movstrSI56)
 192.182 ++	FUNC(GLOBAL(movstrSI56))
 192.183 + GLOBAL(movstrSI56):
 192.184 + 	mov.l	@(52,r5),r0
 192.185 + 	mov.l	r0,@(52,r4)
 192.186 + 	.global	GLOBAL(movstrSI52)
 192.187 ++	FUNC(GLOBAL(movstrSI52))
 192.188 + GLOBAL(movstrSI52):
 192.189 + 	mov.l	@(48,r5),r0
 192.190 + 	mov.l	r0,@(48,r4)
 192.191 + 	.global	GLOBAL(movstrSI48)
 192.192 ++	FUNC(GLOBAL(movstrSI48))
 192.193 + GLOBAL(movstrSI48):
 192.194 + 	mov.l	@(44,r5),r0
 192.195 + 	mov.l	r0,@(44,r4)
 192.196 + 	.global	GLOBAL(movstrSI44)
 192.197 ++	FUNC(GLOBAL(movstrSI44))
 192.198 + GLOBAL(movstrSI44):
 192.199 + 	mov.l	@(40,r5),r0
 192.200 + 	mov.l	r0,@(40,r4)
 192.201 + 	.global	GLOBAL(movstrSI40)
 192.202 ++	FUNC(GLOBAL(movstrSI40))
 192.203 + GLOBAL(movstrSI40):
 192.204 + 	mov.l	@(36,r5),r0
 192.205 + 	mov.l	r0,@(36,r4)
 192.206 + 	.global	GLOBAL(movstrSI36)
 192.207 ++	FUNC(GLOBAL(movstrSI36))
 192.208 + GLOBAL(movstrSI36):
 192.209 + 	mov.l	@(32,r5),r0
 192.210 + 	mov.l	r0,@(32,r4)
 192.211 + 	.global	GLOBAL(movstrSI32)
 192.212 ++	FUNC(GLOBAL(movstrSI32))
 192.213 + GLOBAL(movstrSI32):
 192.214 + 	mov.l	@(28,r5),r0
 192.215 + 	mov.l	r0,@(28,r4)
 192.216 + 	.global	GLOBAL(movstrSI28)
 192.217 ++	FUNC(GLOBAL(movstrSI28))
 192.218 + GLOBAL(movstrSI28):
 192.219 + 	mov.l	@(24,r5),r0
 192.220 + 	mov.l	r0,@(24,r4)
 192.221 + 	.global	GLOBAL(movstrSI24)
 192.222 ++	FUNC(GLOBAL(movstrSI24))
 192.223 + GLOBAL(movstrSI24):
 192.224 + 	mov.l	@(20,r5),r0
 192.225 + 	mov.l	r0,@(20,r4)
 192.226 + 	.global	GLOBAL(movstrSI20)
 192.227 ++	FUNC(GLOBAL(movstrSI20))
 192.228 + GLOBAL(movstrSI20):
 192.229 + 	mov.l	@(16,r5),r0
 192.230 + 	mov.l	r0,@(16,r4)
 192.231 + 	.global	GLOBAL(movstrSI16)
 192.232 ++	FUNC(GLOBAL(movstrSI16))
 192.233 + GLOBAL(movstrSI16):
 192.234 + 	mov.l	@(12,r5),r0
 192.235 + 	mov.l	r0,@(12,r4)
 192.236 + 	.global	GLOBAL(movstrSI12)
 192.237 ++	FUNC(GLOBAL(movstrSI12))
 192.238 + GLOBAL(movstrSI12):
 192.239 + 	mov.l	@(8,r5),r0
 192.240 + 	mov.l	r0,@(8,r4)
 192.241 + 	.global	GLOBAL(movstrSI8)
 192.242 ++	FUNC(GLOBAL(movstrSI8))
 192.243 + GLOBAL(movstrSI8):
 192.244 + 	mov.l	@(4,r5),r0
 192.245 + 	mov.l	r0,@(4,r4)
 192.246 + 	.global	GLOBAL(movstrSI4)
 192.247 ++	FUNC(GLOBAL(movstrSI4))
 192.248 + GLOBAL(movstrSI4):
 192.249 + 	mov.l	@(0,r5),r0
 192.250 + 	mov.l	r0,@(0,r4)
 192.251 ++	.global	GLOBAL(movstrSI0)
 192.252 ++	FUNC(GLOBAL(movstrSI0))
 192.253 + GLOBAL(movstrSI0):
 192.254 + 	rts
 192.255 + 	nop
 192.256 + 
 192.257 ++	ENDFUNC(GLOBAL(movstrSI64))
 192.258 ++	ENDFUNC(GLOBAL(movstrSI60))
 192.259 ++	ENDFUNC(GLOBAL(movstrSI56))
 192.260 ++	ENDFUNC(GLOBAL(movstrSI52))
 192.261 ++	ENDFUNC(GLOBAL(movstrSI48))
 192.262 ++	ENDFUNC(GLOBAL(movstrSI44))
 192.263 ++	ENDFUNC(GLOBAL(movstrSI40))
 192.264 ++	ENDFUNC(GLOBAL(movstrSI36))
 192.265 ++	ENDFUNC(GLOBAL(movstrSI32))
 192.266 ++	ENDFUNC(GLOBAL(movstrSI28))
 192.267 ++	ENDFUNC(GLOBAL(movstrSI24))
 192.268 ++	ENDFUNC(GLOBAL(movstrSI20))
 192.269 ++	ENDFUNC(GLOBAL(movstrSI16))
 192.270 ++	ENDFUNC(GLOBAL(movstrSI12))
 192.271 ++	ENDFUNC(GLOBAL(movstrSI8))
 192.272 ++	ENDFUNC(GLOBAL(movstrSI4))
 192.273 ++	ENDFUNC(GLOBAL(movstrSI0))
 192.274 ++
 192.275 + 	.align	4
 192.276 + 
 192.277 + 	.global	GLOBAL(movstr)
 192.278 ++	FUNC(GLOBAL(movstr))
 192.279 + GLOBAL(movstr):
 192.280 + 	mov.l	@(60,r5),r0
 192.281 + 	mov.l	r0,@(60,r4)
 192.282 +@@ -771,6 +887,8 @@
 192.283 + 	add	#64,r5
 192.284 + 	bra	GLOBAL(movstr)
 192.285 + 	add	#64,r4
 192.286 ++
 192.287 ++	FUNC(GLOBAL(movstr))
 192.288 + #endif
 192.289 + 
 192.290 + #ifdef L_movstr_i4
 192.291 +@@ -779,6 +897,10 @@
 192.292 + 	.global	GLOBAL(movstr_i4_odd)
 192.293 + 	.global	GLOBAL(movstrSI12_i4)
 192.294 + 
 192.295 ++	FUNC(GLOBAL(movstr_i4_even))
 192.296 ++	FUNC(GLOBAL(movstr_i4_odd))
 192.297 ++	FUNC(GLOBAL(movstrSI12_i4))
 192.298 ++
 192.299 + 	.p2align	5
 192.300 + L_movstr_2mod4_end:
 192.301 + 	mov.l	r0,@(16,r4)
 192.302 +@@ -787,6 +909,11 @@
 192.303 + 
 192.304 + 	.p2align	2
 192.305 + 
 192.306 ++GLOBAL(movstr_i4_even):
 192.307 ++	mov.l	@r5+,r0
 192.308 ++	bra	L_movstr_start_even
 192.309 ++	mov.l	@r5+,r1
 192.310 ++
 192.311 + GLOBAL(movstr_i4_odd):
 192.312 + 	mov.l	@r5+,r1
 192.313 + 	add	#-4,r4
 192.314 +@@ -813,10 +940,8 @@
 192.315 + 	rts
 192.316 + 	mov.l	r3,@(12,r4)
 192.317 + 
 192.318 +-GLOBAL(movstr_i4_even):
 192.319 +-	mov.l	@r5+,r0
 192.320 +-	bra	L_movstr_start_even
 192.321 +-	mov.l	@r5+,r1
 192.322 ++	ENDFUNC(GLOBAL(movstr_i4_even))
 192.323 ++	ENDFUNC(GLOBAL(movstr_i4_odd))
 192.324 + 
 192.325 + 	.p2align	4
 192.326 + GLOBAL(movstrSI12_i4):
 192.327 +@@ -827,12 +952,15 @@
 192.328 + 	mov.l	r1,@(4,r4)
 192.329 + 	rts
 192.330 + 	mov.l	r2,@(8,r4)
 192.331 ++
 192.332 ++	ENDFUNC(GLOBAL(movstrSI12_i4))
 192.333 + #endif
 192.334 + 
 192.335 + #ifdef L_mulsi3
 192.336 + 
 192.337 + 
 192.338 + 	.global	GLOBAL(mulsi3)
 192.339 ++	FUNC(GLOBAL(mulsi3))
 192.340 + 
 192.341 + ! r4 =       aabb
 192.342 + ! r5 =       ccdd
 192.343 +@@ -865,7 +993,7 @@
 192.344 + 	rts
 192.345 + 	add	r2,r0
 192.346 + 
 192.347 +-
 192.348 ++	FUNC(GLOBAL(mulsi3))
 192.349 + #endif
 192.350 + #endif /* ! __SH5__ */
 192.351 + #ifdef L_sdivsi3_i4
 192.352 +@@ -875,6 +1003,7 @@
 192.353 + !! args in r4 and r5, result in fpul, clobber dr0, dr2
 192.354 + 
 192.355 + 	.global	GLOBAL(sdivsi3_i4)
 192.356 ++	FUNC(GLOBAL(sdivsi3_i4))
 192.357 + GLOBAL(sdivsi3_i4):
 192.358 + 	lds r4,fpul
 192.359 + 	float fpul,dr0
 192.360 +@@ -884,6 +1013,7 @@
 192.361 + 	rts
 192.362 + 	ftrc dr0,fpul
 192.363 + 
 192.364 ++	ENDFUNC(GLOBAL(sdivsi3_i4))
 192.365 + #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__)
 192.366 + !! args in r4 and r5, result in fpul, clobber r2, dr0, dr2
 192.367 + 
 192.368 +@@ -892,6 +1022,7 @@
 192.369 + 	.mode	SHcompact
 192.370 + #endif
 192.371 + 	.global	GLOBAL(sdivsi3_i4)
 192.372 ++	FUNC(GLOBAL(sdivsi3_i4))
 192.373 + GLOBAL(sdivsi3_i4):
 192.374 + 	sts.l fpscr,@-r15
 192.375 + 	mov #8,r2
 192.376 +@@ -906,6 +1037,7 @@
 192.377 + 	rts
 192.378 + 	lds.l @r15+,fpscr
 192.379 + 
 192.380 ++	ENDFUNC(GLOBAL(sdivsi3_i4))
 192.381 + #endif /* ! __SH5__ || __SH5__ == 32 */
 192.382 + #endif /* ! __SH4__ */
 192.383 + #endif
 192.384 +@@ -920,9 +1052,10 @@
 192.385 + !!
 192.386 + !!
 192.387 + 
 192.388 +-!! args in r4 and r5, result in r0 clobber r1,r2,r3
 192.389 ++!! args in r4 and r5, result in r0 clobber r1, r2, r3, and t bit
 192.390 + 
 192.391 + 	.global	GLOBAL(sdivsi3)
 192.392 ++	FUNC(GLOBAL(sdivsi3))
 192.393 + #if __SHMEDIA__
 192.394 + #if __SH5__ == 32
 192.395 + 	.section	.text..SHmedia32,"ax"
 192.396 +@@ -1166,6 +1299,7 @@
 192.397 + div0:	rts
 192.398 + 	mov	#0,r0
 192.399 + 
 192.400 ++	ENDFUNC(GLOBAL(sdivsi3))
 192.401 + #endif /* ! __SHMEDIA__ */
 192.402 + #endif /* ! __SH4__ */
 192.403 + #endif
 192.404 +@@ -1174,9 +1308,11 @@
 192.405 + 	.title "SH DIVIDE"
 192.406 + !! 4 byte integer Divide code for the Hitachi SH
 192.407 + #ifdef __SH4__
 192.408 +-!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
 192.409 ++!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4,
 192.410 ++!! and t bit
 192.411 + 
 192.412 + 	.global	GLOBAL(udivsi3_i4)
 192.413 ++	FUNC(GLOBAL(udivsi3_i4))
 192.414 + GLOBAL(udivsi3_i4):
 192.415 + 	mov #1,r1
 192.416 + 	cmp/hi r1,r5
 192.417 +@@ -1217,11 +1353,13 @@
 192.418 + L1:
 192.419 + 	.double 2147483648
 192.420 + 
 192.421 ++	ENDFUNC(GLOBAL(udivsi3_i4))
 192.422 + #elif defined (__SH5__) && ! defined (__SH4_NOFPU__)
 192.423 + #if ! __SH5__ || __SH5__ == 32
 192.424 + !! args in r4 and r5, result in fpul, clobber r20, r21, dr0, fr33
 192.425 + 	.mode	SHmedia
 192.426 + 	.global	GLOBAL(udivsi3_i4)
 192.427 ++	FUNC(GLOBAL(udivsi3_i4))
 192.428 + GLOBAL(udivsi3_i4):
 192.429 + 	addz.l	r4,r63,r20
 192.430 + 	addz.l	r5,r63,r21
 192.431 +@@ -1234,6 +1372,8 @@
 192.432 + 	ftrc.dq dr0,dr32
 192.433 + 	fmov.s fr33,fr32
 192.434 + 	blink tr0,r63
 192.435 ++
 192.436 ++	ENDFUNC(GLOBAL(udivsi3_i4))
 192.437 + #endif /* ! __SH5__ || __SH5__ == 32 */
 192.438 + #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__)
 192.439 + !! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
 192.440 +@@ -1287,6 +1427,7 @@
 192.441 + #endif
 192.442 + 	.double 2147483648
 192.443 + 
 192.444 ++	ENDFUNC(GLOBAL(udivsi3_i4))
 192.445 + #endif /* ! __SH4__ */
 192.446 + #endif
 192.447 + 
 192.448 +@@ -1297,6 +1438,7 @@
 192.449 + 
 192.450 + !! args in r4 and r5, result in r0, clobbers r4, pr, and t bit
 192.451 + 	.global	GLOBAL(udivsi3)
 192.452 ++	FUNC(GLOBAL(udivsi3))
 192.453 + 
 192.454 + #if __SHMEDIA__
 192.455 + #if __SH5__ == 32
 192.456 +@@ -1485,6 +1627,7 @@
 192.457 +  rts
 192.458 +  rotcl r0
 192.459 + 
 192.460 ++	ENDFUNC(GLOBAL(udivsi3))
 192.461 + #endif /* ! __SHMEDIA__ */
 192.462 + #endif /* __SH4__ */
 192.463 + #endif /* L_udivsi3 */
 192.464 +@@ -1790,6 +1933,7 @@
 192.465 + 	.mode	SHcompact
 192.466 + #endif
 192.467 + 	.global GLOBAL(set_fpscr)
 192.468 ++	FUNC(GLOBAL(set_fpscr))
 192.469 + GLOBAL(set_fpscr):
 192.470 + 	lds r4,fpscr
 192.471 + 	mov.l LOCAL(set_fpscr_L1),r1
 192.472 +@@ -1822,6 +1966,8 @@
 192.473 + 	.align 2
 192.474 + LOCAL(set_fpscr_L1):
 192.475 + 	.long GLOBAL(fpscr_values)
 192.476 ++
 192.477 ++	ENDFUNC(GLOBAL(set_fpscr))
 192.478 + #ifdef __ELF__
 192.479 +         .comm   GLOBAL(fpscr_values),8,4
 192.480 + #else
 192.481 +@@ -1860,6 +2006,7 @@
 192.482 + 	blink	tr0, r63
 192.483 + #elif defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
 192.484 + 	.global GLOBAL(ic_invalidate)
 192.485 ++	FUNC(GLOBAL(ic_invalidate))
 192.486 + GLOBAL(ic_invalidate):
 192.487 + 	ocbwb	@r4
 192.488 + 	mova	0f,r0
 192.489 +@@ -1882,6 +2029,8 @@
 192.490 + 	nop
 192.491 + 	.endr
 192.492 + 	.endr
 192.493 ++
 192.494 ++	ENDFUNC(GLOBAL(ic_invalidate))
 192.495 + #endif /* SH4 */
 192.496 + #endif /* L_ic_invalidate */
 192.497 + 
 192.498 +@@ -1940,6 +2089,7 @@
 192.499 + 	will be expanded into r2/r3 upon return.  */
 192.500 + 	
 192.501 + 	.global	GLOBAL(GCC_shcompact_call_trampoline)
 192.502 ++	FUNC(GLOBAL(GCC_shcompact_call_trampoline))
 192.503 + GLOBAL(GCC_shcompact_call_trampoline):
 192.504 + 	ptabs/l	r0, tr0	/* Prepare to call the actual function.  */
 192.505 + 	movi	((datalabel LOCAL(ct_main_table) - 31 * 2) >> 16) & 65535, r0
 192.506 +@@ -2290,6 +2440,8 @@
 192.507 + 	shari	r2, 32, r2
 192.508 + #endif
 192.509 + 	blink	tr0, r63
 192.510 ++
 192.511 ++	ENDFUNC(GLOBAL(GCC_shcompact_call_trampoline))
 192.512 + #endif /* L_shcompact_call_trampoline */
 192.513 + 
 192.514 + #ifdef L_shcompact_return_trampoline
 192.515 +@@ -2302,6 +2454,7 @@
 192.516 + 	.section	.text..SHmedia32, "ax"
 192.517 + 	.align	2
 192.518 + 	.global	GLOBAL(GCC_shcompact_return_trampoline)
 192.519 ++	FUNC(GLOBAL(GCC_shcompact_return_trampoline))
 192.520 + GLOBAL(GCC_shcompact_return_trampoline):
 192.521 + 	ptabs/l	r18, tr0
 192.522 + #if __LITTLE_ENDIAN__
 192.523 +@@ -2313,6 +2466,8 @@
 192.524 + #endif
 192.525 + 	or	r3, r2, r2
 192.526 + 	blink	tr0, r63
 192.527 ++
 192.528 ++	ENDFUNC(GLOBAL(GCC_shcompact_return_trampoline))
 192.529 + #endif /* L_shcompact_return_trampoline */
 192.530 + 
 192.531 + #ifdef L_shcompact_incoming_args
 192.532 +@@ -2367,6 +2522,7 @@
 192.533 + 	actual bit pattern.  */
 192.534 + 	
 192.535 + 	.global	GLOBAL(GCC_shcompact_incoming_args)
 192.536 ++	FUNC(GLOBAL(GCC_shcompact_incoming_args))
 192.537 + GLOBAL(GCC_shcompact_incoming_args):
 192.538 + 	ptabs/l	r18, tr0	/* Prepare to return.  */
 192.539 + 	shlri	r17, 32, r0	/* Load the cookie.  */
 192.540 +@@ -2519,6 +2675,7 @@
 192.541 + LOCAL(ia_return):	/* Return.  */
 192.542 + 	blink	tr0, r63
 192.543 + LOCAL(ia_end_of_push_seq): /* Label used to compute the first push instruction.  */
 192.544 ++	ENDFUNC(GLOBAL(GCC_shcompact_incoming_args))
 192.545 + #endif /* L_shcompact_incoming_args */
 192.546 + #endif
 192.547 + #if __SH5__
 192.548 +@@ -2530,6 +2687,7 @@
 192.549 + #endif
 192.550 + 	.align	3 /* It is copied in units of 8 bytes in SHmedia mode.  */
 192.551 + 	.global	GLOBAL(GCC_nested_trampoline)
 192.552 ++	FUNC(GLOBAL(GCC_nested_trampoline))
 192.553 + GLOBAL(GCC_nested_trampoline):
 192.554 + 	.mode	SHmedia
 192.555 + 	ptrel/u	r63, tr0
 192.556 +@@ -2546,6 +2704,8 @@
 192.557 + 	ld.l	r0, 28, r1
 192.558 + #endif
 192.559 + 	blink	tr1, r63
 192.560 ++
 192.561 ++	ENDFUNC(GLOBAL(GCC_nested_trampoline))
 192.562 + #endif /* L_nested_trampoline */
 192.563 + #endif /* __SH5__ */
 192.564 + #if __SH5__ == 32
 192.565 +@@ -2555,6 +2715,7 @@
 192.566 + 	.align	2
 192.567 + #ifndef __SH4_NOFPU__	
 192.568 + 	.global	GLOBAL(GCC_push_shmedia_regs)
 192.569 ++	FUNC(GLOBAL(GCC_push_shmedia_regs))
 192.570 + GLOBAL(GCC_push_shmedia_regs):
 192.571 + 	addi.l	r15, -14*8, r15
 192.572 + 	fst.d	r15, 13*8, dr62
 192.573 +@@ -2573,6 +2734,7 @@
 192.574 + 	fst.d	r15,  0*8, dr36
 192.575 + #endif
 192.576 + 	.global	GLOBAL(GCC_push_shmedia_regs_nofpu)
 192.577 ++	FUNC(GLOBAL(GCC_push_shmedia_regs_nofpu))
 192.578 + GLOBAL(GCC_push_shmedia_regs_nofpu):
 192.579 + 	ptabs/l	r18, tr0
 192.580 + 	addi.l	r15, -27*8, r15
 192.581 +@@ -2608,8 +2770,13 @@
 192.582 + 	st.q	r15,  0*8, r28
 192.583 + 	blink	tr0, r63
 192.584 + 
 192.585 ++#ifndef __SH4_NOFPU__	
 192.586 ++	ENDFUNC(GLOBAL(GCC_push_shmedia_regs))
 192.587 ++#endif
 192.588 ++	ENDFUNC(GLOBAL(GCC_push_shmedia_regs_nofpu))
 192.589 + #ifndef __SH4_NOFPU__
 192.590 + 	.global	GLOBAL(GCC_pop_shmedia_regs)
 192.591 ++	FUNC(GLOBAL(GCC_pop_shmedia_regs))
 192.592 + GLOBAL(GCC_pop_shmedia_regs):
 192.593 + 	pt	.L0, tr1
 192.594 + 	movi	41*8, r0
 192.595 +@@ -2630,6 +2797,7 @@
 192.596 + 	blink	tr1, r63
 192.597 + #endif
 192.598 + 	.global	GLOBAL(GCC_pop_shmedia_regs_nofpu)
 192.599 ++	FUNC(GLOBAL(GCC_pop_shmedia_regs_nofpu))
 192.600 + GLOBAL(GCC_pop_shmedia_regs_nofpu):
 192.601 + 	movi	27*8, r0
 192.602 + .L0:
 192.603 +@@ -2666,5 +2834,10 @@
 192.604 + 	ld.q	r15,  0*8, r28
 192.605 + 	add.l	r15, r0, r15
 192.606 + 	blink	tr0, r63
 192.607 ++
 192.608 ++#ifndef __SH4_NOFPU__
 192.609 ++	ENDFUNC(GLOBAL(GCC_pop_shmedia_regs))
 192.610 ++#endif
 192.611 ++	ENDFUNC(GLOBAL(GCC_pop_shmedia_regs_nofpu))
 192.612 + #endif /* __SH5__ == 32 */
 192.613 + #endif /* L_push_pop_shmedia_regs */
   193.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   193.2 +++ b/patches/gcc/3.3.3/sh-pic-set_fpscr-gcc-3.3.2.patch	Sat Feb 24 11:00:05 2007 +0000
   193.3 @@ -0,0 +1,67 @@
   193.4 +See http://gcc.gnu.org/PR11901
   193.5 +Should fix
   193.6 +make[2]: *** [/gcc-3.3-glibc-2.3.2/build-glibc/elf/check-textrel.out] Error 1 
   193.7 +in glibc's "make tests".
   193.8 +
   193.9 +Note: this patch is named
  193.10 +sh-pic-set_fpscr-gcc-3.3.2.patch
  193.11 +and must be applied after 
  193.12 +sh-lib1funcs_sizeAndType.patch
  193.13 +but that'll happen naturally if you apply them in alphabetical order.
  193.14 +
  193.15 +-------------
  193.16 +
  193.17 +Date: Wed, 30 Jul 2003 12:03:01 +0900
  193.18 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
  193.19 +Subject: [linux-sh:02916] Re: Writing PIC version of __udivsi3_i4? (was: Re: "make tests" fails
  193.20 + with "libc.so: text relocations used" in glibc-2.3.2 for sh4)
  193.21 +To: dank@kegel.com
  193.22 +Cc: linux-sh@m17n.org
  193.23 +Message-Id: <200307300255.h6U2tB906928@r-rr.iij4u.or.jp>
  193.24 +
  193.25 +> I'll try to write the PIC version of it,
  193.26 +
  193.27 +Dan, does the attached patch work for you?
  193.28 +
  193.29 +Regards,
  193.30 +	kaz
  193.31 +--
  193.32 +diff -u3prN ORIG/gcc/gcc/config/sh/lib1funcs.asm LOCAL/gcc/gcc/config/sh/lib1funcs.asm
  193.33 +--- ORIG/gcc/gcc/config/sh/lib1funcs.asm	Thu Jun 19 07:38:59 2003
  193.34 ++++ gcc-3.3.2/gcc/config/sh/lib1funcs.asm	Wed Jul 30 11:08:49 2003
  193.35 +@@ -1936,7 +1944,17 @@ GLOBAL(moddi3):
  193.36 + 	FUNC(GLOBAL(set_fpscr))
  193.37 + GLOBAL(set_fpscr):
  193.38 + 	lds r4,fpscr
  193.39 ++#ifdef __PIC__
  193.40 ++	mov.l	r12,@-r15
  193.41 ++	mova	LOCAL(set_fpscr_L0),r0
  193.42 ++	mov.l	LOCAL(set_fpscr_L0),r12
  193.43 ++	add	r0,r12
  193.44 ++	mov.l	LOCAL(set_fpscr_L1),r0
  193.45 ++	mov.l	@(r0,r12),r1
  193.46 ++	mov.l	@r15+,r12
  193.47 ++#else
  193.48 + 	mov.l LOCAL(set_fpscr_L1),r1
  193.49 ++#endif
  193.50 + 	swap.w r4,r0
  193.51 + 	or #24,r0
  193.52 + #ifndef FMOVD_WORKS
  193.53 +@@ -1964,8 +1982,15 @@ GLOBAL(set_fpscr):
  193.54 + 	mov.l r3,@(4,r1)
  193.55 + #endif
  193.56 + 	.align 2
  193.57 ++#ifdef __PIC__
  193.58 ++LOCAL(set_fpscr_L0):
  193.59 ++	.long _GLOBAL_OFFSET_TABLE_
  193.60 ++LOCAL(set_fpscr_L1):
  193.61 ++	.long GLOBAL(fpscr_values@GOT)
  193.62 ++#else
  193.63 + LOCAL(set_fpscr_L1):
  193.64 + 	.long GLOBAL(fpscr_values)
  193.65 ++#endif
  193.66 + 
  193.67 + 	ENDFUNC(GLOBAL(set_fpscr))
  193.68 + #ifndef NO_FPSCR_VALUES
  193.69 +
  193.70 +
   194.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   194.2 +++ b/patches/gcc/3.3.3/thunk3.patch	Sat Feb 24 11:00:05 2007 +0000
   194.3 @@ -0,0 +1,23 @@
   194.4 +Fixes 
   194.5 +FAIL: g++.jason/thunk3.C (test for excess errors)
   194.6 +on sh4-unknown-linux-gnu.
   194.7 +
   194.8 +Does any sh variant *not* use the generic thunk support?  If so, the patch should be
   194.9 +more cautious.  As it is, it excludes all sh processors from this test.
  194.10 +
  194.11 +Index: thunk3.C
  194.12 +===================================================================
  194.13 +RCS file: /cvsroot/gcc/gcc/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C,v
  194.14 +retrieving revision 1.13
  194.15 +diff -u -d -u -r1.13 thunk3.C
  194.16 +--- gcc-ss-3_3-20030714/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C.old	25 Mar 2002 17:57:03 -0000	1.13
  194.17 ++++ gcc-ss-3_3-20030714/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C	20 Jul 2003 16:57:38 -0000
  194.18 +@@ -2,7 +2,7 @@
  194.19 + // Note that this will break on any target that uses the generic thunk
  194.20 + //  support, because it doesn't support variadic functions.
  194.21 + 
  194.22 +-// excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3  mn10300-*-* mn10200-*-* v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa-*-*
  194.23 ++// excess errors test - XFAIL mips*-*-* rs6000-*-* powerpc-*-eabi m68k-*-coff m68k-motorola-sysv m88k-motorola-sysv3  mn10300-*-* mn10200-*-* v850-*-* sh*-*-* h8*-*-* xtensa-*-*
  194.24 + 
  194.25 + #include <stdarg.h>
  194.26 + 
   195.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   195.2 +++ b/patches/gcc/3.3.4/gcc-3.3.4-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   195.3 @@ -0,0 +1,62 @@
   195.4 +diff -urN gcc-3.3.4.orig/gcc/config/arm/linux-elf.h gcc-3.3.4/gcc/config/arm/linux-elf.h
   195.5 +--- gcc-3.3.4.orig/gcc/config/arm/linux-elf.h	2004-03-30 22:43:45.000000000 +0200
   195.6 ++++ gcc-3.3.4/gcc/config/arm/linux-elf.h	2004-08-20 02:13:02.969084177 +0200
   195.7 +@@ -30,17 +30,31 @@
   195.8 + /* Do not assume anything about header files.  */
   195.9 + #define NO_IMPLICIT_EXTERN_C
  195.10 + 
  195.11 ++/*
  195.12 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  195.13 ++ * (big endian) configurations.
  195.14 ++ */
  195.15 ++#if TARGET_BIG_ENDIAN_DEFAULT
  195.16 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
  195.17 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  195.18 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  195.19 ++#else
  195.20 ++#define TARGET_ENDIAN_DEFAULT 0
  195.21 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  195.22 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  195.23 ++#endif
  195.24 ++
  195.25 + /* Default is to use APCS-32 mode.  */
  195.26 + #undef  TARGET_DEFAULT
  195.27 +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
  195.28 ++#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS | TARGET_ENDIAN_DEFAULT)
  195.29 + 
  195.30 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  195.31 + 
  195.32 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  195.33 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  195.34 + 
  195.35 + #undef  MULTILIB_DEFAULTS
  195.36 + #define MULTILIB_DEFAULTS \
  195.37 +-	{ "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  195.38 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  195.39 + 
  195.40 + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
  195.41 + 
  195.42 +@@ -88,7 +102,7 @@
  195.43 +    %{rdynamic:-export-dynamic} \
  195.44 +    %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  195.45 +    -X \
  195.46 +-   %{mbig-endian:-EB}" \
  195.47 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  195.48 +    SUBTARGET_EXTRA_LINK_SPEC
  195.49 + 
  195.50 + #define TARGET_OS_CPP_BUILTINS()		\
  195.51 +diff -urN gcc-3.3.4.orig/gcc/config.gcc gcc-3.3.4/gcc/config.gcc
  195.52 +--- gcc-3.3.4.orig/gcc/config.gcc	2004-04-29 06:42:47.000000000 +0200
  195.53 ++++ gcc-3.3.4/gcc/config.gcc	2004-08-20 02:11:04.326143343 +0200
  195.54 +@@ -699,6 +699,11 @@
  195.55 + 	;;
  195.56 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  195.57 + 	tm_file="dbxelf.h elfos.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
  195.58 ++	case $machine in
  195.59 ++	arm*b-*)
  195.60 ++		tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
  195.61 ++		;;
  195.62 ++	esac
  195.63 + 	tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
  195.64 + 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  195.65 + 	gnu_ld=yes
   196.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   196.2 +++ b/patches/gcc/3.3.4/gcc-3.3.4-arm-pr22528.patch	Sat Feb 24 11:00:05 2007 +0000
   196.3 @@ -0,0 +1,71 @@
   196.4 +From http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00832.html, by
   196.5 +Richard Earnshaw.  Fixes http://gcc.gnu.org/PR22528
   196.6 +
   196.7 +--- gcc-3.3.4/gcc/config/arm/arm.md.orig	2004-03-30 22:43:44.000000000 +0200
   196.8 ++++ gcc-3.3.4/gcc/config/arm/arm.md	2005-08-15 12:21:55.000000000 +0200
   196.9 +@@ -4275,7 +4275,7 @@
  196.10 +    (set (match_dup 2)
  196.11 + 	(ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
  196.12 +    ;; store the high byte
  196.13 +-   (set (match_dup 4) (subreg:QI (match_dup 2) 0))]	;explicit subreg safe
  196.14 ++   (set (match_dup 4) (match_dup 5))]
  196.15 +   "TARGET_ARM"
  196.16 +   "
  196.17 +   {
  196.18 +@@ -4291,7 +4291,8 @@
  196.19 +     operands[1] = adjust_address (operands[1], QImode, 0);
  196.20 +     operands[3] = gen_lowpart (QImode, operands[0]);
  196.21 +     operands[0] = gen_lowpart (SImode, operands[0]);
  196.22 +-    operands[2] = gen_reg_rtx (SImode); 
  196.23 ++    operands[2] = gen_reg_rtx (SImode);
  196.24 ++    operands[5] = gen_lowpart (QImode, operands[2]);
  196.25 +   }"
  196.26 + )
  196.27 + 
  196.28 +@@ -4299,7 +4300,7 @@
  196.29 +   [(set (match_dup 4) (match_dup 3))
  196.30 +    (set (match_dup 2)
  196.31 + 	(ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
  196.32 +-   (set (match_operand 1 "" "")	(subreg:QI (match_dup 2) 3))]
  196.33 ++   (set (match_operand 1 "" "")	(match_dup 5))]
  196.34 +   "TARGET_ARM"
  196.35 +   "
  196.36 +   {
  196.37 +@@ -4316,13 +4317,14 @@
  196.38 +     operands[3] = gen_lowpart (QImode, operands[0]);
  196.39 +     operands[0] = gen_lowpart (SImode, operands[0]);
  196.40 +     operands[2] = gen_reg_rtx (SImode);
  196.41 ++    operands[5] = gen_lowpart (QImode, operands[2]);
  196.42 +   }"
  196.43 + )
  196.44 + 
  196.45 + ;; Subroutine to store a half word integer constant into memory.
  196.46 + (define_expand "storeinthi"
  196.47 +   [(set (match_operand 0 "" "")
  196.48 +-	(subreg:QI (match_operand 1 "" "") 0))
  196.49 ++	(match_operand 1 "" ""))
  196.50 +    (set (match_dup 3) (match_dup 2))]
  196.51 +   "TARGET_ARM"
  196.52 +   "
  196.53 +@@ -4363,6 +4365,7 @@
  196.54 +     operands[3] = adjust_address (op0, QImode, 1);
  196.55 +     operands[0] = adjust_address (operands[0], QImode, 0);
  196.56 +     operands[2] = gen_lowpart (QImode, operands[2]);
  196.57 ++    operands[1] = gen_lowpart (QImode, operands[1]);
  196.58 +   }"
  196.59 + )
  196.60 + 
  196.61 +@@ -4682,11 +4685,12 @@
  196.62 +    (set (match_dup 3)
  196.63 + 	(ashiftrt:SI (match_dup 2) (const_int 16)))
  196.64 +    (set (match_operand:HI 0 "s_register_operand" "")
  196.65 +-	(subreg:HI (match_dup 3) 0))]
  196.66 ++	(match_dup 4))]
  196.67 +   "TARGET_ARM"
  196.68 +   "
  196.69 +   operands[2] = gen_reg_rtx (SImode);
  196.70 +   operands[3] = gen_reg_rtx (SImode);
  196.71 ++  operands[4] = gen_lowpart (HImode, operands[3]);
  196.72 +   "
  196.73 + )
  196.74 + 
   197.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   197.2 +++ b/patches/gcc/3.3.4/gcc-3.3.4-libstdcxx-sh.patch	Sat Feb 24 11:00:05 2007 +0000
   197.3 @@ -0,0 +1,38 @@
   197.4 +Date: Tue, 06 Jul 2004 10:40:57 +0900 (JST)
   197.5 +Message-Id: <20040706.104057.48529182.kkojima@rr.iij4u.or.jp>
   197.6 +To: dank@kegel.com
   197.7 +Cc: linux-sh@m17n.org, linuxsh-dev@lists.sourceforge.net
   197.8 +Subject: gcc-3.4.1 (Was: The current kernel for a Jornada 680 SH3)
   197.9 +From: Kaz Kojima <kkojima@rr.iij4u.or.jp>
  197.10 +In-Reply-To: <20040529.175014.48668611.kkojima@rr.iij4u.or.jp>
  197.11 +References: <20040528.125858.50336810.kkojima@rr.iij4u.or.jp>
  197.12 +	<40B8205D.8030200@kegel.com>
  197.13 +	<20040529.175014.48668611.kkojima@rr.iij4u.or.jp>
  197.14 +
  197.15 +Hi,
  197.16 +
  197.17 +...
  197.18 +
  197.19 +BTW, gcc-3.3.4 was also released and there is a bad news :-(  Someone
  197.20 +reverted wrongly a configury patch against libstdc++ for sh-linux at
  197.21 +the last moment.  We have to regenerate gcc-3.3.4/libstdc++-v3/configure
  197.22 +with autoconf 2.13 or apply the one-line patch below manually:
  197.23 +
  197.24 +--- gcc-3.3.4-orig/libstdc++-v3/configure	2004-06-01 09:45:44.000000000 +0900
  197.25 ++++ gcc-3.3.4/libstdc++-v3/configure	2004-06-29 22:38:05.000000000 +0900
  197.26 +@@ -2009,7 +2009,7 @@ irix5* | irix6*)
  197.27 + # This must be Linux ELF.
  197.28 + linux-gnu*)
  197.29 +   case $host_cpu in
  197.30 +-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
  197.31 ++  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
  197.32 +     lt_cv_deplibs_check_method=pass_all ;;
  197.33 +   *)
  197.34 +     # glibc up to 2.1.1 does not perform some relocations on ARM
  197.35 +
  197.36 +
  197.37 +Regards,
  197.38 +	kaz
  197.39 +
  197.40 +
  197.41 +
   198.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   198.2 +++ b/patches/gcc/3.3.4/gcc-3.3.4-ppc-asm-spec.patch	Sat Feb 24 11:00:05 2007 +0000
   198.3 @@ -0,0 +1,86 @@
   198.4 +Based on gcc-3.4.0/gcc-3.3.3h-ppc-asm-spec.patch
   198.5 +
   198.6 +Fixes the following errors when building gcc for ppc7450:
   198.7 +
   198.8 +/tmp/ccj38uQs.s: Assembler messages:
   198.9 +/tmp/ccj38uQs.s:4370: Error: Unrecognized opcode: `mfvrsave'
  198.10 +/tmp/ccj38uQs.s:4404: Error: Unrecognized opcode: `stvx'
  198.11 +/tmp/ccj38uQs.s:4571: Error: Unrecognized opcode: `lvx'
  198.12 +/tmp/ccj38uQs.s:4572: Error: Unrecognized opcode: `mtvrsave'
  198.13 +make[2]: *** [libgcc/./unwind-dw2.o] Error 1
  198.14 +make[2]: Leaving directory `/opt/crosstool-0.28-rc35/build/powerpc-7450-linux-gnu/gcc-3.3.4-glibc-2.3.2/build-gcc-core/gcc'
  198.15 +make[1]: *** [stmp-multilib] Error 2
  198.16 +make[1]: Leaving directory `/opt/crosstool-0.28-rc35/build/powerpc-7450-linux-gnu/gcc-3.3.4-glibc-2.3.2/build-gcc-core/gcc'
  198.17 +make: *** [all-gcc] Error 2
  198.18 +
  198.19 +Note that the "-mcpu=7450" option must appear on the "gcc" command line in
  198.20 +order for "-maltivec" to be passed to the assembler.  Or, "-maltivec" itself
  198.21 +may be passed to the "gcc" command.
  198.22 +
  198.23 +Contributed by Tom Warzeka <waz@quahog.npt.nuwc.navy.mil>
  198.24 +
  198.25 +===================================================================
  198.26 +--- gcc-3.3.4/gcc/config/rs6000/rs6000.h~	2004-02-01 23:40:49.000000000 -0500
  198.27 ++++ gcc-3.3.4/gcc/config/rs6000/rs6000.h	2004-08-18 14:15:57.000000000 -0400
  198.28 +@@ -52,23 +52,29 @@
  198.29 + "%{!mcpu*: \
  198.30 +   %{mpower: %{!mpower2: -mpwr}} \
  198.31 +   %{mpower2: -mpwrx} \
  198.32 +-  %{mpowerpc*: -mppc} \
  198.33 ++  %{mpowerpc64*: -mppc64} \
  198.34 ++  %{!mpowerpc64*: %{mpowerpc*: -mppc}} \
  198.35 +   %{mno-power: %{!mpowerpc*: -mcom}} \
  198.36 +-  %{!mno-power: %{!mpower2: %(asm_default)}}} \
  198.37 ++  %{!mno-power: %{!mpower*: %(asm_default)}}} \
  198.38 + %{mcpu=common: -mcom} \
  198.39 + %{mcpu=power: -mpwr} \
  198.40 + %{mcpu=power2: -mpwrx} \
  198.41 +-%{mcpu=power3: -m604} \
  198.42 ++%{mcpu=power3: -mppc64} \
  198.43 + %{mcpu=power4: -mpower4} \
  198.44 ++%{mcpu=power5: -mpower4} \
  198.45 + %{mcpu=powerpc: -mppc} \
  198.46 + %{mcpu=rios: -mpwr} \
  198.47 + %{mcpu=rios1: -mpwr} \
  198.48 + %{mcpu=rios2: -mpwrx} \
  198.49 + %{mcpu=rsc: -mpwr} \
  198.50 + %{mcpu=rsc1: -mpwr} \
  198.51 ++%{mcpu=rs64a: -mppc64} \
  198.52 + %{mcpu=401: -mppc} \
  198.53 + %{mcpu=403: -m403} \
  198.54 + %{mcpu=405: -m405} \
  198.55 ++%{mcpu=405fp: -m405} \
  198.56 ++%{mcpu=440: -m440} \
  198.57 ++%{mcpu=440fp: -m440} \
  198.58 + %{mcpu=505: -mppc} \
  198.59 + %{mcpu=601: -m601} \
  198.60 + %{mcpu=602: -mppc} \
  198.61 +@@ -77,18 +83,23 @@
  198.62 + %{mcpu=ec603e: -mppc} \
  198.63 + %{mcpu=604: -mppc} \
  198.64 + %{mcpu=604e: -mppc} \
  198.65 +-%{mcpu=620: -mppc} \
  198.66 +-%{mcpu=630: -m604} \
  198.67 ++%{mcpu=620: -mppc64} \
  198.68 ++%{mcpu=630: -mppc64} \
  198.69 + %{mcpu=740: -mppc} \
  198.70 +-%{mcpu=7400: -mppc} \
  198.71 +-%{mcpu=7450: -mppc} \
  198.72 + %{mcpu=750: -mppc} \
  198.73 ++%{mcpu=G3: -mppc} \
  198.74 ++%{mcpu=7400: -mppc -maltivec} \
  198.75 ++%{mcpu=7450: -mppc -maltivec} \
  198.76 ++%{mcpu=G4: -mppc -maltivec} \
  198.77 + %{mcpu=801: -mppc} \
  198.78 + %{mcpu=821: -mppc} \
  198.79 + %{mcpu=823: -mppc} \
  198.80 + %{mcpu=860: -mppc} \
  198.81 ++%{mcpu=970: -mpower4 -maltivec} \
  198.82 ++%{mcpu=G5: -mpower4 -maltivec} \
  198.83 + %{mcpu=8540: -me500} \
  198.84 +-%{maltivec: -maltivec}"
  198.85 ++%{maltivec: -maltivec} \
  198.86 ++-many"
  198.87 + 
  198.88 + #define CPP_DEFAULT_SPEC ""
  198.89 + 
   199.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   199.2 +++ b/patches/gcc/3.3.4/gcc-3.3.4-trap-posix.patch	Sat Feb 24 11:00:05 2007 +0000
   199.3 @@ -0,0 +1,44 @@
   199.4 +# 
   199.5 +# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
   199.6 +#
   199.7 +# Error:
   199.8 +#
   199.9 +# creating libintl.h
  199.10 +# Configuring etc...
  199.11 +# loading cache ../config.cache
  199.12 +# checking for a BSD compatible install... (cached) /usr/bin/install -c
  199.13 +# creating ./config.status
  199.14 +# creating Makefile
  199.15 +# trap: usage: trap [-lp] [[arg] signal_spec ...]
  199.16 +#
  199.17 +# Description:
  199.18 +#
  199.19 +# non-posix conform usage of trap causes bash >= 3.0 to fail
  199.20 +# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
  199.21 +#
  199.22 +# Status:
  199.23 +#
  199.24 +# fixed in gcc >= 3.3.5
  199.25 +# backport of gcc-3.3.5 fix
  199.26 +#
  199.27 +diff -ruN gcc-3.3.4-orig/configure gcc-3.3.4/configure
  199.28 +--- gcc-3.3.4-orig/configure	2002-09-29 18:11:24.000000000 +0200
  199.29 ++++ gcc-3.3.4/configure	2005-04-20 21:11:30.000000000 +0200
  199.30 +@@ -697,7 +697,7 @@
  199.31 + if test -f skip-this-dir; then
  199.32 + 	# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
  199.33 + 	# and reset the trap handler.
  199.34 +-	trap 0
  199.35 ++	trap '' 0
  199.36 + 	rm -rf Makefile* ${tmpdir}
  199.37 + 	# Execute the final clean-up actions
  199.38 + 	${config_shell} skip-this-dir
  199.39 +@@ -1596,7 +1596,7 @@
  199.40 + # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
  199.41 + # and reset the trap handler.
  199.42 + rm -rf ${tmpdir}
  199.43 +-trap 0
  199.44 ++trap '' 0
  199.45 + 
  199.46 + exit 0
  199.47 + 
   200.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   200.2 +++ b/patches/gcc/3.3.5/gcc-3.3.4-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   200.3 @@ -0,0 +1,62 @@
   200.4 +diff -urN gcc-3.3.4.orig/gcc/config/arm/linux-elf.h gcc-3.3.4/gcc/config/arm/linux-elf.h
   200.5 +--- gcc-3.3.4.orig/gcc/config/arm/linux-elf.h	2004-03-30 22:43:45.000000000 +0200
   200.6 ++++ gcc-3.3.4/gcc/config/arm/linux-elf.h	2004-08-20 02:13:02.969084177 +0200
   200.7 +@@ -30,17 +30,31 @@
   200.8 + /* Do not assume anything about header files.  */
   200.9 + #define NO_IMPLICIT_EXTERN_C
  200.10 + 
  200.11 ++/*
  200.12 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  200.13 ++ * (big endian) configurations.
  200.14 ++ */
  200.15 ++#if TARGET_BIG_ENDIAN_DEFAULT
  200.16 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
  200.17 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  200.18 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  200.19 ++#else
  200.20 ++#define TARGET_ENDIAN_DEFAULT 0
  200.21 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  200.22 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  200.23 ++#endif
  200.24 ++
  200.25 + /* Default is to use APCS-32 mode.  */
  200.26 + #undef  TARGET_DEFAULT
  200.27 +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
  200.28 ++#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS | TARGET_ENDIAN_DEFAULT)
  200.29 + 
  200.30 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  200.31 + 
  200.32 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  200.33 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  200.34 + 
  200.35 + #undef  MULTILIB_DEFAULTS
  200.36 + #define MULTILIB_DEFAULTS \
  200.37 +-	{ "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  200.38 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  200.39 + 
  200.40 + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
  200.41 + 
  200.42 +@@ -88,7 +102,7 @@
  200.43 +    %{rdynamic:-export-dynamic} \
  200.44 +    %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  200.45 +    -X \
  200.46 +-   %{mbig-endian:-EB}" \
  200.47 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  200.48 +    SUBTARGET_EXTRA_LINK_SPEC
  200.49 + 
  200.50 + #define TARGET_OS_CPP_BUILTINS()		\
  200.51 +diff -urN gcc-3.3.4.orig/gcc/config.gcc gcc-3.3.4/gcc/config.gcc
  200.52 +--- gcc-3.3.4.orig/gcc/config.gcc	2004-04-29 06:42:47.000000000 +0200
  200.53 ++++ gcc-3.3.4/gcc/config.gcc	2004-08-20 02:11:04.326143343 +0200
  200.54 +@@ -699,6 +699,11 @@
  200.55 + 	;;
  200.56 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  200.57 + 	tm_file="dbxelf.h elfos.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
  200.58 ++	case $machine in
  200.59 ++	arm*b-*)
  200.60 ++		tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
  200.61 ++		;;
  200.62 ++	esac
  200.63 + 	tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
  200.64 + 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  200.65 + 	gnu_ld=yes
   201.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   201.2 +++ b/patches/gcc/3.3.5/gcc-3.3.4-arm-pr22528.patch	Sat Feb 24 11:00:05 2007 +0000
   201.3 @@ -0,0 +1,71 @@
   201.4 +From http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00832.html, by
   201.5 +Richard Earnshaw.  Fixes http://gcc.gnu.org/PR22528
   201.6 +
   201.7 +--- gcc-3.3.4/gcc/config/arm/arm.md.orig	2004-03-30 22:43:44.000000000 +0200
   201.8 ++++ gcc-3.3.4/gcc/config/arm/arm.md	2005-08-15 12:21:55.000000000 +0200
   201.9 +@@ -4275,7 +4275,7 @@
  201.10 +    (set (match_dup 2)
  201.11 + 	(ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
  201.12 +    ;; store the high byte
  201.13 +-   (set (match_dup 4) (subreg:QI (match_dup 2) 0))]	;explicit subreg safe
  201.14 ++   (set (match_dup 4) (match_dup 5))]
  201.15 +   "TARGET_ARM"
  201.16 +   "
  201.17 +   {
  201.18 +@@ -4291,7 +4291,8 @@
  201.19 +     operands[1] = adjust_address (operands[1], QImode, 0);
  201.20 +     operands[3] = gen_lowpart (QImode, operands[0]);
  201.21 +     operands[0] = gen_lowpart (SImode, operands[0]);
  201.22 +-    operands[2] = gen_reg_rtx (SImode); 
  201.23 ++    operands[2] = gen_reg_rtx (SImode);
  201.24 ++    operands[5] = gen_lowpart (QImode, operands[2]);
  201.25 +   }"
  201.26 + )
  201.27 + 
  201.28 +@@ -4299,7 +4300,7 @@
  201.29 +   [(set (match_dup 4) (match_dup 3))
  201.30 +    (set (match_dup 2)
  201.31 + 	(ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
  201.32 +-   (set (match_operand 1 "" "")	(subreg:QI (match_dup 2) 3))]
  201.33 ++   (set (match_operand 1 "" "")	(match_dup 5))]
  201.34 +   "TARGET_ARM"
  201.35 +   "
  201.36 +   {
  201.37 +@@ -4316,13 +4317,14 @@
  201.38 +     operands[3] = gen_lowpart (QImode, operands[0]);
  201.39 +     operands[0] = gen_lowpart (SImode, operands[0]);
  201.40 +     operands[2] = gen_reg_rtx (SImode);
  201.41 ++    operands[5] = gen_lowpart (QImode, operands[2]);
  201.42 +   }"
  201.43 + )
  201.44 + 
  201.45 + ;; Subroutine to store a half word integer constant into memory.
  201.46 + (define_expand "storeinthi"
  201.47 +   [(set (match_operand 0 "" "")
  201.48 +-	(subreg:QI (match_operand 1 "" "") 0))
  201.49 ++	(match_operand 1 "" ""))
  201.50 +    (set (match_dup 3) (match_dup 2))]
  201.51 +   "TARGET_ARM"
  201.52 +   "
  201.53 +@@ -4363,6 +4365,7 @@
  201.54 +     operands[3] = adjust_address (op0, QImode, 1);
  201.55 +     operands[0] = adjust_address (operands[0], QImode, 0);
  201.56 +     operands[2] = gen_lowpart (QImode, operands[2]);
  201.57 ++    operands[1] = gen_lowpart (QImode, operands[1]);
  201.58 +   }"
  201.59 + )
  201.60 + 
  201.61 +@@ -4682,11 +4685,12 @@
  201.62 +    (set (match_dup 3)
  201.63 + 	(ashiftrt:SI (match_dup 2) (const_int 16)))
  201.64 +    (set (match_operand:HI 0 "s_register_operand" "")
  201.65 +-	(subreg:HI (match_dup 3) 0))]
  201.66 ++	(match_dup 4))]
  201.67 +   "TARGET_ARM"
  201.68 +   "
  201.69 +   operands[2] = gen_reg_rtx (SImode);
  201.70 +   operands[3] = gen_reg_rtx (SImode);
  201.71 ++  operands[4] = gen_lowpart (HImode, operands[3]);
  201.72 +   "
  201.73 + )
  201.74 + 
   202.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   202.2 +++ b/patches/gcc/3.3.6/fix-fixincl.patch	Sat Feb 24 11:00:05 2007 +0000
   202.3 @@ -0,0 +1,70 @@
   202.4 +See http://gcc.gnu.org/PR22541
   202.5 +
   202.6 +From: Dan Kegel
   202.7 +
   202.8 +When building gcc-3.4.3 or gcc-4.0.0 as a cross into a clean $PREFIX
   202.9 +(the only two I've tried like this), the configure script happily copies
  202.10 +the glibc include files from include to sys-include; here's the line
  202.11 +from the log file (with $PREFIX instead of the real prefix):
  202.12 +
  202.13 +Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
  202.14 +
  202.15 +But later, when running fixincludes, it gives the error message
  202.16 + The directory that should contain system headers does not exist:
  202.17 +  $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
  202.18 +
  202.19 +Nevertheless, it continues building; the header files it installs in
  202.20 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
  202.21 +do not include the boilerplate that would cause it to #include_next the
  202.22 +glibc headers in the system header directory.
  202.23 +Thus the resulting toolchain can't compile the following program:
  202.24 +#include <limits.h>
  202.25 +int x = PATH_MAX;
  202.26 +because its limits.h doesn't include the glibc header.
  202.27 +
  202.28 +That's not nice.  I suspect the problem is that gcc/Makefile.in assumes that
  202.29 +it can refer to $PREFIX/i686-unknown-linux-gnu  with the path 
  202.30 +                $PREFIX/lib/../i686-unknown-linux-gnu, but
  202.31 +that fails because the directory $PREFIX/lib doesn't exist during 'make all';
  202.32 +it is only created later, during 'make install'.  (Which makes this problem
  202.33 +confusing, since one only notices the breakage well after 'make install',
  202.34 +at which point the path configure complained about does exist, and has the
  202.35 +right stuff in it.)
  202.36 +
  202.37 +A possible fix is to replace the line in gcc/Makefile.in that says
  202.38 +    SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  202.39 +with a version that gets rid of extra ..'s, e.g.
  202.40 +    SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
  202.41 +(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
  202.42 +for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
  202.43 +
  202.44 +
  202.45 +--- gcc-3.4.3/gcc/Makefile.in.foo	2005-05-20 11:41:39.000000000 -0700
  202.46 ++++ gcc-3.4.3/gcc/Makefile.in	2005-05-20 12:08:46.000000000 -0700
  202.47 +@@ -350,7 +350,10 @@
  202.48 + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
  202.49 + 
  202.50 + # autoconf sets SYSTEM_HEADER_DIR to one of the above.
  202.51 +-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  202.52 ++# Purge it of unneccessary internal relative paths
  202.53 ++# to directories that might not exist yet.
  202.54 ++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
  202.55 ++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
  202.56 + 
  202.57 + # Control whether to run fixproto and fixincludes.
  202.58 + STMP_FIXPROTO = @STMP_FIXPROTO@
  202.59 +@@ -2532,11 +2535,13 @@
  202.60 + 	$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(gcc_tooldir)
  202.61 + 
  202.62 + # Build fixed copies of system files.
  202.63 ++# Abort if no system headers available, unless building a crosscompiler.
  202.64 ++# FIXME: abort unless building --without-headers would be more accurate and less ugly
  202.65 + stmp-fixinc: fixinc.sh gsyslimits.h
  202.66 + 	@if test ! -d ${SYSTEM_HEADER_DIR}; then \
  202.67 + 	  echo The directory that should contain system headers does not exist: >&2 ; \
  202.68 + 	  echo "  ${SYSTEM_HEADER_DIR}" >&2 ; \
  202.69 +-	  if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
  202.70 ++	  if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
  202.71 + 	  then sleep 1; else exit 1; fi; \
  202.72 + 	fi
  202.73 + 	rm -rf include; mkdir include
   203.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   203.2 +++ b/patches/gcc/3.3.6/gcc-3.3.4-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   203.3 @@ -0,0 +1,62 @@
   203.4 +diff -urN gcc-3.3.4.orig/gcc/config/arm/linux-elf.h gcc-3.3.4/gcc/config/arm/linux-elf.h
   203.5 +--- gcc-3.3.4.orig/gcc/config/arm/linux-elf.h	2004-03-30 22:43:45.000000000 +0200
   203.6 ++++ gcc-3.3.4/gcc/config/arm/linux-elf.h	2004-08-20 02:13:02.969084177 +0200
   203.7 +@@ -30,17 +30,31 @@
   203.8 + /* Do not assume anything about header files.  */
   203.9 + #define NO_IMPLICIT_EXTERN_C
  203.10 + 
  203.11 ++/*
  203.12 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  203.13 ++ * (big endian) configurations.
  203.14 ++ */
  203.15 ++#if TARGET_BIG_ENDIAN_DEFAULT
  203.16 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
  203.17 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  203.18 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  203.19 ++#else
  203.20 ++#define TARGET_ENDIAN_DEFAULT 0
  203.21 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  203.22 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  203.23 ++#endif
  203.24 ++
  203.25 + /* Default is to use APCS-32 mode.  */
  203.26 + #undef  TARGET_DEFAULT
  203.27 +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
  203.28 ++#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS | TARGET_ENDIAN_DEFAULT)
  203.29 + 
  203.30 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  203.31 + 
  203.32 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  203.33 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  203.34 + 
  203.35 + #undef  MULTILIB_DEFAULTS
  203.36 + #define MULTILIB_DEFAULTS \
  203.37 +-	{ "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  203.38 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  203.39 + 
  203.40 + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
  203.41 + 
  203.42 +@@ -88,7 +102,7 @@
  203.43 +    %{rdynamic:-export-dynamic} \
  203.44 +    %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  203.45 +    -X \
  203.46 +-   %{mbig-endian:-EB}" \
  203.47 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  203.48 +    SUBTARGET_EXTRA_LINK_SPEC
  203.49 + 
  203.50 + #define TARGET_OS_CPP_BUILTINS()		\
  203.51 +diff -urN gcc-3.3.4.orig/gcc/config.gcc gcc-3.3.4/gcc/config.gcc
  203.52 +--- gcc-3.3.4.orig/gcc/config.gcc	2004-04-29 06:42:47.000000000 +0200
  203.53 ++++ gcc-3.3.4/gcc/config.gcc	2004-08-20 02:11:04.326143343 +0200
  203.54 +@@ -699,6 +699,11 @@
  203.55 + 	;;
  203.56 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  203.57 + 	tm_file="dbxelf.h elfos.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
  203.58 ++	case $machine in
  203.59 ++	arm*b-*)
  203.60 ++		tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
  203.61 ++		;;
  203.62 ++	esac
  203.63 + 	tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
  203.64 + 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  203.65 + 	gnu_ld=yes
   204.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   204.2 +++ b/patches/gcc/3.3.6/gcc-3.3.4-arm-pr22528.patch	Sat Feb 24 11:00:05 2007 +0000
   204.3 @@ -0,0 +1,71 @@
   204.4 +From http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00832.html, by
   204.5 +Richard Earnshaw.  Fixes http://gcc.gnu.org/PR22528
   204.6 +
   204.7 +--- gcc-3.3.4/gcc/config/arm/arm.md.orig	2004-03-30 22:43:44.000000000 +0200
   204.8 ++++ gcc-3.3.4/gcc/config/arm/arm.md	2005-08-15 12:21:55.000000000 +0200
   204.9 +@@ -4275,7 +4275,7 @@
  204.10 +    (set (match_dup 2)
  204.11 + 	(ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
  204.12 +    ;; store the high byte
  204.13 +-   (set (match_dup 4) (subreg:QI (match_dup 2) 0))]	;explicit subreg safe
  204.14 ++   (set (match_dup 4) (match_dup 5))]
  204.15 +   "TARGET_ARM"
  204.16 +   "
  204.17 +   {
  204.18 +@@ -4291,7 +4291,8 @@
  204.19 +     operands[1] = adjust_address (operands[1], QImode, 0);
  204.20 +     operands[3] = gen_lowpart (QImode, operands[0]);
  204.21 +     operands[0] = gen_lowpart (SImode, operands[0]);
  204.22 +-    operands[2] = gen_reg_rtx (SImode); 
  204.23 ++    operands[2] = gen_reg_rtx (SImode);
  204.24 ++    operands[5] = gen_lowpart (QImode, operands[2]);
  204.25 +   }"
  204.26 + )
  204.27 + 
  204.28 +@@ -4299,7 +4300,7 @@
  204.29 +   [(set (match_dup 4) (match_dup 3))
  204.30 +    (set (match_dup 2)
  204.31 + 	(ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
  204.32 +-   (set (match_operand 1 "" "")	(subreg:QI (match_dup 2) 3))]
  204.33 ++   (set (match_operand 1 "" "")	(match_dup 5))]
  204.34 +   "TARGET_ARM"
  204.35 +   "
  204.36 +   {
  204.37 +@@ -4316,13 +4317,14 @@
  204.38 +     operands[3] = gen_lowpart (QImode, operands[0]);
  204.39 +     operands[0] = gen_lowpart (SImode, operands[0]);
  204.40 +     operands[2] = gen_reg_rtx (SImode);
  204.41 ++    operands[5] = gen_lowpart (QImode, operands[2]);
  204.42 +   }"
  204.43 + )
  204.44 + 
  204.45 + ;; Subroutine to store a half word integer constant into memory.
  204.46 + (define_expand "storeinthi"
  204.47 +   [(set (match_operand 0 "" "")
  204.48 +-	(subreg:QI (match_operand 1 "" "") 0))
  204.49 ++	(match_operand 1 "" ""))
  204.50 +    (set (match_dup 3) (match_dup 2))]
  204.51 +   "TARGET_ARM"
  204.52 +   "
  204.53 +@@ -4363,6 +4365,7 @@
  204.54 +     operands[3] = adjust_address (op0, QImode, 1);
  204.55 +     operands[0] = adjust_address (operands[0], QImode, 0);
  204.56 +     operands[2] = gen_lowpart (QImode, operands[2]);
  204.57 ++    operands[1] = gen_lowpart (QImode, operands[1]);
  204.58 +   }"
  204.59 + )
  204.60 + 
  204.61 +@@ -4682,11 +4685,12 @@
  204.62 +    (set (match_dup 3)
  204.63 + 	(ashiftrt:SI (match_dup 2) (const_int 16)))
  204.64 +    (set (match_operand:HI 0 "s_register_operand" "")
  204.65 +-	(subreg:HI (match_dup 3) 0))]
  204.66 ++	(match_dup 4))]
  204.67 +   "TARGET_ARM"
  204.68 +   "
  204.69 +   operands[2] = gen_reg_rtx (SImode);
  204.70 +   operands[3] = gen_reg_rtx (SImode);
  204.71 ++  operands[4] = gen_lowpart (HImode, operands[3]);
  204.72 +   "
  204.73 + )
  204.74 + 
   205.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   205.2 +++ b/patches/gcc/3.3/compat.exp.patch	Sat Feb 24 11:00:05 2007 +0000
   205.3 @@ -0,0 +1,37 @@
   205.4 +Fixes the following problem when testing a cross-compiler:
   205.5 +
   205.6 +============================================
   205.7 +Testing g++.dg/compat/abi/bitfield1,
   205.8 +...
   205.9 +Invoking the compiler as /crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/build-gcc/gcc/testsuite/../g++  ...
  205.10 +/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/gcc/testsuite/g++.dg/compat/abi/bitfield1_main.C
  205.11 +pid is 16028 -16028
  205.12 +compiler exited with status 1
  205.13 +output is:
  205.14 +sh: error while loading shared libraries: /opt/cegl-2.0/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/powerpc-750-linux-gnu/./lib/libdl.so.2: ELF file data encoding not little-endian
  205.15 +/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/build-gcc/gcc/testsuite/../g++: error while loading shared libraries: /opt/cegl-2.0/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/powerpc-750-linux-gnu/./lib/libc.so.6: ELF file data encoding not little-endian
  205.16 +
  205.17 +FAIL: g++.dg/compat/abi/bitfield1 main_tst.o compile
  205.18 +============================================
  205.19 +
  205.20 +--- gcc-3.3/gcc/testsuite/g++.dg/compat/compat.exp.old	Thu Oct 17 17:22:57 2002
  205.21 ++++ gcc-3.3/gcc/testsuite/g++.dg/compat/compat.exp	Mon Jul 14 10:59:19 2003
  205.22 +@@ -42,11 +42,13 @@
  205.23 + proc compat-fix-library-path { } {
  205.24 +     global ld_library_path
  205.25 + 
  205.26 +-    # See comments in lib/g++.exp for why this is needed.
  205.27 +-    setenv  LD_LIBRARY_PATH     $ld_library_path
  205.28 +-    setenv  SHLIB_PATH          $ld_library_path
  205.29 +-    setenv  LD_LIBRARYN32_PATH  $ld_library_path
  205.30 +-    setenv  LD_LIBRARY64_PATH   $ld_library_path
  205.31 ++    if {![is_remote target]} {
  205.32 ++	# See comments in lib/g++.exp for why this is needed.
  205.33 ++	setenv  LD_LIBRARY_PATH     $ld_library_path
  205.34 ++	setenv  SHLIB_PATH          $ld_library_path
  205.35 ++	setenv  LD_LIBRARYN32_PATH  $ld_library_path
  205.36 ++	setenv  LD_LIBRARY64_PATH   $ld_library_path
  205.37 ++    }
  205.38 + }
  205.39 + 
  205.40 + #
   206.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   206.2 +++ b/patches/gcc/3.3/config.sub.patch	Sat Feb 24 11:00:05 2007 +0000
   206.3 @@ -0,0 +1,72 @@
   206.4 +When configuring a s390->s390 or cris->cris crosscompiler
   206.5 +(ok, I haven't hit this yet, but one of these days I'll get me an account
   206.6 +on an s390, and then I'll need this patch :-), you'll get the
   206.7 +following error:
   206.8 +
   206.9 ++ /build/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/gcc-3.3/configure
  206.10 +--target=s390-unknown-linux-gnu --host=s390-host_unknown-linux-gnu
  206.11 +--prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2
  206.12 +--enable-languages=c
  206.13 +--with-local-prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/s390-
  206.14 +unknown-linux-gnu --enable-threads=no --without-headers --with-newlib
  206.15 +--disable-shared
  206.16 +...
  206.17 +*** --with-headers is only supported when cross compiling
  206.18 +
  206.19 +This error pops up only when you're using Daniel Jacobowitz's technique
  206.20 +of slightly changing the target and host tuples to make them different
  206.21 +enough to force gcc's build system to not try to pull in system libraries
  206.22 +or headers.  This technique is needed e.g. to build an x86 -> x86
  206.23 +cross-compiler.
  206.24 +(The LFS developers ran into the same bug that prompted me to use
  206.25 +this technique; they point people who run into it to
  206.26 +http://linuxfromscratch.org/~greg/pure_lfs.txt, which is a different
  206.27 +way of avoiding this problem.  I think the tuple tweak is the way to go, though.)
  206.28 +
  206.29 +config-patches@gnu.org rejected this patch, on the grounds that there
  206.30 +is only one vendor of each of those two architectures, so the 
  206.31 +canonicalization is by definition correct.  When I pointed out the
  206.32 +difficulty this causes for people building s390 -> s390 or
  206.33 +cris -> cris compilers that are incompatible with the system
  206.34 +libraries and thus must be built like cross-compilers, he grumped and said 
  206.35 +"autoconf should let you specify a cross-compiler in some other way than
  206.36 +comparing tuple strings".
  206.37 +
  206.38 +
  206.39 +
  206.40 +--- gcc-3.3/config.sub.old	Sun Jun  8 20:38:47 2003
  206.41 ++++ gcc-3.3/config.sub	Sun Jun  8 20:40:34 2003
  206.42 +@@ -433,9 +433,12 @@
  206.43 + 	crds | unos)
  206.44 + 		basic_machine=m68k-crds
  206.45 + 		;;
  206.46 +-	cris | cris-* | etrax*)
  206.47 ++	cris | etrax*)
  206.48 + 		basic_machine=cris-axis
  206.49 + 		;;
  206.50 ++	cris-*)
  206.51 ++		basic_machine=cris-`echo $basic_machine | sed 's/^[^-]*-//'`
  206.52 ++		;;
  206.53 + 	da30 | da30-*)
  206.54 + 		basic_machine=m68k-da30
  206.55 + 		;;
  206.56 +@@ -820,11 +823,17 @@
  206.57 + 	rtpc | rtpc-*)
  206.58 + 		basic_machine=romp-ibm
  206.59 + 		;;
  206.60 +-	s390 | s390-*)
  206.61 ++	s390)
  206.62 + 		basic_machine=s390-ibm
  206.63 + 		;;
  206.64 +-	s390x | s390x-*)
  206.65 ++	s390-*)
  206.66 ++		basic_machine=s390-`echo $basic_machine | sed 's/^[^-]*-//'`
  206.67 ++		;;
  206.68 ++	s390x)
  206.69 + 		basic_machine=s390x-ibm
  206.70 ++		;;
  206.71 ++	s390x-*)
  206.72 ++		basic_machine=s390x-`echo $basic_machine | sed 's/^[^-]*-//'`
  206.73 + 		;;
  206.74 + 	sa29200)
  206.75 + 		basic_machine=a29k-amd
   207.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   207.2 +++ b/patches/gcc/3.3/gcc-3.2.3-g++.exp.patch	Sat Feb 24 11:00:05 2007 +0000
   207.3 @@ -0,0 +1,98 @@
   207.4 +g++ testsuite fixes for cross-compilers, Dan Kegel, Ixia Communications, 12 July 2003
   207.5 +
   207.6 +The first hunk fixes the error
   207.7 +
   207.8 +/testsuite_flags: /testsuite_flags: No such file or directory
   207.9 +    while executing
  207.10 +"exec sh ${odir_v3}/testsuite_flags --build-includes"
  207.11 +    (procedure "g++_include_flags" line 21)
  207.12 +    invoked from within
  207.13 +"g++_include_flags [get_multilibs] "
  207.14 +    (procedure "g++_init" line 63)
  207.15 +    invoked from within
  207.16 +"${tool}_init $test_file_name"
  207.17 +    (procedure "runtest" line 19)
  207.18 +    invoked from within
  207.19 +"runtest $test_name"
  207.20 +    ("foreach" body line 42)
  207.21 +    invoked from within
  207.22 +...
  207.23 +make[1]: [check-g++] Error 1 (ignored)
  207.24 +
  207.25 +The fix isn't especially pretty, but it worked for me, and can't hurt the
  207.26 +more common native compiler case.  Maybe someone who knows the code better 
  207.27 +can come up with a better fix.
  207.28 +
  207.29 +The second hunk fixes the error
  207.30 +
  207.31 +sh: error while loading shared libraries: /opt/cegl-2.0/powerpc-405-linux-gnu/gcc-3.2.3-glibc-2.2.5/powerpc-405-linux-gnu/./lib/libdl.so.2: ELF file data encoding not little-endian
  207.32 +
  207.33 +when trying to compile g++ testcases (!); setting up
  207.34 +the shared library environment when running crosstests of g++ 
  207.35 +should either be done by a special board file, or by
  207.36 +setting up a remote chroot environment (see http://kegel.com/crosstool),
  207.37 +not by blithely setting LD_LIBRARY_PATH on the local system.
  207.38 +
  207.39 +--- gcc-3.2.3/gcc/testsuite/lib/g++.exp.old	Fri Jul 11 15:42:47 2003
  207.40 ++++ gcc-3.2.3/gcc/testsuite/lib/g++.exp	Sat Jul 12 12:57:07 2003
  207.41 +@@ -72,6 +72,8 @@
  207.42 + #
  207.43 + proc g++_include_flags { paths } {
  207.44 +     global srcdir
  207.45 ++    global objdir
  207.46 ++    global target_triplet
  207.47 +     global HAVE_LIBSTDCXX_V3
  207.48 +     global TESTING_IN_BUILD_TREE
  207.49 + 
  207.50 +@@ -90,6 +92,20 @@
  207.51 + 
  207.52 +     if { ${HAVE_LIBSTDCXX_V3} } {
  207.53 +       set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
  207.54 ++      if { $odir_v3 == "" } {
  207.55 ++          verbose "g++_include_flags: couldn't find libstdc++-v3 on first try, now looking in build directory $objdir"
  207.56 ++	  # first assume no multilibs
  207.57 ++          set odir_v3 [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
  207.58 ++      }
  207.59 ++      if { $odir_v3 == "" } {
  207.60 ++          verbose "g++_include_flags: couldn't find libstdc++-v3 on second try, trying multilib"
  207.61 ++	  # assume multilib only one level deep
  207.62 ++          set multisub [file tail $gccpath]
  207.63 ++          set odir_v3 [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
  207.64 ++      }
  207.65 ++      if { $odir_v3 == "" } {
  207.66 ++           error "Can't find libstdc++-v3"
  207.67 ++      }
  207.68 +       append flags [exec sh ${odir_v3}/testsuite_flags --build-includes]
  207.69 +     } else {
  207.70 +       set odir_v2 [lookfor_file ${gccpath} libstdc++]
  207.71 +@@ -192,16 +192,20 @@
  207.72 +       }
  207.73 +     }
  207.74 + 
  207.75 +-    # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
  207.76 +-    # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
  207.77 +-    # (for the 64-bit ABI).  The right way to do this would be to modify
  207.78 +-    # unix.exp -- but that's not an option since it's part of DejaGNU
  207.79 +-    # proper, so we do it here.  We really only need to do 
  207.80 +-    # this on IRIX, but it shouldn't hurt to do it anywhere else.
  207.81 +-    setenv  LD_LIBRARY_PATH     $ld_library_path
  207.82 +-    setenv  SHLIB_PATH          $ld_library_path
  207.83 +-    setenv  LD_LIBRARYN32_PATH  $ld_library_path
  207.84 +-    setenv  LD_LIBRARY64_PATH   $ld_library_path
  207.85 ++    if {![is_remote target]} {
  207.86 ++      # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
  207.87 ++      # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
  207.88 ++      # (for the 64-bit ABI).  The right way to do this would be to modify
  207.89 ++      # unix.exp -- but that's not an option since it's part of DejaGNU
  207.90 ++      # proper, so we do it here.  We really only need to do 
  207.91 ++      # this on IRIX, but it shouldn't hurt to do it anywhere else.
  207.92 ++
  207.93 ++      # Doing this causes us to be unable to run cross-compilers.
  207.94 ++      setenv  LD_LIBRARY_PATH     $ld_library_path
  207.95 ++      setenv  SHLIB_PATH          $ld_library_path
  207.96 ++      setenv  LD_LIBRARYN32_PATH  $ld_library_path
  207.97 ++      setenv  LD_LIBRARY64_PATH   $ld_library_path
  207.98 ++    }
  207.99 + 
 207.100 +     return "$flags"
 207.101 + }
   208.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   208.2 +++ b/patches/gcc/3.3/gcc-3.3-libstdc++-v3-dg.exp.patch	Sat Feb 24 11:00:05 2007 +0000
   208.3 @@ -0,0 +1,54 @@
   208.4 +Without this patch, the command
   208.5 +
   208.6 +RUNTESTFLAGS=--target=powerpc-750-linux-gnu -v -v -v -v make check-target-libstdc++-v3
   208.7 +
   208.8 +fails in two ways:
   208.9 +1. the -L option meant to locate the testsuite directory is incorrect, and
  208.10 +2. the wrong compiler is invoked, causing all sorts of havoc, not least of which
  208.11 +is the native compiler is invoked when we really wanted to invoke the cross-compiler
  208.12 +we just built.
  208.13 +
  208.14 +Here's an example log of the problem in action.  Every testcase fails, this shows just one:
  208.15 +-------------
  208.16 +Invoking the compiler as g++ -ggdb3 -DDEBUG_ASSERT -I/home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/libstdc++-v3/testsuite /home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/libstdc++-v3/testsuite/20_util/binders.cc   -g -O2 -DDEBUG_ASSERT  -L/testsuite -lv3test -lm  -o ./binders.exe
  208.17 +compiler exited with status 1
  208.18 +output is:
  208.19 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_function.h: In method `void binder2nd<mem_fun1_ref_t<void,Elem,int> >::operator ()(const Elem &) const':^M
  208.20 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_algo.h:83:   instantiated from `for_each<Elem *, binder2nd<mem_fun1_ref_t<void,Elem,int> > >(Elem *, Elem *, binder2nd<mem_fun1_ref_t<void,Elem,int> >)'^M
  208.21 +/home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/libstdc++-v3/testsuite/20_util/binders.cc:43:   instantiated from here^M
  208.22 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_function.h:224: conversion from `const Elem' to `Elem &' discards qualifiers^M
  208.23 +/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_function.h:622: in passing argument 1 of `mem_fun1_ref_t<void,Elem,int>::operator ()(Elem &, int) const'^M
  208.24 +...
  208.25 +FAIL: 20_util/binders.cc (test for excess errors)
  208.26 +WARNING: 20_util/binders.cc compilation failed to produce executable
  208.27 +-------------
  208.28 +
  208.29 +And here's the patch.  I'm not happy with it, and it probably gets some cases wrong,
  208.30 +but it seems to work for the common native case and for my cross-compiler case.
  208.31 +
  208.32 +--- gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp.old	Sun Jul 13 10:42:01 2003
  208.33 ++++ gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp	Sun Jul 13 11:39:54 2003
  208.34 +@@ -46,8 +46,23 @@
  208.35 +     global gluefile wrap_flags
  208.36 +     global ld_library_path
  208.37 +     global tool_root_dir
  208.38 ++    global target_triplet
  208.39 + 
  208.40 +     set blddir [lookfor_file [get_multilibs] libstdc++-v3]
  208.41 ++    if { $blddir == "" } {
  208.42 ++        set multilibs [get_multilibs]
  208.43 ++        # FIXME: assume multilib only one level deep
  208.44 ++        set multisub [file tail $multilibs]
  208.45 ++        verbose "libstdc++-v3-init: couldn't find libstdc++-v3 in $multilibs, trying $objdir"
  208.46 ++        set blddir [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
  208.47 ++    }
  208.48 ++    if { $blddir == "" } {
  208.49 ++        verbose "libstdc++-v3-init: couldn't find libstdc++-v3, trying $objdir without multilibs"
  208.50 ++        set blddir [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
  208.51 ++    }
  208.52 ++    if { $blddir == "" } {
  208.53 ++         error "Can't find libstdc++-v3"
  208.54 ++    }
  208.55 + 
  208.56 +     # By default, we assume we want to run program images.
  208.57 +     global dg-do-what-default
   209.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   209.2 +++ b/patches/gcc/3.3/sh-pic-set_fpscr.patch	Sat Feb 24 11:00:05 2007 +0000
   209.3 @@ -0,0 +1,60 @@
   209.4 +Should fix
   209.5 +make[2]: *** [/gcc-3.3-glibc-2.3.2/build-glibc/elf/check-textrel.out] Error 1 
   209.6 +in glibc's "make tests".
   209.7 +
   209.8 +-------------
   209.9 +
  209.10 +Message-Id: <200307300255.h6U2tB906928@r-rr.iij4u.or.jp>
  209.11 +To: dank@kegel.com
  209.12 +Cc: linux-sh@m17n.org
  209.13 +Subject: Re: Writing PIC version of __udivsi3_i4? (was: Re: "make tests" fails
  209.14 + with "libc.so: text relocations used" in glibc-2.3.2 for sh4)
  209.15 +In-Reply-To: Your message of "Wed, 30 Jul 2003 11:20:49 +0900"
  209.16 +	<200307300212.h6U2CH901209@r-rr.iij4u.or.jp>
  209.17 +References: <200307300212.h6U2CH901209@r-rr.iij4u.or.jp>
  209.18 +Date: Wed, 30 Jul 2003 12:03:01 +0900
  209.19 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
  209.20 +
  209.21 +> I'll try to write the PIC version of it,
  209.22 +
  209.23 +Dan, does the attached patch work for you?
  209.24 +
  209.25 +[dank: original patch deleted; here's same thing rediffed against gcc-3.3 instead of HEAD]
  209.26 +
  209.27 +--- gcc-3.3/gcc/config/sh/lib1funcs.asm.old	Tue Jul 29 21:37:29 2003
  209.28 ++++ gcc-3.3/gcc/config/sh/lib1funcs.asm	Tue Jul 29 21:40:58 2003
  209.29 +@@ -1792,7 +1792,17 @@
  209.30 + 	.global GLOBAL(set_fpscr)
  209.31 + GLOBAL(set_fpscr):
  209.32 + 	lds r4,fpscr
  209.33 ++#ifdef __PIC__
  209.34 ++	mov.l	r12,@-r15
  209.35 ++	mova	LOCAL(set_fpscr_L0),r0
  209.36 ++	mov.l	LOCAL(set_fpscr_L0),r12
  209.37 ++	add	r0,r12
  209.38 ++	mov.l	LOCAL(set_fpscr_L1),r0
  209.39 ++	mov.l	@(r0,r12),r1
  209.40 ++	mov.l	@r15+,r12
  209.41 ++#else
  209.42 + 	mov.l LOCAL(set_fpscr_L1),r1
  209.43 ++#endif
  209.44 + 	swap.w r4,r0
  209.45 + 	or #24,r0
  209.46 + #ifndef FMOVD_WORKS
  209.47 +@@ -1820,8 +1830,16 @@
  209.48 + 	mov.l r3,@(4,r1)
  209.49 + #endif
  209.50 + 	.align 2
  209.51 ++#ifdef __PIC__
  209.52 ++LOCAL(set_fpscr_L0):
  209.53 ++	.long _GLOBAL_OFFSET_TABLE_
  209.54 ++LOCAL(set_fpscr_L1):
  209.55 ++	.long GLOBAL(fpscr_values@GOT)
  209.56 ++#else
  209.57 + LOCAL(set_fpscr_L1):
  209.58 + 	.long GLOBAL(fpscr_values)
  209.59 ++#endif
  209.60 ++
  209.61 + #ifdef __ELF__
  209.62 +         .comm   GLOBAL(fpscr_values),8,4
  209.63 + #else
   210.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   210.2 +++ b/patches/gcc/3.3/sh-predef-gnu_source.patch	Sat Feb 24 11:00:05 2007 +0000
   210.3 @@ -0,0 +1,15 @@
   210.4 +See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11096
   210.5 +and http://gcc.gnu.org/ml/gcc-patches/2003-06/msg00424.html
   210.6 +
   210.7 +--- gcc-3.3/gcc/config/sh/linux.h.old	Wed Jun  4 17:37:40 2003
   210.8 ++++ gcc-3.3/gcc/config/sh/linux.h	Wed Jun  4 17:38:16 2003
   210.9 +@@ -53,5 +53,9 @@
  210.10 +    %{static:-static}"
  210.11 + 
  210.12 ++/* The GNU C++ standard library requires that these macros be defined.  */
  210.13 ++#undef CPLUSPLUS_CPP_SPEC
  210.14 ++#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
  210.15 ++
  210.16 + #undef LIB_SPEC
  210.17 + #define LIB_SPEC \
  210.18 +   "%{shared: -lc} \
   211.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   211.2 +++ b/patches/gcc/3.3/sh-spec.patch	Sat Feb 24 11:00:05 2007 +0000
   211.3 @@ -0,0 +1,45 @@
   211.4 +Message-Id: <200308020452.h724q0n01509@r-rr.iij4u.or.jp>
   211.5 +To: dank@kegel.com
   211.6 +Cc: kkojima@rr.iij4u.or.jp
   211.7 +Subject: Re: Writing PIC version of __udivsi3_i4?
   211.8 +In-Reply-To: Your message of "Fri, 01 Aug 2003 21:15:27 -0700"
   211.9 +	<3F2B3ADF.6030206@kegel.com>
  211.10 +References: <3F2B3ADF.6030206@kegel.com>
  211.11 +Date: Sat, 02 Aug 2003 13:58:05 +0900
  211.12 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
  211.13 +
  211.14 +Dan Kegel <dank@kegel.com> wrote:
  211.15 +> It seems it might be from gcc's spec file:
  211.16 +> 
  211.17 +> *subtarget_link_spec:
  211.18 +> %{shared:-shared}    %{!static:      %{rdynamic:-export-dynamic}      %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}      %{!rpath:-rpath /lib}}    %{static:-static}
  211.19 +> 
  211.20 +> as the only place -rpath showed up was in the output of gcc -v as it
  211.21 +> was linking libc.so.
  211.22 +> 
  211.23 +> Well, that's a clue, anyway!  Guess I'll dig through the spec files
  211.24 +> tomorrow to see if I can figure it out some more.
  211.25 +
  211.26 +I've grepped gcc/config/*/*.h and found only SH and old libc1 stuffs
  211.27 +of i386/alpha include %{!rpath:-rpath ... in 3.3 release and the
  211.28 +current CVS. And my sh-gcc's specs doesn't have this :-(
  211.29 +It would be the Right Thing to remove this stuff simply. How about
  211.30 +the gcc patch below?
  211.31 +
  211.32 +Regards,
  211.33 +	kaz
  211.34 +--
  211.35 +--- gcc-3.3/gcc/config/sh/linux.h.orig	Sat Aug  2 13:20:57 2003
  211.36 ++++ gcc-3.3/gcc/config/sh/linux.h	Sat Aug  2 13:22:42 2003
  211.37 +@@ -48,8 +48,7 @@ do { \
  211.38 +   "%{shared:-shared} \
  211.39 +    %{!static: \
  211.40 +      %{rdynamic:-export-dynamic} \
  211.41 +-     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  211.42 +-     %{!rpath:-rpath /lib}} \
  211.43 ++     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
  211.44 +    %{static:-static}"
  211.45 + 
  211.46 + /* The GNU C++ standard library requires that these macros be defined.  */
  211.47 +
  211.48 +
   212.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   212.2 +++ b/patches/gcc/3.3/sh4-kaz-workaround.patch	Sat Feb 24 11:00:05 2007 +0000
   212.3 @@ -0,0 +1,145 @@
   212.4 +[lightly edited to fit my patch directory - dank]
   212.5 +
   212.6 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
   212.7 +Date: Sat, 09 Aug 2003 09:46:21 +0900
   212.8 +To: dank@kegel.com
   212.9 +
  212.10 +Hi Dan,
  212.11 +
  212.12 +I've come back from the vacation and looked glibc string test
  212.13 +failures on sh4. This looks a gcc problem. gcc-3.3/3.4 doesn't
  212.14 +compile these tests correctly. The attached testcase aborts on
  212.15 +gcc-3.3/3.4 -O2 but exits normally gcc-3.2 and gcc-3.0.
  212.16 +The option -O2 is not essential but it makes the testcase small.
  212.17 +The failed string tests include the same pattern of the code with
  212.18 +f=random to generate ramdom strings but they get strings with
  212.19 +embedded NULL characters :-(
  212.20 +
  212.21 +...
  212.22 +I've got a workaround below for this bug, though it might merely
  212.23 +paper over the real bug. Anyway, I'd like to send a PR for this.
  212.24 +
  212.25 +Regards,
  212.26 +	kaz
  212.27 +--
  212.28 +int val = 0xff00;
  212.29 +
  212.30 +int f (void) { return val; }
  212.31 +
  212.32 +unsigned char a[1];
  212.33 +
  212.34 +void
  212.35 +foo (void)
  212.36 +{
  212.37 +  a[0] = f () & 255;
  212.38 +
  212.39 +  if (!a[0])
  212.40 +    a[0] = f () & 255;
  212.41 +
  212.42 +  if (!a[0])
  212.43 +    a[0] = 1 + (f () & 127);
  212.44 +}
  212.45 +
  212.46 +int
  212.47 +main (int argc, char **argv)
  212.48 +{
  212.49 +  foo ();
  212.50 +  if (!a[0])
  212.51 +    abort ();
  212.52 +
  212.53 +  return 0;
  212.54 +}
  212.55 +
  212.56 +--
  212.57 +
  212.58 +diff -u3prN ORIG/gcc/gcc/config/sh/sh.c LOCAL/gcc/gcc/config/sh/sh.c
  212.59 +--- gcc/gcc/config/sh/sh.c.old	Fri Aug  8 18:39:02 2003
  212.60 ++++ gcc/gcc/config/sh/sh.c	Fri Aug  8 22:31:02 2003
  212.61 +@@ -6657,6 +6657,19 @@ arith_reg_dest (op, mode)
  212.62 +   return arith_reg_operand (op, mode);
  212.63 + }
  212.64 + 
  212.65 ++/* Like above, but for SImode compare destinations: forbid paradoxical
  212.66 ++   subregs, because it would get the combiner confused.  */
  212.67 ++int
  212.68 ++arith_reg_cmp_dest (op, mode)
  212.69 ++     rtx op;
  212.70 ++     enum machine_mode mode;
  212.71 ++{
  212.72 ++  if (mode == SImode && GET_CODE (op) == SUBREG
  212.73 ++      && GET_MODE_SIZE (GET_MODE (SUBREG_REG (op))) < 4)
  212.74 ++    return 0;
  212.75 ++  return arith_reg_operand (op, mode);
  212.76 ++}
  212.77 ++
  212.78 + int
  212.79 + int_gpr_dest (op, mode)
  212.80 +      rtx op;
  212.81 +diff -u3prN ORIG/gcc/gcc/config/sh/sh.h LOCAL/gcc/gcc/config/sh/sh.h
  212.82 +--- gcc/gcc/config/sh/sh.h.old	Fri Aug  8 18:39:02 2003
  212.83 ++++ gcc/gcc/config/sh/sh.h	Fri Aug  8 22:31:02 2003
  212.84 +@@ -3365,6 +3365,7 @@ extern int rtx_equal_function_value_matt
  212.85 +   {"and_operand", {SUBREG, REG, CONST_INT}},				\
  212.86 +   {"any_register_operand", {SUBREG, REG}},				\
  212.87 +   {"arith_operand", {SUBREG, REG, CONST_INT}},				\
  212.88 ++  {"arith_reg_cmp_dest", {SUBREG, REG}},				\
  212.89 +   {"arith_reg_dest", {SUBREG, REG}},					\
  212.90 +   {"arith_reg_operand", {SUBREG, REG}},					\
  212.91 +   {"arith_reg_or_0_operand", {SUBREG, REG, CONST_INT, CONST_VECTOR}},	\
  212.92 +
  212.93 +--- gcc-3.3/gcc/config/sh/sh.md.orig	Tue Apr 15 10:06:10 2003
  212.94 ++++ gcc-3.3/gcc/config/sh/sh.md	Sat Aug  9 22:31:13 2003
  212.95 +@@ -616,7 +616,7 @@
  212.96 + 
  212.97 + (define_insn ""
  212.98 +   [(set (reg:SI T_REG)
  212.99 +-	(eq:SI (and:SI (match_operand:SI 0 "arith_reg_operand" "z,r")
 212.100 ++	(eq:SI (and:SI (match_operand:SI 0 "arith_reg_cmp_dest" "z,r")
 212.101 + 		       (match_operand:SI 1 "arith_operand" "L,r"))
 212.102 + 	       (const_int 0)))]
 212.103 +   "TARGET_SH1"
 212.104 +@@ -631,7 +631,7 @@
 212.105 + 
 212.106 + (define_insn "cmpeqsi_t"
 212.107 +   [(set (reg:SI T_REG)
 212.108 +-	(eq:SI (match_operand:SI 0 "arith_reg_operand" "r,z,r")
 212.109 ++	(eq:SI (match_operand:SI 0 "arith_reg_cmp_dest" "r,z,r")
 212.110 + 	       (match_operand:SI 1 "arith_operand" "N,rI,r")))]
 212.111 +   "TARGET_SH1"
 212.112 +   "@
 212.113 +@@ -642,7 +642,7 @@
 212.114 + 
 212.115 + (define_insn "cmpgtsi_t"
 212.116 +   [(set (reg:SI T_REG)
 212.117 +-	(gt:SI (match_operand:SI 0 "arith_reg_operand" "r,r")
 212.118 ++	(gt:SI (match_operand:SI 0 "arith_reg_cmp_dest" "r,r")
 212.119 + 	       (match_operand:SI 1 "arith_reg_or_0_operand" "r,N")))]
 212.120 +   "TARGET_SH1"
 212.121 +   "@
 212.122 +@@ -652,7 +652,7 @@
 212.123 + 
 212.124 + (define_insn "cmpgesi_t"
 212.125 +   [(set (reg:SI T_REG)
 212.126 +-	(ge:SI (match_operand:SI 0 "arith_reg_operand" "r,r")
 212.127 ++	(ge:SI (match_operand:SI 0 "arith_reg_cmp_dest" "r,r")
 212.128 + 	       (match_operand:SI 1 "arith_reg_or_0_operand" "r,N")))]
 212.129 +   "TARGET_SH1"
 212.130 +   "@
 212.131 +@@ -666,7 +666,7 @@
 212.132 + 
 212.133 + (define_insn "cmpgeusi_t"
 212.134 +   [(set (reg:SI T_REG)
 212.135 +-	(geu:SI (match_operand:SI 0 "arith_reg_operand" "r")
 212.136 ++	(geu:SI (match_operand:SI 0 "arith_reg_cmp_dest" "r")
 212.137 + 		(match_operand:SI 1 "arith_reg_operand" "r")))]
 212.138 +   "TARGET_SH1"
 212.139 +   "cmp/hs	%1,%0"
 212.140 +@@ -674,7 +674,7 @@
 212.141 + 
 212.142 + (define_insn "cmpgtusi_t"
 212.143 +   [(set (reg:SI T_REG)
 212.144 +-	(gtu:SI (match_operand:SI 0 "arith_reg_operand" "r")
 212.145 ++	(gtu:SI (match_operand:SI 0 "arith_reg_cmp_dest" "r")
 212.146 + 		(match_operand:SI 1 "arith_reg_operand" "r")))]
 212.147 +   "TARGET_SH1"
 212.148 +   "cmp/hi	%1,%0"
   213.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   213.2 +++ b/patches/gcc/3.3/sh4-no-fix-protos.patch	Sat Feb 24 11:00:05 2007 +0000
   213.3 @@ -0,0 +1,12 @@
   213.4 +See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10331
   213.5 +and http://gcc.gnu.org/ml/gcc-patches/2003-06/msg00423.html
   213.6 +
   213.7 +--- gcc-3.3/gcc/config/sh/t-linux.old	Wed Jun  4 13:01:39 2003
   213.8 ++++ gcc-3.3/gcc/config/sh/t-linux	Wed Jun  4 13:02:12 2003
   213.9 +@@ -1,3 +1,6 @@
  213.10 ++# Don't run fixproto
  213.11 ++STMP_FIXPROTO =
  213.12 ++
  213.13 + TARGET_LIBGCC2_CFLAGS = -fpic
  213.14 + LIB1ASMFUNCS_CACHE = _ic_invalidate
  213.15 + 
   214.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   214.2 +++ b/patches/gcc/3.3/sh4-pthread.patch	Sat Feb 24 11:00:05 2007 +0000
   214.3 @@ -0,0 +1,42 @@
   214.4 +Patch to fix following test case failure:
   214.5 +
   214.6 +		=== libstdc++-v3 tests ===
   214.7 +FAIL: thread/pthread1.cc (test for excess errors)
   214.8 +Excess errors:
   214.9 +/opt/cegl-2.0/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/sh4-unknown-linux-gnu/bin/ld: cannot find -lthread
  214.10 +collect2: ld returned 1 exit status
  214.11 +
  214.12 +Note that *any* program compiled with -pthread fails:
  214.13 +
  214.14 +/opt/cegl-2.0/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/bin/sh4-unknown-linux-gnu-gcc hello.c  -pthread
  214.15 +/opt/cegl-2.0/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/lib/gcc-lib/sh4-unknown-linux-gnu/3.3.1/../../../../sh4-unknown-linux-gnu/bin/ld: cannot find -lthread
  214.16 +collect2: ld returned 1 exit status
  214.17 +
  214.18 +Compiling with -lpthread on the other hand works fine:
  214.19 +/opt/cegl-2.0/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/bin/sh4-unknown-linux-gnu-gcc hello.c  -lpthread
  214.20 +
  214.21 +So -pthread is broken in some trivial way; it should invoke -lpthread, not -lthread,
  214.22 +at least when targeting Linux. 
  214.23 +
  214.24 +http://www.sh-linux.org/rpm-2003/SRPMS/gcc-3.2.3-3.src.rpm contains a jumbo patch,
  214.25 +gcc-20030210-sh-linux-1.patch, that includes a fix for this.  Here's the
  214.26 +appropriate hunk (brings in a fix for the documented -mieee option).
  214.27 +No idea if this fix is completely right, but it works for me...
  214.28 +- dank@kegel.com  20 Jul 2003
  214.29 +
  214.30 +Index: linux.h
  214.31 +===================================================================
  214.32 +RCS file: /cvsroot/gcc/gcc/gcc/config/sh/linux.h,v
  214.33 +retrieving revision 1.9.20.1
  214.34 +diff -u -d -u -r1.9.20.1 linux.h
  214.35 +--- gcc-ss-3_3-20030714/gcc/config/sh/linux.h.old	6 Jun 2003 02:30:59 -0000	1.9.20.1
  214.36 ++++ gcc-ss-3_3-20030714/gcc/config/sh/linux.h	20 Jul 2003 23:36:50 -0000
  214.37 +@@ -59,7 +59,7 @@
  214.38 + #undef LIB_SPEC
  214.39 + #define LIB_SPEC \
  214.40 +   "%{shared: -lc} \
  214.41 +-   %{!shared: %{pthread:-lthread} \
  214.42 ++   %{!shared: %{mieee:-lieee} %{pthread:-lpthread} \
  214.43 +      %{profile:-lc_p} %{!profile: -lc}}"
  214.44 + 
  214.45 + #undef STARTFILE_SPEC
   215.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   215.2 +++ b/patches/gcc/3.4.0/gcc-3.3.3h-ppc-asm-spec.patch	Sat Feb 24 11:00:05 2007 +0000
   215.3 @@ -0,0 +1,88 @@
   215.4 +Retrieved from http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.h.diff?r1=1.234.2.28&r2=1.234.2.29
   215.5 +
   215.6 +Should fix following error building gcc for ppc7450:
   215.7 +
   215.8 +/tmp/ccmfQBT9.s:5197: Error: Unrecognized opcode: `lvx'
   215.9 +make[2]: *** [libgcc/./unwind-dw2.o] Error 1
  215.10 +make[2]: Leaving directory `build-gcc-core/gcc'
  215.11 +make[1]: *** [stmp-multilib] Error 2
  215.12 +make[1]: Leaving directory `build-gcc-core/gcc'
  215.13 +make: *** [all-gcc] Error 2
  215.14 +
  215.15 +(I'm not so sure about the unconditional -many it sends to binutils;
  215.16 +that seems redundant?)
  215.17 +
  215.18 +Revision 1.234.2.29, Tue May 25 06:08:57 2004 UTC (6 days, 11 hours ago) by amodra
  215.19 +Branch: hammer-3_3-branch
  215.20 +Changes since 1.234.2.28: +15 -11 lines
  215.21 +
  215.22 +	* config/rs6000/rs6000.h (ASM_CPU_SPEC): Handle -mpowerpc64 and -mcpu
  215.23 +	for power5 and rs64a.  Correct condition for default.  Correct power3,
  215.24 +	620, 630, 7400, 7450, G4, 970 and G5 -mcpu entries.  Add -many.
  215.25 +
  215.26 +===================================================================
  215.27 +RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v
  215.28 +retrieving revision 1.234.2.28
  215.29 +retrieving revision 1.234.2.29
  215.30 +diff -u -r1.234.2.28 -r1.234.2.29
  215.31 +--- gcc/gcc/config/rs6000/rs6000.h	2004/05/18 14:26:57	1.234.2.28
  215.32 ++++ gcc/gcc/config/rs6000/rs6000.h	2004/05/25 06:08:57	1.234.2.29
  215.33 +@@ -51,20 +51,23 @@
  215.34 + "%{!mcpu*: \
  215.35 +   %{mpower: %{!mpower2: -mpwr}} \
  215.36 +   %{mpower2: -mpwrx} \
  215.37 +-  %{mpowerpc*: -mppc} \
  215.38 ++  %{mpowerpc64*: -mppc64} \
  215.39 ++  %{!mpowerpc64*: %{mpowerpc*: -mppc}} \
  215.40 +   %{mno-power: %{!mpowerpc*: -mcom}} \
  215.41 +-  %{!mno-power: %{!mpower2: %(asm_default)}}} \
  215.42 ++  %{!mno-power: %{!mpower*: %(asm_default)}}} \
  215.43 + %{mcpu=common: -mcom} \
  215.44 + %{mcpu=power: -mpwr} \
  215.45 + %{mcpu=power2: -mpwrx} \
  215.46 +-%{mcpu=power3: -m604} \
  215.47 ++%{mcpu=power3: -mppc64} \
  215.48 + %{mcpu=power4: -mpower4} \
  215.49 ++%{mcpu=power5: -mpower4} \
  215.50 + %{mcpu=powerpc: -mppc} \
  215.51 + %{mcpu=rios: -mpwr} \
  215.52 + %{mcpu=rios1: -mpwr} \
  215.53 + %{mcpu=rios2: -mpwrx} \
  215.54 + %{mcpu=rsc: -mpwr} \
  215.55 + %{mcpu=rsc1: -mpwr} \
  215.56 ++%{mcpu=rs64a: -mppc64} \
  215.57 + %{mcpu=401: -mppc} \
  215.58 + %{mcpu=403: -m403} \
  215.59 + %{mcpu=405: -m405} \
  215.60 +@@ -79,22 +82,23 @@
  215.61 + %{mcpu=ec603e: -mppc} \
  215.62 + %{mcpu=604: -mppc} \
  215.63 + %{mcpu=604e: -mppc} \
  215.64 +-%{mcpu=620: -mppc} \
  215.65 +-%{mcpu=630: -m604} \
  215.66 ++%{mcpu=620: -mppc64} \
  215.67 ++%{mcpu=630: -mppc64} \
  215.68 + %{mcpu=740: -mppc} \
  215.69 +-%{mcpu=7400: -mppc} \
  215.70 +-%{mcpu=7450: -mppc} \
  215.71 +-%{mcpu=G4: -mppc} \
  215.72 + %{mcpu=750: -mppc} \
  215.73 + %{mcpu=G3: -mppc} \
  215.74 ++%{mcpu=7400: -mppc -maltivec} \
  215.75 ++%{mcpu=7450: -mppc -maltivec} \
  215.76 ++%{mcpu=G4: -mppc -maltivec} \
  215.77 + %{mcpu=801: -mppc} \
  215.78 + %{mcpu=821: -mppc} \
  215.79 + %{mcpu=823: -mppc} \
  215.80 + %{mcpu=860: -mppc} \
  215.81 +-%{mcpu=970: -mpower4} \
  215.82 +-%{mcpu=G5: -mpower4} \
  215.83 ++%{mcpu=970: -mpower4 -maltivec} \
  215.84 ++%{mcpu=G5: -mpower4 -maltivec} \
  215.85 + %{mcpu=8540: -me500} \
  215.86 +-%{maltivec: -maltivec}"
  215.87 ++%{maltivec: -maltivec} \
  215.88 ++-many"
  215.89 + 
  215.90 + #define CPP_DEFAULT_SPEC ""
  215.91 + 
   216.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   216.2 +++ b/patches/gcc/3.4.0/gcc-3.4.0-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   216.3 @@ -0,0 +1,70 @@
   216.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
   216.5 +Adds support for arm*b-linux* big-endian ARM targets
   216.6 +
   216.7 +See http://gcc.gnu.org/PR16350
   216.8 +
   216.9 +diff -urN gcc-3.4.0.orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
  216.10 +--- gcc-3.4.0.orig/gcc/config/arm/linux-elf.h	2004-01-31 07:18:11.000000000 +0100
  216.11 ++++ gcc-3.4.0/gcc/config/arm/linux-elf.h	2004-07-02 14:46:29.225443757 +0200
  216.12 +@@ -30,17 +30,34 @@
  216.13 + /* Do not assume anything about header files.  */
  216.14 + #define NO_IMPLICIT_EXTERN_C
  216.15 + 
  216.16 ++/*
  216.17 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  216.18 ++ * (big endian) configurations.
  216.19 ++ */
  216.20 ++#if TARGET_BIG_ENDIAN_DEFAULT
  216.21 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
  216.22 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  216.23 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  216.24 ++#else
  216.25 ++#define TARGET_ENDIAN_DEFAULT 0
  216.26 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  216.27 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  216.28 ++#endif
  216.29 ++
  216.30 + /* Default is to use APCS-32 mode.  */
  216.31 + #undef  TARGET_DEFAULT
  216.32 +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
  216.33 ++#define TARGET_DEFAULT \
  216.34 ++		( ARM_FLAG_APCS_32 | \
  216.35 ++		  ARM_FLAG_MMU_TRAPS | \
  216.36 ++		  TARGET_ENDIAN_DEFAULT )
  216.37 + 
  216.38 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  216.39 + 
  216.40 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  216.41 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  216.42 + 
  216.43 + #undef  MULTILIB_DEFAULTS
  216.44 + #define MULTILIB_DEFAULTS \
  216.45 +-	{ "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  216.46 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  216.47 + 
  216.48 + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
  216.49 + 
  216.50 +@@ -89,7 +106,7 @@
  216.51 +    %{rdynamic:-export-dynamic} \
  216.52 +    %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  216.53 +    -X \
  216.54 +-   %{mbig-endian:-EB}" \
  216.55 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  216.56 +    SUBTARGET_EXTRA_LINK_SPEC
  216.57 + 
  216.58 + #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
  216.59 +diff -urN gcc-3.4.0.orig/gcc/config.gcc gcc-3.4.0/gcc/config.gcc
  216.60 +--- gcc-3.4.0.orig/gcc/config.gcc	2004-04-17 04:28:24.000000000 +0200
  216.61 ++++ gcc-3.4.0/gcc/config.gcc	2004-07-02 14:44:40.045822542 +0200
  216.62 +@@ -666,6 +666,11 @@
  216.63 + 	;;
  216.64 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  216.65 + 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h  arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
  216.66 ++	case $target in
  216.67 ++	arm*b-*)
  216.68 ++		tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
  216.69 ++		;;
  216.70 ++	esac
  216.71 + 	tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
  216.72 + 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  216.73 + 	gnu_ld=yes
   217.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   217.2 +++ b/patches/gcc/3.4.0/gcc-3.4.0-arm-lib1asm.patch	Sat Feb 24 11:00:05 2007 +0000
   217.3 @@ -0,0 +1,27 @@
   217.4 +# Origin: from a patch by Dimitry Andric <dimitry@andric.com>, 2004-05-01
   217.5 +# See http://gcc.gnu.org/PR14352 and http://gcc.gnu.org/PR16314
   217.6 +# See also http://gcc.gnu.org/ml/gcc-patches/2004-08/msg02568.html et seq for why this isn't in mainline
   217.7 +# Fixes errors like the following when building glibc (or any other executable
   217.8 +# or shared library) when using gcc 3.4.0 for ARM with softfloat:
   217.9 +#
  217.10 +# .../libc_pic.os(.text+0x15834): In function `__modf': undefined reference to `__subdf3'
  217.11 +# .../libc_pic.os(.text+0x158b8): In function `__modf': undefined reference to `__subdf3'
  217.12 +# .../libc_pic.os(.text+0x1590c): In function `scalbn': undefined reference to `__muldf3'
  217.13 +# .../libc_pic.os(.text+0x15e94): In function `__ldexpf': undefined reference to `__eqsf2'
  217.14 +# .../libc_pic.os(.text+0xcee4c): In function `monstartup': undefined reference to `__fixsfsi'
  217.15 +
  217.16 +diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux
  217.17 +--- gcc-3.4.0-orig/gcc/config/arm/t-linux	2003-09-20 23:09:07.000000000 +0200
  217.18 ++++ gcc-3.4.0/gcc/config/arm/t-linux	2004-05-01 20:31:59.102846400 +0200
  217.19 +@@ -4,7 +4,10 @@
  217.20 + LIBGCC2_DEBUG_CFLAGS = -g0
  217.21 + 
  217.22 + LIB1ASMSRC = arm/lib1funcs.asm
  217.23 +-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
  217.24 ++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
  217.25 ++	_negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
  217.26 ++	_truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
  217.27 ++	_fixsfsi _fixunssfsi
  217.28 + 
  217.29 + # MULTILIB_OPTIONS = mhard-float/msoft-float
  217.30 + # MULTILIB_DIRNAMES = hard-float soft-float
   218.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   218.2 +++ b/patches/gcc/3.4.0/gcc-3.4.0-arm-nolibfloat.patch	Sat Feb 24 11:00:05 2007 +0000
   218.3 @@ -0,0 +1,24 @@
   218.4 +# Dimitry Andric <dimitry@andric.com>, 2004-05-01
   218.5 +#
   218.6 +# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
   218.7 +#   anymore.  (The required functions are now in libgcc.)
   218.8 +# 
   218.9 +# Fixes errors like
  218.10 +# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
  218.11 +# collect2: ld returned 1 exit status
  218.12 +# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
  218.13 +# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
  218.14 +
  218.15 +diff -urNd gcc-3.4.0-orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
  218.16 +--- gcc-3.4.0-orig/gcc/config/arm/linux-elf.h	2004-01-31 07:18:11.000000000 +0100
  218.17 ++++ gcc-3.4.0/gcc/config/arm/linux-elf.h	2004-05-01 19:19:06.935979200 +0200
  218.18 +@@ -55,7 +73,7 @@
  218.19 +    %{shared:-lc} \
  218.20 +    %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
  218.21 + 
  218.22 +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
  218.23 ++#define LIBGCC_SPEC "-lgcc"
  218.24 + 
  218.25 + /* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
  218.26 +    the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
  218.27 +
   219.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   219.2 +++ b/patches/gcc/3.4.0/gcc-3.4.0-pr14808-refix.patch	Sat Feb 24 11:00:05 2007 +0000
   219.3 @@ -0,0 +1,46 @@
   219.4 +See http://gcc.gnu.org/ml/gcc/2004-06/msg00394.html
   219.5 +This might fix the error
   219.6 +
   219.7 +strstream.s: Assembler messages:
   219.8 +strstream.s:8390: Error: junk `(%ecx)' after expression
   219.9 +strstream.s:8402: Error: junk `(%ecx)' after expression
  219.10 +strstream.s:8551: Error: junk `(%ecx)' after expression
  219.11 +strstream.s:8563: Error: junk `(%ecx)' after expression
  219.12 +make[3]: *** [strstream.lo] Error 1
  219.13 +make[3]: Leaving directory `i686-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-gcc/i686-unknown-linux-gnu/libstdc++-v3/src'
  219.14 +
  219.15 +when building a cygwin->linux cross-compiler with gcc-3.4.0,
  219.16 +probably caused by patch to fix http://gcc.gnu.org/PR14808
  219.17 +
  219.18 +
  219.19 +--- gcc-3.4.0/gcc/cp/method.c.old	Sun Jun  6 22:46:04 2004
  219.20 ++++ gcc-3.4.0/gcc/cp/method.c	Sun Jun  6 22:48:13 2004
  219.21 +@@ -286,7 +286,7 @@
  219.22 +   tree alias;
  219.23 +   char buf[256];
  219.24 + 
  219.25 +-#if defined (__CYGWIN__) || defined (__MINGW32__)
  219.26 ++#if defined (TARGET_IS_PE_COFF)
  219.27 +   if (DECL_ONE_ONLY (function))
  219.28 +     return function;
  219.29 + #endif
  219.30 +@@ -404,7 +404,7 @@
  219.31 +   push_to_top_level ();
  219.32 + 
  219.33 + #if defined (ASM_OUTPUT_DEF) \
  219.34 +-  && !(defined (__CYGWIN__) || defined (__MINGW32__))
  219.35 ++  && !defined (TARGET_IS_PE_COFF)
  219.36 +   if (targetm.have_named_sections)
  219.37 +     {
  219.38 +       resolve_unique_section (function, 0, flag_function_sections);
  219.39 +--- gcc-3.4.0/gcc/config/i386/cygming.h.old	Sun Jun  6 22:50:46 2004
  219.40 ++++ gcc-3.4.0/gcc/config/i386/cygming.h	Sun Jun  6 22:52:10 2004
  219.41 +@@ -27,6 +27,8 @@
  219.42 + 
  219.43 + #define TARGET_EXECUTABLE_SUFFIX ".exe"
  219.44 + 
  219.45 ++#define TARGET_IS_PE_COFF 1
  219.46 ++
  219.47 + #include <stdio.h>
  219.48 + 
  219.49 + /* Masks for subtarget switches used by other files.  */
   220.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   220.2 +++ b/patches/gcc/3.4.0/gcc-3.4.0-ultrasparc3-default64.patch	Sat Feb 24 11:00:05 2007 +0000
   220.3 @@ -0,0 +1,52 @@
   220.4 +Date: Sat, 1 May 2004 21:08:10 +0200
   220.5 +From: Jakub Jelinek <jakub@redhat.com>
   220.6 +To: Dan Kegel <dank@kegel.com>, mark@codesourcery.com
   220.7 +Cc: gcc-patches@gcc.gnu.org
   220.8 +Subject: [PATCH] sparc64-linux --with-cpu=ultrasparc fix
   220.9 +Message-ID: <20040501190810.GD5191@sunsite.ms.mff.cuni.cz>
  220.10 +Reply-To: Jakub Jelinek <jakub@redhat.com>
  220.11 +References: <40940B11.9080907@kegel.com>
  220.12 +In-Reply-To: <40940B11.9080907@kegel.com>
  220.13 +
  220.14 +On Sat, May 01, 2004 at 01:39:45PM -0700, Dan Kegel wrote:
  220.15 +> I'm having a bit of trouble configuring gcc-3.4.0  for sparc64-linux.
  220.16 +> The resulting compiler defaults to sparc32, which is a problem
  220.17 +> because it means having to figure out how to add
  220.18 +> -mcpu=ultrasparc3 -Wa,-Av9a -m64 to CFLAGS for everything I build.
  220.19 +> The worst part is that this even affects libgcc.a, which makes it
  220.20 +> pretty hard to link any sparc64 executables.  I could figure out
  220.21 +> how mklibgcc and multilibbing work, and maybe thereby get a good 64 bit 
  220.22 +> libgcc.a,
  220.23 +> but I'd kind of like to avoid that for the moment, and just really get
  220.24 +> gcc to default to 64 bit output.
  220.25 +> 
  220.26 +> What's the right way to get gcc to default to building 64 bit executables
  220.27 +> when targeting sparc64-linux?
  220.28 +
  220.29 +There was TARGET_CPU_ultrasparc3 missing in linux64.h.
  220.30 +I've commited the following fix to the trunk, but as it is not a regression,
  220.31 +I'm not sure if Mark is ok with this for gcc-3_4-branch.
  220.32 +
  220.33 +2004-05-01  Jakub Jelinek  <jakub@redhat.com>
  220.34 +
  220.35 +	* config/sparc/linux64.h (TARGET_DEFAULT): Make 64-bit by default
  220.36 +	also for TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3.
  220.37 +
  220.38 +--- gcc-3.4.0/gcc/config/sparc/linux64.h.jj	2004-05-01 22:59:52.000000000 +0200
  220.39 ++++ gcc-3.4.0/gcc/config/sparc/linux64.h	2004-05-01 23:00:41.126176529 +0200
  220.40 +@@ -39,7 +39,9 @@ Boston, MA 02111-1307, USA.  */
  220.41 + #undef MD_EXEC_PREFIX
  220.42 + #undef MD_STARTFILE_PREFIX
  220.43 + 
  220.44 +-#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc
  220.45 ++#if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
  220.46 ++    || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
  220.47 ++    || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3
  220.48 + /* A 64 bit v9 compiler with stack-bias,
  220.49 +    in a Medium/Low code model environment.  */
  220.50 + 
  220.51 +
  220.52 +	Jakub
  220.53 +
  220.54 +
  220.55 +
   221.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   221.2 +++ b/patches/gcc/3.4.0/pr13250-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   221.3 @@ -0,0 +1,19 @@
   221.4 +See http://gcc.gnu.org/PR13250
   221.5 +Fixes bad code generated when compiling SHA256 for SH processor
   221.6 +
   221.7 +===================================================================
   221.8 +RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.md,v
   221.9 +retrieving revision 1.171
  221.10 +retrieving revision 1.172
  221.11 +diff -u -r1.171 -r1.172
  221.12 +--- gcc/gcc/config/sh/sh.md	2004/05/10 23:25:13	1.171
  221.13 ++++ gcc/gcc/config/sh/sh.md	2004/05/28 05:47:36	1.172
  221.14 +@@ -2194,7 +2194,7 @@
  221.15 + 	parts[0] = gen_reg_rtx (SImode);
  221.16 + 	parts[1] = gen_reg_rtx (SImode);
  221.17 + 	emit_insn (gen_rotlsi3_16 (parts[2-choice], operands[1]));
  221.18 +-	parts[choice-1] = operands[1];
  221.19 ++	emit_move_insn (parts[choice-1], operands[1]);
  221.20 + 	emit_insn (gen_ashlsi3 (parts[0], parts[0], GEN_INT (8)));
  221.21 + 	emit_insn (gen_lshrsi3 (parts[1], parts[1], GEN_INT (8)));
  221.22 + 	emit_insn (gen_iorsi3 (operands[0], parts[0], parts[1]));
   222.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   222.2 +++ b/patches/gcc/3.4.0/pr15647-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   222.3 @@ -0,0 +1,288 @@
   222.4 +Received: (qmail 11693 invoked from network); 26 May 2004 03:17:41 -0000
   222.5 +Received: from unknown (HELO r-rr.iij4u.or.jp) (210.130.0.76)
   222.6 +  by sourceware dot org with SMTP; 26 May 2004 03:17:41 -0000
   222.7 +Received: from localhost (frgw.3in.ne.jp [210.251.121.226])
   222.8 +	by r-rr dot iij4u dot or dot jp (8 dot 11 dot 6+IIJ/8 dot 11 dot 6) with ESMTP id i4Q3HbJ21421;
   222.9 +	Wed, 26 May 2004 12:17:37 +0900 (JST)
  222.10 +Date: Wed, 26 May 2004 12:13:58 +0900 (JST)
  222.11 +Message-Id: <20040526.121358.39460214.kkojima@rr.iij4u.or.jp>
  222.12 +To: gcc-patches at gcc dot gnu dot org
  222.13 +Cc: Mark Mitchell <mark at codesourcery dot com>
  222.14 +Subject: [PATCH] Fix PR target/15647 for sh-linux
  222.15 +From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
  222.16 +Mime-Version: 1.0
  222.17 +Content-Type: Text/Plain; charset=us-ascii
  222.18 +Content-Transfer-Encoding: 7bit
  222.19 +
  222.20 +Hi,
  222.21 +
  222.22 +The appended patch is to fix PR target/15647
  222.23 +  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15647
  222.24 +for linux.
  222.25 +__udivsi3 is exported from libgcc_s.so.1 and gcc generates the code
  222.26 +which assumes r1 will be not clobbered when calling __udivsi3 in SH3
  222.27 +case.  This is bad because r1 is clobbered by PLT.
  222.28 +The another functions listed in the standard libgcc-std.ver which
  222.29 +possively have similar problem are __ashlsi3, __ashrsi3 and __lshrsi3,
  222.30 +though these are used only by SH1/2.
  222.31 +The patch below simply uses an SH specific libgcc-std.ver which drops
  222.32 +these functions.  SH linux uses a linker script libgcc_s.so having
  222.33 +libgcc.a as a suppementary library, so these functions given by
  222.34 +libgcc.a when needed in the link time.
  222.35 +Although mainline has one failure in bulding zlib which can be avoided
  222.36 +with -fno-reorder-blocks for sh3-unknown-linux-gnu target, x86 cross
  222.37 +to sh3-unknown-linux-gnu can be build successfully on mainline with
  222.38 +this patch except the above failure.  3.4-branch successfully bootstraps
  222.39 +with it and there are no new failures on the native sh4-unknown-linux-gnu.
  222.40 +The patch is highly sh-linux specific and seems to be safe.  I'll check
  222.41 +it into mainline.
  222.42 +The original PR is also for sh3 netbsd.  I'd like to leave it for the
  222.43 +netbsd experts.
  222.44 +
  222.45 +I think that it's too late for 3.3.4.  Mark, is it also late for
  222.46 +3.4.1?
  222.47 +
  222.48 +Regards,
  222.49 +	kaz
  222.50 +--
  222.51 +2004-05-26  Kaz Kojima  <kkojima@gcc.gnu.org>
  222.52 +
  222.53 +	* config/sh/t-linux (SHLIB_MAPFILES): Use sh specific
  222.54 +	libgcc-std.ver.
  222.55 +	* config/sh/libgcc-std.ver: New file.
  222.56 +
  222.57 +diff -u3prN ORIG-gcc/gcc/config/sh/t-linux LOCAL-gcc/gcc/config/sh/t-linux
  222.58 +--- ORIG-gcc/gcc/config/sh/t-linux	Mon Feb 16 20:13:25 2004
  222.59 ++++ LOCAL-gcc/gcc/config/sh/t-linux	Tue May 25 18:25:48 2004
  222.60 +@@ -11,8 +11,11 @@ MULTILIB_EXCEPTIONS=
  222.61 + EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
  222.62 + 
  222.63 + # Override t-slibgcc-elf-ver to export some libgcc symbols with
  222.64 +-# the symbol versions that glibc used.
  222.65 +-SHLIB_MAPFILES =  $(srcdir)/libgcc-std.ver $(srcdir)/config/sh/libgcc-glibc.ver
  222.66 ++# the symbol versions that glibc used.  Also use an sh specific
  222.67 ++# libgcc-std.ver to avoid to export some lib1func routines which
  222.68 ++# should not be called via PLT.
  222.69 ++SHLIB_MAPFILES =  $(srcdir)/config/sh/libgcc-std.ver \
  222.70 ++	$(srcdir)/config/sh/libgcc-glibc.ver
  222.71 + 
  222.72 + # Override SHLIB_LINK and SHLIB_INSTALL to use linker script
  222.73 + # libgcc_s.so.
  222.74 +diff -u3prN ORIG-gcc/gcc/config/sh/libgcc-std.ver LOCAL-gcc/gcc/config/sh/libgcc-std.ver
  222.75 +--- ORIG-gcc/gcc/config/sh/libgcc-std.ver	Thu Jan  1 09:00:00 1970
  222.76 ++++ LOCAL-gcc/gcc/config/sh/libgcc-std.ver	Tue May 25 18:50:54 2004
  222.77 +@@ -0,0 +1,213 @@
  222.78 ++GCC_3.0 {
  222.79 ++  # libgcc1 integer symbols
  222.80 ++  __absvsi2
  222.81 ++  __addvsi3
  222.82 ++  # __ashlsi3
  222.83 ++  # __ashrsi3
  222.84 ++  __divsi3
  222.85 ++  # __lshrsi3
  222.86 ++  __modsi3
  222.87 ++  __mulsi3
  222.88 ++  __mulvsi3
  222.89 ++  __negvsi2
  222.90 ++  __subvsi3
  222.91 ++  # __udivsi3
  222.92 ++  __umodsi3
  222.93 ++
  222.94 ++  # libgcc1 floating point symbols
  222.95 ++  __addsf3
  222.96 ++  __adddf3
  222.97 ++  __addxf3
  222.98 ++  __addtf3
  222.99 ++  __divsf3
 222.100 ++  __divdf3
 222.101 ++  __divxf3
 222.102 ++  __divtf3
 222.103 ++  __eqsf2
 222.104 ++  __eqdf2
 222.105 ++  __eqxf2
 222.106 ++  __eqtf2
 222.107 ++  __extenddfxf2
 222.108 ++  __extenddftf2
 222.109 ++  __extendsfdf2
 222.110 ++  __extendsfxf2
 222.111 ++  __extendsftf2
 222.112 ++  __fixsfsi
 222.113 ++  __fixdfsi
 222.114 ++  __fixxfsi
 222.115 ++  __fixtfsi
 222.116 ++  __floatsisf
 222.117 ++  __floatsidf
 222.118 ++  __floatsixf
 222.119 ++  __floatsitf
 222.120 ++  __gesf2
 222.121 ++  __gedf2
 222.122 ++  __gexf2
 222.123 ++  __getf2
 222.124 ++  __gtsf2
 222.125 ++  __gtdf2
 222.126 ++  __gtxf2
 222.127 ++  __gttf2
 222.128 ++  __lesf2
 222.129 ++  __ledf2
 222.130 ++  __lexf2
 222.131 ++  __letf2
 222.132 ++  __ltsf2
 222.133 ++  __ltdf2
 222.134 ++  __ltxf2
 222.135 ++  __lttf2
 222.136 ++  __mulsf3
 222.137 ++  __muldf3
 222.138 ++  __mulxf3
 222.139 ++  __multf3
 222.140 ++  __negsf2
 222.141 ++  __negdf2
 222.142 ++  __negxf2
 222.143 ++  __negtf2
 222.144 ++  __nesf2
 222.145 ++  __nedf2
 222.146 ++  __nexf2
 222.147 ++  __netf2
 222.148 ++  __subsf3
 222.149 ++  __subdf3
 222.150 ++  __subxf3
 222.151 ++  __subtf3
 222.152 ++  __truncdfsf2
 222.153 ++  __truncxfsf2
 222.154 ++  __trunctfsf2
 222.155 ++  __truncxfdf2
 222.156 ++  __trunctfdf2
 222.157 ++
 222.158 ++  # libgcc2 DImode arithmetic (for 32-bit targets).
 222.159 ++  __absvdi2
 222.160 ++  __addvdi3
 222.161 ++  __ashldi3
 222.162 ++  __ashrdi3
 222.163 ++  __cmpdi2
 222.164 ++  __divdi3
 222.165 ++  __ffsdi2
 222.166 ++  __fixdfdi
 222.167 ++  __fixsfdi
 222.168 ++  __fixtfdi
 222.169 ++  __fixxfdi
 222.170 ++  __fixunsdfdi
 222.171 ++  __fixunsdfsi
 222.172 ++  __fixunssfsi
 222.173 ++  __fixunssfdi
 222.174 ++  __fixunstfdi
 222.175 ++  __fixunstfsi
 222.176 ++  __fixunsxfdi
 222.177 ++  __fixunsxfsi
 222.178 ++  __floatdidf
 222.179 ++  __floatdisf
 222.180 ++  __floatdixf
 222.181 ++  __floatditf
 222.182 ++  __lshrdi3
 222.183 ++  __moddi3
 222.184 ++  __muldi3
 222.185 ++  __mulvdi3
 222.186 ++  __negdi2
 222.187 ++  __negvdi2
 222.188 ++  __subvdi3
 222.189 ++  __ucmpdi2
 222.190 ++  __udivdi3
 222.191 ++  __udivmoddi4
 222.192 ++  __umoddi3
 222.193 ++
 222.194 ++  # libgcc2 TImode arithmetic (for 64-bit targets).
 222.195 ++  __ashlti3
 222.196 ++  __ashrti3
 222.197 ++  __cmpti2
 222.198 ++  __divti3
 222.199 ++  __ffsti2
 222.200 ++  __fixdfti
 222.201 ++  __fixsfti
 222.202 ++  __fixtfti
 222.203 ++  __fixxfti
 222.204 ++  __lshrti3
 222.205 ++  __modti3
 222.206 ++  __multi3
 222.207 ++  __negti2
 222.208 ++  __ucmpti2
 222.209 ++  __udivmodti4
 222.210 ++  __udivti3
 222.211 ++  __umodti3
 222.212 ++  __fixunsdfti
 222.213 ++  __fixunssfti
 222.214 ++  __fixunstfti
 222.215 ++  __fixunsxfti
 222.216 ++  __floattidf
 222.217 ++  __floattisf
 222.218 ++  __floattixf
 222.219 ++  __floattitf
 222.220 ++
 222.221 ++  # Used to deal with trampoline initialization on some platforms
 222.222 ++  __clear_cache
 222.223 ++
 222.224 ++  # EH symbols
 222.225 ++  _Unwind_DeleteException
 222.226 ++  _Unwind_Find_FDE
 222.227 ++  _Unwind_ForcedUnwind
 222.228 ++  _Unwind_GetGR
 222.229 ++  _Unwind_GetIP
 222.230 ++  _Unwind_GetLanguageSpecificData
 222.231 ++  _Unwind_GetRegionStart
 222.232 ++  _Unwind_GetTextRelBase
 222.233 ++  _Unwind_GetDataRelBase
 222.234 ++  _Unwind_RaiseException
 222.235 ++  _Unwind_Resume
 222.236 ++  _Unwind_SetGR
 222.237 ++  _Unwind_SetIP
 222.238 ++  __deregister_frame
 222.239 ++  __deregister_frame_info
 222.240 ++  __deregister_frame_info_bases
 222.241 ++  __register_frame
 222.242 ++  __register_frame_info
 222.243 ++  __register_frame_info_bases
 222.244 ++  __register_frame_info_table
 222.245 ++  __register_frame_info_table_bases
 222.246 ++  __register_frame_table
 222.247 ++
 222.248 ++  # SjLj EH symbols
 222.249 ++  _Unwind_SjLj_Register
 222.250 ++  _Unwind_SjLj_Unregister
 222.251 ++  _Unwind_SjLj_RaiseException
 222.252 ++  _Unwind_SjLj_ForcedUnwind
 222.253 ++  _Unwind_SjLj_Resume
 222.254 ++}
 222.255 ++
 222.256 ++%inherit GCC_3.3 GCC_3.0
 222.257 ++GCC_3.3 {
 222.258 ++  _Unwind_FindEnclosingFunction
 222.259 ++  _Unwind_GetCFA
 222.260 ++  _Unwind_Backtrace
 222.261 ++  _Unwind_Resume_or_Rethrow
 222.262 ++  _Unwind_SjLj_Resume_or_Rethrow
 222.263 ++}
 222.264 ++
 222.265 ++%inherit GCC_3.3.1 GCC_3.3
 222.266 ++GCC_3.3.1 {
 222.267 ++  __gcc_personality_sj0
 222.268 ++  __gcc_personality_v0
 222.269 ++}
 222.270 ++
 222.271 ++%inherit GCC_3.3.2 GCC_3.3.1
 222.272 ++GCC_3.3.2 {
 222.273 ++}
 222.274 ++
 222.275 ++%inherit GCC_3.4 GCC_3.3.2
 222.276 ++GCC_3.4 {
 222.277 ++  # bit scanning and counting built-ins
 222.278 ++  __clzsi2
 222.279 ++  __clzdi2
 222.280 ++  __clzti2
 222.281 ++  __ctzsi2
 222.282 ++  __ctzdi2
 222.283 ++  __ctzti2
 222.284 ++  __popcountsi2
 222.285 ++  __popcountdi2
 222.286 ++  __popcountti2
 222.287 ++  __paritysi2
 222.288 ++  __paritydi2
 222.289 ++  __parityti2
 222.290 ++}
 222.291 +
   223.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   223.2 +++ b/patches/gcc/3.4.1/fix-fixincl.patch	Sat Feb 24 11:00:05 2007 +0000
   223.3 @@ -0,0 +1,70 @@
   223.4 +See http://gcc.gnu.org/PR22541
   223.5 +
   223.6 +From: Dan Kegel
   223.7 +
   223.8 +When building gcc-3.4.3 or gcc-4.0.0 as a cross into a clean $PREFIX
   223.9 +(the only two I've tried like this), the configure script happily copies
  223.10 +the glibc include files from include to sys-include; here's the line
  223.11 +from the log file (with $PREFIX instead of the real prefix):
  223.12 +
  223.13 +Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
  223.14 +
  223.15 +But later, when running fixincludes, it gives the error message
  223.16 + The directory that should contain system headers does not exist:
  223.17 +  $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
  223.18 +
  223.19 +Nevertheless, it continues building; the header files it installs in
  223.20 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
  223.21 +do not include the boilerplate that would cause it to #include_next the
  223.22 +glibc headers in the system header directory.
  223.23 +Thus the resulting toolchain can't compile the following program:
  223.24 +#include <limits.h>
  223.25 +int x = PATH_MAX;
  223.26 +because its limits.h doesn't include the glibc header.
  223.27 +
  223.28 +That's not nice.  I suspect the problem is that gcc/Makefile.in assumes that
  223.29 +it can refer to $PREFIX/i686-unknown-linux-gnu  with the path 
  223.30 +                $PREFIX/lib/../i686-unknown-linux-gnu, but
  223.31 +that fails because the directory $PREFIX/lib doesn't exist during 'make all';
  223.32 +it is only created later, during 'make install'.  (Which makes this problem
  223.33 +confusing, since one only notices the breakage well after 'make install',
  223.34 +at which point the path configure complained about does exist, and has the
  223.35 +right stuff in it.)
  223.36 +
  223.37 +A possible fix is to replace the line in gcc/Makefile.in that says
  223.38 +    SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  223.39 +with a version that gets rid of extra ..'s, e.g.
  223.40 +    SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
  223.41 +(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
  223.42 +for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
  223.43 +
  223.44 +
  223.45 +--- gcc-3.4.3/gcc/Makefile.in.foo	2005-05-20 11:41:39.000000000 -0700
  223.46 ++++ gcc-3.4.3/gcc/Makefile.in	2005-05-20 12:08:46.000000000 -0700
  223.47 +@@ -350,7 +350,10 @@
  223.48 + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
  223.49 + 
  223.50 + # autoconf sets SYSTEM_HEADER_DIR to one of the above.
  223.51 +-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  223.52 ++# Purge it of unneccessary internal relative paths
  223.53 ++# to directories that might not exist yet.
  223.54 ++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
  223.55 ++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
  223.56 + 
  223.57 + # Control whether to run fixproto and fixincludes.
  223.58 + STMP_FIXPROTO = @STMP_FIXPROTO@
  223.59 +@@ -2532,11 +2535,13 @@
  223.60 + 	$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(gcc_tooldir)
  223.61 + 
  223.62 + # Build fixed copies of system files.
  223.63 ++# Abort if no system headers available, unless building a crosscompiler.
  223.64 ++# FIXME: abort unless building --without-headers would be more accurate and less ugly
  223.65 + stmp-fixinc: fixinc.sh gsyslimits.h
  223.66 + 	@if test ! -d ${SYSTEM_HEADER_DIR}; then \
  223.67 + 	  echo The directory that should contain system headers does not exist: >&2 ; \
  223.68 + 	  echo "  ${SYSTEM_HEADER_DIR}" >&2 ; \
  223.69 +-	  if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
  223.70 ++	  if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
  223.71 + 	  then sleep 1; else exit 1; fi; \
  223.72 + 	fi
  223.73 + 	rm -rf include; mkdir include
   224.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   224.2 +++ b/patches/gcc/3.4.1/gcc-3.4-sparc-pr16430-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   224.3 @@ -0,0 +1,42 @@
   224.4 +Message-ID: <33159.207.230.144.240.1093980498.squirrel@207.230.144.240>
   224.5 +Date: Tue, 31 Aug 2004 14:28:18 -0500 (CDT)
   224.6 +Subject: Crosstool 0.28-rc35
   224.7 +From: "Jason Rothstein" <fdragon@fdragon.org>
   224.8 +To: dank@kegel.com
   224.9 +
  224.10 +Could you please add the patches in GCC PR 16430 to GCC 3.4.1?
  224.11 +
  224.12 +http://gcc.gnu.org/PR16430
  224.13 +
  224.14 +These fix one of 2 current ICE conditions when building a sparc64 ada
  224.15 +compilers.
  224.16 +
  224.17 +
  224.18 +http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sparc/sparc.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.271.4.16&r2=1.271.4.17
  224.19 +
  224.20 +===================================================================
  224.21 +RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
  224.22 +retrieving revision 1.271.4.16
  224.23 +retrieving revision 1.271.4.17
  224.24 +diff -u -r1.271.4.16 -r1.271.4.17
  224.25 +--- gcc/gcc/config/sparc/sparc.c	2004/07/08 13:00:56	1.271.4.16
  224.26 ++++ gcc/gcc/config/sparc/sparc.c	2004/07/08 14:36:51	1.271.4.17
  224.27 +@@ -5808,6 +5808,18 @@
  224.28 + 	    abort ();
  224.29 + 
  224.30 + 	  mode = mode_for_size (bytes * BITS_PER_UNIT, MODE_INT, 0);
  224.31 ++
  224.32 ++	  /* ??? We probably should have made the same ABI change in
  224.33 ++	     3.4.0 as the one we made for unions.   The latter was
  224.34 ++	     required by the SCD though, while the former is not
  224.35 ++	     specified, so we favored compatibility and efficiency.
  224.36 ++
  224.37 ++	     Now we're stuck for aggregates larger than 16 bytes,
  224.38 ++	     because OImode vanished in the meantime.  Let's not
  224.39 ++	     try to be unduly clever, and simply follow the ABI
  224.40 ++	     for unions in that case.  */
  224.41 ++	  if (mode == BLKmode)
  224.42 ++	    return function_arg_union_value (bytes, mode, regbase);
  224.43 + 	}
  224.44 +       else if (GET_MODE_CLASS (mode) == MODE_INT
  224.45 + 	       && GET_MODE_SIZE (mode) < UNITS_PER_WORD)
   225.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   225.2 +++ b/patches/gcc/3.4.1/gcc-3.4.0-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   225.3 @@ -0,0 +1,70 @@
   225.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
   225.5 +Adds support for arm*b-linux* big-endian ARM targets
   225.6 +
   225.7 +See http://gcc.gnu.org/PR16350
   225.8 +
   225.9 +diff -urN gcc-3.4.0.orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
  225.10 +--- gcc-3.4.0.orig/gcc/config/arm/linux-elf.h	2004-01-31 07:18:11.000000000 +0100
  225.11 ++++ gcc-3.4.0/gcc/config/arm/linux-elf.h	2004-07-02 14:46:29.225443757 +0200
  225.12 +@@ -30,17 +30,34 @@
  225.13 + /* Do not assume anything about header files.  */
  225.14 + #define NO_IMPLICIT_EXTERN_C
  225.15 + 
  225.16 ++/*
  225.17 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  225.18 ++ * (big endian) configurations.
  225.19 ++ */
  225.20 ++#if TARGET_BIG_ENDIAN_DEFAULT
  225.21 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
  225.22 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  225.23 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  225.24 ++#else
  225.25 ++#define TARGET_ENDIAN_DEFAULT 0
  225.26 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  225.27 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  225.28 ++#endif
  225.29 ++
  225.30 + /* Default is to use APCS-32 mode.  */
  225.31 + #undef  TARGET_DEFAULT
  225.32 +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
  225.33 ++#define TARGET_DEFAULT \
  225.34 ++		( ARM_FLAG_APCS_32 | \
  225.35 ++		  ARM_FLAG_MMU_TRAPS | \
  225.36 ++		  TARGET_ENDIAN_DEFAULT )
  225.37 + 
  225.38 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  225.39 + 
  225.40 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  225.41 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  225.42 + 
  225.43 + #undef  MULTILIB_DEFAULTS
  225.44 + #define MULTILIB_DEFAULTS \
  225.45 +-	{ "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  225.46 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  225.47 + 
  225.48 + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
  225.49 + 
  225.50 +@@ -89,7 +106,7 @@
  225.51 +    %{rdynamic:-export-dynamic} \
  225.52 +    %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  225.53 +    -X \
  225.54 +-   %{mbig-endian:-EB}" \
  225.55 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  225.56 +    SUBTARGET_EXTRA_LINK_SPEC
  225.57 + 
  225.58 + #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
  225.59 +diff -urN gcc-3.4.0.orig/gcc/config.gcc gcc-3.4.0/gcc/config.gcc
  225.60 +--- gcc-3.4.0.orig/gcc/config.gcc	2004-04-17 04:28:24.000000000 +0200
  225.61 ++++ gcc-3.4.0/gcc/config.gcc	2004-07-02 14:44:40.045822542 +0200
  225.62 +@@ -666,6 +666,11 @@
  225.63 + 	;;
  225.64 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  225.65 + 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h  arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
  225.66 ++	case $target in
  225.67 ++	arm*b-*)
  225.68 ++		tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
  225.69 ++		;;
  225.70 ++	esac
  225.71 + 	tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
  225.72 + 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  225.73 + 	gnu_ld=yes
   226.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   226.2 +++ b/patches/gcc/3.4.1/gcc-3.4.0-arm-lib1asm.patch	Sat Feb 24 11:00:05 2007 +0000
   226.3 @@ -0,0 +1,27 @@
   226.4 +# Origin: from a patch by Dimitry Andric <dimitry@andric.com>, 2004-05-01
   226.5 +# See http://gcc.gnu.org/PR14352 and http://gcc.gnu.org/PR16314
   226.6 +# See also http://gcc.gnu.org/ml/gcc-patches/2004-08/msg02568.html et seq for why this isn't in mainline
   226.7 +# Fixes errors like the following when building glibc (or any other executable
   226.8 +# or shared library) when using gcc 3.4.0 for ARM with softfloat:
   226.9 +#
  226.10 +# .../libc_pic.os(.text+0x15834): In function `__modf': undefined reference to `__subdf3'
  226.11 +# .../libc_pic.os(.text+0x158b8): In function `__modf': undefined reference to `__subdf3'
  226.12 +# .../libc_pic.os(.text+0x1590c): In function `scalbn': undefined reference to `__muldf3'
  226.13 +# .../libc_pic.os(.text+0x15e94): In function `__ldexpf': undefined reference to `__eqsf2'
  226.14 +# .../libc_pic.os(.text+0xcee4c): In function `monstartup': undefined reference to `__fixsfsi'
  226.15 +
  226.16 +diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux
  226.17 +--- gcc-3.4.0-orig/gcc/config/arm/t-linux	2003-09-20 23:09:07.000000000 +0200
  226.18 ++++ gcc-3.4.0/gcc/config/arm/t-linux	2004-05-01 20:31:59.102846400 +0200
  226.19 +@@ -4,7 +4,10 @@
  226.20 + LIBGCC2_DEBUG_CFLAGS = -g0
  226.21 + 
  226.22 + LIB1ASMSRC = arm/lib1funcs.asm
  226.23 +-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
  226.24 ++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
  226.25 ++	_negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
  226.26 ++	_truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
  226.27 ++	_fixsfsi _fixunssfsi
  226.28 + 
  226.29 + # MULTILIB_OPTIONS = mhard-float/msoft-float
  226.30 + # MULTILIB_DIRNAMES = hard-float soft-float
   227.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   227.2 +++ b/patches/gcc/3.4.1/gcc-3.4.0-arm-nolibfloat.patch	Sat Feb 24 11:00:05 2007 +0000
   227.3 @@ -0,0 +1,24 @@
   227.4 +# Dimitry Andric <dimitry@andric.com>, 2004-05-01
   227.5 +#
   227.6 +# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
   227.7 +#   anymore.  (The required functions are now in libgcc.)
   227.8 +# 
   227.9 +# Fixes errors like
  227.10 +# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
  227.11 +# collect2: ld returned 1 exit status
  227.12 +# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
  227.13 +# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
  227.14 +
  227.15 +diff -urNd gcc-3.4.0-orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
  227.16 +--- gcc-3.4.0-orig/gcc/config/arm/linux-elf.h	2004-01-31 07:18:11.000000000 +0100
  227.17 ++++ gcc-3.4.0/gcc/config/arm/linux-elf.h	2004-05-01 19:19:06.935979200 +0200
  227.18 +@@ -55,7 +73,7 @@
  227.19 +    %{shared:-lc} \
  227.20 +    %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
  227.21 + 
  227.22 +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
  227.23 ++#define LIBGCC_SPEC "-lgcc"
  227.24 + 
  227.25 + /* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
  227.26 +    the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
  227.27 +
   228.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   228.2 +++ b/patches/gcc/3.4.1/pr15068-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   228.3 @@ -0,0 +1,44 @@
   228.4 +See http://gcc.gnu.org/PR15068
   228.5 +
   228.6 +Fixes error
   228.7 +
   228.8 +../sysdeps/generic/s_fmax.c: In function `__fmax':
   228.9 +../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
  228.10 +Please submit a full bug report,
  228.11 +with preprocessed source if appropriate.
  228.12 +See <URL:http://gcc.gnu.org/bugs.html> for instructions.
  228.13 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1
  228.14 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math'
  228.15 +make[1]: *** [math/others] Error 2
  228.16 +make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
  228.17 +make: *** [all] Error 2
  228.18 +
  228.19 +[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
  228.20 +http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ]
  228.21 +
  228.22 +--- gcc-3.4.1/gcc/flow.c.old	2004-02-27 19:39:19.000000000 -0800
  228.23 ++++ gcc-3.4.1/gcc/flow.c	2004-08-26 07:29:46.000000000 -0700
  228.24 +@@ -1878,6 +1878,7 @@
  228.25 + 	  rtx set_src = SET_SRC (pc_set (BB_END (bb)));
  228.26 + 	  rtx cond_true = XEXP (set_src, 0);
  228.27 + 	  rtx reg = XEXP (cond_true, 0);
  228.28 ++ 	  enum rtx_code inv_cond;
  228.29 + 
  228.30 + 	  if (GET_CODE (reg) == SUBREG)
  228.31 + 	    reg = SUBREG_REG (reg);
  228.32 +@@ -1886,11 +1887,13 @@
  228.33 + 	     in the form of a comparison of a register against zero.  
  228.34 + 	     If the condition is more complex than that, then it is safe
  228.35 + 	     not to record any information.  */
  228.36 +-	  if (GET_CODE (reg) == REG
  228.37 ++ 	  inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
  228.38 ++ 	  if (inv_cond != UNKNOWN
  228.39 ++	      && GET_CODE (reg) == REG
  228.40 + 	      && XEXP (cond_true, 1) == const0_rtx)
  228.41 + 	    {
  228.42 + 	      rtx cond_false
  228.43 +-		= gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
  228.44 ++		= gen_rtx_fmt_ee (inv_cond,
  228.45 + 				  GET_MODE (cond_true), XEXP (cond_true, 0),
  228.46 + 				  XEXP (cond_true, 1));
  228.47 + 	      if (GET_CODE (XEXP (set_src, 1)) == PC)
   229.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   229.2 +++ b/patches/gcc/3.4.2/gcc-3.4.0-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   229.3 @@ -0,0 +1,82 @@
   229.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
   229.5 +Adds support for arm*b-linux* big-endian ARM targets
   229.6 +
   229.7 +Fixes build error
   229.8 +
   229.9 +/opt/crosstool/armeb-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/armeb-unknown-linux-gnu/bin/ld: unrecognised emulation mode: armelf_linux
  229.10 +Supported emulations: armelfb_linux armelfb
  229.11 +collect2: ld returned 1 exit status
  229.12 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc36/build/armeb-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/build-glibc/csu/crt1.o] Error 1
  229.13 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc36/build/armeb-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/glibc-2.3.3/csu'
  229.14 +make[1]: *** [csu/subdir_lib] Error 2
  229.15 +make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc36/build/armeb-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/glibc-2.3.3'
  229.16 +make: *** [all] Error 2
  229.17 +
  229.18 +
  229.19 +See http://gcc.gnu.org/PR16350
  229.20 +
  229.21 +diff -urN gcc-3.4.0.orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
  229.22 +--- gcc-3.4.0.orig/gcc/config/arm/linux-elf.h	2004-01-31 07:18:11.000000000 +0100
  229.23 ++++ gcc-3.4.0/gcc/config/arm/linux-elf.h	2004-07-02 14:46:29.225443757 +0200
  229.24 +@@ -30,17 +30,34 @@
  229.25 + /* Do not assume anything about header files.  */
  229.26 + #define NO_IMPLICIT_EXTERN_C
  229.27 + 
  229.28 ++/*
  229.29 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  229.30 ++ * (big endian) configurations.
  229.31 ++ */
  229.32 ++#if TARGET_BIG_ENDIAN_DEFAULT
  229.33 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
  229.34 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  229.35 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  229.36 ++#else
  229.37 ++#define TARGET_ENDIAN_DEFAULT 0
  229.38 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  229.39 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  229.40 ++#endif
  229.41 ++
  229.42 + /* Default is to use APCS-32 mode.  */
  229.43 + #undef  TARGET_DEFAULT
  229.44 +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
  229.45 ++#define TARGET_DEFAULT \
  229.46 ++		( ARM_FLAG_APCS_32 | \
  229.47 ++		  ARM_FLAG_MMU_TRAPS | \
  229.48 ++		  TARGET_ENDIAN_DEFAULT )
  229.49 + 
  229.50 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  229.51 + 
  229.52 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  229.53 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  229.54 + 
  229.55 + #undef  MULTILIB_DEFAULTS
  229.56 + #define MULTILIB_DEFAULTS \
  229.57 +-	{ "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  229.58 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  229.59 + 
  229.60 + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
  229.61 + 
  229.62 +@@ -89,7 +106,7 @@
  229.63 +    %{rdynamic:-export-dynamic} \
  229.64 +    %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  229.65 +    -X \
  229.66 +-   %{mbig-endian:-EB}" \
  229.67 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  229.68 +    SUBTARGET_EXTRA_LINK_SPEC
  229.69 + 
  229.70 + #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
  229.71 +diff -urN gcc-3.4.0.orig/gcc/config.gcc gcc-3.4.0/gcc/config.gcc
  229.72 +--- gcc-3.4.0.orig/gcc/config.gcc	2004-04-17 04:28:24.000000000 +0200
  229.73 ++++ gcc-3.4.0/gcc/config.gcc	2004-07-02 14:44:40.045822542 +0200
  229.74 +@@ -666,6 +666,11 @@
  229.75 + 	;;
  229.76 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  229.77 + 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h  arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
  229.78 ++	case $target in
  229.79 ++	arm*b-*)
  229.80 ++		tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
  229.81 ++		;;
  229.82 ++	esac
  229.83 + 	tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
  229.84 + 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  229.85 + 	gnu_ld=yes
   230.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   230.2 +++ b/patches/gcc/3.4.2/gcc-3.4.0-arm-lib1asm.patch	Sat Feb 24 11:00:05 2007 +0000
   230.3 @@ -0,0 +1,27 @@
   230.4 +# Origin: from a patch by Dimitry Andric <dimitry@andric.com>, 2004-05-01
   230.5 +# See http://gcc.gnu.org/PR14352 and http://gcc.gnu.org/PR16314
   230.6 +# See also http://gcc.gnu.org/ml/gcc-patches/2004-08/msg02568.html et seq for why this isn't in mainline
   230.7 +# Fixes errors like the following when building glibc (or any other executable
   230.8 +# or shared library) when using gcc 3.4.0 for ARM with softfloat:
   230.9 +#
  230.10 +# .../libc_pic.os(.text+0x15834): In function `__modf': undefined reference to `__subdf3'
  230.11 +# .../libc_pic.os(.text+0x158b8): In function `__modf': undefined reference to `__subdf3'
  230.12 +# .../libc_pic.os(.text+0x1590c): In function `scalbn': undefined reference to `__muldf3'
  230.13 +# .../libc_pic.os(.text+0x15e94): In function `__ldexpf': undefined reference to `__eqsf2'
  230.14 +# .../libc_pic.os(.text+0xcee4c): In function `monstartup': undefined reference to `__fixsfsi'
  230.15 +
  230.16 +diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux
  230.17 +--- gcc-3.4.0-orig/gcc/config/arm/t-linux	2003-09-20 23:09:07.000000000 +0200
  230.18 ++++ gcc-3.4.0/gcc/config/arm/t-linux	2004-05-01 20:31:59.102846400 +0200
  230.19 +@@ -4,7 +4,10 @@
  230.20 + LIBGCC2_DEBUG_CFLAGS = -g0
  230.21 + 
  230.22 + LIB1ASMSRC = arm/lib1funcs.asm
  230.23 +-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
  230.24 ++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
  230.25 ++	_negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
  230.26 ++	_truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
  230.27 ++	_fixsfsi _fixunssfsi
  230.28 + 
  230.29 + # MULTILIB_OPTIONS = mhard-float/msoft-float
  230.30 + # MULTILIB_DIRNAMES = hard-float soft-float
   231.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   231.2 +++ b/patches/gcc/3.4.2/gcc-3.4.0-arm-nolibfloat.patch	Sat Feb 24 11:00:05 2007 +0000
   231.3 @@ -0,0 +1,24 @@
   231.4 +# Dimitry Andric <dimitry@andric.com>, 2004-05-01
   231.5 +#
   231.6 +# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
   231.7 +#   anymore.  (The required functions are now in libgcc.)
   231.8 +# 
   231.9 +# Fixes errors like
  231.10 +# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
  231.11 +# collect2: ld returned 1 exit status
  231.12 +# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
  231.13 +# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
  231.14 +
  231.15 +diff -urNd gcc-3.4.0-orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
  231.16 +--- gcc-3.4.0-orig/gcc/config/arm/linux-elf.h	2004-01-31 07:18:11.000000000 +0100
  231.17 ++++ gcc-3.4.0/gcc/config/arm/linux-elf.h	2004-05-01 19:19:06.935979200 +0200
  231.18 +@@ -55,7 +73,7 @@
  231.19 +    %{shared:-lc} \
  231.20 +    %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
  231.21 + 
  231.22 +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
  231.23 ++#define LIBGCC_SPEC "-lgcc"
  231.24 + 
  231.25 + /* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
  231.26 +    the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
  231.27 +
   232.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   232.2 +++ b/patches/gcc/3.4.3/fix-fixincl.patch	Sat Feb 24 11:00:05 2007 +0000
   232.3 @@ -0,0 +1,70 @@
   232.4 +See http://gcc.gnu.org/PR22541
   232.5 +
   232.6 +From: Dan Kegel
   232.7 +
   232.8 +When building gcc-3.4.3 or gcc-4.0.0 as a cross into a clean $PREFIX
   232.9 +(the only two I've tried like this), the configure script happily copies
  232.10 +the glibc include files from include to sys-include; here's the line
  232.11 +from the log file (with $PREFIX instead of the real prefix):
  232.12 +
  232.13 +Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
  232.14 +
  232.15 +But later, when running fixincludes, it gives the error message
  232.16 + The directory that should contain system headers does not exist:
  232.17 +  $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
  232.18 +
  232.19 +Nevertheless, it continues building; the header files it installs in
  232.20 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
  232.21 +do not include the boilerplate that would cause it to #include_next the
  232.22 +glibc headers in the system header directory.
  232.23 +Thus the resulting toolchain can't compile the following program:
  232.24 +#include <limits.h>
  232.25 +int x = PATH_MAX;
  232.26 +because its limits.h doesn't include the glibc header.
  232.27 +
  232.28 +That's not nice.  I suspect the problem is that gcc/Makefile.in assumes that
  232.29 +it can refer to $PREFIX/i686-unknown-linux-gnu  with the path 
  232.30 +                $PREFIX/lib/../i686-unknown-linux-gnu, but
  232.31 +that fails because the directory $PREFIX/lib doesn't exist during 'make all';
  232.32 +it is only created later, during 'make install'.  (Which makes this problem
  232.33 +confusing, since one only notices the breakage well after 'make install',
  232.34 +at which point the path configure complained about does exist, and has the
  232.35 +right stuff in it.)
  232.36 +
  232.37 +A possible fix is to replace the line in gcc/Makefile.in that says
  232.38 +    SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  232.39 +with a version that gets rid of extra ..'s, e.g.
  232.40 +    SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
  232.41 +(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
  232.42 +for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
  232.43 +
  232.44 +
  232.45 +--- gcc-3.4.3/gcc/Makefile.in.foo	2005-05-20 11:41:39.000000000 -0700
  232.46 ++++ gcc-3.4.3/gcc/Makefile.in	2005-05-20 12:08:46.000000000 -0700
  232.47 +@@ -350,7 +350,10 @@
  232.48 + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
  232.49 + 
  232.50 + # autoconf sets SYSTEM_HEADER_DIR to one of the above.
  232.51 +-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  232.52 ++# Purge it of unneccessary internal relative paths
  232.53 ++# to directories that might not exist yet.
  232.54 ++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
  232.55 ++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
  232.56 + 
  232.57 + # Control whether to run fixproto and fixincludes.
  232.58 + STMP_FIXPROTO = @STMP_FIXPROTO@
  232.59 +@@ -2532,11 +2535,13 @@
  232.60 + 	$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(gcc_tooldir)
  232.61 + 
  232.62 + # Build fixed copies of system files.
  232.63 ++# Abort if no system headers available, unless building a crosscompiler.
  232.64 ++# FIXME: abort unless building --without-headers would be more accurate and less ugly
  232.65 + stmp-fixinc: fixinc.sh gsyslimits.h
  232.66 + 	@if test ! -d ${SYSTEM_HEADER_DIR}; then \
  232.67 + 	  echo The directory that should contain system headers does not exist: >&2 ; \
  232.68 + 	  echo "  ${SYSTEM_HEADER_DIR}" >&2 ; \
  232.69 +-	  if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
  232.70 ++	  if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
  232.71 + 	  then sleep 1; else exit 1; fi; \
  232.72 + 	fi
  232.73 + 	rm -rf include; mkdir include
   233.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   233.2 +++ b/patches/gcc/3.4.3/gcc-3.4.0-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   233.3 @@ -0,0 +1,82 @@
   233.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
   233.5 +Adds support for arm*b-linux* big-endian ARM targets
   233.6 +
   233.7 +Fixes build error
   233.8 +
   233.9 +/opt/crosstool/armeb-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/armeb-unknown-linux-gnu/bin/ld: unrecognised emulation mode: armelf_linux
  233.10 +Supported emulations: armelfb_linux armelfb
  233.11 +collect2: ld returned 1 exit status
  233.12 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc36/build/armeb-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/build-glibc/csu/crt1.o] Error 1
  233.13 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc36/build/armeb-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/glibc-2.3.3/csu'
  233.14 +make[1]: *** [csu/subdir_lib] Error 2
  233.15 +make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc36/build/armeb-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/glibc-2.3.3'
  233.16 +make: *** [all] Error 2
  233.17 +
  233.18 +
  233.19 +See http://gcc.gnu.org/PR16350
  233.20 +
  233.21 +diff -urN gcc-3.4.0.orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
  233.22 +--- gcc-3.4.0.orig/gcc/config/arm/linux-elf.h	2004-01-31 07:18:11.000000000 +0100
  233.23 ++++ gcc-3.4.0/gcc/config/arm/linux-elf.h	2004-07-02 14:46:29.225443757 +0200
  233.24 +@@ -30,17 +30,34 @@
  233.25 + /* Do not assume anything about header files.  */
  233.26 + #define NO_IMPLICIT_EXTERN_C
  233.27 + 
  233.28 ++/*
  233.29 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  233.30 ++ * (big endian) configurations.
  233.31 ++ */
  233.32 ++#if TARGET_BIG_ENDIAN_DEFAULT
  233.33 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
  233.34 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  233.35 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  233.36 ++#else
  233.37 ++#define TARGET_ENDIAN_DEFAULT 0
  233.38 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  233.39 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  233.40 ++#endif
  233.41 ++
  233.42 + /* Default is to use APCS-32 mode.  */
  233.43 + #undef  TARGET_DEFAULT
  233.44 +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
  233.45 ++#define TARGET_DEFAULT \
  233.46 ++		( ARM_FLAG_APCS_32 | \
  233.47 ++		  ARM_FLAG_MMU_TRAPS | \
  233.48 ++		  TARGET_ENDIAN_DEFAULT )
  233.49 + 
  233.50 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  233.51 + 
  233.52 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  233.53 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  233.54 + 
  233.55 + #undef  MULTILIB_DEFAULTS
  233.56 + #define MULTILIB_DEFAULTS \
  233.57 +-	{ "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  233.58 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  233.59 + 
  233.60 + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
  233.61 + 
  233.62 +@@ -89,7 +106,7 @@
  233.63 +    %{rdynamic:-export-dynamic} \
  233.64 +    %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  233.65 +    -X \
  233.66 +-   %{mbig-endian:-EB}" \
  233.67 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  233.68 +    SUBTARGET_EXTRA_LINK_SPEC
  233.69 + 
  233.70 + #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
  233.71 +diff -urN gcc-3.4.0.orig/gcc/config.gcc gcc-3.4.0/gcc/config.gcc
  233.72 +--- gcc-3.4.0.orig/gcc/config.gcc	2004-04-17 04:28:24.000000000 +0200
  233.73 ++++ gcc-3.4.0/gcc/config.gcc	2004-07-02 14:44:40.045822542 +0200
  233.74 +@@ -666,6 +666,11 @@
  233.75 + 	;;
  233.76 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  233.77 + 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h  arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
  233.78 ++	case $target in
  233.79 ++	arm*b-*)
  233.80 ++		tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
  233.81 ++		;;
  233.82 ++	esac
  233.83 + 	tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
  233.84 + 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  233.85 + 	gnu_ld=yes
   234.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   234.2 +++ b/patches/gcc/3.4.3/gcc-3.4.0-arm-lib1asm.patch	Sat Feb 24 11:00:05 2007 +0000
   234.3 @@ -0,0 +1,27 @@
   234.4 +# Origin: from a patch by Dimitry Andric <dimitry@andric.com>, 2004-05-01
   234.5 +# See http://gcc.gnu.org/PR14352 and http://gcc.gnu.org/PR16314
   234.6 +# See also http://gcc.gnu.org/ml/gcc-patches/2004-08/msg02568.html et seq for why this isn't in mainline
   234.7 +# Fixes errors like the following when building glibc (or any other executable
   234.8 +# or shared library) when using gcc 3.4.0 for ARM with softfloat:
   234.9 +#
  234.10 +# .../libc_pic.os(.text+0x15834): In function `__modf': undefined reference to `__subdf3'
  234.11 +# .../libc_pic.os(.text+0x158b8): In function `__modf': undefined reference to `__subdf3'
  234.12 +# .../libc_pic.os(.text+0x1590c): In function `scalbn': undefined reference to `__muldf3'
  234.13 +# .../libc_pic.os(.text+0x15e94): In function `__ldexpf': undefined reference to `__eqsf2'
  234.14 +# .../libc_pic.os(.text+0xcee4c): In function `monstartup': undefined reference to `__fixsfsi'
  234.15 +
  234.16 +diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux
  234.17 +--- gcc-3.4.0-orig/gcc/config/arm/t-linux	2003-09-20 23:09:07.000000000 +0200
  234.18 ++++ gcc-3.4.0/gcc/config/arm/t-linux	2004-05-01 20:31:59.102846400 +0200
  234.19 +@@ -4,7 +4,10 @@
  234.20 + LIBGCC2_DEBUG_CFLAGS = -g0
  234.21 + 
  234.22 + LIB1ASMSRC = arm/lib1funcs.asm
  234.23 +-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
  234.24 ++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
  234.25 ++	_negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
  234.26 ++	_truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
  234.27 ++	_fixsfsi _fixunssfsi
  234.28 + 
  234.29 + # MULTILIB_OPTIONS = mhard-float/msoft-float
  234.30 + # MULTILIB_DIRNAMES = hard-float soft-float
   235.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   235.2 +++ b/patches/gcc/3.4.3/gcc-3.4.0-arm-nolibfloat.patch	Sat Feb 24 11:00:05 2007 +0000
   235.3 @@ -0,0 +1,24 @@
   235.4 +# Dimitry Andric <dimitry@andric.com>, 2004-05-01
   235.5 +#
   235.6 +# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
   235.7 +#   anymore.  (The required functions are now in libgcc.)
   235.8 +# 
   235.9 +# Fixes errors like
  235.10 +# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
  235.11 +# collect2: ld returned 1 exit status
  235.12 +# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
  235.13 +# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
  235.14 +
  235.15 +diff -urNd gcc-3.4.0-orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
  235.16 +--- gcc-3.4.0-orig/gcc/config/arm/linux-elf.h	2004-01-31 07:18:11.000000000 +0100
  235.17 ++++ gcc-3.4.0/gcc/config/arm/linux-elf.h	2004-05-01 19:19:06.935979200 +0200
  235.18 +@@ -55,7 +73,7 @@
  235.19 +    %{shared:-lc} \
  235.20 +    %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
  235.21 + 
  235.22 +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
  235.23 ++#define LIBGCC_SPEC "-lgcc"
  235.24 + 
  235.25 + /* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
  235.26 +    the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
  235.27 +
   236.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   236.2 +++ b/patches/gcc/3.4.3/pr15068-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   236.3 @@ -0,0 +1,44 @@
   236.4 +See http://gcc.gnu.org/PR15068
   236.5 +
   236.6 +Fixes error
   236.7 +
   236.8 +../sysdeps/generic/s_fmax.c: In function `__fmax':
   236.9 +../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
  236.10 +Please submit a full bug report,
  236.11 +with preprocessed source if appropriate.
  236.12 +See <URL:http://gcc.gnu.org/bugs.html> for instructions.
  236.13 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1
  236.14 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math'
  236.15 +make[1]: *** [math/others] Error 2
  236.16 +make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
  236.17 +make: *** [all] Error 2
  236.18 +
  236.19 +[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
  236.20 +http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ]
  236.21 +
  236.22 +--- gcc-3.4.1/gcc/flow.c.old	2004-02-27 19:39:19.000000000 -0800
  236.23 ++++ gcc-3.4.1/gcc/flow.c	2004-08-26 07:29:46.000000000 -0700
  236.24 +@@ -1878,6 +1878,7 @@
  236.25 + 	  rtx set_src = SET_SRC (pc_set (BB_END (bb)));
  236.26 + 	  rtx cond_true = XEXP (set_src, 0);
  236.27 + 	  rtx reg = XEXP (cond_true, 0);
  236.28 ++ 	  enum rtx_code inv_cond;
  236.29 + 
  236.30 + 	  if (GET_CODE (reg) == SUBREG)
  236.31 + 	    reg = SUBREG_REG (reg);
  236.32 +@@ -1886,11 +1887,13 @@
  236.33 + 	     in the form of a comparison of a register against zero.  
  236.34 + 	     If the condition is more complex than that, then it is safe
  236.35 + 	     not to record any information.  */
  236.36 +-	  if (GET_CODE (reg) == REG
  236.37 ++ 	  inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
  236.38 ++ 	  if (inv_cond != UNKNOWN
  236.39 ++	      && GET_CODE (reg) == REG
  236.40 + 	      && XEXP (cond_true, 1) == const0_rtx)
  236.41 + 	    {
  236.42 + 	      rtx cond_false
  236.43 +-		= gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
  236.44 ++		= gen_rtx_fmt_ee (inv_cond,
  236.45 + 				  GET_MODE (cond_true), XEXP (cond_true, 0),
  236.46 + 				  XEXP (cond_true, 1));
  236.47 + 	      if (GET_CODE (XEXP (set_src, 1)) == PC)
   237.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   237.2 +++ b/patches/gcc/3.4.3/pr16201-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   237.3 @@ -0,0 +1,149 @@
   237.4 +See http://gcc.gnu.org/PR16201
   237.5 +
   237.6 +Should fix "bad immediate value for offset" errors for several flavors of arm, e.g.
   237.7 +
   237.8 +/tmp/ccmdoQyg.s: Assembler messages:
   237.9 +/tmp/ccmdoQyg.s:6235: Error: bad immediate value for offset (4096)
  237.10 +make[2]: *** [crosstool-0.32/build/arm-xscale-linux-gnu/gcc-3.4.3-glibc-2.3.3/build-glibc/locale/ld-collate.o] Error 1
  237.11 +
  237.12 +/tmp/cc0c7qop.s: Assembler messages:
  237.13 +/tmp/cc0c7qop.s:6234: Error: bad immediate value for offset (4104)
  237.14 +make[2]: *** [crosstool-0.32/build/armv5b-softfloat-linux/gcc-3.4.3-glibc-2.3.3/build-glibc/locale/ld-collate.o] Error 1
  237.15 +
  237.16 +
  237.17 +CVSROOT:        /cvs/gcc
  237.18 +Module name:    gcc
  237.19 +Branch:         gcc-3_4-branch
  237.20 +Changes by:     rearnsha@gcc.gnu.org    2005-02-01 15:07:05
  237.21 +
  237.22 +Modified files:
  237.23 +        gcc            : ChangeLog 
  237.24 +        gcc/config/arm : arm-protos.h arm.c 
  237.25 +
  237.26 +Log message:
  237.27 +        PR target/16201
  237.28 +        * arm.c (arm_eliminable_register): New function.
  237.29 +        (adjacent_mem_locations): Don't allow eliminable registers.  Use
  237.30 +        HOST_WIDE_INT for address offsets.
  237.31 +        * arm-protos.h (arm_eliminable_register): Add prototype.
  237.32 +
  237.33 +Patches:
  237.34 +http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.790&r2=2.2326.2.791
  237.35 +http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/arm-protos.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.61&r2=1.61.4.1
  237.36 +http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/arm/arm.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.317.4.8&r2=1.317.4.9
  237.37 +
  237.38 +===================================================================
  237.39 +RCS file: /cvs/gcc/gcc/gcc/config/arm/arm-protos.h,v
  237.40 +retrieving revision 1.61
  237.41 +retrieving revision 1.61.4.1
  237.42 +diff -u -r1.61 -r1.61.4.1
  237.43 +--- gcc/gcc/config/arm/arm-protos.h	2003/11/20 11:44:18	1.61
  237.44 ++++ gcc/gcc/config/arm/arm-protos.h	2005/02/01 15:07:02	1.61.4.1
  237.45 +@@ -1,5 +1,6 @@
  237.46 + /* Prototypes for exported functions defined in arm.c and pe.c
  237.47 +-   Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
  237.48 ++   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005
  237.49 ++   Free Software Foundation, Inc.
  237.50 +    Contributed by Richard Earnshaw (rearnsha@arm.com)
  237.51 +    Minor hacks by Nick Clifton (nickc@cygnus.com)
  237.52 + 
  237.53 +@@ -138,6 +139,7 @@
  237.54 + extern int arm_is_longcall_p (rtx, int, int);
  237.55 + extern int    arm_emit_vector_const (FILE *, rtx);
  237.56 + extern const char * arm_output_load_gr (rtx *);
  237.57 ++extern int arm_eliminable_register (rtx);
  237.58 + 
  237.59 + #if defined TREE_CODE
  237.60 + extern rtx arm_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
  237.61 +===================================================================
  237.62 +RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
  237.63 +retrieving revision 1.317.4.8
  237.64 +retrieving revision 1.317.4.9
  237.65 +diff -u -r1.317.4.8 -r1.317.4.9
  237.66 +--- gcc/gcc/config/arm/arm.c	2004/04/29 19:52:41	1.317.4.8
  237.67 ++++ gcc/gcc/config/arm/arm.c	2005/02/01 15:07:02	1.317.4.9
  237.68 +@@ -1,6 +1,6 @@
  237.69 + /* Output routines for GCC for ARM.
  237.70 +    Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
  237.71 +-   2002, 2003, 2004  Free Software Foundation, Inc.
  237.72 ++   2002, 2003, 2004, 2005  Free Software Foundation, Inc.
  237.73 +    Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
  237.74 +    and Martin Simmons (@harleqn.co.uk).
  237.75 +    More major hacks by Richard Earnshaw (rearnsha@arm.com).
  237.76 +@@ -4056,6 +4056,16 @@
  237.77 + 	  && INTVAL (op) < 64);
  237.78 + }
  237.79 + 
  237.80 ++/* Return true if X is a register that will be eliminated later on.  */
  237.81 ++int
  237.82 ++arm_eliminable_register (rtx x)
  237.83 ++{
  237.84 ++  return REG_P (x) && (REGNO (x) == FRAME_POINTER_REGNUM
  237.85 ++		       || REGNO (x) == ARG_POINTER_REGNUM
  237.86 ++		       || (REGNO (x) >= FIRST_VIRTUAL_REGISTER
  237.87 ++			   && REGNO (x) <= LAST_VIRTUAL_REGISTER));
  237.88 ++}
  237.89 ++
  237.90 + /* Returns TRUE if INSN is an "LDR REG, ADDR" instruction.
  237.91 +    Use by the Cirrus Maverick code which has to workaround
  237.92 +    a hardware bug triggered by such instructions.  */
  237.93 +@@ -4569,33 +4579,42 @@
  237.94 + 	  || (GET_CODE (XEXP (b, 0)) == PLUS
  237.95 + 	      && GET_CODE (XEXP (XEXP (b, 0), 1)) == CONST_INT)))
  237.96 +     {
  237.97 +-      int val0 = 0, val1 = 0;
  237.98 +-      int reg0, reg1;
  237.99 +-  
 237.100 ++      HOST_WIDE_INT val0 = 0, val1 = 0;
 237.101 ++      rtx reg0, reg1;
 237.102 ++      int val_diff;
 237.103 ++
 237.104 +       if (GET_CODE (XEXP (a, 0)) == PLUS)
 237.105 +         {
 237.106 +-	  reg0 = REGNO  (XEXP (XEXP (a, 0), 0));
 237.107 ++	  reg0 = XEXP (XEXP (a, 0), 0);
 237.108 + 	  val0 = INTVAL (XEXP (XEXP (a, 0), 1));
 237.109 +         }
 237.110 +       else
 237.111 +-	reg0 = REGNO (XEXP (a, 0));
 237.112 ++	reg0 = XEXP (a, 0);
 237.113 + 
 237.114 +       if (GET_CODE (XEXP (b, 0)) == PLUS)
 237.115 +         {
 237.116 +-	  reg1 = REGNO  (XEXP (XEXP (b, 0), 0));
 237.117 ++	  reg1 = XEXP (XEXP (b, 0), 0);
 237.118 + 	  val1 = INTVAL (XEXP (XEXP (b, 0), 1));
 237.119 +         }
 237.120 +       else
 237.121 +-	reg1 = REGNO (XEXP (b, 0));
 237.122 ++	reg1 = XEXP (b, 0);
 237.123 + 
 237.124 +       /* Don't accept any offset that will require multiple
 237.125 + 	 instructions to handle, since this would cause the
 237.126 + 	 arith_adjacentmem pattern to output an overlong sequence.  */
 237.127 +       if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1))
 237.128 + 	return 0;
 237.129 +-      
 237.130 +-      return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4);
 237.131 ++
 237.132 ++      /* Don't allow an eliminable register: register elimination can make
 237.133 ++	 the offset too large.  */
 237.134 ++      if (arm_eliminable_register (reg0))
 237.135 ++	return 0;
 237.136 ++
 237.137 ++      val_diff = val1 - val0;
 237.138 ++      return ((REGNO (reg0) == REGNO (reg1))
 237.139 ++	      && (val_diff == 4 || val_diff == -4));
 237.140 +     }
 237.141 ++
 237.142 +   return 0;
 237.143 + }
 237.144 + 
 237.145 +@@ -7301,7 +7320,6 @@
 237.146 +   return "";
 237.147 + }
 237.148 + 
 237.149 +-
 237.150 + /* Output a move from arm registers to an fpa registers.
 237.151 +    OPERANDS[0] is an fpa register.
 237.152 +    OPERANDS[1] is the first registers of an arm register pair.  */
   238.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   238.2 +++ b/patches/gcc/3.4.3/pr18508-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   238.3 @@ -0,0 +1,143 @@
   238.4 +See http://gcc.gnu.org/PR18508
   238.5 +
   238.6 +This should fix cygwin errors like:
   238.7 +
   238.8 +basename: missing operand
   238.9 +Try `basename --help' for more information.
  238.10 +mv: `libgcc_s_nof.so.1' and `libgcc_s_nof.so.1.' are the same file
  238.11 +make[2]: *** [nof/libgcc_s_nof.so] Error 1
  238.12 +make[2]: Leaving directory `/home/cvachoucek/crosstool-0.32/build/powerpc-750-linux-gnu/gcc-3.4.3-glibc-2.3.5/build-gcc/gcc'
  238.13 +make[1]: *** [stmp-multilib] Error 2
  238.14 +make[1]: Leaving directory `/home/cvachoucek/crosstool-0.32/build/powerpc-750-linux-gnu/gcc-3.4.3-glibc-2.3.5/build-gcc/gcc'
  238.15 +make: *** [install-gcc] Error 2
  238.16 +
  238.17 +From gcc-patches-return-133821-listarch-gcc-patches=gcc dot gnu dot org at gcc dot gnu dot org Wed Nov 17 00:15:28 2004
  238.18 +Return-Path: <gcc-patches-return-133821-listarch-gcc-patches=gcc dot gnu dot org at gcc dot gnu dot org>
  238.19 +Delivered-To: listarch-gcc-patches at gcc dot gnu dot org
  238.20 +Received: (qmail 12823 invoked by alias); 17 Nov 2004 00:15:19 -0000
  238.21 +Mailing-List: contact gcc-patches-help at gcc dot gnu dot org; run by ezmlm
  238.22 +List-Archive: <http://gcc.gnu.org/ml/gcc-patches/>
  238.23 +List-Post: <mailto:gcc-patches at gcc dot gnu dot org>
  238.24 +List-Help: <mailto:gcc-patches-help at gcc dot gnu dot org>
  238.25 +Sender: gcc-patches-owner at gcc dot gnu dot org
  238.26 +Date: Tue, 16 Nov 2004 16:14:57 -0800
  238.27 +From: "H dot  J dot  Lu" <hjl at lucon dot org>
  238.28 +To: gcc-patches at gcc dot gnu dot org
  238.29 +Subject: PATCH: PR other/18508: "basename: too few arguments" when building without bootstrap
  238.30 +Message-ID: <20041117001457.GA13610@lucon.org>
  238.31 +
  238.32 +I think it is safe to use `.backup' to backup the existing shared
  238.33 +library. No processes should be using the old shared library when
  238.34 +we get there.
  238.35 +
  238.36 +
  238.37 +H.J.
  238.38 +---
  238.39 +2004-11-16  H.J. Lu  <hongjiu.lu@intel.com>
  238.40 +
  238.41 +	PR other/18508
  238.42 +	* config/alpha/t-osf4 (SHLIB_LINK): Use `.backup' as the suffix
  238.43 +	to back up the existing shared library.
  238.44 +	* config/arm/t-netbsd (SHLIB_LINK): Likewise.
  238.45 +	* config/i386/t-nwld (SHLIB_LINK): Likewise. [deleted]
  238.46 +	* config/mips/t-slibgcc-irix (SHLIB_LINK): Likewise. [deleted]
  238.47 +	* config/pa/t-hpux-shlib (SHLIB_LINK): Likewise.
  238.48 +	* config/sh/t-linux (SHLIB_LINK): Likewise.
  238.49 +	* config/t-libunwind-elf (SHLIBUNWIND_LINK): Likewise.
  238.50 +	* config/t-slibgcc-darwin (SHLIB_LINK): Likewise.
  238.51 +	* config/t-slibgcc-elf-ver (SHLIB_LINK): Likewise.
  238.52 +	* config/t-slibgcc-sld (SHLIB_LINK): Likewise.
  238.53 +
  238.54 +[ paths adjusted for patch -p1, rediffed agaainst gcc-3.4.3. 
  238.55 +  Looks like the t-iris5-6 hunk in cvs is missing here; this must
  238.56 +  have been the mainline patch. ]
  238.57 +
  238.58 +--- gcc-3.4.3/gcc/config/alpha/t-osf4.stage	2004-10-18 09:14:39.000000000 -0700
  238.59 ++++ gcc-3.4.3/gcc/config/alpha/t-osf4	2004-11-16 16:06:41.686905479 -0800
  238.60 +@@ -19,7 +19,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2
  238.61 + 	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
  238.62 + 	rm -f $(SHLIB_SONAME) && \
  238.63 + 	if [ -f $(SHLIB_NAME) ]; then \
  238.64 +-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
  238.65 ++	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
  238.66 + 	else true; fi && \
  238.67 + 	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
  238.68 + 	$(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
  238.69 +--- gcc-3.4.3/gcc/config/arm/t-netbsd.stage	2004-10-18 09:14:40.000000000 -0700
  238.70 ++++ gcc-3.4.3/gcc/config/arm/t-netbsd	2004-11-16 16:06:46.016348194 -0800
  238.71 +@@ -14,7 +14,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2
  238.72 + 	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
  238.73 + 	rm -f $(SHLIB_SONAME) && \
  238.74 + 	if [ -f $(SHLIB_NAME) ]; then \
  238.75 +-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
  238.76 ++	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
  238.77 + 	else true; fi && \
  238.78 + 	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
  238.79 + 	$(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
  238.80 +--- gcc-3.4.3/gcc/config/pa/t-hpux-shlib.stage	2004-10-18 09:14:46.000000000 -0700
  238.81 ++++ gcc-3.4.3/gcc/config/pa/t-hpux-shlib	2004-11-16 16:06:57.982807875 -0800
  238.82 +@@ -8,7 +8,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2
  238.83 + 	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
  238.84 +         rm -f $(SHLIB_SONAME) && \
  238.85 + 	if [ -f $(SHLIB_NAME) ]; then \
  238.86 +-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
  238.87 ++	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
  238.88 + 	else true; fi && \
  238.89 + 	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
  238.90 +         $(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
  238.91 +--- gcc-3.4.3/gcc/config/sh/t-linux.stage	2004-10-18 09:14:48.000000000 -0700
  238.92 ++++ gcc-3.4.3/gcc/config/sh/t-linux	2004-11-16 16:07:00.787446863 -0800
  238.93 +@@ -24,7 +24,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2
  238.94 + 	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \
  238.95 + 	rm -f $(SHLIB_SOLINK) && \
  238.96 + 	if [ -f $(SHLIB_NAME) ]; then \
  238.97 +-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
  238.98 ++	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
  238.99 + 	else true; fi && \
 238.100 + 	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
 238.101 + 	(echo "/* GNU ld script"; \
 238.102 +--- gcc-3.4.3/gcc/config/t-libunwind-elf.stage	2004-10-18 09:14:39.000000000 -0700
 238.103 ++++ gcc-3.4.3/gcc/config/t-libunwind-elf	2004-11-16 16:07:08.133501281 -0800
 238.104 +@@ -14,8 +14,7 @@ SHLIBUNWIND_LINK = $(GCC_FOR_TARGET) $(L
 238.105 + 	@multilib_flags@ $(SHLIB_OBJS) -lc && \
 238.106 + 	rm -f $(SHLIB_SOLINK) && \
 238.107 + 	if [ -f $(SHLIBUNWIND_NAME) ]; then \
 238.108 +-	  mv -f $(SHLIBUNWIND_NAME) \
 238.109 +-	     $(SHLIBUNWIND_NAME).`basename $(STAGE_PREFIX)`; \
 238.110 ++	  mv -f $(SHLIBUNWIND_NAME) $(SHLIBUNWIND_NAME).backup; \
 238.111 + 	else true; fi && \
 238.112 + 	mv $(SHLIBUNWIND_NAME).tmp $(SHLIBUNWIND_NAME) && \
 238.113 + 	$(LN_S) $(SHLIBUNWIND_NAME) $(SHLIB_SOLINK)
 238.114 +--- gcc-3.4.3/gcc/config/t-slibgcc-darwin.stage	2004-10-18 09:14:39.000000000 -0700
 238.115 ++++ gcc-3.4.3/gcc/config/t-slibgcc-darwin	2004-11-16 16:07:13.777774752 -0800
 238.116 +@@ -17,7 +17,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2
 238.117 + 	@multilib_flags@ $(SHLIB_OBJS) -lc && \
 238.118 + 	rm -f $(SHLIB_SOLINK) && \
 238.119 + 	if [ -f $(SHLIB_NAME) ]; then \
 238.120 +-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
 238.121 ++	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
 238.122 + 	else true; fi && \
 238.123 + 	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
 238.124 + 	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)
 238.125 +--- gcc-3.4.3/gcc/config/t-slibgcc-elf-ver.stage	2004-10-18 09:14:39.000000000 -0700
 238.126 ++++ gcc-3.4.3/gcc/config/t-slibgcc-elf-ver	2004-11-16 16:04:40.961445223 -0800
 238.127 +@@ -17,7 +17,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2
 238.128 + 	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \
 238.129 + 	rm -f $(SHLIB_SOLINK) && \
 238.130 + 	if [ -f $(SHLIB_NAME) ]; then \
 238.131 +-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
 238.132 ++	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
 238.133 + 	else true; fi && \
 238.134 + 	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
 238.135 + 	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)
 238.136 +--- gcc-3.4.3/gcc/config/t-slibgcc-sld.old	2004-10-18 09:00:47.000000000 -0700
 238.137 ++++ gcc-3.4.3/gcc/config/t-slibgcc-sld	2005-05-14 13:44:48.000000000 -0700
 238.138 +@@ -14,7 +14,7 @@
 238.139 + 	@multilib_flags@ $(SHLIB_OBJS) -lc && \
 238.140 + 	rm -f $(SHLIB_SOLINK) && \
 238.141 + 	if [ -f $(SHLIB_NAME) ]; then \
 238.142 +-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
 238.143 ++	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
 238.144 + 	else true; fi && \
 238.145 + 	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
 238.146 + 	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)
   239.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   239.2 +++ b/patches/gcc/3.4.4/100-uclibc-conf.patch	Sat Feb 24 11:00:05 2007 +0000
   239.3 @@ -0,0 +1,470 @@
   239.4 +--- gcc-3.4.1/gcc/config/t-linux-uclibc
   239.5 ++++ gcc-3.4.1/gcc/config/t-linux-uclibc
   239.6 +@@ -0,0 +1,5 @@
   239.7 ++# Remove glibc specific files added in t-linux
   239.8 ++SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
   239.9 ++
  239.10 ++# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
  239.11 ++LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
  239.12 +--- gcc-3.4.1/gcc/config.gcc
  239.13 ++++ gcc-3.4.1/gcc/config.gcc
  239.14 +@@ -2310,10 +2310,16 @@
  239.15 + *)
  239.16 + 	echo "*** Configuration ${target} not supported" 1>&2
  239.17 + 	exit 1
  239.18 + 	;;
  239.19 + esac
  239.20 ++
  239.21 ++# Rather than hook into each target, just do it after all the linux
  239.22 ++# targets have been processed
  239.23 ++case ${target} in
  239.24 ++*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
  239.25 ++esac
  239.26 + 
  239.27 + # Support for --with-cpu and related options (and a few unrelated options,
  239.28 + # too).
  239.29 + case ${with_cpu} in
  239.30 +   yes | no)
  239.31 +--- gcc-3.4.4/gcc/config/alpha/linux-elf.h
  239.32 ++++ gcc-3.4.4/gcc/config/alpha/linux-elf.h
  239.33 +@@ -27,7 +27,11 @@
  239.34 + #define SUBTARGET_EXTRA_SPECS \
  239.35 + { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
  239.36 + 
  239.37 ++#ifdef USE_UCLIBC
  239.38 ++#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
  239.39 ++#else
  239.40 + #define ELF_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
  239.41 ++#endif
  239.42 + 
  239.43 + #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax}		\
  239.44 +   %{O*:-O3} %{!O*:-O1}						\
  239.45 +--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h	2004-01-31 00:18:11.000000000 -0600
  239.46 ++++ gcc-3.4.1/gcc/config/arm/linux-elf.h	2004-08-12 15:54:42.000000000 -0500
  239.47 +@@ -80,14 +80,19 @@
  239.48 + #define ENDFILE_SPEC \
  239.49 +   "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
  239.50 + 
  239.51 ++#ifdef USE_UCLIBC
  239.52 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  239.53 ++#else
  239.54 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
  239.55 ++#endif
  239.56 + #undef  LINK_SPEC
  239.57 + #define LINK_SPEC "%{h*} %{version:-v} \
  239.58 +    %{b} %{Wl,*:%*} \
  239.59 +    %{static:-Bstatic} \
  239.60 +    %{shared:-shared} \
  239.61 +    %{symbolic:-Bsymbolic} \
  239.62 +    %{rdynamic:-export-dynamic} \
  239.63 +-   %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  239.64 ++   %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
  239.65 +    -X \
  239.66 +    %{mbig-endian:-EB}" \
  239.67 +    SUBTARGET_EXTRA_LINK_SPEC
  239.68 +--- gcc-3.4.1-dist/gcc/config/cris/linux.h	2003-11-28 21:08:09.000000000 -0600
  239.69 ++++ gcc-3.4.1/gcc/config/cris/linux.h	2004-08-12 15:54:43.000000000 -0500
  239.70 +@@ -79,6 +79,25 @@
  239.71 + #undef CRIS_DEFAULT_CPU_VERSION
  239.72 + #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
  239.73 + 
  239.74 ++#ifdef USE_UCLIBC
  239.75 ++
  239.76 ++#undef CRIS_SUBTARGET_VERSION
  239.77 ++#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
  239.78 ++
  239.79 ++#undef CRIS_LINK_SUBTARGET_SPEC
  239.80 ++#define CRIS_LINK_SUBTARGET_SPEC \
  239.81 ++ "-mcrislinux\
  239.82 ++  -rpath-link include/asm/../..%s\
  239.83 ++  %{shared} %{static}\
  239.84 ++  %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
  239.85 ++  %{!shared: \
  239.86 ++    %{!static: \
  239.87 ++      %{rdynamic:-export-dynamic} \
  239.88 ++      %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
  239.89 ++  %{!r:%{O2|O3: --gc-sections}}"
  239.90 ++
  239.91 ++#else  /* USE_UCLIBC */
  239.92 ++
  239.93 + #undef CRIS_SUBTARGET_VERSION
  239.94 + #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
  239.95 + 
  239.96 +@@ -93,6 +112,8 @@
  239.97 +   %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
  239.98 +   %{!r:%{O2|O3: --gc-sections}}"
  239.99 + 
 239.100 ++#endif  /* USE_UCLIBC */
 239.101 ++
 239.102 + 
 239.103 + /* Node: Run-time Target */
 239.104 + 
 239.105 +--- gcc-3.4.1-dist/gcc/config/i386/linux.h	2003-11-28 21:08:10.000000000 -0600
 239.106 ++++ gcc-3.4.1/gcc/config/i386/linux.h	2004-08-12 15:54:43.000000000 -0500
 239.107 +@@ -110,22 +110,21 @@
 239.108 + 
 239.109 + #undef	LINK_SPEC
 239.110 + #ifdef USE_GNULIBC_1
 239.111 +-#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
 239.112 +-  %{!shared: \
 239.113 +-    %{!ibcs: \
 239.114 +-      %{!static: \
 239.115 +-	%{rdynamic:-export-dynamic} \
 239.116 +-	%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
 239.117 +-	%{static:-static}}}"
 239.118 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.1"
 239.119 ++#else
 239.120 ++#ifdef USE_UCLIBC
 239.121 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 239.122 + #else
 239.123 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 239.124 ++#endif
 239.125 ++#endif
 239.126 + #define LINK_SPEC "-m elf_i386 %{shared:-shared} \
 239.127 +   %{!shared: \
 239.128 +     %{!ibcs: \
 239.129 +       %{!static: \
 239.130 + 	%{rdynamic:-export-dynamic} \
 239.131 +-	%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 239.132 ++	%{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 239.133 + 	%{static:-static}}}"
 239.134 +-#endif
 239.135 + 
 239.136 + /* A C statement (sans semicolon) to output to the stdio stream
 239.137 +    FILE the assembler definition of uninitialized global DECL named
 239.138 +--- gcc-3.4.4/gcc/config/i386/linux64.h
 239.139 ++++ gcc-3.4.4/gcc/config/i386/linux64.h
 239.140 +@@ -54,14 +54,21 @@
 239.141 +    When the -shared link option is used a final link is not being
 239.142 +    done.  */
 239.143 + 
 239.144 ++#ifdef USE_UCLIBC
 239.145 ++#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 239.146 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
 239.147 ++#else
 239.148 ++#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 239.149 ++#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
 239.150 ++#endif
 239.151 + #undef	LINK_SPEC
 239.152 + #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
 239.153 +   %{shared:-shared} \
 239.154 +   %{!shared: \
 239.155 +     %{!static: \
 239.156 +       %{rdynamic:-export-dynamic} \
 239.157 +-      %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 239.158 +-      %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
 239.159 ++      %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
 239.160 ++      %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
 239.161 +     %{static:-static}}"
 239.162 + 
 239.163 + #define MULTILIB_DEFAULTS { "m64" }
 239.164 +--- gcc-3.4.4/gcc/config/ia64/linux.h
 239.165 ++++ gcc-3.4.4/gcc/config/ia64/linux.h
 239.166 +@@ -37,13 +37,18 @@
 239.167 + /* Define this for shared library support because it isn't in the main
 239.168 +    linux.h file.  */
 239.169 + 
 239.170 ++#ifdef USE_UCLIBC
 239.171 ++#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
 239.172 ++#else
 239.173 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
 239.174 ++#endif
 239.175 + #undef LINK_SPEC
 239.176 + #define LINK_SPEC "\
 239.177 +   %{shared:-shared} \
 239.178 +   %{!shared: \
 239.179 +     %{!static: \
 239.180 +       %{rdynamic:-export-dynamic} \
 239.181 +-      %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
 239.182 ++      %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 239.183 +       %{static:-static}}"
 239.184 + 
 239.185 + 
 239.186 +--- gcc-3.4.4/gcc/config/m68k/linux.h
 239.187 ++++ gcc-3.4.4/gcc/config/m68k/linux.h
 239.188 +@@ -131,12 +131,17 @@
 239.189 + 
 239.190 + /* If ELF is the default format, we should not use /lib/elf.  */
 239.191 + 
 239.192 ++#ifdef USE_UCLIBC
 239.193 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 239.194 ++#else
 239.195 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
 239.196 ++#endif
 239.197 + #undef	LINK_SPEC
 239.198 + #define LINK_SPEC "-m m68kelf %{shared} \
 239.199 +   %{!shared: \
 239.200 +     %{!static: \
 239.201 +       %{rdynamic:-export-dynamic} \
 239.202 +-      %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
 239.203 ++      %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 239.204 +     %{static}}"
 239.205 + 
 239.206 + /* For compatibility with linux/a.out */
 239.207 +--- gcc-3.4.1-dist/gcc/config/mips/linux.h	2004-06-15 20:42:24.000000000 -0500
 239.208 ++++ gcc-3.4.1/gcc/config/mips/linux.h	2004-08-12 15:54:43.000000000 -0500
 239.209 +@@ -109,14 +109,19 @@
 239.210 + 
 239.211 + /* Borrowed from sparc/linux.h */
 239.212 + #undef LINK_SPEC
 239.213 ++#ifdef USE_UCLIBC
 239.214 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 239.215 ++#else
 239.216 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
 239.217 ++#endif
 239.218 + #define LINK_SPEC \
 239.219 +  "%(endian_spec) \
 239.220 +   %{shared:-shared} \
 239.221 +   %{!shared: \
 239.222 +     %{!ibcs: \
 239.223 +       %{!static: \
 239.224 +         %{rdynamic:-export-dynamic} \
 239.225 +-        %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
 239.226 ++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 239.227 +         %{static:-static}}}"
 239.228 + 
 239.229 + #undef SUBTARGET_ASM_SPEC
 239.230 +--- gcc-3.4.4/gcc/config/pa/pa-linux.h
 239.231 ++++ gcc-3.4.4/gcc/config/pa/pa-linux.h
 239.232 +@@ -77,13 +77,18 @@
 239.233 + /* Define this for shared library support because it isn't in the main
 239.234 +    linux.h file.  */
 239.235 + 
 239.236 ++#ifdef USE_UCLIBC
 239.237 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 239.238 ++#else
 239.239 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
 239.240 ++#endif
 239.241 + #undef LINK_SPEC
 239.242 + #define LINK_SPEC "\
 239.243 +   %{shared:-shared} \
 239.244 +   %{!shared: \
 239.245 +     %{!static: \
 239.246 +       %{rdynamic:-export-dynamic} \
 239.247 +-      %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
 239.248 ++      %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 239.249 +       %{static:-static}}"
 239.250 + 
 239.251 + /* glibc's profiling functions don't need gcc to allocate counters.  */
 239.252 +--- gcc-3.4.1-dist/gcc/config/rs6000/linux.h	2004-02-25 09:11:19.000000000 -0600
 239.253 ++++ gcc-3.4.1/gcc/config/rs6000/linux.h	2004-08-12 15:54:43.000000000 -0500
 239.254 +@@ -69,7 +69,11 @@
 239.255 + #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
 239.256 + 
 239.257 + #undef	LINK_OS_DEFAULT_SPEC
 239.258 ++#ifdef USE_UCLIBC
 239.259 ++#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
 239.260 ++#else
 239.261 + #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
 239.262 ++#endif
 239.263 + 
 239.264 + #define LINK_GCC_C_SEQUENCE_SPEC \
 239.265 +   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
 239.266 +--- gcc-3.4.1-dist/gcc/config/rs6000/sysv4.h	2004-06-10 01:39:50.000000000 -0500
 239.267 ++++ gcc-3.4.1/gcc/config/rs6000/sysv4.h	2004-08-12 15:54:43.000000000 -0500
 239.268 +@@ -947,6 +947,7 @@
 239.269 +   mcall-linux  : %(link_os_linux)       ; \
 239.270 +   mcall-gnu    : %(link_os_gnu)         ; \
 239.271 +   mcall-netbsd : %(link_os_netbsd)      ; \
 239.272 ++  mcall-linux-uclibc : %(link_os_linux_uclibc); \
 239.273 +   mcall-openbsd: %(link_os_openbsd)     ; \
 239.274 +                : %(link_os_default)     }"
 239.275 + 
 239.276 +@@ -1125,6 +1126,10 @@
 239.277 +   %{rdynamic:-export-dynamic} \
 239.278 +   %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
 239.279 + 
 239.280 ++#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
 239.281 ++  %{rdynamic:-export-dynamic} \
 239.282 ++  %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
 239.283 ++
 239.284 + #if defined(HAVE_LD_EH_FRAME_HDR)
 239.285 + # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
 239.286 + #endif
 239.287 +@@ -1291,6 +1296,7 @@
 239.288 +   { "link_os_sim",		LINK_OS_SIM_SPEC },			\
 239.289 +   { "link_os_freebsd",		LINK_OS_FREEBSD_SPEC },			\
 239.290 +   { "link_os_linux",		LINK_OS_LINUX_SPEC },			\
 239.291 ++  { "link_os_linux_uclibc",	LINK_OS_LINUX_UCLIBC_SPEC },		\
 239.292 +   { "link_os_gnu",		LINK_OS_GNU_SPEC },			\
 239.293 +   { "link_os_netbsd",		LINK_OS_NETBSD_SPEC },			\
 239.294 +   { "link_os_openbsd",		LINK_OS_OPENBSD_SPEC },			\
 239.295 +--- gcc-3.4.4/gcc/config/s390/linux.h
 239.296 ++++ gcc-3.4.4/gcc/config/s390/linux.h
 239.297 +@@ -77,6 +77,13 @@
 239.298 + #define MULTILIB_DEFAULTS { "m31" }
 239.299 + #endif
 239.300 + 
 239.301 ++#ifdef USE_UCLIBC
 239.302 ++#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 239.303 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
 239.304 ++#else
 239.305 ++#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
 239.306 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
 239.307 ++#endif
 239.308 + #undef  LINK_SPEC
 239.309 + #define LINK_SPEC \
 239.310 +   "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
 239.311 +@@ -86,8 +93,8 @@
 239.312 +       %{!static: \
 239.313 + 	%{rdynamic:-export-dynamic} \
 239.314 + 	%{!dynamic-linker: \
 239.315 +-          %{m31:-dynamic-linker /lib/ld.so.1} \
 239.316 +-          %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
 239.317 ++          %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
 239.318 ++          %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
 239.319 + 
 239.320 + 
 239.321 + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 239.322 +--- gcc-3.4.1-dist/gcc/config/sh/linux.h	2004-01-11 20:29:13.000000000 -0600
 239.323 ++++ gcc-3.4.1/gcc/config/sh/linux.h	2004-08-12 15:54:43.000000000 -0500
 239.324 +@@ -73,11 +73,16 @@
 239.325 + #undef SUBTARGET_LINK_EMUL_SUFFIX
 239.326 + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
 239.327 + #undef SUBTARGET_LINK_SPEC
 239.328 ++#ifdef USE_UCLIBC
 239.329 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 239.330 ++#else
 239.331 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 239.332 ++#endif
 239.333 + #define SUBTARGET_LINK_SPEC \
 239.334 +   "%{shared:-shared} \
 239.335 +    %{!static: \
 239.336 +      %{rdynamic:-export-dynamic} \
 239.337 +-     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 239.338 ++     %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 239.339 +    %{static:-static}"
 239.340 + 
 239.341 + #undef LIB_SPEC
 239.342 +--- gcc-3.4.4/gcc/config/sparc/linux.h
 239.343 ++++ gcc-3.4.4/gcc/config/sparc/linux.h
 239.344 +@@ -162,13 +162,18 @@
 239.345 +         %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
 239.346 +         %{static:-static}}}"
 239.347 + #else
 239.348 ++#ifdef USE_UCLIBC
 239.349 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 239.350 ++#else
 239.351 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 239.352 ++#endif
 239.353 + #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
 239.354 +   %{!mno-relax:%{!r:-relax}} \
 239.355 +   %{!shared: \
 239.356 +     %{!ibcs: \
 239.357 +       %{!static: \
 239.358 +         %{rdynamic:-export-dynamic} \
 239.359 +-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 239.360 ++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 239.361 +         %{static:-static}}}"
 239.362 + #endif
 239.363 + 
 239.364 +--- gcc-3.4.4/gcc/config/sparc/linux64.h
 239.365 ++++ gcc-3.4.4/gcc/config/sparc/linux64.h
 239.366 +@@ -167,12 +166,17 @@
 239.367 +   { "link_arch_default", LINK_ARCH_DEFAULT_SPEC },	  \
 239.368 +   { "link_arch",	 LINK_ARCH_SPEC },
 239.369 +     
 239.370 ++#ifdef USE_UCLIBC
 239.371 ++#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
 239.372 ++#else
 239.373 ++#define ELF_DYNAMIC_LINKER  "/lib/ld-linux.so.2"
 239.374 ++#endif
 239.375 + #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
 239.376 +   %{!shared: \
 239.377 +     %{!ibcs: \
 239.378 +       %{!static: \
 239.379 +         %{rdynamic:-export-dynamic} \
 239.380 +-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 239.381 ++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 239.382 +         %{static:-static}}} \
 239.383 + "
 239.384 + 
 239.385 +--- gcc-3.4.1-dist/libtool.m4	2004-05-18 04:08:37.000000000 -0500
 239.386 ++++ gcc-3.4.1/libtool.m4	2004-08-12 15:54:43.000000000 -0500
 239.387 +@@ -689,6 +689,11 @@
 239.388 +   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
 239.389 +   ;;
 239.390 + 
 239.391 ++linux-uclibc*)
 239.392 ++  lt_cv_deplibs_check_method=pass_all
 239.393 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 239.394 ++  ;;
 239.395 ++
 239.396 + netbsd*)
 239.397 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 239.398 +     [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
 239.399 +--- gcc-3.4.1-dist/ltconfig	2004-03-05 15:05:41.000000000 -0600
 239.400 ++++ gcc-3.4.1/ltconfig	2004-08-12 15:55:48.000000000 -0500
 239.401 +@@ -602,6 +602,7 @@
 239.402 + 
 239.403 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
 239.404 + case $host_os in
 239.405 ++linux-uclibc*) ;;
 239.406 + linux-gnu*) ;;
 239.407 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
 239.408 + esac
 239.409 +@@ -1262,6 +1263,24 @@
 239.410 +   dynamic_linker='GNU/Linux ld.so'
 239.411 +   ;;
 239.412 + 
 239.413 ++linux-uclibc*)
 239.414 ++  version_type=linux
 239.415 ++  need_lib_prefix=no
 239.416 ++  need_version=no
 239.417 ++  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 239.418 ++  soname_spec='${libname}${release}.so$major'
 239.419 ++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 239.420 ++  shlibpath_var=LD_LIBRARY_PATH
 239.421 ++  shlibpath_overrides_runpath=no
 239.422 ++  # This implies no fast_install, which is unacceptable.
 239.423 ++  # Some rework will be needed to allow for fast_install
 239.424 ++  # before this can be enabled.
 239.425 ++  # Note: copied from linux-gnu, and may not be appropriate.
 239.426 ++  hardcode_into_libs=yes
 239.427 ++  # Assume using the uClibc dynamic linker.
 239.428 ++  dynamic_linker="uClibc ld.so"
 239.429 ++  ;;
 239.430 ++
 239.431 + netbsd*)
 239.432 +   need_lib_prefix=no
 239.433 +   need_version=no
 239.434 +--- gcc-3.4.1-dist/boehm-gc/configure	2004-07-01 14:14:03.000000000 -0500
 239.435 ++++ gcc-3.4.1/boehm-gc/configure	2004-08-12 16:22:57.000000000 -0500
 239.436 +@@ -1947,6 +1947,11 @@
 239.437 +   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
 239.438 +   ;;
 239.439 + 
 239.440 ++linux-uclibc*)
 239.441 ++  lt_cv_deplibs_check_method=pass_all
 239.442 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 239.443 ++  ;;
 239.444 ++
 239.445 + netbsd*)
 239.446 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 239.447 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 239.448 +--- gcc-3.4.1-dist/boehm-gc/ltconfig	2002-11-20 09:59:06.000000000 -0600
 239.449 ++++ gcc-3.4.1/boehm-gc/ltconfig	2004-08-12 15:54:42.000000000 -0500
 239.450 +@@ -1981,6 +1981,23 @@
 239.451 +   fi
 239.452 +   ;;
 239.453 + 
 239.454 ++linux-uclibc*)
 239.455 ++  version_type=linux
 239.456 ++  need_lib_prefix=no
 239.457 ++  need_version=no
 239.458 ++  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 239.459 ++  soname_spec='${libname}${release}.so$major'
 239.460 ++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 239.461 ++  shlibpath_var=LD_LIBRARY_PATH
 239.462 ++  shlibpath_overrides_runpath=no
 239.463 ++  deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
 239.464 ++  file_magic_cmd=/usr/bin/file
 239.465 ++  file_magic_test_file=`echo /lib/libuClibc-*.so`
 239.466 ++
 239.467 ++  # Assume using the uClibc dynamic linker.
 239.468 ++  dynamic_linker="uClibc ld.so"
 239.469 ++  ;;
 239.470 ++
 239.471 + netbsd*)
 239.472 +   version_type=sunos
 239.473 +   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
   240.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   240.2 +++ b/patches/gcc/3.4.4/200-uclibc-locale.patch	Sat Feb 24 11:00:05 2007 +0000
   240.3 @@ -0,0 +1,3255 @@
   240.4 +diff -urN gcc-3.4.2-dist/libstdc++-v3/acinclude.m4 gcc-3.4.2/libstdc++-v3/acinclude.m4
   240.5 +--- gcc-3.4.2-dist/libstdc++-v3/acinclude.m4	2004-07-15 12:42:45.000000000 -0500
   240.6 ++++ gcc-3.4.2/libstdc++-v3/acinclude.m4	2004-09-10 10:47:40.000000000 -0500
   240.7 +@@ -996,7 +996,7 @@
   240.8 +   AC_MSG_CHECKING([for C locale to use])
   240.9 +   GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
  240.10 +     [use MODEL for target locale package],
  240.11 +-    [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
  240.12 ++    [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
  240.13 +   
  240.14 +   # If they didn't use this option switch, or if they specified --enable
  240.15 +   # with no specific model, we'll have to look for one.  If they
  240.16 +@@ -1012,6 +1012,9 @@
  240.17 +   # Default to "generic".
  240.18 +   if test $enable_clocale_flag = auto; then
  240.19 +     case x${target_os} in
  240.20 ++      x*-uclibc*)
  240.21 ++        enable_clocale_flag=uclibc
  240.22 ++        ;;
  240.23 +       xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
  240.24 +         AC_EGREP_CPP([_GLIBCXX_ok], [
  240.25 +         #include <features.h>
  240.26 +@@ -1138,6 +1141,41 @@
  240.27 +       CTIME_CC=config/locale/generic/time_members.cc
  240.28 +       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
  240.29 +       ;;
  240.30 ++    uclibc)
  240.31 ++      AC_MSG_RESULT(uclibc)
  240.32 ++
  240.33 ++      # Declare intention to use gettext, and add support for specific
  240.34 ++      # languages.
  240.35 ++      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
  240.36 ++      ALL_LINGUAS="de fr"
  240.37 ++
  240.38 ++      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
  240.39 ++      AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
  240.40 ++      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
  240.41 ++        USE_NLS=yes
  240.42 ++      fi
  240.43 ++      # Export the build objects.
  240.44 ++      for ling in $ALL_LINGUAS; do \
  240.45 ++        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
  240.46 ++        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
  240.47 ++      done
  240.48 ++      AC_SUBST(glibcxx_MOFILES)
  240.49 ++      AC_SUBST(glibcxx_POFILES)
  240.50 ++
  240.51 ++      CLOCALE_H=config/locale/uclibc/c_locale.h
  240.52 ++      CLOCALE_CC=config/locale/uclibc/c_locale.cc
  240.53 ++      CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
  240.54 ++      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
  240.55 ++      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
  240.56 ++      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
  240.57 ++      CMESSAGES_H=config/locale/uclibc/messages_members.h
  240.58 ++      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
  240.59 ++      CMONEY_CC=config/locale/uclibc/monetary_members.cc
  240.60 ++      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
  240.61 ++      CTIME_H=config/locale/uclibc/time_members.h
  240.62 ++      CTIME_CC=config/locale/uclibc/time_members.cc
  240.63 ++      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
  240.64 ++      ;;
  240.65 +   esac
  240.66 + 
  240.67 +   # This is where the testsuite looks for locale catalogs, using the
  240.68 +diff -urN gcc-3.4.2-dist/libstdc++-v3/aclocal.m4 gcc-3.4.2/libstdc++-v3/aclocal.m4
  240.69 +--- gcc-3.4.2-dist/libstdc++-v3/aclocal.m4	2004-08-13 15:44:03.000000000 -0500
  240.70 ++++ gcc-3.4.2/libstdc++-v3/aclocal.m4	2004-09-10 10:47:40.000000000 -0500
  240.71 +@@ -1025,6 +1025,9 @@
  240.72 +   # Default to "generic".
  240.73 +   if test $enable_clocale_flag = auto; then
  240.74 +     case x${target_os} in
  240.75 ++      x*-uclibc*)
  240.76 ++	enable_clocale_flag=uclibc
  240.77 ++	;;
  240.78 +       xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
  240.79 +         AC_EGREP_CPP([_GLIBCXX_ok], [
  240.80 +         #include <features.h>
  240.81 +@@ -1151,6 +1154,41 @@
  240.82 +       CTIME_CC=config/locale/generic/time_members.cc
  240.83 +       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
  240.84 +       ;;
  240.85 ++    uclibc)
  240.86 ++      AC_MSG_RESULT(uclibc)
  240.87 ++
  240.88 ++      # Declare intention to use gettext, and add support for specific
  240.89 ++      # languages.
  240.90 ++      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
  240.91 ++      ALL_LINGUAS="de fr"
  240.92 ++
  240.93 ++      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
  240.94 ++      AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
  240.95 ++      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
  240.96 ++        USE_NLS=yes
  240.97 ++      fi
  240.98 ++      # Export the build objects.
  240.99 ++      for ling in $ALL_LINGUAS; do \
 240.100 ++        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
 240.101 ++        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
 240.102 ++      done
 240.103 ++      AC_SUBST(glibcxx_MOFILES)
 240.104 ++      AC_SUBST(glibcxx_POFILES)
 240.105 ++
 240.106 ++      CLOCALE_H=config/locale/uclibc/c_locale.h
 240.107 ++      CLOCALE_CC=config/locale/uclibc/c_locale.cc
 240.108 ++      CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
 240.109 ++      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
 240.110 ++      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
 240.111 ++      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
 240.112 ++      CMESSAGES_H=config/locale/uclibc/messages_members.h
 240.113 ++      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
 240.114 ++      CMONEY_CC=config/locale/uclibc/monetary_members.cc
 240.115 ++      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
 240.116 ++      CTIME_H=config/locale/uclibc/time_members.h
 240.117 ++      CTIME_CC=config/locale/uclibc/time_members.cc
 240.118 ++      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
 240.119 ++      ;;
 240.120 +   esac
 240.121 + 
 240.122 +   # This is where the testsuite looks for locale catalogs, using the
 240.123 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
 240.124 +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h	1969-12-31 18:00:00.000000000 -0600
 240.125 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h	2004-09-10 10:47:40.000000000 -0500
 240.126 +@@ -0,0 +1,59 @@
 240.127 ++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
 240.128 ++
 240.129 ++// Copyright (C) 2002, 2004 Free Software Foundation, Inc.
 240.130 ++//
 240.131 ++// This file is part of the GNU ISO C++ Library.  This library is free
 240.132 ++// software; you can redistribute it and/or modify it under the
 240.133 ++// terms of the GNU General Public License as published by the
 240.134 ++// Free Software Foundation; either version 2, or (at your option)
 240.135 ++// any later version.
 240.136 ++
 240.137 ++// This library is distributed in the hope that it will be useful,
 240.138 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 240.139 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 240.140 ++// GNU General Public License for more details.
 240.141 ++
 240.142 ++// You should have received a copy of the GNU General Public License along
 240.143 ++// with this library; see the file COPYING.  If not, write to the Free
 240.144 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 240.145 ++// USA.
 240.146 ++
 240.147 ++// As a special exception, you may use this file as part of a free software
 240.148 ++// library without restriction.  Specifically, if other files instantiate
 240.149 ++// templates or use macros or inline functions from this file, or you compile
 240.150 ++// this file and link it with other files to produce an executable, this
 240.151 ++// file does not by itself cause the resulting executable to be covered by
 240.152 ++// the GNU General Public License.  This exception does not however
 240.153 ++// invalidate any other reasons why the executable file might be covered by
 240.154 ++// the GNU General Public License.
 240.155 ++
 240.156 ++// Written by Jakub Jelinek <jakub@redhat.com>
 240.157 ++
 240.158 ++#include <clocale>
 240.159 ++
 240.160 ++#ifdef __UCLIBC_MJN3_ONLY__
 240.161 ++#warning clean this up
 240.162 ++#endif
 240.163 ++
 240.164 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.165 ++                                                  
 240.166 ++extern "C" __typeof(iswctype_l) __iswctype_l;
 240.167 ++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
 240.168 ++extern "C" __typeof(strcoll_l) __strcoll_l;
 240.169 ++extern "C" __typeof(strftime_l) __strftime_l;
 240.170 ++extern "C" __typeof(strtod_l) __strtod_l;
 240.171 ++extern "C" __typeof(strtof_l) __strtof_l;
 240.172 ++extern "C" __typeof(strtold_l) __strtold_l;
 240.173 ++extern "C" __typeof(strxfrm_l) __strxfrm_l;
 240.174 ++extern "C" __typeof(towlower_l) __towlower_l;
 240.175 ++extern "C" __typeof(towupper_l) __towupper_l;
 240.176 ++extern "C" __typeof(wcscoll_l) __wcscoll_l;
 240.177 ++extern "C" __typeof(wcsftime_l) __wcsftime_l;
 240.178 ++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
 240.179 ++extern "C" __typeof(wctype_l) __wctype_l;
 240.180 ++extern "C" __typeof(newlocale) __newlocale;
 240.181 ++extern "C" __typeof(freelocale) __freelocale;
 240.182 ++extern "C" __typeof(duplocale) __duplocale;
 240.183 ++extern "C" __typeof(uselocale) __uselocale;
 240.184 ++
 240.185 ++#endif // GLIBC 2.3 and later
 240.186 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.cc
 240.187 +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc	1969-12-31 18:00:00.000000000 -0600
 240.188 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.cc	2004-09-10 10:47:40.000000000 -0500
 240.189 +@@ -0,0 +1,160 @@
 240.190 ++// Wrapper for underlying C-language localization -*- C++ -*-
 240.191 ++
 240.192 ++// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
 240.193 ++//
 240.194 ++// This file is part of the GNU ISO C++ Library.  This library is free
 240.195 ++// software; you can redistribute it and/or modify it under the
 240.196 ++// terms of the GNU General Public License as published by the
 240.197 ++// Free Software Foundation; either version 2, or (at your option)
 240.198 ++// any later version.
 240.199 ++
 240.200 ++// This library is distributed in the hope that it will be useful,
 240.201 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 240.202 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 240.203 ++// GNU General Public License for more details.
 240.204 ++
 240.205 ++// You should have received a copy of the GNU General Public License along
 240.206 ++// with this library; see the file COPYING.  If not, write to the Free
 240.207 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 240.208 ++// USA.
 240.209 ++
 240.210 ++// As a special exception, you may use this file as part of a free software
 240.211 ++// library without restriction.  Specifically, if other files instantiate
 240.212 ++// templates or use macros or inline functions from this file, or you compile
 240.213 ++// this file and link it with other files to produce an executable, this
 240.214 ++// file does not by itself cause the resulting executable to be covered by
 240.215 ++// the GNU General Public License.  This exception does not however
 240.216 ++// invalidate any other reasons why the executable file might be covered by
 240.217 ++// the GNU General Public License.
 240.218 ++
 240.219 ++//
 240.220 ++// ISO C++ 14882: 22.8  Standard locale categories.
 240.221 ++//
 240.222 ++
 240.223 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 240.224 ++
 240.225 ++#include <cerrno>  // For errno
 240.226 ++#include <locale>
 240.227 ++#include <stdexcept>
 240.228 ++#include <langinfo.h>
 240.229 ++#include <bits/c++locale_internal.h>
 240.230 ++
 240.231 ++#ifndef __UCLIBC_HAS_XLOCALE__
 240.232 ++#define __strtol_l(S, E, B, L)      strtol((S), (E), (B))
 240.233 ++#define __strtoul_l(S, E, B, L)     strtoul((S), (E), (B))
 240.234 ++#define __strtoll_l(S, E, B, L)     strtoll((S), (E), (B))
 240.235 ++#define __strtoull_l(S, E, B, L)    strtoull((S), (E), (B))
 240.236 ++#define __strtof_l(S, E, L)         strtof((S), (E))
 240.237 ++#define __strtod_l(S, E, L)         strtod((S), (E))
 240.238 ++#define __strtold_l(S, E, L)        strtold((S), (E))
 240.239 ++#warning should dummy __newlocale check for C|POSIX ?
 240.240 ++#define __newlocale(a, b, c)        NULL
 240.241 ++#define __freelocale(a)             ((void)0)
 240.242 ++#define __duplocale(a)              __c_locale()
 240.243 ++#endif
 240.244 ++
 240.245 ++namespace std 
 240.246 ++{
 240.247 ++  template<>
 240.248 ++    void
 240.249 ++    __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, 
 240.250 ++		   const __c_locale& __cloc)
 240.251 ++    {
 240.252 ++      if (!(__err & ios_base::failbit))
 240.253 ++	{
 240.254 ++	  char* __sanity;
 240.255 ++	  errno = 0;
 240.256 ++	  float __f = __strtof_l(__s, &__sanity, __cloc);
 240.257 ++          if (__sanity != __s && errno != ERANGE)
 240.258 ++	    __v = __f;
 240.259 ++	  else
 240.260 ++	    __err |= ios_base::failbit;
 240.261 ++	}
 240.262 ++    }
 240.263 ++
 240.264 ++  template<>
 240.265 ++    void
 240.266 ++    __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, 
 240.267 ++		   const __c_locale& __cloc)
 240.268 ++    {
 240.269 ++      if (!(__err & ios_base::failbit))
 240.270 ++	{
 240.271 ++	  char* __sanity;
 240.272 ++	  errno = 0;
 240.273 ++	  double __d = __strtod_l(__s, &__sanity, __cloc);
 240.274 ++          if (__sanity != __s && errno != ERANGE)
 240.275 ++	    __v = __d;
 240.276 ++	  else
 240.277 ++	    __err |= ios_base::failbit;
 240.278 ++	}
 240.279 ++    }
 240.280 ++
 240.281 ++  template<>
 240.282 ++    void
 240.283 ++    __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
 240.284 ++		   const __c_locale& __cloc)
 240.285 ++    {
 240.286 ++      if (!(__err & ios_base::failbit))
 240.287 ++	{
 240.288 ++	  char* __sanity;
 240.289 ++	  errno = 0;
 240.290 ++	  long double __ld = __strtold_l(__s, &__sanity, __cloc);
 240.291 ++          if (__sanity != __s && errno != ERANGE)
 240.292 ++	    __v = __ld;
 240.293 ++	  else
 240.294 ++	    __err |= ios_base::failbit;
 240.295 ++	}
 240.296 ++    }
 240.297 ++
 240.298 ++  void
 240.299 ++  locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, 
 240.300 ++				    __c_locale __old)
 240.301 ++  {
 240.302 ++    __cloc = __newlocale(1 << LC_ALL, __s, __old);
 240.303 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.304 ++    if (!__cloc)
 240.305 ++      {
 240.306 ++	// This named locale is not supported by the underlying OS.
 240.307 ++	__throw_runtime_error(__N("locale::facet::_S_create_c_locale "
 240.308 ++			      "name not valid"));
 240.309 ++      }
 240.310 ++#endif
 240.311 ++  }
 240.312 ++  
 240.313 ++  void
 240.314 ++  locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
 240.315 ++  {
 240.316 ++    if (_S_get_c_locale() != __cloc)
 240.317 ++      __freelocale(__cloc); 
 240.318 ++  }
 240.319 ++
 240.320 ++  __c_locale
 240.321 ++  locale::facet::_S_clone_c_locale(__c_locale& __cloc)
 240.322 ++  { return __duplocale(__cloc); }
 240.323 ++} // namespace std
 240.324 ++
 240.325 ++namespace __gnu_cxx
 240.326 ++{
 240.327 ++  const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
 240.328 ++    {
 240.329 ++      "LC_CTYPE", 
 240.330 ++      "LC_NUMERIC",
 240.331 ++      "LC_TIME", 
 240.332 ++      "LC_COLLATE", 
 240.333 ++      "LC_MONETARY",
 240.334 ++      "LC_MESSAGES", 
 240.335 ++#if _GLIBCXX_NUM_CATEGORIES != 0
 240.336 ++      "LC_PAPER", 
 240.337 ++      "LC_NAME", 
 240.338 ++      "LC_ADDRESS",
 240.339 ++      "LC_TELEPHONE", 
 240.340 ++      "LC_MEASUREMENT", 
 240.341 ++      "LC_IDENTIFICATION" 
 240.342 ++#endif
 240.343 ++    };
 240.344 ++}
 240.345 ++
 240.346 ++namespace std
 240.347 ++{
 240.348 ++  const char* const* const locale::_S_categories = __gnu_cxx::category_names;
 240.349 ++}  // namespace std
 240.350 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.h
 240.351 +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/c_locale.h	1969-12-31 18:00:00.000000000 -0600
 240.352 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/c_locale.h	2004-09-10 10:48:08.000000000 -0500
 240.353 +@@ -0,0 +1,115 @@
 240.354 ++// Wrapper for underlying C-language localization -*- C++ -*-
 240.355 ++
 240.356 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 240.357 ++//
 240.358 ++// This file is part of the GNU ISO C++ Library.  This library is free
 240.359 ++// software; you can redistribute it and/or modify it under the
 240.360 ++// terms of the GNU General Public License as published by the
 240.361 ++// Free Software Foundation; either version 2, or (at your option)
 240.362 ++// any later version.
 240.363 ++
 240.364 ++// This library is distributed in the hope that it will be useful,
 240.365 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 240.366 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 240.367 ++// GNU General Public License for more details.
 240.368 ++
 240.369 ++// You should have received a copy of the GNU General Public License along
 240.370 ++// with this library; see the file COPYING.  If not, write to the Free
 240.371 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 240.372 ++// USA.
 240.373 ++
 240.374 ++// As a special exception, you may use this file as part of a free software
 240.375 ++// library without restriction.  Specifically, if other files instantiate
 240.376 ++// templates or use macros or inline functions from this file, or you compile
 240.377 ++// this file and link it with other files to produce an executable, this
 240.378 ++// file does not by itself cause the resulting executable to be covered by
 240.379 ++// the GNU General Public License.  This exception does not however
 240.380 ++// invalidate any other reasons why the executable file might be covered by
 240.381 ++// the GNU General Public License.
 240.382 ++
 240.383 ++//
 240.384 ++// ISO C++ 14882: 22.8  Standard locale categories.
 240.385 ++//
 240.386 ++
 240.387 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 240.388 ++
 240.389 ++#ifndef _C_LOCALE_H
 240.390 ++#define _C_LOCALE_H 1
 240.391 ++
 240.392 ++#pragma GCC system_header
 240.393 ++
 240.394 ++#include <cstring>              // get std::strlen
 240.395 ++#include <cstdio>               // get std::snprintf or std::sprintf
 240.396 ++#include <clocale>
 240.397 ++#include <langinfo.h>		// For codecvt
 240.398 ++#ifdef __UCLIBC_MJN3_ONLY__
 240.399 ++#warning fix this
 240.400 ++#endif
 240.401 ++#ifdef __UCLIBC_HAS_LOCALE__
 240.402 ++#include <iconv.h>		// For codecvt using iconv, iconv_t
 240.403 ++#endif
 240.404 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
 240.405 ++#include <libintl.h> 		// For messages
 240.406 ++#endif
 240.407 ++
 240.408 ++#ifdef __UCLIBC_MJN3_ONLY__
 240.409 ++#warning what is _GLIBCXX_C_LOCALE_GNU for
 240.410 ++#endif
 240.411 ++#define _GLIBCXX_C_LOCALE_GNU 1
 240.412 ++
 240.413 ++#ifdef __UCLIBC_MJN3_ONLY__
 240.414 ++#warning fix categories
 240.415 ++#endif
 240.416 ++// #define _GLIBCXX_NUM_CATEGORIES 6
 240.417 ++#define _GLIBCXX_NUM_CATEGORIES 0
 240.418 ++ 
 240.419 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.420 ++namespace __gnu_cxx
 240.421 ++{
 240.422 ++  extern "C" __typeof(uselocale) __uselocale;
 240.423 ++}
 240.424 ++#endif
 240.425 ++
 240.426 ++namespace std
 240.427 ++{
 240.428 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.429 ++  typedef __locale_t		__c_locale;
 240.430 ++#else
 240.431 ++  typedef int*			__c_locale;
 240.432 ++#endif
 240.433 ++
 240.434 ++  // Convert numeric value of type _Tv to string and return length of
 240.435 ++  // string.  If snprintf is available use it, otherwise fall back to
 240.436 ++  // the unsafe sprintf which, in general, can be dangerous and should
 240.437 ++  // be avoided.
 240.438 ++  template<typename _Tv>
 240.439 ++    int
 240.440 ++    __convert_from_v(char* __out, const int __size, const char* __fmt,
 240.441 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.442 ++		     _Tv __v, const __c_locale& __cloc, int __prec)
 240.443 ++    {
 240.444 ++      __c_locale __old = __gnu_cxx::__uselocale(__cloc);
 240.445 ++#else
 240.446 ++		     _Tv __v, const __c_locale&, int __prec)
 240.447 ++    {
 240.448 ++# ifdef __UCLIBC_HAS_LOCALE__
 240.449 ++      char* __old = std::setlocale(LC_ALL, NULL);
 240.450 ++      char* __sav = new char[std::strlen(__old) + 1];
 240.451 ++      std::strcpy(__sav, __old);
 240.452 ++      std::setlocale(LC_ALL, "C");
 240.453 ++# endif
 240.454 ++#endif
 240.455 ++
 240.456 ++      const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
 240.457 ++
 240.458 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.459 ++      __gnu_cxx::__uselocale(__old);
 240.460 ++#elif defined __UCLIBC_HAS_LOCALE__
 240.461 ++      std::setlocale(LC_ALL, __sav);
 240.462 ++      delete [] __sav;
 240.463 ++#endif
 240.464 ++      return __ret;
 240.465 ++    }
 240.466 ++}
 240.467 ++
 240.468 ++#endif
 240.469 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
 240.470 +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc	1969-12-31 18:00:00.000000000 -0600
 240.471 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc	2004-09-10 10:47:40.000000000 -0500
 240.472 +@@ -0,0 +1,306 @@
 240.473 ++// std::codecvt implementation details, GNU version -*- C++ -*-
 240.474 ++
 240.475 ++// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 240.476 ++//
 240.477 ++// This file is part of the GNU ISO C++ Library.  This library is free
 240.478 ++// software; you can redistribute it and/or modify it under the
 240.479 ++// terms of the GNU General Public License as published by the
 240.480 ++// Free Software Foundation; either version 2, or (at your option)
 240.481 ++// any later version.
 240.482 ++
 240.483 ++// This library is distributed in the hope that it will be useful,
 240.484 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 240.485 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 240.486 ++// GNU General Public License for more details.
 240.487 ++
 240.488 ++// You should have received a copy of the GNU General Public License along
 240.489 ++// with this library; see the file COPYING.  If not, write to the Free
 240.490 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 240.491 ++// USA.
 240.492 ++
 240.493 ++// As a special exception, you may use this file as part of a free software
 240.494 ++// library without restriction.  Specifically, if other files instantiate
 240.495 ++// templates or use macros or inline functions from this file, or you compile
 240.496 ++// this file and link it with other files to produce an executable, this
 240.497 ++// file does not by itself cause the resulting executable to be covered by
 240.498 ++// the GNU General Public License.  This exception does not however
 240.499 ++// invalidate any other reasons why the executable file might be covered by
 240.500 ++// the GNU General Public License.
 240.501 ++
 240.502 ++//
 240.503 ++// ISO C++ 14882: 22.2.1.5 - Template class codecvt
 240.504 ++//
 240.505 ++
 240.506 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 240.507 ++
 240.508 ++#include <locale>
 240.509 ++#include <bits/c++locale_internal.h>
 240.510 ++
 240.511 ++namespace std
 240.512 ++{
 240.513 ++  // Specializations.
 240.514 ++#ifdef _GLIBCXX_USE_WCHAR_T
 240.515 ++  codecvt_base::result
 240.516 ++  codecvt<wchar_t, char, mbstate_t>::
 240.517 ++  do_out(state_type& __state, const intern_type* __from, 
 240.518 ++	 const intern_type* __from_end, const intern_type*& __from_next,
 240.519 ++	 extern_type* __to, extern_type* __to_end,
 240.520 ++	 extern_type*& __to_next) const
 240.521 ++  {
 240.522 ++    result __ret = ok;
 240.523 ++    state_type __tmp_state(__state);
 240.524 ++
 240.525 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.526 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 240.527 ++#endif
 240.528 ++
 240.529 ++    // wcsnrtombs is *very* fast but stops if encounters NUL characters:
 240.530 ++    // in case we fall back to wcrtomb and then continue, in a loop.
 240.531 ++    // NB: wcsnrtombs is a GNU extension
 240.532 ++    for (__from_next = __from, __to_next = __to;
 240.533 ++	 __from_next < __from_end && __to_next < __to_end
 240.534 ++	 && __ret == ok;)
 240.535 ++      {
 240.536 ++	const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
 240.537 ++						      __from_end - __from_next);
 240.538 ++	if (!__from_chunk_end)
 240.539 ++	  __from_chunk_end = __from_end;
 240.540 ++
 240.541 ++	__from = __from_next;
 240.542 ++	const size_t __conv = wcsnrtombs(__to_next, &__from_next,
 240.543 ++					 __from_chunk_end - __from_next,
 240.544 ++					 __to_end - __to_next, &__state);
 240.545 ++	if (__conv == static_cast<size_t>(-1))
 240.546 ++	  {
 240.547 ++	    // In case of error, in order to stop at the exact place we
 240.548 ++	    // have to start again from the beginning with a series of
 240.549 ++	    // wcrtomb.
 240.550 ++	    for (; __from < __from_next; ++__from)
 240.551 ++	      __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
 240.552 ++	    __state = __tmp_state;
 240.553 ++	    __ret = error;
 240.554 ++	  }
 240.555 ++	else if (__from_next && __from_next < __from_chunk_end)
 240.556 ++	  {
 240.557 ++	    __to_next += __conv;
 240.558 ++	    __ret = partial;
 240.559 ++	  }
 240.560 ++	else
 240.561 ++	  {
 240.562 ++	    __from_next = __from_chunk_end;
 240.563 ++	    __to_next += __conv;
 240.564 ++	  }
 240.565 ++
 240.566 ++	if (__from_next < __from_end && __ret == ok)
 240.567 ++	  {
 240.568 ++	    extern_type __buf[MB_LEN_MAX];
 240.569 ++	    __tmp_state = __state;
 240.570 ++	    const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
 240.571 ++	    if (__conv > static_cast<size_t>(__to_end - __to_next))
 240.572 ++	      __ret = partial;
 240.573 ++	    else
 240.574 ++	      {
 240.575 ++		memcpy(__to_next, __buf, __conv);
 240.576 ++		__state = __tmp_state;
 240.577 ++		__to_next += __conv;
 240.578 ++		++__from_next;
 240.579 ++	      }
 240.580 ++	  }
 240.581 ++      }
 240.582 ++
 240.583 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.584 ++    __uselocale(__old);
 240.585 ++#endif
 240.586 ++
 240.587 ++    return __ret; 
 240.588 ++  }
 240.589 ++  
 240.590 ++  codecvt_base::result
 240.591 ++  codecvt<wchar_t, char, mbstate_t>::
 240.592 ++  do_in(state_type& __state, const extern_type* __from, 
 240.593 ++	const extern_type* __from_end, const extern_type*& __from_next,
 240.594 ++	intern_type* __to, intern_type* __to_end,
 240.595 ++	intern_type*& __to_next) const
 240.596 ++  {
 240.597 ++    result __ret = ok;
 240.598 ++    state_type __tmp_state(__state);
 240.599 ++
 240.600 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.601 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 240.602 ++#endif
 240.603 ++
 240.604 ++    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
 240.605 ++    // in case we store a L'\0' and then continue, in a loop.
 240.606 ++    // NB: mbsnrtowcs is a GNU extension
 240.607 ++    for (__from_next = __from, __to_next = __to;
 240.608 ++	 __from_next < __from_end && __to_next < __to_end
 240.609 ++	 && __ret == ok;)
 240.610 ++      {
 240.611 ++	const extern_type* __from_chunk_end;
 240.612 ++	__from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
 240.613 ++								  __from_end
 240.614 ++								  - __from_next));
 240.615 ++	if (!__from_chunk_end)
 240.616 ++	  __from_chunk_end = __from_end;
 240.617 ++
 240.618 ++	__from = __from_next;
 240.619 ++	size_t __conv = mbsnrtowcs(__to_next, &__from_next,
 240.620 ++				   __from_chunk_end - __from_next,
 240.621 ++				   __to_end - __to_next, &__state);
 240.622 ++	if (__conv == static_cast<size_t>(-1))
 240.623 ++	  {
 240.624 ++	    // In case of error, in order to stop at the exact place we
 240.625 ++	    // have to start again from the beginning with a series of
 240.626 ++	    // mbrtowc.
 240.627 ++	    for (;; ++__to_next, __from += __conv)
 240.628 ++	      {
 240.629 ++		__conv = mbrtowc(__to_next, __from, __from_end - __from,
 240.630 ++				 &__tmp_state);
 240.631 ++		if (__conv == static_cast<size_t>(-1)
 240.632 ++		    || __conv == static_cast<size_t>(-2))
 240.633 ++		  break;
 240.634 ++	      }
 240.635 ++	    __from_next = __from;
 240.636 ++	    __state = __tmp_state;	    
 240.637 ++	    __ret = error;
 240.638 ++	  }
 240.639 ++	else if (__from_next && __from_next < __from_chunk_end)
 240.640 ++	  {
 240.641 ++	    // It is unclear what to return in this case (see DR 382). 
 240.642 ++	    __to_next += __conv;
 240.643 ++	    __ret = partial;
 240.644 ++	  }
 240.645 ++	else
 240.646 ++	  {
 240.647 ++	    __from_next = __from_chunk_end;
 240.648 ++	    __to_next += __conv;
 240.649 ++	  }
 240.650 ++
 240.651 ++	if (__from_next < __from_end && __ret == ok)
 240.652 ++	  {
 240.653 ++	    if (__to_next < __to_end)
 240.654 ++	      {
 240.655 ++		// XXX Probably wrong for stateful encodings
 240.656 ++		__tmp_state = __state;		
 240.657 ++		++__from_next;
 240.658 ++		*__to_next++ = L'\0';
 240.659 ++	      }
 240.660 ++	    else
 240.661 ++	      __ret = partial;
 240.662 ++	  }
 240.663 ++      }
 240.664 ++
 240.665 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.666 ++    __uselocale(__old);
 240.667 ++#endif
 240.668 ++
 240.669 ++    return __ret; 
 240.670 ++  }
 240.671 ++
 240.672 ++  int 
 240.673 ++  codecvt<wchar_t, char, mbstate_t>::
 240.674 ++  do_encoding() const throw()
 240.675 ++  {
 240.676 ++    // XXX This implementation assumes that the encoding is
 240.677 ++    // stateless and is either single-byte or variable-width.
 240.678 ++    int __ret = 0;
 240.679 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.680 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 240.681 ++#endif
 240.682 ++    if (MB_CUR_MAX == 1)
 240.683 ++      __ret = 1;
 240.684 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.685 ++    __uselocale(__old);
 240.686 ++#endif
 240.687 ++    return __ret;
 240.688 ++  }  
 240.689 ++
 240.690 ++  int 
 240.691 ++  codecvt<wchar_t, char, mbstate_t>::
 240.692 ++  do_max_length() const throw()
 240.693 ++  {
 240.694 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.695 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 240.696 ++#endif
 240.697 ++    // XXX Probably wrong for stateful encodings.
 240.698 ++    int __ret = MB_CUR_MAX;
 240.699 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.700 ++    __uselocale(__old);
 240.701 ++#endif
 240.702 ++    return __ret;
 240.703 ++  }
 240.704 ++  
 240.705 ++  int 
 240.706 ++  codecvt<wchar_t, char, mbstate_t>::
 240.707 ++  do_length(state_type& __state, const extern_type* __from,
 240.708 ++	    const extern_type* __end, size_t __max) const
 240.709 ++  {
 240.710 ++    int __ret = 0;
 240.711 ++    state_type __tmp_state(__state);
 240.712 ++
 240.713 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.714 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 240.715 ++#endif
 240.716 ++
 240.717 ++    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
 240.718 ++    // in case we advance past it and then continue, in a loop.
 240.719 ++    // NB: mbsnrtowcs is a GNU extension
 240.720 ++  
 240.721 ++    // A dummy internal buffer is needed in order for mbsnrtocws to consider
 240.722 ++    // its fourth parameter (it wouldn't with NULL as first parameter).
 240.723 ++    wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) 
 240.724 ++							   * __max));
 240.725 ++    while (__from < __end && __max)
 240.726 ++      {
 240.727 ++	const extern_type* __from_chunk_end;
 240.728 ++	__from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
 240.729 ++								  __end
 240.730 ++								  - __from));
 240.731 ++	if (!__from_chunk_end)
 240.732 ++	  __from_chunk_end = __end;
 240.733 ++
 240.734 ++	const extern_type* __tmp_from = __from;
 240.735 ++	size_t __conv = mbsnrtowcs(__to, &__from,
 240.736 ++				   __from_chunk_end - __from,
 240.737 ++				   __max, &__state);
 240.738 ++	if (__conv == static_cast<size_t>(-1))
 240.739 ++	  {
 240.740 ++	    // In case of error, in order to stop at the exact place we
 240.741 ++	    // have to start again from the beginning with a series of
 240.742 ++	    // mbrtowc.
 240.743 ++	    for (__from = __tmp_from;; __from += __conv)
 240.744 ++	      {
 240.745 ++		__conv = mbrtowc(NULL, __from, __end - __from,
 240.746 ++				 &__tmp_state);
 240.747 ++		if (__conv == static_cast<size_t>(-1)
 240.748 ++		    || __conv == static_cast<size_t>(-2))
 240.749 ++		  break;
 240.750 ++	      }
 240.751 ++	    __state = __tmp_state;
 240.752 ++	    __ret += __from - __tmp_from;
 240.753 ++	    break;
 240.754 ++	  }
 240.755 ++	if (!__from)
 240.756 ++	  __from = __from_chunk_end;
 240.757 ++	
 240.758 ++	__ret += __from - __tmp_from;
 240.759 ++	__max -= __conv;
 240.760 ++
 240.761 ++	if (__from < __end && __max)
 240.762 ++	  {
 240.763 ++	    // XXX Probably wrong for stateful encodings
 240.764 ++	    __tmp_state = __state;
 240.765 ++	    ++__from;
 240.766 ++	    ++__ret;
 240.767 ++	    --__max;
 240.768 ++	  }
 240.769 ++      }
 240.770 ++
 240.771 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.772 ++    __uselocale(__old);
 240.773 ++#endif
 240.774 ++
 240.775 ++    return __ret; 
 240.776 ++  }
 240.777 ++#endif
 240.778 ++}
 240.779 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/collate_members.cc
 240.780 +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc	1969-12-31 18:00:00.000000000 -0600
 240.781 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/collate_members.cc	2004-09-10 10:47:40.000000000 -0500
 240.782 +@@ -0,0 +1,80 @@
 240.783 ++// std::collate implementation details, GNU version -*- C++ -*-
 240.784 ++
 240.785 ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
 240.786 ++//
 240.787 ++// This file is part of the GNU ISO C++ Library.  This library is free
 240.788 ++// software; you can redistribute it and/or modify it under the
 240.789 ++// terms of the GNU General Public License as published by the
 240.790 ++// Free Software Foundation; either version 2, or (at your option)
 240.791 ++// any later version.
 240.792 ++
 240.793 ++// This library is distributed in the hope that it will be useful,
 240.794 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 240.795 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 240.796 ++// GNU General Public License for more details.
 240.797 ++
 240.798 ++// You should have received a copy of the GNU General Public License along
 240.799 ++// with this library; see the file COPYING.  If not, write to the Free
 240.800 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 240.801 ++// USA.
 240.802 ++
 240.803 ++// As a special exception, you may use this file as part of a free software
 240.804 ++// library without restriction.  Specifically, if other files instantiate
 240.805 ++// templates or use macros or inline functions from this file, or you compile
 240.806 ++// this file and link it with other files to produce an executable, this
 240.807 ++// file does not by itself cause the resulting executable to be covered by
 240.808 ++// the GNU General Public License.  This exception does not however
 240.809 ++// invalidate any other reasons why the executable file might be covered by
 240.810 ++// the GNU General Public License.
 240.811 ++
 240.812 ++//
 240.813 ++// ISO C++ 14882: 22.2.4.1.2  collate virtual functions
 240.814 ++//
 240.815 ++
 240.816 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 240.817 ++
 240.818 ++#include <locale>
 240.819 ++#include <bits/c++locale_internal.h>
 240.820 ++
 240.821 ++#ifndef __UCLIBC_HAS_XLOCALE__
 240.822 ++#define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
 240.823 ++#define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
 240.824 ++#define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
 240.825 ++#define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
 240.826 ++#endif
 240.827 ++
 240.828 ++namespace std
 240.829 ++{
 240.830 ++  // These are basically extensions to char_traits, and perhaps should
 240.831 ++  // be put there instead of here.
 240.832 ++  template<>
 240.833 ++    int 
 240.834 ++    collate<char>::_M_compare(const char* __one, const char* __two) const
 240.835 ++    { 
 240.836 ++      int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
 240.837 ++      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
 240.838 ++    }
 240.839 ++  
 240.840 ++  template<>
 240.841 ++    size_t
 240.842 ++    collate<char>::_M_transform(char* __to, const char* __from, 
 240.843 ++				size_t __n) const 
 240.844 ++    { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
 240.845 ++
 240.846 ++#ifdef _GLIBCXX_USE_WCHAR_T
 240.847 ++  template<>
 240.848 ++    int 
 240.849 ++    collate<wchar_t>::_M_compare(const wchar_t* __one, 
 240.850 ++				 const wchar_t* __two) const
 240.851 ++    {
 240.852 ++      int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
 240.853 ++      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
 240.854 ++    }
 240.855 ++  
 240.856 ++  template<>
 240.857 ++    size_t
 240.858 ++    collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
 240.859 ++				   size_t __n) const
 240.860 ++    { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
 240.861 ++#endif
 240.862 ++}
 240.863 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc
 240.864 +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc	1969-12-31 18:00:00.000000000 -0600
 240.865 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc	2004-09-10 10:47:40.000000000 -0500
 240.866 +@@ -0,0 +1,300 @@
 240.867 ++// std::ctype implementation details, GNU version -*- C++ -*-
 240.868 ++
 240.869 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 240.870 ++//
 240.871 ++// This file is part of the GNU ISO C++ Library.  This library is free
 240.872 ++// software; you can redistribute it and/or modify it under the
 240.873 ++// terms of the GNU General Public License as published by the
 240.874 ++// Free Software Foundation; either version 2, or (at your option)
 240.875 ++// any later version.
 240.876 ++
 240.877 ++// This library is distributed in the hope that it will be useful,
 240.878 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 240.879 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 240.880 ++// GNU General Public License for more details.
 240.881 ++
 240.882 ++// You should have received a copy of the GNU General Public License along
 240.883 ++// with this library; see the file COPYING.  If not, write to the Free
 240.884 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 240.885 ++// USA.
 240.886 ++
 240.887 ++// As a special exception, you may use this file as part of a free software
 240.888 ++// library without restriction.  Specifically, if other files instantiate
 240.889 ++// templates or use macros or inline functions from this file, or you compile
 240.890 ++// this file and link it with other files to produce an executable, this
 240.891 ++// file does not by itself cause the resulting executable to be covered by
 240.892 ++// the GNU General Public License.  This exception does not however
 240.893 ++// invalidate any other reasons why the executable file might be covered by
 240.894 ++// the GNU General Public License.
 240.895 ++
 240.896 ++//
 240.897 ++// ISO C++ 14882: 22.2.1.1.2  ctype virtual functions.
 240.898 ++//
 240.899 ++
 240.900 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 240.901 ++
 240.902 ++#define _LIBC
 240.903 ++#include <locale>
 240.904 ++#undef _LIBC
 240.905 ++#include <bits/c++locale_internal.h>
 240.906 ++
 240.907 ++#ifndef __UCLIBC_HAS_XLOCALE__
 240.908 ++#define __wctype_l(S, L)           wctype((S))
 240.909 ++#define __towupper_l(C, L)         towupper((C))
 240.910 ++#define __towlower_l(C, L)         towlower((C))
 240.911 ++#define __iswctype_l(C, M, L)      iswctype((C), (M))
 240.912 ++#endif
 240.913 ++
 240.914 ++namespace std
 240.915 ++{
 240.916 ++  // NB: The other ctype<char> specializations are in src/locale.cc and
 240.917 ++  // various /config/os/* files.
 240.918 ++  template<>
 240.919 ++    ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
 240.920 ++    : ctype<char>(0, false, __refs) 
 240.921 ++    { 		
 240.922 ++      if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
 240.923 ++	{
 240.924 ++	  this->_S_destroy_c_locale(this->_M_c_locale_ctype);
 240.925 ++	  this->_S_create_c_locale(this->_M_c_locale_ctype, __s); 
 240.926 ++#ifdef __UCLIBC_HAS_XLOCALE__
 240.927 ++	  this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
 240.928 ++	  this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
 240.929 ++	  this->_M_table = this->_M_c_locale_ctype->__ctype_b;
 240.930 ++#endif
 240.931 ++	}
 240.932 ++    }
 240.933 ++
 240.934 ++#ifdef _GLIBCXX_USE_WCHAR_T  
 240.935 ++  ctype<wchar_t>::__wmask_type
 240.936 ++  ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
 240.937 ++  {
 240.938 ++    __wmask_type __ret;
 240.939 ++    switch (__m)
 240.940 ++      {
 240.941 ++      case space:
 240.942 ++	__ret = __wctype_l("space", _M_c_locale_ctype);
 240.943 ++	break;
 240.944 ++      case print:
 240.945 ++	__ret = __wctype_l("print", _M_c_locale_ctype);
 240.946 ++	break;
 240.947 ++      case cntrl:
 240.948 ++	__ret = __wctype_l("cntrl", _M_c_locale_ctype);
 240.949 ++	break;
 240.950 ++      case upper:
 240.951 ++	__ret = __wctype_l("upper", _M_c_locale_ctype);
 240.952 ++	break;
 240.953 ++      case lower:
 240.954 ++	__ret = __wctype_l("lower", _M_c_locale_ctype);
 240.955 ++	break;
 240.956 ++      case alpha:
 240.957 ++	__ret = __wctype_l("alpha", _M_c_locale_ctype);
 240.958 ++	break;
 240.959 ++      case digit:
 240.960 ++	__ret = __wctype_l("digit", _M_c_locale_ctype);
 240.961 ++	break;
 240.962 ++      case punct:
 240.963 ++	__ret = __wctype_l("punct", _M_c_locale_ctype);
 240.964 ++	break;
 240.965 ++      case xdigit:
 240.966 ++	__ret = __wctype_l("xdigit", _M_c_locale_ctype);
 240.967 ++	break;
 240.968 ++      case alnum:
 240.969 ++	__ret = __wctype_l("alnum", _M_c_locale_ctype);
 240.970 ++	break;
 240.971 ++      case graph:
 240.972 ++	__ret = __wctype_l("graph", _M_c_locale_ctype);
 240.973 ++	break;
 240.974 ++      default:
 240.975 ++	__ret = 0;
 240.976 ++      }
 240.977 ++    return __ret;
 240.978 ++  }
 240.979 ++  
 240.980 ++  wchar_t
 240.981 ++  ctype<wchar_t>::do_toupper(wchar_t __c) const
 240.982 ++  { return __towupper_l(__c, _M_c_locale_ctype); }
 240.983 ++
 240.984 ++  const wchar_t*
 240.985 ++  ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
 240.986 ++  {
 240.987 ++    while (__lo < __hi)
 240.988 ++      {
 240.989 ++        *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
 240.990 ++        ++__lo;
 240.991 ++      }
 240.992 ++    return __hi;
 240.993 ++  }
 240.994 ++  
 240.995 ++  wchar_t
 240.996 ++  ctype<wchar_t>::do_tolower(wchar_t __c) const
 240.997 ++  { return __towlower_l(__c, _M_c_locale_ctype); }
 240.998 ++  
 240.999 ++  const wchar_t*
240.1000 ++  ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
240.1001 ++  {
240.1002 ++    while (__lo < __hi)
240.1003 ++      {
240.1004 ++        *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
240.1005 ++        ++__lo;
240.1006 ++      }
240.1007 ++    return __hi;
240.1008 ++  }
240.1009 ++
240.1010 ++  bool
240.1011 ++  ctype<wchar_t>::
240.1012 ++  do_is(mask __m, wchar_t __c) const
240.1013 ++  { 
240.1014 ++    // Highest bitmask in ctype_base == 10, but extra in "C"
240.1015 ++    // library for blank.
240.1016 ++    bool __ret = false;
240.1017 ++    const size_t __bitmasksize = 11; 
240.1018 ++    for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
240.1019 ++      if (__m & _M_bit[__bitcur]
240.1020 ++	  && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
240.1021 ++	{
240.1022 ++	  __ret = true;
240.1023 ++	  break;
240.1024 ++	}
240.1025 ++    return __ret;    
240.1026 ++  }
240.1027 ++  
240.1028 ++  const wchar_t* 
240.1029 ++  ctype<wchar_t>::
240.1030 ++  do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
240.1031 ++  {
240.1032 ++    for (; __lo < __hi; ++__vec, ++__lo)
240.1033 ++      {
240.1034 ++	// Highest bitmask in ctype_base == 10, but extra in "C"
240.1035 ++	// library for blank.
240.1036 ++	const size_t __bitmasksize = 11; 
240.1037 ++	mask __m = 0;
240.1038 ++	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
240.1039 ++	  if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
240.1040 ++	    __m |= _M_bit[__bitcur];
240.1041 ++	*__vec = __m;
240.1042 ++      }
240.1043 ++    return __hi;
240.1044 ++  }
240.1045 ++  
240.1046 ++  const wchar_t* 
240.1047 ++  ctype<wchar_t>::
240.1048 ++  do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
240.1049 ++  {
240.1050 ++    while (__lo < __hi && !this->do_is(__m, *__lo))
240.1051 ++      ++__lo;
240.1052 ++    return __lo;
240.1053 ++  }
240.1054 ++
240.1055 ++  const wchar_t*
240.1056 ++  ctype<wchar_t>::
240.1057 ++  do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
240.1058 ++  {
240.1059 ++    while (__lo < __hi && this->do_is(__m, *__lo) != 0)
240.1060 ++      ++__lo;
240.1061 ++    return __lo;
240.1062 ++  }
240.1063 ++
240.1064 ++  wchar_t
240.1065 ++  ctype<wchar_t>::
240.1066 ++  do_widen(char __c) const
240.1067 ++  { return _M_widen[static_cast<unsigned char>(__c)]; }
240.1068 ++
240.1069 ++  const char* 
240.1070 ++  ctype<wchar_t>::
240.1071 ++  do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
240.1072 ++  {
240.1073 ++    while (__lo < __hi)
240.1074 ++      {
240.1075 ++	*__dest = _M_widen[static_cast<unsigned char>(*__lo)];
240.1076 ++	++__lo;
240.1077 ++	++__dest;
240.1078 ++      }
240.1079 ++    return __hi;
240.1080 ++  }
240.1081 ++
240.1082 ++  char
240.1083 ++  ctype<wchar_t>::
240.1084 ++  do_narrow(wchar_t __wc, char __dfault) const
240.1085 ++  {
240.1086 ++    if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
240.1087 ++      return _M_narrow[__wc];
240.1088 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.1089 ++    __c_locale __old = __uselocale(_M_c_locale_ctype);
240.1090 ++#endif
240.1091 ++    const int __c = wctob(__wc);
240.1092 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.1093 ++    __uselocale(__old);
240.1094 ++#endif
240.1095 ++    return (__c == EOF ? __dfault : static_cast<char>(__c)); 
240.1096 ++  }
240.1097 ++
240.1098 ++  const wchar_t*
240.1099 ++  ctype<wchar_t>::
240.1100 ++  do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, 
240.1101 ++	    char* __dest) const
240.1102 ++  {
240.1103 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.1104 ++    __c_locale __old = __uselocale(_M_c_locale_ctype);
240.1105 ++#endif
240.1106 ++    if (_M_narrow_ok)
240.1107 ++      while (__lo < __hi)
240.1108 ++	{
240.1109 ++	  if (*__lo >= 0 && *__lo < 128)
240.1110 ++	    *__dest = _M_narrow[*__lo];
240.1111 ++	  else
240.1112 ++	    {
240.1113 ++	      const int __c = wctob(*__lo);
240.1114 ++	      *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
240.1115 ++	    }
240.1116 ++	  ++__lo;
240.1117 ++	  ++__dest;
240.1118 ++	}
240.1119 ++    else
240.1120 ++      while (__lo < __hi)
240.1121 ++	{
240.1122 ++	  const int __c = wctob(*__lo);
240.1123 ++	  *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
240.1124 ++	  ++__lo;
240.1125 ++	  ++__dest;
240.1126 ++	}
240.1127 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.1128 ++    __uselocale(__old);
240.1129 ++#endif
240.1130 ++    return __hi;
240.1131 ++  }
240.1132 ++
240.1133 ++  void
240.1134 ++  ctype<wchar_t>::_M_initialize_ctype()
240.1135 ++  {
240.1136 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.1137 ++    __c_locale __old = __uselocale(_M_c_locale_ctype);
240.1138 ++#endif
240.1139 ++    wint_t __i;
240.1140 ++    for (__i = 0; __i < 128; ++__i)
240.1141 ++      {
240.1142 ++	const int __c = wctob(__i);
240.1143 ++	if (__c == EOF)
240.1144 ++	  break;
240.1145 ++	else
240.1146 ++	  _M_narrow[__i] = static_cast<char>(__c);
240.1147 ++      }
240.1148 ++    if (__i == 128)
240.1149 ++      _M_narrow_ok = true;
240.1150 ++    else
240.1151 ++      _M_narrow_ok = false;
240.1152 ++    for (size_t __j = 0;
240.1153 ++	 __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
240.1154 ++      _M_widen[__j] = btowc(__j);
240.1155 ++
240.1156 ++    for (size_t __k = 0; __k <= 11; ++__k)
240.1157 ++      { 
240.1158 ++	_M_bit[__k] = static_cast<mask>(_ISbit(__k));
240.1159 ++	_M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
240.1160 ++      }
240.1161 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.1162 ++    __uselocale(__old);
240.1163 ++#endif
240.1164 ++  }
240.1165 ++#endif //  _GLIBCXX_USE_WCHAR_T
240.1166 ++}
240.1167 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.cc
240.1168 +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc	1969-12-31 18:00:00.000000000 -0600
240.1169 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.cc	2004-09-10 10:47:40.000000000 -0500
240.1170 +@@ -0,0 +1,100 @@
240.1171 ++// std::messages implementation details, GNU version -*- C++ -*-
240.1172 ++
240.1173 ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
240.1174 ++//
240.1175 ++// This file is part of the GNU ISO C++ Library.  This library is free
240.1176 ++// software; you can redistribute it and/or modify it under the
240.1177 ++// terms of the GNU General Public License as published by the
240.1178 ++// Free Software Foundation; either version 2, or (at your option)
240.1179 ++// any later version.
240.1180 ++
240.1181 ++// This library is distributed in the hope that it will be useful,
240.1182 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
240.1183 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
240.1184 ++// GNU General Public License for more details.
240.1185 ++
240.1186 ++// You should have received a copy of the GNU General Public License along
240.1187 ++// with this library; see the file COPYING.  If not, write to the Free
240.1188 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
240.1189 ++// USA.
240.1190 ++
240.1191 ++// As a special exception, you may use this file as part of a free software
240.1192 ++// library without restriction.  Specifically, if other files instantiate
240.1193 ++// templates or use macros or inline functions from this file, or you compile
240.1194 ++// this file and link it with other files to produce an executable, this
240.1195 ++// file does not by itself cause the resulting executable to be covered by
240.1196 ++// the GNU General Public License.  This exception does not however
240.1197 ++// invalidate any other reasons why the executable file might be covered by
240.1198 ++// the GNU General Public License.
240.1199 ++
240.1200 ++//
240.1201 ++// ISO C++ 14882: 22.2.7.1.2  messages virtual functions
240.1202 ++//
240.1203 ++
240.1204 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
240.1205 ++
240.1206 ++#include <locale>
240.1207 ++#include <bits/c++locale_internal.h>
240.1208 ++
240.1209 ++#ifdef __UCLIBC_MJN3_ONLY__
240.1210 ++#warning fix gettext stuff
240.1211 ++#endif
240.1212 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
240.1213 ++extern "C" char *__dcgettext(const char *domainname,
240.1214 ++			     const char *msgid, int category);
240.1215 ++#undef gettext
240.1216 ++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
240.1217 ++#else
240.1218 ++#undef gettext
240.1219 ++#define gettext(msgid) (msgid)
240.1220 ++#endif
240.1221 ++
240.1222 ++namespace std
240.1223 ++{
240.1224 ++  // Specializations.
240.1225 ++  template<>
240.1226 ++    string
240.1227 ++    messages<char>::do_get(catalog, int, int, const string& __dfault) const
240.1228 ++    {
240.1229 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.1230 ++      __c_locale __old = __uselocale(_M_c_locale_messages);
240.1231 ++      const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
240.1232 ++      __uselocale(__old);
240.1233 ++      return string(__msg);
240.1234 ++#elif defined __UCLIBC_HAS_LOCALE__
240.1235 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
240.1236 ++      setlocale(LC_ALL, _M_name_messages);
240.1237 ++      const char* __msg = gettext(__dfault.c_str());
240.1238 ++      setlocale(LC_ALL, __old);
240.1239 ++      free(__old);
240.1240 ++      return string(__msg);
240.1241 ++#else
240.1242 ++      const char* __msg = gettext(__dfault.c_str());
240.1243 ++      return string(__msg);
240.1244 ++#endif
240.1245 ++    }
240.1246 ++
240.1247 ++#ifdef _GLIBCXX_USE_WCHAR_T
240.1248 ++  template<>
240.1249 ++    wstring
240.1250 ++    messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
240.1251 ++    {
240.1252 ++# ifdef __UCLIBC_HAS_XLOCALE__
240.1253 ++      __c_locale __old = __uselocale(_M_c_locale_messages);
240.1254 ++      char* __msg = gettext(_M_convert_to_char(__dfault));
240.1255 ++      __uselocale(__old);
240.1256 ++      return _M_convert_from_char(__msg);
240.1257 ++# elif defined __UCLIBC_HAS_LOCALE__
240.1258 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
240.1259 ++      setlocale(LC_ALL, _M_name_messages);
240.1260 ++      char* __msg = gettext(_M_convert_to_char(__dfault));
240.1261 ++      setlocale(LC_ALL, __old);
240.1262 ++      free(__old);
240.1263 ++      return _M_convert_from_char(__msg);
240.1264 ++# else
240.1265 ++      char* __msg = gettext(_M_convert_to_char(__dfault));
240.1266 ++      return _M_convert_from_char(__msg);
240.1267 ++# endif
240.1268 ++    }
240.1269 ++#endif
240.1270 ++}
240.1271 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.h
240.1272 +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/messages_members.h	1969-12-31 18:00:00.000000000 -0600
240.1273 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/messages_members.h	2004-09-10 10:47:40.000000000 -0500
240.1274 +@@ -0,0 +1,118 @@
240.1275 ++// std::messages implementation details, GNU version -*- C++ -*-
240.1276 ++
240.1277 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
240.1278 ++//
240.1279 ++// This file is part of the GNU ISO C++ Library.  This library is free
240.1280 ++// software; you can redistribute it and/or modify it under the
240.1281 ++// terms of the GNU General Public License as published by the
240.1282 ++// Free Software Foundation; either version 2, or (at your option)
240.1283 ++// any later version.
240.1284 ++
240.1285 ++// This library is distributed in the hope that it will be useful,
240.1286 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
240.1287 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
240.1288 ++// GNU General Public License for more details.
240.1289 ++
240.1290 ++// You should have received a copy of the GNU General Public License along
240.1291 ++// with this library; see the file COPYING.  If not, write to the Free
240.1292 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
240.1293 ++// USA.
240.1294 ++
240.1295 ++// As a special exception, you may use this file as part of a free software
240.1296 ++// library without restriction.  Specifically, if other files instantiate
240.1297 ++// templates or use macros or inline functions from this file, or you compile
240.1298 ++// this file and link it with other files to produce an executable, this
240.1299 ++// file does not by itself cause the resulting executable to be covered by
240.1300 ++// the GNU General Public License.  This exception does not however
240.1301 ++// invalidate any other reasons why the executable file might be covered by
240.1302 ++// the GNU General Public License.
240.1303 ++
240.1304 ++//
240.1305 ++// ISO C++ 14882: 22.2.7.1.2  messages functions
240.1306 ++//
240.1307 ++
240.1308 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
240.1309 ++
240.1310 ++#ifdef __UCLIBC_MJN3_ONLY__
240.1311 ++#warning fix prototypes for *textdomain funcs
240.1312 ++#endif
240.1313 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
240.1314 ++extern "C" char *__textdomain(const char *domainname);
240.1315 ++extern "C" char *__bindtextdomain(const char *domainname,
240.1316 ++				  const char *dirname);
240.1317 ++#else
240.1318 ++#undef __textdomain
240.1319 ++#undef __bindtextdomain
240.1320 ++#define __textdomain(D)           ((void)0)
240.1321 ++#define __bindtextdomain(D,P)     ((void)0)
240.1322 ++#endif
240.1323 ++
240.1324 ++  // Non-virtual member functions.
240.1325 ++  template<typename _CharT>
240.1326 ++     messages<_CharT>::messages(size_t __refs)
240.1327 ++     : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), 
240.1328 ++     _M_name_messages(_S_get_c_name())
240.1329 ++     { }
240.1330 ++
240.1331 ++  template<typename _CharT>
240.1332 ++     messages<_CharT>::messages(__c_locale __cloc, const char* __s, 
240.1333 ++				size_t __refs) 
240.1334 ++     : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
240.1335 ++     _M_name_messages(__s)
240.1336 ++     {
240.1337 ++       char* __tmp = new char[std::strlen(__s) + 1];
240.1338 ++       std::strcpy(__tmp, __s);
240.1339 ++       _M_name_messages = __tmp;
240.1340 ++     }
240.1341 ++
240.1342 ++  template<typename _CharT>
240.1343 ++    typename messages<_CharT>::catalog 
240.1344 ++    messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, 
240.1345 ++			   const char* __dir) const
240.1346 ++    { 
240.1347 ++      __bindtextdomain(__s.c_str(), __dir);
240.1348 ++      return this->do_open(__s, __loc); 
240.1349 ++    }
240.1350 ++
240.1351 ++  // Virtual member functions.
240.1352 ++  template<typename _CharT>
240.1353 ++    messages<_CharT>::~messages()
240.1354 ++    { 
240.1355 ++      if (_M_name_messages != _S_get_c_name())
240.1356 ++	delete [] _M_name_messages;
240.1357 ++      _S_destroy_c_locale(_M_c_locale_messages); 
240.1358 ++    }
240.1359 ++
240.1360 ++  template<typename _CharT>
240.1361 ++    typename messages<_CharT>::catalog 
240.1362 ++    messages<_CharT>::do_open(const basic_string<char>& __s, 
240.1363 ++			      const locale&) const
240.1364 ++    { 
240.1365 ++      // No error checking is done, assume the catalog exists and can
240.1366 ++      // be used.
240.1367 ++      __textdomain(__s.c_str());
240.1368 ++      return 0;
240.1369 ++    }
240.1370 ++
240.1371 ++  template<typename _CharT>
240.1372 ++    void    
240.1373 ++    messages<_CharT>::do_close(catalog) const 
240.1374 ++    { }
240.1375 ++
240.1376 ++   // messages_byname
240.1377 ++   template<typename _CharT>
240.1378 ++     messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
240.1379 ++     : messages<_CharT>(__refs) 
240.1380 ++     { 
240.1381 ++       if (this->_M_name_messages != locale::facet::_S_get_c_name())
240.1382 ++	 delete [] this->_M_name_messages;
240.1383 ++       char* __tmp = new char[std::strlen(__s) + 1];
240.1384 ++       std::strcpy(__tmp, __s);
240.1385 ++       this->_M_name_messages = __tmp;
240.1386 ++
240.1387 ++       if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
240.1388 ++	 {
240.1389 ++	   this->_S_destroy_c_locale(this->_M_c_locale_messages);
240.1390 ++	   this->_S_create_c_locale(this->_M_c_locale_messages, __s); 
240.1391 ++	 }
240.1392 ++     }
240.1393 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc
240.1394 +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc	1969-12-31 18:00:00.000000000 -0600
240.1395 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc	2004-09-10 10:47:40.000000000 -0500
240.1396 +@@ -0,0 +1,698 @@
240.1397 ++// std::moneypunct implementation details, GNU version -*- C++ -*-
240.1398 ++
240.1399 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
240.1400 ++//
240.1401 ++// This file is part of the GNU ISO C++ Library.  This library is free
240.1402 ++// software; you can redistribute it and/or modify it under the
240.1403 ++// terms of the GNU General Public License as published by the
240.1404 ++// Free Software Foundation; either version 2, or (at your option)
240.1405 ++// any later version.
240.1406 ++
240.1407 ++// This library is distributed in the hope that it will be useful,
240.1408 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
240.1409 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
240.1410 ++// GNU General Public License for more details.
240.1411 ++
240.1412 ++// You should have received a copy of the GNU General Public License along
240.1413 ++// with this library; see the file COPYING.  If not, write to the Free
240.1414 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
240.1415 ++// USA.
240.1416 ++
240.1417 ++// As a special exception, you may use this file as part of a free software
240.1418 ++// library without restriction.  Specifically, if other files instantiate
240.1419 ++// templates or use macros or inline functions from this file, or you compile
240.1420 ++// this file and link it with other files to produce an executable, this
240.1421 ++// file does not by itself cause the resulting executable to be covered by
240.1422 ++// the GNU General Public License.  This exception does not however
240.1423 ++// invalidate any other reasons why the executable file might be covered by
240.1424 ++// the GNU General Public License.
240.1425 ++
240.1426 ++//
240.1427 ++// ISO C++ 14882: 22.2.6.3.2  moneypunct virtual functions
240.1428 ++//
240.1429 ++
240.1430 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
240.1431 ++
240.1432 ++#define _LIBC
240.1433 ++#include <locale>
240.1434 ++#undef _LIBC
240.1435 ++#include <bits/c++locale_internal.h>
240.1436 ++
240.1437 ++#ifdef __UCLIBC_MJN3_ONLY__
240.1438 ++#warning optimize this for uclibc
240.1439 ++#warning tailor for stub locale support
240.1440 ++#endif
240.1441 ++
240.1442 ++#ifndef __UCLIBC_HAS_XLOCALE__
240.1443 ++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
240.1444 ++#endif
240.1445 ++
240.1446 ++namespace std
240.1447 ++{
240.1448 ++  // Construct and return valid pattern consisting of some combination of:
240.1449 ++  // space none symbol sign value
240.1450 ++  money_base::pattern
240.1451 ++  money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
240.1452 ++  { 
240.1453 ++    pattern __ret;
240.1454 ++
240.1455 ++    // This insanely complicated routine attempts to construct a valid
240.1456 ++    // pattern for use with monyepunct. A couple of invariants:
240.1457 ++
240.1458 ++    // if (__precedes) symbol -> value
240.1459 ++    // else value -> symbol
240.1460 ++    
240.1461 ++    // if (__space) space
240.1462 ++    // else none
240.1463 ++
240.1464 ++    // none == never first
240.1465 ++    // space never first or last
240.1466 ++
240.1467 ++    // Any elegant implementations of this are welcome.
240.1468 ++    switch (__posn)
240.1469 ++      {
240.1470 ++      case 0:
240.1471 ++      case 1:
240.1472 ++	// 1 The sign precedes the value and symbol.
240.1473 ++	__ret.field[0] = sign;
240.1474 ++	if (__space)
240.1475 ++	  {
240.1476 ++	    // Pattern starts with sign.
240.1477 ++	    if (__precedes)
240.1478 ++	      {
240.1479 ++		__ret.field[1] = symbol;
240.1480 ++		__ret.field[3] = value;
240.1481 ++	      }
240.1482 ++	    else
240.1483 ++	      {
240.1484 ++		__ret.field[1] = value;
240.1485 ++		__ret.field[3] = symbol;
240.1486 ++	      }
240.1487 ++	    __ret.field[2] = space;
240.1488 ++	  }
240.1489 ++	else
240.1490 ++	  {
240.1491 ++	    // Pattern starts with sign and ends with none.
240.1492 ++	    if (__precedes)
240.1493 ++	      {
240.1494 ++		__ret.field[1] = symbol;
240.1495 ++		__ret.field[2] = value;
240.1496 ++	      }
240.1497 ++	    else
240.1498 ++	      {
240.1499 ++		__ret.field[1] = value;
240.1500 ++		__ret.field[2] = symbol;
240.1501 ++	      }
240.1502 ++	    __ret.field[3] = none;
240.1503 ++	  }
240.1504 ++	break;
240.1505 ++      case 2:
240.1506 ++	// 2 The sign follows the value and symbol.
240.1507 ++	if (__space)
240.1508 ++	  {
240.1509 ++	    // Pattern either ends with sign.
240.1510 ++	    if (__precedes)
240.1511 ++	      {
240.1512 ++		__ret.field[0] = symbol;
240.1513 ++		__ret.field[2] = value;
240.1514 ++	      }
240.1515 ++	    else
240.1516 ++	      {
240.1517 ++		__ret.field[0] = value;
240.1518 ++		__ret.field[2] = symbol;
240.1519 ++	      }
240.1520 ++	    __ret.field[1] = space;
240.1521 ++	    __ret.field[3] = sign;
240.1522 ++	  }
240.1523 ++	else
240.1524 ++	  {
240.1525 ++	    // Pattern ends with sign then none.
240.1526 ++	    if (__precedes)
240.1527 ++	      {
240.1528 ++		__ret.field[0] = symbol;
240.1529 ++		__ret.field[1] = value;
240.1530 ++	      }
240.1531 ++	    else
240.1532 ++	      {
240.1533 ++		__ret.field[0] = value;
240.1534 ++		__ret.field[1] = symbol;
240.1535 ++	      }
240.1536 ++	    __ret.field[2] = sign;
240.1537 ++	    __ret.field[3] = none;
240.1538 ++	  }
240.1539 ++	break;
240.1540 ++      case 3:
240.1541 ++	// 3 The sign immediately precedes the symbol.
240.1542 ++	if (__precedes)
240.1543 ++	  {
240.1544 ++	    __ret.field[0] = sign;
240.1545 ++	    __ret.field[1] = symbol;	    
240.1546 ++	    if (__space)
240.1547 ++	      {
240.1548 ++		__ret.field[2] = space;
240.1549 ++		__ret.field[3] = value;
240.1550 ++	      }
240.1551 ++	    else
240.1552 ++	      {
240.1553 ++		__ret.field[2] = value;		
240.1554 ++		__ret.field[3] = none;
240.1555 ++	      }
240.1556 ++	  }
240.1557 ++	else
240.1558 ++	  {
240.1559 ++	    __ret.field[0] = value;
240.1560 ++	    if (__space)
240.1561 ++	      {
240.1562 ++		__ret.field[1] = space;
240.1563 ++		__ret.field[2] = sign;
240.1564 ++		__ret.field[3] = symbol;
240.1565 ++	      }
240.1566 ++	    else
240.1567 ++	      {
240.1568 ++		__ret.field[1] = sign;
240.1569 ++		__ret.field[2] = symbol;
240.1570 ++		__ret.field[3] = none;
240.1571 ++	      }
240.1572 ++	  }
240.1573 ++	break;
240.1574 ++      case 4:
240.1575 ++	// 4 The sign immediately follows the symbol.
240.1576 ++	if (__precedes)
240.1577 ++	  {
240.1578 ++	    __ret.field[0] = symbol;
240.1579 ++	    __ret.field[1] = sign;
240.1580 ++	    if (__space)
240.1581 ++	      {
240.1582 ++		__ret.field[2] = space;
240.1583 ++		__ret.field[3] = value;
240.1584 ++	      }
240.1585 ++	    else
240.1586 ++	      {
240.1587 ++		__ret.field[2] = value;
240.1588 ++		__ret.field[3] = none;
240.1589 ++	      }
240.1590 ++	  }
240.1591 ++	else
240.1592 ++	  {
240.1593 ++	    __ret.field[0] = value;
240.1594 ++	    if (__space)
240.1595 ++	      {
240.1596 ++		__ret.field[1] = space;
240.1597 ++		__ret.field[2] = symbol;
240.1598 ++		__ret.field[3] = sign;
240.1599 ++	      }
240.1600 ++	    else
240.1601 ++	      {
240.1602 ++		__ret.field[1] = symbol;
240.1603 ++		__ret.field[2] = sign;
240.1604 ++		__ret.field[3] = none;
240.1605 ++	      }
240.1606 ++	  }
240.1607 ++	break;
240.1608 ++      default:
240.1609 ++	;
240.1610 ++      }
240.1611 ++    return __ret;
240.1612 ++  }
240.1613 ++
240.1614 ++  template<> 
240.1615 ++    void
240.1616 ++    moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc, 
240.1617 ++						     const char*)
240.1618 ++    {
240.1619 ++      if (!_M_data)
240.1620 ++	_M_data = new __moneypunct_cache<char, true>;
240.1621 ++
240.1622 ++      if (!__cloc)
240.1623 ++	{
240.1624 ++	  // "C" locale
240.1625 ++	  _M_data->_M_decimal_point = '.';
240.1626 ++	  _M_data->_M_thousands_sep = ',';
240.1627 ++	  _M_data->_M_grouping = "";
240.1628 ++	  _M_data->_M_grouping_size = 0;
240.1629 ++	  _M_data->_M_curr_symbol = "";
240.1630 ++	  _M_data->_M_curr_symbol_size = 0;
240.1631 ++	  _M_data->_M_positive_sign = "";
240.1632 ++	  _M_data->_M_positive_sign_size = 0;
240.1633 ++	  _M_data->_M_negative_sign = "";
240.1634 ++	  _M_data->_M_negative_sign_size = 0;
240.1635 ++	  _M_data->_M_frac_digits = 0;
240.1636 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
240.1637 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
240.1638 ++
240.1639 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
240.1640 ++	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
240.1641 ++	}
240.1642 ++      else
240.1643 ++	{
240.1644 ++	  // Named locale.
240.1645 ++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
240.1646 ++							__cloc));
240.1647 ++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
240.1648 ++							__cloc));
240.1649 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
240.1650 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
240.1651 ++	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
240.1652 ++	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
240.1653 ++
240.1654 ++	  char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
240.1655 ++	  if (!__nposn)
240.1656 ++	    _M_data->_M_negative_sign = "()";
240.1657 ++	  else
240.1658 ++	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, 
240.1659 ++							__cloc);
240.1660 ++	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
240.1661 ++
240.1662 ++	  // _Intl == true
240.1663 ++	  _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
240.1664 ++	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
240.1665 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
240.1666 ++						      __cloc));
240.1667 ++	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
240.1668 ++	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
240.1669 ++	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
240.1670 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
240.1671 ++							__pposn);
240.1672 ++	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
240.1673 ++	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
240.1674 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
240.1675 ++							__nposn);
240.1676 ++	}
240.1677 ++    }
240.1678 ++
240.1679 ++  template<> 
240.1680 ++    void
240.1681 ++    moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, 
240.1682 ++						      const char*)
240.1683 ++    {
240.1684 ++      if (!_M_data)
240.1685 ++	_M_data = new __moneypunct_cache<char, false>;
240.1686 ++
240.1687 ++      if (!__cloc)
240.1688 ++	{
240.1689 ++	  // "C" locale
240.1690 ++	  _M_data->_M_decimal_point = '.';
240.1691 ++	  _M_data->_M_thousands_sep = ',';
240.1692 ++	  _M_data->_M_grouping = "";
240.1693 ++	  _M_data->_M_grouping_size = 0;
240.1694 ++	  _M_data->_M_curr_symbol = "";
240.1695 ++	  _M_data->_M_curr_symbol_size = 0;
240.1696 ++	  _M_data->_M_positive_sign = "";
240.1697 ++	  _M_data->_M_positive_sign_size = 0;
240.1698 ++	  _M_data->_M_negative_sign = "";
240.1699 ++	  _M_data->_M_negative_sign_size = 0;
240.1700 ++	  _M_data->_M_frac_digits = 0;
240.1701 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
240.1702 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
240.1703 ++
240.1704 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
240.1705 ++	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
240.1706 ++	}
240.1707 ++      else
240.1708 ++	{
240.1709 ++	  // Named locale.
240.1710 ++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
240.1711 ++							__cloc));
240.1712 ++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
240.1713 ++							__cloc));
240.1714 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
240.1715 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
240.1716 ++	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
240.1717 ++	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
240.1718 ++
240.1719 ++	  char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
240.1720 ++	  if (!__nposn)
240.1721 ++	    _M_data->_M_negative_sign = "()";
240.1722 ++	  else
240.1723 ++	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
240.1724 ++							__cloc);
240.1725 ++	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
240.1726 ++
240.1727 ++	  // _Intl == false
240.1728 ++	  _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
240.1729 ++	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
240.1730 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
240.1731 ++	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
240.1732 ++	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
240.1733 ++	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
240.1734 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
240.1735 ++							__pposn);
240.1736 ++	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
240.1737 ++	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
240.1738 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
240.1739 ++							__nposn);
240.1740 ++	}
240.1741 ++    }
240.1742 ++
240.1743 ++  template<> 
240.1744 ++    moneypunct<char, true>::~moneypunct()
240.1745 ++    { delete _M_data; }
240.1746 ++
240.1747 ++  template<> 
240.1748 ++    moneypunct<char, false>::~moneypunct()
240.1749 ++    { delete _M_data; }
240.1750 ++
240.1751 ++#ifdef _GLIBCXX_USE_WCHAR_T
240.1752 ++  template<> 
240.1753 ++    void
240.1754 ++    moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc, 
240.1755 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.1756 ++							const char*)
240.1757 ++#else
240.1758 ++							const char* __name)
240.1759 ++#endif
240.1760 ++    {
240.1761 ++      if (!_M_data)
240.1762 ++	_M_data = new __moneypunct_cache<wchar_t, true>;
240.1763 ++
240.1764 ++      if (!__cloc)
240.1765 ++	{
240.1766 ++	  // "C" locale
240.1767 ++	  _M_data->_M_decimal_point = L'.';
240.1768 ++	  _M_data->_M_thousands_sep = L',';
240.1769 ++	  _M_data->_M_grouping = "";
240.1770 ++	  _M_data->_M_grouping_size = 0;
240.1771 ++	  _M_data->_M_curr_symbol = L"";
240.1772 ++	  _M_data->_M_curr_symbol_size = 0;
240.1773 ++	  _M_data->_M_positive_sign = L"";
240.1774 ++	  _M_data->_M_positive_sign_size = 0;
240.1775 ++	  _M_data->_M_negative_sign = L"";
240.1776 ++	  _M_data->_M_negative_sign_size = 0;
240.1777 ++	  _M_data->_M_frac_digits = 0;
240.1778 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
240.1779 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
240.1780 ++
240.1781 ++	  // Use ctype::widen code without the facet...
240.1782 ++	  unsigned char uc;
240.1783 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
240.1784 ++	    {
240.1785 ++	      uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
240.1786 ++	      _M_data->_M_atoms[__i] = btowc(uc);
240.1787 ++	    }
240.1788 ++	}
240.1789 ++      else
240.1790 ++	{
240.1791 ++	  // Named locale.
240.1792 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.1793 ++	  __c_locale __old = __uselocale(__cloc);
240.1794 ++#else
240.1795 ++	  // Switch to named locale so that mbsrtowcs will work.
240.1796 ++	  char* __old = strdup(setlocale(LC_ALL, NULL));
240.1797 ++	  setlocale(LC_ALL, __name);
240.1798 ++#endif
240.1799 ++
240.1800 ++#ifdef __UCLIBC_MJN3_ONLY__
240.1801 ++#warning fix this... should be monetary
240.1802 ++#endif
240.1803 ++#ifdef __UCLIBC__
240.1804 ++# ifdef __UCLIBC_HAS_XLOCALE__
240.1805 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
240.1806 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
240.1807 ++# else
240.1808 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
240.1809 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
240.1810 ++# endif
240.1811 ++#else
240.1812 ++	  union __s_and_w { const char *__s; unsigned int __w; } __u;
240.1813 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
240.1814 ++	  _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
240.1815 ++
240.1816 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
240.1817 ++	  _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
240.1818 ++#endif
240.1819 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
240.1820 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
240.1821 ++
240.1822 ++	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
240.1823 ++	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
240.1824 ++	  const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
240.1825 ++
240.1826 ++	  wchar_t* __wcs_ps = 0;
240.1827 ++	  wchar_t* __wcs_ns = 0;
240.1828 ++	  const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
240.1829 ++	  try
240.1830 ++	    {
240.1831 ++	      mbstate_t __state;
240.1832 ++	      size_t __len = strlen(__cpossign);
240.1833 ++	      if (__len)
240.1834 ++		{
240.1835 ++		  ++__len;
240.1836 ++		  memset(&__state, 0, sizeof(mbstate_t));
240.1837 ++		  __wcs_ps = new wchar_t[__len];
240.1838 ++		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
240.1839 ++		  _M_data->_M_positive_sign = __wcs_ps;
240.1840 ++		}
240.1841 ++	      else
240.1842 ++		_M_data->_M_positive_sign = L"";
240.1843 ++	      _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
240.1844 ++	      
240.1845 ++	      __len = strlen(__cnegsign);
240.1846 ++	      if (!__nposn)
240.1847 ++		_M_data->_M_negative_sign = L"()";
240.1848 ++	      else if (__len)
240.1849 ++		{ 
240.1850 ++		  ++__len;
240.1851 ++		  memset(&__state, 0, sizeof(mbstate_t));
240.1852 ++		  __wcs_ns = new wchar_t[__len];
240.1853 ++		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
240.1854 ++		  _M_data->_M_negative_sign = __wcs_ns;
240.1855 ++		}
240.1856 ++	      else
240.1857 ++		_M_data->_M_negative_sign = L"";
240.1858 ++	      _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
240.1859 ++	      
240.1860 ++	      // _Intl == true.
240.1861 ++	      __len = strlen(__ccurr);
240.1862 ++	      if (__len)
240.1863 ++		{
240.1864 ++		  ++__len;
240.1865 ++		  memset(&__state, 0, sizeof(mbstate_t));
240.1866 ++		  wchar_t* __wcs = new wchar_t[__len];
240.1867 ++		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
240.1868 ++		  _M_data->_M_curr_symbol = __wcs;
240.1869 ++		}
240.1870 ++	      else
240.1871 ++		_M_data->_M_curr_symbol = L"";
240.1872 ++	      _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
240.1873 ++	    }
240.1874 ++	  catch (...)
240.1875 ++	    {
240.1876 ++	      delete _M_data;
240.1877 ++	      _M_data = 0;
240.1878 ++	      delete __wcs_ps;
240.1879 ++	      delete __wcs_ns;	      
240.1880 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.1881 ++	      __uselocale(__old);
240.1882 ++#else
240.1883 ++	      setlocale(LC_ALL, __old);
240.1884 ++	      free(__old);
240.1885 ++#endif
240.1886 ++	      __throw_exception_again;
240.1887 ++	    } 
240.1888 ++	  
240.1889 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
240.1890 ++						      __cloc));
240.1891 ++	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
240.1892 ++	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
240.1893 ++	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
240.1894 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
240.1895 ++							__pposn);
240.1896 ++	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
240.1897 ++	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
240.1898 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
240.1899 ++							__nposn);
240.1900 ++
240.1901 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.1902 ++	  __uselocale(__old);
240.1903 ++#else
240.1904 ++	  setlocale(LC_ALL, __old);
240.1905 ++	  free(__old);
240.1906 ++#endif
240.1907 ++	}
240.1908 ++    }
240.1909 ++
240.1910 ++  template<> 
240.1911 ++  void
240.1912 ++  moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
240.1913 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.1914 ++						       const char*)
240.1915 ++#else
240.1916 ++                                                       const char* __name)
240.1917 ++#endif
240.1918 ++  {
240.1919 ++    if (!_M_data)
240.1920 ++      _M_data = new __moneypunct_cache<wchar_t, false>;
240.1921 ++
240.1922 ++    if (!__cloc)
240.1923 ++	{
240.1924 ++	  // "C" locale
240.1925 ++	  _M_data->_M_decimal_point = L'.';
240.1926 ++	  _M_data->_M_thousands_sep = L',';
240.1927 ++	  _M_data->_M_grouping = "";
240.1928 ++          _M_data->_M_grouping_size = 0;
240.1929 ++	  _M_data->_M_curr_symbol = L"";
240.1930 ++	  _M_data->_M_curr_symbol_size = 0;
240.1931 ++	  _M_data->_M_positive_sign = L"";
240.1932 ++	  _M_data->_M_positive_sign_size = 0;
240.1933 ++	  _M_data->_M_negative_sign = L"";
240.1934 ++	  _M_data->_M_negative_sign_size = 0;
240.1935 ++	  _M_data->_M_frac_digits = 0;
240.1936 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
240.1937 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
240.1938 ++
240.1939 ++	  // Use ctype::widen code without the facet...
240.1940 ++	  unsigned char uc;
240.1941 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
240.1942 ++	    {
240.1943 ++	      uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
240.1944 ++	      _M_data->_M_atoms[__i] = btowc(uc);
240.1945 ++	    }
240.1946 ++	}
240.1947 ++      else
240.1948 ++	{
240.1949 ++	  // Named locale.
240.1950 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.1951 ++	  __c_locale __old = __uselocale(__cloc);
240.1952 ++#else
240.1953 ++	  // Switch to named locale so that mbsrtowcs will work.
240.1954 ++	  char* __old = strdup(setlocale(LC_ALL, NULL));
240.1955 ++	  setlocale(LC_ALL, __name);
240.1956 ++#endif
240.1957 ++
240.1958 ++#ifdef __UCLIBC_MJN3_ONLY__
240.1959 ++#warning fix this... should be monetary
240.1960 ++#endif
240.1961 ++#ifdef __UCLIBC__
240.1962 ++# ifdef __UCLIBC_HAS_XLOCALE__
240.1963 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
240.1964 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
240.1965 ++# else
240.1966 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
240.1967 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
240.1968 ++# endif
240.1969 ++#else
240.1970 ++	  union __s_and_w { const char *__s; unsigned int __w; } __u;
240.1971 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
240.1972 ++	  _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
240.1973 ++
240.1974 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
240.1975 ++	  _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
240.1976 ++#endif
240.1977 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
240.1978 ++          _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
240.1979 ++
240.1980 ++	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
240.1981 ++	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
240.1982 ++	  const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
240.1983 ++
240.1984 ++	  wchar_t* __wcs_ps = 0;
240.1985 ++	  wchar_t* __wcs_ns = 0;
240.1986 ++	  const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
240.1987 ++	  try
240.1988 ++            {
240.1989 ++              mbstate_t __state;
240.1990 ++              size_t __len;
240.1991 ++              __len = strlen(__cpossign);
240.1992 ++              if (__len)
240.1993 ++                {
240.1994 ++		  ++__len;
240.1995 ++		  memset(&__state, 0, sizeof(mbstate_t));
240.1996 ++		  __wcs_ps = new wchar_t[__len];
240.1997 ++		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
240.1998 ++		  _M_data->_M_positive_sign = __wcs_ps;
240.1999 ++		}
240.2000 ++	      else
240.2001 ++		_M_data->_M_positive_sign = L"";
240.2002 ++              _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
240.2003 ++	      
240.2004 ++	      __len = strlen(__cnegsign);
240.2005 ++	      if (!__nposn)
240.2006 ++		_M_data->_M_negative_sign = L"()";
240.2007 ++	      else if (__len)
240.2008 ++		{ 
240.2009 ++		  ++__len;
240.2010 ++		  memset(&__state, 0, sizeof(mbstate_t));
240.2011 ++		  __wcs_ns = new wchar_t[__len];
240.2012 ++		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
240.2013 ++		  _M_data->_M_negative_sign = __wcs_ns;
240.2014 ++		}
240.2015 ++	      else
240.2016 ++		_M_data->_M_negative_sign = L"";
240.2017 ++              _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
240.2018 ++
240.2019 ++	      // _Intl == true.
240.2020 ++	      __len = strlen(__ccurr);
240.2021 ++	      if (__len)
240.2022 ++		{
240.2023 ++		  ++__len;
240.2024 ++		  memset(&__state, 0, sizeof(mbstate_t));
240.2025 ++		  wchar_t* __wcs = new wchar_t[__len];
240.2026 ++		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
240.2027 ++		  _M_data->_M_curr_symbol = __wcs;
240.2028 ++		}
240.2029 ++	      else
240.2030 ++		_M_data->_M_curr_symbol = L"";
240.2031 ++              _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
240.2032 ++	    }
240.2033 ++          catch (...)
240.2034 ++	    {
240.2035 ++	      delete _M_data;
240.2036 ++              _M_data = 0;
240.2037 ++	      delete __wcs_ps;
240.2038 ++	      delete __wcs_ns;	      
240.2039 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.2040 ++	      __uselocale(__old);
240.2041 ++#else
240.2042 ++	      setlocale(LC_ALL, __old);
240.2043 ++	      free(__old);
240.2044 ++#endif
240.2045 ++              __throw_exception_again;
240.2046 ++	    }
240.2047 ++
240.2048 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
240.2049 ++	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
240.2050 ++	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
240.2051 ++	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
240.2052 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
240.2053 ++	                                                __pposn);
240.2054 ++	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
240.2055 ++	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
240.2056 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
240.2057 ++	                                                __nposn);
240.2058 ++
240.2059 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.2060 ++	  __uselocale(__old);
240.2061 ++#else
240.2062 ++	  setlocale(LC_ALL, __old);
240.2063 ++	  free(__old);
240.2064 ++#endif
240.2065 ++	}
240.2066 ++    }
240.2067 ++
240.2068 ++  template<> 
240.2069 ++    moneypunct<wchar_t, true>::~moneypunct()
240.2070 ++    {
240.2071 ++      if (_M_data->_M_positive_sign_size)
240.2072 ++	delete [] _M_data->_M_positive_sign;
240.2073 ++      if (_M_data->_M_negative_sign_size
240.2074 ++          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
240.2075 ++	delete [] _M_data->_M_negative_sign;
240.2076 ++      if (_M_data->_M_curr_symbol_size)
240.2077 ++	delete [] _M_data->_M_curr_symbol;
240.2078 ++      delete _M_data;
240.2079 ++    }
240.2080 ++
240.2081 ++  template<> 
240.2082 ++    moneypunct<wchar_t, false>::~moneypunct()
240.2083 ++    {
240.2084 ++      if (_M_data->_M_positive_sign_size)
240.2085 ++	delete [] _M_data->_M_positive_sign;
240.2086 ++      if (_M_data->_M_negative_sign_size
240.2087 ++          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
240.2088 ++	delete [] _M_data->_M_negative_sign;
240.2089 ++      if (_M_data->_M_curr_symbol_size)
240.2090 ++	delete [] _M_data->_M_curr_symbol;
240.2091 ++      delete _M_data;
240.2092 ++    }
240.2093 ++#endif
240.2094 ++}
240.2095 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc
240.2096 +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc	1969-12-31 18:00:00.000000000 -0600
240.2097 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc	2004-09-10 10:47:40.000000000 -0500
240.2098 +@@ -0,0 +1,183 @@
240.2099 ++// std::numpunct implementation details, GNU version -*- C++ -*-
240.2100 ++
240.2101 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
240.2102 ++//
240.2103 ++// This file is part of the GNU ISO C++ Library.  This library is free
240.2104 ++// software; you can redistribute it and/or modify it under the
240.2105 ++// terms of the GNU General Public License as published by the
240.2106 ++// Free Software Foundation; either version 2, or (at your option)
240.2107 ++// any later version.
240.2108 ++
240.2109 ++// This library is distributed in the hope that it will be useful,
240.2110 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
240.2111 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
240.2112 ++// GNU General Public License for more details.
240.2113 ++
240.2114 ++// You should have received a copy of the GNU General Public License along
240.2115 ++// with this library; see the file COPYING.  If not, write to the Free
240.2116 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
240.2117 ++// USA.
240.2118 ++
240.2119 ++// As a special exception, you may use this file as part of a free software
240.2120 ++// library without restriction.  Specifically, if other files instantiate
240.2121 ++// templates or use macros or inline functions from this file, or you compile
240.2122 ++// this file and link it with other files to produce an executable, this
240.2123 ++// file does not by itself cause the resulting executable to be covered by
240.2124 ++// the GNU General Public License.  This exception does not however
240.2125 ++// invalidate any other reasons why the executable file might be covered by
240.2126 ++// the GNU General Public License.
240.2127 ++
240.2128 ++//
240.2129 ++// ISO C++ 14882: 22.2.3.1.2  numpunct virtual functions
240.2130 ++//
240.2131 ++
240.2132 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
240.2133 ++
240.2134 ++#define _LIBC
240.2135 ++#include <locale>
240.2136 ++#undef _LIBC
240.2137 ++#include <bits/c++locale_internal.h>
240.2138 ++
240.2139 ++#ifdef __UCLIBC_MJN3_ONLY__
240.2140 ++#warning tailor for stub locale support
240.2141 ++#endif
240.2142 ++#ifndef __UCLIBC_HAS_XLOCALE__
240.2143 ++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
240.2144 ++#endif
240.2145 ++
240.2146 ++namespace std
240.2147 ++{
240.2148 ++  template<> 
240.2149 ++    void
240.2150 ++    numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
240.2151 ++    {
240.2152 ++      if (!_M_data)
240.2153 ++	_M_data = new __numpunct_cache<char>;
240.2154 ++
240.2155 ++      if (!__cloc)
240.2156 ++	{
240.2157 ++	  // "C" locale
240.2158 ++	  _M_data->_M_grouping = "";
240.2159 ++	  _M_data->_M_grouping_size = 0;
240.2160 ++	  _M_data->_M_use_grouping = false;
240.2161 ++
240.2162 ++	  _M_data->_M_decimal_point = '.';
240.2163 ++	  _M_data->_M_thousands_sep = ',';
240.2164 ++
240.2165 ++	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
240.2166 ++	    _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
240.2167 ++
240.2168 ++	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
240.2169 ++	    _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
240.2170 ++	}
240.2171 ++      else
240.2172 ++	{
240.2173 ++	  // Named locale.
240.2174 ++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, 
240.2175 ++							__cloc));
240.2176 ++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, 
240.2177 ++							__cloc));
240.2178 ++
240.2179 ++	  // Check for NULL, which implies no grouping.
240.2180 ++	  if (_M_data->_M_thousands_sep == '\0')
240.2181 ++	    _M_data->_M_grouping = "";
240.2182 ++	  else
240.2183 ++	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
240.2184 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
240.2185 ++	}
240.2186 ++
240.2187 ++      // NB: There is no way to extact this info from posix locales.
240.2188 ++      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
240.2189 ++      _M_data->_M_truename = "true";
240.2190 ++      _M_data->_M_truename_size = strlen(_M_data->_M_truename);
240.2191 ++      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
240.2192 ++      _M_data->_M_falsename = "false";
240.2193 ++      _M_data->_M_falsename_size = strlen(_M_data->_M_falsename);
240.2194 ++    }
240.2195 ++ 
240.2196 ++  template<> 
240.2197 ++    numpunct<char>::~numpunct()
240.2198 ++    { delete _M_data; }
240.2199 ++   
240.2200 ++#ifdef _GLIBCXX_USE_WCHAR_T
240.2201 ++  template<> 
240.2202 ++    void
240.2203 ++    numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
240.2204 ++    {
240.2205 ++      if (!_M_data)
240.2206 ++	_M_data = new __numpunct_cache<wchar_t>;
240.2207 ++
240.2208 ++      if (!__cloc)
240.2209 ++	{
240.2210 ++	  // "C" locale
240.2211 ++	  _M_data->_M_grouping = "";
240.2212 ++	  _M_data->_M_grouping_size = 0;
240.2213 ++	  _M_data->_M_use_grouping = false;
240.2214 ++
240.2215 ++	  _M_data->_M_decimal_point = L'.';
240.2216 ++	  _M_data->_M_thousands_sep = L',';
240.2217 ++
240.2218 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.2219 ++	  __c_locale __old = __uselocale(_S_get_c_locale());
240.2220 ++#endif
240.2221 ++	  // Use ctype::widen code without the facet...
240.2222 ++	  unsigned char uc;
240.2223 ++	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
240.2224 ++	    {
240.2225 ++	      uc = static_cast<unsigned char>(__num_base::_S_atoms_out[__i]);
240.2226 ++	      _M_data->_M_atoms_out[__i] = btowc(uc);
240.2227 ++	    }
240.2228 ++
240.2229 ++	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
240.2230 ++	    {
240.2231 ++	      uc = static_cast<unsigned char>(__num_base::_S_atoms_in[__j]);
240.2232 ++	      _M_data->_M_atoms_in[__j] = btowc(uc);
240.2233 ++	    }
240.2234 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.2235 ++	  __uselocale(__old);
240.2236 ++#endif
240.2237 ++	}
240.2238 ++      else
240.2239 ++	{
240.2240 ++	  // Named locale.
240.2241 ++#ifdef __UCLIBC_MJN3_ONLY__
240.2242 ++#warning fix this
240.2243 ++#endif
240.2244 ++#ifdef __UCLIBC__
240.2245 ++# ifdef __UCLIBC_HAS_XLOCALE__
240.2246 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
240.2247 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
240.2248 ++# else
240.2249 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
240.2250 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
240.2251 ++# endif
240.2252 ++#else
240.2253 ++	  union __s_and_w { const char *__s; unsigned int __w; } __u;
240.2254 ++	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
240.2255 ++	  _M_data->_M_decimal_point = static_cast<wchar_t>(__u.__w);
240.2256 ++
240.2257 ++	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
240.2258 ++	  _M_data->_M_thousands_sep = static_cast<wchar_t>(__u.__w);
240.2259 ++#endif
240.2260 ++
240.2261 ++	  if (_M_data->_M_thousands_sep == L'\0')
240.2262 ++	    _M_data->_M_grouping = "";
240.2263 ++	  else
240.2264 ++	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
240.2265 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
240.2266 ++	}
240.2267 ++
240.2268 ++      // NB: There is no way to extact this info from posix locales.
240.2269 ++      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
240.2270 ++      _M_data->_M_truename = L"true";
240.2271 ++      _M_data->_M_truename_size = wcslen(_M_data->_M_truename);
240.2272 ++      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
240.2273 ++      _M_data->_M_falsename = L"false";
240.2274 ++      _M_data->_M_falsename_size = wcslen(_M_data->_M_falsename);
240.2275 ++    }
240.2276 ++
240.2277 ++  template<> 
240.2278 ++    numpunct<wchar_t>::~numpunct()
240.2279 ++    { delete _M_data; }
240.2280 ++ #endif
240.2281 ++}
240.2282 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.cc
240.2283 +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.cc	1969-12-31 18:00:00.000000000 -0600
240.2284 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.cc	2004-09-10 10:48:00.000000000 -0500
240.2285 +@@ -0,0 +1,356 @@
240.2286 ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
240.2287 ++
240.2288 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
240.2289 ++//
240.2290 ++// This file is part of the GNU ISO C++ Library.  This library is free
240.2291 ++// software; you can redistribute it and/or modify it under the
240.2292 ++// terms of the GNU General Public License as published by the
240.2293 ++// Free Software Foundation; either version 2, or (at your option)
240.2294 ++// any later version.
240.2295 ++
240.2296 ++// This library is distributed in the hope that it will be useful,
240.2297 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
240.2298 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
240.2299 ++// GNU General Public License for more details.
240.2300 ++
240.2301 ++// You should have received a copy of the GNU General Public License along
240.2302 ++// with this library; see the file COPYING.  If not, write to the Free
240.2303 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
240.2304 ++// USA.
240.2305 ++
240.2306 ++// As a special exception, you may use this file as part of a free software
240.2307 ++// library without restriction.  Specifically, if other files instantiate
240.2308 ++// templates or use macros or inline functions from this file, or you compile
240.2309 ++// this file and link it with other files to produce an executable, this
240.2310 ++// file does not by itself cause the resulting executable to be covered by
240.2311 ++// the GNU General Public License.  This exception does not however
240.2312 ++// invalidate any other reasons why the executable file might be covered by
240.2313 ++// the GNU General Public License.
240.2314 ++
240.2315 ++//
240.2316 ++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
240.2317 ++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
240.2318 ++//
240.2319 ++
240.2320 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
240.2321 ++
240.2322 ++#include <locale>
240.2323 ++#include <bits/c++locale_internal.h>
240.2324 ++
240.2325 ++#ifdef __UCLIBC_MJN3_ONLY__
240.2326 ++#warning tailor for stub locale support
240.2327 ++#endif
240.2328 ++#ifndef __UCLIBC_HAS_XLOCALE__
240.2329 ++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
240.2330 ++#endif
240.2331 ++
240.2332 ++namespace std
240.2333 ++{
240.2334 ++  template<>
240.2335 ++    void
240.2336 ++    __timepunct<char>::
240.2337 ++    _M_put(char* __s, size_t __maxlen, const char* __format, 
240.2338 ++	   const tm* __tm) const
240.2339 ++    {
240.2340 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.2341 ++      const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
240.2342 ++					_M_c_locale_timepunct);
240.2343 ++#else
240.2344 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
240.2345 ++      setlocale(LC_ALL, _M_name_timepunct);
240.2346 ++      const size_t __len = strftime(__s, __maxlen, __format, __tm);
240.2347 ++      setlocale(LC_ALL, __old);
240.2348 ++      free(__old);
240.2349 ++#endif
240.2350 ++      // Make sure __s is null terminated.
240.2351 ++      if (__len == 0)
240.2352 ++	__s[0] = '\0';
240.2353 ++    }
240.2354 ++
240.2355 ++  template<> 
240.2356 ++    void
240.2357 ++    __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
240.2358 ++    {
240.2359 ++      if (!_M_data)
240.2360 ++	_M_data = new __timepunct_cache<char>;
240.2361 ++
240.2362 ++      if (!__cloc)
240.2363 ++	{
240.2364 ++	  // "C" locale
240.2365 ++	  _M_c_locale_timepunct = _S_get_c_locale();
240.2366 ++
240.2367 ++	  _M_data->_M_date_format = "%m/%d/%y";
240.2368 ++	  _M_data->_M_date_era_format = "%m/%d/%y";
240.2369 ++	  _M_data->_M_time_format = "%H:%M:%S";
240.2370 ++	  _M_data->_M_time_era_format = "%H:%M:%S";
240.2371 ++	  _M_data->_M_date_time_format = "";
240.2372 ++	  _M_data->_M_date_time_era_format = "";
240.2373 ++	  _M_data->_M_am = "AM";
240.2374 ++	  _M_data->_M_pm = "PM";
240.2375 ++	  _M_data->_M_am_pm_format = "";
240.2376 ++
240.2377 ++	  // Day names, starting with "C"'s Sunday.
240.2378 ++	  _M_data->_M_day1 = "Sunday";
240.2379 ++	  _M_data->_M_day2 = "Monday";
240.2380 ++	  _M_data->_M_day3 = "Tuesday";
240.2381 ++	  _M_data->_M_day4 = "Wednesday";
240.2382 ++	  _M_data->_M_day5 = "Thursday";
240.2383 ++	  _M_data->_M_day6 = "Friday";
240.2384 ++	  _M_data->_M_day7 = "Saturday";
240.2385 ++
240.2386 ++	  // Abbreviated day names, starting with "C"'s Sun.
240.2387 ++	  _M_data->_M_aday1 = "Sun";
240.2388 ++	  _M_data->_M_aday2 = "Mon";
240.2389 ++	  _M_data->_M_aday3 = "Tue";
240.2390 ++	  _M_data->_M_aday4 = "Wed";
240.2391 ++	  _M_data->_M_aday5 = "Thu";
240.2392 ++	  _M_data->_M_aday6 = "Fri";
240.2393 ++	  _M_data->_M_aday7 = "Sat";
240.2394 ++
240.2395 ++	  // Month names, starting with "C"'s January.
240.2396 ++	  _M_data->_M_month01 = "January";
240.2397 ++	  _M_data->_M_month02 = "February";
240.2398 ++	  _M_data->_M_month03 = "March";
240.2399 ++	  _M_data->_M_month04 = "April";
240.2400 ++	  _M_data->_M_month05 = "May";
240.2401 ++	  _M_data->_M_month06 = "June";
240.2402 ++	  _M_data->_M_month07 = "July";
240.2403 ++	  _M_data->_M_month08 = "August";
240.2404 ++	  _M_data->_M_month09 = "September";
240.2405 ++	  _M_data->_M_month10 = "October";
240.2406 ++	  _M_data->_M_month11 = "November";
240.2407 ++	  _M_data->_M_month12 = "December";
240.2408 ++
240.2409 ++	  // Abbreviated month names, starting with "C"'s Jan.
240.2410 ++	  _M_data->_M_amonth01 = "Jan";
240.2411 ++	  _M_data->_M_amonth02 = "Feb";
240.2412 ++	  _M_data->_M_amonth03 = "Mar";
240.2413 ++	  _M_data->_M_amonth04 = "Apr";
240.2414 ++	  _M_data->_M_amonth05 = "May";
240.2415 ++	  _M_data->_M_amonth06 = "Jun";
240.2416 ++	  _M_data->_M_amonth07 = "Jul";
240.2417 ++	  _M_data->_M_amonth08 = "Aug";
240.2418 ++	  _M_data->_M_amonth09 = "Sep";
240.2419 ++	  _M_data->_M_amonth10 = "Oct";
240.2420 ++	  _M_data->_M_amonth11 = "Nov";
240.2421 ++	  _M_data->_M_amonth12 = "Dec";
240.2422 ++	}
240.2423 ++      else
240.2424 ++	{
240.2425 ++	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
240.2426 ++
240.2427 ++	  _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
240.2428 ++	  _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
240.2429 ++	  _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
240.2430 ++	  _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
240.2431 ++	  _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
240.2432 ++	  _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, __cloc);
240.2433 ++	  _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
240.2434 ++	  _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
240.2435 ++	  _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
240.2436 ++
240.2437 ++	  // Day names, starting with "C"'s Sunday.
240.2438 ++	  _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
240.2439 ++	  _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
240.2440 ++	  _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
240.2441 ++	  _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
240.2442 ++	  _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
240.2443 ++	  _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
240.2444 ++	  _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
240.2445 ++
240.2446 ++	  // Abbreviated day names, starting with "C"'s Sun.
240.2447 ++	  _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
240.2448 ++	  _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
240.2449 ++	  _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
240.2450 ++	  _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
240.2451 ++	  _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
240.2452 ++	  _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
240.2453 ++	  _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
240.2454 ++
240.2455 ++	  // Month names, starting with "C"'s January.
240.2456 ++	  _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
240.2457 ++	  _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
240.2458 ++	  _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
240.2459 ++	  _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
240.2460 ++	  _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
240.2461 ++	  _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
240.2462 ++	  _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
240.2463 ++	  _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
240.2464 ++	  _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
240.2465 ++	  _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
240.2466 ++	  _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
240.2467 ++	  _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
240.2468 ++
240.2469 ++	  // Abbreviated month names, starting with "C"'s Jan.
240.2470 ++	  _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
240.2471 ++	  _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
240.2472 ++	  _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
240.2473 ++	  _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
240.2474 ++	  _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
240.2475 ++	  _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
240.2476 ++	  _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
240.2477 ++	  _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
240.2478 ++	  _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
240.2479 ++	  _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
240.2480 ++	  _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
240.2481 ++	  _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
240.2482 ++	}
240.2483 ++    }
240.2484 ++
240.2485 ++#ifdef _GLIBCXX_USE_WCHAR_T
240.2486 ++  template<>
240.2487 ++    void
240.2488 ++    __timepunct<wchar_t>::
240.2489 ++    _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, 
240.2490 ++	   const tm* __tm) const
240.2491 ++    {
240.2492 ++#ifdef __UCLIBC_HAS_XLOCALE__
240.2493 ++      __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
240.2494 ++      const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
240.2495 ++					_M_c_locale_timepunct);
240.2496 ++#else
240.2497 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
240.2498 ++      setlocale(LC_ALL, _M_name_timepunct);
240.2499 ++      const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
240.2500 ++      setlocale(LC_ALL, __old);
240.2501 ++      free(__old);
240.2502 ++#endif
240.2503 ++      // Make sure __s is null terminated.
240.2504 ++      if (__len == 0)
240.2505 ++	__s[0] = L'\0';
240.2506 ++    }
240.2507 ++
240.2508 ++  template<> 
240.2509 ++    void
240.2510 ++    __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
240.2511 ++    {
240.2512 ++      if (!_M_data)
240.2513 ++	_M_data = new __timepunct_cache<wchar_t>;
240.2514 ++
240.2515 ++#warning wide time stuff
240.2516 ++//       if (!__cloc)
240.2517 ++	{
240.2518 ++	  // "C" locale
240.2519 ++	  _M_c_locale_timepunct = _S_get_c_locale();
240.2520 ++
240.2521 ++	  _M_data->_M_date_format = L"%m/%d/%y";
240.2522 ++	  _M_data->_M_date_era_format = L"%m/%d/%y";
240.2523 ++	  _M_data->_M_time_format = L"%H:%M:%S";
240.2524 ++	  _M_data->_M_time_era_format = L"%H:%M:%S";
240.2525 ++	  _M_data->_M_date_time_format = L"";
240.2526 ++	  _M_data->_M_date_time_era_format = L"";
240.2527 ++	  _M_data->_M_am = L"AM";
240.2528 ++	  _M_data->_M_pm = L"PM";
240.2529 ++	  _M_data->_M_am_pm_format = L"";
240.2530 ++
240.2531 ++	  // Day names, starting with "C"'s Sunday.
240.2532 ++	  _M_data->_M_day1 = L"Sunday";
240.2533 ++	  _M_data->_M_day2 = L"Monday";
240.2534 ++	  _M_data->_M_day3 = L"Tuesday";
240.2535 ++	  _M_data->_M_day4 = L"Wednesday";
240.2536 ++	  _M_data->_M_day5 = L"Thursday";
240.2537 ++	  _M_data->_M_day6 = L"Friday";
240.2538 ++	  _M_data->_M_day7 = L"Saturday";
240.2539 ++
240.2540 ++	  // Abbreviated day names, starting with "C"'s Sun.
240.2541 ++	  _M_data->_M_aday1 = L"Sun";
240.2542 ++	  _M_data->_M_aday2 = L"Mon";
240.2543 ++	  _M_data->_M_aday3 = L"Tue";
240.2544 ++	  _M_data->_M_aday4 = L"Wed";
240.2545 ++	  _M_data->_M_aday5 = L"Thu";
240.2546 ++	  _M_data->_M_aday6 = L"Fri";
240.2547 ++	  _M_data->_M_aday7 = L"Sat";
240.2548 ++
240.2549 ++	  // Month names, starting with "C"'s January.
240.2550 ++	  _M_data->_M_month01 = L"January";
240.2551 ++	  _M_data->_M_month02 = L"February";
240.2552 ++	  _M_data->_M_month03 = L"March";
240.2553 ++	  _M_data->_M_month04 = L"April";
240.2554 ++	  _M_data->_M_month05 = L"May";
240.2555 ++	  _M_data->_M_month06 = L"June";
240.2556 ++	  _M_data->_M_month07 = L"July";
240.2557 ++	  _M_data->_M_month08 = L"August";
240.2558 ++	  _M_data->_M_month09 = L"September";
240.2559 ++	  _M_data->_M_month10 = L"October";
240.2560 ++	  _M_data->_M_month11 = L"November";
240.2561 ++	  _M_data->_M_month12 = L"December";
240.2562 ++
240.2563 ++	  // Abbreviated month names, starting with "C"'s Jan.
240.2564 ++	  _M_data->_M_amonth01 = L"Jan";
240.2565 ++	  _M_data->_M_amonth02 = L"Feb";
240.2566 ++	  _M_data->_M_amonth03 = L"Mar";
240.2567 ++	  _M_data->_M_amonth04 = L"Apr";
240.2568 ++	  _M_data->_M_amonth05 = L"May";
240.2569 ++	  _M_data->_M_amonth06 = L"Jun";
240.2570 ++	  _M_data->_M_amonth07 = L"Jul";
240.2571 ++	  _M_data->_M_amonth08 = L"Aug";
240.2572 ++	  _M_data->_M_amonth09 = L"Sep";
240.2573 ++	  _M_data->_M_amonth10 = L"Oct";
240.2574 ++	  _M_data->_M_amonth11 = L"Nov";
240.2575 ++	  _M_data->_M_amonth12 = L"Dec";
240.2576 ++	}
240.2577 ++#if 0
240.2578 ++      else
240.2579 ++	{
240.2580 ++	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
240.2581 ++
240.2582 ++	  _M_data->_M_date_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_FMT, __cloc));
240.2583 ++	  _M_data->_M_date_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_FMT, __cloc));
240.2584 ++	  _M_data->_M_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT, __cloc));
240.2585 ++	  _M_data->_M_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_T_FMT, __cloc));
240.2586 ++	  _M_data->_M_date_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_T_FMT, __cloc));
240.2587 ++	  _M_data->_M_date_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc));
240.2588 ++	  _M_data->_M_am = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WAM_STR, __cloc));
240.2589 ++	  _M_data->_M_pm = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WPM_STR, __cloc));
240.2590 ++	  _M_data->_M_am_pm_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc));
240.2591 ++
240.2592 ++	  // Day names, starting with "C"'s Sunday.
240.2593 ++	  _M_data->_M_day1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_1, __cloc));
240.2594 ++	  _M_data->_M_day2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_2, __cloc));
240.2595 ++	  _M_data->_M_day3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_3, __cloc));
240.2596 ++	  _M_data->_M_day4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_4, __cloc));
240.2597 ++	  _M_data->_M_day5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_5, __cloc));
240.2598 ++	  _M_data->_M_day6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_6, __cloc));
240.2599 ++	  _M_data->_M_day7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_7, __cloc));
240.2600 ++
240.2601 ++	  // Abbreviated day names, starting with "C"'s Sun.
240.2602 ++	  _M_data->_M_aday1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_1, __cloc));
240.2603 ++	  _M_data->_M_aday2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_2, __cloc));
240.2604 ++	  _M_data->_M_aday3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_3, __cloc));
240.2605 ++	  _M_data->_M_aday4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_4, __cloc));
240.2606 ++	  _M_data->_M_aday5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_5, __cloc));
240.2607 ++	  _M_data->_M_aday6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_6, __cloc));
240.2608 ++	  _M_data->_M_aday7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_7, __cloc));
240.2609 ++
240.2610 ++	  // Month names, starting with "C"'s January.
240.2611 ++	  _M_data->_M_month01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_1, __cloc));
240.2612 ++	  _M_data->_M_month02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_2, __cloc));
240.2613 ++	  _M_data->_M_month03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_3, __cloc));
240.2614 ++	  _M_data->_M_month04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_4, __cloc));
240.2615 ++	  _M_data->_M_month05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_5, __cloc));
240.2616 ++	  _M_data->_M_month06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_6, __cloc));
240.2617 ++	  _M_data->_M_month07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_7, __cloc));
240.2618 ++	  _M_data->_M_month08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_8, __cloc));
240.2619 ++	  _M_data->_M_month09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_9, __cloc));
240.2620 ++	  _M_data->_M_month10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_10, __cloc));
240.2621 ++	  _M_data->_M_month11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_11, __cloc));
240.2622 ++	  _M_data->_M_month12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_12, __cloc));
240.2623 ++
240.2624 ++	  // Abbreviated month names, starting with "C"'s Jan.
240.2625 ++	  _M_data->_M_amonth01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_1, __cloc));
240.2626 ++	  _M_data->_M_amonth02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_2, __cloc));
240.2627 ++	  _M_data->_M_amonth03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_3, __cloc));
240.2628 ++	  _M_data->_M_amonth04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_4, __cloc));
240.2629 ++	  _M_data->_M_amonth05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_5, __cloc));
240.2630 ++	  _M_data->_M_amonth06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_6, __cloc));
240.2631 ++	  _M_data->_M_amonth07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_7, __cloc));
240.2632 ++	  _M_data->_M_amonth08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_8, __cloc));
240.2633 ++	  _M_data->_M_amonth09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_9, __cloc));
240.2634 ++	  _M_data->_M_amonth10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_10, __cloc));
240.2635 ++	  _M_data->_M_amonth11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_11, __cloc));
240.2636 ++	  _M_data->_M_amonth12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_12, __cloc));
240.2637 ++	}
240.2638 ++#endif // 0
240.2639 ++    }
240.2640 ++#endif
240.2641 ++}
240.2642 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.h gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.h
240.2643 +--- gcc-3.4.2-dist/libstdc++-v3/config/locale/uclibc/time_members.h	1969-12-31 18:00:00.000000000 -0600
240.2644 ++++ gcc-3.4.2/libstdc++-v3/config/locale/uclibc/time_members.h	2004-09-10 10:47:40.000000000 -0500
240.2645 +@@ -0,0 +1,68 @@
240.2646 ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
240.2647 ++
240.2648 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
240.2649 ++//
240.2650 ++// This file is part of the GNU ISO C++ Library.  This library is free
240.2651 ++// software; you can redistribute it and/or modify it under the
240.2652 ++// terms of the GNU General Public License as published by the
240.2653 ++// Free Software Foundation; either version 2, or (at your option)
240.2654 ++// any later version.
240.2655 ++
240.2656 ++// This library is distributed in the hope that it will be useful,
240.2657 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
240.2658 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
240.2659 ++// GNU General Public License for more details.
240.2660 ++
240.2661 ++// You should have received a copy of the GNU General Public License along
240.2662 ++// with this library; see the file COPYING.  If not, write to the Free
240.2663 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
240.2664 ++// USA.
240.2665 ++
240.2666 ++// As a special exception, you may use this file as part of a free software
240.2667 ++// library without restriction.  Specifically, if other files instantiate
240.2668 ++// templates or use macros or inline functions from this file, or you compile
240.2669 ++// this file and link it with other files to produce an executable, this
240.2670 ++// file does not by itself cause the resulting executable to be covered by
240.2671 ++// the GNU General Public License.  This exception does not however
240.2672 ++// invalidate any other reasons why the executable file might be covered by
240.2673 ++// the GNU General Public License.
240.2674 ++
240.2675 ++//
240.2676 ++// ISO C++ 14882: 22.2.5.1.2 - time_get functions
240.2677 ++// ISO C++ 14882: 22.2.5.3.2 - time_put functions
240.2678 ++//
240.2679 ++
240.2680 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
240.2681 ++
240.2682 ++  template<typename _CharT>
240.2683 ++    __timepunct<_CharT>::__timepunct(size_t __refs) 
240.2684 ++    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
240.2685 ++    _M_name_timepunct(_S_get_c_name())
240.2686 ++    { _M_initialize_timepunct(); }
240.2687 ++
240.2688 ++  template<typename _CharT>
240.2689 ++    __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) 
240.2690 ++    : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), 
240.2691 ++    _M_name_timepunct(_S_get_c_name())
240.2692 ++    { _M_initialize_timepunct(); }
240.2693 ++
240.2694 ++  template<typename _CharT>
240.2695 ++    __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
240.2696 ++				     size_t __refs) 
240.2697 ++    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
240.2698 ++    _M_name_timepunct(__s)
240.2699 ++    { 
240.2700 ++      char* __tmp = new char[std::strlen(__s) + 1];
240.2701 ++      std::strcpy(__tmp, __s);
240.2702 ++      _M_name_timepunct = __tmp;
240.2703 ++      _M_initialize_timepunct(__cloc); 
240.2704 ++    }
240.2705 ++
240.2706 ++  template<typename _CharT>
240.2707 ++    __timepunct<_CharT>::~__timepunct()
240.2708 ++    { 
240.2709 ++      if (_M_name_timepunct != _S_get_c_name())
240.2710 ++	delete [] _M_name_timepunct;
240.2711 ++      delete _M_data; 
240.2712 ++      _S_destroy_c_locale(_M_c_locale_timepunct); 
240.2713 ++    }
240.2714 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_base.h
240.2715 +--- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_base.h	1969-12-31 18:00:00.000000000 -0600
240.2716 ++++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_base.h	2004-09-10 10:47:40.000000000 -0500
240.2717 +@@ -0,0 +1,58 @@
240.2718 ++// Locale support -*- C++ -*-
240.2719 ++
240.2720 ++// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
240.2721 ++// Free Software Foundation, Inc.
240.2722 ++//
240.2723 ++// This file is part of the GNU ISO C++ Library.  This library is free
240.2724 ++// software; you can redistribute it and/or modify it under the
240.2725 ++// terms of the GNU General Public License as published by the
240.2726 ++// Free Software Foundation; either version 2, or (at your option)
240.2727 ++// any later version.
240.2728 ++
240.2729 ++// This library is distributed in the hope that it will be useful,
240.2730 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
240.2731 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
240.2732 ++// GNU General Public License for more details.
240.2733 ++
240.2734 ++// You should have received a copy of the GNU General Public License along
240.2735 ++// with this library; see the file COPYING.  If not, write to the Free
240.2736 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
240.2737 ++// USA.
240.2738 ++
240.2739 ++// As a special exception, you may use this file as part of a free software
240.2740 ++// library without restriction.  Specifically, if other files instantiate
240.2741 ++// templates or use macros or inline functions from this file, or you compile
240.2742 ++// this file and link it with other files to produce an executable, this
240.2743 ++// file does not by itself cause the resulting executable to be covered by
240.2744 ++// the GNU General Public License.  This exception does not however
240.2745 ++// invalidate any other reasons why the executable file might be covered by
240.2746 ++// the GNU General Public License.
240.2747 ++
240.2748 ++//
240.2749 ++// ISO C++ 14882: 22.1  Locales
240.2750 ++//
240.2751 ++  
240.2752 ++// Information as gleaned from /usr/include/ctype.h
240.2753 ++  
240.2754 ++  struct ctype_base
240.2755 ++  {
240.2756 ++    // Note: In uClibc, the following two types depend on configuration.
240.2757 ++ 
240.2758 ++    // Non-standard typedefs.
240.2759 ++    typedef const __ctype_touplow_t* __to_type;
240.2760 ++
240.2761 ++    // NB: Offsets into ctype<char>::_M_table force a particular size
240.2762 ++    // on the mask type. Because of this, we don't use an enum.
240.2763 ++    typedef __ctype_mask_t	mask;   
240.2764 ++    static const mask upper    	= _ISupper;
240.2765 ++    static const mask lower 	= _ISlower;
240.2766 ++    static const mask alpha 	= _ISalpha;
240.2767 ++    static const mask digit 	= _ISdigit;
240.2768 ++    static const mask xdigit 	= _ISxdigit;
240.2769 ++    static const mask space 	= _ISspace;
240.2770 ++    static const mask print 	= _ISprint;
240.2771 ++    static const mask graph 	= _ISalpha | _ISdigit | _ISpunct;
240.2772 ++    static const mask cntrl 	= _IScntrl;
240.2773 ++    static const mask punct 	= _ISpunct;
240.2774 ++    static const mask alnum 	= _ISalpha | _ISdigit;
240.2775 ++  };
240.2776 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_inline.h
240.2777 +--- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h	1969-12-31 18:00:00.000000000 -0600
240.2778 ++++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_inline.h	2004-09-10 10:47:40.000000000 -0500
240.2779 +@@ -0,0 +1,69 @@
240.2780 ++// Locale support -*- C++ -*-
240.2781 ++
240.2782 ++// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
240.2783 ++//
240.2784 ++// This file is part of the GNU ISO C++ Library.  This library is free
240.2785 ++// software; you can redistribute it and/or modify it under the
240.2786 ++// terms of the GNU General Public License as published by the
240.2787 ++// Free Software Foundation; either version 2, or (at your option)
240.2788 ++// any later version.
240.2789 ++
240.2790 ++// This library is distributed in the hope that it will be useful,
240.2791 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
240.2792 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
240.2793 ++// GNU General Public License for more details.
240.2794 ++
240.2795 ++// You should have received a copy of the GNU General Public License along
240.2796 ++// with this library; see the file COPYING.  If not, write to the Free
240.2797 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
240.2798 ++// USA.
240.2799 ++
240.2800 ++// As a special exception, you may use this file as part of a free software
240.2801 ++// library without restriction.  Specifically, if other files instantiate
240.2802 ++// templates or use macros or inline functions from this file, or you compile
240.2803 ++// this file and link it with other files to produce an executable, this
240.2804 ++// file does not by itself cause the resulting executable to be covered by
240.2805 ++// the GNU General Public License.  This exception does not however
240.2806 ++// invalidate any other reasons why the executable file might be covered by
240.2807 ++// the GNU General Public License.
240.2808 ++
240.2809 ++//
240.2810 ++// ISO C++ 14882: 22.1  Locales
240.2811 ++//
240.2812 ++  
240.2813 ++// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
240.2814 ++// functions go in ctype.cc
240.2815 ++  
240.2816 ++  bool
240.2817 ++  ctype<char>::
240.2818 ++  is(mask __m, char __c) const
240.2819 ++  { return _M_table[static_cast<unsigned char>(__c)] & __m; }
240.2820 ++
240.2821 ++  const char*
240.2822 ++  ctype<char>::
240.2823 ++  is(const char* __low, const char* __high, mask* __vec) const
240.2824 ++  {
240.2825 ++    while (__low < __high)
240.2826 ++      *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
240.2827 ++    return __high;
240.2828 ++  }
240.2829 ++
240.2830 ++  const char*
240.2831 ++  ctype<char>::
240.2832 ++  scan_is(mask __m, const char* __low, const char* __high) const
240.2833 ++  {
240.2834 ++    while (__low < __high 
240.2835 ++	   && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
240.2836 ++      ++__low;
240.2837 ++    return __low;
240.2838 ++  }
240.2839 ++
240.2840 ++  const char*
240.2841 ++  ctype<char>::
240.2842 ++  scan_not(mask __m, const char* __low, const char* __high) const
240.2843 ++  {
240.2844 ++    while (__low < __high 
240.2845 ++	   && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
240.2846 ++      ++__low;
240.2847 ++    return __low;
240.2848 ++  }
240.2849 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_noninline.h
240.2850 +--- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h	1969-12-31 18:00:00.000000000 -0600
240.2851 ++++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/ctype_noninline.h	2004-09-10 10:47:40.000000000 -0500
240.2852 +@@ -0,0 +1,92 @@
240.2853 ++// Locale support -*- C++ -*-
240.2854 ++
240.2855 ++// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
240.2856 ++// Free Software Foundation, Inc.
240.2857 ++//
240.2858 ++// This file is part of the GNU ISO C++ Library.  This library is free
240.2859 ++// software; you can redistribute it and/or modify it under the
240.2860 ++// terms of the GNU General Public License as published by the
240.2861 ++// Free Software Foundation; either version 2, or (at your option)
240.2862 ++// any later version.
240.2863 ++
240.2864 ++// This library is distributed in the hope that it will be useful,
240.2865 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
240.2866 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
240.2867 ++// GNU General Public License for more details.
240.2868 ++
240.2869 ++// You should have received a copy of the GNU General Public License along
240.2870 ++// with this library; see the file COPYING.  If not, write to the Free
240.2871 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
240.2872 ++// USA.
240.2873 ++
240.2874 ++// As a special exception, you may use this file as part of a free software
240.2875 ++// library without restriction.  Specifically, if other files instantiate
240.2876 ++// templates or use macros or inline functions from this file, or you compile
240.2877 ++// this file and link it with other files to produce an executable, this
240.2878 ++// file does not by itself cause the resulting executable to be covered by
240.2879 ++// the GNU General Public License.  This exception does not however
240.2880 ++// invalidate any other reasons why the executable file might be covered by
240.2881 ++// the GNU General Public License.
240.2882 ++
240.2883 ++//
240.2884 ++// ISO C++ 14882: 22.1  Locales
240.2885 ++//
240.2886 ++  
240.2887 ++// Information as gleaned from /usr/include/ctype.h
240.2888 ++
240.2889 ++  const ctype_base::mask*
240.2890 ++  ctype<char>::classic_table() throw()
240.2891 ++  { return __C_ctype_b; }
240.2892 ++
240.2893 ++  ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
240.2894 ++		     size_t __refs) 
240.2895 ++  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
240.2896 ++  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
240.2897 ++  {
240.2898 ++    _M_toupper = __C_ctype_toupper;
240.2899 ++    _M_tolower = __C_ctype_tolower;
240.2900 ++    _M_table = __table ? __table : __C_ctype_b;
240.2901 ++    memset(_M_widen, 0, sizeof(_M_widen));
240.2902 ++    memset(_M_narrow, 0, sizeof(_M_narrow));
240.2903 ++  }
240.2904 ++
240.2905 ++  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
240.2906 ++  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
240.2907 ++  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
240.2908 ++  {
240.2909 ++    _M_toupper = __C_ctype_toupper;
240.2910 ++    _M_tolower = __C_ctype_tolower;
240.2911 ++    _M_table = __table ? __table : __C_ctype_b;
240.2912 ++    memset(_M_widen, 0, sizeof(_M_widen));
240.2913 ++    memset(_M_narrow, 0, sizeof(_M_narrow));
240.2914 ++  }
240.2915 ++
240.2916 ++  char
240.2917 ++  ctype<char>::do_toupper(char __c) const
240.2918 ++  { return _M_toupper[static_cast<unsigned char>(__c)]; }
240.2919 ++
240.2920 ++  const char*
240.2921 ++  ctype<char>::do_toupper(char* __low, const char* __high) const
240.2922 ++  {
240.2923 ++    while (__low < __high)
240.2924 ++      {
240.2925 ++	*__low = _M_toupper[static_cast<unsigned char>(*__low)];
240.2926 ++	++__low;
240.2927 ++      }
240.2928 ++    return __high;
240.2929 ++  }
240.2930 ++
240.2931 ++  char
240.2932 ++  ctype<char>::do_tolower(char __c) const
240.2933 ++  { return _M_tolower[static_cast<unsigned char>(__c)]; }
240.2934 ++
240.2935 ++  const char* 
240.2936 ++  ctype<char>::do_tolower(char* __low, const char* __high) const
240.2937 ++  {
240.2938 ++    while (__low < __high)
240.2939 ++      {
240.2940 ++	*__low = _M_tolower[static_cast<unsigned char>(*__low)];
240.2941 ++	++__low;
240.2942 ++      }
240.2943 ++    return __high;
240.2944 ++  }
240.2945 +diff -urN gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/os_defines.h gcc-3.4.2/libstdc++-v3/config/os/uclibc/os_defines.h
240.2946 +--- gcc-3.4.2-dist/libstdc++-v3/config/os/uclibc/os_defines.h	1969-12-31 18:00:00.000000000 -0600
240.2947 ++++ gcc-3.4.2/libstdc++-v3/config/os/uclibc/os_defines.h	2004-09-10 10:47:40.000000000 -0500
240.2948 +@@ -0,0 +1,44 @@
240.2949 ++// Specific definitions for GNU/Linux  -*- C++ -*-
240.2950 ++
240.2951 ++// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
240.2952 ++//
240.2953 ++// This file is part of the GNU ISO C++ Library.  This library is free
240.2954 ++// software; you can redistribute it and/or modify it under the
240.2955 ++// terms of the GNU General Public License as published by the
240.2956 ++// Free Software Foundation; either version 2, or (at your option)
240.2957 ++// any later version.
240.2958 ++
240.2959 ++// This library is distributed in the hope that it will be useful,
240.2960 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
240.2961 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
240.2962 ++// GNU General Public License for more details.
240.2963 ++
240.2964 ++// You should have received a copy of the GNU General Public License along
240.2965 ++// with this library; see the file COPYING.  If not, write to the Free
240.2966 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
240.2967 ++// USA.
240.2968 ++
240.2969 ++// As a special exception, you may use this file as part of a free software
240.2970 ++// library without restriction.  Specifically, if other files instantiate
240.2971 ++// templates or use macros or inline functions from this file, or you compile
240.2972 ++// this file and link it with other files to produce an executable, this
240.2973 ++// file does not by itself cause the resulting executable to be covered by
240.2974 ++// the GNU General Public License.  This exception does not however
240.2975 ++// invalidate any other reasons why the executable file might be covered by
240.2976 ++// the GNU General Public License.
240.2977 ++
240.2978 ++#ifndef _GLIBCXX_OS_DEFINES
240.2979 ++#define _GLIBCXX_OS_DEFINES 1
240.2980 ++
240.2981 ++// System-specific #define, typedefs, corrections, etc, go here.  This
240.2982 ++// file will come before all others.
240.2983 ++
240.2984 ++// This keeps isanum, et al from being propagated as macros.
240.2985 ++#define __NO_CTYPE 1
240.2986 ++
240.2987 ++#include <features.h>
240.2988 ++
240.2989 ++// We must not see the optimized string functions GNU libc defines.
240.2990 ++#define __NO_STRING_INLINES
240.2991 ++
240.2992 ++#endif
240.2993 +diff -urN gcc-3.4.2-dist/libstdc++-v3/configure gcc-3.4.2/libstdc++-v3/configure
240.2994 +--- gcc-3.4.2-dist/libstdc++-v3/configure	2004-08-13 15:44:04.000000000 -0500
240.2995 ++++ gcc-3.4.2/libstdc++-v3/configure	2004-09-10 10:47:40.000000000 -0500
240.2996 +@@ -3878,6 +3878,11 @@
240.2997 +   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
240.2998 +   ;;
240.2999 + 
240.3000 ++linux-uclibc*)
240.3001 ++  lt_cv_deplibs_check_method=pass_all
240.3002 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
240.3003 ++  ;;
240.3004 ++
240.3005 + netbsd*)
240.3006 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
240.3007 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
240.3008 +@@ -5479,7 +5479,7 @@
240.3009 +   enableval="$enable_clocale"
240.3010 + 
240.3011 +       case "$enableval" in
240.3012 +-       generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
240.3013 ++       generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
240.3014 +        *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
240.3015 + echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
240.3016 +    { (exit 1); exit 1; }; } ;;
240.3017 +@@ -5545,6 +5550,9 @@
240.3018 +   # Default to "generic".
240.3019 +   if test $enable_clocale_flag = auto; then
240.3020 +     case x${target_os} in
240.3021 ++      xlinux-uclibc*)
240.3022 ++	enable_clocale_flag=uclibc
240.3023 ++	;;
240.3024 +       xlinux* | xgnu* | xkfreebsd*-gnu | xknetbsd*-gnu)
240.3025 +         cat >conftest.$ac_ext <<_ACEOF
240.3026 + #line $LINENO "configure"
240.3027 +@@ -5759,6 +5767,77 @@
240.3028 +       CTIME_CC=config/locale/generic/time_members.cc
240.3029 +       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
240.3030 +       ;;
240.3031 ++    uclibc)
240.3032 ++      echo "$as_me:$LINENO: result: uclibc" >&5
240.3033 ++echo "${ECHO_T}uclibc" >&6
240.3034 ++
240.3035 ++      # Declare intention to use gettext, and add support for specific
240.3036 ++      # languages.
240.3037 ++      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
240.3038 ++      ALL_LINGUAS="de fr"
240.3039 ++
240.3040 ++      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
240.3041 ++      # Extract the first word of "msgfmt", so it can be a program name with args.
240.3042 ++set dummy msgfmt; ac_word=$2
240.3043 ++echo "$as_me:$LINENO: checking for $ac_word" >&5
240.3044 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
240.3045 ++if test "${ac_cv_prog_check_msgfmt+set}" = set; then
240.3046 ++  echo $ECHO_N "(cached) $ECHO_C" >&6
240.3047 ++else
240.3048 ++  if test -n "$check_msgfmt"; then
240.3049 ++  ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
240.3050 ++else
240.3051 ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
240.3052 ++for as_dir in $PATH
240.3053 ++do
240.3054 ++  IFS=$as_save_IFS
240.3055 ++  test -z "$as_dir" && as_dir=.
240.3056 ++  for ac_exec_ext in '' $ac_executable_extensions; do
240.3057 ++  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
240.3058 ++    ac_cv_prog_check_msgfmt="yes"
240.3059 ++    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
240.3060 ++    break 2
240.3061 ++  fi
240.3062 ++done
240.3063 ++done
240.3064 ++
240.3065 ++  test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
240.3066 ++fi
240.3067 ++fi
240.3068 ++check_msgfmt=$ac_cv_prog_check_msgfmt
240.3069 ++if test -n "$check_msgfmt"; then
240.3070 ++  echo "$as_me:$LINENO: result: $check_msgfmt" >&5
240.3071 ++echo "${ECHO_T}$check_msgfmt" >&6
240.3072 ++else
240.3073 ++  echo "$as_me:$LINENO: result: no" >&5
240.3074 ++echo "${ECHO_T}no" >&6
240.3075 ++fi
240.3076 ++
240.3077 ++      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
240.3078 ++        USE_NLS=yes
240.3079 ++      fi
240.3080 ++      # Export the build objects.
240.3081 ++      for ling in $ALL_LINGUAS; do \
240.3082 ++        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
240.3083 ++        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
240.3084 ++      done
240.3085 ++
240.3086 ++
240.3087 ++
240.3088 ++      CLOCALE_H=config/locale/uclibc/c_locale.h
240.3089 ++      CLOCALE_CC=config/locale/uclibc/c_locale.cc
240.3090 ++      CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
240.3091 ++      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
240.3092 ++      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
240.3093 ++      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
240.3094 ++      CMESSAGES_H=config/locale/uclibc/messages_members.h
240.3095 ++      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
240.3096 ++      CMONEY_CC=config/locale/uclibc/monetary_members.cc
240.3097 ++      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
240.3098 ++      CTIME_H=config/locale/uclibc/time_members.h
240.3099 ++      CTIME_CC=config/locale/uclibc/time_members.cc
240.3100 ++      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
240.3101 ++      ;;
240.3102 +   esac
240.3103 + 
240.3104 +   # This is where the testsuite looks for locale catalogs, using the
240.3105 +diff -urN gcc-3.4.2-dist/libstdc++-v3/configure.host gcc-3.4.2/libstdc++-v3/configure.host
240.3106 +--- gcc-3.4.2-dist/libstdc++-v3/configure.host	2004-08-27 14:52:30.000000000 -0500
240.3107 ++++ gcc-3.4.2/libstdc++-v3/configure.host	2004-09-10 10:47:40.000000000 -0500
240.3108 +@@ -217,6 +217,12 @@
240.3109 +     ;;
240.3110 + esac
240.3111 + 
240.3112 ++# Override for uClibc since linux-uclibc gets mishandled above.
240.3113 ++case "${host_os}" in
240.3114 ++  *-uclibc*)
240.3115 ++    os_include_dir="os/uclibc"
240.3116 ++    ;;
240.3117 ++esac
240.3118 + 
240.3119 + # Set any OS-dependent and CPU-dependent bits.
240.3120 + # THIS TABLE IS SORTED.  KEEP IT THAT WAY.
240.3121 +diff -urN gcc-3.4.2-dist/libstdc++-v3/crossconfig.m4 gcc-3.4.2/libstdc++-v3/crossconfig.m4
240.3122 +--- gcc-3.4.2-dist/libstdc++-v3/crossconfig.m4	2004-07-06 20:23:49.000000000 -0500
240.3123 ++++ gcc-3.4.2/libstdc++-v3/crossconfig.m4	2004-09-10 10:47:40.000000000 -0500
240.3124 +@@ -138,6 +138,99 @@
240.3125 + 	;;
240.3126 +     esac
240.3127 +     ;;
240.3128 ++  *-uclibc*)
240.3129 ++# Temporary hack until we implement the float versions of the libm funcs
240.3130 ++    AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
240.3131 ++      machine/endian.h machine/param.h sys/machine.h sys/types.h \
240.3132 ++      fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
240.3133 ++    SECTION_FLAGS='-ffunction-sections -fdata-sections'
240.3134 ++    AC_SUBST(SECTION_FLAGS)
240.3135 ++    GLIBCXX_CHECK_LINKER_FEATURES
240.3136 ++    GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
240.3137 ++    GLIBCXX_CHECK_WCHAR_T_SUPPORT
240.3138 ++
240.3139 ++    # For LFS.
240.3140 ++    AC_DEFINE(HAVE_INT64_T)
240.3141 ++    case "$target" in
240.3142 ++      *-uclinux*)
240.3143 ++        # Don't enable LFS with uClinux
240.3144 ++        ;;
240.3145 ++      *)
240.3146 ++        AC_DEFINE(_GLIBCXX_USE_LFS)
240.3147 ++    esac
240.3148 ++
240.3149 ++    # For showmanyc_helper().
240.3150 ++    AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
240.3151 ++    GLIBCXX_CHECK_POLL
240.3152 ++    GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
240.3153 ++
240.3154 ++    # For xsputn_2().
240.3155 ++    AC_CHECK_HEADERS(sys/uio.h)
240.3156 ++    GLIBCXX_CHECK_WRITEV
240.3157 ++
240.3158 ++#     AC_DEFINE(HAVE_ACOSF)
240.3159 ++#     AC_DEFINE(HAVE_ASINF)
240.3160 ++#     AC_DEFINE(HAVE_ATANF)
240.3161 ++#     AC_DEFINE(HAVE_ATAN2F)
240.3162 ++    AC_DEFINE(HAVE_CEILF)
240.3163 ++    AC_DEFINE(HAVE_COPYSIGN)
240.3164 ++#     AC_DEFINE(HAVE_COPYSIGNF)
240.3165 ++#     AC_DEFINE(HAVE_COSF)
240.3166 ++#     AC_DEFINE(HAVE_COSHF)
240.3167 ++#     AC_DEFINE(HAVE_EXPF)
240.3168 ++#     AC_DEFINE(HAVE_FABSF)
240.3169 ++    AC_DEFINE(HAVE_FINITE)
240.3170 ++    AC_DEFINE(HAVE_FINITEF)
240.3171 ++    AC_DEFINE(HAVE_FLOORF)
240.3172 ++#     AC_DEFINE(HAVE_FMODF)
240.3173 ++#     AC_DEFINE(HAVE_FREXPF)
240.3174 ++    AC_DEFINE(HAVE_HYPOT)
240.3175 ++#     AC_DEFINE(HAVE_HYPOTF)
240.3176 ++    AC_DEFINE(HAVE_ISINF)
240.3177 ++    AC_DEFINE(HAVE_ISINFF)
240.3178 ++    AC_DEFINE(HAVE_ISNAN)
240.3179 ++    AC_DEFINE(HAVE_ISNANF)
240.3180 ++#     AC_DEFINE(HAVE_LOGF)
240.3181 ++#     AC_DEFINE(HAVE_LOG10F)
240.3182 ++#     AC_DEFINE(HAVE_MODFF)
240.3183 ++#     AC_DEFINE(HAVE_SINF)
240.3184 ++#     AC_DEFINE(HAVE_SINHF)
240.3185 ++#     AC_DEFINE(HAVE_SINCOS)
240.3186 ++#     AC_DEFINE(HAVE_SINCOSF)
240.3187 ++    AC_DEFINE(HAVE_SQRTF)
240.3188 ++#     AC_DEFINE(HAVE_TANF)
240.3189 ++#     AC_DEFINE(HAVE_TANHF)
240.3190 ++    if test x"long_double_math_on_this_cpu" = x"yes"; then
240.3191 ++      AC_MSG_ERROR([long_double_math_on_this_cpu is yes!])
240.3192 ++#       AC_DEFINE(HAVE_ACOSL)
240.3193 ++#       AC_DEFINE(HAVE_ASINL)
240.3194 ++#       AC_DEFINE(HAVE_ATANL)
240.3195 ++#       AC_DEFINE(HAVE_ATAN2L)
240.3196 ++#       AC_DEFINE(HAVE_CEILL)
240.3197 ++#       AC_DEFINE(HAVE_COPYSIGNL)
240.3198 ++#       AC_DEFINE(HAVE_COSL)
240.3199 ++#       AC_DEFINE(HAVE_COSHL)
240.3200 ++#       AC_DEFINE(HAVE_EXPL)
240.3201 ++#       AC_DEFINE(HAVE_FABSL)
240.3202 ++#       AC_DEFINE(HAVE_FINITEL)
240.3203 ++#       AC_DEFINE(HAVE_FLOORL)
240.3204 ++#       AC_DEFINE(HAVE_FMODL)
240.3205 ++#       AC_DEFINE(HAVE_FREXPL)
240.3206 ++#       AC_DEFINE(HAVE_HYPOTL)
240.3207 ++#       AC_DEFINE(HAVE_ISINFL)
240.3208 ++#       AC_DEFINE(HAVE_ISNANL)
240.3209 ++#       AC_DEFINE(HAVE_LOGL)
240.3210 ++#       AC_DEFINE(HAVE_LOG10L)
240.3211 ++#       AC_DEFINE(HAVE_MODFL)
240.3212 ++#       AC_DEFINE(HAVE_POWL)
240.3213 ++#       AC_DEFINE(HAVE_SINL)
240.3214 ++#       AC_DEFINE(HAVE_SINHL)
240.3215 ++#       AC_DEFINE(HAVE_SINCOSL)
240.3216 ++#       AC_DEFINE(HAVE_SQRTL)
240.3217 ++#       AC_DEFINE(HAVE_TANL)
240.3218 ++#       AC_DEFINE(HAVE_TANHL)
240.3219 ++    fi
240.3220 ++    ;;
240.3221 +   *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
240.3222 +     AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
240.3223 +       machine/endian.h machine/param.h sys/machine.h sys/types.h \
240.3224 +@@ -152,7 +245,7 @@
240.3225 +     AC_DEFINE(HAVE_INT64_T)
240.3226 +     case "$target" in
240.3227 +       *-uclinux*)
240.3228 +-        # Don't enable LFS with uClibc
240.3229 ++        # Don't enable LFS with uClinux
240.3230 +         ;;
240.3231 +       *)
240.3232 +         AC_DEFINE(_GLIBCXX_USE_LFS)
240.3233 +diff -urN gcc-3.4.2-dist/libstdc++-v3/include/c_compatibility/wchar.h gcc-3.4.2/libstdc++-v3/include/c_compatibility/wchar.h
240.3234 +--- gcc-3.4.2-dist/libstdc++-v3/include/c_compatibility/wchar.h	2003-12-08 21:51:45.000000000 -0600
240.3235 ++++ gcc-3.4.2/libstdc++-v3/include/c_compatibility/wchar.h	2004-09-10 10:47:40.000000000 -0500
240.3236 +@@ -101,7 +101,9 @@
240.3237 + using std::wmemcpy;
240.3238 + using std::wmemmove;
240.3239 + using std::wmemset;
240.3240 ++#if _GLIBCXX_HAVE_WCSFTIME
240.3241 + using std::wcsftime;
240.3242 ++#endif
240.3243 + 
240.3244 + #if _GLIBCXX_USE_C99
240.3245 + using std::wcstold;
240.3246 +diff -urN gcc-3.4.2-dist/libstdc++-v3/include/c_std/std_cwchar.h gcc-3.4.2/libstdc++-v3/include/c_std/std_cwchar.h
240.3247 +--- gcc-3.4.2-dist/libstdc++-v3/include/c_std/std_cwchar.h	2004-07-20 03:52:12.000000000 -0500
240.3248 ++++ gcc-3.4.2/libstdc++-v3/include/c_std/std_cwchar.h	2004-09-10 10:47:40.000000000 -0500
240.3249 +@@ -179,7 +179,9 @@
240.3250 +   using ::wcscoll;
240.3251 +   using ::wcscpy;
240.3252 +   using ::wcscspn;
240.3253 ++#if _GLIBCXX_HAVE_WCSFTIME
240.3254 +   using ::wcsftime;
240.3255 ++#endif
240.3256 +   using ::wcslen;
240.3257 +   using ::wcsncat;
240.3258 +   using ::wcsncmp;
   241.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   241.2 +++ b/patches/gcc/3.4.4/300-libstdc++-pic.patch	Sat Feb 24 11:00:05 2007 +0000
   241.3 @@ -0,0 +1,46 @@
   241.4 +diff -dur gcc-3.4.4.orig/libstdc++-v3/src/Makefile.am gcc-3.4.4/libstdc++-v3/src/Makefile.am
   241.5 +--- gcc-3.4.4.orig/libstdc++-v3/src/Makefile.am	2004-04-16 21:08:35.000000000 +0200
   241.6 ++++ gcc-3.4.4/libstdc++-v3/src/Makefile.am	2007-02-14 17:24:53.000000000 +0100
   241.7 +@@ -209,6 +209,9 @@
   241.8 + CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
   241.9 + 	  $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
  241.10 + 
  241.11 ++install-exec-local:
  241.12 ++	$(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
  241.13 ++	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
  241.14 + 
  241.15 + # Added bits to build debug library.
  241.16 + if GLIBCXX_BUILD_DEBUG
  241.17 +diff -dur gcc-3.4.4.orig/libstdc++-v3/src/Makefile.in gcc-3.4.4/libstdc++-v3/src/Makefile.in
  241.18 +--- gcc-3.4.4.orig/libstdc++-v3/src/Makefile.in	2004-04-16 21:08:35.000000000 +0200
  241.19 ++++ gcc-3.4.4/libstdc++-v3/src/Makefile.in	2007-02-14 17:25:18.000000000 +0100
  241.20 +@@ -592,7 +592,7 @@
  241.21 + 
  241.22 + install-data-am: install-data-local
  241.23 + 
  241.24 +-install-exec-am: install-toolexeclibLTLIBRARIES
  241.25 ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
  241.26 + 
  241.27 + install-info: install-info-am
  241.28 + 
  241.29 +@@ -625,6 +625,7 @@
  241.30 + 	distclean-tags distdir dvi dvi-am info info-am install \
  241.31 + 	install-am install-data install-data-am install-data-local \
  241.32 + 	install-exec install-exec-am install-info install-info-am \
  241.33 ++	install-exec-local \
  241.34 + 	install-man install-strip install-toolexeclibLTLIBRARIES \
  241.35 + 	installcheck installcheck-am installdirs maintainer-clean \
  241.36 + 	maintainer-clean-generic mostlyclean mostlyclean-compile \
  241.37 +@@ -709,6 +710,11 @@
  241.38 + install_debug:
  241.39 + 	(cd ${debugdir} && $(MAKE) \
  241.40 + 	toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
  241.41 ++
  241.42 ++install-exec-local:
  241.43 ++	$(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
  241.44 ++	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
  241.45 ++
  241.46 + # Tell versions [3.59,3.63) of GNU make to not export all variables.
  241.47 + # Otherwise a system limit (for SysV at least) may be exceeded.
  241.48 + .NOEXPORT:
  241.49 +Only in gcc-3.4.4/libstdc++-v3/src: Makefile.in.orig
   242.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   242.2 +++ b/patches/gcc/3.4.4/600-gcc34-arm-ldm-peephole.patch	Sat Feb 24 11:00:05 2007 +0000
   242.3 @@ -0,0 +1,65 @@
   242.4 +--- gcc-3.4.0/gcc/config/arm/arm.md.arm-ldm-peephole	2004-01-13 08:24:37.000000000 -0500
   242.5 ++++ gcc-3.4.0/gcc/config/arm/arm.md	2004-04-24 18:18:04.000000000 -0400
   242.6 +@@ -8810,13 +8810,16 @@
   242.7 +    (set_attr "length" "4,8,8")]
   242.8 + )
   242.9 + 
  242.10 ++; Try to convert LDR+LDR+arith into [add+]LDM+arith
  242.11 ++; On XScale, LDM is always slower than two LDRs, so only do this if
  242.12 ++; optimising for size.
  242.13 + (define_insn "*arith_adjacentmem"
  242.14 +   [(set (match_operand:SI 0 "s_register_operand" "=r")
  242.15 + 	(match_operator:SI 1 "shiftable_operator"
  242.16 + 	 [(match_operand:SI 2 "memory_operand" "m")
  242.17 + 	  (match_operand:SI 3 "memory_operand" "m")]))
  242.18 +    (clobber (match_scratch:SI 4 "=r"))]
  242.19 +-  "TARGET_ARM && adjacent_mem_locations (operands[2], operands[3])"
  242.20 ++  "TARGET_ARM && (!arm_tune_xscale || optimize_size) && adjacent_mem_locations (operands[2], operands[3])"
  242.21 +   "*
  242.22 +   {
  242.23 +     rtx ldm[3];
  242.24 +@@ -8851,6 +8854,8 @@
  242.25 +       }
  242.26 +    if (val1 && val2)
  242.27 +       {
  242.28 ++	/* This would be a loss on a Harvard core, but adjacent_mem_locations()
  242.29 ++	   will prevent it from happening.  */
  242.30 + 	rtx ops[3];
  242.31 + 	ldm[0] = ops[0] = operands[4];
  242.32 + 	ops[1] = XEXP (XEXP (operands[2], 0), 0);
  242.33 +--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm-peephole	2004-04-24 18:16:25.000000000 -0400
  242.34 ++++ gcc-3.4.0/gcc/config/arm/arm.c	2004-04-24 18:18:04.000000000 -0400
  242.35 +@@ -4838,6 +4841,11 @@
  242.36 +       *load_offset = unsorted_offsets[order[0]];
  242.37 +     }
  242.38 + 
  242.39 ++  /* For XScale a two-word LDM is a performance loss, so only do this if
  242.40 ++     size is more important.  See comments in arm_gen_load_multiple.  */
  242.41 ++  if (nops == 2 && arm_tune_xscale && !optimize_size)
  242.42 ++    return 0;
  242.43 ++
  242.44 +   if (unsorted_offsets[order[0]] == 0)
  242.45 +     return 1; /* ldmia */
  242.46 + 
  242.47 +@@ -5064,6 +5072,11 @@
  242.48 +       *load_offset = unsorted_offsets[order[0]];
  242.49 +     }
  242.50 + 
  242.51 ++  /* For XScale a two-word LDM is a performance loss, so only do this if
  242.52 ++     size is more important.  See comments in arm_gen_load_multiple.  */
  242.53 ++  if (nops == 2 && arm_tune_xscale && !optimize_size)
  242.54 ++    return 0;
  242.55 ++
  242.56 +   if (unsorted_offsets[order[0]] == 0)
  242.57 +     return 1; /* stmia */
  242.58 + 
  242.59 +--- gcc-3.4.0/gcc/genpeep.c.arm-ldm-peephole	2003-07-05 01:27:22.000000000 -0400
  242.60 ++++ gcc-3.4.0/gcc/genpeep.c	2004-04-24 18:18:04.000000000 -0400
  242.61 +@@ -381,6 +381,7 @@
  242.62 +   printf ("#include \"recog.h\"\n");
  242.63 +   printf ("#include \"except.h\"\n\n");
  242.64 +   printf ("#include \"function.h\"\n\n");
  242.65 ++  printf ("#include \"flags.h\"\n\n");
  242.66 + 
  242.67 +   printf ("#ifdef HAVE_peephole\n");
  242.68 +   printf ("extern rtx peep_operand[];\n\n");
   243.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   243.2 +++ b/patches/gcc/3.4.4/601-gcc34-arm-ldm-peephole2.patch	Sat Feb 24 11:00:05 2007 +0000
   243.3 @@ -0,0 +1,42 @@
   243.4 +The 30_all_gcc34-arm-ldm-peephole.patch from Debian was conflicting 
   243.5 +with the newer 36_all_pr16201-fix.patch, so i cut out the hunk from 
   243.6 +it that was causing problems and grabbed an updated version from 
   243.7 +upstream cvs.
   243.8 +
   243.9 +Index: gcc/config/arm/arm.c
  243.10 +===================================================================
  243.11 +RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v
  243.12 +retrieving revision 1.432
  243.13 +retrieving revision 1.433
  243.14 +diff -u -r1.432 -r1.433
  243.15 +--- gcc-3.4.4/gcc/config/arm/arm.c	29 Mar 2005 03:00:23 -0000	1.432
  243.16 ++++ gcc-3.4.4/gcc/config/arm/arm.c	1 Apr 2005 11:02:22 -0000	1.433
  243.17 +@@ -5139,6 +5139,10 @@
  243.18 + int
  243.19 + adjacent_mem_locations (rtx a, rtx b)
  243.20 + {
  243.21 ++  /* We don't guarantee to preserve the order of these memory refs.  */
  243.22 ++  if (volatile_refs_p (a) || volatile_refs_p (b))
  243.23 ++    return 0;
  243.24 ++
  243.25 +   if ((GET_CODE (XEXP (a, 0)) == REG
  243.26 +        || (GET_CODE (XEXP (a, 0)) == PLUS
  243.27 + 	   && GET_CODE (XEXP (XEXP (a, 0), 1)) == CONST_INT))
  243.28 +@@ -5178,6 +5182,17 @@
  243.29 + 	return 0;
  243.30 + 
  243.31 +       val_diff = val1 - val0;
  243.32 ++
  243.33 ++      if (arm_ld_sched)
  243.34 ++	{
  243.35 ++	  /* If the target has load delay slots, then there's no benefit
  243.36 ++	     to using an ldm instruction unless the offset is zero and
  243.37 ++	     we are optimizing for size.  */
  243.38 ++	  return (optimize_size && (REGNO (reg0) == REGNO (reg1))
  243.39 ++		  && (val0 == 0 || val1 == 0 || val0 == 4 || val1 == 4)
  243.40 ++		  && (val_diff == 4 || val_diff == -4));
  243.41 ++	}
  243.42 ++
  243.43 +       return ((REGNO (reg0) == REGNO (reg1))
  243.44 + 	      && (val_diff == 4 || val_diff == -4));
  243.45 +     }
   244.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   244.2 +++ b/patches/gcc/3.4.4/601-gcc34-arm-ldm.patch	Sat Feb 24 11:00:05 2007 +0000
   244.3 @@ -0,0 +1,119 @@
   244.4 +--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm	2004-02-27 09:51:05.000000000 -0500
   244.5 ++++ gcc-3.4.0/gcc/config/arm/arm.c	2004-04-24 18:16:25.000000000 -0400
   244.6 +@@ -8520,6 +8520,26 @@
   244.7 +   return_used_this_function = 0;  
   244.8 + }
   244.9 + 
  244.10 ++/* Return the number (counting from 0) of
  244.11 ++   the least significant set bit in MASK.  */
  244.12 ++
  244.13 ++#ifdef __GNUC__
  244.14 ++inline
  244.15 ++#endif
  244.16 ++static int
  244.17 ++number_of_first_bit_set (mask)
  244.18 ++     int mask;
  244.19 ++{
  244.20 ++  int bit;
  244.21 ++
  244.22 ++  for (bit = 0;
  244.23 ++       (mask & (1 << bit)) == 0;
  244.24 ++       ++bit)
  244.25 ++    continue;
  244.26 ++
  244.27 ++  return bit;
  244.28 ++}
  244.29 ++
  244.30 + const char *
  244.31 + arm_output_epilogue (rtx sibling)
  244.32 + {
  244.33 +@@ -8753,27 +8773,47 @@
  244.34 + 	  saved_regs_mask |=   (1 << PC_REGNUM);
  244.35 + 	}
  244.36 + 
  244.37 +-      /* Load the registers off the stack.  If we only have one register
  244.38 +-	 to load use the LDR instruction - it is faster.  */
  244.39 +-      if (saved_regs_mask == (1 << LR_REGNUM))
  244.40 +-	{
  244.41 +-	  /* The exception handler ignores the LR, so we do
  244.42 +-	     not really need to load it off the stack.  */
  244.43 +-	  if (eh_ofs)
  244.44 +-	    asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
  244.45 +-	  else
  244.46 +-	    asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
  244.47 +-	}
  244.48 +-      else if (saved_regs_mask)
  244.49 ++      if (saved_regs_mask)
  244.50 + 	{
  244.51 +-	  if (saved_regs_mask & (1 << SP_REGNUM))
  244.52 +-	    /* Note - write back to the stack register is not enabled
  244.53 +-	       (ie "ldmfd sp!...").  We know that the stack pointer is
  244.54 +-	       in the list of registers and if we add writeback the
  244.55 +-	       instruction becomes UNPREDICTABLE.  */
  244.56 +-	    print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
  244.57 ++	  /* Load the registers off the stack.  If we only have one register
  244.58 ++	     to load use the LDR instruction - it is faster.  */
  244.59 ++	  if (bit_count (saved_regs_mask) == 1)
  244.60 ++	    {
  244.61 ++	      int reg = number_of_first_bit_set (saved_regs_mask);
  244.62 ++
  244.63 ++	      switch (reg)
  244.64 ++		{
  244.65 ++		case SP_REGNUM:
  244.66 ++		  /* Mustn't use base writeback when loading SP.  */
  244.67 ++		  asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM);
  244.68 ++		  break;
  244.69 ++		  
  244.70 ++		case LR_REGNUM:
  244.71 ++		  if (eh_ofs)
  244.72 ++		    {
  244.73 ++		      /* The exception handler ignores the LR, so we do
  244.74 ++			 not really need to load it off the stack.  */
  244.75 ++		      asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
  244.76 ++		      break;
  244.77 ++		    }
  244.78 ++		  /* else fall through */
  244.79 ++		  
  244.80 ++		default:
  244.81 ++		  asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM);
  244.82 ++		  break;
  244.83 ++		}
  244.84 ++	    }
  244.85 + 	  else
  244.86 +-	    print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
  244.87 ++	    {
  244.88 ++	      if (saved_regs_mask & (1 << SP_REGNUM))
  244.89 ++		/* Note - write back to the stack register is not enabled
  244.90 ++		   (ie "ldmfd sp!...").  We know that the stack pointer is
  244.91 ++		   in the list of registers and if we add writeback the
  244.92 ++		   instruction becomes UNPREDICTABLE.  */
  244.93 ++		print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
  244.94 ++	      else
  244.95 ++		print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
  244.96 ++	    }
  244.97 + 	}
  244.98 + 
  244.99 +       if (current_function_pretend_args_size)
 244.100 +@@ -11401,22 +11441,6 @@
 244.101 +     }
 244.102 + }
 244.103 + 
 244.104 +-/* Return the number (counting from 0) of
 244.105 +-   the least significant set bit in MASK.  */
 244.106 +-
 244.107 +-inline static int
 244.108 +-number_of_first_bit_set (int mask)
 244.109 +-{
 244.110 +-  int bit;
 244.111 +-
 244.112 +-  for (bit = 0;
 244.113 +-       (mask & (1 << bit)) == 0;
 244.114 +-       ++bit)
 244.115 +-    continue;
 244.116 +-
 244.117 +-  return bit;
 244.118 +-}
 244.119 +-
 244.120 + /* Generate code to return from a thumb function.
 244.121 +    If 'reg_containing_return_addr' is -1, then the return address is
 244.122 +    actually on the stack, at the stack pointer.  */
   245.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   245.2 +++ b/patches/gcc/3.4.4/602-sdk-libstdc++-includes.patch	Sat Feb 24 11:00:05 2007 +0000
   245.3 @@ -0,0 +1,22 @@
   245.4 +--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~	2003-08-27 22:29:42.000000000 +0100
   245.5 ++++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am	2004-07-22 16:41:45.152130128 +0100
   245.6 +@@ -32,7 +32,7 @@
   245.7 + 
   245.8 + libmath_la_SOURCES = stubs.c
   245.9 + 
  245.10 +-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
  245.11 ++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
  245.12 + 
  245.13 + # Only compiling "C" sources in this directory.
  245.14 + LIBTOOL = @LIBTOOL@ --tag CC
  245.15 +--- gcc-3.4.1/libstdc++-v3/fragment.am.old	2004-07-22 18:24:58.024083656 +0100
  245.16 ++++ gcc-3.4.1/libstdc++-v3/fragment.am	2004-07-22 18:24:59.019932264 +0100
  245.17 +@@ -18,7 +18,7 @@
  245.18 + 	$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
  245.19 + 
  245.20 + # -I/-D flags to pass when compiling.
  245.21 +-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
  245.22 ++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
  245.23 + 
  245.24 + 
  245.25 + 
   246.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   246.2 +++ b/patches/gcc/3.4.4/700-pr15068-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   246.3 @@ -0,0 +1,44 @@
   246.4 +See http://gcc.gnu.org/PR15068
   246.5 +
   246.6 +Fixes error
   246.7 +
   246.8 +../sysdeps/generic/s_fmax.c: In function `__fmax':
   246.9 +../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
  246.10 +Please submit a full bug report,
  246.11 +with preprocessed source if appropriate.
  246.12 +See <URL:http://gcc.gnu.org/bugs.html> for instructions.
  246.13 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1
  246.14 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math'
  246.15 +make[1]: *** [math/others] Error 2
  246.16 +make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
  246.17 +make: *** [all] Error 2
  246.18 +
  246.19 +[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
  246.20 +http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ]
  246.21 +
  246.22 +--- gcc-3.4.1/gcc/flow.c.old	2004-02-27 19:39:19.000000000 -0800
  246.23 ++++ gcc-3.4.1/gcc/flow.c	2004-08-26 07:29:46.000000000 -0700
  246.24 +@@ -1878,6 +1878,7 @@
  246.25 + 	  rtx set_src = SET_SRC (pc_set (BB_END (bb)));
  246.26 + 	  rtx cond_true = XEXP (set_src, 0);
  246.27 + 	  rtx reg = XEXP (cond_true, 0);
  246.28 ++ 	  enum rtx_code inv_cond;
  246.29 + 
  246.30 + 	  if (GET_CODE (reg) == SUBREG)
  246.31 + 	    reg = SUBREG_REG (reg);
  246.32 +@@ -1886,11 +1887,13 @@
  246.33 + 	     in the form of a comparison of a register against zero.  
  246.34 + 	     If the condition is more complex than that, then it is safe
  246.35 + 	     not to record any information.  */
  246.36 +-	  if (GET_CODE (reg) == REG
  246.37 ++ 	  inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
  246.38 ++ 	  if (inv_cond != UNKNOWN
  246.39 ++	      && GET_CODE (reg) == REG
  246.40 + 	      && XEXP (cond_true, 1) == const0_rtx)
  246.41 + 	    {
  246.42 + 	      rtx cond_false
  246.43 +-		= gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
  246.44 ++		= gen_rtx_fmt_ee (inv_cond,
  246.45 + 				  GET_MODE (cond_true), XEXP (cond_true, 0),
  246.46 + 				  XEXP (cond_true, 1));
  246.47 + 	      if (GET_CODE (XEXP (set_src, 1)) == PC)
   247.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   247.2 +++ b/patches/gcc/3.4.4/71_all_sh-pr16665-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   247.3 @@ -0,0 +1,43 @@
   247.4 +--- gcc/gcc/config/sh/sh.c
   247.5 ++++ gcc/gcc/config/sh/sh.c
   247.6 +@@ -9106,6 +9106,15 @@ sh_output_mi_thunk (FILE *file, tree thu
   247.7 +     }
   247.8 +   this = FUNCTION_ARG (cum, Pmode, ptr_type_node, 1);
   247.9 + 
  247.10 ++  /* In PIC case, we set PIC register to compute the target address.  We
  247.11 ++     can use a scratch register to save and restore the original value  
  247.12 ++     except for SHcompact.  For SHcompact, use stack.  */
  247.13 ++  if (flag_pic && TARGET_SHCOMPACT)
  247.14 ++    {
  247.15 ++      push (PIC_OFFSET_TABLE_REGNUM);
  247.16 ++      emit_insn (gen_GOTaddr2picreg ());
  247.17 ++    }
  247.18 ++
  247.19 +   /* For SHcompact, we only have r0 for a scratch register: r1 is the
  247.20 +      static chain pointer (even if you can't have nested virtual functions
  247.21 +      right now, someone might implement them sometime), and the rest of the
  247.22 +@@ -9188,8 +9197,24 @@ sh_output_mi_thunk (FILE *file, tree thu
  247.23 +       assemble_external (function);
  247.24 +       TREE_USED (function) = 1;
  247.25 +     }
  247.26 ++  /* We can use scratch1 to save and restore the original value of
  247.27 ++     PIC register except for SHcompact.  */
  247.28 ++  if (flag_pic && ! TARGET_SHCOMPACT)
  247.29 ++    {
  247.30 ++      emit_move_insn (scratch1,
  247.31 ++		      gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM));
  247.32 ++      emit_insn (gen_GOTaddr2picreg ());
  247.33 ++    }
  247.34 +   funexp = XEXP (DECL_RTL (function), 0);
  247.35 +   emit_move_insn (scratch2, funexp);
  247.36 ++  if (flag_pic)
  247.37 ++    {
  247.38 ++      if (! TARGET_SHCOMPACT)
  247.39 ++	emit_move_insn (gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM),
  247.40 ++			scratch1);
  247.41 ++      else
  247.42 ++	pop (PIC_OFFSET_TABLE_REGNUM);
  247.43 ++    }
  247.44 +   funexp = gen_rtx_MEM (FUNCTION_MODE, scratch2);
  247.45 +   sibcall = emit_call_insn (gen_sibcall (funexp, const0_rtx, NULL_RTX));
  247.46 +   SIBLING_CALL_P (sibcall) = 1;
   248.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   248.2 +++ b/patches/gcc/3.4.4/72_all_sh-no-reorder-blocks.patch	Sat Feb 24 11:00:05 2007 +0000
   248.3 @@ -0,0 +1,13 @@
   248.4 +--- g/gcc/config/sh/sh.h
   248.5 ++++ g/gcc/config/sh/sh.h
   248.6 +@@ -422,6 +422,10 @@
   248.7 + do {									\
   248.8 +   if (LEVEL)								\
   248.9 +     flag_omit_frame_pointer = -1;					\
  248.10 ++  if (LEVEL <= 2)							\
  248.11 ++    {									\
  248.12 ++      flag_reorder_blocks = 0;						\
  248.13 ++    }									\
  248.14 +   if (SIZE)								\
  248.15 +     target_flags |= SPACE_BIT;						\
  248.16 +   if (TARGET_SHMEDIA && LEVEL > 1)					\
   249.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   249.2 +++ b/patches/gcc/3.4.4/73_all_sh-pr20617.patch	Sat Feb 24 11:00:05 2007 +0000
   249.3 @@ -0,0 +1,28 @@
   249.4 +2005-03-24  J"orn Rennecke <joern.rennecke@st.com>
   249.5 +
   249.6 +	Band aid for PR target/20617:
   249.7 +	* config/sh/lib1funcs.asm (FUNC, ALIAS): Add .hidden directive.
   249.8 +
   249.9 +--- g/gcc/config/sh/lib1funcs.asm
  249.10 ++++ g/gcc/config/sh/lib1funcs.asm
  249.11 +@@ -37,9 +37,19 @@ Boston, MA 02111-1307, USA.  */
  249.12 +    ELF local label prefixes by J"orn Rennecke
  249.13 +    amylaar@cygnus.com  */
  249.14 + 
  249.15 ++#define ALIAS(X,Y)	.global GLOBAL(X); .set GLOBAL(X),GLOBAL(Y)
  249.16 ++
  249.17 + #ifdef __ELF__
  249.18 + #define LOCAL(X)	.L_##X
  249.19 +-#define FUNC(X)		.type X,@function
  249.20 ++
  249.21 ++#if 1 /* ??? The export list mechanism is broken, everything that is not
  249.22 ++	 hidden is exported.  */
  249.23 ++#undef FUNC
  249.24 ++#define FUNC(X)		.type X,@function; .hidden X
  249.25 ++#undef ALIAS
  249.26 ++#define ALIAS(X,Y)	.global GLOBAL(X); .set GLOBAL(X),GLOBAL(Y); .hidden GLOBAL(X)
  249.27 ++#endif
  249.28 ++
  249.29 + #define ENDFUNC0(X)	.Lfe_##X: .size X,.Lfe_##X-X
  249.30 + #define ENDFUNC(X)	ENDFUNC0(X)
  249.31 + #else
   250.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   250.2 +++ b/patches/gcc/3.4.4/800-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   250.3 @@ -0,0 +1,66 @@
   250.4 +diff -dur gcc-3.4.4.orig/gcc/config/arm/linux-elf.h gcc-3.4.4/gcc/config/arm/linux-elf.h
   250.5 +--- gcc-3.4.4.orig/gcc/config/arm/linux-elf.h	2007-02-14 17:44:27.000000000 +0100
   250.6 ++++ gcc-3.4.4/gcc/config/arm/linux-elf.h	2007-02-14 17:47:32.000000000 +0100
   250.7 +@@ -30,17 +30,34 @@
   250.8 + /* Do not assume anything about header files.  */
   250.9 + #define NO_IMPLICIT_EXTERN_C
  250.10 + 
  250.11 ++/*
  250.12 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  250.13 ++ * (big endian) configurations.
  250.14 ++ */
  250.15 ++#if TARGET_BIG_ENDIAN_DEFAULT
  250.16 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
  250.17 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  250.18 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  250.19 ++#else
  250.20 ++#define TARGET_ENDIAN_DEFAULT 0
  250.21 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  250.22 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  250.23 ++#endif
  250.24 ++
  250.25 + /* Default is to use APCS-32 mode.  */
  250.26 + #undef  TARGET_DEFAULT
  250.27 +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
  250.28 ++#define TARGET_DEFAULT \
  250.29 ++		( ARM_FLAG_APCS_32 | \
  250.30 ++		  ARM_FLAG_MMU_TRAPS | \
  250.31 ++		  TARGET_ENDIAN_DEFAULT )
  250.32 + 
  250.33 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  250.34 + 
  250.35 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  250.36 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  250.37 + 
  250.38 + #undef  MULTILIB_DEFAULTS
  250.39 + #define MULTILIB_DEFAULTS \
  250.40 +-	{ "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  250.41 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  250.42 + 
  250.43 + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
  250.44 + 
  250.45 +@@ -94,7 +111,7 @@
  250.46 +    %{rdynamic:-export-dynamic} \
  250.47 +    %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
  250.48 +    -X \
  250.49 +-   %{mbig-endian:-EB}" \
  250.50 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  250.51 +    SUBTARGET_EXTRA_LINK_SPEC
  250.52 + 
  250.53 + #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
  250.54 +Only in gcc-3.4.4/gcc/config/arm: linux-elf.h.orig
  250.55 +diff -dur gcc-3.4.4.orig/gcc/config.gcc gcc-3.4.4/gcc/config.gcc
  250.56 +--- gcc-3.4.4.orig/gcc/config.gcc	2007-02-14 17:44:27.000000000 +0100
  250.57 ++++ gcc-3.4.4/gcc/config.gcc	2007-02-14 17:47:32.000000000 +0100
  250.58 +@@ -672,6 +672,11 @@
  250.59 + 	;;
  250.60 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  250.61 + 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h  arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
  250.62 ++	case $target in
  250.63 ++	arm*b-*)
  250.64 ++		tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
  250.65 ++		;;
  250.66 ++	esac
  250.67 + 	tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
  250.68 + 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  250.69 + 	gnu_ld=yes
   251.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   251.2 +++ b/patches/gcc/3.4.4/800-powerpc-libc_stack_end-uclibc.patch	Sat Feb 24 11:00:05 2007 +0000
   251.3 @@ -0,0 +1,15 @@
   251.4 +--- gcc-3.4.4/gcc/config/rs6000/linux-unwind.h.org	2005-06-23 17:50:34.000000000 -0600
   251.5 ++++ gcc-3.4.4/gcc/config/rs6000/linux-unwind.h	2005-06-23 17:52:02.000000000 -0600
   251.6 +@@ -32,6 +32,7 @@
   251.7 +    these structs elsewhere;  Many fields are missing, particularly
   251.8 +    from the end of the structures.  */
   251.9 + 
  251.10 ++#ifndef inhibit_libc
  251.11 + struct gcc_vregs
  251.12 + {
  251.13 +   __attribute__ ((vector_size (16))) int vr[32];
  251.14 +@@ -320,3 +321,4 @@
  251.15 + 									\
  251.16 +     goto SUCCESS;							\
  251.17 +   } while (0)
  251.18 ++#endif
   252.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   252.2 +++ b/patches/gcc/3.4.4/830-gcc-bug-num-22167.patch	Sat Feb 24 11:00:05 2007 +0000
   252.3 @@ -0,0 +1,16 @@
   252.4 +Index: gcc/gcse.c
   252.5 +===================================================================
   252.6 +RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
   252.7 +retrieving revision 1.288.2.9
   252.8 +diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.288.2.9 gcse.c
   252.9 +--- gcc/gcc/gcse.c	30 Oct 2004 18:02:53 -0000	1.288.2.9
  252.10 ++++ gcc/gcc/gcse.c	14 Jul 2005 13:19:57 -0000
  252.11 +@@ -6445,7 +6445,7 @@ hoist_code (void)
  252.12 + 	  insn_inserted_p = 0;
  252.13 + 
  252.14 + 	  /* These tests should be the same as the tests above.  */
  252.15 +-	  if (TEST_BIT (hoist_vbeout[bb->index], i))
  252.16 ++	  if (TEST_BIT (hoist_exprs[bb->index], i))
  252.17 + 	    {
  252.18 + 	      /* We've found a potentially hoistable expression, now
  252.19 + 		 we look at every block BB dominates to see if it
   253.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   253.2 +++ b/patches/gcc/3.4.4/900-nios2.patch	Sat Feb 24 11:00:05 2007 +0000
   253.3 @@ -0,0 +1,10211 @@
   253.4 +--- gcc-3.4.3/gcc/Makefile.in
   253.5 ++++ gcc-3.4.3-nios2/gcc/Makefile.in
   253.6 +@@ -3085,7 +3085,7 @@ install-mkheaders: stmp-int-hdrs $(STMP_
   253.7 + 	  $(INSTALL_DATA) $(srcdir)/README-fixinc \
   253.8 + 	    $(DESTDIR)$(itoolsdatadir)/include/README ; \
   253.9 + 	  $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh ; \
  253.10 +-	  $(INSTALL_PROGRAM) fixinc/fixincl $(DESTDIR)$(itoolsdir)/fixincl ; \
  253.11 ++	  $(INSTALL_PROGRAM) fixinc/fixincl$(build_exeext) $(DESTDIR)$(itoolsdir)/fixincl$(build_exeext) ; \
  253.12 + 	  $(INSTALL_DATA) $(srcdir)/gsyslimits.h \
  253.13 + 	    $(DESTDIR)$(itoolsdatadir)/gsyslimits.h ; \
  253.14 + 	else :; fi
  253.15 +--- gcc-3.4.3/gcc/combine.c
  253.16 ++++ gcc-3.4.3-nios2/gcc/combine.c
  253.17 +@@ -4380,6 +4380,14 @@ combine_simplify_rtx (rtx x, enum machin
  253.18 + 					 mode);
  253.19 + 	    }
  253.20 + 
  253.21 ++#ifndef __nios2__
  253.22 ++/* This screws up Nios II in this test case:
  253.23 ++
  253.24 ++if (x & 1)
  253.25 ++  return 2;
  253.26 ++else
  253.27 ++  return 3;
  253.28 ++*/
  253.29 + 	  else if (STORE_FLAG_VALUE == 1
  253.30 + 		   && new_code == EQ && GET_MODE_CLASS (mode) == MODE_INT
  253.31 + 		   && op1 == const0_rtx
  253.32 +@@ -4391,6 +4399,7 @@ combine_simplify_rtx (rtx x, enum machin
  253.33 + 				 gen_lowpart_for_combine (mode, op0),
  253.34 + 				 const1_rtx);
  253.35 + 	    }
  253.36 ++#endif
  253.37 + 
  253.38 + 	  else if (STORE_FLAG_VALUE == 1
  253.39 + 		   && new_code == EQ && GET_MODE_CLASS (mode) == MODE_INT
  253.40 +--- gcc-3.4.3/gcc/config/nios2/crti.asm
  253.41 ++++ gcc-3.4.3-nios2/gcc/config/nios2/crti.asm
  253.42 +@@ -0,0 +1,88 @@
  253.43 ++/*
  253.44 ++  Copyright (C) 2003 
  253.45 ++ by Jonah Graham (jgraham@altera.com)
  253.46 ++
  253.47 ++This file is free software; you can redistribute it and/or modify it
  253.48 ++under the terms of the GNU General Public License as published by the
  253.49 ++Free Software Foundation; either version 2, or (at your option) any
  253.50 ++later version.
  253.51 ++
  253.52 ++In addition to the permissions in the GNU General Public License, the
  253.53 ++Free Software Foundation gives you unlimited permission to link the
  253.54 ++compiled version of this file with other programs, and to distribute
  253.55 ++those programs without any restriction coming from the use of this
  253.56 ++file.  (The General Public License restrictions do apply in other
  253.57 ++respects; for example, they cover modification of the file, and
  253.58 ++distribution when not linked into another program.)
  253.59 ++
  253.60 ++This file is distributed in the hope that it will be useful, but
  253.61 ++WITHOUT ANY WARRANTY; without even the implied warranty of
  253.62 ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  253.63 ++General Public License for more details.
  253.64 ++
  253.65 ++You should have received a copy of the GNU General Public License
  253.66 ++along with this program; see the file COPYING.  If not, write to
  253.67 ++the Free Software Foundation, 59 Temple Place - Suite 330,
  253.68 ++Boston, MA 02111-1307, USA.
  253.69 ++
  253.70 ++   As a special exception, if you link this library with files
  253.71 ++   compiled with GCC to produce an executable, this does not cause
  253.72 ++   the resulting executable to be covered by the GNU General Public License.
  253.73 ++   This exception does not however invalidate any other reasons why
  253.74 ++   the executable file might be covered by the GNU General Public License.
  253.75 ++
  253.76 ++
  253.77 ++This file just make a stack frame for the contents of the .fini and
  253.78 ++.init sections.  Users may put any desired instructions in those
  253.79 ++sections.
  253.80 ++
  253.81 ++
  253.82 ++While technically any code can be put in the init and fini sections
  253.83 ++most stuff will not work other than stuff which obeys the call frame
  253.84 ++and ABI. All the call-preserved registers are saved, the call clobbered
  253.85 ++registers should have been saved by the code calling init and fini.
  253.86 ++
  253.87 ++See crtstuff.c for an example of code that inserts itself in the 
  253.88 ++init and fini sections. 
  253.89 ++
  253.90 ++See crt0.s for the code that calls init and fini.
  253.91 ++*/
  253.92 ++
  253.93 ++	.file	"crti.asm"
  253.94 ++
  253.95 ++	.section	".init"
  253.96 ++	.align 2
  253.97 ++	.global	_init
  253.98 ++_init:
  253.99 ++	addi	sp, sp, -48
 253.100 ++	stw	ra, 44(sp)
 253.101 ++	stw	r23, 40(sp)
 253.102 ++	stw	r22, 36(sp)
 253.103 ++	stw	r21, 32(sp)
 253.104 ++	stw	r20, 28(sp)
 253.105 ++	stw	r19, 24(sp)
 253.106 ++	stw	r18, 20(sp)
 253.107 ++	stw	r17, 16(sp)
 253.108 ++	stw	r16, 12(sp)
 253.109 ++	stw	fp, 8(sp)
 253.110 ++	mov	fp, sp
 253.111 ++	
 253.112 ++	
 253.113 ++	.section	".fini"
 253.114 ++	.align	2
 253.115 ++	.global	_fini
 253.116 ++_fini:
 253.117 ++	addi	sp, sp, -48
 253.118 ++	stw	ra, 44(sp)
 253.119 ++	stw	r23, 40(sp)
 253.120 ++	stw	r22, 36(sp)
 253.121 ++	stw	r21, 32(sp)
 253.122 ++	stw	r20, 28(sp)
 253.123 ++	stw	r19, 24(sp)
 253.124 ++	stw	r18, 20(sp)
 253.125 ++	stw	r17, 16(sp)
 253.126 ++	stw	r16, 12(sp)
 253.127 ++	stw	fp, 8(sp)
 253.128 ++	mov	fp, sp
 253.129 ++	
 253.130 ++
 253.131 +--- gcc-3.4.3/gcc/config/nios2/crtn.asm
 253.132 ++++ gcc-3.4.3-nios2/gcc/config/nios2/crtn.asm
 253.133 +@@ -0,0 +1,70 @@
 253.134 ++/*
 253.135 ++  Copyright (C) 2003 
 253.136 ++ by Jonah Graham (jgraham@altera.com)
 253.137 ++
 253.138 ++This file is free software; you can redistribute it and/or modify it
 253.139 ++under the terms of the GNU General Public License as published by the
 253.140 ++Free Software Foundation; either version 2, or (at your option) any
 253.141 ++later version.
 253.142 ++
 253.143 ++In addition to the permissions in the GNU General Public License, the
 253.144 ++Free Software Foundation gives you unlimited permission to link the
 253.145 ++compiled version of this file with other programs, and to distribute
 253.146 ++those programs without any restriction coming from the use of this
 253.147 ++file.  (The General Public License restrictions do apply in other
 253.148 ++respects; for example, they cover modification of the file, and
 253.149 ++distribution when not linked into another program.)
 253.150 ++
 253.151 ++This file is distributed in the hope that it will be useful, but
 253.152 ++WITHOUT ANY WARRANTY; without even the implied warranty of
 253.153 ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 253.154 ++General Public License for more details.
 253.155 ++
 253.156 ++You should have received a copy of the GNU General Public License
 253.157 ++along with this program; see the file COPYING.  If not, write to
 253.158 ++the Free Software Foundation, 59 Temple Place - Suite 330,
 253.159 ++Boston, MA 02111-1307, USA.
 253.160 ++
 253.161 ++   As a special exception, if you link this library with files
 253.162 ++   compiled with GCC to produce an executable, this does not cause
 253.163 ++   the resulting executable to be covered by the GNU General Public License.
 253.164 ++   This exception does not however invalidate any other reasons why
 253.165 ++   the executable file might be covered by the GNU General Public License.
 253.166 ++
 253.167 ++
 253.168 ++This file just makes sure that the .fini and .init sections do in
 253.169 ++fact return.  Users may put any desired instructions in those sections.
 253.170 ++This file is the last thing linked into any executable.
 253.171 ++*/	
 253.172 ++	.file	"crtn.asm"
 253.173 ++
 253.174 ++
 253.175 ++
 253.176 ++	.section	".init"
 253.177 ++	ldw	ra, 44(sp)
 253.178 ++	ldw	r23, 40(sp)
 253.179 ++	ldw	r22, 36(sp)
 253.180 ++	ldw	r21, 32(sp)
 253.181 ++	ldw	r20, 28(sp)
 253.182 ++	ldw	r19, 24(sp)
 253.183 ++	ldw	r18, 20(sp)
 253.184 ++	ldw	r17, 16(sp)
 253.185 ++	ldw	r16, 12(sp)
 253.186 ++	ldw	fp, 8(sp)
 253.187 ++	addi	sp, sp, -48
 253.188 ++	ret
 253.189 ++	
 253.190 ++	.section	".fini"
 253.191 ++	ldw	ra, 44(sp)
 253.192 ++	ldw	r23, 40(sp)
 253.193 ++	ldw	r22, 36(sp)
 253.194 ++	ldw	r21, 32(sp)
 253.195 ++	ldw	r20, 28(sp)
 253.196 ++	ldw	r19, 24(sp)
 253.197 ++	ldw	r18, 20(sp)
 253.198 ++	ldw	r17, 16(sp)
 253.199 ++	ldw	r16, 12(sp)
 253.200 ++	ldw	fp, 8(sp)
 253.201 ++	addi	sp, sp, -48
 253.202 ++	ret
 253.203 ++	
 253.204 +--- gcc-3.4.3/gcc/config/nios2/lib2-divmod-hi.c
 253.205 ++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divmod-hi.c
 253.206 +@@ -0,0 +1,123 @@
 253.207 ++
 253.208 ++/* We include auto-host.h here to get HAVE_GAS_HIDDEN.  This is
 253.209 ++   supposedly valid even though this is a "target" file.  */
 253.210 ++#include "auto-host.h"
 253.211 ++
 253.212 ++
 253.213 ++#include "tconfig.h"
 253.214 ++#include "tsystem.h"
 253.215 ++#include "coretypes.h"
 253.216 ++#include "tm.h"
 253.217 ++
 253.218 ++
 253.219 ++/* Don't use `fancy_abort' here even if config.h says to use it.  */
 253.220 ++#ifdef abort
 253.221 ++#undef abort
 253.222 ++#endif
 253.223 ++
 253.224 ++
 253.225 ++#ifdef HAVE_GAS_HIDDEN
 253.226 ++#define ATTRIBUTE_HIDDEN  __attribute__ ((__visibility__ ("hidden")))
 253.227 ++#else
 253.228 ++#define ATTRIBUTE_HIDDEN
 253.229 ++#endif
 253.230 ++
 253.231 ++#include "libgcc2.h"
 253.232 ++
 253.233 ++extern HItype __modhi3 (HItype, HItype);
 253.234 ++extern HItype __divhi3 (HItype, HItype);
 253.235 ++extern HItype __umodhi3 (HItype, HItype);
 253.236 ++extern HItype __udivhi3 (HItype, HItype);
 253.237 ++
 253.238 ++static UHItype udivmodhi4(UHItype, UHItype, word_type);
 253.239 ++
 253.240 ++static UHItype
 253.241 ++udivmodhi4(UHItype num, UHItype den, word_type modwanted)
 253.242 ++{
 253.243 ++  UHItype bit = 1;
 253.244 ++  UHItype res = 0;
 253.245 ++
 253.246 ++  while (den < num && bit && !(den & (1L<<15)))
 253.247 ++    {
 253.248 ++      den <<=1;
 253.249 ++      bit <<=1;
 253.250 ++    }
 253.251 ++  while (bit)
 253.252 ++    {
 253.253 ++      if (num >= den)
 253.254 ++	{
 253.255 ++	  num -= den;
 253.256 ++	  res |= bit;
 253.257 ++	}
 253.258 ++      bit >>=1;
 253.259 ++      den >>=1;
 253.260 ++    }
 253.261 ++  if (modwanted) return num;
 253.262 ++  return res;
 253.263 ++}
 253.264 ++
 253.265 ++
 253.266 ++HItype
 253.267 ++__divhi3 (HItype a, HItype b)
 253.268 ++{
 253.269 ++  word_type neg = 0;
 253.270 ++  HItype res;
 253.271 ++
 253.272 ++  if (a < 0)
 253.273 ++    {
 253.274 ++      a = -a;
 253.275 ++      neg = !neg;
 253.276 ++    }
 253.277 ++
 253.278 ++  if (b < 0)
 253.279 ++    {
 253.280 ++      b = -b;
 253.281 ++      neg = !neg;
 253.282 ++    }
 253.283 ++
 253.284 ++  res = udivmodhi4 (a, b, 0);
 253.285 ++
 253.286 ++  if (neg)
 253.287 ++    res = -res;
 253.288 ++
 253.289 ++  return res;
 253.290 ++}
 253.291 ++
 253.292 ++
 253.293 ++HItype
 253.294 ++__modhi3 (HItype a, HItype b)
 253.295 ++{
 253.296 ++  word_type neg = 0;
 253.297 ++  HItype res;
 253.298 ++
 253.299 ++  if (a < 0)
 253.300 ++    {
 253.301 ++      a = -a;
 253.302 ++      neg = 1;
 253.303 ++    }
 253.304 ++
 253.305 ++  if (b < 0)
 253.306 ++    b = -b;
 253.307 ++
 253.308 ++  res = udivmodhi4 (a, b, 1);
 253.309 ++
 253.310 ++  if (neg)
 253.311 ++    res = -res;
 253.312 ++
 253.313 ++  return res;
 253.314 ++}
 253.315 ++
 253.316 ++
 253.317 ++HItype
 253.318 ++__udivhi3 (HItype a, HItype b)
 253.319 ++{
 253.320 ++  return udivmodhi4 (a, b, 0);
 253.321 ++}
 253.322 ++
 253.323 ++
 253.324 ++HItype
 253.325 ++__umodhi3 (HItype a, HItype b)
 253.326 ++{
 253.327 ++  return udivmodhi4 (a, b, 1);
 253.328 ++}
 253.329 ++
 253.330 +--- gcc-3.4.3/gcc/config/nios2/lib2-divmod.c
 253.331 ++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divmod.c
 253.332 +@@ -0,0 +1,126 @@
 253.333 ++
 253.334 ++/* We include auto-host.h here to get HAVE_GAS_HIDDEN.  This is
 253.335 ++   supposedly valid even though this is a "target" file.  */
 253.336 ++#include "auto-host.h"
 253.337 ++
 253.338 ++
 253.339 ++#include "tconfig.h"
 253.340 ++#include "tsystem.h"
 253.341 ++#include "coretypes.h"
 253.342 ++#include "tm.h"
 253.343 ++
 253.344 ++
 253.345 ++/* Don't use `fancy_abort' here even if config.h says to use it.  */
 253.346 ++#ifdef abort
 253.347 ++#undef abort
 253.348 ++#endif
 253.349 ++
 253.350 ++
 253.351 ++#ifdef HAVE_GAS_HIDDEN
 253.352 ++#define ATTRIBUTE_HIDDEN  __attribute__ ((__visibility__ ("hidden")))
 253.353 ++#else
 253.354 ++#define ATTRIBUTE_HIDDEN
 253.355 ++#endif
 253.356 ++
 253.357 ++#include "libgcc2.h"
 253.358 ++
 253.359 ++extern SItype __modsi3 (SItype, SItype);
 253.360 ++extern SItype __divsi3 (SItype, SItype);
 253.361 ++extern SItype __umodsi3 (SItype, SItype);
 253.362 ++extern SItype __udivsi3 (SItype, SItype);
 253.363 ++
 253.364 ++static USItype udivmodsi4(USItype, USItype, word_type);
 253.365 ++
 253.366 ++/* 16-bit SI divide and modulo as used in NIOS */
 253.367 ++
 253.368 ++
 253.369 ++static USItype
 253.370 ++udivmodsi4(USItype num, USItype den, word_type modwanted)
 253.371 ++{
 253.372 ++  USItype bit = 1;
 253.373 ++  USItype res = 0;
 253.374 ++
 253.375 ++  while (den < num && bit && !(den & (1L<<31)))
 253.376 ++    {
 253.377 ++      den <<=1;
 253.378 ++      bit <<=1;
 253.379 ++    }
 253.380 ++  while (bit)
 253.381 ++    {
 253.382 ++      if (num >= den)
 253.383 ++	{
 253.384 ++	  num -= den;
 253.385 ++	  res |= bit;
 253.386 ++	}
 253.387 ++      bit >>=1;
 253.388 ++      den >>=1;
 253.389 ++    }
 253.390 ++  if (modwanted) return num;
 253.391 ++  return res;
 253.392 ++}
 253.393 ++
 253.394 ++
 253.395 ++SItype
 253.396 ++__divsi3 (SItype a, SItype b)
 253.397 ++{
 253.398 ++  word_type neg = 0;
 253.399 ++  SItype res;
 253.400 ++
 253.401 ++  if (a < 0)
 253.402 ++    {
 253.403 ++      a = -a;
 253.404 ++      neg = !neg;
 253.405 ++    }
 253.406 ++
 253.407 ++  if (b < 0)
 253.408 ++    {
 253.409 ++      b = -b;
 253.410 ++      neg = !neg;
 253.411 ++    }
 253.412 ++
 253.413 ++  res = udivmodsi4 (a, b, 0);
 253.414 ++
 253.415 ++  if (neg)
 253.416 ++    res = -res;
 253.417 ++
 253.418 ++  return res;
 253.419 ++}
 253.420 ++
 253.421 ++
 253.422 ++SItype
 253.423 ++__modsi3 (SItype a, SItype b)
 253.424 ++{
 253.425 ++  word_type neg = 0;
 253.426 ++  SItype res;
 253.427 ++
 253.428 ++  if (a < 0)
 253.429 ++    {
 253.430 ++      a = -a;
 253.431 ++      neg = 1;
 253.432 ++    }
 253.433 ++
 253.434 ++  if (b < 0)
 253.435 ++    b = -b;
 253.436 ++
 253.437 ++  res = udivmodsi4 (a, b, 1);
 253.438 ++
 253.439 ++  if (neg)
 253.440 ++    res = -res;
 253.441 ++
 253.442 ++  return res;
 253.443 ++}
 253.444 ++
 253.445 ++
 253.446 ++SItype
 253.447 ++__udivsi3 (SItype a, SItype b)
 253.448 ++{
 253.449 ++  return udivmodsi4 (a, b, 0);
 253.450 ++}
 253.451 ++
 253.452 ++
 253.453 ++SItype
 253.454 ++__umodsi3 (SItype a, SItype b)
 253.455 ++{
 253.456 ++  return udivmodsi4 (a, b, 1);
 253.457 ++}
 253.458 ++
 253.459 +--- gcc-3.4.3/gcc/config/nios2/lib2-divtable.c
 253.460 ++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divtable.c
 253.461 +@@ -0,0 +1,46 @@
 253.462 ++
 253.463 ++/* We include auto-host.h here to get HAVE_GAS_HIDDEN.  This is
 253.464 ++   supposedly valid even though this is a "target" file.  */
 253.465 ++#include "auto-host.h"
 253.466 ++
 253.467 ++
 253.468 ++#include "tconfig.h"
 253.469 ++#include "tsystem.h"
 253.470 ++#include "coretypes.h"
 253.471 ++#include "tm.h"
 253.472 ++
 253.473 ++
 253.474 ++/* Don't use `fancy_abort' here even if config.h says to use it.  */
 253.475 ++#ifdef abort
 253.476 ++#undef abort
 253.477 ++#endif
 253.478 ++
 253.479 ++
 253.480 ++#ifdef HAVE_GAS_HIDDEN
 253.481 ++#define ATTRIBUTE_HIDDEN  __attribute__ ((__visibility__ ("hidden")))
 253.482 ++#else
 253.483 ++#define ATTRIBUTE_HIDDEN
 253.484 ++#endif
 253.485 ++
 253.486 ++#include "libgcc2.h"
 253.487 ++
 253.488 ++UQItype __divsi3_table[] =
 253.489 ++{
 253.490 ++  0, 0/1, 0/2, 0/3, 0/4, 0/5, 0/6, 0/7, 0/8, 0/9, 0/10, 0/11, 0/12, 0/13, 0/14, 0/15,
 253.491 ++  0, 1/1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15,
 253.492 ++  0, 2/1, 2/2, 2/3, 2/4, 2/5, 2/6, 2/7, 2/8, 2/9, 2/10, 2/11, 2/12, 2/13, 2/14, 2/15,
 253.493 ++  0, 3/1, 3/2, 3/3, 3/4, 3/5, 3/6, 3/7, 3/8, 3/9, 3/10, 3/11, 3/12, 3/13, 3/14, 3/15,
 253.494 ++  0, 4/1, 4/2, 4/3, 4/4, 4/5, 4/6, 4/7, 4/8, 4/9, 4/10, 4/11, 4/12, 4/13, 4/14, 4/15,
 253.495 ++  0, 5/1, 5/2, 5/3, 5/4, 5/5, 5/6, 5/7, 5/8, 5/9, 5/10, 5/11, 5/12, 5/13, 5/14, 5/15,
 253.496 ++  0, 6/1, 6/2, 6/3, 6/4, 6/5, 6/6, 6/7, 6/8, 6/9, 6/10, 6/11, 6/12, 6/13, 6/14, 6/15,
 253.497 ++  0, 7/1, 7/2, 7/3, 7/4, 7/5, 7/6, 7/7, 7/8, 7/9, 7/10, 7/11, 7/12, 7/13, 7/14, 7/15,
 253.498 ++  0, 8/1, 8/2, 8/3, 8/4, 8/5, 8/6, 8/7, 8/8, 8/9, 8/10, 8/11, 8/12, 8/13, 8/14, 8/15,
 253.499 ++  0, 9/1, 9/2, 9/3, 9/4, 9/5, 9/6, 9/7, 9/8, 9/9, 9/10, 9/11, 9/12, 9/13, 9/14, 9/15,
 253.500 ++  0, 10/1, 10/2, 10/3, 10/4, 10/5, 10/6, 10/7, 10/8, 10/9, 10/10, 10/11, 10/12, 10/13, 10/14, 10/15,
 253.501 ++  0, 11/1, 11/2, 11/3, 11/4, 11/5, 11/6, 11/7, 11/8, 11/9, 11/10, 11/11, 11/12, 11/13, 11/14, 11/15,
 253.502 ++  0, 12/1, 12/2, 12/3, 12/4, 12/5, 12/6, 12/7, 12/8, 12/9, 12/10, 12/11, 12/12, 12/13, 12/14, 12/15,
 253.503 ++  0, 13/1, 13/2, 13/3, 13/4, 13/5, 13/6, 13/7, 13/8, 13/9, 13/10, 13/11, 13/12, 13/13, 13/14, 13/15,
 253.504 ++  0, 14/1, 14/2, 14/3, 14/4, 14/5, 14/6, 14/7, 14/8, 14/9, 14/10, 14/11, 14/12, 14/13, 14/14, 14/15,
 253.505 ++  0, 15/1, 15/2, 15/3, 15/4, 15/5, 15/6, 15/7, 15/8, 15/9, 15/10, 15/11, 15/12, 15/13, 15/14, 15/15,
 253.506 ++};
 253.507 ++
 253.508 +--- gcc-3.4.3/gcc/config/nios2/lib2-mul.c
 253.509 ++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-mul.c
 253.510 +@@ -0,0 +1,103 @@
 253.511 ++/* while we are debugging (ie compile outside of gcc build) 
 253.512 ++   disable gcc specific headers */
 253.513 ++#ifndef DEBUG_MULSI3
 253.514 ++
 253.515 ++
 253.516 ++/* We include auto-host.h here to get HAVE_GAS_HIDDEN.  This is
 253.517 ++   supposedly valid even though this is a "target" file.  */
 253.518 ++#include "auto-host.h"
 253.519 ++
 253.520 ++
 253.521 ++#include "tconfig.h"
 253.522 ++#include "tsystem.h"
 253.523 ++#include "coretypes.h"
 253.524 ++#include "tm.h"
 253.525 ++
 253.526 ++
 253.527 ++/* Don't use `fancy_abort' here even if config.h says to use it.  */
 253.528 ++#ifdef abort
 253.529 ++#undef abort
 253.530 ++#endif
 253.531 ++
 253.532 ++
 253.533 ++#ifdef HAVE_GAS_HIDDEN
 253.534 ++#define ATTRIBUTE_HIDDEN  __attribute__ ((__visibility__ ("hidden")))
 253.535 ++#else
 253.536 ++#define ATTRIBUTE_HIDDEN
 253.537 ++#endif
 253.538 ++
 253.539 ++#include "libgcc2.h"
 253.540 ++
 253.541 ++#else
 253.542 ++#define SItype int
 253.543 ++#define USItype unsigned int
 253.544 ++#endif
 253.545 ++
 253.546 ++
 253.547 ++extern SItype __mulsi3 (SItype, SItype);
 253.548 ++
 253.549 ++SItype
 253.550 ++__mulsi3 (SItype a, SItype b)
 253.551 ++{
 253.552 ++  SItype res = 0;
 253.553 ++  USItype cnt = a;
 253.554 ++  
 253.555 ++  while (cnt)
 253.556 ++    {
 253.557 ++      if (cnt & 1)
 253.558 ++        {
 253.559 ++	  res += b;	  
 253.560 ++	}
 253.561 ++      b <<= 1;
 253.562 ++      cnt >>= 1;
 253.563 ++    }
 253.564 ++    
 253.565 ++  return res;
 253.566 ++}
 253.567 ++/*
 253.568 ++TODO: Choose best alternative implementation.
 253.569 ++
 253.570 ++SItype
 253.571 ++__divsi3 (SItype a, SItype b)
 253.572 ++{
 253.573 ++  SItype res = 0;
 253.574 ++  USItype cnt = 0;
 253.575 ++  
 253.576 ++  while (cnt < 32)
 253.577 ++    {
 253.578 ++      if (a & (1L << cnt))
 253.579 ++        {
 253.580 ++	  res += b;	  
 253.581 ++	}
 253.582 ++      b <<= 1;
 253.583 ++      cnt++;
 253.584 ++    }
 253.585 ++    
 253.586 ++  return res;
 253.587 ++}
 253.588 ++*/
 253.589 ++
 253.590 ++
 253.591 ++#ifdef DEBUG_MULSI3
 253.592 ++
 253.593 ++int
 253.594 ++main ()
 253.595 ++{
 253.596 ++  int i, j;
 253.597 ++  int error = 0;
 253.598 ++  
 253.599 ++  for (i = -1000; i < 1000; i++)
 253.600 ++    for (j = -1000; j < 1000; j++)
 253.601 ++      {
 253.602 ++	int expect = i * j;
 253.603 ++	int actual = A__divsi3 (i, j);
 253.604 ++	if (expect != actual)
 253.605 ++	  {
 253.606 ++	    printf ("error: %d * %d = %d not %d\n", i, j, expect, actual);
 253.607 ++	    error = 1;
 253.608 ++	  }
 253.609 ++      }
 253.610 ++
 253.611 ++  return error;
 253.612 ++}
 253.613 ++#endif
 253.614 +--- gcc-3.4.3/gcc/config/nios2/nios2-dp-bit.c
 253.615 ++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-dp-bit.c
 253.616 +@@ -0,0 +1,1652 @@
 253.617 ++
 253.618 ++/* This is a software floating point library which can be used
 253.619 ++   for targets without hardware floating point. 
 253.620 ++   Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
 253.621 ++   Free Software Foundation, Inc.
 253.622 ++
 253.623 ++This file is free software; you can redistribute it and/or modify it
 253.624 ++under the terms of the GNU General Public License as published by the
 253.625 ++Free Software Foundation; either version 2, or (at your option) any
 253.626 ++later version.
 253.627 ++
 253.628 ++In addition to the permissions in the GNU General Public License, the
 253.629 ++Free Software Foundation gives you unlimited permission to link the
 253.630 ++compiled version of this file with other programs, and to distribute
 253.631 ++those programs without any restriction coming from the use of this
 253.632 ++file.  (The General Public License restrictions do apply in other
 253.633 ++respects; for example, they cover modification of the file, and
 253.634 ++distribution when not linked into another program.)
 253.635 ++
 253.636 ++This file is distributed in the hope that it will be useful, but
 253.637 ++WITHOUT ANY WARRANTY; without even the implied warranty of
 253.638 ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 253.639 ++General Public License for more details.
 253.640 ++
 253.641 ++You should have received a copy of the GNU General Public License
 253.642 ++along with this program; see the file COPYING.  If not, write to
 253.643 ++the Free Software Foundation, 59 Temple Place - Suite 330,
 253.644 ++Boston, MA 02111-1307, USA.  */
 253.645 ++
 253.646 ++/* As a special exception, if you link this library with other files,
 253.647 ++   some of which are compiled with GCC, to produce an executable,
 253.648 ++   this library does not by itself cause the resulting executable
 253.649 ++   to be covered by the GNU General Public License.
 253.650 ++   This exception does not however invalidate any other reasons why
 253.651 ++   the executable file might be covered by the GNU General Public License.  */
 253.652 ++
 253.653 ++/* This implements IEEE 754 format arithmetic, but does not provide a
 253.654 ++   mechanism for setting the rounding mode, or for generating or handling
 253.655 ++   exceptions.
 253.656 ++
 253.657 ++   The original code by Steve Chamberlain, hacked by Mark Eichin and Jim
 253.658 ++   Wilson, all of Cygnus Support.  */
 253.659 ++
 253.660 ++/* The intended way to use this file is to make two copies, add `#define FLOAT'
 253.661 ++   to one copy, then compile both copies and add them to libgcc.a.  */
 253.662 ++
 253.663 ++#include "tconfig.h"
 253.664 ++#include "coretypes.h"
 253.665 ++#include "tm.h"
 253.666 ++#include "config/fp-bit.h"
 253.667 ++
 253.668 ++/* The following macros can be defined to change the behavior of this file:
 253.669 ++   FLOAT: Implement a `float', aka SFmode, fp library.  If this is not
 253.670 ++     defined, then this file implements a `double', aka DFmode, fp library.
 253.671 ++   FLOAT_ONLY: Used with FLOAT, to implement a `float' only library, i.e.
 253.672 ++     don't include float->double conversion which requires the double library.
 253.673 ++     This is useful only for machines which can't support doubles, e.g. some
 253.674 ++     8-bit processors.
 253.675 ++   CMPtype: Specify the type that floating point compares should return.
 253.676 ++     This defaults to SItype, aka int.
 253.677 ++   US_SOFTWARE_GOFAST: This makes all entry points use the same names as the
 253.678 ++     US Software goFast library.
 253.679 ++   _DEBUG_BITFLOAT: This makes debugging the code a little easier, by adding
 253.680 ++     two integers to the FLO_union_type.
 253.681 ++   NO_DENORMALS: Disable handling of denormals.
 253.682 ++   NO_NANS: Disable nan and infinity handling
 253.683 ++   SMALL_MACHINE: Useful when operations on QIs and HIs are faster
 253.684 ++     than on an SI */
 253.685 ++
 253.686 ++/* We don't currently support extended floats (long doubles) on machines
 253.687 ++   without hardware to deal with them.
 253.688 ++
 253.689 ++   These stubs are just to keep the linker from complaining about unresolved
 253.690 ++   references which can be pulled in from libio & libstdc++, even if the
 253.691 ++   user isn't using long doubles.  However, they may generate an unresolved
 253.692 ++   external to abort if abort is not used by the function, and the stubs
 253.693 ++   are referenced from within libc, since libgcc goes before and after the
 253.694 ++   system library.  */
 253.695 ++
 253.696 ++#ifdef DECLARE_LIBRARY_RENAMES
 253.697 ++  DECLARE_LIBRARY_RENAMES
 253.698 ++#endif
 253.699 ++
 253.700 ++#ifdef EXTENDED_FLOAT_STUBS
 253.701 ++extern void abort (void);
 253.702 ++void __extendsfxf2 (void) { abort(); }
 253.703 ++void __extenddfxf2 (void) { abort(); }
 253.704 ++void __truncxfdf2 (void) { abort(); }
 253.705 ++void __truncxfsf2 (void) { abort(); }
 253.706 ++void __fixxfsi (void) { abort(); }
 253.707 ++void __floatsixf (void) { abort(); }
 253.708 ++void __addxf3 (void) { abort(); }
 253.709 ++void __subxf3 (void) { abort(); }
 253.710 ++void __mulxf3 (void) { abort(); }
 253.711 ++void __divxf3 (void) { abort(); }
 253.712 ++void __negxf2 (void) { abort(); }
 253.713 ++void __eqxf2 (void) { abort(); }
 253.714 ++void __nexf2 (void) { abort(); }
 253.715 ++void __gtxf2 (void) { abort(); }
 253.716 ++void __gexf2 (void) { abort(); }
 253.717 ++void __lexf2 (void) { abort(); }
 253.718 ++void __ltxf2 (void) { abort(); }
 253.719 ++
 253.720 ++void __extendsftf2 (void) { abort(); }
 253.721 ++void __extenddftf2 (void) { abort(); }
 253.722 ++void __trunctfdf2 (void) { abort(); }
 253.723 ++void __trunctfsf2 (void) { abort(); }
 253.724 ++void __fixtfsi (void) { abort(); }
 253.725 ++void __floatsitf (void) { abort(); }
 253.726 ++void __addtf3 (void) { abort(); }
 253.727 ++void __subtf3 (void) { abort(); }
 253.728 ++void __multf3 (void) { abort(); }
 253.729 ++void __divtf3 (void) { abort(); }
 253.730 ++void __negtf2 (void) { abort(); }
 253.731 ++void __eqtf2 (void) { abort(); }
 253.732 ++void __netf2 (void) { abort(); }
 253.733 ++void __gttf2 (void) { abort(); }
 253.734 ++void __getf2 (void) { abort(); }
 253.735 ++void __letf2 (void) { abort(); }
 253.736 ++void __lttf2 (void) { abort(); }
 253.737 ++#else	/* !EXTENDED_FLOAT_STUBS, rest of file */
 253.738 ++
 253.739 ++/* IEEE "special" number predicates */
 253.740 ++
 253.741 ++#ifdef NO_NANS
 253.742 ++
 253.743 ++#define nan() 0
 253.744 ++#define isnan(x) 0
 253.745 ++#define isinf(x) 0
 253.746 ++#else
 253.747 ++
 253.748 ++#if   defined L_thenan_sf
 253.749 ++const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
 253.750 ++#elif defined L_thenan_df
 253.751 ++const fp_number_type __thenan_df = { CLASS_SNAN, 0, 0, {(fractype) 0} };
 253.752 ++#elif defined L_thenan_tf
 253.753 ++const fp_number_type __thenan_tf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
 253.754 ++#elif defined TFLOAT
 253.755 ++extern const fp_number_type __thenan_tf;
 253.756 ++#elif defined FLOAT
 253.757 ++extern const fp_number_type __thenan_sf;
 253.758 ++#else
 253.759 ++extern const fp_number_type __thenan_df;
 253.760 ++#endif
 253.761 ++
 253.762 ++INLINE
 253.763 ++static fp_number_type *
 253.764 ++nan (void)
 253.765 ++{
 253.766 ++  /* Discard the const qualifier...  */
 253.767 ++#ifdef TFLOAT
 253.768 ++  return (fp_number_type *) (& __thenan_tf);
 253.769 ++#elif defined FLOAT  
 253.770 ++  return (fp_number_type *) (& __thenan_sf);
 253.771 ++#else
 253.772 ++  return (fp_number_type *) (& __thenan_df);
 253.773 ++#endif
 253.774 ++}
 253.775 ++
 253.776 ++INLINE
 253.777 ++static int
 253.778 ++isnan ( fp_number_type *  x)
 253.779 ++{
 253.780 ++  return x->class == CLASS_SNAN || x->class == CLASS_QNAN;
 253.781 ++}
 253.782 ++
 253.783 ++INLINE
 253.784 ++static int
 253.785 ++isinf ( fp_number_type *  x)
 253.786 ++{
 253.787 ++  return x->class == CLASS_INFINITY;
 253.788 ++}
 253.789 ++
 253.790 ++#endif /* NO_NANS */
 253.791 ++
 253.792 ++INLINE
 253.793 ++static int
 253.794 ++iszero ( fp_number_type *  x)
 253.795 ++{
 253.796 ++  return x->class == CLASS_ZERO;
 253.797 ++}
 253.798 ++
 253.799 ++INLINE 
 253.800 ++static void
 253.801 ++flip_sign ( fp_number_type *  x)
 253.802 ++{
 253.803 ++  x->sign = !x->sign;
 253.804 ++}
 253.805 ++
 253.806 ++extern FLO_type pack_d ( fp_number_type * );
 253.807 ++
 253.808 ++#if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf)
 253.809 ++FLO_type
 253.810 ++pack_d ( fp_number_type *  src)
 253.811 ++{
 253.812 ++  FLO_union_type dst;
 253.813 ++  fractype fraction = src->fraction.ll;	/* wasn't unsigned before? */
 253.814 ++  int sign = src->sign;
 253.815 ++  int exp = 0;
 253.816 ++
 253.817 ++  if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && (isnan (src) || isinf (src)))
 253.818 ++    {
 253.819 ++      /* We can't represent these values accurately.  By using the
 253.820 ++	 largest possible magnitude, we guarantee that the conversion
 253.821 ++	 of infinity is at least as big as any finite number.  */
 253.822 ++      exp = EXPMAX;
 253.823 ++      fraction = ((fractype) 1 << FRACBITS) - 1;
 253.824 ++    }
 253.825 ++  else if (isnan (src))
 253.826 ++    {
 253.827 ++      exp = EXPMAX;
 253.828 ++      if (src->class == CLASS_QNAN || 1)
 253.829 ++	{
 253.830 ++#ifdef QUIET_NAN_NEGATED
 253.831 ++	  fraction |= QUIET_NAN - 1;
 253.832 ++#else
 253.833 ++	  fraction |= QUIET_NAN;
 253.834 ++#endif
 253.835 ++	}
 253.836 ++    }
 253.837 ++  else if (isinf (src))
 253.838 ++    {
 253.839 ++      exp = EXPMAX;
 253.840 ++      fraction = 0;
 253.841 ++    }
 253.842 ++  else if (iszero (src))
 253.843 ++    {
 253.844 ++      exp = 0;
 253.845 ++      fraction = 0;
 253.846 ++    }
 253.847 ++  else if (fraction == 0)
 253.848 ++    {
 253.849 ++      exp = 0;
 253.850 ++    }
 253.851 ++  else
 253.852 ++    {
 253.853 ++      if (src->normal_exp < NORMAL_EXPMIN)
 253.854 ++	{
 253.855 ++#ifdef NO_DENORMALS
 253.856 ++	  /* Go straight to a zero representation if denormals are not
 253.857 ++ 	     supported.  The denormal handling would be harmless but
 253.858 ++ 	     isn't unnecessary.  */
 253.859 ++	  exp = 0;
 253.860 ++	  fraction = 0;
 253.861 ++#else /* NO_DENORMALS */
 253.862 ++	  /* This number's exponent is too low to fit into the bits
 253.863 ++	     available in the number, so we'll store 0 in the exponent and
 253.864 ++	     shift the fraction to the right to make up for it.  */
 253.865 ++
 253.866 ++	  int shift = NORMAL_EXPMIN - src->normal_exp;
 253.867 ++
 253.868 ++	  exp = 0;
 253.869 ++
 253.870 ++	  if (shift > FRAC_NBITS - NGARDS)
 253.871 ++	    {
 253.872 ++	      /* No point shifting, since it's more that 64 out.  */
 253.873 ++	      fraction = 0;
 253.874 ++	    }
 253.875 ++	  else
 253.876 ++	    {
 253.877 ++	      int lowbit = (fraction & (((fractype)1 << shift) - 1)) ? 1 : 0;
 253.878 ++	      fraction = (fraction >> shift) | lowbit;
 253.879 ++	    }
 253.880 ++	  if ((fraction & GARDMASK) == GARDMSB)
 253.881 ++	    {
 253.882 ++	      if ((fraction & (1 << NGARDS)))
 253.883 ++		fraction += GARDROUND + 1;
 253.884 ++	    }
 253.885 ++	  else
 253.886 ++	    {
 253.887 ++	      /* Add to the guards to round up.  */
 253.888 ++	      fraction += GARDROUND;
 253.889 ++	    }
 253.890 ++	  /* Perhaps the rounding means we now need to change the
 253.891 ++             exponent, because the fraction is no longer denormal.  */
 253.892 ++	  if (fraction >= IMPLICIT_1)
 253.893 ++	    {
 253.894 ++	      exp += 1;
 253.895 ++	    }
 253.896 ++	  fraction >>= NGARDS;
 253.897 ++#endif /* NO_DENORMALS */
 253.898 ++	}
 253.899 ++      else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS)
 253.900 ++	       && src->normal_exp > EXPBIAS)
 253.901 ++	{
 253.902 ++	  exp = EXPMAX;
 253.903 ++	  fraction = 0;
 253.904 ++	}
 253.905 ++      else
 253.906 ++	{
 253.907 ++	  exp = src->normal_exp + EXPBIAS;
 253.908 ++	  if (!ROUND_TOWARDS_ZERO)
 253.909 ++	    {
 253.910 ++	      /* IF the gard bits are the all zero, but the first, then we're
 253.911 ++		 half way between two numbers, choose the one which makes the
 253.912 ++		 lsb of the answer 0.  */
 253.913 ++	      if ((fraction & GARDMASK) == GARDMSB)
 253.914 ++		{
 253.915 ++		  if (fraction & (1 << NGARDS))
 253.916 ++		    fraction += GARDROUND + 1;
 253.917 ++		}
 253.918 ++	      else
 253.919 ++		{
 253.920 ++		  /* Add a one to the guards to round up */
 253.921 ++		  fraction += GARDROUND;
 253.922 ++		}
 253.923 ++	      if (fraction >= IMPLICIT_2)
 253.924 ++		{
 253.925 ++		  fraction >>= 1;
 253.926 ++		  exp += 1;
 253.927 ++		}
 253.928 ++	    }
 253.929 ++	  fraction >>= NGARDS;
 253.930 ++
 253.931 ++	  if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp > EXPMAX)
 253.932 ++	    {
 253.933 ++	      /* Saturate on overflow.  */
 253.934 ++	      exp = EXPMAX;
 253.935 ++	      fraction = ((fractype) 1 << FRACBITS) - 1;
 253.936 ++	    }
 253.937 ++	}
 253.938 ++    }
 253.939 ++
 253.940 ++  /* We previously used bitfields to store the number, but this doesn't
 253.941 ++     handle little/big endian systems conveniently, so use shifts and
 253.942 ++     masks */
 253.943 ++#ifdef FLOAT_BIT_ORDER_MISMATCH
 253.944 ++  dst.bits.fraction = fraction;
 253.945 ++  dst.bits.exp = exp;
 253.946 ++  dst.bits.sign = sign;
 253.947 ++#else
 253.948 ++# if defined TFLOAT && defined HALFFRACBITS
 253.949 ++ {
 253.950 ++   halffractype high, low, unity;
 253.951 ++   int lowsign, lowexp;
 253.952 ++
 253.953 ++   unity = (halffractype) 1 << HALFFRACBITS;
 253.954 ++
 253.955 ++   /* Set HIGH to the high double's significand, masking out the implicit 1.
 253.956 ++      Set LOW to the low double's full significand.  */
 253.957 ++   high = (fraction >> (FRACBITS - HALFFRACBITS)) & (unity - 1);
 253.958 ++   low = fraction & (unity * 2 - 1);
 253.959 ++
 253.960 ++   /* Get the initial sign and exponent of the low double.  */
 253.961 ++   lowexp = exp - HALFFRACBITS - 1;
 253.962 ++   lowsign = sign;
 253.963 ++
 253.964 ++   /* HIGH should be rounded like a normal double, making |LOW| <=
 253.965 ++      0.5 ULP of HIGH.  Assume round-to-nearest.  */
 253.966 ++   if (exp < EXPMAX)
 253.967 ++     if (low > unity || (low == unity && (high & 1) == 1))
 253.968 ++       {
 253.969 ++	 /* Round HIGH up and adjust LOW to match.  */
 253.970 ++	 high++;
 253.971 ++	 if (high == unity)
 253.972 ++	   {
 253.973 ++	     /* May make it infinite, but that's OK.  */
 253.974 ++	     high = 0;
 253.975 ++	     exp++;
 253.976 ++	   }
 253.977 ++	 low = unity * 2 - low;
 253.978 ++	 lowsign ^= 1;
 253.979 ++       }
 253.980 ++
 253.981 ++   high |= (halffractype) exp << HALFFRACBITS;
 253.982 ++   high |= (halffractype) sign << (HALFFRACBITS + EXPBITS);
 253.983 ++
 253.984 ++   if (exp == EXPMAX || exp == 0 || low == 0)
 253.985 ++     low = 0;
 253.986 ++   else
 253.987 ++     {
 253.988 ++       while (lowexp > 0 && low < unity)
 253.989 ++	 {
 253.990 ++	   low <<= 1;
 253.991 ++	   lowexp--;
 253.992 ++	 }
 253.993 ++
 253.994 ++       if (lowexp <= 0)
 253.995 ++	 {
 253.996 ++	   halffractype roundmsb, round;
 253.997 ++	   int shift;
 253.998 ++
 253.999 ++	   shift = 1 - lowexp;
253.1000 ++	   roundmsb = (1 << (shift - 1));
253.1001 ++	   round = low & ((roundmsb << 1) - 1);
253.1002 ++
253.1003 ++	   low >>= shift;
253.1004 ++	   lowexp = 0;
253.1005 ++
253.1006 ++	   if (round > roundmsb || (round == roundmsb && (low & 1) == 1))
253.1007 ++	     {
253.1008 ++	       low++;
253.1009 ++	       if (low == unity)
253.1010 ++		 /* LOW rounds up to the smallest normal number.  */
253.1011 ++		 lowexp++;
253.1012 ++	     }
253.1013 ++	 }
253.1014 ++
253.1015 ++       low &= unity - 1;
253.1016 ++       low |= (halffractype) lowexp << HALFFRACBITS;
253.1017 ++       low |= (halffractype) lowsign << (HALFFRACBITS + EXPBITS);
253.1018 ++     }
253.1019 ++   dst.value_raw = ((fractype) high << HALFSHIFT) | low;
253.1020 ++ }
253.1021 ++# else
253.1022 ++  dst.value_raw = fraction & ((((fractype)1) << FRACBITS) - (fractype)1);
253.1023 ++  dst.value_raw |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << FRACBITS;
253.1024 ++  dst.value_raw |= ((fractype) (sign & 1)) << (FRACBITS | EXPBITS);
253.1025 ++# endif
253.1026 ++#endif
253.1027 ++
253.1028 ++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
253.1029 ++#ifdef TFLOAT
253.1030 ++  {
253.1031 ++    qrtrfractype tmp1 = dst.words[0];
253.1032 ++    qrtrfractype tmp2 = dst.words[1];
253.1033 ++    dst.words[0] = dst.words[3];
253.1034 ++    dst.words[1] = dst.words[2];
253.1035 ++    dst.words[2] = tmp2;
253.1036 ++    dst.words[3] = tmp1;
253.1037 ++  }
253.1038 ++#else
253.1039 ++  {
253.1040 ++    halffractype tmp = dst.words[0];
253.1041 ++    dst.words[0] = dst.words[1];
253.1042 ++    dst.words[1] = tmp;
253.1043 ++  }
253.1044 ++#endif
253.1045 ++#endif
253.1046 ++
253.1047 ++  return dst.value;
253.1048 ++}
253.1049 ++#endif
253.1050 ++
253.1051 ++#if defined(L_unpack_df) || defined(L_unpack_sf) || defined(L_unpack_tf)
253.1052 ++void
253.1053 ++unpack_d (FLO_union_type * src, fp_number_type * dst)
253.1054 ++{
253.1055 ++  /* We previously used bitfields to store the number, but this doesn't
253.1056 ++     handle little/big endian systems conveniently, so use shifts and
253.1057 ++     masks */
253.1058 ++  fractype fraction;
253.1059 ++  int exp;
253.1060 ++  int sign;
253.1061 ++
253.1062 ++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
253.1063 ++  FLO_union_type swapped;
253.1064 ++
253.1065 ++#ifdef TFLOAT
253.1066 ++  swapped.words[0] = src->words[3];
253.1067 ++  swapped.words[1] = src->words[2];
253.1068 ++  swapped.words[2] = src->words[1];
253.1069 ++  swapped.words[3] = src->words[0];
253.1070 ++#else
253.1071 ++  swapped.words[0] = src->words[1];
253.1072 ++  swapped.words[1] = src->words[0];
253.1073 ++#endif
253.1074 ++  src = &swapped;
253.1075 ++#endif
253.1076 ++  
253.1077 ++#ifdef FLOAT_BIT_ORDER_MISMATCH
253.1078 ++  fraction = src->bits.fraction;
253.1079 ++  exp = src->bits.exp;
253.1080 ++  sign = src->bits.sign;
253.1081 ++#else
253.1082 ++# if defined TFLOAT && defined HALFFRACBITS
253.1083 ++ {
253.1084 ++   halffractype high, low;
253.1085 ++   
253.1086 ++   high = src->value_raw >> HALFSHIFT;
253.1087 ++   low = src->value_raw & (((fractype)1 << HALFSHIFT) - 1);
253.1088 ++
253.1089 ++   fraction = high & ((((fractype)1) << HALFFRACBITS) - 1);
253.1090 ++   fraction <<= FRACBITS - HALFFRACBITS;
253.1091 ++   exp = ((int)(high >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
253.1092 ++   sign = ((int)(high >> (((HALFFRACBITS + EXPBITS))))) & 1;
253.1093 ++
253.1094 ++   if (exp != EXPMAX && exp != 0 && low != 0)
253.1095 ++     {
253.1096 ++       int lowexp = ((int)(low >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
253.1097 ++       int lowsign = ((int)(low >> (((HALFFRACBITS + EXPBITS))))) & 1;
253.1098 ++       int shift;
253.1099 ++       fractype xlow;
253.1100 ++
253.1101 ++       xlow = low & ((((fractype)1) << HALFFRACBITS) - 1);
253.1102 ++       if (lowexp)
253.1103 ++	 xlow |= (((halffractype)1) << HALFFRACBITS);
253.1104 ++       else
253.1105 ++	 lowexp = 1;
253.1106 ++       shift = (FRACBITS - HALFFRACBITS) - (exp - lowexp);
253.1107 ++       if (shift > 0)
253.1108 ++	 xlow <<= shift;
253.1109 ++       else if (shift < 0)
253.1110 ++	 xlow >>= -shift;
253.1111 ++       if (sign == lowsign)
253.1112 ++	 fraction += xlow;
253.1113 ++       else if (fraction >= xlow)
253.1114 ++	 fraction -= xlow;
253.1115 ++       else
253.1116 ++	 {
253.1117 ++	   /* The high part is a power of two but the full number is lower.
253.1118 ++	      This code will leave the implicit 1 in FRACTION, but we'd
253.1119 ++	      have added that below anyway.  */
253.1120 ++	   fraction = (((fractype) 1 << FRACBITS) - xlow) << 1;
253.1121 ++	   exp--;
253.1122 ++	 }
253.1123 ++     }
253.1124 ++ }
253.1125 ++# else
253.1126 ++  fraction = src->value_raw & ((((fractype)1) << FRACBITS) - 1);
253.1127 ++  exp = ((int)(src->value_raw >> FRACBITS)) & ((1 << EXPBITS) - 1);
253.1128 ++  sign = ((int)(src->value_raw >> (FRACBITS + EXPBITS))) & 1;
253.1129 ++# endif
253.1130 ++#endif
253.1131 ++
253.1132 ++  dst->sign = sign;
253.1133 ++  if (exp == 0)
253.1134 ++    {
253.1135 ++      /* Hmm.  Looks like 0 */
253.1136 ++      if (fraction == 0
253.1137 ++#ifdef NO_DENORMALS
253.1138 ++	  || 1
253.1139 ++#endif
253.1140 ++	  )
253.1141 ++	{
253.1142 ++	  /* tastes like zero */
253.1143 ++	  dst->class = CLASS_ZERO;
253.1144 ++	}
253.1145 ++      else
253.1146 ++	{
253.1147 ++	  /* Zero exponent with nonzero fraction - it's denormalized,
253.1148 ++	     so there isn't a leading implicit one - we'll shift it so
253.1149 ++	     it gets one.  */
253.1150 ++	  dst->normal_exp = exp - EXPBIAS + 1;
253.1151 ++	  fraction <<= NGARDS;
253.1152 ++
253.1153 ++	  dst->class = CLASS_NUMBER;
253.1154 ++#if 1
253.1155 ++	  while (fraction < IMPLICIT_1)
253.1156 ++	    {
253.1157 ++	      fraction <<= 1;
253.1158 ++	      dst->normal_exp--;
253.1159 ++	    }
253.1160 ++#endif
253.1161 ++	  dst->fraction.ll = fraction;
253.1162 ++	}
253.1163 ++    }
253.1164 ++  else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp == EXPMAX)
253.1165 ++    {
253.1166 ++      /* Huge exponent*/
253.1167 ++      if (fraction == 0)
253.1168 ++	{
253.1169 ++	  /* Attached to a zero fraction - means infinity */
253.1170 ++	  dst->class = CLASS_INFINITY;
253.1171 ++	}
253.1172 ++      else
253.1173 ++	{
253.1174 ++	  /* Nonzero fraction, means nan */
253.1175 ++#ifdef QUIET_NAN_NEGATED
253.1176 ++	  if ((fraction & QUIET_NAN) == 0)
253.1177 ++#else
253.1178 ++	  if (fraction & QUIET_NAN)
253.1179 ++#endif
253.1180 ++	    {
253.1181 ++	      dst->class = CLASS_QNAN;
253.1182 ++	    }
253.1183 ++	  else
253.1184 ++	    {
253.1185 ++	      dst->class = CLASS_SNAN;
253.1186 ++	    }
253.1187 ++	  /* Keep the fraction part as the nan number */
253.1188 ++	  dst->fraction.ll = fraction;
253.1189 ++	}
253.1190 ++    }
253.1191 ++  else
253.1192 ++    {
253.1193 ++      /* Nothing strange about this number */
253.1194 ++      dst->normal_exp = exp - EXPBIAS;
253.1195 ++      dst->class = CLASS_NUMBER;
253.1196 ++      dst->fraction.ll = (fraction << NGARDS) | IMPLICIT_1;
253.1197 ++    }
253.1198 ++}
253.1199 ++#endif /* L_unpack_df || L_unpack_sf */
253.1200 ++
253.1201 ++#if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf)
253.1202 ++static fp_number_type *
253.1203 ++_fpadd_parts (fp_number_type * a,
253.1204 ++	      fp_number_type * b,
253.1205 ++	      fp_number_type * tmp)
253.1206 ++{
253.1207 ++  intfrac tfraction;
253.1208 ++
253.1209 ++  /* Put commonly used fields in local variables.  */
253.1210 ++  int a_normal_exp;
253.1211 ++  int b_normal_exp;
253.1212 ++  fractype a_fraction;
253.1213 ++  fractype b_fraction;
253.1214 ++
253.1215 ++  if (isnan (a))
253.1216 ++    {
253.1217 ++      return a;
253.1218 ++    }
253.1219 ++  if (isnan (b))
253.1220 ++    {
253.1221 ++      return b;
253.1222 ++    }
253.1223 ++  if (isinf (a))
253.1224 ++    {
253.1225 ++      /* Adding infinities with opposite signs yields a NaN.  */
253.1226 ++      if (isinf (b) && a->sign != b->sign)
253.1227 ++	return nan ();
253.1228 ++      return a;
253.1229 ++    }
253.1230 ++  if (isinf (b))
253.1231 ++    {
253.1232 ++      return b;
253.1233 ++    }
253.1234 ++  if (iszero (b))
253.1235 ++    {
253.1236 ++      if (iszero (a))
253.1237 ++	{
253.1238 ++	  *tmp = *a;
253.1239 ++	  tmp->sign = a->sign & b->sign;
253.1240 ++	  return tmp;
253.1241 ++	}
253.1242 ++      return a;
253.1243 ++    }
253.1244 ++  if (iszero (a))
253.1245 ++    {
253.1246 ++      return b;
253.1247 ++    }
253.1248 ++
253.1249 ++  /* Got two numbers. shift the smaller and increment the exponent till
253.1250 ++     they're the same */
253.1251 ++  {
253.1252 ++    int diff;
253.1253 ++
253.1254 ++    a_normal_exp = a->normal_exp;
253.1255 ++    b_normal_exp = b->normal_exp;
253.1256 ++    a_fraction = a->fraction.ll;
253.1257 ++    b_fraction = b->fraction.ll;
253.1258 ++
253.1259 ++    diff = a_normal_exp - b_normal_exp;
253.1260 ++
253.1261 ++    if (diff < 0)
253.1262 ++      diff = -diff;
253.1263 ++    if (diff < FRAC_NBITS)
253.1264 ++      {
253.1265 ++	/* ??? This does shifts one bit at a time.  Optimize.  */
253.1266 ++	while (a_normal_exp > b_normal_exp)
253.1267 ++	  {
253.1268 ++	    b_normal_exp++;
253.1269 ++	    LSHIFT (b_fraction);
253.1270 ++	  }
253.1271 ++	while (b_normal_exp > a_normal_exp)
253.1272 ++	  {
253.1273 ++	    a_normal_exp++;
253.1274 ++	    LSHIFT (a_fraction);
253.1275 ++	  }
253.1276 ++      }
253.1277 ++    else
253.1278 ++      {
253.1279 ++	/* Somethings's up.. choose the biggest */
253.1280 ++	if (a_normal_exp > b_normal_exp)
253.1281 ++	  {
253.1282 ++	    b_normal_exp = a_normal_exp;
253.1283 ++	    b_fraction = 0;
253.1284 ++	  }
253.1285 ++	else
253.1286 ++	  {
253.1287 ++	    a_normal_exp = b_normal_exp;
253.1288 ++	    a_fraction = 0;
253.1289 ++	  }
253.1290 ++      }
253.1291 ++  }
253.1292 ++
253.1293 ++  if (a->sign != b->sign)
253.1294 ++    {
253.1295 ++      if (a->sign)
253.1296 ++	{
253.1297 ++	  tfraction = -a_fraction + b_fraction;
253.1298 ++	}
253.1299 ++      else
253.1300 ++	{
253.1301 ++	  tfraction = a_fraction - b_fraction;
253.1302 ++	}
253.1303 ++      if (tfraction >= 0)
253.1304 ++	{
253.1305 ++	  tmp->sign = 0;
253.1306 ++	  tmp->normal_exp = a_normal_exp;
253.1307 ++	  tmp->fraction.ll = tfraction;
253.1308 ++	}
253.1309 ++      else
253.1310 ++	{
253.1311 ++	  tmp->sign = 1;
253.1312 ++	  tmp->normal_exp = a_normal_exp;
253.1313 ++	  tmp->fraction.ll = -tfraction;
253.1314 ++	}
253.1315 ++      /* and renormalize it */
253.1316 ++
253.1317 ++      while (tmp->fraction.ll < IMPLICIT_1 && tmp->fraction.ll)
253.1318 ++	{
253.1319 ++	  tmp->fraction.ll <<= 1;
253.1320 ++	  tmp->normal_exp--;
253.1321 ++	}
253.1322 ++    }
253.1323 ++  else
253.1324 ++    {
253.1325 ++      tmp->sign = a->sign;
253.1326 ++      tmp->normal_exp = a_normal_exp;
253.1327 ++      tmp->fraction.ll = a_fraction + b_fraction;
253.1328 ++    }
253.1329 ++  tmp->class = CLASS_NUMBER;
253.1330 ++  /* Now the fraction is added, we have to shift down to renormalize the
253.1331 ++     number */
253.1332 ++
253.1333 ++  if (tmp->fraction.ll >= IMPLICIT_2)
253.1334 ++    {
253.1335 ++      LSHIFT (tmp->fraction.ll);
253.1336 ++      tmp->normal_exp++;
253.1337 ++    }
253.1338 ++  return tmp;
253.1339 ++
253.1340 ++}
253.1341 ++
253.1342 ++FLO_type
253.1343 ++add (FLO_type arg_a, FLO_type arg_b)
253.1344 ++{
253.1345 ++  fp_number_type a;
253.1346 ++  fp_number_type b;
253.1347 ++  fp_number_type tmp;
253.1348 ++  fp_number_type *res;
253.1349 ++  FLO_union_type au, bu;
253.1350 ++
253.1351 ++  au.value = arg_a;
253.1352 ++  bu.value = arg_b;
253.1353 ++
253.1354 ++  unpack_d (&au, &a);
253.1355 ++  unpack_d (&bu, &b);
253.1356 ++
253.1357 ++  res = _fpadd_parts (&a, &b, &tmp);
253.1358 ++
253.1359 ++  return pack_d (res);
253.1360 ++}
253.1361 ++
253.1362 ++FLO_type
253.1363 ++sub (FLO_type arg_a, FLO_type arg_b)
253.1364 ++{
253.1365 ++  fp_number_type a;
253.1366 ++  fp_number_type b;
253.1367 ++  fp_number_type tmp;
253.1368 ++  fp_number_type *res;
253.1369 ++  FLO_union_type au, bu;
253.1370 ++
253.1371 ++  au.value = arg_a;
253.1372 ++  bu.value = arg_b;
253.1373 ++
253.1374 ++  unpack_d (&au, &a);
253.1375 ++  unpack_d (&bu, &b);
253.1376 ++
253.1377 ++  b.sign ^= 1;
253.1378 ++
253.1379 ++  res = _fpadd_parts (&a, &b, &tmp);
253.1380 ++
253.1381 ++  return pack_d (res);
253.1382 ++}
253.1383 ++#endif /* L_addsub_sf || L_addsub_df */
253.1384 ++
253.1385 ++#if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf)
253.1386 ++static inline __attribute__ ((__always_inline__)) fp_number_type *
253.1387 ++_fpmul_parts ( fp_number_type *  a,
253.1388 ++	       fp_number_type *  b,
253.1389 ++	       fp_number_type * tmp)
253.1390 ++{
253.1391 ++  fractype low = 0;
253.1392 ++  fractype high = 0;
253.1393 ++
253.1394 ++  if (isnan (a))
253.1395 ++    {
253.1396 ++      a->sign = a->sign != b->sign;
253.1397 ++      return a;
253.1398 ++    }
253.1399 ++  if (isnan (b))
253.1400 ++    {
253.1401 ++      b->sign = a->sign != b->sign;
253.1402 ++      return b;
253.1403 ++    }
253.1404 ++  if (isinf (a))
253.1405 ++    {
253.1406 ++      if (iszero (b))
253.1407 ++	return nan ();
253.1408 ++      a->sign = a->sign != b->sign;
253.1409 ++      return a;
253.1410 ++    }
253.1411 ++  if (isinf (b))
253.1412 ++    {
253.1413 ++      if (iszero (a))
253.1414 ++	{
253.1415 ++	  return nan ();
253.1416 ++	}
253.1417 ++      b->sign = a->sign != b->sign;
253.1418 ++      return b;
253.1419 ++    }
253.1420 ++  if (iszero (a))
253.1421 ++    {
253.1422 ++      a->sign = a->sign != b->sign;
253.1423 ++      return a;
253.1424 ++    }
253.1425 ++  if (iszero (b))
253.1426 ++    {
253.1427 ++      b->sign = a->sign != b->sign;
253.1428 ++      return b;
253.1429 ++    }
253.1430 ++
253.1431 ++  /* Calculate the mantissa by multiplying both numbers to get a
253.1432 ++     twice-as-wide number.  */
253.1433 ++  {
253.1434 ++#if defined(NO_DI_MODE) || defined(TFLOAT)
253.1435 ++    {
253.1436 ++      fractype x = a->fraction.ll;
253.1437 ++      fractype ylow = b->fraction.ll;
253.1438 ++      fractype yhigh = 0;
253.1439 ++      int bit;
253.1440 ++
253.1441 ++      /* ??? This does multiplies one bit at a time.  Optimize.  */
253.1442 ++      for (bit = 0; bit < FRAC_NBITS; bit++)
253.1443 ++	{
253.1444 ++	  int carry;
253.1445 ++
253.1446 ++	  if (x & 1)
253.1447 ++	    {
253.1448 ++	      carry = (low += ylow) < ylow;
253.1449 ++	      high += yhigh + carry;
253.1450 ++	    }
253.1451 ++	  yhigh <<= 1;
253.1452 ++	  if (ylow & FRACHIGH)
253.1453 ++	    {
253.1454 ++	      yhigh |= 1;
253.1455 ++	    }
253.1456 ++	  ylow <<= 1;
253.1457 ++	  x >>= 1;
253.1458 ++	}
253.1459 ++    }
253.1460 ++#elif defined(FLOAT) 
253.1461 ++    /* Multiplying two USIs to get a UDI, we're safe.  */
253.1462 ++    {
253.1463 ++      UDItype answer = (UDItype)a->fraction.ll * (UDItype)b->fraction.ll;
253.1464 ++      
253.1465 ++      high = answer >> BITS_PER_SI;
253.1466 ++      low = answer;
253.1467 ++    }
253.1468 ++#else
253.1469 ++    /* fractype is DImode, but we need the result to be twice as wide.
253.1470 ++       Assuming a widening multiply from DImode to TImode is not
253.1471 ++       available, build one by hand.  */
253.1472 ++    {
253.1473 ++      USItype nl = a->fraction.ll;
253.1474 ++      USItype nh = a->fraction.ll >> BITS_PER_SI;
253.1475 ++      USItype ml = b->fraction.ll;
253.1476 ++      USItype mh = b->fraction.ll >> BITS_PER_SI;
253.1477 ++      UDItype pp_ll = (UDItype) ml * nl;
253.1478 ++      UDItype pp_hl = (UDItype) mh * nl;
253.1479 ++      UDItype pp_lh = (UDItype) ml * nh;
253.1480 ++      UDItype pp_hh = (UDItype) mh * nh;
253.1481 ++      UDItype res2 = 0;
253.1482 ++      UDItype res0 = 0;
253.1483 ++      UDItype ps_hh__ = pp_hl + pp_lh;
253.1484 ++      if (ps_hh__ < pp_hl)
253.1485 ++	res2 += (UDItype)1 << BITS_PER_SI;
253.1486 ++      pp_hl = (UDItype)(USItype)ps_hh__ << BITS_PER_SI;
253.1487 ++      res0 = pp_ll + pp_hl;
253.1488 ++      if (res0 < pp_ll)
253.1489 ++	res2++;
253.1490 ++      res2 += (ps_hh__ >> BITS_PER_SI) + pp_hh;
253.1491 ++      high = res2;
253.1492 ++      low = res0;
253.1493 ++    }
253.1494 ++#endif
253.1495 ++  }
253.1496 ++
253.1497 ++  tmp->normal_exp = a->normal_exp + b->normal_exp
253.1498 ++    + FRAC_NBITS - (FRACBITS + NGARDS);
253.1499 ++  tmp->sign = a->sign != b->sign;
253.1500 ++  while (high >= IMPLICIT_2)
253.1501 ++    {
253.1502 ++      tmp->normal_exp++;
253.1503 ++      if (high & 1)
253.1504 ++	{
253.1505 ++	  low >>= 1;
253.1506 ++	  low |= FRACHIGH;
253.1507 ++	}
253.1508 ++      high >>= 1;
253.1509 ++    }
253.1510 ++  while (high < IMPLICIT_1)
253.1511 ++    {
253.1512 ++      tmp->normal_exp--;
253.1513 ++
253.1514 ++      high <<= 1;
253.1515 ++      if (low & FRACHIGH)
253.1516 ++	high |= 1;
253.1517 ++      low <<= 1;
253.1518 ++    }
253.1519 ++  /* rounding is tricky. if we only round if it won't make us round later.  */
253.1520 ++#if 0
253.1521 ++  if (low & FRACHIGH2)
253.1522 ++    {
253.1523 ++      if (((high & GARDMASK) != GARDMSB)
253.1524 ++	  && (((high + 1) & GARDMASK) == GARDMSB))
253.1525 ++	{
253.1526 ++	  /* don't round, it gets done again later.  */
253.1527 ++	}
253.1528 ++      else
253.1529 ++	{
253.1530 ++	  high++;
253.1531 ++	}
253.1532 ++    }
253.1533 ++#endif
253.1534 ++  if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB)
253.1535 ++    {
253.1536 ++      if (high & (1 << NGARDS))
253.1537 ++	{
253.1538 ++	  /* half way, so round to even */
253.1539 ++	  high += GARDROUND + 1;
253.1540 ++	}
253.1541 ++      else if (low)
253.1542 ++	{
253.1543 ++	  /* but we really weren't half way */
253.1544 ++	  high += GARDROUND + 1;
253.1545 ++	}
253.1546 ++    }
253.1547 ++  tmp->fraction.ll = high;
253.1548 ++  tmp->class = CLASS_NUMBER;
253.1549 ++  return tmp;
253.1550 ++}
253.1551 ++
253.1552 ++FLO_type
253.1553 ++multiply (FLO_type arg_a, FLO_type arg_b)
253.1554 ++{
253.1555 ++  fp_number_type a;
253.1556 ++  fp_number_type b;
253.1557 ++  fp_number_type tmp;
253.1558 ++  fp_number_type *res;
253.1559 ++  FLO_union_type au, bu;
253.1560 ++
253.1561 ++  au.value = arg_a;
253.1562 ++  bu.value = arg_b;
253.1563 ++
253.1564 ++  unpack_d (&au, &a);
253.1565 ++  unpack_d (&bu, &b);
253.1566 ++
253.1567 ++  res = _fpmul_parts (&a, &b, &tmp);
253.1568 ++
253.1569 ++  return pack_d (res);
253.1570 ++}
253.1571 ++#endif /* L_mul_sf || L_mul_df */
253.1572 ++
253.1573 ++#if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf)
253.1574 ++static inline __attribute__ ((__always_inline__)) fp_number_type *
253.1575 ++_fpdiv_parts (fp_number_type * a,
253.1576 ++	      fp_number_type * b)
253.1577 ++{
253.1578 ++  fractype bit;
253.1579 ++  fractype numerator;
253.1580 ++  fractype denominator;
253.1581 ++  fractype quotient;
253.1582 ++
253.1583 ++  if (isnan (a))
253.1584 ++    {
253.1585 ++      return a;
253.1586 ++    }
253.1587 ++  if (isnan (b))
253.1588 ++    {
253.1589 ++      return b;
253.1590 ++    }
253.1591 ++
253.1592 ++  a->sign = a->sign ^ b->sign;
253.1593 ++
253.1594 ++  if (isinf (a) || iszero (a))
253.1595 ++    {
253.1596 ++      if (a->class == b->class)
253.1597 ++	return nan ();
253.1598 ++      return a;
253.1599 ++    }
253.1600 ++
253.1601 ++  if (isinf (b))
253.1602 ++    {
253.1603 ++      a->fraction.ll = 0;
253.1604 ++      a->normal_exp = 0;
253.1605 ++      return a;
253.1606 ++    }
253.1607 ++  if (iszero (b))
253.1608 ++    {
253.1609 ++      a->class = CLASS_INFINITY;
253.1610 ++      return a;
253.1611 ++    }
253.1612 ++
253.1613 ++  /* Calculate the mantissa by multiplying both 64bit numbers to get a
253.1614 ++     128 bit number */
253.1615 ++  {
253.1616 ++    /* quotient =
253.1617 ++       ( numerator / denominator) * 2^(numerator exponent -  denominator exponent)
253.1618 ++     */
253.1619 ++
253.1620 ++    a->normal_exp = a->normal_exp - b->normal_exp;
253.1621 ++    numerator = a->fraction.ll;
253.1622 ++    denominator = b->fraction.ll;
253.1623 ++
253.1624 ++    if (numerator < denominator)
253.1625 ++      {
253.1626 ++	/* Fraction will be less than 1.0 */
253.1627 ++	numerator *= 2;
253.1628 ++	a->normal_exp--;
253.1629 ++      }
253.1630 ++    bit = IMPLICIT_1;
253.1631 ++    quotient = 0;
253.1632 ++    /* ??? Does divide one bit at a time.  Optimize.  */
253.1633 ++    while (bit)
253.1634 ++      {
253.1635 ++	if (numerator >= denominator)
253.1636 ++	  {
253.1637 ++	    quotient |= bit;
253.1638 ++	    numerator -= denominator;
253.1639 ++	  }
253.1640 ++	bit >>= 1;
253.1641 ++	numerator *= 2;
253.1642 ++      }
253.1643 ++
253.1644 ++    if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB)
253.1645 ++      {
253.1646 ++	if (quotient & (1 << NGARDS))
253.1647 ++	  {
253.1648 ++	    /* half way, so round to even */
253.1649 ++	    quotient += GARDROUND + 1;
253.1650 ++	  }
253.1651 ++	else if (numerator)
253.1652 ++	  {
253.1653 ++	    /* but we really weren't half way, more bits exist */
253.1654 ++	    quotient += GARDROUND + 1;
253.1655 ++	  }
253.1656 ++      }
253.1657 ++
253.1658 ++    a->fraction.ll = quotient;
253.1659 ++    return (a);
253.1660 ++  }
253.1661 ++}
253.1662 ++
253.1663 ++FLO_type
253.1664 ++divide (FLO_type arg_a, FLO_type arg_b)
253.1665 ++{
253.1666 ++  fp_number_type a;
253.1667 ++  fp_number_type b;
253.1668 ++  fp_number_type *res;
253.1669 ++  FLO_union_type au, bu;
253.1670 ++
253.1671 ++  au.value = arg_a;
253.1672 ++  bu.value = arg_b;
253.1673 ++
253.1674 ++  unpack_d (&au, &a);
253.1675 ++  unpack_d (&bu, &b);
253.1676 ++
253.1677 ++  res = _fpdiv_parts (&a, &b);
253.1678 ++
253.1679 ++  return pack_d (res);
253.1680 ++}
253.1681 ++#endif /* L_div_sf || L_div_df */
253.1682 ++
253.1683 ++#if defined(L_fpcmp_parts_sf) || defined(L_fpcmp_parts_df) \
253.1684 ++    || defined(L_fpcmp_parts_tf)
253.1685 ++/* according to the demo, fpcmp returns a comparison with 0... thus
253.1686 ++   a<b -> -1
253.1687 ++   a==b -> 0
253.1688 ++   a>b -> +1
253.1689 ++ */
253.1690 ++
253.1691 ++int
253.1692 ++__fpcmp_parts (fp_number_type * a, fp_number_type * b)
253.1693 ++{
253.1694 ++#if 0
253.1695 ++  /* either nan -> unordered. Must be checked outside of this routine.  */
253.1696 ++  if (isnan (a) && isnan (b))
253.1697 ++    {
253.1698 ++      return 1;			/* still unordered! */
253.1699 ++    }
253.1700 ++#endif
253.1701 ++
253.1702 ++  if (isnan (a) || isnan (b))
253.1703 ++    {
253.1704 ++      return 1;			/* how to indicate unordered compare? */
253.1705 ++    }
253.1706 ++  if (isinf (a) && isinf (b))
253.1707 ++    {
253.1708 ++      /* +inf > -inf, but +inf != +inf */
253.1709 ++      /* b    \a| +inf(0)| -inf(1)
253.1710 ++       ______\+--------+--------
253.1711 ++       +inf(0)| a==b(0)| a<b(-1)
253.1712 ++       -------+--------+--------
253.1713 ++       -inf(1)| a>b(1) | a==b(0)
253.1714 ++       -------+--------+--------
253.1715 ++       So since unordered must be nonzero, just line up the columns...
253.1716 ++       */
253.1717 ++      return b->sign - a->sign;
253.1718 ++    }
253.1719 ++  /* but not both...  */
253.1720 ++  if (isinf (a))
253.1721 ++    {
253.1722 ++      return a->sign ? -1 : 1;
253.1723 ++    }
253.1724 ++  if (isinf (b))
253.1725 ++    {
253.1726 ++      return b->sign ? 1 : -1;
253.1727 ++    }
253.1728 ++  if (iszero (a) && iszero (b))
253.1729 ++    {
253.1730 ++      return 0;
253.1731 ++    }
253.1732 ++  if (iszero (a))
253.1733 ++    {
253.1734 ++      return b->sign ? 1 : -1;
253.1735 ++    }
253.1736 ++  if (iszero (b))
253.1737 ++    {
253.1738 ++      return a->sign ? -1 : 1;
253.1739 ++    }
253.1740 ++  /* now both are "normal".  */
253.1741 ++  if (a->sign != b->sign)
253.1742 ++    {
253.1743 ++      /* opposite signs */
253.1744 ++      return a->sign ? -1 : 1;
253.1745 ++    }
253.1746 ++  /* same sign; exponents? */
253.1747 ++  if (a->normal_exp > b->normal_exp)
253.1748 ++    {
253.1749 ++      return a->sign ? -1 : 1;
253.1750 ++    }
253.1751 ++  if (a->normal_exp < b->normal_exp)
253.1752 ++    {
253.1753 ++      return a->sign ? 1 : -1;
253.1754 ++    }
253.1755 ++  /* same exponents; check size.  */
253.1756 ++  if (a->fraction.ll > b->fraction.ll)
253.1757 ++    {
253.1758 ++      return a->sign ? -1 : 1;
253.1759 ++    }
253.1760 ++  if (a->fraction.ll < b->fraction.ll)
253.1761 ++    {
253.1762 ++      return a->sign ? 1 : -1;
253.1763 ++    }
253.1764 ++  /* after all that, they're equal.  */
253.1765 ++  return 0;
253.1766 ++}
253.1767 ++#endif
253.1768 ++
253.1769 ++#if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compoare_tf)
253.1770 ++CMPtype
253.1771 ++compare (FLO_type arg_a, FLO_type arg_b)
253.1772 ++{
253.1773 ++  fp_number_type a;
253.1774 ++  fp_number_type b;
253.1775 ++  FLO_union_type au, bu;
253.1776 ++
253.1777 ++  au.value = arg_a;
253.1778 ++  bu.value = arg_b;
253.1779 ++
253.1780 ++  unpack_d (&au, &a);
253.1781 ++  unpack_d (&bu, &b);
253.1782 ++
253.1783 ++  return __fpcmp_parts (&a, &b);
253.1784 ++}
253.1785 ++#endif /* L_compare_sf || L_compare_df */
253.1786 ++
253.1787 ++#ifndef US_SOFTWARE_GOFAST
253.1788 ++
253.1789 ++/* These should be optimized for their specific tasks someday.  */
253.1790 ++
253.1791 ++#if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf)
253.1792 ++CMPtype
253.1793 ++_eq_f2 (FLO_type arg_a, FLO_type arg_b)
253.1794 ++{
253.1795 ++  fp_number_type a;
253.1796 ++  fp_number_type b;
253.1797 ++  FLO_union_type au, bu;
253.1798 ++
253.1799 ++  au.value = arg_a;
253.1800 ++  bu.value = arg_b;
253.1801 ++
253.1802 ++  unpack_d (&au, &a);
253.1803 ++  unpack_d (&bu, &b);
253.1804 ++
253.1805 ++  if (isnan (&a) || isnan (&b))
253.1806 ++    return 1;			/* false, truth == 0 */
253.1807 ++
253.1808 ++  return __fpcmp_parts (&a, &b) ;
253.1809 ++}
253.1810 ++#endif /* L_eq_sf || L_eq_df */
253.1811 ++
253.1812 ++#if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf)
253.1813 ++CMPtype
253.1814 ++_ne_f2 (FLO_type arg_a, FLO_type arg_b)
253.1815 ++{
253.1816 ++  fp_number_type a;
253.1817 ++  fp_number_type b;
253.1818 ++  FLO_union_type au, bu;
253.1819 ++
253.1820 ++  au.value = arg_a;
253.1821 ++  bu.value = arg_b;
253.1822 ++
253.1823 ++  unpack_d (&au, &a);
253.1824 ++  unpack_d (&bu, &b);
253.1825 ++
253.1826 ++  if (isnan (&a) || isnan (&b))
253.1827 ++    return 1;			/* true, truth != 0 */
253.1828 ++
253.1829 ++  return  __fpcmp_parts (&a, &b) ;
253.1830 ++}
253.1831 ++#endif /* L_ne_sf || L_ne_df */
253.1832 ++
253.1833 ++#if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf)
253.1834 ++CMPtype
253.1835 ++_gt_f2 (FLO_type arg_a, FLO_type arg_b)
253.1836 ++{
253.1837 ++  fp_number_type a;
253.1838 ++  fp_number_type b;
253.1839 ++  FLO_union_type au, bu;
253.1840 ++
253.1841 ++  au.value = arg_a;
253.1842 ++  bu.value = arg_b;
253.1843 ++
253.1844 ++  unpack_d (&au, &a);
253.1845 ++  unpack_d (&bu, &b);
253.1846 ++
253.1847 ++  if (isnan (&a) || isnan (&b))
253.1848 ++    return -1;			/* false, truth > 0 */
253.1849 ++
253.1850 ++  return __fpcmp_parts (&a, &b);
253.1851 ++}
253.1852 ++#endif /* L_gt_sf || L_gt_df */
253.1853 ++
253.1854 ++#if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf)
253.1855 ++CMPtype
253.1856 ++_ge_f2 (FLO_type arg_a, FLO_type arg_b)
253.1857 ++{
253.1858 ++  fp_number_type a;
253.1859 ++  fp_number_type b;
253.1860 ++  FLO_union_type au, bu;
253.1861 ++
253.1862 ++  au.value = arg_a;
253.1863 ++  bu.value = arg_b;
253.1864 ++
253.1865 ++  unpack_d (&au, &a);
253.1866 ++  unpack_d (&bu, &b);
253.1867 ++
253.1868 ++  if (isnan (&a) || isnan (&b))
253.1869 ++    return -1;			/* false, truth >= 0 */
253.1870 ++  return __fpcmp_parts (&a, &b) ;
253.1871 ++}
253.1872 ++#endif /* L_ge_sf || L_ge_df */
253.1873 ++
253.1874 ++#if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf)
253.1875 ++CMPtype
253.1876 ++_lt_f2 (FLO_type arg_a, FLO_type arg_b)
253.1877 ++{
253.1878 ++  fp_number_type a;
253.1879 ++  fp_number_type b;
253.1880 ++  FLO_union_type au, bu;
253.1881 ++
253.1882 ++  au.value = arg_a;
253.1883 ++  bu.value = arg_b;
253.1884 ++
253.1885 ++  unpack_d (&au, &a);
253.1886 ++  unpack_d (&bu, &b);
253.1887 ++
253.1888 ++  if (isnan (&a) || isnan (&b))
253.1889 ++    return 1;			/* false, truth < 0 */
253.1890 ++
253.1891 ++  return __fpcmp_parts (&a, &b);
253.1892 ++}
253.1893 ++#endif /* L_lt_sf || L_lt_df */
253.1894 ++
253.1895 ++#if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf)
253.1896 ++CMPtype
253.1897 ++_le_f2 (FLO_type arg_a, FLO_type arg_b)
253.1898 ++{
253.1899 ++  fp_number_type a;
253.1900 ++  fp_number_type b;
253.1901 ++  FLO_union_type au, bu;
253.1902 ++
253.1903 ++  au.value = arg_a;
253.1904 ++  bu.value = arg_b;
253.1905 ++
253.1906 ++  unpack_d (&au, &a);
253.1907 ++  unpack_d (&bu, &b);
253.1908 ++
253.1909 ++  if (isnan (&a) || isnan (&b))
253.1910 ++    return 1;			/* false, truth <= 0 */
253.1911 ++
253.1912 ++  return __fpcmp_parts (&a, &b) ;
253.1913 ++}
253.1914 ++#endif /* L_le_sf || L_le_df */
253.1915 ++
253.1916 ++#endif /* ! US_SOFTWARE_GOFAST */
253.1917 ++
253.1918 ++#if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf)
253.1919 ++CMPtype
253.1920 ++_unord_f2 (FLO_type arg_a, FLO_type arg_b)
253.1921 ++{
253.1922 ++  fp_number_type a;
253.1923 ++  fp_number_type b;
253.1924 ++  FLO_union_type au, bu;
253.1925 ++
253.1926 ++  au.value = arg_a;
253.1927 ++  bu.value = arg_b;
253.1928 ++
253.1929 ++  unpack_d (&au, &a);
253.1930 ++  unpack_d (&bu, &b);
253.1931 ++
253.1932 ++  return (isnan (&a) || isnan (&b));
253.1933 ++}
253.1934 ++#endif /* L_unord_sf || L_unord_df */
253.1935 ++
253.1936 ++#if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf)
253.1937 ++FLO_type
253.1938 ++si_to_float (SItype arg_a)
253.1939 ++{
253.1940 ++  fp_number_type in;
253.1941 ++
253.1942 ++  in.class = CLASS_NUMBER;
253.1943 ++  in.sign = arg_a < 0;
253.1944 ++  if (!arg_a)
253.1945 ++    {
253.1946 ++      in.class = CLASS_ZERO;
253.1947 ++    }
253.1948 ++  else
253.1949 ++    {
253.1950 ++      in.normal_exp = FRACBITS + NGARDS;
253.1951 ++      if (in.sign) 
253.1952 ++	{
253.1953 ++	  /* Special case for minint, since there is no +ve integer
253.1954 ++	     representation for it */
253.1955 ++	  if (arg_a == (- MAX_SI_INT - 1))
253.1956 ++	    {
253.1957 ++	      return (FLO_type)(- MAX_SI_INT - 1);
253.1958 ++	    }
253.1959 ++	  in.fraction.ll = (-arg_a);
253.1960 ++	}
253.1961 ++      else
253.1962 ++	in.fraction.ll = arg_a;
253.1963 ++
253.1964 ++      while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
253.1965 ++	{
253.1966 ++	  in.fraction.ll <<= 1;
253.1967 ++	  in.normal_exp -= 1;
253.1968 ++	}
253.1969 ++    }
253.1970 ++  return pack_d (&in);
253.1971 ++}
253.1972 ++#endif /* L_si_to_sf || L_si_to_df */
253.1973 ++
253.1974 ++#if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf)
253.1975 ++FLO_type
253.1976 ++usi_to_float (USItype arg_a)
253.1977 ++{
253.1978 ++  fp_number_type in;
253.1979 ++
253.1980 ++  in.sign = 0;
253.1981 ++  if (!arg_a)
253.1982 ++    {
253.1983 ++      in.class = CLASS_ZERO;
253.1984 ++    }
253.1985 ++  else
253.1986 ++    {
253.1987 ++      in.class = CLASS_NUMBER;
253.1988 ++      in.normal_exp = FRACBITS + NGARDS;
253.1989 ++      in.fraction.ll = arg_a;
253.1990 ++
253.1991 ++      while (in.fraction.ll > ((fractype)1 << (FRACBITS + NGARDS)))
253.1992 ++        {
253.1993 ++          in.fraction.ll >>= 1;
253.1994 ++          in.normal_exp += 1;
253.1995 ++        }
253.1996 ++      while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
253.1997 ++	{
253.1998 ++	  in.fraction.ll <<= 1;
253.1999 ++	  in.normal_exp -= 1;
253.2000 ++	}
253.2001 ++    }
253.2002 ++  return pack_d (&in);
253.2003 ++}
253.2004 ++#endif
253.2005 ++
253.2006 ++#if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si)
253.2007 ++SItype
253.2008 ++float_to_si (FLO_type arg_a)
253.2009 ++{
253.2010 ++  fp_number_type a;
253.2011 ++  SItype tmp;
253.2012 ++  FLO_union_type au;
253.2013 ++
253.2014 ++  au.value = arg_a;
253.2015 ++  unpack_d (&au, &a);
253.2016 ++
253.2017 ++  if (iszero (&a))
253.2018 ++    return 0;
253.2019 ++  if (isnan (&a))
253.2020 ++    return 0;
253.2021 ++  /* get reasonable MAX_SI_INT...  */
253.2022 ++  if (isinf (&a))
253.2023 ++    return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
253.2024 ++  /* it is a number, but a small one */
253.2025 ++  if (a.normal_exp < 0)
253.2026 ++    return 0;
253.2027 ++  if (a.normal_exp > BITS_PER_SI - 2)
253.2028 ++    return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
253.2029 ++  tmp = a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
253.2030 ++  return a.sign ? (-tmp) : (tmp);
253.2031 ++}
253.2032 ++#endif /* L_sf_to_si || L_df_to_si */
253.2033 ++
253.2034 ++#if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi)
253.2035 ++#if defined US_SOFTWARE_GOFAST || defined(L_tf_to_usi)
253.2036 ++/* While libgcc2.c defines its own __fixunssfsi and __fixunsdfsi routines,
253.2037 ++   we also define them for GOFAST because the ones in libgcc2.c have the
253.2038 ++   wrong names and I'd rather define these here and keep GOFAST CYG-LOC's
253.2039 ++   out of libgcc2.c.  We can't define these here if not GOFAST because then
253.2040 ++   there'd be duplicate copies.  */
253.2041 ++
253.2042 ++USItype
253.2043 ++float_to_usi (FLO_type arg_a)
253.2044 ++{
253.2045 ++  fp_number_type a;
253.2046 ++  FLO_union_type au;
253.2047 ++
253.2048 ++  au.value = arg_a;
253.2049 ++  unpack_d (&au, &a);
253.2050 ++
253.2051 ++  if (iszero (&a))
253.2052 ++    return 0;
253.2053 ++  if (isnan (&a))
253.2054 ++    return 0;
253.2055 ++  /* it is a negative number */
253.2056 ++  if (a.sign)
253.2057 ++    return 0;
253.2058 ++  /* get reasonable MAX_USI_INT...  */
253.2059 ++  if (isinf (&a))
253.2060 ++    return MAX_USI_INT;
253.2061 ++  /* it is a number, but a small one */
253.2062 ++  if (a.normal_exp < 0)
253.2063 ++    return 0;
253.2064 ++  if (a.normal_exp > BITS_PER_SI - 1)
253.2065 ++    return MAX_USI_INT;
253.2066 ++  else if (a.normal_exp > (FRACBITS + NGARDS))
253.2067 ++    return a.fraction.ll << (a.normal_exp - (FRACBITS + NGARDS));
253.2068 ++  else
253.2069 ++    return a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
253.2070 ++}
253.2071 ++#endif /* US_SOFTWARE_GOFAST */
253.2072 ++#endif /* L_sf_to_usi || L_df_to_usi */
253.2073 ++
253.2074 ++#if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf)
253.2075 ++FLO_type
253.2076 ++negate (FLO_type arg_a)
253.2077 ++{
253.2078 ++  fp_number_type a;
253.2079 ++  FLO_union_type au;
253.2080 ++
253.2081 ++  au.value = arg_a;
253.2082 ++  unpack_d (&au, &a);
253.2083 ++
253.2084 ++  flip_sign (&a);
253.2085 ++  return pack_d (&a);
253.2086 ++}
253.2087 ++#endif /* L_negate_sf || L_negate_df */
253.2088 ++
253.2089 ++#ifdef FLOAT
253.2090 ++
253.2091 ++#if defined(L_make_sf)
253.2092 ++SFtype
253.2093 ++__make_fp(fp_class_type class,
253.2094 ++	     unsigned int sign,
253.2095 ++	     int exp, 
253.2096 ++	     USItype frac)
253.2097 ++{
253.2098 ++  fp_number_type in;
253.2099 ++
253.2100 ++  in.class = class;
253.2101 ++  in.sign = sign;
253.2102 ++  in.normal_exp = exp;
253.2103 ++  in.fraction.ll = frac;
253.2104 ++  return pack_d (&in);
253.2105 ++}
253.2106 ++#endif /* L_make_sf */
253.2107 ++
253.2108 ++#ifndef FLOAT_ONLY
253.2109 ++
253.2110 ++/* This enables one to build an fp library that supports float but not double.
253.2111 ++   Otherwise, we would get an undefined reference to __make_dp.
253.2112 ++   This is needed for some 8-bit ports that can't handle well values that
253.2113 ++   are 8-bytes in size, so we just don't support double for them at all.  */
253.2114 ++
253.2115 ++#if defined(L_sf_to_df)
253.2116 ++DFtype
253.2117 ++sf_to_df (SFtype arg_a)
253.2118 ++{
253.2119 ++  fp_number_type in;
253.2120 ++  FLO_union_type au;
253.2121 ++
253.2122 ++  au.value = arg_a;
253.2123 ++  unpack_d (&au, &in);
253.2124 ++
253.2125 ++  return __make_dp (in.class, in.sign, in.normal_exp,
253.2126 ++		    ((UDItype) in.fraction.ll) << F_D_BITOFF);
253.2127 ++}
253.2128 ++#endif /* L_sf_to_df */
253.2129 ++
253.2130 ++#if defined(L_sf_to_tf) && defined(TMODES)
253.2131 ++TFtype
253.2132 ++sf_to_tf (SFtype arg_a)
253.2133 ++{
253.2134 ++  fp_number_type in;
253.2135 ++  FLO_union_type au;
253.2136 ++
253.2137 ++  au.value = arg_a;
253.2138 ++  unpack_d (&au, &in);
253.2139 ++
253.2140 ++  return __make_tp (in.class, in.sign, in.normal_exp,
253.2141 ++		    ((UTItype) in.fraction.ll) << F_T_BITOFF);
253.2142 ++}
253.2143 ++#endif /* L_sf_to_df */
253.2144 ++
253.2145 ++#endif /* ! FLOAT_ONLY */
253.2146 ++#endif /* FLOAT */
253.2147 ++
253.2148 ++#ifndef FLOAT
253.2149 ++
253.2150 ++extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
253.2151 ++
253.2152 ++#if defined(L_make_df)
253.2153 ++DFtype
253.2154 ++__make_dp (fp_class_type class, unsigned int sign, int exp, UDItype frac)
253.2155 ++{
253.2156 ++  fp_number_type in;
253.2157 ++
253.2158 ++  in.class = class;
253.2159 ++  in.sign = sign;
253.2160 ++  in.normal_exp = exp;
253.2161 ++  in.fraction.ll = frac;
253.2162 ++  return pack_d (&in);
253.2163 ++}
253.2164 ++#endif /* L_make_df */
253.2165 ++
253.2166 ++#if defined(L_df_to_sf)
253.2167 ++SFtype
253.2168 ++df_to_sf (DFtype arg_a)
253.2169 ++{
253.2170 ++  fp_number_type in;
253.2171 ++  USItype sffrac;
253.2172 ++  FLO_union_type au;
253.2173 ++
253.2174 ++  au.value = arg_a;
253.2175 ++  unpack_d (&au, &in);
253.2176 ++
253.2177 ++  sffrac = in.fraction.ll >> F_D_BITOFF;
253.2178 ++
253.2179 ++  /* We set the lowest guard bit in SFFRAC if we discarded any non
253.2180 ++     zero bits.  */
253.2181 ++  if ((in.fraction.ll & (((USItype) 1 << F_D_BITOFF) - 1)) != 0)
253.2182 ++    sffrac |= 1;
253.2183 ++
253.2184 ++  return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
253.2185 ++}
253.2186 ++#endif /* L_df_to_sf */
253.2187 ++
253.2188 ++#if defined(L_df_to_tf) && defined(TMODES) \
253.2189 ++    && !defined(FLOAT) && !defined(TFLOAT)
253.2190 ++TFtype
253.2191 ++df_to_tf (DFtype arg_a)
253.2192 ++{
253.2193 ++  fp_number_type in;
253.2194 ++  FLO_union_type au;
253.2195 ++
253.2196 ++  au.value = arg_a;
253.2197 ++  unpack_d (&au, &in);
253.2198 ++
253.2199 ++  return __make_tp (in.class, in.sign, in.normal_exp,
253.2200 ++		    ((UTItype) in.fraction.ll) << D_T_BITOFF);
253.2201 ++}
253.2202 ++#endif /* L_sf_to_df */
253.2203 ++
253.2204 ++#ifdef TFLOAT
253.2205 ++#if defined(L_make_tf)
253.2206 ++TFtype
253.2207 ++__make_tp(fp_class_type class,
253.2208 ++	     unsigned int sign,
253.2209 ++	     int exp, 
253.2210 ++	     UTItype frac)
253.2211 ++{
253.2212 ++  fp_number_type in;
253.2213 ++
253.2214 ++  in.class = class;
253.2215 ++  in.sign = sign;
253.2216 ++  in.normal_exp = exp;
253.2217 ++  in.fraction.ll = frac;
253.2218 ++  return pack_d (&in);
253.2219 ++}
253.2220 ++#endif /* L_make_tf */
253.2221 ++
253.2222 ++#if defined(L_tf_to_df)
253.2223 ++DFtype
253.2224 ++tf_to_df (TFtype arg_a)
253.2225 ++{
253.2226 ++  fp_number_type in;
253.2227 ++  UDItype sffrac;
253.2228 ++  FLO_union_type au;
253.2229 ++
253.2230 ++  au.value = arg_a;
253.2231 ++  unpack_d (&au, &in);
253.2232 ++
253.2233 ++  sffrac = in.fraction.ll >> D_T_BITOFF;
253.2234 ++
253.2235 ++  /* We set the lowest guard bit in SFFRAC if we discarded any non
253.2236 ++     zero bits.  */
253.2237 ++  if ((in.fraction.ll & (((UTItype) 1 << D_T_BITOFF) - 1)) != 0)
253.2238 ++    sffrac |= 1;
253.2239 ++
253.2240 ++  return __make_dp (in.class, in.sign, in.normal_exp, sffrac);
253.2241 ++}
253.2242 ++#endif /* L_tf_to_df */
253.2243 ++
253.2244 ++#if defined(L_tf_to_sf)
253.2245 ++SFtype
253.2246 ++tf_to_sf (TFtype arg_a)
253.2247 ++{
253.2248 ++  fp_number_type in;
253.2249 ++  USItype sffrac;
253.2250 ++  FLO_union_type au;
253.2251 ++
253.2252 ++  au.value = arg_a;
253.2253 ++  unpack_d (&au, &in);
253.2254 ++
253.2255 ++  sffrac = in.fraction.ll >> F_T_BITOFF;
253.2256 ++
253.2257 ++  /* We set the lowest guard bit in SFFRAC if we discarded any non
253.2258 ++     zero bits.  */
253.2259 ++  if ((in.fraction.ll & (((UTItype) 1 << F_T_BITOFF) - 1)) != 0)
253.2260 ++    sffrac |= 1;
253.2261 ++
253.2262 ++  return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
253.2263 ++}
253.2264 ++#endif /* L_tf_to_sf */
253.2265 ++#endif /* TFLOAT */
253.2266 ++
253.2267 ++#endif /* ! FLOAT */
253.2268 ++#endif /* !EXTENDED_FLOAT_STUBS */
253.2269 +--- gcc-3.4.3/gcc/config/nios2/nios2-fp-bit.c
253.2270 ++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-fp-bit.c
253.2271 +@@ -0,0 +1,1652 @@
253.2272 ++#define FLOAT
253.2273 ++/* This is a software floating point library which can be used
253.2274 ++   for targets without hardware floating point. 
253.2275 ++   Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
253.2276 ++   Free Software Foundation, Inc.
253.2277 ++
253.2278 ++This file is free software; you can redistribute it and/or modify it
253.2279 ++under the terms of the GNU General Public License as published by the
253.2280 ++Free Software Foundation; either version 2, or (at your option) any
253.2281 ++later version.
253.2282 ++
253.2283 ++In addition to the permissions in the GNU General Public License, the
253.2284 ++Free Software Foundation gives you unlimited permission to link the
253.2285 ++compiled version of this file with other programs, and to distribute
253.2286 ++those programs without any restriction coming from the use of this
253.2287 ++file.  (The General Public License restrictions do apply in other
253.2288 ++respects; for example, they cover modification of the file, and
253.2289 ++distribution when not linked into another program.)
253.2290 ++
253.2291 ++This file is distributed in the hope that it will be useful, but
253.2292 ++WITHOUT ANY WARRANTY; without even the implied warranty of
253.2293 ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
253.2294 ++General Public License for more details.
253.2295 ++
253.2296 ++You should have received a copy of the GNU General Public License
253.2297 ++along with this program; see the file COPYING.  If not, write to
253.2298 ++the Free Software Foundation, 59 Temple Place - Suite 330,
253.2299 ++Boston, MA 02111-1307, USA.  */
253.2300 ++
253.2301 ++/* As a special exception, if you link this library with other files,
253.2302 ++   some of which are compiled with GCC, to produce an executable,
253.2303 ++   this library does not by itself cause the resulting executable
253.2304 ++   to be covered by the GNU General Public License.
253.2305 ++   This exception does not however invalidate any other reasons why
253.2306 ++   the executable file might be covered by the GNU General Public License.  */
253.2307 ++
253.2308 ++/* This implements IEEE 754 format arithmetic, but does not provide a
253.2309 ++   mechanism for setting the rounding mode, or for generating or handling
253.2310 ++   exceptions.
253.2311 ++
253.2312 ++   The original code by Steve Chamberlain, hacked by Mark Eichin and Jim
253.2313 ++   Wilson, all of Cygnus Support.  */
253.2314 ++
253.2315 ++/* The intended way to use this file is to make two copies, add `#define FLOAT'
253.2316 ++   to one copy, then compile both copies and add them to libgcc.a.  */
253.2317 ++
253.2318 ++#include "tconfig.h"
253.2319 ++#include "coretypes.h"
253.2320 ++#include "tm.h"
253.2321 ++#include "config/fp-bit.h"
253.2322 ++
253.2323 ++/* The following macros can be defined to change the behavior of this file:
253.2324 ++   FLOAT: Implement a `float', aka SFmode, fp library.  If this is not
253.2325 ++     defined, then this file implements a `double', aka DFmode, fp library.
253.2326 ++   FLOAT_ONLY: Used with FLOAT, to implement a `float' only library, i.e.
253.2327 ++     don't include float->double conversion which requires the double library.
253.2328 ++     This is useful only for machines which can't support doubles, e.g. some
253.2329 ++     8-bit processors.
253.2330 ++   CMPtype: Specify the type that floating point compares should return.
253.2331 ++     This defaults to SItype, aka int.
253.2332 ++   US_SOFTWARE_GOFAST: This makes all entry points use the same names as the
253.2333 ++     US Software goFast library.
253.2334 ++   _DEBUG_BITFLOAT: This makes debugging the code a little easier, by adding
253.2335 ++     two integers to the FLO_union_type.
253.2336 ++   NO_DENORMALS: Disable handling of denormals.
253.2337 ++   NO_NANS: Disable nan and infinity handling
253.2338 ++   SMALL_MACHINE: Useful when operations on QIs and HIs are faster
253.2339 ++     than on an SI */
253.2340 ++
253.2341 ++/* We don't currently support extended floats (long doubles) on machines
253.2342 ++   without hardware to deal with them.
253.2343 ++
253.2344 ++   These stubs are just to keep the linker from complaining about unresolved
253.2345 ++   references which can be pulled in from libio & libstdc++, even if the
253.2346 ++   user isn't using long doubles.  However, they may generate an unresolved
253.2347 ++   external to abort if abort is not used by the function, and the stubs
253.2348 ++   are referenced from within libc, since libgcc goes before and after the
253.2349 ++   system library.  */
253.2350 ++
253.2351 ++#ifdef DECLARE_LIBRARY_RENAMES
253.2352 ++  DECLARE_LIBRARY_RENAMES
253.2353 ++#endif
253.2354 ++
253.2355 ++#ifdef EXTENDED_FLOAT_STUBS
253.2356 ++extern void abort (void);
253.2357 ++void __extendsfxf2 (void) { abort(); }
253.2358 ++void __extenddfxf2 (void) { abort(); }
253.2359 ++void __truncxfdf2 (void) { abort(); }
253.2360 ++void __truncxfsf2 (void) { abort(); }
253.2361 ++void __fixxfsi (void) { abort(); }
253.2362 ++void __floatsixf (void) { abort(); }
253.2363 ++void __addxf3 (void) { abort(); }
253.2364 ++void __subxf3 (void) { abort(); }
253.2365 ++void __mulxf3 (void) { abort(); }
253.2366 ++void __divxf3 (void) { abort(); }
253.2367 ++void __negxf2 (void) { abort(); }
253.2368 ++void __eqxf2 (void) { abort(); }
253.2369 ++void __nexf2 (void) { abort(); }
253.2370 ++void __gtxf2 (void) { abort(); }
253.2371 ++void __gexf2 (void) { abort(); }
253.2372 ++void __lexf2 (void) { abort(); }
253.2373 ++void __ltxf2 (void) { abort(); }
253.2374 ++
253.2375 ++void __extendsftf2 (void) { abort(); }
253.2376 ++void __extenddftf2 (void) { abort(); }
253.2377 ++void __trunctfdf2 (void) { abort(); }
253.2378 ++void __trunctfsf2 (void) { abort(); }
253.2379 ++void __fixtfsi (void) { abort(); }
253.2380 ++void __floatsitf (void) { abort(); }
253.2381 ++void __addtf3 (void) { abort(); }
253.2382 ++void __subtf3 (void) { abort(); }
253.2383 ++void __multf3 (void) { abort(); }
253.2384 ++void __divtf3 (void) { abort(); }
253.2385 ++void __negtf2 (void) { abort(); }
253.2386 ++void __eqtf2 (void) { abort(); }
253.2387 ++void __netf2 (void) { abort(); }
253.2388 ++void __gttf2 (void) { abort(); }
253.2389 ++void __getf2 (void) { abort(); }
253.2390 ++void __letf2 (void) { abort(); }
253.2391 ++void __lttf2 (void) { abort(); }
253.2392 ++#else	/* !EXTENDED_FLOAT_STUBS, rest of file */
253.2393 ++
253.2394 ++/* IEEE "special" number predicates */
253.2395 ++
253.2396 ++#ifdef NO_NANS
253.2397 ++
253.2398 ++#define nan() 0
253.2399 ++#define isnan(x) 0
253.2400 ++#define isinf(x) 0
253.2401 ++#else
253.2402 ++
253.2403 ++#if   defined L_thenan_sf
253.2404 ++const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
253.2405 ++#elif defined L_thenan_df
253.2406 ++const fp_number_type __thenan_df = { CLASS_SNAN, 0, 0, {(fractype) 0} };
253.2407 ++#elif defined L_thenan_tf
253.2408 ++const fp_number_type __thenan_tf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
253.2409 ++#elif defined TFLOAT
253.2410 ++extern const fp_number_type __thenan_tf;
253.2411 ++#elif defined FLOAT
253.2412 ++extern const fp_number_type __thenan_sf;
253.2413 ++#else
253.2414 ++extern const fp_number_type __thenan_df;
253.2415 ++#endif
253.2416 ++
253.2417 ++INLINE
253.2418 ++static fp_number_type *
253.2419 ++nan (void)
253.2420 ++{
253.2421 ++  /* Discard the const qualifier...  */
253.2422 ++#ifdef TFLOAT
253.2423 ++  return (fp_number_type *) (& __thenan_tf);
253.2424 ++#elif defined FLOAT  
253.2425 ++  return (fp_number_type *) (& __thenan_sf);
253.2426 ++#else
253.2427 ++  return (fp_number_type *) (& __thenan_df);
253.2428 ++#endif
253.2429 ++}
253.2430 ++
253.2431 ++INLINE
253.2432 ++static int
253.2433 ++isnan ( fp_number_type *  x)
253.2434 ++{
253.2435 ++  return x->class == CLASS_SNAN || x->class == CLASS_QNAN;
253.2436 ++}
253.2437 ++
253.2438 ++INLINE
253.2439 ++static int
253.2440 ++isinf ( fp_number_type *  x)
253.2441 ++{
253.2442 ++  return x->class == CLASS_INFINITY;
253.2443 ++}
253.2444 ++
253.2445 ++#endif /* NO_NANS */
253.2446 ++
253.2447 ++INLINE
253.2448 ++static int
253.2449 ++iszero ( fp_number_type *  x)
253.2450 ++{
253.2451 ++  return x->class == CLASS_ZERO;
253.2452 ++}
253.2453 ++
253.2454 ++INLINE 
253.2455 ++static void
253.2456 ++flip_sign ( fp_number_type *  x)
253.2457 ++{
253.2458 ++  x->sign = !x->sign;
253.2459 ++}
253.2460 ++
253.2461 ++extern FLO_type pack_d ( fp_number_type * );
253.2462 ++
253.2463 ++#if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf)
253.2464 ++FLO_type
253.2465 ++pack_d ( fp_number_type *  src)
253.2466 ++{
253.2467 ++  FLO_union_type dst;
253.2468 ++  fractype fraction = src->fraction.ll;	/* wasn't unsigned before? */
253.2469 ++  int sign = src->sign;
253.2470 ++  int exp = 0;
253.2471 ++
253.2472 ++  if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && (isnan (src) || isinf (src)))
253.2473 ++    {
253.2474 ++      /* We can't represent these values accurately.  By using the
253.2475 ++	 largest possible magnitude, we guarantee that the conversion
253.2476 ++	 of infinity is at least as big as any finite number.  */
253.2477 ++      exp = EXPMAX;
253.2478 ++      fraction = ((fractype) 1 << FRACBITS) - 1;
253.2479 ++    }
253.2480 ++  else if (isnan (src))
253.2481 ++    {
253.2482 ++      exp = EXPMAX;
253.2483 ++      if (src->class == CLASS_QNAN || 1)
253.2484 ++	{
253.2485 ++#ifdef QUIET_NAN_NEGATED
253.2486 ++	  fraction |= QUIET_NAN - 1;
253.2487 ++#else
253.2488 ++	  fraction |= QUIET_NAN;
253.2489 ++#endif
253.2490 ++	}
253.2491 ++    }
253.2492 ++  else if (isinf (src))
253.2493 ++    {
253.2494 ++      exp = EXPMAX;
253.2495 ++      fraction = 0;
253.2496 ++    }
253.2497 ++  else if (iszero (src))
253.2498 ++    {
253.2499 ++      exp = 0;
253.2500 ++      fraction = 0;
253.2501 ++    }
253.2502 ++  else if (fraction == 0)
253.2503 ++    {
253.2504 ++      exp = 0;
253.2505 ++    }
253.2506 ++  else
253.2507 ++    {
253.2508 ++      if (src->normal_exp < NORMAL_EXPMIN)
253.2509 ++	{
253.2510 ++#ifdef NO_DENORMALS
253.2511 ++	  /* Go straight to a zero representation if denormals are not
253.2512 ++ 	     supported.  The denormal handling would be harmless but
253.2513 ++ 	     isn't unnecessary.  */
253.2514 ++	  exp = 0;
253.2515 ++	  fraction = 0;
253.2516 ++#else /* NO_DENORMALS */
253.2517 ++	  /* This number's exponent is too low to fit into the bits
253.2518 ++	     available in the number, so we'll store 0 in the exponent and
253.2519 ++	     shift the fraction to the right to make up for it.  */
253.2520 ++
253.2521 ++	  int shift = NORMAL_EXPMIN - src->normal_exp;
253.2522 ++
253.2523 ++	  exp = 0;
253.2524 ++
253.2525 ++	  if (shift > FRAC_NBITS - NGARDS)
253.2526 ++	    {
253.2527 ++	      /* No point shifting, since it's more that 64 out.  */
253.2528 ++	      fraction = 0;
253.2529 ++	    }
253.2530 ++	  else
253.2531 ++	    {
253.2532 ++	      int lowbit = (fraction & (((fractype)1 << shift) - 1)) ? 1 : 0;
253.2533 ++	      fraction = (fraction >> shift) | lowbit;
253.2534 ++	    }
253.2535 ++	  if ((fraction & GARDMASK) == GARDMSB)
253.2536 ++	    {
253.2537 ++	      if ((fraction & (1 << NGARDS)))
253.2538 ++		fraction += GARDROUND + 1;
253.2539 ++	    }
253.2540 ++	  else
253.2541 ++	    {
253.2542 ++	      /* Add to the guards to round up.  */
253.2543 ++	      fraction += GARDROUND;
253.2544 ++	    }
253.2545 ++	  /* Perhaps the rounding means we now need to change the
253.2546 ++             exponent, because the fraction is no longer denormal.  */
253.2547 ++	  if (fraction >= IMPLICIT_1)
253.2548 ++	    {
253.2549 ++	      exp += 1;
253.2550 ++	    }
253.2551 ++	  fraction >>= NGARDS;
253.2552 ++#endif /* NO_DENORMALS */
253.2553 ++	}
253.2554 ++      else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS)
253.2555 ++	       && src->normal_exp > EXPBIAS)
253.2556 ++	{
253.2557 ++	  exp = EXPMAX;
253.2558 ++	  fraction = 0;
253.2559 ++	}
253.2560 ++      else
253.2561 ++	{
253.2562 ++	  exp = src->normal_exp + EXPBIAS;
253.2563 ++	  if (!ROUND_TOWARDS_ZERO)
253.2564 ++	    {
253.2565 ++	      /* IF the gard bits are the all zero, but the first, then we're
253.2566 ++		 half way between two numbers, choose the one which makes the
253.2567 ++		 lsb of the answer 0.  */
253.2568 ++	      if ((fraction & GARDMASK) == GARDMSB)
253.2569 ++		{
253.2570 ++		  if (fraction & (1 << NGARDS))
253.2571 ++		    fraction += GARDROUND + 1;
253.2572 ++		}
253.2573 ++	      else
253.2574 ++		{
253.2575 ++		  /* Add a one to the guards to round up */
253.2576 ++		  fraction += GARDROUND;
253.2577 ++		}
253.2578 ++	      if (fraction >= IMPLICIT_2)
253.2579 ++		{
253.2580 ++		  fraction >>= 1;
253.2581 ++		  exp += 1;
253.2582 ++		}
253.2583 ++	    }
253.2584 ++	  fraction >>= NGARDS;
253.2585 ++
253.2586 ++	  if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp > EXPMAX)
253.2587 ++	    {
253.2588 ++	      /* Saturate on overflow.  */
253.2589 ++	      exp = EXPMAX;
253.2590 ++	      fraction = ((fractype) 1 << FRACBITS) - 1;
253.2591 ++	    }
253.2592 ++	}
253.2593 ++    }
253.2594 ++
253.2595 ++  /* We previously used bitfields to store the number, but this doesn't
253.2596 ++     handle little/big endian systems conveniently, so use shifts and
253.2597 ++     masks */
253.2598 ++#ifdef FLOAT_BIT_ORDER_MISMATCH
253.2599 ++  dst.bits.fraction = fraction;
253.2600 ++  dst.bits.exp = exp;
253.2601 ++  dst.bits.sign = sign;
253.2602 ++#else
253.2603 ++# if defined TFLOAT && defined HALFFRACBITS
253.2604 ++ {
253.2605 ++   halffractype high, low, unity;
253.2606 ++   int lowsign, lowexp;
253.2607 ++
253.2608 ++   unity = (halffractype) 1 << HALFFRACBITS;
253.2609 ++
253.2610 ++   /* Set HIGH to the high double's significand, masking out the implicit 1.
253.2611 ++      Set LOW to the low double's full significand.  */
253.2612 ++   high = (fraction >> (FRACBITS - HALFFRACBITS)) & (unity - 1);
253.2613 ++   low = fraction & (unity * 2 - 1);
253.2614 ++
253.2615 ++   /* Get the initial sign and exponent of the low double.  */
253.2616 ++   lowexp = exp - HALFFRACBITS - 1;
253.2617 ++   lowsign = sign;
253.2618 ++
253.2619 ++   /* HIGH should be rounded like a normal double, making |LOW| <=
253.2620 ++      0.5 ULP of HIGH.  Assume round-to-nearest.  */
253.2621 ++   if (exp < EXPMAX)
253.2622 ++     if (low > unity || (low == unity && (high & 1) == 1))
253.2623 ++       {
253.2624 ++	 /* Round HIGH up and adjust LOW to match.  */
253.2625 ++	 high++;
253.2626 ++	 if (high == unity)
253.2627 ++	   {
253.2628 ++	     /* May make it infinite, but that's OK.  */
253.2629 ++	     high = 0;
253.2630 ++	     exp++;
253.2631 ++	   }
253.2632 ++	 low = unity * 2 - low;
253.2633 ++	 lowsign ^= 1;
253.2634 ++       }
253.2635 ++
253.2636 ++   high |= (halffractype) exp << HALFFRACBITS;
253.2637 ++   high |= (halffractype) sign << (HALFFRACBITS + EXPBITS);
253.2638 ++
253.2639 ++   if (exp == EXPMAX || exp == 0 || low == 0)
253.2640 ++     low = 0;
253.2641 ++   else
253.2642 ++     {
253.2643 ++       while (lowexp > 0 && low < unity)
253.2644 ++	 {
253.2645 ++	   low <<= 1;
253.2646 ++	   lowexp--;
253.2647 ++	 }
253.2648 ++
253.2649 ++       if (lowexp <= 0)
253.2650 ++	 {
253.2651 ++	   halffractype roundmsb, round;
253.2652 ++	   int shift;
253.2653 ++
253.2654 ++	   shift = 1 - lowexp;
253.2655 ++	   roundmsb = (1 << (shift - 1));
253.2656 ++	   round = low & ((roundmsb << 1) - 1);
253.2657 ++
253.2658 ++	   low >>= shift;
253.2659 ++	   lowexp = 0;
253.2660 ++
253.2661 ++	   if (round > roundmsb || (round == roundmsb && (low & 1) == 1))
253.2662 ++	     {
253.2663 ++	       low++;
253.2664 ++	       if (low == unity)
253.2665 ++		 /* LOW rounds up to the smallest normal number.  */
253.2666 ++		 lowexp++;
253.2667 ++	     }
253.2668 ++	 }
253.2669 ++
253.2670 ++       low &= unity - 1;
253.2671 ++       low |= (halffractype) lowexp << HALFFRACBITS;
253.2672 ++       low |= (halffractype) lowsign << (HALFFRACBITS + EXPBITS);
253.2673 ++     }
253.2674 ++   dst.value_raw = ((fractype) high << HALFSHIFT) | low;
253.2675 ++ }
253.2676 ++# else
253.2677 ++  dst.value_raw = fraction & ((((fractype)1) << FRACBITS) - (fractype)1);
253.2678 ++  dst.value_raw |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << FRACBITS;
253.2679 ++  dst.value_raw |= ((fractype) (sign & 1)) << (FRACBITS | EXPBITS);
253.2680 ++# endif
253.2681 ++#endif
253.2682 ++
253.2683 ++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
253.2684 ++#ifdef TFLOAT
253.2685 ++  {
253.2686 ++    qrtrfractype tmp1 = dst.words[0];
253.2687 ++    qrtrfractype tmp2 = dst.words[1];
253.2688 ++    dst.words[0] = dst.words[3];
253.2689 ++    dst.words[1] = dst.words[2];
253.2690 ++    dst.words[2] = tmp2;
253.2691 ++    dst.words[3] = tmp1;
253.2692 ++  }
253.2693 ++#else
253.2694 ++  {
253.2695 ++    halffractype tmp = dst.words[0];
253.2696 ++    dst.words[0] = dst.words[1];
253.2697 ++    dst.words[1] = tmp;
253.2698 ++  }
253.2699 ++#endif
253.2700 ++#endif
253.2701 ++
253.2702 ++  return dst.value;
253.2703 ++}
253.2704 ++#endif
253.2705 ++
253.2706 ++#if defined(L_unpack_df) || defined(L_unpack_sf) || defined(L_unpack_tf)
253.2707 ++void
253.2708 ++unpack_d (FLO_union_type * src, fp_number_type * dst)
253.2709 ++{
253.2710 ++  /* We previously used bitfields to store the number, but this doesn't
253.2711 ++     handle little/big endian systems conveniently, so use shifts and
253.2712 ++     masks */
253.2713 ++  fractype fraction;
253.2714 ++  int exp;
253.2715 ++  int sign;
253.2716 ++
253.2717 ++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
253.2718 ++  FLO_union_type swapped;
253.2719 ++
253.2720 ++#ifdef TFLOAT
253.2721 ++  swapped.words[0] = src->words[3];
253.2722 ++  swapped.words[1] = src->words[2];
253.2723 ++  swapped.words[2] = src->words[1];
253.2724 ++  swapped.words[3] = src->words[0];
253.2725 ++#else
253.2726 ++  swapped.words[0] = src->words[1];
253.2727 ++  swapped.words[1] = src->words[0];
253.2728 ++#endif
253.2729 ++  src = &swapped;
253.2730 ++#endif
253.2731 ++  
253.2732 ++#ifdef FLOAT_BIT_ORDER_MISMATCH
253.2733 ++  fraction = src->bits.fraction;
253.2734 ++  exp = src->bits.exp;
253.2735 ++  sign = src->bits.sign;
253.2736 ++#else
253.2737 ++# if defined TFLOAT && defined HALFFRACBITS
253.2738 ++ {
253.2739 ++   halffractype high, low;
253.2740 ++   
253.2741 ++   high = src->value_raw >> HALFSHIFT;
253.2742 ++   low = src->value_raw & (((fractype)1 << HALFSHIFT) - 1);
253.2743 ++
253.2744 ++   fraction = high & ((((fractype)1) << HALFFRACBITS) - 1);
253.2745 ++   fraction <<= FRACBITS - HALFFRACBITS;
253.2746 ++   exp = ((int)(high >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
253.2747 ++   sign = ((int)(high >> (((HALFFRACBITS + EXPBITS))))) & 1;
253.2748 ++
253.2749 ++   if (exp != EXPMAX && exp != 0 && low != 0)
253.2750 ++     {
253.2751 ++       int lowexp = ((int)(low >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
253.2752 ++       int lowsign = ((int)(low >> (((HALFFRACBITS + EXPBITS))))) & 1;
253.2753 ++       int shift;
253.2754 ++       fractype xlow;
253.2755 ++
253.2756 ++       xlow = low & ((((fractype)1) << HALFFRACBITS) - 1);
253.2757 ++       if (lowexp)
253.2758 ++	 xlow |= (((halffractype)1) << HALFFRACBITS);
253.2759 ++       else
253.2760 ++	 lowexp = 1;
253.2761 ++       shift = (FRACBITS - HALFFRACBITS) - (exp - lowexp);
253.2762 ++       if (shift > 0)
253.2763 ++	 xlow <<= shift;
253.2764 ++       else if (shift < 0)
253.2765 ++	 xlow >>= -shift;
253.2766 ++       if (sign == lowsign)
253.2767 ++	 fraction += xlow;
253.2768 ++       else if (fraction >= xlow)
253.2769 ++	 fraction -= xlow;
253.2770 ++       else
253.2771 ++	 {
253.2772 ++	   /* The high part is a power of two but the full number is lower.
253.2773 ++	      This code will leave the implicit 1 in FRACTION, but we'd
253.2774 ++	      have added that below anyway.  */
253.2775 ++	   fraction = (((fractype) 1 << FRACBITS) - xlow) << 1;
253.2776 ++	   exp--;
253.2777 ++	 }
253.2778 ++     }
253.2779 ++ }
253.2780 ++# else
253.2781 ++  fraction = src->value_raw & ((((fractype)1) << FRACBITS) - 1);
253.2782 ++  exp = ((int)(src->value_raw >> FRACBITS)) & ((1 << EXPBITS) - 1);
253.2783 ++  sign = ((int)(src->value_raw >> (FRACBITS + EXPBITS))) & 1;
253.2784 ++# endif
253.2785 ++#endif
253.2786 ++
253.2787 ++  dst->sign = sign;
253.2788 ++  if (exp == 0)
253.2789 ++    {
253.2790 ++      /* Hmm.  Looks like 0 */
253.2791 ++      if (fraction == 0
253.2792 ++#ifdef NO_DENORMALS
253.2793 ++	  || 1
253.2794 ++#endif
253.2795 ++	  )
253.2796 ++	{
253.2797 ++	  /* tastes like zero */
253.2798 ++	  dst->class = CLASS_ZERO;
253.2799 ++	}
253.2800 ++      else
253.2801 ++	{
253.2802 ++	  /* Zero exponent with nonzero fraction - it's denormalized,
253.2803 ++	     so there isn't a leading implicit one - we'll shift it so
253.2804 ++	     it gets one.  */
253.2805 ++	  dst->normal_exp = exp - EXPBIAS + 1;
253.2806 ++	  fraction <<= NGARDS;
253.2807 ++
253.2808 ++	  dst->class = CLASS_NUMBER;
253.2809 ++#if 1
253.2810 ++	  while (fraction < IMPLICIT_1)
253.2811 ++	    {
253.2812 ++	      fraction <<= 1;
253.2813 ++	      dst->normal_exp--;
253.2814 ++	    }
253.2815 ++#endif
253.2816 ++	  dst->fraction.ll = fraction;
253.2817 ++	}
253.2818 ++    }
253.2819 ++  else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp == EXPMAX)
253.2820 ++    {
253.2821 ++      /* Huge exponent*/
253.2822 ++      if (fraction == 0)
253.2823 ++	{
253.2824 ++	  /* Attached to a zero fraction - means infinity */
253.2825 ++	  dst->class = CLASS_INFINITY;
253.2826 ++	}
253.2827 ++      else
253.2828 ++	{
253.2829 ++	  /* Nonzero fraction, means nan */
253.2830 ++#ifdef QUIET_NAN_NEGATED
253.2831 ++	  if ((fraction & QUIET_NAN) == 0)
253.2832 ++#else
253.2833 ++	  if (fraction & QUIET_NAN)
253.2834 ++#endif
253.2835 ++	    {
253.2836 ++	      dst->class = CLASS_QNAN;
253.2837 ++	    }
253.2838 ++	  else
253.2839 ++	    {
253.2840 ++	      dst->class = CLASS_SNAN;
253.2841 ++	    }
253.2842 ++	  /* Keep the fraction part as the nan number */
253.2843 ++	  dst->fraction.ll = fraction;
253.2844 ++	}
253.2845 ++    }
253.2846 ++  else
253.2847 ++    {
253.2848 ++      /* Nothing strange about this number */
253.2849 ++      dst->normal_exp = exp - EXPBIAS;
253.2850 ++      dst->class = CLASS_NUMBER;
253.2851 ++      dst->fraction.ll = (fraction << NGARDS) | IMPLICIT_1;
253.2852 ++    }
253.2853 ++}
253.2854 ++#endif /* L_unpack_df || L_unpack_sf */
253.2855 ++
253.2856 ++#if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf)
253.2857 ++static fp_number_type *
253.2858 ++_fpadd_parts (fp_number_type * a,
253.2859 ++	      fp_number_type * b,
253.2860 ++	      fp_number_type * tmp)
253.2861 ++{
253.2862 ++  intfrac tfraction;
253.2863 ++
253.2864 ++  /* Put commonly used fields in local variables.  */
253.2865 ++  int a_normal_exp;
253.2866 ++  int b_normal_exp;
253.2867 ++  fractype a_fraction;
253.2868 ++  fractype b_fraction;
253.2869 ++
253.2870 ++  if (isnan (a))
253.2871 ++    {
253.2872 ++      return a;
253.2873 ++    }
253.2874 ++  if (isnan (b))
253.2875 ++    {
253.2876 ++      return b;
253.2877 ++    }
253.2878 ++  if (isinf (a))
253.2879 ++    {
253.2880 ++      /* Adding infinities with opposite signs yields a NaN.  */
253.2881 ++      if (isinf (b) && a->sign != b->sign)
253.2882 ++	return nan ();
253.2883 ++      return a;
253.2884 ++    }
253.2885 ++  if (isinf (b))
253.2886 ++    {
253.2887 ++      return b;
253.2888 ++    }
253.2889 ++  if (iszero (b))
253.2890 ++    {
253.2891 ++      if (iszero (a))
253.2892 ++	{
253.2893 ++	  *tmp = *a;
253.2894 ++	  tmp->sign = a->sign & b->sign;
253.2895 ++	  return tmp;
253.2896 ++	}
253.2897 ++      return a;
253.2898 ++    }
253.2899 ++  if (iszero (a))
253.2900 ++    {
253.2901 ++      return b;
253.2902 ++    }
253.2903 ++
253.2904 ++  /* Got two numbers. shift the smaller and increment the exponent till
253.2905 ++     they're the same */
253.2906 ++  {
253.2907 ++    int diff;
253.2908 ++
253.2909 ++    a_normal_exp = a->normal_exp;
253.2910 ++    b_normal_exp = b->normal_exp;
253.2911 ++    a_fraction = a->fraction.ll;
253.2912 ++    b_fraction = b->fraction.ll;
253.2913 ++
253.2914 ++    diff = a_normal_exp - b_normal_exp;
253.2915 ++
253.2916 ++    if (diff < 0)
253.2917 ++      diff = -diff;
253.2918 ++    if (diff < FRAC_NBITS)
253.2919 ++      {
253.2920 ++	/* ??? This does shifts one bit at a time.  Optimize.  */
253.2921 ++	while (a_normal_exp > b_normal_exp)
253.2922 ++	  {
253.2923 ++	    b_normal_exp++;
253.2924 ++	    LSHIFT (b_fraction);
253.2925 ++	  }
253.2926 ++	while (b_normal_exp > a_normal_exp)
253.2927 ++	  {
253.2928 ++	    a_normal_exp++;
253.2929 ++	    LSHIFT (a_fraction);
253.2930 ++	  }
253.2931 ++      }
253.2932 ++    else
253.2933 ++      {
253.2934 ++	/* Somethings's up.. choose the biggest */
253.2935 ++	if (a_normal_exp > b_normal_exp)
253.2936 ++	  {
253.2937 ++	    b_normal_exp = a_normal_exp;
253.2938 ++	    b_fraction = 0;
253.2939 ++	  }
253.2940 ++	else
253.2941 ++	  {
253.2942 ++	    a_normal_exp = b_normal_exp;
253.2943 ++	    a_fraction = 0;
253.2944 ++	  }
253.2945 ++      }
253.2946 ++  }
253.2947 ++
253.2948 ++  if (a->sign != b->sign)
253.2949 ++    {
253.2950 ++      if (a->sign)
253.2951 ++	{
253.2952 ++	  tfraction = -a_fraction + b_fraction;
253.2953 ++	}
253.2954 ++      else
253.2955 ++	{
253.2956 ++	  tfraction = a_fraction - b_fraction;
253.2957 ++	}
253.2958 ++      if (tfraction >= 0)
253.2959 ++	{
253.2960 ++	  tmp->sign = 0;
253.2961 ++	  tmp->normal_exp = a_normal_exp;
253.2962 ++	  tmp->fraction.ll = tfraction;
253.2963 ++	}
253.2964 ++      else
253.2965 ++	{
253.2966 ++	  tmp->sign = 1;
253.2967 ++	  tmp->normal_exp = a_normal_exp;
253.2968 ++	  tmp->fraction.ll = -tfraction;
253.2969 ++	}
253.2970 ++      /* and renormalize it */
253.2971 ++
253.2972 ++      while (tmp->fraction.ll < IMPLICIT_1 && tmp->fraction.ll)
253.2973 ++	{
253.2974 ++	  tmp->fraction.ll <<= 1;
253.2975 ++	  tmp->normal_exp--;
253.2976 ++	}
253.2977 ++    }
253.2978 ++  else
253.2979 ++    {
253.2980 ++      tmp->sign = a->sign;
253.2981 ++      tmp->normal_exp = a_normal_exp;
253.2982 ++      tmp->fraction.ll = a_fraction + b_fraction;
253.2983 ++    }
253.2984 ++  tmp->class = CLASS_NUMBER;
253.2985 ++  /* Now the fraction is added, we have to shift down to renormalize the
253.2986 ++     number */
253.2987 ++
253.2988 ++  if (tmp->fraction.ll >= IMPLICIT_2)
253.2989 ++    {
253.2990 ++      LSHIFT (tmp->fraction.ll);
253.2991 ++      tmp->normal_exp++;
253.2992 ++    }
253.2993 ++  return tmp;
253.2994 ++
253.2995 ++}
253.2996 ++
253.2997 ++FLO_type
253.2998 ++add (FLO_type arg_a, FLO_type arg_b)
253.2999 ++{
253.3000 ++  fp_number_type a;
253.3001 ++  fp_number_type b;
253.3002 ++  fp_number_type tmp;
253.3003 ++  fp_number_type *res;
253.3004 ++  FLO_union_type au, bu;
253.3005 ++
253.3006 ++  au.value = arg_a;
253.3007 ++  bu.value = arg_b;
253.3008 ++
253.3009 ++  unpack_d (&au, &a);
253.3010 ++  unpack_d (&bu, &b);
253.3011 ++
253.3012 ++  res = _fpadd_parts (&a, &b, &tmp);
253.3013 ++
253.3014 ++  return pack_d (res);
253.3015 ++}
253.3016 ++
253.3017 ++FLO_type
253.3018 ++sub (FLO_type arg_a, FLO_type arg_b)
253.3019 ++{
253.3020 ++  fp_number_type a;
253.3021 ++  fp_number_type b;
253.3022 ++  fp_number_type tmp;
253.3023 ++  fp_number_type *res;
253.3024 ++  FLO_union_type au, bu;
253.3025 ++
253.3026 ++  au.value = arg_a;
253.3027 ++  bu.value = arg_b;
253.3028 ++
253.3029 ++  unpack_d (&au, &a);
253.3030 ++  unpack_d (&bu, &b);
253.3031 ++
253.3032 ++  b.sign ^= 1;
253.3033 ++
253.3034 ++  res = _fpadd_parts (&a, &b, &tmp);
253.3035 ++
253.3036 ++  return pack_d (res);
253.3037 ++}
253.3038 ++#endif /* L_addsub_sf || L_addsub_df */
253.3039 ++
253.3040 ++#if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf)
253.3041 ++static inline __attribute__ ((__always_inline__)) fp_number_type *
253.3042 ++_fpmul_parts ( fp_number_type *  a,
253.3043 ++	       fp_number_type *  b,
253.3044 ++	       fp_number_type * tmp)
253.3045 ++{
253.3046 ++  fractype low = 0;
253.3047 ++  fractype high = 0;
253.3048 ++
253.3049 ++  if (isnan (a))
253.3050 ++    {
253.3051 ++      a->sign = a->sign != b->sign;
253.3052 ++      return a;
253.3053 ++    }
253.3054 ++  if (isnan (b))
253.3055 ++    {
253.3056 ++      b->sign = a->sign != b->sign;
253.3057 ++      return b;
253.3058 ++    }
253.3059 ++  if (isinf (a))
253.3060 ++    {
253.3061 ++      if (iszero (b))
253.3062 ++	return nan ();
253.3063 ++      a->sign = a->sign != b->sign;
253.3064 ++      return a;
253.3065 ++    }
253.3066 ++  if (isinf (b))
253.3067 ++    {
253.3068 ++      if (iszero (a))
253.3069 ++	{
253.3070 ++	  return nan ();
253.3071 ++	}
253.3072 ++      b->sign = a->sign != b->sign;
253.3073 ++      return b;
253.3074 ++    }
253.3075 ++  if (iszero (a))
253.3076 ++    {
253.3077 ++      a->sign = a->sign != b->sign;
253.3078 ++      return a;
253.3079 ++    }
253.3080 ++  if (iszero (b))
253.3081 ++    {
253.3082 ++      b->sign = a->sign != b->sign;
253.3083 ++      return b;
253.3084 ++    }
253.3085 ++
253.3086 ++  /* Calculate the mantissa by multiplying both numbers to get a
253.3087 ++     twice-as-wide number.  */
253.3088 ++  {
253.3089 ++#if defined(NO_DI_MODE) || defined(TFLOAT)
253.3090 ++    {
253.3091 ++      fractype x = a->fraction.ll;
253.3092 ++      fractype ylow = b->fraction.ll;
253.3093 ++      fractype yhigh = 0;
253.3094 ++      int bit;
253.3095 ++
253.3096 ++      /* ??? This does multiplies one bit at a time.  Optimize.  */
253.3097 ++      for (bit = 0; bit < FRAC_NBITS; bit++)
253.3098 ++	{
253.3099 ++	  int carry;
253.3100 ++
253.3101 ++	  if (x & 1)
253.3102 ++	    {
253.3103 ++	      carry = (low += ylow) < ylow;
253.3104 ++	      high += yhigh + carry;
253.3105 ++	    }
253.3106 ++	  yhigh <<= 1;
253.3107 ++	  if (ylow & FRACHIGH)
253.3108 ++	    {
253.3109 ++	      yhigh |= 1;
253.3110 ++	    }
253.3111 ++	  ylow <<= 1;
253.3112 ++	  x >>= 1;
253.3113 ++	}
253.3114 ++    }
253.3115 ++#elif defined(FLOAT) 
253.3116 ++    /* Multiplying two USIs to get a UDI, we're safe.  */
253.3117 ++    {
253.3118 ++      UDItype answer = (UDItype)a->fraction.ll * (UDItype)b->fraction.ll;
253.3119 ++      
253.3120 ++      high = answer >> BITS_PER_SI;
253.3121 ++      low = answer;
253.3122 ++    }
253.3123 ++#else
253.3124 ++    /* fractype is DImode, but we need the result to be twice as wide.
253.3125 ++       Assuming a widening multiply from DImode to TImode is not
253.3126 ++       available, build one by hand.  */
253.3127 ++    {
253.3128 ++      USItype nl = a->fraction.ll;
253.3129 ++      USItype nh = a->fraction.ll >> BITS_PER_SI;
253.3130 ++      USItype ml = b->fraction.ll;
253.3131 ++      USItype mh = b->fraction.ll >> BITS_PER_SI;
253.3132 ++      UDItype pp_ll = (UDItype) ml * nl;
253.3133 ++      UDItype pp_hl = (UDItype) mh * nl;
253.3134 ++      UDItype pp_lh = (UDItype) ml * nh;
253.3135 ++      UDItype pp_hh = (UDItype) mh * nh;
253.3136 ++      UDItype res2 = 0;
253.3137 ++      UDItype res0 = 0;
253.3138 ++      UDItype ps_hh__ = pp_hl + pp_lh;
253.3139 ++      if (ps_hh__ < pp_hl)
253.3140 ++	res2 += (UDItype)1 << BITS_PER_SI;
253.3141 ++      pp_hl = (UDItype)(USItype)ps_hh__ << BITS_PER_SI;
253.3142 ++      res0 = pp_ll + pp_hl;
253.3143 ++      if (res0 < pp_ll)
253.3144 ++	res2++;
253.3145 ++      res2 += (ps_hh__ >> BITS_PER_SI) + pp_hh;
253.3146 ++      high = res2;
253.3147 ++      low = res0;
253.3148 ++    }
253.3149 ++#endif
253.3150 ++  }
253.3151 ++
253.3152 ++  tmp->normal_exp = a->normal_exp + b->normal_exp
253.3153 ++    + FRAC_NBITS - (FRACBITS + NGARDS);
253.3154 ++  tmp->sign = a->sign != b->sign;
253.3155 ++  while (high >= IMPLICIT_2)
253.3156 ++    {
253.3157 ++      tmp->normal_exp++;
253.3158 ++      if (high & 1)
253.3159 ++	{
253.3160 ++	  low >>= 1;
253.3161 ++	  low |= FRACHIGH;
253.3162 ++	}
253.3163 ++      high >>= 1;
253.3164 ++    }
253.3165 ++  while (high < IMPLICIT_1)
253.3166 ++    {
253.3167 ++      tmp->normal_exp--;
253.3168 ++
253.3169 ++      high <<= 1;
253.3170 ++      if (low & FRACHIGH)
253.3171 ++	high |= 1;
253.3172 ++      low <<= 1;
253.3173 ++    }
253.3174 ++  /* rounding is tricky. if we only round if it won't make us round later.  */
253.3175 ++#if 0
253.3176 ++  if (low & FRACHIGH2)
253.3177 ++    {
253.3178 ++      if (((high & GARDMASK) != GARDMSB)
253.3179 ++	  && (((high + 1) & GARDMASK) == GARDMSB))
253.3180 ++	{
253.3181 ++	  /* don't round, it gets done again later.  */
253.3182 ++	}
253.3183 ++      else
253.3184 ++	{
253.3185 ++	  high++;
253.3186 ++	}
253.3187 ++    }
253.3188 ++#endif
253.3189 ++  if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB)
253.3190 ++    {
253.3191 ++      if (high & (1 << NGARDS))
253.3192 ++	{
253.3193 ++	  /* half way, so round to even */
253.3194 ++	  high += GARDROUND + 1;
253.3195 ++	}
253.3196 ++      else if (low)
253.3197 ++	{
253.3198 ++	  /* but we really weren't half way */
253.3199 ++	  high += GARDROUND + 1;
253.3200 ++	}
253.3201 ++    }
253.3202 ++  tmp->fraction.ll = high;
253.3203 ++  tmp->class = CLASS_NUMBER;
253.3204 ++  return tmp;
253.3205 ++}
253.3206 ++
253.3207 ++FLO_type
253.3208 ++multiply (FLO_type arg_a, FLO_type arg_b)
253.3209 ++{
253.3210 ++  fp_number_type a;
253.3211 ++  fp_number_type b;
253.3212 ++  fp_number_type tmp;
253.3213 ++  fp_number_type *res;
253.3214 ++  FLO_union_type au, bu;
253.3215 ++
253.3216 ++  au.value = arg_a;
253.3217 ++  bu.value = arg_b;
253.3218 ++
253.3219 ++  unpack_d (&au, &a);
253.3220 ++  unpack_d (&bu, &b);
253.3221 ++
253.3222 ++  res = _fpmul_parts (&a, &b, &tmp);
253.3223 ++
253.3224 ++  return pack_d (res);
253.3225 ++}
253.3226 ++#endif /* L_mul_sf || L_mul_df */
253.3227 ++
253.3228 ++#if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf)
253.3229 ++static inline __attribute__ ((__always_inline__)) fp_number_type *
253.3230 ++_fpdiv_parts (fp_number_type * a,
253.3231 ++	      fp_number_type * b)
253.3232 ++{
253.3233 ++  fractype bit;
253.3234 ++  fractype numerator;
253.3235 ++  fractype denominator;
253.3236 ++  fractype quotient;
253.3237 ++
253.3238 ++  if (isnan (a))
253.3239 ++    {
253.3240 ++      return a;
253.3241 ++    }
253.3242 ++  if (isnan (b))
253.3243 ++    {
253.3244 ++      return b;
253.3245 ++    }
253.3246 ++
253.3247 ++  a->sign = a->sign ^ b->sign;
253.3248 ++
253.3249 ++  if (isinf (a) || iszero (a))
253.3250 ++    {
253.3251 ++      if (a->class == b->class)
253.3252 ++	return nan ();
253.3253 ++      return a;
253.3254 ++    }
253.3255 ++
253.3256 ++  if (isinf (b))
253.3257 ++    {
253.3258 ++      a->fraction.ll = 0;
253.3259 ++      a->normal_exp = 0;
253.3260 ++      return a;
253.3261 ++    }
253.3262 ++  if (iszero (b))
253.3263 ++    {
253.3264 ++      a->class = CLASS_INFINITY;
253.3265 ++      return a;
253.3266 ++    }
253.3267 ++
253.3268 ++  /* Calculate the mantissa by multiplying both 64bit numbers to get a
253.3269 ++     128 bit number */
253.3270 ++  {
253.3271 ++    /* quotient =
253.3272 ++       ( numerator / denominator) * 2^(numerator exponent -  denominator exponent)
253.3273 ++     */
253.3274 ++
253.3275 ++    a->normal_exp = a->normal_exp - b->normal_exp;
253.3276 ++    numerator = a->fraction.ll;
253.3277 ++    denominator = b->fraction.ll;
253.3278 ++
253.3279 ++    if (numerator < denominator)
253.3280 ++      {
253.3281 ++	/* Fraction will be less than 1.0 */
253.3282 ++	numerator *= 2;
253.3283 ++	a->normal_exp--;
253.3284 ++      }
253.3285 ++    bit = IMPLICIT_1;
253.3286 ++    quotient = 0;
253.3287 ++    /* ??? Does divide one bit at a time.  Optimize.  */
253.3288 ++    while (bit)
253.3289 ++      {
253.3290 ++	if (numerator >= denominator)
253.3291 ++	  {
253.3292 ++	    quotient |= bit;
253.3293 ++	    numerator -= denominator;
253.3294 ++	  }
253.3295 ++	bit >>= 1;
253.3296 ++	numerator *= 2;
253.3297 ++      }
253.3298 ++
253.3299 ++    if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB)
253.3300 ++      {
253.3301 ++	if (quotient & (1 << NGARDS))
253.3302 ++	  {
253.3303 ++	    /* half way, so round to even */
253.3304 ++	    quotient += GARDROUND + 1;
253.3305 ++	  }
253.3306 ++	else if (numerator)
253.3307 ++	  {
253.3308 ++	    /* but we really weren't half way, more bits exist */
253.3309 ++	    quotient += GARDROUND + 1;
253.3310 ++	  }
253.3311 ++      }
253.3312 ++
253.3313 ++    a->fraction.ll = quotient;
253.3314 ++    return (a);
253.3315 ++  }
253.3316 ++}
253.3317 ++
253.3318 ++FLO_type
253.3319 ++divide (FLO_type arg_a, FLO_type arg_b)
253.3320 ++{
253.3321 ++  fp_number_type a;
253.3322 ++  fp_number_type b;
253.3323 ++  fp_number_type *res;
253.3324 ++  FLO_union_type au, bu;
253.3325 ++
253.3326 ++  au.value = arg_a;
253.3327 ++  bu.value = arg_b;
253.3328 ++
253.3329 ++  unpack_d (&au, &a);
253.3330 ++  unpack_d (&bu, &b);
253.3331 ++
253.3332 ++  res = _fpdiv_parts (&a, &b);
253.3333 ++
253.3334 ++  return pack_d (res);
253.3335 ++}
253.3336 ++#endif /* L_div_sf || L_div_df */
253.3337 ++
253.3338 ++#if defined(L_fpcmp_parts_sf) || defined(L_fpcmp_parts_df) \
253.3339 ++    || defined(L_fpcmp_parts_tf)
253.3340 ++/* according to the demo, fpcmp returns a comparison with 0... thus
253.3341 ++   a<b -> -1
253.3342 ++   a==b -> 0
253.3343 ++   a>b -> +1
253.3344 ++ */
253.3345 ++
253.3346 ++int
253.3347 ++__fpcmp_parts (fp_number_type * a, fp_number_type * b)
253.3348 ++{
253.3349 ++#if 0
253.3350 ++  /* either nan -> unordered. Must be checked outside of this routine.  */
253.3351 ++  if (isnan (a) && isnan (b))
253.3352 ++    {
253.3353 ++      return 1;			/* still unordered! */
253.3354 ++    }
253.3355 ++#endif
253.3356 ++
253.3357 ++  if (isnan (a) || isnan (b))
253.3358 ++    {
253.3359 ++      return 1;			/* how to indicate unordered compare? */
253.3360 ++    }
253.3361 ++  if (isinf (a) && isinf (b))
253.3362 ++    {
253.3363 ++      /* +inf > -inf, but +inf != +inf */
253.3364 ++      /* b    \a| +inf(0)| -inf(1)
253.3365 ++       ______\+--------+--------
253.3366 ++       +inf(0)| a==b(0)| a<b(-1)
253.3367 ++       -------+--------+--------
253.3368 ++       -inf(1)| a>b(1) | a==b(0)
253.3369 ++       -------+--------+--------
253.3370 ++       So since unordered must be nonzero, just line up the columns...
253.3371 ++       */
253.3372 ++      return b->sign - a->sign;
253.3373 ++    }
253.3374 ++  /* but not both...  */
253.3375 ++  if (isinf (a))
253.3376 ++    {
253.3377 ++      return a->sign ? -1 : 1;
253.3378 ++    }
253.3379 ++  if (isinf (b))
253.3380 ++    {
253.3381 ++      return b->sign ? 1 : -1;
253.3382 ++    }
253.3383 ++  if (iszero (a) && iszero (b))
253.3384 ++    {
253.3385 ++      return 0;
253.3386 ++    }
253.3387 ++  if (iszero (a))
253.3388 ++    {
253.3389 ++      return b->sign ? 1 : -1;
253.3390 ++    }
253.3391 ++  if (iszero (b))
253.3392 ++    {
253.3393 ++      return a->sign ? -1 : 1;
253.3394 ++    }
253.3395 ++  /* now both are "normal".  */
253.3396 ++  if (a->sign != b->sign)
253.3397 ++    {
253.3398 ++      /* opposite signs */
253.3399 ++      return a->sign ? -1 : 1;
253.3400 ++    }
253.3401 ++  /* same sign; exponents? */
253.3402 ++  if (a->normal_exp > b->normal_exp)
253.3403 ++    {
253.3404 ++      return a->sign ? -1 : 1;
253.3405 ++    }
253.3406 ++  if (a->normal_exp < b->normal_exp)
253.3407 ++    {
253.3408 ++      return a->sign ? 1 : -1;
253.3409 ++    }
253.3410 ++  /* same exponents; check size.  */
253.3411 ++  if (a->fraction.ll > b->fraction.ll)
253.3412 ++    {
253.3413 ++      return a->sign ? -1 : 1;
253.3414 ++    }
253.3415 ++  if (a->fraction.ll < b->fraction.ll)
253.3416 ++    {
253.3417 ++      return a->sign ? 1 : -1;
253.3418 ++    }
253.3419 ++  /* after all that, they're equal.  */
253.3420 ++  return 0;
253.3421 ++}
253.3422 ++#endif
253.3423 ++
253.3424 ++#if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compoare_tf)
253.3425 ++CMPtype
253.3426 ++compare (FLO_type arg_a, FLO_type arg_b)
253.3427 ++{
253.3428 ++  fp_number_type a;
253.3429 ++  fp_number_type b;
253.3430 ++  FLO_union_type au, bu;
253.3431 ++
253.3432 ++  au.value = arg_a;
253.3433 ++  bu.value = arg_b;
253.3434 ++
253.3435 ++  unpack_d (&au, &a);
253.3436 ++  unpack_d (&bu, &b);
253.3437 ++
253.3438 ++  return __fpcmp_parts (&a, &b);
253.3439 ++}
253.3440 ++#endif /* L_compare_sf || L_compare_df */
253.3441 ++
253.3442 ++#ifndef US_SOFTWARE_GOFAST
253.3443 ++
253.3444 ++/* These should be optimized for their specific tasks someday.  */
253.3445 ++
253.3446 ++#if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf)
253.3447 ++CMPtype
253.3448 ++_eq_f2 (FLO_type arg_a, FLO_type arg_b)
253.3449 ++{
253.3450 ++  fp_number_type a;
253.3451 ++  fp_number_type b;
253.3452 ++  FLO_union_type au, bu;
253.3453 ++
253.3454 ++  au.value = arg_a;
253.3455 ++  bu.value = arg_b;
253.3456 ++
253.3457 ++  unpack_d (&au, &a);
253.3458 ++  unpack_d (&bu, &b);
253.3459 ++
253.3460 ++  if (isnan (&a) || isnan (&b))
253.3461 ++    return 1;			/* false, truth == 0 */
253.3462 ++
253.3463 ++  return __fpcmp_parts (&a, &b) ;
253.3464 ++}
253.3465 ++#endif /* L_eq_sf || L_eq_df */
253.3466 ++
253.3467 ++#if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf)
253.3468 ++CMPtype
253.3469 ++_ne_f2 (FLO_type arg_a, FLO_type arg_b)
253.3470 ++{
253.3471 ++  fp_number_type a;
253.3472 ++  fp_number_type b;
253.3473 ++  FLO_union_type au, bu;
253.3474 ++
253.3475 ++  au.value = arg_a;
253.3476 ++  bu.value = arg_b;
253.3477 ++
253.3478 ++  unpack_d (&au, &a);
253.3479 ++  unpack_d (&bu, &b);
253.3480 ++
253.3481 ++  if (isnan (&a) || isnan (&b))
253.3482 ++    return 1;			/* true, truth != 0 */
253.3483 ++
253.3484 ++  return  __fpcmp_parts (&a, &b) ;
253.3485 ++}
253.3486 ++#endif /* L_ne_sf || L_ne_df */
253.3487 ++
253.3488 ++#if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf)
253.3489 ++CMPtype
253.3490 ++_gt_f2 (FLO_type arg_a, FLO_type arg_b)
253.3491 ++{
253.3492 ++  fp_number_type a;
253.3493 ++  fp_number_type b;
253.3494 ++  FLO_union_type au, bu;
253.3495 ++
253.3496 ++  au.value = arg_a;
253.3497 ++  bu.value = arg_b;
253.3498 ++
253.3499 ++  unpack_d (&au, &a);
253.3500 ++  unpack_d (&bu, &b);
253.3501 ++
253.3502 ++  if (isnan (&a) || isnan (&b))
253.3503 ++    return -1;			/* false, truth > 0 */
253.3504 ++
253.3505 ++  return __fpcmp_parts (&a, &b);
253.3506 ++}
253.3507 ++#endif /* L_gt_sf || L_gt_df */
253.3508 ++
253.3509 ++#if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf)
253.3510 ++CMPtype
253.3511 ++_ge_f2 (FLO_type arg_a, FLO_type arg_b)
253.3512 ++{
253.3513 ++  fp_number_type a;
253.3514 ++  fp_number_type b;
253.3515 ++  FLO_union_type au, bu;
253.3516 ++
253.3517 ++  au.value = arg_a;
253.3518 ++  bu.value = arg_b;
253.3519 ++
253.3520 ++  unpack_d (&au, &a);
253.3521 ++  unpack_d (&bu, &b);
253.3522 ++
253.3523 ++  if (isnan (&a) || isnan (&b))
253.3524 ++    return -1;			/* false, truth >= 0 */
253.3525 ++  return __fpcmp_parts (&a, &b) ;
253.3526 ++}
253.3527 ++#endif /* L_ge_sf || L_ge_df */
253.3528 ++
253.3529 ++#if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf)
253.3530 ++CMPtype
253.3531 ++_lt_f2 (FLO_type arg_a, FLO_type arg_b)
253.3532 ++{
253.3533 ++  fp_number_type a;
253.3534 ++  fp_number_type b;
253.3535 ++  FLO_union_type au, bu;
253.3536 ++
253.3537 ++  au.value = arg_a;
253.3538 ++  bu.value = arg_b;
253.3539 ++
253.3540 ++  unpack_d (&au, &a);
253.3541 ++  unpack_d (&bu, &b);
253.3542 ++
253.3543 ++  if (isnan (&a) || isnan (&b))
253.3544 ++    return 1;			/* false, truth < 0 */
253.3545 ++
253.3546 ++  return __fpcmp_parts (&a, &b);
253.3547 ++}
253.3548 ++#endif /* L_lt_sf || L_lt_df */
253.3549 ++
253.3550 ++#if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf)
253.3551 ++CMPtype
253.3552 ++_le_f2 (FLO_type arg_a, FLO_type arg_b)
253.3553 ++{
253.3554 ++  fp_number_type a;
253.3555 ++  fp_number_type b;
253.3556 ++  FLO_union_type au, bu;
253.3557 ++
253.3558 ++  au.value = arg_a;
253.3559 ++  bu.value = arg_b;
253.3560 ++
253.3561 ++  unpack_d (&au, &a);
253.3562 ++  unpack_d (&bu, &b);
253.3563 ++
253.3564 ++  if (isnan (&a) || isnan (&b))
253.3565 ++    return 1;			/* false, truth <= 0 */
253.3566 ++
253.3567 ++  return __fpcmp_parts (&a, &b) ;
253.3568 ++}
253.3569 ++#endif /* L_le_sf || L_le_df */
253.3570 ++
253.3571 ++#endif /* ! US_SOFTWARE_GOFAST */
253.3572 ++
253.3573 ++#if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf)
253.3574 ++CMPtype
253.3575 ++_unord_f2 (FLO_type arg_a, FLO_type arg_b)
253.3576 ++{
253.3577 ++  fp_number_type a;
253.3578 ++  fp_number_type b;
253.3579 ++  FLO_union_type au, bu;
253.3580 ++
253.3581 ++  au.value = arg_a;
253.3582 ++  bu.value = arg_b;
253.3583 ++
253.3584 ++  unpack_d (&au, &a);
253.3585 ++  unpack_d (&bu, &b);
253.3586 ++
253.3587 ++  return (isnan (&a) || isnan (&b));
253.3588 ++}
253.3589 ++#endif /* L_unord_sf || L_unord_df */
253.3590 ++
253.3591 ++#if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf)
253.3592 ++FLO_type
253.3593 ++si_to_float (SItype arg_a)
253.3594 ++{
253.3595 ++  fp_number_type in;
253.3596 ++
253.3597 ++  in.class = CLASS_NUMBER;
253.3598 ++  in.sign = arg_a < 0;
253.3599 ++  if (!arg_a)
253.3600 ++    {
253.3601 ++      in.class = CLASS_ZERO;
253.3602 ++    }
253.3603 ++  else
253.3604 ++    {
253.3605 ++      in.normal_exp = FRACBITS + NGARDS;
253.3606 ++      if (in.sign) 
253.3607 ++	{
253.3608 ++	  /* Special case for minint, since there is no +ve integer
253.3609 ++	     representation for it */
253.3610 ++	  if (arg_a == (- MAX_SI_INT - 1))
253.3611 ++	    {
253.3612 ++	      return (FLO_type)(- MAX_SI_INT - 1);
253.3613 ++	    }
253.3614 ++	  in.fraction.ll = (-arg_a);
253.3615 ++	}
253.3616 ++      else
253.3617 ++	in.fraction.ll = arg_a;
253.3618 ++
253.3619 ++      while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
253.3620 ++	{
253.3621 ++	  in.fraction.ll <<= 1;
253.3622 ++	  in.normal_exp -= 1;
253.3623 ++	}
253.3624 ++    }
253.3625 ++  return pack_d (&in);
253.3626 ++}
253.3627 ++#endif /* L_si_to_sf || L_si_to_df */
253.3628 ++
253.3629 ++#if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf)
253.3630 ++FLO_type
253.3631 ++usi_to_float (USItype arg_a)
253.3632 ++{
253.3633 ++  fp_number_type in;
253.3634 ++
253.3635 ++  in.sign = 0;
253.3636 ++  if (!arg_a)
253.3637 ++    {
253.3638 ++      in.class = CLASS_ZERO;
253.3639 ++    }
253.3640 ++  else
253.3641 ++    {
253.3642 ++      in.class = CLASS_NUMBER;
253.3643 ++      in.normal_exp = FRACBITS + NGARDS;
253.3644 ++      in.fraction.ll = arg_a;
253.3645 ++
253.3646 ++      while (in.fraction.ll > ((fractype)1 << (FRACBITS + NGARDS)))
253.3647 ++        {
253.3648 ++          in.fraction.ll >>= 1;
253.3649 ++          in.normal_exp += 1;
253.3650 ++        }
253.3651 ++      while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
253.3652 ++	{
253.3653 ++	  in.fraction.ll <<= 1;
253.3654 ++	  in.normal_exp -= 1;
253.3655 ++	}
253.3656 ++    }
253.3657 ++  return pack_d (&in);
253.3658 ++}
253.3659 ++#endif
253.3660 ++
253.3661 ++#if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si)
253.3662 ++SItype
253.3663 ++float_to_si (FLO_type arg_a)
253.3664 ++{
253.3665 ++  fp_number_type a;
253.3666 ++  SItype tmp;
253.3667 ++  FLO_union_type au;
253.3668 ++
253.3669 ++  au.value = arg_a;
253.3670 ++  unpack_d (&au, &a);
253.3671 ++
253.3672 ++  if (iszero (&a))
253.3673 ++    return 0;
253.3674 ++  if (isnan (&a))
253.3675 ++    return 0;
253.3676 ++  /* get reasonable MAX_SI_INT...  */
253.3677 ++  if (isinf (&a))
253.3678 ++    return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
253.3679 ++  /* it is a number, but a small one */
253.3680 ++  if (a.normal_exp < 0)
253.3681 ++    return 0;
253.3682 ++  if (a.normal_exp > BITS_PER_SI - 2)
253.3683 ++    return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
253.3684 ++  tmp = a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
253.3685 ++  return a.sign ? (-tmp) : (tmp);
253.3686 ++}
253.3687 ++#endif /* L_sf_to_si || L_df_to_si */
253.3688 ++
253.3689 ++#if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi)
253.3690 ++#if defined US_SOFTWARE_GOFAST || defined(L_tf_to_usi)
253.3691 ++/* While libgcc2.c defines its own __fixunssfsi and __fixunsdfsi routines,
253.3692 ++   we also define them for GOFAST because the ones in libgcc2.c have the
253.3693 ++   wrong names and I'd rather define these here and keep GOFAST CYG-LOC's
253.3694 ++   out of libgcc2.c.  We can't define these here if not GOFAST because then
253.3695 ++   there'd be duplicate copies.  */
253.3696 ++
253.3697 ++USItype
253.3698 ++float_to_usi (FLO_type arg_a)
253.3699 ++{
253.3700 ++  fp_number_type a;
253.3701 ++  FLO_union_type au;
253.3702 ++
253.3703 ++  au.value = arg_a;
253.3704 ++  unpack_d (&au, &a);
253.3705 ++
253.3706 ++  if (iszero (&a))
253.3707 ++    return 0;
253.3708 ++  if (isnan (&a))
253.3709 ++    return 0;
253.3710 ++  /* it is a negative number */
253.3711 ++  if (a.sign)
253.3712 ++    return 0;
253.3713 ++  /* get reasonable MAX_USI_INT...  */
253.3714 ++  if (isinf (&a))
253.3715 ++    return MAX_USI_INT;
253.3716 ++  /* it is a number, but a small one */
253.3717 ++  if (a.normal_exp < 0)
253.3718 ++    return 0;
253.3719 ++  if (a.normal_exp > BITS_PER_SI - 1)
253.3720 ++    return MAX_USI_INT;
253.3721 ++  else if (a.normal_exp > (FRACBITS + NGARDS))
253.3722 ++    return a.fraction.ll << (a.normal_exp - (FRACBITS + NGARDS));
253.3723 ++  else
253.3724 ++    return a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
253.3725 ++}
253.3726 ++#endif /* US_SOFTWARE_GOFAST */
253.3727 ++#endif /* L_sf_to_usi || L_df_to_usi */
253.3728 ++
253.3729 ++#if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf)
253.3730 ++FLO_type
253.3731 ++negate (FLO_type arg_a)
253.3732 ++{
253.3733 ++  fp_number_type a;
253.3734 ++  FLO_union_type au;
253.3735 ++
253.3736 ++  au.value = arg_a;
253.3737 ++  unpack_d (&au, &a);
253.3738 ++
253.3739 ++  flip_sign (&a);
253.3740 ++  return pack_d (&a);
253.3741 ++}
253.3742 ++#endif /* L_negate_sf || L_negate_df */
253.3743 ++
253.3744 ++#ifdef FLOAT
253.3745 ++
253.3746 ++#if defined(L_make_sf)
253.3747 ++SFtype
253.3748 ++__make_fp(fp_class_type class,
253.3749 ++	     unsigned int sign,
253.3750 ++	     int exp, 
253.3751 ++	     USItype frac)
253.3752 ++{
253.3753 ++  fp_number_type in;
253.3754 ++
253.3755 ++  in.class = class;
253.3756 ++  in.sign = sign;
253.3757 ++  in.normal_exp = exp;
253.3758 ++  in.fraction.ll = frac;
253.3759 ++  return pack_d (&in);
253.3760 ++}
253.3761 ++#endif /* L_make_sf */
253.3762 ++
253.3763 ++#ifndef FLOAT_ONLY
253.3764 ++
253.3765 ++/* This enables one to build an fp library that supports float but not double.
253.3766 ++   Otherwise, we would get an undefined reference to __make_dp.
253.3767 ++   This is needed for some 8-bit ports that can't handle well values that
253.3768 ++   are 8-bytes in size, so we just don't support double for them at all.  */
253.3769 ++
253.3770 ++#if defined(L_sf_to_df)
253.3771 ++DFtype
253.3772 ++sf_to_df (SFtype arg_a)
253.3773 ++{
253.3774 ++  fp_number_type in;
253.3775 ++  FLO_union_type au;
253.3776 ++
253.3777 ++  au.value = arg_a;
253.3778 ++  unpack_d (&au, &in);
253.3779 ++
253.3780 ++  return __make_dp (in.class, in.sign, in.normal_exp,
253.3781 ++		    ((UDItype) in.fraction.ll) << F_D_BITOFF);
253.3782 ++}
253.3783 ++#endif /* L_sf_to_df */
253.3784 ++
253.3785 ++#if defined(L_sf_to_tf) && defined(TMODES)
253.3786 ++TFtype
253.3787 ++sf_to_tf (SFtype arg_a)
253.3788 ++{
253.3789 ++  fp_number_type in;
253.3790 ++  FLO_union_type au;
253.3791 ++
253.3792 ++  au.value = arg_a;
253.3793 ++  unpack_d (&au, &in);
253.3794 ++
253.3795 ++  return __make_tp (in.class, in.sign, in.normal_exp,
253.3796 ++		    ((UTItype) in.fraction.ll) << F_T_BITOFF);
253.3797 ++}
253.3798 ++#endif /* L_sf_to_df */
253.3799 ++
253.3800 ++#endif /* ! FLOAT_ONLY */
253.3801 ++#endif /* FLOAT */
253.3802 ++
253.3803 ++#ifndef FLOAT
253.3804 ++
253.3805 ++extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
253.3806 ++
253.3807 ++#if defined(L_make_df)
253.3808 ++DFtype
253.3809 ++__make_dp (fp_class_type class, unsigned int sign, int exp, UDItype frac)
253.3810 ++{
253.3811 ++  fp_number_type in;
253.3812 ++
253.3813 ++  in.class = class;
253.3814 ++  in.sign = sign;
253.3815 ++  in.normal_exp = exp;
253.3816 ++  in.fraction.ll = frac;
253.3817 ++  return pack_d (&in);
253.3818 ++}
253.3819 ++#endif /* L_make_df */
253.3820 ++
253.3821 ++#if defined(L_df_to_sf)
253.3822 ++SFtype
253.3823 ++df_to_sf (DFtype arg_a)
253.3824 ++{
253.3825 ++  fp_number_type in;
253.3826 ++  USItype sffrac;
253.3827 ++  FLO_union_type au;
253.3828 ++
253.3829 ++  au.value = arg_a;
253.3830 ++  unpack_d (&au, &in);
253.3831 ++
253.3832 ++  sffrac = in.fraction.ll >> F_D_BITOFF;
253.3833 ++
253.3834 ++  /* We set the lowest guard bit in SFFRAC if we discarded any non
253.3835 ++     zero bits.  */
253.3836 ++  if ((in.fraction.ll & (((USItype) 1 << F_D_BITOFF) - 1)) != 0)
253.3837 ++    sffrac |= 1;
253.3838 ++
253.3839 ++  return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
253.3840 ++}
253.3841 ++#endif /* L_df_to_sf */
253.3842 ++
253.3843 ++#if defined(L_df_to_tf) && defined(TMODES) \
253.3844 ++    && !defined(FLOAT) && !defined(TFLOAT)
253.3845 ++TFtype
253.3846 ++df_to_tf (DFtype arg_a)
253.3847 ++{
253.3848 ++  fp_number_type in;
253.3849 ++  FLO_union_type au;
253.3850 ++
253.3851 ++  au.value = arg_a;
253.3852 ++  unpack_d (&au, &in);
253.3853 ++
253.3854 ++  return __make_tp (in.class, in.sign, in.normal_exp,
253.3855 ++		    ((UTItype) in.fraction.ll) << D_T_BITOFF);
253.3856 ++}
253.3857 ++#endif /* L_sf_to_df */
253.3858 ++
253.3859 ++#ifdef TFLOAT
253.3860 ++#if defined(L_make_tf)
253.3861 ++TFtype
253.3862 ++__make_tp(fp_class_type class,
253.3863 ++	     unsigned int sign,
253.3864 ++	     int exp, 
253.3865 ++	     UTItype frac)
253.3866 ++{
253.3867 ++  fp_number_type in;
253.3868 ++
253.3869 ++  in.class = class;
253.3870 ++  in.sign = sign;
253.3871 ++  in.normal_exp = exp;
253.3872 ++  in.fraction.ll = frac;
253.3873 ++  return pack_d (&in);
253.3874 ++}
253.3875 ++#endif /* L_make_tf */
253.3876 ++
253.3877 ++#if defined(L_tf_to_df)
253.3878 ++DFtype
253.3879 ++tf_to_df (TFtype arg_a)
253.3880 ++{
253.3881 ++  fp_number_type in;
253.3882 ++  UDItype sffrac;
253.3883 ++  FLO_union_type au;
253.3884 ++
253.3885 ++  au.value = arg_a;
253.3886 ++  unpack_d (&au, &in);
253.3887 ++
253.3888 ++  sffrac = in.fraction.ll >> D_T_BITOFF;
253.3889 ++
253.3890 ++  /* We set the lowest guard bit in SFFRAC if we discarded any non
253.3891 ++     zero bits.  */
253.3892 ++  if ((in.fraction.ll & (((UTItype) 1 << D_T_BITOFF) - 1)) != 0)
253.3893 ++    sffrac |= 1;
253.3894 ++
253.3895 ++  return __make_dp (in.class, in.sign, in.normal_exp, sffrac);
253.3896 ++}
253.3897 ++#endif /* L_tf_to_df */
253.3898 ++
253.3899 ++#if defined(L_tf_to_sf)
253.3900 ++SFtype
253.3901 ++tf_to_sf (TFtype arg_a)
253.3902 ++{
253.3903 ++  fp_number_type in;
253.3904 ++  USItype sffrac;
253.3905 ++  FLO_union_type au;
253.3906 ++
253.3907 ++  au.value = arg_a;
253.3908 ++  unpack_d (&au, &in);
253.3909 ++
253.3910 ++  sffrac = in.fraction.ll >> F_T_BITOFF;
253.3911 ++
253.3912 ++  /* We set the lowest guard bit in SFFRAC if we discarded any non
253.3913 ++     zero bits.  */
253.3914 ++  if ((in.fraction.ll & (((UTItype) 1 << F_T_BITOFF) - 1)) != 0)
253.3915 ++    sffrac |= 1;
253.3916 ++
253.3917 ++  return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
253.3918 ++}
253.3919 ++#endif /* L_tf_to_sf */
253.3920 ++#endif /* TFLOAT */
253.3921 ++
253.3922 ++#endif /* ! FLOAT */
253.3923 ++#endif /* !EXTENDED_FLOAT_STUBS */
253.3924 +--- gcc-3.4.3/gcc/config/nios2/nios2-protos.h
253.3925 ++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-protos.h
253.3926 +@@ -0,0 +1,70 @@
253.3927 ++/* Subroutines for assembler code output for Altera NIOS 2G NIOS2 version.
253.3928 ++   Copyright (C) 2003 Altera 
253.3929 ++   Contributed by Jonah Graham (jgraham@altera.com).
253.3930 ++
253.3931 ++This file is part of GNU CC.
253.3932 ++
253.3933 ++GNU CC is free software; you can redistribute it and/or modify
253.3934 ++it under the terms of the GNU General Public License as published by
253.3935 ++the Free Software Foundation; either version 2, or (at your option)
253.3936 ++any later version.
253.3937 ++
253.3938 ++GNU CC is distributed in the hope that it will be useful,
253.3939 ++but WITHOUT ANY WARRANTY; without even the implied warranty of
253.3940 ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
253.3941 ++GNU General Public License for more details.
253.3942 ++
253.3943 ++You should have received a copy of the GNU General Public License
253.3944 ++along with GNU CC; see the file COPYING.  If not, write to
253.3945 ++the Free Software Foundation, 59 Temple Place - Suite 330,
253.3946 ++Boston, MA 02111-1307, USA.  */
253.3947 ++
253.3948 ++extern void dump_frame_size (FILE *);
253.3949 ++extern HOST_WIDE_INT compute_frame_size (void);
253.3950 ++extern int nios2_initial_elimination_offset (int, int);
253.3951 ++extern void override_options (void);
253.3952 ++extern void optimization_options (int, int);
253.3953 ++extern int nios2_can_use_return_insn (void);
253.3954 ++extern void expand_prologue (void);
253.3955 ++extern void expand_epilogue (bool);
253.3956 ++extern void function_profiler (FILE *, int);
253.3957 ++
253.3958 ++
253.3959 ++#ifdef RTX_CODE
253.3960 ++extern int nios2_legitimate_address (rtx, enum machine_mode, int);
253.3961 ++extern void nios2_print_operand (FILE *, rtx, int);
253.3962 ++extern void nios2_print_operand_address (FILE *, rtx);
253.3963 ++
253.3964 ++extern int nios2_emit_move_sequence (rtx *, enum machine_mode);
253.3965 ++extern int nios2_emit_expensive_div (rtx *, enum machine_mode);
253.3966 ++
253.3967 ++extern void gen_int_relational (enum rtx_code, rtx, rtx, rtx, rtx);
253.3968 ++extern void gen_conditional_move (rtx *, enum machine_mode);
253.3969 ++extern const char *asm_output_opcode (FILE *, const char *);
253.3970 ++
253.3971 ++/* predicates */
253.3972 ++extern int arith_operand (rtx, enum machine_mode);
253.3973 ++extern int uns_arith_operand (rtx, enum machine_mode);
253.3974 ++extern int logical_operand (rtx, enum machine_mode);
253.3975 ++extern int shift_operand (rtx, enum machine_mode);
253.3976 ++extern int reg_or_0_operand (rtx, enum machine_mode);
253.3977 ++extern int equality_op (rtx, enum machine_mode);
253.3978 ++extern int custom_insn_opcode (rtx, enum machine_mode);
253.3979 ++extern int rdwrctl_operand (rtx, enum machine_mode);
253.3980 ++
253.3981 ++# ifdef HAVE_MACHINE_MODES
253.3982 ++#  if defined TREE_CODE
253.3983 ++extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
253.3984 ++extern rtx function_arg (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
253.3985 ++extern int function_arg_partial_nregs (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
253.3986 ++extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, int);
253.3987 ++extern int nios2_setup_incoming_varargs (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
253.3988 ++
253.3989 ++#  endif /* TREE_CODE */
253.3990 ++# endif	/* HAVE_MACHINE_MODES */
253.3991 ++#endif
253.3992 ++
253.3993 ++#ifdef TREE_CODE
253.3994 ++extern int nios2_return_in_memory (tree);
253.3995 ++
253.3996 ++#endif /* TREE_CODE */
253.3997 +--- gcc-3.4.3/gcc/config/nios2/nios2.c
253.3998 ++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.c
253.3999 +@@ -0,0 +1,2853 @@
253.4000 ++/* Subroutines for assembler code output for Altera NIOS 2G NIOS2 version.
253.4001 ++   Copyright (C) 2003 Altera
253.4002 ++   Contributed by Jonah Graham (jgraham@altera.com).
253.4003 ++
253.4004 ++This file is part of GNU CC.
253.4005 ++
253.4006 ++GNU CC is free software; you can redistribute it and/or modify
253.4007 ++it under the terms of the GNU General Public License as published by
253.4008 ++the Free Software Foundation; either version 2, or (at your option)
253.4009 ++any later version.
253.4010 ++
253.4011 ++GNU CC is distributed in the hope that it will be useful,
253.4012 ++but WITHOUT ANY WARRANTY; without even the implied warranty of
253.4013 ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
253.4014 ++GNU General Public License for more details.
253.4015 ++
253.4016 ++You should have received a copy of the GNU General Public License
253.4017 ++along with GNU CC; see the file COPYING.  If not, write to
253.4018 ++the Free Software Foundation, 59 Temple Place - Suite 330,
253.4019 ++Boston, MA 02111-1307, USA.  */
253.4020 ++
253.4021 ++
253.4022 ++#include <stdio.h>
253.4023 ++#include "config.h"
253.4024 ++#include "system.h"
253.4025 ++#include "coretypes.h"
253.4026 ++#include "tm.h"
253.4027 ++#include "rtl.h"
253.4028 ++#include "tree.h"
253.4029 ++#include "tm_p.h"
253.4030 ++#include "regs.h"
253.4031 ++#include "hard-reg-set.h"
253.4032 ++#include "real.h"
253.4033 ++#include "insn-config.h"
253.4034 ++#include "conditions.h"
253.4035 ++#include "output.h"
253.4036 ++#include "insn-attr.h"
253.4037 ++#include "flags.h"
253.4038 ++#include "recog.h"
253.4039 ++#include "expr.h"
253.4040 ++#include "toplev.h"
253.4041 ++#include "basic-block.h"
253.4042 ++#include "function.h"
253.4043 ++#include "ggc.h"
253.4044 ++#include "reload.h"
253.4045 ++#include "debug.h"
253.4046 ++#include "optabs.h"
253.4047 ++#include "target.h"
253.4048 ++#include "target-def.h"
253.4049 ++
253.4050 ++/* local prototypes */
253.4051 ++static bool nios2_rtx_costs (rtx, int, int, int *);
253.4052 ++
253.4053 ++static void nios2_asm_function_prologue (FILE *, HOST_WIDE_INT);
253.4054 ++static int nios2_use_dfa_pipeline_interface (void);
253.4055 ++static int nios2_issue_rate (void);
253.4056 ++static struct machine_function *nios2_init_machine_status (void);
253.4057 ++static bool nios2_in_small_data_p (tree);
253.4058 ++static rtx save_reg (int, HOST_WIDE_INT, rtx);
253.4059 ++static rtx restore_reg (int, HOST_WIDE_INT);
253.4060 ++static unsigned int nios2_section_type_flags (tree, const char *, int);
253.4061 ++static void nios2_init_builtins (void);
253.4062 ++static rtx nios2_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
253.4063 ++static bool nios2_function_ok_for_sibcall (tree, tree);
253.4064 ++static void nios2_encode_section_info (tree, rtx, int);
253.4065 ++
253.4066 ++/* Initialize the GCC target structure.  */
253.4067 ++#undef TARGET_ASM_FUNCTION_PROLOGUE
253.4068 ++#define TARGET_ASM_FUNCTION_PROLOGUE nios2_asm_function_prologue
253.4069 ++
253.4070 ++#undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE
253.4071 ++#define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE \
253.4072 ++ nios2_use_dfa_pipeline_interface
253.4073 ++#undef TARGET_SCHED_ISSUE_RATE
253.4074 ++#define TARGET_SCHED_ISSUE_RATE nios2_issue_rate
253.4075 ++#undef TARGET_IN_SMALL_DATA_P
253.4076 ++#define TARGET_IN_SMALL_DATA_P nios2_in_small_data_p
253.4077 ++#undef  TARGET_ENCODE_SECTION_INFO
253.4078 ++#define TARGET_ENCODE_SECTION_INFO nios2_encode_section_info
253.4079 ++#undef  TARGET_SECTION_TYPE_FLAGS
253.4080 ++#define TARGET_SECTION_TYPE_FLAGS  nios2_section_type_flags
253.4081 ++
253.4082 ++#undef TARGET_INIT_BUILTINS
253.4083 ++#define TARGET_INIT_BUILTINS nios2_init_builtins
253.4084 ++#undef TARGET_EXPAND_BUILTIN
253.4085 ++#define TARGET_EXPAND_BUILTIN nios2_expand_builtin
253.4086 ++
253.4087 ++#undef TARGET_FUNCTION_OK_FOR_SIBCALL
253.4088 ++#define TARGET_FUNCTION_OK_FOR_SIBCALL nios2_function_ok_for_sibcall
253.4089 ++
253.4090 ++#undef TARGET_RTX_COSTS
253.4091 ++#define TARGET_RTX_COSTS nios2_rtx_costs
253.4092 ++
253.4093 ++
253.4094 ++struct gcc_target targetm = TARGET_INITIALIZER;
253.4095 ++
253.4096 ++
253.4097 ++
253.4098 ++/* Threshold for data being put into the small data/bss area, instead
253.4099 ++   of the normal data area (references to the small data/bss area take
253.4100 ++   1 instruction, and use the global pointer, references to the normal
253.4101 ++   data area takes 2 instructions).  */
253.4102 ++unsigned HOST_WIDE_INT nios2_section_threshold = NIOS2_DEFAULT_GVALUE;
253.4103 ++
253.4104 ++
253.4105 ++/* Structure to be filled in by compute_frame_size with register
253.4106 ++   save masks, and offsets for the current function.  */
253.4107 ++
253.4108 ++struct nios2_frame_info
253.4109 ++GTY (())
253.4110 ++{
253.4111 ++  long total_size;		/* # bytes that the entire frame takes up */
253.4112 ++  long var_size;		/* # bytes that variables take up */
253.4113 ++  long args_size;		/* # bytes that outgoing arguments take up */
253.4114 ++  int save_reg_size;		/* # bytes needed to store gp regs */
253.4115 ++  int save_reg_rounded;		/* # bytes needed to store gp regs */
253.4116 ++  long save_regs_offset;	/* offset from new sp to store gp registers */
253.4117 ++  int initialized;		/* != 0 if frame size already calculated */
253.4118 ++  int num_regs;			/* number of gp registers saved */
253.4119 ++};
253.4120 ++
253.4121 ++struct machine_function
253.4122 ++GTY (())
253.4123 ++{
253.4124 ++
253.4125 ++  /* Current frame information, calculated by compute_frame_size.  */
253.4126 ++  struct nios2_frame_info frame;
253.4127 ++};
253.4128 ++
253.4129 ++
253.4130 ++/***************************************
253.4131 ++ * Section encodings
253.4132 ++ ***************************************/
253.4133 ++
253.4134 ++
253.4135 ++
253.4136 ++
253.4137 ++
253.4138 ++/***************************************
253.4139 ++ * Stack Layout and Calling Conventions
253.4140 ++ ***************************************/
253.4141 ++
253.4142 ++
253.4143 ++#define TOO_BIG_OFFSET(X) ((X) > ((1 << 15) - 1))
253.4144 ++#define TEMP_REG_NUM 8
253.4145 ++
253.4146 ++static void
253.4147 ++nios2_asm_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
253.4148 ++{
253.4149 ++  if (flag_verbose_asm || flag_debug_asm)
253.4150 ++    {
253.4151 ++      compute_frame_size ();
253.4152 ++      dump_frame_size (file);
253.4153 ++    }
253.4154 ++}
253.4155 ++
253.4156 ++static rtx
253.4157 ++save_reg (int regno, HOST_WIDE_INT offset, rtx cfa_store_reg)
253.4158 ++{
253.4159 ++  rtx insn, stack_slot;
253.4160 ++
253.4161 ++  stack_slot = gen_rtx_PLUS (SImode,
253.4162 ++			     cfa_store_reg,
253.4163 ++			     GEN_INT (offset));
253.4164 ++
253.4165 ++  insn = emit_insn (gen_rtx_SET (SImode,
253.4166 ++				 gen_rtx_MEM (SImode, stack_slot),
253.4167 ++				 gen_rtx_REG (SImode, regno)));
253.4168 ++
253.4169 ++  RTX_FRAME_RELATED_P (insn) = 1;
253.4170 ++
253.4171 ++  return insn;
253.4172 ++}
253.4173 ++
253.4174 ++static rtx
253.4175 ++restore_reg (int regno, HOST_WIDE_INT offset)
253.4176 ++{
253.4177 ++  rtx insn, stack_slot;
253.4178 ++
253.4179 ++  if (TOO_BIG_OFFSET (offset))
253.4180 ++    {
253.4181 ++      stack_slot = gen_rtx_REG (SImode, TEMP_REG_NUM);
253.4182 ++      insn = emit_insn (gen_rtx_SET (SImode,
253.4183 ++				     stack_slot,
253.4184 ++				     GEN_INT (offset)));
253.4185 ++
253.4186 ++      insn = emit_insn (gen_rtx_SET (SImode,
253.4187 ++				     stack_slot,
253.4188 ++                                     gen_rtx_PLUS (SImode,
253.4189 ++				                   stack_slot,
253.4190 ++				                   stack_pointer_rtx)));
253.4191 ++    }
253.4192 ++  else
253.4193 ++    {
253.4194 ++      stack_slot = gen_rtx_PLUS (SImode,
253.4195 ++			         stack_pointer_rtx,
253.4196 ++				 GEN_INT (offset));
253.4197 ++    }
253.4198 ++
253.4199 ++  stack_slot = gen_rtx_MEM (SImode, stack_slot);
253.4200 ++
253.4201 ++  insn = emit_move_insn (gen_rtx_REG (SImode, regno), stack_slot);
253.4202 ++
253.4203 ++  return insn;
253.4204 ++}
253.4205 ++
253.4206 ++
253.4207 ++/* There are two possible paths for prologue expansion,
253.4208 ++- the first is if the total frame size is < 2^15-1. In that
253.4209 ++case all the immediates will fit into the 16-bit immediate
253.4210 ++fields.
253.4211 ++- the second is when the frame size is too big, in that
253.4212 ++case an additional temporary register is used, first 
253.4213 ++as a cfa_temp to offset the sp, second as the cfa_store
253.4214 ++register.
253.4215 ++
253.4216 ++See the comment above dwarf2out_frame_debug_expr in 
253.4217 ++dwarf2out.c for more explanation of the "rules."
253.4218 ++
253.4219 ++
253.4220 ++Case 1:
253.4221 ++Rule #  Example Insn                       Effect
253.4222 ++2  	addi	sp, sp, -total_frame_size  cfa.reg=sp, cfa.offset=total_frame_size
253.4223 ++                                           cfa_store.reg=sp, cfa_store.offset=total_frame_size
253.4224 ++12  	stw	ra, offset(sp)		   
253.4225 ++12  	stw	r16, offset(sp)
253.4226 ++1  	mov	fp, sp
253.4227 ++  
253.4228 ++Case 2: 
253.4229 ++Rule #  Example Insn                       Effect
253.4230 ++6 	movi	r8, total_frame_size       cfa_temp.reg=r8, cfa_temp.offset=total_frame_size
253.4231 ++2  	sub	sp, sp, r8                 cfa.reg=sp, cfa.offset=total_frame_size
253.4232 ++                                           cfa_store.reg=sp, cfa_store.offset=total_frame_size
253.4233 ++5   	add	r8, r8, sp                 cfa_store.reg=r8, cfa_store.offset=0
253.4234 ++12  	stw	ra, offset(r8)
253.4235 ++12  	stw	r16, offset(r8)
253.4236 ++1  	mov	fp, sp
253.4237 ++
253.4238 ++*/
253.4239 ++
253.4240 ++void
253.4241 ++expand_prologue ()
253.4242 ++{
253.4243 ++  int i;
253.4244 ++  HOST_WIDE_INT total_frame_size;
253.4245 ++  int cfa_store_offset;
253.4246 ++  rtx insn;
253.4247 ++  rtx cfa_store_reg = 0;
253.4248 ++
253.4249 ++  total_frame_size = compute_frame_size ();
253.4250 ++
253.4251 ++  if (total_frame_size)
253.4252 ++    {
253.4253 ++
253.4254 ++      if (TOO_BIG_OFFSET (total_frame_size)) 
253.4255 ++	{
253.4256 ++	    /* cfa_temp and cfa_store_reg are the same register,
253.4257 ++	       cfa_store_reg overwrites cfa_temp */
253.4258 ++	    cfa_store_reg = gen_rtx_REG (SImode, TEMP_REG_NUM);
253.4259 ++	    insn = emit_insn (gen_rtx_SET (SImode,
253.4260 ++					   cfa_store_reg,
253.4261 ++					   GEN_INT (total_frame_size)));
253.4262 ++
253.4263 ++	    RTX_FRAME_RELATED_P (insn) = 1;
253.4264 ++
253.4265 ++
253.4266 ++	    insn = gen_rtx_SET (SImode,
253.4267 ++				stack_pointer_rtx,
253.4268 ++				gen_rtx_MINUS (SImode,
253.4269 ++					       stack_pointer_rtx,
253.4270 ++					       cfa_store_reg));
253.4271 ++
253.4272 ++	    insn = emit_insn (insn);
253.4273 ++	    RTX_FRAME_RELATED_P (insn) = 1;
253.4274 ++
253.4275 ++
253.4276 ++	    /* if there are no registers to save, I don't need to
253.4277 ++	       create a cfa_store */
253.4278 ++	    if (cfun->machine->frame.save_reg_size) 
253.4279 ++	      {
253.4280 ++		insn = gen_rtx_SET (SImode,
253.4281 ++				    cfa_store_reg,
253.4282 ++				    gen_rtx_PLUS (SImode,
253.4283 ++						  cfa_store_reg,
253.4284 ++						  stack_pointer_rtx));
253.4285 ++
253.4286 ++		insn = emit_insn (insn);
253.4287 ++		RTX_FRAME_RELATED_P (insn) = 1;
253.4288 ++	      }
253.4289 ++
253.4290 ++	    cfa_store_offset 
253.4291 ++	      = total_frame_size 
253.4292 ++		- (cfun->machine->frame.save_regs_offset
253.4293 ++		   + cfun->machine->frame.save_reg_rounded);
253.4294 ++	}
253.4295 ++      else
253.4296 ++	{
253.4297 ++	    insn = gen_rtx_SET (SImode,
253.4298 ++				stack_pointer_rtx,
253.4299 ++				gen_rtx_PLUS (SImode,
253.4300 ++					      stack_pointer_rtx,
253.4301 ++					      GEN_INT (-total_frame_size)));
253.4302 ++	    insn = emit_insn (insn);
253.4303 ++	    RTX_FRAME_RELATED_P (insn) = 1;
253.4304 ++
253.4305 ++	    cfa_store_reg = stack_pointer_rtx;
253.4306 ++	    cfa_store_offset 
253.4307 ++	      = cfun->machine->frame.save_regs_offset
253.4308 ++		+ cfun->machine->frame.save_reg_rounded;
253.4309 ++	}
253.4310 ++    }
253.4311 ++
253.4312 ++  if (MUST_SAVE_REGISTER (RA_REGNO))
253.4313 ++    {
253.4314 ++      cfa_store_offset -= 4;
253.4315 ++      save_reg (RA_REGNO, cfa_store_offset, cfa_store_reg);
253.4316 ++    }
253.4317 ++  if (MUST_SAVE_REGISTER (FP_REGNO))
253.4318 ++    {
253.4319 ++      cfa_store_offset -= 4;
253.4320 ++      save_reg (FP_REGNO, cfa_store_offset, cfa_store_reg);
253.4321 ++    }
253.4322 ++
253.4323 ++  for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
253.4324 ++    {
253.4325 ++      if (MUST_SAVE_REGISTER (i) && i != FP_REGNO && i != RA_REGNO)
253.4326 ++	{
253.4327 ++	  cfa_store_offset -= 4;
253.4328 ++	  save_reg (i, cfa_store_offset, cfa_store_reg);
253.4329 ++	}
253.4330 ++    }
253.4331 ++
253.4332 ++  if (frame_pointer_needed)
253.4333 ++    {
253.4334 ++      insn = emit_insn (gen_rtx_SET (SImode,
253.4335 ++				     gen_rtx_REG (SImode, FP_REGNO),
253.4336 ++				     gen_rtx_REG (SImode, SP_REGNO)));
253.4337 ++
253.4338 ++      RTX_FRAME_RELATED_P (insn) = 1;
253.4339 ++    }
253.4340 ++
253.4341 ++  /* If we are profiling, make sure no instructions are scheduled before
253.4342 ++     the call to mcount.  */
253.4343 ++  if (current_function_profile)
253.4344 ++    emit_insn (gen_blockage ());
253.4345 ++}
253.4346 ++
253.4347 ++void
253.4348 ++expand_epilogue (bool sibcall_p)
253.4349 ++{
253.4350 ++  rtx insn;
253.4351 ++  int i;
253.4352 ++  HOST_WIDE_INT total_frame_size;
253.4353 ++  int register_store_offset;
253.4354 ++
253.4355 ++  total_frame_size = compute_frame_size ();
253.4356 ++
253.4357 ++  if (!sibcall_p && nios2_can_use_return_insn ())
253.4358 ++    {
253.4359 ++      insn = emit_jump_insn (gen_return ());
253.4360 ++      return;
253.4361 ++    }
253.4362 ++
253.4363 ++  emit_insn (gen_blockage ());
253.4364 ++
253.4365 ++  register_store_offset =
253.4366 ++    cfun->machine->frame.save_regs_offset +
253.4367 ++    cfun->machine->frame.save_reg_rounded;
253.4368 ++
253.4369 ++  if (MUST_SAVE_REGISTER (RA_REGNO))
253.4370 ++    {
253.4371 ++      register_store_offset -= 4;
253.4372 ++      restore_reg (RA_REGNO, register_store_offset);
253.4373 ++    }
253.4374 ++
253.4375 ++  if (MUST_SAVE_REGISTER (FP_REGNO))
253.4376 ++    {
253.4377 ++      register_store_offset -= 4;
253.4378 ++      restore_reg (FP_REGNO, register_store_offset);
253.4379 ++    }
253.4380 ++
253.4381 ++  for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
253.4382 ++    {
253.4383 ++      if (MUST_SAVE_REGISTER (i) && i != FP_REGNO && i != RA_REGNO)
253.4384 ++	{
253.4385 ++	  register_store_offset -= 4;
253.4386 ++	  restore_reg (i, register_store_offset);
253.4387 ++	}
253.4388 ++    }
253.4389 ++
253.4390 ++  if (total_frame_size)
253.4391 ++    {
253.4392 ++      rtx sp_adjust;
253.4393 ++
253.4394 ++      if (TOO_BIG_OFFSET (total_frame_size))
253.4395 ++        {
253.4396 ++	  sp_adjust = gen_rtx_REG (SImode, TEMP_REG_NUM);
253.4397 ++	  insn = emit_insn (gen_rtx_SET (SImode,
253.4398 ++					 sp_adjust,
253.4399 ++					 GEN_INT (total_frame_size)));
253.4400 ++
253.4401 ++      	}
253.4402 ++      else
253.4403 ++        {
253.4404 ++	  sp_adjust = GEN_INT (total_frame_size);
253.4405 ++	}
253.4406 ++
253.4407 ++      insn = gen_rtx_SET (SImode,
253.4408 ++			  stack_pointer_rtx,
253.4409 ++			  gen_rtx_PLUS (SImode,
253.4410 ++					stack_pointer_rtx,
253.4411 ++					sp_adjust));
253.4412 ++      insn = emit_insn (insn);
253.4413 ++    }
253.4414 ++
253.4415 ++
253.4416 ++  if (!sibcall_p)
253.4417 ++    {
253.4418 ++      insn = emit_jump_insn (gen_return_from_epilogue (gen_rtx (REG, Pmode,
253.4419 ++								RA_REGNO)));
253.4420 ++    }
253.4421 ++}
253.4422 ++
253.4423 ++
253.4424 ++bool
253.4425 ++nios2_function_ok_for_sibcall (tree a ATTRIBUTE_UNUSED, tree b ATTRIBUTE_UNUSED)
253.4426 ++{
253.4427 ++  return true;
253.4428 ++}
253.4429 ++
253.4430 ++
253.4431 ++
253.4432 ++
253.4433 ++
253.4434 ++/* ----------------------- *
253.4435 ++ * Profiling
253.4436 ++ * ----------------------- */
253.4437 ++
253.4438 ++void
253.4439 ++function_profiler (FILE *file, int labelno)
253.4440 ++{
253.4441 ++  fprintf (file, "\t%s mcount begin, label: .LP%d\n", 
253.4442 ++           ASM_COMMENT_START, labelno);
253.4443 ++  fprintf (file, "\tnextpc\tr8\n");
253.4444 ++  fprintf (file, "\tmov\tr9, ra\n");
253.4445 ++  fprintf (file, "\tmovhi\tr10, %%hiadj(.LP%d)\n", labelno);
253.4446 ++  fprintf (file, "\taddi\tr10, r10, %%lo(.LP%d)\n", labelno);
253.4447 ++  fprintf (file, "\tcall\tmcount\n");
253.4448 ++  fprintf (file, "\tmov\tra, r9\n");
253.4449 ++  fprintf (file, "\t%s mcount end\n", ASM_COMMENT_START);
253.4450 ++}
253.4451 ++
253.4452 ++
253.4453 ++/***************************************
253.4454 ++ * Stack Layout
253.4455 ++ ***************************************/
253.4456 ++
253.4457 ++
253.4458 ++void
253.4459 ++dump_frame_size (FILE *file)
253.4460 ++{
253.4461 ++  fprintf (file, "\t%s Current Frame Info\n", ASM_COMMENT_START);
253.4462 ++
253.4463 ++  fprintf (file, "\t%s total_size = %ld\n", ASM_COMMENT_START,
253.4464 ++	   cfun->machine->frame.total_size);
253.4465 ++  fprintf (file, "\t%s var_size = %ld\n", ASM_COMMENT_START,
253.4466 ++	   cfun->machine->frame.var_size);
253.4467 ++  fprintf (file, "\t%s args_size = %ld\n", ASM_COMMENT_START,
253.4468 ++	   cfun->machine->frame.args_size);
253.4469 ++  fprintf (file, "\t%s save_reg_size = %d\n", ASM_COMMENT_START,
253.4470 ++	   cfun->machine->frame.save_reg_size);
253.4471 ++  fprintf (file, "\t%s save_reg_rounded = %d\n", ASM_COMMENT_START,
253.4472 ++	   cfun->machine->frame.save_reg_rounded);
253.4473 ++  fprintf (file, "\t%s initialized = %d\n", ASM_COMMENT_START,
253.4474 ++	   cfun->machine->frame.initialized);
253.4475 ++  fprintf (file, "\t%s num_regs = %d\n", ASM_COMMENT_START,
253.4476 ++	   cfun->machine->frame.num_regs);
253.4477 ++  fprintf (file, "\t%s save_regs_offset = %ld\n", ASM_COMMENT_START,
253.4478 ++	   cfun->machine->frame.save_regs_offset);
253.4479 ++  fprintf (file, "\t%s current_function_is_leaf = %d\n", ASM_COMMENT_START,
253.4480 ++	   current_function_is_leaf);
253.4481 ++  fprintf (file, "\t%s frame_pointer_needed = %d\n", ASM_COMMENT_START,
253.4482 ++	   frame_pointer_needed);
253.4483 ++  fprintf (file, "\t%s pretend_args_size = %d\n", ASM_COMMENT_START,
253.4484 ++	   current_function_pretend_args_size);
253.4485 ++
253.4486 ++}
253.4487 ++
253.4488 ++
253.4489 ++/* Return the bytes needed to compute the frame pointer from the current
253.4490 ++   stack pointer.
253.4491 ++*/
253.4492 ++
253.4493 ++HOST_WIDE_INT
253.4494 ++compute_frame_size ()
253.4495 ++{
253.4496 ++  unsigned int regno;
253.4497 ++  HOST_WIDE_INT var_size;	/* # of var. bytes allocated */
253.4498 ++  HOST_WIDE_INT total_size;	/* # bytes that the entire frame takes up */
253.4499 ++  HOST_WIDE_INT save_reg_size;	/* # bytes needed to store callee save regs */
253.4500 ++  HOST_WIDE_INT save_reg_rounded;	
253.4501 ++    /* # bytes needed to store callee save regs (rounded) */
253.4502 ++  HOST_WIDE_INT out_args_size;	/* # bytes needed for outgoing args */
253.4503 ++
253.4504 ++  save_reg_size = 0;
253.4505 ++  var_size = STACK_ALIGN (get_frame_size ());
253.4506 ++  out_args_size = STACK_ALIGN (current_function_outgoing_args_size);
253.4507 ++
253.4508 ++  total_size = var_size + out_args_size;
253.4509 ++
253.4510 ++  /* Calculate space needed for gp registers.  */
253.4511 ++  for (regno = 0; regno <= FIRST_PSEUDO_REGISTER; regno++)
253.4512 ++    {
253.4513 ++      if (MUST_SAVE_REGISTER (regno))
253.4514 ++	{
253.4515 ++	  save_reg_size += 4;
253.4516 ++	}
253.4517 ++    }
253.4518 ++
253.4519 ++  save_reg_rounded = STACK_ALIGN (save_reg_size);
253.4520 ++  total_size += save_reg_rounded;
253.4521 ++
253.4522 ++  total_size += STACK_ALIGN (current_function_pretend_args_size);
253.4523 ++
253.4524 ++  /* Save other computed information.  */
253.4525 ++  cfun->machine->frame.total_size = total_size;
253.4526 ++  cfun->machine->frame.var_size = var_size;
253.4527 ++  cfun->machine->frame.args_size = current_function_outgoing_args_size;
253.4528 ++  cfun->machine->frame.save_reg_size = save_reg_size;
253.4529 ++  cfun->machine->frame.save_reg_rounded = save_reg_rounded;
253.4530 ++  cfun->machine->frame.initialized = reload_completed;
253.4531 ++  cfun->machine->frame.num_regs = save_reg_size / UNITS_PER_WORD;
253.4532 ++
253.4533 ++  cfun->machine->frame.save_regs_offset
253.4534 ++    = save_reg_rounded ? current_function_outgoing_args_size + var_size : 0;
253.4535 ++
253.4536 ++  return total_size;
253.4537 ++}
253.4538 ++
253.4539 ++
253.4540 ++int
253.4541 ++nios2_initial_elimination_offset (int from, int to ATTRIBUTE_UNUSED)
253.4542 ++{
253.4543 ++  int offset;
253.4544 ++
253.4545 ++  /* Set OFFSET to the offset from the stack pointer.  */
253.4546 ++  switch (from)
253.4547 ++    {
253.4548 ++    case FRAME_POINTER_REGNUM:
253.4549 ++      offset = 0;
253.4550 ++      break;
253.4551 ++
253.4552 ++    case ARG_POINTER_REGNUM:
253.4553 ++      compute_frame_size ();
253.4554 ++      offset = cfun->machine->frame.total_size;
253.4555 ++      offset -= current_function_pretend_args_size;
253.4556 ++      break;
253.4557 ++
253.4558 ++    case RETURN_ADDRESS_POINTER_REGNUM:
253.4559 ++      compute_frame_size ();
253.4560 ++      /* since the return address is always the first of the
253.4561 ++         saved registers, return the offset to the beginning
253.4562 ++         of the saved registers block */
253.4563 ++      offset = cfun->machine->frame.save_regs_offset;
253.4564 ++      break;
253.4565 ++
253.4566 ++    default:
253.4567 ++      abort ();
253.4568 ++    }
253.4569 ++
253.4570 ++  return offset;
253.4571 ++}
253.4572 ++
253.4573 ++/* Return nonzero if this function is known to have a null epilogue.
253.4574 ++   This allows the optimizer to omit jumps to jumps if no stack
253.4575 ++   was created.  */
253.4576 ++int
253.4577 ++nios2_can_use_return_insn ()
253.4578 ++{
253.4579 ++  if (!reload_completed)
253.4580 ++    return 0;
253.4581 ++
253.4582 ++  if (regs_ever_live[RA_REGNO] || current_function_profile)
253.4583 ++    return 0;
253.4584 ++
253.4585 ++  if (cfun->machine->frame.initialized)
253.4586 ++    return cfun->machine->frame.total_size == 0;
253.4587 ++
253.4588 ++  return compute_frame_size () == 0;
253.4589 ++}
253.4590 ++
253.4591 ++
253.4592 ++
253.4593 ++
253.4594 ++
253.4595 ++/***************************************
253.4596 ++ *
253.4597 ++ ***************************************/
253.4598 ++
253.4599 ++const char *nios2_sys_nosys_string;    /* for -msys=nosys */
253.4600 ++const char *nios2_sys_lib_string;    /* for -msys-lib= */
253.4601 ++const char *nios2_sys_crt0_string;    /* for -msys-crt0= */
253.4602 ++
253.4603 ++void
253.4604 ++override_options ()
253.4605 ++{
253.4606 ++  /* Function to allocate machine-dependent function status.  */
253.4607 ++  init_machine_status = &nios2_init_machine_status;
253.4608 ++
253.4609 ++  nios2_section_threshold 
253.4610 ++    = g_switch_set ? g_switch_value : NIOS2_DEFAULT_GVALUE;
253.4611 ++
253.4612 ++  if (nios2_sys_nosys_string && *nios2_sys_nosys_string)
253.4613 ++    {
253.4614 ++      error ("invalid option '-msys=nosys%s'", nios2_sys_nosys_string);
253.4615 ++    }
253.4616 ++
253.4617 ++  /* If we don't have mul, we don't have mulx either! */
253.4618 ++  if (!TARGET_HAS_MUL && TARGET_HAS_MULX) 
253.4619 ++    {
253.4620 ++      target_flags &= ~HAS_MULX_FLAG;
253.4621 ++    }
253.4622 ++
253.4623 ++}
253.4624 ++
253.4625 ++void
253.4626 ++optimization_options (int level, int size)
253.4627 ++{
253.4628 ++  if (level || size)
253.4629 ++    {
253.4630 ++      target_flags |= INLINE_MEMCPY_FLAG;
253.4631 ++    }
253.4632 ++
253.4633 ++  if (level >= 3 && !size)
253.4634 ++    {
253.4635 ++      target_flags |= FAST_SW_DIV_FLAG;
253.4636 ++    }
253.4637 ++}
253.4638 ++
253.4639 ++/* Allocate a chunk of memory for per-function machine-dependent data.  */
253.4640 ++static struct machine_function *
253.4641 ++nios2_init_machine_status ()
253.4642 ++{
253.4643 ++  return ((struct machine_function *)
253.4644 ++	  ggc_alloc_cleared (sizeof (struct machine_function)));
253.4645 ++}
253.4646 ++
253.4647 ++
253.4648 ++
253.4649 ++/*****************
253.4650 ++ * Describing Relative Costs of Operations
253.4651 ++ *****************/
253.4652 ++
253.4653 ++/* Compute a (partial) cost for rtx X.  Return true if the complete
253.4654 ++   cost has been computed, and false if subexpressions should be
253.4655 ++   scanned.  In either case, *TOTAL contains the cost result.  */
253.4656 ++
253.4657 ++
253.4658 ++
253.4659 ++static bool
253.4660 ++nios2_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total)
253.4661 ++{
253.4662 ++  switch (code)
253.4663 ++    {
253.4664 ++      case CONST_INT:
253.4665 ++	if (INTVAL (x) == 0)
253.4666 ++	  {
253.4667 ++	    *total = COSTS_N_INSNS (0);
253.4668 ++	    return true;
253.4669 ++	  }
253.4670 ++	else if (SMALL_INT (INTVAL (x))
253.4671 ++		|| SMALL_INT_UNSIGNED (INTVAL (x))
253.4672 ++		|| UPPER16_INT (INTVAL (x)))
253.4673 ++	  {
253.4674 ++	    *total = COSTS_N_INSNS (2);
253.4675 ++	    return true;
253.4676 ++	  }
253.4677 ++	else
253.4678 ++	  {
253.4679 ++	    *total = COSTS_N_INSNS (4);
253.4680 ++	    return true;
253.4681 ++	  }
253.4682 ++
253.4683 ++      case LABEL_REF:
253.4684 ++      case SYMBOL_REF:
253.4685 ++	/* ??? gp relative stuff will fit in here */
253.4686 ++	/* fall through */
253.4687 ++      case CONST:
253.4688 ++      case CONST_DOUBLE:
253.4689 ++	{
253.4690 ++	  *total = COSTS_N_INSNS (4);
253.4691 ++	  return true;
253.4692 ++	}
253.4693 ++
253.4694 ++      case MULT:
253.4695 ++	{
253.4696 ++	  *total = COSTS_N_INSNS (1);
253.4697 ++	  return false;
253.4698 ++	}
253.4699 ++      case SIGN_EXTEND:
253.4700 ++	{
253.4701 ++	  *total = COSTS_N_INSNS (3);
253.4702 ++	  return false;
253.4703 ++	}
253.4704 ++      case ZERO_EXTEND:
253.4705 ++	{
253.4706 ++	  *total = COSTS_N_INSNS (1);
253.4707 ++	  return false;
253.4708 ++	}
253.4709 ++
253.4710 ++    default:
253.4711 ++      return false;
253.4712 ++    }
253.4713 ++}
253.4714 ++
253.4715 ++
253.4716 ++/***************************************
253.4717 ++ * INSTRUCTION SUPPORT
253.4718 ++ *
253.4719 ++ * These functions are used within the Machine Description to
253.4720 ++ * handle common or complicated output and expansions from
253.4721 ++ * instructions.
253.4722 ++ ***************************************/
253.4723 ++
253.4724 ++int
253.4725 ++nios2_emit_move_sequence (rtx *operands, enum machine_mode mode)
253.4726 ++{
253.4727 ++  rtx to = operands[0];
253.4728 ++  rtx from = operands[1];
253.4729 ++
253.4730 ++  if (!register_operand (to, mode) && !reg_or_0_operand (from, mode))
253.4731 ++    {
253.4732 ++      if (no_new_pseudos)
253.4733 ++	internal_error ("Trying to force_reg no_new_pseudos == 1");
253.4734 ++      from = copy_to_mode_reg (mode, from);
253.4735 ++    }
253.4736 ++
253.4737 ++  operands[0] = to;
253.4738 ++  operands[1] = from;
253.4739 ++  return 0;
253.4740 ++}
253.4741 ++
253.4742 ++/* Divide Support */
253.4743 ++
253.4744 ++/*
253.4745 ++  If -O3 is used, we want to output a table lookup for
253.4746 ++  divides between small numbers (both num and den >= 0
253.4747 ++  and < 0x10). The overhead of this method in the worse
253.4748 ++  case is 40 bytes in the text section (10 insns) and
253.4749 ++  256 bytes in the data section. Additional divides do
253.4750 ++  not incur additional penalties in the data section.
253.4751 ++
253.4752 ++  Code speed is improved for small divides by about 5x
253.4753 ++  when using this method in the worse case (~9 cycles
253.4754 ++  vs ~45). And in the worse case divides not within the
253.4755 ++  table are penalized by about 10% (~5 cycles vs ~45).
253.4756 ++  However in the typical case the penalty is not as bad
253.4757 ++  because doing the long divide in only 45 cycles is
253.4758 ++  quite optimistic.
253.4759 ++
253.4760 ++  ??? It would be nice to have some benchmarks other
253.4761 ++  than Dhrystone to back this up.
253.4762 ++
253.4763 ++  This bit of expansion is to create this instruction
253.4764 ++  sequence as rtl.
253.4765 ++	or	$8, $4, $5
253.4766 ++	slli	$9, $4, 4
253.4767 ++	cmpgeui	$3, $8, 16
253.4768 ++	beq	$3, $0, .L3
253.4769 ++	or	$10, $9, $5
253.4770 ++	add	$12, $11, divide_table
253.4771 ++	ldbu	$2, 0($12)
253.4772 ++	br	.L1
253.4773 ++.L3:
253.4774 ++	call	slow_div
253.4775 ++.L1:
253.4776 ++#	continue here with result in $2
253.4777 ++
253.4778 ++  ??? Ideally I would like the emit libcall block to contain
253.4779 ++  all of this code, but I don't know how to do that. What it
253.4780 ++  means is that if the divide can be eliminated, it may not
253.4781 ++  completely disappear.
253.4782 ++
253.4783 ++  ??? The __divsi3_table label should ideally be moved out
253.4784 ++  of this block and into a global. If it is placed into the
253.4785 ++  sdata section we can save even more cycles by doing things
253.4786 ++  gp relative.
253.4787 ++*/
253.4788 ++int
253.4789 ++nios2_emit_expensive_div (rtx *operands, enum machine_mode mode)
253.4790 ++{
253.4791 ++  rtx or_result, shift_left_result;
253.4792 ++  rtx lookup_value;
253.4793 ++  rtx lab1, lab3;
253.4794 ++  rtx insns;
253.4795 ++  rtx libfunc;
253.4796 ++  rtx final_result;
253.4797 ++  rtx tmp;
253.4798 ++
253.4799 ++  /* it may look a little generic, but only SImode
253.4800 ++     is supported for now */
253.4801 ++  if (mode != SImode)
253.4802 ++    abort ();
253.4803 ++
253.4804 ++  libfunc = sdiv_optab->handlers[(int) SImode].libfunc;
253.4805 ++
253.4806 ++
253.4807 ++
253.4808 ++  lab1 = gen_label_rtx ();
253.4809 ++  lab3 = gen_label_rtx ();
253.4810 ++
253.4811 ++  or_result = expand_simple_binop (SImode, IOR,
253.4812 ++				   operands[1], operands[2],
253.4813 ++				   0, 0, OPTAB_LIB_WIDEN);
253.4814 ++
253.4815 ++  emit_cmp_and_jump_insns (or_result, GEN_INT (15), GTU, 0,
253.4816 ++			   GET_MODE (or_result), 0, lab3);
253.4817 ++  JUMP_LABEL (get_last_insn ()) = lab3;
253.4818 ++
253.4819 ++  shift_left_result = expand_simple_binop (SImode, ASHIFT,
253.4820 ++					   operands[1], GEN_INT (4),
253.4821 ++					   0, 0, OPTAB_LIB_WIDEN);
253.4822 ++
253.4823 ++  lookup_value = expand_simple_binop (SImode, IOR,
253.4824 ++				      shift_left_result, operands[2],
253.4825 ++				      0, 0, OPTAB_LIB_WIDEN);
253.4826 ++
253.4827 ++  convert_move (operands[0],
253.4828 ++		gen_rtx (MEM, QImode,
253.4829 ++			 gen_rtx (PLUS, SImode,
253.4830 ++				  lookup_value,
253.4831 ++				  gen_rtx_SYMBOL_REF (SImode, "__divsi3_table"))),
253.4832 ++		1);
253.4833 ++
253.4834 ++
253.4835 ++  tmp = emit_jump_insn (gen_jump (lab1));
253.4836 ++  JUMP_LABEL (tmp) = lab1;
253.4837 ++  emit_barrier ();
253.4838 ++
253.4839 ++  emit_label (lab3);
253.4840 ++  LABEL_NUSES (lab3) = 1;
253.4841 ++
253.4842 ++  start_sequence ();
253.4843 ++  final_result = emit_library_call_value (libfunc, NULL_RTX,
253.4844 ++					  LCT_CONST, SImode, 2,
253.4845 ++					  operands[1], SImode,
253.4846 ++					  operands[2], SImode);
253.4847 ++
253.4848 ++
253.4849 ++  insns = get_insns ();
253.4850 ++  end_sequence ();
253.4851 ++  emit_libcall_block (insns, operands[0], final_result,
253.4852 ++		      gen_rtx (DIV, SImode, operands[1], operands[2]));
253.4853 ++
253.4854 ++  emit_label (lab1);
253.4855 ++  LABEL_NUSES (lab1) = 1;
253.4856 ++  return 1;
253.4857 ++}
253.4858 ++
253.4859 ++/* Branches/Compares */
253.4860 ++
253.4861 ++/* the way of handling branches/compares
253.4862 ++   in gcc is heavily borrowed from MIPS */
253.4863 ++
253.4864 ++enum internal_test
253.4865 ++{
253.4866 ++  ITEST_EQ,
253.4867 ++  ITEST_NE,
253.4868 ++  ITEST_GT,
253.4869 ++  ITEST_GE,
253.4870 ++  ITEST_LT,
253.4871 ++  ITEST_LE,
253.4872 ++  ITEST_GTU,
253.4873 ++  ITEST_GEU,
253.4874 ++  ITEST_LTU,
253.4875 ++  ITEST_LEU,
253.4876 ++  ITEST_MAX
253.4877 ++};
253.4878 ++
253.4879 ++static enum internal_test map_test_to_internal_test (enum rtx_code);
253.4880 ++
253.4881 ++/* Cached operands, and operator to compare for use in set/branch/trap
253.4882 ++   on condition codes.  */
253.4883 ++rtx branch_cmp[2];
253.4884 ++enum cmp_type branch_type;
253.4885 ++
253.4886 ++/* Make normal rtx_code into something we can index from an array */
253.4887 ++
253.4888 ++static enum internal_test
253.4889 ++map_test_to_internal_test (enum rtx_code test_code)
253.4890 ++{
253.4891 ++  enum internal_test test = ITEST_MAX;
253.4892 ++
253.4893 ++  switch (test_code)
253.4894 ++    {
253.4895 ++    case EQ:
253.4896 ++      test = ITEST_EQ;
253.4897 ++      break;
253.4898 ++    case NE:
253.4899 ++      test = ITEST_NE;
253.4900 ++      break;
253.4901 ++    case GT:
253.4902 ++      test = ITEST_GT;
253.4903 ++      break;
253.4904 ++    case GE:
253.4905 ++      test = ITEST_GE;
253.4906 ++      break;
253.4907 ++    case LT:
253.4908 ++      test = ITEST_LT;
253.4909 ++      break;
253.4910 ++    case LE:
253.4911 ++      test = ITEST_LE;
253.4912 ++      break;
253.4913 ++    case GTU:
253.4914 ++      test = ITEST_GTU;
253.4915 ++      break;
253.4916 ++    case GEU:
253.4917 ++      test = ITEST_GEU;
253.4918 ++      break;
253.4919 ++    case LTU:
253.4920 ++      test = ITEST_LTU;
253.4921 ++      break;
253.4922 ++    case LEU:
253.4923 ++      test = ITEST_LEU;
253.4924 ++      break;
253.4925 ++    default:
253.4926 ++      break;
253.4927 ++    }
253.4928 ++
253.4929 ++  return test;
253.4930 ++}
253.4931 ++
253.4932 ++/* Generate the code to compare (and possibly branch) two integer values
253.4933 ++   TEST_CODE is the comparison code we are trying to emulate 
253.4934 ++     (or implement directly)
253.4935 ++   RESULT is where to store the result of the comparison, 
253.4936 ++     or null to emit a branch
253.4937 ++   CMP0 CMP1 are the two comparison operands
253.4938 ++   DESTINATION is the destination of the branch, or null to only compare
253.4939 ++   */
253.4940 ++
253.4941 ++void
253.4942 ++gen_int_relational (enum rtx_code test_code, /* relational test (EQ, etc) */
253.4943 ++		    rtx result,		/* result to store comp. or 0 if branch */
253.4944 ++		    rtx cmp0,		/* first operand to compare */
253.4945 ++		    rtx cmp1,		/* second operand to compare */
253.4946 ++		    rtx destination)	/* destination of the branch, or 0 if compare */
253.4947 ++{
253.4948 ++  struct cmp_info
253.4949 ++  {
253.4950 ++    /* for register (or 0) compares */
253.4951 ++    enum rtx_code test_code_reg;	/* code to use in instruction (LT vs. LTU) */
253.4952 ++    int reverse_regs;		/* reverse registers in test */
253.4953 ++
253.4954 ++    /* for immediate compares */
253.4955 ++    enum rtx_code test_code_const;	
253.4956 ++         /* code to use in instruction (LT vs. LTU) */
253.4957 ++    int const_low;		/* low bound of constant we can accept */
253.4958 ++    int const_high;		/* high bound of constant we can accept */
253.4959 ++    int const_add;		/* constant to add */
253.4960 ++
253.4961 ++    /* generic info */
253.4962 ++    int unsignedp;		/* != 0 for unsigned comparisons.  */
253.4963 ++  };
253.4964 ++
253.4965 ++  static const struct cmp_info info[(int) ITEST_MAX] = {
253.4966 ++
253.4967 ++    {EQ, 0, EQ, -32768, 32767, 0, 0}, /* EQ  */
253.4968 ++    {NE, 0, NE, -32768, 32767, 0, 0}, /* NE  */
253.4969 ++
253.4970 ++    {LT, 1, GE, -32769, 32766, 1, 0}, /* GT  */
253.4971 ++    {GE, 0, GE, -32768, 32767, 0, 0}, /* GE  */
253.4972 ++    {LT, 0, LT, -32768, 32767, 0, 0}, /* LT  */
253.4973 ++    {GE, 1, LT, -32769, 32766, 1, 0}, /* LE  */
253.4974 ++
253.4975 ++    {LTU, 1, GEU, 0, 65534, 1, 0}, /* GTU */
253.4976 ++    {GEU, 0, GEU, 0, 65535, 0, 0}, /* GEU */
253.4977 ++    {LTU, 0, LTU, 0, 65535, 0, 0}, /* LTU */
253.4978 ++    {GEU, 1, LTU, 0, 65534, 1, 0}, /* LEU */
253.4979 ++  };
253.4980 ++
253.4981 ++  enum internal_test test;
253.4982 ++  enum machine_mode mode;
253.4983 ++  const struct cmp_info *p_info;
253.4984 ++  int branch_p;
253.4985 ++
253.4986 ++
253.4987 ++
253.4988 ++
253.4989 ++  test = map_test_to_internal_test (test_code);
253.4990 ++  if (test == ITEST_MAX)
253.4991 ++    abort ();
253.4992 ++
253.4993 ++  p_info = &info[(int) test];
253.4994 ++
253.4995 ++  mode = GET_MODE (cmp0);
253.4996 ++  if (mode == VOIDmode)
253.4997 ++    mode = GET_MODE (cmp1);
253.4998 ++
253.4999 ++  branch_p = (destination != 0);
253.5000 ++
253.5001 ++  /* We can't, under any circumstances, have const_ints in cmp0
253.5002 ++     ??? Actually we could have const0 */
253.5003 ++  if (GET_CODE (cmp0) == CONST_INT)
253.5004 ++    cmp0 = force_reg (mode, cmp0);
253.5005 ++
253.5006 ++  /* if the comparison is against an int not in legal range
253.5007 ++     move it into a register */
253.5008 ++  if (GET_CODE (cmp1) == CONST_INT)
253.5009 ++    {
253.5010 ++      HOST_WIDE_INT value = INTVAL (cmp1);
253.5011 ++
253.5012 ++      if (value < p_info->const_low || value > p_info->const_high)
253.5013 ++	cmp1 = force_reg (mode, cmp1);
253.5014 ++    }
253.5015 ++
253.5016 ++  /* Comparison to constants, may involve adding 1 to change a GT into GE.
253.5017 ++     Comparison between two registers, may involve switching operands.  */
253.5018 ++  if (GET_CODE (cmp1) == CONST_INT)
253.5019 ++    {
253.5020 ++      if (p_info->const_add != 0)
253.5021 ++	{
253.5022 ++	  HOST_WIDE_INT new = INTVAL (cmp1) + p_info->const_add;
253.5023 ++
253.5024 ++	  /* If modification of cmp1 caused overflow,
253.5025 ++	     we would get the wrong answer if we follow the usual path;
253.5026 ++	     thus, x > 0xffffffffU would turn into x > 0U.  */
253.5027 ++	  if ((p_info->unsignedp
253.5028 ++	       ? (unsigned HOST_WIDE_INT) new >
253.5029 ++	       (unsigned HOST_WIDE_INT) INTVAL (cmp1)
253.5030 ++	       : new > INTVAL (cmp1)) != (p_info->const_add > 0))
253.5031 ++	    {
253.5032 ++	      /* ??? This case can never happen with the current numbers,
253.5033 ++	         but I am paranoid and would rather an abort than
253.5034 ++	         a bug I will never find */
253.5035 ++	      abort ();
253.5036 ++	    }
253.5037 ++	  else
253.5038 ++	    cmp1 = GEN_INT (new);
253.5039 ++	}
253.5040 ++    }
253.5041 ++
253.5042 ++  else if (p_info->reverse_regs)
253.5043 ++    {
253.5044 ++      rtx temp = cmp0;
253.5045 ++      cmp0 = cmp1;
253.5046 ++      cmp1 = temp;
253.5047 ++    }
253.5048 ++
253.5049 ++
253.5050 ++
253.5051 ++  if (branch_p)
253.5052 ++    {
253.5053 ++      if (register_operand (cmp0, mode) && register_operand (cmp1, mode))
253.5054 ++	{
253.5055 ++	  rtx insn;
253.5056 ++	  rtx cond = gen_rtx (p_info->test_code_reg, mode, cmp0, cmp1);
253.5057 ++	  rtx label = gen_rtx_LABEL_REF (VOIDmode, destination);
253.5058 ++
253.5059 ++	  insn = gen_rtx_SET (VOIDmode, pc_rtx,
253.5060 ++			      gen_rtx_IF_THEN_ELSE (VOIDmode,
253.5061 ++						    cond, label, pc_rtx));
253.5062 ++	  emit_jump_insn (insn);
253.5063 ++	}
253.5064 ++      else
253.5065 ++	{
253.5066 ++	  rtx cond, label;
253.5067 ++
253.5068 ++	  result = gen_reg_rtx (mode);
253.5069 ++
253.5070 ++	  emit_move_insn (result,
253.5071 ++			  gen_rtx (p_info->test_code_const, mode, cmp0,
253.5072 ++				   cmp1));
253.5073 ++
253.5074 ++	  cond = gen_rtx (NE, mode, result, const0_rtx);
253.5075 ++	  label = gen_rtx_LABEL_REF (VOIDmode, destination);
253.5076 ++
253.5077 ++	  emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx,
253.5078 ++				       gen_rtx_IF_THEN_ELSE (VOIDmode,
253.5079 ++							     cond,
253.5080 ++							     label, pc_rtx)));
253.5081 ++	}
253.5082 ++    }
253.5083 ++  else
253.5084 ++    {
253.5085 ++      if (register_operand (cmp0, mode) && register_operand (cmp1, mode))
253.5086 ++	{
253.5087 ++	  emit_move_insn (result,
253.5088 ++			  gen_rtx (p_info->test_code_reg, mode, cmp0, cmp1));
253.5089 ++	}
253.5090 ++      else
253.5091 ++	{
253.5092 ++	  emit_move_insn (result,
253.5093 ++			  gen_rtx (p_info->test_code_const, mode, cmp0,
253.5094 ++				   cmp1));
253.5095 ++	}
253.5096 ++    }
253.5097 ++
253.5098 ++}
253.5099 ++
253.5100 ++
253.5101 ++/* ??? For now conditional moves are only supported
253.5102 ++   when the mode of the operands being compared are
253.5103 ++   the same as the ones being moved */
253.5104 ++
253.5105 ++void
253.5106 ++gen_conditional_move (rtx *operands, enum machine_mode mode)
253.5107 ++{
253.5108 ++  rtx insn, cond;
253.5109 ++  rtx cmp_reg = gen_reg_rtx (mode);
253.5110 ++  enum rtx_code cmp_code = GET_CODE (operands[1]);
253.5111 ++  enum rtx_code move_code = EQ;
253.5112 ++
253.5113 ++  /* emit a comparison if it is not "simple".
253.5114 ++     Simple comparisons are X eq 0 and X ne 0 */
253.5115 ++  if ((cmp_code == EQ || cmp_code == NE) && branch_cmp[1] == const0_rtx)
253.5116 ++    {
253.5117 ++      cmp_reg = branch_cmp[0];
253.5118 ++      move_code = cmp_code;
253.5119 ++    }
253.5120 ++  else if ((cmp_code == EQ || cmp_code == NE) && branch_cmp[0] == const0_rtx)
253.5121 ++    {
253.5122 ++      cmp_reg = branch_cmp[1];
253.5123 ++      move_code = cmp_code == EQ ? NE : EQ;
253.5124 ++    }
253.5125 ++  else
253.5126 ++    gen_int_relational (cmp_code, cmp_reg, branch_cmp[0], branch_cmp[1],
253.5127 ++			NULL_RTX);
253.5128 ++
253.5129 ++  cond = gen_rtx (move_code, VOIDmode, cmp_reg, CONST0_RTX (mode));
253.5130 ++  insn = gen_rtx_SET (mode, operands[0],
253.5131 ++		      gen_rtx_IF_THEN_ELSE (mode,
253.5132 ++					    cond, operands[2], operands[3]));
253.5133 ++  emit_insn (insn);
253.5134 ++}
253.5135 ++
253.5136 ++/*******************
253.5137 ++ * Addressing Modes
253.5138 ++ *******************/
253.5139 ++
253.5140 ++int
253.5141 ++nios2_legitimate_address (rtx operand, enum machine_mode mode ATTRIBUTE_UNUSED, 
253.5142 ++                          int strict)
253.5143 ++{
253.5144 ++  int ret_val = 0;
253.5145 ++
253.5146 ++  switch (GET_CODE (operand))
253.5147 ++    {
253.5148 ++      /* direct.  */
253.5149 ++    case SYMBOL_REF:
253.5150 ++      if (SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (operand))
253.5151 ++        {
253.5152 ++          ret_val = 1;
253.5153 ++          break;
253.5154 ++	}
253.5155 ++      /* else, fall through */
253.5156 ++    case LABEL_REF:
253.5157 ++    case CONST_INT:
253.5158 ++    case CONST:
253.5159 ++    case CONST_DOUBLE:
253.5160 ++      /* ??? In here I need to add gp addressing */
253.5161 ++      ret_val = 0;
253.5162 ++
253.5163 ++      break;
253.5164 ++
253.5165 ++      /* Register indirect.  */
253.5166 ++    case REG:
253.5167 ++      ret_val = REG_OK_FOR_BASE_P2 (operand, strict);
253.5168 ++      break;
253.5169 ++
253.5170 ++      /* Register indirect with displacement */
253.5171 ++    case PLUS:
253.5172 ++      {
253.5173 ++	rtx op0 = XEXP (operand, 0);
253.5174 ++	rtx op1 = XEXP (operand, 1);
253.5175 ++
253.5176 ++	if (REG_P (op0) && REG_P (op1))
253.5177 ++	  ret_val = 0;
253.5178 ++	else if (REG_P (op0) && CONSTANT_P (op1))
253.5179 ++	  ret_val = REG_OK_FOR_BASE_P2 (op0, strict)
253.5180 ++	    && SMALL_INT (INTVAL (op1));
253.5181 ++	else if (REG_P (op1) && CONSTANT_P (op0))
253.5182 ++	  ret_val = REG_OK_FOR_BASE_P2 (op1, strict)
253.5183 ++	    && SMALL_INT (INTVAL (op0));
253.5184 ++	else
253.5185 ++	  ret_val = 0;
253.5186 ++      }
253.5187 ++      break;
253.5188 ++
253.5189 ++    default:
253.5190 ++      ret_val = 0;
253.5191 ++      break;
253.5192 ++    }
253.5193 ++
253.5194 ++  return ret_val;
253.5195 ++}
253.5196 ++
253.5197 ++/* Return true if EXP should be placed in the small data section.  */
253.5198 ++
253.5199 ++static bool
253.5200 ++nios2_in_small_data_p (tree exp)
253.5201 ++{
253.5202 ++  /* We want to merge strings, so we never consider them small data.  */
253.5203 ++  if (TREE_CODE (exp) == STRING_CST)
253.5204 ++    return false;
253.5205 ++
253.5206 ++  if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
253.5207 ++    {
253.5208 ++      const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp));
253.5209 ++      /* ??? these string names need moving into 
253.5210 ++         an array in some header file */
253.5211 ++      if (nios2_section_threshold > 0
253.5212 ++          && (strcmp (section, ".sbss") == 0
253.5213 ++	      || strncmp (section, ".sbss.", 6) == 0
253.5214 ++	      || strcmp (section, ".sdata") == 0
253.5215 ++	      || strncmp (section, ".sdata.", 7) == 0))
253.5216 ++	return true;
253.5217 ++    }
253.5218 ++  else if (TREE_CODE (exp) == VAR_DECL)
253.5219 ++    {
253.5220 ++      HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
253.5221 ++
253.5222 ++      /* If this is an incomplete type with size 0, then we can't put it
253.5223 ++         in sdata because it might be too big when completed.  */
253.5224 ++      if (size > 0 && size <= nios2_section_threshold)
253.5225 ++	return true;
253.5226 ++    }
253.5227 ++
253.5228 ++  return false;
253.5229 ++}
253.5230 ++
253.5231 ++static void
253.5232 ++nios2_encode_section_info (tree decl, rtx rtl, int first)
253.5233 ++{
253.5234 ++
253.5235 ++  rtx symbol;
253.5236 ++  int flags;
253.5237 ++
253.5238 ++  default_encode_section_info (decl, rtl, first);
253.5239 ++  
253.5240 ++  /* Careful not to prod global register variables.  */
253.5241 ++  if (GET_CODE (rtl) != MEM)
253.5242 ++    return;
253.5243 ++  symbol = XEXP (rtl, 0);
253.5244 ++  if (GET_CODE (symbol) != SYMBOL_REF)
253.5245 ++    return;
253.5246 ++
253.5247 ++  flags = SYMBOL_REF_FLAGS (symbol);
253.5248 ++    
253.5249 ++  /* We don't want weak variables to be addressed with gp in case they end up with
253.5250 ++     value 0 which is not within 2^15 of $gp */
253.5251 ++  if (DECL_P (decl) && DECL_WEAK (decl))
253.5252 ++    flags |= SYMBOL_FLAG_WEAK_DECL;
253.5253 ++
253.5254 ++  SYMBOL_REF_FLAGS (symbol) = flags;
253.5255 ++}
253.5256 ++
253.5257 ++
253.5258 ++static unsigned int
253.5259 ++nios2_section_type_flags (tree decl, const char *name, int reloc)
253.5260 ++{
253.5261 ++  unsigned int flags;
253.5262 ++
253.5263 ++  flags = default_section_type_flags (decl, name, reloc);
253.5264 ++
253.5265 ++  /* ??? these string names need moving into an array in some header file */
253.5266 ++  if (strcmp (name, ".sbss") == 0
253.5267 ++      || strncmp (name, ".sbss.", 6) == 0
253.5268 ++      || strcmp (name, ".sdata") == 0
253.5269 ++      || strncmp (name, ".sdata.", 7) == 0)
253.5270 ++    flags |= SECTION_SMALL;
253.5271 ++
253.5272 ++  return flags;
253.5273 ++}
253.5274 ++
253.5275 ++
253.5276 ++
253.5277 ++
253.5278 ++/*****************************************
253.5279 ++ * Defining the Output Assembler Language
253.5280 ++ *****************************************/
253.5281 ++
253.5282 ++/* -------------- *
253.5283 ++ * Output of Data
253.5284 ++ * -------------- */
253.5285 ++
253.5286 ++
253.5287 ++/* -------------------------------- *
253.5288 ++ * Output of Assembler Instructions
253.5289 ++ * -------------------------------- */
253.5290 ++
253.5291 ++
253.5292 ++/* print the operand OP to file stream
253.5293 ++   FILE modified by LETTER. LETTER
253.5294 ++   can be one of:
253.5295 ++     i: print "i" if OP is an immediate, except 0
253.5296 ++     o: print "io" if OP is volatile
253.5297 ++
253.5298 ++     z: for const0_rtx print $0 instead of 0
253.5299 ++     H: for %hiadj
253.5300 ++     L: for %lo
253.5301 ++     U: for upper half of 32 bit value
253.5302 ++ */
253.5303 ++
253.5304 ++void
253.5305 ++nios2_print_operand (FILE *file, rtx op, int letter)
253.5306 ++{
253.5307 ++
253.5308 ++  switch (letter)
253.5309 ++    {
253.5310 ++    case 'i':
253.5311 ++      if (CONSTANT_P (op) && (op != const0_rtx))
253.5312 ++	fprintf (file, "i");
253.5313 ++      return;
253.5314 ++
253.5315 ++    case 'o':
253.5316 ++      if (GET_CODE (op) == MEM
253.5317 ++          && ((MEM_VOLATILE_P (op) && !TARGET_CACHE_VOLATILE)
253.5318 ++              || TARGET_BYPASS_CACHE))
253.5319 ++	fprintf (file, "io");
253.5320 ++      return;
253.5321 ++
253.5322 ++    default:
253.5323 ++      break;
253.5324 ++    }
253.5325 ++
253.5326 ++  if (comparison_operator (op, VOIDmode))
253.5327 ++    {
253.5328 ++      if (letter == 0)
253.5329 ++	{
253.5330 ++	  fprintf (file, "%s", GET_RTX_NAME (GET_CODE (op)));
253.5331 ++	  return;
253.5332 ++	}
253.5333 ++    }
253.5334 ++
253.5335 ++
253.5336 ++  switch (GET_CODE (op))
253.5337 ++    {
253.5338 ++    case REG:
253.5339 ++      if (letter == 0 || letter == 'z')
253.5340 ++	{
253.5341 ++	  fprintf (file, "%s", reg_names[REGNO (op)]);
253.5342 ++	  return;
253.5343 ++	}
253.5344 ++
253.5345 ++    case CONST_INT:
253.5346 ++      if (INTVAL (op) == 0 && letter == 'z')
253.5347 ++	{
253.5348 ++	  fprintf (file, "zero");
253.5349 ++	  return;
253.5350 ++	}
253.5351 ++      else if (letter == 'U')
253.5352 ++	{
253.5353 ++	  HOST_WIDE_INT val = INTVAL (op);
253.5354 ++	  rtx new_op;
253.5355 ++	  val = (val / 65536) & 0xFFFF;
253.5356 ++	  new_op = GEN_INT (val);
253.5357 ++	  output_addr_const (file, new_op);
253.5358 ++	  return;
253.5359 ++	}
253.5360 ++
253.5361 ++      /* else, fall through */
253.5362 ++    case CONST:
253.5363 ++    case LABEL_REF:
253.5364 ++    case SYMBOL_REF:
253.5365 ++    case CONST_DOUBLE:
253.5366 ++      if (letter == 0 || letter == 'z')
253.5367 ++	{
253.5368 ++	  output_addr_const (file, op);
253.5369 ++	  return;
253.5370 ++	}
253.5371 ++      else if (letter == 'H')
253.5372 ++	{
253.5373 ++	  fprintf (file, "%%hiadj(");
253.5374 ++	  output_addr_const (file, op);
253.5375 ++	  fprintf (file, ")");
253.5376 ++	  return;
253.5377 ++	}
253.5378 ++      else if (letter == 'L')
253.5379 ++	{
253.5380 ++	  fprintf (file, "%%lo(");
253.5381 ++	  output_addr_const (file, op);
253.5382 ++	  fprintf (file, ")");
253.5383 ++	  return;
253.5384 ++	}
253.5385 ++
253.5386 ++
253.5387 ++    case SUBREG:
253.5388 ++    case MEM:
253.5389 ++      if (letter == 0)
253.5390 ++	{
253.5391 ++	  output_address (op);
253.5392 ++	  return;
253.5393 ++	}
253.5394 ++
253.5395 ++    case CODE_LABEL:
253.5396 ++      if (letter == 0)
253.5397 ++	{
253.5398 ++	  output_addr_const (file, op);
253.5399 ++	  return;
253.5400 ++	}
253.5401 ++
253.5402 ++    default:
253.5403 ++      break;
253.5404 ++    }
253.5405 ++
253.5406 ++  fprintf (stderr, "Missing way to print (%c) ", letter);
253.5407 ++  debug_rtx (op);
253.5408 ++  abort ();
253.5409 ++}
253.5410 ++
253.5411 ++static int gprel_constant (rtx);
253.5412 ++
253.5413 ++static int
253.5414 ++gprel_constant (rtx op)
253.5415 ++{
253.5416 ++  if (GET_CODE (op) == SYMBOL_REF
253.5417 ++      && SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (op))
253.5418 ++    {
253.5419 ++      return 1;
253.5420 ++    }
253.5421 ++  else if (GET_CODE (op) == CONST
253.5422 ++           && GET_CODE (XEXP (op, 0)) == PLUS)
253.5423 ++    {
253.5424 ++      return gprel_constant (XEXP (XEXP (op, 0), 0));
253.5425 ++    }
253.5426 ++  else
253.5427 ++    {
253.5428 ++      return 0;
253.5429 ++    }
253.5430 ++}
253.5431 ++
253.5432 ++void
253.5433 ++nios2_print_operand_address (FILE *file, rtx op)
253.5434 ++{
253.5435 ++  switch (GET_CODE (op))
253.5436 ++    {
253.5437 ++    case CONST:
253.5438 ++    case CONST_INT:
253.5439 ++    case LABEL_REF:
253.5440 ++    case CONST_DOUBLE:
253.5441 ++    case SYMBOL_REF:
253.5442 ++      if (gprel_constant (op))
253.5443 ++        {
253.5444 ++          fprintf (file, "%%gprel(");
253.5445 ++          output_addr_const (file, op);
253.5446 ++          fprintf (file, ")(%s)", reg_names[GP_REGNO]);
253.5447 ++          return;
253.5448 ++        }
253.5449 ++
253.5450 ++      break;
253.5451 ++
253.5452 ++    case PLUS:
253.5453 ++      {
253.5454 ++	rtx op0 = XEXP (op, 0);
253.5455 ++	rtx op1 = XEXP (op, 1);
253.5456 ++
253.5457 ++	if (REG_P (op0) && CONSTANT_P (op1))
253.5458 ++	  {
253.5459 ++	    output_addr_const (file, op1);
253.5460 ++	    fprintf (file, "(%s)", reg_names[REGNO (op0)]);
253.5461 ++	    return;
253.5462 ++	  }
253.5463 ++	else if (REG_P (op1) && CONSTANT_P (op0))
253.5464 ++	  {
253.5465 ++	    output_addr_const (file, op0);
253.5466 ++	    fprintf (file, "(%s)", reg_names[REGNO (op1)]);
253.5467 ++	    return;
253.5468 ++	  }
253.5469 ++      }
253.5470 ++      break;
253.5471 ++
253.5472 ++    case REG:
253.5473 ++      fprintf (file, "0(%s)", reg_names[REGNO (op)]);
253.5474 ++      return;
253.5475 ++
253.5476 ++    case MEM:
253.5477 ++      {
253.5478 ++	rtx base = XEXP (op, 0);
253.5479 ++	PRINT_OPERAND_ADDRESS (file, base);
253.5480 ++	return;
253.5481 ++      }
253.5482 ++    default:
253.5483 ++      break;
253.5484 ++    }
253.5485 ++
253.5486 ++  fprintf (stderr, "Missing way to print address\n");
253.5487 ++  debug_rtx (op);
253.5488 ++  abort ();
253.5489 ++}
253.5490 ++
253.5491 ++
253.5492 ++
253.5493 ++
253.5494 ++
253.5495 ++/****************************
253.5496 ++ * Predicates
253.5497 ++ ****************************/
253.5498 ++
253.5499 ++int
253.5500 ++arith_operand (rtx op, enum machine_mode mode)
253.5501 ++{
253.5502 ++  if (GET_CODE (op) == CONST_INT && SMALL_INT (INTVAL (op)))
253.5503 ++    return 1;
253.5504 ++
253.5505 ++  return register_operand (op, mode);
253.5506 ++}
253.5507 ++
253.5508 ++int
253.5509 ++uns_arith_operand (rtx op, enum machine_mode mode)
253.5510 ++{
253.5511 ++  if (GET_CODE (op) == CONST_INT && SMALL_INT_UNSIGNED (INTVAL (op)))
253.5512 ++    return 1;
253.5513 ++
253.5514 ++  return register_operand (op, mode);
253.5515 ++}
253.5516 ++
253.5517 ++int
253.5518 ++logical_operand (rtx op, enum machine_mode mode)
253.5519 ++{
253.5520 ++  if (GET_CODE (op) == CONST_INT
253.5521 ++      && (SMALL_INT_UNSIGNED (INTVAL (op)) || UPPER16_INT (INTVAL (op))))
253.5522 ++    return 1;
253.5523 ++
253.5524 ++  return register_operand (op, mode);
253.5525 ++}
253.5526 ++
253.5527 ++int
253.5528 ++shift_operand (rtx op, enum machine_mode mode)
253.5529 ++{
253.5530 ++  if (GET_CODE (op) == CONST_INT && SHIFT_INT (INTVAL (op)))
253.5531 ++    return 1;
253.5532 ++
253.5533 ++  return register_operand (op, mode);
253.5534 ++}
253.5535 ++
253.5536 ++int
253.5537 ++rdwrctl_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
253.5538 ++{
253.5539 ++  return GET_CODE (op) == CONST_INT && RDWRCTL_INT (INTVAL (op));
253.5540 ++}
253.5541 ++
253.5542 ++/* Return truth value of whether OP is a register or the constant 0. */
253.5543 ++
253.5544 ++int
253.5545 ++reg_or_0_operand (rtx op, enum machine_mode mode)
253.5546 ++{
253.5547 ++  switch (GET_CODE (op))
253.5548 ++    {
253.5549 ++    case CONST_INT:
253.5550 ++      return INTVAL (op) == 0;
253.5551 ++
253.5552 ++    case CONST_DOUBLE:
253.5553 ++      return op == CONST0_RTX (mode);
253.5554 ++
253.5555 ++    default:
253.5556 ++      break;
253.5557 ++    }
253.5558 ++
253.5559 ++  return register_operand (op, mode);
253.5560 ++}
253.5561 ++
253.5562 ++
253.5563 ++int
253.5564 ++equality_op (rtx op, enum machine_mode mode)
253.5565 ++{
253.5566 ++  if (mode != GET_MODE (op))
253.5567 ++    return 0;
253.5568 ++
253.5569 ++  return GET_CODE (op) == EQ || GET_CODE (op) == NE;
253.5570 ++}
253.5571 ++
253.5572 ++int
253.5573 ++custom_insn_opcode (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
253.5574 ++{
253.5575 ++  return GET_CODE (op) == CONST_INT && CUSTOM_INSN_OPCODE (INTVAL (op));
253.5576 ++}
253.5577 ++
253.5578 ++
253.5579 ++
253.5580 ++
253.5581 ++
253.5582 ++
253.5583 ++
253.5584 ++/*****************************************************************************
253.5585 ++**
253.5586 ++** instruction scheduler
253.5587 ++**
253.5588 ++*****************************************************************************/
253.5589 ++static int
253.5590 ++nios2_use_dfa_pipeline_interface ()
253.5591 ++{
253.5592 ++  return 1;
253.5593 ++}
253.5594 ++
253.5595 ++
253.5596 ++static int
253.5597 ++nios2_issue_rate ()
253.5598 ++{
253.5599 ++#ifdef MAX_DFA_ISSUE_RATE
253.5600 ++  return MAX_DFA_ISSUE_RATE;
253.5601 ++#else
253.5602 ++  return 1;
253.5603 ++#endif
253.5604 ++}
253.5605 ++
253.5606 ++
253.5607 ++const char *
253.5608 ++asm_output_opcode (FILE *file ATTRIBUTE_UNUSED, 
253.5609 ++                   const char *ptr ATTRIBUTE_UNUSED)
253.5610 ++{
253.5611 ++  const char *p;
253.5612 ++
253.5613 ++  p = ptr;
253.5614 ++  return ptr;
253.5615 ++}
253.5616 ++
253.5617 ++
253.5618 ++
253.5619 ++/*****************************************************************************
253.5620 ++**
253.5621 ++** function arguments
253.5622 ++**
253.5623 ++*****************************************************************************/
253.5624 ++
253.5625 ++void
253.5626 ++init_cumulative_args (CUMULATIVE_ARGS *cum, 
253.5627 ++                      tree fntype ATTRIBUTE_UNUSED, 
253.5628 ++                      rtx libname ATTRIBUTE_UNUSED, 
253.5629 ++                      tree fndecl ATTRIBUTE_UNUSED, 
253.5630 ++                      int n_named_args ATTRIBUTE_UNUSED)
253.5631 ++{
253.5632 ++  cum->regs_used = 0;
253.5633 ++}
253.5634 ++
253.5635 ++
253.5636 ++/* Update the data in CUM to advance over an argument
253.5637 ++   of mode MODE and data type TYPE.
253.5638 ++   (TYPE is null for libcalls where that information may not be available.)  */
253.5639 ++
253.5640 ++void
253.5641 ++function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, 
253.5642 ++                      tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
253.5643 ++{
253.5644 ++  HOST_WIDE_INT param_size;
253.5645 ++
253.5646 ++  if (mode == BLKmode)
253.5647 ++    {
253.5648 ++      param_size = int_size_in_bytes (type);
253.5649 ++      if (param_size < 0)
253.5650 ++	internal_error
253.5651 ++	  ("Do not know how to handle large structs or variable length types");
253.5652 ++    }
253.5653 ++  else
253.5654 ++    {
253.5655 ++      param_size = GET_MODE_SIZE (mode);
253.5656 ++    }
253.5657 ++
253.5658 ++  /* convert to words (round up) */
253.5659 ++  param_size = (3 + param_size) / 4;
253.5660 ++
253.5661 ++  if (cum->regs_used + param_size > NUM_ARG_REGS)
253.5662 ++    {
253.5663 ++      cum->regs_used = NUM_ARG_REGS;
253.5664 ++    }
253.5665 ++  else
253.5666 ++    {
253.5667 ++      cum->regs_used += param_size;
253.5668 ++    }
253.5669 ++
253.5670 ++  return;
253.5671 ++}
253.5672 ++
253.5673 ++/* Define where to put the arguments to a function.  Value is zero to
253.5674 ++   push the argument on the stack, or a hard register in which to
253.5675 ++   store the argument.
253.5676 ++
253.5677 ++   MODE is the argument's machine mode.
253.5678 ++   TYPE is the data type of the argument (as a tree).
253.5679 ++   This is null for libcalls where that information may
253.5680 ++   not be available.
253.5681 ++   CUM is a variable of type CUMULATIVE_ARGS which gives info about
253.5682 ++   the preceding args and about the function being called.
253.5683 ++   NAMED is nonzero if this argument is a named parameter
253.5684 ++   (otherwise it is an extra parameter matching an ellipsis).  */
253.5685 ++rtx
253.5686 ++function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode mode, 
253.5687 ++              tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
253.5688 ++{
253.5689 ++  rtx return_rtx = NULL_RTX;
253.5690 ++
253.5691 ++  if (cum->regs_used < NUM_ARG_REGS)
253.5692 ++    {
253.5693 ++      return_rtx = gen_rtx_REG (mode, FIRST_ARG_REGNO + cum->regs_used);
253.5694 ++    }
253.5695 ++
253.5696 ++  return return_rtx;
253.5697 ++}
253.5698 ++
253.5699 ++int
253.5700 ++function_arg_partial_nregs (const CUMULATIVE_ARGS *cum,
253.5701 ++                            enum machine_mode mode, tree type, 
253.5702 ++                            int named ATTRIBUTE_UNUSED)
253.5703 ++{
253.5704 ++  HOST_WIDE_INT param_size;
253.5705 ++
253.5706 ++  if (mode == BLKmode)
253.5707 ++    {
253.5708 ++      param_size = int_size_in_bytes (type);
253.5709 ++      if (param_size < 0)
253.5710 ++	internal_error
253.5711 ++	  ("Do not know how to handle large structs or variable length types");
253.5712 ++    }
253.5713 ++  else
253.5714 ++    {
253.5715 ++      param_size = GET_MODE_SIZE (mode);
253.5716 ++    }
253.5717 ++
253.5718 ++  /* convert to words (round up) */
253.5719 ++  param_size = (3 + param_size) / 4;
253.5720 ++
253.5721 ++  if (cum->regs_used < NUM_ARG_REGS
253.5722 ++      && cum->regs_used + param_size > NUM_ARG_REGS)
253.5723 ++    {
253.5724 ++      return NUM_ARG_REGS - cum->regs_used;
253.5725 ++    }
253.5726 ++  else
253.5727 ++    {
253.5728 ++      return 0;
253.5729 ++    }
253.5730 ++}
253.5731 ++
253.5732 ++
253.5733 ++int
253.5734 ++nios2_return_in_memory (tree type)
253.5735 ++{
253.5736 ++  int res = ((int_size_in_bytes (type) > (2 * UNITS_PER_WORD))
253.5737 ++  	     || (int_size_in_bytes (type) == -1));
253.5738 ++
253.5739 ++  return res;
253.5740 ++}
253.5741 ++
253.5742 ++/* ??? It may be possible to eliminate the copyback and implement
253.5743 ++       my own va_arg type, but that is more work for now. */
253.5744 ++int
253.5745 ++nios2_setup_incoming_varargs (const CUMULATIVE_ARGS *cum, 
253.5746 ++                              enum machine_mode mode, tree type, 
253.5747 ++                              int no_rtl)
253.5748 ++{
253.5749 ++  CUMULATIVE_ARGS local_cum;
253.5750 ++  int regs_to_push;
253.5751 ++
253.5752 ++  local_cum = *cum;
253.5753 ++  FUNCTION_ARG_ADVANCE (local_cum, mode, type, 1);
253.5754 ++
253.5755 ++  regs_to_push = NUM_ARG_REGS - local_cum.regs_used;
253.5756 ++
253.5757 ++  if (!no_rtl)
253.5758 ++    {
253.5759 ++      if (regs_to_push > 0)
253.5760 ++	{
253.5761 ++	  rtx ptr, mem;
253.5762 ++
253.5763 ++	  ptr = virtual_incoming_args_rtx;
253.5764 ++	  mem = gen_rtx_MEM (BLKmode, ptr);
253.5765 ++
253.5766 ++	  /* va_arg is an array access in this case, which causes
253.5767 ++	     it to get MEM_IN_STRUCT_P set.  We must set it here
253.5768 ++	     so that the insn scheduler won't assume that these
253.5769 ++	     stores can't possibly overlap with the va_arg loads.  */
253.5770 ++	  MEM_SET_IN_STRUCT_P (mem, 1);
253.5771 ++
253.5772 ++	  emit_insn (gen_blockage ());
253.5773 ++	  move_block_from_reg (local_cum.regs_used + FIRST_ARG_REGNO, mem,
253.5774 ++			       regs_to_push);
253.5775 ++	  emit_insn (gen_blockage ());
253.5776 ++	}
253.5777 ++    }
253.5778 ++
253.5779 ++  return regs_to_push * UNITS_PER_WORD;
253.5780 ++
253.5781 ++}
253.5782 ++
253.5783 ++
253.5784 ++
253.5785 ++/*****************************************************************************
253.5786 ++**
253.5787 ++** builtins
253.5788 ++**
253.5789 ++** This method for handling builtins is from CSP where _many_ more types of
253.5790 ++** expanders have already been written. Check there first before writing
253.5791 ++** new ones.
253.5792 ++**
253.5793 ++*****************************************************************************/
253.5794 ++
253.5795 ++enum nios2_builtins
253.5796 ++{
253.5797 ++  NIOS2_BUILTIN_LDBIO,
253.5798 ++  NIOS2_BUILTIN_LDBUIO,
253.5799 ++  NIOS2_BUILTIN_LDHIO,
253.5800 ++  NIOS2_BUILTIN_LDHUIO,
253.5801 ++  NIOS2_BUILTIN_LDWIO,
253.5802 ++  NIOS2_BUILTIN_STBIO,
253.5803 ++  NIOS2_BUILTIN_STHIO,
253.5804 ++  NIOS2_BUILTIN_STWIO,
253.5805 ++  NIOS2_BUILTIN_SYNC,
253.5806 ++  NIOS2_BUILTIN_RDCTL,
253.5807 ++  NIOS2_BUILTIN_WRCTL,
253.5808 ++
253.5809 ++  NIOS2_BUILTIN_CUSTOM_N,
253.5810 ++  NIOS2_BUILTIN_CUSTOM_NI,
253.5811 ++  NIOS2_BUILTIN_CUSTOM_NF,
253.5812 ++  NIOS2_BUILTIN_CUSTOM_NP,
253.5813 ++  NIOS2_BUILTIN_CUSTOM_NII,
253.5814 ++  NIOS2_BUILTIN_CUSTOM_NIF,
253.5815 ++  NIOS2_BUILTIN_CUSTOM_NIP,
253.5816 ++  NIOS2_BUILTIN_CUSTOM_NFI,
253.5817 ++  NIOS2_BUILTIN_CUSTOM_NFF,
253.5818 ++  NIOS2_BUILTIN_CUSTOM_NFP,
253.5819 ++  NIOS2_BUILTIN_CUSTOM_NPI,
253.5820 ++  NIOS2_BUILTIN_CUSTOM_NPF,
253.5821 ++  NIOS2_BUILTIN_CUSTOM_NPP,
253.5822 ++  NIOS2_BUILTIN_CUSTOM_IN,
253.5823 ++  NIOS2_BUILTIN_CUSTOM_INI,
253.5824 ++  NIOS2_BUILTIN_CUSTOM_INF,
253.5825 ++  NIOS2_BUILTIN_CUSTOM_INP,
253.5826 ++  NIOS2_BUILTIN_CUSTOM_INII,
253.5827 ++  NIOS2_BUILTIN_CUSTOM_INIF,
253.5828 ++  NIOS2_BUILTIN_CUSTOM_INIP,
253.5829 ++  NIOS2_BUILTIN_CUSTOM_INFI,
253.5830 ++  NIOS2_BUILTIN_CUSTOM_INFF,
253.5831 ++  NIOS2_BUILTIN_CUSTOM_INFP,
253.5832 ++  NIOS2_BUILTIN_CUSTOM_INPI,
253.5833 ++  NIOS2_BUILTIN_CUSTOM_INPF,
253.5834 ++  NIOS2_BUILTIN_CUSTOM_INPP,
253.5835 ++  NIOS2_BUILTIN_CUSTOM_FN,
253.5836 ++  NIOS2_BUILTIN_CUSTOM_FNI,
253.5837 ++  NIOS2_BUILTIN_CUSTOM_FNF,
253.5838 ++  NIOS2_BUILTIN_CUSTOM_FNP,
253.5839 ++  NIOS2_BUILTIN_CUSTOM_FNII,
253.5840 ++  NIOS2_BUILTIN_CUSTOM_FNIF,
253.5841 ++  NIOS2_BUILTIN_CUSTOM_FNIP,
253.5842 ++  NIOS2_BUILTIN_CUSTOM_FNFI,
253.5843 ++  NIOS2_BUILTIN_CUSTOM_FNFF,
253.5844 ++  NIOS2_BUILTIN_CUSTOM_FNFP,
253.5845 ++  NIOS2_BUILTIN_CUSTOM_FNPI,
253.5846 ++  NIOS2_BUILTIN_CUSTOM_FNPF,
253.5847 ++  NIOS2_BUILTIN_CUSTOM_FNPP,
253.5848 ++  NIOS2_BUILTIN_CUSTOM_PN,
253.5849 ++  NIOS2_BUILTIN_CUSTOM_PNI,
253.5850 ++  NIOS2_BUILTIN_CUSTOM_PNF,
253.5851 ++  NIOS2_BUILTIN_CUSTOM_PNP,
253.5852 ++  NIOS2_BUILTIN_CUSTOM_PNII,
253.5853 ++  NIOS2_BUILTIN_CUSTOM_PNIF,
253.5854 ++  NIOS2_BUILTIN_CUSTOM_PNIP,
253.5855 ++  NIOS2_BUILTIN_CUSTOM_PNFI,
253.5856 ++  NIOS2_BUILTIN_CUSTOM_PNFF,
253.5857 ++  NIOS2_BUILTIN_CUSTOM_PNFP,
253.5858 ++  NIOS2_BUILTIN_CUSTOM_PNPI,
253.5859 ++  NIOS2_BUILTIN_CUSTOM_PNPF,
253.5860 ++  NIOS2_BUILTIN_CUSTOM_PNPP,
253.5861 ++
253.5862 ++
253.5863 ++  LIM_NIOS2_BUILTINS
253.5864 ++};
253.5865 ++
253.5866 ++struct builtin_description
253.5867 ++{
253.5868 ++    const enum insn_code icode;
253.5869 ++    const char *const name;
253.5870 ++    const enum nios2_builtins code;
253.5871 ++    const tree *type;
253.5872 ++    rtx (* expander) PARAMS ((const struct builtin_description *,
253.5873 ++                              tree, rtx, rtx, enum machine_mode, int));
253.5874 ++};
253.5875 ++
253.5876 ++static rtx nios2_expand_STXIO (const struct builtin_description *, 
253.5877 ++                               tree, rtx, rtx, enum machine_mode, int);
253.5878 ++static rtx nios2_expand_LDXIO (const struct builtin_description *, 
253.5879 ++                               tree, rtx, rtx, enum machine_mode, int);
253.5880 ++static rtx nios2_expand_sync (const struct builtin_description *, 
253.5881 ++                              tree, rtx, rtx, enum machine_mode, int);
253.5882 ++static rtx nios2_expand_rdctl (const struct builtin_description *, 
253.5883 ++                               tree, rtx, rtx, enum machine_mode, int);
253.5884 ++static rtx nios2_expand_wrctl (const struct builtin_description *, 
253.5885 ++                               tree, rtx, rtx, enum machine_mode, int);
253.5886 ++
253.5887 ++static rtx nios2_expand_custom_n (const struct builtin_description *, 
253.5888 ++                                  tree, rtx, rtx, enum machine_mode, int);
253.5889 ++static rtx nios2_expand_custom_Xn (const struct builtin_description *, 
253.5890 ++                                   tree, rtx, rtx, enum machine_mode, int);
253.5891 ++static rtx nios2_expand_custom_nX (const struct builtin_description *, 
253.5892 ++                                   tree, rtx, rtx, enum machine_mode, int);
253.5893 ++static rtx nios2_expand_custom_XnX (const struct builtin_description *, 
253.5894 ++                                    tree, rtx, rtx, enum machine_mode, int);
253.5895 ++static rtx nios2_expand_custom_nXX (const struct builtin_description *, 
253.5896 ++                                    tree, rtx, rtx, enum machine_mode, int);
253.5897 ++static rtx nios2_expand_custom_XnXX (const struct builtin_description *, 
253.5898 ++                                     tree, rtx, rtx, enum machine_mode, int);
253.5899 ++
253.5900 ++static tree endlink;
253.5901 ++
253.5902 ++/* int fn (volatile const void *)
253.5903 ++ */
253.5904 ++static tree int_ftype_volatile_const_void_p;
253.5905 ++
253.5906 ++/* int fn (int)
253.5907 ++ */
253.5908 ++static tree int_ftype_int;
253.5909 ++
253.5910 ++/* void fn (int, int)
253.5911 ++ */
253.5912 ++static tree void_ftype_int_int;
253.5913 ++
253.5914 ++/* void fn (volatile void *, int)
253.5915 ++ */
253.5916 ++static tree void_ftype_volatile_void_p_int;
253.5917 ++
253.5918 ++/* void fn (void)
253.5919 ++ */
253.5920 ++static tree void_ftype_void;
253.5921 ++
253.5922 ++static tree custom_n;
253.5923 ++static tree custom_ni;
253.5924 ++static tree custom_nf;
253.5925 ++static tree custom_np;
253.5926 ++static tree custom_nii;
253.5927 ++static tree custom_nif;
253.5928 ++static tree custom_nip;
253.5929 ++static tree custom_nfi;
253.5930 ++static tree custom_nff;
253.5931 ++static tree custom_nfp;
253.5932 ++static tree custom_npi;
253.5933 ++static tree custom_npf;
253.5934 ++static tree custom_npp;
253.5935 ++static tree custom_in;
253.5936 ++static tree custom_ini;
253.5937 ++static tree custom_inf;
253.5938 ++static tree custom_inp;
253.5939 ++static tree custom_inii;
253.5940 ++static tree custom_inif;
253.5941 ++static tree custom_inip;
253.5942 ++static tree custom_infi;
253.5943 ++static tree custom_inff;
253.5944 ++static tree custom_infp;
253.5945 ++static tree custom_inpi;
253.5946 ++static tree custom_inpf;
253.5947 ++static tree custom_inpp;
253.5948 ++static tree custom_fn;
253.5949 ++static tree custom_fni;
253.5950 ++static tree custom_fnf;
253.5951 ++static tree custom_fnp;
253.5952 ++static tree custom_fnii;
253.5953 ++static tree custom_fnif;
253.5954 ++static tree custom_fnip;
253.5955 ++static tree custom_fnfi;
253.5956 ++static tree custom_fnff;
253.5957 ++static tree custom_fnfp;
253.5958 ++static tree custom_fnpi;
253.5959 ++static tree custom_fnpf;
253.5960 ++static tree custom_fnpp;
253.5961 ++static tree custom_pn;
253.5962 ++static tree custom_pni;
253.5963 ++static tree custom_pnf;
253.5964 ++static tree custom_pnp;
253.5965 ++static tree custom_pnii;
253.5966 ++static tree custom_pnif;
253.5967 ++static tree custom_pnip;
253.5968 ++static tree custom_pnfi;
253.5969 ++static tree custom_pnff;
253.5970 ++static tree custom_pnfp;
253.5971 ++static tree custom_pnpi;
253.5972 ++static tree custom_pnpf;
253.5973 ++static tree custom_pnpp;
253.5974 ++
253.5975 ++
253.5976 ++static const struct builtin_description bdesc[] = {
253.5977 ++    {CODE_FOR_ldbio, "__builtin_ldbio", NIOS2_BUILTIN_LDBIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
253.5978 ++    {CODE_FOR_ldbuio, "__builtin_ldbuio", NIOS2_BUILTIN_LDBUIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
253.5979 ++    {CODE_FOR_ldhio, "__builtin_ldhio", NIOS2_BUILTIN_LDHIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
253.5980 ++    {CODE_FOR_ldhuio, "__builtin_ldhuio", NIOS2_BUILTIN_LDHUIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
253.5981 ++    {CODE_FOR_ldwio, "__builtin_ldwio", NIOS2_BUILTIN_LDWIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
253.5982 ++
253.5983 ++    {CODE_FOR_stbio, "__builtin_stbio", NIOS2_BUILTIN_STBIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
253.5984 ++    {CODE_FOR_sthio, "__builtin_sthio", NIOS2_BUILTIN_STHIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
253.5985 ++    {CODE_FOR_stwio, "__builtin_stwio", NIOS2_BUILTIN_STWIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
253.5986 ++
253.5987 ++    {CODE_FOR_sync, "__builtin_sync", NIOS2_BUILTIN_SYNC, &void_ftype_void, nios2_expand_sync},
253.5988 ++    {CODE_FOR_rdctl, "__builtin_rdctl", NIOS2_BUILTIN_RDCTL, &int_ftype_int, nios2_expand_rdctl},
253.5989 ++    {CODE_FOR_wrctl, "__builtin_wrctl", NIOS2_BUILTIN_WRCTL, &void_ftype_int_int, nios2_expand_wrctl},
253.5990 ++
253.5991 ++    {CODE_FOR_custom_n, "__builtin_custom_n", NIOS2_BUILTIN_CUSTOM_N, &custom_n, nios2_expand_custom_n},
253.5992 ++    {CODE_FOR_custom_ni, "__builtin_custom_ni", NIOS2_BUILTIN_CUSTOM_NI, &custom_ni, nios2_expand_custom_nX},
253.5993 ++    {CODE_FOR_custom_nf, "__builtin_custom_nf", NIOS2_BUILTIN_CUSTOM_NF, &custom_nf, nios2_expand_custom_nX},
253.5994 ++    {CODE_FOR_custom_np, "__builtin_custom_np", NIOS2_BUILTIN_CUSTOM_NP, &custom_np, nios2_expand_custom_nX},
253.5995 ++    {CODE_FOR_custom_nii, "__builtin_custom_nii", NIOS2_BUILTIN_CUSTOM_NII, &custom_nii, nios2_expand_custom_nXX},
253.5996 ++    {CODE_FOR_custom_nif, "__builtin_custom_nif", NIOS2_BUILTIN_CUSTOM_NIF, &custom_nif, nios2_expand_custom_nXX},
253.5997 ++    {CODE_FOR_custom_nip, "__builtin_custom_nip", NIOS2_BUILTIN_CUSTOM_NIP, &custom_nip, nios2_expand_custom_nXX},
253.5998 ++    {CODE_FOR_custom_nfi, "__builtin_custom_nfi", NIOS2_BUILTIN_CUSTOM_NFI, &custom_nfi, nios2_expand_custom_nXX},
253.5999 ++    {CODE_FOR_custom_nff, "__builtin_custom_nff", NIOS2_BUILTIN_CUSTOM_NFF, &custom_nff, nios2_expand_custom_nXX},
253.6000 ++    {CODE_FOR_custom_nfp, "__builtin_custom_nfp", NIOS2_BUILTIN_CUSTOM_NFP, &custom_nfp, nios2_expand_custom_nXX},
253.6001 ++    {CODE_FOR_custom_npi, "__builtin_custom_npi", NIOS2_BUILTIN_CUSTOM_NPI, &custom_npi, nios2_expand_custom_nXX},
253.6002 ++    {CODE_FOR_custom_npf, "__builtin_custom_npf", NIOS2_BUILTIN_CUSTOM_NPF, &custom_npf, nios2_expand_custom_nXX},
253.6003 ++    {CODE_FOR_custom_npp, "__builtin_custom_npp", NIOS2_BUILTIN_CUSTOM_NPP, &custom_npp, nios2_expand_custom_nXX},
253.6004 ++    {CODE_FOR_custom_in, "__builtin_custom_in", NIOS2_BUILTIN_CUSTOM_IN, &custom_in, nios2_expand_custom_Xn},
253.6005 ++    {CODE_FOR_custom_ini, "__builtin_custom_ini", NIOS2_BUILTIN_CUSTOM_INI, &custom_ini, nios2_expand_custom_XnX},
253.6006 ++    {CODE_FOR_custom_inf, "__builtin_custom_inf", NIOS2_BUILTIN_CUSTOM_INF, &custom_inf, nios2_expand_custom_XnX},
253.6007 ++    {CODE_FOR_custom_inp, "__builtin_custom_inp", NIOS2_BUILTIN_CUSTOM_INP, &custom_inp, nios2_expand_custom_XnX},
253.6008 ++    {CODE_FOR_custom_inii, "__builtin_custom_inii", NIOS2_BUILTIN_CUSTOM_INII, &custom_inii, nios2_expand_custom_XnXX},
253.6009 ++    {CODE_FOR_custom_inif, "__builtin_custom_inif", NIOS2_BUILTIN_CUSTOM_INIF, &custom_inif, nios2_expand_custom_XnXX},
253.6010 ++    {CODE_FOR_custom_inip, "__builtin_custom_inip", NIOS2_BUILTIN_CUSTOM_INIP, &custom_inip, nios2_expand_custom_XnXX},
253.6011 ++    {CODE_FOR_custom_infi, "__builtin_custom_infi", NIOS2_BUILTIN_CUSTOM_INFI, &custom_infi, nios2_expand_custom_XnXX},
253.6012 ++    {CODE_FOR_custom_inff, "__builtin_custom_inff", NIOS2_BUILTIN_CUSTOM_INFF, &custom_inff, nios2_expand_custom_XnXX},
253.6013 ++    {CODE_FOR_custom_infp, "__builtin_custom_infp", NIOS2_BUILTIN_CUSTOM_INFP, &custom_infp, nios2_expand_custom_XnXX},
253.6014 ++    {CODE_FOR_custom_inpi, "__builtin_custom_inpi", NIOS2_BUILTIN_CUSTOM_INPI, &custom_inpi, nios2_expand_custom_XnXX},
253.6015 ++    {CODE_FOR_custom_inpf, "__builtin_custom_inpf", NIOS2_BUILTIN_CUSTOM_INPF, &custom_inpf, nios2_expand_custom_XnXX},
253.6016 ++    {CODE_FOR_custom_inpp, "__builtin_custom_inpp", NIOS2_BUILTIN_CUSTOM_INPP, &custom_inpp, nios2_expand_custom_XnXX},
253.6017 ++    {CODE_FOR_custom_fn, "__builtin_custom_fn", NIOS2_BUILTIN_CUSTOM_FN, &custom_fn, nios2_expand_custom_Xn},
253.6018 ++    {CODE_FOR_custom_fni, "__builtin_custom_fni", NIOS2_BUILTIN_CUSTOM_FNI, &custom_fni, nios2_expand_custom_XnX},
253.6019 ++    {CODE_FOR_custom_fnf, "__builtin_custom_fnf", NIOS2_BUILTIN_CUSTOM_FNF, &custom_fnf, nios2_expand_custom_XnX},
253.6020 ++    {CODE_FOR_custom_fnp, "__builtin_custom_fnp", NIOS2_BUILTIN_CUSTOM_FNP, &custom_fnp, nios2_expand_custom_XnX},
253.6021 ++    {CODE_FOR_custom_fnii, "__builtin_custom_fnii", NIOS2_BUILTIN_CUSTOM_FNII, &custom_fnii, nios2_expand_custom_XnXX},
253.6022 ++    {CODE_FOR_custom_fnif, "__builtin_custom_fnif", NIOS2_BUILTIN_CUSTOM_FNIF, &custom_fnif, nios2_expand_custom_XnXX},
253.6023 ++    {CODE_FOR_custom_fnip, "__builtin_custom_fnip", NIOS2_BUILTIN_CUSTOM_FNIP, &custom_fnip, nios2_expand_custom_XnXX},
253.6024 ++    {CODE_FOR_custom_fnfi, "__builtin_custom_fnfi", NIOS2_BUILTIN_CUSTOM_FNFI, &custom_fnfi, nios2_expand_custom_XnXX},
253.6025 ++    {CODE_FOR_custom_fnff, "__builtin_custom_fnff", NIOS2_BUILTIN_CUSTOM_FNFF, &custom_fnff, nios2_expand_custom_XnXX},
253.6026 ++    {CODE_FOR_custom_fnfp, "__builtin_custom_fnfp", NIOS2_BUILTIN_CUSTOM_FNFP, &custom_fnfp, nios2_expand_custom_XnXX},
253.6027 ++    {CODE_FOR_custom_fnpi, "__builtin_custom_fnpi", NIOS2_BUILTIN_CUSTOM_FNPI, &custom_fnpi, nios2_expand_custom_XnXX},
253.6028 ++    {CODE_FOR_custom_fnpf, "__builtin_custom_fnpf", NIOS2_BUILTIN_CUSTOM_FNPF, &custom_fnpf, nios2_expand_custom_XnXX},
253.6029 ++    {CODE_FOR_custom_fnpp, "__builtin_custom_fnpp", NIOS2_BUILTIN_CUSTOM_FNPP, &custom_fnpp, nios2_expand_custom_XnXX},
253.6030 ++    {CODE_FOR_custom_pn, "__builtin_custom_pn", NIOS2_BUILTIN_CUSTOM_PN, &custom_pn, nios2_expand_custom_Xn},
253.6031 ++    {CODE_FOR_custom_pni, "__builtin_custom_pni", NIOS2_BUILTIN_CUSTOM_PNI, &custom_pni, nios2_expand_custom_XnX},
253.6032 ++    {CODE_FOR_custom_pnf, "__builtin_custom_pnf", NIOS2_BUILTIN_CUSTOM_PNF, &custom_pnf, nios2_expand_custom_XnX},
253.6033 ++    {CODE_FOR_custom_pnp, "__builtin_custom_pnp", NIOS2_BUILTIN_CUSTOM_PNP, &custom_pnp, nios2_expand_custom_XnX},
253.6034 ++    {CODE_FOR_custom_pnii, "__builtin_custom_pnii", NIOS2_BUILTIN_CUSTOM_PNII, &custom_pnii, nios2_expand_custom_XnXX},
253.6035 ++    {CODE_FOR_custom_pnif, "__builtin_custom_pnif", NIOS2_BUILTIN_CUSTOM_PNIF, &custom_pnif, nios2_expand_custom_XnXX},
253.6036 ++    {CODE_FOR_custom_pnip, "__builtin_custom_pnip", NIOS2_BUILTIN_CUSTOM_PNIP, &custom_pnip, nios2_expand_custom_XnXX},
253.6037 ++    {CODE_FOR_custom_pnfi, "__builtin_custom_pnfi", NIOS2_BUILTIN_CUSTOM_PNFI, &custom_pnfi, nios2_expand_custom_XnXX},
253.6038 ++    {CODE_FOR_custom_pnff, "__builtin_custom_pnff", NIOS2_BUILTIN_CUSTOM_PNFF, &custom_pnff, nios2_expand_custom_XnXX},
253.6039 ++    {CODE_FOR_custom_pnfp, "__builtin_custom_pnfp", NIOS2_BUILTIN_CUSTOM_PNFP, &custom_pnfp, nios2_expand_custom_XnXX},
253.6040 ++    {CODE_FOR_custom_pnpi, "__builtin_custom_pnpi", NIOS2_BUILTIN_CUSTOM_PNPI, &custom_pnpi, nios2_expand_custom_XnXX},
253.6041 ++    {CODE_FOR_custom_pnpf, "__builtin_custom_pnpf", NIOS2_BUILTIN_CUSTOM_PNPF, &custom_pnpf, nios2_expand_custom_XnXX},
253.6042 ++    {CODE_FOR_custom_pnpp, "__builtin_custom_pnpp", NIOS2_BUILTIN_CUSTOM_PNPP, &custom_pnpp, nios2_expand_custom_XnXX},
253.6043 ++
253.6044 ++
253.6045 ++    {0, 0, 0, 0, 0},
253.6046 ++};
253.6047 ++
253.6048 ++/* This does not have a closing bracket on purpose (see use) */
253.6049 ++#define def_param(TYPE) \
253.6050 ++  tree_cons (NULL_TREE, TYPE,
253.6051 ++
253.6052 ++static void
253.6053 ++nios2_init_builtins ()
253.6054 ++{
253.6055 ++  const struct builtin_description *d;
253.6056 ++
253.6057 ++
253.6058 ++  endlink = void_list_node;
253.6059 ++
253.6060 ++  /* Special indenting here because one of the brackets is in def_param */
253.6061 ++  /* *INDENT-OFF* */
253.6062 ++
253.6063 ++  /* int fn (volatile const void *)
253.6064 ++   */
253.6065 ++  int_ftype_volatile_const_void_p
253.6066 ++    = build_function_type (integer_type_node,
253.6067 ++			   def_param (build_qualified_type (ptr_type_node,
253.6068 ++			                                    TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE))
253.6069 ++			   endlink));
253.6070 ++
253.6071 ++
253.6072 ++  /* void fn (volatile void *, int)
253.6073 ++   */
253.6074 ++  void_ftype_volatile_void_p_int
253.6075 ++    = build_function_type (void_type_node,
253.6076 ++			   def_param (build_qualified_type (ptr_type_node,
253.6077 ++			                                    TYPE_QUAL_VOLATILE))
253.6078 ++			   def_param (integer_type_node)
253.6079 ++			   endlink)));
253.6080 ++
253.6081 ++  /* void fn (void)
253.6082 ++   */
253.6083 ++  void_ftype_void
253.6084 ++      = build_function_type (void_type_node,
253.6085 ++                             endlink);
253.6086 ++
253.6087 ++  /* int fn (int)
253.6088 ++   */
253.6089 ++  int_ftype_int
253.6090 ++      = build_function_type (integer_type_node,
253.6091 ++                             def_param (integer_type_node)
253.6092 ++                             endlink));
253.6093 ++
253.6094 ++  /* void fn (int, int)
253.6095 ++   */
253.6096 ++  void_ftype_int_int
253.6097 ++      = build_function_type (void_type_node,
253.6098 ++                             def_param (integer_type_node)
253.6099 ++                             def_param (integer_type_node)
253.6100 ++                             endlink)));
253.6101 ++
253.6102 ++
253.6103 ++#define CUSTOM_NUM def_param (integer_type_node)
253.6104 ++
253.6105 ++  custom_n
253.6106 ++      = build_function_type (void_type_node,
253.6107 ++  			     CUSTOM_NUM
253.6108 ++  			     endlink));
253.6109 ++  custom_ni
253.6110 ++      = build_function_type (void_type_node,
253.6111 ++  			     CUSTOM_NUM
253.6112 ++  			     def_param (integer_type_node)
253.6113 ++  			     endlink)));
253.6114 ++  custom_nf
253.6115 ++      = build_function_type (void_type_node,
253.6116 ++  			     CUSTOM_NUM
253.6117 ++  			     def_param (float_type_node)
253.6118 ++  			     endlink)));
253.6119 ++  custom_np
253.6120 ++      = build_function_type (void_type_node,
253.6121 ++  			     CUSTOM_NUM
253.6122 ++  			     def_param (ptr_type_node)
253.6123 ++  			     endlink)));
253.6124 ++  custom_nii
253.6125 ++      = build_function_type (void_type_node,
253.6126 ++  			     CUSTOM_NUM
253.6127 ++  			     def_param (integer_type_node)
253.6128 ++  			     def_param (integer_type_node)
253.6129 ++  			     endlink))));
253.6130 ++  custom_nif
253.6131 ++      = build_function_type (void_type_node,
253.6132 ++  			     CUSTOM_NUM
253.6133 ++  			     def_param (integer_type_node)
253.6134 ++  			     def_param (float_type_node)
253.6135 ++  			     endlink))));
253.6136 ++  custom_nip
253.6137 ++      = build_function_type (void_type_node,
253.6138 ++  			     CUSTOM_NUM
253.6139 ++  			     def_param (integer_type_node)
253.6140 ++  			     def_param (ptr_type_node)
253.6141 ++  			     endlink))));
253.6142 ++  custom_nfi
253.6143 ++      = build_function_type (void_type_node,
253.6144 ++  			     CUSTOM_NUM
253.6145 ++  			     def_param (float_type_node)
253.6146 ++  			     def_param (integer_type_node)
253.6147 ++  			     endlink))));
253.6148 ++  custom_nff
253.6149 ++      = build_function_type (void_type_node,
253.6150 ++  			     CUSTOM_NUM
253.6151 ++  			     def_param (float_type_node)
253.6152 ++  			     def_param (float_type_node)
253.6153 ++  			     endlink))));
253.6154 ++  custom_nfp
253.6155 ++      = build_function_type (void_type_node,
253.6156 ++  			     CUSTOM_NUM
253.6157 ++  			     def_param (float_type_node)
253.6158 ++  			     def_param (ptr_type_node)
253.6159 ++  			     endlink))));
253.6160 ++  custom_npi
253.6161 ++      = build_function_type (void_type_node,
253.6162 ++  			     CUSTOM_NUM
253.6163 ++  			     def_param (ptr_type_node)
253.6164 ++  			     def_param (integer_type_node)
253.6165 ++  			     endlink))));
253.6166 ++  custom_npf
253.6167 ++      = build_function_type (void_type_node,
253.6168 ++  			     CUSTOM_NUM
253.6169 ++  			     def_param (ptr_type_node)
253.6170 ++  			     def_param (float_type_node)
253.6171 ++  			     endlink))));
253.6172 ++  custom_npp
253.6173 ++      = build_function_type (void_type_node,
253.6174 ++  			     CUSTOM_NUM
253.6175 ++  			     def_param (ptr_type_node)
253.6176 ++  			     def_param (ptr_type_node)
253.6177 ++  			     endlink))));
253.6178 ++
253.6179 ++  custom_in
253.6180 ++      = build_function_type (integer_type_node,
253.6181 ++  			     CUSTOM_NUM
253.6182 ++  			     endlink));
253.6183 ++  custom_ini
253.6184 ++      = build_function_type (integer_type_node,
253.6185 ++  			     CUSTOM_NUM
253.6186 ++  			     def_param (integer_type_node)
253.6187 ++  			     endlink)));
253.6188 ++  custom_inf
253.6189 ++      = build_function_type (integer_type_node,
253.6190 ++  			     CUSTOM_NUM
253.6191 ++  			     def_param (float_type_node)
253.6192 ++  			     endlink)));
253.6193 ++  custom_inp
253.6194 ++      = build_function_type (integer_type_node,
253.6195 ++  			     CUSTOM_NUM
253.6196 ++  			     def_param (ptr_type_node)
253.6197 ++  			     endlink)));
253.6198 ++  custom_inii
253.6199 ++      = build_function_type (integer_type_node,
253.6200 ++  			     CUSTOM_NUM
253.6201 ++  			     def_param (integer_type_node)
253.6202 ++  			     def_param (integer_type_node)
253.6203 ++  			     endlink))));
253.6204 ++  custom_inif
253.6205 ++      = build_function_type (integer_type_node,
253.6206 ++  			     CUSTOM_NUM
253.6207 ++  			     def_param (integer_type_node)
253.6208 ++  			     def_param (float_type_node)
253.6209 ++  			     endlink))));
253.6210 ++  custom_inip
253.6211 ++      = build_function_type (integer_type_node,
253.6212 ++  			     CUSTOM_NUM
253.6213 ++  			     def_param (integer_type_node)
253.6214 ++  			     def_param (ptr_type_node)
253.6215 ++  			     endlink))));
253.6216 ++  custom_infi
253.6217 ++      = build_function_type (integer_type_node,
253.6218 ++  			     CUSTOM_NUM
253.6219 ++  			     def_param (float_type_node)
253.6220 ++  			     def_param (integer_type_node)
253.6221 ++  			     endlink))));
253.6222 ++  custom_inff
253.6223 ++      = build_function_type (integer_type_node,
253.6224 ++  			     CUSTOM_NUM
253.6225 ++  			     def_param (float_type_node)
253.6226 ++  			     def_param (float_type_node)
253.6227 ++  			     endlink))));
253.6228 ++  custom_infp
253.6229 ++      = build_function_type (integer_type_node,
253.6230 ++  			     CUSTOM_NUM
253.6231 ++  			     def_param (float_type_node)
253.6232 ++  			     def_param (ptr_type_node)
253.6233 ++  			     endlink))));
253.6234 ++  custom_inpi
253.6235 ++      = build_function_type (integer_type_node,
253.6236 ++  			     CUSTOM_NUM
253.6237 ++  			     def_param (ptr_type_node)
253.6238 ++  			     def_param (integer_type_node)
253.6239 ++  			     endlink))));
253.6240 ++  custom_inpf
253.6241 ++      = build_function_type (integer_type_node,
253.6242 ++  			     CUSTOM_NUM
253.6243 ++  			     def_param (ptr_type_node)
253.6244 ++  			     def_param (float_type_node)
253.6245 ++  			     endlink))));
253.6246 ++  custom_inpp
253.6247 ++      = build_function_type (integer_type_node,
253.6248 ++  			     CUSTOM_NUM
253.6249 ++  			     def_param (ptr_type_node)
253.6250 ++  			     def_param (ptr_type_node)
253.6251 ++  			     endlink))));
253.6252 ++
253.6253 ++  custom_fn
253.6254 ++      = build_function_type (float_type_node,
253.6255 ++  			     CUSTOM_NUM
253.6256 ++  			     endlink));
253.6257 ++  custom_fni
253.6258 ++      = build_function_type (float_type_node,
253.6259 ++  			     CUSTOM_NUM
253.6260 ++  			     def_param (integer_type_node)
253.6261 ++  			     endlink)));
253.6262 ++  custom_fnf
253.6263 ++      = build_function_type (float_type_node,
253.6264 ++  			     CUSTOM_NUM
253.6265 ++  			     def_param (float_type_node)
253.6266 ++  			     endlink)));
253.6267 ++  custom_fnp
253.6268 ++      = build_function_type (float_type_node,
253.6269 ++  			     CUSTOM_NUM
253.6270 ++  			     def_param (ptr_type_node)
253.6271 ++  			     endlink)));
253.6272 ++  custom_fnii
253.6273 ++      = build_function_type (float_type_node,
253.6274 ++  			     CUSTOM_NUM
253.6275 ++  			     def_param (integer_type_node)
253.6276 ++  			     def_param (integer_type_node)
253.6277 ++  			     endlink))));
253.6278 ++  custom_fnif
253.6279 ++      = build_function_type (float_type_node,
253.6280 ++  			     CUSTOM_NUM
253.6281 ++  			     def_param (integer_type_node)
253.6282 ++  			     def_param (float_type_node)
253.6283 ++  			     endlink))));
253.6284 ++  custom_fnip
253.6285 ++      = build_function_type (float_type_node,
253.6286 ++  			     CUSTOM_NUM
253.6287 ++  			     def_param (integer_type_node)
253.6288 ++  			     def_param (ptr_type_node)
253.6289 ++  			     endlink))));
253.6290 ++  custom_fnfi
253.6291 ++      = build_function_type (float_type_node,
253.6292 ++  			     CUSTOM_NUM
253.6293 ++  			     def_param (float_type_node)
253.6294 ++  			     def_param (integer_type_node)
253.6295 ++  			     endlink))));
253.6296 ++  custom_fnff
253.6297 ++      = build_function_type (float_type_node,
253.6298 ++  			     CUSTOM_NUM
253.6299 ++  			     def_param (float_type_node)
253.6300 ++  			     def_param (float_type_node)
253.6301 ++  			     endlink))));
253.6302 ++  custom_fnfp
253.6303 ++      = build_function_type (float_type_node,
253.6304 ++  			     CUSTOM_NUM
253.6305 ++  			     def_param (float_type_node)
253.6306 ++  			     def_param (ptr_type_node)
253.6307 ++  			     endlink))));
253.6308 ++  custom_fnpi
253.6309 ++      = build_function_type (float_type_node,
253.6310 ++  			     CUSTOM_NUM
253.6311 ++  			     def_param (ptr_type_node)
253.6312 ++  			     def_param (integer_type_node)
253.6313 ++  			     endlink))));
253.6314 ++  custom_fnpf
253.6315 ++      = build_function_type (float_type_node,
253.6316 ++  			     CUSTOM_NUM
253.6317 ++  			     def_param (ptr_type_node)
253.6318 ++  			     def_param (float_type_node)
253.6319 ++  			     endlink))));
253.6320 ++  custom_fnpp
253.6321 ++      = build_function_type (float_type_node,
253.6322 ++  			     CUSTOM_NUM
253.6323 ++  			     def_param (ptr_type_node)
253.6324 ++  			     def_param (ptr_type_node)
253.6325 ++  			     endlink))));
253.6326 ++
253.6327 ++
253.6328 ++  custom_pn
253.6329 ++      = build_function_type (ptr_type_node,
253.6330 ++  			     CUSTOM_NUM
253.6331 ++  			     endlink));
253.6332 ++  custom_pni
253.6333 ++      = build_function_type (ptr_type_node,
253.6334 ++  			     CUSTOM_NUM
253.6335 ++  			     def_param (integer_type_node)
253.6336 ++  			     endlink)));
253.6337 ++  custom_pnf
253.6338 ++      = build_function_type (ptr_type_node,
253.6339 ++  			     CUSTOM_NUM
253.6340 ++  			     def_param (float_type_node)
253.6341 ++  			     endlink)));
253.6342 ++  custom_pnp
253.6343 ++      = build_function_type (ptr_type_node,
253.6344 ++  			     CUSTOM_NUM
253.6345 ++  			     def_param (ptr_type_node)
253.6346 ++  			     endlink)));
253.6347 ++  custom_pnii
253.6348 ++      = build_function_type (ptr_type_node,
253.6349 ++  			     CUSTOM_NUM
253.6350 ++  			     def_param (integer_type_node)
253.6351 ++  			     def_param (integer_type_node)
253.6352 ++  			     endlink))));
253.6353 ++  custom_pnif
253.6354 ++      = build_function_type (ptr_type_node,
253.6355 ++  			     CUSTOM_NUM
253.6356 ++  			     def_param (integer_type_node)
253.6357 ++  			     def_param (float_type_node)
253.6358 ++  			     endlink))));
253.6359 ++  custom_pnip
253.6360 ++      = build_function_type (ptr_type_node,
253.6361 ++  			     CUSTOM_NUM
253.6362 ++  			     def_param (integer_type_node)
253.6363 ++  			     def_param (ptr_type_node)
253.6364 ++  			     endlink))));
253.6365 ++  custom_pnfi
253.6366 ++      = build_function_type (ptr_type_node,
253.6367 ++  			     CUSTOM_NUM
253.6368 ++  			     def_param (float_type_node)
253.6369 ++  			     def_param (integer_type_node)
253.6370 ++  			     endlink))));
253.6371 ++  custom_pnff
253.6372 ++      = build_function_type (ptr_type_node,
253.6373 ++  			     CUSTOM_NUM
253.6374 ++  			     def_param (float_type_node)
253.6375 ++  			     def_param (float_type_node)
253.6376 ++  			     endlink))));
253.6377 ++  custom_pnfp
253.6378 ++      = build_function_type (ptr_type_node,
253.6379 ++  			     CUSTOM_NUM
253.6380 ++  			     def_param (float_type_node)
253.6381 ++  			     def_param (ptr_type_node)
253.6382 ++  			     endlink))));
253.6383 ++  custom_pnpi
253.6384 ++      = build_function_type (ptr_type_node,
253.6385 ++  			     CUSTOM_NUM
253.6386 ++  			     def_param (ptr_type_node)
253.6387 ++  			     def_param (integer_type_node)
253.6388 ++  			     endlink))));
253.6389 ++  custom_pnpf
253.6390 ++      = build_function_type (ptr_type_node,
253.6391 ++  			     CUSTOM_NUM
253.6392 ++  			     def_param (ptr_type_node)
253.6393 ++  			     def_param (float_type_node)
253.6394 ++  			     endlink))));
253.6395 ++  custom_pnpp
253.6396 ++      = build_function_type (ptr_type_node,
253.6397 ++  			     CUSTOM_NUM
253.6398 ++  			     def_param (ptr_type_node)
253.6399 ++  			     def_param (ptr_type_node)
253.6400 ++  			     endlink))));
253.6401 ++
253.6402 ++
253.6403 ++
253.6404 ++  /* *INDENT-ON* */
253.6405 ++
253.6406 ++
253.6407 ++  for (d = bdesc; d->name; d++)
253.6408 ++    {
253.6409 ++      builtin_function (d->name, *d->type, d->code,
253.6410 ++			BUILT_IN_MD, NULL, NULL);
253.6411 ++    }
253.6412 ++}
253.6413 ++
253.6414 ++/* Expand an expression EXP that calls a built-in function,
253.6415 ++   with result going to TARGET if that's convenient
253.6416 ++   (and in mode MODE if that's convenient).
253.6417 ++   SUBTARGET may be used as the target for computing one of EXP's operands.
253.6418 ++   IGNORE is nonzero if the value is to be ignored.  */
253.6419 ++
253.6420 ++static rtx
253.6421 ++nios2_expand_builtin (tree exp, rtx target, rtx subtarget, 
253.6422 ++                      enum machine_mode mode, int ignore)
253.6423 ++{
253.6424 ++  const struct builtin_description *d;
253.6425 ++  tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
253.6426 ++  unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
253.6427 ++
253.6428 ++  for (d = bdesc; d->name; d++)
253.6429 ++    if (d->code == fcode)
253.6430 ++      return (d->expander) (d, exp, target, subtarget, mode, ignore);
253.6431 ++
253.6432 ++  /* we should have seen one of the functins we registered */
253.6433 ++  abort ();
253.6434 ++}
253.6435 ++
253.6436 ++static rtx nios2_create_target (const struct builtin_description *, rtx);
253.6437 ++
253.6438 ++
253.6439 ++static rtx
253.6440 ++nios2_create_target (const struct builtin_description *d, rtx target)
253.6441 ++{
253.6442 ++  if (!target
253.6443 ++      || !(*insn_data[d->icode].operand[0].predicate) (target,
253.6444 ++                                                       insn_data[d->icode].operand[0].mode))
253.6445 ++    {
253.6446 ++      target = gen_reg_rtx (insn_data[d->icode].operand[0].mode);
253.6447 ++    }
253.6448 ++
253.6449 ++  return target;
253.6450 ++}
253.6451 ++
253.6452 ++
253.6453 ++static rtx nios2_extract_opcode (const struct builtin_description *, int, tree);
253.6454 ++static rtx nios2_extract_operand (const struct builtin_description *, int, int, tree);
253.6455 ++
253.6456 ++static rtx
253.6457 ++nios2_extract_opcode (const struct builtin_description *d, int op, tree arglist)
253.6458 ++{
253.6459 ++  enum machine_mode mode = insn_data[d->icode].operand[op].mode;
253.6460 ++  tree arg = TREE_VALUE (arglist);
253.6461 ++  rtx opcode = expand_expr (arg, NULL_RTX, mode, 0);
253.6462 ++  opcode = protect_from_queue (opcode, 0);
253.6463 ++
253.6464 ++  if (!(*insn_data[d->icode].operand[op].predicate) (opcode, mode))
253.6465 ++    error ("Custom instruction opcode must be compile time constant in the range 0-255 for %s", d->name);
253.6466 ++
253.6467 ++  return opcode;
253.6468 ++}
253.6469 ++
253.6470 ++static rtx
253.6471 ++nios2_extract_operand (const struct builtin_description *d, int op, int argnum, tree arglist)
253.6472 ++{
253.6473 ++  enum machine_mode mode = insn_data[d->icode].operand[op].mode;
253.6474 ++  tree arg = TREE_VALUE (arglist);
253.6475 ++  rtx operand = expand_expr (arg, NULL_RTX, mode, 0);
253.6476 ++  operand = protect_from_queue (operand, 0);
253.6477 ++
253.6478 ++  if (!(*insn_data[d->icode].operand[op].predicate) (operand, mode))
253.6479 ++    operand = copy_to_mode_reg (mode, operand);
253.6480 ++
253.6481 ++  /* ??? Better errors would be nice */
253.6482 ++  if (!(*insn_data[d->icode].operand[op].predicate) (operand, mode))
253.6483 ++    error ("Invalid argument %d to %s", argnum, d->name);
253.6484 ++
253.6485 ++  return operand;
253.6486 ++}
253.6487 ++
253.6488 ++
253.6489 ++static rtx
253.6490 ++nios2_expand_custom_n (const struct builtin_description *d, tree exp, 
253.6491 ++                       rtx target ATTRIBUTE_UNUSED, rtx subtarget ATTRIBUTE_UNUSED, 
253.6492 ++                       enum machine_mode mode ATTRIBUTE_UNUSED, int ignore ATTRIBUTE_UNUSED)
253.6493 ++{
253.6494 ++  tree arglist = TREE_OPERAND (exp, 1);
253.6495 ++  rtx pat;
253.6496 ++  rtx opcode;
253.6497 ++
253.6498 ++  /* custom_n should have exactly one operand */
253.6499 ++  if (insn_data[d->icode].n_operands != 1)
253.6500 ++    abort ();
253.6501 ++
253.6502 ++  opcode = nios2_extract_opcode (d, 0, arglist);
253.6503 ++
253.6504 ++  pat = GEN_FCN (d->icode) (opcode);
253.6505 ++  if (!pat)
253.6506 ++    return 0;
253.6507 ++  emit_insn (pat);
253.6508 ++  return 0;
253.6509 ++}
253.6510 ++
253.6511 ++static rtx
253.6512 ++nios2_expand_custom_Xn (const struct builtin_description *d, tree exp, 
253.6513 ++                        rtx target, rtx subtarget ATTRIBUTE_UNUSED, 
253.6514 ++                        enum machine_mode mode ATTRIBUTE_UNUSED, 
253.6515 ++                        int ignore ATTRIBUTE_UNUSED)
253.6516 ++{
253.6517 ++  tree arglist = TREE_OPERAND (exp, 1);
253.6518 ++  rtx pat;
253.6519 ++  rtx opcode;
253.6520 ++
253.6521 ++  /* custom_Xn should have exactly two operands */
253.6522 ++  if (insn_data[d->icode].n_operands != 2)
253.6523 ++    abort ();
253.6524 ++
253.6525 ++  target = nios2_create_target (d, target);
253.6526 ++  opcode = nios2_extract_opcode (d, 1, arglist);
253.6527 ++
253.6528 ++  pat = GEN_FCN (d->icode) (target, opcode);
253.6529 ++  if (!pat)
253.6530 ++    return 0;
253.6531 ++  emit_insn (pat);
253.6532 ++  return target;
253.6533 ++}
253.6534 ++
253.6535 ++static rtx
253.6536 ++nios2_expand_custom_nX (const struct builtin_description *d, tree exp, 
253.6537 ++                        rtx target ATTRIBUTE_UNUSED, rtx subtarget ATTRIBUTE_UNUSED, 
253.6538 ++                        enum machine_mode mode ATTRIBUTE_UNUSED, int ignore ATTRIBUTE_UNUSED)
253.6539 ++{
253.6540 ++  tree arglist = TREE_OPERAND (exp, 1);
253.6541 ++  rtx pat;
253.6542 ++  rtx opcode;
253.6543 ++  rtx operands[1];
253.6544 ++  int i;
253.6545 ++
253.6546 ++
253.6547 ++  /* custom_nX should have exactly two operands */
253.6548 ++  if (insn_data[d->icode].n_operands != 2)
253.6549 ++    abort ();
253.6550 ++
253.6551 ++  opcode = nios2_extract_opcode (d, 0, arglist);
253.6552 ++  for (i = 0; i < 1; i++)
253.6553 ++    {
253.6554 ++      arglist = TREE_CHAIN (arglist);
253.6555 ++      operands[i] = nios2_extract_operand (d, i + 1, i + 1, arglist);
253.6556 ++    }
253.6557 ++
253.6558 ++  pat = GEN_FCN (d->icode) (opcode, operands[0]);
253.6559 ++  if (!pat)
253.6560 ++    return 0;
253.6561 ++  emit_insn (pat);
253.6562 ++  return 0;
253.6563 ++}
253.6564 ++
253.6565 ++static rtx
253.6566 ++nios2_expand_custom_XnX (const struct builtin_description *d, tree exp, rtx target, 
253.6567 ++                         rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED, 
253.6568 ++                         int ignore ATTRIBUTE_UNUSED)
253.6569 ++{
253.6570 ++  tree arglist = TREE_OPERAND (exp, 1);
253.6571 ++  rtx pat;
253.6572 ++  rtx opcode;
253.6573 ++  rtx operands[1];
253.6574 ++  int i;
253.6575 ++
253.6576 ++  /* custom_Xn should have exactly three operands */
253.6577 ++  if (insn_data[d->icode].n_operands != 3)
253.6578 ++    abort ();
253.6579 ++
253.6580 ++  target = nios2_create_target (d, target);
253.6581 ++  opcode = nios2_extract_opcode (d, 1, arglist);
253.6582 ++
253.6583 ++  for (i = 0; i < 1; i++)
253.6584 ++    {
253.6585 ++      arglist = TREE_CHAIN (arglist);
253.6586 ++      operands[i] = nios2_extract_operand (d, i + 2, i + 1, arglist);
253.6587 ++    }
253.6588 ++
253.6589 ++  pat = GEN_FCN (d->icode) (target, opcode, operands[0]);
253.6590 ++
253.6591 ++  if (!pat)
253.6592 ++    return 0;
253.6593 ++  emit_insn (pat);
253.6594 ++  return target;
253.6595 ++}
253.6596 ++
253.6597 ++static rtx
253.6598 ++nios2_expand_custom_nXX (const struct builtin_description *d, tree exp, rtx target ATTRIBUTE_UNUSED, 
253.6599 ++                         rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED, 
253.6600 ++                         int ignore ATTRIBUTE_UNUSED)
253.6601 ++{
253.6602 ++  tree arglist = TREE_OPERAND (exp, 1);
253.6603 ++  rtx pat;
253.6604 ++  rtx opcode;
253.6605 ++  rtx operands[2];
253.6606 ++  int i;
253.6607 ++
253.6608 ++
253.6609 ++  /* custom_nX should have exactly three operands */
253.6610 ++  if (insn_data[d->icode].n_operands != 3)
253.6611 ++    abort ();
253.6612 ++
253.6613 ++  opcode = nios2_extract_opcode (d, 0, arglist);
253.6614 ++  for (i = 0; i < 2; i++)
253.6615 ++    {
253.6616 ++      arglist = TREE_CHAIN (arglist);
253.6617 ++      operands[i] = nios2_extract_operand (d, i + 1, i + 1, arglist);
253.6618 ++    }
253.6619 ++
253.6620 ++  pat = GEN_FCN (d->icode) (opcode, operands[0], operands[1]);
253.6621 ++  if (!pat)
253.6622 ++    return 0;
253.6623 ++  emit_insn (pat);
253.6624 ++  return 0;
253.6625 ++}
253.6626 ++
253.6627 ++static rtx
253.6628 ++nios2_expand_custom_XnXX (const struct builtin_description *d, tree exp, rtx target, 
253.6629 ++                          rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED, 
253.6630 ++                          int ignore ATTRIBUTE_UNUSED)
253.6631 ++{
253.6632 ++  tree arglist = TREE_OPERAND (exp, 1);
253.6633 ++  rtx pat;
253.6634 ++  rtx opcode;
253.6635 ++  rtx operands[2];
253.6636 ++  int i;
253.6637 ++
253.6638 ++
253.6639 ++  /* custom_XnX should have exactly four operands */
253.6640 ++  if (insn_data[d->icode].n_operands != 4)
253.6641 ++    abort ();
253.6642 ++
253.6643 ++  target = nios2_create_target (d, target);
253.6644 ++  opcode = nios2_extract_opcode (d, 1, arglist);
253.6645 ++  for (i = 0; i < 2; i++)
253.6646 ++    {
253.6647 ++      arglist = TREE_CHAIN (arglist);
253.6648 ++      operands[i] = nios2_extract_operand (d, i + 2, i + 1, arglist);
253.6649 ++    }
253.6650 ++
253.6651 ++  pat = GEN_FCN (d->icode) (target, opcode, operands[0], operands[1]);
253.6652 ++
253.6653 ++  if (!pat)
253.6654 ++    return 0;
253.6655 ++  emit_insn (pat);
253.6656 ++  return target;
253.6657 ++}
253.6658 ++
253.6659 ++
253.6660 ++
253.6661 ++static rtx
253.6662 ++nios2_expand_STXIO (const struct builtin_description *d, tree exp, rtx target ATTRIBUTE_UNUSED, 
253.6663 ++                    rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED, 
253.6664 ++                    int ignore ATTRIBUTE_UNUSED)
253.6665 ++{
253.6666 ++  tree arglist = TREE_OPERAND (exp, 1);
253.6667 ++  rtx pat;
253.6668 ++  rtx store_dest, store_val;
253.6669 ++  enum insn_code icode = d->icode;
253.6670 ++
253.6671 ++  /* stores should have exactly two operands */
253.6672 ++  if (insn_data[icode].n_operands != 2)
253.6673 ++    abort ();
253.6674 ++
253.6675 ++  /* process the destination of the store */
253.6676 ++  {
253.6677 ++    enum machine_mode mode = insn_data[icode].operand[0].mode;
253.6678 ++    tree arg = TREE_VALUE (arglist);
253.6679 ++    store_dest = expand_expr (arg, NULL_RTX, VOIDmode, 0);
253.6680 ++    store_dest = protect_from_queue (store_dest, 0);
253.6681 ++
253.6682 ++    store_dest = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, store_dest));
253.6683 ++
253.6684 ++    /* ??? Better errors would be nice */
253.6685 ++    if (!(*insn_data[icode].operand[0].predicate) (store_dest, mode))
253.6686 ++      error ("Invalid argument 1 to %s", d->name);
253.6687 ++  }
253.6688 ++
253.6689 ++
253.6690 ++  /* process the value to store */
253.6691 ++  {
253.6692 ++    enum machine_mode mode = insn_data[icode].operand[1].mode;
253.6693 ++    tree arg = TREE_VALUE (TREE_CHAIN (arglist));
253.6694 ++    store_val = expand_expr (arg, NULL_RTX, mode, 0);
253.6695 ++    store_val = protect_from_queue (store_val, 0);
253.6696 ++
253.6697 ++    if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
253.6698 ++      store_val = copy_to_mode_reg (mode, store_val);
253.6699 ++
253.6700 ++    /* ??? Better errors would be nice */
253.6701 ++    if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
253.6702 ++      error ("Invalid argument 2 to %s", d->name);
253.6703 ++  }
253.6704 ++
253.6705 ++  pat = GEN_FCN (d->icode) (store_dest, store_val);
253.6706 ++  if (!pat)
253.6707 ++    return 0;
253.6708 ++  emit_insn (pat);
253.6709 ++  return 0;
253.6710 ++}
253.6711 ++
253.6712 ++
253.6713 ++static rtx
253.6714 ++nios2_expand_LDXIO (const struct builtin_description * d, tree exp, rtx target, 
253.6715 ++                    rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED, 
253.6716 ++                    int ignore ATTRIBUTE_UNUSED)
253.6717 ++{
253.6718 ++  tree arglist = TREE_OPERAND (exp, 1);
253.6719 ++  rtx pat;
253.6720 ++  rtx ld_src;
253.6721 ++  enum insn_code icode = d->icode;
253.6722 ++
253.6723 ++  /* loads should have exactly two operands */
253.6724 ++  if (insn_data[icode].n_operands != 2)
253.6725 ++    abort ();
253.6726 ++
253.6727 ++  target = nios2_create_target (d, target);
253.6728 ++
253.6729 ++  {
253.6730 ++    enum machine_mode mode = insn_data[icode].operand[1].mode;
253.6731 ++    tree arg = TREE_VALUE (arglist);
253.6732 ++    ld_src = expand_expr (arg, NULL_RTX, VOIDmode, 0);
253.6733 ++    ld_src = protect_from_queue (ld_src, 0);
253.6734 ++
253.6735 ++    ld_src = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, ld_src));
253.6736 ++
253.6737 ++    /* ??? Better errors would be nice */
253.6738 ++    if (!(*insn_data[icode].operand[1].predicate) (ld_src, mode))
253.6739 ++      {
253.6740 ++        error ("Invalid argument 1 to %s", d->name);
253.6741 ++      }
253.6742 ++  }
253.6743 ++
253.6744 ++  pat = GEN_FCN (d->icode) (target, ld_src);
253.6745 ++  if (!pat)
253.6746 ++    return 0;
253.6747 ++  emit_insn (pat);
253.6748 ++  return target;
253.6749 ++}
253.6750 ++
253.6751 ++
253.6752 ++static rtx
253.6753 ++nios2_expand_sync (const struct builtin_description * d ATTRIBUTE_UNUSED, 
253.6754 ++                   tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED, 
253.6755 ++                   rtx subtarget ATTRIBUTE_UNUSED, 
253.6756 ++                   enum machine_mode mode ATTRIBUTE_UNUSED, 
253.6757 ++                   int ignore ATTRIBUTE_UNUSED)
253.6758 ++{
253.6759 ++  emit_insn (gen_sync ());
253.6760 ++  return 0;
253.6761 ++}
253.6762 ++
253.6763 ++static rtx
253.6764 ++nios2_expand_rdctl (const struct builtin_description * d ATTRIBUTE_UNUSED, 
253.6765 ++                   tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED, 
253.6766 ++                   rtx subtarget ATTRIBUTE_UNUSED, 
253.6767 ++                   enum machine_mode mode ATTRIBUTE_UNUSED, 
253.6768 ++                   int ignore ATTRIBUTE_UNUSED)
253.6769 ++{
253.6770 ++  tree arglist = TREE_OPERAND (exp, 1);
253.6771 ++  rtx pat;
253.6772 ++  rtx rdctl_reg;
253.6773 ++  enum insn_code icode = d->icode;
253.6774 ++
253.6775 ++  /* rdctl should have exactly two operands */
253.6776 ++  if (insn_data[icode].n_operands != 2)
253.6777 ++    abort ();
253.6778 ++
253.6779 ++  target = nios2_create_target (d, target);
253.6780 ++
253.6781 ++  {
253.6782 ++    enum machine_mode mode = insn_data[icode].operand[1].mode;
253.6783 ++    tree arg = TREE_VALUE (arglist);
253.6784 ++    rdctl_reg = expand_expr (arg, NULL_RTX, VOIDmode, 0);
253.6785 ++    rdctl_reg = protect_from_queue (rdctl_reg, 0);
253.6786 ++
253.6787 ++    if (!(*insn_data[icode].operand[1].predicate) (rdctl_reg, mode))
253.6788 ++      {
253.6789 ++        error ("Control register number must be in range 0-31 for %s", d->name);
253.6790 ++      }
253.6791 ++  }
253.6792 ++
253.6793 ++  pat = GEN_FCN (d->icode) (target, rdctl_reg);
253.6794 ++  if (!pat)
253.6795 ++    return 0;
253.6796 ++  emit_insn (pat);
253.6797 ++  return target;
253.6798 ++}
253.6799 ++
253.6800 ++static rtx
253.6801 ++nios2_expand_wrctl (const struct builtin_description * d ATTRIBUTE_UNUSED, 
253.6802 ++                   tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED, 
253.6803 ++                   rtx subtarget ATTRIBUTE_UNUSED, 
253.6804 ++                   enum machine_mode mode ATTRIBUTE_UNUSED, 
253.6805 ++                   int ignore ATTRIBUTE_UNUSED)
253.6806 ++{
253.6807 ++  tree arglist = TREE_OPERAND (exp, 1);
253.6808 ++  rtx pat;
253.6809 ++  rtx wrctl_reg, store_val;
253.6810 ++  enum insn_code icode = d->icode;
253.6811 ++
253.6812 ++  /* stores should have exactly two operands */
253.6813 ++  if (insn_data[icode].n_operands != 2)
253.6814 ++    abort ();
253.6815 ++
253.6816 ++  /* process the destination of the store */
253.6817 ++  {
253.6818 ++    enum machine_mode mode = insn_data[icode].operand[0].mode;
253.6819 ++    tree arg = TREE_VALUE (arglist);
253.6820 ++    wrctl_reg = expand_expr (arg, NULL_RTX, VOIDmode, 0);
253.6821 ++    wrctl_reg = protect_from_queue (wrctl_reg, 0);
253.6822 ++
253.6823 ++    if (!(*insn_data[icode].operand[0].predicate) (wrctl_reg, mode))
253.6824 ++      error ("Control register number must be in range 0-31 for %s", d->name);
253.6825 ++  }
253.6826 ++
253.6827 ++
253.6828 ++  /* process the value to store */
253.6829 ++  {
253.6830 ++    enum machine_mode mode = insn_data[icode].operand[1].mode;
253.6831 ++    tree arg = TREE_VALUE (TREE_CHAIN (arglist));
253.6832 ++    store_val = expand_expr (arg, NULL_RTX, mode, 0);
253.6833 ++    store_val = protect_from_queue (store_val, 0);
253.6834 ++
253.6835 ++    if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
253.6836 ++      store_val = copy_to_mode_reg (mode, store_val);
253.6837 ++
253.6838 ++    /* ??? Better errors would be nice */
253.6839 ++    if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
253.6840 ++      error ("Invalid argument 2 to %s", d->name);
253.6841 ++  }
253.6842 ++
253.6843 ++  pat = GEN_FCN (d->icode) (wrctl_reg, store_val);
253.6844 ++  if (!pat)
253.6845 ++    return 0;
253.6846 ++  emit_insn (pat);
253.6847 ++  return 0;
253.6848 ++}
253.6849 ++
253.6850 ++
253.6851 ++#include "gt-nios2.h"
253.6852 ++
253.6853 +--- gcc-3.4.3/gcc/config/nios2/nios2.h
253.6854 ++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.h
253.6855 +@@ -0,0 +1,824 @@
253.6856 ++/* Definitions of target machine for Altera NIOS 2G NIOS2 version.
253.6857 ++   Copyright (C) 2003 Altera 
253.6858 ++   Contributed by Jonah Graham (jgraham@altera.com).
253.6859 ++
253.6860 ++This file is part of GNU CC.
253.6861 ++
253.6862 ++GNU CC is free software; you can redistribute it and/or modify
253.6863 ++it under the terms of the GNU General Public License as published by
253.6864 ++the Free Software Foundation; either version 2, or (at your option)
253.6865 ++any later version.
253.6866 ++
253.6867 ++GNU CC is distributed in the hope that it will be useful,
253.6868 ++but WITHOUT ANY WARRANTY; without even the implied warranty of
253.6869 ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
253.6870 ++GNU General Public License for more details.
253.6871 ++
253.6872 ++You should have received a copy of the GNU General Public License
253.6873 ++along with GNU CC; see the file COPYING.  If not, write to
253.6874 ++the Free Software Foundation, 59 Temple Place - Suite 330,
253.6875 ++Boston, MA 02111-1307, USA.  */
253.6876 ++
253.6877 ++
253.6878 ++
253.6879 ++#define TARGET_CPU_CPP_BUILTINS()		\
253.6880 ++  do						\
253.6881 ++    {						\
253.6882 ++      builtin_define_std ("NIOS2");		\
253.6883 ++      builtin_define_std ("nios2");		\
253.6884 ++      builtin_define ("_GNU_SOURCE");		\
253.6885 ++    }						\
253.6886 ++  while (0)
253.6887 ++#define TARGET_VERSION fprintf (stderr, " (Altera Nios II)")
253.6888 ++
253.6889 ++
253.6890 ++
253.6891 ++
253.6892 ++
253.6893 ++/*********************************
253.6894 ++ * Run-time Target Specification
253.6895 ++ *********************************/
253.6896 ++
253.6897 ++#define HAS_DIV_FLAG 0x0001
253.6898 ++#define HAS_MUL_FLAG 0x0002
253.6899 ++#define HAS_MULX_FLAG 0x0004
253.6900 ++#define FAST_SW_DIV_FLAG 0x0008
253.6901 ++#define INLINE_MEMCPY_FLAG 0x00010
253.6902 ++#define CACHE_VOLATILE_FLAG 0x0020
253.6903 ++#define BYPASS_CACHE_FLAG 0x0040
253.6904 ++
253.6905 ++extern int target_flags;
253.6906 ++#define TARGET_HAS_DIV (target_flags & HAS_DIV_FLAG)
253.6907 ++#define TARGET_HAS_MUL (target_flags & HAS_MUL_FLAG)
253.6908 ++#define TARGET_HAS_MULX (target_flags & HAS_MULX_FLAG)
253.6909 ++#define TARGET_FAST_SW_DIV (target_flags & FAST_SW_DIV_FLAG)
253.6910 ++#define TARGET_INLINE_MEMCPY (target_flags & INLINE_MEMCPY_FLAG)
253.6911 ++#define TARGET_CACHE_VOLATILE (target_flags & CACHE_VOLATILE_FLAG)
253.6912 ++#define TARGET_BYPASS_CACHE (target_flags & BYPASS_CACHE_FLAG)
253.6913 ++
253.6914 ++#define TARGET_SWITCHES					\
253.6915 ++{							\
253.6916 ++    { "hw-div", HAS_DIV_FLAG,				\
253.6917 ++      N_("Enable DIV, DIVU") },				\
253.6918 ++    { "no-hw-div", -HAS_DIV_FLAG,			\
253.6919 ++      N_("Disable DIV, DIVU (default)") },		\
253.6920 ++    { "hw-mul", HAS_MUL_FLAG,				\
253.6921 ++      N_("Enable MUL instructions (default)") },				\
253.6922 ++    { "hw-mulx", HAS_MULX_FLAG,				\
253.6923 ++      N_("Enable MULX instructions, assume fast shifter") },				\
253.6924 ++    { "no-hw-mul", -HAS_MUL_FLAG,			\
253.6925 ++      N_("Disable MUL instructions") },		\
253.6926 ++    { "no-hw-mulx", -HAS_MULX_FLAG,			\
253.6927 ++      N_("Disable MULX instructions, assume slow shifter (default and implied by -mno-hw-mul)") },		\
253.6928 ++    { "fast-sw-div", FAST_SW_DIV_FLAG,				\
253.6929 ++      N_("Use table based fast divide (default at -O3)") },				\
253.6930 ++    { "no-fast-sw-div", -FAST_SW_DIV_FLAG,			\
253.6931 ++      N_("Don't use table based fast divide ever") },		\
253.6932 ++    { "inline-memcpy", INLINE_MEMCPY_FLAG,				\
253.6933 ++      N_("Inline small memcpy (default when optimizing)") },				\
253.6934 ++    { "no-inline-memcpy", -INLINE_MEMCPY_FLAG,			\
253.6935 ++      N_("Don't Inline small memcpy") },		\
253.6936 ++    { "cache-volatile", CACHE_VOLATILE_FLAG,				\
253.6937 ++      N_("Volatile accesses use non-io variants of instructions (default)") },				\
253.6938 ++    { "no-cache-volatile", -CACHE_VOLATILE_FLAG,			\
253.6939 ++      N_("Volatile accesses use io variants of instructions") },		\
253.6940 ++    { "bypass-cache", BYPASS_CACHE_FLAG,				\
253.6941 ++      N_("All ld/st instructins use io variants") },				\
253.6942 ++    { "no-bypass-cache", -BYPASS_CACHE_FLAG,			\
253.6943 ++      N_("All ld/st instructins do not use io variants (default)") },		\
253.6944 ++    { "smallc", 0,			\
253.6945 ++      N_("Link with a limited version of the C library") },		\
253.6946 ++    { "ctors-in-init", 0,			\
253.6947 ++      "" /* undocumented: N_("Link with static constructors and destructors in init") */ },		\
253.6948 ++    { "", TARGET_DEFAULT, 0 }				\
253.6949 ++}
253.6950 ++
253.6951 ++
253.6952 ++extern const char *nios2_sys_nosys_string;    /* for -msys=nosys */
253.6953 ++extern const char *nios2_sys_lib_string;    /* for -msys-lib= */
253.6954 ++extern const char *nios2_sys_crt0_string;    /* for -msys-crt0= */
253.6955 ++
253.6956 ++#define TARGET_OPTIONS					\
253.6957 ++{							\
253.6958 ++  { "sys=nosys",    &nios2_sys_nosys_string,		\
253.6959 ++      N_("Use stub versions of OS library calls (default)"), 0},	\
253.6960 ++  { "sys-lib=",    &nios2_sys_lib_string,		\
253.6961 ++      N_("Name of System Library to link against. (Converted to a -l option)"), 0},	\
253.6962 ++  { "sys-crt0=",    &nios2_sys_crt0_string,		\
253.6963 ++      N_("Name of the startfile. (default is a crt0 for the ISS only)"), 0},	\
253.6964 ++}
253.6965 ++
253.6966 ++
253.6967 ++/* Default target_flags if no switches specified.  */
253.6968 ++#ifndef TARGET_DEFAULT
253.6969 ++# define TARGET_DEFAULT (HAS_MUL_FLAG | CACHE_VOLATILE_FLAG)
253.6970 ++#endif
253.6971 ++
253.6972 ++/* Switch  Recognition by gcc.c.  Add -G xx support */
253.6973 ++#undef  SWITCH_TAKES_ARG
253.6974 ++#define SWITCH_TAKES_ARG(CHAR)						\
253.6975 ++  (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
253.6976 ++
253.6977 ++#define OVERRIDE_OPTIONS override_options ()
253.6978 ++#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) optimization_options (LEVEL, SIZE)
253.6979 ++#define CAN_DEBUG_WITHOUT_FP
253.6980 ++ 
253.6981 ++#define CC1_SPEC "\
253.6982 ++%{G*}"
253.6983 ++
253.6984 ++#undef LIB_SPEC
253.6985 ++#define LIB_SPEC \
253.6986 ++"--start-group %{msmallc: -lsmallc} %{!msmallc: -lc} -lgcc \
253.6987 ++ %{msys-lib=*: -l%*} \
253.6988 ++ %{!msys-lib=*: -lc } \
253.6989 ++ --end-group \
253.6990 ++ %{msys-lib=: %eYou need a library name for -msys-lib=} \
253.6991 ++"
253.6992 ++
253.6993 ++
253.6994 ++#undef STARTFILE_SPEC 
253.6995 ++#define STARTFILE_SPEC  \
253.6996 ++"%{msys-crt0=*: %*} %{!msys-crt0=*: crt1%O%s} \
253.6997 ++ %{msys-crt0=: %eYou need a C startup file for -msys-crt0=} \
253.6998 ++ %{mctors-in-init: crti%O%s crtbegin%O%s} \
253.6999 ++"
253.7000 ++
253.7001 ++#undef ENDFILE_SPEC 
253.7002 ++#define ENDFILE_SPEC \
253.7003 ++ "%{mctors-in-init: crtend%O%s crtn%O%s}"
253.7004 ++
253.7005 ++
253.7006 ++/***********************
253.7007 ++ * Storage Layout
253.7008 ++ ***********************/
253.7009 ++
253.7010 ++#define DEFAULT_SIGNED_CHAR 1
253.7011 ++#define BITS_BIG_ENDIAN 0
253.7012 ++#define BYTES_BIG_ENDIAN 0
253.7013 ++#define WORDS_BIG_ENDIAN 0
253.7014 ++#define BITS_PER_UNIT 8
253.7015 ++#define BITS_PER_WORD 32
253.7016 ++#define UNITS_PER_WORD 4
253.7017 ++#define POINTER_SIZE 32
253.7018 ++#define BIGGEST_ALIGNMENT 32
253.7019 ++#define STRICT_ALIGNMENT 1
253.7020 ++#define FUNCTION_BOUNDARY 32
253.7021 ++#define PARM_BOUNDARY 32
253.7022 ++#define STACK_BOUNDARY 32
253.7023 ++#define PREFERRED_STACK_BOUNDARY 32
253.7024 ++#define MAX_FIXED_MODE_SIZE 64
253.7025 ++
253.7026 ++#define CONSTANT_ALIGNMENT(EXP, ALIGN)				\
253.7027 ++  ((TREE_CODE (EXP) == STRING_CST) 				\
253.7028 ++   && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
253.7029 ++
253.7030 ++
253.7031 ++/**********************
253.7032 ++ * Layout of Source Language Data Types
253.7033 ++ **********************/
253.7034 ++
253.7035 ++#define INT_TYPE_SIZE 32
253.7036 ++#define SHORT_TYPE_SIZE 16
253.7037 ++#define LONG_TYPE_SIZE 32
253.7038 ++#define LONG_LONG_TYPE_SIZE 64
253.7039 ++#define FLOAT_TYPE_SIZE 32
253.7040 ++#define DOUBLE_TYPE_SIZE 64
253.7041 ++#define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE
253.7042 ++
253.7043 ++
253.7044 ++/*************************
253.7045 ++ * Condition Code Status
253.7046 ++ ************************/
253.7047 ++
253.7048 ++/* comparison type */
253.7049 ++/* ??? currently only CMP_SI is used */
253.7050 ++enum cmp_type {
253.7051 ++  CMP_SI,				/* compare four byte integers */
253.7052 ++  CMP_DI,				/* compare eight byte integers */
253.7053 ++  CMP_SF,				/* compare single precision floats */
253.7054 ++  CMP_DF,				/* compare double precision floats */
253.7055 ++  CMP_MAX				/* max comparison type */
253.7056 ++};
253.7057 ++
253.7058 ++extern GTY(()) rtx branch_cmp[2];	/* operands for compare */
253.7059 ++extern enum cmp_type branch_type;	/* what type of branch to use */
253.7060 ++
253.7061 ++/**********************
253.7062 ++ * Register Usage
253.7063 ++ **********************/
253.7064 ++
253.7065 ++/* ---------------------------------- *
253.7066 ++ * Basic Characteristics of Registers
253.7067 ++ * ---------------------------------- */
253.7068 ++
253.7069 ++/*
253.7070 ++Register Number
253.7071 ++      Register Name
253.7072 ++          Alternate Name
253.7073 ++                Purpose
253.7074 ++0     r0  zero  always zero
253.7075 ++1     r1  at    Assembler Temporary
253.7076 ++2-3   r2-r3     Return Location
253.7077 ++4-7   r4-r7     Register Arguments
253.7078 ++8-15  r8-r15    Caller Saved Registers
253.7079 ++16-22 r16-r22   Callee Saved Registers
253.7080 ++23    r23 sc    Static Chain (Callee Saved)
253.7081 ++                ??? Does $sc want to be caller or callee 
253.7082 ++                saved. If caller, 15, else 23. 
253.7083 ++24    r24       Exception Temporary
253.7084 ++25    r25       Breakpoint Temporary
253.7085 ++26    r26 gp    Global Pointer
253.7086 ++27    r27 sp    Stack Pointer
253.7087 ++28    r28 fp    Frame Pointer
253.7088 ++29    r29 ea    Exception Return Address
253.7089 ++30    r30 ba    Breakpoint Return Address
253.7090 ++31    r31 ra    Return Address
253.7091 ++
253.7092 ++32    ctl0 status
253.7093 ++33    ctl1 estatus STATUS saved by exception ? 	
253.7094 ++34    ctl2 bstatus STATUS saved by break ? 	
253.7095 ++35    ctl3 ipri    Interrupt Priority Mask ?	
253.7096 ++36    ctl4 ecause  Exception Cause ? 	
253.7097 ++
253.7098 ++37         pc   Not an actual register	
253.7099 ++
253.7100 ++38    rap      Return address pointer, this does not
253.7101 ++                   actually exist and will be eliminated
253.7102 ++
253.7103 ++39    fake_fp  Fake Frame Pointer which will always be eliminated.
253.7104 ++40    fake_ap  Fake Argument Pointer which will always be eliminated.
253.7105 ++
253.7106 ++41             First Pseudo Register
253.7107 ++
253.7108 ++
253.7109 ++The definitions for all the hard register numbers
253.7110 ++are located in nios2.md.
253.7111 ++*/
253.7112 ++
253.7113 ++#define FIRST_PSEUDO_REGISTER 41
253.7114 ++#define NUM_ARG_REGS (LAST_ARG_REGNO - FIRST_ARG_REGNO + 1)
253.7115 ++
253.7116 ++
253.7117 ++
253.7118 ++/* also see CONDITIONAL_REGISTER_USAGE */
253.7119 ++#define FIXED_REGISTERS			     \
253.7120 ++    {					     \
253.7121 ++/*        +0  1  2  3  4  5  6  7  8  9 */   \
253.7122 ++/*   0 */  1, 1, 0, 0, 0, 0, 0, 0, 0, 0,     \
253.7123 ++/*  10 */  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,     \
253.7124 ++/*  20 */  0, 0, 0, 0, 1, 1, 1, 1, 0, 1,     \
253.7125 ++/*  30 */  1, 0, 1, 1, 1, 1, 1, 1, 1, 1,     \
253.7126 ++/*  40 */  1,                                \
253.7127 ++    }
253.7128 ++
253.7129 ++/* call used is the same as caller saved
253.7130 ++   + fixed regs + args + ret vals */
253.7131 ++#define CALL_USED_REGISTERS		     \
253.7132 ++    { 					     \
253.7133 ++/*        +0  1  2  3  4  5  6  7  8  9 */   \
253.7134 ++/*   0 */  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     \
253.7135 ++/*  10 */  1, 1, 1, 1, 1, 1, 0, 0, 0, 0,     \
253.7136 ++/*  20 */  0, 0, 0, 0, 1, 1, 1, 1, 0, 1,     \
253.7137 ++/*  30 */  1, 0, 1, 1, 1, 1, 1, 1, 1, 1,     \
253.7138 ++/*  40 */  1,                                \
253.7139 ++    }
253.7140 ++
253.7141 ++#define HARD_REGNO_NREGS(REGNO, MODE)            \
253.7142 ++   ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1)  \
253.7143 ++    / UNITS_PER_WORD)
253.7144 ++
253.7145 ++/* --------------------------- *
253.7146 ++ * How Values Fit in Registers
253.7147 ++ * --------------------------- */
253.7148 ++
253.7149 ++#define HARD_REGNO_MODE_OK(REGNO, MODE) 1
253.7150 ++
253.7151 ++#define MODES_TIEABLE_P(MODE1, MODE2) 1
253.7152 ++
253.7153 ++
253.7154 ++/*************************
253.7155 ++ * Register Classes
253.7156 ++ *************************/
253.7157 ++
253.7158 ++enum reg_class
253.7159 ++{
253.7160 ++    NO_REGS,
253.7161 ++    ALL_REGS,
253.7162 ++    LIM_REG_CLASSES
253.7163 ++};
253.7164 ++
253.7165 ++#define N_REG_CLASSES (int) LIM_REG_CLASSES
253.7166 ++
253.7167 ++#define REG_CLASS_NAMES   \
253.7168 ++    {"NO_REGS",           \
253.7169 ++     "ALL_REGS"}
253.7170 ++
253.7171 ++#define GENERAL_REGS ALL_REGS
253.7172 ++
253.7173 ++#define REG_CLASS_CONTENTS   \
253.7174 ++/* NO_REGS  */       {{ 0, 0},     \
253.7175 ++/* ALL_REGS */        {~0,~0}}    \
253.7176 ++
253.7177 ++#define REGNO_REG_CLASS(REGNO) ALL_REGS
253.7178 ++
253.7179 ++#define BASE_REG_CLASS ALL_REGS
253.7180 ++#define INDEX_REG_CLASS ALL_REGS
253.7181 ++
253.7182 ++/* only one reg class, 'r', is handled automatically */
253.7183 ++#define REG_CLASS_FROM_LETTER(CHAR) NO_REGS
253.7184 ++
253.7185 ++#define REGNO_OK_FOR_BASE_P2(REGNO, STRICT) \
253.7186 ++    ((STRICT) \
253.7187 ++     ? (REGNO) < FIRST_PSEUDO_REGISTER \
253.7188 ++     : (REGNO) < FIRST_PSEUDO_REGISTER || (reg_renumber && reg_renumber[REGNO] < FIRST_PSEUDO_REGISTER))
253.7189 ++
253.7190 ++#define REGNO_OK_FOR_INDEX_P2(REGNO, STRICT) \
253.7191 ++    (REGNO_OK_FOR_BASE_P2 (REGNO, STRICT))
253.7192 ++
253.7193 ++#define REGNO_OK_FOR_BASE_P(REGNO) \
253.7194 ++    (REGNO_OK_FOR_BASE_P2 (REGNO, 1))
253.7195 ++
253.7196 ++#define REGNO_OK_FOR_INDEX_P(REGNO) \
253.7197 ++    (REGNO_OK_FOR_INDEX_P2 (REGNO, 1))
253.7198 ++
253.7199 ++#define REG_OK_FOR_BASE_P2(X, STRICT)                                   \
253.7200 ++    (STRICT                                                             \
253.7201 ++     ? REGNO_OK_FOR_BASE_P2 (REGNO (X), 1)                              \
253.7202 ++     : REGNO_OK_FOR_BASE_P2 (REGNO (X), 1) || REGNO(X) >= FIRST_PSEUDO_REGISTER)
253.7203 ++
253.7204 ++#define REG_OK_FOR_INDEX_P2(X, STRICT)                                  \
253.7205 ++    (STRICT                                                             \
253.7206 ++     ? REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1)                             \
253.7207 ++     : REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1) || REGNO(X) >= FIRST_PSEUDO_REGISTER)
253.7208 ++
253.7209 ++#define CLASS_MAX_NREGS(CLASS, MODE)             \
253.7210 ++   ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1)  \
253.7211 ++    / UNITS_PER_WORD)
253.7212 ++
253.7213 ++
253.7214 ++#define SMALL_INT(X) ((unsigned HOST_WIDE_INT) ((X) + 0x8000) < 0x10000)
253.7215 ++#define SMALL_INT_UNSIGNED(X) ((unsigned HOST_WIDE_INT) (X) < 0x10000)
253.7216 ++#define UPPER16_INT(X) (((X) & 0xffff) == 0)
253.7217 ++#define SHIFT_INT(X) ((X) >= 0 && (X) <= 31)
253.7218 ++#define RDWRCTL_INT(X) ((X) >= 0 && (X) <= 31)
253.7219 ++#define CUSTOM_INSN_OPCODE(X) ((X) >= 0 && (X) <= 255)
253.7220 ++
253.7221 ++#define CONST_OK_FOR_LETTER_P(VALUE, C)			\
253.7222 ++ (							\
253.7223 ++  (C) == 'I' ? SMALL_INT (VALUE) :			\
253.7224 ++  (C) == 'J' ? SMALL_INT_UNSIGNED (VALUE) :		\
253.7225 ++  (C) == 'K' ? UPPER16_INT (VALUE) :         		\
253.7226 ++  (C) == 'L' ? SHIFT_INT (VALUE) :			\
253.7227 ++  (C) == 'M' ? (VALUE) == 0 :				\
253.7228 ++  (C) == 'N' ? CUSTOM_INSN_OPCODE (VALUE) :		\
253.7229 ++  (C) == 'O' ? RDWRCTL_INT (VALUE) :			\
253.7230 ++  0)
253.7231 ++
253.7232 ++#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0
253.7233 ++
253.7234 ++#define PREFERRED_RELOAD_CLASS(X, CLASS) \
253.7235 ++    ((CLASS) == NO_REGS ? GENERAL_REGS : (CLASS))
253.7236 ++
253.7237 ++/* 'S' matches immediates which are in small data 
253.7238 ++   and therefore can be added to gp to create a 
253.7239 ++   32-bit value. */
253.7240 ++#define EXTRA_CONSTRAINT(VALUE, C)		\
253.7241 ++  ((C) == 'S' 					\
253.7242 ++   && (GET_CODE (VALUE) == SYMBOL_REF)   	\
253.7243 ++   && SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (VALUE))
253.7244 ++
253.7245 ++
253.7246 ++
253.7247 ++
253.7248 ++/* Say that the epilogue uses the return address register.  Note that
253.7249 ++   in the case of sibcalls, the values "used by the epilogue" are
253.7250 ++   considered live at the start of the called function.  */
253.7251 ++#define EPILOGUE_USES(REGNO) ((REGNO) == RA_REGNO)
253.7252 ++
253.7253 ++
253.7254 ++#define DEFAULT_MAIN_RETURN  c_expand_return (integer_zero_node)
253.7255 ++
253.7256 ++/**********************************
253.7257 ++ * Trampolines for Nested Functions
253.7258 ++ ***********************************/
253.7259 ++
253.7260 ++#define TRAMPOLINE_TEMPLATE(FILE) \
253.7261 ++    error ("trampolines not yet implemented")
253.7262 ++#define TRAMPOLINE_SIZE 20
253.7263 ++#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
253.7264 ++    error ("trampolines not yet implemented")
253.7265 ++
253.7266 ++/***************************
253.7267 ++ * Stack Layout and Calling Conventions
253.7268 ++ ***************************/
253.7269 ++
253.7270 ++/* ------------------ *
253.7271 ++ * Basic Stack Layout
253.7272 ++ * ------------------ */
253.7273 ++
253.7274 ++/* The downward variants are used by the compiler,
253.7275 ++   the upward ones serve as documentation */
253.7276 ++#define STACK_GROWS_DOWNWARD
253.7277 ++#define FRAME_GROWS_UPWARD
253.7278 ++#define ARGS_GROW_UPWARD
253.7279 ++
253.7280 ++#define STARTING_FRAME_OFFSET current_function_outgoing_args_size
253.7281 ++#define FIRST_PARM_OFFSET(FUNDECL) 0
253.7282 ++
253.7283 ++/* Before the prologue, RA lives in r31.  */
253.7284 ++#define INCOMING_RETURN_ADDR_RTX  gen_rtx_REG (VOIDmode, RA_REGNO)
253.7285 ++
253.7286 ++/* -------------------------------------- *
253.7287 ++ * Registers That Address the Stack Frame
253.7288 ++ * -------------------------------------- */
253.7289 ++
253.7290 ++#define STACK_POINTER_REGNUM SP_REGNO
253.7291 ++#define STATIC_CHAIN_REGNUM SC_REGNO
253.7292 ++#define PC_REGNUM PC_REGNO
253.7293 ++#define DWARF_FRAME_RETURN_COLUMN RA_REGNO
253.7294 ++
253.7295 ++/* Base register for access to local variables of the function.  We
253.7296 ++   pretend that the frame pointer is a non-existent hard register, and 
253.7297 ++   then eliminate it to HARD_FRAME_POINTER_REGNUM. */
253.7298 ++#define FRAME_POINTER_REGNUM FAKE_FP_REGNO
253.7299 ++
253.7300 ++#define HARD_FRAME_POINTER_REGNUM FP_REGNO
253.7301 ++#define RETURN_ADDRESS_POINTER_REGNUM RAP_REGNO
253.7302 ++/* the argumnet pointer needs to always be eliminated
253.7303 ++   so it is set to a fake hard register. */
253.7304 ++#define ARG_POINTER_REGNUM FAKE_AP_REGNO
253.7305 ++
253.7306 ++/* ----------------------------------------- *
253.7307 ++ * Eliminating Frame Pointer and Arg Pointer
253.7308 ++ * ----------------------------------------- */
253.7309 ++
253.7310 ++#define FRAME_POINTER_REQUIRED 0
253.7311 ++
253.7312 ++#define ELIMINABLE_REGS							\
253.7313 ++{{ ARG_POINTER_REGNUM,   STACK_POINTER_REGNUM},				\
253.7314 ++ { ARG_POINTER_REGNUM,   HARD_FRAME_POINTER_REGNUM},			\
253.7315 ++ { RETURN_ADDRESS_POINTER_REGNUM, STACK_POINTER_REGNUM},		\
253.7316 ++ { RETURN_ADDRESS_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM},		\
253.7317 ++ { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM},				\
253.7318 ++ { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}}
253.7319 ++
253.7320 ++#define CAN_ELIMINATE(FROM, TO)	1
253.7321 ++
253.7322 ++#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
253.7323 ++	(OFFSET) = nios2_initial_elimination_offset ((FROM), (TO))
253.7324 ++
253.7325 ++#define MUST_SAVE_REGISTER(regno) \
253.7326 ++ ((regs_ever_live[regno] && !call_used_regs[regno])			\
253.7327 ++  || (regno == HARD_FRAME_POINTER_REGNUM && frame_pointer_needed)	\
253.7328 ++  || (regno == RA_REGNO && regs_ever_live[RA_REGNO]))
253.7329 ++
253.7330 ++/* Treat LOC as a byte offset from the stack pointer and round it up
253.7331 ++   to the next fully-aligned offset.  */
253.7332 ++#define STACK_ALIGN(LOC)						\
253.7333 ++  (((LOC) + ((PREFERRED_STACK_BOUNDARY / 8) - 1)) & ~((PREFERRED_STACK_BOUNDARY / 8) - 1))
253.7334 ++
253.7335 ++
253.7336 ++/* ------------------------------ *
253.7337 ++ * Passing Arguments in Registers
253.7338 ++ * ------------------------------ */
253.7339 ++
253.7340 ++/* see nios2.c */
253.7341 ++#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
253.7342 ++  (function_arg (&CUM, MODE, TYPE, NAMED))
253.7343 ++
253.7344 ++#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
253.7345 ++  (function_arg_partial_nregs (&CUM, MODE, TYPE, NAMED))
253.7346 ++
253.7347 ++#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) 0
253.7348 ++
253.7349 ++#define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) 0
253.7350 ++
253.7351 ++typedef struct nios2_args
253.7352 ++{
253.7353 ++    int regs_used;
253.7354 ++} CUMULATIVE_ARGS;
253.7355 ++
253.7356 ++/* This is to initialize the above unused CUM data type */
253.7357 ++#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
253.7358 ++    (init_cumulative_args (&CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS))
253.7359 ++
253.7360 ++#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
253.7361 ++    (function_arg_advance (&CUM, MODE, TYPE, NAMED))
253.7362 ++
253.7363 ++#define FUNCTION_ARG_REGNO_P(REGNO) \
253.7364 ++    ((REGNO) >= FIRST_ARG_REGNO && (REGNO) <= LAST_ARG_REGNO)
253.7365 ++
253.7366 ++#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL)   \
253.7367 ++  {								    \
253.7368 ++    int pret_size = nios2_setup_incoming_varargs (&(CUM), (MODE),	    \
253.7369 ++						(TYPE), (NO_RTL));  \
253.7370 ++    if (pret_size)						    \
253.7371 ++      (PRETEND_SIZE) = pret_size;				    \
253.7372 ++  }
253.7373 ++
253.7374 ++/* ----------------------------- *
253.7375 ++ * Generating Code for Profiling
253.7376 ++ * ----------------------------- */
253.7377 ++
253.7378 ++#define PROFILE_BEFORE_PROLOGUE
253.7379 ++
253.7380 ++#define FUNCTION_PROFILER(FILE, LABELNO) \
253.7381 ++  function_profiler ((FILE), (LABELNO))
253.7382 ++
253.7383 ++/* --------------------------------------- *
253.7384 ++ * Passing Function Arguments on the Stack
253.7385 ++ * --------------------------------------- */
253.7386 ++
253.7387 ++#define PROMOTE_PROTOTYPES 1
253.7388 ++
253.7389 ++#define PUSH_ARGS 0
253.7390 ++#define ACCUMULATE_OUTGOING_ARGS 1
253.7391 ++
253.7392 ++#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACKSIZE) 0
253.7393 ++
253.7394 ++/* --------------------------------------- *
253.7395 ++ * How Scalar Function Values Are Returned
253.7396 ++ * --------------------------------------- */
253.7397 ++
253.7398 ++#define FUNCTION_VALUE(VALTYPE, FUNC) \
253.7399 ++    gen_rtx(REG, TYPE_MODE(VALTYPE), FIRST_RETVAL_REGNO)
253.7400 ++
253.7401 ++#define LIBCALL_VALUE(MODE) \
253.7402 ++    gen_rtx(REG, MODE, FIRST_RETVAL_REGNO)
253.7403 ++
253.7404 ++#define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == FIRST_RETVAL_REGNO)
253.7405 ++
253.7406 ++/* ----------------------------- *
253.7407 ++ * How Large Values Are Returned
253.7408 ++ * ----------------------------- */
253.7409 ++
253.7410 ++
253.7411 ++#define RETURN_IN_MEMORY(TYPE)	\
253.7412 ++  nios2_return_in_memory (TYPE)
253.7413 ++
253.7414 ++
253.7415 ++#define STRUCT_VALUE 0
253.7416 ++
253.7417 ++#define DEFAULT_PCC_STRUCT_RETURN 0
253.7418 ++
253.7419 ++/*******************
253.7420 ++ * Addressing Modes
253.7421 ++ *******************/
253.7422 ++
253.7423 ++
253.7424 ++#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
253.7425 ++
253.7426 ++#define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X))
253.7427 ++
253.7428 ++#define MAX_REGS_PER_ADDRESS 1
253.7429 ++
253.7430 ++/* Go to ADDR if X is a valid address.  */
253.7431 ++#ifndef REG_OK_STRICT
253.7432 ++#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)        \
253.7433 ++    {                                                  \
253.7434 ++        if (nios2_legitimate_address ((X), (MODE), 0))  \
253.7435 ++            goto ADDR;                                 \
253.7436 ++    }
253.7437 ++#else
253.7438 ++#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)        \
253.7439 ++    {                                                  \
253.7440 ++        if (nios2_legitimate_address ((X), (MODE), 1))  \
253.7441 ++            goto ADDR;                                 \
253.7442 ++    }
253.7443 ++#endif
253.7444 ++
253.7445 ++#ifndef REG_OK_STRICT
253.7446 ++#define REG_OK_FOR_BASE_P(X)   REGNO_OK_FOR_BASE_P2 (REGNO (X), 0)
253.7447 ++#define REG_OK_FOR_INDEX_P(X)  REGNO_OK_FOR_INDEX_P2 (REGNO (X), 0)
253.7448 ++#else
253.7449 ++#define REG_OK_FOR_BASE_P(X)   REGNO_OK_FOR_BASE_P2 (REGNO (X), 1)
253.7450 ++#define REG_OK_FOR_INDEX_P(X)  REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1)
253.7451 ++#endif
253.7452 ++
253.7453 ++#define LEGITIMATE_CONSTANT_P(X) 1
253.7454 ++
253.7455 ++/* Nios II has no mode dependent addresses.  */
253.7456 ++#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
253.7457 ++
253.7458 ++/* Set if this has a weak declaration  */
253.7459 ++#define SYMBOL_FLAG_WEAK_DECL	(1 << SYMBOL_FLAG_MACH_DEP_SHIFT)
253.7460 ++#define SYMBOL_REF_WEAK_DECL_P(RTX) \
253.7461 ++  ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_WEAK_DECL) != 0)
253.7462 ++
253.7463 ++
253.7464 ++/* true if a symbol is both small and not weak. In this case, gp
253.7465 ++   relative access can be used */
253.7466 ++#define SYMBOL_REF_IN_NIOS2_SMALL_DATA_P(RTX) \
253.7467 ++   (SYMBOL_REF_SMALL_P(RTX) && !SYMBOL_REF_WEAK_DECL_P(RTX))
253.7468 ++
253.7469 ++/*****************
253.7470 ++ * Describing Relative Costs of Operations
253.7471 ++ *****************/
253.7472 ++
253.7473 ++#define SLOW_BYTE_ACCESS 1
253.7474 ++
253.7475 ++/* It is as good to call a constant function address as to call an address
253.7476 ++   kept in a register.
253.7477 ++   ??? Not true anymore really. Now that call cannot address full range
253.7478 ++   of memory callr may need to be used */
253.7479 ++
253.7480 ++#define NO_FUNCTION_CSE
253.7481 ++#define NO_RECURSIVE_FUNCTION_CSE
253.7482 ++
253.7483 ++
253.7484 ++
253.7485 ++/*****************************************
253.7486 ++ * Defining the Output Assembler Language
253.7487 ++ *****************************************/
253.7488 ++
253.7489 ++/* ------------------------------------------ *
253.7490 ++ * The Overall Framework of an Assembler File
253.7491 ++ * ------------------------------------------ */
253.7492 ++
253.7493 ++#define ASM_APP_ON "#APP\n"
253.7494 ++#define ASM_APP_OFF "#NO_APP\n"
253.7495 ++
253.7496 ++#define ASM_COMMENT_START "# "
253.7497 ++
253.7498 ++/* ------------------------------- *
253.7499 ++ * Output and Generation of Labels
253.7500 ++ * ------------------------------- */
253.7501 ++
253.7502 ++#define GLOBAL_ASM_OP "\t.global\t"
253.7503 ++
253.7504 ++
253.7505 ++/* -------------- *
253.7506 ++ * Output of Data
253.7507 ++ * -------------- */
253.7508 ++
253.7509 ++#define DWARF2_UNWIND_INFO 0
253.7510 ++
253.7511 ++
253.7512 ++/* -------------------------------- *
253.7513 ++ * Assembler Commands for Alignment
253.7514 ++ * -------------------------------- */
253.7515 ++
253.7516 ++#define ASM_OUTPUT_ALIGN(FILE, LOG) \
253.7517 ++  do { \
253.7518 ++    fprintf ((FILE), "%s%d\n", ALIGN_ASM_OP, (LOG)); \
253.7519 ++  } while (0)
253.7520 ++
253.7521 ++
253.7522 ++/* -------------------------------- *
253.7523 ++ * Output of Assembler Instructions
253.7524 ++ * -------------------------------- */
253.7525 ++
253.7526 ++#define REGISTER_NAMES \
253.7527 ++{ \
253.7528 ++    "zero", \
253.7529 ++    "at", \
253.7530 ++    "r2", \
253.7531 ++    "r3", \
253.7532 ++    "r4", \
253.7533 ++    "r5", \
253.7534 ++    "r6", \
253.7535 ++    "r7", \
253.7536 ++    "r8", \
253.7537 ++    "r9", \
253.7538 ++    "r10", \
253.7539 ++    "r11", \
253.7540 ++    "r12", \
253.7541 ++    "r13", \
253.7542 ++    "r14", \
253.7543 ++    "r15", \
253.7544 ++    "r16", \
253.7545 ++    "r17", \
253.7546 ++    "r18", \
253.7547 ++    "r19", \
253.7548 ++    "r20", \
253.7549 ++    "r21", \
253.7550 ++    "r22", \
253.7551 ++    "r23", \
253.7552 ++    "r24", \
253.7553 ++    "r25", \
253.7554 ++    "gp", \
253.7555 ++    "sp", \
253.7556 ++    "fp", \
253.7557 ++    "ta", \
253.7558 ++    "ba", \
253.7559 ++    "ra", \
253.7560 ++    "status", \
253.7561 ++    "estatus", \
253.7562 ++    "bstatus", \
253.7563 ++    "ipri", \
253.7564 ++    "ecause", \
253.7565 ++    "pc", \
253.7566 ++    "rap", \
253.7567 ++    "fake_fp", \
253.7568 ++    "fake_ap", \
253.7569 ++}
253.7570 ++
253.7571 ++#define ASM_OUTPUT_OPCODE(STREAM, PTR)\
253.7572 ++   (PTR) = asm_output_opcode (STREAM, PTR)
253.7573 ++
253.7574 ++#define PRINT_OPERAND(STREAM, X, CODE) \
253.7575 ++    nios2_print_operand (STREAM, X, CODE)
253.7576 ++
253.7577 ++#define PRINT_OPERAND_ADDRESS(STREAM, X) \
253.7578 ++    nios2_print_operand_address (STREAM, X)
253.7579 ++
253.7580 ++#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \
253.7581 ++do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
253.7582 ++     fprintf (FILE, ".L%u\n", (unsigned) (VALUE));               \
253.7583 ++   } while (0)
253.7584 ++
253.7585 ++
253.7586 ++/* ------------ *
253.7587 ++ * Label Output
253.7588 ++ * ------------ */
253.7589 ++
253.7590 ++
253.7591 ++/* ---------------------------------------------------- *
253.7592 ++ * Dividing the Output into Sections (Texts, Data, ...)
253.7593 ++ * ---------------------------------------------------- */
253.7594 ++
253.7595 ++/* Output before read-only data.  */
253.7596 ++#define TEXT_SECTION_ASM_OP ("\t.section\t.text")
253.7597 ++
253.7598 ++/* Output before writable data.  */
253.7599 ++#define DATA_SECTION_ASM_OP ("\t.section\t.data")
253.7600 ++
253.7601 ++
253.7602 ++/* Default the definition of "small data" to 8 bytes. */
253.7603 ++/* ??? How come I can't use HOST_WIDE_INT here? */
253.7604 ++extern unsigned long nios2_section_threshold;
253.7605 ++#define NIOS2_DEFAULT_GVALUE 8
253.7606 ++
253.7607 ++
253.7608 ++
253.7609 ++/* This says how to output assembler code to declare an
253.7610 ++   uninitialized external linkage data object.  Under SVR4,
253.7611 ++   the linker seems to want the alignment of data objects
253.7612 ++   to depend on their types.  We do exactly that here.  */
253.7613 ++
253.7614 ++#undef COMMON_ASM_OP
253.7615 ++#define COMMON_ASM_OP	"\t.comm\t"
253.7616 ++
253.7617 ++#undef  ASM_OUTPUT_ALIGNED_COMMON
253.7618 ++#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)		\
253.7619 ++do 									\
253.7620 ++{									\
253.7621 ++  if ((SIZE) <= nios2_section_threshold)				\
253.7622 ++    {									\
253.7623 ++      named_section (0, ".sbss", 0);					\
253.7624 ++      (*targetm.asm_out.globalize_label) (FILE, NAME);			\
253.7625 ++      ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");			\
253.7626 ++      if (!flag_inhibit_size_directive)					\
253.7627 ++	ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE);			\
253.7628 ++      ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT));	\
253.7629 ++      ASM_OUTPUT_LABEL(FILE, NAME);					\
253.7630 ++      ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1);			\
253.7631 ++    }									\
253.7632 ++  else									\
253.7633 ++    {									\
253.7634 ++      fprintf ((FILE), "%s", COMMON_ASM_OP);				\
253.7635 ++      assemble_name ((FILE), (NAME));					\
253.7636 ++      fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT);	\
253.7637 ++    }									\
253.7638 ++}									\
253.7639 ++while (0)
253.7640 ++
253.7641 ++
253.7642 ++/* This says how to output assembler code to declare an
253.7643 ++   uninitialized internal linkage data object.  Under SVR4,
253.7644 ++   the linker seems to want the alignment of data objects
253.7645 ++   to depend on their types.  We do exactly that here.  */
253.7646 ++
253.7647 ++#undef  ASM_OUTPUT_ALIGNED_LOCAL
253.7648 ++#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)		\
253.7649 ++do {									\
253.7650 ++  if ((SIZE) <= nios2_section_threshold)				\
253.7651 ++    named_section (0, ".sbss", 0);					\
253.7652 ++  else									\
253.7653 ++    named_section (0, ".bss", 0);					\
253.7654 ++  ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");			\
253.7655 ++  if (!flag_inhibit_size_directive)					\
253.7656 ++    ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE);			\
253.7657 ++  ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT));	\
253.7658 ++  ASM_OUTPUT_LABEL(FILE, NAME);						\
253.7659 ++  ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1);				\
253.7660 ++} while (0)
253.7661 ++
253.7662 ++
253.7663 ++
253.7664 ++/***************************
253.7665 ++ * Miscellaneous Parameters
253.7666 ++ ***************************/
253.7667 ++
253.7668 ++#define MOVE_MAX 4
253.7669 ++
253.7670 ++#define Pmode SImode
253.7671 ++#define FUNCTION_MODE QImode
253.7672 ++
253.7673 ++#define CASE_VECTOR_MODE Pmode
253.7674 ++
253.7675 ++#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
253.7676 ++
253.7677 ++#define LOAD_EXTEND_OP(MODE) (ZERO_EXTEND)
253.7678 ++
253.7679 ++#define WORD_REGISTER_OPERATIONS
253.7680 +--- gcc-3.4.3/gcc/config/nios2/nios2.md
253.7681 ++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.md
253.7682 +@@ -0,0 +1,2078 @@
253.7683 ++;; Machine Description for Altera NIOS 2G NIOS2 version.
253.7684 ++;;    Copyright (C) 2003 Altera 
253.7685 ++;;    Contributed by Jonah Graham (jgraham@altera.com).
253.7686 ++;; 
253.7687 ++;; This file is part of GNU CC.
253.7688 ++;; 
253.7689 ++;; GNU CC is free software; you can redistribute it and/or modify
253.7690 ++;; it under the terms of the GNU General Public License as published by
253.7691 ++;; the Free Software Foundation; either version 2, or (at your option)
253.7692 ++;; any later version.
253.7693 ++;; 
253.7694 ++;; GNU CC is distributed in the hope that it will be useful,
253.7695 ++;; but WITHOUT ANY WARRANTY; without even the implied warranty of
253.7696 ++;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
253.7697 ++;; GNU General Public License for more details.
253.7698 ++;; 
253.7699 ++;; You should have received a copy of the GNU General Public License
253.7700 ++;; along with GNU CC; see the file COPYING.  If not, write to
253.7701 ++;; the Free Software Foundation, 59 Temple Place - Suite 330,
253.7702 ++;; Boston, MA 02111-1307, USA.  */
253.7703 ++
253.7704 ++
253.7705 ++
253.7706 ++;*****************************************************************************
253.7707 ++;*
253.7708 ++;* constants
253.7709 ++;*
253.7710 ++;*****************************************************************************
253.7711 ++(define_constants [
253.7712 ++  (GP_REGNO 26)
253.7713 ++  (SP_REGNO 27)
253.7714 ++  (FP_REGNO 28)
253.7715 ++  (RA_REGNO 31)
253.7716 ++  (RAP_REGNO 38)
253.7717 ++  (FIRST_RETVAL_REGNO 2)
253.7718 ++  (LAST_RETVAL_REGNO 3)
253.7719 ++  (FIRST_ARG_REGNO 4)
253.7720 ++  (LAST_ARG_REGNO 7)
253.7721 ++  (SC_REGNO 23)
253.7722 ++  (PC_REGNO 37)
253.7723 ++  (FAKE_FP_REGNO 39)
253.7724 ++  (FAKE_AP_REGNO 40)
253.7725 ++
253.7726 ++
253.7727 ++  (UNSPEC_BLOCKAGE 0)
253.7728 ++  (UNSPEC_LDBIO 1)
253.7729 ++  (UNSPEC_LDBUIO 2)
253.7730 ++  (UNSPEC_LDHIO 3)
253.7731 ++  (UNSPEC_LDHUIO 4)
253.7732 ++  (UNSPEC_LDWIO 5)
253.7733 ++  (UNSPEC_STBIO 6)
253.7734 ++  (UNSPEC_STHIO 7)
253.7735 ++  (UNSPEC_STWIO 8)
253.7736 ++  (UNSPEC_SYNC 9)
253.7737 ++  (UNSPEC_WRCTL 10)
253.7738 ++  (UNSPEC_RDCTL 11)
253.7739 ++  
253.7740 ++])
253.7741 ++
253.7742 ++
253.7743 ++
253.7744 ++;*****************************************************************************
253.7745 ++;*
253.7746 ++;* instruction scheduler
253.7747 ++;*
253.7748 ++;*****************************************************************************
253.7749 ++
253.7750 ++; No schedule info is currently available, using an assumption that no
253.7751 ++; instruction can use the results of the previous instruction without
253.7752 ++; incuring a stall.
253.7753 ++
253.7754 ++; length of an instruction (in bytes)
253.7755 ++(define_attr "length" "" (const_int 4))
253.7756 ++(define_attr "type" "unknown,complex,control,alu,cond_alu,st,ld,shift,mul,div,custom" (const_string "complex"))
253.7757 ++
253.7758 ++(define_asm_attributes
253.7759 ++ [(set_attr "length" "4")
253.7760 ++  (set_attr "type" "complex")])
253.7761 ++
253.7762 ++(define_automaton "nios2")
253.7763 ++(automata_option "v")
253.7764 ++;(automata_option "no-minimization")
253.7765 ++(automata_option "ndfa")
253.7766 ++
253.7767 ++; The nios2 pipeline is fairly straightforward for the fast model.
253.7768 ++; Every alu operation is pipelined so that an instruction can
253.7769 ++; be issued every cycle. However, there are still potential
253.7770 ++; stalls which this description tries to deal with.
253.7771 ++
253.7772 ++(define_cpu_unit "cpu" "nios2")
253.7773 ++
253.7774 ++(define_insn_reservation "complex" 1
253.7775 ++  (eq_attr "type" "complex")
253.7776 ++  "cpu")
253.7777 ++
253.7778 ++(define_insn_reservation "control" 1
253.7779 ++  (eq_attr "type" "control")
253.7780 ++  "cpu")
253.7781 ++
253.7782 ++(define_insn_reservation "alu" 1
253.7783 ++  (eq_attr "type" "alu")
253.7784 ++  "cpu")
253.7785 ++
253.7786 ++(define_insn_reservation "cond_alu" 1
253.7787 ++  (eq_attr "type" "cond_alu")
253.7788 ++  "cpu")
253.7789 ++
253.7790 ++(define_insn_reservation "st" 1
253.7791 ++  (eq_attr "type" "st")
253.7792 ++  "cpu")
253.7793 ++  
253.7794 ++(define_insn_reservation "custom" 1
253.7795 ++  (eq_attr "type" "custom")
253.7796 ++  "cpu")
253.7797 ++
253.7798 ++; shifts, muls and lds have three cycle latency
253.7799 ++(define_insn_reservation "ld" 3
253.7800 ++  (eq_attr "type" "ld")
253.7801 ++  "cpu")
253.7802 ++
253.7803 ++(define_insn_reservation "shift" 3
253.7804 ++  (eq_attr "type" "shift")
253.7805 ++  "cpu")
253.7806 ++
253.7807 ++(define_insn_reservation "mul" 3
253.7808 ++  (eq_attr "type" "mul")
253.7809 ++  "cpu")
253.7810 ++
253.7811 ++(define_insn_reservation "div" 1
253.7812 ++  (eq_attr "type" "div")
253.7813 ++  "cpu")
253.7814 ++
253.7815 ++
253.7816 ++;*****************************************************************************
253.7817 ++;*
253.7818 ++;* MOV Instructions
253.7819 ++;*
253.7820 ++;*****************************************************************************
253.7821 ++
253.7822 ++(define_expand "movqi"
253.7823 ++  [(set (match_operand:QI 0 "nonimmediate_operand" "")
253.7824 ++        (match_operand:QI 1 "general_operand" ""))]
253.7825 ++  ""
253.7826 ++{
253.7827 ++  if (nios2_emit_move_sequence (operands, QImode))
253.7828 ++    DONE;
253.7829 ++})
253.7830 ++
253.7831 ++(define_insn "movqi_internal"
253.7832 ++  [(set (match_operand:QI 0 "nonimmediate_operand" "=m, r,r, r")
253.7833 ++        (match_operand:QI 1 "general_operand"       "rM,m,rM,I"))]
253.7834 ++  "(register_operand (operands[0], QImode)
253.7835 ++    || register_operand (operands[1], QImode)
253.7836 ++    || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
253.7837 ++  "@
253.7838 ++    stb%o0\\t%z1, %0
253.7839 ++    ldbu%o1\\t%0, %1
253.7840 ++    mov\\t%0, %z1
253.7841 ++    movi\\t%0, %1"
253.7842 ++  [(set_attr "type" "st,ld,alu,alu")])
253.7843 ++
253.7844 ++(define_insn "ldbio"
253.7845 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.7846 ++	(unspec_volatile:SI [(const_int 0)] UNSPEC_LDBIO))
253.7847 ++   (use (match_operand:SI 1 "memory_operand" "m"))]
253.7848 ++  ""
253.7849 ++  "ldbio\\t%0, %1"
253.7850 ++  [(set_attr "type" "ld")])
253.7851 ++
253.7852 ++(define_insn "ldbuio"
253.7853 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.7854 ++	(unspec_volatile:SI [(const_int 0)] UNSPEC_LDBUIO))
253.7855 ++   (use (match_operand:SI 1 "memory_operand" "m"))]
253.7856 ++  ""
253.7857 ++  "ldbuio\\t%0, %1"
253.7858 ++  [(set_attr "type" "ld")])
253.7859 ++
253.7860 ++(define_insn "stbio"
253.7861 ++  [(set (match_operand:SI 0 "memory_operand" "=m")
253.7862 ++	(match_operand:SI 1 "register_operand"   "r"))
253.7863 ++   (unspec_volatile:SI [(const_int 0)] UNSPEC_STBIO)]
253.7864 ++  ""
253.7865 ++  "stbio\\t%z1, %0"
253.7866 ++  [(set_attr "type" "st")])
253.7867 ++
253.7868 ++
253.7869 ++(define_expand "movhi"
253.7870 ++  [(set (match_operand:HI 0 "nonimmediate_operand" "")
253.7871 ++        (match_operand:HI 1 "general_operand" ""))]
253.7872 ++  ""
253.7873 ++{
253.7874 ++  if (nios2_emit_move_sequence (operands, HImode))
253.7875 ++    DONE;
253.7876 ++})
253.7877 ++
253.7878 ++(define_insn "movhi_internal"
253.7879 ++  [(set (match_operand:HI 0 "nonimmediate_operand" "=m, r,r, r,r")
253.7880 ++        (match_operand:HI 1 "general_operand"       "rM,m,rM,I,J"))]
253.7881 ++  "(register_operand (operands[0], HImode)
253.7882 ++    || register_operand (operands[1], HImode)
253.7883 ++    || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
253.7884 ++  "@
253.7885 ++    sth%o0\\t%z1, %0
253.7886 ++    ldhu%o1\\t%0, %1
253.7887 ++    mov\\t%0, %z1
253.7888 ++    movi\\t%0, %1
253.7889 ++    movui\\t%0, %1"
253.7890 ++  [(set_attr "type" "st,ld,alu,alu,alu")])
253.7891 ++
253.7892 ++(define_insn "ldhio"
253.7893 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.7894 ++	(unspec_volatile:SI [(const_int 0)] UNSPEC_LDHIO))
253.7895 ++   (use (match_operand:SI 1 "memory_operand" "m"))]
253.7896 ++  ""
253.7897 ++  "ldhio\\t%0, %1"
253.7898 ++  [(set_attr "type" "ld")])
253.7899 ++
253.7900 ++(define_insn "ldhuio"
253.7901 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.7902 ++	(unspec_volatile:SI [(const_int 0)] UNSPEC_LDHUIO))
253.7903 ++   (use (match_operand:SI 1 "memory_operand" "m"))]
253.7904 ++  ""
253.7905 ++  "ldhuio\\t%0, %1"
253.7906 ++  [(set_attr "type" "ld")])
253.7907 ++
253.7908 ++(define_insn "sthio"
253.7909 ++  [(set (match_operand:SI 0 "memory_operand" "=m")
253.7910 ++	(match_operand:SI 1 "register_operand"   "r"))
253.7911 ++   (unspec_volatile:SI [(const_int 0)] UNSPEC_STHIO)]
253.7912 ++  ""
253.7913 ++  "sthio\\t%z1, %0"
253.7914 ++  [(set_attr "type" "st")])
253.7915 ++
253.7916 ++(define_expand "movsi"
253.7917 ++  [(set (match_operand:SI 0 "nonimmediate_operand" "")
253.7918 ++        (match_operand:SI 1 "general_operand" ""))]
253.7919 ++  ""
253.7920 ++{
253.7921 ++  if (nios2_emit_move_sequence (operands, SImode))
253.7922 ++    DONE;
253.7923 ++})
253.7924 ++
253.7925 ++(define_insn "movsi_internal"
253.7926 ++  [(set (match_operand:SI 0 "nonimmediate_operand" "=m, r,r, r,r,r,r")
253.7927 ++        (match_operand:SI 1 "general_operand"       "rM,m,rM,I,J,S,i"))]
253.7928 ++  "(register_operand (operands[0], SImode)
253.7929 ++    || register_operand (operands[1], SImode)
253.7930 ++    || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
253.7931 ++  "@
253.7932 ++    stw%o0\\t%z1, %0
253.7933 ++    ldw%o1\\t%0, %1
253.7934 ++    mov\\t%0, %z1
253.7935 ++    movi\\t%0, %1
253.7936 ++    movui\\t%0, %1
253.7937 ++    addi\\t%0, gp, %%gprel(%1)
253.7938 ++    movhi\\t%0, %H1\;addi\\t%0, %0, %L1"
253.7939 ++  [(set_attr "type" "st,ld,alu,alu,alu,alu,alu")])
253.7940 ++
253.7941 ++(define_insn "ldwio"
253.7942 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.7943 ++	(unspec_volatile:SI [(const_int 0)] UNSPEC_LDWIO))
253.7944 ++   (use (match_operand:SI 1 "memory_operand" "m"))]
253.7945 ++  ""
253.7946 ++  "ldwio\\t%0, %1"
253.7947 ++  [(set_attr "type" "ld")])
253.7948 ++
253.7949 ++(define_insn "stwio"
253.7950 ++  [(set (match_operand:SI 0 "memory_operand" "=m")
253.7951 ++	(match_operand:SI 1 "register_operand"   "r"))
253.7952 ++   (unspec_volatile:SI [(const_int 0)] UNSPEC_STWIO)]
253.7953 ++  ""
253.7954 ++  "stwio\\t%z1, %0"
253.7955 ++  [(set_attr "type" "st")])
253.7956 ++
253.7957 ++
253.7958 ++
253.7959 ++;*****************************************************************************
253.7960 ++;*
253.7961 ++;* zero extension
253.7962 ++;*
253.7963 ++;*****************************************************************************
253.7964 ++
253.7965 ++
253.7966 ++(define_insn "zero_extendhisi2"
253.7967 ++  [(set (match_operand:SI 0 "register_operand" "=r,r")
253.7968 ++	(zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
253.7969 ++  ""
253.7970 ++  "@
253.7971 ++    andi\\t%0, %1, 0xffff
253.7972 ++    ldhu%o1\\t%0, %1"
253.7973 ++  [(set_attr "type"	"alu,ld")])
253.7974 ++
253.7975 ++(define_insn "zero_extendqihi2"
253.7976 ++  [(set (match_operand:HI 0 "register_operand" "=r,r")
253.7977 ++	(zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
253.7978 ++  ""
253.7979 ++  "@
253.7980 ++    andi\\t%0, %1, 0xff
253.7981 ++    ldbu%o1\\t%0, %1"
253.7982 ++  [(set_attr "type"	"alu,ld")])
253.7983 ++
253.7984 ++(define_insn "zero_extendqisi2"
253.7985 ++  [(set (match_operand:SI 0 "register_operand" "=r,r")
253.7986 ++	(zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
253.7987 ++  ""
253.7988 ++  "@
253.7989 ++    andi\\t%0, %1, 0xff
253.7990 ++    ldbu%o1\\t%0, %1"
253.7991 ++  [(set_attr "type"	"alu,ld")])
253.7992 ++
253.7993 ++
253.7994 ++
253.7995 ++;*****************************************************************************
253.7996 ++;*
253.7997 ++;* sign extension
253.7998 ++;*
253.7999 ++;*****************************************************************************
253.8000 ++
253.8001 ++(define_expand "extendhisi2"
253.8002 ++  [(set (match_operand:SI 0 "register_operand" "")
253.8003 ++	(sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
253.8004 ++  ""
253.8005 ++{
253.8006 ++  if (optimize && GET_CODE (operands[1]) == MEM)
253.8007 ++    operands[1] = force_not_mem (operands[1]);
253.8008 ++
253.8009 ++  if (GET_CODE (operands[1]) != MEM)
253.8010 ++    {
253.8011 ++      rtx op1   = gen_lowpart (SImode, operands[1]);
253.8012 ++      rtx temp  = gen_reg_rtx (SImode);
253.8013 ++      rtx shift = GEN_INT (16);
253.8014 ++
253.8015 ++      emit_insn (gen_ashlsi3 (temp, op1, shift));
253.8016 ++      emit_insn (gen_ashrsi3 (operands[0], temp, shift));
253.8017 ++      DONE;
253.8018 ++    }
253.8019 ++})
253.8020 ++
253.8021 ++(define_insn "extendhisi2_internal"
253.8022 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.8023 ++	(sign_extend:SI (match_operand:HI 1 "memory_operand" "m")))]
253.8024 ++  ""
253.8025 ++  "ldh%o1\\t%0, %1"
253.8026 ++  [(set_attr "type"	"ld")])
253.8027 ++
253.8028 ++(define_expand "extendqihi2"
253.8029 ++  [(set (match_operand:HI 0 "register_operand" "")
253.8030 ++	(sign_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))]
253.8031 ++  ""
253.8032 ++{
253.8033 ++  if (optimize && GET_CODE (operands[1]) == MEM)
253.8034 ++    operands[1] = force_not_mem (operands[1]);
253.8035 ++
253.8036 ++  if (GET_CODE (operands[1]) != MEM)
253.8037 ++    {
253.8038 ++      rtx op0   = gen_lowpart (SImode, operands[0]);
253.8039 ++      rtx op1   = gen_lowpart (SImode, operands[1]);
253.8040 ++      rtx temp  = gen_reg_rtx (SImode);
253.8041 ++      rtx shift = GEN_INT (24);
253.8042 ++
253.8043 ++      emit_insn (gen_ashlsi3 (temp, op1, shift));
253.8044 ++      emit_insn (gen_ashrsi3 (op0, temp, shift));
253.8045 ++      DONE;
253.8046 ++    }
253.8047 ++})
253.8048 ++
253.8049 ++(define_insn "extendqihi2_internal"
253.8050 ++  [(set (match_operand:HI 0 "register_operand" "=r")
253.8051 ++	(sign_extend:HI (match_operand:QI 1 "memory_operand" "m")))]
253.8052 ++  ""
253.8053 ++  "ldb%o1\\t%0, %1"
253.8054 ++  [(set_attr "type"	"ld")])
253.8055 ++
253.8056 ++
253.8057 ++(define_expand "extendqisi2"
253.8058 ++  [(set (match_operand:SI 0 "register_operand" "")
253.8059 ++	(sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))]
253.8060 ++  ""
253.8061 ++{
253.8062 ++  if (optimize && GET_CODE (operands[1]) == MEM)
253.8063 ++    operands[1] = force_not_mem (operands[1]);
253.8064 ++
253.8065 ++  if (GET_CODE (operands[1]) != MEM)
253.8066 ++    {
253.8067 ++      rtx op1   = gen_lowpart (SImode, operands[1]);
253.8068 ++      rtx temp  = gen_reg_rtx (SImode);
253.8069 ++      rtx shift = GEN_INT (24);
253.8070 ++
253.8071 ++      emit_insn (gen_ashlsi3 (temp, op1, shift));
253.8072 ++      emit_insn (gen_ashrsi3 (operands[0], temp, shift));
253.8073 ++      DONE;
253.8074 ++    }
253.8075 ++})
253.8076 ++
253.8077 ++(define_insn "extendqisi2_insn"
253.8078 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.8079 ++	(sign_extend:SI (match_operand:QI 1 "memory_operand" "m")))]
253.8080 ++  ""
253.8081 ++  "ldb%o1\\t%0, %1"
253.8082 ++  [(set_attr "type"	"ld")])
253.8083 ++
253.8084 ++
253.8085 ++
253.8086 ++;*****************************************************************************
253.8087 ++;*
253.8088 ++;* Arithmetic Operations
253.8089 ++;*
253.8090 ++;*****************************************************************************
253.8091 ++
253.8092 ++(define_insn "addsi3"
253.8093 ++  [(set (match_operand:SI 0 "register_operand"          "=r,r")
253.8094 ++        (plus:SI (match_operand:SI 1 "register_operand" "%r,r")
253.8095 ++                 (match_operand:SI 2 "arith_operand"     "r,I")))]
253.8096 ++  ""
253.8097 ++  "add%i2\\t%0, %1, %z2"
253.8098 ++  [(set_attr "type" "alu")])
253.8099 ++
253.8100 ++(define_insn "subsi3"
253.8101 ++  [(set (match_operand:SI 0 "register_operand"           "=r")
253.8102 ++        (minus:SI (match_operand:SI 1 "reg_or_0_operand"  "rM")
253.8103 ++                  (match_operand:SI 2 "register_operand"  "r")))]
253.8104 ++  ""
253.8105 ++  "sub\\t%0, %z1, %2"
253.8106 ++  [(set_attr "type" "alu")])
253.8107 ++
253.8108 ++(define_insn "mulsi3"
253.8109 ++  [(set (match_operand:SI 0 "register_operand"            "=r,r")
253.8110 ++        (mult:SI (match_operand:SI 1 "register_operand"    "r,r")
253.8111 ++                 (match_operand:SI 2 "arith_operand"       "r,I")))]
253.8112 ++  "TARGET_HAS_MUL"
253.8113 ++  "mul%i2\\t%0, %1, %z2"
253.8114 ++  [(set_attr "type" "mul")])
253.8115 ++
253.8116 ++(define_expand "divsi3"
253.8117 ++  [(set (match_operand:SI 0 "register_operand"            "=r")
253.8118 ++        (div:SI (match_operand:SI 1 "register_operand"     "r")
253.8119 ++                (match_operand:SI 2 "register_operand"     "r")))]
253.8120 ++  ""
253.8121 ++{
253.8122 ++  if (!TARGET_HAS_DIV)
253.8123 ++    {
253.8124 ++      if (!TARGET_FAST_SW_DIV)
253.8125 ++	FAIL;
253.8126 ++      else
253.8127 ++        {
253.8128 ++	  if (nios2_emit_expensive_div (operands, SImode))
253.8129 ++	    DONE;
253.8130 ++	}
253.8131 ++    }
253.8132 ++})
253.8133 ++
253.8134 ++(define_insn "divsi3_insn"
253.8135 ++  [(set (match_operand:SI 0 "register_operand"            "=r")
253.8136 ++        (div:SI (match_operand:SI 1 "register_operand"     "r")
253.8137 ++                (match_operand:SI 2 "register_operand"     "r")))]
253.8138 ++  "TARGET_HAS_DIV"
253.8139 ++  "div\\t%0, %1, %2"
253.8140 ++  [(set_attr "type" "div")])
253.8141 ++
253.8142 ++(define_insn "udivsi3"
253.8143 ++  [(set (match_operand:SI 0 "register_operand"            "=r")
253.8144 ++        (udiv:SI (match_operand:SI 1 "register_operand"     "r")
253.8145 ++                (match_operand:SI 2 "register_operand"     "r")))]
253.8146 ++  "TARGET_HAS_DIV"
253.8147 ++  "divu\\t%0, %1, %2"
253.8148 ++  [(set_attr "type" "div")])
253.8149 ++
253.8150 ++(define_insn "smulsi3_highpart"
253.8151 ++  [(set (match_operand:SI 0 "register_operand"                            "=r")
253.8152 ++	(truncate:SI
253.8153 ++	 (lshiftrt:DI
253.8154 ++	  (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand"  "r"))
253.8155 ++		   (sign_extend:DI (match_operand:SI 2 "register_operand"  "r")))
253.8156 ++	  (const_int 32))))]
253.8157 ++  "TARGET_HAS_MULX"
253.8158 ++  "mulxss\\t%0, %1, %2"
253.8159 ++  [(set_attr "type" "mul")])
253.8160 ++
253.8161 ++(define_insn "umulsi3_highpart"
253.8162 ++  [(set (match_operand:SI 0 "register_operand"                            "=r")
253.8163 ++	(truncate:SI
253.8164 ++	 (lshiftrt:DI
253.8165 ++	  (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand"  "r"))
253.8166 ++		   (zero_extend:DI (match_operand:SI 2 "register_operand"  "r")))
253.8167 ++	  (const_int 32))))]
253.8168 ++  "TARGET_HAS_MULX"
253.8169 ++  "mulxuu\\t%0, %1, %2"
253.8170 ++  [(set_attr "type" "mul")])
253.8171 ++
253.8172 ++
253.8173 ++(define_expand "mulsidi3"
253.8174 ++    [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 0)
253.8175 ++	  (mult:SI (match_operand:SI 1 "register_operand" "")
253.8176 ++		   (match_operand:SI 2 "register_operand" "")))
253.8177 ++     (set (subreg:SI (match_dup 0) 4)
253.8178 ++	  (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_dup 1))
253.8179 ++					     (sign_extend:DI (match_dup 2)))
253.8180 ++				    (const_int 32))))]
253.8181 ++  "TARGET_HAS_MULX"
253.8182 ++  "")
253.8183 ++
253.8184 ++(define_expand "umulsidi3"
253.8185 ++    [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 0)
253.8186 ++	  (mult:SI (match_operand:SI 1 "register_operand" "")
253.8187 ++		   (match_operand:SI 2 "register_operand" "")))
253.8188 ++     (set (subreg:SI (match_dup 0) 4)
253.8189 ++	  (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1))
253.8190 ++					     (zero_extend:DI (match_dup 2)))
253.8191 ++				    (const_int 32))))]
253.8192 ++  "TARGET_HAS_MULX"
253.8193 ++  "")
253.8194 ++
253.8195 ++
253.8196 ++
253.8197 ++;*****************************************************************************
253.8198 ++;*
253.8199 ++;* Negate and ones complement
253.8200 ++;*
253.8201 ++;*****************************************************************************
253.8202 ++
253.8203 ++(define_insn "negsi2"
253.8204 ++  [(set (match_operand:SI 0 "register_operand"        "=r")
253.8205 ++	(neg:SI (match_operand:SI 1 "register_operand" "r")))]
253.8206 ++  ""
253.8207 ++{
253.8208 ++  operands[2] = const0_rtx;
253.8209 ++  return "sub\\t%0, %z2, %1";
253.8210 ++}
253.8211 ++  [(set_attr "type" "alu")])
253.8212 ++
253.8213 ++(define_insn "one_cmplsi2"
253.8214 ++  [(set (match_operand:SI 0 "register_operand"        "=r")
253.8215 ++	(not:SI (match_operand:SI 1 "register_operand" "r")))]
253.8216 ++  ""
253.8217 ++{
253.8218 ++  operands[2] = const0_rtx;
253.8219 ++  return "nor\\t%0, %z2, %1";
253.8220 ++}
253.8221 ++  [(set_attr "type" "alu")])
253.8222 ++
253.8223 ++
253.8224 ++
253.8225 ++; Logical Operantions
253.8226 ++
253.8227 ++(define_insn "andsi3"
253.8228 ++  [(set (match_operand:SI 0 "register_operand"         "=r, r,r")
253.8229 ++        (and:SI (match_operand:SI 1 "register_operand" "%r, r,r")
253.8230 ++                (match_operand:SI 2 "logical_operand"   "rM,J,K")))]
253.8231 ++  ""
253.8232 ++  "@
253.8233 ++    and\\t%0, %1, %z2
253.8234 ++    and%i2\\t%0, %1, %2
253.8235 ++    andh%i2\\t%0, %1, %U2"
253.8236 ++  [(set_attr "type" "alu")])
253.8237 ++
253.8238 ++(define_insn "iorsi3"
253.8239 ++  [(set (match_operand:SI 0 "register_operand"          "=r, r,r")
253.8240 ++        (ior:SI (match_operand:SI 1 "register_operand"  "%r, r,r")
253.8241 ++                (match_operand:SI 2 "logical_operand"    "rM,J,K")))]
253.8242 ++  ""
253.8243 ++  "@
253.8244 ++    or\\t%0, %1, %z2
253.8245 ++    or%i2\\t%0, %1, %2
253.8246 ++    orh%i2\\t%0, %1, %U2"
253.8247 ++  [(set_attr "type" "alu")])
253.8248 ++
253.8249 ++(define_insn "*norsi3"
253.8250 ++  [(set (match_operand:SI 0 "register_operand"                  "=r")
253.8251 ++        (and:SI (not:SI (match_operand:SI 1 "register_operand"  "%r"))
253.8252 ++                (not:SI (match_operand:SI 2 "reg_or_0_operand"   "rM"))))]
253.8253 ++  ""
253.8254 ++  "nor\\t%0, %1, %z2"
253.8255 ++  [(set_attr "type" "alu")])
253.8256 ++
253.8257 ++(define_insn "xorsi3"
253.8258 ++  [(set (match_operand:SI 0 "register_operand"          "=r, r,r")
253.8259 ++        (xor:SI (match_operand:SI 1 "register_operand"  "%r, r,r")
253.8260 ++                (match_operand:SI 2 "logical_operand"    "rM,J,K")))]
253.8261 ++  ""
253.8262 ++  "@
253.8263 ++    xor\\t%0, %1, %z2
253.8264 ++    xor%i2\\t%0, %1, %2
253.8265 ++    xorh%i2\\t%0, %1, %U2"
253.8266 ++  [(set_attr "type" "alu")])
253.8267 ++
253.8268 ++
253.8269 ++
253.8270 ++;*****************************************************************************
253.8271 ++;*
253.8272 ++;* Shifts
253.8273 ++;*
253.8274 ++;*****************************************************************************
253.8275 ++
253.8276 ++(define_insn "ashlsi3"
253.8277 ++  [(set (match_operand:SI 0 "register_operand"           "=r,r")
253.8278 ++	(ashift:SI (match_operand:SI 1 "register_operand" "r,r")
253.8279 ++		   (match_operand:SI 2 "shift_operand"    "r,L")))]
253.8280 ++  ""
253.8281 ++  "sll%i2\\t%0, %1, %z2"
253.8282 ++  [(set_attr "type" "shift")])
253.8283 ++
253.8284 ++(define_insn "ashrsi3"
253.8285 ++  [(set (match_operand:SI 0 "register_operand"             "=r,r")
253.8286 ++	(ashiftrt:SI (match_operand:SI 1 "register_operand" "r,r")
253.8287 ++		     (match_operand:SI 2 "shift_operand"    "r,L")))]
253.8288 ++  ""
253.8289 ++  "sra%i2\\t%0, %1, %z2"
253.8290 ++  [(set_attr "type" "shift")])
253.8291 ++
253.8292 ++(define_insn "lshrsi3"
253.8293 ++  [(set (match_operand:SI 0 "register_operand"             "=r,r")
253.8294 ++	(lshiftrt:SI (match_operand:SI 1 "register_operand" "r,r")
253.8295 ++		     (match_operand:SI 2 "shift_operand"    "r,L")))]
253.8296 ++  ""
253.8297 ++  "srl%i2\\t%0, %1, %z2"
253.8298 ++  [(set_attr "type" "shift")])
253.8299 ++
253.8300 ++(define_insn "rotlsi3"
253.8301 ++  [(set (match_operand:SI 0 "register_operand"           "=r,r")
253.8302 ++	(rotate:SI (match_operand:SI 1 "register_operand" "r,r")
253.8303 ++		   (match_operand:SI 2 "shift_operand"    "r,L")))]
253.8304 ++  ""
253.8305 ++  "rol%i2\\t%0, %1, %z2"
253.8306 ++  [(set_attr "type" "shift")])
253.8307 ++
253.8308 ++(define_insn "rotrsi3"
253.8309 ++  [(set (match_operand:SI 0 "register_operand"             "=r,r")
253.8310 ++	(rotatert:SI (match_operand:SI 1 "register_operand" "r,r")
253.8311 ++		     (match_operand:SI 2 "register_operand" "r,r")))]
253.8312 ++  ""
253.8313 ++  "ror\\t%0, %1, %2"
253.8314 ++  [(set_attr "type" "shift")])
253.8315 ++
253.8316 ++(define_insn "*shift_mul_constants"
253.8317 ++  [(set (match_operand:SI 0 "register_operand"                     "=r")
253.8318 ++	(ashift:SI (mult:SI (match_operand:SI 1 "register_operand"  "r")
253.8319 ++		            (match_operand:SI 2 "const_int_operand" "I"))
253.8320 ++		   (match_operand:SI 3          "const_int_operand" "I")))]
253.8321 ++  "TARGET_HAS_MUL && SMALL_INT (INTVAL (operands[2]) << INTVAL (operands[3]))"
253.8322 ++{
253.8323 ++  HOST_WIDE_INT mul = INTVAL (operands[2]) << INTVAL (operands[3]);
253.8324 ++  rtx ops[3];
253.8325 ++  
253.8326 ++  ops[0] = operands[0];
253.8327 ++  ops[1] = operands[1];
253.8328 ++  ops[2] = GEN_INT (mul);
253.8329 ++  
253.8330 ++  output_asm_insn ("muli\t%0, %1, %2", ops);
253.8331 ++  return "";
253.8332 ++}
253.8333 ++  [(set_attr "type" "mul")])
253.8334 ++
253.8335 ++
253.8336 ++
253.8337 ++
253.8338 ++;*****************************************************************************
253.8339 ++;*
253.8340 ++;* Prologue, Epilogue and Return
253.8341 ++;*
253.8342 ++;*****************************************************************************
253.8343 ++
253.8344 ++(define_expand "prologue"
253.8345 ++  [(const_int 1)]
253.8346 ++  ""
253.8347 ++{
253.8348 ++  expand_prologue ();
253.8349 ++  DONE;
253.8350 ++})
253.8351 ++
253.8352 ++(define_expand "epilogue"
253.8353 ++  [(return)]
253.8354 ++  ""
253.8355 ++{
253.8356 ++  expand_epilogue (false);
253.8357 ++  DONE;
253.8358 ++})
253.8359 ++
253.8360 ++(define_expand "sibcall_epilogue"
253.8361 ++  [(return)]
253.8362 ++  ""
253.8363 ++{
253.8364 ++  expand_epilogue (true);
253.8365 ++  DONE;
253.8366 ++})
253.8367 ++
253.8368 ++(define_insn "return"
253.8369 ++  [(return)]
253.8370 ++  "reload_completed && nios2_can_use_return_insn ()"
253.8371 ++  "ret\\t"
253.8372 ++)
253.8373 ++
253.8374 ++(define_insn "return_from_epilogue"
253.8375 ++  [(use (match_operand 0 "pmode_register_operand" ""))
253.8376 ++   (return)]
253.8377 ++  "reload_completed"
253.8378 ++  "ret\\t"
253.8379 ++)
253.8380 ++
253.8381 ++;; Block any insns from being moved before this point, since the
253.8382 ++;; profiling call to mcount can use various registers that aren't
253.8383 ++;; saved or used to pass arguments.
253.8384 ++
253.8385 ++(define_insn "blockage"
253.8386 ++  [(unspec_volatile [(const_int 0)] UNSPEC_BLOCKAGE)]
253.8387 ++  ""
253.8388 ++  ""
253.8389 ++  [(set_attr "type" "unknown")
253.8390 ++   (set_attr "length" "0")])
253.8391 ++
253.8392 ++
253.8393 ++
253.8394 ++;*****************************************************************************
253.8395 ++;*
253.8396 ++;* Jumps and Calls
253.8397 ++;*
253.8398 ++;*****************************************************************************
253.8399 ++
253.8400 ++(define_insn "indirect_jump"
253.8401 ++  [(set (pc) (match_operand:SI 0 "register_operand" "r"))]
253.8402 ++  ""
253.8403 ++  "jmp\\t%0"
253.8404 ++  [(set_attr "type" "control")])
253.8405 ++
253.8406 ++(define_insn "jump"
253.8407 ++  [(set (pc)
253.8408 ++        (label_ref (match_operand 0 "" "")))]
253.8409 ++  ""
253.8410 ++  "br\\t%0"
253.8411 ++  [(set_attr "type" "control")])
253.8412 ++
253.8413 ++
253.8414 ++(define_insn "indirect_call"
253.8415 ++  [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
253.8416 ++         (match_operand 1 "" ""))
253.8417 ++   (clobber (reg:SI RA_REGNO))]
253.8418 ++  ""
253.8419 ++  "callr\\t%0"
253.8420 ++  [(set_attr "type" "control")])
253.8421 ++
253.8422 ++(define_insn "indirect_call_value"
253.8423 ++  [(set (match_operand 0 "" "")
253.8424 ++        (call (mem:QI (match_operand:SI 1 "register_operand" "r"))
253.8425 ++              (match_operand 2 "" "")))
253.8426 ++   (clobber (reg:SI RA_REGNO))]
253.8427 ++  ""
253.8428 ++  "callr\\t%1"
253.8429 ++)
253.8430 ++
253.8431 ++(define_expand "call"
253.8432 ++  [(parallel [(call (match_operand 0 "" "")
253.8433 ++                    (match_operand 1 "" ""))
253.8434 ++              (clobber (reg:SI RA_REGNO))])]
253.8435 ++  ""
253.8436 ++  "")
253.8437 ++
253.8438 ++(define_expand "call_value"
253.8439 ++  [(parallel [(set (match_operand 0 "" "")
253.8440 ++                   (call (match_operand 1 "" "")
253.8441 ++                         (match_operand 2 "" "")))
253.8442 ++              (clobber (reg:SI RA_REGNO))])]
253.8443 ++  ""
253.8444 ++  "")
253.8445 ++
253.8446 ++(define_insn "*call"
253.8447 ++  [(call (mem:QI (match_operand:SI 0 "immediate_operand" "i"))
253.8448 ++         (match_operand 1 "" ""))
253.8449 ++   (clobber (match_operand:SI 2 "register_operand" "=r"))]
253.8450 ++  ""
253.8451 ++  "call\\t%0"
253.8452 ++  [(set_attr "type" "control")])
253.8453 ++
253.8454 ++(define_insn "*call_value"
253.8455 ++  [(set (match_operand 0 "" "")
253.8456 ++        (call (mem:QI (match_operand:SI 1 "immediate_operand" "i"))
253.8457 ++              (match_operand 2 "" "")))
253.8458 ++   (clobber (match_operand:SI 3 "register_operand" "=r"))]
253.8459 ++  ""
253.8460 ++  "call\\t%1"
253.8461 ++  [(set_attr "type" "control")])
253.8462 ++
253.8463 ++(define_expand "sibcall"
253.8464 ++  [(parallel [(call (match_operand 0 "" "")
253.8465 ++		    (match_operand 1 "" ""))
253.8466 ++	      (return)
253.8467 ++	      (use (match_operand 2 "" ""))])]
253.8468 ++  ""
253.8469 ++  {
253.8470 ++    XEXP (operands[0], 0) = copy_to_mode_reg (SImode, XEXP (operands[0], 0));
253.8471 ++
253.8472 ++    if (operands[2] == NULL_RTX)
253.8473 ++      operands[2] = const0_rtx;
253.8474 ++  }
253.8475 ++)
253.8476 ++
253.8477 ++(define_expand "sibcall_value"
253.8478 ++  [(parallel [(set (match_operand 0 "" "")
253.8479 ++		   (call (match_operand 1 "" "")
253.8480 ++			 (match_operand 2 "" "")))
253.8481 ++	      (return)
253.8482 ++	      (use (match_operand 3 "" ""))])]
253.8483 ++  ""
253.8484 ++  {
253.8485 ++    XEXP (operands[1], 0) = copy_to_mode_reg (SImode, XEXP (operands[1], 0));
253.8486 ++
253.8487 ++    if (operands[3] == NULL_RTX)
253.8488 ++      operands[3] = const0_rtx;
253.8489 ++  }
253.8490 ++)
253.8491 ++
253.8492 ++(define_insn "sibcall_insn"
253.8493 ++ [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
253.8494 ++	(match_operand 1 "" ""))
253.8495 ++  (return)
253.8496 ++  (use (match_operand 2 "" ""))]
253.8497 ++  ""
253.8498 ++  "jmp\\t%0"
253.8499 ++)
253.8500 ++
253.8501 ++(define_insn "sibcall_value_insn"
253.8502 ++ [(set (match_operand 0 "register_operand" "")
253.8503 ++       (call (mem:QI (match_operand:SI 1 "register_operand" "r"))
253.8504 ++	     (match_operand 2 "" "")))
253.8505 ++  (return)
253.8506 ++  (use (match_operand 3 "" ""))]
253.8507 ++  ""
253.8508 ++  "jmp\\t%1"
253.8509 ++)
253.8510 ++
253.8511 ++
253.8512 ++
253.8513 ++
253.8514 ++(define_expand "tablejump"
253.8515 ++  [(parallel [(set (pc) (match_operand 0 "register_operand" "r"))
253.8516 ++              (use (label_ref (match_operand 1 "" "")))])]
253.8517 ++  ""
253.8518 ++  ""
253.8519 ++)
253.8520 ++
253.8521 ++(define_insn "*tablejump"
253.8522 ++  [(set (pc)
253.8523 ++	(match_operand:SI 0 "register_operand" "r"))
253.8524 ++   (use (label_ref (match_operand 1 "" "")))]
253.8525 ++  ""
253.8526 ++  "jmp\\t%0"
253.8527 ++  [(set_attr "type" "control")])
253.8528 ++
253.8529 ++
253.8530 ++
253.8531 ++;*****************************************************************************
253.8532 ++;*
253.8533 ++;* Comparisons
253.8534 ++;*
253.8535 ++;*****************************************************************************
253.8536 ++;; Flow here is rather complex (based on MIPS):
253.8537 ++;;
253.8538 ++;;  1)	The cmp{si,di,sf,df} routine is called.  It deposits the
253.8539 ++;;	arguments into the branch_cmp array, and the type into
253.8540 ++;;	branch_type.  No RTL is generated.
253.8541 ++;;
253.8542 ++;;  2)	The appropriate branch define_expand is called, which then
253.8543 ++;;	creates the appropriate RTL for the comparison and branch.
253.8544 ++;;	Different CC modes are used, based on what type of branch is
253.8545 ++;;	done, so that we can constrain things appropriately.  There
253.8546 ++;;	are assumptions in the rest of GCC that break if we fold the
253.8547 ++;;	operands into the branchs for integer operations, and use cc0
253.8548 ++;;	for floating point, so we use the fp status register instead.
253.8549 ++;;	If needed, an appropriate temporary is created to hold the
253.8550 ++;;	of the integer compare.
253.8551 ++
253.8552 ++(define_expand "cmpsi"
253.8553 ++  [(set (cc0)
253.8554 ++	(compare:CC (match_operand:SI 0 "register_operand" "")
253.8555 ++		    (match_operand:SI 1 "arith_operand" "")))]
253.8556 ++  ""
253.8557 ++{
253.8558 ++  branch_cmp[0] = operands[0];
253.8559 ++  branch_cmp[1] = operands[1];
253.8560 ++  branch_type = CMP_SI;
253.8561 ++  DONE;
253.8562 ++})
253.8563 ++
253.8564 ++(define_expand "tstsi"
253.8565 ++  [(set (cc0)
253.8566 ++	(match_operand:SI 0 "register_operand" ""))]
253.8567 ++  ""
253.8568 ++{
253.8569 ++  branch_cmp[0] = operands[0];
253.8570 ++  branch_cmp[1] = const0_rtx;
253.8571 ++  branch_type = CMP_SI;
253.8572 ++  DONE;
253.8573 ++})
253.8574 ++
253.8575 ++
253.8576 ++;*****************************************************************************
253.8577 ++;*
253.8578 ++;* setting a register from a comparison
253.8579 ++;*
253.8580 ++;*****************************************************************************
253.8581 ++
253.8582 ++(define_expand "seq"
253.8583 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.8584 ++	(eq:SI (match_dup 1)
253.8585 ++	       (match_dup 2)))]
253.8586 ++  ""
253.8587 ++{
253.8588 ++  if (branch_type != CMP_SI)
253.8589 ++    FAIL;
253.8590 ++
253.8591 ++  /* set up operands from compare.  */
253.8592 ++  operands[1] = branch_cmp[0];
253.8593 ++  operands[2] = branch_cmp[1];
253.8594 ++
253.8595 ++  gen_int_relational (EQ, operands[0], operands[1], operands[2], NULL_RTX);
253.8596 ++  DONE;
253.8597 ++})
253.8598 ++
253.8599 ++
253.8600 ++(define_insn "*seq"
253.8601 ++  [(set (match_operand:SI 0 "register_operand"        "=r")
253.8602 ++	(eq:SI (match_operand:SI 1 "reg_or_0_operand" "%rM")
253.8603 ++	       (match_operand:SI 2 "arith_operand"     "rI")))]
253.8604 ++  ""
253.8605 ++  "cmpeq%i2\\t%0, %z1, %z2"
253.8606 ++  [(set_attr "type" "alu")])
253.8607 ++
253.8608 ++
253.8609 ++(define_expand "sne"
253.8610 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.8611 ++	(ne:SI (match_dup 1)
253.8612 ++	       (match_dup 2)))]
253.8613 ++  ""
253.8614 ++{
253.8615 ++  if (branch_type != CMP_SI)
253.8616 ++    FAIL;
253.8617 ++
253.8618 ++  /* set up operands from compare.  */
253.8619 ++  operands[1] = branch_cmp[0];
253.8620 ++  operands[2] = branch_cmp[1];
253.8621 ++
253.8622 ++  gen_int_relational (NE, operands[0], operands[1], operands[2], NULL_RTX);
253.8623 ++  DONE;
253.8624 ++})
253.8625 ++
253.8626 ++
253.8627 ++(define_insn "*sne"
253.8628 ++  [(set (match_operand:SI 0 "register_operand"        "=r")
253.8629 ++	(ne:SI (match_operand:SI 1 "reg_or_0_operand" "%rM")
253.8630 ++	       (match_operand:SI 2 "arith_operand"     "rI")))]
253.8631 ++  ""
253.8632 ++  "cmpne%i2\\t%0, %z1, %z2"
253.8633 ++  [(set_attr "type" "alu")])
253.8634 ++
253.8635 ++
253.8636 ++(define_expand "sgt"
253.8637 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.8638 ++	(gt:SI (match_dup 1)
253.8639 ++	       (match_dup 2)))]
253.8640 ++  ""
253.8641 ++{
253.8642 ++  if (branch_type != CMP_SI)
253.8643 ++    FAIL;
253.8644 ++
253.8645 ++  /* set up operands from compare.  */
253.8646 ++  operands[1] = branch_cmp[0];
253.8647 ++  operands[2] = branch_cmp[1];
253.8648 ++
253.8649 ++  gen_int_relational (GT, operands[0], operands[1], operands[2], NULL_RTX);
253.8650 ++  DONE;
253.8651 ++})
253.8652 ++
253.8653 ++
253.8654 ++(define_insn "*sgt"
253.8655 ++  [(set (match_operand:SI 0 "register_operand"        "=r")
253.8656 ++	(gt:SI (match_operand:SI 1 "reg_or_0_operand"  "rM")
253.8657 ++	       (match_operand:SI 2 "reg_or_0_operand"  "rM")))]
253.8658 ++  ""
253.8659 ++  "cmplt\\t%0, %z2, %z1"
253.8660 ++  [(set_attr "type" "alu")])
253.8661 ++
253.8662 ++
253.8663 ++(define_expand "sge"
253.8664 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.8665 ++	(ge:SI (match_dup 1)
253.8666 ++	       (match_dup 2)))]
253.8667 ++  ""
253.8668 ++{
253.8669 ++  if (branch_type != CMP_SI)
253.8670 ++    FAIL;
253.8671 ++
253.8672 ++  /* set up operands from compare.  */
253.8673 ++  operands[1] = branch_cmp[0];
253.8674 ++  operands[2] = branch_cmp[1];
253.8675 ++
253.8676 ++  gen_int_relational (GE, operands[0], operands[1], operands[2], NULL_RTX);
253.8677 ++  DONE;
253.8678 ++})
253.8679 ++
253.8680 ++
253.8681 ++(define_insn "*sge"
253.8682 ++  [(set (match_operand:SI 0 "register_operand"        "=r")
253.8683 ++	(ge:SI (match_operand:SI 1 "reg_or_0_operand"  "rM")
253.8684 ++	       (match_operand:SI 2 "arith_operand"     "rI")))]
253.8685 ++  ""
253.8686 ++  "cmpge%i2\\t%0, %z1, %z2"
253.8687 ++  [(set_attr "type" "alu")])
253.8688 ++
253.8689 ++(define_expand "sle"
253.8690 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.8691 ++	(le:SI (match_dup 1)
253.8692 ++	       (match_dup 2)))]
253.8693 ++  ""
253.8694 ++{
253.8695 ++  if (branch_type != CMP_SI)
253.8696 ++    FAIL;
253.8697 ++
253.8698 ++  /* set up operands from compare.  */
253.8699 ++  operands[1] = branch_cmp[0];
253.8700 ++  operands[2] = branch_cmp[1];
253.8701 ++
253.8702 ++  gen_int_relational (LE, operands[0], operands[1], operands[2], NULL_RTX);
253.8703 ++  DONE;
253.8704 ++})
253.8705 ++
253.8706 ++
253.8707 ++(define_insn "*sle"
253.8708 ++  [(set (match_operand:SI 0 "register_operand"        "=r")
253.8709 ++	(le:SI (match_operand:SI 1 "reg_or_0_operand"  "rM")
253.8710 ++	       (match_operand:SI 2 "reg_or_0_operand"  "rM")))]
253.8711 ++  ""
253.8712 ++  "cmpge\\t%0, %z2, %z1"
253.8713 ++  [(set_attr "type" "alu")])
253.8714 ++
253.8715 ++
253.8716 ++(define_expand "slt"
253.8717 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.8718 ++	(lt:SI (match_dup 1)
253.8719 ++	       (match_dup 2)))]
253.8720 ++  ""
253.8721 ++{
253.8722 ++  if (branch_type != CMP_SI)
253.8723 ++    FAIL;
253.8724 ++
253.8725 ++  /* set up operands from compare.  */
253.8726 ++  operands[1] = branch_cmp[0];
253.8727 ++  operands[2] = branch_cmp[1];
253.8728 ++
253.8729 ++  gen_int_relational (LT, operands[0], operands[1], operands[2], NULL_RTX);
253.8730 ++  DONE;
253.8731 ++})
253.8732 ++
253.8733 ++
253.8734 ++(define_insn "*slt"
253.8735 ++  [(set (match_operand:SI 0 "register_operand"        "=r")
253.8736 ++	(lt:SI (match_operand:SI 1 "reg_or_0_operand"  "rM")
253.8737 ++	       (match_operand:SI 2 "arith_operand"     "rI")))]
253.8738 ++  ""
253.8739 ++  "cmplt%i2\\t%0, %z1, %z2"
253.8740 ++  [(set_attr "type" "alu")])
253.8741 ++
253.8742 ++
253.8743 ++(define_expand "sgtu"
253.8744 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.8745 ++	(gtu:SI (match_dup 1)
253.8746 ++	        (match_dup 2)))]
253.8747 ++  ""
253.8748 ++{
253.8749 ++  if (branch_type != CMP_SI)
253.8750 ++    FAIL;
253.8751 ++
253.8752 ++  /* set up operands from compare.  */
253.8753 ++  operands[1] = branch_cmp[0];
253.8754 ++  operands[2] = branch_cmp[1];
253.8755 ++
253.8756 ++  gen_int_relational (GTU, operands[0], operands[1], operands[2], NULL_RTX);
253.8757 ++  DONE;
253.8758 ++})
253.8759 ++
253.8760 ++
253.8761 ++(define_insn "*sgtu"
253.8762 ++  [(set (match_operand:SI 0 "register_operand"        "=r")
253.8763 ++	(gtu:SI (match_operand:SI 1 "reg_or_0_operand"  "rM")
253.8764 ++	        (match_operand:SI 2 "reg_or_0_operand"  "rM")))]
253.8765 ++  ""
253.8766 ++  "cmpltu\\t%0, %z2, %z1"
253.8767 ++  [(set_attr "type" "alu")])
253.8768 ++
253.8769 ++
253.8770 ++(define_expand "sgeu"
253.8771 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.8772 ++	(geu:SI (match_dup 1)
253.8773 ++	        (match_dup 2)))]
253.8774 ++  ""
253.8775 ++{
253.8776 ++  if (branch_type != CMP_SI)
253.8777 ++    FAIL;
253.8778 ++
253.8779 ++  /* set up operands from compare.  */
253.8780 ++  operands[1] = branch_cmp[0];
253.8781 ++  operands[2] = branch_cmp[1];
253.8782 ++
253.8783 ++  gen_int_relational (GEU, operands[0], operands[1], operands[2], NULL_RTX);
253.8784 ++  DONE;
253.8785 ++})
253.8786 ++
253.8787 ++
253.8788 ++(define_insn "*sgeu"
253.8789 ++  [(set (match_operand:SI 0 "register_operand"        "=r")
253.8790 ++	(geu:SI (match_operand:SI 1 "reg_or_0_operand"  "rM")
253.8791 ++	        (match_operand:SI 2 "uns_arith_operand"     "rJ")))]
253.8792 ++  ""
253.8793 ++  "cmpgeu%i2\\t%0, %z1, %z2"
253.8794 ++  [(set_attr "type" "alu")])
253.8795 ++
253.8796 ++(define_expand "sleu"
253.8797 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.8798 ++	(leu:SI (match_dup 1)
253.8799 ++	        (match_dup 2)))]
253.8800 ++  ""
253.8801 ++{
253.8802 ++  if (branch_type != CMP_SI)
253.8803 ++    FAIL;
253.8804 ++
253.8805 ++  /* set up operands from compare.  */
253.8806 ++  operands[1] = branch_cmp[0];
253.8807 ++  operands[2] = branch_cmp[1];
253.8808 ++
253.8809 ++  gen_int_relational (LEU, operands[0], operands[1], operands[2], NULL_RTX);
253.8810 ++  DONE;
253.8811 ++})
253.8812 ++
253.8813 ++
253.8814 ++(define_insn "*sleu"
253.8815 ++  [(set (match_operand:SI 0 "register_operand"        "=r")
253.8816 ++	(leu:SI (match_operand:SI 1 "reg_or_0_operand"  "rM")
253.8817 ++	        (match_operand:SI 2 "reg_or_0_operand"  "rM")))]
253.8818 ++  ""
253.8819 ++  "cmpgeu\\t%0, %z2, %z1"
253.8820 ++  [(set_attr "type" "alu")])
253.8821 ++
253.8822 ++
253.8823 ++(define_expand "sltu"
253.8824 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.8825 ++	(ltu:SI (match_dup 1)
253.8826 ++	        (match_dup 2)))]
253.8827 ++  ""
253.8828 ++{
253.8829 ++  if (branch_type != CMP_SI)
253.8830 ++    FAIL;
253.8831 ++
253.8832 ++  /* set up operands from compare.  */
253.8833 ++  operands[1] = branch_cmp[0];
253.8834 ++  operands[2] = branch_cmp[1];
253.8835 ++
253.8836 ++  gen_int_relational (LTU, operands[0], operands[1], operands[2], NULL_RTX);
253.8837 ++  DONE;
253.8838 ++})
253.8839 ++
253.8840 ++
253.8841 ++(define_insn "*sltu"
253.8842 ++  [(set (match_operand:SI 0 "register_operand"        "=r")
253.8843 ++	(ltu:SI (match_operand:SI 1 "reg_or_0_operand"  "rM")
253.8844 ++	        (match_operand:SI 2 "uns_arith_operand"     "rJ")))]
253.8845 ++  ""
253.8846 ++  "cmpltu%i2\\t%0, %z1, %z2"
253.8847 ++  [(set_attr "type" "alu")])
253.8848 ++
253.8849 ++
253.8850 ++
253.8851 ++
253.8852 ++;*****************************************************************************
253.8853 ++;*
253.8854 ++;* branches
253.8855 ++;*
253.8856 ++;*****************************************************************************
253.8857 ++
253.8858 ++(define_insn "*cbranch"
253.8859 ++  [(set (pc)
253.8860 ++	(if_then_else
253.8861 ++         (match_operator:SI 0 "comparison_operator"
253.8862 ++			    [(match_operand:SI 2 "reg_or_0_operand" "rM")
253.8863 ++			     (match_operand:SI 3 "reg_or_0_operand" "rM")])
253.8864 ++        (label_ref (match_operand 1 "" ""))
253.8865 ++        (pc)))]
253.8866 ++  ""
253.8867 ++  "b%0\\t%z2, %z3, %l1"
253.8868 ++  [(set_attr "type" "control")])
253.8869 ++
253.8870 ++
253.8871 ++(define_expand "beq"
253.8872 ++  [(set (pc)
253.8873 ++	(if_then_else (eq:CC (cc0)
253.8874 ++			     (const_int 0))
253.8875 ++		      (label_ref (match_operand 0 "" ""))
253.8876 ++		      (pc)))]
253.8877 ++  ""
253.8878 ++{
253.8879 ++  gen_int_relational (EQ, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
253.8880 ++  DONE;
253.8881 ++})
253.8882 ++
253.8883 ++
253.8884 ++(define_expand "bne"
253.8885 ++  [(set (pc)
253.8886 ++	(if_then_else (ne:CC (cc0)
253.8887 ++			     (const_int 0))
253.8888 ++		      (label_ref (match_operand 0 "" ""))
253.8889 ++		      (pc)))]
253.8890 ++  ""
253.8891 ++{
253.8892 ++  gen_int_relational (NE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
253.8893 ++  DONE;
253.8894 ++})
253.8895 ++
253.8896 ++
253.8897 ++(define_expand "bgt"
253.8898 ++  [(set (pc)
253.8899 ++	(if_then_else (gt:CC (cc0)
253.8900 ++			     (const_int 0))
253.8901 ++		      (label_ref (match_operand 0 "" ""))
253.8902 ++		      (pc)))]
253.8903 ++  ""
253.8904 ++{
253.8905 ++  gen_int_relational (GT, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
253.8906 ++  DONE;
253.8907 ++})
253.8908 ++
253.8909 ++(define_expand "bge"
253.8910 ++  [(set (pc)
253.8911 ++	(if_then_else (ge:CC (cc0)
253.8912 ++			     (const_int 0))
253.8913 ++		      (label_ref (match_operand 0 "" ""))
253.8914 ++		      (pc)))]
253.8915 ++  ""
253.8916 ++{
253.8917 ++  gen_int_relational (GE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
253.8918 ++  DONE;
253.8919 ++})
253.8920 ++
253.8921 ++(define_expand "ble"
253.8922 ++  [(set (pc)
253.8923 ++	(if_then_else (le:CC (cc0)
253.8924 ++			     (const_int 0))
253.8925 ++		      (label_ref (match_operand 0 "" ""))
253.8926 ++		      (pc)))]
253.8927 ++  ""
253.8928 ++{
253.8929 ++  gen_int_relational (LE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
253.8930 ++  DONE;
253.8931 ++})
253.8932 ++
253.8933 ++(define_expand "blt"
253.8934 ++  [(set (pc)
253.8935 ++	(if_then_else (lt:CC (cc0)
253.8936 ++			     (const_int 0))
253.8937 ++		      (label_ref (match_operand 0 "" ""))
253.8938 ++		      (pc)))]
253.8939 ++  ""
253.8940 ++{
253.8941 ++  gen_int_relational (LT, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
253.8942 ++  DONE;
253.8943 ++})
253.8944 ++
253.8945 ++
253.8946 ++(define_expand "bgtu"
253.8947 ++  [(set (pc)
253.8948 ++	(if_then_else (gtu:CC (cc0)
253.8949 ++		 	      (const_int 0))
253.8950 ++		      (label_ref (match_operand 0 "" ""))
253.8951 ++		      (pc)))]
253.8952 ++  ""
253.8953 ++{
253.8954 ++  gen_int_relational (GTU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
253.8955 ++  DONE;
253.8956 ++})
253.8957 ++
253.8958 ++(define_expand "bgeu"
253.8959 ++  [(set (pc)
253.8960 ++	(if_then_else (geu:CC (cc0)
253.8961 ++			      (const_int 0))
253.8962 ++		      (label_ref (match_operand 0 "" ""))
253.8963 ++		      (pc)))]
253.8964 ++  ""
253.8965 ++{
253.8966 ++  gen_int_relational (GEU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
253.8967 ++  DONE;
253.8968 ++})
253.8969 ++
253.8970 ++(define_expand "bleu"
253.8971 ++  [(set (pc)
253.8972 ++	(if_then_else (leu:CC (cc0)
253.8973 ++			      (const_int 0))
253.8974 ++		      (label_ref (match_operand 0 "" ""))
253.8975 ++		      (pc)))]
253.8976 ++  ""
253.8977 ++{
253.8978 ++  gen_int_relational (LEU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
253.8979 ++  DONE;
253.8980 ++})
253.8981 ++
253.8982 ++(define_expand "bltu"
253.8983 ++  [(set (pc)
253.8984 ++	(if_then_else (ltu:CC (cc0)
253.8985 ++			      (const_int 0))
253.8986 ++		      (label_ref (match_operand 0 "" ""))
253.8987 ++		      (pc)))]
253.8988 ++  ""
253.8989 ++{
253.8990 ++  gen_int_relational (LTU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
253.8991 ++  DONE;
253.8992 ++})
253.8993 ++
253.8994 ++
253.8995 ++;*****************************************************************************
253.8996 ++;*
253.8997 ++;* String and Block Operations
253.8998 ++;*
253.8999 ++;*****************************************************************************
253.9000 ++
253.9001 ++; ??? This is all really a hack to get Dhrystone to work as fast as possible
253.9002 ++;     things to be fixed:
253.9003 ++;        * let the compiler core handle all of this, for that to work the extra
253.9004 ++;          aliasing needs to be addressed.
253.9005 ++;        * we use three temporary registers for loading and storing to ensure no
253.9006 ++;          ld use stalls, this is excessive, because after the first ld/st only
253.9007 ++;          two are needed. Only two would be needed all the way through if 
253.9008 ++;          we could schedule with other code. Consider:
253.9009 ++;           1  ld $1, 0($src)
253.9010 ++;           2  ld $2, 4($src)
253.9011 ++;           3  ld $3, 8($src)
253.9012 ++;           4  st $1, 0($dest)
253.9013 ++;           5  ld $1, 12($src)
253.9014 ++;           6  st $2, 4($src)
253.9015 ++;           7  etc.
253.9016 ++;          The first store has to wait until 4. If it does not there will be one
253.9017 ++;          cycle of stalling. However, if any other instruction could be placed
253.9018 ++;          between 1 and 4, $3 would not be needed.
253.9019 ++;        * In small we probably don't want to ever do this ourself because there
253.9020 ++;          is no ld use stall.
253.9021 ++
253.9022 ++(define_expand "movstrsi"
253.9023 ++  [(parallel [(set (match_operand:BLK 0 "general_operand"  "")
253.9024 ++		   (match_operand:BLK 1 "general_operand"  ""))
253.9025 ++	      (use (match_operand:SI 2 "const_int_operand" ""))
253.9026 ++	      (use (match_operand:SI 3 "const_int_operand" ""))
253.9027 ++	      (clobber (match_scratch:SI 4                "=&r"))
253.9028 ++	      (clobber (match_scratch:SI 5                "=&r"))
253.9029 ++	      (clobber (match_scratch:SI 6                "=&r"))])]
253.9030 ++  "TARGET_INLINE_MEMCPY"
253.9031 ++{
253.9032 ++  rtx ld_addr_reg, st_addr_reg;
253.9033 ++
253.9034 ++  /* If the predicate for op2 fails in expr.c:emit_block_move_via_movstr 
253.9035 ++     it trys to copy to a register, but does not re-try the predicate.
253.9036 ++     ??? Intead of fixing expr.c, I fix it here. */
253.9037 ++  if (!const_int_operand (operands[2], SImode))
253.9038 ++    FAIL;
253.9039 ++
253.9040 ++  /* ??? there are some magic numbers which need to be sorted out here.
253.9041 ++         the basis for them is not increasing code size hugely or going
253.9042 ++         out of range of offset addressing */
253.9043 ++  if (INTVAL (operands[3]) < 4)
253.9044 ++    FAIL;
253.9045 ++  if (!optimize
253.9046 ++      || (optimize_size && INTVAL (operands[2]) > 12)
253.9047 ++      || (optimize < 3 && INTVAL (operands[2]) > 100)
253.9048 ++      || INTVAL (operands[2]) > 200)
253.9049 ++    FAIL;
253.9050 ++
253.9051 ++  st_addr_reg
253.9052 ++    = replace_equiv_address (operands[0],
253.9053 ++			     copy_to_mode_reg (Pmode, XEXP (operands[0], 0)));
253.9054 ++  ld_addr_reg
253.9055 ++    = replace_equiv_address (operands[1],
253.9056 ++			     copy_to_mode_reg (Pmode, XEXP (operands[1], 0)));
253.9057 ++  emit_insn (gen_movstrsi_internal (st_addr_reg, ld_addr_reg,
253.9058 ++				    operands[2], operands[3]));
253.9059 ++
253.9060 ++  DONE;
253.9061 ++})
253.9062 ++
253.9063 ++
253.9064 ++(define_insn "movstrsi_internal"
253.9065 ++  [(set (match_operand:BLK 0 "memory_operand"   "=o")
253.9066 ++	(match_operand:BLK 1 "memory_operand"    "o"))
253.9067 ++   (use (match_operand:SI 2 "const_int_operand"  "i"))
253.9068 ++   (use (match_operand:SI 3 "const_int_operand"  "i"))
253.9069 ++   (clobber (match_scratch:SI 4                "=&r"))
253.9070 ++   (clobber (match_scratch:SI 5                "=&r"))
253.9071 ++   (clobber (match_scratch:SI 6                "=&r"))]
253.9072 ++  "TARGET_INLINE_MEMCPY"
253.9073 ++{
253.9074 ++  int ld_offset = INTVAL (operands[2]);
253.9075 ++  int ld_len = INTVAL (operands[2]);
253.9076 ++  int ld_reg = 0;
253.9077 ++  rtx ld_addr_reg = XEXP (operands[1], 0);
253.9078 ++  int st_offset = INTVAL (operands[2]);
253.9079 ++  int st_len = INTVAL (operands[2]);
253.9080 ++  int st_reg = 0;
253.9081 ++  rtx st_addr_reg = XEXP (operands[0], 0);
253.9082 ++  int delay_count = 0;
253.9083 ++  
253.9084 ++  /* ops[0] is the address used by the insn
253.9085 ++     ops[1] is the register being loaded or stored */
253.9086 ++  rtx ops[2];
253.9087 ++  
253.9088 ++  if (INTVAL (operands[3]) < 4)
253.9089 ++    abort ();
253.9090 ++  
253.9091 ++  while (ld_offset >= 4)
253.9092 ++    {
253.9093 ++      /* if the load use delay has been met, I can start
253.9094 ++         storing */
253.9095 ++      if (delay_count >= 3)
253.9096 ++        {
253.9097 ++	  ops[0] = gen_rtx (MEM, SImode, 
253.9098 ++			    plus_constant (st_addr_reg, st_len - st_offset));
253.9099 ++	  ops[1] = operands[st_reg + 4];			 
253.9100 ++	  output_asm_insn ("stw\t%1, %0", ops);
253.9101 ++	  
253.9102 ++	  st_reg = (st_reg + 1) % 3;
253.9103 ++	  st_offset -= 4;
253.9104 ++        }
253.9105 ++    
253.9106 ++      ops[0] = gen_rtx (MEM, SImode, 
253.9107 ++			plus_constant (ld_addr_reg, ld_len - ld_offset));
253.9108 ++      ops[1] = operands[ld_reg + 4];			 
253.9109 ++      output_asm_insn ("ldw\t%1, %0", ops);
253.9110 ++      
253.9111 ++      ld_reg = (ld_reg + 1) % 3;
253.9112 ++      ld_offset -= 4;
253.9113 ++      delay_count++;
253.9114 ++    }
253.9115 ++  
253.9116 ++  if (ld_offset >= 2)
253.9117 ++    {
253.9118 ++      /* if the load use delay has been met, I can start
253.9119 ++         storing */
253.9120 ++      if (delay_count >= 3)
253.9121 ++        {
253.9122 ++	  ops[0] = gen_rtx (MEM, SImode, 
253.9123 ++			    plus_constant (st_addr_reg, st_len - st_offset));
253.9124 ++	  ops[1] = operands[st_reg + 4];			 
253.9125 ++	  output_asm_insn ("stw\t%1, %0", ops);
253.9126 ++	  
253.9127 ++	  st_reg = (st_reg + 1) % 3;
253.9128 ++	  st_offset -= 4;
253.9129 ++        }
253.9130 ++    
253.9131 ++      ops[0] = gen_rtx (MEM, HImode, 
253.9132 ++			plus_constant (ld_addr_reg, ld_len - ld_offset));
253.9133 ++      ops[1] = operands[ld_reg + 4];			 
253.9134 ++      output_asm_insn ("ldh\t%1, %0", ops);
253.9135 ++      
253.9136 ++      ld_reg = (ld_reg + 1) % 3;
253.9137 ++      ld_offset -= 2;
253.9138 ++      delay_count++;
253.9139 ++    }
253.9140 ++  
253.9141 ++  if (ld_offset >= 1)
253.9142 ++    {
253.9143 ++      /* if the load use delay has been met, I can start
253.9144 ++         storing */
253.9145 ++      if (delay_count >= 3)
253.9146 ++        {
253.9147 ++	  ops[0] = gen_rtx (MEM, SImode, 
253.9148 ++			    plus_constant (st_addr_reg, st_len - st_offset));
253.9149 ++	  ops[1] = operands[st_reg + 4];			 
253.9150 ++	  output_asm_insn ("stw\t%1, %0", ops);
253.9151 ++	  
253.9152 ++	  st_reg = (st_reg + 1) % 3;
253.9153 ++	  st_offset -= 4;
253.9154 ++        }
253.9155 ++    
253.9156 ++      ops[0] = gen_rtx (MEM, QImode, 
253.9157 ++			plus_constant (ld_addr_reg, ld_len - ld_offset));
253.9158 ++      ops[1] = operands[ld_reg + 4];			 
253.9159 ++      output_asm_insn ("ldb\t%1, %0", ops);
253.9160 ++      
253.9161 ++      ld_reg = (ld_reg + 1) % 3;
253.9162 ++      ld_offset -= 1;
253.9163 ++      delay_count++;
253.9164 ++    }
253.9165 ++
253.9166 ++    while (st_offset >= 4)
253.9167 ++      {
253.9168 ++	ops[0] = gen_rtx (MEM, SImode, 
253.9169 ++			  plus_constant (st_addr_reg, st_len - st_offset));
253.9170 ++	ops[1] = operands[st_reg + 4];			 
253.9171 ++	output_asm_insn ("stw\t%1, %0", ops);
253.9172 ++
253.9173 ++	st_reg = (st_reg + 1) % 3;
253.9174 ++	st_offset -= 4;
253.9175 ++      }
253.9176 ++  
253.9177 ++    while (st_offset >= 2)
253.9178 ++      {
253.9179 ++	ops[0] = gen_rtx (MEM, HImode, 
253.9180 ++			  plus_constant (st_addr_reg, st_len - st_offset));
253.9181 ++	ops[1] = operands[st_reg + 4];			 
253.9182 ++	output_asm_insn ("sth\t%1, %0", ops);
253.9183 ++
253.9184 ++	st_reg = (st_reg + 1) % 3;
253.9185 ++	st_offset -= 2;
253.9186 ++      }
253.9187 ++  
253.9188 ++    while (st_offset >= 1)
253.9189 ++      {
253.9190 ++	ops[0] = gen_rtx (MEM, QImode, 
253.9191 ++			  plus_constant (st_addr_reg, st_len - st_offset));
253.9192 ++	ops[1] = operands[st_reg + 4];			 
253.9193 ++	output_asm_insn ("stb\t%1, %0", ops);
253.9194 ++
253.9195 ++	st_reg = (st_reg + 1) % 3;
253.9196 ++	st_offset -= 1;
253.9197 ++      }
253.9198 ++  
253.9199 ++  return "";
253.9200 ++}
253.9201 ++; ??? lengths are not being used yet, but I will probably forget
253.9202 ++; to update this once I am using lengths, so set it to something
253.9203 ++; definetely big enough to cover it. 400 allows for 200 bytes
253.9204 ++; of motion.
253.9205 ++  [(set_attr "length" "400")])
253.9206 ++
253.9207 ++
253.9208 ++
253.9209 ++;*****************************************************************************
253.9210 ++;*
253.9211 ++;* Custom instructions
253.9212 ++;*
253.9213 ++;*****************************************************************************
253.9214 ++
253.9215 ++(define_constants [
253.9216 ++  (CUSTOM_N 100)
253.9217 ++  (CUSTOM_NI 101)
253.9218 ++  (CUSTOM_NF 102)
253.9219 ++  (CUSTOM_NP 103)
253.9220 ++  (CUSTOM_NII 104)
253.9221 ++  (CUSTOM_NIF 105)
253.9222 ++  (CUSTOM_NIP 106)
253.9223 ++  (CUSTOM_NFI 107)
253.9224 ++  (CUSTOM_NFF 108)
253.9225 ++  (CUSTOM_NFP 109)
253.9226 ++  (CUSTOM_NPI 110)
253.9227 ++  (CUSTOM_NPF 111)
253.9228 ++  (CUSTOM_NPP 112)
253.9229 ++  (CUSTOM_IN 113)
253.9230 ++  (CUSTOM_INI 114)
253.9231 ++  (CUSTOM_INF 115)
253.9232 ++  (CUSTOM_INP 116)
253.9233 ++  (CUSTOM_INII 117)
253.9234 ++  (CUSTOM_INIF 118)
253.9235 ++  (CUSTOM_INIP 119)
253.9236 ++  (CUSTOM_INFI 120)
253.9237 ++  (CUSTOM_INFF 121)
253.9238 ++  (CUSTOM_INFP 122)
253.9239 ++  (CUSTOM_INPI 123)
253.9240 ++  (CUSTOM_INPF 124)
253.9241 ++  (CUSTOM_INPP 125)
253.9242 ++  (CUSTOM_FN 126)
253.9243 ++  (CUSTOM_FNI 127)
253.9244 ++  (CUSTOM_FNF 128)
253.9245 ++  (CUSTOM_FNP 129)
253.9246 ++  (CUSTOM_FNII 130)
253.9247 ++  (CUSTOM_FNIF 131)
253.9248 ++  (CUSTOM_FNIP 132)
253.9249 ++  (CUSTOM_FNFI 133)
253.9250 ++  (CUSTOM_FNFF 134)
253.9251 ++  (CUSTOM_FNFP 135)
253.9252 ++  (CUSTOM_FNPI 136)
253.9253 ++  (CUSTOM_FNPF 137)
253.9254 ++  (CUSTOM_FNPP 138)
253.9255 ++  (CUSTOM_PN 139)
253.9256 ++  (CUSTOM_PNI 140)
253.9257 ++  (CUSTOM_PNF 141)
253.9258 ++  (CUSTOM_PNP 142)
253.9259 ++  (CUSTOM_PNII 143)
253.9260 ++  (CUSTOM_PNIF 144)
253.9261 ++  (CUSTOM_PNIP 145)
253.9262 ++  (CUSTOM_PNFI 146)
253.9263 ++  (CUSTOM_PNFF 147)
253.9264 ++  (CUSTOM_PNFP 148)
253.9265 ++  (CUSTOM_PNPI 149)
253.9266 ++  (CUSTOM_PNPF 150)
253.9267 ++  (CUSTOM_PNPP 151)
253.9268 ++])
253.9269 ++
253.9270 ++
253.9271 ++(define_insn "custom_n"
253.9272 ++  [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")] CUSTOM_N)]
253.9273 ++  ""
253.9274 ++  "custom\\t%0, zero, zero, zero"
253.9275 ++  [(set_attr "type" "custom")])
253.9276 ++
253.9277 ++(define_insn "custom_ni"
253.9278 ++  [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
253.9279 ++                     (match_operand:SI 1 "register_operand"   "r")] CUSTOM_NI)]
253.9280 ++  ""
253.9281 ++  "custom\\t%0, zero, %1, zero"
253.9282 ++  [(set_attr "type" "custom")])
253.9283 ++
253.9284 ++(define_insn "custom_nf"
253.9285 ++  [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
253.9286 ++                     (match_operand:SF 1 "register_operand"   "r")] CUSTOM_NF)]
253.9287 ++  ""
253.9288 ++  "custom\\t%0, zero, %1, zero"
253.9289 ++  [(set_attr "type" "custom")])
253.9290 ++
253.9291 ++(define_insn "custom_np"
253.9292 ++  [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
253.9293 ++                     (match_operand:SI 1 "register_operand"   "r")] CUSTOM_NP)]
253.9294 ++  ""
253.9295 ++  "custom\\t%0, zero, %1, zero"
253.9296 ++  [(set_attr "type" "custom")])
253.9297 ++
253.9298 ++(define_insn "custom_nii"
253.9299 ++  [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
253.9300 ++                     (match_operand:SI 1 "register_operand"   "r")
253.9301 ++                     (match_operand:SI 2 "register_operand"   "r")] CUSTOM_NII)]
253.9302 ++  ""
253.9303 ++  "custom\\t%0, zero, %1, %2"
253.9304 ++  [(set_attr "type" "custom")])
253.9305 ++
253.9306 ++(define_insn "custom_nif"
253.9307 ++  [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
253.9308 ++                     (match_operand:SI 1 "register_operand"   "r")
253.9309 ++                     (match_operand:SF 2 "register_operand"   "r")] CUSTOM_NIF)]
253.9310 ++  ""
253.9311 ++  "custom\\t%0, zero, %1, %2"
253.9312 ++  [(set_attr "type" "custom")])
253.9313 ++
253.9314 ++(define_insn "custom_nip"
253.9315 ++  [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
253.9316 ++                     (match_operand:SI 1 "register_operand"   "r")
253.9317 ++                     (match_operand:SI 2 "register_operand"   "r")] CUSTOM_NIP)]
253.9318 ++  ""
253.9319 ++  "custom\\t%0, zero, %1, %2"
253.9320 ++  [(set_attr "type" "custom")])
253.9321 ++
253.9322 ++(define_insn "custom_nfi"
253.9323 ++  [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
253.9324 ++                     (match_operand:SF 1 "register_operand"   "r")
253.9325 ++                     (match_operand:SI 2 "register_operand"   "r")] CUSTOM_NFI)]
253.9326 ++  ""
253.9327 ++  "custom\\t%0, zero, %1, %2"
253.9328 ++  [(set_attr "type" "custom")])
253.9329 ++
253.9330 ++(define_insn "custom_nff"
253.9331 ++  [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
253.9332 ++                     (match_operand:SF 1 "register_operand"   "r")
253.9333 ++                     (match_operand:SF 2 "register_operand"   "r")] CUSTOM_NFF)]
253.9334 ++  ""
253.9335 ++  "custom\\t%0, zero, %1, %2"
253.9336 ++  [(set_attr "type" "custom")])
253.9337 ++
253.9338 ++(define_insn "custom_nfp"
253.9339 ++  [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
253.9340 ++                     (match_operand:SF 1 "register_operand"   "r")
253.9341 ++                     (match_operand:SI 2 "register_operand"   "r")] CUSTOM_NFP)]
253.9342 ++  ""
253.9343 ++  "custom\\t%0, zero, %1, %2"
253.9344 ++  [(set_attr "type" "custom")])
253.9345 ++
253.9346 ++(define_insn "custom_npi"
253.9347 ++  [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
253.9348 ++                     (match_operand:SI 1 "register_operand"   "r")
253.9349 ++                     (match_operand:SI 2 "register_operand"   "r")] CUSTOM_NPI)]
253.9350 ++  ""
253.9351 ++  "custom\\t%0, zero, %1, %2"
253.9352 ++  [(set_attr "type" "custom")])
253.9353 ++
253.9354 ++(define_insn "custom_npf"
253.9355 ++  [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
253.9356 ++                     (match_operand:SI 1 "register_operand"   "r")
253.9357 ++                     (match_operand:SF 2 "register_operand"   "r")] CUSTOM_NPF)]
253.9358 ++  ""
253.9359 ++  "custom\\t%0, zero, %1, %2"
253.9360 ++  [(set_attr "type" "custom")])
253.9361 ++
253.9362 ++(define_insn "custom_npp"
253.9363 ++  [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
253.9364 ++                     (match_operand:SI 1 "register_operand"   "r")
253.9365 ++                     (match_operand:SI 2 "register_operand"   "r")] CUSTOM_NPP)]
253.9366 ++  ""
253.9367 ++  "custom\\t%0, zero, %1, %2"
253.9368 ++  [(set_attr "type" "custom")])
253.9369 ++
253.9370 ++
253.9371 ++
253.9372 ++(define_insn "custom_in"
253.9373 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9374 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_IN))]
253.9375 ++  ""
253.9376 ++  "custom\\t%1, %0, zero, zero"
253.9377 ++  [(set_attr "type" "custom")])
253.9378 ++
253.9379 ++(define_insn "custom_ini"
253.9380 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9381 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9382 ++                          (match_operand:SI 2 "register_operand"   "r")] CUSTOM_INI))]
253.9383 ++  ""
253.9384 ++  "custom\\t%1, %0, %2, zero"
253.9385 ++  [(set_attr "type" "custom")])
253.9386 ++
253.9387 ++(define_insn "custom_inf"
253.9388 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9389 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9390 ++                          (match_operand:SF 2 "register_operand"   "r")] CUSTOM_INF))]
253.9391 ++  ""
253.9392 ++  "custom\\t%1, %0, %2, zero"
253.9393 ++  [(set_attr "type" "custom")])
253.9394 ++
253.9395 ++(define_insn "custom_inp"
253.9396 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9397 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9398 ++                          (match_operand:SI 2 "register_operand"   "r")] CUSTOM_INP))]
253.9399 ++  ""
253.9400 ++  "custom\\t%1, %0, %2, zero"
253.9401 ++  [(set_attr "type" "custom")])
253.9402 ++
253.9403 ++(define_insn "custom_inii"
253.9404 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9405 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9406 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9407 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_INII))]
253.9408 ++  ""
253.9409 ++  "custom\\t%1, %0, %2, %3"
253.9410 ++  [(set_attr "type" "custom")])
253.9411 ++
253.9412 ++(define_insn "custom_inif"
253.9413 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9414 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9415 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9416 ++                          (match_operand:SF 3 "register_operand"   "r")] CUSTOM_INIF))]
253.9417 ++  ""
253.9418 ++  "custom\\t%1, %0, %2, %3"
253.9419 ++  [(set_attr "type" "custom")])
253.9420 ++
253.9421 ++(define_insn "custom_inip"
253.9422 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9423 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9424 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9425 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_INIP))]
253.9426 ++  ""
253.9427 ++  "custom\\t%1, %0, %2, %3"
253.9428 ++  [(set_attr "type" "custom")])
253.9429 ++
253.9430 ++(define_insn "custom_infi"
253.9431 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9432 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9433 ++                          (match_operand:SF 2 "register_operand"   "r")
253.9434 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_INFI))]
253.9435 ++  ""
253.9436 ++  "custom\\t%1, %0, %2, %3"
253.9437 ++  [(set_attr "type" "custom")])
253.9438 ++
253.9439 ++(define_insn "custom_inff"
253.9440 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9441 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9442 ++                          (match_operand:SF 2 "register_operand"   "r")
253.9443 ++                          (match_operand:SF 3 "register_operand"   "r")] CUSTOM_INFF))]
253.9444 ++  ""
253.9445 ++  "custom\\t%1, %0, %2, %3"
253.9446 ++  [(set_attr "type" "custom")])
253.9447 ++
253.9448 ++(define_insn "custom_infp"
253.9449 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9450 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9451 ++                          (match_operand:SF 2 "register_operand"   "r")
253.9452 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_INFP))]
253.9453 ++  ""
253.9454 ++  "custom\\t%1, %0, %2, %3"
253.9455 ++  [(set_attr "type" "custom")])
253.9456 ++
253.9457 ++(define_insn "custom_inpi"
253.9458 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9459 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9460 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9461 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_INPI))]
253.9462 ++  ""
253.9463 ++  "custom\\t%1, %0, %2, %3"
253.9464 ++  [(set_attr "type" "custom")])
253.9465 ++
253.9466 ++(define_insn "custom_inpf"
253.9467 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9468 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9469 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9470 ++                          (match_operand:SF 3 "register_operand"   "r")] CUSTOM_INPF))]
253.9471 ++  ""
253.9472 ++  "custom\\t%1, %0, %2, %3"
253.9473 ++  [(set_attr "type" "custom")])
253.9474 ++
253.9475 ++(define_insn "custom_inpp"
253.9476 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9477 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9478 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9479 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_INPP))]
253.9480 ++  ""
253.9481 ++  "custom\\t%1, %0, %2, %3"
253.9482 ++  [(set_attr "type" "custom")])
253.9483 ++
253.9484 ++
253.9485 ++
253.9486 ++
253.9487 ++
253.9488 ++(define_insn "custom_fn"
253.9489 ++  [(set (match_operand:SF 0 "register_operand"   "=r")
253.9490 ++        (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_FN))]
253.9491 ++  ""
253.9492 ++  "custom\\t%1, %0, zero, zero"
253.9493 ++  [(set_attr "type" "custom")])
253.9494 ++
253.9495 ++(define_insn "custom_fni"
253.9496 ++  [(set (match_operand:SF 0 "register_operand"   "=r")
253.9497 ++        (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9498 ++                          (match_operand:SI 2 "register_operand"   "r")] CUSTOM_FNI))]
253.9499 ++  ""
253.9500 ++  "custom\\t%1, %0, %2, zero"
253.9501 ++  [(set_attr "type" "custom")])
253.9502 ++
253.9503 ++(define_insn "custom_fnf"
253.9504 ++  [(set (match_operand:SF 0 "register_operand"   "=r")
253.9505 ++        (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9506 ++                          (match_operand:SF 2 "register_operand"   "r")] CUSTOM_FNF))]
253.9507 ++  ""
253.9508 ++  "custom\\t%1, %0, %2, zero"
253.9509 ++  [(set_attr "type" "custom")])
253.9510 ++
253.9511 ++(define_insn "custom_fnp"
253.9512 ++  [(set (match_operand:SF 0 "register_operand"   "=r")
253.9513 ++        (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9514 ++                          (match_operand:SI 2 "register_operand"   "r")] CUSTOM_FNP))]
253.9515 ++  ""
253.9516 ++  "custom\\t%1, %0, %2, zero"
253.9517 ++  [(set_attr "type" "custom")])
253.9518 ++
253.9519 ++(define_insn "custom_fnii"
253.9520 ++  [(set (match_operand:SF 0 "register_operand"   "=r")
253.9521 ++        (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9522 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9523 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_FNII))]
253.9524 ++  ""
253.9525 ++  "custom\\t%1, %0, %2, %3"
253.9526 ++  [(set_attr "type" "custom")])
253.9527 ++
253.9528 ++(define_insn "custom_fnif"
253.9529 ++  [(set (match_operand:SF 0 "register_operand"   "=r")
253.9530 ++        (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9531 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9532 ++                          (match_operand:SF 3 "register_operand"   "r")] CUSTOM_FNIF))]
253.9533 ++  ""
253.9534 ++  "custom\\t%1, %0, %2, %3"
253.9535 ++  [(set_attr "type" "custom")])
253.9536 ++
253.9537 ++(define_insn "custom_fnip"
253.9538 ++  [(set (match_operand:SF 0 "register_operand"   "=r")
253.9539 ++        (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9540 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9541 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_FNIP))]
253.9542 ++  ""
253.9543 ++  "custom\\t%1, %0, %2, %3"
253.9544 ++  [(set_attr "type" "custom")])
253.9545 ++
253.9546 ++(define_insn "custom_fnfi"
253.9547 ++  [(set (match_operand:SF 0 "register_operand"   "=r")
253.9548 ++        (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9549 ++                          (match_operand:SF 2 "register_operand"   "r")
253.9550 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_FNFI))]
253.9551 ++  ""
253.9552 ++  "custom\\t%1, %0, %2, %3"
253.9553 ++  [(set_attr "type" "custom")])
253.9554 ++
253.9555 ++(define_insn "custom_fnff"
253.9556 ++  [(set (match_operand:SF 0 "register_operand"   "=r")
253.9557 ++        (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9558 ++                          (match_operand:SF 2 "register_operand"   "r")
253.9559 ++                          (match_operand:SF 3 "register_operand"   "r")] CUSTOM_FNFF))]
253.9560 ++  ""
253.9561 ++  "custom\\t%1, %0, %2, %3"
253.9562 ++  [(set_attr "type" "custom")])
253.9563 ++
253.9564 ++(define_insn "custom_fnfp"
253.9565 ++  [(set (match_operand:SF 0 "register_operand"   "=r")
253.9566 ++        (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9567 ++                          (match_operand:SF 2 "register_operand"   "r")
253.9568 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_FNFP))]
253.9569 ++  ""
253.9570 ++  "custom\\t%1, %0, %2, %3"
253.9571 ++  [(set_attr "type" "custom")])
253.9572 ++
253.9573 ++(define_insn "custom_fnpi"
253.9574 ++  [(set (match_operand:SF 0 "register_operand"   "=r")
253.9575 ++        (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9576 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9577 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_FNPI))]
253.9578 ++  ""
253.9579 ++  "custom\\t%1, %0, %2, %3"
253.9580 ++  [(set_attr "type" "custom")])
253.9581 ++
253.9582 ++(define_insn "custom_fnpf"
253.9583 ++  [(set (match_operand:SF 0 "register_operand"   "=r")
253.9584 ++        (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9585 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9586 ++                          (match_operand:SF 3 "register_operand"   "r")] CUSTOM_FNPF))]
253.9587 ++  ""
253.9588 ++  "custom\\t%1, %0, %2, %3"
253.9589 ++  [(set_attr "type" "custom")])
253.9590 ++
253.9591 ++(define_insn "custom_fnpp"
253.9592 ++  [(set (match_operand:SF 0 "register_operand"   "=r")
253.9593 ++        (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9594 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9595 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_FNPP))]
253.9596 ++  ""
253.9597 ++  "custom\\t%1, %0, %2, %3"
253.9598 ++  [(set_attr "type" "custom")])
253.9599 ++
253.9600 ++
253.9601 ++
253.9602 ++(define_insn "custom_pn"
253.9603 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9604 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_PN))]
253.9605 ++  ""
253.9606 ++  "custom\\t%1, %0, zero, zero"
253.9607 ++  [(set_attr "type" "custom")])
253.9608 ++
253.9609 ++(define_insn "custom_pni"
253.9610 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9611 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9612 ++                          (match_operand:SI 2 "register_operand"   "r")] CUSTOM_PNI))]
253.9613 ++  ""
253.9614 ++  "custom\\t%1, %0, %2, zero"
253.9615 ++  [(set_attr "type" "custom")])
253.9616 ++
253.9617 ++(define_insn "custom_pnf"
253.9618 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9619 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9620 ++                          (match_operand:SF 2 "register_operand"   "r")] CUSTOM_PNF))]
253.9621 ++  ""
253.9622 ++  "custom\\t%1, %0, %2, zero"
253.9623 ++  [(set_attr "type" "custom")])
253.9624 ++
253.9625 ++(define_insn "custom_pnp"
253.9626 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9627 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9628 ++                          (match_operand:SI 2 "register_operand"   "r")] CUSTOM_PNP))]
253.9629 ++  ""
253.9630 ++  "custom\\t%1, %0, %2, zero"
253.9631 ++  [(set_attr "type" "custom")])
253.9632 ++
253.9633 ++(define_insn "custom_pnii"
253.9634 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9635 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9636 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9637 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_PNII))]
253.9638 ++  ""
253.9639 ++  "custom\\t%1, %0, %2, %3"
253.9640 ++  [(set_attr "type" "custom")])
253.9641 ++
253.9642 ++(define_insn "custom_pnif"
253.9643 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9644 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9645 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9646 ++                          (match_operand:SF 3 "register_operand"   "r")] CUSTOM_PNIF))]
253.9647 ++  ""
253.9648 ++  "custom\\t%1, %0, %2, %3"
253.9649 ++  [(set_attr "type" "custom")])
253.9650 ++
253.9651 ++(define_insn "custom_pnip"
253.9652 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9653 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9654 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9655 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_PNIP))]
253.9656 ++  ""
253.9657 ++  "custom\\t%1, %0, %2, %3"
253.9658 ++  [(set_attr "type" "custom")])
253.9659 ++
253.9660 ++(define_insn "custom_pnfi"
253.9661 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9662 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9663 ++                          (match_operand:SF 2 "register_operand"   "r")
253.9664 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_PNFI))]
253.9665 ++  ""
253.9666 ++  "custom\\t%1, %0, %2, %3"
253.9667 ++  [(set_attr "type" "custom")])
253.9668 ++
253.9669 ++(define_insn "custom_pnff"
253.9670 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9671 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9672 ++                          (match_operand:SF 2 "register_operand"   "r")
253.9673 ++                          (match_operand:SF 3 "register_operand"   "r")] CUSTOM_PNFF))]
253.9674 ++  ""
253.9675 ++  "custom\\t%1, %0, %2, %3"
253.9676 ++  [(set_attr "type" "custom")])
253.9677 ++
253.9678 ++(define_insn "custom_pnfp"
253.9679 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9680 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9681 ++                          (match_operand:SF 2 "register_operand"   "r")
253.9682 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_PNFP))]
253.9683 ++  ""
253.9684 ++  "custom\\t%1, %0, %2, %3"
253.9685 ++  [(set_attr "type" "custom")])
253.9686 ++
253.9687 ++(define_insn "custom_pnpi"
253.9688 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9689 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9690 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9691 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_PNPI))]
253.9692 ++  ""
253.9693 ++  "custom\\t%1, %0, %2, %3"
253.9694 ++  [(set_attr "type" "custom")])
253.9695 ++
253.9696 ++(define_insn "custom_pnpf"
253.9697 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9698 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9699 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9700 ++                          (match_operand:SF 3 "register_operand"   "r")] CUSTOM_PNPF))]
253.9701 ++  ""
253.9702 ++  "custom\\t%1, %0, %2, %3"
253.9703 ++  [(set_attr "type" "custom")])
253.9704 ++
253.9705 ++(define_insn "custom_pnpp"
253.9706 ++  [(set (match_operand:SI 0 "register_operand"   "=r")
253.9707 ++        (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
253.9708 ++                          (match_operand:SI 2 "register_operand"   "r")
253.9709 ++                          (match_operand:SI 3 "register_operand"   "r")] CUSTOM_PNPP))]
253.9710 ++  ""
253.9711 ++  "custom\\t%1, %0, %2, %3"
253.9712 ++  [(set_attr "type" "custom")])
253.9713 ++
253.9714 ++
253.9715 ++
253.9716 ++
253.9717 ++
253.9718 ++
253.9719 ++;*****************************************************************************
253.9720 ++;*
253.9721 ++;* Misc
253.9722 ++;*
253.9723 ++;*****************************************************************************
253.9724 ++
253.9725 ++(define_insn "nop"
253.9726 ++  [(const_int 0)]
253.9727 ++  ""
253.9728 ++  "nop\\t"
253.9729 ++  [(set_attr "type" "alu")])
253.9730 ++
253.9731 ++(define_insn "sync"
253.9732 ++  [(unspec_volatile [(const_int 0)] UNSPEC_SYNC)]
253.9733 ++  ""
253.9734 ++  "sync\\t"
253.9735 ++  [(set_attr "type" "control")])
253.9736 ++
253.9737 ++
253.9738 ++(define_insn "rdctl"
253.9739 ++  [(set (match_operand:SI 0 "register_operand" "=r")
253.9740 ++	(unspec_volatile:SI [(match_operand:SI 1 "rdwrctl_operand" "O")] UNSPEC_RDCTL))]
253.9741 ++  ""
253.9742 ++  "rdctl\\t%0, ctl%1"
253.9743 ++  [(set_attr "type" "control")])
253.9744 ++
253.9745 ++(define_insn "wrctl"
253.9746 ++  [(unspec_volatile:SI [(match_operand:SI 0 "rdwrctl_operand"  "O")
253.9747 ++                        (match_operand:SI 1 "register_operand" "r")] UNSPEC_WRCTL)]
253.9748 ++  ""
253.9749 ++  "wrctl\\tctl%0, %1"
253.9750 ++  [(set_attr "type" "control")])
253.9751 ++
253.9752 ++
253.9753 ++
253.9754 ++;*****************************************************************************
253.9755 ++;*
253.9756 ++;* Peepholes
253.9757 ++;*
253.9758 ++;*****************************************************************************
253.9759 ++
253.9760 ++
253.9761 +--- gcc-3.4.3/gcc/config/nios2/t-nios2
253.9762 ++++ gcc-3.4.3-nios2/gcc/config/nios2/t-nios2
253.9763 +@@ -0,0 +1,123 @@
253.9764 ++##
253.9765 ++## Compiler flags to use when compiling libgcc2.c.
253.9766 ++##
253.9767 ++## LIB2FUNCS_EXTRA
253.9768 ++## A list of source file names to be compiled or assembled and inserted into libgcc.a.
253.9769 ++
253.9770 ++LIB2FUNCS_EXTRA=$(srcdir)/config/nios2/lib2-divmod.c \
253.9771 ++  $(srcdir)/config/nios2/lib2-divmod-hi.c \
253.9772 ++  $(srcdir)/config/nios2/lib2-divtable.c \
253.9773 ++  $(srcdir)/config/nios2/lib2-mul.c
253.9774 ++
253.9775 ++##
253.9776 ++## Floating Point Emulation
253.9777 ++## To have GCC include software floating point libraries in libgcc.a define FPBIT
253.9778 ++## and DPBIT along with a few rules as follows:
253.9779 ++##
253.9780 ++## # We want fine grained libraries, so use the new code
253.9781 ++## # to build the floating point emulation libraries.
253.9782 ++FPBIT=$(srcdir)/config/nios2/nios2-fp-bit.c
253.9783 ++DPBIT=$(srcdir)/config/nios2/nios2-dp-bit.c
253.9784 ++
253.9785 ++TARGET_LIBGCC2_CFLAGS = -O2
253.9786 ++
253.9787 ++# FLOAT_ONLY - no doubles
253.9788 ++# SMALL_MACHINE - QI/HI is faster than SI
253.9789 ++#     Actually SMALL_MACHINE uses chars and shorts instead of ints
253.9790 ++#     since ints (16-bit ones as they are today) are at least as fast
253.9791 ++#     as chars and shorts, don't define SMALL_MACHINE
253.9792 ++# CMPtype - type returned by FP compare, i.e. INT (hard coded in fp-bit - see code )
253.9793 ++
253.9794 ++$(FPBIT): $(srcdir)/config/fp-bit.c Makefile
253.9795 ++	echo '#define FLOAT'          >  ${FPBIT}
253.9796 ++	cat $(srcdir)/config/fp-bit.c >> ${FPBIT}
253.9797 ++
253.9798 ++$(DPBIT): $(srcdir)/config/fp-bit.c Makefile
253.9799 ++	echo ''          >  ${DPBIT}
253.9800 ++	cat $(srcdir)/config/fp-bit.c >> ${DPBIT}
253.9801 ++
253.9802 ++EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o 
253.9803 ++
253.9804 ++# Assemble startup files. 
253.9805 ++$(T)crti.o: $(srcdir)/config/nios2/crti.asm $(GCC_PASSES) 
253.9806 ++	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
253.9807 ++	-c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/nios2/crti.asm 
253.9808 ++
253.9809 ++$(T)crtn.o: $(srcdir)/config/nios2/crtn.asm $(GCC_PASSES) 
253.9810 ++	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
253.9811 ++	-c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/nios2/crtn.asm 
253.9812 ++
253.9813 ++
253.9814 ++## You may need to provide additional #defines at the beginning of
253.9815 ++## fp-bit.c and dp-bit.c to control target endianness and other options
253.9816 ++##
253.9817 ++## CRTSTUFF_T_CFLAGS
253.9818 ++## Special flags used when compiling crtstuff.c.  See Initialization.
253.9819 ++##
253.9820 ++## CRTSTUFF_T_CFLAGS_S
253.9821 ++## Special flags used when compiling crtstuff.c for shared linking.  Used
253.9822 ++## if you use crtbeginS.o and crtendS.o in EXTRA-PARTS. See Initialization.
253.9823 ++##
253.9824 ++## MULTILIB_OPTIONS
253.9825 ++## For some targets, invoking GCC in different ways produces objects that
253.9826 ++## can not be linked together.  For example, for some targets GCC produces
253.9827 ++## both big and little endian code.  For these targets, you must arrange
253.9828 ++## for multiple versions of libgcc.a to be compiled, one for each set of
253.9829 ++## incompatible options.  When GCC invokes the linker, it arranges to link
253.9830 ++## in the right version of libgcc.a, based on the command line options
253.9831 ++## used.
253.9832 ++## The MULTILIB_OPTIONS macro lists the set of options for which special
253.9833 ++## versions of libgcc.a must be built.  Write options that are mutually
253.9834 ++## incompatible side by side, separated by a slash.  Write options that may
253.9835 ++## be used together separated by a space.  The build procedure will build
253.9836 ++## all combinations of compatible options.
253.9837 ++##
253.9838 ++## For example, if you set MULTILIB_OPTIONS to m68000/m68020 msoft-float,
253.9839 ++## Makefile will build special versions of libgcc.a using the following
253.9840 ++## sets of options: -m68000, -m68020, -msoft-float, -m68000 -msoft-float,
253.9841 ++## and -m68020 -msoft-float.
253.9842 ++
253.9843 ++MULTILIB_OPTIONS = mno-hw-mul mhw-mulx
253.9844 ++
253.9845 ++## MULTILIB_DIRNAMES
253.9846 ++## If MULTILIB_OPTIONS is used, this variable specifies the directory names
253.9847 ++## that should be used to hold the various libraries.  Write one element in
253.9848 ++## MULTILIB_DIRNAMES for each element in MULTILIB_OPTIONS. If
253.9849 ++## MULTILIB_DIRNAMES is not used, the default value will be
253.9850 ++## MULTILIB_OPTIONS, with all slashes treated as spaces.
253.9851 ++## For example, if MULTILIB_OPTIONS is set to m68000/m68020 msoft-float,
253.9852 ++## then the default value of MULTILIB_DIRNAMES is m68000 m68020
253.9853 ++## msoft-float.  You may specify a different value if you desire a
253.9854 ++## different set of directory names.
253.9855 ++
253.9856 ++# MULTILIB_DIRNAMES =
253.9857 ++
253.9858 ++## MULTILIB_MATCHES
253.9859 ++## Sometimes the same option may be written in two different ways.  If an
253.9860 ++## option is listed in MULTILIB_OPTIONS, GCC needs to know about any
253.9861 ++## synonyms.  In that case, set MULTILIB_MATCHES to a list of items of the
253.9862 ++## form option=option to describe all relevant synonyms.  For example,
253.9863 ++## m68000=mc68000 m68020=mc68020.
253.9864 ++##
253.9865 ++## MULTILIB_EXCEPTIONS
253.9866 ++## Sometimes when there are multiple sets of MULTILIB_OPTIONS being
253.9867 ++## specified, there are combinations that should not be built.  In that
253.9868 ++## case, set MULTILIB_EXCEPTIONS to be all of the switch exceptions in
253.9869 ++## shell case syntax that should not be built.
253.9870 ++## For example, in the PowerPC embedded ABI support, it is not desirable to
253.9871 ++## build libraries compiled with the -mcall-aix option and either of the
253.9872 ++## -fleading-underscore or -mlittle options at the same time.  Therefore
253.9873 ++## MULTILIB_EXCEPTIONS is set to
253.9874 ++##
253.9875 ++## *mcall-aix/*fleading-underscore* *mlittle/*mcall-aix*
253.9876 ++##
253.9877 ++
253.9878 ++MULTILIB_EXCEPTIONS = *mno-hw-mul/*mhw-mulx*
253.9879 ++
253.9880 ++##
253.9881 ++## MULTILIB_EXTRA_OPTS Sometimes it is desirable that when building
253.9882 ++## multiple versions of libgcc.a certain options should always be passed on
253.9883 ++## to the compiler.  In that case, set MULTILIB_EXTRA_OPTS to be the list
253.9884 ++## of options to be used for all builds.
253.9885 ++##
253.9886 ++
253.9887 +--- gcc-3.4.3/gcc/config.gcc
253.9888 ++++ gcc-3.4.3-nios2/gcc/config.gcc
253.9889 +@@ -1321,6 +1321,10 @@ m32rle-*-linux*)
253.9890 + 		thread_file='posix'
253.9891 + 	fi
253.9892 + 	;;
253.9893 ++# JBG
253.9894 ++nios2-*-* | nios2-*-*)
253.9895 ++	tm_file="elfos.h ${tm_file}"
253.9896 ++	;;
253.9897 + # m68hc11 and m68hc12 share the same machine description.
253.9898 + m68hc11-*-*|m6811-*-*)
253.9899 + 	tm_file="dbxelf.h elfos.h m68hc11/m68hc11.h"
253.9900 +--- gcc-3.4.3/gcc/cse.c
253.9901 ++++ gcc-3.4.3-nios2/gcc/cse.c
253.9902 +@@ -3134,6 +3134,10 @@ find_comparison_args (enum rtx_code code
253.9903 + #ifdef FLOAT_STORE_FLAG_VALUE
253.9904 + 	  REAL_VALUE_TYPE fsfv;
253.9905 + #endif
253.9906 ++#ifdef __nios2__
253.9907 ++	  if (p->is_const)
253.9908 ++	    break;
253.9909 ++#endif
253.9910 + 
253.9911 + 	  /* If the entry isn't valid, skip it.  */
253.9912 + 	  if (! exp_equiv_p (p->exp, p->exp, 1, 0))
253.9913 +--- gcc-3.4.3/gcc/doc/extend.texi
253.9914 ++++ gcc-3.4.3-nios2/gcc/doc/extend.texi
253.9915 +@@ -5636,12 +5636,118 @@ to those machines.  Generally these gene
253.9916 + instructions, but allow the compiler to schedule those calls.
253.9917 + 
253.9918 + @menu
253.9919 ++* Altera Nios II Built-in Functions::
253.9920 + * Alpha Built-in Functions::
253.9921 + * ARM Built-in Functions::
253.9922 + * X86 Built-in Functions::
253.9923 + * PowerPC AltiVec Built-in Functions::
253.9924 + @end menu
253.9925 + 
253.9926 ++@node Altera Nios II Built-in Functions
253.9927 ++@subsection Altera Nios II Built-in Functions
253.9928 ++
253.9929 ++These built-in functions are available for the Altera Nios II
253.9930 ++family of processors.
253.9931 ++
253.9932 ++The following built-in functions are always available.  They
253.9933 ++all generate the machine instruction that is part of the name.
253.9934 ++
253.9935 ++@example
253.9936 ++int __builtin_ldbio (volatile const void *)
253.9937 ++int __builtin_ldbuio (volatile const void *)
253.9938 ++int __builtin_ldhio (volatile const void *)
253.9939 ++int __builtin_ldhuio (volatile const void *)
253.9940 ++int __builtin_ldwio (volatile const void *)
253.9941 ++void __builtin_stbio (volatile void *, int)
253.9942 ++void __builtin_sthio (volatile void *, int)
253.9943 ++void __builtin_stwio (volatile void *, int)
253.9944 ++void __builtin_sync (void)
253.9945 ++int __builtin_rdctl (int) 
253.9946 ++void __builtin_wrctl (int, int)
253.9947 ++@end example
253.9948 ++
253.9949 ++The following built-in functions are always available.  They
253.9950 ++all generate a Nios II Custom Instruction. The name of the 
253.9951 ++function represents the types that the function takes and 
253.9952 ++returns. The letter before the @code{n} is the return type
253.9953 ++or void if absent. The @code{n} represnts the first parameter
253.9954 ++to all the custom instructions, the custom instruction number.
253.9955 ++The two letters after the @code{n} represent the up to two 
253.9956 ++parameters to the function.
253.9957 ++
253.9958 ++The letters reprsent the following data types:
253.9959 ++@table @code
253.9960 ++@item <no letter>
253.9961 ++@code{void} for return type and no parameter for parameter types.
253.9962 ++
253.9963 ++@item i
253.9964 ++@code{int} for return type and parameter type
253.9965 ++
253.9966 ++@item f
253.9967 ++@code{float} for return type and parameter type
253.9968 ++
253.9969 ++@item p
253.9970 ++@code{void *} for return type and parameter type
253.9971 ++
253.9972 ++@end table
253.9973 ++
253.9974 ++And the function names are:
253.9975 ++@example
253.9976 ++void __builtin_custom_n (void)
253.9977 ++void __builtin_custom_ni (int)
253.9978 ++void __builtin_custom_nf (float)
253.9979 ++void __builtin_custom_np (void *)
253.9980 ++void __builtin_custom_nii (int, int)
253.9981 ++void __builtin_custom_nif (int, float)
253.9982 ++void __builtin_custom_nip (int, void *)
253.9983 ++void __builtin_custom_nfi (float, int)
253.9984 ++void __builtin_custom_nff (float, float)
253.9985 ++void __builtin_custom_nfp (float, void *)
253.9986 ++void __builtin_custom_npi (void *, int)
253.9987 ++void __builtin_custom_npf (void *, float)
253.9988 ++void __builtin_custom_npp (void *, void *)
253.9989 ++int __builtin_custom_in (void)
253.9990 ++int __builtin_custom_ini (int)
253.9991 ++int __builtin_custom_inf (float)
253.9992 ++int __builtin_custom_inp (void *)
253.9993 ++int __builtin_custom_inii (int, int)
253.9994 ++int __builtin_custom_inif (int, float)
253.9995 ++int __builtin_custom_inip (int, void *)
253.9996 ++int __builtin_custom_infi (float, int)
253.9997 ++int __builtin_custom_inff (float, float)
253.9998 ++int __builtin_custom_infp (float, void *)
253.9999 ++int __builtin_custom_inpi (void *, int)
253.10000 ++int __builtin_custom_inpf (void *, float)
253.10001 ++int __builtin_custom_inpp (void *, void *)
253.10002 ++float __builtin_custom_fn (void)
253.10003 ++float __builtin_custom_fni (int)
253.10004 ++float __builtin_custom_fnf (float)
253.10005 ++float __builtin_custom_fnp (void *)
253.10006 ++float __builtin_custom_fnii (int, int)
253.10007 ++float __builtin_custom_fnif (int, float)
253.10008 ++float __builtin_custom_fnip (int, void *)
253.10009 ++float __builtin_custom_fnfi (float, int)
253.10010 ++float __builtin_custom_fnff (float, float)
253.10011 ++float __builtin_custom_fnfp (float, void *)
253.10012 ++float __builtin_custom_fnpi (void *, int)
253.10013 ++float __builtin_custom_fnpf (void *, float)
253.10014 ++float __builtin_custom_fnpp (void *, void *)
253.10015 ++void * __builtin_custom_pn (void)
253.10016 ++void * __builtin_custom_pni (int)
253.10017 ++void * __builtin_custom_pnf (float)
253.10018 ++void * __builtin_custom_pnp (void *)
253.10019 ++void * __builtin_custom_pnii (int, int)
253.10020 ++void * __builtin_custom_pnif (int, float)
253.10021 ++void * __builtin_custom_pnip (int, void *)
253.10022 ++void * __builtin_custom_pnfi (float, int)
253.10023 ++void * __builtin_custom_pnff (float, float)
253.10024 ++void * __builtin_custom_pnfp (float, void *)
253.10025 ++void * __builtin_custom_pnpi (void *, int)
253.10026 ++void * __builtin_custom_pnpf (void *, float)
253.10027 ++void * __builtin_custom_pnpp (void *, void *)
253.10028 ++@end example
253.10029 ++
253.10030 ++
253.10031 + @node Alpha Built-in Functions
253.10032 + @subsection Alpha Built-in Functions
253.10033 + 
253.10034 +--- gcc-3.4.3/gcc/doc/invoke.texi
253.10035 ++++ gcc-3.4.3-nios2/gcc/doc/invoke.texi
253.10036 +@@ -337,6 +337,14 @@ in the following sections.
253.10037 + @item Machine Dependent Options
253.10038 + @xref{Submodel Options,,Hardware Models and Configurations}.
253.10039 + 
253.10040 ++@emph{Altera Nios II Options}
253.10041 ++@gccoptlist{-msmallc -mno-bypass-cache -mbypass-cache @gol
253.10042 ++-mno-cache-volatile -mcache-volatile -mno-inline-memcpy @gol 
253.10043 ++-minline-memcpy -mno-fast-sw-div -mfast-sw-div @gol
253.10044 ++-mhw-mul -mno-hw-mul -mhw-mulx -mno-hw-mulx @gol
253.10045 ++-mno-hw-div -mhw-div @gol
253.10046 ++-msys-crt0= -msys-lib= -msys=nosys }
253.10047 ++
253.10048 + @emph{M680x0 Options}
253.10049 + @gccoptlist{-m68000  -m68020  -m68020-40  -m68020-60  -m68030  -m68040 @gol
253.10050 + -m68060  -mcpu32  -m5200  -m68881  -mbitfield  -mc68000  -mc68020   @gol
253.10051 +@@ -5836,6 +5844,7 @@ machine description.  The default for th
253.10052 + that macro, which enables you to change the defaults.
253.10053 + 
253.10054 + @menu
253.10055 ++* Altera Nios II Options::
253.10056 + * M680x0 Options::
253.10057 + * M68hc1x Options::
253.10058 + * VAX Options::
253.10059 +@@ -5871,6 +5880,103 @@ that macro, which enables you to change 
253.10060 + * FRV Options::
253.10061 + @end menu
253.10062 + 
253.10063 ++
253.10064 ++@node Altera Nios II Options
253.10065 ++@subsection Altera Nios II Options
253.10066 ++@cindex Altera Nios II options
253.10067 ++
253.10068 ++These are the @samp{-m} options defined for the Altera Nios II 
253.10069 ++processor.
253.10070 ++
253.10071 ++@table @gcctabopt
253.10072 ++
253.10073 ++@item -msmallc
253.10074 ++@opindex msmallc
253.10075 ++
253.10076 ++Link with a limited version of the C library, -lsmallc. For more 
253.10077 ++information see the C Library Documentation.
253.10078 ++
253.10079 ++
253.10080 ++@item -mbypass-cache
253.10081 ++@itemx -mno-bypass-cache
253.10082 ++@opindex mno-bypass-cache
253.10083 ++@opindex mbypass-cache
253.10084 ++
253.10085 ++Force all load and store instructions to always bypass cache by 
253.10086 ++using io variants of the instructions. The default is to not
253.10087 ++bypass the cache.
253.10088 ++
253.10089 ++@item -mno-cache-volatile 
253.10090 ++@itemx -mcache-volatile       
253.10091 ++@opindex mcache-volatile 
253.10092 ++@opindex mno-cache-volatile
253.10093 ++
253.10094 ++Volatile memory access bypass the cache using the io variants of 
253.10095 ++the ld and st instructions. The default is to cache volatile 
253.10096 ++accesses. 
253.10097 ++
253.10098 ++-mno-cache-volatile is deprecated and will be deleted in a 
253.10099 ++future GCC release.
253.10100 ++
253.10101 ++
253.10102 ++@item -mno-inline-memcpy
253.10103 ++@itemx -minline-memcpy
253.10104 ++@opindex mno-inline-memcpy 
253.10105 ++@opindex minline-memcpy
253.10106 ++
253.10107 ++Do not inline memcpy. The default is to inline when -O is on.
253.10108 ++
253.10109 ++
253.10110 ++@item -mno-fast-sw-div
253.10111 ++@itemx -mfast-sw-div
253.10112 ++@opindex mno-fast-sw-div
253.10113 ++@opindex mfast-sw-div
253.10114 ++
253.10115 ++Do no use table based fast divide for small numbers. The default 
253.10116 ++is to use the fast divide at -O3 and above.
253.10117 ++
253.10118 ++
253.10119 ++@item -mno-hw-mul
253.10120 ++@itemx -mhw-mul
253.10121 ++@itemx -mno-hw-mulx
253.10122 ++@itemx -mhw-mulx
253.10123 ++@itemx -mno-hw-div
253.10124 ++@itemx -mhw-div
253.10125 ++@opindex mno-hw-mul
253.10126 ++@opindex mhw-mul
253.10127 ++@opindex mno-hw-mulx
253.10128 ++@opindex mhw-mulx
253.10129 ++@opindex mno-hw-div
253.10130 ++@opindex mhw-div
253.10131 ++
253.10132 ++Enable or disable emitting @code{mul}, @code{mulx} and @code{div} family of 
253.10133 ++instructions by the compiler. The default is to emit @code{mul}
253.10134 ++and not emit @code{div} and @code{mulx}.
253.10135 ++
253.10136 ++The different combinations of @code{mul} and @code{mulx} instructions 
253.10137 ++generate a different multilib options. 
253.10138 ++
253.10139 ++
253.10140 ++@item -msys-crt0=@var{startfile}
253.10141 ++@opindex msys-crt0
253.10142 ++
253.10143 ++@var{startfile} is the file name  of the startfile (crt0) to use 
253.10144 ++when linking. The default is crt0.o that comes with libgloss
253.10145 ++and is only suitable for use with the instruction set
253.10146 ++simulator.
253.10147 ++
253.10148 ++@item -msys-lib=@var{systemlib}
253.10149 ++@itemx -msys-lib=nosys
253.10150 ++@opindex msys-lib
253.10151 ++
253.10152 ++@var{systemlib} is the library name of the library which provides
253.10153 ++the system calls required by the C library, e.g. @code{read}, @code{write}
253.10154 ++etc. The default is to use nosys, this library provides
253.10155 ++stub implementations of the calls and is part of libgloss.
253.10156 ++
253.10157 ++@end table
253.10158 ++
253.10159 ++
253.10160 + @node M680x0 Options
253.10161 + @subsection M680x0 Options
253.10162 + @cindex M680x0 options
253.10163 +--- gcc-3.4.3/gcc/doc/md.texi
253.10164 ++++ gcc-3.4.3-nios2/gcc/doc/md.texi
253.10165 +@@ -1335,6 +1335,49 @@ However, here is a summary of the machin
253.10166 + available on some particular machines.
253.10167 + 
253.10168 + @table @emph
253.10169 ++
253.10170 ++@item Altera Nios II family---@file{nios2.h}
253.10171 ++@table @code
253.10172 ++
253.10173 ++@item I
253.10174 ++Integer that is valid as an immediate operand in an
253.10175 ++instruction taking a signed 16-bit number. Range
253.10176 ++@minus{}32768 to 32767.
253.10177 ++
253.10178 ++@item J
253.10179 ++Integer that is valid as an immediate operand in an
253.10180 ++instruction taking an unsigned 16-bit number. Range
253.10181 ++0 to 65535.
253.10182 ++
253.10183 ++@item K
253.10184 ++Integer that is valid as an immediate operand in an
253.10185 ++instruction taking only the upper 16-bits of a
253.10186 ++32-bit number. Range 32-bit numbers with the lower
253.10187 ++16-bits being 0.
253.10188 ++
253.10189 ++@item L
253.10190 ++Integer that is valid as an immediate operand for a 
253.10191 ++shift instruction. Range 0 to 31.
253.10192 ++
253.10193 ++
253.10194 ++@item M
253.10195 ++Integer that is valid as an immediate operand for
253.10196 ++only the value 0. Can be used in conjunction with
253.10197 ++the format modifier @code{z} to use @code{r0}
253.10198 ++instead of @code{0} in the assembly output.
253.10199 ++
253.10200 ++@item N
253.10201 ++Integer that is valid as an immediate operand for
253.10202 ++a custom instruction opcode. Range 0 to 255.
253.10203 ++
253.10204 ++@item S
253.10205 ++Matches immediates which are addresses in the small
253.10206 ++data section and therefore can be added to @code{gp}
253.10207 ++as a 16-bit immediate to re-create their 32-bit value.
253.10208 ++
253.10209 ++@end table
253.10210 ++
253.10211 ++
253.10212 + @item ARM family---@file{arm.h}
253.10213 + @table @code
253.10214 + @item f
   254.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   254.2 +++ b/patches/gcc/3.4.4/arm-softfloat.patch	Sat Feb 24 11:00:05 2007 +0000
   254.3 @@ -0,0 +1,270 @@
   254.4 +Note... modified my mjn3 to not conflict with the big endian arm patch.
   254.5 +Warning!!!  Only the linux target is aware of TARGET_ENDIAN_DEFAULT.
   254.6 +Also changed
   254.7 +  #define SUBTARGET_EXTRA_ASM_SPEC "\
   254.8 +  %{!mcpu=*:-mcpu=xscale} \
   254.9 +  %{mhard-float:-mfpu=fpa} \
  254.10 +  %{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
  254.11 +to
  254.12 +  #define SUBTARGET_EXTRA_ASM_SPEC "\
  254.13 +  %{mhard-float:-mfpu=fpa} \
  254.14 +  %{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
  254.15 +in gcc/config/arm/linux-elf.h.
  254.16 +#
  254.17 +# Submitted:
  254.18 +#
  254.19 +# Dimitry Andric <dimitry@andric.com>, 2004-05-01
  254.20 +#
  254.21 +# Description:
  254.22 +#
  254.23 +# Nicholas Pitre released this patch for gcc soft-float support here: 
  254.24 +# http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-October/006436.html
  254.25 +#
  254.26 +# This version has been adapted to work with gcc 3.4.0.
  254.27 +#
  254.28 +# The original patch doesn't distinguish between softfpa and softvfp modes
  254.29 +# in the way Nicholas Pitre probably meant.  His description is:
  254.30 +#
  254.31 +# "Default is to use APCS-32 mode with soft-vfp.  The old Linux default for
  254.32 +# floats can be achieved with -mhard-float or with the configure
  254.33 +# --with-float=hard option.  If -msoft-float or --with-float=soft is used then
  254.34 +# software float support will be used just like the default but with the legacy
  254.35 +# big endian word ordering for double float representation instead."
  254.36 +#
  254.37 +# Which means the following:
  254.38 +#
  254.39 +# * If you compile without -mhard-float or -msoft-float, you should get
  254.40 +#   software floating point, using the VFP format.  The produced object file
  254.41 +#   should have these flags in its header:
  254.42 +#
  254.43 +#     private flags = 600: [APCS-32] [VFP float format] [software FP]
  254.44 +#
  254.45 +# * If you compile with -mhard-float, you should get hardware floating point,
  254.46 +#   which always uses the FPA format.  Object file header flags should be:
  254.47 +#
  254.48 +#     private flags = 0: [APCS-32] [FPA float format]
  254.49 +#
  254.50 +# * If you compile with -msoft-float, you should get software floating point,
  254.51 +#   using the FPA format.  This is done for compatibility reasons with many
  254.52 +#   existing distributions.  Object file header flags should be:
  254.53 +#
  254.54 +#     private flags = 200: [APCS-32] [FPA float format] [software FP]
  254.55 +#
  254.56 +# The original patch from Nicholas Pitre contained the following constructs:
  254.57 +#
  254.58 +#   #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
  254.59 +#     %{mhard-float:-mfpu=fpa} \
  254.60 +#     %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
  254.61 +#
  254.62 +# However, gcc doesn't accept this ";:" notation, used in the 3rd line.  This
  254.63 +# is probably the reason Robert Schwebel modified it to:
  254.64 +#
  254.65 +#   #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
  254.66 +#     %{mhard-float:-mfpu=fpa} \
  254.67 +#     %{!mhard-float: %{msoft-float:-mfpu=softfpa -mfpu=softvfp}}"
  254.68 +#
  254.69 +# But this causes the following behaviour:
  254.70 +#
  254.71 +# * If you compile without -mhard-float or -msoft-float, the compiler generates
  254.72 +#   software floating point instructions, but *nothing* is passed to the
  254.73 +#   assembler, which results in an object file which has flags:
  254.74 +#
  254.75 +#     private flags = 0: [APCS-32] [FPA float format]
  254.76 +#
  254.77 +#   This is not correct!
  254.78 +#
  254.79 +# * If you compile with -mhard-float, the compiler generates hardware floating
  254.80 +#   point instructions, and passes "-mfpu=fpa" to the assembler, which results
  254.81 +#   in an object file which has the same flags as in the previous item, but now
  254.82 +#   those *are* correct.
  254.83 +#    
  254.84 +# * If you compile with -msoft-float, the compiler generates software floating
  254.85 +#   point instructions, and passes "-mfpu=softfpa -mfpu=softvfp" (in that
  254.86 +#   order) to the assembler, which results in an object file with flags:
  254.87 +#
  254.88 +#   private flags = 600: [APCS-32] [VFP float format] [software FP]
  254.89 +#
  254.90 +#   This is not correct, because the last "-mfpu=" option on the assembler
  254.91 +#   command line determines the actual FPU convention used (which should be FPA
  254.92 +#   in this case).
  254.93 +#
  254.94 +# Therefore, I modified this patch to get the desired behaviour.  Every
  254.95 +# instance of the notation:
  254.96 +#
  254.97 +#   %{msoft-float:-mfpu=softfpa -mfpu=softvfp}
  254.98 +#
  254.99 +# was changed to:
 254.100 +#
 254.101 +#   %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}
 254.102 +#
 254.103 +# I also did the following:
 254.104 +# 
 254.105 +# * Modified all TARGET_DEFAULT macros I could find to include ARM_FLAG_VFP, to
 254.106 +#   be consistent with Nicholas' original patch.
 254.107 +# * Removed any "msoft-float" or "mhard-float" from all MULTILIB_DEFAULTS
 254.108 +#   macros I could find.  I think that if you compile without any options, you
 254.109 +#   would like to get the defaults. :)
 254.110 +# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
 254.111 +#   anymore.  (The required functions are now in libgcc.)
 254.112 +
 254.113 +diff -urN gcc-3.4.1-old/gcc/config/arm/coff.h gcc-3.4.1/gcc/config/arm/coff.h
 254.114 +--- gcc-3.4.1-old/gcc/config/arm/coff.h	2004-02-24 08:25:22.000000000 -0600
 254.115 ++++ gcc-3.4.1/gcc/config/arm/coff.h	2004-09-02 21:51:15.000000000 -0500
 254.116 +@@ -31,11 +31,16 @@
 254.117 + #define TARGET_VERSION fputs (" (ARM/coff)", stderr)
 254.118 + 
 254.119 + #undef  TARGET_DEFAULT
 254.120 +-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
 254.121 ++#define TARGET_DEFAULT		\
 254.122 ++	( ARM_FLAG_SOFT_FLOAT	\
 254.123 ++	| ARM_FLAG_VFP		\
 254.124 ++	| ARM_FLAG_APCS_32	\
 254.125 ++	| ARM_FLAG_APCS_FRAME	\
 254.126 ++	| ARM_FLAG_MMU_TRAPS )
 254.127 + 
 254.128 + #ifndef MULTILIB_DEFAULTS
 254.129 + #define MULTILIB_DEFAULTS \
 254.130 +-  { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
 254.131 ++  { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" }
 254.132 + #endif
 254.133 + 
 254.134 + /* This is COFF, but prefer stabs.  */
 254.135 +diff -urN gcc-3.4.1-old/gcc/config/arm/elf.h gcc-3.4.1/gcc/config/arm/elf.h
 254.136 +--- gcc-3.4.1-old/gcc/config/arm/elf.h	2004-02-24 08:25:22.000000000 -0600
 254.137 ++++ gcc-3.4.1/gcc/config/arm/elf.h	2004-09-02 21:51:15.000000000 -0500
 254.138 +@@ -46,7 +46,9 @@
 254.139 + 
 254.140 + #ifndef SUBTARGET_ASM_FLOAT_SPEC
 254.141 + #define SUBTARGET_ASM_FLOAT_SPEC "\
 254.142 +-%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}"
 254.143 ++%{mapcs-float:-mfloat} \
 254.144 ++%{mhard-float:-mfpu=fpa} \
 254.145 ++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
 254.146 + #endif
 254.147 + 
 254.148 + #ifndef ASM_SPEC
 254.149 +@@ -106,12 +108,17 @@
 254.150 + #endif
 254.151 + 
 254.152 + #ifndef TARGET_DEFAULT
 254.153 +-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
 254.154 ++#define TARGET_DEFAULT		\
 254.155 ++	( ARM_FLAG_SOFT_FLOAT	\
 254.156 ++	| ARM_FLAG_VFP		\
 254.157 ++	| ARM_FLAG_APCS_32	\
 254.158 ++	| ARM_FLAG_APCS_FRAME	\
 254.159 ++	| ARM_FLAG_MMU_TRAPS )
 254.160 + #endif
 254.161 + 
 254.162 + #ifndef MULTILIB_DEFAULTS
 254.163 + #define MULTILIB_DEFAULTS \
 254.164 +-  { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
 254.165 ++  { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
 254.166 + #endif
 254.167 + 
 254.168 + #define TARGET_ASM_FILE_START_APP_OFF true
 254.169 +diff -urN gcc-3.4.1-old/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
 254.170 +--- gcc-3.4.1-old/gcc/config/arm/linux-elf.h	2004-09-02 21:50:52.000000000 -0500
 254.171 ++++ gcc-3.4.1/gcc/config/arm/linux-elf.h	2004-09-02 22:00:49.000000000 -0500
 254.172 +@@ -44,12 +44,26 @@
 254.173 + #define TARGET_LINKER_EMULATION "armelf_linux"
 254.174 + #endif
 254.175 + 
 254.176 +-/* Default is to use APCS-32 mode.  */
 254.177 ++/*
 254.178 ++ * Default is to use APCS-32 mode with soft-vfp.
 254.179 ++ * The old Linux default for floats can be achieved with -mhard-float
 254.180 ++ * or with the configure --with-float=hard option.
 254.181 ++ * If -msoft-float or --with-float=soft is used then software float 
 254.182 ++ * support will be used just like the default but with the legacy
 254.183 ++ * big endian word ordering for double float representation instead.
 254.184 ++ */
 254.185 + #undef  TARGET_DEFAULT
 254.186 +-#define TARGET_DEFAULT \
 254.187 +-		( ARM_FLAG_APCS_32 | \
 254.188 +-		  ARM_FLAG_MMU_TRAPS | \
 254.189 +-		  TARGET_ENDIAN_DEFAULT )
 254.190 ++#define TARGET_DEFAULT		\
 254.191 ++	( ARM_FLAG_APCS_32	\
 254.192 ++	| ARM_FLAG_SOFT_FLOAT	\
 254.193 ++	| TARGET_ENDIAN_DEFAULT	\
 254.194 ++	| ARM_FLAG_VFP		\
 254.195 ++	| ARM_FLAG_MMU_TRAPS )
 254.196 ++
 254.197 ++#undef  SUBTARGET_EXTRA_ASM_SPEC
 254.198 ++#define SUBTARGET_EXTRA_ASM_SPEC "\
 254.199 ++%{mhard-float:-mfpu=fpa} \
 254.200 ++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
 254.201 + 
 254.202 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
 254.203 + 
 254.204 +@@ -57,7 +71,7 @@
 254.205 + 
 254.206 + #undef  MULTILIB_DEFAULTS
 254.207 + #define MULTILIB_DEFAULTS \
 254.208 +-	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
 254.209 ++	{ "marm", TARGET_ENDIAN_OPTION, "mapcs-32", "mno-thumb-interwork" }
 254.210 + 
 254.211 + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
 254.212 + 
 254.213 +@@ -72,7 +86,7 @@
 254.214 +    %{shared:-lc} \
 254.215 +    %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
 254.216 + 
 254.217 +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
 254.218 ++#define LIBGCC_SPEC "-lgcc"
 254.219 + 
 254.220 + /* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
 254.221 +    the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
 254.222 +diff -urN gcc-3.4.1-old/gcc/config/arm/t-linux gcc-3.4.1/gcc/config/arm/t-linux
 254.223 +--- gcc-3.4.1-old/gcc/config/arm/t-linux	2003-09-20 16:09:07.000000000 -0500
 254.224 ++++ gcc-3.4.1/gcc/config/arm/t-linux	2004-09-02 21:51:15.000000000 -0500
 254.225 +@@ -4,7 +4,10 @@
 254.226 + LIBGCC2_DEBUG_CFLAGS = -g0
 254.227 + 
 254.228 + LIB1ASMSRC = arm/lib1funcs.asm
 254.229 +-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
 254.230 ++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
 254.231 ++	_negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
 254.232 ++	_truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
 254.233 ++	_fixsfsi _fixunssfsi
 254.234 + 
 254.235 + # MULTILIB_OPTIONS = mhard-float/msoft-float
 254.236 + # MULTILIB_DIRNAMES = hard-float soft-float
 254.237 +diff -urN gcc-3.4.1-old/gcc/config/arm/unknown-elf.h gcc-3.4.1/gcc/config/arm/unknown-elf.h
 254.238 +--- gcc-3.4.1-old/gcc/config/arm/unknown-elf.h	2004-02-24 08:25:22.000000000 -0600
 254.239 ++++ gcc-3.4.1/gcc/config/arm/unknown-elf.h	2004-09-02 21:51:15.000000000 -0500
 254.240 +@@ -30,7 +30,12 @@
 254.241 + 
 254.242 + /* Default to using APCS-32 and software floating point.  */
 254.243 + #ifndef TARGET_DEFAULT
 254.244 +-#define TARGET_DEFAULT	(ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
 254.245 ++#define TARGET_DEFAULT		\
 254.246 ++	( ARM_FLAG_SOFT_FLOAT	\
 254.247 ++	| ARM_FLAG_VFP		\
 254.248 ++	| ARM_FLAG_APCS_32	\
 254.249 ++	| ARM_FLAG_APCS_FRAME	\
 254.250 ++	| ARM_FLAG_MMU_TRAPS )
 254.251 + #endif
 254.252 + 
 254.253 + /* Now we define the strings used to build the spec file.  */
 254.254 +diff -urN gcc-3.4.1-old/gcc/config/arm/xscale-elf.h gcc-3.4.1/gcc/config/arm/xscale-elf.h
 254.255 +--- gcc-3.4.1-old/gcc/config/arm/xscale-elf.h	2003-07-01 18:26:43.000000000 -0500
 254.256 ++++ gcc-3.4.1/gcc/config/arm/xscale-elf.h	2004-09-02 21:51:15.000000000 -0500
 254.257 +@@ -49,11 +49,12 @@
 254.258 + 		     endian, regardless of the endian-ness of the memory
 254.259 + 		     system.  */
 254.260 + 		     
 254.261 +-#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
 254.262 +-  %{mhard-float:-mfpu=fpa} \
 254.263 +-  %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
 254.264 ++#define SUBTARGET_EXTRA_ASM_SPEC "\
 254.265 ++%{!mcpu=*:-mcpu=xscale} \
 254.266 ++%{mhard-float:-mfpu=fpa} \
 254.267 ++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
 254.268 + 
 254.269 + #ifndef MULTILIB_DEFAULTS
 254.270 + #define MULTILIB_DEFAULTS \
 254.271 +-  { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" }
 254.272 ++  { "mlittle-endian", "mno-thumb-interwork", "marm" }
 254.273 + #endif
   255.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   255.2 +++ b/patches/gcc/3.4.4/fix-fixincl.patch	Sat Feb 24 11:00:05 2007 +0000
   255.3 @@ -0,0 +1,70 @@
   255.4 +See http://gcc.gnu.org/PR22541
   255.5 +
   255.6 +From: Dan Kegel
   255.7 +
   255.8 +When building gcc-3.4.3 or gcc-4.0.0 as a cross into a clean $PREFIX
   255.9 +(the only two I've tried like this), the configure script happily copies
  255.10 +the glibc include files from include to sys-include; here's the line
  255.11 +from the log file (with $PREFIX instead of the real prefix):
  255.12 +
  255.13 +Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
  255.14 +
  255.15 +But later, when running fixincludes, it gives the error message
  255.16 + The directory that should contain system headers does not exist:
  255.17 +  $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
  255.18 +
  255.19 +Nevertheless, it continues building; the header files it installs in
  255.20 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
  255.21 +do not include the boilerplate that would cause it to #include_next the
  255.22 +glibc headers in the system header directory.
  255.23 +Thus the resulting toolchain can't compile the following program:
  255.24 +#include <limits.h>
  255.25 +int x = PATH_MAX;
  255.26 +because its limits.h doesn't include the glibc header.
  255.27 +
  255.28 +That's not nice.  I suspect the problem is that gcc/Makefile.in assumes that
  255.29 +it can refer to $PREFIX/i686-unknown-linux-gnu  with the path 
  255.30 +                $PREFIX/lib/../i686-unknown-linux-gnu, but
  255.31 +that fails because the directory $PREFIX/lib doesn't exist during 'make all';
  255.32 +it is only created later, during 'make install'.  (Which makes this problem
  255.33 +confusing, since one only notices the breakage well after 'make install',
  255.34 +at which point the path configure complained about does exist, and has the
  255.35 +right stuff in it.)
  255.36 +
  255.37 +A possible fix is to replace the line in gcc/Makefile.in that says
  255.38 +    SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  255.39 +with a version that gets rid of extra ..'s, e.g.
  255.40 +    SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
  255.41 +(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
  255.42 +for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
  255.43 +
  255.44 +
  255.45 +--- gcc-3.4.3/gcc/Makefile.in.foo	2005-05-20 11:41:39.000000000 -0700
  255.46 ++++ gcc-3.4.3/gcc/Makefile.in	2005-05-20 12:08:46.000000000 -0700
  255.47 +@@ -350,7 +350,10 @@
  255.48 + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
  255.49 + 
  255.50 + # autoconf sets SYSTEM_HEADER_DIR to one of the above.
  255.51 +-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  255.52 ++# Purge it of unneccessary internal relative paths
  255.53 ++# to directories that might not exist yet.
  255.54 ++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
  255.55 ++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
  255.56 + 
  255.57 + # Control whether to run fixproto and fixincludes.
  255.58 + STMP_FIXPROTO = @STMP_FIXPROTO@
  255.59 +@@ -2532,11 +2535,13 @@
  255.60 + 	$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(gcc_tooldir)
  255.61 + 
  255.62 + # Build fixed copies of system files.
  255.63 ++# Abort if no system headers available, unless building a crosscompiler.
  255.64 ++# FIXME: abort unless building --without-headers would be more accurate and less ugly
  255.65 + stmp-fixinc: fixinc.sh gsyslimits.h
  255.66 + 	@if test ! -d ${SYSTEM_HEADER_DIR}; then \
  255.67 + 	  echo The directory that should contain system headers does not exist: >&2 ; \
  255.68 + 	  echo "  ${SYSTEM_HEADER_DIR}" >&2 ; \
  255.69 +-	  if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
  255.70 ++	  if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
  255.71 + 	  then sleep 1; else exit 1; fi; \
  255.72 + 	fi
  255.73 + 	rm -rf include; mkdir include
   256.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   256.2 +++ b/patches/gcc/3.4.5/fix-fixincl.patch	Sat Feb 24 11:00:05 2007 +0000
   256.3 @@ -0,0 +1,70 @@
   256.4 +See http://gcc.gnu.org/PR22541
   256.5 +
   256.6 +From: Dan Kegel
   256.7 +
   256.8 +When building gcc-3.4.3 or gcc-4.0.0 as a cross into a clean $PREFIX
   256.9 +(the only two I've tried like this), the configure script happily copies
  256.10 +the glibc include files from include to sys-include; here's the line
  256.11 +from the log file (with $PREFIX instead of the real prefix):
  256.12 +
  256.13 +Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
  256.14 +
  256.15 +But later, when running fixincludes, it gives the error message
  256.16 + The directory that should contain system headers does not exist:
  256.17 +  $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
  256.18 +
  256.19 +Nevertheless, it continues building; the header files it installs in
  256.20 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
  256.21 +do not include the boilerplate that would cause it to #include_next the
  256.22 +glibc headers in the system header directory.
  256.23 +Thus the resulting toolchain can't compile the following program:
  256.24 +#include <limits.h>
  256.25 +int x = PATH_MAX;
  256.26 +because its limits.h doesn't include the glibc header.
  256.27 +
  256.28 +That's not nice.  I suspect the problem is that gcc/Makefile.in assumes that
  256.29 +it can refer to $PREFIX/i686-unknown-linux-gnu  with the path 
  256.30 +                $PREFIX/lib/../i686-unknown-linux-gnu, but
  256.31 +that fails because the directory $PREFIX/lib doesn't exist during 'make all';
  256.32 +it is only created later, during 'make install'.  (Which makes this problem
  256.33 +confusing, since one only notices the breakage well after 'make install',
  256.34 +at which point the path configure complained about does exist, and has the
  256.35 +right stuff in it.)
  256.36 +
  256.37 +A possible fix is to replace the line in gcc/Makefile.in that says
  256.38 +    SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  256.39 +with a version that gets rid of extra ..'s, e.g.
  256.40 +    SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
  256.41 +(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
  256.42 +for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
  256.43 +
  256.44 +
  256.45 +--- gcc-3.4.3/gcc/Makefile.in.foo	2005-05-20 11:41:39.000000000 -0700
  256.46 ++++ gcc-3.4.3/gcc/Makefile.in	2005-05-20 12:08:46.000000000 -0700
  256.47 +@@ -350,7 +350,10 @@
  256.48 + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
  256.49 + 
  256.50 + # autoconf sets SYSTEM_HEADER_DIR to one of the above.
  256.51 +-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  256.52 ++# Purge it of unneccessary internal relative paths
  256.53 ++# to directories that might not exist yet.
  256.54 ++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
  256.55 ++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
  256.56 + 
  256.57 + # Control whether to run fixproto and fixincludes.
  256.58 + STMP_FIXPROTO = @STMP_FIXPROTO@
  256.59 +@@ -2532,11 +2535,13 @@
  256.60 + 	$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(gcc_tooldir)
  256.61 + 
  256.62 + # Build fixed copies of system files.
  256.63 ++# Abort if no system headers available, unless building a crosscompiler.
  256.64 ++# FIXME: abort unless building --without-headers would be more accurate and less ugly
  256.65 + stmp-fixinc: fixinc.sh gsyslimits.h
  256.66 + 	@if test ! -d ${SYSTEM_HEADER_DIR}; then \
  256.67 + 	  echo The directory that should contain system headers does not exist: >&2 ; \
  256.68 + 	  echo "  ${SYSTEM_HEADER_DIR}" >&2 ; \
  256.69 +-	  if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
  256.70 ++	  if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
  256.71 + 	  then sleep 1; else exit 1; fi; \
  256.72 + 	fi
  256.73 + 	rm -rf include; mkdir include
   257.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   257.2 +++ b/patches/gcc/3.4.5/gcc-3.4.0-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   257.3 @@ -0,0 +1,82 @@
   257.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
   257.5 +Adds support for arm*b-linux* big-endian ARM targets
   257.6 +
   257.7 +Fixes build error
   257.8 +
   257.9 +/opt/crosstool/armeb-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/armeb-unknown-linux-gnu/bin/ld: unrecognised emulation mode: armelf_linux
  257.10 +Supported emulations: armelfb_linux armelfb
  257.11 +collect2: ld returned 1 exit status
  257.12 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc36/build/armeb-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/build-glibc/csu/crt1.o] Error 1
  257.13 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc36/build/armeb-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/glibc-2.3.3/csu'
  257.14 +make[1]: *** [csu/subdir_lib] Error 2
  257.15 +make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc36/build/armeb-unknown-linux-gnu/gcc-3.4.2-glibc-2.3.3/glibc-2.3.3'
  257.16 +make: *** [all] Error 2
  257.17 +
  257.18 +
  257.19 +See http://gcc.gnu.org/PR16350
  257.20 +
  257.21 +diff -urN gcc-3.4.0.orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
  257.22 +--- gcc-3.4.0.orig/gcc/config/arm/linux-elf.h	2004-01-31 07:18:11.000000000 +0100
  257.23 ++++ gcc-3.4.0/gcc/config/arm/linux-elf.h	2004-07-02 14:46:29.225443757 +0200
  257.24 +@@ -30,17 +30,34 @@
  257.25 + /* Do not assume anything about header files.  */
  257.26 + #define NO_IMPLICIT_EXTERN_C
  257.27 + 
  257.28 ++/*
  257.29 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  257.30 ++ * (big endian) configurations.
  257.31 ++ */
  257.32 ++#if TARGET_BIG_ENDIAN_DEFAULT
  257.33 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
  257.34 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  257.35 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  257.36 ++#else
  257.37 ++#define TARGET_ENDIAN_DEFAULT 0
  257.38 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  257.39 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  257.40 ++#endif
  257.41 ++
  257.42 + /* Default is to use APCS-32 mode.  */
  257.43 + #undef  TARGET_DEFAULT
  257.44 +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
  257.45 ++#define TARGET_DEFAULT \
  257.46 ++		( ARM_FLAG_APCS_32 | \
  257.47 ++		  ARM_FLAG_MMU_TRAPS | \
  257.48 ++		  TARGET_ENDIAN_DEFAULT )
  257.49 + 
  257.50 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  257.51 + 
  257.52 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  257.53 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  257.54 + 
  257.55 + #undef  MULTILIB_DEFAULTS
  257.56 + #define MULTILIB_DEFAULTS \
  257.57 +-	{ "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  257.58 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
  257.59 + 
  257.60 + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
  257.61 + 
  257.62 +@@ -89,7 +106,7 @@
  257.63 +    %{rdynamic:-export-dynamic} \
  257.64 +    %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  257.65 +    -X \
  257.66 +-   %{mbig-endian:-EB}" \
  257.67 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  257.68 +    SUBTARGET_EXTRA_LINK_SPEC
  257.69 + 
  257.70 + #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
  257.71 +diff -urN gcc-3.4.0.orig/gcc/config.gcc gcc-3.4.0/gcc/config.gcc
  257.72 +--- gcc-3.4.0.orig/gcc/config.gcc	2004-04-17 04:28:24.000000000 +0200
  257.73 ++++ gcc-3.4.0/gcc/config.gcc	2004-07-02 14:44:40.045822542 +0200
  257.74 +@@ -666,6 +666,11 @@
  257.75 + 	;;
  257.76 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  257.77 + 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h  arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
  257.78 ++	case $target in
  257.79 ++	arm*b-*)
  257.80 ++		tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
  257.81 ++		;;
  257.82 ++	esac
  257.83 + 	tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
  257.84 + 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  257.85 + 	gnu_ld=yes
   258.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   258.2 +++ b/patches/gcc/3.4.5/gcc-3.4.0-arm-lib1asm.patch	Sat Feb 24 11:00:05 2007 +0000
   258.3 @@ -0,0 +1,27 @@
   258.4 +# Origin: from a patch by Dimitry Andric <dimitry@andric.com>, 2004-05-01
   258.5 +# See http://gcc.gnu.org/PR14352 and http://gcc.gnu.org/PR16314
   258.6 +# See also http://gcc.gnu.org/ml/gcc-patches/2004-08/msg02568.html et seq for why this isn't in mainline
   258.7 +# Fixes errors like the following when building glibc (or any other executable
   258.8 +# or shared library) when using gcc 3.4.0 for ARM with softfloat:
   258.9 +#
  258.10 +# .../libc_pic.os(.text+0x15834): In function `__modf': undefined reference to `__subdf3'
  258.11 +# .../libc_pic.os(.text+0x158b8): In function `__modf': undefined reference to `__subdf3'
  258.12 +# .../libc_pic.os(.text+0x1590c): In function `scalbn': undefined reference to `__muldf3'
  258.13 +# .../libc_pic.os(.text+0x15e94): In function `__ldexpf': undefined reference to `__eqsf2'
  258.14 +# .../libc_pic.os(.text+0xcee4c): In function `monstartup': undefined reference to `__fixsfsi'
  258.15 +
  258.16 +diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux
  258.17 +--- gcc-3.4.0-orig/gcc/config/arm/t-linux	2003-09-20 23:09:07.000000000 +0200
  258.18 ++++ gcc-3.4.0/gcc/config/arm/t-linux	2004-05-01 20:31:59.102846400 +0200
  258.19 +@@ -4,7 +4,10 @@
  258.20 + LIBGCC2_DEBUG_CFLAGS = -g0
  258.21 + 
  258.22 + LIB1ASMSRC = arm/lib1funcs.asm
  258.23 +-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
  258.24 ++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
  258.25 ++	_negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
  258.26 ++	_truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
  258.27 ++	_fixsfsi _fixunssfsi
  258.28 + 
  258.29 + # MULTILIB_OPTIONS = mhard-float/msoft-float
  258.30 + # MULTILIB_DIRNAMES = hard-float soft-float
   259.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   259.2 +++ b/patches/gcc/3.4.5/gcc-3.4.0-arm-nolibfloat.patch	Sat Feb 24 11:00:05 2007 +0000
   259.3 @@ -0,0 +1,24 @@
   259.4 +# Dimitry Andric <dimitry@andric.com>, 2004-05-01
   259.5 +#
   259.6 +# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
   259.7 +#   anymore.  (The required functions are now in libgcc.)
   259.8 +# 
   259.9 +# Fixes errors like
  259.10 +# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
  259.11 +# collect2: ld returned 1 exit status
  259.12 +# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
  259.13 +# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
  259.14 +
  259.15 +diff -urNd gcc-3.4.0-orig/gcc/config/arm/linux-elf.h gcc-3.4.0/gcc/config/arm/linux-elf.h
  259.16 +--- gcc-3.4.0-orig/gcc/config/arm/linux-elf.h	2004-01-31 07:18:11.000000000 +0100
  259.17 ++++ gcc-3.4.0/gcc/config/arm/linux-elf.h	2004-05-01 19:19:06.935979200 +0200
  259.18 +@@ -55,7 +73,7 @@
  259.19 +    %{shared:-lc} \
  259.20 +    %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
  259.21 + 
  259.22 +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
  259.23 ++#define LIBGCC_SPEC "-lgcc"
  259.24 + 
  259.25 + /* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
  259.26 +    the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
  259.27 +
   260.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   260.2 +++ b/patches/gcc/3.4.5/pr15068-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   260.3 @@ -0,0 +1,44 @@
   260.4 +See http://gcc.gnu.org/PR15068
   260.5 +
   260.6 +Fixes error
   260.7 +
   260.8 +../sysdeps/generic/s_fmax.c: In function `__fmax':
   260.9 +../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
  260.10 +Please submit a full bug report,
  260.11 +with preprocessed source if appropriate.
  260.12 +See <URL:http://gcc.gnu.org/bugs.html> for instructions.
  260.13 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1
  260.14 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math'
  260.15 +make[1]: *** [math/others] Error 2
  260.16 +make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
  260.17 +make: *** [all] Error 2
  260.18 +
  260.19 +[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
  260.20 +http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ]
  260.21 +
  260.22 +--- gcc-3.4.1/gcc/flow.c.old	2004-02-27 19:39:19.000000000 -0800
  260.23 ++++ gcc-3.4.1/gcc/flow.c	2004-08-26 07:29:46.000000000 -0700
  260.24 +@@ -1878,6 +1878,7 @@
  260.25 + 	  rtx set_src = SET_SRC (pc_set (BB_END (bb)));
  260.26 + 	  rtx cond_true = XEXP (set_src, 0);
  260.27 + 	  rtx reg = XEXP (cond_true, 0);
  260.28 ++ 	  enum rtx_code inv_cond;
  260.29 + 
  260.30 + 	  if (GET_CODE (reg) == SUBREG)
  260.31 + 	    reg = SUBREG_REG (reg);
  260.32 +@@ -1886,11 +1887,13 @@
  260.33 + 	     in the form of a comparison of a register against zero.  
  260.34 + 	     If the condition is more complex than that, then it is safe
  260.35 + 	     not to record any information.  */
  260.36 +-	  if (GET_CODE (reg) == REG
  260.37 ++ 	  inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
  260.38 ++ 	  if (inv_cond != UNKNOWN
  260.39 ++	      && GET_CODE (reg) == REG
  260.40 + 	      && XEXP (cond_true, 1) == const0_rtx)
  260.41 + 	    {
  260.42 + 	      rtx cond_false
  260.43 +-		= gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
  260.44 ++		= gen_rtx_fmt_ee (inv_cond,
  260.45 + 				  GET_MODE (cond_true), XEXP (cond_true, 0),
  260.46 + 				  XEXP (cond_true, 1));
  260.47 + 	      if (GET_CODE (XEXP (set_src, 1)) == PC)
   261.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   261.2 +++ b/patches/gcc/4.0.0/fix-fixincl.patch	Sat Feb 24 11:00:05 2007 +0000
   261.3 @@ -0,0 +1,72 @@
   261.4 +See http://gcc.gnu.org/PR22541
   261.5 +
   261.6 +From: Dan Kegel
   261.7 +
   261.8 +When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
   261.9 +the configure script happily copies the glibc include files from include to sys-include;
  261.10 +here's the line from the log file (with $PREFIX instead of the real prefix):
  261.11 +
  261.12 +Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
  261.13 +
  261.14 +But later, when running fixincludes, it gives the error message
  261.15 + The directory that should contain system headers does not exist:
  261.16 +  $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
  261.17 +
  261.18 +Nevertheless, it continues building; the header files it installs in
  261.19 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
  261.20 +do not include the boilerplate that would cause it to #include_next the
  261.21 +glibc headers in the system header directory.
  261.22 +Thus the resulting toolchain can't compile the following program:
  261.23 +#include <limits.h>
  261.24 +int x = PATH_MAX;
  261.25 +because its limits.h doesn't include the glibc header.
  261.26 +
  261.27 +That's not nice.  I suspect the problem is that gcc/Makefile.in assumes that
  261.28 +it can refer to $PREFIX/i686-unknown-linux-gnu  with the path 
  261.29 +                $PREFIX/lib/../i686-unknown-linux-gnu, but
  261.30 +that fails because the directory $PREFIX/lib doesn't exist during 'make all';
  261.31 +it is only created later, during 'make install'.  (Which makes this problem
  261.32 +confusing, since one only notices the breakage well after 'make install',
  261.33 +at which point the path configure complained about does exist, and has the
  261.34 +right stuff in it.)
  261.35 +
  261.36 +A possible fix is to replace the line in gcc/Makefile.in that says
  261.37 +    SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  261.38 +with a version that gets rid of extra ..'s, e.g.
  261.39 +    SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
  261.40 +(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
  261.41 +for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
  261.42 +
  261.43 +[rediffed against gcc-4.0.0]
  261.44 +
  261.45 +--- gcc-4.0.0/gcc/Makefile.in.orig	2005-04-04 12:45:13.000000000 -0700
  261.46 ++++ gcc-4.0.0/gcc/Makefile.in	2005-05-20 12:33:43.000000000 -0700
  261.47 +@@ -378,7 +378,10 @@
  261.48 + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
  261.49 + 
  261.50 + # autoconf sets SYSTEM_HEADER_DIR to one of the above.
  261.51 +-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  261.52 ++# Purge it of unneccessary internal relative paths
  261.53 ++# to directories that might not exist yet.
  261.54 ++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
  261.55 ++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
  261.56 + 
  261.57 + # Control whether to run fixproto and fixincludes.
  261.58 + STMP_FIXPROTO = @STMP_FIXPROTO@
  261.59 +@@ -2838,13 +2841,15 @@
  261.60 + ../$(build_subdir)/fixincludes/fixincl: ; @ :
  261.61 + 
  261.62 + # Build fixed copies of system files.
  261.63 ++# Abort if no system headers available, unless building a crosscompiler.
  261.64 ++# FIXME: abort unless building --without-headers would be more accurate and less ugly
  261.65 + stmp-fixinc: gsyslimits.h macro_list \
  261.66 +   ../$(build_subdir)/fixincludes/fixincl \
  261.67 +   ../$(build_subdir)/fixincludes/fixinc.sh
  261.68 + 	@if test ! -d ${SYSTEM_HEADER_DIR}; then \
  261.69 + 	  echo The directory that should contain system headers does not exist: >&2 ; \
  261.70 + 	  echo "  ${SYSTEM_HEADER_DIR}" >&2 ; \
  261.71 +-	  if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
  261.72 ++	  if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
  261.73 + 	  then sleep 1; else exit 1; fi; \
  261.74 + 	fi
  261.75 + 	rm -rf include; mkdir include
   262.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   262.2 +++ b/patches/gcc/4.0.0/gcc-4.0-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   262.3 @@ -0,0 +1,79 @@
   262.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
   262.5 +Adds support for arm*b-linux* big-endian ARM targets
   262.6 +
   262.7 +Fixes following build error for big-endian ARM targets:
   262.8 +
   262.9 +armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/bin/../lib/gcc/armeb-unknown-linux-gnu/4.0.0/../../../../armeb-unknown-linux-gnu/bin/ld: unrecognised emulation mode: armelf_linux
  262.10 +Supported emulations: armelfb_linux armelfb
  262.11 +collect2: ld returned 1 exit status
  262.12 +make[2]: *** [crosstool-0.32/build/armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/csu/crt1.o] Error 1
  262.13 +make[2]: Leaving directory `crosstool-0.32/build/armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/glibc-2.3.4/csu'
  262.14 +make[1]: *** [csu/subdir_lib] Error 2
  262.15 +make[1]: Leaving directory `crosstool-0.32/build/armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/glibc-2.3.4'
  262.16 +make: *** [lib] Error 2
  262.17 +
  262.18 +
  262.19 +See http://gcc.gnu.org/PR16350
  262.20 +
  262.21 +--- gcc-4.0-20050305/gcc/config/arm/linux-elf.h.orig	2005-03-23 18:44:54.822707377 +0100
  262.22 ++++ gcc-4.0-20050305/gcc/config/arm/linux-elf.h	2005-03-23 18:46:18.228560206 +0100
  262.23 +@@ -31,19 +31,33 @@
  262.24 + /* Do not assume anything about header files.  */
  262.25 + #define NO_IMPLICIT_EXTERN_C
  262.26 + 
  262.27 ++/*
  262.28 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for
  262.29 ++ * arm*b-*-linux* (big endian) configurations.
  262.30 ++ */
  262.31 ++#if TARGET_BIG_ENDIAN_DEFAULT
  262.32 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
  262.33 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  262.34 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  262.35 ++#else
  262.36 ++#define TARGET_ENDIAN_DEFAULT 0
  262.37 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  262.38 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  262.39 ++#endif
  262.40 ++
  262.41 + #undef  TARGET_DEFAULT_FLOAT_ABI
  262.42 + #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
  262.43 + 
  262.44 + #undef  TARGET_DEFAULT
  262.45 +-#define TARGET_DEFAULT (0)
  262.46 ++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
  262.47 + 
  262.48 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  262.49 + 
  262.50 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  262.51 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  262.52 + 
  262.53 + #undef  MULTILIB_DEFAULTS
  262.54 + #define MULTILIB_DEFAULTS \
  262.55 +-	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
  262.56 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
  262.57 + 
  262.58 + /* The GNU C++ standard library requires that these macros be defined.  */
  262.59 + #undef CPLUSPLUS_CPP_SPEC
  262.60 +@@ -90,7 +104,7 @@
  262.61 +    %{rdynamic:-export-dynamic} \
  262.62 +    %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  262.63 +    -X \
  262.64 +-   %{mbig-endian:-EB}" \
  262.65 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  262.66 +    SUBTARGET_EXTRA_LINK_SPEC
  262.67 + 
  262.68 + #define TARGET_OS_CPP_BUILTINS()		\
  262.69 +--- gcc-4.0-20050305/gcc/config.gcc.orig	2005-03-23 18:46:23.318105335 +0100
  262.70 ++++ gcc-4.0-20050305/gcc/config.gcc	2005-03-23 18:47:41.592546386 +0100
  262.71 +@@ -650,6 +650,11 @@
  262.72 + 	;;
  262.73 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  262.74 + 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h  arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
  262.75 ++	case $target in
  262.76 ++	arm*b-*-linux*)
  262.77 ++		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
  262.78 ++		;;
  262.79 ++	esac
  262.80 + 	tmake_file="${tmake_file} arm/t-arm arm/t-linux"
  262.81 + 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  262.82 + 	gnu_ld=yes
   263.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   263.2 +++ b/patches/gcc/4.0.0/pr20815-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   263.3 @@ -0,0 +1,121 @@
   263.4 +Date: 18 May 2005 22:47:59 -0000
   263.5 +Message-ID: <20050518224759.7352.qmail@sourceware.org>
   263.6 +From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
   263.7 +To: dank@kegel.com
   263.8 +References: <20050407215701.20815.dank@kegel.com>
   263.9 +Reply-To: gcc-bugzilla@gcc.gnu.org
  263.10 +Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
  263.11 +
  263.12 +
  263.13 +------- Additional Comments From hubicka at ucw dot cz  2005-05-18 22:47 -------
  263.14 +Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
  263.15 +
  263.16 +> 
  263.17 +> ------- Additional Comments From hubicka at ucw dot cz  2005-05-18 22:22 -------
  263.18 +> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
  263.19 +> 
  263.20 +> coverage_checksum_string already knows a bit about ignoring random seed
  263.21 +> produced mess.  It looks like this needs to be extended somehow to
  263.22 +> handle namespaces too...
  263.23 +
  263.24 +This seems to solve the missmatch.  Would it be possible to test it on
  263.25 +bigger testcase and if it works distile a testcase that don't use
  263.26 +file IO so it is more suitable for gcc regtesting?
  263.27 +
  263.28 +Index: coverage.c
  263.29 +===================================================================
  263.30 +RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
  263.31 +retrieving revision 1.6.2.12.2.12
  263.32 +diff -c -3 -p -r1.6.2.12.2.12 coverage.c
  263.33 +*** gcc-old/gcc/coverage.c	18 May 2005 07:37:31 -0000	1.6.2.12.2.12
  263.34 +--- gcc/gcc/coverage.c	18 May 2005 22:45:36 -0000
  263.35 +*************** coverage_checksum_string (unsigned chksu
  263.36 +*** 471,505 ****
  263.37 +       as the checksums are used only for sanity checking.  */
  263.38 +    for (i = 0; string[i]; i++)
  263.39 +      {
  263.40 +        if (!strncmp (string + i, "_GLOBAL__", 9))
  263.41 +! 	for (i = i + 9; string[i]; i++)
  263.42 +! 	  if (string[i]=='_')
  263.43 +! 	    {
  263.44 +! 	      int y;
  263.45 +! 	      unsigned seed;
  263.46 +! 	      int scan;
  263.47 +! 
  263.48 +! 	      for (y = 1; y < 9; y++)
  263.49 +! 		if (!(string[i + y] >= '0' && string[i + y] <= '9')
  263.50 +! 		    && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
  263.51 +! 		  break;
  263.52 +! 	      if (y != 9 || string[i + 9] != '_')
  263.53 +! 		continue;
  263.54 +! 	      for (y = 10; y < 18; y++)
  263.55 +! 		if (!(string[i + y] >= '0' && string[i + y] <= '9')
  263.56 +! 		    && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
  263.57 +! 		  break;
  263.58 +! 	      if (y != 18)
  263.59 +! 		continue;
  263.60 +! 	      scan = sscanf (string + i + 10, "%X", &seed);
  263.61 +! 	      gcc_assert (scan);
  263.62 +! 	      if (seed != crc32_string (0, flag_random_seed))
  263.63 +! 		continue;
  263.64 +! 	      string = dup = xstrdup (string);
  263.65 +! 	      for (y = 10; y < 18; y++)
  263.66 +! 		dup[i + y] = '0';
  263.67 +! 	      break;
  263.68 +! 	    }
  263.69 +        break;
  263.70 +      }
  263.71 +  
  263.72 +--- 471,511 ----
  263.73 +       as the checksums are used only for sanity checking.  */
  263.74 +    for (i = 0; string[i]; i++)
  263.75 +      {
  263.76 ++       int offset = 0;
  263.77 ++       if (!strncmp (string + i, "_GLOBAL__N_", 11))
  263.78 ++ 	offset = 11;
  263.79 +        if (!strncmp (string + i, "_GLOBAL__", 9))
  263.80 +! 	offset = 9;
  263.81 +! 
  263.82 +!       /* C++ namespaces do have scheme:
  263.83 +!          _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
  263.84 +! 	 since filename might contain extra underscores there seems
  263.85 +! 	 to be no better chance then walk all possible offsets looking
  263.86 +! 	 for magicnuber.  */
  263.87 +!       if (offset)
  263.88 +!         for (;string[offset]; offset++)
  263.89 +! 	  for (i = i + offset; string[i]; i++)
  263.90 +! 	    if (string[i]=='_')
  263.91 +! 	      {
  263.92 +! 		int y;
  263.93 +! 
  263.94 +! 		for (y = 1; y < 9; y++)
  263.95 +! 		  if (!(string[i + y] >= '0' && string[i + y] <= '9')
  263.96 +! 		      && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
  263.97 +! 		    break;
  263.98 +! 		if (y != 9 || string[i + 9] != '_')
  263.99 +! 		  continue;
 263.100 +! 		for (y = 10; y < 18; y++)
 263.101 +! 		  if (!(string[i + y] >= '0' && string[i + y] <= '9')
 263.102 +! 		      && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
 263.103 +! 		    break;
 263.104 +! 		if (y != 18)
 263.105 +! 		  continue;
 263.106 +! 		if (!dup)
 263.107 +! 		  string = dup = xstrdup (string);
 263.108 +! 		for (y = 10; y < 18; y++)
 263.109 +! 		  dup[i + y] = '0';
 263.110 +! 	      }
 263.111 +        break;
 263.112 +      }
 263.113 +  
 263.114 +
 263.115 +
 263.116 +-- 
 263.117 +
 263.118 +
 263.119 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
 263.120 +
 263.121 +------- You are receiving this mail because: -------
 263.122 +You reported the bug, or are watching the reporter.
 263.123 +
 263.124 +
   264.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   264.2 +++ b/patches/gcc/4.0.0/pr20973-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   264.3 @@ -0,0 +1,80 @@
   264.4 +http://gcc.gnu.org/PR20973
   264.5 +
   264.6 +"gcc 4 (about RC1) miscompiles khtml, in fact something in CSS, which basically 
   264.7 +leads to all websites being misrendered.  I can't easily reduce the testcase, 
   264.8 +but have applied the whole preprocessed source of css/cssstyleselector.ii. 
   264.9 + 
  264.10 +It is to be compiled with g++ -O2 -fPIC -march=i586 -mtune=i686 
  264.11 +-fno-exceptions.  A more detailed analysis will follow, as we've found out 
  264.12 +some things already."
  264.13 +
  264.14 +---
  264.15 +
  264.16 +Subject: Bug 20973
  264.17 +
  264.18 +CVSROOT:	/cvs/gcc
  264.19 +Module name:	gcc
  264.20 +Branch: 	gcc-4_0-branch
  264.21 +Changes by:	matz@gcc.gnu.org	2005-04-22 17:30:21
  264.22 +
  264.23 +Modified files:
  264.24 +	gcc            : ChangeLog reload.c 
  264.25 +
  264.26 +Log message:
  264.27 +	PR middle-end/20973
  264.28 +	* reload.c (push_reload, find_dummy_reload): Check for uninitialized
  264.29 +	pseudos.
  264.30 +
  264.31 +Patches:
  264.32 +http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.177&r2=2.7592.2.178
  264.33 +http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reload.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.268&r2=1.268.2.1
  264.34 +
  264.35 +---
  264.36 +
  264.37 +===================================================================
  264.38 +RCS file: /cvs/gcc/gcc/gcc/reload.c,v
  264.39 +retrieving revision 1.268
  264.40 +retrieving revision 1.268.2.1
  264.41 +diff -u -r1.268 -r1.268.2.1
  264.42 +--- gcc/gcc/reload.c	2005/02/24 22:06:06	1.268
  264.43 ++++ gcc/gcc/reload.c	2005/04/22 17:30:15	1.268.2.1
  264.44 +@@ -1520,7 +1520,7 @@
  264.45 +      But if there is no spilling in this block, that is OK.
  264.46 +      An explicitly used hard reg cannot be a spill reg.  */
  264.47 + 
  264.48 +-  if (rld[i].reg_rtx == 0 && in != 0)
  264.49 ++  if (rld[i].reg_rtx == 0 && in != 0 && hard_regs_live_known)
  264.50 +     {
  264.51 +       rtx note;
  264.52 +       int regno;
  264.53 +@@ -1534,6 +1534,11 @@
  264.54 + 	    && REG_P (XEXP (note, 0))
  264.55 + 	    && (regno = REGNO (XEXP (note, 0))) < FIRST_PSEUDO_REGISTER
  264.56 + 	    && reg_mentioned_p (XEXP (note, 0), in)
  264.57 ++	    /* Check that we don't use a hardreg for an uninitialized
  264.58 ++	       pseudo.  See also find_dummy_reload().  */
  264.59 ++	    && (ORIGINAL_REGNO (XEXP (note, 0)) < FIRST_PSEUDO_REGISTER
  264.60 ++		|| ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end,
  264.61 ++				   ORIGINAL_REGNO (XEXP (note, 0))))
  264.62 + 	    && ! refers_to_regno_for_reload_p (regno,
  264.63 + 					       (regno
  264.64 + 						+ hard_regno_nregs[regno]
  264.65 +@@ -1997,7 +2002,17 @@
  264.66 + 				is a subreg, and in that case, out
  264.67 + 				has a real mode.  */
  264.68 + 			     (GET_MODE (out) != VOIDmode
  264.69 +-			      ? GET_MODE (out) : outmode)))
  264.70 ++			      ? GET_MODE (out) : outmode))
  264.71 ++        /* But only do all this if we can be sure, that this input
  264.72 ++           operand doesn't correspond with an uninitialized pseudoreg.
  264.73 ++           global can assign some hardreg to it, which is the same as
  264.74 ++	   a different pseudo also currently live (as it can ignore the
  264.75 ++	   conflict).  So we never must introduce writes to such hardregs,
  264.76 ++	   as they would clobber the other live pseudo using the same.
  264.77 ++	   See also PR20973.  */
  264.78 ++      && (ORIGINAL_REGNO (in) < FIRST_PSEUDO_REGISTER
  264.79 ++          || ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end,
  264.80 ++			     ORIGINAL_REGNO (in))))
  264.81 +     {
  264.82 +       unsigned int regno = REGNO (in) + in_offset;
  264.83 +       unsigned int nwords = hard_regno_nregs[regno][inmode];
   265.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   265.2 +++ b/patches/gcc/4.0.0/pr21173-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   265.3 @@ -0,0 +1,66 @@
   265.4 +See http://gcc.gnu.org/PR21173
   265.5 +This is a fix for a last minute brown-bag bug with gcc-4.0.0
   265.6 +
   265.7 + ------- Additional Comment #24 From CVS Commits 2005-04-25 14:03 [reply] ------- 
   265.8 +Subject: Bug 21173
   265.9 +
  265.10 +CVSROOT:        /cvs/gcc
  265.11 +Module name:    gcc
  265.12 +Branch:         gcc-4_0-branch
  265.13 +Changes by:     dberlin@gcc.gnu.org     2005-04-25 14:02:38
  265.14 +
  265.15 +Modified files:
  265.16 +        gcc            : ChangeLog tree-ssa-pre.c 
  265.17 +
  265.18 +Log message:
  265.19 +        2005-04-25  Daniel Berlin  <dberlin@dberlin.org>
  265.20 +        
  265.21 +        Fix PR tree-optimization/21173
  265.22 +        
  265.23 +        * tree-ssa-pre.c (create_expression_by_pieces): Call unshare_expr
  265.24 +        on things we pass to force_gimple_operand.  Don't try to special
  265.25 +        case min_invariants.
  265.26 +
  265.27 +Patches:
  265.28 +http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.192&r2=2.7592.2.193
  265.29 +http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-pre.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.65.4.2&r2=2.65.4.3
  265.30 +
  265.31 +===================================================================
  265.32 +RCS file: /cvs/gcc/gcc/gcc/tree-ssa-pre.c,v
  265.33 +retrieving revision 2.65.4.2
  265.34 +retrieving revision 2.65.4.3
  265.35 +diff -u -r2.65.4.2 -r2.65.4.3
  265.36 +--- gcc/gcc/tree-ssa-pre.c	2005/04/17 23:40:31	2.65.4.2
  265.37 ++++ gcc/gcc/tree-ssa-pre.c	2005/04/25 14:02:31	2.65.4.3
  265.38 +@@ -1330,7 +1330,8 @@
  265.39 + 	
  265.40 + 	folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr), 
  265.41 + 			      genop1, genop2));
  265.42 +-	newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
  265.43 ++	newexpr = force_gimple_operand (unshare_expr (folded), 
  265.44 ++					&forced_stmts, false, NULL);
  265.45 + 	if (forced_stmts)
  265.46 + 	  {
  265.47 + 	    tsi = tsi_start (forced_stmts);
  265.48 +@@ -1372,14 +1373,8 @@
  265.49 + 	add_referenced_tmp_var (temp);
  265.50 + 	folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr), 
  265.51 + 			      genop1));
  265.52 +-	/* If the generated operand  is already GIMPLE min_invariant
  265.53 +-	   just use it instead of calling force_gimple_operand on it,
  265.54 +-	   since that may make it not invariant by copying it into an
  265.55 +-	   assignment.  */
  265.56 +-	if (!is_gimple_min_invariant (genop1))
  265.57 +-	  newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
  265.58 +-	else
  265.59 +-	  newexpr = genop1;
  265.60 ++	newexpr = force_gimple_operand (unshare_expr (folded), 
  265.61 ++					&forced_stmts, false, NULL);
  265.62 + 	if (forced_stmts)
  265.63 + 	  {
  265.64 + 	    tsi = tsi_start (forced_stmts);
  265.65 +
  265.66 +    0K .                                                         1.24 MB/s
  265.67 +
  265.68 +13:16:54 (1.24 MB/s) - `-' saved [1303]
  265.69 +
   266.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   266.2 +++ b/patches/gcc/4.0.0/pr21951.patch	Sat Feb 24 11:00:05 2007 +0000
   266.3 @@ -0,0 +1,153 @@
   266.4 +Workaround for buglet in std::vector etc. when compiling 
   266.5 +with gcc-4.0.0 -Wall -O -fno-exceptions
   266.6 +Fixes:
   266.7 +
   266.8 +.../include/c++/4.0.0/bits/vector.tcc: In member function 'void std::vector<_Tp,
   266.9 +_Alloc>::reserve(size_t) [with _Tp = int, _Alloc = std::allocator<int>]':
  266.10 +.../include/c++/4.0.0/bits/vector.tcc:78: warning: control may reach end of
  266.11 +non-void function 'typename _Alloc::pointer std::vector<_Tp,
  266.12 +_Alloc>::_M_allocate_and_copy(size_t, _ForwardIterator, _ForwardIterator) [with
  266.13 +_ForwardIterator = int*, _Tp = int, _Alloc = std::allocator<int>]' being inlined
  266.14 +
  266.15 +See http://gcc.gnu.org/PR21951
  266.16 +
  266.17 +--- gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_vector.h.old	2005-06-11 03:58:20.000000000 -0700
  266.18 ++++ gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_vector.h	2005-06-11 04:01:21.000000000 -0700
  266.19 +@@ -765,13 +765,13 @@
  266.20 + 	    {
  266.21 + 	      std::__uninitialized_copy_a(__first, __last, __result,
  266.22 + 					  this->get_allocator());
  266.23 +-	      return __result;
  266.24 + 	    }
  266.25 + 	  catch(...)
  266.26 + 	    {
  266.27 + 	      _M_deallocate(__result, __n);
  266.28 + 	      __throw_exception_again;
  266.29 + 	    }
  266.30 ++	  return __result;
  266.31 + 	}
  266.32 + 
  266.33 + 
  266.34 +--- gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_uninitialized.h.old	2005-06-11 03:58:20.000000000 -0700
  266.35 ++++ gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_uninitialized.h	2005-06-11 04:05:18.990003248 -0700
  266.36 +@@ -84,13 +84,13 @@
  266.37 + 	{
  266.38 + 	  for (; __first != __last; ++__first, ++__cur)
  266.39 + 	    std::_Construct(&*__cur, *__first);
  266.40 +-	  return __cur;
  266.41 + 	}
  266.42 +       catch(...)
  266.43 + 	{
  266.44 + 	  std::_Destroy(__result, __cur);
  266.45 + 	  __throw_exception_again;
  266.46 + 	}
  266.47 ++      return __cur;
  266.48 +     }
  266.49 + 
  266.50 +   /**
  266.51 +@@ -236,13 +236,13 @@
  266.52 + 	{
  266.53 + 	  for (; __first != __last; ++__first, ++__cur)
  266.54 + 	    __alloc.construct(&*__cur, *__first);
  266.55 +-	  return __cur;
  266.56 + 	}
  266.57 +       catch(...)
  266.58 + 	{
  266.59 + 	  std::_Destroy(__result, __cur, __alloc);
  266.60 + 	  __throw_exception_again;
  266.61 + 	}
  266.62 ++      return __cur;
  266.63 +     }
  266.64 + 
  266.65 +   template<typename _InputIterator, typename _ForwardIterator, typename _Tp>
  266.66 +@@ -337,11 +337,13 @@
  266.67 + 	{
  266.68 + 	  return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
  266.69 + 	}
  266.70 ++#ifdef __EXCEPTIONS  // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
  266.71 +       catch(...)
  266.72 + 	{
  266.73 + 	  std::_Destroy(__result, __mid, __alloc);
  266.74 + 	  __throw_exception_again;
  266.75 + 	}
  266.76 ++#endif
  266.77 +     }
  266.78 + 
  266.79 +   // __uninitialized_fill_copy
  266.80 +@@ -360,11 +362,13 @@
  266.81 + 	{
  266.82 + 	  return std::__uninitialized_copy_a(__first, __last, __mid, __alloc);
  266.83 + 	}
  266.84 ++#ifdef __EXCEPTIONS  // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
  266.85 +       catch(...)
  266.86 + 	{
  266.87 + 	  std::_Destroy(__result, __mid, __alloc);
  266.88 + 	  __throw_exception_again;
  266.89 + 	}
  266.90 ++#endif
  266.91 +     }
  266.92 + 
  266.93 +   // __uninitialized_copy_fill
  266.94 +--- gcc-4.0.1-20050607/libstdc++-v3/include/ext/rope.old	2005-06-11 03:58:20.000000000 -0700
  266.95 ++++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/rope	2005-06-11 04:13:26.628870872 -0700
  266.96 +@@ -1645,11 +1645,13 @@
  266.97 + 	_S_cond_store_eos(__buf[__size]);
  266.98 + 	try
  266.99 + 	  { return _S_new_RopeLeaf(__buf, __size, __a); }
 266.100 ++#ifdef __EXCEPTIONS  // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
 266.101 + 	catch(...)
 266.102 + 	  {
 266.103 + 	    _RopeRep::__STL_FREE_STRING(__buf, __size, __a);
 266.104 + 	    __throw_exception_again;
 266.105 + 	  }
 266.106 ++#endif
 266.107 +       }
 266.108 + 
 266.109 +       // Concatenation of nonempty strings.
 266.110 +--- gcc-4.0.1-20050607/libstdc++-v3/include/ext/memory.old	2005-06-11 03:58:20.000000000 -0700
 266.111 ++++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/memory	2005-06-11 04:13:52.897877376 -0700
 266.112 +@@ -85,11 +85,13 @@
 266.113 + 	    std::_Construct(&*__cur, *__first);
 266.114 + 	  return pair<_InputIter, _ForwardIter>(__first, __cur);
 266.115 + 	}
 266.116 ++#ifdef __EXCEPTIONS  // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
 266.117 +       catch(...)
 266.118 + 	{
 266.119 + 	  std::_Destroy(__result, __cur);
 266.120 + 	  __throw_exception_again;
 266.121 + 	}
 266.122 ++#endif
 266.123 +     }
 266.124 + 
 266.125 +   template<typename _RandomAccessIter, typename _Size, typename _ForwardIter>
 266.126 +@@ -144,11 +146,13 @@
 266.127 + 	    __alloc.construct(&*__cur, *__first);
 266.128 + 	  return pair<_InputIter, _ForwardIter>(__first, __cur);
 266.129 + 	}
 266.130 ++#ifdef __EXCEPTIONS  // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
 266.131 +       catch(...)
 266.132 + 	{
 266.133 + 	  std::_Destroy(__result, __cur, __alloc);
 266.134 + 	  __throw_exception_again;
 266.135 + 	}
 266.136 ++#endif
 266.137 +     }
 266.138 + 
 266.139 +   template<typename _InputIter, typename _Size, typename _ForwardIter,
 266.140 +--- gcc-4.0.1-20050607/libstdc++-v3/include/ext/hashtable.h.old	2005-06-11 03:58:20.000000000 -0700
 266.141 ++++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/hashtable.h	2005-06-11 04:14:28.384482592 -0700
 266.142 +@@ -607,13 +607,13 @@
 266.143 + 	try
 266.144 + 	  {
 266.145 + 	    this->get_allocator().construct(&__n->_M_val, __obj);
 266.146 +-	    return __n;
 266.147 + 	  }
 266.148 + 	catch(...)
 266.149 + 	  {
 266.150 + 	    _M_put_node(__n);
 266.151 + 	    __throw_exception_again;
 266.152 + 	  }
 266.153 ++	return __n;
 266.154 +       }
 266.155 + 
 266.156 +       void
   267.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   267.2 +++ b/patches/gcc/4.0.1/fix-fixincl.patch	Sat Feb 24 11:00:05 2007 +0000
   267.3 @@ -0,0 +1,72 @@
   267.4 +See http://gcc.gnu.org/PR22541
   267.5 +
   267.6 +From: Dan Kegel
   267.7 +
   267.8 +When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
   267.9 +the configure script happily copies the glibc include files from include to sys-include;
  267.10 +here's the line from the log file (with $PREFIX instead of the real prefix):
  267.11 +
  267.12 +Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
  267.13 +
  267.14 +But later, when running fixincludes, it gives the error message
  267.15 + The directory that should contain system headers does not exist:
  267.16 +  $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
  267.17 +
  267.18 +Nevertheless, it continues building; the header files it installs in
  267.19 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
  267.20 +do not include the boilerplate that would cause it to #include_next the
  267.21 +glibc headers in the system header directory.
  267.22 +Thus the resulting toolchain can't compile the following program:
  267.23 +#include <limits.h>
  267.24 +int x = PATH_MAX;
  267.25 +because its limits.h doesn't include the glibc header.
  267.26 +
  267.27 +That's not nice.  I suspect the problem is that gcc/Makefile.in assumes that
  267.28 +it can refer to $PREFIX/i686-unknown-linux-gnu  with the path 
  267.29 +                $PREFIX/lib/../i686-unknown-linux-gnu, but
  267.30 +that fails because the directory $PREFIX/lib doesn't exist during 'make all';
  267.31 +it is only created later, during 'make install'.  (Which makes this problem
  267.32 +confusing, since one only notices the breakage well after 'make install',
  267.33 +at which point the path configure complained about does exist, and has the
  267.34 +right stuff in it.)
  267.35 +
  267.36 +A possible fix is to replace the line in gcc/Makefile.in that says
  267.37 +    SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  267.38 +with a version that gets rid of extra ..'s, e.g.
  267.39 +    SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
  267.40 +(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
  267.41 +for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
  267.42 +
  267.43 +[rediffed against gcc-4.0.0]
  267.44 +
  267.45 +--- gcc-4.0.0/gcc/Makefile.in.orig	2005-04-04 12:45:13.000000000 -0700
  267.46 ++++ gcc-4.0.0/gcc/Makefile.in	2005-05-20 12:33:43.000000000 -0700
  267.47 +@@ -378,7 +378,10 @@
  267.48 + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
  267.49 + 
  267.50 + # autoconf sets SYSTEM_HEADER_DIR to one of the above.
  267.51 +-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  267.52 ++# Purge it of unneccessary internal relative paths
  267.53 ++# to directories that might not exist yet.
  267.54 ++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
  267.55 ++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
  267.56 + 
  267.57 + # Control whether to run fixproto and fixincludes.
  267.58 + STMP_FIXPROTO = @STMP_FIXPROTO@
  267.59 +@@ -2838,13 +2841,15 @@
  267.60 + ../$(build_subdir)/fixincludes/fixincl: ; @ :
  267.61 + 
  267.62 + # Build fixed copies of system files.
  267.63 ++# Abort if no system headers available, unless building a crosscompiler.
  267.64 ++# FIXME: abort unless building --without-headers would be more accurate and less ugly
  267.65 + stmp-fixinc: gsyslimits.h macro_list \
  267.66 +   ../$(build_subdir)/fixincludes/fixincl \
  267.67 +   ../$(build_subdir)/fixincludes/fixinc.sh
  267.68 + 	@if test ! -d ${SYSTEM_HEADER_DIR}; then \
  267.69 + 	  echo The directory that should contain system headers does not exist: >&2 ; \
  267.70 + 	  echo "  ${SYSTEM_HEADER_DIR}" >&2 ; \
  267.71 +-	  if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
  267.72 ++	  if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
  267.73 + 	  then sleep 1; else exit 1; fi; \
  267.74 + 	fi
  267.75 + 	rm -rf include; mkdir include
   268.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   268.2 +++ b/patches/gcc/4.0.1/pr20815-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   268.3 @@ -0,0 +1,121 @@
   268.4 +Date: 18 May 2005 22:47:59 -0000
   268.5 +Message-ID: <20050518224759.7352.qmail@sourceware.org>
   268.6 +From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
   268.7 +To: dank@kegel.com
   268.8 +References: <20050407215701.20815.dank@kegel.com>
   268.9 +Reply-To: gcc-bugzilla@gcc.gnu.org
  268.10 +Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
  268.11 +
  268.12 +
  268.13 +------- Additional Comments From hubicka at ucw dot cz  2005-05-18 22:47 -------
  268.14 +Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
  268.15 +
  268.16 +> 
  268.17 +> ------- Additional Comments From hubicka at ucw dot cz  2005-05-18 22:22 -------
  268.18 +> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
  268.19 +> 
  268.20 +> coverage_checksum_string already knows a bit about ignoring random seed
  268.21 +> produced mess.  It looks like this needs to be extended somehow to
  268.22 +> handle namespaces too...
  268.23 +
  268.24 +This seems to solve the missmatch.  Would it be possible to test it on
  268.25 +bigger testcase and if it works distile a testcase that don't use
  268.26 +file IO so it is more suitable for gcc regtesting?
  268.27 +
  268.28 +Index: coverage.c
  268.29 +===================================================================
  268.30 +RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
  268.31 +retrieving revision 1.6.2.12.2.12
  268.32 +diff -c -3 -p -r1.6.2.12.2.12 coverage.c
  268.33 +*** gcc-old/gcc/coverage.c	18 May 2005 07:37:31 -0000	1.6.2.12.2.12
  268.34 +--- gcc/gcc/coverage.c	18 May 2005 22:45:36 -0000
  268.35 +*************** coverage_checksum_string (unsigned chksu
  268.36 +*** 471,505 ****
  268.37 +       as the checksums are used only for sanity checking.  */
  268.38 +    for (i = 0; string[i]; i++)
  268.39 +      {
  268.40 +        if (!strncmp (string + i, "_GLOBAL__", 9))
  268.41 +! 	for (i = i + 9; string[i]; i++)
  268.42 +! 	  if (string[i]=='_')
  268.43 +! 	    {
  268.44 +! 	      int y;
  268.45 +! 	      unsigned seed;
  268.46 +! 	      int scan;
  268.47 +! 
  268.48 +! 	      for (y = 1; y < 9; y++)
  268.49 +! 		if (!(string[i + y] >= '0' && string[i + y] <= '9')
  268.50 +! 		    && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
  268.51 +! 		  break;
  268.52 +! 	      if (y != 9 || string[i + 9] != '_')
  268.53 +! 		continue;
  268.54 +! 	      for (y = 10; y < 18; y++)
  268.55 +! 		if (!(string[i + y] >= '0' && string[i + y] <= '9')
  268.56 +! 		    && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
  268.57 +! 		  break;
  268.58 +! 	      if (y != 18)
  268.59 +! 		continue;
  268.60 +! 	      scan = sscanf (string + i + 10, "%X", &seed);
  268.61 +! 	      gcc_assert (scan);
  268.62 +! 	      if (seed != crc32_string (0, flag_random_seed))
  268.63 +! 		continue;
  268.64 +! 	      string = dup = xstrdup (string);
  268.65 +! 	      for (y = 10; y < 18; y++)
  268.66 +! 		dup[i + y] = '0';
  268.67 +! 	      break;
  268.68 +! 	    }
  268.69 +        break;
  268.70 +      }
  268.71 +  
  268.72 +--- 471,511 ----
  268.73 +       as the checksums are used only for sanity checking.  */
  268.74 +    for (i = 0; string[i]; i++)
  268.75 +      {
  268.76 ++       int offset = 0;
  268.77 ++       if (!strncmp (string + i, "_GLOBAL__N_", 11))
  268.78 ++ 	offset = 11;
  268.79 +        if (!strncmp (string + i, "_GLOBAL__", 9))
  268.80 +! 	offset = 9;
  268.81 +! 
  268.82 +!       /* C++ namespaces do have scheme:
  268.83 +!          _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
  268.84 +! 	 since filename might contain extra underscores there seems
  268.85 +! 	 to be no better chance then walk all possible offsets looking
  268.86 +! 	 for magicnuber.  */
  268.87 +!       if (offset)
  268.88 +!         for (;string[offset]; offset++)
  268.89 +! 	  for (i = i + offset; string[i]; i++)
  268.90 +! 	    if (string[i]=='_')
  268.91 +! 	      {
  268.92 +! 		int y;
  268.93 +! 
  268.94 +! 		for (y = 1; y < 9; y++)
  268.95 +! 		  if (!(string[i + y] >= '0' && string[i + y] <= '9')
  268.96 +! 		      && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
  268.97 +! 		    break;
  268.98 +! 		if (y != 9 || string[i + 9] != '_')
  268.99 +! 		  continue;
 268.100 +! 		for (y = 10; y < 18; y++)
 268.101 +! 		  if (!(string[i + y] >= '0' && string[i + y] <= '9')
 268.102 +! 		      && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
 268.103 +! 		    break;
 268.104 +! 		if (y != 18)
 268.105 +! 		  continue;
 268.106 +! 		if (!dup)
 268.107 +! 		  string = dup = xstrdup (string);
 268.108 +! 		for (y = 10; y < 18; y++)
 268.109 +! 		  dup[i + y] = '0';
 268.110 +! 	      }
 268.111 +        break;
 268.112 +      }
 268.113 +  
 268.114 +
 268.115 +
 268.116 +-- 
 268.117 +
 268.118 +
 268.119 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
 268.120 +
 268.121 +------- You are receiving this mail because: -------
 268.122 +You reported the bug, or are watching the reporter.
 268.123 +
 268.124 +
   269.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   269.2 +++ b/patches/gcc/4.0.1/pr21951-fix2.patch	Sat Feb 24 11:00:05 2007 +0000
   269.3 @@ -0,0 +1,71 @@
   269.4 +Workaround for buglet in std::vector etc. when compiling
   269.5 +with gcc-4.0.1 -Wall -O -fno-exceptions
   269.6 +Fixes:
   269.7 +
   269.8 +.../include/c++/4.0.0/bits/vector.tcc: In member function 'void std::vector<_Tp,
   269.9 +_Alloc>::reserve(size_t) [with _Tp = int, _Alloc = std::allocator<int>]':
  269.10 +.../include/c++/4.0.0/bits/vector.tcc:78: warning: control may reach end of
  269.11 +non-void function 'typename _Alloc::pointer std::vector<_Tp,
  269.12 +_Alloc>::_M_allocate_and_copy(size_t, _ForwardIterator, _ForwardIterator) [with
  269.13 +_ForwardIterator = int*, _Tp = int, _Alloc = std::allocator<int>]' being inlined
  269.14 +
  269.15 +See http://gcc.gnu.org/PR21951
  269.16 +
  269.17 +To: gcc-patches at gcc dot gnu dot org
  269.18 +Subject: [4.0.x] may reach end warning in system headers
  269.19 +Message-Id: <20050701183024.E138714C16A9@geoffk5.apple.com>
  269.20 +Date: Fri,  1 Jul 2005 11:30:24 -0700 (PDT)
  269.21 +From: gkeating at apple dot com (Geoffrey Keating)
  269.22 +
  269.23 +
  269.24 +One of our users was getting
  269.25 +
  269.26 +/usr/include/gcc/darwin/4.0/c++/bits/stl_uninitialized.h:113: warning:
  269.27 +control may reach end of non-void function '_ForwardIterator
  269.28 +std::__uninitialized_copy_aux(_InputIterator, _InputIterator,
  269.29 +_ForwardIterator, __false_type) [with _InputIterator =
  269.30 +__gnu_cxx::__normal_iterator<TPoolAllocator::tAllocState*,
  269.31 +std::vector<TPoolAllocator::tAllocState,
  269.32 +std::allocator<TPoolAllocator::tAllocState> > >, _ForwardIterator =
  269.33 +__gnu_cxx::__normal_iterator<TPoolAllocator::tAllocState*,
  269.34 +std::vector<TPoolAllocator::tAllocState,
  269.35 +std::allocator<TPoolAllocator::tAllocState> > >]' being inlined
  269.36 +
  269.37 +which shouldn't be happening, he has no way to change a standard C++
  269.38 +header.  The warning is bogus anyway, but it's fixed in 4.1 through
  269.39 +the CFG changes, which I don't really want to backport to the 4.0
  269.40 +branch, so instead I'll add this patch.  Other warnings generated from
  269.41 +tree-inline.c check for DECL_SYSTEM_HEADER like this.
  269.42 +
  269.43 +Bootstrapped & tested on powerpc-darwin8, I'll commit when the branch
  269.44 +is unfrozen.
  269.45 +
  269.46 +-- 
  269.47 +- Geoffrey Keating <geoffk@apple.com>
  269.48 +
  269.49 +===File ~/patches/gcc-40-4121982.patch======================
  269.50 +Index: ChangeLog
  269.51 +2005-06-28  Geoffrey Keating  <geoffk@apple.com>
  269.52 +
  269.53 +	* tree-inline.c (expand_call_inline): Prevent 'may reach end'
  269.54 +	warning in system headers.
  269.55 +
  269.56 +Index: tree-inline.c
  269.57 +===================================================================
  269.58 +RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
  269.59 +retrieving revision 1.170.8.4
  269.60 +diff -u -p -u -p -r1.170.8.4 tree-inline.c
  269.61 +--- gcc-4.0.1/gcc/tree-inline.c.old	6 Jun 2005 19:20:32 -0000	1.170.8.4
  269.62 ++++ gcc-4.0.1/gcc/tree-inline.c	1 Jul 2005 18:27:26 -0000
  269.63 +@@ -1693,7 +1693,8 @@ expand_call_inline (tree *tp, int *walk_
  269.64 + 	&& !TREE_NO_WARNING (fn)
  269.65 + 	&& !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (fn)))
  269.66 + 	&& return_slot_addr == NULL_TREE
  269.67 +-	&& block_may_fallthru (copy))
  269.68 ++	&& block_may_fallthru (copy)
  269.69 ++	&& !DECL_IN_SYSTEM_HEADER (fn))
  269.70 +       {
  269.71 + 	warning ("control may reach end of non-void function %qD being inlined",
  269.72 + 		 fn);
  269.73 +============================================================
  269.74 +
   270.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   270.2 +++ b/patches/gcc/4.0.2/fix-fixincl.patch	Sat Feb 24 11:00:05 2007 +0000
   270.3 @@ -0,0 +1,72 @@
   270.4 +See http://gcc.gnu.org/PR22541
   270.5 +
   270.6 +From: Dan Kegel
   270.7 +
   270.8 +When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
   270.9 +the configure script happily copies the glibc include files from include to sys-include;
  270.10 +here's the line from the log file (with $PREFIX instead of the real prefix):
  270.11 +
  270.12 +Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
  270.13 +
  270.14 +But later, when running fixincludes, it gives the error message
  270.15 + The directory that should contain system headers does not exist:
  270.16 +  $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
  270.17 +
  270.18 +Nevertheless, it continues building; the header files it installs in
  270.19 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
  270.20 +do not include the boilerplate that would cause it to #include_next the
  270.21 +glibc headers in the system header directory.
  270.22 +Thus the resulting toolchain can't compile the following program:
  270.23 +#include <limits.h>
  270.24 +int x = PATH_MAX;
  270.25 +because its limits.h doesn't include the glibc header.
  270.26 +
  270.27 +That's not nice.  I suspect the problem is that gcc/Makefile.in assumes that
  270.28 +it can refer to $PREFIX/i686-unknown-linux-gnu  with the path 
  270.29 +                $PREFIX/lib/../i686-unknown-linux-gnu, but
  270.30 +that fails because the directory $PREFIX/lib doesn't exist during 'make all';
  270.31 +it is only created later, during 'make install'.  (Which makes this problem
  270.32 +confusing, since one only notices the breakage well after 'make install',
  270.33 +at which point the path configure complained about does exist, and has the
  270.34 +right stuff in it.)
  270.35 +
  270.36 +A possible fix is to replace the line in gcc/Makefile.in that says
  270.37 +    SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  270.38 +with a version that gets rid of extra ..'s, e.g.
  270.39 +    SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
  270.40 +(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
  270.41 +for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
  270.42 +
  270.43 +[rediffed against gcc-4.0.0]
  270.44 +
  270.45 +--- gcc-4.0.0/gcc/Makefile.in.orig	2005-04-04 12:45:13.000000000 -0700
  270.46 ++++ gcc-4.0.0/gcc/Makefile.in	2005-05-20 12:33:43.000000000 -0700
  270.47 +@@ -378,7 +378,10 @@
  270.48 + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
  270.49 + 
  270.50 + # autoconf sets SYSTEM_HEADER_DIR to one of the above.
  270.51 +-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  270.52 ++# Purge it of unneccessary internal relative paths
  270.53 ++# to directories that might not exist yet.
  270.54 ++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
  270.55 ++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
  270.56 + 
  270.57 + # Control whether to run fixproto and fixincludes.
  270.58 + STMP_FIXPROTO = @STMP_FIXPROTO@
  270.59 +@@ -2838,13 +2841,15 @@
  270.60 + ../$(build_subdir)/fixincludes/fixincl: ; @ :
  270.61 + 
  270.62 + # Build fixed copies of system files.
  270.63 ++# Abort if no system headers available, unless building a crosscompiler.
  270.64 ++# FIXME: abort unless building --without-headers would be more accurate and less ugly
  270.65 + stmp-fixinc: gsyslimits.h macro_list \
  270.66 +   ../$(build_subdir)/fixincludes/fixincl \
  270.67 +   ../$(build_subdir)/fixincludes/fixinc.sh
  270.68 + 	@if test ! -d ${SYSTEM_HEADER_DIR}; then \
  270.69 + 	  echo The directory that should contain system headers does not exist: >&2 ; \
  270.70 + 	  echo "  ${SYSTEM_HEADER_DIR}" >&2 ; \
  270.71 +-	  if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
  270.72 ++	  if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
  270.73 + 	  then sleep 1; else exit 1; fi; \
  270.74 + 	fi
  270.75 + 	rm -rf include; mkdir include
   271.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   271.2 +++ b/patches/gcc/4.0.2/pr20815-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   271.3 @@ -0,0 +1,121 @@
   271.4 +Date: 18 May 2005 22:47:59 -0000
   271.5 +Message-ID: <20050518224759.7352.qmail@sourceware.org>
   271.6 +From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
   271.7 +To: dank@kegel.com
   271.8 +References: <20050407215701.20815.dank@kegel.com>
   271.9 +Reply-To: gcc-bugzilla@gcc.gnu.org
  271.10 +Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
  271.11 +
  271.12 +
  271.13 +------- Additional Comments From hubicka at ucw dot cz  2005-05-18 22:47 -------
  271.14 +Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
  271.15 +
  271.16 +> 
  271.17 +> ------- Additional Comments From hubicka at ucw dot cz  2005-05-18 22:22 -------
  271.18 +> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
  271.19 +> 
  271.20 +> coverage_checksum_string already knows a bit about ignoring random seed
  271.21 +> produced mess.  It looks like this needs to be extended somehow to
  271.22 +> handle namespaces too...
  271.23 +
  271.24 +This seems to solve the missmatch.  Would it be possible to test it on
  271.25 +bigger testcase and if it works distile a testcase that don't use
  271.26 +file IO so it is more suitable for gcc regtesting?
  271.27 +
  271.28 +Index: coverage.c
  271.29 +===================================================================
  271.30 +RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
  271.31 +retrieving revision 1.6.2.12.2.12
  271.32 +diff -c -3 -p -r1.6.2.12.2.12 coverage.c
  271.33 +*** gcc-old/gcc/coverage.c	18 May 2005 07:37:31 -0000	1.6.2.12.2.12
  271.34 +--- gcc/gcc/coverage.c	18 May 2005 22:45:36 -0000
  271.35 +*************** coverage_checksum_string (unsigned chksu
  271.36 +*** 471,505 ****
  271.37 +       as the checksums are used only for sanity checking.  */
  271.38 +    for (i = 0; string[i]; i++)
  271.39 +      {
  271.40 +        if (!strncmp (string + i, "_GLOBAL__", 9))
  271.41 +! 	for (i = i + 9; string[i]; i++)
  271.42 +! 	  if (string[i]=='_')
  271.43 +! 	    {
  271.44 +! 	      int y;
  271.45 +! 	      unsigned seed;
  271.46 +! 	      int scan;
  271.47 +! 
  271.48 +! 	      for (y = 1; y < 9; y++)
  271.49 +! 		if (!(string[i + y] >= '0' && string[i + y] <= '9')
  271.50 +! 		    && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
  271.51 +! 		  break;
  271.52 +! 	      if (y != 9 || string[i + 9] != '_')
  271.53 +! 		continue;
  271.54 +! 	      for (y = 10; y < 18; y++)
  271.55 +! 		if (!(string[i + y] >= '0' && string[i + y] <= '9')
  271.56 +! 		    && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
  271.57 +! 		  break;
  271.58 +! 	      if (y != 18)
  271.59 +! 		continue;
  271.60 +! 	      scan = sscanf (string + i + 10, "%X", &seed);
  271.61 +! 	      gcc_assert (scan);
  271.62 +! 	      if (seed != crc32_string (0, flag_random_seed))
  271.63 +! 		continue;
  271.64 +! 	      string = dup = xstrdup (string);
  271.65 +! 	      for (y = 10; y < 18; y++)
  271.66 +! 		dup[i + y] = '0';
  271.67 +! 	      break;
  271.68 +! 	    }
  271.69 +        break;
  271.70 +      }
  271.71 +  
  271.72 +--- 471,511 ----
  271.73 +       as the checksums are used only for sanity checking.  */
  271.74 +    for (i = 0; string[i]; i++)
  271.75 +      {
  271.76 ++       int offset = 0;
  271.77 ++       if (!strncmp (string + i, "_GLOBAL__N_", 11))
  271.78 ++ 	offset = 11;
  271.79 +        if (!strncmp (string + i, "_GLOBAL__", 9))
  271.80 +! 	offset = 9;
  271.81 +! 
  271.82 +!       /* C++ namespaces do have scheme:
  271.83 +!          _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
  271.84 +! 	 since filename might contain extra underscores there seems
  271.85 +! 	 to be no better chance then walk all possible offsets looking
  271.86 +! 	 for magicnuber.  */
  271.87 +!       if (offset)
  271.88 +!         for (;string[offset]; offset++)
  271.89 +! 	  for (i = i + offset; string[i]; i++)
  271.90 +! 	    if (string[i]=='_')
  271.91 +! 	      {
  271.92 +! 		int y;
  271.93 +! 
  271.94 +! 		for (y = 1; y < 9; y++)
  271.95 +! 		  if (!(string[i + y] >= '0' && string[i + y] <= '9')
  271.96 +! 		      && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
  271.97 +! 		    break;
  271.98 +! 		if (y != 9 || string[i + 9] != '_')
  271.99 +! 		  continue;
 271.100 +! 		for (y = 10; y < 18; y++)
 271.101 +! 		  if (!(string[i + y] >= '0' && string[i + y] <= '9')
 271.102 +! 		      && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
 271.103 +! 		    break;
 271.104 +! 		if (y != 18)
 271.105 +! 		  continue;
 271.106 +! 		if (!dup)
 271.107 +! 		  string = dup = xstrdup (string);
 271.108 +! 		for (y = 10; y < 18; y++)
 271.109 +! 		  dup[i + y] = '0';
 271.110 +! 	      }
 271.111 +        break;
 271.112 +      }
 271.113 +  
 271.114 +
 271.115 +
 271.116 +-- 
 271.117 +
 271.118 +
 271.119 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
 271.120 +
 271.121 +------- You are receiving this mail because: -------
 271.122 +You reported the bug, or are watching the reporter.
 271.123 +
 271.124 +
   272.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   272.2 +++ b/patches/gcc/4.0.2/pr21623-workaround.patch	Sat Feb 24 11:00:05 2007 +0000
   272.3 @@ -0,0 +1,53 @@
   272.4 +Message-ID: <434576E1.6020305@sscd.de>
   272.5 +Date: Thu, 06 Oct 2005 21:11:29 +0200
   272.6 +From: Alexander Sieb <sieb@sscd.de>
   272.7 +To: crossgcc@sourceware.org
   272.8 +Subject: Crosstool sh4-linux-gcc-4.0.2-glibc-2.3.5 patches
   272.9 +
  272.10 +Hi,
  272.11 +
  272.12 +attached you find the files I needed to add to crosstool-0.38
  272.13 +in order to build a sh4-linux gcc-4.0.2-glibc-2.3.5 tool chain.
  272.14 +
  272.15 +Files attached:
  272.16 +
  272.17 +sh4-gcc4.dat:
  272.18 +        * gcc4 needs --with-multilib-list=m4,m4-nofpu otherwise a linux
  272.19 +        kernel won't build as it uses the -m4-nofpu option.
  272.20 +
  272.21 +gcc-pr21623.patch:
  272.22 +        * Kaz Kojima provided a patch [really, a workaround -dank] for http://gcc.gnu.org/PR21623
  272.23 +
  272.24 +glibc-2.3.5-sh-memset.patch:
  272.25 +        * A patch for glibc-2.3.5 which corrects memset. From SUGIOKA Toshinobu.
  272.26 +        See content for rationale.
  272.27 +
  272.28 +-- snip --
  272.29 +
  272.30 +-- Here's patch 1 of 2, plus URLs showing where it is in CVS --
  272.31 +
  272.32 +[http://gcc.gnu.org/ml/gcc-cvs/2005-10/msg00081.html]
  272.33 +
  272.34 +2005-09-30  Kaz Kojima  <kkojima@gcc.gnu.org>
  272.35 +
  272.36 +	* config/sh/sh.c (sh_register_move_cost): Add case for moving
  272.37 +	from T_REGS to FP register class.
  272.38 +
  272.39 +[http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sh/sh.c.diff?cvsroot=gcc&r1=1.347&r2=1.348]
  272.40 +
  272.41 +RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
  272.42 +retrieving revision 1.347
  272.43 +retrieving revision 1.348
  272.44 +diff -u -r1.347 -r1.348
  272.45 +--- gcc/gcc/config/sh/sh.c	2005/09/05 12:45:22	1.347
  272.46 ++++ gcc/gcc/config/sh/sh.c	2005/10/03 22:07:08	1.348
  272.47 +@@ -9491,6 +9491,9 @@ sh_register_move_cost (enum machine_mode
  272.48 +       && REGCLASS_HAS_FP_REG (dstclass))
  272.49 +     return 4;
  272.50 + 
  272.51 ++  if (REGCLASS_HAS_FP_REG (dstclass) && srcclass == T_REGS)
  272.52 ++    return ((TARGET_HARD_SH4 && !optimize_size) ? 10 : 7);
  272.53 ++
  272.54 +   if ((REGCLASS_HAS_FP_REG (dstclass) && srcclass == MAC_REGS)
  272.55 +       || (dstclass == MAC_REGS && REGCLASS_HAS_FP_REG (srcclass)))
  272.56 +     return 9;
   273.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   273.2 +++ b/patches/gcc/4.0.3/100-uclibc-conf.patch	Sat Feb 24 11:00:05 2007 +0000
   273.3 @@ -0,0 +1,553 @@
   273.4 +--- gcc-4.0.2/gcc/config/t-linux-uclibc
   273.5 ++++ gcc-4.0.2/gcc/config/t-linux-uclibc
   273.6 +@@ -0,0 +1,5 @@
   273.7 ++# Remove glibc specific files added in t-linux
   273.8 ++SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
   273.9 ++
  273.10 ++# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
  273.11 ++LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
  273.12 +--- gcc-4.0.2/gcc/config.gcc
  273.13 ++++ gcc-4.0.2/gcc/config.gcc
  273.14 +@@ -1778,7 +1778,7 @@
  273.15 + 	;;
  273.16 + sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
  273.17 + sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
  273.18 +-  sh-*-linux* | sh[346lbe]*-*-linux* | \
  273.19 ++  sh*-*-linux* | sh[346lbe]*-*-linux* | \
  273.20 +   sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
  273.21 +    sh64-*-netbsd* | sh64l*-*-netbsd*)
  273.22 + 	tmake_file="${tmake_file} sh/t-sh sh/t-elf"
  273.23 +@@ -2234,10 +2234,16 @@
  273.24 + *)
  273.25 + 	echo "*** Configuration ${target} not supported" 1>&2
  273.26 + 	exit 1
  273.27 + 	;;
  273.28 + esac
  273.29 ++
  273.30 ++# Rather than hook into each target, just do it after all the linux
  273.31 ++# targets have been processed
  273.32 ++case ${target} in
  273.33 ++*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
  273.34 ++esac
  273.35 + 
  273.36 + case ${target} in
  273.37 + i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
  273.38 + 	tmake_file="${tmake_file} i386/t-gmm_malloc"
  273.39 + 	;;
  273.40 +--- gcc-4.0.2/gcc/config/alpha/linux-elf.h
  273.41 ++++ gcc-4.0.2/gcc/config/alpha/linux-elf.h
  273.42 +@@ -27,7 +27,11 @@
  273.43 + #define SUBTARGET_EXTRA_SPECS \
  273.44 + { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
  273.45 + 
  273.46 ++#ifdef USE_UCLIBC
  273.47 ++#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
  273.48 ++#else
  273.49 + #define ELF_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
  273.50 ++#endif
  273.51 + 
  273.52 + #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax}		\
  273.53 +   %{O*:-O3} %{!O*:-O1}						\
  273.54 +--- gcc-4.0.2/gcc/config/arm/linux-elf.h
  273.55 ++++ gcc-4.0.2/gcc/config/arm/linux-elf.h
  273.56 +@@ -81,14 +81,19 @@
  273.57 + #define ENDFILE_SPEC \
  273.58 +   "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
  273.59 + 
  273.60 ++#ifdef USE_UCLIBC
  273.61 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  273.62 ++#else
  273.63 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
  273.64 ++#endif
  273.65 + #undef  LINK_SPEC
  273.66 + #define LINK_SPEC "%{h*} %{version:-v} \
  273.67 +    %{b} %{Wl,*:%*} \
  273.68 +    %{static:-Bstatic} \
  273.69 +    %{shared:-shared} \
  273.70 +    %{symbolic:-Bsymbolic} \
  273.71 +    %{rdynamic:-export-dynamic} \
  273.72 +-   %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  273.73 ++   %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
  273.74 +    -X \
  273.75 +    %{mbig-endian:-EB}" \
  273.76 +    SUBTARGET_EXTRA_LINK_SPEC
  273.77 +--- gcc-4.0.2/gcc/config/cris/linux.h
  273.78 ++++ gcc-4.0.2/gcc/config/cris/linux.h
  273.79 +@@ -79,6 +79,25 @@
  273.80 + #undef CRIS_DEFAULT_CPU_VERSION
  273.81 + #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
  273.82 + 
  273.83 ++#ifdef USE_UCLIBC
  273.84 ++
  273.85 ++#undef CRIS_SUBTARGET_VERSION
  273.86 ++#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
  273.87 ++
  273.88 ++#undef CRIS_LINK_SUBTARGET_SPEC
  273.89 ++#define CRIS_LINK_SUBTARGET_SPEC \
  273.90 ++ "-mcrislinux\
  273.91 ++  -rpath-link include/asm/../..%s\
  273.92 ++  %{shared} %{static}\
  273.93 ++  %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
  273.94 ++  %{!shared: \
  273.95 ++    %{!static: \
  273.96 ++      %{rdynamic:-export-dynamic} \
  273.97 ++      %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
  273.98 ++  %{!r:%{O2|O3: --gc-sections}}"
  273.99 ++
 273.100 ++#else  /* USE_UCLIBC */
 273.101 ++
 273.102 + #undef CRIS_SUBTARGET_VERSION
 273.103 + #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
 273.104 + 
 273.105 +@@ -93,6 +112,8 @@
 273.106 +   %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
 273.107 +   %{!r:%{O2|O3: --gc-sections}}"
 273.108 + 
 273.109 ++#endif  /* USE_UCLIBC */
 273.110 ++
 273.111 + 
 273.112 + /* Node: Run-time Target */
 273.113 + 
 273.114 +--- gcc-4.0.2/gcc/config/i386/linux.h
 273.115 ++++ gcc-4.0.2/gcc/config/i386/linux.h
 273.116 +@@ -107,6 +107,11 @@
 273.117 + #define LINK_EMULATION "elf_i386"
 273.118 + #define DYNAMIC_LINKER "/lib/ld-linux.so.2"
 273.119 + 
 273.120 ++#ifdef USE_UCLIBC
 273.121 ++#undef DYNAMIC_LINKER
 273.122 ++#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 273.123 ++#endif
 273.124 ++
 273.125 + #undef  SUBTARGET_EXTRA_SPECS
 273.126 + #define SUBTARGET_EXTRA_SPECS \
 273.127 +   { "link_emulation", LINK_EMULATION },\
 273.128 +--- gcc-4.0.2/gcc/config/i386/linux64.h
 273.129 ++++ gcc-4.0.2/gcc/config/i386/linux64.h
 273.130 +@@ -54,14 +54,21 @@
 273.131 +    When the -shared link option is used a final link is not being
 273.132 +    done.  */
 273.133 + 
 273.134 ++#ifdef USE_UCLIBC
 273.135 ++#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 273.136 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
 273.137 ++#else
 273.138 ++#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 273.139 ++#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
 273.140 ++#endif
 273.141 + #undef	LINK_SPEC
 273.142 + #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
 273.143 +   %{shared:-shared} \
 273.144 +   %{!shared: \
 273.145 +     %{!static: \
 273.146 +       %{rdynamic:-export-dynamic} \
 273.147 +-      %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 273.148 +-      %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
 273.149 ++      %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
 273.150 ++      %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
 273.151 +     %{static:-static}}"
 273.152 + 
 273.153 + #define MULTILIB_DEFAULTS { "m64" }
 273.154 +--- gcc-4.0.2/gcc/config/ia64/linux.h
 273.155 ++++ gcc-4.0.2/gcc/config/ia64/linux.h
 273.156 +@@ -37,13 +37,18 @@
 273.157 + /* Define this for shared library support because it isn't in the main
 273.158 +    linux.h file.  */
 273.159 + 
 273.160 ++#ifdef USE_UCLIBC
 273.161 ++#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
 273.162 ++#else
 273.163 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
 273.164 ++#endif
 273.165 + #undef LINK_SPEC
 273.166 + #define LINK_SPEC "\
 273.167 +   %{shared:-shared} \
 273.168 +   %{!shared: \
 273.169 +     %{!static: \
 273.170 +       %{rdynamic:-export-dynamic} \
 273.171 +-      %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
 273.172 ++      %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 273.173 +       %{static:-static}}"
 273.174 + 
 273.175 + 
 273.176 +--- gcc-4.0.2/gcc/config/m68k/linux.h
 273.177 ++++ gcc-4.0.2/gcc/config/m68k/linux.h
 273.178 +@@ -127,12 +127,17 @@
 273.179 + 
 273.180 + /* If ELF is the default format, we should not use /lib/elf.  */
 273.181 + 
 273.182 ++#ifdef USE_UCLIBC
 273.183 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 273.184 ++#else
 273.185 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
 273.186 ++#endif
 273.187 + #undef	LINK_SPEC
 273.188 + #define LINK_SPEC "-m m68kelf %{shared} \
 273.189 +   %{!shared: \
 273.190 +     %{!static: \
 273.191 +       %{rdynamic:-export-dynamic} \
 273.192 +-      %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
 273.193 ++      %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 273.194 +     %{static}}"
 273.195 + 
 273.196 + /* For compatibility with linux/a.out */
 273.197 +--- gcc-4.0.2/gcc/config/mips/linux.h
 273.198 ++++ gcc-4.0.2/gcc/config/mips/linux.h
 273.199 +@@ -108,14 +108,19 @@
 273.200 + 
 273.201 + /* Borrowed from sparc/linux.h */
 273.202 + #undef LINK_SPEC
 273.203 ++#ifdef USE_UCLIBC
 273.204 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 273.205 ++#else
 273.206 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
 273.207 ++#endif
 273.208 + #define LINK_SPEC \
 273.209 +  "%(endian_spec) \
 273.210 +   %{shared:-shared} \
 273.211 +   %{!shared: \
 273.212 +     %{!ibcs: \
 273.213 +       %{!static: \
 273.214 +         %{rdynamic:-export-dynamic} \
 273.215 +-        %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
 273.216 ++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 273.217 +         %{static:-static}}}"
 273.218 + 
 273.219 + #undef SUBTARGET_ASM_SPEC
 273.220 +--- gcc-4.0.2/gcc/config/pa/pa-linux.h
 273.221 ++++ gcc-4.0.2/gcc/config/pa/pa-linux.h
 273.222 +@@ -82,13 +82,18 @@
 273.223 + /* Define this for shared library support because it isn't in the main
 273.224 +    linux.h file.  */
 273.225 + 
 273.226 ++#ifdef USE_UCLIBC
 273.227 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 273.228 ++#else
 273.229 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
 273.230 ++#endif
 273.231 + #undef LINK_SPEC
 273.232 + #define LINK_SPEC "\
 273.233 +   %{shared:-shared} \
 273.234 +   %{!shared: \
 273.235 +     %{!static: \
 273.236 +       %{rdynamic:-export-dynamic} \
 273.237 +-      %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
 273.238 ++      %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 273.239 +       %{static:-static}}"
 273.240 + 
 273.241 + /* glibc's profiling functions don't need gcc to allocate counters.  */
 273.242 +--- gcc-4.0.2/gcc/config/rs6000/linux.h
 273.243 ++++ gcc-4.0.2/gcc/config/rs6000/linux.h
 273.244 +@@ -69,7 +69,11 @@
 273.245 + #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
 273.246 + 
 273.247 + #undef	LINK_OS_DEFAULT_SPEC
 273.248 ++#ifdef USE_UCLIBC
 273.249 ++#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
 273.250 ++#else
 273.251 + #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
 273.252 ++#endif
 273.253 + 
 273.254 + #define LINK_GCC_C_SEQUENCE_SPEC \
 273.255 +   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
 273.256 +--- gcc-4.0.2/gcc/config/rs6000/sysv4.h
 273.257 ++++ gcc-4.0.2/gcc/config/rs6000/sysv4.h
 273.258 +@@ -949,6 +949,7 @@
 273.259 +   mcall-linux  : %(link_os_linux)       ; \
 273.260 +   mcall-gnu    : %(link_os_gnu)         ; \
 273.261 +   mcall-netbsd : %(link_os_netbsd)      ; \
 273.262 ++  mcall-linux-uclibc : %(link_os_linux_uclibc); \
 273.263 +   mcall-openbsd: %(link_os_openbsd)     ; \
 273.264 +                : %(link_os_default)     }"
 273.265 + 
 273.266 +@@ -1127,6 +1128,10 @@
 273.267 +   %{rdynamic:-export-dynamic} \
 273.268 +   %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
 273.269 + 
 273.270 ++#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
 273.271 ++  %{rdynamic:-export-dynamic} \
 273.272 ++  %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
 273.273 ++
 273.274 + #if defined(HAVE_LD_EH_FRAME_HDR)
 273.275 + # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
 273.276 + #endif
 273.277 +@@ -1293,6 +1298,7 @@
 273.278 +   { "link_os_sim",		LINK_OS_SIM_SPEC },			\
 273.279 +   { "link_os_freebsd",		LINK_OS_FREEBSD_SPEC },			\
 273.280 +   { "link_os_linux",		LINK_OS_LINUX_SPEC },			\
 273.281 ++  { "link_os_linux_uclibc",	LINK_OS_LINUX_UCLIBC_SPEC },		\
 273.282 +   { "link_os_gnu",		LINK_OS_GNU_SPEC },			\
 273.283 +   { "link_os_netbsd",		LINK_OS_NETBSD_SPEC },			\
 273.284 +   { "link_os_openbsd",		LINK_OS_OPENBSD_SPEC },			\
 273.285 +--- gcc-4.0.2/gcc/config/s390/linux.h
 273.286 ++++ gcc-4.0.2/gcc/config/s390/linux.h
 273.287 +@@ -77,6 +77,13 @@
 273.288 + #define MULTILIB_DEFAULTS { "m31" }
 273.289 + #endif
 273.290 + 
 273.291 ++#ifdef USE_UCLIBC
 273.292 ++#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 273.293 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
 273.294 ++#else
 273.295 ++#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
 273.296 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
 273.297 ++#endif
 273.298 + #undef  LINK_SPEC
 273.299 + #define LINK_SPEC \
 273.300 +   "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
 273.301 +@@ -86,8 +93,8 @@
 273.302 +       %{!static: \
 273.303 + 	%{rdynamic:-export-dynamic} \
 273.304 + 	%{!dynamic-linker: \
 273.305 +-          %{m31:-dynamic-linker /lib/ld.so.1} \
 273.306 +-          %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
 273.307 ++          %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
 273.308 ++          %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
 273.309 + 
 273.310 + 
 273.311 + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 273.312 +--- gcc-4.0.2/gcc/config/sh/linux.h
 273.313 ++++ gcc-4.0.2/gcc/config/sh/linux.h
 273.314 +@@ -67,11 +67,16 @@
 273.315 + #undef SUBTARGET_LINK_EMUL_SUFFIX
 273.316 + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
 273.317 + #undef SUBTARGET_LINK_SPEC
 273.318 ++#ifdef USE_UCLIBC
 273.319 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 273.320 ++#else
 273.321 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 273.322 ++#endif
 273.323 + #define SUBTARGET_LINK_SPEC \
 273.324 +   "%{shared:-shared} \
 273.325 +    %{!static: \
 273.326 +      %{rdynamic:-export-dynamic} \
 273.327 +-     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 273.328 ++     %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 273.329 +    %{static:-static}"
 273.330 + 
 273.331 + #undef LIB_SPEC
 273.332 +--- gcc-4.0.2/gcc/config/sparc/linux.h
 273.333 ++++ gcc-4.0.2/gcc/config/sparc/linux.h
 273.334 +@@ -130,14 +130,19 @@
 273.335 + 
 273.336 + /* If ELF is the default format, we should not use /lib/elf.  */
 273.337 + 
 273.338 ++#ifdef USE_UCLIBC
 273.339 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 273.340 ++#else
 273.341 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 273.342 ++#endif
 273.343 + #undef  LINK_SPEC
 273.344 + #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
 273.345 +   %{!mno-relax:%{!r:-relax}} \
 273.346 +   %{!shared: \
 273.347 +     %{!ibcs: \
 273.348 +       %{!static: \
 273.349 +         %{rdynamic:-export-dynamic} \
 273.350 +-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 273.351 ++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 273.352 +         %{static:-static}}}"
 273.353 + 
 273.354 + /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
 273.355 +--- gcc-4.0.2/gcc/config/sparc/linux64.h
 273.356 ++++ gcc-4.0.2/gcc/config/sparc/linux64.h
 273.357 +@@ -167,12 +166,17 @@
 273.358 +   { "link_arch_default", LINK_ARCH_DEFAULT_SPEC },	  \
 273.359 +   { "link_arch",	 LINK_ARCH_SPEC },
 273.360 +     
 273.361 ++#ifdef USE_UCLIBC
 273.362 ++#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
 273.363 ++#else
 273.364 ++#define ELF_DYNAMIC_LINKER  "/lib/ld-linux.so.2"
 273.365 ++#endif
 273.366 + #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
 273.367 +   %{!shared: \
 273.368 +     %{!ibcs: \
 273.369 +       %{!static: \
 273.370 +         %{rdynamic:-export-dynamic} \
 273.371 +-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 273.372 ++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 273.373 +         %{static:-static}}} \
 273.374 + "
 273.375 + 
 273.376 +--- gcc-4.0.2/libtool.m4
 273.377 ++++ gcc-4.0.2/libtool.m4
 273.378 +@@ -682,6 +682,11 @@
 273.379 +   lt_cv_deplibs_check_method=pass_all
 273.380 +   ;;
 273.381 + 
 273.382 ++linux-uclibc*)
 273.383 ++  lt_cv_deplibs_check_method=pass_all
 273.384 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 273.385 ++  ;;
 273.386 ++
 273.387 + netbsd* | knetbsd*-gnu)
 273.388 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 273.389 +     [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
 273.390 +--- gcc-4.0.2/ltconfig
 273.391 ++++ gcc-4.0.2/ltconfig
 273.392 +@@ -603,6 +603,7 @@
 273.393 + 
 273.394 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
 273.395 + case $host_os in
 273.396 ++linux-uclibc*) ;;
 273.397 + linux-gnu*) ;;
 273.398 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
 273.399 + esac
 273.400 +@@ -1274,6 +1275,23 @@
 273.401 +   dynamic_linker='GNU/Linux ld.so'
 273.402 +   ;;
 273.403 + 
 273.404 ++linux-uclibc*)
 273.405 ++  version_type=linux
 273.406 ++  need_lib_prefix=no
 273.407 ++  need_version=no
 273.408 ++  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 273.409 ++  soname_spec='${libname}${release}.so$major'
 273.410 ++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 273.411 ++  shlibpath_var=LD_LIBRARY_PATH
 273.412 ++  shlibpath_overrides_runpath=no
 273.413 ++  # This implies no fast_install, which is unacceptable.
 273.414 ++  # Some rework will be needed to allow for fast_install
 273.415 ++  # before this can be enabled.
 273.416 ++  hardcode_into_libs=yes
 273.417 ++  # Assume using the uClibc dynamic linker.
 273.418 ++  dynamic_linker="uClibc ld.so"
 273.419 ++  ;;
 273.420 ++
 273.421 + netbsd*)
 273.422 +   need_lib_prefix=no
 273.423 +   need_version=no
 273.424 +--- gcc-4.0.2/libffi/configure
 273.425 ++++ gcc-4.0.2/libffi/configure
 273.426 +@@ -3457,6 +3457,11 @@
 273.427 +   lt_cv_deplibs_check_method=pass_all
 273.428 +   ;;
 273.429 + 
 273.430 ++linux-uclibc*)
 273.431 ++  lt_cv_deplibs_check_method=pass_all
 273.432 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 273.433 ++  ;;
 273.434 ++
 273.435 + netbsd* | knetbsd*-gnu)
 273.436 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 273.437 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 273.438 +--- gcc-4.0.2/libgfortran/configure
 273.439 ++++ gcc-4.0.2/libgfortran/configure
 273.440 +@@ -3681,6 +3681,11 @@
 273.441 +   lt_cv_deplibs_check_method=pass_all
 273.442 +   ;;
 273.443 + 
 273.444 ++linux-uclibc*)
 273.445 ++  lt_cv_deplibs_check_method=pass_all
 273.446 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 273.447 ++  ;;
 273.448 ++
 273.449 + netbsd* | knetbsd*-gnu)
 273.450 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 273.451 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 273.452 +--- gcc-4.0.2/libjava/configure
 273.453 ++++ gcc-4.0.2/libjava/configure
 273.454 +@@ -4351,6 +4351,11 @@
 273.455 +   lt_cv_deplibs_check_method=pass_all
 273.456 +   ;;
 273.457 + 
 273.458 ++linux-uclibc*)
 273.459 ++  lt_cv_deplibs_check_method=pass_all
 273.460 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 273.461 ++  ;;
 273.462 ++
 273.463 + netbsd* | knetbsd*-gnu)
 273.464 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 273.465 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 273.466 +--- gcc-4.0.2/libmudflap/configure
 273.467 ++++ gcc-4.0.2/libmudflap/configure
 273.468 +@@ -5380,6 +5380,11 @@
 273.469 +   lt_cv_deplibs_check_method=pass_all
 273.470 +   ;;
 273.471 + 
 273.472 ++linux-uclibc*)
 273.473 ++  lt_cv_deplibs_check_method=pass_all
 273.474 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 273.475 ++  ;;
 273.476 ++
 273.477 + netbsd* | knetbsd*-gnu)
 273.478 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 273.479 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 273.480 +--- gcc-4.0.2/libobjc/configure
 273.481 ++++ gcc-4.0.2/libobjc/configure
 273.482 +@@ -3283,6 +3283,11 @@
 273.483 +   lt_cv_deplibs_check_method=pass_all
 273.484 +   ;;
 273.485 + 
 273.486 ++linux-uclibc*)
 273.487 ++  lt_cv_deplibs_check_method=pass_all
 273.488 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 273.489 ++  ;;
 273.490 ++
 273.491 + netbsd* | knetbsd*-gnu)
 273.492 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 273.493 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 273.494 +--- gcc-4.0.2/boehm-gc/configure
 273.495 ++++ gcc-4.0.2/boehm-gc/configure
 273.496 +@@ -4320,6 +4320,11 @@
 273.497 +   lt_cv_deplibs_check_method=pass_all
 273.498 +   ;;
 273.499 + 
 273.500 ++linux-uclibc*)
 273.501 ++  lt_cv_deplibs_check_method=pass_all
 273.502 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 273.503 ++  ;;
 273.504 ++
 273.505 + netbsd* | knetbsd*-gnu)
 273.506 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 273.507 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 273.508 +--- gcc-4.0.2/configure
 273.509 ++++ gcc-4.0.2/configure
 273.510 +@@ -1141,7 +1141,7 @@
 273.511 +     ;;
 273.512 + "")
 273.513 +     case "${target}" in
 273.514 +-    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
 273.515 ++    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
 273.516 +         # Enable libmudflap by default in GNU and friends.
 273.517 + 	;;
 273.518 +     *-*-freebsd*)
 273.519 +--- gcc-4.0.2/configure.in
 273.520 ++++ gcc-4.0.2/configure.in
 273.521 +@@ -350,7 +350,7 @@
 273.522 +     ;;
 273.523 + "")
 273.524 +     case "${target}" in
 273.525 +-    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
 273.526 ++    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
 273.527 +         # Enable libmudflap by default in GNU and friends.
 273.528 + 	;;
 273.529 +     *-*-freebsd*)
 273.530 +--- gcc-4.0.2/contrib/regression/objs-gcc.sh
 273.531 ++++ gcc-4.0.2/contrib/regression/objs-gcc.sh
 273.532 +@@ -105,6 +105,10 @@
 273.533 +  then
 273.534 +   make all-gdb all-dejagnu all-ld || exit 1
 273.535 +   make install-gdb install-dejagnu install-ld || exit 1
 273.536 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
 273.537 ++ then
 273.538 ++  make all-gdb all-dejagnu all-ld || exit 1
 273.539 ++  make install-gdb install-dejagnu install-ld || exit 1
 273.540 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
 273.541 +   make bootstrap || exit 1
 273.542 +   make install || exit 1
 273.543 +--- gcc-4.0.2/zlib/configure
 273.544 ++++ gcc-4.0.2/zlib/configure
 273.545 +@@ -3426,6 +3426,11 @@
 273.546 +   lt_cv_deplibs_check_method=pass_all
 273.547 +   ;;
 273.548 + 
 273.549 ++linux-uclibc*)
 273.550 ++  lt_cv_deplibs_check_method=pass_all
 273.551 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 273.552 ++  ;;
 273.553 ++
 273.554 + netbsd* | knetbsd*-gnu)
 273.555 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 273.556 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
   274.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   274.2 +++ b/patches/gcc/4.0.3/200-uclibc-locale.patch	Sat Feb 24 11:00:05 2007 +0000
   274.3 @@ -0,0 +1,3237 @@
   274.4 +diff -urN gcc-4.0.0-100/libstdc++-v3/acinclude.m4 gcc-4.0.0/libstdc++-v3/acinclude.m4
   274.5 +--- gcc-4.0.0-100/libstdc++-v3/acinclude.m4	2005-04-30 13:06:53.000000000 -0500
   274.6 ++++ gcc-4.0.0/libstdc++-v3/acinclude.m4	2005-04-28 20:19:01.000000000 -0500
   274.7 +@@ -1104,7 +1104,7 @@
   274.8 +   AC_MSG_CHECKING([for C locale to use])
   274.9 +   GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
  274.10 +     [use MODEL for target locale package],
  274.11 +-    [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
  274.12 ++    [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
  274.13 +   
  274.14 +   # If they didn't use this option switch, or if they specified --enable
  274.15 +   # with no specific model, we'll have to look for one.  If they
  274.16 +@@ -1120,6 +1120,9 @@
  274.17 +   # Default to "generic".
  274.18 +   if test $enable_clocale_flag = auto; then
  274.19 +     case ${target_os} in
  274.20 ++      *-uclibc*)
  274.21 ++        enable_clocale_flag=uclibc
  274.22 ++        ;;
  274.23 +       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
  274.24 +         AC_EGREP_CPP([_GLIBCXX_ok], [
  274.25 +         #include <features.h>
  274.26 +@@ -1263,6 +1266,40 @@
  274.27 +       CTIME_CC=config/locale/generic/time_members.cc
  274.28 +       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
  274.29 +       ;;
  274.30 ++    uclibc)
  274.31 ++      AC_MSG_RESULT(uclibc)
  274.32 ++
  274.33 ++      # Declare intention to use gettext, and add support for specific
  274.34 ++      # languages.
  274.35 ++      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
  274.36 ++      ALL_LINGUAS="de fr"
  274.37 ++
  274.38 ++      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
  274.39 ++      AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
  274.40 ++      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
  274.41 ++        USE_NLS=yes
  274.42 ++      fi
  274.43 ++      # Export the build objects.
  274.44 ++      for ling in $ALL_LINGUAS; do \
  274.45 ++        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
  274.46 ++        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
  274.47 ++      done
  274.48 ++      AC_SUBST(glibcxx_MOFILES)
  274.49 ++      AC_SUBST(glibcxx_POFILES)
  274.50 ++
  274.51 ++      CLOCALE_H=config/locale/uclibc/c_locale.h
  274.52 ++      CLOCALE_CC=config/locale/uclibc/c_locale.cc
  274.53 ++      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
  274.54 ++      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
  274.55 ++      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
  274.56 ++      CMESSAGES_H=config/locale/uclibc/messages_members.h
  274.57 ++      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
  274.58 ++      CMONEY_CC=config/locale/uclibc/monetary_members.cc
  274.59 ++      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
  274.60 ++      CTIME_H=config/locale/uclibc/time_members.h
  274.61 ++      CTIME_CC=config/locale/uclibc/time_members.cc
  274.62 ++      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
  274.63 ++      ;;
  274.64 +   esac
  274.65 + 
  274.66 +   # This is where the testsuite looks for locale catalogs, using the
  274.67 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
  274.68 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c++locale_internal.h	1969-12-31 18:00:00.000000000 -0600
  274.69 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h	2005-04-28 01:13:15.000000000 -0500
  274.70 +@@ -0,0 +1,59 @@
  274.71 ++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
  274.72 ++
  274.73 ++// Copyright (C) 2002, 2004 Free Software Foundation, Inc.
  274.74 ++//
  274.75 ++// This file is part of the GNU ISO C++ Library.  This library is free
  274.76 ++// software; you can redistribute it and/or modify it under the
  274.77 ++// terms of the GNU General Public License as published by the
  274.78 ++// Free Software Foundation; either version 2, or (at your option)
  274.79 ++// any later version.
  274.80 ++
  274.81 ++// This library is distributed in the hope that it will be useful,
  274.82 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
  274.83 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  274.84 ++// GNU General Public License for more details.
  274.85 ++
  274.86 ++// You should have received a copy of the GNU General Public License along
  274.87 ++// with this library; see the file COPYING.  If not, write to the Free
  274.88 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  274.89 ++// USA.
  274.90 ++
  274.91 ++// As a special exception, you may use this file as part of a free software
  274.92 ++// library without restriction.  Specifically, if other files instantiate
  274.93 ++// templates or use macros or inline functions from this file, or you compile
  274.94 ++// this file and link it with other files to produce an executable, this
  274.95 ++// file does not by itself cause the resulting executable to be covered by
  274.96 ++// the GNU General Public License.  This exception does not however
  274.97 ++// invalidate any other reasons why the executable file might be covered by
  274.98 ++// the GNU General Public License.
  274.99 ++
 274.100 ++// Written by Jakub Jelinek <jakub@redhat.com>
 274.101 ++
 274.102 ++#include <clocale>
 274.103 ++
 274.104 ++#ifdef __UCLIBC_MJN3_ONLY__
 274.105 ++#warning clean this up
 274.106 ++#endif
 274.107 ++
 274.108 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.109 ++                                                  
 274.110 ++extern "C" __typeof(iswctype_l) __iswctype_l;
 274.111 ++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
 274.112 ++extern "C" __typeof(strcoll_l) __strcoll_l;
 274.113 ++extern "C" __typeof(strftime_l) __strftime_l;
 274.114 ++extern "C" __typeof(strtod_l) __strtod_l;
 274.115 ++extern "C" __typeof(strtof_l) __strtof_l;
 274.116 ++extern "C" __typeof(strtold_l) __strtold_l;
 274.117 ++extern "C" __typeof(strxfrm_l) __strxfrm_l;
 274.118 ++extern "C" __typeof(towlower_l) __towlower_l;
 274.119 ++extern "C" __typeof(towupper_l) __towupper_l;
 274.120 ++extern "C" __typeof(wcscoll_l) __wcscoll_l;
 274.121 ++extern "C" __typeof(wcsftime_l) __wcsftime_l;
 274.122 ++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
 274.123 ++extern "C" __typeof(wctype_l) __wctype_l;
 274.124 ++extern "C" __typeof(newlocale) __newlocale;
 274.125 ++extern "C" __typeof(freelocale) __freelocale;
 274.126 ++extern "C" __typeof(duplocale) __duplocale;
 274.127 ++extern "C" __typeof(uselocale) __uselocale;
 274.128 ++
 274.129 ++#endif // GLIBC 2.3 and later
 274.130 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
 274.131 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.cc	1969-12-31 18:00:00.000000000 -0600
 274.132 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.cc	2005-04-28 01:13:15.000000000 -0500
 274.133 +@@ -0,0 +1,160 @@
 274.134 ++// Wrapper for underlying C-language localization -*- C++ -*-
 274.135 ++
 274.136 ++// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
 274.137 ++//
 274.138 ++// This file is part of the GNU ISO C++ Library.  This library is free
 274.139 ++// software; you can redistribute it and/or modify it under the
 274.140 ++// terms of the GNU General Public License as published by the
 274.141 ++// Free Software Foundation; either version 2, or (at your option)
 274.142 ++// any later version.
 274.143 ++
 274.144 ++// This library is distributed in the hope that it will be useful,
 274.145 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 274.146 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 274.147 ++// GNU General Public License for more details.
 274.148 ++
 274.149 ++// You should have received a copy of the GNU General Public License along
 274.150 ++// with this library; see the file COPYING.  If not, write to the Free
 274.151 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 274.152 ++// USA.
 274.153 ++
 274.154 ++// As a special exception, you may use this file as part of a free software
 274.155 ++// library without restriction.  Specifically, if other files instantiate
 274.156 ++// templates or use macros or inline functions from this file, or you compile
 274.157 ++// this file and link it with other files to produce an executable, this
 274.158 ++// file does not by itself cause the resulting executable to be covered by
 274.159 ++// the GNU General Public License.  This exception does not however
 274.160 ++// invalidate any other reasons why the executable file might be covered by
 274.161 ++// the GNU General Public License.
 274.162 ++
 274.163 ++//
 274.164 ++// ISO C++ 14882: 22.8  Standard locale categories.
 274.165 ++//
 274.166 ++
 274.167 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 274.168 ++
 274.169 ++#include <cerrno>  // For errno
 274.170 ++#include <locale>
 274.171 ++#include <stdexcept>
 274.172 ++#include <langinfo.h>
 274.173 ++#include <bits/c++locale_internal.h>
 274.174 ++
 274.175 ++#ifndef __UCLIBC_HAS_XLOCALE__
 274.176 ++#define __strtol_l(S, E, B, L)      strtol((S), (E), (B))
 274.177 ++#define __strtoul_l(S, E, B, L)     strtoul((S), (E), (B))
 274.178 ++#define __strtoll_l(S, E, B, L)     strtoll((S), (E), (B))
 274.179 ++#define __strtoull_l(S, E, B, L)    strtoull((S), (E), (B))
 274.180 ++#define __strtof_l(S, E, L)         strtof((S), (E))
 274.181 ++#define __strtod_l(S, E, L)         strtod((S), (E))
 274.182 ++#define __strtold_l(S, E, L)        strtold((S), (E))
 274.183 ++#warning should dummy __newlocale check for C|POSIX ?
 274.184 ++#define __newlocale(a, b, c)        NULL
 274.185 ++#define __freelocale(a)             ((void)0)
 274.186 ++#define __duplocale(a)              __c_locale()
 274.187 ++#endif
 274.188 ++
 274.189 ++namespace std 
 274.190 ++{
 274.191 ++  template<>
 274.192 ++    void
 274.193 ++    __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, 
 274.194 ++		   const __c_locale& __cloc)
 274.195 ++    {
 274.196 ++      if (!(__err & ios_base::failbit))
 274.197 ++	{
 274.198 ++	  char* __sanity;
 274.199 ++	  errno = 0;
 274.200 ++	  float __f = __strtof_l(__s, &__sanity, __cloc);
 274.201 ++          if (__sanity != __s && errno != ERANGE)
 274.202 ++	    __v = __f;
 274.203 ++	  else
 274.204 ++	    __err |= ios_base::failbit;
 274.205 ++	}
 274.206 ++    }
 274.207 ++
 274.208 ++  template<>
 274.209 ++    void
 274.210 ++    __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, 
 274.211 ++		   const __c_locale& __cloc)
 274.212 ++    {
 274.213 ++      if (!(__err & ios_base::failbit))
 274.214 ++	{
 274.215 ++	  char* __sanity;
 274.216 ++	  errno = 0;
 274.217 ++	  double __d = __strtod_l(__s, &__sanity, __cloc);
 274.218 ++          if (__sanity != __s && errno != ERANGE)
 274.219 ++	    __v = __d;
 274.220 ++	  else
 274.221 ++	    __err |= ios_base::failbit;
 274.222 ++	}
 274.223 ++    }
 274.224 ++
 274.225 ++  template<>
 274.226 ++    void
 274.227 ++    __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
 274.228 ++		   const __c_locale& __cloc)
 274.229 ++    {
 274.230 ++      if (!(__err & ios_base::failbit))
 274.231 ++	{
 274.232 ++	  char* __sanity;
 274.233 ++	  errno = 0;
 274.234 ++	  long double __ld = __strtold_l(__s, &__sanity, __cloc);
 274.235 ++          if (__sanity != __s && errno != ERANGE)
 274.236 ++	    __v = __ld;
 274.237 ++	  else
 274.238 ++	    __err |= ios_base::failbit;
 274.239 ++	}
 274.240 ++    }
 274.241 ++
 274.242 ++  void
 274.243 ++  locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, 
 274.244 ++				    __c_locale __old)
 274.245 ++  {
 274.246 ++    __cloc = __newlocale(1 << LC_ALL, __s, __old);
 274.247 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.248 ++    if (!__cloc)
 274.249 ++      {
 274.250 ++	// This named locale is not supported by the underlying OS.
 274.251 ++	__throw_runtime_error(__N("locale::facet::_S_create_c_locale "
 274.252 ++			      "name not valid"));
 274.253 ++      }
 274.254 ++#endif
 274.255 ++  }
 274.256 ++  
 274.257 ++  void
 274.258 ++  locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
 274.259 ++  {
 274.260 ++    if (_S_get_c_locale() != __cloc)
 274.261 ++      __freelocale(__cloc); 
 274.262 ++  }
 274.263 ++
 274.264 ++  __c_locale
 274.265 ++  locale::facet::_S_clone_c_locale(__c_locale& __cloc)
 274.266 ++  { return __duplocale(__cloc); }
 274.267 ++} // namespace std
 274.268 ++
 274.269 ++namespace __gnu_cxx
 274.270 ++{
 274.271 ++  const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
 274.272 ++    {
 274.273 ++      "LC_CTYPE", 
 274.274 ++      "LC_NUMERIC",
 274.275 ++      "LC_TIME", 
 274.276 ++      "LC_COLLATE", 
 274.277 ++      "LC_MONETARY",
 274.278 ++      "LC_MESSAGES", 
 274.279 ++#if _GLIBCXX_NUM_CATEGORIES != 0
 274.280 ++      "LC_PAPER", 
 274.281 ++      "LC_NAME", 
 274.282 ++      "LC_ADDRESS",
 274.283 ++      "LC_TELEPHONE", 
 274.284 ++      "LC_MEASUREMENT", 
 274.285 ++      "LC_IDENTIFICATION" 
 274.286 ++#endif
 274.287 ++    };
 274.288 ++}
 274.289 ++
 274.290 ++namespace std
 274.291 ++{
 274.292 ++  const char* const* const locale::_S_categories = __gnu_cxx::category_names;
 274.293 ++}  // namespace std
 274.294 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.h
 274.295 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.h	1969-12-31 18:00:00.000000000 -0600
 274.296 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.h	2005-04-28 01:13:15.000000000 -0500
 274.297 +@@ -0,0 +1,115 @@
 274.298 ++// Wrapper for underlying C-language localization -*- C++ -*-
 274.299 ++
 274.300 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 274.301 ++//
 274.302 ++// This file is part of the GNU ISO C++ Library.  This library is free
 274.303 ++// software; you can redistribute it and/or modify it under the
 274.304 ++// terms of the GNU General Public License as published by the
 274.305 ++// Free Software Foundation; either version 2, or (at your option)
 274.306 ++// any later version.
 274.307 ++
 274.308 ++// This library is distributed in the hope that it will be useful,
 274.309 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 274.310 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 274.311 ++// GNU General Public License for more details.
 274.312 ++
 274.313 ++// You should have received a copy of the GNU General Public License along
 274.314 ++// with this library; see the file COPYING.  If not, write to the Free
 274.315 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 274.316 ++// USA.
 274.317 ++
 274.318 ++// As a special exception, you may use this file as part of a free software
 274.319 ++// library without restriction.  Specifically, if other files instantiate
 274.320 ++// templates or use macros or inline functions from this file, or you compile
 274.321 ++// this file and link it with other files to produce an executable, this
 274.322 ++// file does not by itself cause the resulting executable to be covered by
 274.323 ++// the GNU General Public License.  This exception does not however
 274.324 ++// invalidate any other reasons why the executable file might be covered by
 274.325 ++// the GNU General Public License.
 274.326 ++
 274.327 ++//
 274.328 ++// ISO C++ 14882: 22.8  Standard locale categories.
 274.329 ++//
 274.330 ++
 274.331 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 274.332 ++
 274.333 ++#ifndef _C_LOCALE_H
 274.334 ++#define _C_LOCALE_H 1
 274.335 ++
 274.336 ++#pragma GCC system_header
 274.337 ++
 274.338 ++#include <cstring>              // get std::strlen
 274.339 ++#include <cstdio>               // get std::snprintf or std::sprintf
 274.340 ++#include <clocale>
 274.341 ++#include <langinfo.h>		// For codecvt
 274.342 ++#ifdef __UCLIBC_MJN3_ONLY__
 274.343 ++#warning fix this
 274.344 ++#endif
 274.345 ++#ifdef __UCLIBC_HAS_LOCALE__
 274.346 ++#include <iconv.h>		// For codecvt using iconv, iconv_t
 274.347 ++#endif
 274.348 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
 274.349 ++#include <libintl.h> 		// For messages
 274.350 ++#endif
 274.351 ++
 274.352 ++#ifdef __UCLIBC_MJN3_ONLY__
 274.353 ++#warning what is _GLIBCXX_C_LOCALE_GNU for
 274.354 ++#endif
 274.355 ++#define _GLIBCXX_C_LOCALE_GNU 1
 274.356 ++
 274.357 ++#ifdef __UCLIBC_MJN3_ONLY__
 274.358 ++#warning fix categories
 274.359 ++#endif
 274.360 ++// #define _GLIBCXX_NUM_CATEGORIES 6
 274.361 ++#define _GLIBCXX_NUM_CATEGORIES 0
 274.362 ++ 
 274.363 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.364 ++namespace __gnu_cxx
 274.365 ++{
 274.366 ++  extern "C" __typeof(uselocale) __uselocale;
 274.367 ++}
 274.368 ++#endif
 274.369 ++
 274.370 ++namespace std
 274.371 ++{
 274.372 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.373 ++  typedef __locale_t		__c_locale;
 274.374 ++#else
 274.375 ++  typedef int*			__c_locale;
 274.376 ++#endif
 274.377 ++
 274.378 ++  // Convert numeric value of type _Tv to string and return length of
 274.379 ++  // string.  If snprintf is available use it, otherwise fall back to
 274.380 ++  // the unsafe sprintf which, in general, can be dangerous and should
 274.381 ++  // be avoided.
 274.382 ++  template<typename _Tv>
 274.383 ++    int
 274.384 ++    __convert_from_v(char* __out, const int __size, const char* __fmt,
 274.385 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.386 ++		     _Tv __v, const __c_locale& __cloc, int __prec)
 274.387 ++    {
 274.388 ++      __c_locale __old = __gnu_cxx::__uselocale(__cloc);
 274.389 ++#else
 274.390 ++		     _Tv __v, const __c_locale&, int __prec)
 274.391 ++    {
 274.392 ++# ifdef __UCLIBC_HAS_LOCALE__
 274.393 ++      char* __old = std::setlocale(LC_ALL, NULL);
 274.394 ++      char* __sav = new char[std::strlen(__old) + 1];
 274.395 ++      std::strcpy(__sav, __old);
 274.396 ++      std::setlocale(LC_ALL, "C");
 274.397 ++# endif
 274.398 ++#endif
 274.399 ++
 274.400 ++      const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
 274.401 ++
 274.402 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.403 ++      __gnu_cxx::__uselocale(__old);
 274.404 ++#elif defined __UCLIBC_HAS_LOCALE__
 274.405 ++      std::setlocale(LC_ALL, __sav);
 274.406 ++      delete [] __sav;
 274.407 ++#endif
 274.408 ++      return __ret;
 274.409 ++    }
 274.410 ++}
 274.411 ++
 274.412 ++#endif
 274.413 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
 274.414 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/codecvt_members.cc	1969-12-31 18:00:00.000000000 -0600
 274.415 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc	2005-04-28 01:13:15.000000000 -0500
 274.416 +@@ -0,0 +1,306 @@
 274.417 ++// std::codecvt implementation details, GNU version -*- C++ -*-
 274.418 ++
 274.419 ++// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 274.420 ++//
 274.421 ++// This file is part of the GNU ISO C++ Library.  This library is free
 274.422 ++// software; you can redistribute it and/or modify it under the
 274.423 ++// terms of the GNU General Public License as published by the
 274.424 ++// Free Software Foundation; either version 2, or (at your option)
 274.425 ++// any later version.
 274.426 ++
 274.427 ++// This library is distributed in the hope that it will be useful,
 274.428 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 274.429 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 274.430 ++// GNU General Public License for more details.
 274.431 ++
 274.432 ++// You should have received a copy of the GNU General Public License along
 274.433 ++// with this library; see the file COPYING.  If not, write to the Free
 274.434 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 274.435 ++// USA.
 274.436 ++
 274.437 ++// As a special exception, you may use this file as part of a free software
 274.438 ++// library without restriction.  Specifically, if other files instantiate
 274.439 ++// templates or use macros or inline functions from this file, or you compile
 274.440 ++// this file and link it with other files to produce an executable, this
 274.441 ++// file does not by itself cause the resulting executable to be covered by
 274.442 ++// the GNU General Public License.  This exception does not however
 274.443 ++// invalidate any other reasons why the executable file might be covered by
 274.444 ++// the GNU General Public License.
 274.445 ++
 274.446 ++//
 274.447 ++// ISO C++ 14882: 22.2.1.5 - Template class codecvt
 274.448 ++//
 274.449 ++
 274.450 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 274.451 ++
 274.452 ++#include <locale>
 274.453 ++#include <bits/c++locale_internal.h>
 274.454 ++
 274.455 ++namespace std
 274.456 ++{
 274.457 ++  // Specializations.
 274.458 ++#ifdef _GLIBCXX_USE_WCHAR_T
 274.459 ++  codecvt_base::result
 274.460 ++  codecvt<wchar_t, char, mbstate_t>::
 274.461 ++  do_out(state_type& __state, const intern_type* __from, 
 274.462 ++	 const intern_type* __from_end, const intern_type*& __from_next,
 274.463 ++	 extern_type* __to, extern_type* __to_end,
 274.464 ++	 extern_type*& __to_next) const
 274.465 ++  {
 274.466 ++    result __ret = ok;
 274.467 ++    state_type __tmp_state(__state);
 274.468 ++
 274.469 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.470 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 274.471 ++#endif
 274.472 ++
 274.473 ++    // wcsnrtombs is *very* fast but stops if encounters NUL characters:
 274.474 ++    // in case we fall back to wcrtomb and then continue, in a loop.
 274.475 ++    // NB: wcsnrtombs is a GNU extension
 274.476 ++    for (__from_next = __from, __to_next = __to;
 274.477 ++	 __from_next < __from_end && __to_next < __to_end
 274.478 ++	 && __ret == ok;)
 274.479 ++      {
 274.480 ++	const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
 274.481 ++						      __from_end - __from_next);
 274.482 ++	if (!__from_chunk_end)
 274.483 ++	  __from_chunk_end = __from_end;
 274.484 ++
 274.485 ++	__from = __from_next;
 274.486 ++	const size_t __conv = wcsnrtombs(__to_next, &__from_next,
 274.487 ++					 __from_chunk_end - __from_next,
 274.488 ++					 __to_end - __to_next, &__state);
 274.489 ++	if (__conv == static_cast<size_t>(-1))
 274.490 ++	  {
 274.491 ++	    // In case of error, in order to stop at the exact place we
 274.492 ++	    // have to start again from the beginning with a series of
 274.493 ++	    // wcrtomb.
 274.494 ++	    for (; __from < __from_next; ++__from)
 274.495 ++	      __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
 274.496 ++	    __state = __tmp_state;
 274.497 ++	    __ret = error;
 274.498 ++	  }
 274.499 ++	else if (__from_next && __from_next < __from_chunk_end)
 274.500 ++	  {
 274.501 ++	    __to_next += __conv;
 274.502 ++	    __ret = partial;
 274.503 ++	  }
 274.504 ++	else
 274.505 ++	  {
 274.506 ++	    __from_next = __from_chunk_end;
 274.507 ++	    __to_next += __conv;
 274.508 ++	  }
 274.509 ++
 274.510 ++	if (__from_next < __from_end && __ret == ok)
 274.511 ++	  {
 274.512 ++	    extern_type __buf[MB_LEN_MAX];
 274.513 ++	    __tmp_state = __state;
 274.514 ++	    const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
 274.515 ++	    if (__conv > static_cast<size_t>(__to_end - __to_next))
 274.516 ++	      __ret = partial;
 274.517 ++	    else
 274.518 ++	      {
 274.519 ++		memcpy(__to_next, __buf, __conv);
 274.520 ++		__state = __tmp_state;
 274.521 ++		__to_next += __conv;
 274.522 ++		++__from_next;
 274.523 ++	      }
 274.524 ++	  }
 274.525 ++      }
 274.526 ++
 274.527 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.528 ++    __uselocale(__old);
 274.529 ++#endif
 274.530 ++
 274.531 ++    return __ret; 
 274.532 ++  }
 274.533 ++  
 274.534 ++  codecvt_base::result
 274.535 ++  codecvt<wchar_t, char, mbstate_t>::
 274.536 ++  do_in(state_type& __state, const extern_type* __from, 
 274.537 ++	const extern_type* __from_end, const extern_type*& __from_next,
 274.538 ++	intern_type* __to, intern_type* __to_end,
 274.539 ++	intern_type*& __to_next) const
 274.540 ++  {
 274.541 ++    result __ret = ok;
 274.542 ++    state_type __tmp_state(__state);
 274.543 ++
 274.544 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.545 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 274.546 ++#endif
 274.547 ++
 274.548 ++    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
 274.549 ++    // in case we store a L'\0' and then continue, in a loop.
 274.550 ++    // NB: mbsnrtowcs is a GNU extension
 274.551 ++    for (__from_next = __from, __to_next = __to;
 274.552 ++	 __from_next < __from_end && __to_next < __to_end
 274.553 ++	 && __ret == ok;)
 274.554 ++      {
 274.555 ++	const extern_type* __from_chunk_end;
 274.556 ++	__from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
 274.557 ++								  __from_end
 274.558 ++								  - __from_next));
 274.559 ++	if (!__from_chunk_end)
 274.560 ++	  __from_chunk_end = __from_end;
 274.561 ++
 274.562 ++	__from = __from_next;
 274.563 ++	size_t __conv = mbsnrtowcs(__to_next, &__from_next,
 274.564 ++				   __from_chunk_end - __from_next,
 274.565 ++				   __to_end - __to_next, &__state);
 274.566 ++	if (__conv == static_cast<size_t>(-1))
 274.567 ++	  {
 274.568 ++	    // In case of error, in order to stop at the exact place we
 274.569 ++	    // have to start again from the beginning with a series of
 274.570 ++	    // mbrtowc.
 274.571 ++	    for (;; ++__to_next, __from += __conv)
 274.572 ++	      {
 274.573 ++		__conv = mbrtowc(__to_next, __from, __from_end - __from,
 274.574 ++				 &__tmp_state);
 274.575 ++		if (__conv == static_cast<size_t>(-1)
 274.576 ++		    || __conv == static_cast<size_t>(-2))
 274.577 ++		  break;
 274.578 ++	      }
 274.579 ++	    __from_next = __from;
 274.580 ++	    __state = __tmp_state;	    
 274.581 ++	    __ret = error;
 274.582 ++	  }
 274.583 ++	else if (__from_next && __from_next < __from_chunk_end)
 274.584 ++	  {
 274.585 ++	    // It is unclear what to return in this case (see DR 382). 
 274.586 ++	    __to_next += __conv;
 274.587 ++	    __ret = partial;
 274.588 ++	  }
 274.589 ++	else
 274.590 ++	  {
 274.591 ++	    __from_next = __from_chunk_end;
 274.592 ++	    __to_next += __conv;
 274.593 ++	  }
 274.594 ++
 274.595 ++	if (__from_next < __from_end && __ret == ok)
 274.596 ++	  {
 274.597 ++	    if (__to_next < __to_end)
 274.598 ++	      {
 274.599 ++		// XXX Probably wrong for stateful encodings
 274.600 ++		__tmp_state = __state;		
 274.601 ++		++__from_next;
 274.602 ++		*__to_next++ = L'\0';
 274.603 ++	      }
 274.604 ++	    else
 274.605 ++	      __ret = partial;
 274.606 ++	  }
 274.607 ++      }
 274.608 ++
 274.609 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.610 ++    __uselocale(__old);
 274.611 ++#endif
 274.612 ++
 274.613 ++    return __ret; 
 274.614 ++  }
 274.615 ++
 274.616 ++  int 
 274.617 ++  codecvt<wchar_t, char, mbstate_t>::
 274.618 ++  do_encoding() const throw()
 274.619 ++  {
 274.620 ++    // XXX This implementation assumes that the encoding is
 274.621 ++    // stateless and is either single-byte or variable-width.
 274.622 ++    int __ret = 0;
 274.623 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.624 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 274.625 ++#endif
 274.626 ++    if (MB_CUR_MAX == 1)
 274.627 ++      __ret = 1;
 274.628 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.629 ++    __uselocale(__old);
 274.630 ++#endif
 274.631 ++    return __ret;
 274.632 ++  }  
 274.633 ++
 274.634 ++  int 
 274.635 ++  codecvt<wchar_t, char, mbstate_t>::
 274.636 ++  do_max_length() const throw()
 274.637 ++  {
 274.638 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.639 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 274.640 ++#endif
 274.641 ++    // XXX Probably wrong for stateful encodings.
 274.642 ++    int __ret = MB_CUR_MAX;
 274.643 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.644 ++    __uselocale(__old);
 274.645 ++#endif
 274.646 ++    return __ret;
 274.647 ++  }
 274.648 ++  
 274.649 ++  int 
 274.650 ++  codecvt<wchar_t, char, mbstate_t>::
 274.651 ++  do_length(state_type& __state, const extern_type* __from,
 274.652 ++	    const extern_type* __end, size_t __max) const
 274.653 ++  {
 274.654 ++    int __ret = 0;
 274.655 ++    state_type __tmp_state(__state);
 274.656 ++
 274.657 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.658 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 274.659 ++#endif
 274.660 ++
 274.661 ++    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
 274.662 ++    // in case we advance past it and then continue, in a loop.
 274.663 ++    // NB: mbsnrtowcs is a GNU extension
 274.664 ++  
 274.665 ++    // A dummy internal buffer is needed in order for mbsnrtocws to consider
 274.666 ++    // its fourth parameter (it wouldn't with NULL as first parameter).
 274.667 ++    wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) 
 274.668 ++							   * __max));
 274.669 ++    while (__from < __end && __max)
 274.670 ++      {
 274.671 ++	const extern_type* __from_chunk_end;
 274.672 ++	__from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
 274.673 ++								  __end
 274.674 ++								  - __from));
 274.675 ++	if (!__from_chunk_end)
 274.676 ++	  __from_chunk_end = __end;
 274.677 ++
 274.678 ++	const extern_type* __tmp_from = __from;
 274.679 ++	size_t __conv = mbsnrtowcs(__to, &__from,
 274.680 ++				   __from_chunk_end - __from,
 274.681 ++				   __max, &__state);
 274.682 ++	if (__conv == static_cast<size_t>(-1))
 274.683 ++	  {
 274.684 ++	    // In case of error, in order to stop at the exact place we
 274.685 ++	    // have to start again from the beginning with a series of
 274.686 ++	    // mbrtowc.
 274.687 ++	    for (__from = __tmp_from;; __from += __conv)
 274.688 ++	      {
 274.689 ++		__conv = mbrtowc(NULL, __from, __end - __from,
 274.690 ++				 &__tmp_state);
 274.691 ++		if (__conv == static_cast<size_t>(-1)
 274.692 ++		    || __conv == static_cast<size_t>(-2))
 274.693 ++		  break;
 274.694 ++	      }
 274.695 ++	    __state = __tmp_state;
 274.696 ++	    __ret += __from - __tmp_from;
 274.697 ++	    break;
 274.698 ++	  }
 274.699 ++	if (!__from)
 274.700 ++	  __from = __from_chunk_end;
 274.701 ++	
 274.702 ++	__ret += __from - __tmp_from;
 274.703 ++	__max -= __conv;
 274.704 ++
 274.705 ++	if (__from < __end && __max)
 274.706 ++	  {
 274.707 ++	    // XXX Probably wrong for stateful encodings
 274.708 ++	    __tmp_state = __state;
 274.709 ++	    ++__from;
 274.710 ++	    ++__ret;
 274.711 ++	    --__max;
 274.712 ++	  }
 274.713 ++      }
 274.714 ++
 274.715 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.716 ++    __uselocale(__old);
 274.717 ++#endif
 274.718 ++
 274.719 ++    return __ret; 
 274.720 ++  }
 274.721 ++#endif
 274.722 ++}
 274.723 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/collate_members.cc
 274.724 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/collate_members.cc	1969-12-31 18:00:00.000000000 -0600
 274.725 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/collate_members.cc	2005-04-28 01:13:15.000000000 -0500
 274.726 +@@ -0,0 +1,80 @@
 274.727 ++// std::collate implementation details, GNU version -*- C++ -*-
 274.728 ++
 274.729 ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
 274.730 ++//
 274.731 ++// This file is part of the GNU ISO C++ Library.  This library is free
 274.732 ++// software; you can redistribute it and/or modify it under the
 274.733 ++// terms of the GNU General Public License as published by the
 274.734 ++// Free Software Foundation; either version 2, or (at your option)
 274.735 ++// any later version.
 274.736 ++
 274.737 ++// This library is distributed in the hope that it will be useful,
 274.738 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 274.739 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 274.740 ++// GNU General Public License for more details.
 274.741 ++
 274.742 ++// You should have received a copy of the GNU General Public License along
 274.743 ++// with this library; see the file COPYING.  If not, write to the Free
 274.744 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 274.745 ++// USA.
 274.746 ++
 274.747 ++// As a special exception, you may use this file as part of a free software
 274.748 ++// library without restriction.  Specifically, if other files instantiate
 274.749 ++// templates or use macros or inline functions from this file, or you compile
 274.750 ++// this file and link it with other files to produce an executable, this
 274.751 ++// file does not by itself cause the resulting executable to be covered by
 274.752 ++// the GNU General Public License.  This exception does not however
 274.753 ++// invalidate any other reasons why the executable file might be covered by
 274.754 ++// the GNU General Public License.
 274.755 ++
 274.756 ++//
 274.757 ++// ISO C++ 14882: 22.2.4.1.2  collate virtual functions
 274.758 ++//
 274.759 ++
 274.760 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 274.761 ++
 274.762 ++#include <locale>
 274.763 ++#include <bits/c++locale_internal.h>
 274.764 ++
 274.765 ++#ifndef __UCLIBC_HAS_XLOCALE__
 274.766 ++#define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
 274.767 ++#define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
 274.768 ++#define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
 274.769 ++#define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
 274.770 ++#endif
 274.771 ++
 274.772 ++namespace std
 274.773 ++{
 274.774 ++  // These are basically extensions to char_traits, and perhaps should
 274.775 ++  // be put there instead of here.
 274.776 ++  template<>
 274.777 ++    int 
 274.778 ++    collate<char>::_M_compare(const char* __one, const char* __two) const
 274.779 ++    { 
 274.780 ++      int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
 274.781 ++      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
 274.782 ++    }
 274.783 ++  
 274.784 ++  template<>
 274.785 ++    size_t
 274.786 ++    collate<char>::_M_transform(char* __to, const char* __from, 
 274.787 ++				size_t __n) const 
 274.788 ++    { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
 274.789 ++
 274.790 ++#ifdef _GLIBCXX_USE_WCHAR_T
 274.791 ++  template<>
 274.792 ++    int 
 274.793 ++    collate<wchar_t>::_M_compare(const wchar_t* __one, 
 274.794 ++				 const wchar_t* __two) const
 274.795 ++    {
 274.796 ++      int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
 274.797 ++      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
 274.798 ++    }
 274.799 ++  
 274.800 ++  template<>
 274.801 ++    size_t
 274.802 ++    collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
 274.803 ++				   size_t __n) const
 274.804 ++    { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
 274.805 ++#endif
 274.806 ++}
 274.807 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
 274.808 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/ctype_members.cc	1969-12-31 18:00:00.000000000 -0600
 274.809 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc	2005-04-28 01:13:15.000000000 -0500
 274.810 +@@ -0,0 +1,300 @@
 274.811 ++// std::ctype implementation details, GNU version -*- C++ -*-
 274.812 ++
 274.813 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 274.814 ++//
 274.815 ++// This file is part of the GNU ISO C++ Library.  This library is free
 274.816 ++// software; you can redistribute it and/or modify it under the
 274.817 ++// terms of the GNU General Public License as published by the
 274.818 ++// Free Software Foundation; either version 2, or (at your option)
 274.819 ++// any later version.
 274.820 ++
 274.821 ++// This library is distributed in the hope that it will be useful,
 274.822 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 274.823 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 274.824 ++// GNU General Public License for more details.
 274.825 ++
 274.826 ++// You should have received a copy of the GNU General Public License along
 274.827 ++// with this library; see the file COPYING.  If not, write to the Free
 274.828 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 274.829 ++// USA.
 274.830 ++
 274.831 ++// As a special exception, you may use this file as part of a free software
 274.832 ++// library without restriction.  Specifically, if other files instantiate
 274.833 ++// templates or use macros or inline functions from this file, or you compile
 274.834 ++// this file and link it with other files to produce an executable, this
 274.835 ++// file does not by itself cause the resulting executable to be covered by
 274.836 ++// the GNU General Public License.  This exception does not however
 274.837 ++// invalidate any other reasons why the executable file might be covered by
 274.838 ++// the GNU General Public License.
 274.839 ++
 274.840 ++//
 274.841 ++// ISO C++ 14882: 22.2.1.1.2  ctype virtual functions.
 274.842 ++//
 274.843 ++
 274.844 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 274.845 ++
 274.846 ++#define _LIBC
 274.847 ++#include <locale>
 274.848 ++#undef _LIBC
 274.849 ++#include <bits/c++locale_internal.h>
 274.850 ++
 274.851 ++#ifndef __UCLIBC_HAS_XLOCALE__
 274.852 ++#define __wctype_l(S, L)           wctype((S))
 274.853 ++#define __towupper_l(C, L)         towupper((C))
 274.854 ++#define __towlower_l(C, L)         towlower((C))
 274.855 ++#define __iswctype_l(C, M, L)      iswctype((C), (M))
 274.856 ++#endif
 274.857 ++
 274.858 ++namespace std
 274.859 ++{
 274.860 ++  // NB: The other ctype<char> specializations are in src/locale.cc and
 274.861 ++  // various /config/os/* files.
 274.862 ++  template<>
 274.863 ++    ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
 274.864 ++    : ctype<char>(0, false, __refs) 
 274.865 ++    { 		
 274.866 ++      if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
 274.867 ++	{
 274.868 ++	  this->_S_destroy_c_locale(this->_M_c_locale_ctype);
 274.869 ++	  this->_S_create_c_locale(this->_M_c_locale_ctype, __s); 
 274.870 ++#ifdef __UCLIBC_HAS_XLOCALE__
 274.871 ++	  this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
 274.872 ++	  this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
 274.873 ++	  this->_M_table = this->_M_c_locale_ctype->__ctype_b;
 274.874 ++#endif
 274.875 ++	}
 274.876 ++    }
 274.877 ++
 274.878 ++#ifdef _GLIBCXX_USE_WCHAR_T  
 274.879 ++  ctype<wchar_t>::__wmask_type
 274.880 ++  ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
 274.881 ++  {
 274.882 ++    __wmask_type __ret;
 274.883 ++    switch (__m)
 274.884 ++      {
 274.885 ++      case space:
 274.886 ++	__ret = __wctype_l("space", _M_c_locale_ctype);
 274.887 ++	break;
 274.888 ++      case print:
 274.889 ++	__ret = __wctype_l("print", _M_c_locale_ctype);
 274.890 ++	break;
 274.891 ++      case cntrl:
 274.892 ++	__ret = __wctype_l("cntrl", _M_c_locale_ctype);
 274.893 ++	break;
 274.894 ++      case upper:
 274.895 ++	__ret = __wctype_l("upper", _M_c_locale_ctype);
 274.896 ++	break;
 274.897 ++      case lower:
 274.898 ++	__ret = __wctype_l("lower", _M_c_locale_ctype);
 274.899 ++	break;
 274.900 ++      case alpha:
 274.901 ++	__ret = __wctype_l("alpha", _M_c_locale_ctype);
 274.902 ++	break;
 274.903 ++      case digit:
 274.904 ++	__ret = __wctype_l("digit", _M_c_locale_ctype);
 274.905 ++	break;
 274.906 ++      case punct:
 274.907 ++	__ret = __wctype_l("punct", _M_c_locale_ctype);
 274.908 ++	break;
 274.909 ++      case xdigit:
 274.910 ++	__ret = __wctype_l("xdigit", _M_c_locale_ctype);
 274.911 ++	break;
 274.912 ++      case alnum:
 274.913 ++	__ret = __wctype_l("alnum", _M_c_locale_ctype);
 274.914 ++	break;
 274.915 ++      case graph:
 274.916 ++	__ret = __wctype_l("graph", _M_c_locale_ctype);
 274.917 ++	break;
 274.918 ++      default:
 274.919 ++	__ret = __wmask_type();
 274.920 ++      }
 274.921 ++    return __ret;
 274.922 ++  }
 274.923 ++  
 274.924 ++  wchar_t
 274.925 ++  ctype<wchar_t>::do_toupper(wchar_t __c) const
 274.926 ++  { return __towupper_l(__c, _M_c_locale_ctype); }
 274.927 ++
 274.928 ++  const wchar_t*
 274.929 ++  ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
 274.930 ++  {
 274.931 ++    while (__lo < __hi)
 274.932 ++      {
 274.933 ++        *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
 274.934 ++        ++__lo;
 274.935 ++      }
 274.936 ++    return __hi;
 274.937 ++  }
 274.938 ++  
 274.939 ++  wchar_t
 274.940 ++  ctype<wchar_t>::do_tolower(wchar_t __c) const
 274.941 ++  { return __towlower_l(__c, _M_c_locale_ctype); }
 274.942 ++  
 274.943 ++  const wchar_t*
 274.944 ++  ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
 274.945 ++  {
 274.946 ++    while (__lo < __hi)
 274.947 ++      {
 274.948 ++        *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
 274.949 ++        ++__lo;
 274.950 ++      }
 274.951 ++    return __hi;
 274.952 ++  }
 274.953 ++
 274.954 ++  bool
 274.955 ++  ctype<wchar_t>::
 274.956 ++  do_is(mask __m, wchar_t __c) const
 274.957 ++  { 
 274.958 ++    // Highest bitmask in ctype_base == 10, but extra in "C"
 274.959 ++    // library for blank.
 274.960 ++    bool __ret = false;
 274.961 ++    const size_t __bitmasksize = 11; 
 274.962 ++    for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
 274.963 ++      if (__m & _M_bit[__bitcur]
 274.964 ++	  && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
 274.965 ++	{
 274.966 ++	  __ret = true;
 274.967 ++	  break;
 274.968 ++	}
 274.969 ++    return __ret;    
 274.970 ++  }
 274.971 ++  
 274.972 ++  const wchar_t* 
 274.973 ++  ctype<wchar_t>::
 274.974 ++  do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
 274.975 ++  {
 274.976 ++    for (; __lo < __hi; ++__vec, ++__lo)
 274.977 ++      {
 274.978 ++	// Highest bitmask in ctype_base == 10, but extra in "C"
 274.979 ++	// library for blank.
 274.980 ++	const size_t __bitmasksize = 11; 
 274.981 ++	mask __m = 0;
 274.982 ++	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
 274.983 ++	  if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
 274.984 ++	    __m |= _M_bit[__bitcur];
 274.985 ++	*__vec = __m;
 274.986 ++      }
 274.987 ++    return __hi;
 274.988 ++  }
 274.989 ++  
 274.990 ++  const wchar_t* 
 274.991 ++  ctype<wchar_t>::
 274.992 ++  do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
 274.993 ++  {
 274.994 ++    while (__lo < __hi && !this->do_is(__m, *__lo))
 274.995 ++      ++__lo;
 274.996 ++    return __lo;
 274.997 ++  }
 274.998 ++
 274.999 ++  const wchar_t*
274.1000 ++  ctype<wchar_t>::
274.1001 ++  do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
274.1002 ++  {
274.1003 ++    while (__lo < __hi && this->do_is(__m, *__lo) != 0)
274.1004 ++      ++__lo;
274.1005 ++    return __lo;
274.1006 ++  }
274.1007 ++
274.1008 ++  wchar_t
274.1009 ++  ctype<wchar_t>::
274.1010 ++  do_widen(char __c) const
274.1011 ++  { return _M_widen[static_cast<unsigned char>(__c)]; }
274.1012 ++
274.1013 ++  const char* 
274.1014 ++  ctype<wchar_t>::
274.1015 ++  do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
274.1016 ++  {
274.1017 ++    while (__lo < __hi)
274.1018 ++      {
274.1019 ++	*__dest = _M_widen[static_cast<unsigned char>(*__lo)];
274.1020 ++	++__lo;
274.1021 ++	++__dest;
274.1022 ++      }
274.1023 ++    return __hi;
274.1024 ++  }
274.1025 ++
274.1026 ++  char
274.1027 ++  ctype<wchar_t>::
274.1028 ++  do_narrow(wchar_t __wc, char __dfault) const
274.1029 ++  {
274.1030 ++    if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
274.1031 ++      return _M_narrow[__wc];
274.1032 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.1033 ++    __c_locale __old = __uselocale(_M_c_locale_ctype);
274.1034 ++#endif
274.1035 ++    const int __c = wctob(__wc);
274.1036 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.1037 ++    __uselocale(__old);
274.1038 ++#endif
274.1039 ++    return (__c == EOF ? __dfault : static_cast<char>(__c)); 
274.1040 ++  }
274.1041 ++
274.1042 ++  const wchar_t*
274.1043 ++  ctype<wchar_t>::
274.1044 ++  do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, 
274.1045 ++	    char* __dest) const
274.1046 ++  {
274.1047 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.1048 ++    __c_locale __old = __uselocale(_M_c_locale_ctype);
274.1049 ++#endif
274.1050 ++    if (_M_narrow_ok)
274.1051 ++      while (__lo < __hi)
274.1052 ++	{
274.1053 ++	  if (*__lo >= 0 && *__lo < 128)
274.1054 ++	    *__dest = _M_narrow[*__lo];
274.1055 ++	  else
274.1056 ++	    {
274.1057 ++	      const int __c = wctob(*__lo);
274.1058 ++	      *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
274.1059 ++	    }
274.1060 ++	  ++__lo;
274.1061 ++	  ++__dest;
274.1062 ++	}
274.1063 ++    else
274.1064 ++      while (__lo < __hi)
274.1065 ++	{
274.1066 ++	  const int __c = wctob(*__lo);
274.1067 ++	  *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
274.1068 ++	  ++__lo;
274.1069 ++	  ++__dest;
274.1070 ++	}
274.1071 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.1072 ++    __uselocale(__old);
274.1073 ++#endif
274.1074 ++    return __hi;
274.1075 ++  }
274.1076 ++
274.1077 ++  void
274.1078 ++  ctype<wchar_t>::_M_initialize_ctype()
274.1079 ++  {
274.1080 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.1081 ++    __c_locale __old = __uselocale(_M_c_locale_ctype);
274.1082 ++#endif
274.1083 ++    wint_t __i;
274.1084 ++    for (__i = 0; __i < 128; ++__i)
274.1085 ++      {
274.1086 ++	const int __c = wctob(__i);
274.1087 ++	if (__c == EOF)
274.1088 ++	  break;
274.1089 ++	else
274.1090 ++	  _M_narrow[__i] = static_cast<char>(__c);
274.1091 ++      }
274.1092 ++    if (__i == 128)
274.1093 ++      _M_narrow_ok = true;
274.1094 ++    else
274.1095 ++      _M_narrow_ok = false;
274.1096 ++    for (size_t __j = 0;
274.1097 ++	 __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
274.1098 ++      _M_widen[__j] = btowc(__j);
274.1099 ++
274.1100 ++    for (size_t __k = 0; __k <= 11; ++__k)
274.1101 ++      { 
274.1102 ++	_M_bit[__k] = static_cast<mask>(_ISbit(__k));
274.1103 ++	_M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
274.1104 ++      }
274.1105 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.1106 ++    __uselocale(__old);
274.1107 ++#endif
274.1108 ++  }
274.1109 ++#endif //  _GLIBCXX_USE_WCHAR_T
274.1110 ++}
274.1111 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.cc
274.1112 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.cc	1969-12-31 18:00:00.000000000 -0600
274.1113 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.cc	2005-04-28 01:13:15.000000000 -0500
274.1114 +@@ -0,0 +1,100 @@
274.1115 ++// std::messages implementation details, GNU version -*- C++ -*-
274.1116 ++
274.1117 ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
274.1118 ++//
274.1119 ++// This file is part of the GNU ISO C++ Library.  This library is free
274.1120 ++// software; you can redistribute it and/or modify it under the
274.1121 ++// terms of the GNU General Public License as published by the
274.1122 ++// Free Software Foundation; either version 2, or (at your option)
274.1123 ++// any later version.
274.1124 ++
274.1125 ++// This library is distributed in the hope that it will be useful,
274.1126 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
274.1127 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
274.1128 ++// GNU General Public License for more details.
274.1129 ++
274.1130 ++// You should have received a copy of the GNU General Public License along
274.1131 ++// with this library; see the file COPYING.  If not, write to the Free
274.1132 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
274.1133 ++// USA.
274.1134 ++
274.1135 ++// As a special exception, you may use this file as part of a free software
274.1136 ++// library without restriction.  Specifically, if other files instantiate
274.1137 ++// templates or use macros or inline functions from this file, or you compile
274.1138 ++// this file and link it with other files to produce an executable, this
274.1139 ++// file does not by itself cause the resulting executable to be covered by
274.1140 ++// the GNU General Public License.  This exception does not however
274.1141 ++// invalidate any other reasons why the executable file might be covered by
274.1142 ++// the GNU General Public License.
274.1143 ++
274.1144 ++//
274.1145 ++// ISO C++ 14882: 22.2.7.1.2  messages virtual functions
274.1146 ++//
274.1147 ++
274.1148 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
274.1149 ++
274.1150 ++#include <locale>
274.1151 ++#include <bits/c++locale_internal.h>
274.1152 ++
274.1153 ++#ifdef __UCLIBC_MJN3_ONLY__
274.1154 ++#warning fix gettext stuff
274.1155 ++#endif
274.1156 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
274.1157 ++extern "C" char *__dcgettext(const char *domainname,
274.1158 ++			     const char *msgid, int category);
274.1159 ++#undef gettext
274.1160 ++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
274.1161 ++#else
274.1162 ++#undef gettext
274.1163 ++#define gettext(msgid) (msgid)
274.1164 ++#endif
274.1165 ++
274.1166 ++namespace std
274.1167 ++{
274.1168 ++  // Specializations.
274.1169 ++  template<>
274.1170 ++    string
274.1171 ++    messages<char>::do_get(catalog, int, int, const string& __dfault) const
274.1172 ++    {
274.1173 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.1174 ++      __c_locale __old = __uselocale(_M_c_locale_messages);
274.1175 ++      const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
274.1176 ++      __uselocale(__old);
274.1177 ++      return string(__msg);
274.1178 ++#elif defined __UCLIBC_HAS_LOCALE__
274.1179 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
274.1180 ++      setlocale(LC_ALL, _M_name_messages);
274.1181 ++      const char* __msg = gettext(__dfault.c_str());
274.1182 ++      setlocale(LC_ALL, __old);
274.1183 ++      free(__old);
274.1184 ++      return string(__msg);
274.1185 ++#else
274.1186 ++      const char* __msg = gettext(__dfault.c_str());
274.1187 ++      return string(__msg);
274.1188 ++#endif
274.1189 ++    }
274.1190 ++
274.1191 ++#ifdef _GLIBCXX_USE_WCHAR_T
274.1192 ++  template<>
274.1193 ++    wstring
274.1194 ++    messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
274.1195 ++    {
274.1196 ++# ifdef __UCLIBC_HAS_XLOCALE__
274.1197 ++      __c_locale __old = __uselocale(_M_c_locale_messages);
274.1198 ++      char* __msg = gettext(_M_convert_to_char(__dfault));
274.1199 ++      __uselocale(__old);
274.1200 ++      return _M_convert_from_char(__msg);
274.1201 ++# elif defined __UCLIBC_HAS_LOCALE__
274.1202 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
274.1203 ++      setlocale(LC_ALL, _M_name_messages);
274.1204 ++      char* __msg = gettext(_M_convert_to_char(__dfault));
274.1205 ++      setlocale(LC_ALL, __old);
274.1206 ++      free(__old);
274.1207 ++      return _M_convert_from_char(__msg);
274.1208 ++# else
274.1209 ++      char* __msg = gettext(_M_convert_to_char(__dfault));
274.1210 ++      return _M_convert_from_char(__msg);
274.1211 ++# endif
274.1212 ++    }
274.1213 ++#endif
274.1214 ++}
274.1215 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.h
274.1216 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.h	1969-12-31 18:00:00.000000000 -0600
274.1217 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.h	2005-04-28 01:13:15.000000000 -0500
274.1218 +@@ -0,0 +1,118 @@
274.1219 ++// std::messages implementation details, GNU version -*- C++ -*-
274.1220 ++
274.1221 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
274.1222 ++//
274.1223 ++// This file is part of the GNU ISO C++ Library.  This library is free
274.1224 ++// software; you can redistribute it and/or modify it under the
274.1225 ++// terms of the GNU General Public License as published by the
274.1226 ++// Free Software Foundation; either version 2, or (at your option)
274.1227 ++// any later version.
274.1228 ++
274.1229 ++// This library is distributed in the hope that it will be useful,
274.1230 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
274.1231 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
274.1232 ++// GNU General Public License for more details.
274.1233 ++
274.1234 ++// You should have received a copy of the GNU General Public License along
274.1235 ++// with this library; see the file COPYING.  If not, write to the Free
274.1236 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
274.1237 ++// USA.
274.1238 ++
274.1239 ++// As a special exception, you may use this file as part of a free software
274.1240 ++// library without restriction.  Specifically, if other files instantiate
274.1241 ++// templates or use macros or inline functions from this file, or you compile
274.1242 ++// this file and link it with other files to produce an executable, this
274.1243 ++// file does not by itself cause the resulting executable to be covered by
274.1244 ++// the GNU General Public License.  This exception does not however
274.1245 ++// invalidate any other reasons why the executable file might be covered by
274.1246 ++// the GNU General Public License.
274.1247 ++
274.1248 ++//
274.1249 ++// ISO C++ 14882: 22.2.7.1.2  messages functions
274.1250 ++//
274.1251 ++
274.1252 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
274.1253 ++
274.1254 ++#ifdef __UCLIBC_MJN3_ONLY__
274.1255 ++#warning fix prototypes for *textdomain funcs
274.1256 ++#endif
274.1257 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
274.1258 ++extern "C" char *__textdomain(const char *domainname);
274.1259 ++extern "C" char *__bindtextdomain(const char *domainname,
274.1260 ++				  const char *dirname);
274.1261 ++#else
274.1262 ++#undef __textdomain
274.1263 ++#undef __bindtextdomain
274.1264 ++#define __textdomain(D)           ((void)0)
274.1265 ++#define __bindtextdomain(D,P)     ((void)0)
274.1266 ++#endif
274.1267 ++
274.1268 ++  // Non-virtual member functions.
274.1269 ++  template<typename _CharT>
274.1270 ++     messages<_CharT>::messages(size_t __refs)
274.1271 ++     : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), 
274.1272 ++     _M_name_messages(_S_get_c_name())
274.1273 ++     { }
274.1274 ++
274.1275 ++  template<typename _CharT>
274.1276 ++     messages<_CharT>::messages(__c_locale __cloc, const char* __s, 
274.1277 ++				size_t __refs) 
274.1278 ++     : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
274.1279 ++     _M_name_messages(__s)
274.1280 ++     {
274.1281 ++       char* __tmp = new char[std::strlen(__s) + 1];
274.1282 ++       std::strcpy(__tmp, __s);
274.1283 ++       _M_name_messages = __tmp;
274.1284 ++     }
274.1285 ++
274.1286 ++  template<typename _CharT>
274.1287 ++    typename messages<_CharT>::catalog 
274.1288 ++    messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, 
274.1289 ++			   const char* __dir) const
274.1290 ++    { 
274.1291 ++      __bindtextdomain(__s.c_str(), __dir);
274.1292 ++      return this->do_open(__s, __loc); 
274.1293 ++    }
274.1294 ++
274.1295 ++  // Virtual member functions.
274.1296 ++  template<typename _CharT>
274.1297 ++    messages<_CharT>::~messages()
274.1298 ++    { 
274.1299 ++      if (_M_name_messages != _S_get_c_name())
274.1300 ++	delete [] _M_name_messages;
274.1301 ++      _S_destroy_c_locale(_M_c_locale_messages); 
274.1302 ++    }
274.1303 ++
274.1304 ++  template<typename _CharT>
274.1305 ++    typename messages<_CharT>::catalog 
274.1306 ++    messages<_CharT>::do_open(const basic_string<char>& __s, 
274.1307 ++			      const locale&) const
274.1308 ++    { 
274.1309 ++      // No error checking is done, assume the catalog exists and can
274.1310 ++      // be used.
274.1311 ++      __textdomain(__s.c_str());
274.1312 ++      return 0;
274.1313 ++    }
274.1314 ++
274.1315 ++  template<typename _CharT>
274.1316 ++    void    
274.1317 ++    messages<_CharT>::do_close(catalog) const 
274.1318 ++    { }
274.1319 ++
274.1320 ++   // messages_byname
274.1321 ++   template<typename _CharT>
274.1322 ++     messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
274.1323 ++     : messages<_CharT>(__refs) 
274.1324 ++     { 
274.1325 ++       if (this->_M_name_messages != locale::facet::_S_get_c_name())
274.1326 ++	 delete [] this->_M_name_messages;
274.1327 ++       char* __tmp = new char[std::strlen(__s) + 1];
274.1328 ++       std::strcpy(__tmp, __s);
274.1329 ++       this->_M_name_messages = __tmp;
274.1330 ++
274.1331 ++       if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
274.1332 ++	 {
274.1333 ++	   this->_S_destroy_c_locale(this->_M_c_locale_messages);
274.1334 ++	   this->_S_create_c_locale(this->_M_c_locale_messages, __s); 
274.1335 ++	 }
274.1336 ++     }
274.1337 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
274.1338 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/monetary_members.cc	1969-12-31 18:00:00.000000000 -0600
274.1339 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc	2005-04-28 01:23:02.000000000 -0500
274.1340 +@@ -0,0 +1,692 @@
274.1341 ++// std::moneypunct implementation details, GNU version -*- C++ -*-
274.1342 ++
274.1343 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
274.1344 ++//
274.1345 ++// This file is part of the GNU ISO C++ Library.  This library is free
274.1346 ++// software; you can redistribute it and/or modify it under the
274.1347 ++// terms of the GNU General Public License as published by the
274.1348 ++// Free Software Foundation; either version 2, or (at your option)
274.1349 ++// any later version.
274.1350 ++
274.1351 ++// This library is distributed in the hope that it will be useful,
274.1352 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
274.1353 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
274.1354 ++// GNU General Public License for more details.
274.1355 ++
274.1356 ++// You should have received a copy of the GNU General Public License along
274.1357 ++// with this library; see the file COPYING.  If not, write to the Free
274.1358 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
274.1359 ++// USA.
274.1360 ++
274.1361 ++// As a special exception, you may use this file as part of a free software
274.1362 ++// library without restriction.  Specifically, if other files instantiate
274.1363 ++// templates or use macros or inline functions from this file, or you compile
274.1364 ++// this file and link it with other files to produce an executable, this
274.1365 ++// file does not by itself cause the resulting executable to be covered by
274.1366 ++// the GNU General Public License.  This exception does not however
274.1367 ++// invalidate any other reasons why the executable file might be covered by
274.1368 ++// the GNU General Public License.
274.1369 ++
274.1370 ++//
274.1371 ++// ISO C++ 14882: 22.2.6.3.2  moneypunct virtual functions
274.1372 ++//
274.1373 ++
274.1374 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
274.1375 ++
274.1376 ++#define _LIBC
274.1377 ++#include <locale>
274.1378 ++#undef _LIBC
274.1379 ++#include <bits/c++locale_internal.h>
274.1380 ++
274.1381 ++#ifdef __UCLIBC_MJN3_ONLY__
274.1382 ++#warning optimize this for uclibc
274.1383 ++#warning tailor for stub locale support
274.1384 ++#endif
274.1385 ++
274.1386 ++#ifndef __UCLIBC_HAS_XLOCALE__
274.1387 ++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
274.1388 ++#endif
274.1389 ++
274.1390 ++namespace std
274.1391 ++{
274.1392 ++  // Construct and return valid pattern consisting of some combination of:
274.1393 ++  // space none symbol sign value
274.1394 ++  money_base::pattern
274.1395 ++  money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
274.1396 ++  { 
274.1397 ++    pattern __ret;
274.1398 ++
274.1399 ++    // This insanely complicated routine attempts to construct a valid
274.1400 ++    // pattern for use with monyepunct. A couple of invariants:
274.1401 ++
274.1402 ++    // if (__precedes) symbol -> value
274.1403 ++    // else value -> symbol
274.1404 ++    
274.1405 ++    // if (__space) space
274.1406 ++    // else none
274.1407 ++
274.1408 ++    // none == never first
274.1409 ++    // space never first or last
274.1410 ++
274.1411 ++    // Any elegant implementations of this are welcome.
274.1412 ++    switch (__posn)
274.1413 ++      {
274.1414 ++      case 0:
274.1415 ++      case 1:
274.1416 ++	// 1 The sign precedes the value and symbol.
274.1417 ++	__ret.field[0] = sign;
274.1418 ++	if (__space)
274.1419 ++	  {
274.1420 ++	    // Pattern starts with sign.
274.1421 ++	    if (__precedes)
274.1422 ++	      {
274.1423 ++		__ret.field[1] = symbol;
274.1424 ++		__ret.field[3] = value;
274.1425 ++	      }
274.1426 ++	    else
274.1427 ++	      {
274.1428 ++		__ret.field[1] = value;
274.1429 ++		__ret.field[3] = symbol;
274.1430 ++	      }
274.1431 ++	    __ret.field[2] = space;
274.1432 ++	  }
274.1433 ++	else
274.1434 ++	  {
274.1435 ++	    // Pattern starts with sign and ends with none.
274.1436 ++	    if (__precedes)
274.1437 ++	      {
274.1438 ++		__ret.field[1] = symbol;
274.1439 ++		__ret.field[2] = value;
274.1440 ++	      }
274.1441 ++	    else
274.1442 ++	      {
274.1443 ++		__ret.field[1] = value;
274.1444 ++		__ret.field[2] = symbol;
274.1445 ++	      }
274.1446 ++	    __ret.field[3] = none;
274.1447 ++	  }
274.1448 ++	break;
274.1449 ++      case 2:
274.1450 ++	// 2 The sign follows the value and symbol.
274.1451 ++	if (__space)
274.1452 ++	  {
274.1453 ++	    // Pattern either ends with sign.
274.1454 ++	    if (__precedes)
274.1455 ++	      {
274.1456 ++		__ret.field[0] = symbol;
274.1457 ++		__ret.field[2] = value;
274.1458 ++	      }
274.1459 ++	    else
274.1460 ++	      {
274.1461 ++		__ret.field[0] = value;
274.1462 ++		__ret.field[2] = symbol;
274.1463 ++	      }
274.1464 ++	    __ret.field[1] = space;
274.1465 ++	    __ret.field[3] = sign;
274.1466 ++	  }
274.1467 ++	else
274.1468 ++	  {
274.1469 ++	    // Pattern ends with sign then none.
274.1470 ++	    if (__precedes)
274.1471 ++	      {
274.1472 ++		__ret.field[0] = symbol;
274.1473 ++		__ret.field[1] = value;
274.1474 ++	      }
274.1475 ++	    else
274.1476 ++	      {
274.1477 ++		__ret.field[0] = value;
274.1478 ++		__ret.field[1] = symbol;
274.1479 ++	      }
274.1480 ++	    __ret.field[2] = sign;
274.1481 ++	    __ret.field[3] = none;
274.1482 ++	  }
274.1483 ++	break;
274.1484 ++      case 3:
274.1485 ++	// 3 The sign immediately precedes the symbol.
274.1486 ++	if (__precedes)
274.1487 ++	  {
274.1488 ++	    __ret.field[0] = sign;
274.1489 ++	    __ret.field[1] = symbol;	    
274.1490 ++	    if (__space)
274.1491 ++	      {
274.1492 ++		__ret.field[2] = space;
274.1493 ++		__ret.field[3] = value;
274.1494 ++	      }
274.1495 ++	    else
274.1496 ++	      {
274.1497 ++		__ret.field[2] = value;		
274.1498 ++		__ret.field[3] = none;
274.1499 ++	      }
274.1500 ++	  }
274.1501 ++	else
274.1502 ++	  {
274.1503 ++	    __ret.field[0] = value;
274.1504 ++	    if (__space)
274.1505 ++	      {
274.1506 ++		__ret.field[1] = space;
274.1507 ++		__ret.field[2] = sign;
274.1508 ++		__ret.field[3] = symbol;
274.1509 ++	      }
274.1510 ++	    else
274.1511 ++	      {
274.1512 ++		__ret.field[1] = sign;
274.1513 ++		__ret.field[2] = symbol;
274.1514 ++		__ret.field[3] = none;
274.1515 ++	      }
274.1516 ++	  }
274.1517 ++	break;
274.1518 ++      case 4:
274.1519 ++	// 4 The sign immediately follows the symbol.
274.1520 ++	if (__precedes)
274.1521 ++	  {
274.1522 ++	    __ret.field[0] = symbol;
274.1523 ++	    __ret.field[1] = sign;
274.1524 ++	    if (__space)
274.1525 ++	      {
274.1526 ++		__ret.field[2] = space;
274.1527 ++		__ret.field[3] = value;
274.1528 ++	      }
274.1529 ++	    else
274.1530 ++	      {
274.1531 ++		__ret.field[2] = value;
274.1532 ++		__ret.field[3] = none;
274.1533 ++	      }
274.1534 ++	  }
274.1535 ++	else
274.1536 ++	  {
274.1537 ++	    __ret.field[0] = value;
274.1538 ++	    if (__space)
274.1539 ++	      {
274.1540 ++		__ret.field[1] = space;
274.1541 ++		__ret.field[2] = symbol;
274.1542 ++		__ret.field[3] = sign;
274.1543 ++	      }
274.1544 ++	    else
274.1545 ++	      {
274.1546 ++		__ret.field[1] = symbol;
274.1547 ++		__ret.field[2] = sign;
274.1548 ++		__ret.field[3] = none;
274.1549 ++	      }
274.1550 ++	  }
274.1551 ++	break;
274.1552 ++      default:
274.1553 ++	__ret = pattern();
274.1554 ++      }
274.1555 ++    return __ret;
274.1556 ++  }
274.1557 ++
274.1558 ++  template<> 
274.1559 ++    void
274.1560 ++    moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc, 
274.1561 ++						     const char*)
274.1562 ++    {
274.1563 ++      if (!_M_data)
274.1564 ++	_M_data = new __moneypunct_cache<char, true>;
274.1565 ++
274.1566 ++      if (!__cloc)
274.1567 ++	{
274.1568 ++	  // "C" locale
274.1569 ++	  _M_data->_M_decimal_point = '.';
274.1570 ++	  _M_data->_M_thousands_sep = ',';
274.1571 ++	  _M_data->_M_grouping = "";
274.1572 ++	  _M_data->_M_grouping_size = 0;
274.1573 ++	  _M_data->_M_curr_symbol = "";
274.1574 ++	  _M_data->_M_curr_symbol_size = 0;
274.1575 ++	  _M_data->_M_positive_sign = "";
274.1576 ++	  _M_data->_M_positive_sign_size = 0;
274.1577 ++	  _M_data->_M_negative_sign = "";
274.1578 ++	  _M_data->_M_negative_sign_size = 0;
274.1579 ++	  _M_data->_M_frac_digits = 0;
274.1580 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
274.1581 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
274.1582 ++
274.1583 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
274.1584 ++	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
274.1585 ++	}
274.1586 ++      else
274.1587 ++	{
274.1588 ++	  // Named locale.
274.1589 ++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
274.1590 ++							__cloc));
274.1591 ++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
274.1592 ++							__cloc));
274.1593 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
274.1594 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
274.1595 ++	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
274.1596 ++	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
274.1597 ++
274.1598 ++	  char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
274.1599 ++	  if (!__nposn)
274.1600 ++	    _M_data->_M_negative_sign = "()";
274.1601 ++	  else
274.1602 ++	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, 
274.1603 ++							__cloc);
274.1604 ++	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
274.1605 ++
274.1606 ++	  // _Intl == true
274.1607 ++	  _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
274.1608 ++	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
274.1609 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
274.1610 ++						      __cloc));
274.1611 ++	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
274.1612 ++	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
274.1613 ++	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
274.1614 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
274.1615 ++							__pposn);
274.1616 ++	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
274.1617 ++	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
274.1618 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
274.1619 ++							__nposn);
274.1620 ++	}
274.1621 ++    }
274.1622 ++
274.1623 ++  template<> 
274.1624 ++    void
274.1625 ++    moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, 
274.1626 ++						      const char*)
274.1627 ++    {
274.1628 ++      if (!_M_data)
274.1629 ++	_M_data = new __moneypunct_cache<char, false>;
274.1630 ++
274.1631 ++      if (!__cloc)
274.1632 ++	{
274.1633 ++	  // "C" locale
274.1634 ++	  _M_data->_M_decimal_point = '.';
274.1635 ++	  _M_data->_M_thousands_sep = ',';
274.1636 ++	  _M_data->_M_grouping = "";
274.1637 ++	  _M_data->_M_grouping_size = 0;
274.1638 ++	  _M_data->_M_curr_symbol = "";
274.1639 ++	  _M_data->_M_curr_symbol_size = 0;
274.1640 ++	  _M_data->_M_positive_sign = "";
274.1641 ++	  _M_data->_M_positive_sign_size = 0;
274.1642 ++	  _M_data->_M_negative_sign = "";
274.1643 ++	  _M_data->_M_negative_sign_size = 0;
274.1644 ++	  _M_data->_M_frac_digits = 0;
274.1645 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
274.1646 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
274.1647 ++
274.1648 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
274.1649 ++	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
274.1650 ++	}
274.1651 ++      else
274.1652 ++	{
274.1653 ++	  // Named locale.
274.1654 ++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
274.1655 ++							__cloc));
274.1656 ++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
274.1657 ++							__cloc));
274.1658 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
274.1659 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
274.1660 ++	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
274.1661 ++	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
274.1662 ++
274.1663 ++	  char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
274.1664 ++	  if (!__nposn)
274.1665 ++	    _M_data->_M_negative_sign = "()";
274.1666 ++	  else
274.1667 ++	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
274.1668 ++							__cloc);
274.1669 ++	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
274.1670 ++
274.1671 ++	  // _Intl == false
274.1672 ++	  _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
274.1673 ++	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
274.1674 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
274.1675 ++	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
274.1676 ++	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
274.1677 ++	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
274.1678 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
274.1679 ++							__pposn);
274.1680 ++	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
274.1681 ++	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
274.1682 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
274.1683 ++							__nposn);
274.1684 ++	}
274.1685 ++    }
274.1686 ++
274.1687 ++  template<> 
274.1688 ++    moneypunct<char, true>::~moneypunct()
274.1689 ++    { delete _M_data; }
274.1690 ++
274.1691 ++  template<> 
274.1692 ++    moneypunct<char, false>::~moneypunct()
274.1693 ++    { delete _M_data; }
274.1694 ++
274.1695 ++#ifdef _GLIBCXX_USE_WCHAR_T
274.1696 ++  template<> 
274.1697 ++    void
274.1698 ++    moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc, 
274.1699 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.1700 ++							const char*)
274.1701 ++#else
274.1702 ++							const char* __name)
274.1703 ++#endif
274.1704 ++    {
274.1705 ++      if (!_M_data)
274.1706 ++	_M_data = new __moneypunct_cache<wchar_t, true>;
274.1707 ++
274.1708 ++      if (!__cloc)
274.1709 ++	{
274.1710 ++	  // "C" locale
274.1711 ++	  _M_data->_M_decimal_point = L'.';
274.1712 ++	  _M_data->_M_thousands_sep = L',';
274.1713 ++	  _M_data->_M_grouping = "";
274.1714 ++	  _M_data->_M_grouping_size = 0;
274.1715 ++	  _M_data->_M_curr_symbol = L"";
274.1716 ++	  _M_data->_M_curr_symbol_size = 0;
274.1717 ++	  _M_data->_M_positive_sign = L"";
274.1718 ++	  _M_data->_M_positive_sign_size = 0;
274.1719 ++	  _M_data->_M_negative_sign = L"";
274.1720 ++	  _M_data->_M_negative_sign_size = 0;
274.1721 ++	  _M_data->_M_frac_digits = 0;
274.1722 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
274.1723 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
274.1724 ++
274.1725 ++	  // Use ctype::widen code without the facet...
274.1726 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
274.1727 ++	    _M_data->_M_atoms[__i] =
274.1728 ++	      static_cast<wchar_t>(money_base::_S_atoms[__i]);
274.1729 ++	}
274.1730 ++      else
274.1731 ++	{
274.1732 ++	  // Named locale.
274.1733 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.1734 ++	  __c_locale __old = __uselocale(__cloc);
274.1735 ++#else
274.1736 ++	  // Switch to named locale so that mbsrtowcs will work.
274.1737 ++	  char* __old = strdup(setlocale(LC_ALL, NULL));
274.1738 ++	  setlocale(LC_ALL, __name);
274.1739 ++#endif
274.1740 ++
274.1741 ++#ifdef __UCLIBC_MJN3_ONLY__
274.1742 ++#warning fix this... should be monetary
274.1743 ++#endif
274.1744 ++#ifdef __UCLIBC__
274.1745 ++# ifdef __UCLIBC_HAS_XLOCALE__
274.1746 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
274.1747 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
274.1748 ++# else
274.1749 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
274.1750 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
274.1751 ++# endif
274.1752 ++#else
274.1753 ++	  union { char *__s; wchar_t __w; } __u;
274.1754 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
274.1755 ++	  _M_data->_M_decimal_point = __u.__w;
274.1756 ++
274.1757 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
274.1758 ++	  _M_data->_M_thousands_sep = __u.__w;
274.1759 ++#endif
274.1760 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
274.1761 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
274.1762 ++
274.1763 ++	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
274.1764 ++	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
274.1765 ++	  const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
274.1766 ++
274.1767 ++	  wchar_t* __wcs_ps = 0;
274.1768 ++	  wchar_t* __wcs_ns = 0;
274.1769 ++	  const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
274.1770 ++	  try
274.1771 ++	    {
274.1772 ++	      mbstate_t __state;
274.1773 ++	      size_t __len = strlen(__cpossign);
274.1774 ++	      if (__len)
274.1775 ++		{
274.1776 ++		  ++__len;
274.1777 ++		  memset(&__state, 0, sizeof(mbstate_t));
274.1778 ++		  __wcs_ps = new wchar_t[__len];
274.1779 ++		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
274.1780 ++		  _M_data->_M_positive_sign = __wcs_ps;
274.1781 ++		}
274.1782 ++	      else
274.1783 ++		_M_data->_M_positive_sign = L"";
274.1784 ++	      _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
274.1785 ++	      
274.1786 ++	      __len = strlen(__cnegsign);
274.1787 ++	      if (!__nposn)
274.1788 ++		_M_data->_M_negative_sign = L"()";
274.1789 ++	      else if (__len)
274.1790 ++		{ 
274.1791 ++		  ++__len;
274.1792 ++		  memset(&__state, 0, sizeof(mbstate_t));
274.1793 ++		  __wcs_ns = new wchar_t[__len];
274.1794 ++		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
274.1795 ++		  _M_data->_M_negative_sign = __wcs_ns;
274.1796 ++		}
274.1797 ++	      else
274.1798 ++		_M_data->_M_negative_sign = L"";
274.1799 ++	      _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
274.1800 ++	      
274.1801 ++	      // _Intl == true.
274.1802 ++	      __len = strlen(__ccurr);
274.1803 ++	      if (__len)
274.1804 ++		{
274.1805 ++		  ++__len;
274.1806 ++		  memset(&__state, 0, sizeof(mbstate_t));
274.1807 ++		  wchar_t* __wcs = new wchar_t[__len];
274.1808 ++		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
274.1809 ++		  _M_data->_M_curr_symbol = __wcs;
274.1810 ++		}
274.1811 ++	      else
274.1812 ++		_M_data->_M_curr_symbol = L"";
274.1813 ++	      _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
274.1814 ++	    }
274.1815 ++	  catch (...)
274.1816 ++	    {
274.1817 ++	      delete _M_data;
274.1818 ++	      _M_data = 0;
274.1819 ++	      delete __wcs_ps;
274.1820 ++	      delete __wcs_ns;	      
274.1821 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.1822 ++	      __uselocale(__old);
274.1823 ++#else
274.1824 ++	      setlocale(LC_ALL, __old);
274.1825 ++	      free(__old);
274.1826 ++#endif
274.1827 ++	      __throw_exception_again;
274.1828 ++	    } 
274.1829 ++	  
274.1830 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
274.1831 ++						      __cloc));
274.1832 ++	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
274.1833 ++	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
274.1834 ++	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
274.1835 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
274.1836 ++							__pposn);
274.1837 ++	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
274.1838 ++	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
274.1839 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
274.1840 ++							__nposn);
274.1841 ++
274.1842 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.1843 ++	  __uselocale(__old);
274.1844 ++#else
274.1845 ++	  setlocale(LC_ALL, __old);
274.1846 ++	  free(__old);
274.1847 ++#endif
274.1848 ++	}
274.1849 ++    }
274.1850 ++
274.1851 ++  template<> 
274.1852 ++  void
274.1853 ++  moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
274.1854 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.1855 ++						       const char*)
274.1856 ++#else
274.1857 ++                                                       const char* __name)
274.1858 ++#endif
274.1859 ++  {
274.1860 ++    if (!_M_data)
274.1861 ++      _M_data = new __moneypunct_cache<wchar_t, false>;
274.1862 ++
274.1863 ++    if (!__cloc)
274.1864 ++	{
274.1865 ++	  // "C" locale
274.1866 ++	  _M_data->_M_decimal_point = L'.';
274.1867 ++	  _M_data->_M_thousands_sep = L',';
274.1868 ++	  _M_data->_M_grouping = "";
274.1869 ++          _M_data->_M_grouping_size = 0;
274.1870 ++	  _M_data->_M_curr_symbol = L"";
274.1871 ++	  _M_data->_M_curr_symbol_size = 0;
274.1872 ++	  _M_data->_M_positive_sign = L"";
274.1873 ++	  _M_data->_M_positive_sign_size = 0;
274.1874 ++	  _M_data->_M_negative_sign = L"";
274.1875 ++	  _M_data->_M_negative_sign_size = 0;
274.1876 ++	  _M_data->_M_frac_digits = 0;
274.1877 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
274.1878 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
274.1879 ++
274.1880 ++	  // Use ctype::widen code without the facet...
274.1881 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
274.1882 ++	    _M_data->_M_atoms[__i] =
274.1883 ++	      static_cast<wchar_t>(money_base::_S_atoms[__i]);
274.1884 ++	}
274.1885 ++      else
274.1886 ++	{
274.1887 ++	  // Named locale.
274.1888 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.1889 ++	  __c_locale __old = __uselocale(__cloc);
274.1890 ++#else
274.1891 ++	  // Switch to named locale so that mbsrtowcs will work.
274.1892 ++	  char* __old = strdup(setlocale(LC_ALL, NULL));
274.1893 ++	  setlocale(LC_ALL, __name);
274.1894 ++#endif
274.1895 ++
274.1896 ++#ifdef __UCLIBC_MJN3_ONLY__
274.1897 ++#warning fix this... should be monetary
274.1898 ++#endif
274.1899 ++#ifdef __UCLIBC__
274.1900 ++# ifdef __UCLIBC_HAS_XLOCALE__
274.1901 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
274.1902 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
274.1903 ++# else
274.1904 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
274.1905 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
274.1906 ++# endif
274.1907 ++#else
274.1908 ++          union { char *__s; wchar_t __w; } __u;
274.1909 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
274.1910 ++	  _M_data->_M_decimal_point = __u.__w;
274.1911 ++
274.1912 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
274.1913 ++	  _M_data->_M_thousands_sep = __u.__w;
274.1914 ++#endif
274.1915 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
274.1916 ++          _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
274.1917 ++
274.1918 ++	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
274.1919 ++	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
274.1920 ++	  const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
274.1921 ++
274.1922 ++	  wchar_t* __wcs_ps = 0;
274.1923 ++	  wchar_t* __wcs_ns = 0;
274.1924 ++	  const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
274.1925 ++	  try
274.1926 ++            {
274.1927 ++              mbstate_t __state;
274.1928 ++              size_t __len;
274.1929 ++              __len = strlen(__cpossign);
274.1930 ++              if (__len)
274.1931 ++                {
274.1932 ++		  ++__len;
274.1933 ++		  memset(&__state, 0, sizeof(mbstate_t));
274.1934 ++		  __wcs_ps = new wchar_t[__len];
274.1935 ++		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
274.1936 ++		  _M_data->_M_positive_sign = __wcs_ps;
274.1937 ++		}
274.1938 ++	      else
274.1939 ++		_M_data->_M_positive_sign = L"";
274.1940 ++              _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
274.1941 ++	      
274.1942 ++	      __len = strlen(__cnegsign);
274.1943 ++	      if (!__nposn)
274.1944 ++		_M_data->_M_negative_sign = L"()";
274.1945 ++	      else if (__len)
274.1946 ++		{ 
274.1947 ++		  ++__len;
274.1948 ++		  memset(&__state, 0, sizeof(mbstate_t));
274.1949 ++		  __wcs_ns = new wchar_t[__len];
274.1950 ++		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
274.1951 ++		  _M_data->_M_negative_sign = __wcs_ns;
274.1952 ++		}
274.1953 ++	      else
274.1954 ++		_M_data->_M_negative_sign = L"";
274.1955 ++              _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
274.1956 ++
274.1957 ++	      // _Intl == true.
274.1958 ++	      __len = strlen(__ccurr);
274.1959 ++	      if (__len)
274.1960 ++		{
274.1961 ++		  ++__len;
274.1962 ++		  memset(&__state, 0, sizeof(mbstate_t));
274.1963 ++		  wchar_t* __wcs = new wchar_t[__len];
274.1964 ++		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
274.1965 ++		  _M_data->_M_curr_symbol = __wcs;
274.1966 ++		}
274.1967 ++	      else
274.1968 ++		_M_data->_M_curr_symbol = L"";
274.1969 ++              _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
274.1970 ++	    }
274.1971 ++          catch (...)
274.1972 ++	    {
274.1973 ++	      delete _M_data;
274.1974 ++              _M_data = 0;
274.1975 ++	      delete __wcs_ps;
274.1976 ++	      delete __wcs_ns;	      
274.1977 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.1978 ++	      __uselocale(__old);
274.1979 ++#else
274.1980 ++	      setlocale(LC_ALL, __old);
274.1981 ++	      free(__old);
274.1982 ++#endif
274.1983 ++              __throw_exception_again;
274.1984 ++	    }
274.1985 ++
274.1986 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
274.1987 ++	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
274.1988 ++	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
274.1989 ++	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
274.1990 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
274.1991 ++	                                                __pposn);
274.1992 ++	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
274.1993 ++	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
274.1994 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
274.1995 ++	                                                __nposn);
274.1996 ++
274.1997 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.1998 ++	  __uselocale(__old);
274.1999 ++#else
274.2000 ++	  setlocale(LC_ALL, __old);
274.2001 ++	  free(__old);
274.2002 ++#endif
274.2003 ++	}
274.2004 ++    }
274.2005 ++
274.2006 ++  template<> 
274.2007 ++    moneypunct<wchar_t, true>::~moneypunct()
274.2008 ++    {
274.2009 ++      if (_M_data->_M_positive_sign_size)
274.2010 ++	delete [] _M_data->_M_positive_sign;
274.2011 ++      if (_M_data->_M_negative_sign_size
274.2012 ++          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
274.2013 ++	delete [] _M_data->_M_negative_sign;
274.2014 ++      if (_M_data->_M_curr_symbol_size)
274.2015 ++	delete [] _M_data->_M_curr_symbol;
274.2016 ++      delete _M_data;
274.2017 ++    }
274.2018 ++
274.2019 ++  template<> 
274.2020 ++    moneypunct<wchar_t, false>::~moneypunct()
274.2021 ++    {
274.2022 ++      if (_M_data->_M_positive_sign_size)
274.2023 ++	delete [] _M_data->_M_positive_sign;
274.2024 ++      if (_M_data->_M_negative_sign_size
274.2025 ++          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
274.2026 ++	delete [] _M_data->_M_negative_sign;
274.2027 ++      if (_M_data->_M_curr_symbol_size)
274.2028 ++	delete [] _M_data->_M_curr_symbol;
274.2029 ++      delete _M_data;
274.2030 ++    }
274.2031 ++#endif
274.2032 ++}
274.2033 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
274.2034 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/numeric_members.cc	1969-12-31 18:00:00.000000000 -0600
274.2035 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc	2005-04-28 01:20:20.000000000 -0500
274.2036 +@@ -0,0 +1,173 @@
274.2037 ++// std::numpunct implementation details, GNU version -*- C++ -*-
274.2038 ++
274.2039 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
274.2040 ++//
274.2041 ++// This file is part of the GNU ISO C++ Library.  This library is free
274.2042 ++// software; you can redistribute it and/or modify it under the
274.2043 ++// terms of the GNU General Public License as published by the
274.2044 ++// Free Software Foundation; either version 2, or (at your option)
274.2045 ++// any later version.
274.2046 ++
274.2047 ++// This library is distributed in the hope that it will be useful,
274.2048 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
274.2049 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
274.2050 ++// GNU General Public License for more details.
274.2051 ++
274.2052 ++// You should have received a copy of the GNU General Public License along
274.2053 ++// with this library; see the file COPYING.  If not, write to the Free
274.2054 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
274.2055 ++// USA.
274.2056 ++
274.2057 ++// As a special exception, you may use this file as part of a free software
274.2058 ++// library without restriction.  Specifically, if other files instantiate
274.2059 ++// templates or use macros or inline functions from this file, or you compile
274.2060 ++// this file and link it with other files to produce an executable, this
274.2061 ++// file does not by itself cause the resulting executable to be covered by
274.2062 ++// the GNU General Public License.  This exception does not however
274.2063 ++// invalidate any other reasons why the executable file might be covered by
274.2064 ++// the GNU General Public License.
274.2065 ++
274.2066 ++//
274.2067 ++// ISO C++ 14882: 22.2.3.1.2  numpunct virtual functions
274.2068 ++//
274.2069 ++
274.2070 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
274.2071 ++
274.2072 ++#define _LIBC
274.2073 ++#include <locale>
274.2074 ++#undef _LIBC
274.2075 ++#include <bits/c++locale_internal.h>
274.2076 ++
274.2077 ++#ifdef __UCLIBC_MJN3_ONLY__
274.2078 ++#warning tailor for stub locale support
274.2079 ++#endif
274.2080 ++#ifndef __UCLIBC_HAS_XLOCALE__
274.2081 ++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
274.2082 ++#endif
274.2083 ++
274.2084 ++namespace std
274.2085 ++{
274.2086 ++  template<> 
274.2087 ++    void
274.2088 ++    numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
274.2089 ++    {
274.2090 ++      if (!_M_data)
274.2091 ++	_M_data = new __numpunct_cache<char>;
274.2092 ++
274.2093 ++      if (!__cloc)
274.2094 ++	{
274.2095 ++	  // "C" locale
274.2096 ++	  _M_data->_M_grouping = "";
274.2097 ++	  _M_data->_M_grouping_size = 0;
274.2098 ++	  _M_data->_M_use_grouping = false;
274.2099 ++
274.2100 ++	  _M_data->_M_decimal_point = '.';
274.2101 ++	  _M_data->_M_thousands_sep = ',';
274.2102 ++
274.2103 ++	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
274.2104 ++	    _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
274.2105 ++
274.2106 ++	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
274.2107 ++	    _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
274.2108 ++	}
274.2109 ++      else
274.2110 ++	{
274.2111 ++	  // Named locale.
274.2112 ++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, 
274.2113 ++							__cloc));
274.2114 ++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, 
274.2115 ++							__cloc));
274.2116 ++
274.2117 ++	  // Check for NULL, which implies no grouping.
274.2118 ++	  if (_M_data->_M_thousands_sep == '\0')
274.2119 ++	    _M_data->_M_grouping = "";
274.2120 ++	  else
274.2121 ++	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
274.2122 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
274.2123 ++	}
274.2124 ++
274.2125 ++      // NB: There is no way to extact this info from posix locales.
274.2126 ++      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
274.2127 ++      _M_data->_M_truename = "true";
274.2128 ++      _M_data->_M_truename_size = 4;
274.2129 ++      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
274.2130 ++      _M_data->_M_falsename = "false";
274.2131 ++      _M_data->_M_falsename_size = 5;
274.2132 ++    }
274.2133 ++ 
274.2134 ++  template<> 
274.2135 ++    numpunct<char>::~numpunct()
274.2136 ++    { delete _M_data; }
274.2137 ++   
274.2138 ++#ifdef _GLIBCXX_USE_WCHAR_T
274.2139 ++  template<> 
274.2140 ++    void
274.2141 ++    numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
274.2142 ++    {
274.2143 ++      if (!_M_data)
274.2144 ++	_M_data = new __numpunct_cache<wchar_t>;
274.2145 ++
274.2146 ++      if (!__cloc)
274.2147 ++	{
274.2148 ++	  // "C" locale
274.2149 ++	  _M_data->_M_grouping = "";
274.2150 ++	  _M_data->_M_grouping_size = 0;
274.2151 ++	  _M_data->_M_use_grouping = false;
274.2152 ++
274.2153 ++	  _M_data->_M_decimal_point = L'.';
274.2154 ++	  _M_data->_M_thousands_sep = L',';
274.2155 ++
274.2156 ++	  // Use ctype::widen code without the facet...
274.2157 ++	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
274.2158 ++	    _M_data->_M_atoms_out[__i] =
274.2159 ++	      static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
274.2160 ++
274.2161 ++	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
274.2162 ++	    _M_data->_M_atoms_in[__j] =
274.2163 ++	      static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
274.2164 ++	}
274.2165 ++      else
274.2166 ++	{
274.2167 ++	  // Named locale.
274.2168 ++	  // NB: In the GNU model wchar_t is always 32 bit wide.
274.2169 ++#ifdef __UCLIBC_MJN3_ONLY__
274.2170 ++#warning fix this
274.2171 ++#endif
274.2172 ++#ifdef __UCLIBC__
274.2173 ++# ifdef __UCLIBC_HAS_XLOCALE__
274.2174 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
274.2175 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
274.2176 ++# else
274.2177 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
274.2178 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
274.2179 ++# endif
274.2180 ++#else
274.2181 ++	  union { char *__s; wchar_t __w; } __u;
274.2182 ++	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
274.2183 ++	  _M_data->_M_decimal_point = __u.__w;
274.2184 ++
274.2185 ++	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
274.2186 ++	  _M_data->_M_thousands_sep = __u.__w;
274.2187 ++#endif
274.2188 ++
274.2189 ++	  if (_M_data->_M_thousands_sep == L'\0')
274.2190 ++	    _M_data->_M_grouping = "";
274.2191 ++	  else
274.2192 ++	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
274.2193 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
274.2194 ++	}
274.2195 ++
274.2196 ++      // NB: There is no way to extact this info from posix locales.
274.2197 ++      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
274.2198 ++      _M_data->_M_truename = L"true";
274.2199 ++      _M_data->_M_truename_size = 4;
274.2200 ++      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
274.2201 ++      _M_data->_M_falsename = L"false";
274.2202 ++      _M_data->_M_falsename_size = 5;
274.2203 ++    }
274.2204 ++
274.2205 ++  template<> 
274.2206 ++    numpunct<wchar_t>::~numpunct()
274.2207 ++    { delete _M_data; }
274.2208 ++ #endif
274.2209 ++}
274.2210 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.cc
274.2211 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.cc	1969-12-31 18:00:00.000000000 -0600
274.2212 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.cc	2005-04-28 01:13:15.000000000 -0500
274.2213 +@@ -0,0 +1,406 @@
274.2214 ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
274.2215 ++
274.2216 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
274.2217 ++//
274.2218 ++// This file is part of the GNU ISO C++ Library.  This library is free
274.2219 ++// software; you can redistribute it and/or modify it under the
274.2220 ++// terms of the GNU General Public License as published by the
274.2221 ++// Free Software Foundation; either version 2, or (at your option)
274.2222 ++// any later version.
274.2223 ++
274.2224 ++// This library is distributed in the hope that it will be useful,
274.2225 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
274.2226 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
274.2227 ++// GNU General Public License for more details.
274.2228 ++
274.2229 ++// You should have received a copy of the GNU General Public License along
274.2230 ++// with this library; see the file COPYING.  If not, write to the Free
274.2231 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
274.2232 ++// USA.
274.2233 ++
274.2234 ++// As a special exception, you may use this file as part of a free software
274.2235 ++// library without restriction.  Specifically, if other files instantiate
274.2236 ++// templates or use macros or inline functions from this file, or you compile
274.2237 ++// this file and link it with other files to produce an executable, this
274.2238 ++// file does not by itself cause the resulting executable to be covered by
274.2239 ++// the GNU General Public License.  This exception does not however
274.2240 ++// invalidate any other reasons why the executable file might be covered by
274.2241 ++// the GNU General Public License.
274.2242 ++
274.2243 ++//
274.2244 ++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
274.2245 ++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
274.2246 ++//
274.2247 ++
274.2248 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
274.2249 ++
274.2250 ++#include <locale>
274.2251 ++#include <bits/c++locale_internal.h>
274.2252 ++
274.2253 ++#ifdef __UCLIBC_MJN3_ONLY__
274.2254 ++#warning tailor for stub locale support
274.2255 ++#endif
274.2256 ++#ifndef __UCLIBC_HAS_XLOCALE__
274.2257 ++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
274.2258 ++#endif
274.2259 ++
274.2260 ++namespace std
274.2261 ++{
274.2262 ++  template<>
274.2263 ++    void
274.2264 ++    __timepunct<char>::
274.2265 ++    _M_put(char* __s, size_t __maxlen, const char* __format, 
274.2266 ++	   const tm* __tm) const
274.2267 ++    {
274.2268 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.2269 ++      const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
274.2270 ++					_M_c_locale_timepunct);
274.2271 ++#else
274.2272 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
274.2273 ++      setlocale(LC_ALL, _M_name_timepunct);
274.2274 ++      const size_t __len = strftime(__s, __maxlen, __format, __tm);
274.2275 ++      setlocale(LC_ALL, __old);
274.2276 ++      free(__old);
274.2277 ++#endif
274.2278 ++      // Make sure __s is null terminated.
274.2279 ++      if (__len == 0)
274.2280 ++	__s[0] = '\0';
274.2281 ++    }
274.2282 ++
274.2283 ++  template<> 
274.2284 ++    void
274.2285 ++    __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
274.2286 ++    {
274.2287 ++      if (!_M_data)
274.2288 ++	_M_data = new __timepunct_cache<char>;
274.2289 ++
274.2290 ++      if (!__cloc)
274.2291 ++	{
274.2292 ++	  // "C" locale
274.2293 ++	  _M_c_locale_timepunct = _S_get_c_locale();
274.2294 ++
274.2295 ++	  _M_data->_M_date_format = "%m/%d/%y";
274.2296 ++	  _M_data->_M_date_era_format = "%m/%d/%y";
274.2297 ++	  _M_data->_M_time_format = "%H:%M:%S";
274.2298 ++	  _M_data->_M_time_era_format = "%H:%M:%S";
274.2299 ++	  _M_data->_M_date_time_format = "";
274.2300 ++	  _M_data->_M_date_time_era_format = "";
274.2301 ++	  _M_data->_M_am = "AM";
274.2302 ++	  _M_data->_M_pm = "PM";
274.2303 ++	  _M_data->_M_am_pm_format = "";
274.2304 ++
274.2305 ++	  // Day names, starting with "C"'s Sunday.
274.2306 ++	  _M_data->_M_day1 = "Sunday";
274.2307 ++	  _M_data->_M_day2 = "Monday";
274.2308 ++	  _M_data->_M_day3 = "Tuesday";
274.2309 ++	  _M_data->_M_day4 = "Wednesday";
274.2310 ++	  _M_data->_M_day5 = "Thursday";
274.2311 ++	  _M_data->_M_day6 = "Friday";
274.2312 ++	  _M_data->_M_day7 = "Saturday";
274.2313 ++
274.2314 ++	  // Abbreviated day names, starting with "C"'s Sun.
274.2315 ++	  _M_data->_M_aday1 = "Sun";
274.2316 ++	  _M_data->_M_aday2 = "Mon";
274.2317 ++	  _M_data->_M_aday3 = "Tue";
274.2318 ++	  _M_data->_M_aday4 = "Wed";
274.2319 ++	  _M_data->_M_aday5 = "Thu";
274.2320 ++	  _M_data->_M_aday6 = "Fri";
274.2321 ++	  _M_data->_M_aday7 = "Sat";
274.2322 ++
274.2323 ++	  // Month names, starting with "C"'s January.
274.2324 ++	  _M_data->_M_month01 = "January";
274.2325 ++	  _M_data->_M_month02 = "February";
274.2326 ++	  _M_data->_M_month03 = "March";
274.2327 ++	  _M_data->_M_month04 = "April";
274.2328 ++	  _M_data->_M_month05 = "May";
274.2329 ++	  _M_data->_M_month06 = "June";
274.2330 ++	  _M_data->_M_month07 = "July";
274.2331 ++	  _M_data->_M_month08 = "August";
274.2332 ++	  _M_data->_M_month09 = "September";
274.2333 ++	  _M_data->_M_month10 = "October";
274.2334 ++	  _M_data->_M_month11 = "November";
274.2335 ++	  _M_data->_M_month12 = "December";
274.2336 ++
274.2337 ++	  // Abbreviated month names, starting with "C"'s Jan.
274.2338 ++	  _M_data->_M_amonth01 = "Jan";
274.2339 ++	  _M_data->_M_amonth02 = "Feb";
274.2340 ++	  _M_data->_M_amonth03 = "Mar";
274.2341 ++	  _M_data->_M_amonth04 = "Apr";
274.2342 ++	  _M_data->_M_amonth05 = "May";
274.2343 ++	  _M_data->_M_amonth06 = "Jun";
274.2344 ++	  _M_data->_M_amonth07 = "Jul";
274.2345 ++	  _M_data->_M_amonth08 = "Aug";
274.2346 ++	  _M_data->_M_amonth09 = "Sep";
274.2347 ++	  _M_data->_M_amonth10 = "Oct";
274.2348 ++	  _M_data->_M_amonth11 = "Nov";
274.2349 ++	  _M_data->_M_amonth12 = "Dec";
274.2350 ++	}
274.2351 ++      else
274.2352 ++	{
274.2353 ++	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
274.2354 ++
274.2355 ++	  _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
274.2356 ++	  _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
274.2357 ++	  _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
274.2358 ++	  _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
274.2359 ++	  _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
274.2360 ++	  _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
274.2361 ++							     __cloc);
274.2362 ++	  _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
274.2363 ++	  _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
274.2364 ++	  _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
274.2365 ++
274.2366 ++	  // Day names, starting with "C"'s Sunday.
274.2367 ++	  _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
274.2368 ++	  _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
274.2369 ++	  _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
274.2370 ++	  _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
274.2371 ++	  _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
274.2372 ++	  _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
274.2373 ++	  _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
274.2374 ++
274.2375 ++	  // Abbreviated day names, starting with "C"'s Sun.
274.2376 ++	  _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
274.2377 ++	  _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
274.2378 ++	  _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
274.2379 ++	  _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
274.2380 ++	  _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
274.2381 ++	  _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
274.2382 ++	  _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
274.2383 ++
274.2384 ++	  // Month names, starting with "C"'s January.
274.2385 ++	  _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
274.2386 ++	  _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
274.2387 ++	  _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
274.2388 ++	  _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
274.2389 ++	  _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
274.2390 ++	  _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
274.2391 ++	  _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
274.2392 ++	  _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
274.2393 ++	  _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
274.2394 ++	  _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
274.2395 ++	  _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
274.2396 ++	  _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
274.2397 ++
274.2398 ++	  // Abbreviated month names, starting with "C"'s Jan.
274.2399 ++	  _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
274.2400 ++	  _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
274.2401 ++	  _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
274.2402 ++	  _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
274.2403 ++	  _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
274.2404 ++	  _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
274.2405 ++	  _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
274.2406 ++	  _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
274.2407 ++	  _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
274.2408 ++	  _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
274.2409 ++	  _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
274.2410 ++	  _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
274.2411 ++	}
274.2412 ++    }
274.2413 ++
274.2414 ++#ifdef _GLIBCXX_USE_WCHAR_T
274.2415 ++  template<>
274.2416 ++    void
274.2417 ++    __timepunct<wchar_t>::
274.2418 ++    _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, 
274.2419 ++	   const tm* __tm) const
274.2420 ++    {
274.2421 ++#ifdef __UCLIBC_HAS_XLOCALE__
274.2422 ++      __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
274.2423 ++      const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
274.2424 ++					_M_c_locale_timepunct);
274.2425 ++#else
274.2426 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
274.2427 ++      setlocale(LC_ALL, _M_name_timepunct);
274.2428 ++      const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
274.2429 ++      setlocale(LC_ALL, __old);
274.2430 ++      free(__old);
274.2431 ++#endif
274.2432 ++      // Make sure __s is null terminated.
274.2433 ++      if (__len == 0)
274.2434 ++	__s[0] = L'\0';
274.2435 ++    }
274.2436 ++
274.2437 ++  template<> 
274.2438 ++    void
274.2439 ++    __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
274.2440 ++    {
274.2441 ++      if (!_M_data)
274.2442 ++	_M_data = new __timepunct_cache<wchar_t>;
274.2443 ++
274.2444 ++#warning wide time stuff
274.2445 ++//       if (!__cloc)
274.2446 ++	{
274.2447 ++	  // "C" locale
274.2448 ++	  _M_c_locale_timepunct = _S_get_c_locale();
274.2449 ++
274.2450 ++	  _M_data->_M_date_format = L"%m/%d/%y";
274.2451 ++	  _M_data->_M_date_era_format = L"%m/%d/%y";
274.2452 ++	  _M_data->_M_time_format = L"%H:%M:%S";
274.2453 ++	  _M_data->_M_time_era_format = L"%H:%M:%S";
274.2454 ++	  _M_data->_M_date_time_format = L"";
274.2455 ++	  _M_data->_M_date_time_era_format = L"";
274.2456 ++	  _M_data->_M_am = L"AM";
274.2457 ++	  _M_data->_M_pm = L"PM";
274.2458 ++	  _M_data->_M_am_pm_format = L"";
274.2459 ++
274.2460 ++	  // Day names, starting with "C"'s Sunday.
274.2461 ++	  _M_data->_M_day1 = L"Sunday";
274.2462 ++	  _M_data->_M_day2 = L"Monday";
274.2463 ++	  _M_data->_M_day3 = L"Tuesday";
274.2464 ++	  _M_data->_M_day4 = L"Wednesday";
274.2465 ++	  _M_data->_M_day5 = L"Thursday";
274.2466 ++	  _M_data->_M_day6 = L"Friday";
274.2467 ++	  _M_data->_M_day7 = L"Saturday";
274.2468 ++
274.2469 ++	  // Abbreviated day names, starting with "C"'s Sun.
274.2470 ++	  _M_data->_M_aday1 = L"Sun";
274.2471 ++	  _M_data->_M_aday2 = L"Mon";
274.2472 ++	  _M_data->_M_aday3 = L"Tue";
274.2473 ++	  _M_data->_M_aday4 = L"Wed";
274.2474 ++	  _M_data->_M_aday5 = L"Thu";
274.2475 ++	  _M_data->_M_aday6 = L"Fri";
274.2476 ++	  _M_data->_M_aday7 = L"Sat";
274.2477 ++
274.2478 ++	  // Month names, starting with "C"'s January.
274.2479 ++	  _M_data->_M_month01 = L"January";
274.2480 ++	  _M_data->_M_month02 = L"February";
274.2481 ++	  _M_data->_M_month03 = L"March";
274.2482 ++	  _M_data->_M_month04 = L"April";
274.2483 ++	  _M_data->_M_month05 = L"May";
274.2484 ++	  _M_data->_M_month06 = L"June";
274.2485 ++	  _M_data->_M_month07 = L"July";
274.2486 ++	  _M_data->_M_month08 = L"August";
274.2487 ++	  _M_data->_M_month09 = L"September";
274.2488 ++	  _M_data->_M_month10 = L"October";
274.2489 ++	  _M_data->_M_month11 = L"November";
274.2490 ++	  _M_data->_M_month12 = L"December";
274.2491 ++
274.2492 ++	  // Abbreviated month names, starting with "C"'s Jan.
274.2493 ++	  _M_data->_M_amonth01 = L"Jan";
274.2494 ++	  _M_data->_M_amonth02 = L"Feb";
274.2495 ++	  _M_data->_M_amonth03 = L"Mar";
274.2496 ++	  _M_data->_M_amonth04 = L"Apr";
274.2497 ++	  _M_data->_M_amonth05 = L"May";
274.2498 ++	  _M_data->_M_amonth06 = L"Jun";
274.2499 ++	  _M_data->_M_amonth07 = L"Jul";
274.2500 ++	  _M_data->_M_amonth08 = L"Aug";
274.2501 ++	  _M_data->_M_amonth09 = L"Sep";
274.2502 ++	  _M_data->_M_amonth10 = L"Oct";
274.2503 ++	  _M_data->_M_amonth11 = L"Nov";
274.2504 ++	  _M_data->_M_amonth12 = L"Dec";
274.2505 ++	}
274.2506 ++#if 0
274.2507 ++      else
274.2508 ++	{
274.2509 ++	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
274.2510 ++
274.2511 ++	  union { char *__s; wchar_t *__w; } __u;
274.2512 ++
274.2513 ++	  __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
274.2514 ++	  _M_data->_M_date_format = __u.__w;
274.2515 ++	  __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
274.2516 ++	  _M_data->_M_date_era_format = __u.__w;
274.2517 ++	  __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
274.2518 ++	  _M_data->_M_time_format = __u.__w;
274.2519 ++	  __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
274.2520 ++	  _M_data->_M_time_era_format = __u.__w;
274.2521 ++	  __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
274.2522 ++	  _M_data->_M_date_time_format = __u.__w;
274.2523 ++	  __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
274.2524 ++	  _M_data->_M_date_time_era_format = __u.__w;
274.2525 ++	  __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
274.2526 ++	  _M_data->_M_am = __u.__w;
274.2527 ++	  __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
274.2528 ++	  _M_data->_M_pm = __u.__w;
274.2529 ++	  __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
274.2530 ++	  _M_data->_M_am_pm_format = __u.__w;
274.2531 ++
274.2532 ++	  // Day names, starting with "C"'s Sunday.
274.2533 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
274.2534 ++	  _M_data->_M_day1 = __u.__w;
274.2535 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
274.2536 ++	  _M_data->_M_day2 = __u.__w;
274.2537 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
274.2538 ++	  _M_data->_M_day3 = __u.__w;
274.2539 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
274.2540 ++	  _M_data->_M_day4 = __u.__w;
274.2541 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
274.2542 ++	  _M_data->_M_day5 = __u.__w;
274.2543 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
274.2544 ++	  _M_data->_M_day6 = __u.__w;
274.2545 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
274.2546 ++	  _M_data->_M_day7 = __u.__w;
274.2547 ++
274.2548 ++	  // Abbreviated day names, starting with "C"'s Sun.
274.2549 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
274.2550 ++	  _M_data->_M_aday1 = __u.__w;
274.2551 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
274.2552 ++	  _M_data->_M_aday2 = __u.__w;
274.2553 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
274.2554 ++	  _M_data->_M_aday3 = __u.__w;
274.2555 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
274.2556 ++	  _M_data->_M_aday4 = __u.__w;
274.2557 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
274.2558 ++	  _M_data->_M_aday5 = __u.__w;
274.2559 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
274.2560 ++	  _M_data->_M_aday6 = __u.__w;
274.2561 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
274.2562 ++	  _M_data->_M_aday7 = __u.__w;
274.2563 ++
274.2564 ++	  // Month names, starting with "C"'s January.
274.2565 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
274.2566 ++	  _M_data->_M_month01 = __u.__w;
274.2567 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
274.2568 ++	  _M_data->_M_month02 = __u.__w;
274.2569 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
274.2570 ++	  _M_data->_M_month03 = __u.__w;
274.2571 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
274.2572 ++	  _M_data->_M_month04 = __u.__w;
274.2573 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
274.2574 ++	  _M_data->_M_month05 = __u.__w;
274.2575 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
274.2576 ++	  _M_data->_M_month06 = __u.__w;
274.2577 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
274.2578 ++	  _M_data->_M_month07 = __u.__w;
274.2579 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
274.2580 ++	  _M_data->_M_month08 = __u.__w;
274.2581 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
274.2582 ++	  _M_data->_M_month09 = __u.__w;
274.2583 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
274.2584 ++	  _M_data->_M_month10 = __u.__w;
274.2585 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
274.2586 ++	  _M_data->_M_month11 = __u.__w;
274.2587 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
274.2588 ++	  _M_data->_M_month12 = __u.__w;
274.2589 ++
274.2590 ++	  // Abbreviated month names, starting with "C"'s Jan.
274.2591 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
274.2592 ++	  _M_data->_M_amonth01 = __u.__w;
274.2593 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
274.2594 ++	  _M_data->_M_amonth02 = __u.__w;
274.2595 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
274.2596 ++	  _M_data->_M_amonth03 = __u.__w;
274.2597 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
274.2598 ++	  _M_data->_M_amonth04 = __u.__w;
274.2599 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
274.2600 ++	  _M_data->_M_amonth05 = __u.__w;
274.2601 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
274.2602 ++	  _M_data->_M_amonth06 = __u.__w;
274.2603 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
274.2604 ++	  _M_data->_M_amonth07 = __u.__w;
274.2605 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
274.2606 ++	  _M_data->_M_amonth08 = __u.__w;
274.2607 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
274.2608 ++	  _M_data->_M_amonth09 = __u.__w;
274.2609 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
274.2610 ++	  _M_data->_M_amonth10 = __u.__w;
274.2611 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
274.2612 ++	  _M_data->_M_amonth11 = __u.__w;
274.2613 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
274.2614 ++	  _M_data->_M_amonth12 = __u.__w;
274.2615 ++	}
274.2616 ++#endif // 0
274.2617 ++    }
274.2618 ++#endif
274.2619 ++}
274.2620 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.h
274.2621 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.h	1969-12-31 18:00:00.000000000 -0600
274.2622 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.h	2004-05-22 18:46:31.000000000 -0500
274.2623 +@@ -0,0 +1,68 @@
274.2624 ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
274.2625 ++
274.2626 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
274.2627 ++//
274.2628 ++// This file is part of the GNU ISO C++ Library.  This library is free
274.2629 ++// software; you can redistribute it and/or modify it under the
274.2630 ++// terms of the GNU General Public License as published by the
274.2631 ++// Free Software Foundation; either version 2, or (at your option)
274.2632 ++// any later version.
274.2633 ++
274.2634 ++// This library is distributed in the hope that it will be useful,
274.2635 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
274.2636 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
274.2637 ++// GNU General Public License for more details.
274.2638 ++
274.2639 ++// You should have received a copy of the GNU General Public License along
274.2640 ++// with this library; see the file COPYING.  If not, write to the Free
274.2641 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
274.2642 ++// USA.
274.2643 ++
274.2644 ++// As a special exception, you may use this file as part of a free software
274.2645 ++// library without restriction.  Specifically, if other files instantiate
274.2646 ++// templates or use macros or inline functions from this file, or you compile
274.2647 ++// this file and link it with other files to produce an executable, this
274.2648 ++// file does not by itself cause the resulting executable to be covered by
274.2649 ++// the GNU General Public License.  This exception does not however
274.2650 ++// invalidate any other reasons why the executable file might be covered by
274.2651 ++// the GNU General Public License.
274.2652 ++
274.2653 ++//
274.2654 ++// ISO C++ 14882: 22.2.5.1.2 - time_get functions
274.2655 ++// ISO C++ 14882: 22.2.5.3.2 - time_put functions
274.2656 ++//
274.2657 ++
274.2658 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
274.2659 ++
274.2660 ++  template<typename _CharT>
274.2661 ++    __timepunct<_CharT>::__timepunct(size_t __refs) 
274.2662 ++    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
274.2663 ++    _M_name_timepunct(_S_get_c_name())
274.2664 ++    { _M_initialize_timepunct(); }
274.2665 ++
274.2666 ++  template<typename _CharT>
274.2667 ++    __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) 
274.2668 ++    : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), 
274.2669 ++    _M_name_timepunct(_S_get_c_name())
274.2670 ++    { _M_initialize_timepunct(); }
274.2671 ++
274.2672 ++  template<typename _CharT>
274.2673 ++    __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
274.2674 ++				     size_t __refs) 
274.2675 ++    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
274.2676 ++    _M_name_timepunct(__s)
274.2677 ++    { 
274.2678 ++      char* __tmp = new char[std::strlen(__s) + 1];
274.2679 ++      std::strcpy(__tmp, __s);
274.2680 ++      _M_name_timepunct = __tmp;
274.2681 ++      _M_initialize_timepunct(__cloc); 
274.2682 ++    }
274.2683 ++
274.2684 ++  template<typename _CharT>
274.2685 ++    __timepunct<_CharT>::~__timepunct()
274.2686 ++    { 
274.2687 ++      if (_M_name_timepunct != _S_get_c_name())
274.2688 ++	delete [] _M_name_timepunct;
274.2689 ++      delete _M_data; 
274.2690 ++      _S_destroy_c_locale(_M_c_locale_timepunct); 
274.2691 ++    }
274.2692 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_base.h
274.2693 +--- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_base.h	1969-12-31 18:00:00.000000000 -0600
274.2694 ++++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_base.h	2005-04-28 01:10:27.000000000 -0500
274.2695 +@@ -0,0 +1,64 @@
274.2696 ++// Locale support -*- C++ -*-
274.2697 ++
274.2698 ++// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004
274.2699 ++// Free Software Foundation, Inc.
274.2700 ++//
274.2701 ++// This file is part of the GNU ISO C++ Library.  This library is free
274.2702 ++// software; you can redistribute it and/or modify it under the
274.2703 ++// terms of the GNU General Public License as published by the
274.2704 ++// Free Software Foundation; either version 2, or (at your option)
274.2705 ++// any later version.
274.2706 ++
274.2707 ++// This library is distributed in the hope that it will be useful,
274.2708 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
274.2709 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
274.2710 ++// GNU General Public License for more details.
274.2711 ++
274.2712 ++// You should have received a copy of the GNU General Public License along
274.2713 ++// with this library; see the file COPYING.  If not, write to the Free
274.2714 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
274.2715 ++// USA.
274.2716 ++
274.2717 ++// As a special exception, you may use this file as part of a free software
274.2718 ++// library without restriction.  Specifically, if other files instantiate
274.2719 ++// templates or use macros or inline functions from this file, or you compile
274.2720 ++// this file and link it with other files to produce an executable, this
274.2721 ++// file does not by itself cause the resulting executable to be covered by
274.2722 ++// the GNU General Public License.  This exception does not however
274.2723 ++// invalidate any other reasons why the executable file might be covered by
274.2724 ++// the GNU General Public License.
274.2725 ++
274.2726 ++//
274.2727 ++// ISO C++ 14882: 22.1  Locales
274.2728 ++//
274.2729 ++  
274.2730 ++/** @file ctype_base.h
274.2731 ++ *  This is an internal header file, included by other library headers.
274.2732 ++ *  You should not attempt to use it directly.
274.2733 ++ */
274.2734 ++
274.2735 ++// Information as gleaned from /usr/include/ctype.h
274.2736 ++  
274.2737 ++  /// @brief  Base class for ctype.
274.2738 ++  struct ctype_base
274.2739 ++  {
274.2740 ++    // Note: In uClibc, the following two types depend on configuration.
274.2741 ++ 
274.2742 ++    // Non-standard typedefs.
274.2743 ++    typedef const __ctype_touplow_t* __to_type;
274.2744 ++
274.2745 ++    // NB: Offsets into ctype<char>::_M_table force a particular size
274.2746 ++    // on the mask type. Because of this, we don't use an enum.
274.2747 ++    typedef __ctype_mask_t	mask;   
274.2748 ++    static const mask upper    	= _ISupper;
274.2749 ++    static const mask lower 	= _ISlower;
274.2750 ++    static const mask alpha 	= _ISalpha;
274.2751 ++    static const mask digit 	= _ISdigit;
274.2752 ++    static const mask xdigit 	= _ISxdigit;
274.2753 ++    static const mask space 	= _ISspace;
274.2754 ++    static const mask print 	= _ISprint;
274.2755 ++    static const mask graph 	= _ISalpha | _ISdigit | _ISpunct;
274.2756 ++    static const mask cntrl 	= _IScntrl;
274.2757 ++    static const mask punct 	= _ISpunct;
274.2758 ++    static const mask alnum 	= _ISalpha | _ISdigit;
274.2759 ++  };
274.2760 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_inline.h
274.2761 +--- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_inline.h	1969-12-31 18:00:00.000000000 -0600
274.2762 ++++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_inline.h	2002-06-24 00:49:19.000000000 -0500
274.2763 +@@ -0,0 +1,69 @@
274.2764 ++// Locale support -*- C++ -*-
274.2765 ++
274.2766 ++// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
274.2767 ++//
274.2768 ++// This file is part of the GNU ISO C++ Library.  This library is free
274.2769 ++// software; you can redistribute it and/or modify it under the
274.2770 ++// terms of the GNU General Public License as published by the
274.2771 ++// Free Software Foundation; either version 2, or (at your option)
274.2772 ++// any later version.
274.2773 ++
274.2774 ++// This library is distributed in the hope that it will be useful,
274.2775 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
274.2776 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
274.2777 ++// GNU General Public License for more details.
274.2778 ++
274.2779 ++// You should have received a copy of the GNU General Public License along
274.2780 ++// with this library; see the file COPYING.  If not, write to the Free
274.2781 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
274.2782 ++// USA.
274.2783 ++
274.2784 ++// As a special exception, you may use this file as part of a free software
274.2785 ++// library without restriction.  Specifically, if other files instantiate
274.2786 ++// templates or use macros or inline functions from this file, or you compile
274.2787 ++// this file and link it with other files to produce an executable, this
274.2788 ++// file does not by itself cause the resulting executable to be covered by
274.2789 ++// the GNU General Public License.  This exception does not however
274.2790 ++// invalidate any other reasons why the executable file might be covered by
274.2791 ++// the GNU General Public License.
274.2792 ++
274.2793 ++//
274.2794 ++// ISO C++ 14882: 22.1  Locales
274.2795 ++//
274.2796 ++  
274.2797 ++// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
274.2798 ++// functions go in ctype.cc
274.2799 ++  
274.2800 ++  bool
274.2801 ++  ctype<char>::
274.2802 ++  is(mask __m, char __c) const
274.2803 ++  { return _M_table[static_cast<unsigned char>(__c)] & __m; }
274.2804 ++
274.2805 ++  const char*
274.2806 ++  ctype<char>::
274.2807 ++  is(const char* __low, const char* __high, mask* __vec) const
274.2808 ++  {
274.2809 ++    while (__low < __high)
274.2810 ++      *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
274.2811 ++    return __high;
274.2812 ++  }
274.2813 ++
274.2814 ++  const char*
274.2815 ++  ctype<char>::
274.2816 ++  scan_is(mask __m, const char* __low, const char* __high) const
274.2817 ++  {
274.2818 ++    while (__low < __high 
274.2819 ++	   && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
274.2820 ++      ++__low;
274.2821 ++    return __low;
274.2822 ++  }
274.2823 ++
274.2824 ++  const char*
274.2825 ++  ctype<char>::
274.2826 ++  scan_not(mask __m, const char* __low, const char* __high) const
274.2827 ++  {
274.2828 ++    while (__low < __high 
274.2829 ++	   && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
274.2830 ++      ++__low;
274.2831 ++    return __low;
274.2832 ++  }
274.2833 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h
274.2834 +--- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_noninline.h	1969-12-31 18:00:00.000000000 -0600
274.2835 ++++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h	2005-04-28 01:10:27.000000000 -0500
274.2836 +@@ -0,0 +1,92 @@
274.2837 ++// Locale support -*- C++ -*-
274.2838 ++
274.2839 ++// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
274.2840 ++// Free Software Foundation, Inc.
274.2841 ++//
274.2842 ++// This file is part of the GNU ISO C++ Library.  This library is free
274.2843 ++// software; you can redistribute it and/or modify it under the
274.2844 ++// terms of the GNU General Public License as published by the
274.2845 ++// Free Software Foundation; either version 2, or (at your option)
274.2846 ++// any later version.
274.2847 ++
274.2848 ++// This library is distributed in the hope that it will be useful,
274.2849 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
274.2850 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
274.2851 ++// GNU General Public License for more details.
274.2852 ++
274.2853 ++// You should have received a copy of the GNU General Public License along
274.2854 ++// with this library; see the file COPYING.  If not, write to the Free
274.2855 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
274.2856 ++// USA.
274.2857 ++
274.2858 ++// As a special exception, you may use this file as part of a free software
274.2859 ++// library without restriction.  Specifically, if other files instantiate
274.2860 ++// templates or use macros or inline functions from this file, or you compile
274.2861 ++// this file and link it with other files to produce an executable, this
274.2862 ++// file does not by itself cause the resulting executable to be covered by
274.2863 ++// the GNU General Public License.  This exception does not however
274.2864 ++// invalidate any other reasons why the executable file might be covered by
274.2865 ++// the GNU General Public License.
274.2866 ++
274.2867 ++//
274.2868 ++// ISO C++ 14882: 22.1  Locales
274.2869 ++//
274.2870 ++  
274.2871 ++// Information as gleaned from /usr/include/ctype.h
274.2872 ++
274.2873 ++  const ctype_base::mask*
274.2874 ++  ctype<char>::classic_table() throw()
274.2875 ++  { return __C_ctype_b; }
274.2876 ++
274.2877 ++  ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
274.2878 ++		     size_t __refs) 
274.2879 ++  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
274.2880 ++  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
274.2881 ++  {
274.2882 ++    _M_toupper = __C_ctype_toupper;
274.2883 ++    _M_tolower = __C_ctype_tolower;
274.2884 ++    _M_table = __table ? __table : __C_ctype_b;
274.2885 ++    memset(_M_widen, 0, sizeof(_M_widen));
274.2886 ++    memset(_M_narrow, 0, sizeof(_M_narrow));
274.2887 ++  }
274.2888 ++
274.2889 ++  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
274.2890 ++  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
274.2891 ++  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
274.2892 ++  {
274.2893 ++    _M_toupper = __C_ctype_toupper;
274.2894 ++    _M_tolower = __C_ctype_tolower;
274.2895 ++    _M_table = __table ? __table : __C_ctype_b;
274.2896 ++    memset(_M_widen, 0, sizeof(_M_widen));
274.2897 ++    memset(_M_narrow, 0, sizeof(_M_narrow));
274.2898 ++  }
274.2899 ++
274.2900 ++  char
274.2901 ++  ctype<char>::do_toupper(char __c) const
274.2902 ++  { return _M_toupper[static_cast<unsigned char>(__c)]; }
274.2903 ++
274.2904 ++  const char*
274.2905 ++  ctype<char>::do_toupper(char* __low, const char* __high) const
274.2906 ++  {
274.2907 ++    while (__low < __high)
274.2908 ++      {
274.2909 ++	*__low = _M_toupper[static_cast<unsigned char>(*__low)];
274.2910 ++	++__low;
274.2911 ++      }
274.2912 ++    return __high;
274.2913 ++  }
274.2914 ++
274.2915 ++  char
274.2916 ++  ctype<char>::do_tolower(char __c) const
274.2917 ++  { return _M_tolower[static_cast<unsigned char>(__c)]; }
274.2918 ++
274.2919 ++  const char* 
274.2920 ++  ctype<char>::do_tolower(char* __low, const char* __high) const
274.2921 ++  {
274.2922 ++    while (__low < __high)
274.2923 ++      {
274.2924 ++	*__low = _M_tolower[static_cast<unsigned char>(*__low)];
274.2925 ++	++__low;
274.2926 ++      }
274.2927 ++    return __high;
274.2928 ++  }
274.2929 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/os_defines.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/os_defines.h
274.2930 +--- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/os_defines.h	1969-12-31 18:00:00.000000000 -0600
274.2931 ++++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/os_defines.h	2005-04-28 01:10:27.000000000 -0500
274.2932 +@@ -0,0 +1,44 @@
274.2933 ++// Specific definitions for GNU/Linux  -*- C++ -*-
274.2934 ++
274.2935 ++// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
274.2936 ++//
274.2937 ++// This file is part of the GNU ISO C++ Library.  This library is free
274.2938 ++// software; you can redistribute it and/or modify it under the
274.2939 ++// terms of the GNU General Public License as published by the
274.2940 ++// Free Software Foundation; either version 2, or (at your option)
274.2941 ++// any later version.
274.2942 ++
274.2943 ++// This library is distributed in the hope that it will be useful,
274.2944 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
274.2945 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
274.2946 ++// GNU General Public License for more details.
274.2947 ++
274.2948 ++// You should have received a copy of the GNU General Public License along
274.2949 ++// with this library; see the file COPYING.  If not, write to the Free
274.2950 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
274.2951 ++// USA.
274.2952 ++
274.2953 ++// As a special exception, you may use this file as part of a free software
274.2954 ++// library without restriction.  Specifically, if other files instantiate
274.2955 ++// templates or use macros or inline functions from this file, or you compile
274.2956 ++// this file and link it with other files to produce an executable, this
274.2957 ++// file does not by itself cause the resulting executable to be covered by
274.2958 ++// the GNU General Public License.  This exception does not however
274.2959 ++// invalidate any other reasons why the executable file might be covered by
274.2960 ++// the GNU General Public License.
274.2961 ++
274.2962 ++#ifndef _GLIBCXX_OS_DEFINES
274.2963 ++#define _GLIBCXX_OS_DEFINES 1
274.2964 ++
274.2965 ++// System-specific #define, typedefs, corrections, etc, go here.  This
274.2966 ++// file will come before all others.
274.2967 ++
274.2968 ++// This keeps isanum, et al from being propagated as macros.
274.2969 ++#define __NO_CTYPE 1
274.2970 ++
274.2971 ++#include <features.h>
274.2972 ++
274.2973 ++// We must not see the optimized string functions GNU libc defines.
274.2974 ++#define __NO_STRING_INLINES
274.2975 ++
274.2976 ++#endif
274.2977 +diff -urN gcc-4.0.0-100/libstdc++-v3/configure gcc-4.0.0/libstdc++-v3/configure
274.2978 +--- gcc-4.0.0-100/libstdc++-v3/configure	2005-04-30 13:06:53.683055232 -0500
274.2979 ++++ gcc-4.0.0/libstdc++-v3/configure	2005-04-30 12:24:24.000000000 -0500
274.2980 +@@ -3998,6 +3998,11 @@
274.2981 +   lt_cv_deplibs_check_method=pass_all
274.2982 +   ;;
274.2983 + 
274.2984 ++linux-uclibc*)
274.2985 ++  lt_cv_deplibs_check_method=pass_all
274.2986 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
274.2987 ++  ;;
274.2988 ++
274.2989 + netbsd* | knetbsd*-gnu)
274.2990 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
274.2991 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
274.2992 +@@ -5672,7 +5677,7 @@
274.2993 +   enableval="$enable_clocale"
274.2994 + 
274.2995 +       case "$enableval" in
274.2996 +-       generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
274.2997 ++       generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
274.2998 +        *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
274.2999 + echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
274.3000 +    { (exit 1); exit 1; }; } ;;
274.3001 +@@ -5697,6 +5702,9 @@
274.3002 +   # Default to "generic".
274.3003 +   if test $enable_clocale_flag = auto; then
274.3004 +     case ${target_os} in
274.3005 ++      linux-uclibc*)
274.3006 ++	enable_clocale_flag=uclibc
274.3007 ++	;;
274.3008 +       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
274.3009 +         cat >conftest.$ac_ext <<_ACEOF
274.3010 + /* confdefs.h.  */
274.3011 +@@ -5927,6 +5935,76 @@
274.3012 +       CTIME_CC=config/locale/generic/time_members.cc
274.3013 +       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
274.3014 +       ;;
274.3015 ++    uclibc)
274.3016 ++      echo "$as_me:$LINENO: result: uclibc" >&5
274.3017 ++echo "${ECHO_T}uclibc" >&6
274.3018 ++
274.3019 ++      # Declare intention to use gettext, and add support for specific
274.3020 ++      # languages.
274.3021 ++      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
274.3022 ++      ALL_LINGUAS="de fr"
274.3023 ++
274.3024 ++      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
274.3025 ++      # Extract the first word of "msgfmt", so it can be a program name with args.
274.3026 ++set dummy msgfmt; ac_word=$2
274.3027 ++echo "$as_me:$LINENO: checking for $ac_word" >&5
274.3028 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
274.3029 ++if test "${ac_cv_prog_check_msgfmt+set}" = set; then
274.3030 ++  echo $ECHO_N "(cached) $ECHO_C" >&6
274.3031 ++else
274.3032 ++  if test -n "$check_msgfmt"; then
274.3033 ++  ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
274.3034 ++else
274.3035 ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
274.3036 ++for as_dir in $PATH
274.3037 ++do
274.3038 ++  IFS=$as_save_IFS
274.3039 ++  test -z "$as_dir" && as_dir=.
274.3040 ++  for ac_exec_ext in '' $ac_executable_extensions; do
274.3041 ++  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
274.3042 ++    ac_cv_prog_check_msgfmt="yes"
274.3043 ++    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
274.3044 ++    break 2
274.3045 ++  fi
274.3046 ++done
274.3047 ++done
274.3048 ++
274.3049 ++  test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
274.3050 ++fi
274.3051 ++fi
274.3052 ++check_msgfmt=$ac_cv_prog_check_msgfmt
274.3053 ++if test -n "$check_msgfmt"; then
274.3054 ++  echo "$as_me:$LINENO: result: $check_msgfmt" >&5
274.3055 ++echo "${ECHO_T}$check_msgfmt" >&6
274.3056 ++else
274.3057 ++  echo "$as_me:$LINENO: result: no" >&5
274.3058 ++echo "${ECHO_T}no" >&6
274.3059 ++fi
274.3060 ++
274.3061 ++      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
274.3062 ++        USE_NLS=yes
274.3063 ++      fi
274.3064 ++      # Export the build objects.
274.3065 ++      for ling in $ALL_LINGUAS; do \
274.3066 ++        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
274.3067 ++        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
274.3068 ++      done
274.3069 ++
274.3070 ++
274.3071 ++
274.3072 ++      CLOCALE_H=config/locale/uclibc/c_locale.h
274.3073 ++      CLOCALE_CC=config/locale/uclibc/c_locale.cc
274.3074 ++      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
274.3075 ++      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
274.3076 ++      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
274.3077 ++      CMESSAGES_H=config/locale/uclibc/messages_members.h
274.3078 ++      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
274.3079 ++      CMONEY_CC=config/locale/uclibc/monetary_members.cc
274.3080 ++      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
274.3081 ++      CTIME_H=config/locale/uclibc/time_members.h
274.3082 ++      CTIME_CC=config/locale/uclibc/time_members.cc
274.3083 ++      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
274.3084 ++      ;;
274.3085 +   esac
274.3086 + 
274.3087 +   # This is where the testsuite looks for locale catalogs, using the
274.3088 +diff -urN gcc-4.0.0-100/libstdc++-v3/configure.host gcc-4.0.0/libstdc++-v3/configure.host
274.3089 +--- gcc-4.0.0-100/libstdc++-v3/configure.host	2005-04-30 13:06:53.688054472 -0500
274.3090 ++++ gcc-4.0.0/libstdc++-v3/configure.host	2005-04-28 20:20:32.000000000 -0500
274.3091 +@@ -249,6 +249,12 @@
274.3092 +     ;;
274.3093 + esac
274.3094 + 
274.3095 ++# Override for uClibc since linux-uclibc gets mishandled above.
274.3096 ++case "${host_os}" in
274.3097 ++  *-uclibc*)
274.3098 ++    os_include_dir="os/uclibc"
274.3099 ++    ;;
274.3100 ++esac
274.3101 + 
274.3102 + # Set any OS-dependent and CPU-dependent bits.
274.3103 + # THIS TABLE IS SORTED.  KEEP IT THAT WAY.
274.3104 +diff -urN gcc-4.0.0-100/libstdc++-v3/crossconfig.m4 gcc-4.0.0/libstdc++-v3/crossconfig.m4
274.3105 +--- gcc-4.0.0-100/libstdc++-v3/crossconfig.m4	2005-04-30 13:06:53.689054320 -0500
274.3106 ++++ gcc-4.0.0/libstdc++-v3/crossconfig.m4	2005-04-28 20:27:15.000000000 -0500
274.3107 +@@ -142,6 +142,98 @@
274.3108 + 	;;
274.3109 +     esac
274.3110 +     ;;
274.3111 ++  *-uclibc*)
274.3112 ++# Temporary hack until we implement the float versions of the libm funcs
274.3113 ++    AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
274.3114 ++      machine/endian.h machine/param.h sys/machine.h sys/types.h \
274.3115 ++      fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
274.3116 ++    SECTION_FLAGS='-ffunction-sections -fdata-sections'
274.3117 ++    AC_SUBST(SECTION_FLAGS)
274.3118 ++    GLIBCXX_CHECK_LINKER_FEATURES
274.3119 ++    GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
274.3120 ++    GLIBCXX_CHECK_WCHAR_T_SUPPORT
274.3121 ++
274.3122 ++    # For LFS.
274.3123 ++    AC_DEFINE(HAVE_INT64_T)
274.3124 ++    case "$target" in
274.3125 ++      *-uclinux*)
274.3126 ++        # Don't enable LFS with uClinux
274.3127 ++        ;;
274.3128 ++      *)
274.3129 ++        AC_DEFINE(_GLIBCXX_USE_LFS)
274.3130 ++    esac
274.3131 ++
274.3132 ++    # For showmanyc_helper().
274.3133 ++    AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
274.3134 ++    GLIBCXX_CHECK_POLL
274.3135 ++    GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
274.3136 ++
274.3137 ++    # For xsputn_2().
274.3138 ++    AC_CHECK_HEADERS(sys/uio.h)
274.3139 ++    GLIBCXX_CHECK_WRITEV
274.3140 ++
274.3141 ++#     AC_DEFINE(HAVE_ACOSF)
274.3142 ++#     AC_DEFINE(HAVE_ASINF)
274.3143 ++#     AC_DEFINE(HAVE_ATANF)
274.3144 ++#     AC_DEFINE(HAVE_ATAN2F)
274.3145 ++    AC_DEFINE(HAVE_CEILF)
274.3146 ++    AC_DEFINE(HAVE_COPYSIGN)
274.3147 ++#     AC_DEFINE(HAVE_COPYSIGNF)
274.3148 ++#     AC_DEFINE(HAVE_COSF)
274.3149 ++#     AC_DEFINE(HAVE_COSHF)
274.3150 ++#     AC_DEFINE(HAVE_EXPF)
274.3151 ++#     AC_DEFINE(HAVE_FABSF)
274.3152 ++    AC_DEFINE(HAVE_FINITE)
274.3153 ++    AC_DEFINE(HAVE_FINITEF)
274.3154 ++    AC_DEFINE(HAVE_FLOORF)
274.3155 ++#     AC_DEFINE(HAVE_FMODF)
274.3156 ++#     AC_DEFINE(HAVE_FREXPF)
274.3157 ++    AC_DEFINE(HAVE_HYPOT)
274.3158 ++#     AC_DEFINE(HAVE_HYPOTF)
274.3159 ++    AC_DEFINE(HAVE_ISINF)
274.3160 ++    AC_DEFINE(HAVE_ISINFF)
274.3161 ++    AC_DEFINE(HAVE_ISNAN)
274.3162 ++    AC_DEFINE(HAVE_ISNANF)
274.3163 ++#     AC_DEFINE(HAVE_LOGF)
274.3164 ++#     AC_DEFINE(HAVE_LOG10F)
274.3165 ++#     AC_DEFINE(HAVE_MODFF)
274.3166 ++#     AC_DEFINE(HAVE_SINF)
274.3167 ++#     AC_DEFINE(HAVE_SINHF)
274.3168 ++#     AC_DEFINE(HAVE_SINCOS)
274.3169 ++#     AC_DEFINE(HAVE_SINCOSF)
274.3170 ++    AC_DEFINE(HAVE_SQRTF)
274.3171 ++#     AC_DEFINE(HAVE_TANF)
274.3172 ++#     AC_DEFINE(HAVE_TANHF)
274.3173 ++    if test x"long_double_math_on_this_cpu" = x"yes"; then
274.3174 ++#       AC_DEFINE(HAVE_ACOSL)
274.3175 ++#       AC_DEFINE(HAVE_ASINL)
274.3176 ++#       AC_DEFINE(HAVE_ATANL)
274.3177 ++#       AC_DEFINE(HAVE_ATAN2L)
274.3178 ++#       AC_DEFINE(HAVE_CEILL)
274.3179 ++#       AC_DEFINE(HAVE_COPYSIGNL)
274.3180 ++#       AC_DEFINE(HAVE_COSL)
274.3181 ++#       AC_DEFINE(HAVE_COSHL)
274.3182 ++#       AC_DEFINE(HAVE_EXPL)
274.3183 ++#       AC_DEFINE(HAVE_FABSL)
274.3184 ++#       AC_DEFINE(HAVE_FINITEL)
274.3185 ++#       AC_DEFINE(HAVE_FLOORL)
274.3186 ++#       AC_DEFINE(HAVE_FMODL)
274.3187 ++#       AC_DEFINE(HAVE_FREXPL)
274.3188 ++#       AC_DEFINE(HAVE_HYPOTL)
274.3189 ++#       AC_DEFINE(HAVE_ISINFL)
274.3190 ++#       AC_DEFINE(HAVE_ISNANL)
274.3191 ++#       AC_DEFINE(HAVE_LOGL)
274.3192 ++#       AC_DEFINE(HAVE_LOG10L)
274.3193 ++#       AC_DEFINE(HAVE_MODFL)
274.3194 ++#       AC_DEFINE(HAVE_POWL)
274.3195 ++#       AC_DEFINE(HAVE_SINL)
274.3196 ++#       AC_DEFINE(HAVE_SINHL)
274.3197 ++#       AC_DEFINE(HAVE_SINCOSL)
274.3198 ++#       AC_DEFINE(HAVE_SQRTL)
274.3199 ++#       AC_DEFINE(HAVE_TANL)
274.3200 ++#       AC_DEFINE(HAVE_TANHL)
274.3201 ++    fi
274.3202 ++    ;;
274.3203 +   *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
274.3204 +     AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
274.3205 +       machine/endian.h machine/param.h sys/machine.h sys/types.h \
274.3206 +@@ -156,7 +248,7 @@
274.3207 +     AC_DEFINE(HAVE_INT64_T)
274.3208 +     case "$target" in
274.3209 +       *-uclinux*)
274.3210 +-        # Don't enable LFS with uClibc
274.3211 ++        # Don't enable LFS with uClinux
274.3212 +         ;;
274.3213 +       *)
274.3214 +         AC_DEFINE(_GLIBCXX_USE_LFS)
274.3215 +diff -urN gcc-4.0.0-100/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.0.0/libstdc++-v3/include/c_compatibility/wchar.h
274.3216 +--- gcc-4.0.0-100/libstdc++-v3/include/c_compatibility/wchar.h	2005-04-30 13:06:53.690054168 -0500
274.3217 ++++ gcc-4.0.0/libstdc++-v3/include/c_compatibility/wchar.h	2005-04-28 20:15:56.000000000 -0500
274.3218 +@@ -101,7 +101,9 @@
274.3219 + using std::wmemcpy;
274.3220 + using std::wmemmove;
274.3221 + using std::wmemset;
274.3222 ++#if _GLIBCXX_HAVE_WCSFTIME
274.3223 + using std::wcsftime;
274.3224 ++#endif
274.3225 + 
274.3226 + #if _GLIBCXX_USE_C99
274.3227 + using std::wcstold;
274.3228 +diff -urN gcc-4.0.0-100/libstdc++-v3/include/c_std/std_cwchar.h gcc-4.0.0/libstdc++-v3/include/c_std/std_cwchar.h
274.3229 +--- gcc-4.0.0-100/libstdc++-v3/include/c_std/std_cwchar.h	2005-04-30 13:06:53.691054016 -0500
274.3230 ++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cwchar.h	2005-04-28 20:15:56.000000000 -0500
274.3231 +@@ -179,7 +179,9 @@
274.3232 +   using ::wcscoll;
274.3233 +   using ::wcscpy;
274.3234 +   using ::wcscspn;
274.3235 ++#if _GLIBCXX_HAVE_WCSFTIME
274.3236 +   using ::wcsftime;
274.3237 ++#endif
274.3238 +   using ::wcslen;
274.3239 +   using ::wcsncat;
274.3240 +   using ::wcsncmp;
   275.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   275.2 +++ b/patches/gcc/4.0.3/300-libstdc++-pic.patch	Sat Feb 24 11:00:05 2007 +0000
   275.3 @@ -0,0 +1,45 @@
   275.4 +--- gcc-4.0.0/libstdc++-v3/src/Makefile.am
   275.5 ++++ gcc-4.0.0/libstdc++-v3/src/Makefile.am
   275.6 +@@ -214,6 +214,10 @@
   275.7 + 	  $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
   275.8 + 
   275.9 + 
  275.10 ++install-exec-local:
  275.11 ++	$(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
  275.12 ++	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
  275.13 ++
  275.14 + # Added bits to build debug library.
  275.15 + if GLIBCXX_BUILD_DEBUG
  275.16 + all-local: build_debug
  275.17 +--- gcc-4.0.0/libstdc++-v3/src/Makefile.in
  275.18 ++++ gcc-4.0.0/libstdc++-v3/src/Makefile.in
  275.19 +@@ -625,7 +625,7 @@
  275.20 + 
  275.21 + install-data-am: install-data-local
  275.22 + 
  275.23 +-install-exec-am: install-toolexeclibLTLIBRARIES
  275.24 ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
  275.25 + 
  275.26 + install-info: install-info-am
  275.27 + 
  275.28 +@@ -664,7 +664,7 @@
  275.29 + 	maintainer-clean-generic mostlyclean mostlyclean-compile \
  275.30 + 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
  275.31 + 	tags uninstall uninstall-am uninstall-info-am \
  275.32 +-	uninstall-toolexeclibLTLIBRARIES
  275.33 ++	uninstall-toolexeclibLTLIBRARIES install-exec-local
  275.34 + 
  275.35 + @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver:  ${glibcxx_srcdir}/$(SYMVER_MAP)
  275.36 + @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@	cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
  275.37 +@@ -743,6 +743,11 @@
  275.38 + install_debug:
  275.39 + 	(cd ${debugdir} && $(MAKE) \
  275.40 + 	toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
  275.41 ++
  275.42 ++install-exec-local:
  275.43 ++	$(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
  275.44 ++	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
  275.45 ++
  275.46 + # Tell versions [3.59,3.63) of GNU make to not export all variables.
  275.47 + # Otherwise a system limit (for SysV at least) may be exceeded.
  275.48 + .NOEXPORT:
   276.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   276.2 +++ b/patches/gcc/4.0.3/301-missing-execinfo_h.patch	Sat Feb 24 11:00:05 2007 +0000
   276.3 @@ -0,0 +1,11 @@
   276.4 +--- gcc-4.0.0/boehm-gc/include/gc.h-orig	2005-04-28 22:28:57.000000000 -0500
   276.5 ++++ gcc-4.0.0/boehm-gc/include/gc.h	2005-04-28 22:30:38.000000000 -0500
   276.6 +@@ -500,7 +500,7 @@
   276.7 + #ifdef __linux__
   276.8 + # include <features.h>
   276.9 + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
  276.10 +-     && !defined(__ia64__)
  276.11 ++     && !defined(__ia64__) && !defined(__UCLIBC__)
  276.12 + #   ifndef GC_HAVE_BUILTIN_BACKTRACE
  276.13 + #     define GC_HAVE_BUILTIN_BACKTRACE
  276.14 + #   endif
   277.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   277.2 +++ b/patches/gcc/4.0.3/302-c99-snprintf.patch	Sat Feb 24 11:00:05 2007 +0000
   277.3 @@ -0,0 +1,11 @@
   277.4 +--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig	2005-04-29 00:08:41.000000000 -0500
   277.5 ++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h	2005-04-29 00:08:45.000000000 -0500
   277.6 +@@ -142,7 +142,7 @@
   277.7 +   using ::vsprintf;
   277.8 + }
   277.9 + 
  277.10 +-#if _GLIBCXX_USE_C99
  277.11 ++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
  277.12 + 
  277.13 + #undef snprintf
  277.14 + #undef vfscanf
   278.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   278.2 +++ b/patches/gcc/4.0.3/303-c99-complex-ugly-hack.patch	Sat Feb 24 11:00:05 2007 +0000
   278.3 @@ -0,0 +1,12 @@
   278.4 +--- gcc-4.0.0/libstdc++-v3/configure-old	2005-04-30 22:04:48.061603912 -0500
   278.5 ++++ gcc-4.0.0/libstdc++-v3/configure	2005-04-30 22:06:13.678588152 -0500
   278.6 +@@ -7194,6 +7194,9 @@
   278.7 + cat >>conftest.$ac_ext <<_ACEOF
   278.8 + /* end confdefs.h.  */
   278.9 + #include <complex.h>
  278.10 ++#ifdef __UCLIBC__
  278.11 ++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
  278.12 ++#endif
  278.13 + int
  278.14 + main ()
  278.15 + {
   279.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   279.2 +++ b/patches/gcc/4.0.3/304-index_macro.patch	Sat Feb 24 11:00:05 2007 +0000
   279.3 @@ -0,0 +1,24 @@
   279.4 +--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps	2006-03-24 01:49:51 +0100
   279.5 ++++ gcc-4.1.0/libstdc++-v3/include/ext/rope	2006-03-24 01:49:37 +0100
   279.6 +@@ -59,6 +59,9 @@
   279.7 + #include <bits/allocator.h>
   279.8 + #include <ext/hash_fun.h>
   279.9 + 
  279.10 ++/* cope w/ index defined as macro, SuSv3 proposal */
  279.11 ++#undef index
  279.12 ++
  279.13 + # ifdef __GC
  279.14 + #   define __GC_CONST const
  279.15 + # else
  279.16 +--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps	2006-03-24 01:50:04 +0100
  279.17 ++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h	2006-03-24 01:50:28 +0100
  279.18 +@@ -53,6 +53,9 @@
  279.19 + #include <ext/memory> // For uninitialized_copy_n
  279.20 + #include <ext/numeric> // For power
  279.21 + 
  279.22 ++/* cope w/ index defined as macro, SuSv3 proposal */
  279.23 ++#undef index
  279.24 ++
  279.25 + namespace __gnu_cxx
  279.26 + {
  279.27 +   using std::size_t;
   280.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   280.2 +++ b/patches/gcc/4.0.3/602-sdk-libstdc++-includes.patch	Sat Feb 24 11:00:05 2007 +0000
   280.3 @@ -0,0 +1,22 @@
   280.4 +diff -urN gcc-4.0.0-100/libstdc++-v3/fragment.am gcc-4.0.0/libstdc++-v3/fragment.am
   280.5 +--- gcc-4.0.0-100/libstdc++-v3/fragment.am	2004-10-25 15:32:40.000000000 -0500
   280.6 ++++ gcc-4.0.0/libstdc++-v3/fragment.am	2005-04-28 21:48:43.000000000 -0500
   280.7 +@@ -18,5 +18,5 @@
   280.8 + 	$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
   280.9 + 
  280.10 + # -I/-D flags to pass when compiling.
  280.11 +-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
  280.12 ++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
  280.13 + 
  280.14 +diff -urN gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am gcc-4.0.0/libstdc++-v3/libmath/Makefile.am
  280.15 +--- gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am	2003-08-27 16:29:42.000000000 -0500
  280.16 ++++ gcc-4.0.0/libstdc++-v3/libmath/Makefile.am	2005-04-28 21:48:43.000000000 -0500
  280.17 +@@ -32,7 +32,7 @@
  280.18 + 
  280.19 + libmath_la_SOURCES = stubs.c
  280.20 + 
  280.21 +-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
  280.22 ++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
  280.23 + 
  280.24 + # Only compiling "C" sources in this directory.
  280.25 + LIBTOOL = @LIBTOOL@ --tag CC
   281.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   281.2 +++ b/patches/gcc/4.0.3/800-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   281.3 @@ -0,0 +1,67 @@
   281.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
   281.5 +Adds support for arm*b-linux* big-endian ARM targets
   281.6 +
   281.7 +See http://gcc.gnu.org/PR16350
   281.8 +
   281.9 +--- gcc-4.0.3/gcc/config/arm/linux-elf.h
  281.10 ++++ gcc-4.0.3/gcc/config/arm/linux-elf.h
  281.11 +@@ -31,19 +31,33 @@
  281.12 + /* Do not assume anything about header files.  */
  281.13 + #define NO_IMPLICIT_EXTERN_C
  281.14 + 
  281.15 ++/*
  281.16 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  281.17 ++ * (big endian) configurations.
  281.18 ++ */
  281.19 ++#if TARGET_BIG_ENDIAN_DEFAULT
  281.20 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
  281.21 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  281.22 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  281.23 ++#else
  281.24 ++#define TARGET_ENDIAN_DEFAULT 0
  281.25 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  281.26 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  281.27 ++#endif
  281.28 ++
  281.29 + #undef  TARGET_DEFAULT_FLOAT_ABI
  281.30 + #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
  281.31 + 
  281.32 + #undef  TARGET_DEFAULT
  281.33 +-#define TARGET_DEFAULT (0)
  281.34 ++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
  281.35 + 
  281.36 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  281.37 + 
  281.38 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  281.39 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  281.40 + 
  281.41 + #undef  MULTILIB_DEFAULTS
  281.42 + #define MULTILIB_DEFAULTS \
  281.43 +-	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
  281.44 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
  281.45 + 
  281.46 + /* The GNU C++ standard library requires that these macros be defined.  */
  281.47 + #undef CPLUSPLUS_CPP_SPEC
  281.48 +@@ -90,7 +104,7 @@
  281.49 +    %{rdynamic:-export-dynamic} \
  281.50 +    %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  281.51 +    -X \
  281.52 +-   %{mbig-endian:-EB}" \
  281.53 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  281.54 +    SUBTARGET_EXTRA_LINK_SPEC
  281.55 + 
  281.56 + #define TARGET_OS_CPP_BUILTINS()		\
  281.57 +--- gcc-4.0.3/gcc/config.gcc
  281.58 ++++ gcc-4.0.3/gcc/config.gcc
  281.59 +@@ -672,6 +672,11 @@
  281.60 + 	;;
  281.61 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  281.62 + 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h  arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
  281.63 ++	case $target in
  281.64 ++	arm*b-*)
  281.65 ++		tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
  281.66 ++		;;
  281.67 ++	esac
  281.68 + 	tmake_file="${tmake_file} arm/t-arm arm/t-linux"
  281.69 + 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  281.70 + 	gnu_ld=yes
   282.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   282.2 +++ b/patches/gcc/4.0.4/100-uclibc-conf.patch	Sat Feb 24 11:00:05 2007 +0000
   282.3 @@ -0,0 +1,553 @@
   282.4 +--- gcc-4.0.2/gcc/config/t-linux-uclibc
   282.5 ++++ gcc-4.0.2/gcc/config/t-linux-uclibc
   282.6 +@@ -0,0 +1,5 @@
   282.7 ++# Remove glibc specific files added in t-linux
   282.8 ++SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
   282.9 ++
  282.10 ++# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
  282.11 ++LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
  282.12 +--- gcc-4.0.2/gcc/config.gcc
  282.13 ++++ gcc-4.0.2/gcc/config.gcc
  282.14 +@@ -1778,7 +1778,7 @@
  282.15 + 	;;
  282.16 + sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
  282.17 + sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
  282.18 +-  sh-*-linux* | sh[346lbe]*-*-linux* | \
  282.19 ++  sh*-*-linux* | sh[346lbe]*-*-linux* | \
  282.20 +   sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
  282.21 +    sh64-*-netbsd* | sh64l*-*-netbsd*)
  282.22 + 	tmake_file="${tmake_file} sh/t-sh sh/t-elf"
  282.23 +@@ -2234,10 +2234,16 @@
  282.24 + *)
  282.25 + 	echo "*** Configuration ${target} not supported" 1>&2
  282.26 + 	exit 1
  282.27 + 	;;
  282.28 + esac
  282.29 ++
  282.30 ++# Rather than hook into each target, just do it after all the linux
  282.31 ++# targets have been processed
  282.32 ++case ${target} in
  282.33 ++*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
  282.34 ++esac
  282.35 + 
  282.36 + case ${target} in
  282.37 + i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
  282.38 + 	tmake_file="${tmake_file} i386/t-gmm_malloc"
  282.39 + 	;;
  282.40 +--- gcc-4.0.2/gcc/config/alpha/linux-elf.h
  282.41 ++++ gcc-4.0.2/gcc/config/alpha/linux-elf.h
  282.42 +@@ -27,7 +27,11 @@
  282.43 + #define SUBTARGET_EXTRA_SPECS \
  282.44 + { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
  282.45 + 
  282.46 ++#ifdef USE_UCLIBC
  282.47 ++#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
  282.48 ++#else
  282.49 + #define ELF_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
  282.50 ++#endif
  282.51 + 
  282.52 + #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax}		\
  282.53 +   %{O*:-O3} %{!O*:-O1}						\
  282.54 +--- gcc-4.0.2/gcc/config/arm/linux-elf.h
  282.55 ++++ gcc-4.0.2/gcc/config/arm/linux-elf.h
  282.56 +@@ -81,14 +81,19 @@
  282.57 + #define ENDFILE_SPEC \
  282.58 +   "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
  282.59 + 
  282.60 ++#ifdef USE_UCLIBC
  282.61 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
  282.62 ++#else
  282.63 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
  282.64 ++#endif
  282.65 + #undef  LINK_SPEC
  282.66 + #define LINK_SPEC "%{h*} %{version:-v} \
  282.67 +    %{b} %{Wl,*:%*} \
  282.68 +    %{static:-Bstatic} \
  282.69 +    %{shared:-shared} \
  282.70 +    %{symbolic:-Bsymbolic} \
  282.71 +    %{rdynamic:-export-dynamic} \
  282.72 +-   %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  282.73 ++   %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
  282.74 +    -X \
  282.75 +    %{mbig-endian:-EB}" \
  282.76 +    SUBTARGET_EXTRA_LINK_SPEC
  282.77 +--- gcc-4.0.2/gcc/config/cris/linux.h
  282.78 ++++ gcc-4.0.2/gcc/config/cris/linux.h
  282.79 +@@ -79,6 +79,25 @@
  282.80 + #undef CRIS_DEFAULT_CPU_VERSION
  282.81 + #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
  282.82 + 
  282.83 ++#ifdef USE_UCLIBC
  282.84 ++
  282.85 ++#undef CRIS_SUBTARGET_VERSION
  282.86 ++#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
  282.87 ++
  282.88 ++#undef CRIS_LINK_SUBTARGET_SPEC
  282.89 ++#define CRIS_LINK_SUBTARGET_SPEC \
  282.90 ++ "-mcrislinux\
  282.91 ++  -rpath-link include/asm/../..%s\
  282.92 ++  %{shared} %{static}\
  282.93 ++  %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
  282.94 ++  %{!shared: \
  282.95 ++    %{!static: \
  282.96 ++      %{rdynamic:-export-dynamic} \
  282.97 ++      %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
  282.98 ++  %{!r:%{O2|O3: --gc-sections}}"
  282.99 ++
 282.100 ++#else  /* USE_UCLIBC */
 282.101 ++
 282.102 + #undef CRIS_SUBTARGET_VERSION
 282.103 + #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
 282.104 + 
 282.105 +@@ -93,6 +112,8 @@
 282.106 +   %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
 282.107 +   %{!r:%{O2|O3: --gc-sections}}"
 282.108 + 
 282.109 ++#endif  /* USE_UCLIBC */
 282.110 ++
 282.111 + 
 282.112 + /* Node: Run-time Target */
 282.113 + 
 282.114 +--- gcc-4.0.2/gcc/config/i386/linux.h
 282.115 ++++ gcc-4.0.2/gcc/config/i386/linux.h
 282.116 +@@ -107,6 +107,11 @@
 282.117 + #define LINK_EMULATION "elf_i386"
 282.118 + #define DYNAMIC_LINKER "/lib/ld-linux.so.2"
 282.119 + 
 282.120 ++#ifdef USE_UCLIBC
 282.121 ++#undef DYNAMIC_LINKER
 282.122 ++#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 282.123 ++#endif
 282.124 ++
 282.125 + #undef  SUBTARGET_EXTRA_SPECS
 282.126 + #define SUBTARGET_EXTRA_SPECS \
 282.127 +   { "link_emulation", LINK_EMULATION },\
 282.128 +--- gcc-4.0.2/gcc/config/i386/linux64.h
 282.129 ++++ gcc-4.0.2/gcc/config/i386/linux64.h
 282.130 +@@ -54,14 +54,21 @@
 282.131 +    When the -shared link option is used a final link is not being
 282.132 +    done.  */
 282.133 + 
 282.134 ++#ifdef USE_UCLIBC
 282.135 ++#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 282.136 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
 282.137 ++#else
 282.138 ++#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 282.139 ++#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
 282.140 ++#endif
 282.141 + #undef	LINK_SPEC
 282.142 + #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
 282.143 +   %{shared:-shared} \
 282.144 +   %{!shared: \
 282.145 +     %{!static: \
 282.146 +       %{rdynamic:-export-dynamic} \
 282.147 +-      %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 282.148 +-      %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
 282.149 ++      %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
 282.150 ++      %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
 282.151 +     %{static:-static}}"
 282.152 + 
 282.153 + #define MULTILIB_DEFAULTS { "m64" }
 282.154 +--- gcc-4.0.2/gcc/config/ia64/linux.h
 282.155 ++++ gcc-4.0.2/gcc/config/ia64/linux.h
 282.156 +@@ -37,13 +37,18 @@
 282.157 + /* Define this for shared library support because it isn't in the main
 282.158 +    linux.h file.  */
 282.159 + 
 282.160 ++#ifdef USE_UCLIBC
 282.161 ++#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
 282.162 ++#else
 282.163 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
 282.164 ++#endif
 282.165 + #undef LINK_SPEC
 282.166 + #define LINK_SPEC "\
 282.167 +   %{shared:-shared} \
 282.168 +   %{!shared: \
 282.169 +     %{!static: \
 282.170 +       %{rdynamic:-export-dynamic} \
 282.171 +-      %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
 282.172 ++      %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 282.173 +       %{static:-static}}"
 282.174 + 
 282.175 + 
 282.176 +--- gcc-4.0.2/gcc/config/m68k/linux.h
 282.177 ++++ gcc-4.0.2/gcc/config/m68k/linux.h
 282.178 +@@ -127,12 +127,17 @@
 282.179 + 
 282.180 + /* If ELF is the default format, we should not use /lib/elf.  */
 282.181 + 
 282.182 ++#ifdef USE_UCLIBC
 282.183 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 282.184 ++#else
 282.185 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
 282.186 ++#endif
 282.187 + #undef	LINK_SPEC
 282.188 + #define LINK_SPEC "-m m68kelf %{shared} \
 282.189 +   %{!shared: \
 282.190 +     %{!static: \
 282.191 +       %{rdynamic:-export-dynamic} \
 282.192 +-      %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
 282.193 ++      %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 282.194 +     %{static}}"
 282.195 + 
 282.196 + /* For compatibility with linux/a.out */
 282.197 +--- gcc-4.0.2/gcc/config/mips/linux.h
 282.198 ++++ gcc-4.0.2/gcc/config/mips/linux.h
 282.199 +@@ -108,14 +108,19 @@
 282.200 + 
 282.201 + /* Borrowed from sparc/linux.h */
 282.202 + #undef LINK_SPEC
 282.203 ++#ifdef USE_UCLIBC
 282.204 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 282.205 ++#else
 282.206 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
 282.207 ++#endif
 282.208 + #define LINK_SPEC \
 282.209 +  "%(endian_spec) \
 282.210 +   %{shared:-shared} \
 282.211 +   %{!shared: \
 282.212 +     %{!ibcs: \
 282.213 +       %{!static: \
 282.214 +         %{rdynamic:-export-dynamic} \
 282.215 +-        %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
 282.216 ++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 282.217 +         %{static:-static}}}"
 282.218 + 
 282.219 + #undef SUBTARGET_ASM_SPEC
 282.220 +--- gcc-4.0.2/gcc/config/pa/pa-linux.h
 282.221 ++++ gcc-4.0.2/gcc/config/pa/pa-linux.h
 282.222 +@@ -82,13 +82,18 @@
 282.223 + /* Define this for shared library support because it isn't in the main
 282.224 +    linux.h file.  */
 282.225 + 
 282.226 ++#ifdef USE_UCLIBC
 282.227 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 282.228 ++#else
 282.229 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
 282.230 ++#endif
 282.231 + #undef LINK_SPEC
 282.232 + #define LINK_SPEC "\
 282.233 +   %{shared:-shared} \
 282.234 +   %{!shared: \
 282.235 +     %{!static: \
 282.236 +       %{rdynamic:-export-dynamic} \
 282.237 +-      %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
 282.238 ++      %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 282.239 +       %{static:-static}}"
 282.240 + 
 282.241 + /* glibc's profiling functions don't need gcc to allocate counters.  */
 282.242 +--- gcc-4.0.2/gcc/config/rs6000/linux.h
 282.243 ++++ gcc-4.0.2/gcc/config/rs6000/linux.h
 282.244 +@@ -69,7 +69,11 @@
 282.245 + #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
 282.246 + 
 282.247 + #undef	LINK_OS_DEFAULT_SPEC
 282.248 ++#ifdef USE_UCLIBC
 282.249 ++#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
 282.250 ++#else
 282.251 + #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
 282.252 ++#endif
 282.253 + 
 282.254 + #define LINK_GCC_C_SEQUENCE_SPEC \
 282.255 +   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
 282.256 +--- gcc-4.0.2/gcc/config/rs6000/sysv4.h
 282.257 ++++ gcc-4.0.2/gcc/config/rs6000/sysv4.h
 282.258 +@@ -949,6 +949,7 @@
 282.259 +   mcall-linux  : %(link_os_linux)       ; \
 282.260 +   mcall-gnu    : %(link_os_gnu)         ; \
 282.261 +   mcall-netbsd : %(link_os_netbsd)      ; \
 282.262 ++  mcall-linux-uclibc : %(link_os_linux_uclibc); \
 282.263 +   mcall-openbsd: %(link_os_openbsd)     ; \
 282.264 +                : %(link_os_default)     }"
 282.265 + 
 282.266 +@@ -1127,6 +1128,10 @@
 282.267 +   %{rdynamic:-export-dynamic} \
 282.268 +   %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
 282.269 + 
 282.270 ++#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
 282.271 ++  %{rdynamic:-export-dynamic} \
 282.272 ++  %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
 282.273 ++
 282.274 + #if defined(HAVE_LD_EH_FRAME_HDR)
 282.275 + # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
 282.276 + #endif
 282.277 +@@ -1293,6 +1298,7 @@
 282.278 +   { "link_os_sim",		LINK_OS_SIM_SPEC },			\
 282.279 +   { "link_os_freebsd",		LINK_OS_FREEBSD_SPEC },			\
 282.280 +   { "link_os_linux",		LINK_OS_LINUX_SPEC },			\
 282.281 ++  { "link_os_linux_uclibc",	LINK_OS_LINUX_UCLIBC_SPEC },		\
 282.282 +   { "link_os_gnu",		LINK_OS_GNU_SPEC },			\
 282.283 +   { "link_os_netbsd",		LINK_OS_NETBSD_SPEC },			\
 282.284 +   { "link_os_openbsd",		LINK_OS_OPENBSD_SPEC },			\
 282.285 +--- gcc-4.0.2/gcc/config/s390/linux.h
 282.286 ++++ gcc-4.0.2/gcc/config/s390/linux.h
 282.287 +@@ -77,6 +77,13 @@
 282.288 + #define MULTILIB_DEFAULTS { "m31" }
 282.289 + #endif
 282.290 + 
 282.291 ++#ifdef USE_UCLIBC
 282.292 ++#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 282.293 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
 282.294 ++#else
 282.295 ++#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
 282.296 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
 282.297 ++#endif
 282.298 + #undef  LINK_SPEC
 282.299 + #define LINK_SPEC \
 282.300 +   "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
 282.301 +@@ -86,8 +93,8 @@
 282.302 +       %{!static: \
 282.303 + 	%{rdynamic:-export-dynamic} \
 282.304 + 	%{!dynamic-linker: \
 282.305 +-          %{m31:-dynamic-linker /lib/ld.so.1} \
 282.306 +-          %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
 282.307 ++          %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
 282.308 ++          %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
 282.309 + 
 282.310 + 
 282.311 + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 282.312 +--- gcc-4.0.2/gcc/config/sh/linux.h
 282.313 ++++ gcc-4.0.2/gcc/config/sh/linux.h
 282.314 +@@ -67,11 +67,16 @@
 282.315 + #undef SUBTARGET_LINK_EMUL_SUFFIX
 282.316 + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
 282.317 + #undef SUBTARGET_LINK_SPEC
 282.318 ++#ifdef USE_UCLIBC
 282.319 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 282.320 ++#else
 282.321 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 282.322 ++#endif
 282.323 + #define SUBTARGET_LINK_SPEC \
 282.324 +   "%{shared:-shared} \
 282.325 +    %{!static: \
 282.326 +      %{rdynamic:-export-dynamic} \
 282.327 +-     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 282.328 ++     %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 282.329 +    %{static:-static}"
 282.330 + 
 282.331 + #undef LIB_SPEC
 282.332 +--- gcc-4.0.2/gcc/config/sparc/linux.h
 282.333 ++++ gcc-4.0.2/gcc/config/sparc/linux.h
 282.334 +@@ -130,14 +130,19 @@
 282.335 + 
 282.336 + /* If ELF is the default format, we should not use /lib/elf.  */
 282.337 + 
 282.338 ++#ifdef USE_UCLIBC
 282.339 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 282.340 ++#else
 282.341 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 282.342 ++#endif
 282.343 + #undef  LINK_SPEC
 282.344 + #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
 282.345 +   %{!mno-relax:%{!r:-relax}} \
 282.346 +   %{!shared: \
 282.347 +     %{!ibcs: \
 282.348 +       %{!static: \
 282.349 +         %{rdynamic:-export-dynamic} \
 282.350 +-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 282.351 ++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 282.352 +         %{static:-static}}}"
 282.353 + 
 282.354 + /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
 282.355 +--- gcc-4.0.2/gcc/config/sparc/linux64.h
 282.356 ++++ gcc-4.0.2/gcc/config/sparc/linux64.h
 282.357 +@@ -167,12 +166,17 @@
 282.358 +   { "link_arch_default", LINK_ARCH_DEFAULT_SPEC },	  \
 282.359 +   { "link_arch",	 LINK_ARCH_SPEC },
 282.360 +     
 282.361 ++#ifdef USE_UCLIBC
 282.362 ++#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
 282.363 ++#else
 282.364 ++#define ELF_DYNAMIC_LINKER  "/lib/ld-linux.so.2"
 282.365 ++#endif
 282.366 + #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
 282.367 +   %{!shared: \
 282.368 +     %{!ibcs: \
 282.369 +       %{!static: \
 282.370 +         %{rdynamic:-export-dynamic} \
 282.371 +-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 282.372 ++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 282.373 +         %{static:-static}}} \
 282.374 + "
 282.375 + 
 282.376 +--- gcc-4.0.2/libtool.m4
 282.377 ++++ gcc-4.0.2/libtool.m4
 282.378 +@@ -682,6 +682,11 @@
 282.379 +   lt_cv_deplibs_check_method=pass_all
 282.380 +   ;;
 282.381 + 
 282.382 ++linux-uclibc*)
 282.383 ++  lt_cv_deplibs_check_method=pass_all
 282.384 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 282.385 ++  ;;
 282.386 ++
 282.387 + netbsd* | knetbsd*-gnu)
 282.388 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 282.389 +     [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
 282.390 +--- gcc-4.0.2/ltconfig
 282.391 ++++ gcc-4.0.2/ltconfig
 282.392 +@@ -603,6 +603,7 @@
 282.393 + 
 282.394 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
 282.395 + case $host_os in
 282.396 ++linux-uclibc*) ;;
 282.397 + linux-gnu*) ;;
 282.398 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
 282.399 + esac
 282.400 +@@ -1274,6 +1275,23 @@
 282.401 +   dynamic_linker='GNU/Linux ld.so'
 282.402 +   ;;
 282.403 + 
 282.404 ++linux-uclibc*)
 282.405 ++  version_type=linux
 282.406 ++  need_lib_prefix=no
 282.407 ++  need_version=no
 282.408 ++  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 282.409 ++  soname_spec='${libname}${release}.so$major'
 282.410 ++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 282.411 ++  shlibpath_var=LD_LIBRARY_PATH
 282.412 ++  shlibpath_overrides_runpath=no
 282.413 ++  # This implies no fast_install, which is unacceptable.
 282.414 ++  # Some rework will be needed to allow for fast_install
 282.415 ++  # before this can be enabled.
 282.416 ++  hardcode_into_libs=yes
 282.417 ++  # Assume using the uClibc dynamic linker.
 282.418 ++  dynamic_linker="uClibc ld.so"
 282.419 ++  ;;
 282.420 ++
 282.421 + netbsd*)
 282.422 +   need_lib_prefix=no
 282.423 +   need_version=no
 282.424 +--- gcc-4.0.2/libffi/configure
 282.425 ++++ gcc-4.0.2/libffi/configure
 282.426 +@@ -3457,6 +3457,11 @@
 282.427 +   lt_cv_deplibs_check_method=pass_all
 282.428 +   ;;
 282.429 + 
 282.430 ++linux-uclibc*)
 282.431 ++  lt_cv_deplibs_check_method=pass_all
 282.432 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 282.433 ++  ;;
 282.434 ++
 282.435 + netbsd* | knetbsd*-gnu)
 282.436 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 282.437 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 282.438 +--- gcc-4.0.2/libgfortran/configure
 282.439 ++++ gcc-4.0.2/libgfortran/configure
 282.440 +@@ -3681,6 +3681,11 @@
 282.441 +   lt_cv_deplibs_check_method=pass_all
 282.442 +   ;;
 282.443 + 
 282.444 ++linux-uclibc*)
 282.445 ++  lt_cv_deplibs_check_method=pass_all
 282.446 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 282.447 ++  ;;
 282.448 ++
 282.449 + netbsd* | knetbsd*-gnu)
 282.450 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 282.451 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 282.452 +--- gcc-4.0.2/libjava/configure
 282.453 ++++ gcc-4.0.2/libjava/configure
 282.454 +@@ -4351,6 +4351,11 @@
 282.455 +   lt_cv_deplibs_check_method=pass_all
 282.456 +   ;;
 282.457 + 
 282.458 ++linux-uclibc*)
 282.459 ++  lt_cv_deplibs_check_method=pass_all
 282.460 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 282.461 ++  ;;
 282.462 ++
 282.463 + netbsd* | knetbsd*-gnu)
 282.464 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 282.465 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 282.466 +--- gcc-4.0.2/libmudflap/configure
 282.467 ++++ gcc-4.0.2/libmudflap/configure
 282.468 +@@ -5380,6 +5380,11 @@
 282.469 +   lt_cv_deplibs_check_method=pass_all
 282.470 +   ;;
 282.471 + 
 282.472 ++linux-uclibc*)
 282.473 ++  lt_cv_deplibs_check_method=pass_all
 282.474 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 282.475 ++  ;;
 282.476 ++
 282.477 + netbsd* | knetbsd*-gnu)
 282.478 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 282.479 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 282.480 +--- gcc-4.0.2/libobjc/configure
 282.481 ++++ gcc-4.0.2/libobjc/configure
 282.482 +@@ -3283,6 +3283,11 @@
 282.483 +   lt_cv_deplibs_check_method=pass_all
 282.484 +   ;;
 282.485 + 
 282.486 ++linux-uclibc*)
 282.487 ++  lt_cv_deplibs_check_method=pass_all
 282.488 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 282.489 ++  ;;
 282.490 ++
 282.491 + netbsd* | knetbsd*-gnu)
 282.492 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 282.493 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 282.494 +--- gcc-4.0.2/boehm-gc/configure
 282.495 ++++ gcc-4.0.2/boehm-gc/configure
 282.496 +@@ -4320,6 +4320,11 @@
 282.497 +   lt_cv_deplibs_check_method=pass_all
 282.498 +   ;;
 282.499 + 
 282.500 ++linux-uclibc*)
 282.501 ++  lt_cv_deplibs_check_method=pass_all
 282.502 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 282.503 ++  ;;
 282.504 ++
 282.505 + netbsd* | knetbsd*-gnu)
 282.506 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 282.507 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 282.508 +--- gcc-4.0.2/configure
 282.509 ++++ gcc-4.0.2/configure
 282.510 +@@ -1141,7 +1141,7 @@
 282.511 +     ;;
 282.512 + "")
 282.513 +     case "${target}" in
 282.514 +-    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
 282.515 ++    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
 282.516 +         # Enable libmudflap by default in GNU and friends.
 282.517 + 	;;
 282.518 +     *-*-freebsd*)
 282.519 +--- gcc-4.0.2/configure.in
 282.520 ++++ gcc-4.0.2/configure.in
 282.521 +@@ -350,7 +350,7 @@
 282.522 +     ;;
 282.523 + "")
 282.524 +     case "${target}" in
 282.525 +-    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
 282.526 ++    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
 282.527 +         # Enable libmudflap by default in GNU and friends.
 282.528 + 	;;
 282.529 +     *-*-freebsd*)
 282.530 +--- gcc-4.0.2/contrib/regression/objs-gcc.sh
 282.531 ++++ gcc-4.0.2/contrib/regression/objs-gcc.sh
 282.532 +@@ -105,6 +105,10 @@
 282.533 +  then
 282.534 +   make all-gdb all-dejagnu all-ld || exit 1
 282.535 +   make install-gdb install-dejagnu install-ld || exit 1
 282.536 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
 282.537 ++ then
 282.538 ++  make all-gdb all-dejagnu all-ld || exit 1
 282.539 ++  make install-gdb install-dejagnu install-ld || exit 1
 282.540 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
 282.541 +   make bootstrap || exit 1
 282.542 +   make install || exit 1
 282.543 +--- gcc-4.0.2/zlib/configure
 282.544 ++++ gcc-4.0.2/zlib/configure
 282.545 +@@ -3426,6 +3426,11 @@
 282.546 +   lt_cv_deplibs_check_method=pass_all
 282.547 +   ;;
 282.548 + 
 282.549 ++linux-uclibc*)
 282.550 ++  lt_cv_deplibs_check_method=pass_all
 282.551 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 282.552 ++  ;;
 282.553 ++
 282.554 + netbsd* | knetbsd*-gnu)
 282.555 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 282.556 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
   283.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   283.2 +++ b/patches/gcc/4.0.4/200-uclibc-locale.patch	Sat Feb 24 11:00:05 2007 +0000
   283.3 @@ -0,0 +1,3237 @@
   283.4 +diff -urN gcc-4.0.0-100/libstdc++-v3/acinclude.m4 gcc-4.0.0/libstdc++-v3/acinclude.m4
   283.5 +--- gcc-4.0.0-100/libstdc++-v3/acinclude.m4	2005-04-30 13:06:53.000000000 -0500
   283.6 ++++ gcc-4.0.0/libstdc++-v3/acinclude.m4	2005-04-28 20:19:01.000000000 -0500
   283.7 +@@ -1104,7 +1104,7 @@
   283.8 +   AC_MSG_CHECKING([for C locale to use])
   283.9 +   GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
  283.10 +     [use MODEL for target locale package],
  283.11 +-    [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
  283.12 ++    [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
  283.13 +   
  283.14 +   # If they didn't use this option switch, or if they specified --enable
  283.15 +   # with no specific model, we'll have to look for one.  If they
  283.16 +@@ -1120,6 +1120,9 @@
  283.17 +   # Default to "generic".
  283.18 +   if test $enable_clocale_flag = auto; then
  283.19 +     case ${target_os} in
  283.20 ++      *-uclibc*)
  283.21 ++        enable_clocale_flag=uclibc
  283.22 ++        ;;
  283.23 +       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
  283.24 +         AC_EGREP_CPP([_GLIBCXX_ok], [
  283.25 +         #include <features.h>
  283.26 +@@ -1263,6 +1266,40 @@
  283.27 +       CTIME_CC=config/locale/generic/time_members.cc
  283.28 +       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
  283.29 +       ;;
  283.30 ++    uclibc)
  283.31 ++      AC_MSG_RESULT(uclibc)
  283.32 ++
  283.33 ++      # Declare intention to use gettext, and add support for specific
  283.34 ++      # languages.
  283.35 ++      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
  283.36 ++      ALL_LINGUAS="de fr"
  283.37 ++
  283.38 ++      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
  283.39 ++      AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
  283.40 ++      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
  283.41 ++        USE_NLS=yes
  283.42 ++      fi
  283.43 ++      # Export the build objects.
  283.44 ++      for ling in $ALL_LINGUAS; do \
  283.45 ++        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
  283.46 ++        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
  283.47 ++      done
  283.48 ++      AC_SUBST(glibcxx_MOFILES)
  283.49 ++      AC_SUBST(glibcxx_POFILES)
  283.50 ++
  283.51 ++      CLOCALE_H=config/locale/uclibc/c_locale.h
  283.52 ++      CLOCALE_CC=config/locale/uclibc/c_locale.cc
  283.53 ++      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
  283.54 ++      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
  283.55 ++      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
  283.56 ++      CMESSAGES_H=config/locale/uclibc/messages_members.h
  283.57 ++      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
  283.58 ++      CMONEY_CC=config/locale/uclibc/monetary_members.cc
  283.59 ++      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
  283.60 ++      CTIME_H=config/locale/uclibc/time_members.h
  283.61 ++      CTIME_CC=config/locale/uclibc/time_members.cc
  283.62 ++      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
  283.63 ++      ;;
  283.64 +   esac
  283.65 + 
  283.66 +   # This is where the testsuite looks for locale catalogs, using the
  283.67 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
  283.68 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c++locale_internal.h	1969-12-31 18:00:00.000000000 -0600
  283.69 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h	2005-04-28 01:13:15.000000000 -0500
  283.70 +@@ -0,0 +1,59 @@
  283.71 ++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
  283.72 ++
  283.73 ++// Copyright (C) 2002, 2004 Free Software Foundation, Inc.
  283.74 ++//
  283.75 ++// This file is part of the GNU ISO C++ Library.  This library is free
  283.76 ++// software; you can redistribute it and/or modify it under the
  283.77 ++// terms of the GNU General Public License as published by the
  283.78 ++// Free Software Foundation; either version 2, or (at your option)
  283.79 ++// any later version.
  283.80 ++
  283.81 ++// This library is distributed in the hope that it will be useful,
  283.82 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
  283.83 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  283.84 ++// GNU General Public License for more details.
  283.85 ++
  283.86 ++// You should have received a copy of the GNU General Public License along
  283.87 ++// with this library; see the file COPYING.  If not, write to the Free
  283.88 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  283.89 ++// USA.
  283.90 ++
  283.91 ++// As a special exception, you may use this file as part of a free software
  283.92 ++// library without restriction.  Specifically, if other files instantiate
  283.93 ++// templates or use macros or inline functions from this file, or you compile
  283.94 ++// this file and link it with other files to produce an executable, this
  283.95 ++// file does not by itself cause the resulting executable to be covered by
  283.96 ++// the GNU General Public License.  This exception does not however
  283.97 ++// invalidate any other reasons why the executable file might be covered by
  283.98 ++// the GNU General Public License.
  283.99 ++
 283.100 ++// Written by Jakub Jelinek <jakub@redhat.com>
 283.101 ++
 283.102 ++#include <clocale>
 283.103 ++
 283.104 ++#ifdef __UCLIBC_MJN3_ONLY__
 283.105 ++#warning clean this up
 283.106 ++#endif
 283.107 ++
 283.108 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.109 ++                                                  
 283.110 ++extern "C" __typeof(iswctype_l) __iswctype_l;
 283.111 ++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
 283.112 ++extern "C" __typeof(strcoll_l) __strcoll_l;
 283.113 ++extern "C" __typeof(strftime_l) __strftime_l;
 283.114 ++extern "C" __typeof(strtod_l) __strtod_l;
 283.115 ++extern "C" __typeof(strtof_l) __strtof_l;
 283.116 ++extern "C" __typeof(strtold_l) __strtold_l;
 283.117 ++extern "C" __typeof(strxfrm_l) __strxfrm_l;
 283.118 ++extern "C" __typeof(towlower_l) __towlower_l;
 283.119 ++extern "C" __typeof(towupper_l) __towupper_l;
 283.120 ++extern "C" __typeof(wcscoll_l) __wcscoll_l;
 283.121 ++extern "C" __typeof(wcsftime_l) __wcsftime_l;
 283.122 ++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
 283.123 ++extern "C" __typeof(wctype_l) __wctype_l;
 283.124 ++extern "C" __typeof(newlocale) __newlocale;
 283.125 ++extern "C" __typeof(freelocale) __freelocale;
 283.126 ++extern "C" __typeof(duplocale) __duplocale;
 283.127 ++extern "C" __typeof(uselocale) __uselocale;
 283.128 ++
 283.129 ++#endif // GLIBC 2.3 and later
 283.130 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
 283.131 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.cc	1969-12-31 18:00:00.000000000 -0600
 283.132 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.cc	2005-04-28 01:13:15.000000000 -0500
 283.133 +@@ -0,0 +1,160 @@
 283.134 ++// Wrapper for underlying C-language localization -*- C++ -*-
 283.135 ++
 283.136 ++// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
 283.137 ++//
 283.138 ++// This file is part of the GNU ISO C++ Library.  This library is free
 283.139 ++// software; you can redistribute it and/or modify it under the
 283.140 ++// terms of the GNU General Public License as published by the
 283.141 ++// Free Software Foundation; either version 2, or (at your option)
 283.142 ++// any later version.
 283.143 ++
 283.144 ++// This library is distributed in the hope that it will be useful,
 283.145 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 283.146 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 283.147 ++// GNU General Public License for more details.
 283.148 ++
 283.149 ++// You should have received a copy of the GNU General Public License along
 283.150 ++// with this library; see the file COPYING.  If not, write to the Free
 283.151 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 283.152 ++// USA.
 283.153 ++
 283.154 ++// As a special exception, you may use this file as part of a free software
 283.155 ++// library without restriction.  Specifically, if other files instantiate
 283.156 ++// templates or use macros or inline functions from this file, or you compile
 283.157 ++// this file and link it with other files to produce an executable, this
 283.158 ++// file does not by itself cause the resulting executable to be covered by
 283.159 ++// the GNU General Public License.  This exception does not however
 283.160 ++// invalidate any other reasons why the executable file might be covered by
 283.161 ++// the GNU General Public License.
 283.162 ++
 283.163 ++//
 283.164 ++// ISO C++ 14882: 22.8  Standard locale categories.
 283.165 ++//
 283.166 ++
 283.167 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 283.168 ++
 283.169 ++#include <cerrno>  // For errno
 283.170 ++#include <locale>
 283.171 ++#include <stdexcept>
 283.172 ++#include <langinfo.h>
 283.173 ++#include <bits/c++locale_internal.h>
 283.174 ++
 283.175 ++#ifndef __UCLIBC_HAS_XLOCALE__
 283.176 ++#define __strtol_l(S, E, B, L)      strtol((S), (E), (B))
 283.177 ++#define __strtoul_l(S, E, B, L)     strtoul((S), (E), (B))
 283.178 ++#define __strtoll_l(S, E, B, L)     strtoll((S), (E), (B))
 283.179 ++#define __strtoull_l(S, E, B, L)    strtoull((S), (E), (B))
 283.180 ++#define __strtof_l(S, E, L)         strtof((S), (E))
 283.181 ++#define __strtod_l(S, E, L)         strtod((S), (E))
 283.182 ++#define __strtold_l(S, E, L)        strtold((S), (E))
 283.183 ++#warning should dummy __newlocale check for C|POSIX ?
 283.184 ++#define __newlocale(a, b, c)        NULL
 283.185 ++#define __freelocale(a)             ((void)0)
 283.186 ++#define __duplocale(a)              __c_locale()
 283.187 ++#endif
 283.188 ++
 283.189 ++namespace std 
 283.190 ++{
 283.191 ++  template<>
 283.192 ++    void
 283.193 ++    __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, 
 283.194 ++		   const __c_locale& __cloc)
 283.195 ++    {
 283.196 ++      if (!(__err & ios_base::failbit))
 283.197 ++	{
 283.198 ++	  char* __sanity;
 283.199 ++	  errno = 0;
 283.200 ++	  float __f = __strtof_l(__s, &__sanity, __cloc);
 283.201 ++          if (__sanity != __s && errno != ERANGE)
 283.202 ++	    __v = __f;
 283.203 ++	  else
 283.204 ++	    __err |= ios_base::failbit;
 283.205 ++	}
 283.206 ++    }
 283.207 ++
 283.208 ++  template<>
 283.209 ++    void
 283.210 ++    __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, 
 283.211 ++		   const __c_locale& __cloc)
 283.212 ++    {
 283.213 ++      if (!(__err & ios_base::failbit))
 283.214 ++	{
 283.215 ++	  char* __sanity;
 283.216 ++	  errno = 0;
 283.217 ++	  double __d = __strtod_l(__s, &__sanity, __cloc);
 283.218 ++          if (__sanity != __s && errno != ERANGE)
 283.219 ++	    __v = __d;
 283.220 ++	  else
 283.221 ++	    __err |= ios_base::failbit;
 283.222 ++	}
 283.223 ++    }
 283.224 ++
 283.225 ++  template<>
 283.226 ++    void
 283.227 ++    __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
 283.228 ++		   const __c_locale& __cloc)
 283.229 ++    {
 283.230 ++      if (!(__err & ios_base::failbit))
 283.231 ++	{
 283.232 ++	  char* __sanity;
 283.233 ++	  errno = 0;
 283.234 ++	  long double __ld = __strtold_l(__s, &__sanity, __cloc);
 283.235 ++          if (__sanity != __s && errno != ERANGE)
 283.236 ++	    __v = __ld;
 283.237 ++	  else
 283.238 ++	    __err |= ios_base::failbit;
 283.239 ++	}
 283.240 ++    }
 283.241 ++
 283.242 ++  void
 283.243 ++  locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, 
 283.244 ++				    __c_locale __old)
 283.245 ++  {
 283.246 ++    __cloc = __newlocale(1 << LC_ALL, __s, __old);
 283.247 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.248 ++    if (!__cloc)
 283.249 ++      {
 283.250 ++	// This named locale is not supported by the underlying OS.
 283.251 ++	__throw_runtime_error(__N("locale::facet::_S_create_c_locale "
 283.252 ++			      "name not valid"));
 283.253 ++      }
 283.254 ++#endif
 283.255 ++  }
 283.256 ++  
 283.257 ++  void
 283.258 ++  locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
 283.259 ++  {
 283.260 ++    if (_S_get_c_locale() != __cloc)
 283.261 ++      __freelocale(__cloc); 
 283.262 ++  }
 283.263 ++
 283.264 ++  __c_locale
 283.265 ++  locale::facet::_S_clone_c_locale(__c_locale& __cloc)
 283.266 ++  { return __duplocale(__cloc); }
 283.267 ++} // namespace std
 283.268 ++
 283.269 ++namespace __gnu_cxx
 283.270 ++{
 283.271 ++  const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
 283.272 ++    {
 283.273 ++      "LC_CTYPE", 
 283.274 ++      "LC_NUMERIC",
 283.275 ++      "LC_TIME", 
 283.276 ++      "LC_COLLATE", 
 283.277 ++      "LC_MONETARY",
 283.278 ++      "LC_MESSAGES", 
 283.279 ++#if _GLIBCXX_NUM_CATEGORIES != 0
 283.280 ++      "LC_PAPER", 
 283.281 ++      "LC_NAME", 
 283.282 ++      "LC_ADDRESS",
 283.283 ++      "LC_TELEPHONE", 
 283.284 ++      "LC_MEASUREMENT", 
 283.285 ++      "LC_IDENTIFICATION" 
 283.286 ++#endif
 283.287 ++    };
 283.288 ++}
 283.289 ++
 283.290 ++namespace std
 283.291 ++{
 283.292 ++  const char* const* const locale::_S_categories = __gnu_cxx::category_names;
 283.293 ++}  // namespace std
 283.294 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.h
 283.295 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.h	1969-12-31 18:00:00.000000000 -0600
 283.296 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.h	2005-04-28 01:13:15.000000000 -0500
 283.297 +@@ -0,0 +1,115 @@
 283.298 ++// Wrapper for underlying C-language localization -*- C++ -*-
 283.299 ++
 283.300 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 283.301 ++//
 283.302 ++// This file is part of the GNU ISO C++ Library.  This library is free
 283.303 ++// software; you can redistribute it and/or modify it under the
 283.304 ++// terms of the GNU General Public License as published by the
 283.305 ++// Free Software Foundation; either version 2, or (at your option)
 283.306 ++// any later version.
 283.307 ++
 283.308 ++// This library is distributed in the hope that it will be useful,
 283.309 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 283.310 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 283.311 ++// GNU General Public License for more details.
 283.312 ++
 283.313 ++// You should have received a copy of the GNU General Public License along
 283.314 ++// with this library; see the file COPYING.  If not, write to the Free
 283.315 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 283.316 ++// USA.
 283.317 ++
 283.318 ++// As a special exception, you may use this file as part of a free software
 283.319 ++// library without restriction.  Specifically, if other files instantiate
 283.320 ++// templates or use macros or inline functions from this file, or you compile
 283.321 ++// this file and link it with other files to produce an executable, this
 283.322 ++// file does not by itself cause the resulting executable to be covered by
 283.323 ++// the GNU General Public License.  This exception does not however
 283.324 ++// invalidate any other reasons why the executable file might be covered by
 283.325 ++// the GNU General Public License.
 283.326 ++
 283.327 ++//
 283.328 ++// ISO C++ 14882: 22.8  Standard locale categories.
 283.329 ++//
 283.330 ++
 283.331 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 283.332 ++
 283.333 ++#ifndef _C_LOCALE_H
 283.334 ++#define _C_LOCALE_H 1
 283.335 ++
 283.336 ++#pragma GCC system_header
 283.337 ++
 283.338 ++#include <cstring>              // get std::strlen
 283.339 ++#include <cstdio>               // get std::snprintf or std::sprintf
 283.340 ++#include <clocale>
 283.341 ++#include <langinfo.h>		// For codecvt
 283.342 ++#ifdef __UCLIBC_MJN3_ONLY__
 283.343 ++#warning fix this
 283.344 ++#endif
 283.345 ++#ifdef __UCLIBC_HAS_LOCALE__
 283.346 ++#include <iconv.h>		// For codecvt using iconv, iconv_t
 283.347 ++#endif
 283.348 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
 283.349 ++#include <libintl.h> 		// For messages
 283.350 ++#endif
 283.351 ++
 283.352 ++#ifdef __UCLIBC_MJN3_ONLY__
 283.353 ++#warning what is _GLIBCXX_C_LOCALE_GNU for
 283.354 ++#endif
 283.355 ++#define _GLIBCXX_C_LOCALE_GNU 1
 283.356 ++
 283.357 ++#ifdef __UCLIBC_MJN3_ONLY__
 283.358 ++#warning fix categories
 283.359 ++#endif
 283.360 ++// #define _GLIBCXX_NUM_CATEGORIES 6
 283.361 ++#define _GLIBCXX_NUM_CATEGORIES 0
 283.362 ++ 
 283.363 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.364 ++namespace __gnu_cxx
 283.365 ++{
 283.366 ++  extern "C" __typeof(uselocale) __uselocale;
 283.367 ++}
 283.368 ++#endif
 283.369 ++
 283.370 ++namespace std
 283.371 ++{
 283.372 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.373 ++  typedef __locale_t		__c_locale;
 283.374 ++#else
 283.375 ++  typedef int*			__c_locale;
 283.376 ++#endif
 283.377 ++
 283.378 ++  // Convert numeric value of type _Tv to string and return length of
 283.379 ++  // string.  If snprintf is available use it, otherwise fall back to
 283.380 ++  // the unsafe sprintf which, in general, can be dangerous and should
 283.381 ++  // be avoided.
 283.382 ++  template<typename _Tv>
 283.383 ++    int
 283.384 ++    __convert_from_v(char* __out, const int __size, const char* __fmt,
 283.385 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.386 ++		     _Tv __v, const __c_locale& __cloc, int __prec)
 283.387 ++    {
 283.388 ++      __c_locale __old = __gnu_cxx::__uselocale(__cloc);
 283.389 ++#else
 283.390 ++		     _Tv __v, const __c_locale&, int __prec)
 283.391 ++    {
 283.392 ++# ifdef __UCLIBC_HAS_LOCALE__
 283.393 ++      char* __old = std::setlocale(LC_ALL, NULL);
 283.394 ++      char* __sav = new char[std::strlen(__old) + 1];
 283.395 ++      std::strcpy(__sav, __old);
 283.396 ++      std::setlocale(LC_ALL, "C");
 283.397 ++# endif
 283.398 ++#endif
 283.399 ++
 283.400 ++      const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
 283.401 ++
 283.402 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.403 ++      __gnu_cxx::__uselocale(__old);
 283.404 ++#elif defined __UCLIBC_HAS_LOCALE__
 283.405 ++      std::setlocale(LC_ALL, __sav);
 283.406 ++      delete [] __sav;
 283.407 ++#endif
 283.408 ++      return __ret;
 283.409 ++    }
 283.410 ++}
 283.411 ++
 283.412 ++#endif
 283.413 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
 283.414 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/codecvt_members.cc	1969-12-31 18:00:00.000000000 -0600
 283.415 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc	2005-04-28 01:13:15.000000000 -0500
 283.416 +@@ -0,0 +1,306 @@
 283.417 ++// std::codecvt implementation details, GNU version -*- C++ -*-
 283.418 ++
 283.419 ++// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 283.420 ++//
 283.421 ++// This file is part of the GNU ISO C++ Library.  This library is free
 283.422 ++// software; you can redistribute it and/or modify it under the
 283.423 ++// terms of the GNU General Public License as published by the
 283.424 ++// Free Software Foundation; either version 2, or (at your option)
 283.425 ++// any later version.
 283.426 ++
 283.427 ++// This library is distributed in the hope that it will be useful,
 283.428 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 283.429 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 283.430 ++// GNU General Public License for more details.
 283.431 ++
 283.432 ++// You should have received a copy of the GNU General Public License along
 283.433 ++// with this library; see the file COPYING.  If not, write to the Free
 283.434 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 283.435 ++// USA.
 283.436 ++
 283.437 ++// As a special exception, you may use this file as part of a free software
 283.438 ++// library without restriction.  Specifically, if other files instantiate
 283.439 ++// templates or use macros or inline functions from this file, or you compile
 283.440 ++// this file and link it with other files to produce an executable, this
 283.441 ++// file does not by itself cause the resulting executable to be covered by
 283.442 ++// the GNU General Public License.  This exception does not however
 283.443 ++// invalidate any other reasons why the executable file might be covered by
 283.444 ++// the GNU General Public License.
 283.445 ++
 283.446 ++//
 283.447 ++// ISO C++ 14882: 22.2.1.5 - Template class codecvt
 283.448 ++//
 283.449 ++
 283.450 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 283.451 ++
 283.452 ++#include <locale>
 283.453 ++#include <bits/c++locale_internal.h>
 283.454 ++
 283.455 ++namespace std
 283.456 ++{
 283.457 ++  // Specializations.
 283.458 ++#ifdef _GLIBCXX_USE_WCHAR_T
 283.459 ++  codecvt_base::result
 283.460 ++  codecvt<wchar_t, char, mbstate_t>::
 283.461 ++  do_out(state_type& __state, const intern_type* __from, 
 283.462 ++	 const intern_type* __from_end, const intern_type*& __from_next,
 283.463 ++	 extern_type* __to, extern_type* __to_end,
 283.464 ++	 extern_type*& __to_next) const
 283.465 ++  {
 283.466 ++    result __ret = ok;
 283.467 ++    state_type __tmp_state(__state);
 283.468 ++
 283.469 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.470 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 283.471 ++#endif
 283.472 ++
 283.473 ++    // wcsnrtombs is *very* fast but stops if encounters NUL characters:
 283.474 ++    // in case we fall back to wcrtomb and then continue, in a loop.
 283.475 ++    // NB: wcsnrtombs is a GNU extension
 283.476 ++    for (__from_next = __from, __to_next = __to;
 283.477 ++	 __from_next < __from_end && __to_next < __to_end
 283.478 ++	 && __ret == ok;)
 283.479 ++      {
 283.480 ++	const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
 283.481 ++						      __from_end - __from_next);
 283.482 ++	if (!__from_chunk_end)
 283.483 ++	  __from_chunk_end = __from_end;
 283.484 ++
 283.485 ++	__from = __from_next;
 283.486 ++	const size_t __conv = wcsnrtombs(__to_next, &__from_next,
 283.487 ++					 __from_chunk_end - __from_next,
 283.488 ++					 __to_end - __to_next, &__state);
 283.489 ++	if (__conv == static_cast<size_t>(-1))
 283.490 ++	  {
 283.491 ++	    // In case of error, in order to stop at the exact place we
 283.492 ++	    // have to start again from the beginning with a series of
 283.493 ++	    // wcrtomb.
 283.494 ++	    for (; __from < __from_next; ++__from)
 283.495 ++	      __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
 283.496 ++	    __state = __tmp_state;
 283.497 ++	    __ret = error;
 283.498 ++	  }
 283.499 ++	else if (__from_next && __from_next < __from_chunk_end)
 283.500 ++	  {
 283.501 ++	    __to_next += __conv;
 283.502 ++	    __ret = partial;
 283.503 ++	  }
 283.504 ++	else
 283.505 ++	  {
 283.506 ++	    __from_next = __from_chunk_end;
 283.507 ++	    __to_next += __conv;
 283.508 ++	  }
 283.509 ++
 283.510 ++	if (__from_next < __from_end && __ret == ok)
 283.511 ++	  {
 283.512 ++	    extern_type __buf[MB_LEN_MAX];
 283.513 ++	    __tmp_state = __state;
 283.514 ++	    const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
 283.515 ++	    if (__conv > static_cast<size_t>(__to_end - __to_next))
 283.516 ++	      __ret = partial;
 283.517 ++	    else
 283.518 ++	      {
 283.519 ++		memcpy(__to_next, __buf, __conv);
 283.520 ++		__state = __tmp_state;
 283.521 ++		__to_next += __conv;
 283.522 ++		++__from_next;
 283.523 ++	      }
 283.524 ++	  }
 283.525 ++      }
 283.526 ++
 283.527 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.528 ++    __uselocale(__old);
 283.529 ++#endif
 283.530 ++
 283.531 ++    return __ret; 
 283.532 ++  }
 283.533 ++  
 283.534 ++  codecvt_base::result
 283.535 ++  codecvt<wchar_t, char, mbstate_t>::
 283.536 ++  do_in(state_type& __state, const extern_type* __from, 
 283.537 ++	const extern_type* __from_end, const extern_type*& __from_next,
 283.538 ++	intern_type* __to, intern_type* __to_end,
 283.539 ++	intern_type*& __to_next) const
 283.540 ++  {
 283.541 ++    result __ret = ok;
 283.542 ++    state_type __tmp_state(__state);
 283.543 ++
 283.544 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.545 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 283.546 ++#endif
 283.547 ++
 283.548 ++    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
 283.549 ++    // in case we store a L'\0' and then continue, in a loop.
 283.550 ++    // NB: mbsnrtowcs is a GNU extension
 283.551 ++    for (__from_next = __from, __to_next = __to;
 283.552 ++	 __from_next < __from_end && __to_next < __to_end
 283.553 ++	 && __ret == ok;)
 283.554 ++      {
 283.555 ++	const extern_type* __from_chunk_end;
 283.556 ++	__from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
 283.557 ++								  __from_end
 283.558 ++								  - __from_next));
 283.559 ++	if (!__from_chunk_end)
 283.560 ++	  __from_chunk_end = __from_end;
 283.561 ++
 283.562 ++	__from = __from_next;
 283.563 ++	size_t __conv = mbsnrtowcs(__to_next, &__from_next,
 283.564 ++				   __from_chunk_end - __from_next,
 283.565 ++				   __to_end - __to_next, &__state);
 283.566 ++	if (__conv == static_cast<size_t>(-1))
 283.567 ++	  {
 283.568 ++	    // In case of error, in order to stop at the exact place we
 283.569 ++	    // have to start again from the beginning with a series of
 283.570 ++	    // mbrtowc.
 283.571 ++	    for (;; ++__to_next, __from += __conv)
 283.572 ++	      {
 283.573 ++		__conv = mbrtowc(__to_next, __from, __from_end - __from,
 283.574 ++				 &__tmp_state);
 283.575 ++		if (__conv == static_cast<size_t>(-1)
 283.576 ++		    || __conv == static_cast<size_t>(-2))
 283.577 ++		  break;
 283.578 ++	      }
 283.579 ++	    __from_next = __from;
 283.580 ++	    __state = __tmp_state;	    
 283.581 ++	    __ret = error;
 283.582 ++	  }
 283.583 ++	else if (__from_next && __from_next < __from_chunk_end)
 283.584 ++	  {
 283.585 ++	    // It is unclear what to return in this case (see DR 382). 
 283.586 ++	    __to_next += __conv;
 283.587 ++	    __ret = partial;
 283.588 ++	  }
 283.589 ++	else
 283.590 ++	  {
 283.591 ++	    __from_next = __from_chunk_end;
 283.592 ++	    __to_next += __conv;
 283.593 ++	  }
 283.594 ++
 283.595 ++	if (__from_next < __from_end && __ret == ok)
 283.596 ++	  {
 283.597 ++	    if (__to_next < __to_end)
 283.598 ++	      {
 283.599 ++		// XXX Probably wrong for stateful encodings
 283.600 ++		__tmp_state = __state;		
 283.601 ++		++__from_next;
 283.602 ++		*__to_next++ = L'\0';
 283.603 ++	      }
 283.604 ++	    else
 283.605 ++	      __ret = partial;
 283.606 ++	  }
 283.607 ++      }
 283.608 ++
 283.609 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.610 ++    __uselocale(__old);
 283.611 ++#endif
 283.612 ++
 283.613 ++    return __ret; 
 283.614 ++  }
 283.615 ++
 283.616 ++  int 
 283.617 ++  codecvt<wchar_t, char, mbstate_t>::
 283.618 ++  do_encoding() const throw()
 283.619 ++  {
 283.620 ++    // XXX This implementation assumes that the encoding is
 283.621 ++    // stateless and is either single-byte or variable-width.
 283.622 ++    int __ret = 0;
 283.623 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.624 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 283.625 ++#endif
 283.626 ++    if (MB_CUR_MAX == 1)
 283.627 ++      __ret = 1;
 283.628 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.629 ++    __uselocale(__old);
 283.630 ++#endif
 283.631 ++    return __ret;
 283.632 ++  }  
 283.633 ++
 283.634 ++  int 
 283.635 ++  codecvt<wchar_t, char, mbstate_t>::
 283.636 ++  do_max_length() const throw()
 283.637 ++  {
 283.638 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.639 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 283.640 ++#endif
 283.641 ++    // XXX Probably wrong for stateful encodings.
 283.642 ++    int __ret = MB_CUR_MAX;
 283.643 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.644 ++    __uselocale(__old);
 283.645 ++#endif
 283.646 ++    return __ret;
 283.647 ++  }
 283.648 ++  
 283.649 ++  int 
 283.650 ++  codecvt<wchar_t, char, mbstate_t>::
 283.651 ++  do_length(state_type& __state, const extern_type* __from,
 283.652 ++	    const extern_type* __end, size_t __max) const
 283.653 ++  {
 283.654 ++    int __ret = 0;
 283.655 ++    state_type __tmp_state(__state);
 283.656 ++
 283.657 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.658 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 283.659 ++#endif
 283.660 ++
 283.661 ++    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
 283.662 ++    // in case we advance past it and then continue, in a loop.
 283.663 ++    // NB: mbsnrtowcs is a GNU extension
 283.664 ++  
 283.665 ++    // A dummy internal buffer is needed in order for mbsnrtocws to consider
 283.666 ++    // its fourth parameter (it wouldn't with NULL as first parameter).
 283.667 ++    wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) 
 283.668 ++							   * __max));
 283.669 ++    while (__from < __end && __max)
 283.670 ++      {
 283.671 ++	const extern_type* __from_chunk_end;
 283.672 ++	__from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
 283.673 ++								  __end
 283.674 ++								  - __from));
 283.675 ++	if (!__from_chunk_end)
 283.676 ++	  __from_chunk_end = __end;
 283.677 ++
 283.678 ++	const extern_type* __tmp_from = __from;
 283.679 ++	size_t __conv = mbsnrtowcs(__to, &__from,
 283.680 ++				   __from_chunk_end - __from,
 283.681 ++				   __max, &__state);
 283.682 ++	if (__conv == static_cast<size_t>(-1))
 283.683 ++	  {
 283.684 ++	    // In case of error, in order to stop at the exact place we
 283.685 ++	    // have to start again from the beginning with a series of
 283.686 ++	    // mbrtowc.
 283.687 ++	    for (__from = __tmp_from;; __from += __conv)
 283.688 ++	      {
 283.689 ++		__conv = mbrtowc(NULL, __from, __end - __from,
 283.690 ++				 &__tmp_state);
 283.691 ++		if (__conv == static_cast<size_t>(-1)
 283.692 ++		    || __conv == static_cast<size_t>(-2))
 283.693 ++		  break;
 283.694 ++	      }
 283.695 ++	    __state = __tmp_state;
 283.696 ++	    __ret += __from - __tmp_from;
 283.697 ++	    break;
 283.698 ++	  }
 283.699 ++	if (!__from)
 283.700 ++	  __from = __from_chunk_end;
 283.701 ++	
 283.702 ++	__ret += __from - __tmp_from;
 283.703 ++	__max -= __conv;
 283.704 ++
 283.705 ++	if (__from < __end && __max)
 283.706 ++	  {
 283.707 ++	    // XXX Probably wrong for stateful encodings
 283.708 ++	    __tmp_state = __state;
 283.709 ++	    ++__from;
 283.710 ++	    ++__ret;
 283.711 ++	    --__max;
 283.712 ++	  }
 283.713 ++      }
 283.714 ++
 283.715 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.716 ++    __uselocale(__old);
 283.717 ++#endif
 283.718 ++
 283.719 ++    return __ret; 
 283.720 ++  }
 283.721 ++#endif
 283.722 ++}
 283.723 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/collate_members.cc
 283.724 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/collate_members.cc	1969-12-31 18:00:00.000000000 -0600
 283.725 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/collate_members.cc	2005-04-28 01:13:15.000000000 -0500
 283.726 +@@ -0,0 +1,80 @@
 283.727 ++// std::collate implementation details, GNU version -*- C++ -*-
 283.728 ++
 283.729 ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
 283.730 ++//
 283.731 ++// This file is part of the GNU ISO C++ Library.  This library is free
 283.732 ++// software; you can redistribute it and/or modify it under the
 283.733 ++// terms of the GNU General Public License as published by the
 283.734 ++// Free Software Foundation; either version 2, or (at your option)
 283.735 ++// any later version.
 283.736 ++
 283.737 ++// This library is distributed in the hope that it will be useful,
 283.738 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 283.739 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 283.740 ++// GNU General Public License for more details.
 283.741 ++
 283.742 ++// You should have received a copy of the GNU General Public License along
 283.743 ++// with this library; see the file COPYING.  If not, write to the Free
 283.744 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 283.745 ++// USA.
 283.746 ++
 283.747 ++// As a special exception, you may use this file as part of a free software
 283.748 ++// library without restriction.  Specifically, if other files instantiate
 283.749 ++// templates or use macros or inline functions from this file, or you compile
 283.750 ++// this file and link it with other files to produce an executable, this
 283.751 ++// file does not by itself cause the resulting executable to be covered by
 283.752 ++// the GNU General Public License.  This exception does not however
 283.753 ++// invalidate any other reasons why the executable file might be covered by
 283.754 ++// the GNU General Public License.
 283.755 ++
 283.756 ++//
 283.757 ++// ISO C++ 14882: 22.2.4.1.2  collate virtual functions
 283.758 ++//
 283.759 ++
 283.760 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 283.761 ++
 283.762 ++#include <locale>
 283.763 ++#include <bits/c++locale_internal.h>
 283.764 ++
 283.765 ++#ifndef __UCLIBC_HAS_XLOCALE__
 283.766 ++#define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
 283.767 ++#define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
 283.768 ++#define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
 283.769 ++#define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
 283.770 ++#endif
 283.771 ++
 283.772 ++namespace std
 283.773 ++{
 283.774 ++  // These are basically extensions to char_traits, and perhaps should
 283.775 ++  // be put there instead of here.
 283.776 ++  template<>
 283.777 ++    int 
 283.778 ++    collate<char>::_M_compare(const char* __one, const char* __two) const
 283.779 ++    { 
 283.780 ++      int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
 283.781 ++      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
 283.782 ++    }
 283.783 ++  
 283.784 ++  template<>
 283.785 ++    size_t
 283.786 ++    collate<char>::_M_transform(char* __to, const char* __from, 
 283.787 ++				size_t __n) const 
 283.788 ++    { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
 283.789 ++
 283.790 ++#ifdef _GLIBCXX_USE_WCHAR_T
 283.791 ++  template<>
 283.792 ++    int 
 283.793 ++    collate<wchar_t>::_M_compare(const wchar_t* __one, 
 283.794 ++				 const wchar_t* __two) const
 283.795 ++    {
 283.796 ++      int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
 283.797 ++      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
 283.798 ++    }
 283.799 ++  
 283.800 ++  template<>
 283.801 ++    size_t
 283.802 ++    collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
 283.803 ++				   size_t __n) const
 283.804 ++    { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
 283.805 ++#endif
 283.806 ++}
 283.807 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
 283.808 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/ctype_members.cc	1969-12-31 18:00:00.000000000 -0600
 283.809 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc	2005-04-28 01:13:15.000000000 -0500
 283.810 +@@ -0,0 +1,300 @@
 283.811 ++// std::ctype implementation details, GNU version -*- C++ -*-
 283.812 ++
 283.813 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 283.814 ++//
 283.815 ++// This file is part of the GNU ISO C++ Library.  This library is free
 283.816 ++// software; you can redistribute it and/or modify it under the
 283.817 ++// terms of the GNU General Public License as published by the
 283.818 ++// Free Software Foundation; either version 2, or (at your option)
 283.819 ++// any later version.
 283.820 ++
 283.821 ++// This library is distributed in the hope that it will be useful,
 283.822 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 283.823 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 283.824 ++// GNU General Public License for more details.
 283.825 ++
 283.826 ++// You should have received a copy of the GNU General Public License along
 283.827 ++// with this library; see the file COPYING.  If not, write to the Free
 283.828 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 283.829 ++// USA.
 283.830 ++
 283.831 ++// As a special exception, you may use this file as part of a free software
 283.832 ++// library without restriction.  Specifically, if other files instantiate
 283.833 ++// templates or use macros or inline functions from this file, or you compile
 283.834 ++// this file and link it with other files to produce an executable, this
 283.835 ++// file does not by itself cause the resulting executable to be covered by
 283.836 ++// the GNU General Public License.  This exception does not however
 283.837 ++// invalidate any other reasons why the executable file might be covered by
 283.838 ++// the GNU General Public License.
 283.839 ++
 283.840 ++//
 283.841 ++// ISO C++ 14882: 22.2.1.1.2  ctype virtual functions.
 283.842 ++//
 283.843 ++
 283.844 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 283.845 ++
 283.846 ++#define _LIBC
 283.847 ++#include <locale>
 283.848 ++#undef _LIBC
 283.849 ++#include <bits/c++locale_internal.h>
 283.850 ++
 283.851 ++#ifndef __UCLIBC_HAS_XLOCALE__
 283.852 ++#define __wctype_l(S, L)           wctype((S))
 283.853 ++#define __towupper_l(C, L)         towupper((C))
 283.854 ++#define __towlower_l(C, L)         towlower((C))
 283.855 ++#define __iswctype_l(C, M, L)      iswctype((C), (M))
 283.856 ++#endif
 283.857 ++
 283.858 ++namespace std
 283.859 ++{
 283.860 ++  // NB: The other ctype<char> specializations are in src/locale.cc and
 283.861 ++  // various /config/os/* files.
 283.862 ++  template<>
 283.863 ++    ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
 283.864 ++    : ctype<char>(0, false, __refs) 
 283.865 ++    { 		
 283.866 ++      if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
 283.867 ++	{
 283.868 ++	  this->_S_destroy_c_locale(this->_M_c_locale_ctype);
 283.869 ++	  this->_S_create_c_locale(this->_M_c_locale_ctype, __s); 
 283.870 ++#ifdef __UCLIBC_HAS_XLOCALE__
 283.871 ++	  this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
 283.872 ++	  this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
 283.873 ++	  this->_M_table = this->_M_c_locale_ctype->__ctype_b;
 283.874 ++#endif
 283.875 ++	}
 283.876 ++    }
 283.877 ++
 283.878 ++#ifdef _GLIBCXX_USE_WCHAR_T  
 283.879 ++  ctype<wchar_t>::__wmask_type
 283.880 ++  ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
 283.881 ++  {
 283.882 ++    __wmask_type __ret;
 283.883 ++    switch (__m)
 283.884 ++      {
 283.885 ++      case space:
 283.886 ++	__ret = __wctype_l("space", _M_c_locale_ctype);
 283.887 ++	break;
 283.888 ++      case print:
 283.889 ++	__ret = __wctype_l("print", _M_c_locale_ctype);
 283.890 ++	break;
 283.891 ++      case cntrl:
 283.892 ++	__ret = __wctype_l("cntrl", _M_c_locale_ctype);
 283.893 ++	break;
 283.894 ++      case upper:
 283.895 ++	__ret = __wctype_l("upper", _M_c_locale_ctype);
 283.896 ++	break;
 283.897 ++      case lower:
 283.898 ++	__ret = __wctype_l("lower", _M_c_locale_ctype);
 283.899 ++	break;
 283.900 ++      case alpha:
 283.901 ++	__ret = __wctype_l("alpha", _M_c_locale_ctype);
 283.902 ++	break;
 283.903 ++      case digit:
 283.904 ++	__ret = __wctype_l("digit", _M_c_locale_ctype);
 283.905 ++	break;
 283.906 ++      case punct:
 283.907 ++	__ret = __wctype_l("punct", _M_c_locale_ctype);
 283.908 ++	break;
 283.909 ++      case xdigit:
 283.910 ++	__ret = __wctype_l("xdigit", _M_c_locale_ctype);
 283.911 ++	break;
 283.912 ++      case alnum:
 283.913 ++	__ret = __wctype_l("alnum", _M_c_locale_ctype);
 283.914 ++	break;
 283.915 ++      case graph:
 283.916 ++	__ret = __wctype_l("graph", _M_c_locale_ctype);
 283.917 ++	break;
 283.918 ++      default:
 283.919 ++	__ret = __wmask_type();
 283.920 ++      }
 283.921 ++    return __ret;
 283.922 ++  }
 283.923 ++  
 283.924 ++  wchar_t
 283.925 ++  ctype<wchar_t>::do_toupper(wchar_t __c) const
 283.926 ++  { return __towupper_l(__c, _M_c_locale_ctype); }
 283.927 ++
 283.928 ++  const wchar_t*
 283.929 ++  ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
 283.930 ++  {
 283.931 ++    while (__lo < __hi)
 283.932 ++      {
 283.933 ++        *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
 283.934 ++        ++__lo;
 283.935 ++      }
 283.936 ++    return __hi;
 283.937 ++  }
 283.938 ++  
 283.939 ++  wchar_t
 283.940 ++  ctype<wchar_t>::do_tolower(wchar_t __c) const
 283.941 ++  { return __towlower_l(__c, _M_c_locale_ctype); }
 283.942 ++  
 283.943 ++  const wchar_t*
 283.944 ++  ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
 283.945 ++  {
 283.946 ++    while (__lo < __hi)
 283.947 ++      {
 283.948 ++        *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
 283.949 ++        ++__lo;
 283.950 ++      }
 283.951 ++    return __hi;
 283.952 ++  }
 283.953 ++
 283.954 ++  bool
 283.955 ++  ctype<wchar_t>::
 283.956 ++  do_is(mask __m, wchar_t __c) const
 283.957 ++  { 
 283.958 ++    // Highest bitmask in ctype_base == 10, but extra in "C"
 283.959 ++    // library for blank.
 283.960 ++    bool __ret = false;
 283.961 ++    const size_t __bitmasksize = 11; 
 283.962 ++    for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
 283.963 ++      if (__m & _M_bit[__bitcur]
 283.964 ++	  && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
 283.965 ++	{
 283.966 ++	  __ret = true;
 283.967 ++	  break;
 283.968 ++	}
 283.969 ++    return __ret;    
 283.970 ++  }
 283.971 ++  
 283.972 ++  const wchar_t* 
 283.973 ++  ctype<wchar_t>::
 283.974 ++  do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
 283.975 ++  {
 283.976 ++    for (; __lo < __hi; ++__vec, ++__lo)
 283.977 ++      {
 283.978 ++	// Highest bitmask in ctype_base == 10, but extra in "C"
 283.979 ++	// library for blank.
 283.980 ++	const size_t __bitmasksize = 11; 
 283.981 ++	mask __m = 0;
 283.982 ++	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
 283.983 ++	  if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
 283.984 ++	    __m |= _M_bit[__bitcur];
 283.985 ++	*__vec = __m;
 283.986 ++      }
 283.987 ++    return __hi;
 283.988 ++  }
 283.989 ++  
 283.990 ++  const wchar_t* 
 283.991 ++  ctype<wchar_t>::
 283.992 ++  do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
 283.993 ++  {
 283.994 ++    while (__lo < __hi && !this->do_is(__m, *__lo))
 283.995 ++      ++__lo;
 283.996 ++    return __lo;
 283.997 ++  }
 283.998 ++
 283.999 ++  const wchar_t*
283.1000 ++  ctype<wchar_t>::
283.1001 ++  do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
283.1002 ++  {
283.1003 ++    while (__lo < __hi && this->do_is(__m, *__lo) != 0)
283.1004 ++      ++__lo;
283.1005 ++    return __lo;
283.1006 ++  }
283.1007 ++
283.1008 ++  wchar_t
283.1009 ++  ctype<wchar_t>::
283.1010 ++  do_widen(char __c) const
283.1011 ++  { return _M_widen[static_cast<unsigned char>(__c)]; }
283.1012 ++
283.1013 ++  const char* 
283.1014 ++  ctype<wchar_t>::
283.1015 ++  do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
283.1016 ++  {
283.1017 ++    while (__lo < __hi)
283.1018 ++      {
283.1019 ++	*__dest = _M_widen[static_cast<unsigned char>(*__lo)];
283.1020 ++	++__lo;
283.1021 ++	++__dest;
283.1022 ++      }
283.1023 ++    return __hi;
283.1024 ++  }
283.1025 ++
283.1026 ++  char
283.1027 ++  ctype<wchar_t>::
283.1028 ++  do_narrow(wchar_t __wc, char __dfault) const
283.1029 ++  {
283.1030 ++    if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
283.1031 ++      return _M_narrow[__wc];
283.1032 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.1033 ++    __c_locale __old = __uselocale(_M_c_locale_ctype);
283.1034 ++#endif
283.1035 ++    const int __c = wctob(__wc);
283.1036 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.1037 ++    __uselocale(__old);
283.1038 ++#endif
283.1039 ++    return (__c == EOF ? __dfault : static_cast<char>(__c)); 
283.1040 ++  }
283.1041 ++
283.1042 ++  const wchar_t*
283.1043 ++  ctype<wchar_t>::
283.1044 ++  do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, 
283.1045 ++	    char* __dest) const
283.1046 ++  {
283.1047 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.1048 ++    __c_locale __old = __uselocale(_M_c_locale_ctype);
283.1049 ++#endif
283.1050 ++    if (_M_narrow_ok)
283.1051 ++      while (__lo < __hi)
283.1052 ++	{
283.1053 ++	  if (*__lo >= 0 && *__lo < 128)
283.1054 ++	    *__dest = _M_narrow[*__lo];
283.1055 ++	  else
283.1056 ++	    {
283.1057 ++	      const int __c = wctob(*__lo);
283.1058 ++	      *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
283.1059 ++	    }
283.1060 ++	  ++__lo;
283.1061 ++	  ++__dest;
283.1062 ++	}
283.1063 ++    else
283.1064 ++      while (__lo < __hi)
283.1065 ++	{
283.1066 ++	  const int __c = wctob(*__lo);
283.1067 ++	  *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
283.1068 ++	  ++__lo;
283.1069 ++	  ++__dest;
283.1070 ++	}
283.1071 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.1072 ++    __uselocale(__old);
283.1073 ++#endif
283.1074 ++    return __hi;
283.1075 ++  }
283.1076 ++
283.1077 ++  void
283.1078 ++  ctype<wchar_t>::_M_initialize_ctype()
283.1079 ++  {
283.1080 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.1081 ++    __c_locale __old = __uselocale(_M_c_locale_ctype);
283.1082 ++#endif
283.1083 ++    wint_t __i;
283.1084 ++    for (__i = 0; __i < 128; ++__i)
283.1085 ++      {
283.1086 ++	const int __c = wctob(__i);
283.1087 ++	if (__c == EOF)
283.1088 ++	  break;
283.1089 ++	else
283.1090 ++	  _M_narrow[__i] = static_cast<char>(__c);
283.1091 ++      }
283.1092 ++    if (__i == 128)
283.1093 ++      _M_narrow_ok = true;
283.1094 ++    else
283.1095 ++      _M_narrow_ok = false;
283.1096 ++    for (size_t __j = 0;
283.1097 ++	 __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
283.1098 ++      _M_widen[__j] = btowc(__j);
283.1099 ++
283.1100 ++    for (size_t __k = 0; __k <= 11; ++__k)
283.1101 ++      { 
283.1102 ++	_M_bit[__k] = static_cast<mask>(_ISbit(__k));
283.1103 ++	_M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
283.1104 ++      }
283.1105 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.1106 ++    __uselocale(__old);
283.1107 ++#endif
283.1108 ++  }
283.1109 ++#endif //  _GLIBCXX_USE_WCHAR_T
283.1110 ++}
283.1111 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.cc
283.1112 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.cc	1969-12-31 18:00:00.000000000 -0600
283.1113 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.cc	2005-04-28 01:13:15.000000000 -0500
283.1114 +@@ -0,0 +1,100 @@
283.1115 ++// std::messages implementation details, GNU version -*- C++ -*-
283.1116 ++
283.1117 ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
283.1118 ++//
283.1119 ++// This file is part of the GNU ISO C++ Library.  This library is free
283.1120 ++// software; you can redistribute it and/or modify it under the
283.1121 ++// terms of the GNU General Public License as published by the
283.1122 ++// Free Software Foundation; either version 2, or (at your option)
283.1123 ++// any later version.
283.1124 ++
283.1125 ++// This library is distributed in the hope that it will be useful,
283.1126 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
283.1127 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
283.1128 ++// GNU General Public License for more details.
283.1129 ++
283.1130 ++// You should have received a copy of the GNU General Public License along
283.1131 ++// with this library; see the file COPYING.  If not, write to the Free
283.1132 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
283.1133 ++// USA.
283.1134 ++
283.1135 ++// As a special exception, you may use this file as part of a free software
283.1136 ++// library without restriction.  Specifically, if other files instantiate
283.1137 ++// templates or use macros or inline functions from this file, or you compile
283.1138 ++// this file and link it with other files to produce an executable, this
283.1139 ++// file does not by itself cause the resulting executable to be covered by
283.1140 ++// the GNU General Public License.  This exception does not however
283.1141 ++// invalidate any other reasons why the executable file might be covered by
283.1142 ++// the GNU General Public License.
283.1143 ++
283.1144 ++//
283.1145 ++// ISO C++ 14882: 22.2.7.1.2  messages virtual functions
283.1146 ++//
283.1147 ++
283.1148 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
283.1149 ++
283.1150 ++#include <locale>
283.1151 ++#include <bits/c++locale_internal.h>
283.1152 ++
283.1153 ++#ifdef __UCLIBC_MJN3_ONLY__
283.1154 ++#warning fix gettext stuff
283.1155 ++#endif
283.1156 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
283.1157 ++extern "C" char *__dcgettext(const char *domainname,
283.1158 ++			     const char *msgid, int category);
283.1159 ++#undef gettext
283.1160 ++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
283.1161 ++#else
283.1162 ++#undef gettext
283.1163 ++#define gettext(msgid) (msgid)
283.1164 ++#endif
283.1165 ++
283.1166 ++namespace std
283.1167 ++{
283.1168 ++  // Specializations.
283.1169 ++  template<>
283.1170 ++    string
283.1171 ++    messages<char>::do_get(catalog, int, int, const string& __dfault) const
283.1172 ++    {
283.1173 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.1174 ++      __c_locale __old = __uselocale(_M_c_locale_messages);
283.1175 ++      const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
283.1176 ++      __uselocale(__old);
283.1177 ++      return string(__msg);
283.1178 ++#elif defined __UCLIBC_HAS_LOCALE__
283.1179 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
283.1180 ++      setlocale(LC_ALL, _M_name_messages);
283.1181 ++      const char* __msg = gettext(__dfault.c_str());
283.1182 ++      setlocale(LC_ALL, __old);
283.1183 ++      free(__old);
283.1184 ++      return string(__msg);
283.1185 ++#else
283.1186 ++      const char* __msg = gettext(__dfault.c_str());
283.1187 ++      return string(__msg);
283.1188 ++#endif
283.1189 ++    }
283.1190 ++
283.1191 ++#ifdef _GLIBCXX_USE_WCHAR_T
283.1192 ++  template<>
283.1193 ++    wstring
283.1194 ++    messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
283.1195 ++    {
283.1196 ++# ifdef __UCLIBC_HAS_XLOCALE__
283.1197 ++      __c_locale __old = __uselocale(_M_c_locale_messages);
283.1198 ++      char* __msg = gettext(_M_convert_to_char(__dfault));
283.1199 ++      __uselocale(__old);
283.1200 ++      return _M_convert_from_char(__msg);
283.1201 ++# elif defined __UCLIBC_HAS_LOCALE__
283.1202 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
283.1203 ++      setlocale(LC_ALL, _M_name_messages);
283.1204 ++      char* __msg = gettext(_M_convert_to_char(__dfault));
283.1205 ++      setlocale(LC_ALL, __old);
283.1206 ++      free(__old);
283.1207 ++      return _M_convert_from_char(__msg);
283.1208 ++# else
283.1209 ++      char* __msg = gettext(_M_convert_to_char(__dfault));
283.1210 ++      return _M_convert_from_char(__msg);
283.1211 ++# endif
283.1212 ++    }
283.1213 ++#endif
283.1214 ++}
283.1215 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.h
283.1216 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.h	1969-12-31 18:00:00.000000000 -0600
283.1217 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.h	2005-04-28 01:13:15.000000000 -0500
283.1218 +@@ -0,0 +1,118 @@
283.1219 ++// std::messages implementation details, GNU version -*- C++ -*-
283.1220 ++
283.1221 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
283.1222 ++//
283.1223 ++// This file is part of the GNU ISO C++ Library.  This library is free
283.1224 ++// software; you can redistribute it and/or modify it under the
283.1225 ++// terms of the GNU General Public License as published by the
283.1226 ++// Free Software Foundation; either version 2, or (at your option)
283.1227 ++// any later version.
283.1228 ++
283.1229 ++// This library is distributed in the hope that it will be useful,
283.1230 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
283.1231 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
283.1232 ++// GNU General Public License for more details.
283.1233 ++
283.1234 ++// You should have received a copy of the GNU General Public License along
283.1235 ++// with this library; see the file COPYING.  If not, write to the Free
283.1236 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
283.1237 ++// USA.
283.1238 ++
283.1239 ++// As a special exception, you may use this file as part of a free software
283.1240 ++// library without restriction.  Specifically, if other files instantiate
283.1241 ++// templates or use macros or inline functions from this file, or you compile
283.1242 ++// this file and link it with other files to produce an executable, this
283.1243 ++// file does not by itself cause the resulting executable to be covered by
283.1244 ++// the GNU General Public License.  This exception does not however
283.1245 ++// invalidate any other reasons why the executable file might be covered by
283.1246 ++// the GNU General Public License.
283.1247 ++
283.1248 ++//
283.1249 ++// ISO C++ 14882: 22.2.7.1.2  messages functions
283.1250 ++//
283.1251 ++
283.1252 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
283.1253 ++
283.1254 ++#ifdef __UCLIBC_MJN3_ONLY__
283.1255 ++#warning fix prototypes for *textdomain funcs
283.1256 ++#endif
283.1257 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
283.1258 ++extern "C" char *__textdomain(const char *domainname);
283.1259 ++extern "C" char *__bindtextdomain(const char *domainname,
283.1260 ++				  const char *dirname);
283.1261 ++#else
283.1262 ++#undef __textdomain
283.1263 ++#undef __bindtextdomain
283.1264 ++#define __textdomain(D)           ((void)0)
283.1265 ++#define __bindtextdomain(D,P)     ((void)0)
283.1266 ++#endif
283.1267 ++
283.1268 ++  // Non-virtual member functions.
283.1269 ++  template<typename _CharT>
283.1270 ++     messages<_CharT>::messages(size_t __refs)
283.1271 ++     : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), 
283.1272 ++     _M_name_messages(_S_get_c_name())
283.1273 ++     { }
283.1274 ++
283.1275 ++  template<typename _CharT>
283.1276 ++     messages<_CharT>::messages(__c_locale __cloc, const char* __s, 
283.1277 ++				size_t __refs) 
283.1278 ++     : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
283.1279 ++     _M_name_messages(__s)
283.1280 ++     {
283.1281 ++       char* __tmp = new char[std::strlen(__s) + 1];
283.1282 ++       std::strcpy(__tmp, __s);
283.1283 ++       _M_name_messages = __tmp;
283.1284 ++     }
283.1285 ++
283.1286 ++  template<typename _CharT>
283.1287 ++    typename messages<_CharT>::catalog 
283.1288 ++    messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, 
283.1289 ++			   const char* __dir) const
283.1290 ++    { 
283.1291 ++      __bindtextdomain(__s.c_str(), __dir);
283.1292 ++      return this->do_open(__s, __loc); 
283.1293 ++    }
283.1294 ++
283.1295 ++  // Virtual member functions.
283.1296 ++  template<typename _CharT>
283.1297 ++    messages<_CharT>::~messages()
283.1298 ++    { 
283.1299 ++      if (_M_name_messages != _S_get_c_name())
283.1300 ++	delete [] _M_name_messages;
283.1301 ++      _S_destroy_c_locale(_M_c_locale_messages); 
283.1302 ++    }
283.1303 ++
283.1304 ++  template<typename _CharT>
283.1305 ++    typename messages<_CharT>::catalog 
283.1306 ++    messages<_CharT>::do_open(const basic_string<char>& __s, 
283.1307 ++			      const locale&) const
283.1308 ++    { 
283.1309 ++      // No error checking is done, assume the catalog exists and can
283.1310 ++      // be used.
283.1311 ++      __textdomain(__s.c_str());
283.1312 ++      return 0;
283.1313 ++    }
283.1314 ++
283.1315 ++  template<typename _CharT>
283.1316 ++    void    
283.1317 ++    messages<_CharT>::do_close(catalog) const 
283.1318 ++    { }
283.1319 ++
283.1320 ++   // messages_byname
283.1321 ++   template<typename _CharT>
283.1322 ++     messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
283.1323 ++     : messages<_CharT>(__refs) 
283.1324 ++     { 
283.1325 ++       if (this->_M_name_messages != locale::facet::_S_get_c_name())
283.1326 ++	 delete [] this->_M_name_messages;
283.1327 ++       char* __tmp = new char[std::strlen(__s) + 1];
283.1328 ++       std::strcpy(__tmp, __s);
283.1329 ++       this->_M_name_messages = __tmp;
283.1330 ++
283.1331 ++       if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
283.1332 ++	 {
283.1333 ++	   this->_S_destroy_c_locale(this->_M_c_locale_messages);
283.1334 ++	   this->_S_create_c_locale(this->_M_c_locale_messages, __s); 
283.1335 ++	 }
283.1336 ++     }
283.1337 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
283.1338 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/monetary_members.cc	1969-12-31 18:00:00.000000000 -0600
283.1339 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc	2005-04-28 01:23:02.000000000 -0500
283.1340 +@@ -0,0 +1,692 @@
283.1341 ++// std::moneypunct implementation details, GNU version -*- C++ -*-
283.1342 ++
283.1343 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
283.1344 ++//
283.1345 ++// This file is part of the GNU ISO C++ Library.  This library is free
283.1346 ++// software; you can redistribute it and/or modify it under the
283.1347 ++// terms of the GNU General Public License as published by the
283.1348 ++// Free Software Foundation; either version 2, or (at your option)
283.1349 ++// any later version.
283.1350 ++
283.1351 ++// This library is distributed in the hope that it will be useful,
283.1352 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
283.1353 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
283.1354 ++// GNU General Public License for more details.
283.1355 ++
283.1356 ++// You should have received a copy of the GNU General Public License along
283.1357 ++// with this library; see the file COPYING.  If not, write to the Free
283.1358 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
283.1359 ++// USA.
283.1360 ++
283.1361 ++// As a special exception, you may use this file as part of a free software
283.1362 ++// library without restriction.  Specifically, if other files instantiate
283.1363 ++// templates or use macros or inline functions from this file, or you compile
283.1364 ++// this file and link it with other files to produce an executable, this
283.1365 ++// file does not by itself cause the resulting executable to be covered by
283.1366 ++// the GNU General Public License.  This exception does not however
283.1367 ++// invalidate any other reasons why the executable file might be covered by
283.1368 ++// the GNU General Public License.
283.1369 ++
283.1370 ++//
283.1371 ++// ISO C++ 14882: 22.2.6.3.2  moneypunct virtual functions
283.1372 ++//
283.1373 ++
283.1374 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
283.1375 ++
283.1376 ++#define _LIBC
283.1377 ++#include <locale>
283.1378 ++#undef _LIBC
283.1379 ++#include <bits/c++locale_internal.h>
283.1380 ++
283.1381 ++#ifdef __UCLIBC_MJN3_ONLY__
283.1382 ++#warning optimize this for uclibc
283.1383 ++#warning tailor for stub locale support
283.1384 ++#endif
283.1385 ++
283.1386 ++#ifndef __UCLIBC_HAS_XLOCALE__
283.1387 ++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
283.1388 ++#endif
283.1389 ++
283.1390 ++namespace std
283.1391 ++{
283.1392 ++  // Construct and return valid pattern consisting of some combination of:
283.1393 ++  // space none symbol sign value
283.1394 ++  money_base::pattern
283.1395 ++  money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
283.1396 ++  { 
283.1397 ++    pattern __ret;
283.1398 ++
283.1399 ++    // This insanely complicated routine attempts to construct a valid
283.1400 ++    // pattern for use with monyepunct. A couple of invariants:
283.1401 ++
283.1402 ++    // if (__precedes) symbol -> value
283.1403 ++    // else value -> symbol
283.1404 ++    
283.1405 ++    // if (__space) space
283.1406 ++    // else none
283.1407 ++
283.1408 ++    // none == never first
283.1409 ++    // space never first or last
283.1410 ++
283.1411 ++    // Any elegant implementations of this are welcome.
283.1412 ++    switch (__posn)
283.1413 ++      {
283.1414 ++      case 0:
283.1415 ++      case 1:
283.1416 ++	// 1 The sign precedes the value and symbol.
283.1417 ++	__ret.field[0] = sign;
283.1418 ++	if (__space)
283.1419 ++	  {
283.1420 ++	    // Pattern starts with sign.
283.1421 ++	    if (__precedes)
283.1422 ++	      {
283.1423 ++		__ret.field[1] = symbol;
283.1424 ++		__ret.field[3] = value;
283.1425 ++	      }
283.1426 ++	    else
283.1427 ++	      {
283.1428 ++		__ret.field[1] = value;
283.1429 ++		__ret.field[3] = symbol;
283.1430 ++	      }
283.1431 ++	    __ret.field[2] = space;
283.1432 ++	  }
283.1433 ++	else
283.1434 ++	  {
283.1435 ++	    // Pattern starts with sign and ends with none.
283.1436 ++	    if (__precedes)
283.1437 ++	      {
283.1438 ++		__ret.field[1] = symbol;
283.1439 ++		__ret.field[2] = value;
283.1440 ++	      }
283.1441 ++	    else
283.1442 ++	      {
283.1443 ++		__ret.field[1] = value;
283.1444 ++		__ret.field[2] = symbol;
283.1445 ++	      }
283.1446 ++	    __ret.field[3] = none;
283.1447 ++	  }
283.1448 ++	break;
283.1449 ++      case 2:
283.1450 ++	// 2 The sign follows the value and symbol.
283.1451 ++	if (__space)
283.1452 ++	  {
283.1453 ++	    // Pattern either ends with sign.
283.1454 ++	    if (__precedes)
283.1455 ++	      {
283.1456 ++		__ret.field[0] = symbol;
283.1457 ++		__ret.field[2] = value;
283.1458 ++	      }
283.1459 ++	    else
283.1460 ++	      {
283.1461 ++		__ret.field[0] = value;
283.1462 ++		__ret.field[2] = symbol;
283.1463 ++	      }
283.1464 ++	    __ret.field[1] = space;
283.1465 ++	    __ret.field[3] = sign;
283.1466 ++	  }
283.1467 ++	else
283.1468 ++	  {
283.1469 ++	    // Pattern ends with sign then none.
283.1470 ++	    if (__precedes)
283.1471 ++	      {
283.1472 ++		__ret.field[0] = symbol;
283.1473 ++		__ret.field[1] = value;
283.1474 ++	      }
283.1475 ++	    else
283.1476 ++	      {
283.1477 ++		__ret.field[0] = value;
283.1478 ++		__ret.field[1] = symbol;
283.1479 ++	      }
283.1480 ++	    __ret.field[2] = sign;
283.1481 ++	    __ret.field[3] = none;
283.1482 ++	  }
283.1483 ++	break;
283.1484 ++      case 3:
283.1485 ++	// 3 The sign immediately precedes the symbol.
283.1486 ++	if (__precedes)
283.1487 ++	  {
283.1488 ++	    __ret.field[0] = sign;
283.1489 ++	    __ret.field[1] = symbol;	    
283.1490 ++	    if (__space)
283.1491 ++	      {
283.1492 ++		__ret.field[2] = space;
283.1493 ++		__ret.field[3] = value;
283.1494 ++	      }
283.1495 ++	    else
283.1496 ++	      {
283.1497 ++		__ret.field[2] = value;		
283.1498 ++		__ret.field[3] = none;
283.1499 ++	      }
283.1500 ++	  }
283.1501 ++	else
283.1502 ++	  {
283.1503 ++	    __ret.field[0] = value;
283.1504 ++	    if (__space)
283.1505 ++	      {
283.1506 ++		__ret.field[1] = space;
283.1507 ++		__ret.field[2] = sign;
283.1508 ++		__ret.field[3] = symbol;
283.1509 ++	      }
283.1510 ++	    else
283.1511 ++	      {
283.1512 ++		__ret.field[1] = sign;
283.1513 ++		__ret.field[2] = symbol;
283.1514 ++		__ret.field[3] = none;
283.1515 ++	      }
283.1516 ++	  }
283.1517 ++	break;
283.1518 ++      case 4:
283.1519 ++	// 4 The sign immediately follows the symbol.
283.1520 ++	if (__precedes)
283.1521 ++	  {
283.1522 ++	    __ret.field[0] = symbol;
283.1523 ++	    __ret.field[1] = sign;
283.1524 ++	    if (__space)
283.1525 ++	      {
283.1526 ++		__ret.field[2] = space;
283.1527 ++		__ret.field[3] = value;
283.1528 ++	      }
283.1529 ++	    else
283.1530 ++	      {
283.1531 ++		__ret.field[2] = value;
283.1532 ++		__ret.field[3] = none;
283.1533 ++	      }
283.1534 ++	  }
283.1535 ++	else
283.1536 ++	  {
283.1537 ++	    __ret.field[0] = value;
283.1538 ++	    if (__space)
283.1539 ++	      {
283.1540 ++		__ret.field[1] = space;
283.1541 ++		__ret.field[2] = symbol;
283.1542 ++		__ret.field[3] = sign;
283.1543 ++	      }
283.1544 ++	    else
283.1545 ++	      {
283.1546 ++		__ret.field[1] = symbol;
283.1547 ++		__ret.field[2] = sign;
283.1548 ++		__ret.field[3] = none;
283.1549 ++	      }
283.1550 ++	  }
283.1551 ++	break;
283.1552 ++      default:
283.1553 ++	__ret = pattern();
283.1554 ++      }
283.1555 ++    return __ret;
283.1556 ++  }
283.1557 ++
283.1558 ++  template<> 
283.1559 ++    void
283.1560 ++    moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc, 
283.1561 ++						     const char*)
283.1562 ++    {
283.1563 ++      if (!_M_data)
283.1564 ++	_M_data = new __moneypunct_cache<char, true>;
283.1565 ++
283.1566 ++      if (!__cloc)
283.1567 ++	{
283.1568 ++	  // "C" locale
283.1569 ++	  _M_data->_M_decimal_point = '.';
283.1570 ++	  _M_data->_M_thousands_sep = ',';
283.1571 ++	  _M_data->_M_grouping = "";
283.1572 ++	  _M_data->_M_grouping_size = 0;
283.1573 ++	  _M_data->_M_curr_symbol = "";
283.1574 ++	  _M_data->_M_curr_symbol_size = 0;
283.1575 ++	  _M_data->_M_positive_sign = "";
283.1576 ++	  _M_data->_M_positive_sign_size = 0;
283.1577 ++	  _M_data->_M_negative_sign = "";
283.1578 ++	  _M_data->_M_negative_sign_size = 0;
283.1579 ++	  _M_data->_M_frac_digits = 0;
283.1580 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
283.1581 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
283.1582 ++
283.1583 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
283.1584 ++	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
283.1585 ++	}
283.1586 ++      else
283.1587 ++	{
283.1588 ++	  // Named locale.
283.1589 ++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
283.1590 ++							__cloc));
283.1591 ++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
283.1592 ++							__cloc));
283.1593 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
283.1594 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
283.1595 ++	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
283.1596 ++	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
283.1597 ++
283.1598 ++	  char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
283.1599 ++	  if (!__nposn)
283.1600 ++	    _M_data->_M_negative_sign = "()";
283.1601 ++	  else
283.1602 ++	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, 
283.1603 ++							__cloc);
283.1604 ++	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
283.1605 ++
283.1606 ++	  // _Intl == true
283.1607 ++	  _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
283.1608 ++	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
283.1609 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
283.1610 ++						      __cloc));
283.1611 ++	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
283.1612 ++	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
283.1613 ++	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
283.1614 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
283.1615 ++							__pposn);
283.1616 ++	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
283.1617 ++	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
283.1618 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
283.1619 ++							__nposn);
283.1620 ++	}
283.1621 ++    }
283.1622 ++
283.1623 ++  template<> 
283.1624 ++    void
283.1625 ++    moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, 
283.1626 ++						      const char*)
283.1627 ++    {
283.1628 ++      if (!_M_data)
283.1629 ++	_M_data = new __moneypunct_cache<char, false>;
283.1630 ++
283.1631 ++      if (!__cloc)
283.1632 ++	{
283.1633 ++	  // "C" locale
283.1634 ++	  _M_data->_M_decimal_point = '.';
283.1635 ++	  _M_data->_M_thousands_sep = ',';
283.1636 ++	  _M_data->_M_grouping = "";
283.1637 ++	  _M_data->_M_grouping_size = 0;
283.1638 ++	  _M_data->_M_curr_symbol = "";
283.1639 ++	  _M_data->_M_curr_symbol_size = 0;
283.1640 ++	  _M_data->_M_positive_sign = "";
283.1641 ++	  _M_data->_M_positive_sign_size = 0;
283.1642 ++	  _M_data->_M_negative_sign = "";
283.1643 ++	  _M_data->_M_negative_sign_size = 0;
283.1644 ++	  _M_data->_M_frac_digits = 0;
283.1645 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
283.1646 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
283.1647 ++
283.1648 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
283.1649 ++	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
283.1650 ++	}
283.1651 ++      else
283.1652 ++	{
283.1653 ++	  // Named locale.
283.1654 ++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
283.1655 ++							__cloc));
283.1656 ++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
283.1657 ++							__cloc));
283.1658 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
283.1659 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
283.1660 ++	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
283.1661 ++	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
283.1662 ++
283.1663 ++	  char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
283.1664 ++	  if (!__nposn)
283.1665 ++	    _M_data->_M_negative_sign = "()";
283.1666 ++	  else
283.1667 ++	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
283.1668 ++							__cloc);
283.1669 ++	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
283.1670 ++
283.1671 ++	  // _Intl == false
283.1672 ++	  _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
283.1673 ++	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
283.1674 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
283.1675 ++	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
283.1676 ++	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
283.1677 ++	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
283.1678 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
283.1679 ++							__pposn);
283.1680 ++	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
283.1681 ++	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
283.1682 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
283.1683 ++							__nposn);
283.1684 ++	}
283.1685 ++    }
283.1686 ++
283.1687 ++  template<> 
283.1688 ++    moneypunct<char, true>::~moneypunct()
283.1689 ++    { delete _M_data; }
283.1690 ++
283.1691 ++  template<> 
283.1692 ++    moneypunct<char, false>::~moneypunct()
283.1693 ++    { delete _M_data; }
283.1694 ++
283.1695 ++#ifdef _GLIBCXX_USE_WCHAR_T
283.1696 ++  template<> 
283.1697 ++    void
283.1698 ++    moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc, 
283.1699 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.1700 ++							const char*)
283.1701 ++#else
283.1702 ++							const char* __name)
283.1703 ++#endif
283.1704 ++    {
283.1705 ++      if (!_M_data)
283.1706 ++	_M_data = new __moneypunct_cache<wchar_t, true>;
283.1707 ++
283.1708 ++      if (!__cloc)
283.1709 ++	{
283.1710 ++	  // "C" locale
283.1711 ++	  _M_data->_M_decimal_point = L'.';
283.1712 ++	  _M_data->_M_thousands_sep = L',';
283.1713 ++	  _M_data->_M_grouping = "";
283.1714 ++	  _M_data->_M_grouping_size = 0;
283.1715 ++	  _M_data->_M_curr_symbol = L"";
283.1716 ++	  _M_data->_M_curr_symbol_size = 0;
283.1717 ++	  _M_data->_M_positive_sign = L"";
283.1718 ++	  _M_data->_M_positive_sign_size = 0;
283.1719 ++	  _M_data->_M_negative_sign = L"";
283.1720 ++	  _M_data->_M_negative_sign_size = 0;
283.1721 ++	  _M_data->_M_frac_digits = 0;
283.1722 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
283.1723 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
283.1724 ++
283.1725 ++	  // Use ctype::widen code without the facet...
283.1726 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
283.1727 ++	    _M_data->_M_atoms[__i] =
283.1728 ++	      static_cast<wchar_t>(money_base::_S_atoms[__i]);
283.1729 ++	}
283.1730 ++      else
283.1731 ++	{
283.1732 ++	  // Named locale.
283.1733 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.1734 ++	  __c_locale __old = __uselocale(__cloc);
283.1735 ++#else
283.1736 ++	  // Switch to named locale so that mbsrtowcs will work.
283.1737 ++	  char* __old = strdup(setlocale(LC_ALL, NULL));
283.1738 ++	  setlocale(LC_ALL, __name);
283.1739 ++#endif
283.1740 ++
283.1741 ++#ifdef __UCLIBC_MJN3_ONLY__
283.1742 ++#warning fix this... should be monetary
283.1743 ++#endif
283.1744 ++#ifdef __UCLIBC__
283.1745 ++# ifdef __UCLIBC_HAS_XLOCALE__
283.1746 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
283.1747 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
283.1748 ++# else
283.1749 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
283.1750 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
283.1751 ++# endif
283.1752 ++#else
283.1753 ++	  union { char *__s; wchar_t __w; } __u;
283.1754 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
283.1755 ++	  _M_data->_M_decimal_point = __u.__w;
283.1756 ++
283.1757 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
283.1758 ++	  _M_data->_M_thousands_sep = __u.__w;
283.1759 ++#endif
283.1760 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
283.1761 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
283.1762 ++
283.1763 ++	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
283.1764 ++	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
283.1765 ++	  const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
283.1766 ++
283.1767 ++	  wchar_t* __wcs_ps = 0;
283.1768 ++	  wchar_t* __wcs_ns = 0;
283.1769 ++	  const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
283.1770 ++	  try
283.1771 ++	    {
283.1772 ++	      mbstate_t __state;
283.1773 ++	      size_t __len = strlen(__cpossign);
283.1774 ++	      if (__len)
283.1775 ++		{
283.1776 ++		  ++__len;
283.1777 ++		  memset(&__state, 0, sizeof(mbstate_t));
283.1778 ++		  __wcs_ps = new wchar_t[__len];
283.1779 ++		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
283.1780 ++		  _M_data->_M_positive_sign = __wcs_ps;
283.1781 ++		}
283.1782 ++	      else
283.1783 ++		_M_data->_M_positive_sign = L"";
283.1784 ++	      _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
283.1785 ++	      
283.1786 ++	      __len = strlen(__cnegsign);
283.1787 ++	      if (!__nposn)
283.1788 ++		_M_data->_M_negative_sign = L"()";
283.1789 ++	      else if (__len)
283.1790 ++		{ 
283.1791 ++		  ++__len;
283.1792 ++		  memset(&__state, 0, sizeof(mbstate_t));
283.1793 ++		  __wcs_ns = new wchar_t[__len];
283.1794 ++		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
283.1795 ++		  _M_data->_M_negative_sign = __wcs_ns;
283.1796 ++		}
283.1797 ++	      else
283.1798 ++		_M_data->_M_negative_sign = L"";
283.1799 ++	      _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
283.1800 ++	      
283.1801 ++	      // _Intl == true.
283.1802 ++	      __len = strlen(__ccurr);
283.1803 ++	      if (__len)
283.1804 ++		{
283.1805 ++		  ++__len;
283.1806 ++		  memset(&__state, 0, sizeof(mbstate_t));
283.1807 ++		  wchar_t* __wcs = new wchar_t[__len];
283.1808 ++		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
283.1809 ++		  _M_data->_M_curr_symbol = __wcs;
283.1810 ++		}
283.1811 ++	      else
283.1812 ++		_M_data->_M_curr_symbol = L"";
283.1813 ++	      _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
283.1814 ++	    }
283.1815 ++	  catch (...)
283.1816 ++	    {
283.1817 ++	      delete _M_data;
283.1818 ++	      _M_data = 0;
283.1819 ++	      delete __wcs_ps;
283.1820 ++	      delete __wcs_ns;	      
283.1821 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.1822 ++	      __uselocale(__old);
283.1823 ++#else
283.1824 ++	      setlocale(LC_ALL, __old);
283.1825 ++	      free(__old);
283.1826 ++#endif
283.1827 ++	      __throw_exception_again;
283.1828 ++	    } 
283.1829 ++	  
283.1830 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
283.1831 ++						      __cloc));
283.1832 ++	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
283.1833 ++	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
283.1834 ++	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
283.1835 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
283.1836 ++							__pposn);
283.1837 ++	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
283.1838 ++	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
283.1839 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
283.1840 ++							__nposn);
283.1841 ++
283.1842 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.1843 ++	  __uselocale(__old);
283.1844 ++#else
283.1845 ++	  setlocale(LC_ALL, __old);
283.1846 ++	  free(__old);
283.1847 ++#endif
283.1848 ++	}
283.1849 ++    }
283.1850 ++
283.1851 ++  template<> 
283.1852 ++  void
283.1853 ++  moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
283.1854 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.1855 ++						       const char*)
283.1856 ++#else
283.1857 ++                                                       const char* __name)
283.1858 ++#endif
283.1859 ++  {
283.1860 ++    if (!_M_data)
283.1861 ++      _M_data = new __moneypunct_cache<wchar_t, false>;
283.1862 ++
283.1863 ++    if (!__cloc)
283.1864 ++	{
283.1865 ++	  // "C" locale
283.1866 ++	  _M_data->_M_decimal_point = L'.';
283.1867 ++	  _M_data->_M_thousands_sep = L',';
283.1868 ++	  _M_data->_M_grouping = "";
283.1869 ++          _M_data->_M_grouping_size = 0;
283.1870 ++	  _M_data->_M_curr_symbol = L"";
283.1871 ++	  _M_data->_M_curr_symbol_size = 0;
283.1872 ++	  _M_data->_M_positive_sign = L"";
283.1873 ++	  _M_data->_M_positive_sign_size = 0;
283.1874 ++	  _M_data->_M_negative_sign = L"";
283.1875 ++	  _M_data->_M_negative_sign_size = 0;
283.1876 ++	  _M_data->_M_frac_digits = 0;
283.1877 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
283.1878 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
283.1879 ++
283.1880 ++	  // Use ctype::widen code without the facet...
283.1881 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
283.1882 ++	    _M_data->_M_atoms[__i] =
283.1883 ++	      static_cast<wchar_t>(money_base::_S_atoms[__i]);
283.1884 ++	}
283.1885 ++      else
283.1886 ++	{
283.1887 ++	  // Named locale.
283.1888 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.1889 ++	  __c_locale __old = __uselocale(__cloc);
283.1890 ++#else
283.1891 ++	  // Switch to named locale so that mbsrtowcs will work.
283.1892 ++	  char* __old = strdup(setlocale(LC_ALL, NULL));
283.1893 ++	  setlocale(LC_ALL, __name);
283.1894 ++#endif
283.1895 ++
283.1896 ++#ifdef __UCLIBC_MJN3_ONLY__
283.1897 ++#warning fix this... should be monetary
283.1898 ++#endif
283.1899 ++#ifdef __UCLIBC__
283.1900 ++# ifdef __UCLIBC_HAS_XLOCALE__
283.1901 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
283.1902 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
283.1903 ++# else
283.1904 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
283.1905 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
283.1906 ++# endif
283.1907 ++#else
283.1908 ++          union { char *__s; wchar_t __w; } __u;
283.1909 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
283.1910 ++	  _M_data->_M_decimal_point = __u.__w;
283.1911 ++
283.1912 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
283.1913 ++	  _M_data->_M_thousands_sep = __u.__w;
283.1914 ++#endif
283.1915 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
283.1916 ++          _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
283.1917 ++
283.1918 ++	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
283.1919 ++	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
283.1920 ++	  const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
283.1921 ++
283.1922 ++	  wchar_t* __wcs_ps = 0;
283.1923 ++	  wchar_t* __wcs_ns = 0;
283.1924 ++	  const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
283.1925 ++	  try
283.1926 ++            {
283.1927 ++              mbstate_t __state;
283.1928 ++              size_t __len;
283.1929 ++              __len = strlen(__cpossign);
283.1930 ++              if (__len)
283.1931 ++                {
283.1932 ++		  ++__len;
283.1933 ++		  memset(&__state, 0, sizeof(mbstate_t));
283.1934 ++		  __wcs_ps = new wchar_t[__len];
283.1935 ++		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
283.1936 ++		  _M_data->_M_positive_sign = __wcs_ps;
283.1937 ++		}
283.1938 ++	      else
283.1939 ++		_M_data->_M_positive_sign = L"";
283.1940 ++              _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
283.1941 ++	      
283.1942 ++	      __len = strlen(__cnegsign);
283.1943 ++	      if (!__nposn)
283.1944 ++		_M_data->_M_negative_sign = L"()";
283.1945 ++	      else if (__len)
283.1946 ++		{ 
283.1947 ++		  ++__len;
283.1948 ++		  memset(&__state, 0, sizeof(mbstate_t));
283.1949 ++		  __wcs_ns = new wchar_t[__len];
283.1950 ++		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
283.1951 ++		  _M_data->_M_negative_sign = __wcs_ns;
283.1952 ++		}
283.1953 ++	      else
283.1954 ++		_M_data->_M_negative_sign = L"";
283.1955 ++              _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
283.1956 ++
283.1957 ++	      // _Intl == true.
283.1958 ++	      __len = strlen(__ccurr);
283.1959 ++	      if (__len)
283.1960 ++		{
283.1961 ++		  ++__len;
283.1962 ++		  memset(&__state, 0, sizeof(mbstate_t));
283.1963 ++		  wchar_t* __wcs = new wchar_t[__len];
283.1964 ++		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
283.1965 ++		  _M_data->_M_curr_symbol = __wcs;
283.1966 ++		}
283.1967 ++	      else
283.1968 ++		_M_data->_M_curr_symbol = L"";
283.1969 ++              _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
283.1970 ++	    }
283.1971 ++          catch (...)
283.1972 ++	    {
283.1973 ++	      delete _M_data;
283.1974 ++              _M_data = 0;
283.1975 ++	      delete __wcs_ps;
283.1976 ++	      delete __wcs_ns;	      
283.1977 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.1978 ++	      __uselocale(__old);
283.1979 ++#else
283.1980 ++	      setlocale(LC_ALL, __old);
283.1981 ++	      free(__old);
283.1982 ++#endif
283.1983 ++              __throw_exception_again;
283.1984 ++	    }
283.1985 ++
283.1986 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
283.1987 ++	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
283.1988 ++	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
283.1989 ++	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
283.1990 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
283.1991 ++	                                                __pposn);
283.1992 ++	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
283.1993 ++	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
283.1994 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
283.1995 ++	                                                __nposn);
283.1996 ++
283.1997 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.1998 ++	  __uselocale(__old);
283.1999 ++#else
283.2000 ++	  setlocale(LC_ALL, __old);
283.2001 ++	  free(__old);
283.2002 ++#endif
283.2003 ++	}
283.2004 ++    }
283.2005 ++
283.2006 ++  template<> 
283.2007 ++    moneypunct<wchar_t, true>::~moneypunct()
283.2008 ++    {
283.2009 ++      if (_M_data->_M_positive_sign_size)
283.2010 ++	delete [] _M_data->_M_positive_sign;
283.2011 ++      if (_M_data->_M_negative_sign_size
283.2012 ++          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
283.2013 ++	delete [] _M_data->_M_negative_sign;
283.2014 ++      if (_M_data->_M_curr_symbol_size)
283.2015 ++	delete [] _M_data->_M_curr_symbol;
283.2016 ++      delete _M_data;
283.2017 ++    }
283.2018 ++
283.2019 ++  template<> 
283.2020 ++    moneypunct<wchar_t, false>::~moneypunct()
283.2021 ++    {
283.2022 ++      if (_M_data->_M_positive_sign_size)
283.2023 ++	delete [] _M_data->_M_positive_sign;
283.2024 ++      if (_M_data->_M_negative_sign_size
283.2025 ++          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
283.2026 ++	delete [] _M_data->_M_negative_sign;
283.2027 ++      if (_M_data->_M_curr_symbol_size)
283.2028 ++	delete [] _M_data->_M_curr_symbol;
283.2029 ++      delete _M_data;
283.2030 ++    }
283.2031 ++#endif
283.2032 ++}
283.2033 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
283.2034 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/numeric_members.cc	1969-12-31 18:00:00.000000000 -0600
283.2035 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc	2005-04-28 01:20:20.000000000 -0500
283.2036 +@@ -0,0 +1,173 @@
283.2037 ++// std::numpunct implementation details, GNU version -*- C++ -*-
283.2038 ++
283.2039 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
283.2040 ++//
283.2041 ++// This file is part of the GNU ISO C++ Library.  This library is free
283.2042 ++// software; you can redistribute it and/or modify it under the
283.2043 ++// terms of the GNU General Public License as published by the
283.2044 ++// Free Software Foundation; either version 2, or (at your option)
283.2045 ++// any later version.
283.2046 ++
283.2047 ++// This library is distributed in the hope that it will be useful,
283.2048 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
283.2049 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
283.2050 ++// GNU General Public License for more details.
283.2051 ++
283.2052 ++// You should have received a copy of the GNU General Public License along
283.2053 ++// with this library; see the file COPYING.  If not, write to the Free
283.2054 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
283.2055 ++// USA.
283.2056 ++
283.2057 ++// As a special exception, you may use this file as part of a free software
283.2058 ++// library without restriction.  Specifically, if other files instantiate
283.2059 ++// templates or use macros or inline functions from this file, or you compile
283.2060 ++// this file and link it with other files to produce an executable, this
283.2061 ++// file does not by itself cause the resulting executable to be covered by
283.2062 ++// the GNU General Public License.  This exception does not however
283.2063 ++// invalidate any other reasons why the executable file might be covered by
283.2064 ++// the GNU General Public License.
283.2065 ++
283.2066 ++//
283.2067 ++// ISO C++ 14882: 22.2.3.1.2  numpunct virtual functions
283.2068 ++//
283.2069 ++
283.2070 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
283.2071 ++
283.2072 ++#define _LIBC
283.2073 ++#include <locale>
283.2074 ++#undef _LIBC
283.2075 ++#include <bits/c++locale_internal.h>
283.2076 ++
283.2077 ++#ifdef __UCLIBC_MJN3_ONLY__
283.2078 ++#warning tailor for stub locale support
283.2079 ++#endif
283.2080 ++#ifndef __UCLIBC_HAS_XLOCALE__
283.2081 ++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
283.2082 ++#endif
283.2083 ++
283.2084 ++namespace std
283.2085 ++{
283.2086 ++  template<> 
283.2087 ++    void
283.2088 ++    numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
283.2089 ++    {
283.2090 ++      if (!_M_data)
283.2091 ++	_M_data = new __numpunct_cache<char>;
283.2092 ++
283.2093 ++      if (!__cloc)
283.2094 ++	{
283.2095 ++	  // "C" locale
283.2096 ++	  _M_data->_M_grouping = "";
283.2097 ++	  _M_data->_M_grouping_size = 0;
283.2098 ++	  _M_data->_M_use_grouping = false;
283.2099 ++
283.2100 ++	  _M_data->_M_decimal_point = '.';
283.2101 ++	  _M_data->_M_thousands_sep = ',';
283.2102 ++
283.2103 ++	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
283.2104 ++	    _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
283.2105 ++
283.2106 ++	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
283.2107 ++	    _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
283.2108 ++	}
283.2109 ++      else
283.2110 ++	{
283.2111 ++	  // Named locale.
283.2112 ++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, 
283.2113 ++							__cloc));
283.2114 ++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, 
283.2115 ++							__cloc));
283.2116 ++
283.2117 ++	  // Check for NULL, which implies no grouping.
283.2118 ++	  if (_M_data->_M_thousands_sep == '\0')
283.2119 ++	    _M_data->_M_grouping = "";
283.2120 ++	  else
283.2121 ++	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
283.2122 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
283.2123 ++	}
283.2124 ++
283.2125 ++      // NB: There is no way to extact this info from posix locales.
283.2126 ++      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
283.2127 ++      _M_data->_M_truename = "true";
283.2128 ++      _M_data->_M_truename_size = 4;
283.2129 ++      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
283.2130 ++      _M_data->_M_falsename = "false";
283.2131 ++      _M_data->_M_falsename_size = 5;
283.2132 ++    }
283.2133 ++ 
283.2134 ++  template<> 
283.2135 ++    numpunct<char>::~numpunct()
283.2136 ++    { delete _M_data; }
283.2137 ++   
283.2138 ++#ifdef _GLIBCXX_USE_WCHAR_T
283.2139 ++  template<> 
283.2140 ++    void
283.2141 ++    numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
283.2142 ++    {
283.2143 ++      if (!_M_data)
283.2144 ++	_M_data = new __numpunct_cache<wchar_t>;
283.2145 ++
283.2146 ++      if (!__cloc)
283.2147 ++	{
283.2148 ++	  // "C" locale
283.2149 ++	  _M_data->_M_grouping = "";
283.2150 ++	  _M_data->_M_grouping_size = 0;
283.2151 ++	  _M_data->_M_use_grouping = false;
283.2152 ++
283.2153 ++	  _M_data->_M_decimal_point = L'.';
283.2154 ++	  _M_data->_M_thousands_sep = L',';
283.2155 ++
283.2156 ++	  // Use ctype::widen code without the facet...
283.2157 ++	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
283.2158 ++	    _M_data->_M_atoms_out[__i] =
283.2159 ++	      static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
283.2160 ++
283.2161 ++	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
283.2162 ++	    _M_data->_M_atoms_in[__j] =
283.2163 ++	      static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
283.2164 ++	}
283.2165 ++      else
283.2166 ++	{
283.2167 ++	  // Named locale.
283.2168 ++	  // NB: In the GNU model wchar_t is always 32 bit wide.
283.2169 ++#ifdef __UCLIBC_MJN3_ONLY__
283.2170 ++#warning fix this
283.2171 ++#endif
283.2172 ++#ifdef __UCLIBC__
283.2173 ++# ifdef __UCLIBC_HAS_XLOCALE__
283.2174 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
283.2175 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
283.2176 ++# else
283.2177 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
283.2178 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
283.2179 ++# endif
283.2180 ++#else
283.2181 ++	  union { char *__s; wchar_t __w; } __u;
283.2182 ++	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
283.2183 ++	  _M_data->_M_decimal_point = __u.__w;
283.2184 ++
283.2185 ++	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
283.2186 ++	  _M_data->_M_thousands_sep = __u.__w;
283.2187 ++#endif
283.2188 ++
283.2189 ++	  if (_M_data->_M_thousands_sep == L'\0')
283.2190 ++	    _M_data->_M_grouping = "";
283.2191 ++	  else
283.2192 ++	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
283.2193 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
283.2194 ++	}
283.2195 ++
283.2196 ++      // NB: There is no way to extact this info from posix locales.
283.2197 ++      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
283.2198 ++      _M_data->_M_truename = L"true";
283.2199 ++      _M_data->_M_truename_size = 4;
283.2200 ++      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
283.2201 ++      _M_data->_M_falsename = L"false";
283.2202 ++      _M_data->_M_falsename_size = 5;
283.2203 ++    }
283.2204 ++
283.2205 ++  template<> 
283.2206 ++    numpunct<wchar_t>::~numpunct()
283.2207 ++    { delete _M_data; }
283.2208 ++ #endif
283.2209 ++}
283.2210 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.cc
283.2211 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.cc	1969-12-31 18:00:00.000000000 -0600
283.2212 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.cc	2005-04-28 01:13:15.000000000 -0500
283.2213 +@@ -0,0 +1,406 @@
283.2214 ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
283.2215 ++
283.2216 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
283.2217 ++//
283.2218 ++// This file is part of the GNU ISO C++ Library.  This library is free
283.2219 ++// software; you can redistribute it and/or modify it under the
283.2220 ++// terms of the GNU General Public License as published by the
283.2221 ++// Free Software Foundation; either version 2, or (at your option)
283.2222 ++// any later version.
283.2223 ++
283.2224 ++// This library is distributed in the hope that it will be useful,
283.2225 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
283.2226 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
283.2227 ++// GNU General Public License for more details.
283.2228 ++
283.2229 ++// You should have received a copy of the GNU General Public License along
283.2230 ++// with this library; see the file COPYING.  If not, write to the Free
283.2231 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
283.2232 ++// USA.
283.2233 ++
283.2234 ++// As a special exception, you may use this file as part of a free software
283.2235 ++// library without restriction.  Specifically, if other files instantiate
283.2236 ++// templates or use macros or inline functions from this file, or you compile
283.2237 ++// this file and link it with other files to produce an executable, this
283.2238 ++// file does not by itself cause the resulting executable to be covered by
283.2239 ++// the GNU General Public License.  This exception does not however
283.2240 ++// invalidate any other reasons why the executable file might be covered by
283.2241 ++// the GNU General Public License.
283.2242 ++
283.2243 ++//
283.2244 ++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
283.2245 ++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
283.2246 ++//
283.2247 ++
283.2248 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
283.2249 ++
283.2250 ++#include <locale>
283.2251 ++#include <bits/c++locale_internal.h>
283.2252 ++
283.2253 ++#ifdef __UCLIBC_MJN3_ONLY__
283.2254 ++#warning tailor for stub locale support
283.2255 ++#endif
283.2256 ++#ifndef __UCLIBC_HAS_XLOCALE__
283.2257 ++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
283.2258 ++#endif
283.2259 ++
283.2260 ++namespace std
283.2261 ++{
283.2262 ++  template<>
283.2263 ++    void
283.2264 ++    __timepunct<char>::
283.2265 ++    _M_put(char* __s, size_t __maxlen, const char* __format, 
283.2266 ++	   const tm* __tm) const
283.2267 ++    {
283.2268 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.2269 ++      const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
283.2270 ++					_M_c_locale_timepunct);
283.2271 ++#else
283.2272 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
283.2273 ++      setlocale(LC_ALL, _M_name_timepunct);
283.2274 ++      const size_t __len = strftime(__s, __maxlen, __format, __tm);
283.2275 ++      setlocale(LC_ALL, __old);
283.2276 ++      free(__old);
283.2277 ++#endif
283.2278 ++      // Make sure __s is null terminated.
283.2279 ++      if (__len == 0)
283.2280 ++	__s[0] = '\0';
283.2281 ++    }
283.2282 ++
283.2283 ++  template<> 
283.2284 ++    void
283.2285 ++    __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
283.2286 ++    {
283.2287 ++      if (!_M_data)
283.2288 ++	_M_data = new __timepunct_cache<char>;
283.2289 ++
283.2290 ++      if (!__cloc)
283.2291 ++	{
283.2292 ++	  // "C" locale
283.2293 ++	  _M_c_locale_timepunct = _S_get_c_locale();
283.2294 ++
283.2295 ++	  _M_data->_M_date_format = "%m/%d/%y";
283.2296 ++	  _M_data->_M_date_era_format = "%m/%d/%y";
283.2297 ++	  _M_data->_M_time_format = "%H:%M:%S";
283.2298 ++	  _M_data->_M_time_era_format = "%H:%M:%S";
283.2299 ++	  _M_data->_M_date_time_format = "";
283.2300 ++	  _M_data->_M_date_time_era_format = "";
283.2301 ++	  _M_data->_M_am = "AM";
283.2302 ++	  _M_data->_M_pm = "PM";
283.2303 ++	  _M_data->_M_am_pm_format = "";
283.2304 ++
283.2305 ++	  // Day names, starting with "C"'s Sunday.
283.2306 ++	  _M_data->_M_day1 = "Sunday";
283.2307 ++	  _M_data->_M_day2 = "Monday";
283.2308 ++	  _M_data->_M_day3 = "Tuesday";
283.2309 ++	  _M_data->_M_day4 = "Wednesday";
283.2310 ++	  _M_data->_M_day5 = "Thursday";
283.2311 ++	  _M_data->_M_day6 = "Friday";
283.2312 ++	  _M_data->_M_day7 = "Saturday";
283.2313 ++
283.2314 ++	  // Abbreviated day names, starting with "C"'s Sun.
283.2315 ++	  _M_data->_M_aday1 = "Sun";
283.2316 ++	  _M_data->_M_aday2 = "Mon";
283.2317 ++	  _M_data->_M_aday3 = "Tue";
283.2318 ++	  _M_data->_M_aday4 = "Wed";
283.2319 ++	  _M_data->_M_aday5 = "Thu";
283.2320 ++	  _M_data->_M_aday6 = "Fri";
283.2321 ++	  _M_data->_M_aday7 = "Sat";
283.2322 ++
283.2323 ++	  // Month names, starting with "C"'s January.
283.2324 ++	  _M_data->_M_month01 = "January";
283.2325 ++	  _M_data->_M_month02 = "February";
283.2326 ++	  _M_data->_M_month03 = "March";
283.2327 ++	  _M_data->_M_month04 = "April";
283.2328 ++	  _M_data->_M_month05 = "May";
283.2329 ++	  _M_data->_M_month06 = "June";
283.2330 ++	  _M_data->_M_month07 = "July";
283.2331 ++	  _M_data->_M_month08 = "August";
283.2332 ++	  _M_data->_M_month09 = "September";
283.2333 ++	  _M_data->_M_month10 = "October";
283.2334 ++	  _M_data->_M_month11 = "November";
283.2335 ++	  _M_data->_M_month12 = "December";
283.2336 ++
283.2337 ++	  // Abbreviated month names, starting with "C"'s Jan.
283.2338 ++	  _M_data->_M_amonth01 = "Jan";
283.2339 ++	  _M_data->_M_amonth02 = "Feb";
283.2340 ++	  _M_data->_M_amonth03 = "Mar";
283.2341 ++	  _M_data->_M_amonth04 = "Apr";
283.2342 ++	  _M_data->_M_amonth05 = "May";
283.2343 ++	  _M_data->_M_amonth06 = "Jun";
283.2344 ++	  _M_data->_M_amonth07 = "Jul";
283.2345 ++	  _M_data->_M_amonth08 = "Aug";
283.2346 ++	  _M_data->_M_amonth09 = "Sep";
283.2347 ++	  _M_data->_M_amonth10 = "Oct";
283.2348 ++	  _M_data->_M_amonth11 = "Nov";
283.2349 ++	  _M_data->_M_amonth12 = "Dec";
283.2350 ++	}
283.2351 ++      else
283.2352 ++	{
283.2353 ++	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
283.2354 ++
283.2355 ++	  _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
283.2356 ++	  _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
283.2357 ++	  _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
283.2358 ++	  _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
283.2359 ++	  _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
283.2360 ++	  _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
283.2361 ++							     __cloc);
283.2362 ++	  _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
283.2363 ++	  _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
283.2364 ++	  _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
283.2365 ++
283.2366 ++	  // Day names, starting with "C"'s Sunday.
283.2367 ++	  _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
283.2368 ++	  _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
283.2369 ++	  _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
283.2370 ++	  _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
283.2371 ++	  _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
283.2372 ++	  _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
283.2373 ++	  _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
283.2374 ++
283.2375 ++	  // Abbreviated day names, starting with "C"'s Sun.
283.2376 ++	  _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
283.2377 ++	  _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
283.2378 ++	  _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
283.2379 ++	  _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
283.2380 ++	  _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
283.2381 ++	  _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
283.2382 ++	  _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
283.2383 ++
283.2384 ++	  // Month names, starting with "C"'s January.
283.2385 ++	  _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
283.2386 ++	  _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
283.2387 ++	  _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
283.2388 ++	  _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
283.2389 ++	  _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
283.2390 ++	  _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
283.2391 ++	  _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
283.2392 ++	  _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
283.2393 ++	  _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
283.2394 ++	  _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
283.2395 ++	  _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
283.2396 ++	  _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
283.2397 ++
283.2398 ++	  // Abbreviated month names, starting with "C"'s Jan.
283.2399 ++	  _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
283.2400 ++	  _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
283.2401 ++	  _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
283.2402 ++	  _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
283.2403 ++	  _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
283.2404 ++	  _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
283.2405 ++	  _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
283.2406 ++	  _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
283.2407 ++	  _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
283.2408 ++	  _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
283.2409 ++	  _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
283.2410 ++	  _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
283.2411 ++	}
283.2412 ++    }
283.2413 ++
283.2414 ++#ifdef _GLIBCXX_USE_WCHAR_T
283.2415 ++  template<>
283.2416 ++    void
283.2417 ++    __timepunct<wchar_t>::
283.2418 ++    _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, 
283.2419 ++	   const tm* __tm) const
283.2420 ++    {
283.2421 ++#ifdef __UCLIBC_HAS_XLOCALE__
283.2422 ++      __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
283.2423 ++      const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
283.2424 ++					_M_c_locale_timepunct);
283.2425 ++#else
283.2426 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
283.2427 ++      setlocale(LC_ALL, _M_name_timepunct);
283.2428 ++      const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
283.2429 ++      setlocale(LC_ALL, __old);
283.2430 ++      free(__old);
283.2431 ++#endif
283.2432 ++      // Make sure __s is null terminated.
283.2433 ++      if (__len == 0)
283.2434 ++	__s[0] = L'\0';
283.2435 ++    }
283.2436 ++
283.2437 ++  template<> 
283.2438 ++    void
283.2439 ++    __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
283.2440 ++    {
283.2441 ++      if (!_M_data)
283.2442 ++	_M_data = new __timepunct_cache<wchar_t>;
283.2443 ++
283.2444 ++#warning wide time stuff
283.2445 ++//       if (!__cloc)
283.2446 ++	{
283.2447 ++	  // "C" locale
283.2448 ++	  _M_c_locale_timepunct = _S_get_c_locale();
283.2449 ++
283.2450 ++	  _M_data->_M_date_format = L"%m/%d/%y";
283.2451 ++	  _M_data->_M_date_era_format = L"%m/%d/%y";
283.2452 ++	  _M_data->_M_time_format = L"%H:%M:%S";
283.2453 ++	  _M_data->_M_time_era_format = L"%H:%M:%S";
283.2454 ++	  _M_data->_M_date_time_format = L"";
283.2455 ++	  _M_data->_M_date_time_era_format = L"";
283.2456 ++	  _M_data->_M_am = L"AM";
283.2457 ++	  _M_data->_M_pm = L"PM";
283.2458 ++	  _M_data->_M_am_pm_format = L"";
283.2459 ++
283.2460 ++	  // Day names, starting with "C"'s Sunday.
283.2461 ++	  _M_data->_M_day1 = L"Sunday";
283.2462 ++	  _M_data->_M_day2 = L"Monday";
283.2463 ++	  _M_data->_M_day3 = L"Tuesday";
283.2464 ++	  _M_data->_M_day4 = L"Wednesday";
283.2465 ++	  _M_data->_M_day5 = L"Thursday";
283.2466 ++	  _M_data->_M_day6 = L"Friday";
283.2467 ++	  _M_data->_M_day7 = L"Saturday";
283.2468 ++
283.2469 ++	  // Abbreviated day names, starting with "C"'s Sun.
283.2470 ++	  _M_data->_M_aday1 = L"Sun";
283.2471 ++	  _M_data->_M_aday2 = L"Mon";
283.2472 ++	  _M_data->_M_aday3 = L"Tue";
283.2473 ++	  _M_data->_M_aday4 = L"Wed";
283.2474 ++	  _M_data->_M_aday5 = L"Thu";
283.2475 ++	  _M_data->_M_aday6 = L"Fri";
283.2476 ++	  _M_data->_M_aday7 = L"Sat";
283.2477 ++
283.2478 ++	  // Month names, starting with "C"'s January.
283.2479 ++	  _M_data->_M_month01 = L"January";
283.2480 ++	  _M_data->_M_month02 = L"February";
283.2481 ++	  _M_data->_M_month03 = L"March";
283.2482 ++	  _M_data->_M_month04 = L"April";
283.2483 ++	  _M_data->_M_month05 = L"May";
283.2484 ++	  _M_data->_M_month06 = L"June";
283.2485 ++	  _M_data->_M_month07 = L"July";
283.2486 ++	  _M_data->_M_month08 = L"August";
283.2487 ++	  _M_data->_M_month09 = L"September";
283.2488 ++	  _M_data->_M_month10 = L"October";
283.2489 ++	  _M_data->_M_month11 = L"November";
283.2490 ++	  _M_data->_M_month12 = L"December";
283.2491 ++
283.2492 ++	  // Abbreviated month names, starting with "C"'s Jan.
283.2493 ++	  _M_data->_M_amonth01 = L"Jan";
283.2494 ++	  _M_data->_M_amonth02 = L"Feb";
283.2495 ++	  _M_data->_M_amonth03 = L"Mar";
283.2496 ++	  _M_data->_M_amonth04 = L"Apr";
283.2497 ++	  _M_data->_M_amonth05 = L"May";
283.2498 ++	  _M_data->_M_amonth06 = L"Jun";
283.2499 ++	  _M_data->_M_amonth07 = L"Jul";
283.2500 ++	  _M_data->_M_amonth08 = L"Aug";
283.2501 ++	  _M_data->_M_amonth09 = L"Sep";
283.2502 ++	  _M_data->_M_amonth10 = L"Oct";
283.2503 ++	  _M_data->_M_amonth11 = L"Nov";
283.2504 ++	  _M_data->_M_amonth12 = L"Dec";
283.2505 ++	}
283.2506 ++#if 0
283.2507 ++      else
283.2508 ++	{
283.2509 ++	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
283.2510 ++
283.2511 ++	  union { char *__s; wchar_t *__w; } __u;
283.2512 ++
283.2513 ++	  __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
283.2514 ++	  _M_data->_M_date_format = __u.__w;
283.2515 ++	  __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
283.2516 ++	  _M_data->_M_date_era_format = __u.__w;
283.2517 ++	  __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
283.2518 ++	  _M_data->_M_time_format = __u.__w;
283.2519 ++	  __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
283.2520 ++	  _M_data->_M_time_era_format = __u.__w;
283.2521 ++	  __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
283.2522 ++	  _M_data->_M_date_time_format = __u.__w;
283.2523 ++	  __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
283.2524 ++	  _M_data->_M_date_time_era_format = __u.__w;
283.2525 ++	  __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
283.2526 ++	  _M_data->_M_am = __u.__w;
283.2527 ++	  __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
283.2528 ++	  _M_data->_M_pm = __u.__w;
283.2529 ++	  __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
283.2530 ++	  _M_data->_M_am_pm_format = __u.__w;
283.2531 ++
283.2532 ++	  // Day names, starting with "C"'s Sunday.
283.2533 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
283.2534 ++	  _M_data->_M_day1 = __u.__w;
283.2535 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
283.2536 ++	  _M_data->_M_day2 = __u.__w;
283.2537 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
283.2538 ++	  _M_data->_M_day3 = __u.__w;
283.2539 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
283.2540 ++	  _M_data->_M_day4 = __u.__w;
283.2541 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
283.2542 ++	  _M_data->_M_day5 = __u.__w;
283.2543 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
283.2544 ++	  _M_data->_M_day6 = __u.__w;
283.2545 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
283.2546 ++	  _M_data->_M_day7 = __u.__w;
283.2547 ++
283.2548 ++	  // Abbreviated day names, starting with "C"'s Sun.
283.2549 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
283.2550 ++	  _M_data->_M_aday1 = __u.__w;
283.2551 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
283.2552 ++	  _M_data->_M_aday2 = __u.__w;
283.2553 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
283.2554 ++	  _M_data->_M_aday3 = __u.__w;
283.2555 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
283.2556 ++	  _M_data->_M_aday4 = __u.__w;
283.2557 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
283.2558 ++	  _M_data->_M_aday5 = __u.__w;
283.2559 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
283.2560 ++	  _M_data->_M_aday6 = __u.__w;
283.2561 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
283.2562 ++	  _M_data->_M_aday7 = __u.__w;
283.2563 ++
283.2564 ++	  // Month names, starting with "C"'s January.
283.2565 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
283.2566 ++	  _M_data->_M_month01 = __u.__w;
283.2567 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
283.2568 ++	  _M_data->_M_month02 = __u.__w;
283.2569 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
283.2570 ++	  _M_data->_M_month03 = __u.__w;
283.2571 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
283.2572 ++	  _M_data->_M_month04 = __u.__w;
283.2573 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
283.2574 ++	  _M_data->_M_month05 = __u.__w;
283.2575 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
283.2576 ++	  _M_data->_M_month06 = __u.__w;
283.2577 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
283.2578 ++	  _M_data->_M_month07 = __u.__w;
283.2579 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
283.2580 ++	  _M_data->_M_month08 = __u.__w;
283.2581 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
283.2582 ++	  _M_data->_M_month09 = __u.__w;
283.2583 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
283.2584 ++	  _M_data->_M_month10 = __u.__w;
283.2585 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
283.2586 ++	  _M_data->_M_month11 = __u.__w;
283.2587 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
283.2588 ++	  _M_data->_M_month12 = __u.__w;
283.2589 ++
283.2590 ++	  // Abbreviated month names, starting with "C"'s Jan.
283.2591 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
283.2592 ++	  _M_data->_M_amonth01 = __u.__w;
283.2593 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
283.2594 ++	  _M_data->_M_amonth02 = __u.__w;
283.2595 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
283.2596 ++	  _M_data->_M_amonth03 = __u.__w;
283.2597 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
283.2598 ++	  _M_data->_M_amonth04 = __u.__w;
283.2599 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
283.2600 ++	  _M_data->_M_amonth05 = __u.__w;
283.2601 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
283.2602 ++	  _M_data->_M_amonth06 = __u.__w;
283.2603 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
283.2604 ++	  _M_data->_M_amonth07 = __u.__w;
283.2605 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
283.2606 ++	  _M_data->_M_amonth08 = __u.__w;
283.2607 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
283.2608 ++	  _M_data->_M_amonth09 = __u.__w;
283.2609 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
283.2610 ++	  _M_data->_M_amonth10 = __u.__w;
283.2611 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
283.2612 ++	  _M_data->_M_amonth11 = __u.__w;
283.2613 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
283.2614 ++	  _M_data->_M_amonth12 = __u.__w;
283.2615 ++	}
283.2616 ++#endif // 0
283.2617 ++    }
283.2618 ++#endif
283.2619 ++}
283.2620 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.h
283.2621 +--- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.h	1969-12-31 18:00:00.000000000 -0600
283.2622 ++++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.h	2004-05-22 18:46:31.000000000 -0500
283.2623 +@@ -0,0 +1,68 @@
283.2624 ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
283.2625 ++
283.2626 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
283.2627 ++//
283.2628 ++// This file is part of the GNU ISO C++ Library.  This library is free
283.2629 ++// software; you can redistribute it and/or modify it under the
283.2630 ++// terms of the GNU General Public License as published by the
283.2631 ++// Free Software Foundation; either version 2, or (at your option)
283.2632 ++// any later version.
283.2633 ++
283.2634 ++// This library is distributed in the hope that it will be useful,
283.2635 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
283.2636 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
283.2637 ++// GNU General Public License for more details.
283.2638 ++
283.2639 ++// You should have received a copy of the GNU General Public License along
283.2640 ++// with this library; see the file COPYING.  If not, write to the Free
283.2641 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
283.2642 ++// USA.
283.2643 ++
283.2644 ++// As a special exception, you may use this file as part of a free software
283.2645 ++// library without restriction.  Specifically, if other files instantiate
283.2646 ++// templates or use macros or inline functions from this file, or you compile
283.2647 ++// this file and link it with other files to produce an executable, this
283.2648 ++// file does not by itself cause the resulting executable to be covered by
283.2649 ++// the GNU General Public License.  This exception does not however
283.2650 ++// invalidate any other reasons why the executable file might be covered by
283.2651 ++// the GNU General Public License.
283.2652 ++
283.2653 ++//
283.2654 ++// ISO C++ 14882: 22.2.5.1.2 - time_get functions
283.2655 ++// ISO C++ 14882: 22.2.5.3.2 - time_put functions
283.2656 ++//
283.2657 ++
283.2658 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
283.2659 ++
283.2660 ++  template<typename _CharT>
283.2661 ++    __timepunct<_CharT>::__timepunct(size_t __refs) 
283.2662 ++    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
283.2663 ++    _M_name_timepunct(_S_get_c_name())
283.2664 ++    { _M_initialize_timepunct(); }
283.2665 ++
283.2666 ++  template<typename _CharT>
283.2667 ++    __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) 
283.2668 ++    : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), 
283.2669 ++    _M_name_timepunct(_S_get_c_name())
283.2670 ++    { _M_initialize_timepunct(); }
283.2671 ++
283.2672 ++  template<typename _CharT>
283.2673 ++    __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
283.2674 ++				     size_t __refs) 
283.2675 ++    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
283.2676 ++    _M_name_timepunct(__s)
283.2677 ++    { 
283.2678 ++      char* __tmp = new char[std::strlen(__s) + 1];
283.2679 ++      std::strcpy(__tmp, __s);
283.2680 ++      _M_name_timepunct = __tmp;
283.2681 ++      _M_initialize_timepunct(__cloc); 
283.2682 ++    }
283.2683 ++
283.2684 ++  template<typename _CharT>
283.2685 ++    __timepunct<_CharT>::~__timepunct()
283.2686 ++    { 
283.2687 ++      if (_M_name_timepunct != _S_get_c_name())
283.2688 ++	delete [] _M_name_timepunct;
283.2689 ++      delete _M_data; 
283.2690 ++      _S_destroy_c_locale(_M_c_locale_timepunct); 
283.2691 ++    }
283.2692 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_base.h
283.2693 +--- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_base.h	1969-12-31 18:00:00.000000000 -0600
283.2694 ++++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_base.h	2005-04-28 01:10:27.000000000 -0500
283.2695 +@@ -0,0 +1,64 @@
283.2696 ++// Locale support -*- C++ -*-
283.2697 ++
283.2698 ++// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004
283.2699 ++// Free Software Foundation, Inc.
283.2700 ++//
283.2701 ++// This file is part of the GNU ISO C++ Library.  This library is free
283.2702 ++// software; you can redistribute it and/or modify it under the
283.2703 ++// terms of the GNU General Public License as published by the
283.2704 ++// Free Software Foundation; either version 2, or (at your option)
283.2705 ++// any later version.
283.2706 ++
283.2707 ++// This library is distributed in the hope that it will be useful,
283.2708 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
283.2709 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
283.2710 ++// GNU General Public License for more details.
283.2711 ++
283.2712 ++// You should have received a copy of the GNU General Public License along
283.2713 ++// with this library; see the file COPYING.  If not, write to the Free
283.2714 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
283.2715 ++// USA.
283.2716 ++
283.2717 ++// As a special exception, you may use this file as part of a free software
283.2718 ++// library without restriction.  Specifically, if other files instantiate
283.2719 ++// templates or use macros or inline functions from this file, or you compile
283.2720 ++// this file and link it with other files to produce an executable, this
283.2721 ++// file does not by itself cause the resulting executable to be covered by
283.2722 ++// the GNU General Public License.  This exception does not however
283.2723 ++// invalidate any other reasons why the executable file might be covered by
283.2724 ++// the GNU General Public License.
283.2725 ++
283.2726 ++//
283.2727 ++// ISO C++ 14882: 22.1  Locales
283.2728 ++//
283.2729 ++  
283.2730 ++/** @file ctype_base.h
283.2731 ++ *  This is an internal header file, included by other library headers.
283.2732 ++ *  You should not attempt to use it directly.
283.2733 ++ */
283.2734 ++
283.2735 ++// Information as gleaned from /usr/include/ctype.h
283.2736 ++  
283.2737 ++  /// @brief  Base class for ctype.
283.2738 ++  struct ctype_base
283.2739 ++  {
283.2740 ++    // Note: In uClibc, the following two types depend on configuration.
283.2741 ++ 
283.2742 ++    // Non-standard typedefs.
283.2743 ++    typedef const __ctype_touplow_t* __to_type;
283.2744 ++
283.2745 ++    // NB: Offsets into ctype<char>::_M_table force a particular size
283.2746 ++    // on the mask type. Because of this, we don't use an enum.
283.2747 ++    typedef __ctype_mask_t	mask;   
283.2748 ++    static const mask upper    	= _ISupper;
283.2749 ++    static const mask lower 	= _ISlower;
283.2750 ++    static const mask alpha 	= _ISalpha;
283.2751 ++    static const mask digit 	= _ISdigit;
283.2752 ++    static const mask xdigit 	= _ISxdigit;
283.2753 ++    static const mask space 	= _ISspace;
283.2754 ++    static const mask print 	= _ISprint;
283.2755 ++    static const mask graph 	= _ISalpha | _ISdigit | _ISpunct;
283.2756 ++    static const mask cntrl 	= _IScntrl;
283.2757 ++    static const mask punct 	= _ISpunct;
283.2758 ++    static const mask alnum 	= _ISalpha | _ISdigit;
283.2759 ++  };
283.2760 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_inline.h
283.2761 +--- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_inline.h	1969-12-31 18:00:00.000000000 -0600
283.2762 ++++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_inline.h	2002-06-24 00:49:19.000000000 -0500
283.2763 +@@ -0,0 +1,69 @@
283.2764 ++// Locale support -*- C++ -*-
283.2765 ++
283.2766 ++// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
283.2767 ++//
283.2768 ++// This file is part of the GNU ISO C++ Library.  This library is free
283.2769 ++// software; you can redistribute it and/or modify it under the
283.2770 ++// terms of the GNU General Public License as published by the
283.2771 ++// Free Software Foundation; either version 2, or (at your option)
283.2772 ++// any later version.
283.2773 ++
283.2774 ++// This library is distributed in the hope that it will be useful,
283.2775 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
283.2776 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
283.2777 ++// GNU General Public License for more details.
283.2778 ++
283.2779 ++// You should have received a copy of the GNU General Public License along
283.2780 ++// with this library; see the file COPYING.  If not, write to the Free
283.2781 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
283.2782 ++// USA.
283.2783 ++
283.2784 ++// As a special exception, you may use this file as part of a free software
283.2785 ++// library without restriction.  Specifically, if other files instantiate
283.2786 ++// templates or use macros or inline functions from this file, or you compile
283.2787 ++// this file and link it with other files to produce an executable, this
283.2788 ++// file does not by itself cause the resulting executable to be covered by
283.2789 ++// the GNU General Public License.  This exception does not however
283.2790 ++// invalidate any other reasons why the executable file might be covered by
283.2791 ++// the GNU General Public License.
283.2792 ++
283.2793 ++//
283.2794 ++// ISO C++ 14882: 22.1  Locales
283.2795 ++//
283.2796 ++  
283.2797 ++// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
283.2798 ++// functions go in ctype.cc
283.2799 ++  
283.2800 ++  bool
283.2801 ++  ctype<char>::
283.2802 ++  is(mask __m, char __c) const
283.2803 ++  { return _M_table[static_cast<unsigned char>(__c)] & __m; }
283.2804 ++
283.2805 ++  const char*
283.2806 ++  ctype<char>::
283.2807 ++  is(const char* __low, const char* __high, mask* __vec) const
283.2808 ++  {
283.2809 ++    while (__low < __high)
283.2810 ++      *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
283.2811 ++    return __high;
283.2812 ++  }
283.2813 ++
283.2814 ++  const char*
283.2815 ++  ctype<char>::
283.2816 ++  scan_is(mask __m, const char* __low, const char* __high) const
283.2817 ++  {
283.2818 ++    while (__low < __high 
283.2819 ++	   && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
283.2820 ++      ++__low;
283.2821 ++    return __low;
283.2822 ++  }
283.2823 ++
283.2824 ++  const char*
283.2825 ++  ctype<char>::
283.2826 ++  scan_not(mask __m, const char* __low, const char* __high) const
283.2827 ++  {
283.2828 ++    while (__low < __high 
283.2829 ++	   && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
283.2830 ++      ++__low;
283.2831 ++    return __low;
283.2832 ++  }
283.2833 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h
283.2834 +--- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_noninline.h	1969-12-31 18:00:00.000000000 -0600
283.2835 ++++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h	2005-04-28 01:10:27.000000000 -0500
283.2836 +@@ -0,0 +1,92 @@
283.2837 ++// Locale support -*- C++ -*-
283.2838 ++
283.2839 ++// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
283.2840 ++// Free Software Foundation, Inc.
283.2841 ++//
283.2842 ++// This file is part of the GNU ISO C++ Library.  This library is free
283.2843 ++// software; you can redistribute it and/or modify it under the
283.2844 ++// terms of the GNU General Public License as published by the
283.2845 ++// Free Software Foundation; either version 2, or (at your option)
283.2846 ++// any later version.
283.2847 ++
283.2848 ++// This library is distributed in the hope that it will be useful,
283.2849 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
283.2850 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
283.2851 ++// GNU General Public License for more details.
283.2852 ++
283.2853 ++// You should have received a copy of the GNU General Public License along
283.2854 ++// with this library; see the file COPYING.  If not, write to the Free
283.2855 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
283.2856 ++// USA.
283.2857 ++
283.2858 ++// As a special exception, you may use this file as part of a free software
283.2859 ++// library without restriction.  Specifically, if other files instantiate
283.2860 ++// templates or use macros or inline functions from this file, or you compile
283.2861 ++// this file and link it with other files to produce an executable, this
283.2862 ++// file does not by itself cause the resulting executable to be covered by
283.2863 ++// the GNU General Public License.  This exception does not however
283.2864 ++// invalidate any other reasons why the executable file might be covered by
283.2865 ++// the GNU General Public License.
283.2866 ++
283.2867 ++//
283.2868 ++// ISO C++ 14882: 22.1  Locales
283.2869 ++//
283.2870 ++  
283.2871 ++// Information as gleaned from /usr/include/ctype.h
283.2872 ++
283.2873 ++  const ctype_base::mask*
283.2874 ++  ctype<char>::classic_table() throw()
283.2875 ++  { return __C_ctype_b; }
283.2876 ++
283.2877 ++  ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
283.2878 ++		     size_t __refs) 
283.2879 ++  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
283.2880 ++  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
283.2881 ++  {
283.2882 ++    _M_toupper = __C_ctype_toupper;
283.2883 ++    _M_tolower = __C_ctype_tolower;
283.2884 ++    _M_table = __table ? __table : __C_ctype_b;
283.2885 ++    memset(_M_widen, 0, sizeof(_M_widen));
283.2886 ++    memset(_M_narrow, 0, sizeof(_M_narrow));
283.2887 ++  }
283.2888 ++
283.2889 ++  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
283.2890 ++  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
283.2891 ++  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
283.2892 ++  {
283.2893 ++    _M_toupper = __C_ctype_toupper;
283.2894 ++    _M_tolower = __C_ctype_tolower;
283.2895 ++    _M_table = __table ? __table : __C_ctype_b;
283.2896 ++    memset(_M_widen, 0, sizeof(_M_widen));
283.2897 ++    memset(_M_narrow, 0, sizeof(_M_narrow));
283.2898 ++  }
283.2899 ++
283.2900 ++  char
283.2901 ++  ctype<char>::do_toupper(char __c) const
283.2902 ++  { return _M_toupper[static_cast<unsigned char>(__c)]; }
283.2903 ++
283.2904 ++  const char*
283.2905 ++  ctype<char>::do_toupper(char* __low, const char* __high) const
283.2906 ++  {
283.2907 ++    while (__low < __high)
283.2908 ++      {
283.2909 ++	*__low = _M_toupper[static_cast<unsigned char>(*__low)];
283.2910 ++	++__low;
283.2911 ++      }
283.2912 ++    return __high;
283.2913 ++  }
283.2914 ++
283.2915 ++  char
283.2916 ++  ctype<char>::do_tolower(char __c) const
283.2917 ++  { return _M_tolower[static_cast<unsigned char>(__c)]; }
283.2918 ++
283.2919 ++  const char* 
283.2920 ++  ctype<char>::do_tolower(char* __low, const char* __high) const
283.2921 ++  {
283.2922 ++    while (__low < __high)
283.2923 ++      {
283.2924 ++	*__low = _M_tolower[static_cast<unsigned char>(*__low)];
283.2925 ++	++__low;
283.2926 ++      }
283.2927 ++    return __high;
283.2928 ++  }
283.2929 +diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/os_defines.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/os_defines.h
283.2930 +--- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/os_defines.h	1969-12-31 18:00:00.000000000 -0600
283.2931 ++++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/os_defines.h	2005-04-28 01:10:27.000000000 -0500
283.2932 +@@ -0,0 +1,44 @@
283.2933 ++// Specific definitions for GNU/Linux  -*- C++ -*-
283.2934 ++
283.2935 ++// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
283.2936 ++//
283.2937 ++// This file is part of the GNU ISO C++ Library.  This library is free
283.2938 ++// software; you can redistribute it and/or modify it under the
283.2939 ++// terms of the GNU General Public License as published by the
283.2940 ++// Free Software Foundation; either version 2, or (at your option)
283.2941 ++// any later version.
283.2942 ++
283.2943 ++// This library is distributed in the hope that it will be useful,
283.2944 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
283.2945 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
283.2946 ++// GNU General Public License for more details.
283.2947 ++
283.2948 ++// You should have received a copy of the GNU General Public License along
283.2949 ++// with this library; see the file COPYING.  If not, write to the Free
283.2950 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
283.2951 ++// USA.
283.2952 ++
283.2953 ++// As a special exception, you may use this file as part of a free software
283.2954 ++// library without restriction.  Specifically, if other files instantiate
283.2955 ++// templates or use macros or inline functions from this file, or you compile
283.2956 ++// this file and link it with other files to produce an executable, this
283.2957 ++// file does not by itself cause the resulting executable to be covered by
283.2958 ++// the GNU General Public License.  This exception does not however
283.2959 ++// invalidate any other reasons why the executable file might be covered by
283.2960 ++// the GNU General Public License.
283.2961 ++
283.2962 ++#ifndef _GLIBCXX_OS_DEFINES
283.2963 ++#define _GLIBCXX_OS_DEFINES 1
283.2964 ++
283.2965 ++// System-specific #define, typedefs, corrections, etc, go here.  This
283.2966 ++// file will come before all others.
283.2967 ++
283.2968 ++// This keeps isanum, et al from being propagated as macros.
283.2969 ++#define __NO_CTYPE 1
283.2970 ++
283.2971 ++#include <features.h>
283.2972 ++
283.2973 ++// We must not see the optimized string functions GNU libc defines.
283.2974 ++#define __NO_STRING_INLINES
283.2975 ++
283.2976 ++#endif
283.2977 +diff -urN gcc-4.0.0-100/libstdc++-v3/configure gcc-4.0.0/libstdc++-v3/configure
283.2978 +--- gcc-4.0.0-100/libstdc++-v3/configure	2005-04-30 13:06:53.683055232 -0500
283.2979 ++++ gcc-4.0.0/libstdc++-v3/configure	2005-04-30 12:24:24.000000000 -0500
283.2980 +@@ -3998,6 +3998,11 @@
283.2981 +   lt_cv_deplibs_check_method=pass_all
283.2982 +   ;;
283.2983 + 
283.2984 ++linux-uclibc*)
283.2985 ++  lt_cv_deplibs_check_method=pass_all
283.2986 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
283.2987 ++  ;;
283.2988 ++
283.2989 + netbsd* | knetbsd*-gnu)
283.2990 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
283.2991 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
283.2992 +@@ -5672,7 +5677,7 @@
283.2993 +   enableval="$enable_clocale"
283.2994 + 
283.2995 +       case "$enableval" in
283.2996 +-       generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
283.2997 ++       generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
283.2998 +        *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
283.2999 + echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
283.3000 +    { (exit 1); exit 1; }; } ;;
283.3001 +@@ -5697,6 +5702,9 @@
283.3002 +   # Default to "generic".
283.3003 +   if test $enable_clocale_flag = auto; then
283.3004 +     case ${target_os} in
283.3005 ++      linux-uclibc*)
283.3006 ++	enable_clocale_flag=uclibc
283.3007 ++	;;
283.3008 +       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
283.3009 +         cat >conftest.$ac_ext <<_ACEOF
283.3010 + /* confdefs.h.  */
283.3011 +@@ -5927,6 +5935,76 @@
283.3012 +       CTIME_CC=config/locale/generic/time_members.cc
283.3013 +       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
283.3014 +       ;;
283.3015 ++    uclibc)
283.3016 ++      echo "$as_me:$LINENO: result: uclibc" >&5
283.3017 ++echo "${ECHO_T}uclibc" >&6
283.3018 ++
283.3019 ++      # Declare intention to use gettext, and add support for specific
283.3020 ++      # languages.
283.3021 ++      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
283.3022 ++      ALL_LINGUAS="de fr"
283.3023 ++
283.3024 ++      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
283.3025 ++      # Extract the first word of "msgfmt", so it can be a program name with args.
283.3026 ++set dummy msgfmt; ac_word=$2
283.3027 ++echo "$as_me:$LINENO: checking for $ac_word" >&5
283.3028 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
283.3029 ++if test "${ac_cv_prog_check_msgfmt+set}" = set; then
283.3030 ++  echo $ECHO_N "(cached) $ECHO_C" >&6
283.3031 ++else
283.3032 ++  if test -n "$check_msgfmt"; then
283.3033 ++  ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
283.3034 ++else
283.3035 ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
283.3036 ++for as_dir in $PATH
283.3037 ++do
283.3038 ++  IFS=$as_save_IFS
283.3039 ++  test -z "$as_dir" && as_dir=.
283.3040 ++  for ac_exec_ext in '' $ac_executable_extensions; do
283.3041 ++  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
283.3042 ++    ac_cv_prog_check_msgfmt="yes"
283.3043 ++    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
283.3044 ++    break 2
283.3045 ++  fi
283.3046 ++done
283.3047 ++done
283.3048 ++
283.3049 ++  test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
283.3050 ++fi
283.3051 ++fi
283.3052 ++check_msgfmt=$ac_cv_prog_check_msgfmt
283.3053 ++if test -n "$check_msgfmt"; then
283.3054 ++  echo "$as_me:$LINENO: result: $check_msgfmt" >&5
283.3055 ++echo "${ECHO_T}$check_msgfmt" >&6
283.3056 ++else
283.3057 ++  echo "$as_me:$LINENO: result: no" >&5
283.3058 ++echo "${ECHO_T}no" >&6
283.3059 ++fi
283.3060 ++
283.3061 ++      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
283.3062 ++        USE_NLS=yes
283.3063 ++      fi
283.3064 ++      # Export the build objects.
283.3065 ++      for ling in $ALL_LINGUAS; do \
283.3066 ++        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
283.3067 ++        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
283.3068 ++      done
283.3069 ++
283.3070 ++
283.3071 ++
283.3072 ++      CLOCALE_H=config/locale/uclibc/c_locale.h
283.3073 ++      CLOCALE_CC=config/locale/uclibc/c_locale.cc
283.3074 ++      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
283.3075 ++      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
283.3076 ++      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
283.3077 ++      CMESSAGES_H=config/locale/uclibc/messages_members.h
283.3078 ++      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
283.3079 ++      CMONEY_CC=config/locale/uclibc/monetary_members.cc
283.3080 ++      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
283.3081 ++      CTIME_H=config/locale/uclibc/time_members.h
283.3082 ++      CTIME_CC=config/locale/uclibc/time_members.cc
283.3083 ++      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
283.3084 ++      ;;
283.3085 +   esac
283.3086 + 
283.3087 +   # This is where the testsuite looks for locale catalogs, using the
283.3088 +diff -urN gcc-4.0.0-100/libstdc++-v3/configure.host gcc-4.0.0/libstdc++-v3/configure.host
283.3089 +--- gcc-4.0.0-100/libstdc++-v3/configure.host	2005-04-30 13:06:53.688054472 -0500
283.3090 ++++ gcc-4.0.0/libstdc++-v3/configure.host	2005-04-28 20:20:32.000000000 -0500
283.3091 +@@ -249,6 +249,12 @@
283.3092 +     ;;
283.3093 + esac
283.3094 + 
283.3095 ++# Override for uClibc since linux-uclibc gets mishandled above.
283.3096 ++case "${host_os}" in
283.3097 ++  *-uclibc*)
283.3098 ++    os_include_dir="os/uclibc"
283.3099 ++    ;;
283.3100 ++esac
283.3101 + 
283.3102 + # Set any OS-dependent and CPU-dependent bits.
283.3103 + # THIS TABLE IS SORTED.  KEEP IT THAT WAY.
283.3104 +diff -urN gcc-4.0.0-100/libstdc++-v3/crossconfig.m4 gcc-4.0.0/libstdc++-v3/crossconfig.m4
283.3105 +--- gcc-4.0.0-100/libstdc++-v3/crossconfig.m4	2005-04-30 13:06:53.689054320 -0500
283.3106 ++++ gcc-4.0.0/libstdc++-v3/crossconfig.m4	2005-04-28 20:27:15.000000000 -0500
283.3107 +@@ -142,6 +142,98 @@
283.3108 + 	;;
283.3109 +     esac
283.3110 +     ;;
283.3111 ++  *-uclibc*)
283.3112 ++# Temporary hack until we implement the float versions of the libm funcs
283.3113 ++    AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
283.3114 ++      machine/endian.h machine/param.h sys/machine.h sys/types.h \
283.3115 ++      fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
283.3116 ++    SECTION_FLAGS='-ffunction-sections -fdata-sections'
283.3117 ++    AC_SUBST(SECTION_FLAGS)
283.3118 ++    GLIBCXX_CHECK_LINKER_FEATURES
283.3119 ++    GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
283.3120 ++    GLIBCXX_CHECK_WCHAR_T_SUPPORT
283.3121 ++
283.3122 ++    # For LFS.
283.3123 ++    AC_DEFINE(HAVE_INT64_T)
283.3124 ++    case "$target" in
283.3125 ++      *-uclinux*)
283.3126 ++        # Don't enable LFS with uClinux
283.3127 ++        ;;
283.3128 ++      *)
283.3129 ++        AC_DEFINE(_GLIBCXX_USE_LFS)
283.3130 ++    esac
283.3131 ++
283.3132 ++    # For showmanyc_helper().
283.3133 ++    AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
283.3134 ++    GLIBCXX_CHECK_POLL
283.3135 ++    GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
283.3136 ++
283.3137 ++    # For xsputn_2().
283.3138 ++    AC_CHECK_HEADERS(sys/uio.h)
283.3139 ++    GLIBCXX_CHECK_WRITEV
283.3140 ++
283.3141 ++#     AC_DEFINE(HAVE_ACOSF)
283.3142 ++#     AC_DEFINE(HAVE_ASINF)
283.3143 ++#     AC_DEFINE(HAVE_ATANF)
283.3144 ++#     AC_DEFINE(HAVE_ATAN2F)
283.3145 ++    AC_DEFINE(HAVE_CEILF)
283.3146 ++    AC_DEFINE(HAVE_COPYSIGN)
283.3147 ++#     AC_DEFINE(HAVE_COPYSIGNF)
283.3148 ++#     AC_DEFINE(HAVE_COSF)
283.3149 ++#     AC_DEFINE(HAVE_COSHF)
283.3150 ++#     AC_DEFINE(HAVE_EXPF)
283.3151 ++#     AC_DEFINE(HAVE_FABSF)
283.3152 ++    AC_DEFINE(HAVE_FINITE)
283.3153 ++    AC_DEFINE(HAVE_FINITEF)
283.3154 ++    AC_DEFINE(HAVE_FLOORF)
283.3155 ++#     AC_DEFINE(HAVE_FMODF)
283.3156 ++#     AC_DEFINE(HAVE_FREXPF)
283.3157 ++    AC_DEFINE(HAVE_HYPOT)
283.3158 ++#     AC_DEFINE(HAVE_HYPOTF)
283.3159 ++    AC_DEFINE(HAVE_ISINF)
283.3160 ++    AC_DEFINE(HAVE_ISINFF)
283.3161 ++    AC_DEFINE(HAVE_ISNAN)
283.3162 ++    AC_DEFINE(HAVE_ISNANF)
283.3163 ++#     AC_DEFINE(HAVE_LOGF)
283.3164 ++#     AC_DEFINE(HAVE_LOG10F)
283.3165 ++#     AC_DEFINE(HAVE_MODFF)
283.3166 ++#     AC_DEFINE(HAVE_SINF)
283.3167 ++#     AC_DEFINE(HAVE_SINHF)
283.3168 ++#     AC_DEFINE(HAVE_SINCOS)
283.3169 ++#     AC_DEFINE(HAVE_SINCOSF)
283.3170 ++    AC_DEFINE(HAVE_SQRTF)
283.3171 ++#     AC_DEFINE(HAVE_TANF)
283.3172 ++#     AC_DEFINE(HAVE_TANHF)
283.3173 ++    if test x"long_double_math_on_this_cpu" = x"yes"; then
283.3174 ++#       AC_DEFINE(HAVE_ACOSL)
283.3175 ++#       AC_DEFINE(HAVE_ASINL)
283.3176 ++#       AC_DEFINE(HAVE_ATANL)
283.3177 ++#       AC_DEFINE(HAVE_ATAN2L)
283.3178 ++#       AC_DEFINE(HAVE_CEILL)
283.3179 ++#       AC_DEFINE(HAVE_COPYSIGNL)
283.3180 ++#       AC_DEFINE(HAVE_COSL)
283.3181 ++#       AC_DEFINE(HAVE_COSHL)
283.3182 ++#       AC_DEFINE(HAVE_EXPL)
283.3183 ++#       AC_DEFINE(HAVE_FABSL)
283.3184 ++#       AC_DEFINE(HAVE_FINITEL)
283.3185 ++#       AC_DEFINE(HAVE_FLOORL)
283.3186 ++#       AC_DEFINE(HAVE_FMODL)
283.3187 ++#       AC_DEFINE(HAVE_FREXPL)
283.3188 ++#       AC_DEFINE(HAVE_HYPOTL)
283.3189 ++#       AC_DEFINE(HAVE_ISINFL)
283.3190 ++#       AC_DEFINE(HAVE_ISNANL)
283.3191 ++#       AC_DEFINE(HAVE_LOGL)
283.3192 ++#       AC_DEFINE(HAVE_LOG10L)
283.3193 ++#       AC_DEFINE(HAVE_MODFL)
283.3194 ++#       AC_DEFINE(HAVE_POWL)
283.3195 ++#       AC_DEFINE(HAVE_SINL)
283.3196 ++#       AC_DEFINE(HAVE_SINHL)
283.3197 ++#       AC_DEFINE(HAVE_SINCOSL)
283.3198 ++#       AC_DEFINE(HAVE_SQRTL)
283.3199 ++#       AC_DEFINE(HAVE_TANL)
283.3200 ++#       AC_DEFINE(HAVE_TANHL)
283.3201 ++    fi
283.3202 ++    ;;
283.3203 +   *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
283.3204 +     AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
283.3205 +       machine/endian.h machine/param.h sys/machine.h sys/types.h \
283.3206 +@@ -156,7 +248,7 @@
283.3207 +     AC_DEFINE(HAVE_INT64_T)
283.3208 +     case "$target" in
283.3209 +       *-uclinux*)
283.3210 +-        # Don't enable LFS with uClibc
283.3211 ++        # Don't enable LFS with uClinux
283.3212 +         ;;
283.3213 +       *)
283.3214 +         AC_DEFINE(_GLIBCXX_USE_LFS)
283.3215 +diff -urN gcc-4.0.0-100/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.0.0/libstdc++-v3/include/c_compatibility/wchar.h
283.3216 +--- gcc-4.0.0-100/libstdc++-v3/include/c_compatibility/wchar.h	2005-04-30 13:06:53.690054168 -0500
283.3217 ++++ gcc-4.0.0/libstdc++-v3/include/c_compatibility/wchar.h	2005-04-28 20:15:56.000000000 -0500
283.3218 +@@ -101,7 +101,9 @@
283.3219 + using std::wmemcpy;
283.3220 + using std::wmemmove;
283.3221 + using std::wmemset;
283.3222 ++#if _GLIBCXX_HAVE_WCSFTIME
283.3223 + using std::wcsftime;
283.3224 ++#endif
283.3225 + 
283.3226 + #if _GLIBCXX_USE_C99
283.3227 + using std::wcstold;
283.3228 +diff -urN gcc-4.0.0-100/libstdc++-v3/include/c_std/std_cwchar.h gcc-4.0.0/libstdc++-v3/include/c_std/std_cwchar.h
283.3229 +--- gcc-4.0.0-100/libstdc++-v3/include/c_std/std_cwchar.h	2005-04-30 13:06:53.691054016 -0500
283.3230 ++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cwchar.h	2005-04-28 20:15:56.000000000 -0500
283.3231 +@@ -179,7 +179,9 @@
283.3232 +   using ::wcscoll;
283.3233 +   using ::wcscpy;
283.3234 +   using ::wcscspn;
283.3235 ++#if _GLIBCXX_HAVE_WCSFTIME
283.3236 +   using ::wcsftime;
283.3237 ++#endif
283.3238 +   using ::wcslen;
283.3239 +   using ::wcsncat;
283.3240 +   using ::wcsncmp;
   284.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   284.2 +++ b/patches/gcc/4.0.4/300-libstdc++-pic.patch	Sat Feb 24 11:00:05 2007 +0000
   284.3 @@ -0,0 +1,45 @@
   284.4 +--- gcc-4.0.0/libstdc++-v3/src/Makefile.am
   284.5 ++++ gcc-4.0.0/libstdc++-v3/src/Makefile.am
   284.6 +@@ -214,6 +214,10 @@
   284.7 + 	  $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
   284.8 + 
   284.9 + 
  284.10 ++install-exec-local:
  284.11 ++	$(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
  284.12 ++	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
  284.13 ++
  284.14 + # Added bits to build debug library.
  284.15 + if GLIBCXX_BUILD_DEBUG
  284.16 + all-local: build_debug
  284.17 +--- gcc-4.0.0/libstdc++-v3/src/Makefile.in
  284.18 ++++ gcc-4.0.0/libstdc++-v3/src/Makefile.in
  284.19 +@@ -625,7 +625,7 @@
  284.20 + 
  284.21 + install-data-am: install-data-local
  284.22 + 
  284.23 +-install-exec-am: install-toolexeclibLTLIBRARIES
  284.24 ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
  284.25 + 
  284.26 + install-info: install-info-am
  284.27 + 
  284.28 +@@ -664,7 +664,7 @@
  284.29 + 	maintainer-clean-generic mostlyclean mostlyclean-compile \
  284.30 + 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
  284.31 + 	tags uninstall uninstall-am uninstall-info-am \
  284.32 +-	uninstall-toolexeclibLTLIBRARIES
  284.33 ++	uninstall-toolexeclibLTLIBRARIES install-exec-local
  284.34 + 
  284.35 + @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver:  ${glibcxx_srcdir}/$(SYMVER_MAP)
  284.36 + @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@	cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
  284.37 +@@ -743,6 +743,11 @@
  284.38 + install_debug:
  284.39 + 	(cd ${debugdir} && $(MAKE) \
  284.40 + 	toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
  284.41 ++
  284.42 ++install-exec-local:
  284.43 ++	$(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
  284.44 ++	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
  284.45 ++
  284.46 + # Tell versions [3.59,3.63) of GNU make to not export all variables.
  284.47 + # Otherwise a system limit (for SysV at least) may be exceeded.
  284.48 + .NOEXPORT:
   285.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   285.2 +++ b/patches/gcc/4.0.4/301-missing-execinfo_h.patch	Sat Feb 24 11:00:05 2007 +0000
   285.3 @@ -0,0 +1,11 @@
   285.4 +--- gcc-4.0.0/boehm-gc/include/gc.h-orig	2005-04-28 22:28:57.000000000 -0500
   285.5 ++++ gcc-4.0.0/boehm-gc/include/gc.h	2005-04-28 22:30:38.000000000 -0500
   285.6 +@@ -500,7 +500,7 @@
   285.7 + #ifdef __linux__
   285.8 + # include <features.h>
   285.9 + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
  285.10 +-     && !defined(__ia64__)
  285.11 ++     && !defined(__ia64__) && !defined(__UCLIBC__)
  285.12 + #   ifndef GC_HAVE_BUILTIN_BACKTRACE
  285.13 + #     define GC_HAVE_BUILTIN_BACKTRACE
  285.14 + #   endif
   286.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   286.2 +++ b/patches/gcc/4.0.4/302-c99-snprintf.patch	Sat Feb 24 11:00:05 2007 +0000
   286.3 @@ -0,0 +1,11 @@
   286.4 +--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig	2005-04-29 00:08:41.000000000 -0500
   286.5 ++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h	2005-04-29 00:08:45.000000000 -0500
   286.6 +@@ -142,7 +142,7 @@
   286.7 +   using ::vsprintf;
   286.8 + }
   286.9 + 
  286.10 +-#if _GLIBCXX_USE_C99
  286.11 ++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
  286.12 + 
  286.13 + #undef snprintf
  286.14 + #undef vfscanf
   287.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   287.2 +++ b/patches/gcc/4.0.4/303-c99-complex-ugly-hack.patch	Sat Feb 24 11:00:05 2007 +0000
   287.3 @@ -0,0 +1,12 @@
   287.4 +--- gcc-4.0.0/libstdc++-v3/configure-old	2005-04-30 22:04:48.061603912 -0500
   287.5 ++++ gcc-4.0.0/libstdc++-v3/configure	2005-04-30 22:06:13.678588152 -0500
   287.6 +@@ -7194,6 +7194,9 @@
   287.7 + cat >>conftest.$ac_ext <<_ACEOF
   287.8 + /* end confdefs.h.  */
   287.9 + #include <complex.h>
  287.10 ++#ifdef __UCLIBC__
  287.11 ++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
  287.12 ++#endif
  287.13 + int
  287.14 + main ()
  287.15 + {
   288.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   288.2 +++ b/patches/gcc/4.0.4/304-index_macro.patch	Sat Feb 24 11:00:05 2007 +0000
   288.3 @@ -0,0 +1,24 @@
   288.4 +--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps	2006-03-24 01:49:51 +0100
   288.5 ++++ gcc-4.1.0/libstdc++-v3/include/ext/rope	2006-03-24 01:49:37 +0100
   288.6 +@@ -59,6 +59,9 @@
   288.7 + #include <bits/allocator.h>
   288.8 + #include <ext/hash_fun.h>
   288.9 + 
  288.10 ++/* cope w/ index defined as macro, SuSv3 proposal */
  288.11 ++#undef index
  288.12 ++
  288.13 + # ifdef __GC
  288.14 + #   define __GC_CONST const
  288.15 + # else
  288.16 +--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps	2006-03-24 01:50:04 +0100
  288.17 ++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h	2006-03-24 01:50:28 +0100
  288.18 +@@ -53,6 +53,9 @@
  288.19 + #include <ext/memory> // For uninitialized_copy_n
  288.20 + #include <ext/numeric> // For power
  288.21 + 
  288.22 ++/* cope w/ index defined as macro, SuSv3 proposal */
  288.23 ++#undef index
  288.24 ++
  288.25 + namespace __gnu_cxx
  288.26 + {
  288.27 +   using std::size_t;
   289.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   289.2 +++ b/patches/gcc/4.0.4/602-sdk-libstdc++-includes.patch	Sat Feb 24 11:00:05 2007 +0000
   289.3 @@ -0,0 +1,22 @@
   289.4 +diff -urN gcc-4.0.0-100/libstdc++-v3/fragment.am gcc-4.0.0/libstdc++-v3/fragment.am
   289.5 +--- gcc-4.0.0-100/libstdc++-v3/fragment.am	2004-10-25 15:32:40.000000000 -0500
   289.6 ++++ gcc-4.0.0/libstdc++-v3/fragment.am	2005-04-28 21:48:43.000000000 -0500
   289.7 +@@ -18,5 +18,5 @@
   289.8 + 	$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
   289.9 + 
  289.10 + # -I/-D flags to pass when compiling.
  289.11 +-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
  289.12 ++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
  289.13 + 
  289.14 +diff -urN gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am gcc-4.0.0/libstdc++-v3/libmath/Makefile.am
  289.15 +--- gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am	2003-08-27 16:29:42.000000000 -0500
  289.16 ++++ gcc-4.0.0/libstdc++-v3/libmath/Makefile.am	2005-04-28 21:48:43.000000000 -0500
  289.17 +@@ -32,7 +32,7 @@
  289.18 + 
  289.19 + libmath_la_SOURCES = stubs.c
  289.20 + 
  289.21 +-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
  289.22 ++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
  289.23 + 
  289.24 + # Only compiling "C" sources in this directory.
  289.25 + LIBTOOL = @LIBTOOL@ --tag CC
   290.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   290.2 +++ b/patches/gcc/4.0.4/800-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   290.3 @@ -0,0 +1,65 @@
   290.4 +diff -dur gcc-4.0.4.orig/gcc/config/arm/linux-elf.h gcc-4.0.4/gcc/config/arm/linux-elf.h
   290.5 +--- gcc-4.0.4.orig/gcc/config/arm/linux-elf.h	2007-02-02 19:24:50.000000000 +0100
   290.6 ++++ gcc-4.0.4/gcc/config/arm/linux-elf.h	2007-02-02 19:26:12.000000000 +0100
   290.7 +@@ -31,19 +31,33 @@
   290.8 + /* Do not assume anything about header files.  */
   290.9 + #define NO_IMPLICIT_EXTERN_C
  290.10 + 
  290.11 ++/*
  290.12 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  290.13 ++ * (big endian) configurations.
  290.14 ++ */
  290.15 ++#if TARGET_BIG_ENDIAN_DEFAULT
  290.16 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
  290.17 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  290.18 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  290.19 ++#else
  290.20 ++#define TARGET_ENDIAN_DEFAULT 0
  290.21 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  290.22 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  290.23 ++#endif
  290.24 ++
  290.25 + #undef  TARGET_DEFAULT_FLOAT_ABI
  290.26 + #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
  290.27 + 
  290.28 + #undef  TARGET_DEFAULT
  290.29 +-#define TARGET_DEFAULT (0)
  290.30 ++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
  290.31 + 
  290.32 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  290.33 + 
  290.34 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  290.35 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  290.36 + 
  290.37 + #undef  MULTILIB_DEFAULTS
  290.38 + #define MULTILIB_DEFAULTS \
  290.39 +-	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
  290.40 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
  290.41 + 
  290.42 + /* The GNU C++ standard library requires that these macros be defined.  */
  290.43 + #undef CPLUSPLUS_CPP_SPEC
  290.44 +@@ -95,7 +109,7 @@
  290.45 +    %{rdynamic:-export-dynamic} \
  290.46 +    %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
  290.47 +    -X \
  290.48 +-   %{mbig-endian:-EB}" \
  290.49 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  290.50 +    SUBTARGET_EXTRA_LINK_SPEC
  290.51 + 
  290.52 + #define TARGET_OS_CPP_BUILTINS()		\
  290.53 +Only in gcc-4.0.4/gcc/config/arm: linux-elf.h.orig
  290.54 +diff -dur gcc-4.0.4.orig/gcc/config.gcc gcc-4.0.4/gcc/config.gcc
  290.55 +--- gcc-4.0.4.orig/gcc/config.gcc	2007-02-02 19:24:50.000000000 +0100
  290.56 ++++ gcc-4.0.4/gcc/config.gcc	2007-02-02 19:26:12.000000000 +0100
  290.57 +@@ -672,6 +672,11 @@
  290.58 + 	;;
  290.59 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  290.60 + 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h  arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
  290.61 ++	case $target in
  290.62 ++	arm*b-*)
  290.63 ++		tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
  290.64 ++		;;
  290.65 ++	esac
  290.66 + 	tmake_file="${tmake_file} arm/t-arm arm/t-linux"
  290.67 + 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  290.68 + 	gnu_ld=yes
   291.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   291.2 +++ b/patches/gcc/4.0.4/801-arm-softfloat.patch	Sat Feb 24 11:00:05 2007 +0000
   291.3 @@ -0,0 +1,14 @@
   291.4 +Enable building a pure soft-float compiler without the need for libfloat.
   291.5 +
   291.6 +diff -dur gcc-4.0.4.orig/gcc/config.gcc gcc-4.0.4/gcc/config.gcc
   291.7 +--- gcc-4.0.4.orig/gcc/config.gcc	2007-02-02 19:12:28.000000000 +0100
   291.8 ++++ gcc-4.0.4/gcc/config.gcc	2007-02-02 19:12:07.000000000 +0100
   291.9 +@@ -677,7 +677,7 @@
  291.10 + 		tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
  291.11 + 		;;
  291.12 + 	esac
  291.13 +-	tmake_file="${tmake_file} arm/t-arm arm/t-linux"
  291.14 ++	tmake_file="${tmake_file} arm/t-arm arm/t-linux arm/t-arm-elf"
  291.15 + 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  291.16 + 	gnu_ld=yes
  291.17 + 	;;
   292.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   292.2 +++ b/patches/gcc/4.1.0/gcc-4.1-fix-fixincl.patch	Sat Feb 24 11:00:05 2007 +0000
   292.3 @@ -0,0 +1,71 @@
   292.4 +See http://gcc.gnu.org/PR22541
   292.5 +
   292.6 +From: Dan Kegel
   292.7 +
   292.8 +When building gcc-3.4.3 or gcc-4.x into a clean $PREFIX,
   292.9 +the configure script happily copies the glibc include files from include to sys-include;
  292.10 +here's the line from the log file (with $PREFIX instead of the real prefix):
  292.11 +
  292.12 +Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
  292.13 +
  292.14 +But later, when running fixincludes, it gives the error message
  292.15 + The directory that should contain system headers does not exist:
  292.16 +  $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
  292.17 +
  292.18 +Nevertheless, it continues building; the header files it installs in
  292.19 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
  292.20 +do not include the boilerplate that would cause it to #include_next the
  292.21 +glibc headers in the system header directory.
  292.22 +Thus the resulting toolchain can't compile the following program:
  292.23 +#include <limits.h>
  292.24 +int x = PATH_MAX;
  292.25 +because its limits.h doesn't include the glibc header.
  292.26 +
  292.27 +The problem is that gcc/Makefile.in assumes that
  292.28 +it can refer to $PREFIX/i686-unknown-linux-gnu  with the path
  292.29 +                $PREFIX/lib/../i686-unknown-linux-gnu, but
  292.30 +that fails because the directory $PREFIX/lib doesn't exist during 'make all';
  292.31 +it is only created later, during 'make install'.  (Which makes this problem
  292.32 +confusing, since one only notices the breakage well after 'make install',
  292.33 +at which point the path configure complained about does exist, and has the
  292.34 +right stuff in it.)
  292.35 +
  292.36 +A fix that I've been using for a while is to use sed to canonicalize
  292.37 +the path.  The sed syntax is a bit obtuse, but it works. 
  292.38 +
  292.39 +(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
  292.40 +for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
  292.41 +
  292.42 +[rediffed against gcc-4.1-20060210]
  292.43 +
  292.44 +--- gcc-4.1-20060210/gcc/Makefile.in.old	2006-01-11 06:29:29.000000000 -0800
  292.45 ++++ gcc-4.1-20060210/gcc/Makefile.in	2006-02-14 16:08:54.000000000 -0800
  292.46 +@@ -388,7 +388,10 @@
  292.47 + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
  292.48 + 
  292.49 + # autoconf sets SYSTEM_HEADER_DIR to one of the above.
  292.50 +-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
  292.51 ++# Purge it of unneccessary internal relative paths
  292.52 ++# to directories that might not exist yet.
  292.53 ++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
  292.54 ++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
  292.55 + 
  292.56 + # Control whether to run fixproto and fixincludes.
  292.57 + STMP_FIXPROTO = @STMP_FIXPROTO@
  292.58 +@@ -3167,13 +3170,15 @@
  292.59 + ../$(build_subdir)/fixincludes/fixincl: ; @ :
  292.60 + 
  292.61 + # Build fixed copies of system files.
  292.62 ++# Abort if no system headers available, unless building a crosscompiler.
  292.63 ++# Canonicalize $gcc_tooldir/sys-include in same way as $SYSTEM_HEADER_DIR was canonicalized so test still works
  292.64 + stmp-fixinc: gsyslimits.h macro_list \
  292.65 +   $(build_objdir)/fixincludes/fixincl \
  292.66 +   $(build_objdir)/fixincludes/fixinc.sh
  292.67 + 	@if ! $(inhibit_libc) && test ! -d ${SYSTEM_HEADER_DIR}; then \
  292.68 + 	  echo The directory that should contain system headers does not exist: >&2 ; \
  292.69 + 	  echo "  ${SYSTEM_HEADER_DIR}" >&2 ; \
  292.70 +-	  if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
  292.71 ++	  if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
  292.72 + 	  then sleep 1; else exit 1; fi; \
  292.73 + 	fi
  292.74 + 	rm -rf include; mkdir include
   293.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   293.2 +++ b/patches/gcc/4.1.1/100-uclibc-conf.patch	Sat Feb 24 11:00:05 2007 +0000
   293.3 @@ -0,0 +1,544 @@
   293.4 +--- gcc-4.1.0/gcc/config/t-linux-uclibc
   293.5 ++++ gcc-4.1.0/gcc/config/t-linux-uclibc
   293.6 +@@ -0,0 +1,5 @@
   293.7 ++# Remove glibc specific files added in t-linux
   293.8 ++SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
   293.9 ++
  293.10 ++# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
  293.11 ++LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
  293.12 +--- gcc-4.1.0/gcc/config.gcc
  293.13 ++++ gcc-4.1.0/gcc/config.gcc
  293.14 +@@ -1887,7 +1887,7 @@ s390x-ibm-tpf*)
  293.15 + 	;;
  293.16 + sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
  293.17 + sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
  293.18 +-  sh-*-linux* | sh[346lbe]*-*-linux* | \
  293.19 ++  sh*-*-linux* | sh[346lbe]*-*-linux* | \
  293.20 +   sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
  293.21 +    sh64-*-netbsd* | sh64l*-*-netbsd*)
  293.22 + 	tmake_file="${tmake_file} sh/t-sh sh/t-elf"
  293.23 +@@ -2341,6 +2341,12 @@ m32c-*-elf*)
  293.24 + 	;;
  293.25 + esac
  293.26 + 
  293.27 ++# Rather than hook into each target, just do it after all the linux
  293.28 ++# targets have been processed
  293.29 ++case ${target} in
  293.30 ++*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
  293.31 ++esac
  293.32 ++
  293.33 + case ${target} in
  293.34 + i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
  293.35 + 	tmake_file="${tmake_file} i386/t-gmm_malloc"
  293.36 +--- gcc-4.1.0/boehm-gc/configure
  293.37 ++++ gcc-4.1.0/boehm-gc/configure
  293.38 +@@ -4320,6 +4320,11 @@ linux-gnu*)
  293.39 +   lt_cv_deplibs_check_method=pass_all
  293.40 +   ;;
  293.41 + 
  293.42 ++linux-uclibc*)
  293.43 ++  lt_cv_deplibs_check_method=pass_all
  293.44 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  293.45 ++  ;;
  293.46 ++
  293.47 + netbsd* | knetbsd*-gnu)
  293.48 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  293.49 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  293.50 +--- gcc-4.1.0/configure
  293.51 ++++ gcc-4.1.0/configure
  293.52 +@@ -1133,7 +1133,7 @@ no)
  293.53 +     ;;
  293.54 + "")
  293.55 +     case "${target}" in
  293.56 +-    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
  293.57 ++    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
  293.58 +         # Enable libmudflap by default in GNU and friends.
  293.59 + 	;;
  293.60 +     *-*-freebsd*)
  293.61 +--- gcc-4.1.0/configure.in
  293.62 ++++ gcc-4.1.0/configure.in
  293.63 +@@ -341,7 +341,7 @@ no)
  293.64 +     ;;
  293.65 + "")
  293.66 +     case "${target}" in
  293.67 +-    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
  293.68 ++    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
  293.69 +         # Enable libmudflap by default in GNU and friends.
  293.70 + 	;;
  293.71 +     *-*-freebsd*)
  293.72 +--- gcc-4.1.0/contrib/regression/objs-gcc.sh
  293.73 ++++ gcc-4.1.0/contrib/regression/objs-gcc.sh
  293.74 +@@ -105,6 +105,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H
  293.75 +  then
  293.76 +   make all-gdb all-dejagnu all-ld || exit 1
  293.77 +   make install-gdb install-dejagnu install-ld || exit 1
  293.78 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
  293.79 ++ then
  293.80 ++  make all-gdb all-dejagnu all-ld || exit 1
  293.81 ++  make install-gdb install-dejagnu install-ld || exit 1
  293.82 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
  293.83 +   make bootstrap || exit 1
  293.84 +   make install || exit 1
  293.85 +--- gcc-4.1.0/gcc/config/alpha/linux-elf.h
  293.86 ++++ gcc-4.1.0/gcc/config/alpha/linux-elf.h
  293.87 +@@ -27,7 +27,11 @@ Boston, MA 02110-1301, USA.  */
  293.88 + #define SUBTARGET_EXTRA_SPECS \
  293.89 + { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
  293.90 + 
  293.91 ++#if defined USE_UCLIBC
  293.92 ++#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
  293.93 ++#else
  293.94 + #define ELF_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
  293.95 ++#endif
  293.96 + 
  293.97 + #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax}		\
  293.98 +   %{O*:-O3} %{!O*:-O1}						\
  293.99 +--- gcc-4.1.0/gcc/config/arm/linux-elf.h
 293.100 ++++ gcc-4.1.0/gcc/config/arm/linux-elf.h
 293.101 +@@ -51,7 +51,11 @@
 293.102 + 
 293.103 + #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
 293.104 + 
 293.105 ++#ifdef USE_UCLIBC
 293.106 ++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
 293.107 ++#else
 293.108 + #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
 293.109 ++#endif
 293.110 + 
 293.111 + #define LINUX_TARGET_LINK_SPEC  "%{h*} %{version:-v} \
 293.112 +    %{b} \
 293.113 +--- gcc-4.1.0/gcc/config/cris/linux.h
 293.114 ++++ gcc-4.1.0/gcc/config/cris/linux.h
 293.115 +@@ -73,6 +73,25 @@ Boston, MA 02110-1301, USA.  */
 293.116 + #undef CRIS_DEFAULT_CPU_VERSION
 293.117 + #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
 293.118 + 
 293.119 ++#ifdef USE_UCLIBC
 293.120 ++
 293.121 ++#undef CRIS_SUBTARGET_VERSION
 293.122 ++#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
 293.123 ++
 293.124 ++#undef CRIS_LINK_SUBTARGET_SPEC
 293.125 ++#define CRIS_LINK_SUBTARGET_SPEC \
 293.126 ++ "-mcrislinux\
 293.127 ++  -rpath-link include/asm/../..%s\
 293.128 ++  %{shared} %{static}\
 293.129 ++  %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
 293.130 ++  %{!shared: \
 293.131 ++    %{!static: \
 293.132 ++      %{rdynamic:-export-dynamic} \
 293.133 ++      %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
 293.134 ++  %{!r:%{O2|O3: --gc-sections}}"
 293.135 ++
 293.136 ++#else  /* USE_UCLIBC */
 293.137 ++
 293.138 + #undef CRIS_SUBTARGET_VERSION
 293.139 + #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
 293.140 + 
 293.141 +@@ -87,6 +106,8 @@ Boston, MA 02110-1301, USA.  */
 293.142 +   %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
 293.143 +   %{!r:%{O2|O3: --gc-sections}}"
 293.144 + 
 293.145 ++#endif  /* USE_UCLIBC */
 293.146 ++
 293.147 + 
 293.148 + /* Node: Run-time Target */
 293.149 + 
 293.150 +--- gcc-4.1.0/gcc/config/i386/linux.h
 293.151 ++++ gcc-4.1.0/gcc/config/i386/linux.h
 293.152 +@@ -107,6 +107,11 @@ Boston, MA 02110-1301, USA.  */
 293.153 + #define LINK_EMULATION "elf_i386"
 293.154 + #define DYNAMIC_LINKER "/lib/ld-linux.so.2"
 293.155 + 
 293.156 ++#if defined USE_UCLIBC
 293.157 ++#undef DYNAMIC_LINKER
 293.158 ++#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 293.159 ++#endif
 293.160 ++
 293.161 + #undef  SUBTARGET_EXTRA_SPECS
 293.162 + #define SUBTARGET_EXTRA_SPECS \
 293.163 +   { "link_emulation", LINK_EMULATION },\
 293.164 +--- gcc-4.1.0/gcc/config/i386/linux64.h
 293.165 ++++ gcc-4.1.0/gcc/config/i386/linux64.h
 293.166 +@@ -54,14 +54,21 @@ Boston, MA 02110-1301, USA.  */
 293.167 +    When the -shared link option is used a final link is not being
 293.168 +    done.  */
 293.169 + 
 293.170 ++#ifdef USE_UCLIBC
 293.171 ++#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 293.172 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
 293.173 ++#else
 293.174 ++#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 293.175 ++#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
 293.176 ++#endif
 293.177 + #undef	LINK_SPEC
 293.178 + #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
 293.179 +   %{shared:-shared} \
 293.180 +   %{!shared: \
 293.181 +     %{!static: \
 293.182 +       %{rdynamic:-export-dynamic} \
 293.183 +-      %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 293.184 +-      %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
 293.185 ++      %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
 293.186 ++      %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
 293.187 +     %{static:-static}}"
 293.188 + 
 293.189 + /* Similar to standard Linux, but adding -ffast-math support.  */
 293.190 +--- gcc-4.1.0/gcc/config/ia64/linux.h
 293.191 ++++ gcc-4.1.0/gcc/config/ia64/linux.h
 293.192 +@@ -37,13 +37,18 @@ do {						\
 293.193 + /* Define this for shared library support because it isn't in the main
 293.194 +    linux.h file.  */
 293.195 + 
 293.196 ++#ifdef USE_UCLIBC
 293.197 ++#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
 293.198 ++#else
 293.199 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
 293.200 ++#endif
 293.201 + #undef LINK_SPEC
 293.202 + #define LINK_SPEC "\
 293.203 +   %{shared:-shared} \
 293.204 +   %{!shared: \
 293.205 +     %{!static: \
 293.206 +       %{rdynamic:-export-dynamic} \
 293.207 +-      %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
 293.208 ++      %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 293.209 +       %{static:-static}}"
 293.210 + 
 293.211 + 
 293.212 +--- gcc-4.1.0/gcc/config/m68k/linux.h
 293.213 ++++ gcc-4.1.0/gcc/config/m68k/linux.h
 293.214 +@@ -123,12 +123,17 @@ Boston, MA 02110-1301, USA.  */
 293.215 + 
 293.216 + /* If ELF is the default format, we should not use /lib/elf.  */
 293.217 + 
 293.218 ++#ifdef USE_UCLIBC
 293.219 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 293.220 ++#else
 293.221 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
 293.222 ++#endif
 293.223 + #undef	LINK_SPEC
 293.224 + #define LINK_SPEC "-m m68kelf %{shared} \
 293.225 +   %{!shared: \
 293.226 +     %{!static: \
 293.227 +       %{rdynamic:-export-dynamic} \
 293.228 +-      %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
 293.229 ++      %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 293.230 +     %{static}}"
 293.231 + 
 293.232 + /* For compatibility with linux/a.out */
 293.233 +--- gcc-4.1.0/gcc/config/mips/linux.h
 293.234 ++++ gcc-4.1.0/gcc/config/mips/linux.h
 293.235 +@@ -105,6 +105,11 @@ Boston, MA 02110-1301, USA.  */
 293.236 + 
 293.237 + /* Borrowed from sparc/linux.h */
 293.238 + #undef LINK_SPEC
 293.239 ++#ifdef USE_UCLIBC
 293.240 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 293.241 ++#else
 293.242 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
 293.243 ++#endif
 293.244 + #define LINK_SPEC \
 293.245 +  "%(endian_spec) \
 293.246 +   %{shared:-shared} \
 293.247 +@@ -112,7 +117,7 @@ Boston, MA 02110-1301, USA.  */
 293.248 +     %{!ibcs: \
 293.249 +       %{!static: \
 293.250 +         %{rdynamic:-export-dynamic} \
 293.251 +-        %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
 293.252 ++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 293.253 +         %{static:-static}}}"
 293.254 + 
 293.255 + #undef SUBTARGET_ASM_SPEC
 293.256 +--- gcc-4.1.0/gcc/config/pa/pa-linux.h
 293.257 ++++ gcc-4.1.0/gcc/config/pa/pa-linux.h
 293.258 +@@ -49,13 +49,18 @@ Boston, MA 02110-1301, USA.  */
 293.259 + /* Define this for shared library support because it isn't in the main
 293.260 +    linux.h file.  */
 293.261 + 
 293.262 ++#ifdef USE_UCLIBC
 293.263 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 293.264 ++#else
 293.265 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
 293.266 ++#endif
 293.267 + #undef LINK_SPEC
 293.268 + #define LINK_SPEC "\
 293.269 +   %{shared:-shared} \
 293.270 +   %{!shared: \
 293.271 +     %{!static: \
 293.272 +       %{rdynamic:-export-dynamic} \
 293.273 +-      %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
 293.274 ++      %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 293.275 +       %{static:-static}}"
 293.276 + 
 293.277 + /* glibc's profiling functions don't need gcc to allocate counters.  */
 293.278 +--- gcc-4.1.0/gcc/config/rs6000/linux.h
 293.279 ++++ gcc-4.1.0/gcc/config/rs6000/linux.h
 293.280 +@@ -72,7 +72,11 @@
 293.281 + #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
 293.282 + 
 293.283 + #undef	LINK_OS_DEFAULT_SPEC
 293.284 ++#ifdef USE_UCLIBC
 293.285 ++#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
 293.286 ++#else
 293.287 + #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
 293.288 ++#endif
 293.289 + 
 293.290 + #define LINK_GCC_C_SEQUENCE_SPEC \
 293.291 +   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
 293.292 +--- gcc-4.1.0/gcc/config/rs6000/sysv4.h
 293.293 ++++ gcc-4.1.0/gcc/config/rs6000/sysv4.h
 293.294 +@@ -866,6 +866,7 @@ extern int fixuplabelno;
 293.295 +   mcall-linux  : %(link_os_linux)       ; \
 293.296 +   mcall-gnu    : %(link_os_gnu)         ; \
 293.297 +   mcall-netbsd : %(link_os_netbsd)      ; \
 293.298 ++  mcall-linux-uclibc : %(link_os_linux_uclibc); \
 293.299 +   mcall-openbsd: %(link_os_openbsd)     ; \
 293.300 +                : %(link_os_default)     }"
 293.301 + 
 293.302 +@@ -1043,6 +1044,10 @@ extern int fixuplabelno;
 293.303 +   %{rdynamic:-export-dynamic} \
 293.304 +   %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
 293.305 + 
 293.306 ++#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
 293.307 ++  %{rdynamic:-export-dynamic} \
 293.308 ++  %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
 293.309 ++
 293.310 + #if defined(HAVE_LD_EH_FRAME_HDR)
 293.311 + # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
 293.312 + #endif
 293.313 +@@ -1209,6 +1214,7 @@ ncrtn.o%s"
 293.314 +   { "link_os_sim",		LINK_OS_SIM_SPEC },			\
 293.315 +   { "link_os_freebsd",		LINK_OS_FREEBSD_SPEC },			\
 293.316 +   { "link_os_linux",		LINK_OS_LINUX_SPEC },			\
 293.317 ++  { "link_os_linux_uclibc",	LINK_OS_LINUX_UCLIBC_SPEC },		\
 293.318 +   { "link_os_gnu",		LINK_OS_GNU_SPEC },			\
 293.319 +   { "link_os_netbsd",		LINK_OS_NETBSD_SPEC },			\
 293.320 +   { "link_os_openbsd",		LINK_OS_OPENBSD_SPEC },			\
 293.321 +--- gcc-4.1.0/gcc/config/s390/linux.h
 293.322 ++++ gcc-4.1.0/gcc/config/s390/linux.h
 293.323 +@@ -77,6 +77,13 @@ Software Foundation, 51 Franklin Street,
 293.324 + #define MULTILIB_DEFAULTS { "m31" }
 293.325 + #endif
 293.326 + 
 293.327 ++#ifdef USE_UCLIBC
 293.328 ++#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 293.329 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
 293.330 ++#else
 293.331 ++#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
 293.332 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
 293.333 ++#endif
 293.334 + #undef  LINK_SPEC
 293.335 + #define LINK_SPEC \
 293.336 +   "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
 293.337 +@@ -86,8 +93,8 @@ Software Foundation, 51 Franklin Street,
 293.338 +       %{!static: \
 293.339 + 	%{rdynamic:-export-dynamic} \
 293.340 + 	%{!dynamic-linker: \
 293.341 +-          %{m31:-dynamic-linker /lib/ld.so.1} \
 293.342 +-          %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
 293.343 ++          %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
 293.344 ++          %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
 293.345 + 
 293.346 + 
 293.347 + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 293.348 +--- gcc-4.1.0/gcc/config/sh/linux.h
 293.349 ++++ gcc-4.1.0/gcc/config/sh/linux.h
 293.350 +@@ -56,12 +56,21 @@ Boston, MA 02110-1301, USA.  */
 293.351 + #undef SUBTARGET_LINK_EMUL_SUFFIX
 293.352 + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
 293.353 + #undef SUBTARGET_LINK_SPEC
 293.354 ++#ifdef USE_UCLIBC
 293.355 ++#define SUBTARGET_LINK_SPEC \
 293.356 ++  "%{shared:-shared} \
 293.357 ++   %{!static: \
 293.358 ++     %{rdynamic:-export-dynamic} \
 293.359 ++     %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
 293.360 ++   %{static:-static}"
 293.361 ++#else
 293.362 + #define SUBTARGET_LINK_SPEC \
 293.363 +   "%{shared:-shared} \
 293.364 +    %{!static: \
 293.365 +      %{rdynamic:-export-dynamic} \
 293.366 +      %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 293.367 +    %{static:-static}"
 293.368 ++#endif
 293.369 + 
 293.370 + /* Output assembler code to STREAM to call the profiler.  */
 293.371 + 
 293.372 +--- gcc-4.1.0/gcc/config/sparc/linux.h
 293.373 ++++ gcc-4.1.0/gcc/config/sparc/linux.h
 293.374 +@@ -125,6 +125,11 @@ Boston, MA 02110-1301, USA.  */
 293.375 + 
 293.376 + /* If ELF is the default format, we should not use /lib/elf.  */
 293.377 + 
 293.378 ++#ifdef USE_UCLIBC
 293.379 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 293.380 ++#else
 293.381 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 293.382 ++#endif
 293.383 + #undef  LINK_SPEC
 293.384 + #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
 293.385 +   %{!mno-relax:%{!r:-relax}} \
 293.386 +@@ -132,7 +137,7 @@ Boston, MA 02110-1301, USA.  */
 293.387 +     %{!ibcs: \
 293.388 +       %{!static: \
 293.389 +         %{rdynamic:-export-dynamic} \
 293.390 +-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 293.391 ++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 293.392 +         %{static:-static}}}"
 293.393 + 
 293.394 + /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
 293.395 +--- gcc-4.1.0/gcc/config/sparc/linux64.h
 293.396 ++++ gcc-4.1.0/gcc/config/sparc/linux64.h
 293.397 +@@ -162,12 +162,17 @@ Boston, MA 02110-1301, USA.  */
 293.398 +   { "link_arch_default", LINK_ARCH_DEFAULT_SPEC },	  \
 293.399 +   { "link_arch",	 LINK_ARCH_SPEC },
 293.400 +     
 293.401 ++#ifdef USE_UCLIBC
 293.402 ++#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
 293.403 ++#else
 293.404 ++#define ELF_DYNAMIC_LINKER  "/lib/ld-linux.so.2"
 293.405 ++#endif
 293.406 + #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
 293.407 +   %{!shared: \
 293.408 +     %{!ibcs: \
 293.409 +       %{!static: \
 293.410 +         %{rdynamic:-export-dynamic} \
 293.411 +-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 293.412 ++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 293.413 +         %{static:-static}}} \
 293.414 + "
 293.415 + 
 293.416 +--- gcc-4.1.0/libffi/configure
 293.417 ++++ gcc-4.1.0/libffi/configure
 293.418 +@@ -3457,6 +3457,11 @@ linux-gnu*)
 293.419 +   lt_cv_deplibs_check_method=pass_all
 293.420 +   ;;
 293.421 + 
 293.422 ++linux-uclibc*)
 293.423 ++  lt_cv_deplibs_check_method=pass_all
 293.424 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 293.425 ++  ;;
 293.426 ++
 293.427 + netbsd* | knetbsd*-gnu)
 293.428 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 293.429 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 293.430 +--- gcc-4.1.0/libgfortran/configure
 293.431 ++++ gcc-4.1.0/libgfortran/configure
 293.432 +@@ -3699,6 +3699,11 @@ linux-gnu*)
 293.433 +   lt_cv_deplibs_check_method=pass_all
 293.434 +   ;;
 293.435 + 
 293.436 ++linux-uclibc*)
 293.437 ++  lt_cv_deplibs_check_method=pass_all
 293.438 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 293.439 ++  ;;
 293.440 ++
 293.441 + netbsd* | knetbsd*-gnu)
 293.442 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 293.443 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 293.444 +--- gcc-4.1.0/libjava/configure
 293.445 ++++ gcc-4.1.0/libjava/configure
 293.446 +@@ -5137,6 +5137,11 @@ linux-gnu*)
 293.447 +   lt_cv_deplibs_check_method=pass_all
 293.448 +   ;;
 293.449 + 
 293.450 ++linux-uclibc*)
 293.451 ++  lt_cv_deplibs_check_method=pass_all
 293.452 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 293.453 ++  ;;
 293.454 ++
 293.455 + netbsd* | knetbsd*-gnu)
 293.456 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 293.457 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 293.458 +--- gcc-4.1.0/libmudflap/configure
 293.459 ++++ gcc-4.1.0/libmudflap/configure
 293.460 +@@ -5382,6 +5382,11 @@ linux-gnu*)
 293.461 +   lt_cv_deplibs_check_method=pass_all
 293.462 +   ;;
 293.463 + 
 293.464 ++linux-uclibc*)
 293.465 ++  lt_cv_deplibs_check_method=pass_all
 293.466 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 293.467 ++  ;;
 293.468 ++
 293.469 + netbsd* | knetbsd*-gnu)
 293.470 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 293.471 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 293.472 +--- gcc-4.1.0/libobjc/configure
 293.473 ++++ gcc-4.1.0/libobjc/configure
 293.474 +@@ -3312,6 +3312,11 @@ linux-gnu*)
 293.475 +   lt_cv_deplibs_check_method=pass_all
 293.476 +   ;;
 293.477 + 
 293.478 ++linux-uclibc*)
 293.479 ++  lt_cv_deplibs_check_method=pass_all
 293.480 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 293.481 ++  ;;
 293.482 ++
 293.483 + netbsd* | knetbsd*-gnu)
 293.484 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 293.485 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 293.486 +--- gcc-4.1.0/libtool.m4
 293.487 ++++ gcc-4.1.0/libtool.m4
 293.488 +@@ -743,6 +743,11 @@ linux-gnu*)
 293.489 +   lt_cv_deplibs_check_method=pass_all
 293.490 +   ;;
 293.491 + 
 293.492 ++linux-uclibc*)
 293.493 ++  lt_cv_deplibs_check_method=pass_all
 293.494 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 293.495 ++  ;;
 293.496 ++
 293.497 + netbsd* | knetbsd*-gnu)
 293.498 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 293.499 +     [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
 293.500 +--- gcc-4.1.0/ltconfig
 293.501 ++++ gcc-4.1.0/ltconfig
 293.502 +@@ -603,6 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
 293.503 + 
 293.504 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
 293.505 + case $host_os in
 293.506 ++linux-uclibc*) ;;
 293.507 + linux-gnu*) ;;
 293.508 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
 293.509 + esac
 293.510 +@@ -1274,6 +1275,23 @@ linux-gnu*)
 293.511 +   dynamic_linker='GNU/Linux ld.so'
 293.512 +   ;;
 293.513 + 
 293.514 ++linux-uclibc*)
 293.515 ++  version_type=linux
 293.516 ++  need_lib_prefix=no
 293.517 ++  need_version=no
 293.518 ++  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 293.519 ++  soname_spec='${libname}${release}.so$major'
 293.520 ++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 293.521 ++  shlibpath_var=LD_LIBRARY_PATH
 293.522 ++  shlibpath_overrides_runpath=no
 293.523 ++  # This implies no fast_install, which is unacceptable.
 293.524 ++  # Some rework will be needed to allow for fast_install
 293.525 ++  # before this can be enabled.
 293.526 ++  hardcode_into_libs=yes
 293.527 ++  # Assume using the uClibc dynamic linker.
 293.528 ++  dynamic_linker="uClibc ld.so"
 293.529 ++  ;;
 293.530 ++
 293.531 + netbsd*)
 293.532 +   need_lib_prefix=no
 293.533 +   need_version=no
 293.534 +--- gcc-4.1.0/zlib/configure
 293.535 ++++ gcc-4.1.0/zlib/configure
 293.536 +@@ -3426,6 +3426,11 @@ linux-gnu*)
 293.537 +   lt_cv_deplibs_check_method=pass_all
 293.538 +   ;;
 293.539 + 
 293.540 ++linux-uclibc*)
 293.541 ++  lt_cv_deplibs_check_method=pass_all
 293.542 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 293.543 ++  ;;
 293.544 ++
 293.545 + netbsd* | knetbsd*-gnu)
 293.546 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 293.547 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
   294.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   294.2 +++ b/patches/gcc/4.1.1/110-arm-eabi.patch	Sat Feb 24 11:00:05 2007 +0000
   294.3 @@ -0,0 +1,27 @@
   294.4 +--- gcc-2005q3-1.orig/gcc/config.gcc	2005-10-31 19:02:54.000000000 +0300
   294.5 ++++ gcc-2005q3-1/gcc/config.gcc	2006-01-27 01:09:09.000000000 +0300
   294.6 +@@ -674,7 +674,7 @@
   294.7 + 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" 
   294.8 + 	tmake_file="${tmake_file} t-linux arm/t-arm"
   294.9 + 	case ${target} in
  294.10 +-	arm*-*-linux-gnueabi)
  294.11 ++	arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
  294.12 + 	    tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
  294.13 + 	    tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
  294.14 +   	    # The BPABI long long divmod functions return a 128-bit value in 
  294.15 +
  294.16 +diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h
  294.17 +--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h	2005-12-07 23:14:16.000000000 +0300
  294.18 ++++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h	2006-03-29 19:02:34.000000000 +0400
  294.19 +@@ -53,7 +53,11 @@
  294.20 + /* Use ld-linux.so.3 so that it will be possible to run "classic"
  294.21 +    GNU/Linux binaries on an EABI system.  */
  294.22 + #undef LINUX_TARGET_INTERPRETER
  294.23 ++#ifdef USE_UCLIBC
  294.24 ++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
  294.25 ++#else
  294.26 + #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
  294.27 ++#endif
  294.28 + 
  294.29 + /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
  294.30 +    use the GNU/Linux version, not the generic BPABI version.  */
   295.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   295.2 +++ b/patches/gcc/4.1.1/200-uclibc-locale.patch	Sat Feb 24 11:00:05 2007 +0000
   295.3 @@ -0,0 +1,3239 @@
   295.4 +--- gcc-4.1.0-dist/libstdc++-v3/acinclude.m4
   295.5 ++++ gcc-4.1.0/libstdc++-v3/acinclude.m4
   295.6 +@@ -1071,7 +1071,7 @@
   295.7 +   AC_MSG_CHECKING([for C locale to use])
   295.8 +   GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
   295.9 +     [use MODEL for target locale package],
  295.10 +-    [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
  295.11 ++    [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
  295.12 +   
  295.13 +   # If they didn't use this option switch, or if they specified --enable
  295.14 +   # with no specific model, we'll have to look for one.  If they
  295.15 +@@ -1087,6 +1087,9 @@
  295.16 +   # Default to "generic".
  295.17 +   if test $enable_clocale_flag = auto; then
  295.18 +     case ${target_os} in
  295.19 ++      *-uclibc*)
  295.20 ++        enable_clocale_flag=uclibc
  295.21 ++        ;;
  295.22 +       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
  295.23 +         AC_EGREP_CPP([_GLIBCXX_ok], [
  295.24 +         #include <features.h>
  295.25 +@@ -1230,6 +1233,40 @@
  295.26 +       CTIME_CC=config/locale/generic/time_members.cc
  295.27 +       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
  295.28 +       ;;
  295.29 ++    uclibc)
  295.30 ++      AC_MSG_RESULT(uclibc)
  295.31 ++
  295.32 ++      # Declare intention to use gettext, and add support for specific
  295.33 ++      # languages.
  295.34 ++      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
  295.35 ++      ALL_LINGUAS="de fr"
  295.36 ++
  295.37 ++      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
  295.38 ++      AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
  295.39 ++      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
  295.40 ++        USE_NLS=yes
  295.41 ++      fi
  295.42 ++      # Export the build objects.
  295.43 ++      for ling in $ALL_LINGUAS; do \
  295.44 ++        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
  295.45 ++        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
  295.46 ++      done
  295.47 ++      AC_SUBST(glibcxx_MOFILES)
  295.48 ++      AC_SUBST(glibcxx_POFILES)
  295.49 ++
  295.50 ++      CLOCALE_H=config/locale/uclibc/c_locale.h
  295.51 ++      CLOCALE_CC=config/locale/uclibc/c_locale.cc
  295.52 ++      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
  295.53 ++      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
  295.54 ++      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
  295.55 ++      CMESSAGES_H=config/locale/uclibc/messages_members.h
  295.56 ++      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
  295.57 ++      CMONEY_CC=config/locale/uclibc/monetary_members.cc
  295.58 ++      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
  295.59 ++      CTIME_H=config/locale/uclibc/time_members.h
  295.60 ++      CTIME_CC=config/locale/uclibc/time_members.cc
  295.61 ++      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
  295.62 ++      ;;
  295.63 +   esac
  295.64 + 
  295.65 +   # This is where the testsuite looks for locale catalogs, using the
  295.66 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
  295.67 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
  295.68 +@@ -0,0 +1,63 @@
  295.69 ++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
  295.70 ++
  295.71 ++// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
  295.72 ++//
  295.73 ++// This file is part of the GNU ISO C++ Library.  This library is free
  295.74 ++// software; you can redistribute it and/or modify it under the
  295.75 ++// terms of the GNU General Public License as published by the
  295.76 ++// Free Software Foundation; either version 2, or (at your option)
  295.77 ++// any later version.
  295.78 ++
  295.79 ++// This library is distributed in the hope that it will be useful,
  295.80 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
  295.81 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  295.82 ++// GNU General Public License for more details.
  295.83 ++
  295.84 ++// You should have received a copy of the GNU General Public License along
  295.85 ++// with this library; see the file COPYING.  If not, write to the Free
  295.86 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
  295.87 ++// USA.
  295.88 ++
  295.89 ++// As a special exception, you may use this file as part of a free software
  295.90 ++// library without restriction.  Specifically, if other files instantiate
  295.91 ++// templates or use macros or inline functions from this file, or you compile
  295.92 ++// this file and link it with other files to produce an executable, this
  295.93 ++// file does not by itself cause the resulting executable to be covered by
  295.94 ++// the GNU General Public License.  This exception does not however
  295.95 ++// invalidate any other reasons why the executable file might be covered by
  295.96 ++// the GNU General Public License.
  295.97 ++
  295.98 ++// Written by Jakub Jelinek <jakub@redhat.com>
  295.99 ++
 295.100 ++#include <bits/c++config.h>
 295.101 ++#include <clocale>
 295.102 ++
 295.103 ++#ifdef __UCLIBC_MJN3_ONLY__
 295.104 ++#warning clean this up
 295.105 ++#endif
 295.106 ++
 295.107 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.108 ++                                                  
 295.109 ++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
 295.110 ++extern "C" __typeof(strcoll_l) __strcoll_l;
 295.111 ++extern "C" __typeof(strftime_l) __strftime_l;
 295.112 ++extern "C" __typeof(strtod_l) __strtod_l;
 295.113 ++extern "C" __typeof(strtof_l) __strtof_l;
 295.114 ++extern "C" __typeof(strtold_l) __strtold_l;
 295.115 ++extern "C" __typeof(strxfrm_l) __strxfrm_l;
 295.116 ++extern "C" __typeof(newlocale) __newlocale;
 295.117 ++extern "C" __typeof(freelocale) __freelocale;
 295.118 ++extern "C" __typeof(duplocale) __duplocale;
 295.119 ++extern "C" __typeof(uselocale) __uselocale;
 295.120 ++
 295.121 ++#ifdef _GLIBCXX_USE_WCHAR_T
 295.122 ++extern "C" __typeof(iswctype_l) __iswctype_l;
 295.123 ++extern "C" __typeof(towlower_l) __towlower_l;
 295.124 ++extern "C" __typeof(towupper_l) __towupper_l;
 295.125 ++extern "C" __typeof(wcscoll_l) __wcscoll_l;
 295.126 ++extern "C" __typeof(wcsftime_l) __wcsftime_l;
 295.127 ++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
 295.128 ++extern "C" __typeof(wctype_l) __wctype_l;
 295.129 ++#endif 
 295.130 ++
 295.131 ++#endif // GLIBC 2.3 and later
 295.132 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc
 295.133 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
 295.134 +@@ -0,0 +1,152 @@
 295.135 ++// Wrapper for underlying C-language localization -*- C++ -*-
 295.136 ++
 295.137 ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 
 295.138 ++// Free Software Foundation, Inc.
 295.139 ++//
 295.140 ++// This file is part of the GNU ISO C++ Library.  This library is free
 295.141 ++// software; you can redistribute it and/or modify it under the
 295.142 ++// terms of the GNU General Public License as published by the
 295.143 ++// Free Software Foundation; either version 2, or (at your option)
 295.144 ++// any later version.
 295.145 ++
 295.146 ++// This library is distributed in the hope that it will be useful,
 295.147 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 295.148 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 295.149 ++// GNU General Public License for more details.
 295.150 ++
 295.151 ++// You should have received a copy of the GNU General Public License along
 295.152 ++// with this library; see the file COPYING.  If not, write to the Free
 295.153 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 295.154 ++// USA.
 295.155 ++
 295.156 ++// As a special exception, you may use this file as part of a free software
 295.157 ++// library without restriction.  Specifically, if other files instantiate
 295.158 ++// templates or use macros or inline functions from this file, or you compile
 295.159 ++// this file and link it with other files to produce an executable, this
 295.160 ++// file does not by itself cause the resulting executable to be covered by
 295.161 ++// the GNU General Public License.  This exception does not however
 295.162 ++// invalidate any other reasons why the executable file might be covered by
 295.163 ++// the GNU General Public License.
 295.164 ++
 295.165 ++//
 295.166 ++// ISO C++ 14882: 22.8  Standard locale categories.
 295.167 ++//
 295.168 ++
 295.169 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 295.170 ++
 295.171 ++#include <cerrno>  // For errno
 295.172 ++#include <locale>
 295.173 ++#include <stdexcept>
 295.174 ++#include <langinfo.h>
 295.175 ++#include <bits/c++locale_internal.h>
 295.176 ++
 295.177 ++#ifndef __UCLIBC_HAS_XLOCALE__
 295.178 ++#define __strtol_l(S, E, B, L)      strtol((S), (E), (B))
 295.179 ++#define __strtoul_l(S, E, B, L)     strtoul((S), (E), (B))
 295.180 ++#define __strtoll_l(S, E, B, L)     strtoll((S), (E), (B))
 295.181 ++#define __strtoull_l(S, E, B, L)    strtoull((S), (E), (B))
 295.182 ++#define __strtof_l(S, E, L)         strtof((S), (E))
 295.183 ++#define __strtod_l(S, E, L)         strtod((S), (E))
 295.184 ++#define __strtold_l(S, E, L)        strtold((S), (E))
 295.185 ++#warning should dummy __newlocale check for C|POSIX ?
 295.186 ++#define __newlocale(a, b, c)        NULL
 295.187 ++#define __freelocale(a)             ((void)0)
 295.188 ++#define __duplocale(a)              __c_locale()
 295.189 ++#endif
 295.190 ++
 295.191 ++namespace std 
 295.192 ++{
 295.193 ++  template<>
 295.194 ++    void
 295.195 ++    __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, 
 295.196 ++		   const __c_locale& __cloc)
 295.197 ++    {
 295.198 ++      char* __sanity;
 295.199 ++      errno = 0;
 295.200 ++      float __f = __strtof_l(__s, &__sanity, __cloc);
 295.201 ++      if (__sanity != __s && errno != ERANGE)
 295.202 ++	__v = __f;
 295.203 ++      else
 295.204 ++	__err |= ios_base::failbit;
 295.205 ++    }
 295.206 ++
 295.207 ++  template<>
 295.208 ++    void
 295.209 ++    __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, 
 295.210 ++		   const __c_locale& __cloc)
 295.211 ++    {
 295.212 ++      char* __sanity;
 295.213 ++      errno = 0;
 295.214 ++      double __d = __strtod_l(__s, &__sanity, __cloc);
 295.215 ++      if (__sanity != __s && errno != ERANGE)
 295.216 ++	__v = __d;
 295.217 ++      else
 295.218 ++	__err |= ios_base::failbit;
 295.219 ++    }
 295.220 ++
 295.221 ++  template<>
 295.222 ++    void
 295.223 ++    __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
 295.224 ++		   const __c_locale& __cloc)
 295.225 ++    {
 295.226 ++      char* __sanity;
 295.227 ++      errno = 0;
 295.228 ++      long double __ld = __strtold_l(__s, &__sanity, __cloc);
 295.229 ++      if (__sanity != __s && errno != ERANGE)
 295.230 ++	__v = __ld;
 295.231 ++      else
 295.232 ++	__err |= ios_base::failbit;
 295.233 ++    }
 295.234 ++
 295.235 ++  void
 295.236 ++  locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, 
 295.237 ++				    __c_locale __old)
 295.238 ++  {
 295.239 ++    __cloc = __newlocale(1 << LC_ALL, __s, __old);
 295.240 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.241 ++    if (!__cloc)
 295.242 ++      {
 295.243 ++	// This named locale is not supported by the underlying OS.
 295.244 ++	__throw_runtime_error(__N("locale::facet::_S_create_c_locale "
 295.245 ++			      "name not valid"));
 295.246 ++      }
 295.247 ++#endif
 295.248 ++  }
 295.249 ++  
 295.250 ++  void
 295.251 ++  locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
 295.252 ++  {
 295.253 ++    if (__cloc && _S_get_c_locale() != __cloc)
 295.254 ++      __freelocale(__cloc); 
 295.255 ++  }
 295.256 ++
 295.257 ++  __c_locale
 295.258 ++  locale::facet::_S_clone_c_locale(__c_locale& __cloc)
 295.259 ++  { return __duplocale(__cloc); }
 295.260 ++} // namespace std
 295.261 ++
 295.262 ++namespace __gnu_cxx
 295.263 ++{
 295.264 ++  const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
 295.265 ++    {
 295.266 ++      "LC_CTYPE", 
 295.267 ++      "LC_NUMERIC",
 295.268 ++      "LC_TIME", 
 295.269 ++      "LC_COLLATE", 
 295.270 ++      "LC_MONETARY",
 295.271 ++      "LC_MESSAGES", 
 295.272 ++#if _GLIBCXX_NUM_CATEGORIES != 0
 295.273 ++      "LC_PAPER", 
 295.274 ++      "LC_NAME", 
 295.275 ++      "LC_ADDRESS",
 295.276 ++      "LC_TELEPHONE", 
 295.277 ++      "LC_MEASUREMENT", 
 295.278 ++      "LC_IDENTIFICATION" 
 295.279 ++#endif
 295.280 ++    };
 295.281 ++}
 295.282 ++
 295.283 ++namespace std
 295.284 ++{
 295.285 ++  const char* const* const locale::_S_categories = __gnu_cxx::category_names;
 295.286 ++}  // namespace std
 295.287 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h
 295.288 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h
 295.289 +@@ -0,0 +1,117 @@
 295.290 ++// Wrapper for underlying C-language localization -*- C++ -*-
 295.291 ++
 295.292 ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 295.293 ++//
 295.294 ++// This file is part of the GNU ISO C++ Library.  This library is free
 295.295 ++// software; you can redistribute it and/or modify it under the
 295.296 ++// terms of the GNU General Public License as published by the
 295.297 ++// Free Software Foundation; either version 2, or (at your option)
 295.298 ++// any later version.
 295.299 ++
 295.300 ++// This library is distributed in the hope that it will be useful,
 295.301 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 295.302 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 295.303 ++// GNU General Public License for more details.
 295.304 ++
 295.305 ++// You should have received a copy of the GNU General Public License along
 295.306 ++// with this library; see the file COPYING.  If not, write to the Free
 295.307 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 295.308 ++// USA.
 295.309 ++
 295.310 ++// As a special exception, you may use this file as part of a free software
 295.311 ++// library without restriction.  Specifically, if other files instantiate
 295.312 ++// templates or use macros or inline functions from this file, or you compile
 295.313 ++// this file and link it with other files to produce an executable, this
 295.314 ++// file does not by itself cause the resulting executable to be covered by
 295.315 ++// the GNU General Public License.  This exception does not however
 295.316 ++// invalidate any other reasons why the executable file might be covered by
 295.317 ++// the GNU General Public License.
 295.318 ++
 295.319 ++//
 295.320 ++// ISO C++ 14882: 22.8  Standard locale categories.
 295.321 ++//
 295.322 ++
 295.323 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 295.324 ++
 295.325 ++#ifndef _C_LOCALE_H
 295.326 ++#define _C_LOCALE_H 1
 295.327 ++
 295.328 ++#pragma GCC system_header
 295.329 ++
 295.330 ++#include <cstring>              // get std::strlen
 295.331 ++#include <cstdio>               // get std::snprintf or std::sprintf
 295.332 ++#include <clocale>
 295.333 ++#include <langinfo.h>		// For codecvt
 295.334 ++#ifdef __UCLIBC_MJN3_ONLY__
 295.335 ++#warning fix this
 295.336 ++#endif
 295.337 ++#ifdef __UCLIBC_HAS_LOCALE__
 295.338 ++#include <iconv.h>		// For codecvt using iconv, iconv_t
 295.339 ++#endif
 295.340 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
 295.341 ++#include <libintl.h> 		// For messages
 295.342 ++#endif
 295.343 ++
 295.344 ++#ifdef __UCLIBC_MJN3_ONLY__
 295.345 ++#warning what is _GLIBCXX_C_LOCALE_GNU for
 295.346 ++#endif
 295.347 ++#define _GLIBCXX_C_LOCALE_GNU 1
 295.348 ++
 295.349 ++#ifdef __UCLIBC_MJN3_ONLY__
 295.350 ++#warning fix categories
 295.351 ++#endif
 295.352 ++// #define _GLIBCXX_NUM_CATEGORIES 6
 295.353 ++#define _GLIBCXX_NUM_CATEGORIES 0
 295.354 ++ 
 295.355 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.356 ++namespace __gnu_cxx
 295.357 ++{
 295.358 ++  extern "C" __typeof(uselocale) __uselocale;
 295.359 ++}
 295.360 ++#endif
 295.361 ++
 295.362 ++namespace std
 295.363 ++{
 295.364 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.365 ++  typedef __locale_t		__c_locale;
 295.366 ++#else
 295.367 ++  typedef int*			__c_locale;
 295.368 ++#endif
 295.369 ++
 295.370 ++  // Convert numeric value of type _Tv to string and return length of
 295.371 ++  // string.  If snprintf is available use it, otherwise fall back to
 295.372 ++  // the unsafe sprintf which, in general, can be dangerous and should
 295.373 ++  // be avoided.
 295.374 ++  template<typename _Tv>
 295.375 ++    int
 295.376 ++    __convert_from_v(char* __out, 
 295.377 ++		     const int __size __attribute__ ((__unused__)),
 295.378 ++		     const char* __fmt,
 295.379 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.380 ++		     _Tv __v, const __c_locale& __cloc, int __prec)
 295.381 ++    {
 295.382 ++      __c_locale __old = __gnu_cxx::__uselocale(__cloc);
 295.383 ++#else
 295.384 ++		     _Tv __v, const __c_locale&, int __prec)
 295.385 ++    {
 295.386 ++# ifdef __UCLIBC_HAS_LOCALE__
 295.387 ++      char* __old = std::setlocale(LC_ALL, NULL);
 295.388 ++      char* __sav = new char[std::strlen(__old) + 1];
 295.389 ++      std::strcpy(__sav, __old);
 295.390 ++      std::setlocale(LC_ALL, "C");
 295.391 ++# endif
 295.392 ++#endif
 295.393 ++
 295.394 ++      const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
 295.395 ++
 295.396 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.397 ++      __gnu_cxx::__uselocale(__old);
 295.398 ++#elif defined __UCLIBC_HAS_LOCALE__
 295.399 ++      std::setlocale(LC_ALL, __sav);
 295.400 ++      delete [] __sav;
 295.401 ++#endif
 295.402 ++      return __ret;
 295.403 ++    }
 295.404 ++}
 295.405 ++
 295.406 ++#endif
 295.407 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
 295.408 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
 295.409 +@@ -0,0 +1,306 @@
 295.410 ++// std::codecvt implementation details, GNU version -*- C++ -*-
 295.411 ++
 295.412 ++// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 295.413 ++//
 295.414 ++// This file is part of the GNU ISO C++ Library.  This library is free
 295.415 ++// software; you can redistribute it and/or modify it under the
 295.416 ++// terms of the GNU General Public License as published by the
 295.417 ++// Free Software Foundation; either version 2, or (at your option)
 295.418 ++// any later version.
 295.419 ++
 295.420 ++// This library is distributed in the hope that it will be useful,
 295.421 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 295.422 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 295.423 ++// GNU General Public License for more details.
 295.424 ++
 295.425 ++// You should have received a copy of the GNU General Public License along
 295.426 ++// with this library; see the file COPYING.  If not, write to the Free
 295.427 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 295.428 ++// USA.
 295.429 ++
 295.430 ++// As a special exception, you may use this file as part of a free software
 295.431 ++// library without restriction.  Specifically, if other files instantiate
 295.432 ++// templates or use macros or inline functions from this file, or you compile
 295.433 ++// this file and link it with other files to produce an executable, this
 295.434 ++// file does not by itself cause the resulting executable to be covered by
 295.435 ++// the GNU General Public License.  This exception does not however
 295.436 ++// invalidate any other reasons why the executable file might be covered by
 295.437 ++// the GNU General Public License.
 295.438 ++
 295.439 ++//
 295.440 ++// ISO C++ 14882: 22.2.1.5 - Template class codecvt
 295.441 ++//
 295.442 ++
 295.443 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 295.444 ++
 295.445 ++#include <locale>
 295.446 ++#include <bits/c++locale_internal.h>
 295.447 ++
 295.448 ++namespace std
 295.449 ++{
 295.450 ++  // Specializations.
 295.451 ++#ifdef _GLIBCXX_USE_WCHAR_T
 295.452 ++  codecvt_base::result
 295.453 ++  codecvt<wchar_t, char, mbstate_t>::
 295.454 ++  do_out(state_type& __state, const intern_type* __from, 
 295.455 ++	 const intern_type* __from_end, const intern_type*& __from_next,
 295.456 ++	 extern_type* __to, extern_type* __to_end,
 295.457 ++	 extern_type*& __to_next) const
 295.458 ++  {
 295.459 ++    result __ret = ok;
 295.460 ++    state_type __tmp_state(__state);
 295.461 ++
 295.462 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.463 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 295.464 ++#endif
 295.465 ++
 295.466 ++    // wcsnrtombs is *very* fast but stops if encounters NUL characters:
 295.467 ++    // in case we fall back to wcrtomb and then continue, in a loop.
 295.468 ++    // NB: wcsnrtombs is a GNU extension
 295.469 ++    for (__from_next = __from, __to_next = __to;
 295.470 ++	 __from_next < __from_end && __to_next < __to_end
 295.471 ++	 && __ret == ok;)
 295.472 ++      {
 295.473 ++	const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
 295.474 ++						      __from_end - __from_next);
 295.475 ++	if (!__from_chunk_end)
 295.476 ++	  __from_chunk_end = __from_end;
 295.477 ++
 295.478 ++	__from = __from_next;
 295.479 ++	const size_t __conv = wcsnrtombs(__to_next, &__from_next,
 295.480 ++					 __from_chunk_end - __from_next,
 295.481 ++					 __to_end - __to_next, &__state);
 295.482 ++	if (__conv == static_cast<size_t>(-1))
 295.483 ++	  {
 295.484 ++	    // In case of error, in order to stop at the exact place we
 295.485 ++	    // have to start again from the beginning with a series of
 295.486 ++	    // wcrtomb.
 295.487 ++	    for (; __from < __from_next; ++__from)
 295.488 ++	      __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
 295.489 ++	    __state = __tmp_state;
 295.490 ++	    __ret = error;
 295.491 ++	  }
 295.492 ++	else if (__from_next && __from_next < __from_chunk_end)
 295.493 ++	  {
 295.494 ++	    __to_next += __conv;
 295.495 ++	    __ret = partial;
 295.496 ++	  }
 295.497 ++	else
 295.498 ++	  {
 295.499 ++	    __from_next = __from_chunk_end;
 295.500 ++	    __to_next += __conv;
 295.501 ++	  }
 295.502 ++
 295.503 ++	if (__from_next < __from_end && __ret == ok)
 295.504 ++	  {
 295.505 ++	    extern_type __buf[MB_LEN_MAX];
 295.506 ++	    __tmp_state = __state;
 295.507 ++	    const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
 295.508 ++	    if (__conv > static_cast<size_t>(__to_end - __to_next))
 295.509 ++	      __ret = partial;
 295.510 ++	    else
 295.511 ++	      {
 295.512 ++		memcpy(__to_next, __buf, __conv);
 295.513 ++		__state = __tmp_state;
 295.514 ++		__to_next += __conv;
 295.515 ++		++__from_next;
 295.516 ++	      }
 295.517 ++	  }
 295.518 ++      }
 295.519 ++
 295.520 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.521 ++    __uselocale(__old);
 295.522 ++#endif
 295.523 ++
 295.524 ++    return __ret; 
 295.525 ++  }
 295.526 ++  
 295.527 ++  codecvt_base::result
 295.528 ++  codecvt<wchar_t, char, mbstate_t>::
 295.529 ++  do_in(state_type& __state, const extern_type* __from, 
 295.530 ++	const extern_type* __from_end, const extern_type*& __from_next,
 295.531 ++	intern_type* __to, intern_type* __to_end,
 295.532 ++	intern_type*& __to_next) const
 295.533 ++  {
 295.534 ++    result __ret = ok;
 295.535 ++    state_type __tmp_state(__state);
 295.536 ++
 295.537 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.538 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 295.539 ++#endif
 295.540 ++
 295.541 ++    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
 295.542 ++    // in case we store a L'\0' and then continue, in a loop.
 295.543 ++    // NB: mbsnrtowcs is a GNU extension
 295.544 ++    for (__from_next = __from, __to_next = __to;
 295.545 ++	 __from_next < __from_end && __to_next < __to_end
 295.546 ++	 && __ret == ok;)
 295.547 ++      {
 295.548 ++	const extern_type* __from_chunk_end;
 295.549 ++	__from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
 295.550 ++								  __from_end
 295.551 ++								  - __from_next));
 295.552 ++	if (!__from_chunk_end)
 295.553 ++	  __from_chunk_end = __from_end;
 295.554 ++
 295.555 ++	__from = __from_next;
 295.556 ++	size_t __conv = mbsnrtowcs(__to_next, &__from_next,
 295.557 ++				   __from_chunk_end - __from_next,
 295.558 ++				   __to_end - __to_next, &__state);
 295.559 ++	if (__conv == static_cast<size_t>(-1))
 295.560 ++	  {
 295.561 ++	    // In case of error, in order to stop at the exact place we
 295.562 ++	    // have to start again from the beginning with a series of
 295.563 ++	    // mbrtowc.
 295.564 ++	    for (;; ++__to_next, __from += __conv)
 295.565 ++	      {
 295.566 ++		__conv = mbrtowc(__to_next, __from, __from_end - __from,
 295.567 ++				 &__tmp_state);
 295.568 ++		if (__conv == static_cast<size_t>(-1)
 295.569 ++		    || __conv == static_cast<size_t>(-2))
 295.570 ++		  break;
 295.571 ++	      }
 295.572 ++	    __from_next = __from;
 295.573 ++	    __state = __tmp_state;	    
 295.574 ++	    __ret = error;
 295.575 ++	  }
 295.576 ++	else if (__from_next && __from_next < __from_chunk_end)
 295.577 ++	  {
 295.578 ++	    // It is unclear what to return in this case (see DR 382). 
 295.579 ++	    __to_next += __conv;
 295.580 ++	    __ret = partial;
 295.581 ++	  }
 295.582 ++	else
 295.583 ++	  {
 295.584 ++	    __from_next = __from_chunk_end;
 295.585 ++	    __to_next += __conv;
 295.586 ++	  }
 295.587 ++
 295.588 ++	if (__from_next < __from_end && __ret == ok)
 295.589 ++	  {
 295.590 ++	    if (__to_next < __to_end)
 295.591 ++	      {
 295.592 ++		// XXX Probably wrong for stateful encodings
 295.593 ++		__tmp_state = __state;		
 295.594 ++		++__from_next;
 295.595 ++		*__to_next++ = L'\0';
 295.596 ++	      }
 295.597 ++	    else
 295.598 ++	      __ret = partial;
 295.599 ++	  }
 295.600 ++      }
 295.601 ++
 295.602 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.603 ++    __uselocale(__old);
 295.604 ++#endif
 295.605 ++
 295.606 ++    return __ret; 
 295.607 ++  }
 295.608 ++
 295.609 ++  int 
 295.610 ++  codecvt<wchar_t, char, mbstate_t>::
 295.611 ++  do_encoding() const throw()
 295.612 ++  {
 295.613 ++    // XXX This implementation assumes that the encoding is
 295.614 ++    // stateless and is either single-byte or variable-width.
 295.615 ++    int __ret = 0;
 295.616 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.617 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 295.618 ++#endif
 295.619 ++    if (MB_CUR_MAX == 1)
 295.620 ++      __ret = 1;
 295.621 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.622 ++    __uselocale(__old);
 295.623 ++#endif
 295.624 ++    return __ret;
 295.625 ++  }  
 295.626 ++
 295.627 ++  int 
 295.628 ++  codecvt<wchar_t, char, mbstate_t>::
 295.629 ++  do_max_length() const throw()
 295.630 ++  {
 295.631 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.632 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 295.633 ++#endif
 295.634 ++    // XXX Probably wrong for stateful encodings.
 295.635 ++    int __ret = MB_CUR_MAX;
 295.636 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.637 ++    __uselocale(__old);
 295.638 ++#endif
 295.639 ++    return __ret;
 295.640 ++  }
 295.641 ++  
 295.642 ++  int 
 295.643 ++  codecvt<wchar_t, char, mbstate_t>::
 295.644 ++  do_length(state_type& __state, const extern_type* __from,
 295.645 ++	    const extern_type* __end, size_t __max) const
 295.646 ++  {
 295.647 ++    int __ret = 0;
 295.648 ++    state_type __tmp_state(__state);
 295.649 ++
 295.650 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.651 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 295.652 ++#endif
 295.653 ++
 295.654 ++    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
 295.655 ++    // in case we advance past it and then continue, in a loop.
 295.656 ++    // NB: mbsnrtowcs is a GNU extension
 295.657 ++  
 295.658 ++    // A dummy internal buffer is needed in order for mbsnrtocws to consider
 295.659 ++    // its fourth parameter (it wouldn't with NULL as first parameter).
 295.660 ++    wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) 
 295.661 ++							   * __max));
 295.662 ++    while (__from < __end && __max)
 295.663 ++      {
 295.664 ++	const extern_type* __from_chunk_end;
 295.665 ++	__from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
 295.666 ++								  __end
 295.667 ++								  - __from));
 295.668 ++	if (!__from_chunk_end)
 295.669 ++	  __from_chunk_end = __end;
 295.670 ++
 295.671 ++	const extern_type* __tmp_from = __from;
 295.672 ++	size_t __conv = mbsnrtowcs(__to, &__from,
 295.673 ++				   __from_chunk_end - __from,
 295.674 ++				   __max, &__state);
 295.675 ++	if (__conv == static_cast<size_t>(-1))
 295.676 ++	  {
 295.677 ++	    // In case of error, in order to stop at the exact place we
 295.678 ++	    // have to start again from the beginning with a series of
 295.679 ++	    // mbrtowc.
 295.680 ++	    for (__from = __tmp_from;; __from += __conv)
 295.681 ++	      {
 295.682 ++		__conv = mbrtowc(NULL, __from, __end - __from,
 295.683 ++				 &__tmp_state);
 295.684 ++		if (__conv == static_cast<size_t>(-1)
 295.685 ++		    || __conv == static_cast<size_t>(-2))
 295.686 ++		  break;
 295.687 ++	      }
 295.688 ++	    __state = __tmp_state;
 295.689 ++	    __ret += __from - __tmp_from;
 295.690 ++	    break;
 295.691 ++	  }
 295.692 ++	if (!__from)
 295.693 ++	  __from = __from_chunk_end;
 295.694 ++	
 295.695 ++	__ret += __from - __tmp_from;
 295.696 ++	__max -= __conv;
 295.697 ++
 295.698 ++	if (__from < __end && __max)
 295.699 ++	  {
 295.700 ++	    // XXX Probably wrong for stateful encodings
 295.701 ++	    __tmp_state = __state;
 295.702 ++	    ++__from;
 295.703 ++	    ++__ret;
 295.704 ++	    --__max;
 295.705 ++	  }
 295.706 ++      }
 295.707 ++
 295.708 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.709 ++    __uselocale(__old);
 295.710 ++#endif
 295.711 ++
 295.712 ++    return __ret; 
 295.713 ++  }
 295.714 ++#endif
 295.715 ++}
 295.716 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc
 295.717 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc
 295.718 +@@ -0,0 +1,80 @@
 295.719 ++// std::collate implementation details, GNU version -*- C++ -*-
 295.720 ++
 295.721 ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
 295.722 ++//
 295.723 ++// This file is part of the GNU ISO C++ Library.  This library is free
 295.724 ++// software; you can redistribute it and/or modify it under the
 295.725 ++// terms of the GNU General Public License as published by the
 295.726 ++// Free Software Foundation; either version 2, or (at your option)
 295.727 ++// any later version.
 295.728 ++
 295.729 ++// This library is distributed in the hope that it will be useful,
 295.730 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 295.731 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 295.732 ++// GNU General Public License for more details.
 295.733 ++
 295.734 ++// You should have received a copy of the GNU General Public License along
 295.735 ++// with this library; see the file COPYING.  If not, write to the Free
 295.736 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 295.737 ++// USA.
 295.738 ++
 295.739 ++// As a special exception, you may use this file as part of a free software
 295.740 ++// library without restriction.  Specifically, if other files instantiate
 295.741 ++// templates or use macros or inline functions from this file, or you compile
 295.742 ++// this file and link it with other files to produce an executable, this
 295.743 ++// file does not by itself cause the resulting executable to be covered by
 295.744 ++// the GNU General Public License.  This exception does not however
 295.745 ++// invalidate any other reasons why the executable file might be covered by
 295.746 ++// the GNU General Public License.
 295.747 ++
 295.748 ++//
 295.749 ++// ISO C++ 14882: 22.2.4.1.2  collate virtual functions
 295.750 ++//
 295.751 ++
 295.752 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 295.753 ++
 295.754 ++#include <locale>
 295.755 ++#include <bits/c++locale_internal.h>
 295.756 ++
 295.757 ++#ifndef __UCLIBC_HAS_XLOCALE__
 295.758 ++#define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
 295.759 ++#define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
 295.760 ++#define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
 295.761 ++#define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
 295.762 ++#endif
 295.763 ++
 295.764 ++namespace std
 295.765 ++{
 295.766 ++  // These are basically extensions to char_traits, and perhaps should
 295.767 ++  // be put there instead of here.
 295.768 ++  template<>
 295.769 ++    int 
 295.770 ++    collate<char>::_M_compare(const char* __one, const char* __two) const
 295.771 ++    { 
 295.772 ++      int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
 295.773 ++      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
 295.774 ++    }
 295.775 ++  
 295.776 ++  template<>
 295.777 ++    size_t
 295.778 ++    collate<char>::_M_transform(char* __to, const char* __from, 
 295.779 ++				size_t __n) const 
 295.780 ++    { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
 295.781 ++
 295.782 ++#ifdef _GLIBCXX_USE_WCHAR_T
 295.783 ++  template<>
 295.784 ++    int 
 295.785 ++    collate<wchar_t>::_M_compare(const wchar_t* __one, 
 295.786 ++				 const wchar_t* __two) const
 295.787 ++    {
 295.788 ++      int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
 295.789 ++      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
 295.790 ++    }
 295.791 ++  
 295.792 ++  template<>
 295.793 ++    size_t
 295.794 ++    collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
 295.795 ++				   size_t __n) const
 295.796 ++    { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
 295.797 ++#endif
 295.798 ++}
 295.799 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc
 295.800 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
 295.801 +@@ -0,0 +1,314 @@
 295.802 ++// std::ctype implementation details, GNU version -*- C++ -*-
 295.803 ++
 295.804 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 295.805 ++//
 295.806 ++// This file is part of the GNU ISO C++ Library.  This library is free
 295.807 ++// software; you can redistribute it and/or modify it under the
 295.808 ++// terms of the GNU General Public License as published by the
 295.809 ++// Free Software Foundation; either version 2, or (at your option)
 295.810 ++// any later version.
 295.811 ++
 295.812 ++// This library is distributed in the hope that it will be useful,
 295.813 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 295.814 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 295.815 ++// GNU General Public License for more details.
 295.816 ++
 295.817 ++// You should have received a copy of the GNU General Public License along
 295.818 ++// with this library; see the file COPYING.  If not, write to the Free
 295.819 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 295.820 ++// USA.
 295.821 ++
 295.822 ++// As a special exception, you may use this file as part of a free software
 295.823 ++// library without restriction.  Specifically, if other files instantiate
 295.824 ++// templates or use macros or inline functions from this file, or you compile
 295.825 ++// this file and link it with other files to produce an executable, this
 295.826 ++// file does not by itself cause the resulting executable to be covered by
 295.827 ++// the GNU General Public License.  This exception does not however
 295.828 ++// invalidate any other reasons why the executable file might be covered by
 295.829 ++// the GNU General Public License.
 295.830 ++
 295.831 ++//
 295.832 ++// ISO C++ 14882: 22.2.1.1.2  ctype virtual functions.
 295.833 ++//
 295.834 ++
 295.835 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 295.836 ++
 295.837 ++#define _LIBC
 295.838 ++#include <locale>
 295.839 ++#undef _LIBC
 295.840 ++#include <bits/c++locale_internal.h>
 295.841 ++
 295.842 ++#ifndef __UCLIBC_HAS_XLOCALE__
 295.843 ++#define __wctype_l(S, L)           wctype((S))
 295.844 ++#define __towupper_l(C, L)         towupper((C))
 295.845 ++#define __towlower_l(C, L)         towlower((C))
 295.846 ++#define __iswctype_l(C, M, L)      iswctype((C), (M))
 295.847 ++#endif
 295.848 ++
 295.849 ++namespace std
 295.850 ++{
 295.851 ++  // NB: The other ctype<char> specializations are in src/locale.cc and
 295.852 ++  // various /config/os/* files.
 295.853 ++  template<>
 295.854 ++    ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
 295.855 ++    : ctype<char>(0, false, __refs) 
 295.856 ++    { 		
 295.857 ++      if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
 295.858 ++	{
 295.859 ++	  this->_S_destroy_c_locale(this->_M_c_locale_ctype);
 295.860 ++	  this->_S_create_c_locale(this->_M_c_locale_ctype, __s); 
 295.861 ++#ifdef __UCLIBC_HAS_XLOCALE__
 295.862 ++	  this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
 295.863 ++	  this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
 295.864 ++	  this->_M_table = this->_M_c_locale_ctype->__ctype_b;
 295.865 ++#endif
 295.866 ++	}
 295.867 ++    }
 295.868 ++
 295.869 ++#ifdef _GLIBCXX_USE_WCHAR_T  
 295.870 ++  ctype<wchar_t>::__wmask_type
 295.871 ++  ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
 295.872 ++  {
 295.873 ++    __wmask_type __ret;
 295.874 ++    switch (__m)
 295.875 ++      {
 295.876 ++      case space:
 295.877 ++	__ret = __wctype_l("space", _M_c_locale_ctype);
 295.878 ++	break;
 295.879 ++      case print:
 295.880 ++	__ret = __wctype_l("print", _M_c_locale_ctype);
 295.881 ++	break;
 295.882 ++      case cntrl:
 295.883 ++	__ret = __wctype_l("cntrl", _M_c_locale_ctype);
 295.884 ++	break;
 295.885 ++      case upper:
 295.886 ++	__ret = __wctype_l("upper", _M_c_locale_ctype);
 295.887 ++	break;
 295.888 ++      case lower:
 295.889 ++	__ret = __wctype_l("lower", _M_c_locale_ctype);
 295.890 ++	break;
 295.891 ++      case alpha:
 295.892 ++	__ret = __wctype_l("alpha", _M_c_locale_ctype);
 295.893 ++	break;
 295.894 ++      case digit:
 295.895 ++	__ret = __wctype_l("digit", _M_c_locale_ctype);
 295.896 ++	break;
 295.897 ++      case punct:
 295.898 ++	__ret = __wctype_l("punct", _M_c_locale_ctype);
 295.899 ++	break;
 295.900 ++      case xdigit:
 295.901 ++	__ret = __wctype_l("xdigit", _M_c_locale_ctype);
 295.902 ++	break;
 295.903 ++      case alnum:
 295.904 ++	__ret = __wctype_l("alnum", _M_c_locale_ctype);
 295.905 ++	break;
 295.906 ++      case graph:
 295.907 ++	__ret = __wctype_l("graph", _M_c_locale_ctype);
 295.908 ++	break;
 295.909 ++      default:
 295.910 ++	__ret = __wmask_type();
 295.911 ++      }
 295.912 ++    return __ret;
 295.913 ++  }
 295.914 ++  
 295.915 ++  wchar_t
 295.916 ++  ctype<wchar_t>::do_toupper(wchar_t __c) const
 295.917 ++  { return __towupper_l(__c, _M_c_locale_ctype); }
 295.918 ++
 295.919 ++  const wchar_t*
 295.920 ++  ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
 295.921 ++  {
 295.922 ++    while (__lo < __hi)
 295.923 ++      {
 295.924 ++        *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
 295.925 ++        ++__lo;
 295.926 ++      }
 295.927 ++    return __hi;
 295.928 ++  }
 295.929 ++  
 295.930 ++  wchar_t
 295.931 ++  ctype<wchar_t>::do_tolower(wchar_t __c) const
 295.932 ++  { return __towlower_l(__c, _M_c_locale_ctype); }
 295.933 ++  
 295.934 ++  const wchar_t*
 295.935 ++  ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
 295.936 ++  {
 295.937 ++    while (__lo < __hi)
 295.938 ++      {
 295.939 ++        *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
 295.940 ++        ++__lo;
 295.941 ++      }
 295.942 ++    return __hi;
 295.943 ++  }
 295.944 ++
 295.945 ++  bool
 295.946 ++  ctype<wchar_t>::
 295.947 ++  do_is(mask __m, wchar_t __c) const
 295.948 ++  { 
 295.949 ++    // The case of __m == ctype_base::space is particularly important,
 295.950 ++    // due to its use in many istream functions.  Therefore we deal with
 295.951 ++    // it first, exploiting the knowledge that on GNU systems _M_bit[5]
 295.952 ++    // is the mask corresponding to ctype_base::space.  NB: an encoding
 295.953 ++    // change would not affect correctness!
 295.954 ++    bool __ret = false;
 295.955 ++    if (__m == _M_bit[5])
 295.956 ++      __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
 295.957 ++    else
 295.958 ++      {
 295.959 ++	// Highest bitmask in ctype_base == 10, but extra in "C"
 295.960 ++	// library for blank.
 295.961 ++	const size_t __bitmasksize = 11;
 295.962 ++	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
 295.963 ++	  if (__m & _M_bit[__bitcur])
 295.964 ++	    {
 295.965 ++	      if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
 295.966 ++		{
 295.967 ++		  __ret = true;
 295.968 ++		  break;
 295.969 ++		}
 295.970 ++	      else if (__m == _M_bit[__bitcur])
 295.971 ++		break;
 295.972 ++	    }
 295.973 ++      }
 295.974 ++    return __ret;    
 295.975 ++  }
 295.976 ++
 295.977 ++  const wchar_t* 
 295.978 ++  ctype<wchar_t>::
 295.979 ++  do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
 295.980 ++  {
 295.981 ++    for (; __lo < __hi; ++__vec, ++__lo)
 295.982 ++      {
 295.983 ++	// Highest bitmask in ctype_base == 10, but extra in "C"
 295.984 ++	// library for blank.
 295.985 ++	const size_t __bitmasksize = 11; 
 295.986 ++	mask __m = 0;
 295.987 ++	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
 295.988 ++	  if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
 295.989 ++	    __m |= _M_bit[__bitcur];
 295.990 ++	*__vec = __m;
 295.991 ++      }
 295.992 ++    return __hi;
 295.993 ++  }
 295.994 ++  
 295.995 ++  const wchar_t* 
 295.996 ++  ctype<wchar_t>::
 295.997 ++  do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
 295.998 ++  {
 295.999 ++    while (__lo < __hi && !this->do_is(__m, *__lo))
295.1000 ++      ++__lo;
295.1001 ++    return __lo;
295.1002 ++  }
295.1003 ++
295.1004 ++  const wchar_t*
295.1005 ++  ctype<wchar_t>::
295.1006 ++  do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
295.1007 ++  {
295.1008 ++    while (__lo < __hi && this->do_is(__m, *__lo) != 0)
295.1009 ++      ++__lo;
295.1010 ++    return __lo;
295.1011 ++  }
295.1012 ++
295.1013 ++  wchar_t
295.1014 ++  ctype<wchar_t>::
295.1015 ++  do_widen(char __c) const
295.1016 ++  { return _M_widen[static_cast<unsigned char>(__c)]; }
295.1017 ++
295.1018 ++  const char* 
295.1019 ++  ctype<wchar_t>::
295.1020 ++  do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
295.1021 ++  {
295.1022 ++    while (__lo < __hi)
295.1023 ++      {
295.1024 ++	*__dest = _M_widen[static_cast<unsigned char>(*__lo)];
295.1025 ++	++__lo;
295.1026 ++	++__dest;
295.1027 ++      }
295.1028 ++    return __hi;
295.1029 ++  }
295.1030 ++
295.1031 ++  char
295.1032 ++  ctype<wchar_t>::
295.1033 ++  do_narrow(wchar_t __wc, char __dfault) const
295.1034 ++  {
295.1035 ++    if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
295.1036 ++      return _M_narrow[__wc];
295.1037 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.1038 ++    __c_locale __old = __uselocale(_M_c_locale_ctype);
295.1039 ++#endif
295.1040 ++    const int __c = wctob(__wc);
295.1041 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.1042 ++    __uselocale(__old);
295.1043 ++#endif
295.1044 ++    return (__c == EOF ? __dfault : static_cast<char>(__c)); 
295.1045 ++  }
295.1046 ++
295.1047 ++  const wchar_t*
295.1048 ++  ctype<wchar_t>::
295.1049 ++  do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, 
295.1050 ++	    char* __dest) const
295.1051 ++  {
295.1052 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.1053 ++    __c_locale __old = __uselocale(_M_c_locale_ctype);
295.1054 ++#endif
295.1055 ++    if (_M_narrow_ok)
295.1056 ++      while (__lo < __hi)
295.1057 ++	{
295.1058 ++	  if (*__lo >= 0 && *__lo < 128)
295.1059 ++	    *__dest = _M_narrow[*__lo];
295.1060 ++	  else
295.1061 ++	    {
295.1062 ++	      const int __c = wctob(*__lo);
295.1063 ++	      *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
295.1064 ++	    }
295.1065 ++	  ++__lo;
295.1066 ++	  ++__dest;
295.1067 ++	}
295.1068 ++    else
295.1069 ++      while (__lo < __hi)
295.1070 ++	{
295.1071 ++	  const int __c = wctob(*__lo);
295.1072 ++	  *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
295.1073 ++	  ++__lo;
295.1074 ++	  ++__dest;
295.1075 ++	}
295.1076 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.1077 ++    __uselocale(__old);
295.1078 ++#endif
295.1079 ++    return __hi;
295.1080 ++  }
295.1081 ++
295.1082 ++  void
295.1083 ++  ctype<wchar_t>::_M_initialize_ctype()
295.1084 ++  {
295.1085 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.1086 ++    __c_locale __old = __uselocale(_M_c_locale_ctype);
295.1087 ++#endif
295.1088 ++    wint_t __i;
295.1089 ++    for (__i = 0; __i < 128; ++__i)
295.1090 ++      {
295.1091 ++	const int __c = wctob(__i);
295.1092 ++	if (__c == EOF)
295.1093 ++	  break;
295.1094 ++	else
295.1095 ++	  _M_narrow[__i] = static_cast<char>(__c);
295.1096 ++      }
295.1097 ++    if (__i == 128)
295.1098 ++      _M_narrow_ok = true;
295.1099 ++    else
295.1100 ++      _M_narrow_ok = false;
295.1101 ++    for (size_t __j = 0;
295.1102 ++	 __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
295.1103 ++      _M_widen[__j] = btowc(__j);
295.1104 ++
295.1105 ++    for (size_t __k = 0; __k <= 11; ++__k)
295.1106 ++      { 
295.1107 ++	_M_bit[__k] = static_cast<mask>(_ISbit(__k));
295.1108 ++	_M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
295.1109 ++      }
295.1110 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.1111 ++    __uselocale(__old);
295.1112 ++#endif
295.1113 ++  }
295.1114 ++#endif //  _GLIBCXX_USE_WCHAR_T
295.1115 ++}
295.1116 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc
295.1117 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc
295.1118 +@@ -0,0 +1,100 @@
295.1119 ++// std::messages implementation details, GNU version -*- C++ -*-
295.1120 ++
295.1121 ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
295.1122 ++//
295.1123 ++// This file is part of the GNU ISO C++ Library.  This library is free
295.1124 ++// software; you can redistribute it and/or modify it under the
295.1125 ++// terms of the GNU General Public License as published by the
295.1126 ++// Free Software Foundation; either version 2, or (at your option)
295.1127 ++// any later version.
295.1128 ++
295.1129 ++// This library is distributed in the hope that it will be useful,
295.1130 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
295.1131 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
295.1132 ++// GNU General Public License for more details.
295.1133 ++
295.1134 ++// You should have received a copy of the GNU General Public License along
295.1135 ++// with this library; see the file COPYING.  If not, write to the Free
295.1136 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
295.1137 ++// USA.
295.1138 ++
295.1139 ++// As a special exception, you may use this file as part of a free software
295.1140 ++// library without restriction.  Specifically, if other files instantiate
295.1141 ++// templates or use macros or inline functions from this file, or you compile
295.1142 ++// this file and link it with other files to produce an executable, this
295.1143 ++// file does not by itself cause the resulting executable to be covered by
295.1144 ++// the GNU General Public License.  This exception does not however
295.1145 ++// invalidate any other reasons why the executable file might be covered by
295.1146 ++// the GNU General Public License.
295.1147 ++
295.1148 ++//
295.1149 ++// ISO C++ 14882: 22.2.7.1.2  messages virtual functions
295.1150 ++//
295.1151 ++
295.1152 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
295.1153 ++
295.1154 ++#include <locale>
295.1155 ++#include <bits/c++locale_internal.h>
295.1156 ++
295.1157 ++#ifdef __UCLIBC_MJN3_ONLY__
295.1158 ++#warning fix gettext stuff
295.1159 ++#endif
295.1160 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
295.1161 ++extern "C" char *__dcgettext(const char *domainname,
295.1162 ++			     const char *msgid, int category);
295.1163 ++#undef gettext
295.1164 ++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
295.1165 ++#else
295.1166 ++#undef gettext
295.1167 ++#define gettext(msgid) (msgid)
295.1168 ++#endif
295.1169 ++
295.1170 ++namespace std
295.1171 ++{
295.1172 ++  // Specializations.
295.1173 ++  template<>
295.1174 ++    string
295.1175 ++    messages<char>::do_get(catalog, int, int, const string& __dfault) const
295.1176 ++    {
295.1177 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.1178 ++      __c_locale __old = __uselocale(_M_c_locale_messages);
295.1179 ++      const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
295.1180 ++      __uselocale(__old);
295.1181 ++      return string(__msg);
295.1182 ++#elif defined __UCLIBC_HAS_LOCALE__
295.1183 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
295.1184 ++      setlocale(LC_ALL, _M_name_messages);
295.1185 ++      const char* __msg = gettext(__dfault.c_str());
295.1186 ++      setlocale(LC_ALL, __old);
295.1187 ++      free(__old);
295.1188 ++      return string(__msg);
295.1189 ++#else
295.1190 ++      const char* __msg = gettext(__dfault.c_str());
295.1191 ++      return string(__msg);
295.1192 ++#endif
295.1193 ++    }
295.1194 ++
295.1195 ++#ifdef _GLIBCXX_USE_WCHAR_T
295.1196 ++  template<>
295.1197 ++    wstring
295.1198 ++    messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
295.1199 ++    {
295.1200 ++# ifdef __UCLIBC_HAS_XLOCALE__
295.1201 ++      __c_locale __old = __uselocale(_M_c_locale_messages);
295.1202 ++      char* __msg = gettext(_M_convert_to_char(__dfault));
295.1203 ++      __uselocale(__old);
295.1204 ++      return _M_convert_from_char(__msg);
295.1205 ++# elif defined __UCLIBC_HAS_LOCALE__
295.1206 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
295.1207 ++      setlocale(LC_ALL, _M_name_messages);
295.1208 ++      char* __msg = gettext(_M_convert_to_char(__dfault));
295.1209 ++      setlocale(LC_ALL, __old);
295.1210 ++      free(__old);
295.1211 ++      return _M_convert_from_char(__msg);
295.1212 ++# else
295.1213 ++      char* __msg = gettext(_M_convert_to_char(__dfault));
295.1214 ++      return _M_convert_from_char(__msg);
295.1215 ++# endif
295.1216 ++    }
295.1217 ++#endif
295.1218 ++}
295.1219 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h
295.1220 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h
295.1221 +@@ -0,0 +1,121 @@
295.1222 ++// std::messages implementation details, GNU version -*- C++ -*-
295.1223 ++
295.1224 ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
295.1225 ++//
295.1226 ++// This file is part of the GNU ISO C++ Library.  This library is free
295.1227 ++// software; you can redistribute it and/or modify it under the
295.1228 ++// terms of the GNU General Public License as published by the
295.1229 ++// Free Software Foundation; either version 2, or (at your option)
295.1230 ++// any later version.
295.1231 ++
295.1232 ++// This library is distributed in the hope that it will be useful,
295.1233 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
295.1234 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
295.1235 ++// GNU General Public License for more details.
295.1236 ++
295.1237 ++// You should have received a copy of the GNU General Public License along
295.1238 ++// with this library; see the file COPYING.  If not, write to the Free
295.1239 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
295.1240 ++// USA.
295.1241 ++
295.1242 ++// As a special exception, you may use this file as part of a free software
295.1243 ++// library without restriction.  Specifically, if other files instantiate
295.1244 ++// templates or use macros or inline functions from this file, or you compile
295.1245 ++// this file and link it with other files to produce an executable, this
295.1246 ++// file does not by itself cause the resulting executable to be covered by
295.1247 ++// the GNU General Public License.  This exception does not however
295.1248 ++// invalidate any other reasons why the executable file might be covered by
295.1249 ++// the GNU General Public License.
295.1250 ++
295.1251 ++//
295.1252 ++// ISO C++ 14882: 22.2.7.1.2  messages functions
295.1253 ++//
295.1254 ++
295.1255 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
295.1256 ++
295.1257 ++#ifdef __UCLIBC_MJN3_ONLY__
295.1258 ++#warning fix prototypes for *textdomain funcs
295.1259 ++#endif
295.1260 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
295.1261 ++extern "C" char *__textdomain(const char *domainname);
295.1262 ++extern "C" char *__bindtextdomain(const char *domainname,
295.1263 ++				  const char *dirname);
295.1264 ++#else
295.1265 ++#undef __textdomain
295.1266 ++#undef __bindtextdomain
295.1267 ++#define __textdomain(D)           ((void)0)
295.1268 ++#define __bindtextdomain(D,P)     ((void)0)
295.1269 ++#endif
295.1270 ++
295.1271 ++  // Non-virtual member functions.
295.1272 ++  template<typename _CharT>
295.1273 ++     messages<_CharT>::messages(size_t __refs)
295.1274 ++     : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), 
295.1275 ++       _M_name_messages(_S_get_c_name())
295.1276 ++     { }
295.1277 ++
295.1278 ++  template<typename _CharT>
295.1279 ++     messages<_CharT>::messages(__c_locale __cloc, const char* __s, 
295.1280 ++				size_t __refs) 
295.1281 ++     : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
295.1282 ++     {
295.1283 ++       const size_t __len = std::strlen(__s) + 1;
295.1284 ++       char* __tmp = new char[__len];
295.1285 ++       std::memcpy(__tmp, __s, __len);
295.1286 ++       _M_name_messages = __tmp;
295.1287 ++
295.1288 ++       // Last to avoid leaking memory if new throws.
295.1289 ++       _M_c_locale_messages = _S_clone_c_locale(__cloc);
295.1290 ++     }
295.1291 ++
295.1292 ++  template<typename _CharT>
295.1293 ++    typename messages<_CharT>::catalog 
295.1294 ++    messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, 
295.1295 ++			   const char* __dir) const
295.1296 ++    { 
295.1297 ++      __bindtextdomain(__s.c_str(), __dir);
295.1298 ++      return this->do_open(__s, __loc); 
295.1299 ++    }
295.1300 ++
295.1301 ++  // Virtual member functions.
295.1302 ++  template<typename _CharT>
295.1303 ++    messages<_CharT>::~messages()
295.1304 ++    { 
295.1305 ++      if (_M_name_messages != _S_get_c_name())
295.1306 ++	delete [] _M_name_messages;
295.1307 ++      _S_destroy_c_locale(_M_c_locale_messages); 
295.1308 ++    }
295.1309 ++
295.1310 ++  template<typename _CharT>
295.1311 ++    typename messages<_CharT>::catalog 
295.1312 ++    messages<_CharT>::do_open(const basic_string<char>& __s, 
295.1313 ++			      const locale&) const
295.1314 ++    { 
295.1315 ++      // No error checking is done, assume the catalog exists and can
295.1316 ++      // be used.
295.1317 ++      __textdomain(__s.c_str());
295.1318 ++      return 0;
295.1319 ++    }
295.1320 ++
295.1321 ++  template<typename _CharT>
295.1322 ++    void    
295.1323 ++    messages<_CharT>::do_close(catalog) const 
295.1324 ++    { }
295.1325 ++
295.1326 ++   // messages_byname
295.1327 ++   template<typename _CharT>
295.1328 ++     messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
295.1329 ++     : messages<_CharT>(__refs) 
295.1330 ++     { 
295.1331 ++       if (this->_M_name_messages != locale::facet::_S_get_c_name())
295.1332 ++	 delete [] this->_M_name_messages;
295.1333 ++       char* __tmp = new char[std::strlen(__s) + 1];
295.1334 ++       std::strcpy(__tmp, __s);
295.1335 ++       this->_M_name_messages = __tmp;
295.1336 ++
295.1337 ++       if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
295.1338 ++	 {
295.1339 ++	   this->_S_destroy_c_locale(this->_M_c_locale_messages);
295.1340 ++	   this->_S_create_c_locale(this->_M_c_locale_messages, __s); 
295.1341 ++	 }
295.1342 ++     }
295.1343 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc
295.1344 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
295.1345 +@@ -0,0 +1,692 @@
295.1346 ++// std::moneypunct implementation details, GNU version -*- C++ -*-
295.1347 ++
295.1348 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
295.1349 ++//
295.1350 ++// This file is part of the GNU ISO C++ Library.  This library is free
295.1351 ++// software; you can redistribute it and/or modify it under the
295.1352 ++// terms of the GNU General Public License as published by the
295.1353 ++// Free Software Foundation; either version 2, or (at your option)
295.1354 ++// any later version.
295.1355 ++
295.1356 ++// This library is distributed in the hope that it will be useful,
295.1357 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
295.1358 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
295.1359 ++// GNU General Public License for more details.
295.1360 ++
295.1361 ++// You should have received a copy of the GNU General Public License along
295.1362 ++// with this library; see the file COPYING.  If not, write to the Free
295.1363 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
295.1364 ++// USA.
295.1365 ++
295.1366 ++// As a special exception, you may use this file as part of a free software
295.1367 ++// library without restriction.  Specifically, if other files instantiate
295.1368 ++// templates or use macros or inline functions from this file, or you compile
295.1369 ++// this file and link it with other files to produce an executable, this
295.1370 ++// file does not by itself cause the resulting executable to be covered by
295.1371 ++// the GNU General Public License.  This exception does not however
295.1372 ++// invalidate any other reasons why the executable file might be covered by
295.1373 ++// the GNU General Public License.
295.1374 ++
295.1375 ++//
295.1376 ++// ISO C++ 14882: 22.2.6.3.2  moneypunct virtual functions
295.1377 ++//
295.1378 ++
295.1379 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
295.1380 ++
295.1381 ++#define _LIBC
295.1382 ++#include <locale>
295.1383 ++#undef _LIBC
295.1384 ++#include <bits/c++locale_internal.h>
295.1385 ++
295.1386 ++#ifdef __UCLIBC_MJN3_ONLY__
295.1387 ++#warning optimize this for uclibc
295.1388 ++#warning tailor for stub locale support
295.1389 ++#endif
295.1390 ++
295.1391 ++#ifndef __UCLIBC_HAS_XLOCALE__
295.1392 ++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
295.1393 ++#endif
295.1394 ++
295.1395 ++namespace std
295.1396 ++{
295.1397 ++  // Construct and return valid pattern consisting of some combination of:
295.1398 ++  // space none symbol sign value
295.1399 ++  money_base::pattern
295.1400 ++  money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
295.1401 ++  { 
295.1402 ++    pattern __ret;
295.1403 ++
295.1404 ++    // This insanely complicated routine attempts to construct a valid
295.1405 ++    // pattern for use with monyepunct. A couple of invariants:
295.1406 ++
295.1407 ++    // if (__precedes) symbol -> value
295.1408 ++    // else value -> symbol
295.1409 ++    
295.1410 ++    // if (__space) space
295.1411 ++    // else none
295.1412 ++
295.1413 ++    // none == never first
295.1414 ++    // space never first or last
295.1415 ++
295.1416 ++    // Any elegant implementations of this are welcome.
295.1417 ++    switch (__posn)
295.1418 ++      {
295.1419 ++      case 0:
295.1420 ++      case 1:
295.1421 ++	// 1 The sign precedes the value and symbol.
295.1422 ++	__ret.field[0] = sign;
295.1423 ++	if (__space)
295.1424 ++	  {
295.1425 ++	    // Pattern starts with sign.
295.1426 ++	    if (__precedes)
295.1427 ++	      {
295.1428 ++		__ret.field[1] = symbol;
295.1429 ++		__ret.field[3] = value;
295.1430 ++	      }
295.1431 ++	    else
295.1432 ++	      {
295.1433 ++		__ret.field[1] = value;
295.1434 ++		__ret.field[3] = symbol;
295.1435 ++	      }
295.1436 ++	    __ret.field[2] = space;
295.1437 ++	  }
295.1438 ++	else
295.1439 ++	  {
295.1440 ++	    // Pattern starts with sign and ends with none.
295.1441 ++	    if (__precedes)
295.1442 ++	      {
295.1443 ++		__ret.field[1] = symbol;
295.1444 ++		__ret.field[2] = value;
295.1445 ++	      }
295.1446 ++	    else
295.1447 ++	      {
295.1448 ++		__ret.field[1] = value;
295.1449 ++		__ret.field[2] = symbol;
295.1450 ++	      }
295.1451 ++	    __ret.field[3] = none;
295.1452 ++	  }
295.1453 ++	break;
295.1454 ++      case 2:
295.1455 ++	// 2 The sign follows the value and symbol.
295.1456 ++	if (__space)
295.1457 ++	  {
295.1458 ++	    // Pattern either ends with sign.
295.1459 ++	    if (__precedes)
295.1460 ++	      {
295.1461 ++		__ret.field[0] = symbol;
295.1462 ++		__ret.field[2] = value;
295.1463 ++	      }
295.1464 ++	    else
295.1465 ++	      {
295.1466 ++		__ret.field[0] = value;
295.1467 ++		__ret.field[2] = symbol;
295.1468 ++	      }
295.1469 ++	    __ret.field[1] = space;
295.1470 ++	    __ret.field[3] = sign;
295.1471 ++	  }
295.1472 ++	else
295.1473 ++	  {
295.1474 ++	    // Pattern ends with sign then none.
295.1475 ++	    if (__precedes)
295.1476 ++	      {
295.1477 ++		__ret.field[0] = symbol;
295.1478 ++		__ret.field[1] = value;
295.1479 ++	      }
295.1480 ++	    else
295.1481 ++	      {
295.1482 ++		__ret.field[0] = value;
295.1483 ++		__ret.field[1] = symbol;
295.1484 ++	      }
295.1485 ++	    __ret.field[2] = sign;
295.1486 ++	    __ret.field[3] = none;
295.1487 ++	  }
295.1488 ++	break;
295.1489 ++      case 3:
295.1490 ++	// 3 The sign immediately precedes the symbol.
295.1491 ++	if (__precedes)
295.1492 ++	  {
295.1493 ++	    __ret.field[0] = sign;
295.1494 ++	    __ret.field[1] = symbol;	    
295.1495 ++	    if (__space)
295.1496 ++	      {
295.1497 ++		__ret.field[2] = space;
295.1498 ++		__ret.field[3] = value;
295.1499 ++	      }
295.1500 ++	    else
295.1501 ++	      {
295.1502 ++		__ret.field[2] = value;		
295.1503 ++		__ret.field[3] = none;
295.1504 ++	      }
295.1505 ++	  }
295.1506 ++	else
295.1507 ++	  {
295.1508 ++	    __ret.field[0] = value;
295.1509 ++	    if (__space)
295.1510 ++	      {
295.1511 ++		__ret.field[1] = space;
295.1512 ++		__ret.field[2] = sign;
295.1513 ++		__ret.field[3] = symbol;
295.1514 ++	      }
295.1515 ++	    else
295.1516 ++	      {
295.1517 ++		__ret.field[1] = sign;
295.1518 ++		__ret.field[2] = symbol;
295.1519 ++		__ret.field[3] = none;
295.1520 ++	      }
295.1521 ++	  }
295.1522 ++	break;
295.1523 ++      case 4:
295.1524 ++	// 4 The sign immediately follows the symbol.
295.1525 ++	if (__precedes)
295.1526 ++	  {
295.1527 ++	    __ret.field[0] = symbol;
295.1528 ++	    __ret.field[1] = sign;
295.1529 ++	    if (__space)
295.1530 ++	      {
295.1531 ++		__ret.field[2] = space;
295.1532 ++		__ret.field[3] = value;
295.1533 ++	      }
295.1534 ++	    else
295.1535 ++	      {
295.1536 ++		__ret.field[2] = value;
295.1537 ++		__ret.field[3] = none;
295.1538 ++	      }
295.1539 ++	  }
295.1540 ++	else
295.1541 ++	  {
295.1542 ++	    __ret.field[0] = value;
295.1543 ++	    if (__space)
295.1544 ++	      {
295.1545 ++		__ret.field[1] = space;
295.1546 ++		__ret.field[2] = symbol;
295.1547 ++		__ret.field[3] = sign;
295.1548 ++	      }
295.1549 ++	    else
295.1550 ++	      {
295.1551 ++		__ret.field[1] = symbol;
295.1552 ++		__ret.field[2] = sign;
295.1553 ++		__ret.field[3] = none;
295.1554 ++	      }
295.1555 ++	  }
295.1556 ++	break;
295.1557 ++      default:
295.1558 ++	__ret = pattern();
295.1559 ++      }
295.1560 ++    return __ret;
295.1561 ++  }
295.1562 ++
295.1563 ++  template<> 
295.1564 ++    void
295.1565 ++    moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc, 
295.1566 ++						     const char*)
295.1567 ++    {
295.1568 ++      if (!_M_data)
295.1569 ++	_M_data = new __moneypunct_cache<char, true>;
295.1570 ++
295.1571 ++      if (!__cloc)
295.1572 ++	{
295.1573 ++	  // "C" locale
295.1574 ++	  _M_data->_M_decimal_point = '.';
295.1575 ++	  _M_data->_M_thousands_sep = ',';
295.1576 ++	  _M_data->_M_grouping = "";
295.1577 ++	  _M_data->_M_grouping_size = 0;
295.1578 ++	  _M_data->_M_curr_symbol = "";
295.1579 ++	  _M_data->_M_curr_symbol_size = 0;
295.1580 ++	  _M_data->_M_positive_sign = "";
295.1581 ++	  _M_data->_M_positive_sign_size = 0;
295.1582 ++	  _M_data->_M_negative_sign = "";
295.1583 ++	  _M_data->_M_negative_sign_size = 0;
295.1584 ++	  _M_data->_M_frac_digits = 0;
295.1585 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
295.1586 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
295.1587 ++
295.1588 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
295.1589 ++	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
295.1590 ++	}
295.1591 ++      else
295.1592 ++	{
295.1593 ++	  // Named locale.
295.1594 ++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
295.1595 ++							__cloc));
295.1596 ++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
295.1597 ++							__cloc));
295.1598 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
295.1599 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
295.1600 ++	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
295.1601 ++	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
295.1602 ++
295.1603 ++	  char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
295.1604 ++	  if (!__nposn)
295.1605 ++	    _M_data->_M_negative_sign = "()";
295.1606 ++	  else
295.1607 ++	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, 
295.1608 ++							__cloc);
295.1609 ++	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
295.1610 ++
295.1611 ++	  // _Intl == true
295.1612 ++	  _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
295.1613 ++	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
295.1614 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
295.1615 ++						      __cloc));
295.1616 ++	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
295.1617 ++	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
295.1618 ++	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
295.1619 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
295.1620 ++							__pposn);
295.1621 ++	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
295.1622 ++	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
295.1623 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
295.1624 ++							__nposn);
295.1625 ++	}
295.1626 ++    }
295.1627 ++
295.1628 ++  template<> 
295.1629 ++    void
295.1630 ++    moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, 
295.1631 ++						      const char*)
295.1632 ++    {
295.1633 ++      if (!_M_data)
295.1634 ++	_M_data = new __moneypunct_cache<char, false>;
295.1635 ++
295.1636 ++      if (!__cloc)
295.1637 ++	{
295.1638 ++	  // "C" locale
295.1639 ++	  _M_data->_M_decimal_point = '.';
295.1640 ++	  _M_data->_M_thousands_sep = ',';
295.1641 ++	  _M_data->_M_grouping = "";
295.1642 ++	  _M_data->_M_grouping_size = 0;
295.1643 ++	  _M_data->_M_curr_symbol = "";
295.1644 ++	  _M_data->_M_curr_symbol_size = 0;
295.1645 ++	  _M_data->_M_positive_sign = "";
295.1646 ++	  _M_data->_M_positive_sign_size = 0;
295.1647 ++	  _M_data->_M_negative_sign = "";
295.1648 ++	  _M_data->_M_negative_sign_size = 0;
295.1649 ++	  _M_data->_M_frac_digits = 0;
295.1650 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
295.1651 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
295.1652 ++
295.1653 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
295.1654 ++	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
295.1655 ++	}
295.1656 ++      else
295.1657 ++	{
295.1658 ++	  // Named locale.
295.1659 ++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
295.1660 ++							__cloc));
295.1661 ++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
295.1662 ++							__cloc));
295.1663 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
295.1664 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
295.1665 ++	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
295.1666 ++	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
295.1667 ++
295.1668 ++	  char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
295.1669 ++	  if (!__nposn)
295.1670 ++	    _M_data->_M_negative_sign = "()";
295.1671 ++	  else
295.1672 ++	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
295.1673 ++							__cloc);
295.1674 ++	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
295.1675 ++
295.1676 ++	  // _Intl == false
295.1677 ++	  _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
295.1678 ++	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
295.1679 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
295.1680 ++	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
295.1681 ++	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
295.1682 ++	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
295.1683 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
295.1684 ++							__pposn);
295.1685 ++	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
295.1686 ++	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
295.1687 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
295.1688 ++							__nposn);
295.1689 ++	}
295.1690 ++    }
295.1691 ++
295.1692 ++  template<> 
295.1693 ++    moneypunct<char, true>::~moneypunct()
295.1694 ++    { delete _M_data; }
295.1695 ++
295.1696 ++  template<> 
295.1697 ++    moneypunct<char, false>::~moneypunct()
295.1698 ++    { delete _M_data; }
295.1699 ++
295.1700 ++#ifdef _GLIBCXX_USE_WCHAR_T
295.1701 ++  template<> 
295.1702 ++    void
295.1703 ++    moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc, 
295.1704 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.1705 ++							const char*)
295.1706 ++#else
295.1707 ++							const char* __name)
295.1708 ++#endif
295.1709 ++    {
295.1710 ++      if (!_M_data)
295.1711 ++	_M_data = new __moneypunct_cache<wchar_t, true>;
295.1712 ++
295.1713 ++      if (!__cloc)
295.1714 ++	{
295.1715 ++	  // "C" locale
295.1716 ++	  _M_data->_M_decimal_point = L'.';
295.1717 ++	  _M_data->_M_thousands_sep = L',';
295.1718 ++	  _M_data->_M_grouping = "";
295.1719 ++	  _M_data->_M_grouping_size = 0;
295.1720 ++	  _M_data->_M_curr_symbol = L"";
295.1721 ++	  _M_data->_M_curr_symbol_size = 0;
295.1722 ++	  _M_data->_M_positive_sign = L"";
295.1723 ++	  _M_data->_M_positive_sign_size = 0;
295.1724 ++	  _M_data->_M_negative_sign = L"";
295.1725 ++	  _M_data->_M_negative_sign_size = 0;
295.1726 ++	  _M_data->_M_frac_digits = 0;
295.1727 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
295.1728 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
295.1729 ++
295.1730 ++	  // Use ctype::widen code without the facet...
295.1731 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
295.1732 ++	    _M_data->_M_atoms[__i] =
295.1733 ++	      static_cast<wchar_t>(money_base::_S_atoms[__i]);
295.1734 ++	}
295.1735 ++      else
295.1736 ++	{
295.1737 ++	  // Named locale.
295.1738 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.1739 ++	  __c_locale __old = __uselocale(__cloc);
295.1740 ++#else
295.1741 ++	  // Switch to named locale so that mbsrtowcs will work.
295.1742 ++	  char* __old = strdup(setlocale(LC_ALL, NULL));
295.1743 ++	  setlocale(LC_ALL, __name);
295.1744 ++#endif
295.1745 ++
295.1746 ++#ifdef __UCLIBC_MJN3_ONLY__
295.1747 ++#warning fix this... should be monetary
295.1748 ++#endif
295.1749 ++#ifdef __UCLIBC__
295.1750 ++# ifdef __UCLIBC_HAS_XLOCALE__
295.1751 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
295.1752 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
295.1753 ++# elif defined __UCLIBC_HAS_LOCALE__
295.1754 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
295.1755 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
295.1756 ++# endif
295.1757 ++#else
295.1758 ++	  union { char *__s; wchar_t __w; } __u;
295.1759 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
295.1760 ++	  _M_data->_M_decimal_point = __u.__w;
295.1761 ++
295.1762 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
295.1763 ++	  _M_data->_M_thousands_sep = __u.__w;
295.1764 ++#endif
295.1765 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
295.1766 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
295.1767 ++
295.1768 ++	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
295.1769 ++	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
295.1770 ++	  const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
295.1771 ++
295.1772 ++	  wchar_t* __wcs_ps = 0;
295.1773 ++	  wchar_t* __wcs_ns = 0;
295.1774 ++	  const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
295.1775 ++	  try
295.1776 ++	    {
295.1777 ++	      mbstate_t __state;
295.1778 ++	      size_t __len = strlen(__cpossign);
295.1779 ++	      if (__len)
295.1780 ++		{
295.1781 ++		  ++__len;
295.1782 ++		  memset(&__state, 0, sizeof(mbstate_t));
295.1783 ++		  __wcs_ps = new wchar_t[__len];
295.1784 ++		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
295.1785 ++		  _M_data->_M_positive_sign = __wcs_ps;
295.1786 ++		}
295.1787 ++	      else
295.1788 ++		_M_data->_M_positive_sign = L"";
295.1789 ++	      _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
295.1790 ++	      
295.1791 ++	      __len = strlen(__cnegsign);
295.1792 ++	      if (!__nposn)
295.1793 ++		_M_data->_M_negative_sign = L"()";
295.1794 ++	      else if (__len)
295.1795 ++		{ 
295.1796 ++		  ++__len;
295.1797 ++		  memset(&__state, 0, sizeof(mbstate_t));
295.1798 ++		  __wcs_ns = new wchar_t[__len];
295.1799 ++		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
295.1800 ++		  _M_data->_M_negative_sign = __wcs_ns;
295.1801 ++		}
295.1802 ++	      else
295.1803 ++		_M_data->_M_negative_sign = L"";
295.1804 ++	      _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
295.1805 ++	      
295.1806 ++	      // _Intl == true.
295.1807 ++	      __len = strlen(__ccurr);
295.1808 ++	      if (__len)
295.1809 ++		{
295.1810 ++		  ++__len;
295.1811 ++		  memset(&__state, 0, sizeof(mbstate_t));
295.1812 ++		  wchar_t* __wcs = new wchar_t[__len];
295.1813 ++		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
295.1814 ++		  _M_data->_M_curr_symbol = __wcs;
295.1815 ++		}
295.1816 ++	      else
295.1817 ++		_M_data->_M_curr_symbol = L"";
295.1818 ++	      _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
295.1819 ++	    }
295.1820 ++	  catch (...)
295.1821 ++	    {
295.1822 ++	      delete _M_data;
295.1823 ++	      _M_data = 0;
295.1824 ++	      delete __wcs_ps;
295.1825 ++	      delete __wcs_ns;	      
295.1826 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.1827 ++	      __uselocale(__old);
295.1828 ++#else
295.1829 ++	      setlocale(LC_ALL, __old);
295.1830 ++	      free(__old);
295.1831 ++#endif
295.1832 ++	      __throw_exception_again;
295.1833 ++	    } 
295.1834 ++	  
295.1835 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
295.1836 ++						      __cloc));
295.1837 ++	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
295.1838 ++	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
295.1839 ++	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
295.1840 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
295.1841 ++							__pposn);
295.1842 ++	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
295.1843 ++	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
295.1844 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
295.1845 ++							__nposn);
295.1846 ++
295.1847 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.1848 ++	  __uselocale(__old);
295.1849 ++#else
295.1850 ++	  setlocale(LC_ALL, __old);
295.1851 ++	  free(__old);
295.1852 ++#endif
295.1853 ++	}
295.1854 ++    }
295.1855 ++
295.1856 ++  template<> 
295.1857 ++  void
295.1858 ++  moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
295.1859 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.1860 ++						       const char*)
295.1861 ++#else
295.1862 ++                                                       const char* __name)
295.1863 ++#endif
295.1864 ++  {
295.1865 ++    if (!_M_data)
295.1866 ++      _M_data = new __moneypunct_cache<wchar_t, false>;
295.1867 ++
295.1868 ++    if (!__cloc)
295.1869 ++	{
295.1870 ++	  // "C" locale
295.1871 ++	  _M_data->_M_decimal_point = L'.';
295.1872 ++	  _M_data->_M_thousands_sep = L',';
295.1873 ++	  _M_data->_M_grouping = "";
295.1874 ++          _M_data->_M_grouping_size = 0;
295.1875 ++	  _M_data->_M_curr_symbol = L"";
295.1876 ++	  _M_data->_M_curr_symbol_size = 0;
295.1877 ++	  _M_data->_M_positive_sign = L"";
295.1878 ++	  _M_data->_M_positive_sign_size = 0;
295.1879 ++	  _M_data->_M_negative_sign = L"";
295.1880 ++	  _M_data->_M_negative_sign_size = 0;
295.1881 ++	  _M_data->_M_frac_digits = 0;
295.1882 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
295.1883 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
295.1884 ++
295.1885 ++	  // Use ctype::widen code without the facet...
295.1886 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
295.1887 ++	    _M_data->_M_atoms[__i] =
295.1888 ++	      static_cast<wchar_t>(money_base::_S_atoms[__i]);
295.1889 ++	}
295.1890 ++      else
295.1891 ++	{
295.1892 ++	  // Named locale.
295.1893 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.1894 ++	  __c_locale __old = __uselocale(__cloc);
295.1895 ++#else
295.1896 ++	  // Switch to named locale so that mbsrtowcs will work.
295.1897 ++	  char* __old = strdup(setlocale(LC_ALL, NULL));
295.1898 ++	  setlocale(LC_ALL, __name);
295.1899 ++#endif
295.1900 ++
295.1901 ++#ifdef __UCLIBC_MJN3_ONLY__
295.1902 ++#warning fix this... should be monetary
295.1903 ++#endif
295.1904 ++#ifdef __UCLIBC__
295.1905 ++# ifdef __UCLIBC_HAS_XLOCALE__
295.1906 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
295.1907 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
295.1908 ++# elif defined __UCLIBC_HAS_LOCALE__
295.1909 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
295.1910 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
295.1911 ++# endif
295.1912 ++#else
295.1913 ++          union { char *__s; wchar_t __w; } __u;
295.1914 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
295.1915 ++	  _M_data->_M_decimal_point = __u.__w;
295.1916 ++
295.1917 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
295.1918 ++	  _M_data->_M_thousands_sep = __u.__w;
295.1919 ++#endif
295.1920 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
295.1921 ++          _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
295.1922 ++
295.1923 ++	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
295.1924 ++	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
295.1925 ++	  const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
295.1926 ++
295.1927 ++	  wchar_t* __wcs_ps = 0;
295.1928 ++	  wchar_t* __wcs_ns = 0;
295.1929 ++	  const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
295.1930 ++	  try
295.1931 ++            {
295.1932 ++              mbstate_t __state;
295.1933 ++              size_t __len;
295.1934 ++              __len = strlen(__cpossign);
295.1935 ++              if (__len)
295.1936 ++                {
295.1937 ++		  ++__len;
295.1938 ++		  memset(&__state, 0, sizeof(mbstate_t));
295.1939 ++		  __wcs_ps = new wchar_t[__len];
295.1940 ++		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
295.1941 ++		  _M_data->_M_positive_sign = __wcs_ps;
295.1942 ++		}
295.1943 ++	      else
295.1944 ++		_M_data->_M_positive_sign = L"";
295.1945 ++              _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
295.1946 ++	      
295.1947 ++	      __len = strlen(__cnegsign);
295.1948 ++	      if (!__nposn)
295.1949 ++		_M_data->_M_negative_sign = L"()";
295.1950 ++	      else if (__len)
295.1951 ++		{ 
295.1952 ++		  ++__len;
295.1953 ++		  memset(&__state, 0, sizeof(mbstate_t));
295.1954 ++		  __wcs_ns = new wchar_t[__len];
295.1955 ++		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
295.1956 ++		  _M_data->_M_negative_sign = __wcs_ns;
295.1957 ++		}
295.1958 ++	      else
295.1959 ++		_M_data->_M_negative_sign = L"";
295.1960 ++              _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
295.1961 ++
295.1962 ++	      // _Intl == true.
295.1963 ++	      __len = strlen(__ccurr);
295.1964 ++	      if (__len)
295.1965 ++		{
295.1966 ++		  ++__len;
295.1967 ++		  memset(&__state, 0, sizeof(mbstate_t));
295.1968 ++		  wchar_t* __wcs = new wchar_t[__len];
295.1969 ++		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
295.1970 ++		  _M_data->_M_curr_symbol = __wcs;
295.1971 ++		}
295.1972 ++	      else
295.1973 ++		_M_data->_M_curr_symbol = L"";
295.1974 ++              _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
295.1975 ++	    }
295.1976 ++          catch (...)
295.1977 ++	    {
295.1978 ++	      delete _M_data;
295.1979 ++              _M_data = 0;
295.1980 ++	      delete __wcs_ps;
295.1981 ++	      delete __wcs_ns;	      
295.1982 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.1983 ++	      __uselocale(__old);
295.1984 ++#else
295.1985 ++	      setlocale(LC_ALL, __old);
295.1986 ++	      free(__old);
295.1987 ++#endif
295.1988 ++              __throw_exception_again;
295.1989 ++	    }
295.1990 ++
295.1991 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
295.1992 ++	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
295.1993 ++	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
295.1994 ++	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
295.1995 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
295.1996 ++	                                                __pposn);
295.1997 ++	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
295.1998 ++	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
295.1999 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
295.2000 ++	                                                __nposn);
295.2001 ++
295.2002 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.2003 ++	  __uselocale(__old);
295.2004 ++#else
295.2005 ++	  setlocale(LC_ALL, __old);
295.2006 ++	  free(__old);
295.2007 ++#endif
295.2008 ++	}
295.2009 ++    }
295.2010 ++
295.2011 ++  template<> 
295.2012 ++    moneypunct<wchar_t, true>::~moneypunct()
295.2013 ++    {
295.2014 ++      if (_M_data->_M_positive_sign_size)
295.2015 ++	delete [] _M_data->_M_positive_sign;
295.2016 ++      if (_M_data->_M_negative_sign_size
295.2017 ++          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
295.2018 ++	delete [] _M_data->_M_negative_sign;
295.2019 ++      if (_M_data->_M_curr_symbol_size)
295.2020 ++	delete [] _M_data->_M_curr_symbol;
295.2021 ++      delete _M_data;
295.2022 ++    }
295.2023 ++
295.2024 ++  template<> 
295.2025 ++    moneypunct<wchar_t, false>::~moneypunct()
295.2026 ++    {
295.2027 ++      if (_M_data->_M_positive_sign_size)
295.2028 ++	delete [] _M_data->_M_positive_sign;
295.2029 ++      if (_M_data->_M_negative_sign_size
295.2030 ++          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
295.2031 ++	delete [] _M_data->_M_negative_sign;
295.2032 ++      if (_M_data->_M_curr_symbol_size)
295.2033 ++	delete [] _M_data->_M_curr_symbol;
295.2034 ++      delete _M_data;
295.2035 ++    }
295.2036 ++#endif
295.2037 ++}
295.2038 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc
295.2039 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
295.2040 +@@ -0,0 +1,173 @@
295.2041 ++// std::numpunct implementation details, GNU version -*- C++ -*-
295.2042 ++
295.2043 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
295.2044 ++//
295.2045 ++// This file is part of the GNU ISO C++ Library.  This library is free
295.2046 ++// software; you can redistribute it and/or modify it under the
295.2047 ++// terms of the GNU General Public License as published by the
295.2048 ++// Free Software Foundation; either version 2, or (at your option)
295.2049 ++// any later version.
295.2050 ++
295.2051 ++// This library is distributed in the hope that it will be useful,
295.2052 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
295.2053 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
295.2054 ++// GNU General Public License for more details.
295.2055 ++
295.2056 ++// You should have received a copy of the GNU General Public License along
295.2057 ++// with this library; see the file COPYING.  If not, write to the Free
295.2058 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
295.2059 ++// USA.
295.2060 ++
295.2061 ++// As a special exception, you may use this file as part of a free software
295.2062 ++// library without restriction.  Specifically, if other files instantiate
295.2063 ++// templates or use macros or inline functions from this file, or you compile
295.2064 ++// this file and link it with other files to produce an executable, this
295.2065 ++// file does not by itself cause the resulting executable to be covered by
295.2066 ++// the GNU General Public License.  This exception does not however
295.2067 ++// invalidate any other reasons why the executable file might be covered by
295.2068 ++// the GNU General Public License.
295.2069 ++
295.2070 ++//
295.2071 ++// ISO C++ 14882: 22.2.3.1.2  numpunct virtual functions
295.2072 ++//
295.2073 ++
295.2074 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
295.2075 ++
295.2076 ++#define _LIBC
295.2077 ++#include <locale>
295.2078 ++#undef _LIBC
295.2079 ++#include <bits/c++locale_internal.h>
295.2080 ++
295.2081 ++#ifdef __UCLIBC_MJN3_ONLY__
295.2082 ++#warning tailor for stub locale support
295.2083 ++#endif
295.2084 ++#ifndef __UCLIBC_HAS_XLOCALE__
295.2085 ++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
295.2086 ++#endif
295.2087 ++
295.2088 ++namespace std
295.2089 ++{
295.2090 ++  template<> 
295.2091 ++    void
295.2092 ++    numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
295.2093 ++    {
295.2094 ++      if (!_M_data)
295.2095 ++	_M_data = new __numpunct_cache<char>;
295.2096 ++
295.2097 ++      if (!__cloc)
295.2098 ++	{
295.2099 ++	  // "C" locale
295.2100 ++	  _M_data->_M_grouping = "";
295.2101 ++	  _M_data->_M_grouping_size = 0;
295.2102 ++	  _M_data->_M_use_grouping = false;
295.2103 ++
295.2104 ++	  _M_data->_M_decimal_point = '.';
295.2105 ++	  _M_data->_M_thousands_sep = ',';
295.2106 ++
295.2107 ++	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
295.2108 ++	    _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
295.2109 ++
295.2110 ++	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
295.2111 ++	    _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
295.2112 ++	}
295.2113 ++      else
295.2114 ++	{
295.2115 ++	  // Named locale.
295.2116 ++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, 
295.2117 ++							__cloc));
295.2118 ++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, 
295.2119 ++							__cloc));
295.2120 ++
295.2121 ++	  // Check for NULL, which implies no grouping.
295.2122 ++	  if (_M_data->_M_thousands_sep == '\0')
295.2123 ++	    _M_data->_M_grouping = "";
295.2124 ++	  else
295.2125 ++	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
295.2126 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
295.2127 ++	}
295.2128 ++
295.2129 ++      // NB: There is no way to extact this info from posix locales.
295.2130 ++      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
295.2131 ++      _M_data->_M_truename = "true";
295.2132 ++      _M_data->_M_truename_size = 4;
295.2133 ++      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
295.2134 ++      _M_data->_M_falsename = "false";
295.2135 ++      _M_data->_M_falsename_size = 5;
295.2136 ++    }
295.2137 ++ 
295.2138 ++  template<> 
295.2139 ++    numpunct<char>::~numpunct()
295.2140 ++    { delete _M_data; }
295.2141 ++   
295.2142 ++#ifdef _GLIBCXX_USE_WCHAR_T
295.2143 ++  template<> 
295.2144 ++    void
295.2145 ++    numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
295.2146 ++    {
295.2147 ++      if (!_M_data)
295.2148 ++	_M_data = new __numpunct_cache<wchar_t>;
295.2149 ++
295.2150 ++      if (!__cloc)
295.2151 ++	{
295.2152 ++	  // "C" locale
295.2153 ++	  _M_data->_M_grouping = "";
295.2154 ++	  _M_data->_M_grouping_size = 0;
295.2155 ++	  _M_data->_M_use_grouping = false;
295.2156 ++
295.2157 ++	  _M_data->_M_decimal_point = L'.';
295.2158 ++	  _M_data->_M_thousands_sep = L',';
295.2159 ++
295.2160 ++	  // Use ctype::widen code without the facet...
295.2161 ++	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
295.2162 ++	    _M_data->_M_atoms_out[__i] =
295.2163 ++	      static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
295.2164 ++
295.2165 ++	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
295.2166 ++	    _M_data->_M_atoms_in[__j] =
295.2167 ++	      static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
295.2168 ++	}
295.2169 ++      else
295.2170 ++	{
295.2171 ++	  // Named locale.
295.2172 ++	  // NB: In the GNU model wchar_t is always 32 bit wide.
295.2173 ++#ifdef __UCLIBC_MJN3_ONLY__
295.2174 ++#warning fix this
295.2175 ++#endif
295.2176 ++#ifdef __UCLIBC__
295.2177 ++# ifdef __UCLIBC_HAS_XLOCALE__
295.2178 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
295.2179 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
295.2180 ++# elif defined __UCLIBC_HAS_LOCALE__
295.2181 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
295.2182 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
295.2183 ++# endif
295.2184 ++#else
295.2185 ++	  union { char *__s; wchar_t __w; } __u;
295.2186 ++	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
295.2187 ++	  _M_data->_M_decimal_point = __u.__w;
295.2188 ++
295.2189 ++	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
295.2190 ++	  _M_data->_M_thousands_sep = __u.__w;
295.2191 ++#endif
295.2192 ++
295.2193 ++	  if (_M_data->_M_thousands_sep == L'\0')
295.2194 ++	    _M_data->_M_grouping = "";
295.2195 ++	  else
295.2196 ++	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
295.2197 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
295.2198 ++	}
295.2199 ++
295.2200 ++      // NB: There is no way to extact this info from posix locales.
295.2201 ++      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
295.2202 ++      _M_data->_M_truename = L"true";
295.2203 ++      _M_data->_M_truename_size = 4;
295.2204 ++      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
295.2205 ++      _M_data->_M_falsename = L"false";
295.2206 ++      _M_data->_M_falsename_size = 5;
295.2207 ++    }
295.2208 ++
295.2209 ++  template<> 
295.2210 ++    numpunct<wchar_t>::~numpunct()
295.2211 ++    { delete _M_data; }
295.2212 ++ #endif
295.2213 ++}
295.2214 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc
295.2215 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc
295.2216 +@@ -0,0 +1,406 @@
295.2217 ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
295.2218 ++
295.2219 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
295.2220 ++//
295.2221 ++// This file is part of the GNU ISO C++ Library.  This library is free
295.2222 ++// software; you can redistribute it and/or modify it under the
295.2223 ++// terms of the GNU General Public License as published by the
295.2224 ++// Free Software Foundation; either version 2, or (at your option)
295.2225 ++// any later version.
295.2226 ++
295.2227 ++// This library is distributed in the hope that it will be useful,
295.2228 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
295.2229 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
295.2230 ++// GNU General Public License for more details.
295.2231 ++
295.2232 ++// You should have received a copy of the GNU General Public License along
295.2233 ++// with this library; see the file COPYING.  If not, write to the Free
295.2234 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
295.2235 ++// USA.
295.2236 ++
295.2237 ++// As a special exception, you may use this file as part of a free software
295.2238 ++// library without restriction.  Specifically, if other files instantiate
295.2239 ++// templates or use macros or inline functions from this file, or you compile
295.2240 ++// this file and link it with other files to produce an executable, this
295.2241 ++// file does not by itself cause the resulting executable to be covered by
295.2242 ++// the GNU General Public License.  This exception does not however
295.2243 ++// invalidate any other reasons why the executable file might be covered by
295.2244 ++// the GNU General Public License.
295.2245 ++
295.2246 ++//
295.2247 ++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
295.2248 ++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
295.2249 ++//
295.2250 ++
295.2251 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
295.2252 ++
295.2253 ++#include <locale>
295.2254 ++#include <bits/c++locale_internal.h>
295.2255 ++
295.2256 ++#ifdef __UCLIBC_MJN3_ONLY__
295.2257 ++#warning tailor for stub locale support
295.2258 ++#endif
295.2259 ++#ifndef __UCLIBC_HAS_XLOCALE__
295.2260 ++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
295.2261 ++#endif
295.2262 ++
295.2263 ++namespace std
295.2264 ++{
295.2265 ++  template<>
295.2266 ++    void
295.2267 ++    __timepunct<char>::
295.2268 ++    _M_put(char* __s, size_t __maxlen, const char* __format, 
295.2269 ++	   const tm* __tm) const
295.2270 ++    {
295.2271 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.2272 ++      const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
295.2273 ++					_M_c_locale_timepunct);
295.2274 ++#else
295.2275 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
295.2276 ++      setlocale(LC_ALL, _M_name_timepunct);
295.2277 ++      const size_t __len = strftime(__s, __maxlen, __format, __tm);
295.2278 ++      setlocale(LC_ALL, __old);
295.2279 ++      free(__old);
295.2280 ++#endif
295.2281 ++      // Make sure __s is null terminated.
295.2282 ++      if (__len == 0)
295.2283 ++	__s[0] = '\0';
295.2284 ++    }
295.2285 ++
295.2286 ++  template<> 
295.2287 ++    void
295.2288 ++    __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
295.2289 ++    {
295.2290 ++      if (!_M_data)
295.2291 ++	_M_data = new __timepunct_cache<char>;
295.2292 ++
295.2293 ++      if (!__cloc)
295.2294 ++	{
295.2295 ++	  // "C" locale
295.2296 ++	  _M_c_locale_timepunct = _S_get_c_locale();
295.2297 ++
295.2298 ++	  _M_data->_M_date_format = "%m/%d/%y";
295.2299 ++	  _M_data->_M_date_era_format = "%m/%d/%y";
295.2300 ++	  _M_data->_M_time_format = "%H:%M:%S";
295.2301 ++	  _M_data->_M_time_era_format = "%H:%M:%S";
295.2302 ++	  _M_data->_M_date_time_format = "";
295.2303 ++	  _M_data->_M_date_time_era_format = "";
295.2304 ++	  _M_data->_M_am = "AM";
295.2305 ++	  _M_data->_M_pm = "PM";
295.2306 ++	  _M_data->_M_am_pm_format = "";
295.2307 ++
295.2308 ++	  // Day names, starting with "C"'s Sunday.
295.2309 ++	  _M_data->_M_day1 = "Sunday";
295.2310 ++	  _M_data->_M_day2 = "Monday";
295.2311 ++	  _M_data->_M_day3 = "Tuesday";
295.2312 ++	  _M_data->_M_day4 = "Wednesday";
295.2313 ++	  _M_data->_M_day5 = "Thursday";
295.2314 ++	  _M_data->_M_day6 = "Friday";
295.2315 ++	  _M_data->_M_day7 = "Saturday";
295.2316 ++
295.2317 ++	  // Abbreviated day names, starting with "C"'s Sun.
295.2318 ++	  _M_data->_M_aday1 = "Sun";
295.2319 ++	  _M_data->_M_aday2 = "Mon";
295.2320 ++	  _M_data->_M_aday3 = "Tue";
295.2321 ++	  _M_data->_M_aday4 = "Wed";
295.2322 ++	  _M_data->_M_aday5 = "Thu";
295.2323 ++	  _M_data->_M_aday6 = "Fri";
295.2324 ++	  _M_data->_M_aday7 = "Sat";
295.2325 ++
295.2326 ++	  // Month names, starting with "C"'s January.
295.2327 ++	  _M_data->_M_month01 = "January";
295.2328 ++	  _M_data->_M_month02 = "February";
295.2329 ++	  _M_data->_M_month03 = "March";
295.2330 ++	  _M_data->_M_month04 = "April";
295.2331 ++	  _M_data->_M_month05 = "May";
295.2332 ++	  _M_data->_M_month06 = "June";
295.2333 ++	  _M_data->_M_month07 = "July";
295.2334 ++	  _M_data->_M_month08 = "August";
295.2335 ++	  _M_data->_M_month09 = "September";
295.2336 ++	  _M_data->_M_month10 = "October";
295.2337 ++	  _M_data->_M_month11 = "November";
295.2338 ++	  _M_data->_M_month12 = "December";
295.2339 ++
295.2340 ++	  // Abbreviated month names, starting with "C"'s Jan.
295.2341 ++	  _M_data->_M_amonth01 = "Jan";
295.2342 ++	  _M_data->_M_amonth02 = "Feb";
295.2343 ++	  _M_data->_M_amonth03 = "Mar";
295.2344 ++	  _M_data->_M_amonth04 = "Apr";
295.2345 ++	  _M_data->_M_amonth05 = "May";
295.2346 ++	  _M_data->_M_amonth06 = "Jun";
295.2347 ++	  _M_data->_M_amonth07 = "Jul";
295.2348 ++	  _M_data->_M_amonth08 = "Aug";
295.2349 ++	  _M_data->_M_amonth09 = "Sep";
295.2350 ++	  _M_data->_M_amonth10 = "Oct";
295.2351 ++	  _M_data->_M_amonth11 = "Nov";
295.2352 ++	  _M_data->_M_amonth12 = "Dec";
295.2353 ++	}
295.2354 ++      else
295.2355 ++	{
295.2356 ++	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
295.2357 ++
295.2358 ++	  _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
295.2359 ++	  _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
295.2360 ++	  _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
295.2361 ++	  _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
295.2362 ++	  _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
295.2363 ++	  _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
295.2364 ++							     __cloc);
295.2365 ++	  _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
295.2366 ++	  _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
295.2367 ++	  _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
295.2368 ++
295.2369 ++	  // Day names, starting with "C"'s Sunday.
295.2370 ++	  _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
295.2371 ++	  _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
295.2372 ++	  _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
295.2373 ++	  _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
295.2374 ++	  _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
295.2375 ++	  _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
295.2376 ++	  _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
295.2377 ++
295.2378 ++	  // Abbreviated day names, starting with "C"'s Sun.
295.2379 ++	  _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
295.2380 ++	  _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
295.2381 ++	  _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
295.2382 ++	  _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
295.2383 ++	  _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
295.2384 ++	  _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
295.2385 ++	  _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
295.2386 ++
295.2387 ++	  // Month names, starting with "C"'s January.
295.2388 ++	  _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
295.2389 ++	  _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
295.2390 ++	  _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
295.2391 ++	  _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
295.2392 ++	  _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
295.2393 ++	  _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
295.2394 ++	  _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
295.2395 ++	  _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
295.2396 ++	  _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
295.2397 ++	  _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
295.2398 ++	  _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
295.2399 ++	  _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
295.2400 ++
295.2401 ++	  // Abbreviated month names, starting with "C"'s Jan.
295.2402 ++	  _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
295.2403 ++	  _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
295.2404 ++	  _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
295.2405 ++	  _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
295.2406 ++	  _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
295.2407 ++	  _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
295.2408 ++	  _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
295.2409 ++	  _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
295.2410 ++	  _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
295.2411 ++	  _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
295.2412 ++	  _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
295.2413 ++	  _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
295.2414 ++	}
295.2415 ++    }
295.2416 ++
295.2417 ++#ifdef _GLIBCXX_USE_WCHAR_T
295.2418 ++  template<>
295.2419 ++    void
295.2420 ++    __timepunct<wchar_t>::
295.2421 ++    _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, 
295.2422 ++	   const tm* __tm) const
295.2423 ++    {
295.2424 ++#ifdef __UCLIBC_HAS_XLOCALE__
295.2425 ++      __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
295.2426 ++      const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
295.2427 ++					_M_c_locale_timepunct);
295.2428 ++#else
295.2429 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
295.2430 ++      setlocale(LC_ALL, _M_name_timepunct);
295.2431 ++      const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
295.2432 ++      setlocale(LC_ALL, __old);
295.2433 ++      free(__old);
295.2434 ++#endif
295.2435 ++      // Make sure __s is null terminated.
295.2436 ++      if (__len == 0)
295.2437 ++	__s[0] = L'\0';
295.2438 ++    }
295.2439 ++
295.2440 ++  template<> 
295.2441 ++    void
295.2442 ++    __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
295.2443 ++    {
295.2444 ++      if (!_M_data)
295.2445 ++	_M_data = new __timepunct_cache<wchar_t>;
295.2446 ++
295.2447 ++#warning wide time stuff
295.2448 ++//       if (!__cloc)
295.2449 ++	{
295.2450 ++	  // "C" locale
295.2451 ++	  _M_c_locale_timepunct = _S_get_c_locale();
295.2452 ++
295.2453 ++	  _M_data->_M_date_format = L"%m/%d/%y";
295.2454 ++	  _M_data->_M_date_era_format = L"%m/%d/%y";
295.2455 ++	  _M_data->_M_time_format = L"%H:%M:%S";
295.2456 ++	  _M_data->_M_time_era_format = L"%H:%M:%S";
295.2457 ++	  _M_data->_M_date_time_format = L"";
295.2458 ++	  _M_data->_M_date_time_era_format = L"";
295.2459 ++	  _M_data->_M_am = L"AM";
295.2460 ++	  _M_data->_M_pm = L"PM";
295.2461 ++	  _M_data->_M_am_pm_format = L"";
295.2462 ++
295.2463 ++	  // Day names, starting with "C"'s Sunday.
295.2464 ++	  _M_data->_M_day1 = L"Sunday";
295.2465 ++	  _M_data->_M_day2 = L"Monday";
295.2466 ++	  _M_data->_M_day3 = L"Tuesday";
295.2467 ++	  _M_data->_M_day4 = L"Wednesday";
295.2468 ++	  _M_data->_M_day5 = L"Thursday";
295.2469 ++	  _M_data->_M_day6 = L"Friday";
295.2470 ++	  _M_data->_M_day7 = L"Saturday";
295.2471 ++
295.2472 ++	  // Abbreviated day names, starting with "C"'s Sun.
295.2473 ++	  _M_data->_M_aday1 = L"Sun";
295.2474 ++	  _M_data->_M_aday2 = L"Mon";
295.2475 ++	  _M_data->_M_aday3 = L"Tue";
295.2476 ++	  _M_data->_M_aday4 = L"Wed";
295.2477 ++	  _M_data->_M_aday5 = L"Thu";
295.2478 ++	  _M_data->_M_aday6 = L"Fri";
295.2479 ++	  _M_data->_M_aday7 = L"Sat";
295.2480 ++
295.2481 ++	  // Month names, starting with "C"'s January.
295.2482 ++	  _M_data->_M_month01 = L"January";
295.2483 ++	  _M_data->_M_month02 = L"February";
295.2484 ++	  _M_data->_M_month03 = L"March";
295.2485 ++	  _M_data->_M_month04 = L"April";
295.2486 ++	  _M_data->_M_month05 = L"May";
295.2487 ++	  _M_data->_M_month06 = L"June";
295.2488 ++	  _M_data->_M_month07 = L"July";
295.2489 ++	  _M_data->_M_month08 = L"August";
295.2490 ++	  _M_data->_M_month09 = L"September";
295.2491 ++	  _M_data->_M_month10 = L"October";
295.2492 ++	  _M_data->_M_month11 = L"November";
295.2493 ++	  _M_data->_M_month12 = L"December";
295.2494 ++
295.2495 ++	  // Abbreviated month names, starting with "C"'s Jan.
295.2496 ++	  _M_data->_M_amonth01 = L"Jan";
295.2497 ++	  _M_data->_M_amonth02 = L"Feb";
295.2498 ++	  _M_data->_M_amonth03 = L"Mar";
295.2499 ++	  _M_data->_M_amonth04 = L"Apr";
295.2500 ++	  _M_data->_M_amonth05 = L"May";
295.2501 ++	  _M_data->_M_amonth06 = L"Jun";
295.2502 ++	  _M_data->_M_amonth07 = L"Jul";
295.2503 ++	  _M_data->_M_amonth08 = L"Aug";
295.2504 ++	  _M_data->_M_amonth09 = L"Sep";
295.2505 ++	  _M_data->_M_amonth10 = L"Oct";
295.2506 ++	  _M_data->_M_amonth11 = L"Nov";
295.2507 ++	  _M_data->_M_amonth12 = L"Dec";
295.2508 ++	}
295.2509 ++#if 0
295.2510 ++      else
295.2511 ++	{
295.2512 ++	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
295.2513 ++
295.2514 ++	  union { char *__s; wchar_t *__w; } __u;
295.2515 ++
295.2516 ++	  __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
295.2517 ++	  _M_data->_M_date_format = __u.__w;
295.2518 ++	  __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
295.2519 ++	  _M_data->_M_date_era_format = __u.__w;
295.2520 ++	  __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
295.2521 ++	  _M_data->_M_time_format = __u.__w;
295.2522 ++	  __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
295.2523 ++	  _M_data->_M_time_era_format = __u.__w;
295.2524 ++	  __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
295.2525 ++	  _M_data->_M_date_time_format = __u.__w;
295.2526 ++	  __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
295.2527 ++	  _M_data->_M_date_time_era_format = __u.__w;
295.2528 ++	  __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
295.2529 ++	  _M_data->_M_am = __u.__w;
295.2530 ++	  __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
295.2531 ++	  _M_data->_M_pm = __u.__w;
295.2532 ++	  __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
295.2533 ++	  _M_data->_M_am_pm_format = __u.__w;
295.2534 ++
295.2535 ++	  // Day names, starting with "C"'s Sunday.
295.2536 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
295.2537 ++	  _M_data->_M_day1 = __u.__w;
295.2538 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
295.2539 ++	  _M_data->_M_day2 = __u.__w;
295.2540 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
295.2541 ++	  _M_data->_M_day3 = __u.__w;
295.2542 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
295.2543 ++	  _M_data->_M_day4 = __u.__w;
295.2544 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
295.2545 ++	  _M_data->_M_day5 = __u.__w;
295.2546 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
295.2547 ++	  _M_data->_M_day6 = __u.__w;
295.2548 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
295.2549 ++	  _M_data->_M_day7 = __u.__w;
295.2550 ++
295.2551 ++	  // Abbreviated day names, starting with "C"'s Sun.
295.2552 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
295.2553 ++	  _M_data->_M_aday1 = __u.__w;
295.2554 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
295.2555 ++	  _M_data->_M_aday2 = __u.__w;
295.2556 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
295.2557 ++	  _M_data->_M_aday3 = __u.__w;
295.2558 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
295.2559 ++	  _M_data->_M_aday4 = __u.__w;
295.2560 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
295.2561 ++	  _M_data->_M_aday5 = __u.__w;
295.2562 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
295.2563 ++	  _M_data->_M_aday6 = __u.__w;
295.2564 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
295.2565 ++	  _M_data->_M_aday7 = __u.__w;
295.2566 ++
295.2567 ++	  // Month names, starting with "C"'s January.
295.2568 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
295.2569 ++	  _M_data->_M_month01 = __u.__w;
295.2570 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
295.2571 ++	  _M_data->_M_month02 = __u.__w;
295.2572 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
295.2573 ++	  _M_data->_M_month03 = __u.__w;
295.2574 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
295.2575 ++	  _M_data->_M_month04 = __u.__w;
295.2576 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
295.2577 ++	  _M_data->_M_month05 = __u.__w;
295.2578 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
295.2579 ++	  _M_data->_M_month06 = __u.__w;
295.2580 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
295.2581 ++	  _M_data->_M_month07 = __u.__w;
295.2582 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
295.2583 ++	  _M_data->_M_month08 = __u.__w;
295.2584 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
295.2585 ++	  _M_data->_M_month09 = __u.__w;
295.2586 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
295.2587 ++	  _M_data->_M_month10 = __u.__w;
295.2588 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
295.2589 ++	  _M_data->_M_month11 = __u.__w;
295.2590 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
295.2591 ++	  _M_data->_M_month12 = __u.__w;
295.2592 ++
295.2593 ++	  // Abbreviated month names, starting with "C"'s Jan.
295.2594 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
295.2595 ++	  _M_data->_M_amonth01 = __u.__w;
295.2596 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
295.2597 ++	  _M_data->_M_amonth02 = __u.__w;
295.2598 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
295.2599 ++	  _M_data->_M_amonth03 = __u.__w;
295.2600 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
295.2601 ++	  _M_data->_M_amonth04 = __u.__w;
295.2602 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
295.2603 ++	  _M_data->_M_amonth05 = __u.__w;
295.2604 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
295.2605 ++	  _M_data->_M_amonth06 = __u.__w;
295.2606 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
295.2607 ++	  _M_data->_M_amonth07 = __u.__w;
295.2608 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
295.2609 ++	  _M_data->_M_amonth08 = __u.__w;
295.2610 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
295.2611 ++	  _M_data->_M_amonth09 = __u.__w;
295.2612 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
295.2613 ++	  _M_data->_M_amonth10 = __u.__w;
295.2614 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
295.2615 ++	  _M_data->_M_amonth11 = __u.__w;
295.2616 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
295.2617 ++	  _M_data->_M_amonth12 = __u.__w;
295.2618 ++	}
295.2619 ++#endif // 0
295.2620 ++    }
295.2621 ++#endif
295.2622 ++}
295.2623 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h
295.2624 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h
295.2625 +@@ -0,0 +1,76 @@
295.2626 ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
295.2627 ++
295.2628 ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
295.2629 ++//
295.2630 ++// This file is part of the GNU ISO C++ Library.  This library is free
295.2631 ++// software; you can redistribute it and/or modify it under the
295.2632 ++// terms of the GNU General Public License as published by the
295.2633 ++// Free Software Foundation; either version 2, or (at your option)
295.2634 ++// any later version.
295.2635 ++
295.2636 ++// This library is distributed in the hope that it will be useful,
295.2637 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
295.2638 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
295.2639 ++// GNU General Public License for more details.
295.2640 ++
295.2641 ++// You should have received a copy of the GNU General Public License along
295.2642 ++// with this library; see the file COPYING.  If not, write to the Free
295.2643 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
295.2644 ++// USA.
295.2645 ++
295.2646 ++// As a special exception, you may use this file as part of a free software
295.2647 ++// library without restriction.  Specifically, if other files instantiate
295.2648 ++// templates or use macros or inline functions from this file, or you compile
295.2649 ++// this file and link it with other files to produce an executable, this
295.2650 ++// file does not by itself cause the resulting executable to be covered by
295.2651 ++// the GNU General Public License.  This exception does not however
295.2652 ++// invalidate any other reasons why the executable file might be covered by
295.2653 ++// the GNU General Public License.
295.2654 ++
295.2655 ++//
295.2656 ++// ISO C++ 14882: 22.2.5.1.2 - time_get functions
295.2657 ++// ISO C++ 14882: 22.2.5.3.2 - time_put functions
295.2658 ++//
295.2659 ++
295.2660 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
295.2661 ++
295.2662 ++  template<typename _CharT>
295.2663 ++    __timepunct<_CharT>::__timepunct(size_t __refs) 
295.2664 ++    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
295.2665 ++      _M_name_timepunct(_S_get_c_name())
295.2666 ++    { _M_initialize_timepunct(); }
295.2667 ++
295.2668 ++  template<typename _CharT>
295.2669 ++    __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) 
295.2670 ++    : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), 
295.2671 ++      _M_name_timepunct(_S_get_c_name())
295.2672 ++    { _M_initialize_timepunct(); }
295.2673 ++
295.2674 ++  template<typename _CharT>
295.2675 ++    __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
295.2676 ++				     size_t __refs) 
295.2677 ++    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
295.2678 ++      _M_name_timepunct(NULL)
295.2679 ++    { 
295.2680 ++      const size_t __len = std::strlen(__s) + 1;
295.2681 ++      char* __tmp = new char[__len];
295.2682 ++      std::memcpy(__tmp, __s, __len);
295.2683 ++      _M_name_timepunct = __tmp;
295.2684 ++
295.2685 ++      try
295.2686 ++	{ _M_initialize_timepunct(__cloc); }
295.2687 ++      catch(...)
295.2688 ++	{
295.2689 ++	  delete [] _M_name_timepunct;
295.2690 ++	  __throw_exception_again;
295.2691 ++	}
295.2692 ++    }
295.2693 ++
295.2694 ++  template<typename _CharT>
295.2695 ++    __timepunct<_CharT>::~__timepunct()
295.2696 ++    { 
295.2697 ++      if (_M_name_timepunct != _S_get_c_name())
295.2698 ++	delete [] _M_name_timepunct;
295.2699 ++      delete _M_data; 
295.2700 ++      _S_destroy_c_locale(_M_c_locale_timepunct); 
295.2701 ++    }
295.2702 +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_base.h
295.2703 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h
295.2704 +@@ -0,0 +1,64 @@
295.2705 ++// Locale support -*- C++ -*-
295.2706 ++
295.2707 ++// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004
295.2708 ++// Free Software Foundation, Inc.
295.2709 ++//
295.2710 ++// This file is part of the GNU ISO C++ Library.  This library is free
295.2711 ++// software; you can redistribute it and/or modify it under the
295.2712 ++// terms of the GNU General Public License as published by the
295.2713 ++// Free Software Foundation; either version 2, or (at your option)
295.2714 ++// any later version.
295.2715 ++
295.2716 ++// This library is distributed in the hope that it will be useful,
295.2717 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
295.2718 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
295.2719 ++// GNU General Public License for more details.
295.2720 ++
295.2721 ++// You should have received a copy of the GNU General Public License along
295.2722 ++// with this library; see the file COPYING.  If not, write to the Free
295.2723 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
295.2724 ++// USA.
295.2725 ++
295.2726 ++// As a special exception, you may use this file as part of a free software
295.2727 ++// library without restriction.  Specifically, if other files instantiate
295.2728 ++// templates or use macros or inline functions from this file, or you compile
295.2729 ++// this file and link it with other files to produce an executable, this
295.2730 ++// file does not by itself cause the resulting executable to be covered by
295.2731 ++// the GNU General Public License.  This exception does not however
295.2732 ++// invalidate any other reasons why the executable file might be covered by
295.2733 ++// the GNU General Public License.
295.2734 ++
295.2735 ++//
295.2736 ++// ISO C++ 14882: 22.1  Locales
295.2737 ++//
295.2738 ++  
295.2739 ++/** @file ctype_base.h
295.2740 ++ *  This is an internal header file, included by other library headers.
295.2741 ++ *  You should not attempt to use it directly.
295.2742 ++ */
295.2743 ++
295.2744 ++// Information as gleaned from /usr/include/ctype.h
295.2745 ++  
295.2746 ++  /// @brief  Base class for ctype.
295.2747 ++  struct ctype_base
295.2748 ++  {
295.2749 ++    // Note: In uClibc, the following two types depend on configuration.
295.2750 ++ 
295.2751 ++    // Non-standard typedefs.
295.2752 ++    typedef const __ctype_touplow_t* __to_type;
295.2753 ++
295.2754 ++    // NB: Offsets into ctype<char>::_M_table force a particular size
295.2755 ++    // on the mask type. Because of this, we don't use an enum.
295.2756 ++    typedef __ctype_mask_t	mask;   
295.2757 ++    static const mask upper    	= _ISupper;
295.2758 ++    static const mask lower 	= _ISlower;
295.2759 ++    static const mask alpha 	= _ISalpha;
295.2760 ++    static const mask digit 	= _ISdigit;
295.2761 ++    static const mask xdigit 	= _ISxdigit;
295.2762 ++    static const mask space 	= _ISspace;
295.2763 ++    static const mask print 	= _ISprint;
295.2764 ++    static const mask graph 	= _ISalpha | _ISdigit | _ISpunct;
295.2765 ++    static const mask cntrl 	= _IScntrl;
295.2766 ++    static const mask punct 	= _ISpunct;
295.2767 ++    static const mask alnum 	= _ISalpha | _ISdigit;
295.2768 ++  };
295.2769 +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h
295.2770 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h
295.2771 +@@ -0,0 +1,69 @@
295.2772 ++// Locale support -*- C++ -*-
295.2773 ++
295.2774 ++// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
295.2775 ++//
295.2776 ++// This file is part of the GNU ISO C++ Library.  This library is free
295.2777 ++// software; you can redistribute it and/or modify it under the
295.2778 ++// terms of the GNU General Public License as published by the
295.2779 ++// Free Software Foundation; either version 2, or (at your option)
295.2780 ++// any later version.
295.2781 ++
295.2782 ++// This library is distributed in the hope that it will be useful,
295.2783 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
295.2784 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
295.2785 ++// GNU General Public License for more details.
295.2786 ++
295.2787 ++// You should have received a copy of the GNU General Public License along
295.2788 ++// with this library; see the file COPYING.  If not, write to the Free
295.2789 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
295.2790 ++// USA.
295.2791 ++
295.2792 ++// As a special exception, you may use this file as part of a free software
295.2793 ++// library without restriction.  Specifically, if other files instantiate
295.2794 ++// templates or use macros or inline functions from this file, or you compile
295.2795 ++// this file and link it with other files to produce an executable, this
295.2796 ++// file does not by itself cause the resulting executable to be covered by
295.2797 ++// the GNU General Public License.  This exception does not however
295.2798 ++// invalidate any other reasons why the executable file might be covered by
295.2799 ++// the GNU General Public License.
295.2800 ++
295.2801 ++//
295.2802 ++// ISO C++ 14882: 22.1  Locales
295.2803 ++//
295.2804 ++  
295.2805 ++// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
295.2806 ++// functions go in ctype.cc
295.2807 ++  
295.2808 ++  bool
295.2809 ++  ctype<char>::
295.2810 ++  is(mask __m, char __c) const
295.2811 ++  { return _M_table[static_cast<unsigned char>(__c)] & __m; }
295.2812 ++
295.2813 ++  const char*
295.2814 ++  ctype<char>::
295.2815 ++  is(const char* __low, const char* __high, mask* __vec) const
295.2816 ++  {
295.2817 ++    while (__low < __high)
295.2818 ++      *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
295.2819 ++    return __high;
295.2820 ++  }
295.2821 ++
295.2822 ++  const char*
295.2823 ++  ctype<char>::
295.2824 ++  scan_is(mask __m, const char* __low, const char* __high) const
295.2825 ++  {
295.2826 ++    while (__low < __high 
295.2827 ++	   && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
295.2828 ++      ++__low;
295.2829 ++    return __low;
295.2830 ++  }
295.2831 ++
295.2832 ++  const char*
295.2833 ++  ctype<char>::
295.2834 ++  scan_not(mask __m, const char* __low, const char* __high) const
295.2835 ++  {
295.2836 ++    while (__low < __high 
295.2837 ++	   && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
295.2838 ++      ++__low;
295.2839 ++    return __low;
295.2840 ++  }
295.2841 +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h
295.2842 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h
295.2843 +@@ -0,0 +1,92 @@
295.2844 ++// Locale support -*- C++ -*-
295.2845 ++
295.2846 ++// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
295.2847 ++// Free Software Foundation, Inc.
295.2848 ++//
295.2849 ++// This file is part of the GNU ISO C++ Library.  This library is free
295.2850 ++// software; you can redistribute it and/or modify it under the
295.2851 ++// terms of the GNU General Public License as published by the
295.2852 ++// Free Software Foundation; either version 2, or (at your option)
295.2853 ++// any later version.
295.2854 ++
295.2855 ++// This library is distributed in the hope that it will be useful,
295.2856 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
295.2857 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
295.2858 ++// GNU General Public License for more details.
295.2859 ++
295.2860 ++// You should have received a copy of the GNU General Public License along
295.2861 ++// with this library; see the file COPYING.  If not, write to the Free
295.2862 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
295.2863 ++// USA.
295.2864 ++
295.2865 ++// As a special exception, you may use this file as part of a free software
295.2866 ++// library without restriction.  Specifically, if other files instantiate
295.2867 ++// templates or use macros or inline functions from this file, or you compile
295.2868 ++// this file and link it with other files to produce an executable, this
295.2869 ++// file does not by itself cause the resulting executable to be covered by
295.2870 ++// the GNU General Public License.  This exception does not however
295.2871 ++// invalidate any other reasons why the executable file might be covered by
295.2872 ++// the GNU General Public License.
295.2873 ++
295.2874 ++//
295.2875 ++// ISO C++ 14882: 22.1  Locales
295.2876 ++//
295.2877 ++  
295.2878 ++// Information as gleaned from /usr/include/ctype.h
295.2879 ++
295.2880 ++  const ctype_base::mask*
295.2881 ++  ctype<char>::classic_table() throw()
295.2882 ++  { return __C_ctype_b; }
295.2883 ++
295.2884 ++  ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
295.2885 ++		     size_t __refs) 
295.2886 ++  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
295.2887 ++  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
295.2888 ++  {
295.2889 ++    _M_toupper = __C_ctype_toupper;
295.2890 ++    _M_tolower = __C_ctype_tolower;
295.2891 ++    _M_table = __table ? __table : __C_ctype_b;
295.2892 ++    memset(_M_widen, 0, sizeof(_M_widen));
295.2893 ++    memset(_M_narrow, 0, sizeof(_M_narrow));
295.2894 ++  }
295.2895 ++
295.2896 ++  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
295.2897 ++  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
295.2898 ++  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
295.2899 ++  {
295.2900 ++    _M_toupper = __C_ctype_toupper;
295.2901 ++    _M_tolower = __C_ctype_tolower;
295.2902 ++    _M_table = __table ? __table : __C_ctype_b;
295.2903 ++    memset(_M_widen, 0, sizeof(_M_widen));
295.2904 ++    memset(_M_narrow, 0, sizeof(_M_narrow));
295.2905 ++  }
295.2906 ++
295.2907 ++  char
295.2908 ++  ctype<char>::do_toupper(char __c) const
295.2909 ++  { return _M_toupper[static_cast<unsigned char>(__c)]; }
295.2910 ++
295.2911 ++  const char*
295.2912 ++  ctype<char>::do_toupper(char* __low, const char* __high) const
295.2913 ++  {
295.2914 ++    while (__low < __high)
295.2915 ++      {
295.2916 ++	*__low = _M_toupper[static_cast<unsigned char>(*__low)];
295.2917 ++	++__low;
295.2918 ++      }
295.2919 ++    return __high;
295.2920 ++  }
295.2921 ++
295.2922 ++  char
295.2923 ++  ctype<char>::do_tolower(char __c) const
295.2924 ++  { return _M_tolower[static_cast<unsigned char>(__c)]; }
295.2925 ++
295.2926 ++  const char* 
295.2927 ++  ctype<char>::do_tolower(char* __low, const char* __high) const
295.2928 ++  {
295.2929 ++    while (__low < __high)
295.2930 ++      {
295.2931 ++	*__low = _M_tolower[static_cast<unsigned char>(*__low)];
295.2932 ++	++__low;
295.2933 ++      }
295.2934 ++    return __high;
295.2935 ++  }
295.2936 +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/os_defines.h
295.2937 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h
295.2938 +@@ -0,0 +1,44 @@
295.2939 ++// Specific definitions for GNU/Linux  -*- C++ -*-
295.2940 ++
295.2941 ++// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
295.2942 ++//
295.2943 ++// This file is part of the GNU ISO C++ Library.  This library is free
295.2944 ++// software; you can redistribute it and/or modify it under the
295.2945 ++// terms of the GNU General Public License as published by the
295.2946 ++// Free Software Foundation; either version 2, or (at your option)
295.2947 ++// any later version.
295.2948 ++
295.2949 ++// This library is distributed in the hope that it will be useful,
295.2950 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
295.2951 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
295.2952 ++// GNU General Public License for more details.
295.2953 ++
295.2954 ++// You should have received a copy of the GNU General Public License along
295.2955 ++// with this library; see the file COPYING.  If not, write to the Free
295.2956 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
295.2957 ++// USA.
295.2958 ++
295.2959 ++// As a special exception, you may use this file as part of a free software
295.2960 ++// library without restriction.  Specifically, if other files instantiate
295.2961 ++// templates or use macros or inline functions from this file, or you compile
295.2962 ++// this file and link it with other files to produce an executable, this
295.2963 ++// file does not by itself cause the resulting executable to be covered by
295.2964 ++// the GNU General Public License.  This exception does not however
295.2965 ++// invalidate any other reasons why the executable file might be covered by
295.2966 ++// the GNU General Public License.
295.2967 ++
295.2968 ++#ifndef _GLIBCXX_OS_DEFINES
295.2969 ++#define _GLIBCXX_OS_DEFINES 1
295.2970 ++
295.2971 ++// System-specific #define, typedefs, corrections, etc, go here.  This
295.2972 ++// file will come before all others.
295.2973 ++
295.2974 ++// This keeps isanum, et al from being propagated as macros.
295.2975 ++#define __NO_CTYPE 1
295.2976 ++
295.2977 ++#include <features.h>
295.2978 ++
295.2979 ++// We must not see the optimized string functions GNU libc defines.
295.2980 ++#define __NO_STRING_INLINES
295.2981 ++
295.2982 ++#endif
295.2983 +--- gcc-4.1.0-dist/libstdc++-v3/configure
295.2984 ++++ gcc-4.1.0/libstdc++-v3/configure
295.2985 +@@ -4005,6 +4005,11 @@
295.2986 +   lt_cv_deplibs_check_method=pass_all
295.2987 +   ;;
295.2988 + 
295.2989 ++linux-uclibc*)
295.2990 ++  lt_cv_deplibs_check_method=pass_all
295.2991 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
295.2992 ++  ;;
295.2993 ++
295.2994 + netbsd* | knetbsd*-gnu)
295.2995 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
295.2996 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
295.2997 +@@ -5740,7 +5745,7 @@
295.2998 +   enableval="$enable_clocale"
295.2999 + 
295.3000 +       case "$enableval" in
295.3001 +-       generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
295.3002 ++       generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
295.3003 +        *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
295.3004 + echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
295.3005 +    { (exit 1); exit 1; }; } ;;
295.3006 +@@ -5765,6 +5770,9 @@
295.3007 +   # Default to "generic".
295.3008 +   if test $enable_clocale_flag = auto; then
295.3009 +     case ${target_os} in
295.3010 ++      linux-uclibc*)
295.3011 ++        enable_clocale_flag=uclibc
295.3012 ++	;;
295.3013 +       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
295.3014 +         cat >conftest.$ac_ext <<_ACEOF
295.3015 + /* confdefs.h.  */
295.3016 +@@ -5995,6 +6003,76 @@
295.3017 +       CTIME_CC=config/locale/generic/time_members.cc
295.3018 +       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
295.3019 +       ;;
295.3020 ++    uclibc)
295.3021 ++      echo "$as_me:$LINENO: result: uclibc" >&5
295.3022 ++echo "${ECHO_T}uclibc" >&6
295.3023 ++
295.3024 ++      # Declare intention to use gettext, and add support for specific
295.3025 ++      # languages.
295.3026 ++      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
295.3027 ++      ALL_LINGUAS="de fr"
295.3028 ++
295.3029 ++      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
295.3030 ++      # Extract the first word of "msgfmt", so it can be a program name with args.
295.3031 ++set dummy msgfmt; ac_word=$2
295.3032 ++echo "$as_me:$LINENO: checking for $ac_word" >&5
295.3033 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
295.3034 ++if test "${ac_cv_prog_check_msgfmt+set}" = set; then
295.3035 ++  echo $ECHO_N "(cached) $ECHO_C" >&6
295.3036 ++else
295.3037 ++  if test -n "$check_msgfmt"; then
295.3038 ++  ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
295.3039 ++else
295.3040 ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
295.3041 ++for as_dir in $PATH
295.3042 ++do
295.3043 ++  IFS=$as_save_IFS
295.3044 ++  test -z "$as_dir" && as_dir=.
295.3045 ++  for ac_exec_ext in '' $ac_executable_extensions; do
295.3046 ++  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
295.3047 ++    ac_cv_prog_check_msgfmt="yes"
295.3048 ++    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
295.3049 ++    break 2
295.3050 ++  fi
295.3051 ++done
295.3052 ++done
295.3053 ++
295.3054 ++  test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
295.3055 ++fi
295.3056 ++fi
295.3057 ++check_msgfmt=$ac_cv_prog_check_msgfmt
295.3058 ++if test -n "$check_msgfmt"; then
295.3059 ++  echo "$as_me:$LINENO: result: $check_msgfmt" >&5
295.3060 ++echo "${ECHO_T}$check_msgfmt" >&6
295.3061 ++else
295.3062 ++  echo "$as_me:$LINENO: result: no" >&5
295.3063 ++echo "${ECHO_T}no" >&6
295.3064 ++fi
295.3065 ++
295.3066 ++      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
295.3067 ++        USE_NLS=yes
295.3068 ++      fi
295.3069 ++      # Export the build objects.
295.3070 ++      for ling in $ALL_LINGUAS; do \
295.3071 ++        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
295.3072 ++        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
295.3073 ++      done
295.3074 ++
295.3075 ++
295.3076 ++
295.3077 ++      CLOCALE_H=config/locale/uclibc/c_locale.h
295.3078 ++      CLOCALE_CC=config/locale/uclibc/c_locale.cc
295.3079 ++      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
295.3080 ++      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
295.3081 ++      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
295.3082 ++      CMESSAGES_H=config/locale/uclibc/messages_members.h
295.3083 ++      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
295.3084 ++      CMONEY_CC=config/locale/uclibc/monetary_members.cc
295.3085 ++      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
295.3086 ++      CTIME_H=config/locale/uclibc/time_members.h
295.3087 ++      CTIME_CC=config/locale/uclibc/time_members.cc
295.3088 ++      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
295.3089 ++      ;;
295.3090 +   esac
295.3091 + 
295.3092 +   # This is where the testsuite looks for locale catalogs, using the
295.3093 +--- gcc-4.1.0-dist/libstdc++-v3/configure.host
295.3094 ++++ gcc-4.1.0/libstdc++-v3/configure.host
295.3095 +@@ -261,6 +261,12 @@
295.3096 +     ;;
295.3097 + esac
295.3098 + 
295.3099 ++# Override for uClibc since linux-uclibc gets mishandled above.
295.3100 ++case "${host_os}" in
295.3101 ++  *-uclibc*)
295.3102 ++    os_include_dir="os/uclibc"
295.3103 ++    ;;
295.3104 ++esac
295.3105 + 
295.3106 + # Set any OS-dependent and CPU-dependent bits.
295.3107 + # THIS TABLE IS SORTED.  KEEP IT THAT WAY.
295.3108 +--- gcc-4.1.0-dist/libstdc++-v3/crossconfig.m4
295.3109 ++++ gcc-4.1.0/libstdc++-v3/crossconfig.m4
295.3110 +@@ -143,6 +143,99 @@
295.3111 + 	;;
295.3112 +     esac
295.3113 +     ;;
295.3114 ++  *-uclibc*)
295.3115 ++# Temporary hack until we implement the float versions of the libm funcs
295.3116 ++    AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
295.3117 ++      machine/endian.h machine/param.h sys/machine.h sys/types.h \
295.3118 ++      fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
295.3119 ++    SECTION_FLAGS='-ffunction-sections -fdata-sections'
295.3120 ++    AC_SUBST(SECTION_FLAGS)
295.3121 ++    GLIBCXX_CHECK_LINKER_FEATURES
295.3122 ++    GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
295.3123 ++    GLIBCXX_CHECK_WCHAR_T_SUPPORT
295.3124 ++
295.3125 ++    # For LFS.
295.3126 ++    AC_DEFINE(HAVE_INT64_T)
295.3127 ++    case "$target" in
295.3128 ++      *-uclinux*)
295.3129 ++        # Don't enable LFS with uClinux
295.3130 ++        ;;
295.3131 ++      *)
295.3132 ++        AC_DEFINE(_GLIBCXX_USE_LFS)
295.3133 ++    esac
295.3134 ++
295.3135 ++    # For showmanyc_helper().
295.3136 ++    AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
295.3137 ++    GLIBCXX_CHECK_POLL
295.3138 ++    GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
295.3139 ++
295.3140 ++    # For xsputn_2().
295.3141 ++    AC_CHECK_HEADERS(sys/uio.h)
295.3142 ++    GLIBCXX_CHECK_WRITEV
295.3143 ++
295.3144 ++#     AC_DEFINE(HAVE_ACOSF)
295.3145 ++#     AC_DEFINE(HAVE_ASINF)
295.3146 ++#     AC_DEFINE(HAVE_ATANF)
295.3147 ++#     AC_DEFINE(HAVE_ATAN2F)
295.3148 ++    AC_DEFINE(HAVE_CEILF)
295.3149 ++    AC_DEFINE(HAVE_COPYSIGN)
295.3150 ++#     AC_DEFINE(HAVE_COPYSIGNF)
295.3151 ++#     AC_DEFINE(HAVE_COSF)
295.3152 ++#     AC_DEFINE(HAVE_COSHF)
295.3153 ++#     AC_DEFINE(HAVE_EXPF)
295.3154 ++#     AC_DEFINE(HAVE_FABSF)
295.3155 ++    AC_DEFINE(HAVE_FINITE)
295.3156 ++    AC_DEFINE(HAVE_FINITEF)
295.3157 ++    AC_DEFINE(HAVE_FLOORF)
295.3158 ++#     AC_DEFINE(HAVE_FMODF)
295.3159 ++#     AC_DEFINE(HAVE_FREXPF)
295.3160 ++    AC_DEFINE(HAVE_HYPOT)
295.3161 ++#     AC_DEFINE(HAVE_HYPOTF)
295.3162 ++    AC_DEFINE(HAVE_ISINF)
295.3163 ++    AC_DEFINE(HAVE_ISINFF)
295.3164 ++    AC_DEFINE(HAVE_ISNAN)
295.3165 ++    AC_DEFINE(HAVE_ISNANF)
295.3166 ++#     AC_DEFINE(HAVE_LOGF)
295.3167 ++#     AC_DEFINE(HAVE_LOG10F)
295.3168 ++#     AC_DEFINE(HAVE_MODFF)
295.3169 ++#     AC_DEFINE(HAVE_SINF)
295.3170 ++#     AC_DEFINE(HAVE_SINHF)
295.3171 ++#     AC_DEFINE(HAVE_SINCOS)
295.3172 ++#     AC_DEFINE(HAVE_SINCOSF)
295.3173 ++    AC_DEFINE(HAVE_SQRTF)
295.3174 ++#     AC_DEFINE(HAVE_TANF)
295.3175 ++#     AC_DEFINE(HAVE_TANHF)
295.3176 ++    if test x"long_double_math_on_this_cpu" = x"yes"; then
295.3177 ++      AC_MSG_ERROR([long_double_math_on_this_cpu is yes!])
295.3178 ++#       AC_DEFINE(HAVE_ACOSL)
295.3179 ++#       AC_DEFINE(HAVE_ASINL)
295.3180 ++#       AC_DEFINE(HAVE_ATANL)
295.3181 ++#       AC_DEFINE(HAVE_ATAN2L)
295.3182 ++#       AC_DEFINE(HAVE_CEILL)
295.3183 ++#       AC_DEFINE(HAVE_COPYSIGNL)
295.3184 ++#       AC_DEFINE(HAVE_COSL)
295.3185 ++#       AC_DEFINE(HAVE_COSHL)
295.3186 ++#       AC_DEFINE(HAVE_EXPL)
295.3187 ++#       AC_DEFINE(HAVE_FABSL)
295.3188 ++#       AC_DEFINE(HAVE_FINITEL)
295.3189 ++#       AC_DEFINE(HAVE_FLOORL)
295.3190 ++#       AC_DEFINE(HAVE_FMODL)
295.3191 ++#       AC_DEFINE(HAVE_FREXPL)
295.3192 ++#       AC_DEFINE(HAVE_HYPOTL)
295.3193 ++#       AC_DEFINE(HAVE_ISINFL)
295.3194 ++#       AC_DEFINE(HAVE_ISNANL)
295.3195 ++#       AC_DEFINE(HAVE_LOGL)
295.3196 ++#       AC_DEFINE(HAVE_LOG10L)
295.3197 ++#       AC_DEFINE(HAVE_MODFL)
295.3198 ++#       AC_DEFINE(HAVE_POWL)
295.3199 ++#       AC_DEFINE(HAVE_SINL)
295.3200 ++#       AC_DEFINE(HAVE_SINHL)
295.3201 ++#       AC_DEFINE(HAVE_SINCOSL)
295.3202 ++#       AC_DEFINE(HAVE_SQRTL)
295.3203 ++#       AC_DEFINE(HAVE_TANL)
295.3204 ++#       AC_DEFINE(HAVE_TANHL)
295.3205 ++    fi
295.3206 ++    ;;
295.3207 +   *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
295.3208 +     AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
295.3209 +       machine/endian.h machine/param.h sys/machine.h sys/types.h \
295.3210 +@@ -157,7 +250,7 @@
295.3211 +     AC_DEFINE(HAVE_INT64_T)
295.3212 +     case "$target" in
295.3213 +       *-uclinux*)
295.3214 +-        # Don't enable LFS with uClibc
295.3215 ++        # Don't enable LFS with uClinux
295.3216 +         ;;
295.3217 +       *)
295.3218 +         AC_DEFINE(_GLIBCXX_USE_LFS)
295.3219 +--- gcc-4.1.0-dist/libstdc++-v3/include/c_compatibility/wchar.h
295.3220 ++++ gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h
295.3221 +@@ -101,7 +101,9 @@
295.3222 + using std::wmemcpy;
295.3223 + using std::wmemmove;
295.3224 + using std::wmemset;
295.3225 ++#if _GLIBCXX_HAVE_WCSFTIME
295.3226 + using std::wcsftime;
295.3227 ++#endif
295.3228 + 
295.3229 + #if _GLIBCXX_USE_C99
295.3230 + using std::wcstold;
295.3231 +--- gcc-4.1.0-dist/libstdc++-v3/include/c_std/std_cwchar.h
295.3232 ++++ gcc-4.1.0/libstdc++-v3/include/c_std/std_cwchar.h
295.3233 +@@ -180,7 +180,9 @@
295.3234 +   using ::wcscoll;
295.3235 +   using ::wcscpy;
295.3236 +   using ::wcscspn;
295.3237 ++#if _GLIBCXX_HAVE_WCSFTIME
295.3238 +   using ::wcsftime;
295.3239 ++#endif
295.3240 +   using ::wcslen;
295.3241 +   using ::wcsncat;
295.3242 +   using ::wcsncmp;
   296.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   296.2 +++ b/patches/gcc/4.1.1/300-libstdc++-pic.patch	Sat Feb 24 11:00:05 2007 +0000
   296.3 @@ -0,0 +1,50 @@
   296.4 +# DP: Build and install libstdc++_pic.a library.
   296.5 +
   296.6 +--- gcc/libstdc++-v3/src/Makefile.am
   296.7 ++++ gcc/libstdc++-v3/src/Makefile.am
   296.8 +@@ -214,6 +214,12 @@
   296.9 + 	  $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
  296.10 + 
  296.11 + 
  296.12 ++install-exec-local:
  296.13 ++ifeq ($(enable_shared),yes)
  296.14 ++	$(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
  296.15 ++	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
  296.16 ++endif
  296.17 ++
  296.18 + # Added bits to build debug library.
  296.19 + if GLIBCXX_BUILD_DEBUG
  296.20 + all-local: build_debug
  296.21 +--- gcc/libstdc++-v3/src/Makefile.in
  296.22 ++++ gcc/libstdc++-v3/src/Makefile.in
  296.23 +@@ -627,7 +627,7 @@
  296.24 + 
  296.25 + install-data-am: install-data-local
  296.26 + 
  296.27 +-install-exec-am: install-toolexeclibLTLIBRARIES
  296.28 ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
  296.29 + 
  296.30 + install-info: install-info-am
  296.31 + 
  296.32 +@@ -660,6 +660,7 @@
  296.33 + 	distclean-libtool distclean-tags distdir dvi dvi-am html \
  296.34 + 	html-am info info-am install install-am install-data \
  296.35 + 	install-data-am install-data-local install-exec \
  296.36 ++	install-exec-local \
  296.37 + 	install-exec-am install-info install-info-am install-man \
  296.38 + 	install-strip install-toolexeclibLTLIBRARIES installcheck \
  296.39 + 	installcheck-am installdirs maintainer-clean \
  296.40 +@@ -743,6 +743,13 @@
  296.41 + install_debug:
  296.42 + 	(cd ${debugdir} && $(MAKE) \
  296.43 + 	toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
  296.44 ++
  296.45 ++install-exec-local:
  296.46 ++ifeq ($(enable_shared),yes)
  296.47 ++	$(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
  296.48 ++	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
  296.49 ++endif
  296.50 ++
  296.51 + # Tell versions [3.59,3.63) of GNU make to not export all variables.
  296.52 + # Otherwise a system limit (for SysV at least) may be exceeded.
  296.53 + .NOEXPORT:
   297.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   297.2 +++ b/patches/gcc/4.1.1/301-missing-execinfo_h.patch	Sat Feb 24 11:00:05 2007 +0000
   297.3 @@ -0,0 +1,11 @@
   297.4 +--- gcc-4.0.0/boehm-gc/include/gc.h-orig	2005-04-28 22:28:57.000000000 -0500
   297.5 ++++ gcc-4.0.0/boehm-gc/include/gc.h	2005-04-28 22:30:38.000000000 -0500
   297.6 +@@ -500,7 +500,7 @@
   297.7 + #ifdef __linux__
   297.8 + # include <features.h>
   297.9 + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
  297.10 +-     && !defined(__ia64__)
  297.11 ++     && !defined(__ia64__) && !defined(__UCLIBC__)
  297.12 + #   ifndef GC_HAVE_BUILTIN_BACKTRACE
  297.13 + #     define GC_HAVE_BUILTIN_BACKTRACE
  297.14 + #   endif
   298.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   298.2 +++ b/patches/gcc/4.1.1/302-c99-snprintf.patch	Sat Feb 24 11:00:05 2007 +0000
   298.3 @@ -0,0 +1,11 @@
   298.4 +--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig	2005-04-29 00:08:41.000000000 -0500
   298.5 ++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h	2005-04-29 00:08:45.000000000 -0500
   298.6 +@@ -142,7 +142,7 @@
   298.7 +   using ::vsprintf;
   298.8 + }
   298.9 + 
  298.10 +-#if _GLIBCXX_USE_C99
  298.11 ++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
  298.12 + 
  298.13 + #undef snprintf
  298.14 + #undef vfscanf
   299.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   299.2 +++ b/patches/gcc/4.1.1/303-c99-complex-ugly-hack.patch	Sat Feb 24 11:00:05 2007 +0000
   299.3 @@ -0,0 +1,12 @@
   299.4 +--- gcc-4.0.0/libstdc++-v3/configure-old	2005-04-30 22:04:48.061603912 -0500
   299.5 ++++ gcc-4.0.0/libstdc++-v3/configure	2005-04-30 22:06:13.678588152 -0500
   299.6 +@@ -7194,6 +7194,9 @@
   299.7 + cat >>conftest.$ac_ext <<_ACEOF
   299.8 + /* end confdefs.h.  */
   299.9 + #include <complex.h>
  299.10 ++#ifdef __UCLIBC__
  299.11 ++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
  299.12 ++#endif
  299.13 + int
  299.14 + main ()
  299.15 + {
   300.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   300.2 +++ b/patches/gcc/4.1.1/304-index_macro.patch	Sat Feb 24 11:00:05 2007 +0000
   300.3 @@ -0,0 +1,24 @@
   300.4 +--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps	2006-03-24 01:49:51 +0100
   300.5 ++++ gcc-4.1.0/libstdc++-v3/include/ext/rope	2006-03-24 01:49:37 +0100
   300.6 +@@ -59,6 +59,9 @@
   300.7 + #include <bits/allocator.h>
   300.8 + #include <ext/hash_fun.h>
   300.9 + 
  300.10 ++/* cope w/ index defined as macro, SuSv3 proposal */
  300.11 ++#undef index
  300.12 ++
  300.13 + # ifdef __GC
  300.14 + #   define __GC_CONST const
  300.15 + # else
  300.16 +--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps	2006-03-24 01:50:04 +0100
  300.17 ++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h	2006-03-24 01:50:28 +0100
  300.18 +@@ -53,6 +53,9 @@
  300.19 + #include <ext/memory> // For uninitialized_copy_n
  300.20 + #include <ext/numeric> // For power
  300.21 + 
  300.22 ++/* cope w/ index defined as macro, SuSv3 proposal */
  300.23 ++#undef index
  300.24 ++
  300.25 + namespace __gnu_cxx
  300.26 + {
  300.27 +   using std::size_t;
   301.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   301.2 +++ b/patches/gcc/4.1.1/740-sh-pr24836.patch	Sat Feb 24 11:00:05 2007 +0000
   301.3 @@ -0,0 +1,25 @@
   301.4 +http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
   301.5 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
   301.6 +
   301.7 +--- gcc/gcc/configure.ac	(revision 106699)
   301.8 ++++ gcc/gcc/configure.ac	(working copy)
   301.9 +@@ -2446,7 +2446,7 @@
  301.10 + 	tls_first_minor=14
  301.11 + 	tls_as_opt="-m64 -Aesame --fatal-warnings"
  301.12 + 	;;
  301.13 +-  sh-*-* | sh[34]-*-*)
  301.14 ++  sh-*-* | sh[34]*-*-*)
  301.15 +     conftest_s='
  301.16 + 	.section ".tdata","awT",@progbits
  301.17 + foo:	.long	25
  301.18 +--- gcc/gcc/configure
  301.19 ++++ gcc/gcc/configure
  301.20 +@@ -14846,7 +14846,7 @@
  301.21 + 	tls_first_minor=14
  301.22 + 	tls_as_opt="-m64 -Aesame --fatal-warnings"
  301.23 + 	;;
  301.24 +-  sh-*-* | sh[34]-*-*)
  301.25 ++  sh-*-* | sh[34]*-*-*)
  301.26 +     conftest_s='
  301.27 + 	.section ".tdata","awT",@progbits
  301.28 + foo:	.long	25
   302.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   302.2 +++ b/patches/gcc/4.1.1/800-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   302.3 @@ -0,0 +1,67 @@
   302.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
   302.5 +Adds support for arm*b-linux* big-endian ARM targets
   302.6 +
   302.7 +See http://gcc.gnu.org/PR16350
   302.8 +
   302.9 +--- gcc-4.1.0/gcc/config/arm/linux-elf.h
  302.10 ++++ gcc-4.1.0/gcc/config/arm/linux-elf.h
  302.11 +@@ -28,19 +28,33 @@
  302.12 + #undef  TARGET_VERSION
  302.13 + #define TARGET_VERSION  fputs (" (ARM GNU/Linux with ELF)", stderr);
  302.14 + 
  302.15 ++/*
  302.16 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  302.17 ++ * (big endian) configurations.
  302.18 ++ */
  302.19 ++#if TARGET_BIG_ENDIAN_DEFAULT
  302.20 ++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
  302.21 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  302.22 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  302.23 ++#else
  302.24 ++#define TARGET_ENDIAN_DEFAULT 0
  302.25 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  302.26 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  302.27 ++#endif
  302.28 ++
  302.29 + #undef  TARGET_DEFAULT_FLOAT_ABI
  302.30 + #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
  302.31 + 
  302.32 + #undef  TARGET_DEFAULT
  302.33 +-#define TARGET_DEFAULT (0)
  302.34 ++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
  302.35 + 
  302.36 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  302.37 + 
  302.38 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  302.39 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  302.40 + 
  302.41 + #undef  MULTILIB_DEFAULTS
  302.42 + #define MULTILIB_DEFAULTS \
  302.43 +-	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
  302.44 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
  302.45 + 
  302.46 + /* Now we define the strings used to build the spec file.  */
  302.47 + #undef  LIB_SPEC
  302.48 +@@ -61,7 +75,7 @@
  302.49 +    %{rdynamic:-export-dynamic} \
  302.50 +    %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
  302.51 +    -X \
  302.52 +-   %{mbig-endian:-EB}" \
  302.53 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  302.54 +    SUBTARGET_EXTRA_LINK_SPEC
  302.55 + 
  302.56 + #undef  LINK_SPEC
  302.57 +--- gcc-4.1.0/gcc/config.gcc
  302.58 ++++ gcc-4.1.0/gcc/config.gcc
  302.59 +@@ -672,6 +672,11 @@
  302.60 + 	;;
  302.61 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  302.62 + 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" 
  302.63 ++	case $target in
  302.64 ++	arm*b-*)
  302.65 ++		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
  302.66 ++		;;
  302.67 ++	esac
  302.68 + 	tmake_file="${tmake_file} t-linux arm/t-arm"
  302.69 + 	case ${target} in
  302.70 + 	arm*-*-linux-gnueabi)
   303.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   303.2 +++ b/patches/gcc/4.1.1/801-softfloat-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   303.3 @@ -0,0 +1,58 @@
   303.4 +This patch (C) 2007 Yann E. MORIN
   303.5 +Licensed under GPL v2.
   303.6 +
   303.7 +First hunk of this patch solves compiling uClibc-0.9.28{,.1} :
   303.8 +
   303.9 +make[1]: Entering directory `/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc'
  303.10 +  LD libuClibc-0.9.29.so
  303.11 +libc/libc_so.a(difftime.os): In function `difftime':
  303.12 +difftime.c:(.text+0x8): undefined reference to `__floatsidf'
  303.13 +difftime.c:(.text+0x2c): undefined reference to `__subdf3'
  303.14 +libc/libc_so.a(_fpmaxtostr.os): In function `_fpmaxtostr':
  303.15 +_fpmaxtostr.c:(.text+0xd4): undefined reference to `__nedf2'
  303.16 +_fpmaxtostr.c:(.text+0xf8): undefined reference to `__eqdf2'
  303.17 +_fpmaxtostr.c:(.text+0x114): undefined reference to `__divdf3'
  303.18 +_fpmaxtostr.c:(.text+0x120): undefined reference to `__ltdf2'
  303.19 +_fpmaxtostr.c:(.text+0x1c4): undefined reference to `__muldf3'
  303.20 +_fpmaxtostr.c:(.text+0x388): undefined reference to `__gedf2'
  303.21 +_fpmaxtostr.c:(.text+0x430): undefined reference to `__adddf3'
  303.22 +libc/libc_so.a(__psfs_do_numeric.os): In function `__psfs_do_numeric':
  303.23 +__psfs_do_numeric.c:(.text+0x520): undefined reference to `__truncdfsf2'
  303.24 +libc/libc_so.a(strtof.os): In function `strtof':
  303.25 +strtof.c:(.text+0x1c): undefined reference to `__extendsfdf2'
  303.26 +/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/cc_core_prefix/lib/gcc/arm-linux-uclibc/4.1.1/libgcc.a(_fixunsdfsi.o):
  303.27 +In function `__fixunsdfsi':
  303.28 +libgcc2.c:(.text+0x34): undefined reference to `__fixdfsi'
  303.29 +make[2]: *** [lib/libc.so] Error 1
  303.30 +make[1]: *** [lib/libc.so.0] Error 2
  303.31 +make[1]: Leaving directory `/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc'
  303.32 +make: *** [/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc/lib/libc.a]
  303.33 +Error 2
  303.34 +
  303.35 +The second hunk fixes building final gcc because soft-float implies using -lfloat (which we don't have).
  303.36 +
  303.37 +
  303.38 +diff -dur gcc-4.1.1.no-softfloat-fix/gcc/config.gcc gcc-4.1.1/gcc/config.gcc
  303.39 +--- gcc-4.1.1.no-softfloat-fix/gcc/config.gcc	2007-02-01 21:57:17.000000000 +0100
  303.40 ++++ gcc-4.1.1/gcc/config.gcc	2007-02-01 22:11:06.000000000 +0100
  303.41 +@@ -690,7 +690,7 @@
  303.42 + 	    default_use_cxa_atexit=yes
  303.43 + 	    ;;
  303.44 + 	*)
  303.45 +-	    tmake_file="$tmake_file arm/t-linux"
  303.46 ++	    tmake_file="$tmake_file arm/t-linux arm/t-arm-elf"
  303.47 + 	    ;;
  303.48 + 	esac
  303.49 + 	tm_file="$tm_file arm/aout.h arm/arm.h"
  303.50 +diff -dur gcc-4.1.1.-lfloat/gcc/config/arm/linux-elf.h gcc-4.1.1/gcc/config/arm/linux-elf.h
  303.51 +--- gcc-4.1.1.-lfloat/gcc/config/arm/linux-elf.h	2007-02-01 21:57:17.000000000 +0100
  303.52 ++++ gcc-4.1.1/gcc/config/arm/linux-elf.h	2007-02-01 23:00:42.000000000 +0100
  303.53 +@@ -63,7 +63,7 @@
  303.54 +    %{shared:-lc} \
  303.55 +    %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
  303.56 + 
  303.57 +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
  303.58 ++#define LIBGCC_SPEC "-lgcc"
  303.59 + 
  303.60 + #ifdef USE_UCLIBC
  303.61 + #define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
   304.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   304.2 +++ b/patches/gcc/4.1.2/100-uclibc-conf.patch	Sat Feb 24 11:00:05 2007 +0000
   304.3 @@ -0,0 +1,544 @@
   304.4 +--- gcc-4.1.0/gcc/config/t-linux-uclibc
   304.5 ++++ gcc-4.1.0/gcc/config/t-linux-uclibc
   304.6 +@@ -0,0 +1,5 @@
   304.7 ++# Remove glibc specific files added in t-linux
   304.8 ++SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
   304.9 ++
  304.10 ++# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
  304.11 ++LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
  304.12 +--- gcc-4.1.0/gcc/config.gcc
  304.13 ++++ gcc-4.1.0/gcc/config.gcc
  304.14 +@@ -1887,7 +1887,7 @@ s390x-ibm-tpf*)
  304.15 + 	;;
  304.16 + sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
  304.17 + sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
  304.18 +-  sh-*-linux* | sh[346lbe]*-*-linux* | \
  304.19 ++  sh*-*-linux* | sh[346lbe]*-*-linux* | \
  304.20 +   sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
  304.21 +    sh64-*-netbsd* | sh64l*-*-netbsd*)
  304.22 + 	tmake_file="${tmake_file} sh/t-sh sh/t-elf"
  304.23 +@@ -2341,6 +2341,12 @@ m32c-*-elf*)
  304.24 + 	;;
  304.25 + esac
  304.26 + 
  304.27 ++# Rather than hook into each target, just do it after all the linux
  304.28 ++# targets have been processed
  304.29 ++case ${target} in
  304.30 ++*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
  304.31 ++esac
  304.32 ++
  304.33 + case ${target} in
  304.34 + i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
  304.35 + 	tmake_file="${tmake_file} i386/t-gmm_malloc"
  304.36 +--- gcc-4.1.0/boehm-gc/configure
  304.37 ++++ gcc-4.1.0/boehm-gc/configure
  304.38 +@@ -4320,6 +4320,11 @@ linux-gnu*)
  304.39 +   lt_cv_deplibs_check_method=pass_all
  304.40 +   ;;
  304.41 + 
  304.42 ++linux-uclibc*)
  304.43 ++  lt_cv_deplibs_check_method=pass_all
  304.44 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
  304.45 ++  ;;
  304.46 ++
  304.47 + netbsd* | knetbsd*-gnu)
  304.48 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  304.49 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
  304.50 +--- gcc-4.1.0/configure
  304.51 ++++ gcc-4.1.0/configure
  304.52 +@@ -1133,7 +1133,7 @@ no)
  304.53 +     ;;
  304.54 + "")
  304.55 +     case "${target}" in
  304.56 +-    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
  304.57 ++    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
  304.58 +         # Enable libmudflap by default in GNU and friends.
  304.59 + 	;;
  304.60 +     *-*-freebsd*)
  304.61 +--- gcc-4.1.0/configure.in
  304.62 ++++ gcc-4.1.0/configure.in
  304.63 +@@ -341,7 +341,7 @@ no)
  304.64 +     ;;
  304.65 + "")
  304.66 +     case "${target}" in
  304.67 +-    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
  304.68 ++    *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
  304.69 +         # Enable libmudflap by default in GNU and friends.
  304.70 + 	;;
  304.71 +     *-*-freebsd*)
  304.72 +--- gcc-4.1.0/contrib/regression/objs-gcc.sh
  304.73 ++++ gcc-4.1.0/contrib/regression/objs-gcc.sh
  304.74 +@@ -105,6 +105,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H
  304.75 +  then
  304.76 +   make all-gdb all-dejagnu all-ld || exit 1
  304.77 +   make install-gdb install-dejagnu install-ld || exit 1
  304.78 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
  304.79 ++ then
  304.80 ++  make all-gdb all-dejagnu all-ld || exit 1
  304.81 ++  make install-gdb install-dejagnu install-ld || exit 1
  304.82 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
  304.83 +   make bootstrap || exit 1
  304.84 +   make install || exit 1
  304.85 +--- gcc-4.1.0/gcc/config/alpha/linux-elf.h
  304.86 ++++ gcc-4.1.0/gcc/config/alpha/linux-elf.h
  304.87 +@@ -27,7 +27,11 @@ Boston, MA 02110-1301, USA.  */
  304.88 + #define SUBTARGET_EXTRA_SPECS \
  304.89 + { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
  304.90 + 
  304.91 ++#if defined USE_UCLIBC
  304.92 ++#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
  304.93 ++#else
  304.94 + #define ELF_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
  304.95 ++#endif
  304.96 + 
  304.97 + #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax}		\
  304.98 +   %{O*:-O3} %{!O*:-O1}						\
  304.99 +--- gcc-4.1.0/gcc/config/arm/linux-elf.h
 304.100 ++++ gcc-4.1.0/gcc/config/arm/linux-elf.h
 304.101 +@@ -51,7 +51,11 @@
 304.102 + 
 304.103 + #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
 304.104 + 
 304.105 ++#ifdef USE_UCLIBC
 304.106 ++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
 304.107 ++#else
 304.108 + #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
 304.109 ++#endif
 304.110 + 
 304.111 + #define LINUX_TARGET_LINK_SPEC  "%{h*} %{version:-v} \
 304.112 +    %{b} \
 304.113 +--- gcc-4.1.0/gcc/config/cris/linux.h
 304.114 ++++ gcc-4.1.0/gcc/config/cris/linux.h
 304.115 +@@ -73,6 +73,25 @@ Boston, MA 02110-1301, USA.  */
 304.116 + #undef CRIS_DEFAULT_CPU_VERSION
 304.117 + #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
 304.118 + 
 304.119 ++#ifdef USE_UCLIBC
 304.120 ++
 304.121 ++#undef CRIS_SUBTARGET_VERSION
 304.122 ++#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
 304.123 ++
 304.124 ++#undef CRIS_LINK_SUBTARGET_SPEC
 304.125 ++#define CRIS_LINK_SUBTARGET_SPEC \
 304.126 ++ "-mcrislinux\
 304.127 ++  -rpath-link include/asm/../..%s\
 304.128 ++  %{shared} %{static}\
 304.129 ++  %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
 304.130 ++  %{!shared: \
 304.131 ++    %{!static: \
 304.132 ++      %{rdynamic:-export-dynamic} \
 304.133 ++      %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
 304.134 ++  %{!r:%{O2|O3: --gc-sections}}"
 304.135 ++
 304.136 ++#else  /* USE_UCLIBC */
 304.137 ++
 304.138 + #undef CRIS_SUBTARGET_VERSION
 304.139 + #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
 304.140 + 
 304.141 +@@ -87,6 +106,8 @@ Boston, MA 02110-1301, USA.  */
 304.142 +   %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
 304.143 +   %{!r:%{O2|O3: --gc-sections}}"
 304.144 + 
 304.145 ++#endif  /* USE_UCLIBC */
 304.146 ++
 304.147 + 
 304.148 + /* Node: Run-time Target */
 304.149 + 
 304.150 +--- gcc-4.1.0/gcc/config/i386/linux.h
 304.151 ++++ gcc-4.1.0/gcc/config/i386/linux.h
 304.152 +@@ -107,6 +107,11 @@ Boston, MA 02110-1301, USA.  */
 304.153 + #define LINK_EMULATION "elf_i386"
 304.154 + #define DYNAMIC_LINKER "/lib/ld-linux.so.2"
 304.155 + 
 304.156 ++#if defined USE_UCLIBC
 304.157 ++#undef DYNAMIC_LINKER
 304.158 ++#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 304.159 ++#endif
 304.160 ++
 304.161 + #undef  SUBTARGET_EXTRA_SPECS
 304.162 + #define SUBTARGET_EXTRA_SPECS \
 304.163 +   { "link_emulation", LINK_EMULATION },\
 304.164 +--- gcc-4.1.0/gcc/config/i386/linux64.h
 304.165 ++++ gcc-4.1.0/gcc/config/i386/linux64.h
 304.166 +@@ -54,14 +54,21 @@ Boston, MA 02110-1301, USA.  */
 304.167 +    When the -shared link option is used a final link is not being
 304.168 +    done.  */
 304.169 + 
 304.170 ++#ifdef USE_UCLIBC
 304.171 ++#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 304.172 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
 304.173 ++#else
 304.174 ++#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 304.175 ++#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
 304.176 ++#endif
 304.177 + #undef	LINK_SPEC
 304.178 + #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
 304.179 +   %{shared:-shared} \
 304.180 +   %{!shared: \
 304.181 +     %{!static: \
 304.182 +       %{rdynamic:-export-dynamic} \
 304.183 +-      %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 304.184 +-      %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
 304.185 ++      %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
 304.186 ++      %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
 304.187 +     %{static:-static}}"
 304.188 + 
 304.189 + /* Similar to standard Linux, but adding -ffast-math support.  */
 304.190 +--- gcc-4.1.0/gcc/config/ia64/linux.h
 304.191 ++++ gcc-4.1.0/gcc/config/ia64/linux.h
 304.192 +@@ -37,13 +37,18 @@ do {						\
 304.193 + /* Define this for shared library support because it isn't in the main
 304.194 +    linux.h file.  */
 304.195 + 
 304.196 ++#ifdef USE_UCLIBC
 304.197 ++#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
 304.198 ++#else
 304.199 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
 304.200 ++#endif
 304.201 + #undef LINK_SPEC
 304.202 + #define LINK_SPEC "\
 304.203 +   %{shared:-shared} \
 304.204 +   %{!shared: \
 304.205 +     %{!static: \
 304.206 +       %{rdynamic:-export-dynamic} \
 304.207 +-      %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
 304.208 ++      %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 304.209 +       %{static:-static}}"
 304.210 + 
 304.211 + 
 304.212 +--- gcc-4.1.0/gcc/config/m68k/linux.h
 304.213 ++++ gcc-4.1.0/gcc/config/m68k/linux.h
 304.214 +@@ -123,12 +123,17 @@ Boston, MA 02110-1301, USA.  */
 304.215 + 
 304.216 + /* If ELF is the default format, we should not use /lib/elf.  */
 304.217 + 
 304.218 ++#ifdef USE_UCLIBC
 304.219 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 304.220 ++#else
 304.221 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
 304.222 ++#endif
 304.223 + #undef	LINK_SPEC
 304.224 + #define LINK_SPEC "-m m68kelf %{shared} \
 304.225 +   %{!shared: \
 304.226 +     %{!static: \
 304.227 +       %{rdynamic:-export-dynamic} \
 304.228 +-      %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
 304.229 ++      %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 304.230 +     %{static}}"
 304.231 + 
 304.232 + /* For compatibility with linux/a.out */
 304.233 +--- gcc-4.1.0/gcc/config/mips/linux.h
 304.234 ++++ gcc-4.1.0/gcc/config/mips/linux.h
 304.235 +@@ -105,6 +105,11 @@ Boston, MA 02110-1301, USA.  */
 304.236 + 
 304.237 + /* Borrowed from sparc/linux.h */
 304.238 + #undef LINK_SPEC
 304.239 ++#ifdef USE_UCLIBC
 304.240 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 304.241 ++#else
 304.242 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
 304.243 ++#endif
 304.244 + #define LINK_SPEC \
 304.245 +  "%(endian_spec) \
 304.246 +   %{shared:-shared} \
 304.247 +@@ -112,7 +117,7 @@ Boston, MA 02110-1301, USA.  */
 304.248 +     %{!ibcs: \
 304.249 +       %{!static: \
 304.250 +         %{rdynamic:-export-dynamic} \
 304.251 +-        %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
 304.252 ++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 304.253 +         %{static:-static}}}"
 304.254 + 
 304.255 + #undef SUBTARGET_ASM_SPEC
 304.256 +--- gcc-4.1.0/gcc/config/pa/pa-linux.h
 304.257 ++++ gcc-4.1.0/gcc/config/pa/pa-linux.h
 304.258 +@@ -49,13 +49,18 @@ Boston, MA 02110-1301, USA.  */
 304.259 + /* Define this for shared library support because it isn't in the main
 304.260 +    linux.h file.  */
 304.261 + 
 304.262 ++#ifdef USE_UCLIBC
 304.263 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 304.264 ++#else
 304.265 ++#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
 304.266 ++#endif
 304.267 + #undef LINK_SPEC
 304.268 + #define LINK_SPEC "\
 304.269 +   %{shared:-shared} \
 304.270 +   %{!shared: \
 304.271 +     %{!static: \
 304.272 +       %{rdynamic:-export-dynamic} \
 304.273 +-      %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
 304.274 ++      %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 304.275 +       %{static:-static}}"
 304.276 + 
 304.277 + /* glibc's profiling functions don't need gcc to allocate counters.  */
 304.278 +--- gcc-4.1.0/gcc/config/rs6000/linux.h
 304.279 ++++ gcc-4.1.0/gcc/config/rs6000/linux.h
 304.280 +@@ -72,7 +72,11 @@
 304.281 + #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
 304.282 + 
 304.283 + #undef	LINK_OS_DEFAULT_SPEC
 304.284 ++#ifdef USE_UCLIBC
 304.285 ++#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
 304.286 ++#else
 304.287 + #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
 304.288 ++#endif
 304.289 + 
 304.290 + #define LINK_GCC_C_SEQUENCE_SPEC \
 304.291 +   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
 304.292 +--- gcc-4.1.0/gcc/config/rs6000/sysv4.h
 304.293 ++++ gcc-4.1.0/gcc/config/rs6000/sysv4.h
 304.294 +@@ -866,6 +866,7 @@ extern int fixuplabelno;
 304.295 +   mcall-linux  : %(link_os_linux)       ; \
 304.296 +   mcall-gnu    : %(link_os_gnu)         ; \
 304.297 +   mcall-netbsd : %(link_os_netbsd)      ; \
 304.298 ++  mcall-linux-uclibc : %(link_os_linux_uclibc); \
 304.299 +   mcall-openbsd: %(link_os_openbsd)     ; \
 304.300 +                : %(link_os_default)     }"
 304.301 + 
 304.302 +@@ -1043,6 +1044,10 @@ extern int fixuplabelno;
 304.303 +   %{rdynamic:-export-dynamic} \
 304.304 +   %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
 304.305 + 
 304.306 ++#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
 304.307 ++  %{rdynamic:-export-dynamic} \
 304.308 ++  %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
 304.309 ++
 304.310 + #if defined(HAVE_LD_EH_FRAME_HDR)
 304.311 + # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
 304.312 + #endif
 304.313 +@@ -1209,6 +1214,7 @@ ncrtn.o%s"
 304.314 +   { "link_os_sim",		LINK_OS_SIM_SPEC },			\
 304.315 +   { "link_os_freebsd",		LINK_OS_FREEBSD_SPEC },			\
 304.316 +   { "link_os_linux",		LINK_OS_LINUX_SPEC },			\
 304.317 ++  { "link_os_linux_uclibc",	LINK_OS_LINUX_UCLIBC_SPEC },		\
 304.318 +   { "link_os_gnu",		LINK_OS_GNU_SPEC },			\
 304.319 +   { "link_os_netbsd",		LINK_OS_NETBSD_SPEC },			\
 304.320 +   { "link_os_openbsd",		LINK_OS_OPENBSD_SPEC },			\
 304.321 +--- gcc-4.1.0/gcc/config/s390/linux.h
 304.322 ++++ gcc-4.1.0/gcc/config/s390/linux.h
 304.323 +@@ -77,6 +77,13 @@ Software Foundation, 51 Franklin Street,
 304.324 + #define MULTILIB_DEFAULTS { "m31" }
 304.325 + #endif
 304.326 + 
 304.327 ++#ifdef USE_UCLIBC
 304.328 ++#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 304.329 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
 304.330 ++#else
 304.331 ++#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
 304.332 ++#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
 304.333 ++#endif
 304.334 + #undef  LINK_SPEC
 304.335 + #define LINK_SPEC \
 304.336 +   "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
 304.337 +@@ -86,8 +93,8 @@ Software Foundation, 51 Franklin Street,
 304.338 +       %{!static: \
 304.339 + 	%{rdynamic:-export-dynamic} \
 304.340 + 	%{!dynamic-linker: \
 304.341 +-          %{m31:-dynamic-linker /lib/ld.so.1} \
 304.342 +-          %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
 304.343 ++          %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
 304.344 ++          %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
 304.345 + 
 304.346 + 
 304.347 + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 304.348 +--- gcc-4.1.0/gcc/config/sh/linux.h
 304.349 ++++ gcc-4.1.0/gcc/config/sh/linux.h
 304.350 +@@ -56,12 +56,21 @@ Boston, MA 02110-1301, USA.  */
 304.351 + #undef SUBTARGET_LINK_EMUL_SUFFIX
 304.352 + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
 304.353 + #undef SUBTARGET_LINK_SPEC
 304.354 ++#ifdef USE_UCLIBC
 304.355 ++#define SUBTARGET_LINK_SPEC \
 304.356 ++  "%{shared:-shared} \
 304.357 ++   %{!static: \
 304.358 ++     %{rdynamic:-export-dynamic} \
 304.359 ++     %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
 304.360 ++   %{static:-static}"
 304.361 ++#else
 304.362 + #define SUBTARGET_LINK_SPEC \
 304.363 +   "%{shared:-shared} \
 304.364 +    %{!static: \
 304.365 +      %{rdynamic:-export-dynamic} \
 304.366 +      %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 304.367 +    %{static:-static}"
 304.368 ++#endif
 304.369 + 
 304.370 + /* Output assembler code to STREAM to call the profiler.  */
 304.371 + 
 304.372 +--- gcc-4.1.0/gcc/config/sparc/linux.h
 304.373 ++++ gcc-4.1.0/gcc/config/sparc/linux.h
 304.374 +@@ -125,6 +125,11 @@ Boston, MA 02110-1301, USA.  */
 304.375 + 
 304.376 + /* If ELF is the default format, we should not use /lib/elf.  */
 304.377 + 
 304.378 ++#ifdef USE_UCLIBC
 304.379 ++#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
 304.380 ++#else
 304.381 ++#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
 304.382 ++#endif
 304.383 + #undef  LINK_SPEC
 304.384 + #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
 304.385 +   %{!mno-relax:%{!r:-relax}} \
 304.386 +@@ -132,7 +137,7 @@ Boston, MA 02110-1301, USA.  */
 304.387 +     %{!ibcs: \
 304.388 +       %{!static: \
 304.389 +         %{rdynamic:-export-dynamic} \
 304.390 +-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 304.391 ++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 304.392 +         %{static:-static}}}"
 304.393 + 
 304.394 + /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
 304.395 +--- gcc-4.1.0/gcc/config/sparc/linux64.h
 304.396 ++++ gcc-4.1.0/gcc/config/sparc/linux64.h
 304.397 +@@ -162,12 +162,17 @@ Boston, MA 02110-1301, USA.  */
 304.398 +   { "link_arch_default", LINK_ARCH_DEFAULT_SPEC },	  \
 304.399 +   { "link_arch",	 LINK_ARCH_SPEC },
 304.400 +     
 304.401 ++#ifdef USE_UCLIBC
 304.402 ++#define ELF_DYNAMIC_LINKER	"/lib/ld-uClibc.so.0"
 304.403 ++#else
 304.404 ++#define ELF_DYNAMIC_LINKER  "/lib/ld-linux.so.2"
 304.405 ++#endif
 304.406 + #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
 304.407 +   %{!shared: \
 304.408 +     %{!ibcs: \
 304.409 +       %{!static: \
 304.410 +         %{rdynamic:-export-dynamic} \
 304.411 +-        %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 304.412 ++        %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
 304.413 +         %{static:-static}}} \
 304.414 + "
 304.415 + 
 304.416 +--- gcc-4.1.0/libffi/configure
 304.417 ++++ gcc-4.1.0/libffi/configure
 304.418 +@@ -3457,6 +3457,11 @@ linux-gnu*)
 304.419 +   lt_cv_deplibs_check_method=pass_all
 304.420 +   ;;
 304.421 + 
 304.422 ++linux-uclibc*)
 304.423 ++  lt_cv_deplibs_check_method=pass_all
 304.424 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 304.425 ++  ;;
 304.426 ++
 304.427 + netbsd* | knetbsd*-gnu)
 304.428 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 304.429 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 304.430 +--- gcc-4.1.0/libgfortran/configure
 304.431 ++++ gcc-4.1.0/libgfortran/configure
 304.432 +@@ -3699,6 +3699,11 @@ linux-gnu*)
 304.433 +   lt_cv_deplibs_check_method=pass_all
 304.434 +   ;;
 304.435 + 
 304.436 ++linux-uclibc*)
 304.437 ++  lt_cv_deplibs_check_method=pass_all
 304.438 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 304.439 ++  ;;
 304.440 ++
 304.441 + netbsd* | knetbsd*-gnu)
 304.442 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 304.443 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 304.444 +--- gcc-4.1.0/libjava/configure
 304.445 ++++ gcc-4.1.0/libjava/configure
 304.446 +@@ -5137,6 +5137,11 @@ linux-gnu*)
 304.447 +   lt_cv_deplibs_check_method=pass_all
 304.448 +   ;;
 304.449 + 
 304.450 ++linux-uclibc*)
 304.451 ++  lt_cv_deplibs_check_method=pass_all
 304.452 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 304.453 ++  ;;
 304.454 ++
 304.455 + netbsd* | knetbsd*-gnu)
 304.456 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 304.457 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 304.458 +--- gcc-4.1.0/libmudflap/configure
 304.459 ++++ gcc-4.1.0/libmudflap/configure
 304.460 +@@ -5382,6 +5382,11 @@ linux-gnu*)
 304.461 +   lt_cv_deplibs_check_method=pass_all
 304.462 +   ;;
 304.463 + 
 304.464 ++linux-uclibc*)
 304.465 ++  lt_cv_deplibs_check_method=pass_all
 304.466 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 304.467 ++  ;;
 304.468 ++
 304.469 + netbsd* | knetbsd*-gnu)
 304.470 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 304.471 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 304.472 +--- gcc-4.1.0/libobjc/configure
 304.473 ++++ gcc-4.1.0/libobjc/configure
 304.474 +@@ -3312,6 +3312,11 @@ linux-gnu*)
 304.475 +   lt_cv_deplibs_check_method=pass_all
 304.476 +   ;;
 304.477 + 
 304.478 ++linux-uclibc*)
 304.479 ++  lt_cv_deplibs_check_method=pass_all
 304.480 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 304.481 ++  ;;
 304.482 ++
 304.483 + netbsd* | knetbsd*-gnu)
 304.484 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 304.485 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
 304.486 +--- gcc-4.1.0/libtool.m4
 304.487 ++++ gcc-4.1.0/libtool.m4
 304.488 +@@ -743,6 +743,11 @@ linux-gnu*)
 304.489 +   lt_cv_deplibs_check_method=pass_all
 304.490 +   ;;
 304.491 + 
 304.492 ++linux-uclibc*)
 304.493 ++  lt_cv_deplibs_check_method=pass_all
 304.494 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 304.495 ++  ;;
 304.496 ++
 304.497 + netbsd* | knetbsd*-gnu)
 304.498 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 304.499 +     [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
 304.500 +--- gcc-4.1.0/ltconfig
 304.501 ++++ gcc-4.1.0/ltconfig
 304.502 +@@ -603,6 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
 304.503 + 
 304.504 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
 304.505 + case $host_os in
 304.506 ++linux-uclibc*) ;;
 304.507 + linux-gnu*) ;;
 304.508 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
 304.509 + esac
 304.510 +@@ -1274,6 +1275,23 @@ linux-gnu*)
 304.511 +   dynamic_linker='GNU/Linux ld.so'
 304.512 +   ;;
 304.513 + 
 304.514 ++linux-uclibc*)
 304.515 ++  version_type=linux
 304.516 ++  need_lib_prefix=no
 304.517 ++  need_version=no
 304.518 ++  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 304.519 ++  soname_spec='${libname}${release}.so$major'
 304.520 ++  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 304.521 ++  shlibpath_var=LD_LIBRARY_PATH
 304.522 ++  shlibpath_overrides_runpath=no
 304.523 ++  # This implies no fast_install, which is unacceptable.
 304.524 ++  # Some rework will be needed to allow for fast_install
 304.525 ++  # before this can be enabled.
 304.526 ++  hardcode_into_libs=yes
 304.527 ++  # Assume using the uClibc dynamic linker.
 304.528 ++  dynamic_linker="uClibc ld.so"
 304.529 ++  ;;
 304.530 ++
 304.531 + netbsd*)
 304.532 +   need_lib_prefix=no
 304.533 +   need_version=no
 304.534 +--- gcc-4.1.0/zlib/configure
 304.535 ++++ gcc-4.1.0/zlib/configure
 304.536 +@@ -3426,6 +3426,11 @@ linux-gnu*)
 304.537 +   lt_cv_deplibs_check_method=pass_all
 304.538 +   ;;
 304.539 + 
 304.540 ++linux-uclibc*)
 304.541 ++  lt_cv_deplibs_check_method=pass_all
 304.542 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
 304.543 ++  ;;
 304.544 ++
 304.545 + netbsd* | knetbsd*-gnu)
 304.546 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 304.547 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
   305.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   305.2 +++ b/patches/gcc/4.1.2/110-arm-eabi.patch	Sat Feb 24 11:00:05 2007 +0000
   305.3 @@ -0,0 +1,27 @@
   305.4 +--- gcc-2005q3-1.orig/gcc/config.gcc	2005-10-31 19:02:54.000000000 +0300
   305.5 ++++ gcc-2005q3-1/gcc/config.gcc	2006-01-27 01:09:09.000000000 +0300
   305.6 +@@ -674,7 +674,7 @@
   305.7 + 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" 
   305.8 + 	tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm"
   305.9 + 	case ${target} in
  305.10 +-	arm*-*-linux-gnueabi)
  305.11 ++	arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
  305.12 + 	    tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
  305.13 + 	    tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
  305.14 +   	    # The BPABI long long divmod functions return a 128-bit value in 
  305.15 +
  305.16 +diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h
  305.17 +--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h	2005-12-07 23:14:16.000000000 +0300
  305.18 ++++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h	2006-03-29 19:02:34.000000000 +0400
  305.19 +@@ -53,7 +53,11 @@
  305.20 + /* Use ld-linux.so.3 so that it will be possible to run "classic"
  305.21 +    GNU/Linux binaries on an EABI system.  */
  305.22 + #undef LINUX_TARGET_INTERPRETER
  305.23 ++#ifdef USE_UCLIBC
  305.24 ++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
  305.25 ++#else
  305.26 + #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
  305.27 ++#endif
  305.28 + 
  305.29 + /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
  305.30 +    use the GNU/Linux version, not the generic BPABI version.  */
   306.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   306.2 +++ b/patches/gcc/4.1.2/200-uclibc-locale.patch	Sat Feb 24 11:00:05 2007 +0000
   306.3 @@ -0,0 +1,3239 @@
   306.4 +--- gcc-4.1.0-dist/libstdc++-v3/acinclude.m4
   306.5 ++++ gcc-4.1.0/libstdc++-v3/acinclude.m4
   306.6 +@@ -1071,7 +1071,7 @@
   306.7 +   AC_MSG_CHECKING([for C locale to use])
   306.8 +   GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
   306.9 +     [use MODEL for target locale package],
  306.10 +-    [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
  306.11 ++    [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
  306.12 +   
  306.13 +   # If they didn't use this option switch, or if they specified --enable
  306.14 +   # with no specific model, we'll have to look for one.  If they
  306.15 +@@ -1087,6 +1087,9 @@
  306.16 +   # Default to "generic".
  306.17 +   if test $enable_clocale_flag = auto; then
  306.18 +     case ${target_os} in
  306.19 ++      *-uclibc*)
  306.20 ++        enable_clocale_flag=uclibc
  306.21 ++        ;;
  306.22 +       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
  306.23 +         AC_EGREP_CPP([_GLIBCXX_ok], [
  306.24 +         #include <features.h>
  306.25 +@@ -1230,6 +1233,40 @@
  306.26 +       CTIME_CC=config/locale/generic/time_members.cc
  306.27 +       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
  306.28 +       ;;
  306.29 ++    uclibc)
  306.30 ++      AC_MSG_RESULT(uclibc)
  306.31 ++
  306.32 ++      # Declare intention to use gettext, and add support for specific
  306.33 ++      # languages.
  306.34 ++      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
  306.35 ++      ALL_LINGUAS="de fr"
  306.36 ++
  306.37 ++      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
  306.38 ++      AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
  306.39 ++      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
  306.40 ++        USE_NLS=yes
  306.41 ++      fi
  306.42 ++      # Export the build objects.
  306.43 ++      for ling in $ALL_LINGUAS; do \
  306.44 ++        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
  306.45 ++        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
  306.46 ++      done
  306.47 ++      AC_SUBST(glibcxx_MOFILES)
  306.48 ++      AC_SUBST(glibcxx_POFILES)
  306.49 ++
  306.50 ++      CLOCALE_H=config/locale/uclibc/c_locale.h
  306.51 ++      CLOCALE_CC=config/locale/uclibc/c_locale.cc
  306.52 ++      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
  306.53 ++      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
  306.54 ++      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
  306.55 ++      CMESSAGES_H=config/locale/uclibc/messages_members.h
  306.56 ++      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
  306.57 ++      CMONEY_CC=config/locale/uclibc/monetary_members.cc
  306.58 ++      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
  306.59 ++      CTIME_H=config/locale/uclibc/time_members.h
  306.60 ++      CTIME_CC=config/locale/uclibc/time_members.cc
  306.61 ++      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
  306.62 ++      ;;
  306.63 +   esac
  306.64 + 
  306.65 +   # This is where the testsuite looks for locale catalogs, using the
  306.66 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
  306.67 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
  306.68 +@@ -0,0 +1,63 @@
  306.69 ++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
  306.70 ++
  306.71 ++// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
  306.72 ++//
  306.73 ++// This file is part of the GNU ISO C++ Library.  This library is free
  306.74 ++// software; you can redistribute it and/or modify it under the
  306.75 ++// terms of the GNU General Public License as published by the
  306.76 ++// Free Software Foundation; either version 2, or (at your option)
  306.77 ++// any later version.
  306.78 ++
  306.79 ++// This library is distributed in the hope that it will be useful,
  306.80 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
  306.81 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  306.82 ++// GNU General Public License for more details.
  306.83 ++
  306.84 ++// You should have received a copy of the GNU General Public License along
  306.85 ++// with this library; see the file COPYING.  If not, write to the Free
  306.86 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
  306.87 ++// USA.
  306.88 ++
  306.89 ++// As a special exception, you may use this file as part of a free software
  306.90 ++// library without restriction.  Specifically, if other files instantiate
  306.91 ++// templates or use macros or inline functions from this file, or you compile
  306.92 ++// this file and link it with other files to produce an executable, this
  306.93 ++// file does not by itself cause the resulting executable to be covered by
  306.94 ++// the GNU General Public License.  This exception does not however
  306.95 ++// invalidate any other reasons why the executable file might be covered by
  306.96 ++// the GNU General Public License.
  306.97 ++
  306.98 ++// Written by Jakub Jelinek <jakub@redhat.com>
  306.99 ++
 306.100 ++#include <bits/c++config.h>
 306.101 ++#include <clocale>
 306.102 ++
 306.103 ++#ifdef __UCLIBC_MJN3_ONLY__
 306.104 ++#warning clean this up
 306.105 ++#endif
 306.106 ++
 306.107 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.108 ++                                                  
 306.109 ++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
 306.110 ++extern "C" __typeof(strcoll_l) __strcoll_l;
 306.111 ++extern "C" __typeof(strftime_l) __strftime_l;
 306.112 ++extern "C" __typeof(strtod_l) __strtod_l;
 306.113 ++extern "C" __typeof(strtof_l) __strtof_l;
 306.114 ++extern "C" __typeof(strtold_l) __strtold_l;
 306.115 ++extern "C" __typeof(strxfrm_l) __strxfrm_l;
 306.116 ++extern "C" __typeof(newlocale) __newlocale;
 306.117 ++extern "C" __typeof(freelocale) __freelocale;
 306.118 ++extern "C" __typeof(duplocale) __duplocale;
 306.119 ++extern "C" __typeof(uselocale) __uselocale;
 306.120 ++
 306.121 ++#ifdef _GLIBCXX_USE_WCHAR_T
 306.122 ++extern "C" __typeof(iswctype_l) __iswctype_l;
 306.123 ++extern "C" __typeof(towlower_l) __towlower_l;
 306.124 ++extern "C" __typeof(towupper_l) __towupper_l;
 306.125 ++extern "C" __typeof(wcscoll_l) __wcscoll_l;
 306.126 ++extern "C" __typeof(wcsftime_l) __wcsftime_l;
 306.127 ++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
 306.128 ++extern "C" __typeof(wctype_l) __wctype_l;
 306.129 ++#endif 
 306.130 ++
 306.131 ++#endif // GLIBC 2.3 and later
 306.132 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc
 306.133 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
 306.134 +@@ -0,0 +1,152 @@
 306.135 ++// Wrapper for underlying C-language localization -*- C++ -*-
 306.136 ++
 306.137 ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 
 306.138 ++// Free Software Foundation, Inc.
 306.139 ++//
 306.140 ++// This file is part of the GNU ISO C++ Library.  This library is free
 306.141 ++// software; you can redistribute it and/or modify it under the
 306.142 ++// terms of the GNU General Public License as published by the
 306.143 ++// Free Software Foundation; either version 2, or (at your option)
 306.144 ++// any later version.
 306.145 ++
 306.146 ++// This library is distributed in the hope that it will be useful,
 306.147 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 306.148 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 306.149 ++// GNU General Public License for more details.
 306.150 ++
 306.151 ++// You should have received a copy of the GNU General Public License along
 306.152 ++// with this library; see the file COPYING.  If not, write to the Free
 306.153 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 306.154 ++// USA.
 306.155 ++
 306.156 ++// As a special exception, you may use this file as part of a free software
 306.157 ++// library without restriction.  Specifically, if other files instantiate
 306.158 ++// templates or use macros or inline functions from this file, or you compile
 306.159 ++// this file and link it with other files to produce an executable, this
 306.160 ++// file does not by itself cause the resulting executable to be covered by
 306.161 ++// the GNU General Public License.  This exception does not however
 306.162 ++// invalidate any other reasons why the executable file might be covered by
 306.163 ++// the GNU General Public License.
 306.164 ++
 306.165 ++//
 306.166 ++// ISO C++ 14882: 22.8  Standard locale categories.
 306.167 ++//
 306.168 ++
 306.169 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 306.170 ++
 306.171 ++#include <cerrno>  // For errno
 306.172 ++#include <locale>
 306.173 ++#include <stdexcept>
 306.174 ++#include <langinfo.h>
 306.175 ++#include <bits/c++locale_internal.h>
 306.176 ++
 306.177 ++#ifndef __UCLIBC_HAS_XLOCALE__
 306.178 ++#define __strtol_l(S, E, B, L)      strtol((S), (E), (B))
 306.179 ++#define __strtoul_l(S, E, B, L)     strtoul((S), (E), (B))
 306.180 ++#define __strtoll_l(S, E, B, L)     strtoll((S), (E), (B))
 306.181 ++#define __strtoull_l(S, E, B, L)    strtoull((S), (E), (B))
 306.182 ++#define __strtof_l(S, E, L)         strtof((S), (E))
 306.183 ++#define __strtod_l(S, E, L)         strtod((S), (E))
 306.184 ++#define __strtold_l(S, E, L)        strtold((S), (E))
 306.185 ++#warning should dummy __newlocale check for C|POSIX ?
 306.186 ++#define __newlocale(a, b, c)        NULL
 306.187 ++#define __freelocale(a)             ((void)0)
 306.188 ++#define __duplocale(a)              __c_locale()
 306.189 ++#endif
 306.190 ++
 306.191 ++namespace std 
 306.192 ++{
 306.193 ++  template<>
 306.194 ++    void
 306.195 ++    __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, 
 306.196 ++		   const __c_locale& __cloc)
 306.197 ++    {
 306.198 ++      char* __sanity;
 306.199 ++      errno = 0;
 306.200 ++      float __f = __strtof_l(__s, &__sanity, __cloc);
 306.201 ++      if (__sanity != __s && errno != ERANGE)
 306.202 ++	__v = __f;
 306.203 ++      else
 306.204 ++	__err |= ios_base::failbit;
 306.205 ++    }
 306.206 ++
 306.207 ++  template<>
 306.208 ++    void
 306.209 ++    __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, 
 306.210 ++		   const __c_locale& __cloc)
 306.211 ++    {
 306.212 ++      char* __sanity;
 306.213 ++      errno = 0;
 306.214 ++      double __d = __strtod_l(__s, &__sanity, __cloc);
 306.215 ++      if (__sanity != __s && errno != ERANGE)
 306.216 ++	__v = __d;
 306.217 ++      else
 306.218 ++	__err |= ios_base::failbit;
 306.219 ++    }
 306.220 ++
 306.221 ++  template<>
 306.222 ++    void
 306.223 ++    __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
 306.224 ++		   const __c_locale& __cloc)
 306.225 ++    {
 306.226 ++      char* __sanity;
 306.227 ++      errno = 0;
 306.228 ++      long double __ld = __strtold_l(__s, &__sanity, __cloc);
 306.229 ++      if (__sanity != __s && errno != ERANGE)
 306.230 ++	__v = __ld;
 306.231 ++      else
 306.232 ++	__err |= ios_base::failbit;
 306.233 ++    }
 306.234 ++
 306.235 ++  void
 306.236 ++  locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, 
 306.237 ++				    __c_locale __old)
 306.238 ++  {
 306.239 ++    __cloc = __newlocale(1 << LC_ALL, __s, __old);
 306.240 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.241 ++    if (!__cloc)
 306.242 ++      {
 306.243 ++	// This named locale is not supported by the underlying OS.
 306.244 ++	__throw_runtime_error(__N("locale::facet::_S_create_c_locale "
 306.245 ++			      "name not valid"));
 306.246 ++      }
 306.247 ++#endif
 306.248 ++  }
 306.249 ++  
 306.250 ++  void
 306.251 ++  locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
 306.252 ++  {
 306.253 ++    if (__cloc && _S_get_c_locale() != __cloc)
 306.254 ++      __freelocale(__cloc); 
 306.255 ++  }
 306.256 ++
 306.257 ++  __c_locale
 306.258 ++  locale::facet::_S_clone_c_locale(__c_locale& __cloc)
 306.259 ++  { return __duplocale(__cloc); }
 306.260 ++} // namespace std
 306.261 ++
 306.262 ++namespace __gnu_cxx
 306.263 ++{
 306.264 ++  const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
 306.265 ++    {
 306.266 ++      "LC_CTYPE", 
 306.267 ++      "LC_NUMERIC",
 306.268 ++      "LC_TIME", 
 306.269 ++      "LC_COLLATE", 
 306.270 ++      "LC_MONETARY",
 306.271 ++      "LC_MESSAGES", 
 306.272 ++#if _GLIBCXX_NUM_CATEGORIES != 0
 306.273 ++      "LC_PAPER", 
 306.274 ++      "LC_NAME", 
 306.275 ++      "LC_ADDRESS",
 306.276 ++      "LC_TELEPHONE", 
 306.277 ++      "LC_MEASUREMENT", 
 306.278 ++      "LC_IDENTIFICATION" 
 306.279 ++#endif
 306.280 ++    };
 306.281 ++}
 306.282 ++
 306.283 ++namespace std
 306.284 ++{
 306.285 ++  const char* const* const locale::_S_categories = __gnu_cxx::category_names;
 306.286 ++}  // namespace std
 306.287 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h
 306.288 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h
 306.289 +@@ -0,0 +1,117 @@
 306.290 ++// Wrapper for underlying C-language localization -*- C++ -*-
 306.291 ++
 306.292 ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 306.293 ++//
 306.294 ++// This file is part of the GNU ISO C++ Library.  This library is free
 306.295 ++// software; you can redistribute it and/or modify it under the
 306.296 ++// terms of the GNU General Public License as published by the
 306.297 ++// Free Software Foundation; either version 2, or (at your option)
 306.298 ++// any later version.
 306.299 ++
 306.300 ++// This library is distributed in the hope that it will be useful,
 306.301 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 306.302 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 306.303 ++// GNU General Public License for more details.
 306.304 ++
 306.305 ++// You should have received a copy of the GNU General Public License along
 306.306 ++// with this library; see the file COPYING.  If not, write to the Free
 306.307 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 306.308 ++// USA.
 306.309 ++
 306.310 ++// As a special exception, you may use this file as part of a free software
 306.311 ++// library without restriction.  Specifically, if other files instantiate
 306.312 ++// templates or use macros or inline functions from this file, or you compile
 306.313 ++// this file and link it with other files to produce an executable, this
 306.314 ++// file does not by itself cause the resulting executable to be covered by
 306.315 ++// the GNU General Public License.  This exception does not however
 306.316 ++// invalidate any other reasons why the executable file might be covered by
 306.317 ++// the GNU General Public License.
 306.318 ++
 306.319 ++//
 306.320 ++// ISO C++ 14882: 22.8  Standard locale categories.
 306.321 ++//
 306.322 ++
 306.323 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 306.324 ++
 306.325 ++#ifndef _C_LOCALE_H
 306.326 ++#define _C_LOCALE_H 1
 306.327 ++
 306.328 ++#pragma GCC system_header
 306.329 ++
 306.330 ++#include <cstring>              // get std::strlen
 306.331 ++#include <cstdio>               // get std::snprintf or std::sprintf
 306.332 ++#include <clocale>
 306.333 ++#include <langinfo.h>		// For codecvt
 306.334 ++#ifdef __UCLIBC_MJN3_ONLY__
 306.335 ++#warning fix this
 306.336 ++#endif
 306.337 ++#ifdef __UCLIBC_HAS_LOCALE__
 306.338 ++#include <iconv.h>		// For codecvt using iconv, iconv_t
 306.339 ++#endif
 306.340 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
 306.341 ++#include <libintl.h> 		// For messages
 306.342 ++#endif
 306.343 ++
 306.344 ++#ifdef __UCLIBC_MJN3_ONLY__
 306.345 ++#warning what is _GLIBCXX_C_LOCALE_GNU for
 306.346 ++#endif
 306.347 ++#define _GLIBCXX_C_LOCALE_GNU 1
 306.348 ++
 306.349 ++#ifdef __UCLIBC_MJN3_ONLY__
 306.350 ++#warning fix categories
 306.351 ++#endif
 306.352 ++// #define _GLIBCXX_NUM_CATEGORIES 6
 306.353 ++#define _GLIBCXX_NUM_CATEGORIES 0
 306.354 ++ 
 306.355 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.356 ++namespace __gnu_cxx
 306.357 ++{
 306.358 ++  extern "C" __typeof(uselocale) __uselocale;
 306.359 ++}
 306.360 ++#endif
 306.361 ++
 306.362 ++namespace std
 306.363 ++{
 306.364 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.365 ++  typedef __locale_t		__c_locale;
 306.366 ++#else
 306.367 ++  typedef int*			__c_locale;
 306.368 ++#endif
 306.369 ++
 306.370 ++  // Convert numeric value of type _Tv to string and return length of
 306.371 ++  // string.  If snprintf is available use it, otherwise fall back to
 306.372 ++  // the unsafe sprintf which, in general, can be dangerous and should
 306.373 ++  // be avoided.
 306.374 ++  template<typename _Tv>
 306.375 ++    int
 306.376 ++    __convert_from_v(char* __out, 
 306.377 ++		     const int __size __attribute__ ((__unused__)),
 306.378 ++		     const char* __fmt,
 306.379 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.380 ++		     _Tv __v, const __c_locale& __cloc, int __prec)
 306.381 ++    {
 306.382 ++      __c_locale __old = __gnu_cxx::__uselocale(__cloc);
 306.383 ++#else
 306.384 ++		     _Tv __v, const __c_locale&, int __prec)
 306.385 ++    {
 306.386 ++# ifdef __UCLIBC_HAS_LOCALE__
 306.387 ++      char* __old = std::setlocale(LC_ALL, NULL);
 306.388 ++      char* __sav = new char[std::strlen(__old) + 1];
 306.389 ++      std::strcpy(__sav, __old);
 306.390 ++      std::setlocale(LC_ALL, "C");
 306.391 ++# endif
 306.392 ++#endif
 306.393 ++
 306.394 ++      const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
 306.395 ++
 306.396 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.397 ++      __gnu_cxx::__uselocale(__old);
 306.398 ++#elif defined __UCLIBC_HAS_LOCALE__
 306.399 ++      std::setlocale(LC_ALL, __sav);
 306.400 ++      delete [] __sav;
 306.401 ++#endif
 306.402 ++      return __ret;
 306.403 ++    }
 306.404 ++}
 306.405 ++
 306.406 ++#endif
 306.407 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
 306.408 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
 306.409 +@@ -0,0 +1,306 @@
 306.410 ++// std::codecvt implementation details, GNU version -*- C++ -*-
 306.411 ++
 306.412 ++// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 306.413 ++//
 306.414 ++// This file is part of the GNU ISO C++ Library.  This library is free
 306.415 ++// software; you can redistribute it and/or modify it under the
 306.416 ++// terms of the GNU General Public License as published by the
 306.417 ++// Free Software Foundation; either version 2, or (at your option)
 306.418 ++// any later version.
 306.419 ++
 306.420 ++// This library is distributed in the hope that it will be useful,
 306.421 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 306.422 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 306.423 ++// GNU General Public License for more details.
 306.424 ++
 306.425 ++// You should have received a copy of the GNU General Public License along
 306.426 ++// with this library; see the file COPYING.  If not, write to the Free
 306.427 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 306.428 ++// USA.
 306.429 ++
 306.430 ++// As a special exception, you may use this file as part of a free software
 306.431 ++// library without restriction.  Specifically, if other files instantiate
 306.432 ++// templates or use macros or inline functions from this file, or you compile
 306.433 ++// this file and link it with other files to produce an executable, this
 306.434 ++// file does not by itself cause the resulting executable to be covered by
 306.435 ++// the GNU General Public License.  This exception does not however
 306.436 ++// invalidate any other reasons why the executable file might be covered by
 306.437 ++// the GNU General Public License.
 306.438 ++
 306.439 ++//
 306.440 ++// ISO C++ 14882: 22.2.1.5 - Template class codecvt
 306.441 ++//
 306.442 ++
 306.443 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 306.444 ++
 306.445 ++#include <locale>
 306.446 ++#include <bits/c++locale_internal.h>
 306.447 ++
 306.448 ++namespace std
 306.449 ++{
 306.450 ++  // Specializations.
 306.451 ++#ifdef _GLIBCXX_USE_WCHAR_T
 306.452 ++  codecvt_base::result
 306.453 ++  codecvt<wchar_t, char, mbstate_t>::
 306.454 ++  do_out(state_type& __state, const intern_type* __from, 
 306.455 ++	 const intern_type* __from_end, const intern_type*& __from_next,
 306.456 ++	 extern_type* __to, extern_type* __to_end,
 306.457 ++	 extern_type*& __to_next) const
 306.458 ++  {
 306.459 ++    result __ret = ok;
 306.460 ++    state_type __tmp_state(__state);
 306.461 ++
 306.462 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.463 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 306.464 ++#endif
 306.465 ++
 306.466 ++    // wcsnrtombs is *very* fast but stops if encounters NUL characters:
 306.467 ++    // in case we fall back to wcrtomb and then continue, in a loop.
 306.468 ++    // NB: wcsnrtombs is a GNU extension
 306.469 ++    for (__from_next = __from, __to_next = __to;
 306.470 ++	 __from_next < __from_end && __to_next < __to_end
 306.471 ++	 && __ret == ok;)
 306.472 ++      {
 306.473 ++	const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
 306.474 ++						      __from_end - __from_next);
 306.475 ++	if (!__from_chunk_end)
 306.476 ++	  __from_chunk_end = __from_end;
 306.477 ++
 306.478 ++	__from = __from_next;
 306.479 ++	const size_t __conv = wcsnrtombs(__to_next, &__from_next,
 306.480 ++					 __from_chunk_end - __from_next,
 306.481 ++					 __to_end - __to_next, &__state);
 306.482 ++	if (__conv == static_cast<size_t>(-1))
 306.483 ++	  {
 306.484 ++	    // In case of error, in order to stop at the exact place we
 306.485 ++	    // have to start again from the beginning with a series of
 306.486 ++	    // wcrtomb.
 306.487 ++	    for (; __from < __from_next; ++__from)
 306.488 ++	      __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
 306.489 ++	    __state = __tmp_state;
 306.490 ++	    __ret = error;
 306.491 ++	  }
 306.492 ++	else if (__from_next && __from_next < __from_chunk_end)
 306.493 ++	  {
 306.494 ++	    __to_next += __conv;
 306.495 ++	    __ret = partial;
 306.496 ++	  }
 306.497 ++	else
 306.498 ++	  {
 306.499 ++	    __from_next = __from_chunk_end;
 306.500 ++	    __to_next += __conv;
 306.501 ++	  }
 306.502 ++
 306.503 ++	if (__from_next < __from_end && __ret == ok)
 306.504 ++	  {
 306.505 ++	    extern_type __buf[MB_LEN_MAX];
 306.506 ++	    __tmp_state = __state;
 306.507 ++	    const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
 306.508 ++	    if (__conv > static_cast<size_t>(__to_end - __to_next))
 306.509 ++	      __ret = partial;
 306.510 ++	    else
 306.511 ++	      {
 306.512 ++		memcpy(__to_next, __buf, __conv);
 306.513 ++		__state = __tmp_state;
 306.514 ++		__to_next += __conv;
 306.515 ++		++__from_next;
 306.516 ++	      }
 306.517 ++	  }
 306.518 ++      }
 306.519 ++
 306.520 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.521 ++    __uselocale(__old);
 306.522 ++#endif
 306.523 ++
 306.524 ++    return __ret; 
 306.525 ++  }
 306.526 ++  
 306.527 ++  codecvt_base::result
 306.528 ++  codecvt<wchar_t, char, mbstate_t>::
 306.529 ++  do_in(state_type& __state, const extern_type* __from, 
 306.530 ++	const extern_type* __from_end, const extern_type*& __from_next,
 306.531 ++	intern_type* __to, intern_type* __to_end,
 306.532 ++	intern_type*& __to_next) const
 306.533 ++  {
 306.534 ++    result __ret = ok;
 306.535 ++    state_type __tmp_state(__state);
 306.536 ++
 306.537 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.538 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 306.539 ++#endif
 306.540 ++
 306.541 ++    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
 306.542 ++    // in case we store a L'\0' and then continue, in a loop.
 306.543 ++    // NB: mbsnrtowcs is a GNU extension
 306.544 ++    for (__from_next = __from, __to_next = __to;
 306.545 ++	 __from_next < __from_end && __to_next < __to_end
 306.546 ++	 && __ret == ok;)
 306.547 ++      {
 306.548 ++	const extern_type* __from_chunk_end;
 306.549 ++	__from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
 306.550 ++								  __from_end
 306.551 ++								  - __from_next));
 306.552 ++	if (!__from_chunk_end)
 306.553 ++	  __from_chunk_end = __from_end;
 306.554 ++
 306.555 ++	__from = __from_next;
 306.556 ++	size_t __conv = mbsnrtowcs(__to_next, &__from_next,
 306.557 ++				   __from_chunk_end - __from_next,
 306.558 ++				   __to_end - __to_next, &__state);
 306.559 ++	if (__conv == static_cast<size_t>(-1))
 306.560 ++	  {
 306.561 ++	    // In case of error, in order to stop at the exact place we
 306.562 ++	    // have to start again from the beginning with a series of
 306.563 ++	    // mbrtowc.
 306.564 ++	    for (;; ++__to_next, __from += __conv)
 306.565 ++	      {
 306.566 ++		__conv = mbrtowc(__to_next, __from, __from_end - __from,
 306.567 ++				 &__tmp_state);
 306.568 ++		if (__conv == static_cast<size_t>(-1)
 306.569 ++		    || __conv == static_cast<size_t>(-2))
 306.570 ++		  break;
 306.571 ++	      }
 306.572 ++	    __from_next = __from;
 306.573 ++	    __state = __tmp_state;	    
 306.574 ++	    __ret = error;
 306.575 ++	  }
 306.576 ++	else if (__from_next && __from_next < __from_chunk_end)
 306.577 ++	  {
 306.578 ++	    // It is unclear what to return in this case (see DR 382). 
 306.579 ++	    __to_next += __conv;
 306.580 ++	    __ret = partial;
 306.581 ++	  }
 306.582 ++	else
 306.583 ++	  {
 306.584 ++	    __from_next = __from_chunk_end;
 306.585 ++	    __to_next += __conv;
 306.586 ++	  }
 306.587 ++
 306.588 ++	if (__from_next < __from_end && __ret == ok)
 306.589 ++	  {
 306.590 ++	    if (__to_next < __to_end)
 306.591 ++	      {
 306.592 ++		// XXX Probably wrong for stateful encodings
 306.593 ++		__tmp_state = __state;		
 306.594 ++		++__from_next;
 306.595 ++		*__to_next++ = L'\0';
 306.596 ++	      }
 306.597 ++	    else
 306.598 ++	      __ret = partial;
 306.599 ++	  }
 306.600 ++      }
 306.601 ++
 306.602 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.603 ++    __uselocale(__old);
 306.604 ++#endif
 306.605 ++
 306.606 ++    return __ret; 
 306.607 ++  }
 306.608 ++
 306.609 ++  int 
 306.610 ++  codecvt<wchar_t, char, mbstate_t>::
 306.611 ++  do_encoding() const throw()
 306.612 ++  {
 306.613 ++    // XXX This implementation assumes that the encoding is
 306.614 ++    // stateless and is either single-byte or variable-width.
 306.615 ++    int __ret = 0;
 306.616 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.617 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 306.618 ++#endif
 306.619 ++    if (MB_CUR_MAX == 1)
 306.620 ++      __ret = 1;
 306.621 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.622 ++    __uselocale(__old);
 306.623 ++#endif
 306.624 ++    return __ret;
 306.625 ++  }  
 306.626 ++
 306.627 ++  int 
 306.628 ++  codecvt<wchar_t, char, mbstate_t>::
 306.629 ++  do_max_length() const throw()
 306.630 ++  {
 306.631 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.632 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 306.633 ++#endif
 306.634 ++    // XXX Probably wrong for stateful encodings.
 306.635 ++    int __ret = MB_CUR_MAX;
 306.636 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.637 ++    __uselocale(__old);
 306.638 ++#endif
 306.639 ++    return __ret;
 306.640 ++  }
 306.641 ++  
 306.642 ++  int 
 306.643 ++  codecvt<wchar_t, char, mbstate_t>::
 306.644 ++  do_length(state_type& __state, const extern_type* __from,
 306.645 ++	    const extern_type* __end, size_t __max) const
 306.646 ++  {
 306.647 ++    int __ret = 0;
 306.648 ++    state_type __tmp_state(__state);
 306.649 ++
 306.650 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.651 ++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
 306.652 ++#endif
 306.653 ++
 306.654 ++    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
 306.655 ++    // in case we advance past it and then continue, in a loop.
 306.656 ++    // NB: mbsnrtowcs is a GNU extension
 306.657 ++  
 306.658 ++    // A dummy internal buffer is needed in order for mbsnrtocws to consider
 306.659 ++    // its fourth parameter (it wouldn't with NULL as first parameter).
 306.660 ++    wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) 
 306.661 ++							   * __max));
 306.662 ++    while (__from < __end && __max)
 306.663 ++      {
 306.664 ++	const extern_type* __from_chunk_end;
 306.665 ++	__from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
 306.666 ++								  __end
 306.667 ++								  - __from));
 306.668 ++	if (!__from_chunk_end)
 306.669 ++	  __from_chunk_end = __end;
 306.670 ++
 306.671 ++	const extern_type* __tmp_from = __from;
 306.672 ++	size_t __conv = mbsnrtowcs(__to, &__from,
 306.673 ++				   __from_chunk_end - __from,
 306.674 ++				   __max, &__state);
 306.675 ++	if (__conv == static_cast<size_t>(-1))
 306.676 ++	  {
 306.677 ++	    // In case of error, in order to stop at the exact place we
 306.678 ++	    // have to start again from the beginning with a series of
 306.679 ++	    // mbrtowc.
 306.680 ++	    for (__from = __tmp_from;; __from += __conv)
 306.681 ++	      {
 306.682 ++		__conv = mbrtowc(NULL, __from, __end - __from,
 306.683 ++				 &__tmp_state);
 306.684 ++		if (__conv == static_cast<size_t>(-1)
 306.685 ++		    || __conv == static_cast<size_t>(-2))
 306.686 ++		  break;
 306.687 ++	      }
 306.688 ++	    __state = __tmp_state;
 306.689 ++	    __ret += __from - __tmp_from;
 306.690 ++	    break;
 306.691 ++	  }
 306.692 ++	if (!__from)
 306.693 ++	  __from = __from_chunk_end;
 306.694 ++	
 306.695 ++	__ret += __from - __tmp_from;
 306.696 ++	__max -= __conv;
 306.697 ++
 306.698 ++	if (__from < __end && __max)
 306.699 ++	  {
 306.700 ++	    // XXX Probably wrong for stateful encodings
 306.701 ++	    __tmp_state = __state;
 306.702 ++	    ++__from;
 306.703 ++	    ++__ret;
 306.704 ++	    --__max;
 306.705 ++	  }
 306.706 ++      }
 306.707 ++
 306.708 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.709 ++    __uselocale(__old);
 306.710 ++#endif
 306.711 ++
 306.712 ++    return __ret; 
 306.713 ++  }
 306.714 ++#endif
 306.715 ++}
 306.716 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc
 306.717 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc
 306.718 +@@ -0,0 +1,80 @@
 306.719 ++// std::collate implementation details, GNU version -*- C++ -*-
 306.720 ++
 306.721 ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
 306.722 ++//
 306.723 ++// This file is part of the GNU ISO C++ Library.  This library is free
 306.724 ++// software; you can redistribute it and/or modify it under the
 306.725 ++// terms of the GNU General Public License as published by the
 306.726 ++// Free Software Foundation; either version 2, or (at your option)
 306.727 ++// any later version.
 306.728 ++
 306.729 ++// This library is distributed in the hope that it will be useful,
 306.730 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 306.731 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 306.732 ++// GNU General Public License for more details.
 306.733 ++
 306.734 ++// You should have received a copy of the GNU General Public License along
 306.735 ++// with this library; see the file COPYING.  If not, write to the Free
 306.736 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 306.737 ++// USA.
 306.738 ++
 306.739 ++// As a special exception, you may use this file as part of a free software
 306.740 ++// library without restriction.  Specifically, if other files instantiate
 306.741 ++// templates or use macros or inline functions from this file, or you compile
 306.742 ++// this file and link it with other files to produce an executable, this
 306.743 ++// file does not by itself cause the resulting executable to be covered by
 306.744 ++// the GNU General Public License.  This exception does not however
 306.745 ++// invalidate any other reasons why the executable file might be covered by
 306.746 ++// the GNU General Public License.
 306.747 ++
 306.748 ++//
 306.749 ++// ISO C++ 14882: 22.2.4.1.2  collate virtual functions
 306.750 ++//
 306.751 ++
 306.752 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 306.753 ++
 306.754 ++#include <locale>
 306.755 ++#include <bits/c++locale_internal.h>
 306.756 ++
 306.757 ++#ifndef __UCLIBC_HAS_XLOCALE__
 306.758 ++#define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
 306.759 ++#define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
 306.760 ++#define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
 306.761 ++#define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
 306.762 ++#endif
 306.763 ++
 306.764 ++namespace std
 306.765 ++{
 306.766 ++  // These are basically extensions to char_traits, and perhaps should
 306.767 ++  // be put there instead of here.
 306.768 ++  template<>
 306.769 ++    int 
 306.770 ++    collate<char>::_M_compare(const char* __one, const char* __two) const
 306.771 ++    { 
 306.772 ++      int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
 306.773 ++      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
 306.774 ++    }
 306.775 ++  
 306.776 ++  template<>
 306.777 ++    size_t
 306.778 ++    collate<char>::_M_transform(char* __to, const char* __from, 
 306.779 ++				size_t __n) const 
 306.780 ++    { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
 306.781 ++
 306.782 ++#ifdef _GLIBCXX_USE_WCHAR_T
 306.783 ++  template<>
 306.784 ++    int 
 306.785 ++    collate<wchar_t>::_M_compare(const wchar_t* __one, 
 306.786 ++				 const wchar_t* __two) const
 306.787 ++    {
 306.788 ++      int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
 306.789 ++      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
 306.790 ++    }
 306.791 ++  
 306.792 ++  template<>
 306.793 ++    size_t
 306.794 ++    collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
 306.795 ++				   size_t __n) const
 306.796 ++    { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
 306.797 ++#endif
 306.798 ++}
 306.799 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc
 306.800 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
 306.801 +@@ -0,0 +1,314 @@
 306.802 ++// std::ctype implementation details, GNU version -*- C++ -*-
 306.803 ++
 306.804 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 306.805 ++//
 306.806 ++// This file is part of the GNU ISO C++ Library.  This library is free
 306.807 ++// software; you can redistribute it and/or modify it under the
 306.808 ++// terms of the GNU General Public License as published by the
 306.809 ++// Free Software Foundation; either version 2, or (at your option)
 306.810 ++// any later version.
 306.811 ++
 306.812 ++// This library is distributed in the hope that it will be useful,
 306.813 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
 306.814 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 306.815 ++// GNU General Public License for more details.
 306.816 ++
 306.817 ++// You should have received a copy of the GNU General Public License along
 306.818 ++// with this library; see the file COPYING.  If not, write to the Free
 306.819 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 306.820 ++// USA.
 306.821 ++
 306.822 ++// As a special exception, you may use this file as part of a free software
 306.823 ++// library without restriction.  Specifically, if other files instantiate
 306.824 ++// templates or use macros or inline functions from this file, or you compile
 306.825 ++// this file and link it with other files to produce an executable, this
 306.826 ++// file does not by itself cause the resulting executable to be covered by
 306.827 ++// the GNU General Public License.  This exception does not however
 306.828 ++// invalidate any other reasons why the executable file might be covered by
 306.829 ++// the GNU General Public License.
 306.830 ++
 306.831 ++//
 306.832 ++// ISO C++ 14882: 22.2.1.1.2  ctype virtual functions.
 306.833 ++//
 306.834 ++
 306.835 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
 306.836 ++
 306.837 ++#define _LIBC
 306.838 ++#include <locale>
 306.839 ++#undef _LIBC
 306.840 ++#include <bits/c++locale_internal.h>
 306.841 ++
 306.842 ++#ifndef __UCLIBC_HAS_XLOCALE__
 306.843 ++#define __wctype_l(S, L)           wctype((S))
 306.844 ++#define __towupper_l(C, L)         towupper((C))
 306.845 ++#define __towlower_l(C, L)         towlower((C))
 306.846 ++#define __iswctype_l(C, M, L)      iswctype((C), (M))
 306.847 ++#endif
 306.848 ++
 306.849 ++namespace std
 306.850 ++{
 306.851 ++  // NB: The other ctype<char> specializations are in src/locale.cc and
 306.852 ++  // various /config/os/* files.
 306.853 ++  template<>
 306.854 ++    ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
 306.855 ++    : ctype<char>(0, false, __refs) 
 306.856 ++    { 		
 306.857 ++      if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
 306.858 ++	{
 306.859 ++	  this->_S_destroy_c_locale(this->_M_c_locale_ctype);
 306.860 ++	  this->_S_create_c_locale(this->_M_c_locale_ctype, __s); 
 306.861 ++#ifdef __UCLIBC_HAS_XLOCALE__
 306.862 ++	  this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
 306.863 ++	  this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
 306.864 ++	  this->_M_table = this->_M_c_locale_ctype->__ctype_b;
 306.865 ++#endif
 306.866 ++	}
 306.867 ++    }
 306.868 ++
 306.869 ++#ifdef _GLIBCXX_USE_WCHAR_T  
 306.870 ++  ctype<wchar_t>::__wmask_type
 306.871 ++  ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
 306.872 ++  {
 306.873 ++    __wmask_type __ret;
 306.874 ++    switch (__m)
 306.875 ++      {
 306.876 ++      case space:
 306.877 ++	__ret = __wctype_l("space", _M_c_locale_ctype);
 306.878 ++	break;
 306.879 ++      case print:
 306.880 ++	__ret = __wctype_l("print", _M_c_locale_ctype);
 306.881 ++	break;
 306.882 ++      case cntrl:
 306.883 ++	__ret = __wctype_l("cntrl", _M_c_locale_ctype);
 306.884 ++	break;
 306.885 ++      case upper:
 306.886 ++	__ret = __wctype_l("upper", _M_c_locale_ctype);
 306.887 ++	break;
 306.888 ++      case lower:
 306.889 ++	__ret = __wctype_l("lower", _M_c_locale_ctype);
 306.890 ++	break;
 306.891 ++      case alpha:
 306.892 ++	__ret = __wctype_l("alpha", _M_c_locale_ctype);
 306.893 ++	break;
 306.894 ++      case digit:
 306.895 ++	__ret = __wctype_l("digit", _M_c_locale_ctype);
 306.896 ++	break;
 306.897 ++      case punct:
 306.898 ++	__ret = __wctype_l("punct", _M_c_locale_ctype);
 306.899 ++	break;
 306.900 ++      case xdigit:
 306.901 ++	__ret = __wctype_l("xdigit", _M_c_locale_ctype);
 306.902 ++	break;
 306.903 ++      case alnum:
 306.904 ++	__ret = __wctype_l("alnum", _M_c_locale_ctype);
 306.905 ++	break;
 306.906 ++      case graph:
 306.907 ++	__ret = __wctype_l("graph", _M_c_locale_ctype);
 306.908 ++	break;
 306.909 ++      default:
 306.910 ++	__ret = __wmask_type();
 306.911 ++      }
 306.912 ++    return __ret;
 306.913 ++  }
 306.914 ++  
 306.915 ++  wchar_t
 306.916 ++  ctype<wchar_t>::do_toupper(wchar_t __c) const
 306.917 ++  { return __towupper_l(__c, _M_c_locale_ctype); }
 306.918 ++
 306.919 ++  const wchar_t*
 306.920 ++  ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
 306.921 ++  {
 306.922 ++    while (__lo < __hi)
 306.923 ++      {
 306.924 ++        *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
 306.925 ++        ++__lo;
 306.926 ++      }
 306.927 ++    return __hi;
 306.928 ++  }
 306.929 ++  
 306.930 ++  wchar_t
 306.931 ++  ctype<wchar_t>::do_tolower(wchar_t __c) const
 306.932 ++  { return __towlower_l(__c, _M_c_locale_ctype); }
 306.933 ++  
 306.934 ++  const wchar_t*
 306.935 ++  ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
 306.936 ++  {
 306.937 ++    while (__lo < __hi)
 306.938 ++      {
 306.939 ++        *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
 306.940 ++        ++__lo;
 306.941 ++      }
 306.942 ++    return __hi;
 306.943 ++  }
 306.944 ++
 306.945 ++  bool
 306.946 ++  ctype<wchar_t>::
 306.947 ++  do_is(mask __m, wchar_t __c) const
 306.948 ++  { 
 306.949 ++    // The case of __m == ctype_base::space is particularly important,
 306.950 ++    // due to its use in many istream functions.  Therefore we deal with
 306.951 ++    // it first, exploiting the knowledge that on GNU systems _M_bit[5]
 306.952 ++    // is the mask corresponding to ctype_base::space.  NB: an encoding
 306.953 ++    // change would not affect correctness!
 306.954 ++    bool __ret = false;
 306.955 ++    if (__m == _M_bit[5])
 306.956 ++      __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
 306.957 ++    else
 306.958 ++      {
 306.959 ++	// Highest bitmask in ctype_base == 10, but extra in "C"
 306.960 ++	// library for blank.
 306.961 ++	const size_t __bitmasksize = 11;
 306.962 ++	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
 306.963 ++	  if (__m & _M_bit[__bitcur])
 306.964 ++	    {
 306.965 ++	      if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
 306.966 ++		{
 306.967 ++		  __ret = true;
 306.968 ++		  break;
 306.969 ++		}
 306.970 ++	      else if (__m == _M_bit[__bitcur])
 306.971 ++		break;
 306.972 ++	    }
 306.973 ++      }
 306.974 ++    return __ret;    
 306.975 ++  }
 306.976 ++
 306.977 ++  const wchar_t* 
 306.978 ++  ctype<wchar_t>::
 306.979 ++  do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
 306.980 ++  {
 306.981 ++    for (; __lo < __hi; ++__vec, ++__lo)
 306.982 ++      {
 306.983 ++	// Highest bitmask in ctype_base == 10, but extra in "C"
 306.984 ++	// library for blank.
 306.985 ++	const size_t __bitmasksize = 11; 
 306.986 ++	mask __m = 0;
 306.987 ++	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
 306.988 ++	  if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
 306.989 ++	    __m |= _M_bit[__bitcur];
 306.990 ++	*__vec = __m;
 306.991 ++      }
 306.992 ++    return __hi;
 306.993 ++  }
 306.994 ++  
 306.995 ++  const wchar_t* 
 306.996 ++  ctype<wchar_t>::
 306.997 ++  do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
 306.998 ++  {
 306.999 ++    while (__lo < __hi && !this->do_is(__m, *__lo))
306.1000 ++      ++__lo;
306.1001 ++    return __lo;
306.1002 ++  }
306.1003 ++
306.1004 ++  const wchar_t*
306.1005 ++  ctype<wchar_t>::
306.1006 ++  do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
306.1007 ++  {
306.1008 ++    while (__lo < __hi && this->do_is(__m, *__lo) != 0)
306.1009 ++      ++__lo;
306.1010 ++    return __lo;
306.1011 ++  }
306.1012 ++
306.1013 ++  wchar_t
306.1014 ++  ctype<wchar_t>::
306.1015 ++  do_widen(char __c) const
306.1016 ++  { return _M_widen[static_cast<unsigned char>(__c)]; }
306.1017 ++
306.1018 ++  const char* 
306.1019 ++  ctype<wchar_t>::
306.1020 ++  do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
306.1021 ++  {
306.1022 ++    while (__lo < __hi)
306.1023 ++      {
306.1024 ++	*__dest = _M_widen[static_cast<unsigned char>(*__lo)];
306.1025 ++	++__lo;
306.1026 ++	++__dest;
306.1027 ++      }
306.1028 ++    return __hi;
306.1029 ++  }
306.1030 ++
306.1031 ++  char
306.1032 ++  ctype<wchar_t>::
306.1033 ++  do_narrow(wchar_t __wc, char __dfault) const
306.1034 ++  {
306.1035 ++    if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
306.1036 ++      return _M_narrow[__wc];
306.1037 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.1038 ++    __c_locale __old = __uselocale(_M_c_locale_ctype);
306.1039 ++#endif
306.1040 ++    const int __c = wctob(__wc);
306.1041 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.1042 ++    __uselocale(__old);
306.1043 ++#endif
306.1044 ++    return (__c == EOF ? __dfault : static_cast<char>(__c)); 
306.1045 ++  }
306.1046 ++
306.1047 ++  const wchar_t*
306.1048 ++  ctype<wchar_t>::
306.1049 ++  do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, 
306.1050 ++	    char* __dest) const
306.1051 ++  {
306.1052 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.1053 ++    __c_locale __old = __uselocale(_M_c_locale_ctype);
306.1054 ++#endif
306.1055 ++    if (_M_narrow_ok)
306.1056 ++      while (__lo < __hi)
306.1057 ++	{
306.1058 ++	  if (*__lo >= 0 && *__lo < 128)
306.1059 ++	    *__dest = _M_narrow[*__lo];
306.1060 ++	  else
306.1061 ++	    {
306.1062 ++	      const int __c = wctob(*__lo);
306.1063 ++	      *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
306.1064 ++	    }
306.1065 ++	  ++__lo;
306.1066 ++	  ++__dest;
306.1067 ++	}
306.1068 ++    else
306.1069 ++      while (__lo < __hi)
306.1070 ++	{
306.1071 ++	  const int __c = wctob(*__lo);
306.1072 ++	  *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
306.1073 ++	  ++__lo;
306.1074 ++	  ++__dest;
306.1075 ++	}
306.1076 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.1077 ++    __uselocale(__old);
306.1078 ++#endif
306.1079 ++    return __hi;
306.1080 ++  }
306.1081 ++
306.1082 ++  void
306.1083 ++  ctype<wchar_t>::_M_initialize_ctype()
306.1084 ++  {
306.1085 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.1086 ++    __c_locale __old = __uselocale(_M_c_locale_ctype);
306.1087 ++#endif
306.1088 ++    wint_t __i;
306.1089 ++    for (__i = 0; __i < 128; ++__i)
306.1090 ++      {
306.1091 ++	const int __c = wctob(__i);
306.1092 ++	if (__c == EOF)
306.1093 ++	  break;
306.1094 ++	else
306.1095 ++	  _M_narrow[__i] = static_cast<char>(__c);
306.1096 ++      }
306.1097 ++    if (__i == 128)
306.1098 ++      _M_narrow_ok = true;
306.1099 ++    else
306.1100 ++      _M_narrow_ok = false;
306.1101 ++    for (size_t __j = 0;
306.1102 ++	 __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
306.1103 ++      _M_widen[__j] = btowc(__j);
306.1104 ++
306.1105 ++    for (size_t __k = 0; __k <= 11; ++__k)
306.1106 ++      { 
306.1107 ++	_M_bit[__k] = static_cast<mask>(_ISbit(__k));
306.1108 ++	_M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
306.1109 ++      }
306.1110 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.1111 ++    __uselocale(__old);
306.1112 ++#endif
306.1113 ++  }
306.1114 ++#endif //  _GLIBCXX_USE_WCHAR_T
306.1115 ++}
306.1116 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc
306.1117 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc
306.1118 +@@ -0,0 +1,100 @@
306.1119 ++// std::messages implementation details, GNU version -*- C++ -*-
306.1120 ++
306.1121 ++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
306.1122 ++//
306.1123 ++// This file is part of the GNU ISO C++ Library.  This library is free
306.1124 ++// software; you can redistribute it and/or modify it under the
306.1125 ++// terms of the GNU General Public License as published by the
306.1126 ++// Free Software Foundation; either version 2, or (at your option)
306.1127 ++// any later version.
306.1128 ++
306.1129 ++// This library is distributed in the hope that it will be useful,
306.1130 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
306.1131 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
306.1132 ++// GNU General Public License for more details.
306.1133 ++
306.1134 ++// You should have received a copy of the GNU General Public License along
306.1135 ++// with this library; see the file COPYING.  If not, write to the Free
306.1136 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
306.1137 ++// USA.
306.1138 ++
306.1139 ++// As a special exception, you may use this file as part of a free software
306.1140 ++// library without restriction.  Specifically, if other files instantiate
306.1141 ++// templates or use macros or inline functions from this file, or you compile
306.1142 ++// this file and link it with other files to produce an executable, this
306.1143 ++// file does not by itself cause the resulting executable to be covered by
306.1144 ++// the GNU General Public License.  This exception does not however
306.1145 ++// invalidate any other reasons why the executable file might be covered by
306.1146 ++// the GNU General Public License.
306.1147 ++
306.1148 ++//
306.1149 ++// ISO C++ 14882: 22.2.7.1.2  messages virtual functions
306.1150 ++//
306.1151 ++
306.1152 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
306.1153 ++
306.1154 ++#include <locale>
306.1155 ++#include <bits/c++locale_internal.h>
306.1156 ++
306.1157 ++#ifdef __UCLIBC_MJN3_ONLY__
306.1158 ++#warning fix gettext stuff
306.1159 ++#endif
306.1160 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
306.1161 ++extern "C" char *__dcgettext(const char *domainname,
306.1162 ++			     const char *msgid, int category);
306.1163 ++#undef gettext
306.1164 ++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
306.1165 ++#else
306.1166 ++#undef gettext
306.1167 ++#define gettext(msgid) (msgid)
306.1168 ++#endif
306.1169 ++
306.1170 ++namespace std
306.1171 ++{
306.1172 ++  // Specializations.
306.1173 ++  template<>
306.1174 ++    string
306.1175 ++    messages<char>::do_get(catalog, int, int, const string& __dfault) const
306.1176 ++    {
306.1177 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.1178 ++      __c_locale __old = __uselocale(_M_c_locale_messages);
306.1179 ++      const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
306.1180 ++      __uselocale(__old);
306.1181 ++      return string(__msg);
306.1182 ++#elif defined __UCLIBC_HAS_LOCALE__
306.1183 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
306.1184 ++      setlocale(LC_ALL, _M_name_messages);
306.1185 ++      const char* __msg = gettext(__dfault.c_str());
306.1186 ++      setlocale(LC_ALL, __old);
306.1187 ++      free(__old);
306.1188 ++      return string(__msg);
306.1189 ++#else
306.1190 ++      const char* __msg = gettext(__dfault.c_str());
306.1191 ++      return string(__msg);
306.1192 ++#endif
306.1193 ++    }
306.1194 ++
306.1195 ++#ifdef _GLIBCXX_USE_WCHAR_T
306.1196 ++  template<>
306.1197 ++    wstring
306.1198 ++    messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
306.1199 ++    {
306.1200 ++# ifdef __UCLIBC_HAS_XLOCALE__
306.1201 ++      __c_locale __old = __uselocale(_M_c_locale_messages);
306.1202 ++      char* __msg = gettext(_M_convert_to_char(__dfault));
306.1203 ++      __uselocale(__old);
306.1204 ++      return _M_convert_from_char(__msg);
306.1205 ++# elif defined __UCLIBC_HAS_LOCALE__
306.1206 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
306.1207 ++      setlocale(LC_ALL, _M_name_messages);
306.1208 ++      char* __msg = gettext(_M_convert_to_char(__dfault));
306.1209 ++      setlocale(LC_ALL, __old);
306.1210 ++      free(__old);
306.1211 ++      return _M_convert_from_char(__msg);
306.1212 ++# else
306.1213 ++      char* __msg = gettext(_M_convert_to_char(__dfault));
306.1214 ++      return _M_convert_from_char(__msg);
306.1215 ++# endif
306.1216 ++    }
306.1217 ++#endif
306.1218 ++}
306.1219 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h
306.1220 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h
306.1221 +@@ -0,0 +1,121 @@
306.1222 ++// std::messages implementation details, GNU version -*- C++ -*-
306.1223 ++
306.1224 ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
306.1225 ++//
306.1226 ++// This file is part of the GNU ISO C++ Library.  This library is free
306.1227 ++// software; you can redistribute it and/or modify it under the
306.1228 ++// terms of the GNU General Public License as published by the
306.1229 ++// Free Software Foundation; either version 2, or (at your option)
306.1230 ++// any later version.
306.1231 ++
306.1232 ++// This library is distributed in the hope that it will be useful,
306.1233 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
306.1234 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
306.1235 ++// GNU General Public License for more details.
306.1236 ++
306.1237 ++// You should have received a copy of the GNU General Public License along
306.1238 ++// with this library; see the file COPYING.  If not, write to the Free
306.1239 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
306.1240 ++// USA.
306.1241 ++
306.1242 ++// As a special exception, you may use this file as part of a free software
306.1243 ++// library without restriction.  Specifically, if other files instantiate
306.1244 ++// templates or use macros or inline functions from this file, or you compile
306.1245 ++// this file and link it with other files to produce an executable, this
306.1246 ++// file does not by itself cause the resulting executable to be covered by
306.1247 ++// the GNU General Public License.  This exception does not however
306.1248 ++// invalidate any other reasons why the executable file might be covered by
306.1249 ++// the GNU General Public License.
306.1250 ++
306.1251 ++//
306.1252 ++// ISO C++ 14882: 22.2.7.1.2  messages functions
306.1253 ++//
306.1254 ++
306.1255 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
306.1256 ++
306.1257 ++#ifdef __UCLIBC_MJN3_ONLY__
306.1258 ++#warning fix prototypes for *textdomain funcs
306.1259 ++#endif
306.1260 ++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
306.1261 ++extern "C" char *__textdomain(const char *domainname);
306.1262 ++extern "C" char *__bindtextdomain(const char *domainname,
306.1263 ++				  const char *dirname);
306.1264 ++#else
306.1265 ++#undef __textdomain
306.1266 ++#undef __bindtextdomain
306.1267 ++#define __textdomain(D)           ((void)0)
306.1268 ++#define __bindtextdomain(D,P)     ((void)0)
306.1269 ++#endif
306.1270 ++
306.1271 ++  // Non-virtual member functions.
306.1272 ++  template<typename _CharT>
306.1273 ++     messages<_CharT>::messages(size_t __refs)
306.1274 ++     : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), 
306.1275 ++       _M_name_messages(_S_get_c_name())
306.1276 ++     { }
306.1277 ++
306.1278 ++  template<typename _CharT>
306.1279 ++     messages<_CharT>::messages(__c_locale __cloc, const char* __s, 
306.1280 ++				size_t __refs) 
306.1281 ++     : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
306.1282 ++     {
306.1283 ++       const size_t __len = std::strlen(__s) + 1;
306.1284 ++       char* __tmp = new char[__len];
306.1285 ++       std::memcpy(__tmp, __s, __len);
306.1286 ++       _M_name_messages = __tmp;
306.1287 ++
306.1288 ++       // Last to avoid leaking memory if new throws.
306.1289 ++       _M_c_locale_messages = _S_clone_c_locale(__cloc);
306.1290 ++     }
306.1291 ++
306.1292 ++  template<typename _CharT>
306.1293 ++    typename messages<_CharT>::catalog 
306.1294 ++    messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, 
306.1295 ++			   const char* __dir) const
306.1296 ++    { 
306.1297 ++      __bindtextdomain(__s.c_str(), __dir);
306.1298 ++      return this->do_open(__s, __loc); 
306.1299 ++    }
306.1300 ++
306.1301 ++  // Virtual member functions.
306.1302 ++  template<typename _CharT>
306.1303 ++    messages<_CharT>::~messages()
306.1304 ++    { 
306.1305 ++      if (_M_name_messages != _S_get_c_name())
306.1306 ++	delete [] _M_name_messages;
306.1307 ++      _S_destroy_c_locale(_M_c_locale_messages); 
306.1308 ++    }
306.1309 ++
306.1310 ++  template<typename _CharT>
306.1311 ++    typename messages<_CharT>::catalog 
306.1312 ++    messages<_CharT>::do_open(const basic_string<char>& __s, 
306.1313 ++			      const locale&) const
306.1314 ++    { 
306.1315 ++      // No error checking is done, assume the catalog exists and can
306.1316 ++      // be used.
306.1317 ++      __textdomain(__s.c_str());
306.1318 ++      return 0;
306.1319 ++    }
306.1320 ++
306.1321 ++  template<typename _CharT>
306.1322 ++    void    
306.1323 ++    messages<_CharT>::do_close(catalog) const 
306.1324 ++    { }
306.1325 ++
306.1326 ++   // messages_byname
306.1327 ++   template<typename _CharT>
306.1328 ++     messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
306.1329 ++     : messages<_CharT>(__refs) 
306.1330 ++     { 
306.1331 ++       if (this->_M_name_messages != locale::facet::_S_get_c_name())
306.1332 ++	 delete [] this->_M_name_messages;
306.1333 ++       char* __tmp = new char[std::strlen(__s) + 1];
306.1334 ++       std::strcpy(__tmp, __s);
306.1335 ++       this->_M_name_messages = __tmp;
306.1336 ++
306.1337 ++       if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
306.1338 ++	 {
306.1339 ++	   this->_S_destroy_c_locale(this->_M_c_locale_messages);
306.1340 ++	   this->_S_create_c_locale(this->_M_c_locale_messages, __s); 
306.1341 ++	 }
306.1342 ++     }
306.1343 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc
306.1344 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
306.1345 +@@ -0,0 +1,692 @@
306.1346 ++// std::moneypunct implementation details, GNU version -*- C++ -*-
306.1347 ++
306.1348 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
306.1349 ++//
306.1350 ++// This file is part of the GNU ISO C++ Library.  This library is free
306.1351 ++// software; you can redistribute it and/or modify it under the
306.1352 ++// terms of the GNU General Public License as published by the
306.1353 ++// Free Software Foundation; either version 2, or (at your option)
306.1354 ++// any later version.
306.1355 ++
306.1356 ++// This library is distributed in the hope that it will be useful,
306.1357 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
306.1358 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
306.1359 ++// GNU General Public License for more details.
306.1360 ++
306.1361 ++// You should have received a copy of the GNU General Public License along
306.1362 ++// with this library; see the file COPYING.  If not, write to the Free
306.1363 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
306.1364 ++// USA.
306.1365 ++
306.1366 ++// As a special exception, you may use this file as part of a free software
306.1367 ++// library without restriction.  Specifically, if other files instantiate
306.1368 ++// templates or use macros or inline functions from this file, or you compile
306.1369 ++// this file and link it with other files to produce an executable, this
306.1370 ++// file does not by itself cause the resulting executable to be covered by
306.1371 ++// the GNU General Public License.  This exception does not however
306.1372 ++// invalidate any other reasons why the executable file might be covered by
306.1373 ++// the GNU General Public License.
306.1374 ++
306.1375 ++//
306.1376 ++// ISO C++ 14882: 22.2.6.3.2  moneypunct virtual functions
306.1377 ++//
306.1378 ++
306.1379 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
306.1380 ++
306.1381 ++#define _LIBC
306.1382 ++#include <locale>
306.1383 ++#undef _LIBC
306.1384 ++#include <bits/c++locale_internal.h>
306.1385 ++
306.1386 ++#ifdef __UCLIBC_MJN3_ONLY__
306.1387 ++#warning optimize this for uclibc
306.1388 ++#warning tailor for stub locale support
306.1389 ++#endif
306.1390 ++
306.1391 ++#ifndef __UCLIBC_HAS_XLOCALE__
306.1392 ++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
306.1393 ++#endif
306.1394 ++
306.1395 ++namespace std
306.1396 ++{
306.1397 ++  // Construct and return valid pattern consisting of some combination of:
306.1398 ++  // space none symbol sign value
306.1399 ++  money_base::pattern
306.1400 ++  money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
306.1401 ++  { 
306.1402 ++    pattern __ret;
306.1403 ++
306.1404 ++    // This insanely complicated routine attempts to construct a valid
306.1405 ++    // pattern for use with monyepunct. A couple of invariants:
306.1406 ++
306.1407 ++    // if (__precedes) symbol -> value
306.1408 ++    // else value -> symbol
306.1409 ++    
306.1410 ++    // if (__space) space
306.1411 ++    // else none
306.1412 ++
306.1413 ++    // none == never first
306.1414 ++    // space never first or last
306.1415 ++
306.1416 ++    // Any elegant implementations of this are welcome.
306.1417 ++    switch (__posn)
306.1418 ++      {
306.1419 ++      case 0:
306.1420 ++      case 1:
306.1421 ++	// 1 The sign precedes the value and symbol.
306.1422 ++	__ret.field[0] = sign;
306.1423 ++	if (__space)
306.1424 ++	  {
306.1425 ++	    // Pattern starts with sign.
306.1426 ++	    if (__precedes)
306.1427 ++	      {
306.1428 ++		__ret.field[1] = symbol;
306.1429 ++		__ret.field[3] = value;
306.1430 ++	      }
306.1431 ++	    else
306.1432 ++	      {
306.1433 ++		__ret.field[1] = value;
306.1434 ++		__ret.field[3] = symbol;
306.1435 ++	      }
306.1436 ++	    __ret.field[2] = space;
306.1437 ++	  }
306.1438 ++	else
306.1439 ++	  {
306.1440 ++	    // Pattern starts with sign and ends with none.
306.1441 ++	    if (__precedes)
306.1442 ++	      {
306.1443 ++		__ret.field[1] = symbol;
306.1444 ++		__ret.field[2] = value;
306.1445 ++	      }
306.1446 ++	    else
306.1447 ++	      {
306.1448 ++		__ret.field[1] = value;
306.1449 ++		__ret.field[2] = symbol;
306.1450 ++	      }
306.1451 ++	    __ret.field[3] = none;
306.1452 ++	  }
306.1453 ++	break;
306.1454 ++      case 2:
306.1455 ++	// 2 The sign follows the value and symbol.
306.1456 ++	if (__space)
306.1457 ++	  {
306.1458 ++	    // Pattern either ends with sign.
306.1459 ++	    if (__precedes)
306.1460 ++	      {
306.1461 ++		__ret.field[0] = symbol;
306.1462 ++		__ret.field[2] = value;
306.1463 ++	      }
306.1464 ++	    else
306.1465 ++	      {
306.1466 ++		__ret.field[0] = value;
306.1467 ++		__ret.field[2] = symbol;
306.1468 ++	      }
306.1469 ++	    __ret.field[1] = space;
306.1470 ++	    __ret.field[3] = sign;
306.1471 ++	  }
306.1472 ++	else
306.1473 ++	  {
306.1474 ++	    // Pattern ends with sign then none.
306.1475 ++	    if (__precedes)
306.1476 ++	      {
306.1477 ++		__ret.field[0] = symbol;
306.1478 ++		__ret.field[1] = value;
306.1479 ++	      }
306.1480 ++	    else
306.1481 ++	      {
306.1482 ++		__ret.field[0] = value;
306.1483 ++		__ret.field[1] = symbol;
306.1484 ++	      }
306.1485 ++	    __ret.field[2] = sign;
306.1486 ++	    __ret.field[3] = none;
306.1487 ++	  }
306.1488 ++	break;
306.1489 ++      case 3:
306.1490 ++	// 3 The sign immediately precedes the symbol.
306.1491 ++	if (__precedes)
306.1492 ++	  {
306.1493 ++	    __ret.field[0] = sign;
306.1494 ++	    __ret.field[1] = symbol;	    
306.1495 ++	    if (__space)
306.1496 ++	      {
306.1497 ++		__ret.field[2] = space;
306.1498 ++		__ret.field[3] = value;
306.1499 ++	      }
306.1500 ++	    else
306.1501 ++	      {
306.1502 ++		__ret.field[2] = value;		
306.1503 ++		__ret.field[3] = none;
306.1504 ++	      }
306.1505 ++	  }
306.1506 ++	else
306.1507 ++	  {
306.1508 ++	    __ret.field[0] = value;
306.1509 ++	    if (__space)
306.1510 ++	      {
306.1511 ++		__ret.field[1] = space;
306.1512 ++		__ret.field[2] = sign;
306.1513 ++		__ret.field[3] = symbol;
306.1514 ++	      }
306.1515 ++	    else
306.1516 ++	      {
306.1517 ++		__ret.field[1] = sign;
306.1518 ++		__ret.field[2] = symbol;
306.1519 ++		__ret.field[3] = none;
306.1520 ++	      }
306.1521 ++	  }
306.1522 ++	break;
306.1523 ++      case 4:
306.1524 ++	// 4 The sign immediately follows the symbol.
306.1525 ++	if (__precedes)
306.1526 ++	  {
306.1527 ++	    __ret.field[0] = symbol;
306.1528 ++	    __ret.field[1] = sign;
306.1529 ++	    if (__space)
306.1530 ++	      {
306.1531 ++		__ret.field[2] = space;
306.1532 ++		__ret.field[3] = value;
306.1533 ++	      }
306.1534 ++	    else
306.1535 ++	      {
306.1536 ++		__ret.field[2] = value;
306.1537 ++		__ret.field[3] = none;
306.1538 ++	      }
306.1539 ++	  }
306.1540 ++	else
306.1541 ++	  {
306.1542 ++	    __ret.field[0] = value;
306.1543 ++	    if (__space)
306.1544 ++	      {
306.1545 ++		__ret.field[1] = space;
306.1546 ++		__ret.field[2] = symbol;
306.1547 ++		__ret.field[3] = sign;
306.1548 ++	      }
306.1549 ++	    else
306.1550 ++	      {
306.1551 ++		__ret.field[1] = symbol;
306.1552 ++		__ret.field[2] = sign;
306.1553 ++		__ret.field[3] = none;
306.1554 ++	      }
306.1555 ++	  }
306.1556 ++	break;
306.1557 ++      default:
306.1558 ++	__ret = pattern();
306.1559 ++      }
306.1560 ++    return __ret;
306.1561 ++  }
306.1562 ++
306.1563 ++  template<> 
306.1564 ++    void
306.1565 ++    moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc, 
306.1566 ++						     const char*)
306.1567 ++    {
306.1568 ++      if (!_M_data)
306.1569 ++	_M_data = new __moneypunct_cache<char, true>;
306.1570 ++
306.1571 ++      if (!__cloc)
306.1572 ++	{
306.1573 ++	  // "C" locale
306.1574 ++	  _M_data->_M_decimal_point = '.';
306.1575 ++	  _M_data->_M_thousands_sep = ',';
306.1576 ++	  _M_data->_M_grouping = "";
306.1577 ++	  _M_data->_M_grouping_size = 0;
306.1578 ++	  _M_data->_M_curr_symbol = "";
306.1579 ++	  _M_data->_M_curr_symbol_size = 0;
306.1580 ++	  _M_data->_M_positive_sign = "";
306.1581 ++	  _M_data->_M_positive_sign_size = 0;
306.1582 ++	  _M_data->_M_negative_sign = "";
306.1583 ++	  _M_data->_M_negative_sign_size = 0;
306.1584 ++	  _M_data->_M_frac_digits = 0;
306.1585 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
306.1586 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
306.1587 ++
306.1588 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
306.1589 ++	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
306.1590 ++	}
306.1591 ++      else
306.1592 ++	{
306.1593 ++	  // Named locale.
306.1594 ++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
306.1595 ++							__cloc));
306.1596 ++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
306.1597 ++							__cloc));
306.1598 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
306.1599 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
306.1600 ++	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
306.1601 ++	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
306.1602 ++
306.1603 ++	  char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
306.1604 ++	  if (!__nposn)
306.1605 ++	    _M_data->_M_negative_sign = "()";
306.1606 ++	  else
306.1607 ++	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, 
306.1608 ++							__cloc);
306.1609 ++	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
306.1610 ++
306.1611 ++	  // _Intl == true
306.1612 ++	  _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
306.1613 ++	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
306.1614 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
306.1615 ++						      __cloc));
306.1616 ++	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
306.1617 ++	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
306.1618 ++	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
306.1619 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
306.1620 ++							__pposn);
306.1621 ++	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
306.1622 ++	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
306.1623 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
306.1624 ++							__nposn);
306.1625 ++	}
306.1626 ++    }
306.1627 ++
306.1628 ++  template<> 
306.1629 ++    void
306.1630 ++    moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, 
306.1631 ++						      const char*)
306.1632 ++    {
306.1633 ++      if (!_M_data)
306.1634 ++	_M_data = new __moneypunct_cache<char, false>;
306.1635 ++
306.1636 ++      if (!__cloc)
306.1637 ++	{
306.1638 ++	  // "C" locale
306.1639 ++	  _M_data->_M_decimal_point = '.';
306.1640 ++	  _M_data->_M_thousands_sep = ',';
306.1641 ++	  _M_data->_M_grouping = "";
306.1642 ++	  _M_data->_M_grouping_size = 0;
306.1643 ++	  _M_data->_M_curr_symbol = "";
306.1644 ++	  _M_data->_M_curr_symbol_size = 0;
306.1645 ++	  _M_data->_M_positive_sign = "";
306.1646 ++	  _M_data->_M_positive_sign_size = 0;
306.1647 ++	  _M_data->_M_negative_sign = "";
306.1648 ++	  _M_data->_M_negative_sign_size = 0;
306.1649 ++	  _M_data->_M_frac_digits = 0;
306.1650 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
306.1651 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
306.1652 ++
306.1653 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
306.1654 ++	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
306.1655 ++	}
306.1656 ++      else
306.1657 ++	{
306.1658 ++	  // Named locale.
306.1659 ++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, 
306.1660 ++							__cloc));
306.1661 ++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, 
306.1662 ++							__cloc));
306.1663 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
306.1664 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
306.1665 ++	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
306.1666 ++	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
306.1667 ++
306.1668 ++	  char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
306.1669 ++	  if (!__nposn)
306.1670 ++	    _M_data->_M_negative_sign = "()";
306.1671 ++	  else
306.1672 ++	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
306.1673 ++							__cloc);
306.1674 ++	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
306.1675 ++
306.1676 ++	  // _Intl == false
306.1677 ++	  _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
306.1678 ++	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
306.1679 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
306.1680 ++	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
306.1681 ++	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
306.1682 ++	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
306.1683 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
306.1684 ++							__pposn);
306.1685 ++	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
306.1686 ++	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
306.1687 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
306.1688 ++							__nposn);
306.1689 ++	}
306.1690 ++    }
306.1691 ++
306.1692 ++  template<> 
306.1693 ++    moneypunct<char, true>::~moneypunct()
306.1694 ++    { delete _M_data; }
306.1695 ++
306.1696 ++  template<> 
306.1697 ++    moneypunct<char, false>::~moneypunct()
306.1698 ++    { delete _M_data; }
306.1699 ++
306.1700 ++#ifdef _GLIBCXX_USE_WCHAR_T
306.1701 ++  template<> 
306.1702 ++    void
306.1703 ++    moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc, 
306.1704 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.1705 ++							const char*)
306.1706 ++#else
306.1707 ++							const char* __name)
306.1708 ++#endif
306.1709 ++    {
306.1710 ++      if (!_M_data)
306.1711 ++	_M_data = new __moneypunct_cache<wchar_t, true>;
306.1712 ++
306.1713 ++      if (!__cloc)
306.1714 ++	{
306.1715 ++	  // "C" locale
306.1716 ++	  _M_data->_M_decimal_point = L'.';
306.1717 ++	  _M_data->_M_thousands_sep = L',';
306.1718 ++	  _M_data->_M_grouping = "";
306.1719 ++	  _M_data->_M_grouping_size = 0;
306.1720 ++	  _M_data->_M_curr_symbol = L"";
306.1721 ++	  _M_data->_M_curr_symbol_size = 0;
306.1722 ++	  _M_data->_M_positive_sign = L"";
306.1723 ++	  _M_data->_M_positive_sign_size = 0;
306.1724 ++	  _M_data->_M_negative_sign = L"";
306.1725 ++	  _M_data->_M_negative_sign_size = 0;
306.1726 ++	  _M_data->_M_frac_digits = 0;
306.1727 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
306.1728 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
306.1729 ++
306.1730 ++	  // Use ctype::widen code without the facet...
306.1731 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
306.1732 ++	    _M_data->_M_atoms[__i] =
306.1733 ++	      static_cast<wchar_t>(money_base::_S_atoms[__i]);
306.1734 ++	}
306.1735 ++      else
306.1736 ++	{
306.1737 ++	  // Named locale.
306.1738 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.1739 ++	  __c_locale __old = __uselocale(__cloc);
306.1740 ++#else
306.1741 ++	  // Switch to named locale so that mbsrtowcs will work.
306.1742 ++	  char* __old = strdup(setlocale(LC_ALL, NULL));
306.1743 ++	  setlocale(LC_ALL, __name);
306.1744 ++#endif
306.1745 ++
306.1746 ++#ifdef __UCLIBC_MJN3_ONLY__
306.1747 ++#warning fix this... should be monetary
306.1748 ++#endif
306.1749 ++#ifdef __UCLIBC__
306.1750 ++# ifdef __UCLIBC_HAS_XLOCALE__
306.1751 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
306.1752 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
306.1753 ++# elif defined __UCLIBC_HAS_LOCALE__
306.1754 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
306.1755 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
306.1756 ++# endif
306.1757 ++#else
306.1758 ++	  union { char *__s; wchar_t __w; } __u;
306.1759 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
306.1760 ++	  _M_data->_M_decimal_point = __u.__w;
306.1761 ++
306.1762 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
306.1763 ++	  _M_data->_M_thousands_sep = __u.__w;
306.1764 ++#endif
306.1765 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
306.1766 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
306.1767 ++
306.1768 ++	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
306.1769 ++	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
306.1770 ++	  const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
306.1771 ++
306.1772 ++	  wchar_t* __wcs_ps = 0;
306.1773 ++	  wchar_t* __wcs_ns = 0;
306.1774 ++	  const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
306.1775 ++	  try
306.1776 ++	    {
306.1777 ++	      mbstate_t __state;
306.1778 ++	      size_t __len = strlen(__cpossign);
306.1779 ++	      if (__len)
306.1780 ++		{
306.1781 ++		  ++__len;
306.1782 ++		  memset(&__state, 0, sizeof(mbstate_t));
306.1783 ++		  __wcs_ps = new wchar_t[__len];
306.1784 ++		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
306.1785 ++		  _M_data->_M_positive_sign = __wcs_ps;
306.1786 ++		}
306.1787 ++	      else
306.1788 ++		_M_data->_M_positive_sign = L"";
306.1789 ++	      _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
306.1790 ++	      
306.1791 ++	      __len = strlen(__cnegsign);
306.1792 ++	      if (!__nposn)
306.1793 ++		_M_data->_M_negative_sign = L"()";
306.1794 ++	      else if (__len)
306.1795 ++		{ 
306.1796 ++		  ++__len;
306.1797 ++		  memset(&__state, 0, sizeof(mbstate_t));
306.1798 ++		  __wcs_ns = new wchar_t[__len];
306.1799 ++		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
306.1800 ++		  _M_data->_M_negative_sign = __wcs_ns;
306.1801 ++		}
306.1802 ++	      else
306.1803 ++		_M_data->_M_negative_sign = L"";
306.1804 ++	      _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
306.1805 ++	      
306.1806 ++	      // _Intl == true.
306.1807 ++	      __len = strlen(__ccurr);
306.1808 ++	      if (__len)
306.1809 ++		{
306.1810 ++		  ++__len;
306.1811 ++		  memset(&__state, 0, sizeof(mbstate_t));
306.1812 ++		  wchar_t* __wcs = new wchar_t[__len];
306.1813 ++		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
306.1814 ++		  _M_data->_M_curr_symbol = __wcs;
306.1815 ++		}
306.1816 ++	      else
306.1817 ++		_M_data->_M_curr_symbol = L"";
306.1818 ++	      _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
306.1819 ++	    }
306.1820 ++	  catch (...)
306.1821 ++	    {
306.1822 ++	      delete _M_data;
306.1823 ++	      _M_data = 0;
306.1824 ++	      delete __wcs_ps;
306.1825 ++	      delete __wcs_ns;	      
306.1826 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.1827 ++	      __uselocale(__old);
306.1828 ++#else
306.1829 ++	      setlocale(LC_ALL, __old);
306.1830 ++	      free(__old);
306.1831 ++#endif
306.1832 ++	      __throw_exception_again;
306.1833 ++	    } 
306.1834 ++	  
306.1835 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, 
306.1836 ++						      __cloc));
306.1837 ++	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
306.1838 ++	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
306.1839 ++	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
306.1840 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
306.1841 ++							__pposn);
306.1842 ++	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
306.1843 ++	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
306.1844 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
306.1845 ++							__nposn);
306.1846 ++
306.1847 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.1848 ++	  __uselocale(__old);
306.1849 ++#else
306.1850 ++	  setlocale(LC_ALL, __old);
306.1851 ++	  free(__old);
306.1852 ++#endif
306.1853 ++	}
306.1854 ++    }
306.1855 ++
306.1856 ++  template<> 
306.1857 ++  void
306.1858 ++  moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
306.1859 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.1860 ++						       const char*)
306.1861 ++#else
306.1862 ++                                                       const char* __name)
306.1863 ++#endif
306.1864 ++  {
306.1865 ++    if (!_M_data)
306.1866 ++      _M_data = new __moneypunct_cache<wchar_t, false>;
306.1867 ++
306.1868 ++    if (!__cloc)
306.1869 ++	{
306.1870 ++	  // "C" locale
306.1871 ++	  _M_data->_M_decimal_point = L'.';
306.1872 ++	  _M_data->_M_thousands_sep = L',';
306.1873 ++	  _M_data->_M_grouping = "";
306.1874 ++          _M_data->_M_grouping_size = 0;
306.1875 ++	  _M_data->_M_curr_symbol = L"";
306.1876 ++	  _M_data->_M_curr_symbol_size = 0;
306.1877 ++	  _M_data->_M_positive_sign = L"";
306.1878 ++	  _M_data->_M_positive_sign_size = 0;
306.1879 ++	  _M_data->_M_negative_sign = L"";
306.1880 ++	  _M_data->_M_negative_sign_size = 0;
306.1881 ++	  _M_data->_M_frac_digits = 0;
306.1882 ++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
306.1883 ++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
306.1884 ++
306.1885 ++	  // Use ctype::widen code without the facet...
306.1886 ++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
306.1887 ++	    _M_data->_M_atoms[__i] =
306.1888 ++	      static_cast<wchar_t>(money_base::_S_atoms[__i]);
306.1889 ++	}
306.1890 ++      else
306.1891 ++	{
306.1892 ++	  // Named locale.
306.1893 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.1894 ++	  __c_locale __old = __uselocale(__cloc);
306.1895 ++#else
306.1896 ++	  // Switch to named locale so that mbsrtowcs will work.
306.1897 ++	  char* __old = strdup(setlocale(LC_ALL, NULL));
306.1898 ++	  setlocale(LC_ALL, __name);
306.1899 ++#endif
306.1900 ++
306.1901 ++#ifdef __UCLIBC_MJN3_ONLY__
306.1902 ++#warning fix this... should be monetary
306.1903 ++#endif
306.1904 ++#ifdef __UCLIBC__
306.1905 ++# ifdef __UCLIBC_HAS_XLOCALE__
306.1906 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
306.1907 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
306.1908 ++# elif defined __UCLIBC_HAS_LOCALE__
306.1909 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
306.1910 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
306.1911 ++# endif
306.1912 ++#else
306.1913 ++          union { char *__s; wchar_t __w; } __u;
306.1914 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
306.1915 ++	  _M_data->_M_decimal_point = __u.__w;
306.1916 ++
306.1917 ++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
306.1918 ++	  _M_data->_M_thousands_sep = __u.__w;
306.1919 ++#endif
306.1920 ++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
306.1921 ++          _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
306.1922 ++
306.1923 ++	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
306.1924 ++	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
306.1925 ++	  const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
306.1926 ++
306.1927 ++	  wchar_t* __wcs_ps = 0;
306.1928 ++	  wchar_t* __wcs_ns = 0;
306.1929 ++	  const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
306.1930 ++	  try
306.1931 ++            {
306.1932 ++              mbstate_t __state;
306.1933 ++              size_t __len;
306.1934 ++              __len = strlen(__cpossign);
306.1935 ++              if (__len)
306.1936 ++                {
306.1937 ++		  ++__len;
306.1938 ++		  memset(&__state, 0, sizeof(mbstate_t));
306.1939 ++		  __wcs_ps = new wchar_t[__len];
306.1940 ++		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
306.1941 ++		  _M_data->_M_positive_sign = __wcs_ps;
306.1942 ++		}
306.1943 ++	      else
306.1944 ++		_M_data->_M_positive_sign = L"";
306.1945 ++              _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
306.1946 ++	      
306.1947 ++	      __len = strlen(__cnegsign);
306.1948 ++	      if (!__nposn)
306.1949 ++		_M_data->_M_negative_sign = L"()";
306.1950 ++	      else if (__len)
306.1951 ++		{ 
306.1952 ++		  ++__len;
306.1953 ++		  memset(&__state, 0, sizeof(mbstate_t));
306.1954 ++		  __wcs_ns = new wchar_t[__len];
306.1955 ++		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
306.1956 ++		  _M_data->_M_negative_sign = __wcs_ns;
306.1957 ++		}
306.1958 ++	      else
306.1959 ++		_M_data->_M_negative_sign = L"";
306.1960 ++              _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
306.1961 ++
306.1962 ++	      // _Intl == true.
306.1963 ++	      __len = strlen(__ccurr);
306.1964 ++	      if (__len)
306.1965 ++		{
306.1966 ++		  ++__len;
306.1967 ++		  memset(&__state, 0, sizeof(mbstate_t));
306.1968 ++		  wchar_t* __wcs = new wchar_t[__len];
306.1969 ++		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
306.1970 ++		  _M_data->_M_curr_symbol = __wcs;
306.1971 ++		}
306.1972 ++	      else
306.1973 ++		_M_data->_M_curr_symbol = L"";
306.1974 ++              _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
306.1975 ++	    }
306.1976 ++          catch (...)
306.1977 ++	    {
306.1978 ++	      delete _M_data;
306.1979 ++              _M_data = 0;
306.1980 ++	      delete __wcs_ps;
306.1981 ++	      delete __wcs_ns;	      
306.1982 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.1983 ++	      __uselocale(__old);
306.1984 ++#else
306.1985 ++	      setlocale(LC_ALL, __old);
306.1986 ++	      free(__old);
306.1987 ++#endif
306.1988 ++              __throw_exception_again;
306.1989 ++	    }
306.1990 ++
306.1991 ++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
306.1992 ++	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
306.1993 ++	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
306.1994 ++	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
306.1995 ++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, 
306.1996 ++	                                                __pposn);
306.1997 ++	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
306.1998 ++	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
306.1999 ++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, 
306.2000 ++	                                                __nposn);
306.2001 ++
306.2002 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.2003 ++	  __uselocale(__old);
306.2004 ++#else
306.2005 ++	  setlocale(LC_ALL, __old);
306.2006 ++	  free(__old);
306.2007 ++#endif
306.2008 ++	}
306.2009 ++    }
306.2010 ++
306.2011 ++  template<> 
306.2012 ++    moneypunct<wchar_t, true>::~moneypunct()
306.2013 ++    {
306.2014 ++      if (_M_data->_M_positive_sign_size)
306.2015 ++	delete [] _M_data->_M_positive_sign;
306.2016 ++      if (_M_data->_M_negative_sign_size
306.2017 ++          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
306.2018 ++	delete [] _M_data->_M_negative_sign;
306.2019 ++      if (_M_data->_M_curr_symbol_size)
306.2020 ++	delete [] _M_data->_M_curr_symbol;
306.2021 ++      delete _M_data;
306.2022 ++    }
306.2023 ++
306.2024 ++  template<> 
306.2025 ++    moneypunct<wchar_t, false>::~moneypunct()
306.2026 ++    {
306.2027 ++      if (_M_data->_M_positive_sign_size)
306.2028 ++	delete [] _M_data->_M_positive_sign;
306.2029 ++      if (_M_data->_M_negative_sign_size
306.2030 ++          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
306.2031 ++	delete [] _M_data->_M_negative_sign;
306.2032 ++      if (_M_data->_M_curr_symbol_size)
306.2033 ++	delete [] _M_data->_M_curr_symbol;
306.2034 ++      delete _M_data;
306.2035 ++    }
306.2036 ++#endif
306.2037 ++}
306.2038 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc
306.2039 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
306.2040 +@@ -0,0 +1,173 @@
306.2041 ++// std::numpunct implementation details, GNU version -*- C++ -*-
306.2042 ++
306.2043 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
306.2044 ++//
306.2045 ++// This file is part of the GNU ISO C++ Library.  This library is free
306.2046 ++// software; you can redistribute it and/or modify it under the
306.2047 ++// terms of the GNU General Public License as published by the
306.2048 ++// Free Software Foundation; either version 2, or (at your option)
306.2049 ++// any later version.
306.2050 ++
306.2051 ++// This library is distributed in the hope that it will be useful,
306.2052 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
306.2053 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
306.2054 ++// GNU General Public License for more details.
306.2055 ++
306.2056 ++// You should have received a copy of the GNU General Public License along
306.2057 ++// with this library; see the file COPYING.  If not, write to the Free
306.2058 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
306.2059 ++// USA.
306.2060 ++
306.2061 ++// As a special exception, you may use this file as part of a free software
306.2062 ++// library without restriction.  Specifically, if other files instantiate
306.2063 ++// templates or use macros or inline functions from this file, or you compile
306.2064 ++// this file and link it with other files to produce an executable, this
306.2065 ++// file does not by itself cause the resulting executable to be covered by
306.2066 ++// the GNU General Public License.  This exception does not however
306.2067 ++// invalidate any other reasons why the executable file might be covered by
306.2068 ++// the GNU General Public License.
306.2069 ++
306.2070 ++//
306.2071 ++// ISO C++ 14882: 22.2.3.1.2  numpunct virtual functions
306.2072 ++//
306.2073 ++
306.2074 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
306.2075 ++
306.2076 ++#define _LIBC
306.2077 ++#include <locale>
306.2078 ++#undef _LIBC
306.2079 ++#include <bits/c++locale_internal.h>
306.2080 ++
306.2081 ++#ifdef __UCLIBC_MJN3_ONLY__
306.2082 ++#warning tailor for stub locale support
306.2083 ++#endif
306.2084 ++#ifndef __UCLIBC_HAS_XLOCALE__
306.2085 ++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
306.2086 ++#endif
306.2087 ++
306.2088 ++namespace std
306.2089 ++{
306.2090 ++  template<> 
306.2091 ++    void
306.2092 ++    numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
306.2093 ++    {
306.2094 ++      if (!_M_data)
306.2095 ++	_M_data = new __numpunct_cache<char>;
306.2096 ++
306.2097 ++      if (!__cloc)
306.2098 ++	{
306.2099 ++	  // "C" locale
306.2100 ++	  _M_data->_M_grouping = "";
306.2101 ++	  _M_data->_M_grouping_size = 0;
306.2102 ++	  _M_data->_M_use_grouping = false;
306.2103 ++
306.2104 ++	  _M_data->_M_decimal_point = '.';
306.2105 ++	  _M_data->_M_thousands_sep = ',';
306.2106 ++
306.2107 ++	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
306.2108 ++	    _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
306.2109 ++
306.2110 ++	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
306.2111 ++	    _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
306.2112 ++	}
306.2113 ++      else
306.2114 ++	{
306.2115 ++	  // Named locale.
306.2116 ++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, 
306.2117 ++							__cloc));
306.2118 ++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, 
306.2119 ++							__cloc));
306.2120 ++
306.2121 ++	  // Check for NULL, which implies no grouping.
306.2122 ++	  if (_M_data->_M_thousands_sep == '\0')
306.2123 ++	    _M_data->_M_grouping = "";
306.2124 ++	  else
306.2125 ++	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
306.2126 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
306.2127 ++	}
306.2128 ++
306.2129 ++      // NB: There is no way to extact this info from posix locales.
306.2130 ++      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
306.2131 ++      _M_data->_M_truename = "true";
306.2132 ++      _M_data->_M_truename_size = 4;
306.2133 ++      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
306.2134 ++      _M_data->_M_falsename = "false";
306.2135 ++      _M_data->_M_falsename_size = 5;
306.2136 ++    }
306.2137 ++ 
306.2138 ++  template<> 
306.2139 ++    numpunct<char>::~numpunct()
306.2140 ++    { delete _M_data; }
306.2141 ++   
306.2142 ++#ifdef _GLIBCXX_USE_WCHAR_T
306.2143 ++  template<> 
306.2144 ++    void
306.2145 ++    numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
306.2146 ++    {
306.2147 ++      if (!_M_data)
306.2148 ++	_M_data = new __numpunct_cache<wchar_t>;
306.2149 ++
306.2150 ++      if (!__cloc)
306.2151 ++	{
306.2152 ++	  // "C" locale
306.2153 ++	  _M_data->_M_grouping = "";
306.2154 ++	  _M_data->_M_grouping_size = 0;
306.2155 ++	  _M_data->_M_use_grouping = false;
306.2156 ++
306.2157 ++	  _M_data->_M_decimal_point = L'.';
306.2158 ++	  _M_data->_M_thousands_sep = L',';
306.2159 ++
306.2160 ++	  // Use ctype::widen code without the facet...
306.2161 ++	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
306.2162 ++	    _M_data->_M_atoms_out[__i] =
306.2163 ++	      static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
306.2164 ++
306.2165 ++	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
306.2166 ++	    _M_data->_M_atoms_in[__j] =
306.2167 ++	      static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
306.2168 ++	}
306.2169 ++      else
306.2170 ++	{
306.2171 ++	  // Named locale.
306.2172 ++	  // NB: In the GNU model wchar_t is always 32 bit wide.
306.2173 ++#ifdef __UCLIBC_MJN3_ONLY__
306.2174 ++#warning fix this
306.2175 ++#endif
306.2176 ++#ifdef __UCLIBC__
306.2177 ++# ifdef __UCLIBC_HAS_XLOCALE__
306.2178 ++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
306.2179 ++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
306.2180 ++# elif defined __UCLIBC_HAS_LOCALE__
306.2181 ++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
306.2182 ++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
306.2183 ++# endif
306.2184 ++#else
306.2185 ++	  union { char *__s; wchar_t __w; } __u;
306.2186 ++	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
306.2187 ++	  _M_data->_M_decimal_point = __u.__w;
306.2188 ++
306.2189 ++	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
306.2190 ++	  _M_data->_M_thousands_sep = __u.__w;
306.2191 ++#endif
306.2192 ++
306.2193 ++	  if (_M_data->_M_thousands_sep == L'\0')
306.2194 ++	    _M_data->_M_grouping = "";
306.2195 ++	  else
306.2196 ++	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
306.2197 ++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
306.2198 ++	}
306.2199 ++
306.2200 ++      // NB: There is no way to extact this info from posix locales.
306.2201 ++      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
306.2202 ++      _M_data->_M_truename = L"true";
306.2203 ++      _M_data->_M_truename_size = 4;
306.2204 ++      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
306.2205 ++      _M_data->_M_falsename = L"false";
306.2206 ++      _M_data->_M_falsename_size = 5;
306.2207 ++    }
306.2208 ++
306.2209 ++  template<> 
306.2210 ++    numpunct<wchar_t>::~numpunct()
306.2211 ++    { delete _M_data; }
306.2212 ++ #endif
306.2213 ++}
306.2214 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc
306.2215 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc
306.2216 +@@ -0,0 +1,406 @@
306.2217 ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
306.2218 ++
306.2219 ++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
306.2220 ++//
306.2221 ++// This file is part of the GNU ISO C++ Library.  This library is free
306.2222 ++// software; you can redistribute it and/or modify it under the
306.2223 ++// terms of the GNU General Public License as published by the
306.2224 ++// Free Software Foundation; either version 2, or (at your option)
306.2225 ++// any later version.
306.2226 ++
306.2227 ++// This library is distributed in the hope that it will be useful,
306.2228 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
306.2229 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
306.2230 ++// GNU General Public License for more details.
306.2231 ++
306.2232 ++// You should have received a copy of the GNU General Public License along
306.2233 ++// with this library; see the file COPYING.  If not, write to the Free
306.2234 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
306.2235 ++// USA.
306.2236 ++
306.2237 ++// As a special exception, you may use this file as part of a free software
306.2238 ++// library without restriction.  Specifically, if other files instantiate
306.2239 ++// templates or use macros or inline functions from this file, or you compile
306.2240 ++// this file and link it with other files to produce an executable, this
306.2241 ++// file does not by itself cause the resulting executable to be covered by
306.2242 ++// the GNU General Public License.  This exception does not however
306.2243 ++// invalidate any other reasons why the executable file might be covered by
306.2244 ++// the GNU General Public License.
306.2245 ++
306.2246 ++//
306.2247 ++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
306.2248 ++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
306.2249 ++//
306.2250 ++
306.2251 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
306.2252 ++
306.2253 ++#include <locale>
306.2254 ++#include <bits/c++locale_internal.h>
306.2255 ++
306.2256 ++#ifdef __UCLIBC_MJN3_ONLY__
306.2257 ++#warning tailor for stub locale support
306.2258 ++#endif
306.2259 ++#ifndef __UCLIBC_HAS_XLOCALE__
306.2260 ++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
306.2261 ++#endif
306.2262 ++
306.2263 ++namespace std
306.2264 ++{
306.2265 ++  template<>
306.2266 ++    void
306.2267 ++    __timepunct<char>::
306.2268 ++    _M_put(char* __s, size_t __maxlen, const char* __format, 
306.2269 ++	   const tm* __tm) const
306.2270 ++    {
306.2271 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.2272 ++      const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
306.2273 ++					_M_c_locale_timepunct);
306.2274 ++#else
306.2275 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
306.2276 ++      setlocale(LC_ALL, _M_name_timepunct);
306.2277 ++      const size_t __len = strftime(__s, __maxlen, __format, __tm);
306.2278 ++      setlocale(LC_ALL, __old);
306.2279 ++      free(__old);
306.2280 ++#endif
306.2281 ++      // Make sure __s is null terminated.
306.2282 ++      if (__len == 0)
306.2283 ++	__s[0] = '\0';
306.2284 ++    }
306.2285 ++
306.2286 ++  template<> 
306.2287 ++    void
306.2288 ++    __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
306.2289 ++    {
306.2290 ++      if (!_M_data)
306.2291 ++	_M_data = new __timepunct_cache<char>;
306.2292 ++
306.2293 ++      if (!__cloc)
306.2294 ++	{
306.2295 ++	  // "C" locale
306.2296 ++	  _M_c_locale_timepunct = _S_get_c_locale();
306.2297 ++
306.2298 ++	  _M_data->_M_date_format = "%m/%d/%y";
306.2299 ++	  _M_data->_M_date_era_format = "%m/%d/%y";
306.2300 ++	  _M_data->_M_time_format = "%H:%M:%S";
306.2301 ++	  _M_data->_M_time_era_format = "%H:%M:%S";
306.2302 ++	  _M_data->_M_date_time_format = "";
306.2303 ++	  _M_data->_M_date_time_era_format = "";
306.2304 ++	  _M_data->_M_am = "AM";
306.2305 ++	  _M_data->_M_pm = "PM";
306.2306 ++	  _M_data->_M_am_pm_format = "";
306.2307 ++
306.2308 ++	  // Day names, starting with "C"'s Sunday.
306.2309 ++	  _M_data->_M_day1 = "Sunday";
306.2310 ++	  _M_data->_M_day2 = "Monday";
306.2311 ++	  _M_data->_M_day3 = "Tuesday";
306.2312 ++	  _M_data->_M_day4 = "Wednesday";
306.2313 ++	  _M_data->_M_day5 = "Thursday";
306.2314 ++	  _M_data->_M_day6 = "Friday";
306.2315 ++	  _M_data->_M_day7 = "Saturday";
306.2316 ++
306.2317 ++	  // Abbreviated day names, starting with "C"'s Sun.
306.2318 ++	  _M_data->_M_aday1 = "Sun";
306.2319 ++	  _M_data->_M_aday2 = "Mon";
306.2320 ++	  _M_data->_M_aday3 = "Tue";
306.2321 ++	  _M_data->_M_aday4 = "Wed";
306.2322 ++	  _M_data->_M_aday5 = "Thu";
306.2323 ++	  _M_data->_M_aday6 = "Fri";
306.2324 ++	  _M_data->_M_aday7 = "Sat";
306.2325 ++
306.2326 ++	  // Month names, starting with "C"'s January.
306.2327 ++	  _M_data->_M_month01 = "January";
306.2328 ++	  _M_data->_M_month02 = "February";
306.2329 ++	  _M_data->_M_month03 = "March";
306.2330 ++	  _M_data->_M_month04 = "April";
306.2331 ++	  _M_data->_M_month05 = "May";
306.2332 ++	  _M_data->_M_month06 = "June";
306.2333 ++	  _M_data->_M_month07 = "July";
306.2334 ++	  _M_data->_M_month08 = "August";
306.2335 ++	  _M_data->_M_month09 = "September";
306.2336 ++	  _M_data->_M_month10 = "October";
306.2337 ++	  _M_data->_M_month11 = "November";
306.2338 ++	  _M_data->_M_month12 = "December";
306.2339 ++
306.2340 ++	  // Abbreviated month names, starting with "C"'s Jan.
306.2341 ++	  _M_data->_M_amonth01 = "Jan";
306.2342 ++	  _M_data->_M_amonth02 = "Feb";
306.2343 ++	  _M_data->_M_amonth03 = "Mar";
306.2344 ++	  _M_data->_M_amonth04 = "Apr";
306.2345 ++	  _M_data->_M_amonth05 = "May";
306.2346 ++	  _M_data->_M_amonth06 = "Jun";
306.2347 ++	  _M_data->_M_amonth07 = "Jul";
306.2348 ++	  _M_data->_M_amonth08 = "Aug";
306.2349 ++	  _M_data->_M_amonth09 = "Sep";
306.2350 ++	  _M_data->_M_amonth10 = "Oct";
306.2351 ++	  _M_data->_M_amonth11 = "Nov";
306.2352 ++	  _M_data->_M_amonth12 = "Dec";
306.2353 ++	}
306.2354 ++      else
306.2355 ++	{
306.2356 ++	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
306.2357 ++
306.2358 ++	  _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
306.2359 ++	  _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
306.2360 ++	  _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
306.2361 ++	  _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
306.2362 ++	  _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
306.2363 ++	  _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
306.2364 ++							     __cloc);
306.2365 ++	  _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
306.2366 ++	  _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
306.2367 ++	  _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
306.2368 ++
306.2369 ++	  // Day names, starting with "C"'s Sunday.
306.2370 ++	  _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
306.2371 ++	  _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
306.2372 ++	  _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
306.2373 ++	  _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
306.2374 ++	  _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
306.2375 ++	  _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
306.2376 ++	  _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
306.2377 ++
306.2378 ++	  // Abbreviated day names, starting with "C"'s Sun.
306.2379 ++	  _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
306.2380 ++	  _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
306.2381 ++	  _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
306.2382 ++	  _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
306.2383 ++	  _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
306.2384 ++	  _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
306.2385 ++	  _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
306.2386 ++
306.2387 ++	  // Month names, starting with "C"'s January.
306.2388 ++	  _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
306.2389 ++	  _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
306.2390 ++	  _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
306.2391 ++	  _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
306.2392 ++	  _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
306.2393 ++	  _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
306.2394 ++	  _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
306.2395 ++	  _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
306.2396 ++	  _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
306.2397 ++	  _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
306.2398 ++	  _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
306.2399 ++	  _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
306.2400 ++
306.2401 ++	  // Abbreviated month names, starting with "C"'s Jan.
306.2402 ++	  _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
306.2403 ++	  _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
306.2404 ++	  _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
306.2405 ++	  _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
306.2406 ++	  _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
306.2407 ++	  _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
306.2408 ++	  _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
306.2409 ++	  _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
306.2410 ++	  _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
306.2411 ++	  _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
306.2412 ++	  _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
306.2413 ++	  _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
306.2414 ++	}
306.2415 ++    }
306.2416 ++
306.2417 ++#ifdef _GLIBCXX_USE_WCHAR_T
306.2418 ++  template<>
306.2419 ++    void
306.2420 ++    __timepunct<wchar_t>::
306.2421 ++    _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, 
306.2422 ++	   const tm* __tm) const
306.2423 ++    {
306.2424 ++#ifdef __UCLIBC_HAS_XLOCALE__
306.2425 ++      __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
306.2426 ++      const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
306.2427 ++					_M_c_locale_timepunct);
306.2428 ++#else
306.2429 ++      char* __old = strdup(setlocale(LC_ALL, NULL));
306.2430 ++      setlocale(LC_ALL, _M_name_timepunct);
306.2431 ++      const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
306.2432 ++      setlocale(LC_ALL, __old);
306.2433 ++      free(__old);
306.2434 ++#endif
306.2435 ++      // Make sure __s is null terminated.
306.2436 ++      if (__len == 0)
306.2437 ++	__s[0] = L'\0';
306.2438 ++    }
306.2439 ++
306.2440 ++  template<> 
306.2441 ++    void
306.2442 ++    __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
306.2443 ++    {
306.2444 ++      if (!_M_data)
306.2445 ++	_M_data = new __timepunct_cache<wchar_t>;
306.2446 ++
306.2447 ++#warning wide time stuff
306.2448 ++//       if (!__cloc)
306.2449 ++	{
306.2450 ++	  // "C" locale
306.2451 ++	  _M_c_locale_timepunct = _S_get_c_locale();
306.2452 ++
306.2453 ++	  _M_data->_M_date_format = L"%m/%d/%y";
306.2454 ++	  _M_data->_M_date_era_format = L"%m/%d/%y";
306.2455 ++	  _M_data->_M_time_format = L"%H:%M:%S";
306.2456 ++	  _M_data->_M_time_era_format = L"%H:%M:%S";
306.2457 ++	  _M_data->_M_date_time_format = L"";
306.2458 ++	  _M_data->_M_date_time_era_format = L"";
306.2459 ++	  _M_data->_M_am = L"AM";
306.2460 ++	  _M_data->_M_pm = L"PM";
306.2461 ++	  _M_data->_M_am_pm_format = L"";
306.2462 ++
306.2463 ++	  // Day names, starting with "C"'s Sunday.
306.2464 ++	  _M_data->_M_day1 = L"Sunday";
306.2465 ++	  _M_data->_M_day2 = L"Monday";
306.2466 ++	  _M_data->_M_day3 = L"Tuesday";
306.2467 ++	  _M_data->_M_day4 = L"Wednesday";
306.2468 ++	  _M_data->_M_day5 = L"Thursday";
306.2469 ++	  _M_data->_M_day6 = L"Friday";
306.2470 ++	  _M_data->_M_day7 = L"Saturday";
306.2471 ++
306.2472 ++	  // Abbreviated day names, starting with "C"'s Sun.
306.2473 ++	  _M_data->_M_aday1 = L"Sun";
306.2474 ++	  _M_data->_M_aday2 = L"Mon";
306.2475 ++	  _M_data->_M_aday3 = L"Tue";
306.2476 ++	  _M_data->_M_aday4 = L"Wed";
306.2477 ++	  _M_data->_M_aday5 = L"Thu";
306.2478 ++	  _M_data->_M_aday6 = L"Fri";
306.2479 ++	  _M_data->_M_aday7 = L"Sat";
306.2480 ++
306.2481 ++	  // Month names, starting with "C"'s January.
306.2482 ++	  _M_data->_M_month01 = L"January";
306.2483 ++	  _M_data->_M_month02 = L"February";
306.2484 ++	  _M_data->_M_month03 = L"March";
306.2485 ++	  _M_data->_M_month04 = L"April";
306.2486 ++	  _M_data->_M_month05 = L"May";
306.2487 ++	  _M_data->_M_month06 = L"June";
306.2488 ++	  _M_data->_M_month07 = L"July";
306.2489 ++	  _M_data->_M_month08 = L"August";
306.2490 ++	  _M_data->_M_month09 = L"September";
306.2491 ++	  _M_data->_M_month10 = L"October";
306.2492 ++	  _M_data->_M_month11 = L"November";
306.2493 ++	  _M_data->_M_month12 = L"December";
306.2494 ++
306.2495 ++	  // Abbreviated month names, starting with "C"'s Jan.
306.2496 ++	  _M_data->_M_amonth01 = L"Jan";
306.2497 ++	  _M_data->_M_amonth02 = L"Feb";
306.2498 ++	  _M_data->_M_amonth03 = L"Mar";
306.2499 ++	  _M_data->_M_amonth04 = L"Apr";
306.2500 ++	  _M_data->_M_amonth05 = L"May";
306.2501 ++	  _M_data->_M_amonth06 = L"Jun";
306.2502 ++	  _M_data->_M_amonth07 = L"Jul";
306.2503 ++	  _M_data->_M_amonth08 = L"Aug";
306.2504 ++	  _M_data->_M_amonth09 = L"Sep";
306.2505 ++	  _M_data->_M_amonth10 = L"Oct";
306.2506 ++	  _M_data->_M_amonth11 = L"Nov";
306.2507 ++	  _M_data->_M_amonth12 = L"Dec";
306.2508 ++	}
306.2509 ++#if 0
306.2510 ++      else
306.2511 ++	{
306.2512 ++	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
306.2513 ++
306.2514 ++	  union { char *__s; wchar_t *__w; } __u;
306.2515 ++
306.2516 ++	  __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
306.2517 ++	  _M_data->_M_date_format = __u.__w;
306.2518 ++	  __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
306.2519 ++	  _M_data->_M_date_era_format = __u.__w;
306.2520 ++	  __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
306.2521 ++	  _M_data->_M_time_format = __u.__w;
306.2522 ++	  __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
306.2523 ++	  _M_data->_M_time_era_format = __u.__w;
306.2524 ++	  __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
306.2525 ++	  _M_data->_M_date_time_format = __u.__w;
306.2526 ++	  __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
306.2527 ++	  _M_data->_M_date_time_era_format = __u.__w;
306.2528 ++	  __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
306.2529 ++	  _M_data->_M_am = __u.__w;
306.2530 ++	  __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
306.2531 ++	  _M_data->_M_pm = __u.__w;
306.2532 ++	  __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
306.2533 ++	  _M_data->_M_am_pm_format = __u.__w;
306.2534 ++
306.2535 ++	  // Day names, starting with "C"'s Sunday.
306.2536 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
306.2537 ++	  _M_data->_M_day1 = __u.__w;
306.2538 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
306.2539 ++	  _M_data->_M_day2 = __u.__w;
306.2540 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
306.2541 ++	  _M_data->_M_day3 = __u.__w;
306.2542 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
306.2543 ++	  _M_data->_M_day4 = __u.__w;
306.2544 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
306.2545 ++	  _M_data->_M_day5 = __u.__w;
306.2546 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
306.2547 ++	  _M_data->_M_day6 = __u.__w;
306.2548 ++	  __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
306.2549 ++	  _M_data->_M_day7 = __u.__w;
306.2550 ++
306.2551 ++	  // Abbreviated day names, starting with "C"'s Sun.
306.2552 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
306.2553 ++	  _M_data->_M_aday1 = __u.__w;
306.2554 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
306.2555 ++	  _M_data->_M_aday2 = __u.__w;
306.2556 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
306.2557 ++	  _M_data->_M_aday3 = __u.__w;
306.2558 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
306.2559 ++	  _M_data->_M_aday4 = __u.__w;
306.2560 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
306.2561 ++	  _M_data->_M_aday5 = __u.__w;
306.2562 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
306.2563 ++	  _M_data->_M_aday6 = __u.__w;
306.2564 ++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
306.2565 ++	  _M_data->_M_aday7 = __u.__w;
306.2566 ++
306.2567 ++	  // Month names, starting with "C"'s January.
306.2568 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
306.2569 ++	  _M_data->_M_month01 = __u.__w;
306.2570 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
306.2571 ++	  _M_data->_M_month02 = __u.__w;
306.2572 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
306.2573 ++	  _M_data->_M_month03 = __u.__w;
306.2574 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
306.2575 ++	  _M_data->_M_month04 = __u.__w;
306.2576 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
306.2577 ++	  _M_data->_M_month05 = __u.__w;
306.2578 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
306.2579 ++	  _M_data->_M_month06 = __u.__w;
306.2580 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
306.2581 ++	  _M_data->_M_month07 = __u.__w;
306.2582 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
306.2583 ++	  _M_data->_M_month08 = __u.__w;
306.2584 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
306.2585 ++	  _M_data->_M_month09 = __u.__w;
306.2586 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
306.2587 ++	  _M_data->_M_month10 = __u.__w;
306.2588 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
306.2589 ++	  _M_data->_M_month11 = __u.__w;
306.2590 ++	  __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
306.2591 ++	  _M_data->_M_month12 = __u.__w;
306.2592 ++
306.2593 ++	  // Abbreviated month names, starting with "C"'s Jan.
306.2594 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
306.2595 ++	  _M_data->_M_amonth01 = __u.__w;
306.2596 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
306.2597 ++	  _M_data->_M_amonth02 = __u.__w;
306.2598 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
306.2599 ++	  _M_data->_M_amonth03 = __u.__w;
306.2600 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
306.2601 ++	  _M_data->_M_amonth04 = __u.__w;
306.2602 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
306.2603 ++	  _M_data->_M_amonth05 = __u.__w;
306.2604 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
306.2605 ++	  _M_data->_M_amonth06 = __u.__w;
306.2606 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
306.2607 ++	  _M_data->_M_amonth07 = __u.__w;
306.2608 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
306.2609 ++	  _M_data->_M_amonth08 = __u.__w;
306.2610 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
306.2611 ++	  _M_data->_M_amonth09 = __u.__w;
306.2612 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
306.2613 ++	  _M_data->_M_amonth10 = __u.__w;
306.2614 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
306.2615 ++	  _M_data->_M_amonth11 = __u.__w;
306.2616 ++	  __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
306.2617 ++	  _M_data->_M_amonth12 = __u.__w;
306.2618 ++	}
306.2619 ++#endif // 0
306.2620 ++    }
306.2621 ++#endif
306.2622 ++}
306.2623 +--- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h
306.2624 ++++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h
306.2625 +@@ -0,0 +1,76 @@
306.2626 ++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
306.2627 ++
306.2628 ++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
306.2629 ++//
306.2630 ++// This file is part of the GNU ISO C++ Library.  This library is free
306.2631 ++// software; you can redistribute it and/or modify it under the
306.2632 ++// terms of the GNU General Public License as published by the
306.2633 ++// Free Software Foundation; either version 2, or (at your option)
306.2634 ++// any later version.
306.2635 ++
306.2636 ++// This library is distributed in the hope that it will be useful,
306.2637 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
306.2638 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
306.2639 ++// GNU General Public License for more details.
306.2640 ++
306.2641 ++// You should have received a copy of the GNU General Public License along
306.2642 ++// with this library; see the file COPYING.  If not, write to the Free
306.2643 ++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
306.2644 ++// USA.
306.2645 ++
306.2646 ++// As a special exception, you may use this file as part of a free software
306.2647 ++// library without restriction.  Specifically, if other files instantiate
306.2648 ++// templates or use macros or inline functions from this file, or you compile
306.2649 ++// this file and link it with other files to produce an executable, this
306.2650 ++// file does not by itself cause the resulting executable to be covered by
306.2651 ++// the GNU General Public License.  This exception does not however
306.2652 ++// invalidate any other reasons why the executable file might be covered by
306.2653 ++// the GNU General Public License.
306.2654 ++
306.2655 ++//
306.2656 ++// ISO C++ 14882: 22.2.5.1.2 - time_get functions
306.2657 ++// ISO C++ 14882: 22.2.5.3.2 - time_put functions
306.2658 ++//
306.2659 ++
306.2660 ++// Written by Benjamin Kosnik <bkoz@redhat.com>
306.2661 ++
306.2662 ++  template<typename _CharT>
306.2663 ++    __timepunct<_CharT>::__timepunct(size_t __refs) 
306.2664 ++    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
306.2665 ++      _M_name_timepunct(_S_get_c_name())
306.2666 ++    { _M_initialize_timepunct(); }
306.2667 ++
306.2668 ++  template<typename _CharT>
306.2669 ++    __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) 
306.2670 ++    : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), 
306.2671 ++      _M_name_timepunct(_S_get_c_name())
306.2672 ++    { _M_initialize_timepunct(); }
306.2673 ++
306.2674 ++  template<typename _CharT>
306.2675 ++    __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
306.2676 ++				     size_t __refs) 
306.2677 ++    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), 
306.2678 ++      _M_name_timepunct(NULL)
306.2679 ++    { 
306.2680 ++      const size_t __len = std::strlen(__s) + 1;
306.2681 ++      char* __tmp = new char[__len];
306.2682 ++      std::memcpy(__tmp, __s, __len);
306.2683 ++      _M_name_timepunct = __tmp;
306.2684 ++
306.2685 ++      try
306.2686 ++	{ _M_initialize_timepunct(__cloc); }
306.2687 ++      catch(...)
306.2688 ++	{
306.2689 ++	  delete [] _M_name_timepunct;
306.2690 ++	  __throw_exception_again;
306.2691 ++	}
306.2692 ++    }
306.2693 ++
306.2694 ++  template<typename _CharT>
306.2695 ++    __timepunct<_CharT>::~__timepunct()
306.2696 ++    { 
306.2697 ++      if (_M_name_timepunct != _S_get_c_name())
306.2698 ++	delete [] _M_name_timepunct;
306.2699 ++      delete _M_data; 
306.2700 ++      _S_destroy_c_locale(_M_c_locale_timepunct); 
306.2701 ++    }
306.2702 +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_base.h
306.2703 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h
306.2704 +@@ -0,0 +1,64 @@
306.2705 ++// Locale support -*- C++ -*-
306.2706 ++
306.2707 ++// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004
306.2708 ++// Free Software Foundation, Inc.
306.2709 ++//
306.2710 ++// This file is part of the GNU ISO C++ Library.  This library is free
306.2711 ++// software; you can redistribute it and/or modify it under the
306.2712 ++// terms of the GNU General Public License as published by the
306.2713 ++// Free Software Foundation; either version 2, or (at your option)
306.2714 ++// any later version.
306.2715 ++
306.2716 ++// This library is distributed in the hope that it will be useful,
306.2717 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
306.2718 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
306.2719 ++// GNU General Public License for more details.
306.2720 ++
306.2721 ++// You should have received a copy of the GNU General Public License along
306.2722 ++// with this library; see the file COPYING.  If not, write to the Free
306.2723 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
306.2724 ++// USA.
306.2725 ++
306.2726 ++// As a special exception, you may use this file as part of a free software
306.2727 ++// library without restriction.  Specifically, if other files instantiate
306.2728 ++// templates or use macros or inline functions from this file, or you compile
306.2729 ++// this file and link it with other files to produce an executable, this
306.2730 ++// file does not by itself cause the resulting executable to be covered by
306.2731 ++// the GNU General Public License.  This exception does not however
306.2732 ++// invalidate any other reasons why the executable file might be covered by
306.2733 ++// the GNU General Public License.
306.2734 ++
306.2735 ++//
306.2736 ++// ISO C++ 14882: 22.1  Locales
306.2737 ++//
306.2738 ++  
306.2739 ++/** @file ctype_base.h
306.2740 ++ *  This is an internal header file, included by other library headers.
306.2741 ++ *  You should not attempt to use it directly.
306.2742 ++ */
306.2743 ++
306.2744 ++// Information as gleaned from /usr/include/ctype.h
306.2745 ++  
306.2746 ++  /// @brief  Base class for ctype.
306.2747 ++  struct ctype_base
306.2748 ++  {
306.2749 ++    // Note: In uClibc, the following two types depend on configuration.
306.2750 ++ 
306.2751 ++    // Non-standard typedefs.
306.2752 ++    typedef const __ctype_touplow_t* __to_type;
306.2753 ++
306.2754 ++    // NB: Offsets into ctype<char>::_M_table force a particular size
306.2755 ++    // on the mask type. Because of this, we don't use an enum.
306.2756 ++    typedef __ctype_mask_t	mask;   
306.2757 ++    static const mask upper    	= _ISupper;
306.2758 ++    static const mask lower 	= _ISlower;
306.2759 ++    static const mask alpha 	= _ISalpha;
306.2760 ++    static const mask digit 	= _ISdigit;
306.2761 ++    static const mask xdigit 	= _ISxdigit;
306.2762 ++    static const mask space 	= _ISspace;
306.2763 ++    static const mask print 	= _ISprint;
306.2764 ++    static const mask graph 	= _ISalpha | _ISdigit | _ISpunct;
306.2765 ++    static const mask cntrl 	= _IScntrl;
306.2766 ++    static const mask punct 	= _ISpunct;
306.2767 ++    static const mask alnum 	= _ISalpha | _ISdigit;
306.2768 ++  };
306.2769 +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h
306.2770 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h
306.2771 +@@ -0,0 +1,69 @@
306.2772 ++// Locale support -*- C++ -*-
306.2773 ++
306.2774 ++// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
306.2775 ++//
306.2776 ++// This file is part of the GNU ISO C++ Library.  This library is free
306.2777 ++// software; you can redistribute it and/or modify it under the
306.2778 ++// terms of the GNU General Public License as published by the
306.2779 ++// Free Software Foundation; either version 2, or (at your option)
306.2780 ++// any later version.
306.2781 ++
306.2782 ++// This library is distributed in the hope that it will be useful,
306.2783 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
306.2784 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
306.2785 ++// GNU General Public License for more details.
306.2786 ++
306.2787 ++// You should have received a copy of the GNU General Public License along
306.2788 ++// with this library; see the file COPYING.  If not, write to the Free
306.2789 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
306.2790 ++// USA.
306.2791 ++
306.2792 ++// As a special exception, you may use this file as part of a free software
306.2793 ++// library without restriction.  Specifically, if other files instantiate
306.2794 ++// templates or use macros or inline functions from this file, or you compile
306.2795 ++// this file and link it with other files to produce an executable, this
306.2796 ++// file does not by itself cause the resulting executable to be covered by
306.2797 ++// the GNU General Public License.  This exception does not however
306.2798 ++// invalidate any other reasons why the executable file might be covered by
306.2799 ++// the GNU General Public License.
306.2800 ++
306.2801 ++//
306.2802 ++// ISO C++ 14882: 22.1  Locales
306.2803 ++//
306.2804 ++  
306.2805 ++// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
306.2806 ++// functions go in ctype.cc
306.2807 ++  
306.2808 ++  bool
306.2809 ++  ctype<char>::
306.2810 ++  is(mask __m, char __c) const
306.2811 ++  { return _M_table[static_cast<unsigned char>(__c)] & __m; }
306.2812 ++
306.2813 ++  const char*
306.2814 ++  ctype<char>::
306.2815 ++  is(const char* __low, const char* __high, mask* __vec) const
306.2816 ++  {
306.2817 ++    while (__low < __high)
306.2818 ++      *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
306.2819 ++    return __high;
306.2820 ++  }
306.2821 ++
306.2822 ++  const char*
306.2823 ++  ctype<char>::
306.2824 ++  scan_is(mask __m, const char* __low, const char* __high) const
306.2825 ++  {
306.2826 ++    while (__low < __high 
306.2827 ++	   && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
306.2828 ++      ++__low;
306.2829 ++    return __low;
306.2830 ++  }
306.2831 ++
306.2832 ++  const char*
306.2833 ++  ctype<char>::
306.2834 ++  scan_not(mask __m, const char* __low, const char* __high) const
306.2835 ++  {
306.2836 ++    while (__low < __high 
306.2837 ++	   && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
306.2838 ++      ++__low;
306.2839 ++    return __low;
306.2840 ++  }
306.2841 +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h
306.2842 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h
306.2843 +@@ -0,0 +1,92 @@
306.2844 ++// Locale support -*- C++ -*-
306.2845 ++
306.2846 ++// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
306.2847 ++// Free Software Foundation, Inc.
306.2848 ++//
306.2849 ++// This file is part of the GNU ISO C++ Library.  This library is free
306.2850 ++// software; you can redistribute it and/or modify it under the
306.2851 ++// terms of the GNU General Public License as published by the
306.2852 ++// Free Software Foundation; either version 2, or (at your option)
306.2853 ++// any later version.
306.2854 ++
306.2855 ++// This library is distributed in the hope that it will be useful,
306.2856 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
306.2857 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
306.2858 ++// GNU General Public License for more details.
306.2859 ++
306.2860 ++// You should have received a copy of the GNU General Public License along
306.2861 ++// with this library; see the file COPYING.  If not, write to the Free
306.2862 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
306.2863 ++// USA.
306.2864 ++
306.2865 ++// As a special exception, you may use this file as part of a free software
306.2866 ++// library without restriction.  Specifically, if other files instantiate
306.2867 ++// templates or use macros or inline functions from this file, or you compile
306.2868 ++// this file and link it with other files to produce an executable, this
306.2869 ++// file does not by itself cause the resulting executable to be covered by
306.2870 ++// the GNU General Public License.  This exception does not however
306.2871 ++// invalidate any other reasons why the executable file might be covered by
306.2872 ++// the GNU General Public License.
306.2873 ++
306.2874 ++//
306.2875 ++// ISO C++ 14882: 22.1  Locales
306.2876 ++//
306.2877 ++  
306.2878 ++// Information as gleaned from /usr/include/ctype.h
306.2879 ++
306.2880 ++  const ctype_base::mask*
306.2881 ++  ctype<char>::classic_table() throw()
306.2882 ++  { return __C_ctype_b; }
306.2883 ++
306.2884 ++  ctype<char>::ctype(__c_locale, const mask* __table, bool __del, 
306.2885 ++		     size_t __refs) 
306.2886 ++  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
306.2887 ++  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
306.2888 ++  {
306.2889 ++    _M_toupper = __C_ctype_toupper;
306.2890 ++    _M_tolower = __C_ctype_tolower;
306.2891 ++    _M_table = __table ? __table : __C_ctype_b;
306.2892 ++    memset(_M_widen, 0, sizeof(_M_widen));
306.2893 ++    memset(_M_narrow, 0, sizeof(_M_narrow));
306.2894 ++  }
306.2895 ++
306.2896 ++  ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
306.2897 ++  : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), 
306.2898 ++  _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
306.2899 ++  {
306.2900 ++    _M_toupper = __C_ctype_toupper;
306.2901 ++    _M_tolower = __C_ctype_tolower;
306.2902 ++    _M_table = __table ? __table : __C_ctype_b;
306.2903 ++    memset(_M_widen, 0, sizeof(_M_widen));
306.2904 ++    memset(_M_narrow, 0, sizeof(_M_narrow));
306.2905 ++  }
306.2906 ++
306.2907 ++  char
306.2908 ++  ctype<char>::do_toupper(char __c) const
306.2909 ++  { return _M_toupper[static_cast<unsigned char>(__c)]; }
306.2910 ++
306.2911 ++  const char*
306.2912 ++  ctype<char>::do_toupper(char* __low, const char* __high) const
306.2913 ++  {
306.2914 ++    while (__low < __high)
306.2915 ++      {
306.2916 ++	*__low = _M_toupper[static_cast<unsigned char>(*__low)];
306.2917 ++	++__low;
306.2918 ++      }
306.2919 ++    return __high;
306.2920 ++  }
306.2921 ++
306.2922 ++  char
306.2923 ++  ctype<char>::do_tolower(char __c) const
306.2924 ++  { return _M_tolower[static_cast<unsigned char>(__c)]; }
306.2925 ++
306.2926 ++  const char* 
306.2927 ++  ctype<char>::do_tolower(char* __low, const char* __high) const
306.2928 ++  {
306.2929 ++    while (__low < __high)
306.2930 ++      {
306.2931 ++	*__low = _M_tolower[static_cast<unsigned char>(*__low)];
306.2932 ++	++__low;
306.2933 ++      }
306.2934 ++    return __high;
306.2935 ++  }
306.2936 +--- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/os_defines.h
306.2937 ++++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h
306.2938 +@@ -0,0 +1,44 @@
306.2939 ++// Specific definitions for GNU/Linux  -*- C++ -*-
306.2940 ++
306.2941 ++// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
306.2942 ++//
306.2943 ++// This file is part of the GNU ISO C++ Library.  This library is free
306.2944 ++// software; you can redistribute it and/or modify it under the
306.2945 ++// terms of the GNU General Public License as published by the
306.2946 ++// Free Software Foundation; either version 2, or (at your option)
306.2947 ++// any later version.
306.2948 ++
306.2949 ++// This library is distributed in the hope that it will be useful,
306.2950 ++// but WITHOUT ANY WARRANTY; without even the implied warranty of
306.2951 ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
306.2952 ++// GNU General Public License for more details.
306.2953 ++
306.2954 ++// You should have received a copy of the GNU General Public License along
306.2955 ++// with this library; see the file COPYING.  If not, write to the Free
306.2956 ++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
306.2957 ++// USA.
306.2958 ++
306.2959 ++// As a special exception, you may use this file as part of a free software
306.2960 ++// library without restriction.  Specifically, if other files instantiate
306.2961 ++// templates or use macros or inline functions from this file, or you compile
306.2962 ++// this file and link it with other files to produce an executable, this
306.2963 ++// file does not by itself cause the resulting executable to be covered by
306.2964 ++// the GNU General Public License.  This exception does not however
306.2965 ++// invalidate any other reasons why the executable file might be covered by
306.2966 ++// the GNU General Public License.
306.2967 ++
306.2968 ++#ifndef _GLIBCXX_OS_DEFINES
306.2969 ++#define _GLIBCXX_OS_DEFINES 1
306.2970 ++
306.2971 ++// System-specific #define, typedefs, corrections, etc, go here.  This
306.2972 ++// file will come before all others.
306.2973 ++
306.2974 ++// This keeps isanum, et al from being propagated as macros.
306.2975 ++#define __NO_CTYPE 1
306.2976 ++
306.2977 ++#include <features.h>
306.2978 ++
306.2979 ++// We must not see the optimized string functions GNU libc defines.
306.2980 ++#define __NO_STRING_INLINES
306.2981 ++
306.2982 ++#endif
306.2983 +--- gcc-4.1.0-dist/libstdc++-v3/configure
306.2984 ++++ gcc-4.1.0/libstdc++-v3/configure
306.2985 +@@ -4005,6 +4005,11 @@
306.2986 +   lt_cv_deplibs_check_method=pass_all
306.2987 +   ;;
306.2988 + 
306.2989 ++linux-uclibc*)
306.2990 ++  lt_cv_deplibs_check_method=pass_all
306.2991 ++  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
306.2992 ++  ;;
306.2993 ++
306.2994 + netbsd* | knetbsd*-gnu)
306.2995 +   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
306.2996 +     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
306.2997 +@@ -5740,7 +5745,7 @@
306.2998 +   enableval="$enable_clocale"
306.2999 + 
306.3000 +       case "$enableval" in
306.3001 +-       generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
306.3002 ++       generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
306.3003 +        *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
306.3004 + echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
306.3005 +    { (exit 1); exit 1; }; } ;;
306.3006 +@@ -5765,6 +5770,9 @@
306.3007 +   # Default to "generic".
306.3008 +   if test $enable_clocale_flag = auto; then
306.3009 +     case ${target_os} in
306.3010 ++      linux-uclibc*)
306.3011 ++        enable_clocale_flag=uclibc
306.3012 ++	;;
306.3013 +       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
306.3014 +         cat >conftest.$ac_ext <<_ACEOF
306.3015 + /* confdefs.h.  */
306.3016 +@@ -5995,6 +6003,76 @@
306.3017 +       CTIME_CC=config/locale/generic/time_members.cc
306.3018 +       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
306.3019 +       ;;
306.3020 ++    uclibc)
306.3021 ++      echo "$as_me:$LINENO: result: uclibc" >&5
306.3022 ++echo "${ECHO_T}uclibc" >&6
306.3023 ++
306.3024 ++      # Declare intention to use gettext, and add support for specific
306.3025 ++      # languages.
306.3026 ++      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
306.3027 ++      ALL_LINGUAS="de fr"
306.3028 ++
306.3029 ++      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
306.3030 ++      # Extract the first word of "msgfmt", so it can be a program name with args.
306.3031 ++set dummy msgfmt; ac_word=$2
306.3032 ++echo "$as_me:$LINENO: checking for $ac_word" >&5
306.3033 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
306.3034 ++if test "${ac_cv_prog_check_msgfmt+set}" = set; then
306.3035 ++  echo $ECHO_N "(cached) $ECHO_C" >&6
306.3036 ++else
306.3037 ++  if test -n "$check_msgfmt"; then
306.3038 ++  ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
306.3039 ++else
306.3040 ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
306.3041 ++for as_dir in $PATH
306.3042 ++do
306.3043 ++  IFS=$as_save_IFS
306.3044 ++  test -z "$as_dir" && as_dir=.
306.3045 ++  for ac_exec_ext in '' $ac_executable_extensions; do
306.3046 ++  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
306.3047 ++    ac_cv_prog_check_msgfmt="yes"
306.3048 ++    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
306.3049 ++    break 2
306.3050 ++  fi
306.3051 ++done
306.3052 ++done
306.3053 ++
306.3054 ++  test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
306.3055 ++fi
306.3056 ++fi
306.3057 ++check_msgfmt=$ac_cv_prog_check_msgfmt
306.3058 ++if test -n "$check_msgfmt"; then
306.3059 ++  echo "$as_me:$LINENO: result: $check_msgfmt" >&5
306.3060 ++echo "${ECHO_T}$check_msgfmt" >&6
306.3061 ++else
306.3062 ++  echo "$as_me:$LINENO: result: no" >&5
306.3063 ++echo "${ECHO_T}no" >&6
306.3064 ++fi
306.3065 ++
306.3066 ++      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
306.3067 ++        USE_NLS=yes
306.3068 ++      fi
306.3069 ++      # Export the build objects.
306.3070 ++      for ling in $ALL_LINGUAS; do \
306.3071 ++        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
306.3072 ++        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
306.3073 ++      done
306.3074 ++
306.3075 ++
306.3076 ++
306.3077 ++      CLOCALE_H=config/locale/uclibc/c_locale.h
306.3078 ++      CLOCALE_CC=config/locale/uclibc/c_locale.cc
306.3079 ++      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
306.3080 ++      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
306.3081 ++      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
306.3082 ++      CMESSAGES_H=config/locale/uclibc/messages_members.h
306.3083 ++      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
306.3084 ++      CMONEY_CC=config/locale/uclibc/monetary_members.cc
306.3085 ++      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
306.3086 ++      CTIME_H=config/locale/uclibc/time_members.h
306.3087 ++      CTIME_CC=config/locale/uclibc/time_members.cc
306.3088 ++      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
306.3089 ++      ;;
306.3090 +   esac
306.3091 + 
306.3092 +   # This is where the testsuite looks for locale catalogs, using the
306.3093 +--- gcc-4.1.0-dist/libstdc++-v3/configure.host
306.3094 ++++ gcc-4.1.0/libstdc++-v3/configure.host
306.3095 +@@ -261,6 +261,12 @@
306.3096 +     ;;
306.3097 + esac
306.3098 + 
306.3099 ++# Override for uClibc since linux-uclibc gets mishandled above.
306.3100 ++case "${host_os}" in
306.3101 ++  *-uclibc*)
306.3102 ++    os_include_dir="os/uclibc"
306.3103 ++    ;;
306.3104 ++esac
306.3105 + 
306.3106 + # Set any OS-dependent and CPU-dependent bits.
306.3107 + # THIS TABLE IS SORTED.  KEEP IT THAT WAY.
306.3108 +--- gcc-4.1.0-dist/libstdc++-v3/crossconfig.m4
306.3109 ++++ gcc-4.1.0/libstdc++-v3/crossconfig.m4
306.3110 +@@ -143,6 +143,99 @@
306.3111 + 	;;
306.3112 +     esac
306.3113 +     ;;
306.3114 ++  *-uclibc*)
306.3115 ++# Temporary hack until we implement the float versions of the libm funcs
306.3116 ++    AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
306.3117 ++      machine/endian.h machine/param.h sys/machine.h sys/types.h \
306.3118 ++      fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
306.3119 ++    SECTION_FLAGS='-ffunction-sections -fdata-sections'
306.3120 ++    AC_SUBST(SECTION_FLAGS)
306.3121 ++    GLIBCXX_CHECK_LINKER_FEATURES
306.3122 ++    GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
306.3123 ++    GLIBCXX_CHECK_WCHAR_T_SUPPORT
306.3124 ++
306.3125 ++    # For LFS.
306.3126 ++    AC_DEFINE(HAVE_INT64_T)
306.3127 ++    case "$target" in
306.3128 ++      *-uclinux*)
306.3129 ++        # Don't enable LFS with uClinux
306.3130 ++        ;;
306.3131 ++      *)
306.3132 ++        AC_DEFINE(_GLIBCXX_USE_LFS)
306.3133 ++    esac
306.3134 ++
306.3135 ++    # For showmanyc_helper().
306.3136 ++    AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
306.3137 ++    GLIBCXX_CHECK_POLL
306.3138 ++    GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
306.3139 ++
306.3140 ++    # For xsputn_2().
306.3141 ++    AC_CHECK_HEADERS(sys/uio.h)
306.3142 ++    GLIBCXX_CHECK_WRITEV
306.3143 ++
306.3144 ++#     AC_DEFINE(HAVE_ACOSF)
306.3145 ++#     AC_DEFINE(HAVE_ASINF)
306.3146 ++#     AC_DEFINE(HAVE_ATANF)
306.3147 ++#     AC_DEFINE(HAVE_ATAN2F)
306.3148 ++    AC_DEFINE(HAVE_CEILF)
306.3149 ++    AC_DEFINE(HAVE_COPYSIGN)
306.3150 ++#     AC_DEFINE(HAVE_COPYSIGNF)
306.3151 ++#     AC_DEFINE(HAVE_COSF)
306.3152 ++#     AC_DEFINE(HAVE_COSHF)
306.3153 ++#     AC_DEFINE(HAVE_EXPF)
306.3154 ++#     AC_DEFINE(HAVE_FABSF)
306.3155 ++    AC_DEFINE(HAVE_FINITE)
306.3156 ++    AC_DEFINE(HAVE_FINITEF)
306.3157 ++    AC_DEFINE(HAVE_FLOORF)
306.3158 ++#     AC_DEFINE(HAVE_FMODF)
306.3159 ++#     AC_DEFINE(HAVE_FREXPF)
306.3160 ++    AC_DEFINE(HAVE_HYPOT)
306.3161 ++#     AC_DEFINE(HAVE_HYPOTF)
306.3162 ++    AC_DEFINE(HAVE_ISINF)
306.3163 ++    AC_DEFINE(HAVE_ISINFF)
306.3164 ++    AC_DEFINE(HAVE_ISNAN)
306.3165 ++    AC_DEFINE(HAVE_ISNANF)
306.3166 ++#     AC_DEFINE(HAVE_LOGF)
306.3167 ++#     AC_DEFINE(HAVE_LOG10F)
306.3168 ++#     AC_DEFINE(HAVE_MODFF)
306.3169 ++#     AC_DEFINE(HAVE_SINF)
306.3170 ++#     AC_DEFINE(HAVE_SINHF)
306.3171 ++#     AC_DEFINE(HAVE_SINCOS)
306.3172 ++#     AC_DEFINE(HAVE_SINCOSF)
306.3173 ++    AC_DEFINE(HAVE_SQRTF)
306.3174 ++#     AC_DEFINE(HAVE_TANF)
306.3175 ++#     AC_DEFINE(HAVE_TANHF)
306.3176 ++    if test x"long_double_math_on_this_cpu" = x"yes"; then
306.3177 ++      AC_MSG_ERROR([long_double_math_on_this_cpu is yes!])
306.3178 ++#       AC_DEFINE(HAVE_ACOSL)
306.3179 ++#       AC_DEFINE(HAVE_ASINL)
306.3180 ++#       AC_DEFINE(HAVE_ATANL)
306.3181 ++#       AC_DEFINE(HAVE_ATAN2L)
306.3182 ++#       AC_DEFINE(HAVE_CEILL)
306.3183 ++#       AC_DEFINE(HAVE_COPYSIGNL)
306.3184 ++#       AC_DEFINE(HAVE_COSL)
306.3185 ++#       AC_DEFINE(HAVE_COSHL)
306.3186 ++#       AC_DEFINE(HAVE_EXPL)
306.3187 ++#       AC_DEFINE(HAVE_FABSL)
306.3188 ++#       AC_DEFINE(HAVE_FINITEL)
306.3189 ++#       AC_DEFINE(HAVE_FLOORL)
306.3190 ++#       AC_DEFINE(HAVE_FMODL)
306.3191 ++#       AC_DEFINE(HAVE_FREXPL)
306.3192 ++#       AC_DEFINE(HAVE_HYPOTL)
306.3193 ++#       AC_DEFINE(HAVE_ISINFL)
306.3194 ++#       AC_DEFINE(HAVE_ISNANL)
306.3195 ++#       AC_DEFINE(HAVE_LOGL)
306.3196 ++#       AC_DEFINE(HAVE_LOG10L)
306.3197 ++#       AC_DEFINE(HAVE_MODFL)
306.3198 ++#       AC_DEFINE(HAVE_POWL)
306.3199 ++#       AC_DEFINE(HAVE_SINL)
306.3200 ++#       AC_DEFINE(HAVE_SINHL)
306.3201 ++#       AC_DEFINE(HAVE_SINCOSL)
306.3202 ++#       AC_DEFINE(HAVE_SQRTL)
306.3203 ++#       AC_DEFINE(HAVE_TANL)
306.3204 ++#       AC_DEFINE(HAVE_TANHL)
306.3205 ++    fi
306.3206 ++    ;;
306.3207 +   *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
306.3208 +     AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
306.3209 +       machine/endian.h machine/param.h sys/machine.h sys/types.h \
306.3210 +@@ -157,7 +250,7 @@
306.3211 +     AC_DEFINE(HAVE_INT64_T)
306.3212 +     case "$target" in
306.3213 +       *-uclinux*)
306.3214 +-        # Don't enable LFS with uClibc
306.3215 ++        # Don't enable LFS with uClinux
306.3216 +         ;;
306.3217 +       *)
306.3218 +         AC_DEFINE(_GLIBCXX_USE_LFS)
306.3219 +--- gcc-4.1.0-dist/libstdc++-v3/include/c_compatibility/wchar.h
306.3220 ++++ gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h
306.3221 +@@ -101,7 +101,9 @@
306.3222 + using std::wmemcpy;
306.3223 + using std::wmemmove;
306.3224 + using std::wmemset;
306.3225 ++#if _GLIBCXX_HAVE_WCSFTIME
306.3226 + using std::wcsftime;
306.3227 ++#endif
306.3228 + 
306.3229 + #if _GLIBCXX_USE_C99
306.3230 + using std::wcstold;
306.3231 +--- gcc-4.1.0-dist/libstdc++-v3/include/c_std/std_cwchar.h
306.3232 ++++ gcc-4.1.0/libstdc++-v3/include/c_std/std_cwchar.h
306.3233 +@@ -180,7 +180,9 @@
306.3234 +   using ::wcscoll;
306.3235 +   using ::wcscpy;
306.3236 +   using ::wcscspn;
306.3237 ++#if _GLIBCXX_HAVE_WCSFTIME
306.3238 +   using ::wcsftime;
306.3239 ++#endif
306.3240 +   using ::wcslen;
306.3241 +   using ::wcsncat;
306.3242 +   using ::wcsncmp;
   307.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   307.2 +++ b/patches/gcc/4.1.2/300-libstdc++-pic.patch	Sat Feb 24 11:00:05 2007 +0000
   307.3 @@ -0,0 +1,50 @@
   307.4 +# DP: Build and install libstdc++_pic.a library.
   307.5 +
   307.6 +--- gcc/libstdc++-v3/src/Makefile.am
   307.7 ++++ gcc/libstdc++-v3/src/Makefile.am
   307.8 +@@ -214,6 +214,12 @@
   307.9 + 	  $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
  307.10 + 
  307.11 + 
  307.12 ++install-exec-local:
  307.13 ++ifeq ($(enable_shared),yes)
  307.14 ++	$(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
  307.15 ++	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
  307.16 ++endif
  307.17 ++
  307.18 + # Added bits to build debug library.
  307.19 + if GLIBCXX_BUILD_DEBUG
  307.20 + all-local: build_debug
  307.21 +--- gcc/libstdc++-v3/src/Makefile.in
  307.22 ++++ gcc/libstdc++-v3/src/Makefile.in
  307.23 +@@ -627,7 +627,7 @@
  307.24 + 
  307.25 + install-data-am: install-data-local
  307.26 + 
  307.27 +-install-exec-am: install-toolexeclibLTLIBRARIES
  307.28 ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
  307.29 + 
  307.30 + install-info: install-info-am
  307.31 + 
  307.32 +@@ -660,6 +660,7 @@
  307.33 + 	distclean-libtool distclean-tags distdir dvi dvi-am html \
  307.34 + 	html-am info info-am install install-am install-data \
  307.35 + 	install-data-am install-data-local install-exec \
  307.36 ++	install-exec-local \
  307.37 + 	install-exec-am install-info install-info-am install-man \
  307.38 + 	install-strip install-toolexeclibLTLIBRARIES installcheck \
  307.39 + 	installcheck-am installdirs maintainer-clean \
  307.40 +@@ -743,6 +743,13 @@
  307.41 + install_debug:
  307.42 + 	(cd ${debugdir} && $(MAKE) \
  307.43 + 	toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
  307.44 ++
  307.45 ++install-exec-local:
  307.46 ++ifeq ($(enable_shared),yes)
  307.47 ++	$(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
  307.48 ++	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
  307.49 ++endif
  307.50 ++
  307.51 + # Tell versions [3.59,3.63) of GNU make to not export all variables.
  307.52 + # Otherwise a system limit (for SysV at least) may be exceeded.
  307.53 + .NOEXPORT:
   308.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   308.2 +++ b/patches/gcc/4.1.2/301-missing-execinfo_h.patch	Sat Feb 24 11:00:05 2007 +0000
   308.3 @@ -0,0 +1,11 @@
   308.4 +--- gcc-4.0.0/boehm-gc/include/gc.h-orig	2005-04-28 22:28:57.000000000 -0500
   308.5 ++++ gcc-4.0.0/boehm-gc/include/gc.h	2005-04-28 22:30:38.000000000 -0500
   308.6 +@@ -500,7 +500,7 @@
   308.7 + #ifdef __linux__
   308.8 + # include <features.h>
   308.9 + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
  308.10 +-     && !defined(__ia64__)
  308.11 ++     && !defined(__ia64__) && !defined(__UCLIBC__)
  308.12 + #   ifndef GC_HAVE_BUILTIN_BACKTRACE
  308.13 + #     define GC_HAVE_BUILTIN_BACKTRACE
  308.14 + #   endif
   309.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   309.2 +++ b/patches/gcc/4.1.2/302-c99-snprintf.patch	Sat Feb 24 11:00:05 2007 +0000
   309.3 @@ -0,0 +1,11 @@
   309.4 +--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig	2005-04-29 00:08:41.000000000 -0500
   309.5 ++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h	2005-04-29 00:08:45.000000000 -0500
   309.6 +@@ -142,7 +142,7 @@
   309.7 +   using ::vsprintf;
   309.8 + }
   309.9 + 
  309.10 +-#if _GLIBCXX_USE_C99
  309.11 ++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
  309.12 + 
  309.13 + #undef snprintf
  309.14 + #undef vfscanf
   310.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   310.2 +++ b/patches/gcc/4.1.2/303-c99-complex-ugly-hack.patch	Sat Feb 24 11:00:05 2007 +0000
   310.3 @@ -0,0 +1,12 @@
   310.4 +--- gcc-4.0.0/libstdc++-v3/configure-old	2005-04-30 22:04:48.061603912 -0500
   310.5 ++++ gcc-4.0.0/libstdc++-v3/configure	2005-04-30 22:06:13.678588152 -0500
   310.6 +@@ -7194,6 +7194,9 @@
   310.7 + cat >>conftest.$ac_ext <<_ACEOF
   310.8 + /* end confdefs.h.  */
   310.9 + #include <complex.h>
  310.10 ++#ifdef __UCLIBC__
  310.11 ++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
  310.12 ++#endif
  310.13 + int
  310.14 + main ()
  310.15 + {
   311.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   311.2 +++ b/patches/gcc/4.1.2/304-index_macro.patch	Sat Feb 24 11:00:05 2007 +0000
   311.3 @@ -0,0 +1,24 @@
   311.4 +--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps	2006-03-24 01:49:51 +0100
   311.5 ++++ gcc-4.1.0/libstdc++-v3/include/ext/rope	2006-03-24 01:49:37 +0100
   311.6 +@@ -59,6 +59,9 @@
   311.7 + #include <bits/allocator.h>
   311.8 + #include <ext/hash_fun.h>
   311.9 + 
  311.10 ++/* cope w/ index defined as macro, SuSv3 proposal */
  311.11 ++#undef index
  311.12 ++
  311.13 + # ifdef __GC
  311.14 + #   define __GC_CONST const
  311.15 + # else
  311.16 +--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps	2006-03-24 01:50:04 +0100
  311.17 ++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h	2006-03-24 01:50:28 +0100
  311.18 +@@ -53,6 +53,9 @@
  311.19 + #include <ext/memory> // For uninitialized_copy_n
  311.20 + #include <ext/numeric> // For power
  311.21 + 
  311.22 ++/* cope w/ index defined as macro, SuSv3 proposal */
  311.23 ++#undef index
  311.24 ++
  311.25 + namespace __gnu_cxx
  311.26 + {
  311.27 +   using std::size_t;
   312.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   312.2 +++ b/patches/gcc/4.1.2/402-libbackend_dep_gcov-iov.h.patch	Sat Feb 24 11:00:05 2007 +0000
   312.3 @@ -0,0 +1,12 @@
   312.4 +# gcc.gnu.org/PR30620
   312.5 +--- gcc-4.1.2-20070208.orig/gcc/Makefile.in	2006-11-01 15:40:44.000000000 +0100
   312.6 ++++ gcc-4.1.2-20070208/gcc/Makefile.in	2007-02-13 19:23:31.000000000 +0100
   312.7 +@@ -2522,7 +2522,7 @@
   312.8 + # FIXME: writing proper dependencies for this is a *LOT* of work.
   312.9 + libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
  312.10 +   insn-config.h insn-flags.h insn-codes.h insn-constants.h \
  312.11 +-  insn-attr.h  $(DATESTAMP) $(BASEVER) $(DEVPHASE)
  312.12 ++  insn-attr.h  $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h
  312.13 + 	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
  312.14 + 	  -DTARGET_NAME=\"$(target_noncanonical)\" \
  312.15 + 	  -DLOCALEDIR=\"$(localedir)\" \
   313.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   313.2 +++ b/patches/gcc/4.1.2/740-sh-pr24836.patch	Sat Feb 24 11:00:05 2007 +0000
   313.3 @@ -0,0 +1,25 @@
   313.4 +http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
   313.5 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
   313.6 +
   313.7 +--- gcc/gcc/configure.ac	(revision 106699)
   313.8 ++++ gcc/gcc/configure.ac	(working copy)
   313.9 +@@ -2446,7 +2446,7 @@
  313.10 + 	tls_first_minor=14
  313.11 + 	tls_as_opt="-m64 -Aesame --fatal-warnings"
  313.12 + 	;;
  313.13 +-  sh-*-* | sh[34]-*-*)
  313.14 ++  sh-*-* | sh[34]*-*-*)
  313.15 +     conftest_s='
  313.16 + 	.section ".tdata","awT",@progbits
  313.17 + foo:	.long	25
  313.18 +--- gcc/gcc/configure
  313.19 ++++ gcc/gcc/configure
  313.20 +@@ -14846,7 +14846,7 @@
  313.21 + 	tls_first_minor=14
  313.22 + 	tls_as_opt="-m64 -Aesame --fatal-warnings"
  313.23 + 	;;
  313.24 +-  sh-*-* | sh[34]-*-*)
  313.25 ++  sh-*-* | sh[34]*-*-*)
  313.26 +     conftest_s='
  313.27 + 	.section ".tdata","awT",@progbits
  313.28 + foo:	.long	25
   314.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   314.2 +++ b/patches/gcc/4.1.2/800-arm-bigendian.patch	Sat Feb 24 11:00:05 2007 +0000
   314.3 @@ -0,0 +1,127 @@
   314.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
   314.5 +Adds support for arm*b-linux* big-endian ARM targets
   314.6 +
   314.7 +See http://gcc.gnu.org/PR16350
   314.8 +
   314.9 +Index: gcc-4.1.1/gcc/config/arm/linux-elf.h
  314.10 +===================================================================
  314.11 +--- gcc-4.1.1.orig/gcc/config/arm/linux-elf.h
  314.12 ++++ gcc-4.1.1/gcc/config/arm/linux-elf.h
  314.13 +@@ -28,19 +28,33 @@
  314.14 + #undef  TARGET_VERSION
  314.15 + #define TARGET_VERSION  fputs (" (ARM GNU/Linux with ELF)", stderr);
  314.16 + 
  314.17 ++/*
  314.18 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  314.19 ++ * (big endian) configurations.
  314.20 ++ */
  314.21 ++#if TARGET_BIG_ENDIAN_DEFAULT
  314.22 ++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
  314.23 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
  314.24 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
  314.25 ++#else
  314.26 ++#define TARGET_ENDIAN_DEFAULT 0
  314.27 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
  314.28 ++#define TARGET_LINKER_EMULATION "armelf_linux"
  314.29 ++#endif
  314.30 ++
  314.31 + #undef  TARGET_DEFAULT_FLOAT_ABI
  314.32 + #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
  314.33 + 
  314.34 + #undef  TARGET_DEFAULT
  314.35 +-#define TARGET_DEFAULT (0)
  314.36 ++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
  314.37 + 
  314.38 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
  314.39 + 
  314.40 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
  314.41 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
  314.42 + 
  314.43 + #undef  MULTILIB_DEFAULTS
  314.44 + #define MULTILIB_DEFAULTS \
  314.45 +-	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
  314.46 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
  314.47 + 
  314.48 + /* Now we define the strings used to build the spec file.  */
  314.49 + #undef  LIB_SPEC
  314.50 +@@ -61,7 +75,7 @@
  314.51 +    %{rdynamic:-export-dynamic} \
  314.52 +    %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
  314.53 +    -X \
  314.54 +-   %{mbig-endian:-EB}" \
  314.55 ++   %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
  314.56 +    SUBTARGET_EXTRA_LINK_SPEC
  314.57 + 
  314.58 + #undef  LINK_SPEC
  314.59 +Index: gcc-4.1.1/gcc/config.gcc
  314.60 +===================================================================
  314.61 +--- gcc-4.1.1.orig/gcc/config.gcc
  314.62 ++++ gcc-4.1.1/gcc/config.gcc
  314.63 +@@ -672,6 +672,11 @@ arm*-*-netbsd*)
  314.64 + 	;;
  314.65 + arm*-*-linux*)			# ARM GNU/Linux with ELF
  314.66 + 	tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" 
  314.67 ++	case $target in
  314.68 ++	arm*b-*)
  314.69 ++		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
  314.70 ++		;;
  314.71 ++	esac
  314.72 + 	tmake_file="${tmake_file} t-linux arm/t-arm"
  314.73 + 	case ${target} in
  314.74 + 	arm*-*-linux-gnueabi)
  314.75 +Index: gcc-4.1.1/gcc/config/arm/linux-eabi.h
  314.76 +===================================================================
  314.77 +--- gcc-4.1.1.orig/gcc/config/arm/linux-eabi.h
  314.78 ++++ gcc-4.1.1/gcc/config/arm/linux-eabi.h
  314.79 +@@ -20,6 +20,17 @@
  314.80 +    the Free Software Foundation, 51 Franklin Street, Fifth Floor,
  314.81 +    Boston, MA 02110-1301, USA.  */
  314.82 + 
  314.83 ++/*
  314.84 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
  314.85 ++ * (big endian) configurations.
  314.86 ++ */
  314.87 ++#undef TARGET_LINKER_EMULATION
  314.88 ++#if TARGET_BIG_ENDIAN_DEFAULT
  314.89 ++#define TARGET_LINKER_EMULATION "armelfb_linux_eabi"
  314.90 ++#else
  314.91 ++#define TARGET_LINKER_EMULATION "armelf_linux_eabi"
  314.92 ++#endif
  314.93 ++
  314.94 + /* On EABI GNU/Linux, we want both the BPABI builtins and the
  314.95 +    GNU/Linux builtins.  */
  314.96 + #undef TARGET_OS_CPP_BUILTINS
  314.97 +@@ -48,7 +59,7 @@
  314.98 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
  314.99 + 
 314.100 + #undef SUBTARGET_EXTRA_LINK_SPEC
 314.101 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
 314.102 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
 314.103 + 
 314.104 + /* Use ld-linux.so.3 so that it will be possible to run "classic"
 314.105 +    GNU/Linux binaries on an EABI system.  */
 314.106 +Index: gcc-4.1.1/gcc/config/arm/bpabi.h
 314.107 +===================================================================
 314.108 +--- gcc-4.1.1.orig/gcc/config/arm/bpabi.h
 314.109 ++++ gcc-4.1.1/gcc/config/arm/bpabi.h
 314.110 +@@ -33,9 +33,19 @@
 314.111 + #undef FPUTYPE_DEFAULT
 314.112 + #define FPUTYPE_DEFAULT FPUTYPE_VFP
 314.113 + 
 314.114 ++/*
 314.115 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
 314.116 ++ * (big endian) configurations.
 314.117 ++ */
 314.118 ++#if TARGET_BIG_ENDIAN_DEFAULT
 314.119 ++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
 314.120 ++#else
 314.121 ++#define TARGET_ENDIAN_DEFAULT 0
 314.122 ++#endif
 314.123 ++
 314.124 + /* EABI targets should enable interworking by default.  */
 314.125 + #undef TARGET_DEFAULT
 314.126 +-#define TARGET_DEFAULT MASK_INTERWORK
 314.127 ++#define TARGET_DEFAULT (MASK_INTERWORK | TARGET_ENDIAN_DEFAULT)
 314.128 + 
 314.129 + /* The ARM BPABI functions return a boolean; they use no special
 314.130 +    calling convention.  */
   315.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   315.2 +++ b/patches/glibc/2.1.3/README	Sat Feb 24 11:00:05 2007 +0000
   315.3 @@ -0,0 +1,4 @@
   315.4 +The files rh62*.patch are from the Red Hat 6.2 file glibc-2.1.3-28.src.rpm
   315.5 +I am trusting here that Red Hat's patches are appropriate for all CPU
   315.6 +types.  If I'm wrong, just remove the offending patch...
   315.7 +- Dan Kegel
   316.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   316.2 +++ b/patches/glibc/2.1.3/arm-ctl_bus_isa.patch	Sat Feb 24 11:00:05 2007 +0000
   316.3 @@ -0,0 +1,51 @@
   316.4 +Applies to both glibc-2.2.5 and glibc-2.3.2, and probably glibc cvs as of Aug 2004.
   316.5 +Needed to build glibc with linux kernels 2.4.23 or higher on ARM, 
   316.6 +Fixes following error:
   316.7 +
   316.8 +../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
   316.9 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
  316.10 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
  316.11 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
  316.12 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
  316.13 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
  316.14 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
  316.15 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
  316.16 +make[2]: *** [/home/dank/crosstool-0.28/build/arm-softfloat-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/misc/ioperm.o] Error 1
  316.17 +
  316.18 +cf. "[SYSCTL] BUS_ISA -> CTL_BUS_ISA",  http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html
  316.19 +
  316.20 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c.old	2003-02-20 14:22:24.000000000 -0800
  316.21 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c	2004-01-31 16:01:50.000000000 -0800
  316.22 +@@ -47,6 +47,12 @@
  316.23 + #include <asm/page.h>
  316.24 + #include <sys/sysctl.h>
  316.25 + 
  316.26 ++/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
  316.27 ++#include <linux/version.h>
  316.28 ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
  316.29 ++#define CTL_BUS_ISA BUS_ISA	/* and hope it's not the one from linux/input.h */
  316.30 ++#endif
  316.31 ++
  316.32 + #define PATH_ARM_SYSTYPE	"/etc/arm_systype"
  316.33 + #define PATH_CPUINFO		"/proc/cpuinfo"
  316.34 + 
  316.35 +@@ -80,7 +86,7 @@
  316.36 +  * Initialize I/O system.  There are several ways to get the information
  316.37 +  * we need.  Each is tried in turn until one succeeds.
  316.38 +  *
  316.39 +- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*).  This is the preferred method
  316.40 ++ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*).  This is the preferred method
  316.41 +  *    but not all kernels support it.
  316.42 +  *
  316.43 +  * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
  316.44 +@@ -100,8 +106,8 @@
  316.45 + {
  316.46 +   char systype[256];
  316.47 +   int i, n;
  316.48 +-  static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
  316.49 +-  static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
  316.50 ++  static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
  316.51 ++  static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
  316.52 +   size_t len = sizeof(io.base);
  316.53 + 
  316.54 +   if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
   317.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   317.2 +++ b/patches/glibc/2.1.3/backport-config.sub.patch	Sat Feb 24 11:00:05 2007 +0000
   317.3 @@ -0,0 +1,834 @@
   317.4 +# Backport glibc-2.3.2's config.sub to glibc-2.1.3 
   317.5 +# Should fix nonfatal but annoying like
   317.6 +#   checking build system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized
   317.7 +#   ../glibc-2.1.3/configure: line 1227: test: i686-unknown-linux-gnu: unary operator expected
   317.8 +#   checking build system type... Configuration name missing.
   317.9 +
  317.10 +
  317.11 +--- glibc-2.1.3/scripts/config.sub	2004-03-24 13:27:06.000000000 -0800
  317.12 ++++ glibc-2.3.2/scripts/config.sub	2002-07-10 00:24:32.000000000 -0700
  317.13 +@@ -1,6 +1,10 @@
  317.14 + #! /bin/sh
  317.15 +-# Configuration validation subroutine script, version 1.1.
  317.16 +-#   Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
  317.17 ++# Configuration validation subroutine script.
  317.18 ++#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
  317.19 ++#   2000, 2001, 2002 Free Software Foundation, Inc.
  317.20 ++
  317.21 ++timestamp='2002-07-03'
  317.22 ++
  317.23 + # This file is (in principle) common to ALL GNU software.
  317.24 + # The presence of a machine in this file suggests that SOME GNU software
  317.25 + # can handle that machine.  It does not imply ALL GNU software can.
  317.26 +@@ -25,6 +29,9 @@
  317.27 + # configuration script generated by Autoconf, you may include it under
  317.28 + # the same distribution terms that you use for the rest of that program.
  317.29 + 
  317.30 ++# Please send patches to <config-patches@gnu.org>.  Submit a context
  317.31 ++# diff and a properly formatted ChangeLog entry.
  317.32 ++#
  317.33 + # Configuration subroutine to validate and canonicalize a configuration type.
  317.34 + # Supply the specified configuration type as an argument.
  317.35 + # If it is invalid, we print an error message on stderr and exit with code 1.
  317.36 +@@ -45,30 +52,73 @@
  317.37 + #	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
  317.38 + # It is wrong to echo any other type of specification.
  317.39 + 
  317.40 +-if [ x$1 = x ]
  317.41 +-then
  317.42 +-	echo Configuration name missing. 1>&2
  317.43 +-	echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
  317.44 +-	echo "or     $0 ALIAS" 1>&2
  317.45 +-	echo where ALIAS is a recognized configuration type. 1>&2
  317.46 +-	exit 1
  317.47 +-fi
  317.48 ++me=`echo "$0" | sed -e 's,.*/,,'`
  317.49 + 
  317.50 +-# First pass through any local machine types.
  317.51 +-case $1 in
  317.52 +-	*local*)
  317.53 +-		echo $1
  317.54 +-		exit 0
  317.55 +-		;;
  317.56 +-	*)
  317.57 +-	;;
  317.58 ++usage="\
  317.59 ++Usage: $0 [OPTION] CPU-MFR-OPSYS
  317.60 ++       $0 [OPTION] ALIAS
  317.61 ++
  317.62 ++Canonicalize a configuration name.
  317.63 ++
  317.64 ++Operation modes:
  317.65 ++  -h, --help         print this help, then exit
  317.66 ++  -t, --time-stamp   print date of last modification, then exit
  317.67 ++  -v, --version      print version number, then exit
  317.68 ++
  317.69 ++Report bugs and patches to <config-patches@gnu.org>."
  317.70 ++
  317.71 ++version="\
  317.72 ++GNU config.sub ($timestamp)
  317.73 ++
  317.74 ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
  317.75 ++Free Software Foundation, Inc.
  317.76 ++
  317.77 ++This is free software; see the source for copying conditions.  There is NO
  317.78 ++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  317.79 ++
  317.80 ++help="
  317.81 ++Try \`$me --help' for more information."
  317.82 ++
  317.83 ++# Parse command line
  317.84 ++while test $# -gt 0 ; do
  317.85 ++  case $1 in
  317.86 ++    --time-stamp | --time* | -t )
  317.87 ++       echo "$timestamp" ; exit 0 ;;
  317.88 ++    --version | -v )
  317.89 ++       echo "$version" ; exit 0 ;;
  317.90 ++    --help | --h* | -h )
  317.91 ++       echo "$usage"; exit 0 ;;
  317.92 ++    -- )     # Stop option processing
  317.93 ++       shift; break ;;
  317.94 ++    - )	# Use stdin as input.
  317.95 ++       break ;;
  317.96 ++    -* )
  317.97 ++       echo "$me: invalid option $1$help"
  317.98 ++       exit 1 ;;
  317.99 ++
 317.100 ++    *local*)
 317.101 ++       # First pass through any local machine types.
 317.102 ++       echo $1
 317.103 ++       exit 0;;
 317.104 ++
 317.105 ++    * )
 317.106 ++       break ;;
 317.107 ++  esac
 317.108 ++done
 317.109 ++
 317.110 ++case $# in
 317.111 ++ 0) echo "$me: missing argument$help" >&2
 317.112 ++    exit 1;;
 317.113 ++ 1) ;;
 317.114 ++ *) echo "$me: too many arguments$help" >&2
 317.115 ++    exit 1;;
 317.116 + esac
 317.117 + 
 317.118 + # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
 317.119 + # Here we must recognize all the valid KERNEL-OS combinations.
 317.120 + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 317.121 + case $maybe_os in
 317.122 +-  linux-gnu*)
 317.123 ++  nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
 317.124 +     os=-$maybe_os
 317.125 +     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
 317.126 +     ;;
 317.127 +@@ -94,7 +144,7 @@
 317.128 + 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 317.129 + 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 317.130 + 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
 317.131 +-	-apple)
 317.132 ++	-apple | -axis)
 317.133 + 		os=
 317.134 + 		basic_machine=$1
 317.135 + 		;;
 317.136 +@@ -108,6 +158,14 @@
 317.137 + 		os=-vxworks
 317.138 + 		basic_machine=$1
 317.139 + 		;;
 317.140 ++	-chorusos*)
 317.141 ++		os=-chorusos
 317.142 ++		basic_machine=$1
 317.143 ++		;;
 317.144 ++ 	-chorusrdb)
 317.145 ++ 		os=-chorusrdb
 317.146 ++		basic_machine=$1
 317.147 ++ 		;;
 317.148 + 	-hiux*)
 317.149 + 		os=-hiuxwe2
 317.150 + 		;;
 317.151 +@@ -166,27 +224,58 @@
 317.152 + case $basic_machine in
 317.153 + 	# Recognize the basic CPU types without company name.
 317.154 + 	# Some are omitted here because they have special meanings below.
 317.155 +-	tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
 317.156 +-		| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
 317.157 +-		| 580 | i960 | h8300 \
 317.158 +-		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
 317.159 +-		| alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
 317.160 +-		| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
 317.161 +-		| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
 317.162 +-		| mips64orion | mips64orionel | mipstx39 | mipstx39el \
 317.163 +-		| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
 317.164 +-		| mips64vr5000 | miprs64vr5000el | mcore \
 317.165 +-		| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
 317.166 +-		| thumb | d10v | fr30)
 317.167 ++	1750a | 580 \
 317.168 ++	| a29k \
 317.169 ++	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 317.170 ++	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 317.171 ++	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
 317.172 ++	| c4x | clipper \
 317.173 ++	| d10v | d30v | dlx | dsp16xx \
 317.174 ++	| fr30 | frv \
 317.175 ++	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 317.176 ++	| i370 | i860 | i960 | ia64 \
 317.177 ++	| ip2k \
 317.178 ++	| m32r | m68000 | m68k | m88k | mcore \
 317.179 ++	| mips | mipsbe | mipseb | mipsel | mipsle \
 317.180 ++	| mips16 \
 317.181 ++	| mips64 | mips64el \
 317.182 ++	| mips64orion | mips64orionel \
 317.183 ++	| mips64vr4100 | mips64vr4100el \
 317.184 ++	| mips64vr4300 | mips64vr4300el \
 317.185 ++	| mips64vr5000 | mips64vr5000el \
 317.186 ++	| mipsisa32 | mipsisa32el \
 317.187 ++	| mipsisa64 | mipsisa64el \
 317.188 ++	| mipsisa64sb1 | mipsisa64sb1el \
 317.189 ++	| mipstx39 | mipstx39el \
 317.190 ++	| mn10200 | mn10300 \
 317.191 ++	| ns16k | ns32k \
 317.192 ++	| openrisc | or32 \
 317.193 ++	| pdp10 | pdp11 | pj | pjl \
 317.194 ++	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 317.195 ++	| pyramid \
 317.196 ++	| sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
 317.197 ++	| sh64 | sh64le \
 317.198 ++	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
 317.199 ++	| strongarm \
 317.200 ++	| tahoe | thumb | tic80 | tron \
 317.201 ++	| v850 | v850e \
 317.202 ++	| we32k \
 317.203 ++	| x86 | xscale | xstormy16 | xtensa \
 317.204 ++	| z8k)
 317.205 ++		basic_machine=$basic_machine-unknown
 317.206 ++		;;
 317.207 ++	m6811 | m68hc11 | m6812 | m68hc12)
 317.208 ++		# Motorola 68HC11/12.
 317.209 + 		basic_machine=$basic_machine-unknown
 317.210 ++		os=-none
 317.211 + 		;;
 317.212 +-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
 317.213 ++	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
 317.214 + 		;;
 317.215 + 
 317.216 + 	# We use `pc' rather than `unknown'
 317.217 + 	# because (1) that's what they normally are, and
 317.218 + 	# (2) the word "unknown" tends to confuse beginning users.
 317.219 +-	i[34567]86)
 317.220 ++	i*86 | x86_64)
 317.221 + 	  basic_machine=$basic_machine-pc
 317.222 + 	  ;;
 317.223 + 	# Object if more than one company name word.
 317.224 +@@ -195,24 +284,54 @@
 317.225 + 		exit 1
 317.226 + 		;;
 317.227 + 	# Recognize the basic CPU types with company name.
 317.228 +-	# FIXME: clean up the formatting here.
 317.229 +-	vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
 317.230 +-	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
 317.231 +-	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
 317.232 +-	      | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
 317.233 +-	      | xmp-* | ymp-* \
 317.234 +-	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
 317.235 +-	      | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
 317.236 +-	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
 317.237 +-	      | clipper-* | orion-* \
 317.238 +-	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
 317.239 +-	      | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
 317.240 +-	      | mips64el-* | mips64orion-* | mips64orionel-* \
 317.241 +-	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
 317.242 +-	      | mipstx39-* | mipstx39el-* | mcore-* \
 317.243 +-	      | f301-* | armv*-* | t3e-* \
 317.244 +-	      | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
 317.245 +-	      | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
 317.246 ++	580-* \
 317.247 ++	| a29k-* \
 317.248 ++	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 317.249 ++	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
 317.250 ++	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 317.251 ++	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 317.252 ++	| avr-* \
 317.253 ++	| bs2000-* \
 317.254 ++	| c[123]* | c30-* | [cjt]90-* | c54x-* \
 317.255 ++	| clipper-* | cydra-* \
 317.256 ++	| d10v-* | d30v-* | dlx-* \
 317.257 ++	| elxsi-* \
 317.258 ++	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
 317.259 ++	| h8300-* | h8500-* \
 317.260 ++	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 317.261 ++	| i*86-* | i860-* | i960-* | ia64-* \
 317.262 ++	| ip2k-* \
 317.263 ++	| m32r-* \
 317.264 ++	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
 317.265 ++	| m88110-* | m88k-* | mcore-* \
 317.266 ++	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 317.267 ++	| mips16-* \
 317.268 ++	| mips64-* | mips64el-* \
 317.269 ++	| mips64orion-* | mips64orionel-* \
 317.270 ++	| mips64vr4100-* | mips64vr4100el-* \
 317.271 ++	| mips64vr4300-* | mips64vr4300el-* \
 317.272 ++	| mips64vr5000-* | mips64vr5000el-* \
 317.273 ++	| mipsisa32-* | mipsisa32el-* \
 317.274 ++	| mipsisa64-* | mipsisa64el-* \
 317.275 ++	| mipsisa64sb1-* | mipsisa64sb1el-* \
 317.276 ++	| mipstx39 | mipstx39el \
 317.277 ++	| none-* | np1-* | ns16k-* | ns32k-* \
 317.278 ++	| orion-* \
 317.279 ++	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 317.280 ++	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 317.281 ++	| pyramid-* \
 317.282 ++	| romp-* | rs6000-* \
 317.283 ++	| sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
 317.284 ++	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 317.285 ++	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
 317.286 ++	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
 317.287 ++	| tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
 317.288 ++	| v850-* | v850e-* | vax-* \
 317.289 ++	| we32k-* \
 317.290 ++	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
 317.291 ++	| xtensa-* \
 317.292 ++	| ymp-* \
 317.293 ++	| z8k-*)
 317.294 + 		;;
 317.295 + 	# Recognize the various machine names and aliases which stand
 317.296 + 	# for a CPU type and a company and sometimes even an OS.
 317.297 +@@ -249,14 +368,14 @@
 317.298 + 		os=-sysv
 317.299 + 		;;
 317.300 + 	amiga | amiga-*)
 317.301 +-		basic_machine=m68k-cbm
 317.302 ++		basic_machine=m68k-unknown
 317.303 + 		;;
 317.304 + 	amigaos | amigados)
 317.305 +-		basic_machine=m68k-cbm
 317.306 ++		basic_machine=m68k-unknown
 317.307 + 		os=-amigaos
 317.308 + 		;;
 317.309 + 	amigaunix | amix)
 317.310 +-		basic_machine=m68k-cbm
 317.311 ++		basic_machine=m68k-unknown
 317.312 + 		os=-sysv4
 317.313 + 		;;
 317.314 + 	apollo68)
 317.315 +@@ -275,6 +394,10 @@
 317.316 + 		basic_machine=ns32k-sequent
 317.317 + 		os=-dynix
 317.318 + 		;;
 317.319 ++	c90)
 317.320 ++		basic_machine=c90-cray
 317.321 ++		os=-unicos
 317.322 ++		;;
 317.323 + 	convex-c1)
 317.324 + 		basic_machine=c1-convex
 317.325 + 		os=-bsd
 317.326 +@@ -295,27 +418,30 @@
 317.327 + 		basic_machine=c38-convex
 317.328 + 		os=-bsd
 317.329 + 		;;
 317.330 +-	cray | ymp)
 317.331 +-		basic_machine=ymp-cray
 317.332 +-		os=-unicos
 317.333 +-		;;
 317.334 +-	cray2)
 317.335 +-		basic_machine=cray2-cray
 317.336 +-		os=-unicos
 317.337 +-		;;
 317.338 +-	[ctj]90-cray)
 317.339 +-		basic_machine=c90-cray
 317.340 ++	cray | j90)
 317.341 ++		basic_machine=j90-cray
 317.342 + 		os=-unicos
 317.343 + 		;;
 317.344 + 	crds | unos)
 317.345 + 		basic_machine=m68k-crds
 317.346 + 		;;
 317.347 ++	cris | cris-* | etrax*)
 317.348 ++		basic_machine=cris-axis
 317.349 ++		;;
 317.350 + 	da30 | da30-*)
 317.351 + 		basic_machine=m68k-da30
 317.352 + 		;;
 317.353 + 	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
 317.354 + 		basic_machine=mips-dec
 317.355 + 		;;
 317.356 ++	decsystem10* | dec10*)
 317.357 ++		basic_machine=pdp10-dec
 317.358 ++		os=-tops10
 317.359 ++		;;
 317.360 ++	decsystem20* | dec20*)
 317.361 ++		basic_machine=pdp10-dec
 317.362 ++		os=-tops20
 317.363 ++		;;
 317.364 + 	delta | 3300 | motorola-3300 | motorola-delta \
 317.365 + 	      | 3300-motorola | delta-motorola)
 317.366 + 		basic_machine=m68k-motorola
 317.367 +@@ -357,6 +483,10 @@
 317.368 + 		basic_machine=tron-gmicro
 317.369 + 		os=-sysv
 317.370 + 		;;
 317.371 ++	go32)
 317.372 ++		basic_machine=i386-pc
 317.373 ++		os=-go32
 317.374 ++		;;
 317.375 + 	h3050r* | hiux*)
 317.376 + 		basic_machine=hppa1.1-hitachi
 317.377 + 		os=-hiuxwe2
 317.378 +@@ -432,19 +562,19 @@
 317.379 + 		basic_machine=i370-ibm
 317.380 + 		;;
 317.381 + # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
 317.382 +-	i[34567]86v32)
 317.383 ++	i*86v32)
 317.384 + 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 317.385 + 		os=-sysv32
 317.386 + 		;;
 317.387 +-	i[34567]86v4*)
 317.388 ++	i*86v4*)
 317.389 + 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 317.390 + 		os=-sysv4
 317.391 + 		;;
 317.392 +-	i[34567]86v)
 317.393 ++	i*86v)
 317.394 + 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 317.395 + 		os=-sysv
 317.396 + 		;;
 317.397 +-	i[34567]86sol2)
 317.398 ++	i*86sol2)
 317.399 + 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 317.400 + 		os=-solaris2
 317.401 + 		;;
 317.402 +@@ -456,17 +586,6 @@
 317.403 + 		basic_machine=i386-unknown
 317.404 + 		os=-vsta
 317.405 + 		;;
 317.406 +-	i386-go32 | go32)
 317.407 +-		basic_machine=i386-unknown
 317.408 +-		os=-go32
 317.409 +-		;;
 317.410 +-	i386-mingw32 | mingw32)
 317.411 +-		basic_machine=i386-unknown
 317.412 +-		os=-mingw32
 317.413 +-		;;
 317.414 +-	i386-qnx | qnx)
 317.415 +-		basic_machine=i386-qnx
 317.416 +-		;;
 317.417 + 	iris | iris4d)
 317.418 + 		basic_machine=mips-sgi
 317.419 + 		case $os in
 317.420 +@@ -492,6 +611,10 @@
 317.421 + 		basic_machine=ns32k-utek
 317.422 + 		os=-sysv
 317.423 + 		;;
 317.424 ++	mingw32)
 317.425 ++		basic_machine=i386-pc
 317.426 ++		os=-mingw32
 317.427 ++		;;
 317.428 + 	miniframe)
 317.429 + 		basic_machine=m68000-convergent
 317.430 + 		;;
 317.431 +@@ -499,26 +622,26 @@
 317.432 + 		basic_machine=m68k-atari
 317.433 + 		os=-mint
 317.434 + 		;;
 317.435 +-	mipsel*-linux*)
 317.436 +-		basic_machine=mipsel-unknown
 317.437 +-		os=-linux-gnu
 317.438 +-		;;
 317.439 +-	mips*-linux*)
 317.440 +-		basic_machine=mips-unknown
 317.441 +-		os=-linux-gnu
 317.442 +-		;;
 317.443 + 	mips3*-*)
 317.444 + 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
 317.445 + 		;;
 317.446 + 	mips3*)
 317.447 + 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
 317.448 + 		;;
 317.449 ++	mmix*)
 317.450 ++		basic_machine=mmix-knuth
 317.451 ++		os=-mmixware
 317.452 ++		;;
 317.453 + 	monitor)
 317.454 + 		basic_machine=m68k-rom68k
 317.455 + 		os=-coff
 317.456 + 		;;
 317.457 ++	morphos)
 317.458 ++		basic_machine=powerpc-unknown
 317.459 ++		os=-morphos
 317.460 ++		;;
 317.461 + 	msdos)
 317.462 +-		basic_machine=i386-unknown
 317.463 ++		basic_machine=i386-pc
 317.464 + 		os=-msdos
 317.465 + 		;;
 317.466 + 	mvs)
 317.467 +@@ -582,13 +705,24 @@
 317.468 + 		basic_machine=i960-intel
 317.469 + 		os=-mon960
 317.470 + 		;;
 317.471 ++	nonstopux)
 317.472 ++		basic_machine=mips-compaq
 317.473 ++		os=-nonstopux
 317.474 ++		;;
 317.475 + 	np1)
 317.476 + 		basic_machine=np1-gould
 317.477 + 		;;
 317.478 ++	nsr-tandem)
 317.479 ++		basic_machine=nsr-tandem
 317.480 ++		;;
 317.481 + 	op50n-* | op60c-*)
 317.482 + 		basic_machine=hppa1.1-oki
 317.483 + 		os=-proelf
 317.484 + 		;;
 317.485 ++	or32 | or32-*)
 317.486 ++		basic_machine=or32-unknown
 317.487 ++		os=-coff
 317.488 ++		;;
 317.489 + 	OSE68000 | ose68000)
 317.490 + 		basic_machine=m68000-ericsson
 317.491 + 		os=-ose
 317.492 +@@ -614,28 +748,28 @@
 317.493 +         pc532 | pc532-*)
 317.494 + 		basic_machine=ns32k-pc532
 317.495 + 		;;
 317.496 +-	pentium | p5 | k5 | k6 | nexen)
 317.497 ++	pentium | p5 | k5 | k6 | nexgen | viac3)
 317.498 + 		basic_machine=i586-pc
 317.499 + 		;;
 317.500 +-	pentiumpro | p6 | 6x86)
 317.501 ++	pentiumpro | p6 | 6x86 | athlon)
 317.502 + 		basic_machine=i686-pc
 317.503 + 		;;
 317.504 + 	pentiumii | pentium2)
 317.505 +-		basic_machine=i786-pc
 317.506 ++		basic_machine=i686-pc
 317.507 + 		;;
 317.508 +-	pentium-* | p5-* | k5-* | k6-* | nexen-*)
 317.509 ++	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
 317.510 + 		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
 317.511 + 		;;
 317.512 +-	pentiumpro-* | p6-* | 6x86-*)
 317.513 ++	pentiumpro-* | p6-* | 6x86-* | athlon-*)
 317.514 + 		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 317.515 + 		;;
 317.516 + 	pentiumii-* | pentium2-*)
 317.517 +-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
 317.518 ++		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 317.519 + 		;;
 317.520 + 	pn)
 317.521 + 		basic_machine=pn-gould
 317.522 + 		;;
 317.523 +-	power)	basic_machine=rs6000-ibm
 317.524 ++	power)	basic_machine=power-ibm
 317.525 + 		;;
 317.526 + 	ppc)	basic_machine=powerpc-unknown
 317.527 + 	        ;;
 317.528 +@@ -647,9 +781,23 @@
 317.529 + 	ppcle-* | powerpclittle-*)
 317.530 + 		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
 317.531 + 		;;
 317.532 ++	ppc64)	basic_machine=powerpc64-unknown
 317.533 ++	        ;;
 317.534 ++	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
 317.535 ++		;;
 317.536 ++	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
 317.537 ++		basic_machine=powerpc64le-unknown
 317.538 ++	        ;;
 317.539 ++	ppc64le-* | powerpc64little-*)
 317.540 ++		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
 317.541 ++		;;
 317.542 + 	ps2)
 317.543 + 		basic_machine=i386-ibm
 317.544 + 		;;
 317.545 ++	pw32)
 317.546 ++		basic_machine=i586-unknown
 317.547 ++		os=-pw32
 317.548 ++		;;
 317.549 + 	rom68k)
 317.550 + 		basic_machine=m68k-rom68k
 317.551 + 		os=-coff
 317.552 +@@ -660,6 +808,12 @@
 317.553 + 	rtpc | rtpc-*)
 317.554 + 		basic_machine=romp-ibm
 317.555 + 		;;
 317.556 ++	s390 | s390-*)
 317.557 ++		basic_machine=s390-ibm
 317.558 ++		;;
 317.559 ++	s390x | s390x-*)
 317.560 ++		basic_machine=s390x-ibm
 317.561 ++		;;
 317.562 + 	sa29200)
 317.563 + 		basic_machine=a29k-amd
 317.564 + 		os=-udi
 317.565 +@@ -671,7 +825,7 @@
 317.566 + 		basic_machine=sh-hitachi
 317.567 + 		os=-hms
 317.568 + 		;;
 317.569 +-	sparclite-wrs)
 317.570 ++	sparclite-wrs | simso-wrs)
 317.571 + 		basic_machine=sparclite-wrs
 317.572 + 		os=-vxworks
 317.573 + 		;;
 317.574 +@@ -729,20 +883,40 @@
 317.575 + 	sun386 | sun386i | roadrunner)
 317.576 + 		basic_machine=i386-sun
 317.577 + 		;;
 317.578 ++        sv1)
 317.579 ++		basic_machine=sv1-cray
 317.580 ++		os=-unicos
 317.581 ++		;;
 317.582 + 	symmetry)
 317.583 + 		basic_machine=i386-sequent
 317.584 + 		os=-dynix
 317.585 + 		;;
 317.586 ++	t3d)
 317.587 ++		basic_machine=alpha-cray
 317.588 ++		os=-unicos
 317.589 ++		;;
 317.590 + 	t3e)
 317.591 +-		basic_machine=t3e-cray
 317.592 ++		basic_machine=alphaev5-cray
 317.593 ++		os=-unicos
 317.594 ++		;;
 317.595 ++	t90)
 317.596 ++		basic_machine=t90-cray
 317.597 + 		os=-unicos
 317.598 + 		;;
 317.599 ++	tic54x | c54x*)
 317.600 ++		basic_machine=tic54x-unknown
 317.601 ++		os=-coff
 317.602 ++		;;
 317.603 + 	tx39)
 317.604 + 		basic_machine=mipstx39-unknown
 317.605 + 		;;
 317.606 + 	tx39el)
 317.607 + 		basic_machine=mipstx39el-unknown
 317.608 + 		;;
 317.609 ++	toad1)
 317.610 ++		basic_machine=pdp10-xkl
 317.611 ++		os=-tops20
 317.612 ++		;;
 317.613 + 	tower | tower-32)
 317.614 + 		basic_machine=m68k-ncr
 317.615 + 		;;
 317.616 +@@ -789,13 +963,17 @@
 317.617 + 		basic_machine=hppa1.1-winbond
 317.618 + 		os=-proelf
 317.619 + 		;;
 317.620 +-	xmp)
 317.621 +-		basic_machine=xmp-cray
 317.622 +-		os=-unicos
 317.623 ++	windows32)
 317.624 ++		basic_machine=i386-pc
 317.625 ++		os=-windows32-msvcrt
 317.626 + 		;;
 317.627 +         xps | xps100)
 317.628 + 		basic_machine=xps100-honeywell
 317.629 + 		;;
 317.630 ++	ymp)
 317.631 ++		basic_machine=ymp-cray
 317.632 ++		os=-unicos
 317.633 ++		;;
 317.634 + 	z8k-*-coff)
 317.635 + 		basic_machine=z8k-unknown
 317.636 + 		os=-sim
 317.637 +@@ -816,13 +994,6 @@
 317.638 + 	op60c)
 317.639 + 		basic_machine=hppa1.1-oki
 317.640 + 		;;
 317.641 +-	mips)
 317.642 +-		if [ x$os = x-linux-gnu ]; then
 317.643 +-			basic_machine=mips-unknown
 317.644 +-		else
 317.645 +-			basic_machine=mips-mips
 317.646 +-		fi
 317.647 +-		;;
 317.648 + 	romp)
 317.649 + 		basic_machine=romp-ibm
 317.650 + 		;;
 317.651 +@@ -832,13 +1003,23 @@
 317.652 + 	vax)
 317.653 + 		basic_machine=vax-dec
 317.654 + 		;;
 317.655 ++	pdp10)
 317.656 ++		# there are many clones, so DEC is not a safe bet
 317.657 ++		basic_machine=pdp10-unknown
 317.658 ++		;;
 317.659 + 	pdp11)
 317.660 + 		basic_machine=pdp11-dec
 317.661 + 		;;
 317.662 + 	we32k)
 317.663 + 		basic_machine=we32k-att
 317.664 + 		;;
 317.665 +-	sparc | sparcv9)
 317.666 ++	sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
 317.667 ++		basic_machine=sh-unknown
 317.668 ++		;;
 317.669 ++	sh64)
 317.670 ++		basic_machine=sh64-unknown
 317.671 ++		;;
 317.672 ++	sparc | sparcv9 | sparcv9b)
 317.673 + 		basic_machine=sparc-sun
 317.674 + 		;;
 317.675 +         cydra)
 317.676 +@@ -860,6 +1041,9 @@
 317.677 + 		basic_machine=c4x-none
 317.678 + 		os=-coff
 317.679 + 		;;
 317.680 ++	*-unknown)
 317.681 ++		# Make sure to match an already-canonicalized machine name.
 317.682 ++		;;
 317.683 + 	*)
 317.684 + 		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
 317.685 + 		exit 1
 317.686 +@@ -916,14 +1100,31 @@
 317.687 + 	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 317.688 + 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 317.689 + 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 317.690 ++	      | -chorusos* | -chorusrdb* \
 317.691 + 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
 317.692 + 	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
 317.693 +-	      | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
 317.694 ++	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
 317.695 ++	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 317.696 ++	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 317.697 ++	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 317.698 ++	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
 317.699 + 	# Remember, each alternative MUST END IN *, to match a version number.
 317.700 + 		;;
 317.701 ++	-qnx*)
 317.702 ++		case $basic_machine in
 317.703 ++		    x86-* | i*86-*)
 317.704 ++			;;
 317.705 ++		    *)
 317.706 ++			os=-nto$os
 317.707 ++			;;
 317.708 ++		esac
 317.709 ++		;;
 317.710 ++	-nto*)
 317.711 ++		os=-nto-qnx
 317.712 ++		;;
 317.713 + 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
 317.714 + 	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
 317.715 +-	      | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
 317.716 ++	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
 317.717 + 		;;
 317.718 + 	-mac*)
 317.719 + 		os=`echo $os | sed -e 's|mac|macos|'`
 317.720 +@@ -940,6 +1141,9 @@
 317.721 + 	-opened*)
 317.722 + 		os=-openedition
 317.723 + 		;;
 317.724 ++	-wince*)
 317.725 ++		os=-wince
 317.726 ++		;;
 317.727 + 	-osfrose*)
 317.728 + 		os=-osfrose
 317.729 + 		;;
 317.730 +@@ -955,15 +1159,24 @@
 317.731 + 	-acis*)
 317.732 + 		os=-aos
 317.733 + 		;;
 317.734 ++	-atheos*)
 317.735 ++		os=-atheos
 317.736 ++		;;
 317.737 + 	-386bsd)
 317.738 + 		os=-bsd
 317.739 + 		;;
 317.740 + 	-ctix* | -uts*)
 317.741 + 		os=-sysv
 317.742 + 		;;
 317.743 ++	-nova*)
 317.744 ++		os=-rtmk-nova
 317.745 ++		;;
 317.746 + 	-ns2 )
 317.747 + 	        os=-nextstep2
 317.748 + 		;;
 317.749 ++	-nsk*)
 317.750 ++		os=-nsk
 317.751 ++		;;
 317.752 + 	# Preserve the version number of sinix5.
 317.753 + 	-sinix5.*)
 317.754 + 		os=`echo $os | sed -e 's|sinix|sysv|'`
 317.755 +@@ -977,9 +1190,6 @@
 317.756 + 	-oss*)
 317.757 + 		os=-sysv3
 317.758 + 		;;
 317.759 +-        -qnx)
 317.760 +-		os=-qnx4
 317.761 +-		;;
 317.762 + 	-svr4)
 317.763 + 		os=-sysv4
 317.764 + 		;;
 317.765 +@@ -1001,7 +1211,7 @@
 317.766 + 	-xenix)
 317.767 + 		os=-xenix
 317.768 + 		;;
 317.769 +-        -*mint | -*MiNT)
 317.770 ++        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
 317.771 + 	        os=-mint
 317.772 + 		;;
 317.773 + 	-none)
 317.774 +@@ -1035,6 +1245,10 @@
 317.775 + 	arm*-semi)
 317.776 + 		os=-aout
 317.777 + 		;;
 317.778 ++	# This must come before the *-dec entry.
 317.779 ++	pdp10-*)
 317.780 ++		os=-tops20
 317.781 ++		;;
 317.782 +         pdp11-*)
 317.783 + 		os=-none
 317.784 + 		;;
 317.785 +@@ -1062,6 +1276,9 @@
 317.786 + 	mips*-*)
 317.787 + 		os=-elf
 317.788 + 		;;
 317.789 ++	or32-*)
 317.790 ++		os=-coff
 317.791 ++		;;
 317.792 + 	*-tti)	# must be before sparc entry or we get the wrong os.
 317.793 + 		os=-sysv3
 317.794 + 		;;
 317.795 +@@ -1143,7 +1360,7 @@
 317.796 + 	*-masscomp)
 317.797 + 		os=-rtu
 317.798 + 		;;
 317.799 +-	f301-fujitsu)
 317.800 ++	f30[01]-fujitsu | f700-fujitsu)
 317.801 + 		os=-uxpv
 317.802 + 		;;
 317.803 + 	*-rom68k)
 317.804 +@@ -1209,7 +1426,7 @@
 317.805 + 			-ptx*)
 317.806 + 				vendor=sequent
 317.807 + 				;;
 317.808 +-			-vxsim* | -vxworks*)
 317.809 ++			-vxsim* | -vxworks* | -windiss*)
 317.810 + 				vendor=wrs
 317.811 + 				;;
 317.812 + 			-aux*)
 317.813 +@@ -1221,12 +1438,23 @@
 317.814 + 			-mpw* | -macos*)
 317.815 + 				vendor=apple
 317.816 + 				;;
 317.817 +-			-*mint | -*MiNT)
 317.818 ++			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
 317.819 + 				vendor=atari
 317.820 + 				;;
 317.821 ++			-vos*)
 317.822 ++				vendor=stratus
 317.823 ++				;;
 317.824 + 		esac
 317.825 + 		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
 317.826 + 		;;
 317.827 + esac
 317.828 + 
 317.829 + echo $basic_machine$os
 317.830 ++exit 0
 317.831 ++
 317.832 ++# Local variables:
 317.833 ++# eval: (add-hook 'write-file-hooks 'time-stamp)
 317.834 ++# time-stamp-start: "timestamp='"
 317.835 ++# time-stamp-format: "%:y-%02m-%02d"
 317.836 ++# time-stamp-end: "'"
 317.837 ++# End:
   318.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   318.2 +++ b/patches/glibc/2.1.3/el.po.patch	Sat Feb 24 11:00:05 2007 +0000
   318.3 @@ -0,0 +1,40 @@
   318.4 +From
   318.5 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/po/Makefile.diff?r1=1.17&r2=1.18&cvsroot=glibc
   318.6 +
   318.7 +Fixes error
   318.8 +  msgfmt -o el.mo el.po
   318.9 +  el.po:538:31: invalid multibyte sequence
  318.10 +  el.po:539:21: invalid multibyte sequence
  318.11 +  el.po:1537:38: invalid multibyte sequence
  318.12 +  msgfmt: found 3 fatal errors
  318.13 +  make[2]: *** [el.mo] Error 1
  318.14 +  make[2]: Leaving directory
  318.15 +  `/home/dkegel/wk/crosstool-0.25/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/glibc-2.1.3/po'
  318.16 +
  318.17 +===================================================================
  318.18 +RCS file: /cvs/glibc/libc/po/Makefile,v
  318.19 +retrieving revision 1.17
  318.20 +retrieving revision 1.18
  318.21 +diff -u -r1.17 -r1.18
  318.22 +--- libc/po/Makefile	1999/09/13 08:48:40	1.17
  318.23 ++++ libc/po/Makefile	2001/04/20 04:45:54	1.18
  318.24 +@@ -1,4 +1,4 @@
  318.25 +-# Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
  318.26 ++# Copyright (C) 1996, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
  318.27 + # This file is part of the GNU C Library.
  318.28 + 
  318.29 + # The GNU C Library is free software; you can redistribute it and/or
  318.30 +@@ -20,8 +20,12 @@
  318.31 + 
  318.32 + subdir := po
  318.33 + 
  318.34 ++# List of languages that are currently broken (just run msgfmt from
  318.35 ++# GNU gettext 0.10.36 on them to see why)
  318.36 ++BROKEN_LINGUAS = el
  318.37 ++
  318.38 + # List of languages for which we have message catalogs of translations.
  318.39 +-ALL_LINGUAS := $(basename $(wildcard *.po))
  318.40 ++ALL_LINGUAS := $(filter-out $(BROKEN_LINGUAS),$(basename $(wildcard *.po)))
  318.41 + 
  318.42 + # You can override this in configparms or the make command line to limit
  318.43 + # the languages which get installed.
   319.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   319.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-ac_cv_prog_cc_cross.patch	Sat Feb 24 11:00:05 2007 +0000
   319.3 @@ -0,0 +1,44 @@
   319.4 +Lets you work around the canadian cross build error
   319.5 +
   319.6 +.../gcc-3.4.0-glibc-2.1.3/build-glibc/elf/sln .../gcc-3.4.0-glibc-2.1.3/build-glibc/elf/symlink.list
   319.7 +make[1]: *** [install-symbolic-link] Segmentation fault
   319.8 +make[1]: Leaving directory `.../gcc-3.4.0-glibc-2.1.3/glibc-2.1.3'
   319.9 +make: *** [install] Error 2
  319.10 +
  319.11 +by setting --host != --build when running glibc-2.1.3/configure
  319.12 +instead of hoping that host and build aren't aliases for each other
  319.13 +and that running a host program on the build machine doesn't 
  319.14 +put up a dialog box or accidentally work.
  319.15 +
  319.16 +(cf. http://sources.redhat.com/ml/crossgcc/2002-08/msg00099.html, in which 
  319.17 +the run of conftest caused a dialog box to pop up and block the build on cygwin)
  319.18 +
  319.19 +--- glibc-2.1.3/configure.old	2004-05-26 19:30:45.000000000 -0700
  319.20 ++++ glibc-2.1.3/configure	2004-05-26 19:42:29.000000000 -0700
  319.21 +@@ -1224,7 +1224,7 @@
  319.22 + build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  319.23 + echo "$ac_t""$build" 1>&6
  319.24 + 
  319.25 +-if test $host != $build; then
  319.26 ++if test x$host_alias != x$build_alias; then
  319.27 +   ac_tool_prefix=${host_alias}-
  319.28 + else
  319.29 +   ac_tool_prefix=
  319.30 +@@ -1487,7 +1487,7 @@
  319.31 + if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  319.32 +   ac_cv_prog_cc_works=yes
  319.33 +   # If we can't run a trivial program, we are probably using a cross compiler.
  319.34 +-  if (./conftest; exit) 2>/dev/null; then
  319.35 ++  if test x$host_alias == x$build_alias && (./conftest; exit) 2>/dev/null; then
  319.36 +     ac_cv_prog_cc_cross=no
  319.37 +   else
  319.38 +     ac_cv_prog_cc_cross=yes
  319.39 +@@ -1566,7 +1566,7 @@
  319.40 + build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  319.41 + echo "$ac_t""$build" 1>&6
  319.42 + 
  319.43 +-if test $host != $build; then
  319.44 ++if test x$host_alias != x$build_alias; then
  319.45 +   for ac_prog in gcc cc
  319.46 + do
  319.47 + # Extract the first word of "$ac_prog", so it can be a program name with args.
   320.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   320.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-db2.patch	Sat Feb 24 11:00:05 2007 +0000
   320.3 @@ -0,0 +1,17 @@
   320.4 +Fixes error compiling with gcc-3.4.0:
   320.5 +
   320.6 +os/os_oflags.c: In function `__db_oflags':
   320.7 +os/os_oflags.c:48: error: label at end of compound statement
   320.8 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.1.3/build-glibc/db2/os_oflags.os] Error 1
   320.9 +
  320.10 +--- glibc-2.1.3/db2/os/os_oflags.c.old	Sun Apr 11 19:56:44 2004
  320.11 ++++ glibc-2.1.3/db2/os/os_oflags.c	Sun Apr 11 19:57:06 2004
  320.12 +@@ -44,7 +44,7 @@
  320.13 + 	case O_RDWR:
  320.14 + 		break;
  320.15 + 	default:		/* Bogus flags value from user.  */
  320.16 +-	  /* XXX no way to return error from here */
  320.17 ++		; /* XXX no way to return error from here */
  320.18 + 	}
  320.19 + 	if (oflags & O_CREAT)
  320.20 + 		dbflags |= DB_CREATE;
   321.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   321.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-dns.patch	Sat Feb 24 11:00:05 2007 +0000
   321.3 @@ -0,0 +1,21 @@
   321.4 +Fixes
   321.5 +
   321.6 +nss_dns/dns-host.c: In function `_nss_dns_gethostbyaddr_r':
   321.7 +nss_dns/dns-host.c:268: error: label at end of compound statement
   321.8 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.1.3/build-glibc/resolv/dns-host.os] Error 1
   321.9 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.1.3/glibc-2.1.3/resolv'
  321.10 +make[1]: *** [resolv/others] Error 2
  321.11 +
  321.12 +when building with gcc-3.4.0
  321.13 +
  321.14 +--- glibc-2.1.3/resolv/nss_dns/dns-host.c.old	Sun Apr 11 20:32:47 2004
  321.15 ++++ glibc-2.1.3/resolv/nss_dns/dns-host.c	Sun Apr 11 20:33:07 2004
  321.16 +@@ -264,7 +264,7 @@
  321.17 +       strcpy (qp, "ip6.int");
  321.18 +       break;
  321.19 +     default:
  321.20 +-      /* Cannot happen.  */
  321.21 ++      ; /* Cannot happen.  */
  321.22 +     }
  321.23 + 
  321.24 +   host_buffer = (querybuf *) malloc (sizeof (*host_buffer));
   322.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   322.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-fixup.patch	Sat Feb 24 11:00:05 2007 +0000
   322.3 @@ -0,0 +1,70 @@
   322.4 +Fixes
   322.5 +dl-runtime.c:56: error: conflicting types for 'fixup'
   322.6 +../sysdeps/i386/dl-machine.h:158: error: previous declaration of 'fixup' was here
   322.7 +when building with gcc-3.4.0
   322.8 +
   322.9 +First hunk:
  322.10 +Define ARCH_FIXUP_ATTRIBUTE and use it in the fixup function declarations.
  322.11 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/dl-machine.h.diff?r1=1.124&r2=1.125&cvsroot=glibc
  322.12 +[rediffed against glibc-2.1.3]
  322.13 +
  322.14 +Second hunk:
  322.15 +If ARCH_FIXUP_ATTRIBUTE is not defined, provide dummy definition.
  322.16 +Use macro in fixup function definitions.
  322.17 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/elf/dl-runtime.c.diff?r1=1.64&r2=1.65&cvsroot=glibc
  322.18 +[rediffed against glibc-2.3.2]
  322.19 +
  322.20 +===================================================================
  322.21 +--- glibc-2.1.3/sysdeps/i386/dl-machine.h.old	Sun Apr 11 18:58:45 2004
  322.22 ++++ glibc-2.1.3/sysdeps/i386/dl-machine.h	Sun Apr 11 18:59:51 2004
  322.23 +@@ -70,11 +70,14 @@
  322.24 + 
  322.25 +    We cannot use this scheme for profiling because the _mcount call
  322.26 +    destroys the passed register information.  */
  322.27 ++
  322.28 ++#define ARCH_FIXUP_ATTRIBUTE __attribute__ ((regparm (3), unused))
  322.29 ++
  322.30 + static ElfW(Addr) fixup (struct link_map *l, ElfW(Word) reloc_offset)
  322.31 +-     __attribute__ ((regparm (2), unused));
  322.32 ++     ARCH_FIXUP_ATTRIBUTE;
  322.33 + static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset,
  322.34 + 				 ElfW(Addr) retaddr)
  322.35 +-     __attribute__ ((regparm (3), unused));
  322.36 ++     ARCH_FIXUP_ATTRIBUTE;
  322.37 + #endif
  322.38 + 
  322.39 + /* Set up the loaded object described by L so its unrelocated PLT
  322.40 +===================================================================
  322.41 +--- glibc-2.1.3/elf/dl-runtime.c~	Thu Jul 15 11:32:41 1999
  322.42 ++++ glibc-2.1.3/elf/dl-runtime.c	Sun Apr 11 19:02:01 2004
  322.43 +@@ -31,6 +31,12 @@
  322.44 + # define VERSYMIDX(sym)	(DT_NUM + DT_PROCNUM + DT_VERSIONTAGIDX (sym))
  322.45 + #endif
  322.46 + 
  322.47 ++/* The fixup functions might have need special attributes.  If none
  322.48 ++   are provided define the macro as empty.  */
  322.49 ++#ifndef ARCH_FIXUP_ATTRIBUTE
  322.50 ++# define ARCH_FIXUP_ATTRIBUTE
  322.51 ++#endif
  322.52 ++
  322.53 + 
  322.54 + /* This function is called through a special trampoline from the PLT the
  322.55 +    first time each PLT entry is called.  We must perform the relocation
  322.56 +@@ -40,7 +46,7 @@
  322.57 +    function.  */
  322.58 + 
  322.59 + #ifndef ELF_MACHINE_NO_PLT
  322.60 +-static ElfW(Addr) __attribute__ ((unused))
  322.61 ++static ElfW(Addr) __attribute__ ((unused)) ARCH_FIXUP_ATTRIBUTE
  322.62 + fixup (
  322.63 + # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
  322.64 +         ELF_MACHINE_RUNTIME_FIXUP_ARGS,
  322.65 +@@ -105,7 +111,7 @@
  322.66 + 
  322.67 + #if !defined PROF && !defined ELF_MACHINE_NO_PLT
  322.68 + 
  322.69 +-static ElfW(Addr) __attribute__ ((unused))
  322.70 ++static ElfW(Addr) __attribute__ ((unused)) ARCH_FIXUP_ATTRIBUTE
  322.71 + profile_fixup (
  322.72 + #ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
  322.73 +        ELF_MACHINE_RUNTIME_FIXUP_ARGS,
   323.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   323.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-generic.patch	Sat Feb 24 11:00:05 2007 +0000
   323.3 @@ -0,0 +1,157 @@
   323.4 +Fixes following error when building with gcc-3.4.0:
   323.5 +../sysdeps/generic/strstr.c: In function `strstr':
   323.6 +../sysdeps/generic/strstr.c:85: error: label at end of compound statement
   323.7 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.1.3/build-glibc/string/strstr.o] Error 1
   323.8 +
   323.9 +
  323.10 +--------
  323.11 +CVSROOT:	/cvs/glibc
  323.12 +Module name:	libc
  323.13 +Changes by:	drepper@sources.redhat.com	2000-11-25 23:30:03
  323.14 +
  323.15 +Modified files:
  323.16 +	sysdeps/generic: _strerror.c memrchr.c strcasestr.c strstr.c 
  323.17 +
  323.18 +Log message:
  323.19 +	Add casts to avoid warnings.
  323.20 +--------
  323.21 +
  323.22 +Retrieved with
  323.23 + cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc diff -u -D"2000-11-24 23:30:03" -D"2000-11-26 23:30:03" 
  323.24 +then fixed paths and threw out first two hunks
  323.25 +
  323.26 +
  323.27 +#Index: _strerror.c
  323.28 +#===================================================================
  323.29 +#RCS file: /cvs/libc/sysdeps/generic/_strerror.c,v
  323.30 +#retrieving revision 1.16
  323.31 +#retrieving revision 1.17
  323.32 +#diff -u -r1.16 -r1.17
  323.33 +#--- libc/sysdeps/generic/_strerror.c	29 Aug 2000 01:09:56 -0000	1.16
  323.34 +#+++ libc/sysdeps/generic/_strerror.c	26 Nov 2000 07:30:03 -0000	1.17
  323.35 +#@@ -56,7 +56,7 @@
  323.36 +# 	 buffer size.  */
  323.37 +#       q = __mempcpy (buf, unk, MIN (unklen, buflen));
  323.38 +#       if (unklen < buflen)
  323.39 +#-	memcpy (q, p, MIN (&numbuf[21] - p, buflen - unklen));
  323.40 +#+	memcpy (q, p, MIN ((size_t) (&numbuf[21] - p), buflen - unklen));
  323.41 +# 
  323.42 +#       /* Terminate the string in any case.  */
  323.43 +#       if (buflen > 0)
  323.44 +#Index: memrchr.c
  323.45 +#===================================================================
  323.46 +#RCS file: /cvs/libc/sysdeps/generic/memrchr.c,v
  323.47 +#retrieving revision 1.5
  323.48 +#retrieving revision 1.6
  323.49 +#diff -u -r1.5 -r1.6
  323.50 +#--- libc/sysdeps/generic/memrchr.c	23 Oct 2000 23:07:32 -0000	1.5
  323.51 +#+++ libc/sysdeps/generic/memrchr.c	26 Nov 2000 07:30:03 -0000	1.6
  323.52 +#@@ -86,7 +86,7 @@
  323.53 +#   /* All these elucidatory comments refer to 4-byte longwords,
  323.54 +#      but the theory applies equally well to 8-byte longwords.  */
  323.55 +# 
  323.56 +#-  longword_ptr = (unsigned long int *) char_ptr;
  323.57 +#+  longword_ptr = (const unsigned long int *) char_ptr;
  323.58 +# 
  323.59 +#   /* Bits 31, 24, 16, and 8 of this number are zero.  Call these bits
  323.60 +#      the "holes."  Note that there is a hole just to the left of
  323.61 +Index: strcasestr.c
  323.62 +===================================================================
  323.63 +RCS file: /cvs/libc/sysdeps/generic/strcasestr.c,v
  323.64 +retrieving revision 1.3
  323.65 +retrieving revision 1.4
  323.66 +diff -u -r1.3 -r1.4
  323.67 +--- libc/sysdeps/generic/strcasestr.c	23 Jan 1999 22:16:03 -0000	1.3
  323.68 ++++ libc/sysdeps/generic/strcasestr.c	26 Nov 2000 07:30:03 -0000	1.4
  323.69 +@@ -1,5 +1,5 @@
  323.70 + /* Return the offset of one string within another.
  323.71 +-   Copyright (C) 1994, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
  323.72 ++   Copyright (C) 1994,1996,1997,1998,1999,2000 Free Software Foundation, Inc.
  323.73 +    This file is part of the GNU C Library.
  323.74 + 
  323.75 +    The GNU C Library is free software; you can redistribute it and/or
  323.76 +@@ -62,7 +62,7 @@
  323.77 + 	  if (c == '\0')
  323.78 + 	    goto ret0;
  323.79 + 	}
  323.80 +-      while (_tolower (c) != b);
  323.81 ++      while (_tolower (c) != (int) b);
  323.82 + 
  323.83 +       c = _tolower (*++needle);
  323.84 +       if (c == '\0')
  323.85 +@@ -80,40 +80,42 @@
  323.86 + 	      a = *++haystack;
  323.87 + 	      if (a == '\0')
  323.88 + 		goto ret0;
  323.89 +-	      if (_tolower (a) == b)
  323.90 ++	      if (_tolower (a) == (int) b)
  323.91 + 		break;
  323.92 + 	      a = *++haystack;
  323.93 + 	      if (a == '\0')
  323.94 + 		goto ret0;
  323.95 +-shloop:	    }
  323.96 +-          while (_tolower (a) != b);
  323.97 ++shloop:
  323.98 ++	      ;
  323.99 ++	    }
 323.100 ++          while (_tolower (a) != (int) b);
 323.101 + 
 323.102 + jin:	  a = *++haystack;
 323.103 + 	  if (a == '\0')
 323.104 + 	    goto ret0;
 323.105 + 
 323.106 +-	  if (_tolower (a) != c)
 323.107 ++	  if (_tolower (a) != (int) c)
 323.108 + 	    goto shloop;
 323.109 + 
 323.110 + 	  rhaystack = haystack-- + 1;
 323.111 + 	  rneedle = needle;
 323.112 + 	  a = _tolower (*rneedle);
 323.113 + 
 323.114 +-	  if (_tolower (*rhaystack) == a)
 323.115 ++	  if (_tolower (*rhaystack) == (int) a)
 323.116 + 	    do
 323.117 + 	      {
 323.118 + 		if (a == '\0')
 323.119 + 		  goto foundneedle;
 323.120 + 		++rhaystack;
 323.121 + 		a = _tolower (*++needle);
 323.122 +-		if (_tolower (*rhaystack) != a)
 323.123 ++		if (_tolower (*rhaystack) != (int) a)
 323.124 + 		  break;
 323.125 + 		if (a == '\0')
 323.126 + 		  goto foundneedle;
 323.127 + 		++rhaystack;
 323.128 + 		a = _tolower (*++needle);
 323.129 + 	      }
 323.130 +-	    while (_tolower (*rhaystack) == a);
 323.131 ++	    while (_tolower (*rhaystack) == (int) a);
 323.132 + 
 323.133 + 	  needle = rneedle;		/* took the register-poor approach */
 323.134 + 
 323.135 +Index: strstr.c
 323.136 +===================================================================
 323.137 +RCS file: /cvs/libc/sysdeps/generic/strstr.c,v
 323.138 +retrieving revision 1.10
 323.139 +retrieving revision 1.11
 323.140 +diff -u -r1.10 -r1.11
 323.141 +--- libc/sysdeps/generic/strstr.c	11 Sep 1997 03:18:20 -0000	1.10
 323.142 ++++ libc/sysdeps/generic/strstr.c	26 Nov 2000 07:30:03 -0000	1.11
 323.143 +@@ -1,5 +1,5 @@
 323.144 + /* Return the offset of one string within another.
 323.145 +-   Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
 323.146 ++   Copyright (C) 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
 323.147 +    This file is part of the GNU C Library.
 323.148 + 
 323.149 +    The GNU C Library is free software; you can redistribute it and/or
 323.150 +@@ -82,7 +82,9 @@
 323.151 + 	      a = *++haystack;
 323.152 + 	      if (a == '\0')
 323.153 + 		goto ret0;
 323.154 +-shloop:	    }
 323.155 ++shloop:
 323.156 ++	      ;
 323.157 ++	    }
 323.158 +           while (a != b);
 323.159 + 
 323.160 + jin:	  a = *++haystack;
   324.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   324.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-grp.patch	Sat Feb 24 11:00:05 2007 +0000
   324.3 @@ -0,0 +1,56 @@
   324.4 +Fixes
   324.5 +initgroups.c: In function `internal_getgrouplist':
   324.6 +initgroups.c:179: error: parse error before "__FUNCTION__"
   324.7 +
   324.8 +CVSROOT:	/cvs/glibc
   324.9 +Module name:	libc
  324.10 +Changes by:	roland@sources.redhat.com	2001-12-16 21:52:12
  324.11 +
  324.12 +Modified files:
  324.13 +	nss            : nsswitch.c 
  324.14 +	grp            : initgroups.c 
  324.15 +
  324.16 +Log message:
  324.17 +	2001-12-16  Roland McGrath  <roland@frob.com>
  324.18 +	
  324.19 +	* nss/nsswitch.c (__nss_next): Don't use __FUNCTION__ as literal.
  324.20 +	* grp/initgroups.c (internal_getgrouplist): Likewise.
  324.21 +
  324.22 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/grp/initgroups.c.diff?r1=1.26&r2=1.27&cvsroot=glibc
  324.23 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/nss/nsswitch.c.diff?r1=1.52&r2=1.53&cvsroot=glibc
  324.24 +
  324.25 +Removed 2nd hunk for glibc-2.1.3 (it was just whitespace)
  324.26 +
  324.27 +===================================================================
  324.28 +RCS file: /cvs/glibc/libc/grp/initgroups.c,v
  324.29 +retrieving revision 1.26
  324.30 +retrieving revision 1.27
  324.31 +diff -u -r1.26 -r1.27
  324.32 +--- libc/grp/initgroups.c	2001/07/06 04:54:46	1.26
  324.33 ++++ libc/grp/initgroups.c	2001/12/17 05:52:11	1.27
  324.34 +@@ -176,7 +176,7 @@
  324.35 + 
  324.36 +       /* This is really only for debugging.  */
  324.37 +       if (NSS_STATUS_TRYAGAIN > status || status > NSS_STATUS_RETURN)
  324.38 +-	__libc_fatal ("illegal status in " __FUNCTION__);
  324.39 ++	__libc_fatal ("illegal status in internal_getgrouplist");
  324.40 + 
  324.41 +       if (status != NSS_STATUS_SUCCESS
  324.42 + 	  && nss_next_action (nip, status) == NSS_ACTION_RETURN)
  324.43 +
  324.44 +===================================================================
  324.45 +RCS file: /cvs/glibc/libc/nss/nsswitch.c,v
  324.46 +retrieving revision 1.52
  324.47 +retrieving revision 1.53
  324.48 +diff -u -r1.52 -r1.53
  324.49 +--- libc/nss/nsswitch.c	2001/07/17 08:21:36	1.52
  324.50 ++++ libc/nss/nsswitch.c	2001/12/17 05:52:11	1.53
  324.51 +@@ -178,7 +178,7 @@
  324.52 +     {
  324.53 +       /* This is really only for debugging.  */
  324.54 +        if (NSS_STATUS_TRYAGAIN > status || status > NSS_STATUS_RETURN)
  324.55 +-	 __libc_fatal ("illegal status in " __FUNCTION__);
  324.56 ++	 __libc_fatal ("illegal status in __nss_next");
  324.57 + 
  324.58 +        if (nss_next_action (*ni, status) == NSS_ACTION_RETURN)
  324.59 + 	 return 1;
   325.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   325.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-locale.patch	Sat Feb 24 11:00:05 2007 +0000
   325.3 @@ -0,0 +1,33 @@
   325.4 +programs/locfile.c: In function `locfile_read':
   325.5 +programs/locfile.c:863: error: label at end of compound statement
   325.6 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.1.3/build-glibc/locale/locfile.o] Error 1
   325.7 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.1.3/glibc-2.1.3/locale'
   325.8 +
   325.9 +programs/locale.c: In function `print_item':
  325.10 +programs/locale.c:666: error: label at end of compound statement
  325.11 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.1.3/build-glibc/locale/locale.o] Error 1
  325.12 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.1.3/glibc-2.1.3/locale'
  325.13 +
  325.14 +
  325.15 +Mechanical changes to quiet the errors.
  325.16 +
  325.17 +--- glibc-2.1.3/locale/programs/locfile.c.old	Sun Apr 11 20:03:52 2004
  325.18 ++++ glibc-2.1.3/locale/programs/locfile.c	Sun Apr 11 20:04:47 2004
  325.19 +@@ -860,6 +860,7 @@
  325.20 + 
  325.21 + 	    collate_end_weight (ldfile, result);
  325.22 + 	  illegal_weight:
  325.23 ++		;	/* gcc-3.4 requires a statement here */
  325.24 + 	  }
  325.25 + 	  continue;
  325.26 + 
  325.27 +--- glibc-2.1.3/locale/programs/locale.c.old	Sun Apr 11 20:08:48 2004
  325.28 ++++ glibc-2.1.3/locale/programs/locale.c	Sun Apr 11 20:09:04 2004
  325.29 +@@ -663,6 +663,7 @@
  325.30 + 	  }
  325.31 + 	  break;
  325.32 + 	default:
  325.33 ++		;       /* gcc-3.4 requires a statement here */
  325.34 + 	}
  325.35 +       putchar ('\n');
  325.36 +     }
   326.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   326.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-mntent.patch	Sat Feb 24 11:00:05 2007 +0000
   326.3 @@ -0,0 +1,39 @@
   326.4 +Fixes compilation with gcc-3.4.0:
   326.5 +
   326.6 +mntent_r.c: In function `__getmntent_r':
   326.7 +mntent_r.c:146: error: label at end of compound statement
   326.8 +mntent_r.c: In function `__addmntent':
   326.9 +mntent_r.c:214: warning: implicit declaration of function `alloca'
  326.10 +
  326.11 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/misc/mntent_r.c.diff?r1=1.9&r2=1.11&cvsroot=glibc
  326.12 +
  326.13 +===================================================================
  326.14 +RCS file: /cvs/glibc/libc/misc/mntent_r.c,v
  326.15 +retrieving revision 1.9
  326.16 +retrieving revision 1.11
  326.17 +diff -u -r1.9 -r1.11
  326.18 +--- libc/misc/mntent_r.c	1999/07/26 01:45:32	1.9
  326.19 ++++ libc/misc/mntent_r.c	2000/11/28 07:27:14	1.11
  326.20 +@@ -1,5 +1,5 @@
  326.21 + /* Utilities for reading/writing fstab, mtab, etc.
  326.22 +-   Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
  326.23 ++   Copyright (C) 1995,1996,1997,1998,1999,2000 Free Software Foundation, Inc.
  326.24 +    This file is part of the GNU C Library.
  326.25 + 
  326.26 +    The GNU C Library is free software; you can redistribute it and/or
  326.27 +@@ -17,6 +17,7 @@
  326.28 +    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  326.29 +    Boston, MA 02111-1307, USA.  */
  326.30 + 
  326.31 ++#include <alloca.h>
  326.32 + #include <mntent.h>
  326.33 + #include <stdio.h>
  326.34 + #include <string.h>
  326.35 +@@ -143,6 +144,7 @@
  326.36 +     case 1:
  326.37 +       mp->mnt_passno = 0;
  326.38 +     case 2:
  326.39 ++      break;
  326.40 +     }
  326.41 +   funlockfile (stream);
  326.42 + 
   327.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   327.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc-3.4-sunrpc.patch	Sat Feb 24 11:00:05 2007 +0000
   327.3 @@ -0,0 +1,33 @@
   327.4 +Fixes gcc-3.4.0 compilation errors
   327.5 +
   327.6 +rpc_hout.c: In function `print_funcdef':
   327.7 +rpc_hout.c:140: error: label at end of compound statement
   327.8 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.1.3/build-glibc/sunrpc/rpc_hout.o] Error 1
   327.9 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.1.3/glibc-2.1.3/sunrpc'
  327.10 +
  327.11 +rpc_cout.c: In function `emit_inline':
  327.12 +rpc_cout.c:743: error: label at end of compound statement
  327.13 +...
  327.14 +
  327.15 +--- glibc-2.1.3/sunrpc/rpc_hout.c.old	Sun Apr 11 22:06:26 2004
  327.16 ++++ glibc-2.1.3/sunrpc/rpc_hout.c	Sun Apr 11 22:06:42 2004
  327.17 +@@ -136,7 +136,7 @@
  327.18 +       pprogramdef (def);
  327.19 +       break;
  327.20 +     default:
  327.21 +-      /* ?... shouldn't happen I guess */
  327.22 ++      ; /* ?... shouldn't happen I guess */
  327.23 +     }
  327.24 + }
  327.25 + 
  327.26 +--- glibc-2.1.3/sunrpc/rpc_cout.c.old	Sun Apr 11 22:10:39 2004
  327.27 ++++ glibc-2.1.3/sunrpc/rpc_cout.c	Sun Apr 11 22:10:53 2004
  327.28 +@@ -739,7 +739,7 @@
  327.29 +       f_print (fout, "}\n");
  327.30 +       break;
  327.31 +     default:
  327.32 +-      /* ?... do nothing I guess */
  327.33 ++      ; /* ?... do nothing I guess */
  327.34 +     }
  327.35 + }
  327.36 + 
   328.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   328.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-configure.patch	Sat Feb 24 11:00:05 2007 +0000
   328.3 @@ -0,0 +1,11 @@
   328.4 +--- glibc-2.1.3/configure.old	2004-03-04 11:05:49.000000000 -0800
   328.5 ++++ glibc-2.1.3/configure	2004-03-04 11:07:58.000000000 -0800
   328.6 +@@ -1273,7 +1273,7 @@
   328.7 +   ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustp-]*[0-9.]*\).*$/\1/p'`
   328.8 +   case $ac_prog_version in
   328.9 +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
  328.10 +-    egcs-2.9[1-9].*|egcs-2.90.2[789]|egcs-2.90.[3-9][0-9]|*gcc-2.9[1-9].*|pgcc-2.90.2[789]|pgcc-2.90.[3-9][0-9]|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|cygnus-2.9[1-9].*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9])
  328.11 ++    egcs-2.9[1-9].*|egcs-2.90.2[789]|egcs-2.90.[3-9][0-9]|*gcc-2.9[1-9].*|pgcc-2.90.2[789]|pgcc-2.90.[3-9][0-9]|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|3.[2-9]*|cygnus-2.9[1-9].*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9])
  328.12 +        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
  328.13 +     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
  328.14 + 
   329.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   329.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-dl-machine-i386.patch	Sat Feb 24 11:00:05 2007 +0000
   329.3 @@ -0,0 +1,171 @@
   329.4 +	* sysdeps/i386/dl-machine.h (RTLD_START): Don't use multi-line
   329.5 +	strings.
   329.6 +	(ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise.
   329.7 +
   329.8 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/dl-machine.h.diff?r1=1.82&r2=1.83&cvsroot=glibc&hideattic=0
   329.9 +backported a bit
  329.10 +
  329.11 +--- glibc-2.1.3/sysdeps/i386/dl-machine.h.old	1999-02-20 10:19:47.000000000 -0800
  329.12 ++++ glibc-2.1.3/sysdeps/i386/dl-machine.h	2004-03-05 15:56:25.000000000 -0800
  329.13 +@@ -124,68 +124,68 @@
  329.14 +    and then redirect to the address it returns.  */
  329.15 + #ifndef PROF
  329.16 + # define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
  329.17 +-	.text
  329.18 +-	.globl _dl_runtime_resolve
  329.19 +-	.type _dl_runtime_resolve, @function
  329.20 +-	.align 16
  329.21 +-_dl_runtime_resolve:
  329.22 +-	pushl %eax		# Preserve registers otherwise clobbered.
  329.23 +-	pushl %ecx
  329.24 +-	pushl %edx
  329.25 +-	movl 16(%esp), %edx	# Copy args pushed by PLT in register.  Note
  329.26 +-	movl 12(%esp), %eax	# that `fixup' takes its parameters in regs.
  329.27 +-	call fixup		# Call resolver.
  329.28 +-	popl %edx		# Get register content back.
  329.29 +-	popl %ecx
  329.30 +-	xchgl %eax, (%esp)	# Get %eax contents end store function address.
  329.31 +-	ret $8			# Jump to function address.
  329.32 +-	.size _dl_runtime_resolve, .-_dl_runtime_resolve
  329.33 +-
  329.34 +-	.globl _dl_runtime_profile
  329.35 +-	.type _dl_runtime_profile, @function
  329.36 +-	.align 16
  329.37 +-_dl_runtime_profile:
  329.38 +-	pushl %eax		# Preserve registers otherwise clobbered.
  329.39 +-	pushl %ecx
  329.40 +-	pushl %edx
  329.41 +-	movl 20(%esp), %ecx	# Load return address
  329.42 +-	movl 16(%esp), %edx	# Copy args pushed by PLT in register.  Note
  329.43 +-	movl 12(%esp), %eax	# that `fixup' takes its parameters in regs.
  329.44 +-	call profile_fixup	# Call resolver.
  329.45 +-	popl %edx		# Get register content back.
  329.46 +-	popl %ecx
  329.47 +-	xchgl %eax, (%esp)	# Get %eax contents end store function address.
  329.48 +-	ret $8			# Jump to function address.
  329.49 +-	.size _dl_runtime_profile, .-_dl_runtime_profile
  329.50 +-	.previous
  329.51 ++	.text\n\
  329.52 ++	.globl _dl_runtime_resolve\n\
  329.53 ++	.type _dl_runtime_resolve, @function\n\
  329.54 ++	.align 16\n\
  329.55 ++_dl_runtime_resolve:\n\
  329.56 ++	pushl %eax		# Preserve registers otherwise clobbered.\n\
  329.57 ++	pushl %ecx\n\
  329.58 ++	pushl %edx\n\
  329.59 ++	movl 16(%esp), %edx	# Copy args pushed by PLT in register.  Note\n\
  329.60 ++	movl 12(%esp), %eax	# that `fixup' takes its parameters in regs.\n\
  329.61 ++	call fixup		# Call resolver.\n\
  329.62 ++	popl %edx		# Get register content back.\n\
  329.63 ++	popl %ecx\n\
  329.64 ++	xchgl %eax, (%esp)	# Get %eax contents end store function address.\n\
  329.65 ++	ret $8			# Jump to function address.\n\
  329.66 ++	.size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
  329.67 ++\n\
  329.68 ++	.globl _dl_runtime_profile\n\
  329.69 ++	.type _dl_runtime_profile, @function\n\
  329.70 ++	.align 16\n\
  329.71 ++_dl_runtime_profile:\n\
  329.72 ++	pushl %eax		# Preserve registers otherwise clobbered.\n\
  329.73 ++	pushl %ecx\n\
  329.74 ++	pushl %edx\n\
  329.75 ++	movl 20(%esp), %ecx	# Load return address\n\
  329.76 ++	movl 16(%esp), %edx	# Copy args pushed by PLT in register.  Note\n\
  329.77 ++	movl 12(%esp), %eax	# that `fixup' takes its parameters in regs.\n\
  329.78 ++	call profile_fixup	# Call resolver.\n\
  329.79 ++	popl %edx		# Get register content back.\n\
  329.80 ++	popl %ecx\n\
  329.81 ++	xchgl %eax, (%esp)	# Get %eax contents end store function address.\n\
  329.82 ++	ret $8			# Jump to function address.\n\
  329.83 ++	.size _dl_runtime_profile, .-_dl_runtime_profile\n\
  329.84 ++	.previous\n\
  329.85 + ");
  329.86 + #else
  329.87 +-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
  329.88 +-	.text
  329.89 +-	.globl _dl_runtime_resolve
  329.90 +-	.globl _dl_runtime_profile
  329.91 +-	.type _dl_runtime_resolve, @function
  329.92 +-	.type _dl_runtime_profile, @function
  329.93 +-	.align 16
  329.94 +-_dl_runtime_resolve:
  329.95 +-_dl_runtime_profile:
  329.96 +-	pushl %eax		# Preserve registers otherwise clobbered.
  329.97 +-	pushl %ecx
  329.98 +-	pushl %edx
  329.99 +-	movl 16(%esp), %edx	# Push the arguments for `fixup'
 329.100 +-	movl 12(%esp), %eax
 329.101 +-	pushl %edx
 329.102 +-	pushl %eax
 329.103 +-	call fixup		# Call resolver.
 329.104 +-	popl %edx		# Pop the parameters
 329.105 +-	popl %ecx
 329.106 +-	popl %edx		# Get register content back.
 329.107 +-	popl %ecx
 329.108 +-	xchgl %eax, (%esp)	# Get %eax contents end store function address.
 329.109 +-	ret $8			# Jump to function address.
 329.110 +-	.size _dl_runtime_resolve, .-_dl_runtime_resolve
 329.111 +-	.size _dl_runtime_profile, .-_dl_runtime_profile
 329.112 +-	.previous
 329.113 ++# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\n\
 329.114 ++	.text\n\
 329.115 ++	.globl _dl_runtime_resolve\n\
 329.116 ++	.globl _dl_runtime_profile\n\
 329.117 ++	.type _dl_runtime_resolve, @function\n\
 329.118 ++	.type _dl_runtime_profile, @function\n\
 329.119 ++	.align 16\n\
 329.120 ++_dl_runtime_resolve:\n\
 329.121 ++_dl_runtime_profile:\n\
 329.122 ++	pushl %eax		# Preserve registers otherwise clobbered.\n\
 329.123 ++	pushl %ecx\n\
 329.124 ++	pushl %edx\n\
 329.125 ++	movl 16(%esp), %edx	# Push the arguments for `fixup'\n\
 329.126 ++	movl 12(%esp), %eax\n\
 329.127 ++	pushl %edx\n\
 329.128 ++	pushl %eax\n\
 329.129 ++	call fixup		# Call resolver.\n\
 329.130 ++	popl %edx		# Pop the parameters\n\
 329.131 ++	popl %ecx\n\
 329.132 ++	popl %edx		# Get register content back.\n\
 329.133 ++	popl %ecx\n\
 329.134 ++	xchgl %eax, (%esp)	# Get %eax contents end store function address.\n\
 329.135 ++	ret $8			# Jump to function address.\n\
 329.136 ++	.size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
 329.137 ++	.size _dl_runtime_profile, .-_dl_runtime_profile\n\
 329.138 ++	.previous\n\
 329.139 + ");
 329.140 + #endif
 329.141 + 
 329.142 +@@ -197,10 +197,10 @@
 329.143 +    The C function `_dl_start' is the real entry point;
 329.144 +    its return value is the user program's entry point.  */
 329.145 + 
 329.146 +-#define RTLD_START asm ("\
 329.147 +-.text\n\
 329.148 +-.globl _start\n\
 329.149 +-.globl _dl_start_user\n\
 329.150 ++#define RTLD_START asm ("\n\
 329.151 ++	.text\n\
 329.152 ++	.globl _start\n\
 329.153 ++	.globl _dl_start_user\n\
 329.154 + _start:\n\
 329.155 + 	pushl %esp\n\
 329.156 + 	call _dl_start\n\
 329.157 +@@ -208,7 +208,7 @@
 329.158 + _dl_start_user:\n\
 329.159 + 	# Save the user entry point address in %edi.\n\
 329.160 + 	movl %eax, %edi\n\
 329.161 +-	# Point %ebx at the GOT.
 329.162 ++	# Point %ebx at the GOT.\n\
 329.163 + 	call 0f\n\
 329.164 + 0:	popl %ebx\n\
 329.165 + 	addl $_GLOBAL_OFFSET_TABLE_+[.-0b], %ebx\n\
 329.166 +@@ -255,7 +255,7 @@
 329.167 + 	movl _dl_fini@GOT(%ebx), %edx\n\
 329.168 + 	# Jump to the user's entry point.\n\
 329.169 + 	jmp *%edi\n\
 329.170 +-.previous\n\
 329.171 ++	.previous\n\
 329.172 + ");
 329.173 + 
 329.174 + /* Nonzero iff TYPE should not be allowed to resolve to one of
   330.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   330.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-errlist.patch	Sat Feb 24 11:00:05 2007 +0000
   330.3 @@ -0,0 +1,48 @@
   330.4 +Backport from cvs 
   330.5 +
   330.6 +Fixes:
   330.7 +
   330.8 +../sysdeps/unix/sysv/linux/errlist.c:41: weak declaration of `_old_sys_nerr' must precede definition
   330.9 +make[2]: *** [/home/dank/downloads/crosstool-0.24/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/stdio-common/errlist.os] Error 1
  330.10 +
  330.11 +as well as breakage on arches where ; is a comment char in asm
  330.12 +
  330.13 +--- glibc-2.1.3/sysdeps/unix/sysv/linux/errlist.c.old	2004-03-05 15:32:21.000000000 -0800
  330.14 ++++ glibc-2.1.3/sysdeps/unix/sysv/linux/errlist.c	2004-03-05 15:39:39.000000000 -0800
  330.15 +@@ -24,13 +24,13 @@
  330.16 + # define SYS_ERRLIST __new_sys_errlist
  330.17 + # define SYS_NERR __new_sys_nerr
  330.18 + 
  330.19 +-asm (".data; .globl __old_sys_errlist;  __old_sys_errlist:");
  330.20 ++asm (".data\n\t.globl __old_sys_errlist\n\t __old_sys_errlist:");
  330.21 + #endif
  330.22 + 
  330.23 + #include <sysdeps/gnu/errlist.c>
  330.24 + 
  330.25 + #if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
  330.26 +-asm (".type __old_sys_errlist,@object;.size __old_sys_errlist,"
  330.27 ++asm (".type __old_sys_errlist,@object\n\t.size __old_sys_errlist,"
  330.28 +      OLD_ERRLIST_SIZE_STR "*" PTR_SIZE_STR);
  330.29 + 
  330.30 + extern const char *const *__old_sys_errlist;
  330.31 +@@ -38,17 +38,16 @@
  330.32 + const int __old_sys_nerr = OLD_ERRLIST_SIZE;
  330.33 + 
  330.34 + strong_alias (__old_sys_nerr, _old_sys_nerr);
  330.35 +-weak_alias (__old_sys_nerr, _old_sys_nerr)
  330.36 + symbol_version (__old_sys_nerr, _sys_nerr, GLIBC_2.0);
  330.37 + symbol_version (_old_sys_nerr, sys_nerr, GLIBC_2.0);
  330.38 +-weak_alias (__old_sys_errlist, _old_sys_errlist);
  330.39 ++strong_alias (__old_sys_errlist, _old_sys_errlist);
  330.40 + symbol_version (__old_sys_errlist, _sys_errlist, GLIBC_2.0);
  330.41 + symbol_version (_old_sys_errlist, sys_errlist, GLIBC_2.0);
  330.42 + 
  330.43 +-weak_alias (__new_sys_nerr, _new_sys_nerr)
  330.44 ++strong_alias (__new_sys_nerr, _new_sys_nerr)
  330.45 + default_symbol_version (__new_sys_nerr, _sys_nerr, GLIBC_2.1);
  330.46 + default_symbol_version (_new_sys_nerr, sys_nerr, GLIBC_2.1);
  330.47 +-weak_alias (__new_sys_errlist, _new_sys_errlist)
  330.48 ++strong_alias (__new_sys_errlist, _new_sys_errlist)
  330.49 + default_symbol_version (__new_sys_errlist, _sys_errlist, GLIBC_2.1);
  330.50 + default_symbol_version (_new_sys_errlist, sys_errlist, GLIBC_2.1);
  330.51 + 
   331.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   331.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-longlong.patch	Sat Feb 24 11:00:05 2007 +0000
   331.3 @@ -0,0 +1,774 @@
   331.4 +--- glibc-2.1.3/stdlib/longlong.h.old	2004-03-05 14:49:14.000000000 -0800
   331.5 ++++ glibc-2.1.3/stdlib/longlong.h	2004-03-05 15:19:26.000000000 -0800
   331.6 +@@ -106,8 +106,8 @@
   331.7 + 
   331.8 + #if (defined (__a29k__) || defined (_AM29K)) && W_TYPE_SIZE == 32
   331.9 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
  331.10 +-  __asm__ ("add %1,%4,%5
  331.11 +-	addc %0,%2,%3"							\
  331.12 ++  __asm__ ("add %1,%4,%5\n"						\
  331.13 ++	"addc %0,%2,%3"							\
  331.14 + 	   : "=r" ((USItype)(sh)),					\
  331.15 + 	    "=&r" ((USItype)(sl))					\
  331.16 + 	   : "%r" ((USItype)(ah)),					\
  331.17 +@@ -115,8 +115,8 @@
  331.18 + 	     "%r" ((USItype)(al)),					\
  331.19 + 	     "rI" ((USItype)(bl)))
  331.20 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
  331.21 +-  __asm__ ("sub %1,%4,%5
  331.22 +-	subc %0,%2,%3"							\
  331.23 ++  __asm__ ("sub %1,%4,%5\n"						\
  331.24 ++	"subc %0,%2,%3"							\
  331.25 + 	   : "=r" ((USItype)(sh)),					\
  331.26 + 	     "=&r" ((USItype)(sl))					\
  331.27 + 	   : "r" ((USItype)(ah)),					\
  331.28 +@@ -173,8 +173,8 @@
  331.29 + 
  331.30 + #if defined (__arm__) && W_TYPE_SIZE == 32
  331.31 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
  331.32 +-  __asm__ ("adds	%1, %4, %5
  331.33 +-	adc	%0, %2, %3"						\
  331.34 ++  __asm__ ("adds	%1, %4, %5\n"					\
  331.35 ++	"adc	%0, %2, %3"						\
  331.36 + 	   : "=r" ((USItype)(sh)),					\
  331.37 + 	     "=&r" ((USItype)(sl))					\
  331.38 + 	   : "%r" ((USItype)(ah)),					\
  331.39 +@@ -182,8 +182,8 @@
  331.40 + 	     "%r" ((USItype)(al)),					\
  331.41 + 	     "rI" ((USItype)(bl)))
  331.42 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
  331.43 +-  __asm__ ("subs	%1, %4, %5
  331.44 +-	sbc	%0, %2, %3"						\
  331.45 ++  __asm__ ("subs	%1, %4, %5\n"					\
  331.46 ++	"sbc	%0, %2, %3"						\
  331.47 + 	   : "=r" ((USItype)(sh)),					\
  331.48 + 	     "=&r" ((USItype)(sl))					\
  331.49 + 	   : "r" ((USItype)(ah)),					\
  331.50 +@@ -192,19 +192,19 @@
  331.51 + 	     "rI" ((USItype)(bl)))
  331.52 + #if 0
  331.53 + #define umul_ppmm(xh, xl, a, b) \
  331.54 +-  __asm__ ("%@ Inlined umul_ppmm
  331.55 +-	mov	%|r0, %2, lsr #16
  331.56 +-	mov	%|r2, %3, lsr #16
  331.57 +-	bic	%|r1, %2, %|r0, lsl #16
  331.58 +-	bic	%|r2, %3, %|r2, lsl #16
  331.59 +-	mul	%1, %|r1, %|r2
  331.60 +-	mul	%|r2, %|r0, %|r2
  331.61 +-	mul	%|r1, %0, %|r1
  331.62 +-	mul	%0, %|r0, %0
  331.63 +-	adds	%|r1, %|r2, %|r1
  331.64 +-	addcs	%0, %0, #65536
  331.65 +-	adds	%1, %1, %|r1, lsl #16
  331.66 +-	adc	%0, %0, %|r1, lsr #16"					\
  331.67 ++  __asm__ ("%@ Inlined umul_ppmm\n"					\
  331.68 ++	"mov	%|r0, %2, lsr #16\n"					\
  331.69 ++	"mov	%|r2, %3, lsr #16\n"					\
  331.70 ++	"bic	%|r1, %2, %|r0, lsl #16\n"				\
  331.71 ++	"bic	%|r2, %3, %|r2, lsl #16\n"				\
  331.72 ++	"mul	%1, %|r1, %|r2\n"					\
  331.73 ++	"mul	%|r2, %|r0, %|r2\n"					\
  331.74 ++	"mul	%|r1, %0, %|r1\n"					\
  331.75 ++	"mul	%0, %|r0, %0\n"						\
  331.76 ++	"adds	%|r1, %|r2, %|r1\n"					\
  331.77 ++	"addcs	%0, %0, #65536\n"					\
  331.78 ++	"adds	%1, %1, %|r1, lsl #16\n"				\
  331.79 ++	"adc	%0, %0, %|r1, lsr #16"					\
  331.80 + 	   : "=&r" ((USItype)(xh)),					\
  331.81 + 	     "=r" ((USItype)(xl))					\
  331.82 + 	   : "r" ((USItype)(a)),					\
  331.83 +@@ -245,8 +245,8 @@
  331.84 + 
  331.85 + #if defined (__gmicro__) && W_TYPE_SIZE == 32
  331.86 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
  331.87 +-  __asm__ ("add.w %5,%1
  331.88 +-	addx %3,%0"							\
  331.89 ++  __asm__ ("add.w %5,%1\n"						\
  331.90 ++	"addx %3,%0"							\
  331.91 + 	   : "=g" ((USItype)(sh)),					\
  331.92 + 	     "=&g" ((USItype)(sl))					\
  331.93 + 	   : "%0" ((USItype)(ah)),					\
  331.94 +@@ -254,8 +254,8 @@
  331.95 + 	     "%1" ((USItype)(al)),					\
  331.96 + 	     "g" ((USItype)(bl)))
  331.97 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
  331.98 +-  __asm__ ("sub.w %5,%1
  331.99 +-	subx %3,%0"							\
 331.100 ++  __asm__ ("sub.w %5,%1\n"						\
 331.101 ++	"subx %3,%0"							\
 331.102 + 	   : "=g" ((USItype)(sh)),					\
 331.103 + 	     "=&g" ((USItype)(sl))					\
 331.104 + 	   : "0" ((USItype)(ah)),					\
 331.105 +@@ -284,8 +284,8 @@
 331.106 + 
 331.107 + #if defined (__hppa) && W_TYPE_SIZE == 32
 331.108 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 331.109 +-  __asm__ ("add %4,%5,%1
 331.110 +-	addc %2,%3,%0"							\
 331.111 ++  __asm__ ("add %4,%5,%1\n"						\
 331.112 ++	"addc %2,%3,%0"							\
 331.113 + 	   : "=r" ((USItype)(sh)),					\
 331.114 + 	     "=&r" ((USItype)(sl))					\
 331.115 + 	   : "%rM" ((USItype)(ah)),					\
 331.116 +@@ -293,8 +293,8 @@
 331.117 + 	     "%rM" ((USItype)(al)),					\
 331.118 + 	     "rM" ((USItype)(bl)))
 331.119 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 331.120 +-  __asm__ ("sub %4,%5,%1
 331.121 +-	subb %2,%3,%0"							\
 331.122 ++  __asm__ ("sub %4,%5,%1\n"						\
 331.123 ++	"subb %2,%3,%0"							\
 331.124 + 	   : "=r" ((USItype)(sh)),					\
 331.125 + 	     "=&r" ((USItype)(sl))					\
 331.126 + 	   : "rM" ((USItype)(ah)),					\
 331.127 +@@ -332,22 +332,22 @@
 331.128 +   do {									\
 331.129 +     USItype __tmp;							\
 331.130 +     __asm__ (								\
 331.131 +-       "ldi		1,%0
 331.132 +-	extru,=		%1,15,16,%%r0		; Bits 31..16 zero?
 331.133 +-	extru,tr	%1,15,16,%1		; No.  Shift down, skip add.
 331.134 +-	ldo		16(%0),%0		; Yes.  Perform add.
 331.135 +-	extru,=		%1,23,8,%%r0		; Bits 15..8 zero?
 331.136 +-	extru,tr	%1,23,8,%1		; No.  Shift down, skip add.
 331.137 +-	ldo		8(%0),%0		; Yes.  Perform add.
 331.138 +-	extru,=		%1,27,4,%%r0		; Bits 7..4 zero?
 331.139 +-	extru,tr	%1,27,4,%1		; No.  Shift down, skip add.
 331.140 +-	ldo		4(%0),%0		; Yes.  Perform add.
 331.141 +-	extru,=		%1,29,2,%%r0		; Bits 3..2 zero?
 331.142 +-	extru,tr	%1,29,2,%1		; No.  Shift down, skip add.
 331.143 +-	ldo		2(%0),%0		; Yes.  Perform add.
 331.144 +-	extru		%1,30,1,%1		; Extract bit 1.
 331.145 +-	sub		%0,%1,%0		; Subtract it.
 331.146 +-	" : "=r" (count), "=r" (__tmp) : "1" (x));			\
 331.147 ++       "ldi		1,%0\n"						\
 331.148 ++	"extru,=	%1,15,16,%%r0		; Bits 31..16 zero?\n"			\
 331.149 ++	"extru,tr	%1,15,16,%1		; No.  Shift down, skip add.\n"		\
 331.150 ++	"ldo		16(%0),%0		; Yes.  Perform add.\n"			\
 331.151 ++	"extru,=	%1,23,8,%%r0		; Bits 15..8 zero?\n"			\
 331.152 ++	"extru,tr	%1,23,8,%1		; No.  Shift down, skip add.\n"		\
 331.153 ++	"ldo		8(%0),%0		; Yes.  Perform add.\n"			\
 331.154 ++	"extru,=	%1,27,4,%%r0		; Bits 7..4 zero?\n"			\
 331.155 ++	"extru,tr	%1,27,4,%1		; No.  Shift down, skip add.\n"		\
 331.156 ++	"ldo		4(%0),%0		; Yes.  Perform add.\n"			\
 331.157 ++	"extru,=	%1,29,2,%%r0		; Bits 3..2 zero?\n"			\
 331.158 ++	"extru,tr	%1,29,2,%1		; No.  Shift down, skip add.\n"		\
 331.159 ++	"ldo		2(%0),%0		; Yes.  Perform add.\n"			\
 331.160 ++	"extru		%1,30,1,%1		; Extract bit 1.\n"			\
 331.161 ++	"sub		%0,%1,%0		; Subtract it.\n"			\
 331.162 ++	: "=r" (count), "=r" (__tmp) : "1" (x));			\
 331.163 +   } while (0)
 331.164 + #endif /* hppa */
 331.165 + 
 331.166 +@@ -394,8 +394,8 @@
 331.167 + 
 331.168 + #if (defined (__i386__) || defined (__i486__)) && W_TYPE_SIZE == 32
 331.169 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 331.170 +-  __asm__ ("addl %5,%1
 331.171 +-	adcl %3,%0"							\
 331.172 ++  __asm__ ("addl %5,%1\n"						\
 331.173 ++	"adcl %3,%0"							\
 331.174 + 	   : "=r" ((USItype)(sh)),					\
 331.175 + 	     "=&r" ((USItype)(sl))					\
 331.176 + 	   : "%0" ((USItype)(ah)),					\
 331.177 +@@ -403,8 +403,8 @@
 331.178 + 	     "%1" ((USItype)(al)),					\
 331.179 + 	     "g" ((USItype)(bl)))
 331.180 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 331.181 +-  __asm__ ("subl %5,%1
 331.182 +-	sbbl %3,%0"							\
 331.183 ++  __asm__ ("subl %5,%1\n"						\
 331.184 ++	"sbbl %3,%0"							\
 331.185 + 	   : "=r" ((USItype)(sh)),					\
 331.186 + 	     "=&r" ((USItype)(sl))					\
 331.187 + 	   : "0" ((USItype)(ah)),					\
 331.188 +@@ -516,8 +516,8 @@
 331.189 + 
 331.190 + #if (defined (__mc68000__) || defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)) && W_TYPE_SIZE == 32
 331.191 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 331.192 +-  __asm__ ("add%.l %5,%1
 331.193 +-	addx%.l %3,%0"							\
 331.194 ++  __asm__ ("add%.l %5,%1\n"						\
 331.195 ++	"addx%.l %3,%0"							\
 331.196 + 	   : "=d" ((USItype)(sh)),					\
 331.197 + 	     "=&d" ((USItype)(sl))					\
 331.198 + 	   : "%0" ((USItype)(ah)),					\
 331.199 +@@ -525,8 +525,8 @@
 331.200 + 	     "%1" ((USItype)(al)),					\
 331.201 + 	     "g" ((USItype)(bl)))
 331.202 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 331.203 +-  __asm__ ("sub%.l %5,%1
 331.204 +-	subx%.l %3,%0"							\
 331.205 ++  __asm__ ("sub%.l %5,%1\n"						\
 331.206 ++	"subx%.l %3,%0"							\
 331.207 + 	   : "=d" ((USItype)(sh)),					\
 331.208 + 	     "=&d" ((USItype)(sl))					\
 331.209 + 	   : "0" ((USItype)(ah)),					\
 331.210 +@@ -564,28 +564,28 @@
 331.211 + #else /* not mc68020 */
 331.212 + #define umul_ppmm(xh, xl, a, b) \
 331.213 +   do { USItype __umul_tmp1, __umul_tmp2;				\
 331.214 +-	__asm__ ("| Inlined umul_ppmm
 331.215 +-	move%.l	%5,%3
 331.216 +-	move%.l	%2,%0
 331.217 +-	move%.w	%3,%1
 331.218 +-	swap	%3
 331.219 +-	swap	%0
 331.220 +-	mulu	%2,%1
 331.221 +-	mulu	%3,%0
 331.222 +-	mulu	%2,%3
 331.223 +-	swap	%2
 331.224 +-	mulu	%5,%2
 331.225 +-	add%.l	%3,%2
 331.226 +-	jcc	1f
 331.227 +-	add%.l	%#0x10000,%0
 331.228 +-1:	move%.l	%2,%3
 331.229 +-	clr%.w	%2
 331.230 +-	swap	%2
 331.231 +-	swap	%3
 331.232 +-	clr%.w	%3
 331.233 +-	add%.l	%3,%1
 331.234 +-	addx%.l	%2,%0
 331.235 +-	| End inlined umul_ppmm"					\
 331.236 ++	__asm__ ("| Inlined umul_ppmm\n"				\
 331.237 ++	"move%.l	%5,%3\n"					\
 331.238 ++	"move%.l	%2,%0\n"					\
 331.239 ++	"move%.w	%3,%1\n"					\
 331.240 ++	"swap	%3\n"							\
 331.241 ++	"swap	%0\n"							\
 331.242 ++	"mulu	%2,%1\n"						\
 331.243 ++	"mulu	%3,%0\n"						\
 331.244 ++	"mulu	%2,%3\n"						\
 331.245 ++	"swap	%2\n"							\
 331.246 ++	"mulu	%5,%2\n"						\
 331.247 ++	"add%.l	%3,%2\n"						\
 331.248 ++	"jcc	1f\n"							\
 331.249 ++	"add%.l	%#0x10000,%0\n"						\
 331.250 ++"1:	move%.l	%2,%3\n"						\
 331.251 ++	"clr%.w	%2\n"							\
 331.252 ++	"swap	%2\n"							\
 331.253 ++	"swap	%3\n"							\
 331.254 ++	"clr%.w	%3\n"							\
 331.255 ++	"add%.l	%3,%1\n"						\
 331.256 ++	"addx%.l	%2,%0\n"					\
 331.257 ++	"| End inlined umul_ppmm"					\
 331.258 + 	      : "=&d" ((USItype)(xh)), "=&d" ((USItype)(xl)),		\
 331.259 + 		"=d" (__umul_tmp1), "=&d" (__umul_tmp2)			\
 331.260 + 	      : "%2" ((USItype)(a)), "d" ((USItype)(b)));		\
 331.261 +@@ -597,8 +597,8 @@
 331.262 + 
 331.263 + #if defined (__m88000__) && W_TYPE_SIZE == 32
 331.264 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 331.265 +-  __asm__ ("addu.co %1,%r4,%r5
 331.266 +-	addu.ci %0,%r2,%r3"						\
 331.267 ++  __asm__ ("addu.co %1,%r4,%r5\n"					\
 331.268 ++	"addu.ci %0,%r2,%r3"						\
 331.269 + 	   : "=r" ((USItype)(sh)),					\
 331.270 + 	     "=&r" ((USItype)(sl))					\
 331.271 + 	   : "%rJ" ((USItype)(ah)),					\
 331.272 +@@ -606,8 +606,8 @@
 331.273 + 	     "%rJ" ((USItype)(al)),					\
 331.274 + 	     "rJ" ((USItype)(bl)))
 331.275 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 331.276 +-  __asm__ ("subu.co %1,%r4,%r5
 331.277 +-	subu.ci %0,%r2,%r3"						\
 331.278 ++  __asm__ ("subu.co %1,%r4,%r5\n"					\
 331.279 ++	"subu.ci %0,%r2,%r3"						\
 331.280 + 	   : "=r" ((USItype)(sh)),					\
 331.281 + 	     "=&r" ((USItype)(sl))					\
 331.282 + 	   : "rJ" ((USItype)(ah)),					\
 331.283 +@@ -665,9 +665,9 @@
 331.284 + 	     "d" ((USItype)(v)))
 331.285 + #else
 331.286 + #define umul_ppmm(w1, w0, u, v) \
 331.287 +-  __asm__ ("multu %2,%3
 331.288 +-	mflo %0
 331.289 +-	mfhi %1"							\
 331.290 ++  __asm__ ("multu %2,%3\n"						\
 331.291 ++	"mflo %0\n"							\
 331.292 ++	"mfhi %1"							\
 331.293 + 	   : "=d" ((USItype)(w0)),					\
 331.294 + 	     "=d" ((USItype)(w1))					\
 331.295 + 	   : "d" ((USItype)(u)),					\
 331.296 +@@ -687,9 +687,9 @@
 331.297 + 	     "d" ((UDItype)(v)))
 331.298 + #else
 331.299 + #define umul_ppmm(w1, w0, u, v) \
 331.300 +-  __asm__ ("dmultu %2,%3
 331.301 +-	mflo %0
 331.302 +-	mfhi %1"							\
 331.303 ++  __asm__ ("dmultu %2,%3\n"						\
 331.304 ++	"mflo %0\n"							\
 331.305 ++	"mfhi %1"							\
 331.306 + 	   : "=d" ((UDItype)(w0)),					\
 331.307 + 	     "=d" ((UDItype)(w1))					\
 331.308 + 	   : "d" ((UDItype)(u)),					\
 331.309 +@@ -857,8 +857,8 @@
 331.310 + 
 331.311 + #if defined (__pyr__) && W_TYPE_SIZE == 32
 331.312 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 331.313 +-  __asm__ ("addw	%5,%1
 331.314 +-	addwc	%3,%0"							\
 331.315 ++  __asm__ ("addw	%5,%1\n"					\
 331.316 ++	"addwc	%3,%0"							\
 331.317 + 	   : "=r" ((USItype)(sh)),					\
 331.318 + 	     "=&r" ((USItype)(sl))					\
 331.319 + 	   : "%0" ((USItype)(ah)),					\
 331.320 +@@ -866,8 +866,8 @@
 331.321 + 	     "%1" ((USItype)(al)),					\
 331.322 + 	     "g" ((USItype)(bl)))
 331.323 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 331.324 +-  __asm__ ("subw	%5,%1
 331.325 +-	subwb	%3,%0"							\
 331.326 ++  __asm__ ("subw	%5,%1\n"					\
 331.327 ++	"subwb	%3,%0"							\
 331.328 + 	   : "=r" ((USItype)(sh)),					\
 331.329 + 	     "=&r" ((USItype)(sl))					\
 331.330 + 	   : "0" ((USItype)(ah)),					\
 331.331 +@@ -879,8 +879,8 @@
 331.332 +   ({union {UDItype __ll;						\
 331.333 + 	   struct {USItype __h, __l;} __i;				\
 331.334 + 	  } __xx;							\
 331.335 +-  __asm__ ("movw %1,%R0
 331.336 +-	uemul %2,%0"							\
 331.337 ++  __asm__ ("movw %1,%R0\n"						\
 331.338 ++	"uemul %2,%0"							\
 331.339 + 	   : "=&r" (__xx.__ll)						\
 331.340 + 	   : "g" ((USItype) (u)),					\
 331.341 + 	     "g" ((USItype)(v)));					\
 331.342 +@@ -889,8 +889,8 @@
 331.343 + 
 331.344 + #if defined (__ibm032__) /* RT/ROMP */  && W_TYPE_SIZE == 32
 331.345 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 331.346 +-  __asm__ ("a %1,%5
 331.347 +-	ae %0,%3"							\
 331.348 ++  __asm__ ("a %1,%5\n"							\
 331.349 ++	"ae %0,%3"							\
 331.350 + 	   : "=r" ((USItype)(sh)),					\
 331.351 + 	     "=&r" ((USItype)(sl))					\
 331.352 + 	   : "%0" ((USItype)(ah)),					\
 331.353 +@@ -898,8 +898,8 @@
 331.354 + 	     "%1" ((USItype)(al)),					\
 331.355 + 	     "r" ((USItype)(bl)))
 331.356 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 331.357 +-  __asm__ ("s %1,%5
 331.358 +-	se %0,%3"							\
 331.359 ++  __asm__ ("s %1,%5\n"							\
 331.360 ++	"se %0,%3"							\
 331.361 + 	   : "=r" ((USItype)(sh)),					\
 331.362 + 	     "=&r" ((USItype)(sl))					\
 331.363 + 	   : "0" ((USItype)(ah)),					\
 331.364 +@@ -910,26 +910,26 @@
 331.365 +   do {									\
 331.366 +     USItype __m0 = (m0), __m1 = (m1);					\
 331.367 +     __asm__ (								\
 331.368 +-       "s	r2,r2
 331.369 +-	mts	r10,%2
 331.370 +-	m	r2,%3
 331.371 +-	m	r2,%3
 331.372 +-	m	r2,%3
 331.373 +-	m	r2,%3
 331.374 +-	m	r2,%3
 331.375 +-	m	r2,%3
 331.376 +-	m	r2,%3
 331.377 +-	m	r2,%3
 331.378 +-	m	r2,%3
 331.379 +-	m	r2,%3
 331.380 +-	m	r2,%3
 331.381 +-	m	r2,%3
 331.382 +-	m	r2,%3
 331.383 +-	m	r2,%3
 331.384 +-	m	r2,%3
 331.385 +-	m	r2,%3
 331.386 +-	cas	%0,r2,r0
 331.387 +-	mfs	r10,%1"							\
 331.388 ++       "s	r2,r2\n"						\
 331.389 ++	"mts	r10,%2\n"						\
 331.390 ++	"m	r2,%3\n"						\
 331.391 ++	"m	r2,%3\n"						\
 331.392 ++	"m	r2,%3\n"						\
 331.393 ++	"m	r2,%3\n"						\
 331.394 ++	"m	r2,%3\n"						\
 331.395 ++	"m	r2,%3\n"						\
 331.396 ++	"m	r2,%3\n"						\
 331.397 ++	"m	r2,%3\n"						\
 331.398 ++	"m	r2,%3\n"						\
 331.399 ++	"m	r2,%3\n"						\
 331.400 ++	"m	r2,%3\n"						\
 331.401 ++	"m	r2,%3\n"						\
 331.402 ++	"m	r2,%3\n"						\
 331.403 ++	"m	r2,%3\n"						\
 331.404 ++	"m	r2,%3\n"						\
 331.405 ++	"m	r2,%3\n"						\
 331.406 ++	"cas	%0,r2,r0\n"						\
 331.407 ++	"mfs	r10,%1"							\
 331.408 + 	     : "=r" ((USItype)(ph)),					\
 331.409 + 	       "=r" ((USItype)(pl))					\
 331.410 + 	     : "%r" (__m0),						\
 331.411 +@@ -959,9 +959,9 @@
 331.412 + #if defined (__sh2__) && W_TYPE_SIZE == 32
 331.413 + #define umul_ppmm(w1, w0, u, v) \
 331.414 +   __asm__ (								\
 331.415 +-       "dmulu.l	%2,%3
 331.416 +-	sts	macl,%1
 331.417 +-	sts	mach,%0"						\
 331.418 ++       "dmulu.l	%2,%3\n"						\
 331.419 ++	"sts	macl,%1\n"						\
 331.420 ++	"sts	mach,%0"						\
 331.421 + 	   : "=r" ((USItype)(w1)),					\
 331.422 + 	     "=r" ((USItype)(w0))					\
 331.423 + 	   : "r" ((USItype)(u)),					\
 331.424 +@@ -972,8 +972,8 @@
 331.425 + 
 331.426 + #if defined (__sparc__) && W_TYPE_SIZE == 32
 331.427 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 331.428 +-  __asm__ ("addcc %r4,%5,%1
 331.429 +-	addx %r2,%3,%0"							\
 331.430 ++  __asm__ ("addcc %r4,%5,%1\n"						\
 331.431 ++	"addx %r2,%3,%0"							\
 331.432 + 	   : "=r" ((USItype)(sh)),					\
 331.433 + 	     "=&r" ((USItype)(sl))					\
 331.434 + 	   : "%rJ" ((USItype)(ah)),					\
 331.435 +@@ -982,8 +982,8 @@
 331.436 + 	     "rI" ((USItype)(bl))					\
 331.437 + 	   __CLOBBER_CC)
 331.438 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 331.439 +-  __asm__ ("subcc %r4,%5,%1
 331.440 +-	subx %r2,%3,%0"							\
 331.441 ++  __asm__ ("subcc %r4,%5,%1\n"						\
 331.442 ++	"subx %r2,%3,%0"							\
 331.443 + 	   : "=r" ((USItype)(sh)),					\
 331.444 + 	     "=&r" ((USItype)(sl))					\
 331.445 + 	   : "rJ" ((USItype)(ah)),					\
 331.446 +@@ -1029,45 +1029,45 @@
 331.447 + 	     "r" ((USItype)(v)))
 331.448 + #define UMUL_TIME 5
 331.449 + #define udiv_qrnnd(q, r, n1, n0, d) \
 331.450 +-  __asm__ ("! Inlined udiv_qrnnd
 331.451 +-	wr	%%g0,%2,%%y	! Not a delayed write for sparclite
 331.452 +-	tst	%%g0
 331.453 +-	divscc	%3,%4,%%g1
 331.454 +-	divscc	%%g1,%4,%%g1
 331.455 +-	divscc	%%g1,%4,%%g1
 331.456 +-	divscc	%%g1,%4,%%g1
 331.457 +-	divscc	%%g1,%4,%%g1
 331.458 +-	divscc	%%g1,%4,%%g1
 331.459 +-	divscc	%%g1,%4,%%g1
 331.460 +-	divscc	%%g1,%4,%%g1
 331.461 +-	divscc	%%g1,%4,%%g1
 331.462 +-	divscc	%%g1,%4,%%g1
 331.463 +-	divscc	%%g1,%4,%%g1
 331.464 +-	divscc	%%g1,%4,%%g1
 331.465 +-	divscc	%%g1,%4,%%g1
 331.466 +-	divscc	%%g1,%4,%%g1
 331.467 +-	divscc	%%g1,%4,%%g1
 331.468 +-	divscc	%%g1,%4,%%g1
 331.469 +-	divscc	%%g1,%4,%%g1
 331.470 +-	divscc	%%g1,%4,%%g1
 331.471 +-	divscc	%%g1,%4,%%g1
 331.472 +-	divscc	%%g1,%4,%%g1
 331.473 +-	divscc	%%g1,%4,%%g1
 331.474 +-	divscc	%%g1,%4,%%g1
 331.475 +-	divscc	%%g1,%4,%%g1
 331.476 +-	divscc	%%g1,%4,%%g1
 331.477 +-	divscc	%%g1,%4,%%g1
 331.478 +-	divscc	%%g1,%4,%%g1
 331.479 +-	divscc	%%g1,%4,%%g1
 331.480 +-	divscc	%%g1,%4,%%g1
 331.481 +-	divscc	%%g1,%4,%%g1
 331.482 +-	divscc	%%g1,%4,%%g1
 331.483 +-	divscc	%%g1,%4,%%g1
 331.484 +-	divscc	%%g1,%4,%0
 331.485 +-	rd	%%y,%1
 331.486 +-	bl,a 1f
 331.487 +-	add	%1,%4,%1
 331.488 +-1:	! End of inline udiv_qrnnd"					\
 331.489 ++  __asm__ ("! Inlined udiv_qrnnd\n"					\
 331.490 ++	"wr	%%g0,%2,%%y	! Not a delayed write for sparclite\n"	\
 331.491 ++	"tst	%%g0\n"							\
 331.492 ++	"divscc	%3,%4,%%g1\n"						\
 331.493 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.494 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.495 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.496 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.497 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.498 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.499 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.500 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.501 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.502 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.503 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.504 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.505 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.506 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.507 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.508 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.509 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.510 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.511 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.512 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.513 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.514 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.515 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.516 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.517 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.518 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.519 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.520 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.521 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.522 ++	"divscc	%%g1,%4,%%g1\n"						\
 331.523 ++	"divscc	%%g1,%4,%0\n"						\
 331.524 ++	"rd	%%y,%1\n"						\
 331.525 ++	"bl,a 1f\n"							\
 331.526 ++	"add	%1,%4,%1\n"						\
 331.527 ++"1:	! End of inline udiv_qrnnd"					\
 331.528 + 	   : "=r" ((USItype)(q)),					\
 331.529 + 	     "=r" ((USItype)(r))					\
 331.530 + 	   : "r" ((USItype)(n1)),					\
 331.531 +@@ -1087,46 +1087,46 @@
 331.532 + /* Default to sparc v7 versions of umul_ppmm and udiv_qrnnd.  */
 331.533 + #ifndef umul_ppmm
 331.534 + #define umul_ppmm(w1, w0, u, v) \
 331.535 +-  __asm__ ("! Inlined umul_ppmm
 331.536 +-	wr	%%g0,%2,%%y	! SPARC has 0-3 delay insn after a wr
 331.537 +-	sra	%3,31,%%g2	! Don't move this insn
 331.538 +-	and	%2,%%g2,%%g2	! Don't move this insn
 331.539 +-	andcc	%%g0,0,%%g1	! Don't move this insn
 331.540 +-	mulscc	%%g1,%3,%%g1
 331.541 +-	mulscc	%%g1,%3,%%g1
 331.542 +-	mulscc	%%g1,%3,%%g1
 331.543 +-	mulscc	%%g1,%3,%%g1
 331.544 +-	mulscc	%%g1,%3,%%g1
 331.545 +-	mulscc	%%g1,%3,%%g1
 331.546 +-	mulscc	%%g1,%3,%%g1
 331.547 +-	mulscc	%%g1,%3,%%g1
 331.548 +-	mulscc	%%g1,%3,%%g1
 331.549 +-	mulscc	%%g1,%3,%%g1
 331.550 +-	mulscc	%%g1,%3,%%g1
 331.551 +-	mulscc	%%g1,%3,%%g1
 331.552 +-	mulscc	%%g1,%3,%%g1
 331.553 +-	mulscc	%%g1,%3,%%g1
 331.554 +-	mulscc	%%g1,%3,%%g1
 331.555 +-	mulscc	%%g1,%3,%%g1
 331.556 +-	mulscc	%%g1,%3,%%g1
 331.557 +-	mulscc	%%g1,%3,%%g1
 331.558 +-	mulscc	%%g1,%3,%%g1
 331.559 +-	mulscc	%%g1,%3,%%g1
 331.560 +-	mulscc	%%g1,%3,%%g1
 331.561 +-	mulscc	%%g1,%3,%%g1
 331.562 +-	mulscc	%%g1,%3,%%g1
 331.563 +-	mulscc	%%g1,%3,%%g1
 331.564 +-	mulscc	%%g1,%3,%%g1
 331.565 +-	mulscc	%%g1,%3,%%g1
 331.566 +-	mulscc	%%g1,%3,%%g1
 331.567 +-	mulscc	%%g1,%3,%%g1
 331.568 +-	mulscc	%%g1,%3,%%g1
 331.569 +-	mulscc	%%g1,%3,%%g1
 331.570 +-	mulscc	%%g1,%3,%%g1
 331.571 +-	mulscc	%%g1,%3,%%g1
 331.572 +-	mulscc	%%g1,0,%%g1
 331.573 +-	add	%%g1,%%g2,%0
 331.574 +-	rd	%%y,%1"							\
 331.575 ++  __asm__ ("! Inlined umul_ppmm\n"					\
 331.576 ++	"wr	%%g0,%2,%%y	! SPARC has 0-3 delay insn after a wr\n" \
 331.577 ++	"sra	%3,31,%%g2	! Don't move this insn\n"		\
 331.578 ++	"and	%2,%%g2,%%g2	! Don't move this insn\n"		\
 331.579 ++	"andcc	%%g0,0,%%g1	! Don't move this insn\n"		\
 331.580 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.581 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.582 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.583 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.584 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.585 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.586 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.587 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.588 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.589 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.590 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.591 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.592 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.593 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.594 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.595 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.596 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.597 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.598 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.599 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.600 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.601 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.602 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.603 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.604 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.605 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.606 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.607 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.608 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.609 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.610 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.611 ++	"mulscc	%%g1,%3,%%g1\n"						\
 331.612 ++	"mulscc	%%g1,0,%%g1\n"						\
 331.613 ++	"add	%%g1,%%g2,%0\n"						\
 331.614 ++	"rd	%%y,%1"							\
 331.615 + 	   : "=r" ((USItype)(w1)),					\
 331.616 + 	     "=r" ((USItype)(w0))					\
 331.617 + 	   : "%rI" ((USItype)(u)),					\
 331.618 +@@ -1138,30 +1138,30 @@
 331.619 + /* It's quite necessary to add this much assembler for the sparc.
 331.620 +    The default udiv_qrnnd (in C) is more than 10 times slower!  */
 331.621 + #define udiv_qrnnd(q, r, n1, n0, d) \
 331.622 +-  __asm__ ("! Inlined udiv_qrnnd
 331.623 +-	mov	32,%%g1
 331.624 +-	subcc	%1,%2,%%g0
 331.625 +-1:	bcs	5f
 331.626 +-	 addxcc %0,%0,%0	! shift n1n0 and a q-bit in lsb
 331.627 +-	sub	%1,%2,%1	! this kills msb of n
 331.628 +-	addx	%1,%1,%1	! so this can't give carry
 331.629 +-	subcc	%%g1,1,%%g1
 331.630 +-2:	bne	1b
 331.631 +-	 subcc	%1,%2,%%g0
 331.632 +-	bcs	3f
 331.633 +-	 addxcc %0,%0,%0	! shift n1n0 and a q-bit in lsb
 331.634 +-	b	3f
 331.635 +-	 sub	%1,%2,%1	! this kills msb of n
 331.636 +-4:	sub	%1,%2,%1
 331.637 +-5:	addxcc	%1,%1,%1
 331.638 +-	bcc	2b
 331.639 +-	 subcc	%%g1,1,%%g1
 331.640 +-! Got carry from n.  Subtract next step to cancel this carry.
 331.641 +-	bne	4b
 331.642 +-	 addcc	%0,%0,%0	! shift n1n0 and a 0-bit in lsb
 331.643 +-	sub	%1,%2,%1
 331.644 +-3:	xnor	%0,0,%0
 331.645 +-	! End of inline udiv_qrnnd"					\
 331.646 ++  __asm__ ("! Inlined udiv_qrnnd\n"					\
 331.647 ++	"mov	32,%%g1\n"						\
 331.648 ++	"subcc	%1,%2,%%g0\n"						\
 331.649 ++"1:	bcs	5f\n"							\
 331.650 ++	"addxcc %0,%0,%0	! shift n1n0 and a q-bit in lsb\n"	\
 331.651 ++	"sub	%1,%2,%1	! this kills msb of n\n"		\
 331.652 ++	"addx	%1,%1,%1	! so this can't give carry\n"		\
 331.653 ++	"subcc	%%g1,1,%%g1\n"						\
 331.654 ++"2:	bne	1b\n"							\
 331.655 ++	"subcc	%1,%2,%%g0\n"						\
 331.656 ++	"bcs	3f\n"							\
 331.657 ++	"addxcc %0,%0,%0	! shift n1n0 and a q-bit in lsb\n"	\
 331.658 ++	"b	3f\n"							\
 331.659 ++	"sub	%1,%2,%1	! this kills msb of n\n"		\
 331.660 ++"4:	sub	%1,%2,%1\n"						\
 331.661 ++"5:	addxcc	%1,%1,%1\n"						\
 331.662 ++	"bcc	2b\n"							\
 331.663 ++	"subcc	%%g1,1,%%g1\n"						\
 331.664 ++"! Got carry from n.  Subtract next step to cancel this carry.\n"	\
 331.665 ++	"bne	4b\n"							\
 331.666 ++	"addcc	%0,%0,%0	! shift n1n0 and a 0-bit in lsb\n"	\
 331.667 ++	"sub	%1,%2,%1\n"						\
 331.668 ++"3:	xnor	%0,0,%0\n"						\
 331.669 ++	"! End of inline udiv_qrnnd"					\
 331.670 + 	   : "=&r" ((USItype)(q)),					\
 331.671 + 	     "=&r" ((USItype)(r))					\
 331.672 + 	   : "r" ((USItype)(d)),					\
 331.673 +@@ -1179,11 +1179,11 @@
 331.674 + #if (defined (__sparc_v9__) || (defined (__sparc__) && defined (__arch64__)) \
 331.675 +     || defined (__sparcv9)) && W_TYPE_SIZE == 64
 331.676 + #define add_ssaaaa(sh, sl, ah, al, bh, bl)				\
 331.677 +-  __asm__ ("addcc %r4,%5,%1
 331.678 +-  	    add %r2,%3,%0
 331.679 +-  	    bcs,a,pn %%xcc, 1f
 331.680 +-  	    add %0, 1, %0
 331.681 +-  	    1:"								\
 331.682 ++  __asm__ ("addcc %r4,%5,%1\n"						\
 331.683 ++  	    "add %r2,%3,%0\n"						\
 331.684 ++  	    "bcs,a,pn %%xcc, 1f\n"					\
 331.685 ++  	    "add %0, 1, %0\n"						\
 331.686 ++  	    "1:"							\
 331.687 + 	   : "=r" ((UDItype)(sh)),				      	\
 331.688 + 	     "=&r" ((UDItype)(sl))				      	\
 331.689 + 	   : "r" ((UDItype)(ah)),				     	\
 331.690 +@@ -1193,11 +1193,11 @@
 331.691 + 	   : "cc")
 331.692 + 
 331.693 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) 				\
 331.694 +-  __asm__ ("subcc %r4,%5,%1
 331.695 +-  	    sub %r2,%3,%0
 331.696 +-  	    bcs,a,pn %%xcc, 1f
 331.697 +-  	    sub %0, 1, %0
 331.698 +-  	    1:"								\
 331.699 ++  __asm__ ("subcc %r4,%5,%1\n"						\
 331.700 ++  	    "sub %r2,%3,%0\n"						\
 331.701 ++  	    "bcs,a,pn %%xcc, 1f\n"					\
 331.702 ++  	    "sub %0, 1, %0\n"						\
 331.703 ++  	    "1:"							\
 331.704 + 	   : "=r" ((UDItype)(sh)),				      	\
 331.705 + 	     "=&r" ((UDItype)(sl))				      	\
 331.706 + 	   : "r" ((UDItype)(ah)),				     	\
 331.707 +@@ -1210,27 +1210,27 @@
 331.708 +   do {									\
 331.709 + 	  UDItype tmp1, tmp2, tmp3, tmp4;				\
 331.710 + 	  __asm__ __volatile__ (					\
 331.711 +-		   "srl %7,0,%3
 331.712 +-		    mulx %3,%6,%1
 331.713 +-		    srlx %6,32,%2
 331.714 +-		    mulx %2,%3,%4
 331.715 +-		    sllx %4,32,%5
 331.716 +-		    srl %6,0,%3
 331.717 +-		    sub %1,%5,%5
 331.718 +-		    srlx %5,32,%5
 331.719 +-		    addcc %4,%5,%4
 331.720 +-		    srlx %7,32,%5
 331.721 +-		    mulx %3,%5,%3
 331.722 +-		    mulx %2,%5,%5
 331.723 +-		    sethi %%hi(0x80000000),%2
 331.724 +-		    addcc %4,%3,%4
 331.725 +-		    srlx %4,32,%4
 331.726 +-		    add %2,%2,%2
 331.727 +-		    movcc %%xcc,%%g0,%2
 331.728 +-		    addcc %5,%4,%5
 331.729 +-		    sllx %3,32,%3
 331.730 +-		    add %1,%3,%1
 331.731 +-		    add %5,%2,%0"					\
 331.732 ++		   "srl %7,0,%3\n"					\
 331.733 ++		    "mulx %3,%6,%1\n"					\
 331.734 ++		    "srlx %6,32,%2\n"					\
 331.735 ++		    "mulx %2,%3,%4\n"					\
 331.736 ++		    "sllx %4,32,%5\n"					\
 331.737 ++		    "srl %6,0,%3\n"					\
 331.738 ++		    "sub %1,%5,%5\n"					\
 331.739 ++		    "srlx %5,32,%5\n"					\
 331.740 ++		    "addcc %4,%5,%4\n"					\
 331.741 ++		    "srlx %7,32,%5\n"					\
 331.742 ++		    "mulx %3,%5,%3\n"					\
 331.743 ++		    "mulx %2,%5,%5\n"					\
 331.744 ++		    "sethi %%hi(0x80000000),%2\n"			\
 331.745 ++		    "addcc %4,%3,%4\n"					\
 331.746 ++		    "srlx %4,32,%4\n"					\
 331.747 ++		    "add %2,%2,%2\n"					\
 331.748 ++		    "movcc %%xcc,%%g0,%2\n"				\
 331.749 ++		    "addcc %5,%4,%5\n"					\
 331.750 ++		    "sllx %3,32,%3\n"					\
 331.751 ++		    "add %1,%3,%1\n"					\
 331.752 ++		    "add %5,%2,%0"					\
 331.753 + 	   : "=r" ((UDItype)(wh)),					\
 331.754 + 	     "=&r" ((UDItype)(wl)),					\
 331.755 + 	     "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3), "=&r" (tmp4)	\
 331.756 +@@ -1244,8 +1244,8 @@
 331.757 + 
 331.758 + #if defined (__vax__) && W_TYPE_SIZE == 32
 331.759 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 331.760 +-  __asm__ ("addl2 %5,%1
 331.761 +-	adwc %3,%0"							\
 331.762 ++  __asm__ ("addl2 %5,%1\n"						\
 331.763 ++	"adwc %3,%0"							\
 331.764 + 	   : "=g" ((USItype)(sh)),					\
 331.765 + 	     "=&g" ((USItype)(sl))					\
 331.766 + 	   : "%0" ((USItype)(ah)),					\
 331.767 +@@ -1253,8 +1253,8 @@
 331.768 + 	     "%1" ((USItype)(al)),					\
 331.769 + 	     "g" ((USItype)(bl)))
 331.770 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 331.771 +-  __asm__ ("subl2 %5,%1
 331.772 +-	sbwc %3,%0"							\
 331.773 ++  __asm__ ("subl2 %5,%1\n"						\
 331.774 ++	"sbwc %3,%0"							\
 331.775 + 	   : "=g" ((USItype)(sh)),					\
 331.776 + 	     "=&g" ((USItype)(sl))					\
 331.777 + 	   : "0" ((USItype)(ah)),					\
   332.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   332.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-sscanf.patch	Sat Feb 24 11:00:05 2007 +0000
   332.3 @@ -0,0 +1,73 @@
   332.4 +http://sources.redhat.com/ml/bug-glibc/2003-08/msg00087.html
   332.5 +
   332.6 +From: Gernot Hillier <gernot dot hillier at siemens dot com>
   332.7 +Organization: Siemens AG
   332.8 +To: Jeffrey Bedard <jefbed at e-list dot net>, bug-glibc at gnu dot org
   332.9 +Date: Mon, 18 Aug 2003 08:50:03 +0200
  332.10 +References: <3F3D0899.6020004@e-list.net>
  332.11 +Message-Id: <200308180850.03431.gernot.hillier@siemens.com>
  332.12 +Subject: Re: Build Fails with gcc 3.3.1
  332.13 +X-BeenThere: bug-glibc@gnu.org
  332.14 +
  332.15 +Hi!
  332.16 +
  332.17 +Am Freitag, 15. August 2003 18:21 schrieb Jeffrey Bedard:
  332.18 +> gcc sscanf.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes
  332.19 +[...]
  332.20 +> sscanf.c:31: warning: conflicting types for built-in function `sscanf'
  332.21 +> sscanf.c: In function `sscanf':
  332.22 +> sscanf.c:37: error: `va_start' used in function with fixed args
  332.23 +> .../stdio-common/_itoa.h: At top level:
  332.24 +> .../stdio-common/_itoa.h:40: warning: inlining failed in call to
  332.25 +> `_itoa_word' .../stdio-common/_itoa.h:76: warning: called from here
  332.26 +> make[2]: ***
  332.27 +> [/home/jefbed/src/packages/glibc-build/stdio-common/sscanf.o] Error 1
  332.28 +
  332.29 +You can find the fitting patch in the glibc CVS. You have to replace some 
  332.30 +function headers. 
  332.31 +
  332.32 +I created a patch for glibc-2.2.5 for the same reason. I don't know if it 
  332.33 +applies cleanly, but if not it should at least show you what to do...
  332.34 +
  332.35 +-- 
  332.36 +Bye,
  332.37 +
  332.38 +Gernot Hillier
  332.39 +Siemens AG
  332.40 +
  332.41 +
  332.42 +
  332.43 +
  332.44 +Content-Disposition: attachment; filename="glibc-2.2.5-gcc-3.3.diff"
  332.45 +
  332.46 +diff -ur glibc-2.2.5.orig/stdio-common/sprintf.c glibc-2.2.5/stdio-common/sprintf.c
  332.47 +--- glibc-2.2.5.orig/stdio-common/sprintf.c	2001-07-06 06:55:41.000000000 +0200
  332.48 ++++ glibc-2.2.5/stdio-common/sprintf.c	2003-08-11 13:25:48.000000000 +0200
  332.49 +@@ -27,9 +27,7 @@
  332.50 + /* Write formatted output into S, according to the format string FORMAT.  */
  332.51 + /* VARARGS2 */
  332.52 + int
  332.53 +-sprintf (s, format)
  332.54 +-     char *s;
  332.55 +-     const char *format;
  332.56 ++sprintf (char *s, const char *format,...)
  332.57 + {
  332.58 +   va_list arg;
  332.59 +   int done;
  332.60 +Only in glibc-2.2.5/stdio-common: sprintf.c.orig
  332.61 +Only in glibc-2.2.5/stdio-common: sprintf.c.rej
  332.62 +diff -ur glibc-2.2.5.orig/stdio-common/sscanf.c glibc-2.2.5/stdio-common/sscanf.c
  332.63 +--- glibc-2.2.5.orig/stdio-common/sscanf.c	2001-07-06 06:55:41.000000000 +0200
  332.64 ++++ glibc-2.2.5/stdio-common/sscanf.c	2003-08-11 13:27:58.000000000 +0200
  332.65 +@@ -27,9 +27,7 @@
  332.66 + /* Read formatted input from S, according to the format string FORMAT.  */
  332.67 + /* VARARGS2 */
  332.68 + int
  332.69 +-sscanf (s, format)
  332.70 +-     const char *s;
  332.71 +-     const char *format;
  332.72 ++sscanf (const char *s, const char *format,...)
  332.73 + {
  332.74 +   va_list arg;
  332.75 +   int done;
  332.76 +
   333.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   333.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-syscall.patch	Sat Feb 24 11:00:05 2007 +0000
   333.3 @@ -0,0 +1,29 @@
   333.4 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/i386/sysdep.h.diff?r1=1.40&r2=1.41&cvsroot=glibc
   333.5 +See also http://gcc.gnu.org/PR12928, comment 6 (which says this is a glibc bug, not a gcc bug)
   333.6 +
   333.7 +Fixes
   333.8 +/tmp/ccdGVIRa.s: Assembler messages:
   333.9 +/tmp/ccdGVIRa.s:82: Error: non-constant expression in ".if" statement
  333.10 +/tmp/ccdGVIRa.s:83: Error: non-constant expression in ".if" statement
  333.11 +/tmp/ccdGVIRa.s:86: Error: non-constant expression in ".if" statement
  333.12 +make[2]: *** [/crosstool-0.28-pre4/build/i686-unknown-linux-gnu/gcc-3.3.3-glibc-2.1.3/build-glibc/signal/sigsuspend.o] Error 1
  333.13 +
  333.14 +===================================================================
  333.15 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/i386/sysdep.h,v
  333.16 +retrieving revision 1.40
  333.17 +retrieving revision 1.41
  333.18 +diff -u -r1.40 -r1.41
  333.19 +--- libc/sysdeps/unix/sysv/linux/i386/sysdep.h	2002/10/16 08:57:25	1.40
  333.20 ++++ libc/sysdeps/unix/sysv/linux/i386/sysdep.h	2002/11/28 05:21:48	1.41
  333.21 +@@ -347,9 +347,9 @@
  333.22 + #define ASMFMT_1(arg1) \
  333.23 + 	, "acdSD" (arg1)
  333.24 + #define ASMFMT_2(arg1, arg2) \
  333.25 +-	, "adCD" (arg1), "c" (arg2)
  333.26 ++	, "adSD" (arg1), "c" (arg2)
  333.27 + #define ASMFMT_3(arg1, arg2, arg3) \
  333.28 +-	, "aCD" (arg1), "c" (arg2), "d" (arg3)
  333.29 ++	, "aSD" (arg1), "c" (arg2), "d" (arg3)
  333.30 + #define ASMFMT_4(arg1, arg2, arg3, arg4) \
  333.31 + 	, "aD" (arg1), "c" (arg2), "d" (arg3), "S" (arg4)
  333.32 + #define ASMFMT_5(arg1, arg2, arg3, arg4, arg5) \
   334.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   334.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-allow-gcc3-versioninfo.patch	Sat Feb 24 11:00:05 2007 +0000
   334.3 @@ -0,0 +1,17 @@
   334.4 +# gcc-3.x doesn't like run-on strings
   334.5 +# See also http://sources.redhat.com/ml/libc-alpha/2004-01/msg00032.html
   334.6 +
   334.7 +--- glibc-2.1.3/csu/Makefile.old	2004-03-04 12:18:52.000000000 -0800
   334.8 ++++ glibc-2.1.3/csu/Makefile	2004-03-04 12:19:35.000000000 -0800
   334.9 +@@ -188,8 +188,8 @@
  334.10 + 	 esac; \
  334.11 + 	 files="$(all-Banner-files)";				\
  334.12 + 	 if test -n "$$files"; then				\
  334.13 +-	   echo "\"Available extensions:";			\
  334.14 +-	   sed -e '/^#/d' -e 's/^[[:space:]]*/	/' $$files;	\
  334.15 +-	   echo "\"";						\
  334.16 ++	   echo -e "\"Available extensions:\\\\n\"";		\
  334.17 ++  	   sed -e '/^#/d' -e 's/^[[:space:]]*/	/'		\
  334.18 ++	       -e 's/^\(.*\)$$/\"\1\\n\"/' $$files;		\
  334.19 + 	 fi) > $@T
  334.20 + 	mv -f $@T $@
   335.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   335.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-cygwin.patch	Sat Feb 24 11:00:05 2007 +0000
   335.3 @@ -0,0 +1,80 @@
   335.4 +Fixes
   335.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
   335.6 +...
   335.7 +when building glibc-2.1.3 on cygwin
   335.8 +
   335.9 +Idea from
  335.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
  335.11 +backported to glibc-2.1.3.
  335.12 +Basically, make glibc use .oST as suffix for 'object static'
  335.13 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
  335.14 +(Original patch had .on, but .oST is more mnemonic for 'object static')
  335.15 +
  335.16 +
  335.17 +--- glibc-2.1.3/Makeconfig.old 	1999-11-29 11:19:20.000000000 -0800
  335.18 ++++ glibc-2.1.3/Makeconfig	2004-03-14 16:38:43.218750000 -0800
  335.19 +@@ -406,7 +406,7 @@
  335.20 + # run the linked programs.
  335.21 + link-libc = -Wl,-rpath-link=$(rpath-link) \
  335.22 + 	    $(common-objpfx)libc.so$(libc.so-version) \
  335.23 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
  335.24 ++	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
  335.25 + # Choose the default search path for the dynamic linker based on
  335.26 + # where we will install libraries.
  335.27 + ifneq ($(libdir),$(slibdir))
  335.28 +@@ -586,7 +586,7 @@
  335.29 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
  335.30 + # to pass different flags for each flavor.
  335.31 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
  335.32 +-all-object-suffixes := .o .os .op .og .ob .oS
  335.33 ++all-object-suffixes := .o .os .op .og .ob .oST
  335.34 + object-suffixes :=
  335.35 + CPPFLAGS-.o = $(pic-default)
  335.36 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
  335.37 +@@ -636,14 +636,14 @@
  335.38 + 
  335.39 + ifeq (yes,$(build-shared))
  335.40 + # Build special library that contains the static-only routines for libc.
  335.41 +-object-suffixes-for-libc += .oS
  335.42 ++object-suffixes-for-libc += .oST
  335.43 + 
  335.44 + # Must build the routines as PIC, though, because they can end up in (users')
  335.45 + # shared objects.  We don't want to use CFLAGS-os because users may, for
  335.46 + # example, make that processor-specific.
  335.47 +-CFLAGS-.oS = $(CFLAGS-.o) $(pic-ccflag)
  335.48 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC
  335.49 +-libtype.oS = lib%_nonshared.a
  335.50 ++CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag)
  335.51 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC
  335.52 ++libtype.oST = lib%_nonshared.a
  335.53 + endif
  335.54 + 
  335.55 + 
  335.56 +--- glibc-2.1.3/Makerules.old 	1999-08-01 15:12:23.000000000 -0700
  335.57 ++++ glibc-2.1.3/Makerules	2004-03-14 16:39:07.906250000 -0800
  335.58 +@@ -386,7 +386,7 @@
  335.59 + static-only-routines =
  335.60 + endif
  335.61 + 
  335.62 +-elide-routines.oS += $(filter-out $(static-only-routines),\
  335.63 ++elide-routines.oST += $(filter-out $(static-only-routines),\
  335.64 + 				  $(routines) $(aux) $(sysdep_routines))
  335.65 + elide-routines.os += $(static-only-routines)
  335.66 + 
  335.67 +@@ -694,14 +694,14 @@
  335.68 + # of the files are taken by the linker.
  335.69 + install: $(inst_libdir)/libc.so
  335.70 + $(inst_libdir)/libc.so: $(common-objpfx)libc.so$(libc.so-version) \
  335.71 +-			$(inst_libdir)/$(patsubst %,$(libtype.oS),\
  335.72 ++			$(inst_libdir)/$(patsubst %,$(libtype.oST),\
  335.73 + 						  $(libprefix)$(libc-name)) \
  335.74 + 			$(+force)
  335.75 + 	(echo '/* GNU ld script';\
  335.76 + 	 echo '   Use the shared library, but some functions are only in';\
  335.77 + 	 echo '   the static library, so try that secondarily.  */';\
  335.78 + 	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
  335.79 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
  335.80 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
  335.81 + 	      ')' \
  335.82 + 	) > $@.new
  335.83 + 	mv -f $@.new $@
   336.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   336.2 +++ b/patches/glibc/2.1.3/glibc-2.1.3-override.patch	Sat Feb 24 11:00:05 2007 +0000
   336.3 @@ -0,0 +1,48 @@
   336.4 +The error
   336.5 +
   336.6 +make[2]: *** [.../gcc-3.3.3-glibc-2.1.3/i686-unknown-linux-gnu/share/zoneinfo/Africa/Algiers] Segmentation fault
   336.7 +make[2]: Leaving directory `.../gcc-3.3.3-glibc-2.1.3/glibc-2.1.3/timezone'
   336.8 +make[1]: *** [timezone/subdir_install] Error 2
   336.9 +
  336.10 +is caused by glibc trying to run something it just compiled.
  336.11 +A crude workaround for this was posted at
  336.12 +http://lists.scratchbox.org/pipermail/scratchbox-users/2004-February/000018.html
  336.13 +but the following patch lets you optionally override these programs at
  336.14 +make time by setting environment variables 
  336.15 +  localedef_FOR_BUILD rpcgen_FOR_BUILD zic_FOR_BUILD
  336.16 +and maybe a few others to point to versions of those programs
  336.17 +that can run on the build machine.
  336.18 +Thanks to http://groups.google.com/groups?selm=9012160052.AA23106%40kaos.ksr.com
  336.19 +for pointing out the idiom for inline $(ifdef ...) in GNU Make.
  336.20 +
  336.21 +Dan Kegel 2004-05-17
  336.22 +
  336.23 +--- glibc-2.1.3/Makeconfig.old	1999-11-29 11:19:20.000000000 -0800
  336.24 ++++ glibc-2.1.3/Makeconfig	2004-05-17 15:57:53.000000000 -0700
  336.25 +@@ -470,20 +470,24 @@
  336.26 + # The program binary is assumed to be $(word 2,$^).
  336.27 + built-program-file = $(dir $(word 2,$^))$(notdir $(word 2,$^))
  336.28 + ifneq (yes,$(build-shared))
  336.29 +-built-program-cmd = $(built-program-file)
  336.30 ++built-program-real = $(built-program-file)
  336.31 + else
  336.32 + comma = ,
  336.33 + sysdep-library-path = \
  336.34 + $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
  336.35 + 				       $(filter -Wl$(comma)-rpath-link=%,\
  336.36 + 						$(sysdep-LDFLAGS)))))
  336.37 +-define built-program-cmd
  336.38 ++define built-program-real
  336.39 + $(elf-objpfx)$(rtld-installed-name) \
  336.40 + 	--library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
  336.41 + 	$(built-program-file)
  336.42 + endef
  336.43 + endif
  336.44 + 
  336.45 ++# If user set foo_FOR_BUILD, use that instead of actually running the program we just linked.
  336.46 ++built-program-override-name = $(notdir $(word 2,$^))_FOR_BUILD
  336.47 ++built-program-cmd = $(if $(findstring undefined,$(origin $(built-program-override-name))),$(built-program-real),$($(built-program-override-name)))
  336.48 ++
  336.49 + ifndef LD
  336.50 + LD := ld -X
  336.51 + endif
   337.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   337.2 +++ b/patches/glibc/2.1.3/glibc-2.2.2-export_fp_hw.patch	Sat Feb 24 11:00:05 2007 +0000
   337.3 @@ -0,0 +1,30 @@
   337.4 +Fixes undefined symbol _fp_hw required by the ABI:
   337.5 +readelf -s /opt/crosstool/i686-pc-linux-gnu/i686-unknown-linux-gnu/gcc-3.4.3-glibc-2.2.2/i686-unknown-linux-gnu/lib/crt1.o | grep fp_hw
   337.6 +    29: 00000000     4 NOTYPE  GLOBAL DEFAULT  UND _fp_hw 
   337.7 +Rumored to fix problems with icc, which gets upset at any symbol
   337.8 +which is undefined, even if nobody cares about it.
   337.9 +
  337.10 +Revision 1.16, Thu Feb 22 19:57:34 2001 UTC (4 years, 2 months ago) by drepper
  337.11 +Branch: MAIN
  337.12 +CVS Tags: glibc-2_2_3
  337.13 +Changes since 1.15: +1 -1 lines
  337.14 +Diff to previous 1.15 (colored)
  337.15 +
  337.16 +(_fp_hw): Actually define label.
  337.17 +
  337.18 +===================================================================
  337.19 +RCS file: /cvs/glibc/libc/sysdeps/i386/elf/start.S,v
  337.20 +retrieving revision 1.15
  337.21 +retrieving revision 1.16
  337.22 +diff -u -r1.15 -r1.16
  337.23 +--- libc/sysdeps/i386/elf/start.S	2001/02/03 21:34:54	1.15
  337.24 ++++ libc/sysdeps/i386/elf/start.S	2001/02/22 19:57:34	1.16
  337.25 +@@ -85,7 +85,7 @@
  337.26 +    meaningless since we don't support machines < 80386.  */
  337.27 + 	.section .rodata
  337.28 + 	.globl _fp_hw
  337.29 +-	.long 3
  337.30 ++_fp_hw:	.long 3
  337.31 + 	.size _fp_hw, 4
  337.32 + 
  337.33 + /* Define a symbol for the first piece of initialized data.  */
   338.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   338.2 +++ b/patches/glibc/2.1.3/glibc-manual-stdin.texi-1.127.patch	Sat Feb 24 11:00:05 2007 +0000
   338.3 @@ -0,0 +1,26 @@
   338.4 +Fixes 
   338.5 +./stdio.texi:2491: First argument to cross-reference may not be empty.
   338.6 +./stdio.texi:2492: First argument to cross-reference may not be empty.
   338.7 +makeinfo: Removing output file `/home/dank/crosstool-0.25/build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/glibc-2.1.3/manual/libc.info' due to errors; use --force to preserve.
   338.8 +make[2]: *** [libc.info] Error 2
   338.9 +
  338.10 +Patch from glib-2.2; Line numbers adjusted.
  338.11 +
  338.12 +===================================================================
  338.13 +RCS file: /cvs/glibc/libc/manual/stdio.texi,v
  338.14 +retrieving revision 1.126
  338.15 +retrieving revision 1.127
  338.16 +diff -u -r1.126 -r1.127
  338.17 +--- libc/manual/stdio.texi	2001/06/06 07:11:00
  338.18 ++++ libc/manual/stdio.texi	2001/07/31 18:57:00
  338.19 +@@ -2487,8 +2487,8 @@
  338.20 + If you are trying to read input that doesn't match a single, fixed
  338.21 + pattern, you may be better off using a tool such as Flex to generate a
  338.22 + lexical scanner, or Bison to generate a parser, rather than using
  338.23 +-@code{scanf}.  For more information about these tools, see @ref{, , ,
  338.24 +-flex.info, Flex: The Lexical Scanner Generator}, and @ref{, , ,
  338.25 ++@code{scanf}.  For more information about these tools, see @ref{Top, , ,
  338.26 ++flex.info, Flex: The Lexical Scanner Generator}, and @ref{Top, , ,
  338.27 + bison.info, The Bison Reference Manual}.
  338.28 + 
  338.29 + @node Input Conversion Syntax
   339.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   339.2 +++ b/patches/glibc/2.1.3/glibc-rpcgen-cpp.patch	Sat Feb 24 11:00:05 2007 +0000
   339.3 @@ -0,0 +1,14 @@
   339.4 +--- glibc-2.1.3/sunrpc/Makefile.orig	2004-05-12 12:26:58.000000000 -0700
   339.5 ++++ glibc-2.1.3/sunrpc/Makefile	2004-05-12 12:29:05.000000000 -0700
   339.6 +@@ -123,9 +123,8 @@
   339.7 +   $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
   339.8 + 	$(+link)
   339.9 + 
  339.10 +-# Tell rpcgen where to find the C preprocessor.
  339.11 +-rpcgen-cmd = $(built-program-cmd) -Y `$(CC) -print-file-name=cpp | \
  339.12 +-				      sed "s|/cpp$$||"`
  339.13 ++# Don't tell rpcgen where to find the C preprocessor -- let it find it itself.
  339.14 ++rpcgen-cmd = $(built-program-cmd) 
  339.15 + 
  339.16 + # Install the rpc data base file.
  339.17 + $(inst_sysconfdir)/rpc: etc.rpc $(+force)
   340.1 Binary file patches/glibc/2.1.3/rh62-00-glibc-2.1.3.patch has changed
   341.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   341.2 +++ b/patches/glibc/2.1.3/rh62-01-glibc-2.1.3-security.patch	Sat Feb 24 11:00:05 2007 +0000
   341.3 @@ -0,0 +1,32 @@
   341.4 +2000-05-03  Ulrich Drepper  <drepper@redhat.com>
   341.5 +
   341.6 +	* sysdeps/generic/dl-environ.c (unsetenv): Follow change to the
   341.7 +	real unsetenv implementation from 1999-07-29 [PR libc/1714].
   341.8 +
   341.9 +--- glibc-2.1.3/sysdeps/generic/dl-environ.c.jj	Thu Jul 23 16:56:52 1998
  341.10 ++++ glibc-2.1.3/sysdeps/generic/dl-environ.c	Tue May  9 13:48:11 2000
  341.11 +@@ -1,5 +1,5 @@
  341.12 +-/*Environment handling for dynamic loader.
  341.13 +-   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
  341.14 ++/* Environment handling for dynamic loader.
  341.15 ++   Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
  341.16 +    This file is part of the GNU C Library.
  341.17 + 
  341.18 +    The GNU C Library is free software; you can redistribute it and/or
  341.19 +@@ -55,7 +55,8 @@ unsetenv (const char *name)
  341.20 +   const size_t len = strlen (name);
  341.21 +   char **ep;
  341.22 + 
  341.23 +-  for (ep = _environ; *ep != NULL; ++ep)
  341.24 ++  ep = _environ;
  341.25 ++  while (*ep != NULL)
  341.26 +     if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
  341.27 +       {
  341.28 + 	/* Found it.  Remove this pointer by moving later ones back.  */
  341.29 +@@ -66,4 +67,6 @@ unsetenv (const char *name)
  341.30 + 	while (*dp++);
  341.31 + 	/* Continue the loop in case NAME appears again.  */
  341.32 +       }
  341.33 ++    else
  341.34 ++      ++ep;
  341.35 + }
   342.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   342.2 +++ b/patches/glibc/2.1.3/rh62-02-glibc-2.1.3-locale.patch	Sat Feb 24 11:00:05 2007 +0000
   342.3 @@ -0,0 +1,76 @@
   342.4 +2000-08-27  Ulrich Drepper  <drepper@redhat.com>
   342.5 +
   342.6 +	* intl/dcgettext.c (DCGETTEXT): Remove _nl_find_language in code
   342.7 +	to determine invalid locale name.
   342.8 +	* locale/findlocale.c (_nl_find_locale): Likewise.
   342.9 +
  342.10 +2000-08-21  Ulrich Drepper  <drepper@redhat.com>
  342.11 +
  342.12 +	* catgets/catgets.c (catopen): Filter out env_var values with / if
  342.13 +	necessary.
  342.14 +
  342.15 +	* locale/findlocale.c (_nl_find_locale): Move test for unusable
  342.16 +	locale name after all getenvs.
  342.17 +
  342.18 +--- glibc-2.1.3/catgets/catgets.c	2000/01/29 11:56:33	1.15
  342.19 ++++ glibc-2.1.3/catgets/catgets.c	2000/08/21 20:55:30	1.16
  342.20 +@@ -50,7 +50,8 @@
  342.21 + 	/* Use the LANG environment variable.  */
  342.22 + 	env_var = getenv ("LANG");
  342.23 + 
  342.24 +-      if (env_var == NULL)
  342.25 ++      if (env_var == NULL || *env_var == '\0'
  342.26 ++	  || (__libc_enable_secure && strchr (env_var, '/') != NULL))
  342.27 + 	env_var = "C";
  342.28 + 
  342.29 +       env_var_len = strlen (env_var) + 1;
  342.30 +--- glibc-2.1.3/locale/findlocale.c	1999/11/08 23:45:13	1.10.2.1
  342.31 ++++ glibc-2.1.3/locale/findlocale.c	2000/08/21 21:02:42	1.10.2.2
  342.32 +@@ -1,4 +1,4 @@
  342.33 +-/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
  342.34 ++/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  342.35 +    This file is part of the GNU C Library.
  342.36 +    Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
  342.37 + 
  342.38 +@@ -54,11 +54,7 @@
  342.39 +   const char *revision;
  342.40 +   struct loaded_l10nfile *locale_file;
  342.41 + 
  342.42 +-  if ((*name)[0] == '\0'
  342.43 +-      /* In SUID binaries we must not allow people to access files
  342.44 +-	 outside the dedicated locale directories.  */
  342.45 +-      || (__libc_enable_secure
  342.46 +-	  && memchr (*name, '/', _nl_find_language (*name) - *name) != NULL))
  342.47 ++  if ((*name)[0] == '\0')
  342.48 +     {
  342.49 +       /* The user decides which locale to use by setting environment
  342.50 + 	 variables.  */
  342.51 +@@ -67,9 +63,12 @@
  342.52 + 	*name = getenv (_nl_category_names[category]);
  342.53 +       if (*name == NULL || (*name)[0] == '\0')
  342.54 + 	*name = getenv ("LANG");
  342.55 +-      if (*name == NULL || (*name)[0] == '\0')
  342.56 +-	*name = (char *) _nl_C_name;
  342.57 +     }
  342.58 ++
  342.59 ++  if (*name == NULL || (*name)[0] == '\0'
  342.60 ++      || (__builtin_expect (__libc_enable_secure, 0)
  342.61 ++	  && strchr (*name, '/') != NULL))
  342.62 ++    *name = (char *) _nl_C_name;
  342.63 + 
  342.64 +   if (strcmp (*name, _nl_C_name) == 0 || strcmp (*name, _nl_POSIX_name) == 0)
  342.65 +     {
  342.66 +--- glibc-2.1.3/intl/dcgettext.c	Sun Aug 27 23:15:33 2000
  342.67 ++++ glibc-2.1.3/intl/dcgettext.c	Sun Aug 27 23:16:34 2000
  342.68 +@@ -371,10 +371,7 @@
  342.69 + 
  342.70 + 	  /* When this is a SUID binary we must not allow accessing files
  342.71 + 	     outside the dedicated directories.  */
  342.72 +-	  if (ENABLE_SECURE
  342.73 +-	      && (memchr (single_locale, '/',
  342.74 +-			  _nl_find_language (single_locale) - single_locale)
  342.75 +-		  != NULL))
  342.76 ++	  if (ENABLE_SECURE && strchr (single_locale, '/') != NULL)
  342.77 + 	    /* Ingore this entry.  */
  342.78 + 	    continue;
  342.79 + 	}
   343.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   343.2 +++ b/patches/glibc/2.1.3/rh62-03-glibc-2.1.3-crypt.patch	Sat Feb 24 11:00:05 2007 +0000
   343.3 @@ -0,0 +1,207 @@
   343.4 +--- glibc-2.1.3/md5-crypt/md5-crypt.c	2000/03/04 00:47:30	1.1
   343.5 ++++ glibc-2.1.3/md5-crypt/md5-crypt.c	2000/08/24 06:10:02	1.8
   343.6 +@@ -1,5 +1,5 @@
   343.7 + /* One way encryption based on MD5 sum.
   343.8 +-   Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
   343.9 ++   Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
  343.10 +    This file is part of the GNU C Library.
  343.11 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
  343.12 + 
  343.13 +@@ -18,6 +18,7 @@
  343.14 +    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  343.15 +    Boston, MA 02111-1307, USA.  */
  343.16 + 
  343.17 ++#include <assert.h>
  343.18 + #include <errno.h>
  343.19 + #include <stdlib.h>
  343.20 + #include <string.h>
  343.21 +@@ -37,9 +38,9 @@
  343.22 + 
  343.23 + 
  343.24 + /* Prototypes for local functions.  */
  343.25 +-extern char *__md5_crypt_r __P ((const char *key, const char *salt,
  343.26 +-				 char *buffer, int buflen));
  343.27 +-extern char *__md5_crypt __P ((const char *key, const char *salt));
  343.28 ++extern char *__md5_crypt_r (const char *key, const char *salt,
  343.29 ++			    char *buffer, int buflen);
  343.30 ++extern char *__md5_crypt (const char *key, const char *salt);
  343.31 + 
  343.32 + 
  343.33 + /* This entry point is equivalent to the `crypt' function in Unix
  343.34 +@@ -51,13 +52,16 @@
  343.35 +      char *buffer;
  343.36 +      int buflen;
  343.37 + {
  343.38 +-  unsigned char alt_result[16];
  343.39 ++  unsigned char alt_result[16]
  343.40 ++    __attribute__ ((__aligned__ (__alignof__ (md5_uint32))));
  343.41 +   struct md5_ctx ctx;
  343.42 +   struct md5_ctx alt_ctx;
  343.43 +   size_t salt_len;
  343.44 +   size_t key_len;
  343.45 +   size_t cnt;
  343.46 +   char *cp;
  343.47 ++  char *copied_key = NULL;
  343.48 ++  char *copied_salt = NULL;
  343.49 + 
  343.50 +   /* Find beginning of salt string.  The prefix should normally always
  343.51 +      be present.  Just in case it is not.  */
  343.52 +@@ -68,6 +72,26 @@
  343.53 +   salt_len = MIN (strcspn (salt, "$"), 8);
  343.54 +   key_len = strlen (key);
  343.55 + 
  343.56 ++  if ((key - (char *) 0) % __alignof__ (md5_uint32) != 0)
  343.57 ++    {
  343.58 ++      char *tmp = (char *) alloca (key_len + __alignof__ (md5_uint32));
  343.59 ++      key = copied_key =
  343.60 ++	memcpy (tmp + __alignof__ (md5_uint32)
  343.61 ++		- (tmp - (char *) 0) % __alignof__ (md5_uint32),
  343.62 ++		key, key_len);
  343.63 ++      assert ((key - (char *) 0) % __alignof__ (md5_uint32) == 0);
  343.64 ++    }
  343.65 ++
  343.66 ++  if ((salt - (char *) 0) % __alignof__ (md5_uint32) != 0)
  343.67 ++    {
  343.68 ++      char *tmp = (char *) alloca (salt_len + __alignof__ (md5_uint32));
  343.69 ++      salt = copied_salt =
  343.70 ++	memcpy (tmp + __alignof__ (md5_uint32)
  343.71 ++		- (tmp - (char *) 0) % __alignof__ (md5_uint32),
  343.72 ++		salt, salt_len);
  343.73 ++      assert ((salt - (char *) 0) % __alignof__ (md5_uint32) == 0);
  343.74 ++    }
  343.75 ++
  343.76 +   /* Prepare for the real work.  */
  343.77 +   __md5_init_ctx (&ctx);
  343.78 + 
  343.79 +@@ -195,21 +219,30 @@
  343.80 + 
  343.81 +   /* Clear the buffer for the intermediate result so that people
  343.82 +      attaching to processes or reading core dumps cannot get any
  343.83 +-     information.  */
  343.84 +-  memset (alt_result, '\0', sizeof (alt_result));
  343.85 ++     information.  We do it in this way to clear correct_words[]
  343.86 ++     inside the MD5 implementation as well.  */
  343.87 ++  __md5_init_ctx (&ctx);
  343.88 ++  __md5_finish_ctx (&ctx, alt_result);
  343.89 ++  memset (&ctx, '\0', sizeof (ctx));
  343.90 ++  memset (&alt_ctx, '\0', sizeof (alt_ctx));
  343.91 ++  if (copied_key != NULL)
  343.92 ++    memset (copied_key, '\0', key_len);
  343.93 ++  if (copied_salt != NULL)
  343.94 ++    memset (copied_salt, '\0', salt_len);
  343.95 + 
  343.96 +   return buffer;
  343.97 + }
  343.98 + 
  343.99 + 
 343.100 ++static char *buffer;
 343.101 ++
 343.102 + char *
 343.103 + __md5_crypt (const char *key, const char *salt)
 343.104 + {
 343.105 +   /* We don't want to have an arbitrary limit in the size of the
 343.106 +      password.  We can compute the size of the result in advance and
 343.107 +      so we can prepare the buffer we pass to `md5_crypt_r'.  */
 343.108 +-  static char *buffer = NULL;
 343.109 +-  static int buflen = 0;
 343.110 ++  static int buflen;
 343.111 +   int needed = 3 + strlen (salt) + 1 + 26 + 1;
 343.112 + 
 343.113 +   if (buflen < needed)
 343.114 +@@ -220,4 +253,12 @@
 343.115 +     }
 343.116 + 
 343.117 +   return __md5_crypt_r (key, salt, buffer, buflen);
 343.118 ++}
 343.119 ++
 343.120 ++
 343.121 ++static void
 343.122 ++__attribute__ ((__destructor__))
 343.123 ++free_mem (void)
 343.124 ++{
 343.125 ++  free (buffer);
 343.126 + }
 343.127 +--- glibc-2.1.3/md5-crypt/md5.c	2000/03/04 00:47:30	1.1
 343.128 ++++ glibc-2.1.3/md5-crypt/md5.c	2000/07/04 18:22:44	1.2
 343.129 +@@ -1,6 +1,6 @@
 343.130 +-/* md5.c - Functions to compute MD5 message digest of files or memory blocks
 343.131 ++/* Functions to compute MD5 message digest of files or memory blocks.
 343.132 +    according to the definition of MD5 in RFC 1321 from April 1992.
 343.133 +-   Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
 343.134 ++   Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
 343.135 +    This file is part of the GNU C Library.
 343.136 + 
 343.137 +    The GNU C Library is free software; you can redistribute it and/or
 343.138 +@@ -217,6 +217,8 @@
 343.139 +      size_t len;
 343.140 +      struct md5_ctx *ctx;
 343.141 + {
 343.142 ++  //const void aligned_buffer = buffer;
 343.143 ++
 343.144 +   /* When we already have some bits in our internal buffer concatenate
 343.145 +      both inputs first.  */
 343.146 +   if (ctx->buflen != 0)
 343.147 +@@ -224,16 +226,20 @@
 343.148 +       size_t left_over = ctx->buflen;
 343.149 +       size_t add = 128 - left_over > len ? len : 128 - left_over;
 343.150 + 
 343.151 ++      /* Only put full words in the buffer.  */
 343.152 ++      add -= add % __alignof__ (md5_uint32);
 343.153 ++
 343.154 +       memcpy (&ctx->buffer[left_over], buffer, add);
 343.155 +       ctx->buflen += add;
 343.156 + 
 343.157 +-      if (left_over + add > 64)
 343.158 ++      if (ctx->buflen > 64)
 343.159 + 	{
 343.160 +-	  md5_process_block (ctx->buffer, (left_over + add) & ~63, ctx);
 343.161 ++	  md5_process_block (ctx->buffer, ctx->buflen & ~63, ctx);
 343.162 ++
 343.163 ++	  ctx->buflen &= 63;
 343.164 + 	  /* The regions in the following copy operation cannot overlap.  */
 343.165 + 	  memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63],
 343.166 +-		  (left_over + add) & 63);
 343.167 +-	  ctx->buflen = (left_over + add) & 63;
 343.168 ++		  ctx->buflen);
 343.169 + 	}
 343.170 + 
 343.171 +       buffer = (const char *) buffer + add;
 343.172 +@@ -251,8 +257,17 @@
 343.173 +   /* Move remaining bytes in internal buffer.  */
 343.174 +   if (len > 0)
 343.175 +     {
 343.176 +-      memcpy (ctx->buffer, buffer, len);
 343.177 +-      ctx->buflen = len;
 343.178 ++      size_t left_over = ctx->buflen;
 343.179 ++
 343.180 ++      memcpy (&ctx->buffer[left_over], buffer, len);
 343.181 ++      left_over += len;
 343.182 ++      if (left_over >= 64)
 343.183 ++	{
 343.184 ++	  md5_process_block (ctx->buffer, 64, ctx);
 343.185 ++	  left_over -= 64;
 343.186 ++	  memcpy (ctx->buffer, &ctx->buffer[64], left_over);
 343.187 ++	}
 343.188 ++      ctx->buflen = left_over;
 343.189 +     }
 343.190 + }
 343.191 + 
 343.192 +--- glibc-2.1.3/md5-crypt/md5.h	2000/03/04 00:47:30	1.1
 343.193 ++++ glibc-2.1.3/md5-crypt/md5.h	2000/07/04 18:22:44	1.2
 343.194 +@@ -1,6 +1,6 @@
 343.195 + /* Declaration of functions and data types used for MD5 sum computing
 343.196 +    library functions.
 343.197 +-   Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
 343.198 ++   Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
 343.199 +    This file is part of the GNU C Library.
 343.200 + 
 343.201 +    The GNU C Library is free software; you can redistribute it and/or
 343.202 +@@ -87,7 +87,7 @@
 343.203 + 
 343.204 +   md5_uint32 total[2];
 343.205 +   md5_uint32 buflen;
 343.206 +-  char buffer[128];
 343.207 ++  char buffer[128] __attribute__ ((__aligned__ (__alignof__ (md5_uint32))));
 343.208 + };
 343.209 + 
 343.210 + /*
   344.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   344.2 +++ b/patches/glibc/2.1.3/rh62-04-glibc-2.1.3-tzfile.patch	Sat Feb 24 11:00:05 2007 +0000
   344.3 @@ -0,0 +1,22 @@
   344.4 +2000-08-09  Jakub Jelinek  <jakub@redhat.com>
   344.5 +
   344.6 +	* time/tzfile.c (__tzfile_compute): __tzstring zones
   344.7 +	from zone_names.
   344.8 +
   344.9 +--- glibc-2.1.3/time/tzfile.c.jj	Fri May  7 16:41:44 1999
  344.10 ++++ glibc-2.1.3/time/tzfile.c	Fri Aug 25 09:55:20 2000
  344.11 +@@ -1,4 +1,4 @@
  344.12 +-/* Copyright (C) 1991,92,93,95,96,97,98,99 Free Software Foundation, Inc.
  344.13 ++/* Copyright (C) 1991,92,93,95,96,97,98,99,2000 Free Software Foundation, Inc.
  344.14 +    This file is part of the GNU C Library.
  344.15 + 
  344.16 +    The GNU C Library is free software; you can redistribute it and/or
  344.17 +@@ -498,7 +498,7 @@ __tzfile_compute (time_t timer, int use_
  344.18 + 	/* There is no daylight saving time.  */
  344.19 + 	__tzname[1] = __tzname[0];
  344.20 +       tp->tm_isdst = info->isdst;
  344.21 +-      tp->tm_zone = &zone_names[info->idx];
  344.22 ++      tp->tm_zone = __tzstring (&zone_names[info->idx]);
  344.23 +       tp->tm_gmtoff = info->offset;
  344.24 +     }
  344.25 + 
   345.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   345.2 +++ b/patches/glibc/2.1.3/rh62-06-glibc-2.1.3-preload.patch	Sat Feb 24 11:00:05 2007 +0000
   345.3 @@ -0,0 +1,86 @@
   345.4 +2001-01-08  Ulrich Drepper  <drepper@redhat.com>
   345.5 +
   345.6 +	* elf/rtld.c (process_envvars): Place output files for profiling
   345.7 +	in SUID binaries in /var/profile.
   345.8 +
   345.9 +	* elf/dl-load.c (_dl_map_object): Don't look in cache for
  345.10 +	preloading in SUID binaries.
  345.11 +
  345.12 +	* elf/dl-profile.c (_dl_start_profile): Open the output file with
  345.13 +	O_NOFOLLOW if possible.
  345.14 +
  345.15 +	* sysdeps/generic/segfault.c (install_handler): Check output file
  345.16 +	name with access().
  345.17 +
  345.18 +--- libc/elf/rtld.c	2000/03/15 05:42:01	1.148.2.7
  345.19 ++++ libc/elf/rtld.c	2001/01/10 07:45:19
  345.20 +@@ -1273,7 +1273,7 @@
  345.21 +   char *debug_output = NULL;
  345.22 + 
  345.23 +   /* This is the default place for profiling data file.  */
  345.24 +-  _dl_profile_output = "/var/tmp";
  345.25 ++  _dl_profile_output = __libc_enable_secure ? "/var/profile" : "/var/tmp";
  345.26 + 
  345.27 +   while ((envline = _dl_next_ld_env_entry (&runp)) != NULL)
  345.28 +     {
  345.29 +--- libc/elf/dl-load.c	1999/11/20 02:26:38	1.103.2.5
  345.30 ++++ libc/elf/dl-load.c	2001/01/10 07:45:20
  345.31 +@@ -1338,7 +1338,7 @@
  345.32 +       if (fd == -1 && env_path_list != NULL)
  345.33 + 	fd = open_path (name, namelen, preloaded, env_path_list, &realname);
  345.34 + 
  345.35 +-      if (fd == -1)
  345.36 ++      if (fd == -1 && (! preloaded || ! __libc_enable_secure))
  345.37 + 	{
  345.38 + 	  /* Check the list of libraries in the file /etc/ld.so.cache,
  345.39 + 	     for compatibility with Linux's ldconfig program.  */
  345.40 +--- libc/elf/dl-profile.c	1998/06/07 13:35:48	1.14
  345.41 ++++ libc/elf/dl-profile.c	2001/01/10 07:45:21
  345.42 +@@ -263,7 +263,12 @@
  345.43 +   *cp++ = '/';
  345.44 +   __stpcpy (__stpcpy (cp, _dl_profile), ".profile");
  345.45 + 
  345.46 +-  fd = __open (filename, O_RDWR | O_CREAT, 0666);
  345.47 ++#ifdef O_NOFOLLOW
  345.48 ++# define EXTRA_FLAGS | O_NOFOLLOW
  345.49 ++#else
  345.50 ++# define EXTRA_FLAGS
  345.51 ++#endif
  345.52 ++  fd = __open (filename, O_RDWR | O_CREAT EXTRA_FLAGS, 0666);
  345.53 +   if (fd == -1)
  345.54 +     {
  345.55 +       /* We cannot write the profiling data so don't do anything.  */
  345.56 +--- libc/sysdeps/generic/segfault.c	2000/03/21 04:53:40	1.10.2.2
  345.57 ++++ libc/sysdeps/generic/segfault.c	2001/01/10 07:45:22
  345.58 +@@ -236,6 +236,7 @@
  345.59 + 
  345.60 +   /* Preserve the output file name if there is any given.  */
  345.61 +   name = getenv ("SEGFAULT_OUTPUT_NAME");
  345.62 +-  if (name != NULL && name[0] != '\0')
  345.63 ++  if (name != NULL && name[0] != '\0'
  345.64 ++      && (!__libc_enable_secure || access (name, R_OK | W_OK) == 0))
  345.65 +     fname = __strdup (name);
  345.66 + }
  345.67 +
  345.68 +--- libc/sysdeps/unix/sysv/linux/i386/dl-librecon.h.jj	Wed Feb 24 23:01:58 1999
  345.69 ++++ libc/sysdeps/unix/sysv/linux/i386/dl-librecon.h	Mon Jan 15 04:30:57 2001
  345.70 +@@ -49,13 +49,17 @@
  345.71 + /* Recognizing extra environment variables.  */
  345.72 + #define EXTRA_LD_ENVVARS \
  345.73 +   case 15:								      \
  345.74 +-    if (memcmp (&envline[3], "LIBRARY_VERSION", 15) == 0)		      \
  345.75 ++    if (!__libc_enable_secure						      \
  345.76 ++	&& memcmp (&envline[3], "LIBRARY_VERSION", 15) == 0)		      \
  345.77 +       {									      \
  345.78 + 	_dl_correct_cache_id = envline[19] == '5' ? 2 : 3;		      \
  345.79 + 	break;								      \
  345.80 +       }
  345.81 + 
  345.82 + /* Extra unsecure variables.  */
  345.83 +-#define EXTRA_UNSECURE_ENVVARS "LD_AOUT_LIBRARY_PATH", "LD_AOUT_PRELOAD"
  345.84 ++#define EXTRA_UNSECURE_ENVVARS	\
  345.85 ++  "LD_AOUT_LIBRARY_PATH",	\
  345.86 ++  "LD_AOUT_PRELOAD",		\
  345.87 ++  "LD_LIBRARY_VERSION"
  345.88 + 
  345.89 + #endif /* dl-librecon.h */
   346.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   346.2 +++ b/patches/glibc/2.1.3/rh62-07-glibc-2.1.3-alpha.patch	Sat Feb 24 11:00:05 2007 +0000
   346.3 @@ -0,0 +1,124 @@
   346.4 +2000-03-15  Cristian Gafton  <gafton@redhat.com>
   346.5 +
   346.6 +	* db2/mutex/alpha.gcc (TSL_SET): Backport from db3.
   346.7 +	* sysdeps/alpha/Makefile (CPPFLAGS): Define for db2 directory.
   346.8 +	* db2/mutex/mutex.c: Include alpha.gcc ifdef HAVE_ASSEM_ALPHA_GCC.
   346.9 +
  346.10 +2000-03-14  Ulrich Drepper  <drepper@redhat.com>
  346.11 +
  346.12 +	* sysdeps/unix/sysv/linux/alpha/ioperm.c (platform): Add entry for
  346.13 +	Nautilus.  Patch by Soohoon Lee <soohoon.lee@alpha-processor.com>.
  346.14 +
  346.15 +--- glibc-2.1.3-15/db2/mutex/alpha.gcc	Wed Aug 27 15:32:54 1997
  346.16 ++++ glibc-2.1.3-16/db2/mutex/alpha.gcc	Wed Mar 15 16:50:45 2000
  346.17 +@@ -1,52 +1,24 @@
  346.18 + /*
  346.19 +- * @(#)alpha.gcc	10.1 (Sleepycat) 4/12/97
  346.20 +- *
  346.21 +- * The code appearing below is taken from Richard L. Sites, ed.  "Alpha
  346.22 +- * Architecture Reference Manual", Digital Press, 1992, page 5-7 and 5-8.
  346.23 +- * There are 2 modifications:
  346.24 +- *
  346.25 +- * 1. The jump from blbs __r1,30f to !__r1, which is dictated by the way the
  346.26 +- * TSL_SET macro is used.  The code suggested in Sites includes the main loop
  346.27 +- * of the spin lock, whereas in this code the rest the loop is specified in C.
  346.28 +- * The generated code might be suboptimal if the compiler generates a forward
  346.29 +- * branch for the usual case in which the mutex is uncontested.
  346.30 +- *
  346.31 +- * 2. At label 20, Sites suggests including code for testing for an excessive
  346.32 +- * number of _processor_ lock conflicts.  (The seq_c instruction stores its
  346.33 +- * first argument provided that no other processor has written to a byte range
  346.34 +- * including its memory-location argument.)  Absent such checking the code
  346.35 +- * below could conceivably stall silently on a multiprocessor alpha, depending
  346.36 +- * on how often processor/processor conflicts occur in a particular byte range.
  346.37 +- *
  346.38 +- * Note that the mb ("memory-barrier") instruction in TSL_UNSET is critical to
  346.39 +- * correct operation in a multiprocessor alpha (as is, of course, the mb in
  346.40 +- * the TSL_SET macro).  Without the mb, changes to shared memory that occurred
  346.41 +- * inside the critical section (before the TSL_UNSET) might reach shared memory
  346.42 +- * _after_ the change of tsl to 0, thereby permitting another processor to see
  346.43 +- * an inconsistent view of the data protected by the mutex.
  346.44 ++ * @(#)alpha.gcc	11.1 (Sleepycat) 8/30/99
  346.45 +  *
  346.46 +  * For gcc/alpha, 0 is clear, 1 is set.
  346.47 +  */
  346.48 +-#define TSL_SET(tsl) ({							\
  346.49 ++#ifdef __GNUC__
  346.50 ++#define	TSL_SET(tsl) ({							\
  346.51 + 	register tsl_t *__l = (tsl);					\
  346.52 +-	register tsl_t __r1, __r2;					\
  346.53 +-	__asm__ volatile("						\n\
  346.54 +-	   10: ldq_l %0,(%2)						\n\
  346.55 +-	       blbs  %0,30f						\n\
  346.56 +-	       or    %0,1,%1						\n\
  346.57 +-	       stq_c %1,(%2)						\n\
  346.58 +-	       beq   %1,20f						\n\
  346.59 +-	       mb							\n\
  346.60 +-	       br    30f						\n\
  346.61 +-	   20: br    10b						\n\
  346.62 +-	   30: "							\
  346.63 +-	  : "=&r" (__r1), "=&r" (__r2)					\
  346.64 +-	  : "r" (__l));							\
  346.65 +-	!__r1;								\
  346.66 ++	int __r;							\
  346.67 ++	asm volatile(							\
  346.68 ++		"1:	ldl_l	%0,%1\n"				\
  346.69 ++		"	blbs	%0,2f\n"				\
  346.70 ++		"	mov	1,%0\n"					\
  346.71 ++		"	stl_c	%0,%1\n"				\
  346.72 ++		"	bne	%0,1b\n"				\
  346.73 ++		"	mb\n"						\
  346.74 ++		"2:"							\
  346.75 ++		: "=&r"(__r), "=m"(*__l) : "m"(*__l) : "memory");	\
  346.76 ++	__r;								\
  346.77 + })
  346.78 ++#endif
  346.79 + 
  346.80 +-#define TSL_UNSET(tsl) ({						\
  346.81 +-	register tsl_t *__l = (tsl);					\
  346.82 +-	__asm__ volatile("mb; stq $31,(%0);" : : "r" (__l));		\
  346.83 +-})
  346.84 ++#define	TSL_UNSET(tsl)	(*(tsl) = 0)
  346.85 + #define	TSL_INIT(tsl)	TSL_UNSET(tsl)
  346.86 +--- glibc-2.1.3-15/db2/mutex/mutex.c	Wed Jun 30 11:51:07 1999
  346.87 ++++ glibc-2.1.3-16/db2/mutex/mutex.c	Wed Mar 15 16:50:45 2000
  346.88 +@@ -86,6 +86,10 @@ static const char sccsid[] = "@(#)mutex.
  346.89 + #include "sparc.gcc"
  346.90 + #endif
  346.91 + 
  346.92 ++#ifdef HAVE_ASSEM_ALPHA_GCC
  346.93 ++#include "alpha.gcc"
  346.94 ++#endif
  346.95 ++
  346.96 + #ifdef HAVE_ASSEM_UTS4_CC
  346.97 + #define TSL_INIT(x)
  346.98 + #define TSL_SET(x)	(!uts_lock(x, 1))
  346.99 +--- glibc-2.1.3-15/sysdeps/alpha/Makefile	Thu Jul  9 14:52:03 1998
 346.100 ++++ glibc-2.1.3-16/sysdeps/alpha/Makefile	Wed Mar 15 16:50:45 2000
 346.101 +@@ -17,6 +17,10 @@
 346.102 + # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 346.103 + # Boston, MA 02111-1307, USA.
 346.104 + 
 346.105 ++ifeq ($(subdir),db2)
 346.106 ++CPPFLAGS += -DHAVE_SPINLOCKS=1 -DHAVE_ASSEM_ALPHA_GCC=1
 346.107 ++endif
 346.108 ++
 346.109 + ifeq ($(subdir),gmon)
 346.110 + sysdep_routines += _mcount
 346.111 + endif
 346.112 +--- glibc-2.1.3-15/sysdeps/unix/sysv/linux/alpha/ioperm.c	Mon Oct 11 10:25:24 1999
 346.113 ++++ glibc-2.1.3-16/sysdeps/unix/sysv/linux/alpha/ioperm.c	Wed Mar 15 11:57:14 2000
 346.114 +@@ -1,4 +1,4 @@
 346.115 +-/* Copyright (C) 1992, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
 346.116 ++/* Copyright (C) 1992, 1996-1999, 2000 Free Software Foundation, Inc.
 346.117 +    This file is part of the GNU C Library.
 346.118 +    Contributed by David Mosberger.
 346.119 + 
 346.120 +@@ -139,6 +139,7 @@ static struct platform {
 346.121 +   {"Sable",	IOSYS_CPUDEP},
 346.122 +   {"Miata",	IOSYS_CIA},
 346.123 +   {"Tsunami",	IOSYS_TSUNAMI},
 346.124 ++  {"Nautilus",	IOSYS_TSUNAMI},
 346.125 +   {"Rawhide",	IOSYS_MCPCIA},
 346.126 +   {"Ruffian",	IOSYS_CIA},
 346.127 +   {"Takara",	IOSYS_CIA},
   347.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   347.2 +++ b/patches/glibc/2.1.3/rh62-08-glibc-2.1.3-glob.patch	Sat Feb 24 11:00:05 2007 +0000
   347.3 @@ -0,0 +1,57 @@
   347.4 +2001-11-29  Jakub Jelinek  <jakub@redhat.com>
   347.5 +
   347.6 +	* sysdeps/generic/glob.c (next_brace_sub): Return NULL if braces
   347.7 +	don't match, fix {{a,b},c} globbing, clean up.
   347.8 +	Patch by Flavio Veloso <flaviovs@magnux.com>.
   347.9 +
  347.10 +--- libc/sysdeps/generic/glob.c.jj	Thu Aug 23 18:49:29 2001
  347.11 ++++ libc/sysdeps/generic/glob.c	Thu Nov 29 13:17:21 2001
  347.12 +@@ -355,42 +355,14 @@ static
  347.13 + inline
  347.14 + #endif
  347.15 + const char *
  347.16 +-next_brace_sub (begin)
  347.17 +-     const char *begin;
  347.18 ++next_brace_sub (cp)
  347.19 ++     const char *cp;
  347.20 + {
  347.21 +   unsigned int depth = 0;
  347.22 +-  const char *cp = begin;
  347.23 +-
  347.24 +-  while (1)
  347.25 +-    {
  347.26 +-      if (depth == 0)
  347.27 +-	{
  347.28 +-	  if (*cp != ',' && *cp != '}' && *cp != '\0')
  347.29 +-	    {
  347.30 +-	      if (*cp == '{')
  347.31 +-		++depth;
  347.32 +-	      ++cp;
  347.33 +-	      continue;
  347.34 +-	    }
  347.35 +-	}
  347.36 +-      else
  347.37 +-	{
  347.38 +-	  while (*cp != '\0' && (*cp != '}' || depth > 0))
  347.39 +-	    {
  347.40 +-	      if (*cp == '}')
  347.41 +-		--depth;
  347.42 +-	      ++cp;
  347.43 +-	    }
  347.44 +-	  if (*cp == '\0')
  347.45 +-	    /* An incorrectly terminated brace expression.  */
  347.46 +-	    return NULL;
  347.47 +-
  347.48 +-	  continue;
  347.49 +-	}
  347.50 +-      break;
  347.51 +-    }
  347.52 +-
  347.53 +-  return cp;
  347.54 ++  while (*cp != '\0' && (*cp != '}' || depth--) && (*cp != ',' || depth))
  347.55 ++    if (*cp++ == '{')
  347.56 ++      depth++;
  347.57 ++  return *cp != '\0' ? cp : NULL;
  347.58 + }
  347.59 + 
  347.60 + #endif /* !GLOB_ONLY_P */
   348.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   348.2 +++ b/patches/glibc/2.1.3/rh62-09-glibc-2.1.3-security2.patch	Sat Feb 24 11:00:05 2007 +0000
   348.3 @@ -0,0 +1,66 @@
   348.4 +2002-07-05  Tomohiro Kato <tomop@teamgedoh.net>
   348.5 +
   348.6 +	* glibc-compat/nss_dns/dns-network.c (getanswer_r): Reduce
   348.7 +	linebuflen in parallel to bumping up the buffer pointer.
   348.8 +	* glibc-compat/nss_dns/dns-host.c (getanswer_r): Likewise.
   348.9 +	Compare n with linebuflen instead of buflen.
  348.10 +
  348.11 +2002-07-02  Andreas Schwab  <schwab@suse.de>
  348.12 +
  348.13 +	* resolv/nss_dns/dns-network.c (getanswer_r): Reduce linebuflen
  348.14 +	in parallel to bumping up the buffer pointer.
  348.15 +
  348.16 +--- libc/glibc-compat/nss_dns/dns-network.c.jj	Wed Jan 10 11:58:20 2001
  348.17 ++++ libc/glibc-compat/nss_dns/dns-network.c	Tue Jul  9 10:31:15 2002
  348.18 +@@ -283,7 +283,9 @@ getanswer_r (const querybuf *answer, int
  348.19 + 	    }
  348.20 + 	  cp += n;
  348.21 + 	  *alias_pointer++ = bp;
  348.22 +-	  bp += strlen (bp) + 1;
  348.23 ++	  n = strlen (bp) + 1;
  348.24 ++	  bp += n;
  348.25 ++	  linebuflen -= n;
  348.26 + 	  result->n_addrtype = class == C_IN ? AF_INET : AF_UNSPEC;
  348.27 + 	  ++have_answer;
  348.28 + 	}
  348.29 +--- libc/glibc-compat/nss_dns/dns-host.c.jj	Wed Jan 10 11:58:20 2001
  348.30 ++++ libc/glibc-compat/nss_dns/dns-host.c	Tue Jul  9 10:36:41 2002
  348.31 +@@ -424,7 +424,7 @@ getanswer_r (const querybuf *answer, int
  348.32 + 	  linebuflen -= n;
  348.33 + 	  /* Get canonical name.  */
  348.34 + 	  n = strlen (tbuf) + 1;	/* For the \0.  */
  348.35 +-	  if ((size_t) n > buflen || n >= MAXHOSTNAMELEN)
  348.36 ++	  if ((size_t) n > linebuflen || n >= MAXHOSTNAMELEN)
  348.37 + 	    {
  348.38 + 	      ++had_error;
  348.39 + 	      continue;
  348.40 +@@ -447,7 +447,7 @@ getanswer_r (const querybuf *answer, int
  348.41 + 	  cp += n;
  348.42 + 	  /* Get canonical name. */
  348.43 + 	  n = strlen (tbuf) + 1;   /* For the \0.  */
  348.44 +-	  if ((size_t) n > buflen || n >= MAXHOSTNAMELEN)
  348.45 ++	  if ((size_t) n > linebuflen || n >= MAXHOSTNAMELEN)
  348.46 + 	    {
  348.47 + 	      ++had_error;
  348.48 + 	      continue;
  348.49 +@@ -542,6 +542,7 @@ getanswer_r (const querybuf *answer, int
  348.50 + 	      linebuflen -= nn;
  348.51 + 	    }
  348.52 + 
  348.53 ++	  linebuflen -= sizeof (align) - ((u_long) bp % sizeof (align));
  348.54 + 	  bp += sizeof (align) - ((u_long) bp % sizeof (align));
  348.55 + 
  348.56 + 	  if (n >= linebuflen)
  348.57 +--- libc/resolv/nss_dns/dns-network.c.jj	Mon Jul  9 14:59:24 2001
  348.58 ++++ libc/resolv/nss_dns/dns-network.c	Tue Jul  9 10:30:31 2002
  348.59 +@@ -328,7 +328,9 @@ getanswer_r (const querybuf *answer, int
  348.60 + 	    }
  348.61 + 	  cp += n;
  348.62 + 	  *alias_pointer++ = bp;
  348.63 +-	  bp += strlen (bp) + 1;
  348.64 ++	  n = strlen (bp) + 1;
  348.65 ++	  bp += n;
  348.66 ++	  linebuflen -= n;
  348.67 + 	  result->n_addrtype = class == C_IN ? AF_INET : AF_UNSPEC;
  348.68 + 	  ++have_answer;
  348.69 + 	}
   349.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   349.2 +++ b/patches/glibc/2.1.3/rh62-10-glibc-2.1.3-xdr_array.patch	Sat Feb 24 11:00:05 2007 +0000
   349.3 @@ -0,0 +1,36 @@
   349.4 +--- glibc-2.1.3/sunrpc/rpc/types.h	Fri Oct 16 13:43:49 1998
   349.5 ++++ glibc-2.1.3/sunrpc/rpc/types.h	Thu Aug  1 09:06:38 2002
   349.6 +@@ -55,6 +55,10 @@
   349.7 + 
   349.8 + #include <stdlib.h>		/* For malloc decl.  */
   349.9 + #define mem_alloc(bsize)	malloc(bsize)
  349.10 ++/*
  349.11 ++ * XXX: This must not use the second argument, or code in xdr_array.c needs
  349.12 ++ * to be modified.
  349.13 ++ */
  349.14 + #define mem_free(ptr, bsize)	free(ptr)
  349.15 + 
  349.16 + #ifndef makedev /* ie, we haven't already included it */
  349.17 +--- glibc-2.1.3/sunrpc/xdr_array.c	Thu Jul 16 15:23:51 1998
  349.18 ++++ glibc-2.1.3/sunrpc/xdr_array.c	Thu Aug  1 09:07:45 2002
  349.19 +@@ -44,6 +44,7 @@
  349.20 + #include <string.h>
  349.21 + #include <rpc/types.h>
  349.22 + #include <rpc/xdr.h>
  349.23 ++#include <limits.h>
  349.24 + 
  349.25 + #define LASTUNSIGNED	((u_int)0-1)
  349.26 + 
  349.27 +@@ -76,7 +77,11 @@
  349.28 +       return FALSE;
  349.29 +     }
  349.30 +   c = *sizep;
  349.31 +-  if ((c > maxsize) && (xdrs->x_op != XDR_FREE))
  349.32 ++  /*
  349.33 ++   * XXX: Let the overflow possibly happen with XDR_FREE because mem_free()
  349.34 ++   * doesn't actually use its second argument anyway.
  349.35 ++   */
  349.36 ++  if ((c > maxsize || c > UINT_MAX / elsize) && (xdrs->x_op != XDR_FREE))
  349.37 +     {
  349.38 +       return FALSE;
  349.39 +     }
   350.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   350.2 +++ b/patches/glibc/2.1.3/rh62-11-glibc-2.1.3-calloc.patch	Sat Feb 24 11:00:05 2007 +0000
   350.3 @@ -0,0 +1,35 @@
   350.4 +diff -ur glibc-2.1.3.orig/malloc/malloc.c glibc-2.1.3/malloc/malloc.c
   350.5 +--- glibc-2.1.3.orig/malloc/malloc.c	Wed Feb 23 10:02:55 2000
   350.6 ++++ glibc-2.1.3/malloc/malloc.c	Thu Aug  1 09:24:10 2002
   350.7 +@@ -3656,12 +3656,20 @@
   350.8 + {
   350.9 +   arena *ar_ptr;
  350.10 +   mchunkptr p, oldtop;
  350.11 +-  INTERNAL_SIZE_T sz, csz, oldtopsize;
  350.12 ++  INTERNAL_SIZE_T bytes, sz, csz, oldtopsize;
  350.13 +   Void_t* mem;
  350.14 + 
  350.15 ++  /* size_t is unsigned so the behavior on overflow is defined;
  350.16 ++   * request2size() uses similar post-checks anyway. */
  350.17 ++  bytes = n * elem_size;
  350.18 ++  if ((n | elem_size) >= 65536 && elem_size && bytes / elem_size != n) {
  350.19 ++    __set_errno (ENOMEM);
  350.20 ++    return 0;
  350.21 ++  }
  350.22 ++
  350.23 + #if defined _LIBC || defined MALLOC_HOOKS
  350.24 +   if (__malloc_hook != NULL) {
  350.25 +-    sz = n * elem_size;
  350.26 ++    sz = bytes;
  350.27 + #if defined __GNUC__ && __GNUC__ >= 2
  350.28 +     mem = (*__malloc_hook)(sz, __builtin_return_address (0));
  350.29 + #else
  350.30 +@@ -3678,7 +3686,7 @@
  350.31 +   }
  350.32 + #endif
  350.33 + 
  350.34 +-  if(request2size(n * elem_size, sz))
  350.35 ++  if(request2size(bytes, sz))
  350.36 +     return 0;
  350.37 +   arena_get(ar_ptr, sz);
  350.38 +   if(!ar_ptr)
   351.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   351.2 +++ b/patches/glibc/2.1.3/rh62-12-glibc-2.1.3-maxpacket.patch	Sat Feb 24 11:00:05 2007 +0000
   351.3 @@ -0,0 +1,512 @@
   351.4 +--- libc/resolv/nss_dns/dns-host.c.jj	Tue Sep 14 03:05:08 1999
   351.5 ++++ libc/resolv/nss_dns/dns-host.c	Thu Oct 10 13:07:33 2002
   351.6 +@@ -129,9 +129,10 @@ _nss_dns_gethostbyname2_r (const char *n
   351.7 + 			   char *buffer, size_t buflen, int *errnop,
   351.8 + 			   int *h_errnop)
   351.9 + {
  351.10 +-  querybuf host_buffer;
  351.11 ++  querybuf *host_buffer;
  351.12 +   int size, type, n;
  351.13 +   const char *cp;
  351.14 ++  enum nss_status status;
  351.15 + 
  351.16 +   switch (af) {
  351.17 +   case AF_INET:
  351.18 +@@ -159,16 +160,25 @@ _nss_dns_gethostbyname2_r (const char *n
  351.19 +   if (strchr (name, '.') == NULL && (cp = __hostalias (name)) != NULL)
  351.20 +     name = cp;
  351.21 + 
  351.22 +-  n = res_search (name, C_IN, type, host_buffer.buf, sizeof (host_buffer.buf));
  351.23 ++  host_buffer = (querybuf *) malloc (sizeof (*host_buffer));
  351.24 ++  if (host_buffer == NULL) {
  351.25 ++    *errnop = ENOMEM;
  351.26 ++    return NSS_STATUS_UNAVAIL;
  351.27 ++  }
  351.28 ++
  351.29 ++  n = res_search (name, C_IN, type, host_buffer->buf, sizeof (host_buffer->buf));
  351.30 +   if (n < 0)
  351.31 +     {
  351.32 +       *h_errnop = h_errno;
  351.33 +       *errnop = *h_errnop == TRY_AGAIN ? EAGAIN : ENOENT;
  351.34 ++      free (host_buffer);
  351.35 +       return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
  351.36 +     }
  351.37 + 
  351.38 +-  return getanswer_r (&host_buffer, n, name, type, result, buffer, buflen,
  351.39 +-		      errnop, h_errnop);
  351.40 ++  status = getanswer_r (host_buffer, n, name, type, result, buffer, buflen,
  351.41 ++			errnop, h_errnop);
  351.42 ++  free (host_buffer);
  351.43 ++  return status; 
  351.44 + }
  351.45 + 
  351.46 + 
  351.47 +@@ -205,7 +215,7 @@ _nss_dns_gethostbyaddr_r (const char *ad
  351.48 +     char *h_addr_ptrs[MAX_NR_ADDRS + 1];
  351.49 +     char linebuffer[0];
  351.50 +   } *host_data = (struct host_data *) buffer;
  351.51 +-  querybuf host_buffer;
  351.52 ++  querybuf *host_buffer;
  351.53 +   char qbuf[MAXDNAME+1], *qp;
  351.54 +   size_t size;
  351.55 +   int n, status;
  351.56 +@@ -257,17 +267,25 @@ _nss_dns_gethostbyaddr_r (const char *ad
  351.57 +       /* Cannot happen.  */
  351.58 +     }
  351.59 + 
  351.60 +-  n = res_query (qbuf, C_IN, T_PTR, (u_char *)host_buffer.buf,
  351.61 +-		 sizeof host_buffer);
  351.62 ++  host_buffer = (querybuf *) malloc (sizeof (*host_buffer));
  351.63 ++  if (host_buffer == NULL) {
  351.64 ++    *errnop = ENOMEM;
  351.65 ++    return NSS_STATUS_UNAVAIL;
  351.66 ++  }
  351.67 ++
  351.68 ++  n = res_query (qbuf, C_IN, T_PTR, host_buffer->buf,
  351.69 ++		 sizeof (host_buffer->buf));
  351.70 +   if (n < 0)
  351.71 +     {
  351.72 +       *h_errnop = h_errno;
  351.73 +       *errnop = errno;
  351.74 ++      free (host_buffer);
  351.75 +       return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
  351.76 +     }
  351.77 + 
  351.78 +-  status = getanswer_r (&host_buffer, n, qbuf, T_PTR, result, buffer, buflen,
  351.79 ++  status = getanswer_r (host_buffer, n, qbuf, T_PTR, result, buffer, buflen,
  351.80 + 			errnop, h_errnop);
  351.81 ++  free (host_buffer);
  351.82 +   if (status != NSS_STATUS_SUCCESS)
  351.83 +     {
  351.84 +       *h_errnop = h_errno;
  351.85 +--- libc/resolv/nss_dns/dns-network.c.jj	Wed Jun 30 12:01:14 1999
  351.86 ++++ libc/resolv/nss_dns/dns-network.c	Thu Oct 10 13:09:49 2002
  351.87 +@@ -113,24 +113,36 @@ _nss_dns_getnetbyname_r (const char *nam
  351.88 + 			 char *buffer, size_t buflen, int *errnop)
  351.89 + {
  351.90 +   /* Return entry for network with NAME.  */
  351.91 +-  querybuf net_buffer;
  351.92 ++  querybuf *net_buffer;
  351.93 +   int anslen;
  351.94 +   char *qbuf;
  351.95 ++  enum nss_status status;
  351.96 + 
  351.97 +   qbuf = strdupa (name);
  351.98 +-  anslen = res_search (qbuf, C_IN, T_PTR, (u_char *) &net_buffer,
  351.99 +-		       sizeof (querybuf));
 351.100 ++
 351.101 ++  net_buffer = (querybuf *) malloc (sizeof (*net_buffer));
 351.102 ++  if (net_buffer == NULL)
 351.103 ++    {
 351.104 ++      *errnop = ENOMEM;
 351.105 ++      return NSS_STATUS_UNAVAIL;
 351.106 ++    }
 351.107 ++
 351.108 ++  anslen = res_search (qbuf, C_IN, T_PTR, net_buffer->buf,
 351.109 ++		       sizeof (net_buffer->buf));
 351.110 +   if (anslen < 0)
 351.111 +     {
 351.112 +       /* Nothing found.  */
 351.113 +       *errnop = errno;
 351.114 ++      free (net_buffer);
 351.115 +       return (errno == ECONNREFUSED
 351.116 + 	      || errno == EPFNOSUPPORT
 351.117 + 	      || errno == EAFNOSUPPORT)
 351.118 + 	? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 351.119 +     }
 351.120 + 
 351.121 +-  return getanswer_r (&net_buffer, anslen, result, buffer, buflen, BYNAME);
 351.122 ++  status = getanswer_r (net_buffer, anslen, result, buffer, buflen, BYNAME);
 351.123 ++  free (net_buffer);
 351.124 ++  return status;
 351.125 + }
 351.126 + 
 351.127 + 
 351.128 +@@ -140,7 +152,7 @@ _nss_dns_getnetbyaddr_r (long net, int t
 351.129 + {
 351.130 +   /* Return entry for network with NAME.  */
 351.131 +   enum nss_status status;
 351.132 +-  querybuf net_buffer;
 351.133 ++  querybuf *net_buffer;
 351.134 +   unsigned int net_bytes[4];
 351.135 +   char qbuf[MAXDNAME];
 351.136 +   int cnt, anslen;
 351.137 +@@ -176,19 +188,28 @@ _nss_dns_getnetbyaddr_r (long net, int t
 351.138 +       break;
 351.139 +     }
 351.140 + 
 351.141 +-  anslen = res_query (qbuf, C_IN, T_PTR, (u_char *) &net_buffer,
 351.142 +-		      sizeof (querybuf));
 351.143 ++  net_buffer = (querybuf *) malloc (sizeof (*net_buffer));
 351.144 ++  if (net_buffer == NULL)
 351.145 ++    {
 351.146 ++      *errnop = ENOMEM;
 351.147 ++      return NSS_STATUS_UNAVAIL;
 351.148 ++    }
 351.149 ++
 351.150 ++  anslen = res_query (qbuf, C_IN, T_PTR, net_buffer->buf,
 351.151 ++		      sizeof (net_buffer->buf));
 351.152 +   if (anslen < 0)
 351.153 +     {
 351.154 +       /* Nothing found.  */
 351.155 +       *errnop = errno;
 351.156 ++      free (net_buffer);
 351.157 +       return (errno == ECONNREFUSED
 351.158 + 	      || errno == EPFNOSUPPORT
 351.159 + 	      || errno == EAFNOSUPPORT)
 351.160 + 	? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 351.161 +     }
 351.162 + 
 351.163 +-  status = getanswer_r (&net_buffer, anslen, result, buffer, buflen, BYADDR);
 351.164 ++  status = getanswer_r (net_buffer, anslen, result, buffer, buflen, BYADDR);
 351.165 ++  free (net_buffer);
 351.166 +   if (status == NSS_STATUS_SUCCESS)
 351.167 +     {
 351.168 +       /* Strip trailing zeros.  */
 351.169 +--- libc/resolv/res_query.c.jj	Wed Jun 30 12:01:06 1999
 351.170 ++++ libc/resolv/res_query.c	Thu Oct 10 13:01:12 2002
 351.171 +@@ -106,7 +106,7 @@ res_query(name, class, type, answer, ans
 351.172 + 	u_char *answer;		/* buffer to put answer */
 351.173 + 	int anslen;		/* size of answer buffer */
 351.174 + {
 351.175 +-	u_char buf[MAXPACKET];
 351.176 ++	u_char *buf;
 351.177 + 	register HEADER *hp = (HEADER *) answer;
 351.178 + 	int n;
 351.179 + 
 351.180 +@@ -121,17 +121,25 @@ res_query(name, class, type, answer, ans
 351.181 + 		printf(";; res_query(%s, %d, %d)\n", name, class, type);
 351.182 + #endif
 351.183 + 
 351.184 ++	buf = malloc (MAXPACKET);
 351.185 ++	if (buf == NULL) {
 351.186 ++		__set_h_errno (NETDB_INTERNAL);
 351.187 ++		return -1;
 351.188 ++	}
 351.189 ++
 351.190 + 	n = res_mkquery(QUERY, name, class, type, NULL, 0, NULL,
 351.191 +-			buf, sizeof(buf));
 351.192 ++			buf, MAXPACKET);
 351.193 + 	if (n <= 0) {
 351.194 + #ifdef DEBUG
 351.195 + 		if (_res.options & RES_DEBUG)
 351.196 + 			printf(";; res_query: mkquery failed\n");
 351.197 + #endif
 351.198 + 		__set_h_errno (NO_RECOVERY);
 351.199 ++		free (buf);
 351.200 + 		return (n);
 351.201 + 	}
 351.202 + 	n = res_send(buf, n, answer, anslen);
 351.203 ++	free (buf);
 351.204 + 	if (n < 0) {
 351.205 + #ifdef DEBUG
 351.206 + 		if (_res.options & RES_DEBUG)
 351.207 +--- libc/resolv/gethnamaddr.c.jj	Tue Dec  7 11:50:36 1999
 351.208 ++++ libc/resolv/gethnamaddr.c	Thu Oct 10 15:05:50 2002
 351.209 +@@ -512,10 +512,11 @@ gethostbyname2(name, af)
 351.210 + 	const char *name;
 351.211 + 	int af;
 351.212 + {
 351.213 +-	querybuf buf;
 351.214 ++	querybuf *buf;
 351.215 + 	register const char *cp;
 351.216 + 	char *bp;
 351.217 + 	int n, size, type, len;
 351.218 ++	struct hostent *ret;
 351.219 + 	extern struct hostent *_gethtbyname2();
 351.220 + 
 351.221 + 	if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
 351.222 +@@ -617,13 +618,22 @@ gethostbyname2(name, af)
 351.223 + 				break;
 351.224 + 		}
 351.225 + 
 351.226 +-	if ((n = res_search(name, C_IN, type, buf.buf, sizeof(buf.buf))) < 0) {
 351.227 ++	buf = (querybuf *) malloc (sizeof (*buf));
 351.228 ++	if (buf == NULL) {
 351.229 ++		__set_h_errno (NETDB_INTERNAL);
 351.230 ++		return NULL;
 351.231 ++	}
 351.232 ++
 351.233 ++	if ((n = res_search(name, C_IN, type, buf->buf, sizeof(buf->buf))) < 0) {
 351.234 ++		free (buf);
 351.235 + 		dprintf("res_search failed (%d)\n", n);
 351.236 + 		if (errno == ECONNREFUSED)
 351.237 + 			return (_gethtbyname2(name, af));
 351.238 + 		return (NULL);
 351.239 + 	}
 351.240 +-	return (getanswer(&buf, n, name, type));
 351.241 ++	ret = getanswer(buf, n, name, type);
 351.242 ++	free (buf);
 351.243 ++	return ret;
 351.244 + }
 351.245 + 
 351.246 + struct hostent *
 351.247 +@@ -636,7 +646,7 @@ gethostbyaddr(addr, len, af)
 351.248 + 	static const u_char mapped[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0xff,0xff };
 351.249 + 	static const u_char tunnelled[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0,0 };
 351.250 + 	int n, size;
 351.251 +-	querybuf buf;
 351.252 ++	querybuf *buf;
 351.253 + 	register struct hostent *hp;
 351.254 + 	char qbuf[MAXDNAME+1], *qp;
 351.255 + #ifdef SUNSECURITY
 351.256 +@@ -697,14 +707,24 @@ gethostbyaddr(addr, len, af)
 351.257 + 	default:
 351.258 + 		abort();
 351.259 + 	}
 351.260 +-	n = res_query(qbuf, C_IN, T_PTR, (u_char *)buf.buf, sizeof buf.buf);
 351.261 ++
 351.262 ++	buf = (querybuf *) malloc (sizeof (*buf));
 351.263 ++	if (buf == NULL) {
 351.264 ++		__set_h_errno (NETDB_INTERNAL);
 351.265 ++		return NULL;
 351.266 ++	}
 351.267 ++
 351.268 ++	n = res_query(qbuf, C_IN, T_PTR, buf->buf, sizeof buf->buf);
 351.269 + 	if (n < 0) {
 351.270 ++		free (buf);
 351.271 + 		dprintf("res_query failed (%d)\n", n);
 351.272 + 		if (errno == ECONNREFUSED)
 351.273 + 			return (_gethtbyaddr(addr, len, af));
 351.274 + 		return (NULL);
 351.275 + 	}
 351.276 +-	if (!(hp = getanswer(&buf, n, qbuf, T_PTR)))
 351.277 ++	hp = getanswer(buf, n, qbuf, T_PTR);
 351.278 ++	free (buf);
 351.279 ++	if (!hp)
 351.280 + 		return (NULL);	/* h_errno was set by getanswer() */
 351.281 + #ifdef SUNSECURITY
 351.282 + 	if (af == AF_INET) {
 351.283 +--- libc/resolv/getnetnamadr.c.jj	Wed Jun 30 12:00:50 1999
 351.284 ++++ libc/resolv/getnetnamadr.c	Thu Oct 10 13:14:01 2002
 351.285 +@@ -210,7 +210,7 @@ getnetbyaddr(net, net_type)
 351.286 + {
 351.287 + 	unsigned int netbr[4];
 351.288 + 	int nn, anslen;
 351.289 +-	querybuf buf;
 351.290 ++	querybuf *buf;
 351.291 + 	char qbuf[MAXDNAME];
 351.292 + 	u_int32_t net2;		/* Changed from unsigned long --roland */
 351.293 + 	struct netent *net_entry;
 351.294 +@@ -236,8 +236,15 @@ getnetbyaddr(net, net_type)
 351.295 + 		    netbr[1], netbr[0]);
 351.296 + 		break;
 351.297 + 	}
 351.298 +-	anslen = res_query(qbuf, C_IN, T_PTR, (u_char *)&buf, sizeof(buf));
 351.299 ++
 351.300 ++	buf = (querybuf *) malloc (sizeof (*buf));
 351.301 ++	if (buf == NULL) {
 351.302 ++		return NULL;
 351.303 ++	}
 351.304 ++
 351.305 ++	anslen = res_query(qbuf, C_IN, T_PTR, buf->buf, sizeof(buf->buf));
 351.306 + 	if (anslen < 0) {
 351.307 ++		free (buf);
 351.308 + #ifdef DEBUG
 351.309 + 		if (_res.options & RES_DEBUG)
 351.310 + 			printf("res_query failed\n");
 351.311 +@@ -246,7 +253,8 @@ getnetbyaddr(net, net_type)
 351.312 + 			return (_getnetbyaddr(net, net_type));
 351.313 + 		return (NULL);
 351.314 + 	}
 351.315 +-	net_entry = getnetanswer(&buf, anslen, BYADDR);
 351.316 ++	net_entry = getnetanswer(buf, anslen, BYADDR);
 351.317 ++	free (buf);
 351.318 + 	if (net_entry) {
 351.319 + 		unsigned u_net = net;	/* maybe net should be unsigned ? */
 351.320 + 
 351.321 +@@ -264,7 +272,7 @@ getnetbyname(net)
 351.322 + 	register const char *net;
 351.323 + {
 351.324 + 	int anslen;
 351.325 +-	querybuf buf;
 351.326 ++	querybuf *buf;
 351.327 + 	char qbuf[MAXDNAME];
 351.328 + 	struct netent *net_entry;
 351.329 + 
 351.330 +@@ -273,8 +281,13 @@ getnetbyname(net)
 351.331 + 		return (NULL);
 351.332 + 	}
 351.333 + 	strcpy(&qbuf[0], net);
 351.334 +-	anslen = res_search(qbuf, C_IN, T_PTR, (u_char *)&buf, sizeof(buf));
 351.335 ++	buf = (querybuf *) malloc (sizeof (*buf));
 351.336 ++	if (buf == NULL) {
 351.337 ++		return NULL;
 351.338 ++	}
 351.339 ++	anslen = res_search(qbuf, C_IN, T_PTR, buf->buf, sizeof(buf->buf));
 351.340 + 	if (anslen < 0) {
 351.341 ++		free (buf);
 351.342 + #ifdef DEBUG
 351.343 + 		if (_res.options & RES_DEBUG)
 351.344 + 			printf("res_query failed\n");
 351.345 +@@ -283,7 +296,8 @@ getnetbyname(net)
 351.346 + 			return (_getnetbyname(net));
 351.347 + 		return (_getnetbyname(net));
 351.348 + 	}
 351.349 +-	net_entry = getnetanswer(&buf, anslen, BYNAME);
 351.350 ++	net_entry = getnetanswer(buf, anslen, BYNAME);
 351.351 ++	free (buf);
 351.352 + 	if (net_entry)
 351.353 + 		return (net_entry);
 351.354 + 	return (_getnetbyname(net));
 351.355 +--- libc/glibc-compat/nss_dns/dns-host.c.jj	Mon Jan  3 20:07:08 2000
 351.356 ++++ libc/glibc-compat/nss_dns/dns-host.c	Thu Oct 10 12:46:24 2002
 351.357 +@@ -126,9 +126,10 @@ enum nss_status
 351.358 + _nss_dns_gethostbyname2_r (const char *name, int af, struct hostent *result,
 351.359 + 			   char *buffer, size_t buflen, int *h_errnop)
 351.360 + {
 351.361 +-  querybuf host_buffer;
 351.362 ++  querybuf *host_buffer;
 351.363 +   int size, type, n;
 351.364 +   const char *cp;
 351.365 ++  enum nss_status status;
 351.366 + 
 351.367 +   switch (af) {
 351.368 +   case AF_INET:
 351.369 +@@ -156,15 +157,22 @@ _nss_dns_gethostbyname2_r (const char *n
 351.370 +   if (strchr (name, '.') == NULL && (cp = __hostalias (name)) != NULL)
 351.371 +     name = cp;
 351.372 + 
 351.373 +-  n = res_search (name, C_IN, type, host_buffer.buf, sizeof (host_buffer.buf));
 351.374 ++  host_buffer = (querybuf *) malloc (sizeof (querybuf));
 351.375 ++  if (host_buffer == NULL)
 351.376 ++    return NSS_STATUS_UNAVAIL;
 351.377 ++
 351.378 ++  n = res_search (name, C_IN, type, host_buffer->buf, sizeof (host_buffer->buf));
 351.379 +   if (n < 0)
 351.380 +     {
 351.381 +       *h_errnop = h_errno;
 351.382 ++      free (host_buffer);
 351.383 +       return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 351.384 +     }
 351.385 + 
 351.386 +-  return getanswer_r (&host_buffer, n, name, type, result, buffer, buflen,
 351.387 +-		      h_errnop);
 351.388 ++  status = getanswer_r (host_buffer, n, name, type, result, buffer, buflen,
 351.389 ++			h_errnop);
 351.390 ++  free (host_buffer);
 351.391 ++  return status;
 351.392 + }
 351.393 + 
 351.394 + 
 351.395 +@@ -200,7 +208,7 @@ _nss_dns_gethostbyaddr_r (const char *ad
 351.396 +     char *h_addr_ptrs[MAX_NR_ADDRS + 1];
 351.397 +     char linebuffer[0];
 351.398 +   } *host_data = (struct host_data *) buffer;
 351.399 +-  querybuf host_buffer;
 351.400 ++  querybuf *host_buffer;
 351.401 +   char qbuf[MAXDNAME+1], *qp;
 351.402 +   int size, n, status;
 351.403 + 
 351.404 +@@ -251,16 +259,22 @@ _nss_dns_gethostbyaddr_r (const char *ad
 351.405 +       /* Cannot happen.  */
 351.406 +     }
 351.407 + 
 351.408 +-  n = res_query (qbuf, C_IN, T_PTR, (u_char *)host_buffer.buf,
 351.409 +-		 sizeof host_buffer);
 351.410 ++  host_buffer = (querybuf *) malloc (sizeof (querybuf));
 351.411 ++  if (host_buffer == NULL)
 351.412 ++    return NSS_STATUS_UNAVAIL;
 351.413 ++
 351.414 ++  n = res_query (qbuf, C_IN, T_PTR, host_buffer->buf,
 351.415 ++		 sizeof (host_buffer->buf));
 351.416 +   if (n < 0)
 351.417 +     {
 351.418 +       *h_errnop = h_errno;
 351.419 ++      free (host_buffer);
 351.420 +       return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 351.421 +     }
 351.422 + 
 351.423 +-  status = getanswer_r (&host_buffer, n, qbuf, T_PTR, result, buffer, buflen,
 351.424 ++  status = getanswer_r (host_buffer, n, qbuf, T_PTR, result, buffer, buflen,
 351.425 + 			h_errnop);
 351.426 ++  free (host_buffer);
 351.427 +   if (status != NSS_STATUS_SUCCESS)
 351.428 +     {
 351.429 +       *h_errnop = h_errno;
 351.430 +--- libc/glibc-compat/nss_dns/dns-network.c.jj	Mon Jan  3 20:07:08 2000
 351.431 ++++ libc/glibc-compat/nss_dns/dns-network.c	Thu Oct 10 12:46:24 2002
 351.432 +@@ -107,21 +107,32 @@ _nss_dns_getnetbyname_r (const char *nam
 351.433 + 			 char *buffer, size_t buflen)
 351.434 + {
 351.435 +   /* Return entry for network with NAME.  */
 351.436 +-  querybuf net_buffer;
 351.437 ++  querybuf *net_buffer;
 351.438 +   int anslen;
 351.439 +   char *qbuf;
 351.440 ++  enum nss_status status;
 351.441 + 
 351.442 +   qbuf = strdupa (name);
 351.443 +-  anslen = res_search (qbuf, C_IN, T_PTR, (u_char *) &net_buffer,
 351.444 +-		       sizeof (querybuf));
 351.445 ++
 351.446 ++  net_buffer = (querybuf *) malloc (sizeof (querybuf));
 351.447 ++  if (net_buffer == NULL)
 351.448 ++    return NSS_STATUS_UNAVAIL;
 351.449 ++
 351.450 ++  anslen = res_search (qbuf, C_IN, T_PTR, net_buffer->buf,
 351.451 ++		       sizeof (net_buffer->buf));
 351.452 +   if (anslen < 0)
 351.453 +-    /* Nothing found.  */
 351.454 +-    return (errno == ECONNREFUSED
 351.455 +-	    || errno == EPFNOSUPPORT
 351.456 +-	    || errno == EAFNOSUPPORT)
 351.457 +-      ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 351.458 ++    {
 351.459 ++      free (net_buffer);
 351.460 ++      /* Nothing found.  */
 351.461 ++      return (errno == ECONNREFUSED
 351.462 ++	      || errno == EPFNOSUPPORT
 351.463 ++	      || errno == EAFNOSUPPORT)
 351.464 ++	      ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 351.465 ++    }
 351.466 + 
 351.467 +-  return getanswer_r (&net_buffer, anslen, result, buffer, buflen, BYNAME);
 351.468 ++  status = getanswer_r (net_buffer, anslen, result, buffer, buflen, BYNAME);
 351.469 ++  free (net_buffer);
 351.470 ++  return status;
 351.471 + }
 351.472 + 
 351.473 + 
 351.474 +@@ -131,7 +142,7 @@ _nss_dns_getnetbyaddr_r (long net, int t
 351.475 + {
 351.476 +   /* Return entry for network with NAME.  */
 351.477 +   enum nss_status status;
 351.478 +-  querybuf net_buffer;
 351.479 ++  querybuf *net_buffer;
 351.480 +   unsigned int net_bytes[4];
 351.481 +   char qbuf[MAXDNAME];
 351.482 +   int cnt, anslen;
 351.483 +@@ -167,16 +178,24 @@ _nss_dns_getnetbyaddr_r (long net, int t
 351.484 +       break;
 351.485 +     }
 351.486 + 
 351.487 +-  anslen = res_query (qbuf, C_IN, T_PTR, (u_char *) &net_buffer,
 351.488 +-		      sizeof (querybuf));
 351.489 ++  net_buffer = (querybuf *) malloc (sizeof (querybuf));
 351.490 ++  if (net_buffer == NULL)
 351.491 ++    return NSS_STATUS_UNAVAIL;
 351.492 ++
 351.493 ++  anslen = res_query (qbuf, C_IN, T_PTR, net_buffer->buf,
 351.494 ++		      sizeof (net_buffer->buf));
 351.495 +   if (anslen < 0)
 351.496 +-    /* Nothing found.  */
 351.497 +-    return (errno == ECONNREFUSED
 351.498 +-	    || errno == EPFNOSUPPORT
 351.499 +-	    || errno == EAFNOSUPPORT)
 351.500 +-      ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 351.501 ++    {
 351.502 ++      free (net_buffer);
 351.503 ++      /* Nothing found.  */
 351.504 ++      return (errno == ECONNREFUSED
 351.505 ++	      || errno == EPFNOSUPPORT
 351.506 ++	      || errno == EAFNOSUPPORT)
 351.507 ++	      ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 351.508 ++    }
 351.509 + 
 351.510 +-  status = getanswer_r (&net_buffer, anslen, result, buffer, buflen, BYADDR);
 351.511 ++  status = getanswer_r (net_buffer, anslen, result, buffer, buflen, BYADDR);
 351.512 ++  free (net_buffer);
 351.513 +   if (status == NSS_STATUS_SUCCESS)
 351.514 +     {
 351.515 +       /* Strip trailing zeros.  */
   352.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   352.2 +++ b/patches/glibc/2.1.3/rh62-99-glibc-2.1.3-allow-gcc-3.4-dns.patch	Sat Feb 24 11:00:05 2007 +0000
   352.3 @@ -0,0 +1,11 @@
   352.4 +--- glibc-2.1.3/glibc-compat/nss_dns/dns-host.c.old	Sun Apr 11 21:46:14 2004
   352.5 ++++ glibc-2.1.3/glibc-compat/nss_dns/dns-host.c	Sun Apr 11 21:46:26 2004
   352.6 +@@ -256,7 +256,7 @@
   352.7 +       strcpy(qp, "ip6.int");
   352.8 +       break;
   352.9 +     default:
  352.10 +-      /* Cannot happen.  */
  352.11 ++      ; /* Cannot happen.  */
  352.12 +     }
  352.13 + 
  352.14 +   host_buffer = (querybuf *) malloc (sizeof (querybuf));
   353.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   353.2 +++ b/patches/glibc/2.1.3/rh62-99-glibc-2.1.3-allow-gcc-3.4-gconv_stubs.patch	Sat Feb 24 11:00:05 2007 +0000
   353.3 @@ -0,0 +1,44 @@
   353.4 +"Fixes" gcc-3.4.0 errors:
   353.5 +gconv_stubs.c:49: error: conflicting types for '__gconv_close_transform'
   353.6 +../iconv/gconv_int.h:131: error: previous declaration of '__gconv_close_transform' was here
   353.7 +gconv_stubs.c:49: error: conflicting types for '__gconv_close_transform'
   353.8 +../iconv/gconv_int.h:131: error: previous declaration of '__gconv_close_transform' was here
   353.9 +gconv_stubs.c:52: error: conflicting types for '__gconv'
  353.10 +../iconv/gconv_int.h:112: error: previous declaration of '__gconv' was here
  353.11 +gconv_stubs.c:52: error: conflicting types for '__gconv'
  353.12 +../iconv/gconv_int.h:112: error: previous declaration of '__gconv' was here
  353.13 +gconv_stubs.c:54: error: conflicting types for '__gconv_find_transform'
  353.14 +../iconv/gconv_int.h:119: error: previous declaration of '__gconv_find_transform' was here
  353.15 +gconv_stubs.c:54: error: conflicting types for '__gconv_find_transform'
  353.16 +../iconv/gconv_int.h:119: error: previous declaration of '__gconv_find_transform' was here
  353.17 +gconv_stubs.c:56: error: conflicting types for '__gconv_open'
  353.18 +../iconv/gconv_int.h:99: error: previous declaration of '__gconv_open' was here
  353.19 +gconv_stubs.c:56: error: conflicting types for '__gconv_open'
  353.20 +../iconv/gconv_int.h:99: error: previous declaration of '__gconv_open' was here
  353.21 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.1.3/build-glibc/c_stubs/gconv_stubs.o] Error 1
  353.22 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.1.3/glibc-2.1.3/c_stubs'
  353.23 +
  353.24 +although the right thing would probably be to declare the 
  353.25 +stubs to have the right attributes.
  353.26 +
  353.27 +--- glibc-2.1.3/c_stubs/gconv_stubs.c.old	Sun Apr 11 20:25:09 2004
  353.28 ++++ glibc-2.1.3/c_stubs/gconv_stubs.c	Sun Apr 11 20:29:35 2004
  353.29 +@@ -18,7 +18,18 @@
  353.30 +    Boston, MA 02111-1307, USA.  */
  353.31 + 
  353.32 + #include <features.h>
  353.33 ++
  353.34 ++/* strange hack workaround for gcc-3.4.0.  Might be a better way. */
  353.35 ++#define __gconv_close_transform foo__gconv_close_transform
  353.36 ++#define __gconv foo__gconv
  353.37 ++#define __gconv_find_transform foo__gconv_find_transform
  353.38 ++#define __gconv_open foo__gconv_open
  353.39 ++
  353.40 + #include <gconv_int.h>
  353.41 ++#undef __gconv_close_transform
  353.42 ++#undef __gconv
  353.43 ++#undef __gconv_find_transform
  353.44 ++#undef __gconv_open
  353.45 + 
  353.46 + /* hack for self identification */
  353.47 + int __c_stubs_is_compiled_in;
   354.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   354.2 +++ b/patches/glibc/2.1.3/sk.po.patch	Sat Feb 24 11:00:05 2007 +0000
   354.3 @@ -0,0 +1,6678 @@
   354.4 +From
   354.5 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/po/sk.po.diff?r1=1.2&r2=1.3&cvsroot=glibc
   354.6 +
   354.7 +Fixes build error
   354.8 +  msgfmt -o sk.mo sk.po
   354.9 +  sk.po:2913: duplicate message definition
  354.10 +  sk.po:2909: ...this is the location of the first definition
  354.11 +  sk.po:3894: duplicate message definition
  354.12 +  sk.po:3070: ...this is the location of the first definition
  354.13 +  msgfmt: found 2 fatal errors
  354.14 +  make[2]: *** [sk.mo] Error 1
  354.15 +
  354.16 +===================================================================
  354.17 +RCS file: /cvs/glibc/libc/po/sk.po,v
  354.18 +retrieving revision 1.2
  354.19 +retrieving revision 1.3
  354.20 +diff -u -r1.2 -r1.3
  354.21 +--- libc/po/sk.po	1998/12/04 21:08:17	1.2
  354.22 ++++ libc/po/sk.po	2001/06/05 22:43:33	1.3
  354.23 +@@ -4,82 +4,82 @@
  354.24 + #
  354.25 + msgid ""
  354.26 + msgstr ""
  354.27 +-"Project-Id-Version: libc 2.1\n"
  354.28 +-"POT-Creation-Date: 1998-11-28 09:29-0800\n"
  354.29 +-"PO-Revision-Date: 1998-12-02 22:02+01:00\n"
  354.30 ++"Project-Id-Version: libc 2.2.3\n"
  354.31 ++"POT-Creation-Date: 2001-01-21 08:03-0800\n"
  354.32 ++"PO-Revision-Date: 2001-06-05 17:57+02:00\n"
  354.33 + "Last-Translator: Stanislav Meduna <stano@eunet.sk>\n"
  354.34 + "Language-Team: Slovak <sk-i18n@rak.isternet.sk>\n"
  354.35 + "MIME-Version: 1.0\n"
  354.36 + "Content-Type: text/plain; charset=ISO-8859-2\n"
  354.37 + "Content-Transfer-Encoding: 8bit\n"
  354.38 + 
  354.39 +-#: nis/nis_print.c:273
  354.40 ++#: nis/nis_print.c:274
  354.41 + msgid "\t\tAccess Rights : "
  354.42 + msgstr "\t\tPrístupové práva : "
  354.43 + 
  354.44 +-#: nis/nis_print.c:271
  354.45 ++#: nis/nis_print.c:272
  354.46 + msgid "\t\tAttributes    : "
  354.47 + msgstr "\t\tAtribúty         : "
  354.48 + 
  354.49 +-#: sunrpc/rpc_main.c:1416
  354.50 ++#: sunrpc/rpc_main.c:1425
  354.51 + #, c-format
  354.52 + msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n"
  354.53 + msgstr "\t%s [-abkCLNTM][-Dnázov[=hodnota]] [-i veµkos»] [-I [-K sekundy]] [-Y cesta] vst_súbor\n"
  354.54 + 
  354.55 +-#: sunrpc/rpc_main.c:1418
  354.56 ++#: sunrpc/rpc_main.c:1427
  354.57 + #, c-format
  354.58 + msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n"
  354.59 + msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o výst_súbor] [vst_súbor]\n"
  354.60 + 
  354.61 +-#: sunrpc/rpc_main.c:1421
  354.62 ++#: sunrpc/rpc_main.c:1430
  354.63 + #, c-format
  354.64 + msgid "\t%s [-n netid]* [-o outfile] [infile]\n"
  354.65 + msgstr "\t%s [-n netid]* [-o výst_súbor] [vst_súbor]\n"
  354.66 + 
  354.67 +-#: sunrpc/rpc_main.c:1420
  354.68 ++#: sunrpc/rpc_main.c:1429
  354.69 + #, c-format
  354.70 + msgid "\t%s [-s nettype]* [-o outfile] [infile]\n"
  354.71 + msgstr "\t%s [-s nettype]* [-o výst_súbor] [vst_súbor]\n"
  354.72 + 
  354.73 +-#: nis/nis_print.c:235
  354.74 ++#: nis/nis_print.c:236
  354.75 + msgid "\tAccess rights: "
  354.76 + msgstr "\tPrístupové práva: "
  354.77 + 
  354.78 +-#: nis/nis_print.c:293
  354.79 ++#: nis/nis_print.c:294
  354.80 + #, c-format
  354.81 + msgid "\tEntry data of type %s\n"
  354.82 + msgstr "\tVstupné údaje typu %s\n"
  354.83 + 
  354.84 +-#: nis/nis_print.c:171
  354.85 ++#: nis/nis_print.c:172
  354.86 + #, c-format
  354.87 + msgid "\tName       : %s\n"
  354.88 + msgstr "\tNázov         : %s\n"
  354.89 + 
  354.90 +-#: nis/nis_print.c:172
  354.91 ++#: nis/nis_print.c:173
  354.92 + msgid "\tPublic Key : "
  354.93 + msgstr "\tVerejný kµúè  : "
  354.94 + 
  354.95 +-#: nis/nis_print.c:234
  354.96 ++#: nis/nis_print.c:235
  354.97 + #, c-format
  354.98 + msgid "\tType         : %s\n"
  354.99 + msgstr "\tTyp             : %s\n"
 354.100 + 
 354.101 +-#: nis/nis_print.c:201
 354.102 ++#: nis/nis_print.c:202
 354.103 + #, c-format
 354.104 + msgid "\tUniversal addresses (%u)\n"
 354.105 + msgstr "\tUniverzálne adresy (%u)\n"
 354.106 + 
 354.107 +-#: nis/nis_print.c:269
 354.108 ++#: nis/nis_print.c:270
 354.109 + #, c-format
 354.110 + msgid "\t[%d]\tName          : %s\n"
 354.111 + msgstr "\t[%d]\tNázov            : %s\n"
 354.112 + 
 354.113 +-#: nis/nis_print.c:296
 354.114 ++#: nis/nis_print.c:297
 354.115 + #, c-format
 354.116 + msgid "\t[%u] - [%u bytes] "
 354.117 + msgstr "\t[%u] - [%u bajtov] "
 354.118 + 
 354.119 +-#: nscd/nscd_stat.c:153
 354.120 ++#: nscd/nscd_stat.c:154
 354.121 + msgid ""
 354.122 + "\n"
 354.123 + "%s cache:\n"
 354.124 +@@ -109,11 +109,11 @@
 354.125 + "%15ld%% úspe¹nos» cache\n"
 354.126 + "%15s  skontrolujte /etc/%s na zmeny\n"
 354.127 + 
 354.128 +-#: nis/nis_print.c:251
 354.129 ++#: nis/nis_print.c:252
 354.130 + msgid "\nGroup Members :\n"
 354.131 + msgstr "\nÈlenovia skupín  :\n"
 354.132 + 
 354.133 +-#: nis/nis_print.c:320
 354.134 ++#: nis/nis_print.c:323
 354.135 + msgid "\nTime to Live  : "
 354.136 + msgstr "\n®ivotnos»        : "
 354.137 + 
 354.138 +@@ -133,60 +133,60 @@
 354.139 + msgid "       rpcinfo [ -n portnum ] -t host prognum [ versnum ]\n"
 354.140 + msgstr "       rpcinfo [ -n èíslo_portu ] -t poèítaè èíslo_programu [ èíslo_verzie ]\n"
 354.141 + 
 354.142 +-#: nscd/nscd_stat.c:145 nscd/nscd_stat.c:147
 354.143 ++#: nscd/nscd_stat.c:146 nscd/nscd_stat.c:148
 354.144 + msgid "      no"
 354.145 + msgstr "      nie"
 354.146 + 
 354.147 +-#: nscd/nscd_stat.c:145 nscd/nscd_stat.c:147
 354.148 ++#: nscd/nscd_stat.c:146 nscd/nscd_stat.c:148
 354.149 + msgid "     yes"
 354.150 + msgstr "     áno"
 354.151 + 
 354.152 +-#: nis/nis_print.c:344
 354.153 ++#: nis/nis_print.c:349
 354.154 + #, c-format
 354.155 + msgid "    Data Length = %u\n"
 354.156 + msgstr "    Då¾ka údajov = %u\n"
 354.157 + 
 354.158 +-#: nis/nis_print_group_entry.c:121
 354.159 ++#: nis/nis_print_group_entry.c:123
 354.160 + msgid "    Explicit members:\n"
 354.161 + msgstr "    Explicitní èlenovia:\n"
 354.162 + 
 354.163 +-#: nis/nis_print_group_entry.c:145 nis/nis_print_group_entry.c:161
 354.164 ++#: nis/nis_print_group_entry.c:147 nis/nis_print_group_entry.c:163
 354.165 + msgid "    Explicit nonmembers:\n"
 354.166 + msgstr "    Explicitní neèlenovia:\n"
 354.167 + 
 354.168 +-#: nis/nis_print_group_entry.c:129
 354.169 ++#: nis/nis_print_group_entry.c:131
 354.170 + msgid "    Implicit members:\n"
 354.171 + msgstr "    Implicitní èlenovia:\n"
 354.172 + 
 354.173 +-#: nis/nis_print_group_entry.c:153
 354.174 ++#: nis/nis_print_group_entry.c:155
 354.175 + msgid "    Implicit nonmembers:\n"
 354.176 + msgstr "    Implicitní neèlenovia:\n"
 354.177 + 
 354.178 +-#: nis/nis_print_group_entry.c:126
 354.179 ++#: nis/nis_print_group_entry.c:128
 354.180 + msgid "    No explicit members\n"
 354.181 + msgstr "    ®iadni explicitní èlenovia\n"
 354.182 + 
 354.183 +-#: nis/nis_print_group_entry.c:150
 354.184 ++#: nis/nis_print_group_entry.c:152
 354.185 + msgid "    No explicit nonmembers\n"
 354.186 + msgstr "    ®iadni explicitní neèlenovia\n"
 354.187 + 
 354.188 +-#: nis/nis_print_group_entry.c:134
 354.189 ++#: nis/nis_print_group_entry.c:136
 354.190 + msgid "    No implicit members\n"
 354.191 + msgstr "    ®iadni implicitní èlenovia\n"
 354.192 + 
 354.193 +-#: nis/nis_print_group_entry.c:158
 354.194 ++#: nis/nis_print_group_entry.c:160
 354.195 + msgid "    No implicit nonmembers\n"
 354.196 + msgstr "    ®iadni implicitní neèlenovia\n"
 354.197 + 
 354.198 +-#: nis/nis_print_group_entry.c:142
 354.199 ++#: nis/nis_print_group_entry.c:144
 354.200 + msgid "    No recursive members\n"
 354.201 + msgstr "    ®iadni rekurzívni èlenovia\n"
 354.202 + 
 354.203 +-#: nis/nis_print_group_entry.c:166
 354.204 ++#: nis/nis_print_group_entry.c:168
 354.205 + msgid "    No recursive nonmembers\n"
 354.206 + msgstr "    ®iadni rekurzívni neèlenovia\n"
 354.207 + 
 354.208 +-#: nis/nis_print_group_entry.c:137
 354.209 ++#: nis/nis_print_group_entry.c:139
 354.210 + msgid "    Recursive members:\n"
 354.211 + msgstr "    Rekurzívni èlenovia:\n"
 354.212 + 
 354.213 +@@ -194,138 +194,198 @@
 354.214 + msgid "   program vers proto   port\n"
 354.215 + msgstr "   program verz proto   port\n"
 354.216 + 
 354.217 +-#: argp/argp-help.c:1571
 354.218 ++#: argp/argp-help.c:1572
 354.219 + msgid "  or: "
 354.220 + msgstr "  alebo: "
 354.221 + 
 354.222 ++#: elf/ldconfig.c:448
 354.223 ++msgid " (SKIPPED)\n"
 354.224 ++msgstr " (VYNECHANÉ)\n"
 354.225 ++
 354.226 ++#: elf/ldconfig.c:446
 354.227 ++msgid " (changed)\n"
 354.228 ++msgstr " (zmenené)\n"
 354.229 ++
 354.230 + #: timezone/zic.c:421
 354.231 + #, c-format
 354.232 + msgid " (rule from \"%s\", line %d)"
 354.233 + msgstr " (pravidlo z \"%s\", riadok %d)"
 354.234 + 
 354.235 +-#: argp/argp-help.c:1583
 354.236 ++#: argp/argp-help.c:1584
 354.237 + msgid " [OPTION...]"
 354.238 + msgstr " [VO¥BA...]"
 354.239 + 
 354.240 +-#: locale/programs/ld-collate.c:370 locale/programs/ld-ctype.c:1291
 354.241 +-msgid " done\n"
 354.242 +-msgstr " hotovo\n"
 354.243 +-
 354.244 + #: timezone/zic.c:418
 354.245 + #, c-format
 354.246 + msgid "\"%s\", line %d: %s"
 354.247 + msgstr "\"%s\", riadok %d: %s"
 354.248 + 
 354.249 +-#: timezone/zic.c:958
 354.250 ++#: timezone/zic.c:983
 354.251 + #, c-format
 354.252 + msgid "\"Zone %s\" line and -l option are mutually exclusive"
 354.253 + msgstr "Riadok \"Zone %s\" a voµba -l sa navzájom vyluèujú"
 354.254 + 
 354.255 +-#: timezone/zic.c:966
 354.256 ++#: timezone/zic.c:991
 354.257 + #, c-format
 354.258 + msgid "\"Zone %s\" line and -p option are mutually exclusive"
 354.259 + msgstr "Riadok \"Zone %s\" a voµba -p sa navzájom vyluèujú"
 354.260 + 
 354.261 +-#: sunrpc/rpc_main.c:1401
 354.262 ++#: sunrpc/rpc_main.c:1410
 354.263 + msgid "\"infile\" is required for template generation flags.\n"
 354.264 + msgstr "\"vst_súbor\" je vy¾adovaný pri pou¾ití príznakov tvorby vzoru.\n"
 354.265 + 
 354.266 +-#: argp/argp-help.c:210
 354.267 ++#: argp/argp-help.c:209
 354.268 + #, c-format
 354.269 + msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
 354.270 + msgstr "%.*s: Parameter ARGP_HELP_FMT vy¾aduje hodnotu"
 354.271 + 
 354.272 +-#: argp/argp-help.c:219
 354.273 ++#: argp/argp-help.c:218
 354.274 + #, c-format
 354.275 + msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
 354.276 + msgstr "%.*s: Neznámy parameter ARGP_HELP_FMT"
 354.277 + 
 354.278 +-#: timezone/zic.c:768
 354.279 ++#: locale/programs/ld-address.c:576 locale/programs/ld-collate.c:2593
 354.280 ++#: locale/programs/ld-collate.c:3719 locale/programs/ld-ctype.c:2110
 354.281 ++#: locale/programs/ld-ctype.c:2847 locale/programs/ld-identification.c:440
 354.282 ++#: locale/programs/ld-measurement.c:232 locale/programs/ld-messages.c:326
 354.283 ++#: locale/programs/ld-monetary.c:934 locale/programs/ld-name.c:300
 354.284 ++#: locale/programs/ld-numeric.c:370 locale/programs/ld-paper.c:233
 354.285 ++#: locale/programs/ld-telephone.c:308 locale/programs/ld-time.c:1172
 354.286 ++#, c-format
 354.287 ++msgid "%1$s: definition does not end with `END %1$s'"
 354.288 ++msgstr "%1$s: Definícia nekonèí `END %1$s'"
 354.289 ++
 354.290 ++#: elf/cache.c:165 elf/cache.c:175
 354.291 ++#, c-format
 354.292 ++msgid "%d libs found in cache `%s'\n"
 354.293 ++msgstr "%d kni¾níc nájdených v cache `%s'\n"
 354.294 ++
 354.295 ++#: timezone/zic.c:793
 354.296 + #, c-format
 354.297 + msgid "%s in ruleless zone"
 354.298 + msgstr "%s v zóne bez pravidiel"
 354.299 + 
 354.300 +-#: assert/assert.c:51
 354.301 ++#: elf/../sysdeps/generic/readelflib.c:65
 354.302 ++#, c-format
 354.303 ++msgid "%s is a 32 bit ELF file.\n"
 354.304 ++msgstr "%s je 32-bitový ELF súbor.\n"
 354.305 ++
 354.306 ++#: elf/../sysdeps/generic/readelflib.c:67
 354.307 ++#, c-format
 354.308 ++msgid "%s is a 64 bit ELF file.\n"
 354.309 ++msgstr "%s je 64-bitový ELF súbor.\n"
 354.310 ++
 354.311 ++#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:48
 354.312 ++#, c-format
 354.313 ++msgid "%s is for unknown machine %d.\n"
 354.314 ++msgstr "%s je pre neznámy stroj %d.\n"
 354.315 ++
 354.316 ++#: elf/ldconfig.c:329
 354.317 ++#, c-format
 354.318 ++msgid "%s is not a known library type"
 354.319 ++msgstr "%s nie je známy typ kni¾nice"
 354.320 ++
 354.321 ++#: elf/../sysdeps/generic/readelflib.c:76
 354.322 ++#, c-format
 354.323 ++msgid "%s is not a shared object file (Type: %d).\n"
 354.324 ++msgstr "%s nie je zdieµaný objektový súbor (Typ: %d).\n"
 354.325 ++
 354.326 ++#: elf/ldconfig.c:415
 354.327 ++#, c-format
 354.328 ++msgid "%s is not a symbolic link\n"
 354.329 ++msgstr "%s nie je symbolický odkaz\n"
 354.330 ++
 354.331 ++#: elf/readlib.c:157
 354.332 ++#, c-format
 354.333 ++msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n"
 354.334 ++msgstr "%s nie je ELF súbor - na zaèiatku obsahujé chybné magické bajty.\n"
 354.335 ++
 354.336 ++#: assert/assert.c:52
 354.337 + #, c-format
 354.338 + msgid "%s%s%s:%u: %s%sAssertion `%s' failed.\n"
 354.339 + msgstr "%s%s%s:%u: %s%sPredpoklad `%s' nesplnený.\n"
 354.340 + 
 354.341 +-#: assert/assert-perr.c:52
 354.342 ++#: assert/assert-perr.c:54
 354.343 + #, c-format
 354.344 + msgid "%s%s%s:%u: %s%sUnexpected error: %s.\n"
 354.345 + msgstr "%s%s%s:%u: %s%sNeoèakávaná chyba: %s.\n"
 354.346 + 
 354.347 +-#: stdio-common/psignal.c:47
 354.348 ++#: stdio-common/psignal.c:48
 354.349 + #, c-format
 354.350 + msgid "%s%sUnknown signal %d\n"
 354.351 + msgstr "%s%sNeznámy signál %d\n"
 354.352 + 
 354.353 +-#: timezone/zic.c:2201
 354.354 ++#: timezone/zic.c:2228
 354.355 + #, c-format
 354.356 + msgid "%s: %d did not sign extend correctly\n"
 354.357 + msgstr "%s: nesprávne roz¹írenie znamienka pre %d\n"
 354.358 + 
 354.359 +-#: locale/programs/charmap.c:261
 354.360 ++#: locale/programs/charmap.c:326
 354.361 + #, c-format
 354.362 + msgid "%s: <mb_cur_max> must be greater than <mb_cur_min>\n"
 354.363 + msgstr "%s: <mb_cur_max> musí by» väè¹ie ako <mb_cur_min>\n"
 354.364 + 
 354.365 +-#: sunrpc/rpc_main.c:422
 354.366 ++#: sunrpc/rpc_main.c:423
 354.367 + #, c-format
 354.368 + msgid "%s: C preprocessor failed with exit code %d\n"
 354.369 + msgstr "%s: C preprocesor zlyhal s výstupným kódom %d\n"
 354.370 + 
 354.371 +-#: sunrpc/rpc_main.c:419
 354.372 ++#: sunrpc/rpc_main.c:420
 354.373 + #, c-format
 354.374 + msgid "%s: C preprocessor failed with signal %d\n"
 354.375 + msgstr "%s: C preprocesor zlyhal so signálom %d\n"
 354.376 + 
 354.377 +-#: timezone/zic.c:1469
 354.378 ++#: timezone/zic.c:1494
 354.379 + #, c-format
 354.380 + msgid "%s: Can't create %s: %s\n"
 354.381 + msgstr "%s: Nie je mo¾né vytvori» %s: %s\n"
 354.382 + 
 354.383 +-#: timezone/zic.c:2179
 354.384 ++#: timezone/zic.c:2206
 354.385 + #, c-format
 354.386 + msgid "%s: Can't create directory %s: %s\n"
 354.387 + msgstr "%s: Nie je mo¾né vytvori» adresár %s: %s\n"
 354.388 + 
 354.389 +-#: timezone/zic.c:620
 354.390 ++#: timezone/zic.c:645
 354.391 + #, c-format
 354.392 + msgid "%s: Can't link from %s to %s: %s\n"
 354.393 + msgstr "%s: Nie je mo¾né vytvori» prepojenie z %s na %s: %s\n"
 354.394 + 
 354.395 +-#: timezone/zic.c:794
 354.396 ++#: timezone/zic.c:819
 354.397 + #, c-format
 354.398 + msgid "%s: Can't open %s: %s\n"
 354.399 + msgstr "%s: Nie je mo¾né otvori» %s: %s\n"
 354.400 + 
 354.401 +-#: timezone/zic.c:1459
 354.402 ++#: timezone/zic.c:1484
 354.403 + #, c-format
 354.404 + msgid "%s: Can't remove %s: %s\n"
 354.405 + msgstr "%s: Nie je mo¾né odstráni» %s: %s\n"
 354.406 + 
 354.407 +-#: timezone/zic.c:863
 354.408 ++#: timezone/zic.c:630
 354.409 ++#, c-format
 354.410 ++msgid "%s: Can't unlink  %s: %s\n"
 354.411 ++msgstr "%s: Nie je mo¾né zmaza» %s: %s\n"
 354.412 ++
 354.413 ++#: timezone/zic.c:888
 354.414 + #, c-format
 354.415 + msgid "%s: Error closing %s: %s\n"
 354.416 + msgstr "%s: Chyba pri uzatváraní %s: %s\n"
 354.417 + 
 354.418 +-#: timezone/zic.c:856
 354.419 ++#: timezone/zic.c:881
 354.420 + #, c-format
 354.421 + msgid "%s: Error reading %s\n"
 354.422 + msgstr "%s: Chyba pri èítaní %s\n"
 354.423 + 
 354.424 +-#: timezone/zic.c:1535
 354.425 ++#: timezone/zdump.c:267
 354.426 + #, c-format
 354.427 +-msgid "%s: Error writing %s\n"
 354.428 +-msgstr "%s: Chyba pri zápise %s\n"
 354.429 ++msgid "%s: Error writing "
 354.430 ++msgstr "%s: Chyba pri zápise "
 354.431 + 
 354.432 +-#: timezone/zdump.c:266
 354.433 ++#: timezone/zic.c:1560
 354.434 + #, c-format
 354.435 +-msgid "%s: Error writing standard output "
 354.436 +-msgstr "%s: Chyba pri zápise na ¹tandardný výstup "
 354.437 ++msgid "%s: Error writing %s\n"
 354.438 ++msgstr "%s: Chyba pri zápise %s\n"
 354.439 + 
 354.440 +-#: timezone/zic.c:841
 354.441 ++#: timezone/zic.c:866
 354.442 + #, c-format
 354.443 + msgid "%s: Leap line in non leap seconds file %s\n"
 354.444 + msgstr "%s: Priestupný riadok v súbore nepriestupných sekúnd %s\n"
 354.445 +@@ -335,122 +395,551 @@
 354.446 + msgid "%s: Memory exhausted: %s\n"
 354.447 + msgstr "%s: Nedostatok pamäti: %s\n"
 354.448 + 
 354.449 +-#: timezone/zic.c:524
 354.450 ++#: timezone/zic.c:525
 354.451 + #, c-format
 354.452 + msgid "%s: More than one -L option specified\n"
 354.453 + msgstr "%s: Voµba -L zadaná viac ako raz\n"
 354.454 + 
 354.455 +-#: timezone/zic.c:484
 354.456 ++#: timezone/zic.c:485
 354.457 + #, c-format
 354.458 + msgid "%s: More than one -d option specified\n"
 354.459 + msgstr "%s: Voµba -d zadaná viac ako raz\n"
 354.460 + 
 354.461 +-#: timezone/zic.c:494
 354.462 ++#: timezone/zic.c:495
 354.463 + #, c-format
 354.464 + msgid "%s: More than one -l option specified\n"
 354.465 + msgstr "%s: Voµba -l zadaná viac ako raz\n"
 354.466 + 
 354.467 +-#: timezone/zic.c:504
 354.468 ++#: timezone/zic.c:505
 354.469 + #, c-format
 354.470 + msgid "%s: More than one -p option specified\n"
 354.471 + msgstr "%s: Voµba -p zadaná viac ako raz\n"
 354.472 + 
 354.473 +-#: timezone/zic.c:514
 354.474 ++#: timezone/zic.c:515
 354.475 + #, c-format
 354.476 + msgid "%s: More than one -y option specified\n"
 354.477 + msgstr "%s: Voµba -y zadaná viac ako raz\n"
 354.478 + 
 354.479 +-#: argp/argp-parse.c:640
 354.480 ++#: argp/argp-parse.c:646
 354.481 + #, c-format
 354.482 + msgid "%s: Too many arguments\n"
 354.483 + msgstr "%s: Priveµa argumentov\n"
 354.484 + 
 354.485 +-#: login/programs/database.c:129
 354.486 ++#: locale/programs/ld-collate.c:457 locale/programs/ld-collate.c:483
 354.487 ++#: locale/programs/ld-collate.c:499
 354.488 ++#, c-format
 354.489 ++msgid "%s: `%s' mentioned more than once in definition of weight %d"
 354.490 ++msgstr "%s: `%s' spomenuté viac ako raz v definícii váhy %d"
 354.491 ++
 354.492 ++#: locale/programs/ld-collate.c:1323
 354.493 ++#, c-format
 354.494 ++msgid "%s: `%s' must be a character"
 354.495 ++msgstr "%s: `%s' musí by» znak"
 354.496 ++
 354.497 ++#: locale/programs/ld-address.c:248 locale/programs/ld-address.c:276
 354.498 ++#: locale/programs/ld-address.c:309 locale/programs/ld-address.c:321
 354.499 ++#, c-format
 354.500 ++msgid "%s: `%s' value does not match `%s' value"
 354.501 ++msgstr "%s: hodnota `%s' nezodpovedá hodnote `%s'"
 354.502 ++
 354.503 ++#: locale/programs/ld-monetary.c:835 locale/programs/ld-numeric.c:313
 354.504 ++#, c-format
 354.505 ++msgid "%s: `-1' must be last entry in `%s' field"
 354.506 ++msgstr "%s: `-1' musí by» posledným záznamom v poli `%s'"
 354.507 ++
 354.508 ++#: locale/programs/ld-collate.c:447 locale/programs/ld-collate.c:473
 354.509 ++#, c-format
 354.510 ++msgid "%s: `forward' and `backward' are mutually excluding each other"
 354.511 ++msgstr "%s: `forward' a `backward' sa navzájom vyluèujú"
 354.512 ++
 354.513 ++#: locale/programs/ld-collate.c:1515
 354.514 ++#, c-format
 354.515 ++msgid "%s: `position' must be used for a specific level in all sections or none"
 354.516 ++msgstr "%s: `position' musí by» pre danú úroveò pou¾itá vo v¹etkých sekciách, alebo v ¾iadnej"
 354.517 ++
 354.518 ++#: locale/programs/ld-ctype.c:2635 locale/programs/ld-ctype.c:2775
 354.519 ++#, c-format
 354.520 ++msgid "%s: `translit_start' section does not end with `translit_end'"
 354.521 ++msgstr "%s: sekcia `translit_start' nekonèí `translit_end'"
 354.522 ++
 354.523 ++#: locale/programs/ld-collate.c:1123
 354.524 ++#, c-format
 354.525 ++msgid "%s: byte sequence of first character of sequence is not lower than that of the last character"
 354.526 ++msgstr "%s: poradie bajtu prvého znaku sekvencie nie je men¹ie ako posledného"
 354.527 ++
 354.528 ++#: locale/programs/ld-collate.c:1081
 354.529 ++#, c-format
 354.530 ++msgid "%s: byte sequences of first and last character must have the same length"
 354.531 ++msgstr "%s: bajtové sekvencie prvého a posledného znaku musia ma» rovnakú då¾ku"
 354.532 ++
 354.533 ++#: locale/programs/ld-collate.c:3642
 354.534 ++#, c-format
 354.535 ++msgid "%s: cannot have `%s' as end of ellipsis range"
 354.536 ++msgstr "%s: `%s' nemô¾e by» koncovým znakom rozsahu pokraèovania"
 354.537 ++
 354.538 ++#: locale/programs/ld-collate.c:3308
 354.539 ++#, c-format
 354.540 ++msgid "%s: cannot reorder after %.*s: symbol not known"
 354.541 ++msgstr "%s: nie je mo¾né preradi» za %.*s: neznámy symbol"
 354.542 ++
 354.543 ++#: locale/programs/ld-ctype.c:2910 locale/programs/ld-ctype.c:2994
 354.544 ++#: locale/programs/ld-ctype.c:3014 locale/programs/ld-ctype.c:3035
 354.545 ++#: locale/programs/ld-ctype.c:3056 locale/programs/ld-ctype.c:3077
 354.546 ++#: locale/programs/ld-ctype.c:3098 locale/programs/ld-ctype.c:3138
 354.547 ++#: locale/programs/ld-ctype.c:3159 locale/programs/ld-ctype.c:3226
 354.548 ++#, c-format
 354.549 ++msgid "%s: character `%s' in charmap not representable with one byte"
 354.550 ++msgstr "%s: znak `%s' v znakovej mape nie je vyjadriteµný jedným bajtom"
 354.551 ++
 354.552 ++#: locale/programs/ld-ctype.c:3270 locale/programs/ld-ctype.c:3295
 354.553 + #, c-format
 354.554 +-msgid "%s: cannot get modification time"
 354.555 +-msgstr "%s: nie je mo¾né zisti» èas zmeny"
 354.556 ++msgid "%s: character `%s' needed as default value not representable with one byte"
 354.557 ++msgstr "%s: znak `%s' je potrebný ako prednastavená hodnota nevyjadriteµná jedným bajtom"
 354.558 + 
 354.559 +-#: timezone/zic.c:1900
 354.560 ++#: locale/programs/ld-ctype.c:2905
 354.561 ++#, c-format
 354.562 ++msgid "%s: character `%s' not defined in charmap while needed as default value"
 354.563 ++msgstr "%s: znak `%s' nie je definovaný v mape znakov a je potrebný ako implicitná hodnota"
 354.564 ++
 354.565 ++#: locale/programs/ld-ctype.c:2989 locale/programs/ld-ctype.c:3009
 354.566 ++#: locale/programs/ld-ctype.c:3051 locale/programs/ld-ctype.c:3072
 354.567 ++#: locale/programs/ld-ctype.c:3093 locale/programs/ld-ctype.c:3133
 354.568 ++#: locale/programs/ld-ctype.c:3154 locale/programs/ld-ctype.c:3221
 354.569 ++#: locale/programs/ld-ctype.c:3263 locale/programs/ld-ctype.c:3288
 354.570 ++#, c-format
 354.571 ++msgid "%s: character `%s' not defined while needed as default value"
 354.572 ++msgstr "%s: znak `%s' nie je definovaný a je potrebný ako implicitná hodnota"
 354.573 ++
 354.574 ++#: timezone/zic.c:1927
 354.575 + #, c-format
 354.576 + msgid "%s: command was '%s', result was %d\n"
 354.577 + msgstr "%s: príkaz bol '%s', výsledok bol %d\n"
 354.578 + 
 354.579 +-#: locale/programs/charmap.c:677 locale/programs/locfile.c:1008
 354.580 ++#: locale/programs/ld-time.c:225
 354.581 ++#, c-format
 354.582 ++msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'"
 354.583 ++msgstr "%s: príznak smeru v re»azci %Zd poµa `era' nie je '+' ani '-'"
 354.584 ++
 354.585 ++#: locale/programs/ld-time.c:237
 354.586 ++#, c-format
 354.587 ++msgid "%s: direction flag in string %Zd in `era' field is not a single character"
 354.588 ++msgstr "%s: príznak smeru v re»azci %Zd poµa `era' nie je jeden znak"
 354.589 ++
 354.590 ++#: locale/programs/ld-ctype.c:2727
 354.591 ++#, c-format
 354.592 ++msgid "%s: duplicate `default_missing' definition"
 354.593 ++msgstr "%s: duplicitná definícia `default_missing'"
 354.594 ++
 354.595 ++#: locale/programs/ld-identification.c:423
 354.596 ++#, c-format
 354.597 ++msgid "%s: duplicate category version definition"
 354.598 ++msgstr "%s: duplicitná definícia verzie kategórie"
 354.599 ++
 354.600 ++#: locale/programs/ld-collate.c:2711
 354.601 ++#, c-format
 354.602 ++msgid "%s: duplicate declaration of section `%s'"
 354.603 ++msgstr "%s: duplicitná deklarácia sekcie `%s'"
 354.604 ++
 354.605 ++#: locale/programs/ld-collate.c:2675
 354.606 ++#, c-format
 354.607 ++msgid "%s: duplicate definition of `%s'"
 354.608 ++msgstr "%s: duplicitná definícia `%s'"
 354.609 ++
 354.610 ++#: locale/programs/ld-collate.c:3691
 354.611 ++#, c-format
 354.612 ++msgid "%s: empty category description not allowed"
 354.613 ++msgstr "%s: prázdny popis kategórie nie je povolený"
 354.614 ++
 354.615 ++#: locale/programs/ld-collate.c:755
 354.616 ++#, c-format
 354.617 ++msgid "%s: empty weight string not allowed"
 354.618 ++msgstr "%s: prázdny re»azec váhy nie je povolený"
 354.619 ++
 354.620 ++#: locale/programs/charmap.c:831
 354.621 + #, c-format
 354.622 + msgid "%s: error in state machine"
 354.623 + msgstr "%s: chyba v stavovom automate"
 354.624 + 
 354.625 +-#: posix/getopt.c:784
 354.626 ++#: locale/programs/ld-ctype.c:2483
 354.627 ++#, c-format
 354.628 ++msgid "%s: field `%s' declared more than once"
 354.629 ++msgstr "%s: pole `%s' deklarované viac ako raz"
 354.630 ++
 354.631 ++#: locale/programs/ld-ctype.c:1525 locale/programs/ld-ctype.c:1650
 354.632 ++#: locale/programs/ld-ctype.c:1756 locale/programs/ld-ctype.c:2346
 354.633 ++#: locale/programs/ld-ctype.c:3329
 354.634 ++#, c-format
 354.635 ++msgid "%s: field `%s' does not contain exactly ten entries"
 354.636 ++msgstr "%s: pole `%s' neobsahuje presne desa» polo¾iek"
 354.637 ++
 354.638 ++#: locale/programs/ld-address.c:154 locale/programs/ld-address.c:205
 354.639 ++#: locale/programs/ld-address.c:230 locale/programs/ld-address.c:259
 354.640 ++#: locale/programs/ld-name.c:115 locale/programs/ld-telephone.c:117
 354.641 ++#, c-format
 354.642 ++msgid "%s: field `%s' must not be empty"
 354.643 ++msgstr "%s: pole `%s' nesmie by» prázdne"
 354.644 ++
 354.645 ++#: locale/programs/ld-address.c:142 locale/programs/ld-address.c:197
 354.646 ++#: locale/programs/ld-address.c:224 locale/programs/ld-address.c:284
 354.647 ++#: locale/programs/ld-address.c:303 locale/programs/ld-address.c:315
 354.648 ++#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:244
 354.649 ++#: locale/programs/ld-monetary.c:260 locale/programs/ld-name.c:104
 354.650 ++#: locale/programs/ld-numeric.c:113 locale/programs/ld-numeric.c:127
 354.651 ++#: locale/programs/ld-paper.c:101 locale/programs/ld-paper.c:109
 354.652 ++#: locale/programs/ld-telephone.c:105
 354.653 ++#, c-format
 354.654 ++msgid "%s: field `%s' not defined"
 354.655 ++msgstr "%s: pole `%s' nie je definované"
 354.656 ++
 354.657 ++#: locale/programs/ld-messages.c:115 locale/programs/ld-messages.c:148
 354.658 ++#, c-format
 354.659 ++msgid "%s: field `%s' undefined"
 354.660 ++msgstr "%s: pole `%s' nedefinované"
 354.661 ++
 354.662 ++#: locale/programs/ld-time.c:258
 354.663 ++#, c-format
 354.664 ++msgid "%s: garbage at end of offset value in string %Zd in `era' field"
 354.665 ++msgstr "%s: smetie za koncom hodnoty posunutia v re»azci %Zd poµa `era'"
 354.666 ++
 354.667 ++#: locale/programs/ld-time.c:318
 354.668 ++#, c-format
 354.669 ++msgid "%s: garbage at end of starting date in string %Zd in `era' field "
 354.670 ++msgstr "%s: smetie za koncom poèiatoèného dátumu v re»azci %Zd poµa `era' "
 354.671 ++
 354.672 ++#: locale/programs/ld-time.c:395
 354.673 ++#, c-format
 354.674 ++msgid "%s: garbage at end of stopping date in string %Zd in `era' field"
 354.675 ++msgstr "%s: smetie za koncom koncového dátumu v re»azci %Zd poµa `era'"
 354.676 ++
 354.677 ++#: posix/getopt.c:795
 354.678 + #, c-format
 354.679 + msgid "%s: illegal option -- %c\n"
 354.680 + msgstr "%s: neprípustná voµba -- %c\n"
 354.681 + 
 354.682 +-#: posix/getopt.c:787
 354.683 ++#: locale/programs/ld-address.c:573 locale/programs/ld-collate.c:3717
 354.684 ++#: locale/programs/ld-ctype.c:2844 locale/programs/ld-identification.c:437
 354.685 ++#: locale/programs/ld-measurement.c:229 locale/programs/ld-messages.c:324
 354.686 ++#: locale/programs/ld-monetary.c:932 locale/programs/ld-name.c:298
 354.687 ++#: locale/programs/ld-numeric.c:368 locale/programs/ld-paper.c:231
 354.688 ++#: locale/programs/ld-telephone.c:306 locale/programs/ld-time.c:1170
 354.689 ++#, c-format
 354.690 ++msgid "%s: incomplete `END' line"
 354.691 ++msgstr "%s: nekompletný riadok `END'"
 354.692 ++
 354.693 ++#: locale/programs/ld-address.c:166
 354.694 ++msgid "%s: invalid escape `%%%c' sequence in field `%s'"
 354.695 ++msgstr "%s: neprípustná escape `%%%x' sekvencia v poli `%s'"
 354.696 ++
 354.697 ++#: locale/programs/ld-name.c:127 locale/programs/ld-telephone.c:126
 354.698 ++#: locale/programs/ld-telephone.c:150
 354.699 ++#, c-format
 354.700 ++msgid "%s: invalid escape sequence in field `%s'"
 354.701 ++msgstr "%s: chybná escape-sekvencia v poli `%s'"
 354.702 ++
 354.703 ++#: locale/programs/ld-time.c:250
 354.704 ++#, c-format
 354.705 ++msgid "%s: invalid number for offset in string %Zd in `era' field"
 354.706 ++msgstr "%s: neprípustné èíslo pre posunutie v re»azci %Zd poµa `era'"
 354.707 ++
 354.708 ++#: locale/programs/ld-collate.c:3143
 354.709 ++#, c-format
 354.710 ++msgid "%s: invalid number of sorting rules"
 354.711 ++msgstr "%s: chybný poèet pravidiel triedenia"
 354.712 ++
 354.713 ++#: posix/getopt.c:798
 354.714 + #, c-format
 354.715 + msgid "%s: invalid option -- %c\n"
 354.716 + msgstr "%s: chybná voµba -- %c\n"
 354.717 + 
 354.718 +-#: posix/getopt.c:707
 354.719 ++#: locale/programs/ld-time.c:309
 354.720 ++#, c-format
 354.721 ++msgid "%s: invalid starting date in string %Zd in `era' field"
 354.722 ++msgstr "%s: neprípustný poèiatoèný dátum v re»azci %Zd poµa `era'"
 354.723 ++
 354.724 ++#: locale/programs/ld-time.c:386
 354.725 ++#, c-format
 354.726 ++msgid "%s: invalid stopping date in string %Zd in `era' field"
 354.727 ++msgstr "%s: neprípustný koncový dátum v re»azci %d poµa `era'"
 354.728 ++
 354.729 ++#: locale/programs/ld-measurement.c:112
 354.730 ++#, c-format
 354.731 ++msgid "%s: invalid value for field `%s'"
 354.732 ++msgstr "%s: neprípustná hodnota poµa `%s'"
 354.733 ++
 354.734 ++#: locale/programs/ld-address.c:242 locale/programs/ld-address.c:270
 354.735 ++#, c-format
 354.736 ++msgid "%s: language abbreviation `%s' not defined"
 354.737 ++msgstr "%s: skratka jazyka `%s' nie je definovaná"
 354.738 ++
 354.739 ++#: locale/programs/ld-collate.c:3223 locale/programs/ld-collate.c:3346
 354.740 ++#: locale/programs/ld-collate.c:3695
 354.741 ++#, c-format
 354.742 ++msgid "%s: missing `order_end' keyword"
 354.743 ++msgstr "%s: chýbajúce kµúèové slovo `order_end'"
 354.744 ++
 354.745 ++#: locale/programs/ld-collate.c:3360 locale/programs/ld-collate.c:3707
 354.746 ++#, c-format
 354.747 ++msgid "%s: missing `reorder-end' keyword"
 354.748 ++msgstr "%s: chýbajúce kµúèové slovo `reorder-end'"
 354.749 ++
 354.750 ++#: locale/programs/ld-collate.c:3710
 354.751 ++#, c-format
 354.752 ++msgid "%s: missing `reorder-sections-end' keyword"
 354.753 ++msgstr "%s: chýbajúce kµúèové slovo `reorder-sections-end'"
 354.754 ++
 354.755 ++#: locale/programs/ld-time.c:435
 354.756 ++#, c-format
 354.757 ++msgid "%s: missing era format in string %Zd in `era' field"
 354.758 ++msgstr "%s: chýba formát éry v re»azci %Zd v poli `era'"
 354.759 ++
 354.760 ++#: locale/programs/ld-time.c:423
 354.761 ++#, c-format
 354.762 ++msgid "%s: missing era name in string %Zd in `era' field"
 354.763 ++msgstr "%s: chýba meno éry v re»azci %Zd v poli `era'"
 354.764 ++
 354.765 ++#: locale/programs/ld-collate.c:3119
 354.766 ++#, c-format
 354.767 ++msgid "%s: multiple order definitions for section `%s'"
 354.768 ++msgstr "%s: viacnásobná definícia poradia pre sekciu `%s'"
 354.769 ++
 354.770 ++#: locale/programs/ld-collate.c:3169
 354.771 ++#, c-format
 354.772 ++msgid "%s: multiple order definitions for unnamed section"
 354.773 ++msgstr "%s: viacnásobná definícia poradia pre sekciu bez mena"
 354.774 ++
 354.775 ++#: locale/programs/ld-messages.c:137 locale/programs/ld-messages.c:170
 354.776 ++#, c-format
 354.777 ++msgid "%s: no correct regular expression for field `%s': %s"
 354.778 ++msgstr "%s: pre pole `%s' neexistuje korektný regulérny výraz: %s"
 354.779 ++
 354.780 ++#: locale/programs/ld-identification.c:169
 354.781 ++#, c-format
 354.782 ++msgid "%s: no identification for category `%s'"
 354.783 ++msgstr "%s: kategória `%s' nemá identifikáciu"
 354.784 ++
 354.785 ++#: locale/programs/ld-ctype.c:2753
 354.786 ++#, c-format
 354.787 ++msgid "%s: no representable `default_missing' definition found"
 354.788 ++msgstr "%s: nenájdená zobraziteµná definícia `default_missing'"
 354.789 ++
 354.790 ++#: locale/programs/ld-collate.c:591
 354.791 ++#, c-format
 354.792 ++msgid "%s: not enough sorting rules"
 354.793 ++msgstr "%s: nedostatoèný poèet pravidiel triedenia"
 354.794 ++
 354.795 ++#: locale/programs/ld-address.c:295
 354.796 ++#, c-format
 354.797 ++msgid "%s: numeric country code `%d' not valid"
 354.798 ++msgstr "%s: èíselný kód krajiny `%d' nie je platný"
 354.799 ++
 354.800 ++#: posix/getopt.c:718
 354.801 + #, c-format
 354.802 + msgid "%s: option `%c%s' doesn't allow an argument\n"
 354.803 + msgstr "%s: voµba `%c%s' nedovoµuje pou¾i» argument\n"
 354.804 + 
 354.805 +-#: posix/getopt.c:677
 354.806 ++#: posix/getopt.c:688
 354.807 + #, c-format
 354.808 + msgid "%s: option `%s' is ambiguous\n"
 354.809 + msgstr "%s: voµba `%s' nie je jednoznaèná\n"
 354.810 + 
 354.811 +-#: posix/getopt.c:725 posix/getopt.c:898
 354.812 ++#: posix/getopt.c:736 posix/getopt.c:909
 354.813 + #, c-format
 354.814 + msgid "%s: option `%s' requires an argument\n"
 354.815 + msgstr "%s: voµba `%s' vy¾aduje argument\n"
 354.816 + 
 354.817 +-#: posix/getopt.c:702
 354.818 ++#: posix/getopt.c:713
 354.819 + #, c-format
 354.820 + msgid "%s: option `--%s' doesn't allow an argument\n"
 354.821 + msgstr "%s: voµba `--%s' nedovoµuje pou¾i» argument\n"
 354.822 + 
 354.823 +-#: posix/getopt.c:882
 354.824 ++#: posix/getopt.c:893
 354.825 + #, c-format
 354.826 + msgid "%s: option `-W %s' doesn't allow an argument\n"
 354.827 + msgstr "%s: voµba `-W %s' nedovoµuje pou»i» argument\n"
 354.828 + 
 354.829 +-#: posix/getopt.c:864
 354.830 ++#: posix/getopt.c:875
 354.831 + #, c-format
 354.832 + msgid "%s: option `-W %s' is ambiguous\n"
 354.833 + msgstr "%s: voµba `-W %s' nie je jednoznaèná\n"
 354.834 + 
 354.835 +-#: posix/getopt.c:817 posix/getopt.c:947
 354.836 ++#: posix/getopt.c:828 posix/getopt.c:958
 354.837 + #, c-format
 354.838 + msgid "%s: option requires an argument -- %c\n"
 354.839 + msgstr "%s: voµba vy¾aduje argument -- %c\n"
 354.840 + 
 354.841 +-#: sunrpc/rpc_main.c:287
 354.842 ++#: locale/programs/ld-collate.c:1314 locale/programs/ld-collate.c:3654
 354.843 ++#, c-format
 354.844 ++msgid "%s: order for `%.*s' already defined at %s:%Zu"
 354.845 ++msgstr "%s: poradie pre `%.*s' je u¾ definované na %s:%Zu"
 354.846 ++
 354.847 ++#: locale/programs/ld-collate.c:3297
 354.848 ++#, c-format
 354.849 ++msgid "%s: order for collating element %.*s not yet defined"
 354.850 ++msgstr "%s: poradie pre element triedenia `%.*s' e¹te nebolo definované"
 354.851 ++
 354.852 ++#: locale/programs/ld-collate.c:3281
 354.853 ++#, c-format
 354.854 ++msgid "%s: order for collating symbol %.*s not yet defined"
 354.855 ++msgstr "%s: poradie pre symbol triedenia `%.*s' e¹te nebolo definované"
 354.856 ++
 354.857 ++#: sunrpc/rpc_main.c:289
 354.858 + #, c-format
 354.859 + msgid "%s: output would overwrite %s\n"
 354.860 + msgstr "%s: výstup by prepísal %s\n"
 354.861 + 
 354.862 +-#: timezone/zic.c:848 timezone/zic.c:1262 timezone/zic.c:1287
 354.863 ++#: timezone/zic.c:873 timezone/zic.c:1287 timezone/zic.c:1312
 354.864 + #, c-format
 354.865 + msgid "%s: panic: Invalid l_value %d\n"
 354.866 + msgstr "%s: fatálna chyba: Neprípustná l_hodnota %d\n"
 354.867 + 
 354.868 +-#: locale/programs/charmap.c:684 locale/programs/repertoire.c:289
 354.869 ++#: locale/programs/charmap.c:838 locale/programs/ld-address.c:592
 354.870 ++#: locale/programs/ld-collate.c:2590 locale/programs/ld-collate.c:3735
 354.871 ++#: locale/programs/ld-ctype.c:2107 locale/programs/ld-ctype.c:2864
 354.872 ++#: locale/programs/ld-identification.c:456
 354.873 ++#: locale/programs/ld-measurement.c:248 locale/programs/ld-messages.c:342
 354.874 ++#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:316
 354.875 ++#: locale/programs/ld-numeric.c:386 locale/programs/ld-paper.c:249
 354.876 ++#: locale/programs/ld-telephone.c:324 locale/programs/ld-time.c:1188
 354.877 ++#: locale/programs/locfile.h:103 locale/programs/repertoire.c:325
 354.878 + #, c-format
 354.879 + msgid "%s: premature end of file"
 354.880 + msgstr "%s: predèasný koniec súboru"
 354.881 + 
 354.882 +-#: sunrpc/rpc_main.c:294
 354.883 ++#: locale/programs/ld-collate.c:3394 locale/programs/ld-collate.c:3580
 354.884 ++#, c-format
 354.885 ++msgid "%s: section `%.*s' not known"
 354.886 ++msgstr "%s: neznáma sekcia `%.*s'"
 354.887 ++
 354.888 ++#: locale/programs/ld-time.c:337
 354.889 ++#, c-format
 354.890 ++msgid "%s: starting date is invalid in string %Zd in `era' field"
 354.891 ++msgstr "%s: neprípustný poèiatoèný dátum v re»azci %Zd v poli `era'"
 354.892 ++
 354.893 ++#: locale/programs/ld-time.c:414
 354.894 ++#, c-format
 354.895 ++msgid "%s: stopping date is invalid in string %Zd in `era' field"
 354.896 ++msgstr "%s: neprípustný koncový dátum v re»azci %d v poli `era'"
 354.897 ++
 354.898 ++#: locale/programs/ld-collate.c:1248
 354.899 ++#, c-format
 354.900 ++msgid "%s: symbolic range ellipsis must not be direct followed by `order_end'"
 354.901 ++msgstr "%s: pokraèovanie symbolického rozsahu nesmie by» priamo nasledované `order_end'"
 354.902 ++
 354.903 ++#: locale/programs/ld-collate.c:1244
 354.904 ++#, c-format
 354.905 ++msgid "%s: symbolic range ellipsis must not directly follow `order_start'"
 354.906 ++msgstr "%s: pokraèovanie symbolického rozsahu nesmie priamo nasledo» `order_start'"
 354.907 ++
 354.908 ++#: locale/programs/ld-address.c:583 locale/programs/ld-collate.c:518
 354.909 ++#: locale/programs/ld-collate.c:570 locale/programs/ld-collate.c:865
 354.910 ++#: locale/programs/ld-collate.c:878 locale/programs/ld-collate.c:2581
 354.911 ++#: locale/programs/ld-collate.c:3726 locale/programs/ld-ctype.c:1840
 354.912 ++#: locale/programs/ld-ctype.c:2098 locale/programs/ld-ctype.c:2673
 354.913 ++#: locale/programs/ld-ctype.c:2855 locale/programs/ld-identification.c:447
 354.914 ++#: locale/programs/ld-measurement.c:239 locale/programs/ld-messages.c:333
 354.915 ++#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:307
 354.916 ++#: locale/programs/ld-numeric.c:377 locale/programs/ld-paper.c:240
 354.917 ++#: locale/programs/ld-telephone.c:315 locale/programs/ld-time.c:1179
 354.918 ++#, c-format
 354.919 ++msgid "%s: syntax error"
 354.920 ++msgstr "%s: chyba syntaxe"
 354.921 ++
 354.922 ++#: locale/programs/ld-ctype.c:2178
 354.923 ++#, c-format
 354.924 ++msgid "%s: syntax error in definition of new character class"
 354.925 ++msgstr "%s: chyba syntaxe v definícii novej triedy znakov"
 354.926 ++
 354.927 ++#: locale/programs/ld-ctype.c:2193
 354.928 ++#, c-format
 354.929 ++msgid "%s: syntax error in definition of new character map"
 354.930 ++msgstr "%s: chyba syntaxe v definícii novej znakovej mapy"
 354.931 ++
 354.932 ++#: locale/programs/ld-ctype.c:3735
 354.933 ++#, c-format
 354.934 ++msgid "%s: table for class \"%s\": %lu bytes\n"
 354.935 ++msgstr "%s: tabuµka triedy \"%s\": %lu bajtov\n"
 354.936 ++
 354.937 ++#: locale/programs/ld-ctype.c:3803
 354.938 ++#, c-format
 354.939 ++msgid "%s: table for map \"%s\": %lu bytes\n"
 354.940 ++msgstr "%s: tabuµka mapy \"%s\": %lu bajtov\n"
 354.941 ++
 354.942 ++#: locale/programs/ld-ctype.c:3935
 354.943 ++#, c-format
 354.944 ++msgid "%s: table for width: %lu bytes\n"
 354.945 ++msgstr "%s: tabuµka ¹írky: %lu bajtov\n"
 354.946 ++
 354.947 ++#: locale/programs/ld-address.c:216
 354.948 ++#, c-format
 354.949 ++msgid "%s: terminology language code `%s' not defined"
 354.950 ++msgstr "%s: kód jazyka terminológie `%s' nie je definovaný"
 354.951 ++
 354.952 ++#: locale/programs/ld-collate.c:1054
 354.953 ++#, c-format
 354.954 ++msgid "%s: the start and the end symbol of a range must stand for characters"
 354.955 ++msgstr "%s: poèiatoèný a koncový symbol rozsahu musia zastupova» znaky"
 354.956 ++
 354.957 ++#: locale/programs/ld-time.c:464
 354.958 ++#, c-format
 354.959 ++msgid "%s: third operand for value of field `%s' must not be larger than %d"
 354.960 ++msgstr "%s: tretí operand hodnoty poµa `%s' nesmie by» väè¹í ako %d"
 354.961 ++
 354.962 ++#: locale/programs/ld-collate.c:555
 354.963 ++#, c-format
 354.964 ++msgid "%s: too many rules; first entry only had %d"
 354.965 ++msgstr "%s: priveµa pravidiel; prvý záznam mal iba %d"
 354.966 ++
 354.967 ++#: locale/programs/ld-collate.c:906
 354.968 ++#, c-format
 354.969 ++msgid "%s: too many values"
 354.970 ++msgstr "%s: priveµa hodnôt"
 354.971 ++
 354.972 ++#: locale/programs/ld-ctype.c:3639
 354.973 ++#, c-format
 354.974 ++msgid "%s: transliteration data from locale `%s' not available"
 354.975 ++msgstr "%s: transliteraèné údaje prostredia `%s' nie sú dostupné"
 354.976 ++
 354.977 ++#: sunrpc/rpc_main.c:296
 354.978 ++#, c-format
 354.979 ++msgid "%s: unable to open %s: %m\n"
 354.980 ++msgstr "%s: nie je mo¾né otvori» %s: %m\n"
 354.981 ++
 354.982 ++#: locale/programs/ld-collate.c:2849
 354.983 ++#, c-format
 354.984 ++msgid "%s: unknown character in collating symbol name"
 354.985 ++msgstr "%s: neznámy znak v názve symbolu triedenia"
 354.986 ++
 354.987 ++#: locale/programs/ld-collate.c:2981
 354.988 ++#, c-format
 354.989 ++msgid "%s: unknown character in equivalent definition name"
 354.990 ++msgstr "%s: neznámy znak v názve ekvivalentnej definície"
 354.991 ++
 354.992 ++#: locale/programs/ld-collate.c:2994
 354.993 ++#, c-format
 354.994 ++msgid "%s: unknown character in equivalent definition value"
 354.995 ++msgstr "%s: neznámy znak v hodnote ekvivalentnej definície"
 354.996 ++
 354.997 ++#: locale/programs/ld-time.c:1040
 354.998 ++#, c-format
 354.999 ++msgid "%s: unknown character in field `%s'"
354.1000 ++msgstr "%s: neznámy znak v poli `%s'"
354.1001 ++
354.1002 ++#: locale/programs/ld-collate.c:3091
354.1003 ++#, c-format
354.1004 ++msgid "%s: unknown section name `%s'"
354.1005 ++msgstr "%s: neznámy názov sekcie `%s'"
354.1006 ++
354.1007 ++#: locale/programs/ld-collate.c:3004
354.1008 + #, c-format
354.1009 +-msgid "%s: unable to open "
354.1010 +-msgstr "%s: Nie je mo¾né otvori» "
354.1011 ++msgid "%s: unknown symbol `%s' in equivalent definition"
354.1012 ++msgstr "%s: neznámy symbol `%s' v ekvivalentnej definícii"
354.1013 + 
354.1014 +-#: posix/getopt.c:758
354.1015 ++#: posix/getopt.c:769
354.1016 + #, c-format
354.1017 + msgid "%s: unrecognized option `%c%s'\n"
354.1018 + msgstr "%s: nerozpoznaná voµba `%c%s'\n"
354.1019 + 
354.1020 +-#: posix/getopt.c:754
354.1021 ++#: posix/getopt.c:765
354.1022 + #, c-format
354.1023 + msgid "%s: unrecognized option `--%s'\n"
354.1024 + msgstr "%s: nerozpoznaná voµba `--%s'\n"
354.1025 +@@ -458,35 +947,75 @@
354.1026 + #: timezone/zic.c:443
354.1027 + #, c-format
354.1028 + msgid ""
354.1029 +-"%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] [ -d directory ]\n"
354.1030 +-"\t[ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"
354.1031 ++"%s: usage is %s [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n"
354.1032 ++"\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"
354.1033 + msgstr ""
354.1034 +-"%s: Pou¾itie: %s [ -s ] [ -v ] [ -l lokálny_èas ] [ -p posix_pravidlá ]\n"
354.1035 ++"%s: Pou¾itie: %s [ -s ] [ -v ] [ -l lokálny_èas ] [ -p posix_pravidlá ] \\\n"
354.1036 + "\t[ -d adresár ] [ -L priestupné_sekundy ] [ -y typ_roku ] [ súbor ... ]\n"
354.1037 + 
354.1038 +-#: timezone/zdump.c:174
354.1039 ++#: timezone/zdump.c:175
354.1040 + #, c-format
354.1041 + msgid "%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n"
354.1042 + msgstr "%s: Pou¾itie: %s [ -v ] [ -c limit ] meno_zóny ...\n"
354.1043 + 
354.1044 +-#: sunrpc/rpc_main.c:307
354.1045 ++#: locale/programs/ld-messages.c:121 locale/programs/ld-messages.c:154
354.1046 ++#, c-format
354.1047 ++msgid "%s: value for field `%s' must not be an empty string"
354.1048 ++msgstr "%s: hodnota poµa `%s' nesmie by» prázdny re»azec"
354.1049 ++
354.1050 ++#: locale/programs/ld-monetary.c:250 locale/programs/ld-numeric.c:119
354.1051 ++#, c-format
354.1052 ++msgid "%s: value for field `%s' must not be the empty string"
354.1053 ++msgstr "%s: hodnota poµa `%s' nesmie by» prázdny re»azec"
354.1054 ++
354.1055 ++#: locale/programs/ld-monetary.c:232
354.1056 ++#, c-format
354.1057 ++msgid "%s: value of field `int_curr_symbol' does not correspond to a valid name in ISO 4217"
354.1058 ++msgstr "%s: hodnota poµa `int_curr_symbol' nezodpovedá platnému názvu v ISO 4217"
354.1059 ++
354.1060 ++#: locale/programs/ld-monetary.c:224
354.1061 ++#, c-format
354.1062 ++msgid "%s: value of field `int_curr_symbol' has wrong length"
354.1063 ++msgstr "%s: hodnota poµa `int_curr_symbol' má chybnú då¾ku"
354.1064 ++
354.1065 ++#: locale/programs/ld-monetary.c:857 locale/programs/ld-numeric.c:334
354.1066 ++#, c-format
354.1067 ++msgid "%s: values for field `%s' must be smaller than 127"
354.1068 ++msgstr "%s: hodnoty poµa `%s' musia by» men¹ie ako 127"
354.1069 ++
354.1070 ++#: locale/programs/ld-time.c:488
354.1071 ++#, c-format
354.1072 ++msgid "%s: values for field `%s' must not be larger than %d"
354.1073 ++msgstr "%s: hodnoty poµa `%s' nesmú by» väè¹ie ako %d"
354.1074 ++
354.1075 ++#: locale/programs/ld-time.c:472 locale/programs/ld-time.c:480
354.1076 ++#, c-format
354.1077 ++msgid "%s: values of field `%s' must not be larger than %d"
354.1078 ++msgstr "%s: hodnoty poµa `%s' nesmú by» väè¹ie ako %d"
354.1079 ++
354.1080 ++#: locale/programs/ld-collate.c:850
354.1081 + #, c-format
354.1082 +-msgid "%s: while writing output: "
354.1083 +-msgstr "%s: poèas zápisu výstupu: "
354.1084 ++msgid "%s: weights must use the same ellipsis symbol as the name"
354.1085 ++msgstr "%s: váhy musia ako názov pou¾i» rovnaký symbol pokraèovania"
354.1086 + 
354.1087 +-#: argp/argp-parse.c:164
354.1088 ++#: sunrpc/rpc_main.c:308
354.1089 ++#, c-format
354.1090 ++msgid "%s: while writing output %s: %m"
354.1091 ++msgstr "%s: poèas zápisu výstupu %s: %m"
354.1092 ++
354.1093 ++#: argp/argp-parse.c:170
354.1094 + msgid "(PROGRAM ERROR) No version known!?"
354.1095 + msgstr "(CHYBA PROGRAMU) Verzia neznáma!?"
354.1096 + 
354.1097 +-#: argp/argp-parse.c:781
354.1098 ++#: argp/argp-parse.c:787
354.1099 + msgid "(PROGRAM ERROR) Option should have been recognized!?"
354.1100 + msgstr "(CHYBA PROGRAMU) Voµba by mala by» rozpoznaná!?"
354.1101 + 
354.1102 +-#: nis/nis_print.c:129
354.1103 ++#: nis/nis_print.c:130
354.1104 + msgid "(Unknown object)\n"
354.1105 + msgstr "(Neznámy objekt)\n"
354.1106 + 
354.1107 +-#: sunrpc/clnt_perr.c:124
354.1108 ++#: sunrpc/clnt_perr.c:125
354.1109 + #, c-format
354.1110 + msgid "(unknown authentication error - %d)"
354.1111 + msgstr "(neznáma chyba pri overovaní toto¾nosti - %d)"
354.1112 +@@ -495,16 +1024,16 @@
354.1113 + msgid "(unknown)"
354.1114 + msgstr "(neznámy)"
354.1115 + 
354.1116 +-#: elf/sprof.c:574
354.1117 ++#: elf/sprof.c:570
354.1118 + #, c-format
354.1119 + msgid "*** The file `%s' is stripped: no detailed analysis possible\n"
354.1120 + msgstr "*** Zo súboru `%s' boli odstránené ladiace informácie: podrobná analýza nie je mo¾ná\n"
354.1121 + 
354.1122 +-#: catgets/gencat.c:266
354.1123 ++#: catgets/gencat.c:282
354.1124 + msgid "*standard input*"
354.1125 + msgstr "*¹tandardný vstup*"
354.1126 + 
354.1127 +-#: catgets/gencat.c:120
354.1128 ++#: catgets/gencat.c:125
354.1129 + msgid ""
354.1130 + "-o OUTPUT-FILE [INPUT-FILE]...\n"
354.1131 + "[OUTPUT-FILE [INPUT-FILE]...]"
354.1132 +@@ -512,30 +1041,36 @@
354.1133 + "-o VÝSTUPNÝ_SÚBOR [VSTUPNÝ_SÚBOR]...\n"
354.1134 + "[ VÝSTUPNÝ_SÚBOR [VSTUPNÝ_SÚBOR]...]"
354.1135 + 
354.1136 +-#: stdio-common/../sysdeps/gnu/errlist.c:778
354.1137 ++#: stdio-common/../sysdeps/gnu/errlist.c:797
354.1138 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:115
354.1139 + msgid ".lib section in a.out corrupted"
354.1140 + msgstr "Po¹kodená sekcia .lib v a.out"
354.1141 + 
354.1142 +-#: sunrpc/clnt_perr.c:110 sunrpc/clnt_perr.c:131
354.1143 ++#: sunrpc/clnt_perr.c:111 sunrpc/clnt_perr.c:132
354.1144 + #, c-format
354.1145 + msgid "; low version = %lu, high version = %lu"
354.1146 + msgstr "; ni¾¹ia verzia = %lu, vy¹¹ia verzia = %lu"
354.1147 + 
354.1148 +-#: sunrpc/clnt_perr.c:117
354.1149 ++#: sunrpc/clnt_perr.c:118
354.1150 + msgid "; why = "
354.1151 + msgstr "; dôvod = "
354.1152 + 
354.1153 +-#: locale/programs/charset.c:98
354.1154 ++#: locale/programs/charmap.c:999
354.1155 + #, c-format
354.1156 + msgid "<%s> and <%s> are illegal names for range"
354.1157 + msgstr "<%s> and <%s> sú neprípustné názvy pre rozsah"
354.1158 + 
354.1159 +-#: locale/programs/ld-ctype.c:342
354.1160 ++#: locale/programs/repertoire.c:448
354.1161 ++#, c-format
354.1162 ++msgid "<%s> and <%s> are invalid names for range"
354.1163 ++msgstr "<%s> a <%s> sú neprípustné názvy pre rozsah"
354.1164 ++
354.1165 ++#: locale/programs/ld-ctype.c:565 locale/programs/ld-ctype.c:600
354.1166 + #, c-format
354.1167 + msgid "<SP> character must not be in class `%s'"
354.1168 + msgstr "<SP> znak nesmie by» v triede `%s'"
354.1169 + 
354.1170 +-#: locale/programs/ld-ctype.c:330
354.1171 ++#: locale/programs/ld-ctype.c:553 locale/programs/ld-ctype.c:589
354.1172 + #, c-format
354.1173 + msgid "<SP> character not in class `%s'"
354.1174 + msgstr "<SP> znak nie je v triede `%s'"
354.1175 +@@ -543,102 +1078,149 @@
354.1176 + #. TRANS The experienced user will know what is wrong.
354.1177 + #. TRANS @c This error code is a joke.  Its perror text is part of the joke.
354.1178 + #. TRANS @c Don't change it.
354.1179 +-#: stdio-common/../sysdeps/gnu/errlist.c:603
354.1180 ++#: stdio-common/../sysdeps/gnu/errlist.c:622
354.1181 + msgid "?"
354.1182 + msgstr "?"
354.1183 + 
354.1184 +-#: sysdeps/unix/sysv/linux/siglist.h:27
354.1185 ++#: sysdeps/generic/siglist.h:34
354.1186 + msgid "Aborted"
354.1187 + msgstr "Zru¹ené"
354.1188 + 
354.1189 +-#: nis/nis_print.c:318
354.1190 ++#: nis/nis_print.c:321
354.1191 + msgid "Access Rights : "
354.1192 + msgstr "Prístupové práva : "
354.1193 + 
354.1194 +-#: stdio-common/../sysdeps/gnu/errlist.c:774
354.1195 ++#: stdio-common/../sysdeps/gnu/errlist.c:793
354.1196 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:114
354.1197 + msgid "Accessing a corrupted shared library"
354.1198 + msgstr "Prístup k po¹kodenej zdieµanej kni¾nici"
354.1199 + 
354.1200 + #. TRANS The requested socket address is already in use.  @xref{Socket Addresses}.
354.1201 +-#: stdio-common/../sysdeps/gnu/errlist.c:366
354.1202 ++#: stdio-common/../sysdeps/gnu/errlist.c:367
354.1203 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:155
354.1204 + msgid "Address already in use"
354.1205 + msgstr "Adresa je pou¾ívaná"
354.1206 + 
354.1207 +-#: posix/../sysdeps/posix/gai_strerror.c:30
354.1208 ++#: posix/../sysdeps/posix/gai_strerror.c:31
354.1209 + msgid "Address family for hostname not supported"
354.1210 + msgstr "Trieda adries nie je podporovaná poèítaèom"
354.1211 + 
354.1212 + #. TRANS The address family specified for a socket is not supported; it is
354.1213 + #. TRANS inconsistent with the protocol being used on the socket.  @xref{Sockets}.
354.1214 +-#: stdio-common/../sysdeps/gnu/errlist.c:361
354.1215 ++#: stdio-common/../sysdeps/gnu/errlist.c:362
354.1216 + msgid "Address family not supported by protocol"
354.1217 + msgstr "Trieda adries nie je podporovaná protokolom"
354.1218 + 
354.1219 +-#: stdio-common/../sysdeps/gnu/errlist.c:742
354.1220 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:154
354.1221 ++msgid "Address family not supported by protocol family"
354.1222 ++msgstr "Trieda adries nie je podporovaná rodinou protokolov"
354.1223 ++
354.1224 ++#: stdio-common/../sysdeps/gnu/errlist.c:761
354.1225 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:98
354.1226 + msgid "Advertise error"
354.1227 + msgstr "Chyba pri zverejnení"
354.1228 + 
354.1229 +-#: stdio-common/../sysdeps/unix/siglist.c:39
354.1230 +-#: sysdeps/unix/sysv/linux/siglist.h:33
354.1231 ++#: stdio-common/../sysdeps/unix/siglist.c:40 sysdeps/generic/siglist.h:40
354.1232 + msgid "Alarm clock"
354.1233 + msgstr "Budík"
354.1234 + 
354.1235 ++#: malloc/memusagestat.c:57
354.1236 ++msgid "Also draw graph for total memory consumption"
354.1237 ++msgstr "Vykreslí aj graf celkovej spotreby pamäti"
354.1238 ++
354.1239 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:83
354.1240 ++msgid "Anode table overflow"
354.1241 ++msgstr "Preteèenie tabuµky anode"
354.1242 ++
354.1243 ++#: intl/tst-gettext2.c:37
354.1244 ++msgid "Another string for testing."
354.1245 ++msgstr "Iný re»azec pre testovanie."
354.1246 ++
354.1247 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:37
354.1248 ++msgid "Arg list too long"
354.1249 ++msgstr "Príli¹ dlhý zoznam argumentov"
354.1250 ++
354.1251 + #. TRANS Argument list too long; used when the arguments passed to a new program
354.1252 + #. TRANS being executed with one of the @code{exec} functions (@pxref{Executing a
354.1253 + #. TRANS File}) occupy too much memory space.  This condition never arises in the
354.1254 + #. TRANS GNU system.
354.1255 +-#: stdio-common/../sysdeps/gnu/errlist.c:69
354.1256 ++#: stdio-common/../sysdeps/gnu/errlist.c:70
354.1257 + msgid "Argument list too long"
354.1258 + msgstr "Príli¹ dlhý zoznam argumentov"
354.1259 + 
354.1260 +-#: nis/nis_error.c:65
354.1261 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:63
354.1262 ++msgid "Argument out of domain"
354.1263 ++msgstr "Argument mimo domény"
354.1264 ++
354.1265 ++#: nis/nis_error.c:66
354.1266 + msgid "Attempt to remove a non-empty table"
354.1267 + msgstr "Pokus o odstránenie neprázdnej tabuµky"
354.1268 + 
354.1269 +-#: stdio-common/../sysdeps/gnu/errlist.c:782
354.1270 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:116
354.1271 ++msgid "Attempting to link in more shared libraries than system limit"
354.1272 ++msgstr "Pokus o pou¾itie viac zdieµaných kni¾níc, ako je systémový limit"
354.1273 ++
354.1274 ++#: stdio-common/../sysdeps/gnu/errlist.c:801
354.1275 + msgid "Attempting to link in too many shared libraries"
354.1276 + msgstr "Pokus o pou¾itie priveµa zdieµaných kni¾níc"
354.1277 + 
354.1278 +-#: sunrpc/clnt_perr.c:273
354.1279 ++#: sunrpc/clnt_perr.c:329
354.1280 + msgid "Authentication OK"
354.1281 + msgstr "Overenie práv úspe¹né"
354.1282 + 
354.1283 + #. TRANS ???
354.1284 +-#: stdio-common/../sysdeps/gnu/errlist.c:561
354.1285 ++#: stdio-common/../sysdeps/gnu/errlist.c:562
354.1286 + msgid "Authentication error"
354.1287 + msgstr "Overenie práv neúspe¹né"
354.1288 + 
354.1289 +-#: nis/nis_print.c:105
354.1290 ++#: nis/nis_print.c:106
354.1291 + msgid "BOGUS OBJECT\n"
354.1292 + msgstr "POCHYBNÝ OBJEKT\n"
354.1293 + 
354.1294 + #. TRANS Bad address; an invalid pointer was detected.
354.1295 + #. TRANS In the GNU system, this error never happens; you get a signal instead.
354.1296 +-#: stdio-common/../sysdeps/gnu/errlist.c:114
354.1297 ++#: stdio-common/../sysdeps/gnu/errlist.c:115
354.1298 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:44
354.1299 + msgid "Bad address"
354.1300 + msgstr "Chybná adresa"
354.1301 + 
354.1302 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:80
354.1303 ++msgid "Bad exchange descriptor"
354.1304 ++msgstr "Chybný exchange deskriptor"
354.1305 ++
354.1306 + #. TRANS Bad file descriptor; for example, I/O on a descriptor that has been
354.1307 + #. TRANS closed or reading from a descriptor open only for writing (or vice
354.1308 + #. TRANS versa).
354.1309 +-#: stdio-common/../sysdeps/gnu/errlist.c:82
354.1310 ++#: stdio-common/../sysdeps/gnu/errlist.c:83
354.1311 + msgid "Bad file descriptor"
354.1312 + msgstr "Chybný deskriptor súboru"
354.1313 + 
354.1314 +-#: stdio-common/../sysdeps/gnu/errlist.c:730
354.1315 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:39
354.1316 ++msgid "Bad file number"
354.1317 ++msgstr "Chybné èíslo súboru"
354.1318 ++
354.1319 ++#: stdio-common/../sysdeps/gnu/errlist.c:749
354.1320 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:87
354.1321 + msgid "Bad font file format"
354.1322 + msgstr "Chybný formát súboru rezov písma"
354.1323 + 
354.1324 +-#: stdio-common/../sysdeps/gnu/errlist.c:622
354.1325 ++#: stdio-common/../sysdeps/gnu/errlist.c:641
354.1326 + msgid "Bad message"
354.1327 + msgstr "Chybná správa"
354.1328 + 
354.1329 +-#: stdio-common/../sysdeps/unix/siglist.c:37
354.1330 +-#: sysdeps/unix/sysv/linux/siglist.h:56
354.1331 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:84
354.1332 ++msgid "Bad request code"
354.1333 ++msgstr "Neprípustný kód ¾iadosti"
354.1334 ++
354.1335 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:81
354.1336 ++msgid "Bad request descriptor"
354.1337 ++msgstr "Neprípustný deskriptor ¾iadosti"
354.1338 ++
354.1339 ++#: stdio-common/../sysdeps/unix/siglist.c:38 sysdeps/generic/siglist.h:63
354.1340 + msgid "Bad system call"
354.1341 + msgstr "Chybné volanie systému"
354.1342 + 
354.1343 +-#: posix/../sysdeps/posix/gai_strerror.c:32
354.1344 ++#: posix/../sysdeps/posix/gai_strerror.c:33
354.1345 + msgid "Bad value for ai_flags"
354.1346 + msgstr "Chybná hodnota ai_flags"
354.1347 + 
354.1348 +@@ -646,18 +1228,19 @@
354.1349 + msgid "Be strictly POSIX conform"
354.1350 + msgstr "Presný súlad s POSIX"
354.1351 + 
354.1352 +-#: nis/nis_print.c:301
354.1353 ++#: nis/nis_print.c:302
354.1354 + msgid "Binary data\n"
354.1355 + msgstr "Binárne údaje\n"
354.1356 + 
354.1357 + #. TRANS A file that isn't a block special file was given in a situation that
354.1358 + #. TRANS requires one.  For example, trying to mount an ordinary file as a file
354.1359 + #. TRANS system in Unix gives this error.
354.1360 +-#: stdio-common/../sysdeps/gnu/errlist.c:121
354.1361 ++#: stdio-common/../sysdeps/gnu/errlist.c:122
354.1362 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:45
354.1363 + msgid "Block device required"
354.1364 + msgstr "Vy¾adované blokové zariadenie"
354.1365 + 
354.1366 +-#: sunrpc/pmap_rmt.c:347
354.1367 ++#: sunrpc/pmap_rmt.c:348
354.1368 + msgid "Broadcast poll problem"
354.1369 + msgstr "Problém pri volaní poll pre v¹eobecné vysielanie"
354.1370 + 
354.1371 +@@ -666,135 +1249,223 @@
354.1372 + #. TRANS @code{SIGPIPE} signal; this signal terminates the program if not handled
354.1373 + #. TRANS or blocked.  Thus, your program will never actually see @code{EPIPE}
354.1374 + #. TRANS unless it has handled or blocked @code{SIGPIPE}.
354.1375 +-#: stdio-common/../sysdeps/gnu/errlist.c:234
354.1376 +-#: stdio-common/../sysdeps/unix/siglist.c:38
354.1377 +-#: sysdeps/unix/sysv/linux/siglist.h:32
354.1378 ++#: stdio-common/../sysdeps/gnu/errlist.c:235
354.1379 ++#: stdio-common/../sysdeps/unix/siglist.c:39
354.1380 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:62
354.1381 ++#: sysdeps/generic/siglist.h:39
354.1382 + msgid "Broken pipe"
354.1383 + msgstr "Preru¹ená rúra"
354.1384 + 
354.1385 +-#: stdio-common/../sysdeps/unix/siglist.c:35
354.1386 +-#: sysdeps/unix/sysv/linux/siglist.h:30
354.1387 ++#: stdio-common/../sysdeps/unix/siglist.c:36 sysdeps/generic/siglist.h:37
354.1388 + msgid "Bus error"
354.1389 + msgstr "Chyba na zbernici"
354.1390 + 
354.1391 +-#: nis/nis_print.c:45
354.1392 ++#: nis/nis_print.c:46
354.1393 + msgid "CDS"
354.1394 + msgstr "CDS"
354.1395 + 
354.1396 +-#: stdio-common/../sysdeps/unix/siglist.c:49
354.1397 +-#: sysdeps/unix/sysv/linux/siglist.h:43
354.1398 ++#: stdio-common/../sysdeps/unix/siglist.c:50 sysdeps/generic/siglist.h:50
354.1399 + msgid "CPU time limit exceeded"
354.1400 + msgstr "Prekroèený èasový limit pre procesor"
354.1401 + 
354.1402 +-#: nis/nis_error.c:32
354.1403 ++#: nis/nis_error.c:33
354.1404 + msgid "Cache expired"
354.1405 + msgstr "®ivotnos» cache vypr¹ala"
354.1406 + 
354.1407 +-#: stdio-common/../sysdeps/gnu/errlist.c:770
354.1408 ++#: stdio-common/../sysdeps/gnu/errlist.c:789
354.1409 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:113
354.1410 + msgid "Can not access a needed shared library"
354.1411 + msgstr "Prístup k potrebnej zdieµanej kni¾nici nie je mo¾ný"
354.1412 + 
354.1413 +-#: nis/ypclnt.c:769
354.1414 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:117
354.1415 ++msgid "Can not exec a shared library directly"
354.1416 ++msgstr "Nie je mo¾né priamo spusti» zdieµanú kni¾nicu"
354.1417 ++
354.1418 ++#: nis/ypclnt.c:792
354.1419 + msgid "Can't bind to server which serves this domain"
354.1420 + msgstr "Pripojenie k serveru obsluhujúcemu túto doménu nie je mo¾né"
354.1421 + 
354.1422 +-#: nis/ypclnt.c:781
354.1423 ++#: elf/ldconfig.c:934
354.1424 ++msgid "Can't chdir to /"
354.1425 ++msgstr "Nie je mo¾né zmeni» adresár na /"
354.1426 ++
354.1427 ++#: nis/ypclnt.c:804
354.1428 + msgid "Can't communicate with portmapper"
354.1429 + msgstr "Komunikácia s portmapperom nie je mo¾ná"
354.1430 + 
354.1431 +-#: nis/ypclnt.c:783
354.1432 ++#: nis/ypclnt.c:806
354.1433 + msgid "Can't communicate with ypbind"
354.1434 + msgstr "Komunikácia s ypbind nie je mo¾ná"
354.1435 + 
354.1436 +-#: nis/ypclnt.c:785
354.1437 ++#: nis/ypclnt.c:808
354.1438 + msgid "Can't communicate with ypserv"
354.1439 + msgstr "Komunikácia s ypserv nie je mo¾ná"
354.1440 + 
354.1441 ++#: elf/cache.c:359
354.1442 ++#, c-format
354.1443 ++msgid "Can't create temporary cache file %s"
354.1444 ++msgstr "Nie je mo¾né vytvori» doèasný cache súbor %s"
354.1445 ++
354.1446 ++#: elf/ldconfig.c:502
354.1447 ++#, c-format
354.1448 ++msgid "Can't find %s"
354.1449 ++msgstr "Nie je mo¾né nájs» %s"
354.1450 ++
354.1451 ++#: elf/ldconfig.c:440
354.1452 ++#, c-format
354.1453 ++msgid "Can't link %s to %s"
354.1454 ++msgstr "Nie je mo¾né vytvori» odkaz %s na %s"
354.1455 ++
354.1456 ++#: elf/ldconfig.c:518 elf/ldconfig.c:672
354.1457 ++#, c-format
354.1458 ++msgid "Can't lstat %s"
354.1459 ++msgstr "Zlyhal lstat %s"
354.1460 ++
354.1461 ++#: elf/cache.c:108 elf/ldconfig.c:955
354.1462 ++#, c-format
354.1463 ++msgid "Can't open cache file %s\n"
354.1464 ++msgstr "Nie je mo¾né otvori» cache súbor %s\n"
354.1465 ++
354.1466 ++#: elf/ldconfig.c:976
354.1467 ++#, c-format
354.1468 ++msgid "Can't open cache file directory %s\n"
354.1469 ++msgstr "Nie je mo¾né otvori» adresár cache súboru %s\n"
354.1470 ++
354.1471 ++#: elf/ldconfig.c:865
354.1472 ++#, c-format
354.1473 ++msgid "Can't open configuration file %s"
354.1474 ++msgstr "Nie je mo¾né otvori» konfiguraèný súbor %s"
354.1475 ++
354.1476 ++#: elf/ldconfig.c:621
354.1477 ++#, c-format
354.1478 ++msgid "Can't open directory %s"
354.1479 ++msgstr "Nie je mo¾né otvori» adresár %s"
354.1480 ++
354.1481 ++#: elf/cache.c:353
354.1482 ++#, c-format
354.1483 ++msgid "Can't remove old temporary cache file %s"
354.1484 ++msgstr "Nie je mo¾né zmaza» doèasný cache súbor %s"
354.1485 ++
354.1486 ++#: elf/ldconfig.c:405
354.1487 ++#, c-format
354.1488 ++msgid "Can't stat %s\n"
354.1489 ++msgstr "Zlyhal stat %s\n"
354.1490 ++
354.1491 ++#: elf/ldconfig.c:434
354.1492 ++#, c-format
354.1493 ++msgid "Can't unlink %s"
354.1494 ++msgstr "Nie je mo¾né odstráni» %s"
354.1495 ++
354.1496 + #. TRANS No memory available.  The system cannot allocate more virtual memory
354.1497 + #. TRANS because its capacity is full.
354.1498 +-#: stdio-common/../sysdeps/gnu/errlist.c:103
354.1499 ++#: stdio-common/../sysdeps/gnu/errlist.c:104
354.1500 + msgid "Cannot allocate memory"
354.1501 + msgstr "Nie je mo¾né prideli» pamä»"
354.1502 + 
354.1503 + #. TRANS The requested socket address is not available; for example, you tried
354.1504 + #. TRANS to give a socket a name that doesn't match the local host name.
354.1505 + #. TRANS @xref{Socket Addresses}.
354.1506 +-#: stdio-common/../sysdeps/gnu/errlist.c:373
354.1507 ++#: stdio-common/../sysdeps/gnu/errlist.c:374
354.1508 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:156
354.1509 + msgid "Cannot assign requested address"
354.1510 + msgstr "Priradenie po¾adovanej adresy nie je mo¾né"
354.1511 + 
354.1512 +-#: sunrpc/pmap_rmt.c:264
354.1513 ++#: sunrpc/pmap_rmt.c:265
354.1514 + msgid "Cannot create socket for broadcast rpc"
354.1515 + msgstr "Nie je mo¾né vytvori» zásuvku pre broadcast rpc"
354.1516 + 
354.1517 +-#: stdio-common/../sysdeps/gnu/errlist.c:786
354.1518 ++#: stdio-common/../sysdeps/gnu/errlist.c:805
354.1519 + msgid "Cannot exec a shared library directly"
354.1520 + msgstr "Nie je mo¾né priamo spusti» zdieµanú kni¾nicu"
354.1521 + 
354.1522 +-#: sunrpc/rpc_main.c:1406
354.1523 ++#: elf/readlib.c:98
354.1524 ++#, c-format
354.1525 ++msgid "Cannot fstat file %s.\n"
354.1526 ++msgstr "Nie je mo¾né vykona» fstat() súboru %s.\n"
354.1527 ++
354.1528 ++#: sunrpc/rpc_main.c:1415
354.1529 + msgid "Cannot have more than one file generation flag!\n"
354.1530 + msgstr "Nie je mo¾né pou¾i» viac ako jeden príznak tvorby súboru!\n"
354.1531 + 
354.1532 +-#: sunrpc/pmap_rmt.c:360
354.1533 ++#: elf/readlib.c:117
354.1534 ++#, c-format
354.1535 ++msgid "Cannot mmap file %s.\n"
354.1536 ++msgstr "Nie je mo¾né mmap-ova» súbor %s.\n"
354.1537 ++
354.1538 ++#: sunrpc/pmap_rmt.c:361
354.1539 + msgid "Cannot receive reply to broadcast"
354.1540 + msgstr "Nie je mo¾né prija» odpoveï na broadcast"
354.1541 + 
354.1542 +-#: sunrpc/pmap_clnt.c:74
354.1543 ++#: sunrpc/pmap_clnt.c:136
354.1544 + msgid "Cannot register service"
354.1545 + msgstr "Nie je mo¾né zaregistrova» slu¾bu"
354.1546 + 
354.1547 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:173
354.1548 ++msgid "Cannot send after socket shutdown"
354.1549 ++msgstr "Nie je mo¾né vysiela» po ukonèení èinnosti komunikaèného bodu"
354.1550 ++
354.1551 + #. TRANS The socket has already been shut down.
354.1552 +-#: stdio-common/../sysdeps/gnu/errlist.c:434
354.1553 ++#: stdio-common/../sysdeps/gnu/errlist.c:435
354.1554 + msgid "Cannot send after transport endpoint shutdown"
354.1555 + msgstr "Nie je mo¾né vysiela» po ukonèení èinnosti komunikaèného bodu"
354.1556 + 
354.1557 +-#: sunrpc/pmap_rmt.c:322
354.1558 ++#: sunrpc/pmap_rmt.c:323
354.1559 + msgid "Cannot send broadcast packet"
354.1560 + msgstr "Nie je mo¾né vysla» broadcast balík"
354.1561 + 
354.1562 +-#: sunrpc/pmap_rmt.c:271
354.1563 ++#: sunrpc/pmap_rmt.c:272
354.1564 + msgid "Cannot set socket option SO_BROADCAST"
354.1565 + msgstr "Nie je mo¾né nastavi» pre socket voµbu SO_BROADCAST"
354.1566 + 
354.1567 +-#: sunrpc/rpc_main.c:1193
354.1568 ++#: sunrpc/rpc_main.c:1195
354.1569 + msgid "Cannot specify more than one input file!\n"
354.1570 + msgstr "Nie je mo¾né zada» viac ako jeden vstupný súbor!\n"
354.1571 + 
354.1572 +-#: sunrpc/rpc_main.c:1363
354.1573 ++#: sunrpc/rpc_main.c:1372
354.1574 + msgid "Cannot use netid flag with inetd flag!\n"
354.1575 + msgstr "Príznaky netid a inetd nie je mo¾né pou¾i» súèasne!\n"
354.1576 + 
354.1577 +-#: sunrpc/rpc_main.c:1375
354.1578 ++#: sunrpc/rpc_main.c:1384
354.1579 + msgid "Cannot use netid flag without TIRPC!\n"
354.1580 + msgstr "Nie je mo¾né pou¾i» príznak netid bez TIRPC!\n"
354.1581 + 
354.1582 +-#: sunrpc/rpc_main.c:1382
354.1583 ++#: sunrpc/rpc_main.c:1391
354.1584 + msgid "Cannot use table flags with newstyle!\n"
354.1585 + msgstr "Pri pou¾ití nového ¹týlu nie je mo¾né pou¾i» príznaky tabuµky!\n"
354.1586 + 
354.1587 +-#: stdio-common/../sysdeps/gnu/errlist.c:670
354.1588 ++#: elf/ldconfig.c:131
354.1589 ++msgid "Change to and use ROOT as root directory"
354.1590 ++msgstr "Zmeni» adresár na ROOT a pou¾i» ho ako koreòový adresár"
354.1591 ++
354.1592 ++#: elf/cache.c:390
354.1593 ++#, c-format
354.1594 ++msgid "Changing access rights of %s to 0644 failed"
354.1595 ++msgstr "Zmena prístupových práv %s na 0644 zlyhala"
354.1596 ++
354.1597 ++#: stdio-common/../sysdeps/gnu/errlist.c:689
354.1598 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:67
354.1599 + msgid "Channel number out of range"
354.1600 + msgstr "Èíslo kanálu mimo povoleného rozsahu"
354.1601 + 
354.1602 +-#: nis/nis_print.c:264
354.1603 ++#: nis/nis_print.c:265
354.1604 + #, c-format
354.1605 + msgid "Character Separator : %c\n"
354.1606 + msgstr "Oddeµovaè znakov       : %c\n"
354.1607 + 
354.1608 +-#: stdio-common/../sysdeps/unix/siglist.c:45
354.1609 +-#: sysdeps/unix/sysv/linux/siglist.h:39
354.1610 ++#: stdio-common/../sysdeps/unix/siglist.c:46 sysdeps/generic/siglist.h:46
354.1611 + msgid "Child exited"
354.1612 + msgstr "Detský proces skonèil"
354.1613 + 
354.1614 +-#: sunrpc/clnt_perr.c:283
354.1615 ++#: sunrpc/clnt_perr.c:348
354.1616 + msgid "Client credential too weak"
354.1617 + msgstr "Oprávnenia klienta sú nepostaèujúce"
354.1618 + 
354.1619 +-#: nis/nis_print.c:266
354.1620 ++#: nis/nis_print.c:267
354.1621 + msgid "Columns             :\n"
354.1622 + msgstr "Ståpce                 :\n"
354.1623 + 
354.1624 +-#: stdio-common/../sysdeps/gnu/errlist.c:750
354.1625 ++#: stdio-common/../sysdeps/gnu/errlist.c:769
354.1626 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:100
354.1627 + msgid "Communication error on send"
354.1628 + msgstr "Chyba komunikácie pri vysielaní"
354.1629 + 
354.1630 +@@ -803,54 +1474,48 @@
354.1631 + msgstr "Kompilácia ¹pecifikácie národného prostredia"
354.1632 + 
354.1633 + #. TRANS Go home and have a glass of warm, dairy-fresh milk.
354.1634 +-#: stdio-common/../sysdeps/gnu/errlist.c:613
354.1635 ++#: stdio-common/../sysdeps/gnu/errlist.c:632
354.1636 + msgid "Computer bought the farm"
354.1637 + msgstr "Poèítaè kúpil farmu"
354.1638 + 
354.1639 +-#: locale/programs/ld-ctype.c:1253
354.1640 +-msgid "Computing table size for character classes might take a while..."
354.1641 +-msgstr "Výpoèet veµkosti tabuµky pre triedy znakov (mô¾e chvíµu trva»)..."
354.1642 +-
354.1643 +-#: locale/programs/ld-collate.c:336
354.1644 +-msgid "Computing table size for collation information might take a while..."
354.1645 +-msgstr "Výpoèet veµkosti tabuµky pre informácie o triedení (mô¾e chvíµu trva»)..."
354.1646 ++#: elf/ldconfig.c:141
354.1647 ++msgid "Configure Dynamic Linker Run Time Bindings."
354.1648 ++msgstr "Konfigurácia runtime väzieb dynamického linkera."
354.1649 + 
354.1650 + #. TRANS A remote host refused to allow the network connection (typically because
354.1651 + #. TRANS it is not running the requested service).
354.1652 +-#: stdio-common/../sysdeps/gnu/errlist.c:451
354.1653 ++#: stdio-common/../sysdeps/gnu/errlist.c:452
354.1654 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:176
354.1655 + msgid "Connection refused"
354.1656 + msgstr "Spojenie odmietnuté"
354.1657 + 
354.1658 + #. TRANS A network connection was closed for reasons outside the control of the
354.1659 + #. TRANS local host, such as by the remote machine rebooting or an unrecoverable
354.1660 + #. TRANS protocol violation.
354.1661 +-#: stdio-common/../sysdeps/gnu/errlist.c:401
354.1662 ++#: stdio-common/../sysdeps/gnu/errlist.c:402
354.1663 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:161
354.1664 + msgid "Connection reset by peer"
354.1665 + msgstr "Spojenie zru¹ené druhou stranou"
354.1666 + 
354.1667 + #. TRANS A socket operation with a specified timeout received no response during
354.1668 + #. TRANS the timeout period.
354.1669 +-#: stdio-common/../sysdeps/gnu/errlist.c:445
354.1670 ++#: stdio-common/../sysdeps/gnu/errlist.c:446
354.1671 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:175
354.1672 + msgid "Connection timed out"
354.1673 + msgstr "Èasový limit pre spojenie vypr¹al"
354.1674 + 
354.1675 +-#: stdio-common/../sysdeps/unix/siglist.c:44
354.1676 +-#: sysdeps/unix/sysv/linux/siglist.h:38
354.1677 ++#: stdio-common/../sysdeps/unix/siglist.c:45 sysdeps/generic/siglist.h:45
354.1678 + msgid "Continued"
354.1679 + msgstr "Pokraèovanie"
354.1680 + 
354.1681 +-#: iconv/iconv_prog.c:66
354.1682 ++#: iconv/iconv_prog.c:69
354.1683 + msgid "Convert encoding of given files from one encoding to another."
354.1684 + msgstr "Konverzia kódovania zadaných súborov na iné."
354.1685 + 
354.1686 +-#: db2/makedb.c:58
354.1687 +-msgid "Convert key to lower case"
354.1688 +-msgstr "Zmeni» kµúè na malé písmená"
354.1689 +-
354.1690 +-#: catgets/gencat.c:236 db2/makedb.c:242 elf/sprof.c:359
354.1691 +-#: iconv/iconv_prog.c:294 locale/programs/locale.c:267
354.1692 +-#: locale/programs/localedef.c:403 nscd/nscd.c:223 nss/getent.c:65
354.1693 +-#: posix/getconf.c:624
354.1694 ++#: catgets/gencat.c:246 elf/ldconfig.c:264 elf/sprof.c:355
354.1695 ++#: iconv/iconv_prog.c:351 locale/programs/locale.c:269
354.1696 ++#: locale/programs/localedef.c:311 nscd/nscd.c:287 nscd/nscd_nischeck.c:90
354.1697 ++#: nss/getent.c:63 posix/getconf.c:751
354.1698 + #, c-format
354.1699 + msgid ""
354.1700 + "Copyright (C) %s Free Software Foundation, Inc.\n"
354.1701 +@@ -861,167 +1526,353 @@
354.1702 + "Toto je voµne ¹íriteµný software; pre podmienky kopírovania pozri\n"
354.1703 + "zdrojový kód.Na software nie je poskytovaná ®IADNA záruka.\n"
354.1704 + 
354.1705 +-#: nscd/nscd_conf.c:167
354.1706 ++#: nscd/nscd_conf.c:166
354.1707 + #, c-format
354.1708 + msgid "Could not create log file \"%s\""
354.1709 + msgstr "Nie je mo¾né vytvori» ¾urnálový súbor \"%s\""
354.1710 + 
354.1711 +-#: catgets/gencat.c:107
354.1712 ++#: catgets/gencat.c:112
354.1713 + msgid "Create C header file NAME containing symbol definitions"
354.1714 + msgstr "Vytvori» C hlavièkový súbor NÁZOV obsahujúci definície symbolov"
354.1715 + 
354.1716 +-#: locale/programs/localedef.c:103
354.1717 ++#: locale/programs/localedef.c:102
354.1718 ++msgid "Create old-style tables"
354.1719 ++msgstr "Vytvori» tabuµky na starý spôsob"
354.1720 ++
354.1721 ++#: locale/programs/localedef.c:101
354.1722 + msgid "Create output even if warning messages were issued"
354.1723 + msgstr "Vytvori» výstupný súbor aj pri výskyte varovaní"
354.1724 + 
354.1725 +-#: db2/makedb.c:68
354.1726 +-msgid "Create simple DB database from textual input."
354.1727 +-msgstr "Vytvorenie jednoduchej DB databázy z textového vstupu."
354.1728 +-
354.1729 +-#: nis/nis_print.c:322
354.1730 ++#: nis/nis_print.c:326
354.1731 + #, c-format
354.1732 + msgid "Creation Time : %s"
354.1733 + msgstr "Èas vytvorenia   : %s"
354.1734 + 
354.1735 +-#: nis/nss_nisplus/nisplus-publickey.c:89
354.1736 +-#: nis/nss_nisplus/nisplus-publickey.c:159
354.1737 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:48
354.1738 ++msgid "Cross-device link"
354.1739 ++msgstr "Odkaz medzi zariadeniami"
354.1740 ++
354.1741 ++#: malloc/memusagestat.c:67
354.1742 ++msgid "DATAFILE [OUTFILE]"
354.1743 ++msgstr "DÁTOVÝ_SÚBOR [VÝSTUPNÝ_SÚBOR]"
354.1744 ++
354.1745 ++#: nis/nss_nisplus/nisplus-publickey.c:96
354.1746 ++#: nis/nss_nisplus/nisplus-publickey.c:172
354.1747 + #, c-format
354.1748 + msgid "DES entry for netname %s not unique\n"
354.1749 + msgstr "DES záznam pre sie»ový názov %s nie je jednoznaèný\n"
354.1750 + 
354.1751 +-#: nis/nis_print.c:111
354.1752 ++#: nis/nis_print.c:112
354.1753 + msgid "DIRECTORY\n"
354.1754 + msgstr "ADRESÁR\n"
354.1755 + 
354.1756 +-#: nis/nis_print.c:41
354.1757 ++#: nis/nis_print.c:42
354.1758 + msgid "DNANS"
354.1759 + msgstr "DNANS"
354.1760 + 
354.1761 +-#: nis/nis_print.c:37
354.1762 ++#: nis/nis_print.c:38
354.1763 + msgid "DNS"
354.1764 + msgstr "DNS"
354.1765 + 
354.1766 +-#: nis/nis_error.c:51
354.1767 ++#: elf/dl-open.c:189
354.1768 ++msgid "DST not allowed in SUID/SGID programs"
354.1769 ++msgstr "DST nie je pre SUID/SGID programy povolené"
354.1770 ++
354.1771 ++#: elf/dl-error.c:71
354.1772 ++msgid "DYNAMIC LINKER BUG!!!"
354.1773 ++msgstr "CHYBA V DYNAMICKOM LINKERI!!!"
354.1774 ++
354.1775 ++#: nis/nis_error.c:52
354.1776 + msgid "Database for table does not exist"
354.1777 + msgstr "Databáza pre tabuµku neexistuje"
354.1778 + 
354.1779 +-#: nis/ypclnt.c:795
354.1780 ++#: nis/ypclnt.c:818
354.1781 + msgid "Database is busy"
354.1782 + msgstr "Databáza je pou¾ívaná"
354.1783 + 
354.1784 +-#: nis/nis_print.c:225
354.1785 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:75
354.1786 ++msgid "Deadlock situation detected/avoided"
354.1787 ++msgstr "Bol detekovaný a znemo¾nený deadlock"
354.1788 ++
354.1789 ++#: nis/nis_print.c:226
354.1790 + msgid "Default Access rights :\n"
354.1791 + msgstr "Implicitné príst. práva  :\n"
354.1792 + 
354.1793 + #. TRANS No default destination address was set for the socket.  You get this
354.1794 + #. TRANS error when you try to transmit data over a connectionless socket,
354.1795 + #. TRANS without first specifying a destination for the data with @code{connect}.
354.1796 +-#: stdio-common/../sysdeps/gnu/errlist.c:429
354.1797 ++#: stdio-common/../sysdeps/gnu/errlist.c:430
354.1798 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:126
354.1799 + msgid "Destination address required"
354.1800 + msgstr "Je potrebné zada» cieµovú hodnotu"
354.1801 + 
354.1802 +-#: stdio-common/../sysdeps/gnu/errlist.c:650
354.1803 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:46
354.1804 ++msgid "Device busy"
354.1805 ++msgstr "Zariadenie je pou¾ívané"
354.1806 ++
354.1807 ++#: stdio-common/../sysdeps/gnu/errlist.c:669
354.1808 + msgid "Device not a stream"
354.1809 + msgstr "Zariadenie nie je prúd"
354.1810 + 
354.1811 +-#. TRANS No such device or address.  The system tried to use the device
354.1812 +-#. TRANS represented by a file you specified, and it couldn't find the device.
354.1813 +-#. TRANS This can mean that the device file was installed incorrectly, or that
354.1814 +-#. TRANS the physical device is missing or not correctly attached to the
354.1815 +-#. TRANS computer.
354.1816 +-#: stdio-common/../sysdeps/gnu/errlist.c:61
354.1817 +-msgid "Device not configured"
354.1818 +-msgstr "Zariadenie nie je nakonfigurované"
354.1819 +-
354.1820 + #. TRANS Resource busy; a system resource that can't be shared is already in use.
354.1821 + #. TRANS For example, if you try to delete a file that is the root of a currently
354.1822 + #. TRANS mounted filesystem, you get this error.
354.1823 +-#: stdio-common/../sysdeps/gnu/errlist.c:128
354.1824 ++#: stdio-common/../sysdeps/gnu/errlist.c:129
354.1825 + msgid "Device or resource busy"
354.1826 + msgstr "Zariadenie alebo iný zdroj je pou¾ívané"
354.1827 + 
354.1828 +-#: nis/nis_print.c:179
354.1829 ++#: nis/nis_print.c:180
354.1830 + #, c-format
354.1831 + msgid "Diffie-Hellmann (%d bits)\n"
354.1832 + msgstr "Diffie-Hellmann (%d bitov)\n"
354.1833 + 
354.1834 +-#: nis/nis_print.c:315
354.1835 ++#: nis/nis_print.c:318
354.1836 + #, c-format
354.1837 + msgid "Directory     : %s\n"
354.1838 + msgstr "Adresár          : %s\n"
354.1839 + 
354.1840 + #. TRANS Directory not empty, where an empty directory was expected.  Typically,
354.1841 + #. TRANS this error occurs when you are trying to delete a directory.
354.1842 +-#: stdio-common/../sysdeps/gnu/errlist.c:480
354.1843 ++#: stdio-common/../sysdeps/gnu/errlist.c:481
354.1844 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:123
354.1845 + msgid "Directory not empty"
354.1846 + msgstr "Adresár nie je prázdny"
354.1847 + 
354.1848 +-#. TRANS The user's disk quota was exceeded.
354.1849 +-#: stdio-common/../sysdeps/gnu/errlist.c:498
354.1850 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:79
354.1851 + msgid "Disc quota exceeded"
354.1852 + msgstr "Disková kvóta prekroèená"
354.1853 + 
354.1854 +-#: nscd/nscd.c:80
354.1855 ++#. TRANS The user's disk quota was exceeded.
354.1856 ++#: stdio-common/../sysdeps/gnu/errlist.c:499
354.1857 ++msgid "Disk quota exceeded"
354.1858 ++msgstr "Disková kvóta prekroèená"
354.1859 ++
354.1860 ++#: nscd/nscd.c:86
354.1861 + msgid "Do not fork and display messages on the current tty"
354.1862 + msgstr "Nespú¹»a» samostatný proces a zobrazova» správy na aktuálnom termináli"
354.1863 + 
354.1864 +-#: db2/makedb.c:61
354.1865 +-msgid "Do not print messages while building database"
354.1866 +-msgstr "Poèas tvorby databázy nevypisova» správy"
354.1867 +-
354.1868 +-#: catgets/gencat.c:109
354.1869 ++#: catgets/gencat.c:114
354.1870 + msgid "Do not use existing catalog, force new output file"
354.1871 + msgstr "Nepou¾íva» existujúci katalóg, vnúti» nový výstupný súbor"
354.1872 + 
354.1873 +-#: nis/ypclnt.c:841
354.1874 ++#: nis/ypclnt.c:864
354.1875 + msgid "Domain not bound"
354.1876 + msgstr "Doména nie je pripojená"
354.1877 + 
354.1878 +-#: stdio-common/../sysdeps/unix/siglist.c:32
354.1879 +-#: sysdeps/unix/sysv/linux/siglist.h:53
354.1880 ++#: elf/ldconfig.c:129
354.1881 ++msgid "Don't build cache"
354.1882 ++msgstr "Nevytvori» cache"
354.1883 ++
354.1884 ++#: elf/ldconfig.c:130
354.1885 ++msgid "Don't generate links"
354.1886 ++msgstr "Negenerova» odkazy"
354.1887 ++
354.1888 ++#: debug/pcprofiledump.c:56
354.1889 ++msgid "Dump information generated by PC profiling."
354.1890 ++msgstr "Vypísa» informáciu získanú profilovaním PC."
354.1891 ++
354.1892 ++#: elf/dl-load.c:1290
354.1893 ++msgid "ELF file ABI version invalid"
354.1894 ++msgstr "Neplatná verzia ABI ELF súboru"
354.1895 ++
354.1896 ++#: elf/dl-load.c:1287
354.1897 ++msgid "ELF file OS ABI invalid"
354.1898 ++msgstr "Neplatný OS ABI ELF súboru"
354.1899 ++
354.1900 ++#: elf/dl-load.c:1296
354.1901 ++msgid "ELF file version does not match current one"
354.1902 ++msgstr "Verzia súboru ELF sa nezhoduje s aktuálnou"
354.1903 ++
354.1904 ++#: elf/dl-load.c:1283
354.1905 ++msgid "ELF file version ident does not match current one"
354.1906 ++msgstr "Identifikácia verzie ELF súboru sa nezhoduje s aktuálnou"
354.1907 ++
354.1908 ++#: elf/dl-load.c:1307
354.1909 ++msgid "ELF file's phentsize not the expected size"
354.1910 ++msgstr "phentsize ELF súboru nie je oèakávaná"
354.1911 ++
354.1912 ++#: elf/dl-load.c:876
354.1913 ++msgid "ELF load command address/offset not properly aligned"
354.1914 ++msgstr "ELF zavádzacia adresa/posunutie nie je správne zarovnaná"
354.1915 ++
354.1916 ++#: elf/dl-load.c:873
354.1917 ++msgid "ELF load command alignment not page-aligned"
354.1918 ++msgstr "ELF zarovnanie príkazu nie je zarovnané na stránku"
354.1919 ++
354.1920 ++#: stdio-common/../sysdeps/unix/siglist.c:33 sysdeps/generic/siglist.h:60
354.1921 + msgid "EMT trap"
354.1922 + msgstr "EMT preru¹enie"
354.1923 + 
354.1924 +-#: nis/nis_print.c:120
354.1925 ++#: nis/nis_print.c:121
354.1926 + msgid "ENTRY\n"
354.1927 + msgstr "ZÁZNAM\n"
354.1928 + 
354.1929 +-#: nis/nis_print.c:299
354.1930 ++#: nis/nis_print.c:300
354.1931 + msgid "Encrypted data\n"
354.1932 + msgstr "©ifrované údaje\n"
354.1933 + 
354.1934 +-#: nis/nis_error.c:52
354.1935 +-msgid "Entry/Table type mismatch"
354.1936 ++#: nis/nis_error.c:53
354.1937 ++msgid "Entry/table type mismatch"
354.1938 + msgstr "Nesúlad záznamu s tabuµkou"
354.1939 + 
354.1940 +-#: nis/nis_error.c:56
354.1941 ++#: nss/getent.c:127 nss/getent.c:292
354.1942 ++#, c-format
354.1943 ++msgid "Enumeration not supported on %s\n"
354.1944 ++msgstr "Enumerácia %s nie je podporované\n"
354.1945 ++
354.1946 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:30
354.1947 ++msgid "Error 0"
354.1948 ++msgstr "Chyba 0"
354.1949 ++
354.1950 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:130
354.1951 ++msgid "Error 100"
354.1952 ++msgstr "Chyba 100"
354.1953 ++
354.1954 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:131
354.1955 ++msgid "Error 101"
354.1956 ++msgstr "Chyba 101"
354.1957 ++
354.1958 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:132
354.1959 ++msgid "Error 102"
354.1960 ++msgstr "Chyba 102"
354.1961 ++
354.1962 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:133
354.1963 ++msgid "Error 103"
354.1964 ++msgstr "Chyba 103"
354.1965 ++
354.1966 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:134
354.1967 ++msgid "Error 104"
354.1968 ++msgstr "Chyba 104"
354.1969 ++
354.1970 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:135
354.1971 ++msgid "Error 105"
354.1972 ++msgstr "Chyba 105"
354.1973 ++
354.1974 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:136
354.1975 ++msgid "Error 106"
354.1976 ++msgstr "Chyba 106"
354.1977 ++
354.1978 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:137
354.1979 ++msgid "Error 107"
354.1980 ++msgstr "Chyba 107"
354.1981 ++
354.1982 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:138
354.1983 ++msgid "Error 108"
354.1984 ++msgstr "Chyba 108"
354.1985 ++
354.1986 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:139
354.1987 ++msgid "Error 109"
354.1988 ++msgstr "Chyba 109"
354.1989 ++
354.1990 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:140
354.1991 ++msgid "Error 110"
354.1992 ++msgstr "Chyba 110"
354.1993 ++
354.1994 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:141
354.1995 ++msgid "Error 111"
354.1996 ++msgstr "Chyba 111"
354.1997 ++
354.1998 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:142
354.1999 ++msgid "Error 112"
354.2000 ++msgstr "Chyba 112"
354.2001 ++
354.2002 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:143
354.2003 ++msgid "Error 113"
354.2004 ++msgstr "Chyba 113"
354.2005 ++
354.2006 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:144
354.2007 ++msgid "Error 114"
354.2008 ++msgstr "Chyba 114"
354.2009 ++
354.2010 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:145
354.2011 ++msgid "Error 115"
354.2012 ++msgstr "Chyba 115"
354.2013 ++
354.2014 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:146
354.2015 ++msgid "Error 116"
354.2016 ++msgstr "Chyba 116"
354.2017 ++
354.2018 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:147
354.2019 ++msgid "Error 117"
354.2020 ++msgstr "Chyba 117"
354.2021 ++
354.2022 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:148
354.2023 ++msgid "Error 118"
354.2024 ++msgstr "Chyba 118"
354.2025 ++
354.2026 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:149
354.2027 ++msgid "Error 119"
354.2028 ++msgstr "Chyba 119"
354.2029 ++
354.2030 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:166
354.2031 ++msgid "Error 136"
354.2032 ++msgstr "Chybe 136"
354.2033 ++
354.2034 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:172
354.2035 ++msgid "Error 142"
354.2036 ++msgstr "Chyba 142"
354.2037 ++
354.2038 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:88
354.2039 ++msgid "Error 58"
354.2040 ++msgstr "Chyba 58"
354.2041 ++
354.2042 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:89
354.2043 ++msgid "Error 59"
354.2044 ++msgstr "Chyba 59"
354.2045 ++
354.2046 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:102
354.2047 ++msgid "Error 72"
354.2048 ++msgstr "Chyba 72"
354.2049 ++
354.2050 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:103
354.2051 ++msgid "Error 73"
354.2052 ++msgstr "Chyba 73"
354.2053 ++
354.2054 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:105
354.2055 ++msgid "Error 75"
354.2056 ++msgstr "Chyba 75"
354.2057 ++
354.2058 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:106
354.2059 ++msgid "Error 76"
354.2060 ++msgstr "Chyba 76"
354.2061 ++
354.2062 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:121
354.2063 ++msgid "Error 91"
354.2064 ++msgstr "Chyba 91"
354.2065 ++
354.2066 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:122
354.2067 ++msgid "Error 92"
354.2068 ++msgstr "Chyba 92"
354.2069 ++
354.2070 ++#: nis/nis_error.c:57
354.2071 + msgid "Error in RPC subsystem"
354.2072 + msgstr "Chyba v RPC subsystéme"
354.2073 + 
354.2074 +-#: nis/nis_error.c:66
354.2075 ++#: nis/nis_error.c:67
354.2076 + msgid "Error in accessing NIS+ cold start file.  Is NIS+ installed?"
354.2077 + msgstr "Chyba pri prístupe NIS+ súboru studeného ¹tartu. Je NIS+ nain¹talované?"
354.2078 + 
354.2079 +-#: string/../sysdeps/mach/_strerror.c:56
354.2080 +-#: sysdeps/mach/hurd/mips/dl-machine.c:67
354.2081 ++#: string/../sysdeps/mach/_strerror.c:58
354.2082 ++#: sysdeps/mach/hurd/mips/dl-machine.c:68
354.2083 + msgid "Error in unknown error system: "
354.2084 + msgstr "Chyba v neznámom chybovom systéme: "
354.2085 + 
354.2086 +-#: nis/nis_error.c:59
354.2087 ++#: nis/nis_error.c:60
354.2088 + msgid "Error while talking to callback proc"
354.2089 + msgstr "Chyba poèas komunikácie s procedúrou spätného volania"
354.2090 + 
354.2091 +-#: inet/ruserpass.c:161
354.2092 ++#: inet/ruserpass.c:181
354.2093 + msgid "Error: .netrc file is readable by others."
354.2094 + msgstr "Chyba: súbor .netrc je èitateµný pre ostatných."
354.2095 + 
354.2096 +-#: stdio-common/../sysdeps/gnu/errlist.c:710
354.2097 ++#: stdio-common/../sysdeps/gnu/errlist.c:729
354.2098 + msgid "Exchange full"
354.2099 + msgstr "Stredisko plné"
354.2100 + 
354.2101 + #. TRANS Invalid executable file format.  This condition is detected by the
354.2102 + #. TRANS @code{exec} functions; see @ref{Executing a File}.
354.2103 +-#: stdio-common/../sysdeps/gnu/errlist.c:75
354.2104 ++#: stdio-common/../sysdeps/gnu/errlist.c:76
354.2105 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:38
354.2106 + msgid "Exec format error"
354.2107 + msgstr "Chybný formát spustiteµného súboru"
354.2108 + 
354.2109 +@@ -1029,75 +1880,113 @@
354.2110 + msgid "FATAL: system does not define `_POSIX2_LOCALEDEF'"
354.2111 + msgstr "FATÁLNA CHYBA: systém nedefinuje `_POSIX2_LOCALEDEF'"
354.2112 + 
354.2113 +-#: locale/programs/localedef.c:99
354.2114 ++#: locale/programs/localedef.c:97
354.2115 + msgid "FILE contains mapping from symbolic names to UCS4 values"
354.2116 + msgstr "SÚBOR obsahuje mapovanie symbolických názvov na UCS4 hodnoty"
354.2117 + 
354.2118 +-#: sunrpc/clnt_perr.c:287
354.2119 ++#: sunrpc/clnt_perr.c:356
354.2120 + msgid "Failed (unspecified error)"
354.2121 + msgstr "Zlyhalo (ne¹pecifikovaná chyba)"
354.2122 + 
354.2123 +-#: stdio-common/../sysdeps/gnu/errlist.c:762
354.2124 ++#: nscd/nscd.c:400
354.2125 ++#, c-format
354.2126 ++msgid "Failed to look up user '%s' to run server as"
354.2127 ++msgstr "Nepodarilo sa vyhµada» pou¾ívateµa '%s', pod ktorým má server be¾a»"
354.2128 ++
354.2129 ++#: elf/readlib.c:108
354.2130 ++#, c-format
354.2131 ++msgid "File %s is too small, not checked."
354.2132 ++msgstr "Súbor %s je príli¹ krátky, neskontrolovaný."
354.2133 ++
354.2134 ++#: stdio-common/../sysdeps/gnu/errlist.c:781
354.2135 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:111
354.2136 + msgid "File descriptor in bad state"
354.2137 + msgstr "Deskriptor súboru v chybnom stave"
354.2138 + 
354.2139 + #. TRANS File exists; an existing file was specified in a context where it only
354.2140 + #. TRANS makes sense to specify a new file.
354.2141 +-#: stdio-common/../sysdeps/gnu/errlist.c:134
354.2142 ++#: stdio-common/../sysdeps/gnu/errlist.c:135
354.2143 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:47
354.2144 + msgid "File exists"
354.2145 + msgstr "Súbor existuje"
354.2146 + 
354.2147 +-#: stdio-common/../sysdeps/gnu/errlist.c:726
354.2148 ++#: elf/cache.c:124 elf/cache.c:134
354.2149 ++msgid "File is not a cache file.\n"
354.2150 ++msgstr "Súbor nie je cache súborom.\n"
354.2151 ++
354.2152 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:86
354.2153 ++msgid "File locking deadlock"
354.2154 ++msgstr "Vzájomné zablokovanie pri zamykaní súboru"
354.2155 ++
354.2156 ++#: stdio-common/../sysdeps/gnu/errlist.c:745
354.2157 + msgid "File locking deadlock error"
354.2158 + msgstr "Vzájomné zablokovanie pri zamykaní súboru"
354.2159 + 
354.2160 + #. TRANS Filename too long (longer than @code{PATH_MAX}; @pxref{Limits for
354.2161 + #. TRANS Files}) or host name too long (in @code{gethostname} or
354.2162 + #. TRANS @code{sethostname}; @pxref{Host Identification}).
354.2163 +-#: stdio-common/../sysdeps/gnu/errlist.c:464
354.2164 ++#: stdio-common/../sysdeps/gnu/errlist.c:465
354.2165 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:108
354.2166 + msgid "File name too long"
354.2167 + msgstr "Meno súboru príli¹ dlhé"
354.2168 + 
354.2169 +-#: stdio-common/../sysdeps/unix/siglist.c:50
354.2170 +-#: sysdeps/unix/sysv/linux/siglist.h:44
354.2171 ++#: stdio-common/../sysdeps/unix/siglist.c:51 sysdeps/generic/siglist.h:51
354.2172 + msgid "File size limit exceeded"
354.2173 + msgstr "Prekroèený limit då¾ky súboru"
354.2174 + 
354.2175 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:53
354.2176 ++msgid "File table overflow"
354.2177 ++msgstr "Preteèenie tabuµky súborov"
354.2178 ++
354.2179 + #. TRANS File too big; the size of a file would be larger than allowed by the system.
354.2180 +-#: stdio-common/../sysdeps/gnu/errlist.c:202
354.2181 ++#: stdio-common/../sysdeps/gnu/errlist.c:203
354.2182 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:57
354.2183 + msgid "File too large"
354.2184 + msgstr "Súbor je príli¹ veµký"
354.2185 + 
354.2186 +-#: nis/nis_error.c:37
354.2187 +-msgid "First/Next chain broken"
354.2188 +-msgstr "Chyba zre»azenia prvý/ïal¹í"
354.2189 ++#: intl/tst-gettext2.c:36
354.2190 ++msgid "First string for testing."
354.2191 ++msgstr "Prvý testovací re»azec."
354.2192 ++
354.2193 ++#: nis/nis_error.c:38
354.2194 ++msgid "First/next chain broken"
354.2195 ++msgstr "Preru¹ené zre»azenie prvý/ïal¹í"
354.2196 + 
354.2197 +-#: stdio-common/../sysdeps/unix/siglist.c:33
354.2198 +-#: sysdeps/unix/sysv/linux/siglist.h:28
354.2199 ++#: stdio-common/../sysdeps/unix/siglist.c:34 sysdeps/generic/siglist.h:35
354.2200 + msgid "Floating point exception"
354.2201 + msgstr "Výnimka pohyblivej rádovej èiarky"
354.2202 + 
354.2203 +-#: nis/nis_error.c:67
354.2204 ++#: elf/ldconfig.c:136
354.2205 ++msgid "Format to use: new, old or compat (default)"
354.2206 ++msgstr "Pou¾i» formát: nový (new), starý (old) alebo kompatibilný (compat - prednastavené)"
354.2207 ++
354.2208 ++#: nis/nis_error.c:68
354.2209 + msgid "Full resync required for directory"
354.2210 + msgstr "Adresár vy¾aduje úplnú resynchronizáciu"
354.2211 + 
354.2212 +-#. TRANS Function not implemented.  Some functions have commands or options defined
354.2213 +-#. TRANS that might not be supported in all implementations, and this is the kind
354.2214 +-#. TRANS of error you get if you request them and they are not supported.
354.2215 +-#: stdio-common/../sysdeps/gnu/errlist.c:573
354.2216 ++#. TRANS Function not implemented.  This indicates that the function called is
354.2217 ++#. TRANS not implemented at all, either in the C library itself or in the
354.2218 ++#. TRANS operating system.  When you get this error, you can be sure that this
354.2219 ++#. TRANS particular function will always fail with @code{ENOSYS} unless you
354.2220 ++#. TRANS install a new version of the C library or the operating system.
354.2221 ++#: stdio-common/../sysdeps/gnu/errlist.c:576
354.2222 + msgid "Function not implemented"
354.2223 + msgstr "Funkcia nie je implementovaná"
354.2224 + 
354.2225 +-#: nis/nis_print.c:114
354.2226 ++#: nis/nis_print.c:115
354.2227 + msgid "GROUP\n"
354.2228 + msgstr "SKUPINA\n"
354.2229 + 
354.2230 +-#: argp/argp-help.c:231
354.2231 ++#: argp/argp-help.c:230
354.2232 + #, c-format
354.2233 + msgid "Garbage in ARGP_HELP_FMT: %s"
354.2234 + msgstr "Nezmysly v ARGP_HELP_FMT: %s"
354.2235 + 
354.2236 +-#: catgets/gencat.c:115
354.2237 ++#: malloc/memusagestat.c:64
354.2238 ++msgid "Generate graphic from memory profiling data"
354.2239 ++msgstr "Generova» graf z údajov profilu pamäti"
354.2240 ++
354.2241 ++#: catgets/gencat.c:120
354.2242 + msgid ""
354.2243 + "Generate message catalog.\\vIf INPUT-FILE is -, input is read from standard input.  If OUTPUT-FILE\n"
354.2244 + "is -, output is written to standard output.\n"
354.2245 +@@ -1105,123 +1994,134 @@
354.2246 + "Tvorba katalógu správ.\\vAk je VSTUPNÝ_SÚBOR -, vstup je naèítaný zo ¹tandardného vstupu. Ak je\n"
354.2247 + "VÝSTUPNÝ_SÚBOR -, výstup je zapísaný na ¹tandardný výstup.\n"
354.2248 + 
354.2249 +-#: nis/nis_error.c:36
354.2250 ++#: malloc/memusagestat.c:55
354.2251 ++msgid "Generate output linear to time (default is linear to number of function calls)"
354.2252 ++msgstr "Generova» výstup lineárny s èasom (prednastavený je lineárne k poètu volaní funkcií)"
354.2253 ++
354.2254 ++#: elf/ldconfig.c:128
354.2255 ++msgid "Generate verbose messages"
354.2256 ++msgstr "Vypísova» podrobnej¹ie správy"
354.2257 ++
354.2258 ++#: nis/nis_error.c:37
354.2259 + msgid "Generic system error"
354.2260 + msgstr "V¹eobecná chyba systému"
354.2261 + 
354.2262 +-#: locale/programs/locale.c:75
354.2263 ++#: locale/programs/locale.c:77
354.2264 + msgid "Get locale-specific information."
354.2265 + msgstr "Získa» informáciu ¹pecifickú pre národné prostredie."
354.2266 + 
354.2267 +-#: argp/argp-parse.c:88
354.2268 ++#: argp/argp-parse.c:94
354.2269 + msgid "Give a short usage message"
354.2270 + msgstr "Vypísa» krátky návod na pou¾itie"
354.2271 + 
354.2272 +-#: argp/argp-parse.c:87
354.2273 ++#: argp/argp-parse.c:93
354.2274 + msgid "Give this help list"
354.2275 + msgstr "Vypísa» túto pomoc"
354.2276 + 
354.2277 + #. TRANS This error code has no purpose.
354.2278 +-#: stdio-common/../sysdeps/gnu/errlist.c:618
354.2279 ++#: stdio-common/../sysdeps/gnu/errlist.c:637
354.2280 + msgid "Gratuitous error"
354.2281 + msgstr "Vïaèná chyba"
354.2282 + 
354.2283 +-#: nis/nis_print.c:317
354.2284 ++#: nis/nis_print.c:320
354.2285 + #, c-format
354.2286 + msgid "Group         : %s\n"
354.2287 + msgstr "Skupina          : %s\n"
354.2288 + 
354.2289 +-#: nis/nis_print.c:248
354.2290 ++#: nis/nis_print.c:249
354.2291 + msgid "Group Flags :"
354.2292 + msgstr "Príznaky skupiny :"
354.2293 + 
354.2294 +-#: nis/nis_print_group_entry.c:113
354.2295 ++#: nis/nis_print_group_entry.c:115
354.2296 + #, c-format
354.2297 + msgid "Group entry for \"%s.%s\" group:\n"
354.2298 + msgstr "Záznam skupiny pre skupinu \"%s.%s\":\n"
354.2299 + 
354.2300 +-#: argp/argp-parse.c:91
354.2301 ++#: argp/argp-parse.c:97
354.2302 + msgid "Hang for SECS seconds (default 3600)"
354.2303 + msgstr "Poèka» SECS sekúnd (implicitne 3600)"
354.2304 + 
354.2305 +-#: stdio-common/../sysdeps/unix/siglist.c:26
354.2306 +-#: sysdeps/unix/sysv/linux/siglist.h:22
354.2307 ++#: stdio-common/../sysdeps/unix/siglist.c:27 sysdeps/generic/siglist.h:29
354.2308 + msgid "Hangup"
354.2309 + msgstr "Zavesenie"
354.2310 + 
354.2311 +-#: nscd/grpcache.c:238
354.2312 ++#: nscd/grpcache.c:253
354.2313 + #, c-format
354.2314 + msgid "Haven't found \"%d\" in group cache!"
354.2315 + msgstr "Nenájdené \"%d\" v cache skupín!"
354.2316 + 
354.2317 +-#: nscd/pwdcache.c:235
354.2318 ++#: nscd/pwdcache.c:249
354.2319 + #, c-format
354.2320 + msgid "Haven't found \"%d\" in password cache!"
354.2321 + msgstr "Nenájdené \"%d\" v cache hesiel!"
354.2322 + 
354.2323 +-#: nscd/grpcache.c:210
354.2324 ++#: nscd/grpcache.c:214
354.2325 + #, c-format
354.2326 + msgid "Haven't found \"%s\" in group cache!"
354.2327 + msgstr "Nenájdené \"%s\" v cache skupín!"
354.2328 + 
354.2329 +-#: nscd/hstcache.c:297 nscd/hstcache.c:328 nscd/hstcache.c:359
354.2330 +-#: nscd/hstcache.c:390
354.2331 ++#: nscd/hstcache.c:299 nscd/hstcache.c:341 nscd/hstcache.c:386
354.2332 ++#: nscd/hstcache.c:430
354.2333 + #, c-format
354.2334 + msgid "Haven't found \"%s\" in hosts cache!"
354.2335 + msgstr "Nenájdené \"%s\" v cache poèítaèov!"
354.2336 + 
354.2337 +-#: nscd/pwdcache.c:207
354.2338 ++#: nscd/pwdcache.c:210
354.2339 + #, c-format
354.2340 + msgid "Haven't found \"%s\" in password cache!"
354.2341 + msgstr "Nenájdené \"%s\" v cache hesiel!"
354.2342 + 
354.2343 + #. TRANS The remote host for a requested network connection is down.
354.2344 +-#: stdio-common/../sysdeps/gnu/errlist.c:469
354.2345 ++#: stdio-common/../sysdeps/gnu/errlist.c:470
354.2346 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:177
354.2347 + msgid "Host is down"
354.2348 + msgstr "Poèítaè je vypnutý"
354.2349 + 
354.2350 +-#: resolv/herror.c:75
354.2351 ++#: resolv/herror.c:69
354.2352 + msgid "Host name lookup failure"
354.2353 + msgstr "Nepodarilo sa nájs» meno poèítaèa"
354.2354 + 
354.2355 +-#: stdio-common/../sysdeps/unix/siglist.c:48
354.2356 +-#: sysdeps/unix/sysv/linux/siglist.h:42
354.2357 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:35
354.2358 ++msgid "I/O error"
354.2359 ++msgstr "V/V chyba"
354.2360 ++
354.2361 ++#: stdio-common/../sysdeps/unix/siglist.c:49 sysdeps/generic/siglist.h:49
354.2362 + msgid "I/O possible"
354.2363 + msgstr "V/V mo¾ný"
354.2364 + 
354.2365 +-#: db2/makedb.c:71
354.2366 +-msgid ""
354.2367 +-"INPUT-FILE OUTPUT-FILE\n"
354.2368 +-"-o OUTPUT-FILE INPUT-FILE\n"
354.2369 +-"-u INPUT-FILE"
354.2370 +-msgstr ""
354.2371 +-"VSTUPNÝ_SÚBOR VÝSTUPNÝ_SÚBOR\n"
354.2372 +-"-o VÝSTUPNÝ_SÚBOR VSTUPNÝ_SÚBOR\n"
354.2373 +-"-u VSTUPNÝ_SÚBOR"
354.2374 +-
354.2375 +-#: stdio-common/../sysdeps/unix/siglist.c:31
354.2376 ++#: stdio-common/../sysdeps/unix/siglist.c:32
354.2377 + msgid "IOT trap"
354.2378 + msgstr "IOT preru¹enie"
354.2379 + 
354.2380 +-#: nis/nis_print.c:35
354.2381 ++#: nis/nis_print.c:36
354.2382 + msgid "IVY"
354.2383 + msgstr "IVY"
354.2384 + 
354.2385 +-#: stdio-common/../sysdeps/gnu/errlist.c:626
354.2386 ++#: stdio-common/../sysdeps/gnu/errlist.c:645
354.2387 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:66
354.2388 + msgid "Identifier removed"
354.2389 + msgstr "Identifikátor odstránený"
354.2390 + 
354.2391 +-#: stdio-common/../sysdeps/unix/siglist.c:29
354.2392 +-#: sysdeps/unix/sysv/linux/siglist.h:25
354.2393 ++#: elf/ldconfig.c:525
354.2394 ++#, c-format
354.2395 ++msgid "Ignored file %s since it is not a regular file."
354.2396 ++msgstr "Súbor %s ignorovaný, keï¾e nie je regulérnym súborom."
354.2397 ++
354.2398 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:118
354.2399 ++msgid "Illegal byte sequence"
354.2400 ++msgstr "Neprípustná sekvencia bajtov"
354.2401 ++
354.2402 ++#: stdio-common/../sysdeps/unix/siglist.c:30 sysdeps/generic/siglist.h:32
354.2403 + msgid "Illegal instruction"
354.2404 + msgstr "Neprípustná in¹trukcia"
354.2405 + 
354.2406 +-#: nis/nis_error.c:61
354.2407 ++#: nis/nis_error.c:62
354.2408 + msgid "Illegal object type for operation"
354.2409 + msgstr "Neprípustný typ objektu pre operáciu"
354.2410 + 
354.2411 + #. TRANS Invalid seek operation (such as on a pipe).
354.2412 +-#: stdio-common/../sysdeps/gnu/errlist.c:213
354.2413 ++#: stdio-common/../sysdeps/gnu/errlist.c:214
354.2414 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:59
354.2415 + msgid "Illegal seek"
354.2416 + msgstr "Neprípustné nastavenie pozície"
354.2417 + 
354.2418 +@@ -1230,13 +2130,14 @@
354.2419 + #. TRANS
354.2420 + #. TRANS On some systems @code{chmod} returns this error if you try to set the
354.2421 + #. TRANS sticky bit on a non-directory file; @pxref{Setting Permissions}.
354.2422 +-#: stdio-common/../sysdeps/gnu/errlist.c:556
354.2423 ++#: stdio-common/../sysdeps/gnu/errlist.c:557
354.2424 + msgid "Inappropriate file type or format"
354.2425 + msgstr "Nevhodný typ alebo formát súboru"
354.2426 + 
354.2427 + #. TRANS Inappropriate I/O control operation, such as trying to set terminal
354.2428 + #. TRANS modes on an ordinary file.
354.2429 +-#: stdio-common/../sysdeps/gnu/errlist.c:188
354.2430 ++#: stdio-common/../sysdeps/gnu/errlist.c:189
354.2431 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:55
354.2432 + msgid "Inappropriate ioctl for device"
354.2433 + msgstr "Nevhodný ioctl pre toto zariadenie"
354.2434 + 
354.2435 +@@ -1246,41 +2147,45 @@
354.2436 + #. TRANS error because functions such as @code{read} and @code{write} translate
354.2437 + #. TRANS it into a @code{SIGTTIN} or @code{SIGTTOU} signal.  @xref{Job Control},
354.2438 + #. TRANS for information on process groups and these signals.
354.2439 +-#: stdio-common/../sysdeps/gnu/errlist.c:589
354.2440 ++#: stdio-common/../sysdeps/gnu/errlist.c:608
354.2441 + msgid "Inappropriate operation for background process"
354.2442 + msgstr "Nevhodná operácia pre proces v pozadí"
354.2443 + 
354.2444 +-#: sysdeps/unix/sysv/linux/siglist.h:62
354.2445 ++#: sysdeps/generic/siglist.h:69
354.2446 + msgid "Information request"
354.2447 + msgstr "®iados» o informáciu"
354.2448 + 
354.2449 +-#: iconv/iconv_prog.c:57
354.2450 ++#: iconv/iconv_prog.c:58
354.2451 + msgid "Information:"
354.2452 + msgstr "Informácia:"
354.2453 + 
354.2454 +-#: locale/programs/localedef.c:94
354.2455 ++#: locale/programs/localedef.c:92
354.2456 + msgid "Input Files:"
354.2457 + msgstr "Vstupné súbory:"
354.2458 + 
354.2459 +-#: iconv/iconv_prog.c:54
354.2460 ++#: elf/ldconfig.c:698 elf/readlib.c:92
354.2461 ++#, c-format
354.2462 ++msgid "Input file %s not found.\n"
354.2463 ++msgstr "Vstupný súbor %s nebol nájdený.\n"
354.2464 ++
354.2465 ++#: iconv/iconv_prog.c:55
354.2466 + msgid "Input/Output format specification:"
354.2467 + msgstr "©pecifikácia vstupno/výstupného formátu:"
354.2468 + 
354.2469 + #. TRANS Input/output error; usually used for physical read or write errors.
354.2470 +-#: stdio-common/../sysdeps/gnu/errlist.c:52
354.2471 ++#: stdio-common/../sysdeps/gnu/errlist.c:53
354.2472 + msgid "Input/output error"
354.2473 + msgstr "Chyba vstupu/výstupu"
354.2474 + 
354.2475 +-#: nis/ypclnt.c:775
354.2476 ++#: nis/ypclnt.c:798
354.2477 + msgid "Internal NIS error"
354.2478 + msgstr "Interná chyba NIS"
354.2479 + 
354.2480 +-#: nis/ypclnt.c:839
354.2481 ++#: nis/ypclnt.c:862
354.2482 + msgid "Internal ypbind error"
354.2483 + msgstr "Interná chyba ypbind"
354.2484 + 
354.2485 +-#: stdio-common/../sysdeps/unix/siglist.c:27
354.2486 +-#: sysdeps/unix/sysv/linux/siglist.h:23
354.2487 ++#: stdio-common/../sysdeps/unix/siglist.c:28 sysdeps/generic/siglist.h:30
354.2488 + msgid "Interrupt"
354.2489 + msgstr "Preru¹enie"
354.2490 + 
354.2491 +@@ -1291,231 +2196,263 @@
354.2492 + #. TRANS You can choose to have functions resume after a signal that is handled,
354.2493 + #. TRANS rather than failing with @code{EINTR}; see @ref{Interrupted
354.2494 + #. TRANS Primitives}.
354.2495 +-#: stdio-common/../sysdeps/gnu/errlist.c:47
354.2496 ++#: stdio-common/../sysdeps/gnu/errlist.c:48
354.2497 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:34
354.2498 + msgid "Interrupted system call"
354.2499 + msgstr "Preru¹ené volanie systému"
354.2500 + 
354.2501 +-#: stdio-common/../sysdeps/gnu/errlist.c:666
354.2502 ++#: stdio-common/../sysdeps/gnu/errlist.c:685
354.2503 + msgid "Interrupted system call should be restarted"
354.2504 + msgstr "Preru¹ené volanie systému by malo by» znovu spustené"
354.2505 + 
354.2506 +-#: nis/nis_error.c:44
354.2507 +-msgid "Invalid Object for operation"
354.2508 +-msgstr "Neplatný objekt pre operáciu"
354.2509 +-
354.2510 + #. TRANS Invalid argument.  This is used to indicate various kinds of problems
354.2511 + #. TRANS with passing the wrong argument to a library function.
354.2512 +-#: stdio-common/../sysdeps/gnu/errlist.c:164
354.2513 ++#: stdio-common/../sysdeps/gnu/errlist.c:165
354.2514 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:52
354.2515 + msgid "Invalid argument"
354.2516 + msgstr "Neprípustný argument"
354.2517 + 
354.2518 +-#: posix/regex.c:1018
354.2519 ++#: posix/regex.c:1102
354.2520 + msgid "Invalid back reference"
354.2521 + msgstr "Neprípustný spätný odkaz"
354.2522 + 
354.2523 +-#: posix/regex.c:1016
354.2524 ++#: posix/regex.c:1096
354.2525 + msgid "Invalid character class name"
354.2526 + msgstr "Neprípustný názov triedy znakov"
354.2527 + 
354.2528 +-#: sunrpc/clnt_perr.c:275
354.2529 ++#: sunrpc/clnt_perr.c:332
354.2530 + msgid "Invalid client credential"
354.2531 + msgstr "Neplatné oprávnenie klienta"
354.2532 + 
354.2533 +-#: sunrpc/clnt_perr.c:279
354.2534 ++#: sunrpc/clnt_perr.c:340
354.2535 + msgid "Invalid client verifier"
354.2536 + msgstr "Neplatné overenie klienta"
354.2537 + 
354.2538 +-#: posix/regex.c:1015
354.2539 ++#: posix/regex.c:1093
354.2540 + msgid "Invalid collation character"
354.2541 + msgstr "Neprípustný znak triedenia"
354.2542 + 
354.2543 +-#: posix/regex.c:1022
354.2544 ++#: posix/regex.c:1114
354.2545 + msgid "Invalid content of \\{\\}"
354.2546 + msgstr "Neprípustný obsah \\{\\}"
354.2547 + 
354.2548 + #. TRANS An attempt to make an improper link across file systems was detected.
354.2549 + #. TRANS This happens not only when you use @code{link} (@pxref{Hard Links}) but
354.2550 + #. TRANS also when you rename a file with @code{rename} (@pxref{Renaming Files}).
354.2551 +-#: stdio-common/../sysdeps/gnu/errlist.c:141
354.2552 ++#: stdio-common/../sysdeps/gnu/errlist.c:142
354.2553 + msgid "Invalid cross-device link"
354.2554 + msgstr "Neprípustný odkaz medzi zariadeniami"
354.2555 + 
354.2556 +-#: stdio-common/../sysdeps/gnu/errlist.c:702
354.2557 ++#: stdio-common/../sysdeps/gnu/errlist.c:721
354.2558 + msgid "Invalid exchange"
354.2559 + msgstr "Neprípustná výmena"
354.2560 + 
354.2561 ++#: nis/nis_error.c:45
354.2562 ++msgid "Invalid object for operation"
354.2563 ++msgstr "Neplatný objekt pre operáciu"
354.2564 ++
354.2565 + #. TRANS While decoding a multibyte character the function came along an invalid
354.2566 + #. TRANS or an incomplete sequence of bytes or the given wide character is invalid.
354.2567 +-#: stdio-common/../sysdeps/gnu/errlist.c:579
354.2568 ++#: stdio-common/../sysdeps/gnu/errlist.c:598
354.2569 + msgid "Invalid or incomplete multibyte or wide character"
354.2570 + msgstr "Neprípustný alebo nekompletný viacbajtový alebo ¹iroký znak"
354.2571 + 
354.2572 +-#: posix/regex.c:1025
354.2573 ++#: posix/regex.c:1123
354.2574 + msgid "Invalid preceding regular expression"
354.2575 + msgstr "Neprípustný predchádzajúci regulérny výraz"
354.2576 + 
354.2577 +-#: posix/regex.c:1023
354.2578 ++#: posix/regex.c:1117
354.2579 + msgid "Invalid range end"
354.2580 + msgstr "Neprípustný koniec rozsahu"
354.2581 + 
354.2582 +-#: posix/regex.c:1014
354.2583 ++#: posix/regex.c:1090
354.2584 + msgid "Invalid regular expression"
354.2585 + msgstr "Neprípustný regulérny výraz"
354.2586 + 
354.2587 +-#: stdio-common/../sysdeps/gnu/errlist.c:718
354.2588 ++#: stdio-common/../sysdeps/gnu/errlist.c:737
354.2589 + msgid "Invalid request code"
354.2590 + msgstr "Neprípustný kód ¾iadosti"
354.2591 + 
354.2592 +-#: stdio-common/../sysdeps/gnu/errlist.c:706
354.2593 ++#: stdio-common/../sysdeps/gnu/errlist.c:725
354.2594 + msgid "Invalid request descriptor"
354.2595 + msgstr "Neprípustný deskriptor ¾iadosti"
354.2596 + 
354.2597 +-#: sunrpc/clnt_perr.c:285
354.2598 ++#: sunrpc/clnt_perr.c:352
354.2599 + msgid "Invalid server verifier"
354.2600 + msgstr "Neplatné overenie servera"
354.2601 + 
354.2602 +-#: stdio-common/../sysdeps/gnu/errlist.c:722
354.2603 ++#: stdio-common/../sysdeps/gnu/errlist.c:741
354.2604 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:85
354.2605 + msgid "Invalid slot"
354.2606 + msgstr "Neplatná priehradka"
354.2607 + 
354.2608 ++#: nscd/nscd.c:91
354.2609 ++msgid "Invalidate the specified cache"
354.2610 ++msgstr "Zneplatni» zadanú cache"
354.2611 ++
354.2612 + #. TRANS File is a directory; you cannot open a directory for writing,
354.2613 + #. TRANS or create or remove hard links to it.
354.2614 +-#: stdio-common/../sysdeps/gnu/errlist.c:158
354.2615 ++#: stdio-common/../sysdeps/gnu/errlist.c:159
354.2616 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:51
354.2617 + msgid "Is a directory"
354.2618 + msgstr "Je adresár"
354.2619 + 
354.2620 +-#: stdio-common/../sysdeps/gnu/errlist.c:806
354.2621 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:169
354.2622 ++msgid "Is a name file"
354.2623 ++msgstr "Je súbor názvu"
354.2624 ++
354.2625 ++#: stdio-common/../sysdeps/gnu/errlist.c:825
354.2626 + msgid "Is a named type file"
354.2627 +-msgstr "Je pomenovaný súbor"
354.2628 ++msgstr "Je pomenovaný súbor typu"
354.2629 + 
354.2630 +-#: nis/nis_print.c:187
354.2631 ++#: nis/nis_print.c:188
354.2632 + msgid "Kerberos.\n"
354.2633 + msgstr "Kerberos.\n"
354.2634 + 
354.2635 +-#: stdio-common/../sysdeps/unix/siglist.c:34
354.2636 +-#: sysdeps/unix/sysv/linux/siglist.h:29
354.2637 ++#: stdio-common/../sysdeps/unix/siglist.c:35 sysdeps/generic/siglist.h:36
354.2638 + msgid "Killed"
354.2639 + msgstr "Zabitý"
354.2640 + 
354.2641 +-#: nis/nis_print.c:123
354.2642 ++#: nis/nis_print.c:124
354.2643 + msgid "LINK\n"
354.2644 + msgstr "ODKAZ\n"
354.2645 + 
354.2646 +-#: nis/nis_local_names.c:125
354.2647 ++#: nis/nis_local_names.c:126
354.2648 + #, c-format
354.2649 + msgid "LOCAL entry for UID %d in directory %s not unique\n"
354.2650 + msgstr "LOCAL záznam pre UID %d v adresári %s nie je jednoznaèný\n"
354.2651 + 
354.2652 +-#: stdio-common/../sysdeps/gnu/errlist.c:698
354.2653 ++#: stdio-common/../sysdeps/gnu/errlist.c:717
354.2654 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:74
354.2655 + msgid "Level 2 halted"
354.2656 + msgstr "Úroveò 2 zastavená"
354.2657 + 
354.2658 +-#: stdio-common/../sysdeps/gnu/errlist.c:674
354.2659 ++#: stdio-common/../sysdeps/gnu/errlist.c:693
354.2660 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:68
354.2661 + msgid "Level 2 not synchronized"
354.2662 + msgstr "Úroveò 2 nie je synchronizovaná"
354.2663 + 
354.2664 +-#: stdio-common/../sysdeps/gnu/errlist.c:678
354.2665 ++#: stdio-common/../sysdeps/gnu/errlist.c:697
354.2666 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:69
354.2667 + msgid "Level 3 halted"
354.2668 + msgstr "Úroveò 3 zastavená"
354.2669 + 
354.2670 +-#: stdio-common/../sysdeps/gnu/errlist.c:682
354.2671 ++#: stdio-common/../sysdeps/gnu/errlist.c:701
354.2672 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:70
354.2673 + msgid "Level 3 reset"
354.2674 + msgstr "Úroveò 3 nastavená na východzie hodnoty"
354.2675 + 
354.2676 +-#: nis/nis_error.c:53
354.2677 +-msgid "Link Points to illegal name"
354.2678 +-msgstr "Odkaz odkazuje na neprípustný názov"
354.2679 +-
354.2680 +-#: stdio-common/../sysdeps/gnu/errlist.c:638
354.2681 ++#: stdio-common/../sysdeps/gnu/errlist.c:657
354.2682 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:97
354.2683 + msgid "Link has been severed"
354.2684 + msgstr "Odkaz bol znièený"
354.2685 + 
354.2686 +-#: stdio-common/../sysdeps/gnu/errlist.c:686
354.2687 ++#: stdio-common/../sysdeps/gnu/errlist.c:705
354.2688 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:71
354.2689 + msgid "Link number out of range"
354.2690 + msgstr "Èíslo odkazu mimo rozsahu"
354.2691 + 
354.2692 +-#: nis/nis_print.c:282
354.2693 ++#: nis/nis_error.c:54
354.2694 ++msgid "Link points to illegal name"
354.2695 ++msgstr "Odkaz odkazuje na neprípustný názov"
354.2696 ++
354.2697 ++#: nis/nis_print.c:283
354.2698 + msgid "Linked Object Type : "
354.2699 + msgstr "Typ odkazovaného objektu : "
354.2700 + 
354.2701 +-#: nis/nis_print.c:284
354.2702 ++#: nis/nis_print.c:285
354.2703 + #, c-format
354.2704 + msgid "Linked to : %s\n"
354.2705 + msgstr "Odkazuje na : %s\n"
354.2706 + 
354.2707 +-#: nis/ypclnt.c:787
354.2708 ++#: nis/ypclnt.c:810
354.2709 + msgid "Local domain name not set"
354.2710 + msgstr "Meno miestnej domény nie je nastavené"
354.2711 + 
354.2712 +-#: nis/ypclnt.c:777
354.2713 ++#: nis/ypclnt.c:800
354.2714 + msgid "Local resource allocation failure"
354.2715 + msgstr "Chyba pri pridelení miestnych zdrojov"
354.2716 + 
354.2717 +-#: stdio-common/../sysdeps/gnu/errlist.c:734
354.2718 ++#: stdio-common/../sysdeps/gnu/errlist.c:753
354.2719 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:94
354.2720 + msgid "Machine is not on the network"
354.2721 + msgstr "Poèítaè nie je zapojený v sieti"
354.2722 + 
354.2723 +-#: nis/nis_error.c:45
354.2724 +-msgid "Malformed Name, or illegal name"
354.2725 +-msgstr "Chybne formované alebo neprípustný názov"
354.2726 ++#: nis/nis_error.c:46
354.2727 ++msgid "Malformed name, or illegal name"
354.2728 ++msgstr "Chybne formovaný alebo neprípustný názov"
354.2729 + 
354.2730 +-#: argp/argp-help.c:1182
354.2731 ++#: argp/argp-help.c:1185
354.2732 + msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options."
354.2733 + msgstr "Povinné alebo voliteµné argumenty dlhých tvarov volieb sú povinné alebo voliteµné pre µubovoµné zodpovedajúce krátke voµby."
354.2734 + 
354.2735 +-#: nis/nis_print.c:168
354.2736 ++#: elf/ldconfig.c:135
354.2737 ++msgid "Manually link individual libraries."
354.2738 ++msgstr "Ruène linkova» jednotlivé kni¾nice."
354.2739 ++
354.2740 ++#: nis/nis_print.c:169
354.2741 + msgid "Master Server :\n"
354.2742 + msgstr "Hlavný server :\n"
354.2743 + 
354.2744 +-#: nis/nis_error.c:75
354.2745 ++#: nis/nis_error.c:76
354.2746 + msgid "Master server busy, full dump rescheduled."
354.2747 + msgstr "Hlavný server zaneprázdnený, úplný prenos preplánovaný."
354.2748 + 
354.2749 +-#: posix/../sysdeps/posix/gai_strerror.c:35
354.2750 ++#: posix/../sysdeps/posix/gai_strerror.c:36
354.2751 + msgid "Memory allocation failure"
354.2752 + msgstr "Pridelenie pamäti zlyhalo"
354.2753 + 
354.2754 +-#: posix/regex.c:1024
354.2755 ++#: posix/regex.c:1120
354.2756 + msgid "Memory exhausted"
354.2757 + msgstr "Pamä» vyèerpaná"
354.2758 + 
354.2759 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:82
354.2760 ++msgid "Message tables full"
354.2761 ++msgstr "Plná tabuµka správ"
354.2762 ++
354.2763 + #. TRANS The size of a message sent on a socket was larger than the supported
354.2764 + #. TRANS maximum size.
354.2765 +-#: stdio-common/../sysdeps/gnu/errlist.c:317
354.2766 ++#: stdio-common/../sysdeps/gnu/errlist.c:318
354.2767 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:127
354.2768 + msgid "Message too long"
354.2769 + msgstr "Príli¹ dlhá správa"
354.2770 + 
354.2771 +-#: nis/nis_error.c:57
354.2772 ++#: nis/nis_error.c:58
354.2773 + msgid "Missing or malformed attribute"
354.2774 + msgstr "Chýbajúci alebo chybne formovaný atribút"
354.2775 + 
354.2776 +-#: nis/nis_print.c:323
354.2777 ++#: nis/nis_print.c:328
354.2778 + #, c-format
354.2779 + msgid "Mod. Time     : %s"
354.2780 + msgstr "Èas zmeny        :%s"
354.2781 + 
354.2782 +-#: nis/nis_error.c:50
354.2783 ++#: nis/nis_error.c:51
354.2784 + msgid "Modification failed"
354.2785 + msgstr "Modifikácia zlyhala"
354.2786 + 
354.2787 +-#: nis/nis_error.c:63
354.2788 ++#: nis/nis_error.c:64
354.2789 + msgid "Modify operation failed"
354.2790 + msgstr "Operácia zmeny zlyhala"
354.2791 + 
354.2792 +-#: locale/programs/locale.c:68
354.2793 ++#: locale/programs/locale.c:70
354.2794 + msgid "Modify output format:"
354.2795 + msgstr "Modifikova» výstupný formát:"
354.2796 + 
354.2797 +-#: stdio-common/../sysdeps/gnu/errlist.c:630
354.2798 ++#: stdio-common/../sysdeps/gnu/errlist.c:649
354.2799 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:104
354.2800 + msgid "Multihop attempted"
354.2801 + msgstr "Pokus o spojenie cez viac uzlov"
354.2802 + 
354.2803 +-#: catgets/gencat.c:106 catgets/gencat.c:110 db2/makedb.c:59
354.2804 +-#: locale/programs/localedef.c:115 nscd/nscd.c:77
354.2805 ++#: nscd/nscd_conf.c:182
354.2806 ++msgid "Must specify user name for server-user option"
354.2807 ++msgstr "Pre server-user voµbu je potrebné zada» meno pou¾ívateµa"
354.2808 ++
354.2809 ++#: catgets/gencat.c:111 catgets/gencat.c:115 locale/programs/localedef.c:115
354.2810 ++#: nscd/nscd.c:83
354.2811 + msgid "NAME"
354.2812 + msgstr "NÁZOV"
354.2813 + 
354.2814 +-#: locale/programs/locale.c:78
354.2815 ++#: locale/programs/locale.c:80
354.2816 + msgid ""
354.2817 + "NAME\n"
354.2818 + "[-a|-m]"
354.2819 +@@ -1523,269 +2460,365 @@
354.2820 + "NÁZOV\n"
354.2821 + "[-a|-m]"
354.2822 + 
354.2823 +-#: nis/nis_print.c:31
354.2824 ++#: nis/nis_print.c:32
354.2825 + msgid "NIS"
354.2826 + msgstr "NIS"
354.2827 + 
354.2828 +-#: nis/ypclnt.c:791
354.2829 ++#: nis/ypclnt.c:814
354.2830 + msgid "NIS client/server version mismatch - can't supply service"
354.2831 + msgstr "Rozdielne verzie NIS klienta a serveru - nie je mo¾né poskytnú» slu¾bu"
354.2832 + 
354.2833 +-#: nis/ypclnt.c:789
354.2834 ++#: nis/ypclnt.c:812
354.2835 + msgid "NIS map database is bad"
354.2836 + msgstr "Databáza máp NIS je chybná"
354.2837 + 
354.2838 +-#: nis/nis_error.c:68
354.2839 ++#: nis/nis_error.c:69
354.2840 + msgid "NIS+ operation failed"
354.2841 + msgstr "NIS+ operácia zlyhala"
354.2842 + 
354.2843 +-#: nis/nis_error.c:33
354.2844 ++#: nis/nis_error.c:34
354.2845 + msgid "NIS+ servers unreachable"
354.2846 + msgstr "NIS+ server nie je dostupný"
354.2847 + 
354.2848 +-#: nis/nis_error.c:69
354.2849 ++#: nis/nis_error.c:70
354.2850 + msgid "NIS+ service is unavailable or not installed"
354.2851 + msgstr "Slu¾ba NIS+ nie je dostupná alebo nain¹talovaná"
354.2852 + 
354.2853 +-#: nis/nis_print.c:108
354.2854 ++#: nis/nis_print.c:109
354.2855 + msgid "NO OBJECT\n"
354.2856 + msgstr "®IADNY OBJEKT\n"
354.2857 + 
354.2858 +-#: nscd/nscd.c:81
354.2859 ++#: nscd/nscd.c:87
354.2860 + msgid "NUMBER"
354.2861 + msgstr "POÈET"
354.2862 + 
354.2863 +-#: nis/nis_print.c:162
354.2864 ++#: nis/nis_print.c:163
354.2865 + #, c-format
354.2866 +-msgid "Name : '%s'\n"
354.2867 +-msgstr "Názov : '%s'\n"
354.2868 ++msgid "Name : `%s'\n"
354.2869 ++msgstr "Názov : `%s'\n"
354.2870 + 
354.2871 +-#: nscd/nscd.c:88
354.2872 ++#: nscd/nscd.c:97
354.2873 + msgid "Name Service Cache Daemon."
354.2874 + msgstr "Démon cache slu¾by názvov."
354.2875 + 
354.2876 +-#: nis/nis_error.c:40
354.2877 ++#: nis/nis_error.c:41
354.2878 + msgid "Name not served by this server"
354.2879 + msgstr "Názov nie je obsluhovaný týmto serverom"
354.2880 + 
354.2881 +-#: stdio-common/../sysdeps/gnu/errlist.c:758
354.2882 ++#: stdio-common/../sysdeps/gnu/errlist.c:777
354.2883 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:110
354.2884 + msgid "Name not unique on network"
354.2885 + msgstr "Meno nie je v sieti jednoznaèné"
354.2886 + 
354.2887 +-#: posix/../sysdeps/posix/gai_strerror.c:37
354.2888 ++#: posix/../sysdeps/posix/gai_strerror.c:38
354.2889 + msgid "Name or service not known"
354.2890 + msgstr "Názov alebo slu¾ba neznáme"
354.2891 + 
354.2892 +-#: nis/nis_error.c:49
354.2893 ++#: malloc/memusagestat.c:53
354.2894 ++msgid "Name output file"
354.2895 ++msgstr "Výstupný súbor názvu"
354.2896 ++
354.2897 ++#: nis/nis_error.c:50
354.2898 + msgid "Name/entry isn't unique"
354.2899 + msgstr "Názov/záznam nie sú jednoznaèné"
354.2900 + 
354.2901 +-#: nis/nis_error.c:58
354.2902 ++#: nis/nis_error.c:59
354.2903 + msgid "Named object is not searchable"
354.2904 + msgstr "Zadaný objekt nie je prehµadávateµný"
354.2905 + 
354.2906 + #. TRANS ???
354.2907 +-#: stdio-common/../sysdeps/gnu/errlist.c:566
354.2908 ++#: stdio-common/../sysdeps/gnu/errlist.c:567
354.2909 + msgid "Need authenticator"
354.2910 + msgstr "Potrebuje overovací objekt"
354.2911 + 
354.2912 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:159
354.2913 ++msgid "Network dropped connection because of reset"
354.2914 ++msgstr "Sie» zru¹ila spojenie kvôli resetu"
354.2915 ++
354.2916 + #. TRANS A network connection was reset because the remote host crashed.
354.2917 +-#: stdio-common/../sysdeps/gnu/errlist.c:389
354.2918 ++#: stdio-common/../sysdeps/gnu/errlist.c:390
354.2919 + msgid "Network dropped connection on reset"
354.2920 + msgstr "Sie» zru¹ila spojenie (problém so vzdialeným poèítaèom)"
354.2921 + 
354.2922 + #. TRANS A socket operation failed because the network was down.
354.2923 +-#: stdio-common/../sysdeps/gnu/errlist.c:378
354.2924 ++#: stdio-common/../sysdeps/gnu/errlist.c:379
354.2925 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:157
354.2926 + msgid "Network is down"
354.2927 + msgstr "Sie» je nefunkèná"
354.2928 + 
354.2929 + #. TRANS A socket operation failed because the subnet containing the remote host
354.2930 + #. TRANS was unreachable.
354.2931 +-#: stdio-common/../sysdeps/gnu/errlist.c:384
354.2932 ++#: stdio-common/../sysdeps/gnu/errlist.c:385
354.2933 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:158
354.2934 + msgid "Network is unreachable"
354.2935 + msgstr "Sie» nie je dostupná"
354.2936 + 
354.2937 +-#: stdio-common/../sysdeps/gnu/errlist.c:694
354.2938 ++#: stdio-common/../sysdeps/gnu/errlist.c:713
354.2939 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:73
354.2940 + msgid "No CSI structure available"
354.2941 + msgstr "CSI ¹truktúra nedostupná"
354.2942 + 
354.2943 +-#: stdio-common/../sysdeps/gnu/errlist.c:802
354.2944 ++#: stdio-common/../sysdeps/gnu/errlist.c:821
354.2945 + msgid "No XENIX semaphores available"
354.2946 + msgstr "XENIX semafóry nedostupné"
354.2947 + 
354.2948 +-#: posix/../sysdeps/posix/gai_strerror.c:36
354.2949 ++#: posix/../sysdeps/posix/gai_strerror.c:37
354.2950 + msgid "No address associated with hostname"
354.2951 + msgstr "Názov poèítaèa nemá priradenú adresu"
354.2952 + 
354.2953 +-#: resolv/herror.c:77
354.2954 ++#: resolv/herror.c:71
354.2955 + msgid "No address associated with name"
354.2956 + msgstr "Názov nemá priradenú adresu"
354.2957 + 
354.2958 +-#: stdio-common/../sysdeps/gnu/errlist.c:714
354.2959 ++#: stdio-common/../sysdeps/gnu/errlist.c:733
354.2960 + msgid "No anode"
354.2961 + msgstr "®iadny anode"
354.2962 + 
354.2963 + #. TRANS The kernel's buffers for I/O operations are all in use.  In GNU, this
354.2964 + #. TRANS error is always synonymous with @code{ENOMEM}; you may get one or the
354.2965 + #. TRANS other from network operations.
354.2966 +-#: stdio-common/../sysdeps/gnu/errlist.c:408
354.2967 ++#: stdio-common/../sysdeps/gnu/errlist.c:409
354.2968 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:162
354.2969 + msgid "No buffer space available"
354.2970 + msgstr "Nie je mo¾né prideli» pamä» pre V/V operácie"
354.2971 + 
354.2972 ++#: locale/programs/ld-ctype.c:425
354.2973 ++msgid "No character set name specified in charmap"
354.2974 ++msgstr "V znakovej mape nie je zadaný názov znakovej sady"
354.2975 ++
354.2976 + #. TRANS There are no child processes.  This error happens on operations that are
354.2977 + #. TRANS supposed to manipulate child processes, when there aren't any processes
354.2978 + #. TRANS to manipulate.
354.2979 +-#: stdio-common/../sysdeps/gnu/errlist.c:89
354.2980 ++#: stdio-common/../sysdeps/gnu/errlist.c:90
354.2981 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:40
354.2982 + msgid "No child processes"
354.2983 + msgstr "Detské procesy neexistujú"
354.2984 + 
354.2985 +-#: stdio-common/../sysdeps/gnu/errlist.c:634
354.2986 ++#: stdio-common/../sysdeps/gnu/errlist.c:653
354.2987 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:91
354.2988 + msgid "No data available"
354.2989 + msgstr "Dáta nie sú k dispozícii"
354.2990 + 
354.2991 +-#: nis/nis_error.c:73
354.2992 ++#: locale/programs/ld-address.c:131 locale/programs/ld-collate.c:1500
354.2993 ++#: locale/programs/ld-ctype.c:407 locale/programs/ld-identification.c:132
354.2994 ++#: locale/programs/ld-measurement.c:93 locale/programs/ld-messages.c:98
354.2995 ++#: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94
354.2996 ++#: locale/programs/ld-numeric.c:99 locale/programs/ld-paper.c:91
354.2997 ++#: locale/programs/ld-telephone.c:94 locale/programs/ld-time.c:160
354.2998 ++#, c-format
354.2999 ++msgid "No definition for %s category found"
354.3000 ++msgstr "Nebola nájdená definícia kategórie %s"
354.3001 ++
354.3002 ++#: nis/nis_error.c:74
354.3003 + msgid "No file space on server"
354.3004 + msgstr "Na serveri u¾ nie je ¾iadne miesto pre súbory"
354.3005 + 
354.3006 ++#: elf/ldconfig.c:532
354.3007 ++#, c-format
354.3008 ++msgid "No link created since soname could not be found for %s"
354.3009 ++msgstr "Odkaz nebol vytvorený, keï¾e pre %s nebolo mo¾né nájs» soname"
354.3010 ++
354.3011 + #. TRANS No locks available.  This is used by the file locking facilities; see
354.3012 + #. TRANS @ref{File Locks}.  This error is never generated by the GNU system, but
354.3013 + #. TRANS it can result from an operation to an NFS server running another
354.3014 + #. TRANS operating system.
354.3015 +-#: stdio-common/../sysdeps/gnu/errlist.c:547
354.3016 ++#: stdio-common/../sysdeps/gnu/errlist.c:548
354.3017 + msgid "No locks available"
354.3018 + msgstr "Zámky nie sú k dispozícii"
354.3019 + 
354.3020 +-#: posix/regex.c:1013
354.3021 ++#: posix/regex.c:1087
354.3022 + msgid "No match"
354.3023 + msgstr "®iadna zhoda"
354.3024 + 
354.3025 +-#: stdio-common/../sysdeps/gnu/errlist.c:814
354.3026 ++#: stdio-common/../sysdeps/gnu/errlist.c:833
354.3027 + msgid "No medium found"
354.3028 + msgstr "Nenájdené ¾iadne médium"
354.3029 + 
354.3030 +-#: stdio-common/../sysdeps/gnu/errlist.c:642
354.3031 ++#: stdio-common/../sysdeps/gnu/errlist.c:661
354.3032 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:65
354.3033 + msgid "No message of desired type"
354.3034 + msgstr "®iadna správa ¾elaného typu"
354.3035 + 
354.3036 +-#: nis/ypclnt.c:779
354.3037 ++#: nis/ypclnt.c:802
354.3038 + msgid "No more records in map database"
354.3039 + msgstr "®iadne ïal¹ie záznamy v databáze"
354.3040 + 
354.3041 +-#: posix/regex.c:5515
354.3042 ++#: posix/regex.c:5955
354.3043 + msgid "No previous regular expression"
354.3044 + msgstr "®iadny predchádzajúci regulérny výraz"
354.3045 + 
354.3046 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:76
354.3047 ++msgid "No record locks available"
354.3048 ++msgstr "Nie sú k dispozícii ¾iadne zámky"
354.3049 ++
354.3050 + #: sunrpc/rpcinfo.c:570
354.3051 + msgid "No remote programs registered.\n"
354.3052 + msgstr "Nie sú registrované ¾iadne vzdialené programy\n"
354.3053 + 
354.3054 + #. TRANS The remote host for a requested network connection is not reachable.
354.3055 +-#: stdio-common/../sysdeps/gnu/errlist.c:474
354.3056 ++#: stdio-common/../sysdeps/gnu/errlist.c:475
354.3057 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:178
354.3058 + msgid "No route to host"
354.3059 + msgstr "Cesta k poèítaèu neexistuje"
354.3060 + 
354.3061 + #. TRANS No space left on device; write operation on a file failed because the
354.3062 + #. TRANS disk is full.
354.3063 +-#: stdio-common/../sysdeps/gnu/errlist.c:208
354.3064 ++#: stdio-common/../sysdeps/gnu/errlist.c:209
354.3065 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:58
354.3066 + msgid "No space left on device"
354.3067 + msgstr "Na zariadení u¾ nie je ¾iadne miesto"
354.3068 + 
354.3069 + #. TRANS The wrong type of device was given to a function that expects a
354.3070 + #. TRANS particular sort of device.
354.3071 +-#: stdio-common/../sysdeps/gnu/errlist.c:147
354.3072 ++#: stdio-common/../sysdeps/gnu/errlist.c:148
354.3073 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:49
354.3074 + msgid "No such device"
354.3075 + msgstr "Také zariadenie neexistuje"
354.3076 + 
354.3077 ++#. TRANS No such device or address.  The system tried to use the device
354.3078 ++#. TRANS represented by a file you specified, and it couldn't find the device.
354.3079 ++#. TRANS This can mean that the device file was installed incorrectly, or that
354.3080 ++#. TRANS the physical device is missing or not correctly attached to the
354.3081 ++#. TRANS computer.
354.3082 ++#: stdio-common/../sysdeps/gnu/errlist.c:62
354.3083 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:36
354.3084 ++msgid "No such device or address"
354.3085 ++msgstr "Také zariadenie alebo adresa neexistuje"
354.3086 ++
354.3087 + #. TRANS No such file or directory.  This is a ``file doesn't exist'' error
354.3088 + #. TRANS for ordinary files that are referenced in contexts where they are
354.3089 + #. TRANS expected to already exist.
354.3090 +-#: stdio-common/../sysdeps/gnu/errlist.c:31
354.3091 ++#: stdio-common/../sysdeps/gnu/errlist.c:32
354.3092 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:32
354.3093 + msgid "No such file or directory"
354.3094 + msgstr "Adresár alebo súbor neexistuje"
354.3095 + 
354.3096 +-#: nis/ypclnt.c:773
354.3097 ++#: nis/ypclnt.c:796
354.3098 + msgid "No such key in map"
354.3099 + msgstr "Tento kµúè v databáze neexistuje"
354.3100 + 
354.3101 +-#: nis/ypclnt.c:771
354.3102 ++#: nis/ypclnt.c:794
354.3103 + msgid "No such map in server's domain"
354.3104 + msgstr "Táto mapa sa v doméne servera nenachádza"
354.3105 + 
354.3106 + #. TRANS No process matches the specified process ID.
354.3107 +-#: stdio-common/../sysdeps/gnu/errlist.c:36
354.3108 ++#: stdio-common/../sysdeps/gnu/errlist.c:37
354.3109 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:33
354.3110 + msgid "No such process"
354.3111 + msgstr "Tento proces neexistuje"
354.3112 + 
354.3113 +-#: nis/nis_error.c:60
354.3114 ++#: nis/nis_error.c:61
354.3115 + msgid "Non NIS+ namespace encountered"
354.3116 + msgstr "Zaznamenaný priestor názvov mimo NIS+"
354.3117 + 
354.3118 +-#: posix/../sysdeps/posix/gai_strerror.c:33
354.3119 ++#: posix/../sysdeps/posix/gai_strerror.c:34
354.3120 + msgid "Non-recoverable failure in name resolution"
354.3121 + msgstr "Neopraviteµná chyba pri rie¹ení názvu"
354.3122 + 
354.3123 +-#: nis/nis_print.c:176
354.3124 ++#: nis/nis_print.c:177
354.3125 + msgid "None.\n"
354.3126 + msgstr "®iadne.\n"
354.3127 + 
354.3128 +-#: nis/nis_error.c:48
354.3129 +-msgid "Not Found, no such name"
354.3130 +-msgstr "Nenájdené, takýto názov neexistuje"
354.3131 +-
354.3132 +-#: stdio-common/../sysdeps/gnu/errlist.c:798
354.3133 ++#: stdio-common/../sysdeps/gnu/errlist.c:817
354.3134 + msgid "Not a XENIX named type file"
354.3135 + msgstr "Nejde o pomenovaný XENIX súbor"
354.3136 + 
354.3137 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:107
354.3138 ++msgid "Not a data message"
354.3139 ++msgstr "Nejde o dátovú správu"
354.3140 ++
354.3141 + #. TRANS A file that isn't a directory was specified when a directory is required.
354.3142 +-#: stdio-common/../sysdeps/gnu/errlist.c:152
354.3143 ++#: stdio-common/../sysdeps/gnu/errlist.c:153
354.3144 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:50
354.3145 + msgid "Not a directory"
354.3146 + msgstr "Nie je adresár"
354.3147 + 
354.3148 +-#: nis/nis_error.c:30
354.3149 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:167
354.3150 ++msgid "Not a name file"
354.3151 ++msgstr "Nejde o súbor názvu"
354.3152 ++
354.3153 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:90
354.3154 ++msgid "Not a stream device"
354.3155 ++msgstr "Nejde o prúdové zariadenie"
354.3156 ++
354.3157 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:168
354.3158 ++msgid "Not available"
354.3159 ++msgstr "Nie je k dispozícii"
354.3160 ++
354.3161 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:42
354.3162 ++msgid "Not enough space"
354.3163 ++msgstr "Nedostatok miesta"
354.3164 ++
354.3165 ++#: nis/nis_error.c:31
354.3166 + msgid "Not found"
354.3167 + msgstr "Nenájdené"
354.3168 + 
354.3169 +-#: nis/nis_error.c:43
354.3170 ++#: nis/nis_error.c:49
354.3171 ++msgid "Not found, no such name"
354.3172 ++msgstr "Nenájdené, takýto názov neexistuje"
354.3173 ++
354.3174 ++#: nis/nis_error.c:44
354.3175 + msgid "Not master server for this domain"
354.3176 + msgstr "Nie je hlavný server pre túto doménu"
354.3177 + 
354.3178 +-#: nis/nis_error.c:39
354.3179 ++#: nis/nis_error.c:40
354.3180 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:31
354.3181 + msgid "Not owner"
354.3182 + msgstr "Nie je vlastníkom"
354.3183 + 
354.3184 +-#: nis/nis_print.c:263
354.3185 ++#. TRANS Not supported.  A function returns this error when certain parameter
354.3186 ++#. TRANS values are valid, but the functionality they request is not available.
354.3187 ++#. TRANS This can mean that the function does not implement a particular command
354.3188 ++#. TRANS or option value or flag bit at all.  For functions that operate on some
354.3189 ++#. TRANS object given in a parameter, such as a file descriptor or a port, it
354.3190 ++#. TRANS might instead mean that only @emph{that specific object} (file
354.3191 ++#. TRANS descriptor, port, etc.) is unable to support the other parameters given;
354.3192 ++#. TRANS different file descriptors might support different ranges of parameter
354.3193 ++#. TRANS values.
354.3194 ++#. TRANS
354.3195 ++#. TRANS If the entire function is not available at all in the implementation,
354.3196 ++#. TRANS it returns @code{ENOSYS} instead.
354.3197 ++#: stdio-common/../sysdeps/gnu/errlist.c:592
354.3198 ++msgid "Not supported"
354.3199 ++msgstr "Nie je podporovaný"
354.3200 ++
354.3201 ++#: nis/nis_print.c:264
354.3202 + #, c-format
354.3203 + msgid "Number of Columns   : %d\n"
354.3204 + msgstr "Poèet ståpcov          : %d\n"
354.3205 + 
354.3206 +-#: nis/nis_print.c:358
354.3207 ++#: nis/nis_print.c:363
354.3208 + #, c-format
354.3209 + msgid "Number of objects : %u\n"
354.3210 + msgstr "Poèet objektov       : %u\n"
354.3211 + 
354.3212 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:120
354.3213 ++msgid "Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS"
354.3214 ++msgstr "Poèet symbolických odkazov nájdených poèas prechádzania cesty presahuje MAXSYMLINKS"
354.3215 ++
354.3216 + #. TRANS Domain error; used by mathematical functions when an argument value does
354.3217 + #. TRANS not fall into the domain over which the function is defined.
354.3218 +-#: stdio-common/../sysdeps/gnu/errlist.c:240
354.3219 ++#: stdio-common/../sysdeps/gnu/errlist.c:241
354.3220 + msgid "Numerical argument out of domain"
354.3221 + msgstr "Èíselný rozsah mimo domény definície funkcie"
354.3222 + 
354.3223 + #. TRANS Range error; used by mathematical functions when the result value is
354.3224 + #. TRANS not representable because of overflow or underflow.
354.3225 +-#: stdio-common/../sysdeps/gnu/errlist.c:246
354.3226 ++#: stdio-common/../sysdeps/gnu/errlist.c:247
354.3227 + msgid "Numerical result out of range"
354.3228 + msgstr "Èíselný výsledok mimo povoleného rozsahu"
354.3229 + 
354.3230 +-#: nis/nis_print.c:362
354.3231 ++#: nis/nis_print.c:367
354.3232 + #, c-format
354.3233 + msgid "Object #%d:\n"
354.3234 + msgstr "Objekt #%d:\n"
354.3235 + 
354.3236 +-#: nis/nis_print.c:314
354.3237 ++#: nis/nis_print.c:317
354.3238 + #, c-format
354.3239 + msgid "Object Name   : %s\n"
354.3240 + msgstr "Názov objektu    : %s\n"
354.3241 + 
354.3242 +-#: nis/nis_print.c:324
354.3243 ++#: nis/nis_print.c:329
354.3244 + msgid "Object Type   : "
354.3245 + msgstr "Typ objektu      : "
354.3246 + 
354.3247 +@@ -1793,31 +2826,45 @@
354.3248 + #. TRANS already specifies an NFS-mounted file.
354.3249 + #. TRANS (This is an error on some operating systems, but we expect it to work
354.3250 + #. TRANS properly on the GNU system, making this error code impossible.)
354.3251 +-#: stdio-common/../sysdeps/gnu/errlist.c:514
354.3252 ++#: stdio-common/../sysdeps/gnu/errlist.c:515
354.3253 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:96
354.3254 + msgid "Object is remote"
354.3255 + msgstr "Objekt je vzdialený"
354.3256 + 
354.3257 +-#: nis/nis_error.c:42
354.3258 ++#: nis/nis_error.c:43
354.3259 + msgid "Object with same name exists"
354.3260 + msgstr "Existuje objekt s rovnakým názvom"
354.3261 + 
354.3262 +-#: timezone/zic.c:1995
354.3263 ++#: timezone/zic.c:2022
354.3264 + msgid "Odd number of quotation marks"
354.3265 + msgstr "Nepárny poèet úvodzoviek"
354.3266 + 
354.3267 +-#: nscd/nscd.c:185
354.3268 ++#: elf/ldconfig.c:134
354.3269 ++msgid "Only process directories specified on the command line.  Don't build cache."
354.3270 ++msgstr "Na príkazovom riadku sú zadané iba adresáre procesov. Nevytvára» cache."
354.3271 ++
354.3272 ++#: nscd/nscd.c:200 nscd/nscd.c:220 nscd/nscd.c:226
354.3273 + msgid "Only root is allowed to use this option!"
354.3274 + msgstr "Táto voµba je dostupná iba superu¾ívateµovi!"
354.3275 + 
354.3276 + #. TRANS An operation is already in progress on an object that has non-blocking
354.3277 + #. TRANS mode selected.
354.3278 +-#: stdio-common/../sysdeps/gnu/errlist.c:306
354.3279 ++#: stdio-common/../sysdeps/gnu/errlist.c:307
354.3280 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:179
354.3281 + msgid "Operation already in progress"
354.3282 + msgstr "Operácia je u¾ rozpracovaná"
354.3283 + 
354.3284 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:77
354.3285 ++msgid "Operation canceled"
354.3286 ++msgstr "Operácia zru¹ená"
354.3287 ++
354.3288 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:119
354.3289 ++msgid "Operation not applicable"
354.3290 ++msgstr "Operácia nie je aplikovateµná"
354.3291 ++
354.3292 + #. TRANS Operation not permitted; only the owner of the file (or other resource)
354.3293 + #. TRANS or processes with special privileges can perform the operation.
354.3294 +-#: stdio-common/../sysdeps/gnu/errlist.c:24
354.3295 ++#: stdio-common/../sysdeps/gnu/errlist.c:25
354.3296 + msgid "Operation not permitted"
354.3297 + msgstr "Operácia nie je povolená"
354.3298 + 
354.3299 +@@ -1827,10 +2874,15 @@
354.3300 + #. TRANS error can happen for many calls when the object does not support the
354.3301 + #. TRANS particular operation; it is a generic indication that the server knows
354.3302 + #. TRANS nothing to do for that call.
354.3303 +-#: stdio-common/../sysdeps/gnu/errlist.c:350
354.3304 ++#: stdio-common/../sysdeps/gnu/errlist.c:351
354.3305 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:78
354.3306 + msgid "Operation not supported"
354.3307 + msgstr "Operácia nie je podporovaná"
354.3308 + 
354.3309 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:152
354.3310 ++msgid "Operation not supported on transport endpoint"
354.3311 ++msgstr "Operácia nie je podporovaná na koncovom bode komunikácie"
354.3312 ++
354.3313 + #. TRANS An operation that cannot complete immediately was initiated on an object
354.3314 + #. TRANS that has non-blocking mode selected.  Some functions that must always
354.3315 + #. TRANS block (such as @code{connect}; @pxref{Connecting}) never return
354.3316 +@@ -1839,7 +2891,8 @@
354.3317 + #. TRANS the object before the call completes return @code{EALREADY}.  You can
354.3318 + #. TRANS use the @code{select} function to find out when the pending operation
354.3319 + #. TRANS has completed; @pxref{Waiting for I/O}.
354.3320 +-#: stdio-common/../sysdeps/gnu/errlist.c:300
354.3321 ++#: stdio-common/../sysdeps/gnu/errlist.c:301
354.3322 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:180
354.3323 + msgid "Operation now in progress"
354.3324 + msgstr "Operácia prebieha"
354.3325 + 
354.3326 +@@ -1848,67 +2901,86 @@
354.3327 + #. TRANS
354.3328 + #. TRANS C libraries in many older Unix systems have @code{EWOULDBLOCK} as a
354.3329 + #. TRANS separate error code.
354.3330 +-#: stdio-common/../sysdeps/gnu/errlist.c:288
354.3331 ++#: stdio-common/../sysdeps/gnu/errlist.c:289
354.3332 + msgid "Operation would block"
354.3333 + msgstr "Operácia by blokovala"
354.3334 + 
354.3335 +-#: stdio-common/../sysdeps/gnu/errlist.c:646
354.3336 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:129
354.3337 ++msgid "Option not supported by protocol"
354.3338 ++msgstr "Voµba nie je protokolom podporovaná"
354.3339 ++
354.3340 ++#: locale/programs/localedef.c:103
354.3341 ++msgid "Optional output file prefix"
354.3342 ++msgstr "Voliteµný prefix výstupného súboru"
354.3343 ++
354.3344 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:93
354.3345 ++msgid "Out of stream resources"
354.3346 ++msgstr "Prúdové zdroje vyèerpané"
354.3347 ++
354.3348 ++#: stdio-common/../sysdeps/gnu/errlist.c:665
354.3349 + msgid "Out of streams resources"
354.3350 + msgstr "Prúdové zdroje vyèerpané"
354.3351 + 
354.3352 +-#: iconv/iconv_prog.c:59 locale/programs/localedef.c:101
354.3353 ++#: iconv/iconv_prog.c:60 locale/programs/localedef.c:99
354.3354 + msgid "Output control:"
354.3355 + msgstr "Riadenie výstupu:"
354.3356 + 
354.3357 +-#: elf/sprof.c:76
354.3358 ++#: elf/sprof.c:72
354.3359 + msgid "Output selection:"
354.3360 + msgstr "Výber výstupu:"
354.3361 + 
354.3362 +-#: nis/nis_print.c:316
354.3363 ++#: nis/nis_print.c:319
354.3364 + #, c-format
354.3365 + msgid "Owner         : %s\n"
354.3366 + msgstr "Vlastník         : %s\n"
354.3367 + 
354.3368 +-#: nis/nis_print.c:126
354.3369 ++#: nis/nis_print.c:127
354.3370 + msgid "PRIVATE\n"
354.3371 + msgstr "SÚKROMNÝ\n"
354.3372 + 
354.3373 +-#: stdio-common/../sysdeps/gnu/errlist.c:738
354.3374 ++#: stdio-common/../sysdeps/gnu/errlist.c:757
354.3375 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:95
354.3376 + msgid "Package not installed"
354.3377 + msgstr "Balík nie je nain¹talovaný"
354.3378 + 
354.3379 +-#: nscd/nscd_conf.c:84
354.3380 ++#: nscd/nscd_conf.c:83
354.3381 + #, c-format
354.3382 + msgid "Parse error: %s"
354.3383 + msgstr "Chyba analýzy: %s"
354.3384 + 
354.3385 +-#: nis/nis_error.c:54
354.3386 +-msgid "Partial Success"
354.3387 ++#: nis/nis_error.c:55
354.3388 ++msgid "Partial success"
354.3389 + msgstr "Èiastoèný úspech"
354.3390 + 
354.3391 +-#: nis/nis_error.c:62
354.3392 ++#: nis/nis_error.c:63
354.3393 + msgid "Passed object is not the same object on server"
354.3394 + msgstr "Odovzdaný objekt nie je na serveri tým istým objektom"
354.3395 + 
354.3396 ++#: elf/ldconfig.c:287
354.3397 ++#, c-format
354.3398 ++msgid "Path `%s' given more than once"
354.3399 ++msgstr "Cesta `%s' bola zadaná viac ako raz"
354.3400 ++
354.3401 + #. TRANS Permission denied; the file permissions do not allow the attempted operation.
354.3402 +-#: nis/nis_error.c:38 nis/ypclnt.c:793
354.3403 +-#: stdio-common/../sysdeps/gnu/errlist.c:108
354.3404 ++#: nis/nis_error.c:39 nis/ypclnt.c:816
354.3405 ++#: stdio-common/../sysdeps/gnu/errlist.c:109
354.3406 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:43
354.3407 + msgid "Permission denied"
354.3408 + msgstr "Prístup odmietnutý"
354.3409 + 
354.3410 +-#: sysdeps/unix/sysv/linux/siglist.h:64
354.3411 ++#: sysdeps/generic/siglist.h:71
354.3412 + msgid "Power failure"
354.3413 + msgstr "Výpadok napájania"
354.3414 + 
354.3415 +-#: posix/regex.c:1026
354.3416 ++#: posix/regex.c:1126
354.3417 + msgid "Premature end of regular expression"
354.3418 + msgstr "Predèasný koniec regulérneho výrazu"
354.3419 + 
354.3420 +-#: db2/makedb.c:63
354.3421 +-msgid "Print content of database file, one entry a line"
354.3422 +-msgstr "Vypísa» obsah databázového súboru, jeden záznam na riadok"
354.3423 ++#: elf/ldconfig.c:127
354.3424 ++msgid "Print cache"
354.3425 ++msgstr "Vypísa» cache"
354.3426 + 
354.3427 +-#: nscd/nscd.c:83
354.3428 ++#: nscd/nscd.c:89
354.3429 + msgid "Print current configuration statistic"
354.3430 + msgstr "Vypísa» ¹tatistiku aktuálnej konfigurácie"
354.3431 + 
354.3432 +@@ -1916,243 +2988,259 @@
354.3433 + msgid "Print more messages"
354.3434 + msgstr "Vypísa» viac správ"
354.3435 + 
354.3436 +-#: argp/argp-parse.c:148
354.3437 ++#: argp/argp-parse.c:154
354.3438 + msgid "Print program version"
354.3439 + msgstr "Vypísa» verziu programu"
354.3440 + 
354.3441 +-#: nis/nis_error.c:29
354.3442 ++#: nis/nis_error.c:30
354.3443 + msgid "Probable success"
354.3444 + msgstr "Pravdepodobný úspech"
354.3445 + 
354.3446 +-#: nis/nis_error.c:31
354.3447 ++#: nis/nis_error.c:32
354.3448 + msgid "Probably not found"
354.3449 + msgstr "Pravdepodobne nenájdené"
354.3450 + 
354.3451 +-#: stdio-common/../sysdeps/unix/siglist.c:52
354.3452 +-#: sysdeps/unix/sysv/linux/siglist.h:46
354.3453 ++#: stdio-common/../sysdeps/unix/siglist.c:53 sysdeps/generic/siglist.h:53
354.3454 + msgid "Profiling timer expired"
354.3455 + msgstr "Profilovací èasovaè vypr¹al"
354.3456 + 
354.3457 +-#: stdio-common/../sysdeps/gnu/errlist.c:690
354.3458 ++#: stdio-common/../sysdeps/gnu/errlist.c:709
354.3459 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:72
354.3460 + msgid "Protocol driver not attached"
354.3461 + msgstr "Ovládaè protokolu nepripojený"
354.3462 + 
354.3463 +-#: stdio-common/../sysdeps/gnu/errlist.c:658
354.3464 ++#: stdio-common/../sysdeps/gnu/errlist.c:677
354.3465 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:101
354.3466 + msgid "Protocol error"
354.3467 + msgstr "Chyba protokolu"
354.3468 + 
354.3469 + #. TRANS The socket communications protocol family you requested is not supported.
354.3470 +-#: stdio-common/../sysdeps/gnu/errlist.c:355
354.3471 ++#: stdio-common/../sysdeps/gnu/errlist.c:356
354.3472 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:153
354.3473 + msgid "Protocol family not supported"
354.3474 + msgstr "Rodina protokolov nie je podporovaná"
354.3475 + 
354.3476 + #. TRANS You specified a socket option that doesn't make sense for the
354.3477 + #. TRANS particular protocol being used by the socket.  @xref{Socket Options}.
354.3478 +-#: stdio-common/../sysdeps/gnu/errlist.c:328
354.3479 ++#: stdio-common/../sysdeps/gnu/errlist.c:329
354.3480 + msgid "Protocol not available"
354.3481 + msgstr "Protokol nie je k dispozícii"
354.3482 + 
354.3483 + #. TRANS The socket domain does not support the requested communications protocol
354.3484 + #. TRANS (perhaps because the requested protocol is completely invalid).
354.3485 + #. TRANS @xref{Creating a Socket}.
354.3486 +-#: stdio-common/../sysdeps/gnu/errlist.c:335
354.3487 ++#: stdio-common/../sysdeps/gnu/errlist.c:336
354.3488 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:150
354.3489 + msgid "Protocol not supported"
354.3490 + msgstr "Protokol nie je podporovaný"
354.3491 + 
354.3492 + #. TRANS The socket type does not support the requested communications protocol.
354.3493 +-#: stdio-common/../sysdeps/gnu/errlist.c:322
354.3494 ++#: stdio-common/../sysdeps/gnu/errlist.c:323
354.3495 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:128
354.3496 + msgid "Protocol wrong type for socket"
354.3497 + msgstr "Protokol nie je socketom podporovaný"
354.3498 + 
354.3499 +-#: nis/nis_error.c:64
354.3500 ++#: nis/nis_error.c:65
354.3501 + msgid "Query illegal for named table"
354.3502 + msgstr "Neprípustná otázka pre danú tabuµku"
354.3503 + 
354.3504 +-#: stdio-common/../sysdeps/unix/siglist.c:28
354.3505 +-#: sysdeps/unix/sysv/linux/siglist.h:24
354.3506 ++#: stdio-common/../sysdeps/unix/siglist.c:29 sysdeps/generic/siglist.h:31
354.3507 + msgid "Quit"
354.3508 + msgstr "Koniec"
354.3509 + 
354.3510 +-#: stdio-common/../sysdeps/gnu/errlist.c:754
354.3511 ++#: stdio-common/../sysdeps/gnu/errlist.c:773
354.3512 + msgid "RFS specific error"
354.3513 + msgstr "RFS-¹pecifická chyba"
354.3514 + 
354.3515 + #. TRANS ???
354.3516 +-#: stdio-common/../sysdeps/gnu/errlist.c:539
354.3517 ++#: stdio-common/../sysdeps/gnu/errlist.c:540
354.3518 + msgid "RPC bad procedure for program"
354.3519 + msgstr "Chybná RPC procedúra pre program"
354.3520 + 
354.3521 +-#: nis/ypclnt.c:767
354.3522 ++#: nis/ypclnt.c:790
354.3523 + msgid "RPC failure on NIS operation"
354.3524 + msgstr "Zlyhal RPC pri NIS operácii"
354.3525 + 
354.3526 + #. TRANS ???
354.3527 +-#: stdio-common/../sysdeps/gnu/errlist.c:529
354.3528 ++#: stdio-common/../sysdeps/gnu/errlist.c:530
354.3529 + msgid "RPC program not available"
354.3530 + msgstr "RPC program nie je k dispozícii"
354.3531 + 
354.3532 + #. TRANS ???
354.3533 +-#: stdio-common/../sysdeps/gnu/errlist.c:534
354.3534 ++#: stdio-common/../sysdeps/gnu/errlist.c:535
354.3535 + msgid "RPC program version wrong"
354.3536 + msgstr "Chybná verzia RPC programu"
354.3537 + 
354.3538 + #. TRANS ???
354.3539 +-#: stdio-common/../sysdeps/gnu/errlist.c:519
354.3540 ++#: stdio-common/../sysdeps/gnu/errlist.c:520
354.3541 + msgid "RPC struct is bad"
354.3542 + msgstr "RPC ¹truktúra je chybná"
354.3543 + 
354.3544 + #. TRANS ???
354.3545 +-#: stdio-common/../sysdeps/gnu/errlist.c:524
354.3546 ++#: stdio-common/../sysdeps/gnu/errlist.c:525
354.3547 + msgid "RPC version wrong"
354.3548 + msgstr "Chybná verzia RPC"
354.3549 + 
354.3550 +-#: sunrpc/clnt_perr.c:215
354.3551 ++#: sunrpc/clnt_perr.c:271
354.3552 + msgid "RPC: (unknown error code)"
354.3553 + msgstr "RPC: (neznámny chybový kód)"
354.3554 + 
354.3555 +-#: sunrpc/clnt_perr.c:176
354.3556 ++#: sunrpc/clnt_perr.c:190
354.3557 + msgid "RPC: Authentication error"
354.3558 + msgstr "RPC: Chyba pri overení práv"
354.3559 + 
354.3560 +-#: sunrpc/clnt_perr.c:166
354.3561 ++#: sunrpc/clnt_perr.c:170
354.3562 + msgid "RPC: Can't decode result"
354.3563 + msgstr "RPC: Nie je mo¾né dekódova» výsledok"
354.3564 + 
354.3565 +-#: sunrpc/clnt_perr.c:164
354.3566 ++#: sunrpc/clnt_perr.c:166
354.3567 + msgid "RPC: Can't encode arguments"
354.3568 + msgstr "RPC: Nie je mo¾né zakódova» argumenty"
354.3569 + 
354.3570 +-#: sunrpc/clnt_perr.c:196
354.3571 ++#: sunrpc/clnt_perr.c:230
354.3572 + msgid "RPC: Failed (unspecified error)"
354.3573 + msgstr "RPC: Zlyhalo (ne¹pecifikovaná chyba)"
354.3574 + 
354.3575 +-#: sunrpc/clnt_perr.c:174
354.3576 ++#: sunrpc/clnt_perr.c:186
354.3577 + msgid "RPC: Incompatible versions of RPC"
354.3578 + msgstr "RPC: Nekompatibilné verzie RPC"
354.3579 + 
354.3580 +-#: sunrpc/clnt_perr.c:192
354.3581 ++#: sunrpc/clnt_perr.c:222
354.3582 + msgid "RPC: Port mapper failure"
354.3583 + msgstr "RPC: Chyba portmappera"
354.3584 + 
354.3585 +-#: sunrpc/clnt_perr.c:182
354.3586 ++#: sunrpc/clnt_perr.c:202
354.3587 + msgid "RPC: Procedure unavailable"
354.3588 + msgstr "RPC: Procedúra nie je k dispozícii"
354.3589 + 
354.3590 +-#: sunrpc/clnt_perr.c:194
354.3591 ++#: sunrpc/clnt_perr.c:226
354.3592 + msgid "RPC: Program not registered"
354.3593 + msgstr "RPC: Program nie je registrovaný"
354.3594 + 
354.3595 +-#: sunrpc/clnt_perr.c:178
354.3596 ++#: sunrpc/clnt_perr.c:194
354.3597 + msgid "RPC: Program unavailable"
354.3598 + msgstr "RPC: Program nie je k dispozícii"
354.3599 + 
354.3600 +-#: sunrpc/clnt_perr.c:180
354.3601 ++#: sunrpc/clnt_perr.c:198
354.3602 + msgid "RPC: Program/version mismatch"
354.3603 + msgstr "RPC: Nesúhlasí program alebo verzia"
354.3604 + 
354.3605 +-#: sunrpc/clnt_perr.c:186
354.3606 ++#: sunrpc/clnt_perr.c:210
354.3607 + msgid "RPC: Remote system error"
354.3608 + msgstr "RPC: Chyba vzdialeného systému"
354.3609 + 
354.3610 +-#: sunrpc/clnt_perr.c:184
354.3611 ++#: sunrpc/clnt_perr.c:206
354.3612 + msgid "RPC: Server can't decode arguments"
354.3613 + msgstr "RPC: Server nemô¾e dekódova» argumenty"
354.3614 + 
354.3615 +-#: sunrpc/clnt_perr.c:162
354.3616 ++#: sunrpc/clnt_perr.c:163
354.3617 + msgid "RPC: Success"
354.3618 + msgstr "RPC: Úspech"
354.3619 + 
354.3620 +-#: sunrpc/clnt_perr.c:172
354.3621 ++#: sunrpc/clnt_perr.c:182
354.3622 + msgid "RPC: Timed out"
354.3623 + msgstr "RPC: Èasovaè vypr¹al"
354.3624 + 
354.3625 +-#: sunrpc/clnt_perr.c:170
354.3626 ++#: sunrpc/clnt_perr.c:178
354.3627 + msgid "RPC: Unable to receive"
354.3628 + msgstr "RPC: Nie je mo¾né prijíma»"
354.3629 + 
354.3630 +-#: sunrpc/clnt_perr.c:168
354.3631 ++#: sunrpc/clnt_perr.c:174
354.3632 + msgid "RPC: Unable to send"
354.3633 + msgstr "RPC: Nie je mo¾né vysiela»"
354.3634 + 
354.3635 +-#: sunrpc/clnt_perr.c:188
354.3636 ++#: sunrpc/clnt_perr.c:214
354.3637 + msgid "RPC: Unknown host"
354.3638 + msgstr "RPC: Neznámy poèítaè"
354.3639 + 
354.3640 +-#: sunrpc/clnt_perr.c:190
354.3641 ++#: sunrpc/clnt_perr.c:218
354.3642 + msgid "RPC: Unknown protocol"
354.3643 + msgstr "RPC: Neznámy protokol"
354.3644 + 
354.3645 +-#: nis/nis_print.c:184
354.3646 ++#: nis/nis_print.c:185
354.3647 + #, c-format
354.3648 + msgid "RSA (%d bits)\n"
354.3649 + msgstr "RSA (%d bitov)\n"
354.3650 + 
354.3651 +-#: elf/dlsym.c:59 elf/dlvsym.c:62
354.3652 ++#: elf/dl-sym.c:68 elf/dl-sym.c:125
354.3653 + msgid "RTLD_NEXT used in code not dynamically loaded"
354.3654 + msgstr "RTLD_NEXT je pou¾ité pre kód, ktorý nie je dynamicky zavedený"
354.3655 + 
354.3656 +-#: elf/sprof.c:88
354.3657 ++#: elf/sprof.c:84
354.3658 + msgid "Read and display shared object profiling data"
354.3659 + msgstr "Preèíta» a vypísa» profilovacie údaje zdieµaného objektu"
354.3660 + 
354.3661 +-#: nscd/nscd.c:78
354.3662 ++#: nscd/nscd.c:84
354.3663 + msgid "Read configuration data from NAME"
354.3664 + msgstr "Naèíta» údaje o konfigurácii z NÁZOV"
354.3665 + 
354.3666 + #. TRANS An attempt was made to modify something on a read-only file system.
354.3667 +-#: stdio-common/../sysdeps/gnu/errlist.c:218
354.3668 ++#: stdio-common/../sysdeps/gnu/errlist.c:219
354.3669 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:60
354.3670 + msgid "Read-only file system"
354.3671 + msgstr "Súborový systém dovoµuje len èítanie"
354.3672 + 
354.3673 +-#: string/strsignal.c:66
354.3674 ++#: string/strsignal.c:67
354.3675 + #, c-format
354.3676 + msgid "Real-time signal %d"
354.3677 + msgstr "Signál reálneho èasu %d"
354.3678 + 
354.3679 +-#: posix/regex.c:1027
354.3680 ++#: posix/regex.c:1129
354.3681 + msgid "Regular expression too big"
354.3682 + msgstr "Regulérny výraz príli¹ veµký"
354.3683 + 
354.3684 +-#: stdio-common/../sysdeps/gnu/errlist.c:810
354.3685 ++#: stdio-common/../sysdeps/gnu/errlist.c:829
354.3686 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:170
354.3687 + msgid "Remote I/O error"
354.3688 + msgstr "Vzdialená V/V chyba"
354.3689 + 
354.3690 +-#: stdio-common/../sysdeps/gnu/errlist.c:766
354.3691 ++#: stdio-common/../sysdeps/gnu/errlist.c:785
354.3692 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:112
354.3693 + msgid "Remote address changed"
354.3694 + msgstr "Vzdialená adresa sa zmenila"
354.3695 + 
354.3696 +-#: inet/ruserpass.c:162
354.3697 ++#: inet/ruserpass.c:182
354.3698 + msgid "Remove password or make file unreadable by others."
354.3699 + msgstr "Odstráòte heslo alebo zaká¾te èítanie súboru ostatnými."
354.3700 + 
354.3701 +-#: elf/sprof.c:537
354.3702 ++#: elf/cache.c:394
354.3703 ++#, c-format
354.3704 ++msgid "Renaming of %s to %s failed"
354.3705 ++msgstr "Premenovanie %s na %s zlyhalo"
354.3706 ++
354.3707 ++#: elf/sprof.c:532
354.3708 + #, c-format
354.3709 + msgid "Reopening shared object `%s' failed"
354.3710 + msgstr "Znovuotvorenie zdieµaného objektu `%s' zlyhalo"
354.3711 + 
354.3712 +-#: nis/nis_print.c:170
354.3713 ++#: nis/nis_print.c:171
354.3714 + msgid "Replicate :\n"
354.3715 + msgstr "Replika      :\n"
354.3716 + 
354.3717 +-#: argp/argp-help.c:1638
354.3718 ++#: argp/argp-help.c:1639
354.3719 + #, c-format
354.3720 + msgid "Report bugs to %s.\n"
354.3721 + msgstr "Chyby hláste na adrese %s.\n"
354.3722 + 
354.3723 +-#: catgets/gencat.c:223 db2/makedb.c:229 iconv/iconv_prog.c:280
354.3724 +-#: locale/programs/locale.c:254 locale/programs/localedef.c:389
354.3725 ++#: catgets/gencat.c:233 debug/pcprofiledump.c:181 iconv/iconv_prog.c:337
354.3726 ++#: locale/programs/locale.c:256 locale/programs/localedef.c:297
354.3727 ++#: malloc/memusagestat.c:602
354.3728 + msgid "Report bugs using the `glibcbug' script to <bugs@gnu.org>.\n"
354.3729 + msgstr "Chyby hláste na adrese <bugs@gnu.org> - pou¾ite skript `glibcbug'.\n"
354.3730 + 
354.3731 +-#: nis/ypclnt.c:765
354.3732 ++#: nis/ypclnt.c:788
354.3733 + msgid "Request arguments bad"
354.3734 + msgstr "Chybné argumenty ¾iadosti"
354.3735 + 
354.3736 +-#: resolv/herror.c:73
354.3737 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:171
354.3738 ++msgid "Reserved for future use"
354.3739 ++msgstr "Rezervované pre budúce pou¾itie"
354.3740 ++
354.3741 ++#: resolv/herror.c:67
354.3742 + msgid "Resolver Error 0 (no error)"
354.3743 + msgstr "Chyba resolvera 0 (¾iadna chyba)"
354.3744 + 
354.3745 +-#: resolv/herror.c:117
354.3746 ++#: resolv/herror.c:107
354.3747 + msgid "Resolver internal error"
354.3748 + msgstr "Vnútorná chyba resolvera"
354.3749 + 
354.3750 +@@ -2160,11 +3248,11 @@
354.3751 + #. TRANS deadlock situation.  The system does not guarantee that it will notice
354.3752 + #. TRANS all such situations.  This error means you got lucky and the system
354.3753 + #. TRANS noticed; it might just hang.  @xref{File Locks}, for an example.
354.3754 +-#: stdio-common/../sysdeps/gnu/errlist.c:97
354.3755 ++#: stdio-common/../sysdeps/gnu/errlist.c:98
354.3756 + msgid "Resource deadlock avoided"
354.3757 + msgstr "Bolo zabránené vzájomnému zablokovaniu"
354.3758 + 
354.3759 +-#: stdio-common/../sysdeps/unix/siglist.c:54
354.3760 ++#: stdio-common/../sysdeps/unix/siglist.c:55 sysdeps/generic/siglist.h:74
354.3761 + msgid "Resource lost"
354.3762 + msgstr "Zdroj bol stratený"
354.3763 + 
354.3764 +@@ -2197,76 +3285,83 @@
354.3765 + #. TRANS so usually an interactive program should report the error to the user
354.3766 + #. TRANS and return to its command loop.
354.3767 + #. TRANS @end itemize
354.3768 +-#: stdio-common/../sysdeps/gnu/errlist.c:279
354.3769 ++#: stdio-common/../sysdeps/gnu/errlist.c:280
354.3770 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:41
354.3771 + msgid "Resource temporarily unavailable"
354.3772 + msgstr "Zdroj je doèasne neprístupný"
354.3773 + 
354.3774 +-#: nis/nis_error.c:47
354.3775 +-msgid "Results Sent to callback proc"
354.3776 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:64
354.3777 ++msgid "Result too large"
354.3778 ++msgstr "Výsledok je príli¹ veµký"
354.3779 ++
354.3780 ++#: nis/nis_error.c:48
354.3781 ++msgid "Results sent to callback proc"
354.3782 + msgstr "Výsledky poslané procedúre spätného volania"
354.3783 + 
354.3784 +-#: elf/sprof.c:91
354.3785 ++#: elf/sprof.c:87
354.3786 + msgid "SHOBJ [PROFDATA]"
354.3787 + msgstr "ZDIE¥_OBJEKT [PROF_ÚDAJE]"
354.3788 + 
354.3789 +-#: nis/nis_print.c:33
354.3790 ++#: nis/nis_print.c:34
354.3791 + msgid "SUNYP"
354.3792 + msgstr "SUNYP"
354.3793 + 
354.3794 +-#: nis/nis_print.c:265
354.3795 ++#: nis/nis_print.c:266
354.3796 + #, c-format
354.3797 + msgid "Search Path         : %s\n"
354.3798 + msgstr "Prehµadávaná cesta     : %s\n"
354.3799 + 
354.3800 +-#: stdio-common/../sysdeps/unix/siglist.c:36
354.3801 +-#: sysdeps/unix/sysv/linux/siglist.h:31
354.3802 ++#: stdio-common/../sysdeps/unix/siglist.c:37 sysdeps/generic/siglist.h:38
354.3803 + msgid "Segmentation fault"
354.3804 + msgstr "Chyba segmentácie"
354.3805 + 
354.3806 +-#: nis/nis_error.c:35
354.3807 ++#: nis/nis_error.c:36
354.3808 + msgid "Server busy, try again"
354.3809 + msgstr "Server zaneprázdnený, skúste znovu"
354.3810 + 
354.3811 +-#: nis/nis_error.c:41
354.3812 ++#: nis/nis_error.c:42
354.3813 + msgid "Server out of memory"
354.3814 + msgstr "Vyèerpaná pamä» servera"
354.3815 + 
354.3816 +-#: sunrpc/clnt_perr.c:277
354.3817 ++#: sunrpc/clnt_perr.c:336
354.3818 + msgid "Server rejected credential"
354.3819 + msgstr "Server odmietol oprávnenie"
354.3820 + 
354.3821 +-#: sunrpc/clnt_perr.c:281
354.3822 ++#: sunrpc/clnt_perr.c:344
354.3823 + msgid "Server rejected verifier"
354.3824 + msgstr "Server odmietol overenie"
354.3825 + 
354.3826 +-#: posix/../sysdeps/posix/gai_strerror.c:38
354.3827 ++#: posix/../sysdeps/posix/gai_strerror.c:39
354.3828 + msgid "Servname not supported for ai_socktype"
354.3829 + msgstr "Servname nie je pre ai_socktype podporovaná"
354.3830 + 
354.3831 +-#: argp/argp-parse.c:89
354.3832 ++#: argp/argp-parse.c:95
354.3833 + msgid "Set the program name"
354.3834 + msgstr "Nastavi» názov programu"
354.3835 + 
354.3836 +-#: nscd/nscd.c:82
354.3837 ++#: nscd/nscd.c:88
354.3838 + msgid "Shut the server down"
354.3839 + msgstr "Zastavi» server"
354.3840 + 
354.3841 +-#: stdio-common/../sysdeps/unix/siglist.c:25
354.3842 ++#: stdio-common/../sysdeps/unix/siglist.c:26
354.3843 + msgid "Signal 0"
354.3844 + msgstr "Signál 0"
354.3845 + 
354.3846 + #. TRANS A file that isn't a socket was specified when a socket is required.
354.3847 +-#: stdio-common/../sysdeps/gnu/errlist.c:311
354.3848 ++#: stdio-common/../sysdeps/gnu/errlist.c:312
354.3849 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:125
354.3850 + msgid "Socket operation on non-socket"
354.3851 + msgstr "Socketová operácia na objekte, ktorý nie je socket"
354.3852 + 
354.3853 + #. TRANS The socket type is not supported.
354.3854 +-#: stdio-common/../sysdeps/gnu/errlist.c:340
354.3855 ++#: stdio-common/../sysdeps/gnu/errlist.c:341
354.3856 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:151
354.3857 + msgid "Socket type not supported"
354.3858 + msgstr "Typ socketu nie je podporovaný"
354.3859 + 
354.3860 + #. TRANS A network connection was aborted locally.
354.3861 +-#: stdio-common/../sysdeps/gnu/errlist.c:394
354.3862 ++#: stdio-common/../sysdeps/gnu/errlist.c:395
354.3863 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:160
354.3864 + msgid "Software caused connection abort"
354.3865 + msgstr "Software spôsobil zru¹enie spojenia"
354.3866 + 
354.3867 +@@ -2274,15 +3369,16 @@
354.3868 + msgid "Sorry. You are not root\n"
354.3869 + msgstr "Bohu¾iaµ - nie ste superu¾ívateµ\n"
354.3870 + 
354.3871 +-#: locale/programs/localedef.c:97
354.3872 ++#: locale/programs/localedef.c:95
354.3873 + msgid "Source definitions are found in FILE"
354.3874 + msgstr "Zdrojové definície sa nachádzajú v SÚBORe"
354.3875 + 
354.3876 +-#: stdio-common/../sysdeps/gnu/errlist.c:746
354.3877 ++#: stdio-common/../sysdeps/gnu/errlist.c:765
354.3878 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:99
354.3879 + msgid "Srmount error"
354.3880 + msgstr "Chyba srmount"
354.3881 + 
354.3882 +-#: sysdeps/unix/sysv/linux/siglist.h:59
354.3883 ++#: sysdeps/generic/siglist.h:66
354.3884 + msgid "Stack fault"
354.3885 + msgstr "Chyba zásobníka"
354.3886 + 
354.3887 +@@ -2290,73 +3386,75 @@
354.3888 + #. TRANS system which is due to file system rearrangements on the server host.
354.3889 + #. TRANS Repairing this condition usually requires unmounting and remounting
354.3890 + #. TRANS the NFS file system on the local host.
354.3891 +-#: stdio-common/../sysdeps/gnu/errlist.c:506
354.3892 ++#: stdio-common/../sysdeps/gnu/errlist.c:507
354.3893 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:181
354.3894 + msgid "Stale NFS file handle"
354.3895 + msgstr "Zastaralý odkaz na NFS súbor"
354.3896 + 
354.3897 +-#: nscd/nscd.c:81
354.3898 ++#: nscd/nscd.c:87
354.3899 + msgid "Start NUMBER threads"
354.3900 + msgstr "Spusti» POÈET vlákien"
354.3901 + 
354.3902 +-#: nis/nis_print.c:357
354.3903 ++#: nis/nis_print.c:362
354.3904 + #, c-format
354.3905 + msgid "Status            : %s\n"
354.3906 + msgstr "Stav                 : %s\n"
354.3907 + 
354.3908 +-#: stdio-common/../sysdeps/unix/siglist.c:43
354.3909 +-#: sysdeps/unix/sysv/linux/siglist.h:37
354.3910 ++#: stdio-common/../sysdeps/unix/siglist.c:44 sysdeps/generic/siglist.h:44
354.3911 + msgid "Stopped"
354.3912 + msgstr "Zastavené"
354.3913 + 
354.3914 +-#: stdio-common/../sysdeps/unix/siglist.c:42
354.3915 +-#: sysdeps/unix/sysv/linux/siglist.h:36
354.3916 ++#: stdio-common/../sysdeps/unix/siglist.c:43 sysdeps/generic/siglist.h:43
354.3917 + msgid "Stopped (signal)"
354.3918 + msgstr "Zastavené (signál)"
354.3919 + 
354.3920 +-#: stdio-common/../sysdeps/unix/siglist.c:46
354.3921 +-#: sysdeps/unix/sysv/linux/siglist.h:40
354.3922 ++#: stdio-common/../sysdeps/unix/siglist.c:47 sysdeps/generic/siglist.h:47
354.3923 + msgid "Stopped (tty input)"
354.3924 + msgstr "Zastavené (vstup z terminálu)"
354.3925 + 
354.3926 +-#: stdio-common/../sysdeps/unix/siglist.c:47
354.3927 +-#: sysdeps/unix/sysv/linux/siglist.h:41
354.3928 ++#: stdio-common/../sysdeps/unix/siglist.c:48 sysdeps/generic/siglist.h:48
354.3929 + msgid "Stopped (tty output)"
354.3930 + msgstr "Zastavené (výstup na terminál)"
354.3931 + 
354.3932 +-#: stdio-common/../sysdeps/gnu/errlist.c:790
354.3933 ++#: stdio-common/../sysdeps/gnu/errlist.c:809
354.3934 + msgid "Streams pipe error"
354.3935 + msgstr "Chyba rúry prúdov"
354.3936 + 
354.3937 +-#: stdio-common/../sysdeps/gnu/errlist.c:794
354.3938 ++#: stdio-common/../sysdeps/gnu/errlist.c:813
354.3939 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:165
354.3940 + msgid "Structure needs cleaning"
354.3941 + msgstr "©truktúra potrebuje opravu"
354.3942 + 
354.3943 +-#: nis/nis_error.c:28 nis/ypclnt.c:763 nis/ypclnt.c:837 posix/regex.c:1012
354.3944 +-#: stdio-common/../sysdeps/gnu/errlist.c:19
354.3945 ++#: nis/nis_error.c:29 nis/ypclnt.c:786 nis/ypclnt.c:860 posix/regex.c:1084
354.3946 ++#: stdio-common/../sysdeps/gnu/errlist.c:20
354.3947 + msgid "Success"
354.3948 + msgstr "Úspech"
354.3949 + 
354.3950 ++#: nss/getent.c:703
354.3951 ++msgid "Supported databases:"
354.3952 ++msgstr "Podporované databázy:"
354.3953 ++
354.3954 + #: locale/programs/localedef.c:106
354.3955 + msgid "Suppress warnings and information messages"
354.3956 + msgstr "Potlaèi» varovné a informaèné správy"
354.3957 + 
354.3958 +-#: locale/programs/localedef.c:96
354.3959 ++#: locale/programs/localedef.c:94
354.3960 + msgid "Symbolic character names defined in FILE"
354.3961 + msgstr "Symbolické názvy znakov sú definované v SÚBORe"
354.3962 + 
354.3963 +-#: posix/../sysdeps/posix/gai_strerror.c:40
354.3964 ++#: posix/../sysdeps/posix/gai_strerror.c:41
354.3965 + msgid "System error"
354.3966 + msgstr "Chyba systému"
354.3967 + 
354.3968 +-#: locale/programs/locale.c:63
354.3969 ++#: locale/programs/locale.c:65
354.3970 + msgid "System information:"
354.3971 + msgstr "Systémové informácie:"
354.3972 + 
354.3973 +-#: nis/ypclnt.c:843
354.3974 ++#: nis/ypclnt.c:866
354.3975 + msgid "System resource allocation failure"
354.3976 + msgstr "Pridelenie systémových zdrojov zlyhalo"
354.3977 + 
354.3978 +-#: locale/programs/localedef.c:384
354.3979 ++#: locale/programs/localedef.c:292
354.3980 + #, c-format
354.3981 + msgid ""
354.3982 + "System's directory for character maps : %s\n"
354.3983 +@@ -2369,21 +3467,28 @@
354.3984 + "                      cestu locale    : %s\n"
354.3985 + "%s"
354.3986 + 
354.3987 +-#: nis/nis_print.c:117
354.3988 ++#: nscd/nscd.c:90
354.3989 ++msgid "TABLE"
354.3990 ++msgstr "TABU¥KA"
354.3991 ++
354.3992 ++#: nis/nis_print.c:118
354.3993 + msgid "TABLE\n"
354.3994 + msgstr "TABU¥KA\n"
354.3995 + 
354.3996 +-#: nis/nis_print.c:262
354.3997 ++#: nscd/nscd.c:92
354.3998 ++msgid "TABLE,yes"
354.3999 ++msgstr "TABU¥KA,áno"
354.4000 ++
354.4001 ++#: nis/nis_print.c:263
354.4002 + #, c-format
354.4003 + msgid "Table Type          : %s\n"
354.4004 + msgstr "Typ tabuµky            : %s\n"
354.4005 + 
354.4006 +-#: posix/../sysdeps/posix/gai_strerror.c:31
354.4007 ++#: posix/../sysdeps/posix/gai_strerror.c:32
354.4008 + msgid "Temporary failure in name resolution"
354.4009 + msgstr "Doèasná chyba pri rie¹ení názvu"
354.4010 + 
354.4011 +-#: stdio-common/../sysdeps/unix/siglist.c:40
354.4012 +-#: sysdeps/unix/sysv/linux/siglist.h:34
354.4013 ++#: stdio-common/../sysdeps/unix/siglist.c:41 sysdeps/generic/siglist.h:41
354.4014 + msgid "Terminated"
354.4015 + msgstr "Ukonèené"
354.4016 + 
354.4017 +@@ -2392,52 +3497,58 @@
354.4018 + #. TRANS debugger to run a program is considered having it open for writing and
354.4019 + #. TRANS will cause this error.  (The name stands for ``text file busy''.)  This
354.4020 + #. TRANS is not an error in the GNU system; the text is copied as necessary.
354.4021 +-#: stdio-common/../sysdeps/gnu/errlist.c:197
354.4022 ++#: stdio-common/../sysdeps/gnu/errlist.c:198
354.4023 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:56
354.4024 + msgid "Text file busy"
354.4025 + msgstr "Spustiteµný súbor je pou¾ívaný"
354.4026 + 
354.4027 +-#: iconv/iconv_prog.c:536
354.4028 ++#: iconv/iconv_prog.c:627
354.4029 + msgid ""
354.4030 + "The following list contain all the coded character sets known.  This does\n"
354.4031 + "not necessarily mean that all combinations of these names can be used for\n"
354.4032 + "the FROM and TO command line parameters.  One coded character set can be\n"
354.4033 + "listed with several different names (aliases).\n"
354.4034 +-"  Some of the names are no plain strings but instead regular expressions and\n"
354.4035 +-"they match a variety of names which can be given as parameters to the\n"
354.4036 +-"program.\n"
354.4037 + "\n"
354.4038 + "  "
354.4039 + msgstr ""
354.4040 + "Nasledujúci zoznam obsahuje v¹etky známe znakové sady. To nutne neznamená,\n"
354.4041 + "¾e v¹etky kombinácie týchto názvov mô¾u by» pou¾ité pre argumenty Z a DO.\n"
354.4042 + "Jedna sada znakov mô¾e by» uvedená pod viacerými názvami (aliasmi).\n"
354.4043 +-"  Niektoré z názvov nie sú obyèajné re»azce, ale regulárne výrazy, ktoré\n"
354.4044 +-"¹pecifikujú mo¾né parametre programu.\n"
354.4045 + "\n"
354.4046 + "  "
354.4047 + 
354.4048 +-#: nis/nis_print.c:223
354.4049 ++#: sunrpc/rpc_main.c:1364
354.4050 ++msgid "This implementation doesn't support newstyle or MT-safe code!\n"
354.4051 ++msgstr "Táto implementácia nepodporuje nový ¹týl alebo MT-bezpeèný kód!\n"
354.4052 ++
354.4053 ++#: nis/nis_print.c:224
354.4054 + msgid "Time to live : "
354.4055 + msgstr "®ivotnos»       : "
354.4056 + 
354.4057 +-#: stdio-common/../sysdeps/gnu/errlist.c:662
354.4058 ++#: stdio-common/../sysdeps/gnu/errlist.c:681
354.4059 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:92
354.4060 + msgid "Timer expired"
354.4061 + msgstr "Èasovaè vypr¹al"
354.4062 + 
354.4063 +-#: nis/nis_error.c:55
354.4064 +-msgid "Too Many Attributes"
354.4065 ++#: malloc/memusagestat.c:54
354.4066 ++msgid "Title string used in output graphic"
354.4067 ++msgstr "Titulok pou¾itý pre výstupný graf"
354.4068 ++
354.4069 ++#: nis/nis_error.c:56
354.4070 ++msgid "Too many attributes"
354.4071 + msgstr "Priveµa atribútov"
354.4072 + 
354.4073 + #. TRANS Too many levels of symbolic links were encountered in looking up a file name.
354.4074 + #. TRANS This often indicates a cycle of symbolic links.
354.4075 +-#: stdio-common/../sysdeps/gnu/errlist.c:457
354.4076 ++#: stdio-common/../sysdeps/gnu/errlist.c:458
354.4077 + msgid "Too many levels of symbolic links"
354.4078 + msgstr "Priveµa úrovní symbolických odkazov"
354.4079 + 
354.4080 + #. TRANS Too many links; the link count of a single file would become too large.
354.4081 + #. TRANS @code{rename} can cause this error if the file being renamed already has
354.4082 + #. TRANS as many links as it can take (@pxref{Renaming Files}).
354.4083 +-#: stdio-common/../sysdeps/gnu/errlist.c:225
354.4084 ++#: stdio-common/../sysdeps/gnu/errlist.c:226
354.4085 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:61
354.4086 + msgid "Too many links"
354.4087 + msgstr "Priveµa odkazov"
354.4088 + 
354.4089 +@@ -2448,54 +3559,57 @@
354.4090 + #. TRANS limit that can usually be increased.  If you get this error, you might
354.4091 + #. TRANS want to increase the @code{RLIMIT_NOFILE} limit or make it unlimited;
354.4092 + #. TRANS @pxref{Limits on Resources}.
354.4093 +-#: stdio-common/../sysdeps/gnu/errlist.c:175
354.4094 ++#: stdio-common/../sysdeps/gnu/errlist.c:176
354.4095 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:54
354.4096 + msgid "Too many open files"
354.4097 + msgstr "Priveµa otvorených súborov"
354.4098 + 
354.4099 + #. TRANS There are too many distinct file openings in the entire system.  Note
354.4100 + #. TRANS that any number of linked channels count as just one file opening; see
354.4101 + #. TRANS @ref{Linked Channels}.  This error never occurs in the GNU system.
354.4102 +-#: stdio-common/../sysdeps/gnu/errlist.c:182
354.4103 ++#: stdio-common/../sysdeps/gnu/errlist.c:183
354.4104 + msgid "Too many open files in system"
354.4105 + msgstr "Priveµa otvorených súborov v systéme"
354.4106 + 
354.4107 + #. TRANS This means that the per-user limit on new process would be exceeded by
354.4108 + #. TRANS an attempted @code{fork}.  @xref{Limits on Resources}, for details on
354.4109 + #. TRANS the @code{RLIMIT_NPROC} limit.
354.4110 +-#: stdio-common/../sysdeps/gnu/errlist.c:487
354.4111 ++#: stdio-common/../sysdeps/gnu/errlist.c:488
354.4112 + msgid "Too many processes"
354.4113 + msgstr "Priveµa procesov"
354.4114 + 
354.4115 + #. TRANS ???
354.4116 +-#: stdio-common/../sysdeps/gnu/errlist.c:439
354.4117 ++#: stdio-common/../sysdeps/gnu/errlist.c:440
354.4118 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:174
354.4119 + msgid "Too many references: cannot splice"
354.4120 + msgstr "Priveµa odkazov - nie je mo¾né rozdeli»"
354.4121 + 
354.4122 + #. TRANS The file quota system is confused because there are too many users.
354.4123 + #. TRANS @c This can probably happen in a GNU system when using NFS.
354.4124 +-#: stdio-common/../sysdeps/gnu/errlist.c:493
354.4125 ++#: stdio-common/../sysdeps/gnu/errlist.c:494
354.4126 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:124
354.4127 + msgid "Too many users"
354.4128 + msgstr "Priveµa pou¾ívateµov"
354.4129 + 
354.4130 +-#: stdio-common/../sysdeps/unix/siglist.c:30
354.4131 +-#: sysdeps/unix/sysv/linux/siglist.h:26
354.4132 ++#: stdio-common/../sysdeps/unix/siglist.c:31 sysdeps/generic/siglist.h:33
354.4133 + msgid "Trace/breakpoint trap"
354.4134 + msgstr "Trasovacie/ladiace preru¹enie"
354.4135 + 
354.4136 +-#: posix/regex.c:1017
354.4137 ++#: posix/regex.c:1099
354.4138 + msgid "Trailing backslash"
354.4139 + msgstr "Koncové spätné lomítko"
354.4140 + 
354.4141 + #. TRANS In the GNU system, opening a file returns this error when the file is
354.4142 + #. TRANS translated by a program and the translator program dies while starting
354.4143 + #. TRANS up, before it has connected to the file.
354.4144 +-#: stdio-common/../sysdeps/gnu/errlist.c:596
354.4145 ++#: stdio-common/../sysdeps/gnu/errlist.c:615
354.4146 + msgid "Translator died"
354.4147 + msgstr "Prekladací program skonèil"
354.4148 + 
354.4149 + #. TRANS You tried to connect a socket that is already connected.
354.4150 + #. TRANS @xref{Connecting}.
354.4151 +-#: stdio-common/../sysdeps/gnu/errlist.c:414
354.4152 ++#: stdio-common/../sysdeps/gnu/errlist.c:415
354.4153 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:163
354.4154 + msgid "Transport endpoint is already connected"
354.4155 + msgstr "Koncový komunikaèný bod je u¾ spojený"
354.4156 + 
354.4157 +@@ -2503,139 +3617,139 @@
354.4158 + #. TRANS try to transmit data over a socket, without first specifying a
354.4159 + #. TRANS destination for the data.  For a connectionless socket (for datagram
354.4160 + #. TRANS protocols, such as UDP), you get @code{EDESTADDRREQ} instead.
354.4161 +-#: stdio-common/../sysdeps/gnu/errlist.c:422
354.4162 ++#: stdio-common/../sysdeps/gnu/errlist.c:423
354.4163 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:164
354.4164 + msgid "Transport endpoint is not connected"
354.4165 + msgstr "Koncový komunikaèný bod nie je spojený"
354.4166 + 
354.4167 +-#: argp/argp-help.c:1610
354.4168 ++#: argp/argp-help.c:1611
354.4169 + #, c-format
354.4170 + msgid "Try `%s --help' or `%s --usage' for more information.\n"
354.4171 + msgstr "Pou¾ite `%s --help' alebo `%s --usage' pre viac informácií.\n"
354.4172 + 
354.4173 +-#: inet/rcmd.c:143
354.4174 +-#, c-format
354.4175 +-msgid "Trying %s...\n"
354.4176 +-msgstr "Skú¹am %s...\n"
354.4177 +-
354.4178 +-#: nis/nis_print.c:163
354.4179 ++#: nis/nis_print.c:164
354.4180 + #, c-format
354.4181 + msgid "Type : %s\n"
354.4182 + msgstr "Typ  : %s\n"
354.4183 + 
354.4184 +-#: nis/nis_print.c:47
354.4185 ++#: nis/nis_print.c:48
354.4186 + msgid "UNKNOWN"
354.4187 + msgstr "NEZNAMY"
354.4188 + 
354.4189 +-#: nis/nis_error.c:72
354.4190 ++#: nis/nis_error.c:73
354.4191 + msgid "Unable to authenticate NIS+ client"
354.4192 + msgstr "Nie je mo¾né overi» toto¾nos» NIS+ klienta"
354.4193 + 
354.4194 +-#: nis/nis_error.c:71
354.4195 ++#: nis/nis_error.c:72
354.4196 + msgid "Unable to authenticate NIS+ server"
354.4197 + msgstr "Nie je mo¾né overi» toto¾nos» NIS+ servera"
354.4198 + 
354.4199 +-#: nis/nis_error.c:46
354.4200 ++#: nis/nis_error.c:47
354.4201 + msgid "Unable to create callback"
354.4202 + msgstr "Nie je mo¾né vytvori» spätné volanie"
354.4203 + 
354.4204 +-#: nis/nis_error.c:74
354.4205 ++#: nis/nis_error.c:75
354.4206 + msgid "Unable to create process on server"
354.4207 + msgstr "Nie je mo¾né vytvori» proces na serveri"
354.4208 + 
354.4209 +-#: nis/nis_print.c:190
354.4210 ++#: nis/nis_print.c:191
354.4211 + #, c-format
354.4212 + msgid "Unknown (type = %d, bits = %d)\n"
354.4213 + msgstr "Neznáme (typ = %d, bitov = %d)\n"
354.4214 + 
354.4215 +-#: inet/ruserpass.c:248
354.4216 ++#: inet/ruserpass.c:274
354.4217 + #, c-format
354.4218 + msgid "Unknown .netrc keyword %s"
354.4219 + msgstr "Neznáme kµúèové slovo v .netrc: %s"
354.4220 + 
354.4221 +-#: nis/ypclnt.c:797
354.4222 ++#: elf/../sysdeps/generic/readelflib.c:69
354.4223 ++#, c-format
354.4224 ++msgid "Unknown ELFCLASS in file %s.\n"
354.4225 ++msgstr "Neznáma ELFCLASS v súbore %s.\n"
354.4226 ++
354.4227 ++#: nis/ypclnt.c:820
354.4228 + msgid "Unknown NIS error code"
354.4229 + msgstr "Neznámy chybový kód NIS"
354.4230 + 
354.4231 +-#: nss/getent.c:505
354.4232 ++#: nss/getent.c:771
354.4233 + #, c-format
354.4234 + msgid "Unknown database: %s\n"
354.4235 + msgstr "Neznáma databáza %s\n"
354.4236 + 
354.4237 +-#: posix/../sysdeps/posix/gai_strerror.c:51
354.4238 ++#: posix/../sysdeps/posix/gai_strerror.c:52
354.4239 + msgid "Unknown error"
354.4240 + msgstr "Neznáma chyba"
354.4241 + 
354.4242 + #: string/../sysdeps/generic/_strerror.c:48
354.4243 +-#: string/../sysdeps/mach/_strerror.c:86
354.4244 +-#: sysdeps/mach/hurd/mips/dl-machine.c:82
354.4245 ++#: string/../sysdeps/mach/_strerror.c:88
354.4246 ++#: sysdeps/mach/hurd/mips/dl-machine.c:83
354.4247 + msgid "Unknown error "
354.4248 + msgstr "Neznáma chyba "
354.4249 + 
354.4250 +-#: resolv/herror.c:74
354.4251 ++#: resolv/herror.c:68
354.4252 + msgid "Unknown host"
354.4253 + msgstr "Neznámy poèítaè"
354.4254 + 
354.4255 +-#: nis/nis_error.c:34
354.4256 ++#: nis/nis_error.c:35
354.4257 + msgid "Unknown object"
354.4258 + msgstr "Neznámy objekt"
354.4259 + 
354.4260 +-#: nscd/nscd_conf.c:181
354.4261 ++#: nscd/nscd_conf.c:187
354.4262 + #, c-format
354.4263 + msgid "Unknown option: %s %s %s"
354.4264 + msgstr "Neznáma voµba: %s %s %s"
354.4265 + 
354.4266 +-#: resolv/herror.c:120
354.4267 ++#: resolv/herror.c:110
354.4268 + msgid "Unknown resolver error"
354.4269 + msgstr "Neznáma chyba resolvera"
354.4270 + 
354.4271 +-#: resolv/herror.c:76
354.4272 ++#: resolv/herror.c:70
354.4273 + msgid "Unknown server error"
354.4274 + msgstr "Neznáma chyba servera"
354.4275 + 
354.4276 +-#: string/strsignal.c:70
354.4277 ++#: string/strsignal.c:71
354.4278 + #, c-format
354.4279 + msgid "Unknown signal %d"
354.4280 + msgstr "Neznámy signál %d"
354.4281 + 
354.4282 +-#: misc/error.c:107
354.4283 ++#: misc/error.c:114 timezone/zic.c:384
354.4284 + msgid "Unknown system error"
354.4285 + msgstr "Neznáma chyba systému"
354.4286 + 
354.4287 +-#: nis/ypclnt.c:845
354.4288 ++#: nis/ypclnt.c:868
354.4289 + msgid "Unknown ypbind error"
354.4290 + msgstr "Neznáma chyba ypbind"
354.4291 + 
354.4292 +-#: posix/regex.c:1020
354.4293 ++#: posix/regex.c:1108
354.4294 + msgid "Unmatched ( or \\("
354.4295 + msgstr "Nepárová ( or \\("
354.4296 + 
354.4297 +-#: posix/regex.c:1028
354.4298 ++#: posix/regex.c:1132
354.4299 + msgid "Unmatched ) or \\)"
354.4300 + msgstr "Nepárová ) or \\)"
354.4301 + 
354.4302 +-#: posix/regex.c:1019
354.4303 ++#: posix/regex.c:1105
354.4304 + msgid "Unmatched [ or [^"
354.4305 + msgstr "Nepárová [ or [^"
354.4306 + 
354.4307 +-#: posix/regex.c:1021
354.4308 ++#: posix/regex.c:1111
354.4309 + msgid "Unmatched \\{"
354.4310 + msgstr "Nepárová \\{"
354.4311 + 
354.4312 +-#: posix/getconf.c:692
354.4313 ++#: posix/getconf.c:819
354.4314 + #, c-format
354.4315 + msgid "Unrecognized variable `%s'"
354.4316 + msgstr "Nerozpoznaná premenná `%s'"
354.4317 + 
354.4318 +-#: stdio-common/../sysdeps/unix/siglist.c:41
354.4319 +-#: sysdeps/unix/sysv/linux/siglist.h:35
354.4320 ++#: stdio-common/../sysdeps/unix/siglist.c:42 sysdeps/generic/siglist.h:42
354.4321 + msgid "Urgent I/O condition"
354.4322 + msgstr "Urgentný V/V stav"
354.4323 + 
354.4324 +-#: argp/argp-help.c:1567
354.4325 ++#: argp/argp-help.c:1568
354.4326 + msgid "Usage:"
354.4327 + msgstr "Pou¾itie:"
354.4328 + 
354.4329 +-#: posix/getconf.c:604
354.4330 ++#: posix/getconf.c:731
354.4331 + #, c-format
354.4332 + msgid "Usage: %s variable_name [pathname]\n"
354.4333 + msgstr "Pou¾itie: %s meno_premennej [cesta]\n"
354.4334 +@@ -2644,1031 +3758,1117 @@
354.4335 + msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n"
354.4336 + msgstr "Pou¾itie: rpcinfo [ -n èíslo_portu ] -u poèítaè èíslo_programu [ èíslo_verzie ]\n"
354.4337 + 
354.4338 +-#: stdio-common/../sysdeps/unix/siglist.c:55
354.4339 +-#: sysdeps/unix/sysv/linux/siglist.h:48
354.4340 ++#: elf/ldconfig.c:132
354.4341 ++msgid "Use CACHE as cache file"
354.4342 ++msgstr "Pou¾i» CACHE ako cache súbor"
354.4343 ++
354.4344 ++#: elf/ldconfig.c:133
354.4345 ++msgid "Use CONF as configuration file"
354.4346 ++msgstr "Pou¾i» CONF ako konfiguraèný súbor"
354.4347 ++
354.4348 ++#: nscd/nscd.c:92
354.4349 ++msgid "Use separate cache for each user"
354.4350 ++msgstr "Pou¾i» samostatnú cache pre ka¾dého pou¾ívateµa"
354.4351 ++
354.4352 ++#: stdio-common/../sysdeps/unix/siglist.c:56 sysdeps/generic/siglist.h:55
354.4353 + msgid "User defined signal 1"
354.4354 + msgstr "Pou¾ívateµom definovaný signál 1"
354.4355 + 
354.4356 +-#: stdio-common/../sysdeps/unix/siglist.c:56
354.4357 +-#: sysdeps/unix/sysv/linux/siglist.h:49
354.4358 ++#: stdio-common/../sysdeps/unix/siglist.c:57 sysdeps/generic/siglist.h:56
354.4359 + msgid "User defined signal 2"
354.4360 + msgstr "Pou¾ívateµom definovaný signál 2"
354.4361 + 
354.4362 +-#: stdio-common/../sysdeps/gnu/errlist.c:654
354.4363 ++#: stdio-common/../sysdeps/gnu/errlist.c:673
354.4364 ++#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:109
354.4365 + msgid "Value too large for defined data type"
354.4366 + msgstr "Hodnota je pre daný dátový typ priveµká"
354.4367 + 
354.4368 +-#: stdio-common/../sysdeps/unix/siglist.c:51
354.4369 +-#: sysdeps/unix/sysv/linux/siglist.h:45
354.4370 ++#: stdio-common/../sysdeps/unix/siglist.c:52 sysdeps/generic/siglist.h:52
354.4371 + msgid "Virtual timer expired"
354.4372 + msgstr "Vypr¹al virtuálny èasovaè"
354.4373 + 
354.4374 +-#: timezone/zic.c:1899
354.4375 ++#: timezone/zic.c:1926
354.4376 + msgid "Wild result from command execution"
354.4377 + msgstr "Èudný výsledok vykonania programu"
354.4378 + 
354.4379 +-#: stdio-common/../sysdeps/unix/siglist.c:53
354.4380 +-#: sysdeps/unix/sysv/linux/siglist.h:47
354.4381 ++#: stdio-common/../sysdeps/unix/siglist.c:54 sysdeps/generic/siglist.h:54
354.4382 + msgid "Window changed"
354.4383 + msgstr "Okno sa zmenilo"
354.4384 + 
354.4385 +-#: locale/programs/locale.c:67
354.4386 ++#: locale/programs/locale.c:69
354.4387 + msgid "Write names of available charmaps"
354.4388 + msgstr "Vypísa» názvy dostupných znakových sád"
354.4389 + 
354.4390 +-#: locale/programs/locale.c:65
354.4391 ++#: locale/programs/locale.c:67
354.4392 + msgid "Write names of available locales"
354.4393 + msgstr "Vypísa» názvy dostupných národných prostredí"
354.4394 + 
354.4395 +-#: locale/programs/locale.c:69
354.4396 ++#: locale/programs/locale.c:71
354.4397 + msgid "Write names of selected categories"
354.4398 + msgstr "Vypísa» názvy vybraných kategórií"
354.4399 + 
354.4400 +-#: locale/programs/locale.c:70
354.4401 ++#: locale/programs/locale.c:72
354.4402 + msgid "Write names of selected keywords"
354.4403 + msgstr "Vypísa» názvy vybraných kµúèových slov"
354.4404 + 
354.4405 +-#: catgets/gencat.c:110 db2/makedb.c:59
354.4406 ++#: catgets/gencat.c:115
354.4407 + msgid "Write output to file NAME"
354.4408 + msgstr "Zapísa» výstup do súboru SÚBOR"
354.4409 + 
354.4410 +-#: catgets/gencat.c:241 db2/makedb.c:247 elf/sprof.c:365
354.4411 +-#: iconv/iconv_prog.c:299 locale/programs/locale.c:272
354.4412 +-#: locale/programs/localedef.c:408 nscd/nscd.c:228 nss/getent.c:70
354.4413 +-#: posix/getconf.c:629
354.4414 ++#: elf/cache.c:366 elf/cache.c:375 elf/cache.c:379
354.4415 ++msgid "Writing of cache data failed"
354.4416 ++msgstr "Zápi údajov do cache zlyhal"
354.4417 ++
354.4418 ++#: elf/cache.c:383
354.4419 ++msgid "Writing of cache data failed."
354.4420 ++msgstr "Zápi údajov do cache zlyhal."
354.4421 ++
354.4422 ++#: catgets/gencat.c:251 elf/ldconfig.c:269 elf/sprof.c:361
354.4423 ++#: iconv/iconv_prog.c:356 locale/programs/locale.c:274
354.4424 ++#: locale/programs/localedef.c:316 nscd/nscd.c:292 nscd/nscd_nischeck.c:95
354.4425 ++#: nss/getent.c:68 posix/getconf.c:756
354.4426 + #, c-format
354.4427 + msgid "Written by %s.\n"
354.4428 + msgstr "Autor: %s.\n"
354.4429 + 
354.4430 +-#: stdio-common/../sysdeps/gnu/errlist.c:818
354.4431 ++#: stdio-common/../sysdeps/gnu/errlist.c:837
354.4432 + msgid "Wrong medium type"
354.4433 + msgstr "Chybný typ média"
354.4434 + 
354.4435 +-#: nis/nis_print.c:39
354.4436 ++#: nis/nis_print.c:40
354.4437 + msgid "X500"
354.4438 + msgstr "X500"
354.4439 + 
354.4440 +-#: nis/nis_print.c:43
354.4441 ++#: nis/nis_print.c:44
354.4442 + msgid "XCHS"
354.4443 + msgstr "XCHS"
354.4444 + 
354.4445 +-#: nis/ypclnt.c:185
354.4446 ++#: nis/ypclnt.c:174
354.4447 + #, c-format
354.4448 + msgid "YPBINDPROC_DOMAIN: %s\n"
354.4449 + msgstr "YPBINDPROC_DOMAIN: %s\n"
354.4450 + 
354.4451 +-#: nis/nis_error.c:70
354.4452 ++#: nis/nis_error.c:71
354.4453 + msgid "Yes, 42 is the meaning of life"
354.4454 + msgstr "Áno, 42 je význam ¾ivota"
354.4455 + 
354.4456 + #. TRANS You did @strong{what}?
354.4457 +-#: stdio-common/../sysdeps/gnu/errlist.c:608
354.4458 ++#: stdio-common/../sysdeps/gnu/errlist.c:627
354.4459 + msgid "You really blew it this time"
354.4460 + msgstr "Tentokrát si to skutoène poondial"
354.4461 + 
354.4462 +-#: timezone/zic.c:1063
354.4463 ++#: timezone/zic.c:1088
354.4464 + msgid "Zone continuation line end time is not after end time of previous line"
354.4465 + msgstr "Koncový èas pokraèovacieho riadku zóny nie je väè¹í ako koncový èas predchádzajúceho riadku"
354.4466 + 
354.4467 +-#: iconv/iconv_prog.c:70
354.4468 ++#: iconv/iconv_prog.c:73
354.4469 + msgid "[FILE...]"
354.4470 + msgstr "[SÚBOR...]"
354.4471 + 
354.4472 +-#: locale/programs/charmap.c:481 locale/programs/locfile.c:471
354.4473 +-#: locale/programs/repertoire.c:278
354.4474 ++#: debug/pcprofiledump.c:59
354.4475 ++msgid "[FILE]"
354.4476 ++msgstr "[SÚBOR]"
354.4477 ++
354.4478 ++#: sunrpc/pmap_clnt.c:72
354.4479 ++msgid "__get_myaddress: ioctl (get interface configuration)"
354.4480 ++msgstr "__get_myaddress: ioctl (získanie konfigurácie rozhrania)"
354.4481 ++
354.4482 ++#: locale/programs/ld-collate.c:417
354.4483 ++#, c-format
354.4484 ++msgid "`%.*s' already defined as collating element"
354.4485 ++msgstr "`%.*s' bol u¾ definovaný ako element triedenia"
354.4486 ++
354.4487 ++#: locale/programs/ld-collate.c:410
354.4488 ++#, c-format
354.4489 ++msgid "`%.*s' already defined as collating symbol"
354.4490 ++msgstr "`%.*s' bol u¾ definovaný ako symbol triedenia"
354.4491 ++
354.4492 ++#: locale/programs/ld-collate.c:394
354.4493 ++#, c-format
354.4494 ++msgid "`%.*s' already defined in charmap"
354.4495 ++msgstr "`%.*s' bol u¾ definovaný v znakovej mape"
354.4496 ++
354.4497 ++#: locale/programs/ld-collate.c:403
354.4498 ++#, c-format
354.4499 ++msgid "`%.*s' already defined in repertoire"
354.4500 ++msgstr "`%.*s' bol u¾ definovaný v repertoári"
354.4501 ++
354.4502 ++#: locale/programs/charmap.c:599 locale/programs/locfile.h:96
354.4503 ++#: locale/programs/repertoire.c:314
354.4504 + #, c-format
354.4505 + msgid "`%1$s' definition does not end with `END %1$s'"
354.4506 + msgstr "Definícia `%1$s' nekonèí `END %1$s'"
354.4507 + 
354.4508 +-#: elf/sprof.c:766
354.4509 ++#: locale/programs/ld-collate.c:1268 locale/programs/ld-ctype.c:1454
354.4510 + #, c-format
354.4511 +-msgid "`%s' is no correct profile data file for `%s'"
354.4512 +-msgstr "`%s' nie sú správne profilovacie údaje pre `%s'"
354.4513 ++msgid "`%s' and `%.*s' are no valid names for symbolic range"
354.4514 ++msgstr "`%s' a `%.*s' sú neprípustné názvy pre symbolický rozsah"
354.4515 + 
354.4516 +-#: locale/programs/ld-monetary.c:369 locale/programs/ld-numeric.c:193
354.4517 ++#: elf/sprof.c:762
354.4518 + #, c-format
354.4519 +-msgid "`-1' must be last entry in `%s' field in `%s' category"
354.4520 +-msgstr "`-1' musí by» posledným záznamom v poli `%s' kategórie `%s'"
354.4521 ++msgid "`%s' is no correct profile data file for `%s'"
354.4522 ++msgstr "`%s' nie sú správne profilovacie údaje pre `%s'"
354.4523 + 
354.4524 +-#: locale/programs/ld-collate.c:1666
354.4525 +-msgid "`...' must only be used in `...' and `UNDEFINED' entries"
354.4526 +-msgstr "`...' mô¾e by» pou¾ité iba v záznamoch `...' a `UNDEFINED'"
354.4527 +-
354.4528 +-#: locale/programs/locfile.c:668
354.4529 +-msgid "`from' expected after first argument to `collating-element'"
354.4530 +-msgstr "`from' je oèakávané po prvom argumente `collating-element'"
354.4531 +-
354.4532 +-#: locale/programs/ld-collate.c:1118
354.4533 +-msgid "`from' string in collation element declaration contains unknown character"
354.4534 +-msgstr "`from' re»azec v deklarácii elementu triedenia obsahuje neznámy znak"
354.4535 ++#: locale/programs/ld-ctype.c:691
354.4536 ++msgid "`digit' category has not entries in groups of ten"
354.4537 ++msgstr "kategória `digit' neobsahuje záznamy v skupinách po desiatich"
354.4538 + 
354.4539 +-#: posix/../sysdeps/posix/gai_strerror.c:34
354.4540 ++#: posix/../sysdeps/posix/gai_strerror.c:35
354.4541 + msgid "ai_family not supported"
354.4542 + msgstr "ai_family nie je podporovaná"
354.4543 + 
354.4544 +-#: posix/../sysdeps/posix/gai_strerror.c:39
354.4545 ++#: posix/../sysdeps/posix/gai_strerror.c:40
354.4546 + msgid "ai_socktype not supported"
354.4547 + msgstr "ai_socktype nie je podporovaný"
354.4548 + 
354.4549 +-#: nscd/nscd.c:121
354.4550 ++#: nscd/nscd.c:130
354.4551 + msgid "already running"
354.4552 + msgstr "u¾ be¾í"
354.4553 + 
354.4554 +-#: locale/programs/charmap.c:352 locale/programs/repertoire.c:152
354.4555 ++#: locale/programs/charmap.c:434 locale/programs/repertoire.c:184
354.4556 + #, c-format
354.4557 + msgid "argument to <%s> must be a single character"
354.4558 + msgstr "argument pre <%s> musí by» jeden znak"
354.4559 + 
354.4560 +-#: locale/programs/locfile.c:240
354.4561 ++#: locale/programs/locfile.c:124
354.4562 + #, c-format
354.4563 + msgid "argument to `%s' must be a single character"
354.4564 + msgstr "argument pre `%s' musí by» jeden znak"
354.4565 + 
354.4566 +-#: sunrpc/auth_unix.c:321
354.4567 ++#: sunrpc/auth_unix.c:311
354.4568 + msgid "auth_none.c - Fatal marshalling problem"
354.4569 + msgstr "auth_none.c - Fatálna chyba marshallingu"
354.4570 + 
354.4571 +-#: sunrpc/auth_unix.c:116 sunrpc/auth_unix.c:122 sunrpc/auth_unix.c:151
354.4572 ++#: sunrpc/auth_unix.c:106 sunrpc/auth_unix.c:112 sunrpc/auth_unix.c:142
354.4573 + msgid "authunix_create: out of memory\n"
354.4574 + msgstr "authunix_create: nedostatok pamäti\n"
354.4575 + 
354.4576 +-#: locale/programs/charmap.c:297 locale/programs/locfile.c:234
354.4577 +-#: locale/programs/locfile.c:261 locale/programs/repertoire.c:144
354.4578 ++#: locale/programs/charmap.c:364 locale/programs/locfile.c:118
354.4579 ++#: locale/programs/locfile.c:145 locale/programs/repertoire.c:176
354.4580 + msgid "bad argument"
354.4581 + msgstr "chybný argument"
354.4582 + 
354.4583 +-#: inet/rcmd.c:318
354.4584 ++#: inet/rcmd.c:424
354.4585 + msgid "bad owner"
354.4586 + msgstr "chybný vlastník"
354.4587 + 
354.4588 +-#: timezone/zic.c:1185
354.4589 ++#: timezone/zic.c:1210
354.4590 + msgid "blank FROM field on Link line"
354.4591 + msgstr "prázdne pole OD v riadku Link"
354.4592 + 
354.4593 +-#: timezone/zic.c:1189
354.4594 ++#: timezone/zic.c:1214
354.4595 + msgid "blank TO field on Link line"
354.4596 + msgstr "prázdne pole DO v riadku Link"
354.4597 + 
354.4598 +-#: malloc/mcheck.c:208
354.4599 ++#: malloc/mcheck.c:291
354.4600 + msgid "block freed twice\n"
354.4601 + msgstr "blok uvoµnený dvakrát\n"
354.4602 + 
354.4603 +-#: malloc/mcheck.c:211
354.4604 ++#: malloc/mcheck.c:294
354.4605 + msgid "bogus mcheck_status, library is buggy\n"
354.4606 + msgstr "pochybný mcheck_status, kni¾nica má chyby\n"
354.4607 + 
354.4608 +-#: sunrpc/pmap_rmt.c:185
354.4609 ++#: sunrpc/pmap_rmt.c:186
354.4610 + msgid "broadcast: ioctl (get interface configuration)"
354.4611 + msgstr "broadcast: ioctl (získanie konfigurácie rozhrania)"
354.4612 + 
354.4613 +-#: sunrpc/pmap_rmt.c:194
354.4614 ++#: sunrpc/pmap_rmt.c:195
354.4615 + msgid "broadcast: ioctl (get interface flags)"
354.4616 + msgstr "broadcast: ioctl (získanie nastavení rozhrania)"
354.4617 + 
354.4618 +-#: login/programs/request.c:167
354.4619 +-msgid "buffer overflow"
354.4620 +-msgstr "preteèenie vyrovnávacej pamäti"
354.4621 +-
354.4622 +-#: sunrpc/svc_udp.c:446
354.4623 ++#: sunrpc/svc_udp.c:528
354.4624 + msgid "cache_set: could not allocate new rpc_buffer"
354.4625 + msgstr "cache_set: nebolo mo¾né prideli» rpc vyrovnávaciu pamä»"
354.4626 + 
354.4627 +-#: sunrpc/svc_udp.c:440
354.4628 ++#: sunrpc/svc_udp.c:522
354.4629 + msgid "cache_set: victim alloc failed"
354.4630 + msgstr "cache_set: obe» nenájdená"
354.4631 + 
354.4632 +-#: sunrpc/svc_udp.c:429
354.4633 ++#: sunrpc/svc_udp.c:511
354.4634 + msgid "cache_set: victim not found"
354.4635 + msgstr "cache_set: obe» nenájdená"
354.4636 + 
354.4637 +-#: timezone/zic.c:1726
354.4638 ++#: timezone/zic.c:1751
354.4639 + msgid "can't determine time zone abbreviation to use just after until time"
354.4640 + msgstr "nie je mo¾né nájs» skratku èasovej zóny pre pou¾itie hneï po koncovom èase"
354.4641 + 
354.4642 +-#: sunrpc/svc_simple.c:75
354.4643 ++#: sunrpc/svc_simple.c:76
354.4644 + #, c-format
354.4645 +-msgid "can't reassign procedure number %d\n"
354.4646 +-msgstr "nie je mo¾né znovu prideli» èíslo procedúry %d\n"
354.4647 ++msgid "can't reassign procedure number %ld\n"
354.4648 ++msgstr "nie je mo¾né znovu prideli» èíslo procedúry %ld\n"
354.4649 ++
354.4650 ++#: elf/dl-reloc.c:152
354.4651 ++msgid "can't restore segment prot after reloc"
354.4652 ++msgstr "nie je mo¾né obnovi» segment prot po relokácii"
354.4653 + 
354.4654 +-#: locale/programs/localedef.c:279
354.4655 ++#: locale/programs/localedef.c:487
354.4656 + #, c-format
354.4657 +-msgid "cannot `stat' locale file `%s'"
354.4658 +-msgstr "nie je mo¾né vykona» `stat' pre súbor národného prostredia `%s'"
354.4659 ++msgid "cannot add already read locale `%s' a second time"
354.4660 ++msgstr "nie je mo¾né znovu prida» u¾ naèítané prostredie `%s'"
354.4661 + 
354.4662 +-#: elf/sprof.c:935 elf/sprof.c:987
354.4663 ++#: elf/dl-deps.c:470
354.4664 ++msgid "cannot allocate dependency list"
354.4665 ++msgstr "nie je mo¾né prideli» pamä» pre zoznam závislostí"
354.4666 ++
354.4667 ++#: elf/dl-load.c:1031
354.4668 ++msgid "cannot allocate memory for program header"
354.4669 ++msgstr "nie je mo¾né prideli» pamä» pre hlavièku programu"
354.4670 ++
354.4671 ++#: elf/dl-load.c:339
354.4672 ++msgid "cannot allocate name record"
354.4673 ++msgstr "nie je mo¾né prideli» pamä» pre záznam názvu"
354.4674 ++
354.4675 ++#: elf/sprof.c:930 elf/sprof.c:982
354.4676 + msgid "cannot allocate symbol data"
354.4677 + msgstr "nie je mo¾né prideli» pamä» pre symbolické údaje"
354.4678 + 
354.4679 +-#: elf/sprof.c:719 elf/sprof.c:777
354.4680 ++#: elf/dl-deps.c:501
354.4681 ++msgid "cannot allocate symbol search list"
354.4682 ++msgstr "nie je mo¾né prideli» pamä» pre vyhµadávací zoznam symbolov"
354.4683 ++
354.4684 ++#: elf/dl-version.c:291
354.4685 ++msgid "cannot allocate version reference table"
354.4686 ++msgstr "nie je mo¾né prideli» pamä» pre referenènú tabuµku verzií"
354.4687 ++
354.4688 ++#: elf/dl-load.c:1000
354.4689 ++msgid "cannot change memory protections"
354.4690 ++msgstr "nie je mo¾né zmeni» ochranu pamäti"
354.4691 ++
354.4692 ++#: elf/dl-load.c:533
354.4693 ++msgid "cannot create RUNPATH/RPATH copy"
354.4694 ++msgstr "nie je mo¾né vytvori» kópiu RUNPATH/RPATH"
354.4695 ++
354.4696 ++#: elf/dl-load.c:418 elf/dl-load.c:518 elf/dl-load.c:546 elf/dl-load.c:593
354.4697 ++#: elf/dl-load.c:685
354.4698 ++msgid "cannot create cache for search path"
354.4699 ++msgstr "Nie je mo¾né vytvori» cache pre hµadanie v ceste"
354.4700 ++
354.4701 ++#: elf/dl-support.c:191
354.4702 ++msgid "cannot create capability list"
354.4703 ++msgstr "nie je mo¾né vytvori» zoznam schopností"
354.4704 ++
354.4705 ++#: elf/sprof.c:715 elf/sprof.c:773
354.4706 + msgid "cannot create internal descriptor"
354.4707 + msgstr "nie je mo¾né vytvori» interný deskriptor"
354.4708 + 
354.4709 +-#: elf/sprof.c:417
354.4710 ++#: elf/sprof.c:413
354.4711 + msgid "cannot create internal descriptors"
354.4712 + msgstr "nie je mo¾né vytvori» interné deskriptory"
354.4713 + 
354.4714 +-#: nscd/connections.c:180
354.4715 ++#: elf/dl-load.c:583
354.4716 ++msgid "cannot create search path array"
354.4717 ++msgstr "nie je mo¾né vytvori» pole ciest"
354.4718 ++
354.4719 ++#: elf/dl-load.c:1137
354.4720 ++msgid "cannot create searchlist"
354.4721 ++msgstr "nie je mo¾né vytvori» vyhµadávací zoznam"
354.4722 ++
354.4723 ++#: elf/dl-load.c:822 elf/dl-load.c:1682
354.4724 ++msgid "cannot create shared object descriptor"
354.4725 ++msgstr "nie je mo¾né vytvori» deskriptor zdieµaného objektu"
354.4726 ++
354.4727 ++#: catgets/gencat.c:1316
354.4728 ++msgid "cannot determine escape character"
354.4729 ++msgstr "nie je mo¾né urèi» znak escape"
354.4730 ++
354.4731 ++#: elf/dl-load.c:950
354.4732 ++msgid "cannot dynamically load executable"
354.4733 ++msgstr "nie je mo¾né dynamicky naèíta» spustiteµný súbor"
354.4734 ++
354.4735 ++#: nscd/connections.c:183
354.4736 + #, c-format
354.4737 + msgid "cannot enable socket to accept connections: %s"
354.4738 + msgstr "nie je mo¾né povoli» socketu prijíma» spojenia: %s"
354.4739 + 
354.4740 +-#: sunrpc/rpc_main.c:342
354.4741 ++#: elf/dl-open.c:121
354.4742 ++msgid "cannot extend global scope"
354.4743 ++msgstr "nie je mo¾né roz¹íri» globálny rozsah"
354.4744 ++
354.4745 ++#: sunrpc/rpc_main.c:343
354.4746 + #, c-format
354.4747 + msgid "cannot find C preprocessor: %s \n"
354.4748 + msgstr "nie je mo¾né nájs» preprocesor: %s \n"
354.4749 + 
354.4750 +-#: sunrpc/rpc_main.c:350
354.4751 ++#: sunrpc/rpc_main.c:351
354.4752 + msgid "cannot find any C preprocessor (cpp)\n"
354.4753 + msgstr "nie je mo¾né nájs» ¾iadny C preprocesor (cpp)\n"
354.4754 + 
354.4755 +-#: nscd/connections.c:205
354.4756 ++#: nscd/connections.c:225
354.4757 + #, c-format
354.4758 + msgid "cannot handle old request version %d; current version is %d"
354.4759 + msgstr "nie je mo¾né spracova» starú verziu ¾iadosti %d; aktuálna verzia je %d"
354.4760 + 
354.4761 +-#: locale/programs/ld-collate.c:1324
354.4762 +-#, c-format
354.4763 +-msgid "cannot insert collation element `%.*s'"
354.4764 +-msgstr "nie je mo¾né vlo¾i» element triedenia `%.*s'"
354.4765 +-
354.4766 +-#: locale/programs/ld-collate.c:1503 locale/programs/ld-collate.c:1510
354.4767 +-msgid "cannot insert into result table"
354.4768 +-msgstr "nie je mo¾né vklada» do výslednej tabuµky"
354.4769 +-
354.4770 +-#: locale/programs/ld-collate.c:1175 locale/programs/ld-collate.c:1218
354.4771 +-#, c-format
354.4772 +-msgid "cannot insert new collating symbol definition: %s"
354.4773 +-msgstr "nie je mo¾né vlo¾i» nový symbol triedenia: %s"
354.4774 +-
354.4775 +-#: elf/sprof.c:674
354.4776 ++#: elf/sprof.c:670
354.4777 + msgid "cannot load profiling data"
354.4778 + msgstr "nie je mo¾né naèíta» profilovacie údaje"
354.4779 + 
354.4780 +-#: inet/rcmd.c:314
354.4781 ++#: elf/dl-deps.c:586
354.4782 ++msgid "cannot load shared object file"
354.4783 ++msgstr "nepodarilo sa naèíta» súbor zdieµaného objektu"
354.4784 ++
354.4785 ++#: elf/dl-reloc.c:63
354.4786 ++msgid "cannot make segment writable for relocation"
354.4787 ++msgstr "nie je mo¾né zmeni» segment na zapisovateµný pre relokáciu"
354.4788 ++
354.4789 ++#: elf/dl-load.c:1016
354.4790 ++msgid "cannot map zero-fill pages"
354.4791 ++msgstr "nie je mo¾né namapova» stránky vyplnené nulami"
354.4792 ++
354.4793 ++#: inet/rcmd.c:420
354.4794 + msgid "cannot open"
354.4795 + msgstr "nie je mo¾né otvori»"
354.4796 + 
354.4797 + #: sysdeps/unix/sysv/linux/lddlibc4.c:64
354.4798 + #, c-format
354.4799 +-msgid "cannot open"
354.4800 +-msgstr "nie je mo¾né otvori»"
354.4801 ++msgid "cannot open `%s'"
354.4802 ++msgstr "nie je mo¾né otvori» `%s'"
354.4803 + 
354.4804 +-#: db2/makedb.c:146
354.4805 +-#, c-format
354.4806 +-msgid "cannot open database file `%s': %s"
354.4807 +-msgstr "nie je mo¾né otvori» databázový súbor `%s': %s"
354.4808 ++#: debug/pcprofiledump.c:96
354.4809 ++msgid "cannot open input file"
354.4810 ++msgstr "nie je mo¾né otvori» vstupný súbor"
354.4811 + 
354.4812 +-#: catgets/gencat.c:272 db2/makedb.c:167 iconv/iconv_prog.c:177
354.4813 ++#: catgets/gencat.c:288 iconv/iconv_prog.c:225
354.4814 + #, c-format
354.4815 + msgid "cannot open input file `%s'"
354.4816 + msgstr "nie je mo¾né otvori» vstupný súbor `%s'"
354.4817 + 
354.4818 +-#: locale/programs/localedef.c:198
354.4819 ++#: locale/programs/localedef.c:203 locale/programs/localedef.c:218
354.4820 ++#: locale/programs/localedef.c:513 locale/programs/localedef.c:533
354.4821 + #, c-format
354.4822 + msgid "cannot open locale definition file `%s'"
354.4823 + msgstr "nie je mo¾né otvori» súbor definície národného prostredia `%s'"
354.4824 + 
354.4825 +-#: iconv/iconv_prog.c:155
354.4826 ++#: iconv/iconv_prog.c:194
354.4827 + msgid "cannot open output file"
354.4828 + msgstr "nie je mo¾né otvori» výstupný súbor"
354.4829 + 
354.4830 +-#: catgets/gencat.c:774 catgets/gencat.c:815 db2/makedb.c:181
354.4831 ++#: catgets/gencat.c:944 catgets/gencat.c:985
354.4832 + #, c-format
354.4833 + msgid "cannot open output file `%s'"
354.4834 + msgstr "nie je mo¾né otvori» výstupný súbor `%s'"
354.4835 + 
354.4836 +-#: locale/programs/locfile.c:1129
354.4837 ++#: locale/programs/locfile.c:381
354.4838 + #, c-format
354.4839 + msgid "cannot open output file `%s' for category `%s'"
354.4840 + msgstr "nie je mo¾né otvori» výstupný súbor `%s' pre kategóriu `%s'"
354.4841 + 
354.4842 +-#: nscd/connections.c:162
354.4843 ++#: elf/dl-load.c:1695
354.4844 ++msgid "cannot open shared object file"
354.4845 ++msgstr "nie je mo¾né otvori» súbor zdieµaného objektu"
354.4846 ++
354.4847 ++#: nscd/connections.c:165
354.4848 + #, c-format
354.4849 + msgid "cannot open socket: %s"
354.4850 + msgstr "nie je mo¾né otvori» socket `%s'"
354.4851 + 
354.4852 +-#: locale/programs/ld-collate.c:1370
354.4853 +-msgid "cannot process order specification"
354.4854 +-msgstr "nie je mo¾né spracova» ¹pecifikáciu poradia"
354.4855 ++#: elf/dl-load.c:814
354.4856 ++msgid "cannot open zero fill device"
354.4857 ++msgstr "nie je mo¾né otvori» zariadenie pre naplnenie nulami"
354.4858 + 
354.4859 +-#: locale/programs/locale.c:449
354.4860 ++#: locale/programs/charmap-dir.c:61
354.4861 + #, c-format
354.4862 + msgid "cannot read character map directory `%s'"
354.4863 + msgstr "nie je mo¾né naèíta» adresár znakových sád `%s'"
354.4864 + 
354.4865 +-#: nscd/connections.c:122
354.4866 ++#: nscd/connections.c:125
354.4867 + msgid "cannot read configuration file; this is fatal"
354.4868 + msgstr "nie je mo¾né naèíta» konfiguraèný súbor; to je fatálne"
354.4869 + 
354.4870 +-#: login/programs/request.c:91
354.4871 +-msgid "cannot read from client"
354.4872 +-msgstr "nie je mo¾né èíta» od klienta"
354.4873 ++#: elf/dl-load.c:838 elf/dl-load.c:1244
354.4874 ++msgid "cannot read file data"
354.4875 ++msgstr "nie je mo¾né naèíta» údaje súboru"
354.4876 ++
354.4877 ++#: debug/pcprofiledump.c:102
354.4878 ++msgid "cannot read header"
354.4879 ++msgstr "nie je mo¾né preèíta» hlavièku"
354.4880 + 
354.4881 + #: sysdeps/unix/sysv/linux/lddlibc4.c:68
354.4882 + #, c-format
354.4883 + msgid "cannot read header from `%s'"
354.4884 + msgstr "nie je mo¾né preèíta» hlavièku z `%s'"
354.4885 + 
354.4886 +-#: locale/programs/locale.c:306
354.4887 ++#: locale/programs/locale.c:308
354.4888 + #, c-format
354.4889 + msgid "cannot read locale directory `%s'"
354.4890 + msgstr "nie je mo¾né naèíta» adresár národných prostredí `%s'"
354.4891 + 
354.4892 +-#: locale/programs/localedef.c:303
354.4893 +-#, c-format
354.4894 +-msgid "cannot read locale file `%s'"
354.4895 +-msgstr "nie je mo¾né preèíta» súbor národného prostredia `%s'"
354.4896 +-
354.4897 +-#: locale/programs/locfile.c:288 locale/programs/locfile.c:306
354.4898 +-#: locale/programs/locfile.c:324 locale/programs/locfile.c:342
354.4899 +-#: locale/programs/locfile.c:360 locale/programs/locfile.c:378
354.4900 +-#, c-format
354.4901 +-msgid "cannot read repertoire map `%s'"
354.4902 +-msgstr "nie je mo¾né naèíta» mapu repertoáru `%s'"
354.4903 +-
354.4904 +-#: nscd/nscd_stat.c:127
354.4905 ++#: nscd/nscd_stat.c:128
354.4906 + msgid "cannot read statistics data"
354.4907 + msgstr "nie je mo¾né naèíta» ¹tatistické údaje"
354.4908 + 
354.4909 +-#: nscd/cache.c:141 nscd/connections.c:148
354.4910 ++#: locale/programs/repertoire.c:331
354.4911 ++msgid "cannot safe new repertoire map"
354.4912 ++msgstr "nie je mo¾né uchova» mapu repertoáru"
354.4913 ++
354.4914 ++#: elf/dl-load.c:776
354.4915 ++msgid "cannot stat shared object"
354.4916 ++msgstr "nepodarilo sa zisti» stav zdieµaného objektu"
354.4917 ++
354.4918 ++#: nscd/cache.c:150 nscd/connections.c:151
354.4919 + #, c-format
354.4920 + msgid "cannot stat() file `%s': %s"
354.4921 + msgstr "nie je mo¾né vykona» stat() súboru `%s': %s"
354.4922 + 
354.4923 +-#: locale/programs/localedef.c:328
354.4924 ++#: locale/programs/localedef.c:230
354.4925 + #, c-format
354.4926 + msgid "cannot write output files to `%s'"
354.4927 + msgstr "nie je mo¾né zapísa» výstupné súbory do `%s'"
354.4928 + 
354.4929 +-#: nscd/connections.c:229 nscd/connections.c:250
354.4930 ++#: nscd/connections.c:261 nscd/connections.c:282
354.4931 + #, c-format
354.4932 + msgid "cannot write result: %s"
354.4933 + msgstr "nie je mo¾né zapísa» výsledok: %s"
354.4934 + 
354.4935 +-#: nscd/nscd_stat.c:86
354.4936 ++#: nscd/nscd_stat.c:87
354.4937 + #, c-format
354.4938 + msgid "cannot write statistics: %s"
354.4939 + msgstr "nie je mo¾né zapísa» ¹tatistiku: `%s'"
354.4940 + 
354.4941 +-#: login/programs/request.c:120
354.4942 +-msgid "cannot write to client"
354.4943 +-msgstr "nie je mo¾né písa» klientovi"
354.4944 +-
354.4945 +-#: locale/programs/localedef.c:442
354.4946 +-msgid "category data requested more than once: should not happen"
354.4947 +-msgstr "údaje kategórie po¾adované viac ako raz - to by sa nemalo sta»"
354.4948 +-
354.4949 +-#: locale/programs/ld-ctype.c:269
354.4950 ++#: locale/programs/ld-ctype.c:509
354.4951 + #, c-format
354.4952 +-msgid "character %s'%s' in class `%s' must be in class `%s'"
354.4953 +-msgstr "znak %s'%s' v triede `%s' musí by» v triede `%s'"
354.4954 ++msgid "character '%s' in class `%s' must be in class `%s'"
354.4955 ++msgstr "znak '%s' v triede `%s' musí by» v triede `%s'"
354.4956 + 
354.4957 +-#: locale/programs/ld-ctype.c:294
354.4958 ++#: locale/programs/ld-ctype.c:524
354.4959 + #, c-format
354.4960 +-msgid "character %s'%s' in class `%s' must not be in class `%s'"
354.4961 +-msgstr "znak %s'%s' v triede `%s' nesmie by» v triede `%s'"
354.4962 ++msgid "character '%s' in class `%s' must not be in class `%s'"
354.4963 ++msgstr "znak '%s' v triede `%s' nesmie by» v triede `%s'"
354.4964 + 
354.4965 +-#: locale/programs/ld-ctype.c:320
354.4966 ++#: locale/programs/ld-ctype.c:579
354.4967 + msgid "character <SP> not defined in character map"
354.4968 + msgstr "znak <SP> nie je definovaný v znakovej sade"
354.4969 + 
354.4970 +-#: locale/programs/ld-ctype.c:964 locale/programs/ld-ctype.c:1029
354.4971 +-#: locale/programs/ld-ctype.c:1040 locale/programs/ld-ctype.c:1051
354.4972 +-#: locale/programs/ld-ctype.c:1062 locale/programs/ld-ctype.c:1073
354.4973 +-#: locale/programs/ld-ctype.c:1084 locale/programs/ld-ctype.c:1113
354.4974 +-#: locale/programs/ld-ctype.c:1124 locale/programs/ld-ctype.c:1165
354.4975 +-#: locale/programs/ld-ctype.c:1194 locale/programs/ld-ctype.c:1206
354.4976 ++#: locale/programs/ld-ctype.c:453
354.4977 ++#, c-format
354.4978 ++msgid "character L'\\u%0*x' in class `%s' must be in class `%s'"
354.4979 ++msgstr "znak L'\\u%0*x' v triede `%s' musí by» v triede `%s'"
354.4980 ++
354.4981 ++#: locale/programs/ld-ctype.c:467
354.4982 ++#, c-format
354.4983 ++msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'"
354.4984 ++msgstr "znak L'\\u%0*x' v triede `%s' nesmie by» v triede `%s'"
354.4985 ++
354.4986 ++#: locale/programs/ld-ctype.c:3030
354.4987 + #, c-format
354.4988 + msgid "character `%s' not defined while needed as default value"
354.4989 + msgstr "znak `%s' nie je definovaný a je potrebný ako implicitná hodnota"
354.4990 + 
354.4991 +-#: locale/programs/ld-ctype.c:825
354.4992 ++#: locale/programs/ld-ctype.c:1215
354.4993 + #, c-format
354.4994 + msgid "character class `%s' already defined"
354.4995 + msgstr "trieda znakov `%s' je u¾ definovaná"
354.4996 + 
354.4997 +-#: locale/programs/ld-ctype.c:857
354.4998 ++#: locale/programs/ld-ctype.c:1247
354.4999 + #, c-format
354.5000 + msgid "character map `%s' already defined"
354.5001 + msgstr "znaková sada `%s' je u¾ definovaná"
354.5002 + 
354.5003 +-#: locale/programs/charmap.c:83
354.5004 ++#: locale/programs/charmap.c:249
354.5005 ++#, c-format
354.5006 ++msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n"
354.5007 ++msgstr "znaková mapa `%s' nie je kompatibilná s ASCII, prostredie nevyhovuje ISO C\n"
354.5008 ++
354.5009 ++#: locale/programs/charmap.c:135
354.5010 + #, c-format
354.5011 + msgid "character map file `%s' not found"
354.5012 + msgstr "súbor znakovej sady `%s' nebol nájdený"
354.5013 + 
354.5014 +-#: sunrpc/clnt_raw.c:110
354.5015 ++#: locale/programs/charmap.c:460
354.5016 ++msgid "character sets with locking states are not supported"
354.5017 ++msgstr "znakové sady so zamykacími stavmi nie sú podporované"
354.5018 ++
354.5019 ++#: locale/programs/localedef.c:482
354.5020 ++msgid "circular dependencies between locale definitions"
354.5021 ++msgstr "kruhová závislos» medzi definíciami prostredí"
354.5022 ++
354.5023 ++#: sunrpc/clnt_raw.c:111
354.5024 + msgid "clnt_raw.c - Fatal header serialization error."
354.5025 + msgstr "clnt_raw.c - Fatálna chyba pri serializácii hlavièky."
354.5026 + 
354.5027 +-#: sunrpc/clnt_tcp.c:125 sunrpc/clnt_tcp.c:133
354.5028 ++#: sunrpc/clnt_tcp.c:126 sunrpc/clnt_tcp.c:134
354.5029 + msgid "clnttcp_create: out of memory\n"
354.5030 + msgstr "clnttcp_create: nedostatok pamäti\n"
354.5031 + 
354.5032 +-#: sunrpc/clnt_udp.c:124 sunrpc/clnt_udp.c:134
354.5033 +-msgid "svctcp_create: out of memory\n"
354.5034 +-msgstr "svctcp_create: nedostatok pamäti\n"
354.5035 ++#: sunrpc/clnt_udp.c:131 sunrpc/clnt_udp.c:141
354.5036 ++msgid "clntudp_create: out of memory\n"
354.5037 ++msgstr "clntudp_create: nedostatok pamäti\n"
354.5038 + 
354.5039 +-#: sunrpc/clnt_unix.c:123 sunrpc/clnt_unix.c:131
354.5040 ++#: sunrpc/clnt_unix.c:124 sunrpc/clnt_unix.c:132
354.5041 + msgid "clntunix_create: out of memory\n"
354.5042 + msgstr "clntunix_create: nedostatok pamäti\n"
354.5043 + 
354.5044 +-#: locale/programs/ld-collate.c:1339
354.5045 +-#, c-format
354.5046 +-msgid "collation element `%.*s' appears more than once: ignore line"
354.5047 +-msgstr "element triedenia `%.*s' uvedený viac ako raz - riadok ignorovaný"
354.5048 +-
354.5049 +-#: locale/programs/ld-collate.c:1357
354.5050 +-#, c-format
354.5051 +-msgid "collation symbol `%.*s' appears more than once: ignore line"
354.5052 +-msgstr "symbol triedenia `%.*s' uvedený viac ako raz - riadok ignorovaný"
354.5053 +-
354.5054 +-#: locale/programs/locfile.c:652
354.5055 +-#, c-format
354.5056 +-msgid "collation symbol expected after `%s'"
354.5057 +-msgstr "po `%s' je oèakávaný symbol triedenia"
354.5058 +-
354.5059 +-#: inet/rcmd.c:136
354.5060 +-#, c-format
354.5061 +-msgid "connect to address %s: "
354.5062 +-msgstr "spojenie s adresou %s: "
354.5063 +-
354.5064 +-#: sunrpc/rpc_scan.c:115
354.5065 ++#: sunrpc/rpc_scan.c:116
354.5066 + msgid "constant or identifier expected"
354.5067 + msgstr "oèakávaná kon¹tanta alebo identifikátor"
354.5068 + 
354.5069 +-#: iconv/iconv_prog.c:144
354.5070 ++#: iconv/iconv_prog.c:182
354.5071 + #, c-format
354.5072 + msgid "conversion from `%s' to `%s' not supported"
354.5073 + msgstr "konverzia z `%s' do `%s' nie je podporovaná"
354.5074 + 
354.5075 +-#: iconv/iconv_prog.c:326
354.5076 ++#: catgets/gencat.c:1290
354.5077 ++msgid "conversion modules not available"
354.5078 ++msgstr "moduly konverzie nie sú dostupné"
354.5079 ++
354.5080 ++#: locale/programs/ld-monetary.c:900
354.5081 ++msgid "conversion rate value cannot be zero"
354.5082 ++msgstr "konverzný pomer nemô¾e by» nula"
354.5083 ++
354.5084 ++#: iconv/iconv_prog.c:385 iconv/iconv_prog.c:410
354.5085 + msgid "conversion stopped due to problem in writing the output"
354.5086 + msgstr "konverzia zastavená kvôli problému pri zápise výstupu"
354.5087 + 
354.5088 +-#: sunrpc/svc_simple.c:83
354.5089 ++#: sunrpc/svc_simple.c:84
354.5090 + msgid "couldn't create an rpc server\n"
354.5091 + msgstr "nebolo mo¾né vytvori» rpc server\n"
354.5092 + 
354.5093 +-#: sunrpc/svc_simple.c:91
354.5094 ++#: sunrpc/svc_simple.c:92
354.5095 + #, c-format
354.5096 +-msgid "couldn't register prog %d vers %d\n"
354.5097 +-msgstr "nebolo mo¾né zaregistrova» program %d verzie %d\n"
354.5098 ++msgid "couldn't register prog %ld vers %ld\n"
354.5099 ++msgstr "nebolo mo¾né zaregistrova» program %ld verzie %ld\n"
354.5100 + 
354.5101 +-#: nss/getent.c:49
354.5102 ++#: nss/getent.c:51
354.5103 + msgid "database [key ...]"
354.5104 + msgstr "databáza [kµúè ...]"
354.5105 + 
354.5106 +-#: locale/programs/charmap.c:170
354.5107 ++#: locale/programs/charmap.c:192
354.5108 + #, c-format
354.5109 + msgid "default character map file `%s' not found"
354.5110 + msgstr "implicitný súbor znakovej sady `%s' nebol nájdený"
354.5111 + 
354.5112 +-#: locale/programs/ld-time.c:163
354.5113 +-#, c-format
354.5114 +-msgid "direction flag in string %d in `era' field in category `%s' is not '+' nor '-'"
354.5115 +-msgstr "príznak smeru v re»azci %d poµa `era' v kategórii `%s' nie je '+' ani '-'"
354.5116 +-
354.5117 +-#: locale/programs/ld-time.c:174
354.5118 +-#, c-format
354.5119 +-msgid "direction flag in string %d in `era' field in category `%s' is not a single character"
354.5120 +-msgstr "príznak smeru v re»azci %d poµa `era' v kategórii `%s' nie je jeden znak"
354.5121 +-
354.5122 +-#: locale/programs/charset.c:64 locale/programs/charset.c:118
354.5123 ++#: locale/programs/charmap.c:392
354.5124 + #, c-format
354.5125 +-msgid "duplicate character name `%s'"
354.5126 +-msgstr "duplicitné meno znaku `%s'"
354.5127 +-
354.5128 +-#: locale/programs/ld-collate.c:1150
354.5129 +-msgid "duplicate collating element definition"
354.5130 +-msgstr "duplicitná definícia elementu triedenia"
354.5131 ++msgid "duplicate definition of <%s>"
354.5132 ++msgstr "duplicitná definícia <%s>"
354.5133 + 
354.5134 +-#: locale/programs/ld-collate.c:1297
354.5135 ++#: locale/programs/ld-collate.c:3043
354.5136 + #, c-format
354.5137 +-msgid "duplicate definition for character `%.*s'"
354.5138 +-msgstr "duplicitná definícia znaku `%.*s'"
354.5139 ++msgid "duplicate definition of script `%s'"
354.5140 ++msgstr "duplicitná definícia skriptu `%s'"
354.5141 + 
354.5142 +-#: db2/makedb.c:328
354.5143 +-msgid "duplicate key"
354.5144 +-msgstr "duplicitný kµúè"
354.5145 +-
354.5146 +-#: catgets/gencat.c:388
354.5147 ++#: catgets/gencat.c:430
354.5148 + msgid "duplicate set definition"
354.5149 + msgstr "duplicitná definícia sady"
354.5150 + 
354.5151 +-#: timezone/zic.c:978
354.5152 ++#: timezone/zic.c:1003
354.5153 + #, c-format
354.5154 + msgid "duplicate zone name %s (file \"%s\", line %d)"
354.5155 + msgstr "duplicitné meno zóny %s (súbor \"%s\", riadok %d)"
354.5156 + 
354.5157 +-#: catgets/gencat.c:551
354.5158 ++#: locale/programs/ld-ctype.c:2557
354.5159 ++#, c-format
354.5160 ++msgid "duplicated definition for mapping `%s'"
354.5161 ++msgstr "duplicitná definícia mapovania `%s'"
354.5162 ++
354.5163 ++#: catgets/gencat.c:631
354.5164 + msgid "duplicated message identifier"
354.5165 + msgstr "duplicitný identifikátor správy"
354.5166 + 
354.5167 +-#: catgets/gencat.c:524
354.5168 ++#: catgets/gencat.c:603
354.5169 + msgid "duplicated message number"
354.5170 + msgstr "duplicitné èíslo správy"
354.5171 + 
354.5172 +-#: sunrpc/rpc_scan.c:382
354.5173 ++#: locale/programs/ld-ctype.c:2368
354.5174 ++msgid "ellipsis range must be marked by two operands of same type"
354.5175 ++msgstr "rozsah pokraèovania musí by» oznaèený dvomi operandami rovnakého typu"
354.5176 ++
354.5177 ++#: sunrpc/rpc_scan.c:383
354.5178 + msgid "empty char string"
354.5179 + msgstr "prázdny znakový re»azec"
354.5180 + 
354.5181 +-#: locale/programs/ld-collate.c:1710
354.5182 +-msgid "empty weight name: line ignored"
354.5183 +-msgstr "prázdne meno váhy - riadok ignorovaný"
354.5184 ++#: elf/dl-open.c:223
354.5185 ++msgid "empty dynamic string token substitution"
354.5186 ++msgstr "prázdna substitúcia tokenu dynamického re»azca"
354.5187 + 
354.5188 +-#: sunrpc/svc_udp.c:372
354.5189 ++#: sunrpc/svc_udp.c:454
354.5190 + msgid "enablecache: cache already enabled"
354.5191 + msgstr "enablecache: vyrovnávacia pamä» je u¾ povolená"
354.5192 + 
354.5193 +-#: sunrpc/svc_udp.c:378
354.5194 ++#: sunrpc/svc_udp.c:460
354.5195 + msgid "enablecache: could not allocate cache"
354.5196 + msgstr "enablecache: nebolo mo¾né prideli» vyrovnáciu pamä»"
354.5197 + 
354.5198 +-#: sunrpc/svc_udp.c:386
354.5199 ++#: sunrpc/svc_udp.c:468
354.5200 + msgid "enablecache: could not allocate cache data"
354.5201 + msgstr "enablecache: nebolo mo¾né prideli» dáta pre vyrovnávaciu pamä»"
354.5202 + 
354.5203 +-#: sunrpc/svc_udp.c:393
354.5204 ++#: sunrpc/svc_udp.c:475
354.5205 + msgid "enablecache: could not allocate cache fifo"
354.5206 + msgstr "enablecache: nebolo mo¾né prideli» frontu pre vyrovnávaciu pamä»"
354.5207 + 
354.5208 +-#: iconv/iconv_prog.c:56
354.5209 ++#: iconv/iconv_prog.c:57
354.5210 + msgid "encoding for output"
354.5211 + msgstr "kódovanie výstupu"
354.5212 + 
354.5213 +-#: iconv/iconv_prog.c:55
354.5214 ++#: iconv/iconv_prog.c:56
354.5215 + msgid "encoding of original text"
354.5216 + msgstr "kódovanie pôvodného textu"
354.5217 + 
354.5218 +-#: locale/programs/ld-collate.c:1429
354.5219 +-msgid "end point of ellipsis range is bigger then start"
354.5220 +-msgstr "koncový bod pokraèovania je väè¹í ako poèiatoèný"
354.5221 ++#: nscd/connections.c:361 nscd/connections.c:453
354.5222 ++#, c-format
354.5223 ++msgid "error getting callers id: %s"
354.5224 ++msgstr "chyba pri získaní id volajúceho: %s"
354.5225 ++
354.5226 ++#: locale/programs/ld-collate.c:3013
354.5227 ++msgid "error while adding equivalent collating symbol"
354.5228 ++msgstr "chyba pri pridávaní ekvivalentného symbolu triedenia"
354.5229 + 
354.5230 +-#: iconv/iconv_prog.c:193
354.5231 ++#: iconv/iconv_prog.c:242
354.5232 + #, c-format
354.5233 + msgid "error while closing input `%s'"
354.5234 + msgstr "chyba poèas zatvárania vstupu `%s'"
354.5235 + 
354.5236 +-#: iconv/iconv_prog.c:239
354.5237 ++#: iconv/iconv_prog.c:288
354.5238 + msgid "error while closing output file"
354.5239 + msgstr "chyba poèas zatvárania výstupného súboru"
354.5240 + 
354.5241 +-#: elf/sprof.c:710
354.5242 ++#: elf/sprof.c:706
354.5243 + msgid "error while closing the profiling data file"
354.5244 + msgstr "chyba poèas zatvárania súboru profilovacích údajov"
354.5245 + 
354.5246 +-#: locale/programs/ld-collate.c:1158
354.5247 +-msgid "error while inserting collation element into hash table"
354.5248 +-msgstr "chyba poèas vkladania elementu triedenia do hash-tabuµky"
354.5249 +-
354.5250 +-#: locale/programs/ld-collate.c:1170
354.5251 +-msgid "error while inserting to hash table"
354.5252 +-msgstr "chyba poèas vkladania do hash-tabuµky"
354.5253 +-
354.5254 +-#: iconv/iconv_prog.c:389 iconv/iconv_prog.c:420
354.5255 ++#: iconv/iconv_prog.c:474 iconv/iconv_prog.c:505
354.5256 + msgid "error while reading the input"
354.5257 + msgstr "poèas èítania vstupu"
354.5258 + 
354.5259 +-#: locale/programs/locfile.c:595
354.5260 ++#: locale/programs/locfile.h:59
354.5261 + msgid "expect string argument for `copy'"
354.5262 + msgstr "pre `copy' je oèakávaný re»azcový argyment"
354.5263 + 
354.5264 +-#: timezone/zic.c:868
354.5265 ++#: timezone/zic.c:893
354.5266 + msgid "expected continuation line not found"
354.5267 + msgstr "oèakávaný pokraèovací riadok nebol nájdený"
354.5268 + 
354.5269 +-#: elf/sprof.c:408
354.5270 ++#: elf/sprof.c:404
354.5271 + #, c-format
354.5272 + msgid "failed to load shared object `%s'"
354.5273 + msgstr "nepodarilo sa naèíta» zdieµaný objekt `%s'"
354.5274 + 
354.5275 +-#: elf/sprof.c:604
354.5276 ++#: elf/sprof.c:600
354.5277 + msgid "failed to load symbol data"
354.5278 + msgstr "nepodarilo sa naèíta» symbolické údaje"
354.5279 + 
354.5280 +-#: elf/sprof.c:702
354.5281 ++#: elf/dl-load.c:763
354.5282 ++msgid "failed to map segment from shared object"
354.5283 ++msgstr "nepodarilo sa namapova» segment zo zdieµaného objektu"
354.5284 ++
354.5285 ++#: elf/sprof.c:698
354.5286 + msgid "failed to mmap the profiling data file"
354.5287 + msgstr "nepodarilo sa mmap-ova» súbor profilovacích údajov"
354.5288 + 
354.5289 +-#: iconv/iconv_prog.c:147
354.5290 ++#: iconv/iconv_prog.c:186
354.5291 + msgid "failed to start conversion processing"
354.5292 + msgstr "nepodarilo sa od¹tartova» konverziu"
354.5293 + 
354.5294 +-#: locale/programs/locfile.c:1154
354.5295 ++#: locale/programs/locfile.c:406
354.5296 + #, c-format
354.5297 + msgid "failure while writing data for category `%s'"
354.5298 + msgstr "chyba poèas zápisu údajov kategórie `%s'"
354.5299 + 
354.5300 +-#: nis/nis_call.c:155
354.5301 ++#: nis/nis_call.c:156
354.5302 + msgid "fcntl: F_SETFD"
354.5303 + msgstr "fcntl: F_SETFD"
354.5304 + 
354.5305 +-#: locale/programs/ld-monetary.c:163 locale/programs/ld-numeric.c:98
354.5306 +-#, c-format
354.5307 +-msgid "field `%s' in category `%s' not defined"
354.5308 +-msgstr "pole `%s' ketegórie `%s' nie je definované"
354.5309 +-
354.5310 +-#: locale/programs/ld-messages.c:86 locale/programs/ld-messages.c:110
354.5311 +-#, c-format
354.5312 +-msgid "field `%s' in category `%s' undefined"
354.5313 +-msgstr "pole `%s' kategórie `%s' nedefinované"
354.5314 +-
354.5315 +-#: sunrpc/rpc_main.c:1148
354.5316 +-#, c-format
354.5317 +-msgid "file '%s' already exists and may be overwritten\n"
354.5318 +-msgstr "súbor '%s' u¾ existuje a mô¾e by» prepísaný\n"
354.5319 +-
354.5320 +-#: locale/programs/locfile.c:677
354.5321 +-msgid "from-value of `collating-element' must be a string"
354.5322 +-msgstr "hodnota od pre `collating-element' musí by» re»azec"
354.5323 ++#. TRANS: the file will not be removed; this is an
354.5324 ++#. TRANS: informative message.
354.5325 ++#: sunrpc/rpc_main.c:1150
354.5326 ++#, c-format
354.5327 ++msgid "file `%s' already exists and may be overwritten\n"
354.5328 ++msgstr "súbor `%s' u¾ existuje a mô¾e by» prepísaný\n"
354.5329 ++
354.5330 ++#: elf/dl-load.c:1244
354.5331 ++msgid "file too short"
354.5332 ++msgstr "súbor je príli¹ krátky"
354.5333 + 
354.5334 +-#: inet/rcmd.c:316
354.5335 ++#: inet/rcmd.c:422
354.5336 + msgid "fstat failed"
354.5337 + msgstr "fstat sa nepodaril"
354.5338 + 
354.5339 +-#: locale/programs/linereader.c:333
354.5340 ++#: locale/programs/linereader.c:383
354.5341 + msgid "garbage at end of character code specification"
354.5342 + msgstr "smetie za koncom ¹pecifikácie kódu znaku"
354.5343 + 
354.5344 +-#: locale/programs/linereader.c:219
354.5345 ++#: locale/programs/linereader.c:271
354.5346 + msgid "garbage at end of number"
354.5347 + msgstr "smetie za koncom èísla"
354.5348 + 
354.5349 +-#: locale/programs/ld-time.c:195
354.5350 +-#, c-format
354.5351 +-msgid "garbage at end of offset value in string %d in `era' field in category `%s'"
354.5352 +-msgstr "smetie za koncom hodnoty posunutia v re»azci %d poµa `era' kategórie `%s'"
354.5353 +-
354.5354 +-#: locale/programs/ld-time.c:252
354.5355 +-#, c-format
354.5356 +-msgid "garbage at end of starting date in string %d in `era' field in category `%s'"
354.5357 +-msgstr "smetie za koncom poèiatoèného dátumu v re»azci %d poµa `era' kategórie `%s'"
354.5358 +-
354.5359 +-#: locale/programs/ld-time.c:328
354.5360 +-#, c-format
354.5361 +-msgid "garbage at end of stopping date in string %d in `era' field in category `%s'"
354.5362 +-msgstr "smetie za koncom koncového dátumu v re»azci %d poµa `era' kategórie `%s'"
354.5363 +-
354.5364 +-#: elf/sprof.c:81
354.5365 ++#: elf/sprof.c:77
354.5366 + msgid "generate call graph"
354.5367 + msgstr "tvorba grafu volaní"
354.5368 + 
354.5369 +-#: elf/sprof.c:80
354.5370 ++#: elf/sprof.c:76
354.5371 + msgid "generate flat profile with counts and ticks"
354.5372 + msgstr "tvorba jednoduchého profilu s poètami a tikmi"
354.5373 + 
354.5374 +-#: sunrpc/get_myaddr.c:77
354.5375 ++#: sunrpc/get_myaddr.c:78
354.5376 + msgid "get_myaddress: ioctl (get interface configuration)"
354.5377 + msgstr "get_myaddress: ioctl (získanie konfigurácie rozhrania)"
354.5378 + 
354.5379 +-#: nss/getent.c:53
354.5380 ++#: nss/getent.c:702
354.5381 + msgid "getent - get entries from administrative database."
354.5382 + msgstr "getent - získa» záznamy z administratívnej databázy."
354.5383 + 
354.5384 +-#: nscd/connections.c:200
354.5385 ++#: nscd/connections.c:220
354.5386 + #, c-format
354.5387 + msgid "handle_request: request received (Version = %d)"
354.5388 + msgstr "handle_request: ¾iados» prijatá (verzia = %d)"
354.5389 + 
354.5390 +-#: timezone/zic.c:613
354.5391 ++#: timezone/zic.c:637
354.5392 + msgid "hard link failed, symbolic link used"
354.5393 + msgstr "pevný odkaz zlyhal, pou¾itý symbolický"
354.5394 + 
354.5395 +-#: inet/rcmd.c:322
354.5396 ++#: inet/rcmd.c:428
354.5397 + msgid "hard linked somewhere"
354.5398 + msgstr "niekde existuje pevný odkaz"
354.5399 + 
354.5400 +-#: timezone/zic.c:1162
354.5401 ++#: locale/programs/charmap.c:981 locale/programs/repertoire.c:430
354.5402 ++msgid "hexadecimal range format should use only capital characters"
354.5403 ++msgstr "hexadecimálny formát rozsahu by mal pou¾íva» iba veµké písmená"
354.5404 ++
354.5405 ++#: timezone/zic.c:1187
354.5406 + msgid "illegal CORRECTION field on Leap line"
354.5407 + msgstr "neprípustné pole CORRECTION v riadku Leap"
354.5408 + 
354.5409 +-#: timezone/zic.c:1166
354.5410 ++#: timezone/zic.c:1191
354.5411 + msgid "illegal Rolling/Stationary field on Leap line"
354.5412 + msgstr "neprípustné pole Rolling/Stationary v riadku Leap"
354.5413 + 
354.5414 +-#: locale/programs/ld-collate.c:1782
354.5415 +-msgid "illegal character constant in string"
354.5416 +-msgstr "neprípustný znak v re»azci"
354.5417 +-
354.5418 +-#: sunrpc/rpc_scan.c:311
354.5419 ++#: sunrpc/rpc_scan.c:312
354.5420 + msgid "illegal character in file: "
354.5421 + msgstr "neprípustný znak v súbore: "
354.5422 + 
354.5423 +-#: locale/programs/ld-collate.c:1125
354.5424 +-msgid "illegal collation element"
354.5425 +-msgstr "neprípustný element triedenia"
354.5426 +-
354.5427 +-#: locale/programs/charmap.c:281
354.5428 +-msgid "illegal definition"
354.5429 +-msgstr "neprípustná definícia"
354.5430 +-
354.5431 +-#: locale/programs/charmap.c:434
354.5432 +-msgid "illegal encoding given"
354.5433 +-msgstr "zadané neprípustné kódovanie"
354.5434 +-
354.5435 +-#: locale/programs/linereader.c:551
354.5436 ++#: locale/programs/linereader.c:595
354.5437 + msgid "illegal escape sequence at end of string"
354.5438 + msgstr "chybná escape-sekvencia na konci re»azca"
354.5439 + 
354.5440 +-#: iconv/iconv_prog.c:342
354.5441 ++#: iconv/iconv_prog.c:427
354.5442 + #, c-format
354.5443 + msgid "illegal input sequence at position %ld"
354.5444 + msgstr "neprípustná vstupná sekvencia na pozícii %ld"
354.5445 + 
354.5446 +-#: locale/programs/charset.c:78
354.5447 +-msgid "illegal names for character range"
354.5448 +-msgstr "neprípustné mená pre rozsah znakov"
354.5449 +-
354.5450 +-#: sunrpc/rpc_main.c:462
354.5451 ++#: sunrpc/rpc_main.c:463
354.5452 + #, c-format
354.5453 +-msgid "illegal nettype :'%s'\n"
354.5454 +-msgstr "chybný nettype :'%s'\n"
354.5455 ++msgid "illegal nettype :`%s'\n"
354.5456 ++msgstr "chybný nettype :`%s'\n"
354.5457 + 
354.5458 +-#: locale/programs/ld-time.c:187
354.5459 +-#, c-format
354.5460 +-msgid "illegal number for offset in string %d in `era' field in category `%s'"
354.5461 +-msgstr "neprípustné èíslo pre posunutie v re»azci %d poµa `era' kategórie `%s'"
354.5462 +-
354.5463 +-#: catgets/gencat.c:361 catgets/gencat.c:438
354.5464 ++#: catgets/gencat.c:403 catgets/gencat.c:480
354.5465 + msgid "illegal set number"
354.5466 + msgstr "neprípustné èíslo sady"
354.5467 + 
354.5468 +-#: locale/programs/ld-time.c:243
354.5469 +-#, c-format
354.5470 +-msgid "illegal starting date in string %d in `era' field in category `%s'"
354.5471 +-msgstr "neprípustný poèiatoèný dátum v re»azci %d poµa `era' kategórie `%s'"
354.5472 +-
354.5473 +-#: locale/programs/ld-time.c:319
354.5474 ++#: locale/programs/ld-ctype.c:1221
354.5475 + #, c-format
354.5476 +-msgid "illegal stopping date in string %d in `era' field in category `%s'"
354.5477 +-msgstr "neprípustný koncový dátum v re»azci %d poµa `era' kategórie `%s'"
354.5478 ++msgid "implementation limit: no more than %Zd character classes allowed"
354.5479 ++msgstr "limit implementácie: maximálne mno¾stvo tried znakov je %Zd"
354.5480 + 
354.5481 +-#: locale/programs/ld-ctype.c:831
354.5482 +-#, c-format
354.5483 +-msgid "implementation limit: no more than %d character classes allowed"
354.5484 +-msgstr "limit implementácie: maximálne mno¾stvo tried znakov je %d"
354.5485 +-
354.5486 +-#: locale/programs/ld-ctype.c:863
354.5487 ++#: locale/programs/ld-ctype.c:1253
354.5488 + #, c-format
354.5489 + msgid "implementation limit: no more than %d character maps allowed"
354.5490 + msgstr "limit implementácie: maximálne mno¾stvo sád znakov je %d"
354.5491 + 
354.5492 +-#: iconv/iconv_prog.c:346
354.5493 ++#: iconv/iconv_prog.c:431
354.5494 + msgid "incomplete character or shift sequence at end of buffer"
354.5495 + msgstr "nekompletný znak alebo preraïovacia sekvencia na konci vyrovnávacej pamäti"
354.5496 + 
354.5497 +-#: db2/makedb.c:148
354.5498 +-msgid "incorrectly formatted file"
354.5499 +-msgstr "nesprávne formátovaný súbor"
354.5500 +-
354.5501 +-#: timezone/zic.c:825
354.5502 ++#: timezone/zic.c:850
354.5503 + msgid "input line of unknown type"
354.5504 + msgstr "vstupný riadok neznámeho typu"
354.5505 + 
354.5506 +-#: iconv/iconv_prog.c:350
354.5507 ++#: elf/dl-load.c:1291
354.5508 ++msgid "internal error"
354.5509 ++msgstr "interná chyba"
354.5510 ++
354.5511 ++#: iconv/iconv_prog.c:435
354.5512 + msgid "internal error (illegal descriptor)"
354.5513 + msgstr "vnútorná chyba (nesprávny deskriptor)"
354.5514 + 
354.5515 +-#: timezone/zic.c:1788
354.5516 ++#: timezone/zic.c:1813
354.5517 + msgid "internal error - addtype called with bad isdst"
354.5518 + msgstr "vnútorná chyba - addtype zavolaný s chybným isdst"
354.5519 + 
354.5520 +-#: timezone/zic.c:1796
354.5521 ++#: timezone/zic.c:1821
354.5522 + msgid "internal error - addtype called with bad ttisgmt"
354.5523 + msgstr "vnútorná chyba - addtype zavolaný s chybným ttisgmt"
354.5524 + 
354.5525 +-#: timezone/zic.c:1792
354.5526 ++#: timezone/zic.c:1817
354.5527 + msgid "internal error - addtype called with bad ttisstd"
354.5528 + msgstr "vnútorná chyba - addtype zavolaný s chybným ttisstd"
354.5529 + 
354.5530 +-#: locale/programs/ld-ctype.c:307
354.5531 ++#: locale/programs/ld-ctype.c:480 locale/programs/ld-ctype.c:536
354.5532 + #, c-format
354.5533 + msgid "internal error in %s, line %u"
354.5534 + msgstr "vnútorná chyba %s na riadku %u"
354.5535 + 
354.5536 +-#: timezone/zic.c:1034
354.5537 ++#: elf/dl-load.c:1264
354.5538 ++msgid "invalid ELF header"
354.5539 ++msgstr "neprípustná ELF hlavièka"
354.5540 ++
354.5541 ++#: timezone/zic.c:1059
354.5542 + msgid "invalid UTC offset"
354.5543 + msgstr "neprípustné posunutie voèi UTC"
354.5544 + 
354.5545 +-#: timezone/zic.c:1037
354.5546 ++#: timezone/zic.c:1062
354.5547 + msgid "invalid abbreviation format"
354.5548 + msgstr "neprípustný formát skratky"
354.5549 + 
354.5550 +-#: timezone/zic.c:1127 timezone/zic.c:1339 timezone/zic.c:1353
354.5551 ++#: catgets/gencat.c:687
354.5552 ++msgid "invalid character: message ignored"
354.5553 ++msgstr "neprípustný znak: správa ignorovaná"
354.5554 ++
354.5555 ++#: timezone/zic.c:1152 timezone/zic.c:1364 timezone/zic.c:1378
354.5556 + msgid "invalid day of month"
354.5557 + msgstr "neprípustný deò mesiaca"
354.5558 + 
354.5559 +-#: timezone/zic.c:1291
354.5560 ++#: locale/programs/charmap.c:347
354.5561 ++msgid "invalid definition"
354.5562 ++msgstr "neprípustná definícia"
354.5563 ++
354.5564 ++#: locale/programs/charmap.c:542
354.5565 ++msgid "invalid encoding given"
354.5566 ++msgstr "zadané neprípustné kódovanie"
354.5567 ++
354.5568 ++#: timezone/zic.c:1316
354.5569 + msgid "invalid ending year"
354.5570 + msgstr "neprípustný koncový rok"
354.5571 + 
354.5572 +-#: timezone/zic.c:1099
354.5573 ++#: catgets/gencat.c:1147 locale/programs/linereader.c:533
354.5574 ++msgid "invalid escape sequence"
354.5575 ++msgstr "neprípustná escape-sekvencia"
354.5576 ++
354.5577 ++#: timezone/zic.c:1124
354.5578 + msgid "invalid leaping year"
354.5579 + msgstr "neprípustný priestupný rok"
354.5580 + 
354.5581 +-#: elf/dl-open.c:159
354.5582 ++#: catgets/gencat.c:726
354.5583 ++msgid "invalid line"
354.5584 ++msgstr "neprípustný riadok"
354.5585 ++
354.5586 ++#: elf/dl-open.c:371
354.5587 + msgid "invalid mode for dlopen()"
354.5588 + msgstr "neprípustný mód pre dlopen()"
354.5589 + 
354.5590 +-#: timezone/zic.c:1114 timezone/zic.c:1217
354.5591 ++#: timezone/zic.c:1139 timezone/zic.c:1242
354.5592 + msgid "invalid month name"
354.5593 + msgstr "neprípustný názov mesiaca"
354.5594 + 
354.5595 +-#: timezone/zic.c:933
354.5596 ++#: locale/programs/charmap.c:969 locale/programs/ld-collate.c:2869
354.5597 ++#: locale/programs/repertoire.c:418
354.5598 ++msgid "invalid names for character range"
354.5599 ++msgstr "neprípustné mená pre rozsah znakov"
354.5600 ++
354.5601 ++#: debug/pcprofiledump.c:166
354.5602 ++msgid "invalid pointer size"
354.5603 ++msgstr "neprípustná veµkost» ukazovateµa"
354.5604 ++
354.5605 ++#: catgets/gencat.c:549
354.5606 ++msgid "invalid quote character"
354.5607 ++msgstr "neprípustný znak citácie"
354.5608 ++
354.5609 ++#: timezone/zic.c:958
354.5610 + msgid "invalid saved time"
354.5611 + msgstr "neprípustný ulo¾ený èas"
354.5612 + 
354.5613 +-#: timezone/zic.c:1266
354.5614 ++#: timezone/zic.c:1291
354.5615 + msgid "invalid starting year"
354.5616 + msgstr "neprípustný poèiatoèný rok"
354.5617 + 
354.5618 +-#: timezone/zic.c:1143 timezone/zic.c:1246
354.5619 ++#: timezone/zic.c:1168 timezone/zic.c:1271
354.5620 + msgid "invalid time of day"
354.5621 + msgstr "neprípustný èas v dni"
354.5622 + 
354.5623 +-#: timezone/zic.c:1344
354.5624 ++#: timezone/zic.c:1369
354.5625 + msgid "invalid weekday name"
354.5626 + msgstr "neprípustný názov dòa"
354.5627 + 
354.5628 +-#: nscd/connections.c:375
354.5629 ++#: nscd/connections.c:470
354.5630 ++#, c-format
354.5631 ++msgid "key length in request too long: %d"
354.5632 ++msgstr "då¾ka kµúèa v ¾iadosti príli¹ dlhá: %d"
354.5633 ++
354.5634 ++#: elf/ldconfig.c:738
354.5635 ++#, c-format
354.5636 ++msgid "libc4 library %s in wrong directory"
354.5637 ++msgstr "libc4 kni¾nica %s je v nesprávnom adresári"
354.5638 ++
354.5639 ++#: elf/ldconfig.c:732
354.5640 + #, c-format
354.5641 +-msgid "key length in request too long: %Zd"
354.5642 +-msgstr "då¾ka kµúèa v ¾iadosti príli¹ dlhá: %Zd"
354.5643 ++msgid "libc5 library %s in wrong directory"
354.5644 ++msgstr "libc5 kni¾nica %s je v nesprávnom adresári"
354.5645 + 
354.5646 +-#: locale/programs/ld-collate.c:1422
354.5647 +-msgid "line after ellipsis must contain character definition"
354.5648 +-msgstr "riadok za pokraèovaním musí obsahova» definíciu znaku"
354.5649 ++#: elf/ldconfig.c:735
354.5650 ++#, c-format
354.5651 ++msgid "libc6 library %s in wrong directory"
354.5652 ++msgstr "libc6 kni¾nica %s je v nesprávnom adresári"
354.5653 + 
354.5654 +-#: locale/programs/ld-collate.c:1401
354.5655 +-msgid "line before ellipsis does not contain definition for character constant"
354.5656 +-msgstr "riadok pred pokraèovaním neobsahuje definíciu pre znakovú kon¹tantu"
354.5657 ++#: elf/ldconfig.c:765
354.5658 ++#, c-format
354.5659 ++msgid "libraries %s and %s in directory %s have same soname but different type."
354.5660 ++msgstr "kni¾nice %s a %s v adresári %s majú rovnaké soname, ale odli¹ný typ."
354.5661 + 
354.5662 +-#: timezone/zic.c:805
354.5663 ++#: timezone/zic.c:830
354.5664 + msgid "line too long"
354.5665 + msgstr "pridlhý riadok"
354.5666 + 
354.5667 +-#: iconv/iconv_prog.c:58
354.5668 ++#: iconv/iconv_prog.c:59
354.5669 + msgid "list all known coded character sets"
354.5670 + msgstr "vypí¹ v¹etky známe znakové sady"
354.5671 + 
354.5672 +-#: locale/programs/localedef.c:273
354.5673 +-#, c-format
354.5674 +-msgid "locale file `%s', used in `copy' statement, not found"
354.5675 +-msgstr "súbor národného prostredia `%s' pou¾itý  v príkaze `copy' nebol nájdený"
354.5676 ++#: locale/programs/locfile.h:63
354.5677 ++msgid "locale name should consist only of portable characters"
354.5678 ++msgstr "názov prostredia by malo obsahova» iba prenositeµné znaky"
354.5679 + 
354.5680 +-#: inet/rcmd.c:307
354.5681 ++#: inet/rcmd.c:413
354.5682 + msgid "lstat failed"
354.5683 + msgstr "lstat zlyhal"
354.5684 + 
354.5685 +-#: catgets/gencat.c:619
354.5686 ++#: malloc/memusagestat.c:59
354.5687 ++msgid "make output graphic VALUE pixel high"
354.5688 ++msgstr "výstupný graf bude VALUE pixlov vysoký"
354.5689 ++
354.5690 ++#: malloc/memusagestat.c:58
354.5691 ++msgid "make output graphic VALUE pixel wide"
354.5692 ++msgstr "výstupný graf bude VALUE pixlov ¹iroký"
354.5693 ++
354.5694 ++#: catgets/gencat.c:780
354.5695 + msgid "malformed line ignored"
354.5696 + msgstr "nesprávny riadok ignorovaný"
354.5697 + 
354.5698 +-#: elf/sprof.c:554
354.5699 ++#: elf/sprof.c:550
354.5700 + msgid "mapping of section header string table failed"
354.5701 + msgstr "zlyhalo mapovanie tabuµky re»azcov hlavièky sekcie"
354.5702 + 
354.5703 +-#: elf/sprof.c:544
354.5704 ++#: elf/sprof.c:540
354.5705 + msgid "mapping of section headers failed"
354.5706 + msgstr "zlyhalo mapovanie hlavièiek sekcie"
354.5707 + 
354.5708 +-#: malloc/mcheck.c:202
354.5709 ++#: malloc/mcheck.c:285
354.5710 + msgid "memory clobbered before allocated block\n"
354.5711 + msgstr "pamä» pred prideleným blokom prepísaná\n"
354.5712 + 
354.5713 +-#: malloc/mcheck.c:205
354.5714 ++#: malloc/mcheck.c:288
354.5715 + msgid "memory clobbered past end of allocated block\n"
354.5716 + msgstr "pamä» za koncom prideleného bloku prepísaná\n"
354.5717 + 
354.5718 +-#: locale/programs/ld-collate.c:170 locale/programs/ld-collate.c:176
354.5719 +-#: locale/programs/ld-collate.c:180 locale/programs/ld-collate.c:1449
354.5720 +-#: locale/programs/ld-collate.c:1478 locale/programs/locfile.c:1082
354.5721 +-#: locale/programs/xmalloc.c:70 login/programs/database.c:62
354.5722 +-#: login/programs/database.c:79 login/programs/database.c:95
354.5723 +-#: posix/getconf.c:682
354.5724 ++#: locale/programs/locfile.c:334 locale/programs/xmalloc.c:70
354.5725 ++#: malloc/obstack.c:477 posix/getconf.c:809
354.5726 + msgid "memory exhausted"
354.5727 + msgstr "nedostatok pamäti"
354.5728 + 
354.5729 +-#: malloc/obstack.c:471
354.5730 +-msgid "memory exhausted\n"
354.5731 +-msgstr "nedostatok pamäti\n"
354.5732 +-
354.5733 +-#: malloc/mcheck.c:199
354.5734 ++#: malloc/mcheck.c:282
354.5735 + msgid "memory is consistent, library is buggy\n"
354.5736 + msgstr "pamä» je konzistentná, kni¾nica je chybná\n"
354.5737 + 
354.5738 +-#: locale/programs/ld-time.c:370
354.5739 +-#, c-format
354.5740 +-msgid "missing era format in string %d in `era' field in category `%s'"
354.5741 +-msgstr "chýba formát éry v re»azci %d v poli `era' kategórie `%s'"
354.5742 +-
354.5743 +-#: locale/programs/ld-time.c:358
354.5744 +-#, c-format
354.5745 +-msgid "missing era name in string %d in `era' field in category `%s'"
354.5746 +-msgstr "chýba meno éry v re»azci %d v poli `era' kategórie `%s'"
354.5747 ++#: elf/cache.c:120
354.5748 ++msgid "mmap of cache file failed.\n"
354.5749 ++msgstr "zlyhalo mapovanie cache súboru\n"
354.5750 ++
354.5751 ++#: elf/../sysdeps/generic/readelflib.c:108
354.5752 ++msgid "more than one dynamic segment\n"
354.5753 ++msgstr "viac ako jeden dynamický segment\n"
354.5754 + 
354.5755 +-#: timezone/zic.c:928
354.5756 ++#: timezone/zic.c:953
354.5757 + msgid "nameless rule"
354.5758 + msgstr "bezmenné pravidlo"
354.5759 + 
354.5760 +-#: iconv/iconv_prog.c:133
354.5761 ++#: iconv/iconv_prog.c:139
354.5762 + msgid "neither original nor target encoding specified"
354.5763 + msgstr "nie je ¹pecifikované pôvodné ani cieµové kódovanie"
354.5764 + 
354.5765 +-#: nis/nss_nisplus/nisplus-publickey.c:262
354.5766 +-#: nis/nss_nisplus/nisplus-publickey.c:268
354.5767 +-#: nis/nss_nisplus/nisplus-publickey.c:327
354.5768 +-#: nis/nss_nisplus/nisplus-publickey.c:336
354.5769 ++#: nis/nss_nisplus/nisplus-publickey.c:281
354.5770 ++#: nis/nss_nisplus/nisplus-publickey.c:287
354.5771 ++#: nis/nss_nisplus/nisplus-publickey.c:346
354.5772 ++#: nis/nss_nisplus/nisplus-publickey.c:355
354.5773 + #, c-format
354.5774 + msgid "netname2user: (nis+ lookup): %s\n"
354.5775 + msgstr "netname2user: (nis+ lookup): %s\n"
354.5776 + 
354.5777 +-#: nis/nss_nisplus/nisplus-publickey.c:281
354.5778 ++#: nis/nss_nisplus/nisplus-publickey.c:300
354.5779 + #, c-format
354.5780 + msgid "netname2user: DES entry for %s in directory %s not unique"
354.5781 + msgstr "netname2user: DES záznam pre %s v adresári %s nejednoznaèný"
354.5782 + 
354.5783 +-#: nis/nss_nisplus/nisplus-publickey.c:349
354.5784 ++#: nis/nss_nisplus/nisplus-publickey.c:368
354.5785 + #, c-format
354.5786 + msgid "netname2user: LOCAL entry for %s in directory %s not unique"
354.5787 + msgstr "netname2user: LOCAL záznam pre %s v adresári %s nejednoznaèný"
354.5788 + 
354.5789 +-#: nis/nss_nisplus/nisplus-publickey.c:194
354.5790 ++#: nis/nss_nisplus/nisplus-publickey.c:207
354.5791 + #, c-format
354.5792 +-msgid "netname2user: missing group id list in '%s'."
354.5793 +-msgstr "netname2user: chýbajúci zoznam id skupín v '%s'."
354.5794 ++msgid "netname2user: missing group id list in `%s'."
354.5795 ++msgstr "netname2user: chýbajúci zoznam id skupín v `%s'."
354.5796 + 
354.5797 +-#: nis/nss_nisplus/nisplus-publickey.c:299
354.5798 ++#: nis/nss_nisplus/nisplus-publickey.c:318
354.5799 + #, c-format
354.5800 +-msgid "netname2user: principal name '%s' too long"
354.5801 +-msgstr "netname2user: názov principála '%s' príli¹ dlhý"
354.5802 ++msgid "netname2user: principal name `%s' too long"
354.5803 ++msgstr "netname2user: názov principála `%s' príli¹ dlhý"
354.5804 + 
354.5805 +-#: nis/nss_nisplus/nisplus-publickey.c:356
354.5806 ++#: nis/nss_nisplus/nisplus-publickey.c:375
354.5807 + msgid "netname2user: should not have uid 0"
354.5808 + msgstr "netname2user: nemal by ma» uid 0"
354.5809 + 
354.5810 +-#: sunrpc/svc_simple.c:158
354.5811 ++#: sunrpc/svc_simple.c:159
354.5812 + #, c-format
354.5813 + msgid "never registered prog %d\n"
354.5814 + msgstr "program %d nebol nikdy registrovaný\n"
354.5815 + 
354.5816 +-#: locale/programs/repertoire.c:238
354.5817 ++#: locale/programs/repertoire.c:272
354.5818 + msgid "no <Uxxxx> or <Uxxxxxxxx> value given"
354.5819 + msgstr "nezadaná <Uxxxx> alebo <Uxxxxxxxx> hodnota"
354.5820 + 
354.5821 +-#: locale/programs/ld-messages.c:101 locale/programs/ld-messages.c:125
354.5822 +-#, c-format
354.5823 +-msgid "no correct regular expression for field `%s' in category `%s': %s"
354.5824 +-msgstr "pre pole `%s' v kategórii `%s' neexistuje správny regulérny výraz: %s"
354.5825 +-
354.5826 +-#: timezone/zic.c:2115
354.5827 ++#: timezone/zic.c:2142
354.5828 + msgid "no day in month matches rule"
354.5829 + msgstr "s pravidlom sa nezhoduje ¾iadny deò v mesiaci"
354.5830 + 
354.5831 +-#: locale/programs/ld-collate.c:267
354.5832 ++#: locale/programs/ld-collate.c:1757
354.5833 + msgid "no definition of `UNDEFINED'"
354.5834 + msgstr "neexistuje definícia pre `UNDEFINED'"
354.5835 + 
354.5836 +-#: elf/sprof.c:276
354.5837 ++#: elf/sprof.c:272
354.5838 + #, c-format
354.5839 + msgid "no filename for profiling data given and shared object `%s' has no soname"
354.5840 + msgstr "nebol zadaný názov súboru pre profilovacie údaje a zdieµaný objekt `%s' nemá soname"
354.5841 + 
354.5842 +-#: locale/programs/locfile.c:609
354.5843 ++#: locale/programs/ld-ctype.c:739
354.5844 ++msgid "no input digits defined and none of the standard names in the charmap"
354.5845 ++msgstr "neboli definované ¾iadne vstupné èíslice a v znakovej mape nie je ¾iadne zo ¹tandardných mien"
354.5846 ++
354.5847 ++#: locale/programs/locfile.h:82
354.5848 + msgid "no other keyword shall be specified when `copy' is used"
354.5849 + msgstr "pri pou¾ití `copy' nemá by» zadané ¾iadne iné kµúèové slovo"
354.5850 + 
354.5851 +-#: locale/programs/localedef.c:334
354.5852 ++#: locale/programs/ld-ctype.c:3349
354.5853 ++msgid "no output digits defined and none of the standard names in the charmap"
354.5854 ++msgstr "neboli definované ¾iadne výstupné èíslice a v znakovej mape nie je ¾iadne zo ¹tandardných mien"
354.5855 ++
354.5856 ++#: locale/programs/localedef.c:236
354.5857 + msgid "no output file produced because warning were issued"
354.5858 + msgstr "výstupný súbor nebol vytvorený kvôli výskytu varovaní"
354.5859 + 
354.5860 +-#: locale/programs/locfile.c:283 locale/programs/locfile.c:301
354.5861 +-#: locale/programs/locfile.c:319 locale/programs/locfile.c:337
354.5862 +-#: locale/programs/locfile.c:355 locale/programs/locfile.c:373
354.5863 +-msgid "no repertoire map specified: cannot proceed"
354.5864 +-msgstr "nebola zadaná mapa repertoáru: nie je mo¾né pokraèova»"
354.5865 +-
354.5866 +-#: locale/programs/charmap.c:400 locale/programs/charmap.c:550
354.5867 +-#: locale/programs/charmap.c:629 locale/programs/repertoire.c:199
354.5868 ++#: locale/programs/charmap.c:488 locale/programs/charmap.c:668
354.5869 ++#: locale/programs/charmap.c:764 locale/programs/repertoire.c:231
354.5870 + msgid "no symbolic name given"
354.5871 + msgstr "nebolo zadané ¾iadne symbolické meno"
354.5872 + 
354.5873 +-#: locale/programs/charmap.c:465 locale/programs/charmap.c:596
354.5874 +-#: locale/programs/charmap.c:662 locale/programs/repertoire.c:261
354.5875 ++#: locale/programs/charmap.c:575 locale/programs/charmap.c:723
354.5876 ++#: locale/programs/charmap.c:806 locale/programs/repertoire.c:297
354.5877 + msgid "no symbolic name given for end of range"
354.5878 + msgstr "nebolo zadané ¾iadne symbolické meno pre koniec rozsahu"
354.5879 + 
354.5880 +-#: locale/programs/ld-collate.c:249
354.5881 +-#, c-format
354.5882 +-msgid "no weight defined for symbol `%s'"
354.5883 +-msgstr "symbol `%s' nemá definovanú váhu"
354.5884 ++#: locale/programs/linereader.c:641
354.5885 ++msgid "non-symbolic character value should not be used"
354.5886 ++msgstr "nesymbolické hodnoty znakov by nemali by» pou¾ívané"
354.5887 ++
354.5888 ++#: locale/programs/ld-ctype.c:804
354.5889 ++msgid "not all characters used in `outdigit' are available in the charmap"
354.5890 ++msgstr "nie v¹etky znaky pou¾ité v `outdigit' sú dostupné v znakovej mape"
354.5891 ++
354.5892 ++#: locale/programs/ld-ctype.c:821
354.5893 ++msgid "not all characters used in `outdigit' are available in the repertoire"
354.5894 ++msgstr "nie v¹etky znaky pou¾ité v `outdigit' sú dostupné v repertoári"
354.5895 + 
354.5896 +-#: inet/rcmd.c:309
354.5897 ++#: inet/rcmd.c:415
354.5898 + msgid "not regular file"
354.5899 + msgstr "nie je regulérny súbor"
354.5900 + 
354.5901 +-#: nscd/nscd_stat.c:130
354.5902 ++#: nscd/nscd_stat.c:131
354.5903 + #, c-format
354.5904 + msgid ""
354.5905 + "nscd configuration:\n"
354.5906 +@@ -3679,48 +4879,72 @@
354.5907 + "\n"
354.5908 + "%15d  ladiaca úroveò servera\n"
354.5909 + 
354.5910 +-#: nscd/nscd_stat.c:104
354.5911 ++#: nscd/nscd_stat.c:105
354.5912 + msgid "nscd not running!\n"
354.5913 + msgstr "nscd nebe¾í!\n"
354.5914 + 
354.5915 +-#: locale/programs/charmap.c:514
354.5916 ++#: elf/dl-load.c:1051
354.5917 ++msgid "object file has no dynamic section"
354.5918 ++msgstr "objektový súbor neobsahuje ¾iadnu dynamickú sekciu"
354.5919 ++
354.5920 ++#: iconv/iconv_prog.c:61
354.5921 ++msgid "omit invalid characters from output"
354.5922 ++msgstr "vynecha» z výstupu neplatné znaky"
354.5923 ++
354.5924 ++#: elf/dl-load.c:1311
354.5925 ++msgid "only ET_DYN and ET_EXEC can be loaded"
354.5926 ++msgstr "iba ET_DYN a ET_EXEC mô¾u by» naèítané"
354.5927 ++
354.5928 ++#: locale/programs/charmap.c:632
354.5929 + msgid "only WIDTH definitions are allowed to follow the CHARMAP definition"
354.5930 + msgstr "po definícii CHARMAP mô¾u nasledova» iba definície WIDTH"
354.5931 + 
354.5932 +-#: iconv/iconv_prog.c:135
354.5933 ++#: locale/programs/ld-collate.c:1005 locale/programs/ld-collate.c:1175
354.5934 ++#, c-format
354.5935 ++msgid "order for `%.*s' already defined at %s:%Zu"
354.5936 ++msgstr "poradie pre `%.*s' je u¾ definované na %s:%Zu"
354.5937 ++
354.5938 ++#: iconv/iconv_prog.c:141
354.5939 + msgid "original encoding not specified using `-f'"
354.5940 + msgstr "pôvodné kódovanie nebolo zadané pomocou `-f'"
354.5941 + 
354.5942 +-#: iconv/iconv_prog.c:60
354.5943 ++#: inet/ruserpass.c:167 inet/ruserpass.c:190
354.5944 ++msgid "out of memory"
354.5945 ++msgstr "nedostatok pamäti"
354.5946 ++
354.5947 ++#: iconv/iconv_prog.c:62
354.5948 + msgid "output file"
354.5949 + msgstr "výstupný súbor"
354.5950 + 
354.5951 +-#: sunrpc/pm_getmaps.c:73
354.5952 ++#: sunrpc/pm_getmaps.c:74
354.5953 + msgid "pmap_getmaps rpc problem"
354.5954 + msgstr "pmap_getmaps rpc problém"
354.5955 + 
354.5956 +-#: inet/rcmd.c:179
354.5957 ++#: inet/rcmd.c:233
354.5958 + msgid "poll: protocol failure in circuit setup\n"
354.5959 + msgstr "poll: chyba protokolu poèas prípravy okruhu\n"
354.5960 + 
354.5961 +-#: sunrpc/rpc_scan.c:523 sunrpc/rpc_scan.c:533
354.5962 ++#: locale/programs/ld-ctype.c:1949 locale/programs/ld-ctype.c:2000
354.5963 ++msgid "premature end of `translit_ignore' definition"
354.5964 ++msgstr "predèasný koniec definície `translit_ignore'"
354.5965 ++
354.5966 ++#: sunrpc/rpc_scan.c:524 sunrpc/rpc_scan.c:534
354.5967 + msgid "preprocessor error"
354.5968 + msgstr "chyba preprocesora"
354.5969 + 
354.5970 +-#: elf/sprof.c:78
354.5971 ++#: locale/programs/ld-ctype.c:2731
354.5972 ++msgid "previous definition was here"
354.5973 ++msgstr "predchádzajúca definícia bola tu"
354.5974 ++
354.5975 ++#: elf/sprof.c:74
354.5976 + msgid "print list of count paths and their number of use"
354.5977 + msgstr "vypísa» zoznam ciest poètov a poèet ich pou¾ití"
354.5978 + 
354.5979 +-#: iconv/iconv_prog.c:61
354.5980 ++#: iconv/iconv_prog.c:64
354.5981 + msgid "print progress information"
354.5982 + msgstr "vypisova» informáciu o postupe"
354.5983 + 
354.5984 +-#: db2/makedb.c:345
354.5985 +-#, c-format
354.5986 +-msgid "problems while reading `%s'"
354.5987 +-msgstr "problémy poèas èítania `%s'"
354.5988 +-
354.5989 +-#: elf/sprof.c:691
354.5990 ++#: elf/sprof.c:687
354.5991 + #, c-format
354.5992 + msgid "profiling data file `%s' does not match shared object `%s'"
354.5993 + msgstr "profilovacie údaje `%s' nesúhlasia so zdieµanýmobjektom `%s'"
354.5994 +@@ -3742,33 +4966,42 @@
354.5995 + msgid "program %lu version %lu ready and waiting\n"
354.5996 + msgstr "program %lu verzie %lu pripravený a èakajúci\n"
354.5997 + 
354.5998 +-#: inet/rcmd.c:176
354.5999 ++#: inet/rcmd.c:270
354.6000 ++#, c-format
354.6001 ++msgid "rcmd: %s: short read"
354.6002 ++msgstr "rcmd: %s: krátke èítanie"
354.6003 ++
354.6004 ++#: inet/rcmd.c:230
354.6005 + #, c-format
354.6006 + msgid "rcmd: poll (setting up stderr): %m\n"
354.6007 + msgstr "rcmd: poll (nastavenie stderr): %m\n"
354.6008 + 
354.6009 +-#: inet/rcmd.c:110
354.6010 ++#: inet/rcmd.c:158
354.6011 + msgid "rcmd: socket: All ports in use\n"
354.6012 + msgstr "rcmd: socket: V¹etky porty sú pou¾ité\n"
354.6013 + 
354.6014 +-#: inet/rcmd.c:166
354.6015 ++#: inet/rcmd.c:220
354.6016 + #, c-format
354.6017 + msgid "rcmd: write (setting up stderr): %m\n"
354.6018 + msgstr "rcmd: write (nastavenie stderr): %m\n"
354.6019 + 
354.6020 +-#: sunrpc/svc_simple.c:98
354.6021 ++#: sunrpc/svc_simple.c:99
354.6022 + msgid "registerrpc: out of memory\n"
354.6023 + msgstr "registerrpc: nedostatok pamäti\n"
354.6024 + 
354.6025 +-#: timezone/zic.c:1849
354.6026 ++#: timezone/zic.c:1874
354.6027 + msgid "repeated leap second moment"
354.6028 + msgstr "opakovaný moment priestupnej sekundy"
354.6029 + 
354.6030 +-#: locale/programs/repertoire.c:95
354.6031 ++#: locale/programs/repertoire.c:342
354.6032 + #, c-format
354.6033 + msgid "repertoire map file `%s' not found"
354.6034 + msgstr "súbor mapy repertoáru `%s' nebol nájdený"
354.6035 + 
354.6036 ++#: locale/programs/charmap.c:1063
354.6037 ++msgid "resulting bytes for range not representable."
354.6038 ++msgstr "výsledné bajty rozsahu nie sú zobraziteµné"
354.6039 ++
354.6040 + #: sunrpc/rpc_main.c:1117
354.6041 + msgid "rpcgen: arglist coding error\n"
354.6042 + msgstr "rpcgen: chyba kódovania zoznamu argumentov\n"
354.6043 +@@ -3801,469 +5034,401 @@
354.6044 + msgid "rpcinfo: can't contact portmapper"
354.6045 + msgstr "rpcinfo: nie je mo¾né spoji» sa s portmapperom"
354.6046 + 
354.6047 +-#: timezone/zic.c:718 timezone/zic.c:720
354.6048 ++#: timezone/zic.c:743 timezone/zic.c:745
354.6049 + msgid "same rule name in multiple files"
354.6050 + msgstr "rovnaké meno pravidla vo viacerých súboroch"
354.6051 + 
354.6052 +-#: nscd/connections.c:387
354.6053 ++#: elf/dl-load.c:1116
354.6054 ++msgid "shared object cannot be dlopen()ed"
354.6055 ++msgstr "zdieµaný objekt nemô¾e by» otvorený pomocou dlopen()"
354.6056 ++
354.6057 ++#: elf/dl-close.c:63
354.6058 ++msgid "shared object not open"
354.6059 ++msgstr "zdieµaný objekt nie je otvorený"
354.6060 ++
354.6061 ++#: nscd/connections.c:482
354.6062 + #, c-format
354.6063 + msgid "short read while reading request key: %s"
354.6064 + msgstr "neúplné èítanie kµúèa ¾iadosti: %s"
354.6065 + 
354.6066 +-#: nscd/connections.c:364
354.6067 ++#: nscd/connections.c:436
354.6068 + #, c-format
354.6069 + msgid "short read while reading request: %s"
354.6070 + msgstr "neúplné èítanie ¾iadosti: `%s'"
354.6071 + 
354.6072 +-#: nscd/grpcache.c:191 nscd/hstcache.c:278 nscd/pwdcache.c:188
354.6073 ++#: nscd/grpcache.c:193 nscd/hstcache.c:278 nscd/pwdcache.c:189
354.6074 + #, c-format
354.6075 + msgid "short write in %s: %s"
354.6076 + msgstr "neúplný zápis v %s: %s"
354.6077 + 
354.6078 +-#: inet/rcmd.c:197
354.6079 ++#: inet/rcmd.c:260
354.6080 + msgid "socket: protocol failure in circuit setup\n"
354.6081 + msgstr "socket: chyba protokolu pri príprave okruhu\n"
354.6082 + 
354.6083 +-#: locale/programs/locfile.c:730
354.6084 +-msgid "sorting order `forward' and `backward' are mutually exclusive"
354.6085 +-msgstr "poradie triedenia `forward' a `backward' sa navzájom vyluèujú"
354.6086 +-
354.6087 +-#: locale/programs/ld-collate.c:1582 locale/programs/ld-collate.c:1628
354.6088 +-msgid "specification of sorting weight for collation symbol does not make sense"
354.6089 +-msgstr "¹pecifikácia váh triedenia pre symbol triedenia nedáva zmysel"
354.6090 +-
354.6091 +-#: timezone/zic.c:789
354.6092 ++#: timezone/zic.c:814
354.6093 + msgid "standard input"
354.6094 + msgstr "¹tandardný vstup"
354.6095 + 
354.6096 +-#: timezone/zdump.c:268
354.6097 ++#: timezone/zdump.c:269
354.6098 + msgid "standard output"
354.6099 + msgstr "¹tandardný výstup"
354.6100 + 
354.6101 +-#: locale/programs/ld-time.c:272
354.6102 +-#, c-format
354.6103 +-msgid "starting date is illegal in string %d in `era' field in category `%s'"
354.6104 +-msgstr "neprípustný poèiatoèný dátum v re»azci %d v poli `era' kategórie `%s'"
354.6105 ++#: locale/programs/ld-ctype.c:1680
354.6106 ++msgid "start and end character sequence of range must have the same length"
354.6107 ++msgstr "úvodná a koncová znaková sekvencia rozsahu musia ma» rovnakú då¾ku"
354.6108 + 
354.6109 +-#: timezone/zic.c:1300
354.6110 ++#: timezone/zic.c:1325
354.6111 + msgid "starting year greater than ending year"
354.6112 + msgstr "poèiatoèný rok väè¹í ako koncový"
354.6113 + 
354.6114 +-#: timezone/zic.c:1272 timezone/zic.c:1297
354.6115 ++#: timezone/zic.c:1297 timezone/zic.c:1322
354.6116 + msgid "starting year too high to be represented"
354.6117 + msgstr "poèiatoèný rok priveµký pre zobrazenie"
354.6118 + 
354.6119 +-#: timezone/zic.c:1270 timezone/zic.c:1295
354.6120 ++#: timezone/zic.c:1295 timezone/zic.c:1320
354.6121 + msgid "starting year too low to be represented"
354.6122 + msgstr "poèiatoèný rok primalý pre zobrazenie"
354.6123 + 
354.6124 +-#: locale/programs/ld-time.c:348
354.6125 +-#, c-format
354.6126 +-msgid "stopping date is illegal in string %d in `era' field in category `%s'"
354.6127 +-msgstr "neprípustný koncový dátum v re»azci %d v poli `era' kategórie `%s'"
354.6128 +-
354.6129 +-#: sunrpc/svc_run.c:81
354.6130 +-msgid "svc_run: - select failed"
354.6131 +-msgstr "svc_run: - select zlyhal"
354.6132 ++#: iconv/iconv_prog.c:63
354.6133 ++msgid "suppress warnings"
354.6134 ++msgstr "potlaèi» varovania"
354.6135 ++
354.6136 ++#: sunrpc/svc_run.c:76
354.6137 ++msgid "svc_run: - poll failed"
354.6138 ++msgstr "svc_run: - poll zlyhal"
354.6139 + 
354.6140 +-#: sunrpc/svc_tcp.c:160
354.6141 ++#: sunrpc/svc_tcp.c:161
354.6142 + msgid "svc_tcp.c - cannot getsockname or listen"
354.6143 + msgstr "svc_tcp.c - nie je mo¾né vykona» getsockname alebo listen"
354.6144 + 
354.6145 +-#: sunrpc/svc_tcp.c:145
354.6146 ++#: sunrpc/svc_tcp.c:146
354.6147 + msgid "svc_tcp.c - tcp socket creation problem"
354.6148 + msgstr "svc_tcp.c - problém pri vytváraní tcp socketu"
354.6149 + 
354.6150 +-#: sunrpc/svc_tcp.c:209 sunrpc/svc_tcp.c:215
354.6151 ++#: sunrpc/svc_tcp.c:210 sunrpc/svc_tcp.c:216
354.6152 + msgid "svc_tcp: makefd_xprt: out of memory\n"
354.6153 + msgstr "svc_tcp: makefd_xprt: nedostatok pamäti\n"
354.6154 + 
354.6155 +-#: sunrpc/svc_unix.c:135
354.6156 ++#: sunrpc/svc_unix.c:137
354.6157 + msgid "svc_unix.c - AF_UNIX socket creation problem"
354.6158 + msgstr "svc_unix.c - problém pri vytváraní AF_UNIX socketu"
354.6159 + 
354.6160 +-#: sunrpc/svc_unix.c:151
354.6161 ++#: sunrpc/svc_unix.c:153
354.6162 + msgid "svc_unix.c - cannot getsockname or listen"
354.6163 + msgstr "svc_unix.c - nemô¾em vykona» getsockname alebo listen"
354.6164 + 
354.6165 +-#: sunrpc/svc_unix.c:201 sunrpc/svc_unix.c:207
354.6166 ++#: sunrpc/svc_unix.c:203 sunrpc/svc_unix.c:209
354.6167 + msgid "svc_unix: makefd_xprt: out of memory\n"
354.6168 + msgstr "svc_unix: makefd_xprt: nedostatok pamäti\n"
354.6169 + 
354.6170 +-#: sunrpc/svc_tcp.c:168 sunrpc/svc_tcp.c:176
354.6171 ++#: sunrpc/svc_tcp.c:169 sunrpc/svc_tcp.c:177
354.6172 + msgid "svctcp_create: out of memory\n"
354.6173 + msgstr "svctcp_create: nedostatok pamäti\n"
354.6174 + 
354.6175 +-#: sunrpc/svc_udp.c:135
354.6176 ++# msgmerge complains: duplicate message definition
354.6177 ++# 3073: ...this is the location of the first definition
354.6178 ++# entry disabled, Martin v. Löwis
354.6179 ++# #: sunrpc/svc_tcp.c:168 sunrpc/svc_tcp.c:176
354.6180 ++# msgid "svctcp_create: out of memory\n"
354.6181 ++# msgstr "svctcp_create: nedostatok pamäti\n"
354.6182 ++#: sunrpc/svc_udp.c:141
354.6183 + msgid "svcudp_create - cannot getsockname"
354.6184 + msgstr "svcudp_create - nemô¾em vykona» getsockname"
354.6185 + 
354.6186 +-#: sunrpc/svc_udp.c:143 sunrpc/svc_udp.c:149 sunrpc/svc_udp.c:155
354.6187 ++#: sunrpc/svc_udp.c:149 sunrpc/svc_udp.c:155 sunrpc/svc_udp.c:161
354.6188 + msgid "svcudp_create: out of memory\n"
354.6189 + msgstr "svcudp_create: nedostatok pamäti\n"
354.6190 + 
354.6191 +-#: sunrpc/svc_udp.c:121
354.6192 ++#: sunrpc/svc_udp.c:127
354.6193 + msgid "svcudp_create: socket creation problem"
354.6194 + msgstr "svcudp_create: problém pri vytváraní socketu"
354.6195 + 
354.6196 +-#: sunrpc/svc_unix.c:160 sunrpc/svc_unix.c:168
354.6197 ++#: sunrpc/svc_udp.c:177
354.6198 ++msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n"
354.6199 ++msgstr "svcudp_create: xp_pad je príli¹ malý pre IP_PKTINFO\n"
354.6200 ++
354.6201 ++#: sunrpc/svc_unix.c:162 sunrpc/svc_unix.c:170
354.6202 + msgid "svcunix_create: out of memory\n"
354.6203 + msgstr "svcunix_create: nedostatok pamäti\n"
354.6204 + 
354.6205 +-#: locale/programs/ld-collate.c:1201
354.6206 ++#: locale/programs/linereader.c:745
354.6207 + #, c-format
354.6208 +-msgid "symbol for multicharacter collating element `%.*s' duplicates element definition"
354.6209 +-msgstr "symbol pre viacznakový element triedenia `%.*s' duplikuje definíciu elementu"
354.6210 ++msgid "symbol `%.*s' not in charmap"
354.6211 ++msgstr "symbol `%.*s' nie je v mape znakov"
354.6212 + 
354.6213 +-#: locale/programs/ld-collate.c:1073
354.6214 ++#: locale/programs/linereader.c:766
354.6215 + #, c-format
354.6216 +-msgid "symbol for multicharacter collating element `%.*s' duplicates other element definition"
354.6217 +-msgstr "symbol pre viacznakový element triedenia `%.*s' duplikuje iný element"
354.6218 ++msgid "symbol `%.*s' not in repertoire map"
354.6219 ++msgstr "symbol `%.*s' nie je v mape repertoáru"
354.6220 + 
354.6221 +-#: locale/programs/ld-collate.c:1210
354.6222 ++#: locale/programs/ld-collate.c:1617 locale/programs/ld-collate.c:1716
354.6223 + #, c-format
354.6224 +-msgid "symbol for multicharacter collating element `%.*s' duplicates other symbol definition"
354.6225 +-msgstr "symbol pre viacznakový element triedenia `%.*s' duplikuje definíciu iného symbolu"
354.6226 ++msgid "symbol `%s'"
354.6227 ++msgstr "symbol `%s'"
354.6228 + 
354.6229 +-#: locale/programs/ld-collate.c:1082
354.6230 ++#: locale/programs/ld-collate.c:1614 locale/programs/ld-collate.c:1713
354.6231 + #, c-format
354.6232 +-msgid "symbol for multicharacter collating element `%.*s' duplicates symbol definition"
354.6233 +-msgstr "symbol pre viacznakový element triedenia `%.*s' duplikuje definíciu symbolu"
354.6234 ++msgid "symbol `%s' has the same encoding as"
354.6235 ++msgstr "symbol `%s' má rovnaké kódovanie ako"
354.6236 + 
354.6237 +-#: locale/programs/ld-collate.c:1064 locale/programs/ld-collate.c:1192
354.6238 ++#: locale/programs/ld-collate.c:1539
354.6239 + #, c-format
354.6240 +-msgid "symbol for multicharacter collating element `%.*s' duplicates symbolic name in charset"
354.6241 +-msgstr "symbol pre viacznakový element triedenia `%.*s' duplikuje symbolické meno v znakovej sade"
354.6242 ++msgid "symbol `%s' not defined"
354.6243 ++msgstr "symbol `%s' nie je definovaný"
354.6244 + 
354.6245 +-#: locale/programs/charmap.c:399 locale/programs/charmap.c:433
354.6246 +-#: locale/programs/charmap.c:463 locale/programs/charmap.c:549
354.6247 +-#: locale/programs/charmap.c:595 locale/programs/charmap.c:628
354.6248 +-#: locale/programs/charmap.c:660
354.6249 ++#: locale/programs/ld-ctype.c:1955 locale/programs/ld-ctype.c:2006
354.6250 ++#: locale/programs/ld-ctype.c:2048
354.6251 ++msgid "syntax error"
354.6252 ++msgstr "chyba syntaxe"
354.6253 ++
354.6254 ++#: locale/programs/charmap.c:487 locale/programs/charmap.c:541
354.6255 ++#: locale/programs/charmap.c:573 locale/programs/charmap.c:667
354.6256 ++#: locale/programs/charmap.c:722 locale/programs/charmap.c:763
354.6257 ++#: locale/programs/charmap.c:804
354.6258 + #, c-format
354.6259 + msgid "syntax error in %s definition: %s"
354.6260 + msgstr "chyba syntaxe v definícii %s: %s"
354.6261 + 
354.6262 +-#: locale/programs/locfile.c:750
354.6263 +-msgid "syntax error in `order_start' directive"
354.6264 +-msgstr "chyba syntaxe v direktíve `order_start'"
354.6265 +-
354.6266 +-#: locale/programs/locfile.c:492
354.6267 +-msgid "syntax error in character class definition"
354.6268 +-msgstr "chyba syntaxe v definícii triedy znakov"
354.6269 +-
354.6270 +-#: locale/programs/locfile.c:550
354.6271 +-msgid "syntax error in character conversion definition"
354.6272 +-msgstr "chyba syntaxe v definície konverzie znakov"
354.6273 +-
354.6274 +-#: locale/programs/locfile.c:792
354.6275 +-msgid "syntax error in collating order definition"
354.6276 +-msgstr "chyba syntaxe v definícii poradia triedenia"
354.6277 +-
354.6278 +-#: locale/programs/locfile.c:642
354.6279 +-msgid "syntax error in collation definition"
354.6280 +-msgstr "chyba syntaxe v definícii triedenia"
354.6281 +-
354.6282 +-#: locale/programs/locfile.c:465
354.6283 +-msgid "syntax error in definition of LC_CTYPE category"
354.6284 +-msgstr "chyba syntaxe v definícii kategórie LC_CTYPE"
354.6285 +-
354.6286 +-#: locale/programs/locfile.c:408
354.6287 +-msgid "syntax error in definition of new character class"
354.6288 +-msgstr "chyba syntaxe v definícii novej triedy znakov"
354.6289 +-
354.6290 +-#: locale/programs/locfile.c:418
354.6291 +-msgid "syntax error in definition of new character map"
354.6292 +-msgstr "chyba syntaxe v definícii novej znakovej sady"
354.6293 +-
354.6294 +-#: locale/programs/locfile.c:1003
354.6295 +-msgid "syntax error in message locale definition"
354.6296 +-msgstr "chyba syntaxe v definícii národného prostredia správ"
354.6297 +-
354.6298 +-#: locale/programs/locfile.c:914
354.6299 +-msgid "syntax error in monetary locale definition"
354.6300 +-msgstr "chyba syntaxe v definícii národného prostredia peòa¾ných hodnôt"
354.6301 +-
354.6302 +-#: locale/programs/locfile.c:941
354.6303 +-msgid "syntax error in numeric locale definition"
354.6304 +-msgstr "chyba syntaxe v definícii národného prostredia pre èísla"
354.6305 +-
354.6306 +-#: locale/programs/locfile.c:852
354.6307 +-msgid "syntax error in order specification"
354.6308 +-msgstr "chyba syntaxe v ¹pecifikácii poradia"
354.6309 +-
354.6310 +-#: locale/programs/charmap.c:280 locale/programs/charmap.c:296
354.6311 +-#: locale/programs/repertoire.c:143
354.6312 ++#: locale/programs/charmap.c:346 locale/programs/charmap.c:363
354.6313 ++#: locale/programs/repertoire.c:175
354.6314 + #, c-format
354.6315 + msgid "syntax error in prolog: %s"
354.6316 + msgstr "chyba syntaxe v prológu: %s"
354.6317 + 
354.6318 +-#: locale/programs/repertoire.c:198 locale/programs/repertoire.c:237
354.6319 +-#: locale/programs/repertoire.c:260
354.6320 ++#: locale/programs/repertoire.c:230 locale/programs/repertoire.c:271
354.6321 ++#: locale/programs/repertoire.c:296
354.6322 + #, c-format
354.6323 + msgid "syntax error in repertoire map definition: %s"
354.6324 + msgstr "chyba syntaxe v definícii mapy repertoáru: %s"
354.6325 + 
354.6326 +-#: locale/programs/locfile.c:979
354.6327 +-msgid "syntax error in time locale definition"
354.6328 +-msgstr "chyba syntaxe v definícii národného prostredia pre èas"
354.6329 +-
354.6330 +-#: locale/programs/locfile.c:385
354.6331 ++#: locale/programs/locfile.c:243
354.6332 + msgid "syntax error: not inside a locale definition section"
354.6333 + msgstr "chyba syntaxe: nie je vnútri sekcie definície národného prostredia"
354.6334 + 
354.6335 +-#: iconv/iconv_prog.c:137
354.6336 ++#: iconv/iconv_prog.c:143
354.6337 + msgid "target encoding not specified using `-t'"
354.6338 + msgstr "kódovanie cieµa nebolo zadané pomocou `-t'"
354.6339 + 
354.6340 +-#: catgets/gencat.c:390 catgets/gencat.c:526 catgets/gencat.c:553
354.6341 ++#: catgets/gencat.c:432 catgets/gencat.c:605 catgets/gencat.c:634
354.6342 + msgid "this is the first definition"
354.6343 + msgstr "toto je prvá definícia"
354.6344 + 
354.6345 +-#: timezone/zic.c:1132
354.6346 ++#: timezone/zic.c:1157
354.6347 + msgid "time before zero"
354.6348 + msgstr "èas men¹í ako nula"
354.6349 + 
354.6350 +-#: timezone/zic.c:1140 timezone/zic.c:2015 timezone/zic.c:2034
354.6351 ++#: timezone/zic.c:1165 timezone/zic.c:2042 timezone/zic.c:2061
354.6352 + msgid "time overflow"
354.6353 + msgstr "preteèenie èasu"
354.6354 + 
354.6355 +-#: locale/programs/charmap.c:443
354.6356 ++#: locale/programs/ld-ctype.c:1553 locale/programs/ld-ctype.c:2029
354.6357 ++#, c-format
354.6358 ++msgid "to-value <U%0*X> of range is smaller than from-value <U%0*X>"
354.6359 ++msgstr "to-value <U%0*X> rozsahu je men¹ia ako from-value <U%0*X>"
354.6360 ++
354.6361 ++#: locale/programs/ld-ctype.c:1687
354.6362 ++msgid "to-value character sequence is smaller than from-value sequence"
354.6363 ++msgstr "to-value sekvencia znakov je men¹ia ako sekvencia from-value"
354.6364 ++
354.6365 ++#: locale/programs/charmap.c:551
354.6366 + msgid "too few bytes in character encoding"
354.6367 + msgstr "primálo bajtov v kódovaní znaku"
354.6368 + 
354.6369 +-#: locale/programs/charmap.c:445
354.6370 ++#: locale/programs/charmap.c:553
354.6371 + msgid "too many bytes in character encoding"
354.6372 + msgstr "priveµa bajtov v kódovaní znaku"
354.6373 + 
354.6374 +-#: locale/programs/locales.h:92
354.6375 +-msgid "too many character classes defined"
354.6376 +-msgstr "priveµa definovaných tried znakov"
354.6377 +-
354.6378 +-#: timezone/zic.c:1843
354.6379 ++#: timezone/zic.c:1868
354.6380 + msgid "too many leap seconds"
354.6381 + msgstr "priveµa priestupných sekúnd"
354.6382 + 
354.6383 +-#: timezone/zic.c:1815
354.6384 ++#: timezone/zic.c:1840
354.6385 + msgid "too many local time types"
354.6386 + msgstr "priveµa lokálnych typov èasu"
354.6387 + 
354.6388 +-#: timezone/zic.c:1769
354.6389 ++#: timezone/zic.c:1794
354.6390 + msgid "too many transitions?!"
354.6391 + msgstr "priveµa prechodov?!"
354.6392 + 
354.6393 +-#: locale/programs/ld-collate.c:1637
354.6394 +-msgid "too many weights"
354.6395 +-msgstr "priveµa váh"
354.6396 +-
354.6397 +-#: timezone/zic.c:2138
354.6398 ++#: timezone/zic.c:2165
354.6399 + msgid "too many, or too long, time zone abbreviations"
354.6400 + msgstr "príli¹ veµa alebo príli¹ dlhé skratku èasovej zóny"
354.6401 + 
354.6402 +-#: locale/programs/linereader.h:146
354.6403 ++#: locale/programs/linereader.h:157
354.6404 + msgid "trailing garbage at end of line"
354.6405 + msgstr "smetie na konci riadku"
354.6406 + 
354.6407 +-#: sunrpc/svc_simple.c:150
354.6408 ++#: sunrpc/svc_simple.c:151
354.6409 + #, c-format
354.6410 + msgid "trouble replying to prog %d\n"
354.6411 + msgstr "problémy pri odpovedi programu %d\n"
354.6412 + 
354.6413 +-#: locale/programs/ld-collate.c:1393
354.6414 +-msgid "two lines in a row containing `...' are not allowed"
354.6415 +-msgstr "dva riadky za sebou obsahujúce `...' nie sú povolené"
354.6416 +-
354.6417 +-#: timezone/zic.c:1307
354.6418 ++#: timezone/zic.c:1332
354.6419 + msgid "typed single year"
354.6420 + msgstr "zadaný jeden rok"
354.6421 + 
354.6422 +-#: iconv/iconv_prog.c:406
354.6423 ++#: iconv/iconv_prog.c:491
354.6424 + msgid "unable to allocate buffer for input"
354.6425 + msgstr "nie je mo¾né prideli» vyrovnávaciu pamä» pre vstup"
354.6426 + 
354.6427 +-#: nis/nis_callback.c:187
354.6428 ++#: nis/nis_callback.c:189
354.6429 + msgid "unable to free arguments"
354.6430 + msgstr "nie je mo¾né uvoµni» argumenty"
354.6431 + 
354.6432 +-#: posix/getconf.c:654 posix/getconf.c:670
354.6433 ++#: posix/getconf.c:781 posix/getconf.c:797
354.6434 + msgid "undefined"
354.6435 + msgstr "nedefinované"
354.6436 + 
354.6437 +-#: locale/programs/charmap.c:701 locale/programs/charmap.c:712
354.6438 ++#: locale/programs/charmap.c:856 locale/programs/charmap.c:867
354.6439 + #, c-format
354.6440 + msgid "unknown character `%s'"
354.6441 + msgstr "neznámy znak `%s'"
354.6442 + 
354.6443 +-#: locale/programs/ld-messages.c:202 locale/programs/ld-messages.c:213
354.6444 +-#: locale/programs/ld-messages.c:224 locale/programs/ld-messages.c:235
354.6445 +-#: locale/programs/ld-time.c:718
354.6446 +-#, c-format
354.6447 +-msgid "unknown character in field `%s' of category `%s'"
354.6448 +-msgstr "neznámy znak v poli `%s' kategórie `%s'"
354.6449 +-
354.6450 +-#: locale/programs/locfile.c:715
354.6451 +-msgid "unknown collation directive"
354.6452 +-msgstr "neznáma direktíva triedenia"
354.6453 +-
354.6454 +-#: catgets/gencat.c:487
354.6455 ++#: catgets/gencat.c:562
354.6456 + #, c-format
354.6457 + msgid "unknown directive `%s': line ignored"
354.6458 + msgstr "neznáma direktíva `%s' - riadok ignorovaný"
354.6459 + 
354.6460 +-#: iconv/iconv_prog.c:353
354.6461 ++#: iconv/iconv_prog.c:438
354.6462 + #, c-format
354.6463 + msgid "unknown iconv() error %d"
354.6464 + msgstr "neznáma iconv() chyba %d"
354.6465 + 
354.6466 +-#: catgets/gencat.c:466
354.6467 ++#: catgets/gencat.c:508
354.6468 + #, c-format
354.6469 + msgid "unknown set `%s'"
354.6470 + msgstr "neznáma sada `%s'"
354.6471 + 
354.6472 +-#: locale/programs/ld-collate.c:1377 locale/programs/ld-collate.c:1572
354.6473 +-#: locale/programs/ld-collate.c:1747
354.6474 +-#, c-format
354.6475 +-msgid "unknown symbol `%.*s': line ignored"
354.6476 +-msgstr "neznámy symbol `%.*s' - riadok ignorovaný"
354.6477 +-
354.6478 +-#: timezone/zic.c:761
354.6479 ++#: timezone/zic.c:786
354.6480 + msgid "unruly zone"
354.6481 + msgstr "zóna bez pravidiel"
354.6482 + 
354.6483 +-#: catgets/gencat.c:971
354.6484 ++#: catgets/gencat.c:1169
354.6485 + msgid "unterminated message"
354.6486 + msgstr "neukonèená správa"
354.6487 + 
354.6488 +-#: locale/programs/linereader.c:520 locale/programs/linereader.c:555
354.6489 ++#: locale/programs/linereader.c:599 locale/programs/linereader.c:784
354.6490 + msgid "unterminated string"
354.6491 + msgstr "neukonèený re»azec"
354.6492 + 
354.6493 +-#: sunrpc/rpc_scan.c:350 sunrpc/rpc_scan.c:376
354.6494 ++#: sunrpc/rpc_scan.c:351 sunrpc/rpc_scan.c:377
354.6495 + msgid "unterminated string constant"
354.6496 + msgstr "neukonèená re»azcová kon¹tanta"
354.6497 + 
354.6498 +-#: locale/programs/linereader.c:390
354.6499 ++#: locale/programs/linereader.c:469
354.6500 + msgid "unterminated symbolic name"
354.6501 + msgstr "neukonèené symbolické meno"
354.6502 + 
354.6503 +-#: locale/programs/ld-collate.c:1699
354.6504 +-msgid "unterminated weight name"
354.6505 +-msgstr "neukonèené meno váhy"
354.6506 ++#: locale/programs/charmap.c:1005
354.6507 ++msgid "upper limit in range is not higher then lower limit"
354.6508 ++msgstr "horný limit rozsahu nie je väè¹í ako dolný"
354.6509 + 
354.6510 +-#: locale/programs/charset.c:104
354.6511 ++#: locale/programs/repertoire.c:455
354.6512 + msgid "upper limit in range is not smaller then lower limit"
354.6513 + msgstr "horný limit rozsahu je men¹í ako dolný"
354.6514 + 
354.6515 +-#: sunrpc/rpc_main.c:1415
354.6516 ++#: sunrpc/rpc_main.c:1424
354.6517 + #, c-format
354.6518 +-msgid "usage:  %s infile\n"
354.6519 ++msgid "usage: %s infile\n"
354.6520 + msgstr "pou¾itie:  %s vstupný_súbor\n"
354.6521 + 
354.6522 +-#: timezone/zic.c:2081
354.6523 ++#: timezone/zic.c:2108
354.6524 + msgid "use of 2/29 in non leap-year"
354.6525 + msgstr "29. február pou¾itý v nepriestupnom roku"
354.6526 + 
354.6527 +-#: locale/programs/charmap.c:522 locale/programs/charmap.c:576
354.6528 ++#: locale/programs/charmap.c:640 locale/programs/charmap.c:703
354.6529 + #, c-format
354.6530 + msgid "value for %s must be an integer"
354.6531 + msgstr "hodnota pre %s musí by» celé èíslo"
354.6532 + 
354.6533 +-#: locale/programs/charmap.c:318
354.6534 ++#: locale/programs/charmap.c:399
354.6535 + #, c-format
354.6536 +-msgid "value for <%s> must lie between 1 and 4"
354.6537 +-msgstr "honota pre <%s> musí by» medzi 1 a 4"
354.6538 ++msgid "value for <%s> must be 1 or greater"
354.6539 ++msgstr "hodnota pre <%s> musí by» 1 alebo viac"
354.6540 + 
354.6541 +-#: locale/programs/ld-monetary.c:157 locale/programs/ld-numeric.c:92
354.6542 ++#: locale/programs/charmap.c:411
354.6543 + #, c-format
354.6544 +-msgid "value for field `%s' in category `%s' must not be the empty string"
354.6545 +-msgstr "hodnota poµa `%s' kategórie `%s' nesmie by» prázdny re»azec"
354.6546 +-
354.6547 +-#: locale/programs/charmap.c:330
354.6548 +-msgid "value of <mb_cur_max> must be greater than the value of <mb_cur_min>"
354.6549 +-msgstr "hodnota <mb_cur_max> musí by» väè¹ia ako hodnota <mb_cur_min>"
354.6550 ++msgid "value of <%s> must be greater or equal than the value of <%s>"
354.6551 ++msgstr "hodnota <%s> musí by» väè¹ia alebo rovná hodnote <%s>"
354.6552 + 
354.6553 +-#: locale/programs/ld-monetary.c:147
354.6554 +-msgid "value of field `int_curr_symbol' in category `LC_MONETARY' does not correspond to a valid name in ISO 4217"
354.6555 +-msgstr "hodnota poµa `int_curr_symbol' kategórie `LC_MONETARY' nezodpovedá platnému menu v ISO 4217"
354.6556 ++#: timezone/zic.c:433
354.6557 ++msgid "warning: "
354.6558 ++msgstr "varovanie: "
354.6559 + 
354.6560 +-#: locale/programs/ld-monetary.c:139
354.6561 +-msgid "value of field `int_curr_symbol' in category `LC_MONETARY' has wrong length"
354.6562 +-msgstr "hodnota poµa `int_curr_symbol' kategórie `LC_MONETARY' má chybnú då¾ku"
354.6563 +-
354.6564 +-#: locale/programs/ld-monetary.c:383 locale/programs/ld-numeric.c:207
354.6565 +-#, c-format
354.6566 +-msgid "values for field `%s' in category `%s' must be smaller than 127"
354.6567 +-msgstr "hodnoty poµa `%s' kategórie `%s' musia by» men¹ie ako 127"
354.6568 +-
354.6569 +-#: nscd/connections.c:355
354.6570 ++#: nscd/connections.c:427
354.6571 + #, c-format
354.6572 + msgid "while accepting connection: %s"
354.6573 + msgstr "poèas prijatia spojenia: %s"
354.6574 + 
354.6575 +-#: nscd/grpcache.c:149 nscd/hstcache.c:168 nscd/pwdcache.c:142
354.6576 ++#: nscd/grpcache.c:150 nscd/hstcache.c:165 nscd/pwdcache.c:143
354.6577 + msgid "while allocating cache entry"
354.6578 + msgstr "poèas pridelenia záznamu cache"
354.6579 + 
354.6580 +-#: nscd/cache.c:85
354.6581 ++#: nscd/cache.c:88
354.6582 + msgid "while allocating hash table entry"
354.6583 + msgstr "poèas pridelenia záznamu hash-tabuµky"
354.6584 + 
354.6585 +-#: nscd/grpcache.c:99 nscd/hstcache.c:109 nscd/pwdcache.c:105
354.6586 ++#: nscd/grpcache.c:100 nscd/hstcache.c:108 nscd/pwdcache.c:106
354.6587 + msgid "while allocating key copy"
354.6588 + msgstr "poèas pridelenia kópie kµúèa"
354.6589 + 
354.6590 +-#: catgets/gencat.c:1001
354.6591 ++#: catgets/gencat.c:1199
354.6592 + msgid "while opening old catalog file"
354.6593 + msgstr "poèas otvárania starého katalógu"
354.6594 + 
354.6595 +-#: locale/programs/locale.c:346
354.6596 ++#: locale/programs/locale.c:361
354.6597 + msgid "while preparing output"
354.6598 + msgstr "poèas prípravy výstupu"
354.6599 + 
354.6600 +-#: db2/makedb.c:365 db2/makedb.c:382
354.6601 +-msgid "while reading database"
354.6602 +-msgstr "poèas èítania databázy"
354.6603 +-
354.6604 +-#: elf/sprof.c:683
354.6605 ++#: elf/sprof.c:679
354.6606 + msgid "while stat'ing profiling data file"
354.6607 + msgstr "poèas stat-u súboru profilovacích informácií"
354.6608 + 
354.6609 +-#: db2/makedb.c:334
354.6610 +-msgid "while writing database file"
354.6611 +-msgstr "poèas zápisu databázy"
354.6612 ++#: locale/programs/ld-ctype.c:2392
354.6613 ++msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'"
354.6614 ++msgstr "v rozsahu hodnôt UCS treba pou¾i» hexadecimálne symbolické pokraèovanie `..'"
354.6615 ++
354.6616 ++#: locale/programs/ld-ctype.c:2406
354.6617 ++msgid "with character code range values one must use the absolute ellipsis `...'"
354.6618 ++msgstr "v rozsahu hodnôt kódov znakov treba pou¾i» absolútne pokraèovanie `...'"
354.6619 ++
354.6620 ++#: locale/programs/ld-ctype.c:2377
354.6621 ++msgid "with symbolic name range values the absolute ellipsis `...' must not be used"
354.6622 ++msgstr "v symbolickom rozsahu hodnôt nesmie by» pou¾ité absolútne pokraèovanie `...'"
354.6623 + 
354.6624 +-#: nscd/nscd_stat.c:115
354.6625 ++#: nscd/nscd_stat.c:116
354.6626 + msgid "write incomplete"
354.6627 + msgstr "neúplný zápis"
354.6628 + 
354.6629 +-#: inet/rcmd.c:320
354.6630 ++#: inet/rcmd.c:426
354.6631 + msgid "writeable by other than owner"
354.6632 + msgstr "zapisovateµný nielen pre vlastníka"
354.6633 + 
354.6634 +-#: db2/makedb.c:124 nscd/nscd.c:114 nss/getent.c:392
354.6635 ++#: nscd/nscd.c:123 nscd/nscd_nischeck.c:64 nss/getent.c:761
354.6636 + msgid "wrong number of arguments"
354.6637 + msgstr "chybný poèet argumentov"
354.6638 + 
354.6639 +-#: timezone/zic.c:1090
354.6640 ++#: timezone/zic.c:1115
354.6641 + msgid "wrong number of fields on Leap line"
354.6642 + msgstr "chybný poèet polí v riadku Leap"
354.6643 + 
354.6644 +-#: timezone/zic.c:1181
354.6645 ++#: timezone/zic.c:1206
354.6646 + msgid "wrong number of fields on Link line"
354.6647 + msgstr "chybný poèet polí v riadku Link"
354.6648 + 
354.6649 +-#: timezone/zic.c:924
354.6650 ++#: timezone/zic.c:949
354.6651 + msgid "wrong number of fields on Rule line"
354.6652 + msgstr "chybný poè¹t polí v riadku Rule"
354.6653 + 
354.6654 +-#: timezone/zic.c:994
354.6655 ++#: timezone/zic.c:1019
354.6656 + msgid "wrong number of fields on Zone continuation line"
354.6657 + msgstr "chybný poèet polí v pokraèovacom riadku Zone"
354.6658 + 
354.6659 +-#: timezone/zic.c:952
354.6660 ++#: timezone/zic.c:977
354.6661 + msgid "wrong number of fields on Zone line"
354.6662 + msgstr "chybný poèet polí v riadku Zone"
354.6663 + 
354.6664 +-#: sunrpc/xdr_ref.c:84
354.6665 ++#: sunrpc/xdr_ref.c:85
354.6666 + msgid "xdr_reference: out of memory\n"
354.6667 + msgstr "xdr_reference: nedostatok pamäti\n"
354.6668 + 
354.6669 +@@ -4271,10 +5436,10 @@
354.6670 + msgid "xdrrec_create: out of memory\n"
354.6671 + msgstr "xdrrec_create: nedostatok pamäti\n"
354.6672 + 
354.6673 +-#: nis/ypclnt.c:884
354.6674 ++#: nis/ypclnt.c:907
354.6675 + msgid "yp_update: cannot convert host to netname\n"
354.6676 + msgstr "yp_update: nie je mo¾né konvertova» meno poèítaèa na meno siete\n"
354.6677 + 
354.6678 +-#: nis/ypclnt.c:896
354.6679 ++#: nis/ypclnt.c:919
354.6680 + msgid "yp_update: cannot get server address\n"
354.6681 + msgstr "yp_update: nie je mo¾né zísti» adresu servera\n"
   355.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   355.2 +++ b/patches/glibc/2.2.2/arm-ctl_bus_isa.patch	Sat Feb 24 11:00:05 2007 +0000
   355.3 @@ -0,0 +1,51 @@
   355.4 +Applies to both glibc-2.2.5 and glibc-2.3.2, and probably glibc cvs as of Aug 2004.
   355.5 +Needed to build glibc with linux kernels 2.4.23 or higher on ARM, 
   355.6 +Fixes following error:
   355.7 +
   355.8 +../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
   355.9 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
  355.10 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
  355.11 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
  355.12 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
  355.13 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
  355.14 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
  355.15 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
  355.16 +make[2]: *** [/home/dank/crosstool-0.28/build/arm-softfloat-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/misc/ioperm.o] Error 1
  355.17 +
  355.18 +cf. "[SYSCTL] BUS_ISA -> CTL_BUS_ISA",  http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html
  355.19 +
  355.20 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c.old	2003-02-20 14:22:24.000000000 -0800
  355.21 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c	2004-01-31 16:01:50.000000000 -0800
  355.22 +@@ -47,6 +47,12 @@
  355.23 + #include <asm/page.h>
  355.24 + #include <sys/sysctl.h>
  355.25 + 
  355.26 ++/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
  355.27 ++#include <linux/version.h>
  355.28 ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
  355.29 ++#define CTL_BUS_ISA BUS_ISA	/* and hope it's not the one from linux/input.h */
  355.30 ++#endif
  355.31 ++
  355.32 + #define PATH_ARM_SYSTYPE	"/etc/arm_systype"
  355.33 + #define PATH_CPUINFO		"/proc/cpuinfo"
  355.34 + 
  355.35 +@@ -80,7 +86,7 @@
  355.36 +  * Initialize I/O system.  There are several ways to get the information
  355.37 +  * we need.  Each is tried in turn until one succeeds.
  355.38 +  *
  355.39 +- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*).  This is the preferred method
  355.40 ++ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*).  This is the preferred method
  355.41 +  *    but not all kernels support it.
  355.42 +  *
  355.43 +  * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
  355.44 +@@ -100,8 +106,8 @@
  355.45 + {
  355.46 +   char systype[256];
  355.47 +   int i, n;
  355.48 +-  static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
  355.49 +-  static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
  355.50 ++  static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
  355.51 ++  static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
  355.52 +   size_t len = sizeof(io.base);
  355.53 + 
  355.54 +   if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
   356.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   356.2 +++ b/patches/glibc/2.2.2/glibc-2.1.3-allow-gcc-3.4-grp.patch	Sat Feb 24 11:00:05 2007 +0000
   356.3 @@ -0,0 +1,56 @@
   356.4 +Fixes
   356.5 +initgroups.c: In function `internal_getgrouplist':
   356.6 +initgroups.c:179: error: parse error before "__FUNCTION__"
   356.7 +
   356.8 +CVSROOT:	/cvs/glibc
   356.9 +Module name:	libc
  356.10 +Changes by:	roland@sources.redhat.com	2001-12-16 21:52:12
  356.11 +
  356.12 +Modified files:
  356.13 +	nss            : nsswitch.c 
  356.14 +	grp            : initgroups.c 
  356.15 +
  356.16 +Log message:
  356.17 +	2001-12-16  Roland McGrath  <roland@frob.com>
  356.18 +	
  356.19 +	* nss/nsswitch.c (__nss_next): Don't use __FUNCTION__ as literal.
  356.20 +	* grp/initgroups.c (internal_getgrouplist): Likewise.
  356.21 +
  356.22 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/grp/initgroups.c.diff?r1=1.26&r2=1.27&cvsroot=glibc
  356.23 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/nss/nsswitch.c.diff?r1=1.52&r2=1.53&cvsroot=glibc
  356.24 +
  356.25 +Removed 2nd hunk for glibc-2.1.3 (it was just whitespace)
  356.26 +
  356.27 +===================================================================
  356.28 +RCS file: /cvs/glibc/libc/grp/initgroups.c,v
  356.29 +retrieving revision 1.26
  356.30 +retrieving revision 1.27
  356.31 +diff -u -r1.26 -r1.27
  356.32 +--- libc/grp/initgroups.c	2001/07/06 04:54:46	1.26
  356.33 ++++ libc/grp/initgroups.c	2001/12/17 05:52:11	1.27
  356.34 +@@ -176,7 +176,7 @@
  356.35 + 
  356.36 +       /* This is really only for debugging.  */
  356.37 +       if (NSS_STATUS_TRYAGAIN > status || status > NSS_STATUS_RETURN)
  356.38 +-	__libc_fatal ("illegal status in " __FUNCTION__);
  356.39 ++	__libc_fatal ("illegal status in internal_getgrouplist");
  356.40 + 
  356.41 +       if (status != NSS_STATUS_SUCCESS
  356.42 + 	  && nss_next_action (nip, status) == NSS_ACTION_RETURN)
  356.43 +
  356.44 +===================================================================
  356.45 +RCS file: /cvs/glibc/libc/nss/nsswitch.c,v
  356.46 +retrieving revision 1.52
  356.47 +retrieving revision 1.53
  356.48 +diff -u -r1.52 -r1.53
  356.49 +--- libc/nss/nsswitch.c	2001/07/17 08:21:36	1.52
  356.50 ++++ libc/nss/nsswitch.c	2001/12/17 05:52:11	1.53
  356.51 +@@ -178,7 +178,7 @@
  356.52 +     {
  356.53 +       /* This is really only for debugging.  */
  356.54 +        if (NSS_STATUS_TRYAGAIN > status || status > NSS_STATUS_RETURN)
  356.55 +-	 __libc_fatal ("illegal status in " __FUNCTION__);
  356.56 ++	 __libc_fatal ("illegal status in __nss_next");
  356.57 + 
  356.58 +        if (nss_next_action (*ni, status) == NSS_ACTION_RETURN)
  356.59 + 	 return 1;
   357.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   357.2 +++ b/patches/glibc/2.2.2/glibc-2.1.3-allow-gcc3-sscanf.patch	Sat Feb 24 11:00:05 2007 +0000
   357.3 @@ -0,0 +1,73 @@
   357.4 +http://sources.redhat.com/ml/bug-glibc/2003-08/msg00087.html
   357.5 +
   357.6 +From: Gernot Hillier <gernot dot hillier at siemens dot com>
   357.7 +Organization: Siemens AG
   357.8 +To: Jeffrey Bedard <jefbed at e-list dot net>, bug-glibc at gnu dot org
   357.9 +Date: Mon, 18 Aug 2003 08:50:03 +0200
  357.10 +References: <3F3D0899.6020004@e-list.net>
  357.11 +Message-Id: <200308180850.03431.gernot.hillier@siemens.com>
  357.12 +Subject: Re: Build Fails with gcc 3.3.1
  357.13 +X-BeenThere: bug-glibc@gnu.org
  357.14 +
  357.15 +Hi!
  357.16 +
  357.17 +Am Freitag, 15. August 2003 18:21 schrieb Jeffrey Bedard:
  357.18 +> gcc sscanf.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes
  357.19 +[...]
  357.20 +> sscanf.c:31: warning: conflicting types for built-in function `sscanf'
  357.21 +> sscanf.c: In function `sscanf':
  357.22 +> sscanf.c:37: error: `va_start' used in function with fixed args
  357.23 +> .../stdio-common/_itoa.h: At top level:
  357.24 +> .../stdio-common/_itoa.h:40: warning: inlining failed in call to
  357.25 +> `_itoa_word' .../stdio-common/_itoa.h:76: warning: called from here
  357.26 +> make[2]: ***
  357.27 +> [/home/jefbed/src/packages/glibc-build/stdio-common/sscanf.o] Error 1
  357.28 +
  357.29 +You can find the fitting patch in the glibc CVS. You have to replace some 
  357.30 +function headers. 
  357.31 +
  357.32 +I created a patch for glibc-2.2.5 for the same reason. I don't know if it 
  357.33 +applies cleanly, but if not it should at least show you what to do...
  357.34 +
  357.35 +-- 
  357.36 +Bye,
  357.37 +
  357.38 +Gernot Hillier
  357.39 +Siemens AG
  357.40 +
  357.41 +
  357.42 +
  357.43 +
  357.44 +Content-Disposition: attachment; filename="glibc-2.2.5-gcc-3.3.diff"
  357.45 +
  357.46 +diff -ur glibc-2.2.5.orig/stdio-common/sprintf.c glibc-2.2.5/stdio-common/sprintf.c
  357.47 +--- glibc-2.2.5.orig/stdio-common/sprintf.c	2001-07-06 06:55:41.000000000 +0200
  357.48 ++++ glibc-2.2.5/stdio-common/sprintf.c	2003-08-11 13:25:48.000000000 +0200
  357.49 +@@ -27,9 +27,7 @@
  357.50 + /* Write formatted output into S, according to the format string FORMAT.  */
  357.51 + /* VARARGS2 */
  357.52 + int
  357.53 +-sprintf (s, format)
  357.54 +-     char *s;
  357.55 +-     const char *format;
  357.56 ++sprintf (char *s, const char *format,...)
  357.57 + {
  357.58 +   va_list arg;
  357.59 +   int done;
  357.60 +Only in glibc-2.2.5/stdio-common: sprintf.c.orig
  357.61 +Only in glibc-2.2.5/stdio-common: sprintf.c.rej
  357.62 +diff -ur glibc-2.2.5.orig/stdio-common/sscanf.c glibc-2.2.5/stdio-common/sscanf.c
  357.63 +--- glibc-2.2.5.orig/stdio-common/sscanf.c	2001-07-06 06:55:41.000000000 +0200
  357.64 ++++ glibc-2.2.5/stdio-common/sscanf.c	2003-08-11 13:27:58.000000000 +0200
  357.65 +@@ -27,9 +27,7 @@
  357.66 + /* Read formatted input from S, according to the format string FORMAT.  */
  357.67 + /* VARARGS2 */
  357.68 + int
  357.69 +-sscanf (s, format)
  357.70 +-     const char *s;
  357.71 +-     const char *format;
  357.72 ++sscanf (const char *s, const char *format,...)
  357.73 + {
  357.74 +   va_list arg;
  357.75 +   int done;
  357.76 +
   358.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   358.2 +++ b/patches/glibc/2.2.2/glibc-2.1.3-allow-gcc3-versioninfo.patch	Sat Feb 24 11:00:05 2007 +0000
   358.3 @@ -0,0 +1,17 @@
   358.4 +# gcc-3.x doesn't like run-on strings
   358.5 +# See also http://sources.redhat.com/ml/libc-alpha/2004-01/msg00032.html
   358.6 +
   358.7 +--- glibc-2.1.3/csu/Makefile.old	2004-03-04 12:18:52.000000000 -0800
   358.8 ++++ glibc-2.1.3/csu/Makefile	2004-03-04 12:19:35.000000000 -0800
   358.9 +@@ -188,8 +188,8 @@
  358.10 + 	 esac; \
  358.11 + 	 files="$(all-Banner-files)";				\
  358.12 + 	 if test -n "$$files"; then				\
  358.13 +-	   echo "\"Available extensions:";			\
  358.14 +-	   sed -e '/^#/d' -e 's/^[[:space:]]*/	/' $$files;	\
  358.15 +-	   echo "\"";						\
  358.16 ++	   echo -e "\"Available extensions:\\\\n\"";		\
  358.17 ++  	   sed -e '/^#/d' -e 's/^[[:space:]]*/	/'		\
  358.18 ++	       -e 's/^\(.*\)$$/\"\1\\n\"/' $$files;		\
  358.19 + 	 fi) > $@T
  358.20 + 	mv -f $@T $@
   359.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   359.2 +++ b/patches/glibc/2.2.2/glibc-2.2.2-allow-gcc-3-configure.patch	Sat Feb 24 11:00:05 2007 +0000
   359.3 @@ -0,0 +1,21 @@
   359.4 +Works around version check:
   359.5 +
   359.6 +checking for i686-unknown-linux-gnu-gcc... gcc
   359.7 +checking version of gcc... 3.4.2, bad
   359.8 +...
   359.9 +configure: error: 
  359.10 +*** Some critical program is missing or too old.
  359.11 +*** Check the INSTALL file for required versions.
  359.12 +
  359.13 +
  359.14 +--- glibc-2.2.2/configure.old	2005-04-10 16:57:42.692071968 -0700
  359.15 ++++ glibc-2.2.2/configure	2005-04-10 16:58:52.993384544 -0700
  359.16 +@@ -1437,7 +1437,7 @@
  359.17 +   ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
  359.18 +   case $ac_prog_version in
  359.19 +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
  359.20 +-    *gcc-2.9[5-9].*|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9]|sgicc-*)
  359.21 ++    *gcc-2.9[5-9].*|*3.[234].*|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9]|sgicc-*)
  359.22 +        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
  359.23 +     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
  359.24 + 
   360.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   360.2 +++ b/patches/glibc/2.2.2/glibc-2.2.2-allow-gcc3-dl-machine-i386.patch	Sat Feb 24 11:00:05 2007 +0000
   360.3 @@ -0,0 +1,232 @@
   360.4 +Fixes errors:
   360.5 +In file included from dynamic-link.h:21,
   360.6 +                 from dl-load.c:32:
   360.7 +../sysdeps/i386/dl-machine.h:121: error: parse error before '.' token
   360.8 +../sysdeps/i386/dl-machine.h:122: error: stray '@' in program
   360.9 +../sysdeps/i386/dl-machine.h:125: error: syntax error at '#' token
  360.10 +../sysdeps/i386/dl-machine.h:128: error: syntax error at '#' token
  360.11 +../sysdeps/i386/dl-machine.h:129: error: syntax error at '#' token
  360.12 +../sysdeps/i386/dl-machine.h:129: error: stray '`' in program
  360.13 +../sysdeps/i386/dl-machine.h:129: error: missing terminating ' character
  360.14 +...
  360.15 +../sysdeps/i386/dl-machine.h:227:22: warning: character constant too long for its type
  360.16 +../sysdeps/i386/dl-machine.h:209: error: stray '\' in program
  360.17 +../sysdeps/i386/dl-machine.h:209: error: stray '\' in program
  360.18 +../sysdeps/i386/dl-machine.h:209: error: stray '\' in program
  360.19 +../sysdeps/i386/dl-machine.h:209: error: missing terminating " character
  360.20 +../sysdeps/i386/dl-machine.h: In function `dl_platform_init':
  360.21 +../sysdeps/i386/dl-machine.h:273: error: `_dl_platform' undeclared (first use in this function)
  360.22 +../sysdeps/i386/dl-machine.h:273: error: (Each undeclared identifier is reported only once
  360.23 +../sysdeps/i386/dl-machine.h:273: error: for each function it appears in.)
  360.24 +dl-load.c: In function `_dl_map_object_from_fd':
  360.25 +dl-load.c:1043: warning: use of cast expressions as lvalues is deprecated
  360.26 +dl-load.c:1043: warning: use of cast expressions as lvalues is deprecated
  360.27 +dl-load.c:1058: warning: use of cast expressions as lvalues is deprecated
  360.28 +dl-load.c:1058: warning: use of cast expressions as lvalues is deprecated
  360.29 +
  360.30 +dl-runtime.c:53: error: conflicting types for 'fixup'
  360.31 +../sysdeps/i386/dl-machine.h:67: error: previous declaration of 'fixup' was here
  360.32 +dl-runtime.c:53: error: conflicting types for 'fixup'
  360.33 +../sysdeps/i386/dl-machine.h:67: error: previous declaration of 'fixup' was here
  360.34 +dl-runtime.c:135: error: conflicting types for 'profile_fixup'
  360.35 +../sysdeps/i386/dl-machine.h:70: error: previous declaration of 'profile_fixup' was here
  360.36 +dl-runtime.c:135: error: conflicting types for 'profile_fixup'
  360.37 +../sysdeps/i386/dl-machine.h:70: error: previous declaration of 'profile_fixup' was here
  360.38 +../sysdeps/i386/dl-machine.h:67: warning: 'fixup' declared `static' but never defined
  360.39 +../sysdeps/i386/dl-machine.h:70: warning: 'profile_fixup' declared `static' but never defined
  360.40 +
  360.41 +Updated to repair breakage caused by unconditionally requiring ARCH_FIXUP_ATTRIBUTE
  360.42 +to be defined.  (No wonder glibc-2.2.2 didn't build for anything but x86...)
  360.43 +
  360.44 +===================================================================
  360.45 +--- glibc-2.2.2/sysdeps/i386/dl-machine.h.old	2005-04-11 17:45:13.000000000 -0700
  360.46 ++++ glibc-2.2.2/sysdeps/i386/dl-machine.h	2005-04-12 10:01:47.000000000 -0700
  360.47 +@@ -63,11 +63,14 @@
  360.48 +    destroys the passed register information.  */
  360.49 + /* GKM FIXME: Fix trampoline to pass bounds so we can do
  360.50 +    without the `__unbounded' qualifier.  */
  360.51 ++
  360.52 ++#define ARCH_FIXUP_ATTRIBUTE __attribute__ ((regparm (3), unused))
  360.53 ++
  360.54 + static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset)
  360.55 +-     __attribute__ ((regparm (2), unused));
  360.56 ++     ARCH_FIXUP_ATTRIBUTE;
  360.57 + static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset,
  360.58 + 				 ElfW(Addr) retaddr)
  360.59 +-     __attribute__ ((regparm (3), unused));
  360.60 ++     ARCH_FIXUP_ATTRIBUTE;
  360.61 + #endif
  360.62 + 
  360.63 + /* Set up the loaded object described by L so its unrelocated PLT
  360.64 +@@ -117,68 +120,68 @@
  360.65 +    and then redirect to the address it returns.  */
  360.66 + #if !defined PROF && !__BOUNDED_POINTERS__
  360.67 + # define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
  360.68 +-	.text
  360.69 +-	.globl _dl_runtime_resolve
  360.70 +-	.type _dl_runtime_resolve, @function
  360.71 +-	.align 16
  360.72 +-_dl_runtime_resolve:
  360.73 +-	pushl %eax		# Preserve registers otherwise clobbered.
  360.74 +-	pushl %ecx
  360.75 +-	pushl %edx
  360.76 +-	movl 16(%esp), %edx	# Copy args pushed by PLT in register.  Note
  360.77 +-	movl 12(%esp), %eax	# that `fixup' takes its parameters in regs.
  360.78 +-	call fixup		# Call resolver.
  360.79 +-	popl %edx		# Get register content back.
  360.80 +-	popl %ecx
  360.81 +-	xchgl %eax, (%esp)	# Get %eax contents end store function address.
  360.82 +-	ret $8			# Jump to function address.
  360.83 +-	.size _dl_runtime_resolve, .-_dl_runtime_resolve
  360.84 +-
  360.85 +-	.globl _dl_runtime_profile
  360.86 +-	.type _dl_runtime_profile, @function
  360.87 +-	.align 16
  360.88 +-_dl_runtime_profile:
  360.89 +-	pushl %eax		# Preserve registers otherwise clobbered.
  360.90 +-	pushl %ecx
  360.91 +-	pushl %edx
  360.92 +-	movl 20(%esp), %ecx	# Load return address
  360.93 +-	movl 16(%esp), %edx	# Copy args pushed by PLT in register.  Note
  360.94 +-	movl 12(%esp), %eax	# that `fixup' takes its parameters in regs.
  360.95 +-	call profile_fixup	# Call resolver.
  360.96 +-	popl %edx		# Get register content back.
  360.97 +-	popl %ecx
  360.98 +-	xchgl %eax, (%esp)	# Get %eax contents end store function address.
  360.99 +-	ret $8			# Jump to function address.
 360.100 +-	.size _dl_runtime_profile, .-_dl_runtime_profile
 360.101 +-	.previous
 360.102 ++	.text\n\
 360.103 ++	.globl _dl_runtime_resolve\n\
 360.104 ++	.type _dl_runtime_resolve, @function\n\
 360.105 ++	.align 16\n\
 360.106 ++_dl_runtime_resolve:\n\
 360.107 ++	pushl %eax		# Preserve registers otherwise clobbered.\n\
 360.108 ++	pushl %ecx\n\
 360.109 ++	pushl %edx\n\
 360.110 ++	movl 16(%esp), %edx	# Copy args pushed by PLT in register.  Note\n\
 360.111 ++	movl 12(%esp), %eax	# that `fixup' takes its parameters in regs.\n\
 360.112 ++	call fixup		# Call resolver.\n\
 360.113 ++	popl %edx		# Get register content back.\n\
 360.114 ++	popl %ecx\n\
 360.115 ++	xchgl %eax, (%esp)	# Get %eax contents end store function address.\n\
 360.116 ++	ret $8			# Jump to function address.\n\
 360.117 ++	.size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
 360.118 ++\n\
 360.119 ++	.globl _dl_runtime_profile\n\
 360.120 ++	.type _dl_runtime_profile, @function\n\
 360.121 ++	.align 16\n\
 360.122 ++_dl_runtime_profile:\n\
 360.123 ++	pushl %eax		# Preserve registers otherwise clobbered.\n\
 360.124 ++	pushl %ecx\n\
 360.125 ++	pushl %edx\n\
 360.126 ++	movl 20(%esp), %ecx	# Load return address\n\
 360.127 ++	movl 16(%esp), %edx	# Copy args pushed by PLT in register.  Note\n\
 360.128 ++	movl 12(%esp), %eax	# that `fixup' takes its parameters in regs.\n\
 360.129 ++	call profile_fixup	# Call resolver.\n\
 360.130 ++	popl %edx		# Get register content back.\n\
 360.131 ++	popl %ecx\n\
 360.132 ++	xchgl %eax, (%esp)	# Get %eax contents end store function address.\n\
 360.133 ++	ret $8			# Jump to function address.\n\
 360.134 ++	.size _dl_runtime_profile, .-_dl_runtime_profile\n\
 360.135 ++	.previous\n\
 360.136 + ");
 360.137 + #else
 360.138 +-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
 360.139 +-	.text
 360.140 +-	.globl _dl_runtime_resolve
 360.141 +-	.globl _dl_runtime_profile
 360.142 +-	.type _dl_runtime_resolve, @function
 360.143 +-	.type _dl_runtime_profile, @function
 360.144 +-	.align 16
 360.145 +-_dl_runtime_resolve:
 360.146 +-_dl_runtime_profile:
 360.147 +-	pushl %eax		# Preserve registers otherwise clobbered.
 360.148 +-	pushl %ecx
 360.149 +-	pushl %edx
 360.150 +-	movl 16(%esp), %edx	# Push the arguments for `fixup'
 360.151 +-	movl 12(%esp), %eax
 360.152 +-	pushl %edx
 360.153 +-	pushl %eax
 360.154 +-	call fixup		# Call resolver.
 360.155 +-	popl %edx		# Pop the parameters
 360.156 +-	popl %ecx
 360.157 +-	popl %edx		# Get register content back.
 360.158 +-	popl %ecx
 360.159 +-	xchgl %eax, (%esp)	# Get %eax contents end store function address.
 360.160 +-	ret $8			# Jump to function address.
 360.161 +-	.size _dl_runtime_resolve, .-_dl_runtime_resolve
 360.162 +-	.size _dl_runtime_profile, .-_dl_runtime_profile
 360.163 +-	.previous
 360.164 ++# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\n\
 360.165 ++	.text\n\
 360.166 ++	.globl _dl_runtime_resolve\n\
 360.167 ++	.globl _dl_runtime_profile\n\
 360.168 ++	.type _dl_runtime_resolve, @function\n\
 360.169 ++	.type _dl_runtime_profile, @function\n\
 360.170 ++	.align 16\n\
 360.171 ++_dl_runtime_resolve:\n\
 360.172 ++_dl_runtime_profile:\n\
 360.173 ++	pushl %eax		# Preserve registers otherwise clobbered.\n\
 360.174 ++	pushl %ecx\n\
 360.175 ++	pushl %edx\n\
 360.176 ++	movl 16(%esp), %edx	# Push the arguments for `fixup'\n\
 360.177 ++	movl 12(%esp), %eax\n\
 360.178 ++	pushl %edx\n\
 360.179 ++	pushl %eax\n\
 360.180 ++	call fixup		# Call resolver.\n\
 360.181 ++	popl %edx		# Pop the parameters\n\
 360.182 ++	popl %ecx\n\
 360.183 ++	popl %edx		# Get register content back.\n\
 360.184 ++	popl %ecx\n\
 360.185 ++	xchgl %eax, (%esp)	# Get %eax contents end store function address.\n\
 360.186 ++	ret $8			# Jump to function address.\n\
 360.187 ++	.size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
 360.188 ++	.size _dl_runtime_profile, .-_dl_runtime_profile\n\
 360.189 ++	.previous\n\
 360.190 + ");
 360.191 + #endif
 360.192 + 
 360.193 +@@ -205,7 +208,7 @@
 360.194 + _dl_start_user:\n\
 360.195 + 	# Save the user entry point address in %edi.\n\
 360.196 + 	movl %eax, %edi\n\
 360.197 +-	# Point %ebx at the GOT.
 360.198 ++	# Point %ebx at the GOT.\n\
 360.199 + 	call 0b\n\
 360.200 + 	addl $_GLOBAL_OFFSET_TABLE_, %ebx\n\
 360.201 + 	# Store the highest stack address\n\
 360.202 +
 360.203 +===================================================================
 360.204 +--- glibc-2.2.2/elf/dl-runtime.c.old	2005-07-07 15:40:26.000000000 -0700
 360.205 ++++ glibc-2.2.2/elf/dl-runtime.c	2005-07-07 15:41:57.000000000 -0700
 360.206 +@@ -33,6 +33,11 @@
 360.207 + # define VERSYMIDX(sym)	(DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
 360.208 + #endif
 360.209 + 
 360.210 ++/* The fixup functions might have need special attributes.  If none
 360.211 ++   are provided define the macro as empty.  */
 360.212 ++#ifndef ARCH_FIXUP_ATTRIBUTE
 360.213 ++# define ARCH_FIXUP_ATTRIBUTE
 360.214 ++#endif
 360.215 + 
 360.216 + /* This function is called through a special trampoline from the PLT the
 360.217 +    first time each PLT entry is called.  We must perform the relocation
 360.218 +@@ -42,7 +47,7 @@
 360.219 +    function.  */
 360.220 + 
 360.221 + #ifndef ELF_MACHINE_NO_PLT
 360.222 +-static ElfW(Addr) __attribute__ ((unused))
 360.223 ++static ElfW(Addr) __attribute__ ((unused)) ARCH_FIXUP_ATTRIBUTE
 360.224 + fixup (
 360.225 + # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
 360.226 +         ELF_MACHINE_RUNTIME_FIXUP_ARGS,
 360.227 +@@ -126,7 +131,7 @@
 360.228 + 
 360.229 + #if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__
 360.230 + 
 360.231 +-static ElfW(Addr) __attribute__ ((unused))
 360.232 ++static ElfW(Addr) __attribute__ ((unused)) ARCH_FIXUP_ATTRIBUTE
 360.233 + profile_fixup (
 360.234 + #ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
 360.235 +        ELF_MACHINE_RUNTIME_FIXUP_ARGS,
   361.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   361.2 +++ b/patches/glibc/2.2.2/glibc-2.2.2-allow-gcc3-errlist.patch	Sat Feb 24 11:00:05 2007 +0000
   361.3 @@ -0,0 +1,18 @@
   361.4 +Fixes error
   361.5 +../sysdeps/unix/sysv/linux/errlist.c:41: error: weak declaration of '_old_sys_nerr' must precede definition
   361.6 +
   361.7 +===================================================================
   361.8 +--- glibc-2.2.2/sysdeps/unix/sysv/linux/errlist.c.old	2005-04-11 16:58:21.000000000 -0700
   361.9 ++++ glibc-2.2.2/sysdeps/unix/sysv/linux/errlist.c	2005-04-11 16:58:10.000000000 -0700
  361.10 +@@ -38,10 +38,9 @@
  361.11 + const int __old_sys_nerr = OLD_ERRLIST_SIZE;
  361.12 + 
  361.13 + strong_alias (__old_sys_nerr, _old_sys_nerr);
  361.14 +-weak_alias (__old_sys_nerr, _old_sys_nerr)
  361.15 + compat_symbol (libc, __old_sys_nerr, _sys_nerr, GLIBC_2_0);
  361.16 + compat_symbol (libc, _old_sys_nerr, sys_nerr, GLIBC_2_0);
  361.17 +-weak_alias (__old_sys_errlist, _old_sys_errlist);
  361.18 ++strong_alias (__old_sys_errlist, _old_sys_errlist);
  361.19 + compat_symbol (libc, __old_sys_errlist, _sys_errlist, GLIBC_2_0);
  361.20 + compat_symbol (libc, _old_sys_errlist, sys_errlist, GLIBC_2_0);
  361.21 + #endif
   362.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   362.2 +++ b/patches/glibc/2.2.2/glibc-2.2.2-allow-gcc3-longlong.patch	Sat Feb 24 11:00:05 2007 +0000
   362.3 @@ -0,0 +1,811 @@
   362.4 +Fixes error
   362.5 +./longlong.h:423: error: parse error before '%' token
   362.6 +./longlong.h:423: error: missing terminating " character
   362.7 +./longlong.h:432: error: missing terminating " character
   362.8 +See also patches/glibc-2.1.3/glibc-2.1.3-allow-gcc3-longlong.patch
   362.9 +
  362.10 +===================================================================
  362.11 +--- glibc-2.2.2/stdlib/longlong.h.old	2000-02-11 15:48:58.000000000 -0800
  362.12 ++++ glibc-2.2.2/stdlib/longlong.h	2005-04-11 15:36:10.000000000 -0700
  362.13 +@@ -108,8 +108,8 @@
  362.14 + 
  362.15 + #if (defined (__a29k__) || defined (_AM29K)) && W_TYPE_SIZE == 32
  362.16 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
  362.17 +-  __asm__ ("add %1,%4,%5
  362.18 +-	addc %0,%2,%3"							\
  362.19 ++  __asm__ ("add %1,%4,%5\n"           \
  362.20 ++	"addc %0,%2,%3"							\
  362.21 + 	   : "=r" ((USItype) (sh)),					\
  362.22 + 	    "=&r" ((USItype) (sl))					\
  362.23 + 	   : "%r" ((USItype) (ah)),					\
  362.24 +@@ -117,8 +117,8 @@
  362.25 + 	     "%r" ((USItype) (al)),					\
  362.26 + 	     "rI" ((USItype) (bl)))
  362.27 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
  362.28 +-  __asm__ ("sub %1,%4,%5
  362.29 +-	subc %0,%2,%3"							\
  362.30 ++  __asm__ ("sub %1,%4,%5\n"           \
  362.31 ++	"subc %0,%2,%3"							\
  362.32 + 	   : "=r" ((USItype) (sh)),					\
  362.33 + 	     "=&r" ((USItype) (sl))					\
  362.34 + 	   : "r" ((USItype) (ah)),					\
  362.35 +@@ -175,8 +175,8 @@
  362.36 + 
  362.37 + #if defined (__arc__) && W_TYPE_SIZE == 32
  362.38 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
  362.39 +-  __asm__ ("add.f	%1, %4, %5
  362.40 +-	adc	%0, %2, %3"						\
  362.41 ++  __asm__ ("add.f	%1, %4, %5\n"       \
  362.42 ++	"adc	%0, %2, %3"						\
  362.43 + 	   : "=r" ((USItype) (sh)),					\
  362.44 + 	     "=&r" ((USItype) (sl))					\
  362.45 + 	   : "%r" ((USItype) (ah)),					\
  362.46 +@@ -184,8 +184,8 @@
  362.47 + 	     "%r" ((USItype) (al)),					\
  362.48 + 	     "rIJ" ((USItype) (bl)))
  362.49 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
  362.50 +-  __asm__ ("sub.f	%1, %4, %5
  362.51 +-	sbc	%0, %2, %3"						\
  362.52 ++  __asm__ ("sub.f	%1, %4, %5\n"       \
  362.53 ++	"sbc	%0, %2, %3"						\
  362.54 + 	   : "=r" ((USItype) (sh)),					\
  362.55 + 	     "=&r" ((USItype) (sl))					\
  362.56 + 	   : "r" ((USItype) (ah)),					\
  362.57 +@@ -206,8 +206,8 @@
  362.58 + 
  362.59 + #if defined (__arm__) && W_TYPE_SIZE == 32
  362.60 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
  362.61 +-  __asm__ ("adds	%1, %4, %5
  362.62 +-	adc	%0, %2, %3"						\
  362.63 ++  __asm__ ("adds	%1, %4, %5\n"       \
  362.64 ++	"adc	%0, %2, %3"						\
  362.65 + 	   : "=r" ((USItype) (sh)),					\
  362.66 + 	     "=&r" ((USItype) (sl))					\
  362.67 + 	   : "%r" ((USItype) (ah)),					\
  362.68 +@@ -215,8 +215,8 @@
  362.69 + 	     "%r" ((USItype) (al)),					\
  362.70 + 	     "rI" ((USItype) (bl)))
  362.71 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
  362.72 +-  __asm__ ("subs	%1, %4, %5
  362.73 +-	sbc	%0, %2, %3"						\
  362.74 ++  __asm__ ("subs	%1, %4, %5\n"       \
  362.75 ++	"sbc	%0, %2, %3"						\
  362.76 + 	   : "=r" ((USItype) (sh)),					\
  362.77 + 	     "=&r" ((USItype) (sl))					\
  362.78 + 	   : "r" ((USItype) (ah)),					\
  362.79 +@@ -225,19 +225,19 @@
  362.80 + 	     "rI" ((USItype) (bl)))
  362.81 + #define umul_ppmm(xh, xl, a, b) \
  362.82 + {register USItype __t0, __t1, __t2;					\
  362.83 +-  __asm__ ("%@ Inlined umul_ppmm
  362.84 +-	mov	%2, %5, lsr #16
  362.85 +-	mov	%0, %6, lsr #16
  362.86 +-	bic	%3, %5, %2, lsl #16
  362.87 +-	bic	%4, %6, %0, lsl #16
  362.88 +-	mul	%1, %3, %4
  362.89 +-	mul	%4, %2, %4
  362.90 +-	mul	%3, %0, %3
  362.91 +-	mul	%0, %2, %0
  362.92 +-	adds	%3, %4, %3
  362.93 +-	addcs	%0, %0, #65536
  362.94 +-	adds	%1, %1, %3, lsl #16
  362.95 +-	adc	%0, %0, %3, lsr #16"					\
  362.96 ++  __asm__ ("%@ Inlined umul_ppmm\n"   \
  362.97 ++	"mov	%2, %5, lsr #16\n"            \
  362.98 ++	"mov	%0, %6, lsr #16\n"            \
  362.99 ++	"bic	%3, %5, %2, lsl #16\n"        \
 362.100 ++	"bic	%4, %6, %0, lsl #16\n"        \
 362.101 ++	"mul	%1, %3, %4\n"                 \
 362.102 ++	"mul	%4, %2, %4\n"                 \
 362.103 ++	"mul	%3, %0, %3\n"                 \
 362.104 ++	"mul	%0, %2, %0\n"                 \
 362.105 ++	"adds	%3, %4, %3\n"                 \
 362.106 ++	"addcs	%0, %0, #65536\n"           \
 362.107 ++	"adds	%1, %1, %3, lsl #16\n"        \
 362.108 ++	"adc	%0, %0, %3, lsr #16"					\
 362.109 + 	   : "=&r" ((USItype) (xh)),					\
 362.110 + 	     "=r" ((USItype) (xl)),					\
 362.111 + 	     "=&r" (__t0), "=&r" (__t1), "=r" (__t2)			\
 362.112 +@@ -277,8 +277,8 @@
 362.113 + 
 362.114 + #if defined (__gmicro__) && W_TYPE_SIZE == 32
 362.115 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 362.116 +-  __asm__ ("add.w %5,%1
 362.117 +-	addx %3,%0"							\
 362.118 ++  __asm__ ("add.w %5,%1\n"            \
 362.119 ++	"addx %3,%0"							\
 362.120 + 	   : "=g" ((USItype) (sh)),					\
 362.121 + 	     "=&g" ((USItype) (sl))					\
 362.122 + 	   : "%0" ((USItype) (ah)),					\
 362.123 +@@ -286,8 +286,8 @@
 362.124 + 	     "%1" ((USItype) (al)),					\
 362.125 + 	     "g" ((USItype) (bl)))
 362.126 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 362.127 +-  __asm__ ("sub.w %5,%1
 362.128 +-	subx %3,%0"							\
 362.129 ++  __asm__ ("sub.w %5,%1\n"            \
 362.130 ++	"subx %3,%0"							\
 362.131 + 	   : "=g" ((USItype) (sh)),					\
 362.132 + 	     "=&g" ((USItype) (sl))					\
 362.133 + 	   : "0" ((USItype) (ah)),					\
 362.134 +@@ -316,8 +316,8 @@
 362.135 + 
 362.136 + #if defined (__hppa) && W_TYPE_SIZE == 32
 362.137 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 362.138 +-  __asm__ ("add %4,%5,%1
 362.139 +-	addc %2,%3,%0"							\
 362.140 ++  __asm__ ("add %4,%5,%1\n"           \
 362.141 ++	"addc %2,%3,%0"							\
 362.142 + 	   : "=r" ((USItype) (sh)),					\
 362.143 + 	     "=&r" ((USItype) (sl))					\
 362.144 + 	   : "%rM" ((USItype) (ah)),					\
 362.145 +@@ -325,8 +325,8 @@
 362.146 + 	     "%rM" ((USItype) (al)),					\
 362.147 + 	     "rM" ((USItype) (bl)))
 362.148 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 362.149 +-  __asm__ ("sub %4,%5,%1
 362.150 +-	subb %2,%3,%0"							\
 362.151 ++  __asm__ ("sub %4,%5,%1\n"           \
 362.152 ++	"subb %2,%3,%0"							\
 362.153 + 	   : "=r" ((USItype) (sh)),					\
 362.154 + 	     "=&r" ((USItype) (sl))					\
 362.155 + 	   : "rM" ((USItype) (ah)),					\
 362.156 +@@ -357,22 +357,22 @@
 362.157 +   do {									\
 362.158 +     USItype __tmp;							\
 362.159 +     __asm__ (								\
 362.160 +-       "ldi		1,%0
 362.161 +-	extru,=		%1,15,16,%%r0		; Bits 31..16 zero?
 362.162 +-	extru,tr	%1,15,16,%1		; No.  Shift down, skip add.
 362.163 +-	ldo		16(%0),%0		; Yes.  Perform add.
 362.164 +-	extru,=		%1,23,8,%%r0		; Bits 15..8 zero?
 362.165 +-	extru,tr	%1,23,8,%1		; No.  Shift down, skip add.
 362.166 +-	ldo		8(%0),%0		; Yes.  Perform add.
 362.167 +-	extru,=		%1,27,4,%%r0		; Bits 7..4 zero?
 362.168 +-	extru,tr	%1,27,4,%1		; No.  Shift down, skip add.
 362.169 +-	ldo		4(%0),%0		; Yes.  Perform add.
 362.170 +-	extru,=		%1,29,2,%%r0		; Bits 3..2 zero?
 362.171 +-	extru,tr	%1,29,2,%1		; No.  Shift down, skip add.
 362.172 +-	ldo		2(%0),%0		; Yes.  Perform add.
 362.173 +-	extru		%1,30,1,%1		; Extract bit 1.
 362.174 +-	sub		%0,%1,%0		; Subtract it.
 362.175 +-	" : "=r" (count), "=r" (__tmp) : "1" (x));			\
 362.176 ++       "ldi		1,%0\n"                                        \
 362.177 ++	"extru,=		%1,15,16,%%r0		; Bits 31..16 zero?\n"         \
 362.178 ++	"extru,tr	%1,15,16,%1		; No.  Shift down, skip add.\n"    \
 362.179 ++	"ldo		16(%0),%0		; Yes.  Perform add.\n"                \
 362.180 ++	"extru,=		%1,23,8,%%r0		; Bits 15..8 zero?\n"          \
 362.181 ++	"extru,tr	%1,23,8,%1		; No.  Shift down, skip add.\n"    \
 362.182 ++	"ldo		8(%0),%0		; Yes.  Perform add.\n"                \
 362.183 ++	"extru,=		%1,27,4,%%r0		; Bits 7..4 zero?\n"           \
 362.184 ++	"extru,tr	%1,27,4,%1		; No.  Shift down, skip add.\n"    \
 362.185 ++	"ldo		4(%0),%0		; Yes.  Perform add.\n"                \
 362.186 ++	"extru,=		%1,29,2,%%r0		; Bits 3..2 zero?\n"           \
 362.187 ++	"extru,tr	%1,29,2,%1		; No.  Shift down, skip add.\n"    \
 362.188 ++	"ldo		2(%0),%0		; Yes.  Perform add.\n"                \
 362.189 ++	"extru		%1,30,1,%1		; Extract bit 1.\n"                \
 362.190 ++	"sub		%0,%1,%0		; Subtract it.\n"                      \
 362.191 ++	: "=r" (count), "=r" (__tmp) : "1" (x));			\
 362.192 +   } while (0)
 362.193 + #endif
 362.194 + 
 362.195 +@@ -419,8 +419,8 @@
 362.196 + 
 362.197 + #if (defined (__i386__) || defined (__i486__)) && W_TYPE_SIZE == 32
 362.198 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 362.199 +-  __asm__ ("addl %5,%1
 362.200 +-	adcl %3,%0"							\
 362.201 ++  __asm__ ("addl %5,%1\n"             \
 362.202 ++	"adcl %3,%0"							\
 362.203 + 	   : "=r" ((USItype) (sh)),					\
 362.204 + 	     "=&r" ((USItype) (sl))					\
 362.205 + 	   : "%0" ((USItype) (ah)),					\
 362.206 +@@ -428,8 +428,8 @@
 362.207 + 	     "%1" ((USItype) (al)),					\
 362.208 + 	     "g" ((USItype) (bl)))
 362.209 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 362.210 +-  __asm__ ("subl %5,%1
 362.211 +-	sbbl %3,%0"							\
 362.212 ++  __asm__ ("subl %5,%1\n"             \
 362.213 ++	"sbbl %3,%0"							\
 362.214 + 	   : "=r" ((USItype) (sh)),					\
 362.215 + 	     "=&r" ((USItype) (sl))					\
 362.216 + 	   : "0" ((USItype) (ah)),					\
 362.217 +@@ -525,9 +525,9 @@
 362.218 + #if defined (__M32R__) && W_TYPE_SIZE == 32
 362.219 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 362.220 +   /* The cmp clears the condition bit.  */ \
 362.221 +-  __asm__ ("cmp %0,%0
 362.222 +-	addx %%5,%1
 362.223 +-	addx %%3,%0"							\
 362.224 ++  __asm__ ("cmp %0,%0\n"              \
 362.225 ++	"addx %%5,%1\n"                     \
 362.226 ++	"addx %%3,%0"							\
 362.227 + 	   : "=r" ((USItype) (sh)),					\
 362.228 + 	     "=&r" ((USItype) (sl))					\
 362.229 + 	   : "%0" ((USItype) (ah)),					\
 362.230 +@@ -537,9 +537,9 @@
 362.231 + 	   : "cbit")
 362.232 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 362.233 +   /* The cmp clears the condition bit.  */ \
 362.234 +-  __asm__ ("cmp %0,%0
 362.235 +-	subx %5,%1
 362.236 +-	subx %3,%0"							\
 362.237 ++  __asm__ ("cmp %0,%0\n"              \
 362.238 ++	"subx %5,%1\n"                      \
 362.239 ++	"subx %3,%0"							\
 362.240 + 	   : "=r" ((USItype) (sh)),					\
 362.241 + 	     "=&r" ((USItype) (sl))					\
 362.242 + 	   : "0" ((USItype) (ah)),					\
 362.243 +@@ -551,8 +551,8 @@
 362.244 + 
 362.245 + #if defined (__mc68000__) && W_TYPE_SIZE == 32
 362.246 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 362.247 +-  __asm__ ("add%.l %5,%1
 362.248 +-	addx%.l %3,%0"							\
 362.249 ++  __asm__ ("add%.l %5,%1\n"           \
 362.250 ++	"addx%.l %3,%0"							\
 362.251 + 	   : "=d" ((USItype) (sh)),					\
 362.252 + 	     "=&d" ((USItype) (sl))					\
 362.253 + 	   : "%0" ((USItype) (ah)),					\
 362.254 +@@ -560,8 +560,8 @@
 362.255 + 	     "%1" ((USItype) (al)),					\
 362.256 + 	     "g" ((USItype) (bl)))
 362.257 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 362.258 +-  __asm__ ("sub%.l %5,%1
 362.259 +-	subx%.l %3,%0"							\
 362.260 ++  __asm__ ("sub%.l %5,%1\n"           \
 362.261 ++	"subx%.l %3,%0"							\
 362.262 + 	   : "=d" ((USItype) (sh)),					\
 362.263 + 	     "=&d" ((USItype) (sl))					\
 362.264 + 	   : "0" ((USItype) (ah)),					\
 362.265 +@@ -602,32 +602,32 @@
 362.266 + #if !defined(__mcf5200__)
 362.267 + /* %/ inserts REGISTER_PREFIX, %# inserts IMMEDIATE_PREFIX.  */
 362.268 + #define umul_ppmm(xh, xl, a, b) \
 362.269 +-  __asm__ ("| Inlined umul_ppmm
 362.270 +-	move%.l	%2,%/d0
 362.271 +-	move%.l	%3,%/d1
 362.272 +-	move%.l	%/d0,%/d2
 362.273 +-	swap	%/d0
 362.274 +-	move%.l	%/d1,%/d3
 362.275 +-	swap	%/d1
 362.276 +-	move%.w	%/d2,%/d4
 362.277 +-	mulu	%/d3,%/d4
 362.278 +-	mulu	%/d1,%/d2
 362.279 +-	mulu	%/d0,%/d3
 362.280 +-	mulu	%/d0,%/d1
 362.281 +-	move%.l	%/d4,%/d0
 362.282 +-	eor%.w	%/d0,%/d0
 362.283 +-	swap	%/d0
 362.284 +-	add%.l	%/d0,%/d2
 362.285 +-	add%.l	%/d3,%/d2
 362.286 +-	jcc	1f
 362.287 +-	add%.l	%#65536,%/d1
 362.288 +-1:	swap	%/d2
 362.289 +-	moveq	%#0,%/d0
 362.290 +-	move%.w	%/d2,%/d0
 362.291 +-	move%.w	%/d4,%/d2
 362.292 +-	move%.l	%/d2,%1
 362.293 +-	add%.l	%/d1,%/d0
 362.294 +-	move%.l	%/d0,%0"						\
 362.295 ++  __asm__ ("| Inlined umul_ppmm\n"    \
 362.296 ++	"move%.l	%2,%/d0\n"                \
 362.297 ++	"move%.l	%3,%/d1\n"                \
 362.298 ++	"move%.l	%/d0,%/d2\n"              \
 362.299 ++	"swap	%/d0\n"                       \
 362.300 ++	"move%.l	%/d1,%/d3\n"              \
 362.301 ++	"swap	%/d1\n"                       \
 362.302 ++	"move%.w	%/d2,%/d4\n"              \
 362.303 ++	"mulu	%/d3,%/d4\n"                  \
 362.304 ++	"mulu	%/d1,%/d2\n"                  \
 362.305 ++	"mulu	%/d0,%/d3\n"                  \
 362.306 ++	"mulu	%/d0,%/d1\n"                  \
 362.307 ++	"move%.l	%/d4,%/d0\n"              \
 362.308 ++	"eor%.w	%/d0,%/d0\n"                \
 362.309 ++	"swap	%/d0\n"                       \
 362.310 ++	"add%.l	%/d0,%/d2\n"                \
 362.311 ++	"add%.l	%/d3,%/d2\n"                \
 362.312 ++	"jcc	1f\n"                         \
 362.313 ++	"add%.l	%#65536,%/d1\n"             \
 362.314 ++"1:	swap	%/d2\n"                     \
 362.315 ++	"moveq	%#0,%/d0\n"                 \
 362.316 ++	"move%.w	%/d2,%/d0\n"              \
 362.317 ++	"move%.w	%/d4,%/d2\n"              \
 362.318 ++	"move%.l	%/d2,%1\n"                \
 362.319 ++	"add%.l	%/d1,%/d0\n"                \
 362.320 ++	"move%.l	%/d0,%0"						\
 362.321 + 	   : "=g" ((USItype) (xh)),					\
 362.322 + 	     "=g" ((USItype) (xl))					\
 362.323 + 	   : "g" ((USItype) (a)),					\
 362.324 +@@ -653,8 +653,8 @@
 362.325 + 
 362.326 + #if defined (__m88000__) && W_TYPE_SIZE == 32
 362.327 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 362.328 +-  __asm__ ("addu.co %1,%r4,%r5
 362.329 +-	addu.ci %0,%r2,%r3"						\
 362.330 ++  __asm__ ("addu.co %1,%r4,%r5\n"     \
 362.331 ++	"addu.ci %0,%r2,%r3"						\
 362.332 + 	   : "=r" ((USItype) (sh)),					\
 362.333 + 	     "=&r" ((USItype) (sl))					\
 362.334 + 	   : "%rJ" ((USItype) (ah)),					\
 362.335 +@@ -662,8 +662,8 @@
 362.336 + 	     "%rJ" ((USItype) (al)),					\
 362.337 + 	     "rJ" ((USItype) (bl)))
 362.338 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 362.339 +-  __asm__ ("subu.co %1,%r4,%r5
 362.340 +-	subu.ci %0,%r2,%r3"						\
 362.341 ++  __asm__ ("subu.co %1,%r4,%r5\n"     \
 362.342 ++	"subu.ci %0,%r2,%r3"						\
 362.343 + 	   : "=r" ((USItype) (sh)),					\
 362.344 + 	     "=&r" ((USItype) (sl))					\
 362.345 + 	   : "rJ" ((USItype) (ah)),					\
 362.346 +@@ -880,8 +880,8 @@
 362.347 + 
 362.348 + #if defined (__pyr__) && W_TYPE_SIZE == 32
 362.349 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 362.350 +-  __asm__ ("addw	%5,%1
 362.351 +-	addwc	%3,%0"							\
 362.352 ++  __asm__ ("addw	%5,%1\n"            \
 362.353 ++	"addwc	%3,%0"							\
 362.354 + 	   : "=r" ((USItype) (sh)),					\
 362.355 + 	     "=&r" ((USItype) (sl))					\
 362.356 + 	   : "%0" ((USItype) (ah)),					\
 362.357 +@@ -889,8 +889,8 @@
 362.358 + 	     "%1" ((USItype) (al)),					\
 362.359 + 	     "g" ((USItype) (bl)))
 362.360 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 362.361 +-  __asm__ ("subw	%5,%1
 362.362 +-	subwb	%3,%0"							\
 362.363 ++  __asm__ ("subw	%5,%1\n"            \
 362.364 ++	"subwb	%3,%0"							\
 362.365 + 	   : "=r" ((USItype) (sh)),					\
 362.366 + 	     "=&r" ((USItype) (sl))					\
 362.367 + 	   : "0" ((USItype) (ah)),					\
 362.368 +@@ -902,8 +902,8 @@
 362.369 +   ({union {UDItype __ll;						\
 362.370 + 	   struct {USItype __h, __l;} __i;				\
 362.371 + 	  } __xx;							\
 362.372 +-  __asm__ ("movw %1,%R0
 362.373 +-	uemul %2,%0"							\
 362.374 ++  __asm__ ("movw %1,%R0\n"          \
 362.375 ++	"uemul %2,%0"							\
 362.376 + 	   : "=&r" (__xx.__ll)						\
 362.377 + 	   : "g" ((USItype) (u)),					\
 362.378 + 	     "g" ((USItype) (v)));					\
 362.379 +@@ -912,8 +912,8 @@
 362.380 + 
 362.381 + #if defined (__ibm032__) /* RT/ROMP */ && W_TYPE_SIZE == 32
 362.382 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 362.383 +-  __asm__ ("a %1,%5
 362.384 +-	ae %0,%3"							\
 362.385 ++  __asm__ ("a %1,%5\n"                \
 362.386 ++	"ae %0,%3"							\
 362.387 + 	   : "=r" ((USItype) (sh)),					\
 362.388 + 	     "=&r" ((USItype) (sl))					\
 362.389 + 	   : "%0" ((USItype) (ah)),					\
 362.390 +@@ -921,8 +921,8 @@
 362.391 + 	     "%1" ((USItype) (al)),					\
 362.392 + 	     "r" ((USItype) (bl)))
 362.393 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 362.394 +-  __asm__ ("s %1,%5
 362.395 +-	se %0,%3"							\
 362.396 ++  __asm__ ("s %1,%5\n"                \
 362.397 ++	"se %0,%3"							\
 362.398 + 	   : "=r" ((USItype) (sh)),					\
 362.399 + 	     "=&r" ((USItype) (sl))					\
 362.400 + 	   : "0" ((USItype) (ah)),					\
 362.401 +@@ -933,26 +933,26 @@
 362.402 +   do {									\
 362.403 +     USItype __m0 = (m0), __m1 = (m1);					\
 362.404 +     __asm__ (								\
 362.405 +-       "s	r2,r2
 362.406 +-	mts	r10,%2
 362.407 +-	m	r2,%3
 362.408 +-	m	r2,%3
 362.409 +-	m	r2,%3
 362.410 +-	m	r2,%3
 362.411 +-	m	r2,%3
 362.412 +-	m	r2,%3
 362.413 +-	m	r2,%3
 362.414 +-	m	r2,%3
 362.415 +-	m	r2,%3
 362.416 +-	m	r2,%3
 362.417 +-	m	r2,%3
 362.418 +-	m	r2,%3
 362.419 +-	m	r2,%3
 362.420 +-	m	r2,%3
 362.421 +-	m	r2,%3
 362.422 +-	m	r2,%3
 362.423 +-	cas	%0,r2,r0
 362.424 +-	mfs	r10,%1"							\
 362.425 ++       "s	r2,r2\n"
 362.426 ++	"mts	r10,%2\n"                       \
 362.427 ++	"m	r2,%3\n"                          \
 362.428 ++	"m	r2,%3\n"                          \
 362.429 ++	"m	r2,%3\n"                          \
 362.430 ++	"m	r2,%3\n"                          \
 362.431 ++	"m	r2,%3\n"                          \
 362.432 ++	"m	r2,%3\n"                          \
 362.433 ++	"m	r2,%3\n"                          \
 362.434 ++	"m	r2,%3\n"                          \
 362.435 ++	"m	r2,%3\n"                          \
 362.436 ++	"m	r2,%3\n"                          \
 362.437 ++	"m	r2,%3\n"                          \
 362.438 ++	"m	r2,%3\n"                          \
 362.439 ++	"m	r2,%3\n"                          \
 362.440 ++	"m	r2,%3\n"                          \
 362.441 ++	"m	r2,%3\n"                          \
 362.442 ++	"m	r2,%3\n"                          \
 362.443 ++	"cas	%0,r2,r0\n"                     \
 362.444 ++	"mfs	r10,%1"							\
 362.445 + 	     : "=r" ((USItype) (ph)),					\
 362.446 + 	       "=r" ((USItype) (pl))					\
 362.447 + 	     : "%r" (__m0),						\
 362.448 +@@ -982,9 +982,9 @@
 362.449 + #if defined (__sh2__) && W_TYPE_SIZE == 32
 362.450 + #define umul_ppmm(w1, w0, u, v) \
 362.451 +   __asm__ (								\
 362.452 +-       "dmulu.l	%2,%3
 362.453 +-	sts	macl,%1
 362.454 +-	sts	mach,%0"						\
 362.455 ++       "dmulu.l	%2,%3\n"            \
 362.456 ++	"sts	macl,%1\n"                  \
 362.457 ++	"sts	mach,%0"						\
 362.458 + 	   : "=r" ((USItype)(w1)),					\
 362.459 + 	     "=r" ((USItype)(w0))					\
 362.460 + 	   : "r" ((USItype)(u)),					\
 362.461 +@@ -996,8 +996,8 @@
 362.462 + #if defined (__sparc__) && !defined(__arch64__) \
 362.463 +     && !defined(__sparcv9) && W_TYPE_SIZE == 32
 362.464 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 362.465 +-  __asm__ ("addcc %r4,%5,%1
 362.466 +-	addx %r2,%3,%0"							\
 362.467 ++  __asm__ ("addcc %r4,%5,%1\n"        \
 362.468 ++	"addx %r2,%3,%0"							\
 362.469 + 	   : "=r" ((USItype) (sh)),					\
 362.470 + 	     "=&r" ((USItype) (sl))					\
 362.471 + 	   : "%rJ" ((USItype) (ah)),					\
 362.472 +@@ -1006,8 +1006,8 @@
 362.473 + 	     "rI" ((USItype) (bl))					\
 362.474 + 	   __CLOBBER_CC)
 362.475 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 362.476 +-  __asm__ ("subcc %r4,%5,%1
 362.477 +-	subx %r2,%3,%0"							\
 362.478 ++  __asm__ ("subcc %r4,%5,%1\n"        \
 362.479 ++	"subx %r2,%3,%0"							\
 362.480 + 	   : "=r" ((USItype) (sh)),					\
 362.481 + 	     "=&r" ((USItype) (sl))					\
 362.482 + 	   : "rJ" ((USItype) (ah)),					\
 362.483 +@@ -1040,45 +1040,45 @@
 362.484 + 	   : "r" ((USItype) (u)),					\
 362.485 + 	     "r" ((USItype) (v)))
 362.486 + #define udiv_qrnnd(q, r, n1, n0, d) \
 362.487 +-  __asm__ ("! Inlined udiv_qrnnd
 362.488 +-	wr	%%g0,%2,%%y	! Not a delayed write for sparclite
 362.489 +-	tst	%%g0
 362.490 +-	divscc	%3,%4,%%g1
 362.491 +-	divscc	%%g1,%4,%%g1
 362.492 +-	divscc	%%g1,%4,%%g1
 362.493 +-	divscc	%%g1,%4,%%g1
 362.494 +-	divscc	%%g1,%4,%%g1
 362.495 +-	divscc	%%g1,%4,%%g1
 362.496 +-	divscc	%%g1,%4,%%g1
 362.497 +-	divscc	%%g1,%4,%%g1
 362.498 +-	divscc	%%g1,%4,%%g1
 362.499 +-	divscc	%%g1,%4,%%g1
 362.500 +-	divscc	%%g1,%4,%%g1
 362.501 +-	divscc	%%g1,%4,%%g1
 362.502 +-	divscc	%%g1,%4,%%g1
 362.503 +-	divscc	%%g1,%4,%%g1
 362.504 +-	divscc	%%g1,%4,%%g1
 362.505 +-	divscc	%%g1,%4,%%g1
 362.506 +-	divscc	%%g1,%4,%%g1
 362.507 +-	divscc	%%g1,%4,%%g1
 362.508 +-	divscc	%%g1,%4,%%g1
 362.509 +-	divscc	%%g1,%4,%%g1
 362.510 +-	divscc	%%g1,%4,%%g1
 362.511 +-	divscc	%%g1,%4,%%g1
 362.512 +-	divscc	%%g1,%4,%%g1
 362.513 +-	divscc	%%g1,%4,%%g1
 362.514 +-	divscc	%%g1,%4,%%g1
 362.515 +-	divscc	%%g1,%4,%%g1
 362.516 +-	divscc	%%g1,%4,%%g1
 362.517 +-	divscc	%%g1,%4,%%g1
 362.518 +-	divscc	%%g1,%4,%%g1
 362.519 +-	divscc	%%g1,%4,%%g1
 362.520 +-	divscc	%%g1,%4,%%g1
 362.521 +-	divscc	%%g1,%4,%0
 362.522 +-	rd	%%y,%1
 362.523 +-	bl,a 1f
 362.524 +-	add	%1,%4,%1
 362.525 +-1:	! End of inline udiv_qrnnd"					\
 362.526 ++  __asm__ ("! Inlined udiv_qrnnd\n"                      \
 362.527 ++	"wr	%%g0,%2,%%y	! Not a delayed write for sparclite\n" \
 362.528 ++	"tst	%%g0\n"                                          \
 362.529 ++	"divscc	%3,%4,%%g1\n"                                  \
 362.530 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.531 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.532 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.533 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.534 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.535 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.536 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.537 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.538 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.539 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.540 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.541 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.542 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.543 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.544 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.545 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.546 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.547 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.548 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.549 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.550 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.551 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.552 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.553 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.554 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.555 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.556 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.557 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.558 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.559 ++	"divscc	%%g1,%4,%%g1\n"                                \
 362.560 ++	"divscc	%%g1,%4,%0\n"                                  \
 362.561 ++	"rd	%%y,%1\n"                                          \
 362.562 ++	"bl,a 1f\n"                                            \
 362.563 ++	"add	%1,%4,%1\n"                                      \
 362.564 ++"1:	! End of inline udiv_qrnnd"					\
 362.565 + 	   : "=r" ((USItype) (q)),					\
 362.566 + 	     "=r" ((USItype) (r))					\
 362.567 + 	   : "r" ((USItype) (n1)),					\
 362.568 +@@ -1099,46 +1099,46 @@
 362.569 + /* SPARC without integer multiplication and divide instructions.
 362.570 +    (i.e. at least Sun4/20,40,60,65,75,110,260,280,330,360,380,470,490) */
 362.571 + #define umul_ppmm(w1, w0, u, v) \
 362.572 +-  __asm__ ("! Inlined umul_ppmm
 362.573 +-	wr	%%g0,%2,%%y	! SPARC has 0-3 delay insn after a wr
 362.574 +-	sra	%3,31,%%o5	! Don't move this insn
 362.575 +-	and	%2,%%o5,%%o5	! Don't move this insn
 362.576 +-	andcc	%%g0,0,%%g1	! Don't move this insn
 362.577 +-	mulscc	%%g1,%3,%%g1
 362.578 +-	mulscc	%%g1,%3,%%g1
 362.579 +-	mulscc	%%g1,%3,%%g1
 362.580 +-	mulscc	%%g1,%3,%%g1
 362.581 +-	mulscc	%%g1,%3,%%g1
 362.582 +-	mulscc	%%g1,%3,%%g1
 362.583 +-	mulscc	%%g1,%3,%%g1
 362.584 +-	mulscc	%%g1,%3,%%g1
 362.585 +-	mulscc	%%g1,%3,%%g1
 362.586 +-	mulscc	%%g1,%3,%%g1
 362.587 +-	mulscc	%%g1,%3,%%g1
 362.588 +-	mulscc	%%g1,%3,%%g1
 362.589 +-	mulscc	%%g1,%3,%%g1
 362.590 +-	mulscc	%%g1,%3,%%g1
 362.591 +-	mulscc	%%g1,%3,%%g1
 362.592 +-	mulscc	%%g1,%3,%%g1
 362.593 +-	mulscc	%%g1,%3,%%g1
 362.594 +-	mulscc	%%g1,%3,%%g1
 362.595 +-	mulscc	%%g1,%3,%%g1
 362.596 +-	mulscc	%%g1,%3,%%g1
 362.597 +-	mulscc	%%g1,%3,%%g1
 362.598 +-	mulscc	%%g1,%3,%%g1
 362.599 +-	mulscc	%%g1,%3,%%g1
 362.600 +-	mulscc	%%g1,%3,%%g1
 362.601 +-	mulscc	%%g1,%3,%%g1
 362.602 +-	mulscc	%%g1,%3,%%g1
 362.603 +-	mulscc	%%g1,%3,%%g1
 362.604 +-	mulscc	%%g1,%3,%%g1
 362.605 +-	mulscc	%%g1,%3,%%g1
 362.606 +-	mulscc	%%g1,%3,%%g1
 362.607 +-	mulscc	%%g1,%3,%%g1
 362.608 +-	mulscc	%%g1,%3,%%g1
 362.609 +-	mulscc	%%g1,0,%%g1
 362.610 +-	add	%%g1,%%o5,%0
 362.611 +-	rd	%%y,%1"							\
 362.612 ++  __asm__ ("! Inlined umul_ppmm\n"                         \
 362.613 ++	"wr	%%g0,%2,%%y	! SPARC has 0-3 delay insn after a wr\n" \
 362.614 ++	"sra	%3,31,%%o5	! Don't move this insn\n"              \
 362.615 ++	"and	%2,%%o5,%%o5	! Don't move this insn\n"            \
 362.616 ++	"andcc	%%g0,0,%%g1	! Don't move this insn\n"            \
 362.617 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.618 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.619 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.620 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.621 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.622 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.623 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.624 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.625 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.626 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.627 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.628 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.629 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.630 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.631 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.632 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.633 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.634 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.635 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.636 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.637 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.638 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.639 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.640 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.641 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.642 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.643 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.644 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.645 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.646 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.647 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.648 ++	"mulscc	%%g1,%3,%%g1\n"                                  \
 362.649 ++	"mulscc	%%g1,0,%%g1\n"                                   \
 362.650 ++	"add	%%g1,%%o5,%0\n"                                    \
 362.651 ++	"rd	%%y,%1"							\
 362.652 + 	   : "=r" ((USItype) (w1)),					\
 362.653 + 	     "=r" ((USItype) (w0))					\
 362.654 + 	   : "%rI" ((USItype) (u)),					\
 362.655 +@@ -1148,30 +1148,30 @@
 362.656 + /* It's quite necessary to add this much assembler for the sparc.
 362.657 +    The default udiv_qrnnd (in C) is more than 10 times slower!  */
 362.658 + #define udiv_qrnnd(q, r, n1, n0, d) \
 362.659 +-  __asm__ ("! Inlined udiv_qrnnd
 362.660 +-	mov	32,%%g1
 362.661 +-	subcc	%1,%2,%%g0
 362.662 +-1:	bcs	5f
 362.663 +-	 addxcc %0,%0,%0	! shift n1n0 and a q-bit in lsb
 362.664 +-	sub	%1,%2,%1	! this kills msb of n
 362.665 +-	addx	%1,%1,%1	! so this can't give carry
 362.666 +-	subcc	%%g1,1,%%g1
 362.667 +-2:	bne	1b
 362.668 +-	 subcc	%1,%2,%%g0
 362.669 +-	bcs	3f
 362.670 +-	 addxcc %0,%0,%0	! shift n1n0 and a q-bit in lsb
 362.671 +-	b	3f
 362.672 +-	 sub	%1,%2,%1	! this kills msb of n
 362.673 +-4:	sub	%1,%2,%1
 362.674 +-5:	addxcc	%1,%1,%1
 362.675 +-	bcc	2b
 362.676 +-	 subcc	%%g1,1,%%g1
 362.677 +-! Got carry from n.  Subtract next step to cancel this carry.
 362.678 +-	bne	4b
 362.679 +-	 addcc	%0,%0,%0	! shift n1n0 and a 0-bit in lsb
 362.680 +-	sub	%1,%2,%1
 362.681 +-3:	xnor	%0,0,%0
 362.682 +-	! End of inline udiv_qrnnd"					\
 362.683 ++  __asm__ ("! Inlined udiv_qrnnd\n"                                 \
 362.684 ++	"mov	32,%%g1\n"                                                  \
 362.685 ++	"subcc	%1,%2,%%g0\n"                                             \
 362.686 ++"1:	bcs	5f\n"                                                       \
 362.687 ++	 "addxcc %0,%0,%0	! shift n1n0 and a q-bit in lsb\n"              \
 362.688 ++	"sub	%1,%2,%1	! this kills msb of n\n"                          \
 362.689 ++	"addx	%1,%1,%1	! so this can't give carry\n"                     \
 362.690 ++	"subcc	%%g1,1,%%g1\n"                                            \
 362.691 ++"2:	bne	1b\n"                                                       \
 362.692 ++	 "subcc	%1,%2,%%g0\n"                                             \
 362.693 ++	"bcs	3f\n"                                                       \
 362.694 ++	 "addxcc %0,%0,%0	! shift n1n0 and a q-bit in lsb\n"              \
 362.695 ++	"b	3f\n"                                                         \
 362.696 ++	 "sub	%1,%2,%1	! this kills msb of n\n"                          \
 362.697 ++"4:	sub	%1,%2,%1\n"                                                 \
 362.698 ++"5:	addxcc	%1,%1,%1\n"                                             \
 362.699 ++	"bcc	2b\n"                                                       \
 362.700 ++	 "subcc	%%g1,1,%%g1\n"                                            \
 362.701 ++"! Got carry from n.  Subtract next step to cancel this carry.\n"   \
 362.702 ++	"bne	4b\n"                                                       \
 362.703 ++	 "addcc	%0,%0,%0	! shift n1n0 and a 0-bit in lsb\n"              \
 362.704 ++	"sub	%1,%2,%1\n"                                                 \
 362.705 ++"3:	xnor	%0,0,%0\n"                                                \
 362.706 ++	"! End of inline udiv_qrnnd"					\
 362.707 + 	   : "=&r" ((USItype) (q)),					\
 362.708 + 	     "=&r" ((USItype) (r))					\
 362.709 + 	   : "r" ((USItype) (d)),					\
 362.710 +@@ -1185,11 +1185,11 @@
 362.711 + #if ((defined (__sparc__) && defined (__arch64__)) \
 362.712 +      || defined (__sparcv9)) && W_TYPE_SIZE == 64
 362.713 + #define add_ssaaaa(sh, sl, ah, al, bh, bl)				\
 362.714 +-  __asm__ ("addcc %r4,%5,%1
 362.715 +-  	    add %r2,%3,%0
 362.716 +-  	    bcs,a,pn %%xcc, 1f
 362.717 +-  	    add %0, 1, %0
 362.718 +-  	    1:"								\
 362.719 ++  __asm__ ("addcc %r4,%5,%1\n"            \
 362.720 ++  	    "add %r2,%3,%0\n"                 \
 362.721 ++  	    "bcs,a,pn %%xcc, 1f\n"            \
 362.722 ++  	    "add %0, 1, %0\n"                 \
 362.723 ++  	    "1:"								\
 362.724 + 	   : "=r" ((UDItype)(sh)),				      	\
 362.725 + 	     "=&r" ((UDItype)(sl))				      	\
 362.726 + 	   : "%rJ" ((UDItype)(ah)),				     	\
 362.727 +@@ -1199,11 +1199,11 @@
 362.728 + 	   __CLOBBER_CC)
 362.729 + 
 362.730 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) 				\
 362.731 +-  __asm__ ("subcc %r4,%5,%1
 362.732 +-  	    sub %r2,%3,%0
 362.733 +-  	    bcs,a,pn %%xcc, 1f
 362.734 +-  	    sub %0, 1, %0
 362.735 +-  	    1:"								\
 362.736 ++  __asm__ ("subcc %r4,%5,%1\n"            \
 362.737 ++  	    "sub %r2,%3,%0\n"                 \
 362.738 ++  	    "bcs,a,pn %%xcc, 1f\n"            \
 362.739 ++  	    "sub %0, 1, %0\n"                 \
 362.740 ++  	    "1:"								\
 362.741 + 	   : "=r" ((UDItype)(sh)),				      	\
 362.742 + 	     "=&r" ((UDItype)(sl))				      	\
 362.743 + 	   : "rJ" ((UDItype)(ah)),				     	\
 362.744 +@@ -1216,27 +1216,27 @@
 362.745 +   do {									\
 362.746 + 	  UDItype tmp1, tmp2, tmp3, tmp4;				\
 362.747 + 	  __asm__ __volatile__ (					\
 362.748 +-		   "srl %7,0,%3
 362.749 +-		    mulx %3,%6,%1
 362.750 +-		    srlx %6,32,%2
 362.751 +-		    mulx %2,%3,%4
 362.752 +-		    sllx %4,32,%5
 362.753 +-		    srl %6,0,%3
 362.754 +-		    sub %1,%5,%5
 362.755 +-		    srlx %5,32,%5
 362.756 +-		    addcc %4,%5,%4
 362.757 +-		    srlx %7,32,%5
 362.758 +-		    mulx %3,%5,%3
 362.759 +-		    mulx %2,%5,%5
 362.760 +-		    sethi %%hi(0x80000000),%2
 362.761 +-		    addcc %4,%3,%4
 362.762 +-		    srlx %4,32,%4
 362.763 +-		    add %2,%2,%2
 362.764 +-		    movcc %%xcc,%%g0,%2
 362.765 +-		    addcc %5,%4,%5
 362.766 +-		    sllx %3,32,%3
 362.767 +-		    add %1,%3,%1
 362.768 +-		    add %5,%2,%0"					\
 362.769 ++		   "srl %7,0,%3\n"                     \
 362.770 ++		    "mulx %3,%6,%1\n"                  \
 362.771 ++		    "srlx %6,32,%2\n"                  \
 362.772 ++		    "mulx %2,%3,%4\n"                  \
 362.773 ++		    "sllx %4,32,%5\n"                  \
 362.774 ++		    "srl %6,0,%3\n"                    \
 362.775 ++		    "sub %1,%5,%5\n"                   \
 362.776 ++		    "srlx %5,32,%5\n"                  \
 362.777 ++		    "addcc %4,%5,%4\n"                 \
 362.778 ++		    "srlx %7,32,%5\n"                  \
 362.779 ++		    "mulx %3,%5,%3\n"                  \
 362.780 ++		    "mulx %2,%5,%5\n"                  \
 362.781 ++		    "sethi %%hi(0x80000000),%2\n"      \
 362.782 ++		    "addcc %4,%3,%4\n"                 \
 362.783 ++		    "srlx %4,32,%4\n"                  \
 362.784 ++		    "add %2,%2,%2\n"                   \
 362.785 ++		    "movcc %%xcc,%%g0,%2\n"            \
 362.786 ++		    "addcc %5,%4,%5\n"                 \
 362.787 ++		    "sllx %3,32,%3\n"                  \
 362.788 ++		    "add %1,%3,%1\n"                   \
 362.789 ++		    "add %5,%2,%0"					\
 362.790 + 	   : "=r" ((UDItype)(wh)),					\
 362.791 + 	     "=&r" ((UDItype)(wl)),					\
 362.792 + 	     "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3), "=&r" (tmp4)	\
 362.793 +@@ -1250,8 +1250,8 @@
 362.794 + 
 362.795 + #if defined (__vax__) && W_TYPE_SIZE == 32
 362.796 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
 362.797 +-  __asm__ ("addl2 %5,%1
 362.798 +-	adwc %3,%0"							\
 362.799 ++  __asm__ ("addl2 %5,%1\n"            \
 362.800 ++	"adwc %3,%0"							\
 362.801 + 	   : "=g" ((USItype) (sh)),					\
 362.802 + 	     "=&g" ((USItype) (sl))					\
 362.803 + 	   : "%0" ((USItype) (ah)),					\
 362.804 +@@ -1259,8 +1259,8 @@
 362.805 + 	     "%1" ((USItype) (al)),					\
 362.806 + 	     "g" ((USItype) (bl)))
 362.807 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
 362.808 +-  __asm__ ("subl2 %5,%1
 362.809 +-	sbwc %3,%0"							\
 362.810 ++  __asm__ ("subl2 %5,%1\n"            \
 362.811 ++	"sbwc %3,%0"							\
 362.812 + 	   : "=g" ((USItype) (sh)),					\
 362.813 + 	     "=&g" ((USItype) (sl))					\
 362.814 + 	   : "0" ((USItype) (ah)),					\
   363.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   363.2 +++ b/patches/glibc/2.2.2/glibc-2.2.2-export_fp_hw.patch	Sat Feb 24 11:00:05 2007 +0000
   363.3 @@ -0,0 +1,30 @@
   363.4 +Fixes undefined symbol _fp_hw required by the ABI:
   363.5 +readelf -s /opt/crosstool/i686-pc-linux-gnu/i686-unknown-linux-gnu/gcc-3.4.3-glibc-2.2.2/i686-unknown-linux-gnu/lib/crt1.o | grep fp_hw
   363.6 +    29: 00000000     4 NOTYPE  GLOBAL DEFAULT  UND _fp_hw 
   363.7 +Rumored to fix problems with icc, which gets upset at any symbol
   363.8 +which is undefined, even if nobody cares about it.
   363.9 +
  363.10 +Revision 1.16, Thu Feb 22 19:57:34 2001 UTC (4 years, 2 months ago) by drepper
  363.11 +Branch: MAIN
  363.12 +CVS Tags: glibc-2_2_3
  363.13 +Changes since 1.15: +1 -1 lines
  363.14 +Diff to previous 1.15 (colored)
  363.15 +
  363.16 +(_fp_hw): Actually define label.
  363.17 +
  363.18 +===================================================================
  363.19 +RCS file: /cvs/glibc/libc/sysdeps/i386/elf/start.S,v
  363.20 +retrieving revision 1.15
  363.21 +retrieving revision 1.16
  363.22 +diff -u -r1.15 -r1.16
  363.23 +--- libc/sysdeps/i386/elf/start.S	2001/02/03 21:34:54	1.15
  363.24 ++++ libc/sysdeps/i386/elf/start.S	2001/02/22 19:57:34	1.16
  363.25 +@@ -85,7 +85,7 @@
  363.26 +    meaningless since we don't support machines < 80386.  */
  363.27 + 	.section .rodata
  363.28 + 	.globl _fp_hw
  363.29 +-	.long 3
  363.30 ++_fp_hw:	.long 3
  363.31 + 	.size _fp_hw, 4
  363.32 + 
  363.33 + /* Define a symbol for the first piece of initialized data.  */
   364.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   364.2 +++ b/patches/glibc/2.2.2/glibc-2.2.2-printf-not-macro.patch	Sat Feb 24 11:00:05 2007 +0000
   364.3 @@ -0,0 +1,36 @@
   364.4 +I'm testing toolchains with glibc-2.2.2 now.  It looks ok except
   364.5 +that glibc-2.2.2 headers contain the gosh-awful line
   364.6 +  #  define printf(fmt, args...) fprintf (stdout, fmt, ##args)
   364.7 +which causes builds of programs with methods named 'printf' to fail with
   364.8 +  error: `stdout' is not a type
   364.9 +Feh.
  364.10 +
  364.11 +Revision 1.8, Thu Aug 2 16:09:51 2001 UTC (3 years, 9 months ago) by aj
  364.12 +Branch: MAIN
  364.13 +CVS Tags: glibc-2_3_2, glibc-2_2_4, glibc-2-3-1, glibc-2-3, glibc-2-2-branch, glibc-2-2-5
  364.14 +
  364.15 +(printf): Remove printf optimization since GCC 3.0 can optimize printf.
  364.16 +
  364.17 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/libio/bits/stdio.h.diff?r1=1.7&r2=1.8&cvsroot=glibc
  364.18 +
  364.19 +===================================================================
  364.20 +RCS file: /cvs/glibc/libc/libio/bits/stdio.h,v
  364.21 +retrieving revision 1.7
  364.22 +retrieving revision 1.8
  364.23 +diff -u -r1.7 -r1.8
  364.24 +--- libc/libio/bits/stdio.h	2001/07/06 04:55:32	1.7
  364.25 ++++ libc/libio/bits/stdio.h	2001/08/02 16:09:51	1.8
  364.26 +@@ -29,13 +29,6 @@
  364.27 + 
  364.28 + 
  364.29 + #ifdef __USE_EXTERN_INLINES
  364.30 +-/* Since version 2.97 GCC knows about `fprintf' and can optimize certain
  364.31 +-   cases.  Help gcc to optimize more code by mapping `printf' to the known
  364.32 +-   `fprintf' function.  Unfortunately we have to use a macro.  */
  364.33 +-# if __GNUC_PREREQ (2,97)
  364.34 +-#  define printf(fmt, args...) fprintf (stdout, fmt, ##args)
  364.35 +-# endif
  364.36 +-
  364.37 + /* Write formatted output to stdout from argument list ARG.  */
  364.38 + __STDIO_INLINE int
  364.39 + vprintf (__const char *__restrict __fmt, _G_va_list __arg) __THROW
   365.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   365.2 +++ b/patches/glibc/2.2.2/glibc-2.2.2-syslog-bugfix.patch	Sat Feb 24 11:00:05 2007 +0000
   365.3 @@ -0,0 +1,60 @@
   365.4 +Backport a bugfix from glibc-2.2.5 to glibc-2.2.2 for the following problem:
   365.5 +  When syslog-ng is restarted (or HUPed), vixie-cron (and probably other
   365.6 +  programs) stop logging to syslog.
   365.7 +
   365.8 +
   365.9 +2001-08-27 Ulrich Drepper <Drepper@redhat.com> * misc/syslog.c (vsyslog):
  365.10 +  Try a bit harder to use syslogd.  If the connection went down after we
  365.11 +  first used it try to connect again and resend the message before printing
  365.12 +  to the console.
  365.13 +
  365.14 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/misc/Attic/syslog.c.diff?r1=1.32&r2=1.30&cvsroot=glibc
  365.15 +[ paths adjusted ]
  365.16 +
  365.17 +===================================================================
  365.18 +RCS file: /cvs/glibc/libc/misc/Attic/syslog.c,v
  365.19 +retrieving revision 1.30
  365.20 +retrieving revision 1.32
  365.21 +diff -u -r1.30 -r1.32
  365.22 +--- glibc-2.2.2/misc/syslog.c	2001/08/24 03:21:14	1.30
  365.23 ++++ glibc-2.2.5/misc/syslog.c	2001/08/30 23:13:49	1.32
  365.24 +@@ -239,17 +239,29 @@
  365.25 + 
  365.26 + 	if (!connected || __send(LogFile, buf, bufsize, 0) < 0)
  365.27 + 	  {
  365.28 +-	    closelog_internal ();	/* attempt re-open next time */
  365.29 +-	    /*
  365.30 +-	     * Output the message to the console; don't worry about blocking,
  365.31 +-	     * if console blocks everything will.  Make sure the error reported
  365.32 +-	     * is the one from the syslogd failure.
  365.33 +-	     */
  365.34 +-	    if (LogStat & LOG_CONS &&
  365.35 +-		(fd = __open(_PATH_CONSOLE, O_WRONLY|O_NOCTTY, 0)) >= 0)
  365.36 ++	    if (connected)
  365.37 + 	      {
  365.38 +-		dprintf (fd, "%s\r\n", buf + msgoff);
  365.39 +-		(void)__close(fd);
  365.40 ++		/* Try to reopen the syslog connection.  Maybe it went
  365.41 ++		   down.  */
  365.42 ++		closelog_internal ();
  365.43 ++		openlog_internal(LogTag, LogStat | LOG_NDELAY, 0);
  365.44 ++	      }
  365.45 ++
  365.46 ++	    if (!connected || __send(LogFile, buf, bufsize, 0) < 0)
  365.47 ++	      {
  365.48 ++		closelog_internal ();	/* attempt re-open next time */
  365.49 ++		/*
  365.50 ++		 * Output the message to the console; don't worry
  365.51 ++		 * about blocking, if console blocks everything will.
  365.52 ++		 * Make sure the error reported is the one from the
  365.53 ++		 * syslogd failure.
  365.54 ++		 */
  365.55 ++		if (LogStat & LOG_CONS &&
  365.56 ++		    (fd = __open(_PATH_CONSOLE, O_WRONLY|O_NOCTTY, 0)) >= 0)
  365.57 ++		  {
  365.58 ++		    dprintf (fd, "%s\r\n", buf + msgoff);
  365.59 ++		    (void)__close(fd);
  365.60 ++		  }
  365.61 + 	      }
  365.62 + 	  }
  365.63 + 
   366.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   366.2 +++ b/patches/glibc/2.2.2/glibc-2.2.5-alpha-pwrite64.patch	Sat Feb 24 11:00:05 2007 +0000
   366.3 @@ -0,0 +1,58 @@
   366.4 +Fix for this error:
   366.5 +
   366.6 +../sysdeps/unix/sysv/linux/pread.c: In function `__libc_pread':
   366.7 +../sysdeps/unix/sysv/linux/pread.c:52: error: `__NR_pread' undeclared (first use in this function)
   366.8 +../sysdeps/unix/sysv/linux/pread.c:52: error: (Each undeclared identifier is reported only once
   366.9 +../sysdeps/unix/sysv/linux/pread.c:52: error: for each function it appears in.)
  366.10 +make[2]: *** [/home/dank/crosstool-0.28/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.2.5/build-glibc/posix/pread.o] Error 1
  366.11 +make[2]: Leaving directory `/home/dank/crosstool-0.28/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.2.5/glibc-2.2.5/posix'
  366.12 +make[1]: *** [posix/subdir_lib] Error 2
  366.13 +make[1]: Leaving directory `/home/dank/crosstool-0.28/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.2.5/glibc-2.2.5'
  366.14 +make: *** [all] Error 2
  366.15 +
  366.16 +[ Same as glibc-2.3.2-alpha-pwrite.patch except for copyright date ]
  366.17 +
  366.18 +extracted from GLIBC CVS by Dan Kegel
  366.19 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.diff?r1=1.14&r2=1.15&cvsroot=glibc'
  366.20 +(to match context of...)
  366.21 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.diff?r1=1.16&r2=1.17&cvsroot=glibc'
  366.22 +and rediffed.
  366.23 +
  366.24 +cf. 
  366.25 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00038.html
  366.26 +
  366.27 +Originally thought we needed this hunk, too:
  366.28 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00037.html
  366.29 +but it seems the sysdep.h change is sufficient, and works better 
  366.30 +when compiling against linux-2.4.
  366.31 +
  366.32 +===================================================================
  366.33 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h.old	2004-05-24 22:21:44.000000000 -0700
  366.34 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h	2004-05-24 22:22:48.000000000 -0700
  366.35 +@@ -1,3 +1,3 @@
  366.36 +-/* Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
  366.37 ++/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2004 Free Software Foundation, Inc.
  366.38 +    This file is part of the GNU C Library.
  366.39 +    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
  366.40 +@@ -60,6 +60,21 @@
  366.41 + #define __NR_osf_getsysinfo	256
  366.42 + #define __NR_osf_setsysinfo	257
  366.43 + 
  366.44 ++/* Help old kernel headers where particular syscalls are not available.  */
  366.45 ++#ifndef __NR_semtimedop
  366.46 ++# define __NR_semtimedop	423
  366.47 ++#endif
  366.48 ++
  366.49 ++/* This is a kludge to make syscalls.list find these under the names
  366.50 ++   pread and pwrite, since some kernel headers define those names
  366.51 ++   and some define the *64 names for the same system calls.  */
  366.52 ++#if !defined __NR_pread && defined __NR_pread64
  366.53 ++# define __NR_pread __NR_pread64
  366.54 ++#endif
  366.55 ++#if !defined __NR_pwrite && defined __NR_pwrite64
  366.56 ++# define __NR_pwrite __NR_pwrite64
  366.57 ++#endif
  366.58 ++
  366.59 + /*
  366.60 +  * In order to get the hidden arguments for rt_sigaction set up
  366.61 +  * properly, we need to call the assembly version.  Detect this in the
   367.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   367.2 +++ b/patches/glibc/2.2.2/glibc-2.2.5-arm-pwrite64.patch	Sat Feb 24 11:00:05 2007 +0000
   367.3 @@ -0,0 +1,30 @@
   367.4 +Should fix
   367.5 +
   367.6 +../sysdeps/unix/sysv/linux/pread.c: In function `__libc_pread':
   367.7 +../sysdeps/unix/sysv/linux/pread.c:52: error: `__NR_pread' undeclared (first use in this function)
   367.8 +../sysdeps/unix/sysv/linux/pread.c:52: error: (Each undeclared identifier is reported only once
   367.9 +../sysdeps/unix/sysv/linux/pread.c:52: error: for each function it appears in.)
  367.10 +make[2]: *** [/home/dank/crosstool-0.28/build/arm-9tdmi-linux-gnu/gcc-3.4.1-glibc-2.2.5/build-glibc/posix/pread.o] Error 1
  367.11 +make[2]: Leaving directory `/home/dank/crosstool-0.28/build/arm-9tdmi-linux-gnu/gcc-3.4.1-glibc-2.2.5/glibc-2.2.5/posix'
  367.12 +make[1]: *** [posix/subdir_lib] Error 2
  367.13 +
  367.14 +Copied from similar patch for alpha.
  367.15 +
  367.16 +--- glibc-2.2.5-orig/sysdeps/unix/sysv/linux/arm/sysdep.h	2001-07-05 21:56:13.000000000 -0700
  367.17 ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/arm/sysdep.h	2004-08-07 10:45:26.000000000 -0700
  367.18 +@@ -32,6 +32,15 @@
  367.19 + #define SWI_BASE  (0x900000)
  367.20 + #define SYS_ify(syscall_name)	(__NR_##syscall_name)
  367.21 + 
  367.22 ++/* This is a kludge to make syscalls.list find these under the names
  367.23 ++   pread and pwrite, since some kernel headers define those names
  367.24 ++   and some define the *64 names for the same system calls.  */
  367.25 ++#if !defined __NR_pread && defined __NR_pread64
  367.26 ++# define __NR_pread __NR_pread64
  367.27 ++#endif
  367.28 ++#if !defined __NR_pwrite && defined __NR_pwrite64
  367.29 ++# define __NR_pwrite __NR_pwrite64
  367.30 ++#endif
  367.31 + 
  367.32 + #ifdef __ASSEMBLER__
  367.33 + 
   368.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   368.2 +++ b/patches/glibc/2.2.2/glibc-2.2.5-i386-pwrite64.patch	Sat Feb 24 11:00:05 2007 +0000
   368.3 @@ -0,0 +1,20 @@
   368.4 +diff -urN glibc-2.2.5-orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.2.5/sysdeps/unix/sysv/linux/i386/sysdep.h
   368.5 +--- glibc-2.2.5-orig/sysdeps/unix/sysv/linux/i386/sysdep.h	2001-07-06 06:56:16.000000000 +0200
   368.6 ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/i386/sysdep.h	2004-09-03 12:35:44.000000000 +0200
   368.7 +@@ -36,6 +36,16 @@
   368.8 + #undef L
   368.9 + #define L(name)	.L##name
  368.10 + 
  368.11 ++/* This is a kludge to make syscalls.list find these under the names
  368.12 ++ *    pread and pwrite, since some kernel headers define those names
  368.13 ++ *       and some define the *64 names for the same system calls.  */
  368.14 ++#if !defined __NR_pread && defined __NR_pread64
  368.15 ++# define __NR_pread __NR_pread64
  368.16 ++#endif
  368.17 ++#if !defined __NR_pwrite && defined __NR_pwrite64
  368.18 ++# define __NR_pwrite __NR_pwrite64
  368.19 ++#endif
  368.20 ++
  368.21 + #ifdef __ASSEMBLER__
  368.22 + 
  368.23 + /* Linux uses a negative return value to indicate syscall errors,
   369.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   369.2 +++ b/patches/glibc/2.2.2/glibc-2.2.5-m68k-pwrite.patch	Sat Feb 24 11:00:05 2007 +0000
   369.3 @@ -0,0 +1,32 @@
   369.4 +Copied from similar patch for other architectures.
   369.5 +
   369.6 +Should fix this error:
   369.7 +../sysdeps/unix/sysv/linux/pread.c: In function `__libc_pread':
   369.8 +../sysdeps/unix/sysv/linux/pread.c:53: `__NR_pread' undeclared (first use in this function)
   369.9 +../sysdeps/unix/sysv/linux/pread.c:53: (Each undeclared identifier is reported only once
  369.10 +../sysdeps/unix/sysv/linux/pread.c:53: for each function it appears in.)
  369.11 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc37/build/m68k-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.5/build-glibc/posix/pread.o] Error 1
  369.12 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/m68k-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.5/glibc-2.2.5/posix'
  369.13 +make[1]: *** [posix/subdir_lib] Error 2
  369.14 +make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/m68k-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.5/glibc-2.2.5'
  369.15 +make: *** [all] Error 2
  369.16 +
  369.17 +--- glibc-2.2.5/sysdeps/unix/sysv/linux/m68k/sysdep.h.old	2004-10-05 08:37:37.000000000 -0700
  369.18 ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/m68k/sysdep.h	2004-10-05 08:38:22.000000000 -0700
  369.19 +@@ -32,6 +32,16 @@
  369.20 + # define SYS_ify(syscall_name)	__NR_/**/syscall_name
  369.21 + #endif
  369.22 + 
  369.23 ++/* This is a kludge to make syscalls.list find these under the names
  369.24 ++   pread and pwrite, since some kernel headers define those names
  369.25 ++   and some define the *64 names for the same system calls.  */
  369.26 ++#if !defined __NR_pread && defined __NR_pread64
  369.27 ++# define __NR_pread __NR_pread64
  369.28 ++#endif
  369.29 ++#if !defined __NR_pwrite && defined __NR_pwrite64
  369.30 ++# define __NR_pwrite __NR_pwrite64
  369.31 ++#endif
  369.32 ++
  369.33 + #ifdef __ASSEMBLER__
  369.34 + 
  369.35 + /* Linux uses a negative return value to indicate syscall errors, unlike
   370.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   370.2 +++ b/patches/glibc/2.2.2/glibc-manual-stdin.texi-1.127.patch	Sat Feb 24 11:00:05 2007 +0000
   370.3 @@ -0,0 +1,18 @@
   370.4 +===================================================================
   370.5 +RCS file: /cvs/glibc/libc/manual/stdio.texi,v
   370.6 +retrieving revision 1.126
   370.7 +retrieving revision 1.127
   370.8 +diff -u -r1.126 -r1.127
   370.9 +--- libc/manual/stdio.texi	2001/06/06 07:11:31	1.126
  370.10 ++++ libc/manual/stdio.texi	2001/07/31 18:57:16	1.127
  370.11 +@@ -3265,8 +3265,8 @@
  370.12 + If you are trying to read input that doesn't match a single, fixed
  370.13 + pattern, you may be better off using a tool such as Flex to generate a
  370.14 + lexical scanner, or Bison to generate a parser, rather than using
  370.15 +-@code{scanf}.  For more information about these tools, see @ref{, , ,
  370.16 +-flex.info, Flex: The Lexical Scanner Generator}, and @ref{, , ,
  370.17 ++@code{scanf}.  For more information about these tools, see @ref{Top, , ,
  370.18 ++flex.info, Flex: The Lexical Scanner Generator}, and @ref{Top, , ,
  370.19 + bison.info, The Bison Reference Manual}.
  370.20 + 
  370.21 + @node Input Conversion Syntax
   371.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   371.2 +++ b/patches/glibc/2.2.2/glibc-nss-noopt.patch	Sat Feb 24 11:00:05 2007 +0000
   371.3 @@ -0,0 +1,26 @@
   371.4 +--- glibc-2.2.2/nss/Makefile.orig	Tue May 20 16:02:47 2003
   371.5 ++++ glibc-2.2.2/nss/Makefile	Tue May 20 16:03:52 2003
   371.6 +@@ -41,6 +41,10 @@
   371.7 + 
   371.8 + tests			= test-netdb
   371.9 + 
  371.10 ++# Disable optimization when building nss to avoid crash described in
  371.11 ++# http://gcc.gnu.org/ml/gcc-bugs/1998-06/msg00168.html
  371.12 ++default_cflags := -g -O0
  371.13 ++
  371.14 + include ../Makeconfig
  371.15 + 
  371.16 + ifeq (yes,$(build-static-nss))
  371.17 +--- glibc-2.2.2/locale/Makefile.orig	Tue May 20 17:29:11 2003
  371.18 ++++ glibc-2.2.2/locale/Makefile	Tue May 20 17:29:39 2003
  371.19 +@@ -66,6 +66,10 @@
  371.20 + GPERF = gperf
  371.21 + GPERFFLAGS = -acCgopt -k1,2,5,9,$$ -L ANSI-C
  371.22 + 
  371.23 ++# Disable optimization when building locale or nss to avoid crash described in
  371.24 ++# http://gcc.gnu.org/ml/gcc-bugs/1998-06/msg00168.html
  371.25 ++default_cflags := -g -O0
  371.26 ++
  371.27 + include ../Rules
  371.28 + 
  371.29 + programs/%-kw.h: programs/%-kw.gperf
   372.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   372.2 +++ b/patches/glibc/2.2.2/tst-pathopt-cross.patch	Sat Feb 24 11:00:05 2007 +0000
   372.3 @@ -0,0 +1,23 @@
   372.4 +Fixes error
   372.5 +tst-pathopt.sh: /crosstool-0.20/build/powerpc-750-linux-gnu/gcc-2.95.3-glibc-2.2.2/build-glibc/elf/ld.so: cannot execute binary file
   372.6 +make[2]: *** [/crosstool-0.20/build/powerpc-750-linux-gnu/gcc-2.95.3-glibc-2.2.2/build-glibc/elf/tst-pathopt.out] Error 126
   372.7 +See also http://sources.redhat.com/ml/libc-alpha/2001-03/msg00113.html
   372.8 +
   372.9 +===================================================================
  372.10 +RCS file: /cvs/glibc/libc/elf/Makefile,v
  372.11 +retrieving revision 1.196
  372.12 +retrieving revision 1.197
  372.13 +diff -u -r1.196 -r1.197
  372.14 +--- libc/elf/Makefile	2001/03/16 07:29:45	1.196
  372.15 ++++ libc/elf/Makefile	2001/03/25 04:57:51	1.197
  372.16 +@@ -246,8 +246,10 @@
  372.17 + generated += $(addsuffix .so,$(strip $(modules-names)))
  372.18 + 
  372.19 + ifeq (yes,$(build-shared))
  372.20 ++ifeq ($(cross-compiling),no)
  372.21 + tests: $(objpfx)tst-pathopt.out
  372.22 + endif
  372.23 ++endif
  372.24 + 
  372.25 + $(objpfx)testobj1.so: $(libdl)
  372.26 + $(objpfx)testobj1_1.so: $(objpfx)testobj1.so $(libdl)
   373.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   373.2 +++ b/patches/glibc/2.2.3/errlist-1.9.patch	Sat Feb 24 11:00:05 2007 +0000
   373.3 @@ -0,0 +1,30 @@
   373.4 +Fixes:
   373.5 +
   373.6 +../sysdeps/unix/sysv/linux/errlist.c:41: weak declaration of `_old_sys_nerr' must precede definition
   373.7 +make[2]: *** [/home/dank/downloads/crosstool-0.24/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/stdio-common/errlist.os] Error 1
   373.8 +
   373.9 +===================================================================
  373.10 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/Attic/errlist.c,v
  373.11 +retrieving revision 1.8
  373.12 +retrieving revision 1.9
  373.13 +diff -u -r1.8 -r1.9
  373.14 +--- libc/sysdeps/unix/sysv/linux/errlist.c	2001/07/06 04:56:12	1.8
  373.15 ++++ libc/sysdeps/unix/sysv/linux/errlist.c	2002/05/20 06:56:53	1.9
  373.16 +@@ -1,4 +1,4 @@
  373.17 +-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
  373.18 ++/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
  373.19 +    This file is part of the GNU C Library.
  373.20 + 
  373.21 +    The GNU C Library is free software; you can redistribute it and/or
  373.22 +@@ -38,10 +38,9 @@
  373.23 + const int __old_sys_nerr = OLD_ERRLIST_SIZE;
  373.24 + 
  373.25 + strong_alias (__old_sys_nerr, _old_sys_nerr);
  373.26 +-weak_alias (__old_sys_nerr, _old_sys_nerr)
  373.27 + compat_symbol (libc, __old_sys_nerr, _sys_nerr, GLIBC_2_0);
  373.28 + compat_symbol (libc, _old_sys_nerr, sys_nerr, GLIBC_2_0);
  373.29 +-weak_alias (__old_sys_errlist, _old_sys_errlist);
  373.30 ++strong_alias (__old_sys_errlist, _old_sys_errlist);
  373.31 + compat_symbol (libc, __old_sys_errlist, _sys_errlist, GLIBC_2_0);
  373.32 + compat_symbol (libc, _old_sys_errlist, sys_errlist, GLIBC_2_0);
  373.33 + #endif
   374.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   374.2 +++ b/patches/glibc/2.2.3/errlist-arm.patch	Sat Feb 24 11:00:05 2007 +0000
   374.3 @@ -0,0 +1,48 @@
   374.4 +Subject: patch for arm
   374.5 +From: Philip Blundell <Philip dot Blundell at pobox dot com>
   374.6 +To: libc-hacker at sources dot redhat dot com
   374.7 +Content-Type: text/plain
   374.8 +Content-Transfer-Encoding: 7bit
   374.9 +Date: 22 Jul 2002 20:12:06 +0100
  374.10 +Message-Id: <1027365126.725.10.camel@kc>
  374.11 +Mime-Version: 1.0
  374.12 +
  374.13 +The mainline seems to need this patch in order to compile.
  374.14 +
  374.15 +p.
  374.16 +
  374.17 +2002-07-22  Philip Blundell  <philb@gnu.org>
  374.18 +
  374.19 +	* sysdeps/unix/sysv/linux/arm/errlist.c: Remove extra weak alias
  374.20 +	definiton of _old_sys_nerr.  Define _old_sys_errlist as strong
  374.21 +	alias.
  374.22 +
  374.23 +Index: sysdeps/unix/sysv/linux/arm/errlist.c
  374.24 +===================================================================
  374.25 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/arm/errlist.c,v
  374.26 +retrieving revision 1.4
  374.27 +diff -u -p -r1.4 errlist.c
  374.28 +--- glibc/sysdeps/unix/sysv/linux/arm/errlist.c	6 Jul 2001 04:56:13 -0000	1.4
  374.29 ++++ glibc/sysdeps/unix/sysv/linux/arm/errlist.c	22 Jul 2002 19:10:57 -0000
  374.30 +@@ -1,4 +1,4 @@
  374.31 +-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
  374.32 ++/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
  374.33 +    This file is part of the GNU C Library.
  374.34 + 
  374.35 +    The GNU C Library is free software; you can redistribute it and/or
  374.36 +@@ -38,10 +38,9 @@ extern const char *const *__old_sys_errl
  374.37 + const int __old_sys_nerr = OLD_ERRLIST_SIZE;
  374.38 + 
  374.39 + strong_alias (__old_sys_nerr, _old_sys_nerr);
  374.40 +-weak_alias (__old_sys_nerr, _old_sys_nerr)
  374.41 + compat_symbol (libc, __old_sys_nerr, _sys_nerr, GLIBC_2_0);
  374.42 + compat_symbol (libc, _old_sys_nerr, sys_nerr, GLIBC_2_0);
  374.43 +-weak_alias (__old_sys_errlist, _old_sys_errlist);
  374.44 ++strong_alias (__old_sys_errlist, _old_sys_errlist);
  374.45 + compat_symbol (libc, __old_sys_errlist, _sys_errlist, GLIBC_2_0);
  374.46 + compat_symbol (libc, _old_sys_errlist, sys_errlist, GLIBC_2_0);
  374.47 + #endif
  374.48 +
  374.49 +
  374.50 +
  374.51 +
   375.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   375.2 +++ b/patches/glibc/2.2.3/glibc-2.2.3-mips-base-addr-got.patch	Sat Feb 24 11:00:05 2007 +0000
   375.3 @@ -0,0 +1,276 @@
   375.4 +From http://www.ltc.com/~brad/mips/glibc-2.2.3-mips-base-addr-got.diff
   375.5 +
   375.6 +Hopefully fixes the error:
   375.7 +
   375.8 +/opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/lib/gcc-lib/mipsel-unknown-linux-gnu/3.2.3/../../../../mipsel-unknown-linux-gnu/bin/ld: target elf32-littlemips not found
   375.9 +collect2: ld returned 1 exit status
  375.10 +make[2]: *** [/home/dank/downloads/crosstool-0.24/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/elf/ld.so] Error 1
  375.11 +
  375.12 +
  375.13 +diff -urNbB glibc-2.2.3/sysdeps/mips/dl-machine.h glibc-2.2.3-mips/sysdeps/mips/dl-machine.h
  375.14 +--- glibc-2.2.3/sysdeps/mips/dl-machine.h	Mon Mar 26 23:53:28 2001
  375.15 ++++ glibc-2.2.3-mips/sysdeps/mips/dl-machine.h	Sun Aug 12 11:08:17 2001
  375.16 +@@ -61,23 +61,6 @@
  375.17 +    in l_info array.  */
  375.18 + #define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM)
  375.19 + 
  375.20 +-/*
  375.21 +- * MIPS libraries are usually linked to a non-zero base address.  We
  375.22 +- * subtract the base address from the address where we map the object
  375.23 +- * to.  This results in more efficient address space usage.
  375.24 +- *
  375.25 +- * FIXME: By the time when MAP_BASE_ADDR is called we don't have the
  375.26 +- * DYNAMIC section read.  Until this is fixed make the assumption that
  375.27 +- * libraries have their base address at 0x5ffe0000.  This needs to be
  375.28 +- * fixed before we can safely get rid of this MIPSism.
  375.29 +- */
  375.30 +-#if 0
  375.31 +-#define MAP_BASE_ADDR(l) ((l)->l_info[DT_MIPS(BASE_ADDRESS)] ? \
  375.32 +-			  (l)->l_info[DT_MIPS(BASE_ADDRESS)]->d_un.d_ptr : 0)
  375.33 +-#else
  375.34 +-#define MAP_BASE_ADDR(l) 0x5ffe0000
  375.35 +-#endif
  375.36 +-
  375.37 + /* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
  375.38 +    with the run-time address of the r_debug structure  */
  375.39 + #define ELF_MACHINE_DEBUG_SETUP(l,r) \
  375.40 +@@ -557,51 +540,30 @@
  375.41 +   /* Do nothing.  */
  375.42 + }
  375.43 + 
  375.44 ++#ifndef RTLD_BOOTSTRAP
  375.45 + /* Relocate GOT. */
  375.46 + static inline void
  375.47 + elf_machine_got_rel (struct link_map *map, int lazy)
  375.48 + {
  375.49 +   ElfW(Addr) *got;
  375.50 +   ElfW(Sym) *sym;
  375.51 ++  const ElfW(Half) *vernum;
  375.52 +   int i, n, symidx;
  375.53 +-  /*  This function is loaded in dl-reloc as a nested function and can
  375.54 +-      therefore access the variables scope and strtab from
  375.55 +-      _dl_relocate_object.  */
  375.56 +-#ifdef RTLD_BOOTSTRAP
  375.57 +-# define RESOLVE_GOTSYM(sym,sym_index) 0
  375.58 +-#else
  375.59 +-# define RESOLVE_GOTSYM(sym,sym_index)					  \
  375.60 ++
  375.61 ++#define RESOLVE_GOTSYM(sym,vernum,sym_index)				  \
  375.62 +     ({									  \
  375.63 +       const ElfW(Sym) *ref = sym;					  \
  375.64 ++      const struct r_found_version *version				  \
  375.65 ++        = vernum ? &map->l_versions [vernum [sym_index]] : NULL;	  \
  375.66 +       ElfW(Addr) value;							  \
  375.67 +-									  \
  375.68 +-      switch (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL)		  \
  375.69 +-	{								  \
  375.70 +-	default:							  \
  375.71 +-	  {								  \
  375.72 +-	    const ElfW(Half) *vernum =					  \
  375.73 +-	      (const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]);  \
  375.74 +-	    ElfW(Half) ndx = vernum[sym_index];				  \
  375.75 +-	    const struct r_found_version *version = &l->l_versions[ndx];  \
  375.76 +-									  \
  375.77 +-	    if (version->hash != 0)					  \
  375.78 +-	      {								  \
  375.79 +-		value = _dl_lookup_versioned_symbol(strtab + sym->st_name,\
  375.80 +-						    map,		  \
  375.81 +-						    &ref, scope, version, \
  375.82 +-						    R_MIPS_REL32, 0);	  \
  375.83 +-		break;							  \
  375.84 +-	      }								  \
  375.85 +-	    /* Fall through.  */					  \
  375.86 +-	  }								  \
  375.87 +-	case 0:								  \
  375.88 +-	  value = _dl_lookup_symbol (strtab + sym->st_name, map, &ref,	  \
  375.89 +-				     scope, R_MIPS_REL32, 0);		  \
  375.90 +-	}								  \
  375.91 +-									  \
  375.92 ++      value = RESOLVE (&ref, version, R_MIPS_REL32);			  \
  375.93 +       (ref)? value + ref->st_value: 0;					  \
  375.94 +     })
  375.95 +-#endif /* RTLD_BOOTSTRAP */
  375.96 ++
  375.97 ++  if (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL)
  375.98 ++    vernum = (const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]);
  375.99 ++  else
 375.100 ++    vernum = NULL;
 375.101 + 
 375.102 +   got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]);
 375.103 + 
 375.104 +@@ -639,10 +601,10 @@
 375.105 + 	      && sym->st_value && lazy)
 375.106 + 	    *got = sym->st_value + map->l_addr;
 375.107 + 	  else
 375.108 +-	    *got = RESOLVE_GOTSYM (sym, symidx);
 375.109 ++	    *got = RESOLVE_GOTSYM (sym, vernum, symidx);
 375.110 + 	}
 375.111 +       else if (sym->st_shndx == SHN_COMMON)
 375.112 +-	*got = RESOLVE_GOTSYM (sym, symidx);
 375.113 ++	*got = RESOLVE_GOTSYM (sym, vernum, symidx);
 375.114 +       else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
 375.115 + 	       && *got != sym->st_value
 375.116 + 	       && lazy)
 375.117 +@@ -653,7 +615,7 @@
 375.118 + 	    *got += map->l_addr;
 375.119 + 	}
 375.120 +       else
 375.121 +-	*got = RESOLVE_GOTSYM (sym, symidx);
 375.122 ++	*got = RESOLVE_GOTSYM (sym, vernum, symidx);
 375.123 + 
 375.124 +       ++got;
 375.125 +       ++sym;
 375.126 +@@ -661,9 +623,8 @@
 375.127 +     }
 375.128 + 
 375.129 + #undef RESOLVE_GOTSYM
 375.130 +-
 375.131 +-  return;
 375.132 + }
 375.133 ++#endif
 375.134 + 
 375.135 + /* Set up the loaded object described by L so its stub function
 375.136 +    will jump to the on-demand fixup code __dl_runtime_resolve.  */
 375.137 +diff -urNbB glibc-2.2.3/sysdeps/mips/mips64/rtld-parms glibc-2.2.3-mips/sysdeps/mips/mips64/rtld-parms
 375.138 +--- glibc-2.2.3/sysdeps/mips/mips64/rtld-parms	Sat Jul 12 18:26:11 1997
 375.139 ++++ glibc-2.2.3-mips/sysdeps/mips/mips64/rtld-parms	Wed Dec 31 19:00:00 1969
 375.140 +@@ -1,3 +0,0 @@
 375.141 +-ifndef rtld-wordsize
 375.142 +-rtld-wordsize = 64
 375.143 +-endif
 375.144 +diff -urNbB glibc-2.2.3/sysdeps/mips/mipsel/rtld-parms glibc-2.2.3-mips/sysdeps/mips/mipsel/rtld-parms
 375.145 +--- glibc-2.2.3/sysdeps/mips/mipsel/rtld-parms	Sat Jul 12 18:26:15 1997
 375.146 ++++ glibc-2.2.3-mips/sysdeps/mips/mipsel/rtld-parms	Wed Dec 31 19:00:00 1969
 375.147 +@@ -1,3 +0,0 @@
 375.148 +-ifndef rtld-oformat
 375.149 +-rtld-oformat = elf32-littlemips
 375.150 +-endif
 375.151 +diff -urNbB glibc-2.2.3/sysdeps/mips/rtld-ldscript.in glibc-2.2.3-mips/sysdeps/mips/rtld-ldscript.in
 375.152 +--- glibc-2.2.3/sysdeps/mips/rtld-ldscript.in	Sat Jul 12 18:23:14 1997
 375.153 ++++ glibc-2.2.3-mips/sysdeps/mips/rtld-ldscript.in	Wed Dec 31 19:00:00 1969
 375.154 +@@ -1,106 +0,0 @@
 375.155 +-OUTPUT_FORMAT("@@rtld-oformat@@")
 375.156 +-OUTPUT_ARCH(@@rtld-arch@@)
 375.157 +-ENTRY(@@rtld-entry@@)
 375.158 +-SECTIONS
 375.159 +-{
 375.160 +-  /* Read-only sections, merged into text segment: */
 375.161 +-  . = @@rtld-base@@;
 375.162 +-  .reginfo       : { *(.reginfo) }
 375.163 +-  .dynamic       : { *(.dynamic) }
 375.164 +-  .dynstr        : { *(.dynstr)		}
 375.165 +-  .dynsym        : { *(.dynsym)		}
 375.166 +-  .hash          : { *(.hash)		}
 375.167 +-  .rel.text      : { *(.rel.text)		}
 375.168 +-  .rela.text     : { *(.rela.text) 	}
 375.169 +-  .rel.data      : { *(.rel.data)		}
 375.170 +-  .rela.data     : { *(.rela.data) 	}
 375.171 +-  .rel.rodata    : { *(.rel.rodata) 	}
 375.172 +-  .rela.rodata   : { *(.rela.rodata) 	}
 375.173 +-  .rel.got       : { *(.rel.got)		}
 375.174 +-  .rela.got      : { *(.rela.got)		}
 375.175 +-  .rel.ctors     : { *(.rel.ctors)	}
 375.176 +-  .rela.ctors    : { *(.rela.ctors)	}
 375.177 +-  .rel.dtors     : { *(.rel.dtors)	}
 375.178 +-  .rela.dtors    : { *(.rela.dtors)	}
 375.179 +-  .rel.init      : { *(.rel.init)	}
 375.180 +-  .rela.init     : { *(.rela.init)	}
 375.181 +-  .rel.fini      : { *(.rel.fini)	}
 375.182 +-  .rela.fini     : { *(.rela.fini)	}
 375.183 +-  .rel.bss       : { *(.rel.bss)		}
 375.184 +-  .rela.bss      : { *(.rela.bss)		}
 375.185 +-  .rel.plt       : { *(.rel.plt)		}
 375.186 +-  .rela.plt      : { *(.rela.plt)		}
 375.187 +-  .rodata    : { *(.rodata)  }
 375.188 +-  .rodata1   : { *(.rodata1) }
 375.189 +-  .init          : { *(.init)	} =0
 375.190 +-  .text      :
 375.191 +-  {
 375.192 +-    *(.text)
 375.193 +-    *(.stub)
 375.194 +-    /* .gnu.warning sections are handled specially by elf32.em.  */
 375.195 +-    *(.gnu.warning)
 375.196 +-  } =0
 375.197 +-  .fini      : { *(.fini)    } =0
 375.198 +-  /* Adjust the address for the data segment.  We want to adjust up to
 375.199 +-     the same address within the page on the next page up.  It would
 375.200 +-     be more correct to do this:
 375.201 +-       . = 0x10000000;
 375.202 +-     The current expression does not correctly handle the case of a
 375.203 +-     text segment ending precisely at the end of a page; it causes the
 375.204 +-     data segment to skip a page.  The above expression does not have
 375.205 +-     this problem, but it will currently (2/95) cause BFD to allocate
 375.206 +-     a single segment, combining both text and data, for this case.
 375.207 +-     This will prevent the text segment from being shared among
 375.208 +-     multiple executions of the program; I think that is more
 375.209 +-     important than losing a page of the virtual address space (note
 375.210 +-     that no actual memory is lost; the page which is skipped can not
 375.211 +-     be referenced).  */
 375.212 +-  . += 0x10000;
 375.213 +-  .data    :
 375.214 +-  {
 375.215 +-    *(.data)
 375.216 +-    CONSTRUCTORS
 375.217 +-  }
 375.218 +-  .data1   : { *(.data1) }
 375.219 +-  .ctors         : { *(.ctors)   }
 375.220 +-  .dtors         : { *(.dtors)   }
 375.221 +-  _gp = ALIGN(16) + 0x7ff0;
 375.222 +-  .got           :
 375.223 +-  {
 375.224 +-    *(.got.plt) *(.got)
 375.225 +-   }
 375.226 +-  /* We want the small data sections together, so single-instruction offsets
 375.227 +-     can access them all, and initialized data all before uninitialized, so
 375.228 +-     we can shorten the on-disk segment size.  */
 375.229 +-  .sdata     : { *(.sdata) }
 375.230 +-  .lit8 : { *(.lit8) }
 375.231 +-  .lit4 : { *(.lit4) }
 375.232 +-  .sbss      : { *(.sbss) *(.scommon) }
 375.233 +-  .bss       :
 375.234 +-  {
 375.235 +-   *(.dynbss)
 375.236 +-   *(.bss)
 375.237 +-   *(COMMON)
 375.238 +-  }
 375.239 +-  /* The normal linker scripts created by the binutils doesn't have the
 375.240 +-     symbols end and _end which breaks ld.so's dl-minimal.c.  */
 375.241 +-  _end = . ;
 375.242 +-  PROVIDE (end = .);
 375.243 +-  /* These are needed for ELF backends which have not yet been
 375.244 +-     converted to the new style linker.  */
 375.245 +-  .stab 0 : { *(.stab) }
 375.246 +-  .stabstr 0 : { *(.stabstr) }
 375.247 +-  /* DWARF debug sections.
 375.248 +-     Symbols in the .debug DWARF section are relative to the beginning of the
 375.249 +-     section so we begin .debug at 0.  It's not clear yet what needs to happen
 375.250 +-     for the others.   */
 375.251 +-  .debug          0 : { *(.debug) }
 375.252 +-  .debug_srcinfo  0 : { *(.debug_srcinfo) }
 375.253 +-  .debug_aranges  0 : { *(.debug_aranges) }
 375.254 +-  .debug_pubnames 0 : { *(.debug_pubnames) }
 375.255 +-  .debug_sfnames  0 : { *(.debug_sfnames) }
 375.256 +-  .line           0 : { *(.line) }
 375.257 +-  /* These must appear regardless of  .  */
 375.258 +-  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
 375.259 +-  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
 375.260 +-}
 375.261 +diff -urNbB glibc-2.2.3/sysdeps/mips/rtld-parms glibc-2.2.3-mips/sysdeps/mips/rtld-parms
 375.262 +--- glibc-2.2.3/sysdeps/mips/rtld-parms	Mon Jul 21 19:04:07 1997
 375.263 ++++ glibc-2.2.3-mips/sysdeps/mips/rtld-parms	Wed Dec 31 19:00:00 1969
 375.264 +@@ -1,15 +0,0 @@
 375.265 +-ifndef rtld-wordsize
 375.266 +-rtld-wordsize = 32
 375.267 +-endif
 375.268 +-ifndef rtld-oformat
 375.269 +-rtld-oformat = elf$(rtld-wordsize)-bigmips
 375.270 +-endif
 375.271 +-ifndef rtld-arch
 375.272 +-rtld-arch = mips
 375.273 +-endif
 375.274 +-ifndef rtld-entry
 375.275 +-rtld-entry = __start
 375.276 +-endif
 375.277 +-ifndef rtld-base
 375.278 +-rtld-base = 0x0fb60000 + SIZEOF_HEADERS
 375.279 +-endif
   376.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   376.2 +++ b/patches/glibc/2.2.3/glibc-2.2.5-mips-clone-local-label.patch	Sat Feb 24 11:00:05 2007 +0000
   376.3 @@ -0,0 +1,47 @@
   376.4 +This is a workaround for
   376.5 +
   376.6 +mipsel-unknown-linux-gnu-gcc ../sysdeps/unix/sysv/linux/mips/clone.S -c  -I../include -I. -I/home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/misc -I.. -I../libio  -I/home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc -I../sysdeps/mips/elf -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/mips -I../sysdeps/unix/sysv/linux/mips -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/mips -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/mips/mipsel -I../sysdeps/mips/fpu -I../sysdeps/mips -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic  -nostdinc -isystem /home3/dank/crosstool-0.7/result/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/mipsel-unknown-linux-gnu/3.2.3/include -isystem /home3/dank/crosstool-0.7/result/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/mipsel-unknown-linux-gnu/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC   -DASSEMBLER   -o /home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/misc/clone.o
   376.7 +../sysdeps/unix/sysv/linux/mips/clone.S: Assembler messages:
   376.8 +../sysdeps/unix/sysv/linux/mips/clone.S:66: Error: Can not represent BFD_RELOC_16_PCREL_S2 relocation in this object file format
   376.9 +make[2]: *** [/home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/misc/clone.o] Error 1
  376.10 +
  376.11 +which was using h.j.lu's binutils-2.13.90.0.18.
  376.12 +
  376.13 +
  376.14 +But see http://lists.debian.org/debian-mips/2003/debian-mips-200305/msg00011.html
  376.15 +which says
  376.16 +"A newer version of binutils (CVS post 2003-03-12) fixes it without
  376.17 +the need of changing perfectly legal code."
  376.18 +So presumably this can be ditched sooner or later.
  376.19 +
  376.20 +From http://honk.physik.uni-konstanz.de/~agx/linux-mips/glibc/patches/applied/clone-local-label.diff
  376.21 +
  376.22 +2003-03-13  Guido Guenther  <agx@sigxcpu.org>
  376.23 +
  376.24 +	* sysdeps/unix/sysv/linux/mips/clone.S: introduce and use local label
  376.25 +	  .Lthread_start since current binutils don't allow branches to globally
  376.26 +	  visible symbols.
  376.27 +
  376.28 +===================================================================
  376.29 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/clone.S,v
  376.30 +retrieving revision 1.10
  376.31 +diff -u -r1.10 clone.S
  376.32 +--- glibc-2.2.5/sysdeps/unix/sysv/linux/mips/clone.S	12 Mar 2003 01:04:51 -0000	1.10
  376.33 ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/mips/clone.S	12 Mar 2003 19:04:39 -0000
  376.34 +@@ -63,7 +63,7 @@
  376.35 + 	syscall
  376.36 + 
  376.37 + 	bnez		a3,error
  376.38 +-	beqz		v0,__thread_start
  376.39 ++	beqz		v0,.Lthread_start
  376.40 + 
  376.41 + 	/* Successful return from the parent */
  376.42 + 	addiu		sp,32
  376.43 +@@ -85,6 +85,7 @@
  376.44 +    debug info.  */
  376.45 + 
  376.46 + ENTRY(__thread_start)
  376.47 ++.Lthread_start:
  376.48 + 	/* cp is already loaded.  */
  376.49 + 	.cprestore	16
  376.50 + 	/* The stackframe has been created on entry of clone().  */
   377.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   377.2 +++ b/patches/glibc/2.2.3/glibc-manual-stdin.texi-1.127.patch	Sat Feb 24 11:00:05 2007 +0000
   377.3 @@ -0,0 +1,25 @@
   377.4 +Fixes error
   377.5 +./stdio.texi:3269: First argument to cross-reference may not be empty.
   377.6 +./stdio.texi:3270: First argument to cross-reference may not be empty.
   377.7 +makeinfo: Removing output file `/home/dank/downloads/crosstool-0.24/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/glibc-2.2.3/manual/libc.info' due to errors; use --force to preserve.
   377.8 +make[2]: *** [libc.info] Error 2
   377.9 +make[2]: Leaving directory `/home/dank/downloads/crosstool-0.24/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/glibc-2.2.3/manual'
  377.10 +
  377.11 +===================================================================
  377.12 +RCS file: /cvs/glibc/libc/manual/stdio.texi,v
  377.13 +retrieving revision 1.126
  377.14 +retrieving revision 1.127
  377.15 +diff -u -r1.126 -r1.127
  377.16 +--- libc/manual/stdio.texi	2001/06/06 07:11:31	1.126
  377.17 ++++ libc/manual/stdio.texi	2001/07/31 18:57:16	1.127
  377.18 +@@ -3265,8 +3265,8 @@
  377.19 + If you are trying to read input that doesn't match a single, fixed
  377.20 + pattern, you may be better off using a tool such as Flex to generate a
  377.21 + lexical scanner, or Bison to generate a parser, rather than using
  377.22 +-@code{scanf}.  For more information about these tools, see @ref{, , ,
  377.23 +-flex.info, Flex: The Lexical Scanner Generator}, and @ref{, , ,
  377.24 ++@code{scanf}.  For more information about these tools, see @ref{Top, , ,
  377.25 ++flex.info, Flex: The Lexical Scanner Generator}, and @ref{Top, , ,
  377.26 + bison.info, The Bison Reference Manual}.
  377.27 + 
  377.28 + @node Input Conversion Syntax
   378.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   378.2 +++ b/patches/glibc/2.2.5/alpha-build-failure.patch	Sat Feb 24 11:00:05 2007 +0000
   378.3 @@ -0,0 +1,37 @@
   378.4 +See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=156841
   378.5 +
   378.6 +Here's the error I got before I applied the patch:
   378.7 +
   378.8 +/home3/dank/crosstool-0.5/result/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/alpha-unknown-linux-gnu/3.2.3/../../../../alpha-unknown-linux-gnu/bin/ld: /home3/dank/crosstool-0.5/build/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/libc_pic.os: pc-relative relocation against dynamic symbol __divlu
   378.9 +/home3/dank/crosstool-0.5/result/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/alpha-unknown-linux-gnu/3.2.3/../../../../alpha-unknown-linux-gnu/bin/ld: /home3/dank/crosstool-0.5/build/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/libc_pic.os: pc-relative relocation against dynamic symbol __divqu
  378.10 +/home3/dank/crosstool-0.5/result/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/alpha-unknown-linux-gnu/3.2.3/../../../../alpha-unknown-linux-gnu/bin/ld: /home3/dank/crosstool-0.5/build/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/libc_pic.os: pc-relative relocation against dynamic symbol __remlu
  378.11 +/home3/dank/crosstool-0.5/result/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/alpha-unknown-linux-gnu/3.2.3/../../../../alpha-unknown-linux-gnu/bin/ld: /home3/dank/crosstool-0.5/build/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/libc_pic.os: pc-relative relocation against dynamic symbol __remqu
  378.12 +collect2: ld returned 1 exit status
  378.13 +make[1]: *** [/home3/dank/crosstool-0.5/build/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/libc.so] Error 1
  378.14 +
  378.15 +
  378.16 +--- glibc-2.2.5/sysdeps/alpha/divrem.h	6 Jul 2001 04:55:45 -0000	1.8
  378.17 ++++ glibc-2.2.5/sysdeps/alpha/divrem.h	15 Jun 2002 20:53:37 -0000	1.9
  378.18 +@@ -1,4 +1,4 @@
  378.19 +-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
  378.20 ++/* Copyright (C) 1996,97,2002 Free Software Foundation, Inc.
  378.21 +    Contributed by David Mosberger (davidm@cs.arizona.edu).
  378.22 +    This file is part of the GNU C Library.
  378.23 + 
  378.24 +@@ -86,6 +86,7 @@
  378.25 + 
  378.26 + 	.align 3
  378.27 + UFUNC_NAME:
  378.28 ++$udiv_entry:
  378.29 + 	lda	sp, -STACK(sp)
  378.30 + 	.frame	sp, STACK, retaddr, 0
  378.31 + #ifdef PROF
  378.32 +@@ -206,7 +207,7 @@
  378.33 + 	cmovge	AT, AT, arg2
  378.34 + 
  378.35 + 	/* Do the unsigned division.  */
  378.36 +-	bsr	retaddr, UFUNC_NAME
  378.37 ++	bsr	retaddr, $udiv_entry
  378.38 + 
  378.39 + 	/* Restore originals and adjust the sign of the result.  */
  378.40 + 	ldq	arg1, 0(sp)
   379.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   379.2 +++ b/patches/glibc/2.2.5/arm-asm-clobber.patch	Sat Feb 24 11:00:05 2007 +0000
   379.3 @@ -0,0 +1,23 @@
   379.4 +http://gcc.gnu.org/PR11103
   379.5 +
   379.6 +Error:
   379.7 +../sysdeps/unix/sysv/linux/arm/sigaction.c: In function `__libc_sigaction':
   379.8 +../sysdeps/unix/sysv/linux/arm/sigaction.c:100: error: asm-specifier for variable `_a1' conflicts with asm clobber list
   379.9 +../sysdeps/unix/sysv/linux/arm/sigaction.c:139: error: asm-specifier for variable `_a1' conflicts with asm clobber list
  379.10 +make[2]: *** [/crosstool-0.22/build/arm-unknown-linux-gnu/gcc-3.3-glibc-2.2.5/build-glibc/signal/sigaction.o] Error 1
  379.11 +
  379.12 +Fix from http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-July/005826.html
  379.13 +rediffed against glibc-2.2.5
  379.14 +Not tested.  (I don't even understand it, just being a patch monkey...)
  379.15 +
  379.16 +--- glibc-2.2.5/sysdeps/unix/sysv/linux/arm/sysdep.h.old	Wed Aug 27 09:58:15 2003
  379.17 ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/arm/sysdep.h	Wed Aug 27 09:59:04 2003
  379.18 +@@ -131,7 +131,7 @@
  379.19 +        asm volatile ("swi	%1	@ syscall " #name	\
  379.20 + 		     : "=r" (_a1)				\
  379.21 + 		     : "i" (SYS_ify(name)) ASM_ARGS_##nr	\
  379.22 +-		     : "a1", "memory");				\
  379.23 ++		     : "memory");				\
  379.24 +        _sys_result = _a1;					\
  379.25 +      }								\
  379.26 +      if (_sys_result >= (unsigned int) -4095)			\
   380.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   380.2 +++ b/patches/glibc/2.2.5/arm-ctl_bus_isa.patch	Sat Feb 24 11:00:05 2007 +0000
   380.3 @@ -0,0 +1,51 @@
   380.4 +Applies to both glibc-2.2.5 and glibc-2.3.2, and probably glibc cvs as of Aug 2004.
   380.5 +Needed to build glibc with linux kernels 2.4.23 or higher on ARM, 
   380.6 +Fixes following error:
   380.7 +
   380.8 +../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
   380.9 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
  380.10 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
  380.11 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
  380.12 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
  380.13 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
  380.14 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
  380.15 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
  380.16 +make[2]: *** [/home/dank/crosstool-0.28/build/arm-softfloat-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/misc/ioperm.o] Error 1
  380.17 +
  380.18 +cf. "[SYSCTL] BUS_ISA -> CTL_BUS_ISA",  http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html
  380.19 +
  380.20 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c.old	2003-02-20 14:22:24.000000000 -0800
  380.21 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c	2004-01-31 16:01:50.000000000 -0800
  380.22 +@@ -47,6 +47,12 @@
  380.23 + #include <asm/page.h>
  380.24 + #include <sys/sysctl.h>
  380.25 + 
  380.26 ++/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
  380.27 ++#include <linux/version.h>
  380.28 ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
  380.29 ++#define CTL_BUS_ISA BUS_ISA	/* and hope it's not the one from linux/input.h */
  380.30 ++#endif
  380.31 ++
  380.32 + #define PATH_ARM_SYSTYPE	"/etc/arm_systype"
  380.33 + #define PATH_CPUINFO		"/proc/cpuinfo"
  380.34 + 
  380.35 +@@ -80,7 +86,7 @@
  380.36 +  * Initialize I/O system.  There are several ways to get the information
  380.37 +  * we need.  Each is tried in turn until one succeeds.
  380.38 +  *
  380.39 +- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*).  This is the preferred method
  380.40 ++ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*).  This is the preferred method
  380.41 +  *    but not all kernels support it.
  380.42 +  *
  380.43 +  * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
  380.44 +@@ -100,8 +106,8 @@
  380.45 + {
  380.46 +   char systype[256];
  380.47 +   int i, n;
  380.48 +-  static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
  380.49 +-  static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
  380.50 ++  static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
  380.51 ++  static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
  380.52 +   size_t len = sizeof(io.base);
  380.53 + 
  380.54 +   if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
   381.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   381.2 +++ b/patches/glibc/2.2.5/cris-libc-symbols.patch	Sat Feb 24 11:00:05 2007 +0000
   381.3 @@ -0,0 +1,97 @@
   381.4 +From http://sources.redhat.com/ml/libc-alpha/2002-06/msg00006.html
   381.5 +
   381.6 +Message-ID: <15612.44195.299251.921969@honolulu.ilog.fr>
   381.7 +Date: Tue, 4 Jun 2002 14:03:47 +0200 (CEST)
   381.8 +From: Bruno Haible <bruno at clisp dot org>
   381.9 +To: libc-alpha at sources dot redhat dot com
  381.10 +Subject: link_warning fix
  381.11 +
  381.12 +
  381.13 +Hi,
  381.14 +
  381.15 +While cross-compiling glibc-2.2.5 for target=cris-linux using gcc-3.1 and
  381.16 +binutils-2.12.90.0.7, I get an error
  381.17 +
  381.18 +cris-linux-gcc ../sysdeps/unix/sysv/linux/sigstack.c -c -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g      -I../include -I. -I/backup/cross-build/build-glibc-cris/signal -I.. -I../libio  -I/backup/cross-build/build-glibc-cris -I../sysdeps/cris/elf -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/cris -I../sysdeps/unix/sysv/linux/cris -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/cris -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic  -nostdinc -isystem /cross/cris-linux-tools/lib/gcc-lib/cris-linux/3.1/include -isystem /cross/cris-linux/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h     -o /backup/cross-build/build-glibc-cris/signal/sigstack.o
  381.19 +/tmp/cca7qZyI.s: Assembler messages:
  381.20 +/tmp/cca7qZyI.s:87: Warning: rest of line ignored; first ignored character is `,'
  381.21 +/tmp/cca7qZyI.s:87: Error: Unknown opcode: `progbits'
  381.22 +make[2]: *** [/backup/cross-build/build-glibc-cris/signal/sigstack.o] Fehler 1
  381.23 +
  381.24 +
  381.25 +The reason is that the .s file contains the following.
  381.26 +
  381.27 +...
  381.28 +	.size	sigstack,.Lfe1-sigstack
  381.29 +#APP
  381.30 +	.section .gnu.warning.sigstack
  381.31 +	.previous
  381.32 +#NO_APP
  381.33 +	.section	.gnu.warning.sigstack
  381.34 +	#,"a",@progbits
  381.35 +	.align 2
  381.36 +	.type	__evoke_link_warning_sigstack,@object
  381.37 +...
  381.38 +
  381.39 +and comments (introduced by '#') are recognized by the assembler only after
  381.40 +#APP, not after #NO_APP. The workaround is to add '#APP' to the fake section
  381.41 +name. The following patch works for me.
  381.42 +
  381.43 +2002-06-02  Bruno Haible  <bruno@clisp.org>
  381.44 +
  381.45 +	* include/libc-symbols.h (__as_app_line): New macro.
  381.46 +	(link_warning): Emit #APP line to turn comment recognition on.
  381.47 +
  381.48 +*** glibc-2.2.5/include/libc-symbols.h.bak	2001-08-04 01:02:52.000000000 +0200
  381.49 +--- glibc-2.2.5/include/libc-symbols.h	2002-06-02 16:22:15.000000000 +0200
  381.50 +***************
  381.51 +*** 207,224 ****
  381.52 +  #   define __make_section_unallocated(section_string)
  381.53 +  #  endif
  381.54 +  
  381.55 +! /* Tacking on "\n\t#" to the section name makes gcc put it's bogus
  381.56 +!    section attributes on what looks like a comment to the assembler.  */
  381.57 +  #  ifdef HAVE_SECTION_QUOTES
  381.58 +  #   define link_warning(symbol, msg) \
  381.59 +    __make_section_unallocated (".gnu.warning." #symbol) \
  381.60 +!   static const char __evoke_link_warning_##symbol[]	\
  381.61 +!     __attribute__ ((section (".gnu.warning." #symbol "\"\n\t#\""))) = msg;
  381.62 +  #  else
  381.63 +  #   define link_warning(symbol, msg) \
  381.64 +    __make_section_unallocated (".gnu.warning." #symbol) \
  381.65 +!   static const char __evoke_link_warning_##symbol[]	\
  381.66 +!     __attribute__ ((section (".gnu.warning." #symbol "\n\t#"))) = msg;
  381.67 +  #  endif
  381.68 +  # else /* Not ELF: a.out */
  381.69 +  #  ifdef HAVE_XCOFF
  381.70 +--- 207,235 ----
  381.71 +  #   define __make_section_unallocated(section_string)
  381.72 +  #  endif
  381.73 +  
  381.74 +! /* Tacking on "\n\t#" to the section name makes gcc put its bogus
  381.75 +!    section attributes on what looks like a comment to the assembler.
  381.76 +!    Furthermore, with gas, we need to add a "#APP" line so the comment
  381.77 +!    is recognized as such.  */
  381.78 +! #  ifdef HAVE_GNU_AS
  381.79 +! #   define __as_app_line "#APP\n"
  381.80 +! #  else
  381.81 +! #   define __as_app_line ""
  381.82 +! #  endif
  381.83 +  #  ifdef HAVE_SECTION_QUOTES
  381.84 +  #   define link_warning(symbol, msg) \
  381.85 +    __make_section_unallocated (".gnu.warning." #symbol) \
  381.86 +!   static const char __evoke_link_warning_##symbol[]			 \
  381.87 +!     __attribute__							 \
  381.88 +!       ((section (".gnu.warning." #symbol "\"\n" __as_app_line "\t#\""))) \
  381.89 +!     = msg;
  381.90 +  #  else
  381.91 +  #   define link_warning(symbol, msg) \
  381.92 +    __make_section_unallocated (".gnu.warning." #symbol) \
  381.93 +!   static const char __evoke_link_warning_##symbol[]			\
  381.94 +!     __attribute__							\
  381.95 +!       ((section (".gnu.warning." #symbol "\n" __as_app_line "\t#")))	\
  381.96 +!     = msg;
  381.97 +  #  endif
  381.98 +  # else /* Not ELF: a.out */
  381.99 +  #  ifdef HAVE_XCOFF
 381.100 +
   382.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   382.2 +++ b/patches/glibc/2.2.5/cris-stack-direction.patch	Sat Feb 24 11:00:05 2007 +0000
   382.3 @@ -0,0 +1,61 @@
   382.4 +From http://sources.redhat.com/ml/libc-alpha/2002-06/msg00007.html
   382.5 +
   382.6 +Message-ID: <15612.44228.774370.154718@honolulu.ilog.fr>
   382.7 +Date: Tue, 4 Jun 2002 14:04:20 +0200 (CEST)
   382.8 +From: Bruno Haible <bruno at clisp dot org>
   382.9 +To: libc-alpha at sources dot redhat dot com
  382.10 +Subject: cris stack direction
  382.11 +
  382.12 +
  382.13 +Hi,
  382.14 +
  382.15 +While cross-compiling glibc-2.2.5 for target=cris-linux using gcc-3.1 and
  382.16 +binutils-2.12.90.0.7, I get an error
  382.17 +
  382.18 +cris-linux-gcc cancel.c -c -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g   -D__NO_WEAK_PTHREAD_ALIASES -D_RPC_THREAD_SAFE_   -I../include -I. -I/backup/cross-build/build-glibc-cris/linuxthreads -I.. -I../libio  -I/backup/cross-build/build-glibc-cris -I../sysdeps/cris/elf -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/cris -I../sysdeps/unix/sysv/linux/cris -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/cris -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic  -nostdinc -isystem /cross/cris-linux-tools/lib/gcc-lib/cris-linux/3.1/include -isystem /cross/cris-linux/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h     -o /backup/cross-build/build-glibc-cris/linuxthreads/cancel.o
  382.19 +cancel.c:29:3: #error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
  382.20 +cancel.c: In function `_pthread_cleanup_push':
  382.21 +cancel.c:134: warning: implicit declaration of function `FRAME_LEFT'
  382.22 +make[2]: *** [/backup/cross-build/build-glibc-cris/linuxthreads/cancel.o] Fehler 1
  382.23 +
  382.24 +The fix is to add a file sysdeps/cris/stackinfo.h.
  382.25 +
  382.26 +
  382.27 +2002-06-02  Bruno Haible  <bruno@clisp.org>
  382.28 +
  382.29 +	* sysdeps/cris/stackinfo.h: New file.
  382.30 +
  382.31 +*** glibc-2.2.5/sysdeps/cris/stackinfo.h.bak	2002-06-02 17:52:05.000000000 +0200
  382.32 +--- glibc-2.2.5/sysdeps/cris/stackinfo.h	2002-06-02 17:52:24.000000000 +0200
  382.33 +***************
  382.34 +*** 0 ****
  382.35 +--- 1,28 ----
  382.36 ++ /* Copyright (C) 2002 Free Software Foundation, Inc.
  382.37 ++    This file is part of the GNU C Library.
  382.38 ++ 
  382.39 ++    The GNU C Library is free software; you can redistribute it and/or
  382.40 ++    modify it under the terms of the GNU Lesser General Public
  382.41 ++    License as published by the Free Software Foundation; either
  382.42 ++    version 2.1 of the License, or (at your option) any later version.
  382.43 ++ 
  382.44 ++    The GNU C Library is distributed in the hope that it will be useful,
  382.45 ++    but WITHOUT ANY WARRANTY; without even the implied warranty of
  382.46 ++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  382.47 ++    Lesser General Public License for more details.
  382.48 ++ 
  382.49 ++    You should have received a copy of the GNU Lesser General Public
  382.50 ++    License along with the GNU C Library; if not, write to the Free
  382.51 ++    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  382.52 ++    02111-1307 USA.  */
  382.53 ++ 
  382.54 ++ /* This file contains a bit of information about the stack allocation
  382.55 ++    of the processor.  */
  382.56 ++ 
  382.57 ++ #ifndef _STACKINFO_H
  382.58 ++ #define _STACKINFO_H	1
  382.59 ++ 
  382.60 ++ /* On cris the stack grows down.  */
  382.61 ++ #define _STACK_GROWS_DOWN	1
  382.62 ++ 
  382.63 ++ #endif	/* stackinfo.h */
  382.64 +
   383.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   383.2 +++ b/patches/glibc/2.2.5/dl-machine-alpha.patch	Sat Feb 24 11:00:05 2007 +0000
   383.3 @@ -0,0 +1,424 @@
   383.4 +From http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/alpha/dl-machine.h.diff?r1=1.56&r2=1.57&cvsroot=glibc
   383.5 +(minus first hunk)
   383.6 +Lets glibc-2.2.5 compile with gcc-3.3
   383.7 +
   383.8 +===================================================================
   383.9 +RCS file: /cvs/glibc/libc/sysdeps/alpha/dl-machine.h,v
  383.10 +retrieving revision 1.56
  383.11 +retrieving revision 1.57
  383.12 +diff -u -r1.56 -r1.57
  383.13 +--- libc/sysdeps/alpha/dl-machine.h	2001/12/12 00:10:27	1.56
  383.14 ++++ libc/sysdeps/alpha/dl-machine.h	2001/12/31 17:33:59	1.57
  383.15 +@@ -156,125 +157,126 @@
  383.16 + #define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name, IMB)	\
  383.17 +   extern void tramp_name (void);				\
  383.18 +   asm ( "\
  383.19 +-	.globl " #tramp_name "
  383.20 +-	.ent " #tramp_name "
  383.21 +-" #tramp_name ":
  383.22 +-	lda	$sp, -44*8($sp)
  383.23 +-	.frame	$sp, 44*8, $26
  383.24 +-	/* Preserve all integer registers that C normally doesn't.  */
  383.25 +-	stq	$26, 0*8($sp)
  383.26 +-	stq	$0, 1*8($sp)
  383.27 +-	stq	$1, 2*8($sp)
  383.28 +-	stq	$2, 3*8($sp)
  383.29 +-	stq	$3, 4*8($sp)
  383.30 +-	stq	$4, 5*8($sp)
  383.31 +-	stq	$5, 6*8($sp)
  383.32 +-	stq	$6, 7*8($sp)
  383.33 +-	stq	$7, 8*8($sp)
  383.34 +-	stq	$8, 9*8($sp)
  383.35 +-	stq	$16, 10*8($sp)
  383.36 +-	stq	$17, 11*8($sp)
  383.37 +-	stq	$18, 12*8($sp)
  383.38 +-	stq	$19, 13*8($sp)
  383.39 +-	stq	$20, 14*8($sp)
  383.40 +-	stq	$21, 15*8($sp)
  383.41 +-	stq	$22, 16*8($sp)
  383.42 +-	stq	$23, 17*8($sp)
  383.43 +-	stq	$24, 18*8($sp)
  383.44 +-	stq	$25, 19*8($sp)
  383.45 +-	stq	$29, 20*8($sp)
  383.46 +-	stt	$f0, 21*8($sp)
  383.47 +-	stt	$f1, 22*8($sp)
  383.48 +-	stt	$f10, 23*8($sp)
  383.49 +-	stt	$f11, 24*8($sp)
  383.50 +-	stt	$f12, 25*8($sp)
  383.51 +-	stt	$f13, 26*8($sp)
  383.52 +-	stt	$f14, 27*8($sp)
  383.53 +-	stt	$f15, 28*8($sp)
  383.54 +-	stt	$f16, 29*8($sp)
  383.55 +-	stt	$f17, 30*8($sp)
  383.56 +-	stt	$f18, 31*8($sp)
  383.57 +-	stt	$f19, 32*8($sp)
  383.58 +-	stt	$f20, 33*8($sp)
  383.59 +-	stt	$f21, 34*8($sp)
  383.60 +-	stt	$f22, 35*8($sp)
  383.61 +-	stt	$f23, 36*8($sp)
  383.62 +-	stt	$f24, 37*8($sp)
  383.63 +-	stt	$f25, 38*8($sp)
  383.64 +-	stt	$f26, 39*8($sp)
  383.65 +-	stt	$f27, 40*8($sp)
  383.66 +-	stt	$f28, 41*8($sp)
  383.67 +-	stt	$f29, 42*8($sp)
  383.68 +-	stt	$f30, 43*8($sp)
  383.69 +-	.mask	0x27ff01ff, -44*8
  383.70 +-	.fmask	0xfffffc03, -(44-21)*8
  383.71 +-	/* Set up our $gp */
  383.72 +-	br	$gp, .+4
  383.73 +-	ldgp	$gp, 0($gp)
  383.74 +-	.prologue 0
  383.75 +-	/* Set up the arguments for fixup: */
  383.76 +-	/* $16 = link_map out of plt0 */
  383.77 +-	/* $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 */
  383.78 +-	/* $18 = return address */
  383.79 +-	subq	$28, $27, $17
  383.80 +-	ldq	$16, 8($27)
  383.81 +-	subq	$17, 20, $17
  383.82 +-	mov	$26, $18
  383.83 +-	addq	$17, $17, $17
  383.84 +-	/* Do the fixup */
  383.85 +-	bsr	$26, " ASM_ALPHA_NG_SYMBOL_PREFIX #fixup_name "..ng
  383.86 +-	/* Move the destination address into position.  */
  383.87 +-	mov	$0, $27
  383.88 +-	/* Restore program registers.  */
  383.89 +-	ldq	$26, 0*8($sp)
  383.90 +-	ldq	$0, 1*8($sp)
  383.91 +-	ldq	$1, 2*8($sp)
  383.92 +-	ldq	$2, 3*8($sp)
  383.93 +-	ldq	$3, 4*8($sp)
  383.94 +-	ldq	$4, 5*8($sp)
  383.95 +-	ldq	$5, 6*8($sp)
  383.96 +-	ldq	$6, 7*8($sp)
  383.97 +-	ldq	$7, 8*8($sp)
  383.98 +-	ldq	$8, 9*8($sp)
  383.99 +-	ldq	$16, 10*8($sp)
 383.100 +-	ldq	$17, 11*8($sp)
 383.101 +-	ldq	$18, 12*8($sp)
 383.102 +-	ldq	$19, 13*8($sp)
 383.103 +-	ldq	$20, 14*8($sp)
 383.104 +-	ldq	$21, 15*8($sp)
 383.105 +-	ldq	$22, 16*8($sp)
 383.106 +-	ldq	$23, 17*8($sp)
 383.107 +-	ldq	$24, 18*8($sp)
 383.108 +-	ldq	$25, 19*8($sp)
 383.109 +-	ldq	$29, 20*8($sp)
 383.110 +-	ldt	$f0, 21*8($sp)
 383.111 +-	ldt	$f1, 22*8($sp)
 383.112 +-	ldt	$f10, 23*8($sp)
 383.113 +-	ldt	$f11, 24*8($sp)
 383.114 +-	ldt	$f12, 25*8($sp)
 383.115 +-	ldt	$f13, 26*8($sp)
 383.116 +-	ldt	$f14, 27*8($sp)
 383.117 +-	ldt	$f15, 28*8($sp)
 383.118 +-	ldt	$f16, 29*8($sp)
 383.119 +-	ldt	$f17, 30*8($sp)
 383.120 +-	ldt	$f18, 31*8($sp)
 383.121 +-	ldt	$f19, 32*8($sp)
 383.122 +-	ldt	$f20, 33*8($sp)
 383.123 +-	ldt	$f21, 34*8($sp)
 383.124 +-	ldt	$f22, 35*8($sp)
 383.125 +-	ldt	$f23, 36*8($sp)
 383.126 +-	ldt	$f24, 37*8($sp)
 383.127 +-	ldt	$f25, 38*8($sp)
 383.128 +-	ldt	$f26, 39*8($sp)
 383.129 +-	ldt	$f27, 40*8($sp)
 383.130 +-	ldt	$f28, 41*8($sp)
 383.131 +-	ldt	$f29, 42*8($sp)
 383.132 +-	ldt	$f30, 43*8($sp)
 383.133 +-	/* Flush the Icache after having modified the .plt code.  */
 383.134 +-	" #IMB "
 383.135 +-	/* Clean up and turn control to the destination */
 383.136 +-	lda	$sp, 44*8($sp)
 383.137 +-	jmp	$31, ($27)
 383.138 ++	.globl " #tramp_name "					\n\
 383.139 ++	.ent " #tramp_name "					\n\
 383.140 ++" #tramp_name ":						\n\
 383.141 ++	lda	$sp, -44*8($sp)					\n\
 383.142 ++	.frame	$sp, 44*8, $26					\n\
 383.143 ++	/* Preserve all integer registers that C normally	\n\
 383.144 ++	   doesn't.  */						\n\
 383.145 ++	stq	$26, 0*8($sp)					\n\
 383.146 ++	stq	$0, 1*8($sp)					\n\
 383.147 ++	stq	$1, 2*8($sp)					\n\
 383.148 ++	stq	$2, 3*8($sp)					\n\
 383.149 ++	stq	$3, 4*8($sp)					\n\
 383.150 ++	stq	$4, 5*8($sp)					\n\
 383.151 ++	stq	$5, 6*8($sp)					\n\
 383.152 ++	stq	$6, 7*8($sp)					\n\
 383.153 ++	stq	$7, 8*8($sp)					\n\
 383.154 ++	stq	$8, 9*8($sp)					\n\
 383.155 ++	stq	$16, 10*8($sp)					\n\
 383.156 ++	stq	$17, 11*8($sp)					\n\
 383.157 ++	stq	$18, 12*8($sp)					\n\
 383.158 ++	stq	$19, 13*8($sp)					\n\
 383.159 ++	stq	$20, 14*8($sp)					\n\
 383.160 ++	stq	$21, 15*8($sp)					\n\
 383.161 ++	stq	$22, 16*8($sp)					\n\
 383.162 ++	stq	$23, 17*8($sp)					\n\
 383.163 ++	stq	$24, 18*8($sp)					\n\
 383.164 ++	stq	$25, 19*8($sp)					\n\
 383.165 ++	stq	$29, 20*8($sp)					\n\
 383.166 ++	stt	$f0, 21*8($sp)					\n\
 383.167 ++	stt	$f1, 22*8($sp)					\n\
 383.168 ++	stt	$f10, 23*8($sp)					\n\
 383.169 ++	stt	$f11, 24*8($sp)					\n\
 383.170 ++	stt	$f12, 25*8($sp)					\n\
 383.171 ++	stt	$f13, 26*8($sp)					\n\
 383.172 ++	stt	$f14, 27*8($sp)					\n\
 383.173 ++	stt	$f15, 28*8($sp)					\n\
 383.174 ++	stt	$f16, 29*8($sp)					\n\
 383.175 ++	stt	$f17, 30*8($sp)					\n\
 383.176 ++	stt	$f18, 31*8($sp)					\n\
 383.177 ++	stt	$f19, 32*8($sp)					\n\
 383.178 ++	stt	$f20, 33*8($sp)					\n\
 383.179 ++	stt	$f21, 34*8($sp)					\n\
 383.180 ++	stt	$f22, 35*8($sp)					\n\
 383.181 ++	stt	$f23, 36*8($sp)					\n\
 383.182 ++	stt	$f24, 37*8($sp)					\n\
 383.183 ++	stt	$f25, 38*8($sp)					\n\
 383.184 ++	stt	$f26, 39*8($sp)					\n\
 383.185 ++	stt	$f27, 40*8($sp)					\n\
 383.186 ++	stt	$f28, 41*8($sp)					\n\
 383.187 ++	stt	$f29, 42*8($sp)					\n\
 383.188 ++	stt	$f30, 43*8($sp)					\n\
 383.189 ++	.mask	0x27ff01ff, -44*8				\n\
 383.190 ++	.fmask	0xfffffc03, -(44-21)*8				\n\
 383.191 ++	/* Set up our $gp */					\n\
 383.192 ++	br	$gp, .+4					\n\
 383.193 ++	ldgp	$gp, 0($gp)					\n\
 383.194 ++	.prologue 0						\n\
 383.195 ++	/* Set up the arguments for fixup: */			\n\
 383.196 ++	/* $16 = link_map out of plt0 */			\n\
 383.197 ++	/* $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 */\n\
 383.198 ++	/* $18 = return address */				\n\
 383.199 ++	subq	$28, $27, $17					\n\
 383.200 ++	ldq	$16, 8($27)					\n\
 383.201 ++	subq	$17, 20, $17					\n\
 383.202 ++	mov	$26, $18					\n\
 383.203 ++	addq	$17, $17, $17					\n\
 383.204 ++	/* Do the fixup */					\n\
 383.205 ++	bsr	$26, " ASM_ALPHA_NG_SYMBOL_PREFIX #fixup_name "..ng\n\
 383.206 ++	/* Move the destination address into position.  */	\n\
 383.207 ++	mov	$0, $27						\n\
 383.208 ++	/* Restore program registers.  */			\n\
 383.209 ++	ldq	$26, 0*8($sp)					\n\
 383.210 ++	ldq	$0, 1*8($sp)					\n\
 383.211 ++	ldq	$1, 2*8($sp)					\n\
 383.212 ++	ldq	$2, 3*8($sp)					\n\
 383.213 ++	ldq	$3, 4*8($sp)					\n\
 383.214 ++	ldq	$4, 5*8($sp)					\n\
 383.215 ++	ldq	$5, 6*8($sp)					\n\
 383.216 ++	ldq	$6, 7*8($sp)					\n\
 383.217 ++	ldq	$7, 8*8($sp)					\n\
 383.218 ++	ldq	$8, 9*8($sp)					\n\
 383.219 ++	ldq	$16, 10*8($sp)					\n\
 383.220 ++	ldq	$17, 11*8($sp)					\n\
 383.221 ++	ldq	$18, 12*8($sp)					\n\
 383.222 ++	ldq	$19, 13*8($sp)					\n\
 383.223 ++	ldq	$20, 14*8($sp)					\n\
 383.224 ++	ldq	$21, 15*8($sp)					\n\
 383.225 ++	ldq	$22, 16*8($sp)					\n\
 383.226 ++	ldq	$23, 17*8($sp)					\n\
 383.227 ++	ldq	$24, 18*8($sp)					\n\
 383.228 ++	ldq	$25, 19*8($sp)					\n\
 383.229 ++	ldq	$29, 20*8($sp)					\n\
 383.230 ++	ldt	$f0, 21*8($sp)					\n\
 383.231 ++	ldt	$f1, 22*8($sp)					\n\
 383.232 ++	ldt	$f10, 23*8($sp)					\n\
 383.233 ++	ldt	$f11, 24*8($sp)					\n\
 383.234 ++	ldt	$f12, 25*8($sp)					\n\
 383.235 ++	ldt	$f13, 26*8($sp)					\n\
 383.236 ++	ldt	$f14, 27*8($sp)					\n\
 383.237 ++	ldt	$f15, 28*8($sp)					\n\
 383.238 ++	ldt	$f16, 29*8($sp)					\n\
 383.239 ++	ldt	$f17, 30*8($sp)					\n\
 383.240 ++	ldt	$f18, 31*8($sp)					\n\
 383.241 ++	ldt	$f19, 32*8($sp)					\n\
 383.242 ++	ldt	$f20, 33*8($sp)					\n\
 383.243 ++	ldt	$f21, 34*8($sp)					\n\
 383.244 ++	ldt	$f22, 35*8($sp)					\n\
 383.245 ++	ldt	$f23, 36*8($sp)					\n\
 383.246 ++	ldt	$f24, 37*8($sp)					\n\
 383.247 ++	ldt	$f25, 38*8($sp)					\n\
 383.248 ++	ldt	$f26, 39*8($sp)					\n\
 383.249 ++	ldt	$f27, 40*8($sp)					\n\
 383.250 ++	ldt	$f28, 41*8($sp)					\n\
 383.251 ++	ldt	$f29, 42*8($sp)					\n\
 383.252 ++	ldt	$f30, 43*8($sp)					\n\
 383.253 ++	/* Flush the Icache after having modified the .plt code.  */\n\
 383.254 ++	" #IMB "						\n\
 383.255 ++	/* Clean up and turn control to the destination */	\n\
 383.256 ++	lda	$sp, 44*8($sp)					\n\
 383.257 ++	jmp	$31, ($27)					\n\
 383.258 + 	.end " #tramp_name)
 383.259 + 
 383.260 + #ifndef PROF
 383.261 +@@ -292,85 +294,87 @@
 383.262 +    its return value is the user program's entry point.  */
 383.263 + 
 383.264 + #define RTLD_START asm ("\
 383.265 +-.text
 383.266 +-	.set at
 383.267 +-	.globl _start
 383.268 +-	.ent _start
 383.269 +-_start:
 383.270 +-	br	$gp, 0f
 383.271 +-0:	ldgp	$gp, 0($gp)
 383.272 +-	.prologue 0
 383.273 +-	/* Pass pointer to argument block to _dl_start.  */
 383.274 +-	mov	$sp, $16
 383.275 +-	bsr	$26, "ASM_ALPHA_NG_SYMBOL_PREFIX"_dl_start..ng
 383.276 +-	.end _start
 383.277 +-	/* FALLTHRU */
 383.278 +-	.globl _dl_start_user
 383.279 +-	.ent _dl_start_user
 383.280 +-_dl_start_user:
 383.281 +-	.frame $30,0,$31,0
 383.282 +-	.prologue 0
 383.283 +-	/* Save the user entry point address in s0.  */
 383.284 +-	mov	$0, $9
 383.285 +-	/* Store the highest stack address.  */
 383.286 +-	stq	$30, __libc_stack_end
 383.287 +-	/* See if we were run as a command with the executable file
 383.288 +-	   name as an extra leading argument.  */
 383.289 +-	ldl	$1, _dl_skip_args
 383.290 +-	bne	$1, $fixup_stack
 383.291 +-$fixup_stack_ret:
 383.292 +-	/* The special initializer gets called with the stack just
 383.293 +-	   as the application's entry point will see it; it can
 383.294 +-	   switch stacks if it moves these contents over.  */
 383.295 +-" RTLD_START_SPECIAL_INIT "
 383.296 +-	/* Call _dl_init(_dl_loaded, argc, argv, envp) to run initializers.  */
 383.297 +-	ldq	$16, _dl_loaded
 383.298 +-	ldq	$17, 0($sp)
 383.299 +-	lda	$18, 8($sp)
 383.300 +-	s8addq	$17, 8, $19
 383.301 +-	addq	$19, $18, $19
 383.302 +-	jsr	$26, _dl_init
 383.303 +-	/* Pass our finalizer function to the user in $0. */
 383.304 +-	lda	$0, _dl_fini
 383.305 +-	/* Jump to the user's entry point.  */
 383.306 +-	mov	$9, $27
 383.307 +-	jmp	($9)
 383.308 +-$fixup_stack:
 383.309 +-	/* Adjust the stack pointer to skip _dl_skip_args words.  This
 383.310 +-	   involves copying everything down, since the stack pointer must
 383.311 +-	   always be 16-byte aligned.  */
 383.312 +-	ldq	$2, 0($sp)
 383.313 +-	ldq	$5, _dl_argv
 383.314 +-	subq	$31, $1, $6
 383.315 +-	subq	$2, $1, $2
 383.316 +-	s8addq	$6, $5, $5
 383.317 +-	mov	$sp, $4
 383.318 +-	s8addq	$1, $sp, $3
 383.319 +-	stq	$2, 0($sp)
 383.320 +-	stq	$5, _dl_argv
 383.321 +-	/* Copy down argv.  */
 383.322 +-0:	ldq	$5, 8($3)
 383.323 +-	addq	$4, 8, $4
 383.324 +-	addq	$3, 8, $3
 383.325 +-	stq	$5, 0($4)
 383.326 +-	bne	$5, 0b
 383.327 +-	/* Copy down envp.  */
 383.328 +-1:	ldq	$5, 8($3)
 383.329 +-	addq	$4, 8, $4
 383.330 +-	addq	$3, 8, $3
 383.331 +-	stq	$5, 0($4)
 383.332 +-	bne	$5, 1b
 383.333 +-	/* Copy down auxiliary table.  */
 383.334 +-2:	ldq	$5, 8($3)
 383.335 +-	ldq	$6, 16($3)
 383.336 +-	addq	$4, 16, $4
 383.337 +-	addq	$3, 16, $3
 383.338 +-	stq	$5, -8($4)
 383.339 +-	stq	$6, 0($4)
 383.340 +-	bne	$5, 2b
 383.341 +-	br	$fixup_stack_ret
 383.342 +-	.end _dl_start_user
 383.343 +-	.set noat
 383.344 ++.text								\n\
 383.345 ++	.set at							\n\
 383.346 ++	.globl _start						\n\
 383.347 ++	.ent _start						\n\
 383.348 ++_start:								\n\
 383.349 ++	br	$gp, 0f						\n\
 383.350 ++0:	ldgp	$gp, 0($gp)					\n\
 383.351 ++	.prologue 0						\n\
 383.352 ++	/* Pass pointer to argument block to _dl_start.  */	\n\
 383.353 ++	mov	$sp, $16					\n\
 383.354 ++	bsr	$26, "ASM_ALPHA_NG_SYMBOL_PREFIX"_dl_start..ng	\n\
 383.355 ++	.end _start						\n\
 383.356 ++	/* FALLTHRU */						\n\
 383.357 ++	.globl _dl_start_user					\n\
 383.358 ++	.ent _dl_start_user					\n\
 383.359 ++_dl_start_user:							\n\
 383.360 ++	.frame $30,0,$31,0					\n\
 383.361 ++	.prologue 0						\n\
 383.362 ++	/* Save the user entry point address in s0.  */		\n\
 383.363 ++	mov	$0, $9						\n\
 383.364 ++	/* Store the highest stack address.  */			\n\
 383.365 ++	stq	$30, __libc_stack_end				\n\
 383.366 ++	/* See if we were run as a command with the executable	\n\
 383.367 ++	   file name as an extra leading argument.  */		\n\
 383.368 ++	ldl	$1, _dl_skip_args				\n\
 383.369 ++	bne	$1, $fixup_stack				\n\
 383.370 ++$fixup_stack_ret:						\n\
 383.371 ++	/* The special initializer gets called with the stack	\n\
 383.372 ++	   just as the application's entry point will see it;	\n\
 383.373 ++	   it can switch stacks if it moves these contents	\n\
 383.374 ++	   over.  */						\n\
 383.375 ++" RTLD_START_SPECIAL_INIT "					\n\
 383.376 ++	/* Call _dl_init(_dl_loaded, argc, argv, envp) to run	\n\
 383.377 ++	   initializers.  */					\n\
 383.378 ++	ldq	$16, _dl_loaded					\n\
 383.379 ++	ldq	$17, 0($sp)					\n\
 383.380 ++	lda	$18, 8($sp)					\n\
 383.381 ++	s8addq	$17, 8, $19					\n\
 383.382 ++	addq	$19, $18, $19					\n\
 383.383 ++	jsr	$26, _dl_init					\n\
 383.384 ++	/* Pass our finalizer function to the user in $0. */	\n\
 383.385 ++	lda	$0, _dl_fini					\n\
 383.386 ++	/* Jump to the user's entry point.  */			\n\
 383.387 ++	mov	$9, $27						\n\
 383.388 ++	jmp	($9)						\n\
 383.389 ++$fixup_stack:							\n\
 383.390 ++	/* Adjust the stack pointer to skip _dl_skip_args words.\n\
 383.391 ++	   This involves copying everything down, since the	\n\
 383.392 ++	   stack pointer must always be 16-byte aligned.  */	\n\
 383.393 ++	ldq	$2, 0($sp)					\n\
 383.394 ++	ldq	$5, _dl_argv					\n\
 383.395 ++	subq	$31, $1, $6					\n\
 383.396 ++	subq	$2, $1, $2					\n\
 383.397 ++	s8addq	$6, $5, $5					\n\
 383.398 ++	mov	$sp, $4						\n\
 383.399 ++	s8addq	$1, $sp, $3					\n\
 383.400 ++	stq	$2, 0($sp)					\n\
 383.401 ++	stq	$5, _dl_argv					\n\
 383.402 ++	/* Copy down argv.  */					\n\
 383.403 ++0:	ldq	$5, 8($3)					\n\
 383.404 ++	addq	$4, 8, $4					\n\
 383.405 ++	addq	$3, 8, $3					\n\
 383.406 ++	stq	$5, 0($4)					\n\
 383.407 ++	bne	$5, 0b						\n\
 383.408 ++	/* Copy down envp.  */					\n\
 383.409 ++1:	ldq	$5, 8($3)					\n\
 383.410 ++	addq	$4, 8, $4					\n\
 383.411 ++	addq	$3, 8, $3					\n\
 383.412 ++	stq	$5, 0($4)					\n\
 383.413 ++	bne	$5, 1b						\n\
 383.414 ++	/* Copy down auxiliary table.  */			\n\
 383.415 ++2:	ldq	$5, 8($3)					\n\
 383.416 ++	ldq	$6, 16($3)					\n\
 383.417 ++	addq	$4, 16, $4					\n\
 383.418 ++	addq	$3, 16, $3					\n\
 383.419 ++	stq	$5, -8($4)					\n\
 383.420 ++	stq	$6, 0($4)					\n\
 383.421 ++	bne	$5, 2b						\n\
 383.422 ++	br	$fixup_stack_ret				\n\
 383.423 ++	.end _dl_start_user					\n\
 383.424 ++	.set noat						\n\
 383.425 + .previous");
 383.426 + 
 383.427 + #ifndef RTLD_START_SPECIAL_INIT
   384.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   384.2 +++ b/patches/glibc/2.2.5/dl-machine-arm.patch	Sat Feb 24 11:00:05 2007 +0000
   384.3 @@ -0,0 +1,389 @@
   384.4 +Fixes error:
   384.5 +In file included from dynamic-link.h:21,
   384.6 +                 from dl-load.c:32:
   384.7 +../sysdeps/arm/dl-machine.h:124:25: missing terminating " character
   384.8 +...
   384.9 +make[2]: *** [/crosstool-0.22/build/arm-unknown-linux-gnu/gcc-3.3-glibc-2.2.5/build-glibc/elf/dl-load.o] Error 1
  384.10 +
  384.11 +The first two hunks of 
  384.12 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/arm/dl-machine.h.diff?r1=1.39&r2=1.40&cvsroot=glibc
  384.13 +applied cleanly, but the third hunk didn't, so I just added the \n\'s by hand for that section.
  384.14 +
  384.15 +--- glibc-2.2.5/sysdeps/arm/dl-machine.h.orig	Sat Sep  8 14:31:40 2001
  384.16 ++++ glibc-2.2.5/sysdeps/arm/dl-machine.h	Wed Aug 27 10:55:26 2003
  384.17 +@@ -121,14 +121,15 @@
  384.18 +    and then redirect to the address it returns.  */
  384.19 +    // macro for handling PIC situation....
  384.20 + #ifdef PIC
  384.21 +-#define CALL_ROUTINE(x) " ldr sl,0f
  384.22 +-	add 	sl, pc, sl
  384.23 +-1:	ldr	r2, 2f
  384.24 +-	mov	lr, pc
  384.25 +-	add	pc, sl, r2
  384.26 +-	b	3f
  384.27 +-0:	.word	_GLOBAL_OFFSET_TABLE_ - 1b - 4
  384.28 +-2:	.word " #x "(GOTOFF)
  384.29 ++#define CALL_ROUTINE(x) "\
  384.30 ++	ldr sl,0f\n\
  384.31 ++	add 	sl, pc, sl\n\
  384.32 ++1:	ldr	r2, 2f\n\
  384.33 ++	mov	lr, pc\n\
  384.34 ++	add	pc, sl, r2\n\
  384.35 ++	b	3f\n\
  384.36 ++0:	.word	_GLOBAL_OFFSET_TABLE_ - 1b - 4\n\
  384.37 ++2:	.word " #x "(GOTOFF)\n\
  384.38 + 3:	"
  384.39 + #else
  384.40 + #define CALL_ROUTINE(x) " bl " #x
  384.41 +@@ -136,114 +137,114 @@
  384.42 + 
  384.43 + #ifndef PROF
  384.44 + # define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
  384.45 +-	.text
  384.46 +-	.globl _dl_runtime_resolve
  384.47 +-	.type _dl_runtime_resolve, #function
  384.48 +-	.align 2
  384.49 +-_dl_runtime_resolve:
  384.50 +-	@ we get called with
  384.51 +-	@ 	stack[0] contains the return address from this call
  384.52 +-	@	ip contains &GOT[n+3] (pointer to function)
  384.53 +-	@	lr points to &GOT[2]
  384.54 +-
  384.55 +-	@ save almost everything; lr is already on the stack
  384.56 +-	stmdb	sp!,{r0-r3,sl,fp}
  384.57 +-
  384.58 +-	@ prepare to call fixup()
  384.59 +-	@ change &GOT[n+3] into 8*n        NOTE: reloc are 8 bytes each
  384.60 +-	sub	r1, ip, lr
  384.61 +-	sub	r1, r1, #4
  384.62 +-	add	r1, r1, r1
  384.63 +-
  384.64 +-	@ get pointer to linker struct
  384.65 +-	ldr	r0, [lr, #-4]
  384.66 +-
  384.67 +-	@ call fixup routine
  384.68 +-	" CALL_ROUTINE(fixup) "
  384.69 +-
  384.70 +-	@ save the return
  384.71 +-	mov	ip, r0
  384.72 +-
  384.73 +-	@ restore the stack
  384.74 +-	ldmia	sp!,{r0-r3,sl,fp,lr}
  384.75 +-
  384.76 +-	@ jump to the newly found address
  384.77 +-	mov	pc, ip
  384.78 +-
  384.79 +-	.size _dl_runtime_resolve, .-_dl_runtime_resolve
  384.80 +-
  384.81 +-	.globl _dl_runtime_profile
  384.82 +-	.type _dl_runtime_profile, #function
  384.83 +-	.align 2
  384.84 +-_dl_runtime_profile:
  384.85 +-	@ save almost everything; lr is already on the stack
  384.86 +-	stmdb	sp!,{r0-r3,sl,fp}
  384.87 +-
  384.88 +-	@ prepare to call fixup()
  384.89 +-	@ change &GOT[n+3] into 8*n        NOTE: reloc are 8 bytes each
  384.90 +-	sub	r1, ip, lr
  384.91 +-	sub	r1, r1, #4
  384.92 +-	add	r1, r1, r1
  384.93 +-
  384.94 +-	@ get pointer to linker struct
  384.95 +-	ldr	r0, [lr, #-4]
  384.96 +-
  384.97 +-	@ call profiling fixup routine
  384.98 +-	" CALL_ROUTINE(profile_fixup) "
  384.99 +-
 384.100 +-	@ save the return
 384.101 +-	mov	ip, r0
 384.102 +-
 384.103 +-	@ restore the stack
 384.104 +-	ldmia	sp!,{r0-r3,sl,fp,lr}
 384.105 +-
 384.106 +-	@ jump to the newly found address
 384.107 +-	mov	pc, ip
 384.108 +-
 384.109 +-	.size _dl_runtime_resolve, .-_dl_runtime_resolve
 384.110 +-	.previous
 384.111 ++	.text\n\
 384.112 ++	.globl _dl_runtime_resolve\n\
 384.113 ++	.type _dl_runtime_resolve, #function\n\
 384.114 ++	.align 2\n\
 384.115 ++_dl_runtime_resolve:\n\
 384.116 ++	@ we get called with\n\
 384.117 ++	@ 	stack[0] contains the return address from this call\n\
 384.118 ++	@	ip contains &GOT[n+3] (pointer to function)\n\
 384.119 ++	@	lr points to &GOT[2]\n\
 384.120 ++\n\
 384.121 ++	@ save almost everything; lr is already on the stack\n\
 384.122 ++	stmdb	sp!,{r0-r3,sl,fp}\n\
 384.123 ++\n\
 384.124 ++	@ prepare to call fixup()\n\
 384.125 ++	@ change &GOT[n+3] into 8*n        NOTE: reloc are 8 bytes each\n\
 384.126 ++	sub	r1, ip, lr\n\
 384.127 ++	sub	r1, r1, #4\n\
 384.128 ++	add	r1, r1, r1\n\
 384.129 ++\n\
 384.130 ++	@ get pointer to linker struct\n\
 384.131 ++	ldr	r0, [lr, #-4]\n\
 384.132 ++\n\
 384.133 ++	@ call fixup routine\n\
 384.134 ++	" CALL_ROUTINE(fixup) "\n\
 384.135 ++\n\
 384.136 ++	@ save the return\n\
 384.137 ++	mov	ip, r0\n\
 384.138 ++\n\
 384.139 ++	@ restore the stack\n\
 384.140 ++	ldmia	sp!,{r0-r3,sl,fp,lr}\n\
 384.141 ++\n\
 384.142 ++	@ jump to the newly found address\n\
 384.143 ++	mov	pc, ip\n\
 384.144 ++\n\
 384.145 ++	.size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
 384.146 ++\n\
 384.147 ++	.globl _dl_runtime_profile\n\
 384.148 ++	.type _dl_runtime_profile, #function\n\
 384.149 ++	.align 2\n\
 384.150 ++_dl_runtime_profile:\n\
 384.151 ++	@ save almost everything; lr is already on the stack\n\
 384.152 ++	stmdb	sp!,{r0-r3,sl,fp}\n\
 384.153 ++\n\
 384.154 ++	@ prepare to call fixup()\n\
 384.155 ++	@ change &GOT[n+3] into 8*n        NOTE: reloc are 8 bytes each\n\
 384.156 ++	sub	r1, ip, lr\n\
 384.157 ++	sub	r1, r1, #4\n\
 384.158 ++	add	r1, r1, r1\n\
 384.159 ++\n\
 384.160 ++	@ get pointer to linker struct\n\
 384.161 ++	ldr	r0, [lr, #-4]\n\
 384.162 ++\n\
 384.163 ++	@ call profiling fixup routine\n\
 384.164 ++	" CALL_ROUTINE(profile_fixup) "\n\
 384.165 ++\n\
 384.166 ++	@ save the return\n\
 384.167 ++	mov	ip, r0\n\
 384.168 ++\n\
 384.169 ++	@ restore the stack\n\
 384.170 ++	ldmia	sp!,{r0-r3,sl,fp,lr}\n\
 384.171 ++\n\
 384.172 ++	@ jump to the newly found address\n\
 384.173 ++	mov	pc, ip\n\
 384.174 ++\n\
 384.175 ++	.size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
 384.176 ++	.previous\n\
 384.177 + ");
 384.178 + #else // PROF
 384.179 + # define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
 384.180 +-	.text
 384.181 +-	.globl _dl_runtime_resolve
 384.182 +-	.globl _dl_runtime_profile
 384.183 +-	.type _dl_runtime_resolve, #function
 384.184 +-	.type _dl_runtime_profile, #function
 384.185 +-	.align 2
 384.186 +-_dl_runtime_resolve:
 384.187 +-_dl_runtime_profile:
 384.188 +-	@ we get called with
 384.189 +-	@ 	stack[0] contains the return address from this call
 384.190 +-	@	ip contains &GOT[n+3] (pointer to function)
 384.191 +-	@	lr points to &GOT[2]
 384.192 +-
 384.193 +-	@ save almost everything; return add is already on the stack
 384.194 +-	stmdb	sp!,{r0-r3,sl,fp}
 384.195 +-
 384.196 +-	@ prepare to call fixup()
 384.197 +-	@ change &GOT[n+3] into 8*n        NOTE: reloc are 8 bytes each
 384.198 +-	sub	r1, ip, lr
 384.199 +-	sub	r1, r1, #4
 384.200 +-	add	r1, r1, r1
 384.201 +-
 384.202 +-	@ get pointer to linker struct
 384.203 +-	ldr	r0, [lr, #-4]
 384.204 +-
 384.205 +-	@ call profiling fixup routine
 384.206 +-	" CALL_ROUTINE(fixup) "
 384.207 +-
 384.208 +-	@ save the return
 384.209 +-	mov	ip, r0
 384.210 +-
 384.211 +-	@ restore the stack
 384.212 +-	ldmia	sp!,{r0-r3,sl,fp,lr}
 384.213 +-
 384.214 +-	@ jump to the newly found address
 384.215 +-	mov	pc, ip
 384.216 +-
 384.217 +-	.size _dl_runtime_profile, .-_dl_runtime_profile
 384.218 +-	.previous
 384.219 ++	.text\n\
 384.220 ++	.globl _dl_runtime_resolve\n\
 384.221 ++	.globl _dl_runtime_profile\n\
 384.222 ++	.type _dl_runtime_resolve, #function\n\
 384.223 ++	.type _dl_runtime_profile, #function\n\
 384.224 ++	.align 2\n\
 384.225 ++_dl_runtime_resolve:\n\
 384.226 ++_dl_runtime_profile:\n\
 384.227 ++	@ we get called with\n\
 384.228 ++	@ 	stack[0] contains the return address from this call\n\
 384.229 ++	@	ip contains &GOT[n+3] (pointer to function)\n\
 384.230 ++	@	lr points to &GOT[2]\n\
 384.231 ++\n\
 384.232 ++	@ save almost everything; return add is already on the stack\n\
 384.233 ++	stmdb	sp!,{r0-r3,sl,fp}\n\
 384.234 ++\n\
 384.235 ++	@ prepare to call fixup()\n\
 384.236 ++	@ change &GOT[n+3] into 8*n        NOTE: reloc are 8 bytes each\n\
 384.237 ++	sub	r1, ip, lr\n\
 384.238 ++	sub	r1, r1, #4\n\
 384.239 ++	add	r1, r1, r1\n\
 384.240 ++\n\
 384.241 ++	@ get pointer to linker struct\n\
 384.242 ++	ldr	r0, [lr, #-4]\n\
 384.243 ++\n\
 384.244 ++	@ call profiling fixup routine\n\
 384.245 ++	" CALL_ROUTINE(fixup) "\n\
 384.246 ++\n\
 384.247 ++	@ save the return\n\
 384.248 ++	mov	ip, r0\n\
 384.249 ++\n\
 384.250 ++	@ restore the stack\n\
 384.251 ++	ldmia	sp!,{r0-r3,sl,fp,lr}\n\
 384.252 ++\n\
 384.253 ++	@ jump to the newly found address\n\
 384.254 ++	mov	pc, ip\n\
 384.255 ++\n\
 384.256 ++	.size _dl_runtime_profile, .-_dl_runtime_profile\n\
 384.257 ++	.previous\n\
 384.258 + ");
 384.259 + #endif //PROF
 384.260 + 
 384.261 +@@ -256,70 +257,70 @@
 384.262 +    its return value is the user program's entry point.  */
 384.263 + 
 384.264 + #define RTLD_START asm ("\
 384.265 +-.text
 384.266 +-.globl _start
 384.267 +-.globl _dl_start_user
 384.268 +-_start:
 384.269 +-	@ at start time, all the args are on the stack
 384.270 +-	mov	r0, sp
 384.271 +-	bl	_dl_start
 384.272 +-	@ returns user entry point in r0
 384.273 +-_dl_start_user:
 384.274 +-	mov	r6, r0
 384.275 +-	@ we are PIC code, so get global offset table
 384.276 +-	ldr	sl, .L_GET_GOT
 384.277 +-	add	sl, pc, sl
 384.278 +-.L_GOT_GOT:
 384.279 +-	@ Store the highest stack address
 384.280 +-	ldr	r1, .L_STACK_END
 384.281 +-	ldr	r1, [sl, r1]
 384.282 +-	str	sp, [r1]
 384.283 +-	@ See if we were run as a command with the executable file
 384.284 +-	@ name as an extra leading argument.
 384.285 +-	ldr	r4, .L_SKIP_ARGS
 384.286 +-	ldr	r4, [sl, r4]
 384.287 +-	@ get the original arg count
 384.288 +-	ldr	r1, [sp]
 384.289 +-	@ subtract _dl_skip_args from it
 384.290 +-	sub	r1, r1, r4
 384.291 +-	@ adjust the stack pointer to skip them
 384.292 +-	add	sp, sp, r4, lsl #2
 384.293 +-	@ get the argv address
 384.294 +-	add	r2, sp, #4
 384.295 +-	@ store the new argc in the new stack location
 384.296 +-	str	r1, [sp]
 384.297 +-	@ compute envp
 384.298 +-	add	r3, r2, r1, lsl #2
 384.299 +-	add	r3, r3, #4
 384.300 +-
 384.301 +-	@ now we call _dl_init
 384.302 +-	ldr	r0, .L_LOADED
 384.303 +-	ldr	r0, [sl, r0]
 384.304 +-	ldr	r0, [r0]
 384.305 +-	@ call _dl_init
 384.306 +-	bl	_dl_init(PLT)
 384.307 +-	@ clear the startup flag
 384.308 +-	ldr	r2, .L_STARTUP_FLAG
 384.309 +-	ldr	r1, [sl, r2]
 384.310 +-	mov	r0, #0
 384.311 +-	str	r0, [r1]
 384.312 +-	@ load the finalizer function
 384.313 +-	ldr	r0, .L_FINI_PROC
 384.314 +-	ldr	r0, [sl, r0]
 384.315 +-	@ jump to the user_s entry point
 384.316 +-	mov	pc, r6
 384.317 +-.L_GET_GOT:
 384.318 ++.text\n\
 384.319 ++.globl _start\n\
 384.320 ++.globl _dl_start_user\n\
 384.321 ++_start:\n\
 384.322 ++	@ at start time, all the args are on the stack\n\
 384.323 ++	mov	r0, sp\n\
 384.324 ++	bl	_dl_start\n\
 384.325 ++	@ returns user entry point in r0\n\
 384.326 ++_dl_start_user:\n\
 384.327 ++	mov	r6, r0\n\
 384.328 ++	@ we are PIC code, so get global offset table\n\
 384.329 ++	ldr	sl, .L_GET_GOT\n\
 384.330 ++	add	sl, pc, sl\n\
 384.331 ++.L_GOT_GOT:\n\
 384.332 ++	@ Store the highest stack address\n\
 384.333 ++	ldr	r1, .L_STACK_END\n\
 384.334 ++	ldr	r1, [sl, r1]\n\
 384.335 ++	str	sp, [r1]\n\
 384.336 ++	@ See if we were run as a command with the executable file\n\
 384.337 ++	@ name as an extra leading argument.\n\
 384.338 ++	ldr	r4, .L_SKIP_ARGS\n\
 384.339 ++	ldr	r4, [sl, r4]\n\
 384.340 ++	@ get the original arg count\n\
 384.341 ++	ldr	r1, [sp]\n\
 384.342 ++	@ subtract _dl_skip_args from it\n\
 384.343 ++	sub	r1, r1, r4\n\
 384.344 ++	@ adjust the stack pointer to skip them\n\
 384.345 ++	add	sp, sp, r4, lsl #2\n\
 384.346 ++	@ get the argv address\n\
 384.347 ++	add	r2, sp, #4\n\
 384.348 ++	@ store the new argc in the new stack location\n\
 384.349 ++	str	r1, [sp]\n\
 384.350 ++	@ compute envp\n\
 384.351 ++	add	r3, r2, r1, lsl #2\n\
 384.352 ++	add	r3, r3, #4\n\
 384.353 ++\n\
 384.354 ++	@ now we call _dl_init\n\
 384.355 ++	ldr	r0, .L_LOADED\n\
 384.356 ++	ldr	r0, [sl, r0]\n\
 384.357 ++	ldr	r0, [r0]\n\
 384.358 ++	@ call _dl_init\n\
 384.359 ++	bl	_dl_init(PLT)\n\
 384.360 ++	@ clear the startup flag\n\
 384.361 ++	ldr	r2, .L_STARTUP_FLAG\n\
 384.362 ++	ldr	r1, [sl, r2]\n\
 384.363 ++	mov	r0, #0\n\
 384.364 ++	str	r0, [r1]\n\
 384.365 ++	@ load the finalizer function\n\
 384.366 ++	ldr	r0, .L_FINI_PROC\n\
 384.367 ++	ldr	r0, [sl, r0]\n\
 384.368 ++	@ jump to the user_s entry point\n\
 384.369 ++	mov	pc, r6\n\
 384.370 ++.L_GET_GOT:\n\
 384.371 + 	.word	_GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4	\n\
 384.372 + .L_SKIP_ARGS:					\n\
 384.373 + 	.word	_dl_skip_args(GOTOFF)		\n\
 384.374 +-.L_STARTUP_FLAG:
 384.375 +-	.word	_dl_starting_up(GOT)
 384.376 +-.L_FINI_PROC:
 384.377 +-	.word	_dl_fini(GOT)
 384.378 +-.L_STACK_END:
 384.379 +-	.word	__libc_stack_end(GOT)
 384.380 +-.L_LOADED:
 384.381 +-	.word	_dl_loaded(GOT)
 384.382 ++.L_STARTUP_FLAG:\n\
 384.383 ++	.word	_dl_starting_up(GOT)\n\
 384.384 ++.L_FINI_PROC:\n\
 384.385 ++	.word	_dl_fini(GOT)\n\
 384.386 ++.L_STACK_END:\n\
 384.387 ++	.word	__libc_stack_end(GOT)\n\
 384.388 ++.L_LOADED:\n\
 384.389 ++	.word	_dl_loaded(GOT)\n\
 384.390 + .previous\n\
 384.391 + ");
 384.392 + 
   385.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   385.2 +++ b/patches/glibc/2.2.5/dl-machine-m68k.patch	Sat Feb 24 11:00:05 2007 +0000
   385.3 @@ -0,0 +1,206 @@
   385.4 +Retrieved with
   385.5 + wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/m68k/dl-machine.h.diff?r1=1.53&r2=1.55&cvsroot=glibc'
   385.6 +
   385.7 +Fixes error
   385.8 +
   385.9 +In file included from dynamic-link.h:21,
  385.10 +                 from dl-load.c:32:
  385.11 +../sysdeps/m68k/dl-machine.h:108: error: parse error before '.' token
  385.12 +../sysdeps/m68k/dl-machine.h:109: error: stray '@' in program
  385.13 +../sysdeps/m68k/dl-machine.h:120: error: syntax error at '#' token
  385.14 +../sysdeps/m68k/dl-machine.h:123: error: stray '\' in program
  385.15 +../sysdeps/m68k/dl-machine.h:123: error: missing terminating " character
  385.16 +../sysdeps/m68k/dl-machine.h:148: error: stray '@' in program
  385.17 +../sysdeps/m68k/dl-machine.h:152: error: syntax error at '#' token
  385.18 +../sysdeps/m68k/dl-machine.h:156: error: stray '@' in program
  385.19 +../sysdeps/m68k/dl-machine.h:161: error: stray '@' in program
  385.20 +../sysdeps/m68k/dl-machine.h:163: error: stray '@' in program
  385.21 +../sysdeps/m68k/dl-machine.h:166: error: stray '@' in program
  385.22 +In file included from dynamic-link.h:21,
  385.23 +                 from dl-load.c:32:
  385.24 +../sysdeps/m68k/dl-machine.h:175:4: invalid preprocessing directive #Call
  385.25 +../sysdeps/m68k/dl-machine.h:179: error: stray '@' in program
  385.26 +../sysdeps/m68k/dl-machine.h:180: error: stray '@' in program
  385.27 +../sysdeps/m68k/dl-machine.h:181: error: syntax error at '#' token
  385.28 +../sysdeps/m68k/dl-machine.h:182: error: syntax error at '#' token
  385.29 +../sysdeps/m68k/dl-machine.h:184: error: stray '@' in program
  385.30 +../sysdeps/m68k/dl-machine.h:187: error: missing terminating ' character
  385.31 +../sysdeps/m68k/dl-machine.h:190: error: missing terminating " character
  385.32 +dl-load.c: In function `_dl_map_object_from_fd':
  385.33 +dl-load.c:1089: warning: use of cast expressions as lvalues is deprecated
  385.34 +dl-load.c:1089: warning: use of cast expressions as lvalues is deprecated
  385.35 +dl-load.c:1109: warning: use of cast expressions as lvalues is deprecated
  385.36 +dl-load.c:1109: warning: use of cast expressions as lvalues is deprecated
  385.37 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc24/build/m68k-unknown-linux-gnu/gcc-3.4.0-glibc-2.2.5/build-glibc/elf/dl-load.o] Error 1
  385.38 +
  385.39 +===================================================================
  385.40 +RCS file: /cvs/glibc/libc/sysdeps/m68k/dl-machine.h,v
  385.41 +retrieving revision 1.53
  385.42 +retrieving revision 1.55
  385.43 +diff -u -r1.53 -r1.55
  385.44 +--- libc/sysdeps/m68k/dl-machine.h	2001/08/26 22:26:36	1.53
  385.45 ++++ libc/sysdeps/m68k/dl-machine.h	2002/02/01 10:28:20	1.55
  385.46 +@@ -1,5 +1,5 @@
  385.47 + /* Machine-dependent ELF dynamic relocation inline functions.  m68k version.
  385.48 +-   Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
  385.49 ++   Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
  385.50 +    This file is part of the GNU C Library.
  385.51 + 
  385.52 +    The GNU C Library is free software; you can redistribute it and/or
  385.53 +@@ -85,11 +85,11 @@
  385.54 + 	{
  385.55 + 	  got[2] = (Elf32_Addr) &_dl_runtime_profile;
  385.56 + 
  385.57 +-	  if (_dl_name_match_p (_dl_profile, l))
  385.58 ++	  if (_dl_name_match_p (GL(dl_profile), l))
  385.59 + 	    {
  385.60 + 	      /* This is the object we are looking for.  Say that we really
  385.61 + 		 want profiling and the timers are started.  */
  385.62 +-	      _dl_profile_map = l;
  385.63 ++	      GL(dl_profile_map) = l;
  385.64 + 	    }
  385.65 + 	}
  385.66 +       else
  385.67 +@@ -104,22 +104,22 @@
  385.68 + /* This code is used in dl-runtime.c to call the `fixup' function
  385.69 +    and then redirect to the address it returns.  */
  385.70 + #define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \
  385.71 +-"| Trampoline for " #fixup_name "
  385.72 +-	.globl " #tramp_name "
  385.73 +-	.type " #tramp_name ", @function
  385.74 +-" #tramp_name ":
  385.75 +-	| Save %a0 (struct return address) and %a1.
  385.76 +-	move.l %a0, -(%sp)
  385.77 +-	move.l %a1, -(%sp)
  385.78 +-	| Call the real address resolver.
  385.79 +-	jbsr " #fixup_name "
  385.80 +-	| Restore register %a0 and %a1.
  385.81 +-	move.l (%sp)+, %a1
  385.82 +-	move.l (%sp)+, %a0
  385.83 +-	| Pop parameters
  385.84 +-	addq.l #8, %sp
  385.85 +-	| Call real function.
  385.86 +-	jmp (%d0)
  385.87 ++"| Trampoline for " #fixup_name "\n\
  385.88 ++	.globl " #tramp_name "\n\
  385.89 ++	.type " #tramp_name ", @function\n\
  385.90 ++" #tramp_name ":\n\
  385.91 ++	| Save %a0 (struct return address) and %a1.\n\
  385.92 ++	move.l %a0, -(%sp)\n\
  385.93 ++	move.l %a1, -(%sp)\n\
  385.94 ++	| Call the real address resolver.\n\
  385.95 ++	jbsr " #fixup_name "\n\
  385.96 ++	| Restore register %a0 and %a1.\n\
  385.97 ++	move.l (%sp)+, %a1\n\
  385.98 ++	move.l (%sp)+, %a0\n\
  385.99 ++	| Pop parameters\n\
 385.100 ++	addq.l #8, %sp\n\
 385.101 ++	| Call real function.\n\
 385.102 ++	jmp (%d0)\n\
 385.103 + 	.size " #tramp_name ", . - " #tramp_name "\n"
 385.104 + #ifndef PROF
 385.105 + #define ELF_MACHINE_RUNTIME_TRAMPOLINE \
 385.106 +@@ -143,50 +143,50 @@
 385.107 +    its return value is the user program's entry point.  */
 385.108 + 
 385.109 + #define RTLD_START asm ("\
 385.110 +-	.text
 385.111 +-	.globl _start
 385.112 +-	.type _start,@function
 385.113 +-_start:
 385.114 +-	move.l %sp, -(%sp)
 385.115 +-	jbsr _dl_start
 385.116 +-	addq.l #4, %sp
 385.117 +-	/* FALLTHRU */
 385.118 +-
 385.119 +-	.globl _dl_start_user
 385.120 +-	.type _dl_start_user,@function
 385.121 +-_dl_start_user:
 385.122 +-	| Save the user entry point address in %a4.
 385.123 +-	move.l %d0, %a4
 385.124 +-	| Point %a5 at the GOT.
 385.125 +-	lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5
 385.126 +-	| Remember the highest stack address.
 385.127 +-	move.l %sp, ([__libc_stack_end@GOT.w, %a5])
 385.128 +-	| See if we were run as a command with the executable file
 385.129 +-	| name as an extra leading argument.
 385.130 +-	move.l ([_dl_skip_args@GOT.w, %a5]), %d0
 385.131 +-	| Pop the original argument count
 385.132 +-	move.l (%sp)+, %d1
 385.133 +-	| Subtract _dl_skip_args from it.
 385.134 +-	sub.l %d0, %d1
 385.135 +-	| Adjust the stack pointer to skip _dl_skip_args words.
 385.136 +-	lea (%sp, %d0*4), %sp
 385.137 +-	| Push back the modified argument count.
 385.138 +-	move.l %d1, -(%sp)
 385.139 +-	# Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
 385.140 +-	pea 8(%sp, %d1*4)
 385.141 +-	pea 8(%sp)
 385.142 +-	move.l %d1, -(%sp)
 385.143 +-	move.l ([_dl_loaded@GOT.w, %a5]), -(%sp)
 385.144 +-	jbsr _dl_init@PLTPC
 385.145 +-	addq.l #8, %sp
 385.146 +-	addq.l #8, %sp
 385.147 +-	| Pass our finalizer function to the user in %a1.
 385.148 +-	move.l _dl_fini@GOT.w(%a5), %a1
 385.149 +-	| Initialize %fp with the stack pointer.
 385.150 +-	move.l %sp, %fp
 385.151 +-	| Jump to the user's entry point.
 385.152 +-	jmp (%a4)
 385.153 +-	.size _dl_start_user, . - _dl_start_user
 385.154 ++	.text\n\
 385.155 ++	.globl _start\n\
 385.156 ++	.type _start,@function\n\
 385.157 ++_start:\n\
 385.158 ++	move.l %sp, -(%sp)\n\
 385.159 ++	jbsr _dl_start\n\
 385.160 ++	addq.l #4, %sp\n\
 385.161 ++	/* FALLTHRU */\n\
 385.162 ++\n\
 385.163 ++	.globl _dl_start_user\n\
 385.164 ++	.type _dl_start_user,@function\n\
 385.165 ++_dl_start_user:\n\
 385.166 ++	| Save the user entry point address in %a4.\n\
 385.167 ++	move.l %d0, %a4\n\
 385.168 ++	| Point %a5 at the GOT.\n\
 385.169 ++	lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5\n\
 385.170 ++	| Remember the highest stack address.\n\
 385.171 ++	move.l %sp, ([__libc_stack_end@GOT.w, %a5])\n\
 385.172 ++	| See if we were run as a command with the executable file\n\
 385.173 ++	| name as an extra leading argument.\n\
 385.174 ++	move.l ([_dl_skip_args@GOT.w, %a5]), %d0\n\
 385.175 ++	| Pop the original argument count\n\
 385.176 ++	move.l (%sp)+, %d1\n\
 385.177 ++	| Subtract _dl_skip_args from it.\n\
 385.178 ++	sub.l %d0, %d1\n\
 385.179 ++	| Adjust the stack pointer to skip _dl_skip_args words.\n\
 385.180 ++	lea (%sp, %d0*4), %sp\n\
 385.181 ++	| Push back the modified argument count.\n\
 385.182 ++	move.l %d1, -(%sp)\n\
 385.183 ++	# Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\
 385.184 ++	pea 8(%sp, %d1*4)\n\
 385.185 ++	pea 8(%sp)\n\
 385.186 ++	move.l %d1, -(%sp)\n\
 385.187 ++	move.l ([_rtld_global@GOT.w, %a5]), -(%sp)\n\
 385.188 ++	jbsr _dl_init@PLTPC\n\
 385.189 ++	addq.l #8, %sp\n\
 385.190 ++	addq.l #8, %sp\n\
 385.191 ++	| Pass our finalizer function to the user in %a1.\n\
 385.192 ++	move.l _dl_fini@GOT.w(%a5), %a1\n\
 385.193 ++	| Initialize %fp with the stack pointer.\n\
 385.194 ++	move.l %sp, %fp\n\
 385.195 ++	| Jump to the user's entry point.\n\
 385.196 ++	jmp (%a4)\n\
 385.197 ++	.size _dl_start_user, . - _dl_start_user\n\
 385.198 + 	.previous");
 385.199 + 
 385.200 + /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
 385.201 +@@ -251,7 +251,7 @@
 385.202 + 	       found.  */
 385.203 + 	    break;
 385.204 + 	  if (sym->st_size > refsym->st_size
 385.205 +-	      || (sym->st_size < refsym->st_size && _dl_verbose))
 385.206 ++	      || (sym->st_size < refsym->st_size && GL(dl_verbose)))
 385.207 + 	    {
 385.208 + 	      extern char **_dl_argv;
 385.209 + 	      const char *strtab;
   386.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   386.2 +++ b/patches/glibc/2.2.5/dl-machine-sh.patch	Sat Feb 24 11:00:05 2007 +0000
   386.3 @@ -0,0 +1,41 @@
   386.4 +Retrieved with 
   386.5 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/sh/dl-machine.h.diff?r1=1.21&r2=1.22&cvsroot=glibc'
   386.6 +
   386.7 +Fixes error
   386.8 +/tmp/ccFobT8r.s: Assembler messages:
   386.9 +/tmp/ccFobT8r.s:1819: Error: symbol `.L3' is already defined
  386.10 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc24/build/sh4-unknown-linux-gnu/gcc-3.4.0-glibc-2.2.5/build-glibc/elf/rtld.os] Error 1
  386.11 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc24/build/sh4-unknown-linux-gnu/gcc-3.4.0-glibc-2.2.5/glibc-2.2.5/elf'
  386.12 +
  386.13 +See also http://sources.redhat.com/ml/libc-alpha/2002-07/msg00001.html
  386.14 +
  386.15 +===================================================================
  386.16 +RCS file: /cvs/glibc/libc/sysdeps/sh/dl-machine.h,v
  386.17 +retrieving revision 1.21
  386.18 +retrieving revision 1.22
  386.19 +diff -u -r1.21 -r1.22
  386.20 +--- libc/sysdeps/sh/dl-machine.h	2002/04/08 20:59:36	1.21
  386.21 ++++ libc/sysdeps/sh/dl-machine.h	2002/06/28 17:26:01	1.22
  386.22 +@@ -53,16 +53,16 @@
  386.23 + elf_machine_load_address (void)
  386.24 + {
  386.25 +   Elf32_Addr addr;
  386.26 +-  asm ("mov.l .L1,r0\n\
  386.27 +-	mov.l .L3,r2\n\
  386.28 ++  asm ("mov.l 1f,r0\n\
  386.29 ++	mov.l 3f,r2\n\
  386.30 + 	add r12,r2\n\
  386.31 + 	mov.l @(r0,r12),r0\n\
  386.32 +-	bra .L2\n\
  386.33 ++	bra 2f\n\
  386.34 + 	 sub r0,r2\n\
  386.35 + 	.align 2\n\
  386.36 +-	.L1: .long _dl_start@GOT\n\
  386.37 +-	.L3: .long _dl_start@GOTOFF\n\
  386.38 +-	.L2: mov r2,%0"
  386.39 ++	1: .long _dl_start@GOT\n\
  386.40 ++	3: .long _dl_start@GOTOFF\n\
  386.41 ++	2: mov r2,%0"
  386.42 +        : "=r" (addr) : : "r0", "r1", "r2");
  386.43 +   return addr;
  386.44 + }
   387.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   387.2 +++ b/patches/glibc/2.2.5/dl-machine-sparc.patch	Sat Feb 24 11:00:05 2007 +0000
   387.3 @@ -0,0 +1,230 @@
   387.4 +--- glibc-2.2.5/sysdeps/sparc/sparc32/dl-machine.h.old	Sat Jun  7 18:19:03 2003
   387.5 ++++ glibc-2.2.5/sysdeps/sparc/sparc32/dl-machine.h	Sat Jun  7 18:20:04 2003
   387.6 +@@ -148,23 +148,23 @@
   387.7 +    and then redirect to the address it returns.  */
   387.8 + #define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name)	\
   387.9 +   asm ( "\
  387.10 +-	.text
  387.11 +-	.globl	" #tramp_name "
  387.12 +-	.type	" #tramp_name ", @function
  387.13 +-	.align	32
  387.14 +-" #tramp_name ":
  387.15 +-	/* Set up the arguments to fixup --
  387.16 +-	   %o0 = link_map out of plt0
  387.17 +-	   %o1 = offset of reloc entry
  387.18 +-	   %o2 = return address  */
  387.19 +-	ld	[%o7 + 8], %o0
  387.20 +-	srl	%g1, 10, %o1
  387.21 +-	mov	%i7, %o2
  387.22 +-	call	" #fixup_name "
  387.23 +-	 sub	%o1, 4*12, %o1
  387.24 +-	jmp	%o0
  387.25 +-	 restore
  387.26 +-	.size	" #tramp_name ", . - " #tramp_name "
  387.27 ++	.text\n\
  387.28 ++	.globl	" #tramp_name "\n\
  387.29 ++	.type	" #tramp_name ", @function\n\
  387.30 ++	.align	32\n\
  387.31 ++" #tramp_name ":\n\
  387.32 ++	/* Set up the arguments to fixup --\n\
  387.33 ++	   %o0 = link_map out of plt0\n\
  387.34 ++	   %o1 = offset of reloc entry\n\
  387.35 ++	   %o2 = return address  */\n\
  387.36 ++	ld	[%o7 + 8], %o0\n\
  387.37 ++	srl	%g1, 10, %o1\n\
  387.38 ++	mov	%i7, %o2\n\
  387.39 ++	call	" #fixup_name "\n\
  387.40 ++	 sub	%o1, 4*12, %o1\n\
  387.41 ++	jmp	%o0\n\
  387.42 ++	 restore\n\
  387.43 ++	.size	" #tramp_name ", . - " #tramp_name "\n\
  387.44 + 	.previous")
  387.45 + 
  387.46 + #ifndef PROF
  387.47 +@@ -199,96 +199,96 @@
  387.48 +    its return value is the user program's entry point.  */
  387.49 + 
  387.50 + #define RTLD_START __asm__ ("\
  387.51 +-	.text
  387.52 +-	.globl	_start
  387.53 +-	.type	_start, @function
  387.54 +-	.align	32
  387.55 +-_start:
  387.56 +-  /* Allocate space for functions to drop their arguments.  */
  387.57 +-	sub	%sp, 6*4, %sp
  387.58 +-  /* Pass pointer to argument block to _dl_start.  */
  387.59 +-	call	_dl_start
  387.60 +-	 add	%sp, 22*4, %o0
  387.61 +-	/* FALTHRU */
  387.62 +-	.globl	_dl_start_user
  387.63 +-	.type	_dl_start_user, @function
  387.64 +-_dl_start_user:
  387.65 +-  /* Load the PIC register.  */
  387.66 +-1:	call	2f
  387.67 +-	 sethi	%hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
  387.68 +-2:	or	%l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7
  387.69 +-	add	%l7, %o7, %l7
  387.70 +-  /* Save the user entry point address in %l0 */
  387.71 +-	mov	%o0, %l0
  387.72 +-  /* Store the highest stack address.  */
  387.73 +-	sethi	%hi(__libc_stack_end), %g2
  387.74 +-	or	%g2, %lo(__libc_stack_end), %g2
  387.75 +-	ld	[%l7 + %g2], %l1
  387.76 +-	sethi	%hi(_dl_skip_args), %g2
  387.77 +-	add	%sp, 6*4, %l2
  387.78 +-	or	%g2, %lo(_dl_skip_args), %g2
  387.79 +-	st	%l2, [%l1]
  387.80 +-  /* See if we were run as a command with the executable file name as an
  387.81 +-     extra leading argument.  If so, adjust the contents of the stack.  */
  387.82 +-	ld	[%l7+%g2], %i0
  387.83 +-	ld	[%i0], %i0
  387.84 +-	tst	%i0
  387.85 +-	beq	3f
  387.86 +-	 ld	[%sp+22*4], %i5		/* load argc */
  387.87 +-	/* Find out how far to shift.  */
  387.88 +-	sethi	%hi(_dl_argv), %l3
  387.89 +-	or	%l3, %lo(_dl_argv), %l3
  387.90 +-	ld	[%l7+%l3], %l3
  387.91 +-	sub	%i5, %i0, %i5
  387.92 +-	ld	[%l3], %l4
  387.93 +-	sll	%i0, 2, %i2
  387.94 +-	st	%i5, [%sp+22*4]
  387.95 +-	sub	%l4, %i2, %l4
  387.96 +-	add	%sp, 23*4, %i1
  387.97 +-	add	%i1, %i2, %i2
  387.98 +-	st	%l4, [%l3]
  387.99 +-	/* Copy down argv */
 387.100 +-21:	ld	[%i2], %i3
 387.101 +-	add	%i2, 4, %i2
 387.102 +-	tst	%i3
 387.103 +-	st	%i3, [%i1]
 387.104 +-	bne	21b
 387.105 +-	 add	%i1, 4, %i1
 387.106 +-	/* Copy down env */
 387.107 +-22:	ld	[%i2], %i3
 387.108 +-	add	%i2, 4, %i2
 387.109 +-	tst	%i3
 387.110 +-	st	%i3, [%i1]
 387.111 +-	bne	22b
 387.112 +-	 add	%i1, 4, %i1
 387.113 +-	/* Copy down auxiliary table.  */
 387.114 +-23:	ld	[%i2], %i3
 387.115 +-	ld	[%i2+4], %i4
 387.116 +-	add	%i2, 8, %i2
 387.117 +-	tst	%i3
 387.118 +-	st	%i3, [%i1]
 387.119 +-	st	%i4, [%i1+4]
 387.120 +-	bne	23b
 387.121 +-	 add	%i1, 8, %i1
 387.122 +-  /* %o0 = _dl_loaded, %o1 = argc, %o2 = argv, %o3 = envp.  */
 387.123 +-3:	sethi	%hi(_dl_loaded), %o0
 387.124 +-	add	%sp, 23*4, %o2
 387.125 +-	orcc	%o0, %lo(_dl_loaded), %o0
 387.126 +-	sll	%i5, 2, %o3
 387.127 +-	ld	[%l7+%o0], %o0
 387.128 +-	add	%o3, 4, %o3
 387.129 +-	mov	%i5, %o1
 387.130 +-	add	%o2, %o3, %o3
 387.131 +-	call	_dl_init
 387.132 +-	 ld	[%o0], %o0
 387.133 +-  /* Pass our finalizer function to the user in %g1.  */
 387.134 +-	sethi	%hi(_dl_fini), %g1
 387.135 +-	or	%g1, %lo(_dl_fini), %g1
 387.136 +-	ld	[%l7+%g1], %g1
 387.137 +-  /* Jump to the user's entry point and deallocate the extra stack we got.  */
 387.138 +-	jmp	%l0
 387.139 +-	 add	%sp, 6*4, %sp
 387.140 +-	.size   _dl_start_user, . - _dl_start_user
 387.141 ++	.text\n\
 387.142 ++	.globl	_start\n\
 387.143 ++	.type	_start, @function\n\
 387.144 ++	.align	32\n\
 387.145 ++_start:\n\
 387.146 ++  /* Allocate space for functions to drop their arguments.  */\n\
 387.147 ++	sub	%sp, 6*4, %sp\n\
 387.148 ++  /* Pass pointer to argument block to _dl_start.  */\n\
 387.149 ++	call	_dl_start\n\
 387.150 ++	 add	%sp, 22*4, %o0\n\
 387.151 ++	/* FALTHRU */\n\
 387.152 ++	.globl	_dl_start_user\n\
 387.153 ++	.type	_dl_start_user, @function\n\
 387.154 ++_dl_start_user:\n\
 387.155 ++  /* Load the PIC register.  */\n\
 387.156 ++1:	call	2f\n\
 387.157 ++	 sethi	%hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7\n\
 387.158 ++2:	or	%l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7\n\
 387.159 ++	add	%l7, %o7, %l7\n\
 387.160 ++  /* Save the user entry point address in %l0 */\n\
 387.161 ++	mov	%o0, %l0\n\
 387.162 ++  /* Store the highest stack address.  */\n\
 387.163 ++	sethi	%hi(__libc_stack_end), %g2\n\
 387.164 ++	or	%g2, %lo(__libc_stack_end), %g2\n\
 387.165 ++	ld	[%l7 + %g2], %l1\n\
 387.166 ++	sethi	%hi(_dl_skip_args), %g2\n\
 387.167 ++	add	%sp, 6*4, %l2\n\
 387.168 ++	or	%g2, %lo(_dl_skip_args), %g2\n\
 387.169 ++	st	%l2, [%l1]\n\
 387.170 ++  /* See if we were run as a command with the executable file name as an\n\
 387.171 ++     extra leading argument.  If so, adjust the contents of the stack.  */\n\
 387.172 ++	ld	[%l7+%g2], %i0\n\
 387.173 ++	ld	[%i0], %i0\n\
 387.174 ++	tst	%i0\n\
 387.175 ++	beq	3f\n\
 387.176 ++	 ld	[%sp+22*4], %i5		/* load argc */\n\
 387.177 ++	/* Find out how far to shift.  */\n\
 387.178 ++	sethi	%hi(_dl_argv), %l3\n\
 387.179 ++	or	%l3, %lo(_dl_argv), %l3\n\
 387.180 ++	ld	[%l7+%l3], %l3\n\
 387.181 ++	sub	%i5, %i0, %i5\n\
 387.182 ++	ld	[%l3], %l4\n\
 387.183 ++	sll	%i0, 2, %i2\n\
 387.184 ++	st	%i5, [%sp+22*4]\n\
 387.185 ++	sub	%l4, %i2, %l4\n\
 387.186 ++	add	%sp, 23*4, %i1\n\
 387.187 ++	add	%i1, %i2, %i2\n\
 387.188 ++	st	%l4, [%l3]\n\
 387.189 ++	/* Copy down argv */\n\
 387.190 ++21:	ld	[%i2], %i3\n\
 387.191 ++	add	%i2, 4, %i2\n\
 387.192 ++	tst	%i3\n\
 387.193 ++	st	%i3, [%i1]\n\
 387.194 ++	bne	21b\n\
 387.195 ++	 add	%i1, 4, %i1\n\
 387.196 ++	/* Copy down env */\n\
 387.197 ++22:	ld	[%i2], %i3\n\
 387.198 ++	add	%i2, 4, %i2\n\
 387.199 ++	tst	%i3\n\
 387.200 ++	st	%i3, [%i1]\n\
 387.201 ++	bne	22b\n\
 387.202 ++	 add	%i1, 4, %i1\n\
 387.203 ++	/* Copy down auxiliary table.  */\n\
 387.204 ++23:	ld	[%i2], %i3\n\
 387.205 ++	ld	[%i2+4], %i4\n\
 387.206 ++	add	%i2, 8, %i2\n\
 387.207 ++	tst	%i3\n\
 387.208 ++	st	%i3, [%i1]\n\
 387.209 ++	st	%i4, [%i1+4]\n\
 387.210 ++	bne	23b\n\
 387.211 ++	 add	%i1, 8, %i1\n\
 387.212 ++  /* %o0 = _dl_loaded, %o1 = argc, %o2 = argv, %o3 = envp.  */\n\
 387.213 ++3:	sethi	%hi(_dl_loaded), %o0\n\
 387.214 ++	add	%sp, 23*4, %o2\n\
 387.215 ++	orcc	%o0, %lo(_dl_loaded), %o0\n\
 387.216 ++	sll	%i5, 2, %o3\n\
 387.217 ++	ld	[%l7+%o0], %o0\n\
 387.218 ++	add	%o3, 4, %o3\n\
 387.219 ++	mov	%i5, %o1\n\
 387.220 ++	add	%o2, %o3, %o3\n\
 387.221 ++	call	_dl_init\n\
 387.222 ++	 ld	[%o0], %o0\n\
 387.223 ++  /* Pass our finalizer function to the user in %g1.  */\n\
 387.224 ++	sethi	%hi(_dl_fini), %g1\n\
 387.225 ++	or	%g1, %lo(_dl_fini), %g1\n\
 387.226 ++	ld	[%l7+%g1], %g1\n\
 387.227 ++  /* Jump to the user's entry point and deallocate the extra stack we got.  */\n\
 387.228 ++	jmp	%l0\n\
 387.229 ++	 add	%sp, 6*4, %sp\n\
 387.230 ++	.size   _dl_start_user, . - _dl_start_user\n\
 387.231 + 	.previous");
 387.232 + 
 387.233 + static inline Elf32_Addr
   388.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   388.2 +++ b/patches/glibc/2.2.5/errlist-1.9.patch	Sat Feb 24 11:00:05 2007 +0000
   388.3 @@ -0,0 +1,25 @@
   388.4 +===================================================================
   388.5 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/Attic/errlist.c,v
   388.6 +retrieving revision 1.8
   388.7 +retrieving revision 1.9
   388.8 +diff -u -r1.8 -r1.9
   388.9 +--- libc/sysdeps/unix/sysv/linux/errlist.c	2001/07/06 04:56:12	1.8
  388.10 ++++ libc/sysdeps/unix/sysv/linux/errlist.c	2002/05/20 06:56:53	1.9
  388.11 +@@ -1,4 +1,4 @@
  388.12 +-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
  388.13 ++/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
  388.14 +    This file is part of the GNU C Library.
  388.15 + 
  388.16 +    The GNU C Library is free software; you can redistribute it and/or
  388.17 +@@ -38,10 +38,9 @@
  388.18 + const int __old_sys_nerr = OLD_ERRLIST_SIZE;
  388.19 + 
  388.20 + strong_alias (__old_sys_nerr, _old_sys_nerr);
  388.21 +-weak_alias (__old_sys_nerr, _old_sys_nerr)
  388.22 + compat_symbol (libc, __old_sys_nerr, _sys_nerr, GLIBC_2_0);
  388.23 + compat_symbol (libc, _old_sys_nerr, sys_nerr, GLIBC_2_0);
  388.24 +-weak_alias (__old_sys_errlist, _old_sys_errlist);
  388.25 ++strong_alias (__old_sys_errlist, _old_sys_errlist);
  388.26 + compat_symbol (libc, __old_sys_errlist, _sys_errlist, GLIBC_2_0);
  388.27 + compat_symbol (libc, _old_sys_errlist, sys_errlist, GLIBC_2_0);
  388.28 + #endif
   389.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   389.2 +++ b/patches/glibc/2.2.5/errlist-arm.patch	Sat Feb 24 11:00:05 2007 +0000
   389.3 @@ -0,0 +1,48 @@
   389.4 +Subject: patch for arm
   389.5 +From: Philip Blundell <Philip dot Blundell at pobox dot com>
   389.6 +To: libc-hacker at sources dot redhat dot com
   389.7 +Content-Type: text/plain
   389.8 +Content-Transfer-Encoding: 7bit
   389.9 +Date: 22 Jul 2002 20:12:06 +0100
  389.10 +Message-Id: <1027365126.725.10.camel@kc>
  389.11 +Mime-Version: 1.0
  389.12 +
  389.13 +The mainline seems to need this patch in order to compile.
  389.14 +
  389.15 +p.
  389.16 +
  389.17 +2002-07-22  Philip Blundell  <philb@gnu.org>
  389.18 +
  389.19 +	* sysdeps/unix/sysv/linux/arm/errlist.c: Remove extra weak alias
  389.20 +	definiton of _old_sys_nerr.  Define _old_sys_errlist as strong
  389.21 +	alias.
  389.22 +
  389.23 +Index: sysdeps/unix/sysv/linux/arm/errlist.c
  389.24 +===================================================================
  389.25 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/arm/errlist.c,v
  389.26 +retrieving revision 1.4
  389.27 +diff -u -p -r1.4 errlist.c
  389.28 +--- glibc/sysdeps/unix/sysv/linux/arm/errlist.c	6 Jul 2001 04:56:13 -0000	1.4
  389.29 ++++ glibc/sysdeps/unix/sysv/linux/arm/errlist.c	22 Jul 2002 19:10:57 -0000
  389.30 +@@ -1,4 +1,4 @@
  389.31 +-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
  389.32 ++/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
  389.33 +    This file is part of the GNU C Library.
  389.34 + 
  389.35 +    The GNU C Library is free software; you can redistribute it and/or
  389.36 +@@ -38,10 +38,9 @@ extern const char *const *__old_sys_errl
  389.37 + const int __old_sys_nerr = OLD_ERRLIST_SIZE;
  389.38 + 
  389.39 + strong_alias (__old_sys_nerr, _old_sys_nerr);
  389.40 +-weak_alias (__old_sys_nerr, _old_sys_nerr)
  389.41 + compat_symbol (libc, __old_sys_nerr, _sys_nerr, GLIBC_2_0);
  389.42 + compat_symbol (libc, _old_sys_nerr, sys_nerr, GLIBC_2_0);
  389.43 +-weak_alias (__old_sys_errlist, _old_sys_errlist);
  389.44 ++strong_alias (__old_sys_errlist, _old_sys_errlist);
  389.45 + compat_symbol (libc, __old_sys_errlist, _sys_errlist, GLIBC_2_0);
  389.46 + compat_symbol (libc, _old_sys_errlist, sys_errlist, GLIBC_2_0);
  389.47 + #endif
  389.48 +
  389.49 +
  389.50 +
  389.51 +
   390.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   390.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-3.4-fixup.patch	Sat Feb 24 11:00:05 2007 +0000
   390.3 @@ -0,0 +1,68 @@
   390.4 +Fixes
   390.5 +dl-runtime.c:56: error: conflicting types for 'fixup'
   390.6 +../sysdeps/i386/dl-machine.h:158: error: previous declaration of 'fixup' was here
   390.7 +when building with gcc-3.4.0
   390.8 +
   390.9 +First hunk:
  390.10 +Define ARCH_FIXUP_ATTRIBUTE and use it in the fixup function declarations.
  390.11 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/dl-machine.h.diff?r1=1.124&r2=1.125&cvsroot=glibc
  390.12 +[rediffed against glibc-2.2.5]
  390.13 +
  390.14 +Second hunk:
  390.15 +If ARCH_FIXUP_ATTRIBUTE is not defined, provide dummy definition.
  390.16 +Use macro in fixup function definitions.
  390.17 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/elf/dl-runtime.c.diff?r1=1.64&r2=1.65&cvsroot=glibc
  390.18 +[rediffed against glibc-2.3.2]
  390.19 +
  390.20 +===================================================================
  390.21 +--- glibc-2.2.5/sysdeps/i386/dl-machine.h.old	Sun Apr 11 11:53:23 2004
  390.22 ++++ glibc-2.2.5/sysdeps/i386/dl-machine.h	Sun Apr 11 11:55:38 2004
  390.23 +@@ -63,11 +63,12 @@
  390.24 +    destroys the passed register information.  */
  390.25 + /* GKM FIXME: Fix trampoline to pass bounds so we can do
  390.26 +    without the `__unbounded' qualifier.  */
  390.27 ++#define ARCH_FIXUP_ATTRIBUTE __attribute__ ((regparm (3), unused))
  390.28 + static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset)
  390.29 +-     __attribute__ ((regparm (2), unused));
  390.30 ++     ARCH_FIXUP_ATTRIBUTE;
  390.31 + static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset,
  390.32 + 				 ElfW(Addr) retaddr)
  390.33 +-     __attribute__ ((regparm (3), unused));
  390.34 ++     ARCH_FIXUP_ATTRIBUTE;
  390.35 + #endif
  390.36 + 
  390.37 + /* Set up the loaded object described by L so its unrelocated PLT
  390.38 +===================================================================
  390.39 +--- /home/dank/downloads/glibc-2.3.2/elf/dl-runtime.c	Fri Feb  7 11:41:12 2003
  390.40 ++++ glibc-2.3.2/elf/dl-runtime.c	Thu Apr  8 22:24:26 2004
  390.41 +@@ -36,6 +36,12 @@
  390.42 + # define VERSYMIDX(sym)	(DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
  390.43 + #endif
  390.44 + 
  390.45 ++/* The fixup functions might have need special attributes.  If none
  390.46 ++   are provided define the macro as empty.  */
  390.47 ++#ifndef ARCH_FIXUP_ATTRIBUTE
  390.48 ++# define ARCH_FIXUP_ATTRIBUTE
  390.49 ++#endif
  390.50 ++
  390.51 + 
  390.52 + /* This function is called through a special trampoline from the PLT the
  390.53 +    first time each PLT entry is called.  We must perform the relocation
  390.54 +@@ -45,7 +51,7 @@
  390.55 +    function.  */
  390.56 + 
  390.57 + #ifndef ELF_MACHINE_NO_PLT
  390.58 +-static ElfW(Addr) __attribute_used__
  390.59 ++static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
  390.60 + fixup (
  390.61 + # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
  390.62 +         ELF_MACHINE_RUNTIME_FIXUP_ARGS,
  390.63 +@@ -132,7 +138,7 @@
  390.64 + 
  390.65 + #if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__
  390.66 + 
  390.67 +-static ElfW(Addr) __attribute_used__
  390.68 ++static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
  390.69 + profile_fixup (
  390.70 + #ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
  390.71 +        ELF_MACHINE_RUNTIME_FIXUP_ARGS,
   391.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   391.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-3.4-grp.patch	Sat Feb 24 11:00:05 2007 +0000
   391.3 @@ -0,0 +1,63 @@
   391.4 +Fixes
   391.5 +initgroups.c: In function `internal_getgrouplist':
   391.6 +initgroups.c:179: error: parse error before "__FUNCTION__"
   391.7 +
   391.8 +CVSROOT:	/cvs/glibc
   391.9 +Module name:	libc
  391.10 +Changes by:	roland@sources.redhat.com	2001-12-16 21:52:12
  391.11 +
  391.12 +Modified files:
  391.13 +	nss            : nsswitch.c 
  391.14 +	grp            : initgroups.c 
  391.15 +
  391.16 +Log message:
  391.17 +	2001-12-16  Roland McGrath  <roland@frob.com>
  391.18 +	
  391.19 +	* nss/nsswitch.c (__nss_next): Don't use __FUNCTION__ as literal.
  391.20 +	* grp/initgroups.c (internal_getgrouplist): Likewise.
  391.21 +
  391.22 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/grp/initgroups.c.diff?r1=1.26&r2=1.27&cvsroot=glibc
  391.23 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/nss/nsswitch.c.diff?r1=1.52&r2=1.53&cvsroot=glibc
  391.24 +
  391.25 +===================================================================
  391.26 +RCS file: /cvs/glibc/libc/grp/initgroups.c,v
  391.27 +retrieving revision 1.26
  391.28 +retrieving revision 1.27
  391.29 +diff -u -r1.26 -r1.27
  391.30 +--- libc/grp/initgroups.c	2001/07/06 04:54:46	1.26
  391.31 ++++ libc/grp/initgroups.c	2001/12/17 05:52:11	1.27
  391.32 +@@ -176,7 +176,7 @@
  391.33 + 
  391.34 +       /* This is really only for debugging.  */
  391.35 +       if (NSS_STATUS_TRYAGAIN > status || status > NSS_STATUS_RETURN)
  391.36 +-	__libc_fatal ("illegal status in " __FUNCTION__);
  391.37 ++	__libc_fatal ("illegal status in internal_getgrouplist");
  391.38 + 
  391.39 +       if (status != NSS_STATUS_SUCCESS
  391.40 + 	  && nss_next_action (nip, status) == NSS_ACTION_RETURN)
  391.41 +@@ -214,7 +214,7 @@
  391.42 +     }
  391.43 +   else
  391.44 +     *ngroups = result;
  391.45 +-      
  391.46 ++
  391.47 +   memcpy (groups, newgroups, *ngroups * sizeof (gid_t));
  391.48 + 
  391.49 +   free (newgroups);
  391.50 +
  391.51 +===================================================================
  391.52 +RCS file: /cvs/glibc/libc/nss/nsswitch.c,v
  391.53 +retrieving revision 1.52
  391.54 +retrieving revision 1.53
  391.55 +diff -u -r1.52 -r1.53
  391.56 +--- libc/nss/nsswitch.c	2001/07/17 08:21:36	1.52
  391.57 ++++ libc/nss/nsswitch.c	2001/12/17 05:52:11	1.53
  391.58 +@@ -178,7 +178,7 @@
  391.59 +     {
  391.60 +       /* This is really only for debugging.  */
  391.61 +        if (NSS_STATUS_TRYAGAIN > status || status > NSS_STATUS_RETURN)
  391.62 +-	 __libc_fatal ("illegal status in " __FUNCTION__);
  391.63 ++	 __libc_fatal ("illegal status in __nss_next");
  391.64 + 
  391.65 +        if (nss_next_action (*ni, status) == NSS_ACTION_RETURN)
  391.66 + 	 return 1;
   392.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   392.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-3.4-weakextern.patch	Sat Feb 24 11:00:05 2007 +0000
   392.3 @@ -0,0 +1,48 @@
   392.4 +Suggested by Jake Page <jake at cs dot stanford dot edu>
   392.5 +in http://sources.redhat.com/ml/crossgcc/2004-07/msg00169.html
   392.6 +but the libc-symbols.h fragment has been reworked to fix typos
   392.7 +and to still work on gcc-2.95.3, which lacks _Pragma.
   392.8 +
   392.9 +His comment was:
  392.10 + Fixes gcc-3.4 optimizing out comparisons to weak external symbols in code
  392.11 + like:
  392.12 +  if (__pthread_mutex_init != NULL)
  392.13 +    __pthread_mutex_init(...);
  392.14 + that causes segfaults during libc init when not linked to libpthread
  392.15 +
  392.16 +diff -uNr glibc-2.2.5-orig/resolv/res_libc.c glibc-2.2.5/resolv/res_libc.c
  392.17 +--- glibc-2.2.5-orig/resolv/res_libc.c	2001-02-12 12:23:34.000000000 -0800
  392.18 ++++ glibc-2.2.5/resolv/res_libc.c	2004-07-27 22:56:32.000000000 -0700
  392.19 +@@ -84,7 +84,8 @@
  392.20 + 
  392.21 + #if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2)
  392.22 + # undef res_init
  392.23 +-strong_alias (__res_init, __res_init_weak);
  392.24 ++extern int __res_init_weak (void);
  392.25 + weak_extern (__res_init_weak);
  392.26 ++strong_alias (__res_init, __res_init_weak);
  392.27 + compat_symbol (libc, __res_init_weak, res_init, GLIBC_2_0);
  392.28 + #endif
  392.29 +--- glibc-2.2.5/include/libc-symbols.h.old	Fri Aug 13 04:20:55 2004
  392.30 ++++ glibc-2.2.5/include/libc-symbols.h	Fri Aug 13 04:37:06 2004
  392.31 +@@ -108,10 +108,16 @@
  392.32 + 
  392.33 + /* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined).  */
  392.34 + #  define weak_extern(symbol) _weak_extern (symbol)
  392.35 +-#  ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
  392.36 +-#   define _weak_extern(symbol) asm (".weakext " __SYMBOL_PREFIX #symbol);
  392.37 +-#  else
  392.38 +-#   define _weak_extern(symbol)    asm (".weak " __SYMBOL_PREFIX #symbol);
  392.39 ++#  if __GNUC__ >= 3
  392.40 ++    /* see http://sources.redhat.com/ml/libc-alpha/2003-01/msg00043.html */
  392.41 ++#   define __weak_extern_1(expr) _Pragma(#expr)
  392.42 ++#   define _weak_extern(symbol) __weak_extern_1(weak symbol)
  392.43 ++#  else /* __GNUC__ == 2 */
  392.44 ++#   ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
  392.45 ++#    define _weak_extern(symbol) asm (".weakext " __SYMBOL_PREFIX #symbol);
  392.46 ++#   else
  392.47 ++#    define _weak_extern(symbol)    asm (".weak " __SYMBOL_PREFIX #symbol);
  392.48 ++#   endif
  392.49 + #  endif
  392.50 + 
  392.51 + # else
   393.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   393.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-configure.patch	Sat Feb 24 11:00:05 2007 +0000
   393.3 @@ -0,0 +1,21 @@
   393.4 +Fixes
   393.5 +checking version of powerpc-405-linux-gnu-gcc ... 4.0.0, bad
   393.6 +checking for gnumake... no
   393.7 +checking for gmake... no
   393.8 +checking for make... make
   393.9 +checking version of make... 3.80, ok
  393.10 +configure: error:
  393.11 +*** These critical programs are missing or too old:gcc 
  393.12 +
  393.13 +
  393.14 +--- glibc-2.2.5/configure.old	2005-03-10 00:23:46.374213600 -0800
  393.15 ++++ glibc-2.2.5/configure	2005-03-10 00:25:13.313996744 -0800
  393.16 +@@ -1476,7 +1476,7 @@
  393.17 +   ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
  393.18 +   case $ac_prog_version in
  393.19 +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
  393.20 +-    *gcc-2.9[5-9].*|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|3.[0-9]*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9]|sgicc-*)
  393.21 ++    *gcc-2.9[5-9].*|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|3.[0-9]*|4.0*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9]|sgicc-*)
  393.22 +        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
  393.23 +     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
  393.24 + 
   394.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   394.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-elf-2.patch	Sat Feb 24 11:00:05 2007 +0000
   394.3 @@ -0,0 +1,43 @@
   394.4 +Fixes
   394.5 +dynamic-link.h:38: error: invalid storage class for function 'elf_get_dynamic_info'
   394.6 +kinda like http://sourceware.org/cgi-bin/cvsweb.cgi/libc/elf/dynamic-link.h.diff?r1=1.50&r2=1.51&cvsroot=glibc does
   394.7 +and fixes
   394.8 +In file included from dynamic-link.h:218,
   394.9 +                 from dl-reloc.c:153:
  394.10 +do-rel.h:46: error: invalid storage class for function 'elf_dynamic_do_rel'
  394.11 +
  394.12 +--- /home/dank/downloads/glibc-2.2.5/elf/dynamic-link.h	2001-07-05 21:54:46.000000000 -0700
  394.13 ++++ glibc-2.2.5/elf/dynamic-link.h	2005-03-11 14:18:34.542858064 -0800
  394.14 +@@ -33,7 +33,16 @@
  394.15 + 
  394.16 + /* Read the dynamic section at DYN and fill in INFO with indices DT_*.  */
  394.17 + 
  394.18 ++#if __GNUC__ >= 4
  394.19 ++#ifndef RESOLVE_MAP
  394.20 ++static
  394.21 ++#else
  394.22 ++auto
  394.23 ++#endif
  394.24 ++inline void __attribute__ ((unused, always_inline))
  394.25 ++#else
  394.26 + static inline void __attribute__ ((unused))
  394.27 ++#endif
  394.28 + elf_get_dynamic_info (struct link_map *l)
  394.29 + {
  394.30 +   ElfW(Dyn) *dyn = l->l_ld;
  394.31 +
  394.32 +--- /home/dank/downloads/glibc-2.2.5/elf/do-rel.h	2001-08-24 11:45:23.000000000 -0700
  394.33 ++++ glibc-2.2.5/elf/do-rel.h	2005-03-11 14:26:43.538519424 -0800
  394.34 +@@ -39,7 +39,12 @@
  394.35 +    relocations; they should be set up to call _dl_runtime_resolve, rather
  394.36 +    than fully resolved now.  */
  394.37 + 
  394.38 ++#if __GNUC__ >= 4
  394.39 ++auto inline void
  394.40 ++__attribute ((always_inline))
  394.41 ++#else
  394.42 + static inline void
  394.43 ++#endif
  394.44 + elf_dynamic_do_rel (struct link_map *map,
  394.45 + 		    ElfW(Addr) reladdr, ElfW(Addr) relsize,
  394.46 + 		    int lazy)
   395.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   395.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-elf.patch	Sat Feb 24 11:00:05 2007 +0000
   395.3 @@ -0,0 +1,39 @@
   395.4 +Fixes
   395.5 +
   395.6 +dl-load.c: In function '_dl_map_object_from_fd':
   395.7 +dl-load.c:1089: error: invalid lvalue in assignment
   395.8 +dl-load.c:1109: error: invalid lvalue in assignment
   395.9 +make[2]: *** [/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/build-glibc/elf/dl-load.o] Error 1
  395.10 +
  395.11 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/elf/dl-load.c.diff?r1=1.235&r2=1.236&cvsroot=glibc
  395.12 +rediffed against glibc-2.2.5
  395.13 +
  395.14 +Revision 1.236, Sat Feb 21 18:25:41 2004 UTC by aj
  395.15 +Branch: MAIN
  395.16 +Changes since 1.235: +2 -2 lines
  395.17 +Diff to previous 1.235 (colored)
  395.18 +
  395.19 +(_dl_map_object_from_fd): Fix casts used as lvalue.
  395.20 +
  395.21 +
  395.22 +diff -ur glibc-2.2.5/elf/dl-load.c glibc-2.2.5-patched/elf/dl-load.c
  395.23 +--- glibc-2.2.5/elf/dl-load.c	2001-11-10 14:43:10.000000000 -0800
  395.24 ++++ glibc-2.2.5-patched/elf/dl-load.c	2005-03-11 13:48:18.211982328 -0800
  395.25 +@@ -1086,7 +1086,7 @@
  395.26 +       }
  395.27 +     else
  395.28 +       /* Adjust the PT_PHDR value by the runtime load address.  */
  395.29 +-      (ElfW(Addr)) l->l_phdr += l->l_addr;
  395.30 ++      l->l_phdr = (ElfW(Phdr) *) ((ElfW(Addr)) l->l_phdr + l->l_addr);
  395.31 +   }
  395.32 + 
  395.33 +   /* We are done mapping in the file.  We no longer need the descriptor.  */
  395.34 +@@ -1106,7 +1106,7 @@
  395.35 + 	}
  395.36 +     }
  395.37 +   else
  395.38 +-    (ElfW(Addr)) l->l_ld += l->l_addr;
  395.39 ++    l->l_ld = (ElfW(Dyn) *) ((ElfW(Addr)) l->l_ld + l->l_addr);
  395.40 + 
  395.41 +   l->l_entry += l->l_addr;
  395.42 + 
   396.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   396.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-gconv.patch	Sat Feb 24 11:00:05 2007 +0000
   396.3 @@ -0,0 +1,226 @@
   396.4 +Fixes
   396.5 +gconv_open.c: In function `__gconv_open':
   396.6 +gconv_open.c:186: error: invalid lvalue in assignment
   396.7 +when building glibc-2.2.5 with gcc-4.0.
   396.8 +Same as ../glibc-2.3.2/glibc-2.3.2-allow-gcc-3.5-gconv.patch
   396.9 +but rediffed against glibc-2.2.5.
  396.10 +
  396.11 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/iconv/gconv_simple.c.diff?r1=1.59&r2=1.63&cvsroot=glibc'
  396.12 +        * (internal_ucs4_loop): Fix typo in last change.
  396.13 +
  396.14 +        * (internal_ucs4le_loop): Remove cast used as lvalue.
  396.15 +
  396.16 +        * Fix last commit.
  396.17 +
  396.18 +	* iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as lvalue.
  396.19 +	(internal_ucs4le_loop_single): Likewise.
  396.20 +	(ucs4_internal_loop): Likewise.
  396.21 +	(BODY): Likewise.
  396.22 +	(internal_ucs4_loop_single): Likewise.
  396.23 +
  396.24 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/iconv/gconv_open.c.diff?r1=1.32&r2=1.33&cvsroot=glibc'
  396.25 +	* iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as lvalue.
  396.26 +	(internal_ucs4le_loop_single): Likewise.
  396.27 +	(ucs4_internal_loop): Likewise.
  396.28 +	(BODY): Likewise.
  396.29 +	(internal_ucs4_loop_single): Likewise.
  396.30 +
  396.31 +
  396.32 +===================================================================
  396.33 +RCS file: /cvs/glibc/libc/iconv/gconv_open.c,v
  396.34 +retrieving revision 1.32
  396.35 +retrieving revision 1.33
  396.36 +diff -u -r1.32 -r1.33
  396.37 +--- libc/iconv/gconv_open.c	2001/11/29 04:51:58	1.32
  396.38 ++++ libc/iconv/gconv_open.c	2004/02/07 15:56:32	1.33
  396.39 +@@ -1,5 +1,5 @@
  396.40 + /* Find matching transformation algorithms and initialize steps.
  396.41 +-   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  396.42 ++   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
  396.43 +    This file is part of the GNU C Library.
  396.44 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
  396.45 + 
  396.46 +@@ -182,8 +182,13 @@
  396.47 + 	      || __builtin_expect (__gconv_translit_find (runp), 0) == 0)
  396.48 + 	    lastp = runp;
  396.49 + 	  else
  396.50 +-	    /* This means we haven't found the module.  Remove it.  */
  396.51 +-	    (lastp == NULL ? trans : lastp->next) = runp->next;
  396.52 ++	    {
  396.53 ++	      /* This means we haven't found the module.  Remove it.  */
  396.54 ++	      if (lastp == NULL)
  396.55 ++		trans  = runp->next;
  396.56 ++	      else
  396.57 ++		lastp->next  = runp->next;
  396.58 ++	    }
  396.59 + 	}
  396.60 + 
  396.61 +       /* Allocate room for handle.  */
  396.62 +===================================================================
  396.63 +--- glibc-2.2.5/iconv/gconv_simple.c.old	2001-08-03 15:06:46.000000000 -0700
  396.64 ++++ glibc-2.2.5/iconv/gconv_simple.c	2005-03-10 00:49:45.558181608 -0800
  396.65 +@@ -1,5 +1,5 @@
  396.66 + /* Simple transformations functions.
  396.67 +-   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  396.68 ++   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
  396.69 +    This file is part of the GNU C Library.
  396.70 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
  396.71 + 
  396.72 +@@ -73,12 +73,13 @@
  396.73 + #if __BYTE_ORDER == __LITTLE_ENDIAN
  396.74 +   /* Sigh, we have to do some real work.  */
  396.75 +   size_t cnt;
  396.76 ++  uint32_t *outptr32 = (uint32_t *) outptr;
  396.77 + 
  396.78 +   for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
  396.79 +-    *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr);
  396.80 ++    *outptr32++ = bswap_32 (*(const uint32_t *) inptr);
  396.81 + 
  396.82 +   *inptrp = inptr;
  396.83 +-  *outptrp = outptr;
  396.84 ++  *outptrp = (unsigned char *) outptr32;
  396.85 + #elif __BYTE_ORDER == __BIG_ENDIAN
  396.86 +   /* Simply copy the data.  */
  396.87 +   *inptrp = inptr + n_convert * 4;
  396.88 +@@ -176,13 +177,16 @@
  396.89 +   (*outptrp)[2] = state->__value.__wchb[1];
  396.90 +   (*outptrp)[3] = state->__value.__wchb[0];
  396.91 + 
  396.92 +-  *outptrp += 4;
  396.93 + #elif __BYTE_ORDER == __BIG_ENDIAN
  396.94 +   /* XXX unaligned */
  396.95 +-  *(*((uint32_t **) outptrp)++) = state->__value.__wch;
  396.96 ++  (*outptrp)[0] = state->__value.__wchb[0];
  396.97 ++  (*outptrp)[1] = state->__value.__wchb[1];
  396.98 ++  (*outptrp)[2] = state->__value.__wchb[2];
  396.99 ++  (*outptrp)[3] = state->__value.__wchb[3];
 396.100 + #else
 396.101 + # error "This endianess is not supported."
 396.102 + #endif
 396.103 ++  *outptrp += 4;
 396.104 + 
 396.105 +   /* Clear the state buffer.  */
 396.106 +   state->__count &= ~7;
 396.107 +@@ -251,7 +255,8 @@
 396.108 + 	  return __GCONV_ILLEGAL_INPUT;
 396.109 + 	}
 396.110 + 
 396.111 +-      *((uint32_t *) outptr)++ = inval;
 396.112 ++      *((uint32_t *) outptr) = inval;
 396.113 ++      outptr += sizeof (uint32_t);
 396.114 +     }
 396.115 + 
 396.116 +   *inptrp = inptr;
 396.117 +@@ -427,9 +432,11 @@
 396.118 + #if __BYTE_ORDER == __BIG_ENDIAN
 396.119 +   /* Sigh, we have to do some real work.  */
 396.120 +   size_t cnt;
 396.121 ++  uint32_t *outptr32 = (uint32_t *) outptr;
 396.122 + 
 396.123 +   for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
 396.124 +-    *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr);
 396.125 ++    *outptr32++ = bswap_32 (*(const uint32_t *) inptr);
 396.126 ++  outptr = (unsigned char *) outptr32;
 396.127 + 
 396.128 +   *inptrp = inptr;
 396.129 +   *outptrp = outptr;
 396.130 +@@ -530,12 +537,17 @@
 396.131 +   (*outptrp)[2] = state->__value.__wchb[1];
 396.132 +   (*outptrp)[3] = state->__value.__wchb[0];
 396.133 + 
 396.134 +-  *outptrp += 4;
 396.135 + #else
 396.136 +   /* XXX unaligned */
 396.137 +-  *(*((uint32_t **) outptrp)++) = state->__value.__wch;
 396.138 ++  (*outptrp)[0] = state->__value.__wchb[0];
 396.139 ++  (*outptrp)[1] = state->__value.__wchb[1];
 396.140 ++  (*outptrp)[2] = state->__value.__wchb[2];
 396.141 ++  (*outptrp)[3] = state->__value.__wchb[3];
 396.142 ++
 396.143 + #endif
 396.144 + 
 396.145 ++  *outptrp += 4;
 396.146 ++
 396.147 +   /* Clear the state buffer.  */
 396.148 +   state->__count &= ~7;
 396.149 + 
 396.150 +@@ -600,7 +612,8 @@
 396.151 + 	  return __GCONV_ILLEGAL_INPUT;
 396.152 + 	}
 396.153 + 
 396.154 +-      *((uint32_t *) outptr)++ = inval;
 396.155 ++      *((uint32_t *) outptr) = inval;
 396.156 ++      outptr += sizeof (uint32_t);
 396.157 +     }
 396.158 + 
 396.159 +   *inptrp = inptr;
 396.160 +@@ -782,7 +795,8 @@
 396.161 +       }									      \
 396.162 +     else								      \
 396.163 +       /* It's an one byte sequence.  */					      \
 396.164 +-      *((uint32_t *) outptr)++ = *inptr++;				      \
 396.165 ++      *((uint32_t *) outptr) = *inptr++;				      \
 396.166 ++      outptr += sizeof (uint32_t);					      \
 396.167 +   }
 396.168 + #define LOOP_NEED_FLAGS
 396.169 + #include <iconv/loop.c>
 396.170 +@@ -812,7 +826,8 @@
 396.171 +       }									      \
 396.172 +     else								      \
 396.173 +       /* It's an one byte sequence.  */					      \
 396.174 +-      *outptr++ = *((const uint32_t *) inptr)++;			      \
 396.175 ++      *outptr++ = *((const uint32_t *) inptr);				      \
 396.176 ++      inptr += sizeof (uint32_t);					      \
 396.177 +   }
 396.178 + #define LOOP_NEED_FLAGS
 396.179 + #include <iconv/loop.c>
 396.180 +@@ -1031,7 +1046,8 @@
 396.181 +       }									      \
 396.182 + 									      \
 396.183 +     /* Now adjust the pointers and store the result.  */		      \
 396.184 +-    *((uint32_t *) outptr)++ = ch;					      \
 396.185 ++    *((uint32_t *) outptr) = ch;					      \
 396.186 ++    outptr += sizeof (uint32_t);					      \
 396.187 +   }
 396.188 + #define LOOP_NEED_FLAGS
 396.189 + 
 396.190 +@@ -1174,7 +1190,8 @@
 396.191 + 	continue;							      \
 396.192 +       }									      \
 396.193 + 									      \
 396.194 +-    *((uint32_t *) outptr)++ = u1;					      \
 396.195 ++    *((uint32_t *) outptr) = u1;					      \
 396.196 ++    outptr += sizeof (uint32_t);					      \
 396.197 +     inptr += 2;								      \
 396.198 +   }
 396.199 + #define LOOP_NEED_FLAGS
 396.200 +@@ -1224,7 +1241,8 @@
 396.201 +       }									      \
 396.202 +     else 								      \
 396.203 +       {									      \
 396.204 +-	*((uint16_t *) outptr)++ = val;					      \
 396.205 ++	*((uint16_t *) outptr) = val;					      \
 396.206 ++        outptr += sizeof (uint16_t);					      \
 396.207 + 	inptr += 4;							      \
 396.208 +       }									      \
 396.209 +   }
 396.210 +@@ -1265,7 +1283,8 @@
 396.211 + 	continue;							      \
 396.212 +       }									      \
 396.213 + 									      \
 396.214 +-    *((uint32_t *) outptr)++ = u1;					      \
 396.215 ++    *((uint32_t *) outptr) = u1;					      \
 396.216 ++    outptr += sizeof (uint32_t);					      \
 396.217 +     inptr += 2;								      \
 396.218 +   }
 396.219 + #define LOOP_NEED_FLAGS
 396.220 +@@ -1314,7 +1333,8 @@
 396.221 +       }									      \
 396.222 +     else 								      \
 396.223 +       {									      \
 396.224 +-	*((uint16_t *) outptr)++ = bswap_16 (val);			      \
 396.225 ++	*((uint16_t *) outptr) = bswap_16 (val);			      \
 396.226 ++	outptr += sizeof (uint16_t);					      \
 396.227 + 	inptr += 4;							      \
 396.228 +       }									      \
 396.229 +   }
   397.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   397.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-i386.patch	Sat Feb 24 11:00:05 2007 +0000
   397.3 @@ -0,0 +1,49 @@
   397.4 +Fixes
   397.5 +../sysdeps/i386/dl-machine.h: In function '_dl_relocate_object':
   397.6 +../sysdeps/i386/dl-machine.h:306: error: invalid storage class for function 'elf_machine_rel'
   397.7 +../sysdeps/i386/dl-machine.h:385: error: invalid storage class for function 'elf_machine_rel_relative'
   397.8 +../sysdeps/i386/dl-machine.h:393: error: invalid storage class for function 'elf_machine_lazy_rel'
   397.9 +
  397.10 +when building glibc-2.2.5 with gcc-4.0.
  397.11 +
  397.12 +--- /home/dank/downloads/glibc-2.2.5/sysdeps/i386/dl-machine.h	2001-08-30 16:09:10.000000000 -0700
  397.13 ++++ glibc-2.2.5/sysdeps/i386/dl-machine.h	2005-03-11 14:00:22.601858328 -0800
  397.14 +@@ -298,7 +299,12 @@
  397.15 + /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
  397.16 +    MAP is the object containing the reloc.  */
  397.17 + 
  397.18 ++#if __GNUC__ >= 4
  397.19 ++auto inline void
  397.20 ++__attribute ((always_inline))
  397.21 ++#else
  397.22 + static inline void
  397.23 ++#endif
  397.24 + elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
  397.25 + 		 const Elf32_Sym *sym, const struct r_found_version *version,
  397.26 + 		 Elf32_Addr *const reloc_addr)
  397.27 +@@ -378,7 +384,12 @@
  397.28 +     }
  397.29 + }
  397.30 + 
  397.31 ++#if __GNUC__ >= 4
  397.32 ++auto inline void
  397.33 ++__attribute ((always_inline))
  397.34 ++#else
  397.35 + static inline void
  397.36 ++#endif
  397.37 + elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
  397.38 + 			  Elf32_Addr *const reloc_addr)
  397.39 + {
  397.40 +@@ -386,7 +397,12 @@
  397.41 +   *reloc_addr += l_addr;
  397.42 + }
  397.43 + 
  397.44 ++#if __GNUC__ >= 4
  397.45 ++auto inline void
  397.46 ++__attribute ((always_inline))
  397.47 ++#else
  397.48 + static inline void
  397.49 ++#endif
  397.50 + elf_machine_lazy_rel (struct link_map *map,
  397.51 + 		      Elf32_Addr l_addr, const Elf32_Rel *reloc)
  397.52 + {
   398.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   398.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-iconv.patch	Sat Feb 24 11:00:05 2007 +0000
   398.3 @@ -0,0 +1,20 @@
   398.4 +Fixes
   398.5 +iconvconfig.c: In function 'write_output':
   398.6 +iconvconfig.c:973: error: invalid storage class for function 'name_insert'
   398.7 +
   398.8 +--- glibc-2.2.5/iconv/iconvconfig.c.old	2002-01-20 19:20:53.000000000 -0800
   398.9 ++++ glibc-2.2.5/iconv/iconvconfig.c	2005-03-11 14:30:27.000000000 -0800
  398.10 +@@ -969,7 +969,12 @@
  398.11 +   char tmpfname[sizeof (GCONV_MODULES_CACHE) + strlen (".XXXXXX")];
  398.12 + 
  398.13 +   /* Function to insert the names.  */
  398.14 +-  static void name_insert (const void *nodep, VISIT value, int level)
  398.15 ++#if __GNUC__ >= 4
  398.16 ++  auto 
  398.17 ++#else
  398.18 ++  static 
  398.19 ++#endif
  398.20 ++  void name_insert (const void *nodep, VISIT value, int level)
  398.21 +     {
  398.22 +       struct name *name;
  398.23 +       unsigned int idx;
   399.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   399.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-iconvdata.patch	Sat Feb 24 11:00:05 2007 +0000
   399.3 @@ -0,0 +1,114 @@
   399.4 +Fixes
   399.5 +
   399.6 +In file included from jis0208.c:23:
   399.7 +jis0208.h:32: error: array type has incomplete element type
   399.8 +when building with gcc-4.0
   399.9 +
  399.10 +In file included from cp1258.c:869:
  399.11 +../iconv/skeleton.c: In function 'gconv':
  399.12 +../iconv/skeleton.c:323: error: invalid lvalue in increment
  399.13 +
  399.14 +In file included from cp1255.c:550:
  399.15 +../iconv/skeleton.c: In function 'gconv':
  399.16 +../iconv/skeleton.c:323: error: invalid lvalue in increment
  399.17 +
  399.18 +In file included from gb18030.c:22114:
  399.19 +../iconv/loop.c: In function 'from_gb18030':
  399.20 +../iconv/loop.c:282: error: invalid lvalue in increment
  399.21 +../iconv/loop.c: In function 'from_gb18030_single':
  399.22 +../iconv/loop.c:384: error: invalid lvalue in increment
  399.23 +
  399.24 +--- /home/dank/downloads/glibc-2.2.5/iconvdata/iso8859-1.c	2001-08-03 15:06:50.000000000 -0700
  399.25 ++++ glibc-2.2.5/iconvdata/iso8859-1.c	2005-03-11 15:09:15.233602808 -0800
  399.26 +@@ -35,7 +35,8 @@
  399.27 + #define MIN_NEEDED_OUTPUT	MIN_NEEDED_TO
  399.28 + #define LOOPFCT			FROM_LOOP
  399.29 + #define BODY \
  399.30 +-  *((uint32_t *) outptr)++ = *inptr++;
  399.31 ++  *((uint32_t *) outptr) = *inptr++;					      \
  399.32 ++  outptr += sizeof (uint32_t);
  399.33 + #include <iconv/loop.c>
  399.34 + 
  399.35 + 
  399.36 +--- /home/dank/downloads/glibc-2.2.5/iconvdata/jis0208.h	2001-07-05 21:54:52.000000000 -0700
  399.37 ++++ glibc-2.2.5/iconvdata/jis0208.h	2005-03-11 15:27:23.295192304 -0800
  399.38 +@@ -24,15 +24,6 @@
  399.39 + #include <gconv.h>
  399.40 + #include <stdint.h>
  399.41 + 
  399.42 +-/* Conversion table.  */
  399.43 +-extern const uint16_t __jis0208_to_ucs[];
  399.44 +-
  399.45 +-extern const char __jisx0208_from_ucs4_lat1[256][2];
  399.46 +-extern const char __jisx0208_from_ucs4_greek[0xc1][2];
  399.47 +-extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
  399.48 +-extern const char __jisx0208_from_ucs_tab[][2];
  399.49 +-
  399.50 +-
  399.51 + /* Struct for table with indeces in UCS mapping table.  */
  399.52 + struct jisx0208_ucs_idx
  399.53 + {
  399.54 +@@ -42,6 +33,15 @@
  399.55 + };
  399.56 + 
  399.57 + 
  399.58 ++/* Conversion table.  */
  399.59 ++extern const uint16_t __jis0208_to_ucs[];
  399.60 ++
  399.61 ++extern const char __jisx0208_from_ucs4_lat1[256][2];
  399.62 ++extern const char __jisx0208_from_ucs4_greek[0xc1][2];
  399.63 ++extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
  399.64 ++extern const char __jisx0208_from_ucs_tab[][2];
  399.65 ++
  399.66 ++
  399.67 + static inline uint32_t
  399.68 + jisx0208_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
  399.69 + {
  399.70 +--- /home/dank/downloads/glibc-2.2.5/iconvdata/cp1258.c	2001-07-05 21:54:49.000000000 -0700
  399.71 ++++ glibc-2.2.5/iconvdata/cp1258.c	2005-03-11 15:41:44.953200376 -0800
  399.72 +@@ -66,7 +66,8 @@
  399.73 + 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
  399.74 + 	    {								      \
  399.75 + 	      /* Write out the last character.  */			      \
  399.76 +-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
  399.77 ++	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
  399.78 ++	      outbuf += sizeof (uint32_t);				      \
  399.79 + 	      data->__statep->__count = 0;				      \
  399.80 + 	    }								      \
  399.81 + 	  else								      \
  399.82 +--- /home/dank/downloads/glibc-2.2.5/iconvdata/cp1255.c	2001-07-05 21:54:49.000000000 -0700
  399.83 ++++ glibc-2.2.5/iconvdata/cp1255.c	2005-03-11 15:47:40.689120296 -0800
  399.84 +@@ -65,7 +65,8 @@
  399.85 + 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
  399.86 + 	    {								      \
  399.87 + 	      /* Write out the last character.  */			      \
  399.88 +-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
  399.89 ++	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
  399.90 ++	      outbuf += sizeof (uint32_t);				      \
  399.91 + 	      data->__statep->__count = 0;				      \
  399.92 + 	    }								      \
  399.93 + 	  else								      \
  399.94 +--- /home/dank/downloads/glibc-2.2.5/iconvdata/gb18030.c	2001-08-03 15:06:47.000000000 -0700
  399.95 ++++ glibc-2.2.5/iconvdata/gb18030.c	2005-03-11 15:54:59.060477720 -0800
  399.96 +@@ -22108,7 +22108,8 @@
  399.97 + 	    }							      	      \
  399.98 + 	}								      \
  399.99 + 									      \
 399.100 +-    *((uint32_t *) outptr)++ = ch;					      \
 399.101 ++    *((uint32_t *) outptr) = ch;					      \
 399.102 ++    outptr += sizeof (uint32_t);					      \
 399.103 +   }
 399.104 + #define LOOP_NEED_FLAGS
 399.105 + #include <iconv/loop.c>
 399.106 +--- /home/dank/downloads/glibc-2.2.5/iconvdata/iso-2022-cn-ext.c	2001-07-05 21:54:51.000000000 -0700
 399.107 ++++ glibc-2.2.5/iconvdata/iso-2022-cn-ext.c	2005-03-11 15:55:42.002949472 -0800
 399.108 +@@ -411,7 +411,8 @@
 399.109 + 	  }								      \
 399.110 +       }									      \
 399.111 + 									      \
 399.112 +-    *((uint32_t *) outptr)++ = ch;					      \
 399.113 ++    *((uint32_t *) outptr) = ch;					      \
 399.114 ++    outptr += sizeof (uint32_t);					      \
 399.115 +   }
 399.116 + #define EXTRA_LOOP_DECLS	, int *setp
 399.117 + #define INIT_PARAMS		int set = (*setp >> 3) & CURRENT_MASK; \
   400.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   400.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-locale.patch	Sat Feb 24 11:00:05 2007 +0000
   400.3 @@ -0,0 +1,49 @@
   400.4 +Fixes
   400.5 +
   400.6 +In file included from strcoll.c:101:
   400.7 +../locale/weight.h: In function 'strcoll':
   400.8 +../locale/weight.h:23: error: invalid storage class for function 'findidx'
   400.9 +make[2]: *** [/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/build-glibc/string/strcoll.o] Error 1
  400.10 +make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/glibc-2.2.5/string'
  400.11 +make[1]: *** [string/subdir_lib] Error 2
  400.12 +make[1]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/glibc-2.2.5'
  400.13 +make: *** [all] Error 2
  400.14 +
  400.15 +Discussed here
  400.16 +http://sources.redhat.com/ml/libc-hacker/2004-09/msg00015.html
  400.17 +the fix checked in to cvs seems to be
  400.18 +http://sources.redhat.com/ml/glibc-cvs/2004-q3/msg01071.html
  400.19 +but that fix doesn't support older gcc's, so I can't use it directly.
  400.20 +
  400.21 +Here's a fix the does work with older versions of gcc:
  400.22 +
  400.23 +--- glibc-2.2.5/locale/weight.h.old	2001-07-05 21:55:33.000000000 -0700
  400.24 ++++ glibc-2.2.5/locale/weight.h	2005-03-10 16:07:46.669579888 -0800
  400.25 +@@ -18,7 +18,12 @@
  400.26 +    02111-1307 USA.  */
  400.27 + 
  400.28 + /* Find index of weight.  */
  400.29 ++#if __GNUC__ >= 4
  400.30 ++auto inline int32_t
  400.31 ++__attribute ((always_inline))
  400.32 ++#else
  400.33 + static inline int32_t
  400.34 ++#endif
  400.35 + findidx (const unsigned char **cpp)
  400.36 + {
  400.37 +   int_fast32_t i = table[*(*cpp)++];
  400.38 +--- glibc-2.2.5/locale/weightwc.h.old	2001-08-06 21:26:15.000000000 -0700
  400.39 ++++ glibc-2.2.5/locale/weightwc.h	2005-03-10 16:13:08.651631176 -0800
  400.40 +@@ -18,7 +18,12 @@
  400.41 +    02111-1307 USA.  */
  400.42 + 
  400.43 + /* Find index of weight.  */
  400.44 ++#if __GNUC__ >= 4
  400.45 ++auto inline int32_t
  400.46 ++__attribute ((always_inline))
  400.47 ++#else
  400.48 + static inline int32_t
  400.49 ++#endif
  400.50 + findidx (const wint_t **cpp)
  400.51 + {
  400.52 +   int32_t i;
   401.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   401.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-malloc.patch	Sat Feb 24 11:00:05 2007 +0000
   401.3 @@ -0,0 +1,48 @@
   401.4 +Fixes
   401.5 +programs/ld-collate.c: In function 'obstack_int32_grow':
   401.6 +programs/ld-collate.c:48: error: invalid lvalue in increment
   401.7 +programs/ld-collate.c: In function 'obstack_int32_grow_fast':
   401.8 +programs/ld-collate.c:57: error: invalid lvalue in increment
   401.9 +
  401.10 +Change taken by eyeball from version 1.20 at
  401.11 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/malloc/obstack.h?cvsroot=glibc
  401.12 +
  401.13 +--- /home/dank/downloads/glibc-2.2.5/malloc/obstack.h	2001-07-05 21:55:35.000000000 -0700
  401.14 ++++ glibc-2.2.5/malloc/obstack.h	2005-03-11 16:12:16.175812224 -0800
  401.15 +@@ -423,22 +423,29 @@
  401.16 + ({ struct obstack *__o = (OBSTACK);					\
  401.17 +    if (__o->next_free + sizeof (void *) > __o->chunk_limit)		\
  401.18 +      _obstack_newchunk (__o, sizeof (void *));				\
  401.19 +-   *((void **)__o->next_free)++ = (datum);				\
  401.20 +-   (void) 0; })
  401.21 ++   obstack_ptr_grow_fast (__o, datum); })
  401.22 + 
  401.23 + # define obstack_int_grow(OBSTACK,datum)				\
  401.24 + __extension__								\
  401.25 + ({ struct obstack *__o = (OBSTACK);					\
  401.26 +    if (__o->next_free + sizeof (int) > __o->chunk_limit)		\
  401.27 +      _obstack_newchunk (__o, sizeof (int));				\
  401.28 +-   *((int *)__o->next_free)++ = (datum);				\
  401.29 ++   obstack_int_grow_fast (__o, datum); })
  401.30 ++
  401.31 ++# define obstack_ptr_grow_fast(OBSTACK,aptr)				\
  401.32 ++__extension__								\
  401.33 ++({ struct obstack *__o1 = (OBSTACK);					\
  401.34 ++   *(const void **) __o1->next_free = (aptr);				\
  401.35 ++   __o1->next_free += sizeof (const void *);				\
  401.36 +    (void) 0; })
  401.37 + 
  401.38 +-# define obstack_ptr_grow_fast(h,aptr)					\
  401.39 +-  (*((void **) (h)->next_free)++ = (aptr))
  401.40 ++# define obstack_int_grow_fast(OBSTACK,aint)				\
  401.41 ++__extension__								\
  401.42 ++({ struct obstack *__o1 = (OBSTACK);					\
  401.43 ++   *(int *) __o1->next_free = (aint);					\
  401.44 ++   __o1->next_free += sizeof (int);					\
  401.45 ++   (void) 0; })
  401.46 + 
  401.47 +-# define obstack_int_grow_fast(h,aint)					\
  401.48 +-  (*((int *) (h)->next_free)++ = (aint))
  401.49 + 
  401.50 + # define obstack_blank(OBSTACK,length)					\
  401.51 + __extension__								\
   402.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   402.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-mipsel.patch	Sat Feb 24 11:00:05 2007 +0000
   402.3 @@ -0,0 +1,81 @@
   402.4 +Message-ID: <424A8F67.7060307@kaear.co.uk>
   402.5 +Date: Wed, 30 Mar 2005 12:37:11 +0100
   402.6 +From: Piete Sartain <kaear@kaear.co.uk>
   402.7 +To:  crossgcc@sources.redhat.com
   402.8 +Subject: [Patch]  CT 0.3 - glibc-2.2.5-allow-gcc-4.0-mipsel
   402.9 +
  402.10 +
  402.11 +I copied the relevant sections out of 
  402.12 +http://kegel.com/crosstool/crosstool-0.29/patches/glibc-2.3-20050307/glibc-2.3.4-allow-gcc-4.0-powerpc64.patch 
  402.13 +for a mipsel target.
  402.14 +
  402.15 +The build still fails, but now with an assembler error at crtbegin.o.
  402.16 +
  402.17 +[---dank: judging from my old buildlogs, this should fix:
  402.18 +
  402.19 +In file included from dynamic-link.h:21,
  402.20 +                 from dl-reloc.c:153:
  402.21 +../sysdeps/mips/dl-machine.h: In function '_dl_relocate_object':
  402.22 +../sysdeps/mips/dl-machine.h:477: error: invalid storage class for function 'elf_machine_rel'
  402.23 +../sysdeps/mips/dl-machine.h:539: error: invalid storage class for function 'elf_machine_rel_relative'
  402.24 +../sysdeps/mips/dl-machine.h:546: error: invalid storage class for function 'elf_machine_lazy_rel'
  402.25 +../sysdeps/mips/dl-machine.h:554: error: invalid storage class for function 'elf_machine_got_rel'
  402.26 +../sysdeps/mips/dl-machine.h:641: error: invalid storage class for function 'elf_machine_runtime_setup'
  402.27 +make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-0.30/build/mipsel-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/glibc-2.2.5/elf'
  402.28 +make[2]: *** [/home/dank/queue/jobdir.fast2/crosstool-0.30/build/mipsel-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/build-glibc/elf/dl-reloc.o] Error 1
  402.29 +make[1]: *** [elf/subdir_lib] Error 2
  402.30 +make[1]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-0.30/build/mipsel-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/glibc-2.2.5'
  402.31 +make: *** [all] Error 2
  402.32 +---]
  402.33 +
  402.34 +
  402.35 +--- glibc-2.2.5/sysdeps/mips/dl-machine.h.old	2005-03-28 18:19:56.000000000 +0100
  402.36 ++++ glibc-2.2.5/sysdeps/mips/dl-machine.h	2005-03-28 18:25:15.000000000 +0100
  402.37 +@@ -534,14 +534,28 @@
  402.38 +     }
  402.39 + }
  402.40 + 
  402.41 +-static inline void
  402.42 ++#if __GNUC__ >= 4
  402.43 ++  auto inline void
  402.44 ++#else
  402.45 ++  static inline void
  402.46 ++#endif
  402.47 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  402.48 ++  __attribute ((always_inline))
  402.49 ++#endif
  402.50 + elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
  402.51 + 			  ElfW(Addr) *const reloc_addr)
  402.52 + {
  402.53 +   /* XXX Nothing to do.  There is no relative relocation, right?  */
  402.54 + }
  402.55 + 
  402.56 +-static inline void
  402.57 ++#if __GNUC__ >= 4
  402.58 ++  auto inline void
  402.59 ++#else
  402.60 ++  static inline void
  402.61 ++#endif
  402.62 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  402.63 ++  __attribute ((always_inline))
  402.64 ++#endif
  402.65 + elf_machine_lazy_rel (struct link_map *map,
  402.66 + 		      ElfW(Addr) l_addr, const ElfW(Rel) *reloc)
  402.67 + {
  402.68 +@@ -550,7 +564,14 @@
  402.69 + 
  402.70 + #ifndef RTLD_BOOTSTRAP
  402.71 + /* Relocate GOT. */
  402.72 +-static inline void
  402.73 ++#if __GNUC__ >= 4
  402.74 ++  auto inline void
  402.75 ++#else
  402.76 ++  static inline void
  402.77 ++#endif
  402.78 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  402.79 ++  __attribute ((always_inline))
  402.80 ++#endif
  402.81 + elf_machine_got_rel (struct link_map *map, int lazy)
  402.82 + {
  402.83 +   ElfW(Addr) *got;
  402.84 +
   403.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   403.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-msort.patch	Sat Feb 24 11:00:05 2007 +0000
   403.3 @@ -0,0 +1,47 @@
   403.4 +Fixes
   403.5 +
   403.6 +msort.c: In function 'msort_with_tmp':
   403.7 +msort.c:59: error: invalid lvalue in increment
   403.8 +msort.c:59: error: invalid lvalue in increment
   403.9 +msort.c:64: error: invalid lvalue in increment
  403.10 +msort.c:64: error: invalid lvalue in increment
  403.11 +make[2]: *** [/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/build-glibc/stdlib/msort.o] Error 1
  403.12 +make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/glibc-2.2.5/stdlib'
  403.13 +make[1]: *** [stdlib/subdir_lib] Error 2
  403.14 +make[1]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/glibc-2.2.5'
  403.15 +make: *** [all] Error 2 
  403.16 +
  403.17 +when building glibc-2.2.5 with gcc-3.4.
  403.18 +
  403.19 +Taken from ../glibc-2.3.2/glibc-2.3.2-allow-gcc-3.5-msort.patch
  403.20 +and rediffed.
  403.21 +
  403.22 +--- glibc-2.2.5/stdlib/msort.c.old	2001-07-05 21:55:41.000000000 -0700
  403.23 ++++ glibc-2.2.5/stdlib/msort.c	2005-03-10 08:24:24.152204976 -0800
  403.24 +@@ -1,6 +1,6 @@
  403.25 + /* An alternative to qsort, with an identical interface.
  403.26 +    This file is part of the GNU C Library.
  403.27 +-   Copyright (C) 1992, 1995-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
  403.28 ++   Copyright (C) 1992, 1995-1997, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
  403.29 +    Written by Mike Haertel, September 1988.
  403.30 + 
  403.31 +    The GNU C Library is free software; you can redistribute it and/or
  403.32 +@@ -56,12 +56,16 @@
  403.33 + 	if ((*cmp) (b1, b2) <= 0)
  403.34 + 	  {
  403.35 + 	    --n1;
  403.36 +-	    *((op_t *) tmp)++ = *((op_t *) b1)++;
  403.37 ++	    *((op_t *) tmp) = *((op_t *) b1);
  403.38 ++	    tmp += sizeof (op_t);
  403.39 ++	    b1 += sizeof (op_t);
  403.40 + 	  }
  403.41 + 	else
  403.42 + 	  {
  403.43 + 	    --n2;
  403.44 +-	    *((op_t *) tmp)++ = *((op_t *) b2)++;
  403.45 ++	    *((op_t *) tmp) = *((op_t *) b2);
  403.46 ++	    tmp += sizeof (op_t);
  403.47 ++	    b2 += sizeof (op_t);
  403.48 + 	  }
  403.49 +       }
  403.50 +   else
   404.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   404.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-powerpc-procfs.patch	Sat Feb 24 11:00:05 2007 +0000
   404.3 @@ -0,0 +1,54 @@
   404.4 +(See similar patch for glibc-2.3.3)
   404.5 +
   404.6 +This fix discussed here:
   404.7 +http://gcc.gnu.org/ml/gcc/2005-01/msg00509.html
   404.8 +
   404.9 +Fixes
  404.10 +
  404.11 +In file included from ../linuxthreads_db/proc_service.h:20,
  404.12 +                 from ../linuxthreads_db/thread_dbP.h:6,
  404.13 +                 from internals.h:36,
  404.14 +                 from attr.c:23:
  404.15 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:53: error: syntax error before 'elf_vrreg_t'
  404.16 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:53: warning: type defaults to 'int' in declaration of 'elf_vrreg_t'
  404.17 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:53: warning: data definition has no type or storage class
  404.18 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:54: error: syntax error before 'elf_vrregset_t'
  404.19 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:54: warning: type defaults to 'int' in declaration of 'elf_vrregset_t'
  404.20 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:54: warning: data definition has no type or storage class
  404.21 +make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-0.30/build/powerpc-405-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/glibc-2.2.5/linuxthreads'
  404.22 +make[2]: *** [/home/dank/queue/jobdir.fast2/crosstool-0.30/build/powerpc-405-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/build-glibc/linuxthreads/attr.o] Error 1
  404.23 +
  404.24 +From: Martin Egholm Nielsen martin at egholm-nielsen dot dk
  404.25 +To: crossgcc at sources dot redhat dot com
  404.26 +Date: Thu, 24 Mar 2005 18:40:27 +0100
  404.27 +Subject: [Patch] CT 0.29 - glibc-2.2.5-allow-gcc-4.0-powerpc-procfs
  404.28 +
  404.29 +Hi Dan,
  404.30 +
  404.31 +I had to add the following patch in order to make CT 0.29 and glibc 
  404.32 +2.2.5 compile with gcc 4.0 (20050305) and Kernel 2.4.20...
  404.33 +
  404.34 +// Martin
  404.35 +
  404.36 +--- glibc-2.2.5/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h.old	2005-03-24 13:11:39.746062400 +0100
  404.37 ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h	2005-03-24 13:15:11.810996800 +0100
  404.38 +@@ -42,15 +42,10 @@
  404.39 + typedef double elf_fpreg_t;
  404.40 + typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
  404.41 + 
  404.42 +-/* gcc 3.1 and newer support __uint128_t.  */
  404.43 +-#if !__GNUC_PREREQ(3,1)
  404.44 +-typedef struct {
  404.45 +-  unsigned long u[4];
  404.46 +-} __attribute((aligned(16))) __uint128_t;
  404.47 +-#endif
  404.48 +-
  404.49 + /* Altivec registers */
  404.50 +-typedef __uint128_t elf_vrreg_t;
  404.51 ++typedef struct {
  404.52 ++  unsigned int u[4];
  404.53 ++} __attribute__ ((aligned (16))) elf_vrreg_t;
  404.54 + typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG];
  404.55 + 
  404.56 + struct elf_siginfo
  404.57 +
   405.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   405.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-powerpc.patch	Sat Feb 24 11:00:05 2007 +0000
   405.3 @@ -0,0 +1,23 @@
   405.4 +In file included from dynamic-link.h:21,
   405.5 +                 from dl-reloc.c:153:
   405.6 +../sysdeps/powerpc/dl-machine.h: In function '_dl_relocate_object':
   405.7 +../sysdeps/powerpc/dl-machine.h:399: error: invalid storage class for function 'elf_machine_rela_relative'
   405.8 +make[2]: *** [/home/dank/queue/jobdir.dual2/crosstool-dev/build/powerpc-750-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/build-glibc/elf/dl-reloc.o] Error 1
   405.9 +--- glibc-2.2.5/sysdeps/powerpc/dl-machine.h.old	Thu Mar 17 13:28:17 2005
  405.10 ++++ glibc-2.2.5/sysdeps/powerpc/dl-machine.h	Thu Mar 17 13:29:03 2005
  405.11 +@@ -393,7 +393,14 @@
  405.12 + 			    reloc_addr, finaladdr, rinfo);
  405.13 + }
  405.14 + 
  405.15 +-static inline void
  405.16 ++#if __GNUC__ >= 4
  405.17 ++  auto inline void
  405.18 ++#else
  405.19 ++  static inline void
  405.20 ++#endif
  405.21 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  405.22 ++  __attribute ((always_inline))
  405.23 ++#endif
  405.24 + elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
  405.25 + 			   Elf32_Addr *const reloc_addr)
  405.26 + {
   406.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   406.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-sunrpc.patch	Sat Feb 24 11:00:05 2007 +0000
   406.3 @@ -0,0 +1,221 @@
   406.4 +[Taken from ../glibc-2.3.2/glibc-2.3.2-allow-gcc-3.4-sunrpc.patch,
   406.5 +rediffed, and with a fix for sunrpc/auth_none.c that was
   406.6 +inexplicably not included in the original patch.]
   406.7 +
   406.8 +Fixes 
   406.9 +
  406.10 +auth_none.c: In function 'authnone_create':
  406.11 +auth_none.c:83: error: invalid lvalue in assignment
  406.12 +clnt_perr.c: In function '_buf':
  406.13 +clnt_perr.c:68: error: invalid lvalue in assignment 
  406.14 +clnt_raw.c: In function 'clntraw_create':
  406.15 +clnt_raw.c:103: error: invalid lvalue in assignment
  406.16 +clnt_simp.c: In function 'callrpc':
  406.17 +clnt_simp.c:78: error: invalid lvalue in assignment
  406.18 +etc.
  406.19 +
  406.20 +building glibc-2.2.5 with gcc-4.0.
  406.21 +
  406.22 +---
  406.23 +
  406.24 +http://sources.redhat.com/ml/libc-hacker/2004-02/msg00005.html
  406.25 +[Also in CVS, but the original patch is easier to get.]
  406.26 +
  406.27 +Fixes errors like
  406.28 +
  406.29 +clnt_perr.c: In function `_buf':
  406.30 +clnt_perr.c:67: error: invalid lvalue in assignment
  406.31 +
  406.32 +when building with gcc-3.5.
  406.33 +
  406.34 +To: libc-hacker at sources dot redhat dot com
  406.35 +Subject: Fix cast as lvalue in sunrpc
  406.36 +From: Andreas Schwab <schwab at suse dot de>
  406.37 +X-Yow: SHHHH!!  I hear SIX TATTOOED TRUCK-DRIVERS tossing ENGINE BLOCKS
  406.38 + into empty OIL DRUMS dot  dot 
  406.39 +Date: Sun, 08 Feb 2004 17:38:31 +0100
  406.40 +Message-ID: <je4qu1frw8.fsf@sykes.suse.de>
  406.41 +
  406.42 +This fixes the uses of casts as lvalue in the sunrpc code.
  406.43 +
  406.44 +Andreas.
  406.45 +
  406.46 +2004-02-08  Andreas Schwab  <schwab@suse.de>
  406.47 +
  406.48 +	* include/rpc/rpc.h: Declare thread variables with their correct
  406.49 +	type.
  406.50 +	* sunrpc/clnt_perr.c: Don't cast thread variables.
  406.51 +	* sunrpc/clnt_raw.c: Likewise.
  406.52 +	* sunrpc/clnt_simp.c: Likewise.
  406.53 +	* sunrpc/key_call.c: Likewise.
  406.54 +	* sunrpc/svcauth_des.c: Likewise.
  406.55 +	* sunrpc/svc.c: Likewise.
  406.56 +	* sunrpc/svc_raw.c: Likewise.
  406.57 +	* sunrpc/svc_simple.c: Likewise.
  406.58 +
  406.59 +diff -ur glibc-2.2.5/include/rpc/rpc.h glibc-2.2.5-patched/include/rpc/rpc.h
  406.60 +--- glibc-2.2.5/include/rpc/rpc.h	2001-03-25 21:11:32.000000000 -0800
  406.61 ++++ glibc-2.2.5-patched/include/rpc/rpc.h	2005-03-11 13:18:29.810860624 -0800
  406.62 +@@ -18,24 +18,24 @@
  406.63 + 
  406.64 + 	void		*authnone_private_s;	/* auth_none.c */
  406.65 + 
  406.66 +-	void		*clnt_perr_buf_s;	/* clnt_perr.c */
  406.67 ++	char		*clnt_perr_buf_s;	/* clnt_perr.c */
  406.68 + 
  406.69 +-	void		*clntraw_private_s;	/* clnt_raw.c */
  406.70 ++	struct clntraw_private_s *clntraw_private_s;	/* clnt_raw.c */
  406.71 + 
  406.72 +-	void		*callrpc_private_s;	/* clnt_simp.c */
  406.73 ++	struct callrpc_private_s *callrpc_private_s;	/* clnt_simp.c */
  406.74 + 
  406.75 +-	void		*key_call_private_s;	/* key_call.c */
  406.76 ++	struct key_call_private *key_call_private_s;	/* key_call.c */
  406.77 + 
  406.78 +-	void		*authdes_cache_s;	/* svcauth_des.c */
  406.79 +-	void		*authdes_lru_s;		/* svcauth_des.c */
  406.80 ++	struct cache_entry *authdes_cache_s;	/* svcauth_des.c */
  406.81 ++	int		*authdes_lru_s;		/* svcauth_des.c */
  406.82 + 
  406.83 +-	void		*svc_xports_s;		/* svc.c */
  406.84 +-	void		*svc_head_s;		/* svc.c */
  406.85 ++	SVCXPRT		**svc_xports_s;		/* svc.c */
  406.86 ++	struct svc_callout *svc_head_s;		/* svc.c */
  406.87 + 
  406.88 +-	void		*svcraw_private_s;	/* svc_raw.c */
  406.89 ++	struct svcraw_private_s *svcraw_private_s;	/* svc_raw.c */
  406.90 + 
  406.91 +-	void		*svcsimple_proglst_s;	/* svc_simple.c */
  406.92 +-	void		*svcsimple_transp_s;	/* svc_simple.c */
  406.93 ++	struct proglst_ *svcsimple_proglst_s;	/* svc_simple.c */
  406.94 ++	SVCXPRT		*svcsimple_transp_s;	/* svc_simple.c */
  406.95 + };
  406.96 + 
  406.97 + extern struct rpc_thread_variables *__rpc_thread_variables(void)
  406.98 +--- glibc-2.2.5/sunrpc/auth_none.c.old	2005-03-10 16:26:53.874178280 -0800
  406.99 ++++ glibc-2.2.5/sunrpc/auth_none.c	2005-03-10 16:34:24.551664888 -0800
 406.100 +@@ -62,7 +62,7 @@
 406.101 +   u_int mcnt;
 406.102 + };
 406.103 + #ifdef _RPC_THREAD_SAFE_
 406.104 +-#define authnone_private ((struct authnone_private_s *)RPC_THREAD_VARIABLE(authnone_private_s))
 406.105 ++#define authnone_private RPC_THREAD_VARIABLE(authnone_private_s)
 406.106 + #else
 406.107 + static struct authnone_private_s *authnone_private;
 406.108 + #endif
 406.109 +diff -ur glibc-2.2.5/sunrpc/clnt_perr.c glibc-2.2.5-patched/sunrpc/clnt_perr.c
 406.110 +--- glibc-2.2.5/sunrpc/clnt_perr.c	2001-08-16 21:48:31.000000000 -0700
 406.111 ++++ glibc-2.2.5-patched/sunrpc/clnt_perr.c	2005-03-11 13:18:29.812860320 -0800
 406.112 +@@ -56,7 +56,7 @@
 406.113 +  * buf variable in a few functions.  Overriding a global variable
 406.114 +  * with a local variable of the same name is a bad idea, anyway.
 406.115 +  */
 406.116 +-#define buf ((char *)RPC_THREAD_VARIABLE(clnt_perr_buf_s))
 406.117 ++#define buf RPC_THREAD_VARIABLE(clnt_perr_buf_s)
 406.118 + #else
 406.119 + static char *buf;
 406.120 + #endif
 406.121 +diff -ur glibc-2.2.5/sunrpc/clnt_raw.c glibc-2.2.5-patched/sunrpc/clnt_raw.c
 406.122 +--- glibc-2.2.5/sunrpc/clnt_raw.c	2001-03-20 10:34:22.000000000 -0800
 406.123 ++++ glibc-2.2.5-patched/sunrpc/clnt_raw.c	2005-03-11 13:18:29.813860168 -0800
 406.124 +@@ -61,7 +61,7 @@
 406.125 +     u_int mcnt;
 406.126 +   };
 406.127 + #ifdef _RPC_THREAD_SAFE_
 406.128 +-#define clntraw_private ((struct clntraw_private_s *)RPC_THREAD_VARIABLE(clntraw_private_s))
 406.129 ++#define clntraw_private RPC_THREAD_VARIABLE(clntraw_private_s)
 406.130 + #else
 406.131 + static struct clntraw_private_s *clntraw_private;
 406.132 + #endif
 406.133 +diff -ur glibc-2.2.5/sunrpc/clnt_simp.c glibc-2.2.5-patched/sunrpc/clnt_simp.c
 406.134 +--- glibc-2.2.5/sunrpc/clnt_simp.c	2001-08-19 23:28:21.000000000 -0700
 406.135 ++++ glibc-2.2.5-patched/sunrpc/clnt_simp.c	2005-03-11 13:18:29.814860016 -0800
 406.136 +@@ -55,7 +55,7 @@
 406.137 +     char *oldhost;
 406.138 +   };
 406.139 + #ifdef _RPC_THREAD_SAFE_
 406.140 +-#define callrpc_private ((struct callrpc_private_s *)RPC_THREAD_VARIABLE(callrpc_private_s))
 406.141 ++#define callrpc_private RPC_THREAD_VARIABLE(callrpc_private_s)
 406.142 + #else
 406.143 + static struct callrpc_private_s *callrpc_private;
 406.144 + #endif
 406.145 +diff -ur glibc-2.2.5/sunrpc/key_call.c glibc-2.2.5-patched/sunrpc/key_call.c
 406.146 +--- glibc-2.2.5/sunrpc/key_call.c	2001-03-20 10:34:22.000000000 -0800
 406.147 ++++ glibc-2.2.5-patched/sunrpc/key_call.c	2005-03-11 13:18:29.816859712 -0800
 406.148 +@@ -360,7 +360,7 @@
 406.149 +   uid_t   uid;            /* user-id at last authorization */
 406.150 + };
 406.151 + #ifdef _RPC_THREAD_SAFE_
 406.152 +-#define key_call_private_main ((struct  key_call_private *)RPC_THREAD_VARIABLE(key_call_private_s))
 406.153 ++#define key_call_private_main RPC_THREAD_VARIABLE(key_call_private_s)
 406.154 + #else
 406.155 + static struct key_call_private *key_call_private_main;
 406.156 + #endif
 406.157 +diff -ur glibc-2.2.5/sunrpc/svcauth_des.c glibc-2.2.5-patched/sunrpc/svcauth_des.c
 406.158 +--- glibc-2.2.5/sunrpc/svcauth_des.c	2001-08-19 23:37:09.000000000 -0700
 406.159 ++++ glibc-2.2.5-patched/sunrpc/svcauth_des.c	2005-03-11 13:18:29.821858952 -0800
 406.160 +@@ -72,8 +72,8 @@
 406.161 +     char *localcred;		/* generic local credential */
 406.162 +   };
 406.163 + #ifdef _RPC_THREAD_SAFE_
 406.164 +-#define authdes_cache ((struct cache_entry *)RPC_THREAD_VARIABLE(authdes_cache_s))
 406.165 +-#define authdes_lru ((int *)RPC_THREAD_VARIABLE(authdes_lru_s))
 406.166 ++#define authdes_cache RPC_THREAD_VARIABLE(authdes_cache_s)
 406.167 ++#define authdes_lru RPC_THREAD_VARIABLE(authdes_lru_s)
 406.168 + #else
 406.169 + static struct cache_entry *authdes_cache;
 406.170 + static int *authdes_lru;
 406.171 +diff -ur glibc-2.2.5/sunrpc/svc.c glibc-2.2.5-patched/sunrpc/svc.c
 406.172 +--- glibc-2.2.5/sunrpc/svc.c	2001-03-20 10:34:22.000000000 -0800
 406.173 ++++ glibc-2.2.5-patched/sunrpc/svc.c	2005-03-11 13:18:29.817859560 -0800
 406.174 +@@ -44,7 +44,7 @@
 406.175 + #include <sys/poll.h>
 406.176 + 
 406.177 + #ifdef _RPC_THREAD_SAFE_
 406.178 +-#define xports ((SVCXPRT **)RPC_THREAD_VARIABLE(svc_xports_s))
 406.179 ++#define xports RPC_THREAD_VARIABLE(svc_xports_s)
 406.180 + #else
 406.181 + static SVCXPRT **xports;
 406.182 + #endif
 406.183 +@@ -63,7 +63,7 @@
 406.184 +   void (*sc_dispatch) (struct svc_req *, SVCXPRT *);
 406.185 + };
 406.186 + #ifdef _RPC_THREAD_SAFE_
 406.187 +-#define svc_head ((struct svc_callout *)RPC_THREAD_VARIABLE(svc_head_s))
 406.188 ++#define svc_head RPC_THREAD_VARIABLE(svc_head_s)
 406.189 + #else
 406.190 + static struct svc_callout *svc_head;
 406.191 + #endif
 406.192 +diff -ur glibc-2.2.5/sunrpc/svc_raw.c glibc-2.2.5-patched/sunrpc/svc_raw.c
 406.193 +--- glibc-2.2.5/sunrpc/svc_raw.c	2001-03-20 10:34:22.000000000 -0800
 406.194 ++++ glibc-2.2.5-patched/sunrpc/svc_raw.c	2005-03-11 13:18:29.818859408 -0800
 406.195 +@@ -54,7 +54,7 @@
 406.196 +     char verf_body[MAX_AUTH_BYTES];
 406.197 +   };
 406.198 + #ifdef _RPC_THREAD_SAFE_
 406.199 +-#define svcraw_private ((struct svcraw_private_s *)RPC_THREAD_VARIABLE(svcraw_private_s))
 406.200 ++#define svcraw_private RPC_THREAD_VARIABLE(svcraw_private_s)
 406.201 + #else
 406.202 + static struct svcraw_private_s *svcraw_private;
 406.203 + #endif
 406.204 +diff -ur glibc-2.2.5/sunrpc/svc_simple.c glibc-2.2.5-patched/sunrpc/svc_simple.c
 406.205 +--- glibc-2.2.5/sunrpc/svc_simple.c	2001-08-17 00:16:04.000000000 -0700
 406.206 ++++ glibc-2.2.5-patched/sunrpc/svc_simple.c	2005-03-11 13:18:29.820859104 -0800
 406.207 +@@ -62,7 +62,7 @@
 406.208 +     struct proglst_ *p_nxt;
 406.209 +   };
 406.210 + #ifdef _RPC_THREAD_SAFE_
 406.211 +-#define proglst ((struct proglst_ *)RPC_THREAD_VARIABLE(svcsimple_proglst_s))
 406.212 ++#define proglst RPC_THREAD_VARIABLE(svcsimple_proglst_s)
 406.213 + #else
 406.214 + static struct proglst_ *proglst;
 406.215 + #endif
 406.216 +@@ -70,7 +70,7 @@
 406.217 + 
 406.218 + static void universal (struct svc_req *rqstp, SVCXPRT *transp_s);
 406.219 + #ifdef _RPC_THREAD_SAFE_
 406.220 +-#define transp ((SVCXPRT *)RPC_THREAD_VARIABLE(svcsimple_transp_s))
 406.221 ++#define transp RPC_THREAD_VARIABLE(svcsimple_transp_s)
 406.222 + #else
 406.223 + static SVCXPRT *transp;
 406.224 + #endif
   407.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   407.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-alpha-pwrite64.patch	Sat Feb 24 11:00:05 2007 +0000
   407.3 @@ -0,0 +1,58 @@
   407.4 +Fix for this error:
   407.5 +
   407.6 +../sysdeps/unix/sysv/linux/pread.c: In function `__libc_pread':
   407.7 +../sysdeps/unix/sysv/linux/pread.c:52: error: `__NR_pread' undeclared (first use in this function)
   407.8 +../sysdeps/unix/sysv/linux/pread.c:52: error: (Each undeclared identifier is reported only once
   407.9 +../sysdeps/unix/sysv/linux/pread.c:52: error: for each function it appears in.)
  407.10 +make[2]: *** [/home/dank/crosstool-0.28/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.2.5/build-glibc/posix/pread.o] Error 1
  407.11 +make[2]: Leaving directory `/home/dank/crosstool-0.28/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.2.5/glibc-2.2.5/posix'
  407.12 +make[1]: *** [posix/subdir_lib] Error 2
  407.13 +make[1]: Leaving directory `/home/dank/crosstool-0.28/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.2.5/glibc-2.2.5'
  407.14 +make: *** [all] Error 2
  407.15 +
  407.16 +[ Same as glibc-2.3.2-alpha-pwrite.patch except for copyright date ]
  407.17 +
  407.18 +extracted from GLIBC CVS by Dan Kegel
  407.19 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.diff?r1=1.14&r2=1.15&cvsroot=glibc'
  407.20 +(to match context of...)
  407.21 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.diff?r1=1.16&r2=1.17&cvsroot=glibc'
  407.22 +and rediffed.
  407.23 +
  407.24 +cf. 
  407.25 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00038.html
  407.26 +
  407.27 +Originally thought we needed this hunk, too:
  407.28 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00037.html
  407.29 +but it seems the sysdep.h change is sufficient, and works better 
  407.30 +when compiling against linux-2.4.
  407.31 +
  407.32 +===================================================================
  407.33 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h.old	2004-05-24 22:21:44.000000000 -0700
  407.34 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h	2004-05-24 22:22:48.000000000 -0700
  407.35 +@@ -1,3 +1,3 @@
  407.36 +-/* Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
  407.37 ++/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2004 Free Software Foundation, Inc.
  407.38 +    This file is part of the GNU C Library.
  407.39 +    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
  407.40 +@@ -60,6 +60,21 @@
  407.41 + #define __NR_osf_getsysinfo	256
  407.42 + #define __NR_osf_setsysinfo	257
  407.43 + 
  407.44 ++/* Help old kernel headers where particular syscalls are not available.  */
  407.45 ++#ifndef __NR_semtimedop
  407.46 ++# define __NR_semtimedop	423
  407.47 ++#endif
  407.48 ++
  407.49 ++/* This is a kludge to make syscalls.list find these under the names
  407.50 ++   pread and pwrite, since some kernel headers define those names
  407.51 ++   and some define the *64 names for the same system calls.  */
  407.52 ++#if !defined __NR_pread && defined __NR_pread64
  407.53 ++# define __NR_pread __NR_pread64
  407.54 ++#endif
  407.55 ++#if !defined __NR_pwrite && defined __NR_pwrite64
  407.56 ++# define __NR_pwrite __NR_pwrite64
  407.57 ++#endif
  407.58 ++
  407.59 + /*
  407.60 +  * In order to get the hidden arguments for rt_sigaction set up
  407.61 +  * properly, we need to call the assembly version.  Detect this in the
   408.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   408.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-arm-pwrite64.patch	Sat Feb 24 11:00:05 2007 +0000
   408.3 @@ -0,0 +1,30 @@
   408.4 +Should fix
   408.5 +
   408.6 +../sysdeps/unix/sysv/linux/pread.c: In function `__libc_pread':
   408.7 +../sysdeps/unix/sysv/linux/pread.c:52: error: `__NR_pread' undeclared (first use in this function)
   408.8 +../sysdeps/unix/sysv/linux/pread.c:52: error: (Each undeclared identifier is reported only once
   408.9 +../sysdeps/unix/sysv/linux/pread.c:52: error: for each function it appears in.)
  408.10 +make[2]: *** [/home/dank/crosstool-0.28/build/arm-9tdmi-linux-gnu/gcc-3.4.1-glibc-2.2.5/build-glibc/posix/pread.o] Error 1
  408.11 +make[2]: Leaving directory `/home/dank/crosstool-0.28/build/arm-9tdmi-linux-gnu/gcc-3.4.1-glibc-2.2.5/glibc-2.2.5/posix'
  408.12 +make[1]: *** [posix/subdir_lib] Error 2
  408.13 +
  408.14 +Copied from similar patch for alpha.
  408.15 +
  408.16 +--- glibc-2.2.5-orig/sysdeps/unix/sysv/linux/arm/sysdep.h	2001-07-05 21:56:13.000000000 -0700
  408.17 ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/arm/sysdep.h	2004-08-07 10:45:26.000000000 -0700
  408.18 +@@ -32,6 +32,15 @@
  408.19 + #define SWI_BASE  (0x900000)
  408.20 + #define SYS_ify(syscall_name)	(__NR_##syscall_name)
  408.21 + 
  408.22 ++/* This is a kludge to make syscalls.list find these under the names
  408.23 ++   pread and pwrite, since some kernel headers define those names
  408.24 ++   and some define the *64 names for the same system calls.  */
  408.25 ++#if !defined __NR_pread && defined __NR_pread64
  408.26 ++# define __NR_pread __NR_pread64
  408.27 ++#endif
  408.28 ++#if !defined __NR_pwrite && defined __NR_pwrite64
  408.29 ++# define __NR_pwrite __NR_pwrite64
  408.30 ++#endif
  408.31 + 
  408.32 + #ifdef __ASSEMBLER__
  408.33 + 
   409.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   409.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-crosstest.patch	Sat Feb 24 11:00:05 2007 +0000
   409.3 @@ -0,0 +1,27 @@
   409.4 +Fixes errors like
   409.5 +  /build-glibc/dlfcn/glrefmain: cannot load `glreflib1.so'
   409.6 +in glibc regression test
   409.7 +
   409.8 +--- glibc-2.2.5/dlfcn/Makefile.old	Thu Jul 24 16:30:20 2003
   409.9 ++++ glibc-2.2.5/dlfcn/Makefile	Thu Jul 24 17:25:01 2003
  409.10 +@@ -60,6 +60,8 @@
  409.11 + test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names)))
  409.12 + $(test-modules): $(objpfx)%.so: $(objpfx)%.os
  409.13 + 	$(build-module)
  409.14 ++# without following rule, test-modules don't get built when cross-compiling
  409.15 ++tests: $(test-modules)
  409.16 + 
  409.17 + $(objpfx)glrefmain: $(libdl)
  409.18 + $(objpfx)glrefmain.out: $(objpfx)glrefmain \
  409.19 +--- glibc-2.2.5/elf/Makefile.old	Thu Jul 24 18:17:12 2003
  409.20 ++++ glibc-2.2.5/elf/Makefile	Thu Jul 24 18:18:58 2003
  409.21 +@@ -263,6 +263,9 @@
  409.22 + test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
  409.23 + generated += $(addsuffix .so,$(strip $(modules-names)))
  409.24 + 
  409.25 ++# without following rule, test-modules don't get built when cross-compiling
  409.26 ++tests: $(test-modules)
  409.27 ++
  409.28 + ifeq (yes,$(build-shared))
  409.29 + ifeq ($(cross-compiling),no)
  409.30 + tests: $(objpfx)tst-pathopt.out
   410.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   410.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-crossyes.patch	Sat Feb 24 11:00:05 2007 +0000
   410.3 @@ -0,0 +1,11 @@
   410.4 +--- glibc-2.2.5/configure.old	2003-05-30 21:51:13.000000000 -0700
   410.5 ++++ glibc-2.2.5/configure	2003-05-30 21:51:23.000000000 -0700
   410.6 +@@ -1738,7 +1738,7 @@
   410.7 +   ac_cv_prog_cc_works=yes
   410.8 +   # If we can't run a trivial program, we are probably using a cross compiler.
   410.9 +   if (./conftest; exit) 2>/dev/null; then
  410.10 +-    ac_cv_prog_cc_cross=no
  410.11 ++    ac_cv_prog_cc_cross=yes
  410.12 +   else
  410.13 +     ac_cv_prog_cc_cross=yes
  410.14 +   fi
   411.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   411.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-cygwin.patch	Sat Feb 24 11:00:05 2007 +0000
   411.3 @@ -0,0 +1,89 @@
   411.4 +Fixes
   411.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
   411.6 +...
   411.7 +when building glibc-2.3.2 on cygwin
   411.8 +
   411.9 +Idea from
  411.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
  411.11 +forward ported to glibc-2.3.2.
  411.12 +Basically, make glibc use .oST as suffix for 'object static'
  411.13 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
  411.14 +(Original patch had .on, but .oST is more mnemonic for 'object static')
  411.15 +
  411.16 +
  411.17 +diff -Naur from-cvs/Makeconfig patched/Makeconfig
  411.18 +--- from-cvs/Makeconfig	Fri Jan 11 14:40:35 2002
  411.19 ++++ patched/Makeconfig	Fri Jan 11 15:07:30 2002
  411.20 +@@ -439,13 +439,13 @@
  411.21 + # run the linked programs.
  411.22 + link-libc = -Wl,-rpath-link=$(rpath-link) \
  411.23 + 	    $(common-objpfx)libc.so$(libc.so-version) \
  411.24 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
  411.25 ++	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
  411.26 + # This is how to find at build-time things that will be installed there.
  411.27 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
  411.28 + else
  411.29 + ifneq (,$(findstring aix,$(config-os)))
  411.30 + link-libc = $(common-objpfx)libc.a \
  411.31 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
  411.32 ++	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
  411.33 + rpath-dirs = math dlfcn nss nis rt resolv crypt
  411.34 + endif
  411.35 + endif
  411.36 +@@ -649,7 +649,7 @@
  411.37 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
  411.38 + # to pass different flags for each flavor.
  411.39 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
  411.40 +-all-object-suffixes := .o .os .op .og .ob .oS
  411.41 ++all-object-suffixes := .o .os .op .og .ob .oST
  411.42 + object-suffixes :=
  411.43 + CPPFLAGS-.o = $(pic-default)
  411.44 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
  411.45 +@@ -703,14 +703,14 @@
  411.46 + 
  411.47 + ifeq (yes,$(build-shared))
  411.48 + # Build special library that contains the static-only routines for libc.
  411.49 +-object-suffixes-for-libc += .oS
  411.50 ++object-suffixes-for-libc += .oST
  411.51 + 
  411.52 + # Must build the routines as PIC, though, because they can end up in (users')
  411.53 + # shared objects.  We don't want to use CFLAGS-os because users may, for
  411.54 + # example, make that processor-specific.
  411.55 +-CFLAGS-.oS = $(CFLAGS-.o) $(pic-ccflag)
  411.56 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC
  411.57 +-libtype.oS = lib%_nonshared.a
  411.58 ++CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag)
  411.59 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC
  411.60 ++libtype.oST = lib%_nonshared.a
  411.61 + endif
  411.62 + 
  411.63 + 
  411.64 +diff -Naur from-cvs/Makerules patched/Makerules
  411.65 +--- from-cvs/Makerules	Fri Jan 11 14:40:42 2002
  411.66 ++++ patched/Makerules	Fri Jan 11 15:06:00 2002
  411.67 +@@ -361,7 +361,7 @@
  411.68 + # Bounded pointer thunks are only built for *.ob
  411.69 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
  411.70 + 
  411.71 +-elide-routines.oS += $(filter-out $(static-only-routines),\
  411.72 ++elide-routines.oST += $(filter-out $(static-only-routines),\
  411.73 + 				  $(routines) $(aux) $(sysdep_routines)) \
  411.74 + 		     $(elide-bp-thunks)
  411.75 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
  411.76 +@@ -842,14 +842,14 @@
  411.77 + # of the files are taken by the linker.
  411.78 + install: $(inst_libdir)/libc.so
  411.79 + $(inst_libdir)/libc.so: $(common-objpfx)libc.so$(libc.so-version) \
  411.80 +-			$(inst_libdir)/$(patsubst %,$(libtype.oS),\
  411.81 ++			$(inst_libdir)/$(patsubst %,$(libtype.oST),\
  411.82 + 						  $(libprefix)$(libc-name)) \
  411.83 + 			$(+force)
  411.84 + 	(echo '/* GNU ld script';\
  411.85 + 	 echo '   Use the shared library, but some functions are only in';\
  411.86 + 	 echo '   the static library, so try that secondarily.  */';\
  411.87 + 	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
  411.88 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
  411.89 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
  411.90 + 	      ')' \
  411.91 + 	) > $@.new
  411.92 + 	mv -f $@.new $@
   412.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   412.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-hhl-powerpc-fpu.patch	Sat Feb 24 11:00:05 2007 +0000
   412.3 @@ -0,0 +1,1134 @@
   412.4 +# See http://sources.redhat.com/ml/crossgcc/2002-05/msg00132.html
   412.5 +# This patch is taken directly from the Montavista Hard Hat Linux 2.0 source RPMs,
   412.6 +# but has been rediffed against glibc-2.2.5
   412.7 +
   412.8 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/Dist glibc-2.2.5/sysdeps/powerpc/Dist
   412.9 +--- glibc-2.2.5.old/sysdeps/powerpc/Dist	Fri Jun 30 23:30:21 2000
  412.10 ++++ glibc-2.2.5/sysdeps/powerpc/Dist	Thu Jul 10 11:43:17 2003
  412.11 +@@ -1,9 +1,6 @@
  412.12 + dl-machine.c
  412.13 + dl-start.S
  412.14 + ppc-mcount.S
  412.15 +-fe_nomask.c
  412.16 +-fprrest.S
  412.17 +-fprsave.S
  412.18 + gprsave1.S
  412.19 + gprsave0.S
  412.20 + gprrest1.S
  412.21 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/Makefile glibc-2.2.5/sysdeps/powerpc/Makefile
  412.22 +--- glibc-2.2.5.old/sysdeps/powerpc/Makefile	Mon Nov 27 15:32:47 2000
  412.23 ++++ glibc-2.2.5/sysdeps/powerpc/Makefile	Thu Jul 10 11:43:17 2003
  412.24 +@@ -3,16 +3,12 @@
  412.25 + +cflags += -mnew-mnemonics -Wa,-mppc -mpowerpc
  412.26 + asm-CPPFLAGS += -Wa,-mppc
  412.27 + 
  412.28 +-ifeq ($(subdir),math)
  412.29 +-libm-support += fenv_const fe_nomask
  412.30 +-endif
  412.31 +-
  412.32 + ifeq ($(subdir),gmon)
  412.33 + sysdep_routines += ppc-mcount
  412.34 + endif
  412.35 + 
  412.36 + ifeq ($(subdir),misc)
  412.37 +-sysdep_routines += gprsave0 gprrest0 gprsave1 gprrest1 fprsave fprrest
  412.38 ++sysdep_routines += gprsave0 gprrest0 gprsave1 gprrest1
  412.39 + endif
  412.40 + 
  412.41 + # On PPC, -fpic works until the GOT contains 2^15 bytes, and possibly
  412.42 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/Versions glibc-2.2.5/sysdeps/powerpc/Versions
  412.43 +--- glibc-2.2.5.old/sysdeps/powerpc/Versions	Mon Feb 28 13:27:57 2000
  412.44 ++++ glibc-2.2.5/sysdeps/powerpc/Versions	Thu Jul 10 11:43:17 2003
  412.45 +@@ -1,8 +1,4 @@
  412.46 + libm {
  412.47 +-  GLIBC_2.1 {
  412.48 +-    # symbols used in macros from sysdeps/powerpc/bits/fenv.h
  412.49 +-    __fe_dfl_env; __fe_enabled_env; __fe_nonieee_env; __fe_nomask_env;
  412.50 +-  }
  412.51 +   GLIBC_2.2 {
  412.52 +     # Special functions to save and restore registers used by the
  412.53 +     # runtime libraries.
  412.54 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/__longjmp.S glibc-2.2.5/sysdeps/powerpc/__longjmp.S
  412.55 +--- glibc-2.2.5.old/sysdeps/powerpc/__longjmp.S	Thu Jul  5 21:56:01 2001
  412.56 ++++ glibc-2.2.5/sysdeps/powerpc/__longjmp.S	Thu Jul 10 11:43:17 2003
  412.57 +@@ -24,6 +24,8 @@
  412.58 + #include <bp-sym.h>
  412.59 + #include <bp-asm.h>
  412.60 + 
  412.61 ++/* The FPU loads have been removed from this file - see fpu/__longjmp.S */
  412.62 ++
  412.63 + ENTRY (BP_SYM (__longjmp))
  412.64 + 	CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
  412.65 + 
  412.66 +@@ -31,44 +33,26 @@
  412.67 + 	lwz r2,(JB_GPR2*4)(r3)
  412.68 + 	lwz r0,(JB_LR*4)(r3)
  412.69 + 	lwz r14,((JB_GPRS+0)*4)(r3)
  412.70 +-	lfd fp14,((JB_FPRS+0*2)*4)(r3)
  412.71 + 	lwz r15,((JB_GPRS+1)*4)(r3)
  412.72 +-	lfd fp15,((JB_FPRS+1*2)*4)(r3)
  412.73 + 	lwz r16,((JB_GPRS+2)*4)(r3)
  412.74 +-	lfd fp16,((JB_FPRS+2*2)*4)(r3)
  412.75 + 	lwz r17,((JB_GPRS+3)*4)(r3)
  412.76 +-	lfd fp17,((JB_FPRS+3*2)*4)(r3)
  412.77 + 	lwz r18,((JB_GPRS+4)*4)(r3)
  412.78 +-	lfd fp18,((JB_FPRS+4*2)*4)(r3)
  412.79 + 	lwz r19,((JB_GPRS+5)*4)(r3)
  412.80 +-	lfd fp19,((JB_FPRS+5*2)*4)(r3)
  412.81 + 	lwz r20,((JB_GPRS+6)*4)(r3)
  412.82 +-	lfd fp20,((JB_FPRS+6*2)*4)(r3)
  412.83 + 	mtlr r0
  412.84 + 	lwz r21,((JB_GPRS+7)*4)(r3)
  412.85 +-	lfd fp21,((JB_FPRS+7*2)*4)(r3)
  412.86 + 	lwz r22,((JB_GPRS+8)*4)(r3)
  412.87 +-	lfd fp22,((JB_FPRS+8*2)*4)(r3)
  412.88 + 	lwz r0,(JB_CR*4)(r3)
  412.89 + 	lwz r23,((JB_GPRS+9)*4)(r3)
  412.90 +-	lfd fp23,((JB_FPRS+9*2)*4)(r3)
  412.91 + 	lwz r24,((JB_GPRS+10)*4)(r3)
  412.92 +-	lfd fp24,((JB_FPRS+10*2)*4)(r3)
  412.93 + 	lwz r25,((JB_GPRS+11)*4)(r3)
  412.94 +-	lfd fp25,((JB_FPRS+11*2)*4)(r3)
  412.95 + 	mtcrf 0xFF,r0
  412.96 + 	lwz r26,((JB_GPRS+12)*4)(r3)
  412.97 +-	lfd fp26,((JB_FPRS+12*2)*4)(r3)
  412.98 + 	lwz r27,((JB_GPRS+13)*4)(r3)
  412.99 +-	lfd fp27,((JB_FPRS+13*2)*4)(r3)
 412.100 + 	lwz r28,((JB_GPRS+14)*4)(r3)
 412.101 +-	lfd fp28,((JB_FPRS+14*2)*4)(r3)
 412.102 + 	lwz r29,((JB_GPRS+15)*4)(r3)
 412.103 +-	lfd fp29,((JB_FPRS+15*2)*4)(r3)
 412.104 + 	lwz r30,((JB_GPRS+16)*4)(r3)
 412.105 +-	lfd fp30,((JB_FPRS+16*2)*4)(r3)
 412.106 + 	lwz r31,((JB_GPRS+17)*4)(r3)
 412.107 +-	lfd fp31,((JB_FPRS+17*2)*4)(r3)
 412.108 + 	mr r3,r4
 412.109 + 	blr
 412.110 + END (BP_SYM (__longjmp))
 412.111 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/bits/setjmp.h glibc-2.2.5/sysdeps/powerpc/bits/setjmp.h
 412.112 +--- glibc-2.2.5.old/sysdeps/powerpc/bits/setjmp.h	Thu Jul  5 21:56:01 2001
 412.113 ++++ glibc-2.2.5/sysdeps/powerpc/bits/setjmp.h	Thu Jul 10 11:43:17 2003
 412.114 +@@ -17,6 +17,7 @@
 412.115 +    02111-1307 USA.  */
 412.116 + 
 412.117 + /* Define the machine-dependent type `jmp_buf'.  PowerPC version.  */
 412.118 ++/* For processors without floating point. */
 412.119 + 
 412.120 + #ifndef _SETJMP_H
 412.121 + # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
 412.122 +@@ -33,12 +34,11 @@
 412.123 + # define JB_LR     2  /* The address we will return to */
 412.124 + # define JB_GPRS   3  /* GPRs 14 through 31 are saved, 18 in total */
 412.125 + # define JB_CR     21 /* Condition code registers. */
 412.126 +-# define JB_FPRS   22 /* FPRs 14 through 31 are saved, 18*2 words total */
 412.127 +-# define JB_SIZE   (58*4)
 412.128 ++# define JB_SIZE   (22*4)
 412.129 + #endif
 412.130 + 
 412.131 + #ifndef	_ASM
 412.132 +-typedef long int __jmp_buf[58];
 412.133 ++typedef long int __jmp_buf[22];
 412.134 + #endif
 412.135 + 
 412.136 + /* Test if longjmp to JMPBUF would unwind the frame
 412.137 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fclrexcpt.c glibc-2.2.5/sysdeps/powerpc/fclrexcpt.c
 412.138 +--- glibc-2.2.5.old/sysdeps/powerpc/fclrexcpt.c	Thu Jul  5 21:56:01 2001
 412.139 ++++ glibc-2.2.5/sysdeps/powerpc/fclrexcpt.c	Wed Dec 31 16:00:00 1969
 412.140 +@@ -1,48 +0,0 @@
 412.141 +-/* Clear given exceptions in current floating-point environment.
 412.142 +-   Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
 412.143 +-   This file is part of the GNU C Library.
 412.144 +-
 412.145 +-   The GNU C Library is free software; you can redistribute it and/or
 412.146 +-   modify it under the terms of the GNU Lesser General Public
 412.147 +-   License as published by the Free Software Foundation; either
 412.148 +-   version 2.1 of the License, or (at your option) any later version.
 412.149 +-
 412.150 +-   The GNU C Library is distributed in the hope that it will be useful,
 412.151 +-   but WITHOUT ANY WARRANTY; without even the implied warranty of
 412.152 +-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 412.153 +-   Lesser General Public License for more details.
 412.154 +-
 412.155 +-   You should have received a copy of the GNU Lesser General Public
 412.156 +-   License along with the GNU C Library; if not, write to the Free
 412.157 +-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 412.158 +-   02111-1307 USA.  */
 412.159 +-
 412.160 +-#include <fenv_libc.h>
 412.161 +-
 412.162 +-#undef feclearexcept
 412.163 +-int
 412.164 +-__feclearexcept (int excepts)
 412.165 +-{
 412.166 +-  fenv_union_t u;
 412.167 +-
 412.168 +-  /* Get the current state.  */
 412.169 +-  u.fenv = fegetenv_register ();
 412.170 +-
 412.171 +-  /* Clear the relevant bits.  */
 412.172 +-  u.l[1] = u.l[1] & ~((-(excepts >> (31 - FPSCR_VX) & 1) & FE_ALL_INVALID)
 412.173 +-		      | (excepts & FPSCR_STICKY_BITS));
 412.174 +-
 412.175 +-  /* Put the new state in effect.  */
 412.176 +-  fesetenv_register (u.fenv);
 412.177 +-
 412.178 +-  /* Success.  */
 412.179 +-  return 0;
 412.180 +-}
 412.181 +-
 412.182 +-#include <shlib-compat.h>
 412.183 +-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
 412.184 +-strong_alias (__feclearexcept, __old_feclearexcept)
 412.185 +-compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
 412.186 +-#endif
 412.187 +-
 412.188 +-versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
 412.189 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fe_nomask.c glibc-2.2.5/sysdeps/powerpc/fe_nomask.c
 412.190 +--- glibc-2.2.5.old/sysdeps/powerpc/fe_nomask.c	Thu Jul  5 21:56:01 2001
 412.191 ++++ glibc-2.2.5/sysdeps/powerpc/fe_nomask.c	Wed Dec 31 16:00:00 1969
 412.192 +@@ -1,32 +0,0 @@
 412.193 +-/* Procedure definition for FE_NOMASK_ENV.
 412.194 +-   Copyright (C) 1997 Free Software Foundation, Inc.
 412.195 +-   This file is part of the GNU C Library.
 412.196 +-
 412.197 +-   The GNU C Library is free software; you can redistribute it and/or
 412.198 +-   modify it under the terms of the GNU Lesser General Public
 412.199 +-   License as published by the Free Software Foundation; either
 412.200 +-   version 2.1 of the License, or (at your option) any later version.
 412.201 +-
 412.202 +-   The GNU C Library is distributed in the hope that it will be useful,
 412.203 +-   but WITHOUT ANY WARRANTY; without even the implied warranty of
 412.204 +-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 412.205 +-   Lesser General Public License for more details.
 412.206 +-
 412.207 +-   You should have received a copy of the GNU Lesser General Public
 412.208 +-   License along with the GNU C Library; if not, write to the Free
 412.209 +-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 412.210 +-   02111-1307 USA.  */
 412.211 +-
 412.212 +-#include <fenv.h>
 412.213 +-#include <errno.h>
 412.214 +-
 412.215 +-/* This is presently a stub, until it's decided how the kernels should
 412.216 +-   support this.  */
 412.217 +-
 412.218 +-const fenv_t *
 412.219 +-__fe_nomask_env(void)
 412.220 +-{
 412.221 +-  __set_errno (ENOSYS);
 412.222 +-  return FE_ENABLED_ENV;
 412.223 +-}
 412.224 +-stub_warning (__fe_nomask_env)
 412.225 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fprrest.S glibc-2.2.5/sysdeps/powerpc/fprrest.S
 412.226 +--- glibc-2.2.5.old/sysdeps/powerpc/fprrest.S	Thu Jul  5 21:56:01 2001
 412.227 ++++ glibc-2.2.5/sysdeps/powerpc/fprrest.S	Wed Dec 31 16:00:00 1969
 412.228 +@@ -1,94 +0,0 @@
 412.229 +-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
 412.230 +-   This file is part of the GNU C Library.
 412.231 +-
 412.232 +-   The GNU C Library is free software; you can redistribute it and/or
 412.233 +-   modify it under the terms of the GNU Lesser General Public
 412.234 +-   License as published by the Free Software Foundation; either
 412.235 +-   version 2.1 of the License, or (at your option) any later version.
 412.236 +-
 412.237 +-   The GNU C Library is distributed in the hope that it will be useful,
 412.238 +-   but WITHOUT ANY WARRANTY; without even the implied warranty of
 412.239 +-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 412.240 +-   Lesser General Public License for more details.
 412.241 +-
 412.242 +-   You should have received a copy of the GNU Lesser General Public
 412.243 +-   License along with the GNU C Library; if not, write to the Free
 412.244 +-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 412.245 +-   02111-1307 USA.  */
 412.246 +-
 412.247 +-/*
 412.248 +-    Floating Point Registers (FPRs) restore routine
 412.249 +-*/
 412.250 +-
 412.251 +-#include <sysdep.h>
 412.252 +-
 412.253 +-ENTRY(_restfpr_all)
 412.254 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14)
 412.255 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_14)
 412.256 +-C_TEXT(_restf14):
 412.257 +-C_TEXT(_restfpr_14):	lfd	fp14,-144(r1)
 412.258 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15)
 412.259 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_15)
 412.260 +-C_TEXT(_restf15):
 412.261 +-C_TEXT(_restfpr_15):	lfd	fp15,-136(r1)
 412.262 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16)
 412.263 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_16)
 412.264 +-C_TEXT(_restf16):
 412.265 +-C_TEXT(_restfpr_16):	lfd	fp16,-128(r1)
 412.266 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17)
 412.267 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_17)
 412.268 +-C_TEXT(_restf17):
 412.269 +-C_TEXT(_restfpr_17):	lfd	fp17,-120(r1)
 412.270 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18)
 412.271 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_18)
 412.272 +-C_TEXT(_restf18):
 412.273 +-C_TEXT(_restfpr_18):	lfd	fp18,-112(r1)
 412.274 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19)
 412.275 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_19)
 412.276 +-C_TEXT(_restf19):
 412.277 +-C_TEXT(_restfpr_19):	lfd	fp19,-104(r1)
 412.278 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20)
 412.279 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_20)
 412.280 +-C_TEXT(_restf20):
 412.281 +-C_TEXT(_restfpr_20):	lfd	fp20,-96(r1)
 412.282 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21)
 412.283 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_21)
 412.284 +-C_TEXT(_restf21):
 412.285 +-C_TEXT(_restfpr_21):	lfd	fp21,-88(r1)
 412.286 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22)
 412.287 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_22)
 412.288 +-C_TEXT(_restf22):
 412.289 +-C_TEXT(_restfpr_22):	lfd	fp22,-80(r1)
 412.290 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23)
 412.291 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_23)
 412.292 +-C_TEXT(_restf23):
 412.293 +-C_TEXT(_restfpr_23):	lfd	fp23,-72(r1)
 412.294 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24)
 412.295 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_24)
 412.296 +-C_TEXT(_restf24):
 412.297 +-C_TEXT(_restfpr_24):	lfd	fp24,-64(r1)
 412.298 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25)
 412.299 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_25)
 412.300 +-C_TEXT(_restf25):
 412.301 +-C_TEXT(_restfpr_25):	lfd	fp25,-56(r1)
 412.302 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26)
 412.303 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_26)
 412.304 +-C_TEXT(_restf26):
 412.305 +-C_TEXT(_restfpr_26):	lfd	fp26,-48(r1)
 412.306 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27)
 412.307 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_27)
 412.308 +-C_TEXT(_restf27):
 412.309 +-C_TEXT(_restfpr_27):	lfd	fp27,-40(r1)
 412.310 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28)
 412.311 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_28)
 412.312 +-C_TEXT(_restf28):
 412.313 +-C_TEXT(_restfpr_28):	lfd	fp28,-32(r1)
 412.314 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29)
 412.315 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_29)
 412.316 +-C_TEXT(_restf29):
 412.317 +-C_TEXT(_restfpr_29):	lwz	r0,8(r1)	#get return address from frame
 412.318 +-			lfd	fp29,-24(r1)    #restore f29
 412.319 +-			mtlr	r0		#move return address to LR
 412.320 +-			lfd	fp30,-16(r1)	#restore f30
 412.321 +-			lfd	fp31,-8(r1)	#restore f31
 412.322 +-			blr			#return
 412.323 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fprsave.S glibc-2.2.5/sysdeps/powerpc/fprsave.S
 412.324 +--- glibc-2.2.5.old/sysdeps/powerpc/fprsave.S	Thu Jul  5 21:56:01 2001
 412.325 ++++ glibc-2.2.5/sysdeps/powerpc/fprsave.S	Wed Dec 31 16:00:00 1969
 412.326 +@@ -1,93 +0,0 @@
 412.327 +-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
 412.328 +-   This file is part of the GNU C Library.
 412.329 +-
 412.330 +-   The GNU C Library is free software; you can redistribute it and/or
 412.331 +-   modify it under the terms of the GNU Lesser General Public
 412.332 +-   License as published by the Free Software Foundation; either
 412.333 +-   version 2.1 of the License, or (at your option) any later version.
 412.334 +-
 412.335 +-   The GNU C Library is distributed in the hope that it will be useful,
 412.336 +-   but WITHOUT ANY WARRANTY; without even the implied warranty of
 412.337 +-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 412.338 +-   Lesser General Public License for more details.
 412.339 +-
 412.340 +-   You should have received a copy of the GNU Lesser General Public
 412.341 +-   License along with the GNU C Library; if not, write to the Free
 412.342 +-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 412.343 +-   02111-1307 USA.  */
 412.344 +-
 412.345 +-/*
 412.346 +-    Floating Point Registers (FPRs) save routine
 412.347 +-*/
 412.348 +-
 412.349 +-#include <sysdep.h>
 412.350 +-
 412.351 +-ENTRY(_savefpr_all)
 412.352 +-                ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14)
 412.353 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_14)
 412.354 +-C_TEXT(_savef14):
 412.355 +-C_TEXT(_savefpr_14):	stfd	fp14,-144(r1)
 412.356 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15)
 412.357 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_15)
 412.358 +-C_TEXT(_savef15):
 412.359 +-C_TEXT(_savefpr_15):	stfd	fp15,-136(r1)
 412.360 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16)
 412.361 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_16)
 412.362 +-C_TEXT(_savef16):
 412.363 +-C_TEXT(_savefpr_16):	stfd	fp16,-128(r1)
 412.364 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17)
 412.365 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_17)
 412.366 +-C_TEXT(_savef17):
 412.367 +-C_TEXT(_savefpr_17):	stfd	fp17,-120(r1)
 412.368 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18)
 412.369 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_18)
 412.370 +-C_TEXT(_savef18):
 412.371 +-C_TEXT(_savefpr_18):	stfd	fp18,-112(r1)
 412.372 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19)
 412.373 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_19)
 412.374 +-C_TEXT(_savef19):
 412.375 +-C_TEXT(_savefpr_19):	stfd	fp19,-104(r1)
 412.376 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20)
 412.377 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_20)
 412.378 +-C_TEXT(_savef20):
 412.379 +-C_TEXT(_savefpr_20):	stfd	fp20,-96(r1)
 412.380 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21)
 412.381 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_21)
 412.382 +-C_TEXT(_savef21):
 412.383 +-C_TEXT(_savefpr_21):	stfd	fp21,-88(r1)
 412.384 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22)
 412.385 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_22)
 412.386 +-C_TEXT(_savef22):
 412.387 +-C_TEXT(_savefpr_22):	stfd	fp22,-80(r1)
 412.388 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23)
 412.389 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_23)
 412.390 +-C_TEXT(_savef23):
 412.391 +-C_TEXT(_savefpr_23):	stfd	fp23,-72(r1)
 412.392 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24)
 412.393 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_24)
 412.394 +-C_TEXT(_savef24):
 412.395 +-C_TEXT(_savefpr_24):	stfd	fp24,-64(r1)
 412.396 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25)
 412.397 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_25)
 412.398 +-C_TEXT(_savef25):
 412.399 +-C_TEXT(_savefpr_25):	stfd	fp25,-56(r1)
 412.400 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26)
 412.401 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_26)
 412.402 +-C_TEXT(_savef26):
 412.403 +-C_TEXT(_savefpr_26):	stfd	fp26,-48(r1)
 412.404 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27)
 412.405 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_27)
 412.406 +-C_TEXT(_savef27):
 412.407 +-C_TEXT(_savefpr_27):	stfd	fp27,-40(r1)
 412.408 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28)
 412.409 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_28)
 412.410 +-C_TEXT(_savef28):
 412.411 +-C_TEXT(_savefpr_28):	stfd	fp28,-32(r1)
 412.412 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29)
 412.413 +-		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_29)
 412.414 +-C_TEXT(_savef29):
 412.415 +-C_TEXT(_savefpr_29):	stfd	fp29,-24(r1)	#save f29
 412.416 +-			stfd	fp30,-16(r1)	#save f30
 412.417 +-			stfd	fp31,-8(r1)	#save f31
 412.418 +-			stw	r0,8(r1)	#save LR in callers frame
 412.419 +-			blr			#return
 412.420 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/Dist glibc-2.2.5/sysdeps/powerpc/fpu/Dist
 412.421 +--- glibc-2.2.5.old/sysdeps/powerpc/fpu/Dist	Wed Jan 26 17:48:02 2000
 412.422 ++++ glibc-2.2.5/sysdeps/powerpc/fpu/Dist	Thu Jul 10 11:43:17 2003
 412.423 +@@ -1,3 +1,6 @@
 412.424 ++fe_nomask.c
 412.425 ++fprrest.S
 412.426 ++fprsave.S
 412.427 + fenv_const.c
 412.428 + fenv_libc.h
 412.429 + t_sqrt.c
 412.430 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/Makefile glibc-2.2.5/sysdeps/powerpc/fpu/Makefile
 412.431 +--- glibc-2.2.5.old/sysdeps/powerpc/fpu/Makefile	Mon Oct 11 15:29:00 1999
 412.432 ++++ glibc-2.2.5/sysdeps/powerpc/fpu/Makefile	Thu Jul 10 11:43:17 2003
 412.433 +@@ -1,3 +1,7 @@
 412.434 + ifeq ($(subdir),math)
 412.435 + libm-support += fenv_const fe_nomask t_sqrt
 412.436 + endif
 412.437 ++
 412.438 ++ifeq ($(subdir),misc)
 412.439 ++sysdep_routines += fprsave fprrest
 412.440 ++endif
 412.441 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/Versions glibc-2.2.5/sysdeps/powerpc/fpu/Versions
 412.442 +--- glibc-2.2.5.old/sysdeps/powerpc/fpu/Versions	Wed Dec 31 16:00:00 1969
 412.443 ++++ glibc-2.2.5/sysdeps/powerpc/fpu/Versions	Thu Jul 10 11:43:17 2003
 412.444 +@@ -0,0 +1,6 @@
 412.445 ++libm {
 412.446 ++  GLIBC_2.1 {
 412.447 ++    # symbols used in macros from sysdeps/powerpc/bits/fenv.h
 412.448 ++    __fe_dfl_env; __fe_enabled_env; __fe_nonieee_env; __fe_nomask_env;
 412.449 ++  }
 412.450 ++}
 412.451 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/__longjmp.S glibc-2.2.5/sysdeps/powerpc/fpu/__longjmp.S
 412.452 +--- glibc-2.2.5.old/sysdeps/powerpc/fpu/__longjmp.S	Wed Dec 31 16:00:00 1969
 412.453 ++++ glibc-2.2.5/sysdeps/powerpc/fpu/__longjmp.S	Thu Jul 10 11:43:17 2003
 412.454 +@@ -0,0 +1,74 @@
 412.455 ++/* longjmp for PowerPC.
 412.456 ++   Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
 412.457 ++   This file is part of the GNU C Library.
 412.458 ++
 412.459 ++   The GNU C Library is free software; you can redistribute it and/or
 412.460 ++   modify it under the terms of the GNU Library General Public License as
 412.461 ++   published by the Free Software Foundation; either version 2 of the
 412.462 ++   License, or (at your option) any later version.
 412.463 ++
 412.464 ++   The GNU C Library is distributed in the hope that it will be useful,
 412.465 ++   but WITHOUT ANY WARRANTY; without even the implied warranty of
 412.466 ++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 412.467 ++   Library General Public License for more details.
 412.468 ++
 412.469 ++   You should have received a copy of the GNU Library General Public
 412.470 ++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
 412.471 ++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 412.472 ++   Boston, MA 02111-1307, USA.  */
 412.473 ++
 412.474 ++#include <sysdep.h>
 412.475 ++#define _ASM
 412.476 ++#define _SETJMP_H
 412.477 ++#include <bits/setjmp.h>
 412.478 ++#include <bp-sym.h>
 412.479 ++#include <bp-asm.h>
 412.480 ++
 412.481 ++ENTRY (BP_SYM (__longjmp))
 412.482 ++	CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
 412.483 ++
 412.484 ++	lwz r1,(JB_GPR1*4)(r3)
 412.485 ++	lwz r2,(JB_GPR2*4)(r3)
 412.486 ++	lwz r0,(JB_LR*4)(r3)
 412.487 ++	lwz r14,((JB_GPRS+0)*4)(r3)
 412.488 ++	lfd fp14,((JB_FPRS+0*2)*4)(r3)
 412.489 ++	lwz r15,((JB_GPRS+1)*4)(r3)
 412.490 ++	lfd fp15,((JB_FPRS+1*2)*4)(r3)
 412.491 ++	lwz r16,((JB_GPRS+2)*4)(r3)
 412.492 ++	lfd fp16,((JB_FPRS+2*2)*4)(r3)
 412.493 ++	lwz r17,((JB_GPRS+3)*4)(r3)
 412.494 ++	lfd fp17,((JB_FPRS+3*2)*4)(r3)
 412.495 ++	lwz r18,((JB_GPRS+4)*4)(r3)
 412.496 ++	lfd fp18,((JB_FPRS+4*2)*4)(r3)
 412.497 ++	lwz r19,((JB_GPRS+5)*4)(r3)
 412.498 ++	lfd fp19,((JB_FPRS+5*2)*4)(r3)
 412.499 ++	lwz r20,((JB_GPRS+6)*4)(r3)
 412.500 ++	lfd fp20,((JB_FPRS+6*2)*4)(r3)
 412.501 ++	mtlr r0
 412.502 ++	lwz r21,((JB_GPRS+7)*4)(r3)
 412.503 ++	lfd fp21,((JB_FPRS+7*2)*4)(r3)
 412.504 ++	lwz r22,((JB_GPRS+8)*4)(r3)
 412.505 ++	lfd fp22,((JB_FPRS+8*2)*4)(r3)
 412.506 ++	lwz r0,(JB_CR*4)(r3)
 412.507 ++	lwz r23,((JB_GPRS+9)*4)(r3)
 412.508 ++	lfd fp23,((JB_FPRS+9*2)*4)(r3)
 412.509 ++	lwz r24,((JB_GPRS+10)*4)(r3)
 412.510 ++	lfd fp24,((JB_FPRS+10*2)*4)(r3)
 412.511 ++	lwz r25,((JB_GPRS+11)*4)(r3)
 412.512 ++	lfd fp25,((JB_FPRS+11*2)*4)(r3)
 412.513 ++	mtcrf 0xFF,r0
 412.514 ++	lwz r26,((JB_GPRS+12)*4)(r3)
 412.515 ++	lfd fp26,((JB_FPRS+12*2)*4)(r3)
 412.516 ++	lwz r27,((JB_GPRS+13)*4)(r3)
 412.517 ++	lfd fp27,((JB_FPRS+13*2)*4)(r3)
 412.518 ++	lwz r28,((JB_GPRS+14)*4)(r3)
 412.519 ++	lfd fp28,((JB_FPRS+14*2)*4)(r3)
 412.520 ++	lwz r29,((JB_GPRS+15)*4)(r3)
 412.521 ++	lfd fp29,((JB_FPRS+15*2)*4)(r3)
 412.522 ++	lwz r30,((JB_GPRS+16)*4)(r3)
 412.523 ++	lfd fp30,((JB_FPRS+16*2)*4)(r3)
 412.524 ++	lwz r31,((JB_GPRS+17)*4)(r3)
 412.525 ++	lfd fp31,((JB_FPRS+17*2)*4)(r3)
 412.526 ++	mr r3,r4
 412.527 ++	blr
 412.528 ++END (BP_SYM (__longjmp))
 412.529 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/bits/setjmp.h glibc-2.2.5/sysdeps/powerpc/fpu/bits/setjmp.h
 412.530 +--- glibc-2.2.5.old/sysdeps/powerpc/fpu/bits/setjmp.h	Wed Dec 31 16:00:00 1969
 412.531 ++++ glibc-2.2.5/sysdeps/powerpc/fpu/bits/setjmp.h	Thu Jul 10 11:43:17 2003
 412.532 +@@ -0,0 +1,47 @@
 412.533 ++/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
 412.534 ++   This file is part of the GNU C Library.
 412.535 ++
 412.536 ++   The GNU C Library is free software; you can redistribute it and/or
 412.537 ++   modify it under the terms of the GNU Library General Public License as
 412.538 ++   published by the Free Software Foundation; either version 2 of the
 412.539 ++   License, or (at your option) any later version.
 412.540 ++
 412.541 ++   The GNU C Library is distributed in the hope that it will be useful,
 412.542 ++   but WITHOUT ANY WARRANTY; without even the implied warranty of
 412.543 ++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 412.544 ++   Library General Public License for more details.
 412.545 ++
 412.546 ++   You should have received a copy of the GNU Library General Public
 412.547 ++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
 412.548 ++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 412.549 ++   Boston, MA 02111-1307, USA.  */
 412.550 ++
 412.551 ++/* Define the machine-dependent type `jmp_buf'.  PowerPC version.  */
 412.552 ++
 412.553 ++#ifndef _SETJMP_H
 412.554 ++# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
 412.555 ++#endif
 412.556 ++
 412.557 ++/* The previous bits/setjmp.h had __jmp_buf defined as a structure.
 412.558 ++   We use an array of 'long int' instead, to make writing the
 412.559 ++   assembler easier. Naturally, user code should not depend on
 412.560 ++   either representation. */
 412.561 ++
 412.562 ++#if defined __USE_MISC || defined _ASM
 412.563 ++# define JB_GPR1   0  /* Also known as the stack pointer */
 412.564 ++# define JB_GPR2   1
 412.565 ++# define JB_LR     2  /* The address we will return to */
 412.566 ++# define JB_GPRS   3  /* GPRs 14 through 31 are saved, 18 in total */
 412.567 ++# define JB_CR     21 /* Condition code registers. */
 412.568 ++# define JB_FPRS   22 /* FPRs 14 through 31 are saved, 18*2 words total */
 412.569 ++# define JB_SIZE   (58*4)
 412.570 ++#endif
 412.571 ++
 412.572 ++#ifndef	_ASM
 412.573 ++typedef long int __jmp_buf[58];
 412.574 ++#endif
 412.575 ++
 412.576 ++/* Test if longjmp to JMPBUF would unwind the frame
 412.577 ++   containing a local variable at ADDRESS.  */
 412.578 ++#define _JMPBUF_UNWINDS(jmpbuf, address) \
 412.579 ++  ((void *) (address) < (void *) (jmpbuf)[JB_GPR1])
 412.580 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/fclrexcpt.c glibc-2.2.5/sysdeps/powerpc/fpu/fclrexcpt.c
 412.581 +--- glibc-2.2.5.old/sysdeps/powerpc/fpu/fclrexcpt.c	Wed Dec 31 16:00:00 1969
 412.582 ++++ glibc-2.2.5/sysdeps/powerpc/fpu/fclrexcpt.c	Thu Jul  5 21:56:01 2001
 412.583 +@@ -0,0 +1,48 @@
 412.584 ++/* Clear given exceptions in current floating-point environment.
 412.585 ++   Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
 412.586 ++   This file is part of the GNU C Library.
 412.587 ++
 412.588 ++   The GNU C Library is free software; you can redistribute it and/or
 412.589 ++   modify it under the terms of the GNU Lesser General Public
 412.590 ++   License as published by the Free Software Foundation; either
 412.591 ++   version 2.1 of the License, or (at your option) any later version.
 412.592 ++
 412.593 ++   The GNU C Library is distributed in the hope that it will be useful,
 412.594 ++   but WITHOUT ANY WARRANTY; without even the implied warranty of
 412.595 ++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 412.596 ++   Lesser General Public License for more details.
 412.597 ++
 412.598 ++   You should have received a copy of the GNU Lesser General Public
 412.599 ++   License along with the GNU C Library; if not, write to the Free
 412.600 ++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 412.601 ++   02111-1307 USA.  */
 412.602 ++
 412.603 ++#include <fenv_libc.h>
 412.604 ++
 412.605 ++#undef feclearexcept
 412.606 ++int
 412.607 ++__feclearexcept (int excepts)
 412.608 ++{
 412.609 ++  fenv_union_t u;
 412.610 ++
 412.611 ++  /* Get the current state.  */
 412.612 ++  u.fenv = fegetenv_register ();
 412.613 ++
 412.614 ++  /* Clear the relevant bits.  */
 412.615 ++  u.l[1] = u.l[1] & ~((-(excepts >> (31 - FPSCR_VX) & 1) & FE_ALL_INVALID)
 412.616 ++		      | (excepts & FPSCR_STICKY_BITS));
 412.617 ++
 412.618 ++  /* Put the new state in effect.  */
 412.619 ++  fesetenv_register (u.fenv);
 412.620 ++
 412.621 ++  /* Success.  */
 412.622 ++  return 0;
 412.623 ++}
 412.624 ++
 412.625 ++#include <shlib-compat.h>
 412.626 ++#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
 412.627 ++strong_alias (__feclearexcept, __old_feclearexcept)
 412.628 ++compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
 412.629 ++#endif
 412.630 ++
 412.631 ++versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
 412.632 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/fe_nomask.c glibc-2.2.5/sysdeps/powerpc/fpu/fe_nomask.c
 412.633 +--- glibc-2.2.5.old/sysdeps/powerpc/fpu/fe_nomask.c	Wed Dec 31 16:00:00 1969
 412.634 ++++ glibc-2.2.5/sysdeps/powerpc/fpu/fe_nomask.c	Thu Jul  5 21:56:01 2001
 412.635 +@@ -0,0 +1,32 @@
 412.636 ++/* Procedure definition for FE_NOMASK_ENV.
 412.637 ++   Copyright (C) 1997 Free Software Foundation, Inc.
 412.638 ++   This file is part of the GNU C Library.
 412.639 ++
 412.640 ++   The GNU C Library is free software; you can redistribute it and/or
 412.641 ++   modify it under the terms of the GNU Lesser General Public
 412.642 ++   License as published by the Free Software Foundation; either
 412.643 ++   version 2.1 of the License, or (at your option) any later version.
 412.644 ++
 412.645 ++   The GNU C Library is distributed in the hope that it will be useful,
 412.646 ++   but WITHOUT ANY WARRANTY; without even the implied warranty of
 412.647 ++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 412.648 ++   Lesser General Public License for more details.
 412.649 ++
 412.650 ++   You should have received a copy of the GNU Lesser General Public
 412.651 ++   License along with the GNU C Library; if not, write to the Free
 412.652 ++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 412.653 ++   02111-1307 USA.  */
 412.654 ++
 412.655 ++#include <fenv.h>
 412.656 ++#include <errno.h>
 412.657 ++
 412.658 ++/* This is presently a stub, until it's decided how the kernels should
 412.659 ++   support this.  */
 412.660 ++
 412.661 ++const fenv_t *
 412.662 ++__fe_nomask_env(void)
 412.663 ++{
 412.664 ++  __set_errno (ENOSYS);
 412.665 ++  return FE_ENABLED_ENV;
 412.666 ++}
 412.667 ++stub_warning (__fe_nomask_env)
 412.668 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/fprrest.S glibc-2.2.5/sysdeps/powerpc/fpu/fprrest.S
 412.669 +--- glibc-2.2.5.old/sysdeps/powerpc/fpu/fprrest.S	Wed Dec 31 16:00:00 1969
 412.670 ++++ glibc-2.2.5/sysdeps/powerpc/fpu/fprrest.S	Thu Jul  5 21:56:01 2001
 412.671 +@@ -0,0 +1,94 @@
 412.672 ++/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
 412.673 ++   This file is part of the GNU C Library.
 412.674 ++
 412.675 ++   The GNU C Library is free software; you can redistribute it and/or
 412.676 ++   modify it under the terms of the GNU Lesser General Public
 412.677 ++   License as published by the Free Software Foundation; either
 412.678 ++   version 2.1 of the License, or (at your option) any later version.
 412.679 ++
 412.680 ++   The GNU C Library is distributed in the hope that it will be useful,
 412.681 ++   but WITHOUT ANY WARRANTY; without even the implied warranty of
 412.682 ++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 412.683 ++   Lesser General Public License for more details.
 412.684 ++
 412.685 ++   You should have received a copy of the GNU Lesser General Public
 412.686 ++   License along with the GNU C Library; if not, write to the Free
 412.687 ++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 412.688 ++   02111-1307 USA.  */
 412.689 ++
 412.690 ++/*
 412.691 ++    Floating Point Registers (FPRs) restore routine
 412.692 ++*/
 412.693 ++
 412.694 ++#include <sysdep.h>
 412.695 ++
 412.696 ++ENTRY(_restfpr_all)
 412.697 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14)
 412.698 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_14)
 412.699 ++C_TEXT(_restf14):
 412.700 ++C_TEXT(_restfpr_14):	lfd	fp14,-144(r1)
 412.701 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15)
 412.702 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_15)
 412.703 ++C_TEXT(_restf15):
 412.704 ++C_TEXT(_restfpr_15):	lfd	fp15,-136(r1)
 412.705 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16)
 412.706 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_16)
 412.707 ++C_TEXT(_restf16):
 412.708 ++C_TEXT(_restfpr_16):	lfd	fp16,-128(r1)
 412.709 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17)
 412.710 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_17)
 412.711 ++C_TEXT(_restf17):
 412.712 ++C_TEXT(_restfpr_17):	lfd	fp17,-120(r1)
 412.713 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18)
 412.714 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_18)
 412.715 ++C_TEXT(_restf18):
 412.716 ++C_TEXT(_restfpr_18):	lfd	fp18,-112(r1)
 412.717 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19)
 412.718 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_19)
 412.719 ++C_TEXT(_restf19):
 412.720 ++C_TEXT(_restfpr_19):	lfd	fp19,-104(r1)
 412.721 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20)
 412.722 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_20)
 412.723 ++C_TEXT(_restf20):
 412.724 ++C_TEXT(_restfpr_20):	lfd	fp20,-96(r1)
 412.725 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21)
 412.726 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_21)
 412.727 ++C_TEXT(_restf21):
 412.728 ++C_TEXT(_restfpr_21):	lfd	fp21,-88(r1)
 412.729 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22)
 412.730 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_22)
 412.731 ++C_TEXT(_restf22):
 412.732 ++C_TEXT(_restfpr_22):	lfd	fp22,-80(r1)
 412.733 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23)
 412.734 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_23)
 412.735 ++C_TEXT(_restf23):
 412.736 ++C_TEXT(_restfpr_23):	lfd	fp23,-72(r1)
 412.737 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24)
 412.738 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_24)
 412.739 ++C_TEXT(_restf24):
 412.740 ++C_TEXT(_restfpr_24):	lfd	fp24,-64(r1)
 412.741 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25)
 412.742 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_25)
 412.743 ++C_TEXT(_restf25):
 412.744 ++C_TEXT(_restfpr_25):	lfd	fp25,-56(r1)
 412.745 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26)
 412.746 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_26)
 412.747 ++C_TEXT(_restf26):
 412.748 ++C_TEXT(_restfpr_26):	lfd	fp26,-48(r1)
 412.749 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27)
 412.750 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_27)
 412.751 ++C_TEXT(_restf27):
 412.752 ++C_TEXT(_restfpr_27):	lfd	fp27,-40(r1)
 412.753 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28)
 412.754 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_28)
 412.755 ++C_TEXT(_restf28):
 412.756 ++C_TEXT(_restfpr_28):	lfd	fp28,-32(r1)
 412.757 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29)
 412.758 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_29)
 412.759 ++C_TEXT(_restf29):
 412.760 ++C_TEXT(_restfpr_29):	lwz	r0,8(r1)	#get return address from frame
 412.761 ++			lfd	fp29,-24(r1)    #restore f29
 412.762 ++			mtlr	r0		#move return address to LR
 412.763 ++			lfd	fp30,-16(r1)	#restore f30
 412.764 ++			lfd	fp31,-8(r1)	#restore f31
 412.765 ++			blr			#return
 412.766 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/fprsave.S glibc-2.2.5/sysdeps/powerpc/fpu/fprsave.S
 412.767 +--- glibc-2.2.5.old/sysdeps/powerpc/fpu/fprsave.S	Wed Dec 31 16:00:00 1969
 412.768 ++++ glibc-2.2.5/sysdeps/powerpc/fpu/fprsave.S	Thu Jul  5 21:56:01 2001
 412.769 +@@ -0,0 +1,93 @@
 412.770 ++/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
 412.771 ++   This file is part of the GNU C Library.
 412.772 ++
 412.773 ++   The GNU C Library is free software; you can redistribute it and/or
 412.774 ++   modify it under the terms of the GNU Lesser General Public
 412.775 ++   License as published by the Free Software Foundation; either
 412.776 ++   version 2.1 of the License, or (at your option) any later version.
 412.777 ++
 412.778 ++   The GNU C Library is distributed in the hope that it will be useful,
 412.779 ++   but WITHOUT ANY WARRANTY; without even the implied warranty of
 412.780 ++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 412.781 ++   Lesser General Public License for more details.
 412.782 ++
 412.783 ++   You should have received a copy of the GNU Lesser General Public
 412.784 ++   License along with the GNU C Library; if not, write to the Free
 412.785 ++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 412.786 ++   02111-1307 USA.  */
 412.787 ++
 412.788 ++/*
 412.789 ++    Floating Point Registers (FPRs) save routine
 412.790 ++*/
 412.791 ++
 412.792 ++#include <sysdep.h>
 412.793 ++
 412.794 ++ENTRY(_savefpr_all)
 412.795 ++                ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14)
 412.796 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_14)
 412.797 ++C_TEXT(_savef14):
 412.798 ++C_TEXT(_savefpr_14):	stfd	fp14,-144(r1)
 412.799 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15)
 412.800 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_15)
 412.801 ++C_TEXT(_savef15):
 412.802 ++C_TEXT(_savefpr_15):	stfd	fp15,-136(r1)
 412.803 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16)
 412.804 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_16)
 412.805 ++C_TEXT(_savef16):
 412.806 ++C_TEXT(_savefpr_16):	stfd	fp16,-128(r1)
 412.807 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17)
 412.808 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_17)
 412.809 ++C_TEXT(_savef17):
 412.810 ++C_TEXT(_savefpr_17):	stfd	fp17,-120(r1)
 412.811 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18)
 412.812 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_18)
 412.813 ++C_TEXT(_savef18):
 412.814 ++C_TEXT(_savefpr_18):	stfd	fp18,-112(r1)
 412.815 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19)
 412.816 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_19)
 412.817 ++C_TEXT(_savef19):
 412.818 ++C_TEXT(_savefpr_19):	stfd	fp19,-104(r1)
 412.819 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20)
 412.820 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_20)
 412.821 ++C_TEXT(_savef20):
 412.822 ++C_TEXT(_savefpr_20):	stfd	fp20,-96(r1)
 412.823 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21)
 412.824 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_21)
 412.825 ++C_TEXT(_savef21):
 412.826 ++C_TEXT(_savefpr_21):	stfd	fp21,-88(r1)
 412.827 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22)
 412.828 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_22)
 412.829 ++C_TEXT(_savef22):
 412.830 ++C_TEXT(_savefpr_22):	stfd	fp22,-80(r1)
 412.831 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23)
 412.832 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_23)
 412.833 ++C_TEXT(_savef23):
 412.834 ++C_TEXT(_savefpr_23):	stfd	fp23,-72(r1)
 412.835 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24)
 412.836 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_24)
 412.837 ++C_TEXT(_savef24):
 412.838 ++C_TEXT(_savefpr_24):	stfd	fp24,-64(r1)
 412.839 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25)
 412.840 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_25)
 412.841 ++C_TEXT(_savef25):
 412.842 ++C_TEXT(_savefpr_25):	stfd	fp25,-56(r1)
 412.843 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26)
 412.844 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_26)
 412.845 ++C_TEXT(_savef26):
 412.846 ++C_TEXT(_savefpr_26):	stfd	fp26,-48(r1)
 412.847 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27)
 412.848 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_27)
 412.849 ++C_TEXT(_savef27):
 412.850 ++C_TEXT(_savefpr_27):	stfd	fp27,-40(r1)
 412.851 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28)
 412.852 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_28)
 412.853 ++C_TEXT(_savef28):
 412.854 ++C_TEXT(_savefpr_28):	stfd	fp28,-32(r1)
 412.855 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29)
 412.856 ++		ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_29)
 412.857 ++C_TEXT(_savef29):
 412.858 ++C_TEXT(_savefpr_29):	stfd	fp29,-24(r1)	#save f29
 412.859 ++			stfd	fp30,-16(r1)	#save f30
 412.860 ++			stfd	fp31,-8(r1)	#save f31
 412.861 ++			stw	r0,8(r1)	#save LR in callers frame
 412.862 ++			blr			#return
 412.863 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/fpu_control.h glibc-2.2.5/sysdeps/powerpc/fpu/fpu_control.h
 412.864 +--- glibc-2.2.5.old/sysdeps/powerpc/fpu/fpu_control.h	Wed Dec 31 16:00:00 1969
 412.865 ++++ glibc-2.2.5/sysdeps/powerpc/fpu/fpu_control.h	Thu Jul  5 21:56:01 2001
 412.866 +@@ -0,0 +1,67 @@
 412.867 ++/* FPU control word definitions.  PowerPC version.
 412.868 ++   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
 412.869 ++   This file is part of the GNU C Library.
 412.870 ++
 412.871 ++   The GNU C Library is free software; you can redistribute it and/or
 412.872 ++   modify it under the terms of the GNU Lesser General Public
 412.873 ++   License as published by the Free Software Foundation; either
 412.874 ++   version 2.1 of the License, or (at your option) any later version.
 412.875 ++
 412.876 ++   The GNU C Library is distributed in the hope that it will be useful,
 412.877 ++   but WITHOUT ANY WARRANTY; without even the implied warranty of
 412.878 ++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 412.879 ++   Lesser General Public License for more details.
 412.880 ++
 412.881 ++   You should have received a copy of the GNU Lesser General Public
 412.882 ++   License along with the GNU C Library; if not, write to the Free
 412.883 ++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 412.884 ++   02111-1307 USA.  */
 412.885 ++
 412.886 ++#ifndef _FPU_CONTROL_H
 412.887 ++#define _FPU_CONTROL_H
 412.888 ++
 412.889 ++/* rounding control */
 412.890 ++#define _FPU_RC_NEAREST 0x00   /* RECOMMENDED */
 412.891 ++#define _FPU_RC_DOWN    0x03
 412.892 ++#define _FPU_RC_UP      0x02
 412.893 ++#define _FPU_RC_ZERO    0x01
 412.894 ++
 412.895 ++#define _FPU_MASK_NI  0x04 /* non-ieee mode */
 412.896 ++
 412.897 ++/* masking of interrupts */
 412.898 ++#define _FPU_MASK_ZM  0x10 /* zero divide */
 412.899 ++#define _FPU_MASK_OM  0x40 /* overflow */
 412.900 ++#define _FPU_MASK_UM  0x20 /* underflow */
 412.901 ++#define _FPU_MASK_XM  0x08 /* inexact */
 412.902 ++#define _FPU_MASK_IM  0x80 /* invalid operation */
 412.903 ++
 412.904 ++#define _FPU_RESERVED 0xffffff00 /* These bits are reserved are not changed. */
 412.905 ++
 412.906 ++/* The fdlibm code requires no interrupts for exceptions.  */
 412.907 ++#define _FPU_DEFAULT  0x00000000 /* Default value.  */
 412.908 ++
 412.909 ++/* IEEE:  same as above, but (some) exceptions;
 412.910 ++   we leave the 'inexact' exception off.
 412.911 ++ */
 412.912 ++#define _FPU_IEEE     0x000000f0
 412.913 ++
 412.914 ++/* Type of the control word.  */
 412.915 ++typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
 412.916 ++
 412.917 ++/* Macros for accessing the hardware control word.  */
 412.918 ++#define _FPU_GETCW(cw) ( { \
 412.919 ++  union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
 412.920 ++  __asm__ ("mffs 0; stfd%U0 0,%0" : "=m" (tmp.d) : : "fr0"); \
 412.921 ++  (cw)=tmp.cw[1]; \
 412.922 ++  tmp.cw[1]; } )
 412.923 ++#define _FPU_SETCW(cw) { \
 412.924 ++  union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
 412.925 ++  tmp.cw[0] = 0xFFF80000; /* More-or-less arbitrary; this is a QNaN. */ \
 412.926 ++  tmp.cw[1] = cw; \
 412.927 ++  __asm__ ("lfd%U0 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
 412.928 ++}
 412.929 ++
 412.930 ++/* Default control word set at startup.  */
 412.931 ++extern fpu_control_t __fpu_control;
 412.932 ++
 412.933 ++#endif /* _FPU_CONTROL_H */
 412.934 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/setjmp.S glibc-2.2.5/sysdeps/powerpc/fpu/setjmp.S
 412.935 +--- glibc-2.2.5.old/sysdeps/powerpc/fpu/setjmp.S	Wed Dec 31 16:00:00 1969
 412.936 ++++ glibc-2.2.5/sysdeps/powerpc/fpu/setjmp.S	Thu Jul 10 11:43:44 2003
 412.937 +@@ -0,0 +1,73 @@
 412.938 ++/* setjmp for PowerPC.
 412.939 ++   Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
 412.940 ++   This file is part of the GNU C Library.
 412.941 ++
 412.942 ++   The GNU C Library is free software; you can redistribute it and/or
 412.943 ++   modify it under the terms of the GNU Library General Public License as
 412.944 ++   published by the Free Software Foundation; either version 2 of the
 412.945 ++   License, or (at your option) any later version.
 412.946 ++
 412.947 ++   The GNU C Library is distributed in the hope that it will be useful,
 412.948 ++   but WITHOUT ANY WARRANTY; without even the implied warranty of
 412.949 ++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 412.950 ++   Library General Public License for more details.
 412.951 ++
 412.952 ++   You should have received a copy of the GNU Library General Public
 412.953 ++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
 412.954 ++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 412.955 ++   Boston, MA 02111-1307, USA.  */
 412.956 ++
 412.957 ++#include <sysdep.h>
 412.958 ++#define _ASM
 412.959 ++#define _SETJMP_H
 412.960 ++#include <bits/setjmp.h>
 412.961 ++#include <bp-sym.h>
 412.962 ++#include <bp-asm.h>
 412.963 ++
 412.964 ++ENTRY (BP_SYM (__sigsetjmp))
 412.965 ++	CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
 412.966 ++
 412.967 ++	stw  r1,(JB_GPR1*4)(3)
 412.968 ++	mflr r0
 412.969 ++	stw  r2,(JB_GPR2*4)(3)
 412.970 ++	stw  r14,((JB_GPRS+0)*4)(3)
 412.971 ++	stfd fp14,((JB_FPRS+0*2)*4)(3)
 412.972 ++	stw  r0,(JB_LR*4)(3)
 412.973 ++	stw  r15,((JB_GPRS+1)*4)(3)
 412.974 ++	stfd fp15,((JB_FPRS+1*2)*4)(3)
 412.975 ++	mfcr r0
 412.976 ++	stw  r16,((JB_GPRS+2)*4)(3)
 412.977 ++	stfd fp16,((JB_FPRS+2*2)*4)(3)
 412.978 ++	stw  r0,(JB_CR*4)(3)
 412.979 ++	stw  r17,((JB_GPRS+3)*4)(3)
 412.980 ++	stfd fp17,((JB_FPRS+3*2)*4)(3)
 412.981 ++	stw  r18,((JB_GPRS+4)*4)(3)
 412.982 ++	stfd fp18,((JB_FPRS+4*2)*4)(3)
 412.983 ++	stw  r19,((JB_GPRS+5)*4)(3)
 412.984 ++	stfd fp19,((JB_FPRS+5*2)*4)(3)
 412.985 ++	stw  r20,((JB_GPRS+6)*4)(3)
 412.986 ++	stfd fp20,((JB_FPRS+6*2)*4)(3)
 412.987 ++	stw  r21,((JB_GPRS+7)*4)(3)
 412.988 ++	stfd fp21,((JB_FPRS+7*2)*4)(3)
 412.989 ++	stw  r22,((JB_GPRS+8)*4)(3)
 412.990 ++	stfd fp22,((JB_FPRS+8*2)*4)(3)
 412.991 ++	stw  r23,((JB_GPRS+9)*4)(3)
 412.992 ++	stfd fp23,((JB_FPRS+9*2)*4)(3)
 412.993 ++	stw  r24,((JB_GPRS+10)*4)(3)
 412.994 ++	stfd fp24,((JB_FPRS+10*2)*4)(3)
 412.995 ++	stw  r25,((JB_GPRS+11)*4)(3)
 412.996 ++	stfd fp25,((JB_FPRS+11*2)*4)(3)
 412.997 ++	stw  r26,((JB_GPRS+12)*4)(3)
 412.998 ++	stfd fp26,((JB_FPRS+12*2)*4)(3)
 412.999 ++	stw  r27,((JB_GPRS+13)*4)(3)
412.1000 ++	stfd fp27,((JB_FPRS+13*2)*4)(3)
412.1001 ++	stw  r28,((JB_GPRS+14)*4)(3)
412.1002 ++	stfd fp28,((JB_FPRS+14*2)*4)(3)
412.1003 ++	stw  r29,((JB_GPRS+15)*4)(3)
412.1004 ++	stfd fp29,((JB_FPRS+15*2)*4)(3)
412.1005 ++	stw  r30,((JB_GPRS+16)*4)(3)
412.1006 ++	stfd fp30,((JB_FPRS+16*2)*4)(3)
412.1007 ++	stw  r31,((JB_GPRS+17)*4)(3)
412.1008 ++	stfd fp31,((JB_FPRS+17*2)*4)(3)
412.1009 ++	b JUMPTARGET (BP_SYM (__sigjmp_save))
412.1010 ++END (BP_SYM (__sigsetjmp))
412.1011 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu_control.h glibc-2.2.5/sysdeps/powerpc/fpu_control.h
412.1012 +--- glibc-2.2.5.old/sysdeps/powerpc/fpu_control.h	Thu Jul  5 21:56:01 2001
412.1013 ++++ glibc-2.2.5/sysdeps/powerpc/fpu_control.h	Wed Dec 31 16:00:00 1969
412.1014 +@@ -1,67 +0,0 @@
412.1015 +-/* FPU control word definitions.  PowerPC version.
412.1016 +-   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
412.1017 +-   This file is part of the GNU C Library.
412.1018 +-
412.1019 +-   The GNU C Library is free software; you can redistribute it and/or
412.1020 +-   modify it under the terms of the GNU Lesser General Public
412.1021 +-   License as published by the Free Software Foundation; either
412.1022 +-   version 2.1 of the License, or (at your option) any later version.
412.1023 +-
412.1024 +-   The GNU C Library is distributed in the hope that it will be useful,
412.1025 +-   but WITHOUT ANY WARRANTY; without even the implied warranty of
412.1026 +-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
412.1027 +-   Lesser General Public License for more details.
412.1028 +-
412.1029 +-   You should have received a copy of the GNU Lesser General Public
412.1030 +-   License along with the GNU C Library; if not, write to the Free
412.1031 +-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
412.1032 +-   02111-1307 USA.  */
412.1033 +-
412.1034 +-#ifndef _FPU_CONTROL_H
412.1035 +-#define _FPU_CONTROL_H
412.1036 +-
412.1037 +-/* rounding control */
412.1038 +-#define _FPU_RC_NEAREST 0x00   /* RECOMMENDED */
412.1039 +-#define _FPU_RC_DOWN    0x03
412.1040 +-#define _FPU_RC_UP      0x02
412.1041 +-#define _FPU_RC_ZERO    0x01
412.1042 +-
412.1043 +-#define _FPU_MASK_NI  0x04 /* non-ieee mode */
412.1044 +-
412.1045 +-/* masking of interrupts */
412.1046 +-#define _FPU_MASK_ZM  0x10 /* zero divide */
412.1047 +-#define _FPU_MASK_OM  0x40 /* overflow */
412.1048 +-#define _FPU_MASK_UM  0x20 /* underflow */
412.1049 +-#define _FPU_MASK_XM  0x08 /* inexact */
412.1050 +-#define _FPU_MASK_IM  0x80 /* invalid operation */
412.1051 +-
412.1052 +-#define _FPU_RESERVED 0xffffff00 /* These bits are reserved are not changed. */
412.1053 +-
412.1054 +-/* The fdlibm code requires no interrupts for exceptions.  */
412.1055 +-#define _FPU_DEFAULT  0x00000000 /* Default value.  */
412.1056 +-
412.1057 +-/* IEEE:  same as above, but (some) exceptions;
412.1058 +-   we leave the 'inexact' exception off.
412.1059 +- */
412.1060 +-#define _FPU_IEEE     0x000000f0
412.1061 +-
412.1062 +-/* Type of the control word.  */
412.1063 +-typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
412.1064 +-
412.1065 +-/* Macros for accessing the hardware control word.  */
412.1066 +-#define _FPU_GETCW(cw) ( { \
412.1067 +-  union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
412.1068 +-  __asm__ ("mffs 0; stfd%U0 0,%0" : "=m" (tmp.d) : : "fr0"); \
412.1069 +-  (cw)=tmp.cw[1]; \
412.1070 +-  tmp.cw[1]; } )
412.1071 +-#define _FPU_SETCW(cw) { \
412.1072 +-  union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
412.1073 +-  tmp.cw[0] = 0xFFF80000; /* More-or-less arbitrary; this is a QNaN. */ \
412.1074 +-  tmp.cw[1] = cw; \
412.1075 +-  __asm__ ("lfd%U0 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
412.1076 +-}
412.1077 +-
412.1078 +-/* Default control word set at startup.  */
412.1079 +-extern fpu_control_t __fpu_control;
412.1080 +-
412.1081 +-#endif /* _FPU_CONTROL_H */
412.1082 +diff -Naur glibc-2.2.5.old/sysdeps/powerpc/setjmp.S glibc-2.2.5/sysdeps/powerpc/setjmp.S
412.1083 +--- glibc-2.2.5.old/sysdeps/powerpc/setjmp.S	Thu Jul  5 21:56:01 2001
412.1084 ++++ glibc-2.2.5/sysdeps/powerpc/setjmp.S	Thu Jul 10 11:43:44 2003
412.1085 +@@ -24,6 +24,8 @@
412.1086 + #include <bp-sym.h>
412.1087 + #include <bp-asm.h>
412.1088 + 
412.1089 ++/* The FPU stores have been removed from this file - see fpu/setjmp.S */
412.1090 ++
412.1091 + ENTRY (BP_SYM (__sigsetjmp))
412.1092 + 	CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
412.1093 + 
412.1094 +@@ -31,43 +33,25 @@
412.1095 + 	mflr r0
412.1096 + 	stw  r2,(JB_GPR2*4)(3)
412.1097 + 	stw  r14,((JB_GPRS+0)*4)(3)
412.1098 +-	stfd fp14,((JB_FPRS+0*2)*4)(3)
412.1099 + 	stw  r0,(JB_LR*4)(3)
412.1100 + 	stw  r15,((JB_GPRS+1)*4)(3)
412.1101 +-	stfd fp15,((JB_FPRS+1*2)*4)(3)
412.1102 + 	mfcr r0
412.1103 + 	stw  r16,((JB_GPRS+2)*4)(3)
412.1104 +-	stfd fp16,((JB_FPRS+2*2)*4)(3)
412.1105 + 	stw  r0,(JB_CR*4)(3)
412.1106 + 	stw  r17,((JB_GPRS+3)*4)(3)
412.1107 +-	stfd fp17,((JB_FPRS+3*2)*4)(3)
412.1108 + 	stw  r18,((JB_GPRS+4)*4)(3)
412.1109 +-	stfd fp18,((JB_FPRS+4*2)*4)(3)
412.1110 + 	stw  r19,((JB_GPRS+5)*4)(3)
412.1111 +-	stfd fp19,((JB_FPRS+5*2)*4)(3)
412.1112 + 	stw  r20,((JB_GPRS+6)*4)(3)
412.1113 +-	stfd fp20,((JB_FPRS+6*2)*4)(3)
412.1114 + 	stw  r21,((JB_GPRS+7)*4)(3)
412.1115 +-	stfd fp21,((JB_FPRS+7*2)*4)(3)
412.1116 + 	stw  r22,((JB_GPRS+8)*4)(3)
412.1117 +-	stfd fp22,((JB_FPRS+8*2)*4)(3)
412.1118 + 	stw  r23,((JB_GPRS+9)*4)(3)
412.1119 +-	stfd fp23,((JB_FPRS+9*2)*4)(3)
412.1120 + 	stw  r24,((JB_GPRS+10)*4)(3)
412.1121 +-	stfd fp24,((JB_FPRS+10*2)*4)(3)
412.1122 + 	stw  r25,((JB_GPRS+11)*4)(3)
412.1123 +-	stfd fp25,((JB_FPRS+11*2)*4)(3)
412.1124 + 	stw  r26,((JB_GPRS+12)*4)(3)
412.1125 +-	stfd fp26,((JB_FPRS+12*2)*4)(3)
412.1126 + 	stw  r27,((JB_GPRS+13)*4)(3)
412.1127 +-	stfd fp27,((JB_FPRS+13*2)*4)(3)
412.1128 + 	stw  r28,((JB_GPRS+14)*4)(3)
412.1129 +-	stfd fp28,((JB_FPRS+14*2)*4)(3)
412.1130 + 	stw  r29,((JB_GPRS+15)*4)(3)
412.1131 +-	stfd fp29,((JB_FPRS+15*2)*4)(3)
412.1132 + 	stw  r30,((JB_GPRS+16)*4)(3)
412.1133 +-	stfd fp30,((JB_FPRS+16*2)*4)(3)
412.1134 + 	stw  r31,((JB_GPRS+17)*4)(3)
412.1135 +-	stfd fp31,((JB_FPRS+17*2)*4)(3)
412.1136 + 	b JUMPTARGET (BP_SYM (__sigjmp_save))
412.1137 + END (BP_SYM (__sigsetjmp))
   413.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   413.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-i386-pwrite64.patch	Sat Feb 24 11:00:05 2007 +0000
   413.3 @@ -0,0 +1,20 @@
   413.4 +diff -urN glibc-2.2.5-orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.2.5/sysdeps/unix/sysv/linux/i386/sysdep.h
   413.5 +--- glibc-2.2.5-orig/sysdeps/unix/sysv/linux/i386/sysdep.h	2001-07-06 06:56:16.000000000 +0200
   413.6 ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/i386/sysdep.h	2004-09-03 12:35:44.000000000 +0200
   413.7 +@@ -36,6 +36,16 @@
   413.8 + #undef L
   413.9 + #define L(name)	.L##name
  413.10 + 
  413.11 ++/* This is a kludge to make syscalls.list find these under the names
  413.12 ++ *    pread and pwrite, since some kernel headers define those names
  413.13 ++ *       and some define the *64 names for the same system calls.  */
  413.14 ++#if !defined __NR_pread && defined __NR_pread64
  413.15 ++# define __NR_pread __NR_pread64
  413.16 ++#endif
  413.17 ++#if !defined __NR_pwrite && defined __NR_pwrite64
  413.18 ++# define __NR_pwrite __NR_pwrite64
  413.19 ++#endif
  413.20 ++
  413.21 + #ifdef __ASSEMBLER__
  413.22 + 
  413.23 + /* Linux uses a negative return value to indicate syscall errors,
   414.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   414.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-m68k-pwrite.patch	Sat Feb 24 11:00:05 2007 +0000
   414.3 @@ -0,0 +1,32 @@
   414.4 +Copied from similar patch for other architectures.
   414.5 +
   414.6 +Should fix this error:
   414.7 +../sysdeps/unix/sysv/linux/pread.c: In function `__libc_pread':
   414.8 +../sysdeps/unix/sysv/linux/pread.c:53: `__NR_pread' undeclared (first use in this function)
   414.9 +../sysdeps/unix/sysv/linux/pread.c:53: (Each undeclared identifier is reported only once
  414.10 +../sysdeps/unix/sysv/linux/pread.c:53: for each function it appears in.)
  414.11 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc37/build/m68k-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.5/build-glibc/posix/pread.o] Error 1
  414.12 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/m68k-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.5/glibc-2.2.5/posix'
  414.13 +make[1]: *** [posix/subdir_lib] Error 2
  414.14 +make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/m68k-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.5/glibc-2.2.5'
  414.15 +make: *** [all] Error 2
  414.16 +
  414.17 +--- glibc-2.2.5/sysdeps/unix/sysv/linux/m68k/sysdep.h.old	2004-10-05 08:37:37.000000000 -0700
  414.18 ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/m68k/sysdep.h	2004-10-05 08:38:22.000000000 -0700
  414.19 +@@ -32,6 +32,16 @@
  414.20 + # define SYS_ify(syscall_name)	__NR_/**/syscall_name
  414.21 + #endif
  414.22 + 
  414.23 ++/* This is a kludge to make syscalls.list find these under the names
  414.24 ++   pread and pwrite, since some kernel headers define those names
  414.25 ++   and some define the *64 names for the same system calls.  */
  414.26 ++#if !defined __NR_pread && defined __NR_pread64
  414.27 ++# define __NR_pread __NR_pread64
  414.28 ++#endif
  414.29 ++#if !defined __NR_pwrite && defined __NR_pwrite64
  414.30 ++# define __NR_pwrite __NR_pwrite64
  414.31 ++#endif
  414.32 ++
  414.33 + #ifdef __ASSEMBLER__
  414.34 + 
  414.35 + /* Linux uses a negative return value to indicate syscall errors, unlike
   415.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   415.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-mips-build-gmon.patch	Sat Feb 24 11:00:05 2007 +0000
   415.3 @@ -0,0 +1,86 @@
   415.4 +From http://www.ltc.com/~brad/mips/glibc-2.2.5-mips-build-gmon.diff
   415.5 +See http://www.ltc.com/~brad/mips/mips-cross-toolchain.html
   415.6 +
   415.7 +--- glibc-2.2.5/sysdeps/mips/machine-gmon.h	2001-08-13 04:42:44.000000000 -0400
   415.8 ++++ glibc-2.2.5/sysdeps/mips/machine-gmon.h	2002-09-25 17:10:59.000000000 -0400
   415.9 +@@ -17,42 +17,52 @@
  415.10 +    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  415.11 +    02111-1307 USA.  */
  415.12 + 
  415.13 +-#define _MCOUNT_DECL static void __mcount
  415.14 ++#define _MCOUNT_DECL(frompc,selfpc) \
  415.15 ++static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
  415.16 + 
  415.17 + /* Call __mcount with our the return PC for our caller,
  415.18 +    and the return PC our caller will return to.  */
  415.19 + #ifdef __PIC__
  415.20 + #define CPLOAD ".cpload $25;"
  415.21 ++#define CPRESTORE ".cprestore 44\n\t"
  415.22 + #else
  415.23 + #define CPLOAD
  415.24 ++#define CPRESTORE
  415.25 + #endif
  415.26 + 
  415.27 + #define MCOUNT asm(\
  415.28 +-	".globl _mcount;" \
  415.29 +-	".align 2;" \
  415.30 +-	".type _mcount,@function;" \
  415.31 +-        "_mcount:;" \
  415.32 +-        ".set noreorder;" \
  415.33 +-        ".set noat;" \
  415.34 ++	".globl _mcount;\n\t" \
  415.35 ++	".align 2;\n\t" \
  415.36 ++	".type _mcount,@function;\n\t" \
  415.37 ++	".ent _mcount\n\t" \
  415.38 ++        "_mcount:\n\t" \
  415.39 ++        ".frame $sp,44,$31\n\t" \
  415.40 ++        ".set noreorder;\n\t" \
  415.41 ++        ".set noat;\n\t" \
  415.42 +         CPLOAD \
  415.43 +-        "sw $4,8($29);" \
  415.44 +-        "sw $5,12($29);" \
  415.45 +-        "sw $6,16($29);" \
  415.46 +-        "sw $7,20($29);" \
  415.47 +-        "sw $1,0($29);" \
  415.48 +-        "sw $31,4($29);" \
  415.49 +-        "move $5,$31;" \
  415.50 +-        "move $4,$1;" \
  415.51 +-        "jal __mcount;" \
  415.52 +-	"nop;" \
  415.53 +-        "lw $4,8($29);" \
  415.54 +-        "lw $5,12($29);" \
  415.55 +-        "lw $6,16($29);" \
  415.56 +-        "lw $7,20($29);" \
  415.57 +-        "lw $31,4($29);" \
  415.58 +-        "lw $1,0($29);" \
  415.59 +-        "addu $29,$29,8;" \
  415.60 +-        "j $31;" \
  415.61 +-        "move $31,$1;" \
  415.62 +-        ".set reorder;" \
  415.63 +-        ".set at");
  415.64 ++	"subu $29,$29,48;\n\t" \
  415.65 ++	CPRESTORE \
  415.66 ++        "sw $4,24($29);\n\t" \
  415.67 ++        "sw $5,28($29);\n\t" \
  415.68 ++        "sw $6,32($29);\n\t" \
  415.69 ++        "sw $7,36($29);\n\t" \
  415.70 ++        "sw $2,40($29);\n\t" \
  415.71 ++        "sw $1,16($29);\n\t" \
  415.72 ++        "sw $31,20($29);\n\t" \
  415.73 ++        "move $5,$31;\n\t" \
  415.74 ++        "move $4,$1;\n\t" \
  415.75 ++        "jal __mcount;\n\t" \
  415.76 ++        "nop;\n\t" \
  415.77 ++        "lw $4,24($29);\n\t" \
  415.78 ++        "lw $5,28($29);\n\t" \
  415.79 ++        "lw $6,32($29);\n\t" \
  415.80 ++        "lw $7,36($29);\n\t" \
  415.81 ++        "lw $2,40($29);\n\t" \
  415.82 ++        "lw $31,20($29);\n\t" \
  415.83 ++        "lw $1,16($29);\n\t" \
  415.84 ++        "addu $29,$29,56;\n\t" \
  415.85 ++        "j $31;\n\t" \
  415.86 ++        "move $31,$1;\n\t" \
  415.87 ++        ".set reorder;\n\t" \
  415.88 ++        ".set at\n\t" \
  415.89 ++        ".end _mcount");
   416.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   416.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-mips-clone-local-label.patch	Sat Feb 24 11:00:05 2007 +0000
   416.3 @@ -0,0 +1,47 @@
   416.4 +This is a workaround for
   416.5 +
   416.6 +mipsel-unknown-linux-gnu-gcc ../sysdeps/unix/sysv/linux/mips/clone.S -c  -I../include -I. -I/home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/misc -I.. -I../libio  -I/home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc -I../sysdeps/mips/elf -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/mips -I../sysdeps/unix/sysv/linux/mips -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/mips -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/mips/mipsel -I../sysdeps/mips/fpu -I../sysdeps/mips -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic  -nostdinc -isystem /home3/dank/crosstool-0.7/result/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/mipsel-unknown-linux-gnu/3.2.3/include -isystem /home3/dank/crosstool-0.7/result/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/mipsel-unknown-linux-gnu/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC   -DASSEMBLER   -o /home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/misc/clone.o
   416.7 +../sysdeps/unix/sysv/linux/mips/clone.S: Assembler messages:
   416.8 +../sysdeps/unix/sysv/linux/mips/clone.S:66: Error: Can not represent BFD_RELOC_16_PCREL_S2 relocation in this object file format
   416.9 +make[2]: *** [/home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/misc/clone.o] Error 1
  416.10 +
  416.11 +which was using h.j.lu's binutils-2.13.90.0.18.
  416.12 +
  416.13 +
  416.14 +But see http://lists.debian.org/debian-mips/2003/debian-mips-200305/msg00011.html
  416.15 +which says
  416.16 +"A newer version of binutils (CVS post 2003-03-12) fixes it without
  416.17 +the need of changing perfectly legal code."
  416.18 +So presumably this can be ditched sooner or later.
  416.19 +
  416.20 +From http://honk.physik.uni-konstanz.de/~agx/linux-mips/glibc/patches/applied/clone-local-label.diff
  416.21 +
  416.22 +2003-03-13  Guido Guenther  <agx@sigxcpu.org>
  416.23 +
  416.24 +	* sysdeps/unix/sysv/linux/mips/clone.S: introduce and use local label
  416.25 +	  .Lthread_start since current binutils don't allow branches to globally
  416.26 +	  visible symbols.
  416.27 +
  416.28 +===================================================================
  416.29 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/clone.S,v
  416.30 +retrieving revision 1.10
  416.31 +diff -u -r1.10 clone.S
  416.32 +--- glibc-2.2.5/sysdeps/unix/sysv/linux/mips/clone.S	12 Mar 2003 01:04:51 -0000	1.10
  416.33 ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/mips/clone.S	12 Mar 2003 19:04:39 -0000
  416.34 +@@ -63,7 +63,7 @@
  416.35 + 	syscall
  416.36 + 
  416.37 + 	bnez		a3,error
  416.38 +-	beqz		v0,__thread_start
  416.39 ++	beqz		v0,.Lthread_start
  416.40 + 
  416.41 + 	/* Successful return from the parent */
  416.42 + 	addiu		sp,32
  416.43 +@@ -85,6 +85,7 @@
  416.44 +    debug info.  */
  416.45 + 
  416.46 + ENTRY(__thread_start)
  416.47 ++.Lthread_start:
  416.48 + 	/* cp is already loaded.  */
  416.49 + 	.cprestore	16
  416.50 + 	/* The stackframe has been created on entry of clone().  */
   417.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   417.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-mips-dl-machine-1.56.patch	Sat Feb 24 11:00:05 2007 +0000
   417.3 @@ -0,0 +1,31 @@
   417.4 +wget http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/mips/dl-machine.h.diff?r1=1.55&r2=1.56&cvsroot=glibc
   417.5 +
   417.6 +Changelog: 
   417.7 +    (__dl_runtime_resolve): Remove `const' from `got'.
   417.8 +
   417.9 +Fixes error
  417.10 +
  417.11 +dl-runtime.c: In function `__dl_runtime_resolve':
  417.12 +dl-runtime.c:235: error: assignment of read-only location
  417.13 +make[2]: *** [/home/dank/crosstool-0.28-rc32/build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.2.5/build-glibc/elf/dl-runtime.o] Error 1
  417.14 +
  417.15 +when building mipsel-gcc-3.4.0-glibc-2.2.5
  417.16 +
  417.17 +===================================================================
  417.18 +RCS file: /cvs/glibc/libc/sysdeps/mips/dl-machine.h,v
  417.19 +retrieving revision 1.55
  417.20 +retrieving revision 1.56
  417.21 +diff -u -r1.55 -r1.56
  417.22 +--- libc/sysdeps/mips/dl-machine.h	2001/09/08 17:16:44	1.55
  417.23 ++++ libc/sysdeps/mips/dl-machine.h	2002/01/17 23:21:33	1.56
  417.24 +@@ -276,8 +276,8 @@
  417.25 +     = (const void *) D_PTR (l, l_info[DT_SYMTAB]);			      \
  417.26 +   const char *strtab							      \
  417.27 +     = (const void *) D_PTR (l, l_info[DT_STRTAB]);			      \
  417.28 +-  const ElfW(Addr) *got							      \
  417.29 +-    = (const ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]);		      \
  417.30 ++  ElfW(Addr) *got							      \
  417.31 ++    = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]);			      \
  417.32 +   const ElfW(Word) local_gotno						      \
  417.33 +     = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;	      \
  417.34 +   const ElfW(Word) gotsym						      \
   418.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   418.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-mips-dl-machine-1.57.patch	Sat Feb 24 11:00:05 2007 +0000
   418.3 @@ -0,0 +1,43 @@
   418.4 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/mips/dl-machine.h.diff?r1=1.57&r2=1.58&cvsroot=glibc'
   418.5 +
   418.6 +ChangeLog:
   418.7 +    (ELF_MACHINE_BEFORE_RTLD_RELOC): Don't use label at end of compound statement.
   418.8 +
   418.9 +Fixes error
  418.10 +
  418.11 +rtld.c: In function `_dl_start':
  418.12 +rtld.c:183: error: label at end of compound statement
  418.13 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc32/build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.2.5/build-glibc/elf/rtld.os] Error 1
  418.14 +
  418.15 +
  418.16 +===================================================================
  418.17 +RCS file: /cvs/glibc/libc/sysdeps/mips/dl-machine.h,v
  418.18 +retrieving revision 1.56
  418.19 +retrieving revision 1.57
  418.20 +diff -u -r1.56 -r1.57
  418.21 +--- libc/sysdeps/mips/dl-machine.h	2002/01/17 23:21:33	1.56
  418.22 ++++ libc/sysdeps/mips/dl-machine.h	2002/01/29 02:58:00	1.57
  418.23 +@@ -1,5 +1,5 @@
  418.24 + /* Machine-dependent ELF dynamic relocation inline functions.  MIPS version.
  418.25 +-   Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
  418.26 ++   Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
  418.27 +    This file is part of the GNU C Library.
  418.28 +    Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
  418.29 + 
  418.30 +@@ -132,7 +132,7 @@
  418.31 +   got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]);			\
  418.32 + 									\
  418.33 +   if (__builtin_expect (map->l_addr == 0, 1))				\
  418.34 +-    goto done;								\
  418.35 ++    break;								\
  418.36 + 									\
  418.37 +   /* got[0] is reserved. got[1] is also reserved for the dynamic object	\
  418.38 +      generated by gnu ld. Skip these reserved entries from		\
  418.39 +@@ -169,7 +169,6 @@
  418.40 +       got++;								\
  418.41 +       sym++;								\
  418.42 +     }									\
  418.43 +-done:									\
  418.44 + } while(0)
  418.45 + 
  418.46 + 
   419.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   419.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-mips-dl-machine-1.59-kinda.patch	Sat Feb 24 11:00:05 2007 +0000
   419.3 @@ -0,0 +1,35 @@
   419.4 +Fixes error
   419.5 +
   419.6 +In file included from dynamic-link.h:21,
   419.7 +                 from dl-load.c:32:
   419.8 +../sysdeps/mips/dl-machine.h:454: error: parse error before "$29"
   419.9 +../sysdeps/mips/dl-machine.h:454: warning: type defaults to `int' in declaration of `$29'
  419.10 +../sysdeps/mips/dl-machine.h:454: error: stray '\' in program
  419.11 +../sysdeps/mips/dl-machine.h:454: error: syntax error at '#' token
  419.12 +../sysdeps/mips/dl-machine.h:454: error: stray '\' in program
  419.13 +../sysdeps/mips/dl-machine.h:454: error: stray '\' in program
  419.14 +../sysdeps/mips/dl-machine.h:454: error: syntax error at '#' token
  419.15 +../sysdeps/mips/dl-machine.h:454: error: stray '\' in program
  419.16 +../sysdeps/mips/dl-machine.h:454: error: stray '\' in program
  419.17 +../sysdeps/mips/dl-machine.h:454: error: stray '\' in program
  419.18 +../sysdeps/mips/dl-machine.h:454: error: stray '\' in program
  419.19 +../sysdeps/mips/dl-machine.h:454: error: missing terminating " character
  419.20 +...
  419.21 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc24/build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.2.5/build-glibc/elf/dl-load.o] Error 1
  419.22 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc24/build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.2.5/glibc-2.2.5/elf'
  419.23 +
  419.24 +See also http://sources.redhat.com/ml/crossgcc/2003-12/msg00014.html
  419.25 +
  419.26 +===================================================================
  419.27 +diff -u -r1.58 -r1.59
  419.28 +--- libc/sysdeps/mips/dl-machine.h	2002/02/01 01:31:55	1.58
  419.29 ++++ libc/sysdeps/mips/dl-machine.h	2002/02/03 00:29:15	1.59
  419.30 +@@ -449,7 +449,7 @@
  419.31 + 	addu $7, $7, 4\n\
  419.32 + 	subu $29, 16\n\
  419.33 + 	# Call the function to run the initializers.\n\
  419.34 +-	jal _dl_init
  419.35 ++	jal _dl_init\n\
  419.36 + 	addiu $29, 16\n\
  419.37 + 	# Pass our finalizer function to the user in $2 as per ELF ABI.\n\
  419.38 + 	la $2, _dl_fini\n\
   420.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   420.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-mips-dl-machine-1.60.patch	Sat Feb 24 11:00:05 2007 +0000
   420.3 @@ -0,0 +1,53 @@
   420.4 +Message-ID: <20040926095115.9204.qmail@webmail-2-5.mesa1.secureserver.net>
   420.5 +Date: Sun, 26 Sep 2004 02:51:15 -0700
   420.6 +From: ml@bitbash.net
   420.7 +Subject: RE: crosstool-0.28-rc36: ld.so.1 undefined reference
   420.8 +To: Dan Kegel <dank@kegel.com>
   420.9 +cc: crossgcc@sources.redhat.com
  420.10 +
  420.11 +gcc-3.4.0-glibc-2.2.5 barfs with a few undefined refereces and multiple
  420.12 +definitions. The follwing patch seems to take care of the undefined
  420.13 +reference of __dl_runtime_resolve symbol. 
  420.14 +
  420.15 +Filename: patches/glibc-2.2.5/glibc-2.2.5-mips-dl-machine-1.60.patch 
  420.16 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  420.17 +Retrieved with
  420.18 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/mips/dl-machine.h.diff?r1=1.59&r2=1.60&cvsroot=glibc'
  420.19 +See http://sources.redhat.com/ml/libc-alpha/2002-02/msg00091.html
  420.20 +See also glibc-2.2.5-mips-build-gmon.patch, which takes care of the other part of this for mips.
  420.21 +
  420.22 +ChangeLog:
  420.23 +        sysdeps/mips/dl-machine.h (elf_machine_matches_host): Use
  420.24 +        __attribute_used__.
  420.25 +        (__dl_runtime_resolve): Likewise.
  420.26 +
  420.27 +Fixes error
  420.28 +
  420.29 +/home/cross/crosstool-0.28-rc36/build/mips-unknown-linux-gnu/gcc-3.4.0-glibc-2.2.5/build-glibc/elf/ld.so.1:
  420.30 +undefined reference to `__dl_runtime_resolve'
  420.31 +
  420.32 +===================================================================
  420.33 +RCS file: /cvs/glibc/libc/sysdeps/mips/dl-machine.h,v
  420.34 +retrieving revision 1.59
  420.35 +retrieving revision 1.60
  420.36 +diff -u -r1.59 -r1.60
  420.37 +--- libc/sysdeps/mips/dl-machine.h	2002/02/03 00:29:15	1.59
  420.38 ++++ libc/sysdeps/mips/dl-machine.h	2002/02/08 18:56:57	1.60
  420.39 +@@ -69,7 +69,7 @@
  420.40 +    } while (0)
  420.41 + 
  420.42 + /* Return nonzero iff ELF header is compatible with the running host.  */
  420.43 +-static inline int __attribute__ ((unused))
  420.44 ++static inline int __attribute_used__
  420.45 + elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
  420.46 + {
  420.47 +   switch (ehdr->e_machine)
  420.48 +@@ -262,7 +262,7 @@
  420.49 + /* This is called from assembly stubs below which the compiler can't see.  */ \
  420.50 + static ElfW(Addr)							      \
  420.51 + __dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr))	      \
  420.52 +-		  __attribute__ ((unused));				      \
  420.53 ++		  __attribute_used__;					      \
  420.54 + 									      \
  420.55 + static ElfW(Addr)							      \
  420.56 + __dl_runtime_resolve (ElfW(Word) sym_index,				      \
   421.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   421.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-powerpc-as.patch	Sat Feb 24 11:00:05 2007 +0000
   421.3 @@ -0,0 +1,29 @@
   421.4 +Based on glibc-2.3.2/glibc-2.3.2-powerpc-as.patch
   421.5 +
   421.6 +Fixes the following errors when building glibc for ppc7450:
   421.7 +
   421.8 +/tmp/ccwlHdbl.s: Assembler messages:
   421.9 +/tmp/ccwlHdbl.s:73: Error: Unrecognized opcode: `stvx'
  421.10 +/tmp/ccwlHdbl.s:74: Error: Unrecognized opcode: `mfvrsave'
  421.11 +/tmp/ccwlHdbl.s:300: Error: Unrecognized opcode: `lvx'
  421.12 +/tmp/ccwlHdbl.s:302: Error: Unrecognized opcode: `mtvrsave'
  421.13 +make[2]: *** [/usr/local/src/crosstool-0.28-rc34/build/powerpc-7450-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/libio/iopopen.o] Error 1
  421.14 +make[2]: Leaving directory `/home/local/src/crosstool-0.28-rc34/build/powerpc-7450-linux-gnu/gcc-3.2.3-glibc-2.2.5/glibc-2.2.5/libio'
  421.15 +make[1]: *** [libio/subdir_lib] Error 2
  421.16 +make[1]: Leaving directory `/home/local/src/crosstool-0.28-rc34/build/powerpc-7450-linux-gnu/gcc-3.2.3-glibc-2.2.5/glibc-2.2.5'
  421.17 +make: *** [all] Error 2
  421.18 +
  421.19 +Contributed by Tom Warzeka <waz@quahog.npt.nuwc.navy.mil>
  421.20 +
  421.21 +===================================================================
  421.22 +--- glibc-2.2.5/sysdeps/powerpc/Makefile~	2004-08-31 14:59:15.000000000 -0400
  421.23 ++++ glibc-2.2.5/sysdeps/powerpc/Makefile	2004-09-02 19:47:21.000000000 -0400
  421.24 +@@ -1,7 +1,6 @@
  421.25 + # We always want to use the new mnemonic syntax even if we are on a RS6000
  421.26 + # machine.
  421.27 +-+cflags += -mnew-mnemonics -Wa,-mppc -mpowerpc
  421.28 +-asm-CPPFLAGS += -Wa,-mppc
  421.29 +++cflags += -mnew-mnemonics
  421.30 + 
  421.31 + ifeq ($(subdir),gmon)
  421.32 + sysdep_routines += ppc-mcount
   422.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   422.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-ppc405erratum77.patch	Sat Feb 24 11:00:05 2007 +0000
   422.3 @@ -0,0 +1,65 @@
   422.4 +# see http://bugs.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4155
   422.5 +# and http://www.kegel.com/xgcc3/ppc405erratum77.html
   422.6 +# See also matching patch for linuxthreads
   422.7 +
   422.8 +diff -aur glibc-2.2.5.orig/sysdeps/powerpc/atomicity.h glibc-2.2.5/sysdeps/powerpc/atomicity.h
   422.9 +--- glibc-2.2.5.orig/sysdeps/powerpc/atomicity.h	Thu Jul  5 21:56:01 2001
  422.10 ++++ glibc-2.2.5/sysdeps/powerpc/atomicity.h	Tue Jul 23 05:39:38 2002
  422.11 +@@ -28,6 +28,17 @@
  422.12 + # define __ATOMICITY_INLINE inline
  422.13 + #endif
  422.14 + 
  422.15 ++#ifdef __PPC405__
  422.16 ++/* workaround for PPC405 erratum #77 - Mark Hatle, dank.  References:
  422.17 ++   http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
  422.18 ++   http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
  422.19 ++   http://www.kegel.com/xgcc3/ppc405erratum77.html
  422.20 ++   FIXME: using dbct instead of sync would be faster  */
  422.21 ++#define __LIBC_PPC405_ERR77_SYNC   "sync \n\t"
  422.22 ++#else
  422.23 ++#define __LIBC_PPC405_ERR77_SYNC
  422.24 ++#endif
  422.25 ++
  422.26 + static __ATOMICITY_INLINE int
  422.27 + __attribute__ ((unused))
  422.28 + exchange_and_add (volatile uint32_t *mem, int val)
  422.29 +@@ -36,6 +47,7 @@
  422.30 +   __asm__ ("\n\
  422.31 + 0:	lwarx	%0,0,%2	\n\
  422.32 + 	add%I3	%1,%0,%3	\n\
  422.33 ++	" __LIBC_PPC405_ERR77_SYNC "\n\
  422.34 + 	stwcx.	%1,0,%2	\n\
  422.35 + 	bne-	0b	\n\
  422.36 + " : "=&b"(result), "=&r"(tmp) : "r" (mem), "Ir"(val) : "cr0", "memory");
  422.37 +@@ -50,6 +62,7 @@
  422.38 +   __asm__ ("\n\
  422.39 + 0:	lwarx	%0,0,%1	\n\
  422.40 + 	add%I2	%0,%0,%2	\n\
  422.41 ++	" __LIBC_PPC405_ERR77_SYNC "\n\
  422.42 + 	stwcx.	%0,0,%1	\n\
  422.43 + 	bne-	0b	\n\
  422.44 + " : "=&b"(tmp) : "r" (mem), "Ir"(val) : "cr0", "memory");
  422.45 +@@ -65,6 +78,7 @@
  422.46 + 	sub%I2c.	%0,%0,%2	\n\
  422.47 + 	cntlzw	%0,%0	\n\
  422.48 + 	bne-	1f	\n\
  422.49 ++	" __LIBC_PPC405_ERR77_SYNC "\n\
  422.50 + 	stwcx.	%3,0,%1	\n\
  422.51 + 	bne-	0b	\n\
  422.52 + 1:	\n\
  422.53 +@@ -79,6 +93,7 @@
  422.54 +   long int result;
  422.55 +   __asm__ ("\n\
  422.56 + 0:	lwarx	%0,0,%1	\n\
  422.57 ++	" __LIBC_PPC405_ERR77_SYNC "\n\
  422.58 + 	stwcx.	%2,0,%1	\n\
  422.59 + 	bne-	0b	\n\
  422.60 + " : "=&r"(result) : "r"(p), "r"(newval) : "cr0", "memory");
  422.61 +@@ -94,6 +109,7 @@
  422.62 + 0:	lwarx	%0,0,%1	\n\
  422.63 + 	cmpwi	%0,0	\n\
  422.64 + 	bne-	1f	\n\
  422.65 ++	" __LIBC_PPC405_ERR77_SYNC "\n\
  422.66 + 	stwcx.	%2,0,%1	\n\
  422.67 + 	bne-	0b	\n\
  422.68 + 1:	\n\
   423.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   423.2 +++ b/patches/glibc/2.2.5/glibc-2.3.2-allow-gcc-3.5-xdr.patch	Sat Feb 24 11:00:05 2007 +0000
   423.3 @@ -0,0 +1,44 @@
   423.4 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sunrpc/rpc/xdr.h.diff?r1=1.27&r2=1.28&cvsroot=glibc
   423.5 +(but see also http://sources.redhat.com/ml/libc-alpha/2004-03/msg00267.html
   423.6 +and http://gcc.gnu.org/ml/gcc-patches/2004-03/msg02056.html)
   423.7 +
   423.8 +Fixes errors
   423.9 +
  423.10 +rpc_cmsg.c: In function `xdr_callmsg':
  423.11 +rpc_cmsg.c:70: error: invalid lvalue in increment
  423.12 +rpc_cmsg.c:71: error: invalid lvalue in increment
  423.13 +rpc_cmsg.c:74: error: invalid lvalue in increment
  423.14 +rpc_cmsg.c:77: error: invalid lvalue in increment
  423.15 +rpc_cmsg.c:78: error: invalid lvalue in increment
  423.16 +rpc_cmsg.c:79: error: invalid lvalue in increment
  423.17 +rpc_cmsg.c:81: error: invalid lvalue in increment
  423.18 +rpc_cmsg.c:89: error: invalid lvalue in increment
  423.19 +rpc_cmsg.c:106: error: invalid lvalue in increment
  423.20 +rpc_cmsg.c:107: error: invalid lvalue in increment
  423.21 +rpc_cmsg.c:112: error: invalid lvalue in increment
  423.22 +rpc_cmsg.c:117: error: invalid lvalue in increment
  423.23 +rpc_cmsg.c:118: error: invalid lvalue in increment
  423.24 +rpc_cmsg.c:119: error: invalid lvalue in increment
  423.25 +rpc_cmsg.c:121: error: invalid lvalue in increment
  423.26 +rpc_cmsg.c:160: error: invalid lvalue in increment
  423.27 +
  423.28 +===================================================================
  423.29 +RCS file: /cvs/glibc/libc/sunrpc/rpc/xdr.h,v
  423.30 +retrieving revision 1.27
  423.31 +retrieving revision 1.28
  423.32 +diff -u -r1.27 -r1.28
  423.33 +--- libc/sunrpc/rpc/xdr.h	2002/12/16 02:05:49	1.27
  423.34 ++++ libc/sunrpc/rpc/xdr.h	2004/03/22 10:52:33	1.28
  423.35 +@@ -262,10 +262,8 @@
  423.36 +  * and shouldn't be used any longer. Code which use this defines or longs
  423.37 +  * in the RPC code will not work on 64bit Solaris platforms !
  423.38 +  */
  423.39 +-#define IXDR_GET_LONG(buf) \
  423.40 +-	((long)ntohl((u_long)*__extension__((u_int32_t*)(buf))++))
  423.41 +-#define IXDR_PUT_LONG(buf, v) \
  423.42 +-	(*__extension__((u_int32_t*)(buf))++ = (long)htonl((u_long)(v)))
  423.43 ++#define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf))
  423.44 ++#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v)))
  423.45 + #define IXDR_GET_U_LONG(buf)	      ((u_long)IXDR_GET_LONG(buf))
  423.46 + #define IXDR_PUT_U_LONG(buf, v)	      IXDR_PUT_LONG(buf, (long)(v))
  423.47 + 
   424.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   424.2 +++ b/patches/glibc/2.2.5/glibc-drow-sh.patch	Sat Feb 24 11:00:05 2007 +0000
   424.3 @@ -0,0 +1,77 @@
   424.4 +[pread changes deleted, since those seem to be specific to glibc-2.3.2]
   424.5 +
   424.6 +Date: Thu, 19 Jun 2003 20:02:07 -0400
   424.7 +From: Daniel Jacobowitz <drow@false.org>
   424.8 +Subject: [linux-sh:02808] Patch needed for CVS glibc on SH
   424.9 +To: linux-sh@m17n.org, libc-alpha@sources.redhat.com
  424.10 +Message-Id: <20030620000207.GA19907@nevyn.them.org>
  424.11 +X-ML-Name: linux-sh
  424.12 +X-Mail-Count: 02808
  424.13 +X-MLServer: fml [fml 4.0.1]; post only (only members can post)
  424.14 +X-ML-Info: If you have a question, send e-mail with the body
  424.15 +	"help" (without quotes) to the address linux-sh-ctl@m17n.org;
  424.16 +	help=<mailto:linux-sh-ctl@m17n.org?body=help>
  424.17 +Mail-Followup-To: linux-sh@m17n.org, libc-alpha@sources.redhat.com
  424.18 +Content-Disposition: inline
  424.19 +User-Agent: Mutt/1.5.1i
  424.20 +Mime-Version: 1.0
  424.21 +Content-Type: text/plain; charset=us-ascii
  424.22 +Precedence: bulk
  424.23 +Lines: 74
  424.24 +List-Software: fml [fml 4.0.1]
  424.25 +List-Post: <mailto:linux-sh@m17n.org>
  424.26 +List-Owner: <mailto:linux-sh-admin@m17n.org>
  424.27 +List-Help: <mailto:linux-sh-ctl@m17n.org?body=help>
  424.28 +List-Unsubscribe: <mailto:linux-sh-ctl@m17n.org?body=unsubscribe>
  424.29 +List-Id: linux-sh.m17n.org
  424.30 +
  424.31 +I believe this flushes my current patches to make glibc work on SH.  Issues:
  424.32 + - MIPS pread functions have some wackiness in them for the MIPS calling
  424.33 +   conventions, which align long longs to even register pairs; it appears
  424.34 +   that SH does not do this.  This fixes pread64/pwrite64.
  424.35 + - st_ino is _NOT_ 64-bit in the latest SH kernel trees, or at least it
  424.36 +   wasn't when I checked in April.  --enable-kernel=2.4.x breaks terribly
  424.37 +   without this patch; the errors are along the lines of "version GLIBC_2.3
  424.38 +   not found", because that's the first consequence of a messed up inode
  424.39 +   field - ld.so compares by inodes at some point.
  424.40 +
  424.41 +-- 
  424.42 +Daniel Jacobowitz
  424.43 +MontaVista Software                         Debian GNU/Linux Developer
  424.44 +
  424.45 +2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
  424.46 +
  424.47 +	* sysdeps/unix/sysv/linux/kernel-features.h: Update kernel features
  424.48 +	for the SH architecture.
  424.49 +	* sysdeps/unix/sysv/linux/sh/pread.c: Use generic Linux version
  424.50 +	instead of the MIPS version.
  424.51 +	* sysdeps/unix/sysv/linux/sh/pread64.c: Likewise.
  424.52 +	* sysdeps/unix/sysv/linux/sh/pwrite.c: Likewise.
  424.53 +	* sysdeps/unix/sysv/linux/sh/pwrite64.c: Likewise.
  424.54 +
  424.55 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/kernel-features.h.org	2003-04-21 10:57:55.000000000 -0400
  424.56 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/kernel-features.h	2003-04-21 11:16:47.000000000 -0400
  424.57 +@@ -151,11 +151,20 @@
  424.58 + 
  424.59 + /* The changed st_ino field appeared in 2.4.0-test6.  But we cannot
  424.60 +    distinguish this version from other 2.4.0 releases.  Therefore play
  424.61 +-   save and assume it available is for 2.4.1 and up.  */
  424.62 +-#if __LINUX_KERNEL_VERSION >= 132097
  424.63 ++   save and assume it available is for 2.4.1 and up.  However, SH is lame,
  424.64 ++   and still does not have a 64-bit inode field.  */
  424.65 ++#if __LINUX_KERNEL_VERSION >= 132097 \
  424.66 ++    && !defined __sh__
  424.67 + # define __ASSUME_ST_INO_64_BIT		1
  424.68 + #endif
  424.69 + 
  424.70 ++/* SH kernels got stat64, mmap2, and truncate64 during 2.4.0-test.  */
  424.71 ++#if __LINUX_KERNEL_VERSION >= 132096 && defined __sh__
  424.72 ++# define __ASSUME_TRUNCATE64_SYSCALL	1
  424.73 ++# define __ASSUME_MMAP2_SYSCALL		1
  424.74 ++# define __ASSUME_STAT64_SYSCALL	1
  424.75 ++#endif
  424.76 ++
  424.77 + /* To support locking of large files a new fcntl() syscall was introduced
  424.78 +    in 2.4.0-test7.  We test for 2.4.1 for the earliest version we know
  424.79 +    the syscall is available.  */
  424.80 +
   425.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   425.2 +++ b/patches/glibc/2.2.5/glibc-test-lowram.patch	Sat Feb 24 11:00:05 2007 +0000
   425.3 @@ -0,0 +1,14 @@
   425.4 +--- glibc-2.2.5/malloc/tst-calloc.c.old	Sun Aug  3 16:17:58 2003
   425.5 ++++ glibc-2.2.5/malloc/tst-calloc.c	Sun Aug  3 16:20:01 2003
   425.6 +@@ -24,9 +24,8 @@
   425.7 + #include <stdio.h>
   425.8 + 
   425.9 + 
  425.10 +-/* Number of samples per size.  */
  425.11 +-#define N 50000
  425.12 +-
  425.13 ++/* Number of samples per size.  This is also the maximum memory consumption in kilobytes. */
  425.14 ++#define N 8000
  425.15 + 
  425.16 + static void
  425.17 + fixed_test (int size)
   426.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   426.2 +++ b/patches/glibc/2.2.5/initfini-alpha.patch	Sat Feb 24 11:00:05 2007 +0000
   426.3 @@ -0,0 +1,125 @@
   426.4 +Trivial fix to allow compiling with gcc3.3.
   426.5 +
   426.6 +--- glibc-2.2.5/sysdeps/alpha/elf/initfini.c.old	Fri Jun  6 17:59:45 2003
   426.7 ++++ glibc-2.2.5/sysdeps/alpha/elf/initfini.c	Fri Jun  6 18:00:20 2003
   426.8 +@@ -37,62 +37,62 @@
   426.9 +    files, all of which may have different GP values.  So we must reload
  426.10 +    the GP value from crti.o in crtn.o.  */
  426.11 + 
  426.12 +-__asm__ ("
  426.13 +-
  426.14 +-#include \"defs.h\"
  426.15 +-
  426.16 +-/*@HEADER_ENDS*/
  426.17 +-
  426.18 +-/*@_init_PROLOG_BEGINS*/
  426.19 +-	.section .init, \"ax\", @progbits
  426.20 +-	.globl	_init
  426.21 +-	.ent	_init
  426.22 +-_init:
  426.23 +-	ldgp	$29, 0($27)
  426.24 +-	subq	$30, 16, $30
  426.25 +-	lda	$27, __gmon_start__
  426.26 +-	stq	$26, 0($30)
  426.27 +-	stq	$29, 8($30)
  426.28 +-	.prologue 1
  426.29 +-	beq	$27, 1f
  426.30 +-	jsr	$26, ($27), __gmon_start__
  426.31 +-	ldq	$29, 8($30)
  426.32 +-1:
  426.33 +-	.align 3
  426.34 +-	.end	_init
  426.35 +-	.size	_init, 0
  426.36 +-/*@_init_PROLOG_ENDS*/
  426.37 +-
  426.38 +-/*@_init_EPILOG_BEGINS*/
  426.39 +-	.section .init, \"ax\", @progbits
  426.40 +-	ldq	$26, 0($30)
  426.41 +-	ldq	$29, 8($30)
  426.42 +-	addq	$30, 16, $30
  426.43 +-	ret
  426.44 +-/*@_init_EPILOG_ENDS*/
  426.45 +-
  426.46 +-/*@_fini_PROLOG_BEGINS*/
  426.47 +-	.section .fini, \"ax\", @progbits
  426.48 +-	.globl	_fini
  426.49 +-	.ent	_fini
  426.50 +-_fini:
  426.51 +-	ldgp	$29, 0($27)
  426.52 +-	subq	$30, 16, $30
  426.53 +-	stq	$26, 0($30)
  426.54 +-	stq	$29, 8($30)
  426.55 +-	.prologue 1
  426.56 +-	.align 3
  426.57 +-	.end	_fini
  426.58 +-	.size	_fini, 0
  426.59 +-/*@_fini_PROLOG_ENDS*/
  426.60 +-
  426.61 +-/*@_fini_EPILOG_BEGINS*/
  426.62 +-	.section .fini, \"ax\", @progbits
  426.63 +-	ldq	$26, 0($30)
  426.64 +-	ldq	$29, 8($30)
  426.65 +-	addq	$30, 16, $30
  426.66 +-	ret
  426.67 +-/*@_fini_EPILOG_ENDS*/
  426.68 +-
  426.69 +-/*@TRAILER_BEGINS*/
  426.70 ++__asm__ ("\n\
  426.71 ++\n\
  426.72 ++#include \"defs.h\"\n\
  426.73 ++\n\
  426.74 ++/*@HEADER_ENDS*/\n\
  426.75 ++\n\
  426.76 ++/*@_init_PROLOG_BEGINS*/\n\
  426.77 ++	.section .init, \"ax\", @progbits\n\
  426.78 ++	.globl	_init\n\
  426.79 ++	.ent	_init\n\
  426.80 ++_init:\n\
  426.81 ++	ldgp	$29, 0($27)\n\
  426.82 ++	subq	$30, 16, $30\n\
  426.83 ++	lda	$27, __gmon_start__\n\
  426.84 ++	stq	$26, 0($30)\n\
  426.85 ++	stq	$29, 8($30)\n\
  426.86 ++	.prologue 1\n\
  426.87 ++	beq	$27, 1f\n\
  426.88 ++	jsr	$26, ($27), __gmon_start__\n\
  426.89 ++	ldq	$29, 8($30)\n\
  426.90 ++1:\n\
  426.91 ++	.align 3\n\
  426.92 ++	.end	_init\n\
  426.93 ++	.size	_init, 0\n\
  426.94 ++/*@_init_PROLOG_ENDS*/\n\
  426.95 ++\n\
  426.96 ++/*@_init_EPILOG_BEGINS*/\n\
  426.97 ++	.section .init, \"ax\", @progbits\n\
  426.98 ++	ldq	$26, 0($30)\n\
  426.99 ++	ldq	$29, 8($30)\n\
 426.100 ++	addq	$30, 16, $30\n\
 426.101 ++	ret\n\
 426.102 ++/*@_init_EPILOG_ENDS*/\n\
 426.103 ++\n\
 426.104 ++/*@_fini_PROLOG_BEGINS*/\n\
 426.105 ++	.section .fini, \"ax\", @progbits\n\
 426.106 ++	.globl	_fini\n\
 426.107 ++	.ent	_fini\n\
 426.108 ++_fini:\n\
 426.109 ++	ldgp	$29, 0($27)\n\
 426.110 ++	subq	$30, 16, $30\n\
 426.111 ++	stq	$26, 0($30)\n\
 426.112 ++	stq	$29, 8($30)\n\
 426.113 ++	.prologue 1\n\
 426.114 ++	.align 3\n\
 426.115 ++	.end	_fini\n\
 426.116 ++	.size	_fini, 0\n\
 426.117 ++/*@_fini_PROLOG_ENDS*/\n\
 426.118 ++\n\
 426.119 ++/*@_fini_EPILOG_BEGINS*/\n\
 426.120 ++	.section .fini, \"ax\", @progbits\n\
 426.121 ++	ldq	$26, 0($30)\n\
 426.122 ++	ldq	$29, 8($30)\n\
 426.123 ++	addq	$30, 16, $30\n\
 426.124 ++	ret\n\
 426.125 ++/*@_fini_EPILOG_ENDS*/\n\
 426.126 ++\n\
 426.127 ++/*@TRAILER_BEGINS*/\n\
 426.128 + ");
   427.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   427.2 +++ b/patches/glibc/2.2.5/initfini-ia64.patch	Sat Feb 24 11:00:05 2007 +0000
   427.3 @@ -0,0 +1,219 @@
   427.4 +Retrieved with
   427.5 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/ia64/elf/initfini.c.diff?r1=1.2&r2=1.3&cvsroot=glibc'
   427.6 +
   427.7 +Revision 1.3, Sun Aug 25 00:34:23 2002 UTC (2 years, 1 month ago) by drepper
   427.8 +Branch: MAIN
   427.9 +CVS Tags: glibc-2-3-1, glibc-2-3
  427.10 +Changes since 1.2: +78 -78 lines
  427.11 +
  427.12 +(__asm__): Don't use newlines embedded in string.
  427.13 +
  427.14 +Fixes error
  427.15 +
  427.16 +../sysdeps/ia64/elf/initfini.c:30:10: missing terminating " character
  427.17 +../sysdeps/ia64/elf/initfini.c:32:10: #include expects "FILENAME" or <FILENAME>
  427.18 +../sysdeps/ia64/elf/initfini.c:37: error: request for member `section' in something not a structure or union
  427.19 +../sysdeps/ia64/elf/initfini.c:38: error: parse error before numeric constant
  427.20 +../sysdeps/ia64/elf/initfini.c:39: error: syntax error at '#' token
  427.21 +../sysdeps/ia64/elf/initfini.c:40: error: syntax error at '#' token
  427.22 +../sysdeps/ia64/elf/initfini.c:46: error: syntax error at '@' token
  427.23 +../sysdeps/ia64/elf/initfini.c:46: error: syntax error at '#' token
  427.24 +../sysdeps/ia64/elf/initfini.c:48: error: parse error before "r15"
  427.25 +../sysdeps/ia64/elf/initfini.c:48: warning: type defaults to `int' in declaration of `r15'
  427.26 +../sysdeps/ia64/elf/initfini.c:50: error: parse error before '.' token
  427.27 +../sysdeps/ia64/elf/initfini.c:56: error: syntax error at '#' token
  427.28 +../sysdeps/ia64/elf/initfini.c:57: error: parse error before "r12"
  427.29 +../sysdeps/ia64/elf/initfini.c:57: warning: type defaults to `int' in declaration of `r12'
  427.30 +../sysdeps/ia64/elf/initfini.c:58: warning: type defaults to `int' in declaration of `r12'
  427.31 +../sysdeps/ia64/elf/initfini.c:58: warning: data definition has no type or storage class
  427.32 +../sysdeps/ia64/elf/initfini.c:59: error: parse error before "gp"
  427.33 +../sysdeps/ia64/elf/initfini.c:59: warning: type defaults to `int' in declaration of `gp'
  427.34 +../sysdeps/ia64/elf/initfini.c:63: error: syntax error at '#' token
  427.35 +../sysdeps/ia64/elf/initfini.c:74: error: syntax error at '#' token
  427.36 +../sysdeps/ia64/elf/initfini.c:80: error: syntax error at '#' token
  427.37 +../sysdeps/ia64/elf/initfini.c:81: error: syntax error at '#' token
  427.38 +../sysdeps/ia64/elf/initfini.c:89: error: syntax error at '#' token
  427.39 +../sysdeps/ia64/elf/initfini.c:92: error: syntax error at '#' token
  427.40 +../sysdeps/ia64/elf/initfini.c:96: error: parse error before '.' token
  427.41 +../sysdeps/ia64/elf/initfini.c:101: error: syntax error at '#' token
  427.42 +../sysdeps/ia64/elf/initfini.c:106: error: syntax error at '#' token
  427.43 +../sysdeps/ia64/elf/initfini.c:107:1: missing terminating " character
  427.44 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc37/build/ia64-unknown-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/csu/initfini.s] Error 1
  427.45 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/ia64-unknown-linux-gnu/gcc-3.3.4-glibc-2.2.5/glibc-2.2.5/csu'
  427.46 +make[1]: *** [csu/subdir_lib] Error 2
  427.47 +make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/ia64-unknown-linux-gnu/gcc-3.3.4-glibc-2.2.5/glibc-2.2.5'
  427.48 +make: *** [all] Error 2
  427.49 +
  427.50 +===================================================================
  427.51 +RCS file: /cvs/glibc/libc/sysdeps/ia64/elf/initfini.c,v
  427.52 +retrieving revision 1.2
  427.53 +retrieving revision 1.3
  427.54 +diff -u -r1.2 -r1.3
  427.55 +--- libc/sysdeps/ia64/elf/initfini.c	2001/07/06 04:55:54	1.2
  427.56 ++++ libc/sysdeps/ia64/elf/initfini.c	2002/08/25 00:34:23	1.3
  427.57 +@@ -1,5 +1,5 @@
  427.58 + /* Special .init and .fini section support for ia64.
  427.59 +-   Copyright (C) 2000 Free Software Foundation, Inc.
  427.60 ++   Copyright (C) 2000, 2002 Free Software Foundation, Inc.
  427.61 +    This file is part of the GNU C Library.
  427.62 + 
  427.63 +    The GNU C Library is free software; you can redistribute it and/or
  427.64 +@@ -27,81 +27,81 @@
  427.65 +    * crtn.s puts the corresponding function epilogues
  427.66 +    in the .init and .fini sections. */
  427.67 + 
  427.68 +-__asm__ ("
  427.69 +-
  427.70 +-#include \"defs.h\"
  427.71 +-
  427.72 +-/*@HEADER_ENDS*/
  427.73 +-
  427.74 +-/*@_init_PROLOG_BEGINS*/
  427.75 +-	.section .init
  427.76 +-	.align 16
  427.77 +-	.global _init#
  427.78 +-	.proc _init#
  427.79 +-_init:
  427.80 +-	alloc r34 = ar.pfs, 0, 3, 0, 0
  427.81 +-	mov r32 = r12
  427.82 +-	mov r33 = b0
  427.83 +-	adds r12 = -16, r12
  427.84 +-	addl r14 = @ltoff(@fptr(__gmon_start__#)), gp
  427.85 +-	;;
  427.86 +-	ld8 r15 = [r14]
  427.87 +-	;;
  427.88 +-	cmp.eq p6, p7 = 0, r15
  427.89 +-	(p6) br.cond.dptk .L5
  427.90 +-
  427.91 +-/* we could use r35 to save gp, but we use the stack since that's what
  427.92 +- * all the other init routines will do --davidm 00/04/05 */
  427.93 +-	st8 [r12] = gp, -16
  427.94 +-	br.call.sptk.many b0 = __gmon_start__# ;;
  427.95 +-	adds r12 = 16, r12
  427.96 +-	;;
  427.97 +-	ld8 gp = [r12]
  427.98 +-	;;
  427.99 +-.L5:
 427.100 +-	.align 16
 427.101 +-	.endp _init#
 427.102 +-
 427.103 +-/*@_init_PROLOG_ENDS*/
 427.104 +-
 427.105 +-/*@_init_EPILOG_BEGINS*/
 427.106 +-	.section .init
 427.107 +-	.regstk 0,2,0,0
 427.108 +-	mov r12 = r32
 427.109 +-	mov ar.pfs = r34
 427.110 +-	mov b0 = r33
 427.111 +-	br.ret.sptk.many b0
 427.112 +-	.endp _init#
 427.113 +-/*@_init_EPILOG_ENDS*/
 427.114 +-
 427.115 +-/*@_fini_PROLOG_BEGINS*/
 427.116 +-	.section .fini
 427.117 +-	.align 16
 427.118 +-	.global _fini#
 427.119 +-	.proc _fini#
 427.120 +-_fini:
 427.121 +-	alloc r34 = ar.pfs, 0, 3, 0, 0
 427.122 +-	mov r32 = r12
 427.123 +-	mov r33 = b0
 427.124 +-	adds r12 = -16, r12
 427.125 +-	;;
 427.126 +-	.align 16
 427.127 +-	.endp _fini#
 427.128 +-
 427.129 +-/*@_fini_PROLOG_ENDS*/
 427.130 +-	br.call.sptk.many b0 = i_am_not_a_leaf# ;;
 427.131 +-	;;
 427.132 +-
 427.133 +-/*@_fini_EPILOG_BEGINS*/
 427.134 +-	.section .fini
 427.135 +-	mov r12 = r32
 427.136 +-	mov ar.pfs = r34
 427.137 +-	mov b0 = r33
 427.138 +-	br.ret.sptk.many b0
 427.139 +-	.endp _fini#
 427.140 +-
 427.141 +-/*@_fini_EPILOG_ENDS*/
 427.142 +-
 427.143 +-/*@TRAILER_BEGINS*/
 427.144 +-	.weak	__gmon_start__#
 427.145 ++__asm__ ("\n\
 427.146 ++\n\
 427.147 ++#include \"defs.h\"\n\
 427.148 ++\n\
 427.149 ++/*@HEADER_ENDS*/\n\
 427.150 ++\n\
 427.151 ++/*@_init_PROLOG_BEGINS*/\n\
 427.152 ++	.section .init\n\
 427.153 ++	.align 16\n\
 427.154 ++	.global _init#\n\
 427.155 ++	.proc _init#\n\
 427.156 ++_init:\n\
 427.157 ++	alloc r34 = ar.pfs, 0, 3, 0, 0\n\
 427.158 ++	mov r32 = r12\n\
 427.159 ++	mov r33 = b0\n\
 427.160 ++	adds r12 = -16, r12\n\
 427.161 ++	addl r14 = @ltoff(@fptr(__gmon_start__#)), gp\n\
 427.162 ++	;;\n\
 427.163 ++	ld8 r15 = [r14]\n\
 427.164 ++	;;\n\
 427.165 ++	cmp.eq p6, p7 = 0, r15\n\
 427.166 ++	(p6) br.cond.dptk .L5\n\
 427.167 ++\n\
 427.168 ++/* we could use r35 to save gp, but we use the stack since that's what\n\
 427.169 ++ * all the other init routines will do --davidm 00/04/05 */\n\
 427.170 ++	st8 [r12] = gp, -16\n\
 427.171 ++	br.call.sptk.many b0 = __gmon_start__# ;;\n\
 427.172 ++	adds r12 = 16, r12\n\
 427.173 ++	;;\n\
 427.174 ++	ld8 gp = [r12]\n\
 427.175 ++	;;\n\
 427.176 ++.L5:\n\
 427.177 ++	.align 16\n\
 427.178 ++	.endp _init#\n\
 427.179 ++\n\
 427.180 ++/*@_init_PROLOG_ENDS*/\n\
 427.181 ++\n\
 427.182 ++/*@_init_EPILOG_BEGINS*/\n\
 427.183 ++	.section .init\n\
 427.184 ++	.regstk 0,2,0,0\n\
 427.185 ++	mov r12 = r32\n\
 427.186 ++	mov ar.pfs = r34\n\
 427.187 ++	mov b0 = r33\n\
 427.188 ++	br.ret.sptk.many b0\n\
 427.189 ++	.endp _init#\n\
 427.190 ++/*@_init_EPILOG_ENDS*/\n\
 427.191 ++\n\
 427.192 ++/*@_fini_PROLOG_BEGINS*/\n\
 427.193 ++	.section .fini\n\
 427.194 ++	.align 16\n\
 427.195 ++	.global _fini#\n\
 427.196 ++	.proc _fini#\n\
 427.197 ++_fini:\n\
 427.198 ++	alloc r34 = ar.pfs, 0, 3, 0, 0\n\
 427.199 ++	mov r32 = r12\n\
 427.200 ++	mov r33 = b0\n\
 427.201 ++	adds r12 = -16, r12\n\
 427.202 ++	;;\n\
 427.203 ++	.align 16\n\
 427.204 ++	.endp _fini#\n\
 427.205 ++\n\
 427.206 ++/*@_fini_PROLOG_ENDS*/\n\
 427.207 ++	br.call.sptk.many b0 = i_am_not_a_leaf# ;;\n\
 427.208 ++	;;\n\
 427.209 ++\n\
 427.210 ++/*@_fini_EPILOG_BEGINS*/\n\
 427.211 ++	.section .fini\n\
 427.212 ++	mov r12 = r32\n\
 427.213 ++	mov ar.pfs = r34\n\
 427.214 ++	mov b0 = r33\n\
 427.215 ++	br.ret.sptk.many b0\n\
 427.216 ++	.endp _fini#\n\
 427.217 ++\n\
 427.218 ++/*@_fini_EPILOG_ENDS*/\n\
 427.219 ++\n\
 427.220 ++/*@TRAILER_BEGINS*/\n\
 427.221 ++	.weak	__gmon_start__#\n\
 427.222 + ");
   428.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   428.2 +++ b/patches/glibc/2.2.5/initfini-sh.patch	Sat Feb 24 11:00:05 2007 +0000
   428.3 @@ -0,0 +1,243 @@
   428.4 +--- glibc-2.2.5/sysdeps/sh/elf/initfini.c.orig	Thu Jul  5 21:56:03 2001
   428.5 ++++ glibc-2.2.5/sysdeps/sh/elf/initfini.c	Wed May 28 08:45:08 2003
   428.6 +@@ -27,122 +27,122 @@
   428.7 +    * crtn.s puts the corresponding function epilogues
   428.8 +    in the .init and .fini sections. */
   428.9 + 
  428.10 +-__asm__ ("
  428.11 +-
  428.12 +-#include \"defs.h\"
  428.13 +-#define SHARED
  428.14 +-
  428.15 +-/*@HEADER_ENDS*/
  428.16 +-
  428.17 +-/*@TESTS_BEGIN*/
  428.18 +-
  428.19 +-/*@TESTS_END*/
  428.20 +-
  428.21 +-/*@_init_PROLOG_BEGINS*/
  428.22 +-	.section .init
  428.23 +-	.align 5
  428.24 +-	.global	_init
  428.25 +-	.type	_init,@function
  428.26 +-_init:
  428.27 +-	mov.l	r12,@-r15
  428.28 +-	mov.l	r14,@-r15
  428.29 +-	sts.l	pr,@-r15
  428.30 +-#ifdef SHARED
  428.31 +-	mova	.L22,r0
  428.32 +-	mov.l	.L22,r12
  428.33 +-	add	r0,r12
  428.34 +-	mova	.L23,r0
  428.35 +-	mov.l	.L23,r1
  428.36 +-	add	r0,r1
  428.37 +-#else
  428.38 +-	mov.l	.L23,r1
  428.39 +-#endif
  428.40 +-	jsr	@r1
  428.41 +-	 mov	r15,r14
  428.42 +-	bra	1f
  428.43 +-	 nop
  428.44 +-	.align 2
  428.45 +-#ifdef SHARED
  428.46 +-.L22:
  428.47 +-	.long	_GLOBAL_OFFSET_TABLE_
  428.48 +-.L23:
  428.49 +-	.long	__gmon_start__@PLT
  428.50 +-#else
  428.51 +-.L23:
  428.52 +-	.long	__gmon_start__
  428.53 +-#endif
  428.54 +-	.data
  428.55 +-	.global __fpscr_values
  428.56 +-__fpscr_values:
  428.57 +-	.long   0
  428.58 +-	.long   0x80000
  428.59 +-	.previous
  428.60 +-1:
  428.61 +-	ALIGN
  428.62 +-	END_INIT
  428.63 +-
  428.64 +-	
  428.65 +-/*@_init_PROLOG_ENDS*/
  428.66 +-
  428.67 +-/*@_init_EPILOG_BEGINS*/
  428.68 +-	.section .init
  428.69 +-	mov	r14,r15
  428.70 +-	lds.l	@r15+,pr
  428.71 +-	mov.l	@r15+,r14
  428.72 +-	rts	
  428.73 +-	mov.l	@r15+,r12
  428.74 +-	END_INIT
  428.75 +-	.section .text
  428.76 +-	.align 5
  428.77 +-	.weak	__gmon_start__
  428.78 +-	.type	__gmon_start__,@function
  428.79 +-__gmon_start__:
  428.80 +-	mov.l	r14,@-r15
  428.81 +-	mov	r15,r14
  428.82 +-	mov	r14,r15
  428.83 +-	rts	
  428.84 +-	mov.l	@r15+,r14
  428.85 +-	
  428.86 +-/*@_init_EPILOG_ENDS*/
  428.87 +-
  428.88 +-/*@_fini_PROLOG_BEGINS*/
  428.89 +-	.section .fini
  428.90 +-	.align 5
  428.91 +-	.global	_fini
  428.92 +-	.type	_fini,@function
  428.93 +-_fini:
  428.94 +-	mov.l	r12,@-r15
  428.95 +-	mov.l	r14,@-r15
  428.96 +-	sts.l	pr,@-r15
  428.97 +-#ifdef SHARED
  428.98 +-	mova	.L27,r0
  428.99 +-	mov.l	.L27,r12
 428.100 +-	add	r0,r12
 428.101 +-#endif
 428.102 +-	mov	r15,r14
 428.103 +-	ALIGN
 428.104 +-	END_FINI
 428.105 +-#ifdef SHARED
 428.106 +-	bra	1f
 428.107 +-	 nop
 428.108 +-	.align	2
 428.109 +-.L27:
 428.110 +-	.long	_GLOBAL_OFFSET_TABLE_
 428.111 +-#endif
 428.112 +-1:
 428.113 +-/*@_fini_PROLOG_ENDS*/
 428.114 +-
 428.115 +-/*@_fini_EPILOG_BEGINS*/
 428.116 +-	.section .fini
 428.117 +-	mov	r14,r15
 428.118 +-	lds.l	@r15+,pr
 428.119 +-	mov.l	@r15+,r14
 428.120 +-	rts	
 428.121 +-	mov.l	@r15+,r12
 428.122 +-
 428.123 +-	END_FINI
 428.124 +-	
 428.125 +-/*@_fini_EPILOG_ENDS*/
 428.126 +-
 428.127 +-/*@TRAILER_BEGINS*/
 428.128 ++__asm__ ("\n\
 428.129 ++\n\
 428.130 ++#include \"defs.h\"\n\
 428.131 ++#define SHARED\n\
 428.132 ++\n\
 428.133 ++/*@HEADER_ENDS*/\n\
 428.134 ++\n\
 428.135 ++/*@TESTS_BEGIN*/\n\
 428.136 ++\n\
 428.137 ++/*@TESTS_END*/\n\
 428.138 ++\n\
 428.139 ++/*@_init_PROLOG_BEGINS*/\n\
 428.140 ++	.section .init\n\
 428.141 ++	.align 5\n\
 428.142 ++	.global	_init\n\
 428.143 ++	.type	_init,@function\n\
 428.144 ++_init:\n\
 428.145 ++	mov.l	r12,@-r15\n\
 428.146 ++	mov.l	r14,@-r15\n\
 428.147 ++	sts.l	pr,@-r15\n\
 428.148 ++#ifdef SHARED\n\
 428.149 ++	mova	.L22,r0\n\
 428.150 ++	mov.l	.L22,r12\n\
 428.151 ++	add	r0,r12\n\
 428.152 ++	mova	.L23,r0\n\
 428.153 ++	mov.l	.L23,r1\n\
 428.154 ++	add	r0,r1\n\
 428.155 ++#else\n\
 428.156 ++	mov.l	.L23,r1\n\
 428.157 ++#endif\n\
 428.158 ++	jsr	@r1\n\
 428.159 ++	 mov	r15,r14\n\
 428.160 ++	bra	1f\n\
 428.161 ++	 nop\n\
 428.162 ++	.align 2\n\
 428.163 ++#ifdef SHARED\n\
 428.164 ++.L22:\n\
 428.165 ++	.long	_GLOBAL_OFFSET_TABLE_\n\
 428.166 ++.L23:\n\
 428.167 ++	.long	__gmon_start__@PLT\n\
 428.168 ++#else\n\
 428.169 ++.L23:\n\
 428.170 ++	.long	__gmon_start__\n\
 428.171 ++#endif\n\
 428.172 ++	.data\n\
 428.173 ++	.global __fpscr_values\n\
 428.174 ++__fpscr_values:\n\
 428.175 ++	.long   0\n\
 428.176 ++	.long   0x80000\n\
 428.177 ++	.previous\n\
 428.178 ++1:\n\
 428.179 ++	ALIGN\n\
 428.180 ++	END_INIT\n\
 428.181 ++\n\
 428.182 ++	\n\
 428.183 ++/*@_init_PROLOG_ENDS*/\n\
 428.184 ++\n\
 428.185 ++/*@_init_EPILOG_BEGINS*/\n\
 428.186 ++	.section .init\n\
 428.187 ++	mov	r14,r15\n\
 428.188 ++	lds.l	@r15+,pr\n\
 428.189 ++	mov.l	@r15+,r14\n\
 428.190 ++	rts	\n\
 428.191 ++	mov.l	@r15+,r12\n\
 428.192 ++	END_INIT\n\
 428.193 ++	.section .text\n\
 428.194 ++	.align 5\n\
 428.195 ++	.weak	__gmon_start__\n\
 428.196 ++	.type	__gmon_start__,@function\n\
 428.197 ++__gmon_start__:\n\
 428.198 ++	mov.l	r14,@-r15\n\
 428.199 ++	mov	r15,r14\n\
 428.200 ++	mov	r14,r15\n\
 428.201 ++	rts	\n\
 428.202 ++	mov.l	@r15+,r14\n\
 428.203 ++	\n\
 428.204 ++/*@_init_EPILOG_ENDS*/\n\
 428.205 ++\n\
 428.206 ++/*@_fini_PROLOG_BEGINS*/\n\
 428.207 ++	.section .fini\n\
 428.208 ++	.align 5\n\
 428.209 ++	.global	_fini\n\
 428.210 ++	.type	_fini,@function\n\
 428.211 ++_fini:\n\
 428.212 ++	mov.l	r12,@-r15\n\
 428.213 ++	mov.l	r14,@-r15\n\
 428.214 ++	sts.l	pr,@-r15\n\
 428.215 ++#ifdef SHARED\n\
 428.216 ++	mova	.L27,r0\n\
 428.217 ++	mov.l	.L27,r12\n\
 428.218 ++	add	r0,r12\n\
 428.219 ++#endif\n\
 428.220 ++	mov	r15,r14\n\
 428.221 ++	ALIGN\n\
 428.222 ++	END_FINI\n\
 428.223 ++#ifdef SHARED\n\
 428.224 ++	bra	1f\n\
 428.225 ++	 nop\n\
 428.226 ++	.align	2\n\
 428.227 ++.L27:\n\
 428.228 ++	.long	_GLOBAL_OFFSET_TABLE_\n\
 428.229 ++#endif\n\
 428.230 ++1:\n\
 428.231 ++/*@_fini_PROLOG_ENDS*/\n\
 428.232 ++\n\
 428.233 ++/*@_fini_EPILOG_BEGINS*/\n\
 428.234 ++	.section .fini\n\
 428.235 ++	mov	r14,r15\n\
 428.236 ++	lds.l	@r15+,pr\n\
 428.237 ++	mov.l	@r15+,r14\n\
 428.238 ++	rts	\n\
 428.239 ++	mov.l	@r15+,r12\n\
 428.240 ++\n\
 428.241 ++	END_FINI\n\
 428.242 ++	\n\
 428.243 ++/*@_fini_EPILOG_ENDS*/\n\
 428.244 ++\n\
 428.245 ++/*@TRAILER_BEGINS*/\n\
 428.246 + ");
   429.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   429.2 +++ b/patches/glibc/2.2.5/longjmp-sparc.patch	Sat Feb 24 11:00:05 2007 +0000
   429.3 @@ -0,0 +1,75 @@
   429.4 +From libc-alpha-return-8354-listarch-libc-alpha=sourceware dot cygnus dot com at sources dot redhat dot com Mon Jul 01 11:18:29 2002
   429.5 +Return-Path: <libc-alpha-return-8354-listarch-libc-alpha=sourceware dot cygnus dot com at sources dot redhat dot com>
   429.6 +Delivered-To: listarch-libc-alpha at sourceware dot cygnus dot com
   429.7 +Received: (qmail 10698 invoked by alias); 1 Jul 2002 11:18:28 -0000
   429.8 +Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
   429.9 +Precedence: bulk
  429.10 +List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
  429.11 +List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
  429.12 +List-Post: <mailto:libc-alpha at sources dot redhat dot com>
  429.13 +List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
  429.14 +Sender: libc-alpha-owner at sources dot redhat dot com
  429.15 +Delivered-To: mailing list libc-alpha at sources dot redhat dot com
  429.16 +Received: (qmail 10659 invoked from network); 1 Jul 2002 11:18:27 -0000
  429.17 +Received: from unknown (HELO sceaux.ilog.fr) (193.55.64.10)
  429.18 +  by sources dot redhat dot com with SMTP; 1 Jul 2002 11:18:27 -0000
  429.19 +Received: from ftp.ilog.fr (ftp.ilog.fr [193.55.64.11])
  429.20 +	by sceaux dot ilog dot fr (8 dot 11 dot 6/8 dot 11 dot 6) with SMTP id g61BFDi08003
  429.21 +	for <libc-alpha at sources dot redhat dot com>; Mon, 1 Jul 2002 13:15:18 +0200 (MET DST)
  429.22 +Received: from laposte.ilog.fr ([193.55.64.67])
  429.23 + by ftp dot ilog dot fr (NAVGW 2 dot 5 dot 1 dot 16) with SMTP id M2002070113180506608
  429.24 + for <libc-alpha at sources dot redhat dot com>; Mon, 01 Jul 2002 13:18:05 +0200
  429.25 +Received: from honolulu.ilog.fr ([172.17.4.43])
  429.26 +	by laposte dot ilog dot fr (8 dot 11 dot 6/8 dot 11 dot 5) with ESMTP id g61BI2w29996;
  429.27 +	Mon, 1 Jul 2002 13:18:02 +0200 (MET DST)
  429.28 +Received: (from haible@localhost)
  429.29 +	by honolulu dot ilog dot fr (8 dot 9 dot 3/8 dot 9 dot 3/SuSE Linux 8 dot 9 dot 3-0 dot 1) id NAA01763;
  429.30 +	Mon, 1 Jul 2002 13:12:40 +0200
  429.31 +MIME-Version: 1.0
  429.32 +Content-Type: text/plain; charset=us-ascii
  429.33 +Content-Transfer-Encoding: base64
  429.34 +Message-ID: <15648.14632.526690.249866@honolulu.ilog.fr>
  429.35 +Date: Mon, 1 Jul 2002 13:12:40 +0200 (CEST)
  429.36 +From: Bruno Haible <bruno at clisp dot org>
  429.37 +To: libc-alpha at sources dot redhat dot com
  429.38 +Subject: sparc32/sysdep.h and gcc-3.1
  429.39 +
  429.40 +Hi,
  429.41 +
  429.42 +When building glibc-2.2.5 for sparc with gcc-3.1 I get a build error
  429.43 +
  429.44 +sparc-linux-gcc ../sysdeps/sparc/sparc32/__longjmp.S -c  -I../include -I. -I/backup/cross-build/build-glibc-sparc/setjmp -I.. -I../libio  -I/backup/cross-build/build-glibc-sparc -I../sysdeps/sparc/sparc32/elf -I../linuxthreads/sysdeps/unix/sysv/linux/sparc -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/sparc/sparc32 -I../linuxthreads/sysdeps/sparc -I../sysdeps/unix/sysv/linux/sparc/sparc32 -I../sysdeps/unix/sysv/linux/sparc -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/sparc -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/sparc/sparc32/fpu -I../sysdeps/sparc/sparc32 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/sparc/sparc32/soft-fp -I../sysdeps/sparc/fpu -I../sysdeps/sparc -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic  -nostdinc -isystem /cross/sparc-linux-tools/lib/gcc-lib/sparc-linux/3.1/include -isystem /cross/sparc-linux/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h     -DASSEMBLER -D__ASSEMBLY__  -o /backup/cross-build/build-glibc-sparc/setjmp/__longjmp.o
  429.45 +../sysdeps/sparc/sparc32/__longjmp.S: Assembler messages:
  429.46 +../sysdeps/sparc/sparc32/__longjmp.S:41: Error: Illegal operands
  429.47 +../sysdeps/sparc/sparc32/__longjmp.S:43: Error: Illegal operands
  429.48 +../sysdeps/sparc/sparc32/__longjmp.S:48: Error: unknown pseudo-op: `.'
  429.49 +../sysdeps/sparc/sparc32/__longjmp.S:50: Error: Illegal operands
  429.50 +../sysdeps/sparc/sparc32/__longjmp.S:52: Error: Illegal operands
  429.51 +../sysdeps/sparc/sparc32/__longjmp.S:55: Error: unknown pseudo-op: `.'
  429.52 +../sysdeps/sparc/sparc32/__longjmp.S:72: Error: unknown pseudo-op: `.'
  429.53 +../sysdeps/sparc/sparc32/__longjmp.S:76: Error: unknown pseudo-op: `.'
  429.54 +make[2]: *** [/backup/cross-build/build-glibc-sparc/setjmp/__longjmp.o] Fehler 1
  429.55 +make[2]: Leaving directory `/packages2/glibc-2.2.5/setjmp'
  429.56 +
  429.57 +Apparently "cpp0 -lang-asm" now leaves spaces around ## in place, if the token
  429.58 +on the left or right of it is a lone dot (not a valid C identifier). Hard to
  429.59 +say that it's a bug in the gcc-3.1 cpp, because -lang-asm is a gcc extension.
  429.60 +The fix is just to remove the spaces.
  429.61 +
  429.62 +
  429.63 +2002-06-05  Bruno Haible  <bruno@clisp.org>
  429.64 +
  429.65 +	* sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h (LOC): Remove spaces.
  429.66 +
  429.67 +--- glibc-2.2.5/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h.bak	2001-07-06 06:56:21.000000000 +0200
  429.68 ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h	2002-06-05 23:14:40.000000000 +0200
  429.69 +@@ -48,7 +48,7 @@
  429.70 + #define END(name) \
  429.71 + 	.size name, . - name
  429.72 + 
  429.73 +-#define LOC(name)  . ## L ## name
  429.74 ++#define LOC(name)  .##L##name
  429.75 + 
  429.76 + #ifdef PIC
  429.77 + #define SYSCALL_ERROR_HANDLER					\
  429.78 +
   430.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   430.2 +++ b/patches/glibc/2.2.5/sh-setjmp-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   430.3 @@ -0,0 +1,29 @@
   430.4 +Fixes glibc 'make tests' failure running isomac
   430.5 +
   430.6 +make[2]: *** [/home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.15/build/sh4-unknown-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/build-glibc/stdlib/isomac.out] Error 2
   430.7 +
   430.8 +isomac.out contains:
   430.9 +...
  430.10 +setjmp.h
  430.11 +#define JB_SIZE (4 * 15)
  430.12 +
  430.13 +See http://sources.redhat.com/ml/libc-hacker/2002-11/msg00009.html
  430.14 +and http://www.schweikhardt.net/isomac.c.html
  430.15 +
  430.16 +===================================================================
  430.17 +RCS file: /cvs/glibc/libc/sysdeps/sh/bits/setjmp.h,v
  430.18 +retrieving revision 1.4
  430.19 +retrieving revision 1.5
  430.20 +diff -u -r1.4 -r1.5
  430.21 +--- libc/sysdeps/sh/bits/setjmp.h	2001/07/06 04:56:03	1.4
  430.22 ++++ libc/sysdeps/sh/bits/setjmp.h	2002/11/06 00:08:30	1.5
  430.23 +@@ -42,7 +42,9 @@
  430.24 +   } __jmp_buf[1];
  430.25 + #endif
  430.26 + 
  430.27 ++#if defined __USE_MISC || defined _ASM
  430.28 + #define JB_SIZE		(4 * 15)
  430.29 ++#endif
  430.30 + 
  430.31 + /* Test if longjmp to JMPBUF would unwind the frame
  430.32 +    containing a local variable at ADDRESS.  */
   431.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   431.2 +++ b/patches/glibc/2.2.5/sprintf-prototype.patch	Sat Feb 24 11:00:05 2007 +0000
   431.3 @@ -0,0 +1,13 @@
   431.4 +--- glibc-2.2.5/stdio-common/sprintf.c.old	Wed May 28 08:59:11 2003
   431.5 ++++ glibc-2.2.5/stdio-common/sprintf.c	Wed May 28 08:59:45 2003
   431.6 +@@ -27,9 +27,7 @@
   431.7 + /* Write formatted output into S, according to the format string FORMAT.  */
   431.8 + /* VARARGS2 */
   431.9 + int
  431.10 +-sprintf (s, format)
  431.11 +-     char *s;
  431.12 +-     const char *format;
  431.13 ++sprintf (char *s, const char *format, ...)
  431.14 + {
  431.15 +   va_list arg;
  431.16 +   int done;
   432.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   432.2 +++ b/patches/glibc/2.2.5/sscanf.patch	Sat Feb 24 11:00:05 2007 +0000
   432.3 @@ -0,0 +1,82 @@
   432.4 +[dank] Modified very slightly to apply to 2.2.5.
   432.5 +
   432.6 +2003-03-05  Roland McGrath  <roland@redhat.com>
   432.7 +
   432.8 +	* stdio-common/sscanf.c: Use prototype defn with ... syntax.
   432.9 +	* libio/swscanf.c: Likewise.
  432.10 +	* libio/swprintf.c: Likewise.
  432.11 +
  432.12 +===================================================================
  432.13 +RCS file: /cvs/glibc/libc/stdio-common/sscanf.c,v
  432.14 +retrieving revision 1.8
  432.15 +retrieving revision 1.9
  432.16 +diff -u -r1.8 -r1.9
  432.17 +--- libc/stdio-common/sscanf.c	2002/08/10 09:24:42	1.8
  432.18 ++++ libc/stdio-common/sscanf.c	2003/03/05 19:58:03	1.9
  432.19 +@@ -1,4 +1,4 @@
  432.20 +-/* Copyright (C) 1991, 1995, 1996, 1998 Free Software Foundation, Inc.
  432.21 ++/* Copyright (C) 1991,1995,1996,1998,2002,2003 Free Software Foundation, Inc.
  432.22 +    This file is part of the GNU C Library.
  432.23 + 
  432.24 +    The GNU C Library is free software; you can redistribute it and/or
  432.25 +@@ -27,9 +27,7 @@
  432.26 + /* Read formatted input from S, according to the format string FORMAT.  */
  432.27 + /* VARARGS2 */
  432.28 + int
  432.29 +-sscanf (s, format)
  432.30 +-     const char *s;
  432.31 +-     const char *format;
  432.32 ++sscanf (const char *s, const char *format, ...)
  432.33 + {
  432.34 +   va_list arg;
  432.35 +   int done;
  432.36 +===================================================================
  432.37 +RCS file: /cvs/glibc/libc/libio/swprintf.c,v
  432.38 +retrieving revision 1.3
  432.39 +retrieving revision 1.4
  432.40 +diff -u -r1.3 -r1.4
  432.41 +--- libc/libio/swprintf.c	2001/07/06 04:55:32	1.3
  432.42 ++++ libc/libio/swprintf.c	2003/03/05 19:58:03	1.4
  432.43 +@@ -1,4 +1,5 @@
  432.44 +-/* Copyright (C) 1991,1995,1997,1998,1999,2000 Free Software Foundation, Inc.
  432.45 ++/* Copyright (C) 1991,1995,1997,1998,1999,2000,2003
  432.46 ++	Free Software Foundation, Inc.
  432.47 +    This file is part of the GNU C Library.
  432.48 + 
  432.49 +    The GNU C Library is free software; you can redistribute it and/or
  432.50 +@@ -22,10 +23,7 @@
  432.51 + /* Write formatted output into S, according to the format string FORMAT.  */
  432.52 + /* VARARGS3 */
  432.53 + int
  432.54 +-swprintf (s, n, format)
  432.55 +-     wchar_t *s;
  432.56 +-     size_t n;
  432.57 +-     const wchar_t *format;
  432.58 ++swprintf (wchar_t *s, size_t n, const wchar_t *format, ...)
  432.59 + {
  432.60 +   va_list arg;
  432.61 +   int done;
  432.62 +===================================================================
  432.63 +RCS file: /cvs/glibc/libc/libio/swscanf.c,v
  432.64 +retrieving revision 1.2
  432.65 +retrieving revision 1.3
  432.66 +diff -u -r1.2 -r1.3
  432.67 +--- libc/libio/swscanf.c	2001/07/06 04:55:32	1.2
  432.68 ++++ libc/libio/swscanf.c	2003/03/05 19:58:03	1.3
  432.69 +@@ -1,4 +1,4 @@
  432.70 +-/* Copyright (C) 1991, 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
  432.71 ++/* Copyright (C) 1991,1995,1996,1998,1999,2003 Free Software Foundation, Inc.
  432.72 +    This file is part of the GNU C Library.
  432.73 + 
  432.74 +    The GNU C Library is free software; you can redistribute it and/or
  432.75 +@@ -22,9 +22,7 @@
  432.76 + /* Read formatted input from S, according to the format string FORMAT.  */
  432.77 + /* VARARGS2 */
  432.78 + int
  432.79 +-swscanf (s, format)
  432.80 +-     const wchar_t *s;
  432.81 +-     const wchar_t *format;
  432.82 ++swscanf (const wchar_t *s, const wchar_t *format, ...)
  432.83 + {
  432.84 +   va_list arg;
  432.85 +   int done;
   433.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   433.2 +++ b/patches/glibc/2.2.5/unwind-arm.patch	Sat Feb 24 11:00:05 2007 +0000
   433.3 @@ -0,0 +1,19 @@
   433.4 +# See http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2002-September/011508.html
   433.5 +# Fixes error
   433.6 +# arm-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/libc.so.6: undefined reference to `size_of_encoded_value'
   433.7 +# arm-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/libc.so.6: undefined reference to `read_encoded_value_with_base'
   433.8 +# make[2]: *** [arm-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/iconv/iconvconfig] Error 1
   433.9 +
  433.10 +--- glibc-2.2.5/sysdeps/unix/sysv/linux/configure.old	Sun Jan 20 19:27:33 2002
  433.11 ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/configure	Sun Jun  8 03:33:03 2003
  433.12 +@@ -56,6 +56,10 @@
  433.13 +     arch_minimum_kernel=2.1.100
  433.14 +     libc_cv_gcc_unwind_find_fde=yes
  433.15 +     ;;
  433.16 ++  arm*)
  433.17 ++    libc_cv_gcc_unwind_find_fde=yes
  433.18 ++    arch_minimum_kernel=2.0.10
  433.19 ++    ;;
  433.20 +   i386*)
  433.21 +     libc_cv_gcc_unwind_find_fde=yes
  433.22 +     arch_minimum_kernel=2.0.10
   434.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   434.2 +++ b/patches/glibc/2.3.2/README-hppa	Sat Feb 24 11:00:05 2007 +0000
   434.3 @@ -0,0 +1,32 @@
   434.4 +[See also http://parisc-linux.org/toolchain
   434.5 + One of these days I'll have a look at what they've
   434.6 + got there, and incorporate their patches.]
   434.7 +
   434.8 +-------
   434.9 +
  434.10 +The error
  434.11 +
  434.12 +../linuxthreads/sysdeps/pthread/errno-loc.c: In function `__errno_location':
  434.13 +../linuxthreads/sysdeps/pthread/errno-loc.c:39: `pthread_descr' undeclared (first use in this function)
  434.14 +../linuxthreads/sysdeps/pthread/errno-loc.c:39: (Each undeclared identifier is reported only once
  434.15 +../linuxthreads/sysdeps/pthread/errno-loc.c:39: for each function it appears in.)
  434.16 +../linuxthreads/sysdeps/pthread/errno-loc.c:39: syntax error before "self"
  434.17 +../linuxthreads/sysdeps/pthread/errno-loc.c:40: warning: implicit declaration of function `LIBC_THREAD_GETMEM'
  434.18 +../linuxthreads/sysdeps/pthread/errno-loc.c:40: `self' undeclared (first use in this function)
  434.19 +../linuxthreads/sysdeps/pthread/errno-loc.c:40: `p_errnop' undeclared (first use in this function)
  434.20 +../linuxthreads/sysdeps/pthread/errno-loc.c:40: warning: return makes pointer from integer without a cast
  434.21 +make[2]: *** [/home/gotom/glibc/glibc-2.3.2/build/csu/errno-loc.o] Error 1
  434.22 +make[2]: Leaving directory `/home/gotom/glibc/glibc-2.3.2/glibc-2.3.2/csu'
  434.23 +make[1]: *** [csu/subdir_lib] Error 2
  434.24 +
  434.25 +means that hppa does not yet have the proper stuff for linuxthreads.
  434.26 +
  434.27 +See
  434.28 +http://groups.google.com/groups?selm=20030322165012%247208%40gated-at.bofh.it
  434.29 +http://lists.debian.org/debian-glibc/2003/debian-glibc-200303/msg00472.html
  434.30 +
  434.31 +A set of experimental patches is at
  434.32 +http://www.baldric.uwo.ca/~carlos/glibc-2.3.2-patches.tar.gz
  434.33 +but since they touch generic code, I'm not comfortable using them in general yet.
  434.34 +Go ahead and grab them if you want to build for hppa before hppa
  434.35 +support is merged into glibc.
   435.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   435.2 +++ b/patches/glibc/2.3.2/arm-asm-clobber.patch	Sat Feb 24 11:00:05 2007 +0000
   435.3 @@ -0,0 +1,26 @@
   435.4 +http://gcc.gnu.org/PR11103
   435.5 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/arm/sysdep.h.diff?r1=1.22&r2=1.23&cvsroot=glibc
   435.6 +http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-July/005826.html
   435.7 +
   435.8 +Error:
   435.9 +../sysdeps/unix/sysv/linux/arm/sigaction.c: In function `__libc_sigaction':
  435.10 +../sysdeps/unix/sysv/linux/arm/sigaction.c:100: error: asm-specifier for variable `_a1' conflicts with asm clobber list
  435.11 +../sysdeps/unix/sysv/linux/arm/sigaction.c:139: error: asm-specifier for variable `_a1' conflicts with asm clobber list
  435.12 +make[2]: *** [build-glibc/signal/sigaction.o] Error 1
  435.13 +
  435.14 +===================================================================
  435.15 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/arm/sysdep.h,v
  435.16 +retrieving revision 1.22
  435.17 +retrieving revision 1.23
  435.18 +diff -u -r1.22 -r1.23
  435.19 +--- libc/sysdeps/unix/sysv/linux/arm/sysdep.h	2003/03/23 19:42:22	1.22
  435.20 ++++ libc/sysdeps/unix/sysv/linux/arm/sysdep.h	2003/03/24 19:00:28	1.23
  435.21 +@@ -174,7 +174,7 @@
  435.22 +        asm volatile ("swi	%1	@ syscall " #name	\
  435.23 + 		     : "=r" (_a1)				\
  435.24 + 		     : "i" (SYS_ify(name)) ASM_ARGS_##nr	\
  435.25 +-		     : "a1", "memory");				\
  435.26 ++		     : "memory");				\
  435.27 +        _sys_result = _a1;					\
  435.28 +      }								\
  435.29 +      (int) _sys_result; })
   436.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   436.2 +++ b/patches/glibc/2.3.2/arm-ctl_bus_isa.patch	Sat Feb 24 11:00:05 2007 +0000
   436.3 @@ -0,0 +1,51 @@
   436.4 +Applies to both glibc-2.2.5 and glibc-2.3.2, and probably glibc cvs as of Aug 2004.
   436.5 +Needed to build glibc with linux kernels 2.4.23 or higher on ARM, 
   436.6 +Fixes following error:
   436.7 +
   436.8 +../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
   436.9 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
  436.10 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
  436.11 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
  436.12 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
  436.13 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
  436.14 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
  436.15 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
  436.16 +make[2]: *** [/home/dank/crosstool-0.28/build/arm-softfloat-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/misc/ioperm.o] Error 1
  436.17 +
  436.18 +cf. "[SYSCTL] BUS_ISA -> CTL_BUS_ISA",  http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html
  436.19 +
  436.20 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c.old	2003-02-20 14:22:24.000000000 -0800
  436.21 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c	2004-01-31 16:01:50.000000000 -0800
  436.22 +@@ -47,6 +47,12 @@
  436.23 + #include <asm/page.h>
  436.24 + #include <sys/sysctl.h>
  436.25 + 
  436.26 ++/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
  436.27 ++#include <linux/version.h>
  436.28 ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
  436.29 ++#define CTL_BUS_ISA BUS_ISA	/* and hope it's not the one from linux/input.h */
  436.30 ++#endif
  436.31 ++
  436.32 + #define PATH_ARM_SYSTYPE	"/etc/arm_systype"
  436.33 + #define PATH_CPUINFO		"/proc/cpuinfo"
  436.34 + 
  436.35 +@@ -80,7 +86,7 @@
  436.36 +  * Initialize I/O system.  There are several ways to get the information
  436.37 +  * we need.  Each is tried in turn until one succeeds.
  436.38 +  *
  436.39 +- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*).  This is the preferred method
  436.40 ++ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*).  This is the preferred method
  436.41 +  *    but not all kernels support it.
  436.42 +  *
  436.43 +  * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
  436.44 +@@ -100,8 +106,8 @@
  436.45 + {
  436.46 +   char systype[256];
  436.47 +   int i, n;
  436.48 +-  static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
  436.49 +-  static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
  436.50 ++  static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
  436.51 ++  static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
  436.52 +   size_t len = sizeof(io.base);
  436.53 + 
  436.54 +   if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
   437.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   437.2 +++ b/patches/glibc/2.3.2/arm-mcount_internal.patch	Sat Feb 24 11:00:05 2007 +0000
   437.3 @@ -0,0 +1,30 @@
   437.4 +#
   437.5 +# Submitted:
   437.6 +# 
   437.7 +# Robert Schwebel, 2003-12-22
   437.8 +#  
   437.9 +# Error:
  437.10 +# 
  437.11 +# ... undefined reference to mcount_internal ...
  437.12 +# 
  437.13 +# Description: 
  437.14 +#
  437.15 +# State:
  437.16 +# 
  437.17 +# unknown
  437.18 +#
  437.19 +
  437.20 +--- glibc-2.3.2/sysdeps/arm/machine-gmon.h	2001-07-07 21:21:19.000000000 +0200
  437.21 ++++ glibc-2.3.2-ptx/sysdeps/arm/machine-gmon.h	2003-12-21 23:58:26.000000000 +0100
  437.22 +@@ -32,10 +32,8 @@
  437.23 + weak_alias (_mcount, mcount)
  437.24 + #endif
  437.25 + 
  437.26 +-static void mcount_internal (u_long frompc, u_long selfpc);
  437.27 +-
  437.28 + #define _MCOUNT_DECL(frompc, selfpc) \
  437.29 +-static void mcount_internal (u_long frompc, u_long selfpc)
  437.30 ++void mcount_internal (u_long frompc, u_long selfpc)
  437.31 + 
  437.32 + /* This macro/func MUST save r0, r1 because the compiler inserts
  437.33 + 	blind calls to _mount(), ignoring the fact that _mcount may
   438.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   438.2 +++ b/patches/glibc/2.3.2/epoll-epollet.patch	Sat Feb 24 11:00:05 2007 +0000
   438.3 @@ -0,0 +1,28 @@
   438.4 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/sys/epoll.h.diff?r1=1.1&r2=1.2&cvsroot=glibc
   438.5 +Needed for modern sys_epoll.
   438.6 +
   438.7 +===================================================================
   438.8 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/sys/epoll.h,v
   438.9 +retrieving revision 1.1
  438.10 +retrieving revision 1.2
  438.11 +diff -u -r1.1 -r1.2
  438.12 +--- libc/sysdeps/unix/sysv/linux/sys/epoll.h	2002/12/16 23:35:27	1.1
  438.13 ++++ libc/sysdeps/unix/sysv/linux/sys/epoll.h	2003/03/24 23:50:25	1.2
  438.14 +@@ -1,4 +1,4 @@
  438.15 +-/* Copyright (C) 2002 Free Software Foundation, Inc.
  438.16 ++/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
  438.17 +    This file is part of the GNU C Library.
  438.18 + 
  438.19 +    The GNU C Library is free software; you can redistribute it and/or
  438.20 +@@ -42,8 +42,10 @@
  438.21 + #define EPOLLMSG EPOLLMSG
  438.22 +     EPOLLERR = 0x008,
  438.23 + #define EPOLLERR EPOLLERR
  438.24 +-    EPOLLHUP = 0x010
  438.25 ++    EPOLLHUP = 0x010,
  438.26 + #define EPOLLHUP EPOLLHUP
  438.27 ++    EPOLLET = (1 << 31)
  438.28 ++#define EPOLLET EPOLLET
  438.29 +   };
  438.30 + 
  438.31 + 
   439.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   439.2 +++ b/patches/glibc/2.3.2/epoll-stdint.patch	Sat Feb 24 11:00:05 2007 +0000
   439.3 @@ -0,0 +1,22 @@
   439.4 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/sys/epoll.h.diff?r1=1.2&r2=1.3&cvsroot=glibc
   439.5 +Include <stdint.h>.
   439.6 +
   439.7 +Fixes error
   439.8 +/foo/gcc-3.3.2-glibc-2.3.2/powerpc-750-linux-gnu/sys-include/sys/epoll.h:60: error: parse error before "uint32_t"
   439.9 +/foo/gcc-3.3.2-glibc-2.3.2/powerpc-750-linux-gnu/sys-include/sys/epoll.h:66: error: parse error before "uint32_t"
  439.10 +
  439.11 +===================================================================
  439.12 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/sys/epoll.h,v
  439.13 +retrieving revision 1.2
  439.14 +retrieving revision 1.3
  439.15 +diff -u -r1.2 -r1.3
  439.16 +--- libc/sysdeps/unix/sysv/linux/sys/epoll.h	2003/03/24 23:50:25	1.2
  439.17 ++++ libc/sysdeps/unix/sysv/linux/sys/epoll.h	2003/06/13 19:49:50	1.3
  439.18 +@@ -19,6 +19,7 @@
  439.19 + #ifndef	_SYS_EPOLL_H
  439.20 + #define	_SYS_EPOLL_H	1
  439.21 + 
  439.22 ++#include <stdint.h>
  439.23 + #include <sys/types.h>
  439.24 + 
  439.25 + 
   440.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   440.2 +++ b/patches/glibc/2.3.2/errlist-awk.patch	Sat Feb 24 11:00:05 2007 +0000
   440.3 @@ -0,0 +1,11 @@
   440.4 +--- glibc-2.3.2/sysdeps/gnu/errlist.awk.old	Tue May 27 18:10:37 2003
   440.5 ++++ glibc-2.3.2/sysdeps/gnu/errlist.awk	Tue May 27 18:10:47 2003
   440.6 +@@ -39,7 +39,7 @@
   440.7 + 
   440.8 +     print "/* This file is generated from errno.texi by errlist.awk.  */"
   440.9 +     print "";
  440.10 +-    print "#include <errno.h>";
  440.11 ++    print "#include <stdlib/errno.h>";
  440.12 +     print "#include <libintl.h>";
  440.13 +     print "";
  440.14 +     print "#ifndef ERR_REMAP";
   441.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   441.2 +++ b/patches/glibc/2.3.2/fixup.patch	Sat Feb 24 11:00:05 2007 +0000
   441.3 @@ -0,0 +1,74 @@
   441.4 +Fixes
   441.5 +dl-runtime.c:56: error: conflicting types for 'fixup'
   441.6 +../sysdeps/i386/dl-machine.h:158: error: previous declaration of 'fixup' was here
   441.7 +when building with gcc-3.4.0
   441.8 +
   441.9 +First hunk:
  441.10 +Define ARCH_FIXUP_ATTRIBUTE and use it in the fixup function declarations.
  441.11 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/dl-machine.h.diff?r1=1.124&r2=1.125&cvsroot=glibc
  441.12 +
  441.13 +Second hunk:
  441.14 +If ARCH_FIXUP_ATTRIBUTE is not defined, provide dummy definition.
  441.15 +Use macro in fixup function definitions.
  441.16 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/elf/dl-runtime.c.diff?r1=1.64&r2=1.65&cvsroot=glibc
  441.17 +[rediffed against glibc-2.3.2]
  441.18 +
  441.19 +===================================================================
  441.20 +RCS file: /cvs/glibc/libc/sysdeps/i386/dl-machine.h,v
  441.21 +retrieving revision 1.124
  441.22 +retrieving revision 1.125
  441.23 +diff -u -r1.124 -r1.125
  441.24 +--- libc/sysdeps/i386/dl-machine.h	2004/03/05 10:14:49	1.124
  441.25 ++++ libc/sysdeps/i386/dl-machine.h	2004/03/09 07:42:29	1.125
  441.26 +@@ -154,11 +154,14 @@
  441.27 +    destroys the passed register information.  */
  441.28 + /* GKM FIXME: Fix trampoline to pass bounds so we can do
  441.29 +    without the `__unbounded' qualifier.  */
  441.30 +-static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset)
  441.31 +-     __attribute__ ((regparm (2), unused));
  441.32 ++#define ARCH_FIXUP_ATTRIBUTE __attribute__ ((regparm (3), unused))
  441.33 ++
  441.34 ++static ElfW(Addr) fixup (struct link_map *__unbounded l,
  441.35 ++			 ElfW(Word) reloc_offset)
  441.36 ++     ARCH_FIXUP_ATTRIBUTE;
  441.37 + static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset,
  441.38 + 				 ElfW(Addr) retaddr)
  441.39 +-     __attribute__ ((regparm (3), unused));
  441.40 ++     ARCH_FIXUP_ATTRIBUTE;
  441.41 + # endif
  441.42 + 
  441.43 + /* This code is used in dl-runtime.c to call the `fixup' function
  441.44 +===================================================================
  441.45 +--- /home/dank/downloads/glibc-2.3.2/elf/dl-runtime.c	Fri Feb  7 11:41:12 2003
  441.46 ++++ glibc-2.3.2/elf/dl-runtime.c	Thu Apr  8 22:24:26 2004
  441.47 +@@ -36,6 +36,12 @@
  441.48 + # define VERSYMIDX(sym)	(DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
  441.49 + #endif
  441.50 + 
  441.51 ++/* The fixup functions might have need special attributes.  If none
  441.52 ++   are provided define the macro as empty.  */
  441.53 ++#ifndef ARCH_FIXUP_ATTRIBUTE
  441.54 ++# define ARCH_FIXUP_ATTRIBUTE
  441.55 ++#endif
  441.56 ++
  441.57 + 
  441.58 + /* This function is called through a special trampoline from the PLT the
  441.59 +    first time each PLT entry is called.  We must perform the relocation
  441.60 +@@ -45,7 +51,7 @@
  441.61 +    function.  */
  441.62 + 
  441.63 + #ifndef ELF_MACHINE_NO_PLT
  441.64 +-static ElfW(Addr) __attribute_used__
  441.65 ++static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
  441.66 + fixup (
  441.67 + # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
  441.68 +         ELF_MACHINE_RUNTIME_FIXUP_ARGS,
  441.69 +@@ -132,7 +138,7 @@
  441.70 + 
  441.71 + #if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__
  441.72 + 
  441.73 +-static ElfW(Addr) __attribute_used__
  441.74 ++static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
  441.75 + profile_fixup (
  441.76 + #ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
  441.77 +        ELF_MACHINE_RUNTIME_FIXUP_ARGS,
   442.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   442.2 +++ b/patches/glibc/2.3.2/gcc-pr-9552-workaround.patch	Sat Feb 24 11:00:05 2007 +0000
   442.3 @@ -0,0 +1,20 @@
   442.4 +See http://gcc.gnu.org/PR9552
   442.5 +
   442.6 +Works around gcc error
   442.7 +  "soinit.c:25: internal compiler error: in named_section_flags, at varasm.c:412"
   442.8 +by fixing slightly incorrect code in glibc (the .eh_frame section used to
   442.9 +be read-write, but it's now readonly according to discussion in
  442.10 +http://sources.redhat.com/ml/binutils/2002-11/msg00592.html,
  442.11 +so it's arguably incorrect to continue to put variables in there that aren't const).
  442.12 +
  442.13 +--- glibc-2.3.2/elf/soinit.c 2001-11-16 00:09:20.000000000 +0100
  442.14 ++++ glibc-2.3.2/elf/soinit.c   2003-08-12 09:13:34.000000000 +0200
  442.15 +@@ -25,7 +25,7 @@
  442.16 + }
  442.17 +
  442.18 + #ifdef HAVE_DWARF2_UNWIND_INFO
  442.19 +-static char __EH_FRAME_BEGIN__[]
  442.20 ++const static char __EH_FRAME_BEGIN__[]
  442.21 +      __attribute__ ((section (".eh_frame")))
  442.22 +      = { };
  442.23 + # ifdef HAVE_DWARF2_UNWIND_INFO_STATIC
   443.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   443.2 +++ b/patches/glibc/2.3.2/glibc-2.2.5-crosstest.patch	Sat Feb 24 11:00:05 2007 +0000
   443.3 @@ -0,0 +1,27 @@
   443.4 +Fixes errors like
   443.5 +  /build-glibc/dlfcn/glrefmain: cannot load `glreflib1.so'
   443.6 +in glibc regression test
   443.7 +
   443.8 +--- glibc-2.2.5/dlfcn/Makefile.old	Thu Jul 24 16:30:20 2003
   443.9 ++++ glibc-2.2.5/dlfcn/Makefile	Thu Jul 24 17:25:01 2003
  443.10 +@@ -60,6 +60,8 @@
  443.11 + test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names)))
  443.12 + $(test-modules): $(objpfx)%.so: $(objpfx)%.os
  443.13 + 	$(build-module)
  443.14 ++# without following rule, test-modules don't get built when cross-compiling
  443.15 ++tests: $(test-modules)
  443.16 + 
  443.17 + $(objpfx)glrefmain: $(libdl)
  443.18 + $(objpfx)glrefmain.out: $(objpfx)glrefmain \
  443.19 +--- glibc-2.2.5/elf/Makefile.old	Thu Jul 24 18:17:12 2003
  443.20 ++++ glibc-2.2.5/elf/Makefile	Thu Jul 24 18:18:58 2003
  443.21 +@@ -263,6 +263,9 @@
  443.22 + test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
  443.23 + generated += $(addsuffix .so,$(strip $(modules-names)))
  443.24 + 
  443.25 ++# without following rule, test-modules don't get built when cross-compiling
  443.26 ++tests: $(test-modules)
  443.27 ++
  443.28 + ifeq (yes,$(build-shared))
  443.29 + ifeq ($(cross-compiling),no)
  443.30 + tests: $(objpfx)tst-pathopt.out
   444.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   444.2 +++ b/patches/glibc/2.3.2/glibc-2.2.5-mips-clone-local-label.patch	Sat Feb 24 11:00:05 2007 +0000
   444.3 @@ -0,0 +1,47 @@
   444.4 +This is a workaround for
   444.5 +
   444.6 +mipsel-unknown-linux-gnu-gcc ../sysdeps/unix/sysv/linux/mips/clone.S -c  -I../include -I. -I/home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/misc -I.. -I../libio  -I/home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc -I../sysdeps/mips/elf -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/mips -I../sysdeps/unix/sysv/linux/mips -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/mips -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/mips/mipsel -I../sysdeps/mips/fpu -I../sysdeps/mips -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic  -nostdinc -isystem /home3/dank/crosstool-0.7/result/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/mipsel-unknown-linux-gnu/3.2.3/include -isystem /home3/dank/crosstool-0.7/result/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/mipsel-unknown-linux-gnu/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC   -DASSEMBLER   -o /home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/misc/clone.o
   444.7 +../sysdeps/unix/sysv/linux/mips/clone.S: Assembler messages:
   444.8 +../sysdeps/unix/sysv/linux/mips/clone.S:66: Error: Can not represent BFD_RELOC_16_PCREL_S2 relocation in this object file format
   444.9 +make[2]: *** [/home3/dank/crosstool-0.7/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/misc/clone.o] Error 1
  444.10 +
  444.11 +which was using h.j.lu's binutils-2.13.90.0.18.
  444.12 +
  444.13 +
  444.14 +But see http://lists.debian.org/debian-mips/2003/debian-mips-200305/msg00011.html
  444.15 +which says
  444.16 +"A newer version of binutils (CVS post 2003-03-12) fixes it without
  444.17 +the need of changing perfectly legal code."
  444.18 +So presumably this can be ditched sooner or later.
  444.19 +
  444.20 +From http://honk.physik.uni-konstanz.de/~agx/linux-mips/glibc/patches/applied/clone-local-label.diff
  444.21 +
  444.22 +2003-03-13  Guido Guenther  <agx@sigxcpu.org>
  444.23 +
  444.24 +	* sysdeps/unix/sysv/linux/mips/clone.S: introduce and use local label
  444.25 +	  .Lthread_start since current binutils don't allow branches to globally
  444.26 +	  visible symbols.
  444.27 +
  444.28 +===================================================================
  444.29 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/clone.S,v
  444.30 +retrieving revision 1.10
  444.31 +diff -u -r1.10 clone.S
  444.32 +--- glibc-2.2.5/sysdeps/unix/sysv/linux/mips/clone.S	12 Mar 2003 01:04:51 -0000	1.10
  444.33 ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/mips/clone.S	12 Mar 2003 19:04:39 -0000
  444.34 +@@ -63,7 +63,7 @@
  444.35 + 	syscall
  444.36 + 
  444.37 + 	bnez		a3,error
  444.38 +-	beqz		v0,__thread_start
  444.39 ++	beqz		v0,.Lthread_start
  444.40 + 
  444.41 + 	/* Successful return from the parent */
  444.42 + 	addiu		sp,32
  444.43 +@@ -85,6 +85,7 @@
  444.44 +    debug info.  */
  444.45 + 
  444.46 + ENTRY(__thread_start)
  444.47 ++.Lthread_start:
  444.48 + 	/* cp is already loaded.  */
  444.49 + 	.cprestore	16
  444.50 + 	/* The stackframe has been created on entry of clone().  */
   445.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   445.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.4-inline.patch	Sat Feb 24 11:00:05 2007 +0000
   445.3 @@ -0,0 +1,23 @@
   445.4 +Fixes
   445.5 +cc1: error: invalid parameter `max-inline-insns'
   445.6 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc6/build/powerpc64-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/elf/dl-load.o] Error 1
   445.7 +when building with gcc-3.4.0, which no longer has a single
   445.8 +--max-inline-insns parameter.
   445.9 +
  445.10 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/powerpc/powerpc64/Makefile.diff?r1=1.3&r2=1.4&cvsroot=glibc
  445.11 +
  445.12 +===================================================================
  445.13 +RCS file: /cvs/glibc/libc/sysdeps/powerpc/powerpc64/Makefile,v
  445.14 +retrieving revision 1.3
  445.15 +retrieving revision 1.4
  445.16 +diff -u -r1.3 -r1.4
  445.17 +--- libc/sysdeps/powerpc/powerpc64/Makefile     2003/10/22 21:30:03     1.3
  445.18 ++++ libc/sysdeps/powerpc/powerpc64/Makefile     2004/02/20 05:43:52     1.4
  445.19 +@@ -20,5 +20,5 @@
  445.20 + 
  445.21 + ifeq ($(subdir),elf)
  445.22 + # help gcc inline asm code from dl-machine.h
  445.23 +-+cflags += --param max-inline-insns=2000
  445.24 +++cflags += -finline-limit=2000
  445.25 + endif
  445.26 +
   446.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   446.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.4-nounit.patch	Sat Feb 24 11:00:05 2007 +0000
   446.3 @@ -0,0 +1,137 @@
   446.4 +Fixes errors like
   446.5 +
   446.6 +# gcc-3.4.0-glibc-2.3.2/build-glibc/csu/crtn.o(.text+0x0):mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/csu/crtn.S:20: multiple definition of `dummy'
   446.7 +# gcc-3.4.0-glibc-2.3.2/build-glibc/csu/crti.o(.text+0x0):mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/csu/crti.S:42: first defined here
   446.8 +# /gcc-3.4.0-glibc-2.3.2/build-glibc/csu/crti.o(.init+0x28):mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/csu/crti.S:58: undefined reference to `i_am_not_a_leaf'
   446.9 +
  446.10 +CVSROOT:	/cvs/glibc
  446.11 +Module name:	libc
  446.12 +Changes by:	aj@sourceware.org	2003-12-02 07:37:29
  446.13 +
  446.14 +Modified files:
  446.15 +	.              : configure.in configure config.make.in 
  446.16 +	csu            : Makefile 
  446.17 +	locale         : Makefile 
  446.18 +	linuxthreads   : Makefile 
  446.19 +	linuxthreads/sysdeps/unix/sysv/linux/x86_64: Makefile 
  446.20 +	nptl           : Makefile 
  446.21 +	nptl/sysdeps/unix/sysv/linux/x86_64: Makefile 
  446.22 +
  446.23 +Log message:
  446.24 +	* config.make.in (fno-unit-at-a-time): Define.
  446.25 +	
  446.26 +	* configure.in: Add test for -fno-unit-at-a-time.
  446.27 +	Fix text for -fpie.
  446.28 +	
  446.29 +	* csu/Makefile (CFLAGS-initfini.s): Add $(fno_unit_at_a_time).
  446.30 +	* locale/Makefile (CFLAGS-loadlocale.c): Likewise.
  446.31 +	
  446.32 +	For linuxthreads:
  446.33 +	* Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
  446.34 +	* sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
  446.35 +	Likewise.
  446.36 +	
  446.37 +	For nptl:
  446.38 +	* Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
  446.39 +	* sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
  446.40 +	Likewise.
  446.41 +
  446.42 +Main glibc change retrieved with
  446.43 +wget -O foo.patch 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/config.make.in.diff?r1=1.98&r2=1.99&cvsroot=glibc' \
  446.44 +'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/configure.diff?r1=1.393&r2=1.394&cvsroot=glibc' \
  446.45 +'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/csu/Makefile.diff?r1=1.71&r2=1.72&cvsroot=glibc' \
  446.46 +'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/locale/Makefile.diff?r1=1.71&r2=1.72&cvsroot=glibc'
  446.47 +
  446.48 +and then rediffed against glibc-2.3.2
  446.49 +See also ../glibc-linuxthreads-2.3.2/glibc-linuxthreads-2.3.2-allow-3.4.patch
  446.50 +
  446.51 +diff -aur glibc-2.3.2/config.make.in glibc-2.3.2-nounit/config.make.in
  446.52 +--- glibc-2.3.2/config.make.in	2002-11-14 14:53:32.000000000 -0800
  446.53 ++++ glibc-2.3.2-nounit/config.make.in	2004-05-29 23:19:58.000000000 -0700
  446.54 +@@ -50,6 +50,7 @@
  446.55 + old-glibc-headers = @old_glibc_headers@
  446.56 + unwind-find-fde = @libc_cv_gcc_unwind_find_fde@
  446.57 + have-initfini-array = @libc_cv_initfinit_array@
  446.58 ++fno-unit-at-a-time = @fno_unit_at_a_time@
  446.59 + 
  446.60 + static-libgcc = @libc_cv_gcc_static_libgcc@
  446.61 + 
  446.62 +diff -aur glibc-2.3.2/configure glibc-2.3.2-nounit/configure
  446.63 +--- glibc-2.3.2/configure	2003-02-26 01:20:48.000000000 -0800
  446.64 ++++ glibc-2.3.2-nounit/configure	2004-05-30 06:22:31.000000000 -0700
  446.65 +@@ -312,7 +312,7 @@
  446.66 + # include <unistd.h>
  446.67 + #endif"
  446.68 + 
  446.69 +-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 with_fp with_cvs oldest_abi subdirs force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S PWD_P CC MAKE MSGFMT MAKEINFO SED AUTOCONF CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD CCVERSION SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO OLD_DEBIAN_INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_Bgroup libc_cv_z_combreloc libc_cv_have_initfini no_whole_archive exceptions LIBGD EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
  446.70 ++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 with_fp with_cvs oldest_abi subdirs force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S PWD_P CC MAKE MSGFMT MAKEINFO SED AUTOCONF CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD CCVERSION SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO OLD_DEBIAN_INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_Bgroup libc_cv_z_combreloc fno_unit_at_a_time libc_cv_have_initfini no_whole_archive exceptions LIBGD EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
  446.71 + ac_subst_files=''
  446.72 + 
  446.73 + # Initialize some variables set by options.
  446.74 +@@ -4984,6 +4984,35 @@
  446.75 + fi
  446.76 + 
  446.77 + 
  446.78 ++echo "$as_me:$LINENO: checking for -fno-unit-at-a-time" >&5
  446.79 ++echo $ECHO_N "checking for -fno-unit-at-a-time... $ECHO_C" >&6
  446.80 ++if test "${libc_cv_fno_unit_at_a_time+set}" = set; then
  446.81 ++  echo $ECHO_N "(cached) $ECHO_C" >&6
  446.82 ++else
  446.83 ++  cat > conftest.c <<EOF
  446.84 ++int foo;
  446.85 ++EOF
  446.86 ++if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -fno-unit-at-a-time
  446.87 ++			    conftest.c 1>&5'
  446.88 ++  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  446.89 ++  (eval $ac_try) 2>&5
  446.90 ++  ac_status=$?
  446.91 ++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  446.92 ++  (exit $ac_status); }; }
  446.93 ++then
  446.94 ++  libc_cv_fno_unit_at_a_time=yes
  446.95 ++else
  446.96 ++  libc_cv_fno_unit_at_a_time=no
  446.97 ++fi
  446.98 ++rm -f conftest*
  446.99 ++fi
 446.100 ++echo "$as_me:$LINENO: result: $libc_cv_fno_unit_at_a_time" >&5
 446.101 ++echo "${ECHO_T}$libc_cv_fno_unit_at_a_time" >&6
 446.102 ++if test $libc_cv_fno_unit_at_a_time = yes; then
 446.103 ++  fno_unit_at_a_time=-fno-unit-at-a-time
 446.104 ++fi
 446.105 ++
 446.106 ++
 446.107 + if test $elf != yes; then
 446.108 +   echo "$as_me:$LINENO: checking for .init and .fini sections" >&5
 446.109 + echo $ECHO_N "checking for .init and .fini sections... $ECHO_C" >&6
 446.110 +@@ -7236,6 +7265,7 @@
 446.111 + s,@libc_cv_z_initfirst@,$libc_cv_z_initfirst,;t t
 446.112 + s,@libc_cv_Bgroup@,$libc_cv_Bgroup,;t t
 446.113 + s,@libc_cv_z_combreloc@,$libc_cv_z_combreloc,;t t
 446.114 ++s,@fno_unit_at_a_time@,$fno_unit_at_a_time,;t t
 446.115 + s,@libc_cv_have_initfini@,$libc_cv_have_initfini,;t t
 446.116 + s,@no_whole_archive@,$no_whole_archive,;t t
 446.117 + s,@exceptions@,$exceptions,;t t
 446.118 +diff -aur glibc-2.3.2/csu/Makefile glibc-2.3.2-nounit/csu/Makefile
 446.119 +--- glibc-2.3.2/csu/Makefile	2002-12-31 14:24:37.000000000 -0800
 446.120 ++++ glibc-2.3.2-nounit/csu/Makefile	2004-05-29 23:18:27.000000000 -0700
 446.121 +@@ -99,7 +99,7 @@
 446.122 + $(objpfx)crt%.o: $(objpfx)crt%.S $(objpfx)defs.h
 446.123 + 	$(compile.S) -g0 $(ASFLAGS-.os) -o $@
 446.124 + 
 446.125 +-CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions
 446.126 ++CFLAGS-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
 446.127 + 
 446.128 + vpath initfini.c $(full_config_sysdirs)
 446.129 + 
 446.130 +diff -aur glibc-2.3.2/locale/Makefile glibc-2.3.2-nounit/locale/Makefile
 446.131 +--- glibc-2.3.2/locale/Makefile	2002-10-17 10:05:53.000000000 -0700
 446.132 ++++ glibc-2.3.2-nounit/locale/Makefile	2004-05-29 23:18:27.000000000 -0700
 446.133 +@@ -100,6 +100,7 @@
 446.134 + CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
 446.135 + CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
 446.136 + CFLAGS-charmap-dir.c = -Wno-write-strings
 446.137 ++CFLAGS-loadlocale.c = $(fno-unit-at-a-time)
 446.138 + 
 446.139 + # This makes sure -DNOT_IN_libc is passed for all these modules.
 446.140 + cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \
   447.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   447.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-PR14096.patch	Sat Feb 24 11:00:05 2007 +0000
   447.3 @@ -0,0 +1,55 @@
   447.4 +--- glibc-2.3.2/stdlib/abs.c.old	2004-07-18 12:08:43.000000000 -0700
   447.5 ++++ glibc-2.3.2/stdlib/abs.c	2004-07-18 12:09:18.000000000 -0700
   447.6 +@@ -16,6 +16,8 @@
   447.7 +    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   447.8 +    02111-1307 USA.  */
   447.9 + 
  447.10 ++#define __NO_INLINE__ 1	/* avoid http://gcc.gnu.org/PR14096 */
  447.11 ++
  447.12 + #include <stdlib.h>
  447.13 + 
  447.14 + #undef	abs
  447.15 +--- glibc-2.3.2/stdlib/atoi.c.old	2004-07-18 12:08:17.000000000 -0700
  447.16 ++++ glibc-2.3.2/stdlib/atoi.c	2004-07-18 12:08:27.000000000 -0700
  447.17 +@@ -16,6 +16,8 @@
  447.18 +    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  447.19 +    02111-1307 USA.  */
  447.20 + 
  447.21 ++#define __NO_INLINE__ 1	/* avoid http://gcc.gnu.org/PR14096 */
  447.22 ++
  447.23 + #include <stdlib.h>
  447.24 + 
  447.25 + #undef	atoi
  447.26 +--- glibc-2.3.2/stdlib/atof.c.old	2004-07-18 12:06:09.000000000 -0700
  447.27 ++++ glibc-2.3.2/stdlib/atof.c	2004-07-18 12:05:31.000000000 -0700
  447.28 +@@ -16,6 +16,8 @@
  447.29 +    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  447.30 +    02111-1307 USA.  */
  447.31 + 
  447.32 ++#define __NO_INLINE__ 1	/* avoid http://gcc.gnu.org/PR14096 */
  447.33 ++
  447.34 + #include <stdlib.h>
  447.35 + 
  447.36 + #undef	atof
  447.37 +--- glibc-2.3.2/stdlib/atol.c.old	2004-07-18 12:08:49.000000000 -0700
  447.38 ++++ glibc-2.3.2/stdlib/atol.c	2004-07-18 12:09:40.000000000 -0700
  447.39 +@@ -16,6 +16,8 @@
  447.40 +    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  447.41 +    02111-1307 USA.  */
  447.42 + 
  447.43 ++#define __NO_INLINE__ 1	/* avoid http://gcc.gnu.org/PR14096 */
  447.44 ++
  447.45 + #include <stdlib.h>
  447.46 + 
  447.47 + #undef	atol
  447.48 +--- glibc-2.3.2/stdlib/atoll.c.old	2004-07-18 12:08:55.000000000 -0700
  447.49 ++++ glibc-2.3.2/stdlib/atoll.c	2004-07-18 12:09:59.000000000 -0700
  447.50 +@@ -16,6 +16,8 @@
  447.51 +    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  447.52 +    02111-1307 USA.  */
  447.53 + 
  447.54 ++#define __NO_INLINE__ 1	/* avoid http://gcc.gnu.org/PR14096 */
  447.55 ++
  447.56 + #include <stdlib.h>
  447.57 + 
  447.58 + #undef	atoll
   448.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   448.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-elf.patch	Sat Feb 24 11:00:05 2007 +0000
   448.3 @@ -0,0 +1,34 @@
   448.4 +
   448.5 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/elf/dl-load.c.diff?r1=1.235&r2=1.236&cvsroot=glibc
   448.6 +
   448.7 +Fixes gcc-3.5 errors
   448.8 +
   448.9 +dl-load.c: In function `_dl_map_object_from_fd':
  448.10 +dl-load.c:1179: error: invalid lvalue in assignment
  448.11 +dl-load.c:1205: error: invalid lvalue in assignment
  448.12 +
  448.13 +===================================================================
  448.14 +RCS file: /cvs/glibc/libc/elf/dl-load.c,v
  448.15 +retrieving revision 1.235
  448.16 +retrieving revision 1.236
  448.17 +diff -u -r1.235 -r1.236
  448.18 +--- libc/elf/dl-load.c	2004/02/09 07:03:48	1.235
  448.19 ++++ libc/elf/dl-load.c	2004/02/21 18:25:41	1.236
  448.20 +@@ -1228,7 +1228,7 @@
  448.21 +       }
  448.22 +     else
  448.23 +       /* Adjust the PT_PHDR value by the runtime load address.  */
  448.24 +-      (ElfW(Addr)) l->l_phdr += l->l_addr;
  448.25 ++      l->l_phdr = (ElfW(Phdr) *) ((ElfW(Addr)) l->l_phdr + l->l_addr);
  448.26 +   }
  448.27 + 
  448.28 + #ifdef USE_TLS
  448.29 +@@ -1254,7 +1254,7 @@
  448.30 + 	}
  448.31 +     }
  448.32 +   else
  448.33 +-    (ElfW(Addr)) l->l_ld += l->l_addr;
  448.34 ++    l->l_ld = (ElfW(Dyn) *) ((ElfW(Addr)) l->l_ld + l->l_addr);
  448.35 + 
  448.36 +   l->l_entry += l->l_addr;
  448.37 + 
   449.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   449.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-gconv.patch	Sat Feb 24 11:00:05 2007 +0000
   449.3 @@ -0,0 +1,228 @@
   449.4 +Fixes
   449.5 +gconv_open.c: In function `__gconv_open':
   449.6 +gconv_open.c:186: error: invalid lvalue in assignment
   449.7 +when building glibc-2.3.2 with gcc-3.5.
   449.8 +
   449.9 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/iconv/gconv_simple.c.diff?r1=1.59&r2=1.63&cvsroot=glibc'
  449.10 +        * (internal_ucs4_loop): Fix typo in last change.
  449.11 +
  449.12 +        * (internal_ucs4le_loop): Remove cast used as lvalue.
  449.13 +
  449.14 +        * Fix last commit.
  449.15 +
  449.16 +	* iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as lvalue.
  449.17 +	(internal_ucs4le_loop_single): Likewise.
  449.18 +	(ucs4_internal_loop): Likewise.
  449.19 +	(BODY): Likewise.
  449.20 +	(internal_ucs4_loop_single): Likewise.
  449.21 +
  449.22 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/iconv/gconv_open.c.diff?r1=1.32&r2=1.33&cvsroot=glibc'
  449.23 +	* iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as lvalue.
  449.24 +	(internal_ucs4le_loop_single): Likewise.
  449.25 +	(ucs4_internal_loop): Likewise.
  449.26 +	(BODY): Likewise.
  449.27 +	(internal_ucs4_loop_single): Likewise.
  449.28 +
  449.29 +
  449.30 +===================================================================
  449.31 +RCS file: /cvs/glibc/libc/iconv/gconv_open.c,v
  449.32 +retrieving revision 1.32
  449.33 +retrieving revision 1.33
  449.34 +diff -u -r1.32 -r1.33
  449.35 +--- libc/iconv/gconv_open.c	2001/11/29 04:51:58	1.32
  449.36 ++++ libc/iconv/gconv_open.c	2004/02/07 15:56:32	1.33
  449.37 +@@ -1,5 +1,5 @@
  449.38 + /* Find matching transformation algorithms and initialize steps.
  449.39 +-   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  449.40 ++   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
  449.41 +    This file is part of the GNU C Library.
  449.42 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
  449.43 + 
  449.44 +@@ -182,8 +182,13 @@
  449.45 + 	      || __builtin_expect (__gconv_translit_find (runp), 0) == 0)
  449.46 + 	    lastp = runp;
  449.47 + 	  else
  449.48 +-	    /* This means we haven't found the module.  Remove it.  */
  449.49 +-	    (lastp == NULL ? trans : lastp->next) = runp->next;
  449.50 ++	    {
  449.51 ++	      /* This means we haven't found the module.  Remove it.  */
  449.52 ++	      if (lastp == NULL)
  449.53 ++		trans  = runp->next;
  449.54 ++	      else
  449.55 ++		lastp->next  = runp->next;
  449.56 ++	    }
  449.57 + 	}
  449.58 + 
  449.59 +       /* Allocate room for handle.  */
  449.60 +===================================================================
  449.61 +RCS file: /cvs/glibc/libc/iconv/gconv_simple.c,v
  449.62 +retrieving revision 1.59
  449.63 +retrieving revision 1.63
  449.64 +diff -u -r1.59 -r1.63
  449.65 +--- libc/iconv/gconv_simple.c	2003/06/11 21:36:37	1.59
  449.66 ++++ libc/iconv/gconv_simple.c	2004/03/09 10:00:31	1.63
  449.67 +@@ -1,5 +1,5 @@
  449.68 + /* Simple transformations functions.
  449.69 +-   Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
  449.70 ++   Copyright (C) 1997-2003, 2004 Free Software Foundation, Inc.
  449.71 +    This file is part of the GNU C Library.
  449.72 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
  449.73 + 
  449.74 +@@ -87,12 +87,13 @@
  449.75 + #if __BYTE_ORDER == __LITTLE_ENDIAN
  449.76 +   /* Sigh, we have to do some real work.  */
  449.77 +   size_t cnt;
  449.78 ++  uint32_t *outptr32 = (uint32_t *) outptr;
  449.79 + 
  449.80 +   for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
  449.81 +-    *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr);
  449.82 ++    *outptr32++ = bswap_32 (*(const uint32_t *) inptr);
  449.83 + 
  449.84 +   *inptrp = inptr;
  449.85 +-  *outptrp = outptr;
  449.86 ++  *outptrp = (unsigned char *) outptr32;
  449.87 + #elif __BYTE_ORDER == __BIG_ENDIAN
  449.88 +   /* Simply copy the data.  */
  449.89 +   *inptrp = inptr + n_convert * 4;
  449.90 +@@ -192,13 +193,16 @@
  449.91 +   (*outptrp)[2] = state->__value.__wchb[1];
  449.92 +   (*outptrp)[3] = state->__value.__wchb[0];
  449.93 + 
  449.94 +-  *outptrp += 4;
  449.95 + #elif __BYTE_ORDER == __BIG_ENDIAN
  449.96 +   /* XXX unaligned */
  449.97 +-  *(*((uint32_t **) outptrp)++) = state->__value.__wch;
  449.98 ++  (*outptrp)[0] = state->__value.__wchb[0];
  449.99 ++  (*outptrp)[1] = state->__value.__wchb[1];
 449.100 ++  (*outptrp)[2] = state->__value.__wchb[2];
 449.101 ++  (*outptrp)[3] = state->__value.__wchb[3];
 449.102 + #else
 449.103 + # error "This endianess is not supported."
 449.104 + #endif
 449.105 ++  *outptrp += 4;
 449.106 + 
 449.107 +   /* Clear the state buffer.  */
 449.108 +   state->__count &= ~7;
 449.109 +@@ -268,7 +272,8 @@
 449.110 + 	  return __GCONV_ILLEGAL_INPUT;
 449.111 + 	}
 449.112 + 
 449.113 +-      *((uint32_t *) outptr)++ = inval;
 449.114 ++      *((uint32_t *) outptr) = inval;
 449.115 ++      outptr += sizeof (uint32_t);
 449.116 +     }
 449.117 + 
 449.118 +   *inptrp = inptr;
 449.119 +@@ -447,9 +452,11 @@
 449.120 + #if __BYTE_ORDER == __BIG_ENDIAN
 449.121 +   /* Sigh, we have to do some real work.  */
 449.122 +   size_t cnt;
 449.123 ++  uint32_t *outptr32 = (uint32_t *) outptr;
 449.124 + 
 449.125 +   for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
 449.126 +-    *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr);
 449.127 ++    *outptr32++ = bswap_32 (*(const uint32_t *) inptr);
 449.128 ++  outptr = (unsigned char *) outptr32;
 449.129 + 
 449.130 +   *inptrp = inptr;
 449.131 +   *outptrp = outptr;
 449.132 +@@ -555,12 +562,17 @@
 449.133 +   (*outptrp)[2] = state->__value.__wchb[1];
 449.134 +   (*outptrp)[3] = state->__value.__wchb[0];
 449.135 + 
 449.136 +-  *outptrp += 4;
 449.137 + #else
 449.138 +   /* XXX unaligned */
 449.139 +-  *(*((uint32_t **) outptrp)++) = state->__value.__wch;
 449.140 ++  (*outptrp)[0] = state->__value.__wchb[0];
 449.141 ++  (*outptrp)[1] = state->__value.__wchb[1];
 449.142 ++  (*outptrp)[2] = state->__value.__wchb[2];
 449.143 ++  (*outptrp)[3] = state->__value.__wchb[3];
 449.144 ++
 449.145 + #endif
 449.146 + 
 449.147 ++  *outptrp += 4;
 449.148 ++
 449.149 +   /* Clear the state buffer.  */
 449.150 +   state->__count &= ~7;
 449.151 + 
 449.152 +@@ -626,7 +638,8 @@
 449.153 + 	  return __GCONV_ILLEGAL_INPUT;
 449.154 + 	}
 449.155 + 
 449.156 +-      *((uint32_t *) outptr)++ = inval;
 449.157 ++      *((uint32_t *) outptr) = inval;
 449.158 ++      outptr += sizeof (uint32_t);
 449.159 +     }
 449.160 + 
 449.161 +   *inptrp = inptr;
 449.162 +@@ -808,7 +821,8 @@
 449.163 +       }									      \
 449.164 +     else								      \
 449.165 +       /* It's an one byte sequence.  */					      \
 449.166 +-      *((uint32_t *) outptr)++ = *inptr++;				      \
 449.167 ++      *((uint32_t *) outptr) = *inptr++;				      \
 449.168 ++      outptr += sizeof (uint32_t);					      \
 449.169 +   }
 449.170 + #define LOOP_NEED_FLAGS
 449.171 + #include <iconv/loop.c>
 449.172 +@@ -838,7 +852,8 @@
 449.173 +       }									      \
 449.174 +     else								      \
 449.175 +       /* It's an one byte sequence.  */					      \
 449.176 +-      *outptr++ = *((const uint32_t *) inptr)++;			      \
 449.177 ++      *outptr++ = *((const uint32_t *) inptr);				      \
 449.178 ++      inptr += sizeof (uint32_t);					      \
 449.179 +   }
 449.180 + #define LOOP_NEED_FLAGS
 449.181 + #include <iconv/loop.c>
 449.182 +@@ -1032,7 +1047,8 @@
 449.183 +       }									      \
 449.184 + 									      \
 449.185 +     /* Now adjust the pointers and store the result.  */		      \
 449.186 +-    *((uint32_t *) outptr)++ = ch;					      \
 449.187 ++    *((uint32_t *) outptr) = ch;					      \
 449.188 ++    outptr += sizeof (uint32_t);					      \
 449.189 +   }
 449.190 + #define LOOP_NEED_FLAGS
 449.191 + 
 449.192 +@@ -1153,7 +1169,8 @@
 449.193 + 	STANDARD_FROM_LOOP_ERR_HANDLER (2);				      \
 449.194 +       }									      \
 449.195 + 									      \
 449.196 +-    *((uint32_t *) outptr)++ = u1;					      \
 449.197 ++    *((uint32_t *) outptr) = u1;					      \
 449.198 ++    outptr += sizeof (uint32_t);					      \
 449.199 +     inptr += 2;								      \
 449.200 +   }
 449.201 + #define LOOP_NEED_FLAGS
 449.202 +@@ -1201,7 +1218,8 @@
 449.203 +       }									      \
 449.204 +     else								      \
 449.205 +       {									      \
 449.206 +-	*((uint16_t *) outptr)++ = val;					      \
 449.207 ++	*((uint16_t *) outptr) = val;					      \
 449.208 ++        outptr += sizeof (uint16_t);					      \
 449.209 + 	inptr += 4;							      \
 449.210 +       }									      \
 449.211 +   }
 449.212 +@@ -1242,7 +1260,8 @@
 449.213 + 	continue;							      \
 449.214 +       }									      \
 449.215 + 									      \
 449.216 +-    *((uint32_t *) outptr)++ = u1;					      \
 449.217 ++    *((uint32_t *) outptr) = u1;					      \
 449.218 ++    outptr += sizeof (uint32_t);					      \
 449.219 +     inptr += 2;								      \
 449.220 +   }
 449.221 + #define LOOP_NEED_FLAGS
 449.222 +@@ -1291,7 +1310,8 @@
 449.223 +       }									      \
 449.224 +     else								      \
 449.225 +       {									      \
 449.226 +-	*((uint16_t *) outptr)++ = bswap_16 (val);			      \
 449.227 ++	*((uint16_t *) outptr) = bswap_16 (val);			      \
 449.228 ++	outptr += sizeof (uint16_t);					      \
 449.229 + 	inptr += 4;							      \
 449.230 +       }									      \
 449.231 +   }
   450.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   450.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-msort.patch	Sat Feb 24 11:00:05 2007 +0000
   450.3 @@ -0,0 +1,46 @@
   450.4 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/stdlib/msort.c.diff?r1=1.20&r2=1.21&cvsroot=glibc
   450.5 +
   450.6 +Fixes
   450.7 +
   450.8 +msort.c: In function `msort_with_tmp':
   450.9 +msort.c:59: error: invalid lvalue in increment
  450.10 +msort.c:59: error: invalid lvalue in increment
  450.11 +msort.c:64: error: invalid lvalue in increment
  450.12 +msort.c:64: error: invalid lvalue in increment
  450.13 +
  450.14 +when building with gcc-3.5.
  450.15 +
  450.16 +===================================================================
  450.17 +RCS file: /cvs/glibc/libc/stdlib/msort.c,v
  450.18 +retrieving revision 1.20
  450.19 +retrieving revision 1.21
  450.20 +diff -u -r1.20 -r1.21
  450.21 +--- libc/stdlib/msort.c	2002/09/24 04:20:57	1.20
  450.22 ++++ libc/stdlib/msort.c	2004/02/07 15:57:34	1.21
  450.23 +@@ -1,6 +1,6 @@
  450.24 + /* An alternative to qsort, with an identical interface.
  450.25 +    This file is part of the GNU C Library.
  450.26 +-   Copyright (C) 1992,95-97,99,2000,01,02 Free Software Foundation, Inc.
  450.27 ++   Copyright (C) 1992,95-97,99,2000,01,02,04 Free Software Foundation, Inc.
  450.28 +    Written by Mike Haertel, September 1988.
  450.29 + 
  450.30 +    The GNU C Library is free software; you can redistribute it and/or
  450.31 +@@ -56,12 +56,16 @@
  450.32 + 	if ((*cmp) (b1, b2) <= 0)
  450.33 + 	  {
  450.34 + 	    --n1;
  450.35 +-	    *((op_t *) tmp)++ = *((op_t *) b1)++;
  450.36 ++	    *((op_t *) tmp) = *((op_t *) b1);
  450.37 ++	    tmp += sizeof (op_t);
  450.38 ++	    b1 += sizeof (op_t);
  450.39 + 	  }
  450.40 + 	else
  450.41 + 	  {
  450.42 + 	    --n2;
  450.43 +-	    *((op_t *) tmp)++ = *((op_t *) b2)++;
  450.44 ++	    *((op_t *) tmp) = *((op_t *) b2);
  450.45 ++	    tmp += sizeof (op_t);
  450.46 ++	    b2 += sizeof (op_t);
  450.47 + 	  }
  450.48 +       }
  450.49 +   else
   451.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   451.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-sunrpc.patch	Sat Feb 24 11:00:05 2007 +0000
   451.3 @@ -0,0 +1,233 @@
   451.4 +http://sources.redhat.com/ml/libc-hacker/2004-02/msg00005.html
   451.5 +[Also in CVS, but the original patch is easier to get.]
   451.6 +
   451.7 +Fixes errors like
   451.8 +
   451.9 +clnt_perr.c: In function `_buf':
  451.10 +clnt_perr.c:67: error: invalid lvalue in assignment
  451.11 +
  451.12 +when building with gcc-3.5.
  451.13 +
  451.14 +To: libc-hacker at sources dot redhat dot com
  451.15 +Subject: Fix cast as lvalue in sunrpc
  451.16 +From: Andreas Schwab <schwab at suse dot de>
  451.17 +X-Yow: SHHHH!!  I hear SIX TATTOOED TRUCK-DRIVERS tossing ENGINE BLOCKS
  451.18 + into empty OIL DRUMS dot  dot 
  451.19 +Date: Sun, 08 Feb 2004 17:38:31 +0100
  451.20 +Message-ID: <je4qu1frw8.fsf@sykes.suse.de>
  451.21 +
  451.22 +This fixes the uses of casts as lvalue in the sunrpc code.
  451.23 +
  451.24 +Andreas.
  451.25 +
  451.26 +2004-02-08  Andreas Schwab  <schwab@suse.de>
  451.27 +
  451.28 +	* include/rpc/rpc.h: Declare thread variables with their correct
  451.29 +	type.
  451.30 +	* sunrpc/clnt_perr.c: Don't cast thread variables.
  451.31 +	* sunrpc/clnt_raw.c: Likewise.
  451.32 +	* sunrpc/clnt_simp.c: Likewise.
  451.33 +	* sunrpc/key_call.c: Likewise.
  451.34 +	* sunrpc/svcauth_des.c: Likewise.
  451.35 +	* sunrpc/svc.c: Likewise.
  451.36 +	* sunrpc/svc_raw.c: Likewise.
  451.37 +	* sunrpc/svc_simple.c: Likewise.
  451.38 +
  451.39 +Index: include/rpc/rpc.h
  451.40 +===================================================================
  451.41 +RCS file: /cvs/glibc/libc/include/rpc/rpc.h,v
  451.42 +retrieving revision 1.8
  451.43 +diff -u -p -a -r1.8 rpc.h
  451.44 +--- glibc/include/rpc/rpc.h	5 Aug 2002 22:10:59 -0000	1.8
  451.45 ++++ glibc/include/rpc/rpc.h	8 Feb 2004 14:19:14 -0000
  451.46 +@@ -17,24 +17,24 @@ struct rpc_thread_variables {
  451.47 + 	struct pollfd	*svc_pollfd_s;		/* Global, rpc_common.c */
  451.48 + 	int		svc_max_pollfd_s;	/* Global, rpc_common.c */
  451.49 + 
  451.50 +-	void		*clnt_perr_buf_s;	/* clnt_perr.c */
  451.51 ++	char		*clnt_perr_buf_s;	/* clnt_perr.c */
  451.52 + 
  451.53 +-	void		*clntraw_private_s;	/* clnt_raw.c */
  451.54 ++	struct clntraw_private_s *clntraw_private_s;	/* clnt_raw.c */
  451.55 + 
  451.56 +-	void		*callrpc_private_s;	/* clnt_simp.c */
  451.57 ++	struct callrpc_private_s *callrpc_private_s;	/* clnt_simp.c */
  451.58 + 
  451.59 +-	void		*key_call_private_s;	/* key_call.c */
  451.60 ++	struct key_call_private *key_call_private_s;	/* key_call.c */
  451.61 + 
  451.62 +-	void		*authdes_cache_s;	/* svcauth_des.c */
  451.63 +-	void		*authdes_lru_s;		/* svcauth_des.c */
  451.64 ++	struct cache_entry *authdes_cache_s;	/* svcauth_des.c */
  451.65 ++	int		*authdes_lru_s;		/* svcauth_des.c */
  451.66 + 
  451.67 +-	void		*svc_xports_s;		/* svc.c */
  451.68 +-	void		*svc_head_s;		/* svc.c */
  451.69 ++	SVCXPRT		**svc_xports_s;		/* svc.c */
  451.70 ++	struct svc_callout *svc_head_s;		/* svc.c */
  451.71 + 
  451.72 +-	void		*svcraw_private_s;	/* svc_raw.c */
  451.73 ++	struct svcraw_private_s *svcraw_private_s;	/* svc_raw.c */
  451.74 + 
  451.75 +-	void		*svcsimple_proglst_s;	/* svc_simple.c */
  451.76 +-	void		*svcsimple_transp_s;	/* svc_simple.c */
  451.77 ++	struct proglst_ *svcsimple_proglst_s;	/* svc_simple.c */
  451.78 ++	SVCXPRT		*svcsimple_transp_s;	/* svc_simple.c */
  451.79 + };
  451.80 + 
  451.81 + extern struct rpc_thread_variables *__rpc_thread_variables(void)
  451.82 +Index: sunrpc/clnt_perr.c
  451.83 +===================================================================
  451.84 +RCS file: /cvs/glibc/libc/sunrpc/clnt_perr.c,v
  451.85 +retrieving revision 1.19
  451.86 +diff -u -p -a -r1.19 clnt_perr.c
  451.87 +--- glibc/sunrpc/clnt_perr.c	1 Nov 2002 20:43:54 -0000	1.19
  451.88 ++++ glibc/sunrpc/clnt_perr.c	8 Feb 2004 14:19:14 -0000
  451.89 +@@ -55,7 +55,7 @@ static char *auth_errmsg (enum auth_stat
  451.90 +  * buf variable in a few functions.  Overriding a global variable
  451.91 +  * with a local variable of the same name is a bad idea, anyway.
  451.92 +  */
  451.93 +-#define buf ((char *)RPC_THREAD_VARIABLE(clnt_perr_buf_s))
  451.94 ++#define buf RPC_THREAD_VARIABLE(clnt_perr_buf_s)
  451.95 + #else
  451.96 + static char *buf;
  451.97 + #endif
  451.98 +Index: sunrpc/clnt_raw.c
  451.99 +===================================================================
 451.100 +RCS file: /cvs/glibc/libc/sunrpc/clnt_raw.c,v
 451.101 +retrieving revision 1.10
 451.102 +diff -u -p -a -r1.10 clnt_raw.c
 451.103 +--- glibc/sunrpc/clnt_raw.c	15 May 2002 00:21:00 -0000	1.10
 451.104 ++++ glibc/sunrpc/clnt_raw.c	8 Feb 2004 14:19:14 -0000
 451.105 +@@ -61,7 +61,7 @@ struct clntraw_private_s
 451.106 +     u_int mcnt;
 451.107 +   };
 451.108 + #ifdef _RPC_THREAD_SAFE_
 451.109 +-#define clntraw_private ((struct clntraw_private_s *)RPC_THREAD_VARIABLE(clntraw_private_s))
 451.110 ++#define clntraw_private RPC_THREAD_VARIABLE(clntraw_private_s)
 451.111 + #else
 451.112 + static struct clntraw_private_s *clntraw_private;
 451.113 + #endif
 451.114 +Index: sunrpc/clnt_simp.c
 451.115 +===================================================================
 451.116 +RCS file: /cvs/glibc/libc/sunrpc/clnt_simp.c,v
 451.117 +retrieving revision 1.14
 451.118 +diff -u -p -a -r1.14 clnt_simp.c
 451.119 +--- glibc/sunrpc/clnt_simp.c	15 May 2002 00:21:00 -0000	1.14
 451.120 ++++ glibc/sunrpc/clnt_simp.c	8 Feb 2004 14:19:14 -0000
 451.121 +@@ -55,7 +55,7 @@ struct callrpc_private_s
 451.122 +     char *oldhost;
 451.123 +   };
 451.124 + #ifdef _RPC_THREAD_SAFE_
 451.125 +-#define callrpc_private ((struct callrpc_private_s *)RPC_THREAD_VARIABLE(callrpc_private_s))
 451.126 ++#define callrpc_private RPC_THREAD_VARIABLE(callrpc_private_s)
 451.127 + #else
 451.128 + static struct callrpc_private_s *callrpc_private;
 451.129 + #endif
 451.130 +Index: sunrpc/key_call.c
 451.131 +===================================================================
 451.132 +RCS file: /cvs/glibc/libc/sunrpc/key_call.c,v
 451.133 +retrieving revision 1.16
 451.134 +diff -u -p -a -r1.16 key_call.c
 451.135 +--- glibc/sunrpc/key_call.c	6 Aug 2002 06:08:50 -0000	1.16
 451.136 ++++ glibc/sunrpc/key_call.c	8 Feb 2004 14:19:14 -0000
 451.137 +@@ -370,7 +370,7 @@ struct  key_call_private {
 451.138 +   uid_t   uid;            /* user-id at last authorization */
 451.139 + };
 451.140 + #ifdef _RPC_THREAD_SAFE_
 451.141 +-#define key_call_private_main ((struct  key_call_private *)RPC_THREAD_VARIABLE(key_call_private_s))
 451.142 ++#define key_call_private_main RPC_THREAD_VARIABLE(key_call_private_s)
 451.143 + #else
 451.144 + static struct key_call_private *key_call_private_main;
 451.145 + #endif
 451.146 +Index: sunrpc/svc.c
 451.147 +===================================================================
 451.148 +RCS file: /cvs/glibc/libc/sunrpc/svc.c,v
 451.149 +retrieving revision 1.17
 451.150 +diff -u -p -a -r1.17 svc.c
 451.151 +--- glibc/sunrpc/svc.c	29 Aug 2003 07:45:18 -0000	1.17
 451.152 ++++ glibc/sunrpc/svc.c	8 Feb 2004 14:19:14 -0000
 451.153 +@@ -44,7 +44,7 @@
 451.154 + #include <sys/poll.h>
 451.155 + 
 451.156 + #ifdef _RPC_THREAD_SAFE_
 451.157 +-#define xports ((SVCXPRT **)RPC_THREAD_VARIABLE(svc_xports_s))
 451.158 ++#define xports RPC_THREAD_VARIABLE(svc_xports_s)
 451.159 + #else
 451.160 + static SVCXPRT **xports;
 451.161 + #endif
 451.162 +@@ -63,7 +63,7 @@ struct svc_callout {
 451.163 +   void (*sc_dispatch) (struct svc_req *, SVCXPRT *);
 451.164 + };
 451.165 + #ifdef _RPC_THREAD_SAFE_
 451.166 +-#define svc_head ((struct svc_callout *)RPC_THREAD_VARIABLE(svc_head_s))
 451.167 ++#define svc_head RPC_THREAD_VARIABLE(svc_head_s)
 451.168 + #else
 451.169 + static struct svc_callout *svc_head;
 451.170 + #endif
 451.171 +Index: sunrpc/svc_raw.c
 451.172 +===================================================================
 451.173 +RCS file: /cvs/glibc/libc/sunrpc/svc_raw.c,v
 451.174 +retrieving revision 1.5
 451.175 +diff -u -p -a -r1.5 svc_raw.c
 451.176 +--- glibc/sunrpc/svc_raw.c	26 Feb 2002 01:43:56 -0000	1.5
 451.177 ++++ glibc/sunrpc/svc_raw.c	8 Feb 2004 14:19:14 -0000
 451.178 +@@ -54,7 +54,7 @@ struct svcraw_private_s
 451.179 +     char verf_body[MAX_AUTH_BYTES];
 451.180 +   };
 451.181 + #ifdef _RPC_THREAD_SAFE_
 451.182 +-#define svcraw_private ((struct svcraw_private_s *)RPC_THREAD_VARIABLE(svcraw_private_s))
 451.183 ++#define svcraw_private RPC_THREAD_VARIABLE(svcraw_private_s)
 451.184 + #else
 451.185 + static struct svcraw_private_s *svcraw_private;
 451.186 + #endif
 451.187 +Index: sunrpc/svc_simple.c
 451.188 +===================================================================
 451.189 +RCS file: /cvs/glibc/libc/sunrpc/svc_simple.c,v
 451.190 +retrieving revision 1.16
 451.191 +diff -u -p -a -r1.16 svc_simple.c
 451.192 +--- glibc/sunrpc/svc_simple.c	6 Aug 2002 05:10:30 -0000	1.16
 451.193 ++++ glibc/sunrpc/svc_simple.c	8 Feb 2004 14:19:14 -0000
 451.194 +@@ -61,7 +61,7 @@ struct proglst_
 451.195 +     struct proglst_ *p_nxt;
 451.196 +   };
 451.197 + #ifdef _RPC_THREAD_SAFE_
 451.198 +-#define proglst ((struct proglst_ *)RPC_THREAD_VARIABLE(svcsimple_proglst_s))
 451.199 ++#define proglst RPC_THREAD_VARIABLE(svcsimple_proglst_s)
 451.200 + #else
 451.201 + static struct proglst_ *proglst;
 451.202 + #endif
 451.203 +@@ -69,7 +69,7 @@ static struct proglst_ *proglst;
 451.204 + 
 451.205 + static void universal (struct svc_req *rqstp, SVCXPRT *transp_s);
 451.206 + #ifdef _RPC_THREAD_SAFE_
 451.207 +-#define transp ((SVCXPRT *)RPC_THREAD_VARIABLE(svcsimple_transp_s))
 451.208 ++#define transp RPC_THREAD_VARIABLE(svcsimple_transp_s)
 451.209 + #else
 451.210 + static SVCXPRT *transp;
 451.211 + #endif
 451.212 +Index: sunrpc/svcauth_des.c
 451.213 +===================================================================
 451.214 +RCS file: /cvs/glibc/libc/sunrpc/svcauth_des.c,v
 451.215 +retrieving revision 1.8
 451.216 +diff -u -p -a -r1.8 svcauth_des.c
 451.217 +--- glibc/sunrpc/svcauth_des.c	20 Aug 2001 06:37:09 -0000	1.8
 451.218 ++++ glibc/sunrpc/svcauth_des.c	8 Feb 2004 14:19:14 -0000
 451.219 +@@ -72,8 +72,8 @@ struct cache_entry
 451.220 +     char *localcred;		/* generic local credential */
 451.221 +   };
 451.222 + #ifdef _RPC_THREAD_SAFE_
 451.223 +-#define authdes_cache ((struct cache_entry *)RPC_THREAD_VARIABLE(authdes_cache_s))
 451.224 +-#define authdes_lru ((int *)RPC_THREAD_VARIABLE(authdes_lru_s))
 451.225 ++#define authdes_cache RPC_THREAD_VARIABLE(authdes_cache_s)
 451.226 ++#define authdes_lru RPC_THREAD_VARIABLE(authdes_lru_s)
 451.227 + #else
 451.228 + static struct cache_entry *authdes_cache;
 451.229 + static int *authdes_lru;
 451.230 +
 451.231 +-- 
 451.232 +Andreas Schwab, SuSE Labs, schwab@suse.de
 451.233 +SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
 451.234 +Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
 451.235 +"And now for something completely different."
 451.236 +
   452.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   452.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-allow-gcc-3.5-xdr.patch	Sat Feb 24 11:00:05 2007 +0000
   452.3 @@ -0,0 +1,44 @@
   452.4 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sunrpc/rpc/xdr.h.diff?r1=1.27&r2=1.28&cvsroot=glibc
   452.5 +(but see also http://sources.redhat.com/ml/libc-alpha/2004-03/msg00267.html
   452.6 +and http://gcc.gnu.org/ml/gcc-patches/2004-03/msg02056.html)
   452.7 +
   452.8 +Fixes errors
   452.9 +
  452.10 +rpc_cmsg.c: In function `xdr_callmsg':
  452.11 +rpc_cmsg.c:70: error: invalid lvalue in increment
  452.12 +rpc_cmsg.c:71: error: invalid lvalue in increment
  452.13 +rpc_cmsg.c:74: error: invalid lvalue in increment
  452.14 +rpc_cmsg.c:77: error: invalid lvalue in increment
  452.15 +rpc_cmsg.c:78: error: invalid lvalue in increment
  452.16 +rpc_cmsg.c:79: error: invalid lvalue in increment
  452.17 +rpc_cmsg.c:81: error: invalid lvalue in increment
  452.18 +rpc_cmsg.c:89: error: invalid lvalue in increment
  452.19 +rpc_cmsg.c:106: error: invalid lvalue in increment
  452.20 +rpc_cmsg.c:107: error: invalid lvalue in increment
  452.21 +rpc_cmsg.c:112: error: invalid lvalue in increment
  452.22 +rpc_cmsg.c:117: error: invalid lvalue in increment
  452.23 +rpc_cmsg.c:118: error: invalid lvalue in increment
  452.24 +rpc_cmsg.c:119: error: invalid lvalue in increment
  452.25 +rpc_cmsg.c:121: error: invalid lvalue in increment
  452.26 +rpc_cmsg.c:160: error: invalid lvalue in increment
  452.27 +
  452.28 +===================================================================
  452.29 +RCS file: /cvs/glibc/libc/sunrpc/rpc/xdr.h,v
  452.30 +retrieving revision 1.27
  452.31 +retrieving revision 1.28
  452.32 +diff -u -r1.27 -r1.28
  452.33 +--- libc/sunrpc/rpc/xdr.h	2002/12/16 02:05:49	1.27
  452.34 ++++ libc/sunrpc/rpc/xdr.h	2004/03/22 10:52:33	1.28
  452.35 +@@ -262,10 +262,8 @@
  452.36 +  * and shouldn't be used any longer. Code which use this defines or longs
  452.37 +  * in the RPC code will not work on 64bit Solaris platforms !
  452.38 +  */
  452.39 +-#define IXDR_GET_LONG(buf) \
  452.40 +-	((long)ntohl((u_long)*__extension__((u_int32_t*)(buf))++))
  452.41 +-#define IXDR_PUT_LONG(buf, v) \
  452.42 +-	(*__extension__((u_int32_t*)(buf))++ = (long)htonl((u_long)(v)))
  452.43 ++#define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf))
  452.44 ++#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v)))
  452.45 + #define IXDR_GET_U_LONG(buf)	      ((u_long)IXDR_GET_LONG(buf))
  452.46 + #define IXDR_PUT_U_LONG(buf, v)	      IXDR_PUT_LONG(buf, (long)(v))
  452.47 + 
   453.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   453.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-alpha-pwrite64.patch	Sat Feb 24 11:00:05 2007 +0000
   453.3 @@ -0,0 +1,54 @@
   453.4 +Fix for this error:
   453.5 +
   453.6 +crosstool-0.28-rc19/build/alpha-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/libc_pic.os(.text+0xd9b2c): In function `posix_fallocate64':
   453.7 +: undefined reference to `__GI___pwrite64'
   453.8 +collect2: ld returned 1 exit status
   453.9 +make[1]: *** [crosstool-0.28-rc19/build/alpha-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/libc.so] Error 1
  453.10 +make[1]: Leaving directory `crosstool-0.28-rc19/build/alpha-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2'
  453.11 +make: *** [all] Error 2
  453.12 +
  453.13 +extracted from GLIBC CVS by Dan Kegel
  453.14 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.diff?r1=1.14&r2=1.15&cvsroot=glibc'
  453.15 +(to match context of...)
  453.16 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.diff?r1=1.16&r2=1.17&cvsroot=glibc'
  453.17 +and rediffed.
  453.18 +
  453.19 +cf. 
  453.20 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00038.html
  453.21 +
  453.22 +Originally thought we needed this hunk, too:
  453.23 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00037.html
  453.24 +but it seems the sysdep.h change is sufficient, and works better 
  453.25 +when compiling against linux-2.4.
  453.26 +
  453.27 +===================================================================
  453.28 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h.old	2004-05-24 22:21:44.000000000 -0700
  453.29 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/sysdep.h	2004-05-24 22:22:48.000000000 -0700
  453.30 +@@ -1,4 +1,4 @@
  453.31 +-/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003
  453.32 ++/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004
  453.33 +    Free Software Foundation, Inc.
  453.34 +    This file is part of the GNU C Library.
  453.35 +    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
  453.36 +@@ -60,6 +60,21 @@
  453.37 + #define __NR_osf_getsysinfo	256
  453.38 + #define __NR_osf_setsysinfo	257
  453.39 + 
  453.40 ++/* Help old kernel headers where particular syscalls are not available.  */
  453.41 ++#ifndef __NR_semtimedop
  453.42 ++# define __NR_semtimedop	423
  453.43 ++#endif
  453.44 ++
  453.45 ++/* This is a kludge to make syscalls.list find these under the names
  453.46 ++   pread and pwrite, since some kernel headers define those names
  453.47 ++   and some define the *64 names for the same system calls.  */
  453.48 ++#if !defined __NR_pread && defined __NR_pread64
  453.49 ++# define __NR_pread __NR_pread64
  453.50 ++#endif
  453.51 ++#if !defined __NR_pwrite && defined __NR_pwrite64
  453.52 ++# define __NR_pwrite __NR_pwrite64
  453.53 ++#endif
  453.54 ++
  453.55 + /*
  453.56 +  * In order to get the hidden arguments for rt_sigaction set up
  453.57 +  * properly, we need to call the assembly version.  Detect this in the
   454.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   454.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-arm-fix-strlen.patch	Sat Feb 24 11:00:05 2007 +0000
   454.3 @@ -0,0 +1,54 @@
   454.4 +See also
   454.5 +http://lists.gnu.org/archive/html/bug-glibc/2002-12/msg00056.html
   454.6 +http://lists.arm.linux.org.uk/pipermail/linux-arm-toolchain/2004-June/000016.html
   454.7 +
   454.8 +2002-12-12  Andreas Schwab  <schwab@suse.de>
   454.9 +        * sysdeps/arm/strlen.S: Fix last word check for big endian.
  454.10 +
  454.11 +To: libc-alpha at sources dot redhat dot com
  454.12 +Subject: [PATCH] REPOST: ARM big-endian strlen() fix
  454.13 +References: <m3brjy27mo.fsf@defiant.pm.waw.pl>
  454.14 +From: Krzysztof Halasa <khc at pm dot waw dot pl>
  454.15 +Date: Thu, 10 Jun 2004 13:41:44 +0200
  454.16 +Message-ID: <m3r7sn8wsn.fsf@defiant.pm.waw.pl>
  454.17 +MIME-Version: 1.0
  454.18 +Content-Type: multipart/mixed; boundary="=-=-="
  454.19 +
  454.20 +--=-=-=
  454.21 +
  454.22 +The attached patch fixes strlen() on big-endian ARM. Please apply.
  454.23 +Thanks.
  454.24 +-- 
  454.25 +Krzysztof Halasa, B*FH
  454.26 +
  454.27 +--=-=-=
  454.28 +Content-Type: text/x-patch
  454.29 +Content-Disposition: inline; filename=glibc-strlen.patch
  454.30 +
  454.31 +--- glibc-2.3.3.old/sysdeps/arm/strlen.S	2003-04-30 00:47:20.000000000 +0200
  454.32 ++++ glibc-2.3.3/sysdeps/arm/strlen.S	2004-06-06 03:21:48.351931240 +0200
  454.33 +@@ -53,12 +53,21 @@
  454.34 + 	ldrne   r2, [r1], $4            @ and we continue to the next word
  454.35 + 	bne     Laligned                @
  454.36 + Llastword:				@ drop through to here once we find a
  454.37 ++#ifdef __ARMEB__
  454.38 ++	tst     r2, $0xff000000         @ word that has a zero byte in it
  454.39 ++	addne   r0, r0, $1              @
  454.40 ++	tstne   r2, $0x00ff0000         @ and add up to 3 bytes on to it
  454.41 ++	addne   r0, r0, $1              @
  454.42 ++	tstne   r2, $0x0000ff00         @ (if first three all non-zero, 4th
  454.43 ++	addne   r0, r0, $1              @  must be zero)
  454.44 ++#else
  454.45 + 	tst     r2, $0x000000ff         @ word that has a zero byte in it
  454.46 + 	addne   r0, r0, $1              @
  454.47 + 	tstne   r2, $0x0000ff00         @ and add up to 3 bytes on to it
  454.48 + 	addne   r0, r0, $1              @
  454.49 + 	tstne   r2, $0x00ff0000         @ (if first three all non-zero, 4th
  454.50 + 	addne   r0, r0, $1              @  must be zero)
  454.51 ++#endif
  454.52 + 	RETINSTR(mov,pc,lr)
  454.53 + END(strlen)
  454.54 + libc_hidden_builtin_def (strlen)
  454.55 +
  454.56 +--=-=-=--
  454.57 +
   455.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   455.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-cross-2.patch	Sat Feb 24 11:00:05 2007 +0000
   455.3 @@ -0,0 +1,18 @@
   455.4 +When configuring canadian cross toolchain and you're unlucky enough to be
   455.5 +using a build and host that are different, but that config.sub thinks mean the same thing,
   455.6 +you might end up without BUILD_CC being defined as 'cc' or 'gcc',
   455.7 +which might cause $CC to be used instead, which would be wrong...
   455.8 +
   455.9 +Dan Kegel
  455.10 +
  455.11 +--- glibc-2.3.2/configure.old	2004-05-26 19:46:43.000000000 -0700
  455.12 ++++ glibc-2.3.2/configure	2004-05-26 19:52:47.000000000 -0700
  455.13 +@@ -3323,7 +3323,7 @@
  455.14 + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  455.15 + ac_compiler_gnu=$ac_cv_c_compiler_gnu
  455.16 + 
  455.17 +-if test $host != $build; then
  455.18 ++if test "$cross_compiling" = yes; then
  455.19 +   for ac_prog in gcc cc
  455.20 + do
  455.21 +   # Extract the first word of "$ac_prog", so it can be a program name with args.
   456.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   456.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-cross.patch	Sat Feb 24 11:00:05 2007 +0000
   456.3 @@ -0,0 +1,27 @@
   456.4 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/resolv/Makefile.diff?r1=1.41&r2=1.42&cvsroot=glibc
   456.5 +
   456.6 +Fixes 
   456.7 +/bin/sh: /crosstool-0.15/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/elf/ld.so.1: cannot execute binary file
   456.8 +make[2]: *** [/crosstool-0.15/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/resolv/tst-leaks.out] Error 126
   456.9 +
  456.10 +2003-03-01  Andreas Schwab  <schwab@suse.de>
  456.11 +
  456.12 +	* resolv/Makefile (tests): Don't depend on
  456.13 +	$(objpfx)mtrace-tst-leaks when cross compiling.
  456.14 +
  456.15 +===================================================================
  456.16 +RCS file: /cvs/glibc/libc/resolv/Makefile,v
  456.17 +retrieving revision 1.41
  456.18 +retrieving revision 1.42
  456.19 +diff -u -r1.41 -r1.42
  456.20 +--- libc/resolv/Makefile	2003/02/23 03:35:39	1.41
  456.21 ++++ libc/resolv/Makefile	2003/03/01 22:15:00	1.42
  456.22 +@@ -93,6 +93,8 @@
  456.23 + tst-leaks-ENV = MALLOC_TRACE=$(objpfx)tst-leaks.mtrace
  456.24 + $(objpfx)mtrace-tst-leaks: $(objpfx)tst-leaks.out
  456.25 + 	$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks.mtrace > $@
  456.26 ++ifeq (no,$(cross-compiling))
  456.27 + ifneq (no,$(PERL))
  456.28 + tests: $(objpfx)mtrace-tst-leaks
  456.29 + endif
  456.30 ++endif
   457.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   457.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-cygwin.patch	Sat Feb 24 11:00:05 2007 +0000
   457.3 @@ -0,0 +1,90 @@
   457.4 +Fixes
   457.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
   457.6 +...
   457.7 +when building glibc-2.3.2 on cygwin
   457.8 +
   457.9 +Idea from
  457.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
  457.11 +Basically, make glibc use .oST as suffix for 'object static'
  457.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
  457.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
  457.14 +
  457.15 +glibc-linuxthreads-2.3.2 also requires a patch, see 
  457.16 +../glibc-linuxthreads-2.3.2/glibc-linuxthreads-2.3.2-cygwin.patch
  457.17 +
  457.18 +
  457.19 +--- glibc-2.3.2/Makeconfig.orig	2003-01-05 21:31:36.000000000 -0800
  457.20 ++++ glibc-2.3.2/Makeconfig	2004-03-13 23:42:03.781250000 -0800
  457.21 +@@ -433,13 +433,13 @@
  457.22 + # run the linked programs.
  457.23 + link-libc = -Wl,-rpath-link=$(rpath-link) \
  457.24 + 	    $(common-objpfx)libc.so$(libc.so-version) \
  457.25 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
  457.26 ++	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
  457.27 + # This is how to find at build-time things that will be installed there.
  457.28 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
  457.29 + else
  457.30 + ifneq (,$(filter aix aix%,$(config-os)))
  457.31 + link-libc = $(common-objpfx)libc.a \
  457.32 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
  457.33 ++	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
  457.34 + rpath-dirs = math dlfcn nss nis rt resolv crypt
  457.35 + endif
  457.36 + endif
  457.37 +@@ -652,7 +652,7 @@
  457.38 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
  457.39 + # to pass different flags for each flavor.
  457.40 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
  457.41 +-all-object-suffixes := .o .os .op .og .ob .oS
  457.42 ++all-object-suffixes := .o .os .op .og .ob .oST
  457.43 + object-suffixes :=
  457.44 + CPPFLAGS-.o = $(pic-default)
  457.45 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
  457.46 +@@ -706,14 +706,14 @@
  457.47 + 
  457.48 + ifeq (yes,$(build-shared))
  457.49 + # Build special library that contains the static-only routines for libc.
  457.50 +-object-suffixes-for-libc += .oS
  457.51 ++object-suffixes-for-libc += .oST
  457.52 + 
  457.53 + # Must build the routines as PIC, though, because they can end up in (users')
  457.54 + # shared objects.  We don't want to use CFLAGS-os because users may, for
  457.55 + # example, make that processor-specific.
  457.56 +-CFLAGS-.oS = $(CFLAGS-.o) $(pic-ccflag)
  457.57 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
  457.58 +-libtype.oS = lib%_nonshared.a
  457.59 ++CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag)
  457.60 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
  457.61 ++libtype.oST = lib%_nonshared.a
  457.62 + endif
  457.63 + 
  457.64 + 
  457.65 +--- glibc-2.3.2/Makerules.orig	2003-02-22 15:23:31.000000000 -0800
  457.66 ++++ glibc-2.3.2/Makerules	2004-03-13 23:43:40.984375000 -0800
  457.67 +@@ -446,7 +446,7 @@
  457.68 + # Bounded pointer thunks are only built for *.ob
  457.69 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
  457.70 + 
  457.71 +-elide-routines.oS += $(filter-out $(static-only-routines),\
  457.72 ++elide-routines.oST += $(filter-out $(static-only-routines),\
  457.73 + 				  $(routines) $(aux) $(sysdep_routines)) \
  457.74 + 		     $(elide-bp-thunks)
  457.75 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
  457.76 +@@ -958,7 +958,7 @@
  457.77 + install: $(inst_libdir)/libc.so
  457.78 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
  457.79 + 			$(common-objpfx)libc.so$(libc.so-version) \
  457.80 +-			$(inst_libdir)/$(patsubst %,$(libtype.oS),\
  457.81 ++			$(inst_libdir)/$(patsubst %,$(libtype.oST),\
  457.82 + 						  $(libprefix)$(libc-name)) \
  457.83 + 			$(+force)
  457.84 + 	(echo '/* GNU ld script';\
  457.85 +@@ -966,7 +966,7 @@
  457.86 + 	 echo '   the static library, so try that secondarily.  */';\
  457.87 + 	 cat $<; \
  457.88 + 	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
  457.89 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
  457.90 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
  457.91 + 	      ')' \
  457.92 + 	) > $@.new
  457.93 + 	mv -f $@.new $@
   458.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   458.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-mips-user.patch	Sat Feb 24 11:00:05 2007 +0000
   458.3 @@ -0,0 +1,588 @@
   458.4 +Retrieved from
   458.5 +http://sources.redhat.com/cgi-bin/get-raw-msg?listname=libc-alpha&date=2003-04&msgid=orfzoof4j0.fsf%40free.redhat.lsd.ic.unicamp.br
   458.6 +paths adjusted, and rediffed against glibc-2.3.2
   458.7 +(i.e. to compensate for fact that
   458.8 +http://sources.redhat.com/ml/glibc-cvs/2003-q1/msg01155.html
   458.9 +is not present)
  458.10 +
  458.11 +Should fix
  458.12 +
  458.13 +In file included from ../sysdeps/unix/sysv/linux/mips/sys/procfs.h:29,
  458.14 +                 from ../linuxthreads_db/proc_service.h:20,
  458.15 +                 from ../linuxthreads_db/thread_dbP.h:7,
  458.16 +                 from ../linuxthreads/descr.h:43,
  458.17 +                 from ../linuxthreads/internals.h:29,
  458.18 +                 from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27,
  458.19 +                 from ../sysdeps/generic/ldsodefs.h:38,
  458.20 +                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
  458.21 +                 from ../sysdeps/mips/elf/ldsodefs.h:25,
  458.22 +                 from ../sysdeps/unix/sysv/linux/init-first.c:30:
  458.23 +../sysdeps/unix/sysv/linux/mips/sys/user.h:26:21: asm/reg.h: No such file or directory
  458.24 +In file included from ../sysdeps/unix/sysv/linux/mips/sys/procfs.h:29,
  458.25 +                 from ../linuxthreads_db/proc_service.h:20,
  458.26 +                 from ../linuxthreads_db/thread_dbP.h:7,
  458.27 +                 from ../linuxthreads/descr.h:43,
  458.28 +                 from ../linuxthreads/internals.h:29,
  458.29 +                 from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27,
  458.30 +                 from ../sysdeps/generic/ldsodefs.h:38,
  458.31 +                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
  458.32 +                 from ../sysdeps/mips/elf/ldsodefs.h:25,
  458.33 +                 from ../sysdeps/unix/sysv/linux/init-first.c:30:
  458.34 +../sysdeps/unix/sysv/linux/mips/sys/user.h:30: error: `EF_SIZE' undeclared here (not in a function)
  458.35 +make[2]: *** [mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/csu/init-first.o] Error 1
  458.36 +make[2]: Leaving directory `mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/csu'
  458.37 +make[1]: *** [csu/subdir_lib] Error 2
  458.38 +make[1]: Leaving directory `mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2'
  458.39 +make: *** [all] Error 2
  458.40 +
  458.41 +From libc-alpha-return-12105-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Sat Apr 12 09:28:56 2003
  458.42 +Return-Path: <libc-alpha-return-12105-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
  458.43 +Delivered-To: listarch-libc-alpha at sources dot redhat dot com
  458.44 +Received: (qmail 2802 invoked by alias); 12 Apr 2003 09:28:56 -0000
  458.45 +Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
  458.46 +Precedence: bulk
  458.47 +List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
  458.48 +List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
  458.49 +List-Post: <mailto:libc-alpha at sources dot redhat dot com>
  458.50 +List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
  458.51 +Sender: libc-alpha-owner at sources dot redhat dot com
  458.52 +Delivered-To: mailing list libc-alpha at sources dot redhat dot com
  458.53 +Received: (qmail 2795 invoked from network); 12 Apr 2003 09:28:55 -0000
  458.54 +Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200)
  458.55 +  by sources dot redhat dot com with SMTP; 12 Apr 2003 09:28:55 -0000
  458.56 +Received: from free.redhat.lsd.ic.unicamp.br (aoliva.cipe.redhat.com [10.0.1.10])
  458.57 +	by lacrosse dot corp dot redhat dot com (8 dot 11 dot 6/8 dot 9 dot 3) with ESMTP id h3C9SqV01131
  458.58 +	for <libc-alpha at sources dot redhat dot com>; Sat, 12 Apr 2003 05:28:52 -0400
  458.59 +Received: from free.redhat.lsd.ic.unicamp.br (free.redhat.lsd.ic.unicamp.br [127.0.0.1])
  458.60 +	by free dot redhat dot lsd dot ic dot unicamp dot br (8 dot 12 dot 8/8 dot 12 dot 8) with ESMTP id h3C9SpVT028734
  458.61 +	for <libc-alpha at sources dot redhat dot com>; Sat, 12 Apr 2003 06:28:51 -0300
  458.62 +Received: (from aoliva@localhost)
  458.63 +	by free dot redhat dot lsd dot ic dot unicamp dot br (8 dot 12 dot 8/8 dot 12 dot 8/Submit) id h3C9SpFb028730;
  458.64 +	Sat, 12 Apr 2003 06:28:51 -0300
  458.65 +To: libc-alpha at sources dot redhat dot com
  458.66 +Subject: signal-handling tweaks for mips/mips64
  458.67 +From: Alexandre Oliva <aoliva at redhat dot com>
  458.68 +Organization: GCC Team, Red Hat
  458.69 +Date: 12 Apr 2003 06:28:51 -0300
  458.70 +Message-ID: <orfzoof4j0.fsf@free.redhat.lsd.ic.unicamp.br>
  458.71 +Lines: 49
  458.72 +User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
  458.73 +MIME-Version: 1.0
  458.74 +Content-Type: multipart/mixed; boundary="=-=-="
  458.75 +
  458.76 +--=-=-=
  458.77 +
  458.78 +It was reported to me that ucontext is utterly broken, even in o32
  458.79 +with a stable 32-bit mips kernel.  Indeed, it doesn't match the
  458.80 +ucontext structure defined by the kernel at all.  This means that
  458.81 +programs taking real-time signals in o32 won't be able to extract
  458.82 +correct information from the mcontext_t, since the kernel puts data in
  458.83 +there that's in an entirely different format.
  458.84 +
  458.85 +I've looked for any ways in which the current data structures could
  458.86 +possibly be useful, and didn't find any.  gdb and rda thought they
  458.87 +were using the register arrays, but it turned out they were using the
  458.88 +arrays in procps instead.  makecontext(), [sg]etcontext() et al aren't
  458.89 +implemented on mips, so any uses thereof will just return ENOSYS,
  458.90 +without messing with the given data structure.  So, I believe it is
  458.91 +not too late for us to fix it such that it matches the kernel data
  458.92 +structures.
  458.93 +
  458.94 +While at that, I fixed a number of incompatibilities introduced by
  458.95 +either differences between kernel headers that we used to include,
  458.96 +whose contents are different depending on whether asm points to
  458.97 +asm-mips or asm-mips64.
  458.98 +
  458.99 +With this patch, after some pending kernel patches are checked in, one
 458.100 +will be able to obtain the correct information from signal handlers in
 458.101 +all mips ABIs.  With n64, this is already true.  With o32, it works
 458.102 +with the 32-bit mips kernel, but the mips64 kernel needs a patch to
 458.103 +implement the proper sigcontext ABI.  n32 still a patch to be
 458.104 +developed for it to be possible for ucontext to be POSIX-compliant.
 458.105 +Currently, the kernel uses the same ucontext for n32 and n64, but this
 458.106 +doesn't work in n32 because uc_link must be a pointer and stack_t must
 458.107 +contain a pointer and a size_t, whose sizes differ between n32 and
 458.108 +n64.  I believe Ralf is working on a patch for the kernel to generate
 458.109 +n32-compliant ucontext when invoking signal handlers in n32 processes.
 458.110 +The only uncertainty is whether uc_flags will be a 32- or 64-bit value
 458.111 +in n32; I left it as the latter, just because I already had that in
 458.112 +place; if it changes, a (simplifying) follow-up patch will be posted.
 458.113 +However, I wanted to circulate the idea of fixing ucontext_t for o32
 458.114 +as soon as possible, so I didn't wait for a decision on the exact n32
 458.115 +ABI.
 458.116 +
 458.117 +Ok to install?
 458.118 +
 458.119 +
 458.120 +--=-=-=
 458.121 +Content-Type: text/x-patch
 458.122 +Content-Disposition: inline; filename=mips-sigstuff.patch
 458.123 +
 458.124 +Index: ChangeLog
 458.125 +from  Alexandre Oliva  <aoliva@redhat.com>
 458.126 +
 458.127 +	* sysdeps/unix/sysv/linux/mips/profil-counter: New.
 458.128 +	* sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Port to n32/n64.
 458.129 +	* sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: New.
 458.130 +	* sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Port to n32/n64.
 458.131 +	(mcontext_t): Make it match the 32-bit mips kernel in o32.
 458.132 +	* sysdeps/unix/sysv/linux/mips/sys/user.h: Bring in constants from
 458.133 +	the mips and mips64 headers.
 458.134 +	(struct user): Port to n32/n64.
 458.135 +
 458.136 +Index: sysdeps/unix/sysv/linux/mips/profil-counter.h
 458.137 +===================================================================
 458.138 +RCS file: sysdeps/unix/sysv/linux/mips/profil-counter.h
 458.139 +diff -N sysdeps/unix/sysv/linux/mips/profil-counter.h
 458.140 +--- /dev/null	1 Jan 1970 00:00:00 -0000
 458.141 ++++ libc/sysdeps/unix/sysv/linux/mips/profil-counter.h 12 Apr 2003 09:13:13 -0000
 458.142 +@@ -0,0 +1,2 @@
 458.143 ++/* We can use the ix86 version.  */
 458.144 ++#include <sysdeps/unix/sysv/linux/i386/profil-counter.h>
 458.145 +Index: sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
 458.146 +===================================================================
 458.147 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h,v
 458.148 +retrieving revision 1.6
 458.149 +diff -u -p -r1.6 sigcontextinfo.h
 458.150 +--- libc/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h 6 Jul 2001 04:56:18 -0000 1.6
 458.151 ++++ libc/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h 12 Apr 2003 09:13:13 -0000
 458.152 +@@ -1,4 +1,4 @@
 458.153 +-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
 458.154 ++/* Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
 458.155 +    This file is part of the GNU C Library.
 458.156 +    Contributed by Andreas Jaeger <aj@suse.de>, 2000.
 458.157 + 
 458.158 +@@ -18,6 +18,8 @@
 458.159 +    02111-1307 USA.  */
 458.160 + 
 458.161 + 
 458.162 ++#if _MIPS_SIM == _MIPS_SIM_ABI32
 458.163 ++
 458.164 + #define SIGCONTEXT unsigned long _code, struct sigcontext *
 458.165 + #define SIGCONTEXT_EXTRA_ARGS _code,
 458.166 + #define GET_PC(ctx)	((void *) ctx->sc_pc)
 458.167 +@@ -25,3 +27,15 @@
 458.168 + #define GET_STACK(ctx)	((void *) ctx->sc_regs[29])
 458.169 + #define CALL_SIGHANDLER(handler, signo, ctx) \
 458.170 +   (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
 458.171 ++
 458.172 ++#else
 458.173 ++
 458.174 ++#define SIGCONTEXT unsigned long _code, ucontext_t *
 458.175 ++#define SIGCONTEXT_EXTRA_ARGS _code,
 458.176 ++#define GET_PC(ctx)	((void *) ctx->uc_mcontext.pc)
 458.177 ++#define GET_FRAME(ctx)	((void *) ctx->uc_mcontext.gregs[30])
 458.178 ++#define GET_STACK(ctx)	((void *) ctx->uc_mcontext.gregs[29])
 458.179 ++#define CALL_SIGHANDLER(handler, signo, ctx) \
 458.180 ++  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
 458.181 ++
 458.182 ++#endif
 458.183 +Index: sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
 458.184 +===================================================================
 458.185 +RCS file: sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
 458.186 +diff -N sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
 458.187 +--- /dev/null	1 Jan 1970 00:00:00 -0000
 458.188 ++++ libc/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h 12 Apr 2003 09:13:13 -0000
 458.189 +@@ -0,0 +1,103 @@
 458.190 ++/* Copyright (C) 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
 458.191 ++   This file is part of the GNU C Library.
 458.192 ++
 458.193 ++   The GNU C Library is free software; you can redistribute it and/or
 458.194 ++   modify it under the terms of the GNU Lesser General Public
 458.195 ++   License as published by the Free Software Foundation; either
 458.196 ++   version 2.1 of the License, or (at your option) any later version.
 458.197 ++
 458.198 ++   The GNU C Library is distributed in the hope that it will be useful,
 458.199 ++   but WITHOUT ANY WARRANTY; without even the implied warranty of
 458.200 ++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 458.201 ++   Lesser General Public License for more details.
 458.202 ++
 458.203 ++   You should have received a copy of the GNU Lesser General Public
 458.204 ++   License along with the GNU C Library; if not, write to the Free
 458.205 ++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 458.206 ++   02111-1307 USA.  */
 458.207 ++
 458.208 ++#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
 458.209 ++# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
 458.210 ++#endif
 458.211 ++
 458.212 ++#ifndef sigcontext_struct
 458.213 ++/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
 458.214 ++   we need sigcontext.  */
 458.215 ++# define sigcontext_struct sigcontext
 458.216 ++
 458.217 ++/* # include <asm/sigcontext.h> */
 458.218 ++/* Instead of including the kernel header, that will vary depending on
 458.219 ++   whether the 32- or the 64-bit kernel is installed, we paste the
 458.220 ++   contents here.  In case you're wondering about the different
 458.221 ++   licenses, the fact that the file is pasted, instead of included,
 458.222 ++   doesn't really make any difference for the program that includes
 458.223 ++   this header.  */
 458.224 ++#if _MIPS_SIM == _MIPS_SIM_ABI32
 458.225 ++/*
 458.226 ++ * This file is subject to the terms and conditions of the GNU General Public
 458.227 ++ * License.  See the file "COPYING" in the main directory of this archive
 458.228 ++ * for more details.
 458.229 ++ *
 458.230 ++ * Copyright (C) 1996, 1997, 2000 by Ralf Baechle
 458.231 ++ */
 458.232 ++#ifndef _ASM_SIGCONTEXT_H
 458.233 ++#define _ASM_SIGCONTEXT_H
 458.234 ++
 458.235 ++/*
 458.236 ++ * Keep this struct definition in sync with the sigcontext fragment
 458.237 ++ * in arch/mips/tools/offset.c
 458.238 ++ */
 458.239 ++struct sigcontext {
 458.240 ++	unsigned int       sc_regmask;		/* Unused */
 458.241 ++	unsigned int       sc_status;
 458.242 ++	unsigned long long sc_pc;
 458.243 ++	unsigned long long sc_regs[32];
 458.244 ++	unsigned long long sc_fpregs[32];
 458.245 ++	unsigned int       sc_ownedfp;		/* Unused */
 458.246 ++	unsigned int       sc_fpc_csr;
 458.247 ++	unsigned int       sc_fpc_eir;		/* Unused */
 458.248 ++	unsigned int       sc_used_math;
 458.249 ++	unsigned int       sc_ssflags;		/* Unused */
 458.250 ++	unsigned long long sc_mdhi;
 458.251 ++	unsigned long long sc_mdlo;
 458.252 ++
 458.253 ++	unsigned int       sc_cause;		/* Unused */
 458.254 ++	unsigned int       sc_badvaddr;		/* Unused */
 458.255 ++
 458.256 ++	unsigned long      sc_sigset[4];	/* kernel's sigset_t */
 458.257 ++};
 458.258 ++
 458.259 ++#endif /* _ASM_SIGCONTEXT_H */
 458.260 ++#else /* _MIPS_SIM != _MIPS_SIM_ABI32 */
 458.261 ++/*
 458.262 ++ * This file is subject to the terms and conditions of the GNU General Public
 458.263 ++ * License.  See the file "COPYING" in the main directory of this archive
 458.264 ++ * for more details.
 458.265 ++ *
 458.266 ++ * Copyright (C) 1996, 1997, 1999 by Ralf Baechle
 458.267 ++ * Copyright (C) 1999 Silicon Graphics, Inc.
 458.268 ++ */
 458.269 ++#ifndef _ASM_SIGCONTEXT_H
 458.270 ++#define _ASM_SIGCONTEXT_H
 458.271 ++
 458.272 ++/*
 458.273 ++ * Keep this struct definition in sync with the sigcontext fragment
 458.274 ++ * in arch/mips/tools/offset.c
 458.275 ++ */
 458.276 ++struct sigcontext {
 458.277 ++	unsigned long long sc_regs[32];
 458.278 ++	unsigned long long sc_fpregs[32];
 458.279 ++	unsigned long long sc_mdhi;
 458.280 ++	unsigned long long sc_mdlo;
 458.281 ++	unsigned long long sc_pc;
 458.282 ++	unsigned int       sc_status;
 458.283 ++	unsigned int       sc_fpc_csr;
 458.284 ++	unsigned int       sc_fpc_eir;
 458.285 ++	unsigned int       sc_used_math;
 458.286 ++	unsigned int       sc_cause;
 458.287 ++	unsigned int       sc_badvaddr;
 458.288 ++};
 458.289 ++
 458.290 ++#endif /* _ASM_SIGCONTEXT_H */
 458.291 ++#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */
 458.292 ++#endif
 458.293 +[hunk deleted, see below]
 458.294 +Index: sysdeps/unix/sysv/linux/mips/sys/user.h
 458.295 +===================================================================
 458.296 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/sys/user.h,v
 458.297 +retrieving revision 1.1
 458.298 +diff -u -p -r1.1 user.h
 458.299 +--- libc/sysdeps/unix/sysv/linux/mips/sys/user.h 8 Feb 2002 16:21:00 -0000 1.1
 458.300 ++++ libc/sysdeps/unix/sysv/linux/mips/sys/user.h 12 Apr 2003 09:13:13 -0000
 458.301 +@@ -1,4 +1,4 @@
 458.302 +-/* Copyright (C) 2002 Free Software Foundation, Inc.
 458.303 ++/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 458.304 +    This file is part of the GNU C Library.
 458.305 + 
 458.306 +    The GNU C Library is free software; you can redistribute it and/or
 458.307 +@@ -23,7 +23,154 @@
 458.308 +    too much into it.  Don't use it for anything other than GDB unless
 458.309 +    you know what you are doing.  */
 458.310 + 
 458.311 +-#include <asm/reg.h>
 458.312 ++/* #include <asm/reg.h> */
 458.313 ++/* Instead of including the kernel header, that will vary depending on
 458.314 ++   whether the 32- or the 64-bit kernel is installed, we paste its
 458.315 ++   contents here.  Note that the fact that the file is inline here,
 458.316 ++   instead of included separately, doesn't change in any way the
 458.317 ++   licensing status of a program that includes user.h.  Since this is
 458.318 ++   for gdb alone, and gdb is GPLed, no surprises here.  */
 458.319 ++#if _MIPS_SIM == _MIPS_SIM_ABI32
 458.320 ++/*
 458.321 ++ * Various register offset definitions for debuggers, core file
 458.322 ++ * examiners and whatnot.
 458.323 ++ *
 458.324 ++ * This file is subject to the terms and conditions of the GNU General Public
 458.325 ++ * License.  See the file "COPYING" in the main directory of this archive
 458.326 ++ * for more details.
 458.327 ++ *
 458.328 ++ * Copyright (C) 1995, 1999 by Ralf Baechle
 458.329 ++ */
 458.330 ++#ifndef __ASM_MIPS_REG_H
 458.331 ++#define __ASM_MIPS_REG_H
 458.332 ++
 458.333 ++/*
 458.334 ++ * This defines/structures correspond to the register layout on stack -
 458.335 ++ * if the order here is changed, it needs to be updated in
 458.336 ++ * include/asm-mips/stackframe.h
 458.337 ++ */
 458.338 ++#define EF_REG0			6
 458.339 ++#define EF_REG1			7
 458.340 ++#define EF_REG2			8
 458.341 ++#define EF_REG3			9
 458.342 ++#define EF_REG4			10
 458.343 ++#define EF_REG5			11
 458.344 ++#define EF_REG6			12
 458.345 ++#define EF_REG7			13
 458.346 ++#define EF_REG8			14
 458.347 ++#define EF_REG9			15
 458.348 ++#define EF_REG10		16
 458.349 ++#define EF_REG11		17
 458.350 ++#define EF_REG12		18
 458.351 ++#define EF_REG13		19
 458.352 ++#define EF_REG14		20
 458.353 ++#define EF_REG15		21
 458.354 ++#define EF_REG16		22
 458.355 ++#define EF_REG17		23
 458.356 ++#define EF_REG18		24
 458.357 ++#define EF_REG19		25
 458.358 ++#define EF_REG20		26
 458.359 ++#define EF_REG21		27
 458.360 ++#define EF_REG22		28
 458.361 ++#define EF_REG23		29
 458.362 ++#define EF_REG24		30
 458.363 ++#define EF_REG25		31
 458.364 ++/*
 458.365 ++ * k0/k1 unsaved
 458.366 ++ */
 458.367 ++#define EF_REG28		34
 458.368 ++#define EF_REG29		35
 458.369 ++#define EF_REG30		36
 458.370 ++#define EF_REG31		37
 458.371 ++
 458.372 ++/*
 458.373 ++ * Saved special registers
 458.374 ++ */
 458.375 ++#define EF_LO			38
 458.376 ++#define EF_HI			39
 458.377 ++
 458.378 ++#define EF_CP0_EPC		40
 458.379 ++#define EF_CP0_BADVADDR		41
 458.380 ++#define EF_CP0_STATUS		42
 458.381 ++#define EF_CP0_CAUSE		43
 458.382 ++
 458.383 ++#define EF_SIZE			180	/* size in bytes */
 458.384 ++
 458.385 ++#endif /* __ASM_MIPS_REG_H */
 458.386 ++
 458.387 ++#else /* _MIPS_SIM != _MIPS_SIM_ABI32 */
 458.388 ++
 458.389 ++/*
 458.390 ++ * Various register offset definitions for debuggers, core file
 458.391 ++ * examiners and whatnot.
 458.392 ++ *
 458.393 ++ * This file is subject to the terms and conditions of the GNU General Public
 458.394 ++ * License.  See the file "COPYING" in the main directory of this archive
 458.395 ++ * for more details.
 458.396 ++ *
 458.397 ++ * Copyright (C) 1995, 1999 Ralf Baechle
 458.398 ++ * Copyright (C) 1995, 1999 Silicon Graphics
 458.399 ++ */
 458.400 ++#ifndef _ASM_REG_H
 458.401 ++#define _ASM_REG_H
 458.402 ++
 458.403 ++/*
 458.404 ++ * This defines/structures correspond to the register layout on stack -
 458.405 ++ * if the order here is changed, it needs to be updated in
 458.406 ++ * include/asm-mips/stackframe.h
 458.407 ++ */
 458.408 ++#define EF_REG0			 0
 458.409 ++#define EF_REG1			 1
 458.410 ++#define EF_REG2			 2
 458.411 ++#define EF_REG3			 3
 458.412 ++#define EF_REG4			 4
 458.413 ++#define EF_REG5			 5
 458.414 ++#define EF_REG6			 6
 458.415 ++#define EF_REG7			 7
 458.416 ++#define EF_REG8			 8
 458.417 ++#define EF_REG9			 9
 458.418 ++#define EF_REG10		10
 458.419 ++#define EF_REG11		11
 458.420 ++#define EF_REG12		12
 458.421 ++#define EF_REG13		13
 458.422 ++#define EF_REG14		14
 458.423 ++#define EF_REG15		15
 458.424 ++#define EF_REG16		16
 458.425 ++#define EF_REG17		17
 458.426 ++#define EF_REG18		18
 458.427 ++#define EF_REG19		19
 458.428 ++#define EF_REG20		20
 458.429 ++#define EF_REG21		21
 458.430 ++#define EF_REG22		22
 458.431 ++#define EF_REG23		23
 458.432 ++#define EF_REG24		24
 458.433 ++#define EF_REG25		25
 458.434 ++/*
 458.435 ++ * k0/k1 unsaved
 458.436 ++ */
 458.437 ++#define EF_REG28		28
 458.438 ++#define EF_REG29		29
 458.439 ++#define EF_REG30		30
 458.440 ++#define EF_REG31		31
 458.441 ++
 458.442 ++/*
 458.443 ++ * Saved special registers
 458.444 ++ */
 458.445 ++#define EF_LO			32
 458.446 ++#define EF_HI			33
 458.447 ++
 458.448 ++#define EF_CP0_EPC		34
 458.449 ++#define EF_CP0_BADVADDR		35
 458.450 ++#define EF_CP0_STATUS		36
 458.451 ++#define EF_CP0_CAUSE		37
 458.452 ++
 458.453 ++#define EF_SIZE			304	/* size in bytes */
 458.454 ++
 458.455 ++#endif /* _ASM_REG_H */
 458.456 ++
 458.457 ++#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */
 458.458 ++
 458.459 ++#if _MIPS_SIM == _MIPS_SIM_ABI32
 458.460 + 
 458.461 + struct user
 458.462 + {
 458.463 +@@ -39,6 +186,24 @@ struct user
 458.464 +   unsigned long	magic;			/* identifies a core file */
 458.465 +   char		u_comm[32];		/* user command name */
 458.466 + };
 458.467 ++
 458.468 ++#else
 458.469 ++
 458.470 ++struct user {
 458.471 ++  __extension__ unsigned long	regs[EF_SIZE/8+64]; /* integer and fp regs */
 458.472 ++  __extension__ unsigned long	u_tsize;	/* text size (pages) */
 458.473 ++  __extension__ unsigned long	u_dsize;	/* data size (pages) */
 458.474 ++  __extension__ unsigned long	u_ssize;	/* stack size (pages) */
 458.475 ++  __extension__ unsigned long long start_code;	/* text starting address */
 458.476 ++  __extension__ unsigned long long start_data;	/* data starting address */
 458.477 ++  __extension__ unsigned long long start_stack;	/* stack starting address */
 458.478 ++  __extension__ long long	signal;		/* signal causing core dump */
 458.479 ++  __extension__ unsigned long long u_ar0;	/* help gdb find registers */
 458.480 ++  __extension__ unsigned long long magic;	/* identifies a core file */
 458.481 ++  char		u_comm[32];		/* user command name */
 458.482 ++};
 458.483 ++
 458.484 ++#endif
 458.485 + 
 458.486 + #define PAGE_SHIFT		12
 458.487 + #define PAGE_SIZE		(1UL << PAGE_SHIFT)
 458.488 +
 458.489 +--=-=-=
 458.490 +
 458.491 +
 458.492 +-- 
 458.493 +Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
 458.494 +Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
 458.495 +CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
 458.496 +Free Software Evangelist                Professional serial bug killer
 458.497 +
 458.498 +--=-=-=--
 458.499 +
 458.500 +And the rediffed hunk:
 458.501 +
 458.502 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/mips/sys/ucontext.h.old	2004-05-30 07:23:32.000000000 -0700
 458.503 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/mips/sys/ucontext.h	2004-05-30 07:22:56.000000000 -0700
 458.504 +@@ -29,43 +29,72 @@
 458.505 + #include <bits/sigcontext.h>
 458.506 + 
 458.507 + 
 458.508 +-/* Type for general register.  */
 458.509 +-typedef unsigned long int greg_t;
 458.510 ++/* Type for general register.  Even in o32 we assume 64-bit registers,
 458.511 ++   like the kernel.  */
 458.512 ++__extension__ typedef unsigned long long int greg_t;
 458.513 + 
 458.514 + /* Number of general registers.  */
 458.515 +-#define NGREG	37
 458.516 +-#define NFPREG	33
 458.517 ++#define NGREG	32
 458.518 ++#define NFPREG	32
 458.519 + 
 458.520 + /* Container for all general registers.  */
 458.521 +-/* gregset_t must be an array.  The below declared array corresponds to:
 458.522 +-typedef struct gregset {
 458.523 +-	greg_t	g_regs[32];
 458.524 +-	greg_t	g_hi;
 458.525 +-	greg_t	g_lo;
 458.526 +-	greg_t	g_pad[3];
 458.527 +-} gregset_t;  */
 458.528 + typedef greg_t gregset_t[NGREG];
 458.529 + 
 458.530 + /* Container for all FPU registers.  */
 458.531 + typedef struct fpregset {
 458.532 + 	union {
 458.533 +-		double	fp_dregs[32];
 458.534 ++		double	fp_dregs[NFPREG];
 458.535 + 		struct {
 458.536 + 			float		_fp_fregs;
 458.537 + 			unsigned int	_fp_pad;
 458.538 +-		} fp_fregs[32];
 458.539 ++		} fp_fregs[NFPREG];
 458.540 + 	} fp_r;
 458.541 +-	unsigned int	fp_csr;
 458.542 +-	unsigned int	fp_pad;
 458.543 + } fpregset_t;
 458.544 + 
 458.545 + 
 458.546 + /* Context to describe whole processor state.  */
 458.547 ++#if _MIPS_SIM == _MIPS_SIM_ABI32
 458.548 ++/* Earlier versions of glibc for mips had an entirely different
 458.549 ++   definition of mcontext_t, that didn't even resemble the
 458.550 ++   corresponding kernel data structure.  Since all legitimate uses of
 458.551 ++   ucontext_t in glibc mustn't have accessed anything beyond
 458.552 ++   uc_mcontext and, even then, taking a pointer to it, casting it to
 458.553 ++   sigcontext_t, and accessing it as such, which is what it has always
 458.554 ++   been, this can still be rectified.  Fortunately, makecontext,
 458.555 ++   [gs]etcontext et all have never been implemented.  */
 458.556 + typedef struct
 458.557 +   {
 458.558 ++    unsigned int regmask;
 458.559 ++    unsigned int status;
 458.560 ++    greg_t pc;
 458.561 +     gregset_t gregs;
 458.562 +     fpregset_t fpregs;
 458.563 ++    unsigned int fp_owned;
 458.564 ++    unsigned int fpc_csr;
 458.565 ++    unsigned int fpc_eir;
 458.566 ++    unsigned int used_math;
 458.567 ++    unsigned int ssflags;
 458.568 ++    greg_t mdhi;
 458.569 ++    greg_t mdlo;
 458.570 ++    unsigned int cause;
 458.571 ++    unsigned int badvaddr;
 458.572 +   } mcontext_t;
 458.573 ++#else
 458.574 ++typedef struct
 458.575 ++  {
 458.576 ++    gregset_t gregs;
 458.577 ++    fpregset_t fpregs;
 458.578 ++    greg_t mdhi;
 458.579 ++    greg_t mdlo;
 458.580 ++    greg_t pc;
 458.581 ++    unsigned int status;
 458.582 ++    unsigned int fpc_csr;
 458.583 ++    unsigned int fpc_eir;
 458.584 ++    unsigned int used_math;
 458.585 ++    unsigned int cause;
 458.586 ++    unsigned int badvaddr;
 458.587 ++  } mcontext_t;
 458.588 ++#endif
 458.589 + 
 458.590 + /* Userlevel context.  */
 458.591 + typedef struct ucontext
   459.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   459.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-mips.patch	Sat Feb 24 11:00:05 2007 +0000
   459.3 @@ -0,0 +1,60 @@
   459.4 +From Bill Gatliff, who said:
   459.5 +"Attached is a glibc-2.3.2 patchfile I use for MIPS.  Versions prior to and including glibc-2.3.2 won't build without it."
   459.6 +
   459.7 +diff -bBurN glibc-2.3.2.orig/elf/dl-conflict.c glibc-2.3.2/elf/dl-conflict.c
   459.8 +--- glibc-2.3.2.orig/elf/dl-conflict.c	2003-06-12 21:07:54.000000000 -0500
   459.9 ++++ glibc-2.3.2/elf/dl-conflict.c	2003-06-12 21:09:12.000000000 -0500
  459.10 +@@ -33,6 +33,7 @@
  459.11 + _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
  459.12 + 		       ElfW(Rela) *conflictend)
  459.13 + {
  459.14 ++#ifndef _DL_HAVE_NO_ELF_MACHINE_RELA
  459.15 +   if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_RELOC, 0))
  459.16 +     _dl_printf ("\nconflict processing: %s\n",
  459.17 + 		l->l_name[0] ? l->l_name : rtld_progname);
  459.18 +@@ -64,4 +65,5 @@
  459.19 +     for (; conflict < conflictend; ++conflict)
  459.20 +       elf_machine_rela (l, conflict, NULL, NULL, (void *) conflict->r_offset);
  459.21 +   }
  459.22 ++#endif
  459.23 + }
  459.24 +diff -bBurN glibc-2.3.2.orig/sysdeps/mips/dl-machine.h glibc-2.3.2/sysdeps/mips/dl-machine.h
  459.25 +--- glibc-2.3.2.orig/sysdeps/mips/dl-machine.h	2003-06-12 21:07:49.000000000 -0500
  459.26 ++++ glibc-2.3.2/sysdeps/mips/dl-machine.h	2003-06-12 21:11:10.000000000 -0500
  459.27 +@@ -56,6 +56,10 @@
  459.28 + #define ELF_MACHINE_JMP_SLOT			R_MIPS_REL32
  459.29 + #define elf_machine_type_class(type)		ELF_RTYPE_CLASS_PLT
  459.30 + 
  459.31 ++/* MIPS doesn't support RELA; see:
  459.32 ++   http://lists.debian.org/debian-mips/2002/debian-mips-200209/msg00020.html */
  459.33 ++#define _DL_HAVE_NO_ELF_MACHINE_RELA
  459.34 ++
  459.35 + /* Translate a processor specific dynamic tag to the index
  459.36 +    in l_info array.  */
  459.37 + #define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM)
  459.38 +diff -bBurN glibc-2.3.2.orig/sysdeps/mips/Makefile glibc-2.3.2/sysdeps/mips/Makefile
  459.39 +--- glibc-2.3.2.orig/sysdeps/mips/Makefile	2003-06-12 21:07:48.000000000 -0500
  459.40 ++++ glibc-2.3.2/sysdeps/mips/Makefile	2003-06-12 21:10:14.000000000 -0500
  459.41 +@@ -6,3 +6,11 @@
  459.42 + ifeq ($(subdir),setjmp)
  459.43 + sysdep_routines += setjmp_aux
  459.44 + endif
  459.45 ++
  459.46 ++ifeq ($(subdir),csu)
  459.47 ++ifeq (yes,$(build-shared))
  459.48 ++# Compatibility
  459.49 ++sysdep_routines += divdi3
  459.50 ++shared-only-routines += divdi3
  459.51 ++endif
  459.52 ++endif
  459.53 +diff -bBurN glibc-2.3.2.orig/sysdeps/unix/sysv/linux/mips/syscalls.list glibc-2.3.2/sysdeps/unix/sysv/linux/mips/syscalls.list
  459.54 +--- glibc-2.3.2.orig/sysdeps/unix/sysv/linux/mips/syscalls.list	2003-06-12 21:07:53.000000000 -0500
  459.55 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/mips/syscalls.list	2003-06-12 21:12:30.000000000 -0500
  459.56 +@@ -41,6 +41,7 @@
  459.57 + sys_mknod	xmknod	mknod		i:sii	__syscall_mknod
  459.58 + 
  459.59 + # System calls with wrappers.
  459.60 ++s_readahead     EXTRA   readahead       i:iipi  __syscall_readahead
  459.61 + rt_sigaction	-	rt_sigaction	i:ippi	__syscall_rt_sigaction
  459.62 + rt_sigpending	-	rt_sigpending	i:pi	__syscall_rt_sigpending
  459.63 + rt_sigprocmask	-	rt_sigprocmask	i:ippi	__syscall_rt_sigprocmask
   460.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   460.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-override.patch	Sat Feb 24 11:00:05 2007 +0000
   460.3 @@ -0,0 +1,38 @@
   460.4 +The error
   460.5 +
   460.6 +make[2]: *** [.../gcc-3.3.3-glibc-2.1.3/i686-unknown-linux-gnu/share/zoneinfo/Africa/Algiers] Segmentation fault
   460.7 +make[2]: Leaving directory `.../gcc-3.3.3-glibc-2.1.3/glibc-2.1.3/timezone'
   460.8 +make[1]: *** [timezone/subdir_install] Error 2
   460.9 +
  460.10 +is caused by glibc trying to run something it just compiled.
  460.11 +A crude workaround for this was posted at
  460.12 +http://lists.scratchbox.org/pipermail/scratchbox-users/2004-February/000018.html
  460.13 +but the following patch lets you optionally override these programs at
  460.14 +make time by setting Make variables 
  460.15 +  localedef_FOR_BUILD rpcgen_FOR_BUILD zic_FOR_BUILD
  460.16 +and maybe a few others to point to versions of those programs
  460.17 +that can run on the build machine.
  460.18 +Thanks to http://groups.google.com/groups?selm=9012160052.AA23106%40kaos.ksr.com
  460.19 +for pointing out the idiom for inline $(ifdef ...) in GNU Make.
  460.20 +
  460.21 +Dan Kegel 2004-05-17
  460.22 +[rediffed for glibc-2.3.2]
  460.23 +[typos corrected - those are make variables, not environment variables,
  460.24 + and it's $(built-program-override-name), not $(build-program-override-name)]
  460.25 +
  460.26 +--- glibc-2.3.2/Makeconfig.old	2004-05-17 13:53:46.000000000 -0700
  460.27 ++++ glibc-2.3.2/Makeconfig	2004-05-17 14:09:59.000000000 -0700
  460.28 +@@ -534,9 +534,12 @@
  460.29 + run-program-prefix =
  460.30 + endif
  460.31 + # Never use $(run-program-prefix) for the statically-linked %-bp test programs
  460.32 +-built-program-cmd = $(patsubst %,$(run-program-prefix),\
  460.33 ++built-program-real = $(patsubst %,$(run-program-prefix),\
  460.34 + 			$(filter-out %-bp,$(built-program-file))) \
  460.35 + 		    $(built-program-file)
  460.36 ++# If user set foo_FOR_BUILD, use that instead of actually running the program we just linked.
  460.37 ++built-program-override-name = $(notdir $(word 2,$^))_FOR_BUILD
  460.38 ++built-program-cmd = $(if $(findstring undefined,$(origin $(built-program-override-name))),$(built-program-real),$($(built-program-override-name)))
  460.39 + 
  460.40 + ifndef LD
  460.41 + LD := ld -X
   461.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   461.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-powerpc-as.patch	Sat Feb 24 11:00:05 2007 +0000
   461.3 @@ -0,0 +1,58 @@
   461.4 +Retrieved from
   461.5 +  http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/powerpc/powerpc32/Makefile.diff?r1=1.4&r2=1.5&cvsroot=glibc
   461.6 +  http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/powerpc/powerpc64/Makefile.diff?r1=1.2&r2=1.3&cvsroot=glibc
   461.7 +Fixes
   461.8 + /tmp/ccEVhqgD.s:279: Error: Unrecognized opcode: `stvx'
   461.9 + /tmp/ccEVhqgD.s:288: Error: Unrecognized opcode: `lvx'
  461.10 + make[2]: *** [powerpc-7450-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/dlfcn/eval.os] Error 1
  461.11 + make[2]: Leaving directory `powerpc-7450-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/dlfcn'
  461.12 + make[1]: *** [dlfcn/others] Error 2
  461.13 + make[1]: Leaving directory `powerpc-7450-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2'
  461.14 + make: *** [all] Error 2
  461.15 +
  461.16 +
  461.17 +Revision 1.5 Wed Oct 22 21:30:02 2003 UTC (7 months, 1 week ago) by roland
  461.18 +Branch: MAIN
  461.19 +CVS Tags: HEAD
  461.20 +Changes since 1.4: +0 -3 lines
  461.21 +Diff to previous 1.4 (colored)
  461.22 +
  461.23 +2003-10-22  Steven Munroe  <sjmunroe@us.ibm.com>
  461.24 +
  461.25 +	* sysdeps/powerpc/powerpc32/Makefile (+cflags, asm-CPPFLAGS): Don't
  461.26 +	append options to these.
  461.27 +	* sysdeps/powerpc/powerpc64/Makefile (+cflags, asm-CPPFLAGS): Likewise.
  461.28 +
  461.29 +===================================================================
  461.30 +RCS file: /cvs/glibc/libc/sysdeps/powerpc/powerpc32/Makefile,v
  461.31 +retrieving revision 1.4
  461.32 +retrieving revision 1.5
  461.33 +diff -u -r1.4 -r1.5
  461.34 +--- libc/sysdeps/powerpc/powerpc32/Makefile	2003/01/27 21:02:01	1.4
  461.35 ++++ libc/sysdeps/powerpc/powerpc32/Makefile	2003/10/22 21:30:02	1.5
  461.36 +@@ -1,8 +1,5 @@
  461.37 + # Powerpc32 specific build options.
  461.38 + 
  461.39 +-+cflags += -Wa,-mppc -mpowerpc
  461.40 +-asm-CPPFLAGS += -Wa,-mppc
  461.41 +-
  461.42 + ifeq ($(with-fp),no)
  461.43 + +cflags += -msoft-float
  461.44 + sysdep-LDFLAGS += -msoft-float
  461.45 +===================================================================
  461.46 +RCS file: /cvs/glibc/libc/sysdeps/powerpc/powerpc64/Makefile,v
  461.47 +retrieving revision 1.2
  461.48 +retrieving revision 1.3
  461.49 +diff -u -r1.2 -r1.3
  461.50 +--- libc/sysdeps/powerpc/powerpc64/Makefile	2002/09/27 19:44:16	1.2
  461.51 ++++ libc/sysdeps/powerpc/powerpc64/Makefile	2003/10/22 21:30:03	1.3
  461.52 +@@ -1,9 +1,6 @@
  461.53 + # Powerpc64 specific build options.
  461.54 + # this is ./sysdeps/powerpc/powerpc64/Makefile
  461.55 + 
  461.56 +-+cflags += -Wa,-mppc64 -mpowerpc64
  461.57 +-asm-CPPFLAGS += -Wa,-mppc64
  461.58 +-
  461.59 + # Each TOC entry takes 8 bytes and the TOC holds up to 2^16 bytes,
  461.60 + # or 8192 entries.
  461.61 + # If -fpic is not specified, the latest gcc-3.2.1 now generates
   462.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   462.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-pr139-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   462.3 @@ -0,0 +1,104 @@
   462.4 +2004-04-29  Jakub Jelinek  <jakub@redhat.com>
   462.5 +
   462.6 +	* sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c (_Qp_qtoi): Use %f31
   462.7 +	for single precision register, add it to __asm clobbers [BZ #139].
   462.8 +	* sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c (_Qp_qtoui): Use %f31
   462.9 +	for single precision register, add it to __asm clobbers.
  462.10 +	* sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c (_Qp_qtoux): Use fqtox
  462.11 +	instead of fqtoi in QP_HANDLE_EXCEPTIONS.
  462.12 +	* sysdeps/sparc/sparc64/soft-fp/qp_qtox.c (_Qp_qtox): Likewise.
  462.13 +	Reported by M. H. VanLeeuwen <vanl@megsinet.net>.
  462.14 +
  462.15 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=139
  462.16 +Fixes error
  462.17 +qp_qtoi.s:261: Error: Illegal operands: There are only 32 single precision f registers; [0-31]
  462.18 +plus a couple other things vanl noticed.
  462.19 +
  462.20 +diff -ur orig/qp_qtoi.c new/qp_qtoi.c
  462.21 +--- orig/qp_qtoi.c	Sat May  1 00:40:06 2004
  462.22 ++++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c	Sat May  1 00:39:40 2004
  462.23 +@@ -1,6 +1,6 @@
  462.24 + /* Software floating-point emulation.
  462.25 +    Return (int)(*a)
  462.26 +-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
  462.27 ++   Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc.
  462.28 +    This file is part of the GNU C Library.
  462.29 +    Contributed by Richard Henderson (rth@cygnus.com) and
  462.30 + 		  Jakub Jelinek (jj@ultra.linux.cz).
  462.31 +@@ -38,9 +38,9 @@
  462.32 +   	__asm (
  462.33 + "	ldd [%1], %%f52\n"
  462.34 + "	ldd [%1+8], %%f54\n"
  462.35 +-"	fqtoi %%f52, %%f60\n"
  462.36 +-"	st %%f60, [%0]\n"
  462.37 +-"	" : : "r" (&rx), "r" (a) : QP_CLOBBER);
  462.38 ++"	fqtoi %%f52, %%f31\n"
  462.39 ++"	st %%f31, [%0]\n"
  462.40 ++"	" : : "r" (&rx), "r" (a) : QP_CLOBBER, "f31");
  462.41 + 	r = rx);
  462.42 + 
  462.43 +   return r;
  462.44 +diff -ur orig/qp_qtoui.c new/qp_qtoui.c
  462.45 +--- orig/qp_qtoui.c	Sat May  1 00:40:06 2004
  462.46 ++++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c	Sat May  1 00:39:40 2004
  462.47 +@@ -1,6 +1,6 @@
  462.48 + /* Software floating-point emulation.
  462.49 +    Return (unsigned int)(*a)
  462.50 +-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
  462.51 ++   Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc.
  462.52 +    This file is part of the GNU C Library.
  462.53 +    Contributed by Richard Henderson (rth@cygnus.com) and
  462.54 + 		  Jakub Jelinek (jj@ultra.linux.cz).
  462.55 +@@ -38,9 +38,9 @@
  462.56 +   	__asm (
  462.57 + "	ldd [%1], %%f52\n"
  462.58 + "	ldd [%1+8], %%f54\n"
  462.59 +-"	fqtoi %%f52, %%f60\n"
  462.60 +-"	st %%f60, [%0]\n"
  462.61 +-"	" : : "r" (&rx), "r" (a) : QP_CLOBBER);
  462.62 ++"	fqtoi %%f52, %%f31\n"
  462.63 ++"	st %%f31, [%0]\n"
  462.64 ++"	" : : "r" (&rx), "r" (a) : QP_CLOBBER, "f31");
  462.65 + 	r = rx);
  462.66 + 
  462.67 +   return r;
  462.68 +diff -ur orig/qp_qtoux.c new/qp_qtoux.c
  462.69 +--- orig/qp_qtoux.c	Sat May  1 00:40:06 2004
  462.70 ++++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c	Sat May  1 00:39:40 2004
  462.71 +@@ -1,6 +1,6 @@
  462.72 + /* Software floating-point emulation.
  462.73 +    Return (unsigned long)(*a)
  462.74 +-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
  462.75 ++   Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc.
  462.76 +    This file is part of the GNU C Library.
  462.77 +    Contributed by Richard Henderson (rth@cygnus.com) and
  462.78 + 		  Jakub Jelinek (jj@ultra.linux.cz).
  462.79 +@@ -38,7 +38,7 @@
  462.80 +   	__asm (
  462.81 + "	ldd [%1], %%f52\n"
  462.82 + "	ldd [%1+8], %%f54\n"
  462.83 +-"	fqtoi %%f52, %%f60\n"
  462.84 ++"	fqtox %%f52, %%f60\n"
  462.85 + "	std %%f60, [%0]\n"
  462.86 + "	" : : "r" (&rx), "r" (a) : QP_CLOBBER);
  462.87 + 	r = rx);
  462.88 +diff -ur orig/qp_qtox.c new/qp_qtox.c
  462.89 +--- orig/qp_qtox.c	Sat May  1 00:40:06 2004
  462.90 ++++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtox.c	Sat May  1 00:39:40 2004
  462.91 +@@ -1,6 +1,6 @@
  462.92 + /* Software floating-point emulation.
  462.93 +    Return (long)(*a)
  462.94 +-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
  462.95 ++   Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc.
  462.96 +    This file is part of the GNU C Library.
  462.97 +    Contributed by Richard Henderson (rth@cygnus.com) and
  462.98 + 		  Jakub Jelinek (jj@ultra.linux.cz).
  462.99 +@@ -38,7 +38,7 @@
 462.100 +   	__asm (
 462.101 + "	ldd [%1], %%f52\n"
 462.102 + "	ldd [%1+8], %%f54\n"
 462.103 +-"	fqtoi %%f52, %%f60\n"
 462.104 ++"	fqtox %%f52, %%f60\n"
 462.105 + "	std %%f60, [%0]\n"
 462.106 + "	" : : "r" (&rx), "r" (a) : QP_CLOBBER);
 462.107 + 	r = rx);
   463.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   463.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-sh4-socket.patch	Sat Feb 24 11:00:05 2007 +0000
   463.3 @@ -0,0 +1,39 @@
   463.4 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/sh/socket.S.diff?r1=1.5&r2=1.6&cvsroot=glibc
   463.5 +
   463.6 +Ankur Sheth said:
   463.7 +"The problem that I ran into was that multi-threaded apps would crash with a
   463.8 +seg fault when they invoked some of the socket calls (sendto() in my case.
   463.9 +This happened only on the sh4.  Turns out that a certain register (PR) was
  463.10 +not being saved and restored properly before and after invoking the system
  463.11 +call.  This patch fixes it.  It applies cleanly on glibc 2.3.2. 
  463.12 +[Thanks to Kaz for helping us find this.]"
  463.13 +
  463.14 +===================================================================
  463.15 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/sh/socket.S,v
  463.16 +retrieving revision 1.5
  463.17 +retrieving revision 1.6
  463.18 +diff -u -r1.5 -r1.6
  463.19 +--- libc/sysdeps/unix/sysv/linux/sh/socket.S	2003/01/05 11:07:44	1.5
  463.20 ++++ libc/sysdeps/unix/sysv/linux/sh/socket.S	2003/07/12 01:25:53	1.6
  463.21 +@@ -94,7 +94,9 @@
  463.22 + #if defined NEED_CANCELLATION && defined CENABLE
  463.23 + .Lsocket_cancel:
  463.24 + 	/* Enable asynchronous cancellation.  */
  463.25 ++	sts.l pr,@-r15
  463.26 + 	CENABLE
  463.27 ++	lds.l @r15+,pr
  463.28 + 
  463.29 + 	/* Do the system call trap.  */
  463.30 + 	mov #+P(SOCKOP_,socket), r4
  463.31 +@@ -102,9 +104,11 @@
  463.32 + 	mov.l .L1,r3
  463.33 + 	trapa #0x12
  463.34 + 
  463.35 ++	sts.l pr,@-r15
  463.36 + 	mov.l r0,@-r15
  463.37 + 	CDISABLE
  463.38 + 	mov.l @r15+,r0
  463.39 ++	lds.l @r15+,pr
  463.40 + 
  463.41 + 	/* Pop args off the stack */
  463.42 + 	P(POPARGS_,NARGS)
   464.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   464.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-sh4-trapa.patch	Sat Feb 24 11:00:05 2007 +0000
   464.3 @@ -0,0 +1,55 @@
   464.4 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/sh/sysdep.h.diff?r1=1.9&r2=1.10&cvsroot=glibc
   464.5 +
   464.6 +Ankur Sheth said:
   464.7 +
   464.8 +"This is actually a workaround for a bug in the sh4.  The actual bug is
   464.9 +documented here :
  464.10 +http://documentation.renesas.com/eng/products/mpumcu/tu/tnsh7456ae.pdf
  464.11 +Basically the cache & TLB should not be accessed for 4 (or was it 5?) cycles
  464.12 +after isssuing a TRAPA instruction.  I didn't run into any specific problem
  464.13 +because of this bug, but it seems useful to have and the patch itself seems
  464.14 +pretty harmless."
  464.15 +
  464.16 +
  464.17 +===================================================================
  464.18 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/sh/sysdep.h,v
  464.19 +retrieving revision 1.9
  464.20 +retrieving revision 1.10
  464.21 +diff -u -r1.9 -r1.10
  464.22 +--- libc/sysdeps/unix/sysv/linux/sh/sysdep.h	2003/09/01 04:05:21	1.9
  464.23 ++++ libc/sysdeps/unix/sysv/linux/sh/sysdep.h	2003/10/15 04:36:32	1.10
  464.24 +@@ -183,6 +183,13 @@
  464.25 + # endif	/* _LIBC_REENTRANT */
  464.26 + #endif	/* PIC */
  464.27 + 
  464.28 ++# ifdef NEED_SYSCALL_INST_PAD
  464.29 ++#  define SYSCALL_INST_PAD \
  464.30 ++	or r0,r0; or r0,r0; or r0,r0; or r0,r0; or r0,r0
  464.31 ++# else
  464.32 ++#  define SYSCALL_INST_PAD
  464.33 ++# endif
  464.34 ++
  464.35 + #define SYSCALL_INST0	trapa #0x10
  464.36 + #define SYSCALL_INST1	trapa #0x11
  464.37 + #define SYSCALL_INST2	trapa #0x12
  464.38 +@@ -195,19 +202,13 @@
  464.39 + #define DO_CALL(syscall_name, args)	\
  464.40 +     mov.l 1f,r3;			\
  464.41 +     SYSCALL_INST##args;			\
  464.42 ++    SYSCALL_INST_PAD;			\
  464.43 +     bra 2f;				\
  464.44 +      nop;				\
  464.45 +     .align 2;				\
  464.46 +  1: .long SYS_ify (syscall_name);	\
  464.47 +  2:
  464.48 + 
  464.49 +-# ifdef NEED_SYSCALL_INST_PAD
  464.50 +-#  define SYSCALL_INST_PAD \
  464.51 +-	or r0,r0; or r0,r0; or r0,r0; or r0,r0; or r0,r0
  464.52 +-# else
  464.53 +-#  define SYSCALL_INST_PAD
  464.54 +-# endif
  464.55 +-
  464.56 + #else /* not __ASSEMBLER__ */
  464.57 + 
  464.58 + #define SYSCALL_INST_STR0	"trapa #0x10\n\t"
   465.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   465.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-sparc32-sysdep.patch	Sat Feb 24 11:00:05 2007 +0000
   465.3 @@ -0,0 +1,46 @@
   465.4 +Fixes the error
   465.5 +
   465.6 +<stdin>: Assembler messages:
   465.7 +<stdin>:2: Error: junk at end of line, first unrecognized character is `1' ...
   465.8 +<stdin>:2: Error: Illegal operands: PC-relative operand can't be a constant
   465.9 +make[4]: *** [/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/io/rtld-open.os] Error 1
  465.10 +make[4]: Leaving directory `/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/io'
  465.11 +make[3]: *** [/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/io/rtld-xstat64.os] Error 2
  465.12 +make[3]: Leaving directory `/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/elf'
  465.13 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/elf/rtld-libc.a] Error 2
  465.14 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/elf'
  465.15 +make[1]: *** [elf/subdir_lib] Error 2
  465.16 +
  465.17 +when building glibc-2.3.2 with gcc-3.4.0 for sparc32.
  465.18 +
  465.19 +The .s file left behind by -save-temps contains the big long line
  465.20 +
  465.21 +.text; .global __libc_open; .align 4; __libc_open:; .type __libc_open,@function;; mov 5, %g1; ta 0x10; bcs __syscall_error_handler; nop; .section .gnu.linkonce.t. 1 .get_pic.l7,"ax",@progbits; .globl 1 .get_pic.l7; .hidden 1 .get_pic.l7; .type 1 .get_pic.l7,@function; 1 .get_pic.l7: retl; add %o7, %l7, %l7; .previous; .subsection 3; __syscall_error_handler: save %sp,-96,%sp; sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7; call 1 .get_pic.l7; add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7; ld [%l7 + errno], %l0; st %i0, [%l0]; jmpl %i7+8, %g0; restore %g0, -1, %o0; .previous;
  465.22 + retl; nop 
  465.23 + 
  465.24 +The error messages appear to refer to the '1 .get_pic.17', e.g.
  465.25 +        .globl 1 .get_pic.l7; .hidden 1 .get_pic.l7;
  465.26 +which seems to come from
  465.27 +glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
  465.28 +where it appears originally as
  465.29 +        .globl __sparc.get_pic.l7;                                      \
  465.30 +        .hidden __sparc.get_pic.l7;                                     \
  465.31 +
  465.32 +Note that __sparc is a predefined symbol on Solaris and some other environments;
  465.33 +it's not surprising to see it predefined on Linux, too.
  465.34 +
  465.35 +
  465.36 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h.old	2004-05-15 10:23:11.000000000 -0700
  465.37 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h	2004-05-15 10:24:12.000000000 -0700
  465.38 +@@ -39,6 +39,11 @@
  465.39 + #undef END
  465.40 + #undef LOC
  465.41 + 
  465.42 ++/* gcc-3.4.0 seems to expand __sparc as a predefined preprocessor symbol, which we don't want here */
  465.43 ++#ifdef __sparc
  465.44 ++#undef __sparc
  465.45 ++#endif
  465.46 ++
  465.47 + #define ENTRY(name) \
  465.48 + 	.global C_SYMBOL_NAME(name); \
  465.49 + 	.align 4;\
   466.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   466.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-sparc64-dl-machine.patch	Sat Feb 24 11:00:05 2007 +0000
   466.3 @@ -0,0 +1,29 @@
   466.4 +See http://gcc.gnu.org/PR15345
   466.5 +
   466.6 +Quick kludge by H.J.Lu
   466.7 +Works around gcc-3.4.0 error which shows up when building glibc-2.3.2 for sparc64:
   466.8 +
   466.9 +.../sparc64-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/libc.a(dl-reloc.o)(.text+0x4b4): In function `elf_machine_load_address.3':
  466.10 +: undefined reference to `_DYNAMIC'
  466.11 +collect2: ld returned 1 exit status
  466.12 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc10/build/sparc64-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/elf/sln] Error 1
  466.13 +
  466.14 +
  466.15 +--- glibc-2.3.2/sysdeps/sparc/sparc64/dl-machine.h.orig	Sat May  8 20:54:26 2004
  466.16 ++++ glibc-2.3.2/sysdeps/sparc/sparc64/dl-machine.h	Sat May  8 17:18:04 2004
  466.17 +@@ -65,6 +65,7 @@
  466.18 + }
  466.19 + 
  466.20 + /* Return the run-time load address of the shared object.  */
  466.21 ++#ifdef IS_IN_rtld
  466.22 + static inline Elf64_Addr
  466.23 + elf_machine_load_address (void)
  466.24 + {
  466.25 +@@ -84,6 +85,7 @@
  466.26 +      pc[3]*4 is l_addr + _GLOBAL_OFFSET_TABLE_ - (long)pc - 12  */
  466.27 +   return (Elf64_Addr) got - *got + (Elf32_Sword) ((pc[2] - pc[3]) * 4) - 4;
  466.28 + }
  466.29 ++#endif
  466.30 + 
  466.31 + /* We have 4 cases to handle.  And we code different code sequences
  466.32 +    for each one.  I love V9 code models...  */
   467.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   467.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-sparc64-pause.patch	Sat Feb 24 11:00:05 2007 +0000
   467.3 @@ -0,0 +1,22 @@
   467.4 +From: "M.H.VanLeeuwen" 
   467.5 +Subject: crosstool, sparc64, linux 2.6.4, gcc 3.3.3, glibc 2.3.2 success
   467.6 +Date: Mon, 15 Mar 2004 00:23:04 -0600
   467.7 +To: crossgcc@sources.redhat.com
   467.8 +Message-ID: <40554BC8.749A5EC3@megsinet.net>
   467.9 +...
  467.10 +
  467.11 +backported from GLIBC CVS
  467.12 +
  467.13 +Fixes:
  467.14 +../sysdeps/unix/sysv/linux/sparc/sparc64/pause.c:1:39: sysdeps/unix/common/pause.c: No such file or directory
  467.15 +make[2]: *** [/cross/build/sparc64-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.2/build-glibc/posix/pause.o] Error 1
  467.16 +make[2]: Leaving directory `/cross/build/sparc64-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.2/glibc-2.3.2/posix'
  467.17 +make[1]: *** [posix/subdir_lib] Error 2
  467.18 +make: *** [all] Error 2
  467.19 +
  467.20 +=========================================================================================================================
  467.21 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c.orig	Sun Mar  7 08:51:20 2004
  467.22 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c	Sun Mar  7 08:51:29 2004
  467.23 +@@ -1 +1 @@
  467.24 +-#include <sysdeps/unix/common/pause.c>
  467.25 ++#include <sysdeps/posix/pause.c>
   468.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   468.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-sparc64-pwrite64.patch	Sat Feb 24 11:00:05 2007 +0000
   468.3 @@ -0,0 +1,36 @@
   468.4 +Fix for this error:
   468.5 +
   468.6 +/cross/crosstool-0.27/build/sparc64-unknown-linux-gnu/gcc-3.3.3-glibc-2.3.2/build-glibc/libc_pic.os(.text+0xc4d28): In function `posix_fallocate64':
   468.7 +: undefined reference to `__GI___pwrite64'
   468.8 +collect2: ld returned 1 exit status
   468.9 +make[1]: *** [/cross/crosstool-0.27/build/sparc64-unknown-linux-gnu/gcc-3.3.3-glibc-2.3.2/build-glibc/libc.so] Error 1
  468.10 +
  468.11 +extracted from GLIBC CVS by M.H.VanLeeuwen
  468.12 +
  468.13 +cf. 
  468.14 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00038.html
  468.15 +
  468.16 +Originally thought we needed this hunk, too:
  468.17 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00037.html
  468.18 +but it seems the sysdep.h change is sufficient, and works better 
  468.19 +when compiling against linux-2.4.
  468.20 +
  468.21 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h.orig	Sat Mar 13 02:01:51 2004
  468.22 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h	Sat Mar 13 02:02:20 2004
  468.23 +@@ -29,6 +29,16 @@
  468.24 + #undef SYS_ify
  468.25 + #define SYS_ify(syscall_name) __NR_##syscall_name
  468.26 + 
  468.27 ++/* This is a kludge to make syscalls.list find these under the names
  468.28 ++   pread and pwrite, since some kernel headers define those names
  468.29 ++   and some define the *64 names for the same system calls.  */
  468.30 ++#if !defined __NR_pread && defined __NR_pread64
  468.31 ++# define __NR_pread __NR_pread64
  468.32 ++#endif
  468.33 ++#if !defined __NR_pwrite && defined __NR_pwrite64
  468.34 ++# define __NR_pwrite __NR_pwrite64
  468.35 ++#endif
  468.36 ++
  468.37 + #ifdef __ASSEMBLER__
  468.38 + 
  468.39 + #define LOADSYSCALL(x) mov __NR_##x, %g1
   469.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   469.2 +++ b/patches/glibc/2.3.2/glibc-2.3.2-without-fp.patch	Sat Feb 24 11:00:05 2007 +0000
   469.3 @@ -0,0 +1,89 @@
   469.4 +Sender: libc-alpha-owner@sources.redhat.com
   469.5 +Date: Tue, 29 Jul 2003 17:49:47 -0400
   469.6 +From: Daniel Jacobowitz <drow@mvista.com>
   469.7 +To: GNU C Library <libc-alpha@sources.redhat.com>
   469.8 +Subject: Re: __sim_exceptions undefined when linking glibc-2.3.2's libm.so with --without-fp
   469.9 +Message-ID: <20030729214947.GA29932@nevyn.them.org>
  469.10 +
  469.11 +On Tue, Jul 29, 2003 at 02:53:33PM -0700, Dan Kegel wrote:
  469.12 +> On ppc405, I'm getting the following when linking glibc's libm:
  469.13 +> /gcc-3.3-glibc-2.3.2/build-glibc/math/libm_pic.a(fclrexcpt.os)(.text+0x1a): 
  469.14 +> In function `feclearexcept@GLIBC_2.1':
  469.15 +> : undefined reference to `__sim_exceptions'
  469.16 +> 
  469.17 +> That symbol seems to be present in libc.so.  nm shows
  469.18 +
  469.19 +--without-fp doesn't work.  Try this.  Make up a changelog entry if it
  469.20 +works.
  469.21 +
  469.22 +Date: Tue, 29 Jul 2003 14:56:50 -0700
  469.23 +Message-Id: <200307292156.h6TLuol24356@magilla.sf.frob.com>
  469.24 +From: Roland McGrath <roland@redhat.com>
  469.25 +To: Daniel Jacobowitz <drow@mvista.com>
  469.26 +Cc: GNU C Library <libc-alpha@sources.redhat.com>
  469.27 +Subject: Re: __sim_exceptions undefined when linking glibc-2.3.2's libm.so with --without-fp
  469.28 +In-Reply-To: Daniel Jacobowitz's message of  Tuesday, 29 July 2003 17:49:47 -0400 <20030729214947.GA29932@nevyn.them.org>
  469.29 +
  469.30 +> +int __sim_exceptions __attribute__ ((section(".bss")));
  469.31 +
  469.32 +Use __attribute__ ((nocommon)) instead (and please watch the standard
  469.33 +whitespace conventions, i.e. ``section ('').
  469.34 +
  469.35 +diff -purN glibc-2.3.2.orig/sysdeps/powerpc/nofpu/sim-full.c glibc-2.3.2/sysdeps/powerpc/nofpu/sim-full.c
  469.36 +--- glibc-2.3.2.orig/sysdeps/powerpc/nofpu/sim-full.c	2002-10-19 16:06:29.000000000 -0400
  469.37 ++++ glibc-2.3.2/sysdeps/powerpc/nofpu/sim-full.c	2003-05-14 15:10:42.000000000 -0400
  469.38 +@@ -24,11 +24,14 @@
  469.39 + 
  469.40 + /* Global to store sticky exceptions.  */
  469.41 +-int __sim_exceptions;
  469.42 ++int __sim_exceptions __attribute__ ((nocommon));
  469.43 ++libc_hidden_data_def (__sim_exceptions);
  469.44 + 
  469.45 + /* By default, no exceptions should trap.  */
  469.46 + int __sim_disabled_exceptions = 0xffffffff;
  469.47 ++libc_hidden_data_def (__sim_disabled_exceptions);
  469.48 + 
  469.49 +-int __sim_round_mode;
  469.50 ++int __sim_round_mode __attribute__ ((nocommon));
  469.51 ++libc_hidden_data_def (__sim_round_mode);
  469.52 + 
  469.53 + void
  469.54 + __simulate_exceptions (int x)
  469.55 +diff -purN glibc-2.3.2.orig/sysdeps/powerpc/nofpu/soft-supp.h glibc-2.3.2/sysdeps/powerpc/nofpu/soft-supp.h
  469.56 +--- glibc-2.3.2.orig/sysdeps/powerpc/nofpu/soft-supp.h	2002-10-19 16:06:29.000000000 -0400
  469.57 ++++ glibc-2.3.2/sysdeps/powerpc/nofpu/soft-supp.h	2003-05-14 15:09:53.000000000 -0400
  469.58 +@@ -27,7 +27,11 @@ typedef union
  469.59 + } fenv_union_t;
  469.60 + 
  469.61 + 
  469.62 +-extern int __sim_exceptions attribute_hidden;
  469.63 +-extern int __sim_disabled_exceptions attribute_hidden;
  469.64 +-extern int __sim_round_mode attribute_hidden;
  469.65 ++extern int __sim_exceptions;
  469.66 ++libc_hidden_proto (__sim_exceptions);
  469.67 ++extern int __sim_disabled_exceptions;
  469.68 ++libc_hidden_proto (__sim_disabled_exceptions);
  469.69 ++extern int __sim_round_mode;
  469.70 ++libc_hidden_proto (__sim_round_mode);
  469.71 ++
  469.72 + extern void __simulate_exceptions (int x) attribute_hidden;
  469.73 +diff -urp glibc-2.3.2.orig/sysdeps/powerpc/soft-fp/sfp-machine.h glibc-2.3.2/sysdeps/powerpc/soft-fp/sfp-machine.h
  469.74 +--- glibc-2.3.2.orig/sysdeps/powerpc/soft-fp/sfp-machine.h	2002-10-17 18:36:14.000000000 -0400
  469.75 ++++ glibc-2.3.2/sysdeps/powerpc/soft-fp/sfp-machine.h	2003-05-14 16:48:13.000000000 -0400
  469.76 +@@ -52,7 +52,11 @@
  469.77 + #define FP_HANDLE_EXCEPTIONS  __simulate_exceptions (_fex)
  469.78 + #define FP_ROUNDMODE          __sim_round_mode
  469.79 + 
  469.80 +-extern int __sim_exceptions attribute_hidden;
  469.81 +-extern int __sim_disabled_exceptions attribute_hidden;
  469.82 +-extern int __sim_round_mode attribute_hidden;
  469.83 ++extern int __sim_exceptions;
  469.84 ++libc_hidden_proto (__sim_exceptions);
  469.85 ++extern int __sim_disabled_exceptions;
  469.86 ++libc_hidden_proto (__sim_disabled_exceptions);
  469.87 ++extern int __sim_round_mode;
  469.88 ++libc_hidden_proto (__sim_round_mode);
  469.89 ++
  469.90 + extern void __simulate_exceptions (int x) attribute_hidden;
  469.91 +
  469.92 +
   470.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   470.2 +++ b/patches/glibc/2.3.2/glibc-2.3.3-allow-gcc-4.0-configure.patch	Sat Feb 24 11:00:05 2007 +0000
   470.3 @@ -0,0 +1,30 @@
   470.4 +Fixes following problem building glibc-2.3.3 with gcc-4.0:
   470.5 +
   470.6 +checking version of i686-unknown-linux-gnu-gcc ... 4.0.0, bad
   470.7 +checking for gnumake... no
   470.8 +checking for gmake... gmake
   470.9 +checking version of gmake... 3.79.1, ok
  470.10 +checking for gnumsgfmt... no
  470.11 +checking for gmsgfmt... no
  470.12 +checking for msgfmt... msgfmt
  470.13 +checking version of msgfmt... 0.11.4, ok
  470.14 +checking for makeinfo... makeinfo
  470.15 +checking version of makeinfo... 4.3, ok
  470.16 +checking for sed... sed
  470.17 +checking version of sed... 4.0.5, ok
  470.18 +checking for autoconf... autoconf
  470.19 +checking whether autoconf works... yes
  470.20 +configure: error:
  470.21 +*** These critical programs are missing or too old: gcc
  470.22 +
  470.23 +--- glibc-2.3.3/configure.old	Mon Mar 14 12:01:10 2005
  470.24 ++++ glibc-2.3.3/configure	Mon Mar 14 12:02:03 2005
  470.25 +@@ -3899,7 +3899,7 @@
  470.26 +   ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
  470.27 +   case $ac_prog_version in
  470.28 +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
  470.29 +-    3.[2-9]*)
  470.30 ++    3.[2-9]*|4.[01]*)
  470.31 +        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
  470.32 +     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
  470.33 + 
   471.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   471.2 +++ b/patches/glibc/2.3.2/glibc-2.3.3-allow-gcc-4.0-powerpc-procfs.patch	Sat Feb 24 11:00:05 2007 +0000
   471.3 @@ -0,0 +1,65 @@
   471.4 +(Combined with earlier fix old/glibc-2.3.2-powerpc-procfs.patch
   471.5 +from http://sources.redhat.com/ml/libc-alpha/2003-12/msg00101.html)
   471.6 +
   471.7 +This fix discussed here:
   471.8 +http://gcc.gnu.org/ml/gcc/2005-01/msg00509.html
   471.9 +
  471.10 +Revision 1.12, Wed Mar 2 20:11:38 2005 UTC by roland
  471.11 +Branch: MAIN
  471.12 +CVS Tags: fedora-glibc-20050303T1335, HEAD
  471.13 +Changes since 1.11: +3 -8 lines
  471.14 +Diff to previous 1.11 (colored)
  471.15 +
  471.16 +2005-02-21  Alan Modra <amodra@bigpond.net.au>
  471.17 +
  471.18 +	* sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (elf_vrreg_t): Don't
  471.19 +	use __uint128_t.
  471.20 +
  471.21 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h?cvsroot=glibc
  471.22 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h.diff?r1=1.11&r2=1.12&cvsroot=glibc
  471.23 +
  471.24 +Fixes
  471.25 +
  471.26 +In file included from ../linuxthreads_db/proc_service.h:20,
  471.27 +                 from ../linuxthreads_db/thread_dbP.h:7,
  471.28 +                 from ../linuxthreads/descr.h:44,
  471.29 +                 from ../linuxthreads/internals.h:30,
  471.30 +                 from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27,
  471.31 +                 from ../sysdeps/generic/ldsodefs.h:38,
  471.32 +                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
  471.33 +                 from <stdin>:2:
  471.34 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:57: error: syntax error before 'elf_vrreg_t'
  471.35 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:57: warning: type defaults to 'int' in declaration of 'elf_vrreg_t'
  471.36 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:57: warning: data definition has no type or storage class
  471.37 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: error: syntax error before 'elf_vrregset_t'
  471.38 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: warning: type defaults to 'int' in declaration of 'elf_vrregset_t'
  471.39 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: warning: data definition has no type or storage class
  471.40 +make[2]: make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/powerpc-750-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/glibc-2.3-20050307/csu'
  471.41 +
  471.42 +Rediffed against glibc-2.3.3
  471.43 +
  471.44 +--- glibc-2.3.3.orig/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h	Sun Jan 12 00:24:23 2003
  471.45 ++++ glibc-2.3.3.new/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h	Fri Mar 18 11:20:58 2005
  471.46 +@@ -45,18 +45,13 @@
  471.47 + 
  471.48 + typedef double elf_fpreg_t;
  471.49 + typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
  471.50 +-#endif
  471.51 +-
  471.52 +-/* gcc 3.1 and newer support __uint128_t.  */
  471.53 +-#if !__GNUC_PREREQ(3,1)
  471.54 +-typedef struct {
  471.55 +-  unsigned long u[4];
  471.56 +-} __attribute((aligned(16))) __uint128_t;
  471.57 +-#endif
  471.58 + 
  471.59 + /* Altivec registers */
  471.60 +-typedef __uint128_t elf_vrreg_t;
  471.61 ++typedef struct {
  471.62 ++  unsigned int u[4];
  471.63 ++} __attribute__ ((aligned (16))) elf_vrreg_t;
  471.64 + typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG];
  471.65 ++#endif
  471.66 + 
  471.67 + struct elf_siginfo
  471.68 +   {
   472.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   472.2 +++ b/patches/glibc/2.3.2/glibc-configure-apple-as.patch	Sat Feb 24 11:00:05 2007 +0000
   472.3 @@ -0,0 +1,23 @@
   472.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
   472.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
   472.6 +
   472.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
   472.8 +where the assembler but doesn't understand the --version flag.
   472.9 +
  472.10 +Fixes the symptom
  472.11 +checking whether ld is GNU ld... no
  472.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
  472.13 +checking version of /usr/libexec/gcc/darwin/ppc/as... 
  472.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
  472.15 +
  472.16 +--- glibc-2.3.2/configure~	Wed Feb 26 09:20:48 2003
  472.17 ++++ glibc-2.3.2/configure	Fri Feb 27 13:12:53 2004
  472.18 +@@ -3789,7 +3789,7 @@
  472.19 +   # Found it, now check the version.
  472.20 +   echo "$as_me:$LINENO: checking version of $AS" >&5
  472.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
  472.22 +-  ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
  472.23 ++  ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
  472.24 +   case $ac_prog_version in
  472.25 +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
  472.26 +     2.1[3-9]*)
   473.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   473.2 +++ b/patches/glibc/2.3.2/glibc-drow-sh.patch	Sat Feb 24 11:00:05 2007 +0000
   473.3 @@ -0,0 +1,77 @@
   473.4 +[pread changes deleted, since those seem to be specific to glibc-2.3.2]
   473.5 +
   473.6 +Date: Thu, 19 Jun 2003 20:02:07 -0400
   473.7 +From: Daniel Jacobowitz <drow@false.org>
   473.8 +Subject: [linux-sh:02808] Patch needed for CVS glibc on SH
   473.9 +To: linux-sh@m17n.org, libc-alpha@sources.redhat.com
  473.10 +Message-Id: <20030620000207.GA19907@nevyn.them.org>
  473.11 +X-ML-Name: linux-sh
  473.12 +X-Mail-Count: 02808
  473.13 +X-MLServer: fml [fml 4.0.1]; post only (only members can post)
  473.14 +X-ML-Info: If you have a question, send e-mail with the body
  473.15 +	"help" (without quotes) to the address linux-sh-ctl@m17n.org;
  473.16 +	help=<mailto:linux-sh-ctl@m17n.org?body=help>
  473.17 +Mail-Followup-To: linux-sh@m17n.org, libc-alpha@sources.redhat.com
  473.18 +Content-Disposition: inline
  473.19 +User-Agent: Mutt/1.5.1i
  473.20 +Mime-Version: 1.0
  473.21 +Content-Type: text/plain; charset=us-ascii
  473.22 +Precedence: bulk
  473.23 +Lines: 74
  473.24 +List-Software: fml [fml 4.0.1]
  473.25 +List-Post: <mailto:linux-sh@m17n.org>
  473.26 +List-Owner: <mailto:linux-sh-admin@m17n.org>
  473.27 +List-Help: <mailto:linux-sh-ctl@m17n.org?body=help>
  473.28 +List-Unsubscribe: <mailto:linux-sh-ctl@m17n.org?body=unsubscribe>
  473.29 +List-Id: linux-sh.m17n.org
  473.30 +
  473.31 +I believe this flushes my current patches to make glibc work on SH.  Issues:
  473.32 + - MIPS pread functions have some wackiness in them for the MIPS calling
  473.33 +   conventions, which align long longs to even register pairs; it appears
  473.34 +   that SH does not do this.  This fixes pread64/pwrite64.
  473.35 + - st_ino is _NOT_ 64-bit in the latest SH kernel trees, or at least it
  473.36 +   wasn't when I checked in April.  --enable-kernel=2.4.x breaks terribly
  473.37 +   without this patch; the errors are along the lines of "version GLIBC_2.3
  473.38 +   not found", because that's the first consequence of a messed up inode
  473.39 +   field - ld.so compares by inodes at some point.
  473.40 +
  473.41 +-- 
  473.42 +Daniel Jacobowitz
  473.43 +MontaVista Software                         Debian GNU/Linux Developer
  473.44 +
  473.45 +2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
  473.46 +
  473.47 +	* sysdeps/unix/sysv/linux/kernel-features.h: Update kernel features
  473.48 +	for the SH architecture.
  473.49 +	* sysdeps/unix/sysv/linux/sh/pread.c: Use generic Linux version
  473.50 +	instead of the MIPS version.
  473.51 +	* sysdeps/unix/sysv/linux/sh/pread64.c: Likewise.
  473.52 +	* sysdeps/unix/sysv/linux/sh/pwrite.c: Likewise.
  473.53 +	* sysdeps/unix/sysv/linux/sh/pwrite64.c: Likewise.
  473.54 +
  473.55 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/kernel-features.h.org	2003-04-21 10:57:55.000000000 -0400
  473.56 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/kernel-features.h	2003-04-21 11:16:47.000000000 -0400
  473.57 +@@ -151,11 +151,20 @@
  473.58 + 
  473.59 + /* The changed st_ino field appeared in 2.4.0-test6.  But we cannot
  473.60 +    distinguish this version from other 2.4.0 releases.  Therefore play
  473.61 +-   save and assume it available is for 2.4.1 and up.  */
  473.62 +-#if __LINUX_KERNEL_VERSION >= 132097
  473.63 ++   save and assume it available is for 2.4.1 and up.  However, SH is lame,
  473.64 ++   and still does not have a 64-bit inode field.  */
  473.65 ++#if __LINUX_KERNEL_VERSION >= 132097 \
  473.66 ++    && !defined __sh__
  473.67 + # define __ASSUME_ST_INO_64_BIT		1
  473.68 + #endif
  473.69 + 
  473.70 ++/* SH kernels got stat64, mmap2, and truncate64 during 2.4.0-test.  */
  473.71 ++#if __LINUX_KERNEL_VERSION >= 132096 && defined __sh__
  473.72 ++# define __ASSUME_TRUNCATE64_SYSCALL	1
  473.73 ++# define __ASSUME_MMAP2_SYSCALL		1
  473.74 ++# define __ASSUME_STAT64_SYSCALL	1
  473.75 ++#endif
  473.76 ++
  473.77 + /* To support locking of large files a new fcntl() syscall was introduced
  473.78 +    in 2.4.0-test7.  We test for 2.4.1 for the earliest version we know
  473.79 +    the syscall is available.  */
  473.80 +
   474.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   474.2 +++ b/patches/glibc/2.3.2/glibc-fp-byteorder.patch	Sat Feb 24 11:00:05 2007 +0000
   474.3 @@ -0,0 +1,203 @@
   474.4 +Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
   474.5 +Author: addsub@eyou.com
   474.6 +Target: ARM
   474.7 +
   474.8 +Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
   474.9 +and makes printf("%f", 1.0) work.
  474.10 +
  474.11 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
  474.12 + It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
  474.13 + is broken' on my big-endian hardfloat FPA ARM platform. ...
  474.14 + It's definitely needed for hardfloat.  So I'd think it's needed for
  474.15 + big-endian systems in any case, and for VFP on little-endian systems
  474.16 + too.  Someone would have to verify that though.
  474.17 +
  474.18 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
  474.19 + I just had a look at glibc-20040830, and [this patch] is still needed and useful
  474.20 + for this version.  glibc-20040830 out-of-the-box still contains the
  474.21 + following wrong assumptions:
  474.22 + - sysdeps/arm/bits/endian.h: float word order is big endian (which it is
  474.23 +   not on vfp systems)
  474.24 + - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
  474.25 +   are not on big endian systems, neither on vfp systems)
  474.26 + - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
  474.27 +   (which they are not on big endian systems)
  474.28 + [This patch] seems the right solution for all of these issues.
  474.29 +
  474.30 +Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
  474.31 + It's even needed for glibc CVS, AFAICS.
  474.32 + The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
  474.33 + (currently at version 1.4) is only needed for proper VFP operation.
  474.34 + But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
  474.35 + that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
  474.36 + for proper operation of *any* FP model on big endian ARM.
  474.37 +
  474.38 +See also discussion in followups to
  474.39 +http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
  474.40 +
  474.41 +Message-ID: <276985760.37584@eyou.com>
  474.42 +Received: from unknown (HELO eyou.com) (172.16.2.2)
  474.43 + by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
  474.44 +Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
  474.45 +Date: 17 Feb 2004 10:42:38 +0800
  474.46 +Message-ID: <20040217104238.8237.qmail@eyou.com>
  474.47 +From: "add" <addsub@eyou.com>
  474.48 +To: dank@kegel.com
  474.49 +Reply-To: "add" <addsub@eyou.com>
  474.50 +Subject: Re:&nbsp;&nbsp;&nbsp;problem&nbsp;while&nbsp;building&nbsp;arm&nbsp;vfp&nbsp;softfloat&nbsp;gcc&nbsp;`
  474.51 +
  474.52 +Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
  474.53 +toolchain can printf("%f\n",1.0). So you may have a try of this
  474.54 +
  474.55 +
  474.56 +diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
  474.57 +--- glibc.old/sysdeps/arm/bits/endian.h	1999-04-12 11:59:13.000000000 -0400
  474.58 ++++ glibc.new/sysdeps/arm/bits/endian.h	2004-02-12 09:15:13.000000000 -0500
  474.59 +@@ -9,4 +9,9 @@
  474.60 + #else
  474.61 + #define __BYTE_ORDER __LITTLE_ENDIAN
  474.62 + #endif
  474.63 ++
  474.64 ++#ifdef __VFP_FP__
  474.65 ++#define __FLOAT_WORD_ORDER __BYTE_ORDER
  474.66 ++#else
  474.67 + #define __FLOAT_WORD_ORDER __BIG_ENDIAN
  474.68 ++#endif
  474.69 +diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
  474.70 +--- glibc.old/sysdeps/arm/gmp-mparam.h	2001-07-07 15:21:19.000000000 -0400
  474.71 ++++ glibc.new/sysdeps/arm/gmp-mparam.h	2004-02-12 09:15:13.000000000 -0500
  474.72 +@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
  474.73 + #define BITS_PER_SHORTINT 16
  474.74 + #define BITS_PER_CHAR 8
  474.75 + 
  474.76 +-#define IEEE_DOUBLE_BIG_ENDIAN 0
  474.77 +-#define IEEE_DOUBLE_MIXED_ENDIAN 1
  474.78 ++#if defined(__ARMEB__)
  474.79 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
  474.80 ++# define IEEE_DOUBLE_BIG_ENDIAN 1
  474.81 ++#elif defined(__VFP_FP__)
  474.82 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
  474.83 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
  474.84 ++#else
  474.85 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
  474.86 ++# define IEEE_DOUBLE_MIXED_ENDIAN 1
  474.87 ++#endif
  474.88 +diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
  474.89 +--- glibc.old/sysdeps/arm/ieee754.h	2001-07-07 15:21:19.000000000 -0400
  474.90 ++++ glibc.new/sysdeps/arm/ieee754.h	1969-12-31 19:00:00.000000000 -0500
  474.91 +@@ -1,115 +0,0 @@
  474.92 +-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
  474.93 +-   This file is part of the GNU C Library.
  474.94 +-
  474.95 +-   The GNU C Library is free software; you can redistribute it and/or
  474.96 +-   modify it under the terms of the GNU Lesser General Public
  474.97 +-   License as published by the Free Software Foundation; either
  474.98 +-   version 2.1 of the License, or (at your option) any later version.
  474.99 +-
 474.100 +-   The GNU C Library is distributed in the hope that it will be useful,
 474.101 +-   but WITHOUT ANY WARRANTY; without even the implied warranty of
 474.102 +-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 474.103 +-   Lesser General Public License for more details.
 474.104 +-
 474.105 +-   You should have received a copy of the GNU Lesser General Public
 474.106 +-   License along with the GNU C Library; if not, write to the Free
 474.107 +-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 474.108 +-   02111-1307 USA.  */
 474.109 +-
 474.110 +-#ifndef _IEEE754_H
 474.111 +-
 474.112 +-#define _IEEE754_H 1
 474.113 +-#include <features.h>
 474.114 +-
 474.115 +-#include <endian.h>
 474.116 +-
 474.117 +-__BEGIN_DECLS
 474.118 +-
 474.119 +-union ieee754_float
 474.120 +-  {
 474.121 +-    float f;
 474.122 +-
 474.123 +-    /* This is the IEEE 754 single-precision format.  */
 474.124 +-    struct
 474.125 +-      {
 474.126 +-	unsigned int mantissa:23;
 474.127 +-	unsigned int exponent:8;
 474.128 +-	unsigned int negative:1;
 474.129 +-      } ieee;
 474.130 +-
 474.131 +-    /* This format makes it easier to see if a NaN is a signalling NaN.  */
 474.132 +-    struct
 474.133 +-      {
 474.134 +-	unsigned int mantissa:22;
 474.135 +-	unsigned int quiet_nan:1;
 474.136 +-	unsigned int exponent:8;
 474.137 +-	unsigned int negative:1;
 474.138 +-      } ieee_nan;
 474.139 +-  };
 474.140 +-
 474.141 +-#define IEEE754_FLOAT_BIAS	0x7f /* Added to exponent.  */
 474.142 +-
 474.143 +-
 474.144 +-union ieee754_double
 474.145 +-  {
 474.146 +-    double d;
 474.147 +-
 474.148 +-    /* This is the IEEE 754 double-precision format.  */
 474.149 +-    struct
 474.150 +-      {
 474.151 +-	unsigned int mantissa0:20;
 474.152 +-	unsigned int exponent:11;
 474.153 +-	unsigned int negative:1;
 474.154 +-	unsigned int mantissa1:32;
 474.155 +-      } ieee;
 474.156 +-
 474.157 +-    /* This format makes it easier to see if a NaN is a signalling NaN.  */
 474.158 +-    struct
 474.159 +-      {
 474.160 +-	unsigned int mantissa0:19;
 474.161 +-	unsigned int quiet_nan:1;
 474.162 +-	unsigned int exponent:11;
 474.163 +-	unsigned int negative:1;
 474.164 +-	unsigned int mantissa1:32;
 474.165 +-      } ieee_nan;
 474.166 +-  };
 474.167 +-
 474.168 +-#define IEEE754_DOUBLE_BIAS	0x3ff /* Added to exponent.  */
 474.169 +-
 474.170 +-
 474.171 +-/* The following two structures are correct for `new' floating point systems but
 474.172 +-   wrong for the old FPPC.  The only solution seems to be to avoid their use on
 474.173 +-   old hardware.  */
 474.174 +-
 474.175 +-union ieee854_long_double
 474.176 +-  {
 474.177 +-    long double d;
 474.178 +-
 474.179 +-    /* This is the IEEE 854 double-extended-precision format.  */
 474.180 +-    struct
 474.181 +-      {
 474.182 +-	unsigned int exponent:15;
 474.183 +-	unsigned int empty:16;
 474.184 +-	unsigned int negative:1;
 474.185 +-	unsigned int mantissa1:32;
 474.186 +-	unsigned int mantissa0:32;
 474.187 +-      } ieee;
 474.188 +-
 474.189 +-    /* This is for NaNs in the IEEE 854 double-extended-precision format.  */
 474.190 +-    struct
 474.191 +-      {
 474.192 +-	unsigned int exponent:15;
 474.193 +-	unsigned int empty:16;
 474.194 +-	unsigned int negative:1;
 474.195 +-	unsigned int mantissa1:32;
 474.196 +-	unsigned int mantissa0:30;
 474.197 +-	unsigned int quiet_nan:1;
 474.198 +-	unsigned int one:1;
 474.199 +-      } ieee_nan;
 474.200 +-  };
 474.201 +-
 474.202 +-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
 474.203 +-
 474.204 +-__END_DECLS
 474.205 +-
 474.206 +-#endif /* ieee754.h */
   475.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   475.2 +++ b/patches/glibc/2.3.2/glibc-test-lowram.patch	Sat Feb 24 11:00:05 2007 +0000
   475.3 @@ -0,0 +1,14 @@
   475.4 +--- glibc-2.2.5/malloc/tst-calloc.c.old	Sun Aug  3 16:17:58 2003
   475.5 ++++ glibc-2.2.5/malloc/tst-calloc.c	Sun Aug  3 16:20:01 2003
   475.6 +@@ -24,9 +24,8 @@
   475.7 + #include <stdio.h>
   475.8 + 
   475.9 + 
  475.10 +-/* Number of samples per size.  */
  475.11 +-#define N 50000
  475.12 +-
  475.13 ++/* Number of samples per size.  This is also the maximum memory consumption in kilobytes. */
  475.14 ++#define N 8000
  475.15 + 
  475.16 + static void
  475.17 + fixed_test (int size)
   476.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   476.2 +++ b/patches/glibc/2.3.2/nobits.patch	Sat Feb 24 11:00:05 2007 +0000
   476.3 @@ -0,0 +1,27 @@
   476.4 +Fix build on architectures (like arm) where gas accepts @ as comment.
   476.5 +
   476.6 +First reported here:
   476.7 +http://sources.redhat.com/ml/libc-alpha/2003-04/msg00265.html
   476.8 +
   476.9 +In use here:
  476.10 +http://www.netwinder.org/autobuild/nw-9/patches/glibc-2.3.2-nobits.patch
  476.11 +
  476.12 +Committed to cvs:
  476.13 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/include/libc-symbols.h.diff?r1=1.52&r2=1.53&cvsroot=glibc
  476.14 +
  476.15 +===================================================================
  476.16 +RCS file: /cvs/glibc/libc/include/libc-symbols.h,v
  476.17 +retrieving revision 1.52
  476.18 +retrieving revision 1.53
  476.19 +diff -u -r1.52 -r1.53
  476.20 +--- libc/include/libc-symbols.h	2003/04/30 04:18:03	1.52
  476.21 ++++ libc/include/libc-symbols.h	2003/05/02 02:20:48	1.53
  476.22 +@@ -247,7 +247,7 @@
  476.23 +     __attribute__ ((unused, section (".gnu.warning." #symbol __sec_comment))) \
  476.24 +     = msg;
  476.25 + #  define libc_freeres_ptr(decl) \
  476.26 +-  __make_section_unallocated ("__libc_freeres_ptrs, \"aw\", @nobits") \
  476.27 ++  __make_section_unallocated ("__libc_freeres_ptrs, \"aw\", %nobits") \
  476.28 +   decl __attribute__ ((section ("__libc_freeres_ptrs" __sec_comment)))
  476.29 + #  define __libc_freeres_fn_section \
  476.30 +   __attribute__ ((section ("__libc_freeres_fn")))
   477.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   477.2 +++ b/patches/glibc/2.3.2/old/glibc-2.3.2-powerpc-procfs.patch	Sat Feb 24 11:00:05 2007 +0000
   477.3 @@ -0,0 +1,28 @@
   477.4 +See http://sources.redhat.com/ml/libc-alpha/2003-12/msg00101.html
   477.5 +Fixes
   477.6 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: error: conflicting types  for 'elf_vrreg_t' 
   477.7 +when building glibc-2.3.2 for powerpc64 and linux-2.6.x
   477.8 +
   477.9 +===================================================================
  477.10 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h,v
  477.11 +retrieving revision 1.10
  477.12 +retrieving revision 1.11
  477.13 +diff -u -r1.10 -r1.11
  477.14 +--- libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h	2003/01/12 08:24:23	1.10
  477.15 ++++ libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h	2003/12/17 23:09:34	1.11
  477.16 +@@ -45,7 +45,6 @@
  477.17 + 
  477.18 + typedef double elf_fpreg_t;
  477.19 + typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
  477.20 +-#endif
  477.21 + 
  477.22 + /* gcc 3.1 and newer support __uint128_t.  */
  477.23 + #if !__GNUC_PREREQ(3,1)
  477.24 +@@ -57,6 +56,7 @@
  477.25 + /* Altivec registers */
  477.26 + typedef __uint128_t elf_vrreg_t;
  477.27 + typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG];
  477.28 ++#endif
  477.29 + 
  477.30 + struct elf_siginfo
  477.31 +   {
   478.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   478.2 +++ b/patches/glibc/2.3.2/sscanf.patch	Sat Feb 24 11:00:05 2007 +0000
   478.3 @@ -0,0 +1,80 @@
   478.4 +2003-03-05  Roland McGrath  <roland@redhat.com>
   478.5 +
   478.6 +	* stdio-common/sscanf.c: Use prototype defn with ... syntax.
   478.7 +	* libio/swscanf.c: Likewise.
   478.8 +	* libio/swprintf.c: Likewise.
   478.9 +
  478.10 +===================================================================
  478.11 +RCS file: /cvs/glibc/libc/stdio-common/sscanf.c,v
  478.12 +retrieving revision 1.8
  478.13 +retrieving revision 1.9
  478.14 +diff -u -r1.8 -r1.9
  478.15 +--- libc/stdio-common/sscanf.c	2002/08/10 09:24:42	1.8
  478.16 ++++ libc/stdio-common/sscanf.c	2003/03/05 19:58:03	1.9
  478.17 +@@ -1,4 +1,4 @@
  478.18 +-/* Copyright (C) 1991,95,96,98,2002 Free Software Foundation, Inc.
  478.19 ++/* Copyright (C) 1991,1995,1996,1998,2002,2003 Free Software Foundation, Inc.
  478.20 +    This file is part of the GNU C Library.
  478.21 + 
  478.22 +    The GNU C Library is free software; you can redistribute it and/or
  478.23 +@@ -27,9 +27,7 @@
  478.24 + /* Read formatted input from S, according to the format string FORMAT.  */
  478.25 + /* VARARGS2 */
  478.26 + int
  478.27 +-sscanf (s, format)
  478.28 +-     const char *s;
  478.29 +-     const char *format;
  478.30 ++sscanf (const char *s, const char *format, ...)
  478.31 + {
  478.32 +   va_list arg;
  478.33 +   int done;
  478.34 +===================================================================
  478.35 +RCS file: /cvs/glibc/libc/libio/swprintf.c,v
  478.36 +retrieving revision 1.3
  478.37 +retrieving revision 1.4
  478.38 +diff -u -r1.3 -r1.4
  478.39 +--- libc/libio/swprintf.c	2001/07/06 04:55:32	1.3
  478.40 ++++ libc/libio/swprintf.c	2003/03/05 19:58:03	1.4
  478.41 +@@ -1,4 +1,5 @@
  478.42 +-/* Copyright (C) 1991,1995,1997,1998,1999,2000 Free Software Foundation, Inc.
  478.43 ++/* Copyright (C) 1991,1995,1997,1998,1999,2000,2003
  478.44 ++	Free Software Foundation, Inc.
  478.45 +    This file is part of the GNU C Library.
  478.46 + 
  478.47 +    The GNU C Library is free software; you can redistribute it and/or
  478.48 +@@ -22,10 +23,7 @@
  478.49 + /* Write formatted output into S, according to the format string FORMAT.  */
  478.50 + /* VARARGS3 */
  478.51 + int
  478.52 +-swprintf (s, n, format)
  478.53 +-     wchar_t *s;
  478.54 +-     size_t n;
  478.55 +-     const wchar_t *format;
  478.56 ++swprintf (wchar_t *s, size_t n, const wchar_t *format, ...)
  478.57 + {
  478.58 +   va_list arg;
  478.59 +   int done;
  478.60 +===================================================================
  478.61 +RCS file: /cvs/glibc/libc/libio/swscanf.c,v
  478.62 +retrieving revision 1.2
  478.63 +retrieving revision 1.3
  478.64 +diff -u -r1.2 -r1.3
  478.65 +--- libc/libio/swscanf.c	2001/07/06 04:55:32	1.2
  478.66 ++++ libc/libio/swscanf.c	2003/03/05 19:58:03	1.3
  478.67 +@@ -1,4 +1,4 @@
  478.68 +-/* Copyright (C) 1991, 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
  478.69 ++/* Copyright (C) 1991,1995,1996,1998,1999,2003 Free Software Foundation, Inc.
  478.70 +    This file is part of the GNU C Library.
  478.71 + 
  478.72 +    The GNU C Library is free software; you can redistribute it and/or
  478.73 +@@ -22,9 +22,7 @@
  478.74 + /* Read formatted input from S, according to the format string FORMAT.  */
  478.75 + /* VARARGS2 */
  478.76 + int
  478.77 +-swscanf (s, format)
  478.78 +-     const wchar_t *s;
  478.79 +-     const wchar_t *format;
  478.80 ++swscanf (const wchar_t *s, const wchar_t *format, ...)
  478.81 + {
  478.82 +   va_list arg;
  478.83 +   int done;
   479.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   479.2 +++ b/patches/glibc/2.3.2/string2-typedef.patch	Sat Feb 24 11:00:05 2007 +0000
   479.3 @@ -0,0 +1,35 @@
   479.4 +See http://gcc.gnu.org/ml/gcc/2003-08/msg00959.html
   479.5 +
   479.6 +Compiling glibc-2.3.2 with a gcc-3.4 snapshot, I'm seeing
   479.7 +a whole bunch of warnings like this:
   479.8 +
   479.9 +../string/bits/string2.h:80: warning: `packed' attribute ignored
  479.10 +../string/bits/string2.h:81: warning: `packed' attribute ignored
  479.11 +...
  479.12 +
  479.13 +Looks like it was bad code that was silently ignored by previous compilers.
  479.14 +Ulrich fixed it as follows:
  479.15 +
  479.16 +===================================================================
  479.17 +RCS file: /cvs/glibc/libc/string/bits/string2.h,v
  479.18 +retrieving revision 1.68
  479.19 +retrieving revision 1.69
  479.20 +diff -u -r1.68 -r1.69
  479.21 +--- libc/string/bits/string2.h	2002/05/25 06:10:18	1.68
  479.22 ++++ libc/string/bits/string2.h	2003/08/20 00:07:37	1.69
  479.23 +@@ -1,5 +1,5 @@
  479.24 + /* Machine-independant string function optimizations.
  479.25 +-   Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
  479.26 ++   Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
  479.27 +    This file is part of the GNU C Library.
  479.28 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
  479.29 + 
  479.30 +@@ -76,7 +76,7 @@
  479.31 +    use unaligned memory accesses.  */
  479.32 + # define __STRING2_COPY_TYPE(N) \
  479.33 +   typedef struct { unsigned char __arr[N]; }				      \
  479.34 +-    __STRING2_COPY_ARR##N __attribute__ ((packed))
  479.35 ++    __attribute__ ((__packed__)) __STRING2_COPY_ARR##N
  479.36 + __STRING2_COPY_TYPE (2);
  479.37 + __STRING2_COPY_TYPE (3);
  479.38 + __STRING2_COPY_TYPE (4);
   480.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   480.2 +++ b/patches/glibc/2.3.3/arm-ctl_bus_isa.patch	Sat Feb 24 11:00:05 2007 +0000
   480.3 @@ -0,0 +1,51 @@
   480.4 +Applies to both glibc-2.2.5 and glibc-2.3.2, and probably glibc cvs as of Aug 2004.
   480.5 +Needed to build glibc with linux kernels 2.4.23 or higher on ARM, 
   480.6 +Fixes following error:
   480.7 +
   480.8 +../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
   480.9 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
  480.10 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
  480.11 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
  480.12 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
  480.13 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
  480.14 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
  480.15 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
  480.16 +make[2]: *** [/home/dank/crosstool-0.28/build/arm-softfloat-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/misc/ioperm.o] Error 1
  480.17 +
  480.18 +cf. "[SYSCTL] BUS_ISA -> CTL_BUS_ISA",  http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html
  480.19 +
  480.20 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c.old	2003-02-20 14:22:24.000000000 -0800
  480.21 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c	2004-01-31 16:01:50.000000000 -0800
  480.22 +@@ -47,6 +47,12 @@
  480.23 + #include <asm/page.h>
  480.24 + #include <sys/sysctl.h>
  480.25 + 
  480.26 ++/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
  480.27 ++#include <linux/version.h>
  480.28 ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
  480.29 ++#define CTL_BUS_ISA BUS_ISA	/* and hope it's not the one from linux/input.h */
  480.30 ++#endif
  480.31 ++
  480.32 + #define PATH_ARM_SYSTYPE	"/etc/arm_systype"
  480.33 + #define PATH_CPUINFO		"/proc/cpuinfo"
  480.34 + 
  480.35 +@@ -80,7 +86,7 @@
  480.36 +  * Initialize I/O system.  There are several ways to get the information
  480.37 +  * we need.  Each is tried in turn until one succeeds.
  480.38 +  *
  480.39 +- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*).  This is the preferred method
  480.40 ++ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*).  This is the preferred method
  480.41 +  *    but not all kernels support it.
  480.42 +  *
  480.43 +  * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
  480.44 +@@ -100,8 +106,8 @@
  480.45 + {
  480.46 +   char systype[256];
  480.47 +   int i, n;
  480.48 +-  static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
  480.49 +-  static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
  480.50 ++  static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
  480.51 ++  static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
  480.52 +   size_t len = sizeof(io.base);
  480.53 + 
  480.54 +   if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
   481.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   481.2 +++ b/patches/glibc/2.3.3/bad/glibc-2.3.3-alpha-pwrite64.patch	Sat Feb 24 11:00:05 2007 +0000
   481.3 @@ -0,0 +1,51 @@
   481.4 +Attempted fix for this error:
   481.5 +
   481.6 +
   481.7 +crosstool-0.30/build/alpha-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.3/build-glibc/libc_pic.os(.text+0xc8bd0): In function `__posix_fallocate64_l64':
   481.8 +: undefined reference to `__GI___pwrite64'
   481.9 +collect2: ld returned 1 exit status
  481.10 +make[1]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-0.30/build/alpha-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.3/glibc-2.3.3'
  481.11 +make[1]: *** [/home/dank/queue/jobdir.fast2/crosstool-0.30/build/alpha-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.3/build-glibc/libc.so] Error 1
  481.12 +make: *** [all] Error 2
  481.13 +
  481.14 +extracted from GLIBC CVS by Dan Kegel
  481.15 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.diff?r1=1.14&r2=1.15&cvsroot=glibc'
  481.16 +(to match context of...)
  481.17 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.diff?r1=1.16&r2=1.17&cvsroot=glibc'
  481.18 +and rediffed.
  481.19 +
  481.20 +cf. 
  481.21 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00038.html
  481.22 +
  481.23 +Originally thought we needed this hunk, too:
  481.24 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00037.html
  481.25 +but it seems the sysdep.h change is sufficient, and works better 
  481.26 +when compiling against linux-2.4.
  481.27 +
  481.28 +And then rediffed again against glibc-2.3.3
  481.29 +
  481.30 +--- glibc-2.3.3.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h	Fri Jun 20 09:24:36 2003
  481.31 ++++ glibc-2.3.3/sysdeps/unix/sysv/linux/alpha/sysdep.h	Wed Mar 23 23:59:58 2005
  481.32 +@@ -1,4 +1,4 @@
  481.33 +-/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003
  481.34 ++/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004
  481.35 +    Free Software Foundation, Inc.
  481.36 +    This file is part of the GNU C Library.
  481.37 +    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
  481.38 +@@ -63,6 +63,16 @@
  481.39 + /* Help old kernel headers where particular syscalls are not available.  */
  481.40 + #ifndef __NR_semtimedop
  481.41 + # define __NR_semtimedop	423
  481.42 ++#endif
  481.43 ++
  481.44 ++/* This is a kludge to make syscalls.list find these under the names
  481.45 ++   pread and pwrite, since some kernel headers define those names
  481.46 ++   and some define the *64 names for the same system calls.  */
  481.47 ++#if !defined __NR_pread && defined __NR_pread64
  481.48 ++# define __NR_pread __NR_pread64
  481.49 ++#endif
  481.50 ++#if !defined __NR_pwrite && defined __NR_pwrite64
  481.51 ++# define __NR_pwrite __NR_pwrite64
  481.52 + #endif
  481.53 + 
  481.54 + /*
   482.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   482.2 +++ b/patches/glibc/2.3.3/fixup.patch	Sat Feb 24 11:00:05 2007 +0000
   482.3 @@ -0,0 +1,74 @@
   482.4 +Fixes
   482.5 +dl-runtime.c:56: error: conflicting types for 'fixup'
   482.6 +../sysdeps/i386/dl-machine.h:158: error: previous declaration of 'fixup' was here
   482.7 +when building with gcc-3.4.0
   482.8 +
   482.9 +First hunk:
  482.10 +Define ARCH_FIXUP_ATTRIBUTE and use it in the fixup function declarations.
  482.11 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/dl-machine.h.diff?r1=1.124&r2=1.125&cvsroot=glibc
  482.12 +
  482.13 +Second hunk:
  482.14 +If ARCH_FIXUP_ATTRIBUTE is not defined, provide dummy definition.
  482.15 +Use macro in fixup function definitions.
  482.16 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/elf/dl-runtime.c.diff?r1=1.64&r2=1.65&cvsroot=glibc
  482.17 +[rediffed against glibc-2.3.2]
  482.18 +
  482.19 +===================================================================
  482.20 +RCS file: /cvs/glibc/libc/sysdeps/i386/dl-machine.h,v
  482.21 +retrieving revision 1.124
  482.22 +retrieving revision 1.125
  482.23 +diff -u -r1.124 -r1.125
  482.24 +--- libc/sysdeps/i386/dl-machine.h	2004/03/05 10:14:49	1.124
  482.25 ++++ libc/sysdeps/i386/dl-machine.h	2004/03/09 07:42:29	1.125
  482.26 +@@ -154,11 +154,14 @@
  482.27 +    destroys the passed register information.  */
  482.28 + /* GKM FIXME: Fix trampoline to pass bounds so we can do
  482.29 +    without the `__unbounded' qualifier.  */
  482.30 +-static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset)
  482.31 +-     __attribute__ ((regparm (2), unused));
  482.32 ++#define ARCH_FIXUP_ATTRIBUTE __attribute__ ((regparm (3), unused))
  482.33 ++
  482.34 ++static ElfW(Addr) fixup (struct link_map *__unbounded l,
  482.35 ++			 ElfW(Word) reloc_offset)
  482.36 ++     ARCH_FIXUP_ATTRIBUTE;
  482.37 + static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset,
  482.38 + 				 ElfW(Addr) retaddr)
  482.39 +-     __attribute__ ((regparm (3), unused));
  482.40 ++     ARCH_FIXUP_ATTRIBUTE;
  482.41 + # endif
  482.42 + 
  482.43 + /* This code is used in dl-runtime.c to call the `fixup' function
  482.44 +===================================================================
  482.45 +--- /home/dank/downloads/glibc-2.3.2/elf/dl-runtime.c	Fri Feb  7 11:41:12 2003
  482.46 ++++ glibc-2.3.2/elf/dl-runtime.c	Thu Apr  8 22:24:26 2004
  482.47 +@@ -36,6 +36,12 @@
  482.48 + # define VERSYMIDX(sym)	(DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
  482.49 + #endif
  482.50 + 
  482.51 ++/* The fixup functions might have need special attributes.  If none
  482.52 ++   are provided define the macro as empty.  */
  482.53 ++#ifndef ARCH_FIXUP_ATTRIBUTE
  482.54 ++# define ARCH_FIXUP_ATTRIBUTE
  482.55 ++#endif
  482.56 ++
  482.57 + 
  482.58 + /* This function is called through a special trampoline from the PLT the
  482.59 +    first time each PLT entry is called.  We must perform the relocation
  482.60 +@@ -45,7 +51,7 @@
  482.61 +    function.  */
  482.62 + 
  482.63 + #ifndef ELF_MACHINE_NO_PLT
  482.64 +-static ElfW(Addr) __attribute_used__
  482.65 ++static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
  482.66 + fixup (
  482.67 + # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
  482.68 +         ELF_MACHINE_RUNTIME_FIXUP_ARGS,
  482.69 +@@ -132,7 +138,7 @@
  482.70 + 
  482.71 + #if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__
  482.72 + 
  482.73 +-static ElfW(Addr) __attribute_used__
  482.74 ++static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
  482.75 + profile_fixup (
  482.76 + #ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
  482.77 +        ELF_MACHINE_RUNTIME_FIXUP_ARGS,
   483.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   483.2 +++ b/patches/glibc/2.3.3/glibc-2.2.5-allow-gcc-4.0-malloc.patch	Sat Feb 24 11:00:05 2007 +0000
   483.3 @@ -0,0 +1,48 @@
   483.4 +Fixes
   483.5 +programs/ld-collate.c: In function 'obstack_int32_grow':
   483.6 +programs/ld-collate.c:48: error: invalid lvalue in increment
   483.7 +programs/ld-collate.c: In function 'obstack_int32_grow_fast':
   483.8 +programs/ld-collate.c:57: error: invalid lvalue in increment
   483.9 +
  483.10 +Change taken by eyeball from version 1.20 at
  483.11 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/malloc/obstack.h?cvsroot=glibc
  483.12 +
  483.13 +--- /home/dank/downloads/glibc-2.2.5/malloc/obstack.h	2001-07-05 21:55:35.000000000 -0700
  483.14 ++++ glibc-2.2.5/malloc/obstack.h	2005-03-11 16:12:16.175812224 -0800
  483.15 +@@ -423,22 +423,29 @@
  483.16 + ({ struct obstack *__o = (OBSTACK);					\
  483.17 +    if (__o->next_free + sizeof (void *) > __o->chunk_limit)		\
  483.18 +      _obstack_newchunk (__o, sizeof (void *));				\
  483.19 +-   *((void **)__o->next_free)++ = (datum);				\
  483.20 +-   (void) 0; })
  483.21 ++   obstack_ptr_grow_fast (__o, datum); })
  483.22 + 
  483.23 + # define obstack_int_grow(OBSTACK,datum)				\
  483.24 + __extension__								\
  483.25 + ({ struct obstack *__o = (OBSTACK);					\
  483.26 +    if (__o->next_free + sizeof (int) > __o->chunk_limit)		\
  483.27 +      _obstack_newchunk (__o, sizeof (int));				\
  483.28 +-   *((int *)__o->next_free)++ = (datum);				\
  483.29 ++   obstack_int_grow_fast (__o, datum); })
  483.30 ++
  483.31 ++# define obstack_ptr_grow_fast(OBSTACK,aptr)				\
  483.32 ++__extension__								\
  483.33 ++({ struct obstack *__o1 = (OBSTACK);					\
  483.34 ++   *(const void **) __o1->next_free = (aptr);				\
  483.35 ++   __o1->next_free += sizeof (const void *);				\
  483.36 +    (void) 0; })
  483.37 + 
  483.38 +-# define obstack_ptr_grow_fast(h,aptr)					\
  483.39 +-  (*((void **) (h)->next_free)++ = (aptr))
  483.40 ++# define obstack_int_grow_fast(OBSTACK,aint)				\
  483.41 ++__extension__								\
  483.42 ++({ struct obstack *__o1 = (OBSTACK);					\
  483.43 ++   *(int *) __o1->next_free = (aint);					\
  483.44 ++   __o1->next_free += sizeof (int);					\
  483.45 ++   (void) 0; })
  483.46 + 
  483.47 +-# define obstack_int_grow_fast(h,aint)					\
  483.48 +-  (*((int *) (h)->next_free)++ = (aint))
  483.49 + 
  483.50 + # define obstack_blank(OBSTACK,length)					\
  483.51 + __extension__								\
   484.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   484.2 +++ b/patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.4-inline.patch	Sat Feb 24 11:00:05 2007 +0000
   484.3 @@ -0,0 +1,23 @@
   484.4 +Fixes
   484.5 +cc1: error: invalid parameter `max-inline-insns'
   484.6 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc6/build/powerpc64-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/elf/dl-load.o] Error 1
   484.7 +when building with gcc-3.4.0, which no longer has a single
   484.8 +--max-inline-insns parameter.
   484.9 +
  484.10 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/powerpc/powerpc64/Makefile.diff?r1=1.3&r2=1.4&cvsroot=glibc
  484.11 +
  484.12 +===================================================================
  484.13 +RCS file: /cvs/glibc/libc/sysdeps/powerpc/powerpc64/Makefile,v
  484.14 +retrieving revision 1.3
  484.15 +retrieving revision 1.4
  484.16 +diff -u -r1.3 -r1.4
  484.17 +--- libc/sysdeps/powerpc/powerpc64/Makefile     2003/10/22 21:30:03     1.3
  484.18 ++++ libc/sysdeps/powerpc/powerpc64/Makefile     2004/02/20 05:43:52     1.4
  484.19 +@@ -20,5 +20,5 @@
  484.20 + 
  484.21 + ifeq ($(subdir),elf)
  484.22 + # help gcc inline asm code from dl-machine.h
  484.23 +-+cflags += --param max-inline-insns=2000
  484.24 +++cflags += -finline-limit=2000
  484.25 + endif
  484.26 +
   485.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   485.2 +++ b/patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.5-elf.patch	Sat Feb 24 11:00:05 2007 +0000
   485.3 @@ -0,0 +1,34 @@
   485.4 +
   485.5 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/elf/dl-load.c.diff?r1=1.235&r2=1.236&cvsroot=glibc
   485.6 +
   485.7 +Fixes gcc-3.5 errors
   485.8 +
   485.9 +dl-load.c: In function `_dl_map_object_from_fd':
  485.10 +dl-load.c:1179: error: invalid lvalue in assignment
  485.11 +dl-load.c:1205: error: invalid lvalue in assignment
  485.12 +
  485.13 +===================================================================
  485.14 +RCS file: /cvs/glibc/libc/elf/dl-load.c,v
  485.15 +retrieving revision 1.235
  485.16 +retrieving revision 1.236
  485.17 +diff -u -r1.235 -r1.236
  485.18 +--- libc/elf/dl-load.c	2004/02/09 07:03:48	1.235
  485.19 ++++ libc/elf/dl-load.c	2004/02/21 18:25:41	1.236
  485.20 +@@ -1228,7 +1228,7 @@
  485.21 +       }
  485.22 +     else
  485.23 +       /* Adjust the PT_PHDR value by the runtime load address.  */
  485.24 +-      (ElfW(Addr)) l->l_phdr += l->l_addr;
  485.25 ++      l->l_phdr = (ElfW(Phdr) *) ((ElfW(Addr)) l->l_phdr + l->l_addr);
  485.26 +   }
  485.27 + 
  485.28 + #ifdef USE_TLS
  485.29 +@@ -1254,7 +1254,7 @@
  485.30 + 	}
  485.31 +     }
  485.32 +   else
  485.33 +-    (ElfW(Addr)) l->l_ld += l->l_addr;
  485.34 ++    l->l_ld = (ElfW(Dyn) *) ((ElfW(Addr)) l->l_ld + l->l_addr);
  485.35 + 
  485.36 +   l->l_entry += l->l_addr;
  485.37 + 
   486.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   486.2 +++ b/patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.5-gconv.patch	Sat Feb 24 11:00:05 2007 +0000
   486.3 @@ -0,0 +1,228 @@
   486.4 +Fixes
   486.5 +gconv_open.c: In function `__gconv_open':
   486.6 +gconv_open.c:186: error: invalid lvalue in assignment
   486.7 +when building glibc-2.3.2 with gcc-3.5.
   486.8 +
   486.9 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/iconv/gconv_simple.c.diff?r1=1.59&r2=1.63&cvsroot=glibc'
  486.10 +        * (internal_ucs4_loop): Fix typo in last change.
  486.11 +
  486.12 +        * (internal_ucs4le_loop): Remove cast used as lvalue.
  486.13 +
  486.14 +        * Fix last commit.
  486.15 +
  486.16 +	* iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as lvalue.
  486.17 +	(internal_ucs4le_loop_single): Likewise.
  486.18 +	(ucs4_internal_loop): Likewise.
  486.19 +	(BODY): Likewise.
  486.20 +	(internal_ucs4_loop_single): Likewise.
  486.21 +
  486.22 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/iconv/gconv_open.c.diff?r1=1.32&r2=1.33&cvsroot=glibc'
  486.23 +	* iconv/gconv_simple.c (ucs4le_internal_loop): Remove cast used as lvalue.
  486.24 +	(internal_ucs4le_loop_single): Likewise.
  486.25 +	(ucs4_internal_loop): Likewise.
  486.26 +	(BODY): Likewise.
  486.27 +	(internal_ucs4_loop_single): Likewise.
  486.28 +
  486.29 +
  486.30 +===================================================================
  486.31 +RCS file: /cvs/glibc/libc/iconv/gconv_open.c,v
  486.32 +retrieving revision 1.32
  486.33 +retrieving revision 1.33
  486.34 +diff -u -r1.32 -r1.33
  486.35 +--- libc/iconv/gconv_open.c	2001/11/29 04:51:58	1.32
  486.36 ++++ libc/iconv/gconv_open.c	2004/02/07 15:56:32	1.33
  486.37 +@@ -1,5 +1,5 @@
  486.38 + /* Find matching transformation algorithms and initialize steps.
  486.39 +-   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  486.40 ++   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
  486.41 +    This file is part of the GNU C Library.
  486.42 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
  486.43 + 
  486.44 +@@ -182,8 +182,13 @@
  486.45 + 	      || __builtin_expect (__gconv_translit_find (runp), 0) == 0)
  486.46 + 	    lastp = runp;
  486.47 + 	  else
  486.48 +-	    /* This means we haven't found the module.  Remove it.  */
  486.49 +-	    (lastp == NULL ? trans : lastp->next) = runp->next;
  486.50 ++	    {
  486.51 ++	      /* This means we haven't found the module.  Remove it.  */
  486.52 ++	      if (lastp == NULL)
  486.53 ++		trans  = runp->next;
  486.54 ++	      else
  486.55 ++		lastp->next  = runp->next;
  486.56 ++	    }
  486.57 + 	}
  486.58 + 
  486.59 +       /* Allocate room for handle.  */
  486.60 +===================================================================
  486.61 +RCS file: /cvs/glibc/libc/iconv/gconv_simple.c,v
  486.62 +retrieving revision 1.59
  486.63 +retrieving revision 1.63
  486.64 +diff -u -r1.59 -r1.63
  486.65 +--- libc/iconv/gconv_simple.c	2003/06/11 21:36:37	1.59
  486.66 ++++ libc/iconv/gconv_simple.c	2004/03/09 10:00:31	1.63
  486.67 +@@ -1,5 +1,5 @@
  486.68 + /* Simple transformations functions.
  486.69 +-   Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
  486.70 ++   Copyright (C) 1997-2003, 2004 Free Software Foundation, Inc.
  486.71 +    This file is part of the GNU C Library.
  486.72 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
  486.73 + 
  486.74 +@@ -87,12 +87,13 @@
  486.75 + #if __BYTE_ORDER == __LITTLE_ENDIAN
  486.76 +   /* Sigh, we have to do some real work.  */
  486.77 +   size_t cnt;
  486.78 ++  uint32_t *outptr32 = (uint32_t *) outptr;
  486.79 + 
  486.80 +   for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
  486.81 +-    *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr);
  486.82 ++    *outptr32++ = bswap_32 (*(const uint32_t *) inptr);
  486.83 + 
  486.84 +   *inptrp = inptr;
  486.85 +-  *outptrp = outptr;
  486.86 ++  *outptrp = (unsigned char *) outptr32;
  486.87 + #elif __BYTE_ORDER == __BIG_ENDIAN
  486.88 +   /* Simply copy the data.  */
  486.89 +   *inptrp = inptr + n_convert * 4;
  486.90 +@@ -192,13 +193,16 @@
  486.91 +   (*outptrp)[2] = state->__value.__wchb[1];
  486.92 +   (*outptrp)[3] = state->__value.__wchb[0];
  486.93 + 
  486.94 +-  *outptrp += 4;
  486.95 + #elif __BYTE_ORDER == __BIG_ENDIAN
  486.96 +   /* XXX unaligned */
  486.97 +-  *(*((uint32_t **) outptrp)++) = state->__value.__wch;
  486.98 ++  (*outptrp)[0] = state->__value.__wchb[0];
  486.99 ++  (*outptrp)[1] = state->__value.__wchb[1];
 486.100 ++  (*outptrp)[2] = state->__value.__wchb[2];
 486.101 ++  (*outptrp)[3] = state->__value.__wchb[3];
 486.102 + #else
 486.103 + # error "This endianess is not supported."
 486.104 + #endif
 486.105 ++  *outptrp += 4;
 486.106 + 
 486.107 +   /* Clear the state buffer.  */
 486.108 +   state->__count &= ~7;
 486.109 +@@ -268,7 +272,8 @@
 486.110 + 	  return __GCONV_ILLEGAL_INPUT;
 486.111 + 	}
 486.112 + 
 486.113 +-      *((uint32_t *) outptr)++ = inval;
 486.114 ++      *((uint32_t *) outptr) = inval;
 486.115 ++      outptr += sizeof (uint32_t);
 486.116 +     }
 486.117 + 
 486.118 +   *inptrp = inptr;
 486.119 +@@ -447,9 +452,11 @@
 486.120 + #if __BYTE_ORDER == __BIG_ENDIAN
 486.121 +   /* Sigh, we have to do some real work.  */
 486.122 +   size_t cnt;
 486.123 ++  uint32_t *outptr32 = (uint32_t *) outptr;
 486.124 + 
 486.125 +   for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
 486.126 +-    *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr);
 486.127 ++    *outptr32++ = bswap_32 (*(const uint32_t *) inptr);
 486.128 ++  outptr = (unsigned char *) outptr32;
 486.129 + 
 486.130 +   *inptrp = inptr;
 486.131 +   *outptrp = outptr;
 486.132 +@@ -555,12 +562,17 @@
 486.133 +   (*outptrp)[2] = state->__value.__wchb[1];
 486.134 +   (*outptrp)[3] = state->__value.__wchb[0];
 486.135 + 
 486.136 +-  *outptrp += 4;
 486.137 + #else
 486.138 +   /* XXX unaligned */
 486.139 +-  *(*((uint32_t **) outptrp)++) = state->__value.__wch;
 486.140 ++  (*outptrp)[0] = state->__value.__wchb[0];
 486.141 ++  (*outptrp)[1] = state->__value.__wchb[1];
 486.142 ++  (*outptrp)[2] = state->__value.__wchb[2];
 486.143 ++  (*outptrp)[3] = state->__value.__wchb[3];
 486.144 ++
 486.145 + #endif
 486.146 + 
 486.147 ++  *outptrp += 4;
 486.148 ++
 486.149 +   /* Clear the state buffer.  */
 486.150 +   state->__count &= ~7;
 486.151 + 
 486.152 +@@ -626,7 +638,8 @@
 486.153 + 	  return __GCONV_ILLEGAL_INPUT;
 486.154 + 	}
 486.155 + 
 486.156 +-      *((uint32_t *) outptr)++ = inval;
 486.157 ++      *((uint32_t *) outptr) = inval;
 486.158 ++      outptr += sizeof (uint32_t);
 486.159 +     }
 486.160 + 
 486.161 +   *inptrp = inptr;
 486.162 +@@ -808,7 +821,8 @@
 486.163 +       }									      \
 486.164 +     else								      \
 486.165 +       /* It's an one byte sequence.  */					      \
 486.166 +-      *((uint32_t *) outptr)++ = *inptr++;				      \
 486.167 ++      *((uint32_t *) outptr) = *inptr++;				      \
 486.168 ++      outptr += sizeof (uint32_t);					      \
 486.169 +   }
 486.170 + #define LOOP_NEED_FLAGS
 486.171 + #include <iconv/loop.c>
 486.172 +@@ -838,7 +852,8 @@
 486.173 +       }									      \
 486.174 +     else								      \
 486.175 +       /* It's an one byte sequence.  */					      \
 486.176 +-      *outptr++ = *((const uint32_t *) inptr)++;			      \
 486.177 ++      *outptr++ = *((const uint32_t *) inptr);				      \
 486.178 ++      inptr += sizeof (uint32_t);					      \
 486.179 +   }
 486.180 + #define LOOP_NEED_FLAGS
 486.181 + #include <iconv/loop.c>
 486.182 +@@ -1032,7 +1047,8 @@
 486.183 +       }									      \
 486.184 + 									      \
 486.185 +     /* Now adjust the pointers and store the result.  */		      \
 486.186 +-    *((uint32_t *) outptr)++ = ch;					      \
 486.187 ++    *((uint32_t *) outptr) = ch;					      \
 486.188 ++    outptr += sizeof (uint32_t);					      \
 486.189 +   }
 486.190 + #define LOOP_NEED_FLAGS
 486.191 + 
 486.192 +@@ -1153,7 +1169,8 @@
 486.193 + 	STANDARD_FROM_LOOP_ERR_HANDLER (2);				      \
 486.194 +       }									      \
 486.195 + 									      \
 486.196 +-    *((uint32_t *) outptr)++ = u1;					      \
 486.197 ++    *((uint32_t *) outptr) = u1;					      \
 486.198 ++    outptr += sizeof (uint32_t);					      \
 486.199 +     inptr += 2;								      \
 486.200 +   }
 486.201 + #define LOOP_NEED_FLAGS
 486.202 +@@ -1201,7 +1218,8 @@
 486.203 +       }									      \
 486.204 +     else								      \
 486.205 +       {									      \
 486.206 +-	*((uint16_t *) outptr)++ = val;					      \
 486.207 ++	*((uint16_t *) outptr) = val;					      \
 486.208 ++        outptr += sizeof (uint16_t);					      \
 486.209 + 	inptr += 4;							      \
 486.210 +       }									      \
 486.211 +   }
 486.212 +@@ -1242,7 +1260,8 @@
 486.213 + 	continue;							      \
 486.214 +       }									      \
 486.215 + 									      \
 486.216 +-    *((uint32_t *) outptr)++ = u1;					      \
 486.217 ++    *((uint32_t *) outptr) = u1;					      \
 486.218 ++    outptr += sizeof (uint32_t);					      \
 486.219 +     inptr += 2;								      \
 486.220 +   }
 486.221 + #define LOOP_NEED_FLAGS
 486.222 +@@ -1291,7 +1310,8 @@
 486.223 +       }									      \
 486.224 +     else								      \
 486.225 +       {									      \
 486.226 +-	*((uint16_t *) outptr)++ = bswap_16 (val);			      \
 486.227 ++	*((uint16_t *) outptr) = bswap_16 (val);			      \
 486.228 ++	outptr += sizeof (uint16_t);					      \
 486.229 + 	inptr += 4;							      \
 486.230 +       }									      \
 486.231 +   }
   487.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   487.2 +++ b/patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.5-msort.patch	Sat Feb 24 11:00:05 2007 +0000
   487.3 @@ -0,0 +1,46 @@
   487.4 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/stdlib/msort.c.diff?r1=1.20&r2=1.21&cvsroot=glibc
   487.5 +
   487.6 +Fixes
   487.7 +
   487.8 +msort.c: In function `msort_with_tmp':
   487.9 +msort.c:59: error: invalid lvalue in increment
  487.10 +msort.c:59: error: invalid lvalue in increment
  487.11 +msort.c:64: error: invalid lvalue in increment
  487.12 +msort.c:64: error: invalid lvalue in increment
  487.13 +
  487.14 +when building with gcc-3.5.
  487.15 +
  487.16 +===================================================================
  487.17 +RCS file: /cvs/glibc/libc/stdlib/msort.c,v
  487.18 +retrieving revision 1.20
  487.19 +retrieving revision 1.21
  487.20 +diff -u -r1.20 -r1.21
  487.21 +--- libc/stdlib/msort.c	2002/09/24 04:20:57	1.20
  487.22 ++++ libc/stdlib/msort.c	2004/02/07 15:57:34	1.21
  487.23 +@@ -1,6 +1,6 @@
  487.24 + /* An alternative to qsort, with an identical interface.
  487.25 +    This file is part of the GNU C Library.
  487.26 +-   Copyright (C) 1992,95-97,99,2000,01,02 Free Software Foundation, Inc.
  487.27 ++   Copyright (C) 1992,95-97,99,2000,01,02,04 Free Software Foundation, Inc.
  487.28 +    Written by Mike Haertel, September 1988.
  487.29 + 
  487.30 +    The GNU C Library is free software; you can redistribute it and/or
  487.31 +@@ -56,12 +56,16 @@
  487.32 + 	if ((*cmp) (b1, b2) <= 0)
  487.33 + 	  {
  487.34 + 	    --n1;
  487.35 +-	    *((op_t *) tmp)++ = *((op_t *) b1)++;
  487.36 ++	    *((op_t *) tmp) = *((op_t *) b1);
  487.37 ++	    tmp += sizeof (op_t);
  487.38 ++	    b1 += sizeof (op_t);
  487.39 + 	  }
  487.40 + 	else
  487.41 + 	  {
  487.42 + 	    --n2;
  487.43 +-	    *((op_t *) tmp)++ = *((op_t *) b2)++;
  487.44 ++	    *((op_t *) tmp) = *((op_t *) b2);
  487.45 ++	    tmp += sizeof (op_t);
  487.46 ++	    b2 += sizeof (op_t);
  487.47 + 	  }
  487.48 +       }
  487.49 +   else
   488.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   488.2 +++ b/patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.5-sunrpc.patch	Sat Feb 24 11:00:05 2007 +0000
   488.3 @@ -0,0 +1,233 @@
   488.4 +http://sources.redhat.com/ml/libc-hacker/2004-02/msg00005.html
   488.5 +[Also in CVS, but the original patch is easier to get.]
   488.6 +
   488.7 +Fixes errors like
   488.8 +
   488.9 +clnt_perr.c: In function `_buf':
  488.10 +clnt_perr.c:67: error: invalid lvalue in assignment
  488.11 +
  488.12 +when building with gcc-3.5.
  488.13 +
  488.14 +To: libc-hacker at sources dot redhat dot com
  488.15 +Subject: Fix cast as lvalue in sunrpc
  488.16 +From: Andreas Schwab <schwab at suse dot de>
  488.17 +X-Yow: SHHHH!!  I hear SIX TATTOOED TRUCK-DRIVERS tossing ENGINE BLOCKS
  488.18 + into empty OIL DRUMS dot  dot 
  488.19 +Date: Sun, 08 Feb 2004 17:38:31 +0100
  488.20 +Message-ID: <je4qu1frw8.fsf@sykes.suse.de>
  488.21 +
  488.22 +This fixes the uses of casts as lvalue in the sunrpc code.
  488.23 +
  488.24 +Andreas.
  488.25 +
  488.26 +2004-02-08  Andreas Schwab  <schwab@suse.de>
  488.27 +
  488.28 +	* include/rpc/rpc.h: Declare thread variables with their correct
  488.29 +	type.
  488.30 +	* sunrpc/clnt_perr.c: Don't cast thread variables.
  488.31 +	* sunrpc/clnt_raw.c: Likewise.
  488.32 +	* sunrpc/clnt_simp.c: Likewise.
  488.33 +	* sunrpc/key_call.c: Likewise.
  488.34 +	* sunrpc/svcauth_des.c: Likewise.
  488.35 +	* sunrpc/svc.c: Likewise.
  488.36 +	* sunrpc/svc_raw.c: Likewise.
  488.37 +	* sunrpc/svc_simple.c: Likewise.
  488.38 +
  488.39 +Index: include/rpc/rpc.h
  488.40 +===================================================================
  488.41 +RCS file: /cvs/glibc/libc/include/rpc/rpc.h,v
  488.42 +retrieving revision 1.8
  488.43 +diff -u -p -a -r1.8 rpc.h
  488.44 +--- glibc/include/rpc/rpc.h	5 Aug 2002 22:10:59 -0000	1.8
  488.45 ++++ glibc/include/rpc/rpc.h	8 Feb 2004 14:19:14 -0000
  488.46 +@@ -17,24 +17,24 @@ struct rpc_thread_variables {
  488.47 + 	struct pollfd	*svc_pollfd_s;		/* Global, rpc_common.c */
  488.48 + 	int		svc_max_pollfd_s;	/* Global, rpc_common.c */
  488.49 + 
  488.50 +-	void		*clnt_perr_buf_s;	/* clnt_perr.c */
  488.51 ++	char		*clnt_perr_buf_s;	/* clnt_perr.c */
  488.52 + 
  488.53 +-	void		*clntraw_private_s;	/* clnt_raw.c */
  488.54 ++	struct clntraw_private_s *clntraw_private_s;	/* clnt_raw.c */
  488.55 + 
  488.56 +-	void		*callrpc_private_s;	/* clnt_simp.c */
  488.57 ++	struct callrpc_private_s *callrpc_private_s;	/* clnt_simp.c */
  488.58 + 
  488.59 +-	void		*key_call_private_s;	/* key_call.c */
  488.60 ++	struct key_call_private *key_call_private_s;	/* key_call.c */
  488.61 + 
  488.62 +-	void		*authdes_cache_s;	/* svcauth_des.c */
  488.63 +-	void		*authdes_lru_s;		/* svcauth_des.c */
  488.64 ++	struct cache_entry *authdes_cache_s;	/* svcauth_des.c */
  488.65 ++	int		*authdes_lru_s;		/* svcauth_des.c */
  488.66 + 
  488.67 +-	void		*svc_xports_s;		/* svc.c */
  488.68 +-	void		*svc_head_s;		/* svc.c */
  488.69 ++	SVCXPRT		**svc_xports_s;		/* svc.c */
  488.70 ++	struct svc_callout *svc_head_s;		/* svc.c */
  488.71 + 
  488.72 +-	void		*svcraw_private_s;	/* svc_raw.c */
  488.73 ++	struct svcraw_private_s *svcraw_private_s;	/* svc_raw.c */
  488.74 + 
  488.75 +-	void		*svcsimple_proglst_s;	/* svc_simple.c */
  488.76 +-	void		*svcsimple_transp_s;	/* svc_simple.c */
  488.77 ++	struct proglst_ *svcsimple_proglst_s;	/* svc_simple.c */
  488.78 ++	SVCXPRT		*svcsimple_transp_s;	/* svc_simple.c */
  488.79 + };
  488.80 + 
  488.81 + extern struct rpc_thread_variables *__rpc_thread_variables(void)
  488.82 +Index: sunrpc/clnt_perr.c
  488.83 +===================================================================
  488.84 +RCS file: /cvs/glibc/libc/sunrpc/clnt_perr.c,v
  488.85 +retrieving revision 1.19
  488.86 +diff -u -p -a -r1.19 clnt_perr.c
  488.87 +--- glibc/sunrpc/clnt_perr.c	1 Nov 2002 20:43:54 -0000	1.19
  488.88 ++++ glibc/sunrpc/clnt_perr.c	8 Feb 2004 14:19:14 -0000
  488.89 +@@ -55,7 +55,7 @@ static char *auth_errmsg (enum auth_stat
  488.90 +  * buf variable in a few functions.  Overriding a global variable
  488.91 +  * with a local variable of the same name is a bad idea, anyway.
  488.92 +  */
  488.93 +-#define buf ((char *)RPC_THREAD_VARIABLE(clnt_perr_buf_s))
  488.94 ++#define buf RPC_THREAD_VARIABLE(clnt_perr_buf_s)
  488.95 + #else
  488.96 + static char *buf;
  488.97 + #endif
  488.98 +Index: sunrpc/clnt_raw.c
  488.99 +===================================================================
 488.100 +RCS file: /cvs/glibc/libc/sunrpc/clnt_raw.c,v
 488.101 +retrieving revision 1.10
 488.102 +diff -u -p -a -r1.10 clnt_raw.c
 488.103 +--- glibc/sunrpc/clnt_raw.c	15 May 2002 00:21:00 -0000	1.10
 488.104 ++++ glibc/sunrpc/clnt_raw.c	8 Feb 2004 14:19:14 -0000
 488.105 +@@ -61,7 +61,7 @@ struct clntraw_private_s
 488.106 +     u_int mcnt;
 488.107 +   };
 488.108 + #ifdef _RPC_THREAD_SAFE_
 488.109 +-#define clntraw_private ((struct clntraw_private_s *)RPC_THREAD_VARIABLE(clntraw_private_s))
 488.110 ++#define clntraw_private RPC_THREAD_VARIABLE(clntraw_private_s)
 488.111 + #else
 488.112 + static struct clntraw_private_s *clntraw_private;
 488.113 + #endif
 488.114 +Index: sunrpc/clnt_simp.c
 488.115 +===================================================================
 488.116 +RCS file: /cvs/glibc/libc/sunrpc/clnt_simp.c,v
 488.117 +retrieving revision 1.14
 488.118 +diff -u -p -a -r1.14 clnt_simp.c
 488.119 +--- glibc/sunrpc/clnt_simp.c	15 May 2002 00:21:00 -0000	1.14
 488.120 ++++ glibc/sunrpc/clnt_simp.c	8 Feb 2004 14:19:14 -0000
 488.121 +@@ -55,7 +55,7 @@ struct callrpc_private_s
 488.122 +     char *oldhost;
 488.123 +   };
 488.124 + #ifdef _RPC_THREAD_SAFE_
 488.125 +-#define callrpc_private ((struct callrpc_private_s *)RPC_THREAD_VARIABLE(callrpc_private_s))
 488.126 ++#define callrpc_private RPC_THREAD_VARIABLE(callrpc_private_s)
 488.127 + #else
 488.128 + static struct callrpc_private_s *callrpc_private;
 488.129 + #endif
 488.130 +Index: sunrpc/key_call.c
 488.131 +===================================================================
 488.132 +RCS file: /cvs/glibc/libc/sunrpc/key_call.c,v
 488.133 +retrieving revision 1.16
 488.134 +diff -u -p -a -r1.16 key_call.c
 488.135 +--- glibc/sunrpc/key_call.c	6 Aug 2002 06:08:50 -0000	1.16
 488.136 ++++ glibc/sunrpc/key_call.c	8 Feb 2004 14:19:14 -0000
 488.137 +@@ -370,7 +370,7 @@ struct  key_call_private {
 488.138 +   uid_t   uid;            /* user-id at last authorization */
 488.139 + };
 488.140 + #ifdef _RPC_THREAD_SAFE_
 488.141 +-#define key_call_private_main ((struct  key_call_private *)RPC_THREAD_VARIABLE(key_call_private_s))
 488.142 ++#define key_call_private_main RPC_THREAD_VARIABLE(key_call_private_s)
 488.143 + #else
 488.144 + static struct key_call_private *key_call_private_main;
 488.145 + #endif
 488.146 +Index: sunrpc/svc.c
 488.147 +===================================================================
 488.148 +RCS file: /cvs/glibc/libc/sunrpc/svc.c,v
 488.149 +retrieving revision 1.17
 488.150 +diff -u -p -a -r1.17 svc.c
 488.151 +--- glibc/sunrpc/svc.c	29 Aug 2003 07:45:18 -0000	1.17
 488.152 ++++ glibc/sunrpc/svc.c	8 Feb 2004 14:19:14 -0000
 488.153 +@@ -44,7 +44,7 @@
 488.154 + #include <sys/poll.h>
 488.155 + 
 488.156 + #ifdef _RPC_THREAD_SAFE_
 488.157 +-#define xports ((SVCXPRT **)RPC_THREAD_VARIABLE(svc_xports_s))
 488.158 ++#define xports RPC_THREAD_VARIABLE(svc_xports_s)
 488.159 + #else
 488.160 + static SVCXPRT **xports;
 488.161 + #endif
 488.162 +@@ -63,7 +63,7 @@ struct svc_callout {
 488.163 +   void (*sc_dispatch) (struct svc_req *, SVCXPRT *);
 488.164 + };
 488.165 + #ifdef _RPC_THREAD_SAFE_
 488.166 +-#define svc_head ((struct svc_callout *)RPC_THREAD_VARIABLE(svc_head_s))
 488.167 ++#define svc_head RPC_THREAD_VARIABLE(svc_head_s)
 488.168 + #else
 488.169 + static struct svc_callout *svc_head;
 488.170 + #endif
 488.171 +Index: sunrpc/svc_raw.c
 488.172 +===================================================================
 488.173 +RCS file: /cvs/glibc/libc/sunrpc/svc_raw.c,v
 488.174 +retrieving revision 1.5
 488.175 +diff -u -p -a -r1.5 svc_raw.c
 488.176 +--- glibc/sunrpc/svc_raw.c	26 Feb 2002 01:43:56 -0000	1.5
 488.177 ++++ glibc/sunrpc/svc_raw.c	8 Feb 2004 14:19:14 -0000
 488.178 +@@ -54,7 +54,7 @@ struct svcraw_private_s
 488.179 +     char verf_body[MAX_AUTH_BYTES];
 488.180 +   };
 488.181 + #ifdef _RPC_THREAD_SAFE_
 488.182 +-#define svcraw_private ((struct svcraw_private_s *)RPC_THREAD_VARIABLE(svcraw_private_s))
 488.183 ++#define svcraw_private RPC_THREAD_VARIABLE(svcraw_private_s)
 488.184 + #else
 488.185 + static struct svcraw_private_s *svcraw_private;
 488.186 + #endif
 488.187 +Index: sunrpc/svc_simple.c
 488.188 +===================================================================
 488.189 +RCS file: /cvs/glibc/libc/sunrpc/svc_simple.c,v
 488.190 +retrieving revision 1.16
 488.191 +diff -u -p -a -r1.16 svc_simple.c
 488.192 +--- glibc/sunrpc/svc_simple.c	6 Aug 2002 05:10:30 -0000	1.16
 488.193 ++++ glibc/sunrpc/svc_simple.c	8 Feb 2004 14:19:14 -0000
 488.194 +@@ -61,7 +61,7 @@ struct proglst_
 488.195 +     struct proglst_ *p_nxt;
 488.196 +   };
 488.197 + #ifdef _RPC_THREAD_SAFE_
 488.198 +-#define proglst ((struct proglst_ *)RPC_THREAD_VARIABLE(svcsimple_proglst_s))
 488.199 ++#define proglst RPC_THREAD_VARIABLE(svcsimple_proglst_s)
 488.200 + #else
 488.201 + static struct proglst_ *proglst;
 488.202 + #endif
 488.203 +@@ -69,7 +69,7 @@ static struct proglst_ *proglst;
 488.204 + 
 488.205 + static void universal (struct svc_req *rqstp, SVCXPRT *transp_s);
 488.206 + #ifdef _RPC_THREAD_SAFE_
 488.207 +-#define transp ((SVCXPRT *)RPC_THREAD_VARIABLE(svcsimple_transp_s))
 488.208 ++#define transp RPC_THREAD_VARIABLE(svcsimple_transp_s)
 488.209 + #else
 488.210 + static SVCXPRT *transp;
 488.211 + #endif
 488.212 +Index: sunrpc/svcauth_des.c
 488.213 +===================================================================
 488.214 +RCS file: /cvs/glibc/libc/sunrpc/svcauth_des.c,v
 488.215 +retrieving revision 1.8
 488.216 +diff -u -p -a -r1.8 svcauth_des.c
 488.217 +--- glibc/sunrpc/svcauth_des.c	20 Aug 2001 06:37:09 -0000	1.8
 488.218 ++++ glibc/sunrpc/svcauth_des.c	8 Feb 2004 14:19:14 -0000
 488.219 +@@ -72,8 +72,8 @@ struct cache_entry
 488.220 +     char *localcred;		/* generic local credential */
 488.221 +   };
 488.222 + #ifdef _RPC_THREAD_SAFE_
 488.223 +-#define authdes_cache ((struct cache_entry *)RPC_THREAD_VARIABLE(authdes_cache_s))
 488.224 +-#define authdes_lru ((int *)RPC_THREAD_VARIABLE(authdes_lru_s))
 488.225 ++#define authdes_cache RPC_THREAD_VARIABLE(authdes_cache_s)
 488.226 ++#define authdes_lru RPC_THREAD_VARIABLE(authdes_lru_s)
 488.227 + #else
 488.228 + static struct cache_entry *authdes_cache;
 488.229 + static int *authdes_lru;
 488.230 +
 488.231 +-- 
 488.232 +Andreas Schwab, SuSE Labs, schwab@suse.de
 488.233 +SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
 488.234 +Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
 488.235 +"And now for something completely different."
 488.236 +
   489.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   489.2 +++ b/patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.5-xdr.patch	Sat Feb 24 11:00:05 2007 +0000
   489.3 @@ -0,0 +1,44 @@
   489.4 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sunrpc/rpc/xdr.h.diff?r1=1.27&r2=1.28&cvsroot=glibc
   489.5 +(but see also http://sources.redhat.com/ml/libc-alpha/2004-03/msg00267.html
   489.6 +and http://gcc.gnu.org/ml/gcc-patches/2004-03/msg02056.html)
   489.7 +
   489.8 +Fixes errors
   489.9 +
  489.10 +rpc_cmsg.c: In function `xdr_callmsg':
  489.11 +rpc_cmsg.c:70: error: invalid lvalue in increment
  489.12 +rpc_cmsg.c:71: error: invalid lvalue in increment
  489.13 +rpc_cmsg.c:74: error: invalid lvalue in increment
  489.14 +rpc_cmsg.c:77: error: invalid lvalue in increment
  489.15 +rpc_cmsg.c:78: error: invalid lvalue in increment
  489.16 +rpc_cmsg.c:79: error: invalid lvalue in increment
  489.17 +rpc_cmsg.c:81: error: invalid lvalue in increment
  489.18 +rpc_cmsg.c:89: error: invalid lvalue in increment
  489.19 +rpc_cmsg.c:106: error: invalid lvalue in increment
  489.20 +rpc_cmsg.c:107: error: invalid lvalue in increment
  489.21 +rpc_cmsg.c:112: error: invalid lvalue in increment
  489.22 +rpc_cmsg.c:117: error: invalid lvalue in increment
  489.23 +rpc_cmsg.c:118: error: invalid lvalue in increment
  489.24 +rpc_cmsg.c:119: error: invalid lvalue in increment
  489.25 +rpc_cmsg.c:121: error: invalid lvalue in increment
  489.26 +rpc_cmsg.c:160: error: invalid lvalue in increment
  489.27 +
  489.28 +===================================================================
  489.29 +RCS file: /cvs/glibc/libc/sunrpc/rpc/xdr.h,v
  489.30 +retrieving revision 1.27
  489.31 +retrieving revision 1.28
  489.32 +diff -u -r1.27 -r1.28
  489.33 +--- libc/sunrpc/rpc/xdr.h	2002/12/16 02:05:49	1.27
  489.34 ++++ libc/sunrpc/rpc/xdr.h	2004/03/22 10:52:33	1.28
  489.35 +@@ -262,10 +262,8 @@
  489.36 +  * and shouldn't be used any longer. Code which use this defines or longs
  489.37 +  * in the RPC code will not work on 64bit Solaris platforms !
  489.38 +  */
  489.39 +-#define IXDR_GET_LONG(buf) \
  489.40 +-	((long)ntohl((u_long)*__extension__((u_int32_t*)(buf))++))
  489.41 +-#define IXDR_PUT_LONG(buf, v) \
  489.42 +-	(*__extension__((u_int32_t*)(buf))++ = (long)htonl((u_long)(v)))
  489.43 ++#define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf))
  489.44 ++#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v)))
  489.45 + #define IXDR_GET_U_LONG(buf)	      ((u_long)IXDR_GET_LONG(buf))
  489.46 + #define IXDR_PUT_U_LONG(buf, v)	      IXDR_PUT_LONG(buf, (long)(v))
  489.47 + 
   490.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   490.2 +++ b/patches/glibc/2.3.3/glibc-2.3.2-arm-fix-strlen.patch	Sat Feb 24 11:00:05 2007 +0000
   490.3 @@ -0,0 +1,54 @@
   490.4 +See also
   490.5 +http://lists.gnu.org/archive/html/bug-glibc/2002-12/msg00056.html
   490.6 +http://lists.arm.linux.org.uk/pipermail/linux-arm-toolchain/2004-June/000016.html
   490.7 +
   490.8 +2002-12-12  Andreas Schwab  <schwab@suse.de>
   490.9 +        * sysdeps/arm/strlen.S: Fix last word check for big endian.
  490.10 +
  490.11 +To: libc-alpha at sources dot redhat dot com
  490.12 +Subject: [PATCH] REPOST: ARM big-endian strlen() fix
  490.13 +References: <m3brjy27mo.fsf@defiant.pm.waw.pl>
  490.14 +From: Krzysztof Halasa <khc at pm dot waw dot pl>
  490.15 +Date: Thu, 10 Jun 2004 13:41:44 +0200
  490.16 +Message-ID: <m3r7sn8wsn.fsf@defiant.pm.waw.pl>
  490.17 +MIME-Version: 1.0
  490.18 +Content-Type: multipart/mixed; boundary="=-=-="
  490.19 +
  490.20 +--=-=-=
  490.21 +
  490.22 +The attached patch fixes strlen() on big-endian ARM. Please apply.
  490.23 +Thanks.
  490.24 +-- 
  490.25 +Krzysztof Halasa, B*FH
  490.26 +
  490.27 +--=-=-=
  490.28 +Content-Type: text/x-patch
  490.29 +Content-Disposition: inline; filename=glibc-strlen.patch
  490.30 +
  490.31 +--- glibc-2.3.3.old/sysdeps/arm/strlen.S	2003-04-30 00:47:20.000000000 +0200
  490.32 ++++ glibc-2.3.3/sysdeps/arm/strlen.S	2004-06-06 03:21:48.351931240 +0200
  490.33 +@@ -53,12 +53,21 @@
  490.34 + 	ldrne   r2, [r1], $4            @ and we continue to the next word
  490.35 + 	bne     Laligned                @
  490.36 + Llastword:				@ drop through to here once we find a
  490.37 ++#ifdef __ARMEB__
  490.38 ++	tst     r2, $0xff000000         @ word that has a zero byte in it
  490.39 ++	addne   r0, r0, $1              @
  490.40 ++	tstne   r2, $0x00ff0000         @ and add up to 3 bytes on to it
  490.41 ++	addne   r0, r0, $1              @
  490.42 ++	tstne   r2, $0x0000ff00         @ (if first three all non-zero, 4th
  490.43 ++	addne   r0, r0, $1              @  must be zero)
  490.44 ++#else
  490.45 + 	tst     r2, $0x000000ff         @ word that has a zero byte in it
  490.46 + 	addne   r0, r0, $1              @
  490.47 + 	tstne   r2, $0x0000ff00         @ and add up to 3 bytes on to it
  490.48 + 	addne   r0, r0, $1              @
  490.49 + 	tstne   r2, $0x00ff0000         @ (if first three all non-zero, 4th
  490.50 + 	addne   r0, r0, $1              @  must be zero)
  490.51 ++#endif
  490.52 + 	RETINSTR(mov,pc,lr)
  490.53 + END(strlen)
  490.54 + libc_hidden_builtin_def (strlen)
  490.55 +
  490.56 +--=-=-=--
  490.57 +
   491.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   491.2 +++ b/patches/glibc/2.3.3/glibc-2.3.2-pr139-fix.patch	Sat Feb 24 11:00:05 2007 +0000
   491.3 @@ -0,0 +1,104 @@
   491.4 +2004-04-29  Jakub Jelinek  <jakub@redhat.com>
   491.5 +
   491.6 +	* sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c (_Qp_qtoi): Use %f31
   491.7 +	for single precision register, add it to __asm clobbers [BZ #139].
   491.8 +	* sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c (_Qp_qtoui): Use %f31
   491.9 +	for single precision register, add it to __asm clobbers.
  491.10 +	* sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c (_Qp_qtoux): Use fqtox
  491.11 +	instead of fqtoi in QP_HANDLE_EXCEPTIONS.
  491.12 +	* sysdeps/sparc/sparc64/soft-fp/qp_qtox.c (_Qp_qtox): Likewise.
  491.13 +	Reported by M. H. VanLeeuwen <vanl@megsinet.net>.
  491.14 +
  491.15 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=139
  491.16 +Fixes error
  491.17 +qp_qtoi.s:261: Error: Illegal operands: There are only 32 single precision f registers; [0-31]
  491.18 +plus a couple other things vanl noticed.
  491.19 +
  491.20 +diff -ur orig/qp_qtoi.c new/qp_qtoi.c
  491.21 +--- orig/qp_qtoi.c	Sat May  1 00:40:06 2004
  491.22 ++++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c	Sat May  1 00:39:40 2004
  491.23 +@@ -1,6 +1,6 @@
  491.24 + /* Software floating-point emulation.
  491.25 +    Return (int)(*a)
  491.26 +-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
  491.27 ++   Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc.
  491.28 +    This file is part of the GNU C Library.
  491.29 +    Contributed by Richard Henderson (rth@cygnus.com) and
  491.30 + 		  Jakub Jelinek (jj@ultra.linux.cz).
  491.31 +@@ -38,9 +38,9 @@
  491.32 +   	__asm (
  491.33 + "	ldd [%1], %%f52\n"
  491.34 + "	ldd [%1+8], %%f54\n"
  491.35 +-"	fqtoi %%f52, %%f60\n"
  491.36 +-"	st %%f60, [%0]\n"
  491.37 +-"	" : : "r" (&rx), "r" (a) : QP_CLOBBER);
  491.38 ++"	fqtoi %%f52, %%f31\n"
  491.39 ++"	st %%f31, [%0]\n"
  491.40 ++"	" : : "r" (&rx), "r" (a) : QP_CLOBBER, "f31");
  491.41 + 	r = rx);
  491.42 + 
  491.43 +   return r;
  491.44 +diff -ur orig/qp_qtoui.c new/qp_qtoui.c
  491.45 +--- orig/qp_qtoui.c	Sat May  1 00:40:06 2004
  491.46 ++++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c	Sat May  1 00:39:40 2004
  491.47 +@@ -1,6 +1,6 @@
  491.48 + /* Software floating-point emulation.
  491.49 +    Return (unsigned int)(*a)
  491.50 +-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
  491.51 ++   Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc.
  491.52 +    This file is part of the GNU C Library.
  491.53 +    Contributed by Richard Henderson (rth@cygnus.com) and
  491.54 + 		  Jakub Jelinek (jj@ultra.linux.cz).
  491.55 +@@ -38,9 +38,9 @@
  491.56 +   	__asm (
  491.57 + "	ldd [%1], %%f52\n"
  491.58 + "	ldd [%1+8], %%f54\n"
  491.59 +-"	fqtoi %%f52, %%f60\n"
  491.60 +-"	st %%f60, [%0]\n"
  491.61 +-"	" : : "r" (&rx), "r" (a) : QP_CLOBBER);
  491.62 ++"	fqtoi %%f52, %%f31\n"
  491.63 ++"	st %%f31, [%0]\n"
  491.64 ++"	" : : "r" (&rx), "r" (a) : QP_CLOBBER, "f31");
  491.65 + 	r = rx);
  491.66 + 
  491.67 +   return r;
  491.68 +diff -ur orig/qp_qtoux.c new/qp_qtoux.c
  491.69 +--- orig/qp_qtoux.c	Sat May  1 00:40:06 2004
  491.70 ++++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c	Sat May  1 00:39:40 2004
  491.71 +@@ -1,6 +1,6 @@
  491.72 + /* Software floating-point emulation.
  491.73 +    Return (unsigned long)(*a)
  491.74 +-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
  491.75 ++   Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc.
  491.76 +    This file is part of the GNU C Library.
  491.77 +    Contributed by Richard Henderson (rth@cygnus.com) and
  491.78 + 		  Jakub Jelinek (jj@ultra.linux.cz).
  491.79 +@@ -38,7 +38,7 @@
  491.80 +   	__asm (
  491.81 + "	ldd [%1], %%f52\n"
  491.82 + "	ldd [%1+8], %%f54\n"
  491.83 +-"	fqtoi %%f52, %%f60\n"
  491.84 ++"	fqtox %%f52, %%f60\n"
  491.85 + "	std %%f60, [%0]\n"
  491.86 + "	" : : "r" (&rx), "r" (a) : QP_CLOBBER);
  491.87 + 	r = rx);
  491.88 +diff -ur orig/qp_qtox.c new/qp_qtox.c
  491.89 +--- orig/qp_qtox.c	Sat May  1 00:40:06 2004
  491.90 ++++ libc/sysdeps/sparc/sparc64/soft-fp/qp_qtox.c	Sat May  1 00:39:40 2004
  491.91 +@@ -1,6 +1,6 @@
  491.92 + /* Software floating-point emulation.
  491.93 +    Return (long)(*a)
  491.94 +-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
  491.95 ++   Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc.
  491.96 +    This file is part of the GNU C Library.
  491.97 +    Contributed by Richard Henderson (rth@cygnus.com) and
  491.98 + 		  Jakub Jelinek (jj@ultra.linux.cz).
  491.99 +@@ -38,7 +38,7 @@
 491.100 +   	__asm (
 491.101 + "	ldd [%1], %%f52\n"
 491.102 + "	ldd [%1+8], %%f54\n"
 491.103 +-"	fqtoi %%f52, %%f60\n"
 491.104 ++"	fqtox %%f52, %%f60\n"
 491.105 + "	std %%f60, [%0]\n"
 491.106 + "	" : : "r" (&rx), "r" (a) : QP_CLOBBER);
 491.107 + 	r = rx);
   492.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   492.2 +++ b/patches/glibc/2.3.3/glibc-2.3.2-sparc32-sysdep.patch	Sat Feb 24 11:00:05 2007 +0000
   492.3 @@ -0,0 +1,46 @@
   492.4 +Fixes the error
   492.5 +
   492.6 +<stdin>: Assembler messages:
   492.7 +<stdin>:2: Error: junk at end of line, first unrecognized character is `1' ...
   492.8 +<stdin>:2: Error: Illegal operands: PC-relative operand can't be a constant
   492.9 +make[4]: *** [/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/io/rtld-open.os] Error 1
  492.10 +make[4]: Leaving directory `/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/io'
  492.11 +make[3]: *** [/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/io/rtld-xstat64.os] Error 2
  492.12 +make[3]: Leaving directory `/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/elf'
  492.13 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/elf/rtld-libc.a] Error 2
  492.14 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc13/build/sparc-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/elf'
  492.15 +make[1]: *** [elf/subdir_lib] Error 2
  492.16 +
  492.17 +when building glibc-2.3.2 with gcc-3.4.0 for sparc32.
  492.18 +
  492.19 +The .s file left behind by -save-temps contains the big long line
  492.20 +
  492.21 +.text; .global __libc_open; .align 4; __libc_open:; .type __libc_open,@function;; mov 5, %g1; ta 0x10; bcs __syscall_error_handler; nop; .section .gnu.linkonce.t. 1 .get_pic.l7,"ax",@progbits; .globl 1 .get_pic.l7; .hidden 1 .get_pic.l7; .type 1 .get_pic.l7,@function; 1 .get_pic.l7: retl; add %o7, %l7, %l7; .previous; .subsection 3; __syscall_error_handler: save %sp,-96,%sp; sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7; call 1 .get_pic.l7; add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7; ld [%l7 + errno], %l0; st %i0, [%l0]; jmpl %i7+8, %g0; restore %g0, -1, %o0; .previous;
  492.22 + retl; nop 
  492.23 + 
  492.24 +The error messages appear to refer to the '1 .get_pic.17', e.g.
  492.25 +        .globl 1 .get_pic.l7; .hidden 1 .get_pic.l7;
  492.26 +which seems to come from
  492.27 +glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
  492.28 +where it appears originally as
  492.29 +        .globl __sparc.get_pic.l7;                                      \
  492.30 +        .hidden __sparc.get_pic.l7;                                     \
  492.31 +
  492.32 +Note that __sparc is a predefined symbol on Solaris and some other environments;
  492.33 +it's not surprising to see it predefined on Linux, too.
  492.34 +
  492.35 +
  492.36 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h.old	2004-05-15 10:23:11.000000000 -0700
  492.37 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h	2004-05-15 10:24:12.000000000 -0700
  492.38 +@@ -39,6 +39,11 @@
  492.39 + #undef END
  492.40 + #undef LOC
  492.41 + 
  492.42 ++/* gcc-3.4.0 seems to expand __sparc as a predefined preprocessor symbol, which we don't want here */
  492.43 ++#ifdef __sparc
  492.44 ++#undef __sparc
  492.45 ++#endif
  492.46 ++
  492.47 + #define ENTRY(name) \
  492.48 + 	.global C_SYMBOL_NAME(name); \
  492.49 + 	.align 4;\
   493.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   493.2 +++ b/patches/glibc/2.3.3/glibc-2.3.2-sparc64-dl-machine.patch	Sat Feb 24 11:00:05 2007 +0000
   493.3 @@ -0,0 +1,29 @@
   493.4 +See http://gcc.gnu.org/PR15345
   493.5 +
   493.6 +Quick kludge by H.J.Lu
   493.7 +Works around gcc-3.4.0 error which shows up when building glibc-2.3.2 for sparc64:
   493.8 +
   493.9 +.../sparc64-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/libc.a(dl-reloc.o)(.text+0x4b4): In function `elf_machine_load_address.3':
  493.10 +: undefined reference to `_DYNAMIC'
  493.11 +collect2: ld returned 1 exit status
  493.12 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc10/build/sparc64-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/elf/sln] Error 1
  493.13 +
  493.14 +
  493.15 +--- glibc-2.3.2/sysdeps/sparc/sparc64/dl-machine.h.orig	Sat May  8 20:54:26 2004
  493.16 ++++ glibc-2.3.2/sysdeps/sparc/sparc64/dl-machine.h	Sat May  8 17:18:04 2004
  493.17 +@@ -65,6 +65,7 @@
  493.18 + }
  493.19 + 
  493.20 + /* Return the run-time load address of the shared object.  */
  493.21 ++#ifdef IS_IN_rtld
  493.22 + static inline Elf64_Addr
  493.23 + elf_machine_load_address (void)
  493.24 + {
  493.25 +@@ -84,6 +85,7 @@
  493.26 +      pc[3]*4 is l_addr + _GLOBAL_OFFSET_TABLE_ - (long)pc - 12  */
  493.27 +   return (Elf64_Addr) got - *got + (Elf32_Sword) ((pc[2] - pc[3]) * 4) - 4;
  493.28 + }
  493.29 ++#endif
  493.30 + 
  493.31 + /* We have 4 cases to handle.  And we code different code sequences
  493.32 +    for each one.  I love V9 code models...  */
   494.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   494.2 +++ b/patches/glibc/2.3.3/glibc-2.3.2-without-fp.patch	Sat Feb 24 11:00:05 2007 +0000
   494.3 @@ -0,0 +1,89 @@
   494.4 +Sender: libc-alpha-owner@sources.redhat.com
   494.5 +Date: Tue, 29 Jul 2003 17:49:47 -0400
   494.6 +From: Daniel Jacobowitz <drow@mvista.com>
   494.7 +To: GNU C Library <libc-alpha@sources.redhat.com>
   494.8 +Subject: Re: __sim_exceptions undefined when linking glibc-2.3.2's libm.so with --without-fp
   494.9 +Message-ID: <20030729214947.GA29932@nevyn.them.org>
  494.10 +
  494.11 +On Tue, Jul 29, 2003 at 02:53:33PM -0700, Dan Kegel wrote:
  494.12 +> On ppc405, I'm getting the following when linking glibc's libm:
  494.13 +> /gcc-3.3-glibc-2.3.2/build-glibc/math/libm_pic.a(fclrexcpt.os)(.text+0x1a): 
  494.14 +> In function `feclearexcept@GLIBC_2.1':
  494.15 +> : undefined reference to `__sim_exceptions'
  494.16 +> 
  494.17 +> That symbol seems to be present in libc.so.  nm shows
  494.18 +
  494.19 +--without-fp doesn't work.  Try this.  Make up a changelog entry if it
  494.20 +works.
  494.21 +
  494.22 +Date: Tue, 29 Jul 2003 14:56:50 -0700
  494.23 +Message-Id: <200307292156.h6TLuol24356@magilla.sf.frob.com>
  494.24 +From: Roland McGrath <roland@redhat.com>
  494.25 +To: Daniel Jacobowitz <drow@mvista.com>
  494.26 +Cc: GNU C Library <libc-alpha@sources.redhat.com>
  494.27 +Subject: Re: __sim_exceptions undefined when linking glibc-2.3.2's libm.so with --without-fp
  494.28 +In-Reply-To: Daniel Jacobowitz's message of  Tuesday, 29 July 2003 17:49:47 -0400 <20030729214947.GA29932@nevyn.them.org>
  494.29 +
  494.30 +> +int __sim_exceptions __attribute__ ((section(".bss")));
  494.31 +
  494.32 +Use __attribute__ ((nocommon)) instead (and please watch the standard
  494.33 +whitespace conventions, i.e. ``section ('').
  494.34 +
  494.35 +diff -purN glibc-2.3.2.orig/sysdeps/powerpc/nofpu/sim-full.c glibc-2.3.2/sysdeps/powerpc/nofpu/sim-full.c
  494.36 +--- glibc-2.3.2.orig/sysdeps/powerpc/nofpu/sim-full.c	2002-10-19 16:06:29.000000000 -0400
  494.37 ++++ glibc-2.3.2/sysdeps/powerpc/nofpu/sim-full.c	2003-05-14 15:10:42.000000000 -0400
  494.38 +@@ -24,11 +24,14 @@
  494.39 + 
  494.40 + /* Global to store sticky exceptions.  */
  494.41 +-int __sim_exceptions;
  494.42 ++int __sim_exceptions __attribute__ ((nocommon));
  494.43 ++libc_hidden_data_def (__sim_exceptions);
  494.44 + 
  494.45 + /* By default, no exceptions should trap.  */
  494.46 + int __sim_disabled_exceptions = 0xffffffff;
  494.47 ++libc_hidden_data_def (__sim_disabled_exceptions);
  494.48 + 
  494.49 +-int __sim_round_mode;
  494.50 ++int __sim_round_mode __attribute__ ((nocommon));
  494.51 ++libc_hidden_data_def (__sim_round_mode);
  494.52 + 
  494.53 + void
  494.54 + __simulate_exceptions (int x)
  494.55 +diff -purN glibc-2.3.2.orig/sysdeps/powerpc/nofpu/soft-supp.h glibc-2.3.2/sysdeps/powerpc/nofpu/soft-supp.h
  494.56 +--- glibc-2.3.2.orig/sysdeps/powerpc/nofpu/soft-supp.h	2002-10-19 16:06:29.000000000 -0400
  494.57 ++++ glibc-2.3.2/sysdeps/powerpc/nofpu/soft-supp.h	2003-05-14 15:09:53.000000000 -0400
  494.58 +@@ -27,7 +27,11 @@ typedef union
  494.59 + } fenv_union_t;
  494.60 + 
  494.61 + 
  494.62 +-extern int __sim_exceptions attribute_hidden;
  494.63 +-extern int __sim_disabled_exceptions attribute_hidden;
  494.64 +-extern int __sim_round_mode attribute_hidden;
  494.65 ++extern int __sim_exceptions;
  494.66 ++libc_hidden_proto (__sim_exceptions);
  494.67 ++extern int __sim_disabled_exceptions;
  494.68 ++libc_hidden_proto (__sim_disabled_exceptions);
  494.69 ++extern int __sim_round_mode;
  494.70 ++libc_hidden_proto (__sim_round_mode);
  494.71 ++
  494.72 + extern void __simulate_exceptions (int x) attribute_hidden;
  494.73 +diff -urp glibc-2.3.2.orig/sysdeps/powerpc/soft-fp/sfp-machine.h glibc-2.3.2/sysdeps/powerpc/soft-fp/sfp-machine.h
  494.74 +--- glibc-2.3.2.orig/sysdeps/powerpc/soft-fp/sfp-machine.h	2002-10-17 18:36:14.000000000 -0400
  494.75 ++++ glibc-2.3.2/sysdeps/powerpc/soft-fp/sfp-machine.h	2003-05-14 16:48:13.000000000 -0400
  494.76 +@@ -52,7 +52,11 @@
  494.77 + #define FP_HANDLE_EXCEPTIONS  __simulate_exceptions (_fex)
  494.78 + #define FP_ROUNDMODE          __sim_round_mode
  494.79 + 
  494.80 +-extern int __sim_exceptions attribute_hidden;
  494.81 +-extern int __sim_disabled_exceptions attribute_hidden;
  494.82 +-extern int __sim_round_mode attribute_hidden;
  494.83 ++extern int __sim_exceptions;
  494.84 ++libc_hidden_proto (__sim_exceptions);
  494.85 ++extern int __sim_disabled_exceptions;
  494.86 ++libc_hidden_proto (__sim_disabled_exceptions);
  494.87 ++extern int __sim_round_mode;
  494.88 ++libc_hidden_proto (__sim_round_mode);
  494.89 ++
  494.90 + extern void __simulate_exceptions (int x) attribute_hidden;
  494.91 +
  494.92 +
   495.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   495.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-configure.patch	Sat Feb 24 11:00:05 2007 +0000
   495.3 @@ -0,0 +1,30 @@
   495.4 +Fixes following problem building glibc-2.3.3 with gcc-4.0:
   495.5 +
   495.6 +checking version of i686-unknown-linux-gnu-gcc ... 4.0.0, bad
   495.7 +checking for gnumake... no
   495.8 +checking for gmake... gmake
   495.9 +checking version of gmake... 3.79.1, ok
  495.10 +checking for gnumsgfmt... no
  495.11 +checking for gmsgfmt... no
  495.12 +checking for msgfmt... msgfmt
  495.13 +checking version of msgfmt... 0.11.4, ok
  495.14 +checking for makeinfo... makeinfo
  495.15 +checking version of makeinfo... 4.3, ok
  495.16 +checking for sed... sed
  495.17 +checking version of sed... 4.0.5, ok
  495.18 +checking for autoconf... autoconf
  495.19 +checking whether autoconf works... yes
  495.20 +configure: error:
  495.21 +*** These critical programs are missing or too old: gcc
  495.22 +
  495.23 +--- glibc-2.3.3/configure.old	Mon Mar 14 12:01:10 2005
  495.24 ++++ glibc-2.3.3/configure	Mon Mar 14 12:02:03 2005
  495.25 +@@ -3899,7 +3899,7 @@
  495.26 +   ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
  495.27 +   case $ac_prog_version in
  495.28 +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
  495.29 +-    3.[2-9]*)
  495.30 ++    3.[2-9]*|4.[01]*)
  495.31 +        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
  495.32 +     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
  495.33 + 
   496.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   496.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-elf-2.patch	Sat Feb 24 11:00:05 2007 +0000
   496.3 @@ -0,0 +1,53 @@
   496.4 +Fixes
   496.5 +
   496.6 +In file included from dynamic-link.h:310,
   496.7 +                 from dl-reloc.c:265:
   496.8 +do-rel.h:56: error: invalid storage class for function 'elf_dynamic_do_rela'
   496.9 +In file included from dl-reloc.c:265:
  496.10 +dynamic-link.h: In function '_dl_relocate_object':
  496.11 +dynamic-link.h:33: error: invalid storage class for function 'elf_get_dynamic_info'
  496.12 +
  496.13 +when building glibc-2.3.3 with gcc-4.0
  496.14 +2nd hunk is like http://sourceware.org/cgi-bin/cvsweb.cgi/libc/elf/dynamic-link.h.diff?r1=1.50&r2=1.51&cvsroot=glibc
  496.15 +but works with older compilers, too
  496.16 +
  496.17 +--- glibc-2.3.3/elf/do-rel.h.old	2005-03-16 13:09:37.000000000 -0800
  496.18 ++++ glibc-2.3.3/elf/do-rel.h	2005-03-16 13:10:50.000000000 -0800
  496.19 +@@ -49,7 +49,14 @@
  496.20 +    relocations; they should be set up to call _dl_runtime_resolve, rather
  496.21 +    than fully resolved now.  */
  496.22 + 
  496.23 +-static inline void __attribute__ ((always_inline))
  496.24 ++#if __GNUC__ >= 4
  496.25 ++  auto inline void
  496.26 ++#else
  496.27 ++  static inline void
  496.28 ++#endif
  496.29 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  496.30 ++  __attribute ((always_inline))
  496.31 ++#endif
  496.32 + elf_dynamic_do_rel (struct link_map *map,
  496.33 + 		    ElfW(Addr) reladdr, ElfW(Addr) relsize,
  496.34 + 		    int lazy)
  496.35 +--- glibc-2.3.3/elf/dynamic-link.h.old	2005-03-16 13:22:35.000000000 -0800
  496.36 ++++ glibc-2.3.3/elf/dynamic-link.h	2005-03-16 13:26:23.000000000 -0800
  496.37 +@@ -27,8 +27,17 @@
  496.38 + 
  496.39 + 
  496.40 + /* Read the dynamic section at DYN and fill in INFO with indices DT_*.  */
  496.41 +-
  496.42 +-static inline void __attribute__ ((unused, always_inline))
  496.43 ++#if !defined(RESOLVE) || __GNUC__ < 4
  496.44 ++static
  496.45 ++#else
  496.46 ++auto
  496.47 ++#endif
  496.48 ++inline void 
  496.49 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  496.50 ++  __attribute__ ((unused, always_inline))
  496.51 ++#else
  496.52 ++  __attribute__ ((unused))
  496.53 ++#endif
  496.54 + elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
  496.55 + {
  496.56 +   ElfW(Dyn) *dyn = l->l_ld;
   497.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   497.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-elf-3.patch	Sat Feb 24 11:00:05 2007 +0000
   497.3 @@ -0,0 +1,79 @@
   497.4 +Fixes
   497.5 +In file included from ldconfig.c:136:
   497.6 +../sysdeps/i386/dl-procinfo.c:53: error: static declaration of '_dl_x86_cap_flags' follows non-static declaration
   497.7 +../sysdeps/i386/dl-procinfo.c:61: error: previous declaration of '_dl_x86_cap_flags' was here
   497.8 +../sysdeps/i386/dl-procinfo.c:72: error: static declaration of '_dl_x86_platforms' follows non-static declaration
   497.9 +../sysdeps/i386/dl-procinfo.c:77: error: previous declaration of '_dl_x86_platforms' was here
  497.10 +make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.3/glibc-2.3.3/elf'
  497.11 +when building with gcc-4.0.
  497.12 +
  497.13 +2004-07-10  Ulrich Drepper  <drepper@redhat.com>
  497.14 +
  497.15 +        * elf/ldconfig.c: Define PROCINFO_CLASS as static before including
  497.16 +        ldsodefs.h.
  497.17 +        * sysdeps/generic/ldsodefs.h: Only define PROCINFO_CLASS if it is not
  497.18 +        already defined.
  497.19 +        * sysdeps/i386/dl-procinfo.c: Define PROCINFO_CALLS only if not
  497.20 +        already defined.
  497.21 +
  497.22 +See 
  497.23 +http://sources.redhat.com/ml/glibc-cvs/2004-q3/msg00093.html
  497.24 +http://sources.redhat.com/ml/glibc-cvs/2004-q3/msg00097.html
  497.25 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/dl-procinfo.c.diff?cvsroot=glibc&r1=1.1&r2=1.2
  497.26 +
  497.27 +rediffed against glibc-2.3.3
  497.28 +
  497.29 +diff -ur glibc-2.3.3.orig/elf/ldconfig.c glibc-2.3.3/elf/ldconfig.c
  497.30 +--- glibc-2.3.3.orig/elf/ldconfig.c	Tue Aug 26 01:07:19 2003
  497.31 ++++ glibc-2.3.3/elf/ldconfig.c	Sat Mar 19 12:02:08 2005
  497.32 +@@ -17,6 +17,7 @@
  497.33 +    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  497.34 +    02111-1307 USA.  */
  497.35 + 
  497.36 ++#define PROCINFO_CLASS static
  497.37 + #include <alloca.h>
  497.38 + #include <argp.h>
  497.39 + #include <dirent.h>
  497.40 +diff -ur glibc-2.3.3.orig/sysdeps/generic/ldsodefs.h glibc-2.3.3/sysdeps/generic/ldsodefs.h
  497.41 +--- glibc-2.3.3.orig/sysdeps/generic/ldsodefs.h	Mon Nov 24 14:56:07 2003
  497.42 ++++ glibc-2.3.3/sysdeps/generic/ldsodefs.h	Sat Mar 19 12:02:08 2005
  497.43 +@@ -348,7 +348,9 @@
  497.44 + 
  497.45 +   /* Get architecture specific definitions.  */
  497.46 + #define PROCINFO_DECL
  497.47 +-#define PROCINFO_CLASS EXTERN
  497.48 ++#ifndef PROCINFO_CLASS
  497.49 ++# define PROCINFO_CLASS EXTERN
  497.50 ++#endif
  497.51 + #include <dl-procinfo.c>
  497.52 + 
  497.53 +   /* Structure describing the dynamic linker itself.  */
  497.54 +Only in glibc-2.3.3/sysdeps/generic: ldsodefs.h~
  497.55 +diff -ur glibc-2.3.3.orig/sysdeps/i386/dl-procinfo.c glibc-2.3.3/sysdeps/i386/dl-procinfo.c
  497.56 +--- glibc-2.3.3.orig/sysdeps/i386/dl-procinfo.c	Wed Sep 24 20:54:54 2003
  497.57 ++++ glibc-2.3.3/sysdeps/i386/dl-procinfo.c	Sat Mar 19 12:02:08 2005
  497.58 +@@ -1,5 +1,5 @@
  497.59 + /* Data for i386 version of processor capability information.
  497.60 +-   Copyright (C) 2001,2002,2003 Free Software Foundation, Inc.
  497.61 ++   Copyright (C) 2001,2002,2003, 2004 Free Software Foundation, Inc.
  497.62 +    This file is part of the GNU C Library.
  497.63 +    Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
  497.64 + 
  497.65 +@@ -24,7 +24,7 @@
  497.66 +    If anything should be added here check whether the size of each string
  497.67 +    is still ok with the given array size.
  497.68 + 
  497.69 +-   All the #ifdefs in the definitions ar equite irritating but
  497.70 ++   All the #ifdefs in the definitions are quite irritating but
  497.71 +    necessary if we want to avoid duplicating the information.  There
  497.72 +    are three different modes:
  497.73 + 
  497.74 +@@ -41,7 +41,7 @@
  497.75 +   */
  497.76 + 
  497.77 + #ifndef PROCINFO_CLASS
  497.78 +-#define PROCINFO_CLASS
  497.79 ++# define PROCINFO_CLASS
  497.80 + #endif
  497.81 + 
  497.82 + #if !defined PROCINFO_DECL && defined SHARED
   498.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   498.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-i386.patch	Sat Feb 24 11:00:05 2007 +0000
   498.3 @@ -0,0 +1,111 @@
   498.4 +Fixes
   498.5 +
   498.6 +In file included from dynamic-link.h:22,
   498.7 +                 from dl-reloc.c:265:
   498.8 +../sysdeps/i386/dl-machine.h: In function '_dl_relocate_object':
   498.9 +../sysdeps/i386/dl-machine.h:395: error: invalid storage class for function 'elf_machine_rel'
  498.10 +../sysdeps/i386/dl-machine.h:539: error: invalid storage class for function 'elf_machine_rela'
  498.11 +../sysdeps/i386/dl-machine.h:640: error: invalid storage class for function 'elf_machine_rel_relative'
  498.12 +../sysdeps/i386/dl-machine.h:650: error: invalid storage class for function 'elf_machine_rela_relative'
  498.13 +../sysdeps/i386/dl-machine.h:659: error: invalid storage class for function 'elf_machine_lazy_rel'
  498.14 +../sysdeps/i386/dl-machine.h:680: error: invalid storage class for function 'elf_machine_lazy_rela'
  498.15 +make[2]: *** [/home/dank/queue/jobdir.dual2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.3/build-glibc/elf/dl-reloc.o] Error 1
  498.16 +
  498.17 +--- glibc-2.3.3/sysdeps/i386/dl-machine.h.old	Wed Mar 16 22:24:09 2005
  498.18 ++++ glibc-2.3.3/sysdeps/i386/dl-machine.h	Thu Mar 17 01:30:09 2005
  498.19 +@@ -385,7 +385,14 @@
  498.20 + /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
  498.21 +    MAP is the object containing the reloc.  */
  498.22 + 
  498.23 +-static inline void
  498.24 ++#if __GNUC__ >= 4
  498.25 ++  auto inline void
  498.26 ++#else
  498.27 ++  static inline void
  498.28 ++#endif
  498.29 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  498.30 ++  __attribute ((always_inline))
  498.31 ++#endif
  498.32 + elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
  498.33 + 		 const Elf32_Sym *sym, const struct r_found_version *version,
  498.34 + 		 void *const reloc_addr_arg)
  498.35 +@@ -529,7 +536,14 @@
  498.36 + }
  498.37 + 
  498.38 + #ifndef RTLD_BOOTSTRAP
  498.39 +-static inline void
  498.40 ++#if __GNUC__ >= 4
  498.41 ++  auto inline void
  498.42 ++#else
  498.43 ++  static inline void
  498.44 ++#endif
  498.45 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  498.46 ++  __attribute ((always_inline))
  498.47 ++#endif
  498.48 + elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
  498.49 + 		  const Elf32_Sym *sym, const struct r_found_version *version,
  498.50 + 		  void *const reloc_addr_arg)
  498.51 +@@ -631,7 +645,14 @@
  498.52 + }
  498.53 + #endif	/* !RTLD_BOOTSTRAP */
  498.54 + 
  498.55 +-static inline void
  498.56 ++#if __GNUC__ >= 4
  498.57 ++  auto inline void
  498.58 ++#else
  498.59 ++  static inline void
  498.60 ++#endif
  498.61 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  498.62 ++  __attribute ((always_inline))
  498.63 ++#endif
  498.64 + elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
  498.65 + 			  void *const reloc_addr_arg)
  498.66 + {
  498.67 +@@ -641,7 +662,14 @@
  498.68 + }
  498.69 + 
  498.70 + #ifndef RTLD_BOOTSTRAP
  498.71 +-static inline void
  498.72 ++#if __GNUC__ >= 4
  498.73 ++  auto inline void
  498.74 ++#else
  498.75 ++  static inline void
  498.76 ++#endif
  498.77 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  498.78 ++  __attribute ((always_inline))
  498.79 ++#endif
  498.80 + elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
  498.81 + 			   void *const reloc_addr_arg)
  498.82 + {
  498.83 +@@ -650,7 +678,14 @@
  498.84 + }
  498.85 + #endif	/* !RTLD_BOOTSTRAP */
  498.86 + 
  498.87 +-static inline void
  498.88 ++#if __GNUC__ >= 4
  498.89 ++  auto inline void
  498.90 ++#else
  498.91 ++  static inline void
  498.92 ++#endif
  498.93 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  498.94 ++  __attribute ((always_inline))
  498.95 ++#endif
  498.96 + elf_machine_lazy_rel (struct link_map *map,
  498.97 + 		      Elf32_Addr l_addr, const Elf32_Rel *reloc)
  498.98 + {
  498.99 +@@ -671,7 +706,14 @@
 498.100 + 
 498.101 + #ifndef RTLD_BOOTSTRAP
 498.102 + 
 498.103 +-static inline void
 498.104 ++#if __GNUC__ >= 4
 498.105 ++  auto inline void
 498.106 ++#else
 498.107 ++  static inline void
 498.108 ++#endif
 498.109 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
 498.110 ++  __attribute ((always_inline))
 498.111 ++#endif
 498.112 + elf_machine_lazy_rela (struct link_map *map,
 498.113 + 		       Elf32_Addr l_addr, const Elf32_Rela *reloc)
 498.114 + {
   499.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   499.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-iconv.patch	Sat Feb 24 11:00:05 2007 +0000
   499.3 @@ -0,0 +1,24 @@
   499.4 +Fixes
   499.5 +iconvconfig.c: In function 'write_output':
   499.6 +iconvconfig.c:1014: error: invalid storage class for function 'name_insert'
   499.7 +make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/x86_64-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.3/glibc-2.3.3/iconv'
   499.8 +
   499.9 +Like http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/iconv/iconvconfig.c.diff?r1=1.19&r2=1.20&cvsroot=glibc
  499.10 +but works with older compilers
  499.11 +
  499.12 +--- glibc-2.3.3/iconv/iconvconfig.c.old	Thu Mar 17 01:23:04 2005
  499.13 ++++ glibc-2.3.3/iconv/iconvconfig.c	Thu Mar 17 01:24:56 2005
  499.14 +@@ -1010,7 +1010,12 @@
  499.15 +   char finalname[prefix_len + sizeof (GCONV_MODULES_CACHE)];
  499.16 + 
  499.17 +   /* Function to insert the names.  */
  499.18 +-  static void name_insert (const void *nodep, VISIT value, int level)
  499.19 ++#if __GNUC__ >= 4
  499.20 ++  auto void 
  499.21 ++#else
  499.22 ++  static void 
  499.23 ++#endif
  499.24 ++  name_insert (const void *nodep, VISIT value, int level)
  499.25 +     {
  499.26 +       struct name *name;
  499.27 +       unsigned int idx;
   500.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   500.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-iconvdata-2.patch	Sat Feb 24 11:00:05 2007 +0000
   500.3 @@ -0,0 +1,124 @@
   500.4 +To: Glibc hackers <libc-hacker at sources dot redhat dot com>
   500.5 +Subject: iconvdata: Get rid of lvalue casts
   500.6 +From: Andreas Jaeger <aj at suse dot de>
   500.7 +Date: Sun, 07 Mar 2004 08:29:47 +0100
   500.8 +Message-ID: <m3fzclt8r8.fsf@gromit.moeb>
   500.9 +
  500.10 +Here's one more patch to get rid of lvalues to make GCC 3.5 happy.  It
  500.11 +generates the same code as before on my machine and passes the
  500.12 +testsuite.
  500.13 +
  500.14 +Ok to commit?
  500.15 +
  500.16 +Andreas
  500.17 +
  500.18 +2004-03-07  Andreas Jaeger  <aj@suse.de>
  500.19 +
  500.20 +	* iconvdata/iso-2022-cn-ext.c (BODY): Remove cast used as lvalue.
  500.21 +	* iconvdata/tcvn5712-1.c (EMIT_SHIFT_TO_INIT): Likewise.
  500.22 +	* iconvdata/euc-jisx0213.c (EMIT_SHIFT_TO_INIT): Likewise.
  500.23 +	* iconvdata/shift_jisx0213.c (EMIT_SHIFT_TO_INIT): Likewise.
  500.24 +	* iconvdata/tscii.c (EMIT_SHIFT_TO_INIT): Likewise.
  500.25 +
  500.26 +[rediffed to make crosstool happy]
  500.27 +
  500.28 +diff -ur glibc-2.3.3.orig/iconvdata/euc-jisx0213.c glibc-2.3.3.new/iconvdata/euc-jisx0213.c
  500.29 +--- glibc-2.3.3.orig/iconvdata/euc-jisx0213.c	Mon Dec  2 14:07:54 2002
  500.30 ++++ glibc-2.3.3.new/iconvdata/euc-jisx0213.c	Fri Mar 18 09:29:22 2005
  500.31 +@@ -1,5 +1,5 @@
  500.32 + /* Conversion from and to EUC-JISX0213.
  500.33 +-   Copyright (C) 2002 Free Software Foundation, Inc.
  500.34 ++   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
  500.35 +    This file is part of the GNU C Library.
  500.36 +    Contributed by Bruno Haible <bruno@clisp.org>, 2002.
  500.37 + 
  500.38 +@@ -83,7 +83,8 @@
  500.39 + 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
  500.40 + 	    {								      \
  500.41 + 	      /* Write out the last character.  */			      \
  500.42 +-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
  500.43 ++	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
  500.44 ++	      outbuf += sizeof (uint32_t);				      \
  500.45 + 	      data->__statep->__count = 0;				      \
  500.46 + 	    }								      \
  500.47 + 	  else								      \
  500.48 +diff -ur glibc-2.3.3.orig/iconvdata/iso-2022-cn-ext.c glibc-2.3.3.new/iconvdata/iso-2022-cn-ext.c
  500.49 +--- glibc-2.3.3.orig/iconvdata/iso-2022-cn-ext.c	Fri Jun 28 14:13:14 2002
  500.50 ++++ glibc-2.3.3.new/iconvdata/iso-2022-cn-ext.c	Fri Mar 18 09:29:22 2005
  500.51 +@@ -1,5 +1,5 @@
  500.52 + /* Conversion module for ISO-2022-CN-EXT.
  500.53 +-   Copyright (C) 2000-2002 Free Software Foundation, Inc.
  500.54 ++   Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
  500.55 +    This file is part of the GNU C Library.
  500.56 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
  500.57 + 
  500.58 +@@ -377,7 +377,8 @@
  500.59 + 	  }								      \
  500.60 +       }									      \
  500.61 + 									      \
  500.62 +-    *((uint32_t *) outptr)++ = ch;					      \
  500.63 ++    *((uint32_t *) outptr) = ch;					      \
  500.64 ++    outptr += sizeof (uint32_t);					      \
  500.65 +   }
  500.66 + #define EXTRA_LOOP_DECLS	, int *setp
  500.67 + #define INIT_PARAMS		int set = (*setp >> 3) & CURRENT_MASK; \
  500.68 +diff -ur glibc-2.3.3.orig/iconvdata/shift_jisx0213.c glibc-2.3.3.new/iconvdata/shift_jisx0213.c
  500.69 +--- glibc-2.3.3.orig/iconvdata/shift_jisx0213.c	Mon Dec  2 14:07:56 2002
  500.70 ++++ glibc-2.3.3.new/iconvdata/shift_jisx0213.c	Fri Mar 18 09:29:22 2005
  500.71 +@@ -1,5 +1,5 @@
  500.72 + /* Conversion from and to Shift_JISX0213.
  500.73 +-   Copyright (C) 2002 Free Software Foundation, Inc.
  500.74 ++   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
  500.75 +    This file is part of the GNU C Library.
  500.76 +    Contributed by Bruno Haible <bruno@clisp.org>, 2002.
  500.77 + 
  500.78 +@@ -83,7 +83,8 @@
  500.79 + 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
  500.80 + 	    {								      \
  500.81 + 	      /* Write out the last character.  */			      \
  500.82 +-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
  500.83 ++	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
  500.84 ++	      outbuf += sizeof (uint32_t);				      \
  500.85 + 	      data->__statep->__count = 0;				      \
  500.86 + 	    }								      \
  500.87 + 	  else								      \
  500.88 +diff -ur glibc-2.3.3.orig/iconvdata/tcvn5712-1.c glibc-2.3.3.new/iconvdata/tcvn5712-1.c
  500.89 +--- glibc-2.3.3.orig/iconvdata/tcvn5712-1.c	Mon Dec  2 14:07:52 2002
  500.90 ++++ glibc-2.3.3.new/iconvdata/tcvn5712-1.c	Fri Mar 18 09:29:22 2005
  500.91 +@@ -1,5 +1,5 @@
  500.92 + /* Conversion to and from TCVN5712-1.
  500.93 +-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
  500.94 ++   Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
  500.95 +    This file is part of the GNU C Library.
  500.96 +    Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
  500.97 + 
  500.98 +@@ -68,7 +68,8 @@
  500.99 + 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
 500.100 + 	    {								      \
 500.101 + 	      /* Write out the last character.  */			      \
 500.102 +-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
 500.103 ++	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
 500.104 ++	      outbuf += sizeof (uint32_t);				      \
 500.105 + 	      data->__statep->__count = 0;				      \
 500.106 + 	    }								      \
 500.107 + 	  else								      \
 500.108 +diff -ur glibc-2.3.3.orig/iconvdata/tscii.c glibc-2.3.3.new/iconvdata/tscii.c
 500.109 +--- glibc-2.3.3.orig/iconvdata/tscii.c	Mon Sep 23 20:39:45 2002
 500.110 ++++ glibc-2.3.3.new/iconvdata/tscii.c	Fri Mar 18 09:29:22 2005
 500.111 +@@ -1,5 +1,5 @@
 500.112 + /* Conversion from and to TSCII.
 500.113 +-   Copyright (C) 2002 Free Software Foundation, Inc.
 500.114 ++   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
 500.115 +    This file is part of the GNU C Library.
 500.116 +    Contributed by Bruno Haible <bruno@clisp.org>, 2002.
 500.117 + 
 500.118 +@@ -98,7 +98,8 @@
 500.119 + 		  break;						      \
 500.120 + 		}							      \
 500.121 + 	      /* Write out the pending character.  */			      \
 500.122 +-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 8;	      \
 500.123 ++	      *((uint32_t *) outbuf) = data->__statep->__count >> 8;	      \
 500.124 ++	      outbuf += sizeof (uint32_t);				      \
 500.125 + 	      /* Retrieve the successor state.  */			      \
 500.126 + 	      data->__statep->__count =					      \
 500.127 + 		tscii_next_state[(data->__statep->__count >> 4) & 0x0f];      \
   501.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   501.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-iconvdata.patch	Sat Feb 24 11:00:05 2007 +0000
   501.3 @@ -0,0 +1,142 @@
   501.4 +Fixes
   501.5 +
   501.6 +In file included from jis0208.c:23:
   501.7 +jis0208.h:32: error: array type has incomplete element type
   501.8 +when building with gcc-4.0
   501.9 +
  501.10 +In file included from cp1258.c:869:
  501.11 +../iconv/skeleton.c: In function 'gconv':
  501.12 +../iconv/skeleton.c:323: error: invalid lvalue in increment
  501.13 +
  501.14 +In file included from cp1255.c:550:
  501.15 +../iconv/skeleton.c: In function 'gconv':
  501.16 +../iconv/skeleton.c:323: error: invalid lvalue in increment
  501.17 +
  501.18 +In file included from gb18030.c:22114:
  501.19 +../iconv/loop.c: In function 'from_gb18030':
  501.20 +../iconv/loop.c:282: error: invalid lvalue in increment
  501.21 +../iconv/loop.c: In function 'from_gb18030_single':
  501.22 +../iconv/loop.c:384: error: invalid lvalue in increment
  501.23 +
  501.24 +In file included from iso8859-1.c:43:
  501.25 +../iconv/loop.c: In function 'from_iso8859_1':
  501.26 +../iconv/loop.c:311: error: invalid lvalue in increment
  501.27 +
  501.28 +Rediffed, updated for glibc-2.3.3, added:
  501.29 +
  501.30 +In file included from armscii-8.c:85:
  501.31 +../iconv/loop.c: In function 'from_armscii_8':
  501.32 +../iconv/loop.c:311: error: invalid lvalue in increment
  501.33 +../iconv/loop.c:311: error: invalid lvalue in increment
  501.34 +
  501.35 +--- glibc-2.3.3.orig/iconvdata/armscii-8.c	Mon Dec  2 14:07:52 2002
  501.36 ++++ glibc-2.3.3/iconvdata/armscii-8.c	Thu Mar 17 16:01:23 2005
  501.37 +@@ -57,11 +57,17 @@
  501.38 +     uint_fast8_t ch = *inptr;						      \
  501.39 + 									      \
  501.40 +     if (ch <= 0xa0)							      \
  501.41 +-      /* Upto and including 0xa0 the ARMSCII-8 corresponds to Unicode.  */    \
  501.42 +-      *((uint32_t *) outptr)++ = ch;					      \
  501.43 ++      {									      \
  501.44 ++        /* Upto and including 0xa0 the ARMSCII-8 corresponds to Unicode.  */  \
  501.45 ++        *((uint32_t *) outptr) = ch;					      \
  501.46 ++        outptr += sizeof (uint32_t);					      \
  501.47 ++      }									      \
  501.48 +     else if (ch >= 0xa2 && ch <= 0xfe)					      \
  501.49 +-      /* Use the table.  */						      \
  501.50 +-      *((uint32_t *) outptr)++ = map_from_armscii_8[ch - 0xa2];		      \
  501.51 ++      {									      \
  501.52 ++        /* Use the table.  */						      \
  501.53 ++        *((uint32_t *) outptr) = map_from_armscii_8[ch - 0xa2];		      \
  501.54 ++        outptr += sizeof (uint32_t);					      \
  501.55 ++      }									      \
  501.56 +     else								      \
  501.57 +       {									      \
  501.58 + 	/* This is an illegal character.  */				      \
  501.59 +diff -ur glibc-2.3.3.orig/iconvdata/cp1255.c glibc-2.3.3/iconvdata/cp1255.c
  501.60 +--- glibc-2.3.3.orig/iconvdata/cp1255.c	Mon Dec  2 14:07:52 2002
  501.61 ++++ glibc-2.3.3/iconvdata/cp1255.c	Thu Mar 17 08:20:13 2005
  501.62 +@@ -69,7 +69,8 @@
  501.63 + 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
  501.64 + 	    {								      \
  501.65 + 	      /* Write out the last character.  */			      \
  501.66 +-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
  501.67 ++	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
  501.68 ++	      outbuf += sizeof (uint32_t);				      \
  501.69 + 	      data->__statep->__count = 0;				      \
  501.70 + 	    }								      \
  501.71 + 	  else								      \
  501.72 +diff -ur glibc-2.3.3.orig/iconvdata/cp1258.c glibc-2.3.3/iconvdata/cp1258.c
  501.73 +--- glibc-2.3.3.orig/iconvdata/cp1258.c	Mon Dec  2 14:07:52 2002
  501.74 ++++ glibc-2.3.3/iconvdata/cp1258.c	Thu Mar 17 08:20:13 2005
  501.75 +@@ -70,7 +70,8 @@
  501.76 + 	  if (__builtin_expect (outbuf + 4 <= outend, 1))		      \
  501.77 + 	    {								      \
  501.78 + 	      /* Write out the last character.  */			      \
  501.79 +-	      *((uint32_t *) outbuf)++ = data->__statep->__count >> 3;	      \
  501.80 ++	      *((uint32_t *) outbuf) = data->__statep->__count >> 3;	      \
  501.81 ++	      outbuf += sizeof (uint32_t);				      \
  501.82 + 	      data->__statep->__count = 0;				      \
  501.83 + 	    }								      \
  501.84 + 	  else								      \
  501.85 +diff -ur glibc-2.3.3.orig/iconvdata/gb18030.c glibc-2.3.3/iconvdata/gb18030.c
  501.86 +--- glibc-2.3.3.orig/iconvdata/gb18030.c	Mon Dec  2 14:07:54 2002
  501.87 ++++ glibc-2.3.3/iconvdata/gb18030.c	Thu Mar 17 08:20:13 2005
  501.88 +@@ -25769,7 +25769,8 @@
  501.89 + 	    }							      	      \
  501.90 + 	}								      \
  501.91 + 									      \
  501.92 +-    *((uint32_t *) outptr)++ = ch;					      \
  501.93 ++    *((uint32_t *) outptr) = ch;					      \
  501.94 ++    outptr += sizeof (uint32_t);					      \
  501.95 +   }
  501.96 + #define LOOP_NEED_FLAGS
  501.97 + #define ONEBYTE_BODY \
  501.98 +diff -ur glibc-2.3.3.orig/iconvdata/iso8859-1.c glibc-2.3.3/iconvdata/iso8859-1.c
  501.99 +--- glibc-2.3.3.orig/iconvdata/iso8859-1.c	Mon Dec  2 14:07:56 2002
 501.100 ++++ glibc-2.3.3/iconvdata/iso8859-1.c	Thu Mar 17 08:20:47 2005
 501.101 +@@ -35,7 +35,8 @@
 501.102 + #define MIN_NEEDED_OUTPUT	MIN_NEEDED_TO
 501.103 + #define LOOPFCT			FROM_LOOP
 501.104 + #define BODY \
 501.105 +-  *((uint32_t *) outptr)++ = *inptr++;
 501.106 ++  *((uint32_t *) outptr) = *inptr++;					      \
 501.107 ++  outptr += sizeof (uint32_t);
 501.108 + #define ONEBYTE_BODY \
 501.109 +   {									      \
 501.110 +     return c;								      \
 501.111 +diff -ur glibc-2.3.3.orig/iconvdata/jis0208.h glibc-2.3.3/iconvdata/jis0208.h
 501.112 +--- glibc-2.3.3.orig/iconvdata/jis0208.h	Wed Jun 11 14:40:42 2003
 501.113 ++++ glibc-2.3.3/iconvdata/jis0208.h	Thu Mar 17 08:20:13 2005
 501.114 +@@ -24,15 +24,6 @@
 501.115 + #include <gconv.h>
 501.116 + #include <stdint.h>
 501.117 + 
 501.118 +-/* Conversion table.  */
 501.119 +-extern const uint16_t __jis0208_to_ucs[];
 501.120 +-
 501.121 +-extern const char __jisx0208_from_ucs4_lat1[256][2];
 501.122 +-extern const char __jisx0208_from_ucs4_greek[0xc1][2];
 501.123 +-extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
 501.124 +-extern const char __jisx0208_from_ucs_tab[][2];
 501.125 +-
 501.126 +-
 501.127 + /* Struct for table with indeces in UCS mapping table.  */
 501.128 + struct jisx0208_ucs_idx
 501.129 + {
 501.130 +@@ -40,6 +31,15 @@
 501.131 +   uint16_t end;
 501.132 +   uint16_t idx;
 501.133 + };
 501.134 ++
 501.135 ++
 501.136 ++/* Conversion table.  */
 501.137 ++extern const uint16_t __jis0208_to_ucs[];
 501.138 ++
 501.139 ++extern const char __jisx0208_from_ucs4_lat1[256][2];
 501.140 ++extern const char __jisx0208_from_ucs4_greek[0xc1][2];
 501.141 ++extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
 501.142 ++extern const char __jisx0208_from_ucs_tab[][2];
 501.143 + 
 501.144 + 
 501.145 + static inline uint32_t
   502.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   502.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-locale.patch	Sat Feb 24 11:00:05 2007 +0000
   502.3 @@ -0,0 +1,34 @@
   502.4 +--- glibc-2.3.3/locale/weight.h.old	2003-06-11 14:52:12.000000000 -0700
   502.5 ++++ glibc-2.3.3/locale/weight.h	2005-03-15 12:05:37.000000000 -0800
   502.6 +@@ -18,8 +18,14 @@
   502.7 +    02111-1307 USA.  */
   502.8 + 
   502.9 + /* Find index of weight.  */
  502.10 ++#if __GNUC__ >= 4
  502.11 ++auto inline int32_t
  502.12 ++#else
  502.13 + static inline int32_t
  502.14 ++#endif
  502.15 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  502.16 + __attribute ((always_inline))
  502.17 ++#endif
  502.18 + findidx (const unsigned char **cpp)
  502.19 + {
  502.20 +   int_fast32_t i = table[*(*cpp)++];
  502.21 +--- glibc-2.3.3/locale/weightwc.h.old	2003-06-13 13:44:58.000000000 -0700
  502.22 ++++ glibc-2.3.3/locale/weightwc.h	2005-03-15 12:06:46.000000000 -0800
  502.23 +@@ -18,8 +18,14 @@
  502.24 +    02111-1307 USA.  */
  502.25 + 
  502.26 + /* Find index of weight.  */
  502.27 ++#if __GNUC__ >= 4
  502.28 ++auto inline int32_t
  502.29 ++#else
  502.30 + static inline int32_t
  502.31 ++#endif
  502.32 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  502.33 + __attribute ((always_inline))
  502.34 ++#endif
  502.35 + findidx (const wint_t **cpp)
  502.36 + {
  502.37 +   int32_t i;
   503.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   503.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-posix.patch	Sat Feb 24 11:00:05 2007 +0000
   503.3 @@ -0,0 +1,77 @@
   503.4 +Fixes errors
   503.5 +
   503.6 +regcomp.c: In function 'parse_bracket_exp':
   503.7 +regcomp.c:2724: error: invalid storage class for function 'seek_collating_symbol_entry'
   503.8 +regcomp.c:2757: error: invalid storage class for function 'lookup_collation_sequence_value'
   503.9 +regcomp.c:2826: error: invalid storage class for function 'build_range_exp'
  503.10 +regcomp.c:2913: error: invalid storage class for function 'build_collating_symbol'
  503.11 +...
  503.12 +make[2]: *** [/home/dank/queue/jobdir.fast/crosstool-dev/build/x86_64-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.3/build-glibc/posix/regex.o] Error 1
  503.13 +
  503.14 +See also http://sources.redhat.com/ml/glibc-cvs/2004-q3/msg01071.html
  503.15 +That fix requires gcc-4.0, but the fix proposed here works with older compilers, too
  503.16 +
  503.17 +--- glibc-2.3.3/posix/regcomp.c.old	2005-03-16 11:40:55.000000000 -0800
  503.18 ++++ glibc-2.3.3/posix/regcomp.c	2005-03-16 11:50:31.000000000 -0800
  503.19 +@@ -2718,8 +2718,14 @@
  503.20 +      Seek the collating symbol entry correspondings to NAME.
  503.21 +      Return the index of the symbol in the SYMB_TABLE.  */
  503.22 + 
  503.23 ++#if __GNUC__ >= 4
  503.24 ++  auto inline int32_t
  503.25 ++#else
  503.26 +   static inline int32_t
  503.27 ++#endif
  503.28 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  503.29 +   __attribute ((always_inline))
  503.30 ++#endif
  503.31 +   seek_collating_symbol_entry (name, name_len)
  503.32 + 	 const unsigned char *name;
  503.33 + 	 size_t name_len;
  503.34 +@@ -2751,8 +2757,14 @@
  503.35 +      Look up the collation sequence value of BR_ELEM.
  503.36 +      Return the value if succeeded, UINT_MAX otherwise.  */
  503.37 + 
  503.38 ++#if __GNUC__ >= 4
  503.39 ++  auto inline unsigned int
  503.40 ++#else
  503.41 +   static inline unsigned int
  503.42 ++#endif
  503.43 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  503.44 +   __attribute ((always_inline))
  503.45 ++#endif
  503.46 +   lookup_collation_sequence_value (br_elem)
  503.47 + 	 bracket_elem_t *br_elem;
  503.48 +     {
  503.49 +@@ -2819,8 +2831,14 @@
  503.50 +      mbcset->range_ends, is a pointer argument sinse we may
  503.51 +      update it.  */
  503.52 + 
  503.53 +-  static inline reg_errcode_t
  503.54 ++#if __GNUC__ >= 4
  503.55 ++  auto inline reg_errcode_t
  503.56 ++#else
  503.57 ++  static inline reg_errcode_t
  503.58 ++#endif
  503.59 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  503.60 +   __attribute ((always_inline))
  503.61 ++#endif
  503.62 + # ifdef RE_ENABLE_I18N
  503.63 +   build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
  503.64 + 	 re_charset_t *mbcset;
  503.65 +@@ -2906,8 +2924,14 @@
  503.66 +      COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
  503.67 +      pointer argument sinse we may update it.  */
  503.68 + 
  503.69 +-  static inline reg_errcode_t
  503.70 ++#if __GNUC__ >= 4
  503.71 ++  auto inline reg_errcode_t
  503.72 ++#else
  503.73 ++  static inline reg_errcode_t
  503.74 ++#endif
  503.75 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  503.76 +   __attribute ((always_inline))
  503.77 ++#endif
  503.78 + # ifdef RE_ENABLE_I18N
  503.79 +   build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
  503.80 + 	 re_charset_t *mbcset;
   504.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   504.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-powerpc-procfs.patch	Sat Feb 24 11:00:05 2007 +0000
   504.3 @@ -0,0 +1,65 @@
   504.4 +(Combined with earlier fix old/glibc-2.3.2-powerpc-procfs.patch
   504.5 +from http://sources.redhat.com/ml/libc-alpha/2003-12/msg00101.html)
   504.6 +
   504.7 +This fix discussed here:
   504.8 +http://gcc.gnu.org/ml/gcc/2005-01/msg00509.html
   504.9 +
  504.10 +Revision 1.12, Wed Mar 2 20:11:38 2005 UTC by roland
  504.11 +Branch: MAIN
  504.12 +CVS Tags: fedora-glibc-20050303T1335, HEAD
  504.13 +Changes since 1.11: +3 -8 lines
  504.14 +Diff to previous 1.11 (colored)
  504.15 +
  504.16 +2005-02-21  Alan Modra <amodra@bigpond.net.au>
  504.17 +
  504.18 +	* sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (elf_vrreg_t): Don't
  504.19 +	use __uint128_t.
  504.20 +
  504.21 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h?cvsroot=glibc
  504.22 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h.diff?r1=1.11&r2=1.12&cvsroot=glibc
  504.23 +
  504.24 +Fixes
  504.25 +
  504.26 +In file included from ../linuxthreads_db/proc_service.h:20,
  504.27 +                 from ../linuxthreads_db/thread_dbP.h:7,
  504.28 +                 from ../linuxthreads/descr.h:44,
  504.29 +                 from ../linuxthreads/internals.h:30,
  504.30 +                 from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27,
  504.31 +                 from ../sysdeps/generic/ldsodefs.h:38,
  504.32 +                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
  504.33 +                 from <stdin>:2:
  504.34 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:57: error: syntax error before 'elf_vrreg_t'
  504.35 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:57: warning: type defaults to 'int' in declaration of 'elf_vrreg_t'
  504.36 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:57: warning: data definition has no type or storage class
  504.37 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: error: syntax error before 'elf_vrregset_t'
  504.38 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: warning: type defaults to 'int' in declaration of 'elf_vrregset_t'
  504.39 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: warning: data definition has no type or storage class
  504.40 +make[2]: make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/powerpc-750-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/glibc-2.3-20050307/csu'
  504.41 +
  504.42 +Rediffed against glibc-2.3.3
  504.43 +
  504.44 +--- glibc-2.3.3.orig/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h	Sun Jan 12 00:24:23 2003
  504.45 ++++ glibc-2.3.3.new/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h	Fri Mar 18 11:20:58 2005
  504.46 +@@ -45,18 +45,13 @@
  504.47 + 
  504.48 + typedef double elf_fpreg_t;
  504.49 + typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
  504.50 +-#endif
  504.51 +-
  504.52 +-/* gcc 3.1 and newer support __uint128_t.  */
  504.53 +-#if !__GNUC_PREREQ(3,1)
  504.54 +-typedef struct {
  504.55 +-  unsigned long u[4];
  504.56 +-} __attribute((aligned(16))) __uint128_t;
  504.57 +-#endif
  504.58 + 
  504.59 + /* Altivec registers */
  504.60 +-typedef __uint128_t elf_vrreg_t;
  504.61 ++typedef struct {
  504.62 ++  unsigned int u[4];
  504.63 ++} __attribute__ ((aligned (16))) elf_vrreg_t;
  504.64 + typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG];
  504.65 ++#endif
  504.66 + 
  504.67 + struct elf_siginfo
  504.68 +   {
   505.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   505.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-allow-gcc-4.0-x86_64.patch	Sat Feb 24 11:00:05 2007 +0000
   505.3 @@ -0,0 +1,60 @@
   505.4 +Fixes
   505.5 +
   505.6 +In file included from dynamic-link.h:22,
   505.7 +                 from dl-reloc.c:265:
   505.8 +../sysdeps/x86_64/dl-machine.h: In function '_dl_relocate_object':
   505.9 +../sysdeps/x86_64/dl-machine.h:361: error: invalid storage class for function 'elf_machine_rela'
  505.10 +../sysdeps/x86_64/dl-machine.h:525: error: invalid storage class for function 'elf_machine_rela_relative'
  505.11 +../sysdeps/x86_64/dl-machine.h:534: error: invalid storage class for function 'elf_machine_lazy_rel'
  505.12 +make[2]: *** [/home/dank/queue/jobdir.fast/crosstool-dev/build/x86_64-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.3/build-glibc/elf/dl-reloc.o] Error 1
  505.13 +
  505.14 +--- glibc-2.3.3/sysdeps/x86_64/dl-machine.h.old	Wed Mar 16 16:19:15 2005
  505.15 ++++ glibc-2.3.3/sysdeps/x86_64/dl-machine.h	Wed Mar 16 16:22:09 2005
  505.16 +@@ -354,7 +354,14 @@
  505.17 + /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
  505.18 +    MAP is the object containing the reloc.  */
  505.19 + 
  505.20 +-static inline void
  505.21 ++#if __GNUC__ >= 4
  505.22 ++  auto inline void
  505.23 ++#else
  505.24 ++  static inline void
  505.25 ++#endif
  505.26 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  505.27 ++  __attribute ((always_inline))
  505.28 ++#endif
  505.29 + elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
  505.30 + 		  const Elf64_Sym *sym, const struct r_found_version *version,
  505.31 + 		  void *const reloc_addr_arg)
  505.32 +@@ -519,7 +526,14 @@
  505.33 +     }
  505.34 + }
  505.35 + 
  505.36 +-static inline void
  505.37 ++#if __GNUC__ >= 4
  505.38 ++  auto inline void
  505.39 ++#else
  505.40 ++  static inline void
  505.41 ++#endif
  505.42 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  505.43 ++  __attribute ((always_inline))
  505.44 ++#endif
  505.45 + elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
  505.46 + 			   void *const reloc_addr_arg)
  505.47 + {
  505.48 +@@ -528,7 +542,14 @@
  505.49 +   *reloc_addr = l_addr + reloc->r_addend;
  505.50 + }
  505.51 + 
  505.52 +-static inline void
  505.53 ++#if __GNUC__ >= 4
  505.54 ++  auto inline void
  505.55 ++#else
  505.56 ++  static inline void
  505.57 ++#endif
  505.58 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  505.59 ++  __attribute ((always_inline))
  505.60 ++#endif
  505.61 + elf_machine_lazy_rel (struct link_map *map,
  505.62 + 		      Elf64_Addr l_addr, const Elf64_Rela *reloc)
  505.63 + {
   506.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   506.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-alpha-pwrite64.patch	Sat Feb 24 11:00:05 2007 +0000
   506.3 @@ -0,0 +1,41 @@
   506.4 +Fix for this error:
   506.5 +
   506.6 +crosstool-0.32/build/alpha-unknown-linux-gnu/gcc-3.3.5-glibc-2.3.3/build-glibc/libc_pic.os(.text+0xc8bd0): In function `__posix_fallocate64_l64':
   506.7 +: undefined reference to `__GI___pwrite64'
   506.8 +collect2: ld returned 1 exit status
   506.9 +make[1]: *** [crosstool-0.32/build/alpha-unknown-linux-gnu/gcc-3.3.5-glibc-2.3.3/build-glibc/libc.so] Error 1
  506.10 +make[1]: Leaving directory `crosstool-0.32/build/alpha-unknown-linux-gnu/gcc-3.3.5-glibc-2.3.3/glibc-2.3.3'
  506.11 +make: *** [all] Error 2
  506.12 +
  506.13 +extracted from GLIBC CVS by Dan Kegel
  506.14 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.diff?r1=1.16&r2=1.17&cvsroot=glibc'
  506.15 +
  506.16 +cf. 
  506.17 +http://sources.redhat.com/ml/libc-alpha/2003-10/msg00038.html
  506.18 +
  506.19 +
  506.20 +--- glibc-2.3.3/sysdeps/unix/sysv/linux/alpha/sysdep.h.old	2003-06-20 09:24:36.000000000 -0700
  506.21 ++++ glibc-2.3.3/sysdeps/unix/sysv/linux/alpha/sysdep.h	2005-04-27 11:23:46.000000000 -0700
  506.22 +@@ -1,4 +1,4 @@
  506.23 +-/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003
  506.24 ++/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004
  506.25 +    Free Software Foundation, Inc.
  506.26 +    This file is part of the GNU C Library.
  506.27 +    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
  506.28 +@@ -65,6 +65,16 @@
  506.29 + # define __NR_semtimedop	423
  506.30 + #endif
  506.31 + 
  506.32 ++/* This is a kludge to make syscalls.list find these under the names
  506.33 ++   pread and pwrite, since some kernel headers define those names
  506.34 ++   and some define the *64 names for the same system calls.  */
  506.35 ++#if !defined __NR_pread && defined __NR_pread64
  506.36 ++# define __NR_pread __NR_pread64
  506.37 ++#endif
  506.38 ++#if !defined __NR_pwrite && defined __NR_pwrite64
  506.39 ++# define __NR_pwrite __NR_pwrite64
  506.40 ++#endif
  506.41 ++
  506.42 + /*
  506.43 +  * In order to get the hidden arguments for rt_sigaction set up
  506.44 +  * properly, we need to call the assembly version.  This shouldn't
   507.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   507.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-cygwin.patch	Sat Feb 24 11:00:05 2007 +0000
   507.3 @@ -0,0 +1,103 @@
   507.4 +Fixes
   507.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
   507.6 +...
   507.7 +when building glibc-2.3.3 on cygwin
   507.8 +
   507.9 +Idea from
  507.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
  507.11 +Basically, make glibc use .oST as suffix for 'object static'
  507.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
  507.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
  507.14 +
  507.15 +glibc-linuxthreads-2.3.3 also requires a patch, see 
  507.16 +../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
  507.17 +
  507.18 +[ Rediffed against glibc-2.3.3 ]
  507.19 +
  507.20 +
  507.21 +diff -aur glibc-2.3.3/Makeconfig glibc-2.3.3-cygwin/Makeconfig
  507.22 +--- glibc-2.3.3/Makeconfig	2003-09-17 01:36:10.000000000 -0700
  507.23 ++++ glibc-2.3.3-cygwin/Makeconfig	2004-08-27 20:34:43.000000000 -0700
  507.24 +@@ -439,13 +439,13 @@
  507.25 + # run the linked programs.
  507.26 + link-libc = -Wl,-rpath-link=$(rpath-link) \
  507.27 + 	    $(common-objpfx)libc.so$(libc.so-version) \
  507.28 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
  507.29 ++	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
  507.30 + # This is how to find at build-time things that will be installed there.
  507.31 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
  507.32 + else
  507.33 + ifneq (,$(filter aix aix%,$(config-os)))
  507.34 + link-libc = $(common-objpfx)libc.a \
  507.35 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
  507.36 ++	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
  507.37 + rpath-dirs = math dlfcn nss nis rt resolv crypt
  507.38 + endif
  507.39 + endif
  507.40 +@@ -658,7 +658,7 @@
  507.41 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
  507.42 + # to pass different flags for each flavor.
  507.43 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
  507.44 +-all-object-suffixes := .o .os .op .og .ob .oS
  507.45 ++all-object-suffixes := .o .os .op .og .ob .oST
  507.46 + object-suffixes :=
  507.47 + CPPFLAGS-.o = $(pic-default)
  507.48 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
  507.49 +@@ -714,14 +714,14 @@
  507.50 + 
  507.51 + ifeq (yes,$(build-shared))
  507.52 + # Build special library that contains the static-only routines for libc.
  507.53 +-object-suffixes-for-libc += .oS
  507.54 ++object-suffixes-for-libc += .oST
  507.55 + 
  507.56 + # Must build the routines as PIC, though, because they can end up in (users')
  507.57 + # shared objects.  We don't want to use CFLAGS-os because users may, for
  507.58 + # example, make that processor-specific.
  507.59 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
  507.60 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
  507.61 +-libtype.oS = lib%_nonshared.a
  507.62 ++CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag)
  507.63 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
  507.64 ++libtype.oST = lib%_nonshared.a
  507.65 + endif
  507.66 + 
  507.67 + # The assembler can generate debug information too.
  507.68 +diff -aur glibc-2.3.3/Makerules glibc-2.3.3-cygwin/Makerules
  507.69 +--- glibc-2.3.3/Makerules	2003-10-31 16:35:57.000000000 -0800
  507.70 ++++ glibc-2.3.3-cygwin/Makerules	2004-08-27 20:33:47.000000000 -0700
  507.71 +@@ -414,7 +414,7 @@
  507.72 + # Bounded pointer thunks are only built for *.ob
  507.73 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
  507.74 + 
  507.75 +-elide-routines.oS += $(filter-out $(static-only-routines),\
  507.76 ++elide-routines.oST += $(filter-out $(static-only-routines),\
  507.77 + 				  $(routines) $(aux) $(sysdep_routines)) \
  507.78 + 		     $(elide-bp-thunks)
  507.79 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
  507.80 +@@ -934,7 +934,7 @@
  507.81 + install: $(inst_libdir)/libc.so
  507.82 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
  507.83 + 			$(common-objpfx)libc.so$(libc.so-version) \
  507.84 +-			$(inst_libdir)/$(patsubst %,$(libtype.oS),\
  507.85 ++			$(inst_libdir)/$(patsubst %,$(libtype.oST),\
  507.86 + 						  $(libprefix)$(libc-name)) \
  507.87 + 			$(+force)
  507.88 + 	(echo '/* GNU ld script';\
  507.89 +@@ -942,7 +942,7 @@
  507.90 + 	 echo '   the static library, so try that secondarily.  */';\
  507.91 + 	 cat $<; \
  507.92 + 	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
  507.93 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
  507.94 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
  507.95 + 	      ')' \
  507.96 + 	) > $@.new
  507.97 + 	mv -f $@.new $@
  507.98 +diff -aur glibc-2.3.3/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.3-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
  507.99 +--- glibc-2.3.3/sysdeps/sparc/sparc32/sparcv9/Makefile	2002-08-29 03:41:15.000000000 -0700
 507.100 ++++ glibc-2.3.3-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile	2004-08-27 20:35:43.000000000 -0700
 507.101 +@@ -10,4 +10,4 @@
 507.102 + ASFLAGS-.op += -Wa,-Av9a
 507.103 + ASFLAGS-.og += -Wa,-Av9a
 507.104 + ASFLAGS-.ob += -Wa,-Av9a
 507.105 +-ASFLAGS-.oS += -Wa,-Av9a
 507.106 ++ASFLAGS-.oST += -Wa,-Av9a
   508.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   508.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-libeh-kludge.patch	Sat Feb 24 11:00:05 2007 +0000
   508.3 @@ -0,0 +1,75 @@
   508.4 +wget "http://sources.redhat.com/cgi-bin/get-raw-msg?listname=libc-alpha&date=2003-09&msgid=20030911190500.GE12344%40sunsite.ms.mff.cuni.cz"
   508.5 +aka http://sources.redhat.com/ml/libc-alpha/2003-09/msg00104.html
   508.6 +
   508.7 +This seems to fix the error
   508.8 +   gcc-3.4.1-glibc-2.3.3/lib/gcc/powerpc-7400-linux-gnu/3.4.1/../../../../powerpc-7400-linux-gnu/bin/ld: cannot find -lgcc_eh
   508.9 +   make[1]: *** [build/powerpc-7400-linux-gnu/gcc-3.4.1-glibc-2.3.3/build-glibc/libc.so] Error 1
  508.10 +but I assume it might cause trouble with nptl
  508.11 +FIXME: once we figure out why this patch is wrong, fix it right :-)
  508.12 +
  508.13 +Date: Thu, 11 Sep 2003 21:05:00 +0200
  508.14 +From: Jakub Jelinek <jakub at redhat dot com>
  508.15 +To: libc-alpha at sources dot redhat dot com
  508.16 +Subject: Re: Another ugly bootstrapping patch for libgcc_eh
  508.17 +Message-ID: <20030911190500.GE12344@sunsite.ms.mff.cuni.cz>
  508.18 +Reply-To: Jakub Jelinek <jakub at redhat dot com>
  508.19 +References: <20030911194944.GA6104@nevyn.them.org> <20030911180703.GD12344@sunsite.ms.mff.cuni.cz> <20030911203621.GA31503@nevyn.them.org>
  508.20 +In-Reply-To: <20030911203621 dot GA31503 at nevyn dot them dot org>
  508.21 +
  508.22 +On Thu, Sep 11, 2003 at 04:36:21PM -0400, Daniel Jacobowitz wrote:
  508.23 +> > Why exactly do you need that?
  508.24 +> > What exact library needs the functions from libgcc_eh.a?
  508.25 +> > There shouldn't be any these days (__register_*/__frame_state_for etc.
  508.26 +> > functions should come from sysdeps/generic on arches which need them,
  508.27 +> > _Unwind_* come from unwind*.c).
  508.28 +> > IMHO both:
  508.29 +> > 
  508.30 +> > # Force the backward compatibility EH functions to be linked.
  508.31 +> > LDFLAGS-c.so += -u __register_frame
  508.32 +> > 
  508.33 +> > in Makerules and -lgcc_eh in Makeconfig should go.
  508.34 +> 
  508.35 +> If you say so.  That -lgcc_eh's been in and out quite a number of
  508.36 +> times.  I was just assuming that it was necessary.
  508.37 +
  508.38 +I have been testing following patch on hammer.
  508.39 +linuxthreads built just fine and NPTL libraries too,
  508.40 +and in both cases libraries had the same exported symbols as without
  508.41 +the patch (though its .text slightly shrunk because it no longer contained
  508.42 +unneeded libgcc_eh routines (and also libc.so has fewer .plt slots).
  508.43 +Unfortunately, sln in NPTL build doesn't link, as libgcc_eh.a is needed
  508.44 +in this case.
  508.45 +So, IMHO we need my Makerules change and Daniel's patch.
  508.46 +
  508.47 +2003-09-11  Jakub Jelinek  <jakub@redhat.com>
  508.48 +
  508.49 +	#* Makerules (LDFLAGS-c.so): Remove -u __register_frame.
  508.50 +	* Makeconfig (gnulib): Remove -lgcc_eh.
  508.51 +
  508.52 +# Ulrich already applied this.
  508.53 +#--- libc/Makerules.jj	2003-07-23 03:56:16.000000000 -0400
  508.54 +#+++ libc/Makerules	2003-09-11 16:22:44.000000000 -0400
  508.55 +#@@ -572,8 +572,6 @@ LDFLAGS-c.so = -nostdlib -nostartfiles
  508.56 +# LDLIBS-c.so += $(gnulib)
  508.57 +# # Give libc.so an entry point and make it directly runnable itself.
  508.58 +# LDFLAGS-c.so += -e __libc_main
  508.59 +#-# Force the backward compatibility EH functions to be linked.
  508.60 +#-LDFLAGS-c.so += -u __register_frame
  508.61 +# # Pre-link the objects of libc_pic.a so that we can locally resolve
  508.62 +# # COMMON symbols before we link against ld.so.  This is because ld.so
  508.63 +# # contains some of libc_pic.a already, which will prevent the COMMONs
  508.64 +--- libc/Makeconfig.jj	2003-07-22 08:25:32.000000000 -0400
  508.65 ++++ libc/Makeconfig	2003-09-11 16:23:08.000000000 -0400
  508.66 +@@ -505,7 +505,7 @@ link-libc-bounded = $(common-objpfx)libc
  508.67 + link-extra-libs-bounded = $(foreach lib,$(LDLIBS-$(@F:%-bp=%)),$(common-objpfx)$(lib)_b.a)
  508.68 + 
  508.69 + ifndef gnulib
  508.70 +-gnulib := -lgcc -lgcc_eh
  508.71 ++gnulib := -lgcc
  508.72 + endif
  508.73 + ifeq ($(elf),yes)
  508.74 + +preinit = $(addprefix $(csu-objpfx),crti.o)
  508.75 +
  508.76 +
  508.77 +	Jakub
  508.78 +
   509.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   509.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-s390-fadvise64.patch	Sat Feb 24 11:00:05 2007 +0000
   509.3 @@ -0,0 +1,128 @@
   509.4 +See http://sources.redhat.com/ml/libc-hacker/2003-12/msg00023.html
   509.5 +or http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c?cvsroot=glibc
   509.6 +
   509.7 +Should fix error 
   509.8 +
   509.9 +../sysdeps/unix/sysv/linux/posix_fadvise64.c: In function `__posix_fadvise64_l64':
  509.10 +../sysdeps/unix/sysv/linux/posix_fadvise64.c:35: warning: implicit declaration of function `DECLARGS_6'
  509.11 +../sysdeps/unix/sysv/linux/posix_fadvise64.c:35: error: parse error before "register"
  509.12 +...
  509.13 +../sysdeps/unix/sysv/linux/posix_fadvise64.c:35: error: parse error before "ASMFMT_6"
  509.14 +make[2]: *** [crosstool-0.28-rc34/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/build-glibc/io/posix_fadvise64.o] Error 1
  509.15 +
  509.16 +
  509.17 +From: Martin Schwidefsky <schwidefsky at de dot ibm dot com>
  509.18 +Organization: IBM Deutschland GmbH
  509.19 +To: libc-hacker at sources dot redhat dot com
  509.20 +Subject: fadvise64_64 for s390-32.
  509.21 +Date: Fri, 5 Dec 2003 18:46:33 +0100
  509.22 +
  509.23 +Hi,
  509.24 +on s390* system calls can have up to 5 paramters. The generic linux
  509.25 +implemenation of fadvise64_64 for 32 bit systems needs 6 parameters,
  509.26 +so we need to have a s390-32 special version of posix_fadvise64.c.
  509.27 +For s390-64 we do not have the problem because there fadvise64_64
  509.28 +has only 4 parameters.
  509.29 +
  509.30 +blue skies,
  509.31 +  Martin.
  509.32 +
  509.33 +2003-12-05  Martin Schwidefsky  <schwidefsky@de.ibm.com>
  509.34 +
  509.35 +	* sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c: New file.
  509.36 +
  509.37 +diff -urN libc/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c libc-s390/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c
  509.38 +--- libc/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c	1970-01-01 01:00:00.000000000 +0100
  509.39 ++++ libc-s390/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c	2003-11-13 15:31:40.000000000 +0100
  509.40 +@@ -0,0 +1,90 @@
  509.41 ++/* Copyright (C) 2003 Free Software Foundation, Inc.
  509.42 ++   This file is part of the GNU C Library.
  509.43 ++
  509.44 ++   The GNU C Library is free software; you can redistribute it and/or
  509.45 ++   modify it under the terms of the GNU Lesser General Public
  509.46 ++   License as published by the Free Software Foundation; either
  509.47 ++   version 2.1 of the License, or (at your option) any later version.
  509.48 ++
  509.49 ++   The GNU C Library is distributed in the hope that it will be useful,
  509.50 ++   but WITHOUT ANY WARRANTY; without even the implied warranty of
  509.51 ++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  509.52 ++   Lesser General Public License for more details.
  509.53 ++
  509.54 ++   You should have received a copy of the GNU Lesser General Public
  509.55 ++   License along with the GNU C Library; if not, write to the Free
  509.56 ++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  509.57 ++   02111-1307 USA.  */
  509.58 ++
  509.59 ++#include <errno.h>
  509.60 ++#include <fcntl.h>
  509.61 ++#include <sysdep.h>
  509.62 ++#include <kernel-features.h>
  509.63 ++
  509.64 ++int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise);
  509.65 ++int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise);
  509.66 ++
  509.67 ++/* Advice the system about the expected behaviour of the application with
  509.68 ++   respect to the file associated with FD.  */
  509.69 ++
  509.70 ++struct fadvise64_64_layout
  509.71 ++{
  509.72 ++  int fd;
  509.73 ++  off64_t offset;
  509.74 ++  off64_t len;
  509.75 ++  int advise;
  509.76 ++};
  509.77 ++
  509.78 ++int
  509.79 ++__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
  509.80 ++{
  509.81 ++#ifdef __NR_fadvise64_64
  509.82 ++  struct fadvise64_64_layout parameters;
  509.83 ++  INTERNAL_SYSCALL_DECL (err);
  509.84 ++  
  509.85 ++  parameters.fd = fd;
  509.86 ++  parameters.offset = offset;
  509.87 ++  parameters.len = len;
  509.88 ++  parameters.advise = advise;
  509.89 ++  int ret = INTERNAL_SYSCALL (fadvise64_64, err, 1, &parameters);
  509.90 ++  if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
  509.91 ++    return 0;
  509.92 ++# ifndef __ASSUME_FADVISE64_64_SYSCALL
  509.93 ++  if (INTERNAL_SYSCALL_ERRNO (ret, err) != ENOSYS)
  509.94 ++# endif
  509.95 ++   return INTERNAL_SYSCALL_ERRNO (ret, err);
  509.96 ++#endif
  509.97 ++#ifndef __ASSUME_FADVISE64_64_SYSCALL
  509.98 ++# ifdef __NR_fadvise64
  509.99 ++  if (len != (off_t) len)
 509.100 ++    return EOVERFLOW;
 509.101 ++
 509.102 ++  INTERNAL_SYSCALL_DECL (err2);
 509.103 ++  int ret2 = INTERNAL_SYSCALL (fadvise64, err2, 5, fd,
 509.104 ++			       __LONG_LONG_PAIR ((long) (offset >> 32),
 509.105 ++						 (long) offset),
 509.106 ++			       (off_t) len, advise);
 509.107 ++  if (!INTERNAL_SYSCALL_ERROR_P (ret2, err2))
 509.108 ++    return 0;
 509.109 ++  return INTERNAL_SYSCALL_ERRNO (ret2, err2);
 509.110 ++# else
 509.111 ++  return ENOSYS;
 509.112 ++# endif
 509.113 ++#endif
 509.114 ++}
 509.115 ++
 509.116 ++#include <shlib-compat.h>
 509.117 ++
 509.118 ++#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3)
 509.119 ++
 509.120 ++int
 509.121 ++__posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise)
 509.122 ++{
 509.123 ++  return __posix_fadvise64_l64 (fd, offset, len, advise);
 509.124 ++}
 509.125 ++
 509.126 ++versioned_symbol (libc, __posix_fadvise64_l64, posix_fadvise64, GLIBC_2_3_3);
 509.127 ++compat_symbol (libc, __posix_fadvise64_l32, posix_fadvise64, GLIBC_2_2);
 509.128 ++#else
 509.129 ++strong_alias (__posix_fadvise64_l64, posix_fadvise64);
 509.130 ++#endif
 509.131 +
   510.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   510.2 +++ b/patches/glibc/2.3.3/glibc-2.3.3-unwind-dw2.patch	Sat Feb 24 11:00:05 2007 +0000
   510.3 @@ -0,0 +1,66 @@
   510.4 +See http://sources.redhat.com/ml/libc-alpha/2004-02/msg00138.html
   510.5 +aka http://sources.redhat.com/cgi-bin/get-raw-msg?listname=libc-alpha&date=2004-02&msgid=20040220044155.GE22135%40baldric.uwo.ca
   510.6 +
   510.7 +In CVS as
   510.8 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/generic/unwind-dw2.c.diff?r1=1.7&r2=1.8&cvsroot=glibc'
   510.9 +
  510.10 +Revision 1.8, Sat Feb 21 09:07:29 2004 UTC (5 months, 3 weeks ago) by drepper
  510.11 +
  510.12 +	Allow sjlj enabled compilers to build the code by removing
  510.13 +	__USING_SJLJ_EXCEPTIONS__ wrapper.
  510.14 +
  510.15 +plus
  510.16 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/generic/framestate.c.diff?r1=1.3&r2=1.4&cvsroot=glibc'
  510.17 +
  510.18 +Revision 1.4, Sat Feb 21 09:07:05 2004 UTC (5 months, 3 weeks ago) by drepper
  510.19 +
  510.20 +	[__USING_SJLJ_EXCEPTIONS__] (__frame_state_for): Set frame_State_for
  510.21 +	to abort if the compiler is using sjlj.
  510.22 +
  510.23 +Fixes compile error
  510.24 +
  510.25 +../sysdeps/generic/framestate.c: In function `__frame_state_for':
  510.26 +../sysdeps/generic/framestate.c:44: error: `fallback_frame_state_for' undeclared (first use in this function)
  510.27 +../sysdeps/generic/framestate.c:44: error: (Each undeclared identifier is reported only once
  510.28 +../sysdeps/generic/framestate.c:44: error: for each function it appears in.)
  510.29 +make[2]: *** [crosstool-0.28-rc34/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/build-glibc/elf/framestate.os] Error 1
  510.30 +
  510.31 +===================================================================
  510.32 +RCS file: /cvs/glibc/libc/sysdeps/generic/unwind-dw2.c,v
  510.33 +retrieving revision 1.7
  510.34 +retrieving revision 1.8
  510.35 +diff -u -r1.7 -r1.8
  510.36 +--- libc/sysdeps/generic/unwind-dw2.c	2003/07/22 23:55:55	1.7
  510.37 ++++ libc/sysdeps/generic/unwind-dw2.c	2004/02/21 09:07:29	1.8
  510.38 +@@ -39,7 +39,6 @@
  510.39 + #endif
  510.40 + 
  510.41 + 
  510.42 +-#ifndef __USING_SJLJ_EXCEPTIONS__
  510.43 + 
  510.44 + #ifndef STACK_GROWS_DOWNWARD
  510.45 + #define STACK_GROWS_DOWNWARD 0
  510.46 +@@ -1287,4 +1286,3 @@
  510.47 + #include "unwind.inc"
  510.48 + 
  510.49 + #endif /* _LIBC */
  510.50 +-#endif /* !USING_SJLJ_EXCEPTIONS */
  510.51 +===================================================================
  510.52 +RCS file: /cvs/glibc/libc/sysdeps/generic/framestate.c,v
  510.53 +retrieving revision 1.3
  510.54 +retrieving revision 1.4
  510.55 +diff -u -r1.3 -r1.4
  510.56 +--- libc/sysdeps/generic/framestate.c	2003/01/08 06:46:06	1.3
  510.57 ++++ libc/sysdeps/generic/framestate.c	2004/02/21 09:07:05	1.4
  510.58 +@@ -41,7 +41,11 @@
  510.59 +       if (handle == NULL
  510.60 + 	  || (frame_state_for
  510.61 + 	      = (framesf) __libc_dlsym (handle, "__frame_state_for")) == NULL)
  510.62 ++#ifndef __USING_SJLJ_EXCEPTIONS__
  510.63 + 	frame_state_for = fallback_frame_state_for;
  510.64 ++#else
  510.65 ++      	frame_state_for = abort;
  510.66 ++#endif
  510.67 +     }
  510.68 + 
  510.69 +   return frame_state_for (pc, frame_state);
   511.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   511.2 +++ b/patches/glibc/2.3.3/glibc-2.3.4-allow-gcc-4.0-arm.patch	Sat Feb 24 11:00:05 2007 +0000
   511.3 @@ -0,0 +1,117 @@
   511.4 +Fixes
   511.5 +In file included from dynamic-link.h:22,
   511.6 +                 from dl-reloc.c:265:
   511.7 +../sysdeps/arm/dl-machine.h: In function '_dl_relocate_object':
   511.8 +../sysdeps/arm/dl-machine.h:371: error: invalid storage class for function 'fix_bad_pc24'
   511.9 +../sysdeps/arm/dl-machine.h:406: error: invalid storage class for function 'elf_machine_rel'
  511.10 +../sysdeps/arm/dl-machine.h:532: error: invalid storage class for function 'elf_machine_rela'
  511.11 +../sysdeps/arm/dl-machine.h:612: error: invalid storage class for function 'elf_machine_rel_relative'
  511.12 +../sysdeps/arm/dl-machine.h:621: error: invalid storage class for function 'elf_machine_rela_relative'
  511.13 +../sysdeps/arm/dl-machine.h:630: error: invalid storage class for function 'elf_machine_lazy_rel'
  511.14 +make[2]: Leaving directory `/home/dank/queue/jobdir.k8/crosstool-dev/build/arm-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.3/glibc-2.3.3/elf'
  511.15 +
  511.16 +when building glibc-2.3.[34] with gcc-4.0
  511.17 +
  511.18 +Like
  511.19 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/arm/dl-machine.h.diff?r1=1.51&r2=1.52&cvsroot=glibc
  511.20 +but works with older compilers, and fixes fix_bad_pc24.
  511.21 +
  511.22 +
  511.23 +--- glibc-2.3.4/sysdeps/arm/dl-machine.h.old	Sun Mar 20 17:54:37 2005
  511.24 ++++ glibc-2.3.4/sysdeps/arm/dl-machine.h	Sun Mar 20 17:57:32 2005
  511.25 +@@ -359,7 +359,14 @@
  511.26 + # endif
  511.27 + 
  511.28 + /* Deal with an out-of-range PC24 reloc.  */
  511.29 +-static Elf32_Addr
  511.30 ++#if __GNUC__ >= 4
  511.31 ++  auto inline Elf32_Addr
  511.32 ++#else
  511.33 ++  static inline Elf32_Addr
  511.34 ++#endif
  511.35 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  511.36 ++  __attribute ((always_inline))
  511.37 ++#endif
  511.38 + fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
  511.39 + {
  511.40 +   static void *fix_page;
  511.41 +@@ -392,7 +399,14 @@
  511.42 + /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
  511.43 +    MAP is the object containing the reloc.  */
  511.44 + 
  511.45 +-static inline void
  511.46 ++#if __GNUC__ >= 4
  511.47 ++  auto inline void
  511.48 ++#else
  511.49 ++  static inline void
  511.50 ++#endif
  511.51 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  511.52 ++  __attribute ((always_inline))
  511.53 ++#endif
  511.54 + elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
  511.55 + 		 const Elf32_Sym *sym, const struct r_found_version *version,
  511.56 + 		 void *const reloc_addr_arg)
  511.57 +@@ -517,7 +531,14 @@
  511.58 + }
  511.59 + 
  511.60 + # ifndef RTLD_BOOTSTRAP
  511.61 +-static inline void
  511.62 ++#if __GNUC__ >= 4
  511.63 ++  auto inline void
  511.64 ++#else
  511.65 ++  static inline void
  511.66 ++#endif
  511.67 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  511.68 ++  __attribute ((always_inline))
  511.69 ++#endif
  511.70 + elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
  511.71 + 		  const Elf32_Sym *sym, const struct r_found_version *version,
  511.72 + 		  void *const reloc_addr_arg)
  511.73 +@@ -597,7 +618,14 @@
  511.74 + }
  511.75 + # endif
  511.76 + 
  511.77 +-static inline void
  511.78 ++#if __GNUC__ >= 4
  511.79 ++  auto inline void
  511.80 ++#else
  511.81 ++  static inline void
  511.82 ++#endif
  511.83 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  511.84 ++  __attribute ((always_inline))
  511.85 ++#endif
  511.86 + elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
  511.87 + 			  void *const reloc_addr_arg)
  511.88 + {
  511.89 +@@ -606,7 +634,14 @@
  511.90 + }
  511.91 + 
  511.92 + # ifndef RTLD_BOOTSTRAP
  511.93 +-static inline void
  511.94 ++#if __GNUC__ >= 4
  511.95 ++  auto inline void
  511.96 ++#else
  511.97 ++  static inline void
  511.98 ++#endif
  511.99 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
 511.100 ++  __attribute ((always_inline))
 511.101 ++#endif
 511.102 + elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
 511.103 + 			   void *const reloc_addr_arg)
 511.104 + {
 511.105 +@@ -615,7 +650,14 @@
 511.106 + }
 511.107 + # endif
 511.108 + 
 511.109 +-static inline void
 511.110 ++#if __GNUC__ >= 4
 511.111 ++  auto inline void
 511.112 ++#else
 511.113 ++  static inline void
 511.114 ++#endif
 511.115 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
 511.116 ++  __attribute ((always_inline))
 511.117 ++#endif
 511.118 + elf_machine_lazy_rel (struct link_map *map,
 511.119 + 		      Elf32_Addr l_addr, const Elf32_Rel *reloc)
 511.120 + {
   512.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   512.2 +++ b/patches/glibc/2.3.3/glibc-2.3.4-allow-gcc-4.0-elf.patch	Sat Feb 24 11:00:05 2007 +0000
   512.3 @@ -0,0 +1,61 @@
   512.4 +From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
   512.5 +Fixes
   512.6 +  rtld.c: In function '_dl_start':
   512.7 +  dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
   512.8 +  dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
   512.9 +when compiling glibc-2.3.4 with gcc-4.0
  512.10 +
  512.11 +But see also
  512.12 +http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
  512.13 +and
  512.14 +http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
  512.15 +which seem to propose less radical fixes?
  512.16 +
  512.17 +Aha.  See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
  512.18 +
  512.19 +--- glibc-2.3-20050307/elf/dynamic-link.h.old	2005-03-12 18:12:37.000000000 -0800
  512.20 ++++ glibc-2.3-20050307/elf/dynamic-link.h	2005-03-12 18:12:59.777820848 -0800
  512.21 +@@ -19,43 +19,6 @@
  512.22 + 
  512.23 + #include <elf.h>
  512.24 + #include <assert.h>
  512.25 +-
  512.26 +-#ifdef RESOLVE
  512.27 +-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
  512.28 +-   ElfW(Addr), because not all architectures can assume that the
  512.29 +-   relocated address is properly aligned, whereas the compiler is
  512.30 +-   entitled to assume that a pointer to a type is properly aligned for
  512.31 +-   the type.  Even if we cast the pointer back to some other type with
  512.32 +-   less strict alignment requirements, the compiler might still
  512.33 +-   remember that the pointer was originally more aligned, thereby
  512.34 +-   optimizing away alignment tests or using word instructions for
  512.35 +-   copying memory, breaking the very code written to handle the
  512.36 +-   unaligned cases.  */
  512.37 +-auto void __attribute__((always_inline))
  512.38 +-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
  512.39 +-		 const ElfW(Sym) *sym, const struct r_found_version *version,
  512.40 +-		 void *const reloc_addr);
  512.41 +-auto void __attribute__((always_inline))
  512.42 +-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
  512.43 +-		  const ElfW(Sym) *sym, const struct r_found_version *version,
  512.44 +-		  void *const reloc_addr);
  512.45 +-auto void __attribute__((always_inline))
  512.46 +-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
  512.47 +-			  void *const reloc_addr);
  512.48 +-auto void __attribute__((always_inline))
  512.49 +-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
  512.50 +-			   void *const reloc_addr);
  512.51 +-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
  512.52 +-auto void __attribute__((always_inline))
  512.53 +-elf_machine_lazy_rel (struct link_map *map,
  512.54 +-		      ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
  512.55 +-# else
  512.56 +-auto void __attribute__((always_inline))
  512.57 +-elf_machine_lazy_rel (struct link_map *map,
  512.58 +-		      ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
  512.59 +-# endif
  512.60 +-#endif
  512.61 +-
  512.62 + #include <dl-machine.h>
  512.63 + 
  512.64 + #ifndef VERSYMIDX
   513.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   513.2 +++ b/patches/glibc/2.3.3/glibc-2.3.4-allow-gcc-4.0-powerpc32.patch	Sat Feb 24 11:00:05 2007 +0000
   513.3 @@ -0,0 +1,42 @@
   513.4 +Fixes
   513.5 +
   513.6 +../sysdeps/powerpc/powerpc32/dl-machine.h: In function '_dl_relocate_object':
   513.7 +../sysdeps/powerpc/powerpc32/dl-machine.h:461: error: invalid storage class for function 'elf_machine_rela_relative'
   513.8 +../sysdeps/powerpc/powerpc32/dl-machine.h:469: error: invalid storage class for function 'elf_machine_lazy_rel'
   513.9 +make[2]: *** [/home/dank/queue/jobdir.dual2/crosstool-dev/build/powerpc-750-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/build-glibc/elf/dl-reloc.o] Error 1
  513.10 +
  513.11 +diff -ur glibc-2.3-20050307.orig/sysdeps/powerpc/powerpc32/dl-machine.h glibc-2.3-20050307/sysdeps/powerpc/powerpc32/dl-machine.h
  513.12 +--- glibc-2.3-20050307.orig/sysdeps/powerpc/powerpc32/dl-machine.h	Wed Jul 30 23:33:52 2003
  513.13 ++++ glibc-2.3-20050307/sysdeps/powerpc/powerpc32/dl-machine.h	Thu Mar 17 13:19:16 2005
  513.14 +@@ -455,7 +455,14 @@
  513.15 +     }
  513.16 + }
  513.17 + 
  513.18 +-static inline void
  513.19 ++#if __GNUC__ >= 4
  513.20 ++  auto inline void
  513.21 ++#else
  513.22 ++  static inline void
  513.23 ++#endif
  513.24 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  513.25 ++  __attribute ((always_inline))
  513.26 ++#endif
  513.27 + elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
  513.28 + 			   void *const reloc_addr_arg)
  513.29 + {
  513.30 +@@ -463,7 +470,14 @@
  513.31 +   *reloc_addr = l_addr + reloc->r_addend;
  513.32 + }
  513.33 + 
  513.34 +-static inline void
  513.35 ++#if __GNUC__ >= 4
  513.36 ++  auto inline void
  513.37 ++#else
  513.38 ++  static inline void
  513.39 ++#endif
  513.40 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  513.41 ++  __attribute ((always_inline))
  513.42 ++#endif
  513.43 + elf_machine_lazy_rel (struct link_map *map,
  513.44 + 		      Elf32_Addr l_addr, const Elf32_Rela *reloc)
  513.45 + {
   514.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   514.2 +++ b/patches/glibc/2.3.3/glibc-2.3.4-allow-gcc-4.0-powerpc64.patch	Sat Feb 24 11:00:05 2007 +0000
   514.3 @@ -0,0 +1,60 @@
   514.4 +Fixes:
   514.5 +
   514.6 +In file included from dynamic-link.h:22,
   514.7 +                 from dl-reloc.c:269:
   514.8 +../sysdeps/powerpc/powerpc64/dl-machine.h: In function '_dl_relocate_object':
   514.9 +../sysdeps/powerpc/powerpc64/dl-machine.h:573: error: invalid storage class for function 'elf_machine_rela_relative'
  514.10 +../sysdeps/powerpc/powerpc64/dl-machine.h:607: error: invalid storage class for function 'elf_machine_rela'
  514.11 +../sysdeps/powerpc/powerpc64/dl-machine.h:889: error: invalid storage class for function 'elf_machine_lazy_rel'
  514.12 +make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/powerpc64-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/glibc-2.3-20050307/elf'
  514.13 +
  514.14 +--- glibc-2.3-20050307/sysdeps/powerpc/powerpc64/dl-machine.h.old	Thu Mar 17 13:35:23 2005
  514.15 ++++ glibc-2.3-20050307/sysdeps/powerpc/powerpc64/dl-machine.h	Thu Mar 17 13:37:12 2005
  514.16 +@@ -567,7 +567,14 @@
  514.17 +                                 const Elf64_Sym *refsym)
  514.18 +                                 attribute_hidden;
  514.19 + 
  514.20 +-static inline void
  514.21 ++#if __GNUC__ >= 4
  514.22 ++  auto inline void
  514.23 ++#else
  514.24 ++  static inline void
  514.25 ++#endif
  514.26 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  514.27 ++  __attribute ((always_inline))
  514.28 ++#endif
  514.29 + elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
  514.30 + 			   void *const reloc_addr_arg)
  514.31 + {
  514.32 +@@ -598,7 +605,14 @@
  514.33 + 
  514.34 + /* Perform the relocation specified by RELOC and SYM (which is fully
  514.35 +    resolved).  MAP is the object containing the reloc.  */
  514.36 +-static inline void
  514.37 ++#if __GNUC__ >= 4
  514.38 ++  auto inline void
  514.39 ++#else
  514.40 ++  static inline void
  514.41 ++#endif
  514.42 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  514.43 ++  __attribute ((always_inline))
  514.44 ++#endif
  514.45 + elf_machine_rela (struct link_map *map,
  514.46 + 		  const Elf64_Rela *reloc,
  514.47 + 		  const Elf64_Sym *sym,
  514.48 +@@ -883,7 +897,14 @@
  514.49 +   MODIFIED_CODE_NOQUEUE (reloc_addr);
  514.50 + }
  514.51 + 
  514.52 +-static inline void
  514.53 ++#if __GNUC__ >= 4
  514.54 ++  auto inline void
  514.55 ++#else
  514.56 ++  static inline void
  514.57 ++#endif
  514.58 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  514.59 ++  __attribute ((always_inline))
  514.60 ++#endif
  514.61 + elf_machine_lazy_rel (struct link_map *map,
  514.62 + 		      Elf64_Addr l_addr, const Elf64_Rela *reloc)
  514.63 + {
   515.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   515.2 +++ b/patches/glibc/2.3.3/glibc-configure-apple-as.patch	Sat Feb 24 11:00:05 2007 +0000
   515.3 @@ -0,0 +1,23 @@
   515.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
   515.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
   515.6 +
   515.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
   515.8 +where the assembler but doesn't understand the --version flag.
   515.9 +
  515.10 +Fixes the symptom
  515.11 +checking whether ld is GNU ld... no
  515.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
  515.13 +checking version of /usr/libexec/gcc/darwin/ppc/as... 
  515.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
  515.15 +
  515.16 +--- glibc-2.3.2/configure~	Wed Feb 26 09:20:48 2003
  515.17 ++++ glibc-2.3.2/configure	Fri Feb 27 13:12:53 2004
  515.18 +@@ -3789,7 +3789,7 @@
  515.19 +   # Found it, now check the version.
  515.20 +   echo "$as_me:$LINENO: checking version of $AS" >&5
  515.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
  515.22 +-  ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
  515.23 ++  ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
  515.24 +   case $ac_prog_version in
  515.25 +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
  515.26 +     2.1[3-9]*)
   516.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   516.2 +++ b/patches/glibc/2.3.3/glibc-fp-byteorder.patch	Sat Feb 24 11:00:05 2007 +0000
   516.3 @@ -0,0 +1,203 @@
   516.4 +Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
   516.5 +Author: addsub@eyou.com
   516.6 +Target: ARM
   516.7 +
   516.8 +Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
   516.9 +and makes printf("%f", 1.0) work.
  516.10 +
  516.11 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
  516.12 + It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
  516.13 + is broken' on my big-endian hardfloat FPA ARM platform. ...
  516.14 + It's definitely needed for hardfloat.  So I'd think it's needed for
  516.15 + big-endian systems in any case, and for VFP on little-endian systems
  516.16 + too.  Someone would have to verify that though.
  516.17 +
  516.18 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
  516.19 + I just had a look at glibc-20040830, and [this patch] is still needed and useful
  516.20 + for this version.  glibc-20040830 out-of-the-box still contains the
  516.21 + following wrong assumptions:
  516.22 + - sysdeps/arm/bits/endian.h: float word order is big endian (which it is
  516.23 +   not on vfp systems)
  516.24 + - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
  516.25 +   are not on big endian systems, neither on vfp systems)
  516.26 + - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
  516.27 +   (which they are not on big endian systems)
  516.28 + [This patch] seems the right solution for all of these issues.
  516.29 +
  516.30 +Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
  516.31 + It's even needed for glibc CVS, AFAICS.
  516.32 + The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
  516.33 + (currently at version 1.4) is only needed for proper VFP operation.
  516.34 + But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
  516.35 + that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
  516.36 + for proper operation of *any* FP model on big endian ARM.
  516.37 +
  516.38 +See also discussion in followups to
  516.39 +http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
  516.40 +
  516.41 +Message-ID: <276985760.37584@eyou.com>
  516.42 +Received: from unknown (HELO eyou.com) (172.16.2.2)
  516.43 + by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
  516.44 +Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
  516.45 +Date: 17 Feb 2004 10:42:38 +0800
  516.46 +Message-ID: <20040217104238.8237.qmail@eyou.com>
  516.47 +From: "add" <addsub@eyou.com>
  516.48 +To: dank@kegel.com
  516.49 +Reply-To: "add" <addsub@eyou.com>
  516.50 +Subject: Re:&nbsp;&nbsp;&nbsp;problem&nbsp;while&nbsp;building&nbsp;arm&nbsp;vfp&nbsp;softfloat&nbsp;gcc&nbsp;`
  516.51 +
  516.52 +Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
  516.53 +toolchain can printf("%f\n",1.0). So you may have a try of this
  516.54 +
  516.55 +
  516.56 +diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
  516.57 +--- glibc.old/sysdeps/arm/bits/endian.h	1999-04-12 11:59:13.000000000 -0400
  516.58 ++++ glibc.new/sysdeps/arm/bits/endian.h	2004-02-12 09:15:13.000000000 -0500
  516.59 +@@ -9,4 +9,9 @@
  516.60 + #else
  516.61 + #define __BYTE_ORDER __LITTLE_ENDIAN
  516.62 + #endif
  516.63 ++
  516.64 ++#ifdef __VFP_FP__
  516.65 ++#define __FLOAT_WORD_ORDER __BYTE_ORDER
  516.66 ++#else
  516.67 + #define __FLOAT_WORD_ORDER __BIG_ENDIAN
  516.68 ++#endif
  516.69 +diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
  516.70 +--- glibc.old/sysdeps/arm/gmp-mparam.h	2001-07-07 15:21:19.000000000 -0400
  516.71 ++++ glibc.new/sysdeps/arm/gmp-mparam.h	2004-02-12 09:15:13.000000000 -0500
  516.72 +@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
  516.73 + #define BITS_PER_SHORTINT 16
  516.74 + #define BITS_PER_CHAR 8
  516.75 + 
  516.76 +-#define IEEE_DOUBLE_BIG_ENDIAN 0
  516.77 +-#define IEEE_DOUBLE_MIXED_ENDIAN 1
  516.78 ++#if defined(__ARMEB__)
  516.79 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
  516.80 ++# define IEEE_DOUBLE_BIG_ENDIAN 1
  516.81 ++#elif defined(__VFP_FP__)
  516.82 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
  516.83 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
  516.84 ++#else
  516.85 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
  516.86 ++# define IEEE_DOUBLE_MIXED_ENDIAN 1
  516.87 ++#endif
  516.88 +diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
  516.89 +--- glibc.old/sysdeps/arm/ieee754.h	2001-07-07 15:21:19.000000000 -0400
  516.90 ++++ glibc.new/sysdeps/arm/ieee754.h	1969-12-31 19:00:00.000000000 -0500
  516.91 +@@ -1,115 +0,0 @@
  516.92 +-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
  516.93 +-   This file is part of the GNU C Library.
  516.94 +-
  516.95 +-   The GNU C Library is free software; you can redistribute it and/or
  516.96 +-   modify it under the terms of the GNU Lesser General Public
  516.97 +-   License as published by the Free Software Foundation; either
  516.98 +-   version 2.1 of the License, or (at your option) any later version.
  516.99 +-
 516.100 +-   The GNU C Library is distributed in the hope that it will be useful,
 516.101 +-   but WITHOUT ANY WARRANTY; without even the implied warranty of
 516.102 +-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 516.103 +-   Lesser General Public License for more details.
 516.104 +-
 516.105 +-   You should have received a copy of the GNU Lesser General Public
 516.106 +-   License along with the GNU C Library; if not, write to the Free
 516.107 +-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 516.108 +-   02111-1307 USA.  */
 516.109 +-
 516.110 +-#ifndef _IEEE754_H
 516.111 +-
 516.112 +-#define _IEEE754_H 1
 516.113 +-#include <features.h>
 516.114 +-
 516.115 +-#include <endian.h>
 516.116 +-
 516.117 +-__BEGIN_DECLS
 516.118 +-
 516.119 +-union ieee754_float
 516.120 +-  {
 516.121 +-    float f;
 516.122 +-
 516.123 +-    /* This is the IEEE 754 single-precision format.  */
 516.124 +-    struct
 516.125 +-      {
 516.126 +-	unsigned int mantissa:23;
 516.127 +-	unsigned int exponent:8;
 516.128 +-	unsigned int negative:1;
 516.129 +-      } ieee;
 516.130 +-
 516.131 +-    /* This format makes it easier to see if a NaN is a signalling NaN.  */
 516.132 +-    struct
 516.133 +-      {
 516.134 +-	unsigned int mantissa:22;
 516.135 +-	unsigned int quiet_nan:1;
 516.136 +-	unsigned int exponent:8;
 516.137 +-	unsigned int negative:1;
 516.138 +-      } ieee_nan;
 516.139 +-  };
 516.140 +-
 516.141 +-#define IEEE754_FLOAT_BIAS	0x7f /* Added to exponent.  */
 516.142 +-
 516.143 +-
 516.144 +-union ieee754_double
 516.145 +-  {
 516.146 +-    double d;
 516.147 +-
 516.148 +-    /* This is the IEEE 754 double-precision format.  */
 516.149 +-    struct
 516.150 +-      {
 516.151 +-	unsigned int mantissa0:20;
 516.152 +-	unsigned int exponent:11;
 516.153 +-	unsigned int negative:1;
 516.154 +-	unsigned int mantissa1:32;
 516.155 +-      } ieee;
 516.156 +-
 516.157 +-    /* This format makes it easier to see if a NaN is a signalling NaN.  */
 516.158 +-    struct
 516.159 +-      {
 516.160 +-	unsigned int mantissa0:19;
 516.161 +-	unsigned int quiet_nan:1;
 516.162 +-	unsigned int exponent:11;
 516.163 +-	unsigned int negative:1;
 516.164 +-	unsigned int mantissa1:32;
 516.165 +-      } ieee_nan;
 516.166 +-  };
 516.167 +-
 516.168 +-#define IEEE754_DOUBLE_BIAS	0x3ff /* Added to exponent.  */
 516.169 +-
 516.170 +-
 516.171 +-/* The following two structures are correct for `new' floating point systems but
 516.172 +-   wrong for the old FPPC.  The only solution seems to be to avoid their use on
 516.173 +-   old hardware.  */
 516.174 +-
 516.175 +-union ieee854_long_double
 516.176 +-  {
 516.177 +-    long double d;
 516.178 +-
 516.179 +-    /* This is the IEEE 854 double-extended-precision format.  */
 516.180 +-    struct
 516.181 +-      {
 516.182 +-	unsigned int exponent:15;
 516.183 +-	unsigned int empty:16;
 516.184 +-	unsigned int negative:1;
 516.185 +-	unsigned int mantissa1:32;
 516.186 +-	unsigned int mantissa0:32;
 516.187 +-      } ieee;
 516.188 +-
 516.189 +-    /* This is for NaNs in the IEEE 854 double-extended-precision format.  */
 516.190 +-    struct
 516.191 +-      {
 516.192 +-	unsigned int exponent:15;
 516.193 +-	unsigned int empty:16;
 516.194 +-	unsigned int negative:1;
 516.195 +-	unsigned int mantissa1:32;
 516.196 +-	unsigned int mantissa0:30;
 516.197 +-	unsigned int quiet_nan:1;
 516.198 +-	unsigned int one:1;
 516.199 +-      } ieee_nan;
 516.200 +-  };
 516.201 +-
 516.202 +-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
 516.203 +-
 516.204 +-__END_DECLS
 516.205 +-
 516.206 +-#endif /* ieee754.h */
   517.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   517.2 +++ b/patches/glibc/2.3.4/arm-ctl_bus_isa.patch	Sat Feb 24 11:00:05 2007 +0000
   517.3 @@ -0,0 +1,51 @@
   517.4 +Applies to both glibc-2.2.5 and glibc-2.3.2, and probably glibc cvs as of Aug 2004.
   517.5 +Needed to build glibc with linux kernels 2.4.23 or higher on ARM, 
   517.6 +Fixes following error:
   517.7 +
   517.8 +../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
   517.9 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
  517.10 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
  517.11 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
  517.12 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
  517.13 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
  517.14 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
  517.15 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
  517.16 +make[2]: *** [/home/dank/crosstool-0.28/build/arm-softfloat-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/misc/ioperm.o] Error 1
  517.17 +
  517.18 +cf. "[SYSCTL] BUS_ISA -> CTL_BUS_ISA",  http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html
  517.19 +
  517.20 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c.old	2003-02-20 14:22:24.000000000 -0800
  517.21 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c	2004-01-31 16:01:50.000000000 -0800
  517.22 +@@ -47,6 +47,12 @@
  517.23 + #include <asm/page.h>
  517.24 + #include <sys/sysctl.h>
  517.25 + 
  517.26 ++/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
  517.27 ++#include <linux/version.h>
  517.28 ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
  517.29 ++#define CTL_BUS_ISA BUS_ISA	/* and hope it's not the one from linux/input.h */
  517.30 ++#endif
  517.31 ++
  517.32 + #define PATH_ARM_SYSTYPE	"/etc/arm_systype"
  517.33 + #define PATH_CPUINFO		"/proc/cpuinfo"
  517.34 + 
  517.35 +@@ -80,7 +86,7 @@
  517.36 +  * Initialize I/O system.  There are several ways to get the information
  517.37 +  * we need.  Each is tried in turn until one succeeds.
  517.38 +  *
  517.39 +- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*).  This is the preferred method
  517.40 ++ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*).  This is the preferred method
  517.41 +  *    but not all kernels support it.
  517.42 +  *
  517.43 +  * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
  517.44 +@@ -100,8 +106,8 @@
  517.45 + {
  517.46 +   char systype[256];
  517.47 +   int i, n;
  517.48 +-  static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
  517.49 +-  static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
  517.50 ++  static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
  517.51 ++  static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
  517.52 +   size_t len = sizeof(io.base);
  517.53 + 
  517.54 +   if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
   518.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   518.2 +++ b/patches/glibc/2.3.4/bad/glibc-2.3.4-cygwin.patch	Sat Feb 24 11:00:05 2007 +0000
   518.3 @@ -0,0 +1,96 @@
   518.4 +Fixes
   518.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
   518.6 +...
   518.7 +when building glibc-2.3.3 on cygwin
   518.8 +
   518.9 +Idea from
  518.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
  518.11 +Basically, make glibc use .oST as suffix for 'object static'
  518.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
  518.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
  518.14 +
  518.15 +glibc-linuxthreads-2.3.3 also requires a patch, see 
  518.16 +../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
  518.17 +
  518.18 +[ Rediffed against glibc-2.3.3 ]
  518.19 +
  518.20 +
  518.21 +diff -urN glibc-2.3.4-orig/Makeconfig glibc-2.3.4/Makeconfig
  518.22 +--- glibc-2.3.4-orig/Makeconfig	2004-12-15 19:51:47.000000000 +0100
  518.23 ++++ glibc-2.3.4/Makeconfig	2005-03-13 18:54:58.000000000 +0100
  518.24 +@@ -449,7 +449,7 @@
  518.25 + # run the linked programs.
  518.26 + link-libc = -Wl,-rpath-link=$(rpath-link) \
  518.27 + 	    $(common-objpfx)libc.so$(libc.so-version) \
  518.28 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
  518.29 ++            $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
  518.30 + # This is how to find at build-time things that will be installed there.
  518.31 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
  518.32 + endif
  518.33 +@@ -667,7 +667,7 @@
  518.34 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
  518.35 + # to pass different flags for each flavor.
  518.36 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
  518.37 +-all-object-suffixes := .o .os .op .og .ob .oS
  518.38 ++all-object-suffixes := .o .os .op .og .ob .oST
  518.39 + object-suffixes :=
  518.40 + CPPFLAGS-.o = $(pic-default)
  518.41 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
  518.42 +@@ -723,14 +723,14 @@
  518.43 + 
  518.44 + ifeq (yes,$(build-shared))
  518.45 + # Build special library that contains the static-only routines for libc.
  518.46 +-object-suffixes-for-libc += .oS
  518.47 ++object-suffixes-for-libc += .oST
  518.48 + 
  518.49 + # Must build the routines as PIC, though, because they can end up in (users')
  518.50 + # shared objects.  We don't want to use CFLAGS-os because users may, for
  518.51 + # example, make that processor-specific.
  518.52 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
  518.53 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
  518.54 +-libtype.oS = lib%_nonshared.a
  518.55 ++CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag)
  518.56 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
  518.57 ++libtype.oST = lib%_nonshared.a
  518.58 + endif
  518.59 + 
  518.60 + # The assembler can generate debug information too.
  518.61 +diff -urN glibc-2.3.4-orig/Makerules glibc-2.3.4/Makerules
  518.62 +--- glibc-2.3.4-orig/Makerules	2004-12-15 19:52:39.000000000 +0100
  518.63 ++++ glibc-2.3.4/Makerules	2005-03-13 18:50:09.000000000 +0100
  518.64 +@@ -416,7 +416,7 @@
  518.65 + # Bounded pointer thunks are only built for *.ob
  518.66 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
  518.67 + 
  518.68 +-elide-routines.oS += $(filter-out $(static-only-routines),\
  518.69 ++elide-routines.oST += $(filter-out $(static-only-routines),\
  518.70 + 				  $(routines) $(aux) $(sysdep_routines)) \
  518.71 + 		     $(elide-bp-thunks)
  518.72 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
  518.73 +@@ -961,7 +961,7 @@
  518.74 + install: $(inst_libdir)/libc.so
  518.75 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
  518.76 + 			$(common-objpfx)libc.so$(libc.so-version) \
  518.77 +-			$(inst_libdir)/$(patsubst %,$(libtype.oS),\
  518.78 ++			$(inst_libdir)/$(patsubst %,$(libtype.oST),\
  518.79 + 						  $(libprefix)$(libc-name)) \
  518.80 + 			$(+force)
  518.81 + 	(echo '/* GNU ld script';\
  518.82 +@@ -969,7 +969,7 @@
  518.83 + 	 echo '   the static library, so try that secondarily.  */';\
  518.84 + 	 cat $<; \
  518.85 + 	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
  518.86 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
  518.87 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
  518.88 + 	      ')' \
  518.89 + 	) > $@.new
  518.90 + 	mv -f $@.new $@
  518.91 +diff -urN glibc-2.3.4-orig/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.4/sysdeps/sparc/sparc32/sparcv9/Makefile
  518.92 +--- glibc-2.3.4-orig/sysdeps/sparc/sparc32/sparcv9/Makefile	2004-08-16 08:46:14.000000000 +0200
  518.93 ++++ glibc-2.3.4/sysdeps/sparc/sparc32/sparcv9/Makefile	2005-03-13 18:50:09.000000000 +0100
  518.94 +@@ -10,4 +10,4 @@
  518.95 + ASFLAGS-.op += -Wa,-Av9a
  518.96 + ASFLAGS-.og += -Wa,-Av9a
  518.97 + ASFLAGS-.ob += -Wa,-Av9a
  518.98 +-ASFLAGS-.oS += -Wa,-Av9a
  518.99 ++ASFLAGS-.oST += -Wa,-Av9a
   519.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   519.2 +++ b/patches/glibc/2.3.4/fix-pr398.patch	Sat Feb 24 11:00:05 2007 +0000
   519.3 @@ -0,0 +1,70 @@
   519.4 +Fixes error
   519.5 +
   519.6 +dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
   519.7 +make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
   519.8 +e.o] Error 1
   519.9 +make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
  519.10 +822/elf'
  519.11 +make[1]: *** [elf/subdir_lib] Error 2
  519.12 +make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
  519.13 +822'
  519.14 +make: *** [all] Error 2
  519.15 +
  519.16 +-----------------
  519.17 +
  519.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
  519.19 +http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
  519.20 +
  519.21 +-----------------
  519.22 +
  519.23 +CVSROOT:	/cvs/glibc
  519.24 +Module name:	libc
  519.25 +Branch: 	glibc-2_3-branch
  519.26 +Changes by:	roland@sources.redhat.com	2006-02-23 22:36:51
  519.27 +
  519.28 +Modified files:
  519.29 +	sysdeps/s390/s390-64: dl-machine.h 
  519.30 +	sysdeps/s390/s390-32: dl-machine.h 
  519.31 +
  519.32 +Log message:
  519.33 +	2004-07-10  GOTO Masanori  <gotom@debian.or.jp>
  519.34 +	
  519.35 +	[BZ #398]
  519.36 +	* sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
  519.37 +	directive.
  519.38 +	* sysdeps/s390/s390-64/dl-machine.h: Likewise.
  519.39 +
  519.40 +Patches:
  519.41 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
  519.42 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
  519.43 +
  519.44 +===================================================================
  519.45 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
  519.46 +retrieving revision 1.19.4.1
  519.47 +retrieving revision 1.19.4.2
  519.48 +diff -u -r1.19.4.1 -r1.19.4.2
  519.49 +--- libc/sysdeps/s390/s390-64/dl-machine.h	2005/10/17 04:57:27	1.19.4.1
  519.50 ++++ libc/sysdeps/s390/s390-64/dl-machine.h	2006/02/23 22:36:51	1.19.4.2
  519.51 +@@ -27,6 +27,7 @@
  519.52 + #include <sys/param.h>
  519.53 + #include <string.h>
  519.54 + #include <link.h>
  519.55 ++#include <sysdep.h>
  519.56 + 
  519.57 + /* This is an older, now obsolete value.  */
  519.58 + #define EM_S390_OLD	0xA390
  519.59 +===================================================================
  519.60 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
  519.61 +retrieving revision 1.20.4.1
  519.62 +retrieving revision 1.20.4.2
  519.63 +diff -u -r1.20.4.1 -r1.20.4.2
  519.64 +--- libc/sysdeps/s390/s390-32/dl-machine.h	2005/10/17 04:57:27	1.20.4.1
  519.65 ++++ libc/sysdeps/s390/s390-32/dl-machine.h	2006/02/23 22:36:51	1.20.4.2
  519.66 +@@ -27,6 +27,7 @@
  519.67 + #include <sys/param.h>
  519.68 + #include <string.h>
  519.69 + #include <link.h>
  519.70 ++#include <sysdep.h>
  519.71 + 
  519.72 + /* This is an older, now obsolete value.  */
  519.73 + #define EM_S390_OLD	0xA390
   520.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   520.2 +++ b/patches/glibc/2.3.4/glibc-2.3.4-allow-gcc-4.0-arm.patch	Sat Feb 24 11:00:05 2007 +0000
   520.3 @@ -0,0 +1,117 @@
   520.4 +Fixes
   520.5 +In file included from dynamic-link.h:22,
   520.6 +                 from dl-reloc.c:265:
   520.7 +../sysdeps/arm/dl-machine.h: In function '_dl_relocate_object':
   520.8 +../sysdeps/arm/dl-machine.h:371: error: invalid storage class for function 'fix_bad_pc24'
   520.9 +../sysdeps/arm/dl-machine.h:406: error: invalid storage class for function 'elf_machine_rel'
  520.10 +../sysdeps/arm/dl-machine.h:532: error: invalid storage class for function 'elf_machine_rela'
  520.11 +../sysdeps/arm/dl-machine.h:612: error: invalid storage class for function 'elf_machine_rel_relative'
  520.12 +../sysdeps/arm/dl-machine.h:621: error: invalid storage class for function 'elf_machine_rela_relative'
  520.13 +../sysdeps/arm/dl-machine.h:630: error: invalid storage class for function 'elf_machine_lazy_rel'
  520.14 +make[2]: Leaving directory `/home/dank/queue/jobdir.k8/crosstool-dev/build/arm-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.3/glibc-2.3.3/elf'
  520.15 +
  520.16 +when building glibc-2.3.[34] with gcc-4.0
  520.17 +
  520.18 +Like
  520.19 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/arm/dl-machine.h.diff?r1=1.51&r2=1.52&cvsroot=glibc
  520.20 +but works with older compilers, and fixes fix_bad_pc24.
  520.21 +
  520.22 +
  520.23 +--- glibc-2.3.4/sysdeps/arm/dl-machine.h.old	Sun Mar 20 17:54:37 2005
  520.24 ++++ glibc-2.3.4/sysdeps/arm/dl-machine.h	Sun Mar 20 17:57:32 2005
  520.25 +@@ -359,7 +359,14 @@
  520.26 + # endif
  520.27 + 
  520.28 + /* Deal with an out-of-range PC24 reloc.  */
  520.29 +-static Elf32_Addr
  520.30 ++#if __GNUC__ >= 4
  520.31 ++  auto inline Elf32_Addr
  520.32 ++#else
  520.33 ++  static inline Elf32_Addr
  520.34 ++#endif
  520.35 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  520.36 ++  __attribute ((always_inline))
  520.37 ++#endif
  520.38 + fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
  520.39 + {
  520.40 +   static void *fix_page;
  520.41 +@@ -392,7 +399,14 @@
  520.42 + /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
  520.43 +    MAP is the object containing the reloc.  */
  520.44 + 
  520.45 +-static inline void
  520.46 ++#if __GNUC__ >= 4
  520.47 ++  auto inline void
  520.48 ++#else
  520.49 ++  static inline void
  520.50 ++#endif
  520.51 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  520.52 ++  __attribute ((always_inline))
  520.53 ++#endif
  520.54 + elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
  520.55 + 		 const Elf32_Sym *sym, const struct r_found_version *version,
  520.56 + 		 void *const reloc_addr_arg)
  520.57 +@@ -517,7 +531,14 @@
  520.58 + }
  520.59 + 
  520.60 + # ifndef RTLD_BOOTSTRAP
  520.61 +-static inline void
  520.62 ++#if __GNUC__ >= 4
  520.63 ++  auto inline void
  520.64 ++#else
  520.65 ++  static inline void
  520.66 ++#endif
  520.67 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  520.68 ++  __attribute ((always_inline))
  520.69 ++#endif
  520.70 + elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
  520.71 + 		  const Elf32_Sym *sym, const struct r_found_version *version,
  520.72 + 		  void *const reloc_addr_arg)
  520.73 +@@ -597,7 +618,14 @@
  520.74 + }
  520.75 + # endif
  520.76 + 
  520.77 +-static inline void
  520.78 ++#if __GNUC__ >= 4
  520.79 ++  auto inline void
  520.80 ++#else
  520.81 ++  static inline void
  520.82 ++#endif
  520.83 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  520.84 ++  __attribute ((always_inline))
  520.85 ++#endif
  520.86 + elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
  520.87 + 			  void *const reloc_addr_arg)
  520.88 + {
  520.89 +@@ -606,7 +634,14 @@
  520.90 + }
  520.91 + 
  520.92 + # ifndef RTLD_BOOTSTRAP
  520.93 +-static inline void
  520.94 ++#if __GNUC__ >= 4
  520.95 ++  auto inline void
  520.96 ++#else
  520.97 ++  static inline void
  520.98 ++#endif
  520.99 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
 520.100 ++  __attribute ((always_inline))
 520.101 ++#endif
 520.102 + elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
 520.103 + 			   void *const reloc_addr_arg)
 520.104 + {
 520.105 +@@ -615,7 +650,14 @@
 520.106 + }
 520.107 + # endif
 520.108 + 
 520.109 +-static inline void
 520.110 ++#if __GNUC__ >= 4
 520.111 ++  auto inline void
 520.112 ++#else
 520.113 ++  static inline void
 520.114 ++#endif
 520.115 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
 520.116 ++  __attribute ((always_inline))
 520.117 ++#endif
 520.118 + elf_machine_lazy_rel (struct link_map *map,
 520.119 + 		      Elf32_Addr l_addr, const Elf32_Rel *reloc)
 520.120 + {
   521.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   521.2 +++ b/patches/glibc/2.3.4/glibc-2.3.4-allow-gcc-4.0-elf.patch	Sat Feb 24 11:00:05 2007 +0000
   521.3 @@ -0,0 +1,61 @@
   521.4 +From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
   521.5 +Fixes
   521.6 +  rtld.c: In function '_dl_start':
   521.7 +  dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
   521.8 +  dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
   521.9 +when compiling glibc-2.3.4 with gcc-4.0
  521.10 +
  521.11 +But see also
  521.12 +http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
  521.13 +and
  521.14 +http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
  521.15 +which seem to propose less radical fixes?
  521.16 +
  521.17 +Aha.  See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
  521.18 +
  521.19 +--- glibc-2.3-20050307/elf/dynamic-link.h.old	2005-03-12 18:12:37.000000000 -0800
  521.20 ++++ glibc-2.3-20050307/elf/dynamic-link.h	2005-03-12 18:12:59.777820848 -0800
  521.21 +@@ -19,43 +19,6 @@
  521.22 + 
  521.23 + #include <elf.h>
  521.24 + #include <assert.h>
  521.25 +-
  521.26 +-#ifdef RESOLVE
  521.27 +-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
  521.28 +-   ElfW(Addr), because not all architectures can assume that the
  521.29 +-   relocated address is properly aligned, whereas the compiler is
  521.30 +-   entitled to assume that a pointer to a type is properly aligned for
  521.31 +-   the type.  Even if we cast the pointer back to some other type with
  521.32 +-   less strict alignment requirements, the compiler might still
  521.33 +-   remember that the pointer was originally more aligned, thereby
  521.34 +-   optimizing away alignment tests or using word instructions for
  521.35 +-   copying memory, breaking the very code written to handle the
  521.36 +-   unaligned cases.  */
  521.37 +-auto void __attribute__((always_inline))
  521.38 +-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
  521.39 +-		 const ElfW(Sym) *sym, const struct r_found_version *version,
  521.40 +-		 void *const reloc_addr);
  521.41 +-auto void __attribute__((always_inline))
  521.42 +-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
  521.43 +-		  const ElfW(Sym) *sym, const struct r_found_version *version,
  521.44 +-		  void *const reloc_addr);
  521.45 +-auto void __attribute__((always_inline))
  521.46 +-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
  521.47 +-			  void *const reloc_addr);
  521.48 +-auto void __attribute__((always_inline))
  521.49 +-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
  521.50 +-			   void *const reloc_addr);
  521.51 +-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
  521.52 +-auto void __attribute__((always_inline))
  521.53 +-elf_machine_lazy_rel (struct link_map *map,
  521.54 +-		      ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
  521.55 +-# else
  521.56 +-auto void __attribute__((always_inline))
  521.57 +-elf_machine_lazy_rel (struct link_map *map,
  521.58 +-		      ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
  521.59 +-# endif
  521.60 +-#endif
  521.61 +-
  521.62 + #include <dl-machine.h>
  521.63 + 
  521.64 + #ifndef VERSYMIDX
   522.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   522.2 +++ b/patches/glibc/2.3.4/glibc-2.3.4-allow-gcc-4.0-iconvdata.patch	Sat Feb 24 11:00:05 2007 +0000
   522.3 @@ -0,0 +1,44 @@
   522.4 +See http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
   522.5 +and http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
   522.6 +
   522.7 +Fixes
   522.8 +  In file included from jis0208.c:23:
   522.9 +  jis0208.h:32: error: array type has incomplete element type
  522.10 +when building glibc with gcc-4.0
  522.11 +The bug has been present since at least glibc-2.2.5.
  522.12 +This patch applies cleanly to glibc-2.3.4
  522.13 +
  522.14 +--- /home/dank/downloads/glibc-2.3-20050307/iconvdata/jis0208.h	2003-06-11 14:40:42.000000000 -0700
  522.15 ++++ glibc-2.3-20050307/iconvdata/jis0208.h	2005-03-13 20:55:01.784054760 -0800
  522.16 +@@ -24,15 +24,6 @@
  522.17 + #include <gconv.h>
  522.18 + #include <stdint.h>
  522.19 + 
  522.20 +-/* Conversion table.  */
  522.21 +-extern const uint16_t __jis0208_to_ucs[];
  522.22 +-
  522.23 +-extern const char __jisx0208_from_ucs4_lat1[256][2];
  522.24 +-extern const char __jisx0208_from_ucs4_greek[0xc1][2];
  522.25 +-extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
  522.26 +-extern const char __jisx0208_from_ucs_tab[][2];
  522.27 +-
  522.28 +-
  522.29 + /* Struct for table with indeces in UCS mapping table.  */
  522.30 + struct jisx0208_ucs_idx
  522.31 + {
  522.32 +@@ -42,6 +33,15 @@
  522.33 + };
  522.34 + 
  522.35 + 
  522.36 ++/* Conversion table.  */
  522.37 ++extern const uint16_t __jis0208_to_ucs[];
  522.38 ++
  522.39 ++extern const char __jisx0208_from_ucs4_lat1[256][2];
  522.40 ++extern const char __jisx0208_from_ucs4_greek[0xc1][2];
  522.41 ++extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
  522.42 ++extern const char __jisx0208_from_ucs_tab[][2];
  522.43 ++
  522.44 ++
  522.45 + static inline uint32_t
  522.46 + __attribute ((always_inline))
  522.47 + jisx0208_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
   523.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   523.2 +++ b/patches/glibc/2.3.4/glibc-2.3.4-allow-gcc-4.0-powerpc-procfs.patch	Sat Feb 24 11:00:05 2007 +0000
   523.3 @@ -0,0 +1,62 @@
   523.4 +First discussed here:
   523.5 +http://gcc.gnu.org/ml/gcc/2005-01/msg00509.html
   523.6 +
   523.7 +Revision 1.12, Wed Mar 2 20:11:38 2005 UTC by roland
   523.8 +Branch: MAIN
   523.9 +CVS Tags: fedora-glibc-20050303T1335, HEAD
  523.10 +Changes since 1.11: +3 -8 lines
  523.11 +Diff to previous 1.11 (colored)
  523.12 +
  523.13 +2005-02-21  Alan Modra <amodra@bigpond.net.au>
  523.14 +
  523.15 +	* sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (elf_vrreg_t): Don't
  523.16 +	use __uint128_t.
  523.17 +
  523.18 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h?cvsroot=glibc
  523.19 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h.diff?r1=1.11&r2=1.12&cvsroot=glibc
  523.20 +
  523.21 +Fixes
  523.22 +
  523.23 +In file included from ../linuxthreads_db/proc_service.h:20,
  523.24 +                 from ../linuxthreads_db/thread_dbP.h:7,
  523.25 +                 from ../linuxthreads/descr.h:44,
  523.26 +                 from ../linuxthreads/internals.h:30,
  523.27 +                 from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27,
  523.28 +                 from ../sysdeps/generic/ldsodefs.h:38,
  523.29 +                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
  523.30 +                 from <stdin>:2:
  523.31 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:57: error: syntax error before 'elf_vrreg_t'
  523.32 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:57: warning: type defaults to 'int' in declaration of 'elf_vrreg_t'
  523.33 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:57: warning: data definition has no type or storage class
  523.34 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: error: syntax error before 'elf_vrregset_t'
  523.35 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: warning: type defaults to 'int' in declaration of 'elf_vrregset_t'
  523.36 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: warning: data definition has no type or storage class
  523.37 +make[2]: make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/powerpc-750-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/glibc-2.3-20050307/csu'
  523.38 +
  523.39 +
  523.40 +===================================================================
  523.41 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h,v
  523.42 +retrieving revision 1.11
  523.43 +retrieving revision 1.12
  523.44 +diff -u -r1.11 -r1.12
  523.45 +--- libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h	2003/12/17 23:09:34	1.11
  523.46 ++++ libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h	2005/03/02 20:11:38	1.12
  523.47 +@@ -46,15 +46,10 @@
  523.48 + typedef double elf_fpreg_t;
  523.49 + typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
  523.50 + 
  523.51 +-/* gcc 3.1 and newer support __uint128_t.  */
  523.52 +-#if !__GNUC_PREREQ(3,1)
  523.53 +-typedef struct {
  523.54 +-  unsigned long u[4];
  523.55 +-} __attribute((aligned(16))) __uint128_t;
  523.56 +-#endif
  523.57 +-
  523.58 + /* Altivec registers */
  523.59 +-typedef __uint128_t elf_vrreg_t;
  523.60 ++typedef struct {
  523.61 ++  unsigned int u[4];
  523.62 ++} __attribute__ ((aligned (16))) elf_vrreg_t;
  523.63 + typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG];
  523.64 + #endif
  523.65 + 
   524.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   524.2 +++ b/patches/glibc/2.3.4/glibc-2.3.4-allow-gcc-4.0-powerpc32.patch	Sat Feb 24 11:00:05 2007 +0000
   524.3 @@ -0,0 +1,42 @@
   524.4 +Fixes
   524.5 +
   524.6 +../sysdeps/powerpc/powerpc32/dl-machine.h: In function '_dl_relocate_object':
   524.7 +../sysdeps/powerpc/powerpc32/dl-machine.h:461: error: invalid storage class for function 'elf_machine_rela_relative'
   524.8 +../sysdeps/powerpc/powerpc32/dl-machine.h:469: error: invalid storage class for function 'elf_machine_lazy_rel'
   524.9 +make[2]: *** [/home/dank/queue/jobdir.dual2/crosstool-dev/build/powerpc-750-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/build-glibc/elf/dl-reloc.o] Error 1
  524.10 +
  524.11 +diff -ur glibc-2.3-20050307.orig/sysdeps/powerpc/powerpc32/dl-machine.h glibc-2.3-20050307/sysdeps/powerpc/powerpc32/dl-machine.h
  524.12 +--- glibc-2.3-20050307.orig/sysdeps/powerpc/powerpc32/dl-machine.h	Wed Jul 30 23:33:52 2003
  524.13 ++++ glibc-2.3-20050307/sysdeps/powerpc/powerpc32/dl-machine.h	Thu Mar 17 13:19:16 2005
  524.14 +@@ -455,7 +455,14 @@
  524.15 +     }
  524.16 + }
  524.17 + 
  524.18 +-static inline void
  524.19 ++#if __GNUC__ >= 4
  524.20 ++  auto inline void
  524.21 ++#else
  524.22 ++  static inline void
  524.23 ++#endif
  524.24 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  524.25 ++  __attribute ((always_inline))
  524.26 ++#endif
  524.27 + elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
  524.28 + 			   void *const reloc_addr_arg)
  524.29 + {
  524.30 +@@ -463,7 +470,14 @@
  524.31 +   *reloc_addr = l_addr + reloc->r_addend;
  524.32 + }
  524.33 + 
  524.34 +-static inline void
  524.35 ++#if __GNUC__ >= 4
  524.36 ++  auto inline void
  524.37 ++#else
  524.38 ++  static inline void
  524.39 ++#endif
  524.40 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  524.41 ++  __attribute ((always_inline))
  524.42 ++#endif
  524.43 + elf_machine_lazy_rel (struct link_map *map,
  524.44 + 		      Elf32_Addr l_addr, const Elf32_Rela *reloc)
  524.45 + {
   525.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   525.2 +++ b/patches/glibc/2.3.4/glibc-2.3.4-allow-gcc-4.0-powerpc64.patch	Sat Feb 24 11:00:05 2007 +0000
   525.3 @@ -0,0 +1,60 @@
   525.4 +Fixes:
   525.5 +
   525.6 +In file included from dynamic-link.h:22,
   525.7 +                 from dl-reloc.c:269:
   525.8 +../sysdeps/powerpc/powerpc64/dl-machine.h: In function '_dl_relocate_object':
   525.9 +../sysdeps/powerpc/powerpc64/dl-machine.h:573: error: invalid storage class for function 'elf_machine_rela_relative'
  525.10 +../sysdeps/powerpc/powerpc64/dl-machine.h:607: error: invalid storage class for function 'elf_machine_rela'
  525.11 +../sysdeps/powerpc/powerpc64/dl-machine.h:889: error: invalid storage class for function 'elf_machine_lazy_rel'
  525.12 +make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/powerpc64-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/glibc-2.3-20050307/elf'
  525.13 +
  525.14 +--- glibc-2.3-20050307/sysdeps/powerpc/powerpc64/dl-machine.h.old	Thu Mar 17 13:35:23 2005
  525.15 ++++ glibc-2.3-20050307/sysdeps/powerpc/powerpc64/dl-machine.h	Thu Mar 17 13:37:12 2005
  525.16 +@@ -567,7 +567,14 @@
  525.17 +                                 const Elf64_Sym *refsym)
  525.18 +                                 attribute_hidden;
  525.19 + 
  525.20 +-static inline void
  525.21 ++#if __GNUC__ >= 4
  525.22 ++  auto inline void
  525.23 ++#else
  525.24 ++  static inline void
  525.25 ++#endif
  525.26 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  525.27 ++  __attribute ((always_inline))
  525.28 ++#endif
  525.29 + elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
  525.30 + 			   void *const reloc_addr_arg)
  525.31 + {
  525.32 +@@ -598,7 +605,14 @@
  525.33 + 
  525.34 + /* Perform the relocation specified by RELOC and SYM (which is fully
  525.35 +    resolved).  MAP is the object containing the reloc.  */
  525.36 +-static inline void
  525.37 ++#if __GNUC__ >= 4
  525.38 ++  auto inline void
  525.39 ++#else
  525.40 ++  static inline void
  525.41 ++#endif
  525.42 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  525.43 ++  __attribute ((always_inline))
  525.44 ++#endif
  525.45 + elf_machine_rela (struct link_map *map,
  525.46 + 		  const Elf64_Rela *reloc,
  525.47 + 		  const Elf64_Sym *sym,
  525.48 +@@ -883,7 +897,14 @@
  525.49 +   MODIFIED_CODE_NOQUEUE (reloc_addr);
  525.50 + }
  525.51 + 
  525.52 +-static inline void
  525.53 ++#if __GNUC__ >= 4
  525.54 ++  auto inline void
  525.55 ++#else
  525.56 ++  static inline void
  525.57 ++#endif
  525.58 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  525.59 ++  __attribute ((always_inline))
  525.60 ++#endif
  525.61 + elf_machine_lazy_rel (struct link_map *map,
  525.62 + 		      Elf64_Addr l_addr, const Elf64_Rela *reloc)
  525.63 + {
   526.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   526.2 +++ b/patches/glibc/2.3.4/glibc-2.3.4-cygwin.patch	Sat Feb 24 11:00:05 2007 +0000
   526.3 @@ -0,0 +1,166 @@
   526.4 +Fixes
   526.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
   526.6 +...
   526.7 +when building glibc-2.3.4 on cygwin
   526.8 +
   526.9 +Idea from
  526.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
  526.11 +Basically, make glibc use .oST as suffix for 'object static'
  526.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
  526.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
  526.14 +
  526.15 +glibc-linuxthreads-2.3.4 also requires a patch, see 
  526.16 +../glibc-linuxthreads-2.3.4/glibc-linuxthreads-2.3.4-cygwin.patch
  526.17 +
  526.18 +[ Ported to glibc-2.3.4 by steve@digidescorp.com ]
  526.19 +
  526.20 +--- glibc-2.3.4/Makeconfig.orig	2004-12-15 12:51:47.000000000 -0600
  526.21 ++++ glibc-2.3.4/Makeconfig	2005-06-29 00:31:27.000000000 -0500
  526.22 +@@ -449,7 +449,7 @@
  526.23 + # run the linked programs.
  526.24 + link-libc = -Wl,-rpath-link=$(rpath-link) \
  526.25 + 	    $(common-objpfx)libc.so$(libc.so-version) \
  526.26 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
  526.27 ++	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
  526.28 + # This is how to find at build-time things that will be installed there.
  526.29 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
  526.30 + endif
  526.31 +@@ -667,7 +667,7 @@
  526.32 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
  526.33 + # to pass different flags for each flavor.
  526.34 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
  526.35 +-all-object-suffixes := .o .os .op .og .ob .oS
  526.36 ++all-object-suffixes := .o .os .op .og .ob .oST
  526.37 + object-suffixes :=
  526.38 + CPPFLAGS-.o = $(pic-default)
  526.39 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
  526.40 +@@ -723,14 +723,14 @@
  526.41 + 
  526.42 + ifeq (yes,$(build-shared))
  526.43 + # Build special library that contains the static-only routines for libc.
  526.44 +-object-suffixes-for-libc += .oS
  526.45 ++object-suffixes-for-libc += .oST
  526.46 + 
  526.47 + # Must build the routines as PIC, though, because they can end up in (users')
  526.48 + # shared objects.  We don't want to use CFLAGS-os because users may, for
  526.49 + # example, make that processor-specific.
  526.50 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
  526.51 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
  526.52 +-libtype.oS = lib%_nonshared.a
  526.53 ++CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag)
  526.54 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
  526.55 ++libtype.oST = lib%_nonshared.a
  526.56 + endif
  526.57 + 
  526.58 + # The assembler can generate debug information too.
  526.59 +--- glibc-2.3.4/Makerules.orig	2005-06-28 20:57:52.562500000 -0500
  526.60 ++++ glibc-2.3.4/Makerules	2005-06-29 00:27:21.328125000 -0500
  526.61 +@@ -416,7 +416,7 @@
  526.62 + # Bounded pointer thunks are only built for *.ob
  526.63 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
  526.64 + 
  526.65 +-elide-routines.oS += $(filter-out $(static-only-routines),\
  526.66 ++elide-routines.oST += $(filter-out $(static-only-routines),\
  526.67 + 				  $(routines) $(aux) $(sysdep_routines)) \
  526.68 + 		     $(elide-bp-thunks)
  526.69 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
  526.70 +@@ -968,7 +968,7 @@
  526.71 + install: $(inst_libdir)/libc.so
  526.72 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
  526.73 + 			$(common-objpfx)libc.so$(libc.so-version) \
  526.74 +-			$(inst_libdir)/$(patsubst %,$(libtype.oS),\
  526.75 ++			$(inst_libdir)/$(patsubst %,$(libtype.oST),\
  526.76 + 						  $(libprefix)$(libc-name)) \
  526.77 + 			$(+force)
  526.78 + 	(echo '/* GNU ld script';\
  526.79 +@@ -976,7 +976,7 @@
  526.80 + 	 echo '   the static library, so try that secondarily.  */';\
  526.81 + 	 cat $<; \
  526.82 + 	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
  526.83 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
  526.84 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
  526.85 + 	      ')' \
  526.86 + 	) > $@.new
  526.87 + 	mv -f $@.new $@
  526.88 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
  526.89 +--- glibc-2.3.5/extra-lib.mk	2004-12-02 23:54:47.000000000 +0100
  526.90 ++++ glibc-2.3.5-cygwin/extra-lib.mk	2005-05-11 08:27:28.156250000 +0200
  526.91 +@@ -13,7 +13,7 @@
  526.92 + 
  526.93 + ifneq (,$($(lib)-static-only-routines))
  526.94 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
  526.95 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
  526.96 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
  526.97 + endif
  526.98 + endif
  526.99 + 
 526.100 +@@ -29,7 +29,7 @@
 526.101 + 
 526.102 + # Add each flavor of library to the lists of things to build and install.
 526.103 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
 526.104 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
 526.105 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
 526.106 + 			$(patsubst %,%$o,$(filter-out \
 526.107 + 					   $($(lib)-shared-only-routines),\
 526.108 + 					   $(all-$(lib)-routines))))
 526.109 +@@ -57,7 +57,7 @@
 526.110 + 
 526.111 + 
 526.112 + # Use o-iterator.mk to generate a rule for each flavor of library.
 526.113 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
 526.114 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
 526.115 + define o-iterator-doit
 526.116 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
 526.117 +   $(patsubst %,$(objpfx)%$o,\
 526.118 +@@ -65,7 +65,7 @@
 526.119 + 			  $(all-$(lib)-routines))); \
 526.120 + 	$$(build-extra-lib)
 526.121 + endef
 526.122 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
 526.123 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
 526.124 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
 526.125 + endif
 526.126 + 
 526.127 +@@ -77,9 +77,9 @@
 526.128 + 	$(build-extra-lib)
 526.129 + endif
 526.130 + 
 526.131 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
 526.132 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
 526.133 +-  $(patsubst %,$(objpfx)%.oS,\
 526.134 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
 526.135 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
 526.136 ++  $(patsubst %,$(objpfx)%.oST,\
 526.137 + 	     $(filter $($(lib)-static-only-routines),\
 526.138 + 		      $(all-$(lib)-routines)))
 526.139 + 	$(build-extra-lib)
 526.140 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
 526.141 +--- glibc-2.3.5/nptl/Makefile	2005-02-16 09:45:56.000000000 +0100
 526.142 ++++ glibc-2.3.5-cygwin/nptl/Makefile	2005-05-11 08:26:01.812500000 +0200
 526.143 +@@ -360,7 +360,7 @@
 526.144 + 
 526.145 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
 526.146 + 			      $(objpfx)libpthread.so$(libpthread.so-version) \
 526.147 +-			      $(inst_libdir)/$(patsubst %,$(libtype.oS),\
 526.148 ++			      $(inst_libdir)/$(patsubst %,$(libtype.oST),\
 526.149 + 							$(libprefix)pthread) \
 526.150 + 			      $(+force)
 526.151 + 	(echo '/* GNU ld script';\
 526.152 +@@ -368,7 +368,7 @@
 526.153 + 	 echo '   the static library, so try that secondarily.  */';\
 526.154 + 	 cat $<; \
 526.155 + 	 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
 526.156 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
 526.157 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
 526.158 + 	      ')' \
 526.159 + 	) > $@.new
 526.160 + 	mv -f $@.new $@
 526.161 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
 526.162 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile	2004-08-16 08:46:14.000000000 +0200
 526.163 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile	2005-05-11 08:26:25.937500000 +0200
 526.164 +@@ -10,4 +10,4 @@
 526.165 + ASFLAGS-.op += -Wa,-Av9a
 526.166 + ASFLAGS-.og += -Wa,-Av9a
 526.167 + ASFLAGS-.ob += -Wa,-Av9a
 526.168 +-ASFLAGS-.oS += -Wa,-Av9a
 526.169 ++ASFLAGS-.oST += -Wa,-Av9a
   527.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   527.2 +++ b/patches/glibc/2.3.4/glibc-2.3.4-memcmp.patch	Sat Feb 24 11:00:05 2007 +0000
   527.3 @@ -0,0 +1,46 @@
   527.4 +Fixes
   527.5 +    ../sysdeps/i386/i686/memcmp.S: Assembler messages:
   527.6 +    ../sysdeps/i386/i686/memcmp.S:390: Error: can't resolve  `.rodata' {.rodata section} - `memcmp' {.text section}
   527.7 +when building on macosx.
   527.8 +
   527.9 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/i686/memcmp.S?cvsroot=glibc
  527.10 +Revision 1.4, Thu Apr 28 18:19:25 2005 UTC by drepper
  527.11 +Branch: MAIN
  527.12 +CVS Tags: fedora-glibc-20050503T0852
  527.13 +Changes since 1.3: +2 -2 lines
  527.14 +Diff to previous 1.3 (colored)
  527.15 +
  527.16 +Move misplaced END.
  527.17 +
  527.18 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/i686/memcmp.S.diff?r1=1.3&r2=1.4&cvsroot=glibc
  527.19 +
  527.20 +===================================================================
  527.21 +RCS file: /cvs/glibc/libc/sysdeps/i386/i686/memcmp.S,v
  527.22 +retrieving revision 1.3
  527.23 +retrieving revision 1.4
  527.24 +diff -u -r1.3 -r1.4
  527.25 +--- libc/sysdeps/i386/i686/memcmp.S	2004/04/01 23:28:37	1.3
  527.26 ++++ libc/sysdeps/i386/i686/memcmp.S	2005/04/28 18:19:25	1.4
  527.27 +@@ -1,5 +1,5 @@
  527.28 + /* Compare two memory blocks for differences in the first COUNT bytes.
  527.29 +-   Copyright (C) 2004 Free Software Foundation, Inc.
  527.30 ++   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  527.31 +    This file is part of the GNU C Library.
  527.32 + 
  527.33 +    The GNU C Library is free software; you can redistribute it and/or
  527.34 +@@ -350,6 +350,7 @@
  527.35 + 	sbbl	$-1, %eax
  527.36 + 	popl	%esi
  527.37 + 	RETURN
  527.38 ++END (BP_SYM (memcmp))
  527.39 + 
  527.40 + 	.section	.rodata
  527.41 + 	ALIGN (2)
  527.42 +@@ -387,7 +388,6 @@
  527.43 + 	.long	L(30bytes) - . + 0x78
  527.44 + 	.long	L(31bytes) - . + 0x7c
  527.45 + 
  527.46 +-END (BP_SYM (memcmp))
  527.47 + 
  527.48 + #undef bcmp
  527.49 + weak_alias (BP_SYM (memcmp), BP_SYM (bcmp))
   528.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   528.2 +++ b/patches/glibc/2.3.4/glibc-2.3.5-allow-gcc4-string.patch	Sat Feb 24 11:00:05 2007 +0000
   528.3 @@ -0,0 +1,83 @@
   528.4 +
   528.5 +Fixes? the following error when building with gcc-4.0.0:
   528.6 +
   528.7 +../string/strcoll.c:39: error: '__EI_strcoll' aliased to undefined symbol '__GI_strcoll'
   528.8 +make[2]: *** [/home/dank/crosstool-0.32/build/i686-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcscoll.os] Error 1
   528.9 +make[2]: Leaving directory `/home/dank/crosstool-0.32/build/i686-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/glibc-2.3.4/wcsmbs'
  528.10 +
  528.11 +
  528.12 +Thu Mar 17 21:06:24 2005 UTC (3 weeks, 5 days ago) by roland
  528.13 +Branch: MAIN
  528.14 +CVS Tags: fedora-glibc-20050405T2114, fedora-glibc-20050401T1444, fedora-glibc-20050324T0715, fedora-glibc-20050319T1907, HEAD
  528.15 +
  528.16 +2005-03-16  Richard Henderson  <rth@redhat.com>
  528.17 +
  528.18 +	* include/wchar.h (__wcscoll): Remove.
  528.19 +	* wcsmbs/wcscoll.c: Define wcscoll directly instead of via __wcscoll.
  528.20 +	* string/strcoll.c: Don't issue libc_hidden_def STRCOLL redefined.
  528.21 +
  528.22 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/string/strcoll.c.diff?r1=1.33&r2=1.34&cvsroot=glibc
  528.23 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/include/wchar.h.diff?r1=1.26&r2=1.27&cvsroot=glibc
  528.24 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/wcsmbs/wcscoll.c.diff?r1=1.13&r2=1.14&cvsroot=glibc
  528.25 +
  528.26 +===================================================================
  528.27 +RCS file: /cvs/glibc/libc/string/strcoll.c,v
  528.28 +retrieving revision 1.33
  528.29 +retrieving revision 1.34
  528.30 +diff -u -r1.33 -r1.34
  528.31 +--- libc/string/strcoll.c	2004/03/14 20:51:30	1.33
  528.32 ++++ libc/string/strcoll.c	2005/03/17 21:06:24	1.34
  528.33 +@@ -23,6 +23,7 @@
  528.34 + # define STRING_TYPE char
  528.35 + # define STRCOLL strcoll
  528.36 + # define STRCOLL_L __strcoll_l
  528.37 ++# define USE_HIDDEN_DEF
  528.38 + #endif
  528.39 + 
  528.40 + #include "../locale/localeinfo.h"
  528.41 +@@ -35,6 +36,7 @@
  528.42 + {
  528.43 +   return STRCOLL_L (s1, s2, _NL_CURRENT_LOCALE);
  528.44 + }
  528.45 +-#if !defined WIDE_CHAR_VERSION
  528.46 +-libc_hidden_def (strcoll)
  528.47 ++
  528.48 ++#ifdef USE_HIDDEN_DEF
  528.49 ++libc_hidden_def (STRCOLL)
  528.50 + #endif
  528.51 +===================================================================
  528.52 +RCS file: /cvs/glibc/libc/include/wchar.h,v
  528.53 +retrieving revision 1.26
  528.54 +retrieving revision 1.27
  528.55 +diff -u -r1.26 -r1.27
  528.56 +--- libc/include/wchar.h	2004/03/14 20:45:10	1.26
  528.57 ++++ libc/include/wchar.h	2005/03/17 21:06:24	1.27
  528.58 +@@ -56,7 +56,6 @@
  528.59 + extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
  528.60 + 			  size_t __n)
  528.61 +      __attribute_pure__;
  528.62 +-extern int __wcscoll (__const wchar_t *__s1, __const wchar_t *__s2);
  528.63 + extern size_t __wcslen (__const wchar_t *__s) __attribute_pure__;
  528.64 + extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen)
  528.65 +      __attribute_pure__;
  528.66 +===================================================================
  528.67 +RCS file: /cvs/glibc/libc/wcsmbs/wcscoll.c,v
  528.68 +retrieving revision 1.13
  528.69 +retrieving revision 1.14
  528.70 +diff -u -r1.13 -r1.14
  528.71 +--- libc/wcsmbs/wcscoll.c	2004/03/14 21:05:48	1.13
  528.72 ++++ libc/wcsmbs/wcscoll.c	2005/03/17 21:06:24	1.14
  528.73 +@@ -22,12 +22,11 @@
  528.74 + 
  528.75 + #define STRING_TYPE wchar_t
  528.76 + #define USTRING_TYPE wint_t
  528.77 +-#define STRCOLL __wcscoll
  528.78 ++#define STRCOLL wcscoll
  528.79 + #define STRCOLL_L __wcscoll_l
  528.80 + 
  528.81 + #include "../string/strcoll.c"
  528.82 + 
  528.83 + #ifndef USE_IN_EXTENDED_LOCALE_MODEL
  528.84 +-weak_alias (__wcscoll, wcscoll)
  528.85 + libc_hidden_weak (wcscoll)
  528.86 + #endif
   529.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   529.2 +++ b/patches/glibc/2.3.4/glibc-2.3.5-allow-gcc4-symbols.patch	Sat Feb 24 11:00:05 2007 +0000
   529.3 @@ -0,0 +1,126 @@
   529.4 +If I'm really lucky, this fixes the following error building with gcc-4.0.0:
   529.5 +
   529.6 +../sysdeps/ieee754/dbl-64/s_isinf.c:29: error: 'isinf' aliased to undefined symbol '__isinf'
   529.7 +make[2]: *** [/home/dank/queue/jobdir.fast/crosstool-0.32/build/i686-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/math/s_isinf.os] Error 1
   529.8 +make[1]: *** [math/subdir_lib] Error 2
   529.9 +make: *** [lib] Error 2
  529.10 +
  529.11 +---
  529.12 +
  529.13 +
  529.14 +Revision 1.71, Thu Mar 17 21:06:27 2005 UTC (3 weeks, 5 days ago) by roland
  529.15 +Branch: MAIN
  529.16 +CVS Tags: fedora-glibc-20050405T2114, fedora-glibc-20050401T1444, fedora-glibc-20050324T0715, fedora-glibc-20050319T1907, HEAD
  529.17 +Changes since 1.70: +11 -66 lines
  529.18 +Diff to previous 1.70 (colored)
  529.19 +
  529.20 +2005-03-16  Richard Henderson  <rth@redhat.com>
  529.21 +
  529.22 +	* include/libc-symbols.h (__hidden_proto): Remove bogus declaration
  529.23 +	of internal.
  529.24 +	(__hidden_def1, __hidden_dot_def1): Remove.
  529.25 +	(__hidden_def2, __hidden_def3): Remove.
  529.26 +	(__hidden_ver1): New.
  529.27 +	(hidden_ver, hidden_def, hidden_weak): Use it.
  529.28 +	(hidden_data_ver, hidden_data_ver, hidden_data_weak): Use non-data
  529.29 +	version of the macro.
  529.30 +
  529.31 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/include/libc-symbols.h.diff?r1=1.70&r2=1.71&cvsroot=glibc
  529.32 +
  529.33 +===================================================================
  529.34 +RCS file: /cvs/glibc/libc/include/libc-symbols.h,v
  529.35 +retrieving revision 1.70
  529.36 +retrieving revision 1.71
  529.37 +diff -u -r1.70 -r1.71
  529.38 +--- libc/include/libc-symbols.h	2005/02/11 00:29:46	1.70
  529.39 ++++ libc/include/libc-symbols.h	2005/03/17 21:06:27	1.71
  529.40 +@@ -583,78 +583,23 @@
  529.41 + #  define hidden_proto(name, attrs...) \
  529.42 +   __hidden_proto (name, __GI_##name, ##attrs)
  529.43 + #  define __hidden_proto(name, internal, attrs...) \
  529.44 +-  extern __typeof (name) internal; \
  529.45 +   extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
  529.46 +   __hidden_proto_hiddenattr (attrs);
  529.47 + #  define __hidden_asmname(name) \
  529.48 +   __hidden_asmname1 (__USER_LABEL_PREFIX__, name)
  529.49 + #  define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
  529.50 + #  define __hidden_asmname2(prefix, name) #prefix name
  529.51 +-#  ifdef HAVE_ASM_SET_DIRECTIVE
  529.52 +-#   define __hidden_def1(original, alias)			\
  529.53 +-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
  529.54 +-  .set C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
  529.55 +-#   ifdef HAVE_ASM_GLOBAL_DOT_NAME
  529.56 +-#     define __hidden_dot_def1(original, alias)	 ASM_LINE_SEP	\
  529.57 +-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP	\
  529.58 +-  .set C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
  529.59 +-#   else
  529.60 +-#     define __hidden_dot_def1(original, alias)
  529.61 +-#   endif
  529.62 +-#  else
  529.63 +-#   define __hidden_def1(original, alias)			\
  529.64 +-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
  529.65 +-  C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
  529.66 +-#   ifdef HAVE_ASM_GLOBAL_DOT_NAME
  529.67 +-#    define __hidden_dot_def1(original, alias)	ASM_LINE_SEP	\
  529.68 +-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP	\
  529.69 +-  C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
  529.70 +-#   else
  529.71 +-#    define __hidden_dot_def1(original, alias)
  529.72 +-#   endif
  529.73 +-#  endif
  529.74 +-#  define __hidden_def2(...) #__VA_ARGS__
  529.75 +-#  define __hidden_def3(...) __hidden_def2 (__VA_ARGS__)
  529.76 +-#  define hidden_def(name)					\
  529.77 +-  __asm__ (__hidden_def3 (__hidden_def1 (__GI_##name, name) \
  529.78 +-  __hidden_dot_def1 (__GI_##name, name)));
  529.79 +-#  define hidden_data_def(name)					\
  529.80 +-  __asm__ (__hidden_def3 (__hidden_def1 (__GI_##name, name)));
  529.81 +-#  define hidden_ver(local, name)				\
  529.82 +-  __asm__ (__hidden_def3 (__hidden_def1 (local, __GI_##name) \
  529.83 +-  __hidden_dot_def1 (local, __GI_##name)));
  529.84 +-#  define hidden_data_ver(local, name)				\
  529.85 +-  __asm__ (__hidden_def3 (__hidden_def1 (local, __GI_##name)));
  529.86 +-#  ifdef HAVE_WEAK_SYMBOLS
  529.87 +-#   ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
  529.88 +-#    define __hidden_weak1(original, alias)			\
  529.89 +-  .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
  529.90 +-#    ifdef HAVE_ASM_GLOBAL_DOT_NAME
  529.91 +-#     define __hidden_dot_weak1(original, alias)	ASM_LINE_SEP	\
  529.92 +-  .weakext C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
  529.93 +-#    else
  529.94 +-#     define __hidden_dot_weak1(original, alias)
  529.95 +-#    endif
  529.96 +-#   else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
  529.97 +-#    define __hidden_weak1(original, alias)			\
  529.98 +-  .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP			\
  529.99 +-  C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
 529.100 +-#    ifdef HAVE_ASM_GLOBAL_DOT_NAME
 529.101 +-#     define __hidden_dot_weak1(original, alias)	ASM_LINE_SEP	\
 529.102 +-  .weak C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP	\
 529.103 +-  C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
 529.104 +-#    else
 529.105 +-#     define __hidden_dot_weak1(original, alias)
 529.106 +-#    endif
 529.107 +-#   endif
 529.108 +-#   define hidden_weak(name)					\
 529.109 +-  __asm__ (__hidden_def3 (__hidden_weak1 (__GI_##name, name) \
 529.110 +-  __hidden_dot_weak1 (__GI_##name, name)));
 529.111 +-#   define hidden_data_weak(name)					\
 529.112 +-  __asm__ (__hidden_def3 (__hidden_weak1 (__GI_##name, name)));
 529.113 +-#  else
 529.114 +-#   define hidden_weak(name) hidden_def (name)
 529.115 +-#  endif
 529.116 ++#  define __hidden_ver1(local, internal, name) \
 529.117 ++  extern __typeof (name) __EI_##name __asm__(__hidden_asmname (#internal)); \
 529.118 ++  extern __typeof (name) __EI_##name \
 529.119 ++	__attribute__((alias (__hidden_asmname (#local))))
 529.120 ++#  define hidden_ver(local, name)	__hidden_ver1(local, __GI_##name, name);
 529.121 ++#  define hidden_data_ver(local, name)	hidden_ver(local, name)
 529.122 ++#  define hidden_def(name)		__hidden_ver1(__GI_##name, name, name);
 529.123 ++#  define hidden_data_def(name)		hidden_def(name)
 529.124 ++#  define hidden_weak(name) \
 529.125 ++	__hidden_ver1(__GI_##name, name, name) __attribute__((weak));
 529.126 ++#  define hidden_data_weak(name)	hidden_weak(name)
 529.127 + # else
 529.128 + /* For assembly, we need to do the opposite of what we do in C:
 529.129 +    in assembly gcc __REDIRECT stuff is not in place, so functions
   530.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   530.2 +++ b/patches/glibc/2.3.4/glibc-2.3.5-allow-gcc4-wcstol_l.patch	Sat Feb 24 11:00:05 2007 +0000
   530.3 @@ -0,0 +1,57 @@
   530.4 +Fixes
   530.5 +../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
   530.6 +../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
   530.7 +../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
   530.8 +make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
   530.9 +
  530.10 +https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
  530.11 +%changelog
  530.12 ++* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
  530.13 ++- fix build on 64-bit arches with new GCC
  530.14 +
  530.15 +Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
  530.16 +Branch: fedora-branch
  530.17 +CVS Tags: fedora-glibc-2_3_4-18
  530.18 +Changes since 1.4: +2 -0 lines
  530.19 +Diff to previous 1.4 (colored)
  530.20 +
  530.21 +	* sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
  530.22 +	* sysdeps/wordsize-64/wcstol_l.c: Likewise.
  530.23 +
  530.24 +
  530.25 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
  530.26 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
  530.27 +
  530.28 +===================================================================
  530.29 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
  530.30 +retrieving revision 1.4
  530.31 +retrieving revision 1.4.2.1
  530.32 +diff -u -r1.4 -r1.4.2.1
  530.33 +--- libc/sysdeps/wordsize-64/strtol_l.c	2003/03/03 09:45:12	1.4
  530.34 ++++ libc/sysdeps/wordsize-64/strtol_l.c	2005/03/25 11:59:01	1.4.2.1
  530.35 +@@ -8,7 +8,9 @@
  530.36 + #undef ____strtoll_l_internal
  530.37 + #undef __strtoll_l
  530.38 + #undef strtoll_l
  530.39 ++#if !UNSIGNED
  530.40 + strong_alias (____strtol_l_internal, ____strtoll_l_internal)
  530.41 + libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
  530.42 + weak_alias (__strtol_l, __strtoll_l)
  530.43 + weak_alias (__strtol_l, strtoll_l)
  530.44 ++#endif
  530.45 +===================================================================
  530.46 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
  530.47 +retrieving revision 1.4
  530.48 +retrieving revision 1.4.2.1
  530.49 +diff -u -r1.4 -r1.4.2.1
  530.50 +--- libc/sysdeps/wordsize-64/wcstol_l.c	2002/08/08 11:44:51	1.4
  530.51 ++++ libc/sysdeps/wordsize-64/wcstol_l.c	2005/03/25 11:59:01	1.4.2.1
  530.52 +@@ -8,6 +8,8 @@
  530.53 + #undef ____wcstoll_l_internal
  530.54 + #undef __wcstoll_l
  530.55 + #undef wcstoll_l
  530.56 ++#if !UNSIGNED
  530.57 + strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
  530.58 + weak_alias (__wcstol_l, __wcstoll_l)
  530.59 + weak_alias (__wcstol_l, wcstoll_l)
  530.60 ++#endif
   531.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   531.2 +++ b/patches/glibc/2.3.4/glibc-configure-apple-as.patch	Sat Feb 24 11:00:05 2007 +0000
   531.3 @@ -0,0 +1,23 @@
   531.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
   531.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
   531.6 +
   531.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
   531.8 +where the assembler but doesn't understand the --version flag.
   531.9 +
  531.10 +Fixes the symptom
  531.11 +checking whether ld is GNU ld... no
  531.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
  531.13 +checking version of /usr/libexec/gcc/darwin/ppc/as... 
  531.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
  531.15 +
  531.16 +--- glibc-2.3.2/configure~	Wed Feb 26 09:20:48 2003
  531.17 ++++ glibc-2.3.2/configure	Fri Feb 27 13:12:53 2004
  531.18 +@@ -3789,7 +3789,7 @@
  531.19 +   # Found it, now check the version.
  531.20 +   echo "$as_me:$LINENO: checking version of $AS" >&5
  531.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
  531.22 +-  ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
  531.23 ++  ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
  531.24 +   case $ac_prog_version in
  531.25 +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
  531.26 +     2.1[3-9]*)
   532.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   532.2 +++ b/patches/glibc/2.3.4/glibc-fp-byteorder.patch	Sat Feb 24 11:00:05 2007 +0000
   532.3 @@ -0,0 +1,203 @@
   532.4 +Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
   532.5 +Author: addsub@eyou.com
   532.6 +Target: ARM
   532.7 +
   532.8 +Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
   532.9 +and makes printf("%f", 1.0) work.
  532.10 +
  532.11 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
  532.12 + It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
  532.13 + is broken' on my big-endian hardfloat FPA ARM platform. ...
  532.14 + It's definitely needed for hardfloat.  So I'd think it's needed for
  532.15 + big-endian systems in any case, and for VFP on little-endian systems
  532.16 + too.  Someone would have to verify that though.
  532.17 +
  532.18 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
  532.19 + I just had a look at glibc-20040830, and [this patch] is still needed and useful
  532.20 + for this version.  glibc-20040830 out-of-the-box still contains the
  532.21 + following wrong assumptions:
  532.22 + - sysdeps/arm/bits/endian.h: float word order is big endian (which it is
  532.23 +   not on vfp systems)
  532.24 + - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
  532.25 +   are not on big endian systems, neither on vfp systems)
  532.26 + - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
  532.27 +   (which they are not on big endian systems)
  532.28 + [This patch] seems the right solution for all of these issues.
  532.29 +
  532.30 +Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
  532.31 + It's even needed for glibc CVS, AFAICS.
  532.32 + The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
  532.33 + (currently at version 1.4) is only needed for proper VFP operation.
  532.34 + But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
  532.35 + that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
  532.36 + for proper operation of *any* FP model on big endian ARM.
  532.37 +
  532.38 +See also discussion in followups to
  532.39 +http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
  532.40 +
  532.41 +Message-ID: <276985760.37584@eyou.com>
  532.42 +Received: from unknown (HELO eyou.com) (172.16.2.2)
  532.43 + by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
  532.44 +Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
  532.45 +Date: 17 Feb 2004 10:42:38 +0800
  532.46 +Message-ID: <20040217104238.8237.qmail@eyou.com>
  532.47 +From: "add" <addsub@eyou.com>
  532.48 +To: dank@kegel.com
  532.49 +Reply-To: "add" <addsub@eyou.com>
  532.50 +Subject: Re:&nbsp;&nbsp;&nbsp;problem&nbsp;while&nbsp;building&nbsp;arm&nbsp;vfp&nbsp;softfloat&nbsp;gcc&nbsp;`
  532.51 +
  532.52 +Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
  532.53 +toolchain can printf("%f\n",1.0). So you may have a try of this
  532.54 +
  532.55 +
  532.56 +diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
  532.57 +--- glibc.old/sysdeps/arm/bits/endian.h	1999-04-12 11:59:13.000000000 -0400
  532.58 ++++ glibc.new/sysdeps/arm/bits/endian.h	2004-02-12 09:15:13.000000000 -0500
  532.59 +@@ -9,4 +9,9 @@
  532.60 + #else
  532.61 + #define __BYTE_ORDER __LITTLE_ENDIAN
  532.62 + #endif
  532.63 ++
  532.64 ++#ifdef __VFP_FP__
  532.65 ++#define __FLOAT_WORD_ORDER __BYTE_ORDER
  532.66 ++#else
  532.67 + #define __FLOAT_WORD_ORDER __BIG_ENDIAN
  532.68 ++#endif
  532.69 +diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
  532.70 +--- glibc.old/sysdeps/arm/gmp-mparam.h	2001-07-07 15:21:19.000000000 -0400
  532.71 ++++ glibc.new/sysdeps/arm/gmp-mparam.h	2004-02-12 09:15:13.000000000 -0500
  532.72 +@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
  532.73 + #define BITS_PER_SHORTINT 16
  532.74 + #define BITS_PER_CHAR 8
  532.75 + 
  532.76 +-#define IEEE_DOUBLE_BIG_ENDIAN 0
  532.77 +-#define IEEE_DOUBLE_MIXED_ENDIAN 1
  532.78 ++#if defined(__ARMEB__)
  532.79 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
  532.80 ++# define IEEE_DOUBLE_BIG_ENDIAN 1
  532.81 ++#elif defined(__VFP_FP__)
  532.82 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
  532.83 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
  532.84 ++#else
  532.85 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
  532.86 ++# define IEEE_DOUBLE_MIXED_ENDIAN 1
  532.87 ++#endif
  532.88 +diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
  532.89 +--- glibc.old/sysdeps/arm/ieee754.h	2001-07-07 15:21:19.000000000 -0400
  532.90 ++++ glibc.new/sysdeps/arm/ieee754.h	1969-12-31 19:00:00.000000000 -0500
  532.91 +@@ -1,115 +0,0 @@
  532.92 +-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
  532.93 +-   This file is part of the GNU C Library.
  532.94 +-
  532.95 +-   The GNU C Library is free software; you can redistribute it and/or
  532.96 +-   modify it under the terms of the GNU Lesser General Public
  532.97 +-   License as published by the Free Software Foundation; either
  532.98 +-   version 2.1 of the License, or (at your option) any later version.
  532.99 +-
 532.100 +-   The GNU C Library is distributed in the hope that it will be useful,
 532.101 +-   but WITHOUT ANY WARRANTY; without even the implied warranty of
 532.102 +-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 532.103 +-   Lesser General Public License for more details.
 532.104 +-
 532.105 +-   You should have received a copy of the GNU Lesser General Public
 532.106 +-   License along with the GNU C Library; if not, write to the Free
 532.107 +-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 532.108 +-   02111-1307 USA.  */
 532.109 +-
 532.110 +-#ifndef _IEEE754_H
 532.111 +-
 532.112 +-#define _IEEE754_H 1
 532.113 +-#include <features.h>
 532.114 +-
 532.115 +-#include <endian.h>
 532.116 +-
 532.117 +-__BEGIN_DECLS
 532.118 +-
 532.119 +-union ieee754_float
 532.120 +-  {
 532.121 +-    float f;
 532.122 +-
 532.123 +-    /* This is the IEEE 754 single-precision format.  */
 532.124 +-    struct
 532.125 +-      {
 532.126 +-	unsigned int mantissa:23;
 532.127 +-	unsigned int exponent:8;
 532.128 +-	unsigned int negative:1;
 532.129 +-      } ieee;
 532.130 +-
 532.131 +-    /* This format makes it easier to see if a NaN is a signalling NaN.  */
 532.132 +-    struct
 532.133 +-      {
 532.134 +-	unsigned int mantissa:22;
 532.135 +-	unsigned int quiet_nan:1;
 532.136 +-	unsigned int exponent:8;
 532.137 +-	unsigned int negative:1;
 532.138 +-      } ieee_nan;
 532.139 +-  };
 532.140 +-
 532.141 +-#define IEEE754_FLOAT_BIAS	0x7f /* Added to exponent.  */
 532.142 +-
 532.143 +-
 532.144 +-union ieee754_double
 532.145 +-  {
 532.146 +-    double d;
 532.147 +-
 532.148 +-    /* This is the IEEE 754 double-precision format.  */
 532.149 +-    struct
 532.150 +-      {
 532.151 +-	unsigned int mantissa0:20;
 532.152 +-	unsigned int exponent:11;
 532.153 +-	unsigned int negative:1;
 532.154 +-	unsigned int mantissa1:32;
 532.155 +-      } ieee;
 532.156 +-
 532.157 +-    /* This format makes it easier to see if a NaN is a signalling NaN.  */
 532.158 +-    struct
 532.159 +-      {
 532.160 +-	unsigned int mantissa0:19;
 532.161 +-	unsigned int quiet_nan:1;
 532.162 +-	unsigned int exponent:11;
 532.163 +-	unsigned int negative:1;
 532.164 +-	unsigned int mantissa1:32;
 532.165 +-      } ieee_nan;
 532.166 +-  };
 532.167 +-
 532.168 +-#define IEEE754_DOUBLE_BIAS	0x3ff /* Added to exponent.  */
 532.169 +-
 532.170 +-
 532.171 +-/* The following two structures are correct for `new' floating point systems but
 532.172 +-   wrong for the old FPPC.  The only solution seems to be to avoid their use on
 532.173 +-   old hardware.  */
 532.174 +-
 532.175 +-union ieee854_long_double
 532.176 +-  {
 532.177 +-    long double d;
 532.178 +-
 532.179 +-    /* This is the IEEE 854 double-extended-precision format.  */
 532.180 +-    struct
 532.181 +-      {
 532.182 +-	unsigned int exponent:15;
 532.183 +-	unsigned int empty:16;
 532.184 +-	unsigned int negative:1;
 532.185 +-	unsigned int mantissa1:32;
 532.186 +-	unsigned int mantissa0:32;
 532.187 +-      } ieee;
 532.188 +-
 532.189 +-    /* This is for NaNs in the IEEE 854 double-extended-precision format.  */
 532.190 +-    struct
 532.191 +-      {
 532.192 +-	unsigned int exponent:15;
 532.193 +-	unsigned int empty:16;
 532.194 +-	unsigned int negative:1;
 532.195 +-	unsigned int mantissa1:32;
 532.196 +-	unsigned int mantissa0:30;
 532.197 +-	unsigned int quiet_nan:1;
 532.198 +-	unsigned int one:1;
 532.199 +-      } ieee_nan;
 532.200 +-  };
 532.201 +-
 532.202 +-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
 532.203 +-
 532.204 +-__END_DECLS
 532.205 +-
 532.206 +-#endif /* ieee754.h */
   533.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   533.2 +++ b/patches/glibc/2.3.4/make-install-lib-all.patch	Sat Feb 24 11:00:05 2007 +0000
   533.3 @@ -0,0 +1,24 @@
   533.4 +From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
   533.5 +Rule to install all needed libraries, not just the ones installed by install-lib,
   533.6 +yet not install programs.  
   533.7 +Needed because we can't use the main install target, as we can't build programs before
   533.8 +we have the final gcc installed; linking fails because libeh.a is not present,
   533.9 +and glibc insists on linking programs with that library.
  533.10 +
  533.11 +diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
  533.12 +--- glibc-2.3.4.orig/Makerules	2004-12-15 20:52:39.000000000 +0200
  533.13 ++++ glibc-2.3.4/Makerules	2005-02-19 15:16:31.415125176 +0200
  533.14 +@@ -844,6 +844,13 @@
  533.15 + installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
  533.16 + 			     $(inst_libdir)/$(patsubst %,$(libtype$o),\
  533.17 + 						     $(libprefix)$(libc-name)))
  533.18 ++
  533.19 ++install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
  533.20 ++		$(inst_slibdir)/libc-$(version).so \
  533.21 ++		$(inst_libdir)/libc.so \
  533.22 ++		$(inst_libdir)/libc.a \
  533.23 ++		install-lib
  533.24 ++
  533.25 + install: $(installed-libcs)
  533.26 + $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
  533.27 + 	$(make-target-directory)
   534.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   534.2 +++ b/patches/glibc/2.3.4/pr758.patch	Sat Feb 24 11:00:05 2007 +0000
   534.3 @@ -0,0 +1,256 @@
   534.4 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=758
   534.5 +
   534.6 +Submitted By: Jim Gifford (patches at jg555 dot com)
   534.7 +Date: 2005-02-23
   534.8 +Initial Package Version: 2.3.4
   534.9 +Origin: Richard Sandiford
  534.10 +Upstream Status: Unknown
  534.11 +Description: Fixes Syscall.h generation
  534.12 + 
  534.13 +diff -Naur glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/Makefile glibc-2.3.4/sysdeps/unix/sysv/linux/mips/Makefile
  534.14 +--- glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/Makefile	2004-11-24 04:38:15 +0000
  534.15 ++++ glibc-2.3.4/sysdeps/unix/sysv/linux/mips/Makefile	2005-02-23 18:21:54 +0000
  534.16 +@@ -9,11 +9,73 @@
  534.17 + 
  534.18 + no_syscall_list_h = 1
  534.19 + 
  534.20 +-# Generate the list of SYS_* macros for the system calls (__NR_* macros).
  534.21 +-# We generate not only SYS_<syscall>, pointing at SYS_<abi>_<syscall> if
  534.22 +-# it exists, but also define SYS_<abi>_<syscall> for all ABIs.
  534.23 ++# A callable macro that expands to a shell command.  Preprocess file $(1)
  534.24 ++# using ABI option $(2) and see which macros it defines.  Print FOO for each
  534.25 ++# macro of the form __NR$(3)_FOO, filtering out ABI-specific __NR macros
  534.26 ++# that have a prefix other than $(3).
  534.27 ++mips_list_syscalls =	$(filter-out -m%,$(CC)) -E -x c $(+includes) \
  534.28 ++			    $(sysincludes) -D_LIBC -dM -mabi=$(2) $(1) | \
  534.29 ++			sed -n 's@^\#define __NR$(3)_\([^ ]*\) .*@\1@p' | \
  534.30 ++			sed -e '/^[ON]32_/d' -e '/^N64_/d' -e '/^64_/d' | \
  534.31 ++			LC_ALL=C sort
  534.32 ++
  534.33 ++# Generate a list of SYS_* macros from the linux __NR macros.
  534.34 ++#
  534.35 ++# Before version 2.6, linux had separate 32-bit and 64-bit MIPS ports,
  534.36 ++# each with its own set of headers.  The ports were merged for 2.6 and
  534.37 ++# this merged port defines the syscalls in a slightly different way.
  534.38 ++# There are therefore three sets of headers that we need to consider:
  534.39 ++#
  534.40 ++#    (1) Headers from the separate 32-bit MIPS port.  They just define
  534.41 ++#	 a single list of __NR macros.
  534.42 ++#
  534.43 ++#    (2) Headers from the separate 64-bit MIPS port.  They unconditionally
  534.44 ++#	 define syscalls for all three ABIs, with o32 syscalls prefixed
  534.45 ++#	 by __NR_O32, n32 syscalls prefixed by __NR_N32 and n64 syscalls
  534.46 ++#	 prefixed by plain __NR.
  534.47 ++#
  534.48 ++#    (3) Headers from the combined port.  They use the _MIPS_SIM macro to
  534.49 ++#	 define the right set of syscalls for the current ABI.  The syscalls
  534.50 ++#	 themselves have no special ABI prefix, but the headers also define:
  534.51 ++#
  534.52 ++#	    __NR_O32_Linux{,_syscalls}
  534.53 ++#	    __NR_N32_Linux{,_syscalls}
  534.54 ++#	    __NR_64_Linux{,_syscalls}
  534.55 ++#
  534.56 ++# In case (1) we just want a simple list of SYS_* macros.  In cases (2)
  534.57 ++# and (3) we want a file that will work for all three ABIs, regardless
  534.58 ++# of which ABI we are currently using.  We also want the file to work
  534.59 ++# if the user later moves from (2) to (3).  Thus the file we create
  534.60 ++# for (2) and (3) has the form:
  534.61 ++#
  534.62 ++#    #if _MIPS_SIM == _MIPS_SIM_NABI32
  534.63 ++#    # ifdef __NR_N32_open
  534.64 ++#    #  define SYS_n32syscall1 __NR_N32_n32syscall1
  534.65 ++#    #  ...
  534.66 ++#    # else
  534.67 ++#    #  define SYS_n32syscall1 __NR_n32syscall1
  534.68 ++#    #  ...
  534.69 ++#    # endif
  534.70 ++#    #elif _MIPS_SIM == _MIPS_SIM_ABI64
  534.71 ++#    # define SYS_n64syscall1 __NR_n64syscall1
  534.72 ++#    # ...
  534.73 ++#    #else
  534.74 ++#    # ifdef __NR_O32_open
  534.75 ++#    #  define SYS_o32syscall1 __NR_O32_o32syscall1
  534.76 ++#    #  ...
  534.77 ++#    # else
  534.78 ++#    #  define SYS_o32syscall1 __NR_o32syscall1
  534.79 ++#    #  ...
  534.80 ++#    # endif
  534.81 ++#    #endif
  534.82 ++#
  534.83 ++# Here, __NR_N32_open and __NR_O32_open are used to detect case (2)
  534.84 ++# over case (3).  The n64 SYS_* macros can always use the normal
  534.85 ++# ABI-less names.
  534.86 + $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h
  534.87 + 	$(make-target-directory)
  534.88 ++	$(CC) -E -x c $(+includes) $(sysincludes) -D_LIBC $< -MD -MP \
  534.89 ++	      -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' > /dev/null
  534.90 + 	{ \
  534.91 + 	 echo '/* Generated at libc build time from kernel syscall list.  */';\
  534.92 + 	 echo ''; \
  534.93 +@@ -22,28 +84,38 @@
  534.94 + 	 echo '#endif'; \
  534.95 + 	 echo ''; \
  534.96 + 	 echo '#include <sgidefs.h>'; \
  534.97 +-	 rm -f $(@:.d=.h).newt; \
  534.98 +-	 $(CC) -E -MD -MP -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' \
  534.99 +-	       -x c $(+includes) $(sysincludes) $< -D_LIBC -dM | \
 534.100 +-	 sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \
 534.101 +-	     > $(@:.d=.h).newt; \
 534.102 +-	 if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \
 534.103 ++ 	 rm -f $(@:.d=.h).new32 $(@:.d=.h).newn32 $(@:.d=.h).new64; \
 534.104 ++ 	 $(call mips_list_syscalls,$<,n32,_N32) > $(@:.d=.h).newn32; \
 534.105 ++ 	 if test -s $(@:.d=.h).newn32; then \
 534.106 ++ 	   if grep open $(@:.d=.h).newn32 > /dev/null; then \
 534.107 ++ 	     $(call mips_list_syscalls,$<,32,_O32) > $(@:.d=.h).new32; \
 534.108 ++ 	     $(call mips_list_syscalls,$<,64,) > $(@:.d=.h).new64; \
 534.109 ++ 	   else \
 534.110 ++ 	     $(call mips_list_syscalls,$<,32,) > $(@:.d=.h).new32; \
 534.111 ++ 	     $(call mips_list_syscalls,$<,n32,) > $(@:.d=.h).newn32; \
 534.112 ++ 	     $(call mips_list_syscalls,$<,64,) > $(@:.d=.h).new64; \
 534.113 ++ 	   fi; \
 534.114 + 	   echo '#if _MIPS_SIM == _ABIN32'; \
 534.115 +-	   sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt | \
 534.116 +-		LC_ALL=C sort; \
 534.117 ++ 	   echo '# ifdef __NR_N32_open'; \
 534.118 ++ 	   sed 's@\(.*\)@#  define SYS_\1 __NR_N32_\1@' < $(@:.d=.h).newn32; \
 534.119 ++ 	   echo '# else'; \
 534.120 ++ 	   sed 's@\(.*\)@#  define SYS_\1 __NR_\1@' < $(@:.d=.h).newn32; \
 534.121 ++ 	   echo '# endif'; \
 534.122 + 	   echo '#elif _MIPS_SIM == _ABI64'; \
 534.123 +-	   sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt | \
 534.124 +-		LC_ALL=C sort; \
 534.125 ++ 	   sed 's@\(.*\)@# define SYS_\1 __NR_\1@' < $(@:.d=.h).new64; \
 534.126 + 	   echo '#else'; \
 534.127 +-	   sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt | \
 534.128 +-		LC_ALL=C sort; \
 534.129 ++ 	   echo '# ifdef __NR_O32_open'; \
 534.130 ++ 	   sed 's@\(.*\)@#  define SYS_\1 __NR_O32_\1@' < $(@:.d=.h).new32; \
 534.131 ++ 	   echo '# else'; \
 534.132 ++ 	   sed 's@\(.*\)@#  define SYS_\1 __NR_\1@' < $(@:.d=.h).new32; \
 534.133 ++ 	   echo '# endif'; \
 534.134 + 	   echo '#endif'; \
 534.135 +-	   sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt | \
 534.136 +-		LC_ALL=C sort +1.8; \
 534.137 + 	 else \
 534.138 +-	   cat $(@:.d=.h).newt; \
 534.139 ++ 	   $(CC) -E -x c $(+includes) $(sysincludes) -D_LIBC -dM $< | \
 534.140 ++ 	   sed -n 's@^\#define __NR_\([^ ]*\) .*@\#define SYS_\1 __NR_\1@p' | \
 534.141 ++ 	   LC_ALL=C sort; \
 534.142 + 	 fi; \
 534.143 +-	 rm $(@:.d=.h).newt; \
 534.144 ++ 	 rm -f $(@:.d=.h).new32 $(@:.d=.h).newn32 $(@:.d=.h).new64; \
 534.145 + 	} > $(@:.d=.h).new
 534.146 + 	mv -f $(@:.d=.h).new $(@:.d=.h)
 534.147 + ifneq (,$(objpfx))
 534.148 +diff -Naur glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/configure glibc-2.3.4/sysdeps/unix/sysv/linux/mips/configure
 534.149 +--- glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/configure	2004-11-24 04:42:45 +0000
 534.150 ++++ glibc-2.3.4/sysdeps/unix/sysv/linux/mips/configure	2005-02-23 18:10:11 +0000
 534.151 +@@ -18,7 +18,7 @@
 534.152 +     { echo "$as_me:$LINENO: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&5
 534.153 + echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&2;}
 534.154 +     echo '#include <asm/unistd.h>' > asm-unistd.h
 534.155 +-  else
 534.156 ++  elif grep __NR_N32_open "$asm_unistd_h" > /dev/null; then
 534.157 +     # The point of this preprocessing is to turn __NR_<syscall> into
 534.158 +     # __NR_N64_<syscall>, as well as to define __NR_<syscall> to
 534.159 +     # __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
 534.160 +@@ -68,6 +68,8 @@
 534.161 + {
 534.162 + 	print;
 534.163 + }'
 534.164 ++  else
 534.165 ++    echo '#include <asm/unistd.h>' > asm-unistd.h
 534.166 +   fi ;;
 534.167 + mips*)
 534.168 +   rm -f asm-unistd.h
 534.169 +diff -Naur glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/configure.in glibc-2.3.4/sysdeps/unix/sysv/linux/mips/configure.in
 534.170 +--- glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/configure.in	2004-11-24 04:38:31 +0000
 534.171 ++++ glibc-2.3.4/sysdeps/unix/sysv/linux/mips/configure.in	2005-02-23 18:10:11 +0000
 534.172 +@@ -18,7 +18,7 @@
 534.173 +   if test ! -f "$asm_unistd_h"; then
 534.174 +     AC_MSG_WARN([*** asm/unistd.h not found, it will not be pre-processed])
 534.175 +     echo '#include <asm/unistd.h>' > asm-unistd.h
 534.176 +-  else
 534.177 ++  elif grep __NR_N32_open "$asm_unistd_h" > /dev/null; then
 534.178 +     # The point of this preprocessing is to turn __NR_<syscall> into
 534.179 +     # __NR_N64_<syscall>, as well as to define __NR_<syscall> to
 534.180 +     # __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
 534.181 +@@ -68,6 +68,8 @@
 534.182 + {
 534.183 + 	print;
 534.184 + }'
 534.185 ++  else
 534.186 ++    echo '#include <asm/unistd.h>' > asm-unistd.h
 534.187 +   fi ;;
 534.188 + mips*)
 534.189 +   rm -f asm-unistd.h
 534.190 +diff -Naur glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h glibc-2.3.4/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h
 534.191 +--- glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h	2003-03-29 08:15:29 +0000
 534.192 ++++ glibc-2.3.4/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h	2005-02-23 18:10:11 +0000
 534.193 +@@ -1,36 +0,0 @@
 534.194 +-/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
 534.195 +-   This file is part of the GNU C Library.
 534.196 +-
 534.197 +-   The GNU C Library is free software; you can redistribute it and/or
 534.198 +-   modify it under the terms of the GNU Lesser General Public
 534.199 +-   License as published by the Free Software Foundation; either
 534.200 +-   version 2.1 of the License, or (at your option) any later version.
 534.201 +-
 534.202 +-   The GNU C Library is distributed in the hope that it will be useful,
 534.203 +-   but WITHOUT ANY WARRANTY; without even the implied warranty of
 534.204 +-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 534.205 +-   Lesser General Public License for more details.
 534.206 +-
 534.207 +-   You should have received a copy of the GNU Lesser General Public
 534.208 +-   License along with the GNU C Library; if not, write to the Free
 534.209 +-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 534.210 +-   02111-1307 USA.  */
 534.211 +-
 534.212 +-#ifndef _LINUX_MIPS_MIPS32_KERN64_SYSDEP_H
 534.213 +-#define _LINUX_MIPS_MIPS32_KERN64_SYSDEP_H 1
 534.214 +-
 534.215 +-/* There is some commonality.  */
 534.216 +-#include <sysdeps/unix/sysv/linux/mips/mips32/sysdep.h>
 534.217 +-
 534.218 +-/* For Linux we can use the system call table in the header file
 534.219 +-	/usr/include/asm/unistd.h
 534.220 +-   of the kernel.  But these symbols do not follow the SYS_* syntax
 534.221 +-   so we have to redefine the `SYS_ify' macro here.  */
 534.222 +-#undef SYS_ify
 534.223 +-#ifdef __STDC__
 534.224 +-# define SYS_ify(syscall_name)	__NR_O32_##syscall_name
 534.225 +-#else
 534.226 +-# define SYS_ify(syscall_name)	__NR_O32_/**/syscall_name
 534.227 +-#endif
 534.228 +-
 534.229 +-#endif /* linux/mips/mips32/kern64/sysdep.h */
 534.230 +diff -Naur glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h glibc-2.3.4/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
 534.231 +--- glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h	2004-10-18 05:16:07 +0000
 534.232 ++++ glibc-2.3.4/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h	2005-02-23 18:10:11 +0000
 534.233 +@@ -28,9 +28,9 @@
 534.234 +    so we have to redefine the `SYS_ify' macro here.  */
 534.235 + #undef SYS_ify
 534.236 + #ifdef __STDC__
 534.237 +-# define SYS_ify(syscall_name)	__NR_N32_##syscall_name
 534.238 ++# define SYS_ify(syscall_name)	__NR_##syscall_name
 534.239 + #else
 534.240 +-# define SYS_ify(syscall_name)	__NR_N32_/**/syscall_name
 534.241 ++# define SYS_ify(syscall_name)	__NR_/**/syscall_name
 534.242 + #endif
 534.243 + 
 534.244 + #ifdef __ASSEMBLER__
 534.245 +diff -Naur glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h glibc-2.3.4/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
 534.246 +--- glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h	2004-10-18 05:16:08 +0000
 534.247 ++++ glibc-2.3.4/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h	2005-02-23 18:10:11 +0000
 534.248 +@@ -28,9 +28,9 @@
 534.249 +    so we have to redefine the `SYS_ify' macro here.  */
 534.250 + #undef SYS_ify
 534.251 + #ifdef __STDC__
 534.252 +-# define SYS_ify(syscall_name)	__NR_N64_##syscall_name
 534.253 ++# define SYS_ify(syscall_name)	__NR_##syscall_name
 534.254 + #else
 534.255 +-# define SYS_ify(syscall_name)	__NR_N64_/**/syscall_name
 534.256 ++# define SYS_ify(syscall_name)	__NR_/**/syscall_name
 534.257 + #endif
 534.258 + 
 534.259 + #ifdef __ASSEMBLER__
   535.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   535.2 +++ b/patches/glibc/2.3.5/arm-ctl_bus_isa.patch	Sat Feb 24 11:00:05 2007 +0000
   535.3 @@ -0,0 +1,51 @@
   535.4 +Applies to both glibc-2.2.5 and glibc-2.3.2, and probably glibc cvs as of Aug 2004.
   535.5 +Needed to build glibc with linux kernels 2.4.23 or higher on ARM, 
   535.6 +Fixes following error:
   535.7 +
   535.8 +../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
   535.9 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
  535.10 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
  535.11 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
  535.12 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
  535.13 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
  535.14 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
  535.15 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
  535.16 +make[2]: *** [/home/dank/crosstool-0.28/build/arm-softfloat-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/misc/ioperm.o] Error 1
  535.17 +
  535.18 +cf. "[SYSCTL] BUS_ISA -> CTL_BUS_ISA",  http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html
  535.19 +
  535.20 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c.old	2003-02-20 14:22:24.000000000 -0800
  535.21 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c	2004-01-31 16:01:50.000000000 -0800
  535.22 +@@ -47,6 +47,12 @@
  535.23 + #include <asm/page.h>
  535.24 + #include <sys/sysctl.h>
  535.25 + 
  535.26 ++/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
  535.27 ++#include <linux/version.h>
  535.28 ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
  535.29 ++#define CTL_BUS_ISA BUS_ISA	/* and hope it's not the one from linux/input.h */
  535.30 ++#endif
  535.31 ++
  535.32 + #define PATH_ARM_SYSTYPE	"/etc/arm_systype"
  535.33 + #define PATH_CPUINFO		"/proc/cpuinfo"
  535.34 + 
  535.35 +@@ -80,7 +86,7 @@
  535.36 +  * Initialize I/O system.  There are several ways to get the information
  535.37 +  * we need.  Each is tried in turn until one succeeds.
  535.38 +  *
  535.39 +- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*).  This is the preferred method
  535.40 ++ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*).  This is the preferred method
  535.41 +  *    but not all kernels support it.
  535.42 +  *
  535.43 +  * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
  535.44 +@@ -100,8 +106,8 @@
  535.45 + {
  535.46 +   char systype[256];
  535.47 +   int i, n;
  535.48 +-  static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
  535.49 +-  static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
  535.50 ++  static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
  535.51 ++  static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
  535.52 +   size_t len = sizeof(io.base);
  535.53 + 
  535.54 +   if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
   536.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   536.2 +++ b/patches/glibc/2.3.5/fix-pr398.patch	Sat Feb 24 11:00:05 2007 +0000
   536.3 @@ -0,0 +1,70 @@
   536.4 +Fixes error
   536.5 +
   536.6 +dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
   536.7 +make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
   536.8 +e.o] Error 1
   536.9 +make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
  536.10 +822/elf'
  536.11 +make[1]: *** [elf/subdir_lib] Error 2
  536.12 +make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
  536.13 +822'
  536.14 +make: *** [all] Error 2
  536.15 +
  536.16 +-----------------
  536.17 +
  536.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
  536.19 +http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
  536.20 +
  536.21 +-----------------
  536.22 +
  536.23 +CVSROOT:	/cvs/glibc
  536.24 +Module name:	libc
  536.25 +Branch: 	glibc-2_3-branch
  536.26 +Changes by:	roland@sources.redhat.com	2006-02-23 22:36:51
  536.27 +
  536.28 +Modified files:
  536.29 +	sysdeps/s390/s390-64: dl-machine.h 
  536.30 +	sysdeps/s390/s390-32: dl-machine.h 
  536.31 +
  536.32 +Log message:
  536.33 +	2004-07-10  GOTO Masanori  <gotom@debian.or.jp>
  536.34 +	
  536.35 +	[BZ #398]
  536.36 +	* sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
  536.37 +	directive.
  536.38 +	* sysdeps/s390/s390-64/dl-machine.h: Likewise.
  536.39 +
  536.40 +Patches:
  536.41 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
  536.42 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
  536.43 +
  536.44 +===================================================================
  536.45 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
  536.46 +retrieving revision 1.19.4.1
  536.47 +retrieving revision 1.19.4.2
  536.48 +diff -u -r1.19.4.1 -r1.19.4.2
  536.49 +--- libc/sysdeps/s390/s390-64/dl-machine.h	2005/10/17 04:57:27	1.19.4.1
  536.50 ++++ libc/sysdeps/s390/s390-64/dl-machine.h	2006/02/23 22:36:51	1.19.4.2
  536.51 +@@ -27,6 +27,7 @@
  536.52 + #include <sys/param.h>
  536.53 + #include <string.h>
  536.54 + #include <link.h>
  536.55 ++#include <sysdep.h>
  536.56 + 
  536.57 + /* This is an older, now obsolete value.  */
  536.58 + #define EM_S390_OLD	0xA390
  536.59 +===================================================================
  536.60 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
  536.61 +retrieving revision 1.20.4.1
  536.62 +retrieving revision 1.20.4.2
  536.63 +diff -u -r1.20.4.1 -r1.20.4.2
  536.64 +--- libc/sysdeps/s390/s390-32/dl-machine.h	2005/10/17 04:57:27	1.20.4.1
  536.65 ++++ libc/sysdeps/s390/s390-32/dl-machine.h	2006/02/23 22:36:51	1.20.4.2
  536.66 +@@ -27,6 +27,7 @@
  536.67 + #include <sys/param.h>
  536.68 + #include <string.h>
  536.69 + #include <link.h>
  536.70 ++#include <sysdep.h>
  536.71 + 
  536.72 + /* This is an older, now obsolete value.  */
  536.73 + #define EM_S390_OLD	0xA390
   537.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   537.2 +++ b/patches/glibc/2.3.5/glibc-2.3.4-allow-gcc-4.0-arm.patch	Sat Feb 24 11:00:05 2007 +0000
   537.3 @@ -0,0 +1,117 @@
   537.4 +Fixes
   537.5 +In file included from dynamic-link.h:22,
   537.6 +                 from dl-reloc.c:265:
   537.7 +../sysdeps/arm/dl-machine.h: In function '_dl_relocate_object':
   537.8 +../sysdeps/arm/dl-machine.h:371: error: invalid storage class for function 'fix_bad_pc24'
   537.9 +../sysdeps/arm/dl-machine.h:406: error: invalid storage class for function 'elf_machine_rel'
  537.10 +../sysdeps/arm/dl-machine.h:532: error: invalid storage class for function 'elf_machine_rela'
  537.11 +../sysdeps/arm/dl-machine.h:612: error: invalid storage class for function 'elf_machine_rel_relative'
  537.12 +../sysdeps/arm/dl-machine.h:621: error: invalid storage class for function 'elf_machine_rela_relative'
  537.13 +../sysdeps/arm/dl-machine.h:630: error: invalid storage class for function 'elf_machine_lazy_rel'
  537.14 +make[2]: Leaving directory `/home/dank/queue/jobdir.k8/crosstool-dev/build/arm-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.3/glibc-2.3.3/elf'
  537.15 +
  537.16 +when building glibc-2.3.[34] with gcc-4.0
  537.17 +
  537.18 +Like
  537.19 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/arm/dl-machine.h.diff?r1=1.51&r2=1.52&cvsroot=glibc
  537.20 +but works with older compilers, and fixes fix_bad_pc24.
  537.21 +
  537.22 +
  537.23 +--- glibc-2.3.4/sysdeps/arm/dl-machine.h.old	Sun Mar 20 17:54:37 2005
  537.24 ++++ glibc-2.3.4/sysdeps/arm/dl-machine.h	Sun Mar 20 17:57:32 2005
  537.25 +@@ -359,7 +359,14 @@
  537.26 + # endif
  537.27 + 
  537.28 + /* Deal with an out-of-range PC24 reloc.  */
  537.29 +-static Elf32_Addr
  537.30 ++#if __GNUC__ >= 4
  537.31 ++  auto inline Elf32_Addr
  537.32 ++#else
  537.33 ++  static inline Elf32_Addr
  537.34 ++#endif
  537.35 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  537.36 ++  __attribute ((always_inline))
  537.37 ++#endif
  537.38 + fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
  537.39 + {
  537.40 +   static void *fix_page;
  537.41 +@@ -392,7 +399,14 @@
  537.42 + /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
  537.43 +    MAP is the object containing the reloc.  */
  537.44 + 
  537.45 +-static inline void
  537.46 ++#if __GNUC__ >= 4
  537.47 ++  auto inline void
  537.48 ++#else
  537.49 ++  static inline void
  537.50 ++#endif
  537.51 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  537.52 ++  __attribute ((always_inline))
  537.53 ++#endif
  537.54 + elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
  537.55 + 		 const Elf32_Sym *sym, const struct r_found_version *version,
  537.56 + 		 void *const reloc_addr_arg)
  537.57 +@@ -517,7 +531,14 @@
  537.58 + }
  537.59 + 
  537.60 + # ifndef RTLD_BOOTSTRAP
  537.61 +-static inline void
  537.62 ++#if __GNUC__ >= 4
  537.63 ++  auto inline void
  537.64 ++#else
  537.65 ++  static inline void
  537.66 ++#endif
  537.67 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  537.68 ++  __attribute ((always_inline))
  537.69 ++#endif
  537.70 + elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
  537.71 + 		  const Elf32_Sym *sym, const struct r_found_version *version,
  537.72 + 		  void *const reloc_addr_arg)
  537.73 +@@ -597,7 +618,14 @@
  537.74 + }
  537.75 + # endif
  537.76 + 
  537.77 +-static inline void
  537.78 ++#if __GNUC__ >= 4
  537.79 ++  auto inline void
  537.80 ++#else
  537.81 ++  static inline void
  537.82 ++#endif
  537.83 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  537.84 ++  __attribute ((always_inline))
  537.85 ++#endif
  537.86 + elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
  537.87 + 			  void *const reloc_addr_arg)
  537.88 + {
  537.89 +@@ -606,7 +634,14 @@
  537.90 + }
  537.91 + 
  537.92 + # ifndef RTLD_BOOTSTRAP
  537.93 +-static inline void
  537.94 ++#if __GNUC__ >= 4
  537.95 ++  auto inline void
  537.96 ++#else
  537.97 ++  static inline void
  537.98 ++#endif
  537.99 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
 537.100 ++  __attribute ((always_inline))
 537.101 ++#endif
 537.102 + elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
 537.103 + 			   void *const reloc_addr_arg)
 537.104 + {
 537.105 +@@ -615,7 +650,14 @@
 537.106 + }
 537.107 + # endif
 537.108 + 
 537.109 +-static inline void
 537.110 ++#if __GNUC__ >= 4
 537.111 ++  auto inline void
 537.112 ++#else
 537.113 ++  static inline void
 537.114 ++#endif
 537.115 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
 537.116 ++  __attribute ((always_inline))
 537.117 ++#endif
 537.118 + elf_machine_lazy_rel (struct link_map *map,
 537.119 + 		      Elf32_Addr l_addr, const Elf32_Rel *reloc)
 537.120 + {
   538.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   538.2 +++ b/patches/glibc/2.3.5/glibc-2.3.4-allow-gcc-4.0-elf.patch	Sat Feb 24 11:00:05 2007 +0000
   538.3 @@ -0,0 +1,61 @@
   538.4 +From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
   538.5 +Fixes
   538.6 +  rtld.c: In function '_dl_start':
   538.7 +  dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
   538.8 +  dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
   538.9 +when compiling glibc-2.3.4 with gcc-4.0
  538.10 +
  538.11 +But see also
  538.12 +http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
  538.13 +and
  538.14 +http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
  538.15 +which seem to propose less radical fixes?
  538.16 +
  538.17 +Aha.  See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
  538.18 +
  538.19 +--- glibc-2.3-20050307/elf/dynamic-link.h.old	2005-03-12 18:12:37.000000000 -0800
  538.20 ++++ glibc-2.3-20050307/elf/dynamic-link.h	2005-03-12 18:12:59.777820848 -0800
  538.21 +@@ -19,43 +19,6 @@
  538.22 + 
  538.23 + #include <elf.h>
  538.24 + #include <assert.h>
  538.25 +-
  538.26 +-#ifdef RESOLVE
  538.27 +-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
  538.28 +-   ElfW(Addr), because not all architectures can assume that the
  538.29 +-   relocated address is properly aligned, whereas the compiler is
  538.30 +-   entitled to assume that a pointer to a type is properly aligned for
  538.31 +-   the type.  Even if we cast the pointer back to some other type with
  538.32 +-   less strict alignment requirements, the compiler might still
  538.33 +-   remember that the pointer was originally more aligned, thereby
  538.34 +-   optimizing away alignment tests or using word instructions for
  538.35 +-   copying memory, breaking the very code written to handle the
  538.36 +-   unaligned cases.  */
  538.37 +-auto void __attribute__((always_inline))
  538.38 +-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
  538.39 +-		 const ElfW(Sym) *sym, const struct r_found_version *version,
  538.40 +-		 void *const reloc_addr);
  538.41 +-auto void __attribute__((always_inline))
  538.42 +-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
  538.43 +-		  const ElfW(Sym) *sym, const struct r_found_version *version,
  538.44 +-		  void *const reloc_addr);
  538.45 +-auto void __attribute__((always_inline))
  538.46 +-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
  538.47 +-			  void *const reloc_addr);
  538.48 +-auto void __attribute__((always_inline))
  538.49 +-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
  538.50 +-			   void *const reloc_addr);
  538.51 +-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
  538.52 +-auto void __attribute__((always_inline))
  538.53 +-elf_machine_lazy_rel (struct link_map *map,
  538.54 +-		      ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
  538.55 +-# else
  538.56 +-auto void __attribute__((always_inline))
  538.57 +-elf_machine_lazy_rel (struct link_map *map,
  538.58 +-		      ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
  538.59 +-# endif
  538.60 +-#endif
  538.61 +-
  538.62 + #include <dl-machine.h>
  538.63 + 
  538.64 + #ifndef VERSYMIDX
   539.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   539.2 +++ b/patches/glibc/2.3.5/glibc-2.3.4-allow-gcc-4.0-iconvdata.patch	Sat Feb 24 11:00:05 2007 +0000
   539.3 @@ -0,0 +1,44 @@
   539.4 +See http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
   539.5 +and http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
   539.6 +
   539.7 +Fixes
   539.8 +  In file included from jis0208.c:23:
   539.9 +  jis0208.h:32: error: array type has incomplete element type
  539.10 +when building glibc with gcc-4.0
  539.11 +The bug has been present since at least glibc-2.2.5.
  539.12 +This patch applies cleanly to glibc-2.3.4
  539.13 +
  539.14 +--- /home/dank/downloads/glibc-2.3-20050307/iconvdata/jis0208.h	2003-06-11 14:40:42.000000000 -0700
  539.15 ++++ glibc-2.3-20050307/iconvdata/jis0208.h	2005-03-13 20:55:01.784054760 -0800
  539.16 +@@ -24,15 +24,6 @@
  539.17 + #include <gconv.h>
  539.18 + #include <stdint.h>
  539.19 + 
  539.20 +-/* Conversion table.  */
  539.21 +-extern const uint16_t __jis0208_to_ucs[];
  539.22 +-
  539.23 +-extern const char __jisx0208_from_ucs4_lat1[256][2];
  539.24 +-extern const char __jisx0208_from_ucs4_greek[0xc1][2];
  539.25 +-extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
  539.26 +-extern const char __jisx0208_from_ucs_tab[][2];
  539.27 +-
  539.28 +-
  539.29 + /* Struct for table with indeces in UCS mapping table.  */
  539.30 + struct jisx0208_ucs_idx
  539.31 + {
  539.32 +@@ -42,6 +33,15 @@
  539.33 + };
  539.34 + 
  539.35 + 
  539.36 ++/* Conversion table.  */
  539.37 ++extern const uint16_t __jis0208_to_ucs[];
  539.38 ++
  539.39 ++extern const char __jisx0208_from_ucs4_lat1[256][2];
  539.40 ++extern const char __jisx0208_from_ucs4_greek[0xc1][2];
  539.41 ++extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
  539.42 ++extern const char __jisx0208_from_ucs_tab[][2];
  539.43 ++
  539.44 ++
  539.45 + static inline uint32_t
  539.46 + __attribute ((always_inline))
  539.47 + jisx0208_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
   540.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   540.2 +++ b/patches/glibc/2.3.5/glibc-2.3.4-allow-gcc-4.0-powerpc-procfs.patch	Sat Feb 24 11:00:05 2007 +0000
   540.3 @@ -0,0 +1,62 @@
   540.4 +First discussed here:
   540.5 +http://gcc.gnu.org/ml/gcc/2005-01/msg00509.html
   540.6 +
   540.7 +Revision 1.12, Wed Mar 2 20:11:38 2005 UTC by roland
   540.8 +Branch: MAIN
   540.9 +CVS Tags: fedora-glibc-20050303T1335, HEAD
  540.10 +Changes since 1.11: +3 -8 lines
  540.11 +Diff to previous 1.11 (colored)
  540.12 +
  540.13 +2005-02-21  Alan Modra <amodra@bigpond.net.au>
  540.14 +
  540.15 +	* sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (elf_vrreg_t): Don't
  540.16 +	use __uint128_t.
  540.17 +
  540.18 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h?cvsroot=glibc
  540.19 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h.diff?r1=1.11&r2=1.12&cvsroot=glibc
  540.20 +
  540.21 +Fixes
  540.22 +
  540.23 +In file included from ../linuxthreads_db/proc_service.h:20,
  540.24 +                 from ../linuxthreads_db/thread_dbP.h:7,
  540.25 +                 from ../linuxthreads/descr.h:44,
  540.26 +                 from ../linuxthreads/internals.h:30,
  540.27 +                 from ../linuxthreads/sysdeps/pthread/bits/libc-lock.h:27,
  540.28 +                 from ../sysdeps/generic/ldsodefs.h:38,
  540.29 +                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
  540.30 +                 from <stdin>:2:
  540.31 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:57: error: syntax error before 'elf_vrreg_t'
  540.32 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:57: warning: type defaults to 'int' in declaration of 'elf_vrreg_t'
  540.33 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:57: warning: data definition has no type or storage class
  540.34 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: error: syntax error before 'elf_vrregset_t'
  540.35 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: warning: type defaults to 'int' in declaration of 'elf_vrregset_t'
  540.36 +../sysdeps/unix/sysv/linux/powerpc/sys/procfs.h:58: warning: data definition has no type or storage class
  540.37 +make[2]: make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/powerpc-750-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/glibc-2.3-20050307/csu'
  540.38 +
  540.39 +
  540.40 +===================================================================
  540.41 +RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h,v
  540.42 +retrieving revision 1.11
  540.43 +retrieving revision 1.12
  540.44 +diff -u -r1.11 -r1.12
  540.45 +--- libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h	2003/12/17 23:09:34	1.11
  540.46 ++++ libc/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h	2005/03/02 20:11:38	1.12
  540.47 +@@ -46,15 +46,10 @@
  540.48 + typedef double elf_fpreg_t;
  540.49 + typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
  540.50 + 
  540.51 +-/* gcc 3.1 and newer support __uint128_t.  */
  540.52 +-#if !__GNUC_PREREQ(3,1)
  540.53 +-typedef struct {
  540.54 +-  unsigned long u[4];
  540.55 +-} __attribute((aligned(16))) __uint128_t;
  540.56 +-#endif
  540.57 +-
  540.58 + /* Altivec registers */
  540.59 +-typedef __uint128_t elf_vrreg_t;
  540.60 ++typedef struct {
  540.61 ++  unsigned int u[4];
  540.62 ++} __attribute__ ((aligned (16))) elf_vrreg_t;
  540.63 + typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG];
  540.64 + #endif
  540.65 + 
   541.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   541.2 +++ b/patches/glibc/2.3.5/glibc-2.3.4-allow-gcc-4.0-powerpc32.patch	Sat Feb 24 11:00:05 2007 +0000
   541.3 @@ -0,0 +1,42 @@
   541.4 +Fixes
   541.5 +
   541.6 +../sysdeps/powerpc/powerpc32/dl-machine.h: In function '_dl_relocate_object':
   541.7 +../sysdeps/powerpc/powerpc32/dl-machine.h:461: error: invalid storage class for function 'elf_machine_rela_relative'
   541.8 +../sysdeps/powerpc/powerpc32/dl-machine.h:469: error: invalid storage class for function 'elf_machine_lazy_rel'
   541.9 +make[2]: *** [/home/dank/queue/jobdir.dual2/crosstool-dev/build/powerpc-750-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/build-glibc/elf/dl-reloc.o] Error 1
  541.10 +
  541.11 +diff -ur glibc-2.3-20050307.orig/sysdeps/powerpc/powerpc32/dl-machine.h glibc-2.3-20050307/sysdeps/powerpc/powerpc32/dl-machine.h
  541.12 +--- glibc-2.3-20050307.orig/sysdeps/powerpc/powerpc32/dl-machine.h	Wed Jul 30 23:33:52 2003
  541.13 ++++ glibc-2.3-20050307/sysdeps/powerpc/powerpc32/dl-machine.h	Thu Mar 17 13:19:16 2005
  541.14 +@@ -455,7 +455,14 @@
  541.15 +     }
  541.16 + }
  541.17 + 
  541.18 +-static inline void
  541.19 ++#if __GNUC__ >= 4
  541.20 ++  auto inline void
  541.21 ++#else
  541.22 ++  static inline void
  541.23 ++#endif
  541.24 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  541.25 ++  __attribute ((always_inline))
  541.26 ++#endif
  541.27 + elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
  541.28 + 			   void *const reloc_addr_arg)
  541.29 + {
  541.30 +@@ -463,7 +470,14 @@
  541.31 +   *reloc_addr = l_addr + reloc->r_addend;
  541.32 + }
  541.33 + 
  541.34 +-static inline void
  541.35 ++#if __GNUC__ >= 4
  541.36 ++  auto inline void
  541.37 ++#else
  541.38 ++  static inline void
  541.39 ++#endif
  541.40 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  541.41 ++  __attribute ((always_inline))
  541.42 ++#endif
  541.43 + elf_machine_lazy_rel (struct link_map *map,
  541.44 + 		      Elf32_Addr l_addr, const Elf32_Rela *reloc)
  541.45 + {
   542.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   542.2 +++ b/patches/glibc/2.3.5/glibc-2.3.4-allow-gcc-4.0-powerpc64.patch	Sat Feb 24 11:00:05 2007 +0000
   542.3 @@ -0,0 +1,60 @@
   542.4 +Fixes:
   542.5 +
   542.6 +In file included from dynamic-link.h:22,
   542.7 +                 from dl-reloc.c:269:
   542.8 +../sysdeps/powerpc/powerpc64/dl-machine.h: In function '_dl_relocate_object':
   542.9 +../sysdeps/powerpc/powerpc64/dl-machine.h:573: error: invalid storage class for function 'elf_machine_rela_relative'
  542.10 +../sysdeps/powerpc/powerpc64/dl-machine.h:607: error: invalid storage class for function 'elf_machine_rela'
  542.11 +../sysdeps/powerpc/powerpc64/dl-machine.h:889: error: invalid storage class for function 'elf_machine_lazy_rel'
  542.12 +make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/powerpc64-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/glibc-2.3-20050307/elf'
  542.13 +
  542.14 +--- glibc-2.3-20050307/sysdeps/powerpc/powerpc64/dl-machine.h.old	Thu Mar 17 13:35:23 2005
  542.15 ++++ glibc-2.3-20050307/sysdeps/powerpc/powerpc64/dl-machine.h	Thu Mar 17 13:37:12 2005
  542.16 +@@ -567,7 +567,14 @@
  542.17 +                                 const Elf64_Sym *refsym)
  542.18 +                                 attribute_hidden;
  542.19 + 
  542.20 +-static inline void
  542.21 ++#if __GNUC__ >= 4
  542.22 ++  auto inline void
  542.23 ++#else
  542.24 ++  static inline void
  542.25 ++#endif
  542.26 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  542.27 ++  __attribute ((always_inline))
  542.28 ++#endif
  542.29 + elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
  542.30 + 			   void *const reloc_addr_arg)
  542.31 + {
  542.32 +@@ -598,7 +605,14 @@
  542.33 + 
  542.34 + /* Perform the relocation specified by RELOC and SYM (which is fully
  542.35 +    resolved).  MAP is the object containing the reloc.  */
  542.36 +-static inline void
  542.37 ++#if __GNUC__ >= 4
  542.38 ++  auto inline void
  542.39 ++#else
  542.40 ++  static inline void
  542.41 ++#endif
  542.42 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  542.43 ++  __attribute ((always_inline))
  542.44 ++#endif
  542.45 + elf_machine_rela (struct link_map *map,
  542.46 + 		  const Elf64_Rela *reloc,
  542.47 + 		  const Elf64_Sym *sym,
  542.48 +@@ -883,7 +897,14 @@
  542.49 +   MODIFIED_CODE_NOQUEUE (reloc_addr);
  542.50 + }
  542.51 + 
  542.52 +-static inline void
  542.53 ++#if __GNUC__ >= 4
  542.54 ++  auto inline void
  542.55 ++#else
  542.56 ++  static inline void
  542.57 ++#endif
  542.58 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  542.59 ++  __attribute ((always_inline))
  542.60 ++#endif
  542.61 + elf_machine_lazy_rel (struct link_map *map,
  542.62 + 		      Elf64_Addr l_addr, const Elf64_Rela *reloc)
  542.63 + {
   543.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   543.2 +++ b/patches/glibc/2.3.5/glibc-2.3.4-memcmp.patch	Sat Feb 24 11:00:05 2007 +0000
   543.3 @@ -0,0 +1,46 @@
   543.4 +Fixes
   543.5 +    ../sysdeps/i386/i686/memcmp.S: Assembler messages:
   543.6 +    ../sysdeps/i386/i686/memcmp.S:390: Error: can't resolve  `.rodata' {.rodata section} - `memcmp' {.text section}
   543.7 +when building on macosx.
   543.8 +
   543.9 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/i686/memcmp.S?cvsroot=glibc
  543.10 +Revision 1.4, Thu Apr 28 18:19:25 2005 UTC by drepper
  543.11 +Branch: MAIN
  543.12 +CVS Tags: fedora-glibc-20050503T0852
  543.13 +Changes since 1.3: +2 -2 lines
  543.14 +Diff to previous 1.3 (colored)
  543.15 +
  543.16 +Move misplaced END.
  543.17 +
  543.18 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/i686/memcmp.S.diff?r1=1.3&r2=1.4&cvsroot=glibc
  543.19 +
  543.20 +===================================================================
  543.21 +RCS file: /cvs/glibc/libc/sysdeps/i386/i686/memcmp.S,v
  543.22 +retrieving revision 1.3
  543.23 +retrieving revision 1.4
  543.24 +diff -u -r1.3 -r1.4
  543.25 +--- libc/sysdeps/i386/i686/memcmp.S	2004/04/01 23:28:37	1.3
  543.26 ++++ libc/sysdeps/i386/i686/memcmp.S	2005/04/28 18:19:25	1.4
  543.27 +@@ -1,5 +1,5 @@
  543.28 + /* Compare two memory blocks for differences in the first COUNT bytes.
  543.29 +-   Copyright (C) 2004 Free Software Foundation, Inc.
  543.30 ++   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  543.31 +    This file is part of the GNU C Library.
  543.32 + 
  543.33 +    The GNU C Library is free software; you can redistribute it and/or
  543.34 +@@ -350,6 +350,7 @@
  543.35 + 	sbbl	$-1, %eax
  543.36 + 	popl	%esi
  543.37 + 	RETURN
  543.38 ++END (BP_SYM (memcmp))
  543.39 + 
  543.40 + 	.section	.rodata
  543.41 + 	ALIGN (2)
  543.42 +@@ -387,7 +388,6 @@
  543.43 + 	.long	L(30bytes) - . + 0x78
  543.44 + 	.long	L(31bytes) - . + 0x7c
  543.45 + 
  543.46 +-END (BP_SYM (memcmp))
  543.47 + 
  543.48 + #undef bcmp
  543.49 + weak_alias (BP_SYM (memcmp), BP_SYM (bcmp))
   544.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   544.2 +++ b/patches/glibc/2.3.5/glibc-2.3.5-allow-gcc-4.0-wordexp.patch	Sat Feb 24 11:00:05 2007 +0000
   544.3 @@ -0,0 +1,19 @@
   544.4 +../sysdeps/generic/wordexp.c: In function 'exec_comm':
   544.5 +../sysdeps/generic/wordexp.c:815: sorry, unimplemented: inlining failed in call to 'exec_comm_child': function body not available
   544.6 +../sysdeps/generic/wordexp.c:900: sorry, unimplemented: called from here
   544.7 +make[2]: *** [/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/build-glibc/posix/wordexp.o] Error
   544.8 +
   544.9 +I had to add the keyword 'inline' to get it to compile:
  544.10 +
  544.11 +--- glibc-2.3-20050307/sysdeps/generic/wordexp.c.old	2005-03-12 08:54:15.709253928 -0800
  544.12 ++++ glibc-2.3-20050307/sysdeps/generic/wordexp.c	2005-03-12 08:54:51.242852000 -0800
  544.13 +@@ -809,7 +809,7 @@
  544.14 + }
  544.15 +
  544.16 + /* Function called by child process in exec_comm() */
  544.17 +-static void
  544.18 ++static inline void
  544.19 + internal_function __attribute__ ((always_inline))
  544.20 + exec_comm_child (char *comm, int *fildes, int showerr, int noexec)
  544.21 + {
  544.22 +
   545.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   545.2 +++ b/patches/glibc/2.3.5/glibc-2.3.5-allow-gcc4-string.patch	Sat Feb 24 11:00:05 2007 +0000
   545.3 @@ -0,0 +1,83 @@
   545.4 +
   545.5 +Fixes? the following error when building with gcc-4.0.0:
   545.6 +
   545.7 +../string/strcoll.c:39: error: '__EI_strcoll' aliased to undefined symbol '__GI_strcoll'
   545.8 +make[2]: *** [/home/dank/crosstool-0.32/build/i686-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcscoll.os] Error 1
   545.9 +make[2]: Leaving directory `/home/dank/crosstool-0.32/build/i686-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/glibc-2.3.4/wcsmbs'
  545.10 +
  545.11 +
  545.12 +Thu Mar 17 21:06:24 2005 UTC (3 weeks, 5 days ago) by roland
  545.13 +Branch: MAIN
  545.14 +CVS Tags: fedora-glibc-20050405T2114, fedora-glibc-20050401T1444, fedora-glibc-20050324T0715, fedora-glibc-20050319T1907, HEAD
  545.15 +
  545.16 +2005-03-16  Richard Henderson  <rth@redhat.com>
  545.17 +
  545.18 +	* include/wchar.h (__wcscoll): Remove.
  545.19 +	* wcsmbs/wcscoll.c: Define wcscoll directly instead of via __wcscoll.
  545.20 +	* string/strcoll.c: Don't issue libc_hidden_def STRCOLL redefined.
  545.21 +
  545.22 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/string/strcoll.c.diff?r1=1.33&r2=1.34&cvsroot=glibc
  545.23 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/include/wchar.h.diff?r1=1.26&r2=1.27&cvsroot=glibc
  545.24 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/wcsmbs/wcscoll.c.diff?r1=1.13&r2=1.14&cvsroot=glibc
  545.25 +
  545.26 +===================================================================
  545.27 +RCS file: /cvs/glibc/libc/string/strcoll.c,v
  545.28 +retrieving revision 1.33
  545.29 +retrieving revision 1.34
  545.30 +diff -u -r1.33 -r1.34
  545.31 +--- libc/string/strcoll.c	2004/03/14 20:51:30	1.33
  545.32 ++++ libc/string/strcoll.c	2005/03/17 21:06:24	1.34
  545.33 +@@ -23,6 +23,7 @@
  545.34 + # define STRING_TYPE char
  545.35 + # define STRCOLL strcoll
  545.36 + # define STRCOLL_L __strcoll_l
  545.37 ++# define USE_HIDDEN_DEF
  545.38 + #endif
  545.39 + 
  545.40 + #include "../locale/localeinfo.h"
  545.41 +@@ -35,6 +36,7 @@
  545.42 + {
  545.43 +   return STRCOLL_L (s1, s2, _NL_CURRENT_LOCALE);
  545.44 + }
  545.45 +-#if !defined WIDE_CHAR_VERSION
  545.46 +-libc_hidden_def (strcoll)
  545.47 ++
  545.48 ++#ifdef USE_HIDDEN_DEF
  545.49 ++libc_hidden_def (STRCOLL)
  545.50 + #endif
  545.51 +===================================================================
  545.52 +RCS file: /cvs/glibc/libc/include/wchar.h,v
  545.53 +retrieving revision 1.26
  545.54 +retrieving revision 1.27
  545.55 +diff -u -r1.26 -r1.27
  545.56 +--- libc/include/wchar.h	2004/03/14 20:45:10	1.26
  545.57 ++++ libc/include/wchar.h	2005/03/17 21:06:24	1.27
  545.58 +@@ -56,7 +56,6 @@
  545.59 + extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
  545.60 + 			  size_t __n)
  545.61 +      __attribute_pure__;
  545.62 +-extern int __wcscoll (__const wchar_t *__s1, __const wchar_t *__s2);
  545.63 + extern size_t __wcslen (__const wchar_t *__s) __attribute_pure__;
  545.64 + extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen)
  545.65 +      __attribute_pure__;
  545.66 +===================================================================
  545.67 +RCS file: /cvs/glibc/libc/wcsmbs/wcscoll.c,v
  545.68 +retrieving revision 1.13
  545.69 +retrieving revision 1.14
  545.70 +diff -u -r1.13 -r1.14
  545.71 +--- libc/wcsmbs/wcscoll.c	2004/03/14 21:05:48	1.13
  545.72 ++++ libc/wcsmbs/wcscoll.c	2005/03/17 21:06:24	1.14
  545.73 +@@ -22,12 +22,11 @@
  545.74 + 
  545.75 + #define STRING_TYPE wchar_t
  545.76 + #define USTRING_TYPE wint_t
  545.77 +-#define STRCOLL __wcscoll
  545.78 ++#define STRCOLL wcscoll
  545.79 + #define STRCOLL_L __wcscoll_l
  545.80 + 
  545.81 + #include "../string/strcoll.c"
  545.82 + 
  545.83 + #ifndef USE_IN_EXTENDED_LOCALE_MODEL
  545.84 +-weak_alias (__wcscoll, wcscoll)
  545.85 + libc_hidden_weak (wcscoll)
  545.86 + #endif
   546.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   546.2 +++ b/patches/glibc/2.3.5/glibc-2.3.5-allow-gcc4-symbols.patch	Sat Feb 24 11:00:05 2007 +0000
   546.3 @@ -0,0 +1,126 @@
   546.4 +If I'm really lucky, this fixes the following error building with gcc-4.0.0:
   546.5 +
   546.6 +../sysdeps/ieee754/dbl-64/s_isinf.c:29: error: 'isinf' aliased to undefined symbol '__isinf'
   546.7 +make[2]: *** [/home/dank/queue/jobdir.fast/crosstool-0.32/build/i686-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/math/s_isinf.os] Error 1
   546.8 +make[1]: *** [math/subdir_lib] Error 2
   546.9 +make: *** [lib] Error 2
  546.10 +
  546.11 +---
  546.12 +
  546.13 +
  546.14 +Revision 1.71, Thu Mar 17 21:06:27 2005 UTC (3 weeks, 5 days ago) by roland
  546.15 +Branch: MAIN
  546.16 +CVS Tags: fedora-glibc-20050405T2114, fedora-glibc-20050401T1444, fedora-glibc-20050324T0715, fedora-glibc-20050319T1907, HEAD
  546.17 +Changes since 1.70: +11 -66 lines
  546.18 +Diff to previous 1.70 (colored)
  546.19 +
  546.20 +2005-03-16  Richard Henderson  <rth@redhat.com>
  546.21 +
  546.22 +	* include/libc-symbols.h (__hidden_proto): Remove bogus declaration
  546.23 +	of internal.
  546.24 +	(__hidden_def1, __hidden_dot_def1): Remove.
  546.25 +	(__hidden_def2, __hidden_def3): Remove.
  546.26 +	(__hidden_ver1): New.
  546.27 +	(hidden_ver, hidden_def, hidden_weak): Use it.
  546.28 +	(hidden_data_ver, hidden_data_ver, hidden_data_weak): Use non-data
  546.29 +	version of the macro.
  546.30 +
  546.31 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/include/libc-symbols.h.diff?r1=1.70&r2=1.71&cvsroot=glibc
  546.32 +
  546.33 +===================================================================
  546.34 +RCS file: /cvs/glibc/libc/include/libc-symbols.h,v
  546.35 +retrieving revision 1.70
  546.36 +retrieving revision 1.71
  546.37 +diff -u -r1.70 -r1.71
  546.38 +--- libc/include/libc-symbols.h	2005/02/11 00:29:46	1.70
  546.39 ++++ libc/include/libc-symbols.h	2005/03/17 21:06:27	1.71
  546.40 +@@ -583,78 +583,23 @@
  546.41 + #  define hidden_proto(name, attrs...) \
  546.42 +   __hidden_proto (name, __GI_##name, ##attrs)
  546.43 + #  define __hidden_proto(name, internal, attrs...) \
  546.44 +-  extern __typeof (name) internal; \
  546.45 +   extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
  546.46 +   __hidden_proto_hiddenattr (attrs);
  546.47 + #  define __hidden_asmname(name) \
  546.48 +   __hidden_asmname1 (__USER_LABEL_PREFIX__, name)
  546.49 + #  define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
  546.50 + #  define __hidden_asmname2(prefix, name) #prefix name
  546.51 +-#  ifdef HAVE_ASM_SET_DIRECTIVE
  546.52 +-#   define __hidden_def1(original, alias)			\
  546.53 +-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
  546.54 +-  .set C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
  546.55 +-#   ifdef HAVE_ASM_GLOBAL_DOT_NAME
  546.56 +-#     define __hidden_dot_def1(original, alias)	 ASM_LINE_SEP	\
  546.57 +-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP	\
  546.58 +-  .set C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
  546.59 +-#   else
  546.60 +-#     define __hidden_dot_def1(original, alias)
  546.61 +-#   endif
  546.62 +-#  else
  546.63 +-#   define __hidden_def1(original, alias)			\
  546.64 +-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
  546.65 +-  C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
  546.66 +-#   ifdef HAVE_ASM_GLOBAL_DOT_NAME
  546.67 +-#    define __hidden_dot_def1(original, alias)	ASM_LINE_SEP	\
  546.68 +-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP	\
  546.69 +-  C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
  546.70 +-#   else
  546.71 +-#    define __hidden_dot_def1(original, alias)
  546.72 +-#   endif
  546.73 +-#  endif
  546.74 +-#  define __hidden_def2(...) #__VA_ARGS__
  546.75 +-#  define __hidden_def3(...) __hidden_def2 (__VA_ARGS__)
  546.76 +-#  define hidden_def(name)					\
  546.77 +-  __asm__ (__hidden_def3 (__hidden_def1 (__GI_##name, name) \
  546.78 +-  __hidden_dot_def1 (__GI_##name, name)));
  546.79 +-#  define hidden_data_def(name)					\
  546.80 +-  __asm__ (__hidden_def3 (__hidden_def1 (__GI_##name, name)));
  546.81 +-#  define hidden_ver(local, name)				\
  546.82 +-  __asm__ (__hidden_def3 (__hidden_def1 (local, __GI_##name) \
  546.83 +-  __hidden_dot_def1 (local, __GI_##name)));
  546.84 +-#  define hidden_data_ver(local, name)				\
  546.85 +-  __asm__ (__hidden_def3 (__hidden_def1 (local, __GI_##name)));
  546.86 +-#  ifdef HAVE_WEAK_SYMBOLS
  546.87 +-#   ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
  546.88 +-#    define __hidden_weak1(original, alias)			\
  546.89 +-  .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
  546.90 +-#    ifdef HAVE_ASM_GLOBAL_DOT_NAME
  546.91 +-#     define __hidden_dot_weak1(original, alias)	ASM_LINE_SEP	\
  546.92 +-  .weakext C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
  546.93 +-#    else
  546.94 +-#     define __hidden_dot_weak1(original, alias)
  546.95 +-#    endif
  546.96 +-#   else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
  546.97 +-#    define __hidden_weak1(original, alias)			\
  546.98 +-  .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP			\
  546.99 +-  C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
 546.100 +-#    ifdef HAVE_ASM_GLOBAL_DOT_NAME
 546.101 +-#     define __hidden_dot_weak1(original, alias)	ASM_LINE_SEP	\
 546.102 +-  .weak C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP	\
 546.103 +-  C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
 546.104 +-#    else
 546.105 +-#     define __hidden_dot_weak1(original, alias)
 546.106 +-#    endif
 546.107 +-#   endif
 546.108 +-#   define hidden_weak(name)					\
 546.109 +-  __asm__ (__hidden_def3 (__hidden_weak1 (__GI_##name, name) \
 546.110 +-  __hidden_dot_weak1 (__GI_##name, name)));
 546.111 +-#   define hidden_data_weak(name)					\
 546.112 +-  __asm__ (__hidden_def3 (__hidden_weak1 (__GI_##name, name)));
 546.113 +-#  else
 546.114 +-#   define hidden_weak(name) hidden_def (name)
 546.115 +-#  endif
 546.116 ++#  define __hidden_ver1(local, internal, name) \
 546.117 ++  extern __typeof (name) __EI_##name __asm__(__hidden_asmname (#internal)); \
 546.118 ++  extern __typeof (name) __EI_##name \
 546.119 ++	__attribute__((alias (__hidden_asmname (#local))))
 546.120 ++#  define hidden_ver(local, name)	__hidden_ver1(local, __GI_##name, name);
 546.121 ++#  define hidden_data_ver(local, name)	hidden_ver(local, name)
 546.122 ++#  define hidden_def(name)		__hidden_ver1(__GI_##name, name, name);
 546.123 ++#  define hidden_data_def(name)		hidden_def(name)
 546.124 ++#  define hidden_weak(name) \
 546.125 ++	__hidden_ver1(__GI_##name, name, name) __attribute__((weak));
 546.126 ++#  define hidden_data_weak(name)	hidden_weak(name)
 546.127 + # else
 546.128 + /* For assembly, we need to do the opposite of what we do in C:
 546.129 +    in assembly gcc __REDIRECT stuff is not in place, so functions
   547.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   547.2 +++ b/patches/glibc/2.3.5/glibc-2.3.5-allow-gcc4-wcstol_l.patch	Sat Feb 24 11:00:05 2007 +0000
   547.3 @@ -0,0 +1,57 @@
   547.4 +Fixes
   547.5 +../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
   547.6 +../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
   547.7 +../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
   547.8 +make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
   547.9 +
  547.10 +https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
  547.11 +%changelog
  547.12 ++* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
  547.13 ++- fix build on 64-bit arches with new GCC
  547.14 +
  547.15 +Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
  547.16 +Branch: fedora-branch
  547.17 +CVS Tags: fedora-glibc-2_3_4-18
  547.18 +Changes since 1.4: +2 -0 lines
  547.19 +Diff to previous 1.4 (colored)
  547.20 +
  547.21 +	* sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
  547.22 +	* sysdeps/wordsize-64/wcstol_l.c: Likewise.
  547.23 +
  547.24 +
  547.25 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
  547.26 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
  547.27 +
  547.28 +===================================================================
  547.29 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
  547.30 +retrieving revision 1.4
  547.31 +retrieving revision 1.4.2.1
  547.32 +diff -u -r1.4 -r1.4.2.1
  547.33 +--- libc/sysdeps/wordsize-64/strtol_l.c	2003/03/03 09:45:12	1.4
  547.34 ++++ libc/sysdeps/wordsize-64/strtol_l.c	2005/03/25 11:59:01	1.4.2.1
  547.35 +@@ -8,7 +8,9 @@
  547.36 + #undef ____strtoll_l_internal
  547.37 + #undef __strtoll_l
  547.38 + #undef strtoll_l
  547.39 ++#if !UNSIGNED
  547.40 + strong_alias (____strtol_l_internal, ____strtoll_l_internal)
  547.41 + libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
  547.42 + weak_alias (__strtol_l, __strtoll_l)
  547.43 + weak_alias (__strtol_l, strtoll_l)
  547.44 ++#endif
  547.45 +===================================================================
  547.46 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
  547.47 +retrieving revision 1.4
  547.48 +retrieving revision 1.4.2.1
  547.49 +diff -u -r1.4 -r1.4.2.1
  547.50 +--- libc/sysdeps/wordsize-64/wcstol_l.c	2002/08/08 11:44:51	1.4
  547.51 ++++ libc/sysdeps/wordsize-64/wcstol_l.c	2005/03/25 11:59:01	1.4.2.1
  547.52 +@@ -8,6 +8,8 @@
  547.53 + #undef ____wcstoll_l_internal
  547.54 + #undef __wcstoll_l
  547.55 + #undef wcstoll_l
  547.56 ++#if !UNSIGNED
  547.57 + strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
  547.58 + weak_alias (__wcstol_l, __wcstoll_l)
  547.59 + weak_alias (__wcstol_l, wcstoll_l)
  547.60 ++#endif
   548.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   548.2 +++ b/patches/glibc/2.3.5/glibc-2.3.5-cygwin.patch	Sat Feb 24 11:00:05 2007 +0000
   548.3 @@ -0,0 +1,185 @@
   548.4 +Fixes
   548.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
   548.6 +...
   548.7 +when building glibc-2.3.x on cygwin
   548.8 +
   548.9 +Idea from
  548.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
  548.11 +Basically, make glibc use .oST as suffix for 'object static'
  548.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
  548.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
  548.14 +
  548.15 +glibc-linuxthreads-2.3.5 also requires a patch, see 
  548.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
  548.17 +
  548.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
  548.19 +
  548.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
  548.21 +Date: Thu, 12 May 2005 08:50:34 +0200
  548.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
  548.23 +To: Dan Kegel <dank@kegel.com>
  548.24 +CC:  crossgcc@sources.redhat.com
  548.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
  548.26 +
  548.27 +Hi Dan,
  548.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
  548.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
  548.30 +
  548.31 +-- 
  548.32 +                     Petr Cvachoucek
  548.33 +                     Unicontrols a.s.
  548.34 +                     http://www.unicontrols.cz
  548.35 +]
  548.36 +
  548.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
  548.38 +--- glibc-2.3.5/Makeconfig	2005-02-16 11:50:19.000000000 +0100
  548.39 ++++ glibc-2.3.5-cygwin/Makeconfig	2005-05-11 08:24:51.046875000 +0200
  548.40 +@@ -449,7 +449,7 @@
  548.41 + # run the linked programs.
  548.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
  548.43 + 	    $(common-objpfx)libc.so$(libc.so-version) \
  548.44 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
  548.45 ++	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
  548.46 + # This is how to find at build-time things that will be installed there.
  548.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
  548.48 + endif
  548.49 +@@ -656,7 +656,7 @@
  548.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
  548.51 + # to pass different flags for each flavor.
  548.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
  548.53 +-all-object-suffixes := .o .os .op .og .ob .oS
  548.54 ++all-object-suffixes := .o .os .op .og .ob .oST
  548.55 + object-suffixes :=
  548.56 + CPPFLAGS-.o = $(pic-default)
  548.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
  548.58 +@@ -712,14 +712,14 @@
  548.59 + 
  548.60 + ifeq (yes,$(build-shared))
  548.61 + # Build special library that contains the static-only routines for libc.
  548.62 +-object-suffixes-for-libc += .oS
  548.63 ++object-suffixes-for-libc += .oST
  548.64 + 
  548.65 + # Must build the routines as PIC, though, because they can end up in (users')
  548.66 + # shared objects.  We don't want to use CFLAGS-os because users may, for
  548.67 + # example, make that processor-specific.
  548.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
  548.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
  548.70 +-libtype.oS = lib%_nonshared.a
  548.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
  548.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
  548.73 ++libtype.oST = lib%_nonshared.a
  548.74 + endif
  548.75 + 
  548.76 + # The assembler can generate debug information too.
  548.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
  548.78 +--- glibc-2.3.5/Makerules	2004-12-15 19:52:39.000000000 +0100
  548.79 ++++ glibc-2.3.5-cygwin/Makerules	2005-05-11 08:25:33.578125000 +0200
  548.80 +@@ -416,7 +416,7 @@
  548.81 + # Bounded pointer thunks are only built for *.ob
  548.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
  548.83 + 
  548.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
  548.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
  548.86 + 				  $(routines) $(aux) $(sysdep_routines)) \
  548.87 + 		     $(elide-bp-thunks)
  548.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
  548.89 +@@ -961,7 +961,7 @@
  548.90 + install: $(inst_libdir)/libc.so
  548.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
  548.92 + 			$(common-objpfx)libc.so$(libc.so-version) \
  548.93 +-			$(inst_libdir)/$(patsubst %,$(libtype.oS),\
  548.94 ++			$(inst_libdir)/$(patsubst %,$(libtype.oST),\
  548.95 + 						  $(libprefix)$(libc-name)) \
  548.96 + 			$(+force)
  548.97 + 	(echo '/* GNU ld script';\
  548.98 +@@ -969,7 +969,7 @@
  548.99 + 	 echo '   the static library, so try that secondarily.  */';\
 548.100 + 	 cat $<; \
 548.101 + 	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
 548.102 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
 548.103 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
 548.104 + 	      ')' \
 548.105 + 	) > $@.new
 548.106 + 	mv -f $@.new $@
 548.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
 548.108 +--- glibc-2.3.5/extra-lib.mk	2004-12-02 23:54:47.000000000 +0100
 548.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk	2005-05-11 08:27:28.156250000 +0200
 548.110 +@@ -13,7 +13,7 @@
 548.111 + 
 548.112 + ifneq (,$($(lib)-static-only-routines))
 548.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
 548.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
 548.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
 548.116 + endif
 548.117 + endif
 548.118 + 
 548.119 +@@ -29,7 +29,7 @@
 548.120 + 
 548.121 + # Add each flavor of library to the lists of things to build and install.
 548.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
 548.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
 548.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
 548.125 + 			$(patsubst %,%$o,$(filter-out \
 548.126 + 					   $($(lib)-shared-only-routines),\
 548.127 + 					   $(all-$(lib)-routines))))
 548.128 +@@ -57,7 +57,7 @@
 548.129 + 
 548.130 + 
 548.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
 548.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
 548.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
 548.134 + define o-iterator-doit
 548.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
 548.136 +   $(patsubst %,$(objpfx)%$o,\
 548.137 +@@ -65,7 +65,7 @@
 548.138 + 			  $(all-$(lib)-routines))); \
 548.139 + 	$$(build-extra-lib)
 548.140 + endef
 548.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
 548.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
 548.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
 548.144 + endif
 548.145 + 
 548.146 +@@ -77,9 +77,9 @@
 548.147 + 	$(build-extra-lib)
 548.148 + endif
 548.149 + 
 548.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
 548.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
 548.152 +-  $(patsubst %,$(objpfx)%.oS,\
 548.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
 548.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
 548.155 ++  $(patsubst %,$(objpfx)%.oST,\
 548.156 + 	     $(filter $($(lib)-static-only-routines),\
 548.157 + 		      $(all-$(lib)-routines)))
 548.158 + 	$(build-extra-lib)
 548.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
 548.160 +--- glibc-2.3.5/nptl/Makefile	2005-02-16 09:45:56.000000000 +0100
 548.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile	2005-05-11 08:26:01.812500000 +0200
 548.162 +@@ -360,7 +360,7 @@
 548.163 + 
 548.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
 548.165 + 			      $(objpfx)libpthread.so$(libpthread.so-version) \
 548.166 +-			      $(inst_libdir)/$(patsubst %,$(libtype.oS),\
 548.167 ++			      $(inst_libdir)/$(patsubst %,$(libtype.oST),\
 548.168 + 							$(libprefix)pthread) \
 548.169 + 			      $(+force)
 548.170 + 	(echo '/* GNU ld script';\
 548.171 +@@ -368,7 +368,7 @@
 548.172 + 	 echo '   the static library, so try that secondarily.  */';\
 548.173 + 	 cat $<; \
 548.174 + 	 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
 548.175 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
 548.176 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
 548.177 + 	      ')' \
 548.178 + 	) > $@.new
 548.179 + 	mv -f $@.new $@
 548.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
 548.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile	2004-08-16 08:46:14.000000000 +0200
 548.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile	2005-05-11 08:26:25.937500000 +0200
 548.183 +@@ -10,4 +10,4 @@
 548.184 + ASFLAGS-.op += -Wa,-Av9a
 548.185 + ASFLAGS-.og += -Wa,-Av9a
 548.186 + ASFLAGS-.ob += -Wa,-Av9a
 548.187 +-ASFLAGS-.oS += -Wa,-Av9a
 548.188 ++ASFLAGS-.oST += -Wa,-Av9a
   549.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   549.2 +++ b/patches/glibc/2.3.5/glibc-2.3.5-fix-pr631.patch	Sat Feb 24 11:00:05 2007 +0000
   549.3 @@ -0,0 +1,43 @@
   549.4 +From dank@kegel.com
   549.5 +Wed Jun 15 09:12:43 PDT 2005
   549.6 +
   549.7 +Fixes
   549.8 +
   549.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
  549.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
  549.11 +... 53 lines deleted ...
  549.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
  549.13 +collect2: ld returned 1 exit status
  549.14 +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
  549.15 +
  549.16 +when building glibc with --enable-static-nss.
  549.17 +
  549.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
  549.19 +
  549.20 +--- glibc-2.3.5/Makeconfig.old	Wed Jun 15 08:13:12 2005
  549.21 ++++ glibc-2.3.5/Makeconfig	Wed Jun 15 08:13:14 2005
  549.22 +@@ -487,7 +487,7 @@
  549.23 + 
  549.24 + # The static libraries.
  549.25 + ifeq (yes,$(build-static))
  549.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
  549.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
  549.28 + else
  549.29 + ifeq (yes,$(build-shared))
  549.30 + # We can try to link the programs with lib*_pic.a...
  549.31 +--- glibc-2.3.5/elf/Makefile.old	Wed Jun 15 07:46:49 2005
  549.32 ++++ glibc-2.3.5/elf/Makefile	Wed Jun 15 08:14:00 2005
  549.33 +@@ -114,6 +114,13 @@
  549.34 + install-bin-script = ldd
  549.35 + endif
  549.36 + 
  549.37 ++ifeq (yes,$(build-static-nss))
  549.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
  549.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
  549.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
  549.41 ++	     $(resolvobjdir)/libresolv.a
  549.42 ++endif
  549.43 ++
  549.44 + others		= sprof sln
  549.45 + install-bin	= sprof
  549.46 + others-static   = sln
   550.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   550.2 +++ b/patches/glibc/2.3.5/glibc-2.3.5-sh-memset.patch	Sat Feb 24 11:00:05 2007 +0000
   550.3 @@ -0,0 +1,69 @@
   550.4 +[http://sources.redhat.com/ml/crossgcc/2005-10/msg00035.html]
   550.5 +
   550.6 +Message-ID: <434576E1.6020305@sscd.de>
   550.7 +Date: Thu, 06 Oct 2005 21:11:29 +0200
   550.8 +From: Alexander Sieb <sieb@sscd.de>
   550.9 +To: crossgcc@sourceware.org
  550.10 +Subject: Crosstool sh4-linux-gcc-4.0.2-glibc-2.3.5 patches
  550.11 +
  550.12 +Hi,
  550.13 +
  550.14 +attached you find the files I needed to add to crosstool-0.38
  550.15 +in order to build a sh4-linux gcc-4.0.2-glibc-2.3.5 tool chain.
  550.16 +
  550.17 +Files attached:
  550.18 +
  550.19 +sh4-gcc4.dat:
  550.20 +        * gcc4 needs --with-multilib-list=m4,m4-nofpu otherwise a linux
  550.21 +        kernel won't build as it uses the -m4-nofpu option.
  550.22 +
  550.23 +gcc-pr21623.patch:
  550.24 +        * Kaz Kojima provided a patch [really, a workaround -dank] for http://gcc.gnu.org/PR21623
  550.25 +
  550.26 +glibc-2.3.5-sh-memset.patch:
  550.27 +        * A patch for glibc-2.3.5 which corrects memset. From SUGIOKA Toshinobu.
  550.28 +        See content for rationale.
  550.29 +
  550.30 +-- snip --
  550.31 +
  550.32 +-- Here's patch 2 of 2, plus URLs showing where it is in CVS --
  550.33 +
  550.34 +[http://sources.redhat.com/ml/glibc-cvs/2005-q3/msg00319.html]
  550.35 +
  550.36 +Date: 24 Jul 2005 22:54:32 -0000
  550.37 +Message-ID: <20050724225432.2111.qmail@sourceware.org>
  550.38 +From: roland at sourceware dot org
  550.39 +To: glibc-cvs at sources dot redhat dot com
  550.40 +Subject: libc/sysdeps/sh memset.S
  550.41 +
  550.42 +CVSROOT:	/cvs/glibc
  550.43 +Module name:	libc
  550.44 +Changes by:	roland@sources.redhat.com	2005-07-24 22:54:32
  550.45 +
  550.46 +Modified files:
  550.47 +	sysdeps/sh     : memset.S 
  550.48 +
  550.49 +Log message:
  550.50 +	2005-07-24  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
  550.51 +	
  550.52 +	* sysdeps/sh/memset.S (memset): Correct 2nd argument handling.
  550.53 +
  550.54 +[http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/sh/memset.S.diff?cvsroot=glibc&r1=1.4&r2=1.5]
  550.55 +
  550.56 +RCS file: /cvs/glibc/libc/sysdeps/sh/memset.S,v
  550.57 +retrieving revision 1.4
  550.58 +retrieving revision 1.5
  550.59 +diff -u -r1.4 -r1.5
  550.60 +--- libc/sysdeps/sh/memset.S	2003/04/29 22:47:18	1.4
  550.61 ++++ libc/sysdeps/sh/memset.S	2005/07/24 22:54:32	1.5
  550.62 +@@ -28,6 +28,7 @@
  550.63 + 	bt.s	L_byte_loop_init
  550.64 + 	mov	r4,r7
  550.65 + 
  550.66 ++	extu.b	r5,r5
  550.67 + 	swap.b	r5,r1
  550.68 + 	or	r1,r5
  550.69 + 	swap.w	r5,r1
  550.70 +
  550.71 +
  550.72 +[See also http://sources.redhat.com/ml/libc-alpha/2005-07/msg00051.html]
   551.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   551.2 +++ b/patches/glibc/2.3.5/glibc-configure-apple-as.patch	Sat Feb 24 11:00:05 2007 +0000
   551.3 @@ -0,0 +1,23 @@
   551.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
   551.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
   551.6 +
   551.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
   551.8 +where the assembler but doesn't understand the --version flag.
   551.9 +
  551.10 +Fixes the symptom
  551.11 +checking whether ld is GNU ld... no
  551.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
  551.13 +checking version of /usr/libexec/gcc/darwin/ppc/as... 
  551.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
  551.15 +
  551.16 +--- glibc-2.3.2/configure~	Wed Feb 26 09:20:48 2003
  551.17 ++++ glibc-2.3.2/configure	Fri Feb 27 13:12:53 2004
  551.18 +@@ -3789,7 +3789,7 @@
  551.19 +   # Found it, now check the version.
  551.20 +   echo "$as_me:$LINENO: checking version of $AS" >&5
  551.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
  551.22 +-  ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
  551.23 ++  ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
  551.24 +   case $ac_prog_version in
  551.25 +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
  551.26 +     2.1[3-9]*)
   552.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   552.2 +++ b/patches/glibc/2.3.5/glibc-fp-byteorder.patch	Sat Feb 24 11:00:05 2007 +0000
   552.3 @@ -0,0 +1,203 @@
   552.4 +Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
   552.5 +Author: addsub@eyou.com
   552.6 +Target: ARM
   552.7 +
   552.8 +Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
   552.9 +and makes printf("%f", 1.0) work.
  552.10 +
  552.11 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
  552.12 + It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
  552.13 + is broken' on my big-endian hardfloat FPA ARM platform. ...
  552.14 + It's definitely needed for hardfloat.  So I'd think it's needed for
  552.15 + big-endian systems in any case, and for VFP on little-endian systems
  552.16 + too.  Someone would have to verify that though.
  552.17 +
  552.18 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
  552.19 + I just had a look at glibc-20040830, and [this patch] is still needed and useful
  552.20 + for this version.  glibc-20040830 out-of-the-box still contains the
  552.21 + following wrong assumptions:
  552.22 + - sysdeps/arm/bits/endian.h: float word order is big endian (which it is
  552.23 +   not on vfp systems)
  552.24 + - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
  552.25 +   are not on big endian systems, neither on vfp systems)
  552.26 + - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
  552.27 +   (which they are not on big endian systems)
  552.28 + [This patch] seems the right solution for all of these issues.
  552.29 +
  552.30 +Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
  552.31 + It's even needed for glibc CVS, AFAICS.
  552.32 + The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
  552.33 + (currently at version 1.4) is only needed for proper VFP operation.
  552.34 + But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
  552.35 + that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
  552.36 + for proper operation of *any* FP model on big endian ARM.
  552.37 +
  552.38 +See also discussion in followups to
  552.39 +http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
  552.40 +
  552.41 +Message-ID: <276985760.37584@eyou.com>
  552.42 +Received: from unknown (HELO eyou.com) (172.16.2.2)
  552.43 + by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
  552.44 +Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
  552.45 +Date: 17 Feb 2004 10:42:38 +0800
  552.46 +Message-ID: <20040217104238.8237.qmail@eyou.com>
  552.47 +From: "add" <addsub@eyou.com>
  552.48 +To: dank@kegel.com
  552.49 +Reply-To: "add" <addsub@eyou.com>
  552.50 +Subject: Re:&nbsp;&nbsp;&nbsp;problem&nbsp;while&nbsp;building&nbsp;arm&nbsp;vfp&nbsp;softfloat&nbsp;gcc&nbsp;`
  552.51 +
  552.52 +Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
  552.53 +toolchain can printf("%f\n",1.0). So you may have a try of this
  552.54 +
  552.55 +
  552.56 +diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
  552.57 +--- glibc.old/sysdeps/arm/bits/endian.h	1999-04-12 11:59:13.000000000 -0400
  552.58 ++++ glibc.new/sysdeps/arm/bits/endian.h	2004-02-12 09:15:13.000000000 -0500
  552.59 +@@ -9,4 +9,9 @@
  552.60 + #else
  552.61 + #define __BYTE_ORDER __LITTLE_ENDIAN
  552.62 + #endif
  552.63 ++
  552.64 ++#ifdef __VFP_FP__
  552.65 ++#define __FLOAT_WORD_ORDER __BYTE_ORDER
  552.66 ++#else
  552.67 + #define __FLOAT_WORD_ORDER __BIG_ENDIAN
  552.68 ++#endif
  552.69 +diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
  552.70 +--- glibc.old/sysdeps/arm/gmp-mparam.h	2001-07-07 15:21:19.000000000 -0400
  552.71 ++++ glibc.new/sysdeps/arm/gmp-mparam.h	2004-02-12 09:15:13.000000000 -0500
  552.72 +@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
  552.73 + #define BITS_PER_SHORTINT 16
  552.74 + #define BITS_PER_CHAR 8
  552.75 + 
  552.76 +-#define IEEE_DOUBLE_BIG_ENDIAN 0
  552.77 +-#define IEEE_DOUBLE_MIXED_ENDIAN 1
  552.78 ++#if defined(__ARMEB__)
  552.79 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
  552.80 ++# define IEEE_DOUBLE_BIG_ENDIAN 1
  552.81 ++#elif defined(__VFP_FP__)
  552.82 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
  552.83 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
  552.84 ++#else
  552.85 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
  552.86 ++# define IEEE_DOUBLE_MIXED_ENDIAN 1
  552.87 ++#endif
  552.88 +diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
  552.89 +--- glibc.old/sysdeps/arm/ieee754.h	2001-07-07 15:21:19.000000000 -0400
  552.90 ++++ glibc.new/sysdeps/arm/ieee754.h	1969-12-31 19:00:00.000000000 -0500
  552.91 +@@ -1,115 +0,0 @@
  552.92 +-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
  552.93 +-   This file is part of the GNU C Library.
  552.94 +-
  552.95 +-   The GNU C Library is free software; you can redistribute it and/or
  552.96 +-   modify it under the terms of the GNU Lesser General Public
  552.97 +-   License as published by the Free Software Foundation; either
  552.98 +-   version 2.1 of the License, or (at your option) any later version.
  552.99 +-
 552.100 +-   The GNU C Library is distributed in the hope that it will be useful,
 552.101 +-   but WITHOUT ANY WARRANTY; without even the implied warranty of
 552.102 +-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 552.103 +-   Lesser General Public License for more details.
 552.104 +-
 552.105 +-   You should have received a copy of the GNU Lesser General Public
 552.106 +-   License along with the GNU C Library; if not, write to the Free
 552.107 +-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 552.108 +-   02111-1307 USA.  */
 552.109 +-
 552.110 +-#ifndef _IEEE754_H
 552.111 +-
 552.112 +-#define _IEEE754_H 1
 552.113 +-#include <features.h>
 552.114 +-
 552.115 +-#include <endian.h>
 552.116 +-
 552.117 +-__BEGIN_DECLS
 552.118 +-
 552.119 +-union ieee754_float
 552.120 +-  {
 552.121 +-    float f;
 552.122 +-
 552.123 +-    /* This is the IEEE 754 single-precision format.  */
 552.124 +-    struct
 552.125 +-      {
 552.126 +-	unsigned int mantissa:23;
 552.127 +-	unsigned int exponent:8;
 552.128 +-	unsigned int negative:1;
 552.129 +-      } ieee;
 552.130 +-
 552.131 +-    /* This format makes it easier to see if a NaN is a signalling NaN.  */
 552.132 +-    struct
 552.133 +-      {
 552.134 +-	unsigned int mantissa:22;
 552.135 +-	unsigned int quiet_nan:1;
 552.136 +-	unsigned int exponent:8;
 552.137 +-	unsigned int negative:1;
 552.138 +-      } ieee_nan;
 552.139 +-  };
 552.140 +-
 552.141 +-#define IEEE754_FLOAT_BIAS	0x7f /* Added to exponent.  */
 552.142 +-
 552.143 +-
 552.144 +-union ieee754_double
 552.145 +-  {
 552.146 +-    double d;
 552.147 +-
 552.148 +-    /* This is the IEEE 754 double-precision format.  */
 552.149 +-    struct
 552.150 +-      {
 552.151 +-	unsigned int mantissa0:20;
 552.152 +-	unsigned int exponent:11;
 552.153 +-	unsigned int negative:1;
 552.154 +-	unsigned int mantissa1:32;
 552.155 +-      } ieee;
 552.156 +-
 552.157 +-    /* This format makes it easier to see if a NaN is a signalling NaN.  */
 552.158 +-    struct
 552.159 +-      {
 552.160 +-	unsigned int mantissa0:19;
 552.161 +-	unsigned int quiet_nan:1;
 552.162 +-	unsigned int exponent:11;
 552.163 +-	unsigned int negative:1;
 552.164 +-	unsigned int mantissa1:32;
 552.165 +-      } ieee_nan;
 552.166 +-  };
 552.167 +-
 552.168 +-#define IEEE754_DOUBLE_BIAS	0x3ff /* Added to exponent.  */
 552.169 +-
 552.170 +-
 552.171 +-/* The following two structures are correct for `new' floating point systems but
 552.172 +-   wrong for the old FPPC.  The only solution seems to be to avoid their use on
 552.173 +-   old hardware.  */
 552.174 +-
 552.175 +-union ieee854_long_double
 552.176 +-  {
 552.177 +-    long double d;
 552.178 +-
 552.179 +-    /* This is the IEEE 854 double-extended-precision format.  */
 552.180 +-    struct
 552.181 +-      {
 552.182 +-	unsigned int exponent:15;
 552.183 +-	unsigned int empty:16;
 552.184 +-	unsigned int negative:1;
 552.185 +-	unsigned int mantissa1:32;
 552.186 +-	unsigned int mantissa0:32;
 552.187 +-      } ieee;
 552.188 +-
 552.189 +-    /* This is for NaNs in the IEEE 854 double-extended-precision format.  */
 552.190 +-    struct
 552.191 +-      {
 552.192 +-	unsigned int exponent:15;
 552.193 +-	unsigned int empty:16;
 552.194 +-	unsigned int negative:1;
 552.195 +-	unsigned int mantissa1:32;
 552.196 +-	unsigned int mantissa0:30;
 552.197 +-	unsigned int quiet_nan:1;
 552.198 +-	unsigned int one:1;
 552.199 +-      } ieee_nan;
 552.200 +-  };
 552.201 +-
 552.202 +-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
 552.203 +-
 552.204 +-__END_DECLS
 552.205 +-
 552.206 +-#endif /* ieee754.h */
   553.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   553.2 +++ b/patches/glibc/2.3.5/glibc-mips-bootstrap-gcc-header-install.patch	Sat Feb 24 11:00:05 2007 +0000
   553.3 @@ -0,0 +1,35 @@
   553.4 +http://sourceware.org/ml/crossgcc/2005-05/msg00165.html
   553.5 +Fixes a MIPS build problem (unrelated to NPTL)
   553.6 +
   553.7 +Message-ID: <428E8B24.1000201@realitydiluted.com>
   553.8 +Date: Fri, 20 May 2005 20:13:08 -0500
   553.9 +From: "Steven J dot  Hill" <sjhill at realitydiluted dot com>
  553.10 +To:  crossgcc at sources dot redhat dot com,  toolchain at gentoo dot org, 
  553.11 + Shay_Gal-On at pmc-sierra dot com,  TheNop at gmx dot net
  553.12 +Subject: New NPTL patches for crosstools and MIPS NPTL patches....
  553.13 +
  553.14 +Greetings.
  553.15 +
  553.16 +I have uploaded the latest NPTL patch for crosstool-0.34. I have also
  553.17 +uploaded a tarball of the patches necessary to build a MIPS NPTL
  553.18 +cross toolchain. To build a MIPS NPTL toolchain you will need the
  553.19 +released version of binutils-2.16 and the absolute latest GCC and
  553.20 +glibc code from the HEAD of cvs. Use the 'demo-mips-nptl.sh' script
  553.21 +to build the toolchain. Please report bugs or issues to the crossgcc
  553.22 +mailing list. Here is the link off of my FTP site:
  553.23 +
  553.24 +    ftp://ftp.realitydiluted.com/crosstools/crosstool-0.34/
  553.25 +
  553.26 +[Note: BOOTSTRAP_GCC is set by crosstool.sh when invoking make install-headers]
  553.27 +
  553.28 +diff -ur glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile
  553.29 +--- glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile	2003-03-29 02:15:28.000000000 -0600
  553.30 ++++ glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile	2005-04-12 21:36:51.318837655 -0500
  553.31 +@@ -1,3 +1,7 @@
  553.32 ++ifeq ($(filter -DBOOTSTRAP_GCC,$(CFLAGS)),)
  553.33 + ifeq ($(filter -mabi=32,$(CC)),)
  553.34 + CC += -mabi=32
  553.35 + endif
  553.36 ++else
  553.37 ++CC += -D"_MIPS_SZPTR=32"
  553.38 ++endif
   554.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   554.2 +++ b/patches/glibc/2.3.5/make-install-lib-all.patch	Sat Feb 24 11:00:05 2007 +0000
   554.3 @@ -0,0 +1,24 @@
   554.4 +From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
   554.5 +Rule to install all needed libraries, not just the ones installed by install-lib,
   554.6 +yet not install programs.  
   554.7 +Needed because we can't use the main install target, as we can't build programs before
   554.8 +we have the final gcc installed; linking fails because libeh.a is not present,
   554.9 +and glibc insists on linking programs with that library.
  554.10 +
  554.11 +diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
  554.12 +--- glibc-2.3.4.orig/Makerules	2004-12-15 20:52:39.000000000 +0200
  554.13 ++++ glibc-2.3.4/Makerules	2005-02-19 15:16:31.415125176 +0200
  554.14 +@@ -844,6 +844,13 @@
  554.15 + installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
  554.16 + 			     $(inst_libdir)/$(patsubst %,$(libtype$o),\
  554.17 + 						     $(libprefix)$(libc-name)))
  554.18 ++
  554.19 ++install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
  554.20 ++		$(inst_slibdir)/libc-$(version).so \
  554.21 ++		$(inst_libdir)/libc.so \
  554.22 ++		$(inst_libdir)/libc.a \
  554.23 ++		install-lib
  554.24 ++
  554.25 + install: $(installed-libcs)
  554.26 + $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
  554.27 + 	$(make-target-directory)
   555.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   555.2 +++ b/patches/glibc/2.3.5/pr758.patch	Sat Feb 24 11:00:05 2007 +0000
   555.3 @@ -0,0 +1,256 @@
   555.4 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=758
   555.5 +
   555.6 +Submitted By: Jim Gifford (patches at jg555 dot com)
   555.7 +Date: 2005-02-23
   555.8 +Initial Package Version: 2.3.4
   555.9 +Origin: Richard Sandiford
  555.10 +Upstream Status: Unknown
  555.11 +Description: Fixes Syscall.h generation
  555.12 + 
  555.13 +diff -Naur glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/Makefile glibc-2.3.4/sysdeps/unix/sysv/linux/mips/Makefile
  555.14 +--- glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/Makefile	2004-11-24 04:38:15 +0000
  555.15 ++++ glibc-2.3.4/sysdeps/unix/sysv/linux/mips/Makefile	2005-02-23 18:21:54 +0000
  555.16 +@@ -9,11 +9,73 @@
  555.17 + 
  555.18 + no_syscall_list_h = 1
  555.19 + 
  555.20 +-# Generate the list of SYS_* macros for the system calls (__NR_* macros).
  555.21 +-# We generate not only SYS_<syscall>, pointing at SYS_<abi>_<syscall> if
  555.22 +-# it exists, but also define SYS_<abi>_<syscall> for all ABIs.
  555.23 ++# A callable macro that expands to a shell command.  Preprocess file $(1)
  555.24 ++# using ABI option $(2) and see which macros it defines.  Print FOO for each
  555.25 ++# macro of the form __NR$(3)_FOO, filtering out ABI-specific __NR macros
  555.26 ++# that have a prefix other than $(3).
  555.27 ++mips_list_syscalls =	$(filter-out -m%,$(CC)) -E -x c $(+includes) \
  555.28 ++			    $(sysincludes) -D_LIBC -dM -mabi=$(2) $(1) | \
  555.29 ++			sed -n 's@^\#define __NR$(3)_\([^ ]*\) .*@\1@p' | \
  555.30 ++			sed -e '/^[ON]32_/d' -e '/^N64_/d' -e '/^64_/d' | \
  555.31 ++			LC_ALL=C sort
  555.32 ++
  555.33 ++# Generate a list of SYS_* macros from the linux __NR macros.
  555.34 ++#
  555.35 ++# Before version 2.6, linux had separate 32-bit and 64-bit MIPS ports,
  555.36 ++# each with its own set of headers.  The ports were merged for 2.6 and
  555.37 ++# this merged port defines the syscalls in a slightly different way.
  555.38 ++# There are therefore three sets of headers that we need to consider:
  555.39 ++#
  555.40 ++#    (1) Headers from the separate 32-bit MIPS port.  They just define
  555.41 ++#	 a single list of __NR macros.
  555.42 ++#
  555.43 ++#    (2) Headers from the separate 64-bit MIPS port.  They unconditionally
  555.44 ++#	 define syscalls for all three ABIs, with o32 syscalls prefixed
  555.45 ++#	 by __NR_O32, n32 syscalls prefixed by __NR_N32 and n64 syscalls
  555.46 ++#	 prefixed by plain __NR.
  555.47 ++#
  555.48 ++#    (3) Headers from the combined port.  They use the _MIPS_SIM macro to
  555.49 ++#	 define the right set of syscalls for the current ABI.  The syscalls
  555.50 ++#	 themselves have no special ABI prefix, but the headers also define:
  555.51 ++#
  555.52 ++#	    __NR_O32_Linux{,_syscalls}
  555.53 ++#	    __NR_N32_Linux{,_syscalls}
  555.54 ++#	    __NR_64_Linux{,_syscalls}
  555.55 ++#
  555.56 ++# In case (1) we just want a simple list of SYS_* macros.  In cases (2)
  555.57 ++# and (3) we want a file that will work for all three ABIs, regardless
  555.58 ++# of which ABI we are currently using.  We also want the file to work
  555.59 ++# if the user later moves from (2) to (3).  Thus the file we create
  555.60 ++# for (2) and (3) has the form:
  555.61 ++#
  555.62 ++#    #if _MIPS_SIM == _MIPS_SIM_NABI32
  555.63 ++#    # ifdef __NR_N32_open
  555.64 ++#    #  define SYS_n32syscall1 __NR_N32_n32syscall1
  555.65 ++#    #  ...
  555.66 ++#    # else
  555.67 ++#    #  define SYS_n32syscall1 __NR_n32syscall1
  555.68 ++#    #  ...
  555.69 ++#    # endif
  555.70 ++#    #elif _MIPS_SIM == _MIPS_SIM_ABI64
  555.71 ++#    # define SYS_n64syscall1 __NR_n64syscall1
  555.72 ++#    # ...
  555.73 ++#    #else
  555.74 ++#    # ifdef __NR_O32_open
  555.75 ++#    #  define SYS_o32syscall1 __NR_O32_o32syscall1
  555.76 ++#    #  ...
  555.77 ++#    # else
  555.78 ++#    #  define SYS_o32syscall1 __NR_o32syscall1
  555.79 ++#    #  ...
  555.80 ++#    # endif
  555.81 ++#    #endif
  555.82 ++#
  555.83 ++# Here, __NR_N32_open and __NR_O32_open are used to detect case (2)
  555.84 ++# over case (3).  The n64 SYS_* macros can always use the normal
  555.85 ++# ABI-less names.
  555.86 + $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h
  555.87 + 	$(make-target-directory)
  555.88 ++	$(CC) -E -x c $(+includes) $(sysincludes) -D_LIBC $< -MD -MP \
  555.89 ++	      -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' > /dev/null
  555.90 + 	{ \
  555.91 + 	 echo '/* Generated at libc build time from kernel syscall list.  */';\
  555.92 + 	 echo ''; \
  555.93 +@@ -22,28 +84,38 @@
  555.94 + 	 echo '#endif'; \
  555.95 + 	 echo ''; \
  555.96 + 	 echo '#include <sgidefs.h>'; \
  555.97 +-	 rm -f $(@:.d=.h).newt; \
  555.98 +-	 $(CC) -E -MD -MP -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' \
  555.99 +-	       -x c $(+includes) $(sysincludes) $< -D_LIBC -dM | \
 555.100 +-	 sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \
 555.101 +-	     > $(@:.d=.h).newt; \
 555.102 +-	 if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \
 555.103 ++ 	 rm -f $(@:.d=.h).new32 $(@:.d=.h).newn32 $(@:.d=.h).new64; \
 555.104 ++ 	 $(call mips_list_syscalls,$<,n32,_N32) > $(@:.d=.h).newn32; \
 555.105 ++ 	 if test -s $(@:.d=.h).newn32; then \
 555.106 ++ 	   if grep open $(@:.d=.h).newn32 > /dev/null; then \
 555.107 ++ 	     $(call mips_list_syscalls,$<,32,_O32) > $(@:.d=.h).new32; \
 555.108 ++ 	     $(call mips_list_syscalls,$<,64,) > $(@:.d=.h).new64; \
 555.109 ++ 	   else \
 555.110 ++ 	     $(call mips_list_syscalls,$<,32,) > $(@:.d=.h).new32; \
 555.111 ++ 	     $(call mips_list_syscalls,$<,n32,) > $(@:.d=.h).newn32; \
 555.112 ++ 	     $(call mips_list_syscalls,$<,64,) > $(@:.d=.h).new64; \
 555.113 ++ 	   fi; \
 555.114 + 	   echo '#if _MIPS_SIM == _ABIN32'; \
 555.115 +-	   sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt | \
 555.116 +-		LC_ALL=C sort; \
 555.117 ++ 	   echo '# ifdef __NR_N32_open'; \
 555.118 ++ 	   sed 's@\(.*\)@#  define SYS_\1 __NR_N32_\1@' < $(@:.d=.h).newn32; \
 555.119 ++ 	   echo '# else'; \
 555.120 ++ 	   sed 's@\(.*\)@#  define SYS_\1 __NR_\1@' < $(@:.d=.h).newn32; \
 555.121 ++ 	   echo '# endif'; \
 555.122 + 	   echo '#elif _MIPS_SIM == _ABI64'; \
 555.123 +-	   sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt | \
 555.124 +-		LC_ALL=C sort; \
 555.125 ++ 	   sed 's@\(.*\)@# define SYS_\1 __NR_\1@' < $(@:.d=.h).new64; \
 555.126 + 	   echo '#else'; \
 555.127 +-	   sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt | \
 555.128 +-		LC_ALL=C sort; \
 555.129 ++ 	   echo '# ifdef __NR_O32_open'; \
 555.130 ++ 	   sed 's@\(.*\)@#  define SYS_\1 __NR_O32_\1@' < $(@:.d=.h).new32; \
 555.131 ++ 	   echo '# else'; \
 555.132 ++ 	   sed 's@\(.*\)@#  define SYS_\1 __NR_\1@' < $(@:.d=.h).new32; \
 555.133 ++ 	   echo '# endif'; \
 555.134 + 	   echo '#endif'; \
 555.135 +-	   sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt | \
 555.136 +-		LC_ALL=C sort +1.8; \
 555.137 + 	 else \
 555.138 +-	   cat $(@:.d=.h).newt; \
 555.139 ++ 	   $(CC) -E -x c $(+includes) $(sysincludes) -D_LIBC -dM $< | \
 555.140 ++ 	   sed -n 's@^\#define __NR_\([^ ]*\) .*@\#define SYS_\1 __NR_\1@p' | \
 555.141 ++ 	   LC_ALL=C sort; \
 555.142 + 	 fi; \
 555.143 +-	 rm $(@:.d=.h).newt; \
 555.144 ++ 	 rm -f $(@:.d=.h).new32 $(@:.d=.h).newn32 $(@:.d=.h).new64; \
 555.145 + 	} > $(@:.d=.h).new
 555.146 + 	mv -f $(@:.d=.h).new $(@:.d=.h)
 555.147 + ifneq (,$(objpfx))
 555.148 +diff -Naur glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/configure glibc-2.3.4/sysdeps/unix/sysv/linux/mips/configure
 555.149 +--- glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/configure	2004-11-24 04:42:45 +0000
 555.150 ++++ glibc-2.3.4/sysdeps/unix/sysv/linux/mips/configure	2005-02-23 18:10:11 +0000
 555.151 +@@ -18,7 +18,7 @@
 555.152 +     { echo "$as_me:$LINENO: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&5
 555.153 + echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&2;}
 555.154 +     echo '#include <asm/unistd.h>' > asm-unistd.h
 555.155 +-  else
 555.156 ++  elif grep __NR_N32_open "$asm_unistd_h" > /dev/null; then
 555.157 +     # The point of this preprocessing is to turn __NR_<syscall> into
 555.158 +     # __NR_N64_<syscall>, as well as to define __NR_<syscall> to
 555.159 +     # __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
 555.160 +@@ -68,6 +68,8 @@
 555.161 + {
 555.162 + 	print;
 555.163 + }'
 555.164 ++  else
 555.165 ++    echo '#include <asm/unistd.h>' > asm-unistd.h
 555.166 +   fi ;;
 555.167 + mips*)
 555.168 +   rm -f asm-unistd.h
 555.169 +diff -Naur glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/configure.in glibc-2.3.4/sysdeps/unix/sysv/linux/mips/configure.in
 555.170 +--- glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/configure.in	2004-11-24 04:38:31 +0000
 555.171 ++++ glibc-2.3.4/sysdeps/unix/sysv/linux/mips/configure.in	2005-02-23 18:10:11 +0000
 555.172 +@@ -18,7 +18,7 @@
 555.173 +   if test ! -f "$asm_unistd_h"; then
 555.174 +     AC_MSG_WARN([*** asm/unistd.h not found, it will not be pre-processed])
 555.175 +     echo '#include <asm/unistd.h>' > asm-unistd.h
 555.176 +-  else
 555.177 ++  elif grep __NR_N32_open "$asm_unistd_h" > /dev/null; then
 555.178 +     # The point of this preprocessing is to turn __NR_<syscall> into
 555.179 +     # __NR_N64_<syscall>, as well as to define __NR_<syscall> to
 555.180 +     # __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
 555.181 +@@ -68,6 +68,8 @@
 555.182 + {
 555.183 + 	print;
 555.184 + }'
 555.185 ++  else
 555.186 ++    echo '#include <asm/unistd.h>' > asm-unistd.h
 555.187 +   fi ;;
 555.188 + mips*)
 555.189 +   rm -f asm-unistd.h
 555.190 +diff -Naur glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h glibc-2.3.4/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h
 555.191 +--- glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h	2003-03-29 08:15:29 +0000
 555.192 ++++ glibc-2.3.4/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h	2005-02-23 18:10:11 +0000
 555.193 +@@ -1,36 +0,0 @@
 555.194 +-/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
 555.195 +-   This file is part of the GNU C Library.
 555.196 +-
 555.197 +-   The GNU C Library is free software; you can redistribute it and/or
 555.198 +-   modify it under the terms of the GNU Lesser General Public
 555.199 +-   License as published by the Free Software Foundation; either
 555.200 +-   version 2.1 of the License, or (at your option) any later version.
 555.201 +-
 555.202 +-   The GNU C Library is distributed in the hope that it will be useful,
 555.203 +-   but WITHOUT ANY WARRANTY; without even the implied warranty of
 555.204 +-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 555.205 +-   Lesser General Public License for more details.
 555.206 +-
 555.207 +-   You should have received a copy of the GNU Lesser General Public
 555.208 +-   License along with the GNU C Library; if not, write to the Free
 555.209 +-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 555.210 +-   02111-1307 USA.  */
 555.211 +-
 555.212 +-#ifndef _LINUX_MIPS_MIPS32_KERN64_SYSDEP_H
 555.213 +-#define _LINUX_MIPS_MIPS32_KERN64_SYSDEP_H 1
 555.214 +-
 555.215 +-/* There is some commonality.  */
 555.216 +-#include <sysdeps/unix/sysv/linux/mips/mips32/sysdep.h>
 555.217 +-
 555.218 +-/* For Linux we can use the system call table in the header file
 555.219 +-	/usr/include/asm/unistd.h
 555.220 +-   of the kernel.  But these symbols do not follow the SYS_* syntax
 555.221 +-   so we have to redefine the `SYS_ify' macro here.  */
 555.222 +-#undef SYS_ify
 555.223 +-#ifdef __STDC__
 555.224 +-# define SYS_ify(syscall_name)	__NR_O32_##syscall_name
 555.225 +-#else
 555.226 +-# define SYS_ify(syscall_name)	__NR_O32_/**/syscall_name
 555.227 +-#endif
 555.228 +-
 555.229 +-#endif /* linux/mips/mips32/kern64/sysdep.h */
 555.230 +diff -Naur glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h glibc-2.3.4/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
 555.231 +--- glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h	2004-10-18 05:16:07 +0000
 555.232 ++++ glibc-2.3.4/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h	2005-02-23 18:10:11 +0000
 555.233 +@@ -28,9 +28,9 @@
 555.234 +    so we have to redefine the `SYS_ify' macro here.  */
 555.235 + #undef SYS_ify
 555.236 + #ifdef __STDC__
 555.237 +-# define SYS_ify(syscall_name)	__NR_N32_##syscall_name
 555.238 ++# define SYS_ify(syscall_name)	__NR_##syscall_name
 555.239 + #else
 555.240 +-# define SYS_ify(syscall_name)	__NR_N32_/**/syscall_name
 555.241 ++# define SYS_ify(syscall_name)	__NR_/**/syscall_name
 555.242 + #endif
 555.243 + 
 555.244 + #ifdef __ASSEMBLER__
 555.245 +diff -Naur glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h glibc-2.3.4/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
 555.246 +--- glibc-2.3.4.orig/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h	2004-10-18 05:16:08 +0000
 555.247 ++++ glibc-2.3.4/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h	2005-02-23 18:10:11 +0000
 555.248 +@@ -28,9 +28,9 @@
 555.249 +    so we have to redefine the `SYS_ify' macro here.  */
 555.250 + #undef SYS_ify
 555.251 + #ifdef __STDC__
 555.252 +-# define SYS_ify(syscall_name)	__NR_N64_##syscall_name
 555.253 ++# define SYS_ify(syscall_name)	__NR_##syscall_name
 555.254 + #else
 555.255 +-# define SYS_ify(syscall_name)	__NR_N64_/**/syscall_name
 555.256 ++# define SYS_ify(syscall_name)	__NR_/**/syscall_name
 555.257 + #endif
 555.258 + 
 555.259 + #ifdef __ASSEMBLER__
   556.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   556.2 +++ b/patches/glibc/2.3.6/arm-ctl_bus_isa.patch	Sat Feb 24 11:00:05 2007 +0000
   556.3 @@ -0,0 +1,53 @@
   556.4 +Applies to both glibc-2.2.5 and glibc-2.3.2, and probably glibc cvs as of Aug 2004.
   556.5 +Needed to build glibc with linux kernels 2.4.23 or higher on ARM, 
   556.6 +Fixes following error:
   556.7 +
   556.8 +../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
   556.9 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
  556.10 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
  556.11 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
  556.12 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
  556.13 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
  556.14 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
  556.15 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
  556.16 +make[2]: *** [/home/dank/crosstool-0.28/build/arm-softfloat-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/misc/ioperm.o] Error 1
  556.17 +
  556.18 +cf. "[SYSCTL] BUS_ISA -> CTL_BUS_ISA",  http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html
  556.19 +
  556.20 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c.old	2003-02-20 14:22:24.000000000 -0800
  556.21 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c	2004-01-31 16:01:50.000000000 -0800
  556.22 +@@ -47,6 +47,12 @@
  556.23 + #include <asm/page.h>
  556.24 + #include <sys/sysctl.h>
  556.25 + 
  556.26 ++/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
  556.27 ++#include <linux/version.h>
  556.28 ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
  556.29 ++#define CTL_BUS_ISA BUS_ISA	/* and hope it's not the one from linux/input.h */
  556.30 ++#endif
  556.31 ++
  556.32 + #define PATH_ARM_SYSTYPE	"/etc/arm_systype"
  556.33 + #define PATH_CPUINFO		"/proc/cpuinfo"
  556.34 + 
  556.35 +@@ -80,7 +86,7 @@
  556.36 +  * Initialize I/O system.  There are several ways to get the information
  556.37 +  * we need.  Each is tried in turn until one succeeds.
  556.38 +  *
  556.39 +- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*).  This is the preferred method
  556.40 ++ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*).  This is the preferred method
  556.41 +  *    but not all kernels support it.
  556.42 +  *
  556.43 +  * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
  556.44 +@@ -100,8 +106,8 @@
  556.45 + {
  556.46 +   char systype[256];
  556.47 +   int i, n;
  556.48 +-  static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
  556.49 +-  static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
  556.50 ++  static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
  556.51 ++  static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
  556.52 +   size_t len = sizeof(io.base);
  556.53 + 
  556.54 +   if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
  556.55 +
  556.56 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
   557.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   557.2 +++ b/patches/glibc/2.3.6/fix-pr398.patch	Sat Feb 24 11:00:05 2007 +0000
   557.3 @@ -0,0 +1,70 @@
   557.4 +Fixes error
   557.5 +
   557.6 +dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
   557.7 +make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
   557.8 +e.o] Error 1
   557.9 +make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
  557.10 +822/elf'
  557.11 +make[1]: *** [elf/subdir_lib] Error 2
  557.12 +make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
  557.13 +822'
  557.14 +make: *** [all] Error 2
  557.15 +
  557.16 +-----------------
  557.17 +
  557.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
  557.19 +http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
  557.20 +
  557.21 +-----------------
  557.22 +
  557.23 +CVSROOT:	/cvs/glibc
  557.24 +Module name:	libc
  557.25 +Branch: 	glibc-2_3-branch
  557.26 +Changes by:	roland@sources.redhat.com	2006-02-23 22:36:51
  557.27 +
  557.28 +Modified files:
  557.29 +	sysdeps/s390/s390-64: dl-machine.h 
  557.30 +	sysdeps/s390/s390-32: dl-machine.h 
  557.31 +
  557.32 +Log message:
  557.33 +	2004-07-10  GOTO Masanori  <gotom@debian.or.jp>
  557.34 +	
  557.35 +	[BZ #398]
  557.36 +	* sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
  557.37 +	directive.
  557.38 +	* sysdeps/s390/s390-64/dl-machine.h: Likewise.
  557.39 +
  557.40 +Patches:
  557.41 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
  557.42 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
  557.43 +
  557.44 +===================================================================
  557.45 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
  557.46 +retrieving revision 1.19.4.1
  557.47 +retrieving revision 1.19.4.2
  557.48 +diff -u -r1.19.4.1 -r1.19.4.2
  557.49 +--- libc/sysdeps/s390/s390-64/dl-machine.h	2005/10/17 04:57:27	1.19.4.1
  557.50 ++++ libc/sysdeps/s390/s390-64/dl-machine.h	2006/02/23 22:36:51	1.19.4.2
  557.51 +@@ -27,6 +27,7 @@
  557.52 + #include <sys/param.h>
  557.53 + #include <string.h>
  557.54 + #include <link.h>
  557.55 ++#include <sysdep.h>
  557.56 + 
  557.57 + /* This is an older, now obsolete value.  */
  557.58 + #define EM_S390_OLD	0xA390
  557.59 +===================================================================
  557.60 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
  557.61 +retrieving revision 1.20.4.1
  557.62 +retrieving revision 1.20.4.2
  557.63 +diff -u -r1.20.4.1 -r1.20.4.2
  557.64 +--- libc/sysdeps/s390/s390-32/dl-machine.h	2005/10/17 04:57:27	1.20.4.1
  557.65 ++++ libc/sysdeps/s390/s390-32/dl-machine.h	2006/02/23 22:36:51	1.20.4.2
  557.66 +@@ -27,6 +27,7 @@
  557.67 + #include <sys/param.h>
  557.68 + #include <string.h>
  557.69 + #include <link.h>
  557.70 ++#include <sysdep.h>
  557.71 + 
  557.72 + /* This is an older, now obsolete value.  */
  557.73 + #define EM_S390_OLD	0xA390
   558.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   558.2 +++ b/patches/glibc/2.3.6/glibc-2.3.5-allow-gcc-4.0-wordexp.patch	Sat Feb 24 11:00:05 2007 +0000
   558.3 @@ -0,0 +1,21 @@
   558.4 +../sysdeps/generic/wordexp.c: In function 'exec_comm':
   558.5 +../sysdeps/generic/wordexp.c:815: sorry, unimplemented: inlining failed in call to 'exec_comm_child': function body not available
   558.6 +../sysdeps/generic/wordexp.c:900: sorry, unimplemented: called from here
   558.7 +make[2]: *** [/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/build-glibc/posix/wordexp.o] Error
   558.8 +
   558.9 +I had to add the keyword 'inline' to get it to compile:
  558.10 +
  558.11 +--- glibc-2.3-20050307/sysdeps/generic/wordexp.c.old	2005-03-12 08:54:15.709253928 -0800
  558.12 ++++ glibc-2.3-20050307/sysdeps/generic/wordexp.c	2005-03-12 08:54:51.242852000 -0800
  558.13 +@@ -809,7 +809,7 @@
  558.14 + }
  558.15 +
  558.16 + /* Function called by child process in exec_comm() */
  558.17 +-static void
  558.18 ++static inline void
  558.19 + internal_function __attribute__ ((always_inline))
  558.20 + exec_comm_child (char *comm, int *fildes, int showerr, int noexec)
  558.21 + {
  558.22 +
  558.23 +
  558.24 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
   559.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   559.2 +++ b/patches/glibc/2.3.6/glibc-2.3.5-allow-gcc4-wcstol_l.patch	Sat Feb 24 11:00:05 2007 +0000
   559.3 @@ -0,0 +1,59 @@
   559.4 +Fixes
   559.5 +../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
   559.6 +../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
   559.7 +../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
   559.8 +make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
   559.9 +
  559.10 +https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
  559.11 +%changelog
  559.12 ++* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
  559.13 ++- fix build on 64-bit arches with new GCC
  559.14 +
  559.15 +Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
  559.16 +Branch: fedora-branch
  559.17 +CVS Tags: fedora-glibc-2_3_4-18
  559.18 +Changes since 1.4: +2 -0 lines
  559.19 +Diff to previous 1.4 (colored)
  559.20 +
  559.21 +	* sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
  559.22 +	* sysdeps/wordsize-64/wcstol_l.c: Likewise.
  559.23 +
  559.24 +
  559.25 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
  559.26 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
  559.27 +
  559.28 +===================================================================
  559.29 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
  559.30 +retrieving revision 1.4
  559.31 +retrieving revision 1.4.2.1
  559.32 +diff -u -r1.4 -r1.4.2.1
  559.33 +--- libc/sysdeps/wordsize-64/strtol_l.c	2003/03/03 09:45:12	1.4
  559.34 ++++ libc/sysdeps/wordsize-64/strtol_l.c	2005/03/25 11:59:01	1.4.2.1
  559.35 +@@ -8,7 +8,9 @@
  559.36 + #undef ____strtoll_l_internal
  559.37 + #undef __strtoll_l
  559.38 + #undef strtoll_l
  559.39 ++#if !UNSIGNED
  559.40 + strong_alias (____strtol_l_internal, ____strtoll_l_internal)
  559.41 + libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
  559.42 + weak_alias (__strtol_l, __strtoll_l)
  559.43 + weak_alias (__strtol_l, strtoll_l)
  559.44 ++#endif
  559.45 +===================================================================
  559.46 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
  559.47 +retrieving revision 1.4
  559.48 +retrieving revision 1.4.2.1
  559.49 +diff -u -r1.4 -r1.4.2.1
  559.50 +--- libc/sysdeps/wordsize-64/wcstol_l.c	2002/08/08 11:44:51	1.4
  559.51 ++++ libc/sysdeps/wordsize-64/wcstol_l.c	2005/03/25 11:59:01	1.4.2.1
  559.52 +@@ -8,6 +8,8 @@
  559.53 + #undef ____wcstoll_l_internal
  559.54 + #undef __wcstoll_l
  559.55 + #undef wcstoll_l
  559.56 ++#if !UNSIGNED
  559.57 + strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
  559.58 + weak_alias (__wcstol_l, __wcstoll_l)
  559.59 + weak_alias (__wcstol_l, wcstoll_l)
  559.60 ++#endif
  559.61 +
  559.62 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
   560.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   560.2 +++ b/patches/glibc/2.3.6/glibc-2.3.5-cygwin.patch	Sat Feb 24 11:00:05 2007 +0000
   560.3 @@ -0,0 +1,187 @@
   560.4 +Fixes
   560.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
   560.6 +...
   560.7 +when building glibc-2.3.x on cygwin
   560.8 +
   560.9 +Idea from
  560.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
  560.11 +Basically, make glibc use .oST as suffix for 'object static'
  560.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
  560.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
  560.14 +
  560.15 +glibc-linuxthreads-2.3.5 also requires a patch, see 
  560.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
  560.17 +
  560.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
  560.19 +
  560.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
  560.21 +Date: Thu, 12 May 2005 08:50:34 +0200
  560.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
  560.23 +To: Dan Kegel <dank@kegel.com>
  560.24 +CC:  crossgcc@sources.redhat.com
  560.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
  560.26 +
  560.27 +Hi Dan,
  560.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
  560.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
  560.30 +
  560.31 +-- 
  560.32 +                     Petr Cvachoucek
  560.33 +                     Unicontrols a.s.
  560.34 +                     http://www.unicontrols.cz
  560.35 +]
  560.36 +
  560.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
  560.38 +--- glibc-2.3.5/Makeconfig	2005-02-16 11:50:19.000000000 +0100
  560.39 ++++ glibc-2.3.5-cygwin/Makeconfig	2005-05-11 08:24:51.046875000 +0200
  560.40 +@@ -449,7 +449,7 @@
  560.41 + # run the linked programs.
  560.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
  560.43 + 	    $(common-objpfx)libc.so$(libc.so-version) \
  560.44 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
  560.45 ++	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
  560.46 + # This is how to find at build-time things that will be installed there.
  560.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
  560.48 + endif
  560.49 +@@ -656,7 +656,7 @@
  560.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
  560.51 + # to pass different flags for each flavor.
  560.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
  560.53 +-all-object-suffixes := .o .os .op .og .ob .oS
  560.54 ++all-object-suffixes := .o .os .op .og .ob .oST
  560.55 + object-suffixes :=
  560.56 + CPPFLAGS-.o = $(pic-default)
  560.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
  560.58 +@@ -712,14 +712,14 @@
  560.59 + 
  560.60 + ifeq (yes,$(build-shared))
  560.61 + # Build special library that contains the static-only routines for libc.
  560.62 +-object-suffixes-for-libc += .oS
  560.63 ++object-suffixes-for-libc += .oST
  560.64 + 
  560.65 + # Must build the routines as PIC, though, because they can end up in (users')
  560.66 + # shared objects.  We don't want to use CFLAGS-os because users may, for
  560.67 + # example, make that processor-specific.
  560.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
  560.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
  560.70 +-libtype.oS = lib%_nonshared.a
  560.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
  560.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
  560.73 ++libtype.oST = lib%_nonshared.a
  560.74 + endif
  560.75 + 
  560.76 + # The assembler can generate debug information too.
  560.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
  560.78 +--- glibc-2.3.5/Makerules	2004-12-15 19:52:39.000000000 +0100
  560.79 ++++ glibc-2.3.5-cygwin/Makerules	2005-05-11 08:25:33.578125000 +0200
  560.80 +@@ -416,7 +416,7 @@
  560.81 + # Bounded pointer thunks are only built for *.ob
  560.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
  560.83 + 
  560.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
  560.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
  560.86 + 				  $(routines) $(aux) $(sysdep_routines)) \
  560.87 + 		     $(elide-bp-thunks)
  560.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
  560.89 +@@ -961,7 +961,7 @@
  560.90 + install: $(inst_libdir)/libc.so
  560.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
  560.92 + 			$(common-objpfx)libc.so$(libc.so-version) \
  560.93 +-			$(inst_libdir)/$(patsubst %,$(libtype.oS),\
  560.94 ++			$(inst_libdir)/$(patsubst %,$(libtype.oST),\
  560.95 + 						  $(libprefix)$(libc-name)) \
  560.96 + 			$(+force)
  560.97 + 	(echo '/* GNU ld script';\
  560.98 +@@ -969,7 +969,7 @@
  560.99 + 	 echo '   the static library, so try that secondarily.  */';\
 560.100 + 	 cat $<; \
 560.101 + 	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
 560.102 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
 560.103 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
 560.104 + 	      ')' \
 560.105 + 	) > $@.new
 560.106 + 	mv -f $@.new $@
 560.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
 560.108 +--- glibc-2.3.5/extra-lib.mk	2004-12-02 23:54:47.000000000 +0100
 560.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk	2005-05-11 08:27:28.156250000 +0200
 560.110 +@@ -13,7 +13,7 @@
 560.111 + 
 560.112 + ifneq (,$($(lib)-static-only-routines))
 560.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
 560.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
 560.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
 560.116 + endif
 560.117 + endif
 560.118 + 
 560.119 +@@ -29,7 +29,7 @@
 560.120 + 
 560.121 + # Add each flavor of library to the lists of things to build and install.
 560.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
 560.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
 560.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
 560.125 + 			$(patsubst %,%$o,$(filter-out \
 560.126 + 					   $($(lib)-shared-only-routines),\
 560.127 + 					   $(all-$(lib)-routines))))
 560.128 +@@ -57,7 +57,7 @@
 560.129 + 
 560.130 + 
 560.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
 560.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
 560.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
 560.134 + define o-iterator-doit
 560.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
 560.136 +   $(patsubst %,$(objpfx)%$o,\
 560.137 +@@ -65,7 +65,7 @@
 560.138 + 			  $(all-$(lib)-routines))); \
 560.139 + 	$$(build-extra-lib)
 560.140 + endef
 560.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
 560.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
 560.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
 560.144 + endif
 560.145 + 
 560.146 +@@ -77,9 +77,9 @@
 560.147 + 	$(build-extra-lib)
 560.148 + endif
 560.149 + 
 560.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
 560.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
 560.152 +-  $(patsubst %,$(objpfx)%.oS,\
 560.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
 560.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
 560.155 ++  $(patsubst %,$(objpfx)%.oST,\
 560.156 + 	     $(filter $($(lib)-static-only-routines),\
 560.157 + 		      $(all-$(lib)-routines)))
 560.158 + 	$(build-extra-lib)
 560.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
 560.160 +--- glibc-2.3.5/nptl/Makefile	2005-02-16 09:45:56.000000000 +0100
 560.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile	2005-05-11 08:26:01.812500000 +0200
 560.162 +@@ -360,7 +360,7 @@
 560.163 + 
 560.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
 560.165 + 			      $(objpfx)libpthread.so$(libpthread.so-version) \
 560.166 +-			      $(inst_libdir)/$(patsubst %,$(libtype.oS),\
 560.167 ++			      $(inst_libdir)/$(patsubst %,$(libtype.oST),\
 560.168 + 							$(libprefix)pthread) \
 560.169 + 			      $(+force)
 560.170 + 	(echo '/* GNU ld script';\
 560.171 +@@ -368,7 +368,7 @@
 560.172 + 	 echo '   the static library, so try that secondarily.  */';\
 560.173 + 	 cat $<; \
 560.174 + 	 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
 560.175 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
 560.176 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
 560.177 + 	      ')' \
 560.178 + 	) > $@.new
 560.179 + 	mv -f $@.new $@
 560.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
 560.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile	2004-08-16 08:46:14.000000000 +0200
 560.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile	2005-05-11 08:26:25.937500000 +0200
 560.183 +@@ -10,4 +10,4 @@
 560.184 + ASFLAGS-.op += -Wa,-Av9a
 560.185 + ASFLAGS-.og += -Wa,-Av9a
 560.186 + ASFLAGS-.ob += -Wa,-Av9a
 560.187 +-ASFLAGS-.oS += -Wa,-Av9a
 560.188 ++ASFLAGS-.oST += -Wa,-Av9a
 560.189 +
 560.190 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
   561.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   561.2 +++ b/patches/glibc/2.3.6/glibc-2.3.5-sh-lowlevellock.patch	Sat Feb 24 11:00:05 2007 +0000
   561.3 @@ -0,0 +1,43 @@
   561.4 +ML:	http://sources.redhat.com/ml/libc-hacker/2005-09/msg00002.html
   561.5 +
   561.6 +Date: Mon, 05 Sep 2005 21:07:15 +0900 (JST)
   561.7 +Message-Id: <20050905.210715.15267870.kkojima@rr.iij4u.or.jp>
   561.8 +To: libc-hacker at sources dot redhat dot com
   561.9 +Subject: SH: A typo in lowlevellock.S
  561.10 +From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
  561.11 +
  561.12 +Hi,
  561.13 +
  561.14 +The appended patch fixes a typo in a low-level lock function.  It
  561.15 +set the correct 3rd argument for the futex syscall in loop.  Sorry
  561.16 +for missing such an embarrassing bug.
  561.17 +
  561.18 +Regards,
  561.19 +	kaz
  561.20 +
  561.21 +nptl/ChangeLog:
  561.22 +2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
  561.23 +
  561.24 +	* sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
  561.25 +	Fix typo in register name.
  561.26 +
  561.27 +--- glibc.old/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S	2004-10-26 04:06:44.000000000 +0900
  561.28 ++++ glibc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S	2005-09-05 19:18:25.000000000 +0900
  561.29 +@@ -1,4 +1,4 @@
  561.30 +-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
  561.31 ++/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
  561.32 +    This file is part of the GNU C Library.
  561.33 + 
  561.34 +    The GNU C Library is free software; you can redistribute it and/or
  561.35 +@@ -51,8 +51,8 @@ __lll_mutex_lock_wait:
  561.36 + 	SYSCALL_INST_PAD
  561.37 + 
  561.38 + 2:
  561.39 +-	mov	#2, r4
  561.40 +-	XCHG (r4, @r8, r2)
  561.41 ++	mov	#2, r6
  561.42 ++	XCHG (r6, @r8, r2)
  561.43 + 	tst	r2, r2
  561.44 + 	bf	1b
  561.45 + 
  561.46 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
   562.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   562.2 +++ b/patches/glibc/2.3.6/glibc-2.3.5-sh-memset.patch	Sat Feb 24 11:00:05 2007 +0000
   562.3 @@ -0,0 +1,30 @@
   562.4 +From:
   562.5 +	http://sources.redhat.com/ml/libc-alpha/2005-07/msg00051.html
   562.6 +	http://sources.redhat.com/ml/crossgcc/2005-10/msg00035.html
   562.7 +
   562.8 +Message-ID: <434576E1.6020305@sscd.de>
   562.9 +Date: Thu, 06 Oct 2005 21:11:29 +0200
  562.10 +From: Alexander Sieb <sieb at sscd dot de>
  562.11 +To: crossgcc at sourceware dot org
  562.12 +Subject: Crosstool sh4-linux-gcc-4.0.2-glibc-2.3.5 patches
  562.13 +
  562.14 +On sh[34]-linux, memset function does not work if 2nd argument is negative
  562.15 +and 3rd argument is greater than 12.
  562.16 +for example, memset(ptr, "\xda", 20) sets 0xff instead of 0xda.
  562.17 + 
  562.18 +Attached patch fixes this problem.
  562.19 + 
  562.20 +	* sysdeps/sh/memset.S (memset): Correct 2nd argument handling.
  562.21 + 
  562.22 +--- glibc-2.3.5.old/sysdeps/sh/memset.S	29 Apr 2003 22:47:18 -0000	1.4
  562.23 ++++ glibc-2.3.5/sysdeps/sh/memset.S	23 Jul 2005 08:37:21 -0000
  562.24 +@@ -28,6 +28,7 @@ ENTRY(memset)
  562.25 + 	bt.s	L_byte_loop_init
  562.26 + 	mov	r4,r7
  562.27 + 
  562.28 ++	extu.b	r5,r5
  562.29 + 	swap.b	r5,r1
  562.30 + 	or	r1,r5
  562.31 +	swap.w	r5,r1
  562.32 +
  562.33 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
   563.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   563.2 +++ b/patches/glibc/2.3.6/glibc-2.3.6-allow-gcc-4.0-arm.patch	Sat Feb 24 11:00:05 2007 +0000
   563.3 @@ -0,0 +1,35 @@
   563.4 +Fixes
   563.5 +In file included from dynamic-link.h:22,
   563.6 +                 from dl-reloc.c:265:
   563.7 +../sysdeps/arm/dl-machine.h: In function '_dl_relocate_object':
   563.8 +../sysdeps/arm/dl-machine.h:371: error: invalid storage class for function 'fix_bad_pc24'
   563.9 +make[2]: Leaving directory `/home/dank/queue/jobdir.k8/crosstool-dev/build/arm-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.6/glibc-2.3.6/elf'
  563.10 +
  563.11 +when building glibc-2.3.6 with gcc-4.0
  563.12 +
  563.13 +Like
  563.14 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/arm/dl-machine.h.diff?r1=1.51&r2=1.52&cvsroot=glibc
  563.15 +but fixes fix_bad_pc24.
  563.16 +
  563.17 +
  563.18 +--- glibc-2.3.6-orig/sysdeps/arm/dl-machine.h	Sun Mar 20 17:54:37 2005
  563.19 ++++ glibc-2.3.6/sysdeps/arm/dl-machine.h	Sun Mar 20 17:57:32 2005
  563.20 +@@ -357,7 +357,14 @@
  563.21 + #ifdef RESOLVE
  563.22 + 
  563.23 + /* Deal with an out-of-range PC24 reloc.  */
  563.24 +-static Elf32_Addr
  563.25 ++#if __GNUC__ >= 4
  563.26 ++  auto inline Elf32_Addr
  563.27 ++#else
  563.28 ++  static inline Elf32_Addr
  563.29 ++#endif
  563.30 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  563.31 ++  __attribute ((always_inline))
  563.32 ++#endif
  563.33 + fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
  563.34 + {
  563.35 +   static void *fix_page;
  563.36 +
  563.37 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
  563.38 +with a little editing by dank@kegel.com
   564.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   564.2 +++ b/patches/glibc/2.3.6/glibc-2.3.6-allow-gcc-4.0-elf.patch	Sat Feb 24 11:00:05 2007 +0000
   564.3 @@ -0,0 +1,67 @@
   564.4 +From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
   564.5 +Fixes
   564.6 +  rtld.c: In function '_dl_start':
   564.7 +  dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
   564.8 +  dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
   564.9 +when compiling glibc-2.3.4 with gcc-4.0
  564.10 +
  564.11 +But see also
  564.12 +http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
  564.13 +and
  564.14 +http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
  564.15 +which seem to propose less radical fixes?
  564.16 +
  564.17 +Aha.  See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
  564.18 +
  564.19 +--- glibc-2.3.6.orig/elf/dynamic-link.h	2005-03-12 18:12:37.000000000 -0800
  564.20 ++++ glibc-2.3.6/elf/dynamic-link.h	2005-03-12 18:12:59.777820848 -0800
  564.21 +@@ -19,47 +19,6 @@
  564.22 + 
  564.23 + #include <elf.h>
  564.24 + #include <assert.h>
  564.25 +-
  564.26 +-#ifdef RESOLVE
  564.27 +-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
  564.28 +-   ElfW(Addr), because not all architectures can assume that the
  564.29 +-   relocated address is properly aligned, whereas the compiler is
  564.30 +-   entitled to assume that a pointer to a type is properly aligned for
  564.31 +-   the type.  Even if we cast the pointer back to some other type with
  564.32 +-   less strict alignment requirements, the compiler might still
  564.33 +-   remember that the pointer was originally more aligned, thereby
  564.34 +-   optimizing away alignment tests or using word instructions for
  564.35 +-   copying memory, breaking the very code written to handle the
  564.36 +-   unaligned cases.  */
  564.37 +-# if ! ELF_MACHINE_NO_REL
  564.38 +-auto inline void __attribute__((always_inline))
  564.39 +-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
  564.40 +-		 const ElfW(Sym) *sym, const struct r_found_version *version,
  564.41 +-		 void *const reloc_addr);
  564.42 +-auto inline void __attribute__((always_inline))
  564.43 +-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
  564.44 +-			  void *const reloc_addr);
  564.45 +-# endif
  564.46 +-# if ! ELF_MACHINE_NO_RELA
  564.47 +-auto inline void __attribute__((always_inline))
  564.48 +-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
  564.49 +-		  const ElfW(Sym) *sym, const struct r_found_version *version,
  564.50 +-		  void *const reloc_addr);
  564.51 +-auto inline void __attribute__((always_inline))
  564.52 +-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
  564.53 +-			   void *const reloc_addr);
  564.54 +-# endif
  564.55 +-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
  564.56 +-auto inline void __attribute__((always_inline))
  564.57 +-elf_machine_lazy_rel (struct link_map *map,
  564.58 +-		      ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
  564.59 +-# else
  564.60 +-auto inline void __attribute__((always_inline))
  564.61 +-elf_machine_lazy_rel (struct link_map *map,
  564.62 +-		      ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
  564.63 +-# endif
  564.64 +-#endif
  564.65 +-
  564.66 + #include <dl-machine.h>
  564.67 + 
  564.68 + #ifndef VERSYMIDX
  564.69 +
  564.70 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
   565.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   565.2 +++ b/patches/glibc/2.3.6/glibc-2.3.6-configure-apple-as.patch	Sat Feb 24 11:00:05 2007 +0000
   565.3 @@ -0,0 +1,25 @@
   565.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
   565.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
   565.6 +
   565.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
   565.8 +where the assembler but doesn't understand the --version flag.
   565.9 +
  565.10 +Fixes the symptom
  565.11 +checking whether ld is GNU ld... no
  565.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
  565.13 +checking version of /usr/libexec/gcc/darwin/ppc/as... 
  565.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
  565.15 +
  565.16 +--- glibc-2.3.2/configure~	Wed Feb 26 09:20:48 2003
  565.17 ++++ glibc-2.3.2/configure	Fri Feb 27 13:12:53 2004
  565.18 +@@ -3914,7 +3914,7 @@
  565.19 +   # Found it, now check the version.
  565.20 +   echo "$as_me:$LINENO: checking version of $AS" >&5
  565.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
  565.22 +-  ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
  565.23 ++  ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
  565.24 +   case $ac_prog_version in
  565.25 +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
  565.26 +     2.1[3-9]*)
  565.27 +
  565.28 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
   566.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   566.2 +++ b/patches/glibc/2.3.6/glibc-2.3.6-fix-pr631.patch	Sat Feb 24 11:00:05 2007 +0000
   566.3 @@ -0,0 +1,45 @@
   566.4 +From dank@kegel.com
   566.5 +Wed Jun 15 09:12:43 PDT 2005
   566.6 +
   566.7 +Fixes
   566.8 +
   566.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
  566.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
  566.11 +... 53 lines deleted ...
  566.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
  566.13 +collect2: ld returned 1 exit status
  566.14 +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
  566.15 +
  566.16 +when building glibc with --enable-static-nss.
  566.17 +
  566.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
  566.19 +
  566.20 +--- glibc-2.3.5/Makeconfig.old	Wed Jun 15 08:13:12 2005
  566.21 ++++ glibc-2.3.5/Makeconfig	Wed Jun 15 08:13:14 2005
  566.22 +@@ -487,7 +487,7 @@
  566.23 + 
  566.24 + # The static libraries.
  566.25 + ifeq (yes,$(build-static))
  566.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
  566.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
  566.28 + else
  566.29 + ifeq (yes,$(build-shared))
  566.30 + # We can try to link the programs with lib*_pic.a...
  566.31 +--- glibc-2.3.5/elf/Makefile.old	Wed Jun 15 07:46:49 2005
  566.32 ++++ glibc-2.3.5/elf/Makefile	Wed Jun 15 08:14:00 2005
  566.33 +@@ -115,6 +115,13 @@
  566.34 + install-bin-script = ldd
  566.35 + endif
  566.36 + 
  566.37 ++ifeq (yes,$(build-static-nss))
  566.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
  566.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
  566.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
  566.41 ++	     $(resolvobjdir)/libresolv.a
  566.42 ++endif
  566.43 ++
  566.44 + others		= sprof sln
  566.45 + install-bin	= sprof
  566.46 + others-static   = sln
  566.47 +
  566.48 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
   567.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   567.2 +++ b/patches/glibc/2.3.6/glibc-fp-byteorder.patch	Sat Feb 24 11:00:05 2007 +0000
   567.3 @@ -0,0 +1,205 @@
   567.4 +Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
   567.5 +Author: addsub@eyou.com
   567.6 +Target: ARM
   567.7 +
   567.8 +Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
   567.9 +and makes printf("%f", 1.0) work.
  567.10 +
  567.11 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
  567.12 + It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
  567.13 + is broken' on my big-endian hardfloat FPA ARM platform. ...
  567.14 + It's definitely needed for hardfloat.  So I'd think it's needed for
  567.15 + big-endian systems in any case, and for VFP on little-endian systems
  567.16 + too.  Someone would have to verify that though.
  567.17 +
  567.18 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
  567.19 + I just had a look at glibc-20040830, and [this patch] is still needed and useful
  567.20 + for this version.  glibc-20040830 out-of-the-box still contains the
  567.21 + following wrong assumptions:
  567.22 + - sysdeps/arm/bits/endian.h: float word order is big endian (which it is
  567.23 +   not on vfp systems)
  567.24 + - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
  567.25 +   are not on big endian systems, neither on vfp systems)
  567.26 + - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
  567.27 +   (which they are not on big endian systems)
  567.28 + [This patch] seems the right solution for all of these issues.
  567.29 +
  567.30 +Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
  567.31 + It's even needed for glibc CVS, AFAICS.
  567.32 + The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
  567.33 + (currently at version 1.4) is only needed for proper VFP operation.
  567.34 + But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
  567.35 + that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
  567.36 + for proper operation of *any* FP model on big endian ARM.
  567.37 +
  567.38 +See also discussion in followups to
  567.39 +http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
  567.40 +
  567.41 +Message-ID: <276985760.37584@eyou.com>
  567.42 +Received: from unknown (HELO eyou.com) (172.16.2.2)
  567.43 + by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
  567.44 +Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
  567.45 +Date: 17 Feb 2004 10:42:38 +0800
  567.46 +Message-ID: <20040217104238.8237.qmail@eyou.com>
  567.47 +From: "add" <addsub@eyou.com>
  567.48 +To: dank@kegel.com
  567.49 +Reply-To: "add" <addsub@eyou.com>
  567.50 +Subject: Re:&nbsp;&nbsp;&nbsp;problem&nbsp;while&nbsp;building&nbsp;arm&nbsp;vfp&nbsp;softfloat&nbsp;gcc&nbsp;`
  567.51 +
  567.52 +Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
  567.53 +toolchain can printf("%f\n",1.0). So you may have a try of this
  567.54 +
  567.55 +
  567.56 +diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
  567.57 +--- glibc.old/sysdeps/arm/bits/endian.h	1999-04-12 11:59:13.000000000 -0400
  567.58 ++++ glibc.new/sysdeps/arm/bits/endian.h	2004-02-12 09:15:13.000000000 -0500
  567.59 +@@ -9,4 +9,9 @@
  567.60 + #else
  567.61 + #define __BYTE_ORDER __LITTLE_ENDIAN
  567.62 + #endif
  567.63 ++
  567.64 ++#ifdef __VFP_FP__
  567.65 ++#define __FLOAT_WORD_ORDER __BYTE_ORDER
  567.66 ++#else
  567.67 + #define __FLOAT_WORD_ORDER __BIG_ENDIAN
  567.68 ++#endif
  567.69 +diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
  567.70 +--- glibc.old/sysdeps/arm/gmp-mparam.h	2001-07-07 15:21:19.000000000 -0400
  567.71 ++++ glibc.new/sysdeps/arm/gmp-mparam.h	2004-02-12 09:15:13.000000000 -0500
  567.72 +@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
  567.73 + #define BITS_PER_SHORTINT 16
  567.74 + #define BITS_PER_CHAR 8
  567.75 + 
  567.76 +-#define IEEE_DOUBLE_BIG_ENDIAN 0
  567.77 +-#define IEEE_DOUBLE_MIXED_ENDIAN 1
  567.78 ++#if defined(__ARMEB__)
  567.79 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
  567.80 ++# define IEEE_DOUBLE_BIG_ENDIAN 1
  567.81 ++#elif defined(__VFP_FP__)
  567.82 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
  567.83 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
  567.84 ++#else
  567.85 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
  567.86 ++# define IEEE_DOUBLE_MIXED_ENDIAN 1
  567.87 ++#endif
  567.88 +diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
  567.89 +--- glibc.old/sysdeps/arm/ieee754.h	2001-07-07 15:21:19.000000000 -0400
  567.90 ++++ glibc.new/sysdeps/arm/ieee754.h	1969-12-31 19:00:00.000000000 -0500
  567.91 +@@ -1,115 +0,0 @@
  567.92 +-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
  567.93 +-   This file is part of the GNU C Library.
  567.94 +-
  567.95 +-   The GNU C Library is free software; you can redistribute it and/or
  567.96 +-   modify it under the terms of the GNU Lesser General Public
  567.97 +-   License as published by the Free Software Foundation; either
  567.98 +-   version 2.1 of the License, or (at your option) any later version.
  567.99 +-
 567.100 +-   The GNU C Library is distributed in the hope that it will be useful,
 567.101 +-   but WITHOUT ANY WARRANTY; without even the implied warranty of
 567.102 +-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 567.103 +-   Lesser General Public License for more details.
 567.104 +-
 567.105 +-   You should have received a copy of the GNU Lesser General Public
 567.106 +-   License along with the GNU C Library; if not, write to the Free
 567.107 +-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 567.108 +-   02111-1307 USA.  */
 567.109 +-
 567.110 +-#ifndef _IEEE754_H
 567.111 +-
 567.112 +-#define _IEEE754_H 1
 567.113 +-#include <features.h>
 567.114 +-
 567.115 +-#include <endian.h>
 567.116 +-
 567.117 +-__BEGIN_DECLS
 567.118 +-
 567.119 +-union ieee754_float
 567.120 +-  {
 567.121 +-    float f;
 567.122 +-
 567.123 +-    /* This is the IEEE 754 single-precision format.  */
 567.124 +-    struct
 567.125 +-      {
 567.126 +-	unsigned int mantissa:23;
 567.127 +-	unsigned int exponent:8;
 567.128 +-	unsigned int negative:1;
 567.129 +-      } ieee;
 567.130 +-
 567.131 +-    /* This format makes it easier to see if a NaN is a signalling NaN.  */
 567.132 +-    struct
 567.133 +-      {
 567.134 +-	unsigned int mantissa:22;
 567.135 +-	unsigned int quiet_nan:1;
 567.136 +-	unsigned int exponent:8;
 567.137 +-	unsigned int negative:1;
 567.138 +-      } ieee_nan;
 567.139 +-  };
 567.140 +-
 567.141 +-#define IEEE754_FLOAT_BIAS	0x7f /* Added to exponent.  */
 567.142 +-
 567.143 +-
 567.144 +-union ieee754_double
 567.145 +-  {
 567.146 +-    double d;
 567.147 +-
 567.148 +-    /* This is the IEEE 754 double-precision format.  */
 567.149 +-    struct
 567.150 +-      {
 567.151 +-	unsigned int mantissa0:20;
 567.152 +-	unsigned int exponent:11;
 567.153 +-	unsigned int negative:1;
 567.154 +-	unsigned int mantissa1:32;
 567.155 +-      } ieee;
 567.156 +-
 567.157 +-    /* This format makes it easier to see if a NaN is a signalling NaN.  */
 567.158 +-    struct
 567.159 +-      {
 567.160 +-	unsigned int mantissa0:19;
 567.161 +-	unsigned int quiet_nan:1;
 567.162 +-	unsigned int exponent:11;
 567.163 +-	unsigned int negative:1;
 567.164 +-	unsigned int mantissa1:32;
 567.165 +-      } ieee_nan;
 567.166 +-  };
 567.167 +-
 567.168 +-#define IEEE754_DOUBLE_BIAS	0x3ff /* Added to exponent.  */
 567.169 +-
 567.170 +-
 567.171 +-/* The following two structures are correct for `new' floating point systems but
 567.172 +-   wrong for the old FPPC.  The only solution seems to be to avoid their use on
 567.173 +-   old hardware.  */
 567.174 +-
 567.175 +-union ieee854_long_double
 567.176 +-  {
 567.177 +-    long double d;
 567.178 +-
 567.179 +-    /* This is the IEEE 854 double-extended-precision format.  */
 567.180 +-    struct
 567.181 +-      {
 567.182 +-	unsigned int exponent:15;
 567.183 +-	unsigned int empty:16;
 567.184 +-	unsigned int negative:1;
 567.185 +-	unsigned int mantissa1:32;
 567.186 +-	unsigned int mantissa0:32;
 567.187 +-      } ieee;
 567.188 +-
 567.189 +-    /* This is for NaNs in the IEEE 854 double-extended-precision format.  */
 567.190 +-    struct
 567.191 +-      {
 567.192 +-	unsigned int exponent:15;
 567.193 +-	unsigned int empty:16;
 567.194 +-	unsigned int negative:1;
 567.195 +-	unsigned int mantissa1:32;
 567.196 +-	unsigned int mantissa0:30;
 567.197 +-	unsigned int quiet_nan:1;
 567.198 +-	unsigned int one:1;
 567.199 +-      } ieee_nan;
 567.200 +-  };
 567.201 +-
 567.202 +-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
 567.203 +-
 567.204 +-__END_DECLS
 567.205 +-
 567.206 +-#endif /* ieee754.h */
 567.207 +
 567.208 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
   568.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   568.2 +++ b/patches/glibc/2.3.6/glibc-mips-bootstrap-gcc-header-install.patch	Sat Feb 24 11:00:05 2007 +0000
   568.3 @@ -0,0 +1,37 @@
   568.4 +http://sourceware.org/ml/crossgcc/2005-05/msg00165.html
   568.5 +Fixes a MIPS build problem (unrelated to NPTL)
   568.6 +
   568.7 +Message-ID: <428E8B24.1000201@realitydiluted.com>
   568.8 +Date: Fri, 20 May 2005 20:13:08 -0500
   568.9 +From: "Steven J dot  Hill" <sjhill at realitydiluted dot com>
  568.10 +To:  crossgcc at sources dot redhat dot com,  toolchain at gentoo dot org, 
  568.11 + Shay_Gal-On at pmc-sierra dot com,  TheNop at gmx dot net
  568.12 +Subject: New NPTL patches for crosstools and MIPS NPTL patches....
  568.13 +
  568.14 +Greetings.
  568.15 +
  568.16 +I have uploaded the latest NPTL patch for crosstool-0.34. I have also
  568.17 +uploaded a tarball of the patches necessary to build a MIPS NPTL
  568.18 +cross toolchain. To build a MIPS NPTL toolchain you will need the
  568.19 +released version of binutils-2.16 and the absolute latest GCC and
  568.20 +glibc code from the HEAD of cvs. Use the 'demo-mips-nptl.sh' script
  568.21 +to build the toolchain. Please report bugs or issues to the crossgcc
  568.22 +mailing list. Here is the link off of my FTP site:
  568.23 +
  568.24 +    ftp://ftp.realitydiluted.com/crosstools/crosstool-0.34/
  568.25 +
  568.26 +[Note: BOOTSTRAP_GCC is set by crosstool.sh when invoking make install-headers]
  568.27 +
  568.28 +diff -ur glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile
  568.29 +--- glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile	2003-03-29 02:15:28.000000000 -0600
  568.30 ++++ glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile	2005-04-12 21:36:51.318837655 -0500
  568.31 +@@ -1,3 +1,7 @@
  568.32 ++ifeq ($(filter -DBOOTSTRAP_GCC,$(CFLAGS)),)
  568.33 + ifeq ($(filter -mabi=32,$(CC)),)
  568.34 + CC += -mabi=32
  568.35 + endif
  568.36 ++else
  568.37 ++CC += -D"_MIPS_SZPTR=32"
  568.38 ++endif
  568.39 +
  568.40 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
   569.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   569.2 +++ b/patches/glibc/2.3.6/make-install-lib-all.patch	Sat Feb 24 11:00:05 2007 +0000
   569.3 @@ -0,0 +1,26 @@
   569.4 +From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
   569.5 +Rule to install all needed libraries, not just the ones installed by install-lib,
   569.6 +yet not install programs.  
   569.7 +Needed because we can't use the main install target, as we can't build programs before
   569.8 +we have the final gcc installed; linking fails because libeh.a is not present,
   569.9 +and glibc insists on linking programs with that library.
  569.10 +
  569.11 +diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
  569.12 +--- glibc-2.3.4.orig/Makerules	2004-12-15 20:52:39.000000000 +0200
  569.13 ++++ glibc-2.3.4/Makerules	2005-02-19 15:16:31.415125176 +0200
  569.14 +@@ -844,6 +844,13 @@
  569.15 + installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
  569.16 + 			     $(inst_libdir)/$(patsubst %,$(libtype$o),\
  569.17 + 						     $(libprefix)$(libc-name)))
  569.18 ++
  569.19 ++install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
  569.20 ++		$(inst_slibdir)/libc-$(version).so \
  569.21 ++		$(inst_libdir)/libc.so \
  569.22 ++		$(inst_libdir)/libc.a \
  569.23 ++		install-lib
  569.24 ++
  569.25 + install: $(installed-libcs)
  569.26 + $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
  569.27 + 	$(make-target-directory)
  569.28 +
  569.29 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
   570.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   570.2 +++ b/patches/glibc/2.3.6/maybe/glibc-2.3.6-allow-gcc-4.0-powerpc32.patch	Sat Feb 24 11:00:05 2007 +0000
   570.3 @@ -0,0 +1,45 @@
   570.4 +Fixes
   570.5 +
   570.6 +../sysdeps/powerpc/powerpc32/dl-machine.h: In function '_dl_relocate_object':
   570.7 +../sysdeps/powerpc/powerpc32/dl-machine.h:461: error: invalid storage class for function 'elf_machine_rela_relative'
   570.8 +../sysdeps/powerpc/powerpc32/dl-machine.h:469: error: invalid storage class for function 'elf_machine_lazy_rel'
   570.9 +make[2]: *** [/home/dank/queue/jobdir.dual2/crosstool-dev/build/powerpc-750-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/build-glibc/elf/dl-reloc.o] Error 1
  570.10 +
  570.11 +--- glibc-2.3.6.orig/sysdeps/powerpc/powerpc32/dl-machine.h	Wed Jul 30 23:33:52 2003
  570.12 ++++ glibc-2.3.6/sysdeps/powerpc/powerpc32/dl-machine.h		Thu Mar 17 13:19:16 2005
  570.13 +@@ -455,8 +455,14 @@
  570.14 +     }
  570.15 + }
  570.16 + 
  570.17 +-auto inline void
  570.18 +-__attribute__ ((always_inline))
  570.19 ++#if __GNUC__ >= 4
  570.20 ++  auto inline void
  570.21 ++#else
  570.22 ++  static inline void
  570.23 ++#endif
  570.24 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  570.25 ++  __attribute ((always_inline))
  570.26 ++#endif
  570.27 + elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
  570.28 + 			   void *const reloc_addr_arg)
  570.29 + {
  570.30 +@@ -464,8 +470,14 @@
  570.31 +   *reloc_addr = l_addr + reloc->r_addend;
  570.32 + }
  570.33 + 
  570.34 +-auto inline void
  570.35 +-__attribute__ ((always_inline))
  570.36 ++#if __GNUC__ >= 4
  570.37 ++  auto inline void
  570.38 ++#else
  570.39 ++  static inline void
  570.40 ++#endif
  570.41 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  570.42 ++  __attribute ((always_inline))
  570.43 ++#endif
  570.44 + elf_machine_lazy_rel (struct link_map *map,
  570.45 + 		      Elf32_Addr l_addr, const Elf32_Rela *reloc)
  570.46 + {
  570.47 +
  570.48 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
   571.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   571.2 +++ b/patches/glibc/2.3.6/maybe/glibc-2.3.6-allow-gcc-4.0-powerpc64.patch	Sat Feb 24 11:00:05 2007 +0000
   571.3 @@ -0,0 +1,65 @@
   571.4 +Fixes:
   571.5 +
   571.6 +In file included from dynamic-link.h:22,
   571.7 +                 from dl-reloc.c:269:
   571.8 +../sysdeps/powerpc/powerpc64/dl-machine.h: In function '_dl_relocate_object':
   571.9 +../sysdeps/powerpc/powerpc64/dl-machine.h:573: error: invalid storage class for function 'elf_machine_rela_relative'
  571.10 +../sysdeps/powerpc/powerpc64/dl-machine.h:607: error: invalid storage class for function 'elf_machine_rela'
  571.11 +../sysdeps/powerpc/powerpc64/dl-machine.h:889: error: invalid storage class for function 'elf_machine_lazy_rel'
  571.12 +make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/powerpc64-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/glibc-2.3-20050307/elf'
  571.13 +
  571.14 +--- glibc-2.3.6.orig/sysdeps/powerpc/powerpc64/dl-machine.h	Thu Mar 17 13:35:23 2005
  571.15 ++++ glibc-2.3.6/sysdeps/powerpc/powerpc64/dl-machine.h		Thu Mar 17 13:37:12 2005
  571.16 +@@ -567,8 +567,14 @@
  571.17 +                                 const Elf64_Sym *refsym)
  571.18 +                                 attribute_hidden;
  571.19 + 
  571.20 +-auto inline void
  571.21 +-__attribute__ ((always_inline))
  571.22 ++#if __GNUC__ >= 4
  571.23 ++  auto inline void
  571.24 ++#else
  571.25 ++  static inline void
  571.26 ++#endif
  571.27 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  571.28 ++  __attribute ((always_inline))
  571.29 ++#endif
  571.30 + elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
  571.31 + 			   void *const reloc_addr_arg)
  571.32 + {
  571.33 +@@ -599,8 +605,14 @@
  571.34 + 
  571.35 + /* Perform the relocation specified by RELOC and SYM (which is fully
  571.36 +    resolved).  MAP is the object containing the reloc.  */
  571.37 +-auto inline void
  571.38 +-__attribute__ ((always_inline))
  571.39 ++#if __GNUC__ >= 4
  571.40 ++  auto inline void
  571.41 ++#else
  571.42 ++  static inline void
  571.43 ++#endif
  571.44 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  571.45 ++  __attribute ((always_inline))
  571.46 ++#endif
  571.47 + elf_machine_rela (struct link_map *map,
  571.48 + 		  const Elf64_Rela *reloc,
  571.49 + 		  const Elf64_Sym *sym,
  571.50 +@@ -885,8 +897,14 @@
  571.51 +   MODIFIED_CODE_NOQUEUE (reloc_addr);
  571.52 + }
  571.53 + 
  571.54 +-auto inline void
  571.55 +-__attribute__ ((always_inline))
  571.56 ++#if __GNUC__ >= 4
  571.57 ++  auto inline void
  571.58 ++#else
  571.59 ++  static inline void
  571.60 ++#endif
  571.61 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  571.62 ++  __attribute ((always_inline))
  571.63 ++#endif
  571.64 + elf_machine_lazy_rel (struct link_map *map,
  571.65 + 		      Elf64_Addr l_addr, const Elf64_Rela *reloc)
  571.66 + {
  571.67 +
  571.68 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
   572.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   572.2 +++ b/patches/glibc/20040827/arm-ctl_bus_isa.patch	Sat Feb 24 11:00:05 2007 +0000
   572.3 @@ -0,0 +1,51 @@
   572.4 +Applies to both glibc-2.2.5 and glibc-2.3.2, and probably glibc cvs as of Aug 2004.
   572.5 +Needed to build glibc with linux kernels 2.4.23 or higher on ARM, 
   572.6 +Fixes following error:
   572.7 +
   572.8 +../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
   572.9 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
  572.10 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
  572.11 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
  572.12 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
  572.13 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
  572.14 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
  572.15 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
  572.16 +make[2]: *** [/home/dank/crosstool-0.28/build/arm-softfloat-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/misc/ioperm.o] Error 1
  572.17 +
  572.18 +cf. "[SYSCTL] BUS_ISA -> CTL_BUS_ISA",  http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html
  572.19 +
  572.20 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c.old	2003-02-20 14:22:24.000000000 -0800
  572.21 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c	2004-01-31 16:01:50.000000000 -0800
  572.22 +@@ -47,6 +47,12 @@
  572.23 + #include <asm/page.h>
  572.24 + #include <sys/sysctl.h>
  572.25 + 
  572.26 ++/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
  572.27 ++#include <linux/version.h>
  572.28 ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
  572.29 ++#define CTL_BUS_ISA BUS_ISA	/* and hope it's not the one from linux/input.h */
  572.30 ++#endif
  572.31 ++
  572.32 + #define PATH_ARM_SYSTYPE	"/etc/arm_systype"
  572.33 + #define PATH_CPUINFO		"/proc/cpuinfo"
  572.34 + 
  572.35 +@@ -80,7 +86,7 @@
  572.36 +  * Initialize I/O system.  There are several ways to get the information
  572.37 +  * we need.  Each is tried in turn until one succeeds.
  572.38 +  *
  572.39 +- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*).  This is the preferred method
  572.40 ++ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*).  This is the preferred method
  572.41 +  *    but not all kernels support it.
  572.42 +  *
  572.43 +  * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
  572.44 +@@ -100,8 +106,8 @@
  572.45 + {
  572.46 +   char systype[256];
  572.47 +   int i, n;
  572.48 +-  static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
  572.49 +-  static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
  572.50 ++  static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
  572.51 ++  static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
  572.52 +   size_t len = sizeof(io.base);
  572.53 + 
  572.54 +   if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
   573.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   573.2 +++ b/patches/glibc/20040827/glibc-2.3.2-sparc64-dl-machine.patch	Sat Feb 24 11:00:05 2007 +0000
   573.3 @@ -0,0 +1,29 @@
   573.4 +See http://gcc.gnu.org/PR15345
   573.5 +
   573.6 +Quick kludge by H.J.Lu
   573.7 +Works around gcc-3.4.0 error which shows up when building glibc-2.3.2 for sparc64:
   573.8 +
   573.9 +.../sparc64-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/libc.a(dl-reloc.o)(.text+0x4b4): In function `elf_machine_load_address.3':
  573.10 +: undefined reference to `_DYNAMIC'
  573.11 +collect2: ld returned 1 exit status
  573.12 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc10/build/sparc64-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/elf/sln] Error 1
  573.13 +
  573.14 +
  573.15 +--- glibc-2.3.2/sysdeps/sparc/sparc64/dl-machine.h.orig	Sat May  8 20:54:26 2004
  573.16 ++++ glibc-2.3.2/sysdeps/sparc/sparc64/dl-machine.h	Sat May  8 17:18:04 2004
  573.17 +@@ -65,6 +65,7 @@
  573.18 + }
  573.19 + 
  573.20 + /* Return the run-time load address of the shared object.  */
  573.21 ++#ifdef IS_IN_rtld
  573.22 + static inline Elf64_Addr
  573.23 + elf_machine_load_address (void)
  573.24 + {
  573.25 +@@ -84,6 +85,7 @@
  573.26 +      pc[3]*4 is l_addr + _GLOBAL_OFFSET_TABLE_ - (long)pc - 12  */
  573.27 +   return (Elf64_Addr) got - *got + (Elf32_Sword) ((pc[2] - pc[3]) * 4) - 4;
  573.28 + }
  573.29 ++#endif
  573.30 + 
  573.31 + /* We have 4 cases to handle.  And we code different code sequences
  573.32 +    for each one.  I love V9 code models...  */
   574.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   574.2 +++ b/patches/glibc/20040827/glibc-2.3.3-cygwin.patch	Sat Feb 24 11:00:05 2007 +0000
   574.3 @@ -0,0 +1,103 @@
   574.4 +Fixes
   574.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
   574.6 +...
   574.7 +when building glibc-2.3.3 on cygwin
   574.8 +
   574.9 +Idea from
  574.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
  574.11 +Basically, make glibc use .oST as suffix for 'object static'
  574.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
  574.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
  574.14 +
  574.15 +glibc-linuxthreads-2.3.3 also requires a patch, see 
  574.16 +../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
  574.17 +
  574.18 +[ Rediffed against glibc-2.3.3 ]
  574.19 +
  574.20 +
  574.21 +diff -aur glibc-2.3.3/Makeconfig glibc-2.3.3-cygwin/Makeconfig
  574.22 +--- glibc-2.3.3/Makeconfig	2003-09-17 01:36:10.000000000 -0700
  574.23 ++++ glibc-2.3.3-cygwin/Makeconfig	2004-08-27 20:34:43.000000000 -0700
  574.24 +@@ -439,13 +439,13 @@
  574.25 + # run the linked programs.
  574.26 + link-libc = -Wl,-rpath-link=$(rpath-link) \
  574.27 + 	    $(common-objpfx)libc.so$(libc.so-version) \
  574.28 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
  574.29 ++	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
  574.30 + # This is how to find at build-time things that will be installed there.
  574.31 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
  574.32 + else
  574.33 + ifneq (,$(filter aix aix%,$(config-os)))
  574.34 + link-libc = $(common-objpfx)libc.a \
  574.35 +-	    $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
  574.36 ++	    $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
  574.37 + rpath-dirs = math dlfcn nss nis rt resolv crypt
  574.38 + endif
  574.39 + endif
  574.40 +@@ -658,7 +658,7 @@
  574.41 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
  574.42 + # to pass different flags for each flavor.
  574.43 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
  574.44 +-all-object-suffixes := .o .os .op .og .ob .oS
  574.45 ++all-object-suffixes := .o .os .op .og .ob .oST
  574.46 + object-suffixes :=
  574.47 + CPPFLAGS-.o = $(pic-default)
  574.48 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
  574.49 +@@ -714,14 +714,14 @@
  574.50 + 
  574.51 + ifeq (yes,$(build-shared))
  574.52 + # Build special library that contains the static-only routines for libc.
  574.53 +-object-suffixes-for-libc += .oS
  574.54 ++object-suffixes-for-libc += .oST
  574.55 + 
  574.56 + # Must build the routines as PIC, though, because they can end up in (users')
  574.57 + # shared objects.  We don't want to use CFLAGS-os because users may, for
  574.58 + # example, make that processor-specific.
  574.59 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
  574.60 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
  574.61 +-libtype.oS = lib%_nonshared.a
  574.62 ++CFLAGS-.oST = $(CFLAGS-.o) $(pic-ccflag)
  574.63 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
  574.64 ++libtype.oST = lib%_nonshared.a
  574.65 + endif
  574.66 + 
  574.67 + # The assembler can generate debug information too.
  574.68 +diff -aur glibc-2.3.3/Makerules glibc-2.3.3-cygwin/Makerules
  574.69 +--- glibc-2.3.3/Makerules	2003-10-31 16:35:57.000000000 -0800
  574.70 ++++ glibc-2.3.3-cygwin/Makerules	2004-08-27 20:33:47.000000000 -0700
  574.71 +@@ -414,7 +414,7 @@
  574.72 + # Bounded pointer thunks are only built for *.ob
  574.73 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
  574.74 + 
  574.75 +-elide-routines.oS += $(filter-out $(static-only-routines),\
  574.76 ++elide-routines.oST += $(filter-out $(static-only-routines),\
  574.77 + 				  $(routines) $(aux) $(sysdep_routines)) \
  574.78 + 		     $(elide-bp-thunks)
  574.79 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
  574.80 +@@ -934,7 +934,7 @@
  574.81 + install: $(inst_libdir)/libc.so
  574.82 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
  574.83 + 			$(common-objpfx)libc.so$(libc.so-version) \
  574.84 +-			$(inst_libdir)/$(patsubst %,$(libtype.oS),\
  574.85 ++			$(inst_libdir)/$(patsubst %,$(libtype.oST),\
  574.86 + 						  $(libprefix)$(libc-name)) \
  574.87 + 			$(+force)
  574.88 + 	(echo '/* GNU ld script';\
  574.89 +@@ -942,7 +942,7 @@
  574.90 + 	 echo '   the static library, so try that secondarily.  */';\
  574.91 + 	 cat $<; \
  574.92 + 	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
  574.93 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
  574.94 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
  574.95 + 	      ')' \
  574.96 + 	) > $@.new
  574.97 + 	mv -f $@.new $@
  574.98 +diff -aur glibc-2.3.3/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.3-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
  574.99 +--- glibc-2.3.3/sysdeps/sparc/sparc32/sparcv9/Makefile	2002-08-29 03:41:15.000000000 -0700
 574.100 ++++ glibc-2.3.3-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile	2004-08-27 20:35:43.000000000 -0700
 574.101 +@@ -10,4 +10,4 @@
 574.102 + ASFLAGS-.op += -Wa,-Av9a
 574.103 + ASFLAGS-.og += -Wa,-Av9a
 574.104 + ASFLAGS-.ob += -Wa,-Av9a
 574.105 +-ASFLAGS-.oS += -Wa,-Av9a
 574.106 ++ASFLAGS-.oST += -Wa,-Av9a
   575.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   575.2 +++ b/patches/glibc/20040827/glibc-2.3.3-libeh-kludge.patch	Sat Feb 24 11:00:05 2007 +0000
   575.3 @@ -0,0 +1,26 @@
   575.4 +wget "http://sources.redhat.com/cgi-bin/get-raw-msg?listname=libc-alpha&date=2003-09&msgid=20030911190500.GE12344%40sunsite.ms.mff.cuni.cz"
   575.5 +aka http://sources.redhat.com/ml/libc-alpha/2003-09/msg00104.html
   575.6 +
   575.7 +This seems to fix the error
   575.8 +   gcc-3.4.1-glibc-2.3.3/lib/gcc/powerpc-7400-linux-gnu/3.4.1/../../../../powerpc-7400-linux-gnu/bin/ld: cannot find -lgcc_eh
   575.9 +   make[1]: *** [build/powerpc-7400-linux-gnu/gcc-3.4.1-glibc-2.3.3/build-glibc/libc.so] Error 1
  575.10 +but I assume it will cause trouble with nptl, since it's so violent
  575.11 +
  575.12 +FIXME: once we figure out why this patch is wrong, fix it right :-)
  575.13 +
  575.14 +Rediffed against glibc-20040822
  575.15 +
  575.16 +
  575.17 +--- glibc-20040822/Makeconfig.orig	2004-08-04 20:34:28.000000000 -0700
  575.18 ++++ glibc-20040822/Makeconfig	2004-08-24 07:36:49.000000000 -0700
  575.19 +@@ -527,8 +527,8 @@
  575.20 +  libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) -Wl,--no-as-needed
  575.21 + endif
  575.22 + ifneq ($(have-cc-with-libunwind),yes)
  575.23 +- gnulib := -lgcc $(libgcc_eh)
  575.24 +- static-gnulib := -lgcc -lgcc_eh
  575.25 ++ gnulib := -lgcc 
  575.26 ++ static-gnulib := -lgcc 
  575.27 + else
  575.28 +  gnulib := -lgcc $(libgcc_eh) -lunwind
  575.29 +  static-gnulib := -lgcc -lgcc_eh -lunwind
   576.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   576.2 +++ b/patches/glibc/20040827/glibc-configure-apple-as.patch	Sat Feb 24 11:00:05 2007 +0000
   576.3 @@ -0,0 +1,23 @@
   576.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
   576.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
   576.6 +
   576.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
   576.8 +where the assembler but doesn't understand the --version flag.
   576.9 +
  576.10 +Fixes the symptom
  576.11 +checking whether ld is GNU ld... no
  576.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
  576.13 +checking version of /usr/libexec/gcc/darwin/ppc/as... 
  576.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
  576.15 +
  576.16 +--- glibc-2.3.2/configure~	Wed Feb 26 09:20:48 2003
  576.17 ++++ glibc-2.3.2/configure	Fri Feb 27 13:12:53 2004
  576.18 +@@ -3789,7 +3789,7 @@
  576.19 +   # Found it, now check the version.
  576.20 +   echo "$as_me:$LINENO: checking version of $AS" >&5
  576.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
  576.22 +-  ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
  576.23 ++  ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
  576.24 +   case $ac_prog_version in
  576.25 +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
  576.26 +     2.1[3-9]*)
   577.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   577.2 +++ b/patches/glibc/20040827/glibc-fp-byteorder.patch	Sat Feb 24 11:00:05 2007 +0000
   577.3 @@ -0,0 +1,203 @@
   577.4 +Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
   577.5 +Author: addsub@eyou.com
   577.6 +Target: ARM
   577.7 +
   577.8 +Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
   577.9 +and makes printf("%f", 1.0) work.
  577.10 +
  577.11 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
  577.12 + It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
  577.13 + is broken' on my big-endian hardfloat FPA ARM platform. ...
  577.14 + It's definitely needed for hardfloat.  So I'd think it's needed for
  577.15 + big-endian systems in any case, and for VFP on little-endian systems
  577.16 + too.  Someone would have to verify that though.
  577.17 +
  577.18 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
  577.19 + I just had a look at glibc-20040830, and [this patch] is still needed and useful
  577.20 + for this version.  glibc-20040830 out-of-the-box still contains the
  577.21 + following wrong assumptions:
  577.22 + - sysdeps/arm/bits/endian.h: float word order is big endian (which it is
  577.23 +   not on vfp systems)
  577.24 + - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
  577.25 +   are not on big endian systems, neither on vfp systems)
  577.26 + - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
  577.27 +   (which they are not on big endian systems)
  577.28 + [This patch] seems the right solution for all of these issues.
  577.29 +
  577.30 +Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
  577.31 + It's even needed for glibc CVS, AFAICS.
  577.32 + The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
  577.33 + (currently at version 1.4) is only needed for proper VFP operation.
  577.34 + But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
  577.35 + that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
  577.36 + for proper operation of *any* FP model on big endian ARM.
  577.37 +
  577.38 +See also discussion in followups to
  577.39 +http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
  577.40 +
  577.41 +Message-ID: <276985760.37584@eyou.com>
  577.42 +Received: from unknown (HELO eyou.com) (172.16.2.2)
  577.43 + by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
  577.44 +Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
  577.45 +Date: 17 Feb 2004 10:42:38 +0800
  577.46 +Message-ID: <20040217104238.8237.qmail@eyou.com>
  577.47 +From: "add" <addsub@eyou.com>
  577.48 +To: dank@kegel.com
  577.49 +Reply-To: "add" <addsub@eyou.com>
  577.50 +Subject: Re:&nbsp;&nbsp;&nbsp;problem&nbsp;while&nbsp;building&nbsp;arm&nbsp;vfp&nbsp;softfloat&nbsp;gcc&nbsp;`
  577.51 +
  577.52 +Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
  577.53 +toolchain can printf("%f\n",1.0). So you may have a try of this
  577.54 +
  577.55 +
  577.56 +diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
  577.57 +--- glibc.old/sysdeps/arm/bits/endian.h	1999-04-12 11:59:13.000000000 -0400
  577.58 ++++ glibc.new/sysdeps/arm/bits/endian.h	2004-02-12 09:15:13.000000000 -0500
  577.59 +@@ -9,4 +9,9 @@
  577.60 + #else
  577.61 + #define __BYTE_ORDER __LITTLE_ENDIAN
  577.62 + #endif
  577.63 ++
  577.64 ++#ifdef __VFP_FP__
  577.65 ++#define __FLOAT_WORD_ORDER __BYTE_ORDER
  577.66 ++#else
  577.67 + #define __FLOAT_WORD_ORDER __BIG_ENDIAN
  577.68 ++#endif
  577.69 +diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
  577.70 +--- glibc.old/sysdeps/arm/gmp-mparam.h	2001-07-07 15:21:19.000000000 -0400
  577.71 ++++ glibc.new/sysdeps/arm/gmp-mparam.h	2004-02-12 09:15:13.000000000 -0500
  577.72 +@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
  577.73 + #define BITS_PER_SHORTINT 16
  577.74 + #define BITS_PER_CHAR 8
  577.75 + 
  577.76 +-#define IEEE_DOUBLE_BIG_ENDIAN 0
  577.77 +-#define IEEE_DOUBLE_MIXED_ENDIAN 1
  577.78 ++#if defined(__ARMEB__)
  577.79 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
  577.80 ++# define IEEE_DOUBLE_BIG_ENDIAN 1
  577.81 ++#elif defined(__VFP_FP__)
  577.82 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
  577.83 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
  577.84 ++#else
  577.85 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
  577.86 ++# define IEEE_DOUBLE_MIXED_ENDIAN 1
  577.87 ++#endif
  577.88 +diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
  577.89 +--- glibc.old/sysdeps/arm/ieee754.h	2001-07-07 15:21:19.000000000 -0400
  577.90 ++++ glibc.new/sysdeps/arm/ieee754.h	1969-12-31 19:00:00.000000000 -0500
  577.91 +@@ -1,115 +0,0 @@
  577.92 +-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
  577.93 +-   This file is part of the GNU C Library.
  577.94 +-
  577.95 +-   The GNU C Library is free software; you can redistribute it and/or
  577.96 +-   modify it under the terms of the GNU Lesser General Public
  577.97 +-   License as published by the Free Software Foundation; either
  577.98 +-   version 2.1 of the License, or (at your option) any later version.
  577.99 +-
 577.100 +-   The GNU C Library is distributed in the hope that it will be useful,
 577.101 +-   but WITHOUT ANY WARRANTY; without even the implied warranty of
 577.102 +-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 577.103 +-   Lesser General Public License for more details.
 577.104 +-
 577.105 +-   You should have received a copy of the GNU Lesser General Public
 577.106 +-   License along with the GNU C Library; if not, write to the Free
 577.107 +-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 577.108 +-   02111-1307 USA.  */
 577.109 +-
 577.110 +-#ifndef _IEEE754_H
 577.111 +-
 577.112 +-#define _IEEE754_H 1
 577.113 +-#include <features.h>
 577.114 +-
 577.115 +-#include <endian.h>
 577.116 +-
 577.117 +-__BEGIN_DECLS
 577.118 +-
 577.119 +-union ieee754_float
 577.120 +-  {
 577.121 +-    float f;
 577.122 +-
 577.123 +-    /* This is the IEEE 754 single-precision format.  */
 577.124 +-    struct
 577.125 +-      {
 577.126 +-	unsigned int mantissa:23;
 577.127 +-	unsigned int exponent:8;
 577.128 +-	unsigned int negative:1;
 577.129 +-      } ieee;
 577.130 +-
 577.131 +-    /* This format makes it easier to see if a NaN is a signalling NaN.  */
 577.132 +-    struct
 577.133 +-      {
 577.134 +-	unsigned int mantissa:22;
 577.135 +-	unsigned int quiet_nan:1;
 577.136 +-	unsigned int exponent:8;
 577.137 +-	unsigned int negative:1;
 577.138 +-      } ieee_nan;
 577.139 +-  };
 577.140 +-
 577.141 +-#define IEEE754_FLOAT_BIAS	0x7f /* Added to exponent.  */
 577.142 +-
 577.143 +-
 577.144 +-union ieee754_double
 577.145 +-  {
 577.146 +-    double d;
 577.147 +-
 577.148 +-    /* This is the IEEE 754 double-precision format.  */
 577.149 +-    struct
 577.150 +-      {
 577.151 +-	unsigned int mantissa0:20;
 577.152 +-	unsigned int exponent:11;
 577.153 +-	unsigned int negative:1;
 577.154 +-	unsigned int mantissa1:32;
 577.155 +-      } ieee;
 577.156 +-
 577.157 +-    /* This format makes it easier to see if a NaN is a signalling NaN.  */
 577.158 +-    struct
 577.159 +-      {
 577.160 +-	unsigned int mantissa0:19;
 577.161 +-	unsigned int quiet_nan:1;
 577.162 +-	unsigned int exponent:11;
 577.163 +-	unsigned int negative:1;
 577.164 +-	unsigned int mantissa1:32;
 577.165 +-      } ieee_nan;
 577.166 +-  };
 577.167 +-
 577.168 +-#define IEEE754_DOUBLE_BIAS	0x3ff /* Added to exponent.  */
 577.169 +-
 577.170 +-
 577.171 +-/* The following two structures are correct for `new' floating point systems but
 577.172 +-   wrong for the old FPPC.  The only solution seems to be to avoid their use on
 577.173 +-   old hardware.  */
 577.174 +-
 577.175 +-union ieee854_long_double
 577.176 +-  {
 577.177 +-    long double d;
 577.178 +-
 577.179 +-    /* This is the IEEE 854 double-extended-precision format.  */
 577.180 +-    struct
 577.181 +-      {
 577.182 +-	unsigned int exponent:15;
 577.183 +-	unsigned int empty:16;
 577.184 +-	unsigned int negative:1;
 577.185 +-	unsigned int mantissa1:32;
 577.186 +-	unsigned int mantissa0:32;
 577.187 +-      } ieee;
 577.188 +-
 577.189 +-    /* This is for NaNs in the IEEE 854 double-extended-precision format.  */
 577.190 +-    struct
 577.191 +-      {
 577.192 +-	unsigned int exponent:15;
 577.193 +-	unsigned int empty:16;
 577.194 +-	unsigned int negative:1;
 577.195 +-	unsigned int mantissa1:32;
 577.196 +-	unsigned int mantissa0:30;
 577.197 +-	unsigned int quiet_nan:1;
 577.198 +-	unsigned int one:1;
 577.199 +-      } ieee_nan;
 577.200 +-  };
 577.201 +-
 577.202 +-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
 577.203 +-
 577.204 +-__END_DECLS
 577.205 +-
 577.206 +-#endif /* ieee754.h */
   578.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   578.2 +++ b/patches/glibc/20050502/make-install-lib-all.patch	Sat Feb 24 11:00:05 2007 +0000
   578.3 @@ -0,0 +1,24 @@
   578.4 +From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
   578.5 +Rule to install all needed libraries, not just the ones installed by install-lib,
   578.6 +yet not install programs.
   578.7 +Needed because we can't use the main install target, as we can't build programs before
   578.8 +we have the final gcc installed; linking fails because libeh.a is not present,
   578.9 +and glibc insists on linking programs with that library.
  578.10 +
  578.11 +diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
  578.12 +--- glibc-2.3.4.orig/Makerules	2004-12-15 20:52:39.000000000 +0200
  578.13 ++++ glibc-2.3.4/Makerules	2005-02-19 15:16:31.415125176 +0200
  578.14 +@@ -844,6 +844,13 @@
  578.15 + installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
  578.16 + 			     $(inst_libdir)/$(patsubst %,$(libtype$o),\
  578.17 + 						     $(libprefix)$(libc-name)))
  578.18 ++
  578.19 ++install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
  578.20 ++		$(inst_slibdir)/libc-$(version).so \
  578.21 ++		$(inst_libdir)/libc.so \
  578.22 ++		$(inst_libdir)/libc.a \
  578.23 ++		install-lib
  578.24 ++
  578.25 + install: $(installed-libcs)
  578.26 + $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
  578.27 + 	$(make-target-directory)
   579.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   579.2 +++ b/patches/glibc/compat-2.1/rh62-09-glibc-compat-2.1.3-security2.patch	Sat Feb 24 11:00:05 2007 +0000
   579.3 @@ -0,0 +1,66 @@
   579.4 +2002-07-05  Tomohiro Kato <tomop@teamgedoh.net>
   579.5 +
   579.6 +	* glibc-compat/nss_dns/dns-network.c (getanswer_r): Reduce
   579.7 +	linebuflen in parallel to bumping up the buffer pointer.
   579.8 +	* glibc-compat/nss_dns/dns-host.c (getanswer_r): Likewise.
   579.9 +	Compare n with linebuflen instead of buflen.
  579.10 +
  579.11 +2002-07-02  Andreas Schwab  <schwab@suse.de>
  579.12 +
  579.13 +	* resolv/nss_dns/dns-network.c (getanswer_r): Reduce linebuflen
  579.14 +	in parallel to bumping up the buffer pointer.
  579.15 +
  579.16 +--- libc/glibc-compat/nss_dns/dns-network.c.jj	Wed Jan 10 11:58:20 2001
  579.17 ++++ libc/glibc-compat/nss_dns/dns-network.c	Tue Jul  9 10:31:15 2002
  579.18 +@@ -283,7 +283,9 @@ getanswer_r (const querybuf *answer, int
  579.19 + 	    }
  579.20 + 	  cp += n;
  579.21 + 	  *alias_pointer++ = bp;
  579.22 +-	  bp += strlen (bp) + 1;
  579.23 ++	  n = strlen (bp) + 1;
  579.24 ++	  bp += n;
  579.25 ++	  linebuflen -= n;
  579.26 + 	  result->n_addrtype = class == C_IN ? AF_INET : AF_UNSPEC;
  579.27 + 	  ++have_answer;
  579.28 + 	}
  579.29 +--- libc/glibc-compat/nss_dns/dns-host.c.jj	Wed Jan 10 11:58:20 2001
  579.30 ++++ libc/glibc-compat/nss_dns/dns-host.c	Tue Jul  9 10:36:41 2002
  579.31 +@@ -424,7 +424,7 @@ getanswer_r (const querybuf *answer, int
  579.32 + 	  linebuflen -= n;
  579.33 + 	  /* Get canonical name.  */
  579.34 + 	  n = strlen (tbuf) + 1;	/* For the \0.  */
  579.35 +-	  if ((size_t) n > buflen || n >= MAXHOSTNAMELEN)
  579.36 ++	  if ((size_t) n > linebuflen || n >= MAXHOSTNAMELEN)
  579.37 + 	    {
  579.38 + 	      ++had_error;
  579.39 + 	      continue;
  579.40 +@@ -447,7 +447,7 @@ getanswer_r (const querybuf *answer, int
  579.41 + 	  cp += n;
  579.42 + 	  /* Get canonical name. */
  579.43 + 	  n = strlen (tbuf) + 1;   /* For the \0.  */
  579.44 +-	  if ((size_t) n > buflen || n >= MAXHOSTNAMELEN)
  579.45 ++	  if ((size_t) n > linebuflen || n >= MAXHOSTNAMELEN)
  579.46 + 	    {
  579.47 + 	      ++had_error;
  579.48 + 	      continue;
  579.49 +@@ -542,6 +542,7 @@ getanswer_r (const querybuf *answer, int
  579.50 + 	      linebuflen -= nn;
  579.51 + 	    }
  579.52 + 
  579.53 ++	  linebuflen -= sizeof (align) - ((u_long) bp % sizeof (align));
  579.54 + 	  bp += sizeof (align) - ((u_long) bp % sizeof (align));
  579.55 + 
  579.56 + 	  if (n >= linebuflen)
  579.57 +#--- libc/resolv/nss_dns/dns-network.c.jj	Mon Jul  9 14:59:24 2001
  579.58 +#+++ libc/resolv/nss_dns/dns-network.c	Tue Jul  9 10:30:31 2002
  579.59 +#@@ -328,7 +328,9 @@ getanswer_r (const querybuf *answer, int
  579.60 +# 	    }
  579.61 +# 	  cp += n;
  579.62 +# 	  *alias_pointer++ = bp;
  579.63 +#-	  bp += strlen (bp) + 1;
  579.64 +#+	  n = strlen (bp) + 1;
  579.65 +#+	  bp += n;
  579.66 +#+	  linebuflen -= n;
  579.67 +# 	  result->n_addrtype = class == C_IN ? AF_INET : AF_UNSPEC;
  579.68 +# 	  ++have_answer;
  579.69 +# 	}
   580.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   580.2 +++ b/patches/glibc/compat-2.1/rh62-12-glibc-compat-2.1.3-maxpacket.patch	Sat Feb 24 11:00:05 2007 +0000
   580.3 @@ -0,0 +1,512 @@
   580.4 +#--- libc/resolv/nss_dns/dns-host.c.jj	Tue Sep 14 03:05:08 1999
   580.5 +#+++ libc/resolv/nss_dns/dns-host.c	Thu Oct 10 13:07:33 2002
   580.6 +#@@ -129,9 +129,10 @@ _nss_dns_gethostbyname2_r (const char *n
   580.7 +# 			   char *buffer, size_t buflen, int *errnop,
   580.8 +# 			   int *h_errnop)
   580.9 +# {
  580.10 +#-  querybuf host_buffer;
  580.11 +#+  querybuf *host_buffer;
  580.12 +#   int size, type, n;
  580.13 +#   const char *cp;
  580.14 +#+  enum nss_status status;
  580.15 +# 
  580.16 +#   switch (af) {
  580.17 +#   case AF_INET:
  580.18 +#@@ -159,16 +160,25 @@ _nss_dns_gethostbyname2_r (const char *n
  580.19 +#   if (strchr (name, '.') == NULL && (cp = __hostalias (name)) != NULL)
  580.20 +#     name = cp;
  580.21 +# 
  580.22 +#-  n = res_search (name, C_IN, type, host_buffer.buf, sizeof (host_buffer.buf));
  580.23 +#+  host_buffer = (querybuf *) malloc (sizeof (*host_buffer));
  580.24 +#+  if (host_buffer == NULL) {
  580.25 +#+    *errnop = ENOMEM;
  580.26 +#+    return NSS_STATUS_UNAVAIL;
  580.27 +#+  }
  580.28 +#+
  580.29 +#+  n = res_search (name, C_IN, type, host_buffer->buf, sizeof (host_buffer->buf));
  580.30 +#   if (n < 0)
  580.31 +#     {
  580.32 +#       *h_errnop = h_errno;
  580.33 +#       *errnop = *h_errnop == TRY_AGAIN ? EAGAIN : ENOENT;
  580.34 +#+      free (host_buffer);
  580.35 +#       return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
  580.36 +#     }
  580.37 +# 
  580.38 +#-  return getanswer_r (&host_buffer, n, name, type, result, buffer, buflen,
  580.39 +#-		      errnop, h_errnop);
  580.40 +#+  status = getanswer_r (host_buffer, n, name, type, result, buffer, buflen,
  580.41 +#+			errnop, h_errnop);
  580.42 +#+  free (host_buffer);
  580.43 +#+  return status; 
  580.44 +# }
  580.45 +# 
  580.46 +# 
  580.47 +#@@ -205,7 +215,7 @@ _nss_dns_gethostbyaddr_r (const char *ad
  580.48 +#     char *h_addr_ptrs[MAX_NR_ADDRS + 1];
  580.49 +#     char linebuffer[0];
  580.50 +#   } *host_data = (struct host_data *) buffer;
  580.51 +#-  querybuf host_buffer;
  580.52 +#+  querybuf *host_buffer;
  580.53 +#   char qbuf[MAXDNAME+1], *qp;
  580.54 +#   size_t size;
  580.55 +#   int n, status;
  580.56 +#@@ -257,17 +267,25 @@ _nss_dns_gethostbyaddr_r (const char *ad
  580.57 +#       /* Cannot happen.  */
  580.58 +#     }
  580.59 +# 
  580.60 +#-  n = res_query (qbuf, C_IN, T_PTR, (u_char *)host_buffer.buf,
  580.61 +#-		 sizeof host_buffer);
  580.62 +#+  host_buffer = (querybuf *) malloc (sizeof (*host_buffer));
  580.63 +#+  if (host_buffer == NULL) {
  580.64 +#+    *errnop = ENOMEM;
  580.65 +#+    return NSS_STATUS_UNAVAIL;
  580.66 +#+  }
  580.67 +#+
  580.68 +#+  n = res_query (qbuf, C_IN, T_PTR, host_buffer->buf,
  580.69 +#+		 sizeof (host_buffer->buf));
  580.70 +#   if (n < 0)
  580.71 +#     {
  580.72 +#       *h_errnop = h_errno;
  580.73 +#       *errnop = errno;
  580.74 +#+      free (host_buffer);
  580.75 +#       return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
  580.76 +#     }
  580.77 +# 
  580.78 +#-  status = getanswer_r (&host_buffer, n, qbuf, T_PTR, result, buffer, buflen,
  580.79 +#+  status = getanswer_r (host_buffer, n, qbuf, T_PTR, result, buffer, buflen,
  580.80 +# 			errnop, h_errnop);
  580.81 +#+  free (host_buffer);
  580.82 +#   if (status != NSS_STATUS_SUCCESS)
  580.83 +#     {
  580.84 +#       *h_errnop = h_errno;
  580.85 +#--- libc/resolv/nss_dns/dns-network.c.jj	Wed Jun 30 12:01:14 1999
  580.86 +#+++ libc/resolv/nss_dns/dns-network.c	Thu Oct 10 13:09:49 2002
  580.87 +#@@ -113,24 +113,36 @@ _nss_dns_getnetbyname_r (const char *nam
  580.88 +# 			 char *buffer, size_t buflen, int *errnop)
  580.89 +# {
  580.90 +#   /* Return entry for network with NAME.  */
  580.91 +#-  querybuf net_buffer;
  580.92 +#+  querybuf *net_buffer;
  580.93 +#   int anslen;
  580.94 +#   char *qbuf;
  580.95 +#+  enum nss_status status;
  580.96 +# 
  580.97 +#   qbuf = strdupa (name);
  580.98 +#-  anslen = res_search (qbuf, C_IN, T_PTR, (u_char *) &net_buffer,
  580.99 +#-		       sizeof (querybuf));
 580.100 +#+
 580.101 +#+  net_buffer = (querybuf *) malloc (sizeof (*net_buffer));
 580.102 +#+  if (net_buffer == NULL)
 580.103 +#+    {
 580.104 +#+      *errnop = ENOMEM;
 580.105 +#+      return NSS_STATUS_UNAVAIL;
 580.106 +#+    }
 580.107 +#+
 580.108 +#+  anslen = res_search (qbuf, C_IN, T_PTR, net_buffer->buf,
 580.109 +#+		       sizeof (net_buffer->buf));
 580.110 +#   if (anslen < 0)
 580.111 +#     {
 580.112 +#       /* Nothing found.  */
 580.113 +#       *errnop = errno;
 580.114 +#+      free (net_buffer);
 580.115 +#       return (errno == ECONNREFUSED
 580.116 +# 	      || errno == EPFNOSUPPORT
 580.117 +# 	      || errno == EAFNOSUPPORT)
 580.118 +# 	? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 580.119 +#     }
 580.120 +# 
 580.121 +#-  return getanswer_r (&net_buffer, anslen, result, buffer, buflen, BYNAME);
 580.122 +#+  status = getanswer_r (net_buffer, anslen, result, buffer, buflen, BYNAME);
 580.123 +#+  free (net_buffer);
 580.124 +#+  return status;
 580.125 +# }
 580.126 +# 
 580.127 +# 
 580.128 +#@@ -140,7 +152,7 @@ _nss_dns_getnetbyaddr_r (long net, int t
 580.129 +# {
 580.130 +#   /* Return entry for network with NAME.  */
 580.131 +#   enum nss_status status;
 580.132 +#-  querybuf net_buffer;
 580.133 +#+  querybuf *net_buffer;
 580.134 +#   unsigned int net_bytes[4];
 580.135 +#   char qbuf[MAXDNAME];
 580.136 +#   int cnt, anslen;
 580.137 +#@@ -176,19 +188,28 @@ _nss_dns_getnetbyaddr_r (long net, int t
 580.138 +#       break;
 580.139 +#     }
 580.140 +# 
 580.141 +#-  anslen = res_query (qbuf, C_IN, T_PTR, (u_char *) &net_buffer,
 580.142 +#-		      sizeof (querybuf));
 580.143 +#+  net_buffer = (querybuf *) malloc (sizeof (*net_buffer));
 580.144 +#+  if (net_buffer == NULL)
 580.145 +#+    {
 580.146 +#+      *errnop = ENOMEM;
 580.147 +#+      return NSS_STATUS_UNAVAIL;
 580.148 +#+    }
 580.149 +#+
 580.150 +#+  anslen = res_query (qbuf, C_IN, T_PTR, net_buffer->buf,
 580.151 +#+		      sizeof (net_buffer->buf));
 580.152 +#   if (anslen < 0)
 580.153 +#     {
 580.154 +#       /* Nothing found.  */
 580.155 +#       *errnop = errno;
 580.156 +#+      free (net_buffer);
 580.157 +#       return (errno == ECONNREFUSED
 580.158 +# 	      || errno == EPFNOSUPPORT
 580.159 +# 	      || errno == EAFNOSUPPORT)
 580.160 +# 	? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 580.161 +#     }
 580.162 +# 
 580.163 +#-  status = getanswer_r (&net_buffer, anslen, result, buffer, buflen, BYADDR);
 580.164 +#+  status = getanswer_r (net_buffer, anslen, result, buffer, buflen, BYADDR);
 580.165 +#+  free (net_buffer);
 580.166 +#   if (status == NSS_STATUS_SUCCESS)
 580.167 +#     {
 580.168 +#       /* Strip trailing zeros.  */
 580.169 +#--- libc/resolv/res_query.c.jj	Wed Jun 30 12:01:06 1999
 580.170 +#+++ libc/resolv/res_query.c	Thu Oct 10 13:01:12 2002
 580.171 +#@@ -106,7 +106,7 @@ res_query(name, class, type, answer, ans
 580.172 +# 	u_char *answer;		/* buffer to put answer */
 580.173 +# 	int anslen;		/* size of answer buffer */
 580.174 +# {
 580.175 +#-	u_char buf[MAXPACKET];
 580.176 +#+	u_char *buf;
 580.177 +# 	register HEADER *hp = (HEADER *) answer;
 580.178 +# 	int n;
 580.179 +# 
 580.180 +#@@ -121,17 +121,25 @@ res_query(name, class, type, answer, ans
 580.181 +# 		printf(";; res_query(%s, %d, %d)\n", name, class, type);
 580.182 +# #endif
 580.183 +# 
 580.184 +#+	buf = malloc (MAXPACKET);
 580.185 +#+	if (buf == NULL) {
 580.186 +#+		__set_h_errno (NETDB_INTERNAL);
 580.187 +#+		return -1;
 580.188 +#+	}
 580.189 +#+
 580.190 +# 	n = res_mkquery(QUERY, name, class, type, NULL, 0, NULL,
 580.191 +#-			buf, sizeof(buf));
 580.192 +#+			buf, MAXPACKET);
 580.193 +# 	if (n <= 0) {
 580.194 +# #ifdef DEBUG
 580.195 +# 		if (_res.options & RES_DEBUG)
 580.196 +# 			printf(";; res_query: mkquery failed\n");
 580.197 +# #endif
 580.198 +# 		__set_h_errno (NO_RECOVERY);
 580.199 +#+		free (buf);
 580.200 +# 		return (n);
 580.201 +# 	}
 580.202 +# 	n = res_send(buf, n, answer, anslen);
 580.203 +#+	free (buf);
 580.204 +# 	if (n < 0) {
 580.205 +# #ifdef DEBUG
 580.206 +# 		if (_res.options & RES_DEBUG)
 580.207 +#--- libc/resolv/gethnamaddr.c.jj	Tue Dec  7 11:50:36 1999
 580.208 +#+++ libc/resolv/gethnamaddr.c	Thu Oct 10 15:05:50 2002
 580.209 +#@@ -512,10 +512,11 @@ gethostbyname2(name, af)
 580.210 +# 	const char *name;
 580.211 +# 	int af;
 580.212 +# {
 580.213 +#-	querybuf buf;
 580.214 +#+	querybuf *buf;
 580.215 +# 	register const char *cp;
 580.216 +# 	char *bp;
 580.217 +# 	int n, size, type, len;
 580.218 +#+	struct hostent *ret;
 580.219 +# 	extern struct hostent *_gethtbyname2();
 580.220 +# 
 580.221 +# 	if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
 580.222 +#@@ -617,13 +618,22 @@ gethostbyname2(name, af)
 580.223 +# 				break;
 580.224 +# 		}
 580.225 +# 
 580.226 +#-	if ((n = res_search(name, C_IN, type, buf.buf, sizeof(buf.buf))) < 0) {
 580.227 +#+	buf = (querybuf *) malloc (sizeof (*buf));
 580.228 +#+	if (buf == NULL) {
 580.229 +#+		__set_h_errno (NETDB_INTERNAL);
 580.230 +#+		return NULL;
 580.231 +#+	}
 580.232 +#+
 580.233 +#+	if ((n = res_search(name, C_IN, type, buf->buf, sizeof(buf->buf))) < 0) {
 580.234 +#+		free (buf);
 580.235 +# 		dprintf("res_search failed (%d)\n", n);
 580.236 +# 		if (errno == ECONNREFUSED)
 580.237 +# 			return (_gethtbyname2(name, af));
 580.238 +# 		return (NULL);
 580.239 +# 	}
 580.240 +#-	return (getanswer(&buf, n, name, type));
 580.241 +#+	ret = getanswer(buf, n, name, type);
 580.242 +#+	free (buf);
 580.243 +#+	return ret;
 580.244 +# }
 580.245 +# 
 580.246 +# struct hostent *
 580.247 +#@@ -636,7 +646,7 @@ gethostbyaddr(addr, len, af)
 580.248 +# 	static const u_char mapped[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0xff,0xff };
 580.249 +# 	static const u_char tunnelled[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0,0 };
 580.250 +# 	int n, size;
 580.251 +#-	querybuf buf;
 580.252 +#+	querybuf *buf;
 580.253 +# 	register struct hostent *hp;
 580.254 +# 	char qbuf[MAXDNAME+1], *qp;
 580.255 +# #ifdef SUNSECURITY
 580.256 +#@@ -697,14 +707,24 @@ gethostbyaddr(addr, len, af)
 580.257 +# 	default:
 580.258 +# 		abort();
 580.259 +# 	}
 580.260 +#-	n = res_query(qbuf, C_IN, T_PTR, (u_char *)buf.buf, sizeof buf.buf);
 580.261 +#+
 580.262 +#+	buf = (querybuf *) malloc (sizeof (*buf));
 580.263 +#+	if (buf == NULL) {
 580.264 +#+		__set_h_errno (NETDB_INTERNAL);
 580.265 +#+		return NULL;
 580.266 +#+	}
 580.267 +#+
 580.268 +#+	n = res_query(qbuf, C_IN, T_PTR, buf->buf, sizeof buf->buf);
 580.269 +# 	if (n < 0) {
 580.270 +#+		free (buf);
 580.271 +# 		dprintf("res_query failed (%d)\n", n);
 580.272 +# 		if (errno == ECONNREFUSED)
 580.273 +# 			return (_gethtbyaddr(addr, len, af));
 580.274 +# 		return (NULL);
 580.275 +# 	}
 580.276 +#-	if (!(hp = getanswer(&buf, n, qbuf, T_PTR)))
 580.277 +#+	hp = getanswer(buf, n, qbuf, T_PTR);
 580.278 +#+	free (buf);
 580.279 +#+	if (!hp)
 580.280 +# 		return (NULL);	/* h_errno was set by getanswer() */
 580.281 +# #ifdef SUNSECURITY
 580.282 +# 	if (af == AF_INET) {
 580.283 +#--- libc/resolv/getnetnamadr.c.jj	Wed Jun 30 12:00:50 1999
 580.284 +#+++ libc/resolv/getnetnamadr.c	Thu Oct 10 13:14:01 2002
 580.285 +#@@ -210,7 +210,7 @@ getnetbyaddr(net, net_type)
 580.286 +# {
 580.287 +# 	unsigned int netbr[4];
 580.288 +# 	int nn, anslen;
 580.289 +#-	querybuf buf;
 580.290 +#+	querybuf *buf;
 580.291 +# 	char qbuf[MAXDNAME];
 580.292 +# 	u_int32_t net2;		/* Changed from unsigned long --roland */
 580.293 +# 	struct netent *net_entry;
 580.294 +#@@ -236,8 +236,15 @@ getnetbyaddr(net, net_type)
 580.295 +# 		    netbr[1], netbr[0]);
 580.296 +# 		break;
 580.297 +# 	}
 580.298 +#-	anslen = res_query(qbuf, C_IN, T_PTR, (u_char *)&buf, sizeof(buf));
 580.299 +#+
 580.300 +#+	buf = (querybuf *) malloc (sizeof (*buf));
 580.301 +#+	if (buf == NULL) {
 580.302 +#+		return NULL;
 580.303 +#+	}
 580.304 +#+
 580.305 +#+	anslen = res_query(qbuf, C_IN, T_PTR, buf->buf, sizeof(buf->buf));
 580.306 +# 	if (anslen < 0) {
 580.307 +#+		free (buf);
 580.308 +# #ifdef DEBUG
 580.309 +# 		if (_res.options & RES_DEBUG)
 580.310 +# 			printf("res_query failed\n");
 580.311 +#@@ -246,7 +253,8 @@ getnetbyaddr(net, net_type)
 580.312 +# 			return (_getnetbyaddr(net, net_type));
 580.313 +# 		return (NULL);
 580.314 +# 	}
 580.315 +#-	net_entry = getnetanswer(&buf, anslen, BYADDR);
 580.316 +#+	net_entry = getnetanswer(buf, anslen, BYADDR);
 580.317 +#+	free (buf);
 580.318 +# 	if (net_entry) {
 580.319 +# 		unsigned u_net = net;	/* maybe net should be unsigned ? */
 580.320 +# 
 580.321 +#@@ -264,7 +272,7 @@ getnetbyname(net)
 580.322 +# 	register const char *net;
 580.323 +# {
 580.324 +# 	int anslen;
 580.325 +#-	querybuf buf;
 580.326 +#+	querybuf *buf;
 580.327 +# 	char qbuf[MAXDNAME];
 580.328 +# 	struct netent *net_entry;
 580.329 +# 
 580.330 +#@@ -273,8 +281,13 @@ getnetbyname(net)
 580.331 +# 		return (NULL);
 580.332 +# 	}
 580.333 +# 	strcpy(&qbuf[0], net);
 580.334 +#-	anslen = res_search(qbuf, C_IN, T_PTR, (u_char *)&buf, sizeof(buf));
 580.335 +#+	buf = (querybuf *) malloc (sizeof (*buf));
 580.336 +#+	if (buf == NULL) {
 580.337 +#+		return NULL;
 580.338 +#+	}
 580.339 +#+	anslen = res_search(qbuf, C_IN, T_PTR, buf->buf, sizeof(buf->buf));
 580.340 +# 	if (anslen < 0) {
 580.341 +#+		free (buf);
 580.342 +# #ifdef DEBUG
 580.343 +# 		if (_res.options & RES_DEBUG)
 580.344 +# 			printf("res_query failed\n");
 580.345 +#@@ -283,7 +296,8 @@ getnetbyname(net)
 580.346 +# 			return (_getnetbyname(net));
 580.347 +# 		return (_getnetbyname(net));
 580.348 +# 	}
 580.349 +#-	net_entry = getnetanswer(&buf, anslen, BYNAME);
 580.350 +#+	net_entry = getnetanswer(buf, anslen, BYNAME);
 580.351 +#+	free (buf);
 580.352 +# 	if (net_entry)
 580.353 +# 		return (net_entry);
 580.354 +# 	return (_getnetbyname(net));
 580.355 +--- libc/glibc-compat/nss_dns/dns-host.c.jj	Mon Jan  3 20:07:08 2000
 580.356 ++++ libc/glibc-compat/nss_dns/dns-host.c	Thu Oct 10 12:46:24 2002
 580.357 +@@ -126,9 +126,10 @@ enum nss_status
 580.358 + _nss_dns_gethostbyname2_r (const char *name, int af, struct hostent *result,
 580.359 + 			   char *buffer, size_t buflen, int *h_errnop)
 580.360 + {
 580.361 +-  querybuf host_buffer;
 580.362 ++  querybuf *host_buffer;
 580.363 +   int size, type, n;
 580.364 +   const char *cp;
 580.365 ++  enum nss_status status;
 580.366 + 
 580.367 +   switch (af) {
 580.368 +   case AF_INET:
 580.369 +@@ -156,15 +157,22 @@ _nss_dns_gethostbyname2_r (const char *n
 580.370 +   if (strchr (name, '.') == NULL && (cp = __hostalias (name)) != NULL)
 580.371 +     name = cp;
 580.372 + 
 580.373 +-  n = res_search (name, C_IN, type, host_buffer.buf, sizeof (host_buffer.buf));
 580.374 ++  host_buffer = (querybuf *) malloc (sizeof (querybuf));
 580.375 ++  if (host_buffer == NULL)
 580.376 ++    return NSS_STATUS_UNAVAIL;
 580.377 ++
 580.378 ++  n = res_search (name, C_IN, type, host_buffer->buf, sizeof (host_buffer->buf));
 580.379 +   if (n < 0)
 580.380 +     {
 580.381 +       *h_errnop = h_errno;
 580.382 ++      free (host_buffer);
 580.383 +       return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 580.384 +     }
 580.385 + 
 580.386 +-  return getanswer_r (&host_buffer, n, name, type, result, buffer, buflen,
 580.387 +-		      h_errnop);
 580.388 ++  status = getanswer_r (host_buffer, n, name, type, result, buffer, buflen,
 580.389 ++			h_errnop);
 580.390 ++  free (host_buffer);
 580.391 ++  return status;
 580.392 + }
 580.393 + 
 580.394 + 
 580.395 +@@ -200,7 +208,7 @@ _nss_dns_gethostbyaddr_r (const char *ad
 580.396 +     char *h_addr_ptrs[MAX_NR_ADDRS + 1];
 580.397 +     char linebuffer[0];
 580.398 +   } *host_data = (struct host_data *) buffer;
 580.399 +-  querybuf host_buffer;
 580.400 ++  querybuf *host_buffer;
 580.401 +   char qbuf[MAXDNAME+1], *qp;
 580.402 +   int size, n, status;
 580.403 + 
 580.404 +@@ -251,16 +259,22 @@ _nss_dns_gethostbyaddr_r (const char *ad
 580.405 +       /* Cannot happen.  */
 580.406 +     }
 580.407 + 
 580.408 +-  n = res_query (qbuf, C_IN, T_PTR, (u_char *)host_buffer.buf,
 580.409 +-		 sizeof host_buffer);
 580.410 ++  host_buffer = (querybuf *) malloc (sizeof (querybuf));
 580.411 ++  if (host_buffer == NULL)
 580.412 ++    return NSS_STATUS_UNAVAIL;
 580.413 ++
 580.414 ++  n = res_query (qbuf, C_IN, T_PTR, host_buffer->buf,
 580.415 ++		 sizeof (host_buffer->buf));
 580.416 +   if (n < 0)
 580.417 +     {
 580.418 +       *h_errnop = h_errno;
 580.419 ++      free (host_buffer);
 580.420 +       return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 580.421 +     }
 580.422 + 
 580.423 +-  status = getanswer_r (&host_buffer, n, qbuf, T_PTR, result, buffer, buflen,
 580.424 ++  status = getanswer_r (host_buffer, n, qbuf, T_PTR, result, buffer, buflen,
 580.425 + 			h_errnop);
 580.426 ++  free (host_buffer);
 580.427 +   if (status != NSS_STATUS_SUCCESS)
 580.428 +     {
 580.429 +       *h_errnop = h_errno;
 580.430 +--- libc/glibc-compat/nss_dns/dns-network.c.jj	Mon Jan  3 20:07:08 2000
 580.431 ++++ libc/glibc-compat/nss_dns/dns-network.c	Thu Oct 10 12:46:24 2002
 580.432 +@@ -107,21 +107,32 @@ _nss_dns_getnetbyname_r (const char *nam
 580.433 + 			 char *buffer, size_t buflen)
 580.434 + {
 580.435 +   /* Return entry for network with NAME.  */
 580.436 +-  querybuf net_buffer;
 580.437 ++  querybuf *net_buffer;
 580.438 +   int anslen;
 580.439 +   char *qbuf;
 580.440 ++  enum nss_status status;
 580.441 + 
 580.442 +   qbuf = strdupa (name);
 580.443 +-  anslen = res_search (qbuf, C_IN, T_PTR, (u_char *) &net_buffer,
 580.444 +-		       sizeof (querybuf));
 580.445 ++
 580.446 ++  net_buffer = (querybuf *) malloc (sizeof (querybuf));
 580.447 ++  if (net_buffer == NULL)
 580.448 ++    return NSS_STATUS_UNAVAIL;
 580.449 ++
 580.450 ++  anslen = res_search (qbuf, C_IN, T_PTR, net_buffer->buf,
 580.451 ++		       sizeof (net_buffer->buf));
 580.452 +   if (anslen < 0)
 580.453 +-    /* Nothing found.  */
 580.454 +-    return (errno == ECONNREFUSED
 580.455 +-	    || errno == EPFNOSUPPORT
 580.456 +-	    || errno == EAFNOSUPPORT)
 580.457 +-      ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 580.458 ++    {
 580.459 ++      free (net_buffer);
 580.460 ++      /* Nothing found.  */
 580.461 ++      return (errno == ECONNREFUSED
 580.462 ++	      || errno == EPFNOSUPPORT
 580.463 ++	      || errno == EAFNOSUPPORT)
 580.464 ++	      ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 580.465 ++    }
 580.466 + 
 580.467 +-  return getanswer_r (&net_buffer, anslen, result, buffer, buflen, BYNAME);
 580.468 ++  status = getanswer_r (net_buffer, anslen, result, buffer, buflen, BYNAME);
 580.469 ++  free (net_buffer);
 580.470 ++  return status;
 580.471 + }
 580.472 + 
 580.473 + 
 580.474 +@@ -131,7 +142,7 @@ _nss_dns_getnetbyaddr_r (long net, int t
 580.475 + {
 580.476 +   /* Return entry for network with NAME.  */
 580.477 +   enum nss_status status;
 580.478 +-  querybuf net_buffer;
 580.479 ++  querybuf *net_buffer;
 580.480 +   unsigned int net_bytes[4];
 580.481 +   char qbuf[MAXDNAME];
 580.482 +   int cnt, anslen;
 580.483 +@@ -167,16 +178,24 @@ _nss_dns_getnetbyaddr_r (long net, int t
 580.484 +       break;
 580.485 +     }
 580.486 + 
 580.487 +-  anslen = res_query (qbuf, C_IN, T_PTR, (u_char *) &net_buffer,
 580.488 +-		      sizeof (querybuf));
 580.489 ++  net_buffer = (querybuf *) malloc (sizeof (querybuf));
 580.490 ++  if (net_buffer == NULL)
 580.491 ++    return NSS_STATUS_UNAVAIL;
 580.492 ++
 580.493 ++  anslen = res_query (qbuf, C_IN, T_PTR, net_buffer->buf,
 580.494 ++		      sizeof (net_buffer->buf));
 580.495 +   if (anslen < 0)
 580.496 +-    /* Nothing found.  */
 580.497 +-    return (errno == ECONNREFUSED
 580.498 +-	    || errno == EPFNOSUPPORT
 580.499 +-	    || errno == EAFNOSUPPORT)
 580.500 +-      ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 580.501 ++    {
 580.502 ++      free (net_buffer);
 580.503 ++      /* Nothing found.  */
 580.504 ++      return (errno == ECONNREFUSED
 580.505 ++	      || errno == EPFNOSUPPORT
 580.506 ++	      || errno == EAFNOSUPPORT)
 580.507 ++	      ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
 580.508 ++    }
 580.509 + 
 580.510 +-  status = getanswer_r (&net_buffer, anslen, result, buffer, buflen, BYADDR);
 580.511 ++  status = getanswer_r (net_buffer, anslen, result, buffer, buflen, BYADDR);
 580.512 ++  free (net_buffer);
 580.513 +   if (status == NSS_STATUS_SUCCESS)
 580.514 +     {
 580.515 +       /* Strip trailing zeros.  */
   581.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   581.2 +++ b/patches/glibc/linuxthreads-2.1.3/glibc-2.1.3-allow-gcc3-pthread.patch	Sat Feb 24 11:00:05 2007 +0000
   581.3 @@ -0,0 +1,33 @@
   581.4 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/sysdeps/pthread/pthread.h.diff?r1=1.31&r2=1.32&cvsroot=glibc
   581.5 +
   581.6 +Fixes 
   581.7 +../linuxthreads/sysdeps/pthread/pthread.h:141: error: parse error before "__thread"
   581.8 +../linuxthreads/sysdeps/pthread/pthread.h:141: error: `pthread_create' declared as function returning a function
   581.9 +../linuxthreads/sysdeps/pthread/pthread.h:141: warning: function declaration isn't a prototype
  581.10 +../linuxthreads/sysdeps/pthread/pthread.h:141: error: parse error before "void"
  581.11 +../linuxthreads/sysdeps/pthread/pthread.h:462: error: storage class specified for parameter `type name'
  581.12 +
  581.13 +when compiling with gcc3.x
  581.14 +
  581.15 +Rediffed against glibc-2.1.3
  581.16 +
  581.17 +--- glibc-2.1.3/linuxthreads/sysdeps/pthread/pthread.h.orig	2000-01-20 17:40:19.000000000 -0800
  581.18 ++++ glibc-2.1.3/linuxthreads/sysdeps/pthread/pthread.h	2004-03-04 15:56:43.000000000 -0800
  581.19 +@@ -138,7 +138,7 @@
  581.20 + /* Create a thread with given attributes ATTR (or default attributes
  581.21 +    if ATTR is NULL), and call function START_ROUTINE with given
  581.22 +    arguments ARG.  */
  581.23 +-extern int pthread_create __P ((pthread_t *__thread,
  581.24 ++extern int pthread_create __P ((pthread_t *__threadp,
  581.25 + 				__const pthread_attr_t *__attr,
  581.26 + 				void *(*__start_routine) (void *),
  581.27 + 				void *__arg));
  581.28 +@@ -459,7 +459,7 @@
  581.29 + extern int pthread_setcanceltype __P ((int __type, int *__oldtype));
  581.30 + 
  581.31 + /* Cancel THREAD immediately or at the next possibility.  */
  581.32 +-extern int pthread_cancel __P ((pthread_t __thread));
  581.33 ++extern int pthread_cancel __P ((pthread_t __cancelthread));
  581.34 + 
  581.35 + /* Test for pending cancellation for the current thread and terminate
  581.36 +    the thread as per pthread_exit(PTHREAD_CANCELED) if it has been
   582.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   582.2 +++ b/patches/glibc/linuxthreads-2.1.3/glibc-2.1.3-allow-gcc3-pthread2.patch	Sat Feb 24 11:00:05 2007 +0000
   582.3 @@ -0,0 +1,18 @@
   582.4 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h.diff?r1=1.5&r2=1.6&cvsroot=glibc
   582.5 +
   582.6 +Fixes 
   582.7 +
   582.8 +../linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h:35: error: storage class specified for parameter `type name'
   582.9 +
  582.10 +Rediffed to match glibc-2.1.3
  582.11 +
  582.12 +--- glibc-2.1.3/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h.orig	1998-09-12 14:33:14.000000000 -0700
  582.13 ++++ glibc-2.1.3/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h	2004-03-04 15:50:30.000000000 -0800
  582.14 +@@ -32,6 +32,6 @@
  582.15 + 				 __sigset_t *__oldmask));
  582.16 + 
  582.17 + /* Send signal SIGNO to the given thread. */
  582.18 +-extern int pthread_kill __P ((pthread_t __thread, int __signo));
  582.19 ++extern int pthread_kill __P ((pthread_t __threadid, int __signo));
  582.20 + 
  582.21 + #endif	/* bits/sigthread.h */
   583.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   583.2 +++ b/patches/glibc/linuxthreads-2.1.3/rh62-05-glibc-2.1.3-pthread.patch	Sat Feb 24 11:00:05 2007 +0000
   583.3 @@ -0,0 +1,16 @@
   583.4 +2000-08-03  Ulrich Drepper  <drepper@redhat.com>
   583.5 +
   583.6 +	* pthread.c (__pthread_set_own_extricate_if): Remove locking.
   583.7 +
   583.8 +--- glibc-2.1.3/linuxthreads/pthread.c.jj	Wed Mar 22 22:26:01 2000
   583.9 ++++ glibc-2.1.3/linuxthreads/pthread.c	Fri Aug 25 09:37:26 2000
  583.10 +@@ -775,9 +775,7 @@ weak_alias (__pthread_getconcurrency, pt
  583.11 + 
  583.12 + void __pthread_set_own_extricate_if(pthread_descr self, pthread_extricate_if *peif)
  583.13 + {
  583.14 +-  __pthread_lock(self->p_lock, self);
  583.15 +   THREAD_SETMEM(self, p_extricate, peif);
  583.16 +-  __pthread_unlock(self->p_lock);
  583.17 + }
  583.18 + 
  583.19 + /* Primitives for controlling thread execution */
   584.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   584.2 +++ b/patches/glibc/linuxthreads-2.1.3/rh62-99-glibc-2.1.3-allow-gcc-3.4-td.patch	Sat Feb 24 11:00:05 2007 +0000
   584.3 @@ -0,0 +1,808 @@
   584.4 +Fixes following error building glibc-2.2.5 with gcc-3.4:
   584.5 +td_init.c: In function `td_init':
   584.6 +td_init.c:30: error: parse error before string constant
   584.7 +td_init.c:30: error: parse error before string constant
   584.8 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.2.5/build-glibc/linuxthreads_db/td_init.os] Error 1
   584.9 +
  584.10 +# Retrieved by diffing a +-1 day rng around the time mentioned
  584.11 +# in http://sources.redhat.com/ml/glibc-cvs/2001-q4/msg00654.html
  584.12 +# cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc diff -u -D"2001-12-27 08:41:30" -D"2001-12-29 08:41:32"
  584.13 +# then fixing paths.
  584.14 +
  584.15 +# And then removing hunks that don't apply to rh6.2's glibc-2.1.3
  584.16 +# (thankfully, all were comments)
  584.17 +# and rediffing one hunk for glibc-2.1.3
  584.18 +
  584.19 +Index: td_init.c
  584.20 +===================================================================
  584.21 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_init.c,v
  584.22 +retrieving revision 1.3
  584.23 +retrieving revision 1.4
  584.24 +diff -u -r1.3 -r1.4
  584.25 +--- libc/linuxthreads_db/td_init.c	6 Jul 2001 05:27:23 -0000	1.3
  584.26 ++++ libc/linuxthreads_db/td_init.c	28 Dec 2001 16:41:29 -0000	1.4
  584.27 +@@ -1,5 +1,5 @@
  584.28 + /* Initialization function of thread debugger support library.
  584.29 +-   Copyright (C) 1999 Free Software Foundation, Inc.
  584.30 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
  584.31 +    This file is part of the GNU C Library.
  584.32 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
  584.33 + 
  584.34 +@@ -27,6 +27,6 @@
  584.35 + td_init (void)
  584.36 + {
  584.37 +   /* XXX We have to figure out what has to be done.  */
  584.38 +-  LOG (__FUNCTION__);
  584.39 ++  LOG ("td_init");
  584.40 +   return TD_OK;
  584.41 + }
  584.42 +Index: td_log.c
  584.43 +===================================================================
  584.44 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_log.c,v
  584.45 +retrieving revision 1.2
  584.46 +retrieving revision 1.3
  584.47 +diff -u -r1.2 -r1.3
  584.48 +--- libc/linuxthreads_db/td_log.c	6 Jul 2001 05:27:23 -0000	1.2
  584.49 ++++ libc/linuxthreads_db/td_log.c	28 Dec 2001 16:41:29 -0000	1.3
  584.50 +@@ -1,5 +1,5 @@
  584.51 + /* Noop, left for historical reasons.
  584.52 +-   Copyright (C) 1999 Free Software Foundation, Inc.
  584.53 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
  584.54 +    This file is part of the GNU C Library.
  584.55 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
  584.56 + 
  584.57 +@@ -25,8 +25,8 @@
  584.58 + td_log (void)
  584.59 + {
  584.60 +   /* This interface is deprecated in the Sun interface.  We provide it
  584.61 +-     for compatibility but don't do anyhting ourself.  We might in
  584.62 ++     for compatibility but don't do anything ourself.  We might in
  584.63 +      future do some logging if this seems reasonable.  */
  584.64 +-  LOG (__FUNCTION__);
  584.65 ++  LOG ("td_log");
  584.66 +   return TD_OK;
  584.67 + }
  584.68 +Index: td_ta_clear_event.c
  584.69 +===================================================================
  584.70 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_clear_event.c,v
  584.71 +retrieving revision 1.3
  584.72 +retrieving revision 1.4
  584.73 +diff -u -r1.3 -r1.4
  584.74 +--- libc/linuxthreads_db/td_ta_clear_event.c	6 Jul 2001 05:27:23 -0000	1.3
  584.75 ++++ libc/linuxthreads_db/td_ta_clear_event.c	28 Dec 2001 16:41:29 -0000	1.4
  584.76 +@@ -1,5 +1,5 @@
  584.77 + /* Globally disable events.
  584.78 +-   Copyright (C) 1999 Free Software Foundation, Inc.
  584.79 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
  584.80 +    This file is part of the GNU C Library.
  584.81 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
  584.82 + 
  584.83 +@@ -29,7 +29,7 @@
  584.84 +   td_thr_events_t old_event;
  584.85 +   int i;
  584.86 + 
  584.87 +-  LOG (__FUNCTION__);
  584.88 ++  LOG ("td_ta_clear_event");
  584.89 + 
  584.90 +   /* Test whether the TA parameter is ok.  */
  584.91 +   if (! ta_ok (ta))
  584.92 +Index: td_ta_delete.c
  584.93 +===================================================================
  584.94 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_delete.c,v
  584.95 +retrieving revision 1.3
  584.96 +retrieving revision 1.4
  584.97 +diff -u -r1.3 -r1.4
  584.98 +--- libc/linuxthreads_db/td_ta_delete.c	6 Jul 2001 05:27:23 -0000	1.3
  584.99 ++++ libc/linuxthreads_db/td_ta_delete.c	28 Dec 2001 16:41:29 -0000	1.4
 584.100 +@@ -1,5 +1,5 @@
 584.101 + /* Detach to target process.
 584.102 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.103 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.104 +    This file is part of the GNU C Library.
 584.105 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.106 + 
 584.107 +@@ -26,7 +26,7 @@
 584.108 + td_err_e
 584.109 + td_ta_delete (td_thragent_t *ta)
 584.110 + {
 584.111 +-  LOG (__FUNCTION__);
 584.112 ++  LOG ("td_ta_delete");
 584.113 + 
 584.114 +   /* Safety check.  */
 584.115 +   if (ta == NULL || __td_agent_list == NULL)
 584.116 +Index: td_ta_enable_stats.c
 584.117 +===================================================================
 584.118 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_enable_stats.c,v
 584.119 +retrieving revision 1.3
 584.120 +retrieving revision 1.4
 584.121 +diff -u -r1.3 -r1.4
 584.122 +--- libc/linuxthreads_db/td_ta_enable_stats.c	6 Jul 2001 05:27:23 -0000	1.3
 584.123 ++++ libc/linuxthreads_db/td_ta_enable_stats.c	28 Dec 2001 16:41:29 -0000	1.4
 584.124 +@@ -1,5 +1,5 @@
 584.125 + /* Enable collection of statistics for process.
 584.126 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.127 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.128 +    This file is part of the GNU C Library.
 584.129 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.130 + 
 584.131 +@@ -25,7 +25,7 @@
 584.132 + td_ta_enable_stats (const td_thragent_t *ta, int enable)
 584.133 + {
 584.134 +   /* XXX We have to figure out what has to be done.  */
 584.135 +-  LOG (__FUNCTION__);
 584.136 ++  LOG ("td_ta_enable_stats");
 584.137 + 
 584.138 +   /* Test whether the TA parameter is ok.  */
 584.139 +   if (! ta_ok (ta))
 584.140 +Index: td_ta_event_addr.c
 584.141 +===================================================================
 584.142 +--- glibc-2.1.3/linuxthreads_db/td_ta_event_addr.c~	Tue Nov  9 21:05:07 1999
 584.143 ++++ glibc-2.1.3/linuxthreads_db/td_ta_event_addr.c	Sun Apr 11 22:23:28 2004
 584.144 +@@ -29,7 +29,7 @@
 584.145 +   td_err_e res = TD_NOEVENT;
 584.146 +   const char *symbol = NULL;
 584.147 + 
 584.148 +-  LOG (__FUNCTION__);
 584.149 ++  LOG ("td_ta_event_addr");
 584.150 + 
 584.151 +   /* Test whether the TA parameter is ok.  */
 584.152 +   if (! ta_ok (ta))
 584.153 +Index: td_ta_event_getmsg.c
 584.154 +===================================================================
 584.155 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_event_getmsg.c,v
 584.156 +retrieving revision 1.5
 584.157 +retrieving revision 1.6
 584.158 +diff -u -r1.5 -r1.6
 584.159 +--- libc/linuxthreads_db/td_ta_event_getmsg.c	6 Jul 2001 05:27:23 -0000	1.5
 584.160 ++++ libc/linuxthreads_db/td_ta_event_getmsg.c	28 Dec 2001 16:41:29 -0000	1.6
 584.161 +@@ -1,5 +1,5 @@
 584.162 + /* Retrieve event.
 584.163 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.164 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.165 +    This file is part of the GNU C Library.
 584.166 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.167 + 
 584.168 +@@ -32,7 +32,7 @@
 584.169 +   td_eventbuf_t event;
 584.170 +   psaddr_t addr;
 584.171 + 
 584.172 +-  LOG (__FUNCTION__);
 584.173 ++  LOG ("td_ta_event_getmsg");
 584.174 + 
 584.175 +   /* Test whether the TA parameter is ok.  */
 584.176 +   if (! ta_ok (ta))
 584.177 +Index: td_ta_get_nthreads.c
 584.178 +===================================================================
 584.179 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_get_nthreads.c,v
 584.180 +retrieving revision 1.5
 584.181 +retrieving revision 1.6
 584.182 +diff -u -r1.5 -r1.6
 584.183 +--- libc/linuxthreads_db/td_ta_get_nthreads.c	6 Jul 2001 05:27:23 -0000	1.5
 584.184 ++++ libc/linuxthreads_db/td_ta_get_nthreads.c	28 Dec 2001 16:41:29 -0000	1.6
 584.185 +@@ -25,7 +25,7 @@
 584.186 + {
 584.187 +   psaddr_t addr;
 584.188 + 
 584.189 +-  LOG (__FUNCTION__);
 584.190 ++  LOG ("td_ta_get_nthreads");
 584.191 + 
 584.192 +   /* Test whether the TA parameter is ok.  */
 584.193 +   if (! ta_ok (ta))
 584.194 +Index: td_ta_get_ph.c
 584.195 +===================================================================
 584.196 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_get_ph.c,v
 584.197 +retrieving revision 1.3
 584.198 +retrieving revision 1.4
 584.199 +diff -u -r1.3 -r1.4
 584.200 +--- libc/linuxthreads_db/td_ta_get_ph.c	6 Jul 2001 05:27:23 -0000	1.3
 584.201 ++++ libc/linuxthreads_db/td_ta_get_ph.c	28 Dec 2001 16:41:29 -0000	1.4
 584.202 +@@ -1,5 +1,5 @@
 584.203 + /* Get external process handle.
 584.204 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.205 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.206 +    This file is part of the GNU C Library.
 584.207 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.208 + 
 584.209 +@@ -24,7 +24,7 @@
 584.210 + td_err_e
 584.211 + td_ta_get_ph (const td_thragent_t *ta, struct ps_prochandle **ph)
 584.212 + {
 584.213 +-  LOG (__FUNCTION__);
 584.214 ++  LOG ("td_ta_get_ph");
 584.215 + 
 584.216 +   /* Test whether the TA parameter is ok.  */
 584.217 +   if (! ta_ok (ta))
 584.218 +Index: td_ta_get_stats.c
 584.219 +===================================================================
 584.220 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_get_stats.c,v
 584.221 +retrieving revision 1.3
 584.222 +retrieving revision 1.4
 584.223 +diff -u -r1.3 -r1.4
 584.224 +--- libc/linuxthreads_db/td_ta_get_stats.c	6 Jul 2001 05:27:23 -0000	1.3
 584.225 ++++ libc/linuxthreads_db/td_ta_get_stats.c	28 Dec 2001 16:41:29 -0000	1.4
 584.226 +@@ -1,5 +1,5 @@
 584.227 + /* Retrieve statistics for process.
 584.228 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.229 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.230 +    This file is part of the GNU C Library.
 584.231 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.232 + 
 584.233 +@@ -25,7 +25,7 @@
 584.234 + td_ta_get_stats (const td_thragent_t *ta, td_ta_stats_t *statsp)
 584.235 + {
 584.236 +   /* XXX We have to figure out what has to be done.  */
 584.237 +-  LOG (__FUNCTION__);
 584.238 ++  LOG ("td_ta_get_stats");
 584.239 + 
 584.240 +   /* Test whether the TA parameter is ok.  */
 584.241 +   if (! ta_ok (ta))
 584.242 +Index: td_ta_map_id2thr.c
 584.243 +===================================================================
 584.244 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_map_id2thr.c,v
 584.245 +retrieving revision 1.4
 584.246 +retrieving revision 1.5
 584.247 +diff -u -r1.4 -r1.5
 584.248 +--- libc/linuxthreads_db/td_ta_map_id2thr.c	6 Jul 2001 05:27:23 -0000	1.4
 584.249 ++++ libc/linuxthreads_db/td_ta_map_id2thr.c	28 Dec 2001 16:41:29 -0000	1.5
 584.250 +@@ -28,7 +28,7 @@
 584.251 +   struct _pthread_descr_struct pds;
 584.252 +   int pthread_threads_max;
 584.253 + 
 584.254 +-  LOG (__FUNCTION__);
 584.255 ++  LOG ("td_ta_map_id2thr");
 584.256 + 
 584.257 +   /* Test whether the TA parameter is ok.  */
 584.258 +   if (! ta_ok (ta))
 584.259 +Index: td_ta_map_lwp2thr.c
 584.260 +===================================================================
 584.261 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_map_lwp2thr.c,v
 584.262 +retrieving revision 1.5
 584.263 +retrieving revision 1.6
 584.264 +diff -u -r1.5 -r1.6
 584.265 +--- libc/linuxthreads_db/td_ta_map_lwp2thr.c	6 Jul 2001 05:27:23 -0000	1.5
 584.266 ++++ libc/linuxthreads_db/td_ta_map_lwp2thr.c	28 Dec 2001 16:41:29 -0000	1.6
 584.267 +@@ -1,5 +1,5 @@
 584.268 + /* Which thread is running on an lwp?
 584.269 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.270 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.271 +    This file is part of the GNU C Library.
 584.272 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.273 + 
 584.274 +@@ -34,7 +34,7 @@
 584.275 + # define num 1
 584.276 + #endif
 584.277 + 
 584.278 +-  LOG (__FUNCTION__);
 584.279 ++  LOG ("td_ta_map_lwp2thr");
 584.280 + 
 584.281 +   /* Test whether the TA parameter is ok.  */
 584.282 +   if (! ta_ok (ta))
 584.283 +Index: td_ta_new.c
 584.284 +===================================================================
 584.285 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_new.c,v
 584.286 +retrieving revision 1.10
 584.287 +retrieving revision 1.11
 584.288 +diff -u -r1.10 -r1.11
 584.289 +--- libc/linuxthreads_db/td_ta_new.c	6 Jul 2001 05:27:23 -0000	1.10
 584.290 ++++ libc/linuxthreads_db/td_ta_new.c	28 Dec 2001 16:41:29 -0000	1.11
 584.291 +@@ -35,7 +35,7 @@
 584.292 +   psaddr_t addr;
 584.293 +   struct agent_list *elemp;
 584.294 + 
 584.295 +-  LOG (__FUNCTION__);
 584.296 ++  LOG ("td_ta_new");
 584.297 + 
 584.298 +   /* Get the global event mask.  This is one of the variables which
 584.299 +      are new in the thread library to enable debugging.  If it is
 584.300 +Index: td_ta_reset_stats.c
 584.301 +===================================================================
 584.302 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_reset_stats.c,v
 584.303 +retrieving revision 1.3
 584.304 +retrieving revision 1.4
 584.305 +diff -u -r1.3 -r1.4
 584.306 +--- libc/linuxthreads_db/td_ta_reset_stats.c	6 Jul 2001 05:27:23 -0000	1.3
 584.307 ++++ libc/linuxthreads_db/td_ta_reset_stats.c	28 Dec 2001 16:41:29 -0000	1.4
 584.308 +@@ -1,5 +1,5 @@
 584.309 + /* Reset statistics.
 584.310 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.311 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.312 +    This file is part of the GNU C Library.
 584.313 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.314 + 
 584.315 +@@ -25,7 +25,7 @@
 584.316 + td_ta_reset_stats (const td_thragent_t *ta)
 584.317 + {
 584.318 +   /* XXX We have to figure out what has to be done.  */
 584.319 +-  LOG (__FUNCTION__);
 584.320 ++  LOG ("td_ta_reset_stats");
 584.321 + 
 584.322 +   /* Test whether the TA parameter is ok.  */
 584.323 +   if (! ta_ok (ta))
 584.324 +Index: td_ta_set_event.c
 584.325 +===================================================================
 584.326 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_set_event.c,v
 584.327 +retrieving revision 1.4
 584.328 +retrieving revision 1.5
 584.329 +diff -u -r1.4 -r1.5
 584.330 +--- libc/linuxthreads_db/td_ta_set_event.c	6 Jul 2001 05:27:23 -0000	1.4
 584.331 ++++ libc/linuxthreads_db/td_ta_set_event.c	28 Dec 2001 16:41:29 -0000	1.5
 584.332 +@@ -1,5 +1,5 @@
 584.333 + /* Globally enable events.
 584.334 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.335 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.336 +    This file is part of the GNU C Library.
 584.337 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.338 + 
 584.339 +@@ -29,7 +29,7 @@
 584.340 +   td_thr_events_t old_event;
 584.341 +   int i;
 584.342 + 
 584.343 +-  LOG (__FUNCTION__);
 584.344 ++  LOG ("td_ta_set_event");
 584.345 + 
 584.346 +   /* Test whether the TA parameter is ok.  */
 584.347 +   if (! ta_ok (ta))
 584.348 +Index: td_ta_setconcurrency.c
 584.349 +===================================================================
 584.350 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_setconcurrency.c,v
 584.351 +retrieving revision 1.3
 584.352 +retrieving revision 1.4
 584.353 +diff -u -r1.3 -r1.4
 584.354 +--- libc/linuxthreads_db/td_ta_setconcurrency.c	6 Jul 2001 05:27:23 -0000	1.3
 584.355 ++++ libc/linuxthreads_db/td_ta_setconcurrency.c	28 Dec 2001 16:41:29 -0000	1.4
 584.356 +@@ -1,5 +1,5 @@
 584.357 + /* Set suggested concurrency level for process.
 584.358 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.359 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.360 +    This file is part of the GNU C Library.
 584.361 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.362 + 
 584.363 +@@ -25,7 +25,7 @@
 584.364 + td_ta_setconcurrency (const td_thragent_t *ta, int level)
 584.365 + {
 584.366 +   /* This is something LinuxThreads does not support.  */
 584.367 +-  LOG (__FUNCTION__);
 584.368 ++  LOG ("td_ta_setconcurrency");
 584.369 + 
 584.370 +   /* Test whether the TA parameter is ok.  */
 584.371 +   if (! ta_ok (ta))
 584.372 +Index: td_ta_thr_iter.c
 584.373 +===================================================================
 584.374 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_thr_iter.c,v
 584.375 +retrieving revision 1.11
 584.376 +retrieving revision 1.12
 584.377 +diff -u -r1.11 -r1.12
 584.378 +--- libc/linuxthreads_db/td_ta_thr_iter.c	6 Jul 2001 05:27:23 -0000	1.11
 584.379 ++++ libc/linuxthreads_db/td_ta_thr_iter.c	28 Dec 2001 16:41:29 -0000	1.12
 584.380 +@@ -86,7 +86,7 @@
 584.381 + # define num 1
 584.382 + #endif
 584.383 + 
 584.384 +-  LOG (__FUNCTION__);
 584.385 ++  LOG ("td_ta_thr_iter");
 584.386 + 
 584.387 +   /* Test whether the TA parameter is ok.  */
 584.388 +   if (! ta_ok (ta))
 584.389 +Index: td_ta_tsd_iter.c
 584.390 +===================================================================
 584.391 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_tsd_iter.c,v
 584.392 +retrieving revision 1.4
 584.393 +retrieving revision 1.5
 584.394 +diff -u -r1.4 -r1.5
 584.395 +--- libc/linuxthreads_db/td_ta_tsd_iter.c	6 Jul 2001 05:27:23 -0000	1.4
 584.396 ++++ libc/linuxthreads_db/td_ta_tsd_iter.c	28 Dec 2001 16:41:29 -0000	1.5
 584.397 +@@ -29,7 +29,7 @@
 584.398 +   int pthread_keys_max;
 584.399 +   int cnt;
 584.400 + 
 584.401 +-  LOG (__FUNCTION__);
 584.402 ++  LOG ("td_ta_tsd_iter");
 584.403 + 
 584.404 +   /* Test whether the TA parameter is ok.  */
 584.405 +   if (! ta_ok (ta))
 584.406 +Index: td_thr_clear_event.c
 584.407 +===================================================================
 584.408 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_clear_event.c,v
 584.409 +retrieving revision 1.3
 584.410 +retrieving revision 1.4
 584.411 +diff -u -r1.3 -r1.4
 584.412 +--- libc/linuxthreads_db/td_thr_clear_event.c	6 Jul 2001 05:27:23 -0000	1.3
 584.413 ++++ libc/linuxthreads_db/td_thr_clear_event.c	28 Dec 2001 16:41:29 -0000	1.4
 584.414 +@@ -1,5 +1,5 @@
 584.415 + /* Disable specific event for thread.
 584.416 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.417 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.418 +    This file is part of the GNU C Library.
 584.419 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.420 + 
 584.421 +@@ -31,7 +31,7 @@
 584.422 +   td_thr_events_t old_event;
 584.423 +   int i;
 584.424 + 
 584.425 +-  LOG (__FUNCTION__);
 584.426 ++  LOG ("td_thr_clear_event");
 584.427 + 
 584.428 +   /* Write the new value into the thread data structure.  */
 584.429 +   if (ps_pdread (th->th_ta_p->ph,
 584.430 +Index: td_thr_dbresume.c
 584.431 +===================================================================
 584.432 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_dbresume.c,v
 584.433 +retrieving revision 1.2
 584.434 +retrieving revision 1.3
 584.435 +diff -u -r1.2 -r1.3
 584.436 +--- libc/linuxthreads_db/td_thr_dbresume.c	6 Jul 2001 05:27:23 -0000	1.2
 584.437 ++++ libc/linuxthreads_db/td_thr_dbresume.c	28 Dec 2001 16:41:29 -0000	1.3
 584.438 +@@ -1,5 +1,5 @@
 584.439 + /* Resume execution of given thread.
 584.440 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.441 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.442 +    This file is part of the GNU C Library.
 584.443 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.444 + 
 584.445 +@@ -25,6 +25,6 @@
 584.446 + td_thr_dbresume (const td_thrhandle_t *th)
 584.447 + {
 584.448 +   /* XXX We have to figure out what has to be done.  */
 584.449 +-  LOG (__FUNCTION__);
 584.450 ++  LOG ("td_thr_dbresume");
 584.451 +   return TD_NOCAPAB;
 584.452 + }
 584.453 +Index: td_thr_dbsuspend.c
 584.454 +===================================================================
 584.455 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_dbsuspend.c,v
 584.456 +retrieving revision 1.2
 584.457 +retrieving revision 1.3
 584.458 +diff -u -r1.2 -r1.3
 584.459 +--- libc/linuxthreads_db/td_thr_dbsuspend.c	6 Jul 2001 05:27:23 -0000	1.2
 584.460 ++++ libc/linuxthreads_db/td_thr_dbsuspend.c	28 Dec 2001 16:41:29 -0000	1.3
 584.461 +@@ -1,5 +1,5 @@
 584.462 + /* Suspend execution of given thread.
 584.463 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.464 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.465 +    This file is part of the GNU C Library.
 584.466 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.467 + 
 584.468 +@@ -25,6 +25,6 @@
 584.469 + td_thr_dbsuspend (const td_thrhandle_t *th)
 584.470 + {
 584.471 +   /* XXX We have to figure out what has to be done.  */
 584.472 +-  LOG (__FUNCTION__);
 584.473 ++  LOG ("td_thr_dbsuspend");
 584.474 +   return TD_NOCAPAB;
 584.475 + }
 584.476 +Index: td_thr_event_enable.c
 584.477 +===================================================================
 584.478 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_event_enable.c,v
 584.479 +retrieving revision 1.3
 584.480 +retrieving revision 1.4
 584.481 +diff -u -r1.3 -r1.4
 584.482 +--- libc/linuxthreads_db/td_thr_event_enable.c	6 Jul 2001 05:27:23 -0000	1.3
 584.483 ++++ libc/linuxthreads_db/td_thr_event_enable.c	28 Dec 2001 16:41:29 -0000	1.4
 584.484 +@@ -1,5 +1,5 @@
 584.485 + /* Enable event process-wide.
 584.486 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.487 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.488 +    This file is part of the GNU C Library.
 584.489 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.490 + 
 584.491 +@@ -28,7 +28,7 @@
 584.492 +      const td_thrhandle_t *th;
 584.493 +      int onoff;
 584.494 + {
 584.495 +-  LOG (__FUNCTION__);
 584.496 ++  LOG ("td_thr_event_enable");
 584.497 + 
 584.498 +   /* Write the new value into the thread data structure.  */
 584.499 +   if (ps_pdwrite (th->th_ta_p->ph,
 584.500 +Index: td_thr_event_getmsg.c
 584.501 +===================================================================
 584.502 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_event_getmsg.c,v
 584.503 +retrieving revision 1.3
 584.504 +retrieving revision 1.4
 584.505 +diff -u -r1.3 -r1.4
 584.506 +--- libc/linuxthreads_db/td_thr_event_getmsg.c	6 Jul 2001 05:27:23 -0000	1.3
 584.507 ++++ libc/linuxthreads_db/td_thr_event_getmsg.c	28 Dec 2001 16:41:29 -0000	1.4
 584.508 +@@ -1,5 +1,5 @@
 584.509 + /* Retrieve event.
 584.510 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.511 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.512 +    This file is part of the GNU C Library.
 584.513 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.514 + 
 584.515 +@@ -29,7 +29,7 @@
 584.516 + {
 584.517 +   td_eventbuf_t event;
 584.518 + 
 584.519 +-  LOG (__FUNCTION__);
 584.520 ++  LOG ("td_thr_event_getmsg");
 584.521 + 
 584.522 +   /* Read the even structure from the target.  */
 584.523 +   if (ps_pdread (th->th_ta_p->ph,
 584.524 +Index: td_thr_get_info.c
 584.525 +===================================================================
 584.526 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_get_info.c,v
 584.527 +retrieving revision 1.9
 584.528 +retrieving revision 1.10
 584.529 +diff -u -r1.9 -r1.10
 584.530 +--- libc/linuxthreads_db/td_thr_get_info.c	6 Jul 2001 05:27:23 -0000	1.9
 584.531 ++++ libc/linuxthreads_db/td_thr_get_info.c	28 Dec 2001 16:41:29 -0000	1.10
 584.532 +@@ -29,7 +29,7 @@
 584.533 + {
 584.534 +   struct _pthread_descr_struct pds;
 584.535 + 
 584.536 +-  LOG (__FUNCTION__);
 584.537 ++  LOG ("td_thr_get_info");
 584.538 + 
 584.539 +   /* Get the thread descriptor.  */
 584.540 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 584.541 +Index: td_thr_getfpregs.c
 584.542 +===================================================================
 584.543 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_getfpregs.c,v
 584.544 +retrieving revision 1.4
 584.545 +retrieving revision 1.5
 584.546 +diff -u -r1.4 -r1.5
 584.547 +--- libc/linuxthreads_db/td_thr_getfpregs.c	6 Jul 2001 05:27:23 -0000	1.4
 584.548 ++++ libc/linuxthreads_db/td_thr_getfpregs.c	28 Dec 2001 16:41:29 -0000	1.5
 584.549 +@@ -26,7 +26,7 @@
 584.550 + {
 584.551 +   struct _pthread_descr_struct pds;
 584.552 + 
 584.553 +-  LOG (__FUNCTION__);
 584.554 ++  LOG ("td_thr_getfpregs");
 584.555 + 
 584.556 +   /* We have to get the state and the PID for this thread.  */
 584.557 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 584.558 +Index: td_thr_getgregs.c
 584.559 +===================================================================
 584.560 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_getgregs.c,v
 584.561 +retrieving revision 1.8
 584.562 +retrieving revision 1.9
 584.563 +diff -u -r1.8 -r1.9
 584.564 +--- libc/linuxthreads_db/td_thr_getgregs.c	6 Jul 2001 05:27:23 -0000	1.8
 584.565 ++++ libc/linuxthreads_db/td_thr_getgregs.c	28 Dec 2001 16:41:29 -0000	1.9
 584.566 +@@ -26,7 +26,7 @@
 584.567 + {
 584.568 +   struct _pthread_descr_struct pds;
 584.569 + 
 584.570 +-  LOG (__FUNCTION__);
 584.571 ++  LOG ("td_thr_getgregs");
 584.572 + 
 584.573 +   /* We have to get the state and the PID for this thread.  */
 584.574 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 584.575 +Index: td_thr_getxregs.c
 584.576 +===================================================================
 584.577 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_getxregs.c,v
 584.578 +retrieving revision 1.2
 584.579 +retrieving revision 1.3
 584.580 +diff -u -r1.2 -r1.3
 584.581 +--- libc/linuxthreads_db/td_thr_getxregs.c	6 Jul 2001 05:27:23 -0000	1.2
 584.582 ++++ libc/linuxthreads_db/td_thr_getxregs.c	28 Dec 2001 16:41:29 -0000	1.3
 584.583 +@@ -1,5 +1,5 @@
 584.584 + /* Get a thread's extra state register set.
 584.585 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.586 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.587 +    This file is part of the GNU C Library.
 584.588 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.589 + 
 584.590 +@@ -25,6 +25,6 @@
 584.591 + td_thr_getxregs (const td_thrhandle_t *th, void *xregs)
 584.592 + {
 584.593 +   /* XXX This might be platform specific.  */
 584.594 +-  LOG (__FUNCTION__);
 584.595 ++  LOG ("td_thr_getxregs");
 584.596 +   return TD_NOXREGS;
 584.597 + }
 584.598 +Index: td_thr_getxregsize.c
 584.599 +===================================================================
 584.600 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_getxregsize.c,v
 584.601 +retrieving revision 1.2
 584.602 +retrieving revision 1.3
 584.603 +diff -u -r1.2 -r1.3
 584.604 +--- libc/linuxthreads_db/td_thr_getxregsize.c	6 Jul 2001 05:27:23 -0000	1.2
 584.605 ++++ libc/linuxthreads_db/td_thr_getxregsize.c	28 Dec 2001 16:41:29 -0000	1.3
 584.606 +@@ -1,5 +1,5 @@
 584.607 + /* Get the size of the extra state register set for this architecture.
 584.608 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.609 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.610 +    This file is part of the GNU C Library.
 584.611 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.612 + 
 584.613 +@@ -25,6 +25,6 @@
 584.614 + td_thr_getxregsize (const td_thrhandle_t *th, int *sizep)
 584.615 + {
 584.616 +   /* XXX This might be platform specific.  */
 584.617 +-  LOG (__FUNCTION__);
 584.618 ++  LOG ("td_thr_getxregsize");
 584.619 +   return TD_NOXREGS;
 584.620 + }
 584.621 +Index: td_thr_set_event.c
 584.622 +===================================================================
 584.623 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_set_event.c,v
 584.624 +retrieving revision 1.4
 584.625 +retrieving revision 1.5
 584.626 +diff -u -r1.4 -r1.5
 584.627 +--- libc/linuxthreads_db/td_thr_set_event.c	6 Jul 2001 05:27:23 -0000	1.4
 584.628 ++++ libc/linuxthreads_db/td_thr_set_event.c	28 Dec 2001 16:41:29 -0000	1.5
 584.629 +@@ -1,5 +1,5 @@
 584.630 + /* Enable specific event for thread.
 584.631 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.632 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.633 +    This file is part of the GNU C Library.
 584.634 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.635 + 
 584.636 +@@ -31,7 +31,7 @@
 584.637 +   td_thr_events_t old_event;
 584.638 +   int i;
 584.639 + 
 584.640 +-  LOG (__FUNCTION__);
 584.641 ++  LOG ("td_thr_set_event");
 584.642 + 
 584.643 +   /* Write the new value into the thread data structure.  */
 584.644 +   if (ps_pdread (th->th_ta_p->ph,
 584.645 +Index: td_thr_setfpregs.c
 584.646 +===================================================================
 584.647 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_setfpregs.c,v
 584.648 +retrieving revision 1.4
 584.649 +retrieving revision 1.5
 584.650 +diff -u -r1.4 -r1.5
 584.651 +--- libc/linuxthreads_db/td_thr_setfpregs.c	6 Jul 2001 05:27:23 -0000	1.4
 584.652 ++++ libc/linuxthreads_db/td_thr_setfpregs.c	28 Dec 2001 16:41:29 -0000	1.5
 584.653 +@@ -26,7 +26,7 @@
 584.654 + {
 584.655 +   struct _pthread_descr_struct pds;
 584.656 + 
 584.657 +-  LOG (__FUNCTION__);
 584.658 ++  LOG ("td_thr_setfpregs");
 584.659 + 
 584.660 +   /* We have to get the state and the PID for this thread.  */
 584.661 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 584.662 +Index: td_thr_setgregs.c
 584.663 +===================================================================
 584.664 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_setgregs.c,v
 584.665 +retrieving revision 1.6
 584.666 +retrieving revision 1.7
 584.667 +diff -u -r1.6 -r1.7
 584.668 +--- libc/linuxthreads_db/td_thr_setgregs.c	6 Jul 2001 05:27:23 -0000	1.6
 584.669 ++++ libc/linuxthreads_db/td_thr_setgregs.c	28 Dec 2001 16:41:29 -0000	1.7
 584.670 +@@ -26,7 +26,7 @@
 584.671 + {
 584.672 +   struct _pthread_descr_struct pds;
 584.673 + 
 584.674 +-  LOG (__FUNCTION__);
 584.675 ++  LOG ("td_thr_setgregs");
 584.676 + 
 584.677 +   /* We have to get the state and the PID for this thread.  */
 584.678 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 584.679 +Index: td_thr_setprio.c
 584.680 +===================================================================
 584.681 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_setprio.c,v
 584.682 +retrieving revision 1.2
 584.683 +retrieving revision 1.3
 584.684 +diff -u -r1.2 -r1.3
 584.685 +--- libc/linuxthreads_db/td_thr_setprio.c	6 Jul 2001 05:27:23 -0000	1.2
 584.686 ++++ libc/linuxthreads_db/td_thr_setprio.c	28 Dec 2001 16:41:29 -0000	1.3
 584.687 +@@ -1,5 +1,5 @@
 584.688 + /* Set a thread's priority.
 584.689 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.690 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.691 +    This file is part of the GNU C Library.
 584.692 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.693 + 
 584.694 +@@ -25,6 +25,6 @@
 584.695 + td_thr_setprio (const td_thrhandle_t *th, int prio)
 584.696 + {
 584.697 +   /* XXX We have to figure out what has to be done.  */
 584.698 +-  LOG (__FUNCTION__);
 584.699 ++  LOG ("td_thr_setprio");
 584.700 +   return TD_OK;
 584.701 + }
 584.702 +Index: td_thr_setsigpending.c
 584.703 +===================================================================
 584.704 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_setsigpending.c,v
 584.705 +retrieving revision 1.2
 584.706 +retrieving revision 1.3
 584.707 +diff -u -r1.2 -r1.3
 584.708 +--- libc/linuxthreads_db/td_thr_setsigpending.c	6 Jul 2001 05:27:23 -0000	1.2
 584.709 ++++ libc/linuxthreads_db/td_thr_setsigpending.c	28 Dec 2001 16:41:29 -0000	1.3
 584.710 +@@ -1,5 +1,5 @@
 584.711 + /* Raise a signal for a thread.
 584.712 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.713 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.714 +    This file is part of the GNU C Library.
 584.715 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.716 + 
 584.717 +@@ -26,6 +26,6 @@
 584.718 + 		      const sigset_t *ss)
 584.719 + {
 584.720 +   /* XXX We have to figure out what has to be done.  */
 584.721 +-  LOG (__FUNCTION__);
 584.722 ++  LOG ("td_thr_setsigpending");
 584.723 +   return TD_OK;
 584.724 + }
 584.725 +Index: td_thr_setxregs.c
 584.726 +===================================================================
 584.727 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_setxregs.c,v
 584.728 +retrieving revision 1.2
 584.729 +retrieving revision 1.3
 584.730 +diff -u -r1.2 -r1.3
 584.731 +--- libc/linuxthreads_db/td_thr_setxregs.c	6 Jul 2001 05:27:23 -0000	1.2
 584.732 ++++ libc/linuxthreads_db/td_thr_setxregs.c	28 Dec 2001 16:41:29 -0000	1.3
 584.733 +@@ -1,5 +1,5 @@
 584.734 + /* Set a thread's extra state register set.
 584.735 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.736 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.737 +    This file is part of the GNU C Library.
 584.738 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.739 + 
 584.740 +@@ -25,6 +25,6 @@
 584.741 + td_thr_setxregs (const td_thrhandle_t *ta, const void *addr)
 584.742 + {
 584.743 +   /* XXX This might have to be platform specific.  */
 584.744 +-  LOG (__FUNCTION__);
 584.745 ++  LOG ("td_thr_setxregs");
 584.746 +   return TD_NOXREGS;
 584.747 + }
 584.748 +Index: td_thr_sigsetmask.c
 584.749 +===================================================================
 584.750 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_sigsetmask.c,v
 584.751 +retrieving revision 1.2
 584.752 +retrieving revision 1.3
 584.753 +diff -u -r1.2 -r1.3
 584.754 +--- libc/linuxthreads_db/td_thr_sigsetmask.c	6 Jul 2001 05:27:23 -0000	1.2
 584.755 ++++ libc/linuxthreads_db/td_thr_sigsetmask.c	28 Dec 2001 16:41:29 -0000	1.3
 584.756 +@@ -1,5 +1,5 @@
 584.757 + /* Set a thread's signal mask.
 584.758 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.759 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.760 +    This file is part of the GNU C Library.
 584.761 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.762 + 
 584.763 +@@ -25,6 +25,6 @@
 584.764 + td_thr_sigsetmask (const td_thrhandle_t *th, const sigset_t *ss)
 584.765 + {
 584.766 +   /* XXX We have to figure out what has to be done.  */
 584.767 +-  LOG (__FUNCTION__);
 584.768 ++  LOG ("td_thr_sigsetmask");
 584.769 +   return TD_OK;
 584.770 + }
 584.771 +Index: td_thr_tsd.c
 584.772 +===================================================================
 584.773 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_tsd.c,v
 584.774 +retrieving revision 1.2
 584.775 +retrieving revision 1.3
 584.776 +diff -u -r1.2 -r1.3
 584.777 +--- libc/linuxthreads_db/td_thr_tsd.c	6 Jul 2001 05:27:23 -0000	1.2
 584.778 ++++ libc/linuxthreads_db/td_thr_tsd.c	28 Dec 2001 16:41:29 -0000	1.3
 584.779 +@@ -1,5 +1,5 @@
 584.780 + /* Get a thread-specific data pointer for a thread.
 584.781 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 584.782 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 584.783 +    This file is part of the GNU C Library.
 584.784 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 584.785 + 
 584.786 +@@ -33,7 +33,7 @@
 584.787 +   unsigned int idx2nd;
 584.788 +   void *p;
 584.789 + 
 584.790 +-  LOG (__FUNCTION__);
 584.791 ++  LOG ("td_thr_tsd");
 584.792 + 
 584.793 +   /* Get the thread descriptor.  */
 584.794 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 584.795 +Index: td_thr_validate.c
 584.796 +===================================================================
 584.797 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_validate.c,v
 584.798 +retrieving revision 1.4
 584.799 +retrieving revision 1.5
 584.800 +diff -u -r1.4 -r1.5
 584.801 +--- libc/linuxthreads_db/td_thr_validate.c	6 Jul 2001 05:27:23 -0000	1.4
 584.802 ++++ libc/linuxthreads_db/td_thr_validate.c	28 Dec 2001 16:41:29 -0000	1.5
 584.803 +@@ -28,7 +28,7 @@
 584.804 +   int pthread_threads_max = th->th_ta_p->pthread_threads_max;
 584.805 +   int cnt;
 584.806 + 
 584.807 +-  LOG (__FUNCTION__);
 584.808 ++  LOG ("td_thr_validate");
 584.809 + 
 584.810 +   /* Now get all descriptors, one after the other.  */
 584.811 +   for (cnt = 0; cnt < pthread_threads_max; ++cnt, ++handles)
   585.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   585.2 +++ b/patches/glibc/linuxthreads-2.2.2/glibc-linuxthreads-2.2.2-allow-gcc3.patch	Sat Feb 24 11:00:05 2007 +0000
   585.3 @@ -0,0 +1,497 @@
   585.4 +Fixes
   585.5 +td_init.c:30: error: parse error before string constant
   585.6 +td_init.c:30: error: parse error before string constant
   585.7 +
   585.8 +From http://sources.redhat.com/ml/crossgcc/2005-01/msg00106.html :
   585.9 +---
  585.10 +Date: Mon, 31 Jan 2005 10:27:32 -0800
  585.11 +Message-ID: <BF124E1E7928E546B5705D93C699ABDC0C7E99@glimmer.glimmerglassnet.com>
  585.12 +From: "Vince Chen" <chen at glimmerglass dot com>
  585.13 +To: <crossgcc at sources dot redhat dot com>
  585.14 +
  585.15 +I needed to build glibc-2.2.2 using gcc-3.x to support
  585.16 +some of our older redhat machines.
  585.17 +
  585.18 +This file patches glibc-linuxthreads-2.2.2.
  585.19 +
  585.20 +When using crosstool, I placed it in:
  585.21 +
  585.22 +   patches/glibc-linuxthreads-2.2.2/linuxthreads-gcc3.patch
  585.23 +
  585.24 +(you also need the glibc-gcc3.patch)
  585.25 +
  585.26 +-vince
  585.27 +---
  585.28 +[removed parts already in threadparam.patch]
  585.29 +
  585.30 +===================================================================
  585.31 +--- glibc-2.2.2/linuxthreads_db.orig/td_init.c	1999-11-22 12:52:34.000000000 -0800
  585.32 ++++ glibc-2.2.2/linuxthreads_db/td_init.c	2005-01-27 19:05:36.000000000 -0800
  585.33 +@@ -27,6 +27,6 @@
  585.34 + td_init (void)
  585.35 + {
  585.36 +   /* XXX We have to figure out what has to be done.  */
  585.37 +-  LOG (__FUNCTION__);
  585.38 ++  LOG ("td_init");
  585.39 +   return TD_OK;
  585.40 + }
  585.41 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_log.c glibc-2.2.2/linuxthreads_db/td_log.c
  585.42 +--- glibc-2.2.2/linuxthreads_db.orig/td_log.c	1999-10-07 23:31:32.000000000 -0700
  585.43 ++++ glibc-2.2.2/linuxthreads_db/td_log.c	2005-01-27 19:05:29.000000000 -0800
  585.44 +@@ -27,6 +27,6 @@
  585.45 +   /* This interface is deprecated in the Sun interface.  We provide it
  585.46 +      for compatibility but don't do anyhting ourself.  We might in
  585.47 +      future do some logging if this seems reasonable.  */
  585.48 +-  LOG (__FUNCTION__);
  585.49 ++  LOG ("td_log");
  585.50 +   return TD_OK;
  585.51 + }
  585.52 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_clear_event.c glibc-2.2.2/linuxthreads_db/td_ta_clear_event.c
  585.53 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_clear_event.c	1999-11-08 14:52:10.000000000 -0800
  585.54 ++++ glibc-2.2.2/linuxthreads_db/td_ta_clear_event.c	2005-01-27 19:05:20.000000000 -0800
  585.55 +@@ -22,14 +22,12 @@
  585.56 + 
  585.57 + 
  585.58 + td_err_e
  585.59 +-td_ta_clear_event (ta, event)
  585.60 +-     const td_thragent_t *ta;
  585.61 +-     td_thr_events_t *event;
  585.62 ++td_ta_clear_event (const td_thragent_t *ta, td_thr_events_t *event)
  585.63 + {
  585.64 +   td_thr_events_t old_event;
  585.65 +   int i;
  585.66 + 
  585.67 +-  LOG (__FUNCTION__);
  585.68 ++  LOG ("td_ta_clear_event");
  585.69 + 
  585.70 +   /* Test whether the TA parameter is ok.  */
  585.71 +   if (! ta_ok (ta))
  585.72 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_delete.c glibc-2.2.2/linuxthreads_db/td_ta_delete.c
  585.73 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_delete.c	1999-11-08 14:52:10.000000000 -0800
  585.74 ++++ glibc-2.2.2/linuxthreads_db/td_ta_delete.c	2005-01-27 19:04:59.000000000 -0800
  585.75 +@@ -26,7 +26,7 @@
  585.76 + td_err_e
  585.77 + td_ta_delete (td_thragent_t *ta)
  585.78 + {
  585.79 +-  LOG (__FUNCTION__);
  585.80 ++  LOG ("td_ta_delete");
  585.81 + 
  585.82 +   /* Safety check.  */
  585.83 +   if (ta == NULL || __td_agent_list == NULL)
  585.84 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_enable_stats.c glibc-2.2.2/linuxthreads_db/td_ta_enable_stats.c
  585.85 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_enable_stats.c	1999-11-08 14:52:10.000000000 -0800
  585.86 ++++ glibc-2.2.2/linuxthreads_db/td_ta_enable_stats.c	2005-01-27 19:04:50.000000000 -0800
  585.87 +@@ -25,7 +25,7 @@
  585.88 + td_ta_enable_stats (const td_thragent_t *ta, int enable)
  585.89 + {
  585.90 +   /* XXX We have to figure out what has to be done.  */
  585.91 +-  LOG (__FUNCTION__);
  585.92 ++  LOG ("td_ta_enable_stats");
  585.93 + 
  585.94 +   /* Test whether the TA parameter is ok.  */
  585.95 +   if (! ta_ok (ta))
  585.96 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_event_addr.c glibc-2.2.2/linuxthreads_db/td_ta_event_addr.c
  585.97 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_event_addr.c	1999-11-08 14:52:10.000000000 -0800
  585.98 ++++ glibc-2.2.2/linuxthreads_db/td_ta_event_addr.c	2005-01-27 19:04:41.000000000 -0800
  585.99 +@@ -29,7 +29,7 @@
 585.100 +   td_err_e res = TD_NOEVENT;
 585.101 +   const char *symbol = NULL;
 585.102 + 
 585.103 +-  LOG (__FUNCTION__);
 585.104 ++  LOG ("td_ta_event_addr");
 585.105 + 
 585.106 +   /* Test whether the TA parameter is ok.  */
 585.107 +   if (! ta_ok (ta))
 585.108 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_event_getmsg.c glibc-2.2.2/linuxthreads_db/td_ta_event_getmsg.c
 585.109 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_event_getmsg.c	1999-11-08 14:52:10.000000000 -0800
 585.110 ++++ glibc-2.2.2/linuxthreads_db/td_ta_event_getmsg.c	2005-01-27 19:04:33.000000000 -0800
 585.111 +@@ -32,7 +32,7 @@
 585.112 +   td_eventbuf_t event;
 585.113 +   psaddr_t addr;
 585.114 + 
 585.115 +-  LOG (__FUNCTION__);
 585.116 ++  LOG ("td_ta_event_getmsg");
 585.117 + 
 585.118 +   /* Test whether the TA parameter is ok.  */
 585.119 +   if (! ta_ok (ta))
 585.120 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_get_nthreads.c glibc-2.2.2/linuxthreads_db/td_ta_get_nthreads.c
 585.121 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_get_nthreads.c	1999-11-08 14:52:10.000000000 -0800
 585.122 ++++ glibc-2.2.2/linuxthreads_db/td_ta_get_nthreads.c	2005-01-27 19:04:25.000000000 -0800
 585.123 +@@ -26,7 +26,7 @@
 585.124 + {
 585.125 +   psaddr_t addr;
 585.126 + 
 585.127 +-  LOG (__FUNCTION__);
 585.128 ++  LOG ("td_ta_get_nthreads");
 585.129 + 
 585.130 +   /* Test whether the TA parameter is ok.  */
 585.131 +   if (! ta_ok (ta))
 585.132 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_get_ph.c glibc-2.2.2/linuxthreads_db/td_ta_get_ph.c
 585.133 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_get_ph.c	1999-11-08 14:52:10.000000000 -0800
 585.134 ++++ glibc-2.2.2/linuxthreads_db/td_ta_get_ph.c	2005-01-27 19:04:17.000000000 -0800
 585.135 +@@ -24,7 +24,7 @@
 585.136 + td_err_e
 585.137 + td_ta_get_ph (const td_thragent_t *ta, struct ps_prochandle **ph)
 585.138 + {
 585.139 +-  LOG (__FUNCTION__);
 585.140 ++  LOG ("td_ta_get_ph");
 585.141 + 
 585.142 +   /* Test whether the TA parameter is ok.  */
 585.143 +   if (! ta_ok (ta))
 585.144 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_get_stats.c glibc-2.2.2/linuxthreads_db/td_ta_get_stats.c
 585.145 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_get_stats.c	1999-11-08 14:52:10.000000000 -0800
 585.146 ++++ glibc-2.2.2/linuxthreads_db/td_ta_get_stats.c	2005-01-27 19:04:06.000000000 -0800
 585.147 +@@ -25,7 +25,7 @@
 585.148 + td_ta_get_stats (const td_thragent_t *ta, td_ta_stats_t *statsp)
 585.149 + {
 585.150 +   /* XXX We have to figure out what has to be done.  */
 585.151 +-  LOG (__FUNCTION__);
 585.152 ++  LOG ("td_ta_get_stats");
 585.153 + 
 585.154 +   /* Test whether the TA parameter is ok.  */
 585.155 +   if (! ta_ok (ta))
 585.156 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_map_id2thr.c glibc-2.2.2/linuxthreads_db/td_ta_map_id2thr.c
 585.157 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_map_id2thr.c	1999-11-08 14:52:10.000000000 -0800
 585.158 ++++ glibc-2.2.2/linuxthreads_db/td_ta_map_id2thr.c	2005-01-27 19:03:54.000000000 -0800
 585.159 +@@ -28,7 +28,7 @@
 585.160 +   struct _pthread_descr_struct pds;
 585.161 +   int pthread_threads_max;
 585.162 + 
 585.163 +-  LOG (__FUNCTION__);
 585.164 ++  LOG ("td_ta_map_id2thr");
 585.165 + 
 585.166 +   /* Test whether the TA parameter is ok.  */
 585.167 +   if (! ta_ok (ta))
 585.168 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_map_lwp2thr.c glibc-2.2.2/linuxthreads_db/td_ta_map_lwp2thr.c
 585.169 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_map_lwp2thr.c	1999-11-22 18:25:26.000000000 -0800
 585.170 ++++ glibc-2.2.2/linuxthreads_db/td_ta_map_lwp2thr.c	2005-01-27 19:03:46.000000000 -0800
 585.171 +@@ -34,7 +34,7 @@
 585.172 + # define num 1
 585.173 + #endif
 585.174 + 
 585.175 +-  LOG (__FUNCTION__);
 585.176 ++  LOG ("td_ta_map_lwp2thr");
 585.177 + 
 585.178 +   /* Test whether the TA parameter is ok.  */
 585.179 +   if (! ta_ok (ta))
 585.180 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_new.c glibc-2.2.2/linuxthreads_db/td_ta_new.c
 585.181 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_new.c	1999-11-08 14:52:10.000000000 -0800
 585.182 ++++ glibc-2.2.2/linuxthreads_db/td_ta_new.c	2005-01-27 19:03:36.000000000 -0800
 585.183 +@@ -36,7 +36,7 @@
 585.184 +   psaddr_t addr;
 585.185 +   struct agent_list *elemp;
 585.186 + 
 585.187 +-  LOG (__FUNCTION__);
 585.188 ++  LOG ("td_ta_new");
 585.189 + 
 585.190 +   /* Get the global event mask.  This is one of the variables which
 585.191 +      are new in the thread library to enable debugging.  If it is
 585.192 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_reset_stats.c glibc-2.2.2/linuxthreads_db/td_ta_reset_stats.c
 585.193 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_reset_stats.c	1999-11-08 14:52:10.000000000 -0800
 585.194 ++++ glibc-2.2.2/linuxthreads_db/td_ta_reset_stats.c	2005-01-27 19:03:27.000000000 -0800
 585.195 +@@ -25,7 +25,7 @@
 585.196 + td_ta_reset_stats (const td_thragent_t *ta)
 585.197 + {
 585.198 +   /* XXX We have to figure out what has to be done.  */
 585.199 +-  LOG (__FUNCTION__);
 585.200 ++  LOG ("td_ta_reset_stats");
 585.201 + 
 585.202 +   /* Test whether the TA parameter is ok.  */
 585.203 +   if (! ta_ok (ta))
 585.204 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_set_event.c glibc-2.2.2/linuxthreads_db/td_ta_set_event.c
 585.205 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_set_event.c	1999-11-08 14:52:10.000000000 -0800
 585.206 ++++ glibc-2.2.2/linuxthreads_db/td_ta_set_event.c	2005-01-27 19:03:15.000000000 -0800
 585.207 +@@ -22,14 +22,12 @@
 585.208 + 
 585.209 + 
 585.210 + td_err_e
 585.211 +-td_ta_set_event (ta, event)
 585.212 +-     const td_thragent_t *ta;
 585.213 +-     td_thr_events_t *event;
 585.214 ++td_ta_set_event (const td_thragent_t *ta, td_thr_events_t *event)
 585.215 + {
 585.216 +   td_thr_events_t old_event;
 585.217 +   int i;
 585.218 + 
 585.219 +-  LOG (__FUNCTION__);
 585.220 ++  LOG ("td_ta_set_event");
 585.221 + 
 585.222 +   /* Test whether the TA parameter is ok.  */
 585.223 +   if (! ta_ok (ta))
 585.224 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_setconcurrency.c glibc-2.2.2/linuxthreads_db/td_ta_setconcurrency.c
 585.225 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_setconcurrency.c	1999-11-08 14:52:10.000000000 -0800
 585.226 ++++ glibc-2.2.2/linuxthreads_db/td_ta_setconcurrency.c	2005-01-27 19:02:48.000000000 -0800
 585.227 +@@ -25,7 +25,7 @@
 585.228 + td_ta_setconcurrency (const td_thragent_t *ta, int level)
 585.229 + {
 585.230 +   /* This is something LinuxThreads does not support.  */
 585.231 +-  LOG (__FUNCTION__);
 585.232 ++  LOG ("td_ta_setconcurrency");
 585.233 + 
 585.234 +   /* Test whether the TA parameter is ok.  */
 585.235 +   if (! ta_ok (ta))
 585.236 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_thr_iter.c glibc-2.2.2/linuxthreads_db/td_ta_thr_iter.c
 585.237 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_thr_iter.c	2000-02-28 12:34:06.000000000 -0800
 585.238 ++++ glibc-2.2.2/linuxthreads_db/td_ta_thr_iter.c	2005-01-27 19:02:39.000000000 -0800
 585.239 +@@ -86,7 +86,7 @@
 585.240 + # define num 1
 585.241 + #endif
 585.242 + 
 585.243 +-  LOG (__FUNCTION__);
 585.244 ++  LOG ("td_ta_thr_iter");
 585.245 + 
 585.246 +   /* Test whether the TA parameter is ok.  */
 585.247 +   if (! ta_ok (ta))
 585.248 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_ta_tsd_iter.c glibc-2.2.2/linuxthreads_db/td_ta_tsd_iter.c
 585.249 +--- glibc-2.2.2/linuxthreads_db.orig/td_ta_tsd_iter.c	2000-02-28 12:34:06.000000000 -0800
 585.250 ++++ glibc-2.2.2/linuxthreads_db/td_ta_tsd_iter.c	2005-01-27 19:02:29.000000000 -0800
 585.251 +@@ -29,7 +29,7 @@
 585.252 +   int pthread_keys_max;
 585.253 +   int cnt;
 585.254 + 
 585.255 +-  LOG (__FUNCTION__);
 585.256 ++  LOG ("td_ta_tsd_iter");
 585.257 + 
 585.258 +   /* Test whether the TA parameter is ok.  */
 585.259 +   if (! ta_ok (ta))
 585.260 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_clear_event.c glibc-2.2.2/linuxthreads_db/td_thr_clear_event.c
 585.261 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_clear_event.c	1999-11-03 10:37:18.000000000 -0800
 585.262 ++++ glibc-2.2.2/linuxthreads_db/td_thr_clear_event.c	2005-01-27 19:02:19.000000000 -0800
 585.263 +@@ -24,14 +24,12 @@
 585.264 + 
 585.265 + 
 585.266 + td_err_e
 585.267 +-td_thr_clear_event (th, event)
 585.268 +-     const td_thrhandle_t *th;
 585.269 +-     td_thr_events_t *event;
 585.270 ++td_thr_clear_event (const td_thrhandle_t *th, td_thr_events_t *event)
 585.271 + {
 585.272 +   td_thr_events_t old_event;
 585.273 +   int i;
 585.274 + 
 585.275 +-  LOG (__FUNCTION__);
 585.276 ++  LOG ("td_thr_clear_event");
 585.277 + 
 585.278 +   /* Write the new value into the thread data structure.  */
 585.279 +   if (ps_pdread (th->th_ta_p->ph,
 585.280 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_dbresume.c glibc-2.2.2/linuxthreads_db/td_thr_dbresume.c
 585.281 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_dbresume.c	1999-10-07 23:40:02.000000000 -0700
 585.282 ++++ glibc-2.2.2/linuxthreads_db/td_thr_dbresume.c	2005-01-27 19:01:54.000000000 -0800
 585.283 +@@ -25,6 +25,6 @@
 585.284 + td_thr_dbresume (const td_thrhandle_t *th)
 585.285 + {
 585.286 +   /* XXX We have to figure out what has to be done.  */
 585.287 +-  LOG (__FUNCTION__);
 585.288 ++  LOG ("td_thr_dbresume");
 585.289 +   return TD_NOCAPAB;
 585.290 + }
 585.291 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_dbsuspend.c glibc-2.2.2/linuxthreads_db/td_thr_dbsuspend.c
 585.292 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_dbsuspend.c	1999-10-07 23:40:33.000000000 -0700
 585.293 ++++ glibc-2.2.2/linuxthreads_db/td_thr_dbsuspend.c	2005-01-27 19:01:46.000000000 -0800
 585.294 +@@ -25,6 +25,6 @@
 585.295 + td_thr_dbsuspend (const td_thrhandle_t *th)
 585.296 + {
 585.297 +   /* XXX We have to figure out what has to be done.  */
 585.298 +-  LOG (__FUNCTION__);
 585.299 ++  LOG ("td_thr_dbsuspend");
 585.300 +   return TD_NOCAPAB;
 585.301 + }
 585.302 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_event_enable.c glibc-2.2.2/linuxthreads_db/td_thr_event_enable.c
 585.303 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_event_enable.c	1999-11-02 16:06:10.000000000 -0800
 585.304 ++++ glibc-2.2.2/linuxthreads_db/td_thr_event_enable.c	2005-01-27 19:01:35.000000000 -0800
 585.305 +@@ -24,11 +24,9 @@
 585.306 + 
 585.307 + 
 585.308 + td_err_e
 585.309 +-td_thr_event_enable (th, onoff)
 585.310 +-     const td_thrhandle_t *th;
 585.311 +-     int onoff;
 585.312 ++td_thr_event_enable (const td_thrhandle_t *th, int onoff)
 585.313 + {
 585.314 +-  LOG (__FUNCTION__);
 585.315 ++  LOG ("td_thr_event_enable");
 585.316 + 
 585.317 +   /* Write the new value into the thread data structure.  */
 585.318 +   if (ps_pdwrite (th->th_ta_p->ph,
 585.319 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_event_getmsg.c glibc-2.2.2/linuxthreads_db/td_thr_event_getmsg.c
 585.320 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_event_getmsg.c	1999-11-02 16:06:10.000000000 -0800
 585.321 ++++ glibc-2.2.2/linuxthreads_db/td_thr_event_getmsg.c	2005-01-27 19:01:11.000000000 -0800
 585.322 +@@ -29,7 +29,7 @@
 585.323 + {
 585.324 +   td_eventbuf_t event;
 585.325 + 
 585.326 +-  LOG (__FUNCTION__);
 585.327 ++  LOG ("td_thr_event_getmsg");
 585.328 + 
 585.329 +   /* Read the even structure from the target.  */
 585.330 +   if (ps_pdread (th->th_ta_p->ph,
 585.331 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_get_info.c glibc-2.2.2/linuxthreads_db/td_thr_get_info.c
 585.332 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_get_info.c	2000-05-01 14:56:42.000000000 -0700
 585.333 ++++ glibc-2.2.2/linuxthreads_db/td_thr_get_info.c	2005-01-27 19:00:59.000000000 -0800
 585.334 +@@ -29,7 +29,7 @@
 585.335 + {
 585.336 +   struct _pthread_descr_struct pds;
 585.337 + 
 585.338 +-  LOG (__FUNCTION__);
 585.339 ++  LOG ("td_thr_get_info");
 585.340 + 
 585.341 +   /* Get the thread descriptor.  */
 585.342 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 585.343 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_getfpregs.c glibc-2.2.2/linuxthreads_db/td_thr_getfpregs.c
 585.344 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_getfpregs.c	1999-11-02 16:06:10.000000000 -0800
 585.345 ++++ glibc-2.2.2/linuxthreads_db/td_thr_getfpregs.c	2005-01-27 19:00:49.000000000 -0800
 585.346 +@@ -26,7 +26,7 @@
 585.347 + {
 585.348 +   struct _pthread_descr_struct pds;
 585.349 + 
 585.350 +-  LOG (__FUNCTION__);
 585.351 ++  LOG ("td_thr_getfpregs");
 585.352 + 
 585.353 +   /* We have to get the state and the PID for this thread.  */
 585.354 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 585.355 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_getgregs.c glibc-2.2.2/linuxthreads_db/td_thr_getgregs.c
 585.356 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_getgregs.c	2000-02-11 15:48:51.000000000 -0800
 585.357 ++++ glibc-2.2.2/linuxthreads_db/td_thr_getgregs.c	2005-01-27 19:00:37.000000000 -0800
 585.358 +@@ -26,7 +26,7 @@
 585.359 + {
 585.360 +   struct _pthread_descr_struct pds;
 585.361 + 
 585.362 +-  LOG (__FUNCTION__);
 585.363 ++  LOG ("td_thr_getgregs");
 585.364 + 
 585.365 +   /* We have to get the state and the PID for this thread.  */
 585.366 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 585.367 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_getxregs.c glibc-2.2.2/linuxthreads_db/td_thr_getxregs.c
 585.368 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_getxregs.c	1999-10-07 23:46:09.000000000 -0700
 585.369 ++++ glibc-2.2.2/linuxthreads_db/td_thr_getxregs.c	2005-01-27 19:00:26.000000000 -0800
 585.370 +@@ -25,6 +25,6 @@
 585.371 + td_thr_getxregs (const td_thrhandle_t *th, void *xregs)
 585.372 + {
 585.373 +   /* XXX This might be platform specific.  */
 585.374 +-  LOG (__FUNCTION__);
 585.375 ++  LOG ("td_thr_getxregs");
 585.376 +   return TD_NOXREGS;
 585.377 + }
 585.378 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_getxregsize.c glibc-2.2.2/linuxthreads_db/td_thr_getxregsize.c
 585.379 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_getxregsize.c	1999-10-07 23:46:33.000000000 -0700
 585.380 ++++ glibc-2.2.2/linuxthreads_db/td_thr_getxregsize.c	2005-01-27 19:00:16.000000000 -0800
 585.381 +@@ -25,6 +25,6 @@
 585.382 + td_thr_getxregsize (const td_thrhandle_t *th, int *sizep)
 585.383 + {
 585.384 +   /* XXX This might be platform specific.  */
 585.385 +-  LOG (__FUNCTION__);
 585.386 ++  LOG ("td_thr_getxregsize");
 585.387 +   return TD_NOXREGS;
 585.388 + }
 585.389 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_set_event.c glibc-2.2.2/linuxthreads_db/td_thr_set_event.c
 585.390 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_set_event.c	1999-11-03 10:37:18.000000000 -0800
 585.391 ++++ glibc-2.2.2/linuxthreads_db/td_thr_set_event.c	2005-01-27 19:00:08.000000000 -0800
 585.392 +@@ -24,14 +24,12 @@
 585.393 + 
 585.394 + 
 585.395 + td_err_e
 585.396 +-td_thr_set_event (th, event)
 585.397 +-     const td_thrhandle_t *th;
 585.398 +-     td_thr_events_t *event;
 585.399 ++td_thr_set_event (const td_thrhandle_t *th, td_thr_events_t *event)
 585.400 + {
 585.401 +   td_thr_events_t old_event;
 585.402 +   int i;
 585.403 + 
 585.404 +-  LOG (__FUNCTION__);
 585.405 ++  LOG ("td_thr_set_event");
 585.406 + 
 585.407 +   /* Write the new value into the thread data structure.  */
 585.408 +   if (ps_pdread (th->th_ta_p->ph,
 585.409 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_setfpregs.c glibc-2.2.2/linuxthreads_db/td_thr_setfpregs.c
 585.410 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_setfpregs.c	1999-11-02 16:06:10.000000000 -0800
 585.411 ++++ glibc-2.2.2/linuxthreads_db/td_thr_setfpregs.c	2005-01-27 18:59:06.000000000 -0800
 585.412 +@@ -26,7 +26,7 @@
 585.413 + {
 585.414 +   struct _pthread_descr_struct pds;
 585.415 + 
 585.416 +-  LOG (__FUNCTION__);
 585.417 ++  LOG ("td_thr_setfpregs");
 585.418 + 
 585.419 +   /* We have to get the state and the PID for this thread.  */
 585.420 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 585.421 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_setgregs.c glibc-2.2.2/linuxthreads_db/td_thr_setgregs.c
 585.422 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_setgregs.c	2000-02-11 15:48:51.000000000 -0800
 585.423 ++++ glibc-2.2.2/linuxthreads_db/td_thr_setgregs.c	2005-01-27 18:58:57.000000000 -0800
 585.424 +@@ -26,7 +26,7 @@
 585.425 + {
 585.426 +   struct _pthread_descr_struct pds;
 585.427 + 
 585.428 +-  LOG (__FUNCTION__);
 585.429 ++  LOG ("td_thr_setgregs");
 585.430 + 
 585.431 +   /* We have to get the state and the PID for this thread.  */
 585.432 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 585.433 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_setprio.c glibc-2.2.2/linuxthreads_db/td_thr_setprio.c
 585.434 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_setprio.c	1999-10-07 23:49:11.000000000 -0700
 585.435 ++++ glibc-2.2.2/linuxthreads_db/td_thr_setprio.c	2005-01-27 18:58:46.000000000 -0800
 585.436 +@@ -25,6 +25,6 @@
 585.437 + td_thr_setprio (const td_thrhandle_t *th, int prio)
 585.438 + {
 585.439 +   /* XXX We have to figure out what has to be done.  */
 585.440 +-  LOG (__FUNCTION__);
 585.441 ++  LOG ("td_thr_setprio");
 585.442 +   return TD_OK;
 585.443 + }
 585.444 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_setsigpending.c glibc-2.2.2/linuxthreads_db/td_thr_setsigpending.c
 585.445 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_setsigpending.c	1999-10-07 23:49:38.000000000 -0700
 585.446 ++++ glibc-2.2.2/linuxthreads_db/td_thr_setsigpending.c	2005-01-27 18:58:34.000000000 -0800
 585.447 +@@ -26,6 +26,6 @@
 585.448 + 		      const sigset_t *ss)
 585.449 + {
 585.450 +   /* XXX We have to figure out what has to be done.  */
 585.451 +-  LOG (__FUNCTION__);
 585.452 ++  LOG ("td_thr_setsigpending");
 585.453 +   return TD_OK;
 585.454 + }
 585.455 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_setxregs.c glibc-2.2.2/linuxthreads_db/td_thr_setxregs.c
 585.456 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_setxregs.c	1999-10-07 23:48:20.000000000 -0700
 585.457 ++++ glibc-2.2.2/linuxthreads_db/td_thr_setxregs.c	2005-01-27 18:58:21.000000000 -0800
 585.458 +@@ -25,6 +25,6 @@
 585.459 + td_thr_setxregs (const td_thrhandle_t *ta, const void *addr)
 585.460 + {
 585.461 +   /* XXX This might have to be platform specific.  */
 585.462 +-  LOG (__FUNCTION__);
 585.463 ++  LOG ("td_thr_setxregs");
 585.464 +   return TD_NOXREGS;
 585.465 + }
 585.466 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_sigsetmask.c glibc-2.2.2/linuxthreads_db/td_thr_sigsetmask.c
 585.467 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_sigsetmask.c	1999-10-07 23:50:34.000000000 -0700
 585.468 ++++ glibc-2.2.2/linuxthreads_db/td_thr_sigsetmask.c	2005-01-27 18:57:58.000000000 -0800
 585.469 +@@ -25,6 +25,6 @@
 585.470 + td_thr_sigsetmask (const td_thrhandle_t *th, const sigset_t *ss)
 585.471 + {
 585.472 +   /* XXX We have to figure out what has to be done.  */
 585.473 +-  LOG (__FUNCTION__);
 585.474 ++  LOG ("td_thr_sigsetmask");
 585.475 +   return TD_OK;
 585.476 + }
 585.477 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_tsd.c glibc-2.2.2/linuxthreads_db/td_thr_tsd.c
 585.478 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_tsd.c	1999-10-07 23:52:15.000000000 -0700
 585.479 ++++ glibc-2.2.2/linuxthreads_db/td_thr_tsd.c	2005-01-27 18:58:09.000000000 -0800
 585.480 +@@ -33,7 +33,7 @@
 585.481 +   unsigned int idx2nd;
 585.482 +   void *p;
 585.483 + 
 585.484 +-  LOG (__FUNCTION__);
 585.485 ++  LOG ("td_thr_tsd");
 585.486 + 
 585.487 +   /* Get the thread descriptor.  */
 585.488 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 585.489 +diff -ru glibc-2.2.2/linuxthreads_db.orig/td_thr_validate.c glibc-2.2.2/linuxthreads_db/td_thr_validate.c
 585.490 +--- glibc-2.2.2/linuxthreads_db.orig/td_thr_validate.c	1999-10-14 17:24:20.000000000 -0700
 585.491 ++++ glibc-2.2.2/linuxthreads_db/td_thr_validate.c	2005-01-27 18:57:41.000000000 -0800
 585.492 +@@ -28,7 +28,7 @@
 585.493 +   int pthread_threads_max = th->th_ta_p->pthread_threads_max;
 585.494 +   int cnt;
 585.495 + 
 585.496 +-  LOG (__FUNCTION__);
 585.497 ++  LOG ("td_thr_validate");
 585.498 + 
 585.499 +   /* Now get all descriptors, one after the other.  */
 585.500 +   for (cnt = 0; cnt < pthread_threads_max; ++cnt, ++handles)
   586.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   586.2 +++ b/patches/glibc/linuxthreads-2.2.2/threadparam.patch	Sat Feb 24 11:00:05 2007 +0000
   586.3 @@ -0,0 +1,69 @@
   586.4 +2002-05-21  Ulrich Drepper  <drepper@redhat.com>
   586.5 +
   586.6 +	* sysdeps/pthread/pthread.h (pthread_create): Rename first parameter.
   586.7 +	(pthread_cancel): Likewise.
   586.8 +	* internals.h (__pthread_create_2_1): Likewise.
   586.9 +	* sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
  586.10 +===================================================================
  586.11 +RCS file: /cvs/glibc/libc/linuxthreads/internals.h,v
  586.12 +retrieving revision 1.69.2.2
  586.13 +retrieving revision 1.69.2.3
  586.14 +diff -u -r1.69.2.2 -r1.69.2.3
  586.15 +--- libc/linuxthreads/internals.h	2002/03/22 08:30:32	1.69.2.2
  586.16 ++++ libc/linuxthreads/internals.h	2002/08/20 22:01:25	1.69.2.3
  586.17 +@@ -554,7 +554,7 @@
  586.18 + /* Prototypes for compatibility functions.  */
  586.19 + extern int __pthread_attr_init_2_1 (pthread_attr_t *__attr);
  586.20 + extern int __pthread_attr_init_2_0 (pthread_attr_t *__attr);
  586.21 +-extern int __pthread_create_2_1 (pthread_t *__restrict __thread,
  586.22 ++extern int __pthread_create_2_1 (pthread_t *__restrict __threadp,
  586.23 + 				 const pthread_attr_t *__attr,
  586.24 + 				 void *(*__start_routine) (void *),
  586.25 + 				 void *__restrict __arg);
  586.26 +===================================================================
  586.27 +RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/pthread/pthread.h,v
  586.28 +retrieving revision 1.31
  586.29 +retrieving revision 1.31.2.1
  586.30 +diff -u -r1.31 -r1.31.2.1
  586.31 +--- libc/linuxthreads/sysdeps/pthread/pthread.h	2001/03/15 21:12:31	1.31
  586.32 ++++ libc/linuxthreads/sysdeps/pthread/pthread.h	2002/08/20 22:01:26	1.31.2.1
  586.33 +@@ -160,7 +160,7 @@
  586.34 + /* Create a thread with given attributes ATTR (or default attributes
  586.35 +    if ATTR is NULL), and call function START_ROUTINE with given
  586.36 +    arguments ARG.  */
  586.37 +-extern int pthread_create (pthread_t *__restrict __thread,
  586.38 ++extern int pthread_create (pthread_t *__restrict __threadp,
  586.39 + 			   __const pthread_attr_t *__restrict __attr,
  586.40 + 			   void *(*__start_routine) (void *),
  586.41 + 			   void *__restrict __arg) __THROW;
  586.42 +@@ -588,7 +588,7 @@
  586.43 + extern int pthread_setcanceltype (int __type, int *__oldtype) __THROW;
  586.44 + 
  586.45 + /* Cancel THREAD immediately or at the next possibility.  */
  586.46 +-extern int pthread_cancel (pthread_t __thread) __THROW;
  586.47 ++extern int pthread_cancel (pthread_t __cancelthread) __THROW;
  586.48 + 
  586.49 + /* Test for pending cancellation for the current thread and terminate
  586.50 +    the thread as per pthread_exit(PTHREAD_CANCELED) if it has been
  586.51 +===================================================================
  586.52 +RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h,v
  586.53 +retrieving revision 1.5
  586.54 +retrieving revision 1.5.2.1
  586.55 +diff -u -r1.5 -r1.5.2.1
  586.56 +--- libc/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h	2000/08/21 06:48:03	1.5
  586.57 ++++ libc/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h	2002/08/20 22:01:26	1.5.2.1
  586.58 +@@ -1,5 +1,5 @@
  586.59 + /* Signal handling function for threaded programs.
  586.60 +-   Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
  586.61 ++   Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
  586.62 +    This file is part of the GNU C Library.
  586.63 + 
  586.64 +    The GNU C Library is free software; you can redistribute it and/or
  586.65 +@@ -33,6 +33,6 @@
  586.66 + 			    __sigset_t *__restrict __oldmask)__THROW;
  586.67 + 
  586.68 + /* Send signal SIGNO to the given thread. */
  586.69 +-extern int pthread_kill (pthread_t __thread, int __signo) __THROW;
  586.70 ++extern int pthread_kill (pthread_t __threadid, int __signo) __THROW;
  586.71 + 
  586.72 + #endif	/* bits/sigthread.h */
   587.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   587.2 +++ b/patches/glibc/linuxthreads-2.2.5/glibc-2.2.5-allow-gcc-3.4-td.patch	Sat Feb 24 11:00:05 2007 +0000
   587.3 @@ -0,0 +1,881 @@
   587.4 +Fixes following error building glibc-2.2.5 with gcc-3.4:
   587.5 +td_init.c: In function `td_init':
   587.6 +td_init.c:30: error: parse error before string constant
   587.7 +td_init.c:30: error: parse error before string constant
   587.8 +make[2]: *** [/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.2.5/build-glibc/linuxthreads_db/td_init.os] Error 1
   587.9 +
  587.10 +# Retrieved by diffing a +-1 day rng around the time mentioned
  587.11 +# in http://sources.redhat.com/ml/glibc-cvs/2001-q4/msg00654.html
  587.12 +# cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc diff -u -D"2001-12-27 08:41:30" -D"2001-12-29 08:41:32"
  587.13 +# then fixing paths.
  587.14 +
  587.15 +Index: ChangeLog
  587.16 +===================================================================
  587.17 +RCS file: /cvs/glibc/libc/linuxthreads_db/ChangeLog,v
  587.18 +retrieving revision 1.41
  587.19 +retrieving revision 1.42
  587.20 +diff -u -r1.41 -r1.42
  587.21 +--- libc/linuxthreads_db/ChangeLog	13 Apr 2001 00:09:54 -0000	1.41
  587.22 ++++ libc/linuxthreads_db/ChangeLog	29 Dec 2001 00:59:58 -0000	1.42
  587.23 +@@ -1,3 +1,43 @@
  587.24 ++2001-12-28  Andreas Jaeger  <aj@suse.de>
  587.25 ++
  587.26 ++	* td_init.c (td_init): Don't use __FUNCTION__ as literal.
  587.27 ++	* td_log.c (td_log): Likewise.
  587.28 ++	* td_ta_delete.c (td_ta_delete): Likewise.
  587.29 ++	* td_ta_get_nthreads.c (td_ta_get_nthreads): Likewise.
  587.30 ++	* td_ta_get_ph.c (td_ta_get_ph): Likewise.
  587.31 ++	* td_ta_map_id2thr.c (td_ta_map_id2thr): Likewise.
  587.32 ++	* td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Likewise.
  587.33 ++	* td_ta_new.c (td_ta_new): Likewise.
  587.34 ++	* td_ta_clear_event.c (td_ta_clear_event): Likewise.
  587.35 ++	* td_ta_enable_stats.c (td_ta_enable_stats): Likewise.
  587.36 ++	* td_ta_event_addr.c (td_ta_event_addr): Likewise.
  587.37 ++	* td_ta_event_getmsg.c (td_ta_event_getmsg): Likewise.
  587.38 ++	* td_ta_get_stats.c (td_ta_get_stats): Likewise.
  587.39 ++	* td_ta_reset_stats.c (td_ta_reset_stats): Likewise.
  587.40 ++	* td_ta_set_event.c (td_ta_set_event): Likewise.
  587.41 ++	* td_ta_setconcurrency.c (td_ta_setconcurrency): Likewise.
  587.42 ++	* td_ta_thr_iter.c (td_ta_thr_iter): Likewise.
  587.43 ++	* td_ta_tsd_iter.c (td_ta_tsd_iter): Likewise.
  587.44 ++	* td_thr_clear_event.c (td_thr_clear_event): Likewise.
  587.45 ++	* td_thr_dbresume.c (td_thr_dbresume): Likewise.
  587.46 ++	* td_thr_dbsuspend.c (td_thr_dbsuspend): Likewise.
  587.47 ++	* td_thr_event_enable.c (td_thr_event_enable): Likewise.
  587.48 ++	* td_thr_event_getmsg.c (td_thr_event_getmsg): Likewise.
  587.49 ++	* td_thr_get_info.c (td_thr_get_info): Likewise.
  587.50 ++	* td_thr_getfpregs.c (td_thr_getfpregs): Likewise.
  587.51 ++	* td_thr_getgregs.c (td_thr_getgregs): Likewise.
  587.52 ++	* td_thr_getxregs.c (td_thr_getxregs): Likewise.
  587.53 ++	* td_thr_getxregsize.c (td_thr_getxregsize): Likewise.
  587.54 ++	* td_thr_set_event.c (td_thr_set_event): Likewise.
  587.55 ++	* td_thr_setfpregs.c (td_thr_setfpregs): Likewise.
  587.56 ++	* td_thr_setgregs.c (td_thr_setgregs): Likewise.
  587.57 ++	* td_thr_setprio.c (td_thr_setprio): Likewise.
  587.58 ++	* td_thr_setsigpending.c (td_thr_setsigpending): Likewise.
  587.59 ++	* td_thr_setxregs.c (td_thr_setxregs): Likewise.
  587.60 ++	* td_thr_sigsetmask.c (td_thr_sigsetmask): Likewise.
  587.61 ++	* td_thr_tsd.c (td_thr_tsd): Likewise.
  587.62 ++	* td_thr_validate.c (td_thr_validate): Likewise.
  587.63 ++
  587.64 + 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
  587.65 + 
  587.66 + 	* td_ta_map_id2thr.c: If thread terminated return TD_NOTHR.
  587.67 +Index: td_init.c
  587.68 +===================================================================
  587.69 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_init.c,v
  587.70 +retrieving revision 1.3
  587.71 +retrieving revision 1.4
  587.72 +diff -u -r1.3 -r1.4
  587.73 +--- libc/linuxthreads_db/td_init.c	6 Jul 2001 05:27:23 -0000	1.3
  587.74 ++++ libc/linuxthreads_db/td_init.c	28 Dec 2001 16:41:29 -0000	1.4
  587.75 +@@ -1,5 +1,5 @@
  587.76 + /* Initialization function of thread debugger support library.
  587.77 +-   Copyright (C) 1999 Free Software Foundation, Inc.
  587.78 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
  587.79 +    This file is part of the GNU C Library.
  587.80 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
  587.81 + 
  587.82 +@@ -27,6 +27,6 @@
  587.83 + td_init (void)
  587.84 + {
  587.85 +   /* XXX We have to figure out what has to be done.  */
  587.86 +-  LOG (__FUNCTION__);
  587.87 ++  LOG ("td_init");
  587.88 +   return TD_OK;
  587.89 + }
  587.90 +Index: td_log.c
  587.91 +===================================================================
  587.92 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_log.c,v
  587.93 +retrieving revision 1.2
  587.94 +retrieving revision 1.3
  587.95 +diff -u -r1.2 -r1.3
  587.96 +--- libc/linuxthreads_db/td_log.c	6 Jul 2001 05:27:23 -0000	1.2
  587.97 ++++ libc/linuxthreads_db/td_log.c	28 Dec 2001 16:41:29 -0000	1.3
  587.98 +@@ -1,5 +1,5 @@
  587.99 + /* Noop, left for historical reasons.
 587.100 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.101 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.102 +    This file is part of the GNU C Library.
 587.103 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.104 + 
 587.105 +@@ -25,8 +25,8 @@
 587.106 + td_log (void)
 587.107 + {
 587.108 +   /* This interface is deprecated in the Sun interface.  We provide it
 587.109 +-     for compatibility but don't do anyhting ourself.  We might in
 587.110 ++     for compatibility but don't do anything ourself.  We might in
 587.111 +      future do some logging if this seems reasonable.  */
 587.112 +-  LOG (__FUNCTION__);
 587.113 ++  LOG ("td_log");
 587.114 +   return TD_OK;
 587.115 + }
 587.116 +Index: td_ta_clear_event.c
 587.117 +===================================================================
 587.118 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_clear_event.c,v
 587.119 +retrieving revision 1.3
 587.120 +retrieving revision 1.4
 587.121 +diff -u -r1.3 -r1.4
 587.122 +--- libc/linuxthreads_db/td_ta_clear_event.c	6 Jul 2001 05:27:23 -0000	1.3
 587.123 ++++ libc/linuxthreads_db/td_ta_clear_event.c	28 Dec 2001 16:41:29 -0000	1.4
 587.124 +@@ -1,5 +1,5 @@
 587.125 + /* Globally disable events.
 587.126 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.127 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.128 +    This file is part of the GNU C Library.
 587.129 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.130 + 
 587.131 +@@ -29,7 +29,7 @@
 587.132 +   td_thr_events_t old_event;
 587.133 +   int i;
 587.134 + 
 587.135 +-  LOG (__FUNCTION__);
 587.136 ++  LOG ("td_ta_clear_event");
 587.137 + 
 587.138 +   /* Test whether the TA parameter is ok.  */
 587.139 +   if (! ta_ok (ta))
 587.140 +Index: td_ta_delete.c
 587.141 +===================================================================
 587.142 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_delete.c,v
 587.143 +retrieving revision 1.3
 587.144 +retrieving revision 1.4
 587.145 +diff -u -r1.3 -r1.4
 587.146 +--- libc/linuxthreads_db/td_ta_delete.c	6 Jul 2001 05:27:23 -0000	1.3
 587.147 ++++ libc/linuxthreads_db/td_ta_delete.c	28 Dec 2001 16:41:29 -0000	1.4
 587.148 +@@ -1,5 +1,5 @@
 587.149 + /* Detach to target process.
 587.150 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.151 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.152 +    This file is part of the GNU C Library.
 587.153 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.154 + 
 587.155 +@@ -26,7 +26,7 @@
 587.156 + td_err_e
 587.157 + td_ta_delete (td_thragent_t *ta)
 587.158 + {
 587.159 +-  LOG (__FUNCTION__);
 587.160 ++  LOG ("td_ta_delete");
 587.161 + 
 587.162 +   /* Safety check.  */
 587.163 +   if (ta == NULL || __td_agent_list == NULL)
 587.164 +Index: td_ta_enable_stats.c
 587.165 +===================================================================
 587.166 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_enable_stats.c,v
 587.167 +retrieving revision 1.3
 587.168 +retrieving revision 1.4
 587.169 +diff -u -r1.3 -r1.4
 587.170 +--- libc/linuxthreads_db/td_ta_enable_stats.c	6 Jul 2001 05:27:23 -0000	1.3
 587.171 ++++ libc/linuxthreads_db/td_ta_enable_stats.c	28 Dec 2001 16:41:29 -0000	1.4
 587.172 +@@ -1,5 +1,5 @@
 587.173 + /* Enable collection of statistics for process.
 587.174 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.175 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.176 +    This file is part of the GNU C Library.
 587.177 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.178 + 
 587.179 +@@ -25,7 +25,7 @@
 587.180 + td_ta_enable_stats (const td_thragent_t *ta, int enable)
 587.181 + {
 587.182 +   /* XXX We have to figure out what has to be done.  */
 587.183 +-  LOG (__FUNCTION__);
 587.184 ++  LOG ("td_ta_enable_stats");
 587.185 + 
 587.186 +   /* Test whether the TA parameter is ok.  */
 587.187 +   if (! ta_ok (ta))
 587.188 +Index: td_ta_event_addr.c
 587.189 +===================================================================
 587.190 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_event_addr.c,v
 587.191 +retrieving revision 1.5
 587.192 +retrieving revision 1.6
 587.193 +diff -u -r1.5 -r1.6
 587.194 +--- libc/linuxthreads_db/td_ta_event_addr.c	6 Jul 2001 05:27:23 -0000	1.5
 587.195 ++++ libc/linuxthreads_db/td_ta_event_addr.c	28 Dec 2001 16:41:29 -0000	1.6
 587.196 +@@ -27,7 +27,7 @@
 587.197 +   td_err_e res = TD_NOEVENT;
 587.198 +   int idx = -1;
 587.199 + 
 587.200 +-  LOG (__FUNCTION__);
 587.201 ++  LOG ("td_ta_event_addr");
 587.202 + 
 587.203 +   /* Test whether the TA parameter is ok.  */
 587.204 +   if (! ta_ok (ta))
 587.205 +Index: td_ta_event_getmsg.c
 587.206 +===================================================================
 587.207 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_event_getmsg.c,v
 587.208 +retrieving revision 1.5
 587.209 +retrieving revision 1.6
 587.210 +diff -u -r1.5 -r1.6
 587.211 +--- libc/linuxthreads_db/td_ta_event_getmsg.c	6 Jul 2001 05:27:23 -0000	1.5
 587.212 ++++ libc/linuxthreads_db/td_ta_event_getmsg.c	28 Dec 2001 16:41:29 -0000	1.6
 587.213 +@@ -1,5 +1,5 @@
 587.214 + /* Retrieve event.
 587.215 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.216 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.217 +    This file is part of the GNU C Library.
 587.218 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.219 + 
 587.220 +@@ -32,7 +32,7 @@
 587.221 +   td_eventbuf_t event;
 587.222 +   psaddr_t addr;
 587.223 + 
 587.224 +-  LOG (__FUNCTION__);
 587.225 ++  LOG ("td_ta_event_getmsg");
 587.226 + 
 587.227 +   /* Test whether the TA parameter is ok.  */
 587.228 +   if (! ta_ok (ta))
 587.229 +Index: td_ta_get_nthreads.c
 587.230 +===================================================================
 587.231 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_get_nthreads.c,v
 587.232 +retrieving revision 1.5
 587.233 +retrieving revision 1.6
 587.234 +diff -u -r1.5 -r1.6
 587.235 +--- libc/linuxthreads_db/td_ta_get_nthreads.c	6 Jul 2001 05:27:23 -0000	1.5
 587.236 ++++ libc/linuxthreads_db/td_ta_get_nthreads.c	28 Dec 2001 16:41:29 -0000	1.6
 587.237 +@@ -25,7 +25,7 @@
 587.238 + {
 587.239 +   psaddr_t addr;
 587.240 + 
 587.241 +-  LOG (__FUNCTION__);
 587.242 ++  LOG ("td_ta_get_nthreads");
 587.243 + 
 587.244 +   /* Test whether the TA parameter is ok.  */
 587.245 +   if (! ta_ok (ta))
 587.246 +Index: td_ta_get_ph.c
 587.247 +===================================================================
 587.248 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_get_ph.c,v
 587.249 +retrieving revision 1.3
 587.250 +retrieving revision 1.4
 587.251 +diff -u -r1.3 -r1.4
 587.252 +--- libc/linuxthreads_db/td_ta_get_ph.c	6 Jul 2001 05:27:23 -0000	1.3
 587.253 ++++ libc/linuxthreads_db/td_ta_get_ph.c	28 Dec 2001 16:41:29 -0000	1.4
 587.254 +@@ -1,5 +1,5 @@
 587.255 + /* Get external process handle.
 587.256 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.257 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.258 +    This file is part of the GNU C Library.
 587.259 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.260 + 
 587.261 +@@ -24,7 +24,7 @@
 587.262 + td_err_e
 587.263 + td_ta_get_ph (const td_thragent_t *ta, struct ps_prochandle **ph)
 587.264 + {
 587.265 +-  LOG (__FUNCTION__);
 587.266 ++  LOG ("td_ta_get_ph");
 587.267 + 
 587.268 +   /* Test whether the TA parameter is ok.  */
 587.269 +   if (! ta_ok (ta))
 587.270 +Index: td_ta_get_stats.c
 587.271 +===================================================================
 587.272 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_get_stats.c,v
 587.273 +retrieving revision 1.3
 587.274 +retrieving revision 1.4
 587.275 +diff -u -r1.3 -r1.4
 587.276 +--- libc/linuxthreads_db/td_ta_get_stats.c	6 Jul 2001 05:27:23 -0000	1.3
 587.277 ++++ libc/linuxthreads_db/td_ta_get_stats.c	28 Dec 2001 16:41:29 -0000	1.4
 587.278 +@@ -1,5 +1,5 @@
 587.279 + /* Retrieve statistics for process.
 587.280 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.281 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.282 +    This file is part of the GNU C Library.
 587.283 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.284 + 
 587.285 +@@ -25,7 +25,7 @@
 587.286 + td_ta_get_stats (const td_thragent_t *ta, td_ta_stats_t *statsp)
 587.287 + {
 587.288 +   /* XXX We have to figure out what has to be done.  */
 587.289 +-  LOG (__FUNCTION__);
 587.290 ++  LOG ("td_ta_get_stats");
 587.291 + 
 587.292 +   /* Test whether the TA parameter is ok.  */
 587.293 +   if (! ta_ok (ta))
 587.294 +Index: td_ta_map_id2thr.c
 587.295 +===================================================================
 587.296 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_map_id2thr.c,v
 587.297 +retrieving revision 1.4
 587.298 +retrieving revision 1.5
 587.299 +diff -u -r1.4 -r1.5
 587.300 +--- libc/linuxthreads_db/td_ta_map_id2thr.c	6 Jul 2001 05:27:23 -0000	1.4
 587.301 ++++ libc/linuxthreads_db/td_ta_map_id2thr.c	28 Dec 2001 16:41:29 -0000	1.5
 587.302 +@@ -28,7 +28,7 @@
 587.303 +   struct _pthread_descr_struct pds;
 587.304 +   int pthread_threads_max;
 587.305 + 
 587.306 +-  LOG (__FUNCTION__);
 587.307 ++  LOG ("td_ta_map_id2thr");
 587.308 + 
 587.309 +   /* Test whether the TA parameter is ok.  */
 587.310 +   if (! ta_ok (ta))
 587.311 +Index: td_ta_map_lwp2thr.c
 587.312 +===================================================================
 587.313 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_map_lwp2thr.c,v
 587.314 +retrieving revision 1.5
 587.315 +retrieving revision 1.6
 587.316 +diff -u -r1.5 -r1.6
 587.317 +--- libc/linuxthreads_db/td_ta_map_lwp2thr.c	6 Jul 2001 05:27:23 -0000	1.5
 587.318 ++++ libc/linuxthreads_db/td_ta_map_lwp2thr.c	28 Dec 2001 16:41:29 -0000	1.6
 587.319 +@@ -1,5 +1,5 @@
 587.320 + /* Which thread is running on an lwp?
 587.321 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.322 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.323 +    This file is part of the GNU C Library.
 587.324 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.325 + 
 587.326 +@@ -34,7 +34,7 @@
 587.327 + # define num 1
 587.328 + #endif
 587.329 + 
 587.330 +-  LOG (__FUNCTION__);
 587.331 ++  LOG ("td_ta_map_lwp2thr");
 587.332 + 
 587.333 +   /* Test whether the TA parameter is ok.  */
 587.334 +   if (! ta_ok (ta))
 587.335 +Index: td_ta_new.c
 587.336 +===================================================================
 587.337 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_new.c,v
 587.338 +retrieving revision 1.10
 587.339 +retrieving revision 1.11
 587.340 +diff -u -r1.10 -r1.11
 587.341 +--- libc/linuxthreads_db/td_ta_new.c	6 Jul 2001 05:27:23 -0000	1.10
 587.342 ++++ libc/linuxthreads_db/td_ta_new.c	28 Dec 2001 16:41:29 -0000	1.11
 587.343 +@@ -35,7 +35,7 @@
 587.344 +   psaddr_t addr;
 587.345 +   struct agent_list *elemp;
 587.346 + 
 587.347 +-  LOG (__FUNCTION__);
 587.348 ++  LOG ("td_ta_new");
 587.349 + 
 587.350 +   /* Get the global event mask.  This is one of the variables which
 587.351 +      are new in the thread library to enable debugging.  If it is
 587.352 +Index: td_ta_reset_stats.c
 587.353 +===================================================================
 587.354 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_reset_stats.c,v
 587.355 +retrieving revision 1.3
 587.356 +retrieving revision 1.4
 587.357 +diff -u -r1.3 -r1.4
 587.358 +--- libc/linuxthreads_db/td_ta_reset_stats.c	6 Jul 2001 05:27:23 -0000	1.3
 587.359 ++++ libc/linuxthreads_db/td_ta_reset_stats.c	28 Dec 2001 16:41:29 -0000	1.4
 587.360 +@@ -1,5 +1,5 @@
 587.361 + /* Reset statistics.
 587.362 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.363 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.364 +    This file is part of the GNU C Library.
 587.365 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.366 + 
 587.367 +@@ -25,7 +25,7 @@
 587.368 + td_ta_reset_stats (const td_thragent_t *ta)
 587.369 + {
 587.370 +   /* XXX We have to figure out what has to be done.  */
 587.371 +-  LOG (__FUNCTION__);
 587.372 ++  LOG ("td_ta_reset_stats");
 587.373 + 
 587.374 +   /* Test whether the TA parameter is ok.  */
 587.375 +   if (! ta_ok (ta))
 587.376 +Index: td_ta_set_event.c
 587.377 +===================================================================
 587.378 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_set_event.c,v
 587.379 +retrieving revision 1.4
 587.380 +retrieving revision 1.5
 587.381 +diff -u -r1.4 -r1.5
 587.382 +--- libc/linuxthreads_db/td_ta_set_event.c	6 Jul 2001 05:27:23 -0000	1.4
 587.383 ++++ libc/linuxthreads_db/td_ta_set_event.c	28 Dec 2001 16:41:29 -0000	1.5
 587.384 +@@ -1,5 +1,5 @@
 587.385 + /* Globally enable events.
 587.386 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.387 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.388 +    This file is part of the GNU C Library.
 587.389 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.390 + 
 587.391 +@@ -29,7 +29,7 @@
 587.392 +   td_thr_events_t old_event;
 587.393 +   int i;
 587.394 + 
 587.395 +-  LOG (__FUNCTION__);
 587.396 ++  LOG ("td_ta_set_event");
 587.397 + 
 587.398 +   /* Test whether the TA parameter is ok.  */
 587.399 +   if (! ta_ok (ta))
 587.400 +Index: td_ta_setconcurrency.c
 587.401 +===================================================================
 587.402 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_setconcurrency.c,v
 587.403 +retrieving revision 1.3
 587.404 +retrieving revision 1.4
 587.405 +diff -u -r1.3 -r1.4
 587.406 +--- libc/linuxthreads_db/td_ta_setconcurrency.c	6 Jul 2001 05:27:23 -0000	1.3
 587.407 ++++ libc/linuxthreads_db/td_ta_setconcurrency.c	28 Dec 2001 16:41:29 -0000	1.4
 587.408 +@@ -1,5 +1,5 @@
 587.409 + /* Set suggested concurrency level for process.
 587.410 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.411 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.412 +    This file is part of the GNU C Library.
 587.413 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.414 + 
 587.415 +@@ -25,7 +25,7 @@
 587.416 + td_ta_setconcurrency (const td_thragent_t *ta, int level)
 587.417 + {
 587.418 +   /* This is something LinuxThreads does not support.  */
 587.419 +-  LOG (__FUNCTION__);
 587.420 ++  LOG ("td_ta_setconcurrency");
 587.421 + 
 587.422 +   /* Test whether the TA parameter is ok.  */
 587.423 +   if (! ta_ok (ta))
 587.424 +Index: td_ta_thr_iter.c
 587.425 +===================================================================
 587.426 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_thr_iter.c,v
 587.427 +retrieving revision 1.11
 587.428 +retrieving revision 1.12
 587.429 +diff -u -r1.11 -r1.12
 587.430 +--- libc/linuxthreads_db/td_ta_thr_iter.c	6 Jul 2001 05:27:23 -0000	1.11
 587.431 ++++ libc/linuxthreads_db/td_ta_thr_iter.c	28 Dec 2001 16:41:29 -0000	1.12
 587.432 +@@ -1,5 +1,5 @@
 587.433 + /* Iterate over a process's threads.
 587.434 +-   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
 587.435 ++   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
 587.436 +    This file is part of the GNU C Library.
 587.437 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.438 + 
 587.439 +@@ -86,7 +86,7 @@
 587.440 + # define num 1
 587.441 + #endif
 587.442 + 
 587.443 +-  LOG (__FUNCTION__);
 587.444 ++  LOG ("td_ta_thr_iter");
 587.445 + 
 587.446 +   /* Test whether the TA parameter is ok.  */
 587.447 +   if (! ta_ok (ta))
 587.448 +Index: td_ta_tsd_iter.c
 587.449 +===================================================================
 587.450 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_tsd_iter.c,v
 587.451 +retrieving revision 1.4
 587.452 +retrieving revision 1.5
 587.453 +diff -u -r1.4 -r1.5
 587.454 +--- libc/linuxthreads_db/td_ta_tsd_iter.c	6 Jul 2001 05:27:23 -0000	1.4
 587.455 ++++ libc/linuxthreads_db/td_ta_tsd_iter.c	28 Dec 2001 16:41:29 -0000	1.5
 587.456 +@@ -1,5 +1,5 @@
 587.457 + /* Iterate over a process's thread-specific data.
 587.458 +-   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
 587.459 ++   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
 587.460 +    This file is part of the GNU C Library.
 587.461 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.462 + 
 587.463 +@@ -29,7 +29,7 @@
 587.464 +   int pthread_keys_max;
 587.465 +   int cnt;
 587.466 + 
 587.467 +-  LOG (__FUNCTION__);
 587.468 ++  LOG ("td_ta_tsd_iter");
 587.469 + 
 587.470 +   /* Test whether the TA parameter is ok.  */
 587.471 +   if (! ta_ok (ta))
 587.472 +Index: td_thr_clear_event.c
 587.473 +===================================================================
 587.474 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_clear_event.c,v
 587.475 +retrieving revision 1.3
 587.476 +retrieving revision 1.4
 587.477 +diff -u -r1.3 -r1.4
 587.478 +--- libc/linuxthreads_db/td_thr_clear_event.c	6 Jul 2001 05:27:23 -0000	1.3
 587.479 ++++ libc/linuxthreads_db/td_thr_clear_event.c	28 Dec 2001 16:41:29 -0000	1.4
 587.480 +@@ -1,5 +1,5 @@
 587.481 + /* Disable specific event for thread.
 587.482 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.483 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.484 +    This file is part of the GNU C Library.
 587.485 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.486 + 
 587.487 +@@ -31,7 +31,7 @@
 587.488 +   td_thr_events_t old_event;
 587.489 +   int i;
 587.490 + 
 587.491 +-  LOG (__FUNCTION__);
 587.492 ++  LOG ("td_thr_clear_event");
 587.493 + 
 587.494 +   /* Write the new value into the thread data structure.  */
 587.495 +   if (ps_pdread (th->th_ta_p->ph,
 587.496 +Index: td_thr_dbresume.c
 587.497 +===================================================================
 587.498 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_dbresume.c,v
 587.499 +retrieving revision 1.2
 587.500 +retrieving revision 1.3
 587.501 +diff -u -r1.2 -r1.3
 587.502 +--- libc/linuxthreads_db/td_thr_dbresume.c	6 Jul 2001 05:27:23 -0000	1.2
 587.503 ++++ libc/linuxthreads_db/td_thr_dbresume.c	28 Dec 2001 16:41:29 -0000	1.3
 587.504 +@@ -1,5 +1,5 @@
 587.505 + /* Resume execution of given thread.
 587.506 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.507 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.508 +    This file is part of the GNU C Library.
 587.509 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.510 + 
 587.511 +@@ -25,6 +25,6 @@
 587.512 + td_thr_dbresume (const td_thrhandle_t *th)
 587.513 + {
 587.514 +   /* XXX We have to figure out what has to be done.  */
 587.515 +-  LOG (__FUNCTION__);
 587.516 ++  LOG ("td_thr_dbresume");
 587.517 +   return TD_NOCAPAB;
 587.518 + }
 587.519 +Index: td_thr_dbsuspend.c
 587.520 +===================================================================
 587.521 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_dbsuspend.c,v
 587.522 +retrieving revision 1.2
 587.523 +retrieving revision 1.3
 587.524 +diff -u -r1.2 -r1.3
 587.525 +--- libc/linuxthreads_db/td_thr_dbsuspend.c	6 Jul 2001 05:27:23 -0000	1.2
 587.526 ++++ libc/linuxthreads_db/td_thr_dbsuspend.c	28 Dec 2001 16:41:29 -0000	1.3
 587.527 +@@ -1,5 +1,5 @@
 587.528 + /* Suspend execution of given thread.
 587.529 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.530 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.531 +    This file is part of the GNU C Library.
 587.532 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.533 + 
 587.534 +@@ -25,6 +25,6 @@
 587.535 + td_thr_dbsuspend (const td_thrhandle_t *th)
 587.536 + {
 587.537 +   /* XXX We have to figure out what has to be done.  */
 587.538 +-  LOG (__FUNCTION__);
 587.539 ++  LOG ("td_thr_dbsuspend");
 587.540 +   return TD_NOCAPAB;
 587.541 + }
 587.542 +Index: td_thr_event_enable.c
 587.543 +===================================================================
 587.544 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_event_enable.c,v
 587.545 +retrieving revision 1.3
 587.546 +retrieving revision 1.4
 587.547 +diff -u -r1.3 -r1.4
 587.548 +--- libc/linuxthreads_db/td_thr_event_enable.c	6 Jul 2001 05:27:23 -0000	1.3
 587.549 ++++ libc/linuxthreads_db/td_thr_event_enable.c	28 Dec 2001 16:41:29 -0000	1.4
 587.550 +@@ -1,5 +1,5 @@
 587.551 + /* Enable event process-wide.
 587.552 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.553 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.554 +    This file is part of the GNU C Library.
 587.555 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.556 + 
 587.557 +@@ -28,7 +28,7 @@
 587.558 +      const td_thrhandle_t *th;
 587.559 +      int onoff;
 587.560 + {
 587.561 +-  LOG (__FUNCTION__);
 587.562 ++  LOG ("td_thr_event_enable");
 587.563 + 
 587.564 +   /* Write the new value into the thread data structure.  */
 587.565 +   if (ps_pdwrite (th->th_ta_p->ph,
 587.566 +Index: td_thr_event_getmsg.c
 587.567 +===================================================================
 587.568 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_event_getmsg.c,v
 587.569 +retrieving revision 1.3
 587.570 +retrieving revision 1.4
 587.571 +diff -u -r1.3 -r1.4
 587.572 +--- libc/linuxthreads_db/td_thr_event_getmsg.c	6 Jul 2001 05:27:23 -0000	1.3
 587.573 ++++ libc/linuxthreads_db/td_thr_event_getmsg.c	28 Dec 2001 16:41:29 -0000	1.4
 587.574 +@@ -1,5 +1,5 @@
 587.575 + /* Retrieve event.
 587.576 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.577 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.578 +    This file is part of the GNU C Library.
 587.579 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.580 + 
 587.581 +@@ -29,7 +29,7 @@
 587.582 + {
 587.583 +   td_eventbuf_t event;
 587.584 + 
 587.585 +-  LOG (__FUNCTION__);
 587.586 ++  LOG ("td_thr_event_getmsg");
 587.587 + 
 587.588 +   /* Read the even structure from the target.  */
 587.589 +   if (ps_pdread (th->th_ta_p->ph,
 587.590 +Index: td_thr_get_info.c
 587.591 +===================================================================
 587.592 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_get_info.c,v
 587.593 +retrieving revision 1.9
 587.594 +retrieving revision 1.10
 587.595 +diff -u -r1.9 -r1.10
 587.596 +--- libc/linuxthreads_db/td_thr_get_info.c	6 Jul 2001 05:27:23 -0000	1.9
 587.597 ++++ libc/linuxthreads_db/td_thr_get_info.c	28 Dec 2001 16:41:29 -0000	1.10
 587.598 +@@ -1,5 +1,5 @@
 587.599 + /* Get thread information.
 587.600 +-   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
 587.601 ++   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
 587.602 +    This file is part of the GNU C Library.
 587.603 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.604 + 
 587.605 +@@ -29,7 +29,7 @@
 587.606 + {
 587.607 +   struct _pthread_descr_struct pds;
 587.608 + 
 587.609 +-  LOG (__FUNCTION__);
 587.610 ++  LOG ("td_thr_get_info");
 587.611 + 
 587.612 +   /* Get the thread descriptor.  */
 587.613 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 587.614 +Index: td_thr_getfpregs.c
 587.615 +===================================================================
 587.616 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_getfpregs.c,v
 587.617 +retrieving revision 1.4
 587.618 +retrieving revision 1.5
 587.619 +diff -u -r1.4 -r1.5
 587.620 +--- libc/linuxthreads_db/td_thr_getfpregs.c	6 Jul 2001 05:27:23 -0000	1.4
 587.621 ++++ libc/linuxthreads_db/td_thr_getfpregs.c	28 Dec 2001 16:41:29 -0000	1.5
 587.622 +@@ -26,7 +26,7 @@
 587.623 + {
 587.624 +   struct _pthread_descr_struct pds;
 587.625 + 
 587.626 +-  LOG (__FUNCTION__);
 587.627 ++  LOG ("td_thr_getfpregs");
 587.628 + 
 587.629 +   /* We have to get the state and the PID for this thread.  */
 587.630 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 587.631 +Index: td_thr_getgregs.c
 587.632 +===================================================================
 587.633 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_getgregs.c,v
 587.634 +retrieving revision 1.8
 587.635 +retrieving revision 1.9
 587.636 +diff -u -r1.8 -r1.9
 587.637 +--- libc/linuxthreads_db/td_thr_getgregs.c	6 Jul 2001 05:27:23 -0000	1.8
 587.638 ++++ libc/linuxthreads_db/td_thr_getgregs.c	28 Dec 2001 16:41:29 -0000	1.9
 587.639 +@@ -26,7 +26,7 @@
 587.640 + {
 587.641 +   struct _pthread_descr_struct pds;
 587.642 + 
 587.643 +-  LOG (__FUNCTION__);
 587.644 ++  LOG ("td_thr_getgregs");
 587.645 + 
 587.646 +   /* We have to get the state and the PID for this thread.  */
 587.647 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 587.648 +Index: td_thr_getxregs.c
 587.649 +===================================================================
 587.650 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_getxregs.c,v
 587.651 +retrieving revision 1.2
 587.652 +retrieving revision 1.3
 587.653 +diff -u -r1.2 -r1.3
 587.654 +--- libc/linuxthreads_db/td_thr_getxregs.c	6 Jul 2001 05:27:23 -0000	1.2
 587.655 ++++ libc/linuxthreads_db/td_thr_getxregs.c	28 Dec 2001 16:41:29 -0000	1.3
 587.656 +@@ -1,5 +1,5 @@
 587.657 + /* Get a thread's extra state register set.
 587.658 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.659 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.660 +    This file is part of the GNU C Library.
 587.661 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.662 + 
 587.663 +@@ -25,6 +25,6 @@
 587.664 + td_thr_getxregs (const td_thrhandle_t *th, void *xregs)
 587.665 + {
 587.666 +   /* XXX This might be platform specific.  */
 587.667 +-  LOG (__FUNCTION__);
 587.668 ++  LOG ("td_thr_getxregs");
 587.669 +   return TD_NOXREGS;
 587.670 + }
 587.671 +Index: td_thr_getxregsize.c
 587.672 +===================================================================
 587.673 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_getxregsize.c,v
 587.674 +retrieving revision 1.2
 587.675 +retrieving revision 1.3
 587.676 +diff -u -r1.2 -r1.3
 587.677 +--- libc/linuxthreads_db/td_thr_getxregsize.c	6 Jul 2001 05:27:23 -0000	1.2
 587.678 ++++ libc/linuxthreads_db/td_thr_getxregsize.c	28 Dec 2001 16:41:29 -0000	1.3
 587.679 +@@ -1,5 +1,5 @@
 587.680 + /* Get the size of the extra state register set for this architecture.
 587.681 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.682 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.683 +    This file is part of the GNU C Library.
 587.684 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.685 + 
 587.686 +@@ -25,6 +25,6 @@
 587.687 + td_thr_getxregsize (const td_thrhandle_t *th, int *sizep)
 587.688 + {
 587.689 +   /* XXX This might be platform specific.  */
 587.690 +-  LOG (__FUNCTION__);
 587.691 ++  LOG ("td_thr_getxregsize");
 587.692 +   return TD_NOXREGS;
 587.693 + }
 587.694 +Index: td_thr_set_event.c
 587.695 +===================================================================
 587.696 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_set_event.c,v
 587.697 +retrieving revision 1.4
 587.698 +retrieving revision 1.5
 587.699 +diff -u -r1.4 -r1.5
 587.700 +--- libc/linuxthreads_db/td_thr_set_event.c	6 Jul 2001 05:27:23 -0000	1.4
 587.701 ++++ libc/linuxthreads_db/td_thr_set_event.c	28 Dec 2001 16:41:29 -0000	1.5
 587.702 +@@ -1,5 +1,5 @@
 587.703 + /* Enable specific event for thread.
 587.704 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.705 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.706 +    This file is part of the GNU C Library.
 587.707 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.708 + 
 587.709 +@@ -31,7 +31,7 @@
 587.710 +   td_thr_events_t old_event;
 587.711 +   int i;
 587.712 + 
 587.713 +-  LOG (__FUNCTION__);
 587.714 ++  LOG ("td_thr_set_event");
 587.715 + 
 587.716 +   /* Write the new value into the thread data structure.  */
 587.717 +   if (ps_pdread (th->th_ta_p->ph,
 587.718 +Index: td_thr_setfpregs.c
 587.719 +===================================================================
 587.720 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_setfpregs.c,v
 587.721 +retrieving revision 1.4
 587.722 +retrieving revision 1.5
 587.723 +diff -u -r1.4 -r1.5
 587.724 +--- libc/linuxthreads_db/td_thr_setfpregs.c	6 Jul 2001 05:27:23 -0000	1.4
 587.725 ++++ libc/linuxthreads_db/td_thr_setfpregs.c	28 Dec 2001 16:41:29 -0000	1.5
 587.726 +@@ -26,7 +26,7 @@
 587.727 + {
 587.728 +   struct _pthread_descr_struct pds;
 587.729 + 
 587.730 +-  LOG (__FUNCTION__);
 587.731 ++  LOG ("td_thr_setfpregs");
 587.732 + 
 587.733 +   /* We have to get the state and the PID for this thread.  */
 587.734 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 587.735 +Index: td_thr_setgregs.c
 587.736 +===================================================================
 587.737 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_setgregs.c,v
 587.738 +retrieving revision 1.6
 587.739 +retrieving revision 1.7
 587.740 +diff -u -r1.6 -r1.7
 587.741 +--- libc/linuxthreads_db/td_thr_setgregs.c	6 Jul 2001 05:27:23 -0000	1.6
 587.742 ++++ libc/linuxthreads_db/td_thr_setgregs.c	28 Dec 2001 16:41:29 -0000	1.7
 587.743 +@@ -26,7 +26,7 @@
 587.744 + {
 587.745 +   struct _pthread_descr_struct pds;
 587.746 + 
 587.747 +-  LOG (__FUNCTION__);
 587.748 ++  LOG ("td_thr_setgregs");
 587.749 + 
 587.750 +   /* We have to get the state and the PID for this thread.  */
 587.751 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 587.752 +Index: td_thr_setprio.c
 587.753 +===================================================================
 587.754 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_setprio.c,v
 587.755 +retrieving revision 1.2
 587.756 +retrieving revision 1.3
 587.757 +diff -u -r1.2 -r1.3
 587.758 +--- libc/linuxthreads_db/td_thr_setprio.c	6 Jul 2001 05:27:23 -0000	1.2
 587.759 ++++ libc/linuxthreads_db/td_thr_setprio.c	28 Dec 2001 16:41:29 -0000	1.3
 587.760 +@@ -1,5 +1,5 @@
 587.761 + /* Set a thread's priority.
 587.762 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.763 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.764 +    This file is part of the GNU C Library.
 587.765 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.766 + 
 587.767 +@@ -25,6 +25,6 @@
 587.768 + td_thr_setprio (const td_thrhandle_t *th, int prio)
 587.769 + {
 587.770 +   /* XXX We have to figure out what has to be done.  */
 587.771 +-  LOG (__FUNCTION__);
 587.772 ++  LOG ("td_thr_setprio");
 587.773 +   return TD_OK;
 587.774 + }
 587.775 +Index: td_thr_setsigpending.c
 587.776 +===================================================================
 587.777 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_setsigpending.c,v
 587.778 +retrieving revision 1.2
 587.779 +retrieving revision 1.3
 587.780 +diff -u -r1.2 -r1.3
 587.781 +--- libc/linuxthreads_db/td_thr_setsigpending.c	6 Jul 2001 05:27:23 -0000	1.2
 587.782 ++++ libc/linuxthreads_db/td_thr_setsigpending.c	28 Dec 2001 16:41:29 -0000	1.3
 587.783 +@@ -1,5 +1,5 @@
 587.784 + /* Raise a signal for a thread.
 587.785 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.786 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.787 +    This file is part of the GNU C Library.
 587.788 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.789 + 
 587.790 +@@ -26,6 +26,6 @@
 587.791 + 		      const sigset_t *ss)
 587.792 + {
 587.793 +   /* XXX We have to figure out what has to be done.  */
 587.794 +-  LOG (__FUNCTION__);
 587.795 ++  LOG ("td_thr_setsigpending");
 587.796 +   return TD_OK;
 587.797 + }
 587.798 +Index: td_thr_setxregs.c
 587.799 +===================================================================
 587.800 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_setxregs.c,v
 587.801 +retrieving revision 1.2
 587.802 +retrieving revision 1.3
 587.803 +diff -u -r1.2 -r1.3
 587.804 +--- libc/linuxthreads_db/td_thr_setxregs.c	6 Jul 2001 05:27:23 -0000	1.2
 587.805 ++++ libc/linuxthreads_db/td_thr_setxregs.c	28 Dec 2001 16:41:29 -0000	1.3
 587.806 +@@ -1,5 +1,5 @@
 587.807 + /* Set a thread's extra state register set.
 587.808 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.809 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.810 +    This file is part of the GNU C Library.
 587.811 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.812 + 
 587.813 +@@ -25,6 +25,6 @@
 587.814 + td_thr_setxregs (const td_thrhandle_t *ta, const void *addr)
 587.815 + {
 587.816 +   /* XXX This might have to be platform specific.  */
 587.817 +-  LOG (__FUNCTION__);
 587.818 ++  LOG ("td_thr_setxregs");
 587.819 +   return TD_NOXREGS;
 587.820 + }
 587.821 +Index: td_thr_sigsetmask.c
 587.822 +===================================================================
 587.823 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_sigsetmask.c,v
 587.824 +retrieving revision 1.2
 587.825 +retrieving revision 1.3
 587.826 +diff -u -r1.2 -r1.3
 587.827 +--- libc/linuxthreads_db/td_thr_sigsetmask.c	6 Jul 2001 05:27:23 -0000	1.2
 587.828 ++++ libc/linuxthreads_db/td_thr_sigsetmask.c	28 Dec 2001 16:41:29 -0000	1.3
 587.829 +@@ -1,5 +1,5 @@
 587.830 + /* Set a thread's signal mask.
 587.831 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.832 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.833 +    This file is part of the GNU C Library.
 587.834 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.835 + 
 587.836 +@@ -25,6 +25,6 @@
 587.837 + td_thr_sigsetmask (const td_thrhandle_t *th, const sigset_t *ss)
 587.838 + {
 587.839 +   /* XXX We have to figure out what has to be done.  */
 587.840 +-  LOG (__FUNCTION__);
 587.841 ++  LOG ("td_thr_sigsetmask");
 587.842 +   return TD_OK;
 587.843 + }
 587.844 +Index: td_thr_tsd.c
 587.845 +===================================================================
 587.846 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_tsd.c,v
 587.847 +retrieving revision 1.2
 587.848 +retrieving revision 1.3
 587.849 +diff -u -r1.2 -r1.3
 587.850 +--- libc/linuxthreads_db/td_thr_tsd.c	6 Jul 2001 05:27:23 -0000	1.2
 587.851 ++++ libc/linuxthreads_db/td_thr_tsd.c	28 Dec 2001 16:41:29 -0000	1.3
 587.852 +@@ -1,5 +1,5 @@
 587.853 + /* Get a thread-specific data pointer for a thread.
 587.854 +-   Copyright (C) 1999 Free Software Foundation, Inc.
 587.855 ++   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
 587.856 +    This file is part of the GNU C Library.
 587.857 +    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
 587.858 + 
 587.859 +@@ -33,7 +33,7 @@
 587.860 +   unsigned int idx2nd;
 587.861 +   void *p;
 587.862 + 
 587.863 +-  LOG (__FUNCTION__);
 587.864 ++  LOG ("td_thr_tsd");
 587.865 + 
 587.866 +   /* Get the thread descriptor.  */
 587.867 +   if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
 587.868 +Index: td_thr_validate.c
 587.869 +===================================================================
 587.870 +RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_validate.c,v
 587.871 +retrieving revision 1.4
 587.872 +retrieving revision 1.5
 587.873 +diff -u -r1.4 -r1.5
 587.874 +--- libc/linuxthreads_db/td_thr_validate.c	6 Jul 2001 05:27:23 -0000	1.4
 587.875 ++++ libc/linuxthreads_db/td_thr_validate.c	28 Dec 2001 16:41:29 -0000	1.5
 587.876 +@@ -28,7 +28,7 @@
 587.877 +   int pthread_threads_max = th->th_ta_p->pthread_threads_max;
 587.878 +   int cnt;
 587.879 + 
 587.880 +-  LOG (__FUNCTION__);
 587.881 ++  LOG ("td_thr_validate");
 587.882 + 
 587.883 +   /* Now get all descriptors, one after the other.  */
 587.884 +   for (cnt = 0; cnt < pthread_threads_max; ++cnt, ++handles)
   588.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   588.2 +++ b/patches/glibc/linuxthreads-2.2.5/glibc-2.2.5-alpha-self-clobber.patch	Sat Feb 24 11:00:05 2007 +0000
   588.3 @@ -0,0 +1,25 @@
   588.4 +wget http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/sysdeps/alpha/pt-machine.h.diff?r1=1.9&r2=1.10&cvsroot=glibc
   588.5 +
   588.6 +Should fix error
   588.7 +
   588.8 +internals.h: In function `pthread_setcancelstate':
   588.9 +internals.h:381: error: asm-specifier for variable `__self' conflicts with asm clobber list
  588.10 +make[2]: *** [/home/dank/crosstool-0.28/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.2.5/build-glibc/linuxthreads/cancel.o] Error 1
  588.11 +make[2]: Leaving directory `/home/dank/crosstool-0.28/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.2.5/glibc-2.2.5/linuxthreads'
  588.12 +
  588.13 +===================================================================
  588.14 +RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/alpha/pt-machine.h,v
  588.15 +retrieving revision 1.9
  588.16 +retrieving revision 1.10
  588.17 +diff -u -r1.9 -r1.10
  588.18 +--- libc/linuxthreads/sysdeps/alpha/pt-machine.h	2002/04/06 04:05:13	1.9
  588.19 ++++ libc/linuxthreads/sysdeps/alpha/pt-machine.h	2002/05/20 20:09:34	1.10
  588.20 +@@ -76,7 +76,7 @@
  588.21 + #define THREAD_SELF \
  588.22 + ({									      \
  588.23 +   register pthread_descr __self __asm__("$0");				      \
  588.24 +-  __asm__ ("call_pal %1" : "=r"(__self) : "i"(PAL_rduniq) : "$0");	      \
  588.25 ++  __asm__ ("call_pal %1" : "=r"(__self) : "i"(PAL_rduniq));		      \
  588.26 +   __self;								      \
  588.27 + })
  588.28 + 
   589.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   589.2 +++ b/patches/glibc/linuxthreads-2.2.5/linuxthreads-2.2.5-ppc405erratum77.patch	Sat Feb 24 11:00:05 2007 +0000
   589.3 @@ -0,0 +1,34 @@
   589.4 +# see http://bugs.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4155
   589.5 +# and http://www.kegel.com/xgcc3/ppc405erratum77.html
   589.6 +# See also matching patch for glibc
   589.7 +
   589.8 +diff -aur glibc-2.2.5.orig/linuxthreads/sysdeps/powerpc/pt-machine.h glibc-2.2.5/linuxthreads/sysdeps/powerpc/pt-machine.h
   589.9 +--- glibc-2.2.5.orig/linuxthreads/sysdeps/powerpc/pt-machine.h	Thu May 17 12:47:46 2001
  589.10 ++++ glibc-2.2.5/linuxthreads/sysdeps/powerpc/pt-machine.h	Tue Jul 23 05:38:24 2002
  589.11 +@@ -41,6 +41,17 @@
  589.12 + #define HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
  589.13 + #define IMPLEMENT_TAS_WITH_CAS
  589.14 + 
  589.15 ++#ifdef __PPC405__
  589.16 ++/* workaround for PPC405 erratum #77 - Mark Hatle, dank.  References:
  589.17 ++   http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
  589.18 ++   http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
  589.19 ++   http://www.kegel.com/xgcc3/ppc405erratum77.html
  589.20 ++   FIXME: using dbct instead of sync would be faster  */
  589.21 ++#define __LINUXTHREADS_PPC405_ERR77_SYNC   "sync \n\t"
  589.22 ++#else
  589.23 ++#define __LINUXTHREADS_PPC405_ERR77_SYNC
  589.24 ++#endif
  589.25 ++
  589.26 + PT_EI int
  589.27 + __compare_and_swap (long int *p, long int oldval, long int newval)
  589.28 + {
  589.29 +@@ -50,6 +61,7 @@
  589.30 + 	   "0:    lwarx %0,0,%1 ;"
  589.31 + 	   "      xor. %0,%3,%0;"
  589.32 + 	   "      bne 1f;"
  589.33 ++	   __LINUXTHREADS_PPC405_ERR77_SYNC
  589.34 + 	   "      stwcx. %2,0,%1;"
  589.35 + 	   "      bne- 0b;"
  589.36 + 	   "1:    "
  589.37 +
   590.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   590.2 +++ b/patches/glibc/linuxthreads-2.2.5/pt-initfini-alpha.patch	Sat Feb 24 11:00:05 2007 +0000
   590.3 @@ -0,0 +1,119 @@
   590.4 +--- glibc-2.2.5/linuxthreads/sysdeps/alpha/elf/pt-initfini.c.old	Fri Jun  6 22:02:08 2003
   590.5 ++++ glibc-2.2.5/linuxthreads/sysdeps/alpha/elf/pt-initfini.c	Fri Jun  6 22:02:33 2003
   590.6 +@@ -37,60 +37,60 @@
   590.7 +    files, all of which may have different GP values.  So we must reload
   590.8 +    the GP value from crti.o in crtn.o.  */
   590.9 + 
  590.10 +-__asm__ ("
  590.11 +-
  590.12 +-#include \"defs.h\"
  590.13 +-
  590.14 +-/*@HEADER_ENDS*/
  590.15 +-
  590.16 +-/*@_init_PROLOG_BEGINS*/
  590.17 +-	.section .init, \"ax\", @progbits
  590.18 +-	.globl	_init
  590.19 +-	.ent	_init
  590.20 +-_init:
  590.21 +-	ldgp	$29, 0($27)
  590.22 +-	subq	$30, 16, $30
  590.23 +-	lda	$27, __pthread_initialize_minimal
  590.24 +-	stq	$26, 0($30)
  590.25 +-	stq	$29, 8($30)
  590.26 +-	.prologue 1
  590.27 +-	jsr	$26, ($27), __pthread_initialize_minimal
  590.28 +-	ldq	$29, 8($30)
  590.29 +-	.align 3
  590.30 +-	.end	_init
  590.31 +-	.size	_init, 0
  590.32 +-/*@_init_PROLOG_ENDS*/
  590.33 +-
  590.34 +-/*@_init_EPILOG_BEGINS*/
  590.35 +-	.section .init, \"ax\", @progbits
  590.36 +-	ldq	$26, 0($30)
  590.37 +-	ldq	$29, 8($30)
  590.38 +-	addq	$30, 16, $30
  590.39 +-	ret
  590.40 +-/*@_init_EPILOG_ENDS*/
  590.41 +-
  590.42 +-/*@_fini_PROLOG_BEGINS*/
  590.43 +-	.section .fini, \"ax\", @progbits
  590.44 +-	.globl	_fini
  590.45 +-	.ent	_fini
  590.46 +-_fini:
  590.47 +-	ldgp	$29, 0($27)
  590.48 +-	subq	$30, 16, $30
  590.49 +-	stq	$26, 0($30)
  590.50 +-	stq	$29, 8($30)
  590.51 +-	.prologue 1
  590.52 +-	.align 3
  590.53 +-	.end	_fini
  590.54 +-	.size	_fini, 0
  590.55 +-/*@_fini_PROLOG_ENDS*/
  590.56 +-
  590.57 +-/*@_fini_EPILOG_BEGINS*/
  590.58 +-	.section .fini, \"ax\", @progbits
  590.59 +-	ldq	$26, 0($30)
  590.60 +-	ldq	$29, 8($30)
  590.61 +-	addq	$30, 16, $30
  590.62 +-	ret
  590.63 +-/*@_fini_EPILOG_ENDS*/
  590.64 +-
  590.65 +-/*@TRAILER_BEGINS*/
  590.66 ++__asm__ ("\n\
  590.67 ++\n\
  590.68 ++#include \"defs.h\"\n\
  590.69 ++\n\
  590.70 ++/*@HEADER_ENDS*/\n\
  590.71 ++\n\
  590.72 ++/*@_init_PROLOG_BEGINS*/\n\
  590.73 ++	.section .init, \"ax\", @progbits\n\
  590.74 ++	.globl	_init\n\
  590.75 ++	.ent	_init\n\
  590.76 ++_init:\n\
  590.77 ++	ldgp	$29, 0($27)\n\
  590.78 ++	subq	$30, 16, $30\n\
  590.79 ++	lda	$27, __pthread_initialize_minimal\n\
  590.80 ++	stq	$26, 0($30)\n\
  590.81 ++	stq	$29, 8($30)\n\
  590.82 ++	.prologue 1\n\
  590.83 ++	jsr	$26, ($27), __pthread_initialize_minimal\n\
  590.84 ++	ldq	$29, 8($30)\n\
  590.85 ++	.align 3\n\
  590.86 ++	.end	_init\n\
  590.87 ++	.size	_init, 0\n\
  590.88 ++/*@_init_PROLOG_ENDS*/\n\
  590.89 ++\n\
  590.90 ++/*@_init_EPILOG_BEGINS*/\n\
  590.91 ++	.section .init, \"ax\", @progbits\n\
  590.92 ++	ldq	$26, 0($30)\n\
  590.93 ++	ldq	$29, 8($30)\n\
  590.94 ++	addq	$30, 16, $30\n\
  590.95 ++	ret\n\
  590.96 ++/*@_init_EPILOG_ENDS*/\n\
  590.97 ++\n\
  590.98 ++/*@_fini_PROLOG_BEGINS*/\n\
  590.99 ++	.section .fini, \"ax\", @progbits\n\
 590.100 ++	.globl	_fini\n\
 590.101 ++	.ent	_fini\n\
 590.102 ++_fini:\n\
 590.103 ++	ldgp	$29, 0($27)\n\
 590.104 ++	subq	$30, 16, $30\n\
 590.105 ++	stq	$26, 0($30)\n\
 590.106 ++	stq	$29, 8($30)\n\
 590.107 ++	.prologue 1\n\
 590.108 ++	.align 3\n\
 590.109 ++	.end	_fini\n\
 590.110 ++	.size	_fini, 0\n\
 590.111 ++/*@_fini_PROLOG_ENDS*/\n\
 590.112 ++\n\
 590.113 ++/*@_fini_EPILOG_BEGINS*/\n\
 590.114 ++	.section .fini, \"ax\", @progbits\n\
 590.115 ++	ldq	$26, 0($30)\n\
 590.116 ++	ldq	$29, 8($30)\n\
 590.117 ++	addq	$30, 16, $30\n\
 590.118 ++	ret\n\
 590.119 ++/*@_fini_EPILOG_ENDS*/\n\
 590.120 ++\n\
 590.121 ++/*@TRAILER_BEGINS*/\n\
 590.122 + ");
   591.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   591.2 +++ b/patches/glibc/linuxthreads-2.2.5/pt-initfini-sh.patch	Sat Feb 24 11:00:05 2007 +0000
   591.3 @@ -0,0 +1,267 @@
   591.4 +--- glibc-2.2.5/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c.old	Wed May 28 09:29:55 2003
   591.5 ++++ glibc-2.2.5/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c	Wed May 28 09:30:11 2003
   591.6 +@@ -36,134 +36,134 @@
   591.7 +    * crtn.s puts the corresponding function epilogues
   591.8 +    in the .init and .fini sections. */
   591.9 + 
  591.10 +-__asm__ ("
  591.11 +-
  591.12 +-#include \"defs.h\"
  591.13 +-#define SHARED
  591.14 +-
  591.15 +-/*@HEADER_ENDS*/
  591.16 +-
  591.17 +-/*@TESTS_BEGIN*/
  591.18 +-
  591.19 +-/*@TESTS_END*/
  591.20 +-
  591.21 +-/*@_init_PROLOG_BEGINS*/
  591.22 +-	.section .init
  591.23 +-	.align 5
  591.24 +-	.global	_init
  591.25 +-	.type	_init,@function
  591.26 +-_init:
  591.27 +-	mov.l	r12,@-r15
  591.28 +-	mov.l	r14,@-r15
  591.29 +-	sts.l	pr,@-r15
  591.30 +-#ifdef SHARED
  591.31 +-	mova	.L22,r0
  591.32 +-	mov.l	.L22,r12
  591.33 +-	add	r0,r12
  591.34 +-	mova	.L24,r0
  591.35 +-	mov.l	.L24,r1
  591.36 +-	add	r0,r1
  591.37 +-	jsr	@r1
  591.38 +-	 nop
  591.39 +-	mova	.L23,r0
  591.40 +-	mov.l	.L23,r1
  591.41 +-	add	r0,r1
  591.42 +-#else
  591.43 +-	mov.l	.L24,r1
  591.44 +-	jsr	@r1
  591.45 +-	 nop
  591.46 +-	mov.l	.L23,r1
  591.47 +-#endif
  591.48 +-	jsr	@r1
  591.49 +-	 mov	r15,r14
  591.50 +-	bra	1f
  591.51 +-	 nop
  591.52 +-	.align 2
  591.53 +-#ifdef SHARED
  591.54 +-.L22:
  591.55 +-	.long	_GLOBAL_OFFSET_TABLE_
  591.56 +-.L23:
  591.57 +-	.long	__gmon_start__@PLT
  591.58 +-.L24:
  591.59 +-	.long	__pthread_initialize_minimal@PLT
  591.60 +-#else
  591.61 +-.L23:
  591.62 +-	.long	__gmon_start__
  591.63 +-.L24:
  591.64 +-	.long	__pthread_initialize_minimal
  591.65 +-#endif
  591.66 +-	.data
  591.67 +-	.global __fpscr_values
  591.68 +-__fpscr_values:
  591.69 +-	.long   0
  591.70 +-	.long   0x80000
  591.71 +-	.previous
  591.72 +-1:
  591.73 +-	ALIGN
  591.74 +-	END_INIT
  591.75 +-
  591.76 +-	
  591.77 +-/*@_init_PROLOG_ENDS*/
  591.78 +-
  591.79 +-/*@_init_EPILOG_BEGINS*/
  591.80 +-	.section .init
  591.81 +-	mov	r14,r15
  591.82 +-	lds.l	@r15+,pr
  591.83 +-	mov.l	@r15+,r14
  591.84 +-	rts	
  591.85 +-	mov.l	@r15+,r12
  591.86 +-	END_INIT
  591.87 +-	.section .text
  591.88 +-	.align 5
  591.89 +-	.weak	__gmon_start__
  591.90 +-	.type	__gmon_start__,@function
  591.91 +-__gmon_start__:
  591.92 +-	mov.l	r14,@-r15
  591.93 +-	mov	r15,r14
  591.94 +-	mov	r14,r15
  591.95 +-	rts	
  591.96 +-	mov.l	@r15+,r14
  591.97 +-	
  591.98 +-/*@_init_EPILOG_ENDS*/
  591.99 +-
 591.100 +-/*@_fini_PROLOG_BEGINS*/
 591.101 +-	.section .fini
 591.102 +-	.align 5
 591.103 +-	.global	_fini
 591.104 +-	.type	_fini,@function
 591.105 +-_fini:
 591.106 +-	mov.l	r12,@-r15
 591.107 +-	mov.l	r14,@-r15
 591.108 +-	sts.l	pr,@-r15
 591.109 +-#ifdef SHARED
 591.110 +-	mova	.L27,r0
 591.111 +-	mov.l	.L27,r12
 591.112 +-	add	r0,r12
 591.113 +-#endif
 591.114 +-	mov	r15,r14
 591.115 +-	ALIGN
 591.116 +-	END_FINI
 591.117 +-#ifdef SHARED
 591.118 +-	bra	1f
 591.119 +-	 nop
 591.120 +-	.align	2
 591.121 +-.L27:
 591.122 +-	.long	_GLOBAL_OFFSET_TABLE_
 591.123 +-#endif
 591.124 +-1:
 591.125 +-/*@_fini_PROLOG_ENDS*/
 591.126 +-
 591.127 +-/*@_fini_EPILOG_BEGINS*/
 591.128 +-	.section .fini
 591.129 +-	mov	r14,r15
 591.130 +-	lds.l	@r15+,pr
 591.131 +-	mov.l	@r15+,r14
 591.132 +-	rts	
 591.133 +-	mov.l	@r15+,r12
 591.134 +-
 591.135 +-	END_FINI
 591.136 +-	
 591.137 +-/*@_fini_EPILOG_ENDS*/
 591.138 +-
 591.139 +-/*@TRAILER_BEGINS*/
 591.140 ++__asm__ ("\n\
 591.141 ++\n\
 591.142 ++#include \"defs.h\"\n\
 591.143 ++#define SHARED\n\
 591.144 ++\n\
 591.145 ++/*@HEADER_ENDS*/\n\
 591.146 ++\n\
 591.147 ++/*@TESTS_BEGIN*/\n\
 591.148 ++\n\
 591.149 ++/*@TESTS_END*/\n\
 591.150 ++\n\
 591.151 ++/*@_init_PROLOG_BEGINS*/\n\
 591.152 ++	.section .init\n\
 591.153 ++	.align 5\n\
 591.154 ++	.global	_init\n\
 591.155 ++	.type	_init,@function\n\
 591.156 ++_init:\n\
 591.157 ++	mov.l	r12,@-r15\n\
 591.158 ++	mov.l	r14,@-r15\n\
 591.159 ++	sts.l	pr,@-r15\n\
 591.160 ++#ifdef SHARED\n\
 591.161 ++	mova	.L22,r0\n\
 591.162 ++	mov.l	.L22,r12\n\
 591.163 ++	add	r0,r12\n\
 591.164 ++	mova	.L24,r0\n\
 591.165 ++	mov.l	.L24,r1\n\
 591.166 ++	add	r0,r1\n\
 591.167 ++	jsr	@r1\n\
 591.168 ++	 nop\n\
 591.169 ++	mova	.L23,r0\n\
 591.170 ++	mov.l	.L23,r1\n\
 591.171 ++	add	r0,r1\n\
 591.172 ++#else\n\
 591.173 ++	mov.l	.L24,r1\n\
 591.174 ++	jsr	@r1\n\
 591.175 ++	 nop\n\
 591.176 ++	mov.l	.L23,r1\n\
 591.177 ++#endif\n\
 591.178 ++	jsr	@r1\n\
 591.179 ++	 mov	r15,r14\n\
 591.180 ++	bra	1f\n\
 591.181 ++	 nop\n\
 591.182 ++	.align 2\n\
 591.183 ++#ifdef SHARED\n\
 591.184 ++.L22:\n\
 591.185 ++	.long	_GLOBAL_OFFSET_TABLE_\n\
 591.186 ++.L23:\n\
 591.187 ++	.long	__gmon_start__@PLT\n\
 591.188 ++.L24:\n\
 591.189 ++	.long	__pthread_initialize_minimal@PLT\n\
 591.190 ++#else\n\
 591.191 ++.L23:\n\
 591.192 ++	.long	__gmon_start__\n\
 591.193 ++.L24:\n\
 591.194 ++	.long	__pthread_initialize_minimal\n\
 591.195 ++#endif\n\
 591.196 ++	.data\n\
 591.197 ++	.global __fpscr_values\n\
 591.198 ++__fpscr_values:\n\
 591.199 ++	.long   0\n\
 591.200 ++	.long   0x80000\n\
 591.201 ++	.previous\n\
 591.202 ++1:\n\
 591.203 ++	ALIGN\n\
 591.204 ++	END_INIT\n\
 591.205 ++\n\
 591.206 ++	\n\
 591.207 ++/*@_init_PROLOG_ENDS*/\n\
 591.208 ++\n\
 591.209 ++/*@_init_EPILOG_BEGINS*/\n\
 591.210 ++	.section .init\n\
 591.211 ++	mov	r14,r15\n\
 591.212 ++	lds.l	@r15+,pr\n\
 591.213 ++	mov.l	@r15+,r14\n\
 591.214 ++	rts	\n\
 591.215 ++	mov.l	@r15+,r12\n\
 591.216 ++	END_INIT\n\
 591.217 ++	.section .text\n\
 591.218 ++	.align 5\n\
 591.219 ++	.weak	__gmon_start__\n\
 591.220 ++	.type	__gmon_start__,@function\n\
 591.221 ++__gmon_start__:\n\
 591.222 ++	mov.l	r14,@-r15\n\
 591.223 ++	mov	r15,r14\n\
 591.224 ++	mov	r14,r15\n\
 591.225 ++	rts	\n\
 591.226 ++	mov.l	@r15+,r14\n\
 591.227 ++	\n\
 591.228 ++/*@_init_EPILOG_ENDS*/\n\
 591.229 ++\n\
 591.230 ++/*@_fini_PROLOG_BEGINS*/\n\
 591.231 ++	.section .fini\n\
 591.232 ++	.align 5\n\
 591.233 ++	.global	_fini\n\
 591.234 ++	.type	_fini,@function\n\
 591.235 ++_fini:\n\
 591.236 ++	mov.l	r12,@-r15\n\
 591.237 ++	mov.l	r14,@-r15\n\
 591.238 ++	sts.l	pr,@-r15\n\
 591.239 ++#ifdef SHARED\n\
 591.240 ++	mova	.L27,r0\n\
 591.241 ++	mov.l	.L27,r12\n\
 591.242 ++	add	r0,r12\n\
 591.243 ++#endif\n\
 591.244 ++	mov	r15,r14\n\
 591.245 ++	ALIGN\n\
 591.246 ++	END_FINI\n\
 591.247 ++#ifdef SHARED\n\
 591.248 ++	bra	1f\n\
 591.249 ++	 nop\n\
 591.250 ++	.align	2\n\
 591.251 ++.L27:\n\
 591.252 ++	.long	_GLOBAL_OFFSET_TABLE_\n\
 591.253 ++#endif\n\
 591.254 ++1:\n\
 591.255 ++/*@_fini_PROLOG_ENDS*/\n\
 591.256 ++\n\
 591.257 ++/*@_fini_EPILOG_BEGINS*/\n\
 591.258 ++	.section .fini\n\
 591.259 ++	mov	r14,r15\n\
 591.260 ++	lds.l	@r15+,pr\n\
 591.261 ++	mov.l	@r15+,r14\n\
 591.262 ++	rts	\n\
 591.263 ++	mov.l	@r15+,r12\n\
 591.264 ++\n\
 591.265 ++	END_FINI\n\
 591.266 ++	\n\
 591.267 ++/*@_fini_EPILOG_ENDS*/\n\
 591.268 ++\n\
 591.269 ++/*@TRAILER_BEGINS*/\n\
 591.270 + ");
   592.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   592.2 +++ b/patches/glibc/linuxthreads-2.2.5/threadparam.patch	Sat Feb 24 11:00:05 2007 +0000
   592.3 @@ -0,0 +1,69 @@
   592.4 +2002-05-21  Ulrich Drepper  <drepper@redhat.com>
   592.5 +
   592.6 +	* sysdeps/pthread/pthread.h (pthread_create): Rename first parameter.
   592.7 +	(pthread_cancel): Likewise.
   592.8 +	* internals.h (__pthread_create_2_1): Likewise.
   592.9 +	* sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
  592.10 +===================================================================
  592.11 +RCS file: /cvs/glibc/libc/linuxthreads/internals.h,v
  592.12 +retrieving revision 1.69.2.2
  592.13 +retrieving revision 1.69.2.3
  592.14 +diff -u -r1.69.2.2 -r1.69.2.3
  592.15 +--- libc/linuxthreads/internals.h	2002/03/22 08:30:32	1.69.2.2
  592.16 ++++ libc/linuxthreads/internals.h	2002/08/20 22:01:25	1.69.2.3
  592.17 +@@ -554,7 +554,7 @@
  592.18 + /* Prototypes for compatibility functions.  */
  592.19 + extern int __pthread_attr_init_2_1 (pthread_attr_t *__attr);
  592.20 + extern int __pthread_attr_init_2_0 (pthread_attr_t *__attr);
  592.21 +-extern int __pthread_create_2_1 (pthread_t *__restrict __thread,
  592.22 ++extern int __pthread_create_2_1 (pthread_t *__restrict __threadp,
  592.23 + 				 const pthread_attr_t *__attr,
  592.24 + 				 void *(*__start_routine) (void *),
  592.25 + 				 void *__restrict __arg);
  592.26 +===================================================================
  592.27 +RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/pthread/pthread.h,v
  592.28 +retrieving revision 1.31
  592.29 +retrieving revision 1.31.2.1
  592.30 +diff -u -r1.31 -r1.31.2.1
  592.31 +--- libc/linuxthreads/sysdeps/pthread/pthread.h	2001/03/15 21:12:31	1.31
  592.32 ++++ libc/linuxthreads/sysdeps/pthread/pthread.h	2002/08/20 22:01:26	1.31.2.1
  592.33 +@@ -160,7 +160,7 @@
  592.34 + /* Create a thread with given attributes ATTR (or default attributes
  592.35 +    if ATTR is NULL), and call function START_ROUTINE with given
  592.36 +    arguments ARG.  */
  592.37 +-extern int pthread_create (pthread_t *__restrict __thread,
  592.38 ++extern int pthread_create (pthread_t *__restrict __threadp,
  592.39 + 			   __const pthread_attr_t *__restrict __attr,
  592.40 + 			   void *(*__start_routine) (void *),
  592.41 + 			   void *__restrict __arg) __THROW;
  592.42 +@@ -588,7 +588,7 @@
  592.43 + extern int pthread_setcanceltype (int __type, int *__oldtype) __THROW;
  592.44 + 
  592.45 + /* Cancel THREAD immediately or at the next possibility.  */
  592.46 +-extern int pthread_cancel (pthread_t __thread) __THROW;
  592.47 ++extern int pthread_cancel (pthread_t __cancelthread) __THROW;
  592.48 + 
  592.49 + /* Test for pending cancellation for the current thread and terminate
  592.50 +    the thread as per pthread_exit(PTHREAD_CANCELED) if it has been
  592.51 +===================================================================
  592.52 +RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h,v
  592.53 +retrieving revision 1.5
  592.54 +retrieving revision 1.5.2.1
  592.55 +diff -u -r1.5 -r1.5.2.1
  592.56 +--- libc/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h	2000/08/21 06:48:03	1.5
  592.57 ++++ libc/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h	2002/08/20 22:01:26	1.5.2.1
  592.58 +@@ -1,5 +1,5 @@
  592.59 + /* Signal handling function for threaded programs.
  592.60 +-   Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
  592.61 ++   Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
  592.62 +    This file is part of the GNU C Library.
  592.63 + 
  592.64 +    The GNU C Library is free software; you can redistribute it and/or
  592.65 +@@ -33,6 +33,6 @@
  592.66 + 			    __sigset_t *__restrict __oldmask)__THROW;
  592.67 + 
  592.68 + /* Send signal SIGNO to the given thread. */
  592.69 +-extern int pthread_kill (pthread_t __thread, int __signo) __THROW;
  592.70 ++extern int pthread_kill (pthread_t __threadid, int __signo) __THROW;
  592.71 + 
  592.72 + #endif	/* bits/sigthread.h */
   593.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   593.2 +++ b/patches/glibc/linuxthreads-2.3.2/alpha_cfi1.patch	Sat Feb 24 11:00:05 2007 +0000
   593.3 @@ -0,0 +1,136 @@
   593.4 +Retrieved with
   593.5 +$ wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S.diff?r1=1.5&r2=1.6&cvsroot=glibc'
   593.6 +$ wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h.diff?r1=1.3&r2=1.4&cvsroot=glibc'
   593.7 +
   593.8 +Might fix problem building with binutils-2.14.90.0.8/gcc-3.3.3 that was not
   593.9 +present with binutils-2.13.90.0.18/gcc-3.3.2:
  593.10 +
  593.11 +../linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S: Assembler messages:
  593.12 +../linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S:63: Warning: .ent
  593.13 +directive without matching .end
  593.14 +../linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S:63: Error: can't resolve
  593.15 +`0' {.text section} - `L0^A' {.text section}
  593.16 +make[2]: ***
  593.17 +[/home/dkegel/wk/crosstool-0.26-pre3/build/alpha-unknown-linux-gnu/gcc-3.3-20040112-glibc-2.3.2/build-glibc/posix/vfork.o]
  593.18 +Error 1
  593.19 +make[2]: Leaving directory
  593.20 +`/home/dkegel/wk/crosstool-0.26-pre3/build/alpha-unknown-linux-gnu/gcc-3.3-20040112-glibc-2.3.2/glibc-2.3.2/posix'
  593.21 +make[1]: *** [posix/subdir_lib] Error 2
  593.22 +make[1]: Leaving directory
  593.23 +`/home/dkegel/wk/crosstool-0.26-pre3/build/alpha-unknown-linux-gnu/gcc-3.3-20040112-glibc-2.3.2/glibc-2.3.2'
  593.24 +make: *** [all] Error 2
  593.25 +
  593.26 +See also alpha_cfi2.patch
  593.27 +
  593.28 +===================================================================
  593.29 +RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S,v
  593.30 +retrieving revision 1.5
  593.31 +retrieving revision 1.6
  593.32 +diff -u -r1.5 -r1.6
  593.33 +--- libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S	2003/02/11 06:27:53	1.5
  593.34 ++++ libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S	2003/06/06 05:51:03	1.6
  593.35 +@@ -19,12 +19,13 @@
  593.36 + 
  593.37 + #include <sysdep-cancel.h>
  593.38 + 
  593.39 +-	.globl __vfork
  593.40 +         .align 4
  593.41 +-        .ent __vfork,0
  593.42 +-__LABEL(__vfork)
  593.43 ++	.globl	__vfork
  593.44 ++	.type	__vfork, @function
  593.45 ++	.usepv	__vfork, std
  593.46 ++	cfi_startproc
  593.47 ++__vfork:
  593.48 + 	ldgp	gp, 0(pv)
  593.49 +-	.prologue 1
  593.50 + 	PSEUDO_PROF
  593.51 + 
  593.52 + #ifdef SHARED
  593.53 +@@ -46,18 +47,24 @@
  593.54 + 	   fork and vfork object files.  */
  593.55 + $do_fork:
  593.56 + 	subq	sp, 16, sp
  593.57 ++	cfi_adjust_cfa_offset(16)
  593.58 + 	stq	ra, 0(sp)
  593.59 ++	cfi_offset(ra, -16)
  593.60 + 	jsr	ra, HIDDEN_JUMPTARGET (__fork)
  593.61 + 	ldgp	gp, 0(ra)
  593.62 + 	ldq	ra, 0(sp)
  593.63 + 	addq	sp, 16, sp
  593.64 ++	cfi_restore(ra)
  593.65 ++	cfi_adjust_cfa_offset(-16)
  593.66 + 	ret
  593.67 + 
  593.68 + $syscall_error:
  593.69 + 	SYSCALL_ERROR_HANDLER
  593.70 + #endif
  593.71 + 
  593.72 +-PSEUDO_END(__vfork)
  593.73 ++	cfi_endproc
  593.74 ++	.size __vfork, .-__vfork
  593.75 ++
  593.76 + libc_hidden_def (__vfork)
  593.77 + 
  593.78 + weak_alias (__vfork, vfork)
  593.79 +===================================================================
  593.80 +RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h,v
  593.81 +retrieving revision 1.3
  593.82 +retrieving revision 1.4
  593.83 +diff -u -r1.3 -r1.4
  593.84 +--- libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h	2003/01/12 19:26:41	1.3
  593.85 ++++ libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h	2003/06/06 05:51:03	1.4
  593.86 +@@ -40,10 +40,11 @@
  593.87 + # define PSEUDO(name, syscall_name, args)			\
  593.88 + 	.globl name;						\
  593.89 + 	.align 4;						\
  593.90 +-	.ent name, 0;						\
  593.91 ++	.type name, @function;					\
  593.92 ++	.usepv name, std;					\
  593.93 ++	cfi_startproc;						\
  593.94 + __LABEL(name)							\
  593.95 + 	ldgp	gp, 0(pv);					\
  593.96 +-	.prologue 1;						\
  593.97 + 	PSEUDO_PROF;						\
  593.98 + 	PSEUDO_PREPARE_ARGS					\
  593.99 + 	SINGLE_THREAD_P(t0);					\
 593.100 +@@ -55,7 +56,9 @@
 593.101 + 	.subsection 2;						\
 593.102 + __LABEL($pseudo_cancel)						\
 593.103 + 	subq	sp, 64, sp;					\
 593.104 ++	cfi_def_cfa_offset(64);					\
 593.105 + 	stq	ra, 0(sp);					\
 593.106 ++	cfi_offset(ra, -64);					\
 593.107 + 	SAVE_ARGS_##args;					\
 593.108 + 	CENABLE;						\
 593.109 + 	LOAD_ARGS_##args;					\
 593.110 +@@ -67,19 +70,27 @@
 593.111 + 	ldq	ra, 0(sp);					\
 593.112 + 	ldq	v0, 8(sp);					\
 593.113 + 	addq	sp, 64, sp;					\
 593.114 ++	cfi_remember_state;					\
 593.115 ++	cfi_restore(ra);					\
 593.116 ++	cfi_def_cfa_offset(0);					\
 593.117 + 	ret;							\
 593.118 ++	cfi_restore_state;					\
 593.119 + __LABEL($multi_error)						\
 593.120 + 	CDISABLE;						\
 593.121 + 	ldq	ra, 0(sp);					\
 593.122 + 	ldq	v0, 8(sp);					\
 593.123 + 	addq	sp, 64, sp;					\
 593.124 ++	cfi_restore(ra);					\
 593.125 ++	cfi_def_cfa_offset(0);					\
 593.126 + __LABEL($syscall_error)						\
 593.127 + 	SYSCALL_ERROR_HANDLER;					\
 593.128 +-	END(name);						\
 593.129 + 	.previous
 593.130 + 
 593.131 + # undef PSEUDO_END
 593.132 +-# define PSEUDO_END(sym)
 593.133 ++# define PSEUDO_END(sym)					\
 593.134 ++	.subsection 2;						\
 593.135 ++	cfi_endproc;						\
 593.136 ++	.size sym, .-sym
 593.137 + 
 593.138 + # define SAVE_ARGS_0	/* Nothing.  */
 593.139 + # define SAVE_ARGS_1	SAVE_ARGS_0; stq a0, 8(sp)
   594.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   594.2 +++ b/patches/glibc/linuxthreads-2.3.2/alpha_cfi2.patch	Sat Feb 24 11:00:05 2007 +0000
   594.3 @@ -0,0 +1,118 @@
   594.4 +See http://sources.redhat.com/ml/libc-alpha/2004-05/msg00110.html
   594.5 +
   594.6 +Both his patches pulled into this file
   594.7 +
   594.8 +Should fix
   594.9 +../sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Assembler messages:
  594.10 +../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_startproc'
  594.11 +../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_def_cfa_offset'
  594.12 +../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: missing ')'
  594.13 +../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: syntax error
  594.14 +../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_remember_state'
  594.15 +../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_restore'
  594.16 +../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_def_cfa_offset'
  594.17 +../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_restore_state'
  594.18 +../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_restore'
  594.19 +../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_def_cfa_offset'
  594.20 +../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:30: Error: unknown opcode `cfi_endproc'
  594.21 +make[2]: *** [/usr/src/crosstool/crosstool-0.28-rc14/build/alpha-linux/gcc-3.4.0-glibc-2.3.2/build-glibc/signal/sigsuspend.o] Error 1
  594.22 +
  594.23 +when building with binutils-2.15.90.0.3 and gcc-3.4.0
  594.24 +
  594.25 +--- glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h.orig	2004-05-13 00:33:54.000000000 -0400
  594.26 ++++ glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h	2004-05-13 00:34:19.000000000 -0400
  594.27 +@@ -42,7 +42,7 @@
  594.28 + 	.align 4;						\
  594.29 + 	.type name, @function;					\
  594.30 + 	.usepv name, std;					\
  594.31 +-	cfi_startproc;						\
  594.32 ++	.cfi_startproc;						\
  594.33 + __LABEL(name)							\
  594.34 + 	ldgp	gp, 0(pv);					\
  594.35 + 	PSEUDO_PROF;						\
  594.36 +@@ -56,9 +56,9 @@
  594.37 + 	.subsection 2;						\
  594.38 + __LABEL($pseudo_cancel)						\
  594.39 + 	subq	sp, 64, sp;					\
  594.40 +-	cfi_def_cfa_offset(64);					\
  594.41 ++	.cfi_def_cfa_offset(64);					\
  594.42 + 	stq	ra, 0(sp);					\
  594.43 +-	cfi_offset(ra, -64);					\
  594.44 ++	.cfi_offset ra, -64;					\
  594.45 + 	SAVE_ARGS_##args;					\
  594.46 + 	CENABLE;						\
  594.47 + 	LOAD_ARGS_##args;					\
  594.48 +@@ -70,18 +70,18 @@
  594.49 + 	ldq	ra, 0(sp);					\
  594.50 + 	ldq	v0, 8(sp);					\
  594.51 + 	addq	sp, 64, sp;					\
  594.52 +-	cfi_remember_state;					\
  594.53 +-	cfi_restore(ra);					\
  594.54 +-	cfi_def_cfa_offset(0);					\
  594.55 ++	.cfi_remember_state;					\
  594.56 ++	.cfi_restore(ra);					\
  594.57 ++	.cfi_def_cfa_offset(0);					\
  594.58 + 	ret;							\
  594.59 +-	cfi_restore_state;					\
  594.60 ++	.cfi_restore_state;					\
  594.61 + __LABEL($multi_error)						\
  594.62 + 	CDISABLE;						\
  594.63 + 	ldq	ra, 0(sp);					\
  594.64 + 	ldq	v0, 8(sp);					\
  594.65 + 	addq	sp, 64, sp;					\
  594.66 +-	cfi_restore(ra);					\
  594.67 +-	cfi_def_cfa_offset(0);					\
  594.68 ++	.cfi_restore(ra);					\
  594.69 ++	.cfi_def_cfa_offset(0);					\
  594.70 + __LABEL($syscall_error)						\
  594.71 + 	SYSCALL_ERROR_HANDLER;					\
  594.72 + 	.previous
  594.73 +@@ -89,7 +89,7 @@
  594.74 + # undef PSEUDO_END
  594.75 + # define PSEUDO_END(sym)					\
  594.76 + 	.subsection 2;						\
  594.77 +-	cfi_endproc;						\
  594.78 ++	.cfi_endproc;						\
  594.79 + 	.size sym, .-sym
  594.80 + 
  594.81 + # define SAVE_ARGS_0	/* Nothing.  */
  594.82 +
  594.83 +--- glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S.orig	2004-05-13 01:47:46.000000000 -0400
  594.84 ++++ glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S	2004-05-13 01:48:17.000000000 -0400
  594.85 +@@ -23,7 +23,7 @@
  594.86 + 	.globl	__vfork
  594.87 + 	.type	__vfork, @function
  594.88 + 	.usepv	__vfork, std
  594.89 +-	cfi_startproc
  594.90 ++	.cfi_startproc
  594.91 + __vfork:
  594.92 + 	ldgp	gp, 0(pv)
  594.93 + 	PSEUDO_PROF
  594.94 +@@ -47,22 +47,22 @@
  594.95 + 	   fork and vfork object files.  */
  594.96 + $do_fork:
  594.97 + 	subq	sp, 16, sp
  594.98 +-	cfi_adjust_cfa_offset(16)
  594.99 ++	.cfi_adjust_cfa_offset(16)
 594.100 + 	stq	ra, 0(sp)
 594.101 +-	cfi_offset(ra, -16)
 594.102 ++	.cfi_offset ra, -16
 594.103 + 	jsr	ra, HIDDEN_JUMPTARGET (__fork)
 594.104 + 	ldgp	gp, 0(ra)
 594.105 + 	ldq	ra, 0(sp)
 594.106 + 	addq	sp, 16, sp
 594.107 +-	cfi_restore(ra)
 594.108 +-	cfi_adjust_cfa_offset(-16)
 594.109 ++	.cfi_restore(ra)
 594.110 ++	.cfi_adjust_cfa_offset(-16)
 594.111 + 	ret
 594.112 + 
 594.113 + $syscall_error:
 594.114 + 	SYSCALL_ERROR_HANDLER
 594.115 + #endif
 594.116 + 
 594.117 +-	cfi_endproc
 594.118 ++	.cfi_endproc
 594.119 + 	.size __vfork, .-__vfork
 594.120 + 
 594.121 + libc_hidden_def (__vfork)
   595.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   595.2 +++ b/patches/glibc/linuxthreads-2.3.2/glibc-2.3.2-sparc64-sigproc.patch	Sat Feb 24 11:00:05 2007 +0000
   595.3 @@ -0,0 +1,26 @@
   595.4 +From: "M.H.VanLeeuwen" 
   595.5 +Subject: crosstool, sparc64, linux 2.6.4, gcc 3.3.3, glibc 2.3.2 success
   595.6 +Date: Mon, 15 Mar 2004 00:23:04 -0600
   595.7 +To: crossgcc@sources.redhat.com
   595.8 +Message-ID: <40554BC8.749A5EC3@megsinet.net>
   595.9 +...
  595.10 +
  595.11 +backported from GLIBC CVS
  595.12 +
  595.13 +Fix this error:
  595.14 +
  595.15 +/cross/crosstool-0.27/build/sparc64-unknown-linux-gnu/gcc-3.3.3-glibc-2.3.2/build-glibc/linuxthreads/libpthread_pic.a(ptw-pause.os)(.text+0x2c): In function `pause':
  595.16 +: undefined reference to `__sigprocmask'
  595.17 +collect2: ld returned 1 exit status
  595.18 +make[2]: *** [/cross/crosstool-0.27/build/sparc64-unknown-linux-gnu/gcc-3.3.3-glibc-2.3.2/build-glibc/linuxthreads/libpthread.so] Error 1
  595.19 +
  595.20 +
  595.21 +--- /cross/sources/glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile	Wed Dec 31 18:00:00 1969
  595.22 ++++ glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile	Sat Mar 13 10:18:43 2004
  595.23 +@@ -0,0 +1,5 @@
  595.24 ++# glibc makefile fragment for linuxthreads on sparc/sparc64.
  595.25 ++
  595.26 ++ifeq ($(subdir),linuxthreads)
  595.27 ++libpthread-routines += ptw-sigprocmask
  595.28 ++endif
  595.29 +
   596.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   596.2 +++ b/patches/glibc/linuxthreads-2.3.2/glibc-linuxthreads-2.3.2-allow-3.4.patch	Sat Feb 24 11:00:05 2007 +0000
   596.3 @@ -0,0 +1,100 @@
   596.4 +[ Revised; now also changes CFLAGS-pt-initfini.s as suggested by 
   596.5 +  http://sources.redhat.com/ml/crossgcc/2004-07/msg00169.html
   596.6 +  to not crash when building a debug glibc on mips ]
   596.7 +
   596.8 +Fixes errors like
   596.9 +
  596.10 +mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.o(.text+0x0):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.S:20: multiple definition of `dummy'
  596.11 +mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.o(.text+0x0):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.S:42: first defined here
  596.12 +mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.o(.text+0x18):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.S:37: multiple definition of `_init'
  596.13 +mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.o(.text+0x30):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.S:76: first defined here
  596.14 +mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.o(.init+0x1c):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.S:86: multiple definition of `_fini'
  596.15 +mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.o(.init+0x10):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.S:48: first defined here
  596.16 +mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.o(.init+0x28):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.S:58: undefined reference to `i_am_not_a_leaf'
  596.17 +mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.o(.init+0x4c):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.S:108: undefined reference to `i_am_not_a_leaf'
  596.18 +mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.o(.init+0x50):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.S:109: undefined reference to `i_am_not_a_leaf'
  596.19 +collect2: ld returned 1 exit status
  596.20 +make[2]: *** [build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/libpthread.so] Error 1
  596.21 +make[2]: Leaving directory `build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/linuxthreads'
  596.22 +make[1]: *** [linuxthreads/others] Error 2
  596.23 +make[1]: Leaving directory `build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2'
  596.24 +make: *** [all] Error 2
  596.25 +
  596.26 +
  596.27 +CVSROOT:	/cvs/glibc
  596.28 +Module name:	libc
  596.29 +Changes by:	aj@sourceware.org	2003-12-02 07:37:29
  596.30 +
  596.31 +Modified files:
  596.32 +	.              : configure.in configure config.make.in 
  596.33 +	csu            : Makefile 
  596.34 +	locale         : Makefile 
  596.35 +	linuxthreads   : Makefile 
  596.36 +	linuxthreads/sysdeps/unix/sysv/linux/x86_64: Makefile 
  596.37 +	nptl           : Makefile 
  596.38 +	nptl/sysdeps/unix/sysv/linux/x86_64: Makefile 
  596.39 +
  596.40 +Log message:
  596.41 +	* config.make.in (fno-unit-at-a-time): Define.
  596.42 +	
  596.43 +	* configure.in: Add test for -fno-unit-at-a-time.
  596.44 +	Fix text for -fpie.
  596.45 +	
  596.46 +	* csu/Makefile (CFLAGS-initfini.s): Add $(fno_unit_at_a_time).
  596.47 +	* locale/Makefile (CFLAGS-loadlocale.c): Likewise.
  596.48 +	
  596.49 +	For linuxthreads:
  596.50 +	* Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
  596.51 +	* sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
  596.52 +	Likewise.
  596.53 +	
  596.54 +	For nptl:
  596.55 +	* Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
  596.56 +	* sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
  596.57 +	Likewise.
  596.58 +
  596.59 +linuxthreads change retrieved with
  596.60 +wget -O foo.patch 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/Makefile.diff?r1=1.83&r2=1.84&cvsroot=glibc' \
  596.61 +'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile.diff?r1=1.5&r2=1.6&cvsroot=glibc'
  596.62 +
  596.63 +and then rediffed against glibc-2.3.2
  596.64 +And then extended to mips...
  596.65 +
  596.66 +===================================================================
  596.67 +RCS file: /cvs/glibc/libc/linuxthreads/Makefile,v
  596.68 +retrieving revision 1.83
  596.69 +retrieving revision 1.84
  596.70 +diff -u -r1.83 -r1.84
  596.71 +--- libc/linuxthreads/Makefile	2003/10/02 18:48:48	1.83
  596.72 ++++ libc/linuxthreads/Makefile	2003/12/02 07:37:28	1.84
  596.73 +@@ -101,7 +101,7 @@
  596.74 + extra-objs += $(crti-objs) $(crtn-objs)
  596.75 + omit-deps += crti crtn
  596.76 + 
  596.77 +-CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions
  596.78 ++CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
  596.79 + endif
  596.80 + 
  596.81 + librt-tests = ex10 ex11
  596.82 +===================================================================
  596.83 +RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile,v
  596.84 +retrieving revision 1.5
  596.85 +retrieving revision 1.6
  596.86 +diff -u -r1.5 -r1.6
  596.87 +--- libc/linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile	2003/04/11 23:34:02	1.5
  596.88 ++++ libc/linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile	2003/12/02 07:37:28	1.6
  596.89 +@@ -1,3 +1,4 @@
  596.90 + ifeq ($(subdir),linuxthreads)
  596.91 +-CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions -fno-asynchronous-unwind-tables
  596.92 ++CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions \
  596.93 ++		       -fno-asynchronous-unwind-tables $(fno-unit-at-a-time)
  596.94 + endif
  596.95 +--- glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/mips/Makefile.old	2004-05-30 18:24:41.000000000 -0700
  596.96 ++++ glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/mips/Makefile	2004-05-30 18:28:03.000000000 -0700
  596.97 +@@ -1,2 +1,6 @@
  596.98 + # pull in __syscall_error routine
  596.99 + libpthread-routines += sysdep
 596.100 ++
 596.101 ++ifeq ($(subdir),linuxthreads)
 596.102 ++CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
 596.103 ++endif
   597.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   597.2 +++ b/patches/glibc/linuxthreads-2.3.2/glibc-linuxthreads-2.3.2-cygwin.patch	Sat Feb 24 11:00:05 2007 +0000
   597.3 @@ -0,0 +1,30 @@
   597.4 +Goes with ../glibc-2.3.2/glibc-2.3.2-cygwin.patch
   597.5 +
   597.6 +If you apply the above patch, but forget this one, you get a cryptic error
   597.7 + .../bin/../x86_64-unknown-linux-gnu/sys-root/usr/lib64/: file not recognized: Is a directory
   597.8 +when linking with -lpthread, because the generated libpthread.so
   597.9 +is missing a filename
  597.10 +
  597.11 +by dank@kegel.com, 2004 Mar 30
  597.12 +
  597.13 +
  597.14 +--- glibc-linuxthreads-2.3.2/linuxthreads/Makefile.old	Tue Mar 30 10:33:12 2004
  597.15 ++++ glibc-linuxthreads-2.3.2/linuxthreads/Makefile	Tue Mar 30 10:33:24 2004
  597.16 +@@ -114,7 +114,7 @@
  597.17 + install: $(inst_libdir)/libpthread.so
  597.18 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
  597.19 + 			      $(objpfx)libpthread.so$(libpthread.so-version) \
  597.20 +-			      $(inst_libdir)/$(patsubst %,$(libtype.oS),\
  597.21 ++			      $(inst_libdir)/$(patsubst %,$(libtype.oST),\
  597.22 + 							$(libprefix)pthread) \
  597.23 + 			      $(+force)
  597.24 + 	(echo '/* GNU ld script';\
  597.25 +@@ -122,7 +122,7 @@
  597.26 + 	 echo '   the static library, so try that secondarily.  */';\
  597.27 + 	 cat $<; \
  597.28 + 	 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
  597.29 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
  597.30 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
  597.31 + 	      ')' \
  597.32 + 	) > $@.new
  597.33 + 	mv -f $@.new $@
   598.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   598.2 +++ b/patches/glibc/linuxthreads-2.3.2/sysdep-cancel-arm-1.2-1.6.patch	Sat Feb 24 11:00:05 2007 +0000
   598.3 @@ -0,0 +1,53 @@
   598.4 +I haven't built glibc-2.3.2 for arm myself, but
   598.5 +http://sources.redhat.com/ml/bug-glibc/2003-05/msg00076.html and
   598.6 +http://www.linux.org.uk/pipermail/linux-arm/2003-November/006560.html
   598.7 +give me the distinct impression that you need the latest sysdep-cancel.h from
   598.8 +cvs.
   598.9 +
  598.10 +Retrieved with
  598.11 +
  598.12 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h.diff?cvsroot=glibc&r1=text&tr1=1.2&r2=text&tr2=1.6&f=u
  598.13 +
  598.14 +===================================================================
  598.15 +RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h,v
  598.16 +retrieving revision 1.2
  598.17 +retrieving revision 1.6
  598.18 +diff -u -r1.2 -r1.6
  598.19 +--- libc/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h	2003/01/12 09:14:25	1.2
  598.20 ++++ libc/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h	2003/06/06 17:31:40	1.6
  598.21 +@@ -24,6 +24,17 @@
  598.22 + 
  598.23 + #if !defined NOT_IN_libc || defined IS_IN_libpthread
  598.24 + 
  598.25 ++/* We push lr onto the stack, so we have to use ldmib instead of ldmia
  598.26 ++   to find the saved arguments.  */
  598.27 ++# ifdef PIC
  598.28 ++#  undef DOARGS_5
  598.29 ++#  undef DOARGS_6
  598.30 ++#  undef DOARGS_7
  598.31 ++#  define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $8];
  598.32 ++#  define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmib ip, {r4, r5};
  598.33 ++#  define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmib ip, {r4, r5, r6};
  598.34 ++# endif
  598.35 ++
  598.36 + # undef PSEUDO_RET
  598.37 + # define PSEUDO_RET						        \
  598.38 +     ldrcc pc, [sp], $4;						        \
  598.39 +@@ -34,7 +45,7 @@
  598.40 + # define PSEUDO(name, syscall_name, args)				\
  598.41 +   .section ".text";							\
  598.42 +     PSEUDO_PROLOGUE;							\
  598.43 +-  ENTRY (name)								\
  598.44 ++  ENTRY (name);								\
  598.45 +     SINGLE_THREAD_P_INT;						\
  598.46 +     bne .Lpseudo_cancel;						\
  598.47 +     DO_CALL (syscall_name, args);					\
  598.48 +@@ -110,7 +121,7 @@
  598.49 +   ldr reg, 2b;								\
  598.50 + 3:									\
  598.51 +   add ip, pc, ip;							\
  598.52 +-  ldr ip, [ip, lr];							\
  598.53 ++  ldr ip, [ip, reg];							\
  598.54 +   teq ip, #0;
  598.55 + #   define SINGLE_THREAD_P_INT						\
  598.56 +   str lr, [sp, $-4]!;							\
   599.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   599.2 +++ b/patches/glibc/linuxthreads-2.3.3/glibc-2.3.3-alpha-prolog.patch	Sat Feb 24 11:00:05 2007 +0000
   599.3 @@ -0,0 +1,36 @@
   599.4 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/sysdeps/alpha/elf/pt-initfini.c.diff?r1=1.3&r2=1.4&cvsroot=glibc'
   599.5 +
   599.6 +Revision 1.4, Wed Dec 10 05:46:41 2003 UTC (8 months, 1 week ago) by aj
   599.7 +	(__asm__): Remove extra .prologue.
   599.8 +
   599.9 +Fixes error
  599.10 +
  599.11 +crosstool-0.28-rc34/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/build-glibc/linuxthreads/crti.S: Assembler messages:
  599.12 +crosstool-0.28-rc34/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/build-glibc/linuxthreads/crti.S:34: Error: .prologue directive without a preceding .ent directive
  599.13 +make[2]: *** [crosstool-0.28-rc34/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/build-glibc/linuxthreads/crti.o] Error 1
  599.14 +make[2]: Leaving directory `crosstool-0.28-rc34/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/glibc-2.3.3/linuxthreads'
  599.15 +
  599.16 +when building with gcc-3.4.1
  599.17 +
  599.18 +===================================================================
  599.19 +RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/alpha/elf/pt-initfini.c,v
  599.20 +retrieving revision 1.3
  599.21 +retrieving revision 1.4
  599.22 +diff -u -r1.3 -r1.4
  599.23 +--- libc/linuxthreads/sysdeps/alpha/elf/pt-initfini.c	2003/07/05 22:56:39	1.3
  599.24 ++++ libc/linuxthreads/sysdeps/alpha/elf/pt-initfini.c	2003/12/10 05:46:41	1.4
  599.25 +@@ -1,5 +1,5 @@
  599.26 + /* Special .init and .fini section support for Alpha.  Linuxthreads version.
  599.27 +-   Copyright (C) 2002 Free Software Foundation, Inc.
  599.28 ++   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
  599.29 +    This file is part of the GNU C Library.
  599.30 + 
  599.31 +    The GNU C Library is free software; you can redistribute it and/or
  599.32 +@@ -75,7 +75,6 @@
  599.33 + 	subq	$30, 16, $30				\n\
  599.34 + 	stq	$26, 0($30)				\n\
  599.35 + 	stq	$29, 8($30)				\n\
  599.36 +-	.prologue 1					\n\
  599.37 + 	.align 3					\n\
  599.38 + /*@_fini_PROLOG_ENDS*/					\n\
  599.39 + 							\n\
   600.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   600.2 +++ b/patches/glibc/linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch	Sat Feb 24 11:00:05 2007 +0000
   600.3 @@ -0,0 +1,38 @@
   600.4 +Fixes
   600.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
   600.6 +...
   600.7 +when building glibc-2.3.3 on cygwin
   600.8 +
   600.9 +Idea from
  600.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
  600.11 +Basically, make glibc use .oST as suffix for 'object static'
  600.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
  600.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
  600.14 +
  600.15 +glibc-linuxthreads-2.3.3 also requires a patch, see 
  600.16 +../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
  600.17 +
  600.18 +[ rediffed against glibc-2.3.3 ]
  600.19 +
  600.20 +
  600.21 +diff -aur glibc-linuxthreads-2.3.3/linuxthreads/Makefile glibc-linuxthreads-2.3.3-cygwin/linuxthreads/Makefile
  600.22 +--- glibc-linuxthreads-2.3.3/linuxthreads/Makefile	2004-08-27 20:38:40.000000000 -0700
  600.23 ++++ glibc-linuxthreads-2.3.3-cygwin/linuxthreads/Makefile	2003-10-02 11:48:48.000000000 -0700
  600.24 +@@ -156,7 +156,7 @@
  600.25 + install: $(inst_libdir)/libpthread.so
  600.26 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
  600.27 + 			      $(objpfx)libpthread.so$(libpthread.so-version) \
  600.28 +-			      $(inst_libdir)/$(patsubst %,$(libtype.oS),\
  600.29 ++			      $(inst_libdir)/$(patsubst %,$(libtype.oST),\
  600.30 + 							$(libprefix)pthread) \
  600.31 + 			      $(+force)
  600.32 + 	(echo '/* GNU ld script';\
  600.33 +@@ -164,7 +164,7 @@
  600.34 + 	 echo '   the static library, so try that secondarily.  */';\
  600.35 + 	 cat $<; \
  600.36 + 	 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
  600.37 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
  600.38 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
  600.39 + 	      ')' \
  600.40 + 	) > $@.new
  600.41 + 	mv -f $@.new $@
   601.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   601.2 +++ b/patches/glibc/linuxthreads-2.3.4/glibc-linuxthreads-2.3.3-cygwin.patch	Sat Feb 24 11:00:05 2007 +0000
   601.3 @@ -0,0 +1,38 @@
   601.4 +Fixes
   601.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
   601.6 +...
   601.7 +when building glibc-2.3.3 on cygwin
   601.8 +
   601.9 +Idea from
  601.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
  601.11 +Basically, make glibc use .oST as suffix for 'object static'
  601.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
  601.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
  601.14 +
  601.15 +glibc-linuxthreads-2.3.3 also requires a patch, see 
  601.16 +../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
  601.17 +
  601.18 +[ rediffed against glibc-2.3.3 ]
  601.19 +
  601.20 +
  601.21 +diff -aur glibc-linuxthreads-2.3.3/linuxthreads/Makefile glibc-linuxthreads-2.3.3-cygwin/linuxthreads/Makefile
  601.22 +--- glibc-linuxthreads-2.3.3/linuxthreads/Makefile	2004-08-27 20:38:40.000000000 -0700
  601.23 ++++ glibc-linuxthreads-2.3.3-cygwin/linuxthreads/Makefile	2003-10-02 11:48:48.000000000 -0700
  601.24 +@@ -156,7 +156,7 @@
  601.25 + install: $(inst_libdir)/libpthread.so
  601.26 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
  601.27 + 			      $(objpfx)libpthread.so$(libpthread.so-version) \
  601.28 +-			      $(inst_libdir)/$(patsubst %,$(libtype.oS),\
  601.29 ++			      $(inst_libdir)/$(patsubst %,$(libtype.oST),\
  601.30 + 							$(libprefix)pthread) \
  601.31 + 			      $(+force)
  601.32 + 	(echo '/* GNU ld script';\
  601.33 +@@ -164,7 +164,7 @@
  601.34 + 	 echo '   the static library, so try that secondarily.  */';\
  601.35 + 	 cat $<; \
  601.36 + 	 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
  601.37 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
  601.38 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
  601.39 + 	      ')' \
  601.40 + 	) > $@.new
  601.41 + 	mv -f $@.new $@
   602.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   602.2 +++ b/patches/glibc/linuxthreads-2.3.4/glibc-linuxthreads-2.3.4-allow-gcc-4.0-rtld.patch	Sat Feb 24 11:00:05 2007 +0000
   602.3 @@ -0,0 +1,89 @@
   602.4 +See http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
   602.5 +
   602.6 +From libc-hacker-return-8343-listarch-libc-hacker=sources dot redhat dot com at sources dot redhat dot com Sat Mar 05 09:21:18 2005
   602.7 +Return-Path: <libc-hacker-return-8343-listarch-libc-hacker=sources dot redhat dot com at sources dot redhat dot com>
   602.8 +Delivered-To: listarch-libc-hacker at sources dot redhat dot com
   602.9 +Received: (qmail 23370 invoked by alias); 5 Mar 2005 09:21:15 -0000
  602.10 +Mailing-List: contact libc-hacker-help at sources dot redhat dot com; run by ezmlm
  602.11 +Precedence: bulk
  602.12 +List-Subscribe: <mailto:libc-hacker-subscribe at sources dot redhat dot com>
  602.13 +List-Archive: <http://sources.redhat.com/ml/libc-hacker/>
  602.14 +List-Post: <mailto:libc-hacker at sources dot redhat dot com>
  602.15 +List-Help: <mailto:libc-hacker-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
  602.16 +Sender: libc-hacker-owner at sources dot redhat dot com
  602.17 +Delivered-To: mailing list libc-hacker at sources dot redhat dot com
  602.18 +Received: (qmail 22971 invoked from network); 5 Mar 2005 09:20:51 -0000
  602.19 +Received: from unknown (HELO sunsite.mff.cuni.cz) (195.113.15.26)
  602.20 +  by sourceware dot org with SMTP; 5 Mar 2005 09:20:51 -0000
  602.21 +Received: from sunsite.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1])
  602.22 +	by sunsite dot mff dot cuni dot cz (8 dot 13 dot 1/8 dot 13 dot 1) with ESMTP id j259KoB5020894;
  602.23 +	Sat, 5 Mar 2005 10:20:50 +0100
  602.24 +Received: (from jj@localhost)
  602.25 +	by sunsite dot mff dot cuni dot cz (8 dot 13 dot 1/8 dot 13 dot 1/Submit) id j259KnO1020889;
  602.26 +	Sat, 5 Mar 2005 10:20:49 +0100
  602.27 +Date: Sat, 5 Mar 2005 10:20:49 +0100
  602.28 +From: Jakub Jelinek <jakub at redhat dot com>
  602.29 +To: Ulrich Drepper <drepper at redhat dot com>, Roland McGrath <roland at redhat dot com>
  602.30 +Cc: Glibc hackers <libc-hacker at sources dot redhat dot com>
  602.31 +Subject: [PATCH] Fix build with GCC 4
  602.32 +Message-ID: <20050305092049.GJ4777@sunsite.mff.cuni.cz>
  602.33 +Reply-To: Jakub Jelinek <jakub at redhat dot com>
  602.34 +Mime-Version: 1.0
  602.35 +Content-Type: text/plain; charset=us-ascii
  602.36 +Content-Disposition: inline
  602.37 +User-Agent: Mutt/1.4.1i
  602.38 +
  602.39 +Hi!
  602.40 +
  602.41 +The thread_offsetof change just mirrors what Alan Modra did to NPTL
  602.42 +tcb-offsets.sym.  Apparently for GCC 4 an offsetof like expression,
  602.43 +but not really offsetof, is no longer constant folded and therefore
  602.44 +not suitable for "i" constraint.
  602.45 +
  602.46 +The ELF_MACHINE_NO_RELA change is needed to avoid
  602.47 +rtld.c: In function '_dl_start':
  602.48 +dynamic-link.h:50: error: nested function 'elf_machine_rela_relative' declared but never defined
  602.49 +dynamic-link.h:47: error: nested function 'elf_machine_rela' declared but never defined
  602.50 +This is what happens.
  602.51 +rtld.c first includes dl-machine.h without RESOLVE_MAP
  602.52 +and without RTLD_BOOTSTRAP defined.  This means that ELF_MACHINE_NO_RELA
  602.53 +is not defined on i386/arm.  Later on it defines RESOLVE_MAP
  602.54 +and RTLD_BOOTSTRAP and includes dynamic-link.h which has:
  602.55 +# if ! ELF_MACHINE_NO_RELA
  602.56 +auto void __attribute__((always_inline))
  602.57 +elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
  602.58 +                  const ElfW(Sym) *sym, const struct r_found_version *version,
  602.59 +                  void *const reloc_addr);
  602.60 +auto void __attribute__((always_inline))
  602.61 +elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
  602.62 +                           void *const reloc_addr);
  602.63 +# endif
  602.64 +and later on includes dl-machine.h which sees RTLD_BOOTSTRAP is
  602.65 +defined and defines ELF_MACHINE_NO_RELA and doesn't define
  602.66 +elf_machine_rela* nested functions.
  602.67 +But the prototypes were already defined and GCC 4 doesn't like this.
  602.68 +ELF_MACHINE_NO_RELA is only ever used in preprocessing conditionals
  602.69 +and never in defined ELF_MACHINE_NO_RELA, so the trick below
  602.70 +already defines ELF_MACHINE_NO_RELA to 1/0 depending on whether
  602.71 +RTLD_BOOTSTRAP is defined and thus the prototypes in dynamic-link.h
  602.72 +that are not desirable are gone.
  602.73 +
  602.74 +2005-03-05  Jakub Jelinek  <jakub@redhat.com>
  602.75 +
  602.76 +	* sysdeps/i386/dl-machine.h (ELF_MACHINE_NO_RELA): Define
  602.77 +	unconditionally to (defined RTLD_BOOTSTRAP).
  602.78 +	* sysdeps/arm/dl-machine.h (ELF_MACHINE_NO_RELA): Likewise.
  602.79 +linuxthreads/
  602.80 +	* sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Rework for GCC 4.
  602.81 +
  602.82 +--- libc/linuxthreads/sysdeps/powerpc/tcb-offsets.sym.jj	2005-03-04 14:21:29.000000000 -0500
  602.83 ++++ libc/linuxthreads/sysdeps/powerpc/tcb-offsets.sym	2005-03-04 14:26:29.000000000 -0500
  602.84 +@@ -8,7 +8,7 @@
  602.85 + -- Abuse tls.h macros to derive offsets relative to the thread register.
  602.86 + #  undef __thread_register
  602.87 + #  define __thread_register	((void *) 0)
  602.88 +-#  define thread_offsetof(mem)	((void *) &THREAD_SELF->p_##mem - (void *) 0)
  602.89 ++#  define thread_offsetof(mem)	((ptrdiff_t) THREAD_SELF + offsetof (struct _pthread_descr_struct, p_##mem))
  602.90 + 
  602.91 + # else
  602.92 + 
   603.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   603.2 +++ b/patches/glibc/linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch	Sat Feb 24 11:00:05 2007 +0000
   603.3 @@ -0,0 +1,37 @@
   603.4 +Fixes
   603.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
   603.6 +...
   603.7 +when building glibc-2.3.3 on cygwin
   603.8 +
   603.9 +Idea from
  603.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
  603.11 +Basically, make glibc use .oST as suffix for 'object static'
  603.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
  603.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
  603.14 +
  603.15 +glibc-linuxthreads-2.3.3 also requires a patch, see 
  603.16 +../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
  603.17 +
  603.18 +[ rediffed against glibc-2.3.5 ]
  603.19 +
  603.20 +diff -aur glibc-2.3.5/linuxthreads/Makefile glibc-2.3.5-cygwin/linuxthreads/Makefile
  603.21 +--- glibc-2.3.5/linuxthreads/Makefile	2005-02-16 12:26:38.000000000 +0100
  603.22 ++++ glibc-2.3.5-cygwin/linuxthreads/Makefile	2005-05-11 08:32:50.453125000 +0200
  603.23 +@@ -159,7 +159,7 @@
  603.24 + install: $(inst_libdir)/libpthread.so
  603.25 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
  603.26 + 			      $(objpfx)libpthread.so$(libpthread.so-version) \
  603.27 +-			      $(inst_libdir)/$(patsubst %,$(libtype.oS),\
  603.28 ++			      $(inst_libdir)/$(patsubst %,$(libtype.oST),\
  603.29 + 							$(libprefix)pthread) \
  603.30 + 			      $(+force)
  603.31 + 	(echo '/* GNU ld script';\
  603.32 +@@ -167,7 +167,7 @@
  603.33 + 	 echo '   the static library, so try that secondarily.  */';\
  603.34 + 	 cat $<; \
  603.35 + 	 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
  603.36 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
  603.37 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
  603.38 + 	      ')' \
  603.39 + 	) > $@.new
  603.40 + 	mv -f $@.new $@
   604.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   604.2 +++ b/patches/glibc/linuxthreads-2.3.6/glibc-linuxthreads-2.3.5-cygwin.patch	Sat Feb 24 11:00:05 2007 +0000
   604.3 @@ -0,0 +1,37 @@
   604.4 +Fixes
   604.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
   604.6 +...
   604.7 +when building glibc-2.3.3 on cygwin
   604.8 +
   604.9 +Idea from
  604.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
  604.11 +Basically, make glibc use .oST as suffix for 'object static'
  604.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
  604.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
  604.14 +
  604.15 +glibc-linuxthreads-2.3.3 also requires a patch, see 
  604.16 +../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
  604.17 +
  604.18 +[ rediffed against glibc-2.3.5 ]
  604.19 +
  604.20 +diff -aur glibc-2.3.5/linuxthreads/Makefile glibc-2.3.5-cygwin/linuxthreads/Makefile
  604.21 +--- glibc-2.3.5/linuxthreads/Makefile	2005-02-16 12:26:38.000000000 +0100
  604.22 ++++ glibc-2.3.5-cygwin/linuxthreads/Makefile	2005-05-11 08:32:50.453125000 +0200
  604.23 +@@ -159,7 +159,7 @@
  604.24 + install: $(inst_libdir)/libpthread.so
  604.25 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
  604.26 + 			      $(objpfx)libpthread.so$(libpthread.so-version) \
  604.27 +-			      $(inst_libdir)/$(patsubst %,$(libtype.oS),\
  604.28 ++			      $(inst_libdir)/$(patsubst %,$(libtype.oST),\
  604.29 + 							$(libprefix)pthread) \
  604.30 + 			      $(+force)
  604.31 + 	(echo '/* GNU ld script';\
  604.32 +@@ -167,7 +167,7 @@
  604.33 + 	 echo '   the static library, so try that secondarily.  */';\
  604.34 + 	 cat $<; \
  604.35 + 	 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
  604.36 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
  604.37 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
  604.38 + 	      ')' \
  604.39 + 	) > $@.new
  604.40 + 	mv -f $@.new $@
   605.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   605.2 +++ b/patches/glibc/linuxthreads-20040827/glibc-linuxthreads-2.3.3-cygwin.patch	Sat Feb 24 11:00:05 2007 +0000
   605.3 @@ -0,0 +1,38 @@
   605.4 +Fixes
   605.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
   605.6 +...
   605.7 +when building glibc-2.3.3 on cygwin
   605.8 +
   605.9 +Idea from
  605.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
  605.11 +Basically, make glibc use .oST as suffix for 'object static'
  605.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
  605.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
  605.14 +
  605.15 +glibc-linuxthreads-2.3.3 also requires a patch, see 
  605.16 +../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
  605.17 +
  605.18 +[ rediffed against glibc-2.3.3 ]
  605.19 +
  605.20 +
  605.21 +diff -aur glibc-linuxthreads-2.3.3/linuxthreads/Makefile glibc-linuxthreads-2.3.3-cygwin/linuxthreads/Makefile
  605.22 +--- glibc-linuxthreads-2.3.3/linuxthreads/Makefile	2004-08-27 20:38:40.000000000 -0700
  605.23 ++++ glibc-linuxthreads-2.3.3-cygwin/linuxthreads/Makefile	2003-10-02 11:48:48.000000000 -0700
  605.24 +@@ -156,7 +156,7 @@
  605.25 + install: $(inst_libdir)/libpthread.so
  605.26 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
  605.27 + 			      $(objpfx)libpthread.so$(libpthread.so-version) \
  605.28 +-			      $(inst_libdir)/$(patsubst %,$(libtype.oS),\
  605.29 ++			      $(inst_libdir)/$(patsubst %,$(libtype.oST),\
  605.30 + 							$(libprefix)pthread) \
  605.31 + 			      $(+force)
  605.32 + 	(echo '/* GNU ld script';\
  605.33 +@@ -164,7 +164,7 @@
  605.34 + 	 echo '   the static library, so try that secondarily.  */';\
  605.35 + 	 cat $<; \
  605.36 + 	 echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
  605.37 +-	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
  605.38 ++	      '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
  605.39 + 	      ')' \
  605.40 + 	) > $@.new
  605.41 + 	mv -f $@.new $@
   606.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   606.2 +++ b/patches/libfloat/990616/100-libfloat_990616-3-lib-versioning.patch	Sat Feb 24 11:00:05 2007 +0000
   606.3 @@ -0,0 +1,48 @@
   606.4 +This patch comes from the Debian archive:
   606.5 +  ftp://ftp.de.debian.org/debian/pool/main/libf/libfloat/libfloat_990616-3.diff.gz
   606.6 +
   606.7 +It was stripped of all Debian-related hunks.
   606.8 +Kept is the library versioning.
   606.9 +
  606.10 +--- libfloat-990616.orig/Makefile
  606.11 ++++ libfloat-990616/Makefile
  606.12 +@@ -4,15 +4,15 @@
  606.13 + #CC=gcc -g -O2 -freg-struct-return -D__LIBFLOAT__
  606.14 + AR=ar
  606.15 + 
  606.16 +-all: libfloat.a libfloat.so
  606.17 ++all: libfloat.a libfloat.so.1
  606.18 + 
  606.19 + libfloat.a: softfloat.o fplib_glue.o
  606.20 + 	rm -f libfloat.a
  606.21 + 	$(AR) cq libfloat.a softfloat.o fplib_glue.o
  606.22 + 
  606.23 +-libfloat.so: softfloat.os fplib_glue.os
  606.24 +-	rm -f libfloat.so
  606.25 +-	gcc -shared softfloat.os fplib_glue.os -o libfloat.so
  606.26 ++libfloat.so.1: softfloat.os fplib_glue.os
  606.27 ++	rm -f libfloat.so.1
  606.28 ++	gcc -shared -Wl,-soname,libfloat.so.1 softfloat.os fplib_glue.os -o libfloat.so.1
  606.29 + 
  606.30 + softfloat.o: softfloat/bits64/softfloat.c
  606.31 + 	$(CC) -c -o softfloat.o -Isoftfloat/bits64/ARM-gcc softfloat/bits64/softfloat.c
  606.32 +@@ -26,14 +26,14 @@
  606.33 + fplib_glue.os: fplib_glue.S
  606.34 + 	$(CC) -fpic -c -o fplib_glue.os fplib_glue.S
  606.35 + 
  606.36 +-install: libfloat.a libfloat.so
  606.37 +-	cp -a libfloat.a /usr/lib
  606.38 +-	cp -a libfloat.so /usr/lib
  606.39 +-	ldconfig
  606.40 ++install: libfloat.a libfloat.so.1
  606.41 ++	cp -a libfloat.a $(DESTDIR)/usr/lib
  606.42 ++	cp -a libfloat.so.1 $(DESTDIR)/usr/lib
  606.43 ++	cd $(DESTDIR)/usr/lib; ln -s libfloat.so.1 libfloat.so
  606.44 + 
  606.45 + clean: 
  606.46 + 	rm -f *.o
  606.47 + 	rm -f *.os
  606.48 + 	rm -f libfloat.a
  606.49 +-	rm -f libfloat.so
  606.50 ++	rm -f libfloat.so.1
  606.51 + 	rm -f *~
   607.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   607.2 +++ b/patches/libfloat/990616/200-cross_compile.patch	Sat Feb 24 11:00:05 2007 +0000
   607.3 @@ -0,0 +1,63 @@
   607.4 +When linking, call directly ld in place of the gcc wrapper, because the wrapper
   607.5 +will try to link with -lfloat, which we don't have right now...
   607.6 +
   607.7 +Simplify CFLAGS to stay ABI compliant (ot so I guess)...
   607.8 +
   607.9 +diff -dur libfloat.orig/Makefile libfloat/Makefile
  607.10 +--- libfloat.orig/Makefile	2007-02-16 19:38:55.000000000 +0100
  607.11 ++++ libfloat/Makefile	2007-02-16 19:46:23.000000000 +0100
  607.12 +@@ -1,8 +1,11 @@
  607.13 + # Makefile for the Linux soft-float library
  607.14 + 
  607.15 +-CC=gcc -O2 -freg-struct-return -fomit-frame-pointer -D__LIBFLOAT__
  607.16 +-#CC=gcc -g -O2 -freg-struct-return -D__LIBFLOAT__
  607.17 +-AR=ar
  607.18 ++AR=$(CROSS_COMPILE)ar
  607.19 ++#CFLAGS=-O2 -freg-struct-return -fomit-frame-pointer -D__LIBFLOAT__
  607.20 ++CFLAGS=-O2 -D__LIBFLOAT__
  607.21 ++CC=$(CROSS_COMPILE)gcc 
  607.22 ++LDFLAGS=-shared -nostdlib
  607.23 ++LD=$(CROSS_COMPILE)ld
  607.24 + 
  607.25 + all: libfloat.a libfloat.so.1
  607.26 + 
  607.27 +@@ -12,28 +13,31 @@
  607.28 + 
  607.29 + libfloat.so.1: softfloat.os fplib_glue.os
  607.30 + 	rm -f libfloat.so.1
  607.31 +-	gcc -shared -Wl,-soname,libfloat.so.1 softfloat.os fplib_glue.os -o libfloat.so.1
  607.32 ++	$(LD) $(LDFLAGS) -soname=libfloat.so.1 softfloat.os fplib_glue.os -o libfloat.so.1
  607.33 + 
  607.34 + softfloat.o: softfloat/bits64/softfloat.c
  607.35 +-	$(CC) -c -o softfloat.o -Isoftfloat/bits64/ARM-gcc softfloat/bits64/softfloat.c
  607.36 ++	$(CC) $(CFLAGS) -c -o softfloat.o -Isoftfloat/bits64/ARM-gcc softfloat/bits64/softfloat.c
  607.37 + 
  607.38 + fplib_glue.o: fplib_glue.S
  607.39 +-	$(CC) -c -o fplib_glue.o fplib_glue.S
  607.40 ++	$(CC) $(CFLAGS) -c -o fplib_glue.o fplib_glue.S
  607.41 + 
  607.42 + softfloat.os: softfloat/bits64/softfloat.c
  607.43 +-	$(CC) -fpic -c -o softfloat.os -Isoftfloat/bits64/ARM-gcc softfloat/bits64/softfloat.c
  607.44 ++	$(CC) $(CFLAGS) -fpic -c -o softfloat.os -Isoftfloat/bits64/ARM-gcc softfloat/bits64/softfloat.c
  607.45 + 
  607.46 + fplib_glue.os: fplib_glue.S
  607.47 +-	$(CC) -fpic -c -o fplib_glue.os fplib_glue.S
  607.48 ++	$(CC) $(CFLAGS) -fpic -c -o fplib_glue.os fplib_glue.S
  607.49 + 
  607.50 + install: libfloat.a libfloat.so.1
  607.51 +-	cp -a libfloat.a $(DESTDIR)/usr/lib
  607.52 +-	cp -a libfloat.so.1 $(DESTDIR)/usr/lib
  607.53 +-	cd $(DESTDIR)/usr/lib; ln -s libfloat.so.1 libfloat.so
  607.54 ++	install -d -m 755 "$(DESTDIR)/usr/lib"
  607.55 ++	install -m 755 libfloat.a "$(DESTDIR)/usr/lib"
  607.56 ++	install -m 755 libfloat.so.1 "$(DESTDIR)/usr/lib"
  607.57 ++	cd $(DESTDIR)/usr/lib
  607.58 ++	ln -s libfloat.so.1 libfloat.so
  607.59 + 
  607.60 + clean: 
  607.61 + 	rm -f *.o
  607.62 + 	rm -f *.os
  607.63 + 	rm -f libfloat.a
  607.64 + 	rm -f libfloat.so.1
  607.65 ++	rm -f libfloat.so
  607.66 + 	rm -f *~
   608.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   608.2 +++ b/patches/linux/2.4.26/01-kmap-types-cleanup.patch	Sat Feb 24 11:00:05 2007 +0000
   608.3 @@ -0,0 +1,306 @@
   608.4 +From http://www.uwsg.iu.edu/hypermail/linux/kernel/0307.2/att-1234/01-kmap-types-cleanup.patch
   608.5 +See http://www.uwsg.iu.edu/hypermail/linux/kernel/0307.2/1234.html
   608.6 +
   608.7 +From: Marc-Christian Petersen (m.c.p@wolk-project.de)
   608.8 +
   608.9 +> > on alpha:
  608.10 +> > internal.h:19:28: asm/kmap_types.h: No such file or directory
  608.11 +> Same on s390 and some other platforms.We should just get rid of
  608.12 +> this problem by providing a generic kmap_types header.
  608.13 +I agree on this but your patch is bogus. Please use the attached one instead.
  608.14 +
  608.15 +Marcello, please apply this one instead. Against 2.4.22-BK (2.4.21-bk14)
  608.16 +
  608.17 +[ I commented out the hunk
  608.18 +#+++ b/include/asm-mips/kmap_types.h	1970-01-01 01:00:00.000000000 +0100
  608.19 +to get this to apply to linux-2.4.26. 
  608.20 +- dank]
  608.21 +
  608.22 +diff -Naurp a/crypto/internal.h b/crypto/internal.h
  608.23 +--- a/crypto/internal.h	2003-07-19 14:09:06.000000000 +0200
  608.24 ++++ b/crypto/internal.h	2003-07-19 14:18:58.000000000 +0200
  608.25 +@@ -14,9 +14,9 @@
  608.26 + #include <linux/mm.h>
  608.27 + #include <linux/highmem.h>
  608.28 + #include <linux/init.h>
  608.29 ++#include <linux/kmap_types.h>
  608.30 + #include <asm/hardirq.h>
  608.31 + #include <asm/softirq.h>
  608.32 +-#include <asm/kmap_types.h>
  608.33 + 
  608.34 + extern enum km_type crypto_km_types[];
  608.35 + 
  608.36 +diff -Naurp a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h
  608.37 +--- a/include/asm-i386/fixmap.h	2003-07-19 14:09:31.000000000 +0200
  608.38 ++++ b/include/asm-i386/fixmap.h	2003-07-19 14:18:58.000000000 +0200
  608.39 +@@ -20,7 +20,7 @@
  608.40 + #include <asm/page.h>
  608.41 + #ifdef CONFIG_HIGHMEM
  608.42 + #include <linux/threads.h>
  608.43 +-#include <asm/kmap_types.h>
  608.44 ++#include <linux/kmap_types.h>
  608.45 + #endif
  608.46 + 
  608.47 + /*
  608.48 +diff -Naurp a/include/asm-i386/highmem.h b/include/asm-i386/highmem.h
  608.49 +--- a/include/asm-i386/highmem.h	2003-07-15 10:28:54.000000000 +0200
  608.50 ++++ b/include/asm-i386/highmem.h	2003-07-19 14:18:58.000000000 +0200
  608.51 +@@ -23,7 +23,6 @@
  608.52 + #include <linux/config.h>
  608.53 + #include <linux/init.h>
  608.54 + #include <linux/interrupt.h>
  608.55 +-#include <asm/kmap_types.h>
  608.56 + #include <asm/pgtable.h>
  608.57 + 
  608.58 + #ifdef CONFIG_DEBUG_HIGHMEM
  608.59 +diff -Naurp a/include/asm-i386/kmap_types.h b/include/asm-i386/kmap_types.h
  608.60 +--- a/include/asm-i386/kmap_types.h	2003-07-19 14:09:31.000000000 +0200
  608.61 ++++ b/include/asm-i386/kmap_types.h	1970-01-01 01:00:00.000000000 +0100
  608.62 +@@ -1,16 +0,0 @@
  608.63 +-#ifndef _ASM_KMAP_TYPES_H
  608.64 +-#define _ASM_KMAP_TYPES_H
  608.65 +-
  608.66 +-enum km_type {
  608.67 +-	KM_BOUNCE_READ,
  608.68 +-	KM_SKB_SUNRPC_DATA,
  608.69 +-	KM_SKB_DATA_SOFTIRQ,
  608.70 +-	KM_USER0,
  608.71 +-	KM_USER1,
  608.72 +-	KM_BH_IRQ,
  608.73 +-	KM_SOFTIRQ0,
  608.74 +-	KM_SOFTIRQ1,
  608.75 +-	KM_TYPE_NR
  608.76 +-};
  608.77 +-
  608.78 +-#endif
  608.79 +diff -Naurp a/include/asm-m68k/kmap_types.h b/include/asm-m68k/kmap_types.h
  608.80 +--- a/include/asm-m68k/kmap_types.h	2003-07-19 14:09:33.000000000 +0200
  608.81 ++++ b/include/asm-m68k/kmap_types.h	1970-01-01 01:00:00.000000000 +0100
  608.82 +@@ -1,18 +0,0 @@
  608.83 +-#ifdef __KERNEL__
  608.84 +-#ifndef _ASM_KMAP_TYPES_H
  608.85 +-#define _ASM_KMAP_TYPES_H
  608.86 +-
  608.87 +-enum km_type {
  608.88 +-	KM_BOUNCE_READ,
  608.89 +-	KM_SKB_SUNRPC_DATA,
  608.90 +-	KM_SKB_DATA_SOFTIRQ,
  608.91 +-	KM_USER0,
  608.92 +-	KM_USER1,
  608.93 +-	KM_BH_IRQ,
  608.94 +-	KM_SOFTIRQ0,
  608.95 +-	KM_SOFTIRQ1,
  608.96 +-	KM_TYPE_NR
  608.97 +-};
  608.98 +-
  608.99 +-#endif
 608.100 +-#endif /* __KERNEL__ */
 608.101 +diff -Naurp a/include/asm-mips/fixmap.h b/include/asm-mips/fixmap.h
 608.102 +--- a/include/asm-mips/fixmap.h	2002-09-27 23:26:03.000000000 +0200
 608.103 ++++ b/include/asm-mips/fixmap.h	2003-07-19 14:18:58.000000000 +0200
 608.104 +@@ -18,7 +18,7 @@
 608.105 + #include <asm/page.h>
 608.106 + #ifdef CONFIG_HIGHMEM
 608.107 + #include <linux/threads.h>
 608.108 +-#include <asm/kmap_types.h>
 608.109 ++#include <linux/kmap_types.h>
 608.110 + #endif
 608.111 + 
 608.112 + /*
 608.113 +diff -Naurp a/include/asm-mips/highmem.h b/include/asm-mips/highmem.h
 608.114 +--- a/include/asm-mips/highmem.h	2002-12-18 01:03:59.000000000 +0100
 608.115 ++++ b/include/asm-mips/highmem.h	2003-07-19 14:18:58.000000000 +0200
 608.116 +@@ -22,7 +22,6 @@
 608.117 + 
 608.118 + #include <linux/init.h>
 608.119 + #include <linux/interrupt.h>
 608.120 +-#include <asm/kmap_types.h>
 608.121 + #include <asm/pgtable.h>
 608.122 + 
 608.123 + /* undef for production */
 608.124 +#diff -Naurp a/include/asm-mips/kmap_types.h b/include/asm-mips/kmap_types.h
 608.125 +#--- a/include/asm-mips/kmap_types.h	2002-12-18 01:03:59.000000000 +0100
 608.126 +#+++ b/include/asm-mips/kmap_types.h	1970-01-01 01:00:00.000000000 +0100
 608.127 +#@@ -1,14 +0,0 @@
 608.128 +#-#ifndef _ASM_KMAP_TYPES_H
 608.129 +#-#define _ASM_KMAP_TYPES_H
 608.130 +#-
 608.131 +#-enum km_type {
 608.132 +#-	KM_BOUNCE_READ,
 608.133 +#-	KM_SKB_SUNRPC_DATA,
 608.134 +#-	KM_SKB_DATA_SOFTIRQ,
 608.135 +#-	KM_USER0,
 608.136 +#-	KM_USER1,
 608.137 +#-	KM_BIO_IRQ,
 608.138 +#-	KM_TYPE_NR
 608.139 +#-};
 608.140 +#-
 608.141 +#-#endif
 608.142 +diff -Naurp a/include/asm-ppc/highmem.h b/include/asm-ppc/highmem.h
 608.143 +--- a/include/asm-ppc/highmem.h	2003-07-19 14:09:33.000000000 +0200
 608.144 ++++ b/include/asm-ppc/highmem.h	2003-07-19 14:18:58.000000000 +0200
 608.145 +@@ -24,7 +24,7 @@
 608.146 + 
 608.147 + #include <linux/init.h>
 608.148 + #include <linux/interrupt.h>
 608.149 +-#include <asm/kmap_types.h>
 608.150 ++#include <linux/kmap_types.h>
 608.151 + #include <asm/pgtable.h>
 608.152 + 
 608.153 + /* undef for production */
 608.154 +diff -Naurp a/include/asm-ppc/kmap_types.h b/include/asm-ppc/kmap_types.h
 608.155 +--- a/include/asm-ppc/kmap_types.h	2003-07-19 14:09:33.000000000 +0200
 608.156 ++++ b/include/asm-ppc/kmap_types.h	1970-01-01 01:00:00.000000000 +0100
 608.157 +@@ -1,18 +0,0 @@
 608.158 +-#ifdef __KERNEL__
 608.159 +-#ifndef _ASM_KMAP_TYPES_H
 608.160 +-#define _ASM_KMAP_TYPES_H
 608.161 +-
 608.162 +-enum km_type {
 608.163 +-	KM_BOUNCE_READ,
 608.164 +-	KM_SKB_SUNRPC_DATA,
 608.165 +-	KM_SKB_DATA_SOFTIRQ,
 608.166 +-	KM_USER0,
 608.167 +-	KM_USER1,
 608.168 +-	KM_BH_IRQ,
 608.169 +-	KM_SOFTIRQ0,
 608.170 +-	KM_SOFTIRQ1,
 608.171 +-	KM_TYPE_NR
 608.172 +-};
 608.173 +-
 608.174 +-#endif
 608.175 +-#endif /* __KERNEL__ */
 608.176 +diff -Naurp a/include/asm-ppc64/kmap_types.h b/include/asm-ppc64/kmap_types.h
 608.177 +--- a/include/asm-ppc64/kmap_types.h	2003-07-19 14:09:35.000000000 +0200
 608.178 ++++ b/include/asm-ppc64/kmap_types.h	1970-01-01 01:00:00.000000000 +0100
 608.179 +@@ -1,23 +0,0 @@
 608.180 +-#ifdef __KERNEL__
 608.181 +-#ifndef _ASM_KMAP_TYPES_H
 608.182 +-#define _ASM_KMAP_TYPES_H
 608.183 +-
 608.184 +-enum km_type {
 608.185 +-	KM_BOUNCE_READ,
 608.186 +-	KM_SKB_SUNRPC_DATA,
 608.187 +-	KM_SKB_DATA_SOFTIRQ,
 608.188 +-	KM_USER0,
 608.189 +-	KM_USER1,
 608.190 +-	KM_BIO_SRC_IRQ,
 608.191 +-	KM_BIO_DST_IRQ,
 608.192 +-	KM_PTE0,
 608.193 +-	KM_PTE1,
 608.194 +-	KM_IRQ0,
 608.195 +-	KM_IRQ1,
 608.196 +-	KM_SOFTIRQ0,
 608.197 +-	KM_SOFTIRQ1,	
 608.198 +-	KM_TYPE_NR
 608.199 +-};
 608.200 +-
 608.201 +-#endif
 608.202 +-#endif /* __KERNEL__ */
 608.203 +diff -Naurp a/include/asm-sparc/highmem.h b/include/asm-sparc/highmem.h
 608.204 +--- a/include/asm-sparc/highmem.h	2003-07-15 10:28:56.000000000 +0200
 608.205 ++++ b/include/asm-sparc/highmem.h	2003-07-19 14:18:58.000000000 +0200
 608.206 +@@ -21,7 +21,7 @@
 608.207 + #ifdef __KERNEL__
 608.208 + 
 608.209 + #include <linux/interrupt.h>
 608.210 +-#include <asm/kmap_types.h>
 608.211 ++#include <linux/kmap_types.h>
 608.212 + 
 608.213 + /* undef for production */
 608.214 + #define HIGHMEM_DEBUG 1
 608.215 +diff -Naurp a/include/asm-sparc/kmap_types.h b/include/asm-sparc/kmap_types.h
 608.216 +--- a/include/asm-sparc/kmap_types.h	2003-07-19 14:09:37.000000000 +0200
 608.217 ++++ b/include/asm-sparc/kmap_types.h	1970-01-01 01:00:00.000000000 +0100
 608.218 +@@ -1,16 +0,0 @@
 608.219 +-#ifndef _ASM_KMAP_TYPES_H
 608.220 +-#define _ASM_KMAP_TYPES_H
 608.221 +-
 608.222 +-enum km_type {
 608.223 +-	KM_BOUNCE_READ,
 608.224 +-	KM_SKB_SUNRPC_DATA,
 608.225 +-	KM_SKB_DATA_SOFTIRQ,
 608.226 +-	KM_USER0,
 608.227 +-	KM_USER1,
 608.228 +-	KM_BH_IRQ,
 608.229 +-	KM_SOFTIRQ0,
 608.230 +-	KM_SOFTIRQ1,
 608.231 +-	KM_TYPE_NR
 608.232 +-};
 608.233 +-
 608.234 +-#endif
 608.235 +diff -Naurp a/include/asm-sparc64/kmap_types.h b/include/asm-sparc64/kmap_types.h
 608.236 +--- a/include/asm-sparc64/kmap_types.h	2003-07-19 14:09:37.000000000 +0200
 608.237 ++++ b/include/asm-sparc64/kmap_types.h	1970-01-01 01:00:00.000000000 +0100
 608.238 +@@ -1,20 +0,0 @@
 608.239 +-#ifndef _ASM_KMAP_TYPES_H
 608.240 +-#define _ASM_KMAP_TYPES_H
 608.241 +-
 608.242 +-/* Dummy header just to define km_type.  None of this
 608.243 +- * is actually used on sparc64.  -DaveM
 608.244 +- */
 608.245 +-
 608.246 +-enum km_type {
 608.247 +-	KM_BOUNCE_READ,
 608.248 +-	KM_SKB_SUNRPC_DATA,
 608.249 +-	KM_SKB_DATA_SOFTIRQ,
 608.250 +-	KM_USER0,
 608.251 +-	KM_USER1,
 608.252 +-	KM_BH_IRQ,
 608.253 +-	KM_SOFTIRQ0,
 608.254 +-	KM_SOFTIRQ1,
 608.255 +-	KM_TYPE_NR
 608.256 +-};
 608.257 +-
 608.258 +-#endif
 608.259 +diff -Naurp a/include/asm-x86_64/kmap_types.h b/include/asm-x86_64/kmap_types.h
 608.260 +--- a/include/asm-x86_64/kmap_types.h	2003-07-19 14:09:37.000000000 +0200
 608.261 ++++ b/include/asm-x86_64/kmap_types.h	1970-01-01 01:00:00.000000000 +0100
 608.262 +@@ -1,15 +0,0 @@
 608.263 +-#ifndef _ASM_KMAP_TYPES_H
 608.264 +-#define _ASM_KMAP_TYPES_H
 608.265 +-
 608.266 +-enum km_type {
 608.267 +-	KM_BOUNCE_READ,
 608.268 +-	KM_SKB_DATA,
 608.269 +-	KM_SKB_DATA_SOFTIRQ,
 608.270 +-	KM_USER0,
 608.271 +-	KM_USER1,
 608.272 +-	KM_SOFTIRQ0,
 608.273 +-	KM_SOFTIRQ1,
 608.274 +-	KM_TYPE_NR
 608.275 +-};
 608.276 +-
 608.277 +-#endif
 608.278 +diff -Naurp a/include/linux/highmem.h b/include/linux/highmem.h
 608.279 +--- a/include/linux/highmem.h	2003-07-19 14:09:37.000000000 +0200
 608.280 ++++ b/include/linux/highmem.h	2003-07-19 14:18:58.000000000 +0200
 608.281 +@@ -2,6 +2,7 @@
 608.282 + #define _LINUX_HIGHMEM_H
 608.283 + 
 608.284 + #include <linux/config.h>
 608.285 ++#include <linux/kmap_types.h>
 608.286 + #include <asm/pgalloc.h>
 608.287 + 
 608.288 + #ifdef CONFIG_HIGHMEM
 608.289 +diff -Naurp a/include/linux/kmap_types.h b/include/linux/kmap_types.h
 608.290 +--- a/include/linux/kmap_types.h	1970-01-01 01:00:00.000000000 +0100
 608.291 ++++ b/include/linux/kmap_types.h	2003-07-19 14:18:58.000000000 +0200
 608.292 +@@ -0,0 +1,16 @@
 608.293 ++#ifndef _LINUX_KMAP_TYPES_H
 608.294 ++#define _LINUX_KMAP_TYPES_H
 608.295 ++
 608.296 ++enum km_type {
 608.297 ++	KM_BOUNCE_READ,
 608.298 ++	KM_SKB_SUNRPC_DATA,
 608.299 ++	KM_SKB_DATA_SOFTIRQ,
 608.300 ++	KM_USER0,
 608.301 ++	KM_USER1,
 608.302 ++	KM_BH_IRQ,
 608.303 ++	KM_SOFTIRQ0,
 608.304 ++	KM_SOFTIRQ1,
 608.305 ++	KM_TYPE_NR
 608.306 ++};
 608.307 ++
 608.308 ++#endif
 608.309 +
   609.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   609.2 +++ b/patches/linux/2.4.26/kaz-types.patch	Sat Feb 24 11:00:05 2007 +0000
   609.3 @@ -0,0 +1,60 @@
   609.4 +The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
   609.5 +
   609.6 +In file included from sys/ustat.h:30,
   609.7 +                 from ../sysdeps/unix/sysv/linux/ustat.c:21:
   609.8 +../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
   609.9 +make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
  609.10 +make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
  609.11 +make[1]: *** [misc/subdir_lib] Error 2
  609.12 +make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
  609.13 +make: *** [all] Error 2
  609.14 +
  609.15 +----------- snip ---------------
  609.16 +
  609.17 +Date: Fri, 06 Jun 2003 08:00:00 +0900
  609.18 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
  609.19 +Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
  609.20 + error: redefinition of `struct user_fpu_struct'"
  609.21 +To: linux-sh@m17n.org
  609.22 +Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
  609.23 +
  609.24 +Hi,
  609.25 +
  609.26 +Dan Kegel <dank@kegel.com> wrote:
  609.27 +> When I try to build glibc-2.3.2 for sh4, it fails with the error
  609.28 +[snip]
  609.29 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
  609.30 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
  609.31 +[snip]
  609.32 +> The error reminds me of the kind of thing fixed by
  609.33 +> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
  609.34 +
  609.35 +It seems that the definitions in asm/user.h and the above patch collide.
  609.36 +I'm not sure why you need this patch, but is it needed for the problem
  609.37 +about struct ustat that you pointed out in this list, isn't it?
  609.38 +I found why I don't hit ustat problem - my local kernel tree includes
  609.39 +the following patch, though I can't recall about it.
  609.40 +
  609.41 +Regards,
  609.42 +	kaz
  609.43 +--
  609.44 +diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
  609.45 +--- linux-2.5.69-sf-orig/include/linux/types.h	Wed Mar  5 12:29:34 2003
  609.46 ++++ sh4-unknown-linux-gnu/include/linux/types.h	Sat Apr 19 10:05:52 2003
  609.47 +@@ -141,6 +141,7 @@
  609.48 + 
  609.49 + #endif /* __KERNEL_STRICT_NAMES */
  609.50 + 
  609.51 ++#ifdef	__KERNEL__
  609.52 + /*
  609.53 +  * Below are truly Linux-specific types that should never collide with
  609.54 +  * any application/library that wants linux/types.h.
  609.55 +@@ -152,5 +153,6 @@
  609.56 + 	char			f_fname[6];
  609.57 + 	char			f_fpack[6];
  609.58 + };
  609.59 ++#endif
  609.60 + 
  609.61 + #endif /* _LINUX_TYPES_H */
  609.62 +
  609.63 +
   610.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   610.2 +++ b/patches/linux/2.4.26/linux-2.4-bsd-expr.patch	Sat Feb 24 11:00:05 2007 +0000
   610.3 @@ -0,0 +1,25 @@
   610.4 +# http://in3www.epfl.ch/~schaffne/linux-2.4-bsd-expr.patch
   610.5 +The following makes it possible to compile linux 2.4.19 to 2.4.25 on Mac OS X,
   610.6 +where "expr" doesn't understand the "length" construct
   610.7 +(which it doesn't have to, according to SuSv3
   610.8 +(see http://www.opengroup.org/onlinepubs/007904975/utilities/expr.html)
   610.9 +See also http://sources.redhat.com/ml/crossgcc/2004-02/msg00131.html
  610.10 +
  610.11 +Fixes error
  610.12 +  expr: syntax error
  610.13 +  KERNELRELEASE "2.4.21" exceeds 64 characters
  610.14 +  make: *** [include/linux/version.h] Error 1
  610.15 +
  610.16 +
  610.17 +diff -ur linux-2.4.23-old/Makefile linux-2.4.23/Makefile
  610.18 +--- linux-2.4.23-old/Makefile	2003-12-09 14:27:56.000000000 +0100
  610.19 ++++ linux-2.4.23/Makefile	2003-12-09 14:28:37.000000000 +0100
  610.20 +@@ -353,7 +353,7 @@
  610.21 + 	@rm -f .ver1
  610.22 + 
  610.23 + include/linux/version.h: ./Makefile
  610.24 +-	@expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
  610.25 ++	@expr "$(KERNELRELEASE)" : '.*' \<= $(uts_len) > /dev/null || \
  610.26 + 	  (echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len) characters >&2; false)
  610.27 + 	@echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
  610.28 + 	@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
   611.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   611.2 +++ b/patches/linux/2.4.26/linux-2.4.21-allow-gcc-3.3-arm-lib.patch	Sat Feb 24 11:00:05 2007 +0000
   611.3 @@ -0,0 +1,203 @@
   611.4 +Reconstructed from http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2003-December/018647.html
   611.5 +See also http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=1540
   611.6 +
   611.7 +Message-ID: <DDA001.8070502@de.bosch.com>
   611.8 +Subject: Help cross compiling the kernel for arm.
   611.9 +From: dirk.behme at de.bosch.com
  611.10 +
  611.11 +Aitor Garcia wrote:
  611.12 +> Hello everybody,
  611.13 +> 
  611.14 +> I am having problems cross compiling the kernel for arm.
  611.15 +> 
  611.16 +> This is the error message I get:
  611.17 +> 
  611.18 +> blkpg.c: In function `blk_ioctl':
  611.19 +> blkpg.c:252: error: asm-specifier for variable `__r1' conflicts with asm clobber list
  611.20 +> blkpg.c:252: confused by earlier errors, bailing out make[3]: *** [blkpg.o] Error 1
  611.21 +> make[3]: Leaving directory `/root/toolchain/kernel-arm/linux-2.4.21/drivers/block'
  611.22 +> make[2]: *** [first_rule] Error 2
  611.23 +> make[2]: Leaving directory `/root/toolchain/kernel-arm/linux-2.4.21/drivers/block'
  611.24 +> make[1]: *** [_subdir_block] Error 2
  611.25 +> make[1]: Leaving directory `/root/toolchain/kernel-arm/linux-2.4.21/drivers'
  611.26 +> make: *** [_dir_drivers] Error 2
  611.27 +> 
  611.28 +> These are the toolchain versions I am using:
  611.29 +>  host=i686-pc-linux-gnu
  611.30 +>  binutils_version=2.14           
  611.31 +>  gcc_version=3.3.2                
  611.32 +>  glibc_version=2.3.2             
  611.33 +>  kernel_version=2.4.21  
  611.34 +> and applied the kernel patch for arm. 2.4.21-rmk1.
  611.35 +> ... 
  611.36 +> I have also seen references to this bug in ARM linux
  611.37 +> Developer. Patch Number = 1540. But this patch is
  611.38 +> classified as discarded.
  611.39 +
  611.40 +You need something like 1540 to compile 2.4.21 with gcc 3.3.2. 1540 was 
  611.41 +discarded because of AFLAGS change.
  611.42 +
  611.43 +Try the attachment.
  611.44 +
  611.45 +Dirk
  611.46 +-------------- next part --------------
  611.47 +--- linux/arch/arm/lib/getuser.S.orig	Mon Nov 17 07:41:51 2003
  611.48 ++++ linux/arch/arm/lib/getuser.S	Mon Nov 17 07:43:16 2003
  611.49 +@@ -17,7 +17,7 @@
  611.50 +  *
  611.51 +  * Inputs:	r0 contains the address
  611.52 +  * Outputs:	r0 is the error code
  611.53 +- *		r1, r2 contains the zero-extended value
  611.54 ++ *		r1, ip contains the zero-extended value
  611.55 +  *		lr corrupted
  611.56 +  *
  611.57 +  * No other registers must be altered.  (see include/asm-arm/uaccess.h
  611.58 +@@ -42,14 +42,14 @@ __get_user_1:
  611.59 + 
  611.60 + 	.global	__get_user_2
  611.61 + __get_user_2:
  611.62 +-	bic	r2, sp, #0x1f00
  611.63 +-	bic	r2, r2, #0x00ff
  611.64 +-	ldr	r2, [r2, #TSK_ADDR_LIMIT]
  611.65 +-	sub	r2, r2, #2
  611.66 +-	cmp	r0, r2
  611.67 ++	bic	ip, sp, #0x1f00
  611.68 ++	bic	ip, ip, #0x00ff
  611.69 ++	ldr	ip, [ip, #TSK_ADDR_LIMIT]
  611.70 ++	sub	ip, ip, #2
  611.71 ++	cmp	r0, ip
  611.72 + 2:	ldrlsbt	r1, [r0], #1
  611.73 +-3:	ldrlsbt	r2, [r0]
  611.74 +-	orrls	r1, r1, r2, lsl #8
  611.75 ++3:	ldrlsbt	ip, [r0]
  611.76 ++	orrls	r1, r1, ip, lsl #8
  611.77 + 	movls	r0, #0
  611.78 + 	movls	pc, lr
  611.79 + 	b	__get_user_bad
  611.80 +@@ -68,20 +68,20 @@ __get_user_4:
  611.81 + 
  611.82 + 	.global	__get_user_8
  611.83 + __get_user_8:
  611.84 +-	bic	r2, sp, #0x1f00
  611.85 +-	bic	r2, r2, #0x00ff
  611.86 +-	ldr	r2, [r2, #TSK_ADDR_LIMIT]
  611.87 +-	sub	r2, r2, #8
  611.88 +-	cmp	r0, r2
  611.89 ++	bic	ip, sp, #0x1f00
  611.90 ++	bic	ip, ip, #0x00ff
  611.91 ++	ldr	ip, [ip, #TSK_ADDR_LIMIT]
  611.92 ++	sub	ip, ip, #8
  611.93 ++	cmp	r0, ip
  611.94 + 5:	ldrlst	r1, [r0], #4
  611.95 +-6:	ldrlst	r2, [r0]
  611.96 ++6:	ldrlst	ip, [r0]
  611.97 + 	movls	r0, #0
  611.98 + 	movls	pc, lr
  611.99 + 
 611.100 + 	/* fall through */
 611.101 + 
 611.102 + __get_user_bad_8:
 611.103 +-	mov	r2, #0
 611.104 ++	mov	ip, #0
 611.105 + __get_user_bad:
 611.106 + 	mov	r1, #0
 611.107 + 	mov	r0, #-14
 611.108 +--- linux/arch/arm/lib/putuser.S.orig	Mon Nov 17 07:41:57 2003
 611.109 ++++ linux/arch/arm/lib/putuser.S	Mon Nov 17 07:42:26 2003
 611.110 +@@ -16,7 +16,7 @@
 611.111 +  * __put_user_X
 611.112 +  *
 611.113 +  * Inputs:	r0 contains the address
 611.114 +- *		r1, r2 contains the value
 611.115 ++ *		r1, ip contains the value
 611.116 +  * Outputs:	r0 is the error code
 611.117 +  *		lr corrupted
 611.118 +  *
 611.119 +@@ -30,11 +30,11 @@
 611.120 + 
 611.121 + 	.global	__put_user_1
 611.122 + __put_user_1:
 611.123 +-	bic	r2, sp, #0x1f00
 611.124 +-	bic	r2, r2, #0x00ff
 611.125 +-	ldr	r2, [r2, #TSK_ADDR_LIMIT]
 611.126 +-	sub	r2, r2, #1
 611.127 +-	cmp	r0, r2
 611.128 ++	bic	ip, sp, #0x1f00
 611.129 ++	bic	ip, ip, #0x00ff
 611.130 ++	ldr	ip, [ip, #TSK_ADDR_LIMIT]
 611.131 ++	sub	ip, ip, #1
 611.132 ++	cmp	r0, ip
 611.133 + 1:	strlsbt	r1, [r0]
 611.134 + 	movls	r0, #0
 611.135 + 	movls	pc, lr
 611.136 +@@ -42,11 +42,11 @@ __put_user_1:
 611.137 + 
 611.138 + 	.global	__put_user_2
 611.139 + __put_user_2:
 611.140 +-	bic	r2, sp, #0x1f00
 611.141 +-	bic	r2, r2, #0x00ff
 611.142 +-	ldr	r2, [r2, #TSK_ADDR_LIMIT]
 611.143 +-	sub	r2, r2, #2
 611.144 +-	cmp	r0, r2
 611.145 ++	bic	ip, sp, #0x1f00
 611.146 ++	bic	ip, ip, #0x00ff
 611.147 ++	ldr	ip, [ip, #TSK_ADDR_LIMIT]
 611.148 ++	sub	ip, ip, #2
 611.149 ++	cmp	r0, ip
 611.150 + 2:	strlsbt	r1, [r0], #1
 611.151 + 	movls	r1, r1, lsr #8
 611.152 + 3:	strlsbt	r1, [r0]
 611.153 +@@ -56,11 +56,11 @@ __put_user_2:
 611.154 + 
 611.155 + 	.global	__put_user_4
 611.156 + __put_user_4:
 611.157 +-	bic	r2, sp, #0x1f00
 611.158 +-	bic	r2, r2, #0x00ff
 611.159 +-	ldr	r2, [r2, #TSK_ADDR_LIMIT]
 611.160 +-	sub	r2, r2, #4
 611.161 +-	cmp	r0, r2
 611.162 ++	bic	ip, sp, #0x1f00
 611.163 ++	bic	ip, ip, #0x00ff
 611.164 ++	ldr	ip, [ip, #TSK_ADDR_LIMIT]
 611.165 ++	sub	ip, ip, #4
 611.166 ++	cmp	r0, ip
 611.167 + 4:	strlst	r1, [r0]
 611.168 + 	movls	r0, #0
 611.169 + 	movls	pc, lr
 611.170 +@@ -74,7 +74,7 @@ __put_user_8:
 611.171 + 	sub	ip, ip, #8
 611.172 + 	cmp	r0, ip
 611.173 + 5:	strlst	r1, [r0], #4
 611.174 +-6:	strlst	r2, [r0]
 611.175 ++6:	strlst	ip, [r0]
 611.176 + 	movls	r0, #0
 611.177 + 	movls	pc, lr
 611.178 + 
 611.179 +--- linux/include/asm-arm/uaccess.h.orig	Mon Nov 17 07:41:04 2003
 611.180 ++++ linux/include/asm-arm/uaccess.h	Mon Nov 17 07:41:37 2003
 611.181 +@@ -86,7 +86,7 @@ extern int __get_user_bad(void);
 611.182 + 			__get_user_x(__r1, __p, __e, 1, "lr");		\
 611.183 + 	       		break;						\
 611.184 + 		case 2:							\
 611.185 +-			__get_user_x(__r1, __p, __e, 2, "r2", "lr");	\
 611.186 ++			__get_user_x(__r1, __p, __e, 2, "ip", "lr");	\
 611.187 + 			break;						\
 611.188 + 		case 4:							\
 611.189 + 	       		__get_user_x(__r1, __p, __e, 4, "lr");		\
 611.190 +@@ -122,13 +122,13 @@ extern int __put_user_bad(void);
 611.191 + 		register int __e asm("r0");				\
 611.192 + 		switch (sizeof(*(p))) {					\
 611.193 + 		case 1:							\
 611.194 +-			__put_user_x(__r1, __p, __e, 1, "r2", "lr");	\
 611.195 ++			__put_user_x(__r1, __p, __e, 1, "ip", "lr");	\
 611.196 + 			break;						\
 611.197 + 		case 2:							\
 611.198 +-			__put_user_x(__r1, __p, __e, 2, "r2", "lr");	\
 611.199 ++			__put_user_x(__r1, __p, __e, 2, "ip", "lr");	\
 611.200 + 			break;						\
 611.201 + 		case 4:							\
 611.202 +-			__put_user_x(__r1, __p, __e, 4, "r2", "lr");	\
 611.203 ++			__put_user_x(__r1, __p, __e, 4, "ip", "lr");	\
 611.204 + 			break;						\
 611.205 + 		case 8:							\
 611.206 + 			__put_user_x(__r1, __p, __e, 8, "ip", "lr");	\
   612.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   612.2 +++ b/patches/linux/2.4.26/linux-2.4.26-allow-gcc-3.4-arm-kernel.patch	Sat Feb 24 11:00:05 2007 +0000
   612.3 @@ -0,0 +1,23 @@
   612.4 +Fixes
   612.5 +semaphore.c:180:5: missing terminating " character
   612.6 +semaphore.c:213:9: missing terminating " character
   612.7 +make[1]: *** [semaphore.o] Error 1
   612.8 +make[1]: Leaving directory `/home/dank/queue/jobdir.fast/crosstool-dev/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.2.5/linux-2.4.26/arch/arm/kernel'
   612.9 +make: *** [_dir_arch/arm/kernel] Error 2
  612.10 +
  612.11 +when building kernel.org 2.4.26 for arm with gcc-3.3.x
  612.12 +(Note: one probably wants to apply ftp://ftp.arm.linux.org.uk/pub/armlinux/source/kernel-patches/v2.4/patch-2.4.26-vrs1.bz2
  612.13 +instead of my patches when really building 2.4.26 for arm;
  612.14 +my patches only include the bare minimum to get the vanilla kernel to compile.)
  612.15 +
  612.16 +--- linux-2.4.26/arch/arm/kernel/semaphore.c.old	Mon Mar 21 06:50:38 2005
  612.17 ++++ linux-2.4.26/arch/arm/kernel/semaphore.c	Mon Mar 21 06:50:55 2005
  612.18 +@@ -193,7 +193,7 @@
  612.19 + 	bl	__down_interruptible		\n\
  612.20 + 	mov	ip, r0				\n\
  612.21 + 	ldmfd	sp!, {r0 - r3, pc}^		\n\
  612.22 +-
  612.23 ++						\n\
  612.24 + 	.align	5				\n\
  612.25 + 	.globl	__down_trylock_failed		\n\
  612.26 + __down_trylock_failed:				\n\
   613.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   613.2 +++ b/patches/linux/2.4.26/linux-2.4.26-arm-nonofpu.patch	Sat Feb 24 11:00:05 2007 +0000
   613.3 @@ -0,0 +1,40 @@
   613.4 +Backport of linux-2.6.8-arm-nonofpu.patch.
   613.5 +Fixes error when building linux-2.4.26 kernel with gcc-3.4 on arm.
   613.6 +
   613.7 +/opt/crosstool/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/bin/arm-unknown-linux-gnu-gcc -D__KERNEL__ -I/home/dank/wk/crosstool-0.28-rc37/build/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.4.26/include -Wall -Wstrict-prototypes -Wno-trigraphs -Os -fno-strict-aliasing -fno-common -Uarm -fno-common -pipe -mapcs-32 -D__LINUX_ARM_ARCH__=4 -march=armv4 -mtune=strongarm110 -mshort-load-bytes -msoft-float -Uarm -S -o constants.h.tmp.1 getconstants.c
   613.8 +cc1: error: invalid option `short-load-bytes'
   613.9 +make[2]: *** [constants.h] Error 1
  613.10 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.4.26/arch/arm/tools'
  613.11 +make[1]: *** [dep] Error 2
  613.12 +make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.4.26/arch/arm/tools'
  613.13 +make: *** [archdep] Error 2
  613.14 +
  613.15 +
  613.16 +--- linux-2.4.26/Makefile.old	Thu Sep 30 23:21:14 2004
  613.17 ++++ linux-2.4.26/Makefile	Thu Sep 30 23:24:12 2004
  613.18 +@@ -21,6 +21,10 @@
  613.19 + 
  613.20 + CROSS_COMPILE 	=
  613.21 + 
  613.22 ++# From linux-2.6
  613.23 ++check_gcc = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
  613.24 ++export check_gcc
  613.25 ++
  613.26 + #
  613.27 + # Include the make variables (CC, etc...)
  613.28 + #
  613.29 +--- linux-2.4.26/arch/arm/Makefile.old	Thu Sep 30 23:16:49 2004
  613.30 ++++ linux-2.4.26/arch/arm/Makefile	Thu Sep 30 23:25:27 2004
  613.31 +@@ -50,9 +50,9 @@
  613.32 + tune-$(CONFIG_CPU_SA110)	:=-mtune=strongarm110
  613.33 + tune-$(CONFIG_CPU_SA1100)	:=-mtune=strongarm1100
  613.34 + 
  613.35 +-CFLAGS_BOOT	:=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Uarm
  613.36 +-CFLAGS		+=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Uarm
  613.37 +-AFLAGS		+=$(apcs-y) $(arch-y) -mno-fpu -msoft-float
  613.38 ++CFLAGS_BOOT	:=$(apcs-y) $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Uarm
  613.39 ++CFLAGS		+=$(apcs-y) $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Uarm
  613.40 ++AFLAGS		+=$(apcs-y) $(arch-y) -msoft-float
  613.41 + 
  613.42 + ifeq ($(CONFIG_CPU_26),y)
  613.43 + PROCESSOR	:= armo
   614.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   614.2 +++ b/patches/linux/2.4.26/linux-2.4.26-mkdep-xargs.patch	Sat Feb 24 11:00:05 2007 +0000
   614.3 @@ -0,0 +1,28 @@
   614.4 +About ten times, various people have noticed that 'make dep' uses
   614.5 +really, really long commandlines.  This breaks sh even on linux sometimes.
   614.6 +
   614.7 +For 2.4, see e.g.
   614.8 +http://marc.theaimsgroup.com/?l=linux-kernel&m=96589814004919&w=2
   614.9 +http://marc.theaimsgroup.com/?l=linux-kernel&m=96589814004919&q=p3
  614.10 +http://www.xraylith.wisc.edu/~khan/software/gnu-win32/cygwin-to-linux-cross-howto.txt
  614.11 +http://www.uclinux.org/pub/uClinux/archive/1728.html
  614.12 +
  614.13 +Fixes error when building linux kernel for some default arm configurations:
  614.14 +
  614.15 +scripts/mkdep -- `find /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/asm /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/linux /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/scsi /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/net /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/math-emu \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
  614.16 +/bin/sh: line 1: scripts/mkdep: Argument list too long
  614.17 +make: *** [dep-files] Error 126
  614.18 +
  614.19 +[ For linux-2.4.26 ]
  614.20 +
  614.21 +--- linux-2.4.26/Makefile.old	2004-04-14 06:05:41.000000000 -0700
  614.22 ++++ linux-2.4.26/Makefile	2004-09-13 21:27:39.000000000 -0700
  614.23 +@@ -500,7 +500,7 @@
  614.24 + ifdef CONFIG_MODVERSIONS
  614.25 + 	$(MAKE) update-modverfile
  614.26 + endif
  614.27 +-	scripts/mkdep -- `find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
  614.28 ++	find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print | xargs scripts/mkdep | cat > .hdepend
  614.29 + 	scripts/mkdep -- init/*.c > .depend
  614.30 + 
  614.31 + ifdef CONFIG_MODVERSIONS
   615.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   615.2 +++ b/patches/linux/2.4.26/linux-2.4.26-wdt977-uaccess.patch	Sat Feb 24 11:00:05 2007 +0000
   615.3 @@ -0,0 +1,17 @@
   615.4 +Fixes drivers/char/char.o(.text+0x178a4): In function `$a':
   615.5 +: undefined reference to `get_user'
   615.6 +
   615.7 +Part of ftp://ftp.arm.linux.org.uk/pub/armlinux/source/kernel-patches/v2.4/patch-2.4.26-vrs1.bz2
   615.8 +
   615.9 +diff -urN linux-2.4.26/drivers/char/wdt977.c linux-2.4.26-vrs1/drivers/char/wdt977.c
  615.10 +--- linux-2.4.26/drivers/char/wdt977.c	2002-11-28 23:53:12.000000000 +0000
  615.11 ++++ linux-2.4.26-vrs1/drivers/char/wdt977.c	2004-01-14 21:32:25.000000000 +0000
  615.12 +@@ -27,6 +27,7 @@
  615.13 + #include <asm/io.h>
  615.14 + #include <asm/system.h>
  615.15 + #include <asm/mach-types.h>
  615.16 ++#include <asm/uaccess.h>
  615.17 + 
  615.18 + #define WATCHDOG_MINOR	130
  615.19 + 
  615.20 +
   616.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   616.2 +++ b/patches/linux/2.6.11.3/arch_alpha_kernel_srcons.patch	Sat Feb 24 11:00:05 2007 +0000
   616.3 @@ -0,0 +1,134 @@
   616.4 +Date: Sun, 20 Mar 2005 20:26:02 -0800
   616.5 +From: Richard Henderson <rth@twiddle.net>
   616.6 +To: Andrew Morton <akpm@osdl.org>
   616.7 +Cc: Dan Kegel <dank@kegel.com>, jbglaw@lug-owl.de,
   616.8 +        linux-kernel@vger.kernel.org, torvalds@osdl.org
   616.9 +Subject: Re: 2.6.11.3 build problem in arch/alpha/kernel/srcons.c with gcc-4.0
  616.10 +Message-ID: <20050321042602.GA3795@twiddle.net>
  616.11 +Mail-Followup-To: Andrew Morton <akpm@osdl.org>, Dan Kegel <dank@kegel.com>,
  616.12 +	jbglaw@lug-owl.de, linux-kernel@vger.kernel.org, torvalds@osdl.org
  616.13 +References: <423E238F.3030805@kegel.com> <20050320190352.65cc1396.akpm@osdl.org>
  616.14 +Mime-Version: 1.0
  616.15 +Content-Type: text/plain; charset=us-ascii
  616.16 +Content-Disposition: inline
  616.17 +In-Reply-To: <20050320190352.65cc1396.akpm@osdl.org>
  616.18 +User-Agent: Mutt/1.4.1i
  616.19 +
  616.20 +On Sun, Mar 20, 2005 at 07:03:52PM -0800, Andrew Morton wrote:
  616.21 +> Dan Kegel <dank@kegel.com> wrote:
  616.22 +> >
  616.23 +> > Anyone with an alpha care to suggest a fix for this?
  616.24 +> > 
  616.25 +> > arch/alpha/kernel/srmcons.c: In function 'srmcons_open':
  616.26 +> > arch/alpha/kernel/srmcons.c:196: warning: 'srmconsp' may be used uninitialized in this function
  616.27 +> > make[1]: *** [arch/alpha/kernel/srmcons.o] Error 1
  616.28 +> > make: *** [arch/alpha/kernel] Error 2
  616.29 +> > 
  616.30 +> > I get this when building the 2.6.11.3 kernel with a recent gcc-4.0 snapshot.
  616.31 +> > 
  616.32 +> 
  616.33 +> It's beyond gcc's ability to figure out that the code is OK.  Options would
  616.34 +> be to disable -Werror, or to artificially initialise that variable.
  616.35 +
  616.36 +Fixed thus.
  616.37 +
  616.38 +Note that even with a _raw_read_trylock implementation, smp still
  616.39 +doesn't work.  Everything that init spawns dies immediately.  I
  616.40 +havn't had a chance to find out why yet...
  616.41 +
  616.42 +[ Note: deleted changes to smp.c, since they didn't apply cleanly
  616.43 +  to 2.6.11.3 (the function had moved, I guess), and they seemed unrelated.]
  616.44 +
  616.45 +r~
  616.46 +
  616.47 +
  616.48 +
  616.49 +You can import this changeset into BK by piping this whole message to:
  616.50 +'| bk receive [path to repository]' or apply the patch as usual.
  616.51 +
  616.52 +===================================================================
  616.53 +
  616.54 +
  616.55 +ChangeSet@1.2289, 2005-03-20 12:29:41-08:00, rth@kanga.twiddle.home
  616.56 +  [ALPHA] Elimitate two warnings from gcc4.
  616.57 +
  616.58 +
  616.59 + smp.c     |   43 -------------------------------------------
  616.60 + srmcons.c |   27 ++++++++++-----------------
  616.61 + 2 files changed, 10 insertions(+), 60 deletions(-)
  616.62 +
  616.63 +
  616.64 +diff -Nru a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
  616.65 +--- a/arch/alpha/kernel/srmcons.c	2005-03-20 20:23:28 -08:00
  616.66 ++++ b/arch/alpha/kernel/srmcons.c	2005-03-20 20:23:28 -08:00
  616.67 +@@ -164,29 +164,22 @@
  616.68 + 	unsigned long flags;
  616.69 + 	int retval = 0;
  616.70 + 
  616.71 +-	spin_lock_irqsave(&srmconsp_lock, flags);
  616.72 +-
  616.73 +-	do {
  616.74 +-		if (srmconsp != NULL) {
  616.75 +-			*ps = srmconsp;
  616.76 +-			break;
  616.77 +-		}
  616.78 ++	if (srmconsp == NULL) {
  616.79 ++		spin_lock_irqsave(&srmconsp_lock, flags);
  616.80 + 
  616.81 + 		srmconsp = kmalloc(sizeof(*srmconsp), GFP_KERNEL);
  616.82 +-		if (srmconsp == NULL) {
  616.83 ++		if (srmconsp == NULL)
  616.84 + 			retval = -ENOMEM;
  616.85 +-			break;
  616.86 ++		else {
  616.87 ++			srmconsp->tty = NULL;
  616.88 ++			spin_lock_init(&srmconsp->lock);
  616.89 ++			init_timer(&srmconsp->timer);
  616.90 + 		}
  616.91 + 
  616.92 +-		srmconsp->tty = NULL;
  616.93 +-		spin_lock_init(&srmconsp->lock);
  616.94 +-		init_timer(&srmconsp->timer);
  616.95 +-
  616.96 +-		*ps = srmconsp;
  616.97 +-	} while(0);
  616.98 +-
  616.99 +-	spin_unlock_irqrestore(&srmconsp_lock, flags);
 616.100 ++		spin_unlock_irqrestore(&srmconsp_lock, flags);
 616.101 ++	}
 616.102 + 
 616.103 ++	*ps = srmconsp;
 616.104 + 	return retval;
 616.105 + }
 616.106 + 
 616.107 +
 616.108 +===================================================================
 616.109 +
 616.110 +
 616.111 +This BitKeeper patch contains the following changesets:
 616.112 +1.2289
 616.113 +## Wrapped with gzip_uu ##
 616.114 +
 616.115 +
 616.116 +M'XL( $!,/D(  [56[V_;-A#]+/X5!Q38FFV628KZY<!!TJ98BP9;D"&?BL)@
 616.117 +M),H6+%$:2=DQIOWO)>4XSH8D1KK%-F#@>'J\]^[>V6_@6@LU\919H#?PL=%F
 616.118 +MXG$E?+,N\[P2OA3&QJ^:QL;'BZ868YLY?O=YS&_;$?4C9$\ON<D6L!)*3SSB
 616.119 +M!_<1LVG%Q+OZ\.OUQ=D50M,IO%]P.1=_" /3*3*-6O$JUZ?<+*I&^D9QJ6MA
 616.120 +MN)\U=7^?VE.,J7V') YP&/4DPBSN,Y(3PAD1.:8LB=@>3:P:O]%YY3=J_D^4
 616.121 +M$ <DH4&0!LRBL"A YT!\2I,4<#C&P9AB('1"TPDC(YQ,, 9+]G1I(?B]($X#
 616.122 +M^)G""*-W\/]2>(\R^')V<?GQ["M\J,JZ--P(,.L&UES)4LXU%*JI89YES$>?
 616.123 +M@82,8'2Y5Q6-7OA""'.,3AZA:?O><Y4MQKQJ%WR\%$J*:JQ5G352^YEC%&!"
 616.124 +ML664!%%/+:^PCW-:I 7)XUSDE*;Q$_(= K9]<FK1E(0]HPPS6^'S2C\"6+=;
 616.125 +ML#O=&::T#^*8QGU*;D@>)3BWJA?I3?Z"*G>@#RND49R&PW0_0\O-^RN)C,R\
 616.126 +MNCVM2MD9U<CRUL_%EYU:7P]+32@A$644]RQ,*!TL0>B_#4'" X8@&$8D?A5+
 616.127 +M7(FU*JT1[@J?S869M:I<67/,M%%=9D!W;MTLN(&?6@VE!EZM^4:#>] (Z<RR
 616.128 +M':3?8:36P\<._^5S'?L.+YV3*(88?;*4@"*O+.#M'5QK^P^_75]<',%?R/-T
 616.129 +M6\I9U63+6:G^U'PEWOZP2QS"OT!1\;D^.K:0<03$0;HO[W%,EY5LLQ)@-DM4
 616.130 +M6@P7>;O<T8DQ&]CF'P\'^Q)D:?;WCTY<\&C(<2<S4]9"/3P? D-I"8'$7IHD
 616.131 +MCNT6L9,[6DIH.PI/,_/^=H^FCI7KV737WO;X*2\Y\QW^W?A/JP#==')YJDVG
 616.132 +M+=HA'SU8!H1AS!@-^X"F=LJ<AT+R8@]9"['@52QT+BKA'%2W,]-):YML(?+.
 616.133 +M[HSY,90&\D9H^:,!GIF.5]4&6J&*1M7 Y08Z+8JNLB!%)S-3-M)%:]M:YZKM
 616.134 +I\COL*J?5=SG*3;1=2J%3<?]?PY:?+7573PFE(L5)@+X!A'U=W,@(    
 616.135 + 
 616.136 +
 616.137 +
   617.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   617.2 +++ b/patches/linux/2.6.11.3/kaz-types.patch	Sat Feb 24 11:00:05 2007 +0000
   617.3 @@ -0,0 +1,60 @@
   617.4 +The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
   617.5 +
   617.6 +In file included from sys/ustat.h:30,
   617.7 +                 from ../sysdeps/unix/sysv/linux/ustat.c:21:
   617.8 +../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
   617.9 +make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
  617.10 +make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
  617.11 +make[1]: *** [misc/subdir_lib] Error 2
  617.12 +make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
  617.13 +make: *** [all] Error 2
  617.14 +
  617.15 +----------- snip ---------------
  617.16 +
  617.17 +Date: Fri, 06 Jun 2003 08:00:00 +0900
  617.18 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
  617.19 +Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
  617.20 + error: redefinition of `struct user_fpu_struct'"
  617.21 +To: linux-sh@m17n.org
  617.22 +Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
  617.23 +
  617.24 +Hi,
  617.25 +
  617.26 +Dan Kegel <dank@kegel.com> wrote:
  617.27 +> When I try to build glibc-2.3.2 for sh4, it fails with the error
  617.28 +[snip]
  617.29 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
  617.30 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
  617.31 +[snip]
  617.32 +> The error reminds me of the kind of thing fixed by
  617.33 +> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
  617.34 +
  617.35 +It seems that the definitions in asm/user.h and the above patch collide.
  617.36 +I'm not sure why you need this patch, but is it needed for the problem
  617.37 +about struct ustat that you pointed out in this list, isn't it?
  617.38 +I found why I don't hit ustat problem - my local kernel tree includes
  617.39 +the following patch, though I can't recall about it.
  617.40 +
  617.41 +Regards,
  617.42 +	kaz
  617.43 +--
  617.44 +diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
  617.45 +--- linux-2.5.69-sf-orig/include/linux/types.h	Wed Mar  5 12:29:34 2003
  617.46 ++++ sh4-unknown-linux-gnu/include/linux/types.h	Sat Apr 19 10:05:52 2003
  617.47 +@@ -141,6 +141,7 @@
  617.48 + 
  617.49 + #endif /* __KERNEL_STRICT_NAMES */
  617.50 + 
  617.51 ++#ifdef	__KERNEL__
  617.52 + /*
  617.53 +  * Below are truly Linux-specific types that should never collide with
  617.54 +  * any application/library that wants linux/types.h.
  617.55 +@@ -152,5 +153,6 @@
  617.56 + 	char			f_fname[6];
  617.57 + 	char			f_fpack[6];
  617.58 + };
  617.59 ++#endif
  617.60 + 
  617.61 + #endif /* _LINUX_TYPES_H */
  617.62 +
  617.63 +
   618.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   618.2 +++ b/patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-asm-i386.patch	Sat Feb 24 11:00:05 2007 +0000
   618.3 @@ -0,0 +1,150 @@
   618.4 +Fixes
   618.5 +
   618.6 +In file included from include/asm/thread_info.h:16,
   618.7 +                 from include/linux/thread_info.h:21,
   618.8 +                 from include/linux/spinlock.h:12,
   618.9 +                 from include/linux/capability.h:45,
  618.10 +                 from include/linux/sched.h:7,
  618.11 +                 from arch/i386/kernel/asm-offsets.c:7:
  618.12 +include/asm/processor.h:87: error: array type has incomplete element type
  618.13 +make[1]: *** [arch/i386/kernel/asm-offsets.asm] Error 1
  618.14 +
  618.15 +--- linux-2.6.11.3/include/asm-i386/processor.h.old	Tue Mar 15 06:45:26 2005
  618.16 ++++ linux-2.6.11.3/include/asm-i386/processor.h	Tue Mar 15 06:46:45 2005
  618.17 +@@ -81,6 +81,64 @@
  618.18 + #define X86_VENDOR_UNKNOWN 0xff
  618.19 + 
  618.20 + /*
  618.21 ++ * Size of io_bitmap.
  618.22 ++ */
  618.23 ++#define IO_BITMAP_BITS  65536
  618.24 ++#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
  618.25 ++#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
  618.26 ++#define INVALID_IO_BITMAP_OFFSET 0x8000
  618.27 ++#define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000
  618.28 ++
  618.29 ++struct tss_struct {
  618.30 ++	unsigned short	back_link,__blh;
  618.31 ++	unsigned long	esp0;
  618.32 ++	unsigned short	ss0,__ss0h;
  618.33 ++	unsigned long	esp1;
  618.34 ++	unsigned short	ss1,__ss1h;	/* ss1 is used to cache MSR_IA32_SYSENTER_CS */
  618.35 ++	unsigned long	esp2;
  618.36 ++	unsigned short	ss2,__ss2h;
  618.37 ++	unsigned long	__cr3;
  618.38 ++	unsigned long	eip;
  618.39 ++	unsigned long	eflags;
  618.40 ++	unsigned long	eax,ecx,edx,ebx;
  618.41 ++	unsigned long	esp;
  618.42 ++	unsigned long	ebp;
  618.43 ++	unsigned long	esi;
  618.44 ++	unsigned long	edi;
  618.45 ++	unsigned short	es, __esh;
  618.46 ++	unsigned short	cs, __csh;
  618.47 ++	unsigned short	ss, __ssh;
  618.48 ++	unsigned short	ds, __dsh;
  618.49 ++	unsigned short	fs, __fsh;
  618.50 ++	unsigned short	gs, __gsh;
  618.51 ++	unsigned short	ldt, __ldth;
  618.52 ++	unsigned short	trace, io_bitmap_base;
  618.53 ++	/*
  618.54 ++	 * The extra 1 is there because the CPU will access an
  618.55 ++	 * additional byte beyond the end of the IO permission
  618.56 ++	 * bitmap. The extra byte must be all 1 bits, and must
  618.57 ++	 * be within the limit.
  618.58 ++	 */
  618.59 ++	unsigned long	io_bitmap[IO_BITMAP_LONGS + 1];
  618.60 ++	/*
  618.61 ++	 * Cache the current maximum and the last task that used the bitmap:
  618.62 ++	 */
  618.63 ++	unsigned long io_bitmap_max;
  618.64 ++	struct thread_struct *io_bitmap_owner;
  618.65 ++	/*
  618.66 ++	 * pads the TSS to be cacheline-aligned (size is 0x100)
  618.67 ++	 */
  618.68 ++	unsigned long __cacheline_filler[35];
  618.69 ++	/*
  618.70 ++	 * .. and then another 0x100 bytes for emergency kernel stack
  618.71 ++	 */
  618.72 ++	unsigned long stack[64];
  618.73 ++} __attribute__((packed));
  618.74 ++
  618.75 ++#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
  618.76 ++#define ARCH_MIN_TASKALIGN	16
  618.77 ++
  618.78 ++/*
  618.79 +  * capabilities of CPUs
  618.80 +  */
  618.81 + 
  618.82 +@@ -308,16 +366,6 @@
  618.83 + 
  618.84 + #define HAVE_ARCH_PICK_MMAP_LAYOUT
  618.85 + 
  618.86 +-/*
  618.87 +- * Size of io_bitmap.
  618.88 +- */
  618.89 +-#define IO_BITMAP_BITS  65536
  618.90 +-#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
  618.91 +-#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
  618.92 +-#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
  618.93 +-#define INVALID_IO_BITMAP_OFFSET 0x8000
  618.94 +-#define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000
  618.95 +-
  618.96 + struct i387_fsave_struct {
  618.97 + 	long	cwd;
  618.98 + 	long	swd;
  618.99 +@@ -371,54 +419,6 @@
 618.100 + } mm_segment_t;
 618.101 + 
 618.102 + struct thread_struct;
 618.103 +-
 618.104 +-struct tss_struct {
 618.105 +-	unsigned short	back_link,__blh;
 618.106 +-	unsigned long	esp0;
 618.107 +-	unsigned short	ss0,__ss0h;
 618.108 +-	unsigned long	esp1;
 618.109 +-	unsigned short	ss1,__ss1h;	/* ss1 is used to cache MSR_IA32_SYSENTER_CS */
 618.110 +-	unsigned long	esp2;
 618.111 +-	unsigned short	ss2,__ss2h;
 618.112 +-	unsigned long	__cr3;
 618.113 +-	unsigned long	eip;
 618.114 +-	unsigned long	eflags;
 618.115 +-	unsigned long	eax,ecx,edx,ebx;
 618.116 +-	unsigned long	esp;
 618.117 +-	unsigned long	ebp;
 618.118 +-	unsigned long	esi;
 618.119 +-	unsigned long	edi;
 618.120 +-	unsigned short	es, __esh;
 618.121 +-	unsigned short	cs, __csh;
 618.122 +-	unsigned short	ss, __ssh;
 618.123 +-	unsigned short	ds, __dsh;
 618.124 +-	unsigned short	fs, __fsh;
 618.125 +-	unsigned short	gs, __gsh;
 618.126 +-	unsigned short	ldt, __ldth;
 618.127 +-	unsigned short	trace, io_bitmap_base;
 618.128 +-	/*
 618.129 +-	 * The extra 1 is there because the CPU will access an
 618.130 +-	 * additional byte beyond the end of the IO permission
 618.131 +-	 * bitmap. The extra byte must be all 1 bits, and must
 618.132 +-	 * be within the limit.
 618.133 +-	 */
 618.134 +-	unsigned long	io_bitmap[IO_BITMAP_LONGS + 1];
 618.135 +-	/*
 618.136 +-	 * Cache the current maximum and the last task that used the bitmap:
 618.137 +-	 */
 618.138 +-	unsigned long io_bitmap_max;
 618.139 +-	struct thread_struct *io_bitmap_owner;
 618.140 +-	/*
 618.141 +-	 * pads the TSS to be cacheline-aligned (size is 0x100)
 618.142 +-	 */
 618.143 +-	unsigned long __cacheline_filler[35];
 618.144 +-	/*
 618.145 +-	 * .. and then another 0x100 bytes for emergency kernel stack
 618.146 +-	 */
 618.147 +-	unsigned long stack[64];
 618.148 +-} __attribute__((packed));
 618.149 +-
 618.150 +-#define ARCH_MIN_TASKALIGN	16
 618.151 + 
 618.152 + struct thread_struct {
 618.153 + /* cached TLS descriptors. */
   619.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   619.2 +++ b/patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-asm-m68k.patch	Sat Feb 24 11:00:05 2007 +0000
   619.3 @@ -0,0 +1,32 @@
   619.4 +Fixes
   619.5 +
   619.6 +In file included from include/asm/setup.h:8,
   619.7 +                 from include/asm/machdep.h:8,
   619.8 +                 from include/asm/irq.h:6,
   619.9 +                 from include/asm/hardirq.h:8,
  619.10 +                 from include/linux/hardirq.h:6,
  619.11 +                 from include/asm-generic/local.h:6,
  619.12 +                 from include/asm/local.h:4,
  619.13 +                 from include/linux/module.h:21,
  619.14 +                 from init/main.c:16:
  619.15 +include/asm-m68k/setup.h:365: error: array type has incomplete element type
  619.16 +
  619.17 +when compiling with gcc-4.0.  (Affects ppc, too, for some reason.)
  619.18 +
  619.19 +--- linux-2.6.11.3/include/asm-m68k/setup.h.old	Fri Mar 18 13:48:03 2005
  619.20 ++++ linux-2.6.11.3/include/asm-m68k/setup.h	Fri Mar 18 13:48:14 2005
  619.21 +@@ -362,12 +362,13 @@
  619.22 + #ifndef __ASSEMBLY__
  619.23 + extern int m68k_num_memory;		/* # of memory blocks found (and used) */
  619.24 + extern int m68k_realnum_memory;		/* real # of memory blocks found */
  619.25 +-extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
  619.26 + 
  619.27 + struct mem_info {
  619.28 + 	unsigned long addr;		/* physical address of memory chunk */
  619.29 + 	unsigned long size;		/* length of memory chunk (in bytes) */
  619.30 + };
  619.31 ++
  619.32 ++extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
  619.33 + #endif
  619.34 + 
  619.35 + #endif /* __KERNEL__ */
   620.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   620.2 +++ b/patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-asm-ppc64.patch	Sat Feb 24 11:00:05 2007 +0000
   620.3 @@ -0,0 +1,30 @@
   620.4 +Fixes
   620.5 +
   620.6 +In file included from include/asm/current.h:4,
   620.7 +                 from include/linux/wait.h:27,
   620.8 +                 from include/asm/semaphore.h:15,
   620.9 +                 from include/linux/sched.h:19,
  620.10 +                 from arch/ppc64/kernel/asm-offsets.c:18:
  620.11 +include/asm/paca.h:25: error: array type has incomplete element type
  620.12 +make[1]: *** [arch/ppc64/kernel/asm-offsets.s] Error 1
  620.13 +
  620.14 +when building with gcc-4.0
  620.15 +
  620.16 +--- linux-2.6.11.3/include/asm-ppc64/paca.h.old	Fri Mar 18 13:23:40 2005
  620.17 ++++ linux-2.6.11.3/include/asm-ppc64/paca.h	Fri Mar 18 13:24:04 2005
  620.18 +@@ -22,7 +22,6 @@
  620.19 + #include	<asm/iSeries/ItLpRegSave.h>
  620.20 + #include	<asm/mmu.h>
  620.21 + 
  620.22 +-extern struct paca_struct paca[];
  620.23 + register struct paca_struct *local_paca asm("r13");
  620.24 + #define get_paca()	local_paca
  620.25 + 
  620.26 +@@ -114,5 +113,7 @@
  620.27 + 	struct ItLpRegSave reg_save;
  620.28 + #endif
  620.29 + };
  620.30 ++
  620.31 ++extern struct paca_struct paca[];
  620.32 + 
  620.33 + #endif /* _PPC64_PACA_H */
   621.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   621.2 +++ b/patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-asm-x86_64.patch	Sat Feb 24 11:00:05 2007 +0000
   621.3 @@ -0,0 +1,28 @@
   621.4 +Fixes:
   621.5 +
   621.6 +In file included from include/linux/spinlock.h:16,
   621.7 +                 from include/linux/capability.h:45,
   621.8 +                 from include/linux/sched.h:7,
   621.9 +                 from arch/x86_64/kernel/asm-offsets.c:7:
  621.10 +include/asm/processor.h:79: error: array type has incomplete element type
  621.11 +make[1]: *** [arch/x86_64/kernel/asm-offsets.asm] Error 1
  621.12 +
  621.13 +--- linux-2.6.11.3/include/asm-x86_64/processor.h.old	Tue Mar 15 07:05:07 2005
  621.14 ++++ linux-2.6.11.3/include/asm-x86_64/processor.h	Tue Mar 15 07:09:53 2005
  621.15 +@@ -179,7 +179,6 @@
  621.16 + #define IO_BITMAP_BITS  65536
  621.17 + #define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
  621.18 + #define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
  621.19 +-#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
  621.20 + #define INVALID_IO_BITMAP_OFFSET 0x8000
  621.21 + 
  621.22 + struct i387_fxsave_struct {
  621.23 +@@ -222,6 +221,8 @@
  621.24 + 	 */
  621.25 + 	unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
  621.26 + } __attribute__((packed)) ____cacheline_aligned;
  621.27 ++
  621.28 ++#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
  621.29 + 
  621.30 + extern struct cpuinfo_x86 boot_cpu_data;
  621.31 + DECLARE_PER_CPU(struct tss_struct,init_tss);
   622.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   622.2 +++ b/patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-i2c.patch	Sat Feb 24 11:00:05 2007 +0000
   622.3 @@ -0,0 +1,58 @@
   622.4 +Fixes
   622.5 +
   622.6 +In file included from fs/compat_ioctl.c:69,
   622.7 +                 from arch/ppc64/kernel/ioctl32.c:24:
   622.8 +include/linux/i2c.h:58: error: array type has incomplete element type
   622.9 +include/linux/i2c.h:197: error: array type has incomplete element type
  622.10 +
  622.11 +when compiling with gcc-4.0.
  622.12 +
  622.13 +--- linux-2.6.11.3/include/linux/i2c.h.old	2005-03-19 10:59:09.000000000 -0800
  622.14 ++++ linux-2.6.11.3/include/linux/i2c.h	2005-03-19 11:01:37.000000000 -0800
  622.15 +@@ -36,7 +36,22 @@
  622.16 + 
  622.17 + /* --- General options ------------------------------------------------	*/
  622.18 + 
  622.19 +-struct i2c_msg;
  622.20 ++/*
  622.21 ++ * I2C Message - used for pure i2c transaction, also from /dev interface
  622.22 ++ */
  622.23 ++struct i2c_msg {
  622.24 ++	__u16 addr;	/* slave address			*/
  622.25 ++ 	__u16 flags;		
  622.26 ++#define I2C_M_TEN	0x10	/* we have a ten bit chip address	*/
  622.27 ++#define I2C_M_RD	0x01
  622.28 ++#define I2C_M_NOSTART	0x4000
  622.29 ++#define I2C_M_REV_DIR_ADDR	0x2000
  622.30 ++#define I2C_M_IGNORE_NAK	0x1000
  622.31 ++#define I2C_M_NO_RD_ACK		0x0800
  622.32 ++ 	__u16 len;		/* msg length				*/
  622.33 ++ 	__u8 *buf;		/* pointer to msg data			*/
  622.34 ++};
  622.35 ++
  622.36 + struct i2c_algorithm;
  622.37 + struct i2c_adapter;
  622.38 + struct i2c_client;
  622.39 +@@ -379,22 +394,6 @@
  622.40 + /* Return 1 if adapter supports everything we need, 0 if not. */
  622.41 + extern int i2c_check_functionality (struct i2c_adapter *adap, u32 func);
  622.42 + 
  622.43 +-/*
  622.44 +- * I2C Message - used for pure i2c transaction, also from /dev interface
  622.45 +- */
  622.46 +-struct i2c_msg {
  622.47 +-	__u16 addr;	/* slave address			*/
  622.48 +- 	__u16 flags;		
  622.49 +-#define I2C_M_TEN	0x10	/* we have a ten bit chip address	*/
  622.50 +-#define I2C_M_RD	0x01
  622.51 +-#define I2C_M_NOSTART	0x4000
  622.52 +-#define I2C_M_REV_DIR_ADDR	0x2000
  622.53 +-#define I2C_M_IGNORE_NAK	0x1000
  622.54 +-#define I2C_M_NO_RD_ACK		0x0800
  622.55 +- 	__u16 len;		/* msg length				*/
  622.56 +- 	__u8 *buf;		/* pointer to msg data			*/
  622.57 +-};
  622.58 +-
  622.59 + /* To determine what functionality is present */
  622.60 + 
  622.61 + #define I2C_FUNC_I2C			0x00000001
   623.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   623.2 +++ b/patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-ppc-mikpe.patch	Sat Feb 24 11:00:05 2007 +0000
   623.3 @@ -0,0 +1,86 @@
   623.4 +
   623.5 +Fixes
   623.6 +
   623.7 +In file included from arch/ppc/kernel/time.c:68:
   623.8 +arch/ppc/kernel/time.c:92: error: static declaration of 'time_offset' follows non-static declaration
   623.9 +include/linux/timex.h:236: error: previous declaration of 'time_offset' was here
  623.10 +make[1]: *** [arch/ppc/kernel/time.o] Error 1
  623.11 +
  623.12 +when compiling with gcc-4.0
  623.13 +
  623.14 +Taken from
  623.15 +http://user.it.uu.se/~mikpe/linux/patches/2.6/patch-gcc4-fixes-v2-2.6.11
  623.16 +Also removes some obsolete externs that caused problems for Mike
  623.17 +Mike's patch has a bit more stuff in it, but this was enough for me
  623.18 +
  623.19 +
  623.20 +diff -rupN linux-2.6.11/arch/ppc/kernel/time.c linux-2.6.11.gcc4-fixes-v2/arch/ppc/kernel/time.c
  623.21 +--- linux-2.6.11/arch/ppc/kernel/time.c	2005-03-02 19:24:14.000000000 +0100
  623.22 ++++ linux-2.6.11.gcc4-fixes-v2/arch/ppc/kernel/time.c	2005-03-02 19:36:26.000000000 +0100
  623.23 +@@ -89,7 +89,7 @@ unsigned long tb_to_ns_scale;
  623.24 + 
  623.25 + extern unsigned long wall_jiffies;
  623.26 + 
  623.27 +-static long time_offset;
  623.28 ++static long ppc_time_offset;
  623.29 + 
  623.30 + DEFINE_SPINLOCK(rtc_lock);
  623.31 + 
  623.32 +@@ -172,7 +172,7 @@ void timer_interrupt(struct pt_regs * re
  623.33 + 		     xtime.tv_sec - last_rtc_update >= 659 &&
  623.34 + 		     abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ &&
  623.35 + 		     jiffies - wall_jiffies == 1) {
  623.36 +-		  	if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0)
  623.37 ++		  	if (ppc_md.set_rtc_time(xtime.tv_sec+1 + ppc_time_offset) == 0)
  623.38 + 				last_rtc_update = xtime.tv_sec+1;
  623.39 + 			else
  623.40 + 				/* Try again one minute later */
  623.41 +@@ -289,7 +289,7 @@ void __init time_init(void)
  623.42 + 	unsigned old_stamp, stamp, elapsed;
  623.43 + 
  623.44 +         if (ppc_md.time_init != NULL)
  623.45 +-                time_offset = ppc_md.time_init();
  623.46 ++                ppc_time_offset = ppc_md.time_init();
  623.47 + 
  623.48 + 	if (__USE_RTC()) {
  623.49 + 		/* 601 processor: dec counts down by 128 every 128ns */
  623.50 +@@ -334,10 +334,10 @@ void __init time_init(void)
  623.51 + 	set_dec(tb_ticks_per_jiffy);
  623.52 + 
  623.53 + 	/* If platform provided a timezone (pmac), we correct the time */
  623.54 +-        if (time_offset) {
  623.55 +-		sys_tz.tz_minuteswest = -time_offset / 60;
  623.56 ++        if (ppc_time_offset) {
  623.57 ++		sys_tz.tz_minuteswest = -ppc_time_offset / 60;
  623.58 + 		sys_tz.tz_dsttime = 0;
  623.59 +-		xtime.tv_sec -= time_offset;
  623.60 ++		xtime.tv_sec -= ppc_time_offset;
  623.61 +         }
  623.62 +         set_normalized_timespec(&wall_to_monotonic,
  623.63 +                                 -xtime.tv_sec, -xtime.tv_nsec);
  623.64 +diff -rupN linux-2.6.11/arch/ppc/syslib/open_pic_defs.h linux-2.6.11.gcc4-fixes-v2/arch/ppc/syslib/open_pic_defs.h
  623.65 +--- linux-2.6.11/arch/ppc/syslib/open_pic_defs.h	2005-03-02 19:24:14.000000000 +0100
  623.66 ++++ linux-2.6.11.gcc4-fixes-v2/arch/ppc/syslib/open_pic_defs.h	2005-03-02 19:36:26.000000000 +0100
  623.67 +@@ -172,9 +172,6 @@ struct OpenPIC {
  623.68 +     OpenPIC_Processor Processor[OPENPIC_MAX_PROCESSORS];
  623.69 + };
  623.70 + 
  623.71 +-extern volatile struct OpenPIC __iomem *OpenPIC;
  623.72 +-
  623.73 +-
  623.74 +     /*
  623.75 +      *  Current Task Priority Register
  623.76 +      */
  623.77 +diff -rupN linux-2.6.11/include/asm-ppc/prom.h linux-2.6.11.gcc4-fixes-v2/include/asm-ppc/prom.h
  623.78 +--- linux-2.6.11/include/asm-ppc/prom.h	2003-09-28 12:19:57.000000000 +0200
  623.79 ++++ linux-2.6.11.gcc4-fixes-v2/include/asm-ppc/prom.h	2005-03-02 19:36:26.000000000 +0100
  623.80 +@@ -13,9 +13,6 @@
  623.81 + typedef void *phandle;
  623.82 + typedef void *ihandle;
  623.83 + 
  623.84 +-extern char *prom_display_paths[];
  623.85 +-extern unsigned int prom_num_displays;
  623.86 +-
  623.87 + struct address_range {
  623.88 + 	unsigned int space;
  623.89 + 	unsigned int address;
   624.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   624.2 +++ b/patches/linux/2.6.5/linux-2.6.5-x86_64-unistd.patch	Sat Feb 24 11:00:05 2007 +0000
   624.3 @@ -0,0 +1,80 @@
   624.4 +Retrieved with wget http://www.x86-64.org/lists/discuss/msg04963.html
   624.5 +then tabs fixed up by rediffing
   624.6 +
   624.7 +Message-Id: EFF62C7EE88E71429E38641A1172F4C2077104@net.teracruz.com
   624.8 +To: discuss@xxxxxxxxxx
   624.9 +Subject: Compile error with glibc 2.3.2 + Linux 2.6.5 ARCH=x86_64
  624.10 +From: "David Lee" david.lee@xxxxxxxxxxxx
  624.11 +Date: Wed, 21 Apr 2004 15:26:04 -0500</li>
  624.12 +
  624.13 +I am getting compiler errors when trying to compile glibc 2.3.2 using
  624.14 +the kernel headers from linux 2.6.5.  The headers from linux 2.6.3 work
  624.15 +fine.
  624.16 +
  624.17 +I've traced the cause of the problem to a change made in
  624.18 +./include/asm-x86_64/unistd.h in the 2.6.4 release.
  624.19 +
  624.20 ++#ifndef __ASSEMBLY__
  624.21 ++
  624.22 ++#include <linux/linkage.h>
  624.23 ++#include <linux/compiler.h>
  624.24 ++#include <linux/types.h>
  624.25 ++#include <asm/ptrace.h>
  624.26 ++
  624.27 ++asmlinkage long sys_ptrace(long request, long pid,
  624.28 ++                                unsigned long addr, long data);
  624.29 ++asmlinkage long sys_iopl(unsigned int level, struct pt_regs regs);
  624.30 ++asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int
  624.31 +turn_on);
  624.32 ++struct sigaction;
  624.33 ++asmlinkage long sys_rt_sigaction(int sig,
  624.34 ++                                const struct sigaction __user *act,
  624.35 ++                                struct sigaction __user *oact,
  624.36 ++                                size_t sigsetsize);
  624.37 ++
  624.38 ++#endif  /* __ASSEMBLY__ */
  624.39 +
  624.40 +Within glibc, ./sysdeps/unix/sysv/linux/x86_64/syscall.S ends up
  624.41 +including this file, which chokes the assembler with the struct
  624.42 +declarations in the above #include's.
  624.43 +
  624.44 +/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
  624.45 +_64-linux/glibcinclude/linux/posix_types.h: Assembler messages:
  624.46 +/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
  624.47 +_64-linux/glibcinclude/linux/posix_types.h:36: Error: no such
  624.48 +instruction: `typedef struct{'
  624.49 +
  624.50 +There are also errors about conflicting re-declarations further along in
  624.51 +the glibc build.
  624.52 +
  624.53 +../posix/sys/types.h:62: error: conflicting types for `dev_t'
  624.54 +/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
  624.55 +_64-linux/glibcinclude/linux/types.h:23: error: previous declaration of
  624.56 +`dev_t'
  624.57 +
  624.58 +Changing the '#ifndef __ASSEMBLY__' to '#if ((!defined __ASSEMBLY__) &&
  624.59 +(defined __KERNEL__))' clears up the problem.  My patch is below.
  624.60 +
  624.61 +dave
  624.62 +
  624.63 +
  624.64 +--- linux-2.6.5/include/asm-x86_64/unistd.h.old	2004-04-03 19:37:36.000000000 -0800
  624.65 ++++ linux-2.6.5/include/asm-x86_64/unistd.h	2004-05-05 11:07:11.000000000 -0700
  624.66 +@@ -713,7 +713,7 @@
  624.67 + 
  624.68 + #endif /* __KERNEL_SYSCALLS__ */
  624.69 + 
  624.70 +-#ifndef __ASSEMBLY__
  624.71 ++#if ((!defined __ASSEMBLY__) && (defined __KERNEL__))
  624.72 + 
  624.73 + #include <linux/linkage.h>
  624.74 + #include <linux/compiler.h>
  624.75 +@@ -730,7 +730,7 @@
  624.76 + 				struct sigaction __user *oact,
  624.77 + 				size_t sigsetsize);
  624.78 + 
  624.79 +-#endif	/* __ASSEMBLY__ */
  624.80 ++#endif /* ((!defined __ASSEMBLY__) && (defined __KERNEL__) */
  624.81 + 
  624.82 + #endif /* __NO_STUBS */
  624.83 + 
   625.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   625.2 +++ b/patches/linux/2.6.6/kaz-types.patch	Sat Feb 24 11:00:05 2007 +0000
   625.3 @@ -0,0 +1,60 @@
   625.4 +The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
   625.5 +
   625.6 +In file included from sys/ustat.h:30,
   625.7 +                 from ../sysdeps/unix/sysv/linux/ustat.c:21:
   625.8 +../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
   625.9 +make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
  625.10 +make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
  625.11 +make[1]: *** [misc/subdir_lib] Error 2
  625.12 +make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
  625.13 +make: *** [all] Error 2
  625.14 +
  625.15 +----------- snip ---------------
  625.16 +
  625.17 +Date: Fri, 06 Jun 2003 08:00:00 +0900
  625.18 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
  625.19 +Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
  625.20 + error: redefinition of `struct user_fpu_struct'"
  625.21 +To: linux-sh@m17n.org
  625.22 +Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
  625.23 +
  625.24 +Hi,
  625.25 +
  625.26 +Dan Kegel <dank@kegel.com> wrote:
  625.27 +> When I try to build glibc-2.3.2 for sh4, it fails with the error
  625.28 +[snip]
  625.29 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
  625.30 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
  625.31 +[snip]
  625.32 +> The error reminds me of the kind of thing fixed by
  625.33 +> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
  625.34 +
  625.35 +It seems that the definitions in asm/user.h and the above patch collide.
  625.36 +I'm not sure why you need this patch, but is it needed for the problem
  625.37 +about struct ustat that you pointed out in this list, isn't it?
  625.38 +I found why I don't hit ustat problem - my local kernel tree includes
  625.39 +the following patch, though I can't recall about it.
  625.40 +
  625.41 +Regards,
  625.42 +	kaz
  625.43 +--
  625.44 +diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
  625.45 +--- linux-2.5.69-sf-orig/include/linux/types.h	Wed Mar  5 12:29:34 2003
  625.46 ++++ sh4-unknown-linux-gnu/include/linux/types.h	Sat Apr 19 10:05:52 2003
  625.47 +@@ -141,6 +141,7 @@
  625.48 + 
  625.49 + #endif /* __KERNEL_STRICT_NAMES */
  625.50 + 
  625.51 ++#ifdef	__KERNEL__
  625.52 + /*
  625.53 +  * Below are truly Linux-specific types that should never collide with
  625.54 +  * any application/library that wants linux/types.h.
  625.55 +@@ -152,5 +153,6 @@
  625.56 + 	char			f_fname[6];
  625.57 + 	char			f_fpack[6];
  625.58 + };
  625.59 ++#endif
  625.60 + 
  625.61 + #endif /* _LINUX_TYPES_H */
  625.62 +
  625.63 +
   626.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   626.2 +++ b/patches/linux/2.6.6/linux-2.6.5-x86_64-unistd.patch	Sat Feb 24 11:00:05 2007 +0000
   626.3 @@ -0,0 +1,80 @@
   626.4 +Retrieved with wget http://www.x86-64.org/lists/discuss/msg04963.html
   626.5 +then tabs fixed up by rediffing
   626.6 +
   626.7 +Message-Id: EFF62C7EE88E71429E38641A1172F4C2077104@net.teracruz.com
   626.8 +To: discuss@xxxxxxxxxx
   626.9 +Subject: Compile error with glibc 2.3.2 + Linux 2.6.5 ARCH=x86_64
  626.10 +From: "David Lee" david.lee@xxxxxxxxxxxx
  626.11 +Date: Wed, 21 Apr 2004 15:26:04 -0500</li>
  626.12 +
  626.13 +I am getting compiler errors when trying to compile glibc 2.3.2 using
  626.14 +the kernel headers from linux 2.6.5.  The headers from linux 2.6.3 work
  626.15 +fine.
  626.16 +
  626.17 +I've traced the cause of the problem to a change made in
  626.18 +./include/asm-x86_64/unistd.h in the 2.6.4 release.
  626.19 +
  626.20 ++#ifndef __ASSEMBLY__
  626.21 ++
  626.22 ++#include <linux/linkage.h>
  626.23 ++#include <linux/compiler.h>
  626.24 ++#include <linux/types.h>
  626.25 ++#include <asm/ptrace.h>
  626.26 ++
  626.27 ++asmlinkage long sys_ptrace(long request, long pid,
  626.28 ++                                unsigned long addr, long data);
  626.29 ++asmlinkage long sys_iopl(unsigned int level, struct pt_regs regs);
  626.30 ++asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int
  626.31 +turn_on);
  626.32 ++struct sigaction;
  626.33 ++asmlinkage long sys_rt_sigaction(int sig,
  626.34 ++                                const struct sigaction __user *act,
  626.35 ++                                struct sigaction __user *oact,
  626.36 ++                                size_t sigsetsize);
  626.37 ++
  626.38 ++#endif  /* __ASSEMBLY__ */
  626.39 +
  626.40 +Within glibc, ./sysdeps/unix/sysv/linux/x86_64/syscall.S ends up
  626.41 +including this file, which chokes the assembler with the struct
  626.42 +declarations in the above #include's.
  626.43 +
  626.44 +/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
  626.45 +_64-linux/glibcinclude/linux/posix_types.h: Assembler messages:
  626.46 +/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
  626.47 +_64-linux/glibcinclude/linux/posix_types.h:36: Error: no such
  626.48 +instruction: `typedef struct{'
  626.49 +
  626.50 +There are also errors about conflicting re-declarations further along in
  626.51 +the glibc build.
  626.52 +
  626.53 +../posix/sys/types.h:62: error: conflicting types for `dev_t'
  626.54 +/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
  626.55 +_64-linux/glibcinclude/linux/types.h:23: error: previous declaration of
  626.56 +`dev_t'
  626.57 +
  626.58 +Changing the '#ifndef __ASSEMBLY__' to '#if ((!defined __ASSEMBLY__) &&
  626.59 +(defined __KERNEL__))' clears up the problem.  My patch is below.
  626.60 +
  626.61 +dave
  626.62 +
  626.63 +
  626.64 +--- linux-2.6.5/include/asm-x86_64/unistd.h.old	2004-04-03 19:37:36.000000000 -0800
  626.65 ++++ linux-2.6.5/include/asm-x86_64/unistd.h	2004-05-05 11:07:11.000000000 -0700
  626.66 +@@ -713,7 +713,7 @@
  626.67 + 
  626.68 + #endif /* __KERNEL_SYSCALLS__ */
  626.69 + 
  626.70 +-#ifndef __ASSEMBLY__
  626.71 ++#if ((!defined __ASSEMBLY__) && (defined __KERNEL__))
  626.72 + 
  626.73 + #include <linux/linkage.h>
  626.74 + #include <linux/compiler.h>
  626.75 +@@ -730,7 +730,7 @@
  626.76 + 				struct sigaction __user *oact,
  626.77 + 				size_t sigsetsize);
  626.78 + 
  626.79 +-#endif	/* __ASSEMBLY__ */
  626.80 ++#endif /* ((!defined __ASSEMBLY__) && (defined __KERNEL__) */
  626.81 + 
  626.82 + #endif /* __NO_STUBS */
  626.83 + 
   627.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   627.2 +++ b/patches/linux/2.6.6/linux-2.6.8-noshared-kconfig.patch	Sat Feb 24 11:00:05 2007 +0000
   627.3 @@ -0,0 +1,28 @@
   627.4 +Lets you run 'make oldconfig' and 'make menuconfig' on systems
   627.5 +where shared libraries aren't easy.  (There's no harm in using the
   627.6 +static version of libkconfig.)
   627.7 +Idea mentioned by Bertrand Marquis, but this patch is a bit simpler than his.
   627.8 +
   627.9 +
  627.10 +--- linux-2.6.8.1/scripts/kconfig/Makefile.old	2004-09-09 20:30:25.000000000 -0700
  627.11 ++++ linux-2.6.8.1/scripts/kconfig/Makefile	2004-09-09 20:47:51.000000000 -0700
  627.12 +@@ -68,8 +68,8 @@
  627.13 + libkconfig-objs := zconf.tab.o
  627.14 + 
  627.15 + host-progs	:= conf mconf qconf gconf
  627.16 +-conf-objs	:= conf.o  libkconfig.so
  627.17 +-mconf-objs	:= mconf.o libkconfig.so
  627.18 ++conf-objs	:= conf.o  $(libkconfig-objs)
  627.19 ++mconf-objs	:= mconf.o $(libkconfig-objs)
  627.20 + 
  627.21 + ifeq ($(MAKECMDGOALS),xconfig)
  627.22 + 	qconf-target := 1
  627.23 +@@ -88,7 +88,7 @@
  627.24 + gconf-objs	:= gconf.o kconfig_load.o
  627.25 + endif
  627.26 + 
  627.27 +-clean-files	:= libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
  627.28 ++clean-files	:= $(libkconfig-objs) lkc_defs.h qconf.moc .tmp_qtcheck \
  627.29 + 		   .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c
  627.30 + 
  627.31 + # generated files seem to need this to find local include files
   628.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   628.2 +++ b/patches/linux/2.6.7/kaz-types.patch	Sat Feb 24 11:00:05 2007 +0000
   628.3 @@ -0,0 +1,60 @@
   628.4 +The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
   628.5 +
   628.6 +In file included from sys/ustat.h:30,
   628.7 +                 from ../sysdeps/unix/sysv/linux/ustat.c:21:
   628.8 +../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
   628.9 +make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
  628.10 +make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
  628.11 +make[1]: *** [misc/subdir_lib] Error 2
  628.12 +make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
  628.13 +make: *** [all] Error 2
  628.14 +
  628.15 +----------- snip ---------------
  628.16 +
  628.17 +Date: Fri, 06 Jun 2003 08:00:00 +0900
  628.18 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
  628.19 +Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
  628.20 + error: redefinition of `struct user_fpu_struct'"
  628.21 +To: linux-sh@m17n.org
  628.22 +Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
  628.23 +
  628.24 +Hi,
  628.25 +
  628.26 +Dan Kegel <dank@kegel.com> wrote:
  628.27 +> When I try to build glibc-2.3.2 for sh4, it fails with the error
  628.28 +[snip]
  628.29 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
  628.30 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
  628.31 +[snip]
  628.32 +> The error reminds me of the kind of thing fixed by
  628.33 +> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
  628.34 +
  628.35 +It seems that the definitions in asm/user.h and the above patch collide.
  628.36 +I'm not sure why you need this patch, but is it needed for the problem
  628.37 +about struct ustat that you pointed out in this list, isn't it?
  628.38 +I found why I don't hit ustat problem - my local kernel tree includes
  628.39 +the following patch, though I can't recall about it.
  628.40 +
  628.41 +Regards,
  628.42 +	kaz
  628.43 +--
  628.44 +diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
  628.45 +--- linux-2.5.69-sf-orig/include/linux/types.h	Wed Mar  5 12:29:34 2003
  628.46 ++++ sh4-unknown-linux-gnu/include/linux/types.h	Sat Apr 19 10:05:52 2003
  628.47 +@@ -141,6 +141,7 @@
  628.48 + 
  628.49 + #endif /* __KERNEL_STRICT_NAMES */
  628.50 + 
  628.51 ++#ifdef	__KERNEL__
  628.52 + /*
  628.53 +  * Below are truly Linux-specific types that should never collide with
  628.54 +  * any application/library that wants linux/types.h.
  628.55 +@@ -152,5 +153,6 @@
  628.56 + 	char			f_fname[6];
  628.57 + 	char			f_fpack[6];
  628.58 + };
  628.59 ++#endif
  628.60 + 
  628.61 + #endif /* _LINUX_TYPES_H */
  628.62 +
  628.63 +
   629.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   629.2 +++ b/patches/linux/2.6.7/linux-2.6.7-build_on_case_insensitive_fs-1.patch	Sat Feb 24 11:00:05 2007 +0000
   629.3 @@ -0,0 +1,679 @@
   629.4 +Submitted By: Martin Schaffner <schaffner@gmx.li>
   629.5 +Date: 2004-06-19
   629.6 +Initial Package Version: 2.6.7
   629.7 +Upstream Status: Not submitted
   629.8 +Origin: Martin Schaffner
   629.9 +Description: Enables build on case-insensitive file systems
  629.10 +URL: http://mirror.vtx.ch/lfs/patches/downloads/linux/linux-2.6.7-build_on_case_insensitive_fs-1.patch
  629.11 +
  629.12 +diff -ur linux-2.6.7/Makefile linux-2.6.7-mod/Makefile
  629.13 +--- linux-2.6.7/Makefile	Fri Jun 18 22:51:03 2004
  629.14 ++++ linux-2.6.7-mod/Makefile	Sat Jun 19 12:43:10 2004
  629.15 +@@ -549,7 +549,7 @@
  629.16 + 	$(NM) $@ | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
  629.17 + endef
  629.18 + 
  629.19 +-LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.s
  629.20 ++LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.asm
  629.21 + 
  629.22 + #	Generate section listing all symbols and add it into vmlinux
  629.23 + #	It's a three stage process:
  629.24 +@@ -575,23 +575,23 @@
  629.25 + .tmp_kallsyms%.S: .tmp_vmlinux%
  629.26 + 	$(call cmd,kallsyms)
  629.27 + 
  629.28 +-.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
  629.29 ++.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
  629.30 + 	+$(call if_changed_rule,vmlinux__)
  629.31 + 
  629.32 +-.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
  629.33 ++.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
  629.34 + 	$(call if_changed_rule,vmlinux__)
  629.35 + 
  629.36 + endif
  629.37 + 
  629.38 + #	Finally the vmlinux rule
  629.39 + 
  629.40 +-vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
  629.41 ++vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
  629.42 + 	$(call if_changed_rule,vmlinux)
  629.43 + 
  629.44 + #	The actual objects are generated when descending, 
  629.45 + #	make sure no implicit rule kicks in
  629.46 + 
  629.47 +-$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ;
  629.48 ++$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.asm: $(vmlinux-dirs) ;
  629.49 + 
  629.50 + # 	Handle descending into subdirectories listed in $(vmlinux-dirs)
  629.51 + 
  629.52 +@@ -640,7 +640,7 @@
  629.53 + # Single targets
  629.54 + # ---------------------------------------------------------------------------
  629.55 + 
  629.56 +-%.s: %.c scripts FORCE
  629.57 ++%.asm: %.c scripts FORCE
  629.58 + 	$(Q)$(MAKE) $(build)=$(@D) $@
  629.59 + %.i: %.c scripts FORCE
  629.60 + 	$(Q)$(MAKE) $(build)=$(@D) $@
  629.61 +@@ -650,7 +650,7 @@
  629.62 + 	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) $(build)=$(@D)
  629.63 + %.lst: %.c scripts FORCE
  629.64 + 	$(Q)$(MAKE) $(build)=$(@D) $@
  629.65 +-%.s: %.S scripts FORCE
  629.66 ++%.asm: %.S scripts FORCE
  629.67 + 	$(Q)$(MAKE) $(build)=$(@D) $@
  629.68 + %.o: %.S scripts FORCE
  629.69 + 	$(Q)$(MAKE) $(build)=$(@D) $@
  629.70 +diff -ur linux-2.6.7/arch/alpha/Makefile linux-2.6.7-mod/arch/alpha/Makefile
  629.71 +--- linux-2.6.7/arch/alpha/Makefile	Fri Jun 18 22:51:03 2004
  629.72 ++++ linux-2.6.7-mod/arch/alpha/Makefile	Sat Jun 19 12:46:32 2004
  629.73 +@@ -114,10 +114,10 @@
  629.74 + 
  629.75 + prepare: include/asm-$(ARCH)/asm_offsets.h
  629.76 + 
  629.77 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
  629.78 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
  629.79 + 				   include/config/MARKER
  629.80 + 
  629.81 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
  629.82 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
  629.83 + 	$(call filechk,gen-asm-offsets)
  629.84 + 
  629.85 + archclean:
  629.86 +diff -ur linux-2.6.7/arch/alpha/kernel/Makefile linux-2.6.7-mod/arch/alpha/kernel/Makefile
  629.87 +--- linux-2.6.7/arch/alpha/kernel/Makefile	Mon May 10 04:32:29 2004
  629.88 ++++ linux-2.6.7-mod/arch/alpha/kernel/Makefile	Sat Jun 19 12:46:48 2004
  629.89 +@@ -2,7 +2,7 @@
  629.90 + # Makefile for the linux kernel.
  629.91 + #
  629.92 + 
  629.93 +-extra-y		:= head.o vmlinux.lds.s
  629.94 ++extra-y		:= head.o vmlinux.lds.asm
  629.95 + EXTRA_AFLAGS	:= $(CFLAGS)
  629.96 + EXTRA_CFLAGS	:= -Werror -Wno-sign-compare
  629.97 + 
  629.98 +diff -ur linux-2.6.7/arch/arm/Makefile linux-2.6.7-mod/arch/arm/Makefile
  629.99 +--- linux-2.6.7/arch/arm/Makefile	Fri Jun 18 22:51:04 2004
 629.100 ++++ linux-2.6.7-mod/arch/arm/Makefile	Sat Jun 19 12:47:07 2004
 629.101 +@@ -175,10 +175,10 @@
 629.102 + i:;	$(Q)$(MAKE) $(build)=$(boot) install
 629.103 + zi:;	$(Q)$(MAKE) $(build)=$(boot) zinstall
 629.104 + 
 629.105 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 629.106 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 629.107 + 				   include/asm-arm/.arch
 629.108 + 
 629.109 +-include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.s
 629.110 ++include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.asm
 629.111 + 	$(call filechk,gen-asm-offsets)
 629.112 + 
 629.113 + define archhelp
 629.114 +diff -ur linux-2.6.7/arch/arm/kernel/Makefile linux-2.6.7-mod/arch/arm/kernel/Makefile
 629.115 +--- linux-2.6.7/arch/arm/kernel/Makefile	Mon May 10 04:33:19 2004
 629.116 ++++ linux-2.6.7-mod/arch/arm/kernel/Makefile	Sat Jun 19 12:47:25 2004
 629.117 +@@ -27,7 +27,7 @@
 629.118 + head-y			:= head.o
 629.119 + obj-$(CONFIG_DEBUG_LL)	+= debug.o
 629.120 + 
 629.121 +-extra-y := $(head-y) init_task.o vmlinux.lds.s
 629.122 ++extra-y := $(head-y) init_task.o vmlinux.lds.asm
 629.123 + 
 629.124 + # Spell out some dependencies that aren't automatically figured out
 629.125 + $(obj)/entry-armv.o: 	$(obj)/entry-header.S include/asm-arm/constants.h
 629.126 +diff -ur linux-2.6.7/arch/arm26/Makefile linux-2.6.7-mod/arch/arm26/Makefile
 629.127 +--- linux-2.6.7/arch/arm26/Makefile	Mon May 10 04:32:28 2004
 629.128 ++++ linux-2.6.7-mod/arch/arm26/Makefile	Sat Jun 19 12:48:24 2004
 629.129 +@@ -101,10 +101,10 @@
 629.130 + 	fi; \
 629.131 + 	)
 629.132 + 
 629.133 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 629.134 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 629.135 + 				   include/config/MARKER
 629.136 + 
 629.137 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 629.138 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
 629.139 + 	$(call filechk,gen-asm-offsets)
 629.140 + 
 629.141 + define archhelp
 629.142 +diff -ur linux-2.6.7/arch/arm26/kernel/Makefile linux-2.6.7-mod/arch/arm26/kernel/Makefile
 629.143 +--- linux-2.6.7/arch/arm26/kernel/Makefile	Mon May 10 04:32:29 2004
 629.144 ++++ linux-2.6.7-mod/arch/arm26/kernel/Makefile	Sat Jun 19 12:48:30 2004
 629.145 +@@ -14,5 +14,5 @@
 629.146 + obj-$(CONFIG_FIQ)		+= fiq.o
 629.147 + obj-$(CONFIG_MODULES)		+= armksyms.o
 629.148 + 
 629.149 +-extra-y := init_task.o vmlinux.lds.s
 629.150 ++extra-y := init_task.o vmlinux.lds.asm
 629.151 + 
 629.152 +diff -ur linux-2.6.7/arch/cris/Makefile linux-2.6.7-mod/arch/cris/Makefile
 629.153 +--- linux-2.6.7/arch/cris/Makefile	Fri Jun 18 22:51:07 2004
 629.154 ++++ linux-2.6.7-mod/arch/cris/Makefile	Sat Jun 19 12:48:47 2004
 629.155 +@@ -107,8 +107,8 @@
 629.156 + 	@ln -sf $(SARCH) include/asm-$(ARCH)/arch
 629.157 + 	@touch $@
 629.158 + 
 629.159 +-arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 629.160 ++arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 629.161 + 					include/config/MARKER
 629.162 + 
 629.163 +-include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s
 629.164 ++include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.asm
 629.165 + 	$(call filechk,gen-asm-offsets)
 629.166 +diff -ur linux-2.6.7/arch/cris/kernel/Makefile linux-2.6.7-mod/arch/cris/kernel/Makefile
 629.167 +--- linux-2.6.7/arch/cris/kernel/Makefile	Fri Jun 18 22:51:09 2004
 629.168 ++++ linux-2.6.7-mod/arch/cris/kernel/Makefile	Sat Jun 19 12:48:53 2004
 629.169 +@@ -3,7 +3,7 @@
 629.170 + # Makefile for the linux kernel.
 629.171 + #
 629.172 + 
 629.173 +-extra-y	:= vmlinux.lds.s
 629.174 ++extra-y	:= vmlinux.lds.asm
 629.175 + 
 629.176 + obj-y   := process.o traps.o irq.o ptrace.o setup.o \
 629.177 + 	   time.o sys_cris.o semaphore.o
 629.178 +diff -ur linux-2.6.7/arch/h8300/Makefile linux-2.6.7-mod/arch/h8300/Makefile
 629.179 +--- linux-2.6.7/arch/h8300/Makefile	Fri Jun 18 22:51:09 2004
 629.180 ++++ linux-2.6.7-mod/arch/h8300/Makefile	Sat Jun 19 12:49:12 2004
 629.181 +@@ -64,7 +64,7 @@
 629.182 + 
 629.183 + prepare: include/asm-$(ARCH)/asm-offsets.h
 629.184 + 
 629.185 +-include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
 629.186 ++include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm \
 629.187 + 				   include/asm include/linux/version.h
 629.188 + 	$(call filechk,gen-asm-offsets)
 629.189 + 
 629.190 +diff -ur linux-2.6.7/arch/h8300/kernel/Makefile linux-2.6.7-mod/arch/h8300/kernel/Makefile
 629.191 +--- linux-2.6.7/arch/h8300/kernel/Makefile	Fri Jun 18 22:51:09 2004
 629.192 ++++ linux-2.6.7-mod/arch/h8300/kernel/Makefile	Sat Jun 19 12:49:32 2004
 629.193 +@@ -2,7 +2,7 @@
 629.194 + # Makefile for the linux kernel.
 629.195 + #
 629.196 + 
 629.197 +-extra-y := vmlinux.lds.s
 629.198 ++extra-y := vmlinux.lds.asm
 629.199 + 
 629.200 + obj-y := process.o traps.o ptrace.o ints.o \
 629.201 + 	 sys_h8300.o time.o semaphore.o signal.o \
 629.202 +diff -ur linux-2.6.7/arch/i386/Makefile linux-2.6.7-mod/arch/i386/Makefile
 629.203 +--- linux-2.6.7/arch/i386/Makefile	Fri Jun 18 22:51:10 2004
 629.204 ++++ linux-2.6.7-mod/arch/i386/Makefile	Sat Jun 19 12:49:43 2004
 629.205 +@@ -141,10 +141,10 @@
 629.206 + prepare: include/asm-$(ARCH)/asm_offsets.h
 629.207 + CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
 629.208 + 
 629.209 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 629.210 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 629.211 + 				   include/config/MARKER
 629.212 + 
 629.213 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 629.214 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
 629.215 + 	$(call filechk,gen-asm-offsets)
 629.216 + 
 629.217 + archclean:
 629.218 +diff -ur linux-2.6.7/arch/i386/kernel/Makefile linux-2.6.7-mod/arch/i386/kernel/Makefile
 629.219 +--- linux-2.6.7/arch/i386/kernel/Makefile	Mon May 10 04:32:02 2004
 629.220 ++++ linux-2.6.7-mod/arch/i386/kernel/Makefile	Sat Jun 19 12:49:54 2004
 629.221 +@@ -2,7 +2,7 @@
 629.222 + # Makefile for the linux kernel.
 629.223 + #
 629.224 + 
 629.225 +-extra-y := head.o init_task.o vmlinux.lds.s
 629.226 ++extra-y := head.o init_task.o vmlinux.lds.asm
 629.227 + 
 629.228 + obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
 629.229 + 		ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \
 629.230 +diff -ur linux-2.6.7/arch/ia64/Makefile linux-2.6.7-mod/arch/ia64/Makefile
 629.231 +--- linux-2.6.7/arch/ia64/Makefile	Mon May 10 04:31:59 2004
 629.232 ++++ linux-2.6.7-mod/arch/ia64/Makefile	Sat Jun 19 12:50:12 2004
 629.233 +@@ -88,12 +88,12 @@
 629.234 + 
 629.235 + prepare: include/asm-ia64/offsets.h
 629.236 + 
 629.237 +-arch/ia64/kernel/asm-offsets.s: include/asm include/linux/version.h include/config/MARKER
 629.238 ++arch/ia64/kernel/asm-offsets.asm: include/asm include/linux/version.h include/config/MARKER
 629.239 + 
 629.240 +-include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.s
 629.241 ++include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.asm
 629.242 + 	$(call filechk,gen-asm-offsets)
 629.243 + 
 629.244 +-arch/ia64/kernel/asm-offsets.s: include/asm-ia64/.offsets.h.stamp
 629.245 ++arch/ia64/kernel/asm-offsets.asm: include/asm-ia64/.offsets.h.stamp
 629.246 + 
 629.247 + include/asm-ia64/.offsets.h.stamp:
 629.248 + 	mkdir -p include/asm-ia64
 629.249 +diff -ur linux-2.6.7/arch/ia64/kernel/Makefile linux-2.6.7-mod/arch/ia64/kernel/Makefile
 629.250 +--- linux-2.6.7/arch/ia64/kernel/Makefile	Fri Jun 18 22:51:13 2004
 629.251 ++++ linux-2.6.7-mod/arch/ia64/kernel/Makefile	Sat Jun 19 12:52:14 2004
 629.252 +@@ -2,7 +2,7 @@
 629.253 + # Makefile for the linux kernel.
 629.254 + #
 629.255 + 
 629.256 +-extra-y	:= head.o init_task.o vmlinux.lds.s
 629.257 ++extra-y	:= head.o init_task.o vmlinux.lds.asm
 629.258 + 
 629.259 + obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o	\
 629.260 + 	 irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o		\
 629.261 +@@ -21,7 +21,7 @@
 629.262 + # The gate DSO image is built using a special linker script.
 629.263 + targets += gate.so gate-syms.o
 629.264 + 
 629.265 +-extra-y += gate.so gate-syms.o gate.lds.s gate.o
 629.266 ++extra-y += gate.so gate-syms.o gate.lds.asm gate.o
 629.267 + 
 629.268 + # fp_emulate() expects f2-f5,f16-f31 to contain the user-level state.
 629.269 + CFLAGS_traps.o  += -mfixed-range=f2-f5,f16-f31
 629.270 +@@ -32,14 +32,14 @@
 629.271 +       cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
 629.272 + 
 629.273 + GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1
 629.274 +-$(obj)/gate.so: $(obj)/gate.lds.s $(obj)/gate.o FORCE
 629.275 ++$(obj)/gate.so: $(obj)/gate.lds.asm $(obj)/gate.o FORCE
 629.276 + 	$(call if_changed,gate)
 629.277 + 
 629.278 + $(obj)/built-in.o: $(obj)/gate-syms.o
 629.279 + $(obj)/built-in.o: ld_flags += -R $(obj)/gate-syms.o
 629.280 + 
 629.281 + GATECFLAGS_gate-syms.o = -r
 629.282 +-$(obj)/gate-syms.o: $(src)/gate.lds.s $(obj)/gate.o FORCE
 629.283 ++$(obj)/gate-syms.o: $(src)/gate.lds.asm $(obj)/gate.o FORCE
 629.284 + 	$(call if_changed,gate)
 629.285 + 
 629.286 + # gate-data.o contains the gate DSO image as data in section .data.gate.
 629.287 +diff -ur linux-2.6.7/arch/m68k/Makefile linux-2.6.7-mod/arch/m68k/Makefile
 629.288 +--- linux-2.6.7/arch/m68k/Makefile	Fri Jun 18 22:51:14 2004
 629.289 ++++ linux-2.6.7-mod/arch/m68k/Makefile	Sat Jun 19 12:52:30 2004
 629.290 +@@ -114,10 +114,10 @@
 629.291 + prepare: include/asm-$(ARCH)/offsets.h
 629.292 + CLEAN_FILES += include/asm-$(ARCH)/offsets.h
 629.293 + 
 629.294 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 629.295 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 629.296 + 				   include/config/MARKER
 629.297 + 
 629.298 +-include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 629.299 ++include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
 629.300 + 	$(call filechk,gen-asm-offsets)
 629.301 + 
 629.302 + archclean:
 629.303 +diff -ur linux-2.6.7/arch/m68k/kernel/Makefile linux-2.6.7-mod/arch/m68k/kernel/Makefile
 629.304 +--- linux-2.6.7/arch/m68k/kernel/Makefile	Mon May 10 04:33:10 2004
 629.305 ++++ linux-2.6.7-mod/arch/m68k/kernel/Makefile	Sat Jun 19 12:52:35 2004
 629.306 +@@ -7,7 +7,7 @@
 629.307 + else
 629.308 +   extra-y := sun3-head.o
 629.309 + endif
 629.310 +-extra-y	+= vmlinux.lds.s
 629.311 ++extra-y	+= vmlinux.lds.asm
 629.312 + 
 629.313 + obj-y		:= entry.o process.o traps.o ints.o signal.o ptrace.o \
 629.314 + 			sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o
 629.315 +diff -ur linux-2.6.7/arch/m68knommu/Makefile linux-2.6.7-mod/arch/m68knommu/Makefile
 629.316 +--- linux-2.6.7/arch/m68knommu/Makefile	Mon May 10 04:32:54 2004
 629.317 ++++ linux-2.6.7-mod/arch/m68knommu/Makefile	Sat Jun 19 12:52:57 2004
 629.318 +@@ -89,7 +89,7 @@
 629.319 + head-y := arch/m68knommu/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o
 629.320 + 
 629.321 + CLEAN_FILES := include/asm-$(ARCH)/asm-offsets.h \
 629.322 +-	       arch/$(ARCH)/kernel/asm-offsets.s
 629.323 ++	       arch/$(ARCH)/kernel/asm-offsets.asm
 629.324 + 
 629.325 + core-y	+= arch/m68knommu/kernel/ \
 629.326 + 	   arch/m68knommu/mm/ \
 629.327 +@@ -102,7 +102,7 @@
 629.328 + archclean:
 629.329 + 	$(call descend arch/$(ARCH)/boot, subdirclean)
 629.330 + 
 629.331 +-include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
 629.332 ++include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm \
 629.333 + 				   include/asm include/linux/version.h \
 629.334 + 				   include/config/MARKER
 629.335 + 	$(call filechk,gen-asm-offsets)
 629.336 +diff -ur linux-2.6.7/arch/m68knommu/kernel/Makefile linux-2.6.7-mod/arch/m68knommu/kernel/Makefile
 629.337 +--- linux-2.6.7/arch/m68knommu/kernel/Makefile	Mon May 10 04:32:26 2004
 629.338 ++++ linux-2.6.7-mod/arch/m68knommu/kernel/Makefile	Sat Jun 19 12:53:20 2004
 629.339 +@@ -2,7 +2,7 @@
 629.340 + # Makefile for arch/m68knommu/kernel.
 629.341 + #
 629.342 + 
 629.343 +-extra-y := vmlinux.lds.s
 629.344 ++extra-y := vmlinux.lds.asm
 629.345 + 
 629.346 + obj-y += dma.o entry.o init_task.o m68k_ksyms.o process.o ptrace.o semaphore.o \
 629.347 + 	 setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
 629.348 +diff -ur linux-2.6.7/arch/mips/Makefile linux-2.6.7-mod/arch/mips/Makefile
 629.349 +--- linux-2.6.7/arch/mips/Makefile	Fri Jun 18 22:51:19 2004
 629.350 ++++ linux-2.6.7-mod/arch/mips/Makefile	Sat Jun 19 12:53:35 2004
 629.351 +@@ -752,12 +752,12 @@
 629.352 + prepare: include/asm-$(ARCH)/offset.h \
 629.353 + 	 include/asm-$(ARCH)/reg.h
 629.354 + 
 629.355 +-arch/$(ARCH)/kernel/offset.s: include/asm include/linux/version.h \
 629.356 ++arch/$(ARCH)/kernel/offset.asm: include/asm include/linux/version.h \
 629.357 + 				   include/config/MARKER
 629.358 + 
 629.359 +-include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.s
 629.360 ++include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.asm
 629.361 + 	$(call filechk,gen-asm-offset.h)
 629.362 +-include/asm-$(ARCH)/reg.h: arch/$(ARCH)/kernel/reg.s
 629.363 ++include/asm-$(ARCH)/reg.h: arch/$(ARCH)/kernel/reg.asm
 629.364 + 	$(call filechk,gen-asm-reg.h)
 629.365 + 
 629.366 + CLEAN_FILES += include/asm-$(ARCH)/offset.h.tmp \
 629.367 +diff -ur linux-2.6.7/arch/mips/kernel/Makefile linux-2.6.7-mod/arch/mips/kernel/Makefile
 629.368 +--- linux-2.6.7/arch/mips/kernel/Makefile	Mon May 10 04:32:28 2004
 629.369 ++++ linux-2.6.7-mod/arch/mips/kernel/Makefile	Sat Jun 19 12:53:41 2004
 629.370 +@@ -2,7 +2,7 @@
 629.371 + # Makefile for the Linux/MIPS kernel.
 629.372 + #
 629.373 + 
 629.374 +-extra-y		:= head.o init_task.o vmlinux.lds.s
 629.375 ++extra-y		:= head.o init_task.o vmlinux.lds.asm
 629.376 + 
 629.377 + obj-y		+= cpu-probe.o branch.o entry.o genex.o irq.o process.o \
 629.378 + 		   ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \
 629.379 +diff -ur linux-2.6.7/arch/parisc/Makefile linux-2.6.7-mod/arch/parisc/Makefile
 629.380 +--- linux-2.6.7/arch/parisc/Makefile	Fri Jun 18 22:51:21 2004
 629.381 ++++ linux-2.6.7-mod/arch/parisc/Makefile	Sat Jun 19 12:53:47 2004
 629.382 +@@ -88,10 +88,10 @@
 629.383 + 
 629.384 + prepare: include/asm-parisc/offsets.h
 629.385 + 
 629.386 +-arch/parisc/kernel/asm-offsets.s: include/asm include/linux/version.h \
 629.387 ++arch/parisc/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 629.388 + 				   include/config/MARKER
 629.389 + 
 629.390 +-include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.s
 629.391 ++include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.asm
 629.392 + 	$(call filechk,gen-asm-offsets)
 629.393 + 
 629.394 + CLEAN_FILES	+= lifimage include/asm-parisc/offsets.h
 629.395 +diff -ur linux-2.6.7/arch/parisc/kernel/Makefile linux-2.6.7-mod/arch/parisc/kernel/Makefile
 629.396 +--- linux-2.6.7/arch/parisc/kernel/Makefile	Fri Jun 18 22:51:21 2004
 629.397 ++++ linux-2.6.7-mod/arch/parisc/kernel/Makefile	Sat Jun 19 12:53:53 2004
 629.398 +@@ -4,7 +4,7 @@
 629.399 + 
 629.400 + head-y			:= head.o
 629.401 + head-$(CONFIG_PARISC64)	:= head64.o
 629.402 +-extra-y			:= init_task.o $(head-y) vmlinux.lds.s
 629.403 ++extra-y			:= init_task.o $(head-y) vmlinux.lds.asm
 629.404 + 
 629.405 + AFLAGS_entry.o	:= -traditional
 629.406 + AFLAGS_pacache.o := -traditional
 629.407 +diff -ur linux-2.6.7/arch/ppc/Makefile linux-2.6.7-mod/arch/ppc/Makefile
 629.408 +--- linux-2.6.7/arch/ppc/Makefile	Fri Jun 18 22:51:22 2004
 629.409 ++++ linux-2.6.7-mod/arch/ppc/Makefile	Sat Jun 19 12:54:09 2004
 629.410 +@@ -78,10 +78,10 @@
 629.411 + 
 629.412 + prepare: include/asm-$(ARCH)/offsets.h checkbin
 629.413 + 
 629.414 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 629.415 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 629.416 + 				   include/config/MARKER
 629.417 + 
 629.418 +-include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 629.419 ++include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
 629.420 + 	$(call filechk,gen-asm-offsets)
 629.421 + 
 629.422 + ifdef CONFIG_6xx
 629.423 +@@ -104,4 +104,4 @@
 629.424 + endif
 629.425 + 
 629.426 + CLEAN_FILES +=	include/asm-$(ARCH)/offsets.h \
 629.427 +-		arch/$(ARCH)/kernel/asm-offsets.s
 629.428 ++		arch/$(ARCH)/kernel/asm-offsets.asm
 629.429 +diff -ur linux-2.6.7/arch/ppc/kernel/Makefile linux-2.6.7-mod/arch/ppc/kernel/Makefile
 629.430 +--- linux-2.6.7/arch/ppc/kernel/Makefile	Fri Jun 18 22:51:24 2004
 629.431 ++++ linux-2.6.7-mod/arch/ppc/kernel/Makefile	Sat Jun 19 12:43:10 2004
 629.432 +@@ -15,7 +15,7 @@
 629.433 + extra-$(CONFIG_8xx)		:= head_8xx.o
 629.434 + extra-$(CONFIG_6xx)		+= idle_6xx.o
 629.435 + extra-$(CONFIG_POWER4)		+= idle_power4.o
 629.436 +-extra-y				+= vmlinux.lds.s
 629.437 ++extra-y				+= vmlinux.lds.asm
 629.438 + 
 629.439 + obj-y				:= entry.o traps.o irq.o idle.o time.o misc.o \
 629.440 + 					process.o signal.o ptrace.o align.o \
 629.441 +diff -ur linux-2.6.7/arch/ppc64/Makefile linux-2.6.7-mod/arch/ppc64/Makefile
 629.442 +--- linux-2.6.7/arch/ppc64/Makefile	Fri Jun 18 22:51:26 2004
 629.443 ++++ linux-2.6.7-mod/arch/ppc64/Makefile	Sat Jun 19 12:54:32 2004
 629.444 +@@ -67,10 +67,10 @@
 629.445 + 
 629.446 + prepare: include/asm-ppc64/offsets.h
 629.447 + 
 629.448 +-arch/ppc64/kernel/asm-offsets.s: include/asm include/linux/version.h \
 629.449 ++arch/ppc64/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 629.450 + 				   include/config/MARKER
 629.451 + 
 629.452 +-include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s
 629.453 ++include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.asm
 629.454 + 	$(call filechk,gen-asm-offsets)
 629.455 + 
 629.456 + define archhelp
 629.457 +diff -ur linux-2.6.7/arch/ppc64/kernel/Makefile linux-2.6.7-mod/arch/ppc64/kernel/Makefile
 629.458 +--- linux-2.6.7/arch/ppc64/kernel/Makefile	Mon May 10 04:33:20 2004
 629.459 ++++ linux-2.6.7-mod/arch/ppc64/kernel/Makefile	Sat Jun 19 12:54:39 2004
 629.460 +@@ -3,7 +3,7 @@
 629.461 + #
 629.462 + 
 629.463 + EXTRA_CFLAGS	+= -mno-minimal-toc
 629.464 +-extra-y		:= head.o vmlinux.lds.s
 629.465 ++extra-y		:= head.o vmlinux.lds.asm
 629.466 + 
 629.467 + obj-y               :=	setup.o entry.o traps.o irq.o idle.o dma.o \
 629.468 + 			time.o process.o signal.o syscalls.o misc.o ptrace.o \
 629.469 +diff -ur linux-2.6.7/arch/s390/Makefile linux-2.6.7-mod/arch/s390/Makefile
 629.470 +--- linux-2.6.7/arch/s390/Makefile	Mon May 10 04:32:02 2004
 629.471 ++++ linux-2.6.7-mod/arch/s390/Makefile	Sat Jun 19 12:54:46 2004
 629.472 +@@ -68,10 +68,10 @@
 629.473 + 
 629.474 + prepare: include/asm-$(ARCH)/offsets.h
 629.475 + 
 629.476 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 629.477 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 629.478 + 				   include/config/MARKER
 629.479 + 
 629.480 +-include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 629.481 ++include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
 629.482 + 	$(call filechk,gen-asm-offsets)
 629.483 + 
 629.484 + CLEAN_FILES += include/asm-$(ARCH)/offsets.h
 629.485 +diff -ur linux-2.6.7/arch/s390/kernel/Makefile linux-2.6.7-mod/arch/s390/kernel/Makefile
 629.486 +--- linux-2.6.7/arch/s390/kernel/Makefile	Mon May 10 04:33:20 2004
 629.487 ++++ linux-2.6.7-mod/arch/s390/kernel/Makefile	Sat Jun 19 12:54:52 2004
 629.488 +@@ -10,7 +10,7 @@
 629.489 + 
 629.490 + extra-$(CONFIG_ARCH_S390_31)	+= head.o 
 629.491 + extra-$(CONFIG_ARCH_S390X)	+= head64.o 
 629.492 +-extra-y				+= init_task.o vmlinux.lds.s
 629.493 ++extra-y				+= init_task.o vmlinux.lds.asm
 629.494 + 
 629.495 + obj-$(CONFIG_MODULES)		+= s390_ksyms.o module.o
 629.496 + obj-$(CONFIG_SMP)		+= smp.o
 629.497 +diff -ur linux-2.6.7/arch/sh/kernel/Makefile linux-2.6.7-mod/arch/sh/kernel/Makefile
 629.498 +--- linux-2.6.7/arch/sh/kernel/Makefile	Mon May 10 04:32:39 2004
 629.499 ++++ linux-2.6.7-mod/arch/sh/kernel/Makefile	Sat Jun 19 12:55:33 2004
 629.500 +@@ -2,7 +2,7 @@
 629.501 + # Makefile for the Linux/SuperH kernel.
 629.502 + #
 629.503 + 
 629.504 +-extra-y	:= head.o init_task.o vmlinux.lds.s
 629.505 ++extra-y	:= head.o init_task.o vmlinux.lds.asm
 629.506 + 
 629.507 + obj-y	:= process.o signal.o entry.o traps.o irq.o \
 629.508 + 	ptrace.o setup.o time.o sys_sh.o semaphore.o \
 629.509 +diff -ur linux-2.6.7/arch/sparc/Makefile linux-2.6.7-mod/arch/sparc/Makefile
 629.510 +--- linux-2.6.7/arch/sparc/Makefile	Fri Jun 18 22:51:29 2004
 629.511 ++++ linux-2.6.7-mod/arch/sparc/Makefile	Sat Jun 19 12:55:48 2004
 629.512 +@@ -61,14 +61,14 @@
 629.513 + 
 629.514 + prepare: include/asm-$(ARCH)/asm_offsets.h
 629.515 + 
 629.516 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 629.517 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 629.518 + 				   include/config/MARKER
 629.519 + 
 629.520 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 629.521 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
 629.522 + 	$(call filechk,gen-asm-offsets)
 629.523 + 
 629.524 + CLEAN_FILES +=	include/asm-$(ARCH)/asm_offsets.h	\
 629.525 +-		arch/$(ARCH)/kernel/asm-offsets.s	\
 629.526 ++		arch/$(ARCH)/kernel/asm-offsets.asm	\
 629.527 + 		arch/$(ARCH)/boot/System.map
 629.528 + 
 629.529 + # Don't use tabs in echo arguments.
 629.530 +diff -ur linux-2.6.7/arch/sparc/kernel/Makefile linux-2.6.7-mod/arch/sparc/kernel/Makefile
 629.531 +--- linux-2.6.7/arch/sparc/kernel/Makefile	Mon May 10 04:33:13 2004
 629.532 ++++ linux-2.6.7-mod/arch/sparc/kernel/Makefile	Sat Jun 19 12:55:52 2004
 629.533 +@@ -2,7 +2,7 @@
 629.534 + # Makefile for the linux kernel.
 629.535 + #
 629.536 + 
 629.537 +-extra-y		:= head.o init_task.o vmlinux.lds.s
 629.538 ++extra-y		:= head.o init_task.o vmlinux.lds.asm
 629.539 + 
 629.540 + EXTRA_AFLAGS	:= -ansi
 629.541 + 
 629.542 +diff -ur linux-2.6.7/arch/sparc64/kernel/Makefile linux-2.6.7-mod/arch/sparc64/kernel/Makefile
 629.543 +--- linux-2.6.7/arch/sparc64/kernel/Makefile	Mon May 10 04:32:02 2004
 629.544 ++++ linux-2.6.7-mod/arch/sparc64/kernel/Makefile	Sat Jun 19 12:56:24 2004
 629.545 +@@ -5,7 +5,7 @@
 629.546 + EXTRA_AFLAGS := -ansi
 629.547 + EXTRA_CFLAGS := -Werror
 629.548 + 
 629.549 +-extra-y		:= head.o init_task.o vmlinux.lds.s
 629.550 ++extra-y		:= head.o init_task.o vmlinux.lds.asm
 629.551 + 
 629.552 + obj-y		:= process.o setup.o cpu.o idprom.o \
 629.553 + 		   traps.o devices.o auxio.o \
 629.554 +diff -ur linux-2.6.7/arch/um/Makefile linux-2.6.7-mod/arch/um/Makefile
 629.555 +--- linux-2.6.7/arch/um/Makefile	Mon May 10 04:32:52 2004
 629.556 ++++ linux-2.6.7-mod/arch/um/Makefile	Sat Jun 19 12:57:07 2004
 629.557 +@@ -77,7 +77,7 @@
 629.558 + # CONFIG_MODE_SKAS + CONFIG_STATIC_LINK case.
 629.559 + 
 629.560 + LINK_TT = -static
 629.561 +-LD_SCRIPT_TT := uml.lds.s
 629.562 ++LD_SCRIPT_TT := uml.lds.asm
 629.563 + 
 629.564 + ifeq ($(CONFIG_STATIC_LINK),y)
 629.565 +   LINK-y += $(LINK_TT)
 629.566 +@@ -103,11 +103,11 @@
 629.567 + 	-DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE_TT) \
 629.568 + 	-DKERNEL_STACK_SIZE=$(STACK_SIZE)
 629.569 + 
 629.570 +-AFLAGS_$(LD_SCRIPT-y:.s=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
 629.571 ++AFLAGS_$(LD_SCRIPT-y:.asm=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
 629.572 + 
 629.573 + LD_SCRIPT-y := $(ARCH_DIR)/$(LD_SCRIPT-y)
 629.574 + 
 629.575 +-$(LD_SCRIPT-y) : $(LD_SCRIPT-y:.s=.S) scripts FORCE
 629.576 ++$(LD_SCRIPT-y) : $(LD_SCRIPT-y:.asm=.S) scripts FORCE
 629.577 + 	$(call if_changed_dep,as_s_S)
 629.578 + 
 629.579 + linux: vmlinux $(LD_SCRIPT-y)
 629.580 +@@ -122,8 +122,8 @@
 629.581 + # To get a definition of F_SETSIG
 629.582 + USER_CFLAGS += -D_GNU_SOURCE
 629.583 + 
 629.584 +-CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds.s \
 629.585 +-	$(ARCH_DIR)/dyn_link.ld.s $(GEN_HEADERS)
 629.586 ++CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds.asm \
 629.587 ++	$(ARCH_DIR)/dyn_link.ld.asm $(GEN_HEADERS)
 629.588 + 
 629.589 + $(ARCH_DIR)/main.o: $(ARCH_DIR)/main.c
 629.590 + 	$(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
 629.591 +diff -ur linux-2.6.7/arch/um/kernel/Makefile linux-2.6.7-mod/arch/um/kernel/Makefile
 629.592 +--- linux-2.6.7/arch/um/kernel/Makefile	Mon May 10 04:32:53 2004
 629.593 ++++ linux-2.6.7-mod/arch/um/kernel/Makefile	Sat Jun 19 12:57:15 2004
 629.594 +@@ -3,7 +3,7 @@
 629.595 + # Licensed under the GPL
 629.596 + #
 629.597 + 
 629.598 +-extra-y := vmlinux.lds.s
 629.599 ++extra-y := vmlinux.lds.asm
 629.600 + 
 629.601 + obj-y = checksum.o config.o exec_kern.o exitcode.o frame_kern.o frame.o \
 629.602 + 	helper.o init_task.o irq.o irq_user.o ksyms.o mem.o mem_user.o \
 629.603 +diff -ur linux-2.6.7/arch/v850/Makefile linux-2.6.7-mod/arch/v850/Makefile
 629.604 +--- linux-2.6.7/arch/v850/Makefile	Mon May 10 04:33:21 2004
 629.605 ++++ linux-2.6.7-mod/arch/v850/Makefile	Sat Jun 19 12:57:59 2004
 629.606 +@@ -52,12 +52,12 @@
 629.607 + prepare: include/asm-$(ARCH)/asm-consts.h
 629.608 + 
 629.609 + # Generate constants from C code for use by asm files
 629.610 +-arch/$(ARCH)/kernel/asm-consts.s: include/asm include/linux/version.h \
 629.611 ++arch/$(ARCH)/kernel/asm-consts.asm: include/asm include/linux/version.h \
 629.612 + 				   include/config/MARKER
 629.613 + 
 629.614 +-include/asm-$(ARCH)/asm-consts.h: arch/$(ARCH)/kernel/asm-consts.s
 629.615 ++include/asm-$(ARCH)/asm-consts.h: arch/$(ARCH)/kernel/asm-consts.asm
 629.616 + 	$(call filechk,gen-asm-offsets)
 629.617 + 
 629.618 + CLEAN_FILES += include/asm-$(ARCH)/asm-consts.h \
 629.619 +-	       arch/$(ARCH)/kernel/asm-consts.s \
 629.620 ++	       arch/$(ARCH)/kernel/asm-consts.asm \
 629.621 + 	       root_fs_image.o
 629.622 +diff -ur linux-2.6.7/arch/v850/kernel/Makefile linux-2.6.7-mod/arch/v850/kernel/Makefile
 629.623 +--- linux-2.6.7/arch/v850/kernel/Makefile	Mon May 10 04:33:21 2004
 629.624 ++++ linux-2.6.7-mod/arch/v850/kernel/Makefile	Sat Jun 19 12:58:04 2004
 629.625 +@@ -9,7 +9,7 @@
 629.626 + # for more details.
 629.627 + #
 629.628 + 
 629.629 +-extra-y := head.o init_task.o vmlinux.lds.s
 629.630 ++extra-y := head.o init_task.o vmlinux.lds.asm
 629.631 + 
 629.632 + obj-y += intv.o entry.o process.o syscalls.o time.o semaphore.o setup.o \
 629.633 + 	 signal.o irq.o mach.o ptrace.o bug.o
 629.634 +diff -ur linux-2.6.7/arch/x86_64/Makefile linux-2.6.7-mod/arch/x86_64/Makefile
 629.635 +--- linux-2.6.7/arch/x86_64/Makefile	Mon May 10 04:33:19 2004
 629.636 ++++ linux-2.6.7-mod/arch/x86_64/Makefile	Sat Jun 19 12:58:10 2004
 629.637 +@@ -93,10 +93,10 @@
 629.638 + 
 629.639 + prepare: include/asm-$(ARCH)/offset.h
 629.640 + 
 629.641 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 629.642 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 629.643 + 				   include/config/MARKER
 629.644 + 
 629.645 +-include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.s
 629.646 ++include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.asm
 629.647 + 	$(call filechk,gen-asm-offsets)
 629.648 + 
 629.649 + CLEAN_FILES += include/asm-$(ARCH)/offset.h
 629.650 +diff -ur linux-2.6.7/arch/x86_64/kernel/Makefile linux-2.6.7-mod/arch/x86_64/kernel/Makefile
 629.651 +--- linux-2.6.7/arch/x86_64/kernel/Makefile	Fri Jun 18 22:51:32 2004
 629.652 ++++ linux-2.6.7-mod/arch/x86_64/kernel/Makefile	Sat Jun 19 12:58:17 2004
 629.653 +@@ -2,7 +2,7 @@
 629.654 + # Makefile for the linux kernel.
 629.655 + #
 629.656 + 
 629.657 +-extra-y 	:= head.o head64.o init_task.o vmlinux.lds.s
 629.658 ++extra-y 	:= head.o head64.o init_task.o vmlinux.lds.asm
 629.659 + EXTRA_AFLAGS	:= -traditional
 629.660 + obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o \
 629.661 + 		ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \
 629.662 +diff -ur linux-2.6.7/scripts/Makefile.build linux-2.6.7-mod/scripts/Makefile.build
 629.663 +--- linux-2.6.7/scripts/Makefile.build	Mon May 10 04:33:13 2004
 629.664 ++++ linux-2.6.7-mod/scripts/Makefile.build	Sat Jun 19 12:43:10 2004
 629.665 +@@ -110,7 +110,7 @@
 629.666 + quiet_cmd_cc_s_c = CC $(quiet_modtag)  $@
 629.667 + cmd_cc_s_c       = $(CC) $(c_flags) -S -o $@ $< 
 629.668 + 
 629.669 +-%.s: %.c FORCE
 629.670 ++%.asm: %.c FORCE
 629.671 + 	$(call if_changed_dep,cc_s_c)
 629.672 + 
 629.673 + quiet_cmd_cc_i_c = CPP $(quiet_modtag) $@
 629.674 +@@ -197,7 +197,7 @@
 629.675 + quiet_cmd_as_s_S = CPP $(quiet_modtag) $@
 629.676 + cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $< 
 629.677 + 
 629.678 +-%.s: %.S FORCE
 629.679 ++%.asm: %.S FORCE
 629.680 + 	$(call if_changed_dep,as_s_S)
 629.681 + 
 629.682 + quiet_cmd_as_o_S = AS $(quiet_modtag)  $@
   630.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   630.2 +++ b/patches/linux/2.6.7/linux-2.6.8-noshared-kconfig.patch	Sat Feb 24 11:00:05 2007 +0000
   630.3 @@ -0,0 +1,28 @@
   630.4 +Lets you run 'make oldconfig' and 'make menuconfig' on systems
   630.5 +where shared libraries aren't easy.  (There's no harm in using the
   630.6 +static version of libkconfig.)
   630.7 +Idea mentioned by Bertrand Marquis, but this patch is a bit simpler than his.
   630.8 +
   630.9 +
  630.10 +--- linux-2.6.8.1/scripts/kconfig/Makefile.old	2004-09-09 20:30:25.000000000 -0700
  630.11 ++++ linux-2.6.8.1/scripts/kconfig/Makefile	2004-09-09 20:47:51.000000000 -0700
  630.12 +@@ -68,8 +68,8 @@
  630.13 + libkconfig-objs := zconf.tab.o
  630.14 + 
  630.15 + host-progs	:= conf mconf qconf gconf
  630.16 +-conf-objs	:= conf.o  libkconfig.so
  630.17 +-mconf-objs	:= mconf.o libkconfig.so
  630.18 ++conf-objs	:= conf.o  $(libkconfig-objs)
  630.19 ++mconf-objs	:= mconf.o $(libkconfig-objs)
  630.20 + 
  630.21 + ifeq ($(MAKECMDGOALS),xconfig)
  630.22 + 	qconf-target := 1
  630.23 +@@ -88,7 +88,7 @@
  630.24 + gconf-objs	:= gconf.o kconfig_load.o
  630.25 + endif
  630.26 + 
  630.27 +-clean-files	:= libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
  630.28 ++clean-files	:= $(libkconfig-objs) lkc_defs.h qconf.moc .tmp_qtcheck \
  630.29 + 		   .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c
  630.30 + 
  630.31 + # generated files seem to need this to find local include files
   631.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   631.2 +++ b/patches/linux/2.6.8/kaz-types.patch	Sat Feb 24 11:00:05 2007 +0000
   631.3 @@ -0,0 +1,60 @@
   631.4 +The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
   631.5 +
   631.6 +In file included from sys/ustat.h:30,
   631.7 +                 from ../sysdeps/unix/sysv/linux/ustat.c:21:
   631.8 +../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
   631.9 +make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
  631.10 +make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
  631.11 +make[1]: *** [misc/subdir_lib] Error 2
  631.12 +make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
  631.13 +make: *** [all] Error 2
  631.14 +
  631.15 +----------- snip ---------------
  631.16 +
  631.17 +Date: Fri, 06 Jun 2003 08:00:00 +0900
  631.18 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
  631.19 +Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
  631.20 + error: redefinition of `struct user_fpu_struct'"
  631.21 +To: linux-sh@m17n.org
  631.22 +Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
  631.23 +
  631.24 +Hi,
  631.25 +
  631.26 +Dan Kegel <dank@kegel.com> wrote:
  631.27 +> When I try to build glibc-2.3.2 for sh4, it fails with the error
  631.28 +[snip]
  631.29 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
  631.30 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
  631.31 +[snip]
  631.32 +> The error reminds me of the kind of thing fixed by
  631.33 +> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
  631.34 +
  631.35 +It seems that the definitions in asm/user.h and the above patch collide.
  631.36 +I'm not sure why you need this patch, but is it needed for the problem
  631.37 +about struct ustat that you pointed out in this list, isn't it?
  631.38 +I found why I don't hit ustat problem - my local kernel tree includes
  631.39 +the following patch, though I can't recall about it.
  631.40 +
  631.41 +Regards,
  631.42 +	kaz
  631.43 +--
  631.44 +diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
  631.45 +--- linux-2.5.69-sf-orig/include/linux/types.h	Wed Mar  5 12:29:34 2003
  631.46 ++++ sh4-unknown-linux-gnu/include/linux/types.h	Sat Apr 19 10:05:52 2003
  631.47 +@@ -141,6 +141,7 @@
  631.48 + 
  631.49 + #endif /* __KERNEL_STRICT_NAMES */
  631.50 + 
  631.51 ++#ifdef	__KERNEL__
  631.52 + /*
  631.53 +  * Below are truly Linux-specific types that should never collide with
  631.54 +  * any application/library that wants linux/types.h.
  631.55 +@@ -152,5 +153,6 @@
  631.56 + 	char			f_fname[6];
  631.57 + 	char			f_fpack[6];
  631.58 + };
  631.59 ++#endif
  631.60 + 
  631.61 + #endif /* _LINUX_TYPES_H */
  631.62 +
  631.63 +
   632.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   632.2 +++ b/patches/linux/2.6.8/linux-2.6.8-allow-gcc-4.0-asm-i386.patch	Sat Feb 24 11:00:05 2007 +0000
   632.3 @@ -0,0 +1,138 @@
   632.4 +Fixes
   632.5 +
   632.6 +In file included from include/asm/thread_info.h:16,
   632.7 +                 from include/linux/thread_info.h:21,
   632.8 +                 from include/linux/spinlock.h:12,
   632.9 +                 from include/linux/capability.h:45,
  632.10 +                 from include/linux/sched.h:7,
  632.11 +                 from arch/i386/kernel/asm-offsets.c:7:
  632.12 +include/asm/processor.h:87: error: array type has incomplete element type
  632.13 +make[1]: *** [arch/i386/kernel/asm-offsets.asm] Error 1
  632.14 +
  632.15 +--- linux-2.6.8/include/asm-i386/processor.h.old	Tue Mar 15 00:14:42 2005
  632.16 ++++ linux-2.6.8/include/asm-i386/processor.h	Tue Mar 15 00:18:45 2005
  632.17 +@@ -79,6 +79,58 @@
  632.18 + #define X86_VENDOR_UNKNOWN 0xff
  632.19 + 
  632.20 + /*
  632.21 ++ * Size of io_bitmap.
  632.22 ++ */
  632.23 ++#define IO_BITMAP_BITS  65536
  632.24 ++#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
  632.25 ++#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
  632.26 ++#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
  632.27 ++#define INVALID_IO_BITMAP_OFFSET 0x8000
  632.28 ++
  632.29 ++struct tss_struct {
  632.30 ++	unsigned short	back_link,__blh;
  632.31 ++	unsigned long	esp0;
  632.32 ++	unsigned short	ss0,__ss0h;
  632.33 ++	unsigned long	esp1;
  632.34 ++	unsigned short	ss1,__ss1h;	/* ss1 is used to cache MSR_IA32_SYSENTER_CS */
  632.35 ++	unsigned long	esp2;
  632.36 ++	unsigned short	ss2,__ss2h;
  632.37 ++	unsigned long	__cr3;
  632.38 ++	unsigned long	eip;
  632.39 ++	unsigned long	eflags;
  632.40 ++	unsigned long	eax,ecx,edx,ebx;
  632.41 ++	unsigned long	esp;
  632.42 ++	unsigned long	ebp;
  632.43 ++	unsigned long	esi;
  632.44 ++	unsigned long	edi;
  632.45 ++	unsigned short	es, __esh;
  632.46 ++	unsigned short	cs, __csh;
  632.47 ++	unsigned short	ss, __ssh;
  632.48 ++	unsigned short	ds, __dsh;
  632.49 ++	unsigned short	fs, __fsh;
  632.50 ++	unsigned short	gs, __gsh;
  632.51 ++	unsigned short	ldt, __ldth;
  632.52 ++	unsigned short	trace, io_bitmap_base;
  632.53 ++	/*
  632.54 ++	 * The extra 1 is there because the CPU will access an
  632.55 ++	 * additional byte beyond the end of the IO permission
  632.56 ++	 * bitmap. The extra byte must be all 1 bits, and must
  632.57 ++	 * be within the limit.
  632.58 ++	 */
  632.59 ++	unsigned long	io_bitmap[IO_BITMAP_LONGS + 1];
  632.60 ++	/*
  632.61 ++	 * pads the TSS to be cacheline-aligned (size is 0x100)
  632.62 ++	 */
  632.63 ++	unsigned long __cacheline_filler[37];
  632.64 ++	/*
  632.65 ++	 * .. and then another 0x100 bytes for emergency kernel stack
  632.66 ++	 */
  632.67 ++	unsigned long stack[64];
  632.68 ++} __attribute__((packed));
  632.69 ++
  632.70 ++#define ARCH_MIN_TASKALIGN	16
  632.71 ++
  632.72 ++/*
  632.73 +  * capabilities of CPUs
  632.74 +  */
  632.75 + 
  632.76 +@@ -296,15 +348,6 @@
  632.77 +  */
  632.78 + #define TASK_UNMAPPED_BASE	(PAGE_ALIGN(TASK_SIZE / 3))
  632.79 + 
  632.80 +-/*
  632.81 +- * Size of io_bitmap.
  632.82 +- */
  632.83 +-#define IO_BITMAP_BITS  65536
  632.84 +-#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
  632.85 +-#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
  632.86 +-#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
  632.87 +-#define INVALID_IO_BITMAP_OFFSET 0x8000
  632.88 +-
  632.89 + struct i387_fsave_struct {
  632.90 + 	long	cwd;
  632.91 + 	long	swd;
  632.92 +@@ -356,49 +399,6 @@
  632.93 + typedef struct {
  632.94 + 	unsigned long seg;
  632.95 + } mm_segment_t;
  632.96 +-
  632.97 +-struct tss_struct {
  632.98 +-	unsigned short	back_link,__blh;
  632.99 +-	unsigned long	esp0;
 632.100 +-	unsigned short	ss0,__ss0h;
 632.101 +-	unsigned long	esp1;
 632.102 +-	unsigned short	ss1,__ss1h;	/* ss1 is used to cache MSR_IA32_SYSENTER_CS */
 632.103 +-	unsigned long	esp2;
 632.104 +-	unsigned short	ss2,__ss2h;
 632.105 +-	unsigned long	__cr3;
 632.106 +-	unsigned long	eip;
 632.107 +-	unsigned long	eflags;
 632.108 +-	unsigned long	eax,ecx,edx,ebx;
 632.109 +-	unsigned long	esp;
 632.110 +-	unsigned long	ebp;
 632.111 +-	unsigned long	esi;
 632.112 +-	unsigned long	edi;
 632.113 +-	unsigned short	es, __esh;
 632.114 +-	unsigned short	cs, __csh;
 632.115 +-	unsigned short	ss, __ssh;
 632.116 +-	unsigned short	ds, __dsh;
 632.117 +-	unsigned short	fs, __fsh;
 632.118 +-	unsigned short	gs, __gsh;
 632.119 +-	unsigned short	ldt, __ldth;
 632.120 +-	unsigned short	trace, io_bitmap_base;
 632.121 +-	/*
 632.122 +-	 * The extra 1 is there because the CPU will access an
 632.123 +-	 * additional byte beyond the end of the IO permission
 632.124 +-	 * bitmap. The extra byte must be all 1 bits, and must
 632.125 +-	 * be within the limit.
 632.126 +-	 */
 632.127 +-	unsigned long	io_bitmap[IO_BITMAP_LONGS + 1];
 632.128 +-	/*
 632.129 +-	 * pads the TSS to be cacheline-aligned (size is 0x100)
 632.130 +-	 */
 632.131 +-	unsigned long __cacheline_filler[37];
 632.132 +-	/*
 632.133 +-	 * .. and then another 0x100 bytes for emergency kernel stack
 632.134 +-	 */
 632.135 +-	unsigned long stack[64];
 632.136 +-} __attribute__((packed));
 632.137 +-
 632.138 +-#define ARCH_MIN_TASKALIGN	16
 632.139 + 
 632.140 + struct thread_struct {
 632.141 + /* cached TLS descriptors. */
   633.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   633.2 +++ b/patches/linux/2.6.8/linux-2.6.8-arm-nonofpu.patch	Sat Feb 24 11:00:05 2007 +0000
   633.3 @@ -0,0 +1,50 @@
   633.4 +http://www.spinics.net/lists/arm/msg08012.html
   633.5 +
   633.6 +To: Dimitry Andric <dimitry@xxxxxxxxxx>
   633.7 +Subject: Re: Kernel Compile Error: use of old and new-style options to set FPU type
   633.8 +From: Marc Britten <maillists@xxxxxxxxxxxxxxxxx>
   633.9 +Date: Wed, 16 Jun 2004 03:03:15 -0400
  633.10 +Cc: linux-arm@xxxxxxxxxxxxxxxxxxxxxx
  633.11 +In-reply-to: <1525495613.20040615202902@andric.com>
  633.12 +
  633.13 +Dimitry Andric wrote:
  633.14 +
  633.15 +>>Assembler messages:
  633.16 +>>Error: use of old and new-style options to set FPU type
  633.17 +>   Try removing -Wa,-mno-fpu from CFLAGS (and possibly AFLAGS, but I'm
  633.18 +>   not sure, depends on what your compiler generates by default) in
  633.19 +>   arch/arm/Makefile.
  633.20 +
  633.21 +Just to let people know, this was successful.
  633.22 +
  633.23 +Thanks,
  633.24 +
  633.25 +Marc Britten
  633.26 +
  633.27 +--------
  633.28 +
  633.29 +Fixes error
  633.30 +
  633.31 +...
  633.32 +make -f scripts/Makefile.build obj=scripts/mod
  633.33 +  /opt/crosstool/arm-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/arm-unknown-linux-gnu-gcc -Wp,-MD,scripts/mod/.empty.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mlittle-endian -mapcs-32   -malignment-traps -msoft-float -Wa,-mno-fpu -Uarm -Os -Wdeclaration-after-statement    -DKBUILD_BASENAME=empty -DKBUILD_MODNAME=empty -c -o scripts/mod/empty.o scripts/mod/empty.c
  633.34 +Assembler messages:
  633.35 +Error: use of old and new-style options to set FPU type
  633.36 +make[2]: *** [scripts/mod/empty.o] Error 1
  633.37 +make[1]: *** [scripts/mod] Error 2
  633.38 +make: *** [scripts] Error 2
  633.39 +
  633.40 +
  633.41 +--- linux-2.6.8/arch/arm/Makefile.old	2004-09-01 21:27:07.000000000 -0700
  633.42 ++++ linux-2.6.8/arch/arm/Makefile	2004-09-01 21:27:31.000000000 -0700
  633.43 +@@ -55,8 +55,8 @@
  633.44 + tune-$(CONFIG_CPU_V6)		:=-mtune=strongarm
  633.45 + 
  633.46 + # Need -Uarm for gcc < 3.x
  633.47 +-CFLAGS		+=-mapcs-32 $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Wa,-mno-fpu -Uarm
  633.48 +-AFLAGS		+=-mapcs-32 $(arch-y) $(tune-y) -msoft-float -Wa,-mno-fpu
  633.49 ++CFLAGS		+=-mapcs-32 $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Uarm
  633.50 ++AFLAGS		+=-mapcs-32 $(arch-y) $(tune-y) -msoft-float
  633.51 + 
  633.52 + CHECK		:= $(CHECK) -D__arm__=1
  633.53 + 
   634.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   634.2 +++ b/patches/linux/2.6.8/linux-2.6.8-build_on_case_insensitive_fs.patch	Sat Feb 24 11:00:05 2007 +0000
   634.3 @@ -0,0 +1,725 @@
   634.4 +Submitted By: Martin Schaffner <schaffner@gmx.li>
   634.5 +Date: 2004-06-19
   634.6 +Initial Package Version: 2.6.7
   634.7 +Upstream Status: Not submitted
   634.8 +Origin: Martin Schaffner
   634.9 +Description: Enables build on case-insensitive file systems
  634.10 +URL: xxxhttp://mirror.vtx.ch/lfs/patches/downloads/linux/linux-2.6.7-build_on_case_insensitive_fs-1.patch
  634.11 +--- Rediffed against 2.6.8 by dank@kegel.com
  634.12 +--- plus a few missing hunks added to fix sparc32 build
  634.13 +
  634.14 +--- linux-2.6.8/Makefile.orig	2004-08-13 22:37:25.000000000 -0700
  634.15 ++++ linux-2.6.8/Makefile	2004-09-01 21:39:39.000000000 -0700
  634.16 +@@ -540,7 +540,7 @@
  634.17 + 
  634.18 + do_system_map = $(NM) $(1) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > $(2)
  634.19 + 
  634.20 +-LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.s
  634.21 ++LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.asm
  634.22 + 
  634.23 + #	Generate section listing all symbols and add it into vmlinux
  634.24 + #	It's a three stage process:
  634.25 +@@ -584,13 +584,13 @@
  634.26 + .tmp_kallsyms%.S: .tmp_vmlinux%
  634.27 + 	$(call cmd,kallsyms)
  634.28 + 
  634.29 +-.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
  634.30 ++.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
  634.31 + 	$(call if_changed_rule,vmlinux__)
  634.32 + 
  634.33 +-.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
  634.34 ++.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
  634.35 + 	$(call if_changed_rule,vmlinux__)
  634.36 + 
  634.37 +-.tmp_vmlinux3: $(vmlinux-objs) .tmp_kallsyms2.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
  634.38 ++.tmp_vmlinux3: $(vmlinux-objs) .tmp_kallsyms2.o arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
  634.39 + 	$(call if_changed_rule,vmlinux__)
  634.40 + 
  634.41 + endif
  634.42 +@@ -603,13 +603,13 @@
  634.43 + 	$(rule_verify_kallsyms)
  634.44 + endef
  634.45 + 
  634.46 +-vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
  634.47 ++vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
  634.48 + 	$(call if_changed_rule,vmlinux)
  634.49 + 
  634.50 + #	The actual objects are generated when descending, 
  634.51 + #	make sure no implicit rule kicks in
  634.52 + 
  634.53 +-$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ;
  634.54 ++$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.asm: $(vmlinux-dirs) ;
  634.55 + 
  634.56 + # Handle descending into subdirectories listed in $(vmlinux-dirs)
  634.57 + # Preset locale variables to speed up the build process. Limit locale
  634.58 +@@ -672,7 +672,7 @@
  634.59 + # Single targets
  634.60 + # ---------------------------------------------------------------------------
  634.61 + 
  634.62 +-%.s: %.c scripts FORCE
  634.63 ++%.asm: %.c scripts FORCE
  634.64 + 	$(Q)$(MAKE) $(build)=$(@D) $@
  634.65 + %.i: %.c scripts FORCE
  634.66 + 	$(Q)$(MAKE) $(build)=$(@D) $@
  634.67 +@@ -682,7 +682,7 @@
  634.68 + 	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) $(build)=$(@D)
  634.69 + %.lst: %.c scripts FORCE
  634.70 + 	$(Q)$(MAKE) $(build)=$(@D) $@
  634.71 +-%.s: %.S scripts FORCE
  634.72 ++%.asm: %.S scripts FORCE
  634.73 + 	$(Q)$(MAKE) $(build)=$(@D) $@
  634.74 + %.o: %.S scripts FORCE
  634.75 + 	$(Q)$(MAKE) $(build)=$(@D) $@
  634.76 +diff -ur linux-2.6.7/arch/alpha/Makefile linux-2.6.7-mod/arch/alpha/Makefile
  634.77 +--- linux-2.6.7/arch/alpha/Makefile	Fri Jun 18 22:51:03 2004
  634.78 ++++ linux-2.6.7-mod/arch/alpha/Makefile	Sat Jun 19 12:46:32 2004
  634.79 +@@ -114,10 +114,10 @@
  634.80 + 
  634.81 + prepare: include/asm-$(ARCH)/asm_offsets.h
  634.82 + 
  634.83 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
  634.84 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
  634.85 + 				   include/config/MARKER
  634.86 + 
  634.87 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
  634.88 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
  634.89 + 	$(call filechk,gen-asm-offsets)
  634.90 + 
  634.91 + archclean:
  634.92 +diff -ur linux-2.6.7/arch/alpha/kernel/Makefile linux-2.6.7-mod/arch/alpha/kernel/Makefile
  634.93 +--- linux-2.6.7/arch/alpha/kernel/Makefile	Mon May 10 04:32:29 2004
  634.94 ++++ linux-2.6.7-mod/arch/alpha/kernel/Makefile	Sat Jun 19 12:46:48 2004
  634.95 +@@ -2,7 +2,7 @@
  634.96 + # Makefile for the linux kernel.
  634.97 + #
  634.98 + 
  634.99 +-extra-y		:= head.o vmlinux.lds.s
 634.100 ++extra-y		:= head.o vmlinux.lds.asm
 634.101 + EXTRA_AFLAGS	:= $(CFLAGS)
 634.102 + EXTRA_CFLAGS	:= -Werror -Wno-sign-compare
 634.103 + 
 634.104 +--- linux-2.6.8/arch/arm/Makefile.orig	2004-08-13 22:36:56.000000000 -0700
 634.105 ++++ linux-2.6.8/arch/arm/Makefile	2004-09-01 21:40:21.000000000 -0700
 634.106 +@@ -176,10 +176,10 @@
 634.107 + bp:;	$(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage
 634.108 + i zi:;	$(Q)$(MAKE) $(build)=$(boot) $@
 634.109 + 
 634.110 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 634.111 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 634.112 + 				   include/asm-arm/.arch
 634.113 + 
 634.114 +-include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.s
 634.115 ++include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.asm
 634.116 + 	$(call filechk,gen-asm-offsets)
 634.117 + 
 634.118 + define archhelp
 634.119 +diff -ur linux-2.6.7/arch/arm/kernel/Makefile linux-2.6.7-mod/arch/arm/kernel/Makefile
 634.120 +--- linux-2.6.7/arch/arm/kernel/Makefile	Mon May 10 04:33:19 2004
 634.121 ++++ linux-2.6.7-mod/arch/arm/kernel/Makefile	Sat Jun 19 12:47:25 2004
 634.122 +@@ -27,7 +27,7 @@
 634.123 + head-y			:= head.o
 634.124 + obj-$(CONFIG_DEBUG_LL)	+= debug.o
 634.125 + 
 634.126 +-extra-y := $(head-y) init_task.o vmlinux.lds.s
 634.127 ++extra-y := $(head-y) init_task.o vmlinux.lds.asm
 634.128 + 
 634.129 + # Spell out some dependencies that aren't automatically figured out
 634.130 + $(obj)/entry-armv.o: 	$(obj)/entry-header.S include/asm-arm/constants.h
 634.131 +diff -ur linux-2.6.7/arch/arm26/Makefile linux-2.6.7-mod/arch/arm26/Makefile
 634.132 +--- linux-2.6.7/arch/arm26/Makefile	Mon May 10 04:32:28 2004
 634.133 ++++ linux-2.6.7-mod/arch/arm26/Makefile	Sat Jun 19 12:48:24 2004
 634.134 +@@ -101,10 +101,10 @@
 634.135 + 	fi; \
 634.136 + 	)
 634.137 + 
 634.138 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 634.139 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 634.140 + 				   include/config/MARKER
 634.141 + 
 634.142 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 634.143 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
 634.144 + 	$(call filechk,gen-asm-offsets)
 634.145 + 
 634.146 + define archhelp
 634.147 +diff -ur linux-2.6.7/arch/arm26/kernel/Makefile linux-2.6.7-mod/arch/arm26/kernel/Makefile
 634.148 +--- linux-2.6.7/arch/arm26/kernel/Makefile	Mon May 10 04:32:29 2004
 634.149 ++++ linux-2.6.7-mod/arch/arm26/kernel/Makefile	Sat Jun 19 12:48:30 2004
 634.150 +@@ -14,5 +14,5 @@
 634.151 + obj-$(CONFIG_FIQ)		+= fiq.o
 634.152 + obj-$(CONFIG_MODULES)		+= armksyms.o
 634.153 + 
 634.154 +-extra-y := init_task.o vmlinux.lds.s
 634.155 ++extra-y := init_task.o vmlinux.lds.asm
 634.156 + 
 634.157 +diff -ur linux-2.6.7/arch/cris/Makefile linux-2.6.7-mod/arch/cris/Makefile
 634.158 +--- linux-2.6.7/arch/cris/Makefile	Fri Jun 18 22:51:07 2004
 634.159 ++++ linux-2.6.7-mod/arch/cris/Makefile	Sat Jun 19 12:48:47 2004
 634.160 +@@ -107,8 +107,8 @@
 634.161 + 	@ln -sf $(SARCH) include/asm-$(ARCH)/arch
 634.162 + 	@touch $@
 634.163 + 
 634.164 +-arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 634.165 ++arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 634.166 + 					include/config/MARKER
 634.167 + 
 634.168 +-include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s
 634.169 ++include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.asm
 634.170 + 	$(call filechk,gen-asm-offsets)
 634.171 +diff -ur linux-2.6.7/arch/cris/kernel/Makefile linux-2.6.7-mod/arch/cris/kernel/Makefile
 634.172 +--- linux-2.6.7/arch/cris/kernel/Makefile	Fri Jun 18 22:51:09 2004
 634.173 ++++ linux-2.6.7-mod/arch/cris/kernel/Makefile	Sat Jun 19 12:48:53 2004
 634.174 +@@ -3,7 +3,7 @@
 634.175 + # Makefile for the linux kernel.
 634.176 + #
 634.177 + 
 634.178 +-extra-y	:= vmlinux.lds.s
 634.179 ++extra-y	:= vmlinux.lds.asm
 634.180 + 
 634.181 + obj-y   := process.o traps.o irq.o ptrace.o setup.o \
 634.182 + 	   time.o sys_cris.o semaphore.o
 634.183 +diff -ur linux-2.6.7/arch/h8300/Makefile linux-2.6.7-mod/arch/h8300/Makefile
 634.184 +--- linux-2.6.7/arch/h8300/Makefile	Fri Jun 18 22:51:09 2004
 634.185 ++++ linux-2.6.7-mod/arch/h8300/Makefile	Sat Jun 19 12:49:12 2004
 634.186 +@@ -64,7 +64,7 @@
 634.187 + 
 634.188 + prepare: include/asm-$(ARCH)/asm-offsets.h
 634.189 + 
 634.190 +-include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
 634.191 ++include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm \
 634.192 + 				   include/asm include/linux/version.h
 634.193 + 	$(call filechk,gen-asm-offsets)
 634.194 + 
 634.195 +diff -ur linux-2.6.7/arch/h8300/kernel/Makefile linux-2.6.7-mod/arch/h8300/kernel/Makefile
 634.196 +--- linux-2.6.7/arch/h8300/kernel/Makefile	Fri Jun 18 22:51:09 2004
 634.197 ++++ linux-2.6.7-mod/arch/h8300/kernel/Makefile	Sat Jun 19 12:49:32 2004
 634.198 +@@ -2,7 +2,7 @@
 634.199 + # Makefile for the linux kernel.
 634.200 + #
 634.201 + 
 634.202 +-extra-y := vmlinux.lds.s
 634.203 ++extra-y := vmlinux.lds.asm
 634.204 + 
 634.205 + obj-y := process.o traps.o ptrace.o ints.o \
 634.206 + 	 sys_h8300.o time.o semaphore.o signal.o \
 634.207 +diff -ur linux-2.6.7/arch/i386/Makefile linux-2.6.7-mod/arch/i386/Makefile
 634.208 +--- linux-2.6.7/arch/i386/Makefile	Fri Jun 18 22:51:10 2004
 634.209 ++++ linux-2.6.7-mod/arch/i386/Makefile	Sat Jun 19 12:49:43 2004
 634.210 +@@ -141,10 +141,10 @@
 634.211 + prepare: include/asm-$(ARCH)/asm_offsets.h
 634.212 + CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
 634.213 + 
 634.214 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 634.215 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 634.216 + 				   include/config/MARKER
 634.217 + 
 634.218 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 634.219 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
 634.220 + 	$(call filechk,gen-asm-offsets)
 634.221 + 
 634.222 + archclean:
 634.223 +diff -ur linux-2.6.7/arch/i386/kernel/Makefile linux-2.6.7-mod/arch/i386/kernel/Makefile
 634.224 +--- linux-2.6.7/arch/i386/kernel/Makefile	Mon May 10 04:32:02 2004
 634.225 ++++ linux-2.6.7-mod/arch/i386/kernel/Makefile	Sat Jun 19 12:49:54 2004
 634.226 +@@ -2,7 +2,7 @@
 634.227 + # Makefile for the linux kernel.
 634.228 + #
 634.229 + 
 634.230 +-extra-y := head.o init_task.o vmlinux.lds.s
 634.231 ++extra-y := head.o init_task.o vmlinux.lds.asm
 634.232 + 
 634.233 + obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
 634.234 + 		ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \
 634.235 +diff -ur linux-2.6.7/arch/ia64/Makefile linux-2.6.7-mod/arch/ia64/Makefile
 634.236 +--- linux-2.6.7/arch/ia64/Makefile	Mon May 10 04:31:59 2004
 634.237 ++++ linux-2.6.7-mod/arch/ia64/Makefile	Sat Jun 19 12:50:12 2004
 634.238 +@@ -88,12 +88,12 @@
 634.239 + 
 634.240 + prepare: include/asm-ia64/offsets.h
 634.241 + 
 634.242 +-arch/ia64/kernel/asm-offsets.s: include/asm include/linux/version.h include/config/MARKER
 634.243 ++arch/ia64/kernel/asm-offsets.asm: include/asm include/linux/version.h include/config/MARKER
 634.244 + 
 634.245 +-include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.s
 634.246 ++include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.asm
 634.247 + 	$(call filechk,gen-asm-offsets)
 634.248 + 
 634.249 +-arch/ia64/kernel/asm-offsets.s: include/asm-ia64/.offsets.h.stamp
 634.250 ++arch/ia64/kernel/asm-offsets.asm: include/asm-ia64/.offsets.h.stamp
 634.251 + 
 634.252 + include/asm-ia64/.offsets.h.stamp:
 634.253 + 	mkdir -p include/asm-ia64
 634.254 +diff -ur linux-2.6.7/arch/ia64/kernel/Makefile linux-2.6.7-mod/arch/ia64/kernel/Makefile
 634.255 +--- linux-2.6.7/arch/ia64/kernel/Makefile	Fri Jun 18 22:51:13 2004
 634.256 ++++ linux-2.6.7-mod/arch/ia64/kernel/Makefile	Sat Jun 19 12:52:14 2004
 634.257 +@@ -2,7 +2,7 @@
 634.258 + # Makefile for the linux kernel.
 634.259 + #
 634.260 + 
 634.261 +-extra-y	:= head.o init_task.o vmlinux.lds.s
 634.262 ++extra-y	:= head.o init_task.o vmlinux.lds.asm
 634.263 + 
 634.264 + obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o	\
 634.265 + 	 irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o		\
 634.266 +@@ -21,7 +21,7 @@
 634.267 + # The gate DSO image is built using a special linker script.
 634.268 + targets += gate.so gate-syms.o
 634.269 + 
 634.270 +-extra-y += gate.so gate-syms.o gate.lds.s gate.o
 634.271 ++extra-y += gate.so gate-syms.o gate.lds.asm gate.o
 634.272 + 
 634.273 + # fp_emulate() expects f2-f5,f16-f31 to contain the user-level state.
 634.274 + CFLAGS_traps.o  += -mfixed-range=f2-f5,f16-f31
 634.275 +@@ -32,14 +32,14 @@
 634.276 +       cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
 634.277 + 
 634.278 + GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1
 634.279 +-$(obj)/gate.so: $(obj)/gate.lds.s $(obj)/gate.o FORCE
 634.280 ++$(obj)/gate.so: $(obj)/gate.lds.asm $(obj)/gate.o FORCE
 634.281 + 	$(call if_changed,gate)
 634.282 + 
 634.283 + $(obj)/built-in.o: $(obj)/gate-syms.o
 634.284 + $(obj)/built-in.o: ld_flags += -R $(obj)/gate-syms.o
 634.285 + 
 634.286 + GATECFLAGS_gate-syms.o = -r
 634.287 +-$(obj)/gate-syms.o: $(src)/gate.lds.s $(obj)/gate.o FORCE
 634.288 ++$(obj)/gate-syms.o: $(src)/gate.lds.asm $(obj)/gate.o FORCE
 634.289 + 	$(call if_changed,gate)
 634.290 + 
 634.291 + # gate-data.o contains the gate DSO image as data in section .data.gate.
 634.292 +diff -ur linux-2.6.7/arch/m68k/Makefile linux-2.6.7-mod/arch/m68k/Makefile
 634.293 +--- linux-2.6.7/arch/m68k/Makefile	Fri Jun 18 22:51:14 2004
 634.294 ++++ linux-2.6.7-mod/arch/m68k/Makefile	Sat Jun 19 12:52:30 2004
 634.295 +@@ -114,10 +114,10 @@
 634.296 + prepare: include/asm-$(ARCH)/offsets.h
 634.297 + CLEAN_FILES += include/asm-$(ARCH)/offsets.h
 634.298 + 
 634.299 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 634.300 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 634.301 + 				   include/config/MARKER
 634.302 + 
 634.303 +-include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 634.304 ++include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
 634.305 + 	$(call filechk,gen-asm-offsets)
 634.306 + 
 634.307 + archclean:
 634.308 +diff -ur linux-2.6.7/arch/m68k/kernel/Makefile linux-2.6.7-mod/arch/m68k/kernel/Makefile
 634.309 +--- linux-2.6.7/arch/m68k/kernel/Makefile	Mon May 10 04:33:10 2004
 634.310 ++++ linux-2.6.7-mod/arch/m68k/kernel/Makefile	Sat Jun 19 12:52:35 2004
 634.311 +@@ -7,7 +7,7 @@
 634.312 + else
 634.313 +   extra-y := sun3-head.o
 634.314 + endif
 634.315 +-extra-y	+= vmlinux.lds.s
 634.316 ++extra-y	+= vmlinux.lds.asm
 634.317 + 
 634.318 + obj-y		:= entry.o process.o traps.o ints.o signal.o ptrace.o \
 634.319 + 			sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o
 634.320 +diff -ur linux-2.6.7/arch/m68knommu/Makefile linux-2.6.7-mod/arch/m68knommu/Makefile
 634.321 +--- linux-2.6.7/arch/m68knommu/Makefile	Mon May 10 04:32:54 2004
 634.322 ++++ linux-2.6.7-mod/arch/m68knommu/Makefile	Sat Jun 19 12:52:57 2004
 634.323 +@@ -89,7 +89,7 @@
 634.324 + head-y := arch/m68knommu/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o
 634.325 + 
 634.326 + CLEAN_FILES := include/asm-$(ARCH)/asm-offsets.h \
 634.327 +-	       arch/$(ARCH)/kernel/asm-offsets.s
 634.328 ++	       arch/$(ARCH)/kernel/asm-offsets.asm
 634.329 + 
 634.330 + core-y	+= arch/m68knommu/kernel/ \
 634.331 + 	   arch/m68knommu/mm/ \
 634.332 +@@ -102,7 +102,7 @@
 634.333 + archclean:
 634.334 + 	$(call descend arch/$(ARCH)/boot, subdirclean)
 634.335 + 
 634.336 +-include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
 634.337 ++include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm \
 634.338 + 				   include/asm include/linux/version.h \
 634.339 + 				   include/config/MARKER
 634.340 + 	$(call filechk,gen-asm-offsets)
 634.341 +diff -ur linux-2.6.7/arch/m68knommu/kernel/Makefile linux-2.6.7-mod/arch/m68knommu/kernel/Makefile
 634.342 +--- linux-2.6.7/arch/m68knommu/kernel/Makefile	Mon May 10 04:32:26 2004
 634.343 ++++ linux-2.6.7-mod/arch/m68knommu/kernel/Makefile	Sat Jun 19 12:53:20 2004
 634.344 +@@ -2,7 +2,7 @@
 634.345 + # Makefile for arch/m68knommu/kernel.
 634.346 + #
 634.347 + 
 634.348 +-extra-y := vmlinux.lds.s
 634.349 ++extra-y := vmlinux.lds.asm
 634.350 + 
 634.351 + obj-y += dma.o entry.o init_task.o m68k_ksyms.o process.o ptrace.o semaphore.o \
 634.352 + 	 setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
 634.353 +diff -ur linux-2.6.7/arch/mips/Makefile linux-2.6.7-mod/arch/mips/Makefile
 634.354 +--- linux-2.6.7/arch/mips/Makefile	Fri Jun 18 22:51:19 2004
 634.355 ++++ linux-2.6.7-mod/arch/mips/Makefile	Sat Jun 19 12:53:35 2004
 634.356 +@@ -752,12 +752,12 @@
 634.357 + prepare: include/asm-$(ARCH)/offset.h \
 634.358 + 	 include/asm-$(ARCH)/reg.h
 634.359 + 
 634.360 +-arch/$(ARCH)/kernel/offset.s: include/asm include/linux/version.h \
 634.361 ++arch/$(ARCH)/kernel/offset.asm: include/asm include/linux/version.h \
 634.362 + 				   include/config/MARKER
 634.363 + 
 634.364 +-include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.s
 634.365 ++include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.asm
 634.366 + 	$(call filechk,gen-asm-offset.h)
 634.367 +-include/asm-$(ARCH)/reg.h: arch/$(ARCH)/kernel/reg.s
 634.368 ++include/asm-$(ARCH)/reg.h: arch/$(ARCH)/kernel/reg.asm
 634.369 + 	$(call filechk,gen-asm-reg.h)
 634.370 + 
 634.371 + CLEAN_FILES += include/asm-$(ARCH)/offset.h.tmp \
 634.372 +diff -ur linux-2.6.7/arch/mips/kernel/Makefile linux-2.6.7-mod/arch/mips/kernel/Makefile
 634.373 +--- linux-2.6.7/arch/mips/kernel/Makefile	Mon May 10 04:32:28 2004
 634.374 ++++ linux-2.6.7-mod/arch/mips/kernel/Makefile	Sat Jun 19 12:53:41 2004
 634.375 +@@ -2,7 +2,7 @@
 634.376 + # Makefile for the Linux/MIPS kernel.
 634.377 + #
 634.378 + 
 634.379 +-extra-y		:= head.o init_task.o vmlinux.lds.s
 634.380 ++extra-y		:= head.o init_task.o vmlinux.lds.asm
 634.381 + 
 634.382 + obj-y		+= cpu-probe.o branch.o entry.o genex.o irq.o process.o \
 634.383 + 		   ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \
 634.384 +diff -ur linux-2.6.7/arch/parisc/Makefile linux-2.6.7-mod/arch/parisc/Makefile
 634.385 +--- linux-2.6.7/arch/parisc/Makefile	Fri Jun 18 22:51:21 2004
 634.386 ++++ linux-2.6.7-mod/arch/parisc/Makefile	Sat Jun 19 12:53:47 2004
 634.387 +@@ -88,10 +88,10 @@
 634.388 + 
 634.389 + prepare: include/asm-parisc/offsets.h
 634.390 + 
 634.391 +-arch/parisc/kernel/asm-offsets.s: include/asm include/linux/version.h \
 634.392 ++arch/parisc/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 634.393 + 				   include/config/MARKER
 634.394 + 
 634.395 +-include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.s
 634.396 ++include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.asm
 634.397 + 	$(call filechk,gen-asm-offsets)
 634.398 + 
 634.399 + CLEAN_FILES	+= lifimage include/asm-parisc/offsets.h
 634.400 +diff -ur linux-2.6.7/arch/parisc/kernel/Makefile linux-2.6.7-mod/arch/parisc/kernel/Makefile
 634.401 +--- linux-2.6.7/arch/parisc/kernel/Makefile	Fri Jun 18 22:51:21 2004
 634.402 ++++ linux-2.6.7-mod/arch/parisc/kernel/Makefile	Sat Jun 19 12:53:53 2004
 634.403 +@@ -4,7 +4,7 @@
 634.404 + 
 634.405 + head-y			:= head.o
 634.406 + head-$(CONFIG_PARISC64)	:= head64.o
 634.407 +-extra-y			:= init_task.o $(head-y) vmlinux.lds.s
 634.408 ++extra-y			:= init_task.o $(head-y) vmlinux.lds.asm
 634.409 + 
 634.410 + AFLAGS_entry.o	:= -traditional
 634.411 + AFLAGS_pacache.o := -traditional
 634.412 +diff -ur linux-2.6.7/arch/ppc/Makefile linux-2.6.7-mod/arch/ppc/Makefile
 634.413 +--- linux-2.6.7/arch/ppc/Makefile	Fri Jun 18 22:51:22 2004
 634.414 ++++ linux-2.6.7-mod/arch/ppc/Makefile	Sat Jun 19 12:54:09 2004
 634.415 +@@ -78,10 +78,10 @@
 634.416 + 
 634.417 + prepare: include/asm-$(ARCH)/offsets.h checkbin
 634.418 + 
 634.419 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 634.420 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 634.421 + 				   include/config/MARKER
 634.422 + 
 634.423 +-include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 634.424 ++include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
 634.425 + 	$(call filechk,gen-asm-offsets)
 634.426 + 
 634.427 + ifdef CONFIG_6xx
 634.428 +@@ -104,4 +104,4 @@
 634.429 + endif
 634.430 + 
 634.431 + CLEAN_FILES +=	include/asm-$(ARCH)/offsets.h \
 634.432 +-		arch/$(ARCH)/kernel/asm-offsets.s
 634.433 ++		arch/$(ARCH)/kernel/asm-offsets.asm
 634.434 +diff -ur linux-2.6.7/arch/ppc/kernel/Makefile linux-2.6.7-mod/arch/ppc/kernel/Makefile
 634.435 +--- linux-2.6.7/arch/ppc/kernel/Makefile	Fri Jun 18 22:51:24 2004
 634.436 ++++ linux-2.6.7-mod/arch/ppc/kernel/Makefile	Sat Jun 19 12:43:10 2004
 634.437 +@@ -15,7 +15,7 @@
 634.438 + extra-$(CONFIG_8xx)		:= head_8xx.o
 634.439 + extra-$(CONFIG_6xx)		+= idle_6xx.o
 634.440 + extra-$(CONFIG_POWER4)		+= idle_power4.o
 634.441 +-extra-y				+= vmlinux.lds.s
 634.442 ++extra-y				+= vmlinux.lds.asm
 634.443 + 
 634.444 + obj-y				:= entry.o traps.o irq.o idle.o time.o misc.o \
 634.445 + 					process.o signal.o ptrace.o align.o \
 634.446 +diff -ur linux-2.6.7/arch/ppc64/Makefile linux-2.6.7-mod/arch/ppc64/Makefile
 634.447 +--- linux-2.6.7/arch/ppc64/Makefile	Fri Jun 18 22:51:26 2004
 634.448 ++++ linux-2.6.7-mod/arch/ppc64/Makefile	Sat Jun 19 12:54:32 2004
 634.449 +@@ -67,10 +67,10 @@
 634.450 + 
 634.451 + prepare: include/asm-ppc64/offsets.h
 634.452 + 
 634.453 +-arch/ppc64/kernel/asm-offsets.s: include/asm include/linux/version.h \
 634.454 ++arch/ppc64/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 634.455 + 				   include/config/MARKER
 634.456 + 
 634.457 +-include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s
 634.458 ++include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.asm
 634.459 + 	$(call filechk,gen-asm-offsets)
 634.460 + 
 634.461 + define archhelp
 634.462 +diff -ur linux-2.6.7/arch/ppc64/kernel/Makefile linux-2.6.7-mod/arch/ppc64/kernel/Makefile
 634.463 +--- linux-2.6.7/arch/ppc64/kernel/Makefile	Mon May 10 04:33:20 2004
 634.464 ++++ linux-2.6.7-mod/arch/ppc64/kernel/Makefile	Sat Jun 19 12:54:39 2004
 634.465 +@@ -3,7 +3,7 @@
 634.466 + #
 634.467 + 
 634.468 + EXTRA_CFLAGS	+= -mno-minimal-toc
 634.469 +-extra-y		:= head.o vmlinux.lds.s
 634.470 ++extra-y		:= head.o vmlinux.lds.asm
 634.471 + 
 634.472 + obj-y               :=	setup.o entry.o traps.o irq.o idle.o dma.o \
 634.473 + 			time.o process.o signal.o syscalls.o misc.o ptrace.o \
 634.474 +diff -ur linux-2.6.7/arch/s390/Makefile linux-2.6.7-mod/arch/s390/Makefile
 634.475 +--- linux-2.6.7/arch/s390/Makefile	Mon May 10 04:32:02 2004
 634.476 ++++ linux-2.6.7-mod/arch/s390/Makefile	Sat Jun 19 12:54:46 2004
 634.477 +@@ -68,10 +68,10 @@
 634.478 + 
 634.479 + prepare: include/asm-$(ARCH)/offsets.h
 634.480 + 
 634.481 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 634.482 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 634.483 + 				   include/config/MARKER
 634.484 + 
 634.485 +-include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 634.486 ++include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
 634.487 + 	$(call filechk,gen-asm-offsets)
 634.488 + 
 634.489 + CLEAN_FILES += include/asm-$(ARCH)/offsets.h
 634.490 +diff -ur linux-2.6.7/arch/s390/kernel/Makefile linux-2.6.7-mod/arch/s390/kernel/Makefile
 634.491 +--- linux-2.6.7/arch/s390/kernel/Makefile	Mon May 10 04:33:20 2004
 634.492 ++++ linux-2.6.7-mod/arch/s390/kernel/Makefile	Sat Jun 19 12:54:52 2004
 634.493 +@@ -10,7 +10,7 @@
 634.494 + 
 634.495 + extra-$(CONFIG_ARCH_S390_31)	+= head.o 
 634.496 + extra-$(CONFIG_ARCH_S390X)	+= head64.o 
 634.497 +-extra-y				+= init_task.o vmlinux.lds.s
 634.498 ++extra-y				+= init_task.o vmlinux.lds.asm
 634.499 + 
 634.500 + obj-$(CONFIG_MODULES)		+= s390_ksyms.o module.o
 634.501 + obj-$(CONFIG_SMP)		+= smp.o
 634.502 +diff -ur linux-2.6.7/arch/sh/kernel/Makefile linux-2.6.7-mod/arch/sh/kernel/Makefile
 634.503 +--- linux-2.6.7/arch/sh/kernel/Makefile	Mon May 10 04:32:39 2004
 634.504 ++++ linux-2.6.7-mod/arch/sh/kernel/Makefile	Sat Jun 19 12:55:33 2004
 634.505 +@@ -2,7 +2,7 @@
 634.506 + # Makefile for the Linux/SuperH kernel.
 634.507 + #
 634.508 + 
 634.509 +-extra-y	:= head.o init_task.o vmlinux.lds.s
 634.510 ++extra-y	:= head.o init_task.o vmlinux.lds.asm
 634.511 + 
 634.512 + obj-y	:= process.o signal.o entry.o traps.o irq.o \
 634.513 + 	ptrace.o setup.o time.o sys_sh.o semaphore.o \
 634.514 +diff -ur linux-2.6.7/arch/sparc/Makefile linux-2.6.7-mod/arch/sparc/Makefile
 634.515 +--- linux-2.6.7/arch/sparc/Makefile	Fri Jun 18 22:51:29 2004
 634.516 ++++ linux-2.6.7-mod/arch/sparc/Makefile	Sat Jun 19 12:55:48 2004
 634.517 +@@ -61,14 +61,14 @@
 634.518 + 
 634.519 + prepare: include/asm-$(ARCH)/asm_offsets.h
 634.520 + 
 634.521 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 634.522 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 634.523 + 				   include/config/MARKER
 634.524 + 
 634.525 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 634.526 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
 634.527 + 	$(call filechk,gen-asm-offsets)
 634.528 + 
 634.529 + CLEAN_FILES +=	include/asm-$(ARCH)/asm_offsets.h	\
 634.530 +-		arch/$(ARCH)/kernel/asm-offsets.s	\
 634.531 ++		arch/$(ARCH)/kernel/asm-offsets.asm	\
 634.532 + 		arch/$(ARCH)/boot/System.map
 634.533 + 
 634.534 + # Don't use tabs in echo arguments.
 634.535 +diff -ur linux-2.6.7/arch/sparc/kernel/Makefile linux-2.6.7-mod/arch/sparc/kernel/Makefile
 634.536 +--- linux-2.6.7/arch/sparc/kernel/Makefile	Mon May 10 04:33:13 2004
 634.537 ++++ linux-2.6.7-mod/arch/sparc/kernel/Makefile	Sat Jun 19 12:55:52 2004
 634.538 +@@ -2,7 +2,7 @@
 634.539 + # Makefile for the linux kernel.
 634.540 + #
 634.541 + 
 634.542 +-extra-y		:= head.o init_task.o vmlinux.lds.s
 634.543 ++extra-y		:= head.o init_task.o vmlinux.lds.asm
 634.544 + 
 634.545 + EXTRA_AFLAGS	:= -ansi
 634.546 + 
 634.547 +diff -ur linux-2.6.7/arch/sparc64/kernel/Makefile linux-2.6.7-mod/arch/sparc64/kernel/Makefile
 634.548 +--- linux-2.6.7/arch/sparc64/kernel/Makefile	Mon May 10 04:32:02 2004
 634.549 ++++ linux-2.6.7-mod/arch/sparc64/kernel/Makefile	Sat Jun 19 12:56:24 2004
 634.550 +@@ -5,7 +5,7 @@
 634.551 + EXTRA_AFLAGS := -ansi
 634.552 + EXTRA_CFLAGS := -Werror
 634.553 + 
 634.554 +-extra-y		:= head.o init_task.o vmlinux.lds.s
 634.555 ++extra-y		:= head.o init_task.o vmlinux.lds.asm
 634.556 + 
 634.557 + obj-y		:= process.o setup.o cpu.o idprom.o \
 634.558 + 		   traps.o devices.o auxio.o \
 634.559 +diff -ur linux-2.6.7/arch/um/Makefile linux-2.6.7-mod/arch/um/Makefile
 634.560 +--- linux-2.6.7/arch/um/Makefile	Mon May 10 04:32:52 2004
 634.561 ++++ linux-2.6.7-mod/arch/um/Makefile	Sat Jun 19 12:57:07 2004
 634.562 +@@ -77,7 +77,7 @@
 634.563 + # CONFIG_MODE_SKAS + CONFIG_STATIC_LINK case.
 634.564 + 
 634.565 + LINK_TT = -static
 634.566 +-LD_SCRIPT_TT := uml.lds.s
 634.567 ++LD_SCRIPT_TT := uml.lds.asm
 634.568 + 
 634.569 + ifeq ($(CONFIG_STATIC_LINK),y)
 634.570 +   LINK-y += $(LINK_TT)
 634.571 +@@ -103,11 +103,11 @@
 634.572 + 	-DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE_TT) \
 634.573 + 	-DKERNEL_STACK_SIZE=$(STACK_SIZE)
 634.574 + 
 634.575 +-AFLAGS_$(LD_SCRIPT-y:.s=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
 634.576 ++AFLAGS_$(LD_SCRIPT-y:.asm=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
 634.577 + 
 634.578 + LD_SCRIPT-y := $(ARCH_DIR)/$(LD_SCRIPT-y)
 634.579 + 
 634.580 +-$(LD_SCRIPT-y) : $(LD_SCRIPT-y:.s=.S) scripts FORCE
 634.581 ++$(LD_SCRIPT-y) : $(LD_SCRIPT-y:.asm=.S) scripts FORCE
 634.582 + 	$(call if_changed_dep,as_s_S)
 634.583 + 
 634.584 + linux: vmlinux $(LD_SCRIPT-y)
 634.585 +@@ -122,8 +122,8 @@
 634.586 + # To get a definition of F_SETSIG
 634.587 + USER_CFLAGS += -D_GNU_SOURCE
 634.588 + 
 634.589 +-CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds.s \
 634.590 +-	$(ARCH_DIR)/dyn_link.ld.s $(GEN_HEADERS)
 634.591 ++CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds.asm \
 634.592 ++	$(ARCH_DIR)/dyn_link.ld.asm $(GEN_HEADERS)
 634.593 + 
 634.594 + $(ARCH_DIR)/main.o: $(ARCH_DIR)/main.c
 634.595 + 	$(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
 634.596 +diff -ur linux-2.6.7/arch/um/kernel/Makefile linux-2.6.7-mod/arch/um/kernel/Makefile
 634.597 +--- linux-2.6.7/arch/um/kernel/Makefile	Mon May 10 04:32:53 2004
 634.598 ++++ linux-2.6.7-mod/arch/um/kernel/Makefile	Sat Jun 19 12:57:15 2004
 634.599 +@@ -3,7 +3,7 @@
 634.600 + # Licensed under the GPL
 634.601 + #
 634.602 + 
 634.603 +-extra-y := vmlinux.lds.s
 634.604 ++extra-y := vmlinux.lds.asm
 634.605 + 
 634.606 + obj-y = checksum.o config.o exec_kern.o exitcode.o frame_kern.o frame.o \
 634.607 + 	helper.o init_task.o irq.o irq_user.o ksyms.o mem.o mem_user.o \
 634.608 +diff -ur linux-2.6.7/arch/v850/Makefile linux-2.6.7-mod/arch/v850/Makefile
 634.609 +--- linux-2.6.7/arch/v850/Makefile	Mon May 10 04:33:21 2004
 634.610 ++++ linux-2.6.7-mod/arch/v850/Makefile	Sat Jun 19 12:57:59 2004
 634.611 +@@ -52,12 +52,12 @@
 634.612 + prepare: include/asm-$(ARCH)/asm-consts.h
 634.613 + 
 634.614 + # Generate constants from C code for use by asm files
 634.615 +-arch/$(ARCH)/kernel/asm-consts.s: include/asm include/linux/version.h \
 634.616 ++arch/$(ARCH)/kernel/asm-consts.asm: include/asm include/linux/version.h \
 634.617 + 				   include/config/MARKER
 634.618 + 
 634.619 +-include/asm-$(ARCH)/asm-consts.h: arch/$(ARCH)/kernel/asm-consts.s
 634.620 ++include/asm-$(ARCH)/asm-consts.h: arch/$(ARCH)/kernel/asm-consts.asm
 634.621 + 	$(call filechk,gen-asm-offsets)
 634.622 + 
 634.623 + CLEAN_FILES += include/asm-$(ARCH)/asm-consts.h \
 634.624 +-	       arch/$(ARCH)/kernel/asm-consts.s \
 634.625 ++	       arch/$(ARCH)/kernel/asm-consts.asm \
 634.626 + 	       root_fs_image.o
 634.627 +diff -ur linux-2.6.7/arch/v850/kernel/Makefile linux-2.6.7-mod/arch/v850/kernel/Makefile
 634.628 +--- linux-2.6.7/arch/v850/kernel/Makefile	Mon May 10 04:33:21 2004
 634.629 ++++ linux-2.6.7-mod/arch/v850/kernel/Makefile	Sat Jun 19 12:58:04 2004
 634.630 +@@ -9,7 +9,7 @@
 634.631 + # for more details.
 634.632 + #
 634.633 + 
 634.634 +-extra-y := head.o init_task.o vmlinux.lds.s
 634.635 ++extra-y := head.o init_task.o vmlinux.lds.asm
 634.636 + 
 634.637 + obj-y += intv.o entry.o process.o syscalls.o time.o semaphore.o setup.o \
 634.638 + 	 signal.o irq.o mach.o ptrace.o bug.o
 634.639 +diff -ur linux-2.6.7/arch/x86_64/Makefile linux-2.6.7-mod/arch/x86_64/Makefile
 634.640 +--- linux-2.6.7/arch/x86_64/Makefile	Mon May 10 04:33:19 2004
 634.641 ++++ linux-2.6.7-mod/arch/x86_64/Makefile	Sat Jun 19 12:58:10 2004
 634.642 +@@ -93,10 +93,10 @@
 634.643 + 
 634.644 + prepare: include/asm-$(ARCH)/offset.h
 634.645 + 
 634.646 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 634.647 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
 634.648 + 				   include/config/MARKER
 634.649 + 
 634.650 +-include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.s
 634.651 ++include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.asm
 634.652 + 	$(call filechk,gen-asm-offsets)
 634.653 + 
 634.654 + CLEAN_FILES += include/asm-$(ARCH)/offset.h
 634.655 +diff -ur linux-2.6.7/arch/x86_64/kernel/Makefile linux-2.6.7-mod/arch/x86_64/kernel/Makefile
 634.656 +--- linux-2.6.7/arch/x86_64/kernel/Makefile	Fri Jun 18 22:51:32 2004
 634.657 ++++ linux-2.6.7-mod/arch/x86_64/kernel/Makefile	Sat Jun 19 12:58:17 2004
 634.658 +@@ -2,7 +2,7 @@
 634.659 + # Makefile for the linux kernel.
 634.660 + #
 634.661 + 
 634.662 +-extra-y 	:= head.o head64.o init_task.o vmlinux.lds.s
 634.663 ++extra-y 	:= head.o head64.o init_task.o vmlinux.lds.asm
 634.664 + EXTRA_AFLAGS	:= -traditional
 634.665 + obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o \
 634.666 + 		ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \
 634.667 +diff -ur linux-2.6.7/scripts/Makefile.build linux-2.6.7-mod/scripts/Makefile.build
 634.668 +--- linux-2.6.7/scripts/Makefile.build	Mon May 10 04:33:13 2004
 634.669 ++++ linux-2.6.7-mod/scripts/Makefile.build	Sat Jun 19 12:43:10 2004
 634.670 +@@ -110,7 +110,7 @@
 634.671 + quiet_cmd_cc_s_c = CC $(quiet_modtag)  $@
 634.672 + cmd_cc_s_c       = $(CC) $(c_flags) -S -o $@ $< 
 634.673 + 
 634.674 +-%.s: %.c FORCE
 634.675 ++%.asm: %.c FORCE
 634.676 + 	$(call if_changed_dep,cc_s_c)
 634.677 + 
 634.678 + quiet_cmd_cc_i_c = CPP $(quiet_modtag) $@
 634.679 +@@ -197,7 +197,7 @@
 634.680 + quiet_cmd_as_s_S = CPP $(quiet_modtag) $@
 634.681 + cmd_as_s_S       = $(CPP) $(a_flags)   -o $@ $< 
 634.682 + 
 634.683 +-%.s: %.S FORCE
 634.684 ++%.asm: %.S FORCE
 634.685 + 	$(call if_changed_dep,as_s_S)
 634.686 + 
 634.687 + quiet_cmd_as_o_S = AS $(quiet_modtag)  $@
 634.688 +--- linux-2.6.8/arch/sparc/boot/Makefile.old	2004-09-21 21:46:18.000000000 -0700
 634.689 ++++ linux-2.6.8/arch/sparc/boot/Makefile	2004-09-21 21:52:35.000000000 -0700
 634.690 +@@ -19,7 +19,7 @@
 634.691 + 
 634.692 + BTOBJS := $(HEAD_Y) $(INIT_Y)
 634.693 + BTLIBS := $(CORE_Y) $(LIBS_Y) $(DRIVERS_Y) $(NET_Y)
 634.694 +-LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds.s $(BTOBJS) --start-group $(BTLIBS) --end-group $(kallsyms.o)
 634.695 ++LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds.asm $(BTOBJS) --start-group $(BTLIBS) --end-group $(kallsyms.o)
 634.696 + 
 634.697 + # Actual linking
 634.698 + $(obj)/image: $(obj)/btfix.o FORCE
 634.699 +--- linux-2.6.8/arch/sh64/Makefile.old	2004-09-21 21:46:18.000000000 -0700
 634.700 ++++ linux-2.6.8/arch/sh64/Makefile	2004-09-21 21:54:31.000000000 -0700
 634.701 +@@ -71,7 +71,7 @@
 634.702 + 
 634.703 + prepare: include/asm-$(ARCH)/asm-offsets.h arch/$(ARCH)/lib/syscalltab.h
 634.704 + 
 634.705 +-include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
 634.706 ++include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm \
 634.707 + 				   include/asm include/linux/version.h
 634.708 + 	$(call filechk,gen-asm-offsets)
 634.709 + 
 634.710 +--- linux-2.6.8/arch/sh64/boot/compressed/Makefile.old	2004-09-21 21:46:18.000000000 -0700
 634.711 ++++ linux-2.6.8/arch/sh64/boot/compressed/Makefile	2004-09-21 21:54:41.000000000 -0700
 634.712 +@@ -25,7 +25,7 @@
 634.713 + ZIMAGE_OFFSET = $(shell printf "0x%8x" $$[$(CONFIG_MEMORY_START)+0x400000+0x10000])
 634.714 + 
 634.715 + LDFLAGS_vmlinux := -Ttext $(ZIMAGE_OFFSET) -e startup \
 634.716 +-		    -T $(obj)/../../kernel/vmlinux.lds.s \
 634.717 ++		    -T $(obj)/../../kernel/vmlinux.lds.asm \
 634.718 + 		    --no-warn-mismatch
 634.719 + 
 634.720 + $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
 634.721 +@@ -41,6 +41,6 @@
 634.722 + LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh64-linux -T
 634.723 + OBJCOPYFLAGS += -R .empty_zero_page
 634.724 + 
 634.725 +-$(obj)/piggy.o: $(obj)/vmlinux.lds.s $(obj)/vmlinux.bin.gz FORCE
 634.726 ++$(obj)/piggy.o: $(obj)/vmlinux.lds.asm $(obj)/vmlinux.bin.gz FORCE
 634.727 + 	$(call if_changed,ld)
 634.728 + 
   635.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   635.2 +++ b/patches/linux/2.6.8/linux-2.6.8-m68k-kludge.patch	Sat Feb 24 11:00:05 2007 +0000
   635.3 @@ -0,0 +1,285 @@
   635.4 +[ This patch not accepted into kernel for now - it touches the core too much -
   635.5 +  but it's ok for crosstool since we just want to check whether toolchain is ok,
   635.6 +  I think.    I had to rediff the sched.h changes with -U5 to get them to
   635.7 +  apply properly -- patch got confused with just three lines of context?!  -dank ]
   635.8 +
   635.9 +Date: Sun, 5 Sep 2004 12:41:08 +0200 (CEST)
  635.10 +From: Geert Uytterhoeven <geert@linux-m68k.org>
  635.11 +Sender: geert@linux-m68k.org
  635.12 +To: Dan Kegel <dank@kegel.com>
  635.13 +cc: Roman Zippel <zippel@linux-m68k.org>,
  635.14 +  Matthias Urlichs <smurf@smurf.noris.de>,
  635.15 +  Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
  635.16 +  Linux/m68k <linux-m68k@lists.linux-m68k.org>
  635.17 +Subject: Re: Getting kernel.org kernel to build for m68k?
  635.18 +In-Reply-To: <Pine.GSO.4.58.0409011029390.15681@waterleaf.sonytel.be>
  635.19 +Message-ID: <Pine.LNX.4.58.0409051224020.30282@anakin>
  635.20 +
  635.21 +On Wed, 1 Sep 2004, Geert Uytterhoeven wrote:
  635.22 +> On Tue, 31 Aug 2004, Dan Kegel wrote:
  635.23 +> > I noticed today that Linus's m68k kernel can't be built (at least with gcc-3.4.1).
  635.24 +> >
  635.25 +> > The first problem I ran into,
  635.26 +> >    CC      arch/m68k/kernel/asm-offsets.s
  635.27 +> >    In file included from include/linux/spinlock.h:12,
  635.28 +> >                   from include/linux/capability.h:45,
  635.29 +> >                   from include/linux/sched.h:7,
  635.30 +> >                   from arch/m68k/kernel/asm-offsets.c:12:
  635.31 +> >    include/linux/thread_info.h:30: error: parse error before '{' token
  635.32 +> > is solved already in the m68k tree.
  635.33 +> > (In particular,
  635.34 +> > the #ifndef __HAVE_THREAD_FUNCTIONS ... #endif in
  635.35 +> > http://linux-m68k-cvs.apia.dhs.org/c/cvsweb/linux/include/linux/thread_info.h?rev=1.5;content-type=text%2Fplain
  635.36 +> > probably solves it.)
  635.37 +> > There are other problems after that.
  635.38 +>
  635.39 +> Roman Zippel changed the threading stuff on m68k. Since it would affect other
  635.40 +> architectures, I never submitted it on my own.
  635.41 +>
  635.42 +> In short, we never really compile this code, since the m68k tree doesn't use it
  635.43 +> anymore. And yes, it even fails with older compiler versions, like 2.95.2.
  635.44 +
  635.45 +The second part doesn't seem to be true: the code is used. And it does compile
  635.46 +after applying the fixes below, even with gcc 3.4.1.
  635.47 +
  635.48 +> > Any chance you could spend a bit of time sending Linus enough
  635.49 +> > patches for his kernel to build for m68k, if not run?
  635.50 +>
  635.51 +> I'll make sure a plain kernel.org kernel can build an m68k kernel.
  635.52 +
  635.53 +The patch below makes the plain kernel.org 2.6.8.1 compile for m68k,
  635.54 +using gcc 2.95.2 or 3.3.3 (3.4.1 needs a few more changes in random
  635.55 +places). The resulting kernel (I booted the gcc 2.95.2 case) works fine on my
  635.56 +Amiga.
  635.57 +
  635.58 +It's more or less the patch created by Matthias Urlichs last year, so
  635.59 +the credits are his:
  635.60 +
  635.61 +| This change implements a reasonable compromise between the task_info->flags
  635.62 +| variable in other ports, which is too much work in the syscall path on m68k,
  635.63 +| and moving the whole structure to thread_struct, which is way too intrusive
  635.64 +| on other ports.
  635.65 +
  635.66 +The patch does affect generic code a bit, but the collateral damage is
  635.67 +kept to a minimum.
  635.68 +
  635.69 +We can still keep Roman's thread info abstractions[*] in Linux/m68k CVS, but
  635.70 +I'd really like the plain kernel.org kernel to be in a working state as well.
  635.71 +That way more people may do cross-compile tests for m68k.
  635.72 +
  635.73 +Hence if no one objects, I'll submit the patch to Andrew and Linus.
  635.74 +
  635.75 +All comments are welcome!
  635.76 +
  635.77 +--- linux-2.6.8.1/arch/m68k/kernel/asm-offsets.c	2004-04-28 15:48:59.000000000 +0200
  635.78 ++++ linux-m68k-2.6.8.1/arch/m68k/kernel/asm-offsets.c	2004-09-05 12:04:00.000000000 +0200
  635.79 +@@ -31,6 +31,7 @@ int main(void)
  635.80 + 	DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, thread.work.sigpending));
  635.81 + 	DEFINE(TASK_NOTIFY_RESUME, offsetof(struct task_struct, thread.work.notify_resume));
  635.82 + 	DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
  635.83 ++	DEFINE(TASK_TINFO, offsetof(struct task_struct, thread_info));
  635.84 + 	DEFINE(TASK_MM, offsetof(struct task_struct, mm));
  635.85 + 	DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
  635.86 +
  635.87 +@@ -45,6 +46,9 @@ int main(void)
  635.88 + 	DEFINE(THREAD_FPCNTL, offsetof(struct thread_struct, fpcntl));
  635.89 + 	DEFINE(THREAD_FPSTATE, offsetof(struct thread_struct, fpstate));
  635.90 +
  635.91 ++	/* offsets into the thread_info struct */
  635.92 ++	DEFINE(TINFO_PREEMPT, offsetof(struct thread_info, preempt_count));
  635.93 ++
  635.94 + 	/* offsets into the pt_regs */
  635.95 + 	DEFINE(PT_D0, offsetof(struct pt_regs, d0));
  635.96 + 	DEFINE(PT_ORIG_D0, offsetof(struct pt_regs, orig_d0));
  635.97 +--- linux-2.6.8.1/arch/m68k/kernel/entry.S	2004-05-24 11:13:22.000000000 +0200
  635.98 ++++ linux-m68k-2.6.8.1/arch/m68k/kernel/entry.S	2004-09-02 20:13:12.000000000 +0200
  635.99 +@@ -134,13 +134,13 @@ ENTRY(system_call)
 635.100 +
 635.101 + syscall_exit_work:
 635.102 + 	btst	#5,%sp@(PT_SR)		| check if returning to kernel
 635.103 +-	bnes	1b			| if so, skip resched, signals
 635.104 ++	bnes	1b			| if so, skip everything
 635.105 + 	tstw	%d0
 635.106 +-	jeq	do_signal_return
 635.107 ++	jeq	do_signal_return | jump if only sig_pending or notify_resume
 635.108 + 	tstb	%d0
 635.109 +-	jne	do_delayed_trace
 635.110 ++	jne	do_delayed_trace | jump if delayed_trace
 635.111 +
 635.112 +-	pea	resume_userspace
 635.113 ++	pea	resume_userspace | need_resched is set
 635.114 + 	jmp	schedule
 635.115 +
 635.116 + ret_from_exception:
 635.117 +@@ -223,10 +223,14 @@ ENTRY(nmi_handler)
 635.118 + */
 635.119 + inthandler:
 635.120 + 	SAVE_ALL_INT
 635.121 +-	GET_CURRENT(%d0)
 635.122 +-	addqb	#1,%curptr@(TASK_INFO+TINFO_PREEMPT+2)
 635.123 +-					|  put exception # in d0
 635.124 +-	bfextu %sp@(PT_VECTOR){#4,#10},%d0
 635.125 ++	/* GET_CURRENT(%d0) */
 635.126 ++	movel	%sp,%d0
 635.127 ++	andw	#-THREAD_SIZE,%d0
 635.128 ++	movel	%d0,%a1
 635.129 ++	addqb	#1,%a1@(TINFO_PREEMPT+2)
 635.130 ++	movel	%a1@,%curptr
 635.131 ++
 635.132 ++	bfextu	%sp@(PT_VECTOR){#4,#10},%d0 |  put exception # in d0
 635.133 +
 635.134 + 	movel	%sp,%sp@-
 635.135 + 	movel	%d0,%sp@-		|  put vector # on stack
 635.136 +@@ -243,7 +247,8 @@ inthandler:
 635.137 + 3:	addql	#8,%sp			|  pop parameters off stack
 635.138 +
 635.139 + ret_from_interrupt:
 635.140 +-	subqb	#1,%curptr@(TASK_INFO+TINFO_PREEMPT+2)
 635.141 ++	movel	%curptr@(TASK_TINFO),%a1
 635.142 ++	subqb	#1,%a1@(TINFO_PREEMPT+2)
 635.143 + 	jeq	1f
 635.144 + 2:
 635.145 + 	RESTORE_ALL
 635.146 +--- linux-2.6.8.1/include/asm-m68k/processor.h	2004-04-28 15:49:03.000000000 +0200
 635.147 ++++ linux-m68k-2.6.8.1/include/asm-m68k/processor.h	2004-09-02 20:29:32.000000000 +0200
 635.148 +@@ -84,7 +84,6 @@ struct thread_struct {
 635.149 + 	ksp:	sizeof(init_stack) + (unsigned long) init_stack,	\
 635.150 + 	sr:	PS_S,							\
 635.151 + 	fs:	__KERNEL_DS,						\
 635.152 +-	info:	INIT_THREAD_INFO(init_task)				\
 635.153 + }
 635.154 +
 635.155 + /*
 635.156 +--- linux-2.6.8.1/include/asm-m68k/thread_info.h	2004-05-24 11:13:53.000000000 +0200
 635.157 ++++ linux-m68k-2.6.8.1/include/asm-m68k/thread_info.h	2004-09-05 12:19:47.000000000 +0200
 635.158 +@@ -6,7 +6,7 @@
 635.159 + #include <asm/page.h>
 635.160 +
 635.161 + struct thread_info {
 635.162 +-	struct task_struct	*task;		/* main task structure */
 635.163 ++	struct task_struct	*task;		/* main task structure, must be first! */
 635.164 + 	struct exec_domain	*exec_domain;	/* execution domain */
 635.165 + 	__s32			preempt_count; /* 0 => preemptable, <0 => BUG */
 635.166 + 	__u32 cpu; /* should always be 0 on m68k */
 635.167 +@@ -21,7 +21,8 @@ struct thread_info {
 635.168 + {						\
 635.169 + 	.task		= &tsk,			\
 635.170 + 	.exec_domain	= &default_exec_domain,	\
 635.171 +-	.restart_block = {			\
 635.172 ++	.preempt_count	= 1,			\
 635.173 ++	.restart_block	= {			\
 635.174 + 		.fn = do_no_restart_syscall,	\
 635.175 + 	},					\
 635.176 + }
 635.177 +@@ -35,10 +36,11 @@ struct thread_info {
 635.178 + #define free_thread_info(ti)  free_pages((unsigned long)(ti),1)
 635.179 + #endif /* PAGE_SHIFT == 13 */
 635.180 +
 635.181 +-//#define init_thread_info	(init_task.thread.info)
 635.182 ++#define init_thread_info	(init_thread_union.thread_info)
 635.183 + #define init_stack		(init_thread_union.stack)
 635.184 +
 635.185 +-#define current_thread_info()	(current->thread_info)
 635.186 ++register __u32 current_thread_info_reg asm("sp");
 635.187 ++#define current_thread_info()	((struct thread_info *)(current_thread_info_reg & ~0x1fff))
 635.188 +
 635.189 +
 635.190 + #define __HAVE_THREAD_FUNCTIONS
 635.191 +@@ -91,8 +93,12 @@ extern int thread_flag_fixme(void);
 635.192 + })
 635.193 +
 635.194 + #define __get_set_tsk_thread_flag(tsk, flag, val) ({	\
 635.195 +-	int __res = __get_tsk_thread_flag(tsk, flag);	\
 635.196 ++	int __res;					\
 635.197 ++	unsigned long __flags; \
 635.198 ++	local_irq_save(__flags);  \
 635.199 ++	__res = __get_tsk_thread_flag(tsk, flag);	\
 635.200 + 	__set_tsk_thread_flag(tsk, flag, val);		\
 635.201 ++	local_irq_restore(__flags);  \
 635.202 + 	__res;						\
 635.203 + })
 635.204 +
 635.205 +@@ -105,7 +111,4 @@ extern int thread_flag_fixme(void);
 635.206 + #define clear_thread_flag(flag) clear_tsk_thread_flag(current, flag)
 635.207 + #define test_thread_flag(flag) test_tsk_thread_flag(current, flag)
 635.208 +
 635.209 +-#define set_need_resched() set_thread_flag(TIF_NEED_RESCHED)
 635.210 +-#define clear_need_resched() clear_thread_flag(TIF_NEED_RESCHED)
 635.211 +-
 635.212 + #endif	/* _ASM_M68K_THREAD_INFO_H */
 635.213 +--- linux-2.6.8/include/linux/sched.h.old	2004-09-13 21:48:58.000000000 -0700
 635.214 ++++ linux-2.6.8/include/linux/sched.h	2004-09-13 21:50:26.000000000 -0700
 635.215 +@@ -975,10 +975,11 @@
 635.216 + 	task_unlock(task);
 635.217 + 
 635.218 + 	return mm;
 635.219 + }
 635.220 +  
 635.221 ++#ifndef __HAVE_THREAD_FUNCTIONS
 635.222 +  
 635.223 + /* set thread flags in other task's structures
 635.224 +  * - see asm/thread_info.h for TIF_xxxx flags available
 635.225 +  */
 635.226 + static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag)
 635.227 +@@ -1004,10 +1005,12 @@
 635.228 + static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag)
 635.229 + {
 635.230 + 	return test_ti_thread_flag(tsk->thread_info,flag);
 635.231 + }
 635.232 + 
 635.233 ++#endif	/* __HAVE_THREAD_FUNCTIONS */
 635.234 ++
 635.235 + static inline void set_tsk_need_resched(struct task_struct *tsk)
 635.236 + {
 635.237 + 	set_tsk_thread_flag(tsk,TIF_NEED_RESCHED);
 635.238 + }
 635.239 + 
 635.240 +--- linux-2.6.8.1/include/linux/thread_info.h	2004-04-27 20:42:22.000000000 +0200
 635.241 ++++ linux-m68k-2.6.8.1/include/linux/thread_info.h	2004-09-04 21:24:36.000000000 +0200
 635.242 +@@ -21,6 +21,7 @@ extern long do_no_restart_syscall(struct
 635.243 + #include <asm/thread_info.h>
 635.244 +
 635.245 + #ifdef __KERNEL__
 635.246 ++#ifndef __HAVE_THREAD_FUNCTIONS
 635.247 +
 635.248 + /*
 635.249 +  * flag set/clear/test wrappers
 635.250 +@@ -77,16 +78,11 @@ static inline int test_ti_thread_flag(st
 635.251 + 	return test_bit(flag,&ti->flags);
 635.252 + }
 635.253 +
 635.254 +-static inline void set_need_resched(void)
 635.255 +-{
 635.256 +-	set_thread_flag(TIF_NEED_RESCHED);
 635.257 +-}
 635.258 ++#endif	/* __HAVE_THREAD_FUNCTIONS */
 635.259 +
 635.260 +-static inline void clear_need_resched(void)
 635.261 +-{
 635.262 +-	clear_thread_flag(TIF_NEED_RESCHED);
 635.263 +-}
 635.264 ++#define set_need_resched() set_thread_flag(TIF_NEED_RESCHED)
 635.265 ++#define clear_need_resched(void) clear_thread_flag(TIF_NEED_RESCHED)
 635.266 +
 635.267 +-#endif
 635.268 ++#endif	/* __KERNEL__ */
 635.269 +
 635.270 + #endif /* _LINUX_THREAD_INFO_H */
 635.271 +
 635.272 +Gr{oetje,eeting}s,
 635.273 +
 635.274 +						Geert
 635.275 +
 635.276 +[*] For reference:
 635.277 +
 635.278 +    http://linux-m68k-cvs.ubb.ca/~geert/linux-m68k-2.6.x-merging/POSTPONED/156-thread_info.diff
 635.279 +
 635.280 +--
 635.281 +Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
 635.282 +
 635.283 +In personal conversations with technical people, I call myself a hacker. But
 635.284 +when I'm talking to journalists I just say "programmer" or something like that.
 635.285 +							    -- Linus Torvalds
 635.286 +
 635.287 +
 635.288 +
   636.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   636.2 +++ b/patches/linux/2.6.8/linux-2.6.8-noshared-kconfig.patch	Sat Feb 24 11:00:05 2007 +0000
   636.3 @@ -0,0 +1,28 @@
   636.4 +Lets you run 'make oldconfig' and 'make menuconfig' on systems
   636.5 +where shared libraries aren't easy.  (There's no harm in using the
   636.6 +static version of libkconfig.)
   636.7 +Idea mentioned by Bertrand Marquis, but this patch is a bit simpler than his.
   636.8 +
   636.9 +
  636.10 +--- linux-2.6.8.1/scripts/kconfig/Makefile.old	2004-09-09 20:30:25.000000000 -0700
  636.11 ++++ linux-2.6.8.1/scripts/kconfig/Makefile	2004-09-09 20:47:51.000000000 -0700
  636.12 +@@ -68,8 +68,8 @@
  636.13 + libkconfig-objs := zconf.tab.o
  636.14 + 
  636.15 + host-progs	:= conf mconf qconf gconf
  636.16 +-conf-objs	:= conf.o  libkconfig.so
  636.17 +-mconf-objs	:= mconf.o libkconfig.so
  636.18 ++conf-objs	:= conf.o  $(libkconfig-objs)
  636.19 ++mconf-objs	:= mconf.o $(libkconfig-objs)
  636.20 + 
  636.21 + ifeq ($(MAKECMDGOALS),xconfig)
  636.22 + 	qconf-target := 1
  636.23 +@@ -88,7 +88,7 @@
  636.24 + gconf-objs	:= gconf.o kconfig_load.o
  636.25 + endif
  636.26 + 
  636.27 +-clean-files	:= libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
  636.28 ++clean-files	:= $(libkconfig-objs) lkc_defs.h qconf.moc .tmp_qtcheck \
  636.29 + 		   .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c
  636.30 + 
  636.31 + # generated files seem to need this to find local include files
   637.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   637.2 +++ b/patches/uClibc/0.9.28.1/000-string-functions.patch	Sat Feb 24 11:00:05 2007 +0000
   637.3 @@ -0,0 +1,14 @@
   637.4 +Give preference to target-optimised functions over glibc's ones,
   637.5 +which in turn ahave precedence over generic ones.
   637.6 +
   637.7 +--- uClibc.orig/libc/Makefile	2005-07-20 08:10:44.000000000 +0200
   637.8 ++++ uclibc/libc/Makefile	2005-07-28 13:33:40.000000000 +0200
   637.9 +@@ -59,7 +59,7 @@
  637.10 + 	$(AR) dN 2 $(LIBNAME) $$objs && \
  637.11 + 	$(AR) dN 2 $(LIBNAME) $$objs
  637.12 + 	@for objfile in obj.signal \
  637.13 +-	                obj.string.generic obj.string.$(TARGET_ARCH) obj.string \
  637.14 ++	                obj.string obj.string.generic obj.string.$(TARGET_ARCH) \
  637.15 + 	                obj.sysdeps.common obj.sysdeps.$(TARGET_ARCH) ; do \
  637.16 + 		if [ -e $$objfile ] ; then \
  637.17 + 			echo $(AR) $(ARFLAGS) $(LIBNAME) $$objfile ; \
   638.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   638.2 +++ b/patches/uClibc/0.9.28.1/001-install_dev.patch	Sat Feb 24 11:00:05 2007 +0000
   638.3 @@ -0,0 +1,22 @@
   638.4 +We know that the kernel headers are in place. Don't try to install them.
   638.5 +
   638.6 +diff -dur uClibc-0.9.28.1.orig/Makefile uClibc-0.9.28.1/Makefile
   638.7 +--- uClibc-0.9.28.1.orig/Makefile	2007-01-28 06:38:00.000000000 +0100
   638.8 ++++ uClibc-0.9.28.1/Makefile	2007-01-28 18:55:46.000000000 +0100
   638.9 +@@ -158,12 +158,10 @@
  638.10 + 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
  638.11 + 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
  638.12 + 	-$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
  638.13 +-	if [ "$(KERNEL_SOURCE)" = "$(DEVEL_PREFIX)" ] ; then \
  638.14 +-		extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
  638.15 +-	else \
  638.16 +-		extra_exclude="" ; \
  638.17 +-	fi ; \
  638.18 +-	tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \
  638.19 ++	extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
  638.20 ++	tar -chf - include --exclude .svn --exclude CVS \
  638.21 ++	                   --exclude include/linux      \
  638.22 ++	                   --exclude include/asm'*'     \
  638.23 + 		| tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
  638.24 + ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
  638.25 + 	# Remove floating point related headers since float support is disabled.
   639.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   639.2 +++ b/patches/uClibc/0.9.28.1/002-no_LFS-no_readahead.patch	Sat Feb 24 11:00:05 2007 +0000
   639.3 @@ -0,0 +1,14 @@
   639.4 +diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/common/Makefile uClibc-0.9.28.1/libc/sysdeps/linux/common/Makefile
   639.5 +--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/common/Makefile	2007-01-26 00:54:19.000000000 +0100
   639.6 ++++ uClibc-0.9.28.1/libc/sysdeps/linux/common/Makefile	2007-02-01 08:44:37.000000000 +0100
   639.7 +@@ -25,6 +25,10 @@
   639.8 + SRCS := $(filter-out sbrk.c,$(SRCS))
   639.9 + endif
  639.10 + 
  639.11 ++ifneq ($(strip $(UCLIBC_HAS_LFS)),y)
  639.12 ++SRCS := $(filter-out readahead.c,$(SRCS))
  639.13 ++endif
  639.14 ++
  639.15 + ifneq ($(strip $(UCLIBC_HAS_SSP)),y)
  639.16 + SRCS := $(filter-out ssp.c,$(SRCS))
  639.17 + endif
   640.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   640.2 +++ b/patches/uClibc/0.9.28.1/003-time-locale.patch	Sat Feb 24 11:00:05 2007 +0000
   640.3 @@ -0,0 +1,15 @@
   640.4 +Index: libc/misc/time/time.c
   640.5 +===================================================================
   640.6 +--- a/libc/misc/time/time.c	(revision 17534)
   640.7 ++++ b/libc/misc/time/time.c	(revision 17647)
   640.8 +@@ -158,7 +158,9 @@
   640.9 + #endif
  640.10 + 
  640.11 + #if defined (L_tzset) || defined (L_localtime_r) || defined(L_strftime) || \
  640.12 +-    defined(L__time_mktime) || defined(L__time_mktime_tzi)
  640.13 ++	 defined(L__time_mktime) || defined(L__time_mktime_tzi) || \
  640.14 ++	 ((defined(L_strftime) || defined(L_strftime_l)) && \
  640.15 ++	  defined(__UCLIBC_HAS_XLOCALE__))
  640.16 + 
  640.17 + void _time_tzset (int);
  640.18 + 
   641.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   641.2 +++ b/patches/uClibc/0.9.28.1/004-uClibc_ctype.patch	Sat Feb 24 11:00:05 2007 +0000
   641.3 @@ -0,0 +1,17 @@
   641.4 +diff -urN uClibc-dist/libc/sysdeps/linux/common/bits/uClibc_touplow.h uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h
   641.5 +--- uClibc-dist/libc/sysdeps/linux/common/bits/uClibc_touplow.h   Fri Jun  3 13:30:25 2005
   641.6 ++++ uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h   Fri Jun  3 13:30:39 2005
   641.7 +@@ -34,11 +34,11 @@
   641.8 +
   641.9 + /* glibc uses the equivalent of - typedef __int32_t __ctype_touplow_t; */
  641.10 +
  641.11 +-typedef __uint16_t __ctype_mask_t;
  641.12 ++typedef __uint32_t __ctype_mask_t;
  641.13 +
  641.14 + #ifdef __UCLIBC_HAS_CTYPE_SIGNED__
  641.15 +
  641.16 +-typedef __int16_t __ctype_touplow_t;
  641.17 ++typedef __int32_t __ctype_touplow_t;
  641.18 + #define __UCLIBC_CTYPE_B_TBL_OFFSET       128
  641.19 + #define __UCLIBC_CTYPE_TO_TBL_OFFSET      128
  641.20 +
   642.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   642.2 +++ b/patches/uClibc/0.9.28.1/200-custom-ISA.patch	Sat Feb 24 11:00:05 2007 +0000
   642.3 @@ -0,0 +1,31 @@
   642.4 +diff -dur uClibc-0.9.28.orig/Rules.mak uClibc-0.9.28/Rules.mak
   642.5 +--- uClibc-0.9.28.orig/Rules.mak	2005-08-18 00:49:49.000000000 +0200
   642.6 ++++ uClibc-0.9.28/Rules.mak	2007-01-30 10:53:34.000000000 +0100
   642.7 +@@ -168,6 +168,7 @@
   642.8 + 	CPU_CFLAGS-$(CONFIG_MIPS_ISA_4)+=-mips4 -mtune=mips4
   642.9 + 	CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32)+=-mips32 -mtune=mips32
  642.10 + 	CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64)+=-mips64 -mtune=mips32
  642.11 ++	CPU_CFLAGS-$(CONFIG_MIPS_ISA_CUSTOM)+=-march=$(CONFIG_MIPS_CPU_CFLAGS_CUSTOM)
  642.12 + endif
  642.13 + 
  642.14 + ifeq ($(strip $(TARGET_ARCH)),sh)
  642.15 +diff -dur uClibc-0.9.28.orig/extra/Configs/Config.mips uClibc-0.9.28/extra/Configs/Config.mips
  642.16 +--- uClibc-0.9.28.orig/extra/Configs/Config.mips	2005-08-18 00:49:41.000000000 +0200
  642.17 ++++ uClibc-0.9.28/extra/Configs/Config.mips	2007-01-30 10:52:12.000000000 +0100
  642.18 +@@ -63,4 +63,16 @@
  642.19 + config CONFIG_MIPS_ISA_MIPS64
  642.20 + 	bool "MIPS64"
  642.21 + 
  642.22 ++config CONFIG_MIPS_ISA_CUSTOM
  642.23 ++	bool "Custom"
  642.24 ++
  642.25 + endchoice
  642.26 ++
  642.27 ++config CONFIG_MIPS_CPU_CFLAGS_CUSTOM
  642.28 ++	string
  642.29 ++	prompt "Custon ISA"
  642.30 ++	depends on CONFIG_MIPS_ISA_CUSTOM
  642.31 ++	default ""
  642.32 ++	help
  642.33 ++	  Enter your custom ISA here (eg: lx4189!).
  642.34 ++
   643.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   643.2 +++ b/patches/uClibc/0.9.28.1/201-mips-asm.h.patch	Sat Feb 24 11:00:05 2007 +0000
   643.3 @@ -0,0 +1,41 @@
   643.4 +diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/clone.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/clone.S
   643.5 +--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/clone.S	2007-02-07 11:18:12.000000000 +0100
   643.6 ++++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/clone.S	2007-02-07 10:41:34.000000000 +0100
   643.7 +@@ -24,7 +24,7 @@
   643.8 + #include <sys/regdef.h>
   643.9 + #define _ERRNO_H	1
  643.10 + #include <bits/errno.h>
  643.11 +-#include <asm/asm.h>
  643.12 ++#include <sys/asm.h>
  643.13 + 
  643.14 + /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
  643.15 + 
  643.16 +diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/pipe.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/pipe.S
  643.17 +--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/pipe.S	2007-02-07 11:18:12.000000000 +0100
  643.18 ++++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/pipe.S	2007-02-07 11:16:52.000000000 +0100
  643.19 +@@ -3,9 +3,9 @@
  643.20 + /*see uClibc's sh/pipe.c and glibc-2.2.4's mips/pipe.S */
  643.21 + 
  643.22 + #include <features.h>
  643.23 +-#include <asm/asm.h>
  643.24 ++#include <sys/asm.h>
  643.25 + #include <asm/unistd.h>
  643.26 +-#include <asm/regdef.h>
  643.27 ++#include <sys/regdef.h>
  643.28 + 
  643.29 +         .globl  pipe
  643.30 +         .ent    pipe, 0
  643.31 +diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/syscall.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/syscall.S
  643.32 +--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/syscall.S	2007-02-07 11:18:12.000000000 +0100
  643.33 ++++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/syscall.S	2007-02-07 11:17:03.000000000 +0100
  643.34 +@@ -17,8 +17,8 @@
  643.35 +    02111-1307 USA.  */
  643.36 + 
  643.37 + #include <features.h>
  643.38 +-#include <asm/asm.h>
  643.39 +-#include <asm/regdef.h>
  643.40 ++#include <sys/asm.h>
  643.41 ++#include <sys/regdef.h>
  643.42 + 
  643.43 + #ifdef __PIC__
  643.44 + 	.option pic2
   644.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   644.2 +++ b/patches/uClibc/0.9.28.2/000-string-functions.patch	Sat Feb 24 11:00:05 2007 +0000
   644.3 @@ -0,0 +1,14 @@
   644.4 +Give preference to target-optimised functions over glibc's ones,
   644.5 +which in turn ahave precedence over generic ones.
   644.6 +
   644.7 +--- uClibc.orig/libc/Makefile	2005-07-20 08:10:44.000000000 +0200
   644.8 ++++ uclibc/libc/Makefile	2005-07-28 13:33:40.000000000 +0200
   644.9 +@@ -59,7 +59,7 @@
  644.10 + 	$(AR) dN 2 $(LIBNAME) $$objs && \
  644.11 + 	$(AR) dN 2 $(LIBNAME) $$objs
  644.12 + 	@for objfile in obj.signal \
  644.13 +-	                obj.string.generic obj.string.$(TARGET_ARCH) obj.string \
  644.14 ++	                obj.string obj.string.generic obj.string.$(TARGET_ARCH) \
  644.15 + 	                obj.sysdeps.common obj.sysdeps.$(TARGET_ARCH) ; do \
  644.16 + 		if [ -e $$objfile ] ; then \
  644.17 + 			echo $(AR) $(ARFLAGS) $(LIBNAME) $$objfile ; \
   645.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   645.2 +++ b/patches/uClibc/0.9.28.2/001-install_dev.patch	Sat Feb 24 11:00:05 2007 +0000
   645.3 @@ -0,0 +1,22 @@
   645.4 +We know that the kernel headers are in place. Don't try to install them.
   645.5 +
   645.6 +diff -dur uClibc-0.9.28.1.orig/Makefile uClibc-0.9.28.1/Makefile
   645.7 +--- uClibc-0.9.28.1.orig/Makefile	2007-01-28 06:38:00.000000000 +0100
   645.8 ++++ uClibc-0.9.28.1/Makefile	2007-01-28 18:55:46.000000000 +0100
   645.9 +@@ -158,12 +158,10 @@
  645.10 + 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
  645.11 + 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
  645.12 + 	-$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
  645.13 +-	if [ "$(KERNEL_SOURCE)" = "$(DEVEL_PREFIX)" ] ; then \
  645.14 +-		extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
  645.15 +-	else \
  645.16 +-		extra_exclude="" ; \
  645.17 +-	fi ; \
  645.18 +-	tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \
  645.19 ++	extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
  645.20 ++	tar -chf - include --exclude .svn --exclude CVS \
  645.21 ++	                   --exclude include/linux      \
  645.22 ++	                   --exclude include/asm'*'     \
  645.23 + 		| tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
  645.24 + 	echo '/* Dont use _syscall#() macros; use the syscall() function */' > \
  645.25 + 		$(PREFIX)$(DEVEL_PREFIX)include/bits/syscalls.h
   646.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   646.2 +++ b/patches/uClibc/0.9.28.2/002-no_LFS-no_readahead.patch	Sat Feb 24 11:00:05 2007 +0000
   646.3 @@ -0,0 +1,14 @@
   646.4 +diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/common/Makefile uClibc-0.9.28.1/libc/sysdeps/linux/common/Makefile
   646.5 +--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/common/Makefile	2007-01-26 00:54:19.000000000 +0100
   646.6 ++++ uClibc-0.9.28.1/libc/sysdeps/linux/common/Makefile	2007-02-01 08:44:37.000000000 +0100
   646.7 +@@ -25,6 +25,10 @@
   646.8 + SRCS := $(filter-out sbrk.c,$(SRCS))
   646.9 + endif
  646.10 + 
  646.11 ++ifneq ($(strip $(UCLIBC_HAS_LFS)),y)
  646.12 ++SRCS := $(filter-out readahead.c,$(SRCS))
  646.13 ++endif
  646.14 ++
  646.15 + ifneq ($(strip $(UCLIBC_HAS_SSP)),y)
  646.16 + SRCS := $(filter-out ssp.c,$(SRCS))
  646.17 + endif
   647.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   647.2 +++ b/patches/uClibc/0.9.28.2/004-uClibc_ctype.patch	Sat Feb 24 11:00:05 2007 +0000
   647.3 @@ -0,0 +1,17 @@
   647.4 +diff -urN uClibc-dist/libc/sysdeps/linux/common/bits/uClibc_touplow.h uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h
   647.5 +--- uClibc-dist/libc/sysdeps/linux/common/bits/uClibc_touplow.h   Fri Jun  3 13:30:25 2005
   647.6 ++++ uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h   Fri Jun  3 13:30:39 2005
   647.7 +@@ -34,11 +34,11 @@
   647.8 +
   647.9 + /* glibc uses the equivalent of - typedef __int32_t __ctype_touplow_t; */
  647.10 +
  647.11 +-typedef __uint16_t __ctype_mask_t;
  647.12 ++typedef __uint32_t __ctype_mask_t;
  647.13 +
  647.14 + #ifdef __UCLIBC_HAS_CTYPE_SIGNED__
  647.15 +
  647.16 +-typedef __int16_t __ctype_touplow_t;
  647.17 ++typedef __int32_t __ctype_touplow_t;
  647.18 + #define __UCLIBC_CTYPE_B_TBL_OFFSET       128
  647.19 + #define __UCLIBC_CTYPE_TO_TBL_OFFSET      128
  647.20 +
   648.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   648.2 +++ b/patches/uClibc/0.9.28.2/200-custom-ISA.patch	Sat Feb 24 11:00:05 2007 +0000
   648.3 @@ -0,0 +1,31 @@
   648.4 +diff -dur uClibc-0.9.28.orig/Rules.mak uClibc-0.9.28/Rules.mak
   648.5 +--- uClibc-0.9.28.orig/Rules.mak	2005-08-18 00:49:49.000000000 +0200
   648.6 ++++ uClibc-0.9.28/Rules.mak	2007-01-30 10:53:34.000000000 +0100
   648.7 +@@ -168,6 +168,7 @@
   648.8 + 	CPU_CFLAGS-$(CONFIG_MIPS_ISA_4)+=-mips4 -mtune=mips4
   648.9 + 	CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32)+=-mips32 -mtune=mips32
  648.10 + 	CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64)+=-mips64 -mtune=mips32
  648.11 ++	CPU_CFLAGS-$(CONFIG_MIPS_ISA_CUSTOM)+=-march=$(CONFIG_MIPS_CPU_CFLAGS_CUSTOM)
  648.12 + endif
  648.13 + 
  648.14 + ifeq ($(strip $(TARGET_ARCH)),sh)
  648.15 +diff -dur uClibc-0.9.28.orig/extra/Configs/Config.mips uClibc-0.9.28/extra/Configs/Config.mips
  648.16 +--- uClibc-0.9.28.orig/extra/Configs/Config.mips	2005-08-18 00:49:41.000000000 +0200
  648.17 ++++ uClibc-0.9.28/extra/Configs/Config.mips	2007-01-30 10:52:12.000000000 +0100
  648.18 +@@ -63,4 +63,16 @@
  648.19 + config CONFIG_MIPS_ISA_MIPS64
  648.20 + 	bool "MIPS64"
  648.21 + 
  648.22 ++config CONFIG_MIPS_ISA_CUSTOM
  648.23 ++	bool "Custom"
  648.24 ++
  648.25 + endchoice
  648.26 ++
  648.27 ++config CONFIG_MIPS_CPU_CFLAGS_CUSTOM
  648.28 ++	string
  648.29 ++	prompt "Custon ISA"
  648.30 ++	depends on CONFIG_MIPS_ISA_CUSTOM
  648.31 ++	default ""
  648.32 ++	help
  648.33 ++	  Enter your custom ISA here (eg: lx4189!).
  648.34 ++
   649.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   649.2 +++ b/patches/uClibc/0.9.28.2/201-mips-asm.h.patch	Sat Feb 24 11:00:05 2007 +0000
   649.3 @@ -0,0 +1,41 @@
   649.4 +diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/clone.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/clone.S
   649.5 +--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/clone.S	2007-02-07 11:18:12.000000000 +0100
   649.6 ++++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/clone.S	2007-02-07 10:41:34.000000000 +0100
   649.7 +@@ -24,7 +24,7 @@
   649.8 + #include <sys/regdef.h>
   649.9 + #define _ERRNO_H	1
  649.10 + #include <bits/errno.h>
  649.11 +-#include <asm/asm.h>
  649.12 ++#include <sys/asm.h>
  649.13 + 
  649.14 + /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
  649.15 + 
  649.16 +diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/pipe.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/pipe.S
  649.17 +--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/pipe.S	2007-02-07 11:18:12.000000000 +0100
  649.18 ++++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/pipe.S	2007-02-07 11:16:52.000000000 +0100
  649.19 +@@ -3,9 +3,9 @@
  649.20 + /*see uClibc's sh/pipe.c and glibc-2.2.4's mips/pipe.S */
  649.21 + 
  649.22 + #include <features.h>
  649.23 +-#include <asm/asm.h>
  649.24 ++#include <sys/asm.h>
  649.25 + #include <asm/unistd.h>
  649.26 +-#include <asm/regdef.h>
  649.27 ++#include <sys/regdef.h>
  649.28 + 
  649.29 +         .globl  pipe
  649.30 +         .ent    pipe, 0
  649.31 +diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/syscall.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/syscall.S
  649.32 +--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/syscall.S	2007-02-07 11:18:12.000000000 +0100
  649.33 ++++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/syscall.S	2007-02-07 11:17:03.000000000 +0100
  649.34 +@@ -17,8 +17,8 @@
  649.35 +    02111-1307 USA.  */
  649.36 + 
  649.37 + #include <features.h>
  649.38 +-#include <asm/asm.h>
  649.39 +-#include <asm/regdef.h>
  649.40 ++#include <sys/asm.h>
  649.41 ++#include <sys/regdef.h>
  649.42 + 
  649.43 + #ifdef __PIC__
  649.44 + 	.option pic2
   650.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   650.2 +++ b/patches/uClibc/0.9.28/000-string-functions.patch	Sat Feb 24 11:00:05 2007 +0000
   650.3 @@ -0,0 +1,11 @@
   650.4 +--- uClibc.orig/libc/Makefile	2005-07-20 08:10:44.000000000 +0200
   650.5 ++++ uclibc/libc/Makefile	2005-07-28 13:33:40.000000000 +0200
   650.6 +@@ -59,7 +59,7 @@
   650.7 + 	$(AR) dN 2 $(LIBNAME) $$objs && \
   650.8 + 	$(AR) dN 2 $(LIBNAME) $$objs
   650.9 + 	@for objfile in obj.signal \
  650.10 +-	                obj.string.generic obj.string.$(TARGET_ARCH) obj.string \
  650.11 ++	                obj.string obj.string.generic obj.string.$(TARGET_ARCH) \
  650.12 + 	                obj.sysdeps.common obj.sysdeps.$(TARGET_ARCH) ; do \
  650.13 + 		if [ -e $$objfile ] ; then \
  650.14 + 			echo $(AR) $(ARFLAGS) $(LIBNAME) $$objfile ; \
   651.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   651.2 +++ b/patches/uClibc/0.9.28/001-install_dev.patch	Sat Feb 24 11:00:05 2007 +0000
   651.3 @@ -0,0 +1,39 @@
   651.4 +There are at least three weird glitches in the Makefile:
   651.5 + - the test operator is a dual-equal sign (==) when it should be a single one (=);
   651.6 + - the exclude options are not accepted as is by GNU tar;
   651.7 + - how on earth could KERNEL_SOURCE possibly be equal to DEVEL_PREFIX ???
   651.8 +
   651.9 +We (Cedric DUVAL and I, Yann E. MORIN) are not quite sure why it is that way.
  651.10 +We're not quite sure either on how to solve this.
  651.11 +
  651.12 +What we need is to built a toolchain; in no way we need to install the linux headers.
  651.13 +  ==> systematically exclude them from the [s]tar command.
  651.14 +
  651.15 +This patch is inspired by the svn repository of uClibc as of 20060209.
  651.16 +diff -dur /home/ymorin/dev/uClibc-0.9.28/Makefile uClibc-0.9.28/Makefile
  651.17 +--- /home/ymorin/dev/uClibc-0.9.28/Makefile	2005-08-18 00:49:49.000000000 +0200
  651.18 ++++ uClibc-0.9.28/Makefile	2006-02-09 17:06:58.000000000 +0100
  651.19 +@@ -158,12 +158,17 @@
  651.20 + 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
  651.21 + 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
  651.22 + 	-$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
  651.23 +-	if [ "$(KERNEL_SOURCE)" == "$(DEVEL_PREFIX)" ] ; then \
  651.24 +-		extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
  651.25 +-	else \
  651.26 +-		extra_exclude="" ; \
  651.27 +-	fi ; \
  651.28 +-	tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \
  651.29 ++#	if [ "$(KERNEL_SOURCE)" == "$(DEVEL_PREFIX)" ] ; then \
  651.30 ++#		extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
  651.31 ++#	else \
  651.32 ++#		extra_exclude="" ; \
  651.33 ++#	fi ; \
  651.34 ++#	tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \
  651.35 ++#		| tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
  651.36 ++	printf ".svn\n.cvsignore\nCVS\n" > tar_exclude ; \
  651.37 ++	ls -1d include/linux include/asm* >> tar_exclude ; \
  651.38 ++	tar -chf - -X tar_exclude include \
  651.39 + 		| tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
  651.40 ++	rm -f tar_exclude
  651.41 + ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
  651.42 + 	# Remove floating point related headers since float support is disabled.
   652.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   652.2 +++ b/patches/uClibc/0.9.28/002-no_LFS-no_readahead.patch	Sat Feb 24 11:00:05 2007 +0000
   652.3 @@ -0,0 +1,14 @@
   652.4 +diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/common/Makefile uClibc-0.9.28.1/libc/sysdeps/linux/common/Makefile
   652.5 +--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/common/Makefile	2007-01-26 00:54:19.000000000 +0100
   652.6 ++++ uClibc-0.9.28.1/libc/sysdeps/linux/common/Makefile	2007-02-01 08:44:37.000000000 +0100
   652.7 +@@ -25,6 +25,10 @@
   652.8 + SRCS := $(filter-out sbrk.c,$(SRCS))
   652.9 + endif
  652.10 + 
  652.11 ++ifneq ($(strip $(UCLIBC_HAS_LFS)),y)
  652.12 ++SRCS := $(filter-out readahead.c,$(SRCS))
  652.13 ++endif
  652.14 ++
  652.15 + ifneq ($(strip $(UCLIBC_HAS_SSP)),y)
  652.16 + SRCS := $(filter-out ssp.c,$(SRCS))
  652.17 + endif
   653.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   653.2 +++ b/patches/uClibc/0.9.28/004-uClibc_ctype.patch	Sat Feb 24 11:00:05 2007 +0000
   653.3 @@ -0,0 +1,17 @@
   653.4 +diff -urN uClibc-dist/libc/sysdeps/linux/common/bits/uClibc_touplow.h uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h
   653.5 +--- uClibc-dist/libc/sysdeps/linux/common/bits/uClibc_touplow.h   Fri Jun  3 13:30:25 2005
   653.6 ++++ uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h   Fri Jun  3 13:30:39 2005
   653.7 +@@ -34,11 +34,11 @@
   653.8 +
   653.9 + /* glibc uses the equivalent of - typedef __int32_t __ctype_touplow_t; */
  653.10 +
  653.11 +-typedef __uint16_t __ctype_mask_t;
  653.12 ++typedef __uint32_t __ctype_mask_t;
  653.13 +
  653.14 + #ifdef __UCLIBC_HAS_CTYPE_SIGNED__
  653.15 +
  653.16 +-typedef __int16_t __ctype_touplow_t;
  653.17 ++typedef __int32_t __ctype_touplow_t;
  653.18 + #define __UCLIBC_CTYPE_B_TBL_OFFSET       128
  653.19 + #define __UCLIBC_CTYPE_TO_TBL_OFFSET      128
  653.20 +
   654.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   654.2 +++ b/patches/uClibc/0.9.28/005-fix_includes.sh.patch	Sat Feb 24 11:00:05 2007 +0000
   654.3 @@ -0,0 +1,316 @@
   654.4 +--- uClibc-0.9.28/extra/scripts/fix_includes.sh.orig	2006-12-13 05:44:21.000000000 -0700
   654.5 ++++ uClibc-0.9.28/extra/scripts/fix_includes.sh	2006-12-13 05:44:35.000000000 -0700
   654.6 +@@ -1,183 +1,155 @@
   654.7 + #!/bin/sh
   654.8 +-# Copyright (C) 2003 Erik Andersen <andersen@uclibc.org>
   654.9 + #
  654.10 +-# This program is free software; you can redistribute it and/or
  654.11 +-# modify it under the terms of the GNU Library General Public
  654.12 +-# License as published by the Free Software Foundation; either
  654.13 +-# version 2 of the License, or (at your option) any later
  654.14 +-# version.
  654.15 +-#
  654.16 +-# This program is distributed in the hope that it will be useful,
  654.17 +-# but WITHOUT ANY WARRANTY; without even the implied warranty of
  654.18 +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  654.19 +-# GNU Library General Public License for more details.
  654.20 +-#
  654.21 +-# You should have received a copy of the GNU Library General
  654.22 +-# Public License along with this program; if not, write to the
  654.23 +-# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  654.24 +-# Boston, MA 02111-1307 USA
  654.25 +-
  654.26 +-usage () {
  654.27 +-    echo ""
  654.28 +-    echo "usage: "`basename $0`" -k KERNEL_SOURCE_DIRECTORY -t TARGET_ARCH"
  654.29 +-    echo ""
  654.30 +-    echo "This utility scans the KERNEL_SOURCE_DIRECTORY directory and"
  654.31 +-    echo "checks that it contains well formed kernel headers suitable"
  654.32 +-    echo "for inclusion as the include/linux/ directory provided by"
  654.33 +-    echo "uClibc."
  654.34 +-    echo ""
  654.35 +-    echo "If the specified kernel headers are present and already"
  654.36 +-    echo "configured for the architecture specified by TARGET_ARCH,"
  654.37 +-    echo "they will be used as-is."
  654.38 +-    echo ""
  654.39 +-    echo "If the specified kernel headers are missing entirely, this"
  654.40 +-    echo "script will return an error."
  654.41 +-    echo ""
  654.42 +-    echo "If the specified kernel headers are present, but are either"
  654.43 +-    echo "not yet configured or are configured for an architecture"
  654.44 +-    echo "different than that specified by TARGET_ARCH, this script"
  654.45 +-    echo "will attempt to 'fix' the kernel headers and make them"
  654.46 +-    echo "suitable for use by uClibc.  This fixing process may fail."
  654.47 +-    echo "It is therefore best to always provide kernel headers that"
  654.48 +-    echo "are already configured for the selected architecture."
  654.49 +-    echo ""
  654.50 +-    echo "Most Linux distributions provide 'kernel-headers' packages"
  654.51 +-    echo "that are suitable for use by uClibc."
  654.52 +-    echo ""
  654.53 +-    echo ""
  654.54 +-    exit 1;
  654.55 ++# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  654.56 ++#
  654.57 ++# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  654.58 ++#
  654.59 ++
  654.60 ++usage() {
  654.61 ++	echo ""
  654.62 ++	echo "usage: "`basename $0`" -k KERNEL_SOURCE_DIRECTORY -t TARGET_ARCH"
  654.63 ++	echo ""
  654.64 ++	echo "This utility scans the KERNEL_SOURCE_DIRECTORY directory and"
  654.65 ++	echo "checks that it contains well formed kernel headers suitable"
  654.66 ++	echo "for inclusion as the include/linux/ directory provided by"
  654.67 ++	echo "uClibc."
  654.68 ++	echo ""
  654.69 ++	echo "If the specified kernel headers are present and already"
  654.70 ++	echo "configured for the architecture specified by TARGET_ARCH,"
  654.71 ++	echo "they will be used as-is."
  654.72 ++	echo ""
  654.73 ++	echo "If the specified kernel headers are missing entirely, this"
  654.74 ++	echo "script will return an error."
  654.75 ++	echo ""
  654.76 ++	echo "If the specified kernel headers are present, but are either"
  654.77 ++	echo "not yet configured or are configured for an architecture"
  654.78 ++	echo "different than that specified by TARGET_ARCH, this script"
  654.79 ++	echo "will attempt to 'fix' the kernel headers and make them"
  654.80 ++	echo "suitable for use by uClibc.  This fixing process may fail."
  654.81 ++	echo "It is therefore best to always provide kernel headers that"
  654.82 ++	echo "are already configured for the selected architecture."
  654.83 ++	echo ""
  654.84 ++	echo "Most Linux distributions provide 'kernel-headers' packages"
  654.85 ++	echo "that are suitable for use by uClibc."
  654.86 ++	echo ""
  654.87 ++	echo ""
  654.88 ++	exit 1
  654.89 + }
  654.90 + 
  654.91 +-HAS_MMU="y";
  654.92 ++
  654.93 ++#
  654.94 ++# Parse our arguments
  654.95 ++#
  654.96 ++HAS_MMU="y"
  654.97 + while [ -n "$1" ]; do
  654.98 +-    case $1 in
  654.99 +-	-k ) shift; if [ -n "$1" ]; then KERNEL_SOURCE=$1; shift; else usage; fi; ;;
 654.100 +-	-t ) shift; if [ -n "$1" ]; then TARGET_ARCH=$1; shift; else usage; fi; ;;
 654.101 +-	-n ) shift; HAS_MMU="n"; ;;
 654.102 +-	-* ) usage; ;;
 654.103 +-	* ) usage; ;;
 654.104 +-    esac;
 654.105 +-done;
 654.106 ++	case $1 in
 654.107 ++		-k ) shift; if [ -n "$1" ]; then KERNEL_SOURCE=$1; shift; else usage; fi; ;;
 654.108 ++		-t ) shift; if [ -n "$1" ]; then TARGET_ARCH=$1; shift; else usage; fi; ;;
 654.109 ++		-n ) shift; HAS_MMU="n"; ;;
 654.110 ++		-* ) usage; ;;
 654.111 ++		* ) usage; ;;
 654.112 ++	esac
 654.113 ++done
 654.114 + 
 654.115 +-if [ ! -f "$KERNEL_SOURCE/Makefile" -a ! -f "$KERNEL_SOURCE/include/linux/version.h" ]; then
 654.116 +-    echo "";
 654.117 +-    echo "";
 654.118 +-    echo "The file $KERNEL_SOURCE/Makefile or $KERNEL_SOURCE/include/linux/version.h is missing!";
 654.119 +-    echo "Perhaps your kernel source is broken?"
 654.120 +-    echo "";
 654.121 +-    echo "";
 654.122 +-    exit 1;
 654.123 +-fi;
 654.124 + 
 654.125 +-if [ ! -d "$KERNEL_SOURCE" ]; then
 654.126 +-    echo "";
 654.127 +-    echo "";
 654.128 +-    echo "$KERNEL_SOURCE is not a directory";
 654.129 +-    echo "";
 654.130 +-    echo "";
 654.131 +-    exit 1;
 654.132 +-fi;
 654.133 +-
 654.134 +-if [ -f "$KERNEL_SOURCE/Makefile" ] ; then
 654.135 +-# set current VERSION, PATCHLEVEL, SUBLEVEL, EXTRAVERSION
 654.136 +-eval `sed -n -e 's/^\([A-Z]*\) = \([0-9]*\)$/\1=\2/p' -e 's/^\([A-Z]*\) = \(-[-a-z0-9]*\)$/\1=\2/p' $KERNEL_SOURCE/Makefile`
 654.137 +-else
 654.138 +-ver=`grep UTS_RELEASE $KERNEL_SOURCE/include/linux/version.h | cut -d '"' -f 2`
 654.139 +-VERSION=`echo "$ver" | cut -d '.' -f 1`
 654.140 +-PATCHLEVEL=`echo "$ver" | cut -d '.' -f 2`
 654.141 +-if echo "$ver" | grep -q '-' ; then
 654.142 +-SUBLEVEL=`echo "$ver" | sed "s/${VERSION}.${PATCHLEVEL}.//" | cut -d '-' -f 1`
 654.143 +-EXTRAVERSION=`echo "$ver" | sed "s/${VERSION}.${PATCHLEVEL}.${SUBLEVEL}-//"`
 654.144 +-else
 654.145 +-SUBLEVEL=`echo "$ver" | cut -d '.' -f 3`
 654.146 +-#EXTRAVERSION=
 654.147 +-fi
 654.148 ++#
 654.149 ++# Perform some sanity checks on our kernel sources
 654.150 ++#
 654.151 ++if [ ! -f "$KERNEL_SOURCE/Makefile" -a ! -f "$KERNEL_SOURCE/include/linux/version.h" ]; then
 654.152 ++	echo ""
 654.153 ++	echo ""
 654.154 ++	echo "The file $KERNEL_SOURCE/Makefile or $KERNEL_SOURCE/include/linux/version.h is missing!"
 654.155 ++	echo "Perhaps your kernel source is broken?"
 654.156 ++	echo ""
 654.157 ++	echo ""
 654.158 ++	exit 1
 654.159 + fi
 654.160 +-if [ -z "$VERSION" -o -z "$PATCHLEVEL" -o -z "$SUBLEVEL" ]
 654.161 +-then
 654.162 +-    echo "Unable to determine version for kernel headers"
 654.163 +-    echo -e "\tprovided in directory $KERNEL_SOURCE"
 654.164 +-    exit 1
 654.165 ++if [ ! -d "$KERNEL_SOURCE" ]; then
 654.166 ++	echo ""
 654.167 ++	echo ""
 654.168 ++	echo "$KERNEL_SOURCE is not a directory"
 654.169 ++	echo ""
 654.170 ++	echo ""
 654.171 ++	exit 1
 654.172 + fi
 654.173 + 
 654.174 +-if [ "$MAKE_IS_SILENT" != "y" ]; then
 654.175 +-echo "Current kernel version is $VERSION.$PATCHLEVEL.$SUBLEVEL${EXTRAVERSION}"
 654.176 +-echo -e "\n"
 654.177 +-echo "Using kernel headers from $VERSION.$PATCHLEVEL.$SUBLEVEL${EXTRAVERSION} for architecture '$TARGET_ARCH'"
 654.178 +-echo -e "\tprovided in directory $KERNEL_SOURCE"
 654.179 +-echo -e "\n"
 654.180 +-fi
 654.181 + 
 654.182 ++#
 654.183 + # Create a symlink to include/asm
 654.184 +-
 654.185 ++#
 654.186 + rm -f include/asm*
 654.187 + if [ ! -d "$KERNEL_SOURCE/include/asm" ]; then
 654.188 +-    echo "";
 654.189 +-    echo "";
 654.190 +-    echo "The symlink $KERNEL_SOURCE/include/asm is missing\!";
 654.191 +-    echo "Perhaps you forgot to configure your kernel source?";
 654.192 +-    echo "You really should configure your kernel source tree so I";
 654.193 +-    echo "do not have to try and guess about this sort of thing.";
 654.194 +-    echo ""
 654.195 +-    echo "Attempting to guess a usable value....";
 654.196 +-    echo ""
 654.197 +-    echo "";
 654.198 +-    sleep 1;
 654.199 +-
 654.200 +-    if [ "$TARGET_ARCH" = "powerpc" ];then
 654.201 +-	set -x;
 654.202 +-	ln -fs $KERNEL_SOURCE/include/asm-ppc include/asm;
 654.203 +-	set +x;
 654.204 +-    elif [ "$TARGET_ARCH" = "mips" ];then
 654.205 +-	set -x;
 654.206 +-	ln -fs $KERNEL_SOURCE/include/asm-mips include/asm;
 654.207 +-	set +x;
 654.208 +-    elif [ "$TARGET_ARCH" = "arm" ];then
 654.209 +-	set -x;
 654.210 +-	ln -fs $KERNEL_SOURCE/include/asm-arm include/asm;
 654.211 +-	set +x;
 654.212 +-	if [ ! -L $KERNEL_SOURCE/include/asm-arm/proc ] ; then
 654.213 +-	    if [ ! -L proc ] ; then
 654.214 +-		(cd include/asm;
 654.215 +-		ln -fs proc-armv proc;
 654.216 +-		ln -fs arch-ebsa285 arch);
 654.217 +-	    fi
 654.218 ++	echo ""
 654.219 ++	echo ""
 654.220 ++	echo "The symlink $KERNEL_SOURCE/include/asm is missing\!"
 654.221 ++	echo "Perhaps you forgot to configure your kernel source?"
 654.222 ++	echo "You really should configure your kernel source tree so I"
 654.223 ++	echo "do not have to try and guess about this sort of thing."
 654.224 ++	echo ""
 654.225 ++	echo "Attempting to guess a usable value...."
 654.226 ++	echo ""
 654.227 ++	echo ""
 654.228 ++	sleep 1
 654.229 ++
 654.230 ++	if [ "$TARGET_ARCH" = "powerpc" ]; then
 654.231 ++		set -x
 654.232 ++		ln -fs $KERNEL_SOURCE/include/asm-ppc include/asm
 654.233 ++		set +x
 654.234 ++	elif [ "$TARGET_ARCH" = "mips" ]; then
 654.235 ++		set -x
 654.236 ++		ln -fs $KERNEL_SOURCE/include/asm-mips include/asm
 654.237 ++		set +x
 654.238 ++	elif [ "$TARGET_ARCH" = "arm" ]; then
 654.239 ++		set -x
 654.240 ++		ln -fs $KERNEL_SOURCE/include/asm-arm include/asm
 654.241 ++		set +x
 654.242 ++	if [ ! -L $KERNEL_SOURCE/include/asm-arm/proc ]; then
 654.243 ++		if [ ! -L proc ]; then
 654.244 ++			(
 654.245 ++				cd include/asm
 654.246 ++				ln -fs proc-armv proc
 654.247 ++				ln -fs arch-ebsa285 arch
 654.248 ++			)
 654.249 ++		fi
 654.250 ++	fi
 654.251 ++	elif [ "$TARGET_ARCH" = "cris" ]; then
 654.252 ++		set -x
 654.253 ++		ln -fs $KERNEL_SOURCE/include/asm-cris include/asm
 654.254 ++		set +x
 654.255 ++	elif [ "$HAS_MMU" != "y" ]; then
 654.256 ++		if [ -d $KERNEL_SOURCE/include/asm-${TARGET_ARCH}nommu ]; then
 654.257 ++			set -x
 654.258 ++			ln -fs $KERNEL_SOURCE/include/asm-${TARGET_ARCH}nommu include/asm
 654.259 ++			set +x
 654.260 ++		else
 654.261 ++			set -x
 654.262 ++			ln -fs $KERNEL_SOURCE/include/asm-$TARGET_ARCH include/asm
 654.263 ++			set +x
 654.264 ++		fi
 654.265 ++	else
 654.266 ++		set -x
 654.267 ++		ln -fs $KERNEL_SOURCE/include/asm-$TARGET_ARCH include/asm
 654.268 ++		set +x
 654.269 + 	fi;
 654.270 +-    elif [ "$TARGET_ARCH" = "cris" ]; then
 654.271 +-	set -x;
 654.272 +-	ln -fs $KERNEL_SOURCE/include/asm-cris include/asm;
 654.273 +-	set +x;
 654.274 +-    elif [ "$HAS_MMU" != "y" ]; then
 654.275 +-	    if [ -d $KERNEL_SOURCE/include/asm-${TARGET_ARCH}nommu ] ; then
 654.276 +-		set -x;
 654.277 +-		ln -fs $KERNEL_SOURCE/include/asm-${TARGET_ARCH}nommu include/asm;
 654.278 +-		set +x;
 654.279 +-	    else
 654.280 +-		set -x;
 654.281 +-		ln -fs $KERNEL_SOURCE/include/asm-$TARGET_ARCH include/asm;
 654.282 +-		set +x;
 654.283 +-	    fi;
 654.284 +-    else
 654.285 +-	set -x;
 654.286 +-	ln -fs $KERNEL_SOURCE/include/asm-$TARGET_ARCH include/asm;
 654.287 +-	set +x;
 654.288 +-    fi;
 654.289 + else
 654.290 +-# No guessing required.....
 654.291 +-ln -fs $KERNEL_SOURCE/include/asm include/asm
 654.292 +-if [ -e $KERNEL_SOURCE/include/asm-$TARGET_ARCH ] ; then
 654.293 +-ln -fs $KERNEL_SOURCE/include/asm-$TARGET_ARCH include/asm-$TARGET_ARCH
 654.294 ++	# No guessing required.....
 654.295 ++	for x in $KERNEL_SOURCE/include/asm* ; do
 654.296 ++		ln -fs ${x} include/
 654.297 ++	done
 654.298 + fi
 654.299 +-fi;
 654.300 + 
 654.301 + 
 654.302 ++#
 654.303 + # Annoyingly, 2.6.x kernel headers also need an include/asm-generic/ directory
 654.304 +-if [ $VERSION -eq 2 ] && [ $PATCHLEVEL -ge 6 ] ; then
 654.305 +-    ln -fs $KERNEL_SOURCE/include/asm-generic include/asm-generic
 654.306 +-fi;
 654.307 ++#
 654.308 ++if [ -e $KERNEL_SOURCE/include/asm-generic ]; then
 654.309 ++	rm -f include/asm-generic
 654.310 ++	ln -fs $KERNEL_SOURCE/include/asm-generic include/asm-generic
 654.311 ++fi
 654.312 + 
 654.313 + 
 654.314 ++#
 654.315 + # Create the include/linux symlink.
 654.316 ++#
 654.317 + rm -f include/linux
 654.318 + ln -fs $KERNEL_SOURCE/include/linux include/linux
 654.319 +-
   655.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   655.2 +++ b/patches/uClibc/0.9.28/200-custom-ISA.patch	Sat Feb 24 11:00:05 2007 +0000
   655.3 @@ -0,0 +1,31 @@
   655.4 +diff -dur uClibc-0.9.28.orig/Rules.mak uClibc-0.9.28/Rules.mak
   655.5 +--- uClibc-0.9.28.orig/Rules.mak	2005-08-18 00:49:49.000000000 +0200
   655.6 ++++ uClibc-0.9.28/Rules.mak	2007-01-30 10:53:34.000000000 +0100
   655.7 +@@ -168,6 +168,7 @@
   655.8 + 	CPU_CFLAGS-$(CONFIG_MIPS_ISA_4)+=-mips4 -mtune=mips4
   655.9 + 	CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32)+=-mips32 -mtune=mips32
  655.10 + 	CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64)+=-mips64 -mtune=mips32
  655.11 ++	CPU_CFLAGS-$(CONFIG_MIPS_ISA_CUSTOM)+=-march=$(CONFIG_MIPS_CPU_CFLAGS_CUSTOM)
  655.12 + endif
  655.13 + 
  655.14 + ifeq ($(strip $(TARGET_ARCH)),sh)
  655.15 +diff -dur uClibc-0.9.28.orig/extra/Configs/Config.mips uClibc-0.9.28/extra/Configs/Config.mips
  655.16 +--- uClibc-0.9.28.orig/extra/Configs/Config.mips	2005-08-18 00:49:41.000000000 +0200
  655.17 ++++ uClibc-0.9.28/extra/Configs/Config.mips	2007-01-30 10:52:12.000000000 +0100
  655.18 +@@ -63,4 +63,16 @@
  655.19 + config CONFIG_MIPS_ISA_MIPS64
  655.20 + 	bool "MIPS64"
  655.21 + 
  655.22 ++config CONFIG_MIPS_ISA_CUSTOM
  655.23 ++	bool "Custom"
  655.24 ++
  655.25 + endchoice
  655.26 ++
  655.27 ++config CONFIG_MIPS_CPU_CFLAGS_CUSTOM
  655.28 ++	string
  655.29 ++	prompt "Custon ISA"
  655.30 ++	depends on CONFIG_MIPS_ISA_CUSTOM
  655.31 ++	default ""
  655.32 ++	help
  655.33 ++	  Enter your custom ISA here (eg: lx4189!).
  655.34 ++
   656.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   656.2 +++ b/patches/uClibc/0.9.28/201-mips-asm.h.patch	Sat Feb 24 11:00:05 2007 +0000
   656.3 @@ -0,0 +1,41 @@
   656.4 +diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/clone.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/clone.S
   656.5 +--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/clone.S	2007-02-07 11:18:12.000000000 +0100
   656.6 ++++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/clone.S	2007-02-07 10:41:34.000000000 +0100
   656.7 +@@ -24,7 +24,7 @@
   656.8 + #include <sys/regdef.h>
   656.9 + #define _ERRNO_H	1
  656.10 + #include <bits/errno.h>
  656.11 +-#include <asm/asm.h>
  656.12 ++#include <sys/asm.h>
  656.13 + 
  656.14 + /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
  656.15 + 
  656.16 +diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/pipe.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/pipe.S
  656.17 +--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/pipe.S	2007-02-07 11:18:12.000000000 +0100
  656.18 ++++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/pipe.S	2007-02-07 11:16:52.000000000 +0100
  656.19 +@@ -3,9 +3,9 @@
  656.20 + /*see uClibc's sh/pipe.c and glibc-2.2.4's mips/pipe.S */
  656.21 + 
  656.22 + #include <features.h>
  656.23 +-#include <asm/asm.h>
  656.24 ++#include <sys/asm.h>
  656.25 + #include <asm/unistd.h>
  656.26 +-#include <asm/regdef.h>
  656.27 ++#include <sys/regdef.h>
  656.28 + 
  656.29 +         .globl  pipe
  656.30 +         .ent    pipe, 0
  656.31 +diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/syscall.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/syscall.S
  656.32 +--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/syscall.S	2007-02-07 11:18:12.000000000 +0100
  656.33 ++++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/syscall.S	2007-02-07 11:17:03.000000000 +0100
  656.34 +@@ -17,8 +17,8 @@
  656.35 +    02111-1307 USA.  */
  656.36 + 
  656.37 + #include <features.h>
  656.38 +-#include <asm/asm.h>
  656.39 +-#include <asm/regdef.h>
  656.40 ++#include <sys/asm.h>
  656.41 ++#include <sys/regdef.h>
  656.42 + 
  656.43 + #ifdef __PIC__
  656.44 + 	.option pic2
   657.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   657.2 +++ b/samples/arm-qemu-linux-uclibc/crosstool.config	Sat Feb 24 11:00:05 2007 +0000
   657.3 @@ -0,0 +1,388 @@
   657.4 +#
   657.5 +# Automatically generated make config: don't edit
   657.6 +# crosstool-NG version: 0.0.1
   657.7 +# Thu Feb  8 21:23:17 2007
   657.8 +#
   657.9 +
  657.10 +#
  657.11 +# Paths and misc options
  657.12 +#
  657.13 +CT_PARALLEL_JOBS=1
  657.14 +CT_LOAD=0
  657.15 +CT_NICE=5
  657.16 +CT_USE_PIPES=y
  657.17 +
  657.18 +#
  657.19 +# Paths
  657.20 +#
  657.21 +CT_TARBALLS_DIR="${HOME}/dev/src"
  657.22 +CT_SRC_DIR="${HOME}/x-tools/src/${CT_TARGET}/${CT_CC}-${CT_CC_VERSION}-${CT_LIBC}-${CT_LIBC_VERSION}"
  657.23 +CT_BUILD_DIR="${HOME}/x-tools/build/${CT_TARGET}/${CT_CC}-${CT_CC_VERSION}-${CT_LIBC}-${CT_LIBC_VERSION}"
  657.24 +CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}"
  657.25 +CT_INSTALL_DIR="${CT_PREFIX_DIR}"
  657.26 +
  657.27 +#
  657.28 +# Downloading and extracting
  657.29 +#
  657.30 +# CT_NO_DOWNLOAD is not set
  657.31 +# CT_ONLY_DOWNLOAD is not set
  657.32 +# CT_FORCE_DOWNLOAD is not set
  657.33 +# CT_FORCE_EXTRACT is not set
  657.34 +
  657.35 +#
  657.36 +# Logging
  657.37 +#
  657.38 +# CT_LOG_ERROR is not set
  657.39 +# CT_LOG_WARN is not set
  657.40 +# CT_LOG_INFO is not set
  657.41 +CT_LOG_EXTRA=y
  657.42 +# CT_LOG_DEBUG is not set
  657.43 +CT_LOG_LEVEL_MAX="EXTRA"
  657.44 +# CT_LOG_PROGRESS_BAR is not set
  657.45 +# CT_LOG_USE_COLORS is not set
  657.46 +CT_LOG_TO_FILE=y
  657.47 +CT_LOG_FILE="${CT_PREFIX_DIR}/${CT_TARGET}.log"
  657.48 +
  657.49 +#
  657.50 +# Target options
  657.51 +#
  657.52 +
  657.53 +#
  657.54 +# General target options
  657.55 +#
  657.56 +CT_ARCH_ARM=y
  657.57 +# CT_ARCH_MIPS is not set
  657.58 +# CT_ARCH_x86 is not set
  657.59 +# CT_ARCH_x86_64 is not set
  657.60 +# CT_ARCH_BE is not set
  657.61 +CT_ARCH_LE=y
  657.62 +# CT_ARCH_FLOAT_HW is not set
  657.63 +CT_ARCH_FLOAT_SW=y
  657.64 +
  657.65 +#
  657.66 +# Target optimisations
  657.67 +#
  657.68 +CT_ARCH_CPU=""
  657.69 +CT_ARCH_TUNE=""
  657.70 +CT_ARCH_ARCH="armv5te"
  657.71 +CT_TARGET_CFLAGS=""
  657.72 +
  657.73 +#
  657.74 +# Toolchain options
  657.75 +#
  657.76 +CT_USE_SYSROOT=y
  657.77 +CT_SHARED_LIBS=y
  657.78 +CT_TARGET_VENDOR="qemu"
  657.79 +CT_TARGET_ALIAS=""
  657.80 +CT_ARCH="arm"
  657.81 +CT_BUILD=""
  657.82 +CT_CC_NATIVE="gcc"
  657.83 +# CT_CANADIAN is not set
  657.84 +CT_HOST=""
  657.85 +CT_HOST_CC=""
  657.86 +
  657.87 +#
  657.88 +# Kernel
  657.89 +#
  657.90 +CT_KERNEL_LINUX=y
  657.91 +# CT_KERNEL_CYGWIN is not set
  657.92 +CT_KERNEL_VERSION="2.6.20"
  657.93 +CT_KERNEL_LINUX_HEADERS_INSTALL=y
  657.94 +# CT_KERNEL_LINUX_HEADERS_SANITISED is not set
  657.95 +# CT_KERNEL_LINUX_HEADERS_COPY is not set
  657.96 +CT_KERNEL="linux"
  657.97 +CT_KERNEL_VERSION_SEE_EXTRAVERSION=y
  657.98 +# CT_KERNEL_INSTALL_V_2_6_18 is not set
  657.99 +# CT_KERNEL_INSTALL_V_2_6_18_1 is not set
 657.100 +# CT_KERNEL_INSTALL_V_2_6_18_2 is not set
 657.101 +# CT_KERNEL_INSTALL_V_2_6_18_3 is not set
 657.102 +# CT_KERNEL_INSTALL_V_2_6_18_4 is not set
 657.103 +# CT_KERNEL_INSTALL_V_2_6_18_5 is not set
 657.104 +# CT_KERNEL_INSTALL_V_2_6_18_6 is not set
 657.105 +# CT_KERNEL_INSTALL_V_2_6_19 is not set
 657.106 +# CT_KERNEL_INSTALL_V_2_6_19_1 is not set
 657.107 +# CT_KERNEL_INSTALL_V_2_6_19_2 is not set
 657.108 +CT_KERNEL_INSTALL_V_2_6_20=y
 657.109 +# CT_KERNEL_COPY_V_2_6_0 is not set
 657.110 +# CT_KERNEL_COPY_V_2_6_1 is not set
 657.111 +# CT_KERNEL_COPY_V_2_6_2 is not set
 657.112 +# CT_KERNEL_COPY_V_2_6_3 is not set
 657.113 +# CT_KERNEL_COPY_V_2_6_4 is not set
 657.114 +# CT_KERNEL_COPY_V_2_6_5 is not set
 657.115 +# CT_KERNEL_COPY_V_2_6_6 is not set
 657.116 +# CT_KERNEL_COPY_V_2_6_7 is not set
 657.117 +# CT_KERNEL_COPY_V_2_6_8 is not set
 657.118 +# CT_KERNEL_COPY_V_2_6_8_1 is not set
 657.119 +# CT_KERNEL_COPY_V_2_6_9 is not set
 657.120 +# CT_KERNEL_COPY_V_2_6_10 is not set
 657.121 +# CT_KERNEL_COPY_V_2_6_11 is not set
 657.122 +# CT_KERNEL_COPY_V_2_6_11_1 is not set
 657.123 +# CT_KERNEL_COPY_V_2_6_11_10 is not set
 657.124 +# CT_KERNEL_COPY_V_2_6_11_11 is not set
 657.125 +# CT_KERNEL_COPY_V_2_6_11_12 is not set
 657.126 +# CT_KERNEL_COPY_V_2_6_11_2 is not set
 657.127 +# CT_KERNEL_COPY_V_2_6_11_3 is not set
 657.128 +# CT_KERNEL_COPY_V_2_6_11_4 is not set
 657.129 +# CT_KERNEL_COPY_V_2_6_11_5 is not set
 657.130 +# CT_KERNEL_COPY_V_2_6_11_6 is not set
 657.131 +# CT_KERNEL_COPY_V_2_6_11_7 is not set
 657.132 +# CT_KERNEL_COPY_V_2_6_11_8 is not set
 657.133 +# CT_KERNEL_COPY_V_2_6_11_9 is not set
 657.134 +# CT_KERNEL_COPY_V_2_6_12 is not set
 657.135 +# CT_KERNEL_COPY_V_2_6_12_1 is not set
 657.136 +# CT_KERNEL_COPY_V_2_6_12_2 is not set
 657.137 +# CT_KERNEL_COPY_V_2_6_12_3 is not set
 657.138 +# CT_KERNEL_COPY_V_2_6_12_4 is not set
 657.139 +# CT_KERNEL_COPY_V_2_6_12_5 is not set
 657.140 +# CT_KERNEL_COPY_V_2_6_12_6 is not set
 657.141 +# CT_KERNEL_COPY_V_2_6_13 is not set
 657.142 +# CT_KERNEL_COPY_V_2_6_13_1 is not set
 657.143 +# CT_KERNEL_COPY_V_2_6_13_2 is not set
 657.144 +# CT_KERNEL_COPY_V_2_6_13_3 is not set
 657.145 +# CT_KERNEL_COPY_V_2_6_13_4 is not set
 657.146 +# CT_KERNEL_COPY_V_2_6_13_5 is not set
 657.147 +# CT_KERNEL_COPY_V_2_6_14 is not set
 657.148 +# CT_KERNEL_COPY_V_2_6_14_1 is not set
 657.149 +# CT_KERNEL_COPY_V_2_6_14_2 is not set
 657.150 +# CT_KERNEL_COPY_V_2_6_14_3 is not set
 657.151 +# CT_KERNEL_COPY_V_2_6_14_4 is not set
 657.152 +# CT_KERNEL_COPY_V_2_6_14_5 is not set
 657.153 +# CT_KERNEL_COPY_V_2_6_14_6 is not set
 657.154 +# CT_KERNEL_COPY_V_2_6_14_7 is not set
 657.155 +# CT_KERNEL_COPY_V_2_6_15 is not set
 657.156 +# CT_KERNEL_COPY_V_2_6_15_1 is not set
 657.157 +# CT_KERNEL_COPY_V_2_6_15_2 is not set
 657.158 +# CT_KERNEL_COPY_V_2_6_15_3 is not set
 657.159 +# CT_KERNEL_COPY_V_2_6_15_4 is not set
 657.160 +# CT_KERNEL_COPY_V_2_6_15_5 is not set
 657.161 +# CT_KERNEL_COPY_V_2_6_15_6 is not set
 657.162 +# CT_KERNEL_COPY_V_2_6_15_7 is not set
 657.163 +# CT_KERNEL_COPY_V_2_6_16 is not set
 657.164 +# CT_KERNEL_COPY_V_2_6_16_1 is not set
 657.165 +# CT_KERNEL_COPY_V_2_6_16_10 is not set
 657.166 +# CT_KERNEL_COPY_V_2_6_16_11 is not set
 657.167 +# CT_KERNEL_COPY_V_2_6_16_12 is not set
 657.168 +# CT_KERNEL_COPY_V_2_6_16_13 is not set
 657.169 +# CT_KERNEL_COPY_V_2_6_16_14 is not set
 657.170 +# CT_KERNEL_COPY_V_2_6_16_15 is not set
 657.171 +# CT_KERNEL_COPY_V_2_6_16_16 is not set
 657.172 +# CT_KERNEL_COPY_V_2_6_16_17 is not set
 657.173 +# CT_KERNEL_COPY_V_2_6_16_18 is not set
 657.174 +# CT_KERNEL_COPY_V_2_6_16_19 is not set
 657.175 +# CT_KERNEL_COPY_V_2_6_16_2 is not set
 657.176 +# CT_KERNEL_COPY_V_2_6_16_20 is not set
 657.177 +# CT_KERNEL_COPY_V_2_6_16_21 is not set
 657.178 +# CT_KERNEL_COPY_V_2_6_16_22 is not set
 657.179 +# CT_KERNEL_COPY_V_2_6_16_23 is not set
 657.180 +# CT_KERNEL_COPY_V_2_6_16_24 is not set
 657.181 +# CT_KERNEL_COPY_V_2_6_16_25 is not set
 657.182 +# CT_KERNEL_COPY_V_2_6_16_26 is not set
 657.183 +# CT_KERNEL_COPY_V_2_6_16_27 is not set
 657.184 +# CT_KERNEL_COPY_V_2_6_16_28 is not set
 657.185 +# CT_KERNEL_COPY_V_2_6_16_29 is not set
 657.186 +# CT_KERNEL_COPY_V_2_6_16_3 is not set
 657.187 +# CT_KERNEL_COPY_V_2_6_16_30 is not set
 657.188 +# CT_KERNEL_COPY_V_2_6_16_31 is not set
 657.189 +# CT_KERNEL_COPY_V_2_6_16_32 is not set
 657.190 +# CT_KERNEL_COPY_V_2_6_16_33 is not set
 657.191 +# CT_KERNEL_COPY_V_2_6_16_34 is not set
 657.192 +# CT_KERNEL_COPY_V_2_6_16_35 is not set
 657.193 +# CT_KERNEL_COPY_V_2_6_16_36 is not set
 657.194 +# CT_KERNEL_COPY_V_2_6_16_4 is not set
 657.195 +# CT_KERNEL_COPY_V_2_6_16_5 is not set
 657.196 +# CT_KERNEL_COPY_V_2_6_16_6 is not set
 657.197 +# CT_KERNEL_COPY_V_2_6_16_7 is not set
 657.198 +# CT_KERNEL_COPY_V_2_6_16_8 is not set
 657.199 +# CT_KERNEL_COPY_V_2_6_16_9 is not set
 657.200 +# CT_KERNEL_COPY_V_2_6_17 is not set
 657.201 +# CT_KERNEL_COPY_V_2_6_17_1 is not set
 657.202 +# CT_KERNEL_COPY_V_2_6_17_10 is not set
 657.203 +# CT_KERNEL_COPY_V_2_6_17_11 is not set
 657.204 +# CT_KERNEL_COPY_V_2_6_17_12 is not set
 657.205 +# CT_KERNEL_COPY_V_2_6_17_13 is not set
 657.206 +# CT_KERNEL_COPY_V_2_6_17_14 is not set
 657.207 +# CT_KERNEL_COPY_V_2_6_17_2 is not set
 657.208 +# CT_KERNEL_COPY_V_2_6_17_3 is not set
 657.209 +# CT_KERNEL_COPY_V_2_6_17_4 is not set
 657.210 +# CT_KERNEL_COPY_V_2_6_17_5 is not set
 657.211 +# CT_KERNEL_COPY_V_2_6_17_6 is not set
 657.212 +# CT_KERNEL_COPY_V_2_6_17_7 is not set
 657.213 +# CT_KERNEL_COPY_V_2_6_17_8 is not set
 657.214 +# CT_KERNEL_COPY_V_2_6_17_9 is not set
 657.215 +# CT_KERNEL_COPY_V_2_6_18 is not set
 657.216 +# CT_KERNEL_COPY_V_2_6_18_1 is not set
 657.217 +# CT_KERNEL_COPY_V_2_6_18_2 is not set
 657.218 +# CT_KERNEL_COPY_V_2_6_18_3 is not set
 657.219 +# CT_KERNEL_COPY_V_2_6_18_4 is not set
 657.220 +# CT_KERNEL_COPY_V_2_6_18_5 is not set
 657.221 +# CT_KERNEL_COPY_V_2_6_18_6 is not set
 657.222 +# CT_KERNEL_COPY_V_2_6_19 is not set
 657.223 +# CT_KERNEL_COPY_V_2_6_19_1 is not set
 657.224 +# CT_KERNEL_SANITISED_V_2_6_7_0 is not set
 657.225 +# CT_KERNEL_SANITISED_V_2_6_8_0 is not set
 657.226 +# CT_KERNEL_SANITISED_V_2_6_8_1 is not set
 657.227 +# CT_KERNEL_SANITISED_V_2_6_9_0 is not set
 657.228 +# CT_KERNEL_SANITISED_V_2_6_9_1 is not set
 657.229 +# CT_KERNEL_SANITISED_V_2_6_10_0 is not set
 657.230 +# CT_KERNEL_SANITISED_V_2_6_11_0 is not set
 657.231 +# CT_KERNEL_SANITISED_V_2_6_11_1 is not set
 657.232 +# CT_KERNEL_SANITISED_V_2_6_11_2 is not set
 657.233 +# CT_KERNEL_SANITISED_V_2_6_12_0 is not set
 657.234 +CT_KERNEL_LINUX_VERBOSITY_0=y
 657.235 +# CT_KERNEL_LINUX_VERBOSITY_1 is not set
 657.236 +# CT_KERNEL_LINUX_VERBOSITY_2 is not set
 657.237 +CT_KERNEL_LINUX_VERBOSE_LEVEL=0
 657.238 +CT_KERNEL_LINUX_CONFIG_FILE="${CT_TOP_DIR}/samples/${CT_TARGET}/${CT_KERNEL}-${CT_KERNEL_VERSION}.config"
 657.239 +
 657.240 +#
 657.241 +# binutils
 657.242 +#
 657.243 +CT_BINUTILS_VERSION="2.17.50.0.10"
 657.244 +# CT_BINUTILS_V_2_11_2 is not set
 657.245 +# CT_BINUTILS_V_2_13_90 is not set
 657.246 +# CT_BINUTILS_V_2_14 is not set
 657.247 +# CT_BINUTILS_V_2_14_90 is not set
 657.248 +# CT_BINUTILS_V_2_14_92 is not set
 657.249 +# CT_BINUTILS_V_2_15 is not set
 657.250 +# CT_BINUTILS_V_2_15_90 is not set
 657.251 +# CT_BINUTILS_V_2_15_91 is not set
 657.252 +# CT_BINUTILS_V_2_16 is not set
 657.253 +# CT_BINUTILS_V_2_16_1 is not set
 657.254 +# CT_BINUTILS_V_2_17 is not set
 657.255 +# CT_BINUTILS_V_2_17_50_0_1 is not set
 657.256 +# CT_BINUTILS_V_2_17_50_0_2 is not set
 657.257 +# CT_BINUTILS_V_2_17_50_0_3 is not set
 657.258 +# CT_BINUTILS_V_2_17_50_0_4 is not set
 657.259 +# CT_BINUTILS_V_2_17_50_0_5 is not set
 657.260 +# CT_BINUTILS_V_2_17_50_0_6 is not set
 657.261 +# CT_BINUTILS_V_2_17_50_0_7 is not set
 657.262 +# CT_BINUTILS_V_2_17_50_0_8 is not set
 657.263 +# CT_BINUTILS_V_2_17_50_0_9 is not set
 657.264 +CT_BINUTILS_V_2_17_50_0_10=y
 657.265 +CT_BINUTILS_EXTRA_CONFIG=""
 657.266 +
 657.267 +#
 657.268 +# C compiler
 657.269 +#
 657.270 +
 657.271 +#
 657.272 +# Core C Compiler (used to build the C library)
 657.273 +#
 657.274 +# CT_CC_USE_CORE is not set
 657.275 +CT_CC_CORE_GCC=y
 657.276 +# CT_CC_CORE_TCC is not set
 657.277 +CT_CC_CORE_VERSION=""
 657.278 +CT_CC_CORE="gcc"
 657.279 +# CT_CC_CORE_V_2_95_3 is not set
 657.280 +# CT_CC_CORE_V_3_2_3 is not set
 657.281 +# CT_CC_CORE_V_3_3 is not set
 657.282 +# CT_CC_CORE_V_3_3_1 is not set
 657.283 +# CT_CC_CORE_V_3_3_2 is not set
 657.284 +# CT_CC_CORE_V_3_3_3 is not set
 657.285 +# CT_CC_CORE_V_3_3_4 is not set
 657.286 +# CT_CC_CORE_V_3_3_5 is not set
 657.287 +# CT_CC_CORE_V_3_3_6 is not set
 657.288 +# CT_CC_CORE_V_3_4_0 is not set
 657.289 +# CT_CC_CORE_V_3_4_1 is not set
 657.290 +# CT_CC_CORE_V_3_4_2 is not set
 657.291 +# CT_CC_CORE_V_3_4_3 is not set
 657.292 +# CT_CC_CORE_V_3_4_4 is not set
 657.293 +# CT_CC_CORE_V_3_4_5 is not set
 657.294 +# CT_CC_CORE_V_3_4_6 is not set
 657.295 +# CT_CC_CORE_V_4_0_0 is not set
 657.296 +# CT_CC_CORE_V_4_0_1 is not set
 657.297 +# CT_CC_CORE_V_4_0_2 is not set
 657.298 +# CT_CC_CORE_V_4_0_3 is not set
 657.299 +# CT_CC_CORE_V_4_0_4 is not set
 657.300 +# CT_CC_CORE_V_4_1_0 is not set
 657.301 +# CT_CC_CORE_V_4_1_1 is not set
 657.302 +CT_CC_CORE_EXTRA_CONFIG=""
 657.303 +
 657.304 +#
 657.305 +# Final C compiler
 657.306 +#
 657.307 +CT_CC_GCC=y
 657.308 +CT_CC_VERSION="4.1.1"
 657.309 +CT_CC="gcc"
 657.310 +# CT_CC_V_2_95_3 is not set
 657.311 +# CT_CC_V_3_2_3 is not set
 657.312 +# CT_CC_V_3_3 is not set
 657.313 +# CT_CC_V_3_3_1 is not set
 657.314 +# CT_CC_V_3_3_2 is not set
 657.315 +# CT_CC_V_3_3_3 is not set
 657.316 +# CT_CC_V_3_3_4 is not set
 657.317 +# CT_CC_V_3_3_5 is not set
 657.318 +# CT_CC_V_3_3_6 is not set
 657.319 +# CT_CC_V_3_4_0 is not set
 657.320 +# CT_CC_V_3_4_1 is not set
 657.321 +# CT_CC_V_3_4_2 is not set
 657.322 +# CT_CC_V_3_4_3 is not set
 657.323 +# CT_CC_V_3_4_4 is not set
 657.324 +# CT_CC_V_3_4_5 is not set
 657.325 +# CT_CC_V_4_0_0 is not set
 657.326 +# CT_CC_V_4_0_1 is not set
 657.327 +# CT_CC_V_4_0_2 is not set
 657.328 +# CT_CC_V_4_0_3 is not set
 657.329 +# CT_CC_V_4_0_4 is not set
 657.330 +# CT_CC_V_4_1_0 is not set
 657.331 +CT_CC_V_4_1_1=y
 657.332 +CT_CC_EXTRA_CONFIG=""
 657.333 +CT_CC_SUPPORT_C=y
 657.334 +CT_CC_SUPPORT_CXX=y
 657.335 +CT_CC_SUPPORT_JAVA=y
 657.336 +
 657.337 +#
 657.338 +# Supported languages:
 657.339 +#
 657.340 +CT_CC_LANG_C=y
 657.341 +# CT_CC_LANG_CXX is not set
 657.342 +# CT_CC_LANG_JAVA is not set
 657.343 +
 657.344 +#
 657.345 +# C-library
 657.346 +#
 657.347 +# CT_LIBC_GLIBC is not set
 657.348 +CT_LIBC_UCLIBC=y
 657.349 +CT_LIBC_VERSION="0.9.28.1"
 657.350 +CT_LIBC="uClibc"
 657.351 +# CT_LIBC_V_1_09_1 is not set
 657.352 +# CT_LIBC_V_2_0_1 is not set
 657.353 +# CT_LIBC_V_2_0_6 is not set
 657.354 +# CT_LIBC_V_2_1_1 is not set
 657.355 +# CT_LIBC_V_2_1_2 is not set
 657.356 +# CT_LIBC_V_2_1_3 is not set
 657.357 +# CT_LIBC_V_2_2 is not set
 657.358 +# CT_LIBC_V_2_2_1 is not set
 657.359 +# CT_LIBC_V_2_2_2 is not set
 657.360 +# CT_LIBC_V_2_2_3 is not set
 657.361 +# CT_LIBC_V_2_2_4 is not set
 657.362 +# CT_LIBC_V_2_2_5 is not set
 657.363 +# CT_LIBC_V_2_3 is not set
 657.364 +# CT_LIBC_V_2_3_1 is not set
 657.365 +# CT_LIBC_V_2_3_2 is not set
 657.366 +# CT_LIBC_V_2_3_3 is not set
 657.367 +# CT_LIBC_V_2_3_4 is not set
 657.368 +# CT_LIBC_V_2_3_5 is not set
 657.369 +# CT_LIBC_V_2_3_6 is not set
 657.370 +# CT_LIBC_V_2_4 is not set
 657.371 +# CT_LIBC_V_2_5 is not set
 657.372 +# CT_LIBC_GLIBC_THREADS_NPTL is not set
 657.373 +# CT_LIBC_GLIBC_THREADS_LINUXTHREADS is not set
 657.374 +# CT_LIBC_GLIBC_THREADS_NONE is not set
 657.375 +CT_LIBC_GLIBC_EXTRA_CONFIG=""
 657.376 +CT_LIBC_GLIBC_EXTRA_CFLAGS=""
 657.377 +CT_LIBC_EXTRA_CC_ARGS=""
 657.378 +CT_LIBC_GLIBC_CONFIGPARMS=""
 657.379 +CT_LIBC_ADDONS=""
 657.380 +# CT_LIBC_V_snapshot is not set
 657.381 +# CT_LIBC_V_specific_date is not set
 657.382 +# CT_LIBC_V_0_9_26 is not set
 657.383 +# CT_LIBC_V_0_9_27 is not set
 657.384 +# CT_LIBC_V_0_9_28 is not set
 657.385 +CT_LIBC_V_0_9_28_1=y
 657.386 +CT_LIBC_UCLIBC_DEBUG_LEVEL_0=y
 657.387 +# CT_LIBC_UCLIBC_DEBUG_LEVEL_1 is not set
 657.388 +# CT_LIBC_UCLIBC_DEBUG_LEVEL_2 is not set
 657.389 +CT_LIBC_UCLIBC_DEBUG_LEVEL=0
 657.390 +CT_LIBC_UCLIBC_CONFIG_FILE="${CT_TOP_DIR}/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
 657.391 +# CT_LIBC_UCLIBC_LOCALES is not set
   658.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   658.2 +++ b/samples/arm-qemu-linux-uclibc/linux-2.6.20.config	Sat Feb 24 11:00:05 2007 +0000
   658.3 @@ -0,0 +1,997 @@
   658.4 +#
   658.5 +# Automatically generated make config: don't edit
   658.6 +# Linux kernel version: 2.6.20
   658.7 +# Thu Feb  8 19:19:07 2007
   658.8 +#
   658.9 +CONFIG_ARM=y
  658.10 +# CONFIG_GENERIC_TIME is not set
  658.11 +CONFIG_MMU=y
  658.12 +CONFIG_GENERIC_HARDIRQS=y
  658.13 +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
  658.14 +CONFIG_HARDIRQS_SW_RESEND=y
  658.15 +CONFIG_GENERIC_IRQ_PROBE=y
  658.16 +CONFIG_RWSEM_GENERIC_SPINLOCK=y
  658.17 +# CONFIG_ARCH_HAS_ILOG2_U32 is not set
  658.18 +# CONFIG_ARCH_HAS_ILOG2_U64 is not set
  658.19 +CONFIG_GENERIC_HWEIGHT=y
  658.20 +CONFIG_GENERIC_CALIBRATE_DELAY=y
  658.21 +CONFIG_VECTORS_BASE=0xffff0000
  658.22 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
  658.23 +
  658.24 +#
  658.25 +# Code maturity level options
  658.26 +#
  658.27 +CONFIG_EXPERIMENTAL=y
  658.28 +CONFIG_BROKEN_ON_SMP=y
  658.29 +CONFIG_INIT_ENV_ARG_LIMIT=32
  658.30 +
  658.31 +#
  658.32 +# General setup
  658.33 +#
  658.34 +CONFIG_LOCALVERSION="-qemu"
  658.35 +# CONFIG_LOCALVERSION_AUTO is not set
  658.36 +CONFIG_SWAP=y
  658.37 +CONFIG_SYSVIPC=y
  658.38 +# CONFIG_IPC_NS is not set
  658.39 +# CONFIG_POSIX_MQUEUE is not set
  658.40 +# CONFIG_BSD_PROCESS_ACCT is not set
  658.41 +# CONFIG_TASKSTATS is not set
  658.42 +# CONFIG_UTS_NS is not set
  658.43 +# CONFIG_AUDIT is not set
  658.44 +CONFIG_IKCONFIG=y
  658.45 +CONFIG_IKCONFIG_PROC=y
  658.46 +CONFIG_SYSFS_DEPRECATED=y
  658.47 +# CONFIG_RELAY is not set
  658.48 +CONFIG_INITRAMFS_SOURCE=""
  658.49 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
  658.50 +CONFIG_SYSCTL=y
  658.51 +# CONFIG_EMBEDDED is not set
  658.52 +CONFIG_UID16=y
  658.53 +CONFIG_SYSCTL_SYSCALL=y
  658.54 +CONFIG_KALLSYMS=y
  658.55 +# CONFIG_KALLSYMS_ALL is not set
  658.56 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
  658.57 +CONFIG_HOTPLUG=y
  658.58 +CONFIG_PRINTK=y
  658.59 +CONFIG_BUG=y
  658.60 +CONFIG_ELF_CORE=y
  658.61 +CONFIG_BASE_FULL=y
  658.62 +CONFIG_FUTEX=y
  658.63 +CONFIG_EPOLL=y
  658.64 +CONFIG_SHMEM=y
  658.65 +CONFIG_SLAB=y
  658.66 +CONFIG_VM_EVENT_COUNTERS=y
  658.67 +CONFIG_RT_MUTEXES=y
  658.68 +# CONFIG_TINY_SHMEM is not set
  658.69 +CONFIG_BASE_SMALL=0
  658.70 +# CONFIG_SLOB is not set
  658.71 +
  658.72 +#
  658.73 +# Loadable module support
  658.74 +#
  658.75 +CONFIG_MODULES=y
  658.76 +CONFIG_MODULE_UNLOAD=y
  658.77 +CONFIG_MODULE_FORCE_UNLOAD=y
  658.78 +# CONFIG_MODVERSIONS is not set
  658.79 +# CONFIG_MODULE_SRCVERSION_ALL is not set
  658.80 +CONFIG_KMOD=y
  658.81 +
  658.82 +#
  658.83 +# Block layer
  658.84 +#
  658.85 +CONFIG_BLOCK=y
  658.86 +# CONFIG_LBD is not set
  658.87 +# CONFIG_BLK_DEV_IO_TRACE is not set
  658.88 +# CONFIG_LSF is not set
  658.89 +
  658.90 +#
  658.91 +# IO Schedulers
  658.92 +#
  658.93 +CONFIG_IOSCHED_NOOP=y
  658.94 +# CONFIG_IOSCHED_AS is not set
  658.95 +# CONFIG_IOSCHED_DEADLINE is not set
  658.96 +CONFIG_IOSCHED_CFQ=y
  658.97 +# CONFIG_DEFAULT_AS is not set
  658.98 +# CONFIG_DEFAULT_DEADLINE is not set
  658.99 +CONFIG_DEFAULT_CFQ=y
 658.100 +# CONFIG_DEFAULT_NOOP is not set
 658.101 +CONFIG_DEFAULT_IOSCHED="cfq"
 658.102 +
 658.103 +#
 658.104 +# System Type
 658.105 +#
 658.106 +# CONFIG_ARCH_AAEC2000 is not set
 658.107 +# CONFIG_ARCH_INTEGRATOR is not set
 658.108 +# CONFIG_ARCH_REALVIEW is not set
 658.109 +CONFIG_ARCH_VERSATILE=y
 658.110 +# CONFIG_ARCH_AT91 is not set
 658.111 +# CONFIG_ARCH_CLPS7500 is not set
 658.112 +# CONFIG_ARCH_CLPS711X is not set
 658.113 +# CONFIG_ARCH_CO285 is not set
 658.114 +# CONFIG_ARCH_EBSA110 is not set
 658.115 +# CONFIG_ARCH_EP93XX is not set
 658.116 +# CONFIG_ARCH_FOOTBRIDGE is not set
 658.117 +# CONFIG_ARCH_NETX is not set
 658.118 +# CONFIG_ARCH_H720X is not set
 658.119 +# CONFIG_ARCH_IMX is not set
 658.120 +# CONFIG_ARCH_IOP32X is not set
 658.121 +# CONFIG_ARCH_IOP33X is not set
 658.122 +# CONFIG_ARCH_IOP13XX is not set
 658.123 +# CONFIG_ARCH_IXP4XX is not set
 658.124 +# CONFIG_ARCH_IXP2000 is not set
 658.125 +# CONFIG_ARCH_IXP23XX is not set
 658.126 +# CONFIG_ARCH_L7200 is not set
 658.127 +# CONFIG_ARCH_PNX4008 is not set
 658.128 +# CONFIG_ARCH_PXA is not set
 658.129 +# CONFIG_ARCH_RPC is not set
 658.130 +# CONFIG_ARCH_SA1100 is not set
 658.131 +# CONFIG_ARCH_S3C2410 is not set
 658.132 +# CONFIG_ARCH_SHARK is not set
 658.133 +# CONFIG_ARCH_LH7A40X is not set
 658.134 +# CONFIG_ARCH_OMAP is not set
 658.135 +
 658.136 +#
 658.137 +# Versatile platform type
 658.138 +#
 658.139 +CONFIG_ARCH_VERSATILE_PB=y
 658.140 +# CONFIG_MACH_VERSATILE_AB is not set
 658.141 +
 658.142 +#
 658.143 +# Processor Type
 658.144 +#
 658.145 +CONFIG_CPU_32=y
 658.146 +CONFIG_CPU_ARM926T=y
 658.147 +CONFIG_CPU_32v5=y
 658.148 +CONFIG_CPU_ABRT_EV5TJ=y
 658.149 +CONFIG_CPU_CACHE_VIVT=y
 658.150 +CONFIG_CPU_COPY_V4WB=y
 658.151 +CONFIG_CPU_TLB_V4WBI=y
 658.152 +CONFIG_CPU_CP15=y
 658.153 +CONFIG_CPU_CP15_MMU=y
 658.154 +
 658.155 +#
 658.156 +# Processor Features
 658.157 +#
 658.158 +CONFIG_ARM_THUMB=y
 658.159 +CONFIG_CPU_ICACHE_DISABLE=y
 658.160 +# CONFIG_CPU_DCACHE_DISABLE is not set
 658.161 +# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
 658.162 +# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
 658.163 +CONFIG_ARM_VIC=y
 658.164 +CONFIG_ICST307=y
 658.165 +
 658.166 +#
 658.167 +# Bus support
 658.168 +#
 658.169 +CONFIG_ARM_AMBA=y
 658.170 +CONFIG_PCI=y
 658.171 +# CONFIG_PCI_DEBUG is not set
 658.172 +
 658.173 +#
 658.174 +# PCCARD (PCMCIA/CardBus) support
 658.175 +#
 658.176 +# CONFIG_PCCARD is not set
 658.177 +
 658.178 +#
 658.179 +# Kernel Features
 658.180 +#
 658.181 +# CONFIG_PREEMPT is not set
 658.182 +# CONFIG_NO_IDLE_HZ is not set
 658.183 +CONFIG_HZ=100
 658.184 +# CONFIG_AEABI is not set
 658.185 +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
 658.186 +CONFIG_SELECT_MEMORY_MODEL=y
 658.187 +CONFIG_FLATMEM_MANUAL=y
 658.188 +# CONFIG_DISCONTIGMEM_MANUAL is not set
 658.189 +# CONFIG_SPARSEMEM_MANUAL is not set
 658.190 +CONFIG_FLATMEM=y
 658.191 +CONFIG_FLAT_NODE_MEM_MAP=y
 658.192 +# CONFIG_SPARSEMEM_STATIC is not set
 658.193 +CONFIG_SPLIT_PTLOCK_CPUS=4096
 658.194 +# CONFIG_RESOURCES_64BIT is not set
 658.195 +# CONFIG_LEDS is not set
 658.196 +CONFIG_ALIGNMENT_TRAP=y
 658.197 +
 658.198 +#
 658.199 +# Boot options
 658.200 +#
 658.201 +CONFIG_ZBOOT_ROM_TEXT=0x0
 658.202 +CONFIG_ZBOOT_ROM_BSS=0x0
 658.203 +CONFIG_CMDLINE="root=1f03 mem=32M"
 658.204 +# CONFIG_XIP_KERNEL is not set
 658.205 +
 658.206 +#
 658.207 +# Floating point emulation
 658.208 +#
 658.209 +
 658.210 +#
 658.211 +# At least one emulation must be selected
 658.212 +#
 658.213 +# CONFIG_FPE_NWFPE is not set
 658.214 +# CONFIG_FPE_FASTFPE is not set
 658.215 +# CONFIG_VFP is not set
 658.216 +
 658.217 +#
 658.218 +# Userspace binary formats
 658.219 +#
 658.220 +CONFIG_BINFMT_ELF=y
 658.221 +# CONFIG_BINFMT_AOUT is not set
 658.222 +# CONFIG_BINFMT_MISC is not set
 658.223 +# CONFIG_ARTHUR is not set
 658.224 +
 658.225 +#
 658.226 +# Power management options
 658.227 +#
 658.228 +# CONFIG_PM is not set
 658.229 +# CONFIG_APM is not set
 658.230 +
 658.231 +#
 658.232 +# Networking
 658.233 +#
 658.234 +CONFIG_NET=y
 658.235 +
 658.236 +#
 658.237 +# Networking options
 658.238 +#
 658.239 +# CONFIG_NETDEBUG is not set
 658.240 +CONFIG_PACKET=y
 658.241 +CONFIG_PACKET_MMAP=y
 658.242 +CONFIG_UNIX=y
 658.243 +# CONFIG_NET_KEY is not set
 658.244 +CONFIG_INET=y
 658.245 +# CONFIG_IP_MULTICAST is not set
 658.246 +# CONFIG_IP_ADVANCED_ROUTER is not set
 658.247 +CONFIG_IP_FIB_HASH=y
 658.248 +# CONFIG_IP_PNP is not set
 658.249 +# CONFIG_NET_IPIP is not set
 658.250 +# CONFIG_NET_IPGRE is not set
 658.251 +# CONFIG_ARPD is not set
 658.252 +CONFIG_SYN_COOKIES=y
 658.253 +# CONFIG_INET_AH is not set
 658.254 +# CONFIG_INET_ESP is not set
 658.255 +# CONFIG_INET_IPCOMP is not set
 658.256 +# CONFIG_INET_XFRM_TUNNEL is not set
 658.257 +# CONFIG_INET_TUNNEL is not set
 658.258 +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
 658.259 +# CONFIG_INET_XFRM_MODE_TUNNEL is not set
 658.260 +# CONFIG_INET_XFRM_MODE_BEET is not set
 658.261 +# CONFIG_INET_DIAG is not set
 658.262 +# CONFIG_TCP_CONG_ADVANCED is not set
 658.263 +CONFIG_TCP_CONG_CUBIC=y
 658.264 +CONFIG_DEFAULT_TCP_CONG="cubic"
 658.265 +# CONFIG_TCP_MD5SIG is not set
 658.266 +# CONFIG_IPV6 is not set
 658.267 +# CONFIG_INET6_XFRM_TUNNEL is not set
 658.268 +# CONFIG_INET6_TUNNEL is not set
 658.269 +# CONFIG_NETWORK_SECMARK is not set
 658.270 +# CONFIG_NETFILTER is not set
 658.271 +
 658.272 +#
 658.273 +# DCCP Configuration (EXPERIMENTAL)
 658.274 +#
 658.275 +# CONFIG_IP_DCCP is not set
 658.276 +
 658.277 +#
 658.278 +# SCTP Configuration (EXPERIMENTAL)
 658.279 +#
 658.280 +# CONFIG_IP_SCTP is not set
 658.281 +
 658.282 +#
 658.283 +# TIPC Configuration (EXPERIMENTAL)
 658.284 +#
 658.285 +# CONFIG_TIPC is not set
 658.286 +# CONFIG_ATM is not set
 658.287 +# CONFIG_BRIDGE is not set
 658.288 +# CONFIG_VLAN_8021Q is not set
 658.289 +# CONFIG_DECNET is not set
 658.290 +# CONFIG_LLC2 is not set
 658.291 +# CONFIG_IPX is not set
 658.292 +# CONFIG_ATALK is not set
 658.293 +# CONFIG_X25 is not set
 658.294 +# CONFIG_LAPB is not set
 658.295 +# CONFIG_ECONET is not set
 658.296 +# CONFIG_WAN_ROUTER is not set
 658.297 +
 658.298 +#
 658.299 +# QoS and/or fair queueing
 658.300 +#
 658.301 +# CONFIG_NET_SCHED is not set
 658.302 +
 658.303 +#
 658.304 +# Network testing
 658.305 +#
 658.306 +# CONFIG_NET_PKTGEN is not set
 658.307 +# CONFIG_HAMRADIO is not set
 658.308 +# CONFIG_IRDA is not set
 658.309 +# CONFIG_BT is not set
 658.310 +# CONFIG_IEEE80211 is not set
 658.311 +
 658.312 +#
 658.313 +# Device Drivers
 658.314 +#
 658.315 +
 658.316 +#
 658.317 +# Generic Driver Options
 658.318 +#
 658.319 +CONFIG_STANDALONE=y
 658.320 +CONFIG_PREVENT_FIRMWARE_BUILD=y
 658.321 +CONFIG_FW_LOADER=m
 658.322 +# CONFIG_DEBUG_DRIVER is not set
 658.323 +# CONFIG_SYS_HYPERVISOR is not set
 658.324 +
 658.325 +#
 658.326 +# Connector - unified userspace <-> kernelspace linker
 658.327 +#
 658.328 +# CONFIG_CONNECTOR is not set
 658.329 +
 658.330 +#
 658.331 +# Memory Technology Devices (MTD)
 658.332 +#
 658.333 +# CONFIG_MTD is not set
 658.334 +# CONFIG_MTD_CFI_NOSWAP is not set
 658.335 +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
 658.336 +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
 658.337 +
 658.338 +#
 658.339 +# Parallel port support
 658.340 +#
 658.341 +# CONFIG_PARPORT is not set
 658.342 +
 658.343 +#
 658.344 +# Plug and Play support
 658.345 +#
 658.346 +
 658.347 +#
 658.348 +# Block devices
 658.349 +#
 658.350 +# CONFIG_BLK_CPQ_DA is not set
 658.351 +# CONFIG_BLK_CPQ_CISS_DA is not set
 658.352 +# CONFIG_BLK_DEV_DAC960 is not set
 658.353 +# CONFIG_BLK_DEV_UMEM is not set
 658.354 +# CONFIG_BLK_DEV_COW_COMMON is not set
 658.355 +# CONFIG_BLK_DEV_LOOP is not set
 658.356 +# CONFIG_BLK_DEV_NBD is not set
 658.357 +# CONFIG_BLK_DEV_SX8 is not set
 658.358 +# CONFIG_BLK_DEV_UB is not set
 658.359 +CONFIG_BLK_DEV_RAM=y
 658.360 +CONFIG_BLK_DEV_RAM_COUNT=16
 658.361 +CONFIG_BLK_DEV_RAM_SIZE=16384
 658.362 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 658.363 +CONFIG_BLK_DEV_INITRD=y
 658.364 +# CONFIG_CDROM_PKTCDVD is not set
 658.365 +# CONFIG_ATA_OVER_ETH is not set
 658.366 +
 658.367 +#
 658.368 +# SCSI device support
 658.369 +#
 658.370 +# CONFIG_RAID_ATTRS is not set
 658.371 +# CONFIG_SCSI is not set
 658.372 +# CONFIG_SCSI_NETLINK is not set
 658.373 +
 658.374 +#
 658.375 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
 658.376 +#
 658.377 +# CONFIG_ATA is not set
 658.378 +
 658.379 +#
 658.380 +# Multi-device support (RAID and LVM)
 658.381 +#
 658.382 +# CONFIG_MD is not set
 658.383 +
 658.384 +#
 658.385 +# Fusion MPT device support
 658.386 +#
 658.387 +# CONFIG_FUSION is not set
 658.388 +
 658.389 +#
 658.390 +# IEEE 1394 (FireWire) support
 658.391 +#
 658.392 +# CONFIG_IEEE1394 is not set
 658.393 +
 658.394 +#
 658.395 +# I2O device support
 658.396 +#
 658.397 +# CONFIG_I2O is not set
 658.398 +
 658.399 +#
 658.400 +# Network device support
 658.401 +#
 658.402 +CONFIG_NETDEVICES=y
 658.403 +# CONFIG_DUMMY is not set
 658.404 +# CONFIG_BONDING is not set
 658.405 +# CONFIG_EQUALIZER is not set
 658.406 +# CONFIG_TUN is not set
 658.407 +
 658.408 +#
 658.409 +# ARCnet devices
 658.410 +#
 658.411 +# CONFIG_ARCNET is not set
 658.412 +
 658.413 +#
 658.414 +# PHY device support
 658.415 +#
 658.416 +# CONFIG_PHYLIB is not set
 658.417 +
 658.418 +#
 658.419 +# Ethernet (10 or 100Mbit)
 658.420 +#
 658.421 +CONFIG_NET_ETHERNET=y
 658.422 +CONFIG_MII=y
 658.423 +# CONFIG_HAPPYMEAL is not set
 658.424 +# CONFIG_SUNGEM is not set
 658.425 +# CONFIG_CASSINI is not set
 658.426 +# CONFIG_NET_VENDOR_3COM is not set
 658.427 +CONFIG_SMC91X=y
 658.428 +# CONFIG_DM9000 is not set
 658.429 +
 658.430 +#
 658.431 +# Tulip family network device support
 658.432 +#
 658.433 +# CONFIG_NET_TULIP is not set
 658.434 +# CONFIG_HP100 is not set
 658.435 +# CONFIG_NET_PCI is not set
 658.436 +
 658.437 +#
 658.438 +# Ethernet (1000 Mbit)
 658.439 +#
 658.440 +# CONFIG_ACENIC is not set
 658.441 +# CONFIG_DL2K is not set
 658.442 +# CONFIG_E1000 is not set
 658.443 +# CONFIG_NS83820 is not set
 658.444 +# CONFIG_HAMACHI is not set
 658.445 +# CONFIG_YELLOWFIN is not set
 658.446 +# CONFIG_R8169 is not set
 658.447 +# CONFIG_SIS190 is not set
 658.448 +# CONFIG_SKGE is not set
 658.449 +# CONFIG_SKY2 is not set
 658.450 +# CONFIG_SK98LIN is not set
 658.451 +# CONFIG_TIGON3 is not set
 658.452 +# CONFIG_BNX2 is not set
 658.453 +# CONFIG_QLA3XXX is not set
 658.454 +
 658.455 +#
 658.456 +# Ethernet (10000 Mbit)
 658.457 +#
 658.458 +# CONFIG_CHELSIO_T1 is not set
 658.459 +# CONFIG_IXGB is not set
 658.460 +# CONFIG_S2IO is not set
 658.461 +# CONFIG_MYRI10GE is not set
 658.462 +# CONFIG_NETXEN_NIC is not set
 658.463 +
 658.464 +#
 658.465 +# Token Ring devices
 658.466 +#
 658.467 +# CONFIG_TR is not set
 658.468 +
 658.469 +#
 658.470 +# Wireless LAN (non-hamradio)
 658.471 +#
 658.472 +# CONFIG_NET_RADIO is not set
 658.473 +
 658.474 +#
 658.475 +# Wan interfaces
 658.476 +#
 658.477 +# CONFIG_WAN is not set
 658.478 +# CONFIG_FDDI is not set
 658.479 +# CONFIG_HIPPI is not set
 658.480 +# CONFIG_PPP is not set
 658.481 +# CONFIG_SLIP is not set
 658.482 +# CONFIG_SHAPER is not set
 658.483 +# CONFIG_NETCONSOLE is not set
 658.484 +# CONFIG_NETPOLL is not set
 658.485 +# CONFIG_NET_POLL_CONTROLLER is not set
 658.486 +
 658.487 +#
 658.488 +# ISDN subsystem
 658.489 +#
 658.490 +# CONFIG_ISDN is not set
 658.491 +
 658.492 +#
 658.493 +# Input device support
 658.494 +#
 658.495 +CONFIG_INPUT=y
 658.496 +# CONFIG_INPUT_FF_MEMLESS is not set
 658.497 +
 658.498 +#
 658.499 +# Userland interfaces
 658.500 +#
 658.501 +CONFIG_INPUT_MOUSEDEV=y
 658.502 +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
 658.503 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 658.504 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 658.505 +# CONFIG_INPUT_JOYDEV is not set
 658.506 +# CONFIG_INPUT_TSDEV is not set
 658.507 +# CONFIG_INPUT_EVDEV is not set
 658.508 +# CONFIG_INPUT_EVBUG is not set
 658.509 +
 658.510 +#
 658.511 +# Input Device Drivers
 658.512 +#
 658.513 +CONFIG_INPUT_KEYBOARD=y
 658.514 +CONFIG_KEYBOARD_ATKBD=y
 658.515 +# CONFIG_KEYBOARD_SUNKBD is not set
 658.516 +# CONFIG_KEYBOARD_LKKBD is not set
 658.517 +# CONFIG_KEYBOARD_XTKBD is not set
 658.518 +# CONFIG_KEYBOARD_NEWTON is not set
 658.519 +# CONFIG_KEYBOARD_STOWAWAY is not set
 658.520 +CONFIG_INPUT_MOUSE=y
 658.521 +CONFIG_MOUSE_PS2=y
 658.522 +# CONFIG_MOUSE_SERIAL is not set
 658.523 +# CONFIG_MOUSE_VSXXXAA is not set
 658.524 +# CONFIG_INPUT_JOYSTICK is not set
 658.525 +# CONFIG_INPUT_TOUCHSCREEN is not set
 658.526 +# CONFIG_INPUT_MISC is not set
 658.527 +
 658.528 +#
 658.529 +# Hardware I/O ports
 658.530 +#
 658.531 +CONFIG_SERIO=y
 658.532 +# CONFIG_SERIO_SERPORT is not set
 658.533 +# CONFIG_SERIO_AMBAKMI is not set
 658.534 +# CONFIG_SERIO_PCIPS2 is not set
 658.535 +CONFIG_SERIO_LIBPS2=y
 658.536 +# CONFIG_SERIO_RAW is not set
 658.537 +# CONFIG_GAMEPORT is not set
 658.538 +
 658.539 +#
 658.540 +# Character devices
 658.541 +#
 658.542 +CONFIG_VT=y
 658.543 +CONFIG_VT_CONSOLE=y
 658.544 +CONFIG_HW_CONSOLE=y
 658.545 +# CONFIG_VT_HW_CONSOLE_BINDING is not set
 658.546 +# CONFIG_SERIAL_NONSTANDARD is not set
 658.547 +
 658.548 +#
 658.549 +# Serial drivers
 658.550 +#
 658.551 +CONFIG_SERIAL_8250=m
 658.552 +CONFIG_SERIAL_8250_PCI=m
 658.553 +CONFIG_SERIAL_8250_NR_UARTS=4
 658.554 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 658.555 +CONFIG_SERIAL_8250_EXTENDED=y
 658.556 +CONFIG_SERIAL_8250_MANY_PORTS=y
 658.557 +CONFIG_SERIAL_8250_SHARE_IRQ=y
 658.558 +# CONFIG_SERIAL_8250_DETECT_IRQ is not set
 658.559 +CONFIG_SERIAL_8250_RSA=y
 658.560 +
 658.561 +#
 658.562 +# Non-8250 serial port support
 658.563 +#
 658.564 +# CONFIG_SERIAL_AMBA_PL011 is not set
 658.565 +CONFIG_SERIAL_CORE=m
 658.566 +# CONFIG_SERIAL_JSM is not set
 658.567 +CONFIG_UNIX98_PTYS=y
 658.568 +CONFIG_LEGACY_PTYS=y
 658.569 +CONFIG_LEGACY_PTY_COUNT=16
 658.570 +
 658.571 +#
 658.572 +# IPMI
 658.573 +#
 658.574 +# CONFIG_IPMI_HANDLER is not set
 658.575 +
 658.576 +#
 658.577 +# Watchdog Cards
 658.578 +#
 658.579 +# CONFIG_WATCHDOG is not set
 658.580 +# CONFIG_HW_RANDOM is not set
 658.581 +# CONFIG_NVRAM is not set
 658.582 +# CONFIG_DTLK is not set
 658.583 +# CONFIG_R3964 is not set
 658.584 +# CONFIG_APPLICOM is not set
 658.585 +# CONFIG_DRM is not set
 658.586 +# CONFIG_RAW_DRIVER is not set
 658.587 +
 658.588 +#
 658.589 +# TPM devices
 658.590 +#
 658.591 +# CONFIG_TCG_TPM is not set
 658.592 +
 658.593 +#
 658.594 +# I2C support
 658.595 +#
 658.596 +# CONFIG_I2C is not set
 658.597 +
 658.598 +#
 658.599 +# SPI support
 658.600 +#
 658.601 +# CONFIG_SPI is not set
 658.602 +# CONFIG_SPI_MASTER is not set
 658.603 +
 658.604 +#
 658.605 +# Dallas's 1-wire bus
 658.606 +#
 658.607 +# CONFIG_W1 is not set
 658.608 +
 658.609 +#
 658.610 +# Hardware Monitoring support
 658.611 +#
 658.612 +# CONFIG_HWMON is not set
 658.613 +# CONFIG_HWMON_VID is not set
 658.614 +
 658.615 +#
 658.616 +# Misc devices
 658.617 +#
 658.618 +# CONFIG_SGI_IOC4 is not set
 658.619 +# CONFIG_TIFM_CORE is not set
 658.620 +
 658.621 +#
 658.622 +# LED devices
 658.623 +#
 658.624 +# CONFIG_NEW_LEDS is not set
 658.625 +
 658.626 +#
 658.627 +# LED drivers
 658.628 +#
 658.629 +
 658.630 +#
 658.631 +# LED Triggers
 658.632 +#
 658.633 +
 658.634 +#
 658.635 +# Multimedia devices
 658.636 +#
 658.637 +# CONFIG_VIDEO_DEV is not set
 658.638 +
 658.639 +#
 658.640 +# Digital Video Broadcasting Devices
 658.641 +#
 658.642 +# CONFIG_DVB is not set
 658.643 +# CONFIG_USB_DABUSB is not set
 658.644 +
 658.645 +#
 658.646 +# Graphics support
 658.647 +#
 658.648 +CONFIG_FIRMWARE_EDID=y
 658.649 +CONFIG_FB=y
 658.650 +CONFIG_FB_CFB_FILLRECT=y
 658.651 +CONFIG_FB_CFB_COPYAREA=y
 658.652 +CONFIG_FB_CFB_IMAGEBLIT=y
 658.653 +# CONFIG_FB_MACMODES is not set
 658.654 +# CONFIG_FB_BACKLIGHT is not set
 658.655 +# CONFIG_FB_MODE_HELPERS is not set
 658.656 +# CONFIG_FB_TILEBLITTING is not set
 658.657 +# CONFIG_FB_CIRRUS is not set
 658.658 +# CONFIG_FB_PM2 is not set
 658.659 +CONFIG_FB_ARMCLCD=y
 658.660 +# CONFIG_FB_CYBER2000 is not set
 658.661 +# CONFIG_FB_ASILIANT is not set
 658.662 +# CONFIG_FB_IMSTT is not set
 658.663 +# CONFIG_FB_S1D13XXX is not set
 658.664 +# CONFIG_FB_NVIDIA is not set
 658.665 +# CONFIG_FB_RIVA is not set
 658.666 +# CONFIG_FB_MATROX is not set
 658.667 +# CONFIG_FB_RADEON is not set
 658.668 +# CONFIG_FB_ATY128 is not set
 658.669 +# CONFIG_FB_ATY is not set
 658.670 +# CONFIG_FB_SAVAGE is not set
 658.671 +# CONFIG_FB_SIS is not set
 658.672 +# CONFIG_FB_NEOMAGIC is not set
 658.673 +# CONFIG_FB_KYRO is not set
 658.674 +# CONFIG_FB_3DFX is not set
 658.675 +# CONFIG_FB_VOODOO1 is not set
 658.676 +# CONFIG_FB_TRIDENT is not set
 658.677 +# CONFIG_FB_VIRTUAL is not set
 658.678 +
 658.679 +#
 658.680 +# Console display driver support
 658.681 +#
 658.682 +CONFIG_DUMMY_CONSOLE=y
 658.683 +CONFIG_FRAMEBUFFER_CONSOLE=y
 658.684 +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
 658.685 +CONFIG_FONTS=y
 658.686 +# CONFIG_FONT_8x8 is not set
 658.687 +# CONFIG_FONT_8x16 is not set
 658.688 +# CONFIG_FONT_6x11 is not set
 658.689 +# CONFIG_FONT_7x14 is not set
 658.690 +# CONFIG_FONT_PEARL_8x8 is not set
 658.691 +CONFIG_FONT_ACORN_8x8=y
 658.692 +# CONFIG_FONT_MINI_4x6 is not set
 658.693 +# CONFIG_FONT_SUN8x16 is not set
 658.694 +# CONFIG_FONT_SUN12x22 is not set
 658.695 +# CONFIG_FONT_10x18 is not set
 658.696 +
 658.697 +#
 658.698 +# Logo configuration
 658.699 +#
 658.700 +# CONFIG_LOGO is not set
 658.701 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 658.702 +
 658.703 +#
 658.704 +# Sound
 658.705 +#
 658.706 +# CONFIG_SOUND is not set
 658.707 +
 658.708 +#
 658.709 +# HID Devices
 658.710 +#
 658.711 +# CONFIG_HID is not set
 658.712 +
 658.713 +#
 658.714 +# USB support
 658.715 +#
 658.716 +CONFIG_USB_ARCH_HAS_HCD=y
 658.717 +CONFIG_USB_ARCH_HAS_OHCI=y
 658.718 +CONFIG_USB_ARCH_HAS_EHCI=y
 658.719 +CONFIG_USB=m
 658.720 +# CONFIG_USB_DEBUG is not set
 658.721 +
 658.722 +#
 658.723 +# Miscellaneous USB options
 658.724 +#
 658.725 +CONFIG_USB_DEVICEFS=y
 658.726 +CONFIG_USB_BANDWIDTH=y
 658.727 +CONFIG_USB_DYNAMIC_MINORS=y
 658.728 +# CONFIG_USB_OTG is not set
 658.729 +
 658.730 +#
 658.731 +# USB Host Controller Drivers
 658.732 +#
 658.733 +# CONFIG_USB_EHCI_HCD is not set
 658.734 +# CONFIG_USB_ISP116X_HCD is not set
 658.735 +CONFIG_USB_OHCI_HCD=m
 658.736 +# CONFIG_USB_OHCI_BIG_ENDIAN is not set
 658.737 +CONFIG_USB_OHCI_LITTLE_ENDIAN=y
 658.738 +# CONFIG_USB_UHCI_HCD is not set
 658.739 +# CONFIG_USB_SL811_HCD is not set
 658.740 +
 658.741 +#
 658.742 +# USB Device Class drivers
 658.743 +#
 658.744 +# CONFIG_USB_ACM is not set
 658.745 +# CONFIG_USB_PRINTER is not set
 658.746 +
 658.747 +#
 658.748 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
 658.749 +#
 658.750 +
 658.751 +#
 658.752 +# may also be needed; see USB_STORAGE Help for more information
 658.753 +#
 658.754 +# CONFIG_USB_LIBUSUAL is not set
 658.755 +
 658.756 +#
 658.757 +# USB Input Devices
 658.758 +#
 658.759 +# CONFIG_USB_HID is not set
 658.760 +
 658.761 +#
 658.762 +# USB HID Boot Protocol drivers
 658.763 +#
 658.764 +# CONFIG_USB_KBD is not set
 658.765 +# CONFIG_USB_MOUSE is not set
 658.766 +# CONFIG_USB_AIPTEK is not set
 658.767 +# CONFIG_USB_WACOM is not set
 658.768 +# CONFIG_USB_ACECAD is not set
 658.769 +# CONFIG_USB_KBTAB is not set
 658.770 +# CONFIG_USB_POWERMATE is not set
 658.771 +# CONFIG_USB_TOUCHSCREEN is not set
 658.772 +# CONFIG_USB_YEALINK is not set
 658.773 +# CONFIG_USB_XPAD is not set
 658.774 +# CONFIG_USB_ATI_REMOTE is not set
 658.775 +# CONFIG_USB_ATI_REMOTE2 is not set
 658.776 +# CONFIG_USB_KEYSPAN_REMOTE is not set
 658.777 +# CONFIG_USB_APPLETOUCH is not set
 658.778 +
 658.779 +#
 658.780 +# USB Imaging devices
 658.781 +#
 658.782 +# CONFIG_USB_MDC800 is not set
 658.783 +
 658.784 +#
 658.785 +# USB Network Adapters
 658.786 +#
 658.787 +# CONFIG_USB_CATC is not set
 658.788 +# CONFIG_USB_KAWETH is not set
 658.789 +# CONFIG_USB_PEGASUS is not set
 658.790 +# CONFIG_USB_RTL8150 is not set
 658.791 +# CONFIG_USB_USBNET_MII is not set
 658.792 +# CONFIG_USB_USBNET is not set
 658.793 +# CONFIG_USB_MON is not set
 658.794 +
 658.795 +#
 658.796 +# USB port drivers
 658.797 +#
 658.798 +
 658.799 +#
 658.800 +# USB Serial Converter support
 658.801 +#
 658.802 +# CONFIG_USB_SERIAL is not set
 658.803 +
 658.804 +#
 658.805 +# USB Miscellaneous drivers
 658.806 +#
 658.807 +# CONFIG_USB_EMI62 is not set
 658.808 +# CONFIG_USB_EMI26 is not set
 658.809 +# CONFIG_USB_ADUTUX is not set
 658.810 +# CONFIG_USB_AUERSWALD is not set
 658.811 +# CONFIG_USB_RIO500 is not set
 658.812 +# CONFIG_USB_LEGOTOWER is not set
 658.813 +# CONFIG_USB_LCD is not set
 658.814 +# CONFIG_USB_LED is not set
 658.815 +# CONFIG_USB_CYPRESS_CY7C63 is not set
 658.816 +# CONFIG_USB_CYTHERM is not set
 658.817 +# CONFIG_USB_PHIDGET is not set
 658.818 +# CONFIG_USB_IDMOUSE is not set
 658.819 +# CONFIG_USB_FTDI_ELAN is not set
 658.820 +# CONFIG_USB_APPLEDISPLAY is not set
 658.821 +# CONFIG_USB_LD is not set
 658.822 +# CONFIG_USB_TRANCEVIBRATOR is not set
 658.823 +# CONFIG_USB_TEST is not set
 658.824 +
 658.825 +#
 658.826 +# USB DSL modem support
 658.827 +#
 658.828 +
 658.829 +#
 658.830 +# USB Gadget Support
 658.831 +#
 658.832 +# CONFIG_USB_GADGET is not set
 658.833 +
 658.834 +#
 658.835 +# MMC/SD Card support
 658.836 +#
 658.837 +# CONFIG_MMC is not set
 658.838 +
 658.839 +#
 658.840 +# Real Time Clock
 658.841 +#
 658.842 +CONFIG_RTC_LIB=y
 658.843 +# CONFIG_RTC_CLASS is not set
 658.844 +
 658.845 +#
 658.846 +# File systems
 658.847 +#
 658.848 +CONFIG_EXT2_FS=y
 658.849 +# CONFIG_EXT2_FS_XATTR is not set
 658.850 +# CONFIG_EXT2_FS_XIP is not set
 658.851 +# CONFIG_EXT3_FS is not set
 658.852 +# CONFIG_EXT4DEV_FS is not set
 658.853 +# CONFIG_REISERFS_FS is not set
 658.854 +# CONFIG_JFS_FS is not set
 658.855 +# CONFIG_FS_POSIX_ACL is not set
 658.856 +# CONFIG_XFS_FS is not set
 658.857 +# CONFIG_GFS2_FS is not set
 658.858 +# CONFIG_OCFS2_FS is not set
 658.859 +CONFIG_MINIX_FS=y
 658.860 +CONFIG_ROMFS_FS=y
 658.861 +# CONFIG_INOTIFY is not set
 658.862 +# CONFIG_QUOTA is not set
 658.863 +CONFIG_DNOTIFY=y
 658.864 +# CONFIG_AUTOFS_FS is not set
 658.865 +# CONFIG_AUTOFS4_FS is not set
 658.866 +# CONFIG_FUSE_FS is not set
 658.867 +
 658.868 +#
 658.869 +# CD-ROM/DVD Filesystems
 658.870 +#
 658.871 +# CONFIG_ISO9660_FS is not set
 658.872 +# CONFIG_UDF_FS is not set
 658.873 +
 658.874 +#
 658.875 +# DOS/FAT/NT Filesystems
 658.876 +#
 658.877 +# CONFIG_MSDOS_FS is not set
 658.878 +# CONFIG_VFAT_FS is not set
 658.879 +# CONFIG_NTFS_FS is not set
 658.880 +
 658.881 +#
 658.882 +# Pseudo filesystems
 658.883 +#
 658.884 +CONFIG_PROC_FS=y
 658.885 +CONFIG_PROC_SYSCTL=y
 658.886 +CONFIG_SYSFS=y
 658.887 +# CONFIG_TMPFS is not set
 658.888 +# CONFIG_HUGETLB_PAGE is not set
 658.889 +CONFIG_RAMFS=y
 658.890 +# CONFIG_CONFIGFS_FS is not set
 658.891 +
 658.892 +#
 658.893 +# Miscellaneous filesystems
 658.894 +#
 658.895 +# CONFIG_ADFS_FS is not set
 658.896 +# CONFIG_AFFS_FS is not set
 658.897 +# CONFIG_HFS_FS is not set
 658.898 +# CONFIG_HFSPLUS_FS is not set
 658.899 +# CONFIG_BEFS_FS is not set
 658.900 +# CONFIG_BFS_FS is not set
 658.901 +# CONFIG_EFS_FS is not set
 658.902 +# CONFIG_CRAMFS is not set
 658.903 +CONFIG_SQUASHFS=y
 658.904 +# CONFIG_SQUASHFS_EMBEDDED is not set
 658.905 +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
 658.906 +# CONFIG_SQUASHFS_VMALLOC is not set
 658.907 +# CONFIG_VXFS_FS is not set
 658.908 +# CONFIG_HPFS_FS is not set
 658.909 +# CONFIG_QNX4FS_FS is not set
 658.910 +# CONFIG_SYSV_FS is not set
 658.911 +# CONFIG_UFS_FS is not set
 658.912 +
 658.913 +#
 658.914 +# Network File Systems
 658.915 +#
 658.916 +# CONFIG_NFS_FS is not set
 658.917 +# CONFIG_NFSD is not set
 658.918 +# CONFIG_SMB_FS is not set
 658.919 +# CONFIG_CIFS is not set
 658.920 +# CONFIG_NCP_FS is not set
 658.921 +# CONFIG_CODA_FS is not set
 658.922 +# CONFIG_AFS_FS is not set
 658.923 +# CONFIG_9P_FS is not set
 658.924 +
 658.925 +#
 658.926 +# Partition Types
 658.927 +#
 658.928 +# CONFIG_PARTITION_ADVANCED is not set
 658.929 +CONFIG_MSDOS_PARTITION=y
 658.930 +
 658.931 +#
 658.932 +# Native Language Support
 658.933 +#
 658.934 +# CONFIG_NLS is not set
 658.935 +
 658.936 +#
 658.937 +# Distributed Lock Manager
 658.938 +#
 658.939 +# CONFIG_DLM is not set
 658.940 +
 658.941 +#
 658.942 +# Profiling support
 658.943 +#
 658.944 +# CONFIG_PROFILING is not set
 658.945 +
 658.946 +#
 658.947 +# Kernel hacking
 658.948 +#
 658.949 +CONFIG_PRINTK_TIME=y
 658.950 +# CONFIG_ENABLE_MUST_CHECK is not set
 658.951 +# CONFIG_MAGIC_SYSRQ is not set
 658.952 +# CONFIG_UNUSED_SYMBOLS is not set
 658.953 +# CONFIG_DEBUG_FS is not set
 658.954 +# CONFIG_HEADERS_CHECK is not set
 658.955 +CONFIG_DEBUG_KERNEL=y
 658.956 +CONFIG_LOG_BUF_SHIFT=14
 658.957 +CONFIG_DETECT_SOFTLOCKUP=y
 658.958 +# CONFIG_SCHEDSTATS is not set
 658.959 +# CONFIG_DEBUG_SLAB is not set
 658.960 +# CONFIG_DEBUG_RT_MUTEXES is not set
 658.961 +# CONFIG_RT_MUTEX_TESTER is not set
 658.962 +# CONFIG_DEBUG_SPINLOCK is not set
 658.963 +# CONFIG_DEBUG_MUTEXES is not set
 658.964 +# CONFIG_DEBUG_RWSEMS is not set
 658.965 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 658.966 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 658.967 +# CONFIG_DEBUG_KOBJECT is not set
 658.968 +CONFIG_DEBUG_BUGVERBOSE=y
 658.969 +# CONFIG_DEBUG_INFO is not set
 658.970 +# CONFIG_DEBUG_VM is not set
 658.971 +# CONFIG_DEBUG_LIST is not set
 658.972 +CONFIG_FRAME_POINTER=y
 658.973 +# CONFIG_FORCED_INLINING is not set
 658.974 +# CONFIG_RCU_TORTURE_TEST is not set
 658.975 +# CONFIG_DEBUG_USER is not set
 658.976 +# CONFIG_DEBUG_ERRORS is not set
 658.977 +# CONFIG_DEBUG_LL is not set
 658.978 +
 658.979 +#
 658.980 +# Security options
 658.981 +#
 658.982 +# CONFIG_KEYS is not set
 658.983 +# CONFIG_SECURITY is not set
 658.984 +
 658.985 +#
 658.986 +# Cryptographic options
 658.987 +#
 658.988 +# CONFIG_CRYPTO is not set
 658.989 +
 658.990 +#
 658.991 +# Library routines
 658.992 +#
 658.993 +CONFIG_BITREVERSE=y
 658.994 +# CONFIG_CRC_CCITT is not set
 658.995 +# CONFIG_CRC16 is not set
 658.996 +CONFIG_CRC32=y
 658.997 +# CONFIG_LIBCRC32C is not set
 658.998 +CONFIG_ZLIB_INFLATE=y
 658.999 +CONFIG_PLIST=y
658.1000 +CONFIG_IOMAP_COPY=y
   659.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   659.2 +++ b/samples/arm-qemu-linux-uclibc/uClibc-0.9.28.1.config	Sat Feb 24 11:00:05 2007 +0000
   659.3 @@ -0,0 +1,169 @@
   659.4 +#
   659.5 +# Automatically generated make config: don't edit
   659.6 +#
   659.7 +# TARGET_alpha is not set
   659.8 +TARGET_arm=y
   659.9 +# TARGET_bfin is not set
  659.10 +# TARGET_cris is not set
  659.11 +# TARGET_e1 is not set
  659.12 +# TARGET_frv is not set
  659.13 +# TARGET_h8300 is not set
  659.14 +# TARGET_i386 is not set
  659.15 +# TARGET_i960 is not set
  659.16 +# TARGET_m68k is not set
  659.17 +# TARGET_microblaze is not set
  659.18 +# TARGET_mips is not set
  659.19 +# TARGET_nios is not set
  659.20 +# TARGET_nios2 is not set
  659.21 +# TARGET_powerpc is not set
  659.22 +# TARGET_sh is not set
  659.23 +# TARGET_sh64 is not set
  659.24 +# TARGET_sparc is not set
  659.25 +# TARGET_v850 is not set
  659.26 +# TARGET_x86_64 is not set
  659.27 +
  659.28 +#
  659.29 +# Target Architecture Features and Options
  659.30 +#
  659.31 +HAVE_ELF=y
  659.32 +ARCH_SUPPORTS_LITTLE_ENDIAN=y
  659.33 +TARGET_ARCH="arm"
  659.34 +ARCH_SUPPORTS_BIG_ENDIAN=y
  659.35 +# CONFIG_GENERIC_ARM is not set
  659.36 +# CONFIG_ARM610 is not set
  659.37 +# CONFIG_ARM710 is not set
  659.38 +# CONFIG_ARM720T is not set
  659.39 +# CONFIG_ARM920T is not set
  659.40 +# CONFIG_ARM922T is not set
  659.41 +# CONFIG_ARM926T is not set
  659.42 +# CONFIG_ARM1136JF_S is not set
  659.43 +# CONFIG_ARM_SA110 is not set
  659.44 +# CONFIG_ARM_SA1100 is not set
  659.45 +CONFIG_ARM_XSCALE=y
  659.46 +ARCH_LITTLE_ENDIAN=y
  659.47 +# ARCH_BIG_ENDIAN is not set
  659.48 +# ARCH_HAS_NO_MMU is not set
  659.49 +ARCH_HAS_MMU=y
  659.50 +UCLIBC_HAS_FLOATS=y
  659.51 +# HAS_FPU is not set
  659.52 +UCLIBC_HAS_SOFT_FLOAT=y
  659.53 +DO_C99_MATH=y
  659.54 +KERNEL_SOURCE="/usr/src/linux"
  659.55 +C_SYMBOL_PREFIX=""
  659.56 +HAVE_DOT_CONFIG=y
  659.57 +
  659.58 +#
  659.59 +# General Library Settings
  659.60 +#
  659.61 +# HAVE_NO_PIC is not set
  659.62 +DOPIC=y
  659.63 +# HAVE_NO_SHARED is not set
  659.64 +HAVE_SHARED=y
  659.65 +# ARCH_HAS_NO_LDSO is not set
  659.66 +BUILD_UCLIBC_LDSO=y
  659.67 +# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
  659.68 +LDSO_LDD_SUPPORT=y
  659.69 +LDSO_CACHE_SUPPORT=y
  659.70 +# LDSO_PRELOAD_FILE_SUPPORT is not set
  659.71 +LDSO_BASE_FILENAME="ld.so"
  659.72 +# LDSO_RUNPATH is not set
  659.73 +# DL_FINI_CRT_COMPAT is not set
  659.74 +UCLIBC_CTOR_DTOR=y
  659.75 +# HAS_NO_THREADS is not set
  659.76 +UCLIBC_HAS_THREADS=y
  659.77 +# PTHREADS_DEBUG_SUPPORT is not set
  659.78 +UCLIBC_HAS_LFS=y
  659.79 +UCLIBC_STATIC_LDCONFIG=y
  659.80 +# MALLOC is not set
  659.81 +# MALLOC_SIMPLE is not set
  659.82 +MALLOC_STANDARD=y
  659.83 +# MALLOC_GLIBC_COMPAT is not set
  659.84 +UCLIBC_DYNAMIC_ATEXIT=y
  659.85 +HAS_SHADOW=y
  659.86 +UNIX98PTY_ONLY=y
  659.87 +ASSUME_DEVPTS=y
  659.88 +UCLIBC_HAS_TM_EXTENSIONS=y
  659.89 +# UCLIBC_HAS_TZ_CACHING is not set
  659.90 +UCLIBC_HAS_TZ_FILE=y
  659.91 +# UCLIBC_HAS_TZ_FILE_READ_MANY is not set
  659.92 +UCLIBC_TZ_FILE_PATH="/etc/TZ"
  659.93 +
  659.94 +#
  659.95 +# Networking Support
  659.96 +#
  659.97 +# UCLIBC_HAS_IPV6 is not set
  659.98 +UCLIBC_HAS_RPC=y
  659.99 +UCLIBC_HAS_FULL_RPC=y
 659.100 +
 659.101 +#
 659.102 +# String and Stdio Support
 659.103 +#
 659.104 +UCLIBC_HAS_STRING_GENERIC_OPT=y
 659.105 +UCLIBC_HAS_STRING_ARCH_OPT=y
 659.106 +UCLIBC_HAS_CTYPE_TABLES=y
 659.107 +UCLIBC_HAS_CTYPE_SIGNED=y
 659.108 +# UCLIBC_HAS_CTYPE_UNSAFE is not set
 659.109 +# UCLIBC_HAS_CTYPE_CHECKED is not set
 659.110 +UCLIBC_HAS_CTYPE_ENFORCED=y
 659.111 +# UCLIBC_HAS_WCHAR is not set
 659.112 +# UCLIBC_HAS_LOCALE is not set
 659.113 +UCLIBC_HAS_HEXADECIMAL_FLOATS=y
 659.114 +# UCLIBC_HAS_GLIBC_CUSTOM_PRINTF is not set
 659.115 +# USE_OLD_VFPRINTF is not set
 659.116 +UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
 659.117 +# UCLIBC_HAS_SCANF_GLIBC_A_FLAG is not set
 659.118 +# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
 659.119 +# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
 659.120 +# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
 659.121 +# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
 659.122 +# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
 659.123 +UCLIBC_HAS_STDIO_BUFSIZ_4096=y
 659.124 +# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
 659.125 +UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
 659.126 +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
 659.127 +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
 659.128 +UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT=y
 659.129 +UCLIBC_HAS_STDIO_GETC_MACRO=y
 659.130 +UCLIBC_HAS_STDIO_PUTC_MACRO=y
 659.131 +UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
 659.132 +UCLIBC_HAS_FOPEN_LARGEFILE_MODE=y
 659.133 +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
 659.134 +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
 659.135 +UCLIBC_HAS_PRINTF_M_SPEC=y
 659.136 +UCLIBC_HAS_ERRNO_MESSAGES=y
 659.137 +# UCLIBC_HAS_SYS_ERRLIST is not set
 659.138 +UCLIBC_HAS_SIGNUM_MESSAGES=y
 659.139 +# UCLIBC_HAS_SYS_SIGLIST is not set
 659.140 +UCLIBC_HAS_GNU_GETOPT=y
 659.141 +
 659.142 +#
 659.143 +# Big and Tall
 659.144 +#
 659.145 +UCLIBC_HAS_REGEX=y
 659.146 +UCLIBC_HAS_WORDEXP=y
 659.147 +UCLIBC_HAS_FTW=y
 659.148 +UCLIBC_HAS_GLOB=y
 659.149 +
 659.150 +#
 659.151 +# Library Installation Options
 659.152 +#
 659.153 +SHARED_LIB_LOADER_PREFIX="$(RUNTIME_PREFIX)lib"
 659.154 +RUNTIME_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/"
 659.155 +DEVEL_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/usr/"
 659.156 +
 659.157 +#
 659.158 +# uClibc security related options
 659.159 +#
 659.160 +# UCLIBC_SECURITY is not set
 659.161 +
 659.162 +#
 659.163 +# uClibc development/debugging options
 659.164 +#
 659.165 +CROSS_COMPILER_PREFIX=""
 659.166 +# DODEBUG is not set
 659.167 +# DODEBUG_PT is not set
 659.168 +# DOASSERTS is not set
 659.169 +# SUPPORT_LD_DEBUG is not set
 659.170 +# SUPPORT_LD_DEBUG_EARLY is not set
 659.171 +WARNINGS="-Wall"
 659.172 +# UCLIBC_MJN3_ONLY is not set
   660.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   660.2 +++ b/samples/armeb-unknown-linux-gnu/crosstool.config	Sat Feb 24 11:00:05 2007 +0000
   660.3 @@ -0,0 +1,377 @@
   660.4 +#
   660.5 +# Automatically generated make config: don't edit
   660.6 +# crosstool-NG version: 0.0.1
   660.7 +# Fri Jan 26 19:25:07 2007
   660.8 +#
   660.9 +
  660.10 +#
  660.11 +# Paths and misc options
  660.12 +#
  660.13 +CT_PARALLEL_JOBS=1
  660.14 +CT_NICE=0
  660.15 +
  660.16 +#
  660.17 +# Paths
  660.18 +#
  660.19 +CT_TARBALLS_DIR="${HOME}/dev/src"
  660.20 +CT_SRC_DIR="${HOME}/x-tools/${CT_TARGET}/${CT_CC}-${CT_CC_VERSION}-${CT_LIBC}-${CT_LIBC_VERSION}/src"
  660.21 +CT_BUILD_DIR="${HOME}/x-tools/${CT_TARGET}/${CT_CC}-${CT_CC_VERSION}-${CT_LIBC}-${CT_LIBC_VERSION}/build"
  660.22 +CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}"
  660.23 +CT_INSTALL_DIR="${CT_PREFIX_DIR}"
  660.24 +
  660.25 +#
  660.26 +# Downloading and extracting
  660.27 +#
  660.28 +# CT_NO_DOWNLOAD is not set
  660.29 +# CT_ONLY_DOWNLOAD is not set
  660.30 +# CT_FORCE_DOWNLOAD is not set
  660.31 +# CT_FORCE_EXTRACT is not set
  660.32 +
  660.33 +#
  660.34 +# Logging
  660.35 +#
  660.36 +# CT_LOG_ERROR is not set
  660.37 +# CT_LOG_WARN is not set
  660.38 +# CT_LOG_INFO is not set
  660.39 +CT_LOG_EXTRA=y
  660.40 +# CT_LOG_DEBUG is not set
  660.41 +CT_LOG_LEVEL_MAX="EXTRA"
  660.42 +# CT_LOG_PROGRESS_BAR is not set
  660.43 +# CT_LOG_USE_COLORS is not set
  660.44 +CT_LOG_TO_FILE=y
  660.45 +CT_LOG_FILE="${CT_PREFIX_DIR}/${CT_TARGET}.log"
  660.46 +
  660.47 +#
  660.48 +# Target options
  660.49 +#
  660.50 +
  660.51 +#
  660.52 +# General target options
  660.53 +#
  660.54 +CT_ARCH_ARM=y
  660.55 +# CT_ARCH_MIPS is not set
  660.56 +# CT_ARCH_x86 is not set
  660.57 +# CT_ARCH_x86_64 is not set
  660.58 +CT_ARCH_BE=y
  660.59 +# CT_ARCH_LE is not set
  660.60 +# CT_ARCH_FLOAT_HW is not set
  660.61 +CT_ARCH_FLOAT_SW=y
  660.62 +
  660.63 +#
  660.64 +# Target optimisations
  660.65 +#
  660.66 +CT_ARCH_CPU="xscale"
  660.67 +CT_ARCH_TUNE="xscale"
  660.68 +CT_ARCH_ARCH="armv5te"
  660.69 +CT_TARGET_CFLAGS=""
  660.70 +
  660.71 +#
  660.72 +# Toolchain options
  660.73 +#
  660.74 +CT_USE_SYSROOT=y
  660.75 +CT_SHARED_LIBS=y
  660.76 +CT_TARGET_VENDOR="unknown"
  660.77 +CT_ARCH="arm"
  660.78 +CT_BUILD=""
  660.79 +CT_CC_NATIVE="gcc"
  660.80 +# CT_CANADIAN is not set
  660.81 +CT_HOST=""
  660.82 +CT_HOST_CC=""
  660.83 +
  660.84 +#
  660.85 +# Kernel
  660.86 +#
  660.87 +CT_KERNEL_LINUX=y
  660.88 +# CT_KERNEL_CYGWIN is not set
  660.89 +CT_KERNEL_VERSION="2.6.19.1"
  660.90 +CT_KERNEL_LINUX_HEADERS_INSTALL=y
  660.91 +# CT_KERNEL_LINUX_HEADERS_SANITISED is not set
  660.92 +# CT_KERNEL_LINUX_HEADERS_COPY is not set
  660.93 +CT_KERNEL="linux"
  660.94 +CT_KERNEL_VERSION_SEE_EXTRAVERSION=y
  660.95 +# CT_KERNEL_INSTALL_V_2_6_18 is not set
  660.96 +# CT_KERNEL_INSTALL_V_2_6_18_1 is not set
  660.97 +# CT_KERNEL_INSTALL_V_2_6_18_2 is not set
  660.98 +# CT_KERNEL_INSTALL_V_2_6_18_3 is not set
  660.99 +# CT_KERNEL_INSTALL_V_2_6_18_4 is not set
 660.100 +# CT_KERNEL_INSTALL_V_2_6_18_5 is not set
 660.101 +# CT_KERNEL_INSTALL_V_2_6_18_6 is not set
 660.102 +# CT_KERNEL_INSTALL_V_2_6_19 is not set
 660.103 +CT_KERNEL_INSTALL_V_2_6_19_1=y
 660.104 +# CT_KERNEL_COPY_V_2_6_0 is not set
 660.105 +# CT_KERNEL_COPY_V_2_6_1 is not set
 660.106 +# CT_KERNEL_COPY_V_2_6_2 is not set
 660.107 +# CT_KERNEL_COPY_V_2_6_3 is not set
 660.108 +# CT_KERNEL_COPY_V_2_6_4 is not set
 660.109 +# CT_KERNEL_COPY_V_2_6_5 is not set
 660.110 +# CT_KERNEL_COPY_V_2_6_6 is not set
 660.111 +# CT_KERNEL_COPY_V_2_6_7 is not set
 660.112 +# CT_KERNEL_COPY_V_2_6_8 is not set
 660.113 +# CT_KERNEL_COPY_V_2_6_8_1 is not set
 660.114 +# CT_KERNEL_COPY_V_2_6_9 is not set
 660.115 +# CT_KERNEL_COPY_V_2_6_10 is not set
 660.116 +# CT_KERNEL_COPY_V_2_6_11 is not set
 660.117 +# CT_KERNEL_COPY_V_2_6_11_1 is not set
 660.118 +# CT_KERNEL_COPY_V_2_6_11_10 is not set
 660.119 +# CT_KERNEL_COPY_V_2_6_11_11 is not set
 660.120 +# CT_KERNEL_COPY_V_2_6_11_12 is not set
 660.121 +# CT_KERNEL_COPY_V_2_6_11_2 is not set
 660.122 +# CT_KERNEL_COPY_V_2_6_11_3 is not set
 660.123 +# CT_KERNEL_COPY_V_2_6_11_4 is not set
 660.124 +# CT_KERNEL_COPY_V_2_6_11_5 is not set
 660.125 +# CT_KERNEL_COPY_V_2_6_11_6 is not set
 660.126 +# CT_KERNEL_COPY_V_2_6_11_7 is not set
 660.127 +# CT_KERNEL_COPY_V_2_6_11_8 is not set
 660.128 +# CT_KERNEL_COPY_V_2_6_11_9 is not set
 660.129 +# CT_KERNEL_COPY_V_2_6_12 is not set
 660.130 +# CT_KERNEL_COPY_V_2_6_12_1 is not set
 660.131 +# CT_KERNEL_COPY_V_2_6_12_2 is not set
 660.132 +# CT_KERNEL_COPY_V_2_6_12_3 is not set
 660.133 +# CT_KERNEL_COPY_V_2_6_12_4 is not set
 660.134 +# CT_KERNEL_COPY_V_2_6_12_5 is not set
 660.135 +# CT_KERNEL_COPY_V_2_6_12_6 is not set
 660.136 +# CT_KERNEL_COPY_V_2_6_13 is not set
 660.137 +# CT_KERNEL_COPY_V_2_6_13_1 is not set
 660.138 +# CT_KERNEL_COPY_V_2_6_13_2 is not set
 660.139 +# CT_KERNEL_COPY_V_2_6_13_3 is not set
 660.140 +# CT_KERNEL_COPY_V_2_6_13_4 is not set
 660.141 +# CT_KERNEL_COPY_V_2_6_13_5 is not set
 660.142 +# CT_KERNEL_COPY_V_2_6_14 is not set
 660.143 +# CT_KERNEL_COPY_V_2_6_14_1 is not set
 660.144 +# CT_KERNEL_COPY_V_2_6_14_2 is not set
 660.145 +# CT_KERNEL_COPY_V_2_6_14_3 is not set
 660.146 +# CT_KERNEL_COPY_V_2_6_14_4 is not set
 660.147 +# CT_KERNEL_COPY_V_2_6_14_5 is not set
 660.148 +# CT_KERNEL_COPY_V_2_6_14_6 is not set
 660.149 +# CT_KERNEL_COPY_V_2_6_14_7 is not set
 660.150 +# CT_KERNEL_COPY_V_2_6_15 is not set
 660.151 +# CT_KERNEL_COPY_V_2_6_15_1 is not set
 660.152 +# CT_KERNEL_COPY_V_2_6_15_2 is not set
 660.153 +# CT_KERNEL_COPY_V_2_6_15_3 is not set
 660.154 +# CT_KERNEL_COPY_V_2_6_15_4 is not set
 660.155 +# CT_KERNEL_COPY_V_2_6_15_5 is not set
 660.156 +# CT_KERNEL_COPY_V_2_6_15_6 is not set
 660.157 +# CT_KERNEL_COPY_V_2_6_15_7 is not set
 660.158 +# CT_KERNEL_COPY_V_2_6_16 is not set
 660.159 +# CT_KERNEL_COPY_V_2_6_16_1 is not set
 660.160 +# CT_KERNEL_COPY_V_2_6_16_10 is not set
 660.161 +# CT_KERNEL_COPY_V_2_6_16_11 is not set
 660.162 +# CT_KERNEL_COPY_V_2_6_16_12 is not set
 660.163 +# CT_KERNEL_COPY_V_2_6_16_13 is not set
 660.164 +# CT_KERNEL_COPY_V_2_6_16_14 is not set
 660.165 +# CT_KERNEL_COPY_V_2_6_16_15 is not set
 660.166 +# CT_KERNEL_COPY_V_2_6_16_16 is not set
 660.167 +# CT_KERNEL_COPY_V_2_6_16_17 is not set
 660.168 +# CT_KERNEL_COPY_V_2_6_16_18 is not set
 660.169 +# CT_KERNEL_COPY_V_2_6_16_19 is not set
 660.170 +# CT_KERNEL_COPY_V_2_6_16_2 is not set
 660.171 +# CT_KERNEL_COPY_V_2_6_16_20 is not set
 660.172 +# CT_KERNEL_COPY_V_2_6_16_21 is not set
 660.173 +# CT_KERNEL_COPY_V_2_6_16_22 is not set
 660.174 +# CT_KERNEL_COPY_V_2_6_16_23 is not set
 660.175 +# CT_KERNEL_COPY_V_2_6_16_24 is not set
 660.176 +# CT_KERNEL_COPY_V_2_6_16_25 is not set
 660.177 +# CT_KERNEL_COPY_V_2_6_16_26 is not set
 660.178 +# CT_KERNEL_COPY_V_2_6_16_27 is not set
 660.179 +# CT_KERNEL_COPY_V_2_6_16_28 is not set
 660.180 +# CT_KERNEL_COPY_V_2_6_16_29 is not set
 660.181 +# CT_KERNEL_COPY_V_2_6_16_3 is not set
 660.182 +# CT_KERNEL_COPY_V_2_6_16_30 is not set
 660.183 +# CT_KERNEL_COPY_V_2_6_16_31 is not set
 660.184 +# CT_KERNEL_COPY_V_2_6_16_32 is not set
 660.185 +# CT_KERNEL_COPY_V_2_6_16_33 is not set
 660.186 +# CT_KERNEL_COPY_V_2_6_16_34 is not set
 660.187 +# CT_KERNEL_COPY_V_2_6_16_35 is not set
 660.188 +# CT_KERNEL_COPY_V_2_6_16_36 is not set
 660.189 +# CT_KERNEL_COPY_V_2_6_16_4 is not set
 660.190 +# CT_KERNEL_COPY_V_2_6_16_5 is not set
 660.191 +# CT_KERNEL_COPY_V_2_6_16_6 is not set
 660.192 +# CT_KERNEL_COPY_V_2_6_16_7 is not set
 660.193 +# CT_KERNEL_COPY_V_2_6_16_8 is not set
 660.194 +# CT_KERNEL_COPY_V_2_6_16_9 is not set
 660.195 +# CT_KERNEL_COPY_V_2_6_17 is not set
 660.196 +# CT_KERNEL_COPY_V_2_6_17_1 is not set
 660.197 +# CT_KERNEL_COPY_V_2_6_17_10 is not set
 660.198 +# CT_KERNEL_COPY_V_2_6_17_11 is not set
 660.199 +# CT_KERNEL_COPY_V_2_6_17_12 is not set
 660.200 +# CT_KERNEL_COPY_V_2_6_17_13 is not set
 660.201 +# CT_KERNEL_COPY_V_2_6_17_14 is not set
 660.202 +# CT_KERNEL_COPY_V_2_6_17_2 is not set
 660.203 +# CT_KERNEL_COPY_V_2_6_17_3 is not set
 660.204 +# CT_KERNEL_COPY_V_2_6_17_4 is not set
 660.205 +# CT_KERNEL_COPY_V_2_6_17_5 is not set
 660.206 +# CT_KERNEL_COPY_V_2_6_17_6 is not set
 660.207 +# CT_KERNEL_COPY_V_2_6_17_7 is not set
 660.208 +# CT_KERNEL_COPY_V_2_6_17_8 is not set
 660.209 +# CT_KERNEL_COPY_V_2_6_17_9 is not set
 660.210 +# CT_KERNEL_COPY_V_2_6_18 is not set
 660.211 +# CT_KERNEL_COPY_V_2_6_18_1 is not set
 660.212 +# CT_KERNEL_COPY_V_2_6_18_2 is not set
 660.213 +# CT_KERNEL_COPY_V_2_6_18_3 is not set
 660.214 +# CT_KERNEL_COPY_V_2_6_18_4 is not set
 660.215 +# CT_KERNEL_COPY_V_2_6_18_5 is not set
 660.216 +# CT_KERNEL_COPY_V_2_6_18_6 is not set
 660.217 +# CT_KERNEL_COPY_V_2_6_19 is not set
 660.218 +# CT_KERNEL_COPY_V_2_6_19_1 is not set
 660.219 +# CT_KERNEL_SANITISED_V_2_6_7_0 is not set
 660.220 +# CT_KERNEL_SANITISED_V_2_6_8_0 is not set
 660.221 +# CT_KERNEL_SANITISED_V_2_6_8_1 is not set
 660.222 +# CT_KERNEL_SANITISED_V_2_6_9_0 is not set
 660.223 +# CT_KERNEL_SANITISED_V_2_6_9_1 is not set
 660.224 +# CT_KERNEL_SANITISED_V_2_6_10_0 is not set
 660.225 +# CT_KERNEL_SANITISED_V_2_6_11_0 is not set
 660.226 +# CT_KERNEL_SANITISED_V_2_6_11_1 is not set
 660.227 +# CT_KERNEL_SANITISED_V_2_6_11_2 is not set
 660.228 +# CT_KERNEL_SANITISED_V_2_6_12_0 is not set
 660.229 +CT_KERNEL_LINUX_VERBOSITY_0=y
 660.230 +# CT_KERNEL_LINUX_VERBOSITY_1 is not set
 660.231 +# CT_KERNEL_LINUX_VERBOSITY_2 is not set
 660.232 +CT_KERNEL_LINUX_VERBOSE_LEVEL=0
 660.233 +CT_KERNEL_LINUX_CONFIG_FILE="${CT_TOP_DIR}/samples/${CT_TARGET}/${CT_KERNEL}-${CT_KERNEL_VERSION}.config"
 660.234 +
 660.235 +#
 660.236 +# binutils
 660.237 +#
 660.238 +CT_BINUTILS_VERSION="2.17.50.0.8"
 660.239 +# CT_BINUTILS_V_2_11_2 is not set
 660.240 +# CT_BINUTILS_V_2_13_90 is not set
 660.241 +# CT_BINUTILS_V_2_14 is not set
 660.242 +# CT_BINUTILS_V_2_14_90 is not set
 660.243 +# CT_BINUTILS_V_2_14_92 is not set
 660.244 +# CT_BINUTILS_V_2_15 is not set
 660.245 +# CT_BINUTILS_V_2_15_90 is not set
 660.246 +# CT_BINUTILS_V_2_15_91 is not set
 660.247 +# CT_BINUTILS_V_2_16 is not set
 660.248 +# CT_BINUTILS_V_2_16_1 is not set
 660.249 +# CT_BINUTILS_V_2_17 is not set
 660.250 +# CT_BINUTILS_V_2_17_50_0_1 is not set
 660.251 +# CT_BINUTILS_V_2_17_50_0_2 is not set
 660.252 +# CT_BINUTILS_V_2_17_50_0_3 is not set
 660.253 +# CT_BINUTILS_V_2_17_50_0_4 is not set
 660.254 +# CT_BINUTILS_V_2_17_50_0_5 is not set
 660.255 +# CT_BINUTILS_V_2_17_50_0_6 is not set
 660.256 +# CT_BINUTILS_V_2_17_50_0_7 is not set
 660.257 +CT_BINUTILS_V_2_17_50_0_8=y
 660.258 +CT_BINUTILS_EXTRA_CONFIG=""
 660.259 +
 660.260 +#
 660.261 +# C compiler
 660.262 +#
 660.263 +
 660.264 +#
 660.265 +# Core C Compiler (used to build the C library)
 660.266 +#
 660.267 +# CT_CC_USE_CORE is not set
 660.268 +CT_CC_CORE_GCC=y
 660.269 +# CT_CC_CORE_TCC is not set
 660.270 +CT_CC_CORE_VERSION=""
 660.271 +CT_CC_CORE="gcc"
 660.272 +# CT_CC_CORE_V_2_95_3 is not set
 660.273 +# CT_CC_CORE_V_3_2_3 is not set
 660.274 +# CT_CC_CORE_V_3_3 is not set
 660.275 +# CT_CC_CORE_V_3_3_1 is not set
 660.276 +# CT_CC_CORE_V_3_3_2 is not set
 660.277 +# CT_CC_CORE_V_3_3_3 is not set
 660.278 +# CT_CC_CORE_V_3_3_4 is not set
 660.279 +# CT_CC_CORE_V_3_3_5 is not set
 660.280 +# CT_CC_CORE_V_3_3_6 is not set
 660.281 +# CT_CC_CORE_V_3_4_0 is not set
 660.282 +# CT_CC_CORE_V_3_4_1 is not set
 660.283 +# CT_CC_CORE_V_3_4_2 is not set
 660.284 +# CT_CC_CORE_V_3_4_3 is not set
 660.285 +# CT_CC_CORE_V_3_4_4 is not set
 660.286 +# CT_CC_CORE_V_3_4_5 is not set
 660.287 +# CT_CC_CORE_V_3_4_6 is not set
 660.288 +# CT_CC_CORE_V_4_0_0 is not set
 660.289 +# CT_CC_CORE_V_4_0_1 is not set
 660.290 +# CT_CC_CORE_V_4_0_2 is not set
 660.291 +# CT_CC_CORE_V_4_0_3 is not set
 660.292 +# CT_CC_CORE_V_4_1_0 is not set
 660.293 +# CT_CC_CORE_V_4_1_1 is not set
 660.294 +CT_CC_CORE_EXTRA_CONFIG=""
 660.295 +
 660.296 +#
 660.297 +# Final C compiler
 660.298 +#
 660.299 +CT_CC_GCC=y
 660.300 +CT_CC_VERSION="3.4.4"
 660.301 +CT_CC="gcc"
 660.302 +# CT_CC_V_2_95_3 is not set
 660.303 +# CT_CC_V_3_2_3 is not set
 660.304 +# CT_CC_V_3_3 is not set
 660.305 +# CT_CC_V_3_3_1 is not set
 660.306 +# CT_CC_V_3_3_2 is not set
 660.307 +# CT_CC_V_3_3_3 is not set
 660.308 +# CT_CC_V_3_3_4 is not set
 660.309 +# CT_CC_V_3_3_5 is not set
 660.310 +# CT_CC_V_3_3_6 is not set
 660.311 +# CT_CC_V_3_4_0 is not set
 660.312 +# CT_CC_V_3_4_1 is not set
 660.313 +# CT_CC_V_3_4_2 is not set
 660.314 +# CT_CC_V_3_4_3 is not set
 660.315 +CT_CC_V_3_4_4=y
 660.316 +# CT_CC_V_3_4_5 is not set
 660.317 +# CT_CC_V_4_0_0 is not set
 660.318 +# CT_CC_V_4_0_1 is not set
 660.319 +# CT_CC_V_4_0_2 is not set
 660.320 +# CT_CC_V_4_1_0 is not set
 660.321 +# CT_CC_V_4_1_1 is not set
 660.322 +CT_CC_EXTRA_CONFIG=""
 660.323 +CT_CC_SUPPORT_C=y
 660.324 +CT_CC_SUPPORT_CXX=y
 660.325 +CT_CC_SUPPORT_JAVA=y
 660.326 +
 660.327 +#
 660.328 +# Supported languages:
 660.329 +#
 660.330 +CT_CC_LANG_C=y
 660.331 +# CT_CC_LANG_CXX is not set
 660.332 +# CT_CC_LANG_JAVA is not set
 660.333 +
 660.334 +#
 660.335 +# C-library
 660.336 +#
 660.337 +# CT_LIBC_GLIBC is not set
 660.338 +CT_LIBC_UCLIBC=y
 660.339 +CT_LIBC_VERSION="20070103"
 660.340 +CT_LIBC="uClibc"
 660.341 +# CT_LIBC_V_1_09_1 is not set
 660.342 +# CT_LIBC_V_2_0_1 is not set
 660.343 +# CT_LIBC_V_2_0_6 is not set
 660.344 +# CT_LIBC_V_2_1_1 is not set
 660.345 +# CT_LIBC_V_2_1_2 is not set
 660.346 +# CT_LIBC_V_2_1_3 is not set
 660.347 +# CT_LIBC_V_2_2 is not set
 660.348 +# CT_LIBC_V_2_2_1 is not set
 660.349 +# CT_LIBC_V_2_2_2 is not set
 660.350 +# CT_LIBC_V_2_2_3 is not set
 660.351 +# CT_LIBC_V_2_2_4 is not set
 660.352 +# CT_LIBC_V_2_2_5 is not set
 660.353 +# CT_LIBC_V_2_3 is not set
 660.354 +# CT_LIBC_V_2_3_1 is not set
 660.355 +# CT_LIBC_V_2_3_2 is not set
 660.356 +# CT_LIBC_V_2_3_3 is not set
 660.357 +# CT_LIBC_V_2_3_4 is not set
 660.358 +# CT_LIBC_V_2_3_5 is not set
 660.359 +# CT_LIBC_V_2_3_6 is not set
 660.360 +# CT_LIBC_V_2_4 is not set
 660.361 +# CT_LIBC_V_2_5 is not set
 660.362 +# CT_LIBC_GLIBC_THREADS_NPTL is not set
 660.363 +# CT_LIBC_GLIBC_THREADS_LINUXTHREADS is not set
 660.364 +# CT_LIBC_GLIBC_THREADS_NONE is not set
 660.365 +CT_LIBC_GLIBC_EXTRA_CONFIG=""
 660.366 +CT_LIBC_GLIBC_EXTRA_CFLAGS=""
 660.367 +CT_LIBC_EXTRA_CC_ARGS=""
 660.368 +CT_LIBC_GLIBC_CONFIGPARMS=""
 660.369 +CT_LIBC_ADDONS=""
 660.370 +# CT_LIBC_V_snapshot is not set
 660.371 +CT_LIBC_V_specific_date=y
 660.372 +# CT_LIBC_V_0_9_26 is not set
 660.373 +# CT_LIBC_V_0_9_27 is not set
 660.374 +# CT_LIBC_V_0_9_28 is not set
 660.375 +CT_LIBC_UCLIBC_DEBUG_LEVEL_0=y
 660.376 +# CT_LIBC_UCLIBC_DEBUG_LEVEL_1 is not set
 660.377 +# CT_LIBC_UCLIBC_DEBUG_LEVEL_2 is not set
 660.378 +CT_LIBC_UCLIBC_DEBUG_LEVEL=0
 660.379 +CT_LIBC_UCLIBC_CONFIG_FILE="${CT_TOP_DIR}/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
 660.380 +# CT_LIBC_UCLIBC_LOCALES is not set
   661.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   661.2 +++ b/samples/armeb-unknown-linux-gnu/linux-2.6.19.1.config	Sat Feb 24 11:00:05 2007 +0000
   661.3 @@ -0,0 +1,1197 @@
   661.4 +#
   661.5 +# Automatically generated make config: don't edit
   661.6 +# Linux kernel version: 2.6.19.1
   661.7 +# Sat Dec 23 17:36:49 2006
   661.8 +#
   661.9 +CONFIG_ARM=y
  661.10 +CONFIG_GENERIC_TIME=y
  661.11 +CONFIG_MMU=y
  661.12 +CONFIG_GENERIC_HARDIRQS=y
  661.13 +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
  661.14 +CONFIG_HARDIRQS_SW_RESEND=y
  661.15 +CONFIG_GENERIC_IRQ_PROBE=y
  661.16 +CONFIG_RWSEM_GENERIC_SPINLOCK=y
  661.17 +CONFIG_GENERIC_HWEIGHT=y
  661.18 +CONFIG_GENERIC_CALIBRATE_DELAY=y
  661.19 +CONFIG_VECTORS_BASE=0xffff0000
  661.20 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
  661.21 +
  661.22 +#
  661.23 +# Code maturity level options
  661.24 +#
  661.25 +CONFIG_EXPERIMENTAL=y
  661.26 +CONFIG_BROKEN_ON_SMP=y
  661.27 +CONFIG_INIT_ENV_ARG_LIMIT=32
  661.28 +
  661.29 +#
  661.30 +# General setup
  661.31 +#
  661.32 +CONFIG_LOCALVERSION="-nslu2"
  661.33 +# CONFIG_LOCALVERSION_AUTO is not set
  661.34 +CONFIG_SWAP=y
  661.35 +CONFIG_SYSVIPC=y
  661.36 +# CONFIG_IPC_NS is not set
  661.37 +# CONFIG_POSIX_MQUEUE is not set
  661.38 +# CONFIG_BSD_PROCESS_ACCT is not set
  661.39 +# CONFIG_TASKSTATS is not set
  661.40 +# CONFIG_UTS_NS is not set
  661.41 +# CONFIG_AUDIT is not set
  661.42 +# CONFIG_IKCONFIG is not set
  661.43 +# CONFIG_RELAY is not set
  661.44 +CONFIG_INITRAMFS_SOURCE=""
  661.45 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
  661.46 +CONFIG_SYSCTL=y
  661.47 +# CONFIG_EMBEDDED is not set
  661.48 +CONFIG_UID16=y
  661.49 +CONFIG_SYSCTL_SYSCALL=y
  661.50 +CONFIG_KALLSYMS=y
  661.51 +# CONFIG_KALLSYMS_ALL is not set
  661.52 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
  661.53 +CONFIG_HOTPLUG=y
  661.54 +CONFIG_PRINTK=y
  661.55 +CONFIG_BUG=y
  661.56 +CONFIG_ELF_CORE=y
  661.57 +CONFIG_BASE_FULL=y
  661.58 +CONFIG_FUTEX=y
  661.59 +CONFIG_EPOLL=y
  661.60 +CONFIG_SHMEM=y
  661.61 +CONFIG_SLAB=y
  661.62 +CONFIG_VM_EVENT_COUNTERS=y
  661.63 +CONFIG_RT_MUTEXES=y
  661.64 +# CONFIG_TINY_SHMEM is not set
  661.65 +CONFIG_BASE_SMALL=0
  661.66 +# CONFIG_SLOB is not set
  661.67 +
  661.68 +#
  661.69 +# Loadable module support
  661.70 +#
  661.71 +CONFIG_MODULES=y
  661.72 +CONFIG_MODULE_UNLOAD=y
  661.73 +CONFIG_MODULE_FORCE_UNLOAD=y
  661.74 +# CONFIG_MODVERSIONS is not set
  661.75 +# CONFIG_MODULE_SRCVERSION_ALL is not set
  661.76 +CONFIG_KMOD=y
  661.77 +
  661.78 +#
  661.79 +# Block layer
  661.80 +#
  661.81 +CONFIG_BLOCK=y
  661.82 +# CONFIG_BLK_DEV_IO_TRACE is not set
  661.83 +
  661.84 +#
  661.85 +# IO Schedulers
  661.86 +#
  661.87 +CONFIG_IOSCHED_NOOP=y
  661.88 +CONFIG_IOSCHED_AS=y
  661.89 +CONFIG_IOSCHED_DEADLINE=y
  661.90 +CONFIG_IOSCHED_CFQ=y
  661.91 +CONFIG_DEFAULT_AS=y
  661.92 +# CONFIG_DEFAULT_DEADLINE is not set
  661.93 +# CONFIG_DEFAULT_CFQ is not set
  661.94 +# CONFIG_DEFAULT_NOOP is not set
  661.95 +CONFIG_DEFAULT_IOSCHED="anticipatory"
  661.96 +
  661.97 +#
  661.98 +# System Type
  661.99 +#
 661.100 +# CONFIG_ARCH_AAEC2000 is not set
 661.101 +# CONFIG_ARCH_INTEGRATOR is not set
 661.102 +# CONFIG_ARCH_REALVIEW is not set
 661.103 +# CONFIG_ARCH_VERSATILE is not set
 661.104 +# CONFIG_ARCH_AT91 is not set
 661.105 +# CONFIG_ARCH_CLPS7500 is not set
 661.106 +# CONFIG_ARCH_CLPS711X is not set
 661.107 +# CONFIG_ARCH_CO285 is not set
 661.108 +# CONFIG_ARCH_EBSA110 is not set
 661.109 +# CONFIG_ARCH_EP93XX is not set
 661.110 +# CONFIG_ARCH_FOOTBRIDGE is not set
 661.111 +# CONFIG_ARCH_NETX is not set
 661.112 +# CONFIG_ARCH_H720X is not set
 661.113 +# CONFIG_ARCH_IMX is not set
 661.114 +# CONFIG_ARCH_IOP32X is not set
 661.115 +# CONFIG_ARCH_IOP33X is not set
 661.116 +CONFIG_ARCH_IXP4XX=y
 661.117 +# CONFIG_ARCH_IXP2000 is not set
 661.118 +# CONFIG_ARCH_IXP23XX is not set
 661.119 +# CONFIG_ARCH_L7200 is not set
 661.120 +# CONFIG_ARCH_PNX4008 is not set
 661.121 +# CONFIG_ARCH_PXA is not set
 661.122 +# CONFIG_ARCH_RPC is not set
 661.123 +# CONFIG_ARCH_SA1100 is not set
 661.124 +# CONFIG_ARCH_S3C2410 is not set
 661.125 +# CONFIG_ARCH_SHARK is not set
 661.126 +# CONFIG_ARCH_LH7A40X is not set
 661.127 +# CONFIG_ARCH_OMAP is not set
 661.128 +CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
 661.129 +
 661.130 +#
 661.131 +# Intel IXP4xx Implementation Options
 661.132 +#
 661.133 +
 661.134 +#
 661.135 +# IXP4xx Platforms
 661.136 +#
 661.137 +CONFIG_MACH_NSLU2=y
 661.138 +# CONFIG_ARCH_AVILA is not set
 661.139 +# CONFIG_ARCH_ADI_COYOTE is not set
 661.140 +# CONFIG_ARCH_IXDP425 is not set
 661.141 +# CONFIG_MACH_IXDPG425 is not set
 661.142 +# CONFIG_MACH_IXDP465 is not set
 661.143 +# CONFIG_ARCH_PRPMC1100 is not set
 661.144 +# CONFIG_MACH_NAS100D is not set
 661.145 +# CONFIG_MACH_GTWX5715 is not set
 661.146 +
 661.147 +#
 661.148 +# IXP4xx Options
 661.149 +#
 661.150 +CONFIG_DMABOUNCE=y
 661.151 +# CONFIG_IXP4XX_INDIRECT_PCI is not set
 661.152 +
 661.153 +#
 661.154 +# Processor Type
 661.155 +#
 661.156 +CONFIG_CPU_32=y
 661.157 +CONFIG_CPU_XSCALE=y
 661.158 +CONFIG_CPU_32v5=y
 661.159 +CONFIG_CPU_ABRT_EV5T=y
 661.160 +CONFIG_CPU_CACHE_VIVT=y
 661.161 +CONFIG_CPU_TLB_V4WBI=y
 661.162 +CONFIG_CPU_CP15=y
 661.163 +CONFIG_CPU_CP15_MMU=y
 661.164 +
 661.165 +#
 661.166 +# Processor Features
 661.167 +#
 661.168 +CONFIG_ARM_THUMB=y
 661.169 +CONFIG_CPU_BIG_ENDIAN=y
 661.170 +# CONFIG_CPU_DCACHE_DISABLE is not set
 661.171 +CONFIG_XSCALE_PMU=y
 661.172 +
 661.173 +#
 661.174 +# Bus support
 661.175 +#
 661.176 +CONFIG_PCI=y
 661.177 +# CONFIG_PCI_DEBUG is not set
 661.178 +
 661.179 +#
 661.180 +# PCCARD (PCMCIA/CardBus) support
 661.181 +#
 661.182 +# CONFIG_PCCARD is not set
 661.183 +
 661.184 +#
 661.185 +# Kernel Features
 661.186 +#
 661.187 +# CONFIG_PREEMPT is not set
 661.188 +# CONFIG_NO_IDLE_HZ is not set
 661.189 +CONFIG_HZ=100
 661.190 +# CONFIG_AEABI is not set
 661.191 +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
 661.192 +CONFIG_SELECT_MEMORY_MODEL=y
 661.193 +CONFIG_FLATMEM_MANUAL=y
 661.194 +# CONFIG_DISCONTIGMEM_MANUAL is not set
 661.195 +# CONFIG_SPARSEMEM_MANUAL is not set
 661.196 +CONFIG_FLATMEM=y
 661.197 +CONFIG_FLAT_NODE_MEM_MAP=y
 661.198 +# CONFIG_SPARSEMEM_STATIC is not set
 661.199 +CONFIG_SPLIT_PTLOCK_CPUS=4096
 661.200 +# CONFIG_RESOURCES_64BIT is not set
 661.201 +CONFIG_ALIGNMENT_TRAP=y
 661.202 +
 661.203 +#
 661.204 +# Boot options
 661.205 +#
 661.206 +CONFIG_ZBOOT_ROM_TEXT=0x0
 661.207 +CONFIG_ZBOOT_ROM_BSS=0x0
 661.208 +CONFIG_CMDLINE="root=1f03 mem=32M"
 661.209 +# CONFIG_XIP_KERNEL is not set
 661.210 +
 661.211 +#
 661.212 +# Floating point emulation
 661.213 +#
 661.214 +
 661.215 +#
 661.216 +# At least one emulation must be selected
 661.217 +#
 661.218 +CONFIG_FPE_NWFPE=y
 661.219 +# CONFIG_FPE_NWFPE_XP is not set
 661.220 +# CONFIG_FPE_FASTFPE is not set
 661.221 +
 661.222 +#
 661.223 +# Userspace binary formats
 661.224 +#
 661.225 +CONFIG_BINFMT_ELF=y
 661.226 +# CONFIG_BINFMT_AOUT is not set
 661.227 +# CONFIG_BINFMT_MISC is not set
 661.228 +# CONFIG_ARTHUR is not set
 661.229 +
 661.230 +#
 661.231 +# Power management options
 661.232 +#
 661.233 +CONFIG_PM=y
 661.234 +# CONFIG_PM_LEGACY is not set
 661.235 +# CONFIG_PM_DEBUG is not set
 661.236 +# CONFIG_PM_SYSFS_DEPRECATED is not set
 661.237 +# CONFIG_APM is not set
 661.238 +
 661.239 +#
 661.240 +# Networking
 661.241 +#
 661.242 +CONFIG_NET=y
 661.243 +
 661.244 +#
 661.245 +# Networking options
 661.246 +#
 661.247 +# CONFIG_NETDEBUG is not set
 661.248 +CONFIG_PACKET=y
 661.249 +CONFIG_PACKET_MMAP=y
 661.250 +CONFIG_UNIX=y
 661.251 +CONFIG_XFRM=y
 661.252 +# CONFIG_XFRM_USER is not set
 661.253 +# CONFIG_XFRM_SUB_POLICY is not set
 661.254 +# CONFIG_NET_KEY is not set
 661.255 +CONFIG_INET=y
 661.256 +CONFIG_IP_MULTICAST=y
 661.257 +# CONFIG_IP_ADVANCED_ROUTER is not set
 661.258 +CONFIG_IP_FIB_HASH=y
 661.259 +CONFIG_IP_PNP=y
 661.260 +# CONFIG_IP_PNP_DHCP is not set
 661.261 +CONFIG_IP_PNP_BOOTP=y
 661.262 +# CONFIG_IP_PNP_RARP is not set
 661.263 +# CONFIG_NET_IPIP is not set
 661.264 +# CONFIG_NET_IPGRE is not set
 661.265 +# CONFIG_IP_MROUTE is not set
 661.266 +# CONFIG_ARPD is not set
 661.267 +# CONFIG_SYN_COOKIES is not set
 661.268 +# CONFIG_INET_AH is not set
 661.269 +# CONFIG_INET_ESP is not set
 661.270 +# CONFIG_INET_IPCOMP is not set
 661.271 +# CONFIG_INET_XFRM_TUNNEL is not set
 661.272 +# CONFIG_INET_TUNNEL is not set
 661.273 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
 661.274 +CONFIG_INET_XFRM_MODE_TUNNEL=y
 661.275 +CONFIG_INET_XFRM_MODE_BEET=y
 661.276 +# CONFIG_INET_DIAG is not set
 661.277 +# CONFIG_TCP_CONG_ADVANCED is not set
 661.278 +CONFIG_TCP_CONG_CUBIC=y
 661.279 +CONFIG_DEFAULT_TCP_CONG="cubic"
 661.280 +# CONFIG_IPV6 is not set
 661.281 +# CONFIG_INET6_XFRM_TUNNEL is not set
 661.282 +# CONFIG_INET6_TUNNEL is not set
 661.283 +# CONFIG_NETWORK_SECMARK is not set
 661.284 +# CONFIG_NETFILTER is not set
 661.285 +
 661.286 +#
 661.287 +# DCCP Configuration (EXPERIMENTAL)
 661.288 +#
 661.289 +# CONFIG_IP_DCCP is not set
 661.290 +
 661.291 +#
 661.292 +# SCTP Configuration (EXPERIMENTAL)
 661.293 +#
 661.294 +# CONFIG_IP_SCTP is not set
 661.295 +
 661.296 +#
 661.297 +# TIPC Configuration (EXPERIMENTAL)
 661.298 +#
 661.299 +# CONFIG_TIPC is not set
 661.300 +# CONFIG_ATM is not set
 661.301 +# CONFIG_BRIDGE is not set
 661.302 +# CONFIG_VLAN_8021Q is not set
 661.303 +# CONFIG_DECNET is not set
 661.304 +# CONFIG_LLC2 is not set
 661.305 +# CONFIG_IPX is not set
 661.306 +# CONFIG_ATALK is not set
 661.307 +# CONFIG_X25 is not set
 661.308 +# CONFIG_LAPB is not set
 661.309 +# CONFIG_ECONET is not set
 661.310 +# CONFIG_WAN_ROUTER is not set
 661.311 +
 661.312 +#
 661.313 +# QoS and/or fair queueing
 661.314 +#
 661.315 +# CONFIG_NET_SCHED is not set
 661.316 +
 661.317 +#
 661.318 +# Network testing
 661.319 +#
 661.320 +# CONFIG_NET_PKTGEN is not set
 661.321 +# CONFIG_HAMRADIO is not set
 661.322 +# CONFIG_IRDA is not set
 661.323 +# CONFIG_BT is not set
 661.324 +# CONFIG_IEEE80211 is not set
 661.325 +
 661.326 +#
 661.327 +# Device Drivers
 661.328 +#
 661.329 +
 661.330 +#
 661.331 +# Generic Driver Options
 661.332 +#
 661.333 +CONFIG_STANDALONE=y
 661.334 +CONFIG_PREVENT_FIRMWARE_BUILD=y
 661.335 +# CONFIG_FW_LOADER is not set
 661.336 +# CONFIG_DEBUG_DRIVER is not set
 661.337 +# CONFIG_SYS_HYPERVISOR is not set
 661.338 +
 661.339 +#
 661.340 +# Connector - unified userspace <-> kernelspace linker
 661.341 +#
 661.342 +# CONFIG_CONNECTOR is not set
 661.343 +
 661.344 +#
 661.345 +# Memory Technology Devices (MTD)
 661.346 +#
 661.347 +CONFIG_MTD=y
 661.348 +# CONFIG_MTD_DEBUG is not set
 661.349 +# CONFIG_MTD_CONCAT is not set
 661.350 +CONFIG_MTD_PARTITIONS=y
 661.351 +# CONFIG_MTD_REDBOOT_PARTS is not set
 661.352 +CONFIG_MTD_CMDLINE_PARTS=y
 661.353 +# CONFIG_MTD_AFS_PARTS is not set
 661.354 +
 661.355 +#
 661.356 +# User Modules And Translation Layers
 661.357 +#
 661.358 +CONFIG_MTD_CHAR=y
 661.359 +CONFIG_MTD_BLOCK=y
 661.360 +# CONFIG_FTL is not set
 661.361 +# CONFIG_NFTL is not set
 661.362 +# CONFIG_INFTL is not set
 661.363 +# CONFIG_RFD_FTL is not set
 661.364 +# CONFIG_SSFDC is not set
 661.365 +
 661.366 +#
 661.367 +# RAM/ROM/Flash chip drivers
 661.368 +#
 661.369 +CONFIG_MTD_CFI=y
 661.370 +# CONFIG_MTD_JEDECPROBE is not set
 661.371 +CONFIG_MTD_GEN_PROBE=y
 661.372 +CONFIG_MTD_CFI_ADV_OPTIONS=y
 661.373 +CONFIG_MTD_CFI_NOSWAP=y
 661.374 +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
 661.375 +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
 661.376 +# CONFIG_MTD_CFI_GEOMETRY is not set
 661.377 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
 661.378 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
 661.379 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
 661.380 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
 661.381 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
 661.382 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
 661.383 +CONFIG_MTD_CFI_I1=y
 661.384 +CONFIG_MTD_CFI_I2=y
 661.385 +# CONFIG_MTD_CFI_I4 is not set
 661.386 +# CONFIG_MTD_CFI_I8 is not set
 661.387 +# CONFIG_MTD_OTP is not set
 661.388 +CONFIG_MTD_CFI_INTELEXT=y
 661.389 +# CONFIG_MTD_CFI_AMDSTD is not set
 661.390 +# CONFIG_MTD_CFI_STAA is not set
 661.391 +CONFIG_MTD_CFI_UTIL=y
 661.392 +# CONFIG_MTD_RAM is not set
 661.393 +# CONFIG_MTD_ROM is not set
 661.394 +# CONFIG_MTD_ABSENT is not set
 661.395 +# CONFIG_MTD_OBSOLETE_CHIPS is not set
 661.396 +
 661.397 +#
 661.398 +# Mapping drivers for chip access
 661.399 +#
 661.400 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
 661.401 +# CONFIG_MTD_PHYSMAP is not set
 661.402 +CONFIG_MTD_ARM_INTEGRATOR=y
 661.403 +# CONFIG_MTD_PLATRAM is not set
 661.404 +
 661.405 +#
 661.406 +# Self-contained MTD device drivers
 661.407 +#
 661.408 +# CONFIG_MTD_PMC551 is not set
 661.409 +# CONFIG_MTD_SLRAM is not set
 661.410 +# CONFIG_MTD_PHRAM is not set
 661.411 +# CONFIG_MTD_MTDRAM is not set
 661.412 +# CONFIG_MTD_BLOCK2MTD is not set
 661.413 +
 661.414 +#
 661.415 +# Disk-On-Chip Device Drivers
 661.416 +#
 661.417 +# CONFIG_MTD_DOC2000 is not set
 661.418 +# CONFIG_MTD_DOC2001 is not set
 661.419 +# CONFIG_MTD_DOC2001PLUS is not set
 661.420 +
 661.421 +#
 661.422 +# NAND Flash Device Drivers
 661.423 +#
 661.424 +# CONFIG_MTD_NAND is not set
 661.425 +
 661.426 +#
 661.427 +# OneNAND Flash Device Drivers
 661.428 +#
 661.429 +# CONFIG_MTD_ONENAND is not set
 661.430 +
 661.431 +#
 661.432 +# Parallel port support
 661.433 +#
 661.434 +# CONFIG_PARPORT is not set
 661.435 +
 661.436 +#
 661.437 +# Plug and Play support
 661.438 +#
 661.439 +
 661.440 +#
 661.441 +# Block devices
 661.442 +#
 661.443 +# CONFIG_BLK_CPQ_DA is not set
 661.444 +# CONFIG_BLK_CPQ_CISS_DA is not set
 661.445 +# CONFIG_BLK_DEV_DAC960 is not set
 661.446 +# CONFIG_BLK_DEV_UMEM is not set
 661.447 +# CONFIG_BLK_DEV_COW_COMMON is not set
 661.448 +# CONFIG_BLK_DEV_LOOP is not set
 661.449 +# CONFIG_BLK_DEV_NBD is not set
 661.450 +# CONFIG_BLK_DEV_SX8 is not set
 661.451 +CONFIG_BLK_DEV_RAM=y
 661.452 +CONFIG_BLK_DEV_RAM_COUNT=16
 661.453 +CONFIG_BLK_DEV_RAM_SIZE=4096
 661.454 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 661.455 +CONFIG_BLK_DEV_INITRD=y
 661.456 +# CONFIG_CDROM_PKTCDVD is not set
 661.457 +# CONFIG_ATA_OVER_ETH is not set
 661.458 +
 661.459 +#
 661.460 +# ATA/ATAPI/MFM/RLL support
 661.461 +#
 661.462 +# CONFIG_IDE is not set
 661.463 +
 661.464 +#
 661.465 +# SCSI device support
 661.466 +#
 661.467 +# CONFIG_RAID_ATTRS is not set
 661.468 +# CONFIG_SCSI is not set
 661.469 +# CONFIG_SCSI_NETLINK is not set
 661.470 +
 661.471 +#
 661.472 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
 661.473 +#
 661.474 +# CONFIG_ATA is not set
 661.475 +
 661.476 +#
 661.477 +# Multi-device support (RAID and LVM)
 661.478 +#
 661.479 +# CONFIG_MD is not set
 661.480 +
 661.481 +#
 661.482 +# Fusion MPT device support
 661.483 +#
 661.484 +# CONFIG_FUSION is not set
 661.485 +
 661.486 +#
 661.487 +# IEEE 1394 (FireWire) support
 661.488 +#
 661.489 +# CONFIG_IEEE1394 is not set
 661.490 +
 661.491 +#
 661.492 +# I2O device support
 661.493 +#
 661.494 +# CONFIG_I2O is not set
 661.495 +
 661.496 +#
 661.497 +# Network device support
 661.498 +#
 661.499 +CONFIG_NETDEVICES=y
 661.500 +# CONFIG_DUMMY is not set
 661.501 +# CONFIG_BONDING is not set
 661.502 +# CONFIG_EQUALIZER is not set
 661.503 +# CONFIG_TUN is not set
 661.504 +
 661.505 +#
 661.506 +# ARCnet devices
 661.507 +#
 661.508 +# CONFIG_ARCNET is not set
 661.509 +
 661.510 +#
 661.511 +# PHY device support
 661.512 +#
 661.513 +# CONFIG_PHYLIB is not set
 661.514 +
 661.515 +#
 661.516 +# Ethernet (10 or 100Mbit)
 661.517 +#
 661.518 +CONFIG_NET_ETHERNET=y
 661.519 +CONFIG_MII=y
 661.520 +# CONFIG_HAPPYMEAL is not set
 661.521 +# CONFIG_SUNGEM is not set
 661.522 +# CONFIG_CASSINI is not set
 661.523 +# CONFIG_NET_VENDOR_3COM is not set
 661.524 +CONFIG_SMC91X=y
 661.525 +# CONFIG_DM9000 is not set
 661.526 +
 661.527 +#
 661.528 +# Tulip family network device support
 661.529 +#
 661.530 +# CONFIG_NET_TULIP is not set
 661.531 +# CONFIG_HP100 is not set
 661.532 +# CONFIG_NET_PCI is not set
 661.533 +
 661.534 +#
 661.535 +# Ethernet (1000 Mbit)
 661.536 +#
 661.537 +# CONFIG_ACENIC is not set
 661.538 +# CONFIG_DL2K is not set
 661.539 +# CONFIG_E1000 is not set
 661.540 +# CONFIG_NS83820 is not set
 661.541 +# CONFIG_HAMACHI is not set
 661.542 +# CONFIG_YELLOWFIN is not set
 661.543 +# CONFIG_R8169 is not set
 661.544 +# CONFIG_SIS190 is not set
 661.545 +# CONFIG_SKGE is not set
 661.546 +# CONFIG_SKY2 is not set
 661.547 +# CONFIG_SK98LIN is not set
 661.548 +# CONFIG_TIGON3 is not set
 661.549 +# CONFIG_BNX2 is not set
 661.550 +# CONFIG_QLA3XXX is not set
 661.551 +
 661.552 +#
 661.553 +# Ethernet (10000 Mbit)
 661.554 +#
 661.555 +# CONFIG_CHELSIO_T1 is not set
 661.556 +# CONFIG_IXGB is not set
 661.557 +# CONFIG_S2IO is not set
 661.558 +# CONFIG_MYRI10GE is not set
 661.559 +
 661.560 +#
 661.561 +# Token Ring devices
 661.562 +#
 661.563 +# CONFIG_TR is not set
 661.564 +
 661.565 +#
 661.566 +# Wireless LAN (non-hamradio)
 661.567 +#
 661.568 +# CONFIG_NET_RADIO is not set
 661.569 +
 661.570 +#
 661.571 +# Wan interfaces
 661.572 +#
 661.573 +# CONFIG_WAN is not set
 661.574 +# CONFIG_FDDI is not set
 661.575 +# CONFIG_HIPPI is not set
 661.576 +# CONFIG_PPP is not set
 661.577 +# CONFIG_SLIP is not set
 661.578 +# CONFIG_SHAPER is not set
 661.579 +# CONFIG_NETCONSOLE is not set
 661.580 +# CONFIG_NETPOLL is not set
 661.581 +# CONFIG_NET_POLL_CONTROLLER is not set
 661.582 +
 661.583 +#
 661.584 +# ISDN subsystem
 661.585 +#
 661.586 +# CONFIG_ISDN is not set
 661.587 +
 661.588 +#
 661.589 +# Input device support
 661.590 +#
 661.591 +CONFIG_INPUT=y
 661.592 +# CONFIG_INPUT_FF_MEMLESS is not set
 661.593 +
 661.594 +#
 661.595 +# Userland interfaces
 661.596 +#
 661.597 +CONFIG_INPUT_MOUSEDEV=y
 661.598 +CONFIG_INPUT_MOUSEDEV_PSAUX=y
 661.599 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 661.600 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 661.601 +# CONFIG_INPUT_JOYDEV is not set
 661.602 +# CONFIG_INPUT_TSDEV is not set
 661.603 +# CONFIG_INPUT_EVDEV is not set
 661.604 +# CONFIG_INPUT_EVBUG is not set
 661.605 +
 661.606 +#
 661.607 +# Input Device Drivers
 661.608 +#
 661.609 +CONFIG_INPUT_KEYBOARD=y
 661.610 +CONFIG_KEYBOARD_ATKBD=y
 661.611 +# CONFIG_KEYBOARD_SUNKBD is not set
 661.612 +# CONFIG_KEYBOARD_LKKBD is not set
 661.613 +# CONFIG_KEYBOARD_XTKBD is not set
 661.614 +# CONFIG_KEYBOARD_NEWTON is not set
 661.615 +# CONFIG_KEYBOARD_STOWAWAY is not set
 661.616 +CONFIG_INPUT_MOUSE=y
 661.617 +CONFIG_MOUSE_PS2=y
 661.618 +# CONFIG_MOUSE_SERIAL is not set
 661.619 +# CONFIG_MOUSE_VSXXXAA is not set
 661.620 +# CONFIG_INPUT_JOYSTICK is not set
 661.621 +# CONFIG_INPUT_TOUCHSCREEN is not set
 661.622 +# CONFIG_INPUT_MISC is not set
 661.623 +
 661.624 +#
 661.625 +# Hardware I/O ports
 661.626 +#
 661.627 +CONFIG_SERIO=y
 661.628 +# CONFIG_SERIO_SERPORT is not set
 661.629 +# CONFIG_SERIO_PCIPS2 is not set
 661.630 +CONFIG_SERIO_LIBPS2=y
 661.631 +# CONFIG_SERIO_RAW is not set
 661.632 +# CONFIG_GAMEPORT is not set
 661.633 +
 661.634 +#
 661.635 +# Character devices
 661.636 +#
 661.637 +CONFIG_VT=y
 661.638 +CONFIG_VT_CONSOLE=y
 661.639 +CONFIG_HW_CONSOLE=y
 661.640 +# CONFIG_VT_HW_CONSOLE_BINDING is not set
 661.641 +# CONFIG_SERIAL_NONSTANDARD is not set
 661.642 +
 661.643 +#
 661.644 +# Serial drivers
 661.645 +#
 661.646 +CONFIG_SERIAL_8250=m
 661.647 +CONFIG_SERIAL_8250_PCI=m
 661.648 +CONFIG_SERIAL_8250_NR_UARTS=4
 661.649 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 661.650 +CONFIG_SERIAL_8250_EXTENDED=y
 661.651 +CONFIG_SERIAL_8250_MANY_PORTS=y
 661.652 +CONFIG_SERIAL_8250_SHARE_IRQ=y
 661.653 +# CONFIG_SERIAL_8250_DETECT_IRQ is not set
 661.654 +CONFIG_SERIAL_8250_RSA=y
 661.655 +
 661.656 +#
 661.657 +# Non-8250 serial port support
 661.658 +#
 661.659 +CONFIG_SERIAL_CORE=m
 661.660 +# CONFIG_SERIAL_JSM is not set
 661.661 +CONFIG_UNIX98_PTYS=y
 661.662 +CONFIG_LEGACY_PTYS=y
 661.663 +CONFIG_LEGACY_PTY_COUNT=16
 661.664 +
 661.665 +#
 661.666 +# IPMI
 661.667 +#
 661.668 +# CONFIG_IPMI_HANDLER is not set
 661.669 +
 661.670 +#
 661.671 +# Watchdog Cards
 661.672 +#
 661.673 +# CONFIG_WATCHDOG is not set
 661.674 +CONFIG_HW_RANDOM=y
 661.675 +CONFIG_HW_RANDOM_IXP4XX=y
 661.676 +# CONFIG_NVRAM is not set
 661.677 +# CONFIG_DTLK is not set
 661.678 +# CONFIG_R3964 is not set
 661.679 +# CONFIG_APPLICOM is not set
 661.680 +
 661.681 +#
 661.682 +# Ftape, the floppy tape device driver
 661.683 +#
 661.684 +# CONFIG_DRM is not set
 661.685 +# CONFIG_RAW_DRIVER is not set
 661.686 +
 661.687 +#
 661.688 +# TPM devices
 661.689 +#
 661.690 +# CONFIG_TCG_TPM is not set
 661.691 +
 661.692 +#
 661.693 +# I2C support
 661.694 +#
 661.695 +CONFIG_I2C=y
 661.696 +CONFIG_I2C_CHARDEV=m
 661.697 +
 661.698 +#
 661.699 +# I2C Algorithms
 661.700 +#
 661.701 +CONFIG_I2C_ALGOBIT=y
 661.702 +# CONFIG_I2C_ALGOPCF is not set
 661.703 +# CONFIG_I2C_ALGOPCA is not set
 661.704 +
 661.705 +#
 661.706 +# I2C Hardware Bus support
 661.707 +#
 661.708 +# CONFIG_I2C_ALI1535 is not set
 661.709 +# CONFIG_I2C_ALI1563 is not set
 661.710 +# CONFIG_I2C_ALI15X3 is not set
 661.711 +# CONFIG_I2C_AMD756 is not set
 661.712 +# CONFIG_I2C_AMD8111 is not set
 661.713 +# CONFIG_I2C_I801 is not set
 661.714 +# CONFIG_I2C_I810 is not set
 661.715 +# CONFIG_I2C_PIIX4 is not set
 661.716 +# CONFIG_I2C_IOP3XX is not set
 661.717 +# CONFIG_I2C_IXP4XX is not set
 661.718 +# CONFIG_I2C_NFORCE2 is not set
 661.719 +# CONFIG_I2C_OCORES is not set
 661.720 +# CONFIG_I2C_PARPORT_LIGHT is not set
 661.721 +# CONFIG_I2C_PROSAVAGE is not set
 661.722 +# CONFIG_I2C_SAVAGE4 is not set
 661.723 +# CONFIG_I2C_SIS5595 is not set
 661.724 +# CONFIG_I2C_SIS630 is not set
 661.725 +# CONFIG_I2C_SIS96X is not set
 661.726 +# CONFIG_I2C_STUB is not set
 661.727 +# CONFIG_I2C_VIA is not set
 661.728 +# CONFIG_I2C_VIAPRO is not set
 661.729 +# CONFIG_I2C_VOODOO3 is not set
 661.730 +# CONFIG_I2C_PCA_ISA is not set
 661.731 +
 661.732 +#
 661.733 +# Miscellaneous I2C Chip support
 661.734 +#
 661.735 +# CONFIG_SENSORS_DS1337 is not set
 661.736 +# CONFIG_SENSORS_DS1374 is not set
 661.737 +CONFIG_SENSORS_EEPROM=m
 661.738 +# CONFIG_SENSORS_PCF8574 is not set
 661.739 +# CONFIG_SENSORS_PCA9539 is not set
 661.740 +# CONFIG_SENSORS_PCF8591 is not set
 661.741 +# CONFIG_SENSORS_MAX6875 is not set
 661.742 +# CONFIG_I2C_DEBUG_CORE is not set
 661.743 +# CONFIG_I2C_DEBUG_ALGO is not set
 661.744 +# CONFIG_I2C_DEBUG_BUS is not set
 661.745 +# CONFIG_I2C_DEBUG_CHIP is not set
 661.746 +
 661.747 +#
 661.748 +# SPI support
 661.749 +#
 661.750 +# CONFIG_SPI is not set
 661.751 +# CONFIG_SPI_MASTER is not set
 661.752 +
 661.753 +#
 661.754 +# Dallas's 1-wire bus
 661.755 +#
 661.756 +# CONFIG_W1 is not set
 661.757 +
 661.758 +#
 661.759 +# Hardware Monitoring support
 661.760 +#
 661.761 +# CONFIG_HWMON is not set
 661.762 +# CONFIG_HWMON_VID is not set
 661.763 +
 661.764 +#
 661.765 +# Misc devices
 661.766 +#
 661.767 +# CONFIG_SGI_IOC4 is not set
 661.768 +# CONFIG_TIFM_CORE is not set
 661.769 +
 661.770 +#
 661.771 +# LED devices
 661.772 +#
 661.773 +# CONFIG_NEW_LEDS is not set
 661.774 +
 661.775 +#
 661.776 +# LED drivers
 661.777 +#
 661.778 +
 661.779 +#
 661.780 +# LED Triggers
 661.781 +#
 661.782 +
 661.783 +#
 661.784 +# Multimedia devices
 661.785 +#
 661.786 +# CONFIG_VIDEO_DEV is not set
 661.787 +
 661.788 +#
 661.789 +# Digital Video Broadcasting Devices
 661.790 +#
 661.791 +# CONFIG_DVB is not set
 661.792 +
 661.793 +#
 661.794 +# Graphics support
 661.795 +#
 661.796 +CONFIG_FIRMWARE_EDID=y
 661.797 +CONFIG_FB=y
 661.798 +# CONFIG_FB_DDC is not set
 661.799 +# CONFIG_FB_CFB_FILLRECT is not set
 661.800 +# CONFIG_FB_CFB_COPYAREA is not set
 661.801 +# CONFIG_FB_CFB_IMAGEBLIT is not set
 661.802 +# CONFIG_FB_MACMODES is not set
 661.803 +# CONFIG_FB_BACKLIGHT is not set
 661.804 +# CONFIG_FB_MODE_HELPERS is not set
 661.805 +# CONFIG_FB_TILEBLITTING is not set
 661.806 +# CONFIG_FB_CIRRUS is not set
 661.807 +# CONFIG_FB_PM2 is not set
 661.808 +# CONFIG_FB_CYBER2000 is not set
 661.809 +# CONFIG_FB_ASILIANT is not set
 661.810 +# CONFIG_FB_IMSTT is not set
 661.811 +# CONFIG_FB_S1D13XXX is not set
 661.812 +# CONFIG_FB_NVIDIA is not set
 661.813 +# CONFIG_FB_RIVA is not set
 661.814 +# CONFIG_FB_MATROX is not set
 661.815 +# CONFIG_FB_RADEON is not set
 661.816 +# CONFIG_FB_ATY128 is not set
 661.817 +# CONFIG_FB_ATY is not set
 661.818 +# CONFIG_FB_SAVAGE is not set
 661.819 +# CONFIG_FB_SIS is not set
 661.820 +# CONFIG_FB_NEOMAGIC is not set
 661.821 +# CONFIG_FB_KYRO is not set
 661.822 +# CONFIG_FB_3DFX is not set
 661.823 +# CONFIG_FB_VOODOO1 is not set
 661.824 +# CONFIG_FB_TRIDENT is not set
 661.825 +# CONFIG_FB_VIRTUAL is not set
 661.826 +
 661.827 +#
 661.828 +# Console display driver support
 661.829 +#
 661.830 +CONFIG_VGA_CONSOLE=y
 661.831 +# CONFIG_VGACON_SOFT_SCROLLBACK is not set
 661.832 +CONFIG_DUMMY_CONSOLE=y
 661.833 +CONFIG_FRAMEBUFFER_CONSOLE=y
 661.834 +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
 661.835 +CONFIG_FONTS=y
 661.836 +# CONFIG_FONT_8x8 is not set
 661.837 +# CONFIG_FONT_8x16 is not set
 661.838 +# CONFIG_FONT_6x11 is not set
 661.839 +# CONFIG_FONT_7x14 is not set
 661.840 +# CONFIG_FONT_PEARL_8x8 is not set
 661.841 +CONFIG_FONT_ACORN_8x8=y
 661.842 +# CONFIG_FONT_MINI_4x6 is not set
 661.843 +# CONFIG_FONT_SUN8x16 is not set
 661.844 +# CONFIG_FONT_SUN12x22 is not set
 661.845 +# CONFIG_FONT_10x18 is not set
 661.846 +
 661.847 +#
 661.848 +# Logo configuration
 661.849 +#
 661.850 +# CONFIG_LOGO is not set
 661.851 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 661.852 +
 661.853 +#
 661.854 +# Sound
 661.855 +#
 661.856 +CONFIG_SOUND=y
 661.857 +
 661.858 +#
 661.859 +# Advanced Linux Sound Architecture
 661.860 +#
 661.861 +CONFIG_SND=m
 661.862 +CONFIG_SND_TIMER=m
 661.863 +CONFIG_SND_PCM=m
 661.864 +# CONFIG_SND_SEQUENCER is not set
 661.865 +CONFIG_SND_OSSEMUL=y
 661.866 +CONFIG_SND_MIXER_OSS=m
 661.867 +CONFIG_SND_PCM_OSS=m
 661.868 +CONFIG_SND_PCM_OSS_PLUGINS=y
 661.869 +# CONFIG_SND_DYNAMIC_MINORS is not set
 661.870 +CONFIG_SND_SUPPORT_OLD_API=y
 661.871 +CONFIG_SND_VERBOSE_PROCFS=y
 661.872 +# CONFIG_SND_VERBOSE_PRINTK is not set
 661.873 +# CONFIG_SND_DEBUG is not set
 661.874 +
 661.875 +#
 661.876 +# Generic devices
 661.877 +#
 661.878 +# CONFIG_SND_DUMMY is not set
 661.879 +# CONFIG_SND_MTPAV is not set
 661.880 +# CONFIG_SND_SERIAL_U16550 is not set
 661.881 +# CONFIG_SND_MPU401 is not set
 661.882 +
 661.883 +#
 661.884 +# PCI devices
 661.885 +#
 661.886 +# CONFIG_SND_AD1889 is not set
 661.887 +# CONFIG_SND_ALS300 is not set
 661.888 +# CONFIG_SND_ALI5451 is not set
 661.889 +# CONFIG_SND_ATIIXP is not set
 661.890 +# CONFIG_SND_ATIIXP_MODEM is not set
 661.891 +# CONFIG_SND_AU8810 is not set
 661.892 +# CONFIG_SND_AU8820 is not set
 661.893 +# CONFIG_SND_AU8830 is not set
 661.894 +# CONFIG_SND_AZT3328 is not set
 661.895 +# CONFIG_SND_BT87X is not set
 661.896 +# CONFIG_SND_CA0106 is not set
 661.897 +# CONFIG_SND_CMIPCI is not set
 661.898 +# CONFIG_SND_CS4281 is not set
 661.899 +# CONFIG_SND_CS46XX is not set
 661.900 +# CONFIG_SND_EMU10K1 is not set
 661.901 +# CONFIG_SND_EMU10K1X is not set
 661.902 +# CONFIG_SND_ENS1370 is not set
 661.903 +# CONFIG_SND_ENS1371 is not set
 661.904 +# CONFIG_SND_ES1938 is not set
 661.905 +# CONFIG_SND_ES1968 is not set
 661.906 +# CONFIG_SND_FM801 is not set
 661.907 +# CONFIG_SND_HDA_INTEL is not set
 661.908 +# CONFIG_SND_HDSP is not set
 661.909 +# CONFIG_SND_HDSPM is not set
 661.910 +# CONFIG_SND_ICE1712 is not set
 661.911 +# CONFIG_SND_ICE1724 is not set
 661.912 +# CONFIG_SND_INTEL8X0 is not set
 661.913 +# CONFIG_SND_INTEL8X0M is not set
 661.914 +# CONFIG_SND_KORG1212 is not set
 661.915 +# CONFIG_SND_MAESTRO3 is not set
 661.916 +# CONFIG_SND_MIXART is not set
 661.917 +# CONFIG_SND_NM256 is not set
 661.918 +# CONFIG_SND_PCXHR is not set
 661.919 +# CONFIG_SND_RME32 is not set
 661.920 +# CONFIG_SND_RME96 is not set
 661.921 +# CONFIG_SND_RME9652 is not set
 661.922 +# CONFIG_SND_SONICVIBES is not set
 661.923 +# CONFIG_SND_TRIDENT is not set
 661.924 +# CONFIG_SND_VIA82XX is not set
 661.925 +# CONFIG_SND_VIA82XX_MODEM is not set
 661.926 +# CONFIG_SND_VX222 is not set
 661.927 +# CONFIG_SND_YMFPCI is not set
 661.928 +
 661.929 +#
 661.930 +# ALSA ARM devices
 661.931 +#
 661.932 +
 661.933 +#
 661.934 +# Open Sound System
 661.935 +#
 661.936 +# CONFIG_SOUND_PRIME is not set
 661.937 +
 661.938 +#
 661.939 +# USB support
 661.940 +#
 661.941 +CONFIG_USB_ARCH_HAS_HCD=y
 661.942 +CONFIG_USB_ARCH_HAS_OHCI=y
 661.943 +CONFIG_USB_ARCH_HAS_EHCI=y
 661.944 +# CONFIG_USB is not set
 661.945 +
 661.946 +#
 661.947 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
 661.948 +#
 661.949 +
 661.950 +#
 661.951 +# USB Gadget Support
 661.952 +#
 661.953 +# CONFIG_USB_GADGET is not set
 661.954 +
 661.955 +#
 661.956 +# MMC/SD Card support
 661.957 +#
 661.958 +CONFIG_MMC=y
 661.959 +# CONFIG_MMC_DEBUG is not set
 661.960 +CONFIG_MMC_BLOCK=y
 661.961 +# CONFIG_MMC_SDHCI is not set
 661.962 +# CONFIG_MMC_TIFM_SD is not set
 661.963 +
 661.964 +#
 661.965 +# Real Time Clock
 661.966 +#
 661.967 +CONFIG_RTC_LIB=y
 661.968 +# CONFIG_RTC_CLASS is not set
 661.969 +
 661.970 +#
 661.971 +# File systems
 661.972 +#
 661.973 +CONFIG_EXT2_FS=y
 661.974 +# CONFIG_EXT2_FS_XATTR is not set
 661.975 +# CONFIG_EXT2_FS_XIP is not set
 661.976 +# CONFIG_EXT3_FS is not set
 661.977 +# CONFIG_EXT4DEV_FS is not set
 661.978 +# CONFIG_REISERFS_FS is not set
 661.979 +# CONFIG_JFS_FS is not set
 661.980 +# CONFIG_FS_POSIX_ACL is not set
 661.981 +# CONFIG_XFS_FS is not set
 661.982 +# CONFIG_GFS2_FS is not set
 661.983 +# CONFIG_OCFS2_FS is not set
 661.984 +CONFIG_MINIX_FS=y
 661.985 +CONFIG_ROMFS_FS=y
 661.986 +# CONFIG_INOTIFY is not set
 661.987 +# CONFIG_QUOTA is not set
 661.988 +CONFIG_DNOTIFY=y
 661.989 +# CONFIG_AUTOFS_FS is not set
 661.990 +# CONFIG_AUTOFS4_FS is not set
 661.991 +# CONFIG_FUSE_FS is not set
 661.992 +
 661.993 +#
 661.994 +# CD-ROM/DVD Filesystems
 661.995 +#
 661.996 +# CONFIG_ISO9660_FS is not set
 661.997 +# CONFIG_UDF_FS is not set
 661.998 +
 661.999 +#
661.1000 +# DOS/FAT/NT Filesystems
661.1001 +#
661.1002 +CONFIG_FAT_FS=m
661.1003 +# CONFIG_MSDOS_FS is not set
661.1004 +CONFIG_VFAT_FS=m
661.1005 +CONFIG_FAT_DEFAULT_CODEPAGE=437
661.1006 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
661.1007 +# CONFIG_NTFS_FS is not set
661.1008 +
661.1009 +#
661.1010 +# Pseudo filesystems
661.1011 +#
661.1012 +CONFIG_PROC_FS=y
661.1013 +CONFIG_PROC_SYSCTL=y
661.1014 +CONFIG_SYSFS=y
661.1015 +# CONFIG_TMPFS is not set
661.1016 +# CONFIG_HUGETLB_PAGE is not set
661.1017 +CONFIG_RAMFS=y
661.1018 +# CONFIG_CONFIGFS_FS is not set
661.1019 +
661.1020 +#
661.1021 +# Miscellaneous filesystems
661.1022 +#
661.1023 +# CONFIG_ADFS_FS is not set
661.1024 +# CONFIG_AFFS_FS is not set
661.1025 +# CONFIG_HFS_FS is not set
661.1026 +# CONFIG_HFSPLUS_FS is not set
661.1027 +# CONFIG_BEFS_FS is not set
661.1028 +# CONFIG_BFS_FS is not set
661.1029 +# CONFIG_EFS_FS is not set
661.1030 +# CONFIG_JFFS_FS is not set
661.1031 +CONFIG_JFFS2_FS=y
661.1032 +CONFIG_JFFS2_FS_DEBUG=0
661.1033 +CONFIG_JFFS2_FS_WRITEBUFFER=y
661.1034 +# CONFIG_JFFS2_SUMMARY is not set
661.1035 +# CONFIG_JFFS2_FS_XATTR is not set
661.1036 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
661.1037 +CONFIG_JFFS2_ZLIB=y
661.1038 +CONFIG_JFFS2_RTIME=y
661.1039 +# CONFIG_JFFS2_RUBIN is not set
661.1040 +CONFIG_CRAMFS=y
661.1041 +# CONFIG_VXFS_FS is not set
661.1042 +# CONFIG_HPFS_FS is not set
661.1043 +# CONFIG_QNX4FS_FS is not set
661.1044 +# CONFIG_SYSV_FS is not set
661.1045 +# CONFIG_UFS_FS is not set
661.1046 +
661.1047 +#
661.1048 +# Network File Systems
661.1049 +#
661.1050 +CONFIG_NFS_FS=y
661.1051 +CONFIG_NFS_V3=y
661.1052 +# CONFIG_NFS_V3_ACL is not set
661.1053 +# CONFIG_NFS_V4 is not set
661.1054 +# CONFIG_NFS_DIRECTIO is not set
661.1055 +CONFIG_NFSD=y
661.1056 +CONFIG_NFSD_V3=y
661.1057 +# CONFIG_NFSD_V3_ACL is not set
661.1058 +# CONFIG_NFSD_V4 is not set
661.1059 +# CONFIG_NFSD_TCP is not set
661.1060 +CONFIG_ROOT_NFS=y
661.1061 +CONFIG_LOCKD=y
661.1062 +CONFIG_LOCKD_V4=y
661.1063 +CONFIG_EXPORTFS=y
661.1064 +CONFIG_NFS_COMMON=y
661.1065 +CONFIG_SUNRPC=y
661.1066 +# CONFIG_RPCSEC_GSS_KRB5 is not set
661.1067 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
661.1068 +# CONFIG_SMB_FS is not set
661.1069 +# CONFIG_CIFS is not set
661.1070 +# CONFIG_NCP_FS is not set
661.1071 +# CONFIG_CODA_FS is not set
661.1072 +# CONFIG_AFS_FS is not set
661.1073 +# CONFIG_9P_FS is not set
661.1074 +
661.1075 +#
661.1076 +# Partition Types
661.1077 +#
661.1078 +CONFIG_PARTITION_ADVANCED=y
661.1079 +# CONFIG_ACORN_PARTITION is not set
661.1080 +# CONFIG_OSF_PARTITION is not set
661.1081 +# CONFIG_AMIGA_PARTITION is not set
661.1082 +# CONFIG_ATARI_PARTITION is not set
661.1083 +# CONFIG_MAC_PARTITION is not set
661.1084 +CONFIG_MSDOS_PARTITION=y
661.1085 +# CONFIG_BSD_DISKLABEL is not set
661.1086 +# CONFIG_MINIX_SUBPARTITION is not set
661.1087 +# CONFIG_SOLARIS_X86_PARTITION is not set
661.1088 +# CONFIG_UNIXWARE_DISKLABEL is not set
661.1089 +# CONFIG_LDM_PARTITION is not set
661.1090 +# CONFIG_SGI_PARTITION is not set
661.1091 +# CONFIG_ULTRIX_PARTITION is not set
661.1092 +# CONFIG_SUN_PARTITION is not set
661.1093 +# CONFIG_KARMA_PARTITION is not set
661.1094 +# CONFIG_EFI_PARTITION is not set
661.1095 +
661.1096 +#
661.1097 +# Native Language Support
661.1098 +#
661.1099 +CONFIG_NLS=m
661.1100 +CONFIG_NLS_DEFAULT="iso8859-1"
661.1101 +# CONFIG_NLS_CODEPAGE_437 is not set
661.1102 +# CONFIG_NLS_CODEPAGE_737 is not set
661.1103 +# CONFIG_NLS_CODEPAGE_775 is not set
661.1104 +CONFIG_NLS_CODEPAGE_850=m
661.1105 +# CONFIG_NLS_CODEPAGE_852 is not set
661.1106 +# CONFIG_NLS_CODEPAGE_855 is not set
661.1107 +# CONFIG_NLS_CODEPAGE_857 is not set
661.1108 +# CONFIG_NLS_CODEPAGE_860 is not set
661.1109 +# CONFIG_NLS_CODEPAGE_861 is not set
661.1110 +# CONFIG_NLS_CODEPAGE_862 is not set
661.1111 +# CONFIG_NLS_CODEPAGE_863 is not set
661.1112 +# CONFIG_NLS_CODEPAGE_864 is not set
661.1113 +# CONFIG_NLS_CODEPAGE_865 is not set
661.1114 +# CONFIG_NLS_CODEPAGE_866 is not set
661.1115 +# CONFIG_NLS_CODEPAGE_869 is not set
661.1116 +# CONFIG_NLS_CODEPAGE_936 is not set
661.1117 +# CONFIG_NLS_CODEPAGE_950 is not set
661.1118 +# CONFIG_NLS_CODEPAGE_932 is not set
661.1119 +# CONFIG_NLS_CODEPAGE_949 is not set
661.1120 +# CONFIG_NLS_CODEPAGE_874 is not set
661.1121 +# CONFIG_NLS_ISO8859_8 is not set
661.1122 +# CONFIG_NLS_CODEPAGE_1250 is not set
661.1123 +# CONFIG_NLS_CODEPAGE_1251 is not set
661.1124 +# CONFIG_NLS_ASCII is not set
661.1125 +CONFIG_NLS_ISO8859_1=m
661.1126 +# CONFIG_NLS_ISO8859_2 is not set
661.1127 +# CONFIG_NLS_ISO8859_3 is not set
661.1128 +# CONFIG_NLS_ISO8859_4 is not set
661.1129 +# CONFIG_NLS_ISO8859_5 is not set
661.1130 +# CONFIG_NLS_ISO8859_6 is not set
661.1131 +# CONFIG_NLS_ISO8859_7 is not set
661.1132 +# CONFIG_NLS_ISO8859_9 is not set
661.1133 +# CONFIG_NLS_ISO8859_13 is not set
661.1134 +# CONFIG_NLS_ISO8859_14 is not set
661.1135 +# CONFIG_NLS_ISO8859_15 is not set
661.1136 +# CONFIG_NLS_KOI8_R is not set
661.1137 +# CONFIG_NLS_KOI8_U is not set
661.1138 +# CONFIG_NLS_UTF8 is not set
661.1139 +
661.1140 +#
661.1141 +# Profiling support
661.1142 +#
661.1143 +# CONFIG_PROFILING is not set
661.1144 +
661.1145 +#
661.1146 +# Kernel hacking
661.1147 +#
661.1148 +# CONFIG_PRINTK_TIME is not set
661.1149 +CONFIG_ENABLE_MUST_CHECK=y
661.1150 +CONFIG_MAGIC_SYSRQ=y
661.1151 +# CONFIG_UNUSED_SYMBOLS is not set
661.1152 +CONFIG_DEBUG_KERNEL=y
661.1153 +CONFIG_LOG_BUF_SHIFT=14
661.1154 +CONFIG_DETECT_SOFTLOCKUP=y
661.1155 +# CONFIG_SCHEDSTATS is not set
661.1156 +# CONFIG_DEBUG_SLAB is not set
661.1157 +# CONFIG_DEBUG_RT_MUTEXES is not set
661.1158 +# CONFIG_RT_MUTEX_TESTER is not set
661.1159 +# CONFIG_DEBUG_SPINLOCK is not set
661.1160 +# CONFIG_DEBUG_MUTEXES is not set
661.1161 +# CONFIG_DEBUG_RWSEMS is not set
661.1162 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
661.1163 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
661.1164 +# CONFIG_DEBUG_KOBJECT is not set
661.1165 +CONFIG_DEBUG_BUGVERBOSE=y
661.1166 +# CONFIG_DEBUG_INFO is not set
661.1167 +# CONFIG_DEBUG_FS is not set
661.1168 +# CONFIG_DEBUG_VM is not set
661.1169 +# CONFIG_DEBUG_LIST is not set
661.1170 +CONFIG_FRAME_POINTER=y
661.1171 +CONFIG_FORCED_INLINING=y
661.1172 +# CONFIG_HEADERS_CHECK is not set
661.1173 +# CONFIG_RCU_TORTURE_TEST is not set
661.1174 +CONFIG_DEBUG_USER=y
661.1175 +# CONFIG_DEBUG_WAITQ is not set
661.1176 +CONFIG_DEBUG_ERRORS=y
661.1177 +CONFIG_DEBUG_LL=y
661.1178 +# CONFIG_DEBUG_ICEDCC is not set
661.1179 +
661.1180 +#
661.1181 +# Security options
661.1182 +#
661.1183 +# CONFIG_KEYS is not set
661.1184 +# CONFIG_SECURITY is not set
661.1185 +
661.1186 +#
661.1187 +# Cryptographic options
661.1188 +#
661.1189 +# CONFIG_CRYPTO is not set
661.1190 +
661.1191 +#
661.1192 +# Library routines
661.1193 +#
661.1194 +# CONFIG_CRC_CCITT is not set
661.1195 +# CONFIG_CRC16 is not set
661.1196 +CONFIG_CRC32=y
661.1197 +# CONFIG_LIBCRC32C is not set
661.1198 +CONFIG_ZLIB_INFLATE=y
661.1199 +CONFIG_ZLIB_DEFLATE=y
661.1200 +CONFIG_PLIST=y
   662.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   662.2 +++ b/samples/armeb-unknown-linux-uclibc/crosstool.config	Sat Feb 24 11:00:05 2007 +0000
   662.3 @@ -0,0 +1,390 @@
   662.4 +#
   662.5 +# Automatically generated make config: don't edit
   662.6 +# crosstool-NG version: 0.0.1
   662.7 +# Sat Feb 17 15:37:13 2007
   662.8 +#
   662.9 +
  662.10 +#
  662.11 +# Paths and misc options
  662.12 +#
  662.13 +CT_PARALLEL_JOBS=1
  662.14 +CT_LOAD=0
  662.15 +CT_NICE=5
  662.16 +CT_USE_PIPES=y
  662.17 +
  662.18 +#
  662.19 +# Paths
  662.20 +#
  662.21 +CT_TARBALLS_DIR="${HOME}/dev/src"
  662.22 +CT_SRC_DIR="${HOME}/x-tools/src/${CT_TARGET}/${CT_CC}-${CT_CC_VERSION}-${CT_LIBC}-${CT_LIBC_VERSION}"
  662.23 +CT_BUILD_DIR="${HOME}/x-tools/build/${CT_TARGET}/${CT_CC}-${CT_CC_VERSION}-${CT_LIBC}-${CT_LIBC_VERSION}"
  662.24 +CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}"
  662.25 +CT_INSTALL_DIR="${CT_PREFIX_DIR}"
  662.26 +
  662.27 +#
  662.28 +# Downloading and extracting
  662.29 +#
  662.30 +# CT_NO_DOWNLOAD is not set
  662.31 +# CT_ONLY_DOWNLOAD is not set
  662.32 +# CT_FORCE_DOWNLOAD is not set
  662.33 +# CT_FORCE_EXTRACT is not set
  662.34 +
  662.35 +#
  662.36 +# Logging
  662.37 +#
  662.38 +# CT_LOG_ERROR is not set
  662.39 +# CT_LOG_WARN is not set
  662.40 +# CT_LOG_INFO is not set
  662.41 +CT_LOG_EXTRA=y
  662.42 +# CT_LOG_DEBUG is not set
  662.43 +CT_LOG_LEVEL_MAX="EXTRA"
  662.44 +# CT_LOG_PROGRESS_BAR is not set
  662.45 +# CT_LOG_USE_COLORS is not set
  662.46 +CT_LOG_TO_FILE=y
  662.47 +CT_LOG_FILE="${CT_PREFIX_DIR}/${CT_TARGET}.log"
  662.48 +
  662.49 +#
  662.50 +# Target options
  662.51 +#
  662.52 +
  662.53 +#
  662.54 +# General target options
  662.55 +#
  662.56 +CT_ARCH_ARM=y
  662.57 +# CT_ARCH_MIPS is not set
  662.58 +# CT_ARCH_x86 is not set
  662.59 +# CT_ARCH_x86_64 is not set
  662.60 +CT_ARCH_BE=y
  662.61 +# CT_ARCH_LE is not set
  662.62 +
  662.63 +#
  662.64 +# Target optimisations
  662.65 +#
  662.66 +CT_ARCH_CPU="xscale"
  662.67 +CT_ARCH_TUNE="xscale"
  662.68 +CT_ARCH_ARCH="armv5te"
  662.69 +CT_ARCH_FPU=""
  662.70 +# CT_ARCH_FLOAT_HW is not set
  662.71 +CT_ARCH_FLOAT_SW=y
  662.72 +CT_TARGET_CFLAGS=""
  662.73 +
  662.74 +#
  662.75 +# Toolchain options
  662.76 +#
  662.77 +CT_USE_SYSROOT=y
  662.78 +CT_SHARED_LIBS=y
  662.79 +CT_TARGET_VENDOR="unknown"
  662.80 +CT_TARGET_ALIAS=""
  662.81 +CT_ARCH="arm"
  662.82 +CT_BUILD=""
  662.83 +CT_CC_NATIVE="gcc"
  662.84 +# CT_CANADIAN is not set
  662.85 +CT_HOST=""
  662.86 +CT_HOST_CC=""
  662.87 +
  662.88 +#
  662.89 +# Kernel
  662.90 +#
  662.91 +CT_KERNEL_LINUX=y
  662.92 +# CT_KERNEL_CYGWIN is not set
  662.93 +CT_KERNEL_VERSION="2.6.19.2"
  662.94 +CT_KERNEL_LINUX_HEADERS_INSTALL=y
  662.95 +# CT_KERNEL_LINUX_HEADERS_SANITISED is not set
  662.96 +# CT_KERNEL_LINUX_HEADERS_COPY is not set
  662.97 +CT_KERNEL="linux"
  662.98 +CT_KERNEL_VERSION_SEE_EXTRAVERSION=y
  662.99 +# CT_KERNEL_INSTALL_V_2_6_18 is not set
 662.100 +# CT_KERNEL_INSTALL_V_2_6_18_1 is not set
 662.101 +# CT_KERNEL_INSTALL_V_2_6_18_2 is not set
 662.102 +# CT_KERNEL_INSTALL_V_2_6_18_3 is not set
 662.103 +# CT_KERNEL_INSTALL_V_2_6_18_4 is not set
 662.104 +# CT_KERNEL_INSTALL_V_2_6_18_5 is not set
 662.105 +# CT_KERNEL_INSTALL_V_2_6_18_6 is not set
 662.106 +# CT_KERNEL_INSTALL_V_2_6_19 is not set
 662.107 +# CT_KERNEL_INSTALL_V_2_6_19_1 is not set
 662.108 +CT_KERNEL_INSTALL_V_2_6_19_2=y
 662.109 +# CT_KERNEL_INSTALL_V_2_6_20 is not set
 662.110 +# CT_KERNEL_COPY_V_2_6_0 is not set
 662.111 +# CT_KERNEL_COPY_V_2_6_1 is not set
 662.112 +# CT_KERNEL_COPY_V_2_6_2 is not set
 662.113 +# CT_KERNEL_COPY_V_2_6_3 is not set
 662.114 +# CT_KERNEL_COPY_V_2_6_4 is not set
 662.115 +# CT_KERNEL_COPY_V_2_6_5 is not set
 662.116 +# CT_KERNEL_COPY_V_2_6_6 is not set
 662.117 +# CT_KERNEL_COPY_V_2_6_7 is not set
 662.118 +# CT_KERNEL_COPY_V_2_6_8 is not set
 662.119 +# CT_KERNEL_COPY_V_2_6_8_1 is not set
 662.120 +# CT_KERNEL_COPY_V_2_6_9 is not set
 662.121 +# CT_KERNEL_COPY_V_2_6_10 is not set
 662.122 +# CT_KERNEL_COPY_V_2_6_11 is not set
 662.123 +# CT_KERNEL_COPY_V_2_6_11_1 is not set
 662.124 +# CT_KERNEL_COPY_V_2_6_11_10 is not set
 662.125 +# CT_KERNEL_COPY_V_2_6_11_11 is not set
 662.126 +# CT_KERNEL_COPY_V_2_6_11_12 is not set
 662.127 +# CT_KERNEL_COPY_V_2_6_11_2 is not set
 662.128 +# CT_KERNEL_COPY_V_2_6_11_3 is not set
 662.129 +# CT_KERNEL_COPY_V_2_6_11_4 is not set
 662.130 +# CT_KERNEL_COPY_V_2_6_11_5 is not set
 662.131 +# CT_KERNEL_COPY_V_2_6_11_6 is not set
 662.132 +# CT_KERNEL_COPY_V_2_6_11_7 is not set
 662.133 +# CT_KERNEL_COPY_V_2_6_11_8 is not set
 662.134 +# CT_KERNEL_COPY_V_2_6_11_9 is not set
 662.135 +# CT_KERNEL_COPY_V_2_6_12 is not set
 662.136 +# CT_KERNEL_COPY_V_2_6_12_1 is not set
 662.137 +# CT_KERNEL_COPY_V_2_6_12_2 is not set
 662.138 +# CT_KERNEL_COPY_V_2_6_12_3 is not set
 662.139 +# CT_KERNEL_COPY_V_2_6_12_4 is not set
 662.140 +# CT_KERNEL_COPY_V_2_6_12_5 is not set
 662.141 +# CT_KERNEL_COPY_V_2_6_12_6 is not set
 662.142 +# CT_KERNEL_COPY_V_2_6_13 is not set
 662.143 +# CT_KERNEL_COPY_V_2_6_13_1 is not set
 662.144 +# CT_KERNEL_COPY_V_2_6_13_2 is not set
 662.145 +# CT_KERNEL_COPY_V_2_6_13_3 is not set
 662.146 +# CT_KERNEL_COPY_V_2_6_13_4 is not set
 662.147 +# CT_KERNEL_COPY_V_2_6_13_5 is not set
 662.148 +# CT_KERNEL_COPY_V_2_6_14 is not set
 662.149 +# CT_KERNEL_COPY_V_2_6_14_1 is not set
 662.150 +# CT_KERNEL_COPY_V_2_6_14_2 is not set
 662.151 +# CT_KERNEL_COPY_V_2_6_14_3 is not set
 662.152 +# CT_KERNEL_COPY_V_2_6_14_4 is not set
 662.153 +# CT_KERNEL_COPY_V_2_6_14_5 is not set
 662.154 +# CT_KERNEL_COPY_V_2_6_14_6 is not set
 662.155 +# CT_KERNEL_COPY_V_2_6_14_7 is not set
 662.156 +# CT_KERNEL_COPY_V_2_6_15 is not set
 662.157 +# CT_KERNEL_COPY_V_2_6_15_1 is not set
 662.158 +# CT_KERNEL_COPY_V_2_6_15_2 is not set
 662.159 +# CT_KERNEL_COPY_V_2_6_15_3 is not set
 662.160 +# CT_KERNEL_COPY_V_2_6_15_4 is not set
 662.161 +# CT_KERNEL_COPY_V_2_6_15_5 is not set
 662.162 +# CT_KERNEL_COPY_V_2_6_15_6 is not set
 662.163 +# CT_KERNEL_COPY_V_2_6_15_7 is not set
 662.164 +# CT_KERNEL_COPY_V_2_6_16 is not set
 662.165 +# CT_KERNEL_COPY_V_2_6_16_1 is not set
 662.166 +# CT_KERNEL_COPY_V_2_6_16_10 is not set
 662.167 +# CT_KERNEL_COPY_V_2_6_16_11 is not set
 662.168 +# CT_KERNEL_COPY_V_2_6_16_12 is not set
 662.169 +# CT_KERNEL_COPY_V_2_6_16_13 is not set
 662.170 +# CT_KERNEL_COPY_V_2_6_16_14 is not set
 662.171 +# CT_KERNEL_COPY_V_2_6_16_15 is not set
 662.172 +# CT_KERNEL_COPY_V_2_6_16_16 is not set
 662.173 +# CT_KERNEL_COPY_V_2_6_16_17 is not set
 662.174 +# CT_KERNEL_COPY_V_2_6_16_18 is not set
 662.175 +# CT_KERNEL_COPY_V_2_6_16_19 is not set
 662.176 +# CT_KERNEL_COPY_V_2_6_16_2 is not set
 662.177 +# CT_KERNEL_COPY_V_2_6_16_20 is not set
 662.178 +# CT_KERNEL_COPY_V_2_6_16_21 is not set
 662.179 +# CT_KERNEL_COPY_V_2_6_16_22 is not set
 662.180 +# CT_KERNEL_COPY_V_2_6_16_23 is not set
 662.181 +# CT_KERNEL_COPY_V_2_6_16_24 is not set
 662.182 +# CT_KERNEL_COPY_V_2_6_16_25 is not set
 662.183 +# CT_KERNEL_COPY_V_2_6_16_26 is not set
 662.184 +# CT_KERNEL_COPY_V_2_6_16_27 is not set
 662.185 +# CT_KERNEL_COPY_V_2_6_16_28 is not set
 662.186 +# CT_KERNEL_COPY_V_2_6_16_29 is not set
 662.187 +# CT_KERNEL_COPY_V_2_6_16_3 is not set
 662.188 +# CT_KERNEL_COPY_V_2_6_16_30 is not set
 662.189 +# CT_KERNEL_COPY_V_2_6_16_31 is not set
 662.190 +# CT_KERNEL_COPY_V_2_6_16_32 is not set
 662.191 +# CT_KERNEL_COPY_V_2_6_16_33 is not set
 662.192 +# CT_KERNEL_COPY_V_2_6_16_34 is not set
 662.193 +# CT_KERNEL_COPY_V_2_6_16_35 is not set
 662.194 +# CT_KERNEL_COPY_V_2_6_16_36 is not set
 662.195 +# CT_KERNEL_COPY_V_2_6_16_4 is not set
 662.196 +# CT_KERNEL_COPY_V_2_6_16_5 is not set
 662.197 +# CT_KERNEL_COPY_V_2_6_16_6 is not set
 662.198 +# CT_KERNEL_COPY_V_2_6_16_7 is not set
 662.199 +# CT_KERNEL_COPY_V_2_6_16_8 is not set
 662.200 +# CT_KERNEL_COPY_V_2_6_16_9 is not set
 662.201 +# CT_KERNEL_COPY_V_2_6_17 is not set
 662.202 +# CT_KERNEL_COPY_V_2_6_17_1 is not set
 662.203 +# CT_KERNEL_COPY_V_2_6_17_10 is not set
 662.204 +# CT_KERNEL_COPY_V_2_6_17_11 is not set
 662.205 +# CT_KERNEL_COPY_V_2_6_17_12 is not set
 662.206 +# CT_KERNEL_COPY_V_2_6_17_13 is not set
 662.207 +# CT_KERNEL_COPY_V_2_6_17_14 is not set
 662.208 +# CT_KERNEL_COPY_V_2_6_17_2 is not set
 662.209 +# CT_KERNEL_COPY_V_2_6_17_3 is not set
 662.210 +# CT_KERNEL_COPY_V_2_6_17_4 is not set
 662.211 +# CT_KERNEL_COPY_V_2_6_17_5 is not set
 662.212 +# CT_KERNEL_COPY_V_2_6_17_6 is not set
 662.213 +# CT_KERNEL_COPY_V_2_6_17_7 is not set
 662.214 +# CT_KERNEL_COPY_V_2_6_17_8 is not set
 662.215 +# CT_KERNEL_COPY_V_2_6_17_9 is not set
 662.216 +# CT_KERNEL_COPY_V_2_6_18 is not set
 662.217 +# CT_KERNEL_COPY_V_2_6_18_1 is not set
 662.218 +# CT_KERNEL_COPY_V_2_6_18_2 is not set
 662.219 +# CT_KERNEL_COPY_V_2_6_18_3 is not set
 662.220 +# CT_KERNEL_COPY_V_2_6_18_4 is not set
 662.221 +# CT_KERNEL_COPY_V_2_6_18_5 is not set
 662.222 +# CT_KERNEL_COPY_V_2_6_18_6 is not set
 662.223 +# CT_KERNEL_COPY_V_2_6_19 is not set
 662.224 +# CT_KERNEL_COPY_V_2_6_19_1 is not set
 662.225 +# CT_KERNEL_SANITISED_V_2_6_7_0 is not set
 662.226 +# CT_KERNEL_SANITISED_V_2_6_8_0 is not set
 662.227 +# CT_KERNEL_SANITISED_V_2_6_8_1 is not set
 662.228 +# CT_KERNEL_SANITISED_V_2_6_9_0 is not set
 662.229 +# CT_KERNEL_SANITISED_V_2_6_9_1 is not set
 662.230 +# CT_KERNEL_SANITISED_V_2_6_10_0 is not set
 662.231 +# CT_KERNEL_SANITISED_V_2_6_11_0 is not set
 662.232 +# CT_KERNEL_SANITISED_V_2_6_11_1 is not set
 662.233 +# CT_KERNEL_SANITISED_V_2_6_11_2 is not set
 662.234 +# CT_KERNEL_SANITISED_V_2_6_12_0 is not set
 662.235 +CT_KERNEL_LINUX_VERBOSITY_0=y
 662.236 +# CT_KERNEL_LINUX_VERBOSITY_1 is not set
 662.237 +# CT_KERNEL_LINUX_VERBOSITY_2 is not set
 662.238 +CT_KERNEL_LINUX_VERBOSE_LEVEL=0
 662.239 +CT_KERNEL_LINUX_CONFIG_FILE="${CT_TOP_DIR}/samples/${CT_TARGET}/${CT_KERNEL}-${CT_KERNEL_VERSION}.config"
 662.240 +
 662.241 +#
 662.242 +# binutils
 662.243 +#
 662.244 +CT_BINUTILS_VERSION="2.17.50.0.10"
 662.245 +# CT_BINUTILS_V_2_11_2 is not set
 662.246 +# CT_BINUTILS_V_2_13_90 is not set
 662.247 +# CT_BINUTILS_V_2_14 is not set
 662.248 +# CT_BINUTILS_V_2_14_90 is not set
 662.249 +# CT_BINUTILS_V_2_14_92 is not set
 662.250 +# CT_BINUTILS_V_2_15 is not set
 662.251 +# CT_BINUTILS_V_2_15_90 is not set
 662.252 +# CT_BINUTILS_V_2_15_91 is not set
 662.253 +# CT_BINUTILS_V_2_16 is not set
 662.254 +# CT_BINUTILS_V_2_16_1 is not set
 662.255 +# CT_BINUTILS_V_2_17 is not set
 662.256 +# CT_BINUTILS_V_2_17_50_0_1 is not set
 662.257 +# CT_BINUTILS_V_2_17_50_0_2 is not set
 662.258 +# CT_BINUTILS_V_2_17_50_0_3 is not set
 662.259 +# CT_BINUTILS_V_2_17_50_0_4 is not set
 662.260 +# CT_BINUTILS_V_2_17_50_0_5 is not set
 662.261 +# CT_BINUTILS_V_2_17_50_0_6 is not set
 662.262 +# CT_BINUTILS_V_2_17_50_0_7 is not set
 662.263 +# CT_BINUTILS_V_2_17_50_0_8 is not set
 662.264 +# CT_BINUTILS_V_2_17_50_0_9 is not set
 662.265 +CT_BINUTILS_V_2_17_50_0_10=y
 662.266 +CT_BINUTILS_EXTRA_CONFIG=""
 662.267 +
 662.268 +#
 662.269 +# C compiler
 662.270 +#
 662.271 +
 662.272 +#
 662.273 +# Core C Compiler (used to build the C library)
 662.274 +#
 662.275 +# CT_CC_USE_CORE is not set
 662.276 +CT_CC_CORE_GCC=y
 662.277 +# CT_CC_CORE_TCC is not set
 662.278 +CT_CC_CORE_VERSION=""
 662.279 +CT_CC_CORE="gcc"
 662.280 +# CT_CC_CORE_V_2_95_3 is not set
 662.281 +# CT_CC_CORE_V_3_2_3 is not set
 662.282 +# CT_CC_CORE_V_3_3 is not set
 662.283 +# CT_CC_CORE_V_3_3_1 is not set
 662.284 +# CT_CC_CORE_V_3_3_2 is not set
 662.285 +# CT_CC_CORE_V_3_3_3 is not set
 662.286 +# CT_CC_CORE_V_3_3_4 is not set
 662.287 +# CT_CC_CORE_V_3_3_5 is not set
 662.288 +# CT_CC_CORE_V_3_3_6 is not set
 662.289 +# CT_CC_CORE_V_3_4_0 is not set
 662.290 +# CT_CC_CORE_V_3_4_1 is not set
 662.291 +# CT_CC_CORE_V_3_4_2 is not set
 662.292 +# CT_CC_CORE_V_3_4_3 is not set
 662.293 +# CT_CC_CORE_V_3_4_4 is not set
 662.294 +# CT_CC_CORE_V_3_4_5 is not set
 662.295 +# CT_CC_CORE_V_3_4_6 is not set
 662.296 +# CT_CC_CORE_V_4_0_0 is not set
 662.297 +# CT_CC_CORE_V_4_0_1 is not set
 662.298 +# CT_CC_CORE_V_4_0_2 is not set
 662.299 +# CT_CC_CORE_V_4_0_3 is not set
 662.300 +# CT_CC_CORE_V_4_0_4 is not set
 662.301 +# CT_CC_CORE_V_4_1_0 is not set
 662.302 +# CT_CC_CORE_V_4_1_1 is not set
 662.303 +CT_CC_CORE_EXTRA_CONFIG=""
 662.304 +
 662.305 +#
 662.306 +# Final C compiler
 662.307 +#
 662.308 +CT_CC_GCC=y
 662.309 +CT_CC_VERSION="4.0.4"
 662.310 +CT_CC="gcc"
 662.311 +# CT_CC_V_2_95_3 is not set
 662.312 +# CT_CC_V_3_2_3 is not set
 662.313 +# CT_CC_V_3_3 is not set
 662.314 +# CT_CC_V_3_3_1 is not set
 662.315 +# CT_CC_V_3_3_2 is not set
 662.316 +# CT_CC_V_3_3_3 is not set
 662.317 +# CT_CC_V_3_3_4 is not set
 662.318 +# CT_CC_V_3_3_5 is not set
 662.319 +# CT_CC_V_3_3_6 is not set
 662.320 +# CT_CC_V_3_4_0 is not set
 662.321 +# CT_CC_V_3_4_1 is not set
 662.322 +# CT_CC_V_3_4_2 is not set
 662.323 +# CT_CC_V_3_4_3 is not set
 662.324 +# CT_CC_V_3_4_4 is not set
 662.325 +# CT_CC_V_3_4_5 is not set
 662.326 +# CT_CC_V_4_0_0 is not set
 662.327 +# CT_CC_V_4_0_1 is not set
 662.328 +# CT_CC_V_4_0_2 is not set
 662.329 +# CT_CC_V_4_0_3 is not set
 662.330 +CT_CC_V_4_0_4=y
 662.331 +# CT_CC_V_4_1_0 is not set
 662.332 +# CT_CC_V_4_1_1 is not set
 662.333 +CT_CC_EXTRA_CONFIG=""
 662.334 +CT_CC_SUPPORT_C=y
 662.335 +CT_CC_SUPPORT_CXX=y
 662.336 +CT_CC_SUPPORT_JAVA=y
 662.337 +
 662.338 +#
 662.339 +# Supported languages:
 662.340 +#
 662.341 +CT_CC_LANG_C=y
 662.342 +CT_CC_LANG_CXX=y
 662.343 +# CT_CC_LANG_JAVA is not set
 662.344 +
 662.345 +#
 662.346 +# C-library
 662.347 +#
 662.348 +# CT_LIBC_GLIBC is not set
 662.349 +CT_LIBC_UCLIBC=y
 662.350 +CT_LIBC_VERSION="0.9.28.1"
 662.351 +CT_LIBC="uClibc"
 662.352 +# CT_LIBC_V_1_09_1 is not set
 662.353 +# CT_LIBC_V_2_0_1 is not set
 662.354 +# CT_LIBC_V_2_0_6 is not set
 662.355 +# CT_LIBC_V_2_1_1 is not set
 662.356 +# CT_LIBC_V_2_1_2 is not set
 662.357 +# CT_LIBC_V_2_1_3 is not set
 662.358 +# CT_LIBC_V_2_2 is not set
 662.359 +# CT_LIBC_V_2_2_1 is not set
 662.360 +# CT_LIBC_V_2_2_2 is not set
 662.361 +# CT_LIBC_V_2_2_3 is not set
 662.362 +# CT_LIBC_V_2_2_4 is not set
 662.363 +# CT_LIBC_V_2_2_5 is not set
 662.364 +# CT_LIBC_V_2_3 is not set
 662.365 +# CT_LIBC_V_2_3_1 is not set
 662.366 +# CT_LIBC_V_2_3_2 is not set
 662.367 +# CT_LIBC_V_2_3_3 is not set
 662.368 +# CT_LIBC_V_2_3_4 is not set
 662.369 +# CT_LIBC_V_2_3_5 is not set
 662.370 +# CT_LIBC_V_2_3_6 is not set
 662.371 +# CT_LIBC_V_2_4 is not set
 662.372 +# CT_LIBC_V_2_5 is not set
 662.373 +# CT_LIBC_GLIBC_THREADS_NPTL is not set
 662.374 +# CT_LIBC_GLIBC_THREADS_LINUXTHREADS is not set
 662.375 +# CT_LIBC_GLIBC_THREADS_NONE is not set
 662.376 +CT_LIBC_GLIBC_EXTRA_CONFIG=""
 662.377 +CT_LIBC_GLIBC_EXTRA_CFLAGS=""
 662.378 +CT_LIBC_EXTRA_CC_ARGS=""
 662.379 +CT_LIBC_GLIBC_CONFIGPARMS=""
 662.380 +# CT_LIBC_ADDONS is not set
 662.381 +CT_LIBC_ADDONS_LIST=""
 662.382 +# CT_LIBC_V_snapshot is not set
 662.383 +# CT_LIBC_V_specific_date is not set
 662.384 +# CT_LIBC_V_0_9_26 is not set
 662.385 +# CT_LIBC_V_0_9_27 is not set
 662.386 +# CT_LIBC_V_0_9_28 is not set
 662.387 +CT_LIBC_V_0_9_28_1=y
 662.388 +CT_LIBC_UCLIBC_DEBUG_LEVEL_0=y
 662.389 +# CT_LIBC_UCLIBC_DEBUG_LEVEL_1 is not set
 662.390 +# CT_LIBC_UCLIBC_DEBUG_LEVEL_2 is not set
 662.391 +CT_LIBC_UCLIBC_DEBUG_LEVEL=0
 662.392 +CT_LIBC_UCLIBC_CONFIG_FILE="${CT_TOP_DIR}/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
 662.393 +# CT_LIBC_UCLIBC_LOCALES is not set
   663.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   663.2 +++ b/samples/armeb-unknown-linux-uclibc/linux-2.6.19.2.config	Sat Feb 24 11:00:05 2007 +0000
   663.3 @@ -0,0 +1,1197 @@
   663.4 +#
   663.5 +# Automatically generated make config: don't edit
   663.6 +# Linux kernel version: 2.6.19.1
   663.7 +# Sat Dec 23 17:36:49 2006
   663.8 +#
   663.9 +CONFIG_ARM=y
  663.10 +CONFIG_GENERIC_TIME=y
  663.11 +CONFIG_MMU=y
  663.12 +CONFIG_GENERIC_HARDIRQS=y
  663.13 +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
  663.14 +CONFIG_HARDIRQS_SW_RESEND=y
  663.15 +CONFIG_GENERIC_IRQ_PROBE=y
  663.16 +CONFIG_RWSEM_GENERIC_SPINLOCK=y
  663.17 +CONFIG_GENERIC_HWEIGHT=y
  663.18 +CONFIG_GENERIC_CALIBRATE_DELAY=y
  663.19 +CONFIG_VECTORS_BASE=0xffff0000
  663.20 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
  663.21 +
  663.22 +#
  663.23 +# Code maturity level options
  663.24 +#
  663.25 +CONFIG_EXPERIMENTAL=y
  663.26 +CONFIG_BROKEN_ON_SMP=y
  663.27 +CONFIG_INIT_ENV_ARG_LIMIT=32
  663.28 +
  663.29 +#
  663.30 +# General setup
  663.31 +#
  663.32 +CONFIG_LOCALVERSION="-nslu2"
  663.33 +# CONFIG_LOCALVERSION_AUTO is not set
  663.34 +CONFIG_SWAP=y
  663.35 +CONFIG_SYSVIPC=y
  663.36 +# CONFIG_IPC_NS is not set
  663.37 +# CONFIG_POSIX_MQUEUE is not set
  663.38 +# CONFIG_BSD_PROCESS_ACCT is not set
  663.39 +# CONFIG_TASKSTATS is not set
  663.40 +# CONFIG_UTS_NS is not set
  663.41 +# CONFIG_AUDIT is not set
  663.42 +# CONFIG_IKCONFIG is not set
  663.43 +# CONFIG_RELAY is not set
  663.44 +CONFIG_INITRAMFS_SOURCE=""
  663.45 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
  663.46 +CONFIG_SYSCTL=y
  663.47 +# CONFIG_EMBEDDED is not set
  663.48 +CONFIG_UID16=y
  663.49 +CONFIG_SYSCTL_SYSCALL=y
  663.50 +CONFIG_KALLSYMS=y
  663.51 +# CONFIG_KALLSYMS_ALL is not set
  663.52 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
  663.53 +CONFIG_HOTPLUG=y
  663.54 +CONFIG_PRINTK=y
  663.55 +CONFIG_BUG=y
  663.56 +CONFIG_ELF_CORE=y
  663.57 +CONFIG_BASE_FULL=y
  663.58 +CONFIG_FUTEX=y
  663.59 +CONFIG_EPOLL=y
  663.60 +CONFIG_SHMEM=y
  663.61 +CONFIG_SLAB=y
  663.62 +CONFIG_VM_EVENT_COUNTERS=y
  663.63 +CONFIG_RT_MUTEXES=y
  663.64 +# CONFIG_TINY_SHMEM is not set
  663.65 +CONFIG_BASE_SMALL=0
  663.66 +# CONFIG_SLOB is not set
  663.67 +
  663.68 +#
  663.69 +# Loadable module support
  663.70 +#
  663.71 +CONFIG_MODULES=y
  663.72 +CONFIG_MODULE_UNLOAD=y
  663.73 +CONFIG_MODULE_FORCE_UNLOAD=y
  663.74 +# CONFIG_MODVERSIONS is not set
  663.75 +# CONFIG_MODULE_SRCVERSION_ALL is not set
  663.76 +CONFIG_KMOD=y
  663.77 +
  663.78 +#
  663.79 +# Block layer
  663.80 +#
  663.81 +CONFIG_BLOCK=y
  663.82 +# CONFIG_BLK_DEV_IO_TRACE is not set
  663.83 +
  663.84 +#
  663.85 +# IO Schedulers
  663.86 +#
  663.87 +CONFIG_IOSCHED_NOOP=y
  663.88 +CONFIG_IOSCHED_AS=y
  663.89 +CONFIG_IOSCHED_DEADLINE=y
  663.90 +CONFIG_IOSCHED_CFQ=y
  663.91 +CONFIG_DEFAULT_AS=y
  663.92 +# CONFIG_DEFAULT_DEADLINE is not set
  663.93 +# CONFIG_DEFAULT_CFQ is not set
  663.94 +# CONFIG_DEFAULT_NOOP is not set
  663.95 +CONFIG_DEFAULT_IOSCHED="anticipatory"
  663.96 +
  663.97 +#
  663.98 +# System Type
  663.99 +#
 663.100 +# CONFIG_ARCH_AAEC2000 is not set
 663.101 +# CONFIG_ARCH_INTEGRATOR is not set
 663.102 +# CONFIG_ARCH_REALVIEW is not set
 663.103 +# CONFIG_ARCH_VERSATILE is not set
 663.104 +# CONFIG_ARCH_AT91 is not set
 663.105 +# CONFIG_ARCH_CLPS7500 is not set
 663.106 +# CONFIG_ARCH_CLPS711X is not set
 663.107 +# CONFIG_ARCH_CO285 is not set
 663.108 +# CONFIG_ARCH_EBSA110 is not set
 663.109 +# CONFIG_ARCH_EP93XX is not set
 663.110 +# CONFIG_ARCH_FOOTBRIDGE is not set
 663.111 +# CONFIG_ARCH_NETX is not set
 663.112 +# CONFIG_ARCH_H720X is not set
 663.113 +# CONFIG_ARCH_IMX is not set
 663.114 +# CONFIG_ARCH_IOP32X is not set
 663.115 +# CONFIG_ARCH_IOP33X is not set
 663.116 +CONFIG_ARCH_IXP4XX=y
 663.117 +# CONFIG_ARCH_IXP2000 is not set
 663.118 +# CONFIG_ARCH_IXP23XX is not set
 663.119 +# CONFIG_ARCH_L7200 is not set
 663.120 +# CONFIG_ARCH_PNX4008 is not set
 663.121 +# CONFIG_ARCH_PXA is not set
 663.122 +# CONFIG_ARCH_RPC is not set
 663.123 +# CONFIG_ARCH_SA1100 is not set
 663.124 +# CONFIG_ARCH_S3C2410 is not set
 663.125 +# CONFIG_ARCH_SHARK is not set
 663.126 +# CONFIG_ARCH_LH7A40X is not set
 663.127 +# CONFIG_ARCH_OMAP is not set
 663.128 +CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
 663.129 +
 663.130 +#
 663.131 +# Intel IXP4xx Implementation Options
 663.132 +#
 663.133 +
 663.134 +#
 663.135 +# IXP4xx Platforms
 663.136 +#
 663.137 +CONFIG_MACH_NSLU2=y
 663.138 +# CONFIG_ARCH_AVILA is not set
 663.139 +# CONFIG_ARCH_ADI_COYOTE is not set
 663.140 +# CONFIG_ARCH_IXDP425 is not set
 663.141 +# CONFIG_MACH_IXDPG425 is not set
 663.142 +# CONFIG_MACH_IXDP465 is not set
 663.143 +# CONFIG_ARCH_PRPMC1100 is not set
 663.144 +# CONFIG_MACH_NAS100D is not set
 663.145 +# CONFIG_MACH_GTWX5715 is not set
 663.146 +
 663.147 +#
 663.148 +# IXP4xx Options
 663.149 +#
 663.150 +CONFIG_DMABOUNCE=y
 663.151 +# CONFIG_IXP4XX_INDIRECT_PCI is not set
 663.152 +
 663.153 +#
 663.154 +# Processor Type
 663.155 +#
 663.156 +CONFIG_CPU_32=y
 663.157 +CONFIG_CPU_XSCALE=y
 663.158 +CONFIG_CPU_32v5=y
 663.159 +CONFIG_CPU_ABRT_EV5T=y
 663.160 +CONFIG_CPU_CACHE_VIVT=y
 663.161 +CONFIG_CPU_TLB_V4WBI=y
 663.162 +CONFIG_CPU_CP15=y
 663.163 +CONFIG_CPU_CP15_MMU=y
 663.164 +
 663.165 +#
 663.166 +# Processor Features
 663.167 +#
 663.168 +CONFIG_ARM_THUMB=y
 663.169 +CONFIG_CPU_BIG_ENDIAN=y
 663.170 +# CONFIG_CPU_DCACHE_DISABLE is not set
 663.171 +CONFIG_XSCALE_PMU=y
 663.172 +
 663.173 +#
 663.174 +# Bus support
 663.175 +#
 663.176 +CONFIG_PCI=y
 663.177 +# CONFIG_PCI_DEBUG is not set
 663.178 +
 663.179 +#
 663.180 +# PCCARD (PCMCIA/CardBus) support
 663.181 +#
 663.182 +# CONFIG_PCCARD is not set
 663.183 +
 663.184 +#
 663.185 +# Kernel Features
 663.186 +#
 663.187 +# CONFIG_PREEMPT is not set
 663.188 +# CONFIG_NO_IDLE_HZ is not set
 663.189 +CONFIG_HZ=100
 663.190 +# CONFIG_AEABI is not set
 663.191 +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
 663.192 +CONFIG_SELECT_MEMORY_MODEL=y
 663.193 +CONFIG_FLATMEM_MANUAL=y
 663.194 +# CONFIG_DISCONTIGMEM_MANUAL is not set
 663.195 +# CONFIG_SPARSEMEM_MANUAL is not set
 663.196 +CONFIG_FLATMEM=y
 663.197 +CONFIG_FLAT_NODE_MEM_MAP=y
 663.198 +# CONFIG_SPARSEMEM_STATIC is not set
 663.199 +CONFIG_SPLIT_PTLOCK_CPUS=4096
 663.200 +# CONFIG_RESOURCES_64BIT is not set
 663.201 +CONFIG_ALIGNMENT_TRAP=y
 663.202 +
 663.203 +#
 663.204 +# Boot options
 663.205 +#
 663.206 +CONFIG_ZBOOT_ROM_TEXT=0x0
 663.207 +CONFIG_ZBOOT_ROM_BSS=0x0
 663.208 +CONFIG_CMDLINE="root=1f03 mem=32M"
 663.209 +# CONFIG_XIP_KERNEL is not set
 663.210 +
 663.211 +#
 663.212 +# Floating point emulation
 663.213 +#
 663.214 +
 663.215 +#
 663.216 +# At least one emulation must be selected
 663.217 +#
 663.218 +CONFIG_FPE_NWFPE=y
 663.219 +# CONFIG_FPE_NWFPE_XP is not set
 663.220 +# CONFIG_FPE_FASTFPE is not set
 663.221 +
 663.222 +#
 663.223 +# Userspace binary formats
 663.224 +#
 663.225 +CONFIG_BINFMT_ELF=y
 663.226 +# CONFIG_BINFMT_AOUT is not set
 663.227 +# CONFIG_BINFMT_MISC is not set
 663.228 +# CONFIG_ARTHUR is not set
 663.229 +
 663.230 +#
 663.231 +# Power management options
 663.232 +#
 663.233 +CONFIG_PM=y
 663.234 +# CONFIG_PM_LEGACY is not set
 663.235 +# CONFIG_PM_DEBUG is not set
 663.236 +# CONFIG_PM_SYSFS_DEPRECATED is not set
 663.237 +# CONFIG_APM is not set
 663.238 +
 663.239 +#
 663.240 +# Networking
 663.241 +#
 663.242 +CONFIG_NET=y
 663.243 +
 663.244 +#
 663.245 +# Networking options
 663.246 +#
 663.247 +# CONFIG_NETDEBUG is not set
 663.248 +CONFIG_PACKET=y
 663.249 +CONFIG_PACKET_MMAP=y
 663.250 +CONFIG_UNIX=y
 663.251 +CONFIG_XFRM=y
 663.252 +# CONFIG_XFRM_USER is not set
 663.253 +# CONFIG_XFRM_SUB_POLICY is not set
 663.254 +# CONFIG_NET_KEY is not set
 663.255 +CONFIG_INET=y
 663.256 +CONFIG_IP_MULTICAST=y
 663.257 +# CONFIG_IP_ADVANCED_ROUTER is not set
 663.258 +CONFIG_IP_FIB_HASH=y
 663.259 +CONFIG_IP_PNP=y
 663.260 +# CONFIG_IP_PNP_DHCP is not set
 663.261 +CONFIG_IP_PNP_BOOTP=y
 663.262 +# CONFIG_IP_PNP_RARP is not set
 663.263 +# CONFIG_NET_IPIP is not set
 663.264 +# CONFIG_NET_IPGRE is not set
 663.265 +# CONFIG_IP_MROUTE is not set
 663.266 +# CONFIG_ARPD is not set
 663.267 +# CONFIG_SYN_COOKIES is not set
 663.268 +# CONFIG_INET_AH is not set
 663.269 +# CONFIG_INET_ESP is not set
 663.270 +# CONFIG_INET_IPCOMP is not set
 663.271 +# CONFIG_INET_XFRM_TUNNEL is not set
 663.272 +# CONFIG_INET_TUNNEL is not set
 663.273 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
 663.274 +CONFIG_INET_XFRM_MODE_TUNNEL=y
 663.275 +CONFIG_INET_XFRM_MODE_BEET=y
 663.276 +# CONFIG_INET_DIAG is not set
 663.277 +# CONFIG_TCP_CONG_ADVANCED is not set
 663.278 +CONFIG_TCP_CONG_CUBIC=y
 663.279 +CONFIG_DEFAULT_TCP_CONG="cubic"
 663.280 +# CONFIG_IPV6 is not set
 663.281 +# CONFIG_INET6_XFRM_TUNNEL is not set
 663.282 +# CONFIG_INET6_TUNNEL is not set
 663.283 +# CONFIG_NETWORK_SECMARK is not set
 663.284 +# CONFIG_NETFILTER is not set
 663.285 +
 663.286 +#
 663.287 +# DCCP Configuration (EXPERIMENTAL)
 663.288 +#
 663.289 +# CONFIG_IP_DCCP is not set
 663.290 +
 663.291 +#
 663.292 +# SCTP Configuration (EXPERIMENTAL)
 663.293 +#
 663.294 +# CONFIG_IP_SCTP is not set
 663.295 +
 663.296 +#
 663.297 +# TIPC Configuration (EXPERIMENTAL)
 663.298 +#
 663.299 +# CONFIG_TIPC is not set
 663.300 +# CONFIG_ATM is not set
 663.301 +# CONFIG_BRIDGE is not set
 663.302 +# CONFIG_VLAN_8021Q is not set
 663.303 +# CONFIG_DECNET is not set
 663.304 +# CONFIG_LLC2 is not set
 663.305 +# CONFIG_IPX is not set
 663.306 +# CONFIG_ATALK is not set
 663.307 +# CONFIG_X25 is not set
 663.308 +# CONFIG_LAPB is not set
 663.309 +# CONFIG_ECONET is not set
 663.310 +# CONFIG_WAN_ROUTER is not set
 663.311 +
 663.312 +#
 663.313 +# QoS and/or fair queueing
 663.314 +#
 663.315 +# CONFIG_NET_SCHED is not set
 663.316 +
 663.317 +#
 663.318 +# Network testing
 663.319 +#
 663.320 +# CONFIG_NET_PKTGEN is not set
 663.321 +# CONFIG_HAMRADIO is not set
 663.322 +# CONFIG_IRDA is not set
 663.323 +# CONFIG_BT is not set
 663.324 +# CONFIG_IEEE80211 is not set
 663.325 +
 663.326 +#
 663.327 +# Device Drivers
 663.328 +#
 663.329 +
 663.330 +#
 663.331 +# Generic Driver Options
 663.332 +#
 663.333 +CONFIG_STANDALONE=y
 663.334 +CONFIG_PREVENT_FIRMWARE_BUILD=y
 663.335 +# CONFIG_FW_LOADER is not set
 663.336 +# CONFIG_DEBUG_DRIVER is not set
 663.337 +# CONFIG_SYS_HYPERVISOR is not set
 663.338 +
 663.339 +#
 663.340 +# Connector - unified userspace <-> kernelspace linker
 663.341 +#
 663.342 +# CONFIG_CONNECTOR is not set
 663.343 +
 663.344 +#
 663.345 +# Memory Technology Devices (MTD)
 663.346 +#
 663.347 +CONFIG_MTD=y
 663.348 +# CONFIG_MTD_DEBUG is not set
 663.349 +# CONFIG_MTD_CONCAT is not set
 663.350 +CONFIG_MTD_PARTITIONS=y
 663.351 +# CONFIG_MTD_REDBOOT_PARTS is not set
 663.352 +CONFIG_MTD_CMDLINE_PARTS=y
 663.353 +# CONFIG_MTD_AFS_PARTS is not set
 663.354 +
 663.355 +#
 663.356 +# User Modules And Translation Layers
 663.357 +#
 663.358 +CONFIG_MTD_CHAR=y
 663.359 +CONFIG_MTD_BLOCK=y
 663.360 +# CONFIG_FTL is not set
 663.361 +# CONFIG_NFTL is not set
 663.362 +# CONFIG_INFTL is not set
 663.363 +# CONFIG_RFD_FTL is not set
 663.364 +# CONFIG_SSFDC is not set
 663.365 +
 663.366 +#
 663.367 +# RAM/ROM/Flash chip drivers
 663.368 +#
 663.369 +CONFIG_MTD_CFI=y
 663.370 +# CONFIG_MTD_JEDECPROBE is not set
 663.371 +CONFIG_MTD_GEN_PROBE=y
 663.372 +CONFIG_MTD_CFI_ADV_OPTIONS=y
 663.373 +CONFIG_MTD_CFI_NOSWAP=y
 663.374 +# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
 663.375 +# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
 663.376 +# CONFIG_MTD_CFI_GEOMETRY is not set
 663.377 +CONFIG_MTD_MAP_BANK_WIDTH_1=y
 663.378 +CONFIG_MTD_MAP_BANK_WIDTH_2=y
 663.379 +CONFIG_MTD_MAP_BANK_WIDTH_4=y
 663.380 +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
 663.381 +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
 663.382 +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
 663.383 +CONFIG_MTD_CFI_I1=y
 663.384 +CONFIG_MTD_CFI_I2=y
 663.385 +# CONFIG_MTD_CFI_I4 is not set
 663.386 +# CONFIG_MTD_CFI_I8 is not set
 663.387 +# CONFIG_MTD_OTP is not set
 663.388 +CONFIG_MTD_CFI_INTELEXT=y
 663.389 +# CONFIG_MTD_CFI_AMDSTD is not set
 663.390 +# CONFIG_MTD_CFI_STAA is not set
 663.391 +CONFIG_MTD_CFI_UTIL=y
 663.392 +# CONFIG_MTD_RAM is not set
 663.393 +# CONFIG_MTD_ROM is not set
 663.394 +# CONFIG_MTD_ABSENT is not set
 663.395 +# CONFIG_MTD_OBSOLETE_CHIPS is not set
 663.396 +
 663.397 +#
 663.398 +# Mapping drivers for chip access
 663.399 +#
 663.400 +# CONFIG_MTD_COMPLEX_MAPPINGS is not set
 663.401 +# CONFIG_MTD_PHYSMAP is not set
 663.402 +CONFIG_MTD_ARM_INTEGRATOR=y
 663.403 +# CONFIG_MTD_PLATRAM is not set
 663.404 +
 663.405 +#
 663.406 +# Self-contained MTD device drivers
 663.407 +#
 663.408 +# CONFIG_MTD_PMC551 is not set
 663.409 +# CONFIG_MTD_SLRAM is not set
 663.410 +# CONFIG_MTD_PHRAM is not set
 663.411 +# CONFIG_MTD_MTDRAM is not set
 663.412 +# CONFIG_MTD_BLOCK2MTD is not set
 663.413 +
 663.414 +#
 663.415 +# Disk-On-Chip Device Drivers
 663.416 +#
 663.417 +# CONFIG_MTD_DOC2000 is not set
 663.418 +# CONFIG_MTD_DOC2001 is not set
 663.419 +# CONFIG_MTD_DOC2001PLUS is not set
 663.420 +
 663.421 +#
 663.422 +# NAND Flash Device Drivers
 663.423 +#
 663.424 +# CONFIG_MTD_NAND is not set
 663.425 +
 663.426 +#
 663.427 +# OneNAND Flash Device Drivers
 663.428 +#
 663.429 +# CONFIG_MTD_ONENAND is not set
 663.430 +
 663.431 +#
 663.432 +# Parallel port support
 663.433 +#
 663.434 +# CONFIG_PARPORT is not set
 663.435 +
 663.436 +#
 663.437 +# Plug and Play support
 663.438 +#
 663.439 +
 663.440 +#
 663.441 +# Block devices
 663.442 +#
 663.443 +# CONFIG_BLK_CPQ_DA is not set
 663.444 +# CONFIG_BLK_CPQ_CISS_DA is not set
 663.445 +# CONFIG_BLK_DEV_DAC960 is not set
 663.446 +# CONFIG_BLK_DEV_UMEM is not set
 663.447 +# CONFIG_BLK_DEV_COW_COMMON is not set
 663.448 +# CONFIG_BLK_DEV_LOOP is not set
 663.449 +# CONFIG_BLK_DEV_NBD is not set
 663.450 +# CONFIG_BLK_DEV_SX8 is not set
 663.451 +CONFIG_BLK_DEV_RAM=y
 663.452 +CONFIG_BLK_DEV_RAM_COUNT=16
 663.453 +CONFIG_BLK_DEV_RAM_SIZE=4096
 663.454 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 663.455 +CONFIG_BLK_DEV_INITRD=y
 663.456 +# CONFIG_CDROM_PKTCDVD is not set
 663.457 +# CONFIG_ATA_OVER_ETH is not set
 663.458 +
 663.459 +#
 663.460 +# ATA/ATAPI/MFM/RLL support
 663.461 +#
 663.462 +# CONFIG_IDE is not set
 663.463 +
 663.464 +#
 663.465 +# SCSI device support
 663.466 +#
 663.467 +# CONFIG_RAID_ATTRS is not set
 663.468 +# CONFIG_SCSI is not set
 663.469 +# CONFIG_SCSI_NETLINK is not set
 663.470 +
 663.471 +#
 663.472 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
 663.473 +#
 663.474 +# CONFIG_ATA is not set
 663.475 +
 663.476 +#
 663.477 +# Multi-device support (RAID and LVM)
 663.478 +#
 663.479 +# CONFIG_MD is not set
 663.480 +
 663.481 +#
 663.482 +# Fusion MPT device support
 663.483 +#
 663.484 +# CONFIG_FUSION is not set
 663.485 +
 663.486 +#
 663.487 +# IEEE 1394 (FireWire) support
 663.488 +#
 663.489 +# CONFIG_IEEE1394 is not set
 663.490 +
 663.491 +#
 663.492 +# I2O device support
 663.493 +#
 663.494 +# CONFIG_I2O is not set
 663.495 +
 663.496 +#
 663.497 +# Network device support
 663.498 +#
 663.499 +CONFIG_NETDEVICES=y
 663.500 +# CONFIG_DUMMY is not set
 663.501 +# CONFIG_BONDING is not set
 663.502 +# CONFIG_EQUALIZER is not set
 663.503 +# CONFIG_TUN is not set
 663.504 +
 663.505 +#
 663.506 +# ARCnet devices
 663.507 +#
 663.508 +# CONFIG_ARCNET is not set
 663.509 +
 663.510 +#
 663.511 +# PHY device support
 663.512 +#
 663.513 +# CONFIG_PHYLIB is not set
 663.514 +
 663.515 +#
 663.516 +# Ethernet (10 or 100Mbit)
 663.517 +#
 663.518 +CONFIG_NET_ETHERNET=y
 663.519 +CONFIG_MII=y
 663.520 +# CONFIG_HAPPYMEAL is not set
 663.521 +# CONFIG_SUNGEM is not set
 663.522 +# CONFIG_CASSINI is not set
 663.523 +# CONFIG_NET_VENDOR_3COM is not set
 663.524 +CONFIG_SMC91X=y
 663.525 +# CONFIG_DM9000 is not set
 663.526 +
 663.527 +#
 663.528 +# Tulip family network device support
 663.529 +#
 663.530 +# CONFIG_NET_TULIP is not set
 663.531 +# CONFIG_HP100 is not set
 663.532 +# CONFIG_NET_PCI is not set
 663.533 +
 663.534 +#
 663.535 +# Ethernet (1000 Mbit)
 663.536 +#
 663.537 +# CONFIG_ACENIC is not set
 663.538 +# CONFIG_DL2K is not set
 663.539 +# CONFIG_E1000 is not set
 663.540 +# CONFIG_NS83820 is not set
 663.541 +# CONFIG_HAMACHI is not set
 663.542 +# CONFIG_YELLOWFIN is not set
 663.543 +# CONFIG_R8169 is not set
 663.544 +# CONFIG_SIS190 is not set
 663.545 +# CONFIG_SKGE is not set
 663.546 +# CONFIG_SKY2 is not set
 663.547 +# CONFIG_SK98LIN is not set
 663.548 +# CONFIG_TIGON3 is not set
 663.549 +# CONFIG_BNX2 is not set
 663.550 +# CONFIG_QLA3XXX is not set
 663.551 +
 663.552 +#
 663.553 +# Ethernet (10000 Mbit)
 663.554 +#
 663.555 +# CONFIG_CHELSIO_T1 is not set
 663.556 +# CONFIG_IXGB is not set
 663.557 +# CONFIG_S2IO is not set
 663.558 +# CONFIG_MYRI10GE is not set
 663.559 +
 663.560 +#
 663.561 +# Token Ring devices
 663.562 +#
 663.563 +# CONFIG_TR is not set
 663.564 +
 663.565 +#
 663.566 +# Wireless LAN (non-hamradio)
 663.567 +#
 663.568 +# CONFIG_NET_RADIO is not set
 663.569 +
 663.570 +#
 663.571 +# Wan interfaces
 663.572 +#
 663.573 +# CONFIG_WAN is not set
 663.574 +# CONFIG_FDDI is not set
 663.575 +# CONFIG_HIPPI is not set
 663.576 +# CONFIG_PPP is not set
 663.577 +# CONFIG_SLIP is not set
 663.578 +# CONFIG_SHAPER is not set
 663.579 +# CONFIG_NETCONSOLE is not set
 663.580 +# CONFIG_NETPOLL is not set
 663.581 +# CONFIG_NET_POLL_CONTROLLER is not set
 663.582 +
 663.583 +#
 663.584 +# ISDN subsystem
 663.585 +#
 663.586 +# CONFIG_ISDN is not set
 663.587 +
 663.588 +#
 663.589 +# Input device support
 663.590 +#
 663.591 +CONFIG_INPUT=y
 663.592 +# CONFIG_INPUT_FF_MEMLESS is not set
 663.593 +
 663.594 +#
 663.595 +# Userland interfaces
 663.596 +#
 663.597 +CONFIG_INPUT_MOUSEDEV=y
 663.598 +CONFIG_INPUT_MOUSEDEV_PSAUX=y
 663.599 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 663.600 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 663.601 +# CONFIG_INPUT_JOYDEV is not set
 663.602 +# CONFIG_INPUT_TSDEV is not set
 663.603 +# CONFIG_INPUT_EVDEV is not set
 663.604 +# CONFIG_INPUT_EVBUG is not set
 663.605 +
 663.606 +#
 663.607 +# Input Device Drivers
 663.608 +#
 663.609 +CONFIG_INPUT_KEYBOARD=y
 663.610 +CONFIG_KEYBOARD_ATKBD=y
 663.611 +# CONFIG_KEYBOARD_SUNKBD is not set
 663.612 +# CONFIG_KEYBOARD_LKKBD is not set
 663.613 +# CONFIG_KEYBOARD_XTKBD is not set
 663.614 +# CONFIG_KEYBOARD_NEWTON is not set
 663.615 +# CONFIG_KEYBOARD_STOWAWAY is not set
 663.616 +CONFIG_INPUT_MOUSE=y
 663.617 +CONFIG_MOUSE_PS2=y
 663.618 +# CONFIG_MOUSE_SERIAL is not set
 663.619 +# CONFIG_MOUSE_VSXXXAA is not set
 663.620 +# CONFIG_INPUT_JOYSTICK is not set
 663.621 +# CONFIG_INPUT_TOUCHSCREEN is not set
 663.622 +# CONFIG_INPUT_MISC is not set
 663.623 +
 663.624 +#
 663.625 +# Hardware I/O ports
 663.626 +#
 663.627 +CONFIG_SERIO=y
 663.628 +# CONFIG_SERIO_SERPORT is not set
 663.629 +# CONFIG_SERIO_PCIPS2 is not set
 663.630 +CONFIG_SERIO_LIBPS2=y
 663.631 +# CONFIG_SERIO_RAW is not set
 663.632 +# CONFIG_GAMEPORT is not set
 663.633 +
 663.634 +#
 663.635 +# Character devices
 663.636 +#
 663.637 +CONFIG_VT=y
 663.638 +CONFIG_VT_CONSOLE=y
 663.639 +CONFIG_HW_CONSOLE=y
 663.640 +# CONFIG_VT_HW_CONSOLE_BINDING is not set
 663.641 +# CONFIG_SERIAL_NONSTANDARD is not set
 663.642 +
 663.643 +#
 663.644 +# Serial drivers
 663.645 +#
 663.646 +CONFIG_SERIAL_8250=m
 663.647 +CONFIG_SERIAL_8250_PCI=m
 663.648 +CONFIG_SERIAL_8250_NR_UARTS=4
 663.649 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 663.650 +CONFIG_SERIAL_8250_EXTENDED=y
 663.651 +CONFIG_SERIAL_8250_MANY_PORTS=y
 663.652 +CONFIG_SERIAL_8250_SHARE_IRQ=y
 663.653 +# CONFIG_SERIAL_8250_DETECT_IRQ is not set
 663.654 +CONFIG_SERIAL_8250_RSA=y
 663.655 +
 663.656 +#
 663.657 +# Non-8250 serial port support
 663.658 +#
 663.659 +CONFIG_SERIAL_CORE=m
 663.660 +# CONFIG_SERIAL_JSM is not set
 663.661 +CONFIG_UNIX98_PTYS=y
 663.662 +CONFIG_LEGACY_PTYS=y
 663.663 +CONFIG_LEGACY_PTY_COUNT=16
 663.664 +
 663.665 +#
 663.666 +# IPMI
 663.667 +#
 663.668 +# CONFIG_IPMI_HANDLER is not set
 663.669 +
 663.670 +#
 663.671 +# Watchdog Cards
 663.672 +#
 663.673 +# CONFIG_WATCHDOG is not set
 663.674 +CONFIG_HW_RANDOM=y
 663.675 +CONFIG_HW_RANDOM_IXP4XX=y
 663.676 +# CONFIG_NVRAM is not set
 663.677 +# CONFIG_DTLK is not set
 663.678 +# CONFIG_R3964 is not set
 663.679 +# CONFIG_APPLICOM is not set
 663.680 +
 663.681 +#
 663.682 +# Ftape, the floppy tape device driver
 663.683 +#
 663.684 +# CONFIG_DRM is not set
 663.685 +# CONFIG_RAW_DRIVER is not set
 663.686 +
 663.687 +#
 663.688 +# TPM devices
 663.689 +#
 663.690 +# CONFIG_TCG_TPM is not set
 663.691 +
 663.692 +#
 663.693 +# I2C support
 663.694 +#
 663.695 +CONFIG_I2C=y
 663.696 +CONFIG_I2C_CHARDEV=m
 663.697 +
 663.698 +#
 663.699 +# I2C Algorithms
 663.700 +#
 663.701 +CONFIG_I2C_ALGOBIT=y
 663.702 +# CONFIG_I2C_ALGOPCF is not set
 663.703 +# CONFIG_I2C_ALGOPCA is not set
 663.704 +
 663.705 +#
 663.706 +# I2C Hardware Bus support
 663.707 +#
 663.708 +# CONFIG_I2C_ALI1535 is not set
 663.709 +# CONFIG_I2C_ALI1563 is not set
 663.710 +# CONFIG_I2C_ALI15X3 is not set
 663.711 +# CONFIG_I2C_AMD756 is not set
 663.712 +# CONFIG_I2C_AMD8111 is not set
 663.713 +# CONFIG_I2C_I801 is not set
 663.714 +# CONFIG_I2C_I810 is not set
 663.715 +# CONFIG_I2C_PIIX4 is not set
 663.716 +# CONFIG_I2C_IOP3XX is not set
 663.717 +# CONFIG_I2C_IXP4XX is not set
 663.718 +# CONFIG_I2C_NFORCE2 is not set
 663.719 +# CONFIG_I2C_OCORES is not set
 663.720 +# CONFIG_I2C_PARPORT_LIGHT is not set
 663.721 +# CONFIG_I2C_PROSAVAGE is not set
 663.722 +# CONFIG_I2C_SAVAGE4 is not set
 663.723 +# CONFIG_I2C_SIS5595 is not set
 663.724 +# CONFIG_I2C_SIS630 is not set
 663.725 +# CONFIG_I2C_SIS96X is not set
 663.726 +# CONFIG_I2C_STUB is not set
 663.727 +# CONFIG_I2C_VIA is not set
 663.728 +# CONFIG_I2C_VIAPRO is not set
 663.729 +# CONFIG_I2C_VOODOO3 is not set
 663.730 +# CONFIG_I2C_PCA_ISA is not set
 663.731 +
 663.732 +#
 663.733 +# Miscellaneous I2C Chip support
 663.734 +#
 663.735 +# CONFIG_SENSORS_DS1337 is not set
 663.736 +# CONFIG_SENSORS_DS1374 is not set
 663.737 +CONFIG_SENSORS_EEPROM=m
 663.738 +# CONFIG_SENSORS_PCF8574 is not set
 663.739 +# CONFIG_SENSORS_PCA9539 is not set
 663.740 +# CONFIG_SENSORS_PCF8591 is not set
 663.741 +# CONFIG_SENSORS_MAX6875 is not set
 663.742 +# CONFIG_I2C_DEBUG_CORE is not set
 663.743 +# CONFIG_I2C_DEBUG_ALGO is not set
 663.744 +# CONFIG_I2C_DEBUG_BUS is not set
 663.745 +# CONFIG_I2C_DEBUG_CHIP is not set
 663.746 +
 663.747 +#
 663.748 +# SPI support
 663.749 +#
 663.750 +# CONFIG_SPI is not set
 663.751 +# CONFIG_SPI_MASTER is not set
 663.752 +
 663.753 +#
 663.754 +# Dallas's 1-wire bus
 663.755 +#
 663.756 +# CONFIG_W1 is not set
 663.757 +
 663.758 +#
 663.759 +# Hardware Monitoring support
 663.760 +#
 663.761 +# CONFIG_HWMON is not set
 663.762 +# CONFIG_HWMON_VID is not set
 663.763 +
 663.764 +#
 663.765 +# Misc devices
 663.766 +#
 663.767 +# CONFIG_SGI_IOC4 is not set
 663.768 +# CONFIG_TIFM_CORE is not set
 663.769 +
 663.770 +#
 663.771 +# LED devices
 663.772 +#
 663.773 +# CONFIG_NEW_LEDS is not set
 663.774 +
 663.775 +#
 663.776 +# LED drivers
 663.777 +#
 663.778 +
 663.779 +#
 663.780 +# LED Triggers
 663.781 +#
 663.782 +
 663.783 +#
 663.784 +# Multimedia devices
 663.785 +#
 663.786 +# CONFIG_VIDEO_DEV is not set
 663.787 +
 663.788 +#
 663.789 +# Digital Video Broadcasting Devices
 663.790 +#
 663.791 +# CONFIG_DVB is not set
 663.792 +
 663.793 +#
 663.794 +# Graphics support
 663.795 +#
 663.796 +CONFIG_FIRMWARE_EDID=y
 663.797 +CONFIG_FB=y
 663.798 +# CONFIG_FB_DDC is not set
 663.799 +# CONFIG_FB_CFB_FILLRECT is not set
 663.800 +# CONFIG_FB_CFB_COPYAREA is not set
 663.801 +# CONFIG_FB_CFB_IMAGEBLIT is not set
 663.802 +# CONFIG_FB_MACMODES is not set
 663.803 +# CONFIG_FB_BACKLIGHT is not set
 663.804 +# CONFIG_FB_MODE_HELPERS is not set
 663.805 +# CONFIG_FB_TILEBLITTING is not set
 663.806 +# CONFIG_FB_CIRRUS is not set
 663.807 +# CONFIG_FB_PM2 is not set
 663.808 +# CONFIG_FB_CYBER2000 is not set
 663.809 +# CONFIG_FB_ASILIANT is not set
 663.810 +# CONFIG_FB_IMSTT is not set
 663.811 +# CONFIG_FB_S1D13XXX is not set
 663.812 +# CONFIG_FB_NVIDIA is not set
 663.813 +# CONFIG_FB_RIVA is not set
 663.814 +# CONFIG_FB_MATROX is not set
 663.815 +# CONFIG_FB_RADEON is not set
 663.816 +# CONFIG_FB_ATY128 is not set
 663.817 +# CONFIG_FB_ATY is not set
 663.818 +# CONFIG_FB_SAVAGE is not set
 663.819 +# CONFIG_FB_SIS is not set
 663.820 +# CONFIG_FB_NEOMAGIC is not set
 663.821 +# CONFIG_FB_KYRO is not set
 663.822 +# CONFIG_FB_3DFX is not set
 663.823 +# CONFIG_FB_VOODOO1 is not set
 663.824 +# CONFIG_FB_TRIDENT is not set
 663.825 +# CONFIG_FB_VIRTUAL is not set
 663.826 +
 663.827 +#
 663.828 +# Console display driver support
 663.829 +#
 663.830 +CONFIG_VGA_CONSOLE=y
 663.831 +# CONFIG_VGACON_SOFT_SCROLLBACK is not set
 663.832 +CONFIG_DUMMY_CONSOLE=y
 663.833 +CONFIG_FRAMEBUFFER_CONSOLE=y
 663.834 +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
 663.835 +CONFIG_FONTS=y
 663.836 +# CONFIG_FONT_8x8 is not set
 663.837 +# CONFIG_FONT_8x16 is not set
 663.838 +# CONFIG_FONT_6x11 is not set
 663.839 +# CONFIG_FONT_7x14 is not set
 663.840 +# CONFIG_FONT_PEARL_8x8 is not set
 663.841 +CONFIG_FONT_ACORN_8x8=y
 663.842 +# CONFIG_FONT_MINI_4x6 is not set
 663.843 +# CONFIG_FONT_SUN8x16 is not set
 663.844 +# CONFIG_FONT_SUN12x22 is not set
 663.845 +# CONFIG_FONT_10x18 is not set
 663.846 +
 663.847 +#
 663.848 +# Logo configuration
 663.849 +#
 663.850 +# CONFIG_LOGO is not set
 663.851 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 663.852 +
 663.853 +#
 663.854 +# Sound
 663.855 +#
 663.856 +CONFIG_SOUND=y
 663.857 +
 663.858 +#
 663.859 +# Advanced Linux Sound Architecture
 663.860 +#
 663.861 +CONFIG_SND=m
 663.862 +CONFIG_SND_TIMER=m
 663.863 +CONFIG_SND_PCM=m
 663.864 +# CONFIG_SND_SEQUENCER is not set
 663.865 +CONFIG_SND_OSSEMUL=y
 663.866 +CONFIG_SND_MIXER_OSS=m
 663.867 +CONFIG_SND_PCM_OSS=m
 663.868 +CONFIG_SND_PCM_OSS_PLUGINS=y
 663.869 +# CONFIG_SND_DYNAMIC_MINORS is not set
 663.870 +CONFIG_SND_SUPPORT_OLD_API=y
 663.871 +CONFIG_SND_VERBOSE_PROCFS=y
 663.872 +# CONFIG_SND_VERBOSE_PRINTK is not set
 663.873 +# CONFIG_SND_DEBUG is not set
 663.874 +
 663.875 +#
 663.876 +# Generic devices
 663.877 +#
 663.878 +# CONFIG_SND_DUMMY is not set
 663.879 +# CONFIG_SND_MTPAV is not set
 663.880 +# CONFIG_SND_SERIAL_U16550 is not set
 663.881 +# CONFIG_SND_MPU401 is not set
 663.882 +
 663.883 +#
 663.884 +# PCI devices
 663.885 +#
 663.886 +# CONFIG_SND_AD1889 is not set
 663.887 +# CONFIG_SND_ALS300 is not set
 663.888 +# CONFIG_SND_ALI5451 is not set
 663.889 +# CONFIG_SND_ATIIXP is not set
 663.890 +# CONFIG_SND_ATIIXP_MODEM is not set
 663.891 +# CONFIG_SND_AU8810 is not set
 663.892 +# CONFIG_SND_AU8820 is not set
 663.893 +# CONFIG_SND_AU8830 is not set
 663.894 +# CONFIG_SND_AZT3328 is not set
 663.895 +# CONFIG_SND_BT87X is not set
 663.896 +# CONFIG_SND_CA0106 is not set
 663.897 +# CONFIG_SND_CMIPCI is not set
 663.898 +# CONFIG_SND_CS4281 is not set
 663.899 +# CONFIG_SND_CS46XX is not set
 663.900 +# CONFIG_SND_EMU10K1 is not set
 663.901 +# CONFIG_SND_EMU10K1X is not set
 663.902 +# CONFIG_SND_ENS1370 is not set
 663.903 +# CONFIG_SND_ENS1371 is not set
 663.904 +# CONFIG_SND_ES1938 is not set
 663.905 +# CONFIG_SND_ES1968 is not set
 663.906 +# CONFIG_SND_FM801 is not set
 663.907 +# CONFIG_SND_HDA_INTEL is not set
 663.908 +# CONFIG_SND_HDSP is not set
 663.909 +# CONFIG_SND_HDSPM is not set
 663.910 +# CONFIG_SND_ICE1712 is not set
 663.911 +# CONFIG_SND_ICE1724 is not set
 663.912 +# CONFIG_SND_INTEL8X0 is not set
 663.913 +# CONFIG_SND_INTEL8X0M is not set
 663.914 +# CONFIG_SND_KORG1212 is not set
 663.915 +# CONFIG_SND_MAESTRO3 is not set
 663.916 +# CONFIG_SND_MIXART is not set
 663.917 +# CONFIG_SND_NM256 is not set
 663.918 +# CONFIG_SND_PCXHR is not set
 663.919 +# CONFIG_SND_RME32 is not set
 663.920 +# CONFIG_SND_RME96 is not set
 663.921 +# CONFIG_SND_RME9652 is not set
 663.922 +# CONFIG_SND_SONICVIBES is not set
 663.923 +# CONFIG_SND_TRIDENT is not set
 663.924 +# CONFIG_SND_VIA82XX is not set
 663.925 +# CONFIG_SND_VIA82XX_MODEM is not set
 663.926 +# CONFIG_SND_VX222 is not set
 663.927 +# CONFIG_SND_YMFPCI is not set
 663.928 +
 663.929 +#
 663.930 +# ALSA ARM devices
 663.931 +#
 663.932 +
 663.933 +#
 663.934 +# Open Sound System
 663.935 +#
 663.936 +# CONFIG_SOUND_PRIME is not set
 663.937 +
 663.938 +#
 663.939 +# USB support
 663.940 +#
 663.941 +CONFIG_USB_ARCH_HAS_HCD=y
 663.942 +CONFIG_USB_ARCH_HAS_OHCI=y
 663.943 +CONFIG_USB_ARCH_HAS_EHCI=y
 663.944 +# CONFIG_USB is not set
 663.945 +
 663.946 +#
 663.947 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
 663.948 +#
 663.949 +
 663.950 +#
 663.951 +# USB Gadget Support
 663.952 +#
 663.953 +# CONFIG_USB_GADGET is not set
 663.954 +
 663.955 +#
 663.956 +# MMC/SD Card support
 663.957 +#
 663.958 +CONFIG_MMC=y
 663.959 +# CONFIG_MMC_DEBUG is not set
 663.960 +CONFIG_MMC_BLOCK=y
 663.961 +# CONFIG_MMC_SDHCI is not set
 663.962 +# CONFIG_MMC_TIFM_SD is not set
 663.963 +
 663.964 +#
 663.965 +# Real Time Clock
 663.966 +#
 663.967 +CONFIG_RTC_LIB=y
 663.968 +# CONFIG_RTC_CLASS is not set
 663.969 +
 663.970 +#
 663.971 +# File systems
 663.972 +#
 663.973 +CONFIG_EXT2_FS=y
 663.974 +# CONFIG_EXT2_FS_XATTR is not set
 663.975 +# CONFIG_EXT2_FS_XIP is not set
 663.976 +# CONFIG_EXT3_FS is not set
 663.977 +# CONFIG_EXT4DEV_FS is not set
 663.978 +# CONFIG_REISERFS_FS is not set
 663.979 +# CONFIG_JFS_FS is not set
 663.980 +# CONFIG_FS_POSIX_ACL is not set
 663.981 +# CONFIG_XFS_FS is not set
 663.982 +# CONFIG_GFS2_FS is not set
 663.983 +# CONFIG_OCFS2_FS is not set
 663.984 +CONFIG_MINIX_FS=y
 663.985 +CONFIG_ROMFS_FS=y
 663.986 +# CONFIG_INOTIFY is not set
 663.987 +# CONFIG_QUOTA is not set
 663.988 +CONFIG_DNOTIFY=y
 663.989 +# CONFIG_AUTOFS_FS is not set
 663.990 +# CONFIG_AUTOFS4_FS is not set
 663.991 +# CONFIG_FUSE_FS is not set
 663.992 +
 663.993 +#
 663.994 +# CD-ROM/DVD Filesystems
 663.995 +#
 663.996 +# CONFIG_ISO9660_FS is not set
 663.997 +# CONFIG_UDF_FS is not set
 663.998 +
 663.999 +#
663.1000 +# DOS/FAT/NT Filesystems
663.1001 +#
663.1002 +CONFIG_FAT_FS=m
663.1003 +# CONFIG_MSDOS_FS is not set
663.1004 +CONFIG_VFAT_FS=m
663.1005 +CONFIG_FAT_DEFAULT_CODEPAGE=437
663.1006 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
663.1007 +# CONFIG_NTFS_FS is not set
663.1008 +
663.1009 +#
663.1010 +# Pseudo filesystems
663.1011 +#
663.1012 +CONFIG_PROC_FS=y
663.1013 +CONFIG_PROC_SYSCTL=y
663.1014 +CONFIG_SYSFS=y
663.1015 +# CONFIG_TMPFS is not set
663.1016 +# CONFIG_HUGETLB_PAGE is not set
663.1017 +CONFIG_RAMFS=y
663.1018 +# CONFIG_CONFIGFS_FS is not set
663.1019 +
663.1020 +#
663.1021 +# Miscellaneous filesystems
663.1022 +#
663.1023 +# CONFIG_ADFS_FS is not set
663.1024 +# CONFIG_AFFS_FS is not set
663.1025 +# CONFIG_HFS_FS is not set
663.1026 +# CONFIG_HFSPLUS_FS is not set
663.1027 +# CONFIG_BEFS_FS is not set
663.1028 +# CONFIG_BFS_FS is not set
663.1029 +# CONFIG_EFS_FS is not set
663.1030 +# CONFIG_JFFS_FS is not set
663.1031 +CONFIG_JFFS2_FS=y
663.1032 +CONFIG_JFFS2_FS_DEBUG=0
663.1033 +CONFIG_JFFS2_FS_WRITEBUFFER=y
663.1034 +# CONFIG_JFFS2_SUMMARY is not set
663.1035 +# CONFIG_JFFS2_FS_XATTR is not set
663.1036 +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
663.1037 +CONFIG_JFFS2_ZLIB=y
663.1038 +CONFIG_JFFS2_RTIME=y
663.1039 +# CONFIG_JFFS2_RUBIN is not set
663.1040 +CONFIG_CRAMFS=y
663.1041 +# CONFIG_VXFS_FS is not set
663.1042 +# CONFIG_HPFS_FS is not set
663.1043 +# CONFIG_QNX4FS_FS is not set
663.1044 +# CONFIG_SYSV_FS is not set
663.1045 +# CONFIG_UFS_FS is not set
663.1046 +
663.1047 +#
663.1048 +# Network File Systems
663.1049 +#
663.1050 +CONFIG_NFS_FS=y
663.1051 +CONFIG_NFS_V3=y
663.1052 +# CONFIG_NFS_V3_ACL is not set
663.1053 +# CONFIG_NFS_V4 is not set
663.1054 +# CONFIG_NFS_DIRECTIO is not set
663.1055 +CONFIG_NFSD=y
663.1056 +CONFIG_NFSD_V3=y
663.1057 +# CONFIG_NFSD_V3_ACL is not set
663.1058 +# CONFIG_NFSD_V4 is not set
663.1059 +# CONFIG_NFSD_TCP is not set
663.1060 +CONFIG_ROOT_NFS=y
663.1061 +CONFIG_LOCKD=y
663.1062 +CONFIG_LOCKD_V4=y
663.1063 +CONFIG_EXPORTFS=y
663.1064 +CONFIG_NFS_COMMON=y
663.1065 +CONFIG_SUNRPC=y
663.1066 +# CONFIG_RPCSEC_GSS_KRB5 is not set
663.1067 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
663.1068 +# CONFIG_SMB_FS is not set
663.1069 +# CONFIG_CIFS is not set
663.1070 +# CONFIG_NCP_FS is not set
663.1071 +# CONFIG_CODA_FS is not set
663.1072 +# CONFIG_AFS_FS is not set
663.1073 +# CONFIG_9P_FS is not set
663.1074 +
663.1075 +#
663.1076 +# Partition Types
663.1077 +#
663.1078 +CONFIG_PARTITION_ADVANCED=y
663.1079 +# CONFIG_ACORN_PARTITION is not set
663.1080 +# CONFIG_OSF_PARTITION is not set
663.1081 +# CONFIG_AMIGA_PARTITION is not set
663.1082 +# CONFIG_ATARI_PARTITION is not set
663.1083 +# CONFIG_MAC_PARTITION is not set
663.1084 +CONFIG_MSDOS_PARTITION=y
663.1085 +# CONFIG_BSD_DISKLABEL is not set
663.1086 +# CONFIG_MINIX_SUBPARTITION is not set
663.1087 +# CONFIG_SOLARIS_X86_PARTITION is not set
663.1088 +# CONFIG_UNIXWARE_DISKLABEL is not set
663.1089 +# CONFIG_LDM_PARTITION is not set
663.1090 +# CONFIG_SGI_PARTITION is not set
663.1091 +# CONFIG_ULTRIX_PARTITION is not set
663.1092 +# CONFIG_SUN_PARTITION is not set
663.1093 +# CONFIG_KARMA_PARTITION is not set
663.1094 +# CONFIG_EFI_PARTITION is not set
663.1095 +
663.1096 +#
663.1097 +# Native Language Support
663.1098 +#
663.1099 +CONFIG_NLS=m
663.1100 +CONFIG_NLS_DEFAULT="iso8859-1"
663.1101 +# CONFIG_NLS_CODEPAGE_437 is not set
663.1102 +# CONFIG_NLS_CODEPAGE_737 is not set
663.1103 +# CONFIG_NLS_CODEPAGE_775 is not set
663.1104 +CONFIG_NLS_CODEPAGE_850=m
663.1105 +# CONFIG_NLS_CODEPAGE_852 is not set
663.1106 +# CONFIG_NLS_CODEPAGE_855 is not set
663.1107 +# CONFIG_NLS_CODEPAGE_857 is not set
663.1108 +# CONFIG_NLS_CODEPAGE_860 is not set
663.1109 +# CONFIG_NLS_CODEPAGE_861 is not set
663.1110 +# CONFIG_NLS_CODEPAGE_862 is not set
663.1111 +# CONFIG_NLS_CODEPAGE_863 is not set
663.1112 +# CONFIG_NLS_CODEPAGE_864 is not set
663.1113 +# CONFIG_NLS_CODEPAGE_865 is not set
663.1114 +# CONFIG_NLS_CODEPAGE_866 is not set
663.1115 +# CONFIG_NLS_CODEPAGE_869 is not set
663.1116 +# CONFIG_NLS_CODEPAGE_936 is not set
663.1117 +# CONFIG_NLS_CODEPAGE_950 is not set
663.1118 +# CONFIG_NLS_CODEPAGE_932 is not set
663.1119 +# CONFIG_NLS_CODEPAGE_949 is not set
663.1120 +# CONFIG_NLS_CODEPAGE_874 is not set
663.1121 +# CONFIG_NLS_ISO8859_8 is not set
663.1122 +# CONFIG_NLS_CODEPAGE_1250 is not set
663.1123 +# CONFIG_NLS_CODEPAGE_1251 is not set
663.1124 +# CONFIG_NLS_ASCII is not set
663.1125 +CONFIG_NLS_ISO8859_1=m
663.1126 +# CONFIG_NLS_ISO8859_2 is not set
663.1127 +# CONFIG_NLS_ISO8859_3 is not set
663.1128 +# CONFIG_NLS_ISO8859_4 is not set
663.1129 +# CONFIG_NLS_ISO8859_5 is not set
663.1130 +# CONFIG_NLS_ISO8859_6 is not set
663.1131 +# CONFIG_NLS_ISO8859_7 is not set
663.1132 +# CONFIG_NLS_ISO8859_9 is not set
663.1133 +# CONFIG_NLS_ISO8859_13 is not set
663.1134 +# CONFIG_NLS_ISO8859_14 is not set
663.1135 +# CONFIG_NLS_ISO8859_15 is not set
663.1136 +# CONFIG_NLS_KOI8_R is not set
663.1137 +# CONFIG_NLS_KOI8_U is not set
663.1138 +# CONFIG_NLS_UTF8 is not set
663.1139 +
663.1140 +#
663.1141 +# Profiling support
663.1142 +#
663.1143 +# CONFIG_PROFILING is not set
663.1144 +
663.1145 +#
663.1146 +# Kernel hacking
663.1147 +#
663.1148 +# CONFIG_PRINTK_TIME is not set
663.1149 +CONFIG_ENABLE_MUST_CHECK=y
663.1150 +CONFIG_MAGIC_SYSRQ=y
663.1151 +# CONFIG_UNUSED_SYMBOLS is not set
663.1152 +CONFIG_DEBUG_KERNEL=y
663.1153 +CONFIG_LOG_BUF_SHIFT=14
663.1154 +CONFIG_DETECT_SOFTLOCKUP=y
663.1155 +# CONFIG_SCHEDSTATS is not set
663.1156 +# CONFIG_DEBUG_SLAB is not set
663.1157 +# CONFIG_DEBUG_RT_MUTEXES is not set
663.1158 +# CONFIG_RT_MUTEX_TESTER is not set
663.1159 +# CONFIG_DEBUG_SPINLOCK is not set
663.1160 +# CONFIG_DEBUG_MUTEXES is not set
663.1161 +# CONFIG_DEBUG_RWSEMS is not set
663.1162 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
663.1163 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
663.1164 +# CONFIG_DEBUG_KOBJECT is not set
663.1165 +CONFIG_DEBUG_BUGVERBOSE=y
663.1166 +# CONFIG_DEBUG_INFO is not set
663.1167 +# CONFIG_DEBUG_FS is not set
663.1168 +# CONFIG_DEBUG_VM is not set
663.1169 +# CONFIG_DEBUG_LIST is not set
663.1170 +CONFIG_FRAME_POINTER=y
663.1171 +CONFIG_FORCED_INLINING=y
663.1172 +# CONFIG_HEADERS_CHECK is not set
663.1173 +# CONFIG_RCU_TORTURE_TEST is not set
663.1174 +CONFIG_DEBUG_USER=y
663.1175 +# CONFIG_DEBUG_WAITQ is not set
663.1176 +CONFIG_DEBUG_ERRORS=y
663.1177 +CONFIG_DEBUG_LL=y
663.1178 +# CONFIG_DEBUG_ICEDCC is not set
663.1179 +
663.1180 +#
663.1181 +# Security options
663.1182 +#
663.1183 +# CONFIG_KEYS is not set
663.1184 +# CONFIG_SECURITY is not set
663.1185 +
663.1186 +#
663.1187 +# Cryptographic options
663.1188 +#
663.1189 +# CONFIG_CRYPTO is not set
663.1190 +
663.1191 +#
663.1192 +# Library routines
663.1193 +#
663.1194 +# CONFIG_CRC_CCITT is not set
663.1195 +# CONFIG_CRC16 is not set
663.1196 +CONFIG_CRC32=y
663.1197 +# CONFIG_LIBCRC32C is not set
663.1198 +CONFIG_ZLIB_INFLATE=y
663.1199 +CONFIG_ZLIB_DEFLATE=y
663.1200 +CONFIG_PLIST=y
   664.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   664.2 +++ b/samples/armeb-unknown-linux-uclibc/uClibc-0.9.28.2.config	Sat Feb 24 11:00:05 2007 +0000
   664.3 @@ -0,0 +1,169 @@
   664.4 +#
   664.5 +# Automatically generated make config: don't edit
   664.6 +#
   664.7 +# TARGET_alpha is not set
   664.8 +TARGET_arm=y
   664.9 +# TARGET_bfin is not set
  664.10 +# TARGET_cris is not set
  664.11 +# TARGET_e1 is not set
  664.12 +# TARGET_frv is not set
  664.13 +# TARGET_h8300 is not set
  664.14 +# TARGET_i386 is not set
  664.15 +# TARGET_i960 is not set
  664.16 +# TARGET_m68k is not set
  664.17 +# TARGET_microblaze is not set
  664.18 +# TARGET_mips is not set
  664.19 +# TARGET_nios is not set
  664.20 +# TARGET_nios2 is not set
  664.21 +# TARGET_powerpc is not set
  664.22 +# TARGET_sh is not set
  664.23 +# TARGET_sh64 is not set
  664.24 +# TARGET_sparc is not set
  664.25 +# TARGET_v850 is not set
  664.26 +# TARGET_x86_64 is not set
  664.27 +
  664.28 +#
  664.29 +# Target Architecture Features and Options
  664.30 +#
  664.31 +HAVE_ELF=y
  664.32 +ARCH_SUPPORTS_LITTLE_ENDIAN=y
  664.33 +TARGET_ARCH="arm"
  664.34 +ARCH_SUPPORTS_BIG_ENDIAN=y
  664.35 +# CONFIG_GENERIC_ARM is not set
  664.36 +# CONFIG_ARM610 is not set
  664.37 +# CONFIG_ARM710 is not set
  664.38 +# CONFIG_ARM720T is not set
  664.39 +# CONFIG_ARM920T is not set
  664.40 +# CONFIG_ARM922T is not set
  664.41 +# CONFIG_ARM926T is not set
  664.42 +# CONFIG_ARM1136JF_S is not set
  664.43 +# CONFIG_ARM_SA110 is not set
  664.44 +# CONFIG_ARM_SA1100 is not set
  664.45 +CONFIG_ARM_XSCALE=y
  664.46 +# ARCH_LITTLE_ENDIAN is not set
  664.47 +ARCH_BIG_ENDIAN=y
  664.48 +# ARCH_HAS_NO_MMU is not set
  664.49 +ARCH_HAS_MMU=y
  664.50 +UCLIBC_HAS_FLOATS=y
  664.51 +# HAS_FPU is not set
  664.52 +UCLIBC_HAS_SOFT_FLOAT=y
  664.53 +DO_C99_MATH=y
  664.54 +KERNEL_SOURCE="/usr/src/linux"
  664.55 +C_SYMBOL_PREFIX=""
  664.56 +HAVE_DOT_CONFIG=y
  664.57 +
  664.58 +#
  664.59 +# General Library Settings
  664.60 +#
  664.61 +# HAVE_NO_PIC is not set
  664.62 +DOPIC=y
  664.63 +# HAVE_NO_SHARED is not set
  664.64 +HAVE_SHARED=y
  664.65 +# ARCH_HAS_NO_LDSO is not set
  664.66 +BUILD_UCLIBC_LDSO=y
  664.67 +# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
  664.68 +LDSO_LDD_SUPPORT=y
  664.69 +LDSO_CACHE_SUPPORT=y
  664.70 +# LDSO_PRELOAD_FILE_SUPPORT is not set
  664.71 +LDSO_BASE_FILENAME="ld.so"
  664.72 +# LDSO_RUNPATH is not set
  664.73 +# DL_FINI_CRT_COMPAT is not set
  664.74 +UCLIBC_CTOR_DTOR=y
  664.75 +# HAS_NO_THREADS is not set
  664.76 +UCLIBC_HAS_THREADS=y
  664.77 +# PTHREADS_DEBUG_SUPPORT is not set
  664.78 +UCLIBC_HAS_LFS=y
  664.79 +UCLIBC_STATIC_LDCONFIG=y
  664.80 +# MALLOC is not set
  664.81 +# MALLOC_SIMPLE is not set
  664.82 +MALLOC_STANDARD=y
  664.83 +# MALLOC_GLIBC_COMPAT is not set
  664.84 +UCLIBC_DYNAMIC_ATEXIT=y
  664.85 +HAS_SHADOW=y
  664.86 +UNIX98PTY_ONLY=y
  664.87 +ASSUME_DEVPTS=y
  664.88 +UCLIBC_HAS_TM_EXTENSIONS=y
  664.89 +# UCLIBC_HAS_TZ_CACHING is not set
  664.90 +UCLIBC_HAS_TZ_FILE=y
  664.91 +# UCLIBC_HAS_TZ_FILE_READ_MANY is not set
  664.92 +UCLIBC_TZ_FILE_PATH="/etc/TZ"
  664.93 +
  664.94 +#
  664.95 +# Networking Support
  664.96 +#
  664.97 +# UCLIBC_HAS_IPV6 is not set
  664.98 +UCLIBC_HAS_RPC=y
  664.99 +UCLIBC_HAS_FULL_RPC=y
 664.100 +
 664.101 +#
 664.102 +# String and Stdio Support
 664.103 +#
 664.104 +UCLIBC_HAS_STRING_GENERIC_OPT=y
 664.105 +UCLIBC_HAS_STRING_ARCH_OPT=y
 664.106 +UCLIBC_HAS_CTYPE_TABLES=y
 664.107 +UCLIBC_HAS_CTYPE_SIGNED=y
 664.108 +# UCLIBC_HAS_CTYPE_UNSAFE is not set
 664.109 +# UCLIBC_HAS_CTYPE_CHECKED is not set
 664.110 +UCLIBC_HAS_CTYPE_ENFORCED=y
 664.111 +# UCLIBC_HAS_WCHAR is not set
 664.112 +# UCLIBC_HAS_LOCALE is not set
 664.113 +UCLIBC_HAS_HEXADECIMAL_FLOATS=y
 664.114 +# UCLIBC_HAS_GLIBC_CUSTOM_PRINTF is not set
 664.115 +# USE_OLD_VFPRINTF is not set
 664.116 +UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
 664.117 +# UCLIBC_HAS_SCANF_GLIBC_A_FLAG is not set
 664.118 +# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
 664.119 +# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
 664.120 +# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
 664.121 +# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
 664.122 +# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
 664.123 +UCLIBC_HAS_STDIO_BUFSIZ_4096=y
 664.124 +# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
 664.125 +UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
 664.126 +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
 664.127 +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
 664.128 +UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT=y
 664.129 +UCLIBC_HAS_STDIO_GETC_MACRO=y
 664.130 +UCLIBC_HAS_STDIO_PUTC_MACRO=y
 664.131 +UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
 664.132 +UCLIBC_HAS_FOPEN_LARGEFILE_MODE=y
 664.133 +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
 664.134 +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
 664.135 +UCLIBC_HAS_PRINTF_M_SPEC=y
 664.136 +UCLIBC_HAS_ERRNO_MESSAGES=y
 664.137 +# UCLIBC_HAS_SYS_ERRLIST is not set
 664.138 +UCLIBC_HAS_SIGNUM_MESSAGES=y
 664.139 +# UCLIBC_HAS_SYS_SIGLIST is not set
 664.140 +UCLIBC_HAS_GNU_GETOPT=y
 664.141 +
 664.142 +#
 664.143 +# Big and Tall
 664.144 +#
 664.145 +UCLIBC_HAS_REGEX=y
 664.146 +UCLIBC_HAS_WORDEXP=y
 664.147 +UCLIBC_HAS_FTW=y
 664.148 +UCLIBC_HAS_GLOB=y
 664.149 +
 664.150 +#
 664.151 +# Library Installation Options
 664.152 +#
 664.153 +SHARED_LIB_LOADER_PREFIX="$(RUNTIME_PREFIX)lib"
 664.154 +RUNTIME_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/"
 664.155 +DEVEL_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/usr/"
 664.156 +
 664.157 +#
 664.158 +# uClibc security related options
 664.159 +#
 664.160 +# UCLIBC_SECURITY is not set
 664.161 +
 664.162 +#
 664.163 +# uClibc development/debugging options
 664.164 +#
 664.165 +CROSS_COMPILER_PREFIX=""
 664.166 +# DODEBUG is not set
 664.167 +# DODEBUG_PT is not set
 664.168 +# DOASSERTS is not set
 664.169 +# SUPPORT_LD_DEBUG is not set
 664.170 +# SUPPORT_LD_DEBUG_EARLY is not set
 664.171 +WARNINGS="-Wall"
 664.172 +# UCLIBC_MJN3_ONLY is not set
   665.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   665.2 +++ b/samples/i586-geode-linux-uclibc/crosstool.config	Sat Feb 24 11:00:05 2007 +0000
   665.3 @@ -0,0 +1,386 @@
   665.4 +#
   665.5 +# Automatically generated make config: don't edit
   665.6 +# crosstool-NG version: 0.0.1
   665.7 +# Sat Feb  3 14:14:42 2007
   665.8 +#
   665.9 +
  665.10 +#
  665.11 +# Paths and misc options
  665.12 +#
  665.13 +CT_PARALLEL_JOBS=1
  665.14 +CT_LOAD=0
  665.15 +CT_NICE=5
  665.16 +CT_USE_PIPES=y
  665.17 +
  665.18 +#
  665.19 +# Paths
  665.20 +#
  665.21 +CT_TARBALLS_DIR="${HOME}/dev/src"
  665.22 +CT_SRC_DIR="${HOME}/x-tools/src/${CT_TARGET}/${CT_CC}-${CT_CC_VERSION}-${CT_LIBC}-${CT_LIBC_VERSION}"
  665.23 +CT_BUILD_DIR="${HOME}/x-tools/build/${CT_TARGET}/${CT_CC}-${CT_CC_VERSION}-${CT_LIBC}-${CT_LIBC_VERSION}"
  665.24 +CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}"
  665.25 +CT_INSTALL_DIR="${CT_PREFIX_DIR}"
  665.26 +
  665.27 +#
  665.28 +# Downloading and extracting
  665.29 +#
  665.30 +# CT_NO_DOWNLOAD is not set
  665.31 +# CT_ONLY_DOWNLOAD is not set
  665.32 +# CT_FORCE_DOWNLOAD is not set
  665.33 +# CT_FORCE_EXTRACT is not set
  665.34 +
  665.35 +#
  665.36 +# Logging
  665.37 +#
  665.38 +# CT_LOG_ERROR is not set
  665.39 +# CT_LOG_WARN is not set
  665.40 +# CT_LOG_INFO is not set
  665.41 +CT_LOG_EXTRA=y
  665.42 +# CT_LOG_DEBUG is not set
  665.43 +CT_LOG_LEVEL_MAX="EXTRA"
  665.44 +# CT_LOG_PROGRESS_BAR is not set
  665.45 +# CT_LOG_USE_COLORS is not set
  665.46 +CT_LOG_TO_FILE=y
  665.47 +CT_LOG_FILE="${CT_PREFIX_DIR}/${CT_TARGET}.log"
  665.48 +
  665.49 +#
  665.50 +# Target options
  665.51 +#
  665.52 +
  665.53 +#
  665.54 +# General target options
  665.55 +#
  665.56 +# CT_ARCH_ARM is not set
  665.57 +# CT_ARCH_MIPS is not set
  665.58 +CT_ARCH_x86=y
  665.59 +# CT_ARCH_x86_64 is not set
  665.60 +# CT_ARCH_BE is not set
  665.61 +CT_ARCH_LE=y
  665.62 +CT_ARCH_FLOAT_HW=y
  665.63 +# CT_ARCH_FLOAT_SW is not set
  665.64 +
  665.65 +#
  665.66 +# Target optimisations
  665.67 +#
  665.68 +CT_ARCH_CPU=""
  665.69 +CT_ARCH_TUNE=""
  665.70 +CT_ARCH_ARCH="pentium-mmx"
  665.71 +CT_TARGET_CFLAGS=""
  665.72 +
  665.73 +#
  665.74 +# Toolchain options
  665.75 +#
  665.76 +CT_USE_SYSROOT=y
  665.77 +CT_SHARED_LIBS=y
  665.78 +CT_TARGET_VENDOR="geode"
  665.79 +CT_ARCH="x86"
  665.80 +CT_BUILD=""
  665.81 +CT_CC_NATIVE="gcc"
  665.82 +# CT_CANADIAN is not set
  665.83 +CT_HOST=""
  665.84 +CT_HOST_CC=""
  665.85 +
  665.86 +#
  665.87 +# Kernel
  665.88 +#
  665.89 +CT_KERNEL_LINUX=y
  665.90 +# CT_KERNEL_CYGWIN is not set
  665.91 +CT_KERNEL_VERSION="2.6.19.2"
  665.92 +CT_KERNEL_LINUX_HEADERS_INSTALL=y
  665.93 +# CT_KERNEL_LINUX_HEADERS_SANITISED is not set
  665.94 +# CT_KERNEL_LINUX_HEADERS_COPY is not set
  665.95 +CT_KERNEL="linux"
  665.96 +CT_KERNEL_VERSION_SEE_EXTRAVERSION=y
  665.97 +# CT_KERNEL_INSTALL_V_2_6_18 is not set
  665.98 +# CT_KERNEL_INSTALL_V_2_6_18_1 is not set
  665.99 +# CT_KERNEL_INSTALL_V_2_6_18_2 is not set
 665.100 +# CT_KERNEL_INSTALL_V_2_6_18_3 is not set
 665.101 +# CT_KERNEL_INSTALL_V_2_6_18_4 is not set
 665.102 +# CT_KERNEL_INSTALL_V_2_6_18_5 is not set
 665.103 +# CT_KERNEL_INSTALL_V_2_6_18_6 is not set
 665.104 +# CT_KERNEL_INSTALL_V_2_6_19 is not set
 665.105 +# CT_KERNEL_INSTALL_V_2_6_19_1 is not set
 665.106 +CT_KERNEL_INSTALL_V_2_6_19_2=y
 665.107 +# CT_KERNEL_COPY_V_2_6_0 is not set
 665.108 +# CT_KERNEL_COPY_V_2_6_1 is not set
 665.109 +# CT_KERNEL_COPY_V_2_6_2 is not set
 665.110 +# CT_KERNEL_COPY_V_2_6_3 is not set
 665.111 +# CT_KERNEL_COPY_V_2_6_4 is not set
 665.112 +# CT_KERNEL_COPY_V_2_6_5 is not set
 665.113 +# CT_KERNEL_COPY_V_2_6_6 is not set
 665.114 +# CT_KERNEL_COPY_V_2_6_7 is not set
 665.115 +# CT_KERNEL_COPY_V_2_6_8 is not set
 665.116 +# CT_KERNEL_COPY_V_2_6_8_1 is not set
 665.117 +# CT_KERNEL_COPY_V_2_6_9 is not set
 665.118 +# CT_KERNEL_COPY_V_2_6_10 is not set
 665.119 +# CT_KERNEL_COPY_V_2_6_11 is not set
 665.120 +# CT_KERNEL_COPY_V_2_6_11_1 is not set
 665.121 +# CT_KERNEL_COPY_V_2_6_11_10 is not set
 665.122 +# CT_KERNEL_COPY_V_2_6_11_11 is not set
 665.123 +# CT_KERNEL_COPY_V_2_6_11_12 is not set
 665.124 +# CT_KERNEL_COPY_V_2_6_11_2 is not set
 665.125 +# CT_KERNEL_COPY_V_2_6_11_3 is not set
 665.126 +# CT_KERNEL_COPY_V_2_6_11_4 is not set
 665.127 +# CT_KERNEL_COPY_V_2_6_11_5 is not set
 665.128 +# CT_KERNEL_COPY_V_2_6_11_6 is not set
 665.129 +# CT_KERNEL_COPY_V_2_6_11_7 is not set
 665.130 +# CT_KERNEL_COPY_V_2_6_11_8 is not set
 665.131 +# CT_KERNEL_COPY_V_2_6_11_9 is not set
 665.132 +# CT_KERNEL_COPY_V_2_6_12 is not set
 665.133 +# CT_KERNEL_COPY_V_2_6_12_1 is not set
 665.134 +# CT_KERNEL_COPY_V_2_6_12_2 is not set
 665.135 +# CT_KERNEL_COPY_V_2_6_12_3 is not set
 665.136 +# CT_KERNEL_COPY_V_2_6_12_4 is not set
 665.137 +# CT_KERNEL_COPY_V_2_6_12_5 is not set
 665.138 +# CT_KERNEL_COPY_V_2_6_12_6 is not set
 665.139 +# CT_KERNEL_COPY_V_2_6_13 is not set
 665.140 +# CT_KERNEL_COPY_V_2_6_13_1 is not set
 665.141 +# CT_KERNEL_COPY_V_2_6_13_2 is not set
 665.142 +# CT_KERNEL_COPY_V_2_6_13_3 is not set
 665.143 +# CT_KERNEL_COPY_V_2_6_13_4 is not set
 665.144 +# CT_KERNEL_COPY_V_2_6_13_5 is not set
 665.145 +# CT_KERNEL_COPY_V_2_6_14 is not set
 665.146 +# CT_KERNEL_COPY_V_2_6_14_1 is not set
 665.147 +# CT_KERNEL_COPY_V_2_6_14_2 is not set
 665.148 +# CT_KERNEL_COPY_V_2_6_14_3 is not set
 665.149 +# CT_KERNEL_COPY_V_2_6_14_4 is not set
 665.150 +# CT_KERNEL_COPY_V_2_6_14_5 is not set
 665.151 +# CT_KERNEL_COPY_V_2_6_14_6 is not set
 665.152 +# CT_KERNEL_COPY_V_2_6_14_7 is not set
 665.153 +# CT_KERNEL_COPY_V_2_6_15 is not set
 665.154 +# CT_KERNEL_COPY_V_2_6_15_1 is not set
 665.155 +# CT_KERNEL_COPY_V_2_6_15_2 is not set
 665.156 +# CT_KERNEL_COPY_V_2_6_15_3 is not set
 665.157 +# CT_KERNEL_COPY_V_2_6_15_4 is not set
 665.158 +# CT_KERNEL_COPY_V_2_6_15_5 is not set
 665.159 +# CT_KERNEL_COPY_V_2_6_15_6 is not set
 665.160 +# CT_KERNEL_COPY_V_2_6_15_7 is not set
 665.161 +# CT_KERNEL_COPY_V_2_6_16 is not set
 665.162 +# CT_KERNEL_COPY_V_2_6_16_1 is not set
 665.163 +# CT_KERNEL_COPY_V_2_6_16_10 is not set
 665.164 +# CT_KERNEL_COPY_V_2_6_16_11 is not set
 665.165 +# CT_KERNEL_COPY_V_2_6_16_12 is not set
 665.166 +# CT_KERNEL_COPY_V_2_6_16_13 is not set
 665.167 +# CT_KERNEL_COPY_V_2_6_16_14 is not set
 665.168 +# CT_KERNEL_COPY_V_2_6_16_15 is not set
 665.169 +# CT_KERNEL_COPY_V_2_6_16_16 is not set
 665.170 +# CT_KERNEL_COPY_V_2_6_16_17 is not set
 665.171 +# CT_KERNEL_COPY_V_2_6_16_18 is not set
 665.172 +# CT_KERNEL_COPY_V_2_6_16_19 is not set
 665.173 +# CT_KERNEL_COPY_V_2_6_16_2 is not set
 665.174 +# CT_KERNEL_COPY_V_2_6_16_20 is not set
 665.175 +# CT_KERNEL_COPY_V_2_6_16_21 is not set
 665.176 +# CT_KERNEL_COPY_V_2_6_16_22 is not set
 665.177 +# CT_KERNEL_COPY_V_2_6_16_23 is not set
 665.178 +# CT_KERNEL_COPY_V_2_6_16_24 is not set
 665.179 +# CT_KERNEL_COPY_V_2_6_16_25 is not set
 665.180 +# CT_KERNEL_COPY_V_2_6_16_26 is not set
 665.181 +# CT_KERNEL_COPY_V_2_6_16_27 is not set
 665.182 +# CT_KERNEL_COPY_V_2_6_16_28 is not set
 665.183 +# CT_KERNEL_COPY_V_2_6_16_29 is not set
 665.184 +# CT_KERNEL_COPY_V_2_6_16_3 is not set
 665.185 +# CT_KERNEL_COPY_V_2_6_16_30 is not set
 665.186 +# CT_KERNEL_COPY_V_2_6_16_31 is not set
 665.187 +# CT_KERNEL_COPY_V_2_6_16_32 is not set
 665.188 +# CT_KERNEL_COPY_V_2_6_16_33 is not set
 665.189 +# CT_KERNEL_COPY_V_2_6_16_34 is not set
 665.190 +# CT_KERNEL_COPY_V_2_6_16_35 is not set
 665.191 +# CT_KERNEL_COPY_V_2_6_16_36 is not set
 665.192 +# CT_KERNEL_COPY_V_2_6_16_4 is not set
 665.193 +# CT_KERNEL_COPY_V_2_6_16_5 is not set
 665.194 +# CT_KERNEL_COPY_V_2_6_16_6 is not set
 665.195 +# CT_KERNEL_COPY_V_2_6_16_7 is not set
 665.196 +# CT_KERNEL_COPY_V_2_6_16_8 is not set
 665.197 +# CT_KERNEL_COPY_V_2_6_16_9 is not set
 665.198 +# CT_KERNEL_COPY_V_2_6_17 is not set
 665.199 +# CT_KERNEL_COPY_V_2_6_17_1 is not set
 665.200 +# CT_KERNEL_COPY_V_2_6_17_10 is not set
 665.201 +# CT_KERNEL_COPY_V_2_6_17_11 is not set
 665.202 +# CT_KERNEL_COPY_V_2_6_17_12 is not set
 665.203 +# CT_KERNEL_COPY_V_2_6_17_13 is not set
 665.204 +# CT_KERNEL_COPY_V_2_6_17_14 is not set
 665.205 +# CT_KERNEL_COPY_V_2_6_17_2 is not set
 665.206 +# CT_KERNEL_COPY_V_2_6_17_3 is not set
 665.207 +# CT_KERNEL_COPY_V_2_6_17_4 is not set
 665.208 +# CT_KERNEL_COPY_V_2_6_17_5 is not set
 665.209 +# CT_KERNEL_COPY_V_2_6_17_6 is not set
 665.210 +# CT_KERNEL_COPY_V_2_6_17_7 is not set
 665.211 +# CT_KERNEL_COPY_V_2_6_17_8 is not set
 665.212 +# CT_KERNEL_COPY_V_2_6_17_9 is not set
 665.213 +# CT_KERNEL_COPY_V_2_6_18 is not set
 665.214 +# CT_KERNEL_COPY_V_2_6_18_1 is not set
 665.215 +# CT_KERNEL_COPY_V_2_6_18_2 is not set
 665.216 +# CT_KERNEL_COPY_V_2_6_18_3 is not set
 665.217 +# CT_KERNEL_COPY_V_2_6_18_4 is not set
 665.218 +# CT_KERNEL_COPY_V_2_6_18_5 is not set
 665.219 +# CT_KERNEL_COPY_V_2_6_18_6 is not set
 665.220 +# CT_KERNEL_COPY_V_2_6_19 is not set
 665.221 +# CT_KERNEL_COPY_V_2_6_19_1 is not set
 665.222 +# CT_KERNEL_SANITISED_V_2_6_7_0 is not set
 665.223 +# CT_KERNEL_SANITISED_V_2_6_8_0 is not set
 665.224 +# CT_KERNEL_SANITISED_V_2_6_8_1 is not set
 665.225 +# CT_KERNEL_SANITISED_V_2_6_9_0 is not set
 665.226 +# CT_KERNEL_SANITISED_V_2_6_9_1 is not set
 665.227 +# CT_KERNEL_SANITISED_V_2_6_10_0 is not set
 665.228 +# CT_KERNEL_SANITISED_V_2_6_11_0 is not set
 665.229 +# CT_KERNEL_SANITISED_V_2_6_11_1 is not set
 665.230 +# CT_KERNEL_SANITISED_V_2_6_11_2 is not set
 665.231 +# CT_KERNEL_SANITISED_V_2_6_12_0 is not set
 665.232 +CT_KERNEL_LINUX_VERBOSITY_0=y
 665.233 +# CT_KERNEL_LINUX_VERBOSITY_1 is not set
 665.234 +# CT_KERNEL_LINUX_VERBOSITY_2 is not set
 665.235 +CT_KERNEL_LINUX_VERBOSE_LEVEL=0
 665.236 +CT_KERNEL_LINUX_CONFIG_FILE="${CT_TOP_DIR}/samples/${CT_TARGET}/${CT_KERNEL}-${CT_KERNEL_VERSION}.config"
 665.237 +
 665.238 +#
 665.239 +# binutils
 665.240 +#
 665.241 +CT_BINUTILS_VERSION="2.17.50.0.10"
 665.242 +# CT_BINUTILS_V_2_11_2 is not set
 665.243 +# CT_BINUTILS_V_2_13_90 is not set
 665.244 +# CT_BINUTILS_V_2_14 is not set
 665.245 +# CT_BINUTILS_V_2_14_90 is not set
 665.246 +# CT_BINUTILS_V_2_14_92 is not set
 665.247 +# CT_BINUTILS_V_2_15 is not set
 665.248 +# CT_BINUTILS_V_2_15_90 is not set
 665.249 +# CT_BINUTILS_V_2_15_91 is not set
 665.250 +# CT_BINUTILS_V_2_16 is not set
 665.251 +# CT_BINUTILS_V_2_16_1 is not set
 665.252 +# CT_BINUTILS_V_2_17 is not set
 665.253 +# CT_BINUTILS_V_2_17_50_0_1 is not set
 665.254 +# CT_BINUTILS_V_2_17_50_0_2 is not set
 665.255 +# CT_BINUTILS_V_2_17_50_0_3 is not set
 665.256 +# CT_BINUTILS_V_2_17_50_0_4 is not set
 665.257 +# CT_BINUTILS_V_2_17_50_0_5 is not set
 665.258 +# CT_BINUTILS_V_2_17_50_0_6 is not set
 665.259 +# CT_BINUTILS_V_2_17_50_0_7 is not set
 665.260 +# CT_BINUTILS_V_2_17_50_0_8 is not set
 665.261 +# CT_BINUTILS_V_2_17_50_0_9 is not set
 665.262 +CT_BINUTILS_V_2_17_50_0_10=y
 665.263 +CT_BINUTILS_EXTRA_CONFIG=""
 665.264 +
 665.265 +#
 665.266 +# C compiler
 665.267 +#
 665.268 +
 665.269 +#
 665.270 +# Core C Compiler (used to build the C library)
 665.271 +#
 665.272 +# CT_CC_USE_CORE is not set
 665.273 +CT_CC_CORE_GCC=y
 665.274 +# CT_CC_CORE_TCC is not set
 665.275 +CT_CC_CORE_VERSION=""
 665.276 +CT_CC_CORE="gcc"
 665.277 +# CT_CC_CORE_V_2_95_3 is not set
 665.278 +# CT_CC_CORE_V_3_2_3 is not set
 665.279 +# CT_CC_CORE_V_3_3 is not set
 665.280 +# CT_CC_CORE_V_3_3_1 is not set
 665.281 +# CT_CC_CORE_V_3_3_2 is not set
 665.282 +# CT_CC_CORE_V_3_3_3 is not set
 665.283 +# CT_CC_CORE_V_3_3_4 is not set
 665.284 +# CT_CC_CORE_V_3_3_5 is not set
 665.285 +# CT_CC_CORE_V_3_3_6 is not set
 665.286 +# CT_CC_CORE_V_3_4_0 is not set
 665.287 +# CT_CC_CORE_V_3_4_1 is not set
 665.288 +# CT_CC_CORE_V_3_4_2 is not set
 665.289 +# CT_CC_CORE_V_3_4_3 is not set
 665.290 +# CT_CC_CORE_V_3_4_4 is not set
 665.291 +# CT_CC_CORE_V_3_4_5 is not set
 665.292 +# CT_CC_CORE_V_3_4_6 is not set
 665.293 +# CT_CC_CORE_V_4_0_0 is not set
 665.294 +# CT_CC_CORE_V_4_0_1 is not set
 665.295 +# CT_CC_CORE_V_4_0_2 is not set
 665.296 +# CT_CC_CORE_V_4_0_3 is not set
 665.297 +# CT_CC_CORE_V_4_0_4 is not set
 665.298 +# CT_CC_CORE_V_4_1_0 is not set
 665.299 +# CT_CC_CORE_V_4_1_1 is not set
 665.300 +CT_CC_CORE_EXTRA_CONFIG=""
 665.301 +
 665.302 +#
 665.303 +# Final C compiler
 665.304 +#
 665.305 +CT_CC_GCC=y
 665.306 +CT_CC_VERSION="4.1.1"
 665.307 +CT_CC="gcc"
 665.308 +# CT_CC_V_2_95_3 is not set
 665.309 +# CT_CC_V_3_2_3 is not set
 665.310 +# CT_CC_V_3_3 is not set
 665.311 +# CT_CC_V_3_3_1 is not set
 665.312 +# CT_CC_V_3_3_2 is not set
 665.313 +# CT_CC_V_3_3_3 is not set
 665.314 +# CT_CC_V_3_3_4 is not set
 665.315 +# CT_CC_V_3_3_5 is not set
 665.316 +# CT_CC_V_3_3_6 is not set
 665.317 +# CT_CC_V_3_4_0 is not set
 665.318 +# CT_CC_V_3_4_1 is not set
 665.319 +# CT_CC_V_3_4_2 is not set
 665.320 +# CT_CC_V_3_4_3 is not set
 665.321 +# CT_CC_V_3_4_4 is not set
 665.322 +# CT_CC_V_3_4_5 is not set
 665.323 +# CT_CC_V_4_0_0 is not set
 665.324 +# CT_CC_V_4_0_1 is not set
 665.325 +# CT_CC_V_4_0_2 is not set
 665.326 +# CT_CC_V_4_0_3 is not set
 665.327 +# CT_CC_V_4_0_4 is not set
 665.328 +# CT_CC_V_4_1_0 is not set
 665.329 +CT_CC_V_4_1_1=y
 665.330 +CT_CC_EXTRA_CONFIG=""
 665.331 +CT_CC_SUPPORT_C=y
 665.332 +CT_CC_SUPPORT_CXX=y
 665.333 +CT_CC_SUPPORT_JAVA=y
 665.334 +
 665.335 +#
 665.336 +# Supported languages:
 665.337 +#
 665.338 +CT_CC_LANG_C=y
 665.339 +CT_CC_LANG_CXX=y
 665.340 +# CT_CC_LANG_JAVA is not set
 665.341 +
 665.342 +#
 665.343 +# C-library
 665.344 +#
 665.345 +# CT_LIBC_GLIBC is not set
 665.346 +CT_LIBC_UCLIBC=y
 665.347 +CT_LIBC_VERSION="0.9.28.1"
 665.348 +CT_LIBC="uClibc"
 665.349 +# CT_LIBC_V_1_09_1 is not set
 665.350 +# CT_LIBC_V_2_0_1 is not set
 665.351 +# CT_LIBC_V_2_0_6 is not set
 665.352 +# CT_LIBC_V_2_1_1 is not set
 665.353 +# CT_LIBC_V_2_1_2 is not set
 665.354 +# CT_LIBC_V_2_1_3 is not set
 665.355 +# CT_LIBC_V_2_2 is not set
 665.356 +# CT_LIBC_V_2_2_1 is not set
 665.357 +# CT_LIBC_V_2_2_2 is not set
 665.358 +# CT_LIBC_V_2_2_3 is not set
 665.359 +# CT_LIBC_V_2_2_4 is not set
 665.360 +# CT_LIBC_V_2_2_5 is not set
 665.361 +# CT_LIBC_V_2_3 is not set
 665.362 +# CT_LIBC_V_2_3_1 is not set
 665.363 +# CT_LIBC_V_2_3_2 is not set
 665.364 +# CT_LIBC_V_2_3_3 is not set
 665.365 +# CT_LIBC_V_2_3_4 is not set
 665.366 +# CT_LIBC_V_2_3_5 is not set
 665.367 +# CT_LIBC_V_2_3_6 is not set
 665.368 +# CT_LIBC_V_2_4 is not set
 665.369 +# CT_LIBC_V_2_5 is not set
 665.370 +# CT_LIBC_GLIBC_THREADS_NPTL is not set
 665.371 +# CT_LIBC_GLIBC_THREADS_LINUXTHREADS is not set
 665.372 +# CT_LIBC_GLIBC_THREADS_NONE is not set
 665.373 +CT_LIBC_GLIBC_EXTRA_CONFIG=""
 665.374 +CT_LIBC_GLIBC_EXTRA_CFLAGS=""
 665.375 +CT_LIBC_EXTRA_CC_ARGS=""
 665.376 +CT_LIBC_GLIBC_CONFIGPARMS=""
 665.377 +CT_LIBC_ADDONS=""
 665.378 +# CT_LIBC_V_snapshot is not set
 665.379 +# CT_LIBC_V_specific_date is not set
 665.380 +# CT_LIBC_V_0_9_26 is not set
 665.381 +# CT_LIBC_V_0_9_27 is not set
 665.382 +# CT_LIBC_V_0_9_28 is not set
 665.383 +CT_LIBC_V_0_9_28_1=y
 665.384 +CT_LIBC_UCLIBC_DEBUG_LEVEL_0=y
 665.385 +# CT_LIBC_UCLIBC_DEBUG_LEVEL_1 is not set
 665.386 +# CT_LIBC_UCLIBC_DEBUG_LEVEL_2 is not set
 665.387 +CT_LIBC_UCLIBC_DEBUG_LEVEL=0
 665.388 +CT_LIBC_UCLIBC_CONFIG_FILE="${CT_TOP_DIR}/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
 665.389 +# CT_LIBC_UCLIBC_LOCALES is not set
   666.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   666.2 +++ b/samples/i586-geode-linux-uclibc/linux-2.6.19.2.config	Sat Feb 24 11:00:05 2007 +0000
   666.3 @@ -0,0 +1,1508 @@
   666.4 +#
   666.5 +# Automatically generated make config: don't edit
   666.6 +# Linux kernel version: 2.6.19.2
   666.7 +# Wed Jan 31 21:35:53 2007
   666.8 +#
   666.9 +CONFIG_X86_32=y
  666.10 +CONFIG_GENERIC_TIME=y
  666.11 +CONFIG_LOCKDEP_SUPPORT=y
  666.12 +CONFIG_STACKTRACE_SUPPORT=y
  666.13 +CONFIG_SEMAPHORE_SLEEPERS=y
  666.14 +CONFIG_X86=y
  666.15 +CONFIG_MMU=y
  666.16 +CONFIG_GENERIC_ISA_DMA=y
  666.17 +CONFIG_GENERIC_IOMAP=y
  666.18 +CONFIG_GENERIC_HWEIGHT=y
  666.19 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
  666.20 +CONFIG_DMI=y
  666.21 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
  666.22 +
  666.23 +#
  666.24 +# Code maturity level options
  666.25 +#
  666.26 +CONFIG_EXPERIMENTAL=y
  666.27 +CONFIG_BROKEN_ON_SMP=y
  666.28 +CONFIG_INIT_ENV_ARG_LIMIT=32
  666.29 +
  666.30 +#
  666.31 +# General setup
  666.32 +#
  666.33 +CONFIG_LOCALVERSION=""
  666.34 +CONFIG_LOCALVERSION_AUTO=y
  666.35 +CONFIG_SWAP=y
  666.36 +CONFIG_SYSVIPC=y
  666.37 +# CONFIG_IPC_NS is not set
  666.38 +CONFIG_POSIX_MQUEUE=y
  666.39 +# CONFIG_BSD_PROCESS_ACCT is not set
  666.40 +# CONFIG_TASKSTATS is not set
  666.41 +# CONFIG_UTS_NS is not set
  666.42 +# CONFIG_AUDIT is not set
  666.43 +CONFIG_IKCONFIG=y
  666.44 +CONFIG_IKCONFIG_PROC=y
  666.45 +# CONFIG_RELAY is not set
  666.46 +CONFIG_INITRAMFS_SOURCE=""
  666.47 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
  666.48 +CONFIG_SYSCTL=y
  666.49 +# CONFIG_EMBEDDED is not set
  666.50 +CONFIG_UID16=y
  666.51 +CONFIG_SYSCTL_SYSCALL=y
  666.52 +CONFIG_KALLSYMS=y
  666.53 +CONFIG_KALLSYMS_ALL=y
  666.54 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
  666.55 +CONFIG_HOTPLUG=y
  666.56 +CONFIG_PRINTK=y
  666.57 +CONFIG_BUG=y
  666.58 +CONFIG_ELF_CORE=y
  666.59 +CONFIG_BASE_FULL=y
  666.60 +CONFIG_FUTEX=y
  666.61 +CONFIG_EPOLL=y
  666.62 +CONFIG_SHMEM=y
  666.63 +CONFIG_SLAB=y
  666.64 +CONFIG_VM_EVENT_COUNTERS=y
  666.65 +CONFIG_RT_MUTEXES=y
  666.66 +# CONFIG_TINY_SHMEM is not set
  666.67 +CONFIG_BASE_SMALL=0
  666.68 +# CONFIG_SLOB is not set
  666.69 +
  666.70 +#
  666.71 +# Loadable module support
  666.72 +#
  666.73 +CONFIG_MODULES=y
  666.74 +CONFIG_MODULE_UNLOAD=y
  666.75 +CONFIG_MODULE_FORCE_UNLOAD=y
  666.76 +# CONFIG_MODVERSIONS is not set
  666.77 +# CONFIG_MODULE_SRCVERSION_ALL is not set
  666.78 +# CONFIG_KMOD is not set
  666.79 +
  666.80 +#
  666.81 +# Block layer
  666.82 +#
  666.83 +CONFIG_BLOCK=y
  666.84 +CONFIG_LBD=y
  666.85 +# CONFIG_BLK_DEV_IO_TRACE is not set
  666.86 +# CONFIG_LSF is not set
  666.87 +
  666.88 +#
  666.89 +# IO Schedulers
  666.90 +#
  666.91 +CONFIG_IOSCHED_NOOP=y
  666.92 +CONFIG_IOSCHED_AS=y
  666.93 +CONFIG_IOSCHED_DEADLINE=y
  666.94 +CONFIG_IOSCHED_CFQ=y
  666.95 +CONFIG_DEFAULT_AS=y
  666.96 +# CONFIG_DEFAULT_DEADLINE is not set
  666.97 +# CONFIG_DEFAULT_CFQ is not set
  666.98 +# CONFIG_DEFAULT_NOOP is not set
  666.99 +CONFIG_DEFAULT_IOSCHED="anticipatory"
 666.100 +
 666.101 +#
 666.102 +# Processor type and features
 666.103 +#
 666.104 +# CONFIG_SMP is not set
 666.105 +CONFIG_X86_PC=y
 666.106 +# CONFIG_X86_ELAN is not set
 666.107 +# CONFIG_X86_VOYAGER is not set
 666.108 +# CONFIG_X86_NUMAQ is not set
 666.109 +# CONFIG_X86_SUMMIT is not set
 666.110 +# CONFIG_X86_BIGSMP is not set
 666.111 +# CONFIG_X86_VISWS is not set
 666.112 +# CONFIG_X86_GENERICARCH is not set
 666.113 +# CONFIG_X86_ES7000 is not set
 666.114 +# CONFIG_M386 is not set
 666.115 +# CONFIG_M486 is not set
 666.116 +# CONFIG_M586 is not set
 666.117 +# CONFIG_M586TSC is not set
 666.118 +# CONFIG_M586MMX is not set
 666.119 +# CONFIG_M686 is not set
 666.120 +# CONFIG_MPENTIUMII is not set
 666.121 +# CONFIG_MPENTIUMIII is not set
 666.122 +# CONFIG_MPENTIUMM is not set
 666.123 +# CONFIG_MPENTIUM4 is not set
 666.124 +# CONFIG_MK6 is not set
 666.125 +# CONFIG_MK7 is not set
 666.126 +# CONFIG_MK8 is not set
 666.127 +# CONFIG_MCRUSOE is not set
 666.128 +# CONFIG_MEFFICEON is not set
 666.129 +# CONFIG_MWINCHIPC6 is not set
 666.130 +# CONFIG_MWINCHIP2 is not set
 666.131 +# CONFIG_MWINCHIP3D is not set
 666.132 +CONFIG_MGEODEGX1=y
 666.133 +# CONFIG_MGEODE_LX is not set
 666.134 +# CONFIG_MCYRIXIII is not set
 666.135 +# CONFIG_MVIAC3_2 is not set
 666.136 +# CONFIG_X86_GENERIC is not set
 666.137 +CONFIG_X86_CMPXCHG=y
 666.138 +CONFIG_X86_XADD=y
 666.139 +CONFIG_X86_L1_CACHE_SHIFT=4
 666.140 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 666.141 +CONFIG_GENERIC_CALIBRATE_DELAY=y
 666.142 +CONFIG_X86_PPRO_FENCE=y
 666.143 +CONFIG_X86_WP_WORKS_OK=y
 666.144 +CONFIG_X86_INVLPG=y
 666.145 +CONFIG_X86_BSWAP=y
 666.146 +CONFIG_X86_POPAD_OK=y
 666.147 +CONFIG_X86_CMPXCHG64=y
 666.148 +CONFIG_X86_ALIGNMENT_16=y
 666.149 +CONFIG_X86_TSC=y
 666.150 +# CONFIG_HPET_TIMER is not set
 666.151 +# CONFIG_PREEMPT_NONE is not set
 666.152 +CONFIG_PREEMPT_VOLUNTARY=y
 666.153 +# CONFIG_PREEMPT is not set
 666.154 +# CONFIG_X86_UP_APIC is not set
 666.155 +CONFIG_X86_MCE=y
 666.156 +CONFIG_X86_MCE_NONFATAL=y
 666.157 +CONFIG_VM86=y
 666.158 +# CONFIG_TOSHIBA is not set
 666.159 +# CONFIG_I8K is not set
 666.160 +# CONFIG_X86_REBOOTFIXUPS is not set
 666.161 +CONFIG_MICROCODE=y
 666.162 +CONFIG_MICROCODE_OLD_INTERFACE=y
 666.163 +CONFIG_X86_MSR=y
 666.164 +CONFIG_X86_CPUID=y
 666.165 +
 666.166 +#
 666.167 +# Firmware Drivers
 666.168 +#
 666.169 +# CONFIG_EDD is not set
 666.170 +# CONFIG_DELL_RBU is not set
 666.171 +# CONFIG_DCDBAS is not set
 666.172 +# CONFIG_NOHIGHMEM is not set
 666.173 +CONFIG_HIGHMEM4G=y
 666.174 +# CONFIG_HIGHMEM64G is not set
 666.175 +CONFIG_PAGE_OFFSET=0xC0000000
 666.176 +CONFIG_HIGHMEM=y
 666.177 +CONFIG_ARCH_FLATMEM_ENABLE=y
 666.178 +CONFIG_ARCH_SPARSEMEM_ENABLE=y
 666.179 +CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 666.180 +CONFIG_ARCH_POPULATES_NODE_MAP=y
 666.181 +CONFIG_SELECT_MEMORY_MODEL=y
 666.182 +CONFIG_FLATMEM_MANUAL=y
 666.183 +# CONFIG_DISCONTIGMEM_MANUAL is not set
 666.184 +# CONFIG_SPARSEMEM_MANUAL is not set
 666.185 +CONFIG_FLATMEM=y
 666.186 +CONFIG_FLAT_NODE_MEM_MAP=y
 666.187 +CONFIG_SPARSEMEM_STATIC=y
 666.188 +CONFIG_SPLIT_PTLOCK_CPUS=4
 666.189 +CONFIG_RESOURCES_64BIT=y
 666.190 +# CONFIG_HIGHPTE is not set
 666.191 +# CONFIG_MATH_EMULATION is not set
 666.192 +CONFIG_MTRR=y
 666.193 +# CONFIG_EFI is not set
 666.194 +CONFIG_REGPARM=y
 666.195 +CONFIG_SECCOMP=y
 666.196 +# CONFIG_HZ_100 is not set
 666.197 +CONFIG_HZ_250=y
 666.198 +# CONFIG_HZ_1000 is not set
 666.199 +CONFIG_HZ=250
 666.200 +# CONFIG_KEXEC is not set
 666.201 +# CONFIG_CRASH_DUMP is not set
 666.202 +CONFIG_PHYSICAL_START=0x100000
 666.203 +CONFIG_COMPAT_VDSO=y
 666.204 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 666.205 +
 666.206 +#
 666.207 +# Power management options (ACPI, APM)
 666.208 +#
 666.209 +CONFIG_PM=y
 666.210 +CONFIG_PM_LEGACY=y
 666.211 +# CONFIG_PM_DEBUG is not set
 666.212 +CONFIG_PM_SYSFS_DEPRECATED=y
 666.213 +# CONFIG_SOFTWARE_SUSPEND is not set
 666.214 +
 666.215 +#
 666.216 +# ACPI (Advanced Configuration and Power Interface) Support
 666.217 +#
 666.218 +CONFIG_ACPI=y
 666.219 +CONFIG_ACPI_SLEEP=y
 666.220 +CONFIG_ACPI_SLEEP_PROC_FS=y
 666.221 +# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
 666.222 +CONFIG_ACPI_AC=y
 666.223 +CONFIG_ACPI_BATTERY=y
 666.224 +CONFIG_ACPI_BUTTON=y
 666.225 +# CONFIG_ACPI_VIDEO is not set
 666.226 +# CONFIG_ACPI_HOTKEY is not set
 666.227 +CONFIG_ACPI_FAN=y
 666.228 +# CONFIG_ACPI_DOCK is not set
 666.229 +CONFIG_ACPI_PROCESSOR=y
 666.230 +CONFIG_ACPI_THERMAL=y
 666.231 +# CONFIG_ACPI_ASUS is not set
 666.232 +# CONFIG_ACPI_IBM is not set
 666.233 +# CONFIG_ACPI_TOSHIBA is not set
 666.234 +CONFIG_ACPI_BLACKLIST_YEAR=2001
 666.235 +CONFIG_ACPI_DEBUG=y
 666.236 +CONFIG_ACPI_EC=y
 666.237 +CONFIG_ACPI_POWER=y
 666.238 +CONFIG_ACPI_SYSTEM=y
 666.239 +CONFIG_X86_PM_TIMER=y
 666.240 +# CONFIG_ACPI_CONTAINER is not set
 666.241 +
 666.242 +#
 666.243 +# APM (Advanced Power Management) BIOS Support
 666.244 +#
 666.245 +# CONFIG_APM is not set
 666.246 +
 666.247 +#
 666.248 +# CPU Frequency scaling
 666.249 +#
 666.250 +CONFIG_CPU_FREQ=y
 666.251 +CONFIG_CPU_FREQ_TABLE=y
 666.252 +CONFIG_CPU_FREQ_DEBUG=y
 666.253 +CONFIG_CPU_FREQ_STAT=y
 666.254 +# CONFIG_CPU_FREQ_STAT_DETAILS is not set
 666.255 +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
 666.256 +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
 666.257 +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
 666.258 +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
 666.259 +CONFIG_CPU_FREQ_GOV_USERSPACE=y
 666.260 +CONFIG_CPU_FREQ_GOV_ONDEMAND=y
 666.261 +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
 666.262 +
 666.263 +#
 666.264 +# CPUFreq processor drivers
 666.265 +#
 666.266 +CONFIG_X86_ACPI_CPUFREQ=y
 666.267 +# CONFIG_X86_POWERNOW_K6 is not set
 666.268 +# CONFIG_X86_POWERNOW_K7 is not set
 666.269 +CONFIG_X86_POWERNOW_K8=y
 666.270 +CONFIG_X86_POWERNOW_K8_ACPI=y
 666.271 +# CONFIG_X86_GX_SUSPMOD is not set
 666.272 +# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
 666.273 +# CONFIG_X86_SPEEDSTEP_ICH is not set
 666.274 +# CONFIG_X86_SPEEDSTEP_SMI is not set
 666.275 +# CONFIG_X86_P4_CLOCKMOD is not set
 666.276 +# CONFIG_X86_CPUFREQ_NFORCE2 is not set
 666.277 +# CONFIG_X86_LONGRUN is not set
 666.278 +# CONFIG_X86_LONGHAUL is not set
 666.279 +
 666.280 +#
 666.281 +# shared options
 666.282 +#
 666.283 +CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y
 666.284 +# CONFIG_X86_SPEEDSTEP_LIB is not set
 666.285 +
 666.286 +#
 666.287 +# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
 666.288 +#
 666.289 +CONFIG_PCI=y
 666.290 +# CONFIG_PCI_GOBIOS is not set
 666.291 +# CONFIG_PCI_GOMMCONFIG is not set
 666.292 +# CONFIG_PCI_GODIRECT is not set
 666.293 +CONFIG_PCI_GOANY=y
 666.294 +CONFIG_PCI_BIOS=y
 666.295 +CONFIG_PCI_DIRECT=y
 666.296 +CONFIG_PCI_MMCONFIG=y
 666.297 +# CONFIG_PCIEPORTBUS is not set
 666.298 +# CONFIG_PCI_DEBUG is not set
 666.299 +CONFIG_ISA_DMA_API=y
 666.300 +# CONFIG_ISA is not set
 666.301 +# CONFIG_MCA is not set
 666.302 +# CONFIG_SCx200 is not set
 666.303 +CONFIG_K8_NB=y
 666.304 +
 666.305 +#
 666.306 +# PCCARD (PCMCIA/CardBus) support
 666.307 +#
 666.308 +# CONFIG_PCCARD is not set
 666.309 +
 666.310 +#
 666.311 +# PCI Hotplug Support
 666.312 +#
 666.313 +# CONFIG_HOTPLUG_PCI is not set
 666.314 +
 666.315 +#
 666.316 +# Executable file formats
 666.317 +#
 666.318 +CONFIG_BINFMT_ELF=y
 666.319 +# CONFIG_BINFMT_AOUT is not set
 666.320 +# CONFIG_BINFMT_MISC is not set
 666.321 +
 666.322 +#
 666.323 +# Networking
 666.324 +#
 666.325 +CONFIG_NET=y
 666.326 +
 666.327 +#
 666.328 +# Networking options
 666.329 +#
 666.330 +# CONFIG_NETDEBUG is not set
 666.331 +CONFIG_PACKET=y
 666.332 +# CONFIG_PACKET_MMAP is not set
 666.333 +CONFIG_UNIX=y
 666.334 +CONFIG_XFRM=y
 666.335 +# CONFIG_XFRM_USER is not set
 666.336 +# CONFIG_XFRM_SUB_POLICY is not set
 666.337 +# CONFIG_NET_KEY is not set
 666.338 +CONFIG_INET=y
 666.339 +CONFIG_IP_MULTICAST=y
 666.340 +# CONFIG_IP_ADVANCED_ROUTER is not set
 666.341 +CONFIG_IP_FIB_HASH=y
 666.342 +CONFIG_IP_PNP=y
 666.343 +CONFIG_IP_PNP_DHCP=y
 666.344 +# CONFIG_IP_PNP_BOOTP is not set
 666.345 +# CONFIG_IP_PNP_RARP is not set
 666.346 +# CONFIG_NET_IPIP is not set
 666.347 +# CONFIG_NET_IPGRE is not set
 666.348 +# CONFIG_IP_MROUTE is not set
 666.349 +# CONFIG_ARPD is not set
 666.350 +# CONFIG_SYN_COOKIES is not set
 666.351 +# CONFIG_INET_AH is not set
 666.352 +# CONFIG_INET_ESP is not set
 666.353 +# CONFIG_INET_IPCOMP is not set
 666.354 +# CONFIG_INET_XFRM_TUNNEL is not set
 666.355 +# CONFIG_INET_TUNNEL is not set
 666.356 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
 666.357 +CONFIG_INET_XFRM_MODE_TUNNEL=y
 666.358 +# CONFIG_INET_XFRM_MODE_BEET is not set
 666.359 +CONFIG_INET_DIAG=y
 666.360 +CONFIG_INET_TCP_DIAG=y
 666.361 +# CONFIG_TCP_CONG_ADVANCED is not set
 666.362 +CONFIG_TCP_CONG_CUBIC=y
 666.363 +CONFIG_DEFAULT_TCP_CONG="cubic"
 666.364 +CONFIG_IPV6=y
 666.365 +# CONFIG_IPV6_PRIVACY is not set
 666.366 +# CONFIG_IPV6_ROUTER_PREF is not set
 666.367 +# CONFIG_INET6_AH is not set
 666.368 +# CONFIG_INET6_ESP is not set
 666.369 +# CONFIG_INET6_IPCOMP is not set
 666.370 +# CONFIG_IPV6_MIP6 is not set
 666.371 +# CONFIG_INET6_XFRM_TUNNEL is not set
 666.372 +# CONFIG_INET6_TUNNEL is not set
 666.373 +CONFIG_INET6_XFRM_MODE_TRANSPORT=y
 666.374 +CONFIG_INET6_XFRM_MODE_TUNNEL=y
 666.375 +# CONFIG_INET6_XFRM_MODE_BEET is not set
 666.376 +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
 666.377 +CONFIG_IPV6_SIT=y
 666.378 +# CONFIG_IPV6_TUNNEL is not set
 666.379 +# CONFIG_IPV6_MULTIPLE_TABLES is not set
 666.380 +# CONFIG_NETWORK_SECMARK is not set
 666.381 +# CONFIG_NETFILTER is not set
 666.382 +
 666.383 +#
 666.384 +# DCCP Configuration (EXPERIMENTAL)
 666.385 +#
 666.386 +# CONFIG_IP_DCCP is not set
 666.387 +
 666.388 +#
 666.389 +# SCTP Configuration (EXPERIMENTAL)
 666.390 +#
 666.391 +# CONFIG_IP_SCTP is not set
 666.392 +
 666.393 +#
 666.394 +# TIPC Configuration (EXPERIMENTAL)
 666.395 +#
 666.396 +# CONFIG_TIPC is not set
 666.397 +# CONFIG_ATM is not set
 666.398 +# CONFIG_BRIDGE is not set
 666.399 +# CONFIG_VLAN_8021Q is not set
 666.400 +# CONFIG_DECNET is not set
 666.401 +# CONFIG_LLC2 is not set
 666.402 +# CONFIG_IPX is not set
 666.403 +# CONFIG_ATALK is not set
 666.404 +# CONFIG_X25 is not set
 666.405 +# CONFIG_LAPB is not set
 666.406 +# CONFIG_ECONET is not set
 666.407 +# CONFIG_WAN_ROUTER is not set
 666.408 +
 666.409 +#
 666.410 +# QoS and/or fair queueing
 666.411 +#
 666.412 +# CONFIG_NET_SCHED is not set
 666.413 +
 666.414 +#
 666.415 +# Network testing
 666.416 +#
 666.417 +# CONFIG_NET_PKTGEN is not set
 666.418 +# CONFIG_NET_TCPPROBE is not set
 666.419 +# CONFIG_HAMRADIO is not set
 666.420 +# CONFIG_IRDA is not set
 666.421 +# CONFIG_BT is not set
 666.422 +# CONFIG_IEEE80211 is not set
 666.423 +
 666.424 +#
 666.425 +# Device Drivers
 666.426 +#
 666.427 +
 666.428 +#
 666.429 +# Generic Driver Options
 666.430 +#
 666.431 +CONFIG_STANDALONE=y
 666.432 +CONFIG_PREVENT_FIRMWARE_BUILD=y
 666.433 +CONFIG_FW_LOADER=y
 666.434 +# CONFIG_DEBUG_DRIVER is not set
 666.435 +# CONFIG_SYS_HYPERVISOR is not set
 666.436 +
 666.437 +#
 666.438 +# Connector - unified userspace <-> kernelspace linker
 666.439 +#
 666.440 +# CONFIG_CONNECTOR is not set
 666.441 +
 666.442 +#
 666.443 +# Memory Technology Devices (MTD)
 666.444 +#
 666.445 +# CONFIG_MTD is not set
 666.446 +
 666.447 +#
 666.448 +# Parallel port support
 666.449 +#
 666.450 +# CONFIG_PARPORT is not set
 666.451 +
 666.452 +#
 666.453 +# Plug and Play support
 666.454 +#
 666.455 +# CONFIG_PNP is not set
 666.456 +
 666.457 +#
 666.458 +# Block devices
 666.459 +#
 666.460 +CONFIG_BLK_DEV_FD=y
 666.461 +# CONFIG_BLK_CPQ_DA is not set
 666.462 +# CONFIG_BLK_CPQ_CISS_DA is not set
 666.463 +# CONFIG_BLK_DEV_DAC960 is not set
 666.464 +# CONFIG_BLK_DEV_UMEM is not set
 666.465 +# CONFIG_BLK_DEV_COW_COMMON is not set
 666.466 +CONFIG_BLK_DEV_LOOP=y
 666.467 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
 666.468 +# CONFIG_BLK_DEV_NBD is not set
 666.469 +# CONFIG_BLK_DEV_SX8 is not set
 666.470 +# CONFIG_BLK_DEV_UB is not set
 666.471 +CONFIG_BLK_DEV_RAM=y
 666.472 +CONFIG_BLK_DEV_RAM_COUNT=16
 666.473 +CONFIG_BLK_DEV_RAM_SIZE=4096
 666.474 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 666.475 +CONFIG_BLK_DEV_INITRD=y
 666.476 +# CONFIG_CDROM_PKTCDVD is not set
 666.477 +# CONFIG_ATA_OVER_ETH is not set
 666.478 +
 666.479 +#
 666.480 +# Misc devices
 666.481 +#
 666.482 +# CONFIG_IBM_ASM is not set
 666.483 +# CONFIG_SGI_IOC4 is not set
 666.484 +# CONFIG_TIFM_CORE is not set
 666.485 +
 666.486 +#
 666.487 +# ATA/ATAPI/MFM/RLL support
 666.488 +#
 666.489 +CONFIG_IDE=y
 666.490 +CONFIG_BLK_DEV_IDE=y
 666.491 +
 666.492 +#
 666.493 +# Please see Documentation/ide.txt for help/info on IDE drives
 666.494 +#
 666.495 +# CONFIG_BLK_DEV_IDE_SATA is not set
 666.496 +# CONFIG_BLK_DEV_HD_IDE is not set
 666.497 +CONFIG_BLK_DEV_IDEDISK=y
 666.498 +CONFIG_IDEDISK_MULTI_MODE=y
 666.499 +CONFIG_BLK_DEV_IDECD=y
 666.500 +# CONFIG_BLK_DEV_IDETAPE is not set
 666.501 +# CONFIG_BLK_DEV_IDEFLOPPY is not set
 666.502 +# CONFIG_BLK_DEV_IDESCSI is not set
 666.503 +# CONFIG_IDE_TASK_IOCTL is not set
 666.504 +
 666.505 +#
 666.506 +# IDE chipset support/bugfixes
 666.507 +#
 666.508 +CONFIG_IDE_GENERIC=y
 666.509 +# CONFIG_BLK_DEV_CMD640 is not set
 666.510 +CONFIG_BLK_DEV_IDEPCI=y
 666.511 +# CONFIG_IDEPCI_SHARE_IRQ is not set
 666.512 +# CONFIG_BLK_DEV_OFFBOARD is not set
 666.513 +# CONFIG_BLK_DEV_GENERIC is not set
 666.514 +# CONFIG_BLK_DEV_OPTI621 is not set
 666.515 +# CONFIG_BLK_DEV_RZ1000 is not set
 666.516 +CONFIG_BLK_DEV_IDEDMA_PCI=y
 666.517 +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
 666.518 +CONFIG_IDEDMA_PCI_AUTO=y
 666.519 +# CONFIG_IDEDMA_ONLYDISK is not set
 666.520 +# CONFIG_BLK_DEV_AEC62XX is not set
 666.521 +# CONFIG_BLK_DEV_ALI15X3 is not set
 666.522 +CONFIG_BLK_DEV_AMD74XX=y
 666.523 +# CONFIG_BLK_DEV_ATIIXP is not set
 666.524 +# CONFIG_BLK_DEV_CMD64X is not set
 666.525 +# CONFIG_BLK_DEV_TRIFLEX is not set
 666.526 +# CONFIG_BLK_DEV_CY82C693 is not set
 666.527 +# CONFIG_BLK_DEV_CS5520 is not set
 666.528 +# CONFIG_BLK_DEV_CS5530 is not set
 666.529 +# CONFIG_BLK_DEV_CS5535 is not set
 666.530 +# CONFIG_BLK_DEV_HPT34X is not set
 666.531 +# CONFIG_BLK_DEV_HPT366 is not set
 666.532 +# CONFIG_BLK_DEV_JMICRON is not set
 666.533 +# CONFIG_BLK_DEV_SC1200 is not set
 666.534 +CONFIG_BLK_DEV_PIIX=y
 666.535 +# CONFIG_BLK_DEV_IT821X is not set
 666.536 +# CONFIG_BLK_DEV_NS87415 is not set
 666.537 +# CONFIG_BLK_DEV_PDC202XX_OLD is not set
 666.538 +# CONFIG_BLK_DEV_PDC202XX_NEW is not set
 666.539 +# CONFIG_BLK_DEV_SVWKS is not set
 666.540 +# CONFIG_BLK_DEV_SIIMAGE is not set
 666.541 +# CONFIG_BLK_DEV_SIS5513 is not set
 666.542 +# CONFIG_BLK_DEV_SLC90E66 is not set
 666.543 +# CONFIG_BLK_DEV_TRM290 is not set
 666.544 +# CONFIG_BLK_DEV_VIA82CXXX is not set
 666.545 +# CONFIG_IDE_ARM is not set
 666.546 +CONFIG_BLK_DEV_IDEDMA=y
 666.547 +# CONFIG_IDEDMA_IVB is not set
 666.548 +CONFIG_IDEDMA_AUTO=y
 666.549 +# CONFIG_BLK_DEV_HD is not set
 666.550 +
 666.551 +#
 666.552 +# SCSI device support
 666.553 +#
 666.554 +# CONFIG_RAID_ATTRS is not set
 666.555 +CONFIG_SCSI=y
 666.556 +CONFIG_SCSI_NETLINK=y
 666.557 +# CONFIG_SCSI_PROC_FS is not set
 666.558 +
 666.559 +#
 666.560 +# SCSI support type (disk, tape, CD-ROM)
 666.561 +#
 666.562 +CONFIG_BLK_DEV_SD=y
 666.563 +# CONFIG_CHR_DEV_ST is not set
 666.564 +# CONFIG_CHR_DEV_OSST is not set
 666.565 +CONFIG_BLK_DEV_SR=y
 666.566 +# CONFIG_BLK_DEV_SR_VENDOR is not set
 666.567 +CONFIG_CHR_DEV_SG=y
 666.568 +# CONFIG_CHR_DEV_SCH is not set
 666.569 +
 666.570 +#
 666.571 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 666.572 +#
 666.573 +# CONFIG_SCSI_MULTI_LUN is not set
 666.574 +# CONFIG_SCSI_CONSTANTS is not set
 666.575 +# CONFIG_SCSI_LOGGING is not set
 666.576 +
 666.577 +#
 666.578 +# SCSI Transports
 666.579 +#
 666.580 +CONFIG_SCSI_SPI_ATTRS=y
 666.581 +CONFIG_SCSI_FC_ATTRS=y
 666.582 +# CONFIG_SCSI_ISCSI_ATTRS is not set
 666.583 +# CONFIG_SCSI_SAS_ATTRS is not set
 666.584 +# CONFIG_SCSI_SAS_LIBSAS is not set
 666.585 +
 666.586 +#
 666.587 +# SCSI low-level drivers
 666.588 +#
 666.589 +# CONFIG_ISCSI_TCP is not set
 666.590 +CONFIG_BLK_DEV_3W_XXXX_RAID=y
 666.591 +# CONFIG_SCSI_3W_9XXX is not set
 666.592 +# CONFIG_SCSI_ACARD is not set
 666.593 +# CONFIG_SCSI_AACRAID is not set
 666.594 +CONFIG_SCSI_AIC7XXX=y
 666.595 +CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
 666.596 +CONFIG_AIC7XXX_RESET_DELAY_MS=5000
 666.597 +CONFIG_AIC7XXX_DEBUG_ENABLE=y
 666.598 +CONFIG_AIC7XXX_DEBUG_MASK=0
 666.599 +CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
 666.600 +# CONFIG_SCSI_AIC7XXX_OLD is not set
 666.601 +CONFIG_SCSI_AIC79XX=y
 666.602 +CONFIG_AIC79XX_CMDS_PER_DEVICE=32
 666.603 +CONFIG_AIC79XX_RESET_DELAY_MS=4000
 666.604 +# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
 666.605 +# CONFIG_AIC79XX_DEBUG_ENABLE is not set
 666.606 +CONFIG_AIC79XX_DEBUG_MASK=0
 666.607 +# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
 666.608 +# CONFIG_SCSI_AIC94XX is not set
 666.609 +# CONFIG_SCSI_DPT_I2O is not set
 666.610 +# CONFIG_SCSI_ADVANSYS is not set
 666.611 +# CONFIG_SCSI_ARCMSR is not set
 666.612 +# CONFIG_MEGARAID_NEWGEN is not set
 666.613 +# CONFIG_MEGARAID_LEGACY is not set
 666.614 +# CONFIG_MEGARAID_SAS is not set
 666.615 +# CONFIG_SCSI_HPTIOP is not set
 666.616 +# CONFIG_SCSI_BUSLOGIC is not set
 666.617 +# CONFIG_SCSI_DMX3191D is not set
 666.618 +# CONFIG_SCSI_EATA is not set
 666.619 +# CONFIG_SCSI_FUTURE_DOMAIN is not set
 666.620 +# CONFIG_SCSI_GDTH is not set
 666.621 +# CONFIG_SCSI_IPS is not set
 666.622 +# CONFIG_SCSI_INITIO is not set
 666.623 +# CONFIG_SCSI_INIA100 is not set
 666.624 +# CONFIG_SCSI_STEX is not set
 666.625 +# CONFIG_SCSI_SYM53C8XX_2 is not set
 666.626 +# CONFIG_SCSI_IPR is not set
 666.627 +# CONFIG_SCSI_QLOGIC_1280 is not set
 666.628 +# CONFIG_SCSI_QLA_FC is not set
 666.629 +# CONFIG_SCSI_QLA_ISCSI is not set
 666.630 +# CONFIG_SCSI_LPFC is not set
 666.631 +# CONFIG_SCSI_DC395x is not set
 666.632 +# CONFIG_SCSI_DC390T is not set
 666.633 +# CONFIG_SCSI_NSP32 is not set
 666.634 +# CONFIG_SCSI_DEBUG is not set
 666.635 +
 666.636 +#
 666.637 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
 666.638 +#
 666.639 +CONFIG_ATA=y
 666.640 +CONFIG_SATA_AHCI=y
 666.641 +CONFIG_SATA_SVW=y
 666.642 +CONFIG_ATA_PIIX=y
 666.643 +# CONFIG_SATA_MV is not set
 666.644 +CONFIG_SATA_NV=y
 666.645 +# CONFIG_PDC_ADMA is not set
 666.646 +# CONFIG_SATA_QSTOR is not set
 666.647 +# CONFIG_SATA_PROMISE is not set
 666.648 +# CONFIG_SATA_SX4 is not set
 666.649 +CONFIG_SATA_SIL=y
 666.650 +# CONFIG_SATA_SIL24 is not set
 666.651 +# CONFIG_SATA_SIS is not set
 666.652 +# CONFIG_SATA_ULI is not set
 666.653 +CONFIG_SATA_VIA=y
 666.654 +# CONFIG_SATA_VITESSE is not set
 666.655 +CONFIG_SATA_INTEL_COMBINED=y
 666.656 +# CONFIG_PATA_ALI is not set
 666.657 +# CONFIG_PATA_AMD is not set
 666.658 +# CONFIG_PATA_ARTOP is not set
 666.659 +# CONFIG_PATA_ATIIXP is not set
 666.660 +# CONFIG_PATA_CMD64X is not set
 666.661 +# CONFIG_PATA_CS5520 is not set
 666.662 +# CONFIG_PATA_CS5530 is not set
 666.663 +# CONFIG_PATA_CS5535 is not set
 666.664 +# CONFIG_PATA_CYPRESS is not set
 666.665 +# CONFIG_PATA_EFAR is not set
 666.666 +# CONFIG_ATA_GENERIC is not set
 666.667 +# CONFIG_PATA_HPT366 is not set
 666.668 +# CONFIG_PATA_HPT37X is not set
 666.669 +# CONFIG_PATA_HPT3X2N is not set
 666.670 +# CONFIG_PATA_HPT3X3 is not set
 666.671 +# CONFIG_PATA_IT821X is not set
 666.672 +# CONFIG_PATA_JMICRON is not set
 666.673 +# CONFIG_PATA_TRIFLEX is not set
 666.674 +# CONFIG_PATA_MPIIX is not set
 666.675 +# CONFIG_PATA_OLDPIIX is not set
 666.676 +# CONFIG_PATA_NETCELL is not set
 666.677 +# CONFIG_PATA_NS87410 is not set
 666.678 +# CONFIG_PATA_OPTI is not set
 666.679 +# CONFIG_PATA_OPTIDMA is not set
 666.680 +# CONFIG_PATA_PDC_OLD is not set
 666.681 +# CONFIG_PATA_RADISYS is not set
 666.682 +# CONFIG_PATA_RZ1000 is not set
 666.683 +# CONFIG_PATA_SC1200 is not set
 666.684 +# CONFIG_PATA_SERVERWORKS is not set
 666.685 +# CONFIG_PATA_PDC2027X is not set
 666.686 +# CONFIG_PATA_SIL680 is not set
 666.687 +# CONFIG_PATA_SIS is not set
 666.688 +# CONFIG_PATA_VIA is not set
 666.689 +# CONFIG_PATA_WINBOND is not set
 666.690 +
 666.691 +#
 666.692 +# Multi-device support (RAID and LVM)
 666.693 +#
 666.694 +CONFIG_MD=y
 666.695 +# CONFIG_BLK_DEV_MD is not set
 666.696 +CONFIG_BLK_DEV_DM=y
 666.697 +# CONFIG_DM_DEBUG is not set
 666.698 +# CONFIG_DM_CRYPT is not set
 666.699 +# CONFIG_DM_SNAPSHOT is not set
 666.700 +# CONFIG_DM_MIRROR is not set
 666.701 +# CONFIG_DM_ZERO is not set
 666.702 +# CONFIG_DM_MULTIPATH is not set
 666.703 +
 666.704 +#
 666.705 +# Fusion MPT device support
 666.706 +#
 666.707 +CONFIG_FUSION=y
 666.708 +CONFIG_FUSION_SPI=y
 666.709 +# CONFIG_FUSION_FC is not set
 666.710 +# CONFIG_FUSION_SAS is not set
 666.711 +CONFIG_FUSION_MAX_SGE=128
 666.712 +# CONFIG_FUSION_CTL is not set
 666.713 +
 666.714 +#
 666.715 +# IEEE 1394 (FireWire) support
 666.716 +#
 666.717 +CONFIG_IEEE1394=y
 666.718 +
 666.719 +#
 666.720 +# Subsystem Options
 666.721 +#
 666.722 +# CONFIG_IEEE1394_VERBOSEDEBUG is not set
 666.723 +# CONFIG_IEEE1394_OUI_DB is not set
 666.724 +# CONFIG_IEEE1394_EXTRA_CONFIG_ROMS is not set
 666.725 +# CONFIG_IEEE1394_EXPORT_FULL_API is not set
 666.726 +
 666.727 +#
 666.728 +# Device Drivers
 666.729 +#
 666.730 +
 666.731 +#
 666.732 +# Texas Instruments PCILynx requires I2C
 666.733 +#
 666.734 +CONFIG_IEEE1394_OHCI1394=y
 666.735 +
 666.736 +#
 666.737 +# Protocol Drivers
 666.738 +#
 666.739 +# CONFIG_IEEE1394_VIDEO1394 is not set
 666.740 +# CONFIG_IEEE1394_SBP2 is not set
 666.741 +# CONFIG_IEEE1394_ETH1394 is not set
 666.742 +# CONFIG_IEEE1394_DV1394 is not set
 666.743 +CONFIG_IEEE1394_RAWIO=y
 666.744 +
 666.745 +#
 666.746 +# I2O device support
 666.747 +#
 666.748 +# CONFIG_I2O is not set
 666.749 +
 666.750 +#
 666.751 +# Network device support
 666.752 +#
 666.753 +CONFIG_NETDEVICES=y
 666.754 +# CONFIG_DUMMY is not set
 666.755 +# CONFIG_BONDING is not set
 666.756 +# CONFIG_EQUALIZER is not set
 666.757 +# CONFIG_TUN is not set
 666.758 +
 666.759 +#
 666.760 +# ARCnet devices
 666.761 +#
 666.762 +# CONFIG_ARCNET is not set
 666.763 +
 666.764 +#
 666.765 +# PHY device support
 666.766 +#
 666.767 +# CONFIG_PHYLIB is not set
 666.768 +
 666.769 +#
 666.770 +# Ethernet (10 or 100Mbit)
 666.771 +#
 666.772 +CONFIG_NET_ETHERNET=y
 666.773 +CONFIG_MII=y
 666.774 +# CONFIG_HAPPYMEAL is not set
 666.775 +# CONFIG_SUNGEM is not set
 666.776 +# CONFIG_CASSINI is not set
 666.777 +# CONFIG_NET_VENDOR_3COM is not set
 666.778 +
 666.779 +#
 666.780 +# Tulip family network device support
 666.781 +#
 666.782 +CONFIG_NET_TULIP=y
 666.783 +# CONFIG_DE2104X is not set
 666.784 +CONFIG_TULIP=y
 666.785 +# CONFIG_TULIP_MWI is not set
 666.786 +# CONFIG_TULIP_MMIO is not set
 666.787 +# CONFIG_TULIP_NAPI is not set
 666.788 +# CONFIG_DE4X5 is not set
 666.789 +# CONFIG_WINBOND_840 is not set
 666.790 +# CONFIG_DM9102 is not set
 666.791 +# CONFIG_ULI526X is not set
 666.792 +# CONFIG_HP100 is not set
 666.793 +CONFIG_NET_PCI=y
 666.794 +# CONFIG_PCNET32 is not set
 666.795 +# CONFIG_AMD8111_ETH is not set
 666.796 +# CONFIG_ADAPTEC_STARFIRE is not set
 666.797 +CONFIG_B44=y
 666.798 +CONFIG_FORCEDETH=y
 666.799 +# CONFIG_FORCEDETH_NAPI is not set
 666.800 +# CONFIG_DGRS is not set
 666.801 +# CONFIG_EEPRO100 is not set
 666.802 +CONFIG_E100=y
 666.803 +# CONFIG_FEALNX is not set
 666.804 +# CONFIG_NATSEMI is not set
 666.805 +# CONFIG_NE2K_PCI is not set
 666.806 +CONFIG_8139CP=y
 666.807 +CONFIG_8139TOO=y
 666.808 +# CONFIG_8139TOO_PIO is not set
 666.809 +# CONFIG_8139TOO_TUNE_TWISTER is not set
 666.810 +# CONFIG_8139TOO_8129 is not set
 666.811 +# CONFIG_8139_OLD_RX_RESET is not set
 666.812 +# CONFIG_SIS900 is not set
 666.813 +# CONFIG_EPIC100 is not set
 666.814 +# CONFIG_SUNDANCE is not set
 666.815 +# CONFIG_TLAN is not set
 666.816 +# CONFIG_VIA_RHINE is not set
 666.817 +
 666.818 +#
 666.819 +# Ethernet (1000 Mbit)
 666.820 +#
 666.821 +# CONFIG_ACENIC is not set
 666.822 +# CONFIG_DL2K is not set
 666.823 +CONFIG_E1000=y
 666.824 +# CONFIG_E1000_NAPI is not set
 666.825 +# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 666.826 +# CONFIG_NS83820 is not set
 666.827 +# CONFIG_HAMACHI is not set
 666.828 +# CONFIG_YELLOWFIN is not set
 666.829 +CONFIG_R8169=y
 666.830 +# CONFIG_R8169_NAPI is not set
 666.831 +# CONFIG_SIS190 is not set
 666.832 +# CONFIG_SKGE is not set
 666.833 +CONFIG_SKY2=y
 666.834 +# CONFIG_SK98LIN is not set
 666.835 +# CONFIG_VIA_VELOCITY is not set
 666.836 +CONFIG_TIGON3=y
 666.837 +CONFIG_BNX2=y
 666.838 +# CONFIG_QLA3XXX is not set
 666.839 +
 666.840 +#
 666.841 +# Ethernet (10000 Mbit)
 666.842 +#
 666.843 +# CONFIG_CHELSIO_T1 is not set
 666.844 +# CONFIG_IXGB is not set
 666.845 +# CONFIG_S2IO is not set
 666.846 +# CONFIG_MYRI10GE is not set
 666.847 +
 666.848 +#
 666.849 +# Token Ring devices
 666.850 +#
 666.851 +# CONFIG_TR is not set
 666.852 +
 666.853 +#
 666.854 +# Wireless LAN (non-hamradio)
 666.855 +#
 666.856 +# CONFIG_NET_RADIO is not set
 666.857 +
 666.858 +#
 666.859 +# Wan interfaces
 666.860 +#
 666.861 +# CONFIG_WAN is not set
 666.862 +# CONFIG_FDDI is not set
 666.863 +# CONFIG_HIPPI is not set
 666.864 +# CONFIG_PPP is not set
 666.865 +# CONFIG_SLIP is not set
 666.866 +# CONFIG_NET_FC is not set
 666.867 +# CONFIG_SHAPER is not set
 666.868 +CONFIG_NETCONSOLE=y
 666.869 +CONFIG_NETPOLL=y
 666.870 +# CONFIG_NETPOLL_RX is not set
 666.871 +# CONFIG_NETPOLL_TRAP is not set
 666.872 +CONFIG_NET_POLL_CONTROLLER=y
 666.873 +
 666.874 +#
 666.875 +# ISDN subsystem
 666.876 +#
 666.877 +# CONFIG_ISDN is not set
 666.878 +
 666.879 +#
 666.880 +# Telephony Support
 666.881 +#
 666.882 +# CONFIG_PHONE is not set
 666.883 +
 666.884 +#
 666.885 +# Input device support
 666.886 +#
 666.887 +CONFIG_INPUT=y
 666.888 +# CONFIG_INPUT_FF_MEMLESS is not set
 666.889 +
 666.890 +#
 666.891 +# Userland interfaces
 666.892 +#
 666.893 +CONFIG_INPUT_MOUSEDEV=y
 666.894 +CONFIG_INPUT_MOUSEDEV_PSAUX=y
 666.895 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 666.896 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 666.897 +# CONFIG_INPUT_JOYDEV is not set
 666.898 +# CONFIG_INPUT_TSDEV is not set
 666.899 +CONFIG_INPUT_EVDEV=y
 666.900 +# CONFIG_INPUT_EVBUG is not set
 666.901 +
 666.902 +#
 666.903 +# Input Device Drivers
 666.904 +#
 666.905 +CONFIG_INPUT_KEYBOARD=y
 666.906 +CONFIG_KEYBOARD_ATKBD=y
 666.907 +# CONFIG_KEYBOARD_SUNKBD is not set
 666.908 +# CONFIG_KEYBOARD_LKKBD is not set
 666.909 +# CONFIG_KEYBOARD_XTKBD is not set
 666.910 +# CONFIG_KEYBOARD_NEWTON is not set
 666.911 +# CONFIG_KEYBOARD_STOWAWAY is not set
 666.912 +CONFIG_INPUT_MOUSE=y
 666.913 +CONFIG_MOUSE_PS2=y
 666.914 +# CONFIG_MOUSE_SERIAL is not set
 666.915 +# CONFIG_MOUSE_VSXXXAA is not set
 666.916 +# CONFIG_INPUT_JOYSTICK is not set
 666.917 +# CONFIG_INPUT_TOUCHSCREEN is not set
 666.918 +# CONFIG_INPUT_MISC is not set
 666.919 +
 666.920 +#
 666.921 +# Hardware I/O ports
 666.922 +#
 666.923 +CONFIG_SERIO=y
 666.924 +CONFIG_SERIO_I8042=y
 666.925 +# CONFIG_SERIO_SERPORT is not set
 666.926 +# CONFIG_SERIO_CT82C710 is not set
 666.927 +# CONFIG_SERIO_PCIPS2 is not set
 666.928 +CONFIG_SERIO_LIBPS2=y
 666.929 +# CONFIG_SERIO_RAW is not set
 666.930 +# CONFIG_GAMEPORT is not set
 666.931 +
 666.932 +#
 666.933 +# Character devices
 666.934 +#
 666.935 +CONFIG_VT=y
 666.936 +CONFIG_VT_CONSOLE=y
 666.937 +CONFIG_HW_CONSOLE=y
 666.938 +# CONFIG_VT_HW_CONSOLE_BINDING is not set
 666.939 +# CONFIG_SERIAL_NONSTANDARD is not set
 666.940 +
 666.941 +#
 666.942 +# Serial drivers
 666.943 +#
 666.944 +CONFIG_SERIAL_8250=y
 666.945 +CONFIG_SERIAL_8250_CONSOLE=y
 666.946 +CONFIG_SERIAL_8250_PCI=y
 666.947 +CONFIG_SERIAL_8250_NR_UARTS=4
 666.948 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 666.949 +# CONFIG_SERIAL_8250_EXTENDED is not set
 666.950 +
 666.951 +#
 666.952 +# Non-8250 serial port support
 666.953 +#
 666.954 +CONFIG_SERIAL_CORE=y
 666.955 +CONFIG_SERIAL_CORE_CONSOLE=y
 666.956 +# CONFIG_SERIAL_JSM is not set
 666.957 +CONFIG_UNIX98_PTYS=y
 666.958 +CONFIG_LEGACY_PTYS=y
 666.959 +CONFIG_LEGACY_PTY_COUNT=256
 666.960 +
 666.961 +#
 666.962 +# IPMI
 666.963 +#
 666.964 +# CONFIG_IPMI_HANDLER is not set
 666.965 +
 666.966 +#
 666.967 +# Watchdog Cards
 666.968 +#
 666.969 +# CONFIG_WATCHDOG is not set
 666.970 +CONFIG_HW_RANDOM=y
 666.971 +CONFIG_HW_RANDOM_INTEL=y
 666.972 +CONFIG_HW_RANDOM_AMD=y
 666.973 +CONFIG_HW_RANDOM_GEODE=y
 666.974 +CONFIG_HW_RANDOM_VIA=y
 666.975 +# CONFIG_NVRAM is not set
 666.976 +CONFIG_RTC=y
 666.977 +# CONFIG_DTLK is not set
 666.978 +# CONFIG_R3964 is not set
 666.979 +# CONFIG_APPLICOM is not set
 666.980 +# CONFIG_SONYPI is not set
 666.981 +
 666.982 +#
 666.983 +# Ftape, the floppy tape device driver
 666.984 +#
 666.985 +# CONFIG_FTAPE is not set
 666.986 +CONFIG_AGP=y
 666.987 +# CONFIG_AGP_ALI is not set
 666.988 +# CONFIG_AGP_ATI is not set
 666.989 +# CONFIG_AGP_AMD is not set
 666.990 +CONFIG_AGP_AMD64=y
 666.991 +CONFIG_AGP_INTEL=y
 666.992 +# CONFIG_AGP_NVIDIA is not set
 666.993 +# CONFIG_AGP_SIS is not set
 666.994 +# CONFIG_AGP_SWORKS is not set
 666.995 +# CONFIG_AGP_VIA is not set
 666.996 +# CONFIG_AGP_EFFICEON is not set
 666.997 +# CONFIG_DRM is not set
 666.998 +# CONFIG_MWAVE is not set
 666.999 +# CONFIG_PC8736x_GPIO is not set
666.1000 +# CONFIG_NSC_GPIO is not set
666.1001 +# CONFIG_CS5535_GPIO is not set
666.1002 +CONFIG_RAW_DRIVER=y
666.1003 +CONFIG_MAX_RAW_DEVS=256
666.1004 +CONFIG_HPET=y
666.1005 +# CONFIG_HPET_RTC_IRQ is not set
666.1006 +CONFIG_HPET_MMAP=y
666.1007 +CONFIG_HANGCHECK_TIMER=y
666.1008 +
666.1009 +#
666.1010 +# TPM devices
666.1011 +#
666.1012 +# CONFIG_TCG_TPM is not set
666.1013 +# CONFIG_TELCLOCK is not set
666.1014 +
666.1015 +#
666.1016 +# I2C support
666.1017 +#
666.1018 +# CONFIG_I2C is not set
666.1019 +
666.1020 +#
666.1021 +# SPI support
666.1022 +#
666.1023 +# CONFIG_SPI is not set
666.1024 +# CONFIG_SPI_MASTER is not set
666.1025 +
666.1026 +#
666.1027 +# Dallas's 1-wire bus
666.1028 +#
666.1029 +# CONFIG_W1 is not set
666.1030 +
666.1031 +#
666.1032 +# Hardware Monitoring support
666.1033 +#
666.1034 +# CONFIG_HWMON is not set
666.1035 +# CONFIG_HWMON_VID is not set
666.1036 +
666.1037 +#
666.1038 +# Multimedia devices
666.1039 +#
666.1040 +# CONFIG_VIDEO_DEV is not set
666.1041 +
666.1042 +#
666.1043 +# Digital Video Broadcasting Devices
666.1044 +#
666.1045 +# CONFIG_DVB is not set
666.1046 +# CONFIG_USB_DABUSB is not set
666.1047 +
666.1048 +#
666.1049 +# Graphics support
666.1050 +#
666.1051 +CONFIG_FIRMWARE_EDID=y
666.1052 +# CONFIG_FB is not set
666.1053 +
666.1054 +#
666.1055 +# Console display driver support
666.1056 +#
666.1057 +CONFIG_VGA_CONSOLE=y
666.1058 +CONFIG_VGACON_SOFT_SCROLLBACK=y
666.1059 +CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=128
666.1060 +CONFIG_VIDEO_SELECT=y
666.1061 +CONFIG_DUMMY_CONSOLE=y
666.1062 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
666.1063 +
666.1064 +#
666.1065 +# Sound
666.1066 +#
666.1067 +CONFIG_SOUND=y
666.1068 +
666.1069 +#
666.1070 +# Advanced Linux Sound Architecture
666.1071 +#
666.1072 +# CONFIG_SND is not set
666.1073 +
666.1074 +#
666.1075 +# Open Sound System
666.1076 +#
666.1077 +CONFIG_SOUND_PRIME=y
666.1078 +CONFIG_OSS_OBSOLETE_DRIVER=y
666.1079 +# CONFIG_SOUND_BT878 is not set
666.1080 +# CONFIG_SOUND_EMU10K1 is not set
666.1081 +# CONFIG_SOUND_FUSION is not set
666.1082 +# CONFIG_SOUND_ES1371 is not set
666.1083 +CONFIG_SOUND_ICH=y
666.1084 +# CONFIG_SOUND_TRIDENT is not set
666.1085 +# CONFIG_SOUND_MSNDCLAS is not set
666.1086 +# CONFIG_SOUND_MSNDPIN is not set
666.1087 +# CONFIG_SOUND_VIA82CXXX is not set
666.1088 +# CONFIG_SOUND_OSS is not set
666.1089 +
666.1090 +#
666.1091 +# USB support
666.1092 +#
666.1093 +CONFIG_USB_ARCH_HAS_HCD=y
666.1094 +CONFIG_USB_ARCH_HAS_OHCI=y
666.1095 +CONFIG_USB_ARCH_HAS_EHCI=y
666.1096 +CONFIG_USB=y
666.1097 +# CONFIG_USB_DEBUG is not set
666.1098 +
666.1099 +#
666.1100 +# Miscellaneous USB options
666.1101 +#
666.1102 +CONFIG_USB_DEVICEFS=y
666.1103 +# CONFIG_USB_BANDWIDTH is not set
666.1104 +# CONFIG_USB_DYNAMIC_MINORS is not set
666.1105 +# CONFIG_USB_SUSPEND is not set
666.1106 +# CONFIG_USB_OTG is not set
666.1107 +
666.1108 +#
666.1109 +# USB Host Controller Drivers
666.1110 +#
666.1111 +CONFIG_USB_EHCI_HCD=y
666.1112 +# CONFIG_USB_EHCI_SPLIT_ISO is not set
666.1113 +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
666.1114 +# CONFIG_USB_EHCI_TT_NEWSCHED is not set
666.1115 +# CONFIG_USB_ISP116X_HCD is not set
666.1116 +CONFIG_USB_OHCI_HCD=y
666.1117 +# CONFIG_USB_OHCI_BIG_ENDIAN is not set
666.1118 +CONFIG_USB_OHCI_LITTLE_ENDIAN=y
666.1119 +CONFIG_USB_UHCI_HCD=y
666.1120 +# CONFIG_USB_SL811_HCD is not set
666.1121 +
666.1122 +#
666.1123 +# USB Device Class drivers
666.1124 +#
666.1125 +# CONFIG_USB_ACM is not set
666.1126 +CONFIG_USB_PRINTER=y
666.1127 +
666.1128 +#
666.1129 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
666.1130 +#
666.1131 +
666.1132 +#
666.1133 +# may also be needed; see USB_STORAGE Help for more information
666.1134 +#
666.1135 +CONFIG_USB_STORAGE=y
666.1136 +# CONFIG_USB_STORAGE_DEBUG is not set
666.1137 +# CONFIG_USB_STORAGE_DATAFAB is not set
666.1138 +# CONFIG_USB_STORAGE_FREECOM is not set
666.1139 +# CONFIG_USB_STORAGE_ISD200 is not set
666.1140 +# CONFIG_USB_STORAGE_DPCM is not set
666.1141 +# CONFIG_USB_STORAGE_USBAT is not set
666.1142 +# CONFIG_USB_STORAGE_SDDR09 is not set
666.1143 +# CONFIG_USB_STORAGE_SDDR55 is not set
666.1144 +# CONFIG_USB_STORAGE_JUMPSHOT is not set
666.1145 +# CONFIG_USB_STORAGE_ALAUDA is not set
666.1146 +# CONFIG_USB_STORAGE_KARMA is not set
666.1147 +# CONFIG_USB_LIBUSUAL is not set
666.1148 +
666.1149 +#
666.1150 +# USB Input Devices
666.1151 +#
666.1152 +CONFIG_USB_HID=y
666.1153 +CONFIG_USB_HIDINPUT=y
666.1154 +# CONFIG_USB_HIDINPUT_POWERBOOK is not set
666.1155 +# CONFIG_HID_FF is not set
666.1156 +# CONFIG_USB_HIDDEV is not set
666.1157 +# CONFIG_USB_AIPTEK is not set
666.1158 +# CONFIG_USB_WACOM is not set
666.1159 +# CONFIG_USB_ACECAD is not set
666.1160 +# CONFIG_USB_KBTAB is not set
666.1161 +# CONFIG_USB_POWERMATE is not set
666.1162 +# CONFIG_USB_TOUCHSCREEN is not set
666.1163 +# CONFIG_USB_YEALINK is not set
666.1164 +# CONFIG_USB_XPAD is not set
666.1165 +# CONFIG_USB_ATI_REMOTE is not set
666.1166 +# CONFIG_USB_ATI_REMOTE2 is not set
666.1167 +# CONFIG_USB_KEYSPAN_REMOTE is not set
666.1168 +# CONFIG_USB_APPLETOUCH is not set
666.1169 +
666.1170 +#
666.1171 +# USB Imaging devices
666.1172 +#
666.1173 +# CONFIG_USB_MDC800 is not set
666.1174 +# CONFIG_USB_MICROTEK is not set
666.1175 +
666.1176 +#
666.1177 +# USB Network Adapters
666.1178 +#
666.1179 +# CONFIG_USB_CATC is not set
666.1180 +# CONFIG_USB_KAWETH is not set
666.1181 +# CONFIG_USB_PEGASUS is not set
666.1182 +# CONFIG_USB_RTL8150 is not set
666.1183 +# CONFIG_USB_USBNET_MII is not set
666.1184 +# CONFIG_USB_USBNET is not set
666.1185 +CONFIG_USB_MON=y
666.1186 +
666.1187 +#
666.1188 +# USB port drivers
666.1189 +#
666.1190 +
666.1191 +#
666.1192 +# USB Serial Converter support
666.1193 +#
666.1194 +# CONFIG_USB_SERIAL is not set
666.1195 +
666.1196 +#
666.1197 +# USB Miscellaneous drivers
666.1198 +#
666.1199 +# CONFIG_USB_EMI62 is not set
666.1200 +# CONFIG_USB_EMI26 is not set
666.1201 +# CONFIG_USB_ADUTUX is not set
666.1202 +# CONFIG_USB_AUERSWALD is not set
666.1203 +# CONFIG_USB_RIO500 is not set
666.1204 +# CONFIG_USB_LEGOTOWER is not set
666.1205 +# CONFIG_USB_LCD is not set
666.1206 +# CONFIG_USB_LED is not set
666.1207 +# CONFIG_USB_CYPRESS_CY7C63 is not set
666.1208 +# CONFIG_USB_CYTHERM is not set
666.1209 +# CONFIG_USB_PHIDGET is not set
666.1210 +# CONFIG_USB_IDMOUSE is not set
666.1211 +# CONFIG_USB_FTDI_ELAN is not set
666.1212 +# CONFIG_USB_APPLEDISPLAY is not set
666.1213 +# CONFIG_USB_SISUSBVGA is not set
666.1214 +# CONFIG_USB_LD is not set
666.1215 +# CONFIG_USB_TRANCEVIBRATOR is not set
666.1216 +# CONFIG_USB_TEST is not set
666.1217 +
666.1218 +#
666.1219 +# USB DSL modem support
666.1220 +#
666.1221 +
666.1222 +#
666.1223 +# USB Gadget Support
666.1224 +#
666.1225 +# CONFIG_USB_GADGET is not set
666.1226 +
666.1227 +#
666.1228 +# MMC/SD Card support
666.1229 +#
666.1230 +# CONFIG_MMC is not set
666.1231 +
666.1232 +#
666.1233 +# LED devices
666.1234 +#
666.1235 +# CONFIG_NEW_LEDS is not set
666.1236 +
666.1237 +#
666.1238 +# LED drivers
666.1239 +#
666.1240 +
666.1241 +#
666.1242 +# LED Triggers
666.1243 +#
666.1244 +
666.1245 +#
666.1246 +# InfiniBand support
666.1247 +#
666.1248 +# CONFIG_INFINIBAND is not set
666.1249 +
666.1250 +#
666.1251 +# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
666.1252 +#
666.1253 +# CONFIG_EDAC is not set
666.1254 +
666.1255 +#
666.1256 +# Real Time Clock
666.1257 +#
666.1258 +# CONFIG_RTC_CLASS is not set
666.1259 +
666.1260 +#
666.1261 +# DMA Engine support
666.1262 +#
666.1263 +# CONFIG_DMA_ENGINE is not set
666.1264 +
666.1265 +#
666.1266 +# DMA Clients
666.1267 +#
666.1268 +
666.1269 +#
666.1270 +# DMA Devices
666.1271 +#
666.1272 +
666.1273 +#
666.1274 +# File systems
666.1275 +#
666.1276 +CONFIG_EXT2_FS=y
666.1277 +CONFIG_EXT2_FS_XATTR=y
666.1278 +CONFIG_EXT2_FS_POSIX_ACL=y
666.1279 +# CONFIG_EXT2_FS_SECURITY is not set
666.1280 +# CONFIG_EXT2_FS_XIP is not set
666.1281 +CONFIG_EXT3_FS=y
666.1282 +CONFIG_EXT3_FS_XATTR=y
666.1283 +CONFIG_EXT3_FS_POSIX_ACL=y
666.1284 +# CONFIG_EXT3_FS_SECURITY is not set
666.1285 +# CONFIG_EXT4DEV_FS is not set
666.1286 +CONFIG_JBD=y
666.1287 +# CONFIG_JBD_DEBUG is not set
666.1288 +CONFIG_FS_MBCACHE=y
666.1289 +CONFIG_REISERFS_FS=y
666.1290 +# CONFIG_REISERFS_CHECK is not set
666.1291 +# CONFIG_REISERFS_PROC_INFO is not set
666.1292 +CONFIG_REISERFS_FS_XATTR=y
666.1293 +CONFIG_REISERFS_FS_POSIX_ACL=y
666.1294 +# CONFIG_REISERFS_FS_SECURITY is not set
666.1295 +# CONFIG_JFS_FS is not set
666.1296 +CONFIG_FS_POSIX_ACL=y
666.1297 +# CONFIG_XFS_FS is not set
666.1298 +# CONFIG_GFS2_FS is not set
666.1299 +# CONFIG_OCFS2_FS is not set
666.1300 +# CONFIG_MINIX_FS is not set
666.1301 +# CONFIG_ROMFS_FS is not set
666.1302 +CONFIG_INOTIFY=y
666.1303 +CONFIG_INOTIFY_USER=y
666.1304 +# CONFIG_QUOTA is not set
666.1305 +CONFIG_DNOTIFY=y
666.1306 +# CONFIG_AUTOFS_FS is not set
666.1307 +CONFIG_AUTOFS4_FS=y
666.1308 +# CONFIG_FUSE_FS is not set
666.1309 +CONFIG_GENERIC_ACL=y
666.1310 +
666.1311 +#
666.1312 +# CD-ROM/DVD Filesystems
666.1313 +#
666.1314 +CONFIG_ISO9660_FS=y
666.1315 +# CONFIG_JOLIET is not set
666.1316 +# CONFIG_ZISOFS is not set
666.1317 +# CONFIG_UDF_FS is not set
666.1318 +
666.1319 +#
666.1320 +# DOS/FAT/NT Filesystems
666.1321 +#
666.1322 +CONFIG_FAT_FS=y
666.1323 +CONFIG_MSDOS_FS=y
666.1324 +CONFIG_VFAT_FS=y
666.1325 +CONFIG_FAT_DEFAULT_CODEPAGE=437
666.1326 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
666.1327 +# CONFIG_NTFS_FS is not set
666.1328 +
666.1329 +#
666.1330 +# Pseudo filesystems
666.1331 +#
666.1332 +CONFIG_PROC_FS=y
666.1333 +CONFIG_PROC_KCORE=y
666.1334 +CONFIG_PROC_SYSCTL=y
666.1335 +CONFIG_SYSFS=y
666.1336 +CONFIG_TMPFS=y
666.1337 +CONFIG_TMPFS_POSIX_ACL=y
666.1338 +CONFIG_HUGETLBFS=y
666.1339 +CONFIG_HUGETLB_PAGE=y
666.1340 +CONFIG_RAMFS=y
666.1341 +# CONFIG_CONFIGFS_FS is not set
666.1342 +
666.1343 +#
666.1344 +# Miscellaneous filesystems
666.1345 +#
666.1346 +# CONFIG_ADFS_FS is not set
666.1347 +# CONFIG_AFFS_FS is not set
666.1348 +# CONFIG_HFS_FS is not set
666.1349 +# CONFIG_HFSPLUS_FS is not set
666.1350 +# CONFIG_BEFS_FS is not set
666.1351 +# CONFIG_BFS_FS is not set
666.1352 +# CONFIG_EFS_FS is not set
666.1353 +# CONFIG_CRAMFS is not set
666.1354 +# CONFIG_VXFS_FS is not set
666.1355 +# CONFIG_HPFS_FS is not set
666.1356 +# CONFIG_QNX4FS_FS is not set
666.1357 +# CONFIG_SYSV_FS is not set
666.1358 +# CONFIG_UFS_FS is not set
666.1359 +
666.1360 +#
666.1361 +# Network File Systems
666.1362 +#
666.1363 +CONFIG_NFS_FS=y
666.1364 +CONFIG_NFS_V3=y
666.1365 +# CONFIG_NFS_V3_ACL is not set
666.1366 +# CONFIG_NFS_V4 is not set
666.1367 +# CONFIG_NFS_DIRECTIO is not set
666.1368 +CONFIG_NFSD=y
666.1369 +CONFIG_NFSD_V3=y
666.1370 +# CONFIG_NFSD_V3_ACL is not set
666.1371 +# CONFIG_NFSD_V4 is not set
666.1372 +CONFIG_NFSD_TCP=y
666.1373 +CONFIG_ROOT_NFS=y
666.1374 +CONFIG_LOCKD=y
666.1375 +CONFIG_LOCKD_V4=y
666.1376 +CONFIG_EXPORTFS=y
666.1377 +CONFIG_NFS_COMMON=y
666.1378 +CONFIG_SUNRPC=y
666.1379 +# CONFIG_RPCSEC_GSS_KRB5 is not set
666.1380 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
666.1381 +# CONFIG_SMB_FS is not set
666.1382 +# CONFIG_CIFS is not set
666.1383 +# CONFIG_NCP_FS is not set
666.1384 +# CONFIG_CODA_FS is not set
666.1385 +# CONFIG_AFS_FS is not set
666.1386 +# CONFIG_9P_FS is not set
666.1387 +
666.1388 +#
666.1389 +# Partition Types
666.1390 +#
666.1391 +# CONFIG_PARTITION_ADVANCED is not set
666.1392 +CONFIG_MSDOS_PARTITION=y
666.1393 +
666.1394 +#
666.1395 +# Native Language Support
666.1396 +#
666.1397 +CONFIG_NLS=y
666.1398 +CONFIG_NLS_DEFAULT="iso8859-1"
666.1399 +CONFIG_NLS_CODEPAGE_437=y
666.1400 +# CONFIG_NLS_CODEPAGE_737 is not set
666.1401 +# CONFIG_NLS_CODEPAGE_775 is not set
666.1402 +# CONFIG_NLS_CODEPAGE_850 is not set
666.1403 +# CONFIG_NLS_CODEPAGE_852 is not set
666.1404 +# CONFIG_NLS_CODEPAGE_855 is not set
666.1405 +# CONFIG_NLS_CODEPAGE_857 is not set
666.1406 +# CONFIG_NLS_CODEPAGE_860 is not set
666.1407 +# CONFIG_NLS_CODEPAGE_861 is not set
666.1408 +# CONFIG_NLS_CODEPAGE_862 is not set
666.1409 +# CONFIG_NLS_CODEPAGE_863 is not set
666.1410 +# CONFIG_NLS_CODEPAGE_864 is not set
666.1411 +# CONFIG_NLS_CODEPAGE_865 is not set
666.1412 +# CONFIG_NLS_CODEPAGE_866 is not set
666.1413 +# CONFIG_NLS_CODEPAGE_869 is not set
666.1414 +# CONFIG_NLS_CODEPAGE_936 is not set
666.1415 +# CONFIG_NLS_CODEPAGE_950 is not set
666.1416 +# CONFIG_NLS_CODEPAGE_932 is not set
666.1417 +# CONFIG_NLS_CODEPAGE_949 is not set
666.1418 +# CONFIG_NLS_CODEPAGE_874 is not set
666.1419 +# CONFIG_NLS_ISO8859_8 is not set
666.1420 +# CONFIG_NLS_CODEPAGE_1250 is not set
666.1421 +# CONFIG_NLS_CODEPAGE_1251 is not set
666.1422 +CONFIG_NLS_ASCII=y
666.1423 +CONFIG_NLS_ISO8859_1=y
666.1424 +# CONFIG_NLS_ISO8859_2 is not set
666.1425 +# CONFIG_NLS_ISO8859_3 is not set
666.1426 +# CONFIG_NLS_ISO8859_4 is not set
666.1427 +# CONFIG_NLS_ISO8859_5 is not set
666.1428 +# CONFIG_NLS_ISO8859_6 is not set
666.1429 +# CONFIG_NLS_ISO8859_7 is not set
666.1430 +# CONFIG_NLS_ISO8859_9 is not set
666.1431 +# CONFIG_NLS_ISO8859_13 is not set
666.1432 +# CONFIG_NLS_ISO8859_14 is not set
666.1433 +CONFIG_NLS_ISO8859_15=y
666.1434 +# CONFIG_NLS_KOI8_R is not set
666.1435 +# CONFIG_NLS_KOI8_U is not set
666.1436 +CONFIG_NLS_UTF8=y
666.1437 +
666.1438 +#
666.1439 +# Instrumentation Support
666.1440 +#
666.1441 +CONFIG_PROFILING=y
666.1442 +CONFIG_OPROFILE=y
666.1443 +CONFIG_KPROBES=y
666.1444 +
666.1445 +#
666.1446 +# Kernel hacking
666.1447 +#
666.1448 +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
666.1449 +# CONFIG_PRINTK_TIME is not set
666.1450 +# CONFIG_ENABLE_MUST_CHECK is not set
666.1451 +CONFIG_MAGIC_SYSRQ=y
666.1452 +CONFIG_UNUSED_SYMBOLS=y
666.1453 +CONFIG_DEBUG_KERNEL=y
666.1454 +CONFIG_LOG_BUF_SHIFT=18
666.1455 +CONFIG_DETECT_SOFTLOCKUP=y
666.1456 +# CONFIG_SCHEDSTATS is not set
666.1457 +# CONFIG_DEBUG_SLAB is not set
666.1458 +# CONFIG_DEBUG_RT_MUTEXES is not set
666.1459 +# CONFIG_RT_MUTEX_TESTER is not set
666.1460 +# CONFIG_DEBUG_SPINLOCK is not set
666.1461 +# CONFIG_DEBUG_MUTEXES is not set
666.1462 +# CONFIG_DEBUG_RWSEMS is not set
666.1463 +# CONFIG_DEBUG_LOCK_ALLOC is not set
666.1464 +# CONFIG_PROVE_LOCKING is not set
666.1465 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
666.1466 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
666.1467 +# CONFIG_DEBUG_KOBJECT is not set
666.1468 +# CONFIG_DEBUG_HIGHMEM is not set
666.1469 +CONFIG_DEBUG_BUGVERBOSE=y
666.1470 +# CONFIG_DEBUG_INFO is not set
666.1471 +# CONFIG_DEBUG_FS is not set
666.1472 +# CONFIG_DEBUG_VM is not set
666.1473 +# CONFIG_DEBUG_LIST is not set
666.1474 +# CONFIG_FRAME_POINTER is not set
666.1475 +CONFIG_UNWIND_INFO=y
666.1476 +CONFIG_STACK_UNWIND=y
666.1477 +# CONFIG_FORCED_INLINING is not set
666.1478 +# CONFIG_HEADERS_CHECK is not set
666.1479 +# CONFIG_RCU_TORTURE_TEST is not set
666.1480 +# CONFIG_LKDTM is not set
666.1481 +CONFIG_EARLY_PRINTK=y
666.1482 +CONFIG_DEBUG_STACKOVERFLOW=y
666.1483 +# CONFIG_DEBUG_STACK_USAGE is not set
666.1484 +# CONFIG_DEBUG_RODATA is not set
666.1485 +# CONFIG_4KSTACKS is not set
666.1486 +CONFIG_DOUBLEFAULT=y
666.1487 +
666.1488 +#
666.1489 +# Security options
666.1490 +#
666.1491 +# CONFIG_KEYS is not set
666.1492 +# CONFIG_SECURITY is not set
666.1493 +
666.1494 +#
666.1495 +# Cryptographic options
666.1496 +#
666.1497 +# CONFIG_CRYPTO is not set
666.1498 +
666.1499 +#
666.1500 +# Library routines
666.1501 +#
666.1502 +# CONFIG_CRC_CCITT is not set
666.1503 +# CONFIG_CRC16 is not set
666.1504 +CONFIG_CRC32=y
666.1505 +# CONFIG_LIBCRC32C is not set
666.1506 +CONFIG_ZLIB_INFLATE=y
666.1507 +CONFIG_PLIST=y
666.1508 +CONFIG_GENERIC_HARDIRQS=y
666.1509 +CONFIG_GENERIC_IRQ_PROBE=y
666.1510 +CONFIG_X86_BIOS_REBOOT=y
666.1511 +CONFIG_KTIME_SCALAR=y
   667.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   667.2 +++ b/samples/i586-geode-linux-uclibc/uClibc-0.9.28.1.config	Sat Feb 24 11:00:05 2007 +0000
   667.3 @@ -0,0 +1,172 @@
   667.4 +#
   667.5 +# Automatically generated make config: don't edit
   667.6 +#
   667.7 +# TARGET_alpha is not set
   667.8 +# TARGET_arm is not set
   667.9 +# TARGET_bfin is not set
  667.10 +# TARGET_cris is not set
  667.11 +# TARGET_e1 is not set
  667.12 +# TARGET_frv is not set
  667.13 +# TARGET_h8300 is not set
  667.14 +TARGET_i386=y
  667.15 +# TARGET_i960 is not set
  667.16 +# TARGET_m68k is not set
  667.17 +# TARGET_microblaze is not set
  667.18 +# TARGET_mips is not set
  667.19 +# TARGET_nios is not set
  667.20 +# TARGET_nios2 is not set
  667.21 +# TARGET_powerpc is not set
  667.22 +# TARGET_sh is not set
  667.23 +# TARGET_sh64 is not set
  667.24 +# TARGET_sparc is not set
  667.25 +# TARGET_v850 is not set
  667.26 +# TARGET_x86_64 is not set
  667.27 +
  667.28 +#
  667.29 +# Target Architecture Features and Options
  667.30 +#
  667.31 +HAVE_ELF=y
  667.32 +ARCH_SUPPORTS_LITTLE_ENDIAN=y
  667.33 +TARGET_ARCH="i386"
  667.34 +# CONFIG_GENERIC_386 is not set
  667.35 +# CONFIG_386 is not set
  667.36 +# CONFIG_486 is not set
  667.37 +# CONFIG_586 is not set
  667.38 +CONFIG_586MMX=y
  667.39 +# CONFIG_686 is not set
  667.40 +# CONFIG_PENTIUMII is not set
  667.41 +# CONFIG_PENTIUMIII is not set
  667.42 +# CONFIG_PENTIUM4 is not set
  667.43 +# CONFIG_K6 is not set
  667.44 +# CONFIG_K7 is not set
  667.45 +# CONFIG_ELAN is not set
  667.46 +# CONFIG_CRUSOE is not set
  667.47 +# CONFIG_WINCHIPC6 is not set
  667.48 +# CONFIG_WINCHIP2 is not set
  667.49 +# CONFIG_CYRIXIII is not set
  667.50 +# CONFIG_NEHEMIAH is not set
  667.51 +ARCH_LITTLE_ENDIAN=y
  667.52 +# ARCH_BIG_ENDIAN is not set
  667.53 +# ARCH_HAS_NO_MMU is not set
  667.54 +ARCH_HAS_MMU=y
  667.55 +UCLIBC_HAS_FLOATS=y
  667.56 +HAS_FPU=y
  667.57 +DO_C99_MATH=y
  667.58 +KERNEL_SOURCE="/usr/src/linux"
  667.59 +C_SYMBOL_PREFIX=""
  667.60 +HAVE_DOT_CONFIG=y
  667.61 +
  667.62 +#
  667.63 +# General Library Settings
  667.64 +#
  667.65 +# HAVE_NO_PIC is not set
  667.66 +DOPIC=y
  667.67 +# HAVE_NO_SHARED is not set
  667.68 +HAVE_SHARED=y
  667.69 +# ARCH_HAS_NO_LDSO is not set
  667.70 +BUILD_UCLIBC_LDSO=y
  667.71 +# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
  667.72 +LDSO_LDD_SUPPORT=y
  667.73 +LDSO_CACHE_SUPPORT=y
  667.74 +# LDSO_PRELOAD_FILE_SUPPORT is not set
  667.75 +LDSO_BASE_FILENAME="ld.so"
  667.76 +# LDSO_RUNPATH is not set
  667.77 +# DL_FINI_CRT_COMPAT is not set
  667.78 +UCLIBC_CTOR_DTOR=y
  667.79 +# HAS_NO_THREADS is not set
  667.80 +UCLIBC_HAS_THREADS=y
  667.81 +# PTHREADS_DEBUG_SUPPORT is not set
  667.82 +UCLIBC_HAS_LFS=y
  667.83 +UCLIBC_STATIC_LDCONFIG=y
  667.84 +# MALLOC is not set
  667.85 +# MALLOC_SIMPLE is not set
  667.86 +MALLOC_STANDARD=y
  667.87 +# MALLOC_GLIBC_COMPAT is not set
  667.88 +UCLIBC_DYNAMIC_ATEXIT=y
  667.89 +HAS_SHADOW=y
  667.90 +UNIX98PTY_ONLY=y
  667.91 +ASSUME_DEVPTS=y
  667.92 +UCLIBC_HAS_TM_EXTENSIONS=y
  667.93 +UCLIBC_HAS_TZ_CACHING=y
  667.94 +UCLIBC_HAS_TZ_FILE=y
  667.95 +UCLIBC_HAS_TZ_FILE_READ_MANY=y
  667.96 +UCLIBC_TZ_FILE_PATH="/etc/TZ"
  667.97 +
  667.98 +#
  667.99 +# Networking Support
 667.100 +#
 667.101 +# UCLIBC_HAS_IPV6 is not set
 667.102 +UCLIBC_HAS_RPC=y
 667.103 +UCLIBC_HAS_FULL_RPC=y
 667.104 +
 667.105 +#
 667.106 +# String and Stdio Support
 667.107 +#
 667.108 +UCLIBC_HAS_STRING_GENERIC_OPT=y
 667.109 +UCLIBC_HAS_STRING_ARCH_OPT=y
 667.110 +UCLIBC_HAS_CTYPE_TABLES=y
 667.111 +UCLIBC_HAS_CTYPE_SIGNED=y
 667.112 +UCLIBC_HAS_CTYPE_UNSAFE=y
 667.113 +# UCLIBC_HAS_CTYPE_CHECKED is not set
 667.114 +# UCLIBC_HAS_CTYPE_ENFORCED is not set
 667.115 +UCLIBC_HAS_WCHAR=y
 667.116 +# UCLIBC_HAS_LOCALE is not set
 667.117 +UCLIBC_HAS_HEXADECIMAL_FLOATS=y
 667.118 +UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
 667.119 +UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
 667.120 +# UCLIBC_HAS_SCANF_GLIBC_A_FLAG is not set
 667.121 +# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
 667.122 +# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
 667.123 +# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
 667.124 +# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
 667.125 +# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
 667.126 +UCLIBC_HAS_STDIO_BUFSIZ_4096=y
 667.127 +# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
 667.128 +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE is not set
 667.129 +UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4=y
 667.130 +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
 667.131 +# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
 667.132 +UCLIBC_HAS_STDIO_GETC_MACRO=y
 667.133 +UCLIBC_HAS_STDIO_PUTC_MACRO=y
 667.134 +UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
 667.135 +# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
 667.136 +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
 667.137 +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
 667.138 +UCLIBC_HAS_PRINTF_M_SPEC=y
 667.139 +UCLIBC_HAS_ERRNO_MESSAGES=y
 667.140 +# UCLIBC_HAS_SYS_ERRLIST is not set
 667.141 +UCLIBC_HAS_SIGNUM_MESSAGES=y
 667.142 +# UCLIBC_HAS_SYS_SIGLIST is not set
 667.143 +UCLIBC_HAS_GNU_GETOPT=y
 667.144 +
 667.145 +#
 667.146 +# Big and Tall
 667.147 +#
 667.148 +UCLIBC_HAS_REGEX=y
 667.149 +UCLIBC_HAS_WORDEXP=y
 667.150 +UCLIBC_HAS_FTW=y
 667.151 +UCLIBC_HAS_GLOB=y
 667.152 +
 667.153 +#
 667.154 +# Library Installation Options
 667.155 +#
 667.156 +SHARED_LIB_LOADER_PREFIX="$(DEVEL_PREFIX)/lib"
 667.157 +RUNTIME_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/"
 667.158 +DEVEL_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/usr/"
 667.159 +
 667.160 +#
 667.161 +# uClibc security related options
 667.162 +#
 667.163 +# UCLIBC_SECURITY is not set
 667.164 +
 667.165 +#
 667.166 +# uClibc development/debugging options
 667.167 +#
 667.168 +CROSS_COMPILER_PREFIX=""
 667.169 +# DODEBUG is not set
 667.170 +# DODEBUG_PT is not set
 667.171 +# DOASSERTS is not set
 667.172 +# SUPPORT_LD_DEBUG is not set
 667.173 +# SUPPORT_LD_DEBUG_EARLY is not set
 667.174 +WARNINGS="-Wall"
 667.175 +# UCLIBC_MJN3_ONLY is not set
   668.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   668.2 +++ b/samples/i686-unknown-linux-uclibc/linux-2.6.19.2.config	Sat Feb 24 11:00:05 2007 +0000
   668.3 @@ -0,0 +1,1508 @@
   668.4 +#
   668.5 +# Automatically generated make config: don't edit
   668.6 +# Linux kernel version: 2.6.19.2
   668.7 +# Wed Jan 31 21:35:53 2007
   668.8 +#
   668.9 +CONFIG_X86_32=y
  668.10 +CONFIG_GENERIC_TIME=y
  668.11 +CONFIG_LOCKDEP_SUPPORT=y
  668.12 +CONFIG_STACKTRACE_SUPPORT=y
  668.13 +CONFIG_SEMAPHORE_SLEEPERS=y
  668.14 +CONFIG_X86=y
  668.15 +CONFIG_MMU=y
  668.16 +CONFIG_GENERIC_ISA_DMA=y
  668.17 +CONFIG_GENERIC_IOMAP=y
  668.18 +CONFIG_GENERIC_HWEIGHT=y
  668.19 +CONFIG_ARCH_MAY_HAVE_PC_FDC=y
  668.20 +CONFIG_DMI=y
  668.21 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
  668.22 +
  668.23 +#
  668.24 +# Code maturity level options
  668.25 +#
  668.26 +CONFIG_EXPERIMENTAL=y
  668.27 +CONFIG_BROKEN_ON_SMP=y
  668.28 +CONFIG_INIT_ENV_ARG_LIMIT=32
  668.29 +
  668.30 +#
  668.31 +# General setup
  668.32 +#
  668.33 +CONFIG_LOCALVERSION=""
  668.34 +CONFIG_LOCALVERSION_AUTO=y
  668.35 +CONFIG_SWAP=y
  668.36 +CONFIG_SYSVIPC=y
  668.37 +# CONFIG_IPC_NS is not set
  668.38 +CONFIG_POSIX_MQUEUE=y
  668.39 +# CONFIG_BSD_PROCESS_ACCT is not set
  668.40 +# CONFIG_TASKSTATS is not set
  668.41 +# CONFIG_UTS_NS is not set
  668.42 +# CONFIG_AUDIT is not set
  668.43 +CONFIG_IKCONFIG=y
  668.44 +CONFIG_IKCONFIG_PROC=y
  668.45 +# CONFIG_RELAY is not set
  668.46 +CONFIG_INITRAMFS_SOURCE=""
  668.47 +CONFIG_CC_OPTIMIZE_FOR_SIZE=y
  668.48 +CONFIG_SYSCTL=y
  668.49 +# CONFIG_EMBEDDED is not set
  668.50 +CONFIG_UID16=y
  668.51 +CONFIG_SYSCTL_SYSCALL=y
  668.52 +CONFIG_KALLSYMS=y
  668.53 +CONFIG_KALLSYMS_ALL=y
  668.54 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
  668.55 +CONFIG_HOTPLUG=y
  668.56 +CONFIG_PRINTK=y
  668.57 +CONFIG_BUG=y
  668.58 +CONFIG_ELF_CORE=y
  668.59 +CONFIG_BASE_FULL=y
  668.60 +CONFIG_FUTEX=y
  668.61 +CONFIG_EPOLL=y
  668.62 +CONFIG_SHMEM=y
  668.63 +CONFIG_SLAB=y
  668.64 +CONFIG_VM_EVENT_COUNTERS=y
  668.65 +CONFIG_RT_MUTEXES=y
  668.66 +# CONFIG_TINY_SHMEM is not set
  668.67 +CONFIG_BASE_SMALL=0
  668.68 +# CONFIG_SLOB is not set
  668.69 +
  668.70 +#
  668.71 +# Loadable module support
  668.72 +#
  668.73 +CONFIG_MODULES=y
  668.74 +CONFIG_MODULE_UNLOAD=y
  668.75 +CONFIG_MODULE_FORCE_UNLOAD=y
  668.76 +# CONFIG_MODVERSIONS is not set
  668.77 +# CONFIG_MODULE_SRCVERSION_ALL is not set
  668.78 +# CONFIG_KMOD is not set
  668.79 +
  668.80 +#
  668.81 +# Block layer
  668.82 +#
  668.83 +CONFIG_BLOCK=y
  668.84 +CONFIG_LBD=y
  668.85 +# CONFIG_BLK_DEV_IO_TRACE is not set
  668.86 +# CONFIG_LSF is not set
  668.87 +
  668.88 +#
  668.89 +# IO Schedulers
  668.90 +#
  668.91 +CONFIG_IOSCHED_NOOP=y
  668.92 +CONFIG_IOSCHED_AS=y
  668.93 +CONFIG_IOSCHED_DEADLINE=y
  668.94 +CONFIG_IOSCHED_CFQ=y
  668.95 +CONFIG_DEFAULT_AS=y
  668.96 +# CONFIG_DEFAULT_DEADLINE is not set
  668.97 +# CONFIG_DEFAULT_CFQ is not set
  668.98 +# CONFIG_DEFAULT_NOOP is not set
  668.99 +CONFIG_DEFAULT_IOSCHED="anticipatory"
 668.100 +
 668.101 +#
 668.102 +# Processor type and features
 668.103 +#
 668.104 +# CONFIG_SMP is not set
 668.105 +CONFIG_X86_PC=y
 668.106 +# CONFIG_X86_ELAN is not set
 668.107 +# CONFIG_X86_VOYAGER is not set
 668.108 +# CONFIG_X86_NUMAQ is not set
 668.109 +# CONFIG_X86_SUMMIT is not set
 668.110 +# CONFIG_X86_BIGSMP is not set
 668.111 +# CONFIG_X86_VISWS is not set
 668.112 +# CONFIG_X86_GENERICARCH is not set
 668.113 +# CONFIG_X86_ES7000 is not set
 668.114 +# CONFIG_M386 is not set
 668.115 +# CONFIG_M486 is not set
 668.116 +# CONFIG_M586 is not set
 668.117 +# CONFIG_M586TSC is not set
 668.118 +# CONFIG_M586MMX is not set
 668.119 +# CONFIG_M686 is not set
 668.120 +# CONFIG_MPENTIUMII is not set
 668.121 +# CONFIG_MPENTIUMIII is not set
 668.122 +# CONFIG_MPENTIUMM is not set
 668.123 +# CONFIG_MPENTIUM4 is not set
 668.124 +# CONFIG_MK6 is not set
 668.125 +# CONFIG_MK7 is not set
 668.126 +# CONFIG_MK8 is not set
 668.127 +# CONFIG_MCRUSOE is not set
 668.128 +# CONFIG_MEFFICEON is not set
 668.129 +# CONFIG_MWINCHIPC6 is not set
 668.130 +# CONFIG_MWINCHIP2 is not set
 668.131 +# CONFIG_MWINCHIP3D is not set
 668.132 +CONFIG_MGEODEGX1=y
 668.133 +# CONFIG_MGEODE_LX is not set
 668.134 +# CONFIG_MCYRIXIII is not set
 668.135 +# CONFIG_MVIAC3_2 is not set
 668.136 +# CONFIG_X86_GENERIC is not set
 668.137 +CONFIG_X86_CMPXCHG=y
 668.138 +CONFIG_X86_XADD=y
 668.139 +CONFIG_X86_L1_CACHE_SHIFT=4
 668.140 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 668.141 +CONFIG_GENERIC_CALIBRATE_DELAY=y
 668.142 +CONFIG_X86_PPRO_FENCE=y
 668.143 +CONFIG_X86_WP_WORKS_OK=y
 668.144 +CONFIG_X86_INVLPG=y
 668.145 +CONFIG_X86_BSWAP=y
 668.146 +CONFIG_X86_POPAD_OK=y
 668.147 +CONFIG_X86_CMPXCHG64=y
 668.148 +CONFIG_X86_ALIGNMENT_16=y
 668.149 +CONFIG_X86_TSC=y
 668.150 +# CONFIG_HPET_TIMER is not set
 668.151 +# CONFIG_PREEMPT_NONE is not set
 668.152 +CONFIG_PREEMPT_VOLUNTARY=y
 668.153 +# CONFIG_PREEMPT is not set
 668.154 +# CONFIG_X86_UP_APIC is not set
 668.155 +CONFIG_X86_MCE=y
 668.156 +CONFIG_X86_MCE_NONFATAL=y
 668.157 +CONFIG_VM86=y
 668.158 +# CONFIG_TOSHIBA is not set
 668.159 +# CONFIG_I8K is not set
 668.160 +# CONFIG_X86_REBOOTFIXUPS is not set
 668.161 +CONFIG_MICROCODE=y
 668.162 +CONFIG_MICROCODE_OLD_INTERFACE=y
 668.163 +CONFIG_X86_MSR=y
 668.164 +CONFIG_X86_CPUID=y
 668.165 +
 668.166 +#
 668.167 +# Firmware Drivers
 668.168 +#
 668.169 +# CONFIG_EDD is not set
 668.170 +# CONFIG_DELL_RBU is not set
 668.171 +# CONFIG_DCDBAS is not set
 668.172 +# CONFIG_NOHIGHMEM is not set
 668.173 +CONFIG_HIGHMEM4G=y
 668.174 +# CONFIG_HIGHMEM64G is not set
 668.175 +CONFIG_PAGE_OFFSET=0xC0000000
 668.176 +CONFIG_HIGHMEM=y
 668.177 +CONFIG_ARCH_FLATMEM_ENABLE=y
 668.178 +CONFIG_ARCH_SPARSEMEM_ENABLE=y
 668.179 +CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 668.180 +CONFIG_ARCH_POPULATES_NODE_MAP=y
 668.181 +CONFIG_SELECT_MEMORY_MODEL=y
 668.182 +CONFIG_FLATMEM_MANUAL=y
 668.183 +# CONFIG_DISCONTIGMEM_MANUAL is not set
 668.184 +# CONFIG_SPARSEMEM_MANUAL is not set
 668.185 +CONFIG_FLATMEM=y
 668.186 +CONFIG_FLAT_NODE_MEM_MAP=y
 668.187 +CONFIG_SPARSEMEM_STATIC=y
 668.188 +CONFIG_SPLIT_PTLOCK_CPUS=4
 668.189 +CONFIG_RESOURCES_64BIT=y
 668.190 +# CONFIG_HIGHPTE is not set
 668.191 +# CONFIG_MATH_EMULATION is not set
 668.192 +CONFIG_MTRR=y
 668.193 +# CONFIG_EFI is not set
 668.194 +CONFIG_REGPARM=y
 668.195 +CONFIG_SECCOMP=y
 668.196 +# CONFIG_HZ_100 is not set
 668.197 +CONFIG_HZ_250=y
 668.198 +# CONFIG_HZ_1000 is not set
 668.199 +CONFIG_HZ=250
 668.200 +# CONFIG_KEXEC is not set
 668.201 +# CONFIG_CRASH_DUMP is not set
 668.202 +CONFIG_PHYSICAL_START=0x100000
 668.203 +CONFIG_COMPAT_VDSO=y
 668.204 +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 668.205 +
 668.206 +#
 668.207 +# Power management options (ACPI, APM)
 668.208 +#
 668.209 +CONFIG_PM=y
 668.210 +CONFIG_PM_LEGACY=y
 668.211 +# CONFIG_PM_DEBUG is not set
 668.212 +CONFIG_PM_SYSFS_DEPRECATED=y
 668.213 +# CONFIG_SOFTWARE_SUSPEND is not set
 668.214 +
 668.215 +#
 668.216 +# ACPI (Advanced Configuration and Power Interface) Support
 668.217 +#
 668.218 +CONFIG_ACPI=y
 668.219 +CONFIG_ACPI_SLEEP=y
 668.220 +CONFIG_ACPI_SLEEP_PROC_FS=y
 668.221 +# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
 668.222 +CONFIG_ACPI_AC=y
 668.223 +CONFIG_ACPI_BATTERY=y
 668.224 +CONFIG_ACPI_BUTTON=y
 668.225 +# CONFIG_ACPI_VIDEO is not set
 668.226 +# CONFIG_ACPI_HOTKEY is not set
 668.227 +CONFIG_ACPI_FAN=y
 668.228 +# CONFIG_ACPI_DOCK is not set
 668.229 +CONFIG_ACPI_PROCESSOR=y
 668.230 +CONFIG_ACPI_THERMAL=y
 668.231 +# CONFIG_ACPI_ASUS is not set
 668.232 +# CONFIG_ACPI_IBM is not set
 668.233 +# CONFIG_ACPI_TOSHIBA is not set
 668.234 +CONFIG_ACPI_BLACKLIST_YEAR=2001
 668.235 +CONFIG_ACPI_DEBUG=y
 668.236 +CONFIG_ACPI_EC=y
 668.237 +CONFIG_ACPI_POWER=y
 668.238 +CONFIG_ACPI_SYSTEM=y
 668.239 +CONFIG_X86_PM_TIMER=y
 668.240 +# CONFIG_ACPI_CONTAINER is not set
 668.241 +
 668.242 +#
 668.243 +# APM (Advanced Power Management) BIOS Support
 668.244 +#
 668.245 +# CONFIG_APM is not set
 668.246 +
 668.247 +#
 668.248 +# CPU Frequency scaling
 668.249 +#
 668.250 +CONFIG_CPU_FREQ=y
 668.251 +CONFIG_CPU_FREQ_TABLE=y
 668.252 +CONFIG_CPU_FREQ_DEBUG=y
 668.253 +CONFIG_CPU_FREQ_STAT=y
 668.254 +# CONFIG_CPU_FREQ_STAT_DETAILS is not set
 668.255 +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
 668.256 +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
 668.257 +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
 668.258 +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
 668.259 +CONFIG_CPU_FREQ_GOV_USERSPACE=y
 668.260 +CONFIG_CPU_FREQ_GOV_ONDEMAND=y
 668.261 +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
 668.262 +
 668.263 +#
 668.264 +# CPUFreq processor drivers
 668.265 +#
 668.266 +CONFIG_X86_ACPI_CPUFREQ=y
 668.267 +# CONFIG_X86_POWERNOW_K6 is not set
 668.268 +# CONFIG_X86_POWERNOW_K7 is not set
 668.269 +CONFIG_X86_POWERNOW_K8=y
 668.270 +CONFIG_X86_POWERNOW_K8_ACPI=y
 668.271 +# CONFIG_X86_GX_SUSPMOD is not set
 668.272 +# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
 668.273 +# CONFIG_X86_SPEEDSTEP_ICH is not set
 668.274 +# CONFIG_X86_SPEEDSTEP_SMI is not set
 668.275 +# CONFIG_X86_P4_CLOCKMOD is not set
 668.276 +# CONFIG_X86_CPUFREQ_NFORCE2 is not set
 668.277 +# CONFIG_X86_LONGRUN is not set
 668.278 +# CONFIG_X86_LONGHAUL is not set
 668.279 +
 668.280 +#
 668.281 +# shared options
 668.282 +#
 668.283 +CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y
 668.284 +# CONFIG_X86_SPEEDSTEP_LIB is not set
 668.285 +
 668.286 +#
 668.287 +# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
 668.288 +#
 668.289 +CONFIG_PCI=y
 668.290 +# CONFIG_PCI_GOBIOS is not set
 668.291 +# CONFIG_PCI_GOMMCONFIG is not set
 668.292 +# CONFIG_PCI_GODIRECT is not set
 668.293 +CONFIG_PCI_GOANY=y
 668.294 +CONFIG_PCI_BIOS=y
 668.295 +CONFIG_PCI_DIRECT=y
 668.296 +CONFIG_PCI_MMCONFIG=y
 668.297 +# CONFIG_PCIEPORTBUS is not set
 668.298 +# CONFIG_PCI_DEBUG is not set
 668.299 +CONFIG_ISA_DMA_API=y
 668.300 +# CONFIG_ISA is not set
 668.301 +# CONFIG_MCA is not set
 668.302 +# CONFIG_SCx200 is not set
 668.303 +CONFIG_K8_NB=y
 668.304 +
 668.305 +#
 668.306 +# PCCARD (PCMCIA/CardBus) support
 668.307 +#
 668.308 +# CONFIG_PCCARD is not set
 668.309 +
 668.310 +#
 668.311 +# PCI Hotplug Support
 668.312 +#
 668.313 +# CONFIG_HOTPLUG_PCI is not set
 668.314 +
 668.315 +#
 668.316 +# Executable file formats
 668.317 +#
 668.318 +CONFIG_BINFMT_ELF=y
 668.319 +# CONFIG_BINFMT_AOUT is not set
 668.320 +# CONFIG_BINFMT_MISC is not set
 668.321 +
 668.322 +#
 668.323 +# Networking
 668.324 +#
 668.325 +CONFIG_NET=y
 668.326 +
 668.327 +#
 668.328 +# Networking options
 668.329 +#
 668.330 +# CONFIG_NETDEBUG is not set
 668.331 +CONFIG_PACKET=y
 668.332 +# CONFIG_PACKET_MMAP is not set
 668.333 +CONFIG_UNIX=y
 668.334 +CONFIG_XFRM=y
 668.335 +# CONFIG_XFRM_USER is not set
 668.336 +# CONFIG_XFRM_SUB_POLICY is not set
 668.337 +# CONFIG_NET_KEY is not set
 668.338 +CONFIG_INET=y
 668.339 +CONFIG_IP_MULTICAST=y
 668.340 +# CONFIG_IP_ADVANCED_ROUTER is not set
 668.341 +CONFIG_IP_FIB_HASH=y
 668.342 +CONFIG_IP_PNP=y
 668.343 +CONFIG_IP_PNP_DHCP=y
 668.344 +# CONFIG_IP_PNP_BOOTP is not set
 668.345 +# CONFIG_IP_PNP_RARP is not set
 668.346 +# CONFIG_NET_IPIP is not set
 668.347 +# CONFIG_NET_IPGRE is not set
 668.348 +# CONFIG_IP_MROUTE is not set
 668.349 +# CONFIG_ARPD is not set
 668.350 +# CONFIG_SYN_COOKIES is not set
 668.351 +# CONFIG_INET_AH is not set
 668.352 +# CONFIG_INET_ESP is not set
 668.353 +# CONFIG_INET_IPCOMP is not set
 668.354 +# CONFIG_INET_XFRM_TUNNEL is not set
 668.355 +# CONFIG_INET_TUNNEL is not set
 668.356 +CONFIG_INET_XFRM_MODE_TRANSPORT=y
 668.357 +CONFIG_INET_XFRM_MODE_TUNNEL=y
 668.358 +# CONFIG_INET_XFRM_MODE_BEET is not set
 668.359 +CONFIG_INET_DIAG=y
 668.360 +CONFIG_INET_TCP_DIAG=y
 668.361 +# CONFIG_TCP_CONG_ADVANCED is not set
 668.362 +CONFIG_TCP_CONG_CUBIC=y
 668.363 +CONFIG_DEFAULT_TCP_CONG="cubic"
 668.364 +CONFIG_IPV6=y
 668.365 +# CONFIG_IPV6_PRIVACY is not set
 668.366 +# CONFIG_IPV6_ROUTER_PREF is not set
 668.367 +# CONFIG_INET6_AH is not set
 668.368 +# CONFIG_INET6_ESP is not set
 668.369 +# CONFIG_INET6_IPCOMP is not set
 668.370 +# CONFIG_IPV6_MIP6 is not set
 668.371 +# CONFIG_INET6_XFRM_TUNNEL is not set
 668.372 +# CONFIG_INET6_TUNNEL is not set
 668.373 +CONFIG_INET6_XFRM_MODE_TRANSPORT=y
 668.374 +CONFIG_INET6_XFRM_MODE_TUNNEL=y
 668.375 +# CONFIG_INET6_XFRM_MODE_BEET is not set
 668.376 +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
 668.377 +CONFIG_IPV6_SIT=y
 668.378 +# CONFIG_IPV6_TUNNEL is not set
 668.379 +# CONFIG_IPV6_MULTIPLE_TABLES is not set
 668.380 +# CONFIG_NETWORK_SECMARK is not set
 668.381 +# CONFIG_NETFILTER is not set
 668.382 +
 668.383 +#
 668.384 +# DCCP Configuration (EXPERIMENTAL)
 668.385 +#
 668.386 +# CONFIG_IP_DCCP is not set
 668.387 +
 668.388 +#
 668.389 +# SCTP Configuration (EXPERIMENTAL)
 668.390 +#
 668.391 +# CONFIG_IP_SCTP is not set
 668.392 +
 668.393 +#
 668.394 +# TIPC Configuration (EXPERIMENTAL)
 668.395 +#
 668.396 +# CONFIG_TIPC is not set
 668.397 +# CONFIG_ATM is not set
 668.398 +# CONFIG_BRIDGE is not set
 668.399 +# CONFIG_VLAN_8021Q is not set
 668.400 +# CONFIG_DECNET is not set
 668.401 +# CONFIG_LLC2 is not set
 668.402 +# CONFIG_IPX is not set
 668.403 +# CONFIG_ATALK is not set
 668.404 +# CONFIG_X25 is not set
 668.405 +# CONFIG_LAPB is not set
 668.406 +# CONFIG_ECONET is not set
 668.407 +# CONFIG_WAN_ROUTER is not set
 668.408 +
 668.409 +#
 668.410 +# QoS and/or fair queueing
 668.411 +#
 668.412 +# CONFIG_NET_SCHED is not set
 668.413 +
 668.414 +#
 668.415 +# Network testing
 668.416 +#
 668.417 +# CONFIG_NET_PKTGEN is not set
 668.418 +# CONFIG_NET_TCPPROBE is not set
 668.419 +# CONFIG_HAMRADIO is not set
 668.420 +# CONFIG_IRDA is not set
 668.421 +# CONFIG_BT is not set
 668.422 +# CONFIG_IEEE80211 is not set
 668.423 +
 668.424 +#
 668.425 +# Device Drivers
 668.426 +#
 668.427 +
 668.428 +#
 668.429 +# Generic Driver Options
 668.430 +#
 668.431 +CONFIG_STANDALONE=y
 668.432 +CONFIG_PREVENT_FIRMWARE_BUILD=y
 668.433 +CONFIG_FW_LOADER=y
 668.434 +# CONFIG_DEBUG_DRIVER is not set
 668.435 +# CONFIG_SYS_HYPERVISOR is not set
 668.436 +
 668.437 +#
 668.438 +# Connector - unified userspace <-> kernelspace linker
 668.439 +#
 668.440 +# CONFIG_CONNECTOR is not set
 668.441 +
 668.442 +#
 668.443 +# Memory Technology Devices (MTD)
 668.444 +#
 668.445 +# CONFIG_MTD is not set
 668.446 +
 668.447 +#
 668.448 +# Parallel port support
 668.449 +#
 668.450 +# CONFIG_PARPORT is not set
 668.451 +
 668.452 +#
 668.453 +# Plug and Play support
 668.454 +#
 668.455 +# CONFIG_PNP is not set
 668.456 +
 668.457 +#
 668.458 +# Block devices
 668.459 +#
 668.460 +CONFIG_BLK_DEV_FD=y
 668.461 +# CONFIG_BLK_CPQ_DA is not set
 668.462 +# CONFIG_BLK_CPQ_CISS_DA is not set
 668.463 +# CONFIG_BLK_DEV_DAC960 is not set
 668.464 +# CONFIG_BLK_DEV_UMEM is not set
 668.465 +# CONFIG_BLK_DEV_COW_COMMON is not set
 668.466 +CONFIG_BLK_DEV_LOOP=y
 668.467 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
 668.468 +# CONFIG_BLK_DEV_NBD is not set
 668.469 +# CONFIG_BLK_DEV_SX8 is not set
 668.470 +# CONFIG_BLK_DEV_UB is not set
 668.471 +CONFIG_BLK_DEV_RAM=y
 668.472 +CONFIG_BLK_DEV_RAM_COUNT=16
 668.473 +CONFIG_BLK_DEV_RAM_SIZE=4096
 668.474 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 668.475 +CONFIG_BLK_DEV_INITRD=y
 668.476 +# CONFIG_CDROM_PKTCDVD is not set
 668.477 +# CONFIG_ATA_OVER_ETH is not set
 668.478 +
 668.479 +#
 668.480 +# Misc devices
 668.481 +#
 668.482 +# CONFIG_IBM_ASM is not set
 668.483 +# CONFIG_SGI_IOC4 is not set
 668.484 +# CONFIG_TIFM_CORE is not set
 668.485 +
 668.486 +#
 668.487 +# ATA/ATAPI/MFM/RLL support
 668.488 +#
 668.489 +CONFIG_IDE=y
 668.490 +CONFIG_BLK_DEV_IDE=y
 668.491 +
 668.492 +#
 668.493 +# Please see Documentation/ide.txt for help/info on IDE drives
 668.494 +#
 668.495 +# CONFIG_BLK_DEV_IDE_SATA is not set
 668.496 +# CONFIG_BLK_DEV_HD_IDE is not set
 668.497 +CONFIG_BLK_DEV_IDEDISK=y
 668.498 +CONFIG_IDEDISK_MULTI_MODE=y
 668.499 +CONFIG_BLK_DEV_IDECD=y
 668.500 +# CONFIG_BLK_DEV_IDETAPE is not set
 668.501 +# CONFIG_BLK_DEV_IDEFLOPPY is not set
 668.502 +# CONFIG_BLK_DEV_IDESCSI is not set
 668.503 +# CONFIG_IDE_TASK_IOCTL is not set
 668.504 +
 668.505 +#
 668.506 +# IDE chipset support/bugfixes
 668.507 +#
 668.508 +CONFIG_IDE_GENERIC=y
 668.509 +# CONFIG_BLK_DEV_CMD640 is not set
 668.510 +CONFIG_BLK_DEV_IDEPCI=y
 668.511 +# CONFIG_IDEPCI_SHARE_IRQ is not set
 668.512 +# CONFIG_BLK_DEV_OFFBOARD is not set
 668.513 +# CONFIG_BLK_DEV_GENERIC is not set
 668.514 +# CONFIG_BLK_DEV_OPTI621 is not set
 668.515 +# CONFIG_BLK_DEV_RZ1000 is not set
 668.516 +CONFIG_BLK_DEV_IDEDMA_PCI=y
 668.517 +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
 668.518 +CONFIG_IDEDMA_PCI_AUTO=y
 668.519 +# CONFIG_IDEDMA_ONLYDISK is not set
 668.520 +# CONFIG_BLK_DEV_AEC62XX is not set
 668.521 +# CONFIG_BLK_DEV_ALI15X3 is not set
 668.522 +CONFIG_BLK_DEV_AMD74XX=y
 668.523 +# CONFIG_BLK_DEV_ATIIXP is not set
 668.524 +# CONFIG_BLK_DEV_CMD64X is not set
 668.525 +# CONFIG_BLK_DEV_TRIFLEX is not set
 668.526 +# CONFIG_BLK_DEV_CY82C693 is not set
 668.527 +# CONFIG_BLK_DEV_CS5520 is not set
 668.528 +# CONFIG_BLK_DEV_CS5530 is not set
 668.529 +# CONFIG_BLK_DEV_CS5535 is not set
 668.530 +# CONFIG_BLK_DEV_HPT34X is not set
 668.531 +# CONFIG_BLK_DEV_HPT366 is not set
 668.532 +# CONFIG_BLK_DEV_JMICRON is not set
 668.533 +# CONFIG_BLK_DEV_SC1200 is not set
 668.534 +CONFIG_BLK_DEV_PIIX=y
 668.535 +# CONFIG_BLK_DEV_IT821X is not set
 668.536 +# CONFIG_BLK_DEV_NS87415 is not set
 668.537 +# CONFIG_BLK_DEV_PDC202XX_OLD is not set
 668.538 +# CONFIG_BLK_DEV_PDC202XX_NEW is not set
 668.539 +# CONFIG_BLK_DEV_SVWKS is not set
 668.540 +# CONFIG_BLK_DEV_SIIMAGE is not set
 668.541 +# CONFIG_BLK_DEV_SIS5513 is not set
 668.542 +# CONFIG_BLK_DEV_SLC90E66 is not set
 668.543 +# CONFIG_BLK_DEV_TRM290 is not set
 668.544 +# CONFIG_BLK_DEV_VIA82CXXX is not set
 668.545 +# CONFIG_IDE_ARM is not set
 668.546 +CONFIG_BLK_DEV_IDEDMA=y
 668.547 +# CONFIG_IDEDMA_IVB is not set
 668.548 +CONFIG_IDEDMA_AUTO=y
 668.549 +# CONFIG_BLK_DEV_HD is not set
 668.550 +
 668.551 +#
 668.552 +# SCSI device support
 668.553 +#
 668.554 +# CONFIG_RAID_ATTRS is not set
 668.555 +CONFIG_SCSI=y
 668.556 +CONFIG_SCSI_NETLINK=y
 668.557 +# CONFIG_SCSI_PROC_FS is not set
 668.558 +
 668.559 +#
 668.560 +# SCSI support type (disk, tape, CD-ROM)
 668.561 +#
 668.562 +CONFIG_BLK_DEV_SD=y
 668.563 +# CONFIG_CHR_DEV_ST is not set
 668.564 +# CONFIG_CHR_DEV_OSST is not set
 668.565 +CONFIG_BLK_DEV_SR=y
 668.566 +# CONFIG_BLK_DEV_SR_VENDOR is not set
 668.567 +CONFIG_CHR_DEV_SG=y
 668.568 +# CONFIG_CHR_DEV_SCH is not set
 668.569 +
 668.570 +#
 668.571 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
 668.572 +#
 668.573 +# CONFIG_SCSI_MULTI_LUN is not set
 668.574 +# CONFIG_SCSI_CONSTANTS is not set
 668.575 +# CONFIG_SCSI_LOGGING is not set
 668.576 +
 668.577 +#
 668.578 +# SCSI Transports
 668.579 +#
 668.580 +CONFIG_SCSI_SPI_ATTRS=y
 668.581 +CONFIG_SCSI_FC_ATTRS=y
 668.582 +# CONFIG_SCSI_ISCSI_ATTRS is not set
 668.583 +# CONFIG_SCSI_SAS_ATTRS is not set
 668.584 +# CONFIG_SCSI_SAS_LIBSAS is not set
 668.585 +
 668.586 +#
 668.587 +# SCSI low-level drivers
 668.588 +#
 668.589 +# CONFIG_ISCSI_TCP is not set
 668.590 +CONFIG_BLK_DEV_3W_XXXX_RAID=y
 668.591 +# CONFIG_SCSI_3W_9XXX is not set
 668.592 +# CONFIG_SCSI_ACARD is not set
 668.593 +# CONFIG_SCSI_AACRAID is not set
 668.594 +CONFIG_SCSI_AIC7XXX=y
 668.595 +CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
 668.596 +CONFIG_AIC7XXX_RESET_DELAY_MS=5000
 668.597 +CONFIG_AIC7XXX_DEBUG_ENABLE=y
 668.598 +CONFIG_AIC7XXX_DEBUG_MASK=0
 668.599 +CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
 668.600 +# CONFIG_SCSI_AIC7XXX_OLD is not set
 668.601 +CONFIG_SCSI_AIC79XX=y
 668.602 +CONFIG_AIC79XX_CMDS_PER_DEVICE=32
 668.603 +CONFIG_AIC79XX_RESET_DELAY_MS=4000
 668.604 +# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
 668.605 +# CONFIG_AIC79XX_DEBUG_ENABLE is not set
 668.606 +CONFIG_AIC79XX_DEBUG_MASK=0
 668.607 +# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
 668.608 +# CONFIG_SCSI_AIC94XX is not set
 668.609 +# CONFIG_SCSI_DPT_I2O is not set
 668.610 +# CONFIG_SCSI_ADVANSYS is not set
 668.611 +# CONFIG_SCSI_ARCMSR is not set
 668.612 +# CONFIG_MEGARAID_NEWGEN is not set
 668.613 +# CONFIG_MEGARAID_LEGACY is not set
 668.614 +# CONFIG_MEGARAID_SAS is not set
 668.615 +# CONFIG_SCSI_HPTIOP is not set
 668.616 +# CONFIG_SCSI_BUSLOGIC is not set
 668.617 +# CONFIG_SCSI_DMX3191D is not set
 668.618 +# CONFIG_SCSI_EATA is not set
 668.619 +# CONFIG_SCSI_FUTURE_DOMAIN is not set
 668.620 +# CONFIG_SCSI_GDTH is not set
 668.621 +# CONFIG_SCSI_IPS is not set
 668.622 +# CONFIG_SCSI_INITIO is not set
 668.623 +# CONFIG_SCSI_INIA100 is not set
 668.624 +# CONFIG_SCSI_STEX is not set
 668.625 +# CONFIG_SCSI_SYM53C8XX_2 is not set
 668.626 +# CONFIG_SCSI_IPR is not set
 668.627 +# CONFIG_SCSI_QLOGIC_1280 is not set
 668.628 +# CONFIG_SCSI_QLA_FC is not set
 668.629 +# CONFIG_SCSI_QLA_ISCSI is not set
 668.630 +# CONFIG_SCSI_LPFC is not set
 668.631 +# CONFIG_SCSI_DC395x is not set
 668.632 +# CONFIG_SCSI_DC390T is not set
 668.633 +# CONFIG_SCSI_NSP32 is not set
 668.634 +# CONFIG_SCSI_DEBUG is not set
 668.635 +
 668.636 +#
 668.637 +# Serial ATA (prod) and Parallel ATA (experimental) drivers
 668.638 +#
 668.639 +CONFIG_ATA=y
 668.640 +CONFIG_SATA_AHCI=y
 668.641 +CONFIG_SATA_SVW=y
 668.642 +CONFIG_ATA_PIIX=y
 668.643 +# CONFIG_SATA_MV is not set
 668.644 +CONFIG_SATA_NV=y
 668.645 +# CONFIG_PDC_ADMA is not set
 668.646 +# CONFIG_SATA_QSTOR is not set
 668.647 +# CONFIG_SATA_PROMISE is not set
 668.648 +# CONFIG_SATA_SX4 is not set
 668.649 +CONFIG_SATA_SIL=y
 668.650 +# CONFIG_SATA_SIL24 is not set
 668.651 +# CONFIG_SATA_SIS is not set
 668.652 +# CONFIG_SATA_ULI is not set
 668.653 +CONFIG_SATA_VIA=y
 668.654 +# CONFIG_SATA_VITESSE is not set
 668.655 +CONFIG_SATA_INTEL_COMBINED=y
 668.656 +# CONFIG_PATA_ALI is not set
 668.657 +# CONFIG_PATA_AMD is not set
 668.658 +# CONFIG_PATA_ARTOP is not set
 668.659 +# CONFIG_PATA_ATIIXP is not set
 668.660 +# CONFIG_PATA_CMD64X is not set
 668.661 +# CONFIG_PATA_CS5520 is not set
 668.662 +# CONFIG_PATA_CS5530 is not set
 668.663 +# CONFIG_PATA_CS5535 is not set
 668.664 +# CONFIG_PATA_CYPRESS is not set
 668.665 +# CONFIG_PATA_EFAR is not set
 668.666 +# CONFIG_ATA_GENERIC is not set
 668.667 +# CONFIG_PATA_HPT366 is not set
 668.668 +# CONFIG_PATA_HPT37X is not set
 668.669 +# CONFIG_PATA_HPT3X2N is not set
 668.670 +# CONFIG_PATA_HPT3X3 is not set
 668.671 +# CONFIG_PATA_IT821X is not set
 668.672 +# CONFIG_PATA_JMICRON is not set
 668.673 +# CONFIG_PATA_TRIFLEX is not set
 668.674 +# CONFIG_PATA_MPIIX is not set
 668.675 +# CONFIG_PATA_OLDPIIX is not set
 668.676 +# CONFIG_PATA_NETCELL is not set
 668.677 +# CONFIG_PATA_NS87410 is not set
 668.678 +# CONFIG_PATA_OPTI is not set
 668.679 +# CONFIG_PATA_OPTIDMA is not set
 668.680 +# CONFIG_PATA_PDC_OLD is not set
 668.681 +# CONFIG_PATA_RADISYS is not set
 668.682 +# CONFIG_PATA_RZ1000 is not set
 668.683 +# CONFIG_PATA_SC1200 is not set
 668.684 +# CONFIG_PATA_SERVERWORKS is not set
 668.685 +# CONFIG_PATA_PDC2027X is not set
 668.686 +# CONFIG_PATA_SIL680 is not set
 668.687 +# CONFIG_PATA_SIS is not set
 668.688 +# CONFIG_PATA_VIA is not set
 668.689 +# CONFIG_PATA_WINBOND is not set
 668.690 +
 668.691 +#
 668.692 +# Multi-device support (RAID and LVM)
 668.693 +#
 668.694 +CONFIG_MD=y
 668.695 +# CONFIG_BLK_DEV_MD is not set
 668.696 +CONFIG_BLK_DEV_DM=y
 668.697 +# CONFIG_DM_DEBUG is not set
 668.698 +# CONFIG_DM_CRYPT is not set
 668.699 +# CONFIG_DM_SNAPSHOT is not set
 668.700 +# CONFIG_DM_MIRROR is not set
 668.701 +# CONFIG_DM_ZERO is not set
 668.702 +# CONFIG_DM_MULTIPATH is not set
 668.703 +
 668.704 +#
 668.705 +# Fusion MPT device support
 668.706 +#
 668.707 +CONFIG_FUSION=y
 668.708 +CONFIG_FUSION_SPI=y
 668.709 +# CONFIG_FUSION_FC is not set
 668.710 +# CONFIG_FUSION_SAS is not set
 668.711 +CONFIG_FUSION_MAX_SGE=128
 668.712 +# CONFIG_FUSION_CTL is not set
 668.713 +
 668.714 +#
 668.715 +# IEEE 1394 (FireWire) support
 668.716 +#
 668.717 +CONFIG_IEEE1394=y
 668.718 +
 668.719 +#
 668.720 +# Subsystem Options
 668.721 +#
 668.722 +# CONFIG_IEEE1394_VERBOSEDEBUG is not set
 668.723 +# CONFIG_IEEE1394_OUI_DB is not set
 668.724 +# CONFIG_IEEE1394_EXTRA_CONFIG_ROMS is not set
 668.725 +# CONFIG_IEEE1394_EXPORT_FULL_API is not set
 668.726 +
 668.727 +#
 668.728 +# Device Drivers
 668.729 +#
 668.730 +
 668.731 +#
 668.732 +# Texas Instruments PCILynx requires I2C
 668.733 +#
 668.734 +CONFIG_IEEE1394_OHCI1394=y
 668.735 +
 668.736 +#
 668.737 +# Protocol Drivers
 668.738 +#
 668.739 +# CONFIG_IEEE1394_VIDEO1394 is not set
 668.740 +# CONFIG_IEEE1394_SBP2 is not set
 668.741 +# CONFIG_IEEE1394_ETH1394 is not set
 668.742 +# CONFIG_IEEE1394_DV1394 is not set
 668.743 +CONFIG_IEEE1394_RAWIO=y
 668.744 +
 668.745 +#
 668.746 +# I2O device support
 668.747 +#
 668.748 +# CONFIG_I2O is not set
 668.749 +
 668.750 +#
 668.751 +# Network device support
 668.752 +#
 668.753 +CONFIG_NETDEVICES=y
 668.754 +# CONFIG_DUMMY is not set
 668.755 +# CONFIG_BONDING is not set
 668.756 +# CONFIG_EQUALIZER is not set
 668.757 +# CONFIG_TUN is not set
 668.758 +
 668.759 +#
 668.760 +# ARCnet devices
 668.761 +#
 668.762 +# CONFIG_ARCNET is not set
 668.763 +
 668.764 +#
 668.765 +# PHY device support
 668.766 +#
 668.767 +# CONFIG_PHYLIB is not set
 668.768 +
 668.769 +#
 668.770 +# Ethernet (10 or 100Mbit)
 668.771 +#
 668.772 +CONFIG_NET_ETHERNET=y
 668.773 +CONFIG_MII=y
 668.774 +# CONFIG_HAPPYMEAL is not set
 668.775 +# CONFIG_SUNGEM is not set
 668.776 +# CONFIG_CASSINI is not set
 668.777 +# CONFIG_NET_VENDOR_3COM is not set
 668.778 +
 668.779 +#
 668.780 +# Tulip family network device support
 668.781 +#
 668.782 +CONFIG_NET_TULIP=y
 668.783 +# CONFIG_DE2104X is not set
 668.784 +CONFIG_TULIP=y
 668.785 +# CONFIG_TULIP_MWI is not set
 668.786 +# CONFIG_TULIP_MMIO is not set
 668.787 +# CONFIG_TULIP_NAPI is not set
 668.788 +# CONFIG_DE4X5 is not set
 668.789 +# CONFIG_WINBOND_840 is not set
 668.790 +# CONFIG_DM9102 is not set
 668.791 +# CONFIG_ULI526X is not set
 668.792 +# CONFIG_HP100 is not set
 668.793 +CONFIG_NET_PCI=y
 668.794 +# CONFIG_PCNET32 is not set
 668.795 +# CONFIG_AMD8111_ETH is not set
 668.796 +# CONFIG_ADAPTEC_STARFIRE is not set
 668.797 +CONFIG_B44=y
 668.798 +CONFIG_FORCEDETH=y
 668.799 +# CONFIG_FORCEDETH_NAPI is not set
 668.800 +# CONFIG_DGRS is not set
 668.801 +# CONFIG_EEPRO100 is not set
 668.802 +CONFIG_E100=y
 668.803 +# CONFIG_FEALNX is not set
 668.804 +# CONFIG_NATSEMI is not set
 668.805 +# CONFIG_NE2K_PCI is not set
 668.806 +CONFIG_8139CP=y
 668.807 +CONFIG_8139TOO=y
 668.808 +# CONFIG_8139TOO_PIO is not set
 668.809 +# CONFIG_8139TOO_TUNE_TWISTER is not set
 668.810 +# CONFIG_8139TOO_8129 is not set
 668.811 +# CONFIG_8139_OLD_RX_RESET is not set
 668.812 +# CONFIG_SIS900 is not set
 668.813 +# CONFIG_EPIC100 is not set
 668.814 +# CONFIG_SUNDANCE is not set
 668.815 +# CONFIG_TLAN is not set
 668.816 +# CONFIG_VIA_RHINE is not set
 668.817 +
 668.818 +#
 668.819 +# Ethernet (1000 Mbit)
 668.820 +#
 668.821 +# CONFIG_ACENIC is not set
 668.822 +# CONFIG_DL2K is not set
 668.823 +CONFIG_E1000=y
 668.824 +# CONFIG_E1000_NAPI is not set
 668.825 +# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 668.826 +# CONFIG_NS83820 is not set
 668.827 +# CONFIG_HAMACHI is not set
 668.828 +# CONFIG_YELLOWFIN is not set
 668.829 +CONFIG_R8169=y
 668.830 +# CONFIG_R8169_NAPI is not set
 668.831 +# CONFIG_SIS190 is not set
 668.832 +# CONFIG_SKGE is not set
 668.833 +CONFIG_SKY2=y
 668.834 +# CONFIG_SK98LIN is not set
 668.835 +# CONFIG_VIA_VELOCITY is not set
 668.836 +CONFIG_TIGON3=y
 668.837 +CONFIG_BNX2=y
 668.838 +# CONFIG_QLA3XXX is not set
 668.839 +
 668.840 +#
 668.841 +# Ethernet (10000 Mbit)
 668.842 +#
 668.843 +# CONFIG_CHELSIO_T1 is not set
 668.844 +# CONFIG_IXGB is not set
 668.845 +# CONFIG_S2IO is not set
 668.846 +# CONFIG_MYRI10GE is not set
 668.847 +
 668.848 +#
 668.849 +# Token Ring devices
 668.850 +#
 668.851 +# CONFIG_TR is not set
 668.852 +
 668.853 +#
 668.854 +# Wireless LAN (non-hamradio)
 668.855 +#
 668.856 +# CONFIG_NET_RADIO is not set
 668.857 +
 668.858 +#
 668.859 +# Wan interfaces
 668.860 +#
 668.861 +# CONFIG_WAN is not set
 668.862 +# CONFIG_FDDI is not set
 668.863 +# CONFIG_HIPPI is not set
 668.864 +# CONFIG_PPP is not set
 668.865 +# CONFIG_SLIP is not set
 668.866 +# CONFIG_NET_FC is not set
 668.867 +# CONFIG_SHAPER is not set
 668.868 +CONFIG_NETCONSOLE=y
 668.869 +CONFIG_NETPOLL=y
 668.870 +# CONFIG_NETPOLL_RX is not set
 668.871 +# CONFIG_NETPOLL_TRAP is not set
 668.872 +CONFIG_NET_POLL_CONTROLLER=y
 668.873 +
 668.874 +#
 668.875 +# ISDN subsystem
 668.876 +#
 668.877 +# CONFIG_ISDN is not set
 668.878 +
 668.879 +#
 668.880 +# Telephony Support
 668.881 +#
 668.882 +# CONFIG_PHONE is not set
 668.883 +
 668.884 +#
 668.885 +# Input device support
 668.886 +#
 668.887 +CONFIG_INPUT=y
 668.888 +# CONFIG_INPUT_FF_MEMLESS is not set
 668.889 +
 668.890 +#
 668.891 +# Userland interfaces
 668.892 +#
 668.893 +CONFIG_INPUT_MOUSEDEV=y
 668.894 +CONFIG_INPUT_MOUSEDEV_PSAUX=y
 668.895 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 668.896 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 668.897 +# CONFIG_INPUT_JOYDEV is not set
 668.898 +# CONFIG_INPUT_TSDEV is not set
 668.899 +CONFIG_INPUT_EVDEV=y
 668.900 +# CONFIG_INPUT_EVBUG is not set
 668.901 +
 668.902 +#
 668.903 +# Input Device Drivers
 668.904 +#
 668.905 +CONFIG_INPUT_KEYBOARD=y
 668.906 +CONFIG_KEYBOARD_ATKBD=y
 668.907 +# CONFIG_KEYBOARD_SUNKBD is not set
 668.908 +# CONFIG_KEYBOARD_LKKBD is not set
 668.909 +# CONFIG_KEYBOARD_XTKBD is not set
 668.910 +# CONFIG_KEYBOARD_NEWTON is not set
 668.911 +# CONFIG_KEYBOARD_STOWAWAY is not set
 668.912 +CONFIG_INPUT_MOUSE=y
 668.913 +CONFIG_MOUSE_PS2=y
 668.914 +# CONFIG_MOUSE_SERIAL is not set
 668.915 +# CONFIG_MOUSE_VSXXXAA is not set
 668.916 +# CONFIG_INPUT_JOYSTICK is not set
 668.917 +# CONFIG_INPUT_TOUCHSCREEN is not set
 668.918 +# CONFIG_INPUT_MISC is not set
 668.919 +
 668.920 +#
 668.921 +# Hardware I/O ports
 668.922 +#
 668.923 +CONFIG_SERIO=y
 668.924 +CONFIG_SERIO_I8042=y
 668.925 +# CONFIG_SERIO_SERPORT is not set
 668.926 +# CONFIG_SERIO_CT82C710 is not set
 668.927 +# CONFIG_SERIO_PCIPS2 is not set
 668.928 +CONFIG_SERIO_LIBPS2=y
 668.929 +# CONFIG_SERIO_RAW is not set
 668.930 +# CONFIG_GAMEPORT is not set
 668.931 +
 668.932 +#
 668.933 +# Character devices
 668.934 +#
 668.935 +CONFIG_VT=y
 668.936 +CONFIG_VT_CONSOLE=y
 668.937 +CONFIG_HW_CONSOLE=y
 668.938 +# CONFIG_VT_HW_CONSOLE_BINDING is not set
 668.939 +# CONFIG_SERIAL_NONSTANDARD is not set
 668.940 +
 668.941 +#
 668.942 +# Serial drivers
 668.943 +#
 668.944 +CONFIG_SERIAL_8250=y
 668.945 +CONFIG_SERIAL_8250_CONSOLE=y
 668.946 +CONFIG_SERIAL_8250_PCI=y
 668.947 +CONFIG_SERIAL_8250_NR_UARTS=4
 668.948 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 668.949 +# CONFIG_SERIAL_8250_EXTENDED is not set
 668.950 +
 668.951 +#
 668.952 +# Non-8250 serial port support
 668.953 +#
 668.954 +CONFIG_SERIAL_CORE=y
 668.955 +CONFIG_SERIAL_CORE_CONSOLE=y
 668.956 +# CONFIG_SERIAL_JSM is not set
 668.957 +CONFIG_UNIX98_PTYS=y
 668.958 +CONFIG_LEGACY_PTYS=y
 668.959 +CONFIG_LEGACY_PTY_COUNT=256
 668.960 +
 668.961 +#
 668.962 +# IPMI
 668.963 +#
 668.964 +# CONFIG_IPMI_HANDLER is not set
 668.965 +
 668.966 +#
 668.967 +# Watchdog Cards
 668.968 +#
 668.969 +# CONFIG_WATCHDOG is not set
 668.970 +CONFIG_HW_RANDOM=y
 668.971 +CONFIG_HW_RANDOM_INTEL=y
 668.972 +CONFIG_HW_RANDOM_AMD=y
 668.973 +CONFIG_HW_RANDOM_GEODE=y
 668.974 +CONFIG_HW_RANDOM_VIA=y
 668.975 +# CONFIG_NVRAM is not set
 668.976 +CONFIG_RTC=y
 668.977 +# CONFIG_DTLK is not set
 668.978 +# CONFIG_R3964 is not set
 668.979 +# CONFIG_APPLICOM is not set
 668.980 +# CONFIG_SONYPI is not set
 668.981 +
 668.982 +#
 668.983 +# Ftape, the floppy tape device driver
 668.984 +#
 668.985 +# CONFIG_FTAPE is not set
 668.986 +CONFIG_AGP=y
 668.987 +# CONFIG_AGP_ALI is not set
 668.988 +# CONFIG_AGP_ATI is not set
 668.989 +# CONFIG_AGP_AMD is not set
 668.990 +CONFIG_AGP_AMD64=y
 668.991 +CONFIG_AGP_INTEL=y
 668.992 +# CONFIG_AGP_NVIDIA is not set
 668.993 +# CONFIG_AGP_SIS is not set
 668.994 +# CONFIG_AGP_SWORKS is not set
 668.995 +# CONFIG_AGP_VIA is not set
 668.996 +# CONFIG_AGP_EFFICEON is not set
 668.997 +# CONFIG_DRM is not set
 668.998 +# CONFIG_MWAVE is not set
 668.999 +# CONFIG_PC8736x_GPIO is not set
668.1000 +# CONFIG_NSC_GPIO is not set
668.1001 +# CONFIG_CS5535_GPIO is not set
668.1002 +CONFIG_RAW_DRIVER=y
668.1003 +CONFIG_MAX_RAW_DEVS=256
668.1004 +CONFIG_HPET=y
668.1005 +# CONFIG_HPET_RTC_IRQ is not set
668.1006 +CONFIG_HPET_MMAP=y
668.1007 +CONFIG_HANGCHECK_TIMER=y
668.1008 +
668.1009 +#
668.1010 +# TPM devices
668.1011 +#
668.1012 +# CONFIG_TCG_TPM is not set
668.1013 +# CONFIG_TELCLOCK is not set
668.1014 +
668.1015 +#
668.1016 +# I2C support
668.1017 +#
668.1018 +# CONFIG_I2C is not set
668.1019 +
668.1020 +#
668.1021 +# SPI support
668.1022 +#
668.1023 +# CONFIG_SPI is not set
668.1024 +# CONFIG_SPI_MASTER is not set
668.1025 +
668.1026 +#
668.1027 +# Dallas's 1-wire bus
668.1028 +#
668.1029 +# CONFIG_W1 is not set
668.1030 +
668.1031 +#
668.1032 +# Hardware Monitoring support
668.1033 +#
668.1034 +# CONFIG_HWMON is not set
668.1035 +# CONFIG_HWMON_VID is not set
668.1036 +
668.1037 +#
668.1038 +# Multimedia devices
668.1039 +#
668.1040 +# CONFIG_VIDEO_DEV is not set
668.1041 +
668.1042 +#
668.1043 +# Digital Video Broadcasting Devices
668.1044 +#
668.1045 +# CONFIG_DVB is not set
668.1046 +# CONFIG_USB_DABUSB is not set
668.1047 +
668.1048 +#
668.1049 +# Graphics support
668.1050 +#
668.1051 +CONFIG_FIRMWARE_EDID=y
668.1052 +# CONFIG_FB is not set
668.1053 +
668.1054 +#
668.1055 +# Console display driver support
668.1056 +#
668.1057 +CONFIG_VGA_CONSOLE=y
668.1058 +CONFIG_VGACON_SOFT_SCROLLBACK=y
668.1059 +CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=128
668.1060 +CONFIG_VIDEO_SELECT=y
668.1061 +CONFIG_DUMMY_CONSOLE=y
668.1062 +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
668.1063 +
668.1064 +#
668.1065 +# Sound
668.1066 +#
668.1067 +CONFIG_SOUND=y
668.1068 +
668.1069 +#
668.1070 +# Advanced Linux Sound Architecture
668.1071 +#
668.1072 +# CONFIG_SND is not set
668.1073 +
668.1074 +#
668.1075 +# Open Sound System
668.1076 +#
668.1077 +CONFIG_SOUND_PRIME=y
668.1078 +CONFIG_OSS_OBSOLETE_DRIVER=y
668.1079 +# CONFIG_SOUND_BT878 is not set
668.1080 +# CONFIG_SOUND_EMU10K1 is not set
668.1081 +# CONFIG_SOUND_FUSION is not set
668.1082 +# CONFIG_SOUND_ES1371 is not set
668.1083 +CONFIG_SOUND_ICH=y
668.1084 +# CONFIG_SOUND_TRIDENT is not set
668.1085 +# CONFIG_SOUND_MSNDCLAS is not set
668.1086 +# CONFIG_SOUND_MSNDPIN is not set
668.1087 +# CONFIG_SOUND_VIA82CXXX is not set
668.1088 +# CONFIG_SOUND_OSS is not set
668.1089 +
668.1090 +#
668.1091 +# USB support
668.1092 +#
668.1093 +CONFIG_USB_ARCH_HAS_HCD=y
668.1094 +CONFIG_USB_ARCH_HAS_OHCI=y
668.1095 +CONFIG_USB_ARCH_HAS_EHCI=y
668.1096 +CONFIG_USB=y
668.1097 +# CONFIG_USB_DEBUG is not set
668.1098 +
668.1099 +#
668.1100 +# Miscellaneous USB options
668.1101 +#
668.1102 +CONFIG_USB_DEVICEFS=y
668.1103 +# CONFIG_USB_BANDWIDTH is not set
668.1104 +# CONFIG_USB_DYNAMIC_MINORS is not set
668.1105 +# CONFIG_USB_SUSPEND is not set
668.1106 +# CONFIG_USB_OTG is not set
668.1107 +
668.1108 +#
668.1109 +# USB Host Controller Drivers
668.1110 +#
668.1111 +CONFIG_USB_EHCI_HCD=y
668.1112 +# CONFIG_USB_EHCI_SPLIT_ISO is not set
668.1113 +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
668.1114 +# CONFIG_USB_EHCI_TT_NEWSCHED is not set
668.1115 +# CONFIG_USB_ISP116X_HCD is not set
668.1116 +CONFIG_USB_OHCI_HCD=y
668.1117 +# CONFIG_USB_OHCI_BIG_ENDIAN is not set
668.1118 +CONFIG_USB_OHCI_LITTLE_ENDIAN=y
668.1119 +CONFIG_USB_UHCI_HCD=y
668.1120 +# CONFIG_USB_SL811_HCD is not set
668.1121 +
668.1122 +#
668.1123 +# USB Device Class drivers
668.1124 +#
668.1125 +# CONFIG_USB_ACM is not set
668.1126 +CONFIG_USB_PRINTER=y
668.1127 +
668.1128 +#
668.1129 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
668.1130 +#
668.1131 +
668.1132 +#
668.1133 +# may also be needed; see USB_STORAGE Help for more information
668.1134 +#
668.1135 +CONFIG_USB_STORAGE=y
668.1136 +# CONFIG_USB_STORAGE_DEBUG is not set
668.1137 +# CONFIG_USB_STORAGE_DATAFAB is not set
668.1138 +# CONFIG_USB_STORAGE_FREECOM is not set
668.1139 +# CONFIG_USB_STORAGE_ISD200 is not set
668.1140 +# CONFIG_USB_STORAGE_DPCM is not set
668.1141 +# CONFIG_USB_STORAGE_USBAT is not set
668.1142 +# CONFIG_USB_STORAGE_SDDR09 is not set
668.1143 +# CONFIG_USB_STORAGE_SDDR55 is not set
668.1144 +# CONFIG_USB_STORAGE_JUMPSHOT is not set
668.1145 +# CONFIG_USB_STORAGE_ALAUDA is not set
668.1146 +# CONFIG_USB_STORAGE_KARMA is not set
668.1147 +# CONFIG_USB_LIBUSUAL is not set
668.1148 +
668.1149 +#
668.1150 +# USB Input Devices
668.1151 +#
668.1152 +CONFIG_USB_HID=y
668.1153 +CONFIG_USB_HIDINPUT=y
668.1154 +# CONFIG_USB_HIDINPUT_POWERBOOK is not set
668.1155 +# CONFIG_HID_FF is not set
668.1156 +# CONFIG_USB_HIDDEV is not set
668.1157 +# CONFIG_USB_AIPTEK is not set
668.1158 +# CONFIG_USB_WACOM is not set
668.1159 +# CONFIG_USB_ACECAD is not set
668.1160 +# CONFIG_USB_KBTAB is not set
668.1161 +# CONFIG_USB_POWERMATE is not set
668.1162 +# CONFIG_USB_TOUCHSCREEN is not set
668.1163 +# CONFIG_USB_YEALINK is not set
668.1164 +# CONFIG_USB_XPAD is not set
668.1165 +# CONFIG_USB_ATI_REMOTE is not set
668.1166 +# CONFIG_USB_ATI_REMOTE2 is not set
668.1167 +# CONFIG_USB_KEYSPAN_REMOTE is not set
668.1168 +# CONFIG_USB_APPLETOUCH is not set
668.1169 +
668.1170 +#
668.1171 +# USB Imaging devices
668.1172 +#
668.1173 +# CONFIG_USB_MDC800 is not set
668.1174 +# CONFIG_USB_MICROTEK is not set
668.1175 +
668.1176 +#
668.1177 +# USB Network Adapters
668.1178 +#
668.1179 +# CONFIG_USB_CATC is not set
668.1180 +# CONFIG_USB_KAWETH is not set
668.1181 +# CONFIG_USB_PEGASUS is not set
668.1182 +# CONFIG_USB_RTL8150 is not set
668.1183 +# CONFIG_USB_USBNET_MII is not set
668.1184 +# CONFIG_USB_USBNET is not set
668.1185 +CONFIG_USB_MON=y
668.1186 +
668.1187 +#
668.1188 +# USB port drivers
668.1189 +#
668.1190 +
668.1191 +#
668.1192 +# USB Serial Converter support
668.1193 +#
668.1194 +# CONFIG_USB_SERIAL is not set
668.1195 +
668.1196 +#
668.1197 +# USB Miscellaneous drivers
668.1198 +#
668.1199 +# CONFIG_USB_EMI62 is not set
668.1200 +# CONFIG_USB_EMI26 is not set
668.1201 +# CONFIG_USB_ADUTUX is not set
668.1202 +# CONFIG_USB_AUERSWALD is not set
668.1203 +# CONFIG_USB_RIO500 is not set
668.1204 +# CONFIG_USB_LEGOTOWER is not set
668.1205 +# CONFIG_USB_LCD is not set
668.1206 +# CONFIG_USB_LED is not set
668.1207 +# CONFIG_USB_CYPRESS_CY7C63 is not set
668.1208 +# CONFIG_USB_CYTHERM is not set
668.1209 +# CONFIG_USB_PHIDGET is not set
668.1210 +# CONFIG_USB_IDMOUSE is not set
668.1211 +# CONFIG_USB_FTDI_ELAN is not set
668.1212 +# CONFIG_USB_APPLEDISPLAY is not set
668.1213 +# CONFIG_USB_SISUSBVGA is not set
668.1214 +# CONFIG_USB_LD is not set
668.1215 +# CONFIG_USB_TRANCEVIBRATOR is not set
668.1216 +# CONFIG_USB_TEST is not set
668.1217 +
668.1218 +#
668.1219 +# USB DSL modem support
668.1220 +#
668.1221 +
668.1222 +#
668.1223 +# USB Gadget Support
668.1224 +#
668.1225 +# CONFIG_USB_GADGET is not set
668.1226 +
668.1227 +#
668.1228 +# MMC/SD Card support
668.1229 +#
668.1230 +# CONFIG_MMC is not set
668.1231 +
668.1232 +#
668.1233 +# LED devices
668.1234 +#
668.1235 +# CONFIG_NEW_LEDS is not set
668.1236 +
668.1237 +#
668.1238 +# LED drivers
668.1239 +#
668.1240 +
668.1241 +#
668.1242 +# LED Triggers
668.1243 +#
668.1244 +
668.1245 +#
668.1246 +# InfiniBand support
668.1247 +#
668.1248 +# CONFIG_INFINIBAND is not set
668.1249 +
668.1250 +#
668.1251 +# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
668.1252 +#
668.1253 +# CONFIG_EDAC is not set
668.1254 +
668.1255 +#
668.1256 +# Real Time Clock
668.1257 +#
668.1258 +# CONFIG_RTC_CLASS is not set
668.1259 +
668.1260 +#
668.1261 +# DMA Engine support
668.1262 +#
668.1263 +# CONFIG_DMA_ENGINE is not set
668.1264 +
668.1265 +#
668.1266 +# DMA Clients
668.1267 +#
668.1268 +
668.1269 +#
668.1270 +# DMA Devices
668.1271 +#
668.1272 +
668.1273 +#
668.1274 +# File systems
668.1275 +#
668.1276 +CONFIG_EXT2_FS=y
668.1277 +CONFIG_EXT2_FS_XATTR=y
668.1278 +CONFIG_EXT2_FS_POSIX_ACL=y
668.1279 +# CONFIG_EXT2_FS_SECURITY is not set
668.1280 +# CONFIG_EXT2_FS_XIP is not set
668.1281 +CONFIG_EXT3_FS=y
668.1282 +CONFIG_EXT3_FS_XATTR=y
668.1283 +CONFIG_EXT3_FS_POSIX_ACL=y
668.1284 +# CONFIG_EXT3_FS_SECURITY is not set
668.1285 +# CONFIG_EXT4DEV_FS is not set
668.1286 +CONFIG_JBD=y
668.1287 +# CONFIG_JBD_DEBUG is not set
668.1288 +CONFIG_FS_MBCACHE=y
668.1289 +CONFIG_REISERFS_FS=y
668.1290 +# CONFIG_REISERFS_CHECK is not set
668.1291 +# CONFIG_REISERFS_PROC_INFO is not set
668.1292 +CONFIG_REISERFS_FS_XATTR=y
668.1293 +CONFIG_REISERFS_FS_POSIX_ACL=y
668.1294 +# CONFIG_REISERFS_FS_SECURITY is not set
668.1295 +# CONFIG_JFS_FS is not set
668.1296 +CONFIG_FS_POSIX_ACL=y
668.1297 +# CONFIG_XFS_FS is not set
668.1298 +# CONFIG_GFS2_FS is not set
668.1299 +# CONFIG_OCFS2_FS is not set
668.1300 +# CONFIG_MINIX_FS is not set
668.1301 +# CONFIG_ROMFS_FS is not set
668.1302 +CONFIG_INOTIFY=y
668.1303 +CONFIG_INOTIFY_USER=y
668.1304 +# CONFIG_QUOTA is not set
668.1305 +CONFIG_DNOTIFY=y
668.1306 +# CONFIG_AUTOFS_FS is not set
668.1307 +CONFIG_AUTOFS4_FS=y
668.1308 +# CONFIG_FUSE_FS is not set
668.1309 +CONFIG_GENERIC_ACL=y
668.1310 +
668.1311 +#
668.1312 +# CD-ROM/DVD Filesystems
668.1313 +#
668.1314 +CONFIG_ISO9660_FS=y
668.1315 +# CONFIG_JOLIET is not set
668.1316 +# CONFIG_ZISOFS is not set
668.1317 +# CONFIG_UDF_FS is not set
668.1318 +
668.1319 +#
668.1320 +# DOS/FAT/NT Filesystems
668.1321 +#
668.1322 +CONFIG_FAT_FS=y
668.1323 +CONFIG_MSDOS_FS=y
668.1324 +CONFIG_VFAT_FS=y
668.1325 +CONFIG_FAT_DEFAULT_CODEPAGE=437
668.1326 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
668.1327 +# CONFIG_NTFS_FS is not set
668.1328 +
668.1329 +#
668.1330 +# Pseudo filesystems
668.1331 +#
668.1332 +CONFIG_PROC_FS=y
668.1333 +CONFIG_PROC_KCORE=y
668.1334 +CONFIG_PROC_SYSCTL=y
668.1335 +CONFIG_SYSFS=y
668.1336 +CONFIG_TMPFS=y
668.1337 +CONFIG_TMPFS_POSIX_ACL=y
668.1338 +CONFIG_HUGETLBFS=y
668.1339 +CONFIG_HUGETLB_PAGE=y
668.1340 +CONFIG_RAMFS=y
668.1341 +# CONFIG_CONFIGFS_FS is not set
668.1342 +
668.1343 +#
668.1344 +# Miscellaneous filesystems
668.1345 +#
668.1346 +# CONFIG_ADFS_FS is not set
668.1347 +# CONFIG_AFFS_FS is not set
668.1348 +# CONFIG_HFS_FS is not set
668.1349 +# CONFIG_HFSPLUS_FS is not set
668.1350 +# CONFIG_BEFS_FS is not set
668.1351 +# CONFIG_BFS_FS is not set
668.1352 +# CONFIG_EFS_FS is not set
668.1353 +# CONFIG_CRAMFS is not set
668.1354 +# CONFIG_VXFS_FS is not set
668.1355 +# CONFIG_HPFS_FS is not set
668.1356 +# CONFIG_QNX4FS_FS is not set
668.1357 +# CONFIG_SYSV_FS is not set
668.1358 +# CONFIG_UFS_FS is not set
668.1359 +
668.1360 +#
668.1361 +# Network File Systems
668.1362 +#
668.1363 +CONFIG_NFS_FS=y
668.1364 +CONFIG_NFS_V3=y
668.1365 +# CONFIG_NFS_V3_ACL is not set
668.1366 +# CONFIG_NFS_V4 is not set
668.1367 +# CONFIG_NFS_DIRECTIO is not set
668.1368 +CONFIG_NFSD=y
668.1369 +CONFIG_NFSD_V3=y
668.1370 +# CONFIG_NFSD_V3_ACL is not set
668.1371 +# CONFIG_NFSD_V4 is not set
668.1372 +CONFIG_NFSD_TCP=y
668.1373 +CONFIG_ROOT_NFS=y
668.1374 +CONFIG_LOCKD=y
668.1375 +CONFIG_LOCKD_V4=y
668.1376 +CONFIG_EXPORTFS=y
668.1377 +CONFIG_NFS_COMMON=y
668.1378 +CONFIG_SUNRPC=y
668.1379 +# CONFIG_RPCSEC_GSS_KRB5 is not set
668.1380 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
668.1381 +# CONFIG_SMB_FS is not set
668.1382 +# CONFIG_CIFS is not set
668.1383 +# CONFIG_NCP_FS is not set
668.1384 +# CONFIG_CODA_FS is not set
668.1385 +# CONFIG_AFS_FS is not set
668.1386 +# CONFIG_9P_FS is not set
668.1387 +
668.1388 +#
668.1389 +# Partition Types
668.1390 +#
668.1391 +# CONFIG_PARTITION_ADVANCED is not set
668.1392 +CONFIG_MSDOS_PARTITION=y
668.1393 +
668.1394 +#
668.1395 +# Native Language Support
668.1396 +#
668.1397 +CONFIG_NLS=y
668.1398 +CONFIG_NLS_DEFAULT="iso8859-1"
668.1399 +CONFIG_NLS_CODEPAGE_437=y
668.1400 +# CONFIG_NLS_CODEPAGE_737 is not set
668.1401 +# CONFIG_NLS_CODEPAGE_775 is not set
668.1402 +# CONFIG_NLS_CODEPAGE_850 is not set
668.1403 +# CONFIG_NLS_CODEPAGE_852 is not set
668.1404 +# CONFIG_NLS_CODEPAGE_855 is not set
668.1405 +# CONFIG_NLS_CODEPAGE_857 is not set
668.1406 +# CONFIG_NLS_CODEPAGE_860 is not set
668.1407 +# CONFIG_NLS_CODEPAGE_861 is not set
668.1408 +# CONFIG_NLS_CODEPAGE_862 is not set
668.1409 +# CONFIG_NLS_CODEPAGE_863 is not set
668.1410 +# CONFIG_NLS_CODEPAGE_864 is not set
668.1411 +# CONFIG_NLS_CODEPAGE_865 is not set
668.1412 +# CONFIG_NLS_CODEPAGE_866 is not set
668.1413 +# CONFIG_NLS_CODEPAGE_869 is not set
668.1414 +# CONFIG_NLS_CODEPAGE_936 is not set
668.1415 +# CONFIG_NLS_CODEPAGE_950 is not set
668.1416 +# CONFIG_NLS_CODEPAGE_932 is not set
668.1417 +# CONFIG_NLS_CODEPAGE_949 is not set
668.1418 +# CONFIG_NLS_CODEPAGE_874 is not set
668.1419 +# CONFIG_NLS_ISO8859_8 is not set
668.1420 +# CONFIG_NLS_CODEPAGE_1250 is not set
668.1421 +# CONFIG_NLS_CODEPAGE_1251 is not set
668.1422 +CONFIG_NLS_ASCII=y
668.1423 +CONFIG_NLS_ISO8859_1=y
668.1424 +# CONFIG_NLS_ISO8859_2 is not set
668.1425 +# CONFIG_NLS_ISO8859_3 is not set
668.1426 +# CONFIG_NLS_ISO8859_4 is not set
668.1427 +# CONFIG_NLS_ISO8859_5 is not set
668.1428 +# CONFIG_NLS_ISO8859_6 is not set
668.1429 +# CONFIG_NLS_ISO8859_7 is not set
668.1430 +# CONFIG_NLS_ISO8859_9 is not set
668.1431 +# CONFIG_NLS_ISO8859_13 is not set
668.1432 +# CONFIG_NLS_ISO8859_14 is not set
668.1433 +CONFIG_NLS_ISO8859_15=y
668.1434 +# CONFIG_NLS_KOI8_R is not set
668.1435 +# CONFIG_NLS_KOI8_U is not set
668.1436 +CONFIG_NLS_UTF8=y
668.1437 +
668.1438 +#
668.1439 +# Instrumentation Support
668.1440 +#
668.1441 +CONFIG_PROFILING=y
668.1442 +CONFIG_OPROFILE=y
668.1443 +CONFIG_KPROBES=y
668.1444 +
668.1445 +#
668.1446 +# Kernel hacking
668.1447 +#
668.1448 +CONFIG_TRACE_IRQFLAGS_SUPPORT=y
668.1449 +# CONFIG_PRINTK_TIME is not set
668.1450 +# CONFIG_ENABLE_MUST_CHECK is not set
668.1451 +CONFIG_MAGIC_SYSRQ=y
668.1452 +CONFIG_UNUSED_SYMBOLS=y
668.1453 +CONFIG_DEBUG_KERNEL=y
668.1454 +CONFIG_LOG_BUF_SHIFT=18
668.1455 +CONFIG_DETECT_SOFTLOCKUP=y
668.1456 +# CONFIG_SCHEDSTATS is not set
668.1457 +# CONFIG_DEBUG_SLAB is not set
668.1458 +# CONFIG_DEBUG_RT_MUTEXES is not set
668.1459 +# CONFIG_RT_MUTEX_TESTER is not set
668.1460 +# CONFIG_DEBUG_SPINLOCK is not set
668.1461 +# CONFIG_DEBUG_MUTEXES is not set
668.1462 +# CONFIG_DEBUG_RWSEMS is not set
668.1463 +# CONFIG_DEBUG_LOCK_ALLOC is not set
668.1464 +# CONFIG_PROVE_LOCKING is not set
668.1465 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
668.1466 +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
668.1467 +# CONFIG_DEBUG_KOBJECT is not set
668.1468 +# CONFIG_DEBUG_HIGHMEM is not set
668.1469 +CONFIG_DEBUG_BUGVERBOSE=y
668.1470 +# CONFIG_DEBUG_INFO is not set
668.1471 +# CONFIG_DEBUG_FS is not set
668.1472 +# CONFIG_DEBUG_VM is not set
668.1473 +# CONFIG_DEBUG_LIST is not set
668.1474 +# CONFIG_FRAME_POINTER is not set
668.1475 +CONFIG_UNWIND_INFO=y
668.1476 +CONFIG_STACK_UNWIND=y
668.1477 +# CONFIG_FORCED_INLINING is not set
668.1478 +# CONFIG_HEADERS_CHECK is not set
668.1479 +# CONFIG_RCU_TORTURE_TEST is not set
668.1480 +# CONFIG_LKDTM is not set
668.1481 +CONFIG_EARLY_PRINTK=y
668.1482 +CONFIG_DEBUG_STACKOVERFLOW=y
668.1483 +# CONFIG_DEBUG_STACK_USAGE is not set
668.1484 +# CONFIG_DEBUG_RODATA is not set
668.1485 +# CONFIG_4KSTACKS is not set
668.1486 +CONFIG_DOUBLEFAULT=y
668.1487 +
668.1488 +#
668.1489 +# Security options
668.1490 +#
668.1491 +# CONFIG_KEYS is not set
668.1492 +# CONFIG_SECURITY is not set
668.1493 +
668.1494 +#
668.1495 +# Cryptographic options
668.1496 +#
668.1497 +# CONFIG_CRYPTO is not set
668.1498 +
668.1499 +#
668.1500 +# Library routines
668.1501 +#
668.1502 +# CONFIG_CRC_CCITT is not set
668.1503 +# CONFIG_CRC16 is not set
668.1504 +CONFIG_CRC32=y
668.1505 +# CONFIG_LIBCRC32C is not set
668.1506 +CONFIG_ZLIB_INFLATE=y
668.1507 +CONFIG_PLIST=y
668.1508 +CONFIG_GENERIC_HARDIRQS=y
668.1509 +CONFIG_GENERIC_IRQ_PROBE=y
668.1510 +CONFIG_X86_BIOS_REBOOT=y
668.1511 +CONFIG_KTIME_SCALAR=y
   669.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   669.2 +++ b/samples/i686-unknown-linux-uclibc/uClibc-0.9.28.1.config	Sat Feb 24 11:00:05 2007 +0000
   669.3 @@ -0,0 +1,172 @@
   669.4 +#
   669.5 +# Automatically generated make config: don't edit
   669.6 +#
   669.7 +# TARGET_alpha is not set
   669.8 +# TARGET_arm is not set
   669.9 +# TARGET_bfin is not set
  669.10 +# TARGET_cris is not set
  669.11 +# TARGET_e1 is not set
  669.12 +# TARGET_frv is not set
  669.13 +# TARGET_h8300 is not set
  669.14 +TARGET_i386=y
  669.15 +# TARGET_i960 is not set
  669.16 +# TARGET_m68k is not set
  669.17 +# TARGET_microblaze is not set
  669.18 +# TARGET_mips is not set
  669.19 +# TARGET_nios is not set
  669.20 +# TARGET_nios2 is not set
  669.21 +# TARGET_powerpc is not set
  669.22 +# TARGET_sh is not set
  669.23 +# TARGET_sh64 is not set
  669.24 +# TARGET_sparc is not set
  669.25 +# TARGET_v850 is not set
  669.26 +# TARGET_x86_64 is not set
  669.27 +
  669.28 +#
  669.29 +# Target Architecture Features and Options
  669.30 +#
  669.31 +HAVE_ELF=y
  669.32 +ARCH_SUPPORTS_LITTLE_ENDIAN=y
  669.33 +TARGET_ARCH="i386"
  669.34 +# CONFIG_GENERIC_386 is not set
  669.35 +# CONFIG_386 is not set
  669.36 +# CONFIG_486 is not set
  669.37 +# CONFIG_586 is not set
  669.38 +CONFIG_586MMX=y
  669.39 +# CONFIG_686 is not set
  669.40 +# CONFIG_PENTIUMII is not set
  669.41 +# CONFIG_PENTIUMIII is not set
  669.42 +# CONFIG_PENTIUM4 is not set
  669.43 +# CONFIG_K6 is not set
  669.44 +# CONFIG_K7 is not set
  669.45 +# CONFIG_ELAN is not set
  669.46 +# CONFIG_CRUSOE is not set
  669.47 +# CONFIG_WINCHIPC6 is not set
  669.48 +# CONFIG_WINCHIP2 is not set
  669.49 +# CONFIG_CYRIXIII is not set
  669.50 +# CONFIG_NEHEMIAH is not set
  669.51 +ARCH_LITTLE_ENDIAN=y
  669.52 +# ARCH_BIG_ENDIAN is not set
  669.53 +# ARCH_HAS_NO_MMU is not set
  669.54 +ARCH_HAS_MMU=y
  669.55 +UCLIBC_HAS_FLOATS=y
  669.56 +HAS_FPU=y
  669.57 +DO_C99_MATH=y
  669.58 +KERNEL_SOURCE="/usr/src/linux"
  669.59 +C_SYMBOL_PREFIX=""
  669.60 +HAVE_DOT_CONFIG=y
  669.61 +
  669.62 +#
  669.63 +# General Library Settings
  669.64 +#
  669.65 +# HAVE_NO_PIC is not set
  669.66 +DOPIC=y
  669.67 +# HAVE_NO_SHARED is not set
  669.68 +HAVE_SHARED=y
  669.69 +# ARCH_HAS_NO_LDSO is not set
  669.70 +BUILD_UCLIBC_LDSO=y
  669.71 +# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
  669.72 +LDSO_LDD_SUPPORT=y
  669.73 +LDSO_CACHE_SUPPORT=y
  669.74 +# LDSO_PRELOAD_FILE_SUPPORT is not set
  669.75 +LDSO_BASE_FILENAME="ld.so"
  669.76 +# LDSO_RUNPATH is not set
  669.77 +# DL_FINI_CRT_COMPAT is not set
  669.78 +UCLIBC_CTOR_DTOR=y
  669.79 +# HAS_NO_THREADS is not set
  669.80 +UCLIBC_HAS_THREADS=y
  669.81 +# PTHREADS_DEBUG_SUPPORT is not set
  669.82 +UCLIBC_HAS_LFS=y
  669.83 +UCLIBC_STATIC_LDCONFIG=y
  669.84 +# MALLOC is not set
  669.85 +# MALLOC_SIMPLE is not set
  669.86 +MALLOC_STANDARD=y
  669.87 +# MALLOC_GLIBC_COMPAT is not set
  669.88 +UCLIBC_DYNAMIC_ATEXIT=y
  669.89 +HAS_SHADOW=y
  669.90 +UNIX98PTY_ONLY=y
  669.91 +ASSUME_DEVPTS=y
  669.92 +UCLIBC_HAS_TM_EXTENSIONS=y
  669.93 +UCLIBC_HAS_TZ_CACHING=y
  669.94 +UCLIBC_HAS_TZ_FILE=y
  669.95 +UCLIBC_HAS_TZ_FILE_READ_MANY=y
  669.96 +UCLIBC_TZ_FILE_PATH="/etc/TZ"
  669.97 +
  669.98 +#
  669.99 +# Networking Support
 669.100 +#
 669.101 +# UCLIBC_HAS_IPV6 is not set
 669.102 +UCLIBC_HAS_RPC=y
 669.103 +UCLIBC_HAS_FULL_RPC=y
 669.104 +
 669.105 +#
 669.106 +# String and Stdio Support
 669.107 +#
 669.108 +UCLIBC_HAS_STRING_GENERIC_OPT=y
 669.109 +UCLIBC_HAS_STRING_ARCH_OPT=y
 669.110 +UCLIBC_HAS_CTYPE_TABLES=y
 669.111 +UCLIBC_HAS_CTYPE_SIGNED=y
 669.112 +UCLIBC_HAS_CTYPE_UNSAFE=y
 669.113 +# UCLIBC_HAS_CTYPE_CHECKED is not set
 669.114 +# UCLIBC_HAS_CTYPE_ENFORCED is not set
 669.115 +UCLIBC_HAS_WCHAR=y
 669.116 +# UCLIBC_HAS_LOCALE is not set
 669.117 +UCLIBC_HAS_HEXADECIMAL_FLOATS=y
 669.118 +UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
 669.119 +UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
 669.120 +# UCLIBC_HAS_SCANF_GLIBC_A_FLAG is not set
 669.121 +# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
 669.122 +# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
 669.123 +# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
 669.124 +# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
 669.125 +# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
 669.126 +UCLIBC_HAS_STDIO_BUFSIZ_4096=y
 669.127 +# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
 669.128 +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE is not set
 669.129 +UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4=y
 669.130 +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
 669.131 +# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
 669.132 +UCLIBC_HAS_STDIO_GETC_MACRO=y
 669.133 +UCLIBC_HAS_STDIO_PUTC_MACRO=y
 669.134 +UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
 669.135 +# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
 669.136 +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
 669.137 +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
 669.138 +UCLIBC_HAS_PRINTF_M_SPEC=y
 669.139 +UCLIBC_HAS_ERRNO_MESSAGES=y
 669.140 +# UCLIBC_HAS_SYS_ERRLIST is not set
 669.141 +UCLIBC_HAS_SIGNUM_MESSAGES=y
 669.142 +# UCLIBC_HAS_SYS_SIGLIST is not set
 669.143 +UCLIBC_HAS_GNU_GETOPT=y
 669.144 +
 669.145 +#
 669.146 +# Big and Tall
 669.147 +#
 669.148 +UCLIBC_HAS_REGEX=y
 669.149 +UCLIBC_HAS_WORDEXP=y
 669.150 +UCLIBC_HAS_FTW=y
 669.151 +UCLIBC_HAS_GLOB=y
 669.152 +
 669.153 +#
 669.154 +# Library Installation Options
 669.155 +#
 669.156 +SHARED_LIB_LOADER_PREFIX="$(DEVEL_PREFIX)/lib"
 669.157 +RUNTIME_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/"
 669.158 +DEVEL_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/usr/"
 669.159 +
 669.160 +#
 669.161 +# uClibc security related options
 669.162 +#
 669.163 +# UCLIBC_SECURITY is not set
 669.164 +
 669.165 +#
 669.166 +# uClibc development/debugging options
 669.167 +#
 669.168 +CROSS_COMPILER_PREFIX=""
 669.169 +# DODEBUG is not set
 669.170 +# DODEBUG_PT is not set
 669.171 +# DOASSERTS is not set
 669.172 +# SUPPORT_LD_DEBUG is not set
 669.173 +# SUPPORT_LD_DEBUG_EARLY is not set
 669.174 +WARNINGS="-Wall"
 669.175 +# UCLIBC_MJN3_ONLY is not set
   670.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   670.2 +++ b/scripts/build/binutils.sh	Sat Feb 24 11:00:05 2007 +0000
   670.3 @@ -0,0 +1,39 @@
   670.4 +# This file adds functions to build binutils
   670.5 +# Copyright 2007 Yann E. MORIN
   670.6 +# Licensed under the GPL v2. See COPYING in the root of this package
   670.7 +
   670.8 +do_binutils() {
   670.9 +    mkdir -p "${CT_BUILD_DIR}/build-binutils"
  670.10 +    cd "${CT_BUILD_DIR}/build-binutils"
  670.11 +
  670.12 +    CT_DoStep INFO "Installing binutils"
  670.13 +
  670.14 +    CT_DoLog EXTRA "Configuring binutils"
  670.15 +    CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
  670.16 +    "${CT_SRC_DIR}/${CT_BINUTILS_FILE}/configure"   \
  670.17 +        ${CT_CANADIAN_OPT}                          \
  670.18 +        --target=${CT_TARGET}                       \
  670.19 +        --host=${CT_HOST}                           \
  670.20 +        --prefix=${CT_PREFIX_DIR}                   \
  670.21 +        --disable-nls                               \
  670.22 +        ${CT_BINUTILS_EXTRA_CONFIG}                 \
  670.23 +        ${BINUTILS_SYSROOT_ARG}                     2>&1 |CT_DoLog DEBUG
  670.24 +
  670.25 +    CT_DoLog EXTRA "Building binutils"
  670.26 +    make ${PARALLELMFLAGS}  2>&1 |CT_DoLog DEBUG
  670.27 +
  670.28 +    CT_DoLog EXTRA "Installing binutils"
  670.29 +    make install            2>&1 |CT_DoLog DEBUG
  670.30 +
  670.31 +    # Make those new tools available to the core C compiler to come:
  670.32 +    # Note: some components want the ${TARGET}-{ar,as,ld,strip} commands as
  670.33 +    # well. Create that (libfloat is one such sucker).
  670.34 +    mkdir -p "${CT_CC_CORE_PREFIX_DIR}/${CT_TARGET}/bin"
  670.35 +    mkdir -p "${CT_CC_CORE_PREFIX_DIR}/bin"
  670.36 +    for t in ar as ld strip; do
  670.37 +        ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_PREFIX_DIR}/${CT_TARGET}/bin/${t}"
  670.38 +        ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-${t}"
  670.39 +    done |CT_DoLog DEBUG
  670.40 +
  670.41 +    CT_EndStep
  670.42 +}
   671.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   671.2 +++ b/scripts/build/cc_core_gcc.sh	Sat Feb 24 11:00:05 2007 +0000
   671.3 @@ -0,0 +1,58 @@
   671.4 +# This file adds the function to build the core gcc C compiler
   671.5 +# Copyright 2007 Yann E. MORIN
   671.6 +# Licensed under the GPL v2. See COPYING in the root of this package
   671.7 +
   671.8 +do_cc_core() {
   671.9 +    mkdir -p "${CT_BUILD_DIR}/build-cc-core"
  671.10 +    cd "${CT_BUILD_DIR}/build-cc-core"
  671.11 +
  671.12 +    CT_DoStep INFO "Installing core C compiler"
  671.13 +
  671.14 +    CT_DoLog EXTRA "Copy headers to install area of bootstrap gcc, so it can build libgcc2"
  671.15 +    mkdir -p "${CT_CC_CORE_PREFIX_DIR}/${CT_TARGET}/include"
  671.16 +    cp -r "${CT_HEADERS_DIR}"/* "${CT_CC_CORE_PREFIX_DIR}/${CT_TARGET}/include" 2>&1 |CT_DoLog DEBUG
  671.17 +
  671.18 +    CT_DoLog EXTRA "Configuring core C compiler"
  671.19 +
  671.20 +    extra_config=""
  671.21 +    [ "${CT_ARCH_FLOAT_SW}" = "y" ] && extra_config="${extra_config} --with-float=soft"
  671.22 +    [ -n "${CT_ARCH_CPU}" ]  && extra_config="${extra_config} --with-cpu=${CT_ARCH_CPU}"
  671.23 +    [ -n "${CT_ARCH_TUNE}" ] && extra_config="${extra_config} --with-tune=${CT_ARCH_TUNE}"
  671.24 +    [ -n "${CT_ARCH_ARCH}" ] && extra_config="${extra_config} --with-arch=${CT_ARCH_ARCH}"
  671.25 +    [ -n "${CT_ARCH_FPU}" ] && extra_config="${extra_config} --with-fpu=${CT_ARCH_FPU}"
  671.26 +
  671.27 +    CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
  671.28 +
  671.29 +    # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
  671.30 +    CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
  671.31 +    "${CT_SRC_DIR}/${CT_CC_CORE_FILE}/configure"    \
  671.32 +        ${CT_CANADIAN_OPT}                          \
  671.33 +        --target=${CT_TARGET}                       \
  671.34 +        --host=${CT_HOST}                           \
  671.35 +        --prefix="${CT_CC_CORE_PREFIX_DIR}"         \
  671.36 +        --with-local-prefix="${CT_SYSROOT_DIR}"     \
  671.37 +        --disable-multilib                          \
  671.38 +        --with-newlib                               \
  671.39 +        ${CC_CORE_SYSROOT_ARG}                      \
  671.40 +        ${extra_config}                             \
  671.41 +        --disable-nls                               \
  671.42 +        --enable-threads=no                         \
  671.43 +        --enable-symvers=gnu                        \
  671.44 +        --enable-__cxa_atexit                       \
  671.45 +        --enable-languages=c                        \
  671.46 +        --disable-shared                            \
  671.47 +        ${CT_CC_CORE_EXTRA_CONFIG}                  2>&1 |CT_DoLog DEBUG
  671.48 +
  671.49 +    if [ ! "${CT_CANADIAN}" = "y" ]; then
  671.50 +        CT_DoLog EXTRA "Building libiberty"
  671.51 +        make ${PARALLELMFLAGS} all-build-libiberty 2>&1 |CT_DoLog DEBUG
  671.52 +    fi
  671.53 +
  671.54 +    CT_DoLog EXTRA "Building core C compiler"
  671.55 +    make ${PARALLELMFLAGS} all-gcc 2>&1 |CT_DoLog DEBUG
  671.56 +
  671.57 +    CT_DoLog EXTRA "Installing core C compiler"
  671.58 +    make install-gcc 2>&1 |CT_DoLog DEBUG
  671.59 +
  671.60 +    CT_EndStep
  671.61 +}
   672.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   672.2 +++ b/scripts/build/cc_gcc.sh	Sat Feb 24 11:00:05 2007 +0000
   672.3 @@ -0,0 +1,115 @@
   672.4 +# This file adds the function to build the final gcc C compiler
   672.5 +# Copyright 2007 Yann E. MORIN
   672.6 +# Licensed under the GPL v2. See COPYING in the root of this package
   672.7 +
   672.8 +do_cc() {
   672.9 +    CT_DoStep INFO "Installing final C compiler"
  672.10 +
  672.11 +    mkdir -p "${CT_BUILD_DIR}/build-cc"
  672.12 +    cd "${CT_BUILD_DIR}/build-cc"
  672.13 +
  672.14 +    CT_DoLog EXTRA "Configuring C compiler"
  672.15 +
  672.16 +    # Enable selected languages
  672.17 +    lang_opt="c"
  672.18 +    [ "${CT_CC_LANG_CXX}" = "y"      ] && lang_opt="${lang_opt},c++"
  672.19 +    [ "${CT_CC_LANG_FORTRAN}" = "y"  ] && lang_opt="${lang_opt},fortran"
  672.20 +    [ "${CT_CC_LANG_ADA}" = "y"      ] && lang_opt="${lang_opt},ada"
  672.21 +    [ "${CT_CC_LANG_JAVA}" = "y"     ] && lang_opt="${lang_opt},java"
  672.22 +    [ "${CT_CC_LANG_OBJC}" = "y"     ] && lang_opt="${lang_opt},objc"
  672.23 +    [ "${CT_CC_LANG_OBJCXX}" = "y"   ] && lang_opt="${lang_opt},obj-c++"
  672.24 +    CT_Test "Building Fortran language is not yet supported. Will try..." "${CT_CC_LANG_FORTRAN}" = "y"
  672.25 +    CT_Test "Building ADA language is not yet supported. Will try..." "${CT_CC_LANG_ADA}" = "y"
  672.26 +    CT_Test "Building Java language is not yet supported. Will try..." "${CT_CC_LANG_JAVA}" = "y"
  672.27 +    CT_Test "Building Objective-C language is not yet supported. Will try..." "${CT_CC_LANG_OBJC}" = "y"
  672.28 +    CT_Test "Building Objective-C++ language is not yet supported. Will try..." "${CT_CC_LANG_OBJCXX}" = "y"
  672.29 +    CT_Test "Building ${CT_CC_LANG_OTHERS} language(s) is not yet supported. Will try..." -n "${CT_CC_LANG_OTHERS}"
  672.30 +    lang_opt=`echo "${lang_opt},${CT_CC_LANG_OTHERS}" |sed -r -e 's/^(.*),*$/\1/;'`
  672.31 +
  672.32 +    extra_config="--enable-languages=${lang_opt}"
  672.33 +    [ "${CT_ARCH_FLOAT_SW}" = "y" ] && extra_config="${extra_config} --with-float=soft"
  672.34 +    [ "${CT_SHARED_LIBS}" = "y" ] || extra_config="${extra_config} --disable-shared"
  672.35 +    [ -n "${CT_ARCH_CPU}" ]  && extra_config="${extra_config} --with-cpu=${CT_ARCH_CPU}"
  672.36 +    [ -n "${CT_ARCH_TUNE}" ] && extra_config="${extra_config} --with-tune=${CT_ARCH_TUNE}"
  672.37 +    [ -n "${CT_ARCH_ARCH}" ] && extra_config="${extra_config} --with-arch=${CT_ARCH_ARCH}"
  672.38 +    [ -n "${CT_ARCH_FPU}" ] && extra_config="${extra_config} --with-fpu=${CT_ARCH_FPU}"
  672.39 +    if [ "${CT_TARGET_MULTILIB}" = "y" ]; then
  672.40 +       extra_config="${extra_config} --enable-multilib"
  672.41 +    else
  672.42 +       extra_config="${extra_config} --disable-multilib"
  672.43 +    fi
  672.44 +
  672.45 +    CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
  672.46 +
  672.47 +    # --enable-symvers=gnu really only needed for sh4 to work around a
  672.48 +    # detection problem only matters for gcc-3.2.x and later, I think.
  672.49 +    # --disable-nls to work around crash bug on ppc405, but also because
  672.50 +    # embedded systems don't really need message catalogs...
  672.51 +    CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
  672.52 +    "${CT_SRC_DIR}/${CT_CC_FILE}/configure"     \
  672.53 +        ${CT_CANADIAN_OPT}                      \
  672.54 +        --target=${CT_TARGET} --host=${CT_HOST} \
  672.55 +        --prefix="${CT_PREFIX_DIR}"             \
  672.56 +        ${CC_SYSROOT_ARG}                       \
  672.57 +        ${extra_config}                         \
  672.58 +        --with-local-prefix="${CT_SYSROOT_DIR}" \
  672.59 +        --disable-nls                           \
  672.60 +        --enable-threads=posix                  \
  672.61 +        --enable-symvers=gnu                    \
  672.62 +        --enable-__cxa_atexit                   \
  672.63 +        --enable-c99                            \
  672.64 +        --enable-long-long                      \
  672.65 +        ${CT_CC_EXTRA_CONFIG}                   2>&1 |CT_DoLog DEBUG
  672.66 +
  672.67 +    if [ ! "${CT_CANADIAN}" = "y" ]; then
  672.68 +        CT_DoLog EXTRA "Building libiberty"
  672.69 +        make ${PARALLELMFLAGS} all-build-libiberty 2>&1 |CT_DoLog DEBUG
  672.70 +    fi
  672.71 +
  672.72 +
  672.73 +    # Idea from <cort.dougan at gmail.com>:
  672.74 +    # Fix lib/lib64 confusion for GCC 3.3.3 on PowerPC64 and x86_64.
  672.75 +    # GCC 3.4.0 and up don't suffer from this confusion, and don't need this
  672.76 +    # kludge.
  672.77 +    # FIXME: we should patch gcc's source rather than uglify crosstool.sh.
  672.78 +    # FIXME: is this needed for gcc-3.3.[56]?
  672.79 +    case "${CT_CC_FILE}" in
  672.80 +      gcc-3.3.[34])
  672.81 +        case "${CT_TARGET}" in
  672.82 +          powerpc64-unknown-linux-gnu|x86_64-unknown-linux-gnu)
  672.83 +            for d in `find "${CT_SYSROOT_DIR}" -name lib -type d -empty`; do
  672.84 +              if [ -d `dirname "${d}"`/lib64 ] ; then
  672.85 +                rm -rf "${d}"
  672.86 +                ln -s `dirname "${d}"`/lib64 "${d}"
  672.87 +              fi
  672.88 +            done ;;
  672.89 +          *) ;;
  672.90 +        esac ;;
  672.91 +    esac
  672.92 +
  672.93 +    CT_DoLog EXTRA "Building C compiler"
  672.94 +    make ${PARALLELMFLAGS} all 2>&1 |CT_DoLog DEBUG
  672.95 +
  672.96 +    CT_DoLog EXTRA "Installing C compiler"
  672.97 +    make install 2>&1 |CT_DoLog DEBUG
  672.98 +
  672.99 +    # FIXME: shouldn't people who want this just --disable-multilib in final gcc
 672.100 +    # and be done with it?
 672.101 +    # This code should probably be deleted, it was written long ago and hasn't
 672.102 +    # been tested in ages.
 672.103 +    # kludge: If the chip does not have a floating point unit
 672.104 +    # (i.e. if GLIBC_EXTRA_CONFIG contains --without-fp),
 672.105 +    # and there are shared libraries in /lib/nof, copy them to /lib
 672.106 +    # so they get used by default.
 672.107 +    # FIXME: only rs6000/powerpc seem to use nof.  See MULTILIB_DIRNAMES
 672.108 +    # in $GCC_DIR/gcc/config/$TARGET/* to see what your arch calls it.
 672.109 +    #case "${CT_LIBC_EXTRA_CONFIG}" in
 672.110 +    #    *--without-fp*)
 672.111 +    #        if test -d "${CT_SYSROOT_DIR}/lib/nof"; then
 672.112 +    #            cp -af "${CT_SYSROOT_DIR}/lib/nof/"*.so* "${CT_SYSROOT_DIR}/lib" || true
 672.113 +    #        fi
 672.114 +    #    ;;
 672.115 +    #esac
 672.116 +
 672.117 +    CT_EndStep
 672.118 +}
   673.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   673.2 +++ b/scripts/build/kernel_linux-libc-headers.sh	Sat Feb 24 11:00:05 2007 +0000
   673.3 @@ -0,0 +1,1 @@
   673.4 +kernel_linux.sh
   673.5 \ No newline at end of file
   674.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   674.2 +++ b/scripts/build/kernel_linux.sh	Sat Feb 24 11:00:05 2007 +0000
   674.3 @@ -0,0 +1,148 @@
   674.4 +# This file declares functions to install the kernel headers for linux
   674.5 +# Copyright 2007 Yann E. MORIN
   674.6 +# Licensed under the GPL v2. See COPYING in the root of this package
   674.7 +
   674.8 +# Check kernel configuration
   674.9 +do_kernel_check_config() {
  674.10 +    CT_DoStep INFO "Checking kernel configuration"
  674.11 +
  674.12 +    CT_TestOrAbort "You did not provide a kernel config file!" -n "${CT_KERNEL_LINUX_CONFIG_FILE}" -a -f "${CT_KERNEL_LINUX_CONFIG_FILE}"
  674.13 +
  674.14 +    CT_EndStep
  674.15 +}
  674.16 +
  674.17 +# Wrapper to the actual headers install method
  674.18 +do_kernel_headers() {
  674.19 +    CT_DoStep INFO "Installing kernel headers"
  674.20 +
  674.21 +    # We need to enter this directory to find the kernel version strings
  674.22 +    cd "${CT_SRC_DIR}/${CT_KERNEL_FILE}"
  674.23 +    if [ "${CT_KERNEL_LINUX_HEADERS_SANITISED}" != "y" ]; then
  674.24 +        k_version=`awk '/^VERSION =/ { print $3 }' Makefile`
  674.25 +        k_patchlevel=`awk '/^PATCHLEVEL =/ { print $3 }' Makefile`
  674.26 +        k_sublevel=`awk '/^SUBLEVEL =/ { print $3 }' Makefile`
  674.27 +        k_extraversion=`awk '/^EXTRAVERSION =/ { print $3 }' Makefile`
  674.28 +    else
  674.29 +        k_version=`echo "${CT_KERNEL_VERSION}." |cut -d . -f 1`
  674.30 +        k_patchlevel=`echo "${CT_KERNEL_VERSION}." |cut -d . -f 2`
  674.31 +        k_sublevel=`echo "${CT_KERNEL_VERSION}." |cut -d . -f 3`
  674.32 +        k_extraversion=`echo "${CT_KERNEL_VERSION}." |cut -d . -f 4`
  674.33 +    fi
  674.34 +
  674.35 +    case "${k_version}.${k_patchlevel}" in
  674.36 +        2.2|2.4|2.6) ;;
  674.37 +        *)  CT_Abort "Unsupported kernel version \"linux-${k_version}.${k_patchlevel}\".";;
  674.38 +    esac
  674.39 +
  674.40 +    # Kernel version that support verbosity will use this, others will ignore it:
  674.41 +    V_OPT="V=${CT_KERNEL_LINUX_VERBOSE_LEVEL}"
  674.42 +
  674.43 +    if [ "${CT_KERNEL_LINUX_HEADERS_INSTALL}" = "y" ]; then
  674.44 +        do_kernel_install
  674.45 +    elif [ "${CT_KERNEL_LINUX_HEADERS_SANITISED}" = "y" ]; then
  674.46 +        do_kernel_sanitised
  674.47 +    else [ "${CT_KERNEL_LINUX_HEADERS_COPY}" = "y" ];
  674.48 +        do_kernel_copy
  674.49 +    fi
  674.50 +
  674.51 +    CT_EndStep
  674.52 +}
  674.53 +
  674.54 +# Install kernel headers using headers_install from kernel sources.
  674.55 +do_kernel_install() {
  674.56 +    CT_DoLog EXTRA "Using kernel's headers_install"
  674.57 +
  674.58 +    mkdir -p "${CT_BUILD_DIR}/build-kernel-headers"
  674.59 +    cd "${CT_BUILD_DIR}/build-kernel-headers"
  674.60 +
  674.61 +    case "${k_version}.${k_patchlevel}" in
  674.62 +        2.6) [ ${k_sublevel} -ge 18 ] || CT_Abort "Kernel version >= 2.6.18 is needed to install kernel headers.";;
  674.63 +        *)   CT_Abort "Kernel version >= 2.6.18 is needed to install kernel headers.";;
  674.64 +    esac
  674.65 +
  674.66 +    CT_DoLog EXTRA "Configuring kernel headers"
  674.67 +    cp "${CT_KERNEL_LINUX_CONFIG_FILE}" .config
  674.68 +    CT_DoYes "" |make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}"      \
  674.69 +                      O="${CT_BUILD_DIR}/build-kernel-headers"  \
  674.70 +                      ${V_OPT}                                  \
  674.71 +                      ARCH=${CT_KERNEL_ARCH} oldconfig          2>&1 |CT_DoLog DEBUG
  674.72 +
  674.73 +    CT_DoLog EXTRA "Installing kernel headers"
  674.74 +    make ARCH=${CT_KERNEL_ARCH}                     \
  674.75 +         INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr"   \
  674.76 +         ${V_OPT}                                   \
  674.77 +         headers_install                            2>&1 |CT_DoLog DEBUG
  674.78 +
  674.79 +    CT_DoLog EXTRA "Checking installed headers"
  674.80 +    make ARCH=${CT_KERNEL_ARCH}                     \
  674.81 +         INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr"   \
  674.82 +         ${V_OPT}                                   \
  674.83 +         headers_check                              2>&1 |CT_DoLog DEBUG
  674.84 +}
  674.85 +
  674.86 +# Install kernel headers from oldish Mazur's sanitised headers.
  674.87 +do_kernel_sanitised() {
  674.88 +    CT_DoLog EXTRA "Copying sanitised headers"
  674.89 +    cd "${CT_SRC_DIR}/${CT_KERNEL_FILE}"
  674.90 +    cp -rv include/linux "${CT_HEADERS_DIR}" 2>&1 |CT_DoLog DEBUG
  674.91 +    cp -rv "include/asm-${CT_KERNEL_ARCH}" "${CT_HEADERS_DIR}/asm" 2>&1 |CT_DoLog DEBUG
  674.92 +}
  674.93 +
  674.94 +# Install kernel headers by plain copy.
  674.95 +do_kernel_copy() {
  674.96 +    CT_DoLog EXTRA "Copying plain kernel headers"
  674.97 +    CT_DoLog WARN "You are using plain kernel headers. You really shouldn't do that."
  674.98 +    CT_DoLog WARN "You'd be better off by using installed headers (or sanitised headers)."
  674.99 +
 674.100 +    # 2.2 and 2.4 don't support building out-of-tree. 2.6 does.
 674.101 +    CT_DoLog EXTRA "Preparing kernel headers"
 674.102 +    case "${k_version}.${k_patchlevel}" in
 674.103 +        2.2|2.4) cd "${CT_SRC_DIR}/${CT_KERNEL_FILE}"
 674.104 +                 cp "${CT_KERNEL_LINUX_CONFIG_FILE}" .config
 674.105 +                 CT_DoYes "" |make ARCH=${CT_KERNEL_ARCH} oldconfig
 674.106 +                 # 2.4 doesn't follow V=# for verbosity... :-(
 674.107 +                 make ARCH=${CT_KERNEL_ARCH} symlinks include/linux/version.h
 674.108 +                 ;;
 674.109 +        2.6)     mkdir -p "${CT_BUILD_DIR}/build-kernel-headers"
 674.110 +                 cd "${CT_BUILD_DIR}/build-kernel-headers"
 674.111 +                 cp "${CT_KERNEL_LINUX_CONFIG_FILE}" .config
 674.112 +                 CT_DoYes "" |make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}"         \
 674.113 +                                   O="`pwd`" ${V_OPT} ARCH=${CT_KERNEL_ARCH}    \
 674.114 +                                   oldconfig
 674.115 +                 case "${CT_KERNEL_ARCH}" in
 674.116 +                     sh*)        # sh does secret stuff in 'make prepare' that can't be
 674.117 +                                 # triggered separately, but happily, it doesn't use
 674.118 +                                 # target gcc, so we can use it.
 674.119 +                                 # Update: this fails on 2.6.11, as it installs
 674.120 +                                 # elfconfig.h, which requires target compiler :-(
 674.121 +                                 make ${PARALLELMFLAGS}                 \
 674.122 +                                      ARCH=${CT_KERNEL_ARCH} ${V_OPT}   \
 674.123 +                                      prepare include/linux/version.h
 674.124 +                                 ;;
 674.125 +                     arm*|cris*) make ${PARALLELMFLAGS}                 \
 674.126 +                                      ARCH=${CT_KERNEL_ARCH} ${V_OPT}       \
 674.127 +                                      include/asm include/linux/version.h   \
 674.128 +                                      include/asm-${CT_KERNEL_ARCH}/.arch
 674.129 +                                 ;;
 674.130 +                     mips*)      # for linux-2.6, 'make prepare' for mips doesn't 
 674.131 +                                 # actually create any symlinks.  Hope generic is ok.
 674.132 +                                 # Note that glibc ignores all -I flags passed in CFLAGS,
 674.133 +                                 # so you have to use -isystem.
 674.134 +                                 make ${PARALLELMFLAGS}                 \
 674.135 +                                      ARCH=${CT_KERNEL_ARCH} ${V_OPT}   \
 674.136 +                                      include/asm include/linux/version.h
 674.137 +                                 TARGET_CFLAGS="${TARGET_CFLAGS} -isystem ${LINUX_HEADER_DIR}/include/asm-mips/mach-generic"
 674.138 +                                 ;;
 674.139 +                     *)          make ${PARALLELMFLAGS}                 \
 674.140 +                                      ARCH=${CT_KERNEL_ARCH} ${V_OPT}   \
 674.141 +                                      include/asm include/linux/version.h
 674.142 +                                 ;;
 674.143 +                 esac
 674.144 +                 ;;
 674.145 +    esac 2>&1 |CT_DoLog DEBUG
 674.146 +
 674.147 +    CT_DoLog EXTRA "Copying kernel headers"
 674.148 +    cp -rv include/asm-generic "${CT_HEADERS_DIR}/asm-generic" 2>&1 |CT_DoLog DEBUG
 674.149 +    cp -rv include/linux "${CT_HEADERS_DIR}" 2>&1 |CT_DoLog DEBUG
 674.150 +    cp -rv include/asm-${CT_KERNEL_ARCH} "${CT_HEADERS_DIR}/asm" 2>&1 |CT_DoLog DEBUG
 674.151 +}
   675.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   675.2 +++ b/scripts/build/libc_glibc.sh	Sat Feb 24 11:00:05 2007 +0000
   675.3 @@ -0,0 +1,285 @@
   675.4 +# This file adds functions to build glibc
   675.5 +# Copyright 2007 Yann E. MORIN
   675.6 +# Licensed under the GPL v2. See COPYING in the root of this package
   675.7 +
   675.8 +# There is nothing to do for glibc check config
   675.9 +do_libc_check_config() {
  675.10 +    CT_DoStep INFO "Checking C library configuration"
  675.11 +    CT_DoLog EXTRA "glibc has nothing to check"
  675.12 +    CT_EndStep
  675.13 +}
  675.14 +
  675.15 +# This function installs the glibc headers needed to build the core compiler
  675.16 +do_libc_headers() {
  675.17 +    # Only need to install bootstrap glibc headers for gcc-3.0 and above?  Or maybe just gcc-3.3 and above?
  675.18 +    # See also http://gcc.gnu.org/PR8180, which complains about the need for this step.
  675.19 +    grep -q 'gcc-[34]' "${CT_SRC_DIR}/${CT_CC_CORE_FILE}/ChangeLog" || return 0
  675.20 +
  675.21 +    CT_DoStep INFO "Installing C library headers"
  675.22 +
  675.23 +    mkdir -p "${CT_BUILD_DIR}/build-libc-headers"
  675.24 +    cd "${CT_BUILD_DIR}/build-libc-headers"
  675.25 +
  675.26 +    CT_DoLog EXTRA "Configuring C library headers"
  675.27 +
  675.28 +    # The following three things have to be done to build glibc-2.3.x, but they don't hurt older versions.
  675.29 +    # 1. override CC to keep glibc's configure from using $TARGET-gcc. 
  675.30 +    # 2. disable linuxthreads, which needs a real cross-compiler to generate tcb-offsets.h properly
  675.31 +    # 3. build with gcc 3.2 or later
  675.32 +    # Compare these options with the ones used when building glibc for real below - they're different.
  675.33 +    # As of glibc-2.3.2, to get this step to work for hppa-linux, you need --enable-hacker-mode
  675.34 +    # so when configure checks to make sure gcc has access to the assembler you just built...
  675.35 +    # Alternately, we could put ${PREFIX}/${TARGET}/bin on the path.
  675.36 +    # Set --build so maybe we don't have to specify "cross-compiling=yes" below (haven't tried yet)
  675.37 +    # Note: the warning
  675.38 +    # "*** WARNING: Are you sure you do not want to use the `linuxthreads'"
  675.39 +    # *** add-on?"
  675.40 +    # is ok here, since all we want are the basic headers at this point.
  675.41 +    # Override libc_cv_ppc_machine so glibc-cvs doesn't complain
  675.42 +    # 'a version of binutils that supports .machine "altivec" is needed'.
  675.43 +    libc_cv_ppc_machine=yes                     \
  675.44 +    CC=${CT_CC_NATIVE}                          \
  675.45 +    "${CT_SRC_DIR}/${CT_LIBC_FILE}/configure"   \
  675.46 +        --build="${CT_BUILD}"                   \
  675.47 +        --host="${CT_TARGET}"                   \
  675.48 +        --prefix=/usr                           \
  675.49 +        --with-headers="${CT_HEADERS_DIR}"      \
  675.50 +        --without-cvs --disable-sanity-checks   \
  675.51 +        --enable-hacker-mode                    \
  675.52 +        --enable-add-ons=""                     \
  675.53 +        --without-nptl                          2>&1 |CT_DoLog DEBUG
  675.54 +
  675.55 +    CT_DoLog EXTRA "Installing C library headers"
  675.56 +
  675.57 +    if grep -q GLIBC_2.3 "${CT_SRC_DIR}/${CT_LIBC_FILE}/ChangeLog"; then
  675.58 +        # glibc-2.3.x passes cross options to $(CC) when generating errlist-compat.c,
  675.59 +        # which fails without a real cross-compiler.
  675.60 +        # Fortunately, we don't need errlist-compat.c, since we just need .h
  675.61 +        # files, so work around this by creating a fake errlist-compat.c and
  675.62 +        # satisfying its dependencies.
  675.63 +        # Another workaround might be to tell configure to not use any cross
  675.64 +        # options to $(CC).
  675.65 +        # The real fix would be to get install-headers to not generate
  675.66 +        # errlist-compat.c.
  675.67 +        # Note: BOOTSTRAP_GCC is used by:
  675.68 +        # patches/glibc-2.3.5/glibc-mips-bootstrap-gcc-header-install.patch
  675.69 +        libc_cv_ppc_machine=yes                             \
  675.70 +        make CFLAGS=-DBOOTSTRAP_GCC sysdeps/gnu/errlist.c   2>&1 |CT_DoLog DEBUG
  675.71 +        mkdir -p stdio-common
  675.72 +        # sleep for 2 seconds for benefit of filesystems with lousy time
  675.73 +        # resolution, like FAT, so make knows for sure errlist-compat.c doesn't
  675.74 +        # need generating
  675.75 +        sleep 2
  675.76 +        touch stdio-common/errlist-compat.c
  675.77 +    fi
  675.78 +    # Note: BOOTSTRAP_GCC (see above)
  675.79 +    libc_cv_ppc_machine=yes                                 \
  675.80 +    make cross-compiling=yes install_root=${CT_SYSROOT_DIR} \
  675.81 +        CFLAGS=-DBOOTSTRAP_GCC ${LIBC_SYSROOT_ARG}          \
  675.82 +        install-headers                                     2>&1 |CT_DoLog DEBUG
  675.83 +
  675.84 +    # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
  675.85 +    # so do them by hand.  We can tolerate an empty stubs.h for the moment.
  675.86 +    # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
  675.87 +    mkdir -p "${CT_HEADERS_DIR}/gnu"
  675.88 +    touch "${CT_HEADERS_DIR}/gnu/stubs.h"
  675.89 +    cp "${CT_SRC_DIR}/${CT_LIBC_FILE}/include/features.h" "${CT_HEADERS_DIR}/features.h"
  675.90 +
  675.91 +    # Building the bootstrap gcc requires either setting inhibit_libc, or
  675.92 +    # having a copy of stdio_lim.h... see
  675.93 +    # http://sources.redhat.com/ml/libc-alpha/2003-11/msg00045.html
  675.94 +    cp bits/stdio_lim.h "${CT_HEADERS_DIR}/bits/stdio_lim.h"
  675.95 +
  675.96 +    # Following error building gcc-4.0.0's gcj:
  675.97 +    #  error: bits/syscall.h: No such file or directory
  675.98 +    # solved by following copy; see http://sourceware.org/ml/crossgcc/2005-05/msg00168.html
  675.99 +    # but it breaks arm, see http://sourceware.org/ml/crossgcc/2006-01/msg00091.html
 675.100 +    [ "${CT_ARCH}" != "arm" ] && cp misc/syscall-list.h "${CT_HEADERS_DIR}/bits/syscall.h" || true
 675.101 +
 675.102 +    CT_EndStep
 675.103 +}
 675.104 +
 675.105 +# This function builds and install the full glibc
 675.106 +do_libc() {
 675.107 +    CT_DoStep INFO "Installing C library"
 675.108 +
 675.109 +    mkdir -p "${CT_BUILD_DIR}/build-libc"
 675.110 +    cd "${CT_BUILD_DIR}/build-libc"
 675.111 +
 675.112 +    CT_DoLog EXTRA "Configuring C library"
 675.113 +
 675.114 +    # Add some default glibc config options if not given by user.
 675.115 +    extra_config=""
 675.116 +    case "${CT_LIBC_GLIBC_EXTRA_CONFIG}" in
 675.117 +        *enable-kernel*) ;;
 675.118 +        *) extra_config="${extra_config} --enable-kernel=${CT_KERNEL_VERSION}"
 675.119 +    esac
 675.120 +    case "${CT_LIBC_GLIBC_EXTRA_CONFIG}" in
 675.121 +        *-tls*) ;;
 675.122 +        *) extra_config="${extra_config} --without-tls"
 675.123 +    esac
 675.124 +    case "${CT_LIBC_GLIBC_EXTRA_CONFIG}" in
 675.125 +        *-__thread*) ;;
 675.126 +        *) extra_config="${extra_config} --without-__thread"
 675.127 +    esac
 675.128 +    case "${CT_SHARED_LIBS}" in
 675.129 +        y) extra_config="${extra_config} --enable-shared";;
 675.130 +        *) extra_config="${extra_config} --disable-shared";;
 675.131 +    esac
 675.132 +    case "${CT_LIBC_GLIBC_EXTRA_CONFIG}" in
 675.133 +    	*--with-fp*) ;;
 675.134 +    	*--without-fp*) ;;
 675.135 +    	*)  case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in
 675.136 +                y,) extra_config="${extra_config} --with-fp";;
 675.137 +                ,y) extra_config="${extra_config} --without-fp";;
 675.138 +            esac;;
 675.139 +    esac
 675.140 +    case "${CT_LIBC_ADDONS},${CT_LIBC_ADDONS_LIST}" in
 675.141 +        y,) extra_config="${extra_config} --enable-add-ons";;
 675.142 +        y,*) extra_config="${extra_config} --enable-add-ons=${CT_LIBC_ADDONS_LIST}";;
 675.143 +    esac
 675.144 +
 675.145 +    CT_DoLog DEBUG "Extra config args passed: \"${extra_config}\""
 675.146 +
 675.147 +    # Add some default CC args
 675.148 +    extra_cc_args=
 675.149 +    case "${CT_LIBC_EXTRA_CC_ARGS}" in
 675.150 +        *-mbig-endian*) ;;
 675.151 +        *-mlittle-endian*) ;;
 675.152 +        *)  case "${CT_ARCH_BE},${CT_ARCH_LE}" in
 675.153 +                y,) extra_cc_args="${extra_cc_args} -mbig-endian";;
 675.154 +                ,y) extra_cc_args="${extra_cc_args} -mlittle-endian";;
 675.155 +            esac;;
 675.156 +    esac
 675.157 +
 675.158 +    CT_DoLog DEBUG "Extra CC args passed: \"${extra_cc_args}\""
 675.159 +
 675.160 +    # sh3 and sh4 really need to set configparms as of gcc-3.4/glibc-2.3.2
 675.161 +    # note: this is awkward, doesn't work well if you need more than one line in configparms
 675.162 +    echo ${CT_LIBC_GLIBC_CONFIGPARMS} > configparms
 675.163 +
 675.164 +    # For glibc 2.3.4 and later we need to set some autoconf cache
 675.165 +    # variables, because nptl/sysdeps/pthread/configure.in does not
 675.166 +    # work when cross-compiling.
 675.167 +    if test -d ${GLIBC_DIR}/nptl; then
 675.168 +        libc_cv_forced_unwind=yes
 675.169 +        libc_cv_c_cleanup=yes
 675.170 +        export libc_cv_forced_unwind libc_cv_c_cleanup
 675.171 +    fi
 675.172 +
 675.173 +    # Configure with --prefix the way we want it on the target...
 675.174 +    # There are a whole lot of settings here.  You'll probably want
 675.175 +    # to read up on what they all mean, and customize a bit, possibly by setting GLIBC_EXTRA_CONFIG
 675.176 +    # Compare these options with the ones used when installing the glibc headers above - they're different.
 675.177 +    # Adding "--without-gd" option to avoid error "memusagestat.c:36:16: gd.h: No such file or directory" 
 675.178 +    # See also http://sources.redhat.com/ml/libc-alpha/2000-07/msg00024.html. 
 675.179 +    # Set BUILD_CC, or you won't be able to build datafiles
 675.180 +    # Set --build, else glibc-2.3.2 will think you're not cross-compiling, and try to run the test programs
 675.181 +
 675.182 +    BUILD_CC=${CT_CC_NATIVE}                                        \
 675.183 +    CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O"   \
 675.184 +    CC="${CT_TARGET}-gcc ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \
 675.185 +    AR=${CT_TARGET}-ar                                              \
 675.186 +    RANLIB=${CT_TARGET}-ranlib                                      \
 675.187 +    "${CT_SRC_DIR}/${CT_LIBC_FILE}/configure"                       \
 675.188 +        --prefix=/usr                                               \
 675.189 +        --build=${CT_BUILD} --host=${CT_TARGET}                     \
 675.190 +        ${CT_LIBC_GLIBC_EXTRA_CONFIG}                               \
 675.191 +        ${extra_config}                                             \
 675.192 +        --without-cvs                                               \
 675.193 +        --disable-profile                                           \
 675.194 +        --disable-debug                                             \
 675.195 +        --without-gd                                                \
 675.196 +        --with-headers="${CT_HEADERS_DIR}"                          2>&1 |CT_DoLog DEBUG
 675.197 +
 675.198 +    if grep -l '^install-lib-all:' "${CT_SRC_DIR}/${CT_LIBC_FILE}/Makerules" > /dev/null; then
 675.199 +        # nptl-era glibc.
 675.200 +        # If the install-lib-all target (which is added by our make-install-lib-all.patch)
 675.201 +        # is present, it means we're building glibc-2.3.3 or later, and we can't
 675.202 +        # build programs yet, as they require libeh, which won't be installed
 675.203 +        # until full build of gcc
 675.204 +        GLIBC_INITIAL_BUILD_RULE=lib
 675.205 +        GLIBC_INITIAL_INSTALL_RULE="install-lib-all install-headers"
 675.206 +        GLIBC_INSTALL_APPS_LATER=yes
 675.207 +    else
 675.208 +        # classic glibc.  
 675.209 +        # We can build and install everything with the bootstrap compiler.
 675.210 +        GLIBC_INITIAL_BUILD_RULE=all
 675.211 +        GLIBC_INITIAL_INSTALL_RULE=install
 675.212 +        GLIBC_INSTALL_APPS_LATER=no
 675.213 +    fi
 675.214 +
 675.215 +    # If this fails with an error like this:
 675.216 +    # ...  linux/autoconf.h: No such file or directory 
 675.217 +    # then you need to set the KERNELCONFIG variable to point to a .config file for this arch.
 675.218 +    # The following architectures are known to need kernel .config: alpha, arm, ia64, s390, sh, sparc
 675.219 +    # Note: LD and RANLIB needed by glibc-2.1.3's c_stub directory, at least on macosx
 675.220 +    # No need for PARALLELMFLAGS here, Makefile already reads this environment variable
 675.221 +    CT_DoLog EXTRA "Building C library"
 675.222 +    make LD=${CT_TARGET}-ld             \
 675.223 +         RANLIB=${CT_TARGET}-ranlib     \
 675.224 +         ${GLIBC_INITIAL_BUILD_RULE}    2>&1 |CT_DoLog DEBUG
 675.225 +
 675.226 +    CT_DoLog EXTRA "Installing C library"
 675.227 +    make install_root="${CT_SYSROOT_DIR}"   \
 675.228 +         ${LIBC_SYSROOT_ARG}                \
 675.229 +         ${GLIBC_INITIAL_INSTALL_RULE}      2>&1 |CT_DoLog DEBUG
 675.230 +
 675.231 +    # This doesn't seem to work when building a crosscompiler,
 675.232 +    # as it tries to execute localedef using the just-built ld.so!?
 675.233 +    #CT_DoLog EXTRA "Installing locales"
 675.234 +    #make localedata/install-locales install_root=${SYSROOT} 2>&1 |CT_DoLog DEBUG
 675.235 +
 675.236 +    # Fix problems in linker scripts.
 675.237 +    #
 675.238 +    # 1. Remove absolute paths
 675.239 +    # Any file in a list of known suspects that isn't a symlink is assumed to be a linker script.
 675.240 +    # FIXME: test -h is not portable
 675.241 +    # FIXME: probably need to check more files than just these three...
 675.242 +    # Need to use sed instead of just assuming we know what's in libc.so because otherwise alpha breaks
 675.243 +    #
 675.244 +    # 2. Remove lines containing BUG per http://sources.redhat.com/ml/bug-glibc/2003-05/msg00055.html,
 675.245 +    # needed to fix gcc-3.2.3/glibc-2.3.2 targeting arm
 675.246 +    #
 675.247 +    # To make "strip *.so.*" not fail (ptxdist does this), rename to .so_orig rather than .so.orig
 675.248 +    CT_DoLog EXTRA "Fixing C library linker scripts"
 675.249 +    for file in libc.so libpthread.so libgcc_s.so; do
 675.250 +        for dir in lib lib64 usr/lib usr/lib64; do
 675.251 +            if [ -f "${CT_SYSROOT_DIR}/${dir}/${file}" -a ! -L ${CT_SYSROOT_DIR}/$lib/$file ]; then
 675.252 +                mv "${CT_SYSROOT_DIR}/${dir}/${file}" "${CT_SYSROOT_DIR}/${dir}/${file}_orig"
 675.253 +                CT_DoLog DEBUG "Fixing \"${CT_SYS_ROOT_DIR}/${dir}/${file}\""
 675.254 +                sed -i -r -e 's,/usr/lib/,,g;
 675.255 +                              s,/usr/lib64/,,g;
 675.256 +                              s,/lib/,,g;
 675.257 +                              s,/lib64/,,g;
 675.258 +                              /BUG in libc.scripts.output-format.sed/d' "${CT_SYSROOT_DIR}/${dir}/${file}_orig"
 675.259 +            fi
 675.260 +        done
 675.261 +    done
 675.262 +
 675.263 +    CT_EndStep
 675.264 +}
 675.265 +
 675.266 +# This function finishes the glibc install
 675.267 +do_libc_finish() {
 675.268 +    # Finally, build and install glibc programs, now that libeh (if any) is installed
 675.269 +    # Don't do this unless needed, 'cause it causes glibc-2.{1.3,2.2} to fail here with
 675.270 +    # .../gcc-3.4.1-glibc-2.1.3/build-glibc/libc.so.6: undefined reference to `__deregister_frame_info'
 675.271 +    # .../gcc-3.4.1-glibc-2.1.3/build-glibc/libc.so.6: undefined reference to `__register_frame_info'
 675.272 +    [ "${GLIBC_INSTALL_APPS_LATER}" = "yes" ] || return 0
 675.273 +
 675.274 +    CT_DoStep INFO "Finishing C library"
 675.275 +
 675.276 +    cd "${CT_BUILD_DIR}/build-libc"
 675.277 +
 675.278 +    CT_DoLog EXTRA "Re-building C library"
 675.279 +    make LD=${CT_TARGET}-ld RANLIB=${CT_TARGET}-ranlib 2>&1 |CT_DoLog DEBUG
 675.280 +
 675.281 +    CT_DoLog EXTRA "Installing missing C library components"
 675.282 +    # note: should do full install and then fix linker scripts, but this is faster
 675.283 +    for t in bin rootsbin sbin data others; do
 675.284 +        make install_root="${CT_SYSROOT_DIR}"   \
 675.285 +             ${LIBC_SYSROOT_ARG}                \
 675.286 +             install-${t}                       2>&1 |CT_DoLog DEBUG
 675.287 +    done
 675.288 +}
   676.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   676.2 +++ b/scripts/build/libc_libfloat.sh	Sat Feb 24 11:00:05 2007 +0000
   676.3 @@ -0,0 +1,31 @@
   676.4 +# This file adds functions to build libfloat
   676.5 +# Copyright 2007 Yann E. MORIN
   676.6 +# Licensed under the GPL v2. See COPYING in the root of this package
   676.7 +
   676.8 +do_libfloat() {
   676.9 +    # Here we build and install libfloat for the target, so that the C library
  676.10 +    # builds OK with those versions of gcc that have severed softfloat support
  676.11 +    # code
  676.12 +    [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] || return 0
  676.13 +	CT_DoStep INFO "Installing software floating point emulation library libfloat"
  676.14 +
  676.15 +    CT_Pushd "${CT_BUILD_DIR}"
  676.16 +    CT_DoLog EXTRA "Copying sources to build dir"
  676.17 +    mkdir build-libfloat
  676.18 +    cd build-libfloat
  676.19 +    ( cd "${CT_SRC_DIR}/${CT_LIBFLOAT_FILE}"; tar cf - . ) |tar xvf - |CT_DoLog DEBUG
  676.20 +
  676.21 +    CT_DoLog EXTRA "Cleaning library"
  676.22 +    make clean 2>&1 |CT_DoLog DEBUG
  676.23 +
  676.24 +    CT_DoLog EXTRA "Building library"
  676.25 +    make CROSS_COMPILE="${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-" 2>&1 |CT_DoLog DEBUG
  676.26 +
  676.27 +    CT_DoLog EXTRA "Installing library"
  676.28 +    make CROSS_COMPILE="${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-" \
  676.29 +         DESTDIR="${CT_SYSROOT_DIR}" install                       2>&1 |CT_DoLog DEBUG
  676.30 +
  676.31 +    CT_Popd
  676.32 +
  676.33 +    CT_EndStep
  676.34 +}
   677.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   677.2 +++ b/scripts/build/libc_uClibc.sh	Sat Feb 24 11:00:05 2007 +0000
   677.3 @@ -0,0 +1,235 @@
   677.4 +# This file declares functions to install the uClibc C library
   677.5 +# Copyright 2007 Yann E. MORIN
   677.6 +# Licensed under the GPL v2. See COPYING in the root of this package
   677.7 +
   677.8 +
   677.9 +# Check that uClibc has been previously configured
  677.10 +do_libc_check_config() {
  677.11 +    CT_DoStep INFO "Checking C library configuration"
  677.12 +
  677.13 +    CT_TestOrAbort "You did not provide a uClibc config file!" -n "${CT_LIBC_UCLIBC_CONFIG_FILE}" -a -f "${CT_LIBC_UCLIBC_CONFIG_FILE}"
  677.14 +
  677.15 +    cp "${CT_LIBC_UCLIBC_CONFIG_FILE}" "${CT_BUILD_DIR}/uClibc.config"
  677.16 +
  677.17 +    if egrep '^KERNEL_SOURCE=' "${CT_LIBC_UCLIBC_CONFIG_FILE}" >/dev/null 2>&1; then
  677.18 +        CT_DoLog WARN "Your uClibc version refers to the kernel _sources_, which is bad."
  677.19 +        CT_DoLog WARN "I can't guarantee that our little hack will work. Please try to upgrade."
  677.20 +    fi
  677.21 +
  677.22 +    CT_DoLog EXTRA "Munging uClibc configuration"
  677.23 +    mungeuClibcConfig "${CT_BUILD_DIR}/uClibc.config"
  677.24 +
  677.25 +    CT_EndStep
  677.26 +}
  677.27 +
  677.28 +# This functions installs uClibc's headers
  677.29 +do_libc_headers() {
  677.30 +    # Only need to install bootstrap uClibc headers for gcc-3.0 and above?  Or maybe just gcc-3.3 and above?
  677.31 +    # See also http://gcc.gnu.org/PR8180, which complains about the need for this step.
  677.32 +    grep -q 'gcc-[34]' "${CT_SRC_DIR}/${CT_CC_CORE_FILE}/ChangeLog" || return 0
  677.33 +
  677.34 +    CT_DoStep INFO "Installing C library headers"
  677.35 +
  677.36 +    mkdir -p "${CT_BUILD_DIR}/build-libc-headers"
  677.37 +    cd "${CT_BUILD_DIR}/build-libc-headers"
  677.38 +
  677.39 +    # Simply copy files until uClibc has the ablity to build out-of-tree
  677.40 +    CT_DoLog EXTRA "Copying sources to build dir"
  677.41 +    { cd "${CT_SRC_DIR}/${CT_LIBC_FILE}"; tar cf - .; } |tar xf -
  677.42 +
  677.43 +    # Retrieve the config file
  677.44 +    cp "${CT_BUILD_DIR}/uClibc.config" .config
  677.45 +
  677.46 +    # uClibc uses the CROSS environment variable as a prefix to the
  677.47 +    # compiler tools to use.  Setting it to the empty string forces
  677.48 +    # use of the native build host tools, which we need at this
  677.49 +    # stage, as we don't have target tools yet.
  677.50 +    CT_DoLog EXTRA "Applying configuration"
  677.51 +    CT_DoYes "" |make CROSS= PREFIX="${CT_SYSROOT_DIR}/" oldconfig 2>&1 |CT_DoLog DEBUG
  677.52 +
  677.53 +    CT_DoLog EXTRA "Building headers"
  677.54 +    make ${PARALLELMFLAGS} CROSS= PREFIX="${CT_SYSROOT_DIR}/" headers 2>&1 |CT_DoLog DEBUG
  677.55 +
  677.56 +    CT_DoLog EXTRA "Installing headers"
  677.57 +    make CROSS= PREFIX="${CT_SYSROOT_DIR}/" install_dev 2>&1 |CT_DoLog DEBUG
  677.58 +
  677.59 +    CT_EndStep
  677.60 +}
  677.61 +
  677.62 +# This function build and install the full uClibc
  677.63 +do_libc() {
  677.64 +    CT_DoStep INFO "Installing C library"
  677.65 +
  677.66 +    mkdir -p "${CT_BUILD_DIR}/build-libc"
  677.67 +    cd "${CT_BUILD_DIR}/build-libc"
  677.68 +
  677.69 +    # Simply copy files until uClibc has the ablity to build out-of-tree
  677.70 +    CT_DoLog EXTRA "Copying sources to build dir"
  677.71 +    { cd "${CT_SRC_DIR}/${CT_LIBC_FILE}"; tar cf - .; } |tar xf -
  677.72 +
  677.73 +    # Retrieve the config file
  677.74 +    cp "${CT_BUILD_DIR}/uClibc.config" .config
  677.75 +
  677.76 +    # uClibc uses the CROSS environment variable as a prefix to the compiler
  677.77 +    # tools to use.  The newly built tools should be in our path, so we need
  677.78 +    # only give the correct name for them.
  677.79 +    # Note about CFLAGS: In uClibc, CFLAGS are generated by Rules.mak,
  677.80 +    # depending  on the configuration of the library. That is, they are tailored
  677.81 +    # to best fit the target. So it is useless and seems to be a bad thing to
  677.82 +    # use LIBC_EXTRA_CFLAGS here.
  677.83 +    CT_DoLog EXTRA "Applying configuration"
  677.84 +    CT_DoYes "" |make ${PARALLELMFLAGS}             \
  677.85 +                      CROSS=${CT_TARGET}-           \
  677.86 +                      PREFIX="${CT_SYSROOT_DIR}/"   \
  677.87 +                      oldconfig                     2>&1 |CT_DoLog DEBUG
  677.88 +
  677.89 +    # We do _not_ want to strip anything for now, in case we specifically
  677.90 +    # asked for a debug toolchain, thus the STRIPTOOL= assignment
  677.91 +    CT_DoLog EXTRA "Building C library"
  677.92 +    make ${PARALLELMFLAGS}              \
  677.93 +         CROSS=${CT_TARGET}-            \
  677.94 +         PREFIX="${CT_SYSROOT_DIR}/"    \
  677.95 +         STRIPTOOL=true                 \
  677.96 +         all                            2>&1 |CT_DoLog DEBUG
  677.97 +
  677.98 +    # YEM-FIXME: we want to install libraries in $SYSROOT/lib, but we don't want
  677.99 +    # to install headers in $SYSROOT/include, thus making only install_runtime.
 677.100 +    # Plus, the headers were previously installed earlier with install_dev, so
 677.101 +    # all should be well. Unfortunately, the install_dev target does not install
 677.102 +    # crti.o and consorts... :-( So reverting to target 'install'.
 677.103 +    # Note: PARALLELMFLAGS is not usefull for installation.
 677.104 +    # We do _not_ want to strip anything for now, in case we specifically
 677.105 +    # asked for a debug toolchain, thus the STRIPTOOL= assignment
 677.106 +    CT_DoLog EXTRA "Installing C library"
 677.107 +    make CROSS=${CT_TARGET}-            \
 677.108 +         PREFIX="${CT_SYSROOT_DIR}/"    \
 677.109 +         STRIPTOOL=true                 \
 677.110 +         install                        2>&1 |CT_DoLog DEBUG
 677.111 +
 677.112 +    CT_EndStep
 677.113 +}
 677.114 +
 677.115 +# This function is used to install those components needing the final C compiler
 677.116 +do_libc_finish() {
 677.117 +    CT_DoStep INFO "Finishing C library"
 677.118 +    # uClibc has nothing to finish
 677.119 +    CT_DoLog EXTRA "uClibc has nothing to finish"
 677.120 +    CT_EndStep
 677.121 +}
 677.122 +
 677.123 +# Initialises the .config file to sensible values
 677.124 +mungeuClibcConfig() {
 677.125 +    config_file="$1"
 677.126 +    munge_file="${CT_BUILD_DIR}/munge-uClibc-config.sed"
 677.127 +
 677.128 +    cat > "${munge_file}" <<-ENDSED
 677.129 +s/^(TARGET_.*)=y$/# \\1 is not set/
 677.130 +s/^# TARGET_${CT_KERNEL_ARCH} is not set/TARGET_${CT_KERNEL_ARCH}=y/
 677.131 +s/^TARGET_ARCH=".*"/TARGET_ARCH="${CT_KERNEL_ARCH}"/
 677.132 +ENDSED
 677.133 +
 677.134 +    case "${CT_ARCH_BE},${CT_ARCH_LE}" in
 677.135 +        y,) cat >> "${munge_file}" <<-ENDSED
 677.136 +s/.*(ARCH_BIG_ENDIAN).*/\\1=y/
 677.137 +s/.*(ARCH_LITTLE_ENDIAN).*/# \\1 is not set/
 677.138 +ENDSED
 677.139 +        ;;
 677.140 +        ,y) cat >> "${munge_file}" <<-ENDSED
 677.141 +s/.*(ARCH_BIG_ENDIAN).*/# \\1 is not set/
 677.142 +s/.*(ARCH_LITTLE_ENDIAN).*/\\1=y/
 677.143 +ENDSED
 677.144 +        ;;
 677.145 +    esac
 677.146 +
 677.147 +    case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in
 677.148 +        y,) cat >> "${munge_file}" <<-ENDSED
 677.149 +s/.*(HAS_FPU).*/\\1=y/
 677.150 +ENDSED
 677.151 +            ;;
 677.152 +        ,y) cat >> "${munge_file}" <<-ENDSED
 677.153 +s/.*(HAS_FPU).*/\\# \\1 is not set/
 677.154 +ENDSED
 677.155 +            ;;
 677.156 +    esac
 677.157 +
 677.158 +    # Change paths to work with crosstool
 677.159 +    # From http://www.uclibc.org/cgi-bin/viewcvs.cgi?rev=16846&view=rev
 677.160 +    #  " we just want the kernel headers, not the whole kernel source ...
 677.161 +    #  " so people may need to update their paths slightly
 677.162 +    quoted_kernel_source=`echo "${CT_HEADERS_DIR}" | sed -r -e 's,/include/?$,,; s,/,\\\\/,g;'`
 677.163 +    quoted_headers_dir=`echo ${CT_HEADERS_DIR} | sed -r -e 's,/,\\\\/,g;'`
 677.164 +    # CROSS_COMPILER_PREFIX is left as is, as the CROSS parameter is forced on the command line
 677.165 +    # DEVEL_PREFIX is left as '/usr/' because it is post-pended to $PREFIX, wich is the correct value of ${PREFIX}/${TARGET}
 677.166 +    # Some (old) versions of uClibc use KERNEL_SOURCE (which is _wrong_), and
 677.167 +    # newer versions use KERNEL_HEADERS (which is right). See:
 677.168 +    cat >> "${munge_file}" <<-ENDSED
 677.169 +s/^DEVEL_PREFIX=".*"/DEVEL_PREFIX="\\/usr\\/"/
 677.170 +s/^RUNTIME_PREFIX=".*"/RUNTIME_PREFIX="\\/"/
 677.171 +s/^SHARED_LIB_LOADER_PREFIX=.*/SHARED_LIB_LOADER_PREFIX="\\/lib\\/"/
 677.172 +s/^KERNEL_SOURCE=".*"/KERNEL_SOURCE="${quoted_kernel_source}"/
 677.173 +s/^KERNEL_HEADERS=".*"/KERNEL_HEADERS="${quoted_headers_dir}"/
 677.174 +s/^UCLIBC_DOWNLOAD_PREGENERATED_LOCALE=y/\\# UCLIBC_DOWNLOAD_PREGENERATED_LOCALE is not set/
 677.175 +ENDSED
 677.176 +
 677.177 +    # Hack our -pipe into WARNINGS, which will be internally incorporated to
 677.178 +    # CFLAGS. This a dirty hack, but yet needed
 677.179 +    if [ "${CT_USE_PIPES}" = "y" ]; then
 677.180 +        cat >> "${munge_file}" <<-ENDSED
 677.181 +s/^(WARNINGS=".*)"$/\\1 -pipe"/
 677.182 +ENDSED
 677.183 +    fi
 677.184 +
 677.185 +    # Force on options needed for C++ if we'll be making a C++ compiler.
 677.186 +    # Note that the two PREGEN_LOCALE and the XLOCALE lines may be missing
 677.187 +    # entirely if LOCALE is not set.  If LOCALE was already set, we'll
 677.188 +    # assume the user has already made all the appropriate generation
 677.189 +    # arrangements.  Note that having the uClibc Makefile download the
 677.190 +    # pregenerated locales is not compatible with crosstool; besides,
 677.191 +    # crosstool downloads them as part of getandpatch.sh.
 677.192 +    if [ "${CT_CC_LANG_CXX}" = "y" ]; then
 677.193 +        cat >> "${munge_file}" <<-ENDSED
 677.194 +s/^# DO_C99_MATH is not set/DO_C99_MATH=y/
 677.195 +s/^# UCLIBC_CTOR_DTOR is not set/UCLIBC_CTOR_DTOR=y/
 677.196 +# Add these three lines when doing C++?
 677.197 +#s/^# UCLIBC_HAS_WCHAR is not set/UCLIBC_HAS_WCHAR=y/
 677.198 +#s/^# UCLIBC_HAS_LOCALE is not set/UCLIBC_HAS_LOCALE=y\\nUCLIBC_PREGENERATED_LOCALE_DATA=y\\n\\# UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA is not set\\n\\# UCLIBC_HAS_XLOCALE is not set/
 677.199 +#s/^# UCLIBC_HAS_GNU_GETOPT is not set/UCLIBC_HAS_GNU_GETOPT=y/
 677.200 +ENDSED
 677.201 +    fi
 677.202 +
 677.203 +    # Force on debug options if asked for
 677.204 +    case "${CT_LIBC_UCLIBC_DEBUG_LEVEL}" in
 677.205 +      0)
 677.206 +        cat >>"${munge_file}" <<-ENDSED
 677.207 +s/^PTHREADS_DEBUG_SUPPORT=y/# PTHREADS_DEBUG_SUPPORT is not set/
 677.208 +s/^DODEBUG=y/# DODEBUG is not set/
 677.209 +s/^DODEBUG_PT=y/# DODEBUG_PT is not set/
 677.210 +s/^DOASSERTS=y/# DOASSERTS is not set/
 677.211 +s/^SUPPORT_LD_DEBUG=y/# SUPPORT_LD_DEBUG is not set/
 677.212 +s/^SUPPORT_LD_DEBUG_EARLY=y/# SUPPORT_LD_DEBUG_EARLY is not set/
 677.213 +ENDSED
 677.214 +        ;;
 677.215 +      1)
 677.216 +        cat >>"${munge_file}" <<-ENDSED
 677.217 +s/^# PTHREADS_DEBUG_SUPPORT is not set.*/PTHREADS_DEBUG_SUPPORT=y/
 677.218 +s/^# DODEBUG is not set.*/DODEBUG=y/
 677.219 +s/^DODEBUG_PT=y/# DODEBUG_PT is not set/
 677.220 +s/^DOASSERTS=y/# DOASSERTS is not set/
 677.221 +s/^SUPPORT_LD_DEBUG=y/# SUPPORT_LD_DEBUG is not set/
 677.222 +s/^SUPPORT_LD_DEBUG_EARLY=y/# SUPPORT_LD_DEBUG_EARLY is not set/
 677.223 +ENDSED
 677.224 +        ;;
 677.225 +      2)
 677.226 +        cat >>"${munge_file}" <<-ENDSED
 677.227 +s/^# PTHREADS_DEBUG_SUPPORT is not set.*/PTHREADS_DEBUG_SUPPORT=y/
 677.228 +s/^# DODEBUG is not set.*/DODEBUG=y/
 677.229 +s/^# DODEBUG_PT is not set.*/DODEBUG_PT=y/
 677.230 +s/^# DOASSERTS is not set.*/DOASSERTS=y/
 677.231 +s/^# SUPPORT_LD_DEBUG is not set.*/SUPPORT_LD_DEBUG=y/
 677.232 +s/^# SUPPORT_LD_DEBUG_EARLY is not set.*/SUPPORT_LD_DEBUG_EARLY=y/
 677.233 +ENDSED
 677.234 +        ;;
 677.235 +    esac
 677.236 +    sed -r -i -f "${munge_file}" "${config_file}"
 677.237 +    rm -f "${munge_file}"
 677.238 +}
   678.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   678.2 +++ b/scripts/buildToolchain.sh	Sat Feb 24 11:00:05 2007 +0000
   678.3 @@ -0,0 +1,123 @@
   678.4 +# This scripts calls each component's build script.
   678.5 +# Copyright 2007 Yann E. MORIN
   678.6 +# Licensed under the GPL v2. See COPYING in the root of this package
   678.7 +
   678.8 +# Parse all build files to have the needed functions.
   678.9 +. "${CT_TOP_DIR}/scripts/build/kernel_${CT_KERNEL}.sh"
  678.10 +. "${CT_TOP_DIR}/scripts/build/binutils.sh"
  678.11 +. "${CT_TOP_DIR}/scripts/build/libc_libfloat.sh"
  678.12 +. "${CT_TOP_DIR}/scripts/build/libc_${CT_LIBC}.sh"
  678.13 +. "${CT_TOP_DIR}/scripts/build/cc_core_${CT_CC_CORE}.sh"
  678.14 +. "${CT_TOP_DIR}/scripts/build/cc_${CT_CC}.sh"
  678.15 +
  678.16 +# Arrange paths depending on wether we use sys-root or not.
  678.17 +if [ "${CT_USE_SYSROOT}" = "y" ]; then
  678.18 +    CT_SYSROOT_DIR="${CT_PREFIX_DIR}/${CT_TARGET}/sys-root"
  678.19 +    CT_HEADERS_DIR="${CT_SYSROOT_DIR}/usr/include"
  678.20 +    BINUTILS_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
  678.21 +    CC_CORE_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
  678.22 +    CC_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
  678.23 +    LIBC_SYSROOT_ARG=""
  678.24 +    # glibc's prefix must be exactly /usr, else --with-sysroot'd gcc will get
  678.25 +    # confused when $sysroot/usr/include is not present.
  678.26 +    # Note: --prefix=/usr is magic!
  678.27 +    # See http://www.gnu.org/software/libc/FAQ.html#s-2.2
  678.28 +else
  678.29 +    # plain old way. All libraries in prefix/target/lib
  678.30 +    CT_SYSROOT_DIR="${CT_PREFIX_DIR}/${CT_TARGET}"
  678.31 +    CT_HEADERS_DIR="${CT_SYSROOT_DIR}/include"
  678.32 +    # hack!  Always use --with-sysroot for binutils.
  678.33 +    # binutils 2.14 and later obey it, older binutils ignore it.
  678.34 +    # Lets you build a working 32->64 bit cross gcc
  678.35 +    BINUTILS_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
  678.36 +    # Use --with-headers, else final gcc will define disable_glibc while
  678.37 +    # building libgcc, and you'll have no profiling
  678.38 +    CC_CORE_SYSROOT_ARG="--without-headers"
  678.39 +    CC_SYSROOT_ARG="--with-headers=${CT_HEADERS_DIR}"
  678.40 +    LIBC_SYSROOT_ARG="prefix="
  678.41 +fi
  678.42 +
  678.43 +# Prepare the 'lib' directories in sysroot, else the ../lib64 hack used by
  678.44 +# 32 -> 64 bit crosscompilers won't work, and build of final gcc will fail with
  678.45 +#  "ld: cannot open crti.o: No such file or directory"
  678.46 +mkdir -p "${CT_SYSROOT_DIR}/lib"
  678.47 +mkdir -p "${CT_SYSROOT_DIR}/usr/lib"
  678.48 +
  678.49 +# Canadian-cross are really picky on the way they are built. Tweak the values.
  678.50 +if [ "${CT_CANADIAN}" = "y" ]; then
  678.51 +    # Arrange so that gcc never, ever think that build system == host system
  678.52 +    CT_CANADIAN_OPT="--build=`echo \"${CT_BUILD}\" |sed -r -e 's/-/-build_/'`"
  678.53 +    # We shall have a compiler for this target!
  678.54 +    # Do test here...
  678.55 +else
  678.56 +    CT_HOST="${CT_BUILD}"
  678.57 +    CT_CANADIAN_OPT=
  678.58 +    # Add the target toolchain in the path so that we can build the C library
  678.59 +    export PATH="${CT_PREFIX_DIR}/bin:${CT_CC_CORE_PREFIX_DIR}/bin:${PATH}"
  678.60 +fi
  678.61 +
  678.62 +# Modify GCC_HOST to never be equal to $BUILD or $TARGET
  678.63 +# This strange operation causes gcc to always generate a cross-compiler
  678.64 +# even if the build machine is the same kind as the host.
  678.65 +# This is why CC has to be set when doing a canadian cross; you can't find a
  678.66 +# host compiler by appending -gcc to our whacky $GCC_HOST
  678.67 +# Kludge: it is reported that the above causes canadian crosses with cygwin
  678.68 +# hosts to fail, so avoid it just in that one case.  It would be cleaner to
  678.69 +# just move this into the non-canadian case above, but I'm afraid that might
  678.70 +# cause some configure script somewhere to decide that since build==host, they
  678.71 +# could run host binaries.
  678.72 +# (Copied almost as-is from original crosstool):
  678.73 +case "${CT_KERNEL},${CT_CANADIAN}" in
  678.74 +    cygwin,y) ;;
  678.75 +    *)        CT_HOST="`echo \"${CT_HOST}\" |sed -r -e 's/-/-host_/;'`";;
  678.76 +esac
  678.77 +
  678.78 +# Ha. cygwin host have an .exe suffix (extension) for executables.
  678.79 +[ "${CT_KERNEL}" = "cygwin" ] && EXEEXT=".exe" || EXEEXT=""
  678.80 +
  678.81 +# Transform the ARCH into a kernel-understandable ARCH
  678.82 +case "${CT_ARCH}" in
  678.83 +    x86) CT_KERNEL_ARCH=i386;;
  678.84 +    ppc) CT_KERNL_ARCH=powerpc;;
  678.85 +    *)   CT_KERNEL_ARCH="${CT_ARCH}";;
  678.86 +esac
  678.87 +
  678.88 +# Build up the TARGET_CFLAGS from user-provided options
  678.89 +tmp_target_CFLAGS=
  678.90 +[ -n "${CT_ARCH_CPU}" ]  && tmp_target_CFLAGS="${tmp_target_CFLAGS} -mcpu=${CT_ARCH_CPU}"
  678.91 +[ -n "${CT_ARCH_TUNE}" ] && tmp_target_CFLAGS="${tmp_target_CFLAGS} -mtune=${CT_ARCH_TUNE}"
  678.92 +[ -n "${CT_ARCH_ARCH}" ] && tmp_target_CFLAGS="${tmp_target_CFLAGS} -march=${CT_ARCH_ARCH}"
  678.93 +[ -n "${CT_ARCH_FPU}" ]  && tmp_target_CFLAGS="${tmp_target_CFLAGS} -mfpu=${CT_ARCH_FPU}"
  678.94 +# Override with user-specified CFLAGS
  678.95 +CT_TARGET_CFLAGS="${tmp_target_CFLAGS} ${CT_TARGET_CFLAGS}"
  678.96 +
  678.97 +# Help gcc
  678.98 +CT_CFLAGS_FOR_HOST=
  678.99 +[ "${CT_USE_PIPES}" = "y" ] && CT_CFLAGS_FOR_HOST="${CT_CFLAGS_FOR_HOST} -pipe"
 678.100 +
 678.101 +# And help make go faster
 678.102 +PARALLELMFLAGS=
 678.103 +[ ${CT_PARALLEL_JOBS} -ne 0 ] && PARALLELMFLAGS="${PARALLELMFLAGS} -j${CT_PARALLEL_JOBS}"
 678.104 +[ ${CT_LOAD} -ne 0 ] && PARALLELMFLAGS="${PARALLELMFLAGS} -l${CT_LOAD}"
 678.105 +
 678.106 +CT_DoStep EXTRA "Dumping internal crosstool-NG configuration"
 678.107 +CT_DoLog EXTRA "Building a toolchain for :"
 678.108 +CT_DoLog EXTRA "  build  = ${CT_BUILD}"
 678.109 +CT_DoLog EXTRA "  host   = ${CT_HOST}"
 678.110 +CT_DoLog EXTRA "  target = ${CT_TARGET}"
 678.111 +set |egrep '^CT_.+=' |sort |CT_DoLog DEBUG
 678.112 +CT_EndStep
 678.113 +
 678.114 +# Now for the job by itself.
 678.115 +# Check the C library config ASAP, before the user gets bored, and is
 678.116 +# gone having his/her coffee
 678.117 +do_libc_check_config
 678.118 +do_kernel_check_config
 678.119 +do_kernel_headers
 678.120 +do_binutils
 678.121 +do_libc_headers
 678.122 +do_cc_core
 678.123 +do_libfloat
 678.124 +do_libc
 678.125 +do_cc
 678.126 +do_libc_finish
   679.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   679.2 +++ b/scripts/crosstool.sh	Sat Feb 24 11:00:05 2007 +0000
   679.3 @@ -0,0 +1,273 @@
   679.4 +#!/bin/bash
   679.5 +# Copyright 2007 Yann E. MORIN
   679.6 +# Licensed under the GPL v2. See COPYING in the root of this package.
   679.7 +
   679.8 +# This is the main entry point to crosstool
   679.9 +# This will:
  679.10 +#   - download, extract and patch the toolchain components
  679.11 +#   - build and install each components in turn
  679.12 +#   - and eventually test the resulting toolchain
  679.13 +
  679.14 +# What this file does is prepare the environment, based upon the user-choosen
  679.15 +# options. It also checks the existing environment for un-friendly variables,
  679.16 +# and checks for needed tools. It eventually calls the main build script.
  679.17 +
  679.18 +# User must set CT_TOP_DIR in is environment!
  679.19 +# Once we can build out-of-tree, then this will have to go.
  679.20 +if [ -z "${CT_TOP_DIR}" -o ! -d "${CT_TOP_DIR}" ]; then
  679.21 +    # We don't have the functions right now, because we don't have CT_TOP_DIR.
  679.22 +    # Do the print stuff by hand:
  679.23 +    echo "CT_TOP_DIR not set. You must set CT_TOP_DIR to the top directory where crosstool is installed."
  679.24 +    exit 1
  679.25 +fi
  679.26 +
  679.27 +# Parse the common functions
  679.28 +. "${CT_TOP_DIR}/scripts/functions"
  679.29 +
  679.30 +CT_STAR_DATE=`CT_DoDate +%s%N`
  679.31 +CT_STAR_DATE_HUMAN=`CT_DoDate +%Y%m%d.%H%M%S`
  679.32 +
  679.33 +# Log to a temporary file until we have built our environment
  679.34 +CT_ACTUAL_LOG_FILE="`pwd`/$$.log"
  679.35 +
  679.36 +# CT_TOP_DIR should be an absolute path.
  679.37 +CT_TOP_DIR="`CT_MakeAbsolutePath \"${CT_TOP_DIR}\"`"
  679.38 +
  679.39 +# Parse the configuration file
  679.40 +CT_TestOrAbort "Configuration file not found. Please create one." -f "${CT_TOP_DIR}/.config"
  679.41 +. "${CT_TOP_DIR}/.config"
  679.42 +
  679.43 +# The progress bar indicator is asked for
  679.44 +if [ "${CT_LOG_PROGRESS_BAR}" = "y" ]; then
  679.45 +    _CT_PROG_BAR() {
  679.46 +        [ $((cpt/5)) -eq 0 ] && echo -en "/"
  679.47 +        [ $((cpt/5)) -eq 1 ] && echo -en "-"
  679.48 +        [ $((cpt/5)) -eq 2 ] && echo -en "\\"
  679.49 +        [ $((cpt/5)) -eq 3 ] && echo -en "|"
  679.50 +        echo -en "\r"
  679.51 +        cpt=$(((cpt+1)%20))
  679.52 +    }
  679.53 +    CT_PROG_BAR=_CT_PROG_BAR
  679.54 +    export -f _CT_PROG_BAR
  679.55 +else
  679.56 +    CT_PROG_BAR=
  679.57 +fi
  679.58 +
  679.59 +# Apply the color scheme if needed
  679.60 +if [ "${CT_LOG_USE_COLORS}" = "y" ]; then
  679.61 +    CT_ERROR_COLOR="${_A_NOR}${_A_BRI}${_F_RED}"
  679.62 +    CT_WARN_COLOR="${_A_NOR}${_A_BRI}${_F_YEL}"
  679.63 +    CT_INFO_COLOR="${_A_NOR}${_A_BRI}${_F_GRN}"
  679.64 +    CT_EXTRA_COLOR="${_A_NOR}${_A_DIM}${_F_GRN}"
  679.65 +    CT_DEBUG_COLOR="${_A_NOR}${_A_DIM}${_F_WHI}"
  679.66 +    CT_NORMAL_COLOR="${_A_NOR}"
  679.67 +else
  679.68 +    CT_ERROR_COLOR=
  679.69 +    CT_WARN_COLOR=
  679.70 +    CT_INFO_COLOR=
  679.71 +    CT_EXTRA_COLOR=
  679.72 +    CT_DEBUG_COLOR=
  679.73 +    CT_NORMAL_COLOR=
  679.74 +fi
  679.75 +
  679.76 +# Yes! We can do full logging from now on!
  679.77 +CT_DoLog INFO "Build started ${CT_STAR_DATE_HUMAN}"
  679.78 +
  679.79 +# Some sanity checks in the environment and needed tools
  679.80 +CT_DoLog INFO "Checking environment sanity"
  679.81 +
  679.82 +# Enable known ordering of files in directory listings:
  679.83 +CT_Test "Crosstool-NG might not work as expected with LANG=\"${LANG}\"" -n "${LANG}"
  679.84 +case "${LC_COLLATE},${LC_ALL}" in
  679.85 +  # These four combinations are known to sort files in the correct order:
  679.86 +  fr_FR*,)  ;;
  679.87 +  en_US*,)  ;;
  679.88 +  *,fr_FR*) ;;
  679.89 +  *,en_US*) ;;
  679.90 +  # Anything else is destined to be borked if not gracefuly handled:
  679.91 +  *) CT_DoLog WARN "Either LC_COLLATE=\"${LC_COLLATE}\" or LC_ALL=\"${LC_ALL}\" is not supported."
  679.92 +     export LC_ALL=`locale -a |egrep "^(fr_FR|en_US)" |head -n 1`
  679.93 +     CT_TestOrAbort "Neither en_US* nor fr_FR* locales found on your system." -n "${LC_ALL}"
  679.94 +     CT_DoLog WARN "Forcing to known working LC_ALL=\"${LC_ALL}\"."
  679.95 +     ;;
  679.96 +esac
  679.97 +
  679.98 +# Other environment sanity checks
  679.99 +CT_TestAndAbort "Don't set LD_LIBRARY_PATH. It screws up the build." -n "${LD_LIBRARY_PATH}"
 679.100 +CT_TestAndAbort "Don't set CFLAGS. It screws up the build." -n "${CFLAGS}"
 679.101 +CT_TestAndAbort "Don't set CXXFLAGS. It screws up the build." -n "${CXXFLAGS}"
 679.102 +CT_Test "GREP_OPTIONS screws up the build. Resetting." -n "${GREP_OPTIONS}"
 679.103 +GREP_OPTIONS=
 679.104 +CT_HasOrAbort awk
 679.105 +CT_HasOrAbort sed
 679.106 +CT_HasOrAbort bison
 679.107 +CT_HasOrAbort flex
 679.108 +
 679.109 +CT_DoStep DEBUG "Dumping crosstool-NG configuration"
 679.110 +cat ${CT_TOP_DIR}/.config |egrep '^(# |)CT_' |CT_DoLog DEBUG
 679.111 +CT_EndStep
 679.112 +
 679.113 +CT_DoLog INFO "Building environment variables"
 679.114 +
 679.115 +# This should go in buildToolchain.sh, but we might need it because it could
 679.116 +# be used by the user in his/her paths definitions.
 679.117 +# Target triplet: CT_TARGET needs a little love:
 679.118 +case "${CT_ARCH_BE},${CT_ARCH_LE}" in
 679.119 +    y,) target_endian_eb=eb; target_endian_el=;;
 679.120 +    ,y) target_endian_eb=; target_endian_el=el;;
 679.121 +esac
 679.122 +case "${CT_ARCH}" in
 679.123 +    arm)  CT_TARGET="${CT_ARCH}${target_endian_eb}";;
 679.124 +    mips) CT_TARGET="${CT_ARCH}${target_endian_el}";;
 679.125 +    x86*) # Much love for this one :-(
 679.126 +          # Ultimately, we should use config.sub to output the correct
 679.127 +          # procesor name. Work for later...
 679.128 +          arch="${CT_ARCH_ARCH}"
 679.129 +          [ -z "${arch}" ] && arch="${CT_ARCH_TUNE}"
 679.130 +          case "${CT_ARCH}" in
 679.131 +              x86_64)      CT_TARGET=x86_64;;
 679.132 +          	  *)  case "${arch}" in
 679.133 +                      "")                                       CT_TARGET=i386;;
 679.134 +                      i386|i486|i586|i686)                      CT_TARGET="${arch}";;
 679.135 +                      winchip*)                                 CT_TARGET=i486;;
 679.136 +                      pentium|pentium-mmx|c3*)                  CT_TARGET=i586;;
 679.137 +                      nocona|athlon*64|k8|athlon-fx|opteron)    CT_TARGET=x86_64;;
 679.138 +                      pentiumpro|pentium*|athlon*)              CT_TARGET=i686;;
 679.139 +                      *)                                        CT_TARGET=i586;;
 679.140 +                  esac;;
 679.141 +          esac;;
 679.142 +esac
 679.143 +case "${CT_TARGET_VENDOR}" in
 679.144 +    "") CT_TARGET="${CT_TARGET}-unknown";;
 679.145 +    *)  CT_TARGET="${CT_TARGET}-${CT_TARGET_VENDOR}";;
 679.146 +esac
 679.147 +case "${CT_KERNEL}" in
 679.148 +    linux*)  CT_TARGET="${CT_TARGET}-linux";;
 679.149 +    cygwin*) CT_TARGET="${CT_TARGET}-cygwin";;
 679.150 +esac
 679.151 +case "${CT_LIBC}" in
 679.152 +    glibc)  CT_TARGET="${CT_TARGET}-gnu";;
 679.153 +    uClibc) CT_TARGET="${CT_TARGET}-uclibc";;
 679.154 +esac
 679.155 +CT_TARGET="`${CT_TOP_DIR}/tools/config.sub ${CT_TARGET}`"
 679.156 +
 679.157 +# Now, build up the variables from the user-configured options.
 679.158 +CT_KERNEL_FILE="${CT_KERNEL}-${CT_KERNEL_VERSION}"
 679.159 +CT_BINUTILS_FILE="binutils-${CT_BINUTILS_VERSION}"
 679.160 +if [ "${CT_CC_USE_CORE}" != "y" ]; then
 679.161 +    CT_CC_CORE="${CT_CC}"
 679.162 +    CT_CC_CORE_VERSION="${CT_CC_VERSION}"
 679.163 +    CT_CC_CORE_EXTRA_CONFIG="${CT_CC_EXTRA_CONFIG}"
 679.164 +fi
 679.165 +CT_CC_CORE_FILE="${CT_CC_CORE}-${CT_CC_CORE_VERSION}"
 679.166 +CT_CC_FILE="${CT_CC}-${CT_CC_VERSION}"
 679.167 +CT_LIBC_FILE="${CT_LIBC}-${CT_LIBC_VERSION}"
 679.168 +[ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] && CT_LIBFLOAT_FILE="libfloat-990616"
 679.169 +
 679.170 +# Kludge: If any of the configured options needs CT_TARGET or CT_TOP_DIR,
 679.171 +# then rescan the options file now:
 679.172 +. "${CT_TOP_DIR}/.config"
 679.173 +
 679.174 +# Determine build system if not set by the user
 679.175 +CT_Test "You did not specify the build system. Guessing." -z "${CT_BUILD}"
 679.176 +CT_BUILD="`${CT_TOP_DIR}/tools/config.sub \"${CT_BUILD:-\`${CT_TOP_DIR}/tools/config.guess\`}\"`"
 679.177 +
 679.178 +# Get rid of pre-existing installed toolchain and previous build directories.
 679.179 +# We need to do that _before_ we can safely log, because the log file will
 679.180 +# most probably be in the toolchain directory.
 679.181 +if [ -d "${CT_PREFIX_DIR}" ]; then
 679.182 +    mv "${CT_PREFIX_DIR}" "${CT_PREFIX_DIR}.$$"
 679.183 +    nohup rm -rf "${CT_PREFIX_DIR}.$$" >/dev/null 2>&1 &
 679.184 +fi
 679.185 +mkdir -p "${CT_PREFIX_DIR}"
 679.186 +if [ -d "${CT_BUILD_DIR}" ]; then
 679.187 +    mv "${CT_BUILD_DIR}" "${CT_BUILD_DIR}.$$"
 679.188 +    nohup rm -rf "${CT_BUILD_DIR}.$$" >/dev/null 2>&1 &
 679.189 +fi
 679.190 +mkdir -p "${CT_BUILD_DIR}"
 679.191 +
 679.192 +# Check now if we can write to the destination directory:
 679.193 +if [ -d "${CT_PREFIX_DIR}" ]; then
 679.194 +    CT_TestAndAbort "Destination directory \"${CT_INSTALL_DIR}\" is not writeable" ! -w "${CT_PREFIX_DIR}"
 679.195 +else
 679.196 +    mkdir -p "${CT_PREFIX_DIR}" || CT_Abort "Could not create destination directory \"${CT_PREFIX_DIR}\""
 679.197 +fi
 679.198 +
 679.199 +# Redirect log to the actual log file now we can
 679.200 +# It's quite understandable that the log file will be installed in the
 679.201 +# install directory, so we must first ensure it exists and is writeable (above)
 679.202 +# before we can log there
 679.203 +t="${CT_ACTUAL_LOG_FILE}"
 679.204 +case "${CT_LOG_TO_FILE},${CT_LOG_FILE}" in
 679.205 +    ,*)   CT_ACTUAL_LOG_FILE=/dev/null
 679.206 +          rm -f "${t}"
 679.207 +          ;;
 679.208 +    y,/*) mkdir -p "`dirname \"${CT_LOG_FILE}\"`"
 679.209 +          CT_ACTUAL_LOG_FILE="${CT_LOG_FILE}"
 679.210 +          mv "${t}" "${CT_ACTUAL_LOG_FILE}"
 679.211 +          ;;
 679.212 +    y,*)  mkdir -p "`pwd`/`dirname \"${CT_LOG_FILE}\"`"
 679.213 +          CT_ACTUAL_LOG_FILE="`pwd`/${CT_LOG_FILE}"
 679.214 +          mv "${t}" "${CT_ACTUAL_LOG_FILE}"
 679.215 +          ;;
 679.216 +esac
 679.217 +
 679.218 +# Some more sanity checks now that we have all paths set up
 679.219 +case "${CT_TARBALLS_DIR},${CT_SRC_DIR},${CT_BUILD_DIR},${CT_PREFIX_DIR},${CT_INSTALL_DIR}" in
 679.220 +    *" "*) CT_Abort "Don't use spaces in paths, it breaks things.";;
 679.221 +esac
 679.222 +
 679.223 +# Note: we'll always install the core compiler in its own directory, so as to
 679.224 +# not mix the two builds: core and final. Anyway, its generic, wether we use
 679.225 +# a different compiler as core, or not.
 679.226 +CT_CC_CORE_PREFIX_DIR="${CT_BUILD_DIR}/${CT_CC}-core"
 679.227 +
 679.228 +# Good, now grab a bit of informations on the system we're being run,
 679.229 +# just in case something goes awok, and it's not our fault:
 679.230 +CT_SYS_HOSTNAME=`hostname -f 2>/dev/null || true`
 679.231 +# Hmmm. Some non-DHCP-enabled machines do not have an FQDN... Fall back to node name.
 679.232 +CT_SYS_HOSTNAME="${CT_SYS_HOSTNAME:-`uname -n`}"
 679.233 +CT_SYS_KERNEL=`uname -s`
 679.234 +CT_SYS_REVISION=`uname -r`
 679.235 +# MacOS X lacks '-o' :
 679.236 +CT_SYS_OS=`uname -o || echo Unkown`
 679.237 +CT_SYS_MACHINE=`uname -m`
 679.238 +CT_SYS_PROCESSOR=`uname -p`
 679.239 +CT_SYS_USER="`id -un`"
 679.240 +CT_SYS_DATE=`CT_DoDate +%Y%m%d.%H%M%S`
 679.241 +CT_SYS_GCC=`gcc -dumpversion`
 679.242 +CT_TOOLCHAIN_ID="crosstool-${CT_VERSION} build ${CT_SYS_DATE} by ${CT_SYS_USER}@${CT_SYS_HOSTNAME} for ${CT_TARGET}"
 679.243 +
 679.244 +# renice oursleves
 679.245 +renice ${CT_NICE} $$ |CT_DoLog DEBUG
 679.246 +
 679.247 +# Include sub-scripts instead of calling them: that way, we do not have to
 679.248 +# export any variable, nor re-parse the configuration and functions files.
 679.249 +. "${CT_TOP_DIR}/scripts/getExtractPatch.sh"
 679.250 +. "${CT_TOP_DIR}/scripts/buildToolchain.sh"
 679.251 +#. "${CT_TOP_DIR}/scripts/testToolchain.sh"
 679.252 +
 679.253 +if [ -n "${CT_TARGET_ALIAS}" ]; then
 679.254 +    CT_DoLog EXTRA "Creating symlinks from \"${CT_TARGET}-*\" to \"${CT_TARGET_ALIAS}-*\""
 679.255 +    CT_Pushd "${CT_PREFIX_DIR}/bin"
 679.256 +    for t in "${CT_TARGET}-"*; do
 679.257 +        _t="`echo \"$t\" |sed -r -e 's/^'\"${CT_TARGET}\"'-/'\"${CT_TARGET_ALIAS}\"'-/;'`"
 679.258 +        CT_DoLog DEBUG "Linking \"${_t}\" -> \"${t}\""
 679.259 +        ln -s "${t}" "${_t}"
 679.260 +    done
 679.261 +    CT_Popd
 679.262 +fi
 679.263 +
 679.264 +CT_STOP_DATE=`CT_DoDate +%s%N`
 679.265 +CT_STOP_DATE_HUMAN=`CT_DoDate +%Y%m%d.%H%M%S`
 679.266 +CT_DoLog INFO "Build completed at ${CT_STOP_DATE_HUMAN}"
 679.267 +elapsed=$((CT_STOP_DATE-CT_STAR_DATE))
 679.268 +elapsed_min=$((elapsed/(60*1000*1000*1000)))
 679.269 +elapsed_sec=`printf "%02d" $(((elapsed%(60*1000*1000*1000))/(1000*1000*1000)))`
 679.270 +elapsed_csec=`printf "%02d" $(((elapsed%(1000*1000*1000))/(10*1000*1000)))`
 679.271 +CT_DoLog INFO "(elapsed: ${elapsed_min}:${elapsed_sec}.${elapsed_csec})"
 679.272 +
 679.273 +# Restore a 'normal' color setting
 679.274 +echo -en "${CT_NORMAL_COLOR}"
 679.275 +
 679.276 +trap - EXIT
   680.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   680.2 +++ b/scripts/functions	Sat Feb 24 11:00:05 2007 +0000
   680.3 @@ -0,0 +1,215 @@
   680.4 +# This file contains some usefull common functions
   680.5 +# Copyright 2007 Yann E. MORIN
   680.6 +# Licensed under the GPL v2. See COPYING in the root of this package
   680.7 +
   680.8 +CT_OnError() {
   680.9 +    ret=$?
  680.10 +    CT_DoLog ERROR "Build failed in step \"${CT_STEP_MESSAGE[${CT_STEP_COUNT}]}\""
  680.11 +    for((step=(CT_STEP_COUNT-1); step>1; step--)); do
  680.12 +        CT_DoLog ERROR "      called in step \"${CT_STEP_MESSAGE[${step}]}\""
  680.13 +    done
  680.14 +    CT_DoLog ERROR "Error happened in \"${BASH_SOURCE[1]}\" in function \"${FUNCNAME[1]}\" (line unknown, sorry)"
  680.15 +    for((depth=2; ${BASH_LINENO[$((${depth}-1))]}>0; depth++)); do
  680.16 +        CT_DoLog ERROR "      called from \"${BASH_SOURCE[${depth}]}\" at line # ${BASH_LINENO[${depth}-1]} in function \"${FUNCNAME[${depth}]}\""
  680.17 +    done
  680.18 +    CT_DoLog ERROR "Look at \"${CT_ACTUAL_LOG_FILE}\" for more info on this error."
  680.19 +    exit $ret
  680.20 +}
  680.21 +trap CT_OnError ERR
  680.22 +
  680.23 +set -E
  680.24 +set -o pipefail
  680.25 +
  680.26 +# This is crosstool-ng-0.0.1
  680.27 +CT_VERSION=ng-0.0.1
  680.28 +
  680.29 +# The different log levels:
  680.30 +CT_LOG_LEVEL_ERROR=0
  680.31 +CT_LOG_LEVEL_WARN=1
  680.32 +CT_LOG_LEVEL_INFO=2
  680.33 +CT_LOG_LEVEL_EXTRA=3
  680.34 +CT_LOG_LEVEL_DEBUG=4
  680.35 +
  680.36 +# Attributes
  680.37 +_A_NOR="\\033[0m"
  680.38 +_A_BRI="\\033[1m"
  680.39 +_A_DIM="\\033[2m"
  680.40 +_A_UND="\\033[4m"
  680.41 +_A_BRB="\\033[5m"
  680.42 +_A_REV="\\033[7m"
  680.43 +_A_HID="\\033[8m"
  680.44 +
  680.45 +# Fore colors
  680.46 +_F_BLK="\\033[30m"
  680.47 +_F_RED="\\033[31m"
  680.48 +_F_GRN="\\033[32m"
  680.49 +_F_YEL="\\033[33m"
  680.50 +_F_BLU="\\033[34m"
  680.51 +_F_MAG="\\033[35m"
  680.52 +_F_CYA="\\033[36m"
  680.53 +_F_WHI="\\033[37m"
  680.54 +
  680.55 +# A function to log what is happening
  680.56 +# Different log level are available:
  680.57 +#   - ERROR:   A serious, fatal error occurred
  680.58 +#   - WARN:    A non fatal, non serious error occurred, take your responsbility with the generated build
  680.59 +#   - INFO:    Informational messages
  680.60 +#   - EXTRA:   Extra informational messages
  680.61 +#   - DEBUG:   Debug messages
  680.62 +# Usage: CT_DoLog <level> [message]
  680.63 +# If message is empty, then stdin will be logged.
  680.64 +CT_DoLog() {
  680.65 +    local max_level
  680.66 +    local level
  680.67 +    eval max_level="\${CT_LOG_LEVEL_${CT_LOG_LEVEL_MAX}}"
  680.68 +    # Set the maximum log level to DEBUG if we have none
  680.69 +    [ -z ${max_level} ] && max_level=${CT_LOG_LEVEL_DEBUG}
  680.70 +
  680.71 +    local LEVEL="$1"
  680.72 +    shift
  680.73 +    eval level="\${CT_LOG_LEVEL_${LEVEL}}"
  680.74 +
  680.75 +    if [ $# -eq 0 ]; then
  680.76 +        cat -
  680.77 +    else
  680.78 +        echo "${1}"
  680.79 +    fi |( IFS="\n" # We want the full lines, even leading spaces
  680.80 +          cpt=0
  680.81 +          indent=$((2*CT_STEP_COUNT))
  680.82 +          while read line; do
  680.83 +              l="`printf \"[%-5s]%*s%s%s\" \"${LEVEL}\" \"${indent}\" \" \" \"${line}\"`"
  680.84 +              # There will always be a log file, be it /dev/null
  680.85 +              echo -e "${l}" >>"${CT_ACTUAL_LOG_FILE}"
  680.86 +              color="CT_${LEVEL}_COLOR"
  680.87 +              normal="CT_NORMAL_COLOR"
  680.88 +              if [ ${level} -le ${max_level} ]; then
  680.89 +                  echo -e "${!color}${l}${!normal}"
  680.90 +              else
  680.91 +                  ${CT_PROG_BAR}
  680.92 +              fi
  680.93 +          done
  680.94 +        )
  680.95 +
  680.96 +    return 0
  680.97 +}
  680.98 +
  680.99 +# Abort the execution with a error message
 680.100 +# Usage: CT_Abort <message>
 680.101 +CT_Abort() {
 680.102 +    CT_DoLog ERROR "$1" >&2
 680.103 +    exit 1
 680.104 +}
 680.105 +
 680.106 +# Test a condition, and print a message if satisfied
 680.107 +# Usage: CT_Test <message> <tests>
 680.108 +CT_Test() {
 680.109 +    local ret
 680.110 +    local m="$1"
 680.111 +    shift
 680.112 +    test "$@" && CT_DoLog WARN "$m"
 680.113 +    return 0
 680.114 +}
 680.115 +
 680.116 +# Test a condition, and abort with an error message if satisfied
 680.117 +# Usage: CT_TestAndAbort <message> <tests>
 680.118 +CT_TestAndAbort() {
 680.119 +    local m="$1"
 680.120 +    shift
 680.121 +    test "$@" && CT_Abort "$m"
 680.122 +    return 0
 680.123 +}
 680.124 +
 680.125 +# Test a condition, and abort with an error message if not satisfied
 680.126 +# Usage: CT_TestAndAbort <message> <tests>
 680.127 +CT_TestOrAbort() {
 680.128 +    local m="$1"
 680.129 +    shift
 680.130 +    test "$@" || CT_Abort "$m"
 680.131 +    return 0
 680.132 +}
 680.133 +
 680.134 +# Test the presence of a tool, or abort if not found
 680.135 +# Usage: CT_HasOrAbort <tool>
 680.136 +CT_HasOrAbort() {
 680.137 +    CT_TestAndAbort "\"${1}\" not found and needed for successfull toolchain build." -z "`which \"${1}\"`"
 680.138 +    return 0
 680.139 +}
 680.140 +
 680.141 +# Get current date with nanosecond precision
 680.142 +# On those system not supporting nanosecond precision, faked with rounding down
 680.143 +# to the highest entire second
 680.144 +# Usage: CT_DoDate <fmt>
 680.145 +CT_DoDate() {
 680.146 +    date "$1" |sed -r -e 's/%N$/000000000/;'
 680.147 +}
 680.148 +
 680.149 +CT_STEP_COUNT=1
 680.150 +CT_STEP_MESSAGE[${CT_STEP_COUNT}]="<none>"
 680.151 +# Memorise a step being done so that any error is caught
 680.152 +# Usage: CT_DoStep <loglevel> <message>
 680.153 +CT_DoStep() {
 680.154 +    local start=`CT_DoDate +%s%N`
 680.155 +    CT_DoLog "$1" "================================================================="
 680.156 +    CT_DoLog "$1" "$2"
 680.157 +    CT_STEP_COUNT=$((CT_STEP_COUNT+1))
 680.158 +    CT_STEP_LEVEL[${CT_STEP_COUNT}]="$1"; shift
 680.159 +    CT_STEP_START[${CT_STEP_COUNT}]="${start}"
 680.160 +    CT_STEP_MESSAGE[${CT_STEP_COUNT}]="$1"
 680.161 +    return 0
 680.162 +}
 680.163 +
 680.164 +# End the step just being done
 680.165 +# Usage: CT_EndStep
 680.166 +CT_EndStep() {
 680.167 +    local stop=`CT_DoDate +%s%N`
 680.168 +    local duration=`printf "%032d" $((stop-${CT_STEP_START[${CT_STEP_COUNT}]})) |sed -r -e 's/([[:digit:]]{2})[[:digit:]]{7}$/\.\1/; s/^0+//; s/^\./0\./;'`
 680.169 +    local level="${CT_STEP_LEVEL[${CT_STEP_COUNT}]}"
 680.170 +    local message="${CT_STEP_MESSAGE[${CT_STEP_COUNT}]}"
 680.171 +    CT_STEP_COUNT=$((CT_STEP_COUNT-1))
 680.172 +    CT_DoLog "${level}" "${message}: done in ${duration}s"
 680.173 +    return 0
 680.174 +}
 680.175 +
 680.176 +# Pushes into a directory, and pops back
 680.177 +CT_Pushd() {
 680.178 +    pushd "$1" >/dev/null 2>&1
 680.179 +}
 680.180 +CT_Popd() {
 680.181 +    popd >/dev/null 2>&1
 680.182 +}
 680.183 +
 680.184 +# Makes a path absolute
 680.185 +# Usage: CT_MakeAbsolutePath path
 680.186 +CT_MakeAbsolutePath() {
 680.187 +    # Try to cd in that directory
 680.188 +    if [ -d "$1" ]; then
 680.189 +        CT_Pushd "$1"
 680.190 +        pwd
 680.191 +        CT_Popd
 680.192 +    else
 680.193 +        # No such directory, fail back to guessing
 680.194 +        case "$1" in
 680.195 +            /*)  echo "$1";;
 680.196 +            *)   echo "`pwd`/$1";;
 680.197 +        esac
 680.198 +    fi
 680.199 +    
 680.200 +    return 0
 680.201 +}
 680.202 +
 680.203 +# Creates a temporary directory
 680.204 +# $1: variable to assign to
 680.205 +# Usage: CT_MktempDir foo
 680.206 +CT_MktempDir() {
 680.207 +    # Some mktemp do not allow more than 6 Xs
 680.208 +    eval "$1"="`mktemp -q -d \"${CT_BUILD_DIR}/.XXXXXX\"`"
 680.209 +    CT_TestOrAbort "Could not make temporary directory" -n "${!1}" -a -d "${!1}"
 680.210 +}
 680.211 +
 680.212 +# Echoes the specified string on stdout until the pipe breaks.
 680.213 +# Doesn't fail
 680.214 +# $1: string to echo
 680.215 +# Usage: CT_DoYes "" |make oldconfig
 680.216 +CT_DoYes() {
 680.217 +    yes "$1" || true
 680.218 +}
   681.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   681.2 +++ b/scripts/getExtractPatch.sh	Sat Feb 24 11:00:05 2007 +0000
   681.3 @@ -0,0 +1,336 @@
   681.4 +# This script will download tarballs, extract them and patch the source.
   681.5 +# Copyright 2007 Yann E. MORIN
   681.6 +# Licensed under the GPL v2. See COPYING in the root of this package
   681.7 +
   681.8 +# Download tarballs in sequence. Once we have everything, start extracting
   681.9 +# and patching the tarballs.
  681.10 +
  681.11 +#-----------------------------------------------------------------------------
  681.12 +
  681.13 +_wget=`which wget || true`
  681.14 +_curl=`which curl || true`
  681.15 +#_svn=`which svn ||true`
  681.16 +#_cvs=`which cvs || true`
  681.17 +
  681.18 +case "${_wget},${_curl}" in
  681.19 +    ,)  CT_Abort "Found neither curl nor wget. Please install one.";;
  681.20 +    ,*) CT_DoLog DEBUG "Using curl to retrieve tarballs"; CT_DoGetFile=CT_DoGetFileCurl;;
  681.21 +    *)  CT_DoLog DEBUG "Using wget to retrieve tarballs"; CT_DoGetFile=CT_DoGetFileWget;;
  681.22 +esac
  681.23 +
  681.24 +CT_DoGetFileWget() {
  681.25 +    # Need to return true because it is legitimate not to find the tarball at
  681.26 +    # some of the provided URLs (think about snapshots, different layouts for
  681.27 +    # different gcc versions, etc...)
  681.28 +    # Some (very old!) FTP server might not support the passive mode, thus
  681.29 +    # retry without
  681.30 +    # With automated download as we are doing, it can be very dangerous to use
  681.31 +    # -c to continue the downloads. It's far better to simply overwrite the
  681.32 +    # destination file
  681.33 +    wget -nc --progress=dot:binary --tries=3 --passive-ftp "$1" || wget -nc --progress=dot:binary --tries=3 "$1" || true
  681.34 +}
  681.35 +
  681.36 +CT_DoGetFileCurl() {
  681.37 +	# Note: comments about wget method are also valid here
  681.38 +	# Plus: no good progreess indicator is available with curl,
  681.39 +	#       so output is consigned to oblivion
  681.40 +	curl --ftp-pasv -O --retry 3 "$1" >/dev/null || curl -O --retry 3 "$1" >/dev/null || true
  681.41 +}
  681.42 +
  681.43 +# For those wanting bleading edge, or to retrieve old uClibc snapshots
  681.44 +# Usage: CT_GetFileSVN basename url
  681.45 +#CT_DoGetFileSVN() {
  681.46 +#    local basename="$1"
  681.47 +#    local url="`echo \"$2\" |cut -d : -f 2-`"
  681.48 +#    local tmp_dir
  681.49 +#
  681.50 +#    CT_TestOrAbort "You don't have subversion" -n "${_svn}"
  681.51 +#    CT_MktempDir tmp_dir
  681.52 +#    CT_Pushd "${tmp_dir}"
  681.53 +#    svn export --force "${url}" "${basename}"
  681.54 +#    tar cfj "${CT_TARBALLS_DIR}/${basename}.tar.bz2" "${basename}"
  681.55 +#    CT_Popd
  681.56 +#    rm -rf "${tmp_dir}"
  681.57 +#}
  681.58 +#
  681.59 +#CT_DoGetFileCVS() {
  681.60 +#    :
  681.61 +#}
  681.62 +
  681.63 +# Download the file from one of the URLs passed as argument
  681.64 +# Usage: CT_GetFile <filename> <url> [<url> ...]
  681.65 +CT_GetFile() {
  681.66 +    local got_it
  681.67 +    local ext
  681.68 +    local url
  681.69 +    local file="$1"
  681.70 +    shift
  681.71 +
  681.72 +    # Do we already have it?
  681.73 +    ext=`CT_GetFileExtension "${file}"`
  681.74 +    if [ -n "${ext}" ]; then
  681.75 +        if [ "${CT_FORCE_DOWNLOAD}" = "y" ]; then
  681.76 +            rm -f "${CT_TARBALLS_DIR}/${file}${ext}"
  681.77 +        else
  681.78 +            return 0
  681.79 +        fi
  681.80 +    fi
  681.81 +
  681.82 +    CT_DoLog EXTRA "Retrieving \"${file}\""
  681.83 +    CT_Pushd "${CT_TARBALLS_DIR}"
  681.84 +    # File not yet downloaded, try to get it
  681.85 +    got_it=0
  681.86 +    if [ "${got_it}" != "y" ]; then
  681.87 +        # We'd rather have a bzip2'ed tarball, then gzipped, and finally plain tar.
  681.88 +        for ext in .tar.bz2 .tar.gz .tgz .tar; do
  681.89 +            # Try all urls in turn
  681.90 +            for url in "$@"; do
  681.91 +                case "${url}" in
  681.92 +#                    svn://*)    CT_DoGetFileSVN "${file}" ${url}";;
  681.93 +#                    cvs://*)    CT_DoGetFileCVS "${file}" ${url}";;
  681.94 +                    *)  CT_DoLog EXTRA "Trying \"${url}/${file}${ext}\""
  681.95 +                        ${CT_DoGetFile} "${url}/${file}${ext}" 2>&1 |CT_DoLog DEBUG
  681.96 +                        ;;
  681.97 +                esac
  681.98 +                [ -f "${file}${ext}" ] && got_it=1 && break 2 || true
  681.99 +            done
 681.100 +        done
 681.101 +    fi
 681.102 +    CT_Popd
 681.103 +
 681.104 +    CT_TestAndAbort "Could not download \"${file}\", and not present in \"${CT_TARBALLS_DIR}\"" ${got_it} -eq 0
 681.105 +}
 681.106 +
 681.107 +#-----------------------------------------------------------------------------
 681.108 +
 681.109 +# Extract a tarball and patch.
 681.110 +# Some tarballs need to be extracted in specific places. Eg.: glibc addons
 681.111 +# must be extracted in the glibc directory; uCLibc locales must be extracted
 681.112 +# in the extra/locale sub-directory of uClibc.
 681.113 +CT_ExtractAndPatch() {
 681.114 +    local file="$1"
 681.115 +    local base_file=`echo "${file}" |cut -d - -f 1`
 681.116 +    local ver_file=`echo "${file}" |cut -d - -f 2-`
 681.117 +    local official_patch_dir
 681.118 +    local custom_patch_dir
 681.119 +    local libc_addon
 681.120 +    local ext=`CT_GetFileExtension "${file}"`
 681.121 +    CT_TestAndAbort "\"${file}\" not found in \"${CT_TARBALLS_DIR}\"" -z "${ext}"
 681.122 +    local full_file="${CT_TARBALLS_DIR}/${file}${ext}"
 681.123 +
 681.124 +    CT_Pushd "${CT_SRC_DIR}"
 681.125 +
 681.126 +    # Add-ons need a little love, really.
 681.127 +    case "${file}" in
 681.128 +        glibc-[a-z]*-*)
 681.129 +            CT_TestAndAbort "Trying to extract the C-library addon/locales \"${file}\" when C-library not yet extracted" ! -d "${CT_LIBC_FILE}"
 681.130 +            cd "${CT_LIBC_FILE}"
 681.131 +            libc_addon=y
 681.132 +            [ -f ".${file}.extracted" ] && return 0
 681.133 +            touch ".${file}.extracted"
 681.134 +            ;;
 681.135 +        uClibc-locale-*)
 681.136 +            CT_TestAndAbort "Trying to extract the C-library addon/locales \"${file}\" when C-library not yet extracted" ! -d "${CT_LIBC_FILE}"
 681.137 +            cd "${CT_LIBC_FILE}/extra/locale"
 681.138 +            libc_addon=y
 681.139 +            [ -f ".${file}.extracted" ] && return 0
 681.140 +            touch ".${file}.extracted"
 681.141 +            ;;
 681.142 +    esac
 681.143 +
 681.144 +    # If the directory exists, then consider extraction and patching done
 681.145 +    [ -d "${file}" ] && return 0
 681.146 +
 681.147 +    CT_DoLog EXTRA "Extracting \"${file}\""
 681.148 +    case "${ext}" in
 681.149 +        .tar.bz2)     tar xvjf "${full_file}" |CT_DoLog DEBUG;;
 681.150 +        .tar.gz|.tgz) tar xvzf "${full_file}" |CT_DoLog DEBUG;;
 681.151 +        .tar)         tar xvf  "${full_file}" |CT_DoLog DEBUG;;
 681.152 +        *)            CT_Abort "Don't know how to handle \"${file}\": unknown extension" ;;
 681.153 +    esac
 681.154 +
 681.155 +    # Snapshots might not have the version number in the extracted directory
 681.156 +    # name. This is also the case for some (old) packages, such as libfloat.
 681.157 +    # Overcome this issue by symlink'ing the directory.
 681.158 +    if [ ! -d "${file}" -a "${libc_addon}" != "y" ]; then
 681.159 +        case "${ext}" in
 681.160 +            .tar.bz2)     base=`tar tjf "${full_file}" |head -n 1 |cut -d / -f 1 || true`;;
 681.161 +            .tar.gz|.tgz) base=`tar tzf "${full_file}" |head -n 1 |cut -d / -f 1 || true`;;
 681.162 +            .tar)         base=`tar tf  "${full_file}" |head -n 1 |cut -d / -f 1 || true`;;
 681.163 +        esac
 681.164 +        CT_TestOrAbort "There was a problem when extracting \"${file}\"" -d "${base}" -o "${base}" != "${file}"
 681.165 +        ln -s "${base}" "${file}"
 681.166 +    fi
 681.167 +
 681.168 +    # Kludge: outside this function, we wouldn't know if we had just extracted
 681.169 +    # a libc addon, or a plain package. Apply patches now.
 681.170 +    CT_DoLog EXTRA "Patching \"${file}\""
 681.171 +
 681.172 +    # If libc addon, we're already in the correct place.
 681.173 +    [ -z "${libc_addon}" ] && cd "${file}"
 681.174 +
 681.175 +    [ "${CUSTOM_PATCH_ONLY}" = "y" ] || official_patch_dir="${CT_TOP_DIR}/patches/${base_file}/${ver_file}"
 681.176 +    [ "${CT_CUSTOM_PATCH}" = "y" ] && custom_patch_dir="${CT_CUSTOM_PATCH_DIR}/${base_file}/${ver_file}"
 681.177 +    for patch_dir in "${official_patch_dir}" "${custom_patch_dir}"; do
 681.178 +        if [ -n "${patch_dir}" -a -d "${patch_dir}" ]; then
 681.179 +            for p in "${patch_dir}"/*.patch; do
 681.180 +                if [ -f "${p}" ]; then
 681.181 +                    CT_DoLog DEBUG "Applying patch \"${p}\""
 681.182 +                    patch -g0 -F1 -p1 -f <"${p}" |CT_DoLog DEBUG
 681.183 +                    CT_TestAndAbort "Failed while applying patch file \"${p}\"" ${PIPESTATUS[0]} -ne 0
 681.184 +                fi
 681.185 +            done
 681.186 +        fi
 681.187 +    done
 681.188 +
 681.189 +    CT_Popd
 681.190 +}
 681.191 +
 681.192 +#-----------------------------------------------------------------------------
 681.193 +
 681.194 +# Get the file name extension of a component
 681.195 +# Usage: CT_GetFileExtension <component-version>
 681.196 +# If found, echoes the extension to stdout
 681.197 +# If not found, echoes nothing on stdout.
 681.198 +CT_GetFileExtension() {
 681.199 +    local ext
 681.200 +    local file="$1"
 681.201 +    local got_it=1
 681.202 +
 681.203 +    CT_Pushd "${CT_TARBALLS_DIR}"
 681.204 +    for ext in .tar.gz .tar.bz2 .tgz .tar; do
 681.205 +        if [ -f "${file}${ext}" ]; then
 681.206 +            echo "${ext}"
 681.207 +            got_it=0
 681.208 +            break
 681.209 +        fi
 681.210 +    done
 681.211 +    CT_Popd
 681.212 +
 681.213 +    return 0
 681.214 +}
 681.215 +
 681.216 +#-----------------------------------------------------------------------------
 681.217 +
 681.218 +# Create needed directories, remove old ones
 681.219 +mkdir -p "${CT_TARBALLS_DIR}"
 681.220 +if [ "${CT_FORCE_EXTRACT}" = "y" -a -d "${CT_SRC_DIR}" ]; then
 681.221 +    mv "${CT_SRC_DIR}" "${CT_SRC_DIR}.$$"
 681.222 +    nohup rm -rf "${CT_SRC_DIR}.$$" >/dev/null 2>&1 &
 681.223 +fi
 681.224 +mkdir -p "${CT_SRC_DIR}"
 681.225 +
 681.226 +# Make all path absolute, it so much easier!
 681.227 +# Now we have had the directories created, we even will get rid of embedded .. in paths:
 681.228 +CT_SRC_DIR="`CT_MakeAbsolutePath \"${CT_SRC_DIR}\"`"
 681.229 +CT_TARBALLS_DIR="`CT_MakeAbsolutePath \"${CT_TARBALLS_DIR}\"`"
 681.230 +
 681.231 +# Prepare the addons list to be parsable:
 681.232 +addons_list="`echo \"${CT_LIBC_ADDONS_LIST}\" |sed -r -e 's/,/ /g; s/ $//g;'`"
 681.233 +
 681.234 +if [ "${CT_NO_DOWNLOAD}" != "y" ]; then
 681.235 +    CT_DoStep INFO "Retrieving needed toolchain components' tarballs"
 681.236 +
 681.237 +    # Kernel: for now, I don't care about cygwin.
 681.238 +    CT_GetFile "${CT_KERNEL_FILE}"                                  \
 681.239 +               ftp://ftp.kernel.org/pub/linux/kernel/v2.6           \
 681.240 +               ftp://ftp.kernel.org/pub/linux/kernel/v2.4           \
 681.241 +               ftp://ftp.kernel.org/pub/linux/kernel/v2.2           \
 681.242 +               ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing   \
 681.243 +               http://ep09.pld-linux.org/~mmazur/linux-libc-headers
 681.244 +
 681.245 +    # binutils
 681.246 +    CT_GetFile "${CT_BINUTILS_FILE}"                            \
 681.247 +               ftp://ftp.gnu.org/gnu/binutils                   \
 681.248 +               ftp://ftp.kernel.org/pub/linux/devel/binutils
 681.249 +
 681.250 +    # Core and final gcc
 681.251 +    # Ah! gcc folks are kind of 'different': they store the tarballs in
 681.252 +    # subdirectories of the same name! That's because gcc is such /crap/ that
 681.253 +    # it is such /big/ that it needs being splitted for distribution! Sad. :-(
 681.254 +    # Arrgghh! Some of those versions does not follow this convention:
 681.255 +    # gcc-3.3.3 lives in releases/gcc-3.3.3, while gcc-2.95.* isn't in a
 681.256 +    # subdirectory! You bastard!
 681.257 +    CT_GetFile "${CT_CC_CORE_FILE}"                                    \
 681.258 +               ftp://ftp.gnu.org/gnu/gcc/${CT_CC_CORE_FILE}            \
 681.259 +               ftp://ftp.gnu.org/gnu/gcc/releases/${CT_CC_CORE_FILE}   \
 681.260 +               ftp://ftp.gnu.org/gnu/gcc
 681.261 +    CT_GetFile "${CT_CC_FILE}"                                  \
 681.262 +               ftp://ftp.gnu.org/gnu/gcc/${CT_CC_FILE}          \
 681.263 +               ftp://ftp.gnu.org/gnu/gcc/releases/${CT_CC_FILE} \
 681.264 +               ftp://ftp.gnu.org/gnu/gcc
 681.265 +
 681.266 +    # C library
 681.267 +    case "${CT_LIBC}" in
 681.268 +        glibc)
 681.269 +            # Ah! Not all GNU folks seem stupid. All glibc releases are in the same
 681.270 +            # directory. Good. Alas, there is no snapshot there. I'll deal with them
 681.271 +            # later on... :-/
 681.272 +            libc_src="ftp://ftp.gnu.org/gnu/glibc"
 681.273 +            ;;
 681.274 +        uClibc)
 681.275 +            # For uClibc, we have almost every thing: releases, and snapshots
 681.276 +            # for the last month or so. We'll have to deal with svn revisions
 681.277 +            # later...
 681.278 +            libc_src="http://www.uclibc.org/downloads
 681.279 +                      http://www.uclibc.org/downloads/snapshots
 681.280 +                      http://www.uclibc.org/downloads/old-releases"
 681.281 +            ;;
 681.282 +    esac
 681.283 +    CT_GetFile "${CT_LIBC_FILE}" ${libc_src}
 681.284 +
 681.285 +    # C library addons
 681.286 +    addons_list=`echo "${CT_LIBC_ADDONS}" |sed -r -e 's/,/ /g; s/ $//g;'`
 681.287 +    for addon in ${addons_list}; do
 681.288 +        CT_GetFile "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" \
 681.289 +                   ftp://ftp.gnu.org/gnu/glibc
 681.290 +    done
 681.291 +    if [ "${CT_LIBC_UCLIBC_LOCALES}" = "y" ]; then
 681.292 +        CT_GetFile "uClibc-locale-030818"                        \
 681.293 +                   http://www.uclibc.org/downloads               \
 681.294 +                   http://www.uclibc.org/downloads/snapshots     \
 681.295 +                   http://www.uclibc.org/downloads/old-releases
 681.296 +    fi
 681.297 +
 681.298 +    # libfloat if asked for
 681.299 +    if [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ]; then
 681.300 +        lib_float_url="ftp://ftp.de.debian.org/debian/pool/main/libf/libfloat/"
 681.301 +
 681.302 +        # Please note: because the file we download, and the file we store on the
 681.303 +        # file system don't have the same name, CT_GetFile will always try to
 681.304 +        # download the file over and over.
 681.305 +        # To avoid this, we check that the file we want already exists in the
 681.306 +        # tarball directory first. This is an ugly hack that overrides the standard
 681.307 +        # CT_GetFile behavior... Sight...
 681.308 +        ext=`CT_GetFileExtension "${CT_LIBFLOAT_FILE}"`
 681.309 +        if [ -z "${ext}" ]; then
 681.310 +            CT_GetFile libfloat_990616.orig "${lib_float_url}"
 681.311 +            ext=`CT_GetFileExtension "libfloat_990616.orig"`
 681.312 +            # Hack: remove the .orig extension, and change _ to -
 681.313 +            mv -v "${CT_TARBALLS_DIR}/libfloat_990616.orig${ext}" \
 681.314 +                  "${CT_TARBALLS_DIR}/libfloat-990616${ext}"      2>&1 |CT_DoLog DEBUG
 681.315 +        fi
 681.316 +    fi
 681.317 +    
 681.318 +    CT_EndStep
 681.319 +fi # CT_NO_DOWNLOAD
 681.320 +
 681.321 +if [ "${CT_ONLY_DOWNLOAD}" != "y" ]; then
 681.322 +    CT_DoStep INFO "Extracting and patching toolchain components"
 681.323 +
 681.324 +    CT_ExtractAndPatch "${CT_KERNEL_FILE}"
 681.325 +    CT_ExtractAndPatch "${CT_BINUTILS_FILE}"
 681.326 +    CT_ExtractAndPatch "${CT_CC_CORE_FILE}"
 681.327 +    CT_ExtractAndPatch "${CT_CC_FILE}"
 681.328 +    CT_ExtractAndPatch "${CT_LIBC_FILE}"
 681.329 +    for addon in ${addons_list}; do
 681.330 +        CT_ExtractAndPatch "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}"
 681.331 +    done
 681.332 +    if [ "${CT_LIBC_UCLIBC_LOCALES}" = "y" ]; then
 681.333 +        CT_ExtractAndPatch "uclibc-locale-030818"
 681.334 +    fi
 681.335 +
 681.336 +    [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] && CT_ExtractAndPatch "${CT_LIBFLOAT_FILE}"
 681.337 +
 681.338 +    CT_EndStep
 681.339 +fi
   682.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   682.2 +++ b/tools/Makefile	Sat Feb 24 11:00:05 2007 +0000
   682.3 @@ -0,0 +1,11 @@
   682.4 +CONFIG_SUB_SRC="http://cvs.savannah.gnu.org/viewcvs/*checkout*/config/config/config.sub"
   682.5 +CONFIG_SUB_DEST="$(CT_TOP_DIR)/tools/config.sub"
   682.6 +CONFIG_GUESS_SRC="http://cvs.savannah.gnu.org/viewcvs/*checkout*/config/config/config.guess"
   682.7 +CONFIG_GUESS_DEST="$(CT_TOP_DIR)/tools/config.guess"
   682.8 +
   682.9 +updatetools:
  682.10 +	@wget "$(CONFIG_SUB_SRC)" -O "$(CONFIG_SUB_DEST)"
  682.11 +	@wget "$(CONFIG_GUESS_SRC)" -O "$(CONFIG_GUESS_DEST)"
  682.12 +
  682.13 +help::
  682.14 +	@echo '  updatetools	  - Update the config tools'
   683.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   683.2 +++ b/tools/addToolVersion.sh	Sat Feb 24 11:00:05 2007 +0000
   683.3 @@ -0,0 +1,99 @@
   683.4 +#!/bin/sh
   683.5 +
   683.6 +# Adds a new version to one of the toolchain component
   683.7 +myname="$0"
   683.8 +
   683.9 +doHelp() {
  683.10 +    cat <<-EOF
  683.11 +Usage: ${myname} <tool> [option] <version>
  683.12 +  'tool' in one of:
  683.13 +    --gcc, --tcc, --binutils, --glibc, --uClibc, --linux, --cygwin
  683.14 +
  683.15 +  Valid mandatory 'option' for tool==gcc is one of:
  683.16 +    --core, --final
  683.17 +
  683.18 +  Valid mandatory 'option' for tool==linux is one of:
  683.19 +    --install, --sanitised, --copy
  683.20 +
  683.21 +  'version' is a valid version for the specified tool.
  683.22 +
  683.23 +  Examples:
  683.24 +    add version 2.6.19.2 to linux kernel install method:
  683.25 +      ${myname} --linux --install 2.6.19.2
  683.26 +
  683.27 +    add versions 2.3.5 and 2.3.6 to glibc:
  683.28 +      ${myname} --glibc 2.3.5 2.3.6
  683.29 +EOF
  683.30 +}
  683.31 +
  683.32 +tool=
  683.33 +tool_prefix=
  683.34 +CORE=
  683.35 +FINAL=
  683.36 +VERSION=
  683.37 +
  683.38 +i=1
  683.39 +while [ $i -le $# ]; do
  683.40 +    case "${!i}" in
  683.41 +        --gcc)          cat=CC;        tool=gcc;      tool_prefix=cc_;      tool_suffix=;;
  683.42 +#        --tcc)          cat=CC;        tool=tcc;      tool_prefix=cc_;      tool_suffix=;;
  683.43 +        --binutils)     cat=BINUTILS;  tool=binutils; tool_prefix=;         tool_suffix=;;
  683.44 +        --glibc)        cat=LIBC;      tool=glibc;    tool_prefix=libc_;    tool_suffix=;;
  683.45 +        --uClibc)       cat=LIBC;      tool=uClibc;   tool_prefix=libc_;    tool_suffix=;;
  683.46 +        --linux)        cat=KERNEL;    tool=linux;    tool_prefix=kernel_;;
  683.47 +#        --cygwin)       cat=KERNEL;    tool=cygwin;   tool_prefix=kernel_;;
  683.48 +        --core)         CORE=1;;
  683.49 +        --final)        FINAL=1;;
  683.50 +        --install)      tool_suffix=install;;
  683.51 +        --sanitised)    tool_suffix=sanitised;;
  683.52 +        --copy)         tool_suffix=copy;;
  683.53 +        -h|--help)      doHelp; exit 0;;
  683.54 +        -*)             echo "Unknown option: \"${!i}\". (use -h/--help for help"; exit 1;;
  683.55 +        *)              VERSION="${VERSION} ${!i}";;
  683.56 +    esac
  683.57 +    i=$((i+1))
  683.58 +done
  683.59 +
  683.60 +[ -n "${tool}" -o -n "${VERSION}" ] || { doHelp; exit 1; }
  683.61 +
  683.62 +case "${cat}" in
  683.63 +    CC)     ;;
  683.64 +    KERNEL) FINAL=; CORE=;;
  683.65 +    *)      FINAL=1; CORE=;;
  683.66 +esac
  683.67 +
  683.68 +for ver in ${VERSION}; do
  683.69 +	v=`echo "${ver}" |sed -r -e 's/-/_/g; s/\./_/g;'`
  683.70 +    if [ -n "${CORE}" ]; then
  683.71 +        L1="config ${cat}_CORE_V_${v}\n"
  683.72 +        L2="    bool\n"
  683.73 +        L3="    prompt \"${ver}\"\n"
  683.74 +        L4="    default \"${ver}\" if ${cat}_CORE_V_${v}"
  683.75 +        sed -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${L1}${L2}${L3}"'\n\1/;
  683.76 +                      s/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${L4}"'\n\1/;' config/${tool_prefix}core_${tool}.in
  683.77 +    fi
  683.78 +    if [ -n "${FINAL}" ]; then
  683.79 +        L1="config ${cat}_V_${v}\n"
  683.80 +        L2="    bool\n"
  683.81 +        L3="    prompt \"${ver}\"\n"
  683.82 +        L4="    default \"${ver}\" if ${cat}_V_${v}"
  683.83 +        sed -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${L1}${L2}${L3}"'\n\1/;
  683.84 +                      s/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${L4}"'\n\1/;' config/${tool_prefix}${tool}.in
  683.85 +    fi
  683.86 +    if [ "${cat}" = "KERNEL" ]; then
  683.87 +        TOOL_SUFFIX="`echo \"${tool_suffix}\" |tr [[:lower:]] [[:upper:]]`"
  683.88 +        L1="config ${cat}_${TOOL_SUFFIX}_V_${v}\n"
  683.89 +        L2="    bool\n"
  683.90 +        L3="    prompt \"${ver}\"\n"
  683.91 +        # Extra versions are not necessary visible:
  683.92 +        case "${ver}" in
  683.93 +            *.*.*.*) L4="    depends on KERNEL_VERSION_SEE_EXTRAVERSION\n";;
  683.94 +            *)       L4=;;
  683.95 +        esac
  683.96 +        # Sanitised headers always have an extra version:
  683.97 +        [ "${tool_suffix}" = "sanitised" ] && L4=
  683.98 +        L5="    default \"${ver}\" if ${cat}_${TOOL_SUFFIX}_V_${v}"
  683.99 +        sed -r -i -e 's/^(# CT_INSERT_VERSION_ABOVE)$/'"${L1}${L2}${L3}${L4}"'\n\1/;
 683.100 +                      s/^(# CT_INSERT_VERSION_STRING_ABOVE)$/'"${L5}"'\n\1/;' config/${tool_prefix}${tool}_headers_${tool_suffix}.in
 683.101 +    fi
 683.102 +done
   684.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   684.2 +++ b/tools/config.guess	Sat Feb 24 11:00:05 2007 +0000
   684.3 @@ -0,0 +1,1513 @@
   684.4 +#! /bin/sh
   684.5 +# Attempt to guess a canonical system name.
   684.6 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
   684.7 +#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
   684.8 +#   Inc.
   684.9 +
  684.10 +timestamp='2007-01-15'
  684.11 +
  684.12 +# This file is free software; you can redistribute it and/or modify it
  684.13 +# under the terms of the GNU General Public License as published by
  684.14 +# the Free Software Foundation; either version 2 of the License, or
  684.15 +# (at your option) any later version.
  684.16 +#
  684.17 +# This program is distributed in the hope that it will be useful, but
  684.18 +# WITHOUT ANY WARRANTY; without even the implied warranty of
  684.19 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  684.20 +# General Public License for more details.
  684.21 +#
  684.22 +# You should have received a copy of the GNU General Public License
  684.23 +# along with this program; if not, write to the Free Software
  684.24 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
  684.25 +# 02110-1301, USA.
  684.26 +#
  684.27 +# As a special exception to the GNU General Public License, if you
  684.28 +# distribute this file as part of a program that contains a
  684.29 +# configuration script generated by Autoconf, you may include it under
  684.30 +# the same distribution terms that you use for the rest of that program.
  684.31 +
  684.32 +
  684.33 +# Originally written by Per Bothner <per@bothner.com>.
  684.34 +# Please send patches to <config-patches@gnu.org>.  Submit a context
  684.35 +# diff and a properly formatted ChangeLog entry.
  684.36 +#
  684.37 +# This script attempts to guess a canonical system name similar to
  684.38 +# config.sub.  If it succeeds, it prints the system name on stdout, and
  684.39 +# exits with 0.  Otherwise, it exits with 1.
  684.40 +#
  684.41 +# The plan is that this can be called by configure scripts if you
  684.42 +# don't specify an explicit build system type.
  684.43 +
  684.44 +me=`echo "$0" | sed -e 's,.*/,,'`
  684.45 +
  684.46 +usage="\
  684.47 +Usage: $0 [OPTION]
  684.48 +
  684.49 +Output the configuration name of the system \`$me' is run on.
  684.50 +
  684.51 +Operation modes:
  684.52 +  -h, --help         print this help, then exit
  684.53 +  -t, --time-stamp   print date of last modification, then exit
  684.54 +  -v, --version      print version number, then exit
  684.55 +
  684.56 +Report bugs and patches to <config-patches@gnu.org>."
  684.57 +
  684.58 +version="\
  684.59 +GNU config.guess ($timestamp)
  684.60 +
  684.61 +Originally written by Per Bothner.
  684.62 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
  684.63 +Free Software Foundation, Inc.
  684.64 +
  684.65 +This is free software; see the source for copying conditions.  There is NO
  684.66 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  684.67 +
  684.68 +help="
  684.69 +Try \`$me --help' for more information."
  684.70 +
  684.71 +# Parse command line
  684.72 +while test $# -gt 0 ; do
  684.73 +  case $1 in
  684.74 +    --time-stamp | --time* | -t )
  684.75 +       echo "$timestamp" ; exit ;;
  684.76 +    --version | -v )
  684.77 +       echo "$version" ; exit ;;
  684.78 +    --help | --h* | -h )
  684.79 +       echo "$usage"; exit ;;
  684.80 +    -- )     # Stop option processing
  684.81 +       shift; break ;;
  684.82 +    - )	# Use stdin as input.
  684.83 +       break ;;
  684.84 +    -* )
  684.85 +       echo "$me: invalid option $1$help" >&2
  684.86 +       exit 1 ;;
  684.87 +    * )
  684.88 +       break ;;
  684.89 +  esac
  684.90 +done
  684.91 +
  684.92 +if test $# != 0; then
  684.93 +  echo "$me: too many arguments$help" >&2
  684.94 +  exit 1
  684.95 +fi
  684.96 +
  684.97 +trap 'exit 1' 1 2 15
  684.98 +
  684.99 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 684.100 +# compiler to aid in system detection is discouraged as it requires
 684.101 +# temporary files to be created and, as you can see below, it is a
 684.102 +# headache to deal with in a portable fashion.
 684.103 +
 684.104 +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
 684.105 +# use `HOST_CC' if defined, but it is deprecated.
 684.106 +
 684.107 +# Portable tmp directory creation inspired by the Autoconf team.
 684.108 +
 684.109 +set_cc_for_build='
 684.110 +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
 684.111 +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
 684.112 +: ${TMPDIR=/tmp} ;
 684.113 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
 684.114 + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
 684.115 + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
 684.116 + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
 684.117 +dummy=$tmp/dummy ;
 684.118 +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
 684.119 +case $CC_FOR_BUILD,$HOST_CC,$CC in
 684.120 + ,,)    echo "int x;" > $dummy.c ;
 684.121 +	for c in cc gcc c89 c99 ; do
 684.122 +	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
 684.123 +	     CC_FOR_BUILD="$c"; break ;
 684.124 +	  fi ;
 684.125 +	done ;
 684.126 +	if test x"$CC_FOR_BUILD" = x ; then
 684.127 +	  CC_FOR_BUILD=no_compiler_found ;
 684.128 +	fi
 684.129 +	;;
 684.130 + ,,*)   CC_FOR_BUILD=$CC ;;
 684.131 + ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
 684.132 +esac ; set_cc_for_build= ;'
 684.133 +
 684.134 +# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 684.135 +# (ghazi@noc.rutgers.edu 1994-08-24)
 684.136 +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
 684.137 +	PATH=$PATH:/.attbin ; export PATH
 684.138 +fi
 684.139 +
 684.140 +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
 684.141 +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 684.142 +UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 684.143 +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 684.144 +
 684.145 +# Note: order is significant - the case branches are not exclusive.
 684.146 +
 684.147 +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 684.148 +    *:NetBSD:*:*)
 684.149 +	# NetBSD (nbsd) targets should (where applicable) match one or
 684.150 +	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
 684.151 +	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
 684.152 +	# switched to ELF, *-*-netbsd* would select the old
 684.153 +	# object file format.  This provides both forward
 684.154 +	# compatibility and a consistent mechanism for selecting the
 684.155 +	# object file format.
 684.156 +	#
 684.157 +	# Note: NetBSD doesn't particularly care about the vendor
 684.158 +	# portion of the name.  We always set it to "unknown".
 684.159 +	sysctl="sysctl -n hw.machine_arch"
 684.160 +	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
 684.161 +	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
 684.162 +	case "${UNAME_MACHINE_ARCH}" in
 684.163 +	    armeb) machine=armeb-unknown ;;
 684.164 +	    arm*) machine=arm-unknown ;;
 684.165 +	    sh3el) machine=shl-unknown ;;
 684.166 +	    sh3eb) machine=sh-unknown ;;
 684.167 +	    sh5el) machine=sh5le-unknown ;;
 684.168 +	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 684.169 +	esac
 684.170 +	# The Operating System including object format, if it has switched
 684.171 +	# to ELF recently, or will in the future.
 684.172 +	case "${UNAME_MACHINE_ARCH}" in
 684.173 +	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 684.174 +		eval $set_cc_for_build
 684.175 +		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 684.176 +			| grep __ELF__ >/dev/null
 684.177 +		then
 684.178 +		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
 684.179 +		    # Return netbsd for either.  FIX?
 684.180 +		    os=netbsd
 684.181 +		else
 684.182 +		    os=netbsdelf
 684.183 +		fi
 684.184 +		;;
 684.185 +	    *)
 684.186 +	        os=netbsd
 684.187 +		;;
 684.188 +	esac
 684.189 +	# The OS release
 684.190 +	# Debian GNU/NetBSD machines have a different userland, and
 684.191 +	# thus, need a distinct triplet. However, they do not need
 684.192 +	# kernel version information, so it can be replaced with a
 684.193 +	# suitable tag, in the style of linux-gnu.
 684.194 +	case "${UNAME_VERSION}" in
 684.195 +	    Debian*)
 684.196 +		release='-gnu'
 684.197 +		;;
 684.198 +	    *)
 684.199 +		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 684.200 +		;;
 684.201 +	esac
 684.202 +	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 684.203 +	# contains redundant information, the shorter form:
 684.204 +	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 684.205 +	echo "${machine}-${os}${release}"
 684.206 +	exit ;;
 684.207 +    *:OpenBSD:*:*)
 684.208 +	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
 684.209 +	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
 684.210 +	exit ;;
 684.211 +    *:ekkoBSD:*:*)
 684.212 +	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
 684.213 +	exit ;;
 684.214 +    *:SolidBSD:*:*)
 684.215 +	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
 684.216 +	exit ;;
 684.217 +    macppc:MirBSD:*:*)
 684.218 +	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
 684.219 +	exit ;;
 684.220 +    *:MirBSD:*:*)
 684.221 +	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
 684.222 +	exit ;;
 684.223 +    alpha:OSF1:*:*)
 684.224 +	case $UNAME_RELEASE in
 684.225 +	*4.0)
 684.226 +		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
 684.227 +		;;
 684.228 +	*5.*)
 684.229 +	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
 684.230 +		;;
 684.231 +	esac
 684.232 +	# According to Compaq, /usr/sbin/psrinfo has been available on
 684.233 +	# OSF/1 and Tru64 systems produced since 1995.  I hope that
 684.234 +	# covers most systems running today.  This code pipes the CPU
 684.235 +	# types through head -n 1, so we only detect the type of CPU 0.
 684.236 +	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
 684.237 +	case "$ALPHA_CPU_TYPE" in
 684.238 +	    "EV4 (21064)")
 684.239 +		UNAME_MACHINE="alpha" ;;
 684.240 +	    "EV4.5 (21064)")
 684.241 +		UNAME_MACHINE="alpha" ;;
 684.242 +	    "LCA4 (21066/21068)")
 684.243 +		UNAME_MACHINE="alpha" ;;
 684.244 +	    "EV5 (21164)")
 684.245 +		UNAME_MACHINE="alphaev5" ;;
 684.246 +	    "EV5.6 (21164A)")
 684.247 +		UNAME_MACHINE="alphaev56" ;;
 684.248 +	    "EV5.6 (21164PC)")
 684.249 +		UNAME_MACHINE="alphapca56" ;;
 684.250 +	    "EV5.7 (21164PC)")
 684.251 +		UNAME_MACHINE="alphapca57" ;;
 684.252 +	    "EV6 (21264)")
 684.253 +		UNAME_MACHINE="alphaev6" ;;
 684.254 +	    "EV6.7 (21264A)")
 684.255 +		UNAME_MACHINE="alphaev67" ;;
 684.256 +	    "EV6.8CB (21264C)")
 684.257 +		UNAME_MACHINE="alphaev68" ;;
 684.258 +	    "EV6.8AL (21264B)")
 684.259 +		UNAME_MACHINE="alphaev68" ;;
 684.260 +	    "EV6.8CX (21264D)")
 684.261 +		UNAME_MACHINE="alphaev68" ;;
 684.262 +	    "EV6.9A (21264/EV69A)")
 684.263 +		UNAME_MACHINE="alphaev69" ;;
 684.264 +	    "EV7 (21364)")
 684.265 +		UNAME_MACHINE="alphaev7" ;;
 684.266 +	    "EV7.9 (21364A)")
 684.267 +		UNAME_MACHINE="alphaev79" ;;
 684.268 +	esac
 684.269 +	# A Pn.n version is a patched version.
 684.270 +	# A Vn.n version is a released version.
 684.271 +	# A Tn.n version is a released field test version.
 684.272 +	# A Xn.n version is an unreleased experimental baselevel.
 684.273 +	# 1.2 uses "1.2" for uname -r.
 684.274 +	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 684.275 +	exit ;;
 684.276 +    Alpha\ *:Windows_NT*:*)
 684.277 +	# How do we know it's Interix rather than the generic POSIX subsystem?
 684.278 +	# Should we change UNAME_MACHINE based on the output of uname instead
 684.279 +	# of the specific Alpha model?
 684.280 +	echo alpha-pc-interix
 684.281 +	exit ;;
 684.282 +    21064:Windows_NT:50:3)
 684.283 +	echo alpha-dec-winnt3.5
 684.284 +	exit ;;
 684.285 +    Amiga*:UNIX_System_V:4.0:*)
 684.286 +	echo m68k-unknown-sysv4
 684.287 +	exit ;;
 684.288 +    *:[Aa]miga[Oo][Ss]:*:*)
 684.289 +	echo ${UNAME_MACHINE}-unknown-amigaos
 684.290 +	exit ;;
 684.291 +    *:[Mm]orph[Oo][Ss]:*:*)
 684.292 +	echo ${UNAME_MACHINE}-unknown-morphos
 684.293 +	exit ;;
 684.294 +    *:OS/390:*:*)
 684.295 +	echo i370-ibm-openedition
 684.296 +	exit ;;
 684.297 +    *:z/VM:*:*)
 684.298 +	echo s390-ibm-zvmoe
 684.299 +	exit ;;
 684.300 +    *:OS400:*:*)
 684.301 +        echo powerpc-ibm-os400
 684.302 +	exit ;;
 684.303 +    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 684.304 +	echo arm-acorn-riscix${UNAME_RELEASE}
 684.305 +	exit ;;
 684.306 +    arm:riscos:*:*|arm:RISCOS:*:*)
 684.307 +	echo arm-unknown-riscos
 684.308 +	exit ;;
 684.309 +    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
 684.310 +	echo hppa1.1-hitachi-hiuxmpp
 684.311 +	exit ;;
 684.312 +    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
 684.313 +	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
 684.314 +	if test "`(/bin/universe) 2>/dev/null`" = att ; then
 684.315 +		echo pyramid-pyramid-sysv3
 684.316 +	else
 684.317 +		echo pyramid-pyramid-bsd
 684.318 +	fi
 684.319 +	exit ;;
 684.320 +    NILE*:*:*:dcosx)
 684.321 +	echo pyramid-pyramid-svr4
 684.322 +	exit ;;
 684.323 +    DRS?6000:unix:4.0:6*)
 684.324 +	echo sparc-icl-nx6
 684.325 +	exit ;;
 684.326 +    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
 684.327 +	case `/usr/bin/uname -p` in
 684.328 +	    sparc) echo sparc-icl-nx7; exit ;;
 684.329 +	esac ;;
 684.330 +    sun4H:SunOS:5.*:*)
 684.331 +	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 684.332 +	exit ;;
 684.333 +    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 684.334 +	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 684.335 +	exit ;;
 684.336 +    i86pc:SunOS:5.*:*)
 684.337 +	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 684.338 +	exit ;;
 684.339 +    sun4*:SunOS:6*:*)
 684.340 +	# According to config.sub, this is the proper way to canonicalize
 684.341 +	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
 684.342 +	# it's likely to be more like Solaris than SunOS4.
 684.343 +	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 684.344 +	exit ;;
 684.345 +    sun4*:SunOS:*:*)
 684.346 +	case "`/usr/bin/arch -k`" in
 684.347 +	    Series*|S4*)
 684.348 +		UNAME_RELEASE=`uname -v`
 684.349 +		;;
 684.350 +	esac
 684.351 +	# Japanese Language versions have a version number like `4.1.3-JL'.
 684.352 +	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
 684.353 +	exit ;;
 684.354 +    sun3*:SunOS:*:*)
 684.355 +	echo m68k-sun-sunos${UNAME_RELEASE}
 684.356 +	exit ;;
 684.357 +    sun*:*:4.2BSD:*)
 684.358 +	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
 684.359 +	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
 684.360 +	case "`/bin/arch`" in
 684.361 +	    sun3)
 684.362 +		echo m68k-sun-sunos${UNAME_RELEASE}
 684.363 +		;;
 684.364 +	    sun4)
 684.365 +		echo sparc-sun-sunos${UNAME_RELEASE}
 684.366 +		;;
 684.367 +	esac
 684.368 +	exit ;;
 684.369 +    aushp:SunOS:*:*)
 684.370 +	echo sparc-auspex-sunos${UNAME_RELEASE}
 684.371 +	exit ;;
 684.372 +    # The situation for MiNT is a little confusing.  The machine name
 684.373 +    # can be virtually everything (everything which is not
 684.374 +    # "atarist" or "atariste" at least should have a processor
 684.375 +    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
 684.376 +    # to the lowercase version "mint" (or "freemint").  Finally
 684.377 +    # the system name "TOS" denotes a system which is actually not
 684.378 +    # MiNT.  But MiNT is downward compatible to TOS, so this should
 684.379 +    # be no problem.
 684.380 +    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
 684.381 +        echo m68k-atari-mint${UNAME_RELEASE}
 684.382 +	exit ;;
 684.383 +    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 684.384 +	echo m68k-atari-mint${UNAME_RELEASE}
 684.385 +        exit ;;
 684.386 +    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
 684.387 +        echo m68k-atari-mint${UNAME_RELEASE}
 684.388 +	exit ;;
 684.389 +    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
 684.390 +        echo m68k-milan-mint${UNAME_RELEASE}
 684.391 +        exit ;;
 684.392 +    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
 684.393 +        echo m68k-hades-mint${UNAME_RELEASE}
 684.394 +        exit ;;
 684.395 +    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
 684.396 +        echo m68k-unknown-mint${UNAME_RELEASE}
 684.397 +        exit ;;
 684.398 +    m68k:machten:*:*)
 684.399 +	echo m68k-apple-machten${UNAME_RELEASE}
 684.400 +	exit ;;
 684.401 +    powerpc:machten:*:*)
 684.402 +	echo powerpc-apple-machten${UNAME_RELEASE}
 684.403 +	exit ;;
 684.404 +    RISC*:Mach:*:*)
 684.405 +	echo mips-dec-mach_bsd4.3
 684.406 +	exit ;;
 684.407 +    RISC*:ULTRIX:*:*)
 684.408 +	echo mips-dec-ultrix${UNAME_RELEASE}
 684.409 +	exit ;;
 684.410 +    VAX*:ULTRIX*:*:*)
 684.411 +	echo vax-dec-ultrix${UNAME_RELEASE}
 684.412 +	exit ;;
 684.413 +    2020:CLIX:*:* | 2430:CLIX:*:*)
 684.414 +	echo clipper-intergraph-clix${UNAME_RELEASE}
 684.415 +	exit ;;
 684.416 +    mips:*:*:UMIPS | mips:*:*:RISCos)
 684.417 +	eval $set_cc_for_build
 684.418 +	sed 's/^	//' << EOF >$dummy.c
 684.419 +#ifdef __cplusplus
 684.420 +#include <stdio.h>  /* for printf() prototype */
 684.421 +	int main (int argc, char *argv[]) {
 684.422 +#else
 684.423 +	int main (argc, argv) int argc; char *argv[]; {
 684.424 +#endif
 684.425 +	#if defined (host_mips) && defined (MIPSEB)
 684.426 +	#if defined (SYSTYPE_SYSV)
 684.427 +	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
 684.428 +	#endif
 684.429 +	#if defined (SYSTYPE_SVR4)
 684.430 +	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
 684.431 +	#endif
 684.432 +	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
 684.433 +	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
 684.434 +	#endif
 684.435 +	#endif
 684.436 +	  exit (-1);
 684.437 +	}
 684.438 +EOF
 684.439 +	$CC_FOR_BUILD -o $dummy $dummy.c &&
 684.440 +	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
 684.441 +	  SYSTEM_NAME=`$dummy $dummyarg` &&
 684.442 +	    { echo "$SYSTEM_NAME"; exit; }
 684.443 +	echo mips-mips-riscos${UNAME_RELEASE}
 684.444 +	exit ;;
 684.445 +    Motorola:PowerMAX_OS:*:*)
 684.446 +	echo powerpc-motorola-powermax
 684.447 +	exit ;;
 684.448 +    Motorola:*:4.3:PL8-*)
 684.449 +	echo powerpc-harris-powermax
 684.450 +	exit ;;
 684.451 +    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
 684.452 +	echo powerpc-harris-powermax
 684.453 +	exit ;;
 684.454 +    Night_Hawk:Power_UNIX:*:*)
 684.455 +	echo powerpc-harris-powerunix
 684.456 +	exit ;;
 684.457 +    m88k:CX/UX:7*:*)
 684.458 +	echo m88k-harris-cxux7
 684.459 +	exit ;;
 684.460 +    m88k:*:4*:R4*)
 684.461 +	echo m88k-motorola-sysv4
 684.462 +	exit ;;
 684.463 +    m88k:*:3*:R3*)
 684.464 +	echo m88k-motorola-sysv3
 684.465 +	exit ;;
 684.466 +    AViiON:dgux:*:*)
 684.467 +        # DG/UX returns AViiON for all architectures
 684.468 +        UNAME_PROCESSOR=`/usr/bin/uname -p`
 684.469 +	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
 684.470 +	then
 684.471 +	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
 684.472 +	       [ ${TARGET_BINARY_INTERFACE}x = x ]
 684.473 +	    then
 684.474 +		echo m88k-dg-dgux${UNAME_RELEASE}
 684.475 +	    else
 684.476 +		echo m88k-dg-dguxbcs${UNAME_RELEASE}
 684.477 +	    fi
 684.478 +	else
 684.479 +	    echo i586-dg-dgux${UNAME_RELEASE}
 684.480 +	fi
 684.481 + 	exit ;;
 684.482 +    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 684.483 +	echo m88k-dolphin-sysv3
 684.484 +	exit ;;
 684.485 +    M88*:*:R3*:*)
 684.486 +	# Delta 88k system running SVR3
 684.487 +	echo m88k-motorola-sysv3
 684.488 +	exit ;;
 684.489 +    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
 684.490 +	echo m88k-tektronix-sysv3
 684.491 +	exit ;;
 684.492 +    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
 684.493 +	echo m68k-tektronix-bsd
 684.494 +	exit ;;
 684.495 +    *:IRIX*:*:*)
 684.496 +	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
 684.497 +	exit ;;
 684.498 +    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
 684.499 +	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
 684.500 +	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
 684.501 +    i*86:AIX:*:*)
 684.502 +	echo i386-ibm-aix
 684.503 +	exit ;;
 684.504 +    ia64:AIX:*:*)
 684.505 +	if [ -x /usr/bin/oslevel ] ; then
 684.506 +		IBM_REV=`/usr/bin/oslevel`
 684.507 +	else
 684.508 +		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 684.509 +	fi
 684.510 +	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
 684.511 +	exit ;;
 684.512 +    *:AIX:2:3)
 684.513 +	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
 684.514 +		eval $set_cc_for_build
 684.515 +		sed 's/^		//' << EOF >$dummy.c
 684.516 +		#include <sys/systemcfg.h>
 684.517 +
 684.518 +		main()
 684.519 +			{
 684.520 +			if (!__power_pc())
 684.521 +				exit(1);
 684.522 +			puts("powerpc-ibm-aix3.2.5");
 684.523 +			exit(0);
 684.524 +			}
 684.525 +EOF
 684.526 +		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
 684.527 +		then
 684.528 +			echo "$SYSTEM_NAME"
 684.529 +		else
 684.530 +			echo rs6000-ibm-aix3.2.5
 684.531 +		fi
 684.532 +	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
 684.533 +		echo rs6000-ibm-aix3.2.4
 684.534 +	else
 684.535 +		echo rs6000-ibm-aix3.2
 684.536 +	fi
 684.537 +	exit ;;
 684.538 +    *:AIX:*:[45])
 684.539 +	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 684.540 +	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 684.541 +		IBM_ARCH=rs6000
 684.542 +	else
 684.543 +		IBM_ARCH=powerpc
 684.544 +	fi
 684.545 +	if [ -x /usr/bin/oslevel ] ; then
 684.546 +		IBM_REV=`/usr/bin/oslevel`
 684.547 +	else
 684.548 +		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 684.549 +	fi
 684.550 +	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
 684.551 +	exit ;;
 684.552 +    *:AIX:*:*)
 684.553 +	echo rs6000-ibm-aix
 684.554 +	exit ;;
 684.555 +    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
 684.556 +	echo romp-ibm-bsd4.4
 684.557 +	exit ;;
 684.558 +    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
 684.559 +	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
 684.560 +	exit ;;                             # report: romp-ibm BSD 4.3
 684.561 +    *:BOSX:*:*)
 684.562 +	echo rs6000-bull-bosx
 684.563 +	exit ;;
 684.564 +    DPX/2?00:B.O.S.:*:*)
 684.565 +	echo m68k-bull-sysv3
 684.566 +	exit ;;
 684.567 +    9000/[34]??:4.3bsd:1.*:*)
 684.568 +	echo m68k-hp-bsd
 684.569 +	exit ;;
 684.570 +    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 684.571 +	echo m68k-hp-bsd4.4
 684.572 +	exit ;;
 684.573 +    9000/[34678]??:HP-UX:*:*)
 684.574 +	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 684.575 +	case "${UNAME_MACHINE}" in
 684.576 +	    9000/31? )            HP_ARCH=m68000 ;;
 684.577 +	    9000/[34]?? )         HP_ARCH=m68k ;;
 684.578 +	    9000/[678][0-9][0-9])
 684.579 +		if [ -x /usr/bin/getconf ]; then
 684.580 +		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
 684.581 +                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
 684.582 +                    case "${sc_cpu_version}" in
 684.583 +                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
 684.584 +                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
 684.585 +                      532)                      # CPU_PA_RISC2_0
 684.586 +                        case "${sc_kernel_bits}" in
 684.587 +                          32) HP_ARCH="hppa2.0n" ;;
 684.588 +                          64) HP_ARCH="hppa2.0w" ;;
 684.589 +			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
 684.590 +                        esac ;;
 684.591 +                    esac
 684.592 +		fi
 684.593 +		if [ "${HP_ARCH}" = "" ]; then
 684.594 +		    eval $set_cc_for_build
 684.595 +		    sed 's/^              //' << EOF >$dummy.c
 684.596 +
 684.597 +              #define _HPUX_SOURCE
 684.598 +              #include <stdlib.h>
 684.599 +              #include <unistd.h>
 684.600 +
 684.601 +              int main ()
 684.602 +              {
 684.603 +              #if defined(_SC_KERNEL_BITS)
 684.604 +                  long bits = sysconf(_SC_KERNEL_BITS);
 684.605 +              #endif
 684.606 +                  long cpu  = sysconf (_SC_CPU_VERSION);
 684.607 +
 684.608 +                  switch (cpu)
 684.609 +              	{
 684.610 +              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
 684.611 +              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
 684.612 +              	case CPU_PA_RISC2_0:
 684.613 +              #if defined(_SC_KERNEL_BITS)
 684.614 +              	    switch (bits)
 684.615 +              		{
 684.616 +              		case 64: puts ("hppa2.0w"); break;
 684.617 +              		case 32: puts ("hppa2.0n"); break;
 684.618 +              		default: puts ("hppa2.0"); break;
 684.619 +              		} break;
 684.620 +              #else  /* !defined(_SC_KERNEL_BITS) */
 684.621 +              	    puts ("hppa2.0"); break;
 684.622 +              #endif
 684.623 +              	default: puts ("hppa1.0"); break;
 684.624 +              	}
 684.625 +                  exit (0);
 684.626 +              }
 684.627 +EOF
 684.628 +		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
 684.629 +		    test -z "$HP_ARCH" && HP_ARCH=hppa
 684.630 +		fi ;;
 684.631 +	esac
 684.632 +	if [ ${HP_ARCH} = "hppa2.0w" ]
 684.633 +	then
 684.634 +	    eval $set_cc_for_build
 684.635 +
 684.636 +	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
 684.637 +	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
 684.638 +	    # generating 64-bit code.  GNU and HP use different nomenclature:
 684.639 +	    #
 684.640 +	    # $ CC_FOR_BUILD=cc ./config.guess
 684.641 +	    # => hppa2.0w-hp-hpux11.23
 684.642 +	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
 684.643 +	    # => hppa64-hp-hpux11.23
 684.644 +
 684.645 +	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
 684.646 +		grep __LP64__ >/dev/null
 684.647 +	    then
 684.648 +		HP_ARCH="hppa2.0w"
 684.649 +	    else
 684.650 +		HP_ARCH="hppa64"
 684.651 +	    fi
 684.652 +	fi
 684.653 +	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
 684.654 +	exit ;;
 684.655 +    ia64:HP-UX:*:*)
 684.656 +	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 684.657 +	echo ia64-hp-hpux${HPUX_REV}
 684.658 +	exit ;;
 684.659 +    3050*:HI-UX:*:*)
 684.660 +	eval $set_cc_for_build
 684.661 +	sed 's/^	//' << EOF >$dummy.c
 684.662 +	#include <unistd.h>
 684.663 +	int
 684.664 +	main ()
 684.665 +	{
 684.666 +	  long cpu = sysconf (_SC_CPU_VERSION);
 684.667 +	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
 684.668 +	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
 684.669 +	     results, however.  */
 684.670 +	  if (CPU_IS_PA_RISC (cpu))
 684.671 +	    {
 684.672 +	      switch (cpu)
 684.673 +		{
 684.674 +		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
 684.675 +		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
 684.676 +		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
 684.677 +		  default: puts ("hppa-hitachi-hiuxwe2"); break;
 684.678 +		}
 684.679 +	    }
 684.680 +	  else if (CPU_IS_HP_MC68K (cpu))
 684.681 +	    puts ("m68k-hitachi-hiuxwe2");
 684.682 +	  else puts ("unknown-hitachi-hiuxwe2");
 684.683 +	  exit (0);
 684.684 +	}
 684.685 +EOF
 684.686 +	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
 684.687 +		{ echo "$SYSTEM_NAME"; exit; }
 684.688 +	echo unknown-hitachi-hiuxwe2
 684.689 +	exit ;;
 684.690 +    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
 684.691 +	echo hppa1.1-hp-bsd
 684.692 +	exit ;;
 684.693 +    9000/8??:4.3bsd:*:*)
 684.694 +	echo hppa1.0-hp-bsd
 684.695 +	exit ;;
 684.696 +    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
 684.697 +	echo hppa1.0-hp-mpeix
 684.698 +	exit ;;
 684.699 +    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
 684.700 +	echo hppa1.1-hp-osf
 684.701 +	exit ;;
 684.702 +    hp8??:OSF1:*:*)
 684.703 +	echo hppa1.0-hp-osf
 684.704 +	exit ;;
 684.705 +    i*86:OSF1:*:*)
 684.706 +	if [ -x /usr/sbin/sysversion ] ; then
 684.707 +	    echo ${UNAME_MACHINE}-unknown-osf1mk
 684.708 +	else
 684.709 +	    echo ${UNAME_MACHINE}-unknown-osf1
 684.710 +	fi
 684.711 +	exit ;;
 684.712 +    parisc*:Lites*:*:*)
 684.713 +	echo hppa1.1-hp-lites
 684.714 +	exit ;;
 684.715 +    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 684.716 +	echo c1-convex-bsd
 684.717 +        exit ;;
 684.718 +    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 684.719 +	if getsysinfo -f scalar_acc
 684.720 +	then echo c32-convex-bsd
 684.721 +	else echo c2-convex-bsd
 684.722 +	fi
 684.723 +        exit ;;
 684.724 +    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 684.725 +	echo c34-convex-bsd
 684.726 +        exit ;;
 684.727 +    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 684.728 +	echo c38-convex-bsd
 684.729 +        exit ;;
 684.730 +    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 684.731 +	echo c4-convex-bsd
 684.732 +        exit ;;
 684.733 +    CRAY*Y-MP:*:*:*)
 684.734 +	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 684.735 +	exit ;;
 684.736 +    CRAY*[A-Z]90:*:*:*)
 684.737 +	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
 684.738 +	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
 684.739 +	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
 684.740 +	      -e 's/\.[^.]*$/.X/'
 684.741 +	exit ;;
 684.742 +    CRAY*TS:*:*:*)
 684.743 +	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 684.744 +	exit ;;
 684.745 +    CRAY*T3E:*:*:*)
 684.746 +	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 684.747 +	exit ;;
 684.748 +    CRAY*SV1:*:*:*)
 684.749 +	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 684.750 +	exit ;;
 684.751 +    *:UNICOS/mp:*:*)
 684.752 +	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 684.753 +	exit ;;
 684.754 +    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 684.755 +	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 684.756 +        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
 684.757 +        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
 684.758 +        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 684.759 +        exit ;;
 684.760 +    5000:UNIX_System_V:4.*:*)
 684.761 +        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
 684.762 +        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
 684.763 +        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 684.764 +	exit ;;
 684.765 +    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 684.766 +	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
 684.767 +	exit ;;
 684.768 +    sparc*:BSD/OS:*:*)
 684.769 +	echo sparc-unknown-bsdi${UNAME_RELEASE}
 684.770 +	exit ;;
 684.771 +    *:BSD/OS:*:*)
 684.772 +	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
 684.773 +	exit ;;
 684.774 +    *:FreeBSD:*:*)
 684.775 +	case ${UNAME_MACHINE} in
 684.776 +	    pc98)
 684.777 +		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 684.778 +	    amd64)
 684.779 +		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 684.780 +	    *)
 684.781 +		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 684.782 +	esac
 684.783 +	exit ;;
 684.784 +    i*:CYGWIN*:*)
 684.785 +	echo ${UNAME_MACHINE}-pc-cygwin
 684.786 +	exit ;;
 684.787 +    *:MINGW*:*)
 684.788 +	echo ${UNAME_MACHINE}-pc-mingw32
 684.789 +	exit ;;
 684.790 +    i*:windows32*:*)
 684.791 +    	# uname -m includes "-pc" on this system.
 684.792 +    	echo ${UNAME_MACHINE}-mingw32
 684.793 +	exit ;;
 684.794 +    i*:PW*:*)
 684.795 +	echo ${UNAME_MACHINE}-pc-pw32
 684.796 +	exit ;;
 684.797 +    x86:Interix*:[3456]*)
 684.798 +	echo i586-pc-interix${UNAME_RELEASE}
 684.799 +	exit ;;
 684.800 +    EM64T:Interix*:[3456]* | authenticamd:Interix*:[3456]*)
 684.801 +	echo x86_64-unknown-interix${UNAME_RELEASE}
 684.802 +	exit ;;
 684.803 +    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 684.804 +	echo i${UNAME_MACHINE}-pc-mks
 684.805 +	exit ;;
 684.806 +    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
 684.807 +	# How do we know it's Interix rather than the generic POSIX subsystem?
 684.808 +	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
 684.809 +	# UNAME_MACHINE based on the output of uname instead of i386?
 684.810 +	echo i586-pc-interix
 684.811 +	exit ;;
 684.812 +    i*:UWIN*:*)
 684.813 +	echo ${UNAME_MACHINE}-pc-uwin
 684.814 +	exit ;;
 684.815 +    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
 684.816 +	echo x86_64-unknown-cygwin
 684.817 +	exit ;;
 684.818 +    p*:CYGWIN*:*)
 684.819 +	echo powerpcle-unknown-cygwin
 684.820 +	exit ;;
 684.821 +    prep*:SunOS:5.*:*)
 684.822 +	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 684.823 +	exit ;;
 684.824 +    *:GNU:*:*)
 684.825 +	# the GNU system
 684.826 +	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 684.827 +	exit ;;
 684.828 +    *:GNU/*:*:*)
 684.829 +	# other systems with GNU libc and userland
 684.830 +	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
 684.831 +	exit ;;
 684.832 +    i*86:Minix:*:*)
 684.833 +	echo ${UNAME_MACHINE}-pc-minix
 684.834 +	exit ;;
 684.835 +    arm*:Linux:*:*)
 684.836 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
 684.837 +	exit ;;
 684.838 +    avr32*:Linux:*:*)
 684.839 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
 684.840 +	exit ;;
 684.841 +    cris:Linux:*:*)
 684.842 +	echo cris-axis-linux-gnu
 684.843 +	exit ;;
 684.844 +    crisv32:Linux:*:*)
 684.845 +	echo crisv32-axis-linux-gnu
 684.846 +	exit ;;
 684.847 +    frv:Linux:*:*)
 684.848 +    	echo frv-unknown-linux-gnu
 684.849 +	exit ;;
 684.850 +    ia64:Linux:*:*)
 684.851 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
 684.852 +	exit ;;
 684.853 +    m32r*:Linux:*:*)
 684.854 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
 684.855 +	exit ;;
 684.856 +    m68*:Linux:*:*)
 684.857 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
 684.858 +	exit ;;
 684.859 +    mips:Linux:*:*)
 684.860 +	eval $set_cc_for_build
 684.861 +	sed 's/^	//' << EOF >$dummy.c
 684.862 +	#undef CPU
 684.863 +	#undef mips
 684.864 +	#undef mipsel
 684.865 +	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
 684.866 +	CPU=mipsel
 684.867 +	#else
 684.868 +	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
 684.869 +	CPU=mips
 684.870 +	#else
 684.871 +	CPU=
 684.872 +	#endif
 684.873 +	#endif
 684.874 +EOF
 684.875 +	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
 684.876 +	    /^CPU/{
 684.877 +		s: ::g
 684.878 +		p
 684.879 +	    }'`"
 684.880 +	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 684.881 +	;;
 684.882 +    mips64:Linux:*:*)
 684.883 +	eval $set_cc_for_build
 684.884 +	sed 's/^	//' << EOF >$dummy.c
 684.885 +	#undef CPU
 684.886 +	#undef mips64
 684.887 +	#undef mips64el
 684.888 +	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
 684.889 +	CPU=mips64el
 684.890 +	#else
 684.891 +	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
 684.892 +	CPU=mips64
 684.893 +	#else
 684.894 +	CPU=
 684.895 +	#endif
 684.896 +	#endif
 684.897 +EOF
 684.898 +	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
 684.899 +	    /^CPU/{
 684.900 +		s: ::g
 684.901 +		p
 684.902 +	    }'`"
 684.903 +	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 684.904 +	;;
 684.905 +    or32:Linux:*:*)
 684.906 +	echo or32-unknown-linux-gnu
 684.907 +	exit ;;
 684.908 +    ppc:Linux:*:*)
 684.909 +	echo powerpc-unknown-linux-gnu
 684.910 +	exit ;;
 684.911 +    ppc64:Linux:*:*)
 684.912 +	echo powerpc64-unknown-linux-gnu
 684.913 +	exit ;;
 684.914 +    alpha:Linux:*:*)
 684.915 +	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 684.916 +	  EV5)   UNAME_MACHINE=alphaev5 ;;
 684.917 +	  EV56)  UNAME_MACHINE=alphaev56 ;;
 684.918 +	  PCA56) UNAME_MACHINE=alphapca56 ;;
 684.919 +	  PCA57) UNAME_MACHINE=alphapca56 ;;
 684.920 +	  EV6)   UNAME_MACHINE=alphaev6 ;;
 684.921 +	  EV67)  UNAME_MACHINE=alphaev67 ;;
 684.922 +	  EV68*) UNAME_MACHINE=alphaev68 ;;
 684.923 +        esac
 684.924 +	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
 684.925 +	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
 684.926 +	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
 684.927 +	exit ;;
 684.928 +    parisc:Linux:*:* | hppa:Linux:*:*)
 684.929 +	# Look for CPU level
 684.930 +	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
 684.931 +	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
 684.932 +	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
 684.933 +	  *)    echo hppa-unknown-linux-gnu ;;
 684.934 +	esac
 684.935 +	exit ;;
 684.936 +    parisc64:Linux:*:* | hppa64:Linux:*:*)
 684.937 +	echo hppa64-unknown-linux-gnu
 684.938 +	exit ;;
 684.939 +    s390:Linux:*:* | s390x:Linux:*:*)
 684.940 +	echo ${UNAME_MACHINE}-ibm-linux
 684.941 +	exit ;;
 684.942 +    sh64*:Linux:*:*)
 684.943 +    	echo ${UNAME_MACHINE}-unknown-linux-gnu
 684.944 +	exit ;;
 684.945 +    sh*:Linux:*:*)
 684.946 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
 684.947 +	exit ;;
 684.948 +    sparc:Linux:*:* | sparc64:Linux:*:*)
 684.949 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
 684.950 +	exit ;;
 684.951 +    vax:Linux:*:*)
 684.952 +	echo ${UNAME_MACHINE}-dec-linux-gnu
 684.953 +	exit ;;
 684.954 +    x86_64:Linux:*:*)
 684.955 +	echo x86_64-unknown-linux-gnu
 684.956 +	exit ;;
 684.957 +    xtensa:Linux:*:*)
 684.958 +    	echo xtensa-unknown-linux-gnu
 684.959 +	exit ;;
 684.960 +    i*86:Linux:*:*)
 684.961 +	# The BFD linker knows what the default object file format is, so
 684.962 +	# first see if it will tell us. cd to the root directory to prevent
 684.963 +	# problems with other programs or directories called `ld' in the path.
 684.964 +	# Set LC_ALL=C to ensure ld outputs messages in English.
 684.965 +	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
 684.966 +			 | sed -ne '/supported targets:/!d
 684.967 +				    s/[ 	][ 	]*/ /g
 684.968 +				    s/.*supported targets: *//
 684.969 +				    s/ .*//
 684.970 +				    p'`
 684.971 +        case "$ld_supported_targets" in
 684.972 +	  elf32-i386)
 684.973 +		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
 684.974 +		;;
 684.975 +	  a.out-i386-linux)
 684.976 +		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
 684.977 +		exit ;;
 684.978 +	  coff-i386)
 684.979 +		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
 684.980 +		exit ;;
 684.981 +	  "")
 684.982 +		# Either a pre-BFD a.out linker (linux-gnuoldld) or
 684.983 +		# one that does not give us useful --help.
 684.984 +		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
 684.985 +		exit ;;
 684.986 +	esac
 684.987 +	# Determine whether the default compiler is a.out or elf
 684.988 +	eval $set_cc_for_build
 684.989 +	sed 's/^	//' << EOF >$dummy.c
 684.990 +	#include <features.h>
 684.991 +	#ifdef __ELF__
 684.992 +	# ifdef __GLIBC__
 684.993 +	#  if __GLIBC__ >= 2
 684.994 +	LIBC=gnu
 684.995 +	#  else
 684.996 +	LIBC=gnulibc1
 684.997 +	#  endif
 684.998 +	# else
 684.999 +	LIBC=gnulibc1
684.1000 +	# endif
684.1001 +	#else
684.1002 +	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
684.1003 +	LIBC=gnu
684.1004 +	#else
684.1005 +	LIBC=gnuaout
684.1006 +	#endif
684.1007 +	#endif
684.1008 +	#ifdef __dietlibc__
684.1009 +	LIBC=dietlibc
684.1010 +	#endif
684.1011 +EOF
684.1012 +	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
684.1013 +	    /^LIBC/{
684.1014 +		s: ::g
684.1015 +		p
684.1016 +	    }'`"
684.1017 +	test x"${LIBC}" != x && {
684.1018 +		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
684.1019 +		exit
684.1020 +	}
684.1021 +	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
684.1022 +	;;
684.1023 +    i*86:DYNIX/ptx:4*:*)
684.1024 +	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
684.1025 +	# earlier versions are messed up and put the nodename in both
684.1026 +	# sysname and nodename.
684.1027 +	echo i386-sequent-sysv4
684.1028 +	exit ;;
684.1029 +    i*86:UNIX_SV:4.2MP:2.*)
684.1030 +        # Unixware is an offshoot of SVR4, but it has its own version
684.1031 +        # number series starting with 2...
684.1032 +        # I am not positive that other SVR4 systems won't match this,
684.1033 +	# I just have to hope.  -- rms.
684.1034 +        # Use sysv4.2uw... so that sysv4* matches it.
684.1035 +	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
684.1036 +	exit ;;
684.1037 +    i*86:OS/2:*:*)
684.1038 +	# If we were able to find `uname', then EMX Unix compatibility
684.1039 +	# is probably installed.
684.1040 +	echo ${UNAME_MACHINE}-pc-os2-emx
684.1041 +	exit ;;
684.1042 +    i*86:XTS-300:*:STOP)
684.1043 +	echo ${UNAME_MACHINE}-unknown-stop
684.1044 +	exit ;;
684.1045 +    i*86:atheos:*:*)
684.1046 +	echo ${UNAME_MACHINE}-unknown-atheos
684.1047 +	exit ;;
684.1048 +    i*86:syllable:*:*)
684.1049 +	echo ${UNAME_MACHINE}-pc-syllable
684.1050 +	exit ;;
684.1051 +    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
684.1052 +	echo i386-unknown-lynxos${UNAME_RELEASE}
684.1053 +	exit ;;
684.1054 +    i*86:*DOS:*:*)
684.1055 +	echo ${UNAME_MACHINE}-pc-msdosdjgpp
684.1056 +	exit ;;
684.1057 +    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
684.1058 +	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
684.1059 +	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
684.1060 +		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
684.1061 +	else
684.1062 +		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
684.1063 +	fi
684.1064 +	exit ;;
684.1065 +    i*86:*:5:[678]*)
684.1066 +    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
684.1067 +	case `/bin/uname -X | grep "^Machine"` in
684.1068 +	    *486*)	     UNAME_MACHINE=i486 ;;
684.1069 +	    *Pentium)	     UNAME_MACHINE=i586 ;;
684.1070 +	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
684.1071 +	esac
684.1072 +	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
684.1073 +	exit ;;
684.1074 +    i*86:*:3.2:*)
684.1075 +	if test -f /usr/options/cb.name; then
684.1076 +		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
684.1077 +		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
684.1078 +	elif /bin/uname -X 2>/dev/null >/dev/null ; then
684.1079 +		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
684.1080 +		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
684.1081 +		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
684.1082 +			&& UNAME_MACHINE=i586
684.1083 +		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
684.1084 +			&& UNAME_MACHINE=i686
684.1085 +		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
684.1086 +			&& UNAME_MACHINE=i686
684.1087 +		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
684.1088 +	else
684.1089 +		echo ${UNAME_MACHINE}-pc-sysv32
684.1090 +	fi
684.1091 +	exit ;;
684.1092 +    pc:*:*:*)
684.1093 +	# Left here for compatibility:
684.1094 +        # uname -m prints for DJGPP always 'pc', but it prints nothing about
684.1095 +        # the processor, so we play safe by assuming i386.
684.1096 +	echo i386-pc-msdosdjgpp
684.1097 +        exit ;;
684.1098 +    Intel:Mach:3*:*)
684.1099 +	echo i386-pc-mach3
684.1100 +	exit ;;
684.1101 +    paragon:*:*:*)
684.1102 +	echo i860-intel-osf1
684.1103 +	exit ;;
684.1104 +    i860:*:4.*:*) # i860-SVR4
684.1105 +	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
684.1106 +	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
684.1107 +	else # Add other i860-SVR4 vendors below as they are discovered.
684.1108 +	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
684.1109 +	fi
684.1110 +	exit ;;
684.1111 +    mini*:CTIX:SYS*5:*)
684.1112 +	# "miniframe"
684.1113 +	echo m68010-convergent-sysv
684.1114 +	exit ;;
684.1115 +    mc68k:UNIX:SYSTEM5:3.51m)
684.1116 +	echo m68k-convergent-sysv
684.1117 +	exit ;;
684.1118 +    M680?0:D-NIX:5.3:*)
684.1119 +	echo m68k-diab-dnix
684.1120 +	exit ;;
684.1121 +    M68*:*:R3V[5678]*:*)
684.1122 +	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
684.1123 +    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
684.1124 +	OS_REL=''
684.1125 +	test -r /etc/.relid \
684.1126 +	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
684.1127 +	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
684.1128 +	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
684.1129 +	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
684.1130 +	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
684.1131 +    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
684.1132 +        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
684.1133 +          && { echo i486-ncr-sysv4; exit; } ;;
684.1134 +    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
684.1135 +	echo m68k-unknown-lynxos${UNAME_RELEASE}
684.1136 +	exit ;;
684.1137 +    mc68030:UNIX_System_V:4.*:*)
684.1138 +	echo m68k-atari-sysv4
684.1139 +	exit ;;
684.1140 +    TSUNAMI:LynxOS:2.*:*)
684.1141 +	echo sparc-unknown-lynxos${UNAME_RELEASE}
684.1142 +	exit ;;
684.1143 +    rs6000:LynxOS:2.*:*)
684.1144 +	echo rs6000-unknown-lynxos${UNAME_RELEASE}
684.1145 +	exit ;;
684.1146 +    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
684.1147 +	echo powerpc-unknown-lynxos${UNAME_RELEASE}
684.1148 +	exit ;;
684.1149 +    SM[BE]S:UNIX_SV:*:*)
684.1150 +	echo mips-dde-sysv${UNAME_RELEASE}
684.1151 +	exit ;;
684.1152 +    RM*:ReliantUNIX-*:*:*)
684.1153 +	echo mips-sni-sysv4
684.1154 +	exit ;;
684.1155 +    RM*:SINIX-*:*:*)
684.1156 +	echo mips-sni-sysv4
684.1157 +	exit ;;
684.1158 +    *:SINIX-*:*:*)
684.1159 +	if uname -p 2>/dev/null >/dev/null ; then
684.1160 +		UNAME_MACHINE=`(uname -p) 2>/dev/null`
684.1161 +		echo ${UNAME_MACHINE}-sni-sysv4
684.1162 +	else
684.1163 +		echo ns32k-sni-sysv
684.1164 +	fi
684.1165 +	exit ;;
684.1166 +    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
684.1167 +                      # says <Richard.M.Bartel@ccMail.Census.GOV>
684.1168 +        echo i586-unisys-sysv4
684.1169 +        exit ;;
684.1170 +    *:UNIX_System_V:4*:FTX*)
684.1171 +	# From Gerald Hewes <hewes@openmarket.com>.
684.1172 +	# How about differentiating between stratus architectures? -djm
684.1173 +	echo hppa1.1-stratus-sysv4
684.1174 +	exit ;;
684.1175 +    *:*:*:FTX*)
684.1176 +	# From seanf@swdc.stratus.com.
684.1177 +	echo i860-stratus-sysv4
684.1178 +	exit ;;
684.1179 +    i*86:VOS:*:*)
684.1180 +	# From Paul.Green@stratus.com.
684.1181 +	echo ${UNAME_MACHINE}-stratus-vos
684.1182 +	exit ;;
684.1183 +    *:VOS:*:*)
684.1184 +	# From Paul.Green@stratus.com.
684.1185 +	echo hppa1.1-stratus-vos
684.1186 +	exit ;;
684.1187 +    mc68*:A/UX:*:*)
684.1188 +	echo m68k-apple-aux${UNAME_RELEASE}
684.1189 +	exit ;;
684.1190 +    news*:NEWS-OS:6*:*)
684.1191 +	echo mips-sony-newsos6
684.1192 +	exit ;;
684.1193 +    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
684.1194 +	if [ -d /usr/nec ]; then
684.1195 +	        echo mips-nec-sysv${UNAME_RELEASE}
684.1196 +	else
684.1197 +	        echo mips-unknown-sysv${UNAME_RELEASE}
684.1198 +	fi
684.1199 +        exit ;;
684.1200 +    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
684.1201 +	echo powerpc-be-beos
684.1202 +	exit ;;
684.1203 +    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
684.1204 +	echo powerpc-apple-beos
684.1205 +	exit ;;
684.1206 +    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
684.1207 +	echo i586-pc-beos
684.1208 +	exit ;;
684.1209 +    SX-4:SUPER-UX:*:*)
684.1210 +	echo sx4-nec-superux${UNAME_RELEASE}
684.1211 +	exit ;;
684.1212 +    SX-5:SUPER-UX:*:*)
684.1213 +	echo sx5-nec-superux${UNAME_RELEASE}
684.1214 +	exit ;;
684.1215 +    SX-6:SUPER-UX:*:*)
684.1216 +	echo sx6-nec-superux${UNAME_RELEASE}
684.1217 +	exit ;;
684.1218 +    SX-7:SUPER-UX:*:*)
684.1219 +	echo sx7-nec-superux${UNAME_RELEASE}
684.1220 +	exit ;;
684.1221 +    SX-8:SUPER-UX:*:*)
684.1222 +	echo sx8-nec-superux${UNAME_RELEASE}
684.1223 +	exit ;;
684.1224 +    SX-8R:SUPER-UX:*:*)
684.1225 +	echo sx8r-nec-superux${UNAME_RELEASE}
684.1226 +	exit ;;
684.1227 +    Power*:Rhapsody:*:*)
684.1228 +	echo powerpc-apple-rhapsody${UNAME_RELEASE}
684.1229 +	exit ;;
684.1230 +    *:Rhapsody:*:*)
684.1231 +	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
684.1232 +	exit ;;
684.1233 +    *:Darwin:*:*)
684.1234 +	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
684.1235 +	case $UNAME_PROCESSOR in
684.1236 +	    unknown) UNAME_PROCESSOR=powerpc ;;
684.1237 +	esac
684.1238 +	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
684.1239 +	exit ;;
684.1240 +    *:procnto*:*:* | *:QNX:[0123456789]*:*)
684.1241 +	UNAME_PROCESSOR=`uname -p`
684.1242 +	if test "$UNAME_PROCESSOR" = "x86"; then
684.1243 +		UNAME_PROCESSOR=i386
684.1244 +		UNAME_MACHINE=pc
684.1245 +	fi
684.1246 +	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
684.1247 +	exit ;;
684.1248 +    *:QNX:*:4*)
684.1249 +	echo i386-pc-qnx
684.1250 +	exit ;;
684.1251 +    NSE-?:NONSTOP_KERNEL:*:*)
684.1252 +	echo nse-tandem-nsk${UNAME_RELEASE}
684.1253 +	exit ;;
684.1254 +    NSR-?:NONSTOP_KERNEL:*:*)
684.1255 +	echo nsr-tandem-nsk${UNAME_RELEASE}
684.1256 +	exit ;;
684.1257 +    *:NonStop-UX:*:*)
684.1258 +	echo mips-compaq-nonstopux
684.1259 +	exit ;;
684.1260 +    BS2000:POSIX*:*:*)
684.1261 +	echo bs2000-siemens-sysv
684.1262 +	exit ;;
684.1263 +    DS/*:UNIX_System_V:*:*)
684.1264 +	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
684.1265 +	exit ;;
684.1266 +    *:Plan9:*:*)
684.1267 +	# "uname -m" is not consistent, so use $cputype instead. 386
684.1268 +	# is converted to i386 for consistency with other x86
684.1269 +	# operating systems.
684.1270 +	if test "$cputype" = "386"; then
684.1271 +	    UNAME_MACHINE=i386
684.1272 +	else
684.1273 +	    UNAME_MACHINE="$cputype"
684.1274 +	fi
684.1275 +	echo ${UNAME_MACHINE}-unknown-plan9
684.1276 +	exit ;;
684.1277 +    *:TOPS-10:*:*)
684.1278 +	echo pdp10-unknown-tops10
684.1279 +	exit ;;
684.1280 +    *:TENEX:*:*)
684.1281 +	echo pdp10-unknown-tenex
684.1282 +	exit ;;
684.1283 +    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
684.1284 +	echo pdp10-dec-tops20
684.1285 +	exit ;;
684.1286 +    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
684.1287 +	echo pdp10-xkl-tops20
684.1288 +	exit ;;
684.1289 +    *:TOPS-20:*:*)
684.1290 +	echo pdp10-unknown-tops20
684.1291 +	exit ;;
684.1292 +    *:ITS:*:*)
684.1293 +	echo pdp10-unknown-its
684.1294 +	exit ;;
684.1295 +    SEI:*:*:SEIUX)
684.1296 +        echo mips-sei-seiux${UNAME_RELEASE}
684.1297 +	exit ;;
684.1298 +    *:DragonFly:*:*)
684.1299 +	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
684.1300 +	exit ;;
684.1301 +    *:*VMS:*:*)
684.1302 +    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
684.1303 +	case "${UNAME_MACHINE}" in
684.1304 +	    A*) echo alpha-dec-vms ; exit ;;
684.1305 +	    I*) echo ia64-dec-vms ; exit ;;
684.1306 +	    V*) echo vax-dec-vms ; exit ;;
684.1307 +	esac ;;
684.1308 +    *:XENIX:*:SysV)
684.1309 +	echo i386-pc-xenix
684.1310 +	exit ;;
684.1311 +    i*86:skyos:*:*)
684.1312 +	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
684.1313 +	exit ;;
684.1314 +    i*86:rdos:*:*)
684.1315 +	echo ${UNAME_MACHINE}-pc-rdos
684.1316 +	exit ;;
684.1317 +esac
684.1318 +
684.1319 +#echo '(No uname command or uname output not recognized.)' 1>&2
684.1320 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
684.1321 +
684.1322 +eval $set_cc_for_build
684.1323 +cat >$dummy.c <<EOF
684.1324 +#ifdef _SEQUENT_
684.1325 +# include <sys/types.h>
684.1326 +# include <sys/utsname.h>
684.1327 +#endif
684.1328 +main ()
684.1329 +{
684.1330 +#if defined (sony)
684.1331 +#if defined (MIPSEB)
684.1332 +  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
684.1333 +     I don't know....  */
684.1334 +  printf ("mips-sony-bsd\n"); exit (0);
684.1335 +#else
684.1336 +#include <sys/param.h>
684.1337 +  printf ("m68k-sony-newsos%s\n",
684.1338 +#ifdef NEWSOS4
684.1339 +          "4"
684.1340 +#else
684.1341 +	  ""
684.1342 +#endif
684.1343 +         ); exit (0);
684.1344 +#endif
684.1345 +#endif
684.1346 +
684.1347 +#if defined (__arm) && defined (__acorn) && defined (__unix)
684.1348 +  printf ("arm-acorn-riscix\n"); exit (0);
684.1349 +#endif
684.1350 +
684.1351 +#if defined (hp300) && !defined (hpux)
684.1352 +  printf ("m68k-hp-bsd\n"); exit (0);
684.1353 +#endif
684.1354 +
684.1355 +#if defined (NeXT)
684.1356 +#if !defined (__ARCHITECTURE__)
684.1357 +#define __ARCHITECTURE__ "m68k"
684.1358 +#endif
684.1359 +  int version;
684.1360 +  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
684.1361 +  if (version < 4)
684.1362 +    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
684.1363 +  else
684.1364 +    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
684.1365 +  exit (0);
684.1366 +#endif
684.1367 +
684.1368 +#if defined (MULTIMAX) || defined (n16)
684.1369 +#if defined (UMAXV)
684.1370 +  printf ("ns32k-encore-sysv\n"); exit (0);
684.1371 +#else
684.1372 +#if defined (CMU)
684.1373 +  printf ("ns32k-encore-mach\n"); exit (0);
684.1374 +#else
684.1375 +  printf ("ns32k-encore-bsd\n"); exit (0);
684.1376 +#endif
684.1377 +#endif
684.1378 +#endif
684.1379 +
684.1380 +#if defined (__386BSD__)
684.1381 +  printf ("i386-pc-bsd\n"); exit (0);
684.1382 +#endif
684.1383 +
684.1384 +#if defined (sequent)
684.1385 +#if defined (i386)
684.1386 +  printf ("i386-sequent-dynix\n"); exit (0);
684.1387 +#endif
684.1388 +#if defined (ns32000)
684.1389 +  printf ("ns32k-sequent-dynix\n"); exit (0);
684.1390 +#endif
684.1391 +#endif
684.1392 +
684.1393 +#if defined (_SEQUENT_)
684.1394 +    struct utsname un;
684.1395 +
684.1396 +    uname(&un);
684.1397 +
684.1398 +    if (strncmp(un.version, "V2", 2) == 0) {
684.1399 +	printf ("i386-sequent-ptx2\n"); exit (0);
684.1400 +    }
684.1401 +    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
684.1402 +	printf ("i386-sequent-ptx1\n"); exit (0);
684.1403 +    }
684.1404 +    printf ("i386-sequent-ptx\n"); exit (0);
684.1405 +
684.1406 +#endif
684.1407 +
684.1408 +#if defined (vax)
684.1409 +# if !defined (ultrix)
684.1410 +#  include <sys/param.h>
684.1411 +#  if defined (BSD)
684.1412 +#   if BSD == 43
684.1413 +      printf ("vax-dec-bsd4.3\n"); exit (0);
684.1414 +#   else
684.1415 +#    if BSD == 199006
684.1416 +      printf ("vax-dec-bsd4.3reno\n"); exit (0);
684.1417 +#    else
684.1418 +      printf ("vax-dec-bsd\n"); exit (0);
684.1419 +#    endif
684.1420 +#   endif
684.1421 +#  else
684.1422 +    printf ("vax-dec-bsd\n"); exit (0);
684.1423 +#  endif
684.1424 +# else
684.1425 +    printf ("vax-dec-ultrix\n"); exit (0);
684.1426 +# endif
684.1427 +#endif
684.1428 +
684.1429 +#if defined (alliant) && defined (i860)
684.1430 +  printf ("i860-alliant-bsd\n"); exit (0);
684.1431 +#endif
684.1432 +
684.1433 +  exit (1);
684.1434 +}
684.1435 +EOF
684.1436 +
684.1437 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
684.1438 +	{ echo "$SYSTEM_NAME"; exit; }
684.1439 +
684.1440 +# Apollos put the system type in the environment.
684.1441 +
684.1442 +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
684.1443 +
684.1444 +# Convex versions that predate uname can use getsysinfo(1)
684.1445 +
684.1446 +if [ -x /usr/convex/getsysinfo ]
684.1447 +then
684.1448 +    case `getsysinfo -f cpu_type` in
684.1449 +    c1*)
684.1450 +	echo c1-convex-bsd
684.1451 +	exit ;;
684.1452 +    c2*)
684.1453 +	if getsysinfo -f scalar_acc
684.1454 +	then echo c32-convex-bsd
684.1455 +	else echo c2-convex-bsd
684.1456 +	fi
684.1457 +	exit ;;
684.1458 +    c34*)
684.1459 +	echo c34-convex-bsd
684.1460 +	exit ;;
684.1461 +    c38*)
684.1462 +	echo c38-convex-bsd
684.1463 +	exit ;;
684.1464 +    c4*)
684.1465 +	echo c4-convex-bsd
684.1466 +	exit ;;
684.1467 +    esac
684.1468 +fi
684.1469 +
684.1470 +cat >&2 <<EOF
684.1471 +$0: unable to guess system type
684.1472 +
684.1473 +This script, last modified $timestamp, has failed to recognize
684.1474 +the operating system you are using. It is advised that you
684.1475 +download the most up to date version of the config scripts from
684.1476 +
684.1477 +  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
684.1478 +and
684.1479 +  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
684.1480 +
684.1481 +If the version you run ($0) is already up to date, please
684.1482 +send the following data and any information you think might be
684.1483 +pertinent to <config-patches@gnu.org> in order to provide the needed
684.1484 +information to handle your system.
684.1485 +
684.1486 +config.guess timestamp = $timestamp
684.1487 +
684.1488 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
684.1489 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
684.1490 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
684.1491 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
684.1492 +
684.1493 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
684.1494 +/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
684.1495 +
684.1496 +hostinfo               = `(hostinfo) 2>/dev/null`
684.1497 +/bin/universe          = `(/bin/universe) 2>/dev/null`
684.1498 +/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
684.1499 +/bin/arch              = `(/bin/arch) 2>/dev/null`
684.1500 +/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
684.1501 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
684.1502 +
684.1503 +UNAME_MACHINE = ${UNAME_MACHINE}
684.1504 +UNAME_RELEASE = ${UNAME_RELEASE}
684.1505 +UNAME_SYSTEM  = ${UNAME_SYSTEM}
684.1506 +UNAME_VERSION = ${UNAME_VERSION}
684.1507 +EOF
684.1508 +
684.1509 +exit 1
684.1510 +
684.1511 +# Local variables:
684.1512 +# eval: (add-hook 'write-file-hooks 'time-stamp)
684.1513 +# time-stamp-start: "timestamp='"
684.1514 +# time-stamp-format: "%:y-%02m-%02d"
684.1515 +# time-stamp-end: "'"
684.1516 +# End:
   685.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   685.2 +++ b/tools/config.sub	Sat Feb 24 11:00:05 2007 +0000
   685.3 @@ -0,0 +1,1622 @@
   685.4 +#! /bin/sh
   685.5 +# Configuration validation subroutine script.
   685.6 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
   685.7 +#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
   685.8 +#   Inc.
   685.9 +
  685.10 +timestamp='2007-01-18'
  685.11 +
  685.12 +# This file is (in principle) common to ALL GNU software.
  685.13 +# The presence of a machine in this file suggests that SOME GNU software
  685.14 +# can handle that machine.  It does not imply ALL GNU software can.
  685.15 +#
  685.16 +# This file is free software; you can redistribute it and/or modify
  685.17 +# it under the terms of the GNU General Public License as published by
  685.18 +# the Free Software Foundation; either version 2 of the License, or
  685.19 +# (at your option) any later version.
  685.20 +#
  685.21 +# This program is distributed in the hope that it will be useful,
  685.22 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  685.23 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  685.24 +# GNU General Public License for more details.
  685.25 +#
  685.26 +# You should have received a copy of the GNU General Public License
  685.27 +# along with this program; if not, write to the Free Software
  685.28 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
  685.29 +# 02110-1301, USA.
  685.30 +#
  685.31 +# As a special exception to the GNU General Public License, if you
  685.32 +# distribute this file as part of a program that contains a
  685.33 +# configuration script generated by Autoconf, you may include it under
  685.34 +# the same distribution terms that you use for the rest of that program.
  685.35 +
  685.36 +
  685.37 +# Please send patches to <config-patches@gnu.org>.  Submit a context
  685.38 +# diff and a properly formatted ChangeLog entry.
  685.39 +#
  685.40 +# Configuration subroutine to validate and canonicalize a configuration type.
  685.41 +# Supply the specified configuration type as an argument.
  685.42 +# If it is invalid, we print an error message on stderr and exit with code 1.
  685.43 +# Otherwise, we print the canonical config type on stdout and succeed.
  685.44 +
  685.45 +# This file is supposed to be the same for all GNU packages
  685.46 +# and recognize all the CPU types, system types and aliases
  685.47 +# that are meaningful with *any* GNU software.
  685.48 +# Each package is responsible for reporting which valid configurations
  685.49 +# it does not support.  The user should be able to distinguish
  685.50 +# a failure to support a valid configuration from a meaningless
  685.51 +# configuration.
  685.52 +
  685.53 +# The goal of this file is to map all the various variations of a given
  685.54 +# machine specification into a single specification in the form:
  685.55 +#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
  685.56 +# or in some cases, the newer four-part form:
  685.57 +#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
  685.58 +# It is wrong to echo any other type of specification.
  685.59 +
  685.60 +me=`echo "$0" | sed -e 's,.*/,,'`
  685.61 +
  685.62 +usage="\
  685.63 +Usage: $0 [OPTION] CPU-MFR-OPSYS
  685.64 +       $0 [OPTION] ALIAS
  685.65 +
  685.66 +Canonicalize a configuration name.
  685.67 +
  685.68 +Operation modes:
  685.69 +  -h, --help         print this help, then exit
  685.70 +  -t, --time-stamp   print date of last modification, then exit
  685.71 +  -v, --version      print version number, then exit
  685.72 +
  685.73 +Report bugs and patches to <config-patches@gnu.org>."
  685.74 +
  685.75 +version="\
  685.76 +GNU config.sub ($timestamp)
  685.77 +
  685.78 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
  685.79 +Free Software Foundation, Inc.
  685.80 +
  685.81 +This is free software; see the source for copying conditions.  There is NO
  685.82 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  685.83 +
  685.84 +help="
  685.85 +Try \`$me --help' for more information."
  685.86 +
  685.87 +# Parse command line
  685.88 +while test $# -gt 0 ; do
  685.89 +  case $1 in
  685.90 +    --time-stamp | --time* | -t )
  685.91 +       echo "$timestamp" ; exit ;;
  685.92 +    --version | -v )
  685.93 +       echo "$version" ; exit ;;
  685.94 +    --help | --h* | -h )
  685.95 +       echo "$usage"; exit ;;
  685.96 +    -- )     # Stop option processing
  685.97 +       shift; break ;;
  685.98 +    - )	# Use stdin as input.
  685.99 +       break ;;
 685.100 +    -* )
 685.101 +       echo "$me: invalid option $1$help"
 685.102 +       exit 1 ;;
 685.103 +
 685.104 +    *local*)
 685.105 +       # First pass through any local machine types.
 685.106 +       echo $1
 685.107 +       exit ;;
 685.108 +
 685.109 +    * )
 685.110 +       break ;;
 685.111 +  esac
 685.112 +done
 685.113 +
 685.114 +case $# in
 685.115 + 0) echo "$me: missing argument$help" >&2
 685.116 +    exit 1;;
 685.117 + 1) ;;
 685.118 + *) echo "$me: too many arguments$help" >&2
 685.119 +    exit 1;;
 685.120 +esac
 685.121 +
 685.122 +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
 685.123 +# Here we must recognize all the valid KERNEL-OS combinations.
 685.124 +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 685.125 +case $maybe_os in
 685.126 +  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
 685.127 +  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
 685.128 +  storm-chaos* | os2-emx* | rtmk-nova*)
 685.129 +    os=-$maybe_os
 685.130 +    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
 685.131 +    ;;
 685.132 +  *)
 685.133 +    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
 685.134 +    if [ $basic_machine != $1 ]
 685.135 +    then os=`echo $1 | sed 's/.*-/-/'`
 685.136 +    else os=; fi
 685.137 +    ;;
 685.138 +esac
 685.139 +
 685.140 +### Let's recognize common machines as not being operating systems so
 685.141 +### that things like config.sub decstation-3100 work.  We also
 685.142 +### recognize some manufacturers as not being operating systems, so we
 685.143 +### can provide default operating systems below.
 685.144 +case $os in
 685.145 +	-sun*os*)
 685.146 +		# Prevent following clause from handling this invalid input.
 685.147 +		;;
 685.148 +	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
 685.149 +	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
 685.150 +	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
 685.151 +	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 685.152 +	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 685.153 +	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
 685.154 +	-apple | -axis | -knuth | -cray)
 685.155 +		os=
 685.156 +		basic_machine=$1
 685.157 +		;;
 685.158 +	-sim | -cisco | -oki | -wec | -winbond)
 685.159 +		os=
 685.160 +		basic_machine=$1
 685.161 +		;;
 685.162 +	-scout)
 685.163 +		;;
 685.164 +	-wrs)
 685.165 +		os=-vxworks
 685.166 +		basic_machine=$1
 685.167 +		;;
 685.168 +	-chorusos*)
 685.169 +		os=-chorusos
 685.170 +		basic_machine=$1
 685.171 +		;;
 685.172 + 	-chorusrdb)
 685.173 + 		os=-chorusrdb
 685.174 +		basic_machine=$1
 685.175 + 		;;
 685.176 +	-hiux*)
 685.177 +		os=-hiuxwe2
 685.178 +		;;
 685.179 +	-sco6)
 685.180 +		os=-sco5v6
 685.181 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 685.182 +		;;
 685.183 +	-sco5)
 685.184 +		os=-sco3.2v5
 685.185 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 685.186 +		;;
 685.187 +	-sco4)
 685.188 +		os=-sco3.2v4
 685.189 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 685.190 +		;;
 685.191 +	-sco3.2.[4-9]*)
 685.192 +		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
 685.193 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 685.194 +		;;
 685.195 +	-sco3.2v[4-9]*)
 685.196 +		# Don't forget version if it is 3.2v4 or newer.
 685.197 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 685.198 +		;;
 685.199 +	-sco5v6*)
 685.200 +		# Don't forget version if it is 3.2v4 or newer.
 685.201 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 685.202 +		;;
 685.203 +	-sco*)
 685.204 +		os=-sco3.2v2
 685.205 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 685.206 +		;;
 685.207 +	-udk*)
 685.208 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 685.209 +		;;
 685.210 +	-isc)
 685.211 +		os=-isc2.2
 685.212 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 685.213 +		;;
 685.214 +	-clix*)
 685.215 +		basic_machine=clipper-intergraph
 685.216 +		;;
 685.217 +	-isc*)
 685.218 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 685.219 +		;;
 685.220 +	-lynx*)
 685.221 +		os=-lynxos
 685.222 +		;;
 685.223 +	-ptx*)
 685.224 +		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
 685.225 +		;;
 685.226 +	-windowsnt*)
 685.227 +		os=`echo $os | sed -e 's/windowsnt/winnt/'`
 685.228 +		;;
 685.229 +	-psos*)
 685.230 +		os=-psos
 685.231 +		;;
 685.232 +	-mint | -mint[0-9]*)
 685.233 +		basic_machine=m68k-atari
 685.234 +		os=-mint
 685.235 +		;;
 685.236 +esac
 685.237 +
 685.238 +# Decode aliases for certain CPU-COMPANY combinations.
 685.239 +case $basic_machine in
 685.240 +	# Recognize the basic CPU types without company name.
 685.241 +	# Some are omitted here because they have special meanings below.
 685.242 +	1750a | 580 \
 685.243 +	| a29k \
 685.244 +	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 685.245 +	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 685.246 +	| am33_2.0 \
 685.247 +	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
 685.248 +	| bfin \
 685.249 +	| c4x | clipper \
 685.250 +	| d10v | d30v | dlx | dsp16xx \
 685.251 +	| fido | fr30 | frv \
 685.252 +	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 685.253 +	| i370 | i860 | i960 | ia64 \
 685.254 +	| ip2k | iq2000 \
 685.255 +	| m32c | m32r | m32rle | m68000 | m68k | m88k \
 685.256 +	| maxq | mb | microblaze | mcore | mep \
 685.257 +	| mips | mipsbe | mipseb | mipsel | mipsle \
 685.258 +	| mips16 \
 685.259 +	| mips64 | mips64el \
 685.260 +	| mips64vr | mips64vrel \
 685.261 +	| mips64orion | mips64orionel \
 685.262 +	| mips64vr4100 | mips64vr4100el \
 685.263 +	| mips64vr4300 | mips64vr4300el \
 685.264 +	| mips64vr5000 | mips64vr5000el \
 685.265 +	| mips64vr5900 | mips64vr5900el \
 685.266 +	| mipsisa32 | mipsisa32el \
 685.267 +	| mipsisa32r2 | mipsisa32r2el \
 685.268 +	| mipsisa64 | mipsisa64el \
 685.269 +	| mipsisa64r2 | mipsisa64r2el \
 685.270 +	| mipsisa64sb1 | mipsisa64sb1el \
 685.271 +	| mipsisa64sr71k | mipsisa64sr71kel \
 685.272 +	| mipstx39 | mipstx39el \
 685.273 +	| mn10200 | mn10300 \
 685.274 +	| mt \
 685.275 +	| msp430 \
 685.276 +	| nios | nios2 \
 685.277 +	| ns16k | ns32k \
 685.278 +	| or32 \
 685.279 +	| pdp10 | pdp11 | pj | pjl \
 685.280 +	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 685.281 +	| pyramid \
 685.282 +	| score \
 685.283 +	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 685.284 +	| sh64 | sh64le \
 685.285 +	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 685.286 +	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
 685.287 +	| spu | strongarm \
 685.288 +	| tahoe | thumb | tic4x | tic80 | tron \
 685.289 +	| v850 | v850e \
 685.290 +	| we32k \
 685.291 +	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
 685.292 +	| z8k)
 685.293 +		basic_machine=$basic_machine-unknown
 685.294 +		;;
 685.295 +	m6811 | m68hc11 | m6812 | m68hc12)
 685.296 +		# Motorola 68HC11/12.
 685.297 +		basic_machine=$basic_machine-unknown
 685.298 +		os=-none
 685.299 +		;;
 685.300 +	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
 685.301 +		;;
 685.302 +	ms1)
 685.303 +		basic_machine=mt-unknown
 685.304 +		;;
 685.305 +
 685.306 +	# We use `pc' rather than `unknown'
 685.307 +	# because (1) that's what they normally are, and
 685.308 +	# (2) the word "unknown" tends to confuse beginning users.
 685.309 +	i*86 | x86_64)
 685.310 +	  basic_machine=$basic_machine-pc
 685.311 +	  ;;
 685.312 +	# Object if more than one company name word.
 685.313 +	*-*-*)
 685.314 +		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
 685.315 +		exit 1
 685.316 +		;;
 685.317 +	# Recognize the basic CPU types with company name.
 685.318 +	580-* \
 685.319 +	| a29k-* \
 685.320 +	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 685.321 +	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
 685.322 +	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 685.323 +	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 685.324 +	| avr-* | avr32-* \
 685.325 +	| bfin-* | bs2000-* \
 685.326 +	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
 685.327 +	| clipper-* | craynv-* | cydra-* \
 685.328 +	| d10v-* | d30v-* | dlx-* \
 685.329 +	| elxsi-* \
 685.330 +	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 685.331 +	| h8300-* | h8500-* \
 685.332 +	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 685.333 +	| i*86-* | i860-* | i960-* | ia64-* \
 685.334 +	| ip2k-* | iq2000-* \
 685.335 +	| m32c-* | m32r-* | m32rle-* \
 685.336 +	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
 685.337 +	| m88110-* | m88k-* | maxq-* | mcore-* \
 685.338 +	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 685.339 +	| mips16-* \
 685.340 +	| mips64-* | mips64el-* \
 685.341 +	| mips64vr-* | mips64vrel-* \
 685.342 +	| mips64orion-* | mips64orionel-* \
 685.343 +	| mips64vr4100-* | mips64vr4100el-* \
 685.344 +	| mips64vr4300-* | mips64vr4300el-* \
 685.345 +	| mips64vr5000-* | mips64vr5000el-* \
 685.346 +	| mips64vr5900-* | mips64vr5900el-* \
 685.347 +	| mipsisa32-* | mipsisa32el-* \
 685.348 +	| mipsisa32r2-* | mipsisa32r2el-* \
 685.349 +	| mipsisa64-* | mipsisa64el-* \
 685.350 +	| mipsisa64r2-* | mipsisa64r2el-* \
 685.351 +	| mipsisa64sb1-* | mipsisa64sb1el-* \
 685.352 +	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
 685.353 +	| mipstx39-* | mipstx39el-* \
 685.354 +	| mmix-* \
 685.355 +	| mt-* \
 685.356 +	| msp430-* \
 685.357 +	| nios-* | nios2-* \
 685.358 +	| none-* | np1-* | ns16k-* | ns32k-* \
 685.359 +	| orion-* \
 685.360 +	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 685.361 +	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 685.362 +	| pyramid-* \
 685.363 +	| romp-* | rs6000-* \
 685.364 +	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 685.365 +	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 685.366 +	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 685.367 +	| sparclite-* \
 685.368 +	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
 685.369 +	| tahoe-* | thumb-* \
 685.370 +	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 685.371 +	| tron-* \
 685.372 +	| v850-* | v850e-* | vax-* \
 685.373 +	| we32k-* \
 685.374 +	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
 685.375 +	| xstormy16-* | xtensa-* \
 685.376 +	| ymp-* \
 685.377 +	| z8k-*)
 685.378 +		;;
 685.379 +	# Recognize the various machine names and aliases which stand
 685.380 +	# for a CPU type and a company and sometimes even an OS.
 685.381 +	386bsd)
 685.382 +		basic_machine=i386-unknown
 685.383 +		os=-bsd
 685.384 +		;;
 685.385 +	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
 685.386 +		basic_machine=m68000-att
 685.387 +		;;
 685.388 +	3b*)
 685.389 +		basic_machine=we32k-att
 685.390 +		;;
 685.391 +	a29khif)
 685.392 +		basic_machine=a29k-amd
 685.393 +		os=-udi
 685.394 +		;;
 685.395 +    	abacus)
 685.396 +		basic_machine=abacus-unknown
 685.397 +		;;
 685.398 +	adobe68k)
 685.399 +		basic_machine=m68010-adobe
 685.400 +		os=-scout
 685.401 +		;;
 685.402 +	alliant | fx80)
 685.403 +		basic_machine=fx80-alliant
 685.404 +		;;
 685.405 +	altos | altos3068)
 685.406 +		basic_machine=m68k-altos
 685.407 +		;;
 685.408 +	am29k)
 685.409 +		basic_machine=a29k-none
 685.410 +		os=-bsd
 685.411 +		;;
 685.412 +	amd64)
 685.413 +		basic_machine=x86_64-pc
 685.414 +		;;
 685.415 +	amd64-*)
 685.416 +		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
 685.417 +		;;
 685.418 +	amdahl)
 685.419 +		basic_machine=580-amdahl
 685.420 +		os=-sysv
 685.421 +		;;
 685.422 +	amiga | amiga-*)
 685.423 +		basic_machine=m68k-unknown
 685.424 +		;;
 685.425 +	amigaos | amigados)
 685.426 +		basic_machine=m68k-unknown
 685.427 +		os=-amigaos
 685.428 +		;;
 685.429 +	amigaunix | amix)
 685.430 +		basic_machine=m68k-unknown
 685.431 +		os=-sysv4
 685.432 +		;;
 685.433 +	apollo68)
 685.434 +		basic_machine=m68k-apollo
 685.435 +		os=-sysv
 685.436 +		;;
 685.437 +	apollo68bsd)
 685.438 +		basic_machine=m68k-apollo
 685.439 +		os=-bsd
 685.440 +		;;
 685.441 +	aux)
 685.442 +		basic_machine=m68k-apple
 685.443 +		os=-aux
 685.444 +		;;
 685.445 +	balance)
 685.446 +		basic_machine=ns32k-sequent
 685.447 +		os=-dynix
 685.448 +		;;
 685.449 +	c90)
 685.450 +		basic_machine=c90-cray
 685.451 +		os=-unicos
 685.452 +		;;
 685.453 +	convex-c1)
 685.454 +		basic_machine=c1-convex
 685.455 +		os=-bsd
 685.456 +		;;
 685.457 +	convex-c2)
 685.458 +		basic_machine=c2-convex
 685.459 +		os=-bsd
 685.460 +		;;
 685.461 +	convex-c32)
 685.462 +		basic_machine=c32-convex
 685.463 +		os=-bsd
 685.464 +		;;
 685.465 +	convex-c34)
 685.466 +		basic_machine=c34-convex
 685.467 +		os=-bsd
 685.468 +		;;
 685.469 +	convex-c38)
 685.470 +		basic_machine=c38-convex
 685.471 +		os=-bsd
 685.472 +		;;
 685.473 +	cray | j90)
 685.474 +		basic_machine=j90-cray
 685.475 +		os=-unicos
 685.476 +		;;
 685.477 +	craynv)
 685.478 +		basic_machine=craynv-cray
 685.479 +		os=-unicosmp
 685.480 +		;;
 685.481 +	cr16c)
 685.482 +		basic_machine=cr16c-unknown
 685.483 +		os=-elf
 685.484 +		;;
 685.485 +	crds | unos)
 685.486 +		basic_machine=m68k-crds
 685.487 +		;;
 685.488 +	crisv32 | crisv32-* | etraxfs*)
 685.489 +		basic_machine=crisv32-axis
 685.490 +		;;
 685.491 +	cris | cris-* | etrax*)
 685.492 +		basic_machine=cris-axis
 685.493 +		;;
 685.494 +	crx)
 685.495 +		basic_machine=crx-unknown
 685.496 +		os=-elf
 685.497 +		;;
 685.498 +	da30 | da30-*)
 685.499 +		basic_machine=m68k-da30
 685.500 +		;;
 685.501 +	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
 685.502 +		basic_machine=mips-dec
 685.503 +		;;
 685.504 +	decsystem10* | dec10*)
 685.505 +		basic_machine=pdp10-dec
 685.506 +		os=-tops10
 685.507 +		;;
 685.508 +	decsystem20* | dec20*)
 685.509 +		basic_machine=pdp10-dec
 685.510 +		os=-tops20
 685.511 +		;;
 685.512 +	delta | 3300 | motorola-3300 | motorola-delta \
 685.513 +	      | 3300-motorola | delta-motorola)
 685.514 +		basic_machine=m68k-motorola
 685.515 +		;;
 685.516 +	delta88)
 685.517 +		basic_machine=m88k-motorola
 685.518 +		os=-sysv3
 685.519 +		;;
 685.520 +	djgpp)
 685.521 +		basic_machine=i586-pc
 685.522 +		os=-msdosdjgpp
 685.523 +		;;
 685.524 +	dpx20 | dpx20-*)
 685.525 +		basic_machine=rs6000-bull
 685.526 +		os=-bosx
 685.527 +		;;
 685.528 +	dpx2* | dpx2*-bull)
 685.529 +		basic_machine=m68k-bull
 685.530 +		os=-sysv3
 685.531 +		;;
 685.532 +	ebmon29k)
 685.533 +		basic_machine=a29k-amd
 685.534 +		os=-ebmon
 685.535 +		;;
 685.536 +	elxsi)
 685.537 +		basic_machine=elxsi-elxsi
 685.538 +		os=-bsd
 685.539 +		;;
 685.540 +	encore | umax | mmax)
 685.541 +		basic_machine=ns32k-encore
 685.542 +		;;
 685.543 +	es1800 | OSE68k | ose68k | ose | OSE)
 685.544 +		basic_machine=m68k-ericsson
 685.545 +		os=-ose
 685.546 +		;;
 685.547 +	fx2800)
 685.548 +		basic_machine=i860-alliant
 685.549 +		;;
 685.550 +	genix)
 685.551 +		basic_machine=ns32k-ns
 685.552 +		;;
 685.553 +	gmicro)
 685.554 +		basic_machine=tron-gmicro
 685.555 +		os=-sysv
 685.556 +		;;
 685.557 +	go32)
 685.558 +		basic_machine=i386-pc
 685.559 +		os=-go32
 685.560 +		;;
 685.561 +	h3050r* | hiux*)
 685.562 +		basic_machine=hppa1.1-hitachi
 685.563 +		os=-hiuxwe2
 685.564 +		;;
 685.565 +	h8300hms)
 685.566 +		basic_machine=h8300-hitachi
 685.567 +		os=-hms
 685.568 +		;;
 685.569 +	h8300xray)
 685.570 +		basic_machine=h8300-hitachi
 685.571 +		os=-xray
 685.572 +		;;
 685.573 +	h8500hms)
 685.574 +		basic_machine=h8500-hitachi
 685.575 +		os=-hms
 685.576 +		;;
 685.577 +	harris)
 685.578 +		basic_machine=m88k-harris
 685.579 +		os=-sysv3
 685.580 +		;;
 685.581 +	hp300-*)
 685.582 +		basic_machine=m68k-hp
 685.583 +		;;
 685.584 +	hp300bsd)
 685.585 +		basic_machine=m68k-hp
 685.586 +		os=-bsd
 685.587 +		;;
 685.588 +	hp300hpux)
 685.589 +		basic_machine=m68k-hp
 685.590 +		os=-hpux
 685.591 +		;;
 685.592 +	hp3k9[0-9][0-9] | hp9[0-9][0-9])
 685.593 +		basic_machine=hppa1.0-hp
 685.594 +		;;
 685.595 +	hp9k2[0-9][0-9] | hp9k31[0-9])
 685.596 +		basic_machine=m68000-hp
 685.597 +		;;
 685.598 +	hp9k3[2-9][0-9])
 685.599 +		basic_machine=m68k-hp
 685.600 +		;;
 685.601 +	hp9k6[0-9][0-9] | hp6[0-9][0-9])
 685.602 +		basic_machine=hppa1.0-hp
 685.603 +		;;
 685.604 +	hp9k7[0-79][0-9] | hp7[0-79][0-9])
 685.605 +		basic_machine=hppa1.1-hp
 685.606 +		;;
 685.607 +	hp9k78[0-9] | hp78[0-9])
 685.608 +		# FIXME: really hppa2.0-hp
 685.609 +		basic_machine=hppa1.1-hp
 685.610 +		;;
 685.611 +	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
 685.612 +		# FIXME: really hppa2.0-hp
 685.613 +		basic_machine=hppa1.1-hp
 685.614 +		;;
 685.615 +	hp9k8[0-9][13679] | hp8[0-9][13679])
 685.616 +		basic_machine=hppa1.1-hp
 685.617 +		;;
 685.618 +	hp9k8[0-9][0-9] | hp8[0-9][0-9])
 685.619 +		basic_machine=hppa1.0-hp
 685.620 +		;;
 685.621 +	hppa-next)
 685.622 +		os=-nextstep3
 685.623 +		;;
 685.624 +	hppaosf)
 685.625 +		basic_machine=hppa1.1-hp
 685.626 +		os=-osf
 685.627 +		;;
 685.628 +	hppro)
 685.629 +		basic_machine=hppa1.1-hp
 685.630 +		os=-proelf
 685.631 +		;;
 685.632 +	i370-ibm* | ibm*)
 685.633 +		basic_machine=i370-ibm
 685.634 +		;;
 685.635 +# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
 685.636 +	i*86v32)
 685.637 +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 685.638 +		os=-sysv32
 685.639 +		;;
 685.640 +	i*86v4*)
 685.641 +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 685.642 +		os=-sysv4
 685.643 +		;;
 685.644 +	i*86v)
 685.645 +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 685.646 +		os=-sysv
 685.647 +		;;
 685.648 +	i*86sol2)
 685.649 +		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 685.650 +		os=-solaris2
 685.651 +		;;
 685.652 +	i386mach)
 685.653 +		basic_machine=i386-mach
 685.654 +		os=-mach
 685.655 +		;;
 685.656 +	i386-vsta | vsta)
 685.657 +		basic_machine=i386-unknown
 685.658 +		os=-vsta
 685.659 +		;;
 685.660 +	iris | iris4d)
 685.661 +		basic_machine=mips-sgi
 685.662 +		case $os in
 685.663 +		    -irix*)
 685.664 +			;;
 685.665 +		    *)
 685.666 +			os=-irix4
 685.667 +			;;
 685.668 +		esac
 685.669 +		;;
 685.670 +	isi68 | isi)
 685.671 +		basic_machine=m68k-isi
 685.672 +		os=-sysv
 685.673 +		;;
 685.674 +	m88k-omron*)
 685.675 +		basic_machine=m88k-omron
 685.676 +		;;
 685.677 +	magnum | m3230)
 685.678 +		basic_machine=mips-mips
 685.679 +		os=-sysv
 685.680 +		;;
 685.681 +	merlin)
 685.682 +		basic_machine=ns32k-utek
 685.683 +		os=-sysv
 685.684 +		;;
 685.685 +	mingw32)
 685.686 +		basic_machine=i386-pc
 685.687 +		os=-mingw32
 685.688 +		;;
 685.689 +	miniframe)
 685.690 +		basic_machine=m68000-convergent
 685.691 +		;;
 685.692 +	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
 685.693 +		basic_machine=m68k-atari
 685.694 +		os=-mint
 685.695 +		;;
 685.696 +	mips3*-*)
 685.697 +		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
 685.698 +		;;
 685.699 +	mips3*)
 685.700 +		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
 685.701 +		;;
 685.702 +	monitor)
 685.703 +		basic_machine=m68k-rom68k
 685.704 +		os=-coff
 685.705 +		;;
 685.706 +	morphos)
 685.707 +		basic_machine=powerpc-unknown
 685.708 +		os=-morphos
 685.709 +		;;
 685.710 +	msdos)
 685.711 +		basic_machine=i386-pc
 685.712 +		os=-msdos
 685.713 +		;;
 685.714 +	ms1-*)
 685.715 +		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
 685.716 +		;;
 685.717 +	mvs)
 685.718 +		basic_machine=i370-ibm
 685.719 +		os=-mvs
 685.720 +		;;
 685.721 +	ncr3000)
 685.722 +		basic_machine=i486-ncr
 685.723 +		os=-sysv4
 685.724 +		;;
 685.725 +	netbsd386)
 685.726 +		basic_machine=i386-unknown
 685.727 +		os=-netbsd
 685.728 +		;;
 685.729 +	netwinder)
 685.730 +		basic_machine=armv4l-rebel
 685.731 +		os=-linux
 685.732 +		;;
 685.733 +	news | news700 | news800 | news900)
 685.734 +		basic_machine=m68k-sony
 685.735 +		os=-newsos
 685.736 +		;;
 685.737 +	news1000)
 685.738 +		basic_machine=m68030-sony
 685.739 +		os=-newsos
 685.740 +		;;
 685.741 +	news-3600 | risc-news)
 685.742 +		basic_machine=mips-sony
 685.743 +		os=-newsos
 685.744 +		;;
 685.745 +	necv70)
 685.746 +		basic_machine=v70-nec
 685.747 +		os=-sysv
 685.748 +		;;
 685.749 +	next | m*-next )
 685.750 +		basic_machine=m68k-next
 685.751 +		case $os in
 685.752 +		    -nextstep* )
 685.753 +			;;
 685.754 +		    -ns2*)
 685.755 +		      os=-nextstep2
 685.756 +			;;
 685.757 +		    *)
 685.758 +		      os=-nextstep3
 685.759 +			;;
 685.760 +		esac
 685.761 +		;;
 685.762 +	nh3000)
 685.763 +		basic_machine=m68k-harris
 685.764 +		os=-cxux
 685.765 +		;;
 685.766 +	nh[45]000)
 685.767 +		basic_machine=m88k-harris
 685.768 +		os=-cxux
 685.769 +		;;
 685.770 +	nindy960)
 685.771 +		basic_machine=i960-intel
 685.772 +		os=-nindy
 685.773 +		;;
 685.774 +	mon960)
 685.775 +		basic_machine=i960-intel
 685.776 +		os=-mon960
 685.777 +		;;
 685.778 +	nonstopux)
 685.779 +		basic_machine=mips-compaq
 685.780 +		os=-nonstopux
 685.781 +		;;
 685.782 +	np1)
 685.783 +		basic_machine=np1-gould
 685.784 +		;;
 685.785 +	nsr-tandem)
 685.786 +		basic_machine=nsr-tandem
 685.787 +		;;
 685.788 +	op50n-* | op60c-*)
 685.789 +		basic_machine=hppa1.1-oki
 685.790 +		os=-proelf
 685.791 +		;;
 685.792 +	openrisc | openrisc-*)
 685.793 +		basic_machine=or32-unknown
 685.794 +		;;
 685.795 +	os400)
 685.796 +		basic_machine=powerpc-ibm
 685.797 +		os=-os400
 685.798 +		;;
 685.799 +	OSE68000 | ose68000)
 685.800 +		basic_machine=m68000-ericsson
 685.801 +		os=-ose
 685.802 +		;;
 685.803 +	os68k)
 685.804 +		basic_machine=m68k-none
 685.805 +		os=-os68k
 685.806 +		;;
 685.807 +	pa-hitachi)
 685.808 +		basic_machine=hppa1.1-hitachi
 685.809 +		os=-hiuxwe2
 685.810 +		;;
 685.811 +	paragon)
 685.812 +		basic_machine=i860-intel
 685.813 +		os=-osf
 685.814 +		;;
 685.815 +	pbd)
 685.816 +		basic_machine=sparc-tti
 685.817 +		;;
 685.818 +	pbb)
 685.819 +		basic_machine=m68k-tti
 685.820 +		;;
 685.821 +	pc532 | pc532-*)
 685.822 +		basic_machine=ns32k-pc532
 685.823 +		;;
 685.824 +	pc98)
 685.825 +		basic_machine=i386-pc
 685.826 +		;;
 685.827 +	pc98-*)
 685.828 +		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
 685.829 +		;;
 685.830 +	pentium | p5 | k5 | k6 | nexgen | viac3)
 685.831 +		basic_machine=i586-pc
 685.832 +		;;
 685.833 +	pentiumpro | p6 | 6x86 | athlon | athlon_*)
 685.834 +		basic_machine=i686-pc
 685.835 +		;;
 685.836 +	pentiumii | pentium2 | pentiumiii | pentium3)
 685.837 +		basic_machine=i686-pc
 685.838 +		;;
 685.839 +	pentium4)
 685.840 +		basic_machine=i786-pc
 685.841 +		;;
 685.842 +	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
 685.843 +		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
 685.844 +		;;
 685.845 +	pentiumpro-* | p6-* | 6x86-* | athlon-*)
 685.846 +		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 685.847 +		;;
 685.848 +	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
 685.849 +		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
 685.850 +		;;
 685.851 +	pentium4-*)
 685.852 +		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
 685.853 +		;;
 685.854 +	pn)
 685.855 +		basic_machine=pn-gould
 685.856 +		;;
 685.857 +	power)	basic_machine=power-ibm
 685.858 +		;;
 685.859 +	ppc)	basic_machine=powerpc-unknown
 685.860 +		;;
 685.861 +	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 685.862 +		;;
 685.863 +	ppcle | powerpclittle | ppc-le | powerpc-little)
 685.864 +		basic_machine=powerpcle-unknown
 685.865 +		;;
 685.866 +	ppcle-* | powerpclittle-*)
 685.867 +		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
 685.868 +		;;
 685.869 +	ppc64)	basic_machine=powerpc64-unknown
 685.870 +		;;
 685.871 +	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
 685.872 +		;;
 685.873 +	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
 685.874 +		basic_machine=powerpc64le-unknown
 685.875 +		;;
 685.876 +	ppc64le-* | powerpc64little-*)
 685.877 +		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
 685.878 +		;;
 685.879 +	ps2)
 685.880 +		basic_machine=i386-ibm
 685.881 +		;;
 685.882 +	pw32)
 685.883 +		basic_machine=i586-unknown
 685.884 +		os=-pw32
 685.885 +		;;
 685.886 +	rdos)
 685.887 +		basic_machine=i386-pc
 685.888 +		os=-rdos
 685.889 +		;;
 685.890 +	rom68k)
 685.891 +		basic_machine=m68k-rom68k
 685.892 +		os=-coff
 685.893 +		;;
 685.894 +	rm[46]00)
 685.895 +		basic_machine=mips-siemens
 685.896 +		;;
 685.897 +	rtpc | rtpc-*)
 685.898 +		basic_machine=romp-ibm
 685.899 +		;;
 685.900 +	s390 | s390-*)
 685.901 +		basic_machine=s390-ibm
 685.902 +		;;
 685.903 +	s390x | s390x-*)
 685.904 +		basic_machine=s390x-ibm
 685.905 +		;;
 685.906 +	sa29200)
 685.907 +		basic_machine=a29k-amd
 685.908 +		os=-udi
 685.909 +		;;
 685.910 +	sb1)
 685.911 +		basic_machine=mipsisa64sb1-unknown
 685.912 +		;;
 685.913 +	sb1el)
 685.914 +		basic_machine=mipsisa64sb1el-unknown
 685.915 +		;;
 685.916 +	sde)
 685.917 +		basic_machine=mipsisa32-sde
 685.918 +		os=-elf
 685.919 +		;;
 685.920 +	sei)
 685.921 +		basic_machine=mips-sei
 685.922 +		os=-seiux
 685.923 +		;;
 685.924 +	sequent)
 685.925 +		basic_machine=i386-sequent
 685.926 +		;;
 685.927 +	sh)
 685.928 +		basic_machine=sh-hitachi
 685.929 +		os=-hms
 685.930 +		;;
 685.931 +	sh5el)
 685.932 +		basic_machine=sh5le-unknown
 685.933 +		;;
 685.934 +	sh64)
 685.935 +		basic_machine=sh64-unknown
 685.936 +		;;
 685.937 +	sparclite-wrs | simso-wrs)
 685.938 +		basic_machine=sparclite-wrs
 685.939 +		os=-vxworks
 685.940 +		;;
 685.941 +	sps7)
 685.942 +		basic_machine=m68k-bull
 685.943 +		os=-sysv2
 685.944 +		;;
 685.945 +	spur)
 685.946 +		basic_machine=spur-unknown
 685.947 +		;;
 685.948 +	st2000)
 685.949 +		basic_machine=m68k-tandem
 685.950 +		;;
 685.951 +	stratus)
 685.952 +		basic_machine=i860-stratus
 685.953 +		os=-sysv4
 685.954 +		;;
 685.955 +	sun2)
 685.956 +		basic_machine=m68000-sun
 685.957 +		;;
 685.958 +	sun2os3)
 685.959 +		basic_machine=m68000-sun
 685.960 +		os=-sunos3
 685.961 +		;;
 685.962 +	sun2os4)
 685.963 +		basic_machine=m68000-sun
 685.964 +		os=-sunos4
 685.965 +		;;
 685.966 +	sun3os3)
 685.967 +		basic_machine=m68k-sun
 685.968 +		os=-sunos3
 685.969 +		;;
 685.970 +	sun3os4)
 685.971 +		basic_machine=m68k-sun
 685.972 +		os=-sunos4
 685.973 +		;;
 685.974 +	sun4os3)
 685.975 +		basic_machine=sparc-sun
 685.976 +		os=-sunos3
 685.977 +		;;
 685.978 +	sun4os4)
 685.979 +		basic_machine=sparc-sun
 685.980 +		os=-sunos4
 685.981 +		;;
 685.982 +	sun4sol2)
 685.983 +		basic_machine=sparc-sun
 685.984 +		os=-solaris2
 685.985 +		;;
 685.986 +	sun3 | sun3-*)
 685.987 +		basic_machine=m68k-sun
 685.988 +		;;
 685.989 +	sun4)
 685.990 +		basic_machine=sparc-sun
 685.991 +		;;
 685.992 +	sun386 | sun386i | roadrunner)
 685.993 +		basic_machine=i386-sun
 685.994 +		;;
 685.995 +	sv1)
 685.996 +		basic_machine=sv1-cray
 685.997 +		os=-unicos
 685.998 +		;;
 685.999 +	symmetry)
685.1000 +		basic_machine=i386-sequent
685.1001 +		os=-dynix
685.1002 +		;;
685.1003 +	t3e)
685.1004 +		basic_machine=alphaev5-cray
685.1005 +		os=-unicos
685.1006 +		;;
685.1007 +	t90)
685.1008 +		basic_machine=t90-cray
685.1009 +		os=-unicos
685.1010 +		;;
685.1011 +	tic54x | c54x*)
685.1012 +		basic_machine=tic54x-unknown
685.1013 +		os=-coff
685.1014 +		;;
685.1015 +	tic55x | c55x*)
685.1016 +		basic_machine=tic55x-unknown
685.1017 +		os=-coff
685.1018 +		;;
685.1019 +	tic6x | c6x*)
685.1020 +		basic_machine=tic6x-unknown
685.1021 +		os=-coff
685.1022 +		;;
685.1023 +	tx39)
685.1024 +		basic_machine=mipstx39-unknown
685.1025 +		;;
685.1026 +	tx39el)
685.1027 +		basic_machine=mipstx39el-unknown
685.1028 +		;;
685.1029 +	toad1)
685.1030 +		basic_machine=pdp10-xkl
685.1031 +		os=-tops20
685.1032 +		;;
685.1033 +	tower | tower-32)
685.1034 +		basic_machine=m68k-ncr
685.1035 +		;;
685.1036 +	tpf)
685.1037 +		basic_machine=s390x-ibm
685.1038 +		os=-tpf
685.1039 +		;;
685.1040 +	udi29k)
685.1041 +		basic_machine=a29k-amd
685.1042 +		os=-udi
685.1043 +		;;
685.1044 +	ultra3)
685.1045 +		basic_machine=a29k-nyu
685.1046 +		os=-sym1
685.1047 +		;;
685.1048 +	v810 | necv810)
685.1049 +		basic_machine=v810-nec
685.1050 +		os=-none
685.1051 +		;;
685.1052 +	vaxv)
685.1053 +		basic_machine=vax-dec
685.1054 +		os=-sysv
685.1055 +		;;
685.1056 +	vms)
685.1057 +		basic_machine=vax-dec
685.1058 +		os=-vms
685.1059 +		;;
685.1060 +	vpp*|vx|vx-*)
685.1061 +		basic_machine=f301-fujitsu
685.1062 +		;;
685.1063 +	vxworks960)
685.1064 +		basic_machine=i960-wrs
685.1065 +		os=-vxworks
685.1066 +		;;
685.1067 +	vxworks68)
685.1068 +		basic_machine=m68k-wrs
685.1069 +		os=-vxworks
685.1070 +		;;
685.1071 +	vxworks29k)
685.1072 +		basic_machine=a29k-wrs
685.1073 +		os=-vxworks
685.1074 +		;;
685.1075 +	w65*)
685.1076 +		basic_machine=w65-wdc
685.1077 +		os=-none
685.1078 +		;;
685.1079 +	w89k-*)
685.1080 +		basic_machine=hppa1.1-winbond
685.1081 +		os=-proelf
685.1082 +		;;
685.1083 +	xbox)
685.1084 +		basic_machine=i686-pc
685.1085 +		os=-mingw32
685.1086 +		;;
685.1087 +	xps | xps100)
685.1088 +		basic_machine=xps100-honeywell
685.1089 +		;;
685.1090 +	ymp)
685.1091 +		basic_machine=ymp-cray
685.1092 +		os=-unicos
685.1093 +		;;
685.1094 +	z8k-*-coff)
685.1095 +		basic_machine=z8k-unknown
685.1096 +		os=-sim
685.1097 +		;;
685.1098 +	none)
685.1099 +		basic_machine=none-none
685.1100 +		os=-none
685.1101 +		;;
685.1102 +
685.1103 +# Here we handle the default manufacturer of certain CPU types.  It is in
685.1104 +# some cases the only manufacturer, in others, it is the most popular.
685.1105 +	w89k)
685.1106 +		basic_machine=hppa1.1-winbond
685.1107 +		;;
685.1108 +	op50n)
685.1109 +		basic_machine=hppa1.1-oki
685.1110 +		;;
685.1111 +	op60c)
685.1112 +		basic_machine=hppa1.1-oki
685.1113 +		;;
685.1114 +	romp)
685.1115 +		basic_machine=romp-ibm
685.1116 +		;;
685.1117 +	mmix)
685.1118 +		basic_machine=mmix-knuth
685.1119 +		;;
685.1120 +	rs6000)
685.1121 +		basic_machine=rs6000-ibm
685.1122 +		;;
685.1123 +	vax)
685.1124 +		basic_machine=vax-dec
685.1125 +		;;
685.1126 +	pdp10)
685.1127 +		# there are many clones, so DEC is not a safe bet
685.1128 +		basic_machine=pdp10-unknown
685.1129 +		;;
685.1130 +	pdp11)
685.1131 +		basic_machine=pdp11-dec
685.1132 +		;;
685.1133 +	we32k)
685.1134 +		basic_machine=we32k-att
685.1135 +		;;
685.1136 +	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
685.1137 +		basic_machine=sh-unknown
685.1138 +		;;
685.1139 +	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
685.1140 +		basic_machine=sparc-sun
685.1141 +		;;
685.1142 +	cydra)
685.1143 +		basic_machine=cydra-cydrome
685.1144 +		;;
685.1145 +	orion)
685.1146 +		basic_machine=orion-highlevel
685.1147 +		;;
685.1148 +	orion105)
685.1149 +		basic_machine=clipper-highlevel
685.1150 +		;;
685.1151 +	mac | mpw | mac-mpw)
685.1152 +		basic_machine=m68k-apple
685.1153 +		;;
685.1154 +	pmac | pmac-mpw)
685.1155 +		basic_machine=powerpc-apple
685.1156 +		;;
685.1157 +	*-unknown)
685.1158 +		# Make sure to match an already-canonicalized machine name.
685.1159 +		;;
685.1160 +	*)
685.1161 +		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
685.1162 +		exit 1
685.1163 +		;;
685.1164 +esac
685.1165 +
685.1166 +# Here we canonicalize certain aliases for manufacturers.
685.1167 +case $basic_machine in
685.1168 +	*-digital*)
685.1169 +		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
685.1170 +		;;
685.1171 +	*-commodore*)
685.1172 +		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
685.1173 +		;;
685.1174 +	*)
685.1175 +		;;
685.1176 +esac
685.1177 +
685.1178 +# Decode manufacturer-specific aliases for certain operating systems.
685.1179 +
685.1180 +if [ x"$os" != x"" ]
685.1181 +then
685.1182 +case $os in
685.1183 +        # First match some system type aliases
685.1184 +        # that might get confused with valid system types.
685.1185 +	# -solaris* is a basic system type, with this one exception.
685.1186 +	-solaris1 | -solaris1.*)
685.1187 +		os=`echo $os | sed -e 's|solaris1|sunos4|'`
685.1188 +		;;
685.1189 +	-solaris)
685.1190 +		os=-solaris2
685.1191 +		;;
685.1192 +	-svr4*)
685.1193 +		os=-sysv4
685.1194 +		;;
685.1195 +	-unixware*)
685.1196 +		os=-sysv4.2uw
685.1197 +		;;
685.1198 +	-gnu/linux*)
685.1199 +		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
685.1200 +		;;
685.1201 +	# First accept the basic system types.
685.1202 +	# The portable systems comes first.
685.1203 +	# Each alternative MUST END IN A *, to match a version number.
685.1204 +	# -sysv* is not here because it comes later, after sysvr4.
685.1205 +	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
685.1206 +	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
685.1207 +	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
685.1208 +	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
685.1209 +	      | -aos* \
685.1210 +	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
685.1211 +	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
685.1212 +	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
685.1213 +	      | -openbsd* | -solidbsd* \
685.1214 +	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
685.1215 +	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
685.1216 +	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
685.1217 +	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
685.1218 +	      | -chorusos* | -chorusrdb* \
685.1219 +	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
685.1220 +	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
685.1221 +	      | -uxpv* | -beos* | -mpeix* | -udk* \
685.1222 +	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
685.1223 +	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
685.1224 +	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
685.1225 +	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
685.1226 +	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
685.1227 +	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
685.1228 +	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
685.1229 +	# Remember, each alternative MUST END IN *, to match a version number.
685.1230 +		;;
685.1231 +	-qnx*)
685.1232 +		case $basic_machine in
685.1233 +		    x86-* | i*86-*)
685.1234 +			;;
685.1235 +		    *)
685.1236 +			os=-nto$os
685.1237 +			;;
685.1238 +		esac
685.1239 +		;;
685.1240 +	-nto-qnx*)
685.1241 +		;;
685.1242 +	-nto*)
685.1243 +		os=`echo $os | sed -e 's|nto|nto-qnx|'`
685.1244 +		;;
685.1245 +	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
685.1246 +	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
685.1247 +	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
685.1248 +		;;
685.1249 +	-mac*)
685.1250 +		os=`echo $os | sed -e 's|mac|macos|'`
685.1251 +		;;
685.1252 +	-linux-dietlibc)
685.1253 +		os=-linux-dietlibc
685.1254 +		;;
685.1255 +	-linux*)
685.1256 +		os=`echo $os | sed -e 's|linux|linux-gnu|'`
685.1257 +		;;
685.1258 +	-sunos5*)
685.1259 +		os=`echo $os | sed -e 's|sunos5|solaris2|'`
685.1260 +		;;
685.1261 +	-sunos6*)
685.1262 +		os=`echo $os | sed -e 's|sunos6|solaris3|'`
685.1263 +		;;
685.1264 +	-opened*)
685.1265 +		os=-openedition
685.1266 +		;;
685.1267 +        -os400*)
685.1268 +		os=-os400
685.1269 +		;;
685.1270 +	-wince*)
685.1271 +		os=-wince
685.1272 +		;;
685.1273 +	-osfrose*)
685.1274 +		os=-osfrose
685.1275 +		;;
685.1276 +	-osf*)
685.1277 +		os=-osf
685.1278 +		;;
685.1279 +	-utek*)
685.1280 +		os=-bsd
685.1281 +		;;
685.1282 +	-dynix*)
685.1283 +		os=-bsd
685.1284 +		;;
685.1285 +	-acis*)
685.1286 +		os=-aos
685.1287 +		;;
685.1288 +	-atheos*)
685.1289 +		os=-atheos
685.1290 +		;;
685.1291 +	-syllable*)
685.1292 +		os=-syllable
685.1293 +		;;
685.1294 +	-386bsd)
685.1295 +		os=-bsd
685.1296 +		;;
685.1297 +	-ctix* | -uts*)
685.1298 +		os=-sysv
685.1299 +		;;
685.1300 +	-nova*)
685.1301 +		os=-rtmk-nova
685.1302 +		;;
685.1303 +	-ns2 )
685.1304 +		os=-nextstep2
685.1305 +		;;
685.1306 +	-nsk*)
685.1307 +		os=-nsk
685.1308 +		;;
685.1309 +	# Preserve the version number of sinix5.
685.1310 +	-sinix5.*)
685.1311 +		os=`echo $os | sed -e 's|sinix|sysv|'`
685.1312 +		;;
685.1313 +	-sinix*)
685.1314 +		os=-sysv4
685.1315 +		;;
685.1316 +        -tpf*)
685.1317 +		os=-tpf
685.1318 +		;;
685.1319 +	-triton*)
685.1320 +		os=-sysv3
685.1321 +		;;
685.1322 +	-oss*)
685.1323 +		os=-sysv3
685.1324 +		;;
685.1325 +	-svr4)
685.1326 +		os=-sysv4
685.1327 +		;;
685.1328 +	-svr3)
685.1329 +		os=-sysv3
685.1330 +		;;
685.1331 +	-sysvr4)
685.1332 +		os=-sysv4
685.1333 +		;;
685.1334 +	# This must come after -sysvr4.
685.1335 +	-sysv*)
685.1336 +		;;
685.1337 +	-ose*)
685.1338 +		os=-ose
685.1339 +		;;
685.1340 +	-es1800*)
685.1341 +		os=-ose
685.1342 +		;;
685.1343 +	-xenix)
685.1344 +		os=-xenix
685.1345 +		;;
685.1346 +	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
685.1347 +		os=-mint
685.1348 +		;;
685.1349 +	-aros*)
685.1350 +		os=-aros
685.1351 +		;;
685.1352 +	-kaos*)
685.1353 +		os=-kaos
685.1354 +		;;
685.1355 +	-zvmoe)
685.1356 +		os=-zvmoe
685.1357 +		;;
685.1358 +	-none)
685.1359 +		;;
685.1360 +	*)
685.1361 +		# Get rid of the `-' at the beginning of $os.
685.1362 +		os=`echo $os | sed 's/[^-]*-//'`
685.1363 +		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
685.1364 +		exit 1
685.1365 +		;;
685.1366 +esac
685.1367 +else
685.1368 +
685.1369 +# Here we handle the default operating systems that come with various machines.
685.1370 +# The value should be what the vendor currently ships out the door with their
685.1371 +# machine or put another way, the most popular os provided with the machine.
685.1372 +
685.1373 +# Note that if you're going to try to match "-MANUFACTURER" here (say,
685.1374 +# "-sun"), then you have to tell the case statement up towards the top
685.1375 +# that MANUFACTURER isn't an operating system.  Otherwise, code above
685.1376 +# will signal an error saying that MANUFACTURER isn't an operating
685.1377 +# system, and we'll never get to this point.
685.1378 +
685.1379 +case $basic_machine in
685.1380 +        score-*)
685.1381 +		os=-elf
685.1382 +		;;
685.1383 +        spu-*)
685.1384 +		os=-elf
685.1385 +		;;
685.1386 +	*-acorn)
685.1387 +		os=-riscix1.2
685.1388 +		;;
685.1389 +	arm*-rebel)
685.1390 +		os=-linux
685.1391 +		;;
685.1392 +	arm*-semi)
685.1393 +		os=-aout
685.1394 +		;;
685.1395 +        c4x-* | tic4x-*)
685.1396 +        	os=-coff
685.1397 +		;;
685.1398 +	# This must come before the *-dec entry.
685.1399 +	pdp10-*)
685.1400 +		os=-tops20
685.1401 +		;;
685.1402 +	pdp11-*)
685.1403 +		os=-none
685.1404 +		;;
685.1405 +	*-dec | vax-*)
685.1406 +		os=-ultrix4.2
685.1407 +		;;
685.1408 +	m68*-apollo)
685.1409 +		os=-domain
685.1410 +		;;
685.1411 +	i386-sun)
685.1412 +		os=-sunos4.0.2
685.1413 +		;;
685.1414 +	m68000-sun)
685.1415 +		os=-sunos3
685.1416 +		# This also exists in the configure program, but was not the
685.1417 +		# default.
685.1418 +		# os=-sunos4
685.1419 +		;;
685.1420 +	m68*-cisco)
685.1421 +		os=-aout
685.1422 +		;;
685.1423 +        mep-*)
685.1424 +		os=-elf
685.1425 +		;;
685.1426 +	mips*-cisco)
685.1427 +		os=-elf
685.1428 +		;;
685.1429 +	mips*-*)
685.1430 +		os=-elf
685.1431 +		;;
685.1432 +	or32-*)
685.1433 +		os=-coff
685.1434 +		;;
685.1435 +	*-tti)	# must be before sparc entry or we get the wrong os.
685.1436 +		os=-sysv3
685.1437 +		;;
685.1438 +	sparc-* | *-sun)
685.1439 +		os=-sunos4.1.1
685.1440 +		;;
685.1441 +	*-be)
685.1442 +		os=-beos
685.1443 +		;;
685.1444 +	*-haiku)
685.1445 +		os=-haiku
685.1446 +		;;
685.1447 +	*-ibm)
685.1448 +		os=-aix
685.1449 +		;;
685.1450 +    	*-knuth)
685.1451 +		os=-mmixware
685.1452 +		;;
685.1453 +	*-wec)
685.1454 +		os=-proelf
685.1455 +		;;
685.1456 +	*-winbond)
685.1457 +		os=-proelf
685.1458 +		;;
685.1459 +	*-oki)
685.1460 +		os=-proelf
685.1461 +		;;
685.1462 +	*-hp)
685.1463 +		os=-hpux
685.1464 +		;;
685.1465 +	*-hitachi)
685.1466 +		os=-hiux
685.1467 +		;;
685.1468 +	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
685.1469 +		os=-sysv
685.1470 +		;;
685.1471 +	*-cbm)
685.1472 +		os=-amigaos
685.1473 +		;;
685.1474 +	*-dg)
685.1475 +		os=-dgux
685.1476 +		;;
685.1477 +	*-dolphin)
685.1478 +		os=-sysv3
685.1479 +		;;
685.1480 +	m68k-ccur)
685.1481 +		os=-rtu
685.1482 +		;;
685.1483 +	m88k-omron*)
685.1484 +		os=-luna
685.1485 +		;;
685.1486 +	*-next )
685.1487 +		os=-nextstep
685.1488 +		;;
685.1489 +	*-sequent)
685.1490 +		os=-ptx
685.1491 +		;;
685.1492 +	*-crds)
685.1493 +		os=-unos
685.1494 +		;;
685.1495 +	*-ns)
685.1496 +		os=-genix
685.1497 +		;;
685.1498 +	i370-*)
685.1499 +		os=-mvs
685.1500 +		;;
685.1501 +	*-next)
685.1502 +		os=-nextstep3
685.1503 +		;;
685.1504 +	*-gould)
685.1505 +		os=-sysv
685.1506 +		;;
685.1507 +	*-highlevel)
685.1508 +		os=-bsd
685.1509 +		;;
685.1510 +	*-encore)
685.1511 +		os=-bsd
685.1512 +		;;
685.1513 +	*-sgi)
685.1514 +		os=-irix
685.1515 +		;;
685.1516 +	*-siemens)
685.1517 +		os=-sysv4
685.1518 +		;;
685.1519 +	*-masscomp)
685.1520 +		os=-rtu
685.1521 +		;;
685.1522 +	f30[01]-fujitsu | f700-fujitsu)
685.1523 +		os=-uxpv
685.1524 +		;;
685.1525 +	*-rom68k)
685.1526 +		os=-coff
685.1527 +		;;
685.1528 +	*-*bug)
685.1529 +		os=-coff
685.1530 +		;;
685.1531 +	*-apple)
685.1532 +		os=-macos
685.1533 +		;;
685.1534 +	*-atari*)
685.1535 +		os=-mint
685.1536 +		;;
685.1537 +	*)
685.1538 +		os=-none
685.1539 +		;;
685.1540 +esac
685.1541 +fi
685.1542 +
685.1543 +# Here we handle the case where we know the os, and the CPU type, but not the
685.1544 +# manufacturer.  We pick the logical manufacturer.
685.1545 +vendor=unknown
685.1546 +case $basic_machine in
685.1547 +	*-unknown)
685.1548 +		case $os in
685.1549 +			-riscix*)
685.1550 +				vendor=acorn
685.1551 +				;;
685.1552 +			-sunos*)
685.1553 +				vendor=sun
685.1554 +				;;
685.1555 +			-aix*)
685.1556 +				vendor=ibm
685.1557 +				;;
685.1558 +			-beos*)
685.1559 +				vendor=be
685.1560 +				;;
685.1561 +			-hpux*)
685.1562 +				vendor=hp
685.1563 +				;;
685.1564 +			-mpeix*)
685.1565 +				vendor=hp
685.1566 +				;;
685.1567 +			-hiux*)
685.1568 +				vendor=hitachi
685.1569 +				;;
685.1570 +			-unos*)
685.1571 +				vendor=crds
685.1572 +				;;
685.1573 +			-dgux*)
685.1574 +				vendor=dg
685.1575 +				;;
685.1576 +			-luna*)
685.1577 +				vendor=omron
685.1578 +				;;
685.1579 +			-genix*)
685.1580 +				vendor=ns
685.1581 +				;;
685.1582 +			-mvs* | -opened*)
685.1583 +				vendor=ibm
685.1584 +				;;
685.1585 +			-os400*)
685.1586 +				vendor=ibm
685.1587 +				;;
685.1588 +			-ptx*)
685.1589 +				vendor=sequent
685.1590 +				;;
685.1591 +			-tpf*)
685.1592 +				vendor=ibm
685.1593 +				;;
685.1594 +			-vxsim* | -vxworks* | -windiss*)
685.1595 +				vendor=wrs
685.1596 +				;;
685.1597 +			-aux*)
685.1598 +				vendor=apple
685.1599 +				;;
685.1600 +			-hms*)
685.1601 +				vendor=hitachi
685.1602 +				;;
685.1603 +			-mpw* | -macos*)
685.1604 +				vendor=apple
685.1605 +				;;
685.1606 +			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
685.1607 +				vendor=atari
685.1608 +				;;
685.1609 +			-vos*)
685.1610 +				vendor=stratus
685.1611 +				;;
685.1612 +		esac
685.1613 +		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
685.1614 +		;;
685.1615 +esac
685.1616 +
685.1617 +echo $basic_machine$os
685.1618 +exit
685.1619 +
685.1620 +# Local variables:
685.1621 +# eval: (add-hook 'write-file-hooks 'time-stamp)
685.1622 +# time-stamp-start: "timestamp='"
685.1623 +# time-stamp-format: "%:y-%02m-%02d"
685.1624 +# time-stamp-end: "'"
685.1625 +# End: