summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--TODO22
-rwxr-xr-xbootstrap118
-rw-r--r--config/global/extract.in18
-rw-r--r--config/libc/bionic.in2
-rw-r--r--config/libc/glibc.in29
-rw-r--r--config/libc/mingw-w64.in4
-rw-r--r--ct-ng.in4
-rw-r--r--maintainer/kconfig-choice.template10
-rw-r--r--maintainer/kconfig-menu.template4
-rw-r--r--maintainer/kconfig-versions.template148
-rw-r--r--maintainer/package-versions.template13
-rwxr-xr-xmaintainer/test-packages.sh194
-rw-r--r--packages/android-ndk/package.desc1
-rw-r--r--packages/android-ndk/r15c/version.desc (renamed from packages/uClibc-ng/1.0.24/version.desc)0
-rw-r--r--packages/autoconf/2.65/version.desc1
-rw-r--r--packages/autoconf/package.desc1
-rw-r--r--packages/automake/1.11.1/version.desc1
-rw-r--r--packages/automake/1.14.1/version.desc (renamed from packages/uClibc-ng/1.0.21/version.desc)0
-rw-r--r--packages/automake/1.14/version.desc1
-rw-r--r--packages/automake/1.15.1/version.desc (renamed from packages/uClibc-ng/1.0.23/version.desc)0
-rw-r--r--packages/automake/package.desc1
-rw-r--r--packages/avr-libc/1.8.0/version.desc1
-rw-r--r--packages/avr-libc/package.desc1
-rw-r--r--packages/binutils-linaro/2.23.2-2013.10-4/version.desc1
-rw-r--r--packages/binutils-linaro/package.desc1
-rw-r--r--packages/binutils/2.23.2/version.desc1
-rw-r--r--packages/binutils/2.24/version.desc1
-rw-r--r--packages/binutils/2.25.1/version.desc1
-rw-r--r--packages/binutils/2.26.1/120-sh-conf.patch (renamed from packages/binutils/2.28/120-sh-conf.patch)0
-rw-r--r--packages/binutils/2.26.1/300-001_ld_makefile_patch.patch (renamed from packages/binutils/2.28/300-001_ld_makefile_patch.patch)0
-rw-r--r--packages/binutils/2.26.1/300-012_check_ldrunpath_length.patch (renamed from packages/binutils/2.28/300-012_check_ldrunpath_length.patch)0
-rw-r--r--packages/binutils/2.26.1/310-fix-gold-pthreads-typo.patch (renamed from packages/binutils/2.26/310-fix-gold-pthreads-typo.patch)0
-rw-r--r--packages/binutils/2.26.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch (renamed from packages/binutils/2.26/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch)0
-rw-r--r--packages/binutils/2.26.1/330-Dont-link-to-libfl-as-its-unnecessary.patch (renamed from packages/binutils/2.26/330-Dont-link-to-libfl-as-its-unnecessary.patch)0
-rw-r--r--packages/binutils/2.26.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch (renamed from packages/binutils/2.28/340-Darwin-gold-binary-cc-include-string-not-cstring.patch)0
-rw-r--r--packages/binutils/2.26.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch (renamed from packages/binutils/2.28/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch)0
-rw-r--r--packages/binutils/2.26.1/500-sysroot.patch (renamed from packages/binutils/2.26/500-sysroot.patch)0
-rw-r--r--packages/binutils/2.26.1/600-poison-system-directories.patch (renamed from packages/binutils/2.26/600-poison-system-directories.patch)0
-rw-r--r--packages/binutils/2.26.1/700-Fix-library-paths-on-PowerPC.patch (renamed from packages/binutils/2.28/700-Fix-library-paths-on-PowerPC.patch)0
-rw-r--r--packages/binutils/2.26.1/914-xtensa-fix-signedness-of-gas-relocations.patch (renamed from packages/binutils/2.26/914-xtensa-fix-signedness-of-gas-relocations.patch)0
-rw-r--r--packages/binutils/2.26.1/915-xtensa-fix-.init-.fini-literals-moving.patch (renamed from packages/binutils/2.26/915-xtensa-fix-.init-.fini-literals-moving.patch)0
-rw-r--r--packages/binutils/2.26.1/version.desc1
-rw-r--r--packages/binutils/2.26/700-Fix-library-paths-on-PowerPC.patch42
-rw-r--r--packages/binutils/2.27/version.desc1
-rw-r--r--packages/binutils/2.28.1/120-sh-conf.patch (renamed from packages/binutils/2.26/120-sh-conf.patch)0
-rw-r--r--packages/binutils/2.28.1/300-001_ld_makefile_patch.patch (renamed from packages/binutils/2.26/300-001_ld_makefile_patch.patch)0
-rw-r--r--packages/binutils/2.28.1/300-012_check_ldrunpath_length.patch (renamed from packages/binutils/2.26/300-012_check_ldrunpath_length.patch)0
-rw-r--r--packages/binutils/2.28.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch (renamed from packages/binutils/2.28/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch)0
-rw-r--r--packages/binutils/2.28.1/330-Dont-link-to-libfl-as-its-unnecessary.patch (renamed from packages/binutils/2.28/330-Dont-link-to-libfl-as-its-unnecessary.patch)0
-rw-r--r--packages/binutils/2.28.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch (renamed from packages/binutils/2.26/340-Darwin-gold-binary-cc-include-string-not-cstring.patch)0
-rw-r--r--packages/binutils/2.28.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch (renamed from packages/binutils/2.26/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch)0
-rw-r--r--packages/binutils/2.28.1/500-sysroot.patch (renamed from packages/binutils/2.28/500-sysroot.patch)0
-rw-r--r--packages/binutils/2.28.1/600-poison-system-directories.patch (renamed from packages/binutils/2.28/600-poison-system-directories.patch)0
-rw-r--r--packages/binutils/2.28.1/version.desc (renamed from packages/uClibc-ng/1.0.22/version.desc)0
-rw-r--r--packages/binutils/2.29/120-sh-conf.patch33
-rw-r--r--packages/binutils/2.29/300-001_ld_makefile_patch.patch26
-rw-r--r--packages/binutils/2.29/300-012_check_ldrunpath_length.patch22
-rw-r--r--packages/binutils/2.29/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch11
-rw-r--r--packages/binutils/2.29/330-Dont-link-to-libfl-as-its-unnecessary.patch108
-rw-r--r--packages/binutils/2.29/340-Darwin-gold-binary-cc-include-string-not-cstring.patch13
-rw-r--r--packages/binutils/2.29/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch77
-rw-r--r--packages/binutils/2.29/500-sysroot.patch37
-rw-r--r--packages/binutils/2.29/600-poison-system-directories.patch285
-rw-r--r--packages/binutils/2.29/version.desc (renamed from packages/newlib/2.5.0.20170519/version.desc)0
-rw-r--r--packages/binutils/package.desc3
-rw-r--r--packages/cloog/0.18.0/version.desc1
-rw-r--r--packages/cloog/package.desc1
-rw-r--r--packages/duma/package.desc1
-rw-r--r--packages/expat/2.2.3/version.desc (renamed from packages/mingw-w64/v5.0.1/version.desc)0
-rw-r--r--packages/expat/package.desc1
-rw-r--r--packages/gcc-linaro/4.9-2017.01/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch188
-rw-r--r--packages/gcc-linaro/5.4-2017.05/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch188
-rw-r--r--packages/gcc-linaro/6.3-2017.05/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch188
-rw-r--r--packages/gcc-linaro/6.3-2017.05/1100-ubsan-fix-check-empty-string.patch28
-rw-r--r--packages/gcc-linaro/7.1-2017.05/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch203
-rw-r--r--packages/gcc-linaro/package.desc1
-rw-r--r--packages/gcc/4.8.5/version.desc1
-rw-r--r--packages/gcc/4.9.4/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch188
-rw-r--r--packages/gcc/4.9.4/version.desc1
-rw-r--r--packages/gcc/5.4.0/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch188
-rw-r--r--packages/gcc/5.4.0/version.desc1
-rw-r--r--packages/gcc/6.4.0/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch188
-rw-r--r--packages/gcc/7.1.0/111-alpha-bad-eh_frame.patch13
-rw-r--r--packages/gcc/7.1.0/870-gcc-xtensa-fix-fprintf-format-specifiers.patch74
-rw-r--r--packages/gcc/7.2.0/100-uclibc-conf.patch (renamed from packages/gcc/7.1.0/100-uclibc-conf.patch)0
-rw-r--r--packages/gcc/7.2.0/1000-libtool-leave-framework-alone.patch (renamed from packages/gcc/7.1.0/1000-libtool-leave-framework-alone.patch)0
-rw-r--r--packages/gcc/7.2.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch (renamed from packages/gcc/7.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch)0
-rw-r--r--packages/gcc/7.2.0/380-gcc-plugin-POSIX-include-sys-select-h.patch (renamed from packages/gcc/7.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch)0
-rw-r--r--packages/gcc/7.2.0/810-arm-softfloat-libgcc.patch (renamed from packages/gcc/7.1.0/810-arm-softfloat-libgcc.patch)0
-rw-r--r--packages/gcc/7.2.0/860-cilk-wchar.patch (renamed from packages/gcc/7.1.0/860-cilk-wchar.patch)0
-rw-r--r--packages/gcc/7.2.0/891-fix-m68k-uclinux.patch (renamed from packages/gcc/7.1.0/891-fix-m68k-uclinux.patch)0
-rw-r--r--packages/gcc/7.2.0/900-libgfortran-missing-include.patch (renamed from packages/gcc/7.1.0/900-libgfortran-missing-include.patch)0
-rw-r--r--packages/gcc/7.2.0/910-nios2-bad-multilib-default.patch (renamed from packages/gcc/7.1.0/910-nios2-bad-multilib-default.patch)0
-rw-r--r--packages/gcc/7.2.0/930-libgcc-disable-split-stack-nothreads.patch (renamed from packages/gcc/7.1.0/930-libgcc-disable-split-stack-nothreads.patch)0
-rw-r--r--packages/gcc/7.2.0/951-bionic-ndk.patch (renamed from packages/gcc/7.1.0/951-bionic-ndk.patch)0
-rw-r--r--packages/gcc/7.2.0/952-bionic-errno.patch (renamed from packages/gcc/7.1.0/952-bionic-errno.patch)0
-rw-r--r--packages/gcc/7.2.0/970-crystax.patch (renamed from packages/gcc/7.1.0/970-crystax.patch)0
-rw-r--r--packages/gcc/7.2.0/971-crystax.patch (renamed from packages/gcc/7.1.0/971-crystax.patch)0
-rw-r--r--packages/gcc/7.2.0/972-crystax.patch (renamed from packages/gcc/7.1.0/972-crystax.patch)0
-rw-r--r--packages/gcc/7.2.0/973-crystax.patch (renamed from packages/gcc/7.1.0/973-crystax.patch)0
-rw-r--r--packages/gcc/7.2.0/974-crystax.patch (renamed from packages/gcc/7.1.0/974-crystax.patch)0
-rw-r--r--packages/gcc/7.2.0/975-crystax.patch (renamed from packages/gcc/7.1.0/975-crystax.patch)0
-rw-r--r--packages/gcc/7.2.0/976-crystax.patch (renamed from packages/gcc/7.1.0/976-crystax.patch)0
-rw-r--r--packages/gcc/7.2.0/977-crystax.patch (renamed from packages/gcc/7.1.0/977-crystax.patch)0
-rw-r--r--packages/gcc/7.2.0/version.desc (renamed from packages/linux/4.9.30/version.desc)0
-rw-r--r--packages/gcc/package.desc1
-rw-r--r--packages/gdb-linaro/7.3-2011.12/version.desc1
-rw-r--r--packages/gdb-linaro/7.4-2012.06/version.desc1
-rw-r--r--packages/gdb-linaro/7.5-2012.12/version.desc1
-rw-r--r--packages/gdb-linaro/7.6.1-2013.10/version.desc1
-rw-r--r--packages/gdb-linaro/7.7-2014.05/version.desc1
-rw-r--r--packages/gdb-linaro/7.7.1-2014.06-1/version.desc1
-rw-r--r--packages/gdb-linaro/package.desc1
-rw-r--r--packages/gdb/6.8a/version.desc2
-rw-r--r--packages/gdb/7.0.1a/version.desc2
-rw-r--r--packages/gdb/7.0a/version.desc2
-rw-r--r--packages/gdb/7.10/10-setns-handling.patch52
-rw-r--r--packages/gdb/7.10/100-musl_fix.patch28
-rw-r--r--packages/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch39
-rw-r--r--packages/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch35
-rw-r--r--packages/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch31
-rw-r--r--packages/gdb/7.10/version.desc1
-rw-r--r--packages/gdb/7.1a/version.desc2
-rw-r--r--packages/gdb/7.2a/version.desc2
-rw-r--r--packages/gdb/7.3.1/version.desc1
-rw-r--r--packages/gdb/7.3a/version.desc1
-rw-r--r--packages/gdb/7.4.1/version.desc1
-rw-r--r--packages/gdb/7.4/version.desc1
-rw-r--r--packages/gdb/7.5.1/version.desc1
-rw-r--r--packages/gdb/7.6.1/version.desc1
-rw-r--r--packages/gdb/7.7.1/version.desc1
-rw-r--r--packages/gdb/7.7/version.desc1
-rw-r--r--packages/gdb/7.8/version.desc1
-rw-r--r--packages/gdb/7.9/version.desc1
-rw-r--r--packages/gdb/package.desc1
-rw-r--r--packages/gettext/package.desc1
-rw-r--r--packages/glibc-linaro/package.desc1
-rw-r--r--packages/glibc-ports/2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch16
-rw-r--r--packages/glibc-ports/2.12.1/330-m68k-sys-user.patch7
-rw-r--r--packages/glibc-ports/2.12.1/440-alpha-cache-shape.patch6
-rw-r--r--packages/glibc-ports/2.12.1/460-alpha-fix-gcc-4.1-warnings.patch7
-rw-r--r--packages/glibc-ports/2.12.1/530-alpha-fix-rtld-fPIC.patch7
-rw-r--r--packages/glibc-ports/2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch77
-rw-r--r--packages/glibc-ports/2.12.1/580-nptl-lowlevellock.patch7
-rw-r--r--packages/glibc-ports/2.12.1/610-fpu-cw-mips.patch7
-rw-r--r--packages/glibc-ports/2.12.1/650-syslog.patch12
-rw-r--r--packages/glibc-ports/2.12.1/660-debug-readlink_chk-readklinkat_chk.patch24
-rw-r--r--packages/glibc-ports/2.12.1/670-support-hard-float-eabi.patch12
-rw-r--r--packages/glibc-ports/2.12.1/version.desc1
-rw-r--r--packages/glibc-ports/2.13/090-Fix-ARM-build-with-GCC-trunk.patch16
-rw-r--r--packages/glibc-ports/2.13/100-respect-env-CPPFLAGS.patch14
-rw-r--r--packages/glibc-ports/2.13/120-i386-x86_64-revert-clone-cfi.patch55
-rw-r--r--packages/glibc-ports/2.13/140-disable-ldconfig.patch16
-rw-r--r--packages/glibc-ports/2.13/150-queue-header-updates.patch85
-rw-r--r--packages/glibc-ports/2.13/160-manual-no-perl.patch24
-rw-r--r--packages/glibc-ports/2.13/170-localedef-fix-trampoline.patch53
-rw-r--r--packages/glibc-ports/2.13/180-resolv-dynamic.patch39
-rw-r--r--packages/glibc-ports/2.13/190-localedef-mmap.patch39
-rw-r--r--packages/glibc-ports/2.13/200-fadvise64_64.patch28
-rw-r--r--packages/glibc-ports/2.13/220-section-comments.patch24
-rw-r--r--packages/glibc-ports/2.13/230-no-inline-gmon.patch36
-rw-r--r--packages/glibc-ports/2.13/240-check_native-headers.patch17
-rw-r--r--packages/glibc-ports/2.13/260-assume-pipe2.patch40
-rw-r--r--packages/glibc-ports/2.13/270-china.patch32
-rw-r--r--packages/glibc-ports/2.13/280-new-valencian-locale.patch115
-rw-r--r--packages/glibc-ports/2.13/300-nscd-one-fork.patch40
-rw-r--r--packages/glibc-ports/2.13/310-hppa-nptl-carlos.patch246
-rw-r--r--packages/glibc-ports/2.13/330-m68k-sys-user.patch7
-rw-r--r--packages/glibc-ports/2.13/340-dl_execstack-PaX-support.patch66
-rw-r--r--packages/glibc-ports/2.13/350-pre20040117-pt_pax.patch32
-rw-r--r--packages/glibc-ports/2.13/360-tests-sandbox-libdl-paths.patch193
-rw-r--r--packages/glibc-ports/2.13/380-dont-build-timezone.patch14
-rw-r--r--packages/glibc-ports/2.13/400-alpha-xstat.patch15
-rw-r--r--packages/glibc-ports/2.13/410-alpha-SETPIPE-GETPIPE.patch6
-rw-r--r--packages/glibc-ports/2.13/420-alpha-statfs.patch6
-rw-r--r--packages/glibc-ports/2.13/430-alpha-creat.patch14
-rw-r--r--packages/glibc-ports/2.13/440-alpha-cache-shape.patch6
-rw-r--r--packages/glibc-ports/2.13/450-alpha-DEFAULT_STACK_PERMS.patch6
-rw-r--r--packages/glibc-ports/2.13/460-alpha-fix-gcc-4.1-warnings.patch7
-rw-r--r--packages/glibc-ports/2.13/470-alpha-feupdateenv.patch12
-rw-r--r--packages/glibc-ports/2.13/490-alpha_alpha-add-fdatasync-support.patch126
-rw-r--r--packages/glibc-ports/2.13/530-alpha-fix-rtld-fPIC.patch7
-rw-r--r--packages/glibc-ports/2.13/560-ppc-atomic.patch415
-rw-r--r--packages/glibc-ports/2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch77
-rw-r--r--packages/glibc-ports/2.13/580-nptl-lowlevellock.patch7
-rw-r--r--packages/glibc-ports/2.13/610-fpu-cw-mips.patch7
-rw-r--r--packages/glibc-ports/2.13/630-mips_shn_undef-hack.patch16
-rw-r--r--packages/glibc-ports/2.13/640-alpha-atfcts.patch12
-rw-r--r--packages/glibc-ports/2.13/670-support-hard-float-eabi.patch12
-rw-r--r--packages/glibc-ports/2.13/version.desc1
-rw-r--r--packages/glibc-ports/2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch16
-rw-r--r--packages/glibc-ports/2.14.1/330-m68k-sys-user.patch7
-rw-r--r--packages/glibc-ports/2.14.1/440-alpha-cache-shape.patch6
-rw-r--r--packages/glibc-ports/2.14.1/460-alpha-fix-gcc-4.1-warnings.patch7
-rw-r--r--packages/glibc-ports/2.14.1/530-alpha-fix-rtld-fPIC.patch7
-rw-r--r--packages/glibc-ports/2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch77
-rw-r--r--packages/glibc-ports/2.14.1/580-nptl-lowlevellock.patch7
-rw-r--r--packages/glibc-ports/2.14.1/610-fpu-cw-mips.patch7
-rw-r--r--packages/glibc-ports/2.14/090-Fix-ARM-build-with-GCC-trunk.patch72
-rw-r--r--packages/glibc-ports/2.14/330-m68k-sys-user.patch97
-rw-r--r--packages/glibc-ports/2.14/440-alpha-cache-shape.patch13
-rw-r--r--packages/glibc-ports/2.14/460-alpha-fix-gcc-4.1-warnings.patch56
-rw-r--r--packages/glibc-ports/2.14/530-alpha-fix-rtld-fPIC.patch21
-rw-r--r--packages/glibc-ports/2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch374
-rw-r--r--packages/glibc-ports/2.14/580-nptl-lowlevellock.patch23
-rw-r--r--packages/glibc-ports/2.14/610-fpu-cw-mips.patch15
-rw-r--r--packages/glibc-ports/2.15/090-Fix-ARM-build-with-GCC-trunk.patch16
-rw-r--r--packages/glibc-ports/2.15/091-libmemusage-link-failure.patch6
-rw-r--r--packages/glibc-ports/2.15/330-m68k-sys-user.patch7
-rw-r--r--packages/glibc-ports/2.15/440-alpha-cache-shape.patch6
-rw-r--r--packages/glibc-ports/2.15/460-alpha-fix-gcc-4.1-warnings.patch7
-rw-r--r--packages/glibc-ports/2.15/530-alpha-fix-rtld-fPIC.patch7
-rw-r--r--packages/glibc-ports/2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch77
-rw-r--r--packages/glibc-ports/2.15/580-nptl-lowlevellock.patch7
-rw-r--r--packages/glibc-ports/2.15/610-fpu-cw-mips.patch7
-rw-r--r--packages/glibc-ports/2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch8
-rw-r--r--packages/glibc-ports/2.16.0/330-m68k-sys-user.patch7
-rw-r--r--packages/glibc-ports/2.16.0/440-alpha-cache-shape.patch6
-rw-r--r--packages/glibc-ports/2.16.0/460-alpha-fix-gcc-4.1-warnings.patch7
-rw-r--r--packages/glibc-ports/2.16.0/530-alpha-fix-rtld-fPIC.patch7
-rw-r--r--packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch7
-rw-r--r--packages/glibc-ports/2.16.0/610-fpu-cw-mips.patch7
-rw-r--r--packages/glibc-ports/package.desc4
-rw-r--r--packages/glibc/2.12.1/100-respect-env-CPPFLAGS.patch (renamed from packages/glibc-ports/2.12.1/100-respect-env-CPPFLAGS.patch)0
-rw-r--r--packages/glibc/2.12.1/120-i386-x86_64-revert-clone-cfi.patch (renamed from packages/glibc-ports/2.12.1/120-i386-x86_64-revert-clone-cfi.patch)0
-rw-r--r--packages/glibc/2.12.1/140-disable-ldconfig.patch (renamed from packages/glibc-ports/2.12.1/140-disable-ldconfig.patch)0
-rw-r--r--packages/glibc/2.12.1/150-queue-header-updates.patch (renamed from packages/glibc-ports/2.12.1/150-queue-header-updates.patch)0
-rw-r--r--packages/glibc/2.12.1/160-manual-no-perl.patch (renamed from packages/glibc-ports/2.12.1/160-manual-no-perl.patch)0
-rw-r--r--packages/glibc/2.12.1/170-localedef-fix-trampoline.patch (renamed from packages/glibc-ports/2.12.1/170-localedef-fix-trampoline.patch)0
-rw-r--r--packages/glibc/2.12.1/180-resolv-dynamic.patch (renamed from packages/glibc-ports/2.12.1/180-resolv-dynamic.patch)0
-rw-r--r--packages/glibc/2.12.1/190-localedef-mmap.patch (renamed from packages/glibc-ports/2.12.1/190-localedef-mmap.patch)0
-rw-r--r--packages/glibc/2.12.1/200-fadvise64_64.patch (renamed from packages/glibc-ports/2.12.1/200-fadvise64_64.patch)0
-rw-r--r--packages/glibc/2.12.1/220-section-comments.patch (renamed from packages/glibc-ports/2.12.1/220-section-comments.patch)0
-rw-r--r--packages/glibc/2.12.1/230-no-inline-gmon.patch (renamed from packages/glibc-ports/2.12.1/230-no-inline-gmon.patch)0
-rw-r--r--packages/glibc/2.12.1/240-check_native-headers.patch (renamed from packages/glibc-ports/2.12.1/240-check_native-headers.patch)0
-rw-r--r--packages/glibc/2.12.1/250-fix-pr631.patch (renamed from packages/glibc-ports/2.12.1/250-fix-pr631.patch)0
-rw-r--r--packages/glibc/2.12.1/260-assume-pipe2.patch (renamed from packages/glibc-ports/2.12.1/260-assume-pipe2.patch)0
-rw-r--r--packages/glibc/2.12.1/270-china.patch (renamed from packages/glibc-ports/2.12.1/270-china.patch)0
-rw-r--r--packages/glibc/2.12.1/280-new-valencian-locale.patch (renamed from packages/glibc-ports/2.12.1/280-new-valencian-locale.patch)0
-rw-r--r--packages/glibc/2.12.1/300-nscd-one-fork.patch (renamed from packages/glibc-ports/2.12.1/300-nscd-one-fork.patch)0
-rw-r--r--packages/glibc/2.12.1/310-hppa-nptl-carlos.patch (renamed from packages/glibc-ports/2.12.1/310-hppa-nptl-carlos.patch)0
-rw-r--r--packages/glibc/2.12.1/340-dl_execstack-PaX-support.patch (renamed from packages/glibc-ports/2.12.1/340-dl_execstack-PaX-support.patch)0
-rw-r--r--packages/glibc/2.12.1/350-pre20040117-pt_pax.patch (renamed from packages/glibc-ports/2.12.1/350-pre20040117-pt_pax.patch)0
-rw-r--r--packages/glibc/2.12.1/360-tests-sandbox-libdl-paths.patch (renamed from packages/glibc-ports/2.12.1/360-tests-sandbox-libdl-paths.patch)0
-rw-r--r--packages/glibc/2.12.1/370-fnmatch.patch (renamed from packages/glibc-ports/2.12.1/370-fnmatch.patch)0
-rw-r--r--packages/glibc/2.12.1/380-dont-build-timezone.patch (renamed from packages/glibc-ports/2.12.1/380-dont-build-timezone.patch)0
-rw-r--r--packages/glibc/2.12.1/400-alpha-xstat.patch (renamed from packages/glibc-ports/2.12.1/400-alpha-xstat.patch)0
-rw-r--r--packages/glibc/2.12.1/430-alpha-creat.patch (renamed from packages/glibc-ports/2.12.1/430-alpha-creat.patch)0
-rw-r--r--packages/glibc/2.12.1/490-alpha_alpha-add-fdatasync-support.patch (renamed from packages/glibc-ports/2.12.1/490-alpha_alpha-add-fdatasync-support.patch)0
-rw-r--r--packages/glibc/2.12.1/560-ppc-atomic.patch (renamed from packages/glibc-ports/2.12.1/560-ppc-atomic.patch)0
-rw-r--r--packages/glibc/2.12.1/630-mips_shn_undef-hack.patch (renamed from packages/glibc-ports/2.12.1/630-mips_shn_undef-hack.patch)0
-rw-r--r--packages/glibc/2.12.1/640-alpha-atfcts.patch (renamed from packages/glibc-ports/2.12.1/640-alpha-atfcts.patch)0
-rw-r--r--packages/glibc/2.12.1/650-syslog.patch (renamed from packages/glibc-ports/2.16.0/650-syslog.patch)0
-rw-r--r--packages/glibc/2.12.1/660-debug-readlink_chk-readklinkat_chk.patch (renamed from packages/glibc-ports/2.16.0/660-debug-readlink_chk-readklinkat_chk.patch)0
-rw-r--r--packages/glibc/2.12.1/998-obstack-common.patch30
-rw-r--r--packages/glibc/2.12.2/998-obstack-common.patch30
-rw-r--r--packages/glibc/2.13/100-respect-env-CPPFLAGS.patch (renamed from packages/glibc-ports/2.15/100-respect-env-CPPFLAGS.patch)0
-rw-r--r--packages/glibc/2.13/120-i386-x86_64-revert-clone-cfi.patch (renamed from packages/glibc-ports/2.16.0/120-i386-x86_64-revert-clone-cfi.patch)0
-rw-r--r--packages/glibc/2.13/140-disable-ldconfig.patch (renamed from packages/glibc-ports/2.16.0/140-disable-ldconfig.patch)0
-rw-r--r--packages/glibc/2.13/150-queue-header-updates.patch (renamed from packages/glibc-ports/2.16.0/150-queue-header-updates.patch)0
-rw-r--r--packages/glibc/2.13/160-manual-no-perl.patch (renamed from packages/glibc-ports/2.15/160-manual-no-perl.patch)0
-rw-r--r--packages/glibc/2.13/170-localedef-fix-trampoline.patch (renamed from packages/glibc-ports/2.16.0/170-localedef-fix-trampoline.patch)0
-rw-r--r--packages/glibc/2.13/180-resolv-dynamic.patch (renamed from packages/glibc-ports/2.16.0/180-resolv-dynamic.patch)0
-rw-r--r--packages/glibc/2.13/190-localedef-mmap.patch (renamed from packages/glibc-ports/2.14/190-localedef-mmap.patch)0
-rw-r--r--packages/glibc/2.13/200-fadvise64_64.patch (renamed from packages/glibc-ports/2.16.0/200-fadvise64_64.patch)0
-rw-r--r--packages/glibc/2.13/220-section-comments.patch (renamed from packages/glibc-ports/2.15/220-section-comments.patch)0
-rw-r--r--packages/glibc/2.13/230-no-inline-gmon.patch (renamed from packages/glibc-ports/2.15/230-no-inline-gmon.patch)0
-rw-r--r--packages/glibc/2.13/240-check_native-headers.patch (renamed from packages/glibc-ports/2.14/240-check_native-headers.patch)0
-rw-r--r--packages/glibc/2.13/250-fix-pr631.patch (renamed from packages/glibc-ports/2.13/250-fix-pr631.patch)0
-rw-r--r--packages/glibc/2.13/260-assume-pipe2.patch (renamed from packages/glibc-ports/2.15/260-assume-pipe2.patch)0
-rw-r--r--packages/glibc/2.13/270-china.patch (renamed from packages/glibc-ports/2.16.0/270-china.patch)0
-rw-r--r--packages/glibc/2.13/280-new-valencian-locale.patch (renamed from packages/glibc-ports/2.16.0/280-new-valencian-locale.patch)0
-rw-r--r--packages/glibc/2.13/300-nscd-one-fork.patch (renamed from packages/glibc-ports/2.15/300-nscd-one-fork.patch)0
-rw-r--r--packages/glibc/2.13/310-hppa-nptl-carlos.patch (renamed from packages/glibc-ports/2.15/310-hppa-nptl-carlos.patch)0
-rw-r--r--packages/glibc/2.13/340-dl_execstack-PaX-support.patch (renamed from packages/glibc-ports/2.16.0/340-dl_execstack-PaX-support.patch)0
-rw-r--r--packages/glibc/2.13/350-pre20040117-pt_pax.patch (renamed from packages/glibc-ports/2.16.0/350-pre20040117-pt_pax.patch)0
-rw-r--r--packages/glibc/2.13/360-tests-sandbox-libdl-paths.patch (renamed from packages/glibc-ports/2.16.0/360-tests-sandbox-libdl-paths.patch)0
-rw-r--r--packages/glibc/2.13/380-dont-build-timezone.patch (renamed from packages/glibc-ports/2.16.0/380-dont-build-timezone.patch)0
-rw-r--r--packages/glibc/2.13/400-alpha-xstat.patch (renamed from packages/glibc-ports/2.16.0/400-alpha-xstat.patch)0
-rw-r--r--packages/glibc/2.13/430-alpha-creat.patch (renamed from packages/glibc-ports/2.16.0/430-alpha-creat.patch)0
-rw-r--r--packages/glibc/2.13/490-alpha_alpha-add-fdatasync-support.patch (renamed from packages/glibc-ports/2.14/490-alpha_alpha-add-fdatasync-support.patch)0
-rw-r--r--packages/glibc/2.13/560-ppc-atomic.patch (renamed from packages/glibc-ports/2.16.0/560-ppc-atomic.patch)0
-rw-r--r--packages/glibc/2.13/630-mips_shn_undef-hack.patch (renamed from packages/glibc-ports/2.16.0/630-mips_shn_undef-hack.patch)0
-rw-r--r--packages/glibc/2.13/640-alpha-atfcts.patch (renamed from packages/glibc-ports/2.16.0/640-alpha-atfcts.patch)0
-rw-r--r--packages/glibc/2.13/650-syslog.patch (renamed from packages/glibc-ports/2.15/650-syslog.patch)0
-rw-r--r--packages/glibc/2.13/660-debug-readlink_chk-readklinkat_chk.patch (renamed from packages/glibc-ports/2.15/660-debug-readlink_chk-readklinkat_chk.patch)0
-rw-r--r--packages/glibc/2.13/998-obstack-common.patch30
-rw-r--r--packages/glibc/2.14.1/100-respect-env-CPPFLAGS.patch (renamed from packages/glibc-ports/2.14/100-respect-env-CPPFLAGS.patch)0
-rw-r--r--packages/glibc/2.14.1/120-i386-x86_64-revert-clone-cfi.patch (renamed from packages/glibc-ports/2.15/120-i386-x86_64-revert-clone-cfi.patch)0
-rw-r--r--packages/glibc/2.14.1/140-disable-ldconfig.patch (renamed from packages/glibc-ports/2.15/140-disable-ldconfig.patch)0
-rw-r--r--packages/glibc/2.14.1/150-queue-header-updates.patch (renamed from packages/glibc-ports/2.15/150-queue-header-updates.patch)0
-rw-r--r--packages/glibc/2.14.1/160-manual-no-perl.patch (renamed from packages/glibc-ports/2.14/160-manual-no-perl.patch)0
-rw-r--r--packages/glibc/2.14.1/170-localedef-fix-trampoline.patch (renamed from packages/glibc-ports/2.15/170-localedef-fix-trampoline.patch)0
-rw-r--r--packages/glibc/2.14.1/180-resolv-dynamic.patch (renamed from packages/glibc-ports/2.15/180-resolv-dynamic.patch)0
-rw-r--r--packages/glibc/2.14.1/190-localedef-mmap.patch (renamed from packages/glibc-ports/2.14.1/190-localedef-mmap.patch)0
-rw-r--r--packages/glibc/2.14.1/200-fadvise64_64.patch (renamed from packages/glibc-ports/2.15/200-fadvise64_64.patch)0
-rw-r--r--packages/glibc/2.14.1/220-section-comments.patch (renamed from packages/glibc-ports/2.14/220-section-comments.patch)0
-rw-r--r--packages/glibc/2.14.1/230-no-inline-gmon.patch (renamed from packages/glibc-ports/2.14/230-no-inline-gmon.patch)0
-rw-r--r--packages/glibc/2.14.1/260-assume-pipe2.patch (renamed from packages/glibc-ports/2.14/260-assume-pipe2.patch)0
-rw-r--r--packages/glibc/2.14.1/270-china.patch (renamed from packages/glibc-ports/2.15/270-china.patch)0
-rw-r--r--packages/glibc/2.14.1/280-new-valencian-locale.patch (renamed from packages/glibc-ports/2.15/280-new-valencian-locale.patch)0
-rw-r--r--packages/glibc/2.14.1/300-nscd-one-fork.patch (renamed from packages/glibc-ports/2.14/300-nscd-one-fork.patch)0
-rw-r--r--packages/glibc/2.14.1/310-hppa-nptl-carlos.patch (renamed from packages/glibc-ports/2.14/310-hppa-nptl-carlos.patch)0
-rw-r--r--packages/glibc/2.14.1/340-dl_execstack-PaX-support.patch (renamed from packages/glibc-ports/2.15/340-dl_execstack-PaX-support.patch)0
-rw-r--r--packages/glibc/2.14.1/350-pre20040117-pt_pax.patch (renamed from packages/glibc-ports/2.15/350-pre20040117-pt_pax.patch)0
-rw-r--r--packages/glibc/2.14.1/360-tests-sandbox-libdl-paths.patch (renamed from packages/glibc-ports/2.15/360-tests-sandbox-libdl-paths.patch)0
-rw-r--r--packages/glibc/2.14.1/380-dont-build-timezone.patch (renamed from packages/glibc-ports/2.15/380-dont-build-timezone.patch)0
-rw-r--r--packages/glibc/2.14.1/400-alpha-xstat.patch (renamed from packages/glibc-ports/2.15/400-alpha-xstat.patch)0
-rw-r--r--packages/glibc/2.14.1/430-alpha-creat.patch (renamed from packages/glibc-ports/2.15/430-alpha-creat.patch)0
-rw-r--r--packages/glibc/2.14.1/490-alpha_alpha-add-fdatasync-support.patch (renamed from packages/glibc-ports/2.14.1/490-alpha_alpha-add-fdatasync-support.patch)0
-rw-r--r--packages/glibc/2.14.1/560-ppc-atomic.patch (renamed from packages/glibc-ports/2.15/560-ppc-atomic.patch)0
-rw-r--r--packages/glibc/2.14.1/630-mips_shn_undef-hack.patch (renamed from packages/glibc-ports/2.15/630-mips_shn_undef-hack.patch)0
-rw-r--r--packages/glibc/2.14.1/640-alpha-atfcts.patch (renamed from packages/glibc-ports/2.15/640-alpha-atfcts.patch)0
-rw-r--r--packages/glibc/2.14.1/650-syslog.patch (renamed from packages/glibc-ports/2.14/650-syslog.patch)0
-rw-r--r--packages/glibc/2.14.1/660-debug-readlink_chk-readklinkat_chk.patch (renamed from packages/glibc-ports/2.14/660-debug-readlink_chk-readklinkat_chk.patch)0
-rw-r--r--packages/glibc/2.14.1/996-obsolete-rpc.patch1660
-rw-r--r--packages/glibc/2.14.1/998-obstack-common.patch30
-rw-r--r--packages/glibc/2.14/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch84
-rw-r--r--packages/glibc/2.14/102-fix-signed-shift-overlow.patch98
-rw-r--r--packages/glibc/2.14/103-dl-openat64-variadic.patch195
-rw-r--r--packages/glibc/2.14/104-unused-variables.patch165
-rw-r--r--packages/glibc/2.14/105-misleading-indentation.patch24
-rw-r--r--packages/glibc/2.14/106-dl-open-array-bounds.patch27
-rw-r--r--packages/glibc/2.14/140-Fix-combreloc-test-BSD-grep.patch44
-rw-r--r--packages/glibc/2.14/300-macos-cross-rpcgen.patch32
-rw-r--r--packages/glibc/2.14/900-cpuid-include.patch628
-rw-r--r--packages/glibc/2.14/920-fix-rpc_parse-format.patch60
-rw-r--r--packages/glibc/2.14/940-nis-bogus-conditional.patch62
-rw-r--r--packages/glibc/2.14/950-initfini-ppc64.patch20
-rw-r--r--packages/glibc/2.14/998-obstack-common.patch30
-rw-r--r--packages/glibc/2.14/999-new-tools.patch69
-rw-r--r--packages/glibc/2.14/version.desc1
-rw-r--r--packages/glibc/2.15/100-respect-env-CPPFLAGS.patch (renamed from packages/glibc-ports/2.14.1/100-respect-env-CPPFLAGS.patch)0
-rw-r--r--packages/glibc/2.15/120-i386-x86_64-revert-clone-cfi.patch (renamed from packages/glibc-ports/2.14/120-i386-x86_64-revert-clone-cfi.patch)0
-rw-r--r--packages/glibc/2.15/140-disable-ldconfig.patch (renamed from packages/glibc-ports/2.14/140-disable-ldconfig.patch)0
-rw-r--r--packages/glibc/2.15/150-queue-header-updates.patch (renamed from packages/glibc-ports/2.14/150-queue-header-updates.patch)0
-rw-r--r--packages/glibc/2.15/160-manual-no-perl.patch (renamed from packages/glibc-ports/2.14.1/160-manual-no-perl.patch)0
-rw-r--r--packages/glibc/2.15/170-localedef-fix-trampoline.patch (renamed from packages/glibc-ports/2.14/170-localedef-fix-trampoline.patch)0
-rw-r--r--packages/glibc/2.15/180-resolv-dynamic.patch (renamed from packages/glibc-ports/2.14/180-resolv-dynamic.patch)0
-rw-r--r--packages/glibc/2.15/200-fadvise64_64.patch (renamed from packages/glibc-ports/2.14/200-fadvise64_64.patch)0
-rw-r--r--packages/glibc/2.15/220-section-comments.patch (renamed from packages/glibc-ports/2.14.1/220-section-comments.patch)0
-rw-r--r--packages/glibc/2.15/230-no-inline-gmon.patch (renamed from packages/glibc-ports/2.14.1/230-no-inline-gmon.patch)0
-rw-r--r--packages/glibc/2.15/260-assume-pipe2.patch (renamed from packages/glibc-ports/2.14.1/260-assume-pipe2.patch)0
-rw-r--r--packages/glibc/2.15/270-china.patch (renamed from packages/glibc-ports/2.14/270-china.patch)0
-rw-r--r--packages/glibc/2.15/280-new-valencian-locale.patch (renamed from packages/glibc-ports/2.14/280-new-valencian-locale.patch)0
-rw-r--r--packages/glibc/2.15/300-nscd-one-fork.patch (renamed from packages/glibc-ports/2.14.1/300-nscd-one-fork.patch)0
-rw-r--r--packages/glibc/2.15/310-hppa-nptl-carlos.patch (renamed from packages/glibc-ports/2.14.1/310-hppa-nptl-carlos.patch)0
-rw-r--r--packages/glibc/2.15/340-dl_execstack-PaX-support.patch (renamed from packages/glibc-ports/2.14/340-dl_execstack-PaX-support.patch)0
-rw-r--r--packages/glibc/2.15/350-pre20040117-pt_pax.patch (renamed from packages/glibc-ports/2.14/350-pre20040117-pt_pax.patch)0
-rw-r--r--packages/glibc/2.15/360-tests-sandbox-libdl-paths.patch (renamed from packages/glibc-ports/2.14/360-tests-sandbox-libdl-paths.patch)0
-rw-r--r--packages/glibc/2.15/380-dont-build-timezone.patch (renamed from packages/glibc-ports/2.14/380-dont-build-timezone.patch)0
-rw-r--r--packages/glibc/2.15/400-alpha-xstat.patch (renamed from packages/glibc-ports/2.14/400-alpha-xstat.patch)0
-rw-r--r--packages/glibc/2.15/430-alpha-creat.patch (renamed from packages/glibc-ports/2.14/430-alpha-creat.patch)0
-rw-r--r--packages/glibc/2.15/490-alpha_alpha-add-fdatasync-support.patch (renamed from packages/glibc-ports/2.16.0/490-alpha_alpha-add-fdatasync-support.patch)0
-rw-r--r--packages/glibc/2.15/560-ppc-atomic.patch (renamed from packages/glibc-ports/2.14/560-ppc-atomic.patch)0
-rw-r--r--packages/glibc/2.15/630-mips_shn_undef-hack.patch (renamed from packages/glibc-ports/2.14/630-mips_shn_undef-hack.patch)0
-rw-r--r--packages/glibc/2.15/640-alpha-atfcts.patch (renamed from packages/glibc-ports/2.14/640-alpha-atfcts.patch)0
-rw-r--r--packages/glibc/2.15/650-syslog.patch (renamed from packages/glibc-ports/2.14.1/650-syslog.patch)0
-rw-r--r--packages/glibc/2.15/660-debug-readlink_chk-readklinkat_chk.patch (renamed from packages/glibc-ports/2.14.1/660-debug-readlink_chk-readklinkat_chk.patch)0
-rw-r--r--packages/glibc/2.15/996-obsolete-rpc.patch1660
-rw-r--r--packages/glibc/2.15/998-obstack-common.patch30
-rw-r--r--packages/glibc/2.16.0/100-respect-env-CPPFLAGS.patch (renamed from packages/glibc-ports/2.16.0/100-respect-env-CPPFLAGS.patch)0
-rw-r--r--packages/glibc/2.16.0/120-i386-x86_64-revert-clone-cfi.patch (renamed from packages/glibc-ports/2.14.1/120-i386-x86_64-revert-clone-cfi.patch)0
-rw-r--r--packages/glibc/2.16.0/140-disable-ldconfig.patch (renamed from packages/glibc-ports/2.14.1/140-disable-ldconfig.patch)0
-rw-r--r--packages/glibc/2.16.0/150-queue-header-updates.patch (renamed from packages/glibc-ports/2.14.1/150-queue-header-updates.patch)0
-rw-r--r--packages/glibc/2.16.0/170-localedef-fix-trampoline.patch (renamed from packages/glibc-ports/2.14.1/170-localedef-fix-trampoline.patch)0
-rw-r--r--packages/glibc/2.16.0/180-resolv-dynamic.patch (renamed from packages/glibc-ports/2.14.1/180-resolv-dynamic.patch)0
-rw-r--r--packages/glibc/2.16.0/200-fadvise64_64.patch (renamed from packages/glibc-ports/2.14.1/200-fadvise64_64.patch)0
-rw-r--r--packages/glibc/2.16.0/260-assume-pipe2.patch (renamed from packages/glibc-ports/2.16.0/260-assume-pipe2.patch)0
-rw-r--r--packages/glibc/2.16.0/270-china.patch (renamed from packages/glibc-ports/2.14.1/270-china.patch)0
-rw-r--r--packages/glibc/2.16.0/280-new-valencian-locale.patch (renamed from packages/glibc-ports/2.14.1/280-new-valencian-locale.patch)0
-rw-r--r--packages/glibc/2.16.0/300-nscd-one-fork.patch (renamed from packages/glibc-ports/2.16.0/300-nscd-one-fork.patch)0
-rw-r--r--packages/glibc/2.16.0/310-hppa-nptl-carlos.patch (renamed from packages/glibc-ports/2.16.0/310-hppa-nptl-carlos.patch)0
-rw-r--r--packages/glibc/2.16.0/340-dl_execstack-PaX-support.patch (renamed from packages/glibc-ports/2.14.1/340-dl_execstack-PaX-support.patch)0
-rw-r--r--packages/glibc/2.16.0/350-pre20040117-pt_pax.patch (renamed from packages/glibc-ports/2.14.1/350-pre20040117-pt_pax.patch)0
-rw-r--r--packages/glibc/2.16.0/360-tests-sandbox-libdl-paths.patch (renamed from packages/glibc-ports/2.14.1/360-tests-sandbox-libdl-paths.patch)0
-rw-r--r--packages/glibc/2.16.0/380-dont-build-timezone.patch (renamed from packages/glibc-ports/2.14.1/380-dont-build-timezone.patch)0
-rw-r--r--packages/glibc/2.16.0/400-alpha-xstat.patch (renamed from packages/glibc-ports/2.14.1/400-alpha-xstat.patch)0
-rw-r--r--packages/glibc/2.16.0/430-alpha-creat.patch (renamed from packages/glibc-ports/2.14.1/430-alpha-creat.patch)0
-rw-r--r--packages/glibc/2.16.0/490-alpha_alpha-add-fdatasync-support.patch (renamed from packages/glibc-ports/2.15/490-alpha_alpha-add-fdatasync-support.patch)0
-rw-r--r--packages/glibc/2.16.0/560-ppc-atomic.patch (renamed from packages/glibc-ports/2.14.1/560-ppc-atomic.patch)0
-rw-r--r--packages/glibc/2.16.0/630-mips_shn_undef-hack.patch (renamed from packages/glibc-ports/2.14.1/630-mips_shn_undef-hack.patch)0
-rw-r--r--packages/glibc/2.16.0/640-alpha-atfcts.patch (renamed from packages/glibc-ports/2.14.1/640-alpha-atfcts.patch)0
-rw-r--r--packages/glibc/2.16.0/650-syslog.patch (renamed from packages/glibc-ports/2.13/650-syslog.patch)0
-rw-r--r--packages/glibc/2.16.0/660-debug-readlink_chk-readklinkat_chk.patch (renamed from packages/glibc-ports/2.13/660-debug-readlink_chk-readklinkat_chk.patch)0
-rw-r--r--packages/glibc/2.16.0/998-obstack-common.patch30
-rw-r--r--packages/glibc/2.17/998-obstack-common.patch30
-rw-r--r--packages/glibc/2.23/997-regexp-common.patch58
-rw-r--r--packages/glibc/2.24/997-regexp-common.patch58
-rw-r--r--packages/glibc/2.25/997-regexp-common.patch58
-rw-r--r--packages/glibc/2.26/910-typedef-caddr.patch15
-rw-r--r--packages/glibc/2.26/version.desc (renamed from packages/linux/4.11.3/version.desc)0
-rw-r--r--packages/glibc/package.desc5
-rw-r--r--packages/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch33
-rw-r--r--packages/gmp/4.3.0/110-unbounded-alloc.patch31
-rw-r--r--packages/gmp/4.3.0/version.desc1
-rw-r--r--packages/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch33
-rw-r--r--packages/gmp/4.3.1/110-unbounded-alloc.patch31
-rw-r--r--packages/gmp/4.3.1/version.desc1
-rw-r--r--packages/gmp/4.3.2/version.desc1
-rw-r--r--packages/gmp/5.0.1/100-fix-tests-ABI-long-long.patch35
-rw-r--r--packages/gmp/5.0.1/110-get-mpn_sub_1-size-argument-right.patch38
-rw-r--r--packages/gmp/5.0.1/120-fix-r0-clobbering-issue.patch77
-rw-r--r--packages/gmp/5.0.1/version.desc1
-rw-r--r--packages/gmp/5.0.2/110-get-mpn_sub_1-size-argument-right.patch38
-rw-r--r--packages/gmp/5.0.2/version.desc1
-rw-r--r--packages/gmp/5.0.5/120-fix-r0-clobbering-issue.patch (renamed from packages/gmp/5.0.2/120-fix-r0-clobbering-issue.patch)0
-rw-r--r--packages/gmp/5.0.5/version.desc2
-rw-r--r--packages/gmp/5.1.1/100-fix-bulldozer-piledriver.patch21
-rw-r--r--packages/gmp/5.1.1/110-mpz_powm_ui.patch39
-rw-r--r--packages/gmp/5.1.1/120-fix-mpn_sbpi1_div_qr_sec.patch164
-rw-r--r--packages/gmp/5.1.1/130-do-not-clobber-f16-f18.patch73
-rw-r--r--packages/gmp/5.1.1/version.desc1
-rw-r--r--packages/gmp/6.0.0a/version.desc1
-rw-r--r--packages/gmp/6.1.0/100-fix-broadwell-skylake.patch59
-rw-r--r--packages/gmp/6.1.0/version.desc1
-rw-r--r--packages/gmp/package.desc3
-rw-r--r--packages/isl/0.11.1/version.desc1
-rw-r--r--packages/isl/0.11.2/version.desc2
-rw-r--r--packages/isl/0.12.2/version.desc1
-rw-r--r--packages/isl/0.14.1/version.desc (renamed from packages/uClibc-ng/1.0.20/version.desc)0
-rw-r--r--packages/isl/0.14/version.desc1
-rw-r--r--packages/isl/package.desc1
-rw-r--r--packages/libelf/0.8.12/100-fix-64-bit-detection.patch24
-rw-r--r--packages/libelf/0.8.12/version.desc1
-rw-r--r--packages/libelf/package.desc1
-rw-r--r--packages/libiconv/package.desc1
-rw-r--r--packages/libtool/package.desc1
-rw-r--r--packages/linux/2.6.32.27/version.desc1
-rw-r--r--packages/linux/2.6.33.7/version.desc1
-rw-r--r--packages/linux/2.6.34.7/version.desc1
-rw-r--r--packages/linux/2.6.35.9/version.desc1
-rw-r--r--packages/linux/2.6.36.4/version.desc1
-rw-r--r--packages/linux/2.6.37.6/version.desc1
-rw-r--r--packages/linux/2.6.38.8/version.desc1
-rw-r--r--packages/linux/2.6.39.4/version.desc1
-rw-r--r--packages/linux/3.0.101/version.desc1
-rw-r--r--packages/linux/3.1.10/version.desc1
-rw-r--r--packages/linux/3.10.107/version.desc (renamed from packages/linux/3.10.105/version.desc)0
-rw-r--r--packages/linux/3.11.10/version.desc1
-rw-r--r--packages/linux/3.16.46/version.desc (renamed from packages/linux/4.1.40/version.desc)0
-rw-r--r--packages/linux/3.18.55/version.desc1
-rw-r--r--packages/linux/3.18.66/version.desc (renamed from packages/strace/4.5.19/version.desc)0
-rw-r--r--packages/linux/3.2.91/version.desc (renamed from packages/linux/3.2.88/version.desc)0
-rw-r--r--packages/linux/3.3.8/version.desc1
-rw-r--r--packages/linux/3.5.7/version.desc1
-rw-r--r--packages/linux/3.6.11/version.desc1
-rw-r--r--packages/linux/3.7.10/version.desc1
-rw-r--r--packages/linux/3.8.13/version.desc1
-rw-r--r--packages/linux/3.9.11/version.desc1
-rw-r--r--packages/linux/4.1.43/version.desc (renamed from packages/linux/3.16.43/version.desc)0
-rw-r--r--packages/linux/4.11.12/version.desc (renamed from packages/glibc-ports/2.14/version.desc)0
-rw-r--r--packages/linux/4.12.8/version.desc (renamed from packages/gcc/7.1.0/version.desc)0
-rw-r--r--packages/linux/4.4.83/version.desc (renamed from packages/linux/4.4.70/version.desc)0
-rw-r--r--packages/linux/4.9.44/version.desc (renamed from packages/expat/2.2.1/version.desc)0
-rw-r--r--packages/linux/package.desc2
-rw-r--r--packages/ltrace/0.5.3/version.desc1
-rw-r--r--packages/ltrace/package.desc1
-rw-r--r--packages/m4/1.4.13/version.desc1
-rw-r--r--packages/m4/1.4.17/version.desc1
-rw-r--r--packages/m4/package.desc1
-rw-r--r--packages/make/package.desc1
-rw-r--r--packages/mingw-w64/package.desc2
-rw-r--r--packages/mingw-w64/v2.0.10/100-mingw64-malloc.patch (renamed from packages/mingw-w64/v4.0.5/100-mingw64-malloc.patch)0
-rw-r--r--packages/mingw-w64/v2.0.10/200-gendef-explicit-fallthrough.patch42
-rw-r--r--packages/mingw-w64/v2.0.10/version.desc2
-rw-r--r--packages/mingw-w64/v2.0.7/100-mingw64-malloc.patch27
-rw-r--r--packages/mingw-w64/v2.0.7/version.desc1
-rw-r--r--packages/mingw-w64/v2.0.8/100-mingw64-malloc.patch27
-rw-r--r--packages/mingw-w64/v2.0.8/version.desc1
-rw-r--r--packages/mingw-w64/v2.0.9/100-mingw64-malloc.patch27
-rw-r--r--packages/mingw-w64/v2.0.9/version.desc1
-rw-r--r--packages/mingw-w64/v3.0.0/200-gendef-explicit-fallthrough.patch42
-rw-r--r--packages/mingw-w64/v3.0.0/300-genpeimg-explicit-fallthrough.patch29
-rw-r--r--packages/mingw-w64/v3.0.0/version.desc1
-rw-r--r--packages/mingw-w64/v3.1.0/200-gendef-explicit-fallthrough.patch42
-rw-r--r--packages/mingw-w64/v3.1.0/300-genpeimg-explicit-fallthrough.patch29
-rw-r--r--packages/mingw-w64/v3.1.0/version.desc1
-rw-r--r--packages/mingw-w64/v3.2.0/200-gendef-explicit-fallthrough.patch42
-rw-r--r--packages/mingw-w64/v3.2.0/300-genpeimg-explicit-fallthrough.patch29
-rw-r--r--packages/mingw-w64/v3.2.0/version.desc1
-rw-r--r--packages/mingw-w64/v3.3.0/200-gendef-explicit-fallthrough.patch42
-rw-r--r--packages/mingw-w64/v3.3.0/300-genpeimg-explicit-fallthrough.patch29
-rw-r--r--packages/mingw-w64/v3.3.0/version.desc1
-rw-r--r--packages/mingw-w64/v4.0.0/100-mingw64-malloc.patch27
-rw-r--r--packages/mingw-w64/v4.0.0/version.desc1
-rw-r--r--packages/mingw-w64/v4.0.1/100-mingw64-malloc.patch27
-rw-r--r--packages/mingw-w64/v4.0.1/version.desc1
-rw-r--r--packages/mingw-w64/v4.0.2/100-mingw64-malloc.patch27
-rw-r--r--packages/mingw-w64/v4.0.2/version.desc1
-rw-r--r--packages/mingw-w64/v4.0.4/100-mingw64-malloc.patch27
-rw-r--r--packages/mingw-w64/v4.0.4/version.desc1
-rw-r--r--packages/mingw-w64/v4.0.5/version.desc1
-rw-r--r--packages/mingw-w64/v4.0.6/200-gendef-explicit-fallthrough.patch42
-rw-r--r--packages/mingw-w64/v4.0.6/300-genpeimg-explicit-fallthrough.patch29
-rw-r--r--packages/mingw-w64/v5.0.0/100-mingw64-malloc.patch55
-rw-r--r--packages/mingw-w64/v5.0.0/version.desc1
-rw-r--r--packages/mingw-w64/v5.0.1/100-mingw64-malloc.patch55
-rw-r--r--packages/mingw-w64/v5.0.2/200-gendef-explicit-fallthrough.patch42
-rw-r--r--packages/mingw-w64/v5.0.2/300-genpeimg-explicit-fallthrough.patch29
-rw-r--r--packages/mpc/0.7/version.desc1
-rw-r--r--packages/mpc/0.8.1/100-fix-build-with-mpfr-3_0_9.diff14
-rw-r--r--packages/mpc/0.8.1/version.desc1
-rw-r--r--packages/mpc/0.8.2/version.desc1
-rw-r--r--packages/mpc/0.9/version.desc1
-rw-r--r--packages/mpc/1.0.1/version.desc1
-rw-r--r--packages/mpc/1.0.2/version.desc1
-rw-r--r--packages/mpc/1.0/version.desc1
-rw-r--r--packages/mpc/package.desc3
-rw-r--r--packages/mpfr/2.4.0/100-printf-hh-ll.patch359
-rw-r--r--packages/mpfr/2.4.0/110-mpfr_snprintf.patch176
-rw-r--r--packages/mpfr/2.4.0/version.desc1
-rw-r--r--packages/mpfr/2.4.1/100-remainder-neg.patch123
-rw-r--r--packages/mpfr/2.4.1/110-assert.patch45
-rw-r--r--packages/mpfr/2.4.1/120-cast-to-void-ptr.patch25
-rw-r--r--packages/mpfr/2.4.1/130-vasprintf-mp_limb_t.patch45
-rw-r--r--packages/mpfr/2.4.1/140-zeta_ui-shift.patch47
-rw-r--r--packages/mpfr/2.4.1/150-test-tmul.patch40
-rw-r--r--packages/mpfr/2.4.1/version.desc1
-rw-r--r--packages/mpfr/3.0.0/110-mpfr_out_str.patch220
-rw-r--r--packages/mpfr/3.0.0/120-alloca.patch377
-rw-r--r--packages/mpfr/3.0.0/130-gamma_underflow.patch88
-rw-r--r--packages/mpfr/3.0.0/140-mpfr_cmp_set_ui_si.patch239
-rw-r--r--packages/mpfr/3.0.0/150-tcan_round.patch45
-rw-r--r--packages/mpfr/3.0.0/160-mpfr_sub1.patch628
-rw-r--r--packages/mpfr/3.0.0/170-mpfr_set_ld.patch155
-rw-r--r--packages/mpfr/3.0.0/180-macros.patch193
-rw-r--r--packages/mpfr/3.0.0/version.desc1
-rw-r--r--packages/mpfr/3.1.0/110-mpfr_unlikely.patch50
-rw-r--r--packages/mpfr/3.1.0/120-lib-search-path.patch96
-rw-r--r--packages/mpfr/3.1.0/130-vasprintf.patch247
-rw-r--r--packages/mpfr/3.1.0/140-gmp41compat.patch166
-rw-r--r--packages/mpfr/3.1.0/150-logging-freeze.patch69
-rw-r--r--packages/mpfr/3.1.0/160-logging-varfmt.patch45
-rw-r--r--packages/mpfr/3.1.0/170-large-prec.patch591
-rw-r--r--packages/mpfr/3.1.0/180-__gmp_const.patch52
-rw-r--r--packages/mpfr/3.1.0/190-gamma-underflow.patch93
-rw-r--r--packages/mpfr/3.1.0/200-gamma-overunderflow.patch487
-rw-r--r--packages/mpfr/3.1.0/version.desc1
-rw-r--r--packages/mpfr/3.1.1/110-get_decimal64.patch235
-rw-r--r--packages/mpfr/3.1.1/120-strtofr-ternary-value.patch170
-rw-r--r--packages/mpfr/3.1.1/130-gmp51-compat.patch98
-rw-r--r--packages/mpfr/3.1.1/version.desc1
-rw-r--r--packages/mpfr/3.1.2/110-exp_2.patch45
-rw-r--r--packages/mpfr/3.1.2/120-fits-smallneg.patch605
-rw-r--r--packages/mpfr/3.1.2/130-clang-divby0.patch129
-rw-r--r--packages/mpfr/3.1.2/140-printf-alt0.patch84
-rw-r--r--packages/mpfr/3.1.2/150-custom_init_set.patch42
-rw-r--r--packages/mpfr/3.1.2/160-li2-return.patch43
-rw-r--r--packages/mpfr/3.1.2/170-exp3.patch71
-rw-r--r--packages/mpfr/3.1.2/180-gmp6-compat.patch254
-rw-r--r--packages/mpfr/3.1.2/190-div-overflow.patch166
-rw-r--r--packages/mpfr/3.1.2/200-vasprintf.patch138
-rw-r--r--packages/mpfr/3.1.2/210-strtofr.patch49
-rw-r--r--packages/mpfr/3.1.2/version.desc1
-rw-r--r--packages/mpfr/3.1.3/110-lngamma-and-doc.patch1117
-rw-r--r--packages/mpfr/3.1.3/120-muldiv-2exp-overflow.patch161
-rw-r--r--packages/mpfr/3.1.3/130-muldiv-2exp-underflow.patch217
-rw-r--r--packages/mpfr/3.1.3/140-frexp.patch204
-rw-r--r--packages/mpfr/3.1.3/150-divhigh-basecase.patch131
-rw-r--r--packages/mpfr/3.1.3/160-jn.patch71
-rw-r--r--packages/mpfr/3.1.3/170-zeta.patch125
-rw-r--r--packages/mpfr/3.1.3/180-sqrt.patch97
-rw-r--r--packages/mpfr/3.1.3/190-si-ops.patch107
-rw-r--r--packages/mpfr/3.1.3/200-can_round.patch413
-rw-r--r--packages/mpfr/3.1.3/210-fits.patch584
-rw-r--r--packages/mpfr/3.1.3/220-root.patch621
-rw-r--r--packages/mpfr/3.1.3/230-gamma.patch77
-rw-r--r--packages/mpfr/3.1.3/240-rem1.patch337
-rw-r--r--packages/mpfr/3.1.3/250-agm-eq.patch105
-rw-r--r--packages/mpfr/3.1.3/260-sum.patch223
-rw-r--r--packages/mpfr/3.1.3/270-cmp_d.patch219
-rw-r--r--packages/mpfr/3.1.3/version.desc1
-rw-r--r--packages/mpfr/package.desc1
-rw-r--r--packages/musl/package.desc1
-rw-r--r--packages/ncurses/package.desc1
-rw-r--r--packages/newlib-linaro/2.1.0-2014.09/version.desc1
-rw-r--r--packages/newlib-linaro/package.desc1
-rw-r--r--packages/newlib/2.5.0.20170720/100-fix-unaligned-access-memcpy-m68k.patch (renamed from packages/newlib/2.5.0.20170519/100-fix-unaligned-access-memcpy-m68k.patch)0
-rw-r--r--packages/newlib/2.5.0.20170720/200-fix-mt-cflags.patch (renamed from packages/newlib/2.5.0.20170519/200-fix-mt-cflags.patch)0
-rw-r--r--packages/newlib/2.5.0.20170720/version.desc (renamed from packages/binutils/2.28/version.desc)0
-rw-r--r--packages/newlib/package.desc1
-rw-r--r--packages/strace/4.17/version.desc (renamed from packages/binutils/2.26/version.desc)0
-rw-r--r--packages/strace/4.18/version.desc (renamed from packages/automake/1.15/version.desc)0
-rw-r--r--packages/strace/4.5.18/110-dont-use-REG_SYSCALL-for-sh.patch11
-rw-r--r--packages/strace/4.5.18/130-fix-disabled-largefile-syscalls.patch22
-rw-r--r--packages/strace/4.5.18/140-statfs64-check.patch53
-rw-r--r--packages/strace/4.5.18/160-fix-check-for-linux-netlink.patch19
-rw-r--r--packages/strace/4.5.18/160-undef-syscall.patch42
-rw-r--r--packages/strace/4.5.18/170-no_cachectl.patch35
-rw-r--r--packages/strace/4.5.18/180-arm-EABI-syscalls.patch23
-rw-r--r--packages/strace/4.5.18/900-autoreconf.patch99
-rw-r--r--packages/strace/4.5.18/version.desc1
-rw-r--r--packages/strace/4.5.19/120-fix-disabled-largefile-syscalls.patch22
-rw-r--r--packages/strace/4.5.19/130-statfs64-check.patch53
-rw-r--r--packages/strace/4.5.19/150-undef-syscall.patch42
-rw-r--r--packages/strace/4.5.19/160-fix-check-for-linux-netlink.patch19
-rw-r--r--packages/strace/4.5.19/170-update-configure.patch85
-rw-r--r--packages/strace/4.5.20/version.desc1
-rw-r--r--packages/strace/package.desc1
-rw-r--r--packages/uClibc-ng/1.0.20/100-xtensa-static-link.patch34
-rw-r--r--packages/uClibc-ng/1.0.20/110-has-lfs.patch31
-rw-r--r--packages/uClibc-ng/1.0.20/500-no-install-D.patch30
-rw-r--r--packages/uClibc-ng/1.0.20/600-prefer-multilib.patch46
-rw-r--r--packages/uClibc-ng/1.0.20/700-features.h-c11.patch61
-rw-r--r--packages/uClibc-ng/1.0.21/110-has-lfs.patch31
-rw-r--r--packages/uClibc-ng/1.0.21/120-module.patch50
-rw-r--r--packages/uClibc-ng/1.0.21/500-no-install-D.patch30
-rw-r--r--packages/uClibc-ng/1.0.21/600-prefer-multilib.patch46
-rw-r--r--packages/uClibc-ng/1.0.21/700-features.h-c11.patch61
-rw-r--r--packages/uClibc-ng/1.0.22/500-no-install-D.patch30
-rw-r--r--packages/uClibc-ng/1.0.22/600-prefer-multilib.patch46
-rw-r--r--packages/uClibc-ng/1.0.22/700-features.h-c11.patch61
-rw-r--r--packages/uClibc-ng/1.0.23/700-features.h-c11.patch61
-rw-r--r--packages/uClibc-ng/1.0.24/700-features.h-c11.patch61
-rw-r--r--packages/uClibc-ng/1.0.26/version.desc (renamed from packages/android-ndk/r15b/version.desc)0
-rw-r--r--packages/uClibc-ng/package.desc1
-rw-r--r--packages/uClibc/package.desc1
-rw-r--r--packages/zlib/package.desc1
-rw-r--r--scripts/build/binutils/binutils.sh2
-rw-r--r--scripts/build/cc/gcc.sh18
-rw-r--r--scripts/build/libc/glibc.sh17
-rw-r--r--scripts/build/libc/mingw-w64.sh6
-rw-r--r--scripts/crosstool-NG.sh.in59
-rw-r--r--scripts/functions306
626 files changed, 7250 insertions, 18911 deletions
diff --git a/.gitignore b/.gitignore
index 138b741..225009c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,11 +13,13 @@ config/configure.in
config/gen/
config/versions/
.config
+maintainer/package-versions
# Temporaries
.*.swp
build.log
.config.old
+temp.*
# This is the place where toolchains are built
.build/
diff --git a/TODO b/TODO
index 3957934..eabd20b 100644
--- a/TODO
+++ b/TODO
@@ -2,6 +2,14 @@ A (slightly) ordered set of tasks for crosstool-NG. Written in a cryptic languag
-- Alexey Neyman (@stilor)
+[ ] mingw-w64 fails to build (with new gcc?) - the headers are installed into usr/x86_64-w64-mingw32/x86_64-w64-mingw32/include instead of usr/x86_64-w64-mingw32/include
+ [ ] fix or retire?
+[ ] test-packages.sh
+ [ ] FTP URLs always succeed in verification (wget bug) - how to work around?
+ [ ] new function - refresh/renumber patches
+[ ] templates (bootstrap)
+ [ ] #!foreach xxx if-changed yyy to avoid unnecessary 'default' lines
+ [ ] relevant pattern for Linaro releases - tie to the major version
[ ] new packages
[ ] config.guess
[ ] gnulib
@@ -10,8 +18,6 @@ A (slightly) ordered set of tasks for crosstool-NG. Written in a cryptic languag
[ ] use to retrieve ax_pthread.m4 (gettext?)
[ ] retire wiki-samples
[ ] Fix displaying the versions in case devel is used (custom location/repo) - display "devel" or "custom" in those cases
-[ ] clean up GDB versions - no X.Y if X.Y.1 is present
- [ ] Check other packages, leave only the most recent on each branch
[ ] arm_neon.h - offer as a companion "library" for the target
[ ] gdbinit (installed if CT_GDB_INSTALL_GDBINIT is set) is not relocatable, contains absolute paths
[ ] FreeBSD
@@ -28,11 +34,14 @@ A (slightly) ordered set of tasks for crosstool-NG. Written in a cryptic languag
[ ] mingw.sh: create a hook for "pre-checks" for all libcs
[ ] move CT_DoMultilibList to this new hook?
[ ] go over all config options and evaluate their applicability to cross/canadian/cross-native (i.e. WANTS_STATIC_LINK does not have to test build's support for static link)
-[ ] Remove per-arch patching (this makes .build/src non-sharable between builds!)
[ ] Update "Internals" chapter in the docs to match current state
[ ] Integrate openrisc support
[ ] Re-enable shared libraries - can it be done without wrapper scripts, e.g. via rpath?
-[ ] 'ct-ng' source to disregard FORBID_DOWNLOADS and to avoid clobbering .build and build.log
+[ ] 'ct-ng source'
+ [ ] disregard FORBID_DOWNLOADS and to avoid clobbering .build and build.log
+ [ ] should not check/prepare environment (#776)
+ [ ] move download/patching/prepare into separate steps
+ [ ] beware of TBD - want to use autotools for all packages after they're built, so need to defer preparation of the sources from a repo
[ ] Restore blackfin/fdpic support?
[ ] Install bash completion script - are there any default locations for it?
[ ] Do we need "HACK: we need to override SHLIB_LC from gcc/config/t-slibgcc-elf-ver" block in 100-gcc.sh? We do create a dummy libc.so
@@ -94,8 +103,11 @@ A (slightly) ordered set of tasks for crosstool-NG. Written in a cryptic languag
[ ] #534 Merge gcc backends in 100-gcc.sh
[ ] Currently some options (e.g. plugins) are not supported in core backend, hence aren't available on baremetal configurations
[ ] Support clang
-[ ] Generate per-package version Kconfig fragments, and include them
+[X] Generate per-package version Kconfig fragments, and include them
[ ] Add a script to poll for new releases
+ [ ] Add a script to verify
+ [ ] URL accessibility - note that some URLs are mutually exclusive, e.g. foo.com/bar and foo.com/bar/archive
+ [ ] Patch applicability
[ ] Install a single lib/ directory with all the stuff needed - scripts, makefile fragments, etc
[ ] Separate maintainer's scripts from the scripts used by crosstool-ng itself
[ ] Commit testing.py to the new maintainer's dir
diff --git a/bootstrap b/bootstrap
index f5784cd..45fad9c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,5 +1,11 @@
#!/bin/bash
+if [ "${BASH_VERSINFO[0]}" -lt 4 ]; then
+ echo "Your BASH shell version (${BASH_VERSION}) is too old." >&2
+ echo "Run bootstrap on a machine with BASH 4.x" >&2
+ exit 1
+fi
+
########################################
# Common meta-language implementation. Syntax:
#
@@ -71,18 +77,21 @@ find_end()
set_iter()
{
local name="${1}"
+ local -a temp
if [ "${info[iter_${name}]+set}" = "set" ]; then
error "Iterator over '${name}' is already set up"
fi
shift
debug "Setting iterator over '${name}' to '$*'"
+ temp=("$@")
info[iter_${name}]="$*"
+ info[#${name}]=${#temp[@]}
}
run_if()
{
- local cond="${1}"
+ local cond="$*"
local endline
find_end "if"
@@ -116,8 +125,9 @@ do_foreach()
for k in "${!info[@]}"; do
saveinfo["${k}"]=${info["${k}"]}
done
- eval "enter_${var} ${v}"
- eval "$@"
+ if eval "enter_${var} ${v}"; then
+ eval "$@"
+ fi
info=()
for k in "${!saveinfo[@]}"; do
info["${k}"]=${saveinfo["${k}"]}
@@ -127,24 +137,53 @@ do_foreach()
run_foreach()
{
- local var="${1}"
local endline
+ local var="${1}"
+ shift
if [ "${info[iter_${var}]+set}" != "set" ]; then
error "line ${l}: iterator over '${var}' is not defined"
fi
find_end "foreach"
debug "Loop over '${var}', lines ${l}..${endline}"
- do_foreach ${var} run_lines $[l + 1] $[endline - 1]
+ do_foreach ${var} run_lines_if $[l + 1] $[endline - 1] "$*"
lnext=$[endline + 1]
debug "Continue at line ${lnext}"
}
+run_lines_if()
+{
+ local start="${1}"
+ local end="${2}"
+ shift 2
+ local cond="$*"
+ local a prev
+
+ for a in ${cond}; do
+ if [ -n "${prev}" ]; then
+ case "${prev}" in
+ if-differs)
+ if [ "${info[${a}]}" = "${saveinfo[${a}]}" ]; then
+ return
+ fi
+ ;;
+ *)
+ error "line ${l}: unknown condition '${prev}' for loop"
+ ;;
+ esac
+ prev=
+ else
+ prev=${a}
+ fi
+ done
+ run_lines "${start}" "${end}"
+}
+
run_lines()
{
local start="${1}"
local end="${2}"
- local l lnext s s1 v
+ local l lnext s s1 v vp pp p val
debug "Running lines ${start}..${end}"
l=${start}
@@ -160,8 +199,34 @@ run_lines()
*@@*@@*)
v="${s#*@@}"
v="${v%%@@*}"
+ # $v now includes variable name + any postprocessing
+ vp="${v%%[|?]*}"
+ pp="${v#${vp}}"
+ # $vp is name of the variable proper, $pp is any postprocessing
+ if [ "${info[${vp}]+set}" != "set" ]; then
+ error "line ${l}: reference to undefined variable '${vp}'"
+ fi
if [ "${info[${v}]+set}" != "set" ]; then
- error "line ${l}: reference to undefined variable '${v}'"
+ # We know the base variable, need to cache postprocessed value
+ val="${info[${vp}]}"
+ # Apply postprocessing(s)
+ while [ -n "${pp}" ]; do
+ case "${pp}" in
+ "|"*)
+ # Kconfigize
+ pp="${pp#|}"
+ val=${val//[^0-9A-Za-z_]/_}
+ val=${val^^}
+ ;;
+ "?"*)
+ pp="${pp#?}"
+ p="${pp%%[|?]*}"
+ pp="${pp#${p}}"
+ val="${val:+${p}}"
+ ;;
+ esac
+ done
+ info[${v}]="${val}"
fi
s1="${s1}${s%%@@*}\${info[${v}]}"
s="${s#*@@*@@}"
@@ -180,10 +245,10 @@ run_lines()
debug "Evaluate: ${s}"
case "${s}" in
"#!if "*)
- run_if "${s#* }"
+ run_if ${s#* }
;;
"#!foreach "*)
- run_foreach "${s#* }"
+ run_foreach ${s#* }
;;
"#!//"*)
# Comment, do nothing
@@ -215,15 +280,14 @@ run_template()
########################################
-# Convert the argument to a Kconfig-style macro
-kconfigize()
+# Leave only relevant portion of the string
+relevantize()
{
- local v="${1}"
local p pb pa vx
+ local v="${1}"
shift
- # If optional patterns are provided, find the first match
- # and contract to the matching portion.
+ # Find the first match and contract to the matching portion.
for p in "$@"; do
pb=${p%|*}
pa=${p#*|}
@@ -233,9 +297,7 @@ kconfigize()
break
fi
done
-
- v=${v//[^0-9A-Za-z_]/_}
- echo "${v^^}"
+ echo "${v}"
}
# Helper for cmp_versions: compare an upstream/debian portion of
@@ -478,11 +540,11 @@ enter_fork()
info[mirrors]=
info[archive_filename]='@{pkg_name}-@{version}'
info[archive_dirname]='@{pkg_name}-@{version}'
+ info[versionlocked]=
+ info[origin]=
eval `read_package_desc ${fork}`
- info[pfx]=`kconfigize ${fork}`
- info[originpfx]=`kconfigize ${info[origin]}`
if [ -r "packages/${info[origin]}.help" ]; then
info[originhelp]=`sed 's/^/ /' "packages/${info[origin]}.help"`
else
@@ -493,7 +555,6 @@ enter_fork()
info[vcs]=${info[repository]%% *}
info[repository_url]=${info[repository]#* }
fi
- info[versionlocked]=`kconfigize "${info[versionlocked]}"`
versions=`cd packages/${fork} && \
for f in */version.desc; do [ -r "${f}" ] && echo "${f%/version.desc}"; done`
@@ -519,16 +580,11 @@ enter_fork()
enter_version()
{
- local -A ver_postfix=( \
- [,yes,,]=" (OBSOLETE)" \
- [,,yes,]=" (EXPERIMENTAL)" \
- [,yes,yes,]=" (OBSOLETE,EXPERIMENTAL)" )
local version="${1}"
eval `read_version_desc ${info[fork]} ${version}`
info[ver]=${version}
- info[kcfg]=`kconfigize ${version} ${info[relevantpattern]}`
- info[ver_postfix]=${ver_postfix[,${info[obsolete]},${info[experimental]},]}
+ info[ver_sel]=`relevantize ${version} ${info[relevantpattern]}`
}
enter_milestone()
@@ -537,7 +593,6 @@ enter_milestone()
local cmp
info[ms]=${ms}
- info[ms_kcfg]=`kconfigize ${ms}`
if [ -n "${info[ver]}" ]; then
info[version_cmp_milestone]=`cmp_versions ${info[ver]} ${info[ms]}`
fi
@@ -564,22 +619,23 @@ gen_packages()
msg "Master packages: ${pkg_masters[@]}"
# Now for each master, create its kconfig file with version
- # definitions.
+ # definitions. As a byproduct, generate a list of all package
+ # versions for maintenance purposes.
+ exec 3>"maintainer/package-versions"
for p in "${pkg_masters[@]}"; do
msg "Generating '${config_versions_dir}/${p}.in'"
exec >"${config_versions_dir}/${p}.in"
# Base definitions for the whole config file
info=( \
[master]=${p} \
- [masterpfx]=`kconfigize ${p}` \
[nforks]=${pkg_nforks[${p}]} \
- [all_milestones]=${pkg_milestones[${p}]} \
[relevantpattern]=${pkg_relevantpattern[${p}]} \
)
set_iter fork ${pkg_forks[${p}]}
set_iter milestone ${pkg_milestones[${p}]}
run_template "maintainer/kconfig-versions.template"
+ run_template "maintainer/package-versions.template" >&3
done
}
@@ -606,7 +662,6 @@ enter_choice()
local l
info[choice]="${choice}"
- info[kcfg_choice]=`kconfigize "${choice}"`
# Not local, we need these arrays be set in enter_dependency/enter_help
deplines=( )
@@ -644,7 +699,6 @@ gen_selection()
msg "Generating ${dir}.in"
exec >"${config_gen_dir}/${dir}.in"
info=( \
- [prefix]=`kconfigize ${dir}` \
[dir]=${dir} \
[label]="${label}" \
)
diff --git a/config/global/extract.in b/config/global/extract.in
index 582e69c..58f7b95 100644
--- a/config/global/extract.in
+++ b/config/global/extract.in
@@ -52,30 +52,36 @@ config PATCH_BUNDLED
config PATCH_LOCAL
bool
- prompt "Local only"
+ prompt "Local only (EXPERIMENTAL)"
select PATCH_USE_LOCAL
+ depends on EXPERIMENTAL
help
- Only apply your local patches.
+ Only apply your local patches. Many components require patching
+ to build or work properly; please review the bundled patches and
+ copy them into your local directory if needed.
config PATCH_BUNDLED_LOCAL
bool
prompt "Bundled, then local"
select PATCH_USE_LOCAL
help
- Apply the patches bundled with crosstool-NG,
- then apply your local patches.
+ Apply the patches bundled with crosstool-NG, then apply your local
+ patches.
config PATCH_LOCAL_BUNDLED
bool
prompt "Local, then bundled"
select PATCH_USE_LOCAL
+ depends on EXPERIMENTAL
help
- Apply your local patches, then apply the patches
- bundled with crosstool-NG.
+ Apply your local patches, then apply the patches bundled with
+ crosstool-NG. Note that the bundled patches cannot be guaranteed
+ to apply on top of your local patches.
config PATCH_NONE
bool
prompt "None"
+ depends on EXPERIMENTAL
help
Don't use any patch at all.
diff --git a/config/libc/bionic.in b/config/libc/bionic.in
index eafc482..41b87a1 100644
--- a/config/libc/bionic.in
+++ b/config/libc/bionic.in
@@ -3,7 +3,7 @@
## depends on ! WINDOWS && ! BARE_METAL
## depends on ARCH_ARM || ARCH_MIPS || ARCH_X86
## depends on EXPERIMENTAL
-## depends on GCC_6_or_later
+## select GCC_REQUIRE_6_or_later
##
## select LIBC_SUPPORT_THREADS_POSIX
##
diff --git a/config/libc/glibc.in b/config/libc/glibc.in
index 363ab34..c600326 100644
--- a/config/libc/glibc.in
+++ b/config/libc/glibc.in
@@ -21,6 +21,19 @@ if GLIBC_USE_PORTS_EXTERNAL
source "config/versions/glibc-ports.in"
endif
+# Glibc has some dependencies on the kernel headers:
+config GLIBC_DEP_KERNEL_HEADERS_VERSION
+ def_bool y
+ select LINUX_REQUIRE_3_2_or_later if GLIBC_2_24_or_later
+
+config GLIBC_DEP_BINUTILS
+ def_bool y
+ select BINUTILS_REQUIRE_2_25_or_later if GLIBC_2_26_or_later
+
+config GLIBC_DEP_GCC
+ def_bool y
+ select GCC_REQUIRE_4_9_or_later if GLIBC_2_26_or_later
+
config THREADS
default "nptl"
@@ -85,6 +98,15 @@ config GLIBC_NO_SPARC_V8
def_bool y
depends on GLIBC_2_23_or_later
+# 2.14 obsoleted Sun RPC code, making it unavailable *at all* for compiling/linking
+# (only remained as versioned symbols for previously linked binaries). They backpedaled
+# in 2.16, adding an option to enable that code. Crosstool-NG backports that code
+# to 2.14/2.15, but there is no harm in throwing this option even if that patch
+# is not applied.
+config GLIBC_HAS_OBSOLETE_RPC
+ def_bool y
+ depends on GLIBC_2_14_or_later
+
config GLIBC_EXTRA_CONFIG_ARRAY
string
prompt "extra config"
@@ -118,6 +140,13 @@ config GLIBC_EXTRA_CFLAGS
help
Extra target CFLAGS to use when building.
+config GLIBC_ENABLE_OBSOLETE_RPC
+ bool "Enable obsolete (Sun) RPC"
+ default y
+ depends on GLIBC_HAS_OBSOLETE_RPC
+ help
+ Allow building applications using obsolete (Sun) RPC.
+
config GLIBC_ENABLE_FORTIFIED_BUILD
bool
prompt "Enable fortified build (EXPERIMENTAL)"
diff --git a/config/libc/mingw-w64.in b/config/libc/mingw-w64.in
index 769c976..34f8dbc 100644
--- a/config/libc/mingw-w64.in
+++ b/config/libc/mingw-w64.in
@@ -10,6 +10,10 @@
source "config/versions/mingw-w64.in"
+config MINGW_W64_REQUIRES_W64_VENDOR
+ bool
+ default y if MINGW_W64_V4_or_later
+
config THREADS
default "win32" if THREADS_NATIVE
default "posix" if THREADS_POSIX
diff --git a/ct-ng.in b/ct-ng.in
index cf2edd1..0fc5499 100644
--- a/ct-ng.in
+++ b/ct-ng.in
@@ -32,10 +32,6 @@ include $(CT_LIB_DIR)/paths.mk
# bash.
export SHELL=$(bash)
-# GREP_OPTIONS=--color=always will break the generated .in files
-# We do not need any GREP_OPTIONS anyway, so set it to empty.
-export GREP_OPTIONS=
-
# Make the restart/stop steps available to scripts/crostool-NG.sh
export CT_STOP:=$(STOP)
export CT_RESTART:=$(RESTART)
diff --git a/maintainer/kconfig-choice.template b/maintainer/kconfig-choice.template
index 12ea12c..b2ca217 100644
--- a/maintainer/kconfig-choice.template
+++ b/maintainer/kconfig-choice.template
@@ -2,11 +2,11 @@
# DO NOT EDIT! This file is automatically generated.
#
-choice GEN_CHOICE_@@prefix@@
+choice GEN_CHOICE_@@dir|@@
bool "@@label@@"
#!foreach choice
-config @@prefix@@_@@kcfg_choice@@
+config @@dir|@@_@@choice|@@
bool "@@choice@@"
#!foreach dependency
@@depline@@
@@ -19,14 +19,14 @@ config @@prefix@@_@@kcfg_choice@@
#!end-foreach
endchoice
-config @@prefix@@
+config @@dir|@@
string
#!foreach choice
- default "@@choice@@" if @@prefix@@_@@kcfg_choice@@
+ default "@@choice@@" if @@dir|@@_@@choice|@@
#!end-foreach
#!foreach choice
-if @@prefix@@_@@kcfg_choice@@
+if @@dir|@@_@@choice|@@
source "config/@@dir@@/@@choice@@.in"
endif
#!end-foreach
diff --git a/maintainer/kconfig-menu.template b/maintainer/kconfig-menu.template
index 12b9f2b..1a7daa5 100644
--- a/maintainer/kconfig-menu.template
+++ b/maintainer/kconfig-menu.template
@@ -3,7 +3,7 @@
#
#!foreach choice
-menuconfig @@prefix@@_@@kcfg_choice@@
+menuconfig @@dir|@@_@@choice|@@
bool "@@choice@@"
#!foreach dependency
@@depline@@
@@ -13,7 +13,7 @@ menuconfig @@prefix@@_@@kcfg_choice@@
@@helpline@@
#!end-foreach
-if @@prefix@@_@@kcfg_choice@@
+if @@dir|@@_@@choice|@@
source "config/@@dir@@/@@choice@@.in"
endif
diff --git a/maintainer/kconfig-versions.template b/maintainer/kconfig-versions.template
index e7e0121..0e0ceb0 100644
--- a/maintainer/kconfig-versions.template
+++ b/maintainer/kconfig-versions.template
@@ -3,7 +3,7 @@
#
# The component directory name
-config @@masterpfx@@_DIR_NAME
+config @@master|@@_DIR_NAME
string
default "@@master@@"
@@ -13,7 +13,7 @@ choice
bool "Show @@master@@ versions from"
#!foreach fork
-config @@masterpfx@@_USE_@@originpfx@@
+config @@master|@@_USE_@@origin|@@
bool "@@origin@@"
#!if [ -n "@@only_obsolete@@" ]
depends on OBSOLETE
@@ -27,20 +27,20 @@ config @@masterpfx@@_USE_@@originpfx@@
#!end-foreach
endchoice
-config @@masterpfx@@_USE
+config @@master|@@_USE
string
#!foreach fork
- default "@@pfx@@" if @@masterpfx@@_USE_@@originpfx@@
+ default "@@fork|@@" if @@master|@@_USE_@@origin|@@
#!end-foreach
#!end-if
#!foreach fork
#!if [ "@@nforks@@" -ge 2 ]
-if @@masterpfx@@_USE_@@originpfx@@
+if @@master|@@_USE_@@origin|@@
#!end-if
-config @@pfx@@_PKG_NAME
+config @@fork|@@_PKG_NAME
string
default "@@pkg_name@@"
@@ -51,16 +51,16 @@ config @@pfx@@_PKG_NAME
choice
bool "Source of @@pkg_label@@"
-#!if [ -n "@@all_versions@@" ]
-config @@pfx@@_SRC_RELEASE
+#!if [ "@@#version@@" -gt 0 ]
+config @@fork|@@_SRC_RELEASE
bool "Released tarball"
help
Download a released tarball.
#!end-if
-config @@pfx@@_SRC_DEVEL
+config @@fork|@@_SRC_DEVEL
bool "Vendor/custom repository"
-#!if [ -n "@@all_versions@@" ]
+#!if [ "@@#version@@" -gt 0 ]
depends on EXPERIMENTAL
#!end-if
help
@@ -69,39 +69,39 @@ config @@pfx@@_SRC_DEVEL
Default is the vendor repository at @@repository_url@@
#!end-if
-if @@pfx@@_SRC_DEVEL
+if @@fork|@@_SRC_DEVEL
choice
bool "VCS type"
#!if [ -n "@@repository@@" ]
- default @@pfx@@_DEVEL_VCS_@@vcs@@
+ default @@fork|@@_DEVEL_VCS_@@vcs@@
#!end-if
help
Version control system from which the sources will be checked out.
The default value points to the development repository for @@pkg_label@@.
-config @@pfx@@_DEVEL_VCS_git
+config @@fork|@@_DEVEL_VCS_git
bool "Git"
-config @@pfx@@_DEVEL_VCS_svn
+config @@fork|@@_DEVEL_VCS_svn
bool "Subversion"
-config @@pfx@@_DEVEL_VCS_hg
+config @@fork|@@_DEVEL_VCS_hg
bool "Mercurial"
-config @@pfx@@_DEVEL_VCS_cvs
+config @@fork|@@_DEVEL_VCS_cvs
bool "CVS"
endchoice
-config @@pfx@@_DEVEL_VCS
+config @@fork|@@_DEVEL_VCS
string
- default "git" if @@pfx@@_DEVEL_VCS_git
- default "svn" if @@pfx@@_DEVEL_VCS_svn
- default "hg" if @@pfx@@_DEVEL_VCS_hg
- default "cvs" if @@pfx@@_DEVEL_VCS_cvs
+ default "git" if @@fork|@@_DEVEL_VCS_git
+ default "svn" if @@fork|@@_DEVEL_VCS_svn
+ default "hg" if @@fork|@@_DEVEL_VCS_hg
+ default "cvs" if @@fork|@@_DEVEL_VCS_cvs
-config @@pfx@@_DEVEL_URL
+config @@fork|@@_DEVEL_URL
string "Repository URL"
#!if [ -n "@@repository@@" ]
default "@@repository_url@@"
@@ -112,7 +112,7 @@ config @@pfx@@_DEVEL_URL
For CVS, enter both the value of CVS root and the module name, separated
by a space.
-config @@pfx@@_DEVEL_BRANCH
+config @@fork|@@_DEVEL_BRANCH
string "Branch/tag to check out"
default "@@repository_branch@@"
help
@@ -122,7 +122,7 @@ config @@pfx@@_DEVEL_BRANCH
stable branches. You likely need to change the repository URL, rather than
enter anything here.
-config @@pfx@@_DEVEL_REVISION
+config @@fork|@@_DEVEL_REVISION
string "Revision/changeset"
default "@@repository_cset@@"
help
@@ -131,7 +131,7 @@ config @@pfx@@_DEVEL_REVISION
CVS: enter the date in "YYYY/MM/DD HH:MM:SS" format (UTC) to check out certain date.
Subversion: enter the revision.
-config @@pfx@@_DEVEL_SUBDIR
+config @@fork|@@_DEVEL_SUBDIR
string "Subdirectory in the repository"
default "@@repository_subdir@@"
help
@@ -139,7 +139,7 @@ config @@pfx@@_DEVEL_SUBDIR
repository, but rather from some subdirectory. If it is the case,
specify this subdirectory here.
-config @@pfx@@_DEVEL_BOOTSTRAP
+config @@fork|@@_DEVEL_BOOTSTRAP
string "Bootstrap command"
default "@@bootstrap@@"
help
@@ -150,15 +150,15 @@ config @@pfx@@_DEVEL_BOOTSTRAP
endif
-config @@pfx@@_SRC_CUSTOM
+config @@fork|@@_SRC_CUSTOM
bool "Custom location"
depends on EXPERIMENTAL
help
Custom directory or tarball.
-if @@pfx@@_SRC_CUSTOM
+if @@fork|@@_SRC_CUSTOM
-config @@pfx@@_CUSTOM_LOCATION
+config @@fork|@@_CUSTOM_LOCATION
string "Custom source location"
help
Path to the directory or tarball with the sources.
@@ -167,21 +167,6 @@ endif
endchoice
-#!if [ -n "@@all_versions@@" ]
-config @@pfx@@_MIRRORS
- string
- default "@@mirrors@@"
-
-config @@pfx@@_ARCHIVE_FILENAME
- string
- default "@@archive_filename@@"
-
-config @@pfx@@_ARCHIVE_DIRNAME
- string
- default "@@archive_dirname@@"
-
-#!end-if
-
#!// Below, we explicitly select all milestones to which a given version
#!// compares greater-or-equal. We don't select just the latest applicable
#!// (and letting milestones chain-select each other, with FOO_6_or_later
@@ -189,7 +174,7 @@ config @@pfx@@_ARCHIVE_DIRNAME
#!// where we need to identify a range of releases on a branch, for example,
#!// "all FOO releases after 4.9.1 but before 4.9.3".
#!//
-#!if [ -n "@@all_versions@@" -a -z "@@versionlocked@@" ]
+#!if [ "@@#version@@" -gt 0 -a -z "@@versionlocked@@" ]
choice
bool "Version of @@pkg_label@@"
help
@@ -199,18 +184,18 @@ choice
Based on this version, crosstool-NG may apply some version-specific
quirks while building @@pkg_label@@.
-config @@pfx@@_VERY_NEW
+config @@fork|@@_VERY_NEW
bool "newer than anything below"
depends on EXPERIMENTAL
- depends on @@pfx@@_SRC_DEVEL || @@pfx@@_SRC_CUSTOM
+ depends on @@fork|@@_SRC_DEVEL || @@fork|@@_SRC_CUSTOM
#!foreach milestone
- select @@masterpfx@@_@@ms_kcfg@@_or_later
- depends on !@@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_older
+ select @@master|@@_@@ms|@@_or_later
+ depends on !@@master|@@_REQUIRE_@@ms|@@_or_older
#!end-foreach
#!foreach version
-config @@pfx@@_V_@@kcfg@@
- bool "@@ver@@@@ver_postfix@@"
+config @@fork|@@_V_@@ver_sel|@@
+ bool "@@ver@@@@obsolete? (OBSOLETE)@@@@experimental? (EXPERIMENTAL)@@"
#!if [ "@@obsolete@@" = "yes" ]
depends on OBSOLETE
#!end-if
@@ -219,26 +204,26 @@ config @@pfx@@_V_@@kcfg@@
#!end-if
#!foreach milestone
#!if [ "@@version_cmp_milestone@@" -ge 0 ]
- select @@masterpfx@@_@@ms_kcfg@@_or_later
+ select @@master|@@_@@ms|@@_or_later
#!end-if
#!if [ "@@version_cmp_milestone@@" -le 0 ]
- select @@masterpfx@@_@@ms_kcfg@@_or_older
+ select @@master|@@_@@ms|@@_or_older
#!end-if
#!if [ "@@version_cmp_milestone@@" -gt 0 ]
- depends on !@@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_older
+ depends on !@@master|@@_REQUIRE_@@ms|@@_or_older
#!end-if
#!if [ "@@version_cmp_milestone@@" -lt 0 ]
- depends on !@@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_later
+ depends on !@@master|@@_REQUIRE_@@ms|@@_or_later
#!end-if
#!end-foreach
#!end-foreach
-config @@pfx@@_VERY_OLD
+config @@fork|@@_VERY_OLD
bool "older than anything above"
depends on OBSOLETE && EXPERIMENTAL
- depends on @@pfx@@_SRC_DEVEL || @@pfx@@_SRC_CUSTOM
+ depends on @@fork|@@_SRC_DEVEL || @@fork|@@_SRC_CUSTOM
#!foreach milestone
- depends on !@@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_later
+ depends on !@@master|@@_REQUIRE_@@ms|@@_or_later
#!end-foreach
endchoice
@@ -246,20 +231,51 @@ endchoice
#!if [ -n "@@versionlocked@@" ]
#!foreach version
-config @@pfx@@_V_@@kcfg@@
+config @@fork|@@_V_@@ver_sel|@@
def_bool y
- depends on @@versionlocked@@_V_@@kcfg@@
+ depends on @@versionlocked|@@_V_@@ver_sel|@@
#!end-foreach
#!end-if
-config @@pfx@@_VERSION
+config @@fork|@@_VERSION
string
#!foreach version
- default "@@ver@@" if @@pfx@@_V_@@kcfg@@
+ default "@@ver@@" if @@fork|@@_V_@@ver_sel|@@
#!end-foreach
default "unknown"
+#!if [ "@@#version@@" -gt 0 ]
+config @@fork|@@_MIRRORS
+ string
+#!foreach version if-differs mirrors
+ default "@@mirrors@@" if @@fork|@@_V_@@ver_sel|@@
+#!end-foreach
+ default "@@mirrors@@"
+
+config @@fork|@@_ARCHIVE_FILENAME
+ string
+#!foreach version if-differs archive_filename
+ default "@@archive_filename@@" if @@fork|@@_V_@@ver_sel|@@
+#!end-foreach
+ default "@@archive_filename@@"
+
+config @@fork|@@_ARCHIVE_DIRNAME
+ string
+#!foreach version if-differs archive_dirname
+ default "@@archive_dirname@@" if @@fork|@@_V_@@ver_sel|@@
+#!end-foreach
+ default "@@archive_dirname@@"
+
+config @@fork|@@_ARCHIVE_FORMATS
+ string
+#!foreach version if-differs archive_formats
+ default "@@archive_formats@@" if @@fork|@@_V_@@ver_sel|@@
+#!end-foreach
+ default "@@archive_formats@@"
+
+#!end-if
+
#!if [ "@@nforks@@" -ge 2 ]
endif
#!end-if
@@ -268,18 +284,18 @@ endif
#!foreach milestone
#!// Milestones selected by a chosen version of this package
-config @@masterpfx@@_@@ms_kcfg@@_or_later
+config @@master|@@_@@ms|@@_or_later
bool
-config @@masterpfx@@_@@ms_kcfg@@_or_older
+config @@master|@@_@@ms|@@_or_older
bool
#!// Milestone requirements selected by other packages that restrict
#!// the choices in this package
-config @@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_later
+config @@master|@@_REQUIRE_@@ms|@@_or_later
bool
-config @@masterpfx@@_REQUIRE_@@ms_kcfg@@_or_older
+config @@master|@@_REQUIRE_@@ms|@@_or_older
bool
#!end-foreach
diff --git a/maintainer/package-versions.template b/maintainer/package-versions.template
new file mode 100644
index 0000000..61f938f
--- /dev/null
+++ b/maintainer/package-versions.template
@@ -0,0 +1,13 @@
+#!foreach fork
+#!foreach version
+run_pkgversion \
+ master=@@master@@ \
+ masterpfx=@@master|@@ \
+ originpfx=@@origin|@@ \
+ pkg_name=@@pkg_name@@ \
+ pfx=@@fork|@@ \
+ versionlocked=@@versionlocked|@@ \
+ ver=@@ver@@ \
+ kcfg=@@ver_sel|@@
+#!end-foreach
+#!end-foreach
diff --git a/maintainer/test-packages.sh b/maintainer/test-packages.sh
new file mode 100755
index 0000000..26caaf8
--- /dev/null
+++ b/maintainer/test-packages.sh
@@ -0,0 +1,194 @@
+#!/bin/bash
+
+selected=
+
+usage()
+{
+ cat <<EOF
+$0 -- Test packages in crosstool-NG
+
+Verifies that the release tarballs can be downloaded for the packages
+available in crosstoo-NG and check that the patches apply cleanly.
+Requires crosstool-NG to be configured and built prior to running.
+
+Options:
+ --help, -?
+ Display this help message.
+
+ --download, -d
+ Download all packages to the default directory (\$HOME/src).
+
+ --apply-patches, -a
+ Implies -d. Unpack and apply the bundled patches.
+
+ --verify-urls, -u
+ Check *all* the download URLs for accessibility, without
+ actually downloading anything.
+
+ --select MASK, -s MASK
+ Specify the package to operate upon. MASK can be either package
+ name ("-s foo"), or package name + version ("-s foo-1.1").
+
+EOF
+}
+
+while [ -n "${1}" ]; do
+ case "${1}" in
+ --download|-d)
+ download_pkgs=y
+ ;;
+ --verify-urls|-u)
+ verify_urls=y
+ ;;
+ --apply-patches|-a)
+ apply_patches=y
+ download_pkgs=y
+ ;;
+ --select|-s)
+ shift
+ [ -n "${1}" ] || { echo "argument required for --select" >&2; exit 1; }
+ selected="${1}"
+ ;;
+ --help|-?)
+ usage
+ exit 0
+ ;;
+ *)
+ echo "Unknown option ${1}" >&2
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+CT_LIB_DIR=`pwd`
+CT_TOP_DIR=`pwd`
+CT_TARBALLS_DIR=`pwd`/temp.tarballs
+CT_COMMON_SRC_DIR=`pwd`/temp.src
+CT_SRC_DIR=`pwd`/temp.src
+CT_LOG_LEVEL_MAX=EXTRA
+mkdir -p ${CT_TARBALLS_DIR}
+
+# Does not matter, just to make the scripts load
+CT_ARCH=arm
+CT_KERNEL=bare-metal
+CT_BINUTILS=binutils
+CT_LIBC=none
+CT_CC=gcc
+
+. paths.sh
+. scripts/functions
+
+rm -f build.log
+CT_LogEnable
+
+check_pkg_urls()
+{
+ local e m mh url
+
+ for e in ${archive_formats}; do
+ local -A mirror_status=( )
+
+ CT_DoStep EXTRA "Looking for ${archive_filename}${e}"
+ for m in ${mirrors}; do
+ url="${m}/${archive_filename}${e}"
+ case "${url}" in
+ # WGET always returns success for FTP URLs in spider mode :(
+ ftp://*) CT_DoLog DEBUG "Skipping '${url}': FTP not supported"; continue;;
+ esac
+ mh="${url#*://}"
+ mh="${mh%%[:/]*}"
+ if [ -n "${mirror_status[${mh}]}" ]; then
+ CT_DoLog DEBUG "Skipping '${url}': already found on this host at '${mirror_status[${mh}]}'"
+ continue
+ fi
+ if CT_DoExecLog ALL wget --spider "${url}"; then
+ mirror_status[${mh}]="${url}"
+ else
+ mirror_status[${mh}]=
+ fi
+ done
+ for mh in "${!mirror_status[@]}"; do
+ if [ -n "${mirror_status[${mh}]}" ]; then
+ CT_DoLog EXTRA "OK ${mh} [${archive_filename}${e}]"
+ else
+ CT_DoLog ERROR "FAIL ${mh} [${archive_filename}${e}]"
+ fi
+ done
+ CT_EndStep
+ done
+}
+
+run_pkgversion()
+{
+ while [ -n "${1}" ]; do
+ eval "local ${1}"
+ shift
+ done
+
+ if [ -n "${selected}" ]; then
+ case "${selected}" in
+ ${pkg_name}|${pkg_name}-${ver})
+ ;;
+ *)
+ return
+ ;;
+ esac
+ fi
+
+ CT_DoStep INFO "Handling ${pkg_name}-${ver}"
+
+ # Create a temporary configuration head file
+ cat >temp.in <<EOF
+config OBSOLETE
+ def_bool y
+
+config EXPERIMENTAL
+ def_bool y
+
+config CONFIGURE_has_wget
+ def_bool y
+
+config CONFIGURE_has_curl
+ def_bool y
+
+config ${versionlocked}_V_${kcfg}
+ def_bool y
+
+source "config/global/paths.in"
+source "config/global/download.in"
+source "config/global/extract.in"
+source "config/versions/${master}.in"
+EOF
+
+ cat >temp.defconfig <<EOF
+CT_${masterpfx}_USE_${originpfx}=y
+CT_${pfx}_SRC_RELEASE=y
+CT_${pfx}_V_${kcfg}=y
+CT_SAVE_TARBALLS=y
+EOF
+
+ ./kconfig/conf --defconfig=temp.defconfig temp.in >/dev/null
+
+ CT_LoadConfig
+ rm -f .config .config.old temp.defconfig temp.in
+ if [ -n "${verify_urls}" ]; then
+ CT_DoLog EXTRA "Verifying URLs for ${pkg_name}-${ver}"
+ CT_PackageRun "${masterpfx}" check_pkg_urls
+ fi
+ if [ -n "${download_pkgs}" ]; then
+ CT_DoLog EXTRA "Downloading ${pkg_name}-${ver}"
+ CT_Fetch "${masterpfx}"
+ fi
+ if [ -n "${apply_patches}" ]; then
+ rm -rf ${CT_COMMON_SRC_DIR}
+ mkdir -p ${CT_COMMON_SRC_DIR}
+ CT_ExtractPatch "${masterpfx}"
+ fi
+
+ CT_EndStep
+}
+
+. maintainer/package-versions
+
+rm -rf ${CT_TARBALLS_DIR} ${CT_COMMON_SRC_DIR}
diff --git a/packages/android-ndk/package.desc b/packages/android-ndk/package.desc
index c51775b..5be8222 100644
--- a/packages/android-ndk/package.desc
+++ b/packages/android-ndk/package.desc
@@ -1,3 +1,4 @@
# We don't support building bionic (yet) so no official repository
mirrors='https://dl.google.com/android/repository'
archive_filename='@{pkg_name}-@{version}-linux-x86_64'
+archive_formats='.zip'
diff --git a/packages/uClibc-ng/1.0.24/version.desc b/packages/android-ndk/r15c/version.desc
index e69de29..e69de29 100644
--- a/packages/uClibc-ng/1.0.24/version.desc
+++ b/packages/android-ndk/r15c/version.desc
diff --git a/packages/autoconf/2.65/version.desc b/packages/autoconf/2.65/version.desc
index e69de29..6d5245d 100644
--- a/packages/autoconf/2.65/version.desc
+++ b/packages/autoconf/2.65/version.desc
@@ -0,0 +1 @@
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/autoconf/package.desc b/packages/autoconf/package.desc
index 29d6351..af39172 100644
--- a/packages/autoconf/package.desc
+++ b/packages/autoconf/package.desc
@@ -1,3 +1,4 @@
repository='git git://git.sv.gnu.org/autoconf'
bootstrap='autoreconf -vi'
mirrors='$(CT_Mirrors GNU autoconf)'
+archive_formats='.tar.xz .tar.gz'
diff --git a/packages/automake/1.11.1/version.desc b/packages/automake/1.11.1/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/automake/1.11.1/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/uClibc-ng/1.0.21/version.desc b/packages/automake/1.14.1/version.desc
index fcfe389..fcfe389 100644
--- a/packages/uClibc-ng/1.0.21/version.desc
+++ b/packages/automake/1.14.1/version.desc
diff --git a/packages/automake/1.14/version.desc b/packages/automake/1.14/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/automake/1.14/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/uClibc-ng/1.0.23/version.desc b/packages/automake/1.15.1/version.desc
index e69de29..e69de29 100644
--- a/packages/uClibc-ng/1.0.23/version.desc
+++ b/packages/automake/1.15.1/version.desc
diff --git a/packages/automake/package.desc b/packages/automake/package.desc
index 0191968..a624d49 100644
--- a/packages/automake/package.desc
+++ b/packages/automake/package.desc
@@ -1,3 +1,4 @@
repository='git https://git.savannah.gnu.org/git/automake.git'
bootstrap='./bootstrap'
mirrors='$(CT_Mirrors GNU automake)'
+archive_formats='.tar.xz .tar.gz'
diff --git a/packages/avr-libc/1.8.0/version.desc b/packages/avr-libc/1.8.0/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/avr-libc/1.8.0/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/avr-libc/package.desc b/packages/avr-libc/package.desc
index 8976862..9161c74 100644
--- a/packages/avr-libc/package.desc
+++ b/packages/avr-libc/package.desc
@@ -1,2 +1,3 @@
repository='svn svn://svn.savannah.nongnu.org/avr-libc/trunk/avr-libc'
mirrors='http://download.savannah.gnu.org/releases/avr-libc'
+archive_formats='.tar.bz2'
diff --git a/packages/binutils-linaro/2.23.2-2013.10-4/version.desc b/packages/binutils-linaro/2.23.2-2013.10-4/version.desc
index fcfe389..a114052 100644
--- a/packages/binutils-linaro/2.23.2-2013.10-4/version.desc
+++ b/packages/binutils-linaro/2.23.2-2013.10-4/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/binutils-linaro/package.desc b/packages/binutils-linaro/package.desc
index ea5dc66..eb994a7 100644
--- a/packages/binutils-linaro/package.desc
+++ b/packages/binutils-linaro/package.desc
@@ -3,3 +3,4 @@ repository='git https://git.linaro.org/toolchain/binutils-gdb.git'
mirrors='$(CT_Mirrors Linaro binutils ${CT_BINUTILS_LINARO_VERSION})'
origin='Linaro'
experimental='yes'
+archive_formats='.tar.xz'
diff --git a/packages/binutils/2.23.2/version.desc b/packages/binutils/2.23.2/version.desc
index fcfe389..f26b5a2 100644
--- a/packages/binutils/2.23.2/version.desc
+++ b/packages/binutils/2.23.2/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/binutils/2.24/version.desc b/packages/binutils/2.24/version.desc
index fcfe389..f26b5a2 100644
--- a/packages/binutils/2.24/version.desc
+++ b/packages/binutils/2.24/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/binutils/2.25.1/version.desc b/packages/binutils/2.25.1/version.desc
index fcfe389..f26b5a2 100644
--- a/packages/binutils/2.25.1/version.desc
+++ b/packages/binutils/2.25.1/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/binutils/2.28/120-sh-conf.patch b/packages/binutils/2.26.1/120-sh-conf.patch
index c12a023..c12a023 100644
--- a/packages/binutils/2.28/120-sh-conf.patch
+++ b/packages/binutils/2.26.1/120-sh-conf.patch
diff --git a/packages/binutils/2.28/300-001_ld_makefile_patch.patch b/packages/binutils/2.26.1/300-001_ld_makefile_patch.patch
index 2a1320c..2a1320c 100644
--- a/packages/binutils/2.28/300-001_ld_makefile_patch.patch
+++ b/packages/binutils/2.26.1/300-001_ld_makefile_patch.patch
diff --git a/packages/binutils/2.28/300-012_check_ldrunpath_length.patch b/packages/binutils/2.26.1/300-012_check_ldrunpath_length.patch
index f1f31af..f1f31af 100644
--- a/packages/binutils/2.28/300-012_check_ldrunpath_length.patch
+++ b/packages/binutils/2.26.1/300-012_check_ldrunpath_length.patch
diff --git a/packages/binutils/2.26/310-fix-gold-pthreads-typo.patch b/packages/binutils/2.26.1/310-fix-gold-pthreads-typo.patch
index f2e6ff2..f2e6ff2 100644
--- a/packages/binutils/2.26/310-fix-gold-pthreads-typo.patch
+++ b/packages/binutils/2.26.1/310-fix-gold-pthreads-typo.patch
diff --git a/packages/binutils/2.26/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch b/packages/binutils/2.26.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
index f9a8af6..f9a8af6 100644
--- a/packages/binutils/2.26/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
+++ b/packages/binutils/2.26.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
diff --git a/packages/binutils/2.26/330-Dont-link-to-libfl-as-its-unnecessary.patch b/packages/binutils/2.26.1/330-Dont-link-to-libfl-as-its-unnecessary.patch
index 334ee3e..334ee3e 100644
--- a/packages/binutils/2.26/330-Dont-link-to-libfl-as-its-unnecessary.patch
+++ b/packages/binutils/2.26.1/330-Dont-link-to-libfl-as-its-unnecessary.patch
diff --git a/packages/binutils/2.28/340-Darwin-gold-binary-cc-include-string-not-cstring.patch b/packages/binutils/2.26.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
index e4f235b..e4f235b 100644
--- a/packages/binutils/2.28/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
+++ b/packages/binutils/2.26.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
diff --git a/packages/binutils/2.28/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch b/packages/binutils/2.26.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
index 6168b31..6168b31 100644
--- a/packages/binutils/2.28/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
+++ b/packages/binutils/2.26.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
diff --git a/packages/binutils/2.26/500-sysroot.patch b/packages/binutils/2.26.1/500-sysroot.patch
index e49c795..e49c795 100644
--- a/packages/binutils/2.26/500-sysroot.patch
+++ b/packages/binutils/2.26.1/500-sysroot.patch
diff --git a/packages/binutils/2.26/600-poison-system-directories.patch b/packages/binutils/2.26.1/600-poison-system-directories.patch
index aa04082..aa04082 100644
--- a/packages/binutils/2.26/600-poison-system-directories.patch
+++ b/packages/binutils/2.26.1/600-poison-system-directories.patch
diff --git a/packages/binutils/2.28/700-Fix-library-paths-on-PowerPC.patch b/packages/binutils/2.26.1/700-Fix-library-paths-on-PowerPC.patch
index cea92f3..cea92f3 100644
--- a/packages/binutils/2.28/700-Fix-library-paths-on-PowerPC.patch
+++ b/packages/binutils/2.26.1/700-Fix-library-paths-on-PowerPC.patch
diff --git a/packages/binutils/2.26/914-xtensa-fix-signedness-of-gas-relocations.patch b/packages/binutils/2.26.1/914-xtensa-fix-signedness-of-gas-relocations.patch
index 66d4e60..66d4e60 100644
--- a/packages/binutils/2.26/914-xtensa-fix-signedness-of-gas-relocations.patch
+++ b/packages/binutils/2.26.1/914-xtensa-fix-signedness-of-gas-relocations.patch
diff --git a/packages/binutils/2.26/915-xtensa-fix-.init-.fini-literals-moving.patch b/packages/binutils/2.26.1/915-xtensa-fix-.init-.fini-literals-moving.patch
index ead3e42..ead3e42 100644
--- a/packages/binutils/2.26/915-xtensa-fix-.init-.fini-literals-moving.patch
+++ b/packages/binutils/2.26.1/915-xtensa-fix-.init-.fini-literals-moving.patch
diff --git a/packages/binutils/2.26.1/version.desc b/packages/binutils/2.26.1/version.desc
new file mode 100644
index 0000000..d44e333
--- /dev/null
+++ b/packages/binutils/2.26.1/version.desc
@@ -0,0 +1 @@
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/binutils/2.26/700-Fix-library-paths-on-PowerPC.patch b/packages/binutils/2.26/700-Fix-library-paths-on-PowerPC.patch
deleted file mode 100644
index cea92f3..0000000
--- a/packages/binutils/2.26/700-Fix-library-paths-on-PowerPC.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 1b967f3cb0682dd05128ef13495c2dca2a04dc4e Mon Sep 17 00:00:00 2001
-From: Alexey Neyman <stilor@att.net>
-Date: Sat, 11 Mar 2017 17:27:09 -0800
-Subject: [PATCH] Fix library paths on PowerPC
-
-First, need to match against just the CPU name, not the whole triplet.
-Otherwise, the test picks up "*le-*" pattern from x86_64-apple-darwin
-triplet.
-
-Second, it should be testing for $target, not $host. Host may be
-little endian by default, and the sysroot directory layout shouldn't
-depend on whether it is built on LE or BE machine.
-
-Signed-off-by: Alexey Neyman <stilor@att.net>
----
- ld/emulparams/elf32ppccommon.sh | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/ld/emulparams/elf32ppccommon.sh b/ld/emulparams/elf32ppccommon.sh
-index 1f54ef8..d00cf68 100644
---- a/ld/emulparams/elf32ppccommon.sh
-+++ b/ld/emulparams/elf32ppccommon.sh
-@@ -44,11 +44,11 @@ fi
-
- # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
- # Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc.
--case "$host":"$EMULATION_NAME" in
-- *le-*:*64lppc*) LIBPATH_SUFFIX=64 ;;
-- *le-*:*32lppc*) LIBPATH_SUFFIX=32 ;;
-- *le-*:*64*) LIBPATH_SUFFIX=64be ;;
-- *le-*:*32*) LIBPATH_SUFFIX=32be ;;
-+case `echo "$target" | sed -e 's/-.*//'`:"$EMULATION_NAME" in
-+ *le:*64lppc*) LIBPATH_SUFFIX=64 ;;
-+ *le:*32lppc*) LIBPATH_SUFFIX=32 ;;
-+ *le:*64*) LIBPATH_SUFFIX=64be ;;
-+ *le:*32*) LIBPATH_SUFFIX=32be ;;
- *:*64lppc*) LIBPATH_SUFFIX=64le ;;
- *:*32lppc*) LIBPATH_SUFFIX=32le ;;
- *:*64*) LIBPATH_SUFFIX=64 ;;
---
-2.9.3
-
diff --git a/packages/binutils/2.27/version.desc b/packages/binutils/2.27/version.desc
index e69de29..d44e333 100644
--- a/packages/binutils/2.27/version.desc
+++ b/packages/binutils/2.27/version.desc
@@ -0,0 +1 @@
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/binutils/2.26/120-sh-conf.patch b/packages/binutils/2.28.1/120-sh-conf.patch
index c12a023..c12a023 100644
--- a/packages/binutils/2.26/120-sh-conf.patch
+++ b/packages/binutils/2.28.1/120-sh-conf.patch
diff --git a/packages/binutils/2.26/300-001_ld_makefile_patch.patch b/packages/binutils/2.28.1/300-001_ld_makefile_patch.patch
index 2a1320c..2a1320c 100644
--- a/packages/binutils/2.26/300-001_ld_makefile_patch.patch
+++ b/packages/binutils/2.28.1/300-001_ld_makefile_patch.patch
diff --git a/packages/binutils/2.26/300-012_check_ldrunpath_length.patch b/packages/binutils/2.28.1/300-012_check_ldrunpath_length.patch
index f1f31af..f1f31af 100644
--- a/packages/binutils/2.26/300-012_check_ldrunpath_length.patch
+++ b/packages/binutils/2.28.1/300-012_check_ldrunpath_length.patch
diff --git a/packages/binutils/2.28/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch b/packages/binutils/2.28.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
index 2956385..2956385 100644
--- a/packages/binutils/2.28/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
+++ b/packages/binutils/2.28.1/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
diff --git a/packages/binutils/2.28/330-Dont-link-to-libfl-as-its-unnecessary.patch b/packages/binutils/2.28.1/330-Dont-link-to-libfl-as-its-unnecessary.patch
index c52af05..c52af05 100644
--- a/packages/binutils/2.28/330-Dont-link-to-libfl-as-its-unnecessary.patch
+++ b/packages/binutils/2.28.1/330-Dont-link-to-libfl-as-its-unnecessary.patch
diff --git a/packages/binutils/2.26/340-Darwin-gold-binary-cc-include-string-not-cstring.patch b/packages/binutils/2.28.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
index e4f235b..e4f235b 100644
--- a/packages/binutils/2.26/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
+++ b/packages/binutils/2.28.1/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
diff --git a/packages/binutils/2.26/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch b/packages/binutils/2.28.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
index 6168b31..6168b31 100644
--- a/packages/binutils/2.26/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
+++ b/packages/binutils/2.28.1/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
diff --git a/packages/binutils/2.28/500-sysroot.patch b/packages/binutils/2.28.1/500-sysroot.patch
index 4cb9bc7..4cb9bc7 100644
--- a/packages/binutils/2.28/500-sysroot.patch
+++ b/packages/binutils/2.28.1/500-sysroot.patch
diff --git a/packages/binutils/2.28/600-poison-system-directories.patch b/packages/binutils/2.28.1/600-poison-system-directories.patch
index ff235e3..ff235e3 100644
--- a/packages/binutils/2.28/600-poison-system-directories.patch
+++ b/packages/binutils/2.28.1/600-poison-system-directories.patch
diff --git a/packages/uClibc-ng/1.0.22/version.desc b/packages/binutils/2.28.1/version.desc
index e69de29..e69de29 100644
--- a/packages/uClibc-ng/1.0.22/version.desc
+++ b/packages/binutils/2.28.1/version.desc
diff --git a/packages/binutils/2.29/120-sh-conf.patch b/packages/binutils/2.29/120-sh-conf.patch
new file mode 100644
index 0000000..65fbcb0
--- /dev/null
+++ b/packages/binutils/2.29/120-sh-conf.patch
@@ -0,0 +1,33 @@
+r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines
+
+Likewise, binutils has no idea about any of these new targets either, so we
+fix that up too.. now we're able to actually build a real toolchain for
+sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
+inept targets than that one, really. Go look, I promise).
+
+diff --git a/configure b/configure
+index 87677bc..2d916f1 100755
+--- a/configure
++++ b/configure
+@@ -3812,7 +3812,7 @@ case "${target}" in
+ or1k*-*-*)
+ noconfigdirs="$noconfigdirs gdb"
+ ;;
+- sh-*-*)
++ sh*-*-*)
+ case "${target}" in
+ sh*-*-elf)
+ ;;
+diff --git a/configure.ac b/configure.ac
+index 8fe0eca..b10a99f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1140,7 +1140,7 @@ case "${target}" in
+ or1k*-*-*)
+ noconfigdirs="$noconfigdirs gdb"
+ ;;
+- sh-*-*)
++ sh*-*-*)
+ case "${target}" in
+ sh*-*-elf)
+ ;;
diff --git a/packages/binutils/2.29/300-001_ld_makefile_patch.patch b/packages/binutils/2.29/300-001_ld_makefile_patch.patch
new file mode 100644
index 0000000..2a1320c
--- /dev/null
+++ b/packages/binutils/2.29/300-001_ld_makefile_patch.patch
@@ -0,0 +1,26 @@
+diff --git a/ld/Makefile.am b/ld/Makefile.am
+index 9575f1f..84df0bf 100644
+--- a/ld/Makefile.am
++++ b/ld/Makefile.am
+@@ -54,7 +54,7 @@ endif
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+diff --git a/ld/Makefile.in b/ld/Makefile.in
+index 9f56ca1..272860f 100644
+--- a/ld/Makefile.in
++++ b/ld/Makefile.in
+@@ -388,7 +388,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/packages/binutils/2.29/300-012_check_ldrunpath_length.patch b/packages/binutils/2.29/300-012_check_ldrunpath_length.patch
new file mode 100644
index 0000000..c1d5a97
--- /dev/null
+++ b/packages/binutils/2.29/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,22 @@
+diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
+index 137446f..bb8391a 100644
+--- a/ld/emultempl/elf32.em
++++ b/ld/emultempl/elf32.em
+@@ -1195,6 +1195,8 @@ fragment <<EOF
+ && command_line.rpath == NULL)
+ {
+ path = (const char *) getenv ("LD_RUN_PATH");
++ if ((path) && (strlen (path) == 0))
++ path = NULL;
+ if (path
+ && gld${EMULATION_NAME}_search_needed (path, &n, force))
+ break;
+@@ -1458,6 +1460,8 @@ gld${EMULATION_NAME}_before_allocation (void)
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (*rpath == '\0'))
++ rpath = NULL;
+
+ for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
diff --git a/packages/binutils/2.29/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch b/packages/binutils/2.29/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
new file mode 100644
index 0000000..2956385
--- /dev/null
+++ b/packages/binutils/2.29/320-MinGW-w64-winpthreads-doesnt-have-pthread_mutexattr_settype.patch
@@ -0,0 +1,11 @@
+--- binutils-2.27/gold/gold-threads.cc.orig 2016-12-26 16:44:23.691075600 +1100
++++ binutils-2.27/gold/gold-threads.cc 2016-12-26 16:46:21.071855200 +1100
+@@ -101,7 +101,7 @@
+ int err = pthread_mutexattr_init(&attr);
+ if (err != 0)
+ gold_fatal(_("pthead_mutexattr_init failed: %s"), strerror(err));
+-#ifdef PTHREAD_MUTEX_ADAPTIVE_NP
++#if defined(PTHREAD_MUTEX_ADAPTIVE_NP) && !defined(_WIN32)
+ err = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
+ if (err != 0)
+ gold_fatal(_("pthread_mutexattr_settype failed: %s"), strerror(err));
diff --git a/packages/binutils/2.29/330-Dont-link-to-libfl-as-its-unnecessary.patch b/packages/binutils/2.29/330-Dont-link-to-libfl-as-its-unnecessary.patch
new file mode 100644
index 0000000..4eaa700
--- /dev/null
+++ b/packages/binutils/2.29/330-Dont-link-to-libfl-as-its-unnecessary.patch
@@ -0,0 +1,108 @@
+diff --git a/binutils/configure b/binutils/configure
+index 6e1f21e..78bf4ae 100755
+--- a/binutils/configure
++++ b/binutils/configure
+@@ -12106,6 +12106,7 @@
+ done
+ test -n "$YACC" || YACC="yacc"
+
++save_LIBS=$LIBS
+ for ac_prog in flex lex
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+@@ -12267,6 +12268,8 @@
+ if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+ fi
++LIBS=$save_LIBS
++LEXLIB=
+
+ ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr ca"
+ # If we haven't got the data from the intl directory,
+diff --git a/binutils/configure.ac b/binutils/configure.ac
+index defe781..8fd236a 100644
+--- a/binutils/configure.ac
++++ b/binutils/configure.ac
+@@ -87,7 +87,10 @@
+ fi
+
+ AC_PROG_YACC
++save_LIBS=$LIBS
+ AM_PROG_LEX
++LIBS=$save_LIBS
++LEXLIB=
+
+ ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW hr ca"
+ ZW_GNU_GETTEXT_SISTER_DIR
+diff --git a/gas/configure b/gas/configure
+index f959e95..9bb4043 100755
+--- a/gas/configure
++++ b/gas/configure
+@@ -12819,6 +12819,7 @@ fi
+ done
+ test -n "$YACC" || YACC="yacc"
+
++save_LIBS=$LIBS
+ for ac_prog in flex lex
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+@@ -12980,6 +12981,8 @@ esac
+ if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+ fi
++LIBS=$save_LIBS
++LEXLIB=
+
+ ALL_LINGUAS="fr tr es rw id ru fi ja zh_CN sv"
+ # If we haven't got the data from the intl directory,
+diff --git a/gas/configure.ac b/gas/configure.ac
+index 07f825d..c552b7e 100644
+--- a/gas/configure.ac
++++ b/gas/configure.ac
+@@ -734,7 +734,10 @@ AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}", [Target vendor.])
+ AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}", [Target OS.])
+
+ AC_PROG_YACC
++save_LIBS=$LIBS
+ AM_PROG_LEX
++LIBS=$save_LIBS
++LEXLIB=
+
+ ALL_LINGUAS="fr tr es rw id ru fi ja zh_CN sv"
+ ZW_GNU_GETTEXT_SISTER_DIR
+diff --git a/ld/configure b/ld/configure
+index a446283..1a6bf81 100755
+--- a/ld/configure
++++ b/ld/configure
+@@ -16087,6 +16087,7 @@ fi
+ done
+ test -n "$YACC" || YACC="yacc"
+
++save_LIBS=$LIBS
+ for ac_prog in flex lex
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+@@ -16248,6 +16249,8 @@ esac
+ if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+ fi
++LIBS=$save_LIBS
++LEXLIB=
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+diff --git a/ld/configure.ac b/ld/configure.ac
+index 188172d..45eec53 100644
+--- a/ld/configure.ac
++++ b/ld/configure.ac
+@@ -186,7 +186,10 @@ AM_PO_SUBDIRS
+ AC_EXEEXT
+
+ AC_PROG_YACC
++save_LIBS=$LIBS
+ AM_PROG_LEX
++LIBS=$save_LIBS
++LEXLIB=
+
+ AM_MAINTAINER_MODE
+ AM_CONDITIONAL(GENINSRC_NEVER, false)
diff --git a/packages/binutils/2.29/340-Darwin-gold-binary-cc-include-string-not-cstring.patch b/packages/binutils/2.29/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
new file mode 100644
index 0000000..e4f235b
--- /dev/null
+++ b/packages/binutils/2.29/340-Darwin-gold-binary-cc-include-string-not-cstring.patch
@@ -0,0 +1,13 @@
+diff --git a/gold/binary.cc b/gold/binary.cc
+index 52df81a..03a8f20 100644
+--- a/gold/binary.cc
++++ b/gold/binary.cc
+@@ -23,7 +23,7 @@
+ #include "gold.h"
+
+ #include <cerrno>
+-#include <cstring>
++#include <string>
+
+ #include "elfcpp.h"
+ #include "stringpool.h"
diff --git a/packages/binutils/2.29/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch b/packages/binutils/2.29/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
new file mode 100644
index 0000000..6168b31
--- /dev/null
+++ b/packages/binutils/2.29/350-Darwin-Two-fixes-from-Android-NDK-PTHREAD_ONCE_INIT-wcsncasecmp.patch
@@ -0,0 +1,77 @@
+From c39479f4ab4d372b518957871e1f205a03e7c3d6 Mon Sep 17 00:00:00 2001
+From: Andrew Hsieh <andrewhsieh@google.com>
+Date: Wed, 18 Mar 2015 10:57:24 +0800
+Subject: [PATCH] Fix darwin build
+
+1. In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4
+ doesn't support ended initializer list
+2. wcsncasecmp doesn't exist in MacSDK10.6.x
+
+Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e
+---
+ binutils-2.25/bfd/peXXigen.c | 22 ++++++++++++++++++++++
+ binutils-2.25/gold/gold-threads.cc | 15 ++++++++++++---
+ 2 files changed, 34 insertions(+), 3 deletions(-)
+
+diff --git binutils-2.25.orig/bfd/peXXigen.c binutils-2.25/bfd/peXXigen.c
+index 13e39e4..7a98306 100644
+--- binutils-2.25.orig/bfd/peXXigen.c
++++ binutils-2.25/bfd/peXXigen.c
+@@ -3522,6 +3522,28 @@ u16_mbtouc (wchar_t * puc, const unsigned short * s, unsigned int n)
+ }
+ #endif /* HAVE_WCHAR_H and not Cygwin/Mingw */
+
++#if defined __APPLE__ && __DARWIN_C_LEVEL < 200809L
++/* wcsncasecmp isn't always defined in Mac SDK */
++static int
++wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n)
++{
++ wchar_t c1, c2;
++
++ if (n == 0)
++ return (0);
++ for (; *s1; s1++, s2++)
++ {
++ c1 = towlower(*s1);
++ c2 = towlower(*s2);
++ if (c1 != c2)
++ return ((int)c1 - c2);
++ if (--n == 0)
++ return (0);
++ }
++ return (-*s2);
++}
++#endif
++
+ /* Perform a comparison of two entries. */
+ static signed int
+ rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b)
+diff --git binutils-2.25.orig/gold/gold-threads.cc binutils-2.25/gold/gold-threads.cc
+index ff5a8ac..45140e0 100644
+--- binutils-2.25.orig/gold/gold-threads.cc
++++ binutils-2.25/gold/gold-threads.cc
+@@ -284,9 +284,18 @@ Condvar::~Condvar()
+ class Once_initialize
+ {
+ public:
+- Once_initialize()
+- : once_(PTHREAD_ONCE_INIT)
+- { }
++ Once_initialize()
++#if !defined(__APPLE__)
++ : once_(PTHREAD_ONCE_INIT)
++ { }
++#else
++// In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4 doesn't support
++// extended initializer list as above */
++ {
++ pthread_once_t once_2 = PTHREAD_ONCE_INIT;
++ once_ = once_2;
++ }
++#endif
+
+ // Return a pointer to the pthread_once_t variable.
+ pthread_once_t*
+--
+2.1.3
+
diff --git a/packages/binutils/2.29/500-sysroot.patch b/packages/binutils/2.29/500-sysroot.patch
new file mode 100644
index 0000000..4cb9bc7
--- /dev/null
+++ b/packages/binutils/2.29/500-sysroot.patch
@@ -0,0 +1,37 @@
+Signed-off-by: Sven Rebhan <odinshorse@googlemail.com>
+
+Always try to prepend the sysroot prefix to absolute filenames first.
+
+http://bugs.gentoo.org/275666
+http://sourceware.org/bugzilla/show_bug.cgi?id=10340
+
+--- a/ld/ldfile.c
++++ b/ld/ldfile.c
+@@ -336,18 +336,25 @@
+ directory first. */
+ if (!entry->flags.maybe_archive)
+ {
+- if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename))
++ /* For absolute pathnames, try to always open the file in the
++ sysroot first. If this fails, try to open the file at the
++ given location. */
++ entry->flags.sysrooted = is_sysrooted_pathname (entry->filename);
++ if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)
++ && ld_sysroot)
+ {
+ char *name = concat (ld_sysroot, entry->filename,
+ (const char *) NULL);
+ if (ldfile_try_open_bfd (name, entry))
+ {
+ entry->filename = name;
++ entry->flags.sysrooted = TRUE;
+ return TRUE;
+ }
+ free (name);
+ }
+- else if (ldfile_try_open_bfd (entry->filename, entry))
++
++ if (ldfile_try_open_bfd (entry->filename, entry))
+ return TRUE;
+
+ if (IS_ABSOLUTE_PATH (entry->filename))
diff --git a/packages/binutils/2.29/600-poison-system-directories.patch b/packages/binutils/2.29/600-poison-system-directories.patch
new file mode 100644
index 0000000..a0a4a30
--- /dev/null
+++ b/packages/binutils/2.29/600-poison-system-directories.patch
@@ -0,0 +1,285 @@
+Patch adapted to binutils 2.23.2 and extended to use
+BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni.
+
+[Gustavo: adapt to binutils 2.25]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+Upstream-Status: Inappropriate [distribution: codesourcery]
+
+Patch originally created by Mark Hatle, forward-ported to
+binutils 2.21 by Scott Garman.
+
+purpose: warn for uses of system directories when cross linking
+
+Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
+
+2008-07-02 Joseph Myers <joseph@codesourcery.com>
+
+ ld/
+ * ld.h (args_type): Add error_poison_system_directories.
+ * ld.texinfo (--error-poison-system-directories): Document.
+ * ldfile.c (ldfile_add_library_path): Check
+ command_line.error_poison_system_directories.
+ * ldmain.c (main): Initialize
+ command_line.error_poison_system_directories.
+ * lexsup.c (enum option_values): Add
+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES.
+ (ld_options): Add --error-poison-system-directories.
+ (parse_args): Handle new option.
+
+2007-06-13 Joseph Myers <joseph@codesourcery.com>
+
+ ld/
+ * config.in: Regenerate.
+ * ld.h (args_type): Add poison_system_directories.
+ * ld.texinfo (--no-poison-system-directories): Document.
+ * ldfile.c (ldfile_add_library_path): Check
+ command_line.poison_system_directories.
+ * ldmain.c (main): Initialize
+ command_line.poison_system_directories.
+ * lexsup.c (enum option_values): Add
+ OPTION_NO_POISON_SYSTEM_DIRECTORIES.
+ (ld_options): Add --no-poison-system-directories.
+ (parse_args): Handle new option.
+
+2007-04-20 Joseph Myers <joseph@codesourcery.com>
+
+ Merge from Sourcery G++ binutils 2.17:
+
+ 2007-03-20 Joseph Myers <joseph@codesourcery.com>
+ Based on patch by Mark Hatle <mark.hatle@windriver.com>.
+ ld/
+ * configure.ac (--enable-poison-system-directories): New option.
+ * configure, config.in: Regenerate.
+ * ldfile.c (ldfile_add_library_path): If
+ ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib,
+ /usr/lib, /usr/local/lib or /usr/X11R6/lib.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+diff --git a/ld/config.in b/ld/config.in
+index 276fb77..35c58eb 100644
+--- a/ld/config.in
++++ b/ld/config.in
+@@ -17,6 +17,9 @@
+ language is requested. */
+ #undef ENABLE_NLS
+
++/* Define to warn for use of native system library directories */
++#undef ENABLE_POISON_SYSTEM_DIRECTORIES
++
+ /* Additional extension a shared object might have. */
+ #undef EXTRA_SHLIB_EXTENSION
+
+diff --git a/ld/configure b/ld/configure
+index a446283..d1f9504 100755
+--- a/ld/configure
++++ b/ld/configure
+@@ -788,6 +788,7 @@ with_lib_path
+ enable_targets
+ enable_64_bit_bfd
+ with_sysroot
++enable_poison_system_directories
+ enable_gold
+ enable_got
+ enable_compressed_debug_sections
+@@ -1445,6 +1446,8 @@ Optional Features:
+ --disable-largefile omit support for large files
+ --enable-targets alternative target configurations
+ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
++ --enable-poison-system-directories
++ warn for use of native system library directories
+ --enable-gold[=ARG] build gold [ARG={default,yes,no}]
+ --enable-got=<type> GOT handling scheme (target, single, negative,
+ multigot)
+@@ -15498,7 +15501,18 @@ else
+ fi
+
+
++# Check whether --enable-poison-system-directories was given.
++if test "${enable_poison_system_directories+set}" = set; then :
++ enableval=$enable_poison_system_directories;
++else
++ enable_poison_system_directories=no
++fi
++
++if test "x${enable_poison_system_directories}" = "xyes"; then
+
++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
++
++fi
+
+ # Check whether --enable-got was given.
+ if test "${enable_got+set}" = set; then :
+diff --git a/ld/configure.ac b/ld/configure.ac
+index 188172d..2cd8443 100644
+--- a/ld/configure.ac
++++ b/ld/configure.ac
+@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot)
+ AC_SUBST(TARGET_SYSTEM_ROOT)
+ AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
+
++AC_ARG_ENABLE([poison-system-directories],
++ AS_HELP_STRING([--enable-poison-system-directories],
++ [warn for use of native system library directories]),,
++ [enable_poison_system_directories=no])
++if test "x${enable_poison_system_directories}" = "xyes"; then
++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
++ [1],
++ [Define to warn for use of native system library directories])
++fi
++
+ dnl Use --enable-gold to decide if this linker should be the default.
+ dnl "install_as_default" is set to false if gold is the default linker.
+ dnl "installed_linker" is the installed BFD linker name.
+diff --git a/ld/ld.h b/ld/ld.h
+index d84ec4e..3476b26 100644
+--- a/ld/ld.h
++++ b/ld/ld.h
+@@ -169,6 +169,14 @@ typedef struct {
+ /* If set, display the target memory usage (per memory region). */
+ bfd_boolean print_memory_usage;
+
++ /* If TRUE (the default) warn for uses of system directories when
++ cross linking. */
++ bfd_boolean poison_system_directories;
++
++ /* If TRUE (default FALSE) give an error for uses of system
++ directories when cross linking instead of a warning. */
++ bfd_boolean error_poison_system_directories;
++
+ /* Should we force section groups to be resolved? Controlled with
+ --force-group-allocation on the command line or FORCE_GROUP_ALLOCATION
+ in the linker script. */
+diff --git a/ld/ld.texinfo b/ld/ld.texinfo
+index 1dd7492..fb1438e 100644
+--- a/ld/ld.texinfo
++++ b/ld/ld.texinfo
+@@ -2357,6 +2357,18 @@ string identifying the original linked file does not change.
+
+ Passing @code{none} for @var{style} disables the setting from any
+ @code{--build-id} options earlier on the command line.
++
++@kindex --no-poison-system-directories
++@item --no-poison-system-directories
++Do not warn for @option{-L} options using system directories such as
++@file{/usr/lib} when cross linking. This option is intended for use
++in chroot environments when such directories contain the correct
++libraries for the target system rather than the host.
++
++@kindex --error-poison-system-directories
++@item --error-poison-system-directories
++Give an error instead of a warning for @option{-L} options using
++system directories when cross linking.
+ @end table
+
+ @c man end
+diff --git a/ld/ldfile.c b/ld/ldfile.c
+index 96f9ecc..af231c0 100644
+--- a/ld/ldfile.c
++++ b/ld/ldfile.c
+@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
+ new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL);
+ else
+ new_dirs->name = xstrdup (name);
++
++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
++ if (command_line.poison_system_directories
++ && ((!strncmp (name, "/lib", 4))
++ || (!strncmp (name, "/usr/lib", 8))
++ || (!strncmp (name, "/usr/local/lib", 14))
++ || (!strncmp (name, "/usr/X11R6/lib", 14))))
++ {
++ if (command_line.error_poison_system_directories)
++ einfo (_("%X%P: error: library search path \"%s\" is unsafe for "
++ "cross-compilation\n"), name);
++ else
++ einfo (_("%P: warning: library search path \"%s\" is unsafe for "
++ "cross-compilation\n"), name);
++ }
++#endif
++
+ }
+
+ /* Try to open a BFD for a lang_input_statement. */
+diff --git a/ld/ldlex.h b/ld/ldlex.h
+index 6f11e7b..0ca3110 100644
+--- a/ld/ldlex.h
++++ b/ld/ldlex.h
+@@ -144,6 +144,8 @@ enum option_values
+ OPTION_REQUIRE_DEFINED_SYMBOL,
+ OPTION_ORPHAN_HANDLING,
+ OPTION_FORCE_GROUP_ALLOCATION,
++ OPTION_NO_POISON_SYSTEM_DIRECTORIES,
++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
+ };
+
+ /* The initial parser states. */
+diff --git a/ld/ldmain.c b/ld/ldmain.c
+index bb0b9cc..a23c56c 100644
+--- a/ld/ldmain.c
++++ b/ld/ldmain.c
+@@ -257,6 +257,8 @@ main (int argc, char **argv)
+ command_line.warn_mismatch = TRUE;
+ command_line.warn_search_mismatch = TRUE;
+ command_line.check_section_addresses = -1;
++ command_line.poison_system_directories = TRUE;
++ command_line.error_poison_system_directories = FALSE;
+
+ /* We initialize DEMANGLING based on the environment variable
+ COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
+diff --git a/ld/lexsup.c b/ld/lexsup.c
+index 4cad209..be7d584 100644
+--- a/ld/lexsup.c
++++ b/ld/lexsup.c
+@@ -530,6 +530,14 @@ static const struct ld_option ld_options[] =
+ { {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING},
+ '\0', N_("=MODE"), N_("Control how orphan sections are handled."),
+ TWO_DASHES },
++ { {"no-poison-system-directories", no_argument, NULL,
++ OPTION_NO_POISON_SYSTEM_DIRECTORIES},
++ '\0', NULL, N_("Do not warn for -L options using system directories"),
++ TWO_DASHES },
++ { {"error-poison-system-directories", no_argument, NULL,
++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES},
++ '\0', NULL, N_("Give an error for -L options using system directories"),
++ TWO_DASHES },
+ };
+
+ #define OPTION_COUNT ARRAY_SIZE (ld_options)
+@@ -542,6 +550,7 @@ parse_args (unsigned argc, char **argv)
+ int ingroup = 0;
+ char *default_dirlist = NULL;
+ char *shortopts;
++ char *BR_paranoid_env;
+ struct option *longopts;
+ struct option *really_longopts;
+ int last_optind;
+@@ -1516,6 +1525,14 @@ parse_args (unsigned argc, char **argv)
+ }
+ break;
+
++ case OPTION_NO_POISON_SYSTEM_DIRECTORIES:
++ command_line.poison_system_directories = FALSE;
++ break;
++
++ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES:
++ command_line.error_poison_system_directories = TRUE;
++ break;
++
+ case OPTION_PUSH_STATE:
+ input_flags.pushed = xmemdup (&input_flags,
+ sizeof (input_flags),
+@@ -1559,6 +1576,10 @@ parse_args (unsigned argc, char **argv)
+ command_line.soname = NULL;
+ }
+
++ BR_paranoid_env = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH");
++ if (BR_paranoid_env && strlen(BR_paranoid_env) > 0)
++ command_line.error_poison_system_directories = TRUE;
++
+ while (ingroup)
+ {
+ lang_leave_group ();
diff --git a/packages/newlib/2.5.0.20170519/version.desc b/packages/binutils/2.29/version.desc
index e69de29..e69de29 100644
--- a/packages/newlib/2.5.0.20170519/version.desc
+++ b/packages/binutils/2.29/version.desc
diff --git a/packages/binutils/package.desc b/packages/binutils/package.desc
index cb98707..5069307 100644
--- a/packages/binutils/package.desc
+++ b/packages/binutils/package.desc
@@ -1,4 +1,5 @@
repository='git git://sourceware.org/git/binutils-gdb.git'
mirrors='$(CT_Mirrors GNU binutils) $(CT_Mirrors sourceware binutils/releases)'
origin='GNU'
-milestones='2.23'
+milestones='2.23 2.25'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/cloog/0.18.0/version.desc b/packages/cloog/0.18.0/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/cloog/0.18.0/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/cloog/package.desc b/packages/cloog/package.desc
index 333a45c..2a12994 100644
--- a/packages/cloog/package.desc
+++ b/packages/cloog/package.desc
@@ -2,3 +2,4 @@ pkg_label='CLooG'
repository='git git://repo.or.cz/cloog.git'
mirrors='http://www.bastoul.net/cloog/pages/download ftp://gcc.gnu.org/pub/gcc/infrastructure'
milestones='0.18 0.18.1 0.18.4'
+archive_formats='.tar.gz'
diff --git a/packages/duma/package.desc b/packages/duma/package.desc
index 0abd534..13f637f 100644
--- a/packages/duma/package.desc
+++ b/packages/duma/package.desc
@@ -2,3 +2,4 @@ repository='cvs :pserver:anonymous@duma.cvs.sourceforge.net:/cvsroot/duma duma'
mirrors='http://downloads.sourceforge.net/project/duma/duma/${CT_DUMA_VERSION//_/.}'
archive_filename='@{pkg_name}_@{version}'
archive_dirname='@{pkg_name}_@{version}'
+archive_formats='.tar.gz .zip'
diff --git a/packages/mingw-w64/v5.0.1/version.desc b/packages/expat/2.2.3/version.desc
index e69de29..e69de29 100644
--- a/packages/mingw-w64/v5.0.1/version.desc
+++ b/packages/expat/2.2.3/version.desc
diff --git a/packages/expat/package.desc b/packages/expat/package.desc
index 585ce5e..6a541b3 100644
--- a/packages/expat/package.desc
+++ b/packages/expat/package.desc
@@ -2,3 +2,4 @@ repository='git https://github.com/libexpat/libexpat.git'
repository_subdir='expat'
bootstrap='./buildconf.sh && make -C doc all'
mirrors='http://downloads.sourceforge.net/project/expat/expat/${CT_EXPAT_VERSION}'
+archive_formats='.tar.bz2'
diff --git a/packages/gcc-linaro/4.9-2017.01/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch b/packages/gcc-linaro/4.9-2017.01/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
new file mode 100644
index 0000000..1a6f7e5
--- /dev/null
+++ b/packages/gcc-linaro/4.9-2017.01/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
@@ -0,0 +1,188 @@
+From 3c784ee4ffc784037d6d0f022326b95b848fbfc3 Mon Sep 17 00:00:00 2001
+From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 4 Jul 2017 10:25:10 +0000
+Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
+
+Current glibc no longer gives the ucontext_t type the tag struct
+ucontext, to conform with POSIX namespace rules. This requires
+various linux-unwind.h files in libgcc, that were previously using
+struct ucontext, to be fixed to use ucontext_t instead. This is
+similar to the removal of the struct siginfo tag from siginfo_t some
+years ago.
+
+This patch changes those files to use ucontext_t instead. As the
+standard name that should be unconditionally safe, so this is not
+restricted to architectures supported by glibc, or conditioned on the
+glibc version.
+
+Tested compilation together with current glibc with glibc's
+build-many-glibcs.py.
+
+ * config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
+ config/alpha/linux-unwind.h (alpha_fallback_frame_state),
+ config/bfin/linux-unwind.h (bfin_fallback_frame_state),
+ config/i386/linux-unwind.h (x86_64_fallback_frame_state,
+ x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
+ uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
+ config/pa/linux-unwind.h (pa32_fallback_frame_state),
+ config/sh/linux-unwind.h (sh_fallback_frame_state),
+ config/tilepro/linux-unwind.h (tile_fallback_frame_state),
+ config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
+ ucontext_t instead of struct ucontext.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@249958 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libgcc/config/aarch64/linux-unwind.h | 2 +-
+ libgcc/config/alpha/linux-unwind.h | 2 +-
+ libgcc/config/bfin/linux-unwind.h | 2 +-
+ libgcc/config/i386/linux-unwind.h | 4 ++--
+ libgcc/config/m68k/linux-unwind.h | 2 +-
+ libgcc/config/nios2/linux-unwind.h | 2 +-
+ libgcc/config/pa/linux-unwind.h | 2 +-
+ libgcc/config/sh/linux-unwind.h | 2 +-
+ libgcc/config/tilepro/linux-unwind.h | 2 +-
+ libgcc/config/xtensa/linux-unwind.h | 2 +-
+ 10 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
+index 86d17b1c798..909f68f7311 100644
+--- a/libgcc/config/aarch64/linux-unwind.h
++++ b/libgcc/config/aarch64/linux-unwind.h
+@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe
+ {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ };
+
+ struct rt_sigframe *rt_;
+diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
+index d65474fec12..9a226b195b5 100644
+--- a/libgcc/config/alpha/linux-unwind.h
++++ b/libgcc/config/alpha/linux-unwind.h
+@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ sc = &rt_->uc.uc_mcontext;
+ }
+diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
+index 0c270e435c7..7fa95d2dc96 100644
+--- a/libgcc/config/bfin/linux-unwind.h
++++ b/libgcc/config/bfin/linux-unwind.h
+@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
+ void *puc;
+ char retcode[8];
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+
+ /* The void * cast is necessary to avoid an aliasing warning.
+diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
+index e54bf73b1fd..d35fc4566ce 100644
+--- a/libgcc/config/i386/linux-unwind.h
++++ b/libgcc/config/i386/linux-unwind.h
+@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
+ if (*(unsigned char *)(pc+0) == 0x48
+ && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+ {
+- struct ucontext *uc_ = context->cfa;
++ ucontext_t *uc_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+ because it does not alias anything. */
+@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
+ siginfo_t *pinfo;
+ void *puc;
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
+index fb79a4d63cd..b2f5ea4cd7c 100644
+--- a/libgcc/config/m68k/linux-unwind.h
++++ b/libgcc/config/m68k/linux-unwind.h
+@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ /* <sys/ucontext.h> is unfortunately broken right now. */
+ struct uw_ucontext {
+ unsigned long uc_flags;
+- struct ucontext *uc_link;
++ ucontext_t *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ unsigned long uc_filler[80];
+diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h
+index dff1c20076e..1d88afecb12 100644
+--- a/libgcc/config/nios2/linux-unwind.h
++++ b/libgcc/config/nios2/linux-unwind.h
+@@ -38,7 +38,7 @@ struct nios2_mcontext {
+
+ struct nios2_ucontext {
+ unsigned long uc_flags;
+- struct ucontext *uc_link;
++ ucontext_t *uc_link;
+ stack_t uc_stack;
+ struct nios2_mcontext uc_mcontext;
+ sigset_t uc_sigmask; /* mask last for extensibility */
+diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
+index 01494685ea4..91575356803 100644
+--- a/libgcc/config/pa/linux-unwind.h
++++ b/libgcc/config/pa/linux-unwind.h
+@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
+ struct sigcontext *sc;
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *frame;
+
+ /* rt_sigreturn trampoline:
+diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
+index e63091f287c..67033f06b4b 100644
+--- a/libgcc/config/sh/linux-unwind.h
++++ b/libgcc/config/sh/linux-unwind.h
+@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
+index fd83ba7c275..e3c9ef0840d 100644
+--- a/libgcc/config/tilepro/linux-unwind.h
++++ b/libgcc/config/tilepro/linux-unwind.h
+@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe {
+ unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_;
+
+ /* Return if this is not a signal handler. */
+diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
+index 9daf738ff57..ff6b66373a9 100644
+--- a/libgcc/config/xtensa/linux-unwind.h
++++ b/libgcc/config/xtensa/linux-unwind.h
+@@ -64,7 +64,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
+
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_;
+
+ /* movi a2, __NR_rt_sigreturn; syscall */
+--
+2.14.1
+
diff --git a/packages/gcc-linaro/5.4-2017.05/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch b/packages/gcc-linaro/5.4-2017.05/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
new file mode 100644
index 0000000..1a6f7e5
--- /dev/null
+++ b/packages/gcc-linaro/5.4-2017.05/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
@@ -0,0 +1,188 @@
+From 3c784ee4ffc784037d6d0f022326b95b848fbfc3 Mon Sep 17 00:00:00 2001
+From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 4 Jul 2017 10:25:10 +0000
+Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
+
+Current glibc no longer gives the ucontext_t type the tag struct
+ucontext, to conform with POSIX namespace rules. This requires
+various linux-unwind.h files in libgcc, that were previously using
+struct ucontext, to be fixed to use ucontext_t instead. This is
+similar to the removal of the struct siginfo tag from siginfo_t some
+years ago.
+
+This patch changes those files to use ucontext_t instead. As the
+standard name that should be unconditionally safe, so this is not
+restricted to architectures supported by glibc, or conditioned on the
+glibc version.
+
+Tested compilation together with current glibc with glibc's
+build-many-glibcs.py.
+
+ * config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
+ config/alpha/linux-unwind.h (alpha_fallback_frame_state),
+ config/bfin/linux-unwind.h (bfin_fallback_frame_state),
+ config/i386/linux-unwind.h (x86_64_fallback_frame_state,
+ x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
+ uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
+ config/pa/linux-unwind.h (pa32_fallback_frame_state),
+ config/sh/linux-unwind.h (sh_fallback_frame_state),
+ config/tilepro/linux-unwind.h (tile_fallback_frame_state),
+ config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
+ ucontext_t instead of struct ucontext.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@249958 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libgcc/config/aarch64/linux-unwind.h | 2 +-
+ libgcc/config/alpha/linux-unwind.h | 2 +-
+ libgcc/config/bfin/linux-unwind.h | 2 +-
+ libgcc/config/i386/linux-unwind.h | 4 ++--
+ libgcc/config/m68k/linux-unwind.h | 2 +-
+ libgcc/config/nios2/linux-unwind.h | 2 +-
+ libgcc/config/pa/linux-unwind.h | 2 +-
+ libgcc/config/sh/linux-unwind.h | 2 +-
+ libgcc/config/tilepro/linux-unwind.h | 2 +-
+ libgcc/config/xtensa/linux-unwind.h | 2 +-
+ 10 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
+index 86d17b1c798..909f68f7311 100644
+--- a/libgcc/config/aarch64/linux-unwind.h
++++ b/libgcc/config/aarch64/linux-unwind.h
+@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe
+ {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ };
+
+ struct rt_sigframe *rt_;
+diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
+index d65474fec12..9a226b195b5 100644
+--- a/libgcc/config/alpha/linux-unwind.h
++++ b/libgcc/config/alpha/linux-unwind.h
+@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ sc = &rt_->uc.uc_mcontext;
+ }
+diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
+index 0c270e435c7..7fa95d2dc96 100644
+--- a/libgcc/config/bfin/linux-unwind.h
++++ b/libgcc/config/bfin/linux-unwind.h
+@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
+ void *puc;
+ char retcode[8];
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+
+ /* The void * cast is necessary to avoid an aliasing warning.
+diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
+index e54bf73b1fd..d35fc4566ce 100644
+--- a/libgcc/config/i386/linux-unwind.h
++++ b/libgcc/config/i386/linux-unwind.h
+@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
+ if (*(unsigned char *)(pc+0) == 0x48
+ && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+ {
+- struct ucontext *uc_ = context->cfa;
++ ucontext_t *uc_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+ because it does not alias anything. */
+@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
+ siginfo_t *pinfo;
+ void *puc;
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
+index fb79a4d63cd..b2f5ea4cd7c 100644
+--- a/libgcc/config/m68k/linux-unwind.h
++++ b/libgcc/config/m68k/linux-unwind.h
+@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ /* <sys/ucontext.h> is unfortunately broken right now. */
+ struct uw_ucontext {
+ unsigned long uc_flags;
+- struct ucontext *uc_link;
++ ucontext_t *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ unsigned long uc_filler[80];
+diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h
+index dff1c20076e..1d88afecb12 100644
+--- a/libgcc/config/nios2/linux-unwind.h
++++ b/libgcc/config/nios2/linux-unwind.h
+@@ -38,7 +38,7 @@ struct nios2_mcontext {
+
+ struct nios2_ucontext {
+ unsigned long uc_flags;
+- struct ucontext *uc_link;
++ ucontext_t *uc_link;
+ stack_t uc_stack;
+ struct nios2_mcontext uc_mcontext;
+ sigset_t uc_sigmask; /* mask last for extensibility */
+diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
+index 01494685ea4..91575356803 100644
+--- a/libgcc/config/pa/linux-unwind.h
++++ b/libgcc/config/pa/linux-unwind.h
+@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
+ struct sigcontext *sc;
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *frame;
+
+ /* rt_sigreturn trampoline:
+diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
+index e63091f287c..67033f06b4b 100644
+--- a/libgcc/config/sh/linux-unwind.h
++++ b/libgcc/config/sh/linux-unwind.h
+@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
+index fd83ba7c275..e3c9ef0840d 100644
+--- a/libgcc/config/tilepro/linux-unwind.h
++++ b/libgcc/config/tilepro/linux-unwind.h
+@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe {
+ unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_;
+
+ /* Return if this is not a signal handler. */
+diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
+index 9daf738ff57..ff6b66373a9 100644
+--- a/libgcc/config/xtensa/linux-unwind.h
++++ b/libgcc/config/xtensa/linux-unwind.h
+@@ -64,7 +64,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
+
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_;
+
+ /* movi a2, __NR_rt_sigreturn; syscall */
+--
+2.14.1
+
diff --git a/packages/gcc-linaro/6.3-2017.05/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch b/packages/gcc-linaro/6.3-2017.05/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
new file mode 100644
index 0000000..17a77d0
--- /dev/null
+++ b/packages/gcc-linaro/6.3-2017.05/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
@@ -0,0 +1,188 @@
+From d1f626c8f3c2c2c3aca3a67d4b66641d2d911dfa Mon Sep 17 00:00:00 2001
+From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 4 Jul 2017 10:23:57 +0000
+Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
+
+Current glibc no longer gives the ucontext_t type the tag struct
+ucontext, to conform with POSIX namespace rules. This requires
+various linux-unwind.h files in libgcc, that were previously using
+struct ucontext, to be fixed to use ucontext_t instead. This is
+similar to the removal of the struct siginfo tag from siginfo_t some
+years ago.
+
+This patch changes those files to use ucontext_t instead. As the
+standard name that should be unconditionally safe, so this is not
+restricted to architectures supported by glibc, or conditioned on the
+glibc version.
+
+Tested compilation together with current glibc with glibc's
+build-many-glibcs.py.
+
+ * config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
+ config/alpha/linux-unwind.h (alpha_fallback_frame_state),
+ config/bfin/linux-unwind.h (bfin_fallback_frame_state),
+ config/i386/linux-unwind.h (x86_64_fallback_frame_state,
+ x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
+ uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
+ config/pa/linux-unwind.h (pa32_fallback_frame_state),
+ config/sh/linux-unwind.h (sh_fallback_frame_state),
+ config/tilepro/linux-unwind.h (tile_fallback_frame_state),
+ config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
+ ucontext_t instead of struct ucontext.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libgcc/config/aarch64/linux-unwind.h | 2 +-
+ libgcc/config/alpha/linux-unwind.h | 2 +-
+ libgcc/config/bfin/linux-unwind.h | 2 +-
+ libgcc/config/i386/linux-unwind.h | 4 ++--
+ libgcc/config/m68k/linux-unwind.h | 2 +-
+ libgcc/config/nios2/linux-unwind.h | 2 +-
+ libgcc/config/pa/linux-unwind.h | 2 +-
+ libgcc/config/sh/linux-unwind.h | 2 +-
+ libgcc/config/tilepro/linux-unwind.h | 2 +-
+ libgcc/config/xtensa/linux-unwind.h | 2 +-
+ 10 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
+index 4512efbdcc8..06de45aa7ab 100644
+--- a/libgcc/config/aarch64/linux-unwind.h
++++ b/libgcc/config/aarch64/linux-unwind.h
+@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe
+ {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ };
+
+ struct rt_sigframe *rt_;
+diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
+index bdbba4a3c5d..e84812e33fd 100644
+--- a/libgcc/config/alpha/linux-unwind.h
++++ b/libgcc/config/alpha/linux-unwind.h
+@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ sc = &rt_->uc.uc_mcontext;
+ }
+diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
+index 77b7c23c708..8bf5e82c55e 100644
+--- a/libgcc/config/bfin/linux-unwind.h
++++ b/libgcc/config/bfin/linux-unwind.h
+@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
+ void *puc;
+ char retcode[8];
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+
+ /* The void * cast is necessary to avoid an aliasing warning.
+diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
+index 540a0a25aca..29efbe31d61 100644
+--- a/libgcc/config/i386/linux-unwind.h
++++ b/libgcc/config/i386/linux-unwind.h
+@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
+ if (*(unsigned char *)(pc+0) == 0x48
+ && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+ {
+- struct ucontext *uc_ = context->cfa;
++ ucontext_t *uc_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+ because it does not alias anything. */
+@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
+ siginfo_t *pinfo;
+ void *puc;
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
+index 75b7cf723a0..f964e24c4ee 100644
+--- a/libgcc/config/m68k/linux-unwind.h
++++ b/libgcc/config/m68k/linux-unwind.h
+@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ /* <sys/ucontext.h> is unfortunately broken right now. */
+ struct uw_ucontext {
+ unsigned long uc_flags;
+- struct ucontext *uc_link;
++ ucontext_t *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ unsigned long uc_filler[80];
+diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h
+index 23041420525..30f25ea379e 100644
+--- a/libgcc/config/nios2/linux-unwind.h
++++ b/libgcc/config/nios2/linux-unwind.h
+@@ -38,7 +38,7 @@ struct nios2_mcontext {
+
+ struct nios2_ucontext {
+ unsigned long uc_flags;
+- struct ucontext *uc_link;
++ ucontext_t *uc_link;
+ stack_t uc_stack;
+ struct nios2_mcontext uc_mcontext;
+ sigset_t uc_sigmask; /* mask last for extensibility */
+diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
+index 9a2657f295d..e47493dde91 100644
+--- a/libgcc/config/pa/linux-unwind.h
++++ b/libgcc/config/pa/linux-unwind.h
+@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
+ struct sigcontext *sc;
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *frame;
+
+ /* rt_sigreturn trampoline:
+diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
+index e389cacaab8..0bf43ba21c2 100644
+--- a/libgcc/config/sh/linux-unwind.h
++++ b/libgcc/config/sh/linux-unwind.h
+@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
+index 796e97620b8..75f8890ce07 100644
+--- a/libgcc/config/tilepro/linux-unwind.h
++++ b/libgcc/config/tilepro/linux-unwind.h
+@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe {
+ unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_;
+
+ /* Return if this is not a signal handler. */
+diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
+index 9872492acc2..586a9d49e9c 100644
+--- a/libgcc/config/xtensa/linux-unwind.h
++++ b/libgcc/config/xtensa/linux-unwind.h
+@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
+
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_;
+
+ /* movi a2, __NR_rt_sigreturn; syscall */
+--
+2.14.1
+
diff --git a/packages/gcc-linaro/6.3-2017.05/1100-ubsan-fix-check-empty-string.patch b/packages/gcc-linaro/6.3-2017.05/1100-ubsan-fix-check-empty-string.patch
deleted file mode 100644
index c012719..0000000
--- a/packages/gcc-linaro/6.3-2017.05/1100-ubsan-fix-check-empty-string.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 8db2cf6353c13f2a84cbe49b689654897906c499 Mon Sep 17 00:00:00 2001
-From: kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Sat, 3 Sep 2016 10:57:05 +0000
-Subject: [PATCH] gcc/ * ubsan.c (ubsan_use_new_style_p): Fix check for empty
- string.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239971 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport
-Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
-
----
- gcc/ubsan.c | 2 +-
- 2 files changed, 5 insertions(+), 1 deletion(-)
-
-Index: gcc-6.3.0/gcc/ubsan.c
-===================================================================
---- gcc-6.3.0.orig/gcc/ubsan.c
-+++ gcc-6.3.0/gcc/ubsan.c
-@@ -1471,7 +1471,7 @@ ubsan_use_new_style_p (location_t loc)
-
- expanded_location xloc = expand_location (loc);
- if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0
-- || xloc.file == '\0' || xloc.file[0] == '\xff'
-+ || xloc.file[0] == '\0' || xloc.file[0] == '\xff'
- || xloc.file[1] == '\xff')
- return false;
-
diff --git a/packages/gcc-linaro/7.1-2017.05/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch b/packages/gcc-linaro/7.1-2017.05/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
new file mode 100644
index 0000000..c5e95d9
--- /dev/null
+++ b/packages/gcc-linaro/7.1-2017.05/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
@@ -0,0 +1,203 @@
+From d720a7b5b2f72e3d2c7bacc7a0cb87018f21f35d Mon Sep 17 00:00:00 2001
+From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 4 Jul 2017 10:22:56 +0000
+Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
+
+Current glibc no longer gives the ucontext_t type the tag struct
+ucontext, to conform with POSIX namespace rules. This requires
+various linux-unwind.h files in libgcc, that were previously using
+struct ucontext, to be fixed to use ucontext_t instead. This is
+similar to the removal of the struct siginfo tag from siginfo_t some
+years ago.
+
+This patch changes those files to use ucontext_t instead. As the
+standard name that should be unconditionally safe, so this is not
+restricted to architectures supported by glibc, or conditioned on the
+glibc version.
+
+Tested compilation together with current glibc with glibc's
+build-many-glibcs.py.
+
+ * config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
+ config/alpha/linux-unwind.h (alpha_fallback_frame_state),
+ config/bfin/linux-unwind.h (bfin_fallback_frame_state),
+ config/i386/linux-unwind.h (x86_64_fallback_frame_state,
+ x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
+ uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
+ config/pa/linux-unwind.h (pa32_fallback_frame_state),
+ config/riscv/linux-unwind.h (riscv_fallback_frame_state),
+ config/sh/linux-unwind.h (sh_fallback_frame_state),
+ config/tilepro/linux-unwind.h (tile_fallback_frame_state),
+ config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
+ ucontext_t instead of struct ucontext.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@249956 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libgcc/config/aarch64/linux-unwind.h | 2 +-
+ libgcc/config/alpha/linux-unwind.h | 2 +-
+ libgcc/config/bfin/linux-unwind.h | 2 +-
+ libgcc/config/i386/linux-unwind.h | 4 ++--
+ libgcc/config/m68k/linux-unwind.h | 2 +-
+ libgcc/config/nios2/linux-unwind.h | 2 +-
+ libgcc/config/pa/linux-unwind.h | 2 +-
+ libgcc/config/riscv/linux-unwind.h | 2 +-
+ libgcc/config/sh/linux-unwind.h | 2 +-
+ libgcc/config/tilepro/linux-unwind.h | 2 +-
+ libgcc/config/xtensa/linux-unwind.h | 2 +-
+ 11 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
+index d5d6980442f..d46d5f53be3 100644
+--- a/libgcc/config/aarch64/linux-unwind.h
++++ b/libgcc/config/aarch64/linux-unwind.h
+@@ -55,7 +55,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe
+ {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ };
+
+ struct rt_sigframe *rt_;
+diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
+index a91a5f4fe26..7202516581d 100644
+--- a/libgcc/config/alpha/linux-unwind.h
++++ b/libgcc/config/alpha/linux-unwind.h
+@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ sc = &rt_->uc.uc_mcontext;
+ }
+diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
+index 9412c7652b8..37e9feb6965 100644
+--- a/libgcc/config/bfin/linux-unwind.h
++++ b/libgcc/config/bfin/linux-unwind.h
+@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
+ void *puc;
+ char retcode[8];
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+
+ /* The void * cast is necessary to avoid an aliasing warning.
+diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
+index b1d5040a687..2009ad72260 100644
+--- a/libgcc/config/i386/linux-unwind.h
++++ b/libgcc/config/i386/linux-unwind.h
+@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
+ if (*(unsigned char *)(pc+0) == 0x48
+ && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+ {
+- struct ucontext *uc_ = context->cfa;
++ ucontext_t *uc_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+ because it does not alias anything. */
+@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
+ siginfo_t *pinfo;
+ void *puc;
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
+index 82c7a297a6d..9ea39d454aa 100644
+--- a/libgcc/config/m68k/linux-unwind.h
++++ b/libgcc/config/m68k/linux-unwind.h
+@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ /* <sys/ucontext.h> is unfortunately broken right now. */
+ struct uw_ucontext {
+ unsigned long uc_flags;
+- struct ucontext *uc_link;
++ ucontext_t *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ unsigned long uc_filler[80];
+diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h
+index ae82efd6de6..204359d7b92 100644
+--- a/libgcc/config/nios2/linux-unwind.h
++++ b/libgcc/config/nios2/linux-unwind.h
+@@ -38,7 +38,7 @@ struct nios2_mcontext {
+
+ struct nios2_ucontext {
+ unsigned long uc_flags;
+- struct ucontext *uc_link;
++ ucontext_t *uc_link;
+ stack_t uc_stack;
+ struct nios2_mcontext uc_mcontext;
+ sigset_t uc_sigmask; /* mask last for extensibility */
+diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
+index 580c18dad69..c2c3409bcc1 100644
+--- a/libgcc/config/pa/linux-unwind.h
++++ b/libgcc/config/pa/linux-unwind.h
+@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
+ struct sigcontext *sc;
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *frame;
+
+ /* rt_sigreturn trampoline:
+diff --git a/libgcc/config/riscv/linux-unwind.h b/libgcc/config/riscv/linux-unwind.h
+index a051a2869d4..1c8aeff7ef0 100644
+--- a/libgcc/config/riscv/linux-unwind.h
++++ b/libgcc/config/riscv/linux-unwind.h
+@@ -42,7 +42,7 @@ riscv_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe
+ {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ };
+
+ struct rt_sigframe *rt_;
+diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
+index 1038caeb5c3..a8c98220282 100644
+--- a/libgcc/config/sh/linux-unwind.h
++++ b/libgcc/config/sh/linux-unwind.h
+@@ -82,7 +82,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
+index a8dc4405715..dba3b410279 100644
+--- a/libgcc/config/tilepro/linux-unwind.h
++++ b/libgcc/config/tilepro/linux-unwind.h
+@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe {
+ unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_;
+
+ /* Return if this is not a signal handler. */
+diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
+index 67c272820d0..2cb9eb1f739 100644
+--- a/libgcc/config/xtensa/linux-unwind.h
++++ b/libgcc/config/xtensa/linux-unwind.h
+@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
+
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_;
+
+ /* movi a2, __NR_rt_sigreturn; syscall */
+--
+2.14.1
+
diff --git a/packages/gcc-linaro/package.desc b/packages/gcc-linaro/package.desc
index 1731843..fd475c1 100644
--- a/packages/gcc-linaro/package.desc
+++ b/packages/gcc-linaro/package.desc
@@ -3,3 +3,4 @@ repository='git https://git.linaro.org/toolchain/gcc.git'
mirrors='$(CT_Mirrors Linaro gcc ${CT_GCC_LINARO_VERSION})'
origin='Linaro'
experimental='yes'
+archive_formats='.tar.xz'
diff --git a/packages/gcc/4.8.5/version.desc b/packages/gcc/4.8.5/version.desc
index fcfe389..f26b5a2 100644
--- a/packages/gcc/4.8.5/version.desc
+++ b/packages/gcc/4.8.5/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/gcc/4.9.4/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch b/packages/gcc/4.9.4/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
new file mode 100644
index 0000000..1a6f7e5
--- /dev/null
+++ b/packages/gcc/4.9.4/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
@@ -0,0 +1,188 @@
+From 3c784ee4ffc784037d6d0f022326b95b848fbfc3 Mon Sep 17 00:00:00 2001
+From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 4 Jul 2017 10:25:10 +0000
+Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
+
+Current glibc no longer gives the ucontext_t type the tag struct
+ucontext, to conform with POSIX namespace rules. This requires
+various linux-unwind.h files in libgcc, that were previously using
+struct ucontext, to be fixed to use ucontext_t instead. This is
+similar to the removal of the struct siginfo tag from siginfo_t some
+years ago.
+
+This patch changes those files to use ucontext_t instead. As the
+standard name that should be unconditionally safe, so this is not
+restricted to architectures supported by glibc, or conditioned on the
+glibc version.
+
+Tested compilation together with current glibc with glibc's
+build-many-glibcs.py.
+
+ * config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
+ config/alpha/linux-unwind.h (alpha_fallback_frame_state),
+ config/bfin/linux-unwind.h (bfin_fallback_frame_state),
+ config/i386/linux-unwind.h (x86_64_fallback_frame_state,
+ x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
+ uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
+ config/pa/linux-unwind.h (pa32_fallback_frame_state),
+ config/sh/linux-unwind.h (sh_fallback_frame_state),
+ config/tilepro/linux-unwind.h (tile_fallback_frame_state),
+ config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
+ ucontext_t instead of struct ucontext.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@249958 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libgcc/config/aarch64/linux-unwind.h | 2 +-
+ libgcc/config/alpha/linux-unwind.h | 2 +-
+ libgcc/config/bfin/linux-unwind.h | 2 +-
+ libgcc/config/i386/linux-unwind.h | 4 ++--
+ libgcc/config/m68k/linux-unwind.h | 2 +-
+ libgcc/config/nios2/linux-unwind.h | 2 +-
+ libgcc/config/pa/linux-unwind.h | 2 +-
+ libgcc/config/sh/linux-unwind.h | 2 +-
+ libgcc/config/tilepro/linux-unwind.h | 2 +-
+ libgcc/config/xtensa/linux-unwind.h | 2 +-
+ 10 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
+index 86d17b1c798..909f68f7311 100644
+--- a/libgcc/config/aarch64/linux-unwind.h
++++ b/libgcc/config/aarch64/linux-unwind.h
+@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe
+ {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ };
+
+ struct rt_sigframe *rt_;
+diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
+index d65474fec12..9a226b195b5 100644
+--- a/libgcc/config/alpha/linux-unwind.h
++++ b/libgcc/config/alpha/linux-unwind.h
+@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ sc = &rt_->uc.uc_mcontext;
+ }
+diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
+index 0c270e435c7..7fa95d2dc96 100644
+--- a/libgcc/config/bfin/linux-unwind.h
++++ b/libgcc/config/bfin/linux-unwind.h
+@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
+ void *puc;
+ char retcode[8];
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+
+ /* The void * cast is necessary to avoid an aliasing warning.
+diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
+index e54bf73b1fd..d35fc4566ce 100644
+--- a/libgcc/config/i386/linux-unwind.h
++++ b/libgcc/config/i386/linux-unwind.h
+@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
+ if (*(unsigned char *)(pc+0) == 0x48
+ && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+ {
+- struct ucontext *uc_ = context->cfa;
++ ucontext_t *uc_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+ because it does not alias anything. */
+@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
+ siginfo_t *pinfo;
+ void *puc;
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
+index fb79a4d63cd..b2f5ea4cd7c 100644
+--- a/libgcc/config/m68k/linux-unwind.h
++++ b/libgcc/config/m68k/linux-unwind.h
+@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ /* <sys/ucontext.h> is unfortunately broken right now. */
+ struct uw_ucontext {
+ unsigned long uc_flags;
+- struct ucontext *uc_link;
++ ucontext_t *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ unsigned long uc_filler[80];
+diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h
+index dff1c20076e..1d88afecb12 100644
+--- a/libgcc/config/nios2/linux-unwind.h
++++ b/libgcc/config/nios2/linux-unwind.h
+@@ -38,7 +38,7 @@ struct nios2_mcontext {
+
+ struct nios2_ucontext {
+ unsigned long uc_flags;
+- struct ucontext *uc_link;
++ ucontext_t *uc_link;
+ stack_t uc_stack;
+ struct nios2_mcontext uc_mcontext;
+ sigset_t uc_sigmask; /* mask last for extensibility */
+diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
+index 01494685ea4..91575356803 100644
+--- a/libgcc/config/pa/linux-unwind.h
++++ b/libgcc/config/pa/linux-unwind.h
+@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
+ struct sigcontext *sc;
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *frame;
+
+ /* rt_sigreturn trampoline:
+diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
+index e63091f287c..67033f06b4b 100644
+--- a/libgcc/config/sh/linux-unwind.h
++++ b/libgcc/config/sh/linux-unwind.h
+@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
+index fd83ba7c275..e3c9ef0840d 100644
+--- a/libgcc/config/tilepro/linux-unwind.h
++++ b/libgcc/config/tilepro/linux-unwind.h
+@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe {
+ unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_;
+
+ /* Return if this is not a signal handler. */
+diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
+index 9daf738ff57..ff6b66373a9 100644
+--- a/libgcc/config/xtensa/linux-unwind.h
++++ b/libgcc/config/xtensa/linux-unwind.h
+@@ -64,7 +64,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
+
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_;
+
+ /* movi a2, __NR_rt_sigreturn; syscall */
+--
+2.14.1
+
diff --git a/packages/gcc/4.9.4/version.desc b/packages/gcc/4.9.4/version.desc
index e69de29..d44e333 100644
--- a/packages/gcc/4.9.4/version.desc
+++ b/packages/gcc/4.9.4/version.desc
@@ -0,0 +1 @@
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/gcc/5.4.0/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch b/packages/gcc/5.4.0/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
new file mode 100644
index 0000000..1a6f7e5
--- /dev/null
+++ b/packages/gcc/5.4.0/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
@@ -0,0 +1,188 @@
+From 3c784ee4ffc784037d6d0f022326b95b848fbfc3 Mon Sep 17 00:00:00 2001
+From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 4 Jul 2017 10:25:10 +0000
+Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
+
+Current glibc no longer gives the ucontext_t type the tag struct
+ucontext, to conform with POSIX namespace rules. This requires
+various linux-unwind.h files in libgcc, that were previously using
+struct ucontext, to be fixed to use ucontext_t instead. This is
+similar to the removal of the struct siginfo tag from siginfo_t some
+years ago.
+
+This patch changes those files to use ucontext_t instead. As the
+standard name that should be unconditionally safe, so this is not
+restricted to architectures supported by glibc, or conditioned on the
+glibc version.
+
+Tested compilation together with current glibc with glibc's
+build-many-glibcs.py.
+
+ * config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
+ config/alpha/linux-unwind.h (alpha_fallback_frame_state),
+ config/bfin/linux-unwind.h (bfin_fallback_frame_state),
+ config/i386/linux-unwind.h (x86_64_fallback_frame_state,
+ x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
+ uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
+ config/pa/linux-unwind.h (pa32_fallback_frame_state),
+ config/sh/linux-unwind.h (sh_fallback_frame_state),
+ config/tilepro/linux-unwind.h (tile_fallback_frame_state),
+ config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
+ ucontext_t instead of struct ucontext.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@249958 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libgcc/config/aarch64/linux-unwind.h | 2 +-
+ libgcc/config/alpha/linux-unwind.h | 2 +-
+ libgcc/config/bfin/linux-unwind.h | 2 +-
+ libgcc/config/i386/linux-unwind.h | 4 ++--
+ libgcc/config/m68k/linux-unwind.h | 2 +-
+ libgcc/config/nios2/linux-unwind.h | 2 +-
+ libgcc/config/pa/linux-unwind.h | 2 +-
+ libgcc/config/sh/linux-unwind.h | 2 +-
+ libgcc/config/tilepro/linux-unwind.h | 2 +-
+ libgcc/config/xtensa/linux-unwind.h | 2 +-
+ 10 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
+index 86d17b1c798..909f68f7311 100644
+--- a/libgcc/config/aarch64/linux-unwind.h
++++ b/libgcc/config/aarch64/linux-unwind.h
+@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe
+ {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ };
+
+ struct rt_sigframe *rt_;
+diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
+index d65474fec12..9a226b195b5 100644
+--- a/libgcc/config/alpha/linux-unwind.h
++++ b/libgcc/config/alpha/linux-unwind.h
+@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ sc = &rt_->uc.uc_mcontext;
+ }
+diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
+index 0c270e435c7..7fa95d2dc96 100644
+--- a/libgcc/config/bfin/linux-unwind.h
++++ b/libgcc/config/bfin/linux-unwind.h
+@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
+ void *puc;
+ char retcode[8];
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+
+ /* The void * cast is necessary to avoid an aliasing warning.
+diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
+index e54bf73b1fd..d35fc4566ce 100644
+--- a/libgcc/config/i386/linux-unwind.h
++++ b/libgcc/config/i386/linux-unwind.h
+@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
+ if (*(unsigned char *)(pc+0) == 0x48
+ && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+ {
+- struct ucontext *uc_ = context->cfa;
++ ucontext_t *uc_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+ because it does not alias anything. */
+@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
+ siginfo_t *pinfo;
+ void *puc;
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
+index fb79a4d63cd..b2f5ea4cd7c 100644
+--- a/libgcc/config/m68k/linux-unwind.h
++++ b/libgcc/config/m68k/linux-unwind.h
+@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ /* <sys/ucontext.h> is unfortunately broken right now. */
+ struct uw_ucontext {
+ unsigned long uc_flags;
+- struct ucontext *uc_link;
++ ucontext_t *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ unsigned long uc_filler[80];
+diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h
+index dff1c20076e..1d88afecb12 100644
+--- a/libgcc/config/nios2/linux-unwind.h
++++ b/libgcc/config/nios2/linux-unwind.h
+@@ -38,7 +38,7 @@ struct nios2_mcontext {
+
+ struct nios2_ucontext {
+ unsigned long uc_flags;
+- struct ucontext *uc_link;
++ ucontext_t *uc_link;
+ stack_t uc_stack;
+ struct nios2_mcontext uc_mcontext;
+ sigset_t uc_sigmask; /* mask last for extensibility */
+diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
+index 01494685ea4..91575356803 100644
+--- a/libgcc/config/pa/linux-unwind.h
++++ b/libgcc/config/pa/linux-unwind.h
+@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
+ struct sigcontext *sc;
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *frame;
+
+ /* rt_sigreturn trampoline:
+diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
+index e63091f287c..67033f06b4b 100644
+--- a/libgcc/config/sh/linux-unwind.h
++++ b/libgcc/config/sh/linux-unwind.h
+@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
+index fd83ba7c275..e3c9ef0840d 100644
+--- a/libgcc/config/tilepro/linux-unwind.h
++++ b/libgcc/config/tilepro/linux-unwind.h
+@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe {
+ unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_;
+
+ /* Return if this is not a signal handler. */
+diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
+index 9daf738ff57..ff6b66373a9 100644
+--- a/libgcc/config/xtensa/linux-unwind.h
++++ b/libgcc/config/xtensa/linux-unwind.h
+@@ -64,7 +64,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
+
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_;
+
+ /* movi a2, __NR_rt_sigreturn; syscall */
+--
+2.14.1
+
diff --git a/packages/gcc/5.4.0/version.desc b/packages/gcc/5.4.0/version.desc
index e69de29..d44e333 100644
--- a/packages/gcc/5.4.0/version.desc
+++ b/packages/gcc/5.4.0/version.desc
@@ -0,0 +1 @@
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/gcc/6.4.0/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch b/packages/gcc/6.4.0/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
new file mode 100644
index 0000000..17a77d0
--- /dev/null
+++ b/packages/gcc/6.4.0/0001-Use-ucontext_t-not-struct-ucontext-in-linux-unwind.h.patch
@@ -0,0 +1,188 @@
+From d1f626c8f3c2c2c3aca3a67d4b66641d2d911dfa Mon Sep 17 00:00:00 2001
+From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 4 Jul 2017 10:23:57 +0000
+Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
+
+Current glibc no longer gives the ucontext_t type the tag struct
+ucontext, to conform with POSIX namespace rules. This requires
+various linux-unwind.h files in libgcc, that were previously using
+struct ucontext, to be fixed to use ucontext_t instead. This is
+similar to the removal of the struct siginfo tag from siginfo_t some
+years ago.
+
+This patch changes those files to use ucontext_t instead. As the
+standard name that should be unconditionally safe, so this is not
+restricted to architectures supported by glibc, or conditioned on the
+glibc version.
+
+Tested compilation together with current glibc with glibc's
+build-many-glibcs.py.
+
+ * config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
+ config/alpha/linux-unwind.h (alpha_fallback_frame_state),
+ config/bfin/linux-unwind.h (bfin_fallback_frame_state),
+ config/i386/linux-unwind.h (x86_64_fallback_frame_state,
+ x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
+ uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
+ config/pa/linux-unwind.h (pa32_fallback_frame_state),
+ config/sh/linux-unwind.h (sh_fallback_frame_state),
+ config/tilepro/linux-unwind.h (tile_fallback_frame_state),
+ config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
+ ucontext_t instead of struct ucontext.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libgcc/config/aarch64/linux-unwind.h | 2 +-
+ libgcc/config/alpha/linux-unwind.h | 2 +-
+ libgcc/config/bfin/linux-unwind.h | 2 +-
+ libgcc/config/i386/linux-unwind.h | 4 ++--
+ libgcc/config/m68k/linux-unwind.h | 2 +-
+ libgcc/config/nios2/linux-unwind.h | 2 +-
+ libgcc/config/pa/linux-unwind.h | 2 +-
+ libgcc/config/sh/linux-unwind.h | 2 +-
+ libgcc/config/tilepro/linux-unwind.h | 2 +-
+ libgcc/config/xtensa/linux-unwind.h | 2 +-
+ 10 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
+index 4512efbdcc8..06de45aa7ab 100644
+--- a/libgcc/config/aarch64/linux-unwind.h
++++ b/libgcc/config/aarch64/linux-unwind.h
+@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe
+ {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ };
+
+ struct rt_sigframe *rt_;
+diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
+index bdbba4a3c5d..e84812e33fd 100644
+--- a/libgcc/config/alpha/linux-unwind.h
++++ b/libgcc/config/alpha/linux-unwind.h
+@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ sc = &rt_->uc.uc_mcontext;
+ }
+diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
+index 77b7c23c708..8bf5e82c55e 100644
+--- a/libgcc/config/bfin/linux-unwind.h
++++ b/libgcc/config/bfin/linux-unwind.h
+@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
+ void *puc;
+ char retcode[8];
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+
+ /* The void * cast is necessary to avoid an aliasing warning.
+diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
+index 540a0a25aca..29efbe31d61 100644
+--- a/libgcc/config/i386/linux-unwind.h
++++ b/libgcc/config/i386/linux-unwind.h
+@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
+ if (*(unsigned char *)(pc+0) == 0x48
+ && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+ {
+- struct ucontext *uc_ = context->cfa;
++ ucontext_t *uc_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+ because it does not alias anything. */
+@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
+ siginfo_t *pinfo;
+ void *puc;
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
+index 75b7cf723a0..f964e24c4ee 100644
+--- a/libgcc/config/m68k/linux-unwind.h
++++ b/libgcc/config/m68k/linux-unwind.h
+@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ /* <sys/ucontext.h> is unfortunately broken right now. */
+ struct uw_ucontext {
+ unsigned long uc_flags;
+- struct ucontext *uc_link;
++ ucontext_t *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ unsigned long uc_filler[80];
+diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h
+index 23041420525..30f25ea379e 100644
+--- a/libgcc/config/nios2/linux-unwind.h
++++ b/libgcc/config/nios2/linux-unwind.h
+@@ -38,7 +38,7 @@ struct nios2_mcontext {
+
+ struct nios2_ucontext {
+ unsigned long uc_flags;
+- struct ucontext *uc_link;
++ ucontext_t *uc_link;
+ stack_t uc_stack;
+ struct nios2_mcontext uc_mcontext;
+ sigset_t uc_sigmask; /* mask last for extensibility */
+diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
+index 9a2657f295d..e47493dde91 100644
+--- a/libgcc/config/pa/linux-unwind.h
++++ b/libgcc/config/pa/linux-unwind.h
+@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
+ struct sigcontext *sc;
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *frame;
+
+ /* rt_sigreturn trampoline:
+diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
+index e389cacaab8..0bf43ba21c2 100644
+--- a/libgcc/config/sh/linux-unwind.h
++++ b/libgcc/config/sh/linux-unwind.h
+@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
+ {
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
+index 796e97620b8..75f8890ce07 100644
+--- a/libgcc/config/tilepro/linux-unwind.h
++++ b/libgcc/config/tilepro/linux-unwind.h
+@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
+ struct rt_sigframe {
+ unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_;
+
+ /* Return if this is not a signal handler. */
+diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
+index 9872492acc2..586a9d49e9c 100644
+--- a/libgcc/config/xtensa/linux-unwind.h
++++ b/libgcc/config/xtensa/linux-unwind.h
+@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
+
+ struct rt_sigframe {
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_;
+
+ /* movi a2, __NR_rt_sigreturn; syscall */
+--
+2.14.1
+
diff --git a/packages/gcc/7.1.0/111-alpha-bad-eh_frame.patch b/packages/gcc/7.1.0/111-alpha-bad-eh_frame.patch
deleted file mode 100644
index 93f6e94..0000000
--- a/packages/gcc/7.1.0/111-alpha-bad-eh_frame.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80037
-
-diff --git a/libgcc/config/alpha/t-alpha b/libgcc/config/alpha/t-alpha
-index 0b6ffb1..0c2f840 100644
---- a/libgcc/config/alpha/t-alpha
-+++ b/libgcc/config/alpha/t-alpha
-@@ -1,2 +1,6 @@
- # This is a support routine for longlong.h, used by libgcc2.c.
- LIB2ADD += $(srcdir)/config/alpha/qrnnd.S
-+
-+# When GAS-generated unwind tables are created, they get created
-+# after the __FRAME_END__ terminator, which causes an ld error.
-+CRTSTUFF_T_CFLAGS = -fno-unwind-tables
diff --git a/packages/gcc/7.1.0/870-gcc-xtensa-fix-fprintf-format-specifiers.patch b/packages/gcc/7.1.0/870-gcc-xtensa-fix-fprintf-format-specifiers.patch
deleted file mode 100644
index cf21584..0000000
--- a/packages/gcc/7.1.0/870-gcc-xtensa-fix-fprintf-format-specifiers.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 06689e5973647f5c65d1984b164f2531f5418d7a Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Sun, 28 May 2017 19:56:56 -0700
-Subject: [PATCH] gcc: xtensa: fix fprintf format specifiers
-
-HOST_WIDE_INT may not be long as assumed in print_operand and
-xtensa_emit_call. Use HOST_WIDE_INT_PRINT_DEC/HOST_WIDE_INT_PRINT_HEX
-format strings instead of %ld/0x%lx. This fixes incorrect assembly code
-generation by the compiler running on armhf host.
-
-2017-05-28 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/xtensa.c (xtensa_emit_call): Use
- HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
- (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
- format string.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gcc/config/xtensa/xtensa.c | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
-index 0181dde..25e4a28 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -1780,7 +1780,8 @@ xtensa_emit_call (int callop, rtx *operands)
- rtx tgt = operands[callop];
-
- if (GET_CODE (tgt) == CONST_INT)
-- sprintf (result, "call%d\t0x%lx", WINDOW_SIZE, INTVAL (tgt));
-+ sprintf (result, "call%d\t" HOST_WIDE_INT_PRINT_HEX,
-+ WINDOW_SIZE, INTVAL (tgt));
- else if (register_operand (tgt, VOIDmode))
- sprintf (result, "callx%d\t%%%d", WINDOW_SIZE, callop);
- else
-@@ -2351,14 +2352,14 @@ print_operand (FILE *file, rtx x, int letter)
-
- case 'L':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", (32 - INTVAL (x)) & 0x1f);
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, (32 - INTVAL (x)) & 0x1f);
- else
- output_operand_lossage ("invalid %%L value");
- break;
-
- case 'R':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x) & 0x1f);
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) & 0x1f);
- else
- output_operand_lossage ("invalid %%R value");
- break;
-@@ -2372,7 +2373,7 @@ print_operand (FILE *file, rtx x, int letter)
-
- case 'd':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x));
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
- else
- output_operand_lossage ("invalid %%d value");
- break;
-@@ -2437,7 +2438,7 @@ print_operand (FILE *file, rtx x, int letter)
- else if (GET_CODE (x) == MEM)
- output_address (GET_MODE (x), XEXP (x, 0));
- else if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x));
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
- else
- output_addr_const (file, x);
- }
---
-2.1.4
-
diff --git a/packages/gcc/7.1.0/100-uclibc-conf.patch b/packages/gcc/7.2.0/100-uclibc-conf.patch
index 73d1f0d..73d1f0d 100644
--- a/packages/gcc/7.1.0/100-uclibc-conf.patch
+++ b/packages/gcc/7.2.0/100-uclibc-conf.patch
diff --git a/packages/gcc/7.1.0/1000-libtool-leave-framework-alone.patch b/packages/gcc/7.2.0/1000-libtool-leave-framework-alone.patch
index bce09eb..bce09eb 100644
--- a/packages/gcc/7.1.0/1000-libtool-leave-framework-alone.patch
+++ b/packages/gcc/7.2.0/1000-libtool-leave-framework-alone.patch
diff --git a/packages/gcc/7.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/packages/gcc/7.2.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
index d8986d5..d8986d5 100644
--- a/packages/gcc/7.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ b/packages/gcc/7.2.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
diff --git a/packages/gcc/7.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch b/packages/gcc/7.2.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
index 12ef48e..12ef48e 100644
--- a/packages/gcc/7.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
+++ b/packages/gcc/7.2.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
diff --git a/packages/gcc/7.1.0/810-arm-softfloat-libgcc.patch b/packages/gcc/7.2.0/810-arm-softfloat-libgcc.patch
index 5efa7fd..5efa7fd 100644
--- a/packages/gcc/7.1.0/810-arm-softfloat-libgcc.patch
+++ b/packages/gcc/7.2.0/810-arm-softfloat-libgcc.patch
diff --git a/packages/gcc/7.1.0/860-cilk-wchar.patch b/packages/gcc/7.2.0/860-cilk-wchar.patch
index 1d9916f..1d9916f 100644
--- a/packages/gcc/7.1.0/860-cilk-wchar.patch
+++ b/packages/gcc/7.2.0/860-cilk-wchar.patch
diff --git a/packages/gcc/7.1.0/891-fix-m68k-uclinux.patch b/packages/gcc/7.2.0/891-fix-m68k-uclinux.patch
index 4e186bd..4e186bd 100644
--- a/packages/gcc/7.1.0/891-fix-m68k-uclinux.patch
+++ b/packages/gcc/7.2.0/891-fix-m68k-uclinux.patch
diff --git a/packages/gcc/7.1.0/900-libgfortran-missing-include.patch b/packages/gcc/7.2.0/900-libgfortran-missing-include.patch
index 1f47469..1f47469 100644
--- a/packages/gcc/7.1.0/900-libgfortran-missing-include.patch
+++ b/packages/gcc/7.2.0/900-libgfortran-missing-include.patch
diff --git a/packages/gcc/7.1.0/910-nios2-bad-multilib-default.patch b/packages/gcc/7.2.0/910-nios2-bad-multilib-default.patch
index 61989e5..61989e5 100644
--- a/packages/gcc/7.1.0/910-nios2-bad-multilib-default.patch
+++ b/packages/gcc/7.2.0/910-nios2-bad-multilib-default.patch
diff --git a/packages/gcc/7.1.0/930-libgcc-disable-split-stack-nothreads.patch b/packages/gcc/7.2.0/930-libgcc-disable-split-stack-nothreads.patch
index 07f9a73..07f9a73 100644
--- a/packages/gcc/7.1.0/930-libgcc-disable-split-stack-nothreads.patch
+++ b/packages/gcc/7.2.0/930-libgcc-disable-split-stack-nothreads.patch
diff --git a/packages/gcc/7.1.0/951-bionic-ndk.patch b/packages/gcc/7.2.0/951-bionic-ndk.patch
index 59c50a8..59c50a8 100644
--- a/packages/gcc/7.1.0/951-bionic-ndk.patch
+++ b/packages/gcc/7.2.0/951-bionic-ndk.patch
diff --git a/packages/gcc/7.1.0/952-bionic-errno.patch b/packages/gcc/7.2.0/952-bionic-errno.patch
index 91f6ca3..91f6ca3 100644
--- a/packages/gcc/7.1.0/952-bionic-errno.patch
+++ b/packages/gcc/7.2.0/952-bionic-errno.patch
diff --git a/packages/gcc/7.1.0/970-crystax.patch b/packages/gcc/7.2.0/970-crystax.patch
index 7324d7f..7324d7f 100644
--- a/packages/gcc/7.1.0/970-crystax.patch
+++ b/packages/gcc/7.2.0/970-crystax.patch
diff --git a/packages/gcc/7.1.0/971-crystax.patch b/packages/gcc/7.2.0/971-crystax.patch
index 748a381..748a381 100644
--- a/packages/gcc/7.1.0/971-crystax.patch
+++ b/packages/gcc/7.2.0/971-crystax.patch
diff --git a/packages/gcc/7.1.0/972-crystax.patch b/packages/gcc/7.2.0/972-crystax.patch
index b9077be..b9077be 100644
--- a/packages/gcc/7.1.0/972-crystax.patch
+++ b/packages/gcc/7.2.0/972-crystax.patch
diff --git a/packages/gcc/7.1.0/973-crystax.patch b/packages/gcc/7.2.0/973-crystax.patch
index b96ece3..b96ece3 100644
--- a/packages/gcc/7.1.0/973-crystax.patch
+++ b/packages/gcc/7.2.0/973-crystax.patch
diff --git a/packages/gcc/7.1.0/974-crystax.patch b/packages/gcc/7.2.0/974-crystax.patch
index 9db4f54..9db4f54 100644
--- a/packages/gcc/7.1.0/974-crystax.patch
+++ b/packages/gcc/7.2.0/974-crystax.patch
diff --git a/packages/gcc/7.1.0/975-crystax.patch b/packages/gcc/7.2.0/975-crystax.patch
index 9efc2a4..9efc2a4 100644
--- a/packages/gcc/7.1.0/975-crystax.patch
+++ b/packages/gcc/7.2.0/975-crystax.patch
diff --git a/packages/gcc/7.1.0/976-crystax.patch b/packages/gcc/7.2.0/976-crystax.patch
index 790d4a9..790d4a9 100644
--- a/packages/gcc/7.1.0/976-crystax.patch
+++ b/packages/gcc/7.2.0/976-crystax.patch
diff --git a/packages/gcc/7.1.0/977-crystax.patch b/packages/gcc/7.2.0/977-crystax.patch
index 0211d72..0211d72 100644
--- a/packages/gcc/7.1.0/977-crystax.patch
+++ b/packages/gcc/7.2.0/977-crystax.patch
diff --git a/packages/linux/4.9.30/version.desc b/packages/gcc/7.2.0/version.desc
index e69de29..e69de29 100644
--- a/packages/linux/4.9.30/version.desc
+++ b/packages/gcc/7.2.0/version.desc
diff --git a/packages/gcc/package.desc b/packages/gcc/package.desc
index dc49186..0bfc71b 100644
--- a/packages/gcc/package.desc
+++ b/packages/gcc/package.desc
@@ -2,3 +2,4 @@ repository='svn svn://gcc.gnu.org/svn/gcc'
mirrors='$(CT_Mirrors GNU gcc/gcc-${CT_GCC_VERSION}) $(CT_Mirrors sourceware gcc/releases/gcc-${CT_GCC_VERSION})'
origin='GNU'
milestones='4.8 4.9 4.9.2 5 6 7'
+archive_formats='.tar.xz .tar.gz'
diff --git a/packages/gdb-linaro/7.3-2011.12/version.desc b/packages/gdb-linaro/7.3-2011.12/version.desc
index fcfe389..a114052 100644
--- a/packages/gdb-linaro/7.3-2011.12/version.desc
+++ b/packages/gdb-linaro/7.3-2011.12/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/gdb-linaro/7.4-2012.06/version.desc b/packages/gdb-linaro/7.4-2012.06/version.desc
index fcfe389..a114052 100644
--- a/packages/gdb-linaro/7.4-2012.06/version.desc
+++ b/packages/gdb-linaro/7.4-2012.06/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/gdb-linaro/7.5-2012.12/version.desc b/packages/gdb-linaro/7.5-2012.12/version.desc
index fcfe389..a114052 100644
--- a/packages/gdb-linaro/7.5-2012.12/version.desc
+++ b/packages/gdb-linaro/7.5-2012.12/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/gdb-linaro/7.6.1-2013.10/version.desc b/packages/gdb-linaro/7.6.1-2013.10/version.desc
index fcfe389..a114052 100644
--- a/packages/gdb-linaro/7.6.1-2013.10/version.desc
+++ b/packages/gdb-linaro/7.6.1-2013.10/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/gdb-linaro/7.7-2014.05/version.desc b/packages/gdb-linaro/7.7-2014.05/version.desc
index fcfe389..a114052 100644
--- a/packages/gdb-linaro/7.7-2014.05/version.desc
+++ b/packages/gdb-linaro/7.7-2014.05/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/gdb-linaro/7.7.1-2014.06-1/version.desc b/packages/gdb-linaro/7.7.1-2014.06-1/version.desc
index fcfe389..a114052 100644
--- a/packages/gdb-linaro/7.7.1-2014.06-1/version.desc
+++ b/packages/gdb-linaro/7.7.1-2014.06-1/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/gdb-linaro/package.desc b/packages/gdb-linaro/package.desc
index f5ed8fa..bc11a17 100644
--- a/packages/gdb-linaro/package.desc
+++ b/packages/gdb-linaro/package.desc
@@ -3,3 +3,4 @@ repository='git https://git.linaro.org/toolchain/binutils-gdb.git'
mirrors='$(CT_Mirrors Linaro gdb ${CT_GDB_LINARO_VERSION})'
origin='Linaro'
experimental='yes'
+archive_formats='.tar.xz'
diff --git a/packages/gdb/6.8a/version.desc b/packages/gdb/6.8a/version.desc
index fcfe389..f3953c8 100644
--- a/packages/gdb/6.8a/version.desc
+++ b/packages/gdb/6.8a/version.desc
@@ -1 +1,3 @@
obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
+archive_dirname='gdb-6.8'
diff --git a/packages/gdb/7.0.1a/version.desc b/packages/gdb/7.0.1a/version.desc
index fcfe389..f98f67c 100644
--- a/packages/gdb/7.0.1a/version.desc
+++ b/packages/gdb/7.0.1a/version.desc
@@ -1 +1,3 @@
obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
+archive_dirname='gdb-7.0.1'
diff --git a/packages/gdb/7.0a/version.desc b/packages/gdb/7.0a/version.desc
index fcfe389..10d8a67 100644
--- a/packages/gdb/7.0a/version.desc
+++ b/packages/gdb/7.0a/version.desc
@@ -1 +1,3 @@
obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
+archive_dirname='gdb-7.0'
diff --git a/packages/gdb/7.10/10-setns-handling.patch b/packages/gdb/7.10/10-setns-handling.patch
deleted file mode 100644
index e2647ad..0000000
--- a/packages/gdb/7.10/10-setns-handling.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 99fe86f7999afd2743b08c550b10f083ae4bd9bd Mon Sep 17 00:00:00 2001
-From: Peter Bergner <bergner@vnet.ibm.com>
-Date: Tue, 14 Jul 2015 10:46:16 -0500
-Subject: [PATCH] Fix build issue with nat/linux-namespaces.c.
-
- * nat/linux-namespaces.c (setns): Rename from this ...
- (do_setns): ... to this. Support calling setns if it exists.
- (mnsh_handle_setns): Call do_setns.
----
- gdb/ChangeLog | 6 ++++++
- gdb/nat/linux-namespaces.c | 12 ++++++------
- 2 files changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/gdb/nat/linux-namespaces.c b/gdb/nat/linux-namespaces.c
-index a7a3e4d..fd0d4b0 100644
---- a/gdb/nat/linux-namespaces.c
-+++ b/gdb/nat/linux-namespaces.c
-@@ -34,18 +34,18 @@ int debug_linux_namespaces;
-
- /* Handle systems without setns. */
-
--#ifndef HAVE_SETNS
--static int
--setns (int fd, int nstype)
-+static inline int
-+do_setns (int fd, int nstype)
- {
--#ifdef __NR_setns
-+#ifdef HAVE_SETNS
-+ return setns (fd, nstype);
-+#elif defined __NR_setns
- return syscall (__NR_setns, fd, nstype);
- #else
- errno = ENOSYS;
- return -1;
- #endif
- }
--#endif
-
- /* Handle systems without MSG_CMSG_CLOEXEC. */
-
-@@ -495,7 +495,7 @@ mnsh_recv_message (int sock, enum mnsh_msg_type *type,
- static ssize_t
- mnsh_handle_setns (int sock, int fd, int nstype)
- {
-- int result = setns (fd, nstype);
-+ int result = do_setns (fd, nstype);
-
- return mnsh_return_int (sock, result, errno);
- }
---
-1.9.4
diff --git a/packages/gdb/7.10/100-musl_fix.patch b/packages/gdb/7.10/100-musl_fix.patch
deleted file mode 100644
index c0c1e0a..0000000
--- a/packages/gdb/7.10/100-musl_fix.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- a/gdb/linux-nat.c
-+++ b/gdb/linux-nat.c
-@@ -17,6 +17,7 @@
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-+#include "stopcode.h"
- #include "defs.h"
- #include "inferior.h"
- #include "infrun.h"
-@@ -73,6 +74,10 @@
- #define SPUFS_MAGIC 0x23c9b64e
- #endif
-
-+#ifndef __SIGRTMIN
-+#define __SIGRTMIN SIGRTMIN
-+#endif
-+
- /* This comment documents high-level logic of this file.
-
- Waiting for events in sync mode
---- /dev/null
-+++ b/gdb/stopcode.h
-@@ -0,0 +1,4 @@
-+#ifndef W_STOPCODE
-+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
-+#endif
-+
diff --git a/packages/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch b/packages/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch
deleted file mode 100644
index 1182a45..0000000
--- a/packages/gdb/7.10/110-xtensa-initialize-call_abi-in-xtensa_tdep.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 7f8c0d8984bf5754807d3bb543cbc3ffc634e9e4 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Sat, 30 May 2015 13:00:32 +0300
-Subject: [PATCH] xtensa: initialize call_abi in xtensa_tdep
-
-Use XSHAL_ABI value provided by xtensa-config.h to correctly initialize
-xtensa_tdep.call_abi
-This fixes calls to functions from GDB that otherwise fail with the
-following assertion in call0 configuration:
-
- gdb/regcache.c:602: internal-error: regcache_raw_read: Assertion
- `regnum >= 0 && regnum < regcache->descr->nr_raw_registers' failed.
-
-gdb/
- * xtensa-tdep.h (XTENSA_GDBARCH_TDEP_INSTANTIATE): Initialize
- call_abi using XSHAL_ABI macro.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gdb/xtensa-tdep.h | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/gdb/xtensa-tdep.h b/gdb/xtensa-tdep.h
-index adacaf8..3b6ea66 100644
---- a/gdb/xtensa-tdep.h
-+++ b/gdb/xtensa-tdep.h
-@@ -246,7 +246,8 @@ struct gdbarch_tdep
- .spill_location = -1, \
- .spill_size = (spillsz), \
- .unused = 0, \
-- .call_abi = 0, \
-+ .call_abi = (XSHAL_ABI == XTHAL_ABI_CALL0) ? \
-+ CallAbiCall0Only : CallAbiDefault, \
- .debug_interrupt_level = XCHAL_DEBUGLEVEL, \
- .icache_line_bytes = XCHAL_ICACHE_LINESIZE, \
- .dcache_line_bytes = XCHAL_DCACHE_LINESIZE, \
---
-1.8.1.4
-
diff --git a/packages/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch b/packages/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch
deleted file mode 100644
index 982bd7f..0000000
--- a/packages/gdb/7.10/111-xtensa-make-sure-ar_base-is-initialized.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 208ea73d38c9c16cf983b6419f58050dbadcb6a9 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Sun, 7 Jun 2015 22:43:49 +0300
-Subject: [PATCH 2/2] xtensa: make sure ar_base is initialized
-
-ar_base is uninitialized for cores w/o windowed registers as their
-regmap doesn't have register 0x0100.
-Check that ar_base is initialized and if not initialize it with a0_base.
-
-gdb/
- * xtensa-tdep.c (xtensa_derive_tdep): Make sure ar_base is
- initialized.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gdb/xtensa-tdep.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
-index 55e7d98..41f5ec1 100644
---- a/gdb/xtensa-tdep.c
-+++ b/gdb/xtensa-tdep.c
-@@ -3175,6 +3175,9 @@ xtensa_derive_tdep (struct gdbarch_tdep *tdep)
- tdep->num_regs = n;
- }
-
-+ if (tdep->ar_base == -1)
-+ tdep->ar_base = tdep->a0_base;
-+
- /* Number of pseudo registers. */
- tdep->num_pseudo_regs = n - tdep->num_regs;
-
---
-1.8.1.4
-
diff --git a/packages/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch b/packages/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch
deleted file mode 100644
index 506a57c..0000000
--- a/packages/gdb/7.10/112-WIP-end-of-prologue-detection-hack.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 7f8eacbb468575fb67db7fd1155a3aedaa91911b Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Sun, 7 Jun 2015 23:15:39 +0300
-Subject: [PATCH] WIP: *end of prologue* detection hack
-
-see
- http://www.esp8266.com/viewtopic.php?p=18461#p18461
- http://www.esp8266.com/viewtopic.php?p=19026#p19026
- http://www.esp8266.com/viewtopic.php?p=19683#p19683
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gdb/xtensa-tdep.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
-index 41f5ec1..6a7dba7 100644
---- a/gdb/xtensa-tdep.c
-+++ b/gdb/xtensa-tdep.c
-@@ -2410,7 +2410,7 @@ call0_analyze_prologue (struct gdbarch *gdbarch,
- /* Find out, if we have an information about the prologue from DWARF. */
- prologue_sal = find_pc_line (start, 0);
- if (prologue_sal.line != 0) /* Found debug info. */
-- body_pc = prologue_sal.end;
-+ body_pc = prologue_sal.end + 40;
-
- /* If we are going to analyze the prologue in general without knowing about
- the current PC, make the best assumtion for the end of the prologue. */
---
-1.8.1.4
-
diff --git a/packages/gdb/7.10/version.desc b/packages/gdb/7.10/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/gdb/7.10/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/gdb/7.1a/version.desc b/packages/gdb/7.1a/version.desc
index fcfe389..009fd5d 100644
--- a/packages/gdb/7.1a/version.desc
+++ b/packages/gdb/7.1a/version.desc
@@ -1 +1,3 @@
obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
+archive_dirname='gdb-7.1'
diff --git a/packages/gdb/7.2a/version.desc b/packages/gdb/7.2a/version.desc
index fcfe389..094d937 100644
--- a/packages/gdb/7.2a/version.desc
+++ b/packages/gdb/7.2a/version.desc
@@ -1 +1,3 @@
obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
+archive_dirname='gdb-7.2'
diff --git a/packages/gdb/7.3.1/version.desc b/packages/gdb/7.3.1/version.desc
index fcfe389..f26b5a2 100644
--- a/packages/gdb/7.3.1/version.desc
+++ b/packages/gdb/7.3.1/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/gdb/7.3a/version.desc b/packages/gdb/7.3a/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/gdb/7.3a/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/gdb/7.4.1/version.desc b/packages/gdb/7.4.1/version.desc
index fcfe389..f26b5a2 100644
--- a/packages/gdb/7.4.1/version.desc
+++ b/packages/gdb/7.4.1/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/gdb/7.4/version.desc b/packages/gdb/7.4/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/gdb/7.4/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/gdb/7.5.1/version.desc b/packages/gdb/7.5.1/version.desc
index fcfe389..f26b5a2 100644
--- a/packages/gdb/7.5.1/version.desc
+++ b/packages/gdb/7.5.1/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/gdb/7.6.1/version.desc b/packages/gdb/7.6.1/version.desc
index fcfe389..f26b5a2 100644
--- a/packages/gdb/7.6.1/version.desc
+++ b/packages/gdb/7.6.1/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/gdb/7.7.1/version.desc b/packages/gdb/7.7.1/version.desc
index fcfe389..f26b5a2 100644
--- a/packages/gdb/7.7.1/version.desc
+++ b/packages/gdb/7.7.1/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/gdb/7.7/version.desc b/packages/gdb/7.7/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/gdb/7.7/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/gdb/7.8/version.desc b/packages/gdb/7.8/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/gdb/7.8/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/gdb/7.9/version.desc b/packages/gdb/7.9/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/gdb/7.9/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/gdb/package.desc b/packages/gdb/package.desc
index e6120f2..0ca1dc6 100644
--- a/packages/gdb/package.desc
+++ b/packages/gdb/package.desc
@@ -2,3 +2,4 @@ origin='GNU'
repository='git git://sourceware.org/git/binutils-gdb.git'
mirrors='$(CT_Mirrors GNU gdb) $(CT_Mirrors sourceware gdb/releases)'
milestones='7.0 7.2 8.0'
+archive_formats='.tar.xz .tar.gz'
diff --git a/packages/gettext/package.desc b/packages/gettext/package.desc
index 065e790..ad23b16 100644
--- a/packages/gettext/package.desc
+++ b/packages/gettext/package.desc
@@ -3,3 +3,4 @@ repository='git https://git.savannah.gnu.org/git/gettext.git'
# a separate package and depend on it in case of devel builds?
bootstrap='./autogen.sh'
mirrors='$(CT_Mirrors GNU gettext)'
+archive_formats='.tar.xz .tar.lz .tar.gz'
diff --git a/packages/glibc-linaro/package.desc b/packages/glibc-linaro/package.desc
index 91195f4..7c455d4 100644
--- a/packages/glibc-linaro/package.desc
+++ b/packages/glibc-linaro/package.desc
@@ -3,3 +3,4 @@ origin='Linaro'
repository='git https://git.linaro.org/toolchain/glibc.git'
mirrors='$(CT_Mirrors Linaro glibc ${CT_GLIBC_LINARO_VERSION})'
experimental='yes'
+archive_formats='.tar.xz'
diff --git a/packages/glibc-ports/2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc-ports/2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch
index 1a632fe..259b285 100644
--- a/packages/glibc-ports/2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch
+++ b/packages/glibc-ports/2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch
@@ -20,8 +20,8 @@ Tested that this fixes the build for ARM.
sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++-
sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++-
3 files changed, 11 insertions(+), 2 deletions(-)
---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
+--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
@@ -23,7 +23,8 @@
#include <pthreadP.h>
@@ -35,8 +35,8 @@ Tested that this fixes the build for ARM.
static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c
index bff3e2b..1f1eb71 100644
---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
+--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
@@ -21,7 +21,8 @@
#include <stdio.h>
#include <unwind.h>
@@ -47,8 +47,8 @@ index bff3e2b..1f1eb71 100644
static _Unwind_Reason_Code (*libgcc_s_personality)
(int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
struct _Unwind_Context *);
---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
+--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
@@ -23,7 +23,8 @@
#include <pthreadP.h>
@@ -59,8 +59,8 @@ index bff3e2b..1f1eb71 100644
static _Unwind_Reason_Code (*libgcc_s_personality)
(_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
+--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
@@ -21,7 +21,8 @@
#include <stdio.h>
#include <unwind.h>
diff --git a/packages/glibc-ports/2.12.1/330-m68k-sys-user.patch b/packages/glibc-ports/2.12.1/330-m68k-sys-user.patch
index b441691..c3a9c67 100644
--- a/packages/glibc-ports/2.12.1/330-m68k-sys-user.patch
+++ b/packages/glibc-ports/2.12.1/330-m68k-sys-user.patch
@@ -1,8 +1,8 @@
copied from kernel as it is sanitized now
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h
+--- glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100
@@ -1,3 +1,90 @@
+#ifndef _SYS_USER_H
+#define _SYS_USER_H
@@ -94,4 +94,3 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys
/* Copyright (C) 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-diff -durN glibc-2.12.1.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.12.1/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h
diff --git a/packages/glibc-ports/2.12.1/440-alpha-cache-shape.patch b/packages/glibc-ports/2.12.1/440-alpha-cache-shape.patch
index ea85e99..879f8db 100644
--- a/packages/glibc-ports/2.12.1/440-alpha-cache-shape.patch
+++ b/packages/glibc-ports/2.12.1/440-alpha-cache-shape.patch
@@ -5,9 +5,9 @@ duplication for static builds with dl-sysdep and dl-support. since dl-sysdep
is both shared/static, there is no point in hooking dl-support anymore, so we
can punt it.
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c
+--- glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100
@@ -1,2 +1,1 @@
-#include "dl-auxv.h"
#include <elf/dl-support.c>
diff --git a/packages/glibc-ports/2.12.1/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc-ports/2.12.1/460-alpha-fix-gcc-4.1-warnings.patch
index 6438267..65781b4 100644
--- a/packages/glibc-ports/2.12.1/460-alpha-fix-gcc-4.1-warnings.patch
+++ b/packages/glibc-ports/2.12.1/460-alpha-fix-gcc-4.1-warnings.patch
@@ -16,9 +16,9 @@ I cannot really think of anything better than
ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c
+--- glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100
@@ -178,13 +178,13 @@
static inline void
stb_mb(unsigned char val, unsigned long addr)
@@ -53,4 +53,3 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/io
return r;
}
-diff -durN glibc-2.12.1.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.12.1/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c
diff --git a/packages/glibc-ports/2.12.1/530-alpha-fix-rtld-fPIC.patch b/packages/glibc-ports/2.12.1/530-alpha-fix-rtld-fPIC.patch
index 621a6f3..20b2e32 100644
--- a/packages/glibc-ports/2.12.1/530-alpha-fix-rtld-fPIC.patch
+++ b/packages/glibc-ports/2.12.1/530-alpha-fix-rtld-fPIC.patch
@@ -5,9 +5,9 @@
ports/sysdeps/alpha/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/alpha/Makefile glibc-2.12.1/glibc-ports-2.12.1/sysdeps/alpha/Makefile
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/alpha/Makefile glibc-ports-2.12.1/sysdeps/alpha/Makefile
+--- glibc-ports-2.12.1.orig/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100
@@ -35,7 +35,8 @@
ifeq ($(subdir),elf)
@@ -18,4 +18,3 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/alpha/Makefile glibc-2.1
endif
# Build everything with full IEEE math support, and with dynamic rounding;
-diff -durN glibc-2.12.1.orig/ports/sysdeps/alpha/Makefile glibc-2.12.1/ports/sysdeps/alpha/Makefile
diff --git a/packages/glibc-ports/2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/packages/glibc-ports/2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
index fc42a92..7878ab4 100644
--- a/packages/glibc-ports/2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
+++ b/packages/glibc-ports/2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
@@ -1,9 +1,9 @@
http://yann.poupet.free.fr/ep93xx/
Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/bits/endian.h glibc-ports-2.12.1/sysdeps/arm/bits/endian.h
+--- glibc-ports-2.12.1.orig/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100
@@ -12,7 +12,7 @@
/* FPA floating point units are always big-endian, irrespective of the
CPU endianness. VFP floating point units use the same endianness
@@ -13,9 +13,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h glibc-
#define __FLOAT_WORD_ORDER __BYTE_ORDER
#else
#define __FLOAT_WORD_ORDER __BIG_ENDIAN
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/__longjmp.S glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S
+--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100
@@ -30,7 +30,33 @@
movs r0, r1 /* get the return value in place */
moveq r0, #1 /* can't let setjmp() return zero! */
@@ -50,9 +50,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S glib
LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
END (__longjmp)
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/bits/fenv.h glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h
+--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100
@@ -20,6 +20,45 @@
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
#endif
@@ -108,9 +108,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h glib
/* Type representing exception flags. */
typedef unsigned long int fexcept_t;
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/bits/setjmp.h glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h
+--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100
@@ -28,7 +28,11 @@
#ifndef _ASM
/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
@@ -123,9 +123,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h gl
+#endif
#endif
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/fegetround.c glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c
+--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100
@@ -18,9 +18,21 @@
02111-1307 USA. */
@@ -148,9 +148,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c gli
+
+#endif
}
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/fesetround.c glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c
+--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100
@@ -18,12 +18,28 @@
02111-1307 USA. */
@@ -180,9 +180,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c gli
}
libm_hidden_def (fesetround)
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/fpu_control.h glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h
+--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100
@@ -1,5 +1,6 @@
/* FPU control word definitions. ARM version.
- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
@@ -278,9 +278,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h gl
+#endif
+
#endif /* _FPU_CONTROL_H */
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h
+--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100
@@ -17,4 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
@@ -290,9 +290,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h
+#else
#define __JMP_BUF_SP 20
+#endif
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/setjmp.S glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S
+--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100
@@ -24,11 +24,41 @@
ENTRY (__sigsetjmp)
@@ -335,9 +335,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S glibc-2
/* Make a tail call to __sigjmp_save; it takes the same args. */
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gccframe.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gccframe.h
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/gccframe.h glibc-ports-2.12.1/sysdeps/arm/gccframe.h
+--- glibc-ports-2.12.1.orig/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100
@@ -17,6 +17,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
@@ -349,9 +349,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gccframe.h glibc-2.1
+#endif
#include <sysdeps/generic/gccframe.h>
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/gmp-mparam.h glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h
+--- glibc-ports-2.12.1.orig/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100
@@ -29,7 +29,7 @@
#if defined(__ARMEB__)
# define IEEE_DOUBLE_MIXED_ENDIAN 0
@@ -361,14 +361,3 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h glibc-2
# define IEEE_DOUBLE_MIXED_ENDIAN 0
# define IEEE_DOUBLE_BIG_ENDIAN 0
#else
-diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/bits/endian.h glibc-2.12.1/ports/sysdeps/arm/bits/endian.h
-diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.12.1/ports/sysdeps/arm/fpu/__longjmp.S
-diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.12.1/ports/sysdeps/arm/fpu/bits/fenv.h
-diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.12.1/ports/sysdeps/arm/fpu/bits/setjmp.h
-diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.12.1/ports/sysdeps/arm/fpu/fegetround.c
-diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.12.1/ports/sysdeps/arm/fpu/fesetround.c
-diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.12.1/ports/sysdeps/arm/fpu/fpu_control.h
-diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.12.1/ports/sysdeps/arm/fpu/jmpbuf-offsets.h
-diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.12.1/ports/sysdeps/arm/fpu/setjmp.S
-diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/gccframe.h glibc-2.12.1/ports/sysdeps/arm/gccframe.h
-diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.12.1/ports/sysdeps/arm/gmp-mparam.h
diff --git a/packages/glibc-ports/2.12.1/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.12.1/580-nptl-lowlevellock.patch
index c243a76..4d1a51a 100644
--- a/packages/glibc-ports/2.12.1/580-nptl-lowlevellock.patch
+++ b/packages/glibc-ports/2.12.1/580-nptl-lowlevellock.patch
@@ -9,9 +9,9 @@ In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21:
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.)
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function)
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+--- glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100
@@ -25,6 +25,7 @@
#include <atomic.h>
#include <sysdep.h>
@@ -20,4 +20,3 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
-diff -durN glibc-2.12.1.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.12.1/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
diff --git a/packages/glibc-ports/2.12.1/610-fpu-cw-mips.patch b/packages/glibc-ports/2.12.1/610-fpu-cw-mips.patch
index 7d990de..deab419 100644
--- a/packages/glibc-ports/2.12.1/610-fpu-cw-mips.patch
+++ b/packages/glibc-ports/2.12.1/610-fpu-cw-mips.patch
@@ -1,8 +1,8 @@
http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html
-diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h
---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100
+diff -durN glibc-ports-2.12.1.orig/sysdeps/mips/fpu_control.h glibc-ports-2.12.1/sysdeps/mips/fpu_control.h
+--- glibc-ports-2.12.1.orig/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.12.1/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100
@@ -86,7 +86,7 @@
#define _FPU_RC_UP 0x2
#define _FPU_RC_DOWN 0x3
@@ -12,4 +12,3 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h glibc
/* The fdlibm code requires strict IEEE double precision arithmetic,
-diff -durN glibc-2.12.1.orig/ports/sysdeps/mips/fpu_control.h glibc-2.12.1/ports/sysdeps/mips/fpu_control.h
diff --git a/packages/glibc-ports/2.12.1/650-syslog.patch b/packages/glibc-ports/2.12.1/650-syslog.patch
deleted file mode 100644
index c20cafc..0000000
--- a/packages/glibc-ports/2.12.1/650-syslog.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c
---- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200
-+++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200
-@@ -152,7 +152,7 @@
- #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID
- /* Check for invalid bits. */
- if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) {
-- syslog(INTERNALLOG,
-+ __syslog(INTERNALLOG,
- "syslog: unknown facility/priority: %x", pri);
- pri &= LOG_PRIMASK|LOG_FACMASK;
- }
diff --git a/packages/glibc-ports/2.12.1/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc-ports/2.12.1/660-debug-readlink_chk-readklinkat_chk.patch
deleted file mode 100644
index a5a7052..0000000
--- a/packages/glibc-ports/2.12.1/660-debug-readlink_chk-readklinkat_chk.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c
---- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100
-+++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200
-@@ -25,7 +25,7 @@
-
-
- ssize_t
--__readlink_chk (const char *path, void *buf, size_t len, size_t buflen)
-+__readlink_chk (const char *path, char *buf, size_t len, size_t buflen)
- {
- if (len > buflen)
- __chk_fail ();
-diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c
---- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200
-+++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200
-@@ -21,7 +21,7 @@
-
-
- ssize_t
--__readlinkat_chk (int fd, const char *path, void *buf, size_t len,
-+__readlinkat_chk (int fd, const char *path, char *buf, size_t len,
- size_t buflen)
- {
- if (len > buflen)
diff --git a/packages/glibc-ports/2.12.1/670-support-hard-float-eabi.patch b/packages/glibc-ports/2.12.1/670-support-hard-float-eabi.patch
index 3f2bc0f..af5dd39 100644
--- a/packages/glibc-ports/2.12.1/670-support-hard-float-eabi.patch
+++ b/packages/glibc-ports/2.12.1/670-support-hard-float-eabi.patch
@@ -1,6 +1,6 @@
-diff -ur glibc-2.12.1/ports/sysdeps/arm/preconfigure glibc-2.12.1-patched/ports/sysdeps/arm/preconfigure
---- glibc-2.12.1/ports/sysdeps/arm/preconfigure 2017-03-07 15:33:56.410265000 -0700
-+++ glibc-2.12.1-patched/ports/sysdeps/arm/preconfigure 2017-03-07 15:34:42.016840000 -0700
+diff -ur glibc-2.12.1/sysdeps/arm/preconfigure glibc-2.12.1-patched/sysdeps/arm/preconfigure
+--- glibc-2.12.1/sysdeps/arm/preconfigure 2017-03-07 15:33:56.410265000 -0700
++++ glibc-2.12.1-patched/sysdeps/arm/preconfigure 2017-03-07 15:34:42.016840000 -0700
@@ -2,7 +2,7 @@
arm*)
base_machine=arm
@@ -10,9 +10,9 @@ diff -ur glibc-2.12.1/ports/sysdeps/arm/preconfigure glibc-2.12.1-patched/ports/
machine=arm/eabi/$machine
;;
*)
-diff -ur glibc-2.12.1/ports/sysdeps/arm/shlib-versions glibc-2.12.1-patched/ports/sysdeps/arm/shlib-versions
---- glibc-2.12.1/ports/sysdeps/arm/shlib-versions 2017-03-07 15:33:56.439267000 -0700
-+++ glibc-2.12.1-patched/ports/sysdeps/arm/shlib-versions 2017-03-07 15:34:42.018837000 -0700
+diff -ur glibc-2.12.1/sysdeps/arm/shlib-versions glibc-2.12.1-patched/sysdeps/arm/shlib-versions
+--- glibc-2.12.1/sysdeps/arm/shlib-versions 2017-03-07 15:33:56.439267000 -0700
++++ glibc-2.12.1-patched/sysdeps/arm/shlib-versions 2017-03-07 15:34:42.018837000 -0700
@@ -1,4 +1,4 @@
-arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4
+arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4
diff --git a/packages/glibc-ports/2.12.1/version.desc b/packages/glibc-ports/2.12.1/version.desc
index e69de29..d44e333 100644
--- a/packages/glibc-ports/2.12.1/version.desc
+++ b/packages/glibc-ports/2.12.1/version.desc
@@ -0,0 +1 @@
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/glibc-ports/2.13/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc-ports/2.13/090-Fix-ARM-build-with-GCC-trunk.patch
index 1a632fe..259b285 100644
--- a/packages/glibc-ports/2.13/090-Fix-ARM-build-with-GCC-trunk.patch
+++ b/packages/glibc-ports/2.13/090-Fix-ARM-build-with-GCC-trunk.patch
@@ -20,8 +20,8 @@ Tested that this fixes the build for ARM.
sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++-
sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++-
3 files changed, 11 insertions(+), 2 deletions(-)
---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
+--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
@@ -23,7 +23,8 @@
#include <pthreadP.h>
@@ -35,8 +35,8 @@ Tested that this fixes the build for ARM.
static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c
index bff3e2b..1f1eb71 100644
---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
+--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
@@ -21,7 +21,8 @@
#include <stdio.h>
#include <unwind.h>
@@ -47,8 +47,8 @@ index bff3e2b..1f1eb71 100644
static _Unwind_Reason_Code (*libgcc_s_personality)
(int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
struct _Unwind_Context *);
---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
+--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
@@ -23,7 +23,8 @@
#include <pthreadP.h>
@@ -59,8 +59,8 @@ index bff3e2b..1f1eb71 100644
static _Unwind_Reason_Code (*libgcc_s_personality)
(_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
+--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
@@ -21,7 +21,8 @@
#include <stdio.h>
#include <unwind.h>
diff --git a/packages/glibc-ports/2.13/100-respect-env-CPPFLAGS.patch b/packages/glibc-ports/2.13/100-respect-env-CPPFLAGS.patch
deleted file mode 100644
index 3798cb2..0000000
--- a/packages/glibc-ports/2.13/100-respect-env-CPPFLAGS.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Respect environment CPPFLAGS when we run ./configure so we can inject
-random -D things without having to set CFLAGS/ASFLAGS
-
-diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig
---- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200
-+++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100
-@@ -697,6 +697,7 @@
- $(foreach lib,$(libof-$(basename $(@F))) \
- $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
- $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
-+CPPFLAGS += $(CPPFLAGS-config)
- override CFLAGS = -std=gnu99 $(gnu89-inline-CFLAGS) \
- $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
- $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
diff --git a/packages/glibc-ports/2.13/120-i386-x86_64-revert-clone-cfi.patch b/packages/glibc-ports/2.13/120-i386-x86_64-revert-clone-cfi.patch
deleted file mode 100644
index c7f6182..0000000
--- a/packages/glibc-ports/2.13/120-i386-x86_64-revert-clone-cfi.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-revert cfi additions to clone on i386/x86_64 to workaround problems in
-gcc's unwinder code. this is not a bug in glibc, it triggers problems
-elsewhere. this cfi code does not gain us a whole lot anyways.
-
-http://gcc.gnu.org/ml/gcc/2006-12/msg00293.html
-
-Index: sysdeps/unix/sysv/linux/i386/clone.S
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/i386/clone.S,v
-retrieving revision 1.27
-retrieving revision 1.26
-diff -u -p -r1.27 -r1.26
-
-diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/i386/clone.S glibc-2.13/sysdeps/unix/sysv/linux/i386/clone.S
---- glibc-2.13.orig/sysdeps/unix/sysv/linux/i386/clone.S 2006-12-04 00:12:36.000000000 +0100
-+++ glibc-2.13/sysdeps/unix/sysv/linux/i386/clone.S 2009-11-13 00:49:45.000000000 +0100
-@@ -120,9 +120,6 @@
- ret
-
- L(thread_start):
-- cfi_startproc;
-- /* Clearing frame pointer is insufficient, use CFI. */
-- cfi_undefined (eip);
- /* Note: %esi is zero. */
- movl %esi,%ebp /* terminate the stack frame */
- #ifdef RESET_PID
-@@ -155,7 +152,6 @@
- jmp L(haspid)
- .previous
- #endif
-- cfi_endproc;
-
- cfi_startproc
- PSEUDO_END (BP_SYM (__clone))
-diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/x86_64/clone.S glibc-2.13/sysdeps/unix/sysv/linux/x86_64/clone.S
---- glibc-2.13.orig/sysdeps/unix/sysv/linux/x86_64/clone.S 2006-12-04 00:12:36.000000000 +0100
-+++ glibc-2.13/sysdeps/unix/sysv/linux/x86_64/clone.S 2009-11-13 00:49:45.000000000 +0100
-@@ -89,9 +89,6 @@
- ret
-
- L(thread_start):
-- cfi_startproc;
-- /* Clearing frame pointer is insufficient, use CFI. */
-- cfi_undefined (rip);
- /* Clear the frame pointer. The ABI suggests this be done, to mark
- the outermost frame obviously. */
- xorl %ebp, %ebp
-@@ -116,7 +113,6 @@
- /* Call exit with return value from function call. */
- movq %rax, %rdi
- call HIDDEN_JUMPTARGET (_exit)
-- cfi_endproc;
-
- cfi_startproc;
- PSEUDO_END (BP_SYM (__clone))
diff --git a/packages/glibc-ports/2.13/140-disable-ldconfig.patch b/packages/glibc-ports/2.13/140-disable-ldconfig.patch
deleted file mode 100644
index 378e1df..0000000
--- a/packages/glibc-ports/2.13/140-disable-ldconfig.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-do not bother running ldconfig on DESTDIR. it wants to write the temp cache
-file outside of the chroot. doesnt matter anyways as we wont use the cache
-results (portage will rebuild cache), so running ldconfig is simply a waste
-of time.
-
-diff -durN glibc-2.13.orig/Makefile glibc-2.13/Makefile
---- glibc-2.13.orig/Makefile 2009-04-23 20:23:03.000000000 +0200
-+++ glibc-2.13/Makefile 2009-11-13 00:49:49.000000000 +0100
-@@ -116,6 +116,7 @@
- rm -f $(symbolic-link-list)
-
- install:
-+dont-bother-with-destdir:
- -test ! -x $(common-objpfx)elf/ldconfig || LC_ALL=C LANGUAGE=C \
- $(common-objpfx)elf/ldconfig $(addprefix -r ,$(install_root)) \
- $(slibdir) $(libdir)
diff --git a/packages/glibc-ports/2.13/150-queue-header-updates.patch b/packages/glibc-ports/2.13/150-queue-header-updates.patch
deleted file mode 100644
index 7cbe70e..0000000
--- a/packages/glibc-ports/2.13/150-queue-header-updates.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-grab some updates from FreeBSD
-
-http://bugs.gentoo.org/201979
-
-diff -durN glibc-2.13.orig/misc/sys/queue.h glibc-2.13/misc/sys/queue.h
-
-diff -durN glibc-2.13.orig/misc/sys/queue.h glibc-2.13/misc/sys/queue.h
---- glibc-2.13.orig/misc/sys/queue.h 2008-03-05 06:50:30.000000000 +0100
-+++ glibc-2.13/misc/sys/queue.h 2009-11-13 00:49:51.000000000 +0100
-@@ -136,6 +136,11 @@
- (var); \
- (var) = ((var)->field.le_next))
-
-+#define LIST_FOREACH_SAFE(var, head, field, tvar) \
-+ for ((var) = LIST_FIRST((head)); \
-+ (var) && ((tvar) = LIST_NEXT((var), field), 1); \
-+ (var) = (tvar))
-+
- /*
- * List access methods.
- */
-@@ -197,6 +202,16 @@
- #define SLIST_FOREACH(var, head, field) \
- for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
-
-+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \
-+ for ((var) = SLIST_FIRST((head)); \
-+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \
-+ (var) = (tvar))
-+
-+#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \
-+ for ((varp) = &SLIST_FIRST((head)); \
-+ ((var) = *(varp)) != NULL; \
-+ (varp) = &SLIST_NEXT((var), field))
-+
- /*
- * Singly-linked List access methods.
- */
-@@ -242,6 +257,12 @@
- (head)->stqh_last = &(elm)->field.stqe_next; \
- } while (/*CONSTCOND*/0)
-
-+#define STAILQ_LAST(head, type, field) \
-+ (STAILQ_EMPTY((head)) ? \
-+ NULL : \
-+ ((struct type *)(void *) \
-+ ((char *)((head)->stqh_last) - __offsetof(struct type, field))))
-+
- #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
- if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
- (head)->stqh_last = &(elm)->field.stqe_next; \
-@@ -271,6 +292,11 @@
- (var); \
- (var) = ((var)->field.stqe_next))
-
-+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \
-+ for ((var) = STAILQ_FIRST((head)); \
-+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \
-+ (var) = (tvar))
-+
- #define STAILQ_CONCAT(head1, head2) do { \
- if (!STAILQ_EMPTY((head2))) { \
- *(head1)->stqh_last = (head2)->stqh_first; \
-@@ -437,11 +463,21 @@
- (var); \
- (var) = ((var)->field.tqe_next))
-
-+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
-+ for ((var) = TAILQ_FIRST((head)); \
-+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
-+ (var) = (tvar))
-+
- #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
- for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \
- (var); \
- (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
-
-+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \
-+ for ((var) = TAILQ_LAST((head), headname); \
-+ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \
-+ (var) = (tvar))
-+
- #define TAILQ_CONCAT(head1, head2, field) do { \
- if (!TAILQ_EMPTY(head2)) { \
- *(head1)->tqh_last = (head2)->tqh_first; \
diff --git a/packages/glibc-ports/2.13/160-manual-no-perl.patch b/packages/glibc-ports/2.13/160-manual-no-perl.patch
deleted file mode 100644
index 5e2b807..0000000
--- a/packages/glibc-ports/2.13/160-manual-no-perl.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-If we're using a cvs snapshot which updates the source files, and
-perl isn't installed yet, then we can't regen the docs. Not a big
-deal, so just whine a little and continue on our merry way.
-
-http://bugs.gentoo.org/60132
-
-diff -durN glibc-2.13.orig/manual/Makefile glibc-2.13/manual/Makefile
---- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100
-+++ glibc-2.13/manual/Makefile 2009-11-13 00:49:54.000000000 +0100
-@@ -104,9 +104,14 @@
- libm-err.texi: stamp-libm-err
- stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
- $(dir)/libm-test-ulps))
-+ifneq ($(PERL),no)
- pwd=`pwd`; \
- $(PERL) $< $$pwd/.. > libm-err-tmp
- $(move-if-change) libm-err-tmp libm-err.texi
-+else
-+ echo "Unable to rebuild math docs, no perl installed"
-+ touch libm-err.texi
-+endif
- touch $@
-
- # Generate Texinfo files from the C source for the example programs.
diff --git a/packages/glibc-ports/2.13/170-localedef-fix-trampoline.patch b/packages/glibc-ports/2.13/170-localedef-fix-trampoline.patch
deleted file mode 100644
index 3cc6559..0000000
--- a/packages/glibc-ports/2.13/170-localedef-fix-trampoline.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-# DP: Description: Fix localedef segfault when run under exec-shield,
-# PaX or similar. (#231438, #198099)
-# DP: Dpatch Author: James Troup <james@nocrew.org>
-# DP: Patch Author: (probably) Jakub Jelinek <jakub@redhat.com>
-# DP: Upstream status: Unknown
-# DP: Status Details: Unknown
-# DP: Date: 2004-03-16
-diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h
---- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200
-+++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100
-@@ -203,6 +203,42 @@
- }
- }
- }
-+
-+/* GCC ATM seems to do a poor job with pointers to nested functions passed
-+ to inlined functions. Help it a little bit with this hack. */
-+#define wchead_table_iterate(tp, fn) \
-+do \
-+ { \
-+ struct wchead_table *t = (tp); \
-+ uint32_t index1; \
-+ for (index1 = 0; index1 < t->level1_size; index1++) \
-+ { \
-+ uint32_t lookup1 = t->level1[index1]; \
-+ if (lookup1 != ((uint32_t) ~0)) \
-+ { \
-+ uint32_t lookup1_shifted = lookup1 << t->q; \
-+ uint32_t index2; \
-+ for (index2 = 0; index2 < (1 << t->q); index2++) \
-+ { \
-+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \
-+ if (lookup2 != ((uint32_t) ~0)) \
-+ { \
-+ uint32_t lookup2_shifted = lookup2 << t->p; \
-+ uint32_t index3; \
-+ for (index3 = 0; index3 < (1 << t->p); index3++) \
-+ { \
-+ struct element_t *lookup3 \
-+ = t->level3[index3 + lookup2_shifted]; \
-+ if (lookup3 != NULL) \
-+ fn ((((index1 << t->q) + index2) << t->p) + index3, \
-+ lookup3); \
-+ } \
-+ } \
-+ } \
-+ } \
-+ } \
-+ } while (0)
-+
- #endif
-
- #ifndef NO_FINALIZE
diff --git a/packages/glibc-ports/2.13/180-resolv-dynamic.patch b/packages/glibc-ports/2.13/180-resolv-dynamic.patch
deleted file mode 100644
index e916bce..0000000
--- a/packages/glibc-ports/2.13/180-resolv-dynamic.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-ripped from SuSE
-
-if /etc/resolv.conf is updated, then make sure applications
-already running get the updated information.
-
-http://bugs.gentoo.org/177416
-
-diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c
---- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100
-+++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100
-@@ -22,6 +22,7 @@
- #include <arpa/nameser.h>
- #include <resolv.h>
- #include <bits/libc-lock.h>
-+#include <sys/stat.h>
-
-
- /* The following bit is copied from res_data.c (where it is #ifdef'ed
-@@ -95,6 +96,20 @@
- __res_maybe_init (res_state resp, int preinit)
- {
- if (resp->options & RES_INIT) {
-+ static time_t last_mtime, last_check;
-+ time_t now;
-+ struct stat statbuf;
-+
-+ time (&now);
-+ if (now != last_check) {
-+ last_check = now;
-+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) {
-+ last_mtime = statbuf.st_mtime;
-+ atomicinclock (lock);
-+ atomicinc (__res_initstamp);
-+ atomicincunlock (lock);
-+ }
-+ }
- if (__res_initstamp != resp->_u._ext.initstamp) {
- if (resp->nscount > 0)
- __res_iclose (resp, true);
diff --git a/packages/glibc-ports/2.13/190-localedef-mmap.patch b/packages/glibc-ports/2.13/190-localedef-mmap.patch
deleted file mode 100644
index f3914cd..0000000
--- a/packages/glibc-ports/2.13/190-localedef-mmap.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-sniped from Debian
-http://bugs.gentoo.org/289615
-
-2009-10-27 Aurelien Jarno <aurelien@aurel32.net>
-
- * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory
- used later with MMAP_FIXED | MMAP_SHARED to cope with different
- alignment restrictions.
-
-diff -durN glibc-2.13.orig/locale/programs/locarchive.c glibc-2.13/locale/programs/locarchive.c
---- glibc-2.13.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200
-+++ glibc-2.13/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100
-@@ -134,7 +134,7 @@
- size_t reserved = RESERVE_MMAP_SIZE;
- int xflags = 0;
- if (total < reserved
-- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
-+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
- -1, 0)) != MAP_FAILED))
- xflags = MAP_FIXED;
- else
-@@ -396,7 +396,7 @@
- size_t reserved = RESERVE_MMAP_SIZE;
- int xflags = 0;
- if (total < reserved
-- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
-+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
- -1, 0)) != MAP_FAILED))
- xflags = MAP_FIXED;
- else
-@@ -614,7 +614,7 @@
- int xflags = 0;
- void *p;
- if (st.st_size < reserved
-- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
-+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
- -1, 0)) != MAP_FAILED))
- xflags = MAP_FIXED;
- else
diff --git a/packages/glibc-ports/2.13/200-fadvise64_64.patch b/packages/glibc-ports/2.13/200-fadvise64_64.patch
deleted file mode 100644
index 71bca38..0000000
--- a/packages/glibc-ports/2.13/200-fadvise64_64.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-ripped from Debian
-
- sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c
---- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200
-+++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100
-@@ -35,6 +35,19 @@
- return INTERNAL_SYSCALL_ERRNO (ret, err);
- return 0;
- #else
-+# ifdef __NR_fadvise64_64
-+ INTERNAL_SYSCALL_DECL (err);
-+ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd,
-+ __LONG_LONG_PAIR ((long) (offset >> 31),
-+ (long) offset),
-+ __LONG_LONG_PAIR ((long) (len >> 31),
-+ (long) len),
-+ advise);
-+ if (INTERNAL_SYSCALL_ERROR_P (ret, err))
-+ return INTERNAL_SYSCALL_ERRNO (ret, err);
-+ return 0;
-+# else
- return ENOSYS;
-+# endif
- #endif
- }
diff --git a/packages/glibc-ports/2.13/220-section-comments.patch b/packages/glibc-ports/2.13/220-section-comments.patch
deleted file mode 100644
index d717829..0000000
--- a/packages/glibc-ports/2.13/220-section-comments.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-http://sources.redhat.com/ml/binutils/2004-04/msg00665.html
-
-fixes building on some architectures (like m68k/arm/cris/etc...) because
-it does the right thing
-
-diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h
---- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100
-+++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100
-@@ -239,12 +239,12 @@
- # define __make_section_unallocated(section_string)
- # endif
-
--/* Tacking on "\n\t#" to the section name makes gcc put it's bogus
-+/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus
- section attributes on what looks like a comment to the assembler. */
- # ifdef HAVE_SECTION_QUOTES
--# define __sec_comment "\"\n\t#\""
-+# define __sec_comment "\"\n#APP\n\t#\""
- # else
--# define __sec_comment "\n\t#"
-+# define __sec_comment "\n#APP\n\t#"
- # endif
- # define link_warning(symbol, msg) \
- __make_section_unallocated (".gnu.warning." #symbol) \
diff --git a/packages/glibc-ports/2.13/230-no-inline-gmon.patch b/packages/glibc-ports/2.13/230-no-inline-gmon.patch
deleted file mode 100644
index fa33c2b..0000000
--- a/packages/glibc-ports/2.13/230-no-inline-gmon.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-http://bugs.gentoo.org/196245
-http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html
-
-Attached is a patch to add __attribute__ ((noinline)) to
-call_gmon_start.
-
-Without this patch, the sec script that processed initfini.s removes a
-part of inlined call_gmon_start, causing undefined label errors.
-
-This patch solves the problem by forcing gcc not to inline
-call_gmon_start with __attribute__ ((noinline)).
-
-Tested by building for arm-none-lixux-gnueabi. OK to apply?
-
-Kazu Hirata
-
-2006-05-07 Kazu Hirata &lt;kazu@codesourcery.com&gt;
-
- * sysdeps/generic/initfini.c (call_gmon_start): Add
- __attribute__ ((noinline)).
-
-Index: sysdeps/generic/initfini.c
-===================================================================
-
-diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c
---- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200
-+++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100
-@@ -70,7 +70,7 @@
- /* The beginning of _init: */
- asm ("\n/*@_init_PROLOG_BEGINS*/");
-
--static void
-+static void __attribute__ ((noinline))
- call_gmon_start(void)
- {
- extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/
diff --git a/packages/glibc-ports/2.13/240-check_native-headers.patch b/packages/glibc-ports/2.13/240-check_native-headers.patch
deleted file mode 100644
index c936f71..0000000
--- a/packages/glibc-ports/2.13/240-check_native-headers.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-many ports hit this warning:
-../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset'
-../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset'
-
-snipped from suse
-
-diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c glibc-2.13/sysdeps/unix/sysv/linux/check_native.c
---- glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c 2007-11-24 04:12:17.000000000 +0100
-+++ glibc-2.13/sysdeps/unix/sysv/linux/check_native.c 2009-11-13 00:50:11.000000000 +0100
-@@ -23,6 +23,7 @@
- #include <stddef.h>
- #include <stdint.h>
- #include <stdlib.h>
-+#include <string.h>
- #include <time.h>
- #include <unistd.h>
- #include <net/if.h>
diff --git a/packages/glibc-ports/2.13/260-assume-pipe2.patch b/packages/glibc-ports/2.13/260-assume-pipe2.patch
deleted file mode 100644
index 42e8f4e..0000000
--- a/packages/glibc-ports/2.13/260-assume-pipe2.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-http://bugs.gentoo.org/250342
-http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685
-
-we cant assume sock_cloexec and pipe2 are bound together as the former defines
-are found in glibc only while the latter are a combo of kernel headers and
-glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub
-inside of glibc, we hit a problem. for example:
-
-#include <grp.h>
-#include <stdio.h>
-main()
-{
- getgrnam("portage");
- if (!popen("ls", "r"))
- perror("popen()");
-}
-
-getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both
-__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against
-older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS
-stub for it. so popen() will always fail as glibc assumes pipe2() works.
-
-diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c
---- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200
-+++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100
-@@ -16,9 +16,14 @@
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-+#include <fcntl.h>
- #include <sys/socket.h>
- #include <kernel-features.h>
-
- #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC
- int __have_sock_cloexec;
- #endif
-+
-+#if defined O_CLOEXEC && !defined __ASSUME_PIPE2
-+int __have_pipe2;
-+#endif
diff --git a/packages/glibc-ports/2.13/270-china.patch b/packages/glibc-ports/2.13/270-china.patch
deleted file mode 100644
index 41d7759..0000000
--- a/packages/glibc-ports/2.13/270-china.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW
---- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100
-+++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100
-@@ -1,7 +1,7 @@
- comment_char %
- escape_char /
- %
--% Chinese language locale for Taiwan R.O.C.
-+% Chinese language locale for Taiwan
- % charmap: BIG5-CP950
- %
- % Original Author:
-@@ -17,7 +17,7 @@
- % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf
-
- LC_IDENTIFICATION
--title "Chinese locale for Taiwan R.O.C."
-+title "Chinese locale for Taiwan"
- source ""
- address ""
- contact ""
-@@ -25,7 +25,7 @@
- tel ""
- fax ""
- language "Chinese"
--territory "Taiwan R.O.C."
-+territory "Taiwan"
- revision "0.2"
- date "2000-08-02"
- %
diff --git a/packages/glibc-ports/2.13/280-new-valencian-locale.patch b/packages/glibc-ports/2.13/280-new-valencian-locale.patch
deleted file mode 100644
index 4cdd108..0000000
--- a/packages/glibc-ports/2.13/280-new-valencian-locale.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-http://bugs.gentoo.org/show_bug.cgi?id=131815
-http://sourceware.org/bugzilla/show_bug.cgi?id=2522
-
-diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED
---- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200
-+++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100
-@@ -72,6 +72,8 @@
- ca_ES.UTF-8/UTF-8 \
- ca_ES/ISO-8859-1 \
- ca_ES@euro/ISO-8859-15 \
-+ca_ES.UTF-8@valencia/UTF-8 \
-+ca_ES@valencia/ISO-8859-15 \
- ca_FR.UTF-8/UTF-8 \
- ca_FR/ISO-8859-15 \
- ca_IT.UTF-8/UTF-8 \
-diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia
---- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100
-+++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100
-@@ -0,0 +1,96 @@
-+comment_char %
-+escape_char /
-+%
-+% Valencian (southern Catalan) locale for Spain with Euro
-+%
-+% Note that this locale is almost the same as ca_ES@euro. The point of having
-+% a separate locale is only for PO translations, which have a lot of social
-+% support and are very appreciated by the Valencian-speaking community.
-+%
-+% Contact: Jordi Mallach
-+% Email: jordi@gnu.org
-+% Tel:
-+% Fax:
-+% Language: ca
-+% Territory: ES
-+% Option: euro
-+% Revision: 1.0
-+% Date: 2006-04-06
-+% Application: general
-+% Users: general
-+% Repertoiremap: mnemonic,ds
-+% Charset: ISO-8859-15
-+% Distribution and use is free, also
-+% for commercial purposes.
-+
-+LC_IDENTIFICATION
-+title "Valencian (southern Catalan) locale for Spain with Euro"
-+source ""
-+address ""
-+contact "Jordi Mallach"
-+email "jordi@gnu.org"
-+tel ""
-+fax ""
-+language "Catalan"
-+territory "Spain"
-+revision "1.0"
-+date "2006-04-06"
-+%
-+category "ca_ES@valencia:2006";LC_IDENTIFICATION
-+category "ca_ES@valencia:2006";LC_CTYPE
-+category "ca_ES@valencia:2006";LC_COLLATE
-+category "ca_ES@valencia:2006";LC_MONETARY
-+category "ca_ES@valencia:2006";LC_NUMERIC
-+category "ca_ES@valencia:2006";LC_TIME
-+category "ca_ES@valencia:2006";LC_MESSAGES
-+category "ca_ES@valencia:2006";LC_PAPER
-+category "ca_ES@valencia:2006";LC_NAME
-+category "ca_ES@valencia:2006";LC_ADDRESS
-+category "ca_ES@valencia:2006";LC_TELEPHONE
-+category "ca_ES@valencia:2006";LC_MEASUREMENT
-+
-+END LC_IDENTIFICATION
-+
-+LC_CTYPE
-+copy "i18n"
-+END LC_CTYPE
-+
-+LC_COLLATE
-+copy "ca_ES"
-+END LC_COLLATE
-+
-+LC_MONETARY
-+copy "ca_ES"
-+END LC_MONETARY
-+
-+LC_NUMERIC
-+copy "ca_ES"
-+END LC_NUMERIC
-+
-+LC_TIME
-+copy "ca_ES"
-+END LC_TIME
-+
-+LC_MESSAGES
-+copy "ca_ES"
-+END LC_MESSAGES
-+
-+LC_PAPER
-+copy "ca_ES"
-+END LC_PAPER
-+
-+LC_NAME
-+copy "ca_ES"
-+END LC_NAME
-+
-+LC_ADDRESS
-+copy "ca_ES"
-+END LC_ADDRESS
-+
-+LC_TELEPHONE
-+copy "ca_ES"
-+END LC_TELEPHONE
-+
-+LC_MEASUREMENT
-+copy "ca_ES"
-+END LC_MEASUREMENT
diff --git a/packages/glibc-ports/2.13/300-nscd-one-fork.patch b/packages/glibc-ports/2.13/300-nscd-one-fork.patch
deleted file mode 100644
index adc9b3f..0000000
--- a/packages/glibc-ports/2.13/300-nscd-one-fork.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-only fork one to assist in stop-start-daemon assumptions about daemon behavior
-
-http://bugs.gentoo.org/190785
-
-diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c
---- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100
-+++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100
-@@ -182,6 +182,9 @@
- if (pid != 0)
- exit (0);
-
-+ if (write_pid (_PATH_NSCDPID) < 0)
-+ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno));
-+
- int nullfd = open (_PATH_DEVNULL, O_RDWR);
- if (nullfd != -1)
- {
-@@ -231,12 +234,6 @@
- for (i = min_close_fd; i < getdtablesize (); i++)
- close (i);
-
-- pid = fork ();
-- if (pid == -1)
-- error (EXIT_FAILURE, errno, _("cannot fork"));
-- if (pid != 0)
-- exit (0);
--
- setsid ();
-
- if (chdir ("/") != 0)
-@@ -245,9 +242,6 @@
-
- openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON);
-
-- if (write_pid (_PATH_NSCDPID) < 0)
-- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno));
--
- if (!init_logfile ())
- dbg_log (_("Could not create log file"));
-
diff --git a/packages/glibc-ports/2.13/310-hppa-nptl-carlos.patch b/packages/glibc-ports/2.13/310-hppa-nptl-carlos.patch
deleted file mode 100644
index 4c028b2..0000000
--- a/packages/glibc-ports/2.13/310-hppa-nptl-carlos.patch
+++ /dev/null
@@ -1,246 +0,0 @@
-
-
-diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c
---- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200
-+++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100
-@@ -392,14 +392,14 @@
- know it is available. We do not have to clear the memory if we
- do not have to use the temporary bootstrap_map. Global variables
- are initialized to zero by default. */
--#ifndef DONT_USE_BOOTSTRAP_MAP
-+#if !defined DONT_USE_BOOTSTRAP_MAP
- # ifdef HAVE_BUILTIN_MEMSET
- __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info));
- # else
-- for (size_t cnt = 0;
-- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]);
-- ++cnt)
-- bootstrap_map.l_info[cnt] = 0;
-+ /* Clear the whole bootstrap_map structure */
-+ for (char *cnt = (char *)&(bootstrap_map);
-+ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map));
-+ *cnt++ = '\0');
- # endif
- # if USE___THREAD
- bootstrap_map.l_tls_modid = 0;
-diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h
---- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100
-+++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100
-@@ -185,7 +185,7 @@
- __typeof (*(mem)) __atg5_value = (newvalue); \
- \
- do \
-- __atg5_oldval = *__atg5_memp; \
-+ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \
- while (__builtin_expect \
- (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \
- __atg5_oldval), 0)); \
-@@ -206,7 +206,7 @@
- __typeof (*(mem)) __atg6_value = (value); \
- \
- do \
-- __atg6_oldval = *__atg6_memp; \
-+ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \
- while (__builtin_expect \
- (atomic_compare_and_exchange_bool_acq (__atg6_memp, \
- __atg6_oldval \
-@@ -224,7 +224,7 @@
- __typeof (*(mem)) __atg7_value = (value); \
- \
- do \
-- __atg7_oldv = *__atg7_memp; \
-+ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \
- while (__builtin_expect \
- (catomic_compare_and_exchange_bool_acq (__atg7_memp, \
- __atg7_oldv \
-@@ -242,7 +242,7 @@
- __typeof (mem) __atg8_memp = (mem); \
- __typeof (*(mem)) __atg8_value = (value); \
- do { \
-- __atg8_oldval = *__atg8_memp; \
-+ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \
- if (__atg8_oldval >= __atg8_value) \
- break; \
- } while (__builtin_expect \
-@@ -259,7 +259,7 @@
- __typeof (mem) __atg9_memp = (mem); \
- __typeof (*(mem)) __atg9_value = (value); \
- do { \
-- __atg9_oldv = *__atg9_memp; \
-+ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \
- if (__atg9_oldv >= __atg9_value) \
- break; \
- } while (__builtin_expect \
-@@ -277,7 +277,7 @@
- __typeof (mem) __atg10_memp = (mem); \
- __typeof (*(mem)) __atg10_value = (value); \
- do { \
-- __atg10_oldval = *__atg10_memp; \
-+ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \
- if (__atg10_oldval <= __atg10_value) \
- break; \
- } while (__builtin_expect \
-@@ -361,7 +361,7 @@
- \
- do \
- { \
-- __atg11_oldval = *__atg11_memp; \
-+ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \
- if (__builtin_expect (__atg11_oldval <= 0, 0)) \
- break; \
- } \
-@@ -400,7 +400,7 @@
- __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \
- \
- do \
-- __atg14_old = (*__atg14_memp); \
-+ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \
- while (__builtin_expect \
- (atomic_compare_and_exchange_bool_acq (__atg14_memp, \
- __atg14_old | __atg14_mask,\
-@@ -418,7 +418,7 @@
- __typeof (*(mem)) __atg15_mask = (mask); \
- \
- do \
-- __atg15_old = (*__atg15_memp); \
-+ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \
- while (__builtin_expect \
- (atomic_compare_and_exchange_bool_acq (__atg15_memp, \
- __atg15_old & __atg15_mask, \
-@@ -450,7 +450,7 @@
- __typeof (*(mem)) __atg16_mask = (mask); \
- \
- do \
-- __atg16_old = (*__atg16_memp); \
-+ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \
- while (__builtin_expect \
- (atomic_compare_and_exchange_bool_acq (__atg16_memp, \
- __atg16_old & __atg16_mask,\
-@@ -468,7 +468,7 @@
- __typeof (*(mem)) __atg17_mask = (mask); \
- \
- do \
-- __atg17_old = (*__atg17_memp); \
-+ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \
- while (__builtin_expect \
- (atomic_compare_and_exchange_bool_acq (__atg17_memp, \
- __atg17_old | __atg17_mask, \
-@@ -484,7 +484,7 @@
- __typeof (*(mem)) __atg18_mask = (mask); \
- \
- do \
-- __atg18_old = (*__atg18_memp); \
-+ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \
- while (__builtin_expect \
- (catomic_compare_and_exchange_bool_acq (__atg18_memp, \
- __atg18_old | __atg18_mask,\
-@@ -500,7 +500,7 @@
- __typeof (*(mem)) __atg19_mask = (mask); \
- \
- do \
-- __atg19_old = (*__atg19_memp); \
-+ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \
- while (__builtin_expect \
- (atomic_compare_and_exchange_bool_acq (__atg19_memp, \
- __atg19_old | __atg19_mask,\
-diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile
---- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100
-+++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100
-@@ -265,9 +265,9 @@
- # Files which must not be linked with libpthread.
- tests-nolibpthread = tst-unload
-
--# This sets the stack resource limit to 1023kb, which is not a multiple
--# of the page size since every architecture's page size is > 1k.
--tst-oddstacklimit-ENV = ; ulimit -s 1023;
-+# This sets the stack resource limit to 8193kb, which is not a multiple
-+# of the page size since every architecture's page size is 4096 bytes.
-+tst-oddstacklimit-ENV = ; ulimit -s 8193;
-
- distribute = eintr.c tst-cleanup4aux.c
-
-@@ -426,6 +426,35 @@
- CFLAGS-tst-cleanupx4.c += -fexceptions
- CFLAGS-tst-oncex3.c += -fexceptions
- CFLAGS-tst-oncex4.c += -fexceptions
-+
-+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed
-+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s)
-+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s)
-+
- CFLAGS-tst-align.c += $(stack-align-test-flags)
- CFLAGS-tst-align3.c += $(stack-align-test-flags)
- CFLAGS-tst-initializers1.c = -W -Wall -Werror
-diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c
---- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200
-+++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100
-@@ -64,7 +64,7 @@
- do
- lll_futex_wait (&ibarrier->curr_event, event,
- ibarrier->private ^ FUTEX_PRIVATE_FLAG);
-- while (event == ibarrier->curr_event);
-+ while (event == *(volatile unsigned int *)&ibarrier->curr_event);
- }
-
- /* Make sure the init_count is stored locally or in a register. */
-diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile
---- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100
-+++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100
-@@ -33,7 +33,9 @@
-
- ifeq ($(have-forced-unwind),yes)
- tests += tst-mqueue8x
-+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed
- CFLAGS-tst-mqueue8x.c += -fexceptions
-+LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s)
- endif
- endif
-
-diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile
---- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200
-+++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100
-@@ -82,7 +82,7 @@
- $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)'
- endif
-
--CFLAGS-vfprintf.c = -Wno-uninitialized
-+CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch
- CFLAGS-vfwprintf.c = -Wno-uninitialized
- CFLAGS-tst-printf.c = -Wno-format
- CFLAGS-tstdiomisc.c = -Wno-format
-diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c
---- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200
-+++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100
-@@ -456,7 +456,7 @@
- while (inlen < 0 && errno == EINTR);
- if (inlen < 0)
- {
-- if (errno == EWOULDBLOCK)
-+ if (errno == EWOULDBLOCK || errno == EAGAIN)
- continue;
- cu->cu_error.re_errno = errno;
- return (cu->cu_error.re_status = RPC_CANTRECV);
diff --git a/packages/glibc-ports/2.13/330-m68k-sys-user.patch b/packages/glibc-ports/2.13/330-m68k-sys-user.patch
index 191e0c6..a2b4528 100644
--- a/packages/glibc-ports/2.13/330-m68k-sys-user.patch
+++ b/packages/glibc-ports/2.13/330-m68k-sys-user.patch
@@ -1,8 +1,8 @@
copied from kernel as it is sanitized now
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h
+--- glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100
@@ -1,3 +1,90 @@
+#ifndef _SYS_USER_H
+#define _SYS_USER_H
@@ -94,4 +94,3 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/use
/* Copyright (C) 2008, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-diff -durN glibc-2.13.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h
diff --git a/packages/glibc-ports/2.13/340-dl_execstack-PaX-support.patch b/packages/glibc-ports/2.13/340-dl_execstack-PaX-support.patch
deleted file mode 100644
index 2402af0..0000000
--- a/packages/glibc-ports/2.13/340-dl_execstack-PaX-support.patch
+++ /dev/null
@@ -1,66 +0,0 @@
- With latest versions of glibc, a lot of apps failed on a PaX enabled
- system with:
- cannot enable executable stack as shared object requires: Permission denied
-
- This is due to PaX 'exec-protecting' the stack, and ld.so then trying
- to make the stack executable due to some libraries not containing the
- PT_GNU_STACK section. Bug #32960. <azarah@gentoo.org> (12 Nov 2003).
-
- Patch also NPTL. Bug #116086. <kevquinn@gentoo.org> (20 Dec 2005).
-
-diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c
---- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100
-+++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100
-@@ -329,7 +329,8 @@
- # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
- #endif
- if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0)
-- return errno;
-+ if (errno != EACCES) /* PAX is enabled */
-+ return errno;
-
- return 0;
- }
-diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c
---- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100
-+++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100
-@@ -63,7 +63,10 @@
- else
- # endif
- {
-- result = errno;
-+ if (errno == EACCES) /* PAX is enabled */
-+ result = 0;
-+ else
-+ result = errno;
- goto out;
- }
- }
-@@ -89,7 +92,12 @@
- page -= size;
- else
- {
-- if (errno != ENOMEM) /* Unexpected failure mode. */
-+ if (errno == EACCES) /* PAX is enabled */
-+ {
-+ result = 0;
-+ goto out;
-+ }
-+ else if (errno != ENOMEM) /* Unexpected failure mode. */
- {
- result = errno;
- goto out;
-@@ -115,7 +123,12 @@
- page += size;
- else
- {
-- if (errno != ENOMEM) /* Unexpected failure mode. */
-+ if (errno == EACCES) /* PAX is enabled */
-+ {
-+ result = 0;
-+ goto out;
-+ }
-+ else if (errno != ENOMEM) /* Unexpected failure mode. */
- {
- result = errno;
- goto out;
diff --git a/packages/glibc-ports/2.13/350-pre20040117-pt_pax.patch b/packages/glibc-ports/2.13/350-pre20040117-pt_pax.patch
deleted file mode 100644
index f8f6b83..0000000
--- a/packages/glibc-ports/2.13/350-pre20040117-pt_pax.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h
---- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200
-+++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100
-@@ -580,6 +580,7 @@
- #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */
- #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
- #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
-+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */
- #define PT_LOSUNW 0x6ffffffa
- #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
- #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
-@@ -593,6 +594,18 @@
- #define PF_X (1 << 0) /* Segment is executable */
- #define PF_W (1 << 1) /* Segment is writable */
- #define PF_R (1 << 2) /* Segment is readable */
-+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */
-+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */
-+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */
-+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */
-+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */
-+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */
-+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */
-+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */
-+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */
-+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */
-+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */
-+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */
- #define PF_MASKOS 0x0ff00000 /* OS-specific */
- #define PF_MASKPROC 0xf0000000 /* Processor-specific */
-
diff --git a/packages/glibc-ports/2.13/360-tests-sandbox-libdl-paths.patch b/packages/glibc-ports/2.13/360-tests-sandbox-libdl-paths.patch
deleted file mode 100644
index 9f78c52..0000000
--- a/packages/glibc-ports/2.13/360-tests-sandbox-libdl-paths.patch
+++ /dev/null
@@ -1,193 +0,0 @@
-when glibc runs its tests, it does so by invoking the local library loader.
-in Gentoo, we build/run inside of our "sandbox" which itself is linked against
-libdl (so that it can load libraries and pull out symbols). the trouble
-is that when you upgrade from an older glibc to the new one, often times
-internal symbols change name or abi. this is normally OK as you cannot use
-libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so
-we always say "keep all of the glibc libraries from the same build". but
-when glibc runs its tests, it uses dynamic paths to point to its new local
-copies of libraries. if the test doesnt use libdl, then glibc doesnt add
-its path, and when sandbox triggers the loading of libdl, glibc does so
-from the host system system. this gets us into the case of all libraries
-are from the locally compiled version of glibc except for libdl.so.
-
-Fix by Wormo
-
-http://bugs.gentoo.org/56898
-
-diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh
---- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200
-+++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100
-@@ -24,7 +24,8 @@
- rtld_installed_name=$1; shift
-
- testout=${common_objpfx}/grp/tst_fgetgrent.out
--library_path=${common_objpfx}
-+# make sure libdl is also in path in case sandbox is in use
-+library_path=${common_objpfx}:${common_objpfx}/dlfcn
-
- result=0
-
-diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh
---- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200
-+++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100
-@@ -34,7 +34,7 @@
- export GCONV_PATH
-
- # We have to have some directories in the library path.
--LIBPATH=$codir:$codir/iconvdata
-+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn
-
- # How the start the iconv(1) program.
- ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \
-diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh
---- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200
-+++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100
-@@ -59,8 +59,11 @@
- irreversible=${charset}.irreversible
- fi
-
-+# make sure libdl is also in path in case sandbox is in use
-+library_path=${common_objpfx}:${common_objpfx}/dlfcn
-+
- # iconv in one direction.
--${common_objpfx}elf/ld.so --library-path $common_objpfx \
-+${common_objpfx}elf/ld.so --library-path $library_path \
- ${objpfx}tst-table-from ${charset} \
- > ${objpfx}tst-${charset}.table
-
-diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh
---- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200
-+++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100
-@@ -37,6 +37,9 @@
- LOCPATH=${common_objpfx}localedata
- export LOCPATH
-
-+# make sure libdl is also in path in case sandbox is in use
-+library_path=${common_objpfx}:${common_objpfx}/dlfcn
-+
- ${common_objpfx}elf/ld.so --library-path $common_objpfx \
- ${objpfx}tst-codeset > ${objpfx}tst-codeset.out
-
-diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh
---- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200
-+++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100
-@@ -51,9 +51,12 @@
- LOCPATH=${common_objpfx}localedata
- export LOCPATH
-
-+# make sure libdl is also in path in case sandbox is in use
-+library_path=${common_objpfx}:${common_objpfx}/dlfcn
-+
- # Now run the test.
- MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \
--${common_objpfx}elf/ld.so --library-path $common_objpfx \
-+${common_objpfx}elf/ld.so --library-path $library_path \
- ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir
-
- exit $?
-diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh
---- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200
-+++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100
-@@ -65,8 +65,11 @@
- LOCPATH=${objpfx}domaindir
- export LOCPATH
-
-+# make sure libdl is also in path in case sandbox is in use
-+library_path=${common_objpfx}:${common_objpfx}/dlfcn
-+
- # Now run the test.
--${common_objpfx}elf/ld.so --library-path $common_objpfx \
-+${common_objpfx}elf/ld.so --library-path $library_path \
- ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir &&
- cmp ${objpfx}tst-gettext2.out - <<EOF
- String1 - Lang1: 1st string
-diff -durN glibc-2.13.orig/intl/tst-translit.sh glibc-2.13/intl/tst-translit.sh
---- glibc-2.13.orig/intl/tst-translit.sh 2005-05-04 19:56:10.000000000 +0200
-+++ glibc-2.13/intl/tst-translit.sh 2009-11-13 00:50:37.000000000 +0100
-@@ -36,7 +36,10 @@
- LOCPATH=${common_objpfx}localedata
- export LOCPATH
-
--${common_objpfx}elf/ld.so --library-path $common_objpfx \
-+# make sure libdl is also in path in case sandbox is in use
-+library_path=${common_objpfx}:${common_objpfx}/dlfcn
-+
-+${common_objpfx}elf/ld.so --library-path $library_path \
- ${objpfx}tst-translit > ${objpfx}tst-translit.out ${objpfx}domaindir
-
- exit $?
-diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh
---- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200
-+++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100
-@@ -24,9 +24,12 @@
- status=0
- trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15
-
-+# make sure libdl is also in path in case sandbox is in use
-+library_path=${common_objpfx}:${common_objpfx}/dlfcn
-+
- MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \
- LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \
--${common_objpfx}elf/ld.so --library-path $common_objpfx \
-+${common_objpfx}elf/ld.so --library-path $library_path \
- ${common_objpfx}malloc/tst-mtrace || status=1
-
- if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then
-diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh
---- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200
-+++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100
-@@ -5,8 +5,8 @@
- rtld_installed_name=$1; shift
- logfile=$common_objpfx/nptl/tst-tls6.out
-
--# We have to find libc and nptl
--library_path=${common_objpfx}:${common_objpfx}nptl
-+# We have to find libc and nptl (also libdl in case sandbox is in use)
-+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn
- tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
- ${common_objpfx}/nptl/tst-tls5"
-
-diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh
---- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100
-+++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100
-@@ -18,7 +18,7 @@
- esac
-
- # We have to find the libc and the NSS modules.
--library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod
-+library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn
-
- # Since we use `sort' we must make sure to use the same locale everywhere.
- LC_ALL=C
-diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh
---- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200
-+++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100
-@@ -10,7 +10,10 @@
- else
- rtld_installed_name=$1; shift
- runit() {
-- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@"
-+
-+ # make sure libdl is also in path in case sandbox is in use
-+ library_path=${common_objpfx}:${common_objpfx}/dlfcn
-+ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@"
- }
- fi
-
-diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh
---- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200
-+++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100
-@@ -19,8 +19,11 @@
- "
- export IFS
-
-+# make sure libdl is also in path in case sandbox is in use
-+library_path=${common_objpfx}:${common_objpfx}/dlfcn
-+
- failed=0
--${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
-+${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
- ${common_objpfx}posix/wordexp-test '$*' > ${testout}1
- cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1
- wordexp returned 0
diff --git a/packages/glibc-ports/2.13/380-dont-build-timezone.patch b/packages/glibc-ports/2.13/380-dont-build-timezone.patch
deleted file mode 100644
index 11c358e..0000000
--- a/packages/glibc-ports/2.13/380-dont-build-timezone.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-timezone data has been split into the package sys-libs/timezone-data
-
-diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig
---- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100
-+++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100
-@@ -944,7 +944,7 @@
- stdlib stdio-common libio malloc string wcsmbs time dirent \
- grp pwd posix io termios resource misc socket sysvipc gmon \
- gnulib iconv iconvdata wctype manual shadow gshadow po argp \
-- crypt nss localedata timezone rt conform debug \
-+ crypt nss localedata rt conform debug \
- $(add-on-subdirs) $(dlfcn) $(binfmt-subdir)
-
- ifndef avoid-generated
diff --git a/packages/glibc-ports/2.13/400-alpha-xstat.patch b/packages/glibc-ports/2.13/400-alpha-xstat.patch
deleted file mode 100644
index 6e4ab8f..0000000
--- a/packages/glibc-ports/2.13/400-alpha-xstat.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h
---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200
-+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100
-@@ -386,6 +386,11 @@
- # define __ASSUME_GETDENTS32_D_TYPE 1
- #endif
-
-+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */
-+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__
-+# define __ASSUME_STAT64_SYSCALL 1
-+#endif
-+
- /* Starting with version 2.5.3, the initial location returned by `brk'
- after exec is always rounded up to the next page. */
- #if __LINUX_KERNEL_VERSION >= 132355
diff --git a/packages/glibc-ports/2.13/410-alpha-SETPIPE-GETPIPE.patch b/packages/glibc-ports/2.13/410-alpha-SETPIPE-GETPIPE.patch
index fd55537..580c16d 100644
--- a/packages/glibc-ports/2.13/410-alpha-SETPIPE-GETPIPE.patch
+++ b/packages/glibc-ports/2.13/410-alpha-SETPIPE-GETPIPE.patch
@@ -3,10 +3,10 @@
* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETPIPE_SZ,
F_GETPIPE_SZ): Define.
-diff --git glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+diff --git glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 860e9ac..e5e726b 100644
---- glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+--- glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
++++ glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -97,6 +97,8 @@
# define F_SETLEASE 1024 /* Set a lease. */
# define F_GETLEASE 1025 /* Enquire what lease is active. */
diff --git a/packages/glibc-ports/2.13/420-alpha-statfs.patch b/packages/glibc-ports/2.13/420-alpha-statfs.patch
index 65c925a..accb5af 100644
--- a/packages/glibc-ports/2.13/420-alpha-statfs.patch
+++ b/packages/glibc-ports/2.13/420-alpha-statfs.patch
@@ -3,10 +3,10 @@
* sysdeps/unix/sysv/linux/mips/bits/statfs.h (struct statfs,
struct statfs64): Add f_flags field.
-diff --git glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h
+diff --git glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h
index d838e6b..157591d 100644
---- glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h
+--- glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h
++++ glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h
@@ -42,7 +42,8 @@ struct statfs
__fsid_t f_fsid;
int f_namelen;
diff --git a/packages/glibc-ports/2.13/430-alpha-creat.patch b/packages/glibc-ports/2.13/430-alpha-creat.patch
deleted file mode 100644
index da6ddda..0000000
--- a/packages/glibc-ports/2.13/430-alpha-creat.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-alpha does not have a __NR_creat
-
-http://bugs.gentoo.org/227275
-http://sourceware.org/bugzilla/show_bug.cgi?id=6650
-
-diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c
---- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100
-+++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100
-@@ -1 +1,5 @@
- /* Defined as alias for the syscall. */
-+#include <sysdep.h>
-+#ifndef __NR_creat
-+#include "../../../../../io/creat64.c"
-+#endif
diff --git a/packages/glibc-ports/2.13/440-alpha-cache-shape.patch b/packages/glibc-ports/2.13/440-alpha-cache-shape.patch
index 62ade7b..602c80d 100644
--- a/packages/glibc-ports/2.13/440-alpha-cache-shape.patch
+++ b/packages/glibc-ports/2.13/440-alpha-cache-shape.patch
@@ -5,9 +5,9 @@ duplication for static builds with dl-sysdep and dl-support. since dl-sysdep
is both shared/static, there is no point in hooking dl-support anymore, so we
can punt it.
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c
+--- glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100
@@ -1,2 +1,1 @@
-#include "dl-auxv.h"
#include <elf/dl-support.c>
diff --git a/packages/glibc-ports/2.13/450-alpha-DEFAULT_STACK_PERMS.patch b/packages/glibc-ports/2.13/450-alpha-DEFAULT_STACK_PERMS.patch
index ac3ea9a..0d85ce5 100644
--- a/packages/glibc-ports/2.13/450-alpha-DEFAULT_STACK_PERMS.patch
+++ b/packages/glibc-ports/2.13/450-alpha-DEFAULT_STACK_PERMS.patch
@@ -2,10 +2,10 @@
* sysdeps/alpha/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X.
-diff --git glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h
+diff --git glibc-ports-2.13/sysdeps/alpha/stackinfo.h glibc-ports-2.13/sysdeps/alpha/stackinfo.h
index 0a281bd..d9dbc35 100644
---- glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h
+--- glibc-ports-2.13/sysdeps/alpha/stackinfo.h
++++ glibc-ports-2.13/sysdeps/alpha/stackinfo.h
@@ -22,7 +22,13 @@
#ifndef _STACKINFO_H
#define _STACKINFO_H 1
diff --git a/packages/glibc-ports/2.13/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc-ports/2.13/460-alpha-fix-gcc-4.1-warnings.patch
index 313e0e0..d23ecf9 100644
--- a/packages/glibc-ports/2.13/460-alpha-fix-gcc-4.1-warnings.patch
+++ b/packages/glibc-ports/2.13/460-alpha-fix-gcc-4.1-warnings.patch
@@ -16,9 +16,9 @@ I cannot really think of anything better than
ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c
+--- glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100
@@ -178,13 +178,13 @@
static inline void
stb_mb(unsigned char val, unsigned long addr)
@@ -53,4 +53,3 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm
return r;
}
-diff -durN glibc-2.13.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.13/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c
diff --git a/packages/glibc-ports/2.13/470-alpha-feupdateenv.patch b/packages/glibc-ports/2.13/470-alpha-feupdateenv.patch
index 45a7051..ea1e056 100644
--- a/packages/glibc-ports/2.13/470-alpha-feupdateenv.patch
+++ b/packages/glibc-ports/2.13/470-alpha-feupdateenv.patch
@@ -4,20 +4,20 @@
libm_hidden_def.
* sysdeps/alpha/fpu/ftestexcept.c (fetestexcept): Likewise.
-diff --git glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c
+diff --git glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c
index c798070..9abbf11 100644
---- glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c
+--- glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c
++++ glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c
@@ -46,4 +46,5 @@ strong_alias (__feupdateenv, __old_feupdateenv)
compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
#endif
+libm_hidden_ver (__feupdateenv, feupdateenv)
versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);
-diff --git glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c
+diff --git glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c
index a4b3081..34d8113 100644
---- glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c
+--- glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c
++++ glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c
@@ -30,3 +30,4 @@ fetestexcept (int excepts)
return tmp & excepts & SWCR_STATUS_MASK;
diff --git a/packages/glibc-ports/2.13/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc-ports/2.13/490-alpha_alpha-add-fdatasync-support.patch
deleted file mode 100644
index 372f34c..0000000
--- a/packages/glibc-ports/2.13/490-alpha_alpha-add-fdatasync-support.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-2009-07-25 Aurelien Jarno <aurelien@aurel32.net>
-
- * sysdeps/unix/sysv/linux/kernel-features.h: define
- __ASSUME_FDATASYNC.
- * sysdeps/unix/sysv/linux/fdatasync.c: New file.
- * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with
- -fexceptions.
- * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync.
-
- sysdeps/unix/sysv/linux/Makefile | 1
- sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++
- sysdeps/unix/sysv/linux/kernel-features.h | 6 ++
- sysdeps/unix/sysv/linux/syscalls.list | 1
- 4 files changed, 76 insertions(+), 1 deletion(-)
-
-diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile
---- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100
-+++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100
-@@ -20,6 +20,7 @@
- setfsuid setfsgid makedev epoll_pwait signalfd \
- eventfd eventfd_read eventfd_write prlimit
-
-+CFLAGS-fdatasync.c = -fexceptions
- CFLAGS-gethostid.c = -fexceptions
-
- sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
-diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c
---- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100
-+++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100
-@@ -0,0 +1,69 @@
-+/* fdatasync -- synchronize at least the data part of a file with
-+ the underlying media. Linux version.
-+
-+ Copyright (C) 2007 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include <errno.h>
-+#include <unistd.h>
-+
-+#include <sysdep-cancel.h>
-+#include <sys/syscall.h>
-+#include <bp-checks.h>
-+
-+#include <kernel-features.h>
-+
-+#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC
-+static int __have_no_fdatasync;
-+#endif
-+
-+static int
-+do_fdatasync (int fd)
-+{
-+#ifdef __ASSUME_FDATASYNC
-+ return INLINE_SYSCALL (fdatasync, 1, fd);
-+#elif defined __NR_fdatasync
-+ if (!__builtin_expect (__have_no_fdatasync, 0))
-+ {
-+ int result = INLINE_SYSCALL (fdatasync, 1, fd);
-+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS)
-+ return result;
-+
-+ __have_no_fdatasync = 1;
-+ }
-+#endif
-+ return INLINE_SYSCALL (fsync, 1, fd);
-+}
-+
-+int
-+__fdatasync (int fd)
-+{
-+ if (SINGLE_THREAD_P)
-+ return do_fdatasync (fd);
-+
-+ int oldtype = LIBC_CANCEL_ASYNC ();
-+
-+ int result = do_fdatasync (fd);
-+
-+ LIBC_CANCEL_RESET (oldtype);
-+
-+ return result;
-+}
-+
-+weak_alias (__fdatasync, fdatasync)
-+
-diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h
---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100
-+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100
-@@ -459,6 +459,12 @@
- # define __ASSUME_FUTEX_LOCK_PI 1
- #endif
-
-+/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it
-+ was already present in 2.0 kernels on other architectures. */
-+#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616)
-+# define __ASSUME_FDATASYNC 1
-+#endif
-+
- /* Support for utimensat syscall was added in 2.6.22, on SH
- only after 2.6.22-rc1. */
- #if __LINUX_KERNEL_VERSION >= 0x020616 \
-diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list
---- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200
-+++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100
-@@ -11,7 +11,6 @@
- epoll_create1 EXTRA epoll_create1 i:i epoll_create1
- epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl
- epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait
--fdatasync - fdatasync Ci:i fdatasync
- flock - flock i:ii __flock flock
- fork - fork i: __libc_fork __fork fork
- get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms
diff --git a/packages/glibc-ports/2.13/530-alpha-fix-rtld-fPIC.patch b/packages/glibc-ports/2.13/530-alpha-fix-rtld-fPIC.patch
index b2ae9b5..38562b6 100644
--- a/packages/glibc-ports/2.13/530-alpha-fix-rtld-fPIC.patch
+++ b/packages/glibc-ports/2.13/530-alpha-fix-rtld-fPIC.patch
@@ -5,9 +5,9 @@
ports/sysdeps/alpha/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/alpha/Makefile glibc-2.13/glibc-ports-2.13/sysdeps/alpha/Makefile
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/alpha/Makefile glibc-ports-2.13/sysdeps/alpha/Makefile
+--- glibc-ports-2.13.orig/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100
@@ -35,7 +35,8 @@
ifeq ($(subdir),elf)
@@ -18,4 +18,3 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/alpha/Makefile glibc-2.13/gl
endif
# Build everything with full IEEE math support, and with dynamic rounding;
-diff -durN glibc-2.13.orig/ports/sysdeps/alpha/Makefile glibc-2.13/ports/sysdeps/alpha/Makefile
diff --git a/packages/glibc-ports/2.13/560-ppc-atomic.patch b/packages/glibc-ports/2.13/560-ppc-atomic.patch
deleted file mode 100644
index ee1cb90..0000000
--- a/packages/glibc-ports/2.13/560-ppc-atomic.patch
+++ /dev/null
@@ -1,415 +0,0 @@
-sniped from suse
-
-Index: sysdeps/powerpc/bits/atomic.h
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v
-retrieving revision 1.17
-diff -u -a -p -r1.17 atomic.h
-
-diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h
---- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200
-+++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100
-@@ -85,14 +85,14 @@
- __typeof (*(mem)) __tmp; \
- __typeof (mem) __memp = (mem); \
- __asm __volatile ( \
-- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \
-+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \
- " cmpw %0,%2\n" \
- " bne 2f\n" \
-- " stwcx. %3,0,%1\n" \
-+ " stwcx. %3,%y1\n" \
- " bne- 1b\n" \
- "2: " __ARCH_ACQ_INSTR \
-- : "=&r" (__tmp) \
-- : "b" (__memp), "r" (oldval), "r" (newval) \
-+ : "=&r" (__tmp), "+Z" (*__memp) \
-+ : "r" (oldval), "r" (newval) \
- : "cr0", "memory"); \
- __tmp; \
- })
-@@ -102,14 +102,14 @@
- __typeof (*(mem)) __tmp; \
- __typeof (mem) __memp = (mem); \
- __asm __volatile (__ARCH_REL_INSTR "\n" \
-- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \
-+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \
- " cmpw %0,%2\n" \
- " bne 2f\n" \
-- " stwcx. %3,0,%1\n" \
-+ " stwcx. %3,%y1\n" \
- " bne- 1b\n" \
- "2: " \
-- : "=&r" (__tmp) \
-- : "b" (__memp), "r" (oldval), "r" (newval) \
-+ : "=&r" (__tmp), "+Z" (__memp) \
-+ : "r" (oldval), "r" (newval) \
- : "cr0", "memory"); \
- __tmp; \
- })
-@@ -118,12 +118,12 @@
- ({ \
- __typeof (*mem) __val; \
- __asm __volatile ( \
-- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \
-- " stwcx. %3,0,%2\n" \
-+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \
-+ " stwcx. %2,%y1\n" \
- " bne- 1b\n" \
- " " __ARCH_ACQ_INSTR \
-- : "=&r" (__val), "=m" (*mem) \
-- : "b" (mem), "r" (value), "m" (*mem) \
-+ : "=&r" (__val), "+Z" (*mem) \
-+ : "r" (value) \
- : "cr0", "memory"); \
- __val; \
- })
-@@ -132,11 +132,11 @@
- ({ \
- __typeof (*mem) __val; \
- __asm __volatile (__ARCH_REL_INSTR "\n" \
-- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \
-- " stwcx. %3,0,%2\n" \
-+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \
-+ " stwcx. %2,%y1\n" \
- " bne- 1b" \
-- : "=&r" (__val), "=m" (*mem) \
-- : "b" (mem), "r" (value), "m" (*mem) \
-+ : "=&r" (__val), "+Z" (*mem) \
-+ : "r" (value) \
- : "cr0", "memory"); \
- __val; \
- })
-@@ -144,12 +144,12 @@
- #define __arch_atomic_exchange_and_add_32(mem, value) \
- ({ \
- __typeof (*mem) __val, __tmp; \
-- __asm __volatile ("1: lwarx %0,0,%3\n" \
-- " add %1,%0,%4\n" \
-- " stwcx. %1,0,%3\n" \
-+ __asm __volatile ("1: lwarx %0,%y2\n" \
-+ " add %1,%0,%3\n" \
-+ " stwcx. %1,%y2\n" \
- " bne- 1b" \
-- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
-- : "b" (mem), "r" (value), "m" (*mem) \
-+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \
-+ : "r" (value) \
- : "cr0", "memory"); \
- __val; \
- })
-@@ -157,12 +157,12 @@
- #define __arch_atomic_increment_val_32(mem) \
- ({ \
- __typeof (*(mem)) __val; \
-- __asm __volatile ("1: lwarx %0,0,%2\n" \
-+ __asm __volatile ("1: lwarx %0,%y1\n" \
- " addi %0,%0,1\n" \
-- " stwcx. %0,0,%2\n" \
-+ " stwcx. %0,%y1\n" \
- " bne- 1b" \
-- : "=&b" (__val), "=m" (*mem) \
-- : "b" (mem), "m" (*mem) \
-+ : "=&b" (__val), "+Z" (*mem) \
-+ : \
- : "cr0", "memory"); \
- __val; \
- })
-@@ -170,27 +170,27 @@
- #define __arch_atomic_decrement_val_32(mem) \
- ({ \
- __typeof (*(mem)) __val; \
-- __asm __volatile ("1: lwarx %0,0,%2\n" \
-+ __asm __volatile ("1: lwarx %0,%y1\n" \
- " subi %0,%0,1\n" \
-- " stwcx. %0,0,%2\n" \
-+ " stwcx. %0,%y1\n" \
- " bne- 1b" \
-- : "=&b" (__val), "=m" (*mem) \
-- : "b" (mem), "m" (*mem) \
-+ : "=&b" (__val), "+Z" (*mem) \
-+ : \
- : "cr0", "memory"); \
- __val; \
- })
-
- #define __arch_atomic_decrement_if_positive_32(mem) \
- ({ int __val, __tmp; \
-- __asm __volatile ("1: lwarx %0,0,%3\n" \
-+ __asm __volatile ("1: lwarx %0,%y2\n" \
- " cmpwi 0,%0,0\n" \
- " addi %1,%0,-1\n" \
- " ble 2f\n" \
-- " stwcx. %1,0,%3\n" \
-+ " stwcx. %1,%y2\n" \
- " bne- 1b\n" \
- "2: " __ARCH_ACQ_INSTR \
-- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
-- : "b" (mem), "m" (*mem) \
-+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \
-+ : \
- : "cr0", "memory"); \
- __val; \
- })
-diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h
---- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200
-+++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100
-@@ -44,14 +44,14 @@
- ({ \
- unsigned int __tmp; \
- __asm __volatile ( \
-- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \
-+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \
- " subf. %0,%2,%0\n" \
- " bne 2f\n" \
-- " stwcx. %3,0,%1\n" \
-+ " stwcx. %3,%y1\n" \
- " bne- 1b\n" \
- "2: " __ARCH_ACQ_INSTR \
-- : "=&r" (__tmp) \
-- : "b" (mem), "r" (oldval), "r" (newval) \
-+ : "=&r" (__tmp), "+Z" (*(mem)) \
-+ : "r" (oldval), "r" (newval) \
- : "cr0", "memory"); \
- __tmp != 0; \
- })
-@@ -60,14 +60,14 @@
- ({ \
- unsigned int __tmp; \
- __asm __volatile (__ARCH_REL_INSTR "\n" \
-- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \
-+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \
- " subf. %0,%2,%0\n" \
- " bne 2f\n" \
-- " stwcx. %3,0,%1\n" \
-+ " stwcx. %3,%y1\n" \
- " bne- 1b\n" \
- "2: " \
-- : "=&r" (__tmp) \
-- : "b" (mem), "r" (oldval), "r" (newval) \
-+ : "=&r" (__tmp), "+Z" (*(mem)) \
-+ : "r" (oldval), "r" (newval) \
- : "cr0", "memory"); \
- __tmp != 0; \
- })
-diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h
---- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200
-+++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100
-@@ -44,14 +44,14 @@
- ({ \
- unsigned int __tmp, __tmp2; \
- __asm __volatile (" clrldi %1,%1,32\n" \
-- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \
-+ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \
- " subf. %0,%1,%0\n" \
- " bne 2f\n" \
-- " stwcx. %4,0,%2\n" \
-+ " stwcx. %4,%y2\n" \
- " bne- 1b\n" \
- "2: " __ARCH_ACQ_INSTR \
-- : "=&r" (__tmp), "=r" (__tmp2) \
-- : "b" (mem), "1" (oldval), "r" (newval) \
-+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \
-+ : "1" (oldval), "r" (newval) \
- : "cr0", "memory"); \
- __tmp != 0; \
- })
-@@ -61,14 +61,14 @@
- unsigned int __tmp, __tmp2; \
- __asm __volatile (__ARCH_REL_INSTR "\n" \
- " clrldi %1,%1,32\n" \
-- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \
-+ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \
- " subf. %0,%1,%0\n" \
- " bne 2f\n" \
-- " stwcx. %4,0,%2\n" \
-+ " stwcx. %4,%y2\n" \
- " bne- 1b\n" \
- "2: " \
-- : "=&r" (__tmp), "=r" (__tmp2) \
-- : "b" (mem), "1" (oldval), "r" (newval) \
-+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \
-+ : "1" (oldval), "r" (newval) \
- : "cr0", "memory"); \
- __tmp != 0; \
- })
-@@ -82,14 +82,14 @@
- ({ \
- unsigned long __tmp; \
- __asm __volatile ( \
-- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \
-+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \
- " subf. %0,%2,%0\n" \
- " bne 2f\n" \
-- " stdcx. %3,0,%1\n" \
-+ " stdcx. %3,%y1\n" \
- " bne- 1b\n" \
- "2: " __ARCH_ACQ_INSTR \
-- : "=&r" (__tmp) \
-- : "b" (mem), "r" (oldval), "r" (newval) \
-+ : "=&r" (__tmp), "+Z" (*(mem)) \
-+ : "r" (oldval), "r" (newval) \
- : "cr0", "memory"); \
- __tmp != 0; \
- })
-@@ -98,14 +98,14 @@
- ({ \
- unsigned long __tmp; \
- __asm __volatile (__ARCH_REL_INSTR "\n" \
-- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \
-+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \
- " subf. %0,%2,%0\n" \
- " bne 2f\n" \
-- " stdcx. %3,0,%1\n" \
-+ " stdcx. %3,%y1\n" \
- " bne- 1b\n" \
- "2: " \
-- : "=&r" (__tmp) \
-- : "b" (mem), "r" (oldval), "r" (newval) \
-+ : "=&r" (__tmp), "+Z" (*(mem)) \
-+ : "r" (oldval), "r" (newval) \
- : "cr0", "memory"); \
- __tmp != 0; \
- })
-@@ -115,14 +115,14 @@
- __typeof (*(mem)) __tmp; \
- __typeof (mem) __memp = (mem); \
- __asm __volatile ( \
-- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \
-+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \
- " cmpd %0,%2\n" \
- " bne 2f\n" \
-- " stdcx. %3,0,%1\n" \
-+ " stdcx. %3,%y1\n" \
- " bne- 1b\n" \
- "2: " __ARCH_ACQ_INSTR \
-- : "=&r" (__tmp) \
-- : "b" (__memp), "r" (oldval), "r" (newval) \
-+ : "=&r" (__tmp), "+Z" (*__memp) \
-+ : "r" (oldval), "r" (newval) \
- : "cr0", "memory"); \
- __tmp; \
- })
-@@ -132,14 +132,14 @@
- __typeof (*(mem)) __tmp; \
- __typeof (mem) __memp = (mem); \
- __asm __volatile (__ARCH_REL_INSTR "\n" \
-- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \
-+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \
- " cmpd %0,%2\n" \
- " bne 2f\n" \
-- " stdcx. %3,0,%1\n" \
-+ " stdcx. %3,%y1\n" \
- " bne- 1b\n" \
- "2: " \
-- : "=&r" (__tmp) \
-- : "b" (__memp), "r" (oldval), "r" (newval) \
-+ : "=&r" (__tmp), "+Z" (*__memp) \
-+ : "r" (oldval), "r" (newval) \
- : "cr0", "memory"); \
- __tmp; \
- })
-@@ -148,12 +148,12 @@
- ({ \
- __typeof (*mem) __val; \
- __asm __volatile (__ARCH_REL_INSTR "\n" \
-- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \
-- " stdcx. %3,0,%2\n" \
-+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \
-+ " stdcx. %2,%y1\n" \
- " bne- 1b\n" \
- " " __ARCH_ACQ_INSTR \
-- : "=&r" (__val), "=m" (*mem) \
-- : "b" (mem), "r" (value), "m" (*mem) \
-+ : "=&r" (__val), "+Z" (*(mem)) \
-+ : "r" (value) \
- : "cr0", "memory"); \
- __val; \
- })
-@@ -162,11 +162,11 @@
- ({ \
- __typeof (*mem) __val; \
- __asm __volatile (__ARCH_REL_INSTR "\n" \
-- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \
-- " stdcx. %3,0,%2\n" \
-+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \
-+ " stdcx. %2,%y1\n" \
- " bne- 1b" \
-- : "=&r" (__val), "=m" (*mem) \
-- : "b" (mem), "r" (value), "m" (*mem) \
-+ : "=&r" (__val), "+Z" (*(mem)) \
-+ : "r" (value) \
- : "cr0", "memory"); \
- __val; \
- })
-@@ -174,12 +174,12 @@
- #define __arch_atomic_exchange_and_add_64(mem, value) \
- ({ \
- __typeof (*mem) __val, __tmp; \
-- __asm __volatile ("1: ldarx %0,0,%3\n" \
-- " add %1,%0,%4\n" \
-- " stdcx. %1,0,%3\n" \
-+ __asm __volatile ("1: ldarx %0,%y2\n" \
-+ " add %1,%0,%3\n" \
-+ " stdcx. %1,%y2\n" \
- " bne- 1b" \
-- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
-- : "b" (mem), "r" (value), "m" (*mem) \
-+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \
-+ : "r" (value) \
- : "cr0", "memory"); \
- __val; \
- })
-@@ -187,12 +187,12 @@
- #define __arch_atomic_increment_val_64(mem) \
- ({ \
- __typeof (*(mem)) __val; \
-- __asm __volatile ("1: ldarx %0,0,%2\n" \
-+ __asm __volatile ("1: ldarx %0,%y1\n" \
- " addi %0,%0,1\n" \
-- " stdcx. %0,0,%2\n" \
-+ " stdcx. %0,%y1\n" \
- " bne- 1b" \
-- : "=&b" (__val), "=m" (*mem) \
-- : "b" (mem), "m" (*mem) \
-+ : "=&b" (__val), "+Z" (*(mem)) \
-+ : \
- : "cr0", "memory"); \
- __val; \
- })
-@@ -200,27 +200,27 @@
- #define __arch_atomic_decrement_val_64(mem) \
- ({ \
- __typeof (*(mem)) __val; \
-- __asm __volatile ("1: ldarx %0,0,%2\n" \
-+ __asm __volatile ("1: ldarx %0,%y1\n" \
- " subi %0,%0,1\n" \
-- " stdcx. %0,0,%2\n" \
-+ " stdcx. %0,%y1\n" \
- " bne- 1b" \
-- : "=&b" (__val), "=m" (*mem) \
-- : "b" (mem), "m" (*mem) \
-+ : "=&b" (__val), "+Z" (*(mem)) \
-+ : \
- : "cr0", "memory"); \
- __val; \
- })
-
- #define __arch_atomic_decrement_if_positive_64(mem) \
- ({ int __val, __tmp; \
-- __asm __volatile ("1: ldarx %0,0,%3\n" \
-+ __asm __volatile ("1: ldarx %0,%y2\n" \
- " cmpdi 0,%0,0\n" \
- " addi %1,%0,-1\n" \
- " ble 2f\n" \
-- " stdcx. %1,0,%3\n" \
-+ " stdcx. %1,%y2\n" \
- " bne- 1b\n" \
- "2: " __ARCH_ACQ_INSTR \
-- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \
-- : "b" (mem), "m" (*mem) \
-+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \
-+ : \
- : "cr0", "memory"); \
- __val; \
- })
diff --git a/packages/glibc-ports/2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/packages/glibc-ports/2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
index 4f4dbec..b7d54ac 100644
--- a/packages/glibc-ports/2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
+++ b/packages/glibc-ports/2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
@@ -1,9 +1,9 @@
http://yann.poupet.free.fr/ep93xx/
Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/bits/endian.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/bits/endian.h
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/arm/bits/endian.h glibc-ports-2.13/sysdeps/arm/bits/endian.h
+--- glibc-ports-2.13.orig/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100
@@ -12,7 +12,7 @@
/* FPA floating point units are always big-endian, irrespective of the
CPU endianness. VFP floating point units use the same endianness
@@ -13,9 +13,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/bits/endian.h glibc-2.13
#define __FLOAT_WORD_ORDER __BYTE_ORDER
#else
#define __FLOAT_WORD_ORDER __BIG_ENDIAN
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/__longjmp.S glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S
+--- glibc-ports-2.13.orig/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100
@@ -30,7 +30,33 @@
movs r0, r1 /* get the return value in place */
moveq r0, #1 /* can't let setjmp() return zero! */
@@ -50,9 +50,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S glibc-2.
LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
END (__longjmp)
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/bits/fenv.h glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h
+--- glibc-ports-2.13.orig/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100
@@ -20,6 +20,45 @@
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
#endif
@@ -108,9 +108,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h glibc-2.
/* Type representing exception flags. */
typedef unsigned long int fexcept_t;
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/bits/setjmp.h glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h
+--- glibc-ports-2.13.orig/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100
@@ -28,7 +28,11 @@
#ifndef _ASM
/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
@@ -123,9 +123,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h glibc-
+#endif
#endif
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/fegetround.c glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c
+--- glibc-ports-2.13.orig/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100
@@ -18,9 +18,21 @@
02111-1307 USA. */
@@ -148,9 +148,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c glibc-2
+
+#endif
}
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/fesetround.c glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c
+--- glibc-ports-2.13.orig/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100
@@ -18,12 +18,28 @@
02111-1307 USA. */
@@ -180,9 +180,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c glibc-2
}
libm_hidden_def (fesetround)
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/fpu_control.h glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h
+--- glibc-ports-2.13.orig/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100
@@ -1,5 +1,6 @@
/* FPU control word definitions. ARM version.
- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
@@ -278,9 +278,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h glibc-
+#endif
+
#endif /* _FPU_CONTROL_H */
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h
+--- glibc-ports-2.13.orig/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100
@@ -17,4 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
@@ -290,9 +290,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h gli
+#else
#define __JMP_BUF_SP 20
+#endif
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/setjmp.S glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S
+--- glibc-ports-2.13.orig/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100
@@ -24,11 +24,41 @@
ENTRY (__sigsetjmp)
@@ -335,9 +335,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S glibc-2.13/
/* Make a tail call to __sigjmp_save; it takes the same args. */
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gccframe.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/gccframe.h
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/arm/gccframe.h glibc-ports-2.13/sysdeps/arm/gccframe.h
+--- glibc-ports-2.13.orig/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100
@@ -17,6 +17,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
@@ -349,9 +349,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gccframe.h glibc-2.13/gl
+#endif
#include <sysdeps/generic/gccframe.h>
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/arm/gmp-mparam.h glibc-ports-2.13/sysdeps/arm/gmp-mparam.h
+--- glibc-ports-2.13.orig/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100
@@ -29,7 +29,7 @@
#if defined(__ARMEB__)
# define IEEE_DOUBLE_MIXED_ENDIAN 0
@@ -361,14 +361,3 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h glibc-2.13/
# define IEEE_DOUBLE_MIXED_ENDIAN 0
# define IEEE_DOUBLE_BIG_ENDIAN 0
#else
-diff -durN glibc-2.13.orig/ports/sysdeps/arm/bits/endian.h glibc-2.13/ports/sysdeps/arm/bits/endian.h
-diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.13/ports/sysdeps/arm/fpu/__longjmp.S
-diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.13/ports/sysdeps/arm/fpu/bits/fenv.h
-diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.13/ports/sysdeps/arm/fpu/bits/setjmp.h
-diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.13/ports/sysdeps/arm/fpu/fegetround.c
-diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.13/ports/sysdeps/arm/fpu/fesetround.c
-diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.13/ports/sysdeps/arm/fpu/fpu_control.h
-diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.13/ports/sysdeps/arm/fpu/jmpbuf-offsets.h
-diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.13/ports/sysdeps/arm/fpu/setjmp.S
-diff -durN glibc-2.13.orig/ports/sysdeps/arm/gccframe.h glibc-2.13/ports/sysdeps/arm/gccframe.h
-diff -durN glibc-2.13.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.13/ports/sysdeps/arm/gmp-mparam.h
diff --git a/packages/glibc-ports/2.13/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.13/580-nptl-lowlevellock.patch
index 08518e9..9f3fb76 100644
--- a/packages/glibc-ports/2.13/580-nptl-lowlevellock.patch
+++ b/packages/glibc-ports/2.13/580-nptl-lowlevellock.patch
@@ -9,9 +9,9 @@ In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21:
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.)
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function)
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+--- glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100
@@ -25,6 +25,7 @@
#include <atomic.h>
#include <sysdep.h>
@@ -20,4 +20,3 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/low
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
-diff -durN glibc-2.13.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.13/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
diff --git a/packages/glibc-ports/2.13/610-fpu-cw-mips.patch b/packages/glibc-ports/2.13/610-fpu-cw-mips.patch
index cd2b4d9..c6345b3 100644
--- a/packages/glibc-ports/2.13/610-fpu-cw-mips.patch
+++ b/packages/glibc-ports/2.13/610-fpu-cw-mips.patch
@@ -1,8 +1,8 @@
http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html
-diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/mips/fpu_control.h glibc-2.13/glibc-ports-2.13/sysdeps/mips/fpu_control.h
---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.13/glibc-ports-2.13/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100
+diff -durN glibc-ports-2.13.orig/sysdeps/mips/fpu_control.h glibc-ports-2.13/sysdeps/mips/fpu_control.h
+--- glibc-ports-2.13.orig/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.13/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100
@@ -86,7 +86,7 @@
#define _FPU_RC_UP 0x2
#define _FPU_RC_DOWN 0x3
@@ -12,4 +12,3 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/mips/fpu_control.h glibc-2.1
/* The fdlibm code requires strict IEEE double precision arithmetic,
-diff -durN glibc-2.13.orig/ports/sysdeps/mips/fpu_control.h glibc-2.13/ports/sysdeps/mips/fpu_control.h
diff --git a/packages/glibc-ports/2.13/630-mips_shn_undef-hack.patch b/packages/glibc-ports/2.13/630-mips_shn_undef-hack.patch
deleted file mode 100644
index 791d76c..0000000
--- a/packages/glibc-ports/2.13/630-mips_shn_undef-hack.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c
---- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200
-+++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100
-@@ -301,6 +301,12 @@
- /* FALLTHROUGH */
- case STB_GLOBAL:
- success:
-+#ifdef __mips__
-+ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF
-+ symbols, we skip them. */
-+ if (sym->st_shndx == SHN_UNDEF)
-+ break;
-+#endif
- /* Global definition. Just what we need. */
- result->s = sym;
- result->m = (struct link_map *) map;
diff --git a/packages/glibc-ports/2.13/640-alpha-atfcts.patch b/packages/glibc-ports/2.13/640-alpha-atfcts.patch
deleted file mode 100644
index 7a8a94a..0000000
--- a/packages/glibc-ports/2.13/640-alpha-atfcts.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300
-+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200
-@@ -437,7 +437,8 @@
- the code. On PPC they were introduced in 2.6.17-rc1,
- on SH in 2.6.19-rc1. */
- #if __LINUX_KERNEL_VERSION >= 0x020611 \
-- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613)
-+ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \
-+ && (!defined __alpha__)
- # define __ASSUME_ATFCTS 1
- #endif
-
diff --git a/packages/glibc-ports/2.13/670-support-hard-float-eabi.patch b/packages/glibc-ports/2.13/670-support-hard-float-eabi.patch
index 589f11e..ec00405 100644
--- a/packages/glibc-ports/2.13/670-support-hard-float-eabi.patch
+++ b/packages/glibc-ports/2.13/670-support-hard-float-eabi.patch
@@ -1,6 +1,6 @@
-diff -ur glibc-2.13/ports/sysdeps/arm/preconfigure glibc-2.13-patched/ports/sysdeps/arm/preconfigure
---- glibc-2.13/ports/sysdeps/arm/preconfigure 2011-01-25 14:00:16.000000000 -0700
-+++ glibc-2.13-patched/ports/sysdeps/arm/preconfigure 2017-03-07 15:36:50.310454000 -0700
+diff -ur glibc-2.13/sysdeps/arm/preconfigure glibc-2.13-patched/sysdeps/arm/preconfigure
+--- glibc-2.13/sysdeps/arm/preconfigure 2011-01-25 14:00:16.000000000 -0700
++++ glibc-2.13-patched/sysdeps/arm/preconfigure 2017-03-07 15:36:50.310454000 -0700
@@ -2,7 +2,7 @@
arm*)
base_machine=arm
@@ -10,9 +10,9 @@ diff -ur glibc-2.13/ports/sysdeps/arm/preconfigure glibc-2.13-patched/ports/sysd
machine=arm/eabi/$machine
if [ "${CFLAGS+set}" != "set" ]; then
CFLAGS="-g -O2"
-diff -ur glibc-2.13/ports/sysdeps/arm/shlib-versions glibc-2.13-patched/ports/sysdeps/arm/shlib-versions
---- glibc-2.13/ports/sysdeps/arm/shlib-versions 2011-01-25 14:00:16.000000000 -0700
-+++ glibc-2.13-patched/ports/sysdeps/arm/shlib-versions 2017-03-07 15:36:50.312457000 -0700
+diff -ur glibc-2.13/sysdeps/arm/shlib-versions glibc-2.13-patched/sysdeps/arm/shlib-versions
+--- glibc-2.13/sysdeps/arm/shlib-versions 2011-01-25 14:00:16.000000000 -0700
++++ glibc-2.13-patched/sysdeps/arm/shlib-versions 2017-03-07 15:36:50.312457000 -0700
@@ -1,4 +1,4 @@
-arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4
+arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4
diff --git a/packages/glibc-ports/2.13/version.desc b/packages/glibc-ports/2.13/version.desc
index e69de29..d44e333 100644
--- a/packages/glibc-ports/2.13/version.desc
+++ b/packages/glibc-ports/2.13/version.desc
@@ -0,0 +1 @@
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/glibc-ports/2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc-ports/2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch
index 1a632fe..259b285 100644
--- a/packages/glibc-ports/2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch
+++ b/packages/glibc-ports/2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch
@@ -20,8 +20,8 @@ Tested that this fixes the build for ARM.
sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++-
sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++-
3 files changed, 11 insertions(+), 2 deletions(-)
---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
+--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
@@ -23,7 +23,8 @@
#include <pthreadP.h>
@@ -35,8 +35,8 @@ Tested that this fixes the build for ARM.
static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c
index bff3e2b..1f1eb71 100644
---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
+--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
@@ -21,7 +21,8 @@
#include <stdio.h>
#include <unwind.h>
@@ -47,8 +47,8 @@ index bff3e2b..1f1eb71 100644
static _Unwind_Reason_Code (*libgcc_s_personality)
(int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
struct _Unwind_Context *);
---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
+--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
@@ -23,7 +23,8 @@
#include <pthreadP.h>
@@ -59,8 +59,8 @@ index bff3e2b..1f1eb71 100644
static _Unwind_Reason_Code (*libgcc_s_personality)
(_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
+--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
@@ -21,7 +21,8 @@
#include <stdio.h>
#include <unwind.h>
diff --git a/packages/glibc-ports/2.14.1/330-m68k-sys-user.patch b/packages/glibc-ports/2.14.1/330-m68k-sys-user.patch
index 8fbe2e5..6476b5c 100644
--- a/packages/glibc-ports/2.14.1/330-m68k-sys-user.patch
+++ b/packages/glibc-ports/2.14.1/330-m68k-sys-user.patch
@@ -1,8 +1,8 @@
copied from kernel as it is sanitized now
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h
+--- glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100
@@ -1,3 +1,90 @@
+#ifndef _SYS_USER_H
+#define _SYS_USER_H
@@ -94,4 +94,3 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys
/* Copyright (C) 2008, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-diff -durN glibc-2.14.1.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14.1/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h
diff --git a/packages/glibc-ports/2.14.1/440-alpha-cache-shape.patch b/packages/glibc-ports/2.14.1/440-alpha-cache-shape.patch
index 8ca0bd6..989bfd7 100644
--- a/packages/glibc-ports/2.14.1/440-alpha-cache-shape.patch
+++ b/packages/glibc-ports/2.14.1/440-alpha-cache-shape.patch
@@ -5,9 +5,9 @@ duplication for static builds with dl-sysdep and dl-support. since dl-sysdep
is both shared/static, there is no point in hooking dl-support anymore, so we
can punt it.
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c
+--- glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100
@@ -1,2 +1,1 @@
-#include "dl-auxv.h"
#include <elf/dl-support.c>
diff --git a/packages/glibc-ports/2.14.1/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc-ports/2.14.1/460-alpha-fix-gcc-4.1-warnings.patch
index c3e59f4..2ed4118 100644
--- a/packages/glibc-ports/2.14.1/460-alpha-fix-gcc-4.1-warnings.patch
+++ b/packages/glibc-ports/2.14.1/460-alpha-fix-gcc-4.1-warnings.patch
@@ -16,9 +16,9 @@ I cannot really think of anything better than
ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c
+--- glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100
@@ -178,13 +178,13 @@
static inline void
stb_mb(unsigned char val, unsigned long addr)
@@ -53,4 +53,3 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/io
return r;
}
-diff -durN glibc-2.14.1.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14.1/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c
diff --git a/packages/glibc-ports/2.14.1/530-alpha-fix-rtld-fPIC.patch b/packages/glibc-ports/2.14.1/530-alpha-fix-rtld-fPIC.patch
index 2691a99..56bc532 100644
--- a/packages/glibc-ports/2.14.1/530-alpha-fix-rtld-fPIC.patch
+++ b/packages/glibc-ports/2.14.1/530-alpha-fix-rtld-fPIC.patch
@@ -5,9 +5,9 @@
ports/sysdeps/alpha/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/alpha/Makefile glibc-2.14.1/glibc-ports-2.14.1/sysdeps/alpha/Makefile
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/alpha/Makefile glibc-ports-2.14.1/sysdeps/alpha/Makefile
+--- glibc-ports-2.14.1.orig/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100
@@ -35,7 +35,8 @@
ifeq ($(subdir),elf)
@@ -18,4 +18,3 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/alpha/Makefile glibc-2.1
endif
# Build everything with full IEEE math support, and with dynamic rounding;
-diff -durN glibc-2.14.1.orig/ports/sysdeps/alpha/Makefile glibc-2.14.1/ports/sysdeps/alpha/Makefile
diff --git a/packages/glibc-ports/2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/packages/glibc-ports/2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
index 5e45682..80032ed 100644
--- a/packages/glibc-ports/2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
+++ b/packages/glibc-ports/2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
@@ -1,9 +1,9 @@
http://yann.poupet.free.fr/ep93xx/
Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/bits/endian.h glibc-ports-2.14.1/sysdeps/arm/bits/endian.h
+--- glibc-ports-2.14.1.orig/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100
@@ -12,7 +12,7 @@
/* FPA floating point units are always big-endian, irrespective of the
CPU endianness. VFP floating point units use the same endianness
@@ -13,9 +13,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h glibc-
#define __FLOAT_WORD_ORDER __BYTE_ORDER
#else
#define __FLOAT_WORD_ORDER __BIG_ENDIAN
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/__longjmp.S glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S
+--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100
@@ -30,7 +30,33 @@
movs r0, r1 /* get the return value in place */
moveq r0, #1 /* can't let setjmp() return zero! */
@@ -50,9 +50,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S glib
LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
END (__longjmp)
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/bits/fenv.h glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h
+--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100
@@ -20,6 +20,45 @@
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
#endif
@@ -108,9 +108,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h glib
/* Type representing exception flags. */
typedef unsigned long int fexcept_t;
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/bits/setjmp.h glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h
+--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100
@@ -28,7 +28,11 @@
#ifndef _ASM
/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
@@ -123,9 +123,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h gl
+#endif
#endif
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/fegetround.c glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c
+--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100
@@ -18,9 +18,21 @@
02111-1307 USA. */
@@ -148,9 +148,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c gli
+
+#endif
}
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/fesetround.c glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c
+--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100
@@ -18,12 +18,28 @@
02111-1307 USA. */
@@ -180,9 +180,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c gli
}
libm_hidden_def (fesetround)
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/fpu_control.h glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h
+--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100
@@ -1,5 +1,6 @@
/* FPU control word definitions. ARM version.
- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
@@ -278,9 +278,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h gl
+#endif
+
#endif /* _FPU_CONTROL_H */
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h
+--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100
@@ -17,4 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
@@ -290,9 +290,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h
+#else
#define __JMP_BUF_SP 20
+#endif
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/setjmp.S glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S
+--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100
@@ -24,11 +24,41 @@
ENTRY (__sigsetjmp)
@@ -335,9 +335,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S glibc-2
/* Make a tail call to __sigjmp_save; it takes the same args. */
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gccframe.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gccframe.h
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/gccframe.h glibc-ports-2.14.1/sysdeps/arm/gccframe.h
+--- glibc-ports-2.14.1.orig/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100
@@ -17,6 +17,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
@@ -349,9 +349,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gccframe.h glibc-2.1
+#endif
#include <sysdeps/generic/gccframe.h>
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/gmp-mparam.h glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h
+--- glibc-ports-2.14.1.orig/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100
@@ -29,7 +29,7 @@
#if defined(__ARMEB__)
# define IEEE_DOUBLE_MIXED_ENDIAN 0
@@ -361,14 +361,3 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h glibc-2
# define IEEE_DOUBLE_MIXED_ENDIAN 0
# define IEEE_DOUBLE_BIG_ENDIAN 0
#else
-diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/bits/endian.h glibc-2.14.1/ports/sysdeps/arm/bits/endian.h
-diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.14.1/ports/sysdeps/arm/fpu/__longjmp.S
-diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.14.1/ports/sysdeps/arm/fpu/bits/fenv.h
-diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14.1/ports/sysdeps/arm/fpu/bits/setjmp.h
-diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.14.1/ports/sysdeps/arm/fpu/fegetround.c
-diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.14.1/ports/sysdeps/arm/fpu/fesetround.c
-diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.14.1/ports/sysdeps/arm/fpu/fpu_control.h
-diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14.1/ports/sysdeps/arm/fpu/jmpbuf-offsets.h
-diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.14.1/ports/sysdeps/arm/fpu/setjmp.S
-diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/gccframe.h glibc-2.14.1/ports/sysdeps/arm/gccframe.h
-diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.14.1/ports/sysdeps/arm/gmp-mparam.h
diff --git a/packages/glibc-ports/2.14.1/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.14.1/580-nptl-lowlevellock.patch
index 6bf5250..62b74d8 100644
--- a/packages/glibc-ports/2.14.1/580-nptl-lowlevellock.patch
+++ b/packages/glibc-ports/2.14.1/580-nptl-lowlevellock.patch
@@ -9,9 +9,9 @@ In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21:
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.)
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function)
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+--- glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100
@@ -25,6 +25,7 @@
#include <atomic.h>
#include <sysdep.h>
@@ -20,4 +20,3 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
-diff -durN glibc-2.14.1.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14.1/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
diff --git a/packages/glibc-ports/2.14.1/610-fpu-cw-mips.patch b/packages/glibc-ports/2.14.1/610-fpu-cw-mips.patch
index e53ac78..4b8365a 100644
--- a/packages/glibc-ports/2.14.1/610-fpu-cw-mips.patch
+++ b/packages/glibc-ports/2.14.1/610-fpu-cw-mips.patch
@@ -1,8 +1,8 @@
http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html
-diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h
---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100
+diff -durN glibc-ports-2.14.1.orig/sysdeps/mips/fpu_control.h glibc-ports-2.14.1/sysdeps/mips/fpu_control.h
+--- glibc-ports-2.14.1.orig/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.14.1/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100
@@ -86,7 +86,7 @@
#define _FPU_RC_UP 0x2
#define _FPU_RC_DOWN 0x3
@@ -12,4 +12,3 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h glibc
/* The fdlibm code requires strict IEEE double precision arithmetic,
-diff -durN glibc-2.14.1.orig/ports/sysdeps/mips/fpu_control.h glibc-2.14.1/ports/sysdeps/mips/fpu_control.h
diff --git a/packages/glibc-ports/2.14/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc-ports/2.14/090-Fix-ARM-build-with-GCC-trunk.patch
deleted file mode 100644
index 1a632fe..0000000
--- a/packages/glibc-ports/2.14/090-Fix-ARM-build-with-GCC-trunk.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001
-From: Joseph Myers <joseph@codesourcery.com>
-Date: Tue, 20 May 2014 21:27:13 +0000
-Subject: [PATCH] Fix ARM build with GCC trunk.
-
-sysdeps/unix/sysv/linux/arm/unwind-resume.c and
-sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static
-variables that are written in C code but only read from toplevel asms.
-Current GCC trunk now optimizes away such apparently write-only static
-variables, so causing a build failure. This patch marks those
-variables with __attribute_used__ to avoid that optimization.
-
-Tested that this fixes the build for ARM.
-
- * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
- (libgcc_s_resume): Use __attribute_used__.
- * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume):
- Likewise.
----
- sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++-
- sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++-
- 3 files changed, 11 insertions(+), 2 deletions(-)
---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
-@@ -23,7 +23,8 @@
- #include <pthreadP.h>
-
- static void *libgcc_s_handle;
--static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
-+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
-+ __attribute_used__;
- static _Unwind_Reason_Code (*libgcc_s_personality)
- (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
- struct _Unwind_Context *);
- static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
-diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c
-index bff3e2b..1f1eb71 100644
---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
-@@ -21,7 +21,8 @@
- #include <stdio.h>
- #include <unwind.h>
-
--static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
-+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
-+ __attribute_used__;
- static _Unwind_Reason_Code (*libgcc_s_personality)
- (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
- struct _Unwind_Context *);
---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
-@@ -23,7 +23,8 @@
- #include <pthreadP.h>
-
- static void *libgcc_s_handle;
--static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
-+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
-+ __attribute_used__;
- static _Unwind_Reason_Code (*libgcc_s_personality)
- (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
- static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
-@@ -21,7 +21,8 @@
- #include <stdio.h>
- #include <unwind.h>
-
--static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
-+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
-+ __attribute_used__;
- static _Unwind_Reason_Code (*libgcc_s_personality)
- (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
diff --git a/packages/glibc-ports/2.14/330-m68k-sys-user.patch b/packages/glibc-ports/2.14/330-m68k-sys-user.patch
deleted file mode 100644
index 28bcb11..0000000
--- a/packages/glibc-ports/2.14/330-m68k-sys-user.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-copied from kernel as it is sanitized now
-
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100
-@@ -1,3 +1,90 @@
-+#ifndef _SYS_USER_H
-+#define _SYS_USER_H
-+
-+/* Core file format: The core file is written in such a way that gdb
-+ can understand it and provide useful information to the user (under
-+ linux we use the 'trad-core' bfd). There are quite a number of
-+ obstacles to being able to view the contents of the floating point
-+ registers, and until these are solved you will not be able to view the
-+ contents of them. Actually, you can read in the core file and look at
-+ the contents of the user struct to find out what the floating point
-+ registers contain.
-+ The actual file contents are as follows:
-+ UPAGE: 1 page consisting of a user struct that tells gdb what is present
-+ in the file. Directly after this is a copy of the task_struct, which
-+ is currently not used by gdb, but it may come in useful at some point.
-+ All of the registers are stored as part of the upage. The upage should
-+ always be only one page.
-+ DATA: The data area is stored. We use current->end_text to
-+ current->brk to pick up all of the user variables, plus any memory
-+ that may have been malloced. No attempt is made to determine if a page
-+ is demand-zero or if a page is totally unused, we just cover the entire
-+ range. All of the addresses are rounded in such a way that an integral
-+ number of pages is written.
-+ STACK: We need the stack information in order to get a meaningful
-+ backtrace. We need to write the data from (esp) to
-+ current->start_stack, so we round each of these off in order to be able
-+ to write an integer number of pages.
-+ The minimum core file size is 3 pages, or 12288 bytes.
-+*/
-+
-+struct user_m68kfp_struct {
-+ unsigned long fpregs[8*3]; /* fp0-fp7 registers */
-+ unsigned long fpcntl[3]; /* fp control regs */
-+};
-+
-+/* This is the old layout of "struct pt_regs" as of Linux 1.x, and
-+ is still the layout used by user (the new pt_regs doesn't have
-+ all registers). */
-+struct user_regs_struct {
-+ long d1,d2,d3,d4,d5,d6,d7;
-+ long a0,a1,a2,a3,a4,a5,a6;
-+ long d0;
-+ long usp;
-+ long orig_d0;
-+ short stkadj;
-+ short sr;
-+ long pc;
-+ short fmtvec;
-+ short __fill;
-+};
-+
-+
-+/* When the kernel dumps core, it starts by dumping the user struct -
-+ this will be used by gdb to figure out where the data and stack segments
-+ are within the file, and what virtual addresses to use. */
-+struct user{
-+/* We start with the registers, to mimic the way that "memory" is returned
-+ from the ptrace(3,...) function. */
-+ struct user_regs_struct regs; /* Where the registers are actually stored */
-+/* ptrace does not yet supply these. Someday.... */
-+ int u_fpvalid; /* True if math co-processor being used. */
-+ /* for this mess. Not yet used. */
-+ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */
-+/* The rest of this junk is to help gdb figure out what goes where */
-+ unsigned long int u_tsize; /* Text segment size (pages). */
-+ unsigned long int u_dsize; /* Data segment size (pages). */
-+ unsigned long int u_ssize; /* Stack segment size (pages). */
-+ unsigned long start_code; /* Starting virtual address of text. */
-+ unsigned long start_stack; /* Starting virtual address of stack area.
-+ This is actually the bottom of the stack,
-+ the top of the stack is always found in the
-+ esp register. */
-+ long int signal; /* Signal that caused the core dump. */
-+ int reserved; /* No longer used */
-+ struct user_regs_struct *u_ar0;
-+ /* Used by gdb to help find the values for */
-+ /* the registers. */
-+ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */
-+ unsigned long magic; /* To uniquely identify a core file */
-+ char u_comm[32]; /* User command that was responsible */
-+};
-+#define NBPG 4096
-+#define UPAGES 1
-+#define HOST_TEXT_START_ADDR (u.start_code)
-+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
-+
-+#endif
- /* Copyright (C) 2008, 2010 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
-diff -durN glibc-2.14.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h
diff --git a/packages/glibc-ports/2.14/440-alpha-cache-shape.patch b/packages/glibc-ports/2.14/440-alpha-cache-shape.patch
deleted file mode 100644
index def0181..0000000
--- a/packages/glibc-ports/2.14/440-alpha-cache-shape.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-older verisons of glibc would build dl-sysdep as shared-only and dl-support as
-static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of
-glibc build dl-sysdep as both shared and static which means we now have symbol
-duplication for static builds with dl-sysdep and dl-support. since dl-sysdep
-is both shared/static, there is no point in hooking dl-support anymore, so we
-can punt it.
-
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100
-@@ -1,2 +1,1 @@
--#include "dl-auxv.h"
- #include <elf/dl-support.c>
diff --git a/packages/glibc-ports/2.14/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc-ports/2.14/460-alpha-fix-gcc-4.1-warnings.patch
deleted file mode 100644
index 1569ce4..0000000
--- a/packages/glibc-ports/2.14/460-alpha-fix-gcc-4.1-warnings.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-2006-05-30 Falk Hueffner <falk@debian.org>
-
- * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture
- to ev6 in assembly code.
-
-{standard input}: Assembler messages:
-{standard input}:341: Error: macro requires $at register while noat in effect
-{standard input}:374: Error: macro requires $at register while noat in effect
-{standard input}:438: Error: macro requires $at register while noat in effect
-{standard input}:471: Error: macro requires $at register while noat in effect
-make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1
-
-Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as.
-I cannot really think of anything better than
-
- ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100
-@@ -178,13 +178,13 @@
- static inline void
- stb_mb(unsigned char val, unsigned long addr)
- {
-- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val));
-+ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val));
- }
-
- static inline void
- stw_mb(unsigned short val, unsigned long addr)
- {
-- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val));
-+ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val));
- }
-
- static inline void
-@@ -356,7 +356,7 @@
- unsigned long int addr = dense_port_to_cpu_addr (port);
- unsigned char r;
-
-- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr));
-+ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr));
- return r;
- }
-
-@@ -366,7 +366,7 @@
- unsigned long int addr = dense_port_to_cpu_addr (port);
- unsigned short r;
-
-- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr));
-+ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr));
- return r;
- }
-
-diff -durN glibc-2.14.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c
diff --git a/packages/glibc-ports/2.14/530-alpha-fix-rtld-fPIC.patch b/packages/glibc-ports/2.14/530-alpha-fix-rtld-fPIC.patch
deleted file mode 100644
index 3560e2a..0000000
--- a/packages/glibc-ports/2.14/530-alpha-fix-rtld-fPIC.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-2009-05-26 Aurelien Jarno <aurelien@aurel32.net>
-
- * sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag).
-
- ports/sysdeps/alpha/Makefile | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/alpha/Makefile glibc-2.14/glibc-ports-2.14/sysdeps/alpha/Makefile
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100
-@@ -35,7 +35,8 @@
-
- ifeq ($(subdir),elf)
- # The ld.so startup code cannot use literals until it self-relocates.
--CFLAGS-rtld.c = -mbuild-constants
-+# It uses more than 64k for the small data area.
-+CFLAGS-rtld.c = -mbuild-constants $(PIC-ccflag)
- endif
-
- # Build everything with full IEEE math support, and with dynamic rounding;
-diff -durN glibc-2.14.orig/ports/sysdeps/alpha/Makefile glibc-2.14/ports/sysdeps/alpha/Makefile
diff --git a/packages/glibc-ports/2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/packages/glibc-ports/2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
deleted file mode 100644
index b297ff0..0000000
--- a/packages/glibc-ports/2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
+++ /dev/null
@@ -1,374 +0,0 @@
-http://yann.poupet.free.fr/ep93xx/
-Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series
-
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/bits/endian.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/bits/endian.h
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100
-@@ -12,7 +12,7 @@
- /* FPA floating point units are always big-endian, irrespective of the
- CPU endianness. VFP floating point units use the same endianness
- as the rest of the system. */
--#ifdef __VFP_FP__
-+#if defined __VFP_FP__ || defined __MAVERICK__
- #define __FLOAT_WORD_ORDER __BYTE_ORDER
- #else
- #define __FLOAT_WORD_ORDER __BIG_ENDIAN
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100
-@@ -30,7 +30,33 @@
- movs r0, r1 /* get the return value in place */
- moveq r0, #1 /* can't let setjmp() return zero! */
-
-+#ifdef __MAVERICK__
-+ cfldrd mvd4, [ip], #8
-+ nop
-+ cfldrd mvd5, [ip], #8
-+ nop
-+ cfldrd mvd6, [ip], #8
-+ nop
-+ cfldrd mvd7, [ip], #8
-+ nop
-+ cfldrd mvd8, [ip], #8
-+ nop
-+ cfldrd mvd9, [ip], #8
-+ nop
-+ cfldrd mvd10, [ip], #8
-+ nop
-+ cfldrd mvd11, [ip], #8
-+ nop
-+ cfldrd mvd12, [ip], #8
-+ nop
-+ cfldrd mvd13, [ip], #8
-+ nop
-+ cfldrd mvd14, [ip], #8
-+ nop
-+ cfldrd mvd15, [ip], #8
-+#else
- lfmfd f4, 4, [ip] ! /* load the floating point regs */
-+#endif
-
- LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
- END (__longjmp)
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100
-@@ -20,6 +20,45 @@
- # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
- #endif
-
-+#if defined(__MAVERICK__)
-+
-+/* Define bits representing exceptions in the FPU status word. */
-+enum
-+ {
-+ FE_INVALID = 1,
-+#define FE_INVALID FE_INVALID
-+ FE_OVERFLOW = 4,
-+#define FE_OVERFLOW FE_OVERFLOW
-+ FE_UNDERFLOW = 8,
-+#define FE_UNDERFLOW FE_UNDERFLOW
-+ FE_INEXACT = 16,
-+#define FE_INEXACT FE_INEXACT
-+ };
-+
-+/* Amount to shift by to convert an exception to a mask bit. */
-+#define FE_EXCEPT_SHIFT 5
-+
-+/* All supported exceptions. */
-+#define FE_ALL_EXCEPT \
-+ (FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
-+
-+/* IEEE rounding modes. */
-+enum
-+ {
-+ FE_TONEAREST = 0,
-+#define FE_TONEAREST FE_TONEAREST
-+ FE_TOWARDZERO = 0x400,
-+#define FE_TOWARDZERO FE_TOWARDZERO
-+ FE_DOWNWARD = 0x800,
-+#define FE_DOWNWARD FE_DOWNWARD
-+ FE_UPWARD = 0xc00,
-+#define FE_UPWARD FE_UPWARD
-+ };
-+
-+#define FE_ROUND_MASK (FE_UPWARD)
-+
-+#else /* FPA */
-+
- /* Define bits representing exceptions in the FPU status word. */
- enum
- {
-@@ -44,6 +83,8 @@
- modes exist, but you have to encode them in the actual instruction. */
- #define FE_TONEAREST 0
-
-+#endif
-+
- /* Type representing exception flags. */
- typedef unsigned long int fexcept_t;
-
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100
-@@ -28,7 +28,11 @@
- #ifndef _ASM
- /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
- saved. */
-+#ifdef __MAVERICK__
-+typedef int __jmp_buf[34];
-+#else
- typedef int __jmp_buf[22];
- #endif
-+#endif
-
- #endif
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100
-@@ -18,9 +18,21 @@
- 02111-1307 USA. */
-
- #include <fenv.h>
-+#include <fpu_control.h>
-
- int
- fegetround (void)
- {
-+#if defined(__MAVERICK__)
-+
-+ unsigned long temp;
-+
-+ _FPU_GETCW (temp);
-+ return temp & FE_ROUND_MASK;
-+
-+#else /* FPA */
-+
- return FE_TONEAREST; /* Easy. :-) */
-+
-+#endif
- }
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100
-@@ -18,12 +18,28 @@
- 02111-1307 USA. */
-
- #include <fenv.h>
-+#include <fpu_control.h>
-
- int
- fesetround (int round)
- {
-+#if defined(__MAVERICK__)
-+ unsigned long temp;
-+
-+ if (round & ~FE_ROUND_MASK)
-+ return 1;
-+
-+ _FPU_GETCW (temp);
-+ temp = (temp & ~FE_ROUND_MASK) | round;
-+ _FPU_SETCW (temp);
-+ return 0;
-+
-+#else /* FPA */
-+
- /* We only support FE_TONEAREST, so there is no need for any work. */
- return (round == FE_TONEAREST)?0:1;
-+
-+#endif
- }
-
- libm_hidden_def (fesetround)
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100
-@@ -1,5 +1,6 @@
- /* FPU control word definitions. ARM version.
-- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
-+ Copyright (C) 1996, 1997, 1998, 2000, 2005
-+ Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
-@@ -20,6 +21,79 @@
- #ifndef _FPU_CONTROL_H
- #define _FPU_CONTROL_H
-
-+#if defined(__MAVERICK__)
-+
-+/* DSPSC register: (from EP9312 User's Guide)
-+ *
-+ * bits 31..29 - DAID
-+ * bits 28..26 - HVID
-+ * bits 25..24 - RSVD
-+ * bit 23 - ISAT
-+ * bit 22 - UI
-+ * bit 21 - INT
-+ * bit 20 - AEXC
-+ * bits 19..18 - SAT
-+ * bits 17..16 - FCC
-+ * bit 15 - V
-+ * bit 14 - FWDEN
-+ * bit 13 - Invalid
-+ * bit 12 - Denorm
-+ * bits 11..10 - RM
-+ * bits 9..5 - IXE, UFE, OFE, RSVD, IOE
-+ * bits 4..0 - IX, UF, OF, RSVD, IO
-+ */
-+
-+/* masking of interrupts */
-+#define _FPU_MASK_IM (1 << 5) /* invalid operation */
-+#define _FPU_MASK_ZM 0 /* divide by zero */
-+#define _FPU_MASK_OM (1 << 7) /* overflow */
-+#define _FPU_MASK_UM (1 << 8) /* underflow */
-+#define _FPU_MASK_PM (1 << 9) /* inexact */
-+#define _FPU_MASK_DM 0 /* denormalized operation */
-+
-+#define _FPU_RESERVED 0xfffff000 /* These bits are reserved. */
-+
-+#define _FPU_DEFAULT 0x00b00000 /* Default value. */
-+#define _FPU_IEEE 0x00b003a0 /* Default + exceptions enabled. */
-+
-+/* Type of the control word. */
-+typedef unsigned int fpu_control_t;
-+
-+/* Macros for accessing the hardware control word. */
-+#define _FPU_GETCW(cw) ({ \
-+ register int __t1, __t2; \
-+ \
-+ __asm__ volatile ( \
-+ "cfmvr64l %1, mvdx0\n\t" \
-+ "cfmvr64h %2, mvdx0\n\t" \
-+ "cfmv32sc mvdx0, dspsc\n\t" \
-+ "cfmvr64l %0, mvdx0\n\t" \
-+ "cfmv64lr mvdx0, %1\n\t" \
-+ "cfmv64hr mvdx0, %2" \
-+ : "=r" (cw), "=r" (__t1), "=r" (__t2) \
-+ ); \
-+})
-+
-+#define _FPU_SETCW(cw) ({ \
-+ register int __t0, __t1, __t2; \
-+ \
-+ __asm__ volatile ( \
-+ "cfmvr64l %1, mvdx0\n\t" \
-+ "cfmvr64h %2, mvdx0\n\t" \
-+ "cfmv64lr mvdx0, %0\n\t" \
-+ "cfmvsc32 dspsc, mvdx0\n\t" \
-+ "cfmv64lr mvdx0, %1\n\t" \
-+ "cfmv64hr mvdx0, %2" \
-+ : "=r" (__t0), "=r" (__t1), "=r" (__t2) \
-+ : "0" (cw) \
-+ ); \
-+})
-+
-+/* Default control word set at startup. */
-+extern fpu_control_t __fpu_control;
-+
-+#else /* FPA */
-+
- /* We have a slight terminology confusion here. On the ARM, the register
- * we're interested in is actually the FPU status word - the FPU control
- * word is something different (which is implementation-defined and only
-@@ -99,4 +173,6 @@
- /* Default control word set at startup. */
- extern fpu_control_t __fpu_control;
-
-+#endif
-+
- #endif /* _FPU_CONTROL_H */
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100
-@@ -17,4 +17,8 @@
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-+#ifdef __MAVERICK__
-+#define __JMP_BUF_SP 32
-+#else
- #define __JMP_BUF_SP 20
-+#endif
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100
-@@ -24,11 +24,41 @@
-
- ENTRY (__sigsetjmp)
- /* Save registers */
-+#ifdef __MAVERICK__
-+ cfstrd mvd4, [r0], #8
-+ nop
-+ cfstrd mvd5, [r0], #8
-+ nop
-+ cfstrd mvd6, [r0], #8
-+ nop
-+ cfstrd mvd7, [r0], #8
-+ nop
-+ cfstrd mvd8, [r0], #8
-+ nop
-+ cfstrd mvd9, [r0], #8
-+ nop
-+ cfstrd mvd10, [r0], #8
-+ nop
-+ cfstrd mvd11, [r0], #8
-+ nop
-+ cfstrd mvd12, [r0], #8
-+ nop
-+ cfstrd mvd13, [r0], #8
-+ nop
-+ cfstrd mvd14, [r0], #8
-+ nop
-+ cfstrd mvd15, [r0], #8
-+#else
- sfmea f4, 4, [r0]!
-+#endif
- stmia r0, {v1-v6, sl, fp, sp, lr}
-
- /* Restore pointer to jmp_buf */
-+#ifdef __MAVERICK__
-+ sub r0, r0, #96
-+#else
- sub r0, r0, #48
-+#endif
-
- /* Make a tail call to __sigjmp_save; it takes the same args. */
- B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gccframe.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/gccframe.h
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100
-@@ -17,6 +17,10 @@
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-+#ifdef __MAVERICK__
-+#define FIRST_PSEUDO_REGISTER 43
-+#else
- #define FIRST_PSEUDO_REGISTER 27
-+#endif
-
- #include <sysdeps/generic/gccframe.h>
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100
-@@ -29,7 +29,7 @@
- #if defined(__ARMEB__)
- # define IEEE_DOUBLE_MIXED_ENDIAN 0
- # define IEEE_DOUBLE_BIG_ENDIAN 1
--#elif defined(__VFP_FP__)
-+#elif defined(__VFP_FP__) || defined(__MAVERICK__)
- # define IEEE_DOUBLE_MIXED_ENDIAN 0
- # define IEEE_DOUBLE_BIG_ENDIAN 0
- #else
-diff -durN glibc-2.14.orig/ports/sysdeps/arm/bits/endian.h glibc-2.14/ports/sysdeps/arm/bits/endian.h
-diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.14/ports/sysdeps/arm/fpu/__longjmp.S
-diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.14/ports/sysdeps/arm/fpu/bits/fenv.h
-diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14/ports/sysdeps/arm/fpu/bits/setjmp.h
-diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.14/ports/sysdeps/arm/fpu/fegetround.c
-diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.14/ports/sysdeps/arm/fpu/fesetround.c
-diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.14/ports/sysdeps/arm/fpu/fpu_control.h
-diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14/ports/sysdeps/arm/fpu/jmpbuf-offsets.h
-diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.14/ports/sysdeps/arm/fpu/setjmp.S
-diff -durN glibc-2.14.orig/ports/sysdeps/arm/gccframe.h glibc-2.14/ports/sysdeps/arm/gccframe.h
-diff -durN glibc-2.14.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.14/ports/sysdeps/arm/gmp-mparam.h
diff --git a/packages/glibc-ports/2.14/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.14/580-nptl-lowlevellock.patch
deleted file mode 100644
index a2a141c..0000000
--- a/packages/glibc-ports/2.14/580-nptl-lowlevellock.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-fix build error on arm like on hppa:
-
-arm-unknown-linux-gnu-gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -g -pipe -Wstrict-prototypes -fPIC -I../include -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include-fixed -isystem /usr/arm-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -MD -MP -MF /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os.dt -MT /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -DNOT_IN_libc=1 -DIS_IN_rtld=1
-In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21:
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private':
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM'
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function)
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.)
-../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function)
-
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100
-@@ -25,6 +25,7 @@
- #include <atomic.h>
- #include <sysdep.h>
- #include <kernel-features.h>
-+#include <tls.h> /* Need THREAD_*, and header.*. */
-
- #define FUTEX_WAIT 0
- #define FUTEX_WAKE 1
-diff -durN glibc-2.14.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
diff --git a/packages/glibc-ports/2.14/610-fpu-cw-mips.patch b/packages/glibc-ports/2.14/610-fpu-cw-mips.patch
deleted file mode 100644
index c624565..0000000
--- a/packages/glibc-ports/2.14/610-fpu-cw-mips.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html
-
-diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/mips/fpu_control.h glibc-2.14/glibc-ports-2.14/sysdeps/mips/fpu_control.h
---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.14/glibc-ports-2.14/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100
-@@ -86,7 +86,7 @@
- #define _FPU_RC_UP 0x2
- #define _FPU_RC_DOWN 0x3
-
--#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */
-+#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */
-
-
- /* The fdlibm code requires strict IEEE double precision arithmetic,
-diff -durN glibc-2.14.orig/ports/sysdeps/mips/fpu_control.h glibc-2.14/ports/sysdeps/mips/fpu_control.h
diff --git a/packages/glibc-ports/2.15/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc-ports/2.15/090-Fix-ARM-build-with-GCC-trunk.patch
index 1a632fe..259b285 100644
--- a/packages/glibc-ports/2.15/090-Fix-ARM-build-with-GCC-trunk.patch
+++ b/packages/glibc-ports/2.15/090-Fix-ARM-build-with-GCC-trunk.patch
@@ -20,8 +20,8 @@ Tested that this fixes the build for ARM.
sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++-
sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++-
3 files changed, 11 insertions(+), 2 deletions(-)
---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
+--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
@@ -23,7 +23,8 @@
#include <pthreadP.h>
@@ -35,8 +35,8 @@ Tested that this fixes the build for ARM.
static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c
index bff3e2b..1f1eb71 100644
---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
+--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
@@ -21,7 +21,8 @@
#include <stdio.h>
#include <unwind.h>
@@ -47,8 +47,8 @@ index bff3e2b..1f1eb71 100644
static _Unwind_Reason_Code (*libgcc_s_personality)
(int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
struct _Unwind_Context *);
---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
+--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
@@ -23,7 +23,8 @@
#include <pthreadP.h>
@@ -59,8 +59,8 @@ index bff3e2b..1f1eb71 100644
static _Unwind_Reason_Code (*libgcc_s_personality)
(_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
+--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
@@ -21,7 +21,8 @@
#include <stdio.h>
#include <unwind.h>
diff --git a/packages/glibc-ports/2.15/091-libmemusage-link-failure.patch b/packages/glibc-ports/2.15/091-libmemusage-link-failure.patch
index 9f9887c..23d8813 100644
--- a/packages/glibc-ports/2.15/091-libmemusage-link-failure.patch
+++ b/packages/glibc-ports/2.15/091-libmemusage-link-failure.patch
@@ -4,10 +4,10 @@ Date: Fri Jan 6 20:14:44 2012 +0000
Add ARM dependency of libmemusage.so on libc_nonshared.a.
-diff --git a/ports/sysdeps/arm/Makefile b/ports/sysdeps/arm/Makefile
+diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile
index 5651161..1a88430 100644
---- a/ports/sysdeps/arm/Makefile
-+++ b/ports/sysdeps/arm/Makefile
+--- a/sysdeps/arm/Makefile
++++ b/sysdeps/arm/Makefile
@@ -7,3 +7,8 @@ endif
ifeq ($(subdir),csu)
gen-as-const-headers += tlsdesc.sym
diff --git a/packages/glibc-ports/2.15/330-m68k-sys-user.patch b/packages/glibc-ports/2.15/330-m68k-sys-user.patch
index faee18f..388bc62 100644
--- a/packages/glibc-ports/2.15/330-m68k-sys-user.patch
+++ b/packages/glibc-ports/2.15/330-m68k-sys-user.patch
@@ -1,8 +1,8 @@
copied from kernel as it is sanitized now
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h
+--- glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100
@@ -1,3 +1,90 @@
+#ifndef _SYS_USER_H
+#define _SYS_USER_H
@@ -94,4 +94,3 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/use
/* Copyright (C) 2008, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-diff -durN glibc-2.15.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.15/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h
diff --git a/packages/glibc-ports/2.15/440-alpha-cache-shape.patch b/packages/glibc-ports/2.15/440-alpha-cache-shape.patch
index b3158da..a9c9db0 100644
--- a/packages/glibc-ports/2.15/440-alpha-cache-shape.patch
+++ b/packages/glibc-ports/2.15/440-alpha-cache-shape.patch
@@ -5,9 +5,9 @@ duplication for static builds with dl-sysdep and dl-support. since dl-sysdep
is both shared/static, there is no point in hooking dl-support anymore, so we
can punt it.
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c
+--- glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100
@@ -1,2 +1,1 @@
-#include "dl-auxv.h"
#include <elf/dl-support.c>
diff --git a/packages/glibc-ports/2.15/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc-ports/2.15/460-alpha-fix-gcc-4.1-warnings.patch
index a54d823..05a197e 100644
--- a/packages/glibc-ports/2.15/460-alpha-fix-gcc-4.1-warnings.patch
+++ b/packages/glibc-ports/2.15/460-alpha-fix-gcc-4.1-warnings.patch
@@ -16,9 +16,9 @@ I cannot really think of anything better than
ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c
+--- glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100
@@ -178,13 +178,13 @@
static inline void
stb_mb(unsigned char val, unsigned long addr)
@@ -53,4 +53,3 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm
return r;
}
-diff -durN glibc-2.15.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.15/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c
diff --git a/packages/glibc-ports/2.15/530-alpha-fix-rtld-fPIC.patch b/packages/glibc-ports/2.15/530-alpha-fix-rtld-fPIC.patch
index 800a789..8f9ce0d 100644
--- a/packages/glibc-ports/2.15/530-alpha-fix-rtld-fPIC.patch
+++ b/packages/glibc-ports/2.15/530-alpha-fix-rtld-fPIC.patch
@@ -5,9 +5,9 @@
ports/sysdeps/alpha/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/alpha/Makefile glibc-2.15/glibc-ports-2.15/sysdeps/alpha/Makefile
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/alpha/Makefile glibc-ports-2.15/sysdeps/alpha/Makefile
+--- glibc-ports-2.15.orig/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100
@@ -35,7 +35,8 @@
ifeq ($(subdir),elf)
@@ -18,4 +18,3 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/alpha/Makefile glibc-2.15/gl
endif
# Build everything with full IEEE math support, and with dynamic rounding;
-diff -durN glibc-2.15.orig/ports/sysdeps/alpha/Makefile glibc-2.15/ports/sysdeps/alpha/Makefile
diff --git a/packages/glibc-ports/2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/packages/glibc-ports/2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
index 8a05574..427fb03 100644
--- a/packages/glibc-ports/2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
+++ b/packages/glibc-ports/2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch
@@ -1,9 +1,9 @@
http://yann.poupet.free.fr/ep93xx/
Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/bits/endian.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/bits/endian.h
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/arm/bits/endian.h glibc-ports-2.15/sysdeps/arm/bits/endian.h
+--- glibc-ports-2.15.orig/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100
@@ -12,7 +12,7 @@
/* FPA floating point units are always big-endian, irrespective of the
CPU endianness. VFP floating point units use the same endianness
@@ -13,9 +13,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/bits/endian.h glibc-2.15
#define __FLOAT_WORD_ORDER __BYTE_ORDER
#else
#define __FLOAT_WORD_ORDER __BIG_ENDIAN
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/__longjmp.S glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S
+--- glibc-ports-2.15.orig/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100
@@ -30,7 +30,33 @@
movs r0, r1 /* get the return value in place */
moveq r0, #1 /* can't let setjmp() return zero! */
@@ -50,9 +50,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S glibc-2.
LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
END (__longjmp)
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/bits/fenv.h glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h
+--- glibc-ports-2.15.orig/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100
@@ -20,6 +20,45 @@
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
#endif
@@ -108,9 +108,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h glibc-2.
/* Type representing exception flags. */
typedef unsigned long int fexcept_t;
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/bits/setjmp.h glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h
+--- glibc-ports-2.15.orig/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100
@@ -28,7 +28,11 @@
#ifndef _ASM
/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
@@ -123,9 +123,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h glibc-
+#endif
#endif
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/fegetround.c glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c
+--- glibc-ports-2.15.orig/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100
@@ -18,9 +18,21 @@
02111-1307 USA. */
@@ -148,9 +148,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c glibc-2
+
+#endif
}
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/fesetround.c glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c
+--- glibc-ports-2.15.orig/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100
@@ -18,12 +18,28 @@
02111-1307 USA. */
@@ -180,9 +180,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c glibc-2
}
libm_hidden_def (fesetround)
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/fpu_control.h glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h
+--- glibc-ports-2.15.orig/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100
@@ -1,5 +1,6 @@
/* FPU control word definitions. ARM version.
- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
@@ -278,9 +278,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h glibc-
+#endif
+
#endif /* _FPU_CONTROL_H */
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h
+--- glibc-ports-2.15.orig/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100
@@ -17,4 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
@@ -290,9 +290,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h gli
+#else
#define __JMP_BUF_SP 20
+#endif
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/setjmp.S glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S
+--- glibc-ports-2.15.orig/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100
@@ -24,11 +24,41 @@
ENTRY (__sigsetjmp)
@@ -335,9 +335,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S glibc-2.15/
/* Make a tail call to __sigjmp_save; it takes the same args. */
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gccframe.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/gccframe.h
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/arm/gccframe.h glibc-ports-2.15/sysdeps/arm/gccframe.h
+--- glibc-ports-2.15.orig/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100
@@ -17,6 +17,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
@@ -349,9 +349,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gccframe.h glibc-2.15/gl
+#endif
#include <sysdeps/generic/gccframe.h>
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/arm/gmp-mparam.h glibc-ports-2.15/sysdeps/arm/gmp-mparam.h
+--- glibc-ports-2.15.orig/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100
@@ -29,7 +29,7 @@
#if defined(__ARMEB__)
# define IEEE_DOUBLE_MIXED_ENDIAN 0
@@ -361,14 +361,3 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h glibc-2.15/
# define IEEE_DOUBLE_MIXED_ENDIAN 0
# define IEEE_DOUBLE_BIG_ENDIAN 0
#else
-diff -durN glibc-2.15.orig/ports/sysdeps/arm/bits/endian.h glibc-2.15/ports/sysdeps/arm/bits/endian.h
-diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.15/ports/sysdeps/arm/fpu/__longjmp.S
-diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.15/ports/sysdeps/arm/fpu/bits/fenv.h
-diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.15/ports/sysdeps/arm/fpu/bits/setjmp.h
-diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.15/ports/sysdeps/arm/fpu/fegetround.c
-diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.15/ports/sysdeps/arm/fpu/fesetround.c
-diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.15/ports/sysdeps/arm/fpu/fpu_control.h
-diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.15/ports/sysdeps/arm/fpu/jmpbuf-offsets.h
-diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.15/ports/sysdeps/arm/fpu/setjmp.S
-diff -durN glibc-2.15.orig/ports/sysdeps/arm/gccframe.h glibc-2.15/ports/sysdeps/arm/gccframe.h
-diff -durN glibc-2.15.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.15/ports/sysdeps/arm/gmp-mparam.h
diff --git a/packages/glibc-ports/2.15/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.15/580-nptl-lowlevellock.patch
index a39e463..8a841be 100644
--- a/packages/glibc-ports/2.15/580-nptl-lowlevellock.patch
+++ b/packages/glibc-ports/2.15/580-nptl-lowlevellock.patch
@@ -9,9 +9,9 @@ In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21:
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.)
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function)
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+--- glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100
@@ -25,6 +25,7 @@
#include <atomic.h>
#include <sysdep.h>
@@ -20,4 +20,3 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/low
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
-diff -durN glibc-2.15.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.15/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
diff --git a/packages/glibc-ports/2.15/610-fpu-cw-mips.patch b/packages/glibc-ports/2.15/610-fpu-cw-mips.patch
index 8692a1f..388e4d6 100644
--- a/packages/glibc-ports/2.15/610-fpu-cw-mips.patch
+++ b/packages/glibc-ports/2.15/610-fpu-cw-mips.patch
@@ -1,8 +1,8 @@
http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html
-diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/mips/fpu_control.h glibc-2.15/glibc-ports-2.15/sysdeps/mips/fpu_control.h
---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.15/glibc-ports-2.15/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100
+diff -durN glibc-ports-2.15.orig/sysdeps/mips/fpu_control.h glibc-ports-2.15/sysdeps/mips/fpu_control.h
+--- glibc-ports-2.15.orig/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.15/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100
@@ -86,7 +86,7 @@
#define _FPU_RC_UP 0x2
#define _FPU_RC_DOWN 0x3
@@ -12,4 +12,3 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/mips/fpu_control.h glibc-2.1
/* The fdlibm code requires strict IEEE double precision arithmetic,
-diff -durN glibc-2.15.orig/ports/sysdeps/mips/fpu_control.h glibc-2.15/ports/sysdeps/mips/fpu_control.h
diff --git a/packages/glibc-ports/2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc-ports/2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch
index 59f95aa..1f08ba1 100644
--- a/packages/glibc-ports/2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch
+++ b/packages/glibc-ports/2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch
@@ -23,8 +23,8 @@ Tested that this fixes the build for ARM.
diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
index 6ccd9b4..660d148 100644
---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
+--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
@@ -22,7 +22,8 @@
#include <pthreadP.h>
@@ -37,8 +37,8 @@ index 6ccd9b4..660d148 100644
static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c
index bff3e2b..1f1eb71 100644
---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
-+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
+--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
@@ -20,7 +20,8 @@
#include <stdio.h>
#include <unwind.h>
diff --git a/packages/glibc-ports/2.16.0/330-m68k-sys-user.patch b/packages/glibc-ports/2.16.0/330-m68k-sys-user.patch
index f113996..932d917 100644
--- a/packages/glibc-ports/2.16.0/330-m68k-sys-user.patch
+++ b/packages/glibc-ports/2.16.0/330-m68k-sys-user.patch
@@ -1,8 +1,8 @@
copied from kernel as it is sanitized now
-diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h
---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100
+diff -durN glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h
+--- glibc-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100
@@ -1,3 +1,90 @@
+#ifndef _SYS_USER_H
+#define _SYS_USER_H
@@ -94,4 +94,3 @@ diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys
/* Copyright (C) 2008, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-diff -durN glibc-2.16.0.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.16.0/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h
diff --git a/packages/glibc-ports/2.16.0/440-alpha-cache-shape.patch b/packages/glibc-ports/2.16.0/440-alpha-cache-shape.patch
index 5b1a298..7612872 100644
--- a/packages/glibc-ports/2.16.0/440-alpha-cache-shape.patch
+++ b/packages/glibc-ports/2.16.0/440-alpha-cache-shape.patch
@@ -5,9 +5,9 @@ duplication for static builds with dl-sysdep and dl-support. since dl-sysdep
is both shared/static, there is no point in hooking dl-support anymore, so we
can punt it.
-diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c
---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100
+diff -durN glibc-2.16.0.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c
+--- glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100
@@ -1,2 +1,1 @@
-#include "dl-auxv.h"
#include <elf/dl-support.c>
diff --git a/packages/glibc-ports/2.16.0/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc-ports/2.16.0/460-alpha-fix-gcc-4.1-warnings.patch
index f2ff04f..96f1646 100644
--- a/packages/glibc-ports/2.16.0/460-alpha-fix-gcc-4.1-warnings.patch
+++ b/packages/glibc-ports/2.16.0/460-alpha-fix-gcc-4.1-warnings.patch
@@ -16,9 +16,9 @@ I cannot really think of anything better than
ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
-diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c
---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100
+diff -durN glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c
+--- glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100
@@ -178,13 +178,13 @@
static inline void
stb_mb(unsigned char val, unsigned long addr)
@@ -53,4 +53,3 @@ diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/io
return r;
}
-diff -durN glibc-2.16.0.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.16.0/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c
diff --git a/packages/glibc-ports/2.16.0/530-alpha-fix-rtld-fPIC.patch b/packages/glibc-ports/2.16.0/530-alpha-fix-rtld-fPIC.patch
index 42faaa5..db9c890 100644
--- a/packages/glibc-ports/2.16.0/530-alpha-fix-rtld-fPIC.patch
+++ b/packages/glibc-ports/2.16.0/530-alpha-fix-rtld-fPIC.patch
@@ -5,9 +5,9 @@
ports/sysdeps/alpha/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
-diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/alpha/Makefile glibc-2.16.0/glibc-ports-2.16.0/sysdeps/alpha/Makefile
---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100
+diff -durN glibc-ports-2.16.0.orig/sysdeps/alpha/Makefile glibc-ports-2.16.0/sysdeps/alpha/Makefile
+--- glibc-ports-2.16.0.orig/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.16.0/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100
@@ -35,7 +35,8 @@
ifeq ($(subdir),elf)
@@ -18,4 +18,3 @@ diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/alpha/Makefile glibc-2.1
endif
# Build everything with full IEEE math support, and with dynamic rounding;
-diff -durN glibc-2.16.0.orig/ports/sysdeps/alpha/Makefile glibc-2.16.0/ports/sysdeps/alpha/Makefile
diff --git a/packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch
index 185331c..a1c6c7a 100644
--- a/packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch
+++ b/packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch
@@ -9,9 +9,9 @@ In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21:
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.)
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function)
-diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100
+diff -durN glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+--- glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100
@@ -25,6 +25,7 @@
#include <atomic.h>
#include <sysdep.h>
@@ -20,4 +20,3 @@ diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
-diff -durN glibc-2.16.0.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.16.0/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
diff --git a/packages/glibc-ports/2.16.0/610-fpu-cw-mips.patch b/packages/glibc-ports/2.16.0/610-fpu-cw-mips.patch
index 0c0daf3..ef42c8f 100644
--- a/packages/glibc-ports/2.16.0/610-fpu-cw-mips.patch
+++ b/packages/glibc-ports/2.16.0/610-fpu-cw-mips.patch
@@ -1,8 +1,8 @@
http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html
-diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h glibc-2.16.0/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h
---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
-+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100
+diff -durN glibc-ports-2.16.0.orig/sysdeps/mips/fpu_control.h glibc-ports-2.16.0/sysdeps/mips/fpu_control.h
+--- glibc-ports-2.16.0.orig/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.16.0/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100
@@ -86,7 +86,7 @@
#define _FPU_RC_UP 0x2
#define _FPU_RC_DOWN 0x3
@@ -12,4 +12,3 @@ diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h glibc
/* The fdlibm code requires strict IEEE double precision arithmetic,
-diff -durN glibc-2.16.0.orig/ports/sysdeps/mips/fpu_control.h glibc-2.16.0/ports/sysdeps/mips/fpu_control.h
diff --git a/packages/glibc-ports/package.desc b/packages/glibc-ports/package.desc
index 4f7e7ac..f273120 100644
--- a/packages/glibc-ports/package.desc
+++ b/packages/glibc-ports/package.desc
@@ -2,7 +2,9 @@
# the ports were an external add-on, it used a separate repository
# and separate tarballs.
repository='git git://sourceware.org/git/glibc-ports.git'
-mirrors='$(CT_Mirrors GNU glibc) $(CT_Mirrors sourceware glibc/releases)'
+mirrors='$(CT_Mirrors GNU glibc)'
# Version of this package must be the same as the glibc's
versionlocked='glibc'
+
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/glibc-ports/2.12.1/100-respect-env-CPPFLAGS.patch b/packages/glibc/2.12.1/100-respect-env-CPPFLAGS.patch
index ed022be..ed022be 100644
--- a/packages/glibc-ports/2.12.1/100-respect-env-CPPFLAGS.patch
+++ b/packages/glibc/2.12.1/100-respect-env-CPPFLAGS.patch
diff --git a/packages/glibc-ports/2.12.1/120-i386-x86_64-revert-clone-cfi.patch b/packages/glibc/2.12.1/120-i386-x86_64-revert-clone-cfi.patch
index 95f5ace..95f5ace 100644
--- a/packages/glibc-ports/2.12.1/120-i386-x86_64-revert-clone-cfi.patch
+++ b/packages/glibc/2.12.1/120-i386-x86_64-revert-clone-cfi.patch
diff --git a/packages/glibc-ports/2.12.1/140-disable-ldconfig.patch b/packages/glibc/2.12.1/140-disable-ldconfig.patch
index 43330b8..43330b8 100644
--- a/packages/glibc-ports/2.12.1/140-disable-ldconfig.patch
+++ b/packages/glibc/2.12.1/140-disable-ldconfig.patch
diff --git a/packages/glibc-ports/2.12.1/150-queue-header-updates.patch b/packages/glibc/2.12.1/150-queue-header-updates.patch
index fe625e1..fe625e1 100644
--- a/packages/glibc-ports/2.12.1/150-queue-header-updates.patch
+++ b/packages/glibc/2.12.1/150-queue-header-updates.patch
diff --git a/packages/glibc-ports/2.12.1/160-manual-no-perl.patch b/packages/glibc/2.12.1/160-manual-no-perl.patch
index 2eb5414..2eb5414 100644
--- a/packages/glibc-ports/2.12.1/160-manual-no-perl.patch
+++ b/packages/glibc/2.12.1/160-manual-no-perl.patch
diff --git a/packages/glibc-ports/2.12.1/170-localedef-fix-trampoline.patch b/packages/glibc/2.12.1/170-localedef-fix-trampoline.patch
index fb0881d..fb0881d 100644
--- a/packages/glibc-ports/2.12.1/170-localedef-fix-trampoline.patch
+++ b/packages/glibc/2.12.1/170-localedef-fix-trampoline.patch
diff --git a/packages/glibc-ports/2.12.1/180-resolv-dynamic.patch b/packages/glibc/2.12.1/180-resolv-dynamic.patch
index 8f74a53..8f74a53 100644
--- a/packages/glibc-ports/2.12.1/180-resolv-dynamic.patch
+++ b/packages/glibc/2.12.1/180-resolv-dynamic.patch
diff --git a/packages/glibc-ports/2.12.1/190-localedef-mmap.patch b/packages/glibc/2.12.1/190-localedef-mmap.patch
index b24ed80..b24ed80 100644
--- a/packages/glibc-ports/2.12.1/190-localedef-mmap.patch
+++ b/packages/glibc/2.12.1/190-localedef-mmap.patch
diff --git a/packages/glibc-ports/2.12.1/200-fadvise64_64.patch b/packages/glibc/2.12.1/200-fadvise64_64.patch
index a9f10cd..a9f10cd 100644
--- a/packages/glibc-ports/2.12.1/200-fadvise64_64.patch
+++ b/packages/glibc/2.12.1/200-fadvise64_64.patch
diff --git a/packages/glibc-ports/2.12.1/220-section-comments.patch b/packages/glibc/2.12.1/220-section-comments.patch
index 4d35535..4d35535 100644
--- a/packages/glibc-ports/2.12.1/220-section-comments.patch
+++ b/packages/glibc/2.12.1/220-section-comments.patch
diff --git a/packages/glibc-ports/2.12.1/230-no-inline-gmon.patch b/packages/glibc/2.12.1/230-no-inline-gmon.patch
index 594fb79..594fb79 100644
--- a/packages/glibc-ports/2.12.1/230-no-inline-gmon.patch
+++ b/packages/glibc/2.12.1/230-no-inline-gmon.patch
diff --git a/packages/glibc-ports/2.12.1/240-check_native-headers.patch b/packages/glibc/2.12.1/240-check_native-headers.patch
index de0cb5b..de0cb5b 100644
--- a/packages/glibc-ports/2.12.1/240-check_native-headers.patch
+++ b/packages/glibc/2.12.1/240-check_native-headers.patch
diff --git a/packages/glibc-ports/2.12.1/250-fix-pr631.patch b/packages/glibc/2.12.1/250-fix-pr631.patch
index af5b347..af5b347 100644
--- a/packages/glibc-ports/2.12.1/250-fix-pr631.patch
+++ b/packages/glibc/2.12.1/250-fix-pr631.patch
diff --git a/packages/glibc-ports/2.12.1/260-assume-pipe2.patch b/packages/glibc/2.12.1/260-assume-pipe2.patch
index b84f882..b84f882 100644
--- a/packages/glibc-ports/2.12.1/260-assume-pipe2.patch
+++ b/packages/glibc/2.12.1/260-assume-pipe2.patch
diff --git a/packages/glibc-ports/2.12.1/270-china.patch b/packages/glibc/2.12.1/270-china.patch
index 4cde1cf..4cde1cf 100644
--- a/packages/glibc-ports/2.12.1/270-china.patch
+++ b/packages/glibc/2.12.1/270-china.patch
diff --git a/packages/glibc-ports/2.12.1/280-new-valencian-locale.patch b/packages/glibc/2.12.1/280-new-valencian-locale.patch
index 6b46b44..6b46b44 100644
--- a/packages/glibc-ports/2.12.1/280-new-valencian-locale.patch
+++ b/packages/glibc/2.12.1/280-new-valencian-locale.patch
diff --git a/packages/glibc-ports/2.12.1/300-nscd-one-fork.patch b/packages/glibc/2.12.1/300-nscd-one-fork.patch
index 27eae51..27eae51 100644
--- a/packages/glibc-ports/2.12.1/300-nscd-one-fork.patch
+++ b/packages/glibc/2.12.1/300-nscd-one-fork.patch
diff --git a/packages/glibc-ports/2.12.1/310-hppa-nptl-carlos.patch b/packages/glibc/2.12.1/310-hppa-nptl-carlos.patch
index 947bb58..947bb58 100644
--- a/packages/glibc-ports/2.12.1/310-hppa-nptl-carlos.patch
+++ b/packages/glibc/2.12.1/310-hppa-nptl-carlos.patch
diff --git a/packages/glibc-ports/2.12.1/340-dl_execstack-PaX-support.patch b/packages/glibc/2.12.1/340-dl_execstack-PaX-support.patch
index afdb39c..afdb39c 100644
--- a/packages/glibc-ports/2.12.1/340-dl_execstack-PaX-support.patch
+++ b/packages/glibc/2.12.1/340-dl_execstack-PaX-support.patch
diff --git a/packages/glibc-ports/2.12.1/350-pre20040117-pt_pax.patch b/packages/glibc/2.12.1/350-pre20040117-pt_pax.patch
index 3f03169..3f03169 100644
--- a/packages/glibc-ports/2.12.1/350-pre20040117-pt_pax.patch
+++ b/packages/glibc/2.12.1/350-pre20040117-pt_pax.patch
diff --git a/packages/glibc-ports/2.12.1/360-tests-sandbox-libdl-paths.patch b/packages/glibc/2.12.1/360-tests-sandbox-libdl-paths.patch
index a847cdb..a847cdb 100644
--- a/packages/glibc-ports/2.12.1/360-tests-sandbox-libdl-paths.patch
+++ b/packages/glibc/2.12.1/360-tests-sandbox-libdl-paths.patch
diff --git a/packages/glibc-ports/2.12.1/370-fnmatch.patch b/packages/glibc/2.12.1/370-fnmatch.patch
index f345b35..f345b35 100644
--- a/packages/glibc-ports/2.12.1/370-fnmatch.patch
+++ b/packages/glibc/2.12.1/370-fnmatch.patch
diff --git a/packages/glibc-ports/2.12.1/380-dont-build-timezone.patch b/packages/glibc/2.12.1/380-dont-build-timezone.patch
index 0a30436..0a30436 100644
--- a/packages/glibc-ports/2.12.1/380-dont-build-timezone.patch
+++ b/packages/glibc/2.12.1/380-dont-build-timezone.patch
diff --git a/packages/glibc-ports/2.12.1/400-alpha-xstat.patch b/packages/glibc/2.12.1/400-alpha-xstat.patch
index 97bea98..97bea98 100644
--- a/packages/glibc-ports/2.12.1/400-alpha-xstat.patch
+++ b/packages/glibc/2.12.1/400-alpha-xstat.patch
diff --git a/packages/glibc-ports/2.12.1/430-alpha-creat.patch b/packages/glibc/2.12.1/430-alpha-creat.patch
index bfb72d0..bfb72d0 100644
--- a/packages/glibc-ports/2.12.1/430-alpha-creat.patch
+++ b/packages/glibc/2.12.1/430-alpha-creat.patch
diff --git a/packages/glibc-ports/2.12.1/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/2.12.1/490-alpha_alpha-add-fdatasync-support.patch
index 9d35ebd..9d35ebd 100644
--- a/packages/glibc-ports/2.12.1/490-alpha_alpha-add-fdatasync-support.patch
+++ b/packages/glibc/2.12.1/490-alpha_alpha-add-fdatasync-support.patch
diff --git a/packages/glibc-ports/2.12.1/560-ppc-atomic.patch b/packages/glibc/2.12.1/560-ppc-atomic.patch
index 679ef18..679ef18 100644
--- a/packages/glibc-ports/2.12.1/560-ppc-atomic.patch
+++ b/packages/glibc/2.12.1/560-ppc-atomic.patch
diff --git a/packages/glibc-ports/2.12.1/630-mips_shn_undef-hack.patch b/packages/glibc/2.12.1/630-mips_shn_undef-hack.patch
index f6a5eb6..f6a5eb6 100644
--- a/packages/glibc-ports/2.12.1/630-mips_shn_undef-hack.patch
+++ b/packages/glibc/2.12.1/630-mips_shn_undef-hack.patch
diff --git a/packages/glibc-ports/2.12.1/640-alpha-atfcts.patch b/packages/glibc/2.12.1/640-alpha-atfcts.patch
index 90a9d0d..90a9d0d 100644
--- a/packages/glibc-ports/2.12.1/640-alpha-atfcts.patch
+++ b/packages/glibc/2.12.1/640-alpha-atfcts.patch
diff --git a/packages/glibc-ports/2.16.0/650-syslog.patch b/packages/glibc/2.12.1/650-syslog.patch
index c20cafc..c20cafc 100644
--- a/packages/glibc-ports/2.16.0/650-syslog.patch
+++ b/packages/glibc/2.12.1/650-syslog.patch
diff --git a/packages/glibc-ports/2.16.0/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/2.12.1/660-debug-readlink_chk-readklinkat_chk.patch
index a5a7052..a5a7052 100644
--- a/packages/glibc-ports/2.16.0/660-debug-readlink_chk-readklinkat_chk.patch
+++ b/packages/glibc/2.12.1/660-debug-readlink_chk-readklinkat_chk.patch
diff --git a/packages/glibc/2.12.1/998-obstack-common.patch b/packages/glibc/2.12.1/998-obstack-common.patch
new file mode 100644
index 0000000..4b95f06
--- /dev/null
+++ b/packages/glibc/2.12.1/998-obstack-common.patch
@@ -0,0 +1,30 @@
+commit 39b1f6172a2f9ddc74a8f82d6e84dd13b22dbaf2
+Author: Peter Collingbourne <pcc@google.com>
+Date: Wed May 15 20:28:08 2013 +0200
+
+ Move _obstack_compat out of common
+
+ it is impossible to create an alias of a common symbol (as
+ compat_symbol does), because common symbols do not have a section or
+ an offset until linked. GNU as tolerates aliases of common symbols by
+ simply creating another common symbol, but other assemblers (notably
+ LLVM's integrated assembler) are less tolerant.
+
+ 2013-05-15 Peter Collingbourne <pcc@google.com>
+
+ * malloc/obstack.c (_obstack_compat): Add initializer.
+ -
+
+diff --git a/malloc/obstack.c b/malloc/obstack.c
+index 25a90514f7..c3c7db4a96 100644
+--- a/malloc/obstack.c
++++ b/malloc/obstack.c
+@@ -115,7 +115,7 @@ int obstack_exit_failure = EXIT_FAILURE;
+ /* A looong time ago (before 1994, anyway; we're not sure) this global variable
+ was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
+ library still exports it because somebody might use it. */
+-struct obstack *_obstack_compat;
++struct obstack *_obstack_compat = 0;
+ compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
+ # endif
+ # endif
diff --git a/packages/glibc/2.12.2/998-obstack-common.patch b/packages/glibc/2.12.2/998-obstack-common.patch
new file mode 100644
index 0000000..4b95f06
--- /dev/null
+++ b/packages/glibc/2.12.2/998-obstack-common.patch
@@ -0,0 +1,30 @@
+commit 39b1f6172a2f9ddc74a8f82d6e84dd13b22dbaf2
+Author: Peter Collingbourne <pcc@google.com>
+Date: Wed May 15 20:28:08 2013 +0200
+
+ Move _obstack_compat out of common
+
+ it is impossible to create an alias of a common symbol (as
+ compat_symbol does), because common symbols do not have a section or
+ an offset until linked. GNU as tolerates aliases of common symbols by
+ simply creating another common symbol, but other assemblers (notably
+ LLVM's integrated assembler) are less tolerant.
+
+ 2013-05-15 Peter Collingbourne <pcc@google.com>
+
+ * malloc/obstack.c (_obstack_compat): Add initializer.
+ -
+
+diff --git a/malloc/obstack.c b/malloc/obstack.c
+index 25a90514f7..c3c7db4a96 100644
+--- a/malloc/obstack.c
++++ b/malloc/obstack.c
+@@ -115,7 +115,7 @@ int obstack_exit_failure = EXIT_FAILURE;
+ /* A looong time ago (before 1994, anyway; we're not sure) this global variable
+ was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
+ library still exports it because somebody might use it. */
+-struct obstack *_obstack_compat;
++struct obstack *_obstack_compat = 0;
+ compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
+ # endif
+ # endif
diff --git a/packages/glibc-ports/2.15/100-respect-env-CPPFLAGS.patch b/packages/glibc/2.13/100-respect-env-CPPFLAGS.patch
index 3798cb2..3798cb2 100644
--- a/packages/glibc-ports/2.15/100-respect-env-CPPFLAGS.patch
+++ b/packages/glibc/2.13/100-respect-env-CPPFLAGS.patch
diff --git a/packages/glibc-ports/2.16.0/120-i386-x86_64-revert-clone-cfi.patch b/packages/glibc/2.13/120-i386-x86_64-revert-clone-cfi.patch
index c7f6182..c7f6182 100644
--- a/packages/glibc-ports/2.16.0/120-i386-x86_64-revert-clone-cfi.patch
+++ b/packages/glibc/2.13/120-i386-x86_64-revert-clone-cfi.patch
diff --git a/packages/glibc-ports/2.16.0/140-disable-ldconfig.patch b/packages/glibc/2.13/140-disable-ldconfig.patch
index 378e1df..378e1df 100644
--- a/packages/glibc-ports/2.16.0/140-disable-ldconfig.patch
+++ b/packages/glibc/2.13/140-disable-ldconfig.patch
diff --git a/packages/glibc-ports/2.16.0/150-queue-header-updates.patch b/packages/glibc/2.13/150-queue-header-updates.patch
index 7cbe70e..7cbe70e 100644
--- a/packages/glibc-ports/2.16.0/150-queue-header-updates.patch
+++ b/packages/glibc/2.13/150-queue-header-updates.patch
diff --git a/packages/glibc-ports/2.15/160-manual-no-perl.patch b/packages/glibc/2.13/160-manual-no-perl.patch
index 5e2b807..5e2b807 100644
--- a/packages/glibc-ports/2.15/160-manual-no-perl.patch
+++ b/packages/glibc/2.13/160-manual-no-perl.patch
diff --git a/packages/glibc-ports/2.16.0/170-localedef-fix-trampoline.patch b/packages/glibc/2.13/170-localedef-fix-trampoline.patch
index 3cc6559..3cc6559 100644
--- a/packages/glibc-ports/2.16.0/170-localedef-fix-trampoline.patch
+++ b/packages/glibc/2.13/170-localedef-fix-trampoline.patch
diff --git a/packages/glibc-ports/2.16.0/180-resolv-dynamic.patch b/packages/glibc/2.13/180-resolv-dynamic.patch
index e916bce..e916bce 100644
--- a/packages/glibc-ports/2.16.0/180-resolv-dynamic.patch
+++ b/packages/glibc/2.13/180-resolv-dynamic.patch
diff --git a/packages/glibc-ports/2.14/190-localedef-mmap.patch b/packages/glibc/2.13/190-localedef-mmap.patch
index f3914cd..f3914cd 100644
--- a/packages/glibc-ports/2.14/190-localedef-mmap.patch
+++ b/packages/glibc/2.13/190-localedef-mmap.patch
diff --git a/packages/glibc-ports/2.16.0/200-fadvise64_64.patch b/packages/glibc/2.13/200-fadvise64_64.patch
index 71bca38..71bca38 100644
--- a/packages/glibc-ports/2.16.0/200-fadvise64_64.patch
+++ b/packages/glibc/2.13/200-fadvise64_64.patch
diff --git a/packages/glibc-ports/2.15/220-section-comments.patch b/packages/glibc/2.13/220-section-comments.patch
index d717829..d717829 100644
--- a/packages/glibc-ports/2.15/220-section-comments.patch
+++ b/packages/glibc/2.13/220-section-comments.patch
diff --git a/packages/glibc-ports/2.15/230-no-inline-gmon.patch b/packages/glibc/2.13/230-no-inline-gmon.patch
index fa33c2b..fa33c2b 100644
--- a/packages/glibc-ports/2.15/230-no-inline-gmon.patch
+++ b/packages/glibc/2.13/230-no-inline-gmon.patch
diff --git a/packages/glibc-ports/2.14/240-check_native-headers.patch b/packages/glibc/2.13/240-check_native-headers.patch
index c936f71..c936f71 100644
--- a/packages/glibc-ports/2.14/240-check_native-headers.patch
+++ b/packages/glibc/2.13/240-check_native-headers.patch
diff --git a/packages/glibc-ports/2.13/250-fix-pr631.patch b/packages/glibc/2.13/250-fix-pr631.patch
index a48912e..a48912e 100644
--- a/packages/glibc-ports/2.13/250-fix-pr631.patch
+++ b/packages/glibc/2.13/250-fix-pr631.patch
diff --git a/packages/glibc-ports/2.15/260-assume-pipe2.patch b/packages/glibc/2.13/260-assume-pipe2.patch
index 42e8f4e..42e8f4e 100644
--- a/packages/glibc-ports/2.15/260-assume-pipe2.patch
+++ b/packages/glibc/2.13/260-assume-pipe2.patch
diff --git a/packages/glibc-ports/2.16.0/270-china.patch b/packages/glibc/2.13/270-china.patch
index 41d7759..41d7759 100644
--- a/packages/glibc-ports/2.16.0/270-china.patch
+++ b/packages/glibc/2.13/270-china.patch
diff --git a/packages/glibc-ports/2.16.0/280-new-valencian-locale.patch b/packages/glibc/2.13/280-new-valencian-locale.patch
index 4cdd108..4cdd108 100644
--- a/packages/glibc-ports/2.16.0/280-new-valencian-locale.patch
+++ b/packages/glibc/2.13/280-new-valencian-locale.patch
diff --git a/packages/glibc-ports/2.15/300-nscd-one-fork.patch b/packages/glibc/2.13/300-nscd-one-fork.patch
index adc9b3f..adc9b3f 100644
--- a/packages/glibc-ports/2.15/300-nscd-one-fork.patch
+++ b/packages/glibc/2.13/300-nscd-one-fork.patch
diff --git a/packages/glibc-ports/2.15/310-hppa-nptl-carlos.patch b/packages/glibc/2.13/310-hppa-nptl-carlos.patch
index 4c028b2..4c028b2 100644
--- a/packages/glibc-ports/2.15/310-hppa-nptl-carlos.patch
+++ b/packages/glibc/2.13/310-hppa-nptl-carlos.patch
diff --git a/packages/glibc-ports/2.16.0/340-dl_execstack-PaX-support.patch b/packages/glibc/2.13/340-dl_execstack-PaX-support.patch
index 2402af0..2402af0 100644
--- a/packages/glibc-ports/2.16.0/340-dl_execstack-PaX-support.patch
+++ b/packages/glibc/2.13/340-dl_execstack-PaX-support.patch
diff --git a/packages/glibc-ports/2.16.0/350-pre20040117-pt_pax.patch b/packages/glibc/2.13/350-pre20040117-pt_pax.patch
index f8f6b83..f8f6b83 100644
--- a/packages/glibc-ports/2.16.0/350-pre20040117-pt_pax.patch
+++ b/packages/glibc/2.13/350-pre20040117-pt_pax.patch
diff --git a/packages/glibc-ports/2.16.0/360-tests-sandbox-libdl-paths.patch b/packages/glibc/2.13/360-tests-sandbox-libdl-paths.patch
index 9f78c52..9f78c52 100644
--- a/packages/glibc-ports/2.16.0/360-tests-sandbox-libdl-paths.patch
+++ b/packages/glibc/2.13/360-tests-sandbox-libdl-paths.patch
diff --git a/packages/glibc-ports/2.16.0/380-dont-build-timezone.patch b/packages/glibc/2.13/380-dont-build-timezone.patch
index 11c358e..11c358e 100644
--- a/packages/glibc-ports/2.16.0/380-dont-build-timezone.patch
+++ b/packages/glibc/2.13/380-dont-build-timezone.patch
diff --git a/packages/glibc-ports/2.16.0/400-alpha-xstat.patch b/packages/glibc/2.13/400-alpha-xstat.patch
index 6e4ab8f..6e4ab8f 100644
--- a/packages/glibc-ports/2.16.0/400-alpha-xstat.patch
+++ b/packages/glibc/2.13/400-alpha-xstat.patch
diff --git a/packages/glibc-ports/2.16.0/430-alpha-creat.patch b/packages/glibc/2.13/430-alpha-creat.patch
index da6ddda..da6ddda 100644
--- a/packages/glibc-ports/2.16.0/430-alpha-creat.patch
+++ b/packages/glibc/2.13/430-alpha-creat.patch
diff --git a/packages/glibc-ports/2.14/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/2.13/490-alpha_alpha-add-fdatasync-support.patch
index 372f34c..372f34c 100644
--- a/packages/glibc-ports/2.14/490-alpha_alpha-add-fdatasync-support.patch
+++ b/packages/glibc/2.13/490-alpha_alpha-add-fdatasync-support.patch
diff --git a/packages/glibc-ports/2.16.0/560-ppc-atomic.patch b/packages/glibc/2.13/560-ppc-atomic.patch
index ee1cb90..ee1cb90 100644
--- a/packages/glibc-ports/2.16.0/560-ppc-atomic.patch
+++ b/packages/glibc/2.13/560-ppc-atomic.patch
diff --git a/packages/glibc-ports/2.16.0/630-mips_shn_undef-hack.patch b/packages/glibc/2.13/630-mips_shn_undef-hack.patch
index 791d76c..791d76c 100644
--- a/packages/glibc-ports/2.16.0/630-mips_shn_undef-hack.patch
+++ b/packages/glibc/2.13/630-mips_shn_undef-hack.patch
diff --git a/packages/glibc-ports/2.16.0/640-alpha-atfcts.patch b/packages/glibc/2.13/640-alpha-atfcts.patch
index 7a8a94a..7a8a94a 100644
--- a/packages/glibc-ports/2.16.0/640-alpha-atfcts.patch
+++ b/packages/glibc/2.13/640-alpha-atfcts.patch
diff --git a/packages/glibc-ports/2.15/650-syslog.patch b/packages/glibc/2.13/650-syslog.patch
index c20cafc..c20cafc 100644
--- a/packages/glibc-ports/2.15/650-syslog.patch
+++ b/packages/glibc/2.13/650-syslog.patch
diff --git a/packages/glibc-ports/2.15/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/2.13/660-debug-readlink_chk-readklinkat_chk.patch
index a5a7052..a5a7052 100644
--- a/packages/glibc-ports/2.15/660-debug-readlink_chk-readklinkat_chk.patch
+++ b/packages/glibc/2.13/660-debug-readlink_chk-readklinkat_chk.patch
diff --git a/packages/glibc/2.13/998-obstack-common.patch b/packages/glibc/2.13/998-obstack-common.patch
new file mode 100644
index 0000000..4b95f06
--- /dev/null
+++ b/packages/glibc/2.13/998-obstack-common.patch
@@ -0,0 +1,30 @@
+commit 39b1f6172a2f9ddc74a8f82d6e84dd13b22dbaf2
+Author: Peter Collingbourne <pcc@google.com>
+Date: Wed May 15 20:28:08 2013 +0200
+
+ Move _obstack_compat out of common
+
+ it is impossible to create an alias of a common symbol (as
+ compat_symbol does), because common symbols do not have a section or
+ an offset until linked. GNU as tolerates aliases of common symbols by
+ simply creating another common symbol, but other assemblers (notably
+ LLVM's integrated assembler) are less tolerant.
+
+ 2013-05-15 Peter Collingbourne <pcc@google.com>
+
+ * malloc/obstack.c (_obstack_compat): Add initializer.
+ -
+
+diff --git a/malloc/obstack.c b/malloc/obstack.c
+index 25a90514f7..c3c7db4a96 100644
+--- a/malloc/obstack.c
++++ b/malloc/obstack.c
+@@ -115,7 +115,7 @@ int obstack_exit_failure = EXIT_FAILURE;
+ /* A looong time ago (before 1994, anyway; we're not sure) this global variable
+ was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
+ library still exports it because somebody might use it. */
+-struct obstack *_obstack_compat;
++struct obstack *_obstack_compat = 0;
+ compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
+ # endif
+ # endif
diff --git a/packages/glibc-ports/2.14/100-respect-env-CPPFLAGS.patch b/packages/glibc/2.14.1/100-respect-env-CPPFLAGS.patch
index 3798cb2..3798cb2 100644
--- a/packages/glibc-ports/2.14/100-respect-env-CPPFLAGS.patch
+++ b/packages/glibc/2.14.1/100-respect-env-CPPFLAGS.patch
diff --git a/packages/glibc-ports/2.15/120-i386-x86_64-revert-clone-cfi.patch b/packages/glibc/2.14.1/120-i386-x86_64-revert-clone-cfi.patch
index c7f6182..c7f6182 100644
--- a/packages/glibc-ports/2.15/120-i386-x86_64-revert-clone-cfi.patch
+++ b/packages/glibc/2.14.1/120-i386-x86_64-revert-clone-cfi.patch
diff --git a/packages/glibc-ports/2.15/140-disable-ldconfig.patch b/packages/glibc/2.14.1/140-disable-ldconfig.patch
index 378e1df..378e1df 100644
--- a/packages/glibc-ports/2.15/140-disable-ldconfig.patch
+++ b/packages/glibc/2.14.1/140-disable-ldconfig.patch
diff --git a/packages/glibc-ports/2.15/150-queue-header-updates.patch b/packages/glibc/2.14.1/150-queue-header-updates.patch
index 7cbe70e..7cbe70e 100644
--- a/packages/glibc-ports/2.15/150-queue-header-updates.patch
+++ b/packages/glibc/2.14.1/150-queue-header-updates.patch
diff --git a/packages/glibc-ports/2.14/160-manual-no-perl.patch b/packages/glibc/2.14.1/160-manual-no-perl.patch
index 5e2b807..5e2b807 100644
--- a/packages/glibc-ports/2.14/160-manual-no-perl.patch
+++ b/packages/glibc/2.14.1/160-manual-no-perl.patch
diff --git a/packages/glibc-ports/2.15/170-localedef-fix-trampoline.patch b/packages/glibc/2.14.1/170-localedef-fix-trampoline.patch
index 3cc6559..3cc6559 100644
--- a/packages/glibc-ports/2.15/170-localedef-fix-trampoline.patch
+++ b/packages/glibc/2.14.1/170-localedef-fix-trampoline.patch
diff --git a/packages/glibc-ports/2.15/180-resolv-dynamic.patch b/packages/glibc/2.14.1/180-resolv-dynamic.patch
index e916bce..e916bce 100644
--- a/packages/glibc-ports/2.15/180-resolv-dynamic.patch
+++ b/packages/glibc/2.14.1/180-resolv-dynamic.patch
diff --git a/packages/glibc-ports/2.14.1/190-localedef-mmap.patch b/packages/glibc/2.14.1/190-localedef-mmap.patch
index f3914cd..f3914cd 100644
--- a/packages/glibc-ports/2.14.1/190-localedef-mmap.patch
+++ b/packages/glibc/2.14.1/190-localedef-mmap.patch
diff --git a/packages/glibc-ports/2.15/200-fadvise64_64.patch b/packages/glibc/2.14.1/200-fadvise64_64.patch
index 71bca38..71bca38 100644
--- a/packages/glibc-ports/2.15/200-fadvise64_64.patch
+++ b/packages/glibc/2.14.1/200-fadvise64_64.patch
diff --git a/packages/glibc-ports/2.14/220-section-comments.patch b/packages/glibc/2.14.1/220-section-comments.patch
index d717829..d717829 100644
--- a/packages/glibc-ports/2.14/220-section-comments.patch
+++ b/packages/glibc/2.14.1/220-section-comments.patch
diff --git a/packages/glibc-ports/2.14/230-no-inline-gmon.patch b/packages/glibc/2.14.1/230-no-inline-gmon.patch
index fa33c2b..fa33c2b 100644
--- a/packages/glibc-ports/2.14/230-no-inline-gmon.patch
+++ b/packages/glibc/2.14.1/230-no-inline-gmon.patch
diff --git a/packages/glibc-ports/2.14/260-assume-pipe2.patch b/packages/glibc/2.14.1/260-assume-pipe2.patch
index 42e8f4e..42e8f4e 100644
--- a/packages/glibc-ports/2.14/260-assume-pipe2.patch
+++ b/packages/glibc/2.14.1/260-assume-pipe2.patch
diff --git a/packages/glibc-ports/2.15/270-china.patch b/packages/glibc/2.14.1/270-china.patch
index 41d7759..41d7759 100644
--- a/packages/glibc-ports/2.15/270-china.patch
+++ b/packages/glibc/2.14.1/270-china.patch
diff --git a/packages/glibc-ports/2.15/280-new-valencian-locale.patch b/packages/glibc/2.14.1/280-new-valencian-locale.patch
index 4cdd108..4cdd108 100644
--- a/packages/glibc-ports/2.15/280-new-valencian-locale.patch
+++ b/packages/glibc/2.14.1/280-new-valencian-locale.patch
diff --git a/packages/glibc-ports/2.14/300-nscd-one-fork.patch b/packages/glibc/2.14.1/300-nscd-one-fork.patch
index adc9b3f..adc9b3f 100644
--- a/packages/glibc-ports/2.14/300-nscd-one-fork.patch
+++ b/packages/glibc/2.14.1/300-nscd-one-fork.patch
diff --git a/packages/glibc-ports/2.14/310-hppa-nptl-carlos.patch b/packages/glibc/2.14.1/310-hppa-nptl-carlos.patch
index 4c028b2..4c028b2 100644
--- a/packages/glibc-ports/2.14/310-hppa-nptl-carlos.patch
+++ b/packages/glibc/2.14.1/310-hppa-nptl-carlos.patch
diff --git a/packages/glibc-ports/2.15/340-dl_execstack-PaX-support.patch b/packages/glibc/2.14.1/340-dl_execstack-PaX-support.patch
index 2402af0..2402af0 100644
--- a/packages/glibc-ports/2.15/340-dl_execstack-PaX-support.patch
+++ b/packages/glibc/2.14.1/340-dl_execstack-PaX-support.patch
diff --git a/packages/glibc-ports/2.15/350-pre20040117-pt_pax.patch b/packages/glibc/2.14.1/350-pre20040117-pt_pax.patch
index f8f6b83..f8f6b83 100644
--- a/packages/glibc-ports/2.15/350-pre20040117-pt_pax.patch
+++ b/packages/glibc/2.14.1/350-pre20040117-pt_pax.patch
diff --git a/packages/glibc-ports/2.15/360-tests-sandbox-libdl-paths.patch b/packages/glibc/2.14.1/360-tests-sandbox-libdl-paths.patch
index 9f78c52..9f78c52 100644
--- a/packages/glibc-ports/2.15/360-tests-sandbox-libdl-paths.patch
+++ b/packages/glibc/2.14.1/360-tests-sandbox-libdl-paths.patch
diff --git a/packages/glibc-ports/2.15/380-dont-build-timezone.patch b/packages/glibc/2.14.1/380-dont-build-timezone.patch
index 11c358e..11c358e 100644
--- a/packages/glibc-ports/2.15/380-dont-build-timezone.patch
+++ b/packages/glibc/2.14.1/380-dont-build-timezone.patch
diff --git a/packages/glibc-ports/2.15/400-alpha-xstat.patch b/packages/glibc/2.14.1/400-alpha-xstat.patch
index 6e4ab8f..6e4ab8f 100644
--- a/packages/glibc-ports/2.15/400-alpha-xstat.patch
+++ b/packages/glibc/2.14.1/400-alpha-xstat.patch
diff --git a/packages/glibc-ports/2.15/430-alpha-creat.patch b/packages/glibc/2.14.1/430-alpha-creat.patch
index da6ddda..da6ddda 100644
--- a/packages/glibc-ports/2.15/430-alpha-creat.patch
+++ b/packages/glibc/2.14.1/430-alpha-creat.patch
diff --git a/packages/glibc-ports/2.14.1/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/2.14.1/490-alpha_alpha-add-fdatasync-support.patch
index 372f34c..372f34c 100644
--- a/packages/glibc-ports/2.14.1/490-alpha_alpha-add-fdatasync-support.patch
+++ b/packages/glibc/2.14.1/490-alpha_alpha-add-fdatasync-support.patch
diff --git a/packages/glibc-ports/2.15/560-ppc-atomic.patch b/packages/glibc/2.14.1/560-ppc-atomic.patch
index ee1cb90..ee1cb90 100644
--- a/packages/glibc-ports/2.15/560-ppc-atomic.patch
+++ b/packages/glibc/2.14.1/560-ppc-atomic.patch
diff --git a/packages/glibc-ports/2.15/630-mips_shn_undef-hack.patch b/packages/glibc/2.14.1/630-mips_shn_undef-hack.patch
index 791d76c..791d76c 100644
--- a/packages/glibc-ports/2.15/630-mips_shn_undef-hack.patch
+++ b/packages/glibc/2.14.1/630-mips_shn_undef-hack.patch
diff --git a/packages/glibc-ports/2.15/640-alpha-atfcts.patch b/packages/glibc/2.14.1/640-alpha-atfcts.patch
index 7a8a94a..7a8a94a 100644
--- a/packages/glibc-ports/2.15/640-alpha-atfcts.patch
+++ b/packages/glibc/2.14.1/640-alpha-atfcts.patch
diff --git a/packages/glibc-ports/2.14/650-syslog.patch b/packages/glibc/2.14.1/650-syslog.patch
index c20cafc..c20cafc 100644
--- a/packages/glibc-ports/2.14/650-syslog.patch
+++ b/packages/glibc/2.14.1/650-syslog.patch
diff --git a/packages/glibc-ports/2.14/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/2.14.1/660-debug-readlink_chk-readklinkat_chk.patch
index a5a7052..a5a7052 100644
--- a/packages/glibc-ports/2.14/660-debug-readlink_chk-readklinkat_chk.patch
+++ b/packages/glibc/2.14.1/660-debug-readlink_chk-readklinkat_chk.patch
diff --git a/packages/glibc/2.14.1/996-obsolete-rpc.patch b/packages/glibc/2.14.1/996-obsolete-rpc.patch
new file mode 100644
index 0000000..38cb521
--- /dev/null
+++ b/packages/glibc/2.14.1/996-obsolete-rpc.patch
@@ -0,0 +1,1660 @@
+commit 021db4be6f1f4189f66feee066a495d49e92b93e
+Author: Andreas Jaeger <aj@suse.de>
+Date: Thu May 10 20:16:53 2012 +0200
+
+ Make sunrpc code usable again
+
+ New configure option --enable-obsolete-rpc makes the deprecated RPC
+ headers and functions available at compile time as they were before
+ version 2.14. This option will be removed at some time in the future
+ after the TI-RPC library becomes fully sufficient for the needs of
+ existing applications.
+
+diff --git a/config.h.in b/config.h.in
+index 787873b4c0..54952609ef 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -178,6 +178,9 @@
+ /* Define if `.ctors' and `.dtors' sections shouldn't be used. */
+ #undef NO_CTORS_DTORS_SECTIONS
+
++/* Define if obsolete RPC code should be made available for user-level code
++ to link against. */
++#undef LINK_OBSOLETE_RPC
+ /*
+ */
+
+diff --git a/config.make.in b/config.make.in
+index 5f6f9e281d..6c4d04ee33 100644
+--- a/config.make.in
++++ b/config.make.in
+@@ -96,6 +96,7 @@ add-on-subdirs = @add_on_subdirs@
+ sysdeps-add-ons = @sysdeps_add_ons@
+ cross-compiling = @cross_compiling@
+ force-install = @force_install@
++link-obsolete-rpc = @link_obsolete_rpc@
+
+ # Build tools.
+ CC = @CC@
+diff --git a/configure b/configure
+index 1c5f4adbea..c7cb47d0c2 100755
+--- a/configure
++++ b/configure
+@@ -687,6 +687,7 @@ multi_arch
+ base_machine
+ add_on_subdirs
+ add_ons
++link_obsolete_rpc
+ libc_cv_nss_crypt
+ experimental_malloc
+ all_warnings
+@@ -779,6 +780,7 @@ enable_kernel
+ enable_multi_arch
+ enable_experimental_malloc
+ enable_nss_crypt
++enable_obsolete_rpc
+ with_cpu
+ '
+ ac_precious_vars='build_alias
+@@ -1434,6 +1436,8 @@ Optional Features:
+ --enable-experimental-malloc
+ enable experimental malloc features
+ --enable-nss-crypt enable libcrypt to use nss
++ --enable-obsolete-rpc build and install the obsolete RPC code for
++ link-time usage
+
+ Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+@@ -3746,6 +3750,20 @@ else
+ fi
+
+
++# Check whether --enable-obsolete-rpc was given.
++if test "${enable_obsolete_rpc+set}" = set; then :
++ enableval=$enable_obsolete_rpc; link_obsolete_rpc=$enableval
++else
++ link_obsolete_rpc=no
++fi
++
++
++
++if test "$link_obsolete_rpc" = yes; then
++ $as_echo "#define LINK_OBSOLETE_RPC 1" >>confdefs.h
++
++fi
++
+ # The way shlib-versions is used to generate soversions.mk uses a
+ # fairly simplistic model for name recognition that can't distinguish
+ # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
+diff --git a/configure.in b/configure.in
+index 19a2c1a0f0..4eb9277e8c 100644
+--- a/configure.in
++++ b/configure.in
+@@ -252,6 +252,17 @@ else
+ fi
+ AC_SUBST(libc_cv_nss_crypt)
+
++AC_ARG_ENABLE([obsolete-rpc],
++ AC_HELP_STRING([--enable-obsolete-rpc],
++ [build and install the obsolete RPC code for link-time usage]),
++ [link_obsolete_rpc=$enableval],
++ [link_obsolete_rpc=no])
++AC_SUBST(link_obsolete_rpc)
++
++if test "$link_obsolete_rpc" = yes; then
++ AC_DEFINE(LINK_OBSOLETE_RPC)
++fi
++
+ # The way shlib-versions is used to generate soversions.mk uses a
+ # fairly simplistic model for name recognition that can't distinguish
+ # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
+diff --git a/include/libc-symbols.h b/include/libc-symbols.h
+index 951e46a6e3..0c3274e253 100644
+--- a/include/libc-symbols.h
++++ b/include/libc-symbols.h
+@@ -556,7 +556,12 @@ for linking")
+ # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+ # define libc_hidden_def(name) hidden_def (name)
+ # define libc_hidden_weak(name) hidden_weak (name)
+-# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
++# ifdef LINK_OBSOLETE_RPC
++ /* libc_hidden_nolink_sunrpc should only get used in sunrpc code. */
++# define libc_hidden_nolink_sunrpc(name, version) hidden_def (name)
++# else
++# define libc_hidden_nolink_sunrpc(name, version) hidden_nolink (name, libc, version)
++# endif
+ # define libc_hidden_ver(local, name) hidden_ver (local, name)
+ # define libc_hidden_data_def(name) hidden_data_def (name)
+ # define libc_hidden_data_weak(name) hidden_data_weak (name)
+diff --git a/nis/Makefile b/nis/Makefile
+index a48753f7a9..b412cee304 100644
+--- a/nis/Makefile
++++ b/nis/Makefile
+@@ -23,6 +23,12 @@ subdir := nis
+
+ aux := nis_hash
+
++include ../Makeconfig
++
++ifeq ($(link-obsolete-rpc),yes)
++headers := $(wildcard rpcsvc/*.[hx])
++endif
++
+ distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
+ nisplus-parser.h nis_xdr.h nss \
+ $(wildcard rpcsvc/*.[hx])
+diff --git a/sunrpc/Makefile b/sunrpc/Makefile
+index e61efd02b3..3b79dcdb72 100644
+--- a/sunrpc/Makefile
++++ b/sunrpc/Makefile
+@@ -60,6 +60,10 @@ generated-dirs := rpcsvc
+
+ include ../Makeconfig
+
++ifeq ($(link-obsolete-rpc),yes)
++headers += $(headers-in-tirpc) $(headers-not-in-tirpc)
++endif
++
+ ifeq ($(versioning),yes)
+ need-export-routines := auth_des auth_unix clnt_gen clnt_perr clnt_tcp \
+ clnt_udp get_myaddr key_call netname pm_getport \
+@@ -73,9 +77,11 @@ routines := auth_none authuxprot bindrsvprt clnt_raw clnt_simp \
+ svc_simple xdr_float xdr_rec publickey authdes_prot \
+ des_crypt des_impl des_soft key_prot openchild rtime svcauth_des \
+ clnt_unix svc_unix create_xid $(need-export-routines)
++ifneq ($(link-obsolete-rpc),yes)
+ # We only add the RPC for compatibility to libc.so.
+ shared-only-routines = $(routines)
+ endif
++endif
+
+ # We do not build rpcinfo anymore. It is not needed for a bootstrap
+ # and not wanted on complete systems.
+diff --git a/sunrpc/auth_des.c b/sunrpc/auth_des.c
+index 96bbcfc328..0408d60826 100644
+--- a/sunrpc/auth_des.c
++++ b/sunrpc/auth_des.c
+@@ -117,7 +117,7 @@ authdes_create (const char *servername, u_int window,
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (authdes_create)
+ #else
+-libc_hidden_nolink (authdes_create, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (authdes_create, GLIBC_2_1)
+ #endif
+
+ AUTH *
+@@ -211,7 +211,7 @@ failed:
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (authdes_pk_create)
+ #else
+-libc_hidden_nolink (authdes_pk_create, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (authdes_pk_create, GLIBC_2_1)
+ #endif
+
+ /*
+diff --git a/sunrpc/auth_none.c b/sunrpc/auth_none.c
+index 5f252a9544..3af5966794 100644
+--- a/sunrpc/auth_none.c
++++ b/sunrpc/auth_none.c
+@@ -95,7 +95,7 @@ authnone_create (void)
+ __libc_once (authnone_private_guard, authnone_create_once);
+ return &authnone_private.no_client;
+ }
+-libc_hidden_nolink (authnone_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (authnone_create, GLIBC_2_0)
+
+ static bool_t
+ authnone_marshal (AUTH *client, XDR *xdrs)
+diff --git a/sunrpc/auth_unix.c b/sunrpc/auth_unix.c
+index d3b5dc7dee..68b42d7b1f 100644
+--- a/sunrpc/auth_unix.c
++++ b/sunrpc/auth_unix.c
+@@ -149,7 +149,7 @@ no_memory:
+ marshal_new_auth (auth);
+ return auth;
+ }
+-libc_hidden_nolink (authunix_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (authunix_create, GLIBC_2_0)
+
+ /*
+ * Returns an auth handle with parameters determined by doing lots of
+@@ -216,7 +216,7 @@ authunix_create_default (void)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (authunix_create_default)
+ #else
+-libc_hidden_nolink (authunix_create_default, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (authunix_create_default, GLIBC_2_0)
+ #endif
+
+ /*
+diff --git a/sunrpc/authdes_prot.c b/sunrpc/authdes_prot.c
+index 0a25bac143..164c1223ca 100644
+--- a/sunrpc/authdes_prot.c
++++ b/sunrpc/authdes_prot.c
+@@ -63,7 +63,7 @@ xdr_authdes_cred (XDR *xdrs, struct authdes_cred *cred)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_authdes_cred, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_authdes_cred, GLIBC_2_1)
+
+
+ bool_t
+@@ -78,4 +78,4 @@ xdr_authdes_verf (register XDR *xdrs, register struct authdes_verf *verf)
+ sizeof (verf->adv_int_u)));
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_authdes_verf, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_authdes_verf, GLIBC_2_1)
+diff --git a/sunrpc/authuxprot.c b/sunrpc/authuxprot.c
+index 64da1799e0..d37faee0c7 100644
+--- a/sunrpc/authuxprot.c
++++ b/sunrpc/authuxprot.c
+@@ -63,4 +63,4 @@ xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p)
+ }
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_authunix_parms, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_authunix_parms, GLIBC_2_0)
+diff --git a/sunrpc/clnt_gen.c b/sunrpc/clnt_gen.c
+index 2b7096cf20..df34672d72 100644
+--- a/sunrpc/clnt_gen.c
++++ b/sunrpc/clnt_gen.c
+@@ -175,5 +175,5 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (clnt_create)
+ #else
+-libc_hidden_nolink (clnt_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnt_create, GLIBC_2_0)
+ #endif
+diff --git a/sunrpc/clnt_perr.c b/sunrpc/clnt_perr.c
+index 175370ebfc..b4f84c92e8 100644
+--- a/sunrpc/clnt_perr.c
++++ b/sunrpc/clnt_perr.c
+@@ -127,7 +127,7 @@ clnt_sperror (CLIENT * rpch, const char *msg)
+
+ return str;
+ }
+-libc_hidden_nolink (clnt_sperror, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnt_sperror, GLIBC_2_0)
+
+ void
+ clnt_perror (CLIENT * rpch, const char *msg)
+@@ -137,7 +137,7 @@ clnt_perror (CLIENT * rpch, const char *msg)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (clnt_perror)
+ #else
+-libc_hidden_nolink (clnt_perror, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnt_perror, GLIBC_2_0)
+ #endif
+
+
+@@ -270,7 +270,7 @@ clnt_perrno (enum clnt_stat num)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (clnt_perrno)
+ #else
+-libc_hidden_nolink (clnt_perrno, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnt_perrno, GLIBC_2_0)
+ #endif
+
+ char *
+@@ -308,7 +308,7 @@ clnt_spcreateerror (const char *msg)
+
+ return str;
+ }
+-libc_hidden_nolink (clnt_spcreateerror, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnt_spcreateerror, GLIBC_2_0)
+
+ void
+ clnt_pcreateerror (const char *msg)
+@@ -318,7 +318,7 @@ clnt_pcreateerror (const char *msg)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (clnt_pcreateerror)
+ #else
+-libc_hidden_nolink (clnt_pcreateerror, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnt_pcreateerror, GLIBC_2_0)
+ #endif
+
+ struct auth_errtab
+diff --git a/sunrpc/clnt_raw.c b/sunrpc/clnt_raw.c
+index 95e3eae988..4004c6b6a8 100644
+--- a/sunrpc/clnt_raw.c
++++ b/sunrpc/clnt_raw.c
+@@ -129,7 +129,7 @@ clntraw_create (u_long prog, u_long vers)
+ client->cl_auth = authnone_create ();
+ return client;
+ }
+-libc_hidden_nolink (clntraw_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clntraw_create, GLIBC_2_0)
+
+ static enum clnt_stat
+ clntraw_call (h, proc, xargs, argsp, xresults, resultsp, timeout)
+diff --git a/sunrpc/clnt_simp.c b/sunrpc/clnt_simp.c
+index d2dd3b307a..d612df09a0 100644
+--- a/sunrpc/clnt_simp.c
++++ b/sunrpc/clnt_simp.c
+@@ -139,7 +139,7 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum,
+ crp->valid = 0;
+ return (int) clnt_stat;
+ }
+-libc_hidden_nolink (callrpc, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (callrpc, GLIBC_2_0)
+
+ #ifdef _RPC_THREAD_SAFE_
+ void
+diff --git a/sunrpc/clnt_tcp.c b/sunrpc/clnt_tcp.c
+index d1fc43dbfd..6bd4c8c0cd 100644
+--- a/sunrpc/clnt_tcp.c
++++ b/sunrpc/clnt_tcp.c
+@@ -220,7 +220,7 @@ fooy:
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (clnttcp_create)
+ #else
+-libc_hidden_nolink (clnttcp_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnttcp_create, GLIBC_2_0)
+ #endif
+
+ static enum clnt_stat
+diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c
+index 294e13a58c..7ecf2ef5a5 100644
+--- a/sunrpc/clnt_udp.c
++++ b/sunrpc/clnt_udp.c
+@@ -239,7 +239,7 @@ fooy:
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (__libc_clntudp_bufcreate)
+ #else
+-libc_hidden_nolink (__libc_clntudp_bufcreate, GLIBC_PRIVATE)
++libc_hidden_nolink_sunrpc (__libc_clntudp_bufcreate, GLIBC_PRIVATE)
+ #endif
+
+ CLIENT *
+@@ -250,7 +250,7 @@ clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version,
+ return __libc_clntudp_bufcreate (raddr, program, version, wait,
+ sockp, sendsz, recvsz, 0);
+ }
+-libc_hidden_nolink (clntudp_bufcreate, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clntudp_bufcreate, GLIBC_2_0)
+
+ CLIENT *
+ clntudp_create (raddr, program, version, wait, sockp)
+@@ -266,7 +266,7 @@ clntudp_create (raddr, program, version, wait, sockp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (clntudp_create)
+ #else
+-libc_hidden_nolink (clntudp_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clntudp_create, GLIBC_2_0)
+ #endif
+
+ static int
+diff --git a/sunrpc/clnt_unix.c b/sunrpc/clnt_unix.c
+index 282127bb8b..776ceab484 100644
+--- a/sunrpc/clnt_unix.c
++++ b/sunrpc/clnt_unix.c
+@@ -200,7 +200,7 @@ fooy:
+ mem_free ((caddr_t) h, sizeof (CLIENT));
+ return (CLIENT *) NULL;
+ }
+-libc_hidden_nolink (clntunix_create, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (clntunix_create, GLIBC_2_1)
+
+ static enum clnt_stat
+ clntunix_call (h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout)
+diff --git a/sunrpc/des_crypt.c b/sunrpc/des_crypt.c
+index 8745900b82..22a34b7f3a 100644
+--- a/sunrpc/des_crypt.c
++++ b/sunrpc/des_crypt.c
+@@ -102,7 +102,7 @@ cbc_crypt (char *key, char *buf, unsigned int len, unsigned int mode,
+ COPY8 (dp.des_ivec, ivec);
+ return err;
+ }
+-libc_hidden_nolink (cbc_crypt, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (cbc_crypt, GLIBC_2_1)
+
+ /*
+ * ECB mode encryption
+@@ -115,4 +115,4 @@ ecb_crypt (char *key, char *buf, unsigned int len, unsigned int mode)
+ dp.des_mode = ECB;
+ return common_crypt (key, buf, len, mode, &dp);
+ }
+-libc_hidden_nolink (ecb_crypt, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (ecb_crypt, GLIBC_2_1)
+diff --git a/sunrpc/des_soft.c b/sunrpc/des_soft.c
+index 27d918c64d..cddef5d76b 100644
+--- a/sunrpc/des_soft.c
++++ b/sunrpc/des_soft.c
+@@ -70,4 +70,4 @@ des_setparity (char *p)
+ p++;
+ }
+ }
+-libc_hidden_nolink (des_setparity, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (des_setparity, GLIBC_2_1)
+diff --git a/sunrpc/get_myaddr.c b/sunrpc/get_myaddr.c
+index def5b7a74a..24407b53ec 100644
+--- a/sunrpc/get_myaddr.c
++++ b/sunrpc/get_myaddr.c
+@@ -99,5 +99,5 @@ get_myaddress (struct sockaddr_in *addr)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (get_myaddress)
+ #else
+-libc_hidden_nolink (get_myaddress, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (get_myaddress, GLIBC_2_0)
+ #endif
+diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c
+index 6d08bf8e80..e0a076b47f 100644
+--- a/sunrpc/key_call.c
++++ b/sunrpc/key_call.c
+@@ -80,7 +80,7 @@ key_setsecret (char *secretkey)
+ }
+ return 0;
+ }
+-libc_hidden_nolink (key_setsecret, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_setsecret, GLIBC_2_1)
+
+ /* key_secretkey_is_set() returns 1 if the keyserver has a secret key
+ * stored for the caller's effective uid; it returns 0 otherwise
+@@ -109,7 +109,7 @@ key_secretkey_is_set (void)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (key_secretkey_is_set)
+ #else
+-libc_hidden_nolink (key_secretkey_is_set, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_secretkey_is_set, GLIBC_2_1)
+ #endif
+
+ int
+@@ -133,7 +133,7 @@ key_encryptsession (char *remotename, des_block *deskey)
+ *deskey = res.cryptkeyres_u.deskey;
+ return 0;
+ }
+-libc_hidden_nolink (key_encryptsession, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_encryptsession, GLIBC_2_1)
+
+ int
+ key_decryptsession (char *remotename, des_block *deskey)
+@@ -155,7 +155,7 @@ key_decryptsession (char *remotename, des_block *deskey)
+ *deskey = res.cryptkeyres_u.deskey;
+ return 0;
+ }
+-libc_hidden_nolink (key_decryptsession, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_decryptsession, GLIBC_2_1)
+
+ int
+ key_encryptsession_pk (char *remotename, netobj *remotekey,
+@@ -180,7 +180,7 @@ key_encryptsession_pk (char *remotename, netobj *remotekey,
+ *deskey = res.cryptkeyres_u.deskey;
+ return 0;
+ }
+-libc_hidden_nolink (key_encryptsession_pk, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_encryptsession_pk, GLIBC_2_1)
+
+ int
+ key_decryptsession_pk (char *remotename, netobj *remotekey,
+@@ -205,7 +205,7 @@ key_decryptsession_pk (char *remotename, netobj *remotekey,
+ *deskey = res.cryptkeyres_u.deskey;
+ return 0;
+ }
+-libc_hidden_nolink (key_decryptsession_pk, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_decryptsession_pk, GLIBC_2_1)
+
+ int
+ key_gendes (des_block *key)
+@@ -239,7 +239,7 @@ key_gendes (des_block *key)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (key_gendes)
+ #else
+-libc_hidden_nolink (key_gendes, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_gendes, GLIBC_2_1)
+ #endif
+
+ int
+@@ -259,7 +259,7 @@ key_setnet (struct key_netstarg *arg)
+ }
+ return 1;
+ }
+-libc_hidden_nolink (key_setnet, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_setnet, GLIBC_2_1)
+
+ int
+ key_get_conv (char *pkey, des_block *deskey)
+@@ -278,7 +278,7 @@ key_get_conv (char *pkey, des_block *deskey)
+ *deskey = res.cryptkeyres_u.deskey;
+ return 0;
+ }
+-libc_hidden_nolink (key_get_conv, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_get_conv, GLIBC_2_1)
+
+ /*
+ * Hack to allow the keyserver to use AUTH_DES (for authenticated
+diff --git a/sunrpc/key_prot.c b/sunrpc/key_prot.c
+index dd73f5e3cb..2899c9a448 100644
+--- a/sunrpc/key_prot.c
++++ b/sunrpc/key_prot.c
+@@ -38,7 +38,7 @@ xdr_keystatus (XDR * xdrs, keystatus * objp)
+
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_keystatus, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_keystatus, GLIBC_2_0)
+
+ bool_t
+ xdr_keybuf (XDR * xdrs, keybuf objp)
+@@ -48,7 +48,7 @@ xdr_keybuf (XDR * xdrs, keybuf objp)
+
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_keybuf, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_keybuf, GLIBC_2_0)
+
+ bool_t
+ xdr_netnamestr (XDR * xdrs, netnamestr * objp)
+@@ -58,7 +58,7 @@ xdr_netnamestr (XDR * xdrs, netnamestr * objp)
+
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_netnamestr, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_netnamestr, GLIBC_2_1)
+
+ bool_t
+ xdr_cryptkeyarg (XDR * xdrs, cryptkeyarg * objp)
+@@ -71,7 +71,7 @@ xdr_cryptkeyarg (XDR * xdrs, cryptkeyarg * objp)
+
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_cryptkeyarg, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_cryptkeyarg, GLIBC_2_0)
+
+ bool_t
+ xdr_cryptkeyarg2 (XDR * xdrs, cryptkeyarg2 * objp)
+@@ -84,7 +84,7 @@ xdr_cryptkeyarg2 (XDR * xdrs, cryptkeyarg2 * objp)
+ return FALSE;
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_cryptkeyarg2, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_cryptkeyarg2, GLIBC_2_0)
+
+ bool_t
+ xdr_cryptkeyres (XDR * xdrs, cryptkeyres * objp)
+@@ -102,7 +102,7 @@ xdr_cryptkeyres (XDR * xdrs, cryptkeyres * objp)
+ }
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_cryptkeyres, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_cryptkeyres, GLIBC_2_0)
+
+ bool_t
+ xdr_unixcred (XDR * xdrs, unixcred * objp)
+@@ -117,7 +117,7 @@ xdr_unixcred (XDR * xdrs, unixcred * objp)
+ return FALSE;
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_unixcred, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_unixcred, GLIBC_2_1)
+
+ bool_t
+ xdr_getcredres (XDR * xdrs, getcredres * objp)
+@@ -135,7 +135,7 @@ xdr_getcredres (XDR * xdrs, getcredres * objp)
+ }
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_getcredres, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_getcredres, GLIBC_2_1)
+
+ bool_t
+ xdr_key_netstarg (XDR * xdrs, key_netstarg * objp)
+@@ -148,7 +148,7 @@ xdr_key_netstarg (XDR * xdrs, key_netstarg * objp)
+ return FALSE;
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_key_netstarg, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_key_netstarg, GLIBC_2_0)
+
+ bool_t
+ xdr_key_netstres (XDR * xdrs, key_netstres * objp)
+@@ -166,4 +166,4 @@ xdr_key_netstres (XDR * xdrs, key_netstres * objp)
+ }
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_key_netstres, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_key_netstres, GLIBC_2_0)
+diff --git a/sunrpc/netname.c b/sunrpc/netname.c
+index 0b4980074c..197d503eae 100644
+--- a/sunrpc/netname.c
++++ b/sunrpc/netname.c
+@@ -54,7 +54,7 @@ user2netname (char netname[MAXNETNAMELEN + 1], const uid_t uid,
+ netname[i - 1] = '\0';
+ return 1;
+ }
+-libc_hidden_nolink (user2netname, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (user2netname, GLIBC_2_1)
+
+ int
+ host2netname (char netname[MAXNETNAMELEN + 1], const char *host,
+@@ -118,7 +118,7 @@ host2netname (char netname[MAXNETNAMELEN + 1], const char *host,
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (host2netname)
+ #else
+-libc_hidden_nolink (host2netname, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (host2netname, GLIBC_2_1)
+ #endif
+
+ int
+@@ -134,7 +134,7 @@ getnetname (char name[MAXNETNAMELEN + 1])
+ dummy = user2netname (name, uid, NULL);
+ return (dummy);
+ }
+-libc_hidden_nolink (getnetname, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (getnetname, GLIBC_2_1)
+
+ /* Type of the lookup function for netname2user. */
+ typedef int (*netname2user_function) (const char netname[MAXNETNAMELEN + 1],
+@@ -187,7 +187,7 @@ netname2user (const char netname[MAXNETNAMELEN + 1], uid_t * uidp, gid_t * gidp,
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (netname2user)
+ #else
+-libc_hidden_nolink (netname2user, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (netname2user, GLIBC_2_1)
+ #endif
+
+ int
+@@ -214,4 +214,4 @@ netname2host (const char netname[MAXNETNAMELEN + 1], char *hostname,
+
+ return 1;
+ }
+-libc_hidden_nolink (netname2host, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (netname2host, GLIBC_2_1)
+diff --git a/sunrpc/pm_getmaps.c b/sunrpc/pm_getmaps.c
+index 6b61d324f9..6f7ad10ef6 100644
+--- a/sunrpc/pm_getmaps.c
++++ b/sunrpc/pm_getmaps.c
+@@ -84,4 +84,4 @@ pmap_getmaps (struct sockaddr_in *address)
+ address->sin_port = 0;
+ return head;
+ }
+-libc_hidden_nolink (pmap_getmaps, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (pmap_getmaps, GLIBC_2_0)
+diff --git a/sunrpc/pm_getport.c b/sunrpc/pm_getport.c
+index 58974a5661..f10f87250d 100644
+--- a/sunrpc/pm_getport.c
++++ b/sunrpc/pm_getport.c
+@@ -142,7 +142,7 @@ __libc_rpc_getport (address, program, version, protocol, timeout_sec,
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (__libc_rpc_getport)
+ #else
+-libc_hidden_nolink (__libc_rpc_getport, GLIBC_PRIVATE)
++libc_hidden_nolink_sunrpc (__libc_rpc_getport, GLIBC_PRIVATE)
+ #endif
+
+
+@@ -160,4 +160,4 @@ pmap_getport (address, program, version, protocol)
+ {
+ return __libc_rpc_getport (address, program, version, protocol, 5, 60);
+ }
+-libc_hidden_nolink (pmap_getport, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (pmap_getport, GLIBC_2_0)
+diff --git a/sunrpc/pmap_clnt.c b/sunrpc/pmap_clnt.c
+index 36479f0e5c..5d7d185766 100644
+--- a/sunrpc/pmap_clnt.c
++++ b/sunrpc/pmap_clnt.c
+@@ -131,7 +131,7 @@ pmap_set (u_long program, u_long version, int protocol, u_short port)
+ /* (void)close(socket); CLNT_DESTROY closes it */
+ return rslt;
+ }
+-libc_hidden_nolink (pmap_set, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (pmap_set, GLIBC_2_0)
+
+ /*
+ * Remove the mapping between program,version and port.
+@@ -162,4 +162,4 @@ pmap_unset (u_long program, u_long version)
+ /* (void)close(socket); CLNT_DESTROY already closed it */
+ return rslt;
+ }
+-libc_hidden_nolink (pmap_unset, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (pmap_unset, GLIBC_2_0)
+diff --git a/sunrpc/pmap_prot.c b/sunrpc/pmap_prot.c
+index 5a2e052728..8df41dc5f2 100644
+--- a/sunrpc/pmap_prot.c
++++ b/sunrpc/pmap_prot.c
+@@ -49,4 +49,4 @@ xdr_pmap (xdrs, regs)
+ return xdr_u_long (xdrs, &regs->pm_port);
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_pmap, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_pmap, GLIBC_2_0)
+diff --git a/sunrpc/pmap_prot2.c b/sunrpc/pmap_prot2.c
+index 3213898ce8..57b0800178 100644
+--- a/sunrpc/pmap_prot2.c
++++ b/sunrpc/pmap_prot2.c
+@@ -110,4 +110,4 @@ xdr_pmaplist (xdrs, rp)
+ rp = freeing ? &next : &((*rp)->pml_next);
+ }
+ }
+-libc_hidden_nolink (xdr_pmaplist, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_pmaplist, GLIBC_2_0)
+diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c
+index 16f322773e..fd8de85589 100644
+--- a/sunrpc/pmap_rmt.c
++++ b/sunrpc/pmap_rmt.c
+@@ -104,7 +104,7 @@ pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_p
+ addr->sin_port = 0;
+ return stat;
+ }
+-libc_hidden_nolink (pmap_rmtcall, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (pmap_rmtcall, GLIBC_2_0)
+
+
+ /*
+@@ -137,7 +137,7 @@ xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap)
+ }
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_rmtcall_args, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_rmtcall_args, GLIBC_2_0)
+
+ /*
+ * XDR remote call results
+@@ -160,7 +160,7 @@ xdr_rmtcallres (xdrs, crp)
+ }
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_rmtcallres, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_rmtcallres, GLIBC_2_0)
+
+
+ /*
+@@ -388,4 +388,4 @@ done_broad:
+ AUTH_DESTROY (unix_auth);
+ return stat;
+ }
+-libc_hidden_nolink (clnt_broadcast, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnt_broadcast, GLIBC_2_0)
+diff --git a/sunrpc/publickey.c b/sunrpc/publickey.c
+index 4d0b09874c..089b544953 100644
+--- a/sunrpc/publickey.c
++++ b/sunrpc/publickey.c
+@@ -75,7 +75,7 @@ getpublickey (const char *name, char *key)
+
+ return status == NSS_STATUS_SUCCESS;
+ }
+-libc_hidden_nolink (getpublickey, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (getpublickey, GLIBC_2_0)
+
+
+ int
+@@ -118,4 +118,4 @@ getsecretkey (const char *name, char *key, const char *passwd)
+
+ return status == NSS_STATUS_SUCCESS;
+ }
+-libc_hidden_nolink (getsecretkey, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (getsecretkey, GLIBC_2_0)
+diff --git a/sunrpc/rpc_cmsg.c b/sunrpc/rpc_cmsg.c
+index ed70104b68..62d95fcc83 100644
+--- a/sunrpc/rpc_cmsg.c
++++ b/sunrpc/rpc_cmsg.c
+@@ -194,4 +194,4 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
+ return xdr_opaque_auth (xdrs, &(cmsg->rm_call.cb_verf));
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_callmsg, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_callmsg, GLIBC_2_0)
+diff --git a/sunrpc/rpc_common.c b/sunrpc/rpc_common.c
+index 44b4b38f4d..710191163c 100644
+--- a/sunrpc/rpc_common.c
++++ b/sunrpc/rpc_common.c
+@@ -45,7 +45,7 @@
+ section but we cannot add const to the type because this isn't how
+ the variable is declared. So we use the section attribute. */
+ struct opaque_auth _null_auth __attribute__ ((nocommon));
+-libc_hidden_nolink (_null_auth, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (_null_auth, GLIBC_2_0)
+ fd_set svc_fdset;
+ struct rpc_createerr rpc_createerr;
+ struct pollfd *svc_pollfd;
+diff --git a/sunrpc/rpc_dtable.c b/sunrpc/rpc_dtable.c
+index 9bee215496..81ddf8f55a 100644
+--- a/sunrpc/rpc_dtable.c
++++ b/sunrpc/rpc_dtable.c
+@@ -46,4 +46,4 @@ _rpc_dtablesize (void)
+
+ return size;
+ }
+-libc_hidden_nolink (_rpc_dtablesize, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (_rpc_dtablesize, GLIBC_2_0)
+diff --git a/sunrpc/rpc_prot.c b/sunrpc/rpc_prot.c
+index 9a23cc1b02..dc24f3673b 100644
+--- a/sunrpc/rpc_prot.c
++++ b/sunrpc/rpc_prot.c
+@@ -57,7 +57,7 @@ xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap)
+ &ap->oa_length, MAX_AUTH_BYTES);
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_opaque_auth, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_opaque_auth, GLIBC_2_0)
+
+ /*
+ * XDR a DES block
+@@ -67,7 +67,7 @@ xdr_des_block (XDR *xdrs, des_block *blkp)
+ {
+ return xdr_opaque (xdrs, (caddr_t) blkp, sizeof (des_block));
+ }
+-libc_hidden_nolink (xdr_des_block, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_des_block, GLIBC_2_0)
+
+ /* * * * * * * * * * * * * * XDR RPC MESSAGE * * * * * * * * * * * * * * * */
+
+@@ -95,7 +95,7 @@ xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar)
+ }
+ return TRUE; /* TRUE => open ended set of problems */
+ }
+-libc_hidden_nolink (xdr_accepted_reply, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_accepted_reply, GLIBC_2_0)
+
+ /*
+ * XDR the MSG_DENIED part of a reply message union
+@@ -118,7 +118,7 @@ xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr)
+ }
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_rejected_reply, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_rejected_reply, GLIBC_2_0)
+
+ static const struct xdr_discrim reply_dscrm[3] =
+ {
+@@ -142,7 +142,7 @@ xdr_replymsg (xdrs, rmsg)
+ NULL_xdrproc_t);
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_replymsg, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_replymsg, GLIBC_2_0)
+
+
+ /*
+@@ -167,7 +167,7 @@ xdr_callhdr (xdrs, cmsg)
+ return xdr_u_long (xdrs, &(cmsg->rm_call.cb_vers));
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_callhdr, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_callhdr, GLIBC_2_0)
+
+ /* ************************** Client utility routine ************* */
+
+@@ -277,4 +277,4 @@ _seterr_reply (struct rpc_msg *msg,
+ break;
+ }
+ }
+-libc_hidden_nolink (_seterr_reply, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (_seterr_reply, GLIBC_2_0)
+diff --git a/sunrpc/rpc_thread.c b/sunrpc/rpc_thread.c
+index ac4c18fcee..94d9f1fd80 100644
+--- a/sunrpc/rpc_thread.c
++++ b/sunrpc/rpc_thread.c
+@@ -97,7 +97,7 @@ __rpc_thread_svc_fdset (void)
+ return &svc_fdset;
+ return &tvp->svc_fdset_s;
+ }
+-libc_hidden_nolink (__rpc_thread_svc_fdset, GLIBC_2_2_3)
++libc_hidden_nolink_sunrpc (__rpc_thread_svc_fdset, GLIBC_2_2_3)
+
+ struct rpc_createerr *
+ __rpc_thread_createerr (void)
+@@ -109,7 +109,7 @@ __rpc_thread_createerr (void)
+ return &rpc_createerr;
+ return &tvp->rpc_createerr_s;
+ }
+-libc_hidden_nolink (__rpc_thread_createerr, GLIBC_2_2_3)
++libc_hidden_nolink_sunrpc (__rpc_thread_createerr, GLIBC_2_2_3)
+
+ struct pollfd **
+ __rpc_thread_svc_pollfd (void)
+@@ -124,7 +124,7 @@ __rpc_thread_svc_pollfd (void)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (__rpc_thread_svc_pollfd)
+ #else
+-libc_hidden_nolink (__rpc_thread_svc_pollfd, GLIBC_2_2_3)
++libc_hidden_nolink_sunrpc (__rpc_thread_svc_pollfd, GLIBC_2_2_3)
+ #endif
+
+ int *
+@@ -140,7 +140,7 @@ __rpc_thread_svc_max_pollfd (void)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (__rpc_thread_svc_max_pollfd)
+ #else
+-libc_hidden_nolink (__rpc_thread_svc_max_pollfd, GLIBC_2_2_3)
++libc_hidden_nolink_sunrpc (__rpc_thread_svc_max_pollfd, GLIBC_2_2_3)
+ #endif
+
+ #endif /* _RPC_THREAD_SAFE_ */
+diff --git a/sunrpc/rtime.c b/sunrpc/rtime.c
+index 8506df554c..bcb280b48f 100644
+--- a/sunrpc/rtime.c
++++ b/sunrpc/rtime.c
+@@ -140,4 +140,4 @@ rtime (struct sockaddr_in *addrp, struct rpc_timeval *timep,
+ timep->tv_usec = 0;
+ return 0;
+ }
+-libc_hidden_nolink (rtime, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (rtime, GLIBC_2_1)
+diff --git a/sunrpc/svc.c b/sunrpc/svc.c
+index e1f4a322e8..103770a42c 100644
+--- a/sunrpc/svc.c
++++ b/sunrpc/svc.c
+@@ -115,7 +115,7 @@ xprt_register (SVCXPRT *xprt)
+ POLLRDNORM | POLLRDBAND);
+ }
+ }
+-libc_hidden_nolink (xprt_register, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xprt_register, GLIBC_2_0)
+
+ /* De-activate a transport handle. */
+ void
+@@ -139,7 +139,7 @@ xprt_unregister (SVCXPRT *xprt)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xprt_unregister)
+ #else
+-libc_hidden_nolink (xprt_unregister, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xprt_unregister, GLIBC_2_0)
+ #endif
+
+
+@@ -218,7 +218,7 @@ pmap_it:
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svc_register)
+ #else
+-libc_hidden_nolink (svc_register, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svc_register, GLIBC_2_0)
+ #endif
+
+ /* Remove a service program from the callout list. */
+@@ -242,7 +242,7 @@ svc_unregister (rpcprog_t prog, rpcvers_t vers)
+ if (! svc_is_mapped (prog, vers))
+ pmap_unset (prog, vers);
+ }
+-libc_hidden_nolink (svc_unregister, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svc_unregister, GLIBC_2_0)
+
+ /* ******************* REPLY GENERATION ROUTINES ************ */
+
+@@ -264,7 +264,7 @@ svc_sendreply (register SVCXPRT *xprt, xdrproc_t xdr_results,
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svc_sendreply)
+ #else
+-libc_hidden_nolink (svc_sendreply, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svc_sendreply, GLIBC_2_0)
+ #endif
+
+ /* No procedure error reply */
+@@ -282,7 +282,7 @@ svcerr_noproc (register SVCXPRT *xprt)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svcerr_noproc)
+ #else
+-libc_hidden_nolink (svcerr_noproc, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcerr_noproc, GLIBC_2_0)
+ #endif
+
+ /* Can't decode args error reply */
+@@ -300,7 +300,7 @@ svcerr_decode (register SVCXPRT *xprt)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svcerr_decode)
+ #else
+-libc_hidden_nolink (svcerr_decode, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcerr_decode, GLIBC_2_0)
+ #endif
+
+ /* Some system error */
+@@ -318,7 +318,7 @@ svcerr_systemerr (register SVCXPRT *xprt)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svcerr_systemerr)
+ #else
+-libc_hidden_nolink (svcerr_systemerr, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcerr_systemerr, GLIBC_2_0)
+ #endif
+
+ /* Authentication error reply */
+@@ -333,7 +333,7 @@ svcerr_auth (SVCXPRT *xprt, enum auth_stat why)
+ rply.rjcted_rply.rj_why = why;
+ SVC_REPLY (xprt, &rply);
+ }
+-libc_hidden_nolink (svcerr_auth, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcerr_auth, GLIBC_2_0)
+
+ /* Auth too weak error reply */
+ void
+@@ -341,7 +341,7 @@ svcerr_weakauth (SVCXPRT *xprt)
+ {
+ svcerr_auth (xprt, AUTH_TOOWEAK);
+ }
+-libc_hidden_nolink (svcerr_weakauth, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcerr_weakauth, GLIBC_2_0)
+
+ /* Program unavailable error reply */
+ void
+@@ -355,7 +355,7 @@ svcerr_noprog (register SVCXPRT *xprt)
+ rply.acpted_rply.ar_stat = PROG_UNAVAIL;
+ SVC_REPLY (xprt, &rply);
+ }
+-libc_hidden_nolink (svcerr_noprog, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcerr_noprog, GLIBC_2_0)
+
+ /* Program version mismatch error reply */
+ void
+@@ -372,7 +372,7 @@ svcerr_progvers (register SVCXPRT *xprt, rpcvers_t low_vers,
+ rply.acpted_rply.ar_vers.high = high_vers;
+ SVC_REPLY (xprt, &rply);
+ }
+-libc_hidden_nolink (svcerr_progvers, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcerr_progvers, GLIBC_2_0)
+
+ /* ******************* SERVER INPUT STUFF ******************* */
+
+@@ -401,7 +401,7 @@ svc_getreq (int rdfds)
+ readfds.fds_bits[0] = rdfds;
+ svc_getreqset (&readfds);
+ }
+-libc_hidden_nolink (svc_getreq, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svc_getreq, GLIBC_2_0)
+
+ void
+ svc_getreqset (fd_set *readfds)
+@@ -420,7 +420,7 @@ svc_getreqset (fd_set *readfds)
+ for (mask = *maskp++; (bit = ffsl (mask)); mask ^= (1L << (bit - 1)))
+ svc_getreq_common (sock + bit - 1);
+ }
+-libc_hidden_nolink (svc_getreqset, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svc_getreqset, GLIBC_2_0)
+
+ void
+ svc_getreq_poll (struct pollfd *pfdp, int pollretval)
+@@ -449,7 +449,7 @@ svc_getreq_poll (struct pollfd *pfdp, int pollretval)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svc_getreq_poll)
+ #else
+-libc_hidden_nolink (svc_getreq_poll, GLIBC_2_2)
++libc_hidden_nolink_sunrpc (svc_getreq_poll, GLIBC_2_2)
+ #endif
+
+
+@@ -542,7 +542,7 @@ svc_getreq_common (const int fd)
+ }
+ while (stat == XPRT_MOREREQS);
+ }
+-libc_hidden_nolink (svc_getreq_common, GLIBC_2_2)
++libc_hidden_nolink_sunrpc (svc_getreq_common, GLIBC_2_2)
+
+ #ifdef _RPC_THREAD_SAFE_
+
+diff --git a/sunrpc/svc_auth.c b/sunrpc/svc_auth.c
+index facbb13982..f33bda2f20 100644
+--- a/sunrpc/svc_auth.c
++++ b/sunrpc/svc_auth.c
+@@ -105,7 +105,7 @@ _authenticate (register struct svc_req *rqst, struct rpc_msg *msg)
+
+ return AUTH_REJECTEDCRED;
+ }
+-libc_hidden_nolink (_authenticate, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (_authenticate, GLIBC_2_1)
+
+ static enum auth_stat
+ _svcauth_null (struct svc_req *rqst, struct rpc_msg *msg)
+diff --git a/sunrpc/svc_raw.c b/sunrpc/svc_raw.c
+index 90f5d96e63..7d885574af 100644
+--- a/sunrpc/svc_raw.c
++++ b/sunrpc/svc_raw.c
+@@ -88,7 +88,7 @@ svcraw_create (void)
+ xdrmem_create (&srp->xdr_stream, srp->_raw_buf, UDPMSGSIZE, XDR_FREE);
+ return &srp->server;
+ }
+-libc_hidden_nolink (svcraw_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcraw_create, GLIBC_2_0)
+
+ static enum xprt_stat
+ svcraw_stat (SVCXPRT *xprt)
+diff --git a/sunrpc/svc_run.c b/sunrpc/svc_run.c
+index 09f40dd188..90dfc94056 100644
+--- a/sunrpc/svc_run.c
++++ b/sunrpc/svc_run.c
+@@ -46,7 +46,7 @@ svc_exit (void)
+ svc_pollfd = NULL;
+ svc_max_pollfd = 0;
+ }
+-libc_hidden_nolink (svc_exit, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svc_exit, GLIBC_2_0)
+
+ void
+ svc_run (void)
+@@ -104,5 +104,5 @@ svc_run (void)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svc_run)
+ #else
+-libc_hidden_nolink (svc_run, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svc_run, GLIBC_2_0)
+ #endif
+diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c
+index e0515322a5..eb615494d8 100644
+--- a/sunrpc/svc_tcp.c
++++ b/sunrpc/svc_tcp.c
+@@ -187,7 +187,7 @@ svctcp_create (int sock, u_int sendsize, u_int recvsize)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svctcp_create)
+ #else
+-libc_hidden_nolink (svctcp_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svctcp_create, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -199,7 +199,7 @@ svcfd_create (int fd, u_int sendsize, u_int recvsize)
+ {
+ return makefd_xprt (fd, sendsize, recvsize);
+ }
+-libc_hidden_nolink (svcfd_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcfd_create, GLIBC_2_0)
+
+ static SVCXPRT *
+ internal_function
+diff --git a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c
+index 04c8407e64..6c4d75a814 100644
+--- a/sunrpc/svc_udp.c
++++ b/sunrpc/svc_udp.c
+@@ -184,7 +184,7 @@ svcudp_create: xp_pad is too small for IP_PKTINFO\n"));
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svcudp_bufcreate)
+ #else
+-libc_hidden_nolink (svcudp_bufcreate, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcudp_bufcreate, GLIBC_2_0)
+ #endif
+
+ SVCXPRT *
+@@ -196,7 +196,7 @@ svcudp_create (sock)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svcudp_create)
+ #else
+-libc_hidden_nolink (svcudp_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcudp_create, GLIBC_2_0)
+ #endif
+
+ static enum xprt_stat
+@@ -500,7 +500,7 @@ svcudp_enablecache (SVCXPRT *transp, u_long size)
+ su->su_cache = (char *) uc;
+ return 1;
+ }
+-libc_hidden_nolink (svcudp_enablecache, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcudp_enablecache, GLIBC_2_0)
+
+
+ /*
+diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
+index 2b02682e72..94507b2403 100644
+--- a/sunrpc/svc_unix.c
++++ b/sunrpc/svc_unix.c
+@@ -184,7 +184,7 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path)
+ xprt_register (xprt);
+ return xprt;
+ }
+-libc_hidden_nolink (svcunix_create, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (svcunix_create, GLIBC_2_1)
+
+ /*
+ * Like svunix_create(), except the routine takes any *open* UNIX file
+@@ -195,7 +195,7 @@ svcunixfd_create (int fd, u_int sendsize, u_int recvsize)
+ {
+ return makefd_xprt (fd, sendsize, recvsize);
+ }
+-libc_hidden_nolink (svcunixfd_create, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (svcunixfd_create, GLIBC_2_1)
+
+ static SVCXPRT *
+ internal_function
+diff --git a/sunrpc/svcauth_des.c b/sunrpc/svcauth_des.c
+index b9656e25da..9609734960 100644
+--- a/sunrpc/svcauth_des.c
++++ b/sunrpc/svcauth_des.c
+@@ -583,7 +583,7 @@ authdes_getucred (const struct authdes_cred *adc, uid_t * uid, gid_t * gid,
+ groups[i] = cred->groups[i];
+ return 1;
+ }
+-libc_hidden_nolink (authdes_getucred, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (authdes_getucred, GLIBC_2_1)
+
+ static void
+ internal_function
+diff --git a/sunrpc/xcrypt.c b/sunrpc/xcrypt.c
+index 8b7642b503..2e53f2d9e9 100644
+--- a/sunrpc/xcrypt.c
++++ b/sunrpc/xcrypt.c
+@@ -127,7 +127,7 @@ xencrypt (char *secret, char *passwd)
+ free (buf);
+ return 1;
+ }
+-libc_hidden_nolink (xencrypt, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xencrypt, GLIBC_2_0)
+
+ /*
+ * Decrypt secret key using passwd
+@@ -163,7 +163,7 @@ xdecrypt (char *secret, char *passwd)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdecrypt)
+ #else
+-libc_hidden_nolink (xdecrypt, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdecrypt, GLIBC_2_1)
+ #endif
+
+ /*
+diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c
+index 4dd82ff044..7eac2d40f0 100644
+--- a/sunrpc/xdr.c
++++ b/sunrpc/xdr.c
+@@ -72,7 +72,7 @@ xdr_free (xdrproc_t proc, char *objp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_free)
+ #else
+-libc_hidden_nolink (xdr_free, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_free, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -86,7 +86,7 @@ xdr_void (void)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_void)
+ #else
+-libc_hidden_nolink (xdr_void, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_void, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -126,7 +126,7 @@ xdr_int (XDR *xdrs, int *ip)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_int)
+ #else
+-libc_hidden_nolink (xdr_int, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_int, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -165,7 +165,7 @@ xdr_u_int (XDR *xdrs, u_int *up)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_u_int)
+ #else
+-libc_hidden_nolink (xdr_u_int, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_u_int, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -193,7 +193,7 @@ xdr_long (XDR *xdrs, long *lp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_long)
+ #else
+-libc_hidden_nolink (xdr_long, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_long, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -232,7 +232,7 @@ xdr_u_long (XDR *xdrs, u_long *ulp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_u_long)
+ #else
+-libc_hidden_nolink (xdr_u_long, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_u_long, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -268,7 +268,7 @@ xdr_hyper (XDR *xdrs, quad_t *llp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_hyper)
+ #else
+-libc_hidden_nolink (xdr_hyper, GLIBC_2_1_1)
++libc_hidden_nolink_sunrpc (xdr_hyper, GLIBC_2_1_1)
+ #endif
+
+ /*
+@@ -304,7 +304,7 @@ xdr_u_hyper (XDR *xdrs, u_quad_t *ullp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_u_hyper)
+ #else
+-libc_hidden_nolink (xdr_u_hyper, GLIBC_2_1_1)
++libc_hidden_nolink_sunrpc (xdr_u_hyper, GLIBC_2_1_1)
+ #endif
+
+ bool_t
+@@ -315,7 +315,7 @@ xdr_longlong_t (XDR *xdrs, quad_t *llp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_longlong_t)
+ #else
+-libc_hidden_nolink (xdr_longlong_t, GLIBC_2_1_1)
++libc_hidden_nolink_sunrpc (xdr_longlong_t, GLIBC_2_1_1)
+ #endif
+
+ bool_t
+@@ -326,7 +326,7 @@ xdr_u_longlong_t (XDR *xdrs, u_quad_t *ullp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_u_longlong_t)
+ #else
+-libc_hidden_nolink (xdr_u_longlong_t, GLIBC_2_1_1)
++libc_hidden_nolink_sunrpc (xdr_u_longlong_t, GLIBC_2_1_1)
+ #endif
+
+ /*
+@@ -359,7 +359,7 @@ xdr_short (XDR *xdrs, short *sp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_short)
+ #else
+-libc_hidden_nolink (xdr_short, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_short, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -392,7 +392,7 @@ xdr_u_short (XDR *xdrs, u_short *usp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_u_short)
+ #else
+-libc_hidden_nolink (xdr_u_short, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_u_short, GLIBC_2_0)
+ #endif
+
+
+@@ -415,7 +415,7 @@ xdr_char (XDR *xdrs, char *cp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_char)
+ #else
+-libc_hidden_nolink (xdr_char, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_char, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -437,7 +437,7 @@ xdr_u_char (XDR *xdrs, u_char *cp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_u_char)
+ #else
+-libc_hidden_nolink (xdr_u_char, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_u_char, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -470,7 +470,7 @@ xdr_bool (XDR *xdrs, bool_t *bp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_bool)
+ #else
+-libc_hidden_nolink (xdr_bool, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_bool, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -525,7 +525,7 @@ xdr_enum (XDR *xdrs, enum_t *ep)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_enum)
+ #else
+-libc_hidden_nolink (xdr_enum, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_enum, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -580,7 +580,7 @@ xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_opaque)
+ #else
+-libc_hidden_nolink (xdr_opaque, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_opaque, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -648,7 +648,7 @@ xdr_bytes (xdrs, cpp, sizep, maxsize)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_bytes)
+ #else
+-libc_hidden_nolink (xdr_bytes, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_bytes, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -665,7 +665,7 @@ xdr_netobj (xdrs, np)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_netobj)
+ #else
+-libc_hidden_nolink (xdr_netobj, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_netobj, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -714,7 +714,7 @@ xdr_union (xdrs, dscmp, unp, choices, dfault)
+ return ((dfault == NULL_xdrproc_t) ? FALSE :
+ (*dfault) (xdrs, unp, LASTUNSIGNED));
+ }
+-libc_hidden_nolink (xdr_union, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_union, GLIBC_2_0)
+
+
+ /*
+@@ -806,7 +806,7 @@ xdr_string (xdrs, cpp, maxsize)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_string)
+ #else
+-libc_hidden_nolink (xdr_string, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_string, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -827,5 +827,5 @@ xdr_wrapstring (xdrs, cpp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_wrapstring)
+ #else
+-libc_hidden_nolink (xdr_wrapstring, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_wrapstring, GLIBC_2_0)
+ #endif
+diff --git a/sunrpc/xdr_array.c b/sunrpc/xdr_array.c
+index b832078342..a634861278 100644
+--- a/sunrpc/xdr_array.c
++++ b/sunrpc/xdr_array.c
+@@ -127,7 +127,7 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_array)
+ #else
+-libc_hidden_nolink (xdr_array, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_array, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -162,4 +162,4 @@ xdr_vector (xdrs, basep, nelem, elemsize, xdr_elem)
+ }
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_vector, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_vector, GLIBC_2_0)
+diff --git a/sunrpc/xdr_float.c b/sunrpc/xdr_float.c
+index 1a9c260617..78e8f3bd2d 100644
+--- a/sunrpc/xdr_float.c
++++ b/sunrpc/xdr_float.c
+@@ -158,7 +158,7 @@ xdr_float(xdrs, fp)
+ }
+ return (FALSE);
+ }
+-libc_hidden_nolink (xdr_float, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_float, GLIBC_2_0)
+
+ /*
+ * This routine works on Suns (Sky / 68000's) and Vaxen.
+@@ -300,4 +300,4 @@ xdr_double(xdrs, dp)
+ }
+ return (FALSE);
+ }
+-libc_hidden_nolink (xdr_double, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_double, GLIBC_2_0)
+diff --git a/sunrpc/xdr_intXX_t.c b/sunrpc/xdr_intXX_t.c
+index fe06f45df3..02a0c09b5b 100644
+--- a/sunrpc/xdr_intXX_t.c
++++ b/sunrpc/xdr_intXX_t.c
+@@ -46,14 +46,14 @@ xdr_int64_t (XDR *xdrs, int64_t *ip)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_int64_t, GLIBC_2_1_1)
++libc_hidden_nolink_sunrpc (xdr_int64_t, GLIBC_2_1_1)
+
+ bool_t
+ xdr_quad_t (XDR *xdrs, quad_t *ip)
+ {
+ return xdr_int64_t (xdrs, (int64_t *) ip);
+ }
+-libc_hidden_nolink (xdr_quad_t, GLIBC_2_3_4)
++libc_hidden_nolink_sunrpc (xdr_quad_t, GLIBC_2_3_4)
+
+ /* XDR 64bit unsigned integers */
+ bool_t
+@@ -82,14 +82,14 @@ xdr_uint64_t (XDR *xdrs, uint64_t *uip)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_uint64_t, GLIBC_2_1_1)
++libc_hidden_nolink_sunrpc (xdr_uint64_t, GLIBC_2_1_1)
+
+ bool_t
+ xdr_u_quad_t (XDR *xdrs, u_quad_t *ip)
+ {
+ return xdr_uint64_t (xdrs, (uint64_t *) ip);
+ }
+-libc_hidden_nolink (xdr_u_quad_t, GLIBC_2_3_4)
++libc_hidden_nolink_sunrpc (xdr_u_quad_t, GLIBC_2_3_4)
+
+ /* XDR 32bit integers */
+ bool_t
+@@ -107,7 +107,7 @@ xdr_int32_t (XDR *xdrs, int32_t *lp)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_int32_t, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_int32_t, GLIBC_2_1)
+
+ /* XDR 32bit unsigned integers */
+ bool_t
+@@ -128,7 +128,7 @@ xdr_uint32_t (XDR *xdrs, uint32_t *ulp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_uint32_t)
+ #else
+-libc_hidden_nolink (xdr_uint32_t, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_uint32_t, GLIBC_2_1)
+ #endif
+
+ /* XDR 16bit integers */
+@@ -153,7 +153,7 @@ xdr_int16_t (XDR *xdrs, int16_t *ip)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_int16_t, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_int16_t, GLIBC_2_1)
+
+ /* XDR 16bit unsigned integers */
+ bool_t
+@@ -177,7 +177,7 @@ xdr_uint16_t (XDR *xdrs, uint16_t *uip)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_uint16_t, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_uint16_t, GLIBC_2_1)
+
+ /* XDR 8bit integers */
+ bool_t
+@@ -201,7 +201,7 @@ xdr_int8_t (XDR *xdrs, int8_t *ip)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_int8_t, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_int8_t, GLIBC_2_1)
+
+ /* XDR 8bit unsigned integers */
+ bool_t
+@@ -225,4 +225,4 @@ xdr_uint8_t (XDR *xdrs, uint8_t *uip)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_uint8_t, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_uint8_t, GLIBC_2_1)
+diff --git a/sunrpc/xdr_mem.c b/sunrpc/xdr_mem.c
+index 093a718739..ba7661aa54 100644
+--- a/sunrpc/xdr_mem.c
++++ b/sunrpc/xdr_mem.c
+@@ -81,7 +81,7 @@ xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdrmem_create)
+ #else
+-libc_hidden_nolink (xdrmem_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdrmem_create, GLIBC_2_0)
+ #endif
+
+ /*
+diff --git a/sunrpc/xdr_rec.c b/sunrpc/xdr_rec.c
+index 556c6c4bc0..f5d6ef2af9 100644
+--- a/sunrpc/xdr_rec.c
++++ b/sunrpc/xdr_rec.c
+@@ -189,7 +189,7 @@ xdrrec_create (XDR *xdrs, u_int sendsize,
+ rstrm->fbtbc = 0;
+ rstrm->last_frag = TRUE;
+ }
+-libc_hidden_nolink (xdrrec_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdrrec_create, GLIBC_2_0)
+
+
+ /*
+@@ -477,7 +477,7 @@ xdrrec_skiprecord (XDR *xdrs)
+ rstrm->last_frag = FALSE;
+ return TRUE;
+ }
+-libc_hidden_nolink (xdrrec_skiprecord, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdrrec_skiprecord, GLIBC_2_0)
+
+ /*
+ * Lookahead function.
+@@ -501,7 +501,7 @@ xdrrec_eof (XDR *xdrs)
+ return TRUE;
+ return FALSE;
+ }
+-libc_hidden_nolink (xdrrec_eof, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdrrec_eof, GLIBC_2_0)
+
+ /*
+ * The client must tell the package when an end-of-record has occurred.
+@@ -528,7 +528,7 @@ xdrrec_endofrecord (XDR *xdrs, bool_t sendnow)
+ rstrm->out_finger += BYTES_PER_XDR_UNIT;
+ return TRUE;
+ }
+-libc_hidden_nolink (xdrrec_endofrecord, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdrrec_endofrecord, GLIBC_2_0)
+
+
+ /*
+diff --git a/sunrpc/xdr_ref.c b/sunrpc/xdr_ref.c
+index 7510bed873..8fb4584a75 100644
+--- a/sunrpc/xdr_ref.c
++++ b/sunrpc/xdr_ref.c
+@@ -90,7 +90,7 @@ xdr_reference (xdrs, pp, size, proc)
+ }
+ return stat;
+ }
+-libc_hidden_nolink (xdr_reference, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_reference, GLIBC_2_0)
+
+
+ /*
+@@ -137,5 +137,5 @@ xdr_pointer (xdrs, objpp, obj_size, xdr_obj)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_pointer)
+ #else
+-libc_hidden_nolink (xdr_pointer, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_pointer, GLIBC_2_0)
+ #endif
+diff --git a/sunrpc/xdr_sizeof.c b/sunrpc/xdr_sizeof.c
+index 0119486c3d..56e870a455 100644
+--- a/sunrpc/xdr_sizeof.c
++++ b/sunrpc/xdr_sizeof.c
+@@ -161,5 +161,5 @@ xdr_sizeof (xdrproc_t func, void *data)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_sizeof)
+ #else
+-libc_hidden_nolink (xdr_sizeof, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_sizeof, GLIBC_2_1)
+ #endif
+diff --git a/sunrpc/xdr_stdio.c b/sunrpc/xdr_stdio.c
+index d9866063f9..667515e0a6 100644
+--- a/sunrpc/xdr_stdio.c
++++ b/sunrpc/xdr_stdio.c
+@@ -191,5 +191,5 @@ xdrstdio_putint32 (XDR *xdrs, const int32_t *ip)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdrstdio_create)
+ #else
+-libc_hidden_nolink (xdrstdio_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdrstdio_create, GLIBC_2_0)
+ #endif
diff --git a/packages/glibc/2.14.1/998-obstack-common.patch b/packages/glibc/2.14.1/998-obstack-common.patch
new file mode 100644
index 0000000..4b95f06
--- /dev/null
+++ b/packages/glibc/2.14.1/998-obstack-common.patch
@@ -0,0 +1,30 @@
+commit 39b1f6172a2f9ddc74a8f82d6e84dd13b22dbaf2
+Author: Peter Collingbourne <pcc@google.com>
+Date: Wed May 15 20:28:08 2013 +0200
+
+ Move _obstack_compat out of common
+
+ it is impossible to create an alias of a common symbol (as
+ compat_symbol does), because common symbols do not have a section or
+ an offset until linked. GNU as tolerates aliases of common symbols by
+ simply creating another common symbol, but other assemblers (notably
+ LLVM's integrated assembler) are less tolerant.
+
+ 2013-05-15 Peter Collingbourne <pcc@google.com>
+
+ * malloc/obstack.c (_obstack_compat): Add initializer.
+ -
+
+diff --git a/malloc/obstack.c b/malloc/obstack.c
+index 25a90514f7..c3c7db4a96 100644
+--- a/malloc/obstack.c
++++ b/malloc/obstack.c
+@@ -115,7 +115,7 @@ int obstack_exit_failure = EXIT_FAILURE;
+ /* A looong time ago (before 1994, anyway; we're not sure) this global variable
+ was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
+ library still exports it because somebody might use it. */
+-struct obstack *_obstack_compat;
++struct obstack *_obstack_compat = 0;
+ compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
+ # endif
+ # endif
diff --git a/packages/glibc/2.14/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch b/packages/glibc/2.14/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
deleted file mode 100644
index 6fd663a..0000000
--- a/packages/glibc/2.14/101-Suppress-GCC-6-warning-about-ambiguous-else-with-Wpa.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c Mon Sep 17 00:00:00 2001
-From: Yvan Roux <yvan.roux@linaro.org>
-Date: Fri, 15 Apr 2016 13:29:26 +0200
-Subject: [PATCH] Suppress GCC 6 warning about ambiguous 'else' with
- -Wparentheses
-
----
- ChangeLog | 5 +++++
- nis/nis_call.c | 20 +++++++++++---------
- stdlib/setenv.c | 26 ++++++++++++++------------
- 3 files changed, 30 insertions(+), 21 deletions(-)
-
-diff --git a/nis/nis_call.c b/nis/nis_call.c
-index 3fa37e4..cb7839a 100644
---- a/nis/nis_call.c
-+++ b/nis/nis_call.c
-@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent,
- /* Choose which entry should be evicted from the cache. */
- loc = &nis_server_cache[0];
- if (*loc != NULL)
-- for (i = 1; i < 16; ++i)
-- if (nis_server_cache[i] == NULL)
-- {
-+ {
-+ for (i = 1; i < 16; ++i)
-+ if (nis_server_cache[i] == NULL)
-+ {
-+ loc = &nis_server_cache[i];
-+ break;
-+ }
-+ else if ((*loc)->uses > nis_server_cache[i]->uses
-+ || ((*loc)->uses == nis_server_cache[i]->uses
-+ && (*loc)->expires > nis_server_cache[i]->expires))
- loc = &nis_server_cache[i];
-- break;
-- }
-- else if ((*loc)->uses > nis_server_cache[i]->uses
-- || ((*loc)->uses == nis_server_cache[i]->uses
-- && (*loc)->expires > nis_server_cache[i]->expires))
-- loc = &nis_server_cache[i];
-+ }
- old = *loc;
- *loc = new;
-
-diff --git a/stdlib/setenv.c b/stdlib/setenv.c
-index da61ee0..e66045f 100644
---- a/stdlib/setenv.c
-+++ b/stdlib/setenv.c
-@@ -278,18 +278,20 @@ unsetenv (const char *name)
- ep = __environ;
- if (ep != NULL)
- while (*ep != NULL)
-- if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
-- {
-- /* Found it. Remove this pointer by moving later ones back. */
-- char **dp = ep;
--
-- do
-- dp[0] = dp[1];
-- while (*dp++);
-- /* Continue the loop in case NAME appears again. */
-- }
-- else
-- ++ep;
-+ {
-+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
-+ {
-+ /* Found it. Remove this pointer by moving later ones back. */
-+ char **dp = ep;
-+
-+ do
-+ dp[0] = dp[1];
-+ while (*dp++);
-+ /* Continue the loop in case NAME appears again. */
-+ }
-+ else
-+ ++ep;
-+ }
-
- UNLOCK;
-
---
-2.7.4
-
diff --git a/packages/glibc/2.14/102-fix-signed-shift-overlow.patch b/packages/glibc/2.14/102-fix-signed-shift-overlow.patch
deleted file mode 100644
index ef49f83..0000000
--- a/packages/glibc/2.14/102-fix-signed-shift-overlow.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-commit 5542236837c5c41435f8282ec92799f480c36f18
-Author: Paul Eggert <eggert@cs.ucla.edu>
-Date: Tue Jul 21 22:50:29 2015 -0700
-
- Port the 0x7efe...feff pattern to GCC 6.
-
- See Steve Ellcey's bug report in:
- https://sourceware.org/ml/libc-alpha/2015-07/msg00673.html
- * string/memrchr.c (MEMRCHR):
- * string/rawmemchr.c (RAWMEMCHR):
- * string/strchr.c (strchr):
- * string/strchrnul.c (STRCHRNUL):
- Rewrite code to avoid issues with signed shift overflow.
-
-diff --git a/string/memrchr.c b/string/memrchr.c
-index 0c8fd84..86cd5b9 100644
---- a/string/memrchr.c
-+++ b/string/memrchr.c
-@@ -96,15 +96,8 @@ MEMRCHR
-
- The 1-bits make sure that carries propagate to the next 0-bit.
- The 0-bits provide holes for carries to fall into. */
--
-- if (sizeof (longword) != 4 && sizeof (longword) != 8)
-- abort ();
--
--#if LONG_MAX <= LONG_MAX_32_BITS
-- magic_bits = 0x7efefeff;
--#else
-- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff;
--#endif
-+ magic_bits = -1;
-+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1;
-
- /* Set up a longword, each of whose bytes is C. */
- charmask = c | (c << 8);
-diff --git a/string/rawmemchr.c b/string/rawmemchr.c
-index 05b22be..228ca9d 100644
---- a/string/rawmemchr.c
-+++ b/string/rawmemchr.c
-@@ -86,15 +86,8 @@ RAWMEMCHR (s, c_in)
-
- The 1-bits make sure that carries propagate to the next 0-bit.
- The 0-bits provide holes for carries to fall into. */
--
-- if (sizeof (longword) != 4 && sizeof (longword) != 8)
-- abort ();
--
--#if LONG_MAX <= LONG_MAX_32_BITS
-- magic_bits = 0x7efefeff;
--#else
-- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff;
--#endif
-+ magic_bits = -1;
-+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1;
-
- /* Set up a longword, each of whose bytes is C. */
- charmask = c | (c << 8);
-diff --git a/string/strchr.c b/string/strchr.c
-index 5f90075..f13b2b3 100644
---- a/string/strchr.c
-+++ b/string/strchr.c
-@@ -60,13 +60,8 @@ strchr (const char *s, int c_in)
-
- The 1-bits make sure that carries propagate to the next 0-bit.
- The 0-bits provide holes for carries to fall into. */
-- switch (sizeof (longword))
-- {
-- case 4: magic_bits = 0x7efefeffL; break;
-- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break;
-- default:
-- abort ();
-- }
-+ magic_bits = -1;
-+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1;
-
- /* Set up a longword, each of whose bytes is C. */
- charmask = c | (c << 8);
-diff --git a/string/strchrnul.c b/string/strchrnul.c
-index 2678f1d..daf0b3f 100644
---- a/string/strchrnul.c
-+++ b/string/strchrnul.c
-@@ -66,13 +66,8 @@ STRCHRNUL (s, c_in)
-
- The 1-bits make sure that carries propagate to the next 0-bit.
- The 0-bits provide holes for carries to fall into. */
-- switch (sizeof (longword))
-- {
-- case 4: magic_bits = 0x7efefeffL; break;
-- case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break;
-- default:
-- abort ();
-- }
-+ magic_bits = -1;
-+ magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1;
-
- /* Set up a longword, each of whose bytes is C. */
- charmask = c | (c << 8);
diff --git a/packages/glibc/2.14/103-dl-openat64-variadic.patch b/packages/glibc/2.14/103-dl-openat64-variadic.patch
deleted file mode 100644
index fe94b96..0000000
--- a/packages/glibc/2.14/103-dl-openat64-variadic.patch
+++ /dev/null
@@ -1,195 +0,0 @@
-commit 9dd346ff431fc761f1b748bd4da8bb59f7652094
-Author: Joseph Myers <joseph@codesourcery.com>
-Date: Tue Oct 20 11:54:09 2015 +0000
-
- Convert 113 more function definitions to prototype style (files with assertions).
-
- This mostly automatically-generated patch converts 113 function
- definitions in glibc from old-style K&R to prototype-style. Following
- my other recent such patches, this one deals with the case of function
- definitions in files that either contain assertions or where grep
- suggested they might contain assertions - and thus where it isn't
- possible to use a simple object code comparison as a sanity check on
- the correctness of the patch, because line numbers are changed.
-
- A few such automatically-generated changes needed to be supplemented
- by manual changes for the result to compile. openat64 had a prototype
- declaration with "..." but an old-style definition in
- sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the
- generated prototype in the definition (I've filed
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68024> for diagnosing
- such cases in GCC; the old state was undefined behavior not requiring
- a diagnostic, but one seems a good idea). In addition, as Florian has
- noted regparm attribute mismatches between declaration and definition
- are only diagnosed for prototype definitions, and five functions
- needed internal_function added to their definitions (in the case of
- __pthread_mutex_cond_lock, via the macro definition of
- __pthread_mutex_lock) to compile on i386.
-
- After this patch is in, remaining old-style definitions are probably
- most readily fixed manually before we can turn on
- -Wold-style-definition for all builds.
-
- Tested for x86_64 and x86 (testsuite).
-
- * crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style
- function definition.
- * crypt/sha256-crypt.c (__sha256_crypt_r): Likewise.
- * crypt/sha512-crypt.c (__sha512_crypt_r): Likewise.
- * debug/backtracesyms.c (__backtrace_symbols): Likewise.
- * elf/dl-minimal.c (_itoa): Likewise.
- * hurd/hurdmalloc.c (malloc): Likewise.
- (free): Likewise.
- (realloc): Likewise.
- * inet/inet6_option.c (inet6_option_space): Likewise.
- (inet6_option_init): Likewise.
- (inet6_option_append): Likewise.
- (inet6_option_alloc): Likewise.
- (inet6_option_next): Likewise.
- (inet6_option_find): Likewise.
- * io/ftw.c (FTW_NAME): Likewise.
- (NFTW_NAME): Likewise.
- (NFTW_NEW_NAME): Likewise.
- (NFTW_OLD_NAME): Likewise.
- * libio/iofwide.c (_IO_fwide): Likewise.
- * libio/strops.c (_IO_str_init_static_internal): Likewise.
- (_IO_str_init_static): Likewise.
- (_IO_str_init_readonly): Likewise.
- (_IO_str_overflow): Likewise.
- (_IO_str_underflow): Likewise.
- (_IO_str_count): Likewise.
- (_IO_str_seekoff): Likewise.
- (_IO_str_pbackfail): Likewise.
- (_IO_str_finish): Likewise.
- * libio/wstrops.c (_IO_wstr_init_static): Likewise.
- (_IO_wstr_overflow): Likewise.
- (_IO_wstr_underflow): Likewise.
- (_IO_wstr_count): Likewise.
- (_IO_wstr_seekoff): Likewise.
- (_IO_wstr_pbackfail): Likewise.
- (_IO_wstr_finish): Likewise.
- * locale/programs/localedef.c (normalize_codeset): Likewise.
- * locale/programs/locarchive.c (add_locale_to_archive): Likewise.
- (add_locales_to_archive): Likewise.
- (delete_locales_from_archive): Likewise.
- * malloc/malloc.c (__libc_mallinfo): Likewise.
- * math/gen-auto-libm-tests.c (init_fp_formats): Likewise.
- * misc/tsearch.c (__tfind): Likewise.
- * nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise.
- * nptl/pthread_attr_getdetachstate.c
- (__pthread_attr_getdetachstate): Likewise.
- * nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize):
- Likewise.
- * nptl/pthread_attr_getinheritsched.c
- (__pthread_attr_getinheritsched): Likewise.
- * nptl/pthread_attr_getschedparam.c
- (__pthread_attr_getschedparam): Likewise.
- * nptl/pthread_attr_getschedpolicy.c
- (__pthread_attr_getschedpolicy): Likewise.
- * nptl/pthread_attr_getscope.c (__pthread_attr_getscope):
- Likewise.
- * nptl/pthread_attr_getstack.c (__pthread_attr_getstack):
- Likewise.
- * nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr):
- Likewise.
- * nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
- Likewise.
- * nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise.
- (__pthread_attr_init_2_0): Likewise.
- * nptl/pthread_attr_setdetachstate.c
- (__pthread_attr_setdetachstate): Likewise.
- * nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize):
- Likewise.
- * nptl/pthread_attr_setinheritsched.c
- (__pthread_attr_setinheritsched): Likewise.
- * nptl/pthread_attr_setschedparam.c
- (__pthread_attr_setschedparam): Likewise.
- * nptl/pthread_attr_setschedpolicy.c
- (__pthread_attr_setschedpolicy): Likewise.
- * nptl/pthread_attr_setscope.c (__pthread_attr_setscope):
- Likewise.
- * nptl/pthread_attr_setstack.c (__pthread_attr_setstack):
- Likewise.
- * nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr):
- Likewise.
- * nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
- Likewise.
- * nptl/pthread_condattr_setclock.c (pthread_condattr_setclock):
- Likewise.
- * nptl/pthread_create.c (__find_in_stack_list): Likewise.
- * nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise.
- * nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to
- use internal_function.
- * nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to
- prototype-style function definition.
- * nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise.
- (__pthread_mutex_cond_lock_adjust): Likewise. Use
- internal_function.
- * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock):
- Convert to prototype-style function definition.
- * nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock):
- Likewise.
- * nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
- Likewise.
- (__pthread_mutex_unlock): Likewise.
- * nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise.
- * nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise.
- * nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise.
- * nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise.
- * nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise.
- * nss/makedb.c (process_input): Likewise.
- * posix/fnmatch.c (__strchrnul): Likewise.
- (__wcschrnul): Likewise.
- (fnmatch): Likewise.
- * posix/fnmatch_loop.c (FCT): Likewise.
- * posix/glob.c (globfree): Likewise.
- (__glob_pattern_type): Likewise.
- (__glob_pattern_p): Likewise.
- * posix/regcomp.c (re_compile_pattern): Likewise.
- (re_set_syntax): Likewise.
- (re_compile_fastmap): Likewise.
- (regcomp): Likewise.
- (regerror): Likewise.
- (regfree): Likewise.
- * posix/regexec.c (regexec): Likewise.
- (re_match): Likewise.
- (re_search): Likewise.
- (re_match_2): Likewise.
- (re_search_2): Likewise.
- (re_search_stub): Likewise. Use internal_function
- (re_copy_regs): Likewise.
- (re_set_registers): Convert to prototype-style function
- definition.
- (prune_impossible_nodes): Likewise. Use internal_function.
- * resolv/inet_net_pton.c (inet_net_pton): Convert to
- prototype-style function definition.
- (inet_net_pton_ipv4): Likewise.
- * stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise.
- * sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise.
- * sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise.
- * sysdeps/pthread/timer_delete.c (timer_delete): Likewise.
- * sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise.
- Make variadic.
- * time/strptime_l.c (localtime_r): Convert to prototype-style
- function definition.
- * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise.
- * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise.
- * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise.
- * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise.
-
-diff --git a/sysdeps/unix/sysv/linux/dl-openat64.c b/sysdeps/unix/sysv/linux/dl-openat64.c
-index 7d100bb..7eea0ca 100644
---- a/sysdeps/unix/sysv/linux/dl-openat64.c
-+++ b/sysdeps/unix/sysv/linux/dl-openat64.c
-@@ -23,10 +23,7 @@
-
-
- int
--openat64 (dfd, file, oflag)
-- int dfd;
-- const char *file;
-- int oflag;
-+openat64 (int dfd, const char *file, int oflag, ...)
- {
- assert ((oflag & O_CREAT) == 0);
-
diff --git a/packages/glibc/2.14/104-unused-variables.patch b/packages/glibc/2.14/104-unused-variables.patch
deleted file mode 100644
index e063675..0000000
--- a/packages/glibc/2.14/104-unused-variables.patch
+++ /dev/null
@@ -1,165 +0,0 @@
-commit 6565fcb6e189d67b5a3f321453daebb805056d73
-Author: Wilco Dijkstra <wdijkstr@arm.com>
-Date: Fri Sep 18 20:27:20 2015 +0100
-
- Fix several build failures with GCC6 due to unused static variables.
-
- 2015-09-18 Wilco Dijkstra <wdijkstr@arm.com>
-
- * resolv/base64.c (rcsid): Remove unused static.
- * sysdeps/ieee754/dbl-64/atnat2.h (qpi1): Remove unused
- static. (tqpi1): Likewise.
- * sysdeps/ieee754/dbl-64/uexp.h (one): Likewise.
- * sysdeps/ieee754/dbl-64/upow.h (sqrt_2): Likewise.
- * sysdeps/ieee754/flt-32/e_log10f.c (one): Likewise.
- * sysdeps/ieee754/flt-32/s_cosf.c (one): Likewise.
- * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (zero): Likewise.
- * sysdeps/ieee754/ldbl-128/s_erfl.c (half): Likewise.
- * sysdeps/ieee754/ldbl-128/s_log1pl.c (maxlog): Likewise.
- * timezone/private.h (time_t_min): Likewise. (time_t_max):
- Likewise.
-
-diff --git a/resolv/base64.c b/resolv/base64.c
-index ea584ed..519e5d2 100644
---- a/resolv/base64.c
-+++ b/resolv/base64.c
-@@ -40,10 +40,6 @@
- * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
- */
-
--#if !defined(LINT) && !defined(CODECENTER)
--static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $";
--#endif /* not lint */
--
- #include <sys/types.h>
- #include <sys/param.h>
- #include <sys/socket.h>
-diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h
-index e0d65af..82943f9 100644
---- a/sysdeps/ieee754/dbl-64/atnat2.h
-+++ b/sysdeps/ieee754/dbl-64/atnat2.h
-@@ -65,10 +65,8 @@
- /**/ hpi1 = {{0x3c91a626, 0x33145c07} }, /* pi/2-hpi */
- /**/ mhpi = {{0xbff921fb, 0x54442d18} }, /* -pi/2 */
- /**/ qpi = {{0x3fe921fb, 0x54442d18} }, /* pi/4 */
--/**/ qpi1 = {{0x3c81a626, 0x33145c07} }, /* pi/4-qpi */
- /**/ mqpi = {{0xbfe921fb, 0x54442d18} }, /* -pi/4 */
- /**/ tqpi = {{0x4002d97c, 0x7f3321d2} }, /* 3pi/4 */
--/**/ tqpi1 = {{0x3c9a7939, 0x4c9e8a0a} }, /* 3pi/4-tqpi */
- /**/ mtqpi = {{0xc002d97c, 0x7f3321d2} }, /* -3pi/4 */
- /**/ u1 = {{0x3c314c2a, 0x00000000} }, /* 9.377e-19 */
- /**/ u2 = {{0x3bf955e4, 0x00000000} }, /* 8.584e-20 */
-@@ -129,10 +127,8 @@
- /**/ hpi1 = {{0x33145c07, 0x3c91a626} }, /* pi/2-hpi */
- /**/ mhpi = {{0x54442d18, 0xbff921fb} }, /* -pi/2 */
- /**/ qpi = {{0x54442d18, 0x3fe921fb} }, /* pi/4 */
--/**/ qpi1 = {{0x33145c07, 0x3c81a626} }, /* pi/4-qpi */
- /**/ mqpi = {{0x54442d18, 0xbfe921fb} }, /* -pi/4 */
- /**/ tqpi = {{0x7f3321d2, 0x4002d97c} }, /* 3pi/4 */
--/**/ tqpi1 = {{0x4c9e8a0a, 0x3c9a7939} }, /* 3pi/4-tqpi */
- /**/ mtqpi = {{0x7f3321d2, 0xc002d97c} }, /* -3pi/4 */
- /**/ u1 = {{0x00000000, 0x3c314c2a} }, /* 9.377e-19 */
- /**/ u2 = {{0x00000000, 0x3bf955e4} }, /* 8.584e-20 */
-diff --git a/sysdeps/ieee754/dbl-64/uexp.h b/sysdeps/ieee754/dbl-64/uexp.h
-index 6817eaf..42b21f2 100644
---- a/sysdeps/ieee754/dbl-64/uexp.h
-+++ b/sysdeps/ieee754/dbl-64/uexp.h
-@@ -29,7 +29,7 @@
-
- #include "mydefs.h"
-
--const static double one = 1.0, zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300,
-+const static double zero = 0.0, hhuge = 1.0e300, tiny = 1.0e-300,
- err_0 = 1.000014, err_1 = 0.000016;
- const static int4 bigint = 0x40862002,
- badint = 0x40876000,smallint = 0x3C8fffff;
-diff --git a/sysdeps/ieee754/dbl-64/upow.h b/sysdeps/ieee754/dbl-64/upow.h
-index c8569a9..b4911e5 100644
---- a/sysdeps/ieee754/dbl-64/upow.h
-+++ b/sysdeps/ieee754/dbl-64/upow.h
-@@ -34,7 +34,6 @@
- /**/ INF = {{0x7ff00000, 0x00000000}}, /* INF */
- /**/ nINF = {{0xfff00000, 0x00000000}}, /* -INF */
- /**/ NaNQ = {{0x7ff80000, 0x00000000}}, /* NaNQ */
--/**/ sqrt_2 = {{0x3ff6a09e, 0x667f3bcc}}, /* sqrt(2) */
- /**/ ln2a = {{0x3fe62e42, 0xfefa3800}}, /* ln(2) 43 bits */
- /**/ ln2b = {{0x3d2ef357, 0x93c76730}}, /* ln(2)-ln2a */
- /**/ bigu = {{0x4297ffff, 0xfffffd2c}}, /* 1.5*2**42 -724*2**-10 */
-@@ -48,7 +47,6 @@
- /**/ INF = {{0x00000000, 0x7ff00000}}, /* INF */
- /**/ nINF = {{0x00000000, 0xfff00000}}, /* -INF */
- /**/ NaNQ = {{0x00000000, 0x7ff80000}}, /* NaNQ */
--/**/ sqrt_2 = {{0x667f3bcc, 0x3ff6a09e}}, /* sqrt(2) */
- /**/ ln2a = {{0xfefa3800, 0x3fe62e42}}, /* ln(2) 43 bits */
- /**/ ln2b = {{0x93c76730, 0x3d2ef357}}, /* ln(2)-ln2a */
- /**/ bigu = {{0xfffffd2c, 0x4297ffff}}, /* 1.5*2**42 -724*2**-10 */
-diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c
-index 96f0e81..1daeef7 100644
---- a/sysdeps/ieee754/flt-32/e_log10f.c
-+++ b/sysdeps/ieee754/flt-32/e_log10f.c
-@@ -22,12 +22,6 @@ ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */
- log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */
- log10_2lo = 7.9034151668e-07; /* 0x355427db */
-
--#ifdef __STDC__
--static const float zero = 0.0;
--#else
--static float zero = 0.0;
--#endif
--
- #ifdef __STDC__
- float __ieee754_log10f(float x)
- #else
-diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c
-index 864ab27..0affd40 100644
---- a/sysdeps/ieee754/flt-32/s_cosf.c
-+++ b/sysdeps/ieee754/flt-32/s_cosf.c
-@@ -21,12 +21,6 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $";
- #include "math.h"
- #include "math_private.h"
-
--#ifdef __STDC__
--static const float one=1.0;
--#else
--static float one=1.0;
--#endif
--
- #ifdef __STDC__
- float __cosf(float x)
- #else
-diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
-index 500aacc..ab5a96e 100644
---- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
-+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
-@@ -82,7 +82,6 @@ DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Woverflow");
- static const long double PIL = 3.1415926535897932384626433832795028841972E0L;
- static const long double MAXLGM = 1.0485738685148938358098967157129705071571E4928L;
- static const long double one = 1.0L;
--static const long double zero = 0.0L;
- static const long double huge = 1.0e4000L;
-
- /* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x P(1/x^2)
-diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c
-index fa4609f..08c80a3 100644
---- a/sysdeps/ieee754/ldbl-128/s_erfl.c
-+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c
-@@ -140,7 +140,6 @@ deval (long double x, const long double *p, int n)
- static long double
- #endif
- tiny = 1e-4931L,
-- half = 0.5L,
- one = 1.0L,
- two = 2.0L,
- /* 2/sqrt(pi) - 1 */
-diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c
-index ff759bc..9609550 100644
---- a/sysdeps/ieee754/ldbl-128/s_log1pl.c
-+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c
-@@ -117,7 +117,6 @@ static const long double C2 = 1.428606820309417232121458176568075500134E-6L;
-
- static const long double sqrth = 0.7071067811865475244008443621048490392848L;
- /* ln (2^16384 * (1 - 2^-113)) */
--static const long double maxlog = 1.1356523406294143949491931077970764891253E4L;
- static const long double zero = 0.0L;
-
- long double
diff --git a/packages/glibc/2.14/105-misleading-indentation.patch b/packages/glibc/2.14/105-misleading-indentation.patch
deleted file mode 100644
index 1dd8d85..0000000
--- a/packages/glibc/2.14/105-misleading-indentation.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-commit 976ef870542580cf5fed896c2c652b3e1a95f9da
-Author: Steve Ellcey <sellcey@mips.com>
-Date: Fri Dec 11 09:19:37 2015 -0800
-
- Fix indentation.
-
- * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f):
- Fix indentation.
-
-diff --git a/sysdeps/ieee754/flt-32/k_rem_pio2f.c b/sysdeps/ieee754/flt-32/k_rem_pio2f.c
-index 0c7685c..392afdb 100644
---- a/sysdeps/ieee754/flt-32/k_rem_pio2f.c
-+++ b/sysdeps/ieee754/flt-32/k_rem_pio2f.c
-@@ -65,7 +65,9 @@ int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32
-
- /* compute q[0],q[1],...q[jk] */
- for (i=0;i<=jk;i++) {
-- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw;
-+ for(j=0,fw=0.0;j<=jx;j++)
-+ fw += x[j]*f[jx+i-j];
-+ q[i] = fw;
- }
-
- jz = jk;
diff --git a/packages/glibc/2.14/106-dl-open-array-bounds.patch b/packages/glibc/2.14/106-dl-open-array-bounds.patch
deleted file mode 100644
index bdb5c19..0000000
--- a/packages/glibc/2.14/106-dl-open-array-bounds.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-commit 328c44c3670ebf6c1bd790acddce65a12998cd6c
-Author: Roland McGrath <roland@hack.frob.com>
-Date: Fri Apr 17 12:11:58 2015 -0700
-
- Fuller check for invalid NSID in _dl_open.
-
-diff --git a/elf/dl-open.c b/elf/dl-open.c
-index 0dbe07f..2d0e082 100644
---- a/elf/dl-open.c
-+++ b/elf/dl-open.c
-@@ -619,8 +619,14 @@ no more namespaces available for dlmopen()"));
- /* Never allow loading a DSO in a namespace which is empty. Such
- direct placements is only causing problems. Also don't allow
- loading into a namespace used for auditing. */
-- else if (__builtin_expect (nsid != LM_ID_BASE && nsid != __LM_ID_CALLER, 0)
-- && (GL(dl_ns)[nsid]._ns_nloaded == 0
-+ else if ((nsid != LM_ID_BASE && nsid != __LM_ID_CALLER)
-+ && ((nsid < 0 || nsid >= GL(dl_nns))
-+ /* This prevents the [NSID] index expressions from being
-+ evaluated, so the compiler won't think that we are
-+ accessing an invalid index here in the !SHARED case where
-+ DL_NNS is 1 and so any NSID != 0 is invalid. */
-+ || DL_NNS == 1
-+ || GL(dl_ns)[nsid]._ns_nloaded == 0
- || GL(dl_ns)[nsid]._ns_loaded->l_auditing))
- _dl_signal_error (EINVAL, file, NULL,
- N_("invalid target namespace in dlmopen()"));
diff --git a/packages/glibc/2.14/140-Fix-combreloc-test-BSD-grep.patch b/packages/glibc/2.14/140-Fix-combreloc-test-BSD-grep.patch
deleted file mode 100644
index d720d39..0000000
--- a/packages/glibc/2.14/140-Fix-combreloc-test-BSD-grep.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001
-From: Alexey Neyman <stilor@att.net>
-Date: Wed, 8 Mar 2017 14:31:10 -0800
-Subject: [PATCH] Fix combreloc test with BSD grep
-
-The test for "-z combreloc" fails when cross-compiling on a machine
-that uses BSD grep (e.g. on macos). grep complains about empty
-subexpression and exits with non-zero status, which is interpreted
-by configure as "not found". As a result, support for "-z combreloc"
-(HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC.
-
- * configure.ac: Avoid empty subexpression in grep.
-
-Signed-off-by: Alexey Neyman <stilor@att.net>
----
- ChangeLog | 5 +++++
- configure | 2 +-
- configure.ac | 2 +-
- 3 files changed, 7 insertions(+), 2 deletions(-)
-
-diff -urpN glibc-2.14.1.orig/configure glibc-2.14.1/configure
---- glibc-2.14.1.orig/configure 2011-10-07 02:48:55.000000000 -0700
-+++ glibc-2.14.1/configure 2017-03-08 21:06:36.000000000 -0800
-@@ -6377,7 +6377,7 @@ EOF
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }
- then
-- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
-+ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then
- libc_cv_z_combreloc=yes
- else
- libc_cv_z_combreloc=no
-diff -urpN glibc-2.14.1.orig/configure.in glibc-2.14.1/configure.in
---- glibc-2.14.1.orig/configure.in 2011-10-07 02:48:55.000000000 -0700
-+++ glibc-2.14.1/configure.in 2017-03-08 21:06:50.000000000 -0800
-@@ -1655,7 +1655,7 @@ dnl cross-platform since the gcc used ca
- dnl introducing new options this is not easily doable. Instead use a tool
- dnl which always is cross-platform: readelf. To detect whether -z combreloc
- dnl look for a section named .rel.dyn.
-- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
-+ if readelf -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then
- libc_cv_z_combreloc=yes
- else
- libc_cv_z_combreloc=no
diff --git a/packages/glibc/2.14/300-macos-cross-rpcgen.patch b/packages/glibc/2.14/300-macos-cross-rpcgen.patch
deleted file mode 100644
index e654644..0000000
--- a/packages/glibc/2.14/300-macos-cross-rpcgen.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-commit ae7080d30c68cfa0c81ce3422dca948f64a94f50
-Author: Jia Liu <proljc@gmail.com>
-Date: Sat Sep 7 00:01:08 2013 +0800
-
- sunrpc/rpc/types.h: fix OS X and FreeBSD build problems
-
- When I build arm-linux-gcc on OS X, I find glibc will get a build error
- in sunrpc/rpc/types.h, so I add __APPLE_CC__ to make OS X build OK.
- For FreeBSD, Add __FreeBSD__ to make it build OK, too.
-
- URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00155.html
- URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00217.html
- URL: http://sourceware.org/ml/libc-alpha/2013-09/msg00240.html
- Signed-off-by: Jia Liu <proljc@gmail.com>
- Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-
-diff --git a/sunrpc/rpc/types.h b/sunrpc/rpc/types.h
-index 3dca5c4..beded52 100644
---- a/sunrpc/rpc/types.h
-+++ b/sunrpc/rpc/types.h
-@@ -69,6 +69,11 @@ typedef unsigned long rpcport_t;
- #include <sys/types.h>
- #endif
-
-+#if defined __APPLE_CC__ || defined __FreeBSD__
-+# define __u_char_defined
-+# define __daddr_t_defined
-+#endif
-+
- #ifndef __u_char_defined
- typedef __u_char u_char;
- typedef __u_short u_short;
diff --git a/packages/glibc/2.14/900-cpuid-include.patch b/packages/glibc/2.14/900-cpuid-include.patch
deleted file mode 100644
index 0b8db71..0000000
--- a/packages/glibc/2.14/900-cpuid-include.patch
+++ /dev/null
@@ -1,628 +0,0 @@
-This patch fixes another configure test issue when bootstrapping.
-sysdeps/i386/configure.in uses the obsolete AC_HEADER_CHECK macro to
-test for cpuid.h, and that macro tries to include various other
-standard headers (which come from the library, unlike cpuid.h which
-comes from the compiler, so aren't available when bootstrapping) in
-the test code it compiles. This patch changes the code to use
-AC_CHECK_HEADER, with the fourth argument used to prevent any default
-includes being used in the test.
-
-Tested x86_64 (native).
-
-2012-03-07 Joseph Myers <joseph@codesourcery.com>
-
- * sysdeps/i386/configure.in (cpuid.h): Use AC_CHECK_HEADER with no
- default includes instead of AC_HEADER_CHECK.
- * sysdeps/i386/configure: Regenerated.
-
-Origin: http://sourceware.org/ml/libc-alpha/2012-03/msg00177.html
-
-diff -Nur glibc-2.14.1.orig/sysdeps/i386/configure glibc-2.14.1/sysdeps/i386/configure
---- glibc-2.14.1.orig/sysdeps/i386/configure 2011-10-07 20:48:55.000000000 +1100
-+++ glibc-2.14.1/sysdeps/i386/configure 2012-07-25 01:23:11.799118927 +1000
-@@ -16,23 +16,6 @@
- as_fn_set_status $1
- exit $1
- } # as_fn_exit
--# as_fn_arith ARG...
--# ------------------
--# Perform arithmetic evaluation on the ARGs, and store the result in the
--# global $as_val. Take advantage of shells that can avoid forks. The arguments
--# must be portable across $(()) and expr.
--if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-- eval 'as_fn_arith ()
-- {
-- as_val=$(( $* ))
-- }'
--else
-- as_fn_arith ()
-- {
-- as_val=`expr "$@" || test $? -eq 1`
-- }
--fi # as_fn_arith
--
- if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-@@ -89,6 +72,10 @@
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
-+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
-+ # already done that, so ensure we don't try to do so again and fall
-+ # in an infinite loop. This has already happened in practice.
-+ _as_can_reexec=no; export _as_can_reexec
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
-@@ -97,42 +84,6 @@
- exit
- }
-
--# Factoring default headers for most tests.
--ac_includes_default="\
--#include <stdio.h>
--#ifdef HAVE_SYS_TYPES_H
--# include <sys/types.h>
--#endif
--#ifdef HAVE_SYS_STAT_H
--# include <sys/stat.h>
--#endif
--#ifdef STDC_HEADERS
--# include <stdlib.h>
--# include <stddef.h>
--#else
--# ifdef HAVE_STDLIB_H
--# include <stdlib.h>
--# endif
--#endif
--#ifdef HAVE_STRING_H
--# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
--# include <memory.h>
--# endif
--# include <string.h>
--#endif
--#ifdef HAVE_STRINGS_H
--# include <strings.h>
--#endif
--#ifdef HAVE_INTTYPES_H
--# include <inttypes.h>
--#endif
--#ifdef HAVE_STDINT_H
--# include <stdint.h>
--#endif
--#ifdef HAVE_UNISTD_H
--# include <unistd.h>
--#endif"
--
-
- # ac_fn_c_try_compile LINENO
- # --------------------------
-@@ -167,177 +118,11 @@
-
- ac_retval=1
- fi
-- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
- } # ac_fn_c_try_compile
-
--# ac_fn_c_try_cpp LINENO
--# ----------------------
--# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
--ac_fn_c_try_cpp ()
--{
-- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-- if { { ac_try="$ac_cpp conftest.$ac_ext"
--case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
--$as_echo "$ac_try_echo"; } >&5
-- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-- ac_status=$?
-- if test -s conftest.err; then
-- grep -v '^ *+' conftest.err >conftest.er1
-- cat conftest.er1 >&5
-- mv -f conftest.er1 conftest.err
-- fi
-- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-- test $ac_status = 0; } >/dev/null && {
-- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-- test ! -s conftest.err
-- }; then :
-- ac_retval=0
--else
-- $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
-- ac_retval=1
--fi
-- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-- as_fn_set_status $ac_retval
--
--} # ac_fn_c_try_cpp
--
--# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
--# -------------------------------------------------------
--# Tests whether HEADER exists, giving a warning if it cannot be compiled using
--# the include files in INCLUDES and setting the cache variable VAR
--# accordingly.
--ac_fn_c_check_header_mongrel ()
--{
-- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-- if eval "test \"\${$3+set}\"" = set; then :
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
--$as_echo_n "checking for $2... " >&6; }
--if eval "test \"\${$3+set}\"" = set; then :
-- $as_echo_n "(cached) " >&6
--fi
--eval ac_res=\$$3
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--else
-- # Is the header compilable?
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
--$as_echo_n "checking $2 usability... " >&6; }
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--$4
--#include <$2>
--_ACEOF
--if ac_fn_c_try_compile "$LINENO"; then :
-- ac_header_compiler=yes
--else
-- ac_header_compiler=no
--fi
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
--$as_echo "$ac_header_compiler" >&6; }
--
--# Is the header present?
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
--$as_echo_n "checking $2 presence... " >&6; }
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#include <$2>
--_ACEOF
--if ac_fn_c_try_cpp "$LINENO"; then :
-- ac_header_preproc=yes
--else
-- ac_header_preproc=no
--fi
--rm -f conftest.err conftest.$ac_ext
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
--$as_echo "$ac_header_preproc" >&6; }
--
--# So? What about this header?
--case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
-- yes:no: )
-- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
--$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
-- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
--$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-- ;;
-- no:yes:* )
-- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
--$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
-- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
--$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
-- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
--$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
-- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
--$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
-- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
--$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-- ;;
--esac
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
--$as_echo_n "checking for $2... " >&6; }
--if eval "test \"\${$3+set}\"" = set; then :
-- $as_echo_n "(cached) " >&6
--else
-- eval "$3=\$ac_header_compiler"
--fi
--eval ac_res=\$$3
-- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
--$as_echo "$ac_res" >&6; }
--fi
-- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
--
--} # ac_fn_c_check_header_mongrel
--
--# ac_fn_c_try_run LINENO
--# ----------------------
--# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
--# that executables *can* be run.
--ac_fn_c_try_run ()
--{
-- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-- if { { ac_try="$ac_link"
--case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
--$as_echo "$ac_try_echo"; } >&5
-- (eval "$ac_link") 2>&5
-- ac_status=$?
-- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
-- { { case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
--$as_echo "$ac_try_echo"; } >&5
-- (eval "$ac_try") 2>&5
-- ac_status=$?
-- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-- test $ac_status = 0; }; }; then :
-- ac_retval=0
--else
-- $as_echo "$as_me: program exited with status $ac_status" >&5
-- $as_echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
-- ac_retval=$ac_status
--fi
-- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-- as_fn_set_status $ac_retval
--
--} # ac_fn_c_try_run
--
- # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
- # -------------------------------------------------------
- # Tests whether HEADER exists and can be compiled using the include files in
-@@ -347,7 +132,7 @@
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
- $as_echo_n "checking for $2... " >&6; }
--if eval "test \"\${$3+set}\"" = set; then :
-+if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-@@ -365,275 +150,16 @@
- eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
- $as_echo "$ac_res" >&6; }
-- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
- } # ac_fn_c_check_header_compile
- # This file is generated from configure.in by Autoconf. DO NOT EDIT!
- # Local configure fragment for sysdeps/i386.
-
-
--
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
--$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
--if test "${ac_cv_path_GREP+set}" = set; then :
-- $as_echo_n "(cached) " >&6
--else
-- if test -z "$GREP"; then
-- ac_path_GREP_found=false
-- # Loop through the user's path and test for each of PROGNAME-LIST
-- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
--do
-- IFS=$as_save_IFS
-- test -z "$as_dir" && as_dir=.
-- for ac_prog in grep ggrep; do
-- for ac_exec_ext in '' $ac_executable_extensions; do
-- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
--# Check for GNU ac_path_GREP and select it if it is found.
-- # Check for GNU $ac_path_GREP
--case `"$ac_path_GREP" --version 2>&1` in
--*GNU*)
-- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
--*)
-- ac_count=0
-- $as_echo_n 0123456789 >"conftest.in"
-- while :
-- do
-- cat "conftest.in" "conftest.in" >"conftest.tmp"
-- mv "conftest.tmp" "conftest.in"
-- cp "conftest.in" "conftest.nl"
-- $as_echo 'GREP' >> "conftest.nl"
-- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-- as_fn_arith $ac_count + 1 && ac_count=$as_val
-- if test $ac_count -gt ${ac_path_GREP_max-0}; then
-- # Best one so far, save it but keep looking for a better one
-- ac_cv_path_GREP="$ac_path_GREP"
-- ac_path_GREP_max=$ac_count
-- fi
-- # 10*(2^10) chars as input seems more than enough
-- test $ac_count -gt 10 && break
-- done
-- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
--esac
--
-- $ac_path_GREP_found && break 3
-- done
-- done
-- done
--IFS=$as_save_IFS
-- if test -z "$ac_cv_path_GREP"; then
-- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-- fi
--else
-- ac_cv_path_GREP=$GREP
--fi
--
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
--$as_echo "$ac_cv_path_GREP" >&6; }
-- GREP="$ac_cv_path_GREP"
--
--
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
--$as_echo_n "checking for egrep... " >&6; }
--if test "${ac_cv_path_EGREP+set}" = set; then :
-- $as_echo_n "(cached) " >&6
--else
-- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-- then ac_cv_path_EGREP="$GREP -E"
-- else
-- if test -z "$EGREP"; then
-- ac_path_EGREP_found=false
-- # Loop through the user's path and test for each of PROGNAME-LIST
-- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
--for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
--do
-- IFS=$as_save_IFS
-- test -z "$as_dir" && as_dir=.
-- for ac_prog in egrep; do
-- for ac_exec_ext in '' $ac_executable_extensions; do
-- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
--# Check for GNU ac_path_EGREP and select it if it is found.
-- # Check for GNU $ac_path_EGREP
--case `"$ac_path_EGREP" --version 2>&1` in
--*GNU*)
-- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
--*)
-- ac_count=0
-- $as_echo_n 0123456789 >"conftest.in"
-- while :
-- do
-- cat "conftest.in" "conftest.in" >"conftest.tmp"
-- mv "conftest.tmp" "conftest.in"
-- cp "conftest.in" "conftest.nl"
-- $as_echo 'EGREP' >> "conftest.nl"
-- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-- as_fn_arith $ac_count + 1 && ac_count=$as_val
-- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-- # Best one so far, save it but keep looking for a better one
-- ac_cv_path_EGREP="$ac_path_EGREP"
-- ac_path_EGREP_max=$ac_count
-- fi
-- # 10*(2^10) chars as input seems more than enough
-- test $ac_count -gt 10 && break
-- done
-- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
--esac
--
-- $ac_path_EGREP_found && break 3
-- done
-- done
-- done
--IFS=$as_save_IFS
-- if test -z "$ac_cv_path_EGREP"; then
-- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-- fi
--else
-- ac_cv_path_EGREP=$EGREP
--fi
--
-- fi
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
--$as_echo "$ac_cv_path_EGREP" >&6; }
-- EGREP="$ac_cv_path_EGREP"
--
--
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
--$as_echo_n "checking for ANSI C header files... " >&6; }
--if test "${ac_cv_header_stdc+set}" = set; then :
-- $as_echo_n "(cached) " >&6
--else
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#include <stdlib.h>
--#include <stdarg.h>
--#include <string.h>
--#include <float.h>
--
--int
--main ()
--{
--
-- ;
-- return 0;
--}
--_ACEOF
--if ac_fn_c_try_compile "$LINENO"; then :
-- ac_cv_header_stdc=yes
--else
-- ac_cv_header_stdc=no
--fi
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--
--if test $ac_cv_header_stdc = yes; then
-- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#include <string.h>
--
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-- $EGREP "memchr" >/dev/null 2>&1; then :
--
--else
-- ac_cv_header_stdc=no
--fi
--rm -f conftest*
--
--fi
--
--if test $ac_cv_header_stdc = yes; then
-- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#include <stdlib.h>
--
--_ACEOF
--if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-- $EGREP "free" >/dev/null 2>&1; then :
--
--else
-- ac_cv_header_stdc=no
--fi
--rm -f conftest*
--
--fi
--
--if test $ac_cv_header_stdc = yes; then
-- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-- if test "$cross_compiling" = yes; then :
-- :
--else
-- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--#include <ctype.h>
--#include <stdlib.h>
--#if ((' ' & 0x0FF) == 0x020)
--# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
--#else
--# define ISLOWER(c) \
-- (('a' <= (c) && (c) <= 'i') \
-- || ('j' <= (c) && (c) <= 'r') \
-- || ('s' <= (c) && (c) <= 'z'))
--# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
--#endif
--
--#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
--int
--main ()
--{
-- int i;
-- for (i = 0; i < 256; i++)
-- if (XOR (islower (i), ISLOWER (i))
-- || toupper (i) != TOUPPER (i))
-- return 2;
-- return 0;
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--
--else
-- ac_cv_header_stdc=no
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-- conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
--fi
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
--$as_echo "$ac_cv_header_stdc" >&6; }
--if test $ac_cv_header_stdc = yes; then
--
--$as_echo "#define STDC_HEADERS 1" >>confdefs.h
--
--fi
--
--# On IRIX 5.3, sys/types and inttypes.h are conflicting.
--for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-- inttypes.h stdint.h unistd.h
--do :
-- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
--ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-+ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */
- "
--if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-- cat >>confdefs.h <<_ACEOF
--#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
--_ACEOF
--
--fi
--
--done
--
--
--ac_fn_c_check_header_mongrel "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "$ac_includes_default"
--if test "x$ac_cv_header_cpuid_h" = x""yes; then :
-+if test "x$ac_cv_header_cpuid_h" = xyes; then :
-
- else
- as_fn_error $? "gcc must provide the <cpuid.h> header" "$LINENO" 5
-@@ -643,7 +169,7 @@
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5
- $as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; }
--if test "${libc_cv_cpp_asm_debuginfo+set}" = set; then :
-+if ${libc_cv_cpp_asm_debuginfo+:} false; then :
- $as_echo_n "(cached) " >&6
- else
- cat > conftest.S <<EOF
-@@ -693,7 +219,7 @@
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSE4 support" >&5
- $as_echo_n "checking for SSE4 support... " >&6; }
--if test "${libc_cv_cc_sse4+set}" = set; then :
-+if ${libc_cv_cc_sse4+:} false; then :
- $as_echo_n "(cached) " >&6
- else
- if { ac_try='${CC-cc} -msse4 -xc /dev/null -S -o /dev/null'
-@@ -716,7 +242,7 @@
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler -mtune=i686 support" >&5
- $as_echo_n "checking for assembler -mtune=i686 support... " >&6; }
--if test "${libc_cv_as_i686+set}" = set; then :
-+if ${libc_cv_as_i686+:} false; then :
- $as_echo_n "(cached) " >&6
- else
- if { ac_try='${CC-cc} -Wa,-mtune=i686 -xc /dev/null -S -o /dev/null'
-@@ -735,7 +261,7 @@
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5
- $as_echo_n "checking for AVX support... " >&6; }
--if test "${libc_cv_cc_avx+set}" = set; then :
-+if ${libc_cv_cc_avx+:} false; then :
- $as_echo_n "(cached) " >&6
- else
- if { ac_try='${CC-cc} -mavx -xc /dev/null -S -o /dev/null'
-@@ -758,7 +284,7 @@
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5
- $as_echo_n "checking for -mno-vzeroupper support... " >&6; }
--if test "${libc_cv_cc_novzeroupper+set}" = set; then :
-+if ${libc_cv_cc_novzeroupper+:} false; then :
- $as_echo_n "(cached) " >&6
- else
- if { ac_try='${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null'
-diff -Nur glibc-2.14.1.orig/sysdeps/i386/configure.in glibc-2.14.1/sysdeps/i386/configure.in
---- glibc-2.14.1.orig/sysdeps/i386/configure.in 2011-10-07 20:48:55.000000000 +1100
-+++ glibc-2.14.1/sysdeps/i386/configure.in 2012-07-25 01:00:49.345025022 +1000
-@@ -1,8 +1,9 @@
- GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
- # Local configure fragment for sysdeps/i386.
-
--AC_HEADER_CHECK([cpuid.h], ,
-- [AC_MSG_ERROR([gcc must provide the <cpuid.h> header])])
-+AC_CHECK_HEADER([cpuid.h], ,
-+ [AC_MSG_ERROR([gcc must provide the <cpuid.h> header])],
-+ [/* No default includes. */])
-
- AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
- libc_cv_cpp_asm_debuginfo, [dnl
-
diff --git a/packages/glibc/2.14/920-fix-rpc_parse-format.patch b/packages/glibc/2.14/920-fix-rpc_parse-format.patch
deleted file mode 100644
index 37e58da..0000000
--- a/packages/glibc/2.14/920-fix-rpc_parse-format.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-commit 5874510faaf3cbd0bb112aaacab9f225002beed1
-Author: Joseph Myers <joseph@codesourcery.com>
-Date: Tue Nov 8 23:44:51 2016 +0000
-
- Fix rpcgen buffer overrun (bug 20790).
-
- Building with GCC 7 produces an error building rpcgen:
-
- rpc_parse.c: In function 'get_prog_declaration':
- rpc_parse.c:543:25: error: may write a terminating nul past the end of the destination [-Werror=format-length=]
- sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */
- ~~~~^
- rpc_parse.c:543:5: note: format output between 5 and 14 bytes into a destination of size 10
- sprintf (name, "%s%d", ARGNAME, num); /* default name of argument */
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- That buffer overrun is for the case where the .x file declares a
- program with a million arguments. The strcpy two lines above can
- generate a buffer overrun much more simply for a long argument name.
-
- The limit on length of line read by rpcgen (MAXLINESIZE == 1024)
- provides a bound on the buffer size needed, so this patch just changes
- the buffer size to MAXLINESIZE to avoid both possible buffer
- overruns. A testcase is added that rpcgen does not crash with a
- 500-character argument name, where it previously crashed.
-
- It would not at all surprise me if there are many other ways of
- crashing rpcgen with either valid or invalid input; fuzz testing would
- likely find various such bugs, though I don't think they are that
- important to fix (rpcgen is not that likely to be used with untrusted
- .x files as input). (As well as fuzz-findable bugs there are probably
- also issues when various int variables get overflowed on very large
- input.) The test infrastructure for rpcgen-not-crashing tests would
- need extending if tests are to be added for cases where rpcgen should
- produce an error, as opposed to cases where it should succeed.
-
- Tested for x86_64 and x86.
-
- [BZ #20790]
- * sunrpc/rpc_parse.c (get_prog_declaration): Increase buffer size
- to MAXLINESIZE.
- * sunrpc/bug20790.x: New file.
- * sunrpc/Makefile [$(run-built-tests) = yes] (rpcgen-tests): New
- variable.
- [$(run-built-tests) = yes] (tests-special): Add $(rpcgen-tests).
- [$(run-built-tests) = yes] ($(rpcgen-tests)): New rule.
-
-diff --git a/sunrpc/rpc_parse.c b/sunrpc/rpc_parse.c
-index 1a1df6d8c2..505a6554cf 100644
---- a/sunrpc/rpc_parse.c
-+++ b/sunrpc/rpc_parse.c
-@@ -521,7 +521,7 @@ static void
- get_prog_declaration (declaration * dec, defkind dkind, int num /* arg number */ )
- {
- token tok;
-- char name[10]; /* argument name */
-+ char name[MAXLINESIZE]; /* argument name */
-
- if (dkind == DEF_PROGRAM)
- {
diff --git a/packages/glibc/2.14/940-nis-bogus-conditional.patch b/packages/glibc/2.14/940-nis-bogus-conditional.patch
deleted file mode 100644
index 09b38cf..0000000
--- a/packages/glibc/2.14/940-nis-bogus-conditional.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-commit f88759ea9bd3c8d8fef28f123ba9767cb0e421a3
-Author: Joseph Myers <joseph@codesourcery.com>
-Date: Wed Dec 21 23:44:01 2016 +0000
-
- Fix nss_nisplus build with mainline GCC (bug 20978).
-
- glibc build with current mainline GCC fails because
- nis/nss_nisplus/nisplus-alias.c contains code
-
- if (name != NULL)
- {
- *errnop = EINVAL;
- return NSS_STATUS_UNAVAIL;
- }
-
- char buf[strlen (name) + 9 + tablename_len];
-
- producing an error about strlen being called on a pointer that is
- always NULL (and a subsequent use of that pointer with a %s format in
- snprintf).
-
- As Andreas noted, the bogus conditional comes from a 1997 change:
-
- - if (name == NULL || strlen(name) > 8)
- - return NSS_STATUS_NOTFOUND;
- - else
- + if (name != NULL || strlen(name) <= 8)
-
- So the intention is clearly to return an error for NULL name.
-
- This patch duly inverts the sense of the conditional. It fixes the
- build with GCC mainline, and passes usual glibc testsuite testing for
- x86_64. However, I have not tried any actual substantive nisplus
- testing, do not have an environment for such testing, and do not know
- whether it is possible that strlen (name) or tablename_len might be
- large so that the VLA for buf is actually a security issue. However,
- if it is a security issue, there are plenty of other similar instances
- in the nisplus code (that haven't been hidden by a bogus comparison
- with NULL) - and nis_table.c:__create_ib_request uses strdupa on the
- string passed to nis_list, so a local fix in the caller wouldn't
- suffice anyway (see bug 20987). (Calls to strdupa and other such
- macros that use alloca must be considered equally questionable
- regarding stack overflow issues as direct calls to alloca and VLA
- declarations.)
-
- [BZ #20978]
- * nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r):
- Compare name == NULL, not name != NULL.
-
-diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c
-index 7f698b4e6d..cb5acce01d 100644
---- a/nis/nss_nisplus/nisplus-alias.c
-+++ b/nis/nss_nisplus/nisplus-alias.c
-@@ -291,7 +291,7 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias,
- return status;
- }
-
-- if (name != NULL)
-+ if (name == NULL)
- {
- *errnop = EINVAL;
- return NSS_STATUS_UNAVAIL;
diff --git a/packages/glibc/2.14/950-initfini-ppc64.patch b/packages/glibc/2.14/950-initfini-ppc64.patch
deleted file mode 100644
index 87f8d23..0000000
--- a/packages/glibc/2.14/950-initfini-ppc64.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Prevent erroneous inline optimization of initfini.s on PowerPC64.
-
-The problem and the fix was reported there:
-http://sourceware.org/ml/libc-alpha/2012-01/msg00195.html
-Git commit:
-commit 1fe05ea95e1460e5e1cf1568a8ce3982f0f02de6
-Author: Ryan S. Arnold <rsa@us.ibm.com>
-Date: Tue May 3 17:26:17 2011 -0500
-
---- glibc.orig/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:06.713568781 -0800
-+++ glibc/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:50.318605517 -0800
-@@ -31,7 +31,7 @@
- ifneq ($(elf),no)
- # The initfini generation code doesn't work in the presence of -fPIC, so
- # we use -fpic instead which is much better.
--CFLAGS-initfini.s += -fpic -O1
-+CFLAGS-initfini.s += -fpic -O1 -fno-inline
- endif
- endif
-
diff --git a/packages/glibc/2.14/998-obstack-common.patch b/packages/glibc/2.14/998-obstack-common.patch
new file mode 100644
index 0000000..4b95f06
--- /dev/null
+++ b/packages/glibc/2.14/998-obstack-common.patch
@@ -0,0 +1,30 @@
+commit 39b1f6172a2f9ddc74a8f82d6e84dd13b22dbaf2
+Author: Peter Collingbourne <pcc@google.com>
+Date: Wed May 15 20:28:08 2013 +0200
+
+ Move _obstack_compat out of common
+
+ it is impossible to create an alias of a common symbol (as
+ compat_symbol does), because common symbols do not have a section or
+ an offset until linked. GNU as tolerates aliases of common symbols by
+ simply creating another common symbol, but other assemblers (notably
+ LLVM's integrated assembler) are less tolerant.
+
+ 2013-05-15 Peter Collingbourne <pcc@google.com>
+
+ * malloc/obstack.c (_obstack_compat): Add initializer.
+ -
+
+diff --git a/malloc/obstack.c b/malloc/obstack.c
+index 25a90514f7..c3c7db4a96 100644
+--- a/malloc/obstack.c
++++ b/malloc/obstack.c
+@@ -115,7 +115,7 @@ int obstack_exit_failure = EXIT_FAILURE;
+ /* A looong time ago (before 1994, anyway; we're not sure) this global variable
+ was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
+ library still exports it because somebody might use it. */
+-struct obstack *_obstack_compat;
++struct obstack *_obstack_compat = 0;
+ compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
+ # endif
+ # endif
diff --git a/packages/glibc/2.14/999-new-tools.patch b/packages/glibc/2.14/999-new-tools.patch
deleted file mode 100644
index 7d115fd..0000000
--- a/packages/glibc/2.14/999-new-tools.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-diff -urpN glibc-2.14.orig/configure glibc-2.14/configure
---- glibc-2.14.orig/configure 2011-05-30 21:12:33.000000000 -0700
-+++ glibc-2.14/configure 2017-02-08 00:38:34.469859812 -0800
-@@ -4939,7 +4939,7 @@ $as_echo_n "checking version of $CC... "
- ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-- 3.4* | 4.[0-9]* )
-+ 3.4* | [4-9].* )
- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
-
-@@ -5002,7 +5002,7 @@ $as_echo_n "checking version of $MAKE...
- ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-- 3.79* | 3.[89]*)
-+ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*)
- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
-
-@@ -5129,7 +5129,7 @@ $as_echo_n "checking version of $MAKEINF
- ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-- 4.*)
-+ [4-9].*)
- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
-
-@@ -5189,7 +5189,7 @@ else
- # Found it, now check the version.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $SED" >&5
- $as_echo_n "checking version of $SED... " >&6; }
-- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'`
-+ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 3.0[2-9]*|3.[1-9]*|[4-9]*)
-diff -urpN glibc-2.14.orig/configure.in glibc-2.14/configure.in
---- glibc-2.14.orig/configure.in 2011-05-30 21:12:33.000000000 -0700
-+++ glibc-2.14/configure.in 2017-02-08 00:30:32.232661325 -0800
-@@ -1026,11 +1026,11 @@ fi
- # These programs are version sensitive.
- AC_CHECK_TOOL_PREFIX
- AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v,
-- [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ],
-+ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | [4-9].* ],
- critic_missing="$critic_missing gcc")
- AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
- [GNU Make[^0-9]*\([0-9][0-9.]*\)],
-- [3.79* | 3.[89]*], critic_missing="$critic_missing make")
-+ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make")
-
- AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version,
- [GNU gettext.* \([0-9]*\.[0-9.]*\)],
-@@ -1038,10 +1038,10 @@ AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsg
- MSGFMT=: aux_missing="$aux_missing msgfmt")
- AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
- [GNU texinfo.* \([0-9][0-9.]*\)],
-- [4.*],
-+ [[4-9].*],
- MAKEINFO=: aux_missing="$aux_missing makeinfo")
- AC_CHECK_PROG_VER(SED, sed, --version,
-- [GNU sed version \([0-9]*\.[0-9.]*\)],
-+ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)],
- [3.0[2-9]*|3.[1-9]*|[4-9]*],
- SED=: aux_missing="$aux_missing sed")
-
diff --git a/packages/glibc/2.14/version.desc b/packages/glibc/2.14/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/glibc/2.14/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/glibc-ports/2.14.1/100-respect-env-CPPFLAGS.patch b/packages/glibc/2.15/100-respect-env-CPPFLAGS.patch
index 3798cb2..3798cb2 100644
--- a/packages/glibc-ports/2.14.1/100-respect-env-CPPFLAGS.patch
+++ b/packages/glibc/2.15/100-respect-env-CPPFLAGS.patch
diff --git a/packages/glibc-ports/2.14/120-i386-x86_64-revert-clone-cfi.patch b/packages/glibc/2.15/120-i386-x86_64-revert-clone-cfi.patch
index c7f6182..c7f6182 100644
--- a/packages/glibc-ports/2.14/120-i386-x86_64-revert-clone-cfi.patch
+++ b/packages/glibc/2.15/120-i386-x86_64-revert-clone-cfi.patch
diff --git a/packages/glibc-ports/2.14/140-disable-ldconfig.patch b/packages/glibc/2.15/140-disable-ldconfig.patch
index 378e1df..378e1df 100644
--- a/packages/glibc-ports/2.14/140-disable-ldconfig.patch
+++ b/packages/glibc/2.15/140-disable-ldconfig.patch
diff --git a/packages/glibc-ports/2.14/150-queue-header-updates.patch b/packages/glibc/2.15/150-queue-header-updates.patch
index 7cbe70e..7cbe70e 100644
--- a/packages/glibc-ports/2.14/150-queue-header-updates.patch
+++ b/packages/glibc/2.15/150-queue-header-updates.patch
diff --git a/packages/glibc-ports/2.14.1/160-manual-no-perl.patch b/packages/glibc/2.15/160-manual-no-perl.patch
index 5e2b807..5e2b807 100644
--- a/packages/glibc-ports/2.14.1/160-manual-no-perl.patch
+++ b/packages/glibc/2.15/160-manual-no-perl.patch
diff --git a/packages/glibc-ports/2.14/170-localedef-fix-trampoline.patch b/packages/glibc/2.15/170-localedef-fix-trampoline.patch
index 3cc6559..3cc6559 100644
--- a/packages/glibc-ports/2.14/170-localedef-fix-trampoline.patch
+++ b/packages/glibc/2.15/170-localedef-fix-trampoline.patch
diff --git a/packages/glibc-ports/2.14/180-resolv-dynamic.patch b/packages/glibc/2.15/180-resolv-dynamic.patch
index e916bce..e916bce 100644
--- a/packages/glibc-ports/2.14/180-resolv-dynamic.patch
+++ b/packages/glibc/2.15/180-resolv-dynamic.patch
diff --git a/packages/glibc-ports/2.14/200-fadvise64_64.patch b/packages/glibc/2.15/200-fadvise64_64.patch
index 71bca38..71bca38 100644
--- a/packages/glibc-ports/2.14/200-fadvise64_64.patch
+++ b/packages/glibc/2.15/200-fadvise64_64.patch
diff --git a/packages/glibc-ports/2.14.1/220-section-comments.patch b/packages/glibc/2.15/220-section-comments.patch
index d717829..d717829 100644
--- a/packages/glibc-ports/2.14.1/220-section-comments.patch
+++ b/packages/glibc/2.15/220-section-comments.patch
diff --git a/packages/glibc-ports/2.14.1/230-no-inline-gmon.patch b/packages/glibc/2.15/230-no-inline-gmon.patch
index fa33c2b..fa33c2b 100644
--- a/packages/glibc-ports/2.14.1/230-no-inline-gmon.patch
+++ b/packages/glibc/2.15/230-no-inline-gmon.patch
diff --git a/packages/glibc-ports/2.14.1/260-assume-pipe2.patch b/packages/glibc/2.15/260-assume-pipe2.patch
index 42e8f4e..42e8f4e 100644
--- a/packages/glibc-ports/2.14.1/260-assume-pipe2.patch
+++ b/packages/glibc/2.15/260-assume-pipe2.patch
diff --git a/packages/glibc-ports/2.14/270-china.patch b/packages/glibc/2.15/270-china.patch
index 41d7759..41d7759 100644
--- a/packages/glibc-ports/2.14/270-china.patch
+++ b/packages/glibc/2.15/270-china.patch
diff --git a/packages/glibc-ports/2.14/280-new-valencian-locale.patch b/packages/glibc/2.15/280-new-valencian-locale.patch
index 4cdd108..4cdd108 100644
--- a/packages/glibc-ports/2.14/280-new-valencian-locale.patch
+++ b/packages/glibc/2.15/280-new-valencian-locale.patch
diff --git a/packages/glibc-ports/2.14.1/300-nscd-one-fork.patch b/packages/glibc/2.15/300-nscd-one-fork.patch
index adc9b3f..adc9b3f 100644
--- a/packages/glibc-ports/2.14.1/300-nscd-one-fork.patch
+++ b/packages/glibc/2.15/300-nscd-one-fork.patch
diff --git a/packages/glibc-ports/2.14.1/310-hppa-nptl-carlos.patch b/packages/glibc/2.15/310-hppa-nptl-carlos.patch
index 4c028b2..4c028b2 100644
--- a/packages/glibc-ports/2.14.1/310-hppa-nptl-carlos.patch
+++ b/packages/glibc/2.15/310-hppa-nptl-carlos.patch
diff --git a/packages/glibc-ports/2.14/340-dl_execstack-PaX-support.patch b/packages/glibc/2.15/340-dl_execstack-PaX-support.patch
index 2402af0..2402af0 100644
--- a/packages/glibc-ports/2.14/340-dl_execstack-PaX-support.patch
+++ b/packages/glibc/2.15/340-dl_execstack-PaX-support.patch
diff --git a/packages/glibc-ports/2.14/350-pre20040117-pt_pax.patch b/packages/glibc/2.15/350-pre20040117-pt_pax.patch
index f8f6b83..f8f6b83 100644
--- a/packages/glibc-ports/2.14/350-pre20040117-pt_pax.patch
+++ b/packages/glibc/2.15/350-pre20040117-pt_pax.patch
diff --git a/packages/glibc-ports/2.14/360-tests-sandbox-libdl-paths.patch b/packages/glibc/2.15/360-tests-sandbox-libdl-paths.patch
index 9f78c52..9f78c52 100644
--- a/packages/glibc-ports/2.14/360-tests-sandbox-libdl-paths.patch
+++ b/packages/glibc/2.15/360-tests-sandbox-libdl-paths.patch
diff --git a/packages/glibc-ports/2.14/380-dont-build-timezone.patch b/packages/glibc/2.15/380-dont-build-timezone.patch
index 11c358e..11c358e 100644
--- a/packages/glibc-ports/2.14/380-dont-build-timezone.patch
+++ b/packages/glibc/2.15/380-dont-build-timezone.patch
diff --git a/packages/glibc-ports/2.14/400-alpha-xstat.patch b/packages/glibc/2.15/400-alpha-xstat.patch
index 6e4ab8f..6e4ab8f 100644
--- a/packages/glibc-ports/2.14/400-alpha-xstat.patch
+++ b/packages/glibc/2.15/400-alpha-xstat.patch
diff --git a/packages/glibc-ports/2.14/430-alpha-creat.patch b/packages/glibc/2.15/430-alpha-creat.patch
index da6ddda..da6ddda 100644
--- a/packages/glibc-ports/2.14/430-alpha-creat.patch
+++ b/packages/glibc/2.15/430-alpha-creat.patch
diff --git a/packages/glibc-ports/2.16.0/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/2.15/490-alpha_alpha-add-fdatasync-support.patch
index acf250d..acf250d 100644
--- a/packages/glibc-ports/2.16.0/490-alpha_alpha-add-fdatasync-support.patch
+++ b/packages/glibc/2.15/490-alpha_alpha-add-fdatasync-support.patch
diff --git a/packages/glibc-ports/2.14/560-ppc-atomic.patch b/packages/glibc/2.15/560-ppc-atomic.patch
index ee1cb90..ee1cb90 100644
--- a/packages/glibc-ports/2.14/560-ppc-atomic.patch
+++ b/packages/glibc/2.15/560-ppc-atomic.patch
diff --git a/packages/glibc-ports/2.14/630-mips_shn_undef-hack.patch b/packages/glibc/2.15/630-mips_shn_undef-hack.patch
index 791d76c..791d76c 100644
--- a/packages/glibc-ports/2.14/630-mips_shn_undef-hack.patch
+++ b/packages/glibc/2.15/630-mips_shn_undef-hack.patch
diff --git a/packages/glibc-ports/2.14/640-alpha-atfcts.patch b/packages/glibc/2.15/640-alpha-atfcts.patch
index 7a8a94a..7a8a94a 100644
--- a/packages/glibc-ports/2.14/640-alpha-atfcts.patch
+++ b/packages/glibc/2.15/640-alpha-atfcts.patch
diff --git a/packages/glibc-ports/2.14.1/650-syslog.patch b/packages/glibc/2.15/650-syslog.patch
index c20cafc..c20cafc 100644
--- a/packages/glibc-ports/2.14.1/650-syslog.patch
+++ b/packages/glibc/2.15/650-syslog.patch
diff --git a/packages/glibc-ports/2.14.1/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/2.15/660-debug-readlink_chk-readklinkat_chk.patch
index a5a7052..a5a7052 100644
--- a/packages/glibc-ports/2.14.1/660-debug-readlink_chk-readklinkat_chk.patch
+++ b/packages/glibc/2.15/660-debug-readlink_chk-readklinkat_chk.patch
diff --git a/packages/glibc/2.15/996-obsolete-rpc.patch b/packages/glibc/2.15/996-obsolete-rpc.patch
new file mode 100644
index 0000000..459be29
--- /dev/null
+++ b/packages/glibc/2.15/996-obsolete-rpc.patch
@@ -0,0 +1,1660 @@
+commit 021db4be6f1f4189f66feee066a495d49e92b93e
+Author: Andreas Jaeger <aj@suse.de>
+Date: Thu May 10 20:16:53 2012 +0200
+
+ Make sunrpc code usable again
+
+ New configure option --enable-obsolete-rpc makes the deprecated RPC
+ headers and functions available at compile time as they were before
+ version 2.14. This option will be removed at some time in the future
+ after the TI-RPC library becomes fully sufficient for the needs of
+ existing applications.
+
+diff --git a/config.h.in b/config.h.in
+index 787873b4c0..54952609ef 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -178,6 +178,9 @@
+ /* Define if `.ctors' and `.dtors' sections shouldn't be used. */
+ #undef NO_CTORS_DTORS_SECTIONS
+
++/* Define if obsolete RPC code should be made available for user-level code
++ to link against. */
++#undef LINK_OBSOLETE_RPC
+ /*
+ */
+
+diff --git a/config.make.in b/config.make.in
+index 5f6f9e281d..6c4d04ee33 100644
+--- a/config.make.in
++++ b/config.make.in
+@@ -96,6 +96,7 @@ add-on-subdirs = @add_on_subdirs@
+ sysdeps-add-ons = @sysdeps_add_ons@
+ cross-compiling = @cross_compiling@
+ force-install = @force_install@
++link-obsolete-rpc = @link_obsolete_rpc@
+
+ # Build tools.
+ CC = @CC@
+diff --git a/configure b/configure
+index 1c5f4adbea..c7cb47d0c2 100755
+--- a/configure
++++ b/configure
+@@ -687,6 +687,7 @@ multi_arch
+ base_machine
+ add_on_subdirs
+ add_ons
++link_obsolete_rpc
+ libc_cv_nss_crypt
+ all_warnings
+ force_install
+@@ -779,6 +780,7 @@ enable_kernel
+ enable_all_warnings
+ enable_multi_arch
+ enable_nss_crypt
++enable_obsolete_rpc
+ with_cpu
+ '
+ ac_precious_vars='build_alias
+@@ -1434,6 +1436,8 @@ Optional Features:
+ --enable-multi-arch enable single DSO with optimizations for multiple
+ architectures
+ --enable-nss-crypt enable libcrypt to use nss
++ --enable-obsolete-rpc build and install the obsolete RPC code for
++ link-time usage
+
+ Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+@@ -3746,6 +3750,20 @@ else
+ fi
+
+
++# Check whether --enable-obsolete-rpc was given.
++if test "${enable_obsolete_rpc+set}" = set; then :
++ enableval=$enable_obsolete_rpc; link_obsolete_rpc=$enableval
++else
++ link_obsolete_rpc=no
++fi
++
++
++
++if test "$link_obsolete_rpc" = yes; then
++ $as_echo "#define LINK_OBSOLETE_RPC 1" >>confdefs.h
++
++fi
++
+ # The way shlib-versions is used to generate soversions.mk uses a
+ # fairly simplistic model for name recognition that can't distinguish
+ # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
+diff --git a/configure.in b/configure.in
+index 19a2c1a0f0..4eb9277e8c 100644
+--- a/configure.in
++++ b/configure.in
+@@ -252,6 +252,17 @@ else
+ fi
+ AC_SUBST(libc_cv_nss_crypt)
+
++AC_ARG_ENABLE([obsolete-rpc],
++ AC_HELP_STRING([--enable-obsolete-rpc],
++ [build and install the obsolete RPC code for link-time usage]),
++ [link_obsolete_rpc=$enableval],
++ [link_obsolete_rpc=no])
++AC_SUBST(link_obsolete_rpc)
++
++if test "$link_obsolete_rpc" = yes; then
++ AC_DEFINE(LINK_OBSOLETE_RPC)
++fi
++
+ # The way shlib-versions is used to generate soversions.mk uses a
+ # fairly simplistic model for name recognition that can't distinguish
+ # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
+diff --git a/include/libc-symbols.h b/include/libc-symbols.h
+index 951e46a6e3..0c3274e253 100644
+--- a/include/libc-symbols.h
++++ b/include/libc-symbols.h
+@@ -556,7 +556,12 @@ for linking")
+ # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+ # define libc_hidden_def(name) hidden_def (name)
+ # define libc_hidden_weak(name) hidden_weak (name)
+-# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
++# ifdef LINK_OBSOLETE_RPC
++ /* libc_hidden_nolink_sunrpc should only get used in sunrpc code. */
++# define libc_hidden_nolink_sunrpc(name, version) hidden_def (name)
++# else
++# define libc_hidden_nolink_sunrpc(name, version) hidden_nolink (name, libc, version)
++# endif
+ # define libc_hidden_ver(local, name) hidden_ver (local, name)
+ # define libc_hidden_data_def(name) hidden_data_def (name)
+ # define libc_hidden_data_weak(name) hidden_data_weak (name)
+diff --git a/nis/Makefile b/nis/Makefile
+index a48753f7a9..b412cee304 100644
+--- a/nis/Makefile
++++ b/nis/Makefile
+@@ -23,6 +23,12 @@ subdir := nis
+
+ aux := nis_hash
+
++include ../Makeconfig
++
++ifeq ($(link-obsolete-rpc),yes)
++headers := $(wildcard rpcsvc/*.[hx])
++endif
++
+ distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
+ nisplus-parser.h nis_xdr.h nss \
+ $(wildcard rpcsvc/*.[hx])
+diff --git a/sunrpc/Makefile b/sunrpc/Makefile
+index e61efd02b3..3b79dcdb72 100644
+--- a/sunrpc/Makefile
++++ b/sunrpc/Makefile
+@@ -60,6 +60,10 @@ generated-dirs := rpcsvc
+
+ include ../Makeconfig
+
++ifeq ($(link-obsolete-rpc),yes)
++headers += $(headers-in-tirpc) $(headers-not-in-tirpc)
++endif
++
+ ifeq ($(versioning),yes)
+ need-export-routines := auth_des auth_unix clnt_gen clnt_perr clnt_tcp \
+ clnt_udp get_myaddr key_call netname pm_getport \
+@@ -73,9 +77,11 @@ routines := auth_none authuxprot bindrsvprt clnt_raw clnt_simp \
+ svc_simple xdr_float xdr_rec publickey authdes_prot \
+ des_crypt des_impl des_soft key_prot openchild rtime svcauth_des \
+ clnt_unix svc_unix create_xid $(need-export-routines)
++ifneq ($(link-obsolete-rpc),yes)
+ # We only add the RPC for compatibility to libc.so.
+ shared-only-routines = $(routines)
+ endif
++endif
+
+ # We do not build rpcinfo anymore. It is not needed for a bootstrap
+ # and not wanted on complete systems.
+diff --git a/sunrpc/auth_des.c b/sunrpc/auth_des.c
+index 96bbcfc328..0408d60826 100644
+--- a/sunrpc/auth_des.c
++++ b/sunrpc/auth_des.c
+@@ -117,7 +117,7 @@ authdes_create (const char *servername, u_int window,
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (authdes_create)
+ #else
+-libc_hidden_nolink (authdes_create, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (authdes_create, GLIBC_2_1)
+ #endif
+
+ AUTH *
+@@ -211,7 +211,7 @@ failed:
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (authdes_pk_create)
+ #else
+-libc_hidden_nolink (authdes_pk_create, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (authdes_pk_create, GLIBC_2_1)
+ #endif
+
+ /*
+diff --git a/sunrpc/auth_none.c b/sunrpc/auth_none.c
+index 5f252a9544..3af5966794 100644
+--- a/sunrpc/auth_none.c
++++ b/sunrpc/auth_none.c
+@@ -95,7 +95,7 @@ authnone_create (void)
+ __libc_once (authnone_private_guard, authnone_create_once);
+ return &authnone_private.no_client;
+ }
+-libc_hidden_nolink (authnone_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (authnone_create, GLIBC_2_0)
+
+ static bool_t
+ authnone_marshal (AUTH *client, XDR *xdrs)
+diff --git a/sunrpc/auth_unix.c b/sunrpc/auth_unix.c
+index d3b5dc7dee..68b42d7b1f 100644
+--- a/sunrpc/auth_unix.c
++++ b/sunrpc/auth_unix.c
+@@ -149,7 +149,7 @@ no_memory:
+ marshal_new_auth (auth);
+ return auth;
+ }
+-libc_hidden_nolink (authunix_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (authunix_create, GLIBC_2_0)
+
+ /*
+ * Returns an auth handle with parameters determined by doing lots of
+@@ -216,7 +216,7 @@ authunix_create_default (void)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (authunix_create_default)
+ #else
+-libc_hidden_nolink (authunix_create_default, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (authunix_create_default, GLIBC_2_0)
+ #endif
+
+ /*
+diff --git a/sunrpc/authdes_prot.c b/sunrpc/authdes_prot.c
+index 0a25bac143..164c1223ca 100644
+--- a/sunrpc/authdes_prot.c
++++ b/sunrpc/authdes_prot.c
+@@ -63,7 +63,7 @@ xdr_authdes_cred (XDR *xdrs, struct authdes_cred *cred)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_authdes_cred, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_authdes_cred, GLIBC_2_1)
+
+
+ bool_t
+@@ -78,4 +78,4 @@ xdr_authdes_verf (register XDR *xdrs, register struct authdes_verf *verf)
+ sizeof (verf->adv_int_u)));
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_authdes_verf, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_authdes_verf, GLIBC_2_1)
+diff --git a/sunrpc/authuxprot.c b/sunrpc/authuxprot.c
+index 64da1799e0..d37faee0c7 100644
+--- a/sunrpc/authuxprot.c
++++ b/sunrpc/authuxprot.c
+@@ -63,4 +63,4 @@ xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p)
+ }
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_authunix_parms, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_authunix_parms, GLIBC_2_0)
+diff --git a/sunrpc/clnt_gen.c b/sunrpc/clnt_gen.c
+index 2b7096cf20..df34672d72 100644
+--- a/sunrpc/clnt_gen.c
++++ b/sunrpc/clnt_gen.c
+@@ -175,5 +175,5 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (clnt_create)
+ #else
+-libc_hidden_nolink (clnt_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnt_create, GLIBC_2_0)
+ #endif
+diff --git a/sunrpc/clnt_perr.c b/sunrpc/clnt_perr.c
+index 175370ebfc..b4f84c92e8 100644
+--- a/sunrpc/clnt_perr.c
++++ b/sunrpc/clnt_perr.c
+@@ -127,7 +127,7 @@ clnt_sperror (CLIENT * rpch, const char *msg)
+
+ return str;
+ }
+-libc_hidden_nolink (clnt_sperror, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnt_sperror, GLIBC_2_0)
+
+ void
+ clnt_perror (CLIENT * rpch, const char *msg)
+@@ -137,7 +137,7 @@ clnt_perror (CLIENT * rpch, const char *msg)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (clnt_perror)
+ #else
+-libc_hidden_nolink (clnt_perror, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnt_perror, GLIBC_2_0)
+ #endif
+
+
+@@ -270,7 +270,7 @@ clnt_perrno (enum clnt_stat num)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (clnt_perrno)
+ #else
+-libc_hidden_nolink (clnt_perrno, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnt_perrno, GLIBC_2_0)
+ #endif
+
+ char *
+@@ -308,7 +308,7 @@ clnt_spcreateerror (const char *msg)
+
+ return str;
+ }
+-libc_hidden_nolink (clnt_spcreateerror, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnt_spcreateerror, GLIBC_2_0)
+
+ void
+ clnt_pcreateerror (const char *msg)
+@@ -318,7 +318,7 @@ clnt_pcreateerror (const char *msg)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (clnt_pcreateerror)
+ #else
+-libc_hidden_nolink (clnt_pcreateerror, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnt_pcreateerror, GLIBC_2_0)
+ #endif
+
+ struct auth_errtab
+diff --git a/sunrpc/clnt_raw.c b/sunrpc/clnt_raw.c
+index 95e3eae988..4004c6b6a8 100644
+--- a/sunrpc/clnt_raw.c
++++ b/sunrpc/clnt_raw.c
+@@ -129,7 +129,7 @@ clntraw_create (u_long prog, u_long vers)
+ client->cl_auth = authnone_create ();
+ return client;
+ }
+-libc_hidden_nolink (clntraw_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clntraw_create, GLIBC_2_0)
+
+ static enum clnt_stat
+ clntraw_call (h, proc, xargs, argsp, xresults, resultsp, timeout)
+diff --git a/sunrpc/clnt_simp.c b/sunrpc/clnt_simp.c
+index d2dd3b307a..d612df09a0 100644
+--- a/sunrpc/clnt_simp.c
++++ b/sunrpc/clnt_simp.c
+@@ -139,7 +139,7 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum,
+ crp->valid = 0;
+ return (int) clnt_stat;
+ }
+-libc_hidden_nolink (callrpc, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (callrpc, GLIBC_2_0)
+
+ #ifdef _RPC_THREAD_SAFE_
+ void
+diff --git a/sunrpc/clnt_tcp.c b/sunrpc/clnt_tcp.c
+index d1fc43dbfd..6bd4c8c0cd 100644
+--- a/sunrpc/clnt_tcp.c
++++ b/sunrpc/clnt_tcp.c
+@@ -220,7 +220,7 @@ fooy:
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (clnttcp_create)
+ #else
+-libc_hidden_nolink (clnttcp_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnttcp_create, GLIBC_2_0)
+ #endif
+
+ static enum clnt_stat
+diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c
+index 294e13a58c..7ecf2ef5a5 100644
+--- a/sunrpc/clnt_udp.c
++++ b/sunrpc/clnt_udp.c
+@@ -239,7 +239,7 @@ fooy:
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (__libc_clntudp_bufcreate)
+ #else
+-libc_hidden_nolink (__libc_clntudp_bufcreate, GLIBC_PRIVATE)
++libc_hidden_nolink_sunrpc (__libc_clntudp_bufcreate, GLIBC_PRIVATE)
+ #endif
+
+ CLIENT *
+@@ -250,7 +250,7 @@ clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version,
+ return __libc_clntudp_bufcreate (raddr, program, version, wait,
+ sockp, sendsz, recvsz, 0);
+ }
+-libc_hidden_nolink (clntudp_bufcreate, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clntudp_bufcreate, GLIBC_2_0)
+
+ CLIENT *
+ clntudp_create (raddr, program, version, wait, sockp)
+@@ -266,7 +266,7 @@ clntudp_create (raddr, program, version, wait, sockp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (clntudp_create)
+ #else
+-libc_hidden_nolink (clntudp_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clntudp_create, GLIBC_2_0)
+ #endif
+
+ static int
+diff --git a/sunrpc/clnt_unix.c b/sunrpc/clnt_unix.c
+index 282127bb8b..776ceab484 100644
+--- a/sunrpc/clnt_unix.c
++++ b/sunrpc/clnt_unix.c
+@@ -200,7 +200,7 @@ fooy:
+ mem_free ((caddr_t) h, sizeof (CLIENT));
+ return (CLIENT *) NULL;
+ }
+-libc_hidden_nolink (clntunix_create, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (clntunix_create, GLIBC_2_1)
+
+ static enum clnt_stat
+ clntunix_call (h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout)
+diff --git a/sunrpc/des_crypt.c b/sunrpc/des_crypt.c
+index 8745900b82..22a34b7f3a 100644
+--- a/sunrpc/des_crypt.c
++++ b/sunrpc/des_crypt.c
+@@ -102,7 +102,7 @@ cbc_crypt (char *key, char *buf, unsigned int len, unsigned int mode,
+ COPY8 (dp.des_ivec, ivec);
+ return err;
+ }
+-libc_hidden_nolink (cbc_crypt, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (cbc_crypt, GLIBC_2_1)
+
+ /*
+ * ECB mode encryption
+@@ -115,4 +115,4 @@ ecb_crypt (char *key, char *buf, unsigned int len, unsigned int mode)
+ dp.des_mode = ECB;
+ return common_crypt (key, buf, len, mode, &dp);
+ }
+-libc_hidden_nolink (ecb_crypt, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (ecb_crypt, GLIBC_2_1)
+diff --git a/sunrpc/des_soft.c b/sunrpc/des_soft.c
+index 27d918c64d..cddef5d76b 100644
+--- a/sunrpc/des_soft.c
++++ b/sunrpc/des_soft.c
+@@ -70,4 +70,4 @@ des_setparity (char *p)
+ p++;
+ }
+ }
+-libc_hidden_nolink (des_setparity, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (des_setparity, GLIBC_2_1)
+diff --git a/sunrpc/get_myaddr.c b/sunrpc/get_myaddr.c
+index def5b7a74a..24407b53ec 100644
+--- a/sunrpc/get_myaddr.c
++++ b/sunrpc/get_myaddr.c
+@@ -99,5 +99,5 @@ get_myaddress (struct sockaddr_in *addr)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (get_myaddress)
+ #else
+-libc_hidden_nolink (get_myaddress, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (get_myaddress, GLIBC_2_0)
+ #endif
+diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c
+index 6d08bf8e80..e0a076b47f 100644
+--- a/sunrpc/key_call.c
++++ b/sunrpc/key_call.c
+@@ -80,7 +80,7 @@ key_setsecret (char *secretkey)
+ }
+ return 0;
+ }
+-libc_hidden_nolink (key_setsecret, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_setsecret, GLIBC_2_1)
+
+ /* key_secretkey_is_set() returns 1 if the keyserver has a secret key
+ * stored for the caller's effective uid; it returns 0 otherwise
+@@ -109,7 +109,7 @@ key_secretkey_is_set (void)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (key_secretkey_is_set)
+ #else
+-libc_hidden_nolink (key_secretkey_is_set, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_secretkey_is_set, GLIBC_2_1)
+ #endif
+
+ int
+@@ -133,7 +133,7 @@ key_encryptsession (char *remotename, des_block *deskey)
+ *deskey = res.cryptkeyres_u.deskey;
+ return 0;
+ }
+-libc_hidden_nolink (key_encryptsession, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_encryptsession, GLIBC_2_1)
+
+ int
+ key_decryptsession (char *remotename, des_block *deskey)
+@@ -155,7 +155,7 @@ key_decryptsession (char *remotename, des_block *deskey)
+ *deskey = res.cryptkeyres_u.deskey;
+ return 0;
+ }
+-libc_hidden_nolink (key_decryptsession, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_decryptsession, GLIBC_2_1)
+
+ int
+ key_encryptsession_pk (char *remotename, netobj *remotekey,
+@@ -180,7 +180,7 @@ key_encryptsession_pk (char *remotename, netobj *remotekey,
+ *deskey = res.cryptkeyres_u.deskey;
+ return 0;
+ }
+-libc_hidden_nolink (key_encryptsession_pk, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_encryptsession_pk, GLIBC_2_1)
+
+ int
+ key_decryptsession_pk (char *remotename, netobj *remotekey,
+@@ -205,7 +205,7 @@ key_decryptsession_pk (char *remotename, netobj *remotekey,
+ *deskey = res.cryptkeyres_u.deskey;
+ return 0;
+ }
+-libc_hidden_nolink (key_decryptsession_pk, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_decryptsession_pk, GLIBC_2_1)
+
+ int
+ key_gendes (des_block *key)
+@@ -239,7 +239,7 @@ key_gendes (des_block *key)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (key_gendes)
+ #else
+-libc_hidden_nolink (key_gendes, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_gendes, GLIBC_2_1)
+ #endif
+
+ int
+@@ -259,7 +259,7 @@ key_setnet (struct key_netstarg *arg)
+ }
+ return 1;
+ }
+-libc_hidden_nolink (key_setnet, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_setnet, GLIBC_2_1)
+
+ int
+ key_get_conv (char *pkey, des_block *deskey)
+@@ -278,7 +278,7 @@ key_get_conv (char *pkey, des_block *deskey)
+ *deskey = res.cryptkeyres_u.deskey;
+ return 0;
+ }
+-libc_hidden_nolink (key_get_conv, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (key_get_conv, GLIBC_2_1)
+
+ /*
+ * Hack to allow the keyserver to use AUTH_DES (for authenticated
+diff --git a/sunrpc/key_prot.c b/sunrpc/key_prot.c
+index dd73f5e3cb..2899c9a448 100644
+--- a/sunrpc/key_prot.c
++++ b/sunrpc/key_prot.c
+@@ -38,7 +38,7 @@ xdr_keystatus (XDR * xdrs, keystatus * objp)
+
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_keystatus, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_keystatus, GLIBC_2_0)
+
+ bool_t
+ xdr_keybuf (XDR * xdrs, keybuf objp)
+@@ -48,7 +48,7 @@ xdr_keybuf (XDR * xdrs, keybuf objp)
+
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_keybuf, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_keybuf, GLIBC_2_0)
+
+ bool_t
+ xdr_netnamestr (XDR * xdrs, netnamestr * objp)
+@@ -58,7 +58,7 @@ xdr_netnamestr (XDR * xdrs, netnamestr * objp)
+
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_netnamestr, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_netnamestr, GLIBC_2_1)
+
+ bool_t
+ xdr_cryptkeyarg (XDR * xdrs, cryptkeyarg * objp)
+@@ -71,7 +71,7 @@ xdr_cryptkeyarg (XDR * xdrs, cryptkeyarg * objp)
+
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_cryptkeyarg, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_cryptkeyarg, GLIBC_2_0)
+
+ bool_t
+ xdr_cryptkeyarg2 (XDR * xdrs, cryptkeyarg2 * objp)
+@@ -84,7 +84,7 @@ xdr_cryptkeyarg2 (XDR * xdrs, cryptkeyarg2 * objp)
+ return FALSE;
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_cryptkeyarg2, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_cryptkeyarg2, GLIBC_2_0)
+
+ bool_t
+ xdr_cryptkeyres (XDR * xdrs, cryptkeyres * objp)
+@@ -102,7 +102,7 @@ xdr_cryptkeyres (XDR * xdrs, cryptkeyres * objp)
+ }
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_cryptkeyres, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_cryptkeyres, GLIBC_2_0)
+
+ bool_t
+ xdr_unixcred (XDR * xdrs, unixcred * objp)
+@@ -117,7 +117,7 @@ xdr_unixcred (XDR * xdrs, unixcred * objp)
+ return FALSE;
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_unixcred, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_unixcred, GLIBC_2_1)
+
+ bool_t
+ xdr_getcredres (XDR * xdrs, getcredres * objp)
+@@ -135,7 +135,7 @@ xdr_getcredres (XDR * xdrs, getcredres * objp)
+ }
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_getcredres, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_getcredres, GLIBC_2_1)
+
+ bool_t
+ xdr_key_netstarg (XDR * xdrs, key_netstarg * objp)
+@@ -148,7 +148,7 @@ xdr_key_netstarg (XDR * xdrs, key_netstarg * objp)
+ return FALSE;
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_key_netstarg, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_key_netstarg, GLIBC_2_0)
+
+ bool_t
+ xdr_key_netstres (XDR * xdrs, key_netstres * objp)
+@@ -166,4 +166,4 @@ xdr_key_netstres (XDR * xdrs, key_netstres * objp)
+ }
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_key_netstres, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_key_netstres, GLIBC_2_0)
+diff --git a/sunrpc/netname.c b/sunrpc/netname.c
+index 0b4980074c..197d503eae 100644
+--- a/sunrpc/netname.c
++++ b/sunrpc/netname.c
+@@ -54,7 +54,7 @@ user2netname (char netname[MAXNETNAMELEN + 1], const uid_t uid,
+ netname[i - 1] = '\0';
+ return 1;
+ }
+-libc_hidden_nolink (user2netname, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (user2netname, GLIBC_2_1)
+
+ int
+ host2netname (char netname[MAXNETNAMELEN + 1], const char *host,
+@@ -118,7 +118,7 @@ host2netname (char netname[MAXNETNAMELEN + 1], const char *host,
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (host2netname)
+ #else
+-libc_hidden_nolink (host2netname, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (host2netname, GLIBC_2_1)
+ #endif
+
+ int
+@@ -134,7 +134,7 @@ getnetname (char name[MAXNETNAMELEN + 1])
+ dummy = user2netname (name, uid, NULL);
+ return (dummy);
+ }
+-libc_hidden_nolink (getnetname, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (getnetname, GLIBC_2_1)
+
+ /* Type of the lookup function for netname2user. */
+ typedef int (*netname2user_function) (const char netname[MAXNETNAMELEN + 1],
+@@ -187,7 +187,7 @@ netname2user (const char netname[MAXNETNAMELEN + 1], uid_t * uidp, gid_t * gidp,
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (netname2user)
+ #else
+-libc_hidden_nolink (netname2user, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (netname2user, GLIBC_2_1)
+ #endif
+
+ int
+@@ -214,4 +214,4 @@ netname2host (const char netname[MAXNETNAMELEN + 1], char *hostname,
+
+ return 1;
+ }
+-libc_hidden_nolink (netname2host, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (netname2host, GLIBC_2_1)
+diff --git a/sunrpc/pm_getmaps.c b/sunrpc/pm_getmaps.c
+index 6b61d324f9..6f7ad10ef6 100644
+--- a/sunrpc/pm_getmaps.c
++++ b/sunrpc/pm_getmaps.c
+@@ -84,4 +84,4 @@ pmap_getmaps (struct sockaddr_in *address)
+ address->sin_port = 0;
+ return head;
+ }
+-libc_hidden_nolink (pmap_getmaps, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (pmap_getmaps, GLIBC_2_0)
+diff --git a/sunrpc/pm_getport.c b/sunrpc/pm_getport.c
+index 58974a5661..f10f87250d 100644
+--- a/sunrpc/pm_getport.c
++++ b/sunrpc/pm_getport.c
+@@ -142,7 +142,7 @@ __libc_rpc_getport (address, program, version, protocol, timeout_sec,
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (__libc_rpc_getport)
+ #else
+-libc_hidden_nolink (__libc_rpc_getport, GLIBC_PRIVATE)
++libc_hidden_nolink_sunrpc (__libc_rpc_getport, GLIBC_PRIVATE)
+ #endif
+
+
+@@ -160,4 +160,4 @@ pmap_getport (address, program, version, protocol)
+ {
+ return __libc_rpc_getport (address, program, version, protocol, 5, 60);
+ }
+-libc_hidden_nolink (pmap_getport, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (pmap_getport, GLIBC_2_0)
+diff --git a/sunrpc/pmap_clnt.c b/sunrpc/pmap_clnt.c
+index 36479f0e5c..5d7d185766 100644
+--- a/sunrpc/pmap_clnt.c
++++ b/sunrpc/pmap_clnt.c
+@@ -131,7 +131,7 @@ pmap_set (u_long program, u_long version, int protocol, u_short port)
+ /* (void)close(socket); CLNT_DESTROY closes it */
+ return rslt;
+ }
+-libc_hidden_nolink (pmap_set, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (pmap_set, GLIBC_2_0)
+
+ /*
+ * Remove the mapping between program,version and port.
+@@ -162,4 +162,4 @@ pmap_unset (u_long program, u_long version)
+ /* (void)close(socket); CLNT_DESTROY already closed it */
+ return rslt;
+ }
+-libc_hidden_nolink (pmap_unset, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (pmap_unset, GLIBC_2_0)
+diff --git a/sunrpc/pmap_prot.c b/sunrpc/pmap_prot.c
+index 5a2e052728..8df41dc5f2 100644
+--- a/sunrpc/pmap_prot.c
++++ b/sunrpc/pmap_prot.c
+@@ -49,4 +49,4 @@ xdr_pmap (xdrs, regs)
+ return xdr_u_long (xdrs, &regs->pm_port);
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_pmap, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_pmap, GLIBC_2_0)
+diff --git a/sunrpc/pmap_prot2.c b/sunrpc/pmap_prot2.c
+index 3213898ce8..57b0800178 100644
+--- a/sunrpc/pmap_prot2.c
++++ b/sunrpc/pmap_prot2.c
+@@ -110,4 +110,4 @@ xdr_pmaplist (xdrs, rp)
+ rp = freeing ? &next : &((*rp)->pml_next);
+ }
+ }
+-libc_hidden_nolink (xdr_pmaplist, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_pmaplist, GLIBC_2_0)
+diff --git a/sunrpc/pmap_rmt.c b/sunrpc/pmap_rmt.c
+index 16f322773e..fd8de85589 100644
+--- a/sunrpc/pmap_rmt.c
++++ b/sunrpc/pmap_rmt.c
+@@ -104,7 +104,7 @@ pmap_rmtcall (addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_p
+ addr->sin_port = 0;
+ return stat;
+ }
+-libc_hidden_nolink (pmap_rmtcall, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (pmap_rmtcall, GLIBC_2_0)
+
+
+ /*
+@@ -137,7 +137,7 @@ xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap)
+ }
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_rmtcall_args, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_rmtcall_args, GLIBC_2_0)
+
+ /*
+ * XDR remote call results
+@@ -160,7 +160,7 @@ xdr_rmtcallres (xdrs, crp)
+ }
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_rmtcallres, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_rmtcallres, GLIBC_2_0)
+
+
+ /*
+@@ -388,4 +388,4 @@ done_broad:
+ AUTH_DESTROY (unix_auth);
+ return stat;
+ }
+-libc_hidden_nolink (clnt_broadcast, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (clnt_broadcast, GLIBC_2_0)
+diff --git a/sunrpc/publickey.c b/sunrpc/publickey.c
+index 4d0b09874c..089b544953 100644
+--- a/sunrpc/publickey.c
++++ b/sunrpc/publickey.c
+@@ -75,7 +75,7 @@ getpublickey (const char *name, char *key)
+
+ return status == NSS_STATUS_SUCCESS;
+ }
+-libc_hidden_nolink (getpublickey, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (getpublickey, GLIBC_2_0)
+
+
+ int
+@@ -118,4 +118,4 @@ getsecretkey (const char *name, char *key, const char *passwd)
+
+ return status == NSS_STATUS_SUCCESS;
+ }
+-libc_hidden_nolink (getsecretkey, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (getsecretkey, GLIBC_2_0)
+diff --git a/sunrpc/rpc_cmsg.c b/sunrpc/rpc_cmsg.c
+index ed70104b68..62d95fcc83 100644
+--- a/sunrpc/rpc_cmsg.c
++++ b/sunrpc/rpc_cmsg.c
+@@ -194,4 +194,4 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
+ return xdr_opaque_auth (xdrs, &(cmsg->rm_call.cb_verf));
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_callmsg, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_callmsg, GLIBC_2_0)
+diff --git a/sunrpc/rpc_common.c b/sunrpc/rpc_common.c
+index 44b4b38f4d..710191163c 100644
+--- a/sunrpc/rpc_common.c
++++ b/sunrpc/rpc_common.c
+@@ -45,7 +45,7 @@
+ section but we cannot add const to the type because this isn't how
+ the variable is declared. So we use the section attribute. */
+ struct opaque_auth _null_auth __attribute__ ((nocommon));
+-libc_hidden_nolink (_null_auth, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (_null_auth, GLIBC_2_0)
+ fd_set svc_fdset;
+ struct rpc_createerr rpc_createerr;
+ struct pollfd *svc_pollfd;
+diff --git a/sunrpc/rpc_dtable.c b/sunrpc/rpc_dtable.c
+index 9bee215496..81ddf8f55a 100644
+--- a/sunrpc/rpc_dtable.c
++++ b/sunrpc/rpc_dtable.c
+@@ -46,4 +46,4 @@ _rpc_dtablesize (void)
+
+ return size;
+ }
+-libc_hidden_nolink (_rpc_dtablesize, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (_rpc_dtablesize, GLIBC_2_0)
+diff --git a/sunrpc/rpc_prot.c b/sunrpc/rpc_prot.c
+index 9a23cc1b02..dc24f3673b 100644
+--- a/sunrpc/rpc_prot.c
++++ b/sunrpc/rpc_prot.c
+@@ -57,7 +57,7 @@ xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap)
+ &ap->oa_length, MAX_AUTH_BYTES);
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_opaque_auth, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_opaque_auth, GLIBC_2_0)
+
+ /*
+ * XDR a DES block
+@@ -67,7 +67,7 @@ xdr_des_block (XDR *xdrs, des_block *blkp)
+ {
+ return xdr_opaque (xdrs, (caddr_t) blkp, sizeof (des_block));
+ }
+-libc_hidden_nolink (xdr_des_block, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_des_block, GLIBC_2_0)
+
+ /* * * * * * * * * * * * * * XDR RPC MESSAGE * * * * * * * * * * * * * * * */
+
+@@ -95,7 +95,7 @@ xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar)
+ }
+ return TRUE; /* TRUE => open ended set of problems */
+ }
+-libc_hidden_nolink (xdr_accepted_reply, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_accepted_reply, GLIBC_2_0)
+
+ /*
+ * XDR the MSG_DENIED part of a reply message union
+@@ -118,7 +118,7 @@ xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr)
+ }
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_rejected_reply, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_rejected_reply, GLIBC_2_0)
+
+ static const struct xdr_discrim reply_dscrm[3] =
+ {
+@@ -142,7 +142,7 @@ xdr_replymsg (xdrs, rmsg)
+ NULL_xdrproc_t);
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_replymsg, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_replymsg, GLIBC_2_0)
+
+
+ /*
+@@ -167,7 +167,7 @@ xdr_callhdr (xdrs, cmsg)
+ return xdr_u_long (xdrs, &(cmsg->rm_call.cb_vers));
+ return FALSE;
+ }
+-libc_hidden_nolink (xdr_callhdr, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_callhdr, GLIBC_2_0)
+
+ /* ************************** Client utility routine ************* */
+
+@@ -277,4 +277,4 @@ _seterr_reply (struct rpc_msg *msg,
+ break;
+ }
+ }
+-libc_hidden_nolink (_seterr_reply, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (_seterr_reply, GLIBC_2_0)
+diff --git a/sunrpc/rpc_thread.c b/sunrpc/rpc_thread.c
+index ac4c18fcee..94d9f1fd80 100644
+--- a/sunrpc/rpc_thread.c
++++ b/sunrpc/rpc_thread.c
+@@ -97,7 +97,7 @@ __rpc_thread_svc_fdset (void)
+ return &svc_fdset;
+ return &tvp->svc_fdset_s;
+ }
+-libc_hidden_nolink (__rpc_thread_svc_fdset, GLIBC_2_2_3)
++libc_hidden_nolink_sunrpc (__rpc_thread_svc_fdset, GLIBC_2_2_3)
+
+ struct rpc_createerr *
+ __rpc_thread_createerr (void)
+@@ -109,7 +109,7 @@ __rpc_thread_createerr (void)
+ return &rpc_createerr;
+ return &tvp->rpc_createerr_s;
+ }
+-libc_hidden_nolink (__rpc_thread_createerr, GLIBC_2_2_3)
++libc_hidden_nolink_sunrpc (__rpc_thread_createerr, GLIBC_2_2_3)
+
+ struct pollfd **
+ __rpc_thread_svc_pollfd (void)
+@@ -124,7 +124,7 @@ __rpc_thread_svc_pollfd (void)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (__rpc_thread_svc_pollfd)
+ #else
+-libc_hidden_nolink (__rpc_thread_svc_pollfd, GLIBC_2_2_3)
++libc_hidden_nolink_sunrpc (__rpc_thread_svc_pollfd, GLIBC_2_2_3)
+ #endif
+
+ int *
+@@ -140,7 +140,7 @@ __rpc_thread_svc_max_pollfd (void)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (__rpc_thread_svc_max_pollfd)
+ #else
+-libc_hidden_nolink (__rpc_thread_svc_max_pollfd, GLIBC_2_2_3)
++libc_hidden_nolink_sunrpc (__rpc_thread_svc_max_pollfd, GLIBC_2_2_3)
+ #endif
+
+ #endif /* _RPC_THREAD_SAFE_ */
+diff --git a/sunrpc/rtime.c b/sunrpc/rtime.c
+index 8506df554c..bcb280b48f 100644
+--- a/sunrpc/rtime.c
++++ b/sunrpc/rtime.c
+@@ -140,4 +140,4 @@ rtime (struct sockaddr_in *addrp, struct rpc_timeval *timep,
+ timep->tv_usec = 0;
+ return 0;
+ }
+-libc_hidden_nolink (rtime, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (rtime, GLIBC_2_1)
+diff --git a/sunrpc/svc.c b/sunrpc/svc.c
+index e1f4a322e8..103770a42c 100644
+--- a/sunrpc/svc.c
++++ b/sunrpc/svc.c
+@@ -115,7 +115,7 @@ xprt_register (SVCXPRT *xprt)
+ POLLRDNORM | POLLRDBAND);
+ }
+ }
+-libc_hidden_nolink (xprt_register, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xprt_register, GLIBC_2_0)
+
+ /* De-activate a transport handle. */
+ void
+@@ -139,7 +139,7 @@ xprt_unregister (SVCXPRT *xprt)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xprt_unregister)
+ #else
+-libc_hidden_nolink (xprt_unregister, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xprt_unregister, GLIBC_2_0)
+ #endif
+
+
+@@ -218,7 +218,7 @@ pmap_it:
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svc_register)
+ #else
+-libc_hidden_nolink (svc_register, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svc_register, GLIBC_2_0)
+ #endif
+
+ /* Remove a service program from the callout list. */
+@@ -242,7 +242,7 @@ svc_unregister (rpcprog_t prog, rpcvers_t vers)
+ if (! svc_is_mapped (prog, vers))
+ pmap_unset (prog, vers);
+ }
+-libc_hidden_nolink (svc_unregister, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svc_unregister, GLIBC_2_0)
+
+ /* ******************* REPLY GENERATION ROUTINES ************ */
+
+@@ -264,7 +264,7 @@ svc_sendreply (register SVCXPRT *xprt, xdrproc_t xdr_results,
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svc_sendreply)
+ #else
+-libc_hidden_nolink (svc_sendreply, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svc_sendreply, GLIBC_2_0)
+ #endif
+
+ /* No procedure error reply */
+@@ -282,7 +282,7 @@ svcerr_noproc (register SVCXPRT *xprt)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svcerr_noproc)
+ #else
+-libc_hidden_nolink (svcerr_noproc, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcerr_noproc, GLIBC_2_0)
+ #endif
+
+ /* Can't decode args error reply */
+@@ -300,7 +300,7 @@ svcerr_decode (register SVCXPRT *xprt)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svcerr_decode)
+ #else
+-libc_hidden_nolink (svcerr_decode, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcerr_decode, GLIBC_2_0)
+ #endif
+
+ /* Some system error */
+@@ -318,7 +318,7 @@ svcerr_systemerr (register SVCXPRT *xprt)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svcerr_systemerr)
+ #else
+-libc_hidden_nolink (svcerr_systemerr, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcerr_systemerr, GLIBC_2_0)
+ #endif
+
+ /* Authentication error reply */
+@@ -333,7 +333,7 @@ svcerr_auth (SVCXPRT *xprt, enum auth_stat why)
+ rply.rjcted_rply.rj_why = why;
+ SVC_REPLY (xprt, &rply);
+ }
+-libc_hidden_nolink (svcerr_auth, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcerr_auth, GLIBC_2_0)
+
+ /* Auth too weak error reply */
+ void
+@@ -341,7 +341,7 @@ svcerr_weakauth (SVCXPRT *xprt)
+ {
+ svcerr_auth (xprt, AUTH_TOOWEAK);
+ }
+-libc_hidden_nolink (svcerr_weakauth, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcerr_weakauth, GLIBC_2_0)
+
+ /* Program unavailable error reply */
+ void
+@@ -355,7 +355,7 @@ svcerr_noprog (register SVCXPRT *xprt)
+ rply.acpted_rply.ar_stat = PROG_UNAVAIL;
+ SVC_REPLY (xprt, &rply);
+ }
+-libc_hidden_nolink (svcerr_noprog, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcerr_noprog, GLIBC_2_0)
+
+ /* Program version mismatch error reply */
+ void
+@@ -372,7 +372,7 @@ svcerr_progvers (register SVCXPRT *xprt, rpcvers_t low_vers,
+ rply.acpted_rply.ar_vers.high = high_vers;
+ SVC_REPLY (xprt, &rply);
+ }
+-libc_hidden_nolink (svcerr_progvers, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcerr_progvers, GLIBC_2_0)
+
+ /* ******************* SERVER INPUT STUFF ******************* */
+
+@@ -401,7 +401,7 @@ svc_getreq (int rdfds)
+ readfds.fds_bits[0] = rdfds;
+ svc_getreqset (&readfds);
+ }
+-libc_hidden_nolink (svc_getreq, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svc_getreq, GLIBC_2_0)
+
+ void
+ svc_getreqset (fd_set *readfds)
+@@ -420,7 +420,7 @@ svc_getreqset (fd_set *readfds)
+ for (mask = *maskp++; (bit = ffsl (mask)); mask ^= (1L << (bit - 1)))
+ svc_getreq_common (sock + bit - 1);
+ }
+-libc_hidden_nolink (svc_getreqset, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svc_getreqset, GLIBC_2_0)
+
+ void
+ svc_getreq_poll (struct pollfd *pfdp, int pollretval)
+@@ -449,7 +449,7 @@ svc_getreq_poll (struct pollfd *pfdp, int pollretval)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svc_getreq_poll)
+ #else
+-libc_hidden_nolink (svc_getreq_poll, GLIBC_2_2)
++libc_hidden_nolink_sunrpc (svc_getreq_poll, GLIBC_2_2)
+ #endif
+
+
+@@ -542,7 +542,7 @@ svc_getreq_common (const int fd)
+ }
+ while (stat == XPRT_MOREREQS);
+ }
+-libc_hidden_nolink (svc_getreq_common, GLIBC_2_2)
++libc_hidden_nolink_sunrpc (svc_getreq_common, GLIBC_2_2)
+
+ #ifdef _RPC_THREAD_SAFE_
+
+diff --git a/sunrpc/svc_auth.c b/sunrpc/svc_auth.c
+index facbb13982..f33bda2f20 100644
+--- a/sunrpc/svc_auth.c
++++ b/sunrpc/svc_auth.c
+@@ -105,7 +105,7 @@ _authenticate (register struct svc_req *rqst, struct rpc_msg *msg)
+
+ return AUTH_REJECTEDCRED;
+ }
+-libc_hidden_nolink (_authenticate, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (_authenticate, GLIBC_2_1)
+
+ static enum auth_stat
+ _svcauth_null (struct svc_req *rqst, struct rpc_msg *msg)
+diff --git a/sunrpc/svc_raw.c b/sunrpc/svc_raw.c
+index 90f5d96e63..7d885574af 100644
+--- a/sunrpc/svc_raw.c
++++ b/sunrpc/svc_raw.c
+@@ -88,7 +88,7 @@ svcraw_create (void)
+ xdrmem_create (&srp->xdr_stream, srp->_raw_buf, UDPMSGSIZE, XDR_FREE);
+ return &srp->server;
+ }
+-libc_hidden_nolink (svcraw_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcraw_create, GLIBC_2_0)
+
+ static enum xprt_stat
+ svcraw_stat (SVCXPRT *xprt)
+diff --git a/sunrpc/svc_run.c b/sunrpc/svc_run.c
+index 09f40dd188..90dfc94056 100644
+--- a/sunrpc/svc_run.c
++++ b/sunrpc/svc_run.c
+@@ -46,7 +46,7 @@ svc_exit (void)
+ svc_pollfd = NULL;
+ svc_max_pollfd = 0;
+ }
+-libc_hidden_nolink (svc_exit, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svc_exit, GLIBC_2_0)
+
+ void
+ svc_run (void)
+@@ -104,5 +104,5 @@ svc_run (void)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svc_run)
+ #else
+-libc_hidden_nolink (svc_run, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svc_run, GLIBC_2_0)
+ #endif
+diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c
+index e0515322a5..eb615494d8 100644
+--- a/sunrpc/svc_tcp.c
++++ b/sunrpc/svc_tcp.c
+@@ -187,7 +187,7 @@ svctcp_create (int sock, u_int sendsize, u_int recvsize)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svctcp_create)
+ #else
+-libc_hidden_nolink (svctcp_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svctcp_create, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -199,7 +199,7 @@ svcfd_create (int fd, u_int sendsize, u_int recvsize)
+ {
+ return makefd_xprt (fd, sendsize, recvsize);
+ }
+-libc_hidden_nolink (svcfd_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcfd_create, GLIBC_2_0)
+
+ static SVCXPRT *
+ internal_function
+diff --git a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c
+index 04c8407e64..6c4d75a814 100644
+--- a/sunrpc/svc_udp.c
++++ b/sunrpc/svc_udp.c
+@@ -184,7 +184,7 @@ svcudp_create: xp_pad is too small for IP_PKTINFO\n"));
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svcudp_bufcreate)
+ #else
+-libc_hidden_nolink (svcudp_bufcreate, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcudp_bufcreate, GLIBC_2_0)
+ #endif
+
+ SVCXPRT *
+@@ -196,7 +196,7 @@ svcudp_create (sock)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (svcudp_create)
+ #else
+-libc_hidden_nolink (svcudp_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcudp_create, GLIBC_2_0)
+ #endif
+
+ static enum xprt_stat
+@@ -500,7 +500,7 @@ svcudp_enablecache (SVCXPRT *transp, u_long size)
+ su->su_cache = (char *) uc;
+ return 1;
+ }
+-libc_hidden_nolink (svcudp_enablecache, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (svcudp_enablecache, GLIBC_2_0)
+
+
+ /*
+diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c
+index 2b02682e72..94507b2403 100644
+--- a/sunrpc/svc_unix.c
++++ b/sunrpc/svc_unix.c
+@@ -184,7 +184,7 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path)
+ xprt_register (xprt);
+ return xprt;
+ }
+-libc_hidden_nolink (svcunix_create, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (svcunix_create, GLIBC_2_1)
+
+ /*
+ * Like svunix_create(), except the routine takes any *open* UNIX file
+@@ -195,7 +195,7 @@ svcunixfd_create (int fd, u_int sendsize, u_int recvsize)
+ {
+ return makefd_xprt (fd, sendsize, recvsize);
+ }
+-libc_hidden_nolink (svcunixfd_create, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (svcunixfd_create, GLIBC_2_1)
+
+ static SVCXPRT *
+ internal_function
+diff --git a/sunrpc/svcauth_des.c b/sunrpc/svcauth_des.c
+index b9656e25da..9609734960 100644
+--- a/sunrpc/svcauth_des.c
++++ b/sunrpc/svcauth_des.c
+@@ -583,7 +583,7 @@ authdes_getucred (const struct authdes_cred *adc, uid_t * uid, gid_t * gid,
+ groups[i] = cred->groups[i];
+ return 1;
+ }
+-libc_hidden_nolink (authdes_getucred, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (authdes_getucred, GLIBC_2_1)
+
+ static void
+ internal_function
+diff --git a/sunrpc/xcrypt.c b/sunrpc/xcrypt.c
+index 8b7642b503..2e53f2d9e9 100644
+--- a/sunrpc/xcrypt.c
++++ b/sunrpc/xcrypt.c
+@@ -127,7 +127,7 @@ xencrypt (char *secret, char *passwd)
+ free (buf);
+ return 1;
+ }
+-libc_hidden_nolink (xencrypt, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xencrypt, GLIBC_2_0)
+
+ /*
+ * Decrypt secret key using passwd
+@@ -163,7 +163,7 @@ xdecrypt (char *secret, char *passwd)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdecrypt)
+ #else
+-libc_hidden_nolink (xdecrypt, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdecrypt, GLIBC_2_1)
+ #endif
+
+ /*
+diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c
+index 4dd82ff044..7eac2d40f0 100644
+--- a/sunrpc/xdr.c
++++ b/sunrpc/xdr.c
+@@ -72,7 +72,7 @@ xdr_free (xdrproc_t proc, char *objp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_free)
+ #else
+-libc_hidden_nolink (xdr_free, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_free, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -86,7 +86,7 @@ xdr_void (void)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_void)
+ #else
+-libc_hidden_nolink (xdr_void, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_void, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -126,7 +126,7 @@ xdr_int (XDR *xdrs, int *ip)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_int)
+ #else
+-libc_hidden_nolink (xdr_int, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_int, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -165,7 +165,7 @@ xdr_u_int (XDR *xdrs, u_int *up)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_u_int)
+ #else
+-libc_hidden_nolink (xdr_u_int, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_u_int, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -193,7 +193,7 @@ xdr_long (XDR *xdrs, long *lp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_long)
+ #else
+-libc_hidden_nolink (xdr_long, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_long, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -232,7 +232,7 @@ xdr_u_long (XDR *xdrs, u_long *ulp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_u_long)
+ #else
+-libc_hidden_nolink (xdr_u_long, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_u_long, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -268,7 +268,7 @@ xdr_hyper (XDR *xdrs, quad_t *llp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_hyper)
+ #else
+-libc_hidden_nolink (xdr_hyper, GLIBC_2_1_1)
++libc_hidden_nolink_sunrpc (xdr_hyper, GLIBC_2_1_1)
+ #endif
+
+ /*
+@@ -304,7 +304,7 @@ xdr_u_hyper (XDR *xdrs, u_quad_t *ullp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_u_hyper)
+ #else
+-libc_hidden_nolink (xdr_u_hyper, GLIBC_2_1_1)
++libc_hidden_nolink_sunrpc (xdr_u_hyper, GLIBC_2_1_1)
+ #endif
+
+ bool_t
+@@ -315,7 +315,7 @@ xdr_longlong_t (XDR *xdrs, quad_t *llp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_longlong_t)
+ #else
+-libc_hidden_nolink (xdr_longlong_t, GLIBC_2_1_1)
++libc_hidden_nolink_sunrpc (xdr_longlong_t, GLIBC_2_1_1)
+ #endif
+
+ bool_t
+@@ -326,7 +326,7 @@ xdr_u_longlong_t (XDR *xdrs, u_quad_t *ullp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_u_longlong_t)
+ #else
+-libc_hidden_nolink (xdr_u_longlong_t, GLIBC_2_1_1)
++libc_hidden_nolink_sunrpc (xdr_u_longlong_t, GLIBC_2_1_1)
+ #endif
+
+ /*
+@@ -359,7 +359,7 @@ xdr_short (XDR *xdrs, short *sp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_short)
+ #else
+-libc_hidden_nolink (xdr_short, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_short, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -392,7 +392,7 @@ xdr_u_short (XDR *xdrs, u_short *usp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_u_short)
+ #else
+-libc_hidden_nolink (xdr_u_short, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_u_short, GLIBC_2_0)
+ #endif
+
+
+@@ -415,7 +415,7 @@ xdr_char (XDR *xdrs, char *cp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_char)
+ #else
+-libc_hidden_nolink (xdr_char, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_char, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -437,7 +437,7 @@ xdr_u_char (XDR *xdrs, u_char *cp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_u_char)
+ #else
+-libc_hidden_nolink (xdr_u_char, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_u_char, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -470,7 +470,7 @@ xdr_bool (XDR *xdrs, bool_t *bp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_bool)
+ #else
+-libc_hidden_nolink (xdr_bool, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_bool, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -525,7 +525,7 @@ xdr_enum (XDR *xdrs, enum_t *ep)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_enum)
+ #else
+-libc_hidden_nolink (xdr_enum, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_enum, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -580,7 +580,7 @@ xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_opaque)
+ #else
+-libc_hidden_nolink (xdr_opaque, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_opaque, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -648,7 +648,7 @@ xdr_bytes (xdrs, cpp, sizep, maxsize)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_bytes)
+ #else
+-libc_hidden_nolink (xdr_bytes, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_bytes, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -665,7 +665,7 @@ xdr_netobj (xdrs, np)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_netobj)
+ #else
+-libc_hidden_nolink (xdr_netobj, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_netobj, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -714,7 +714,7 @@ xdr_union (xdrs, dscmp, unp, choices, dfault)
+ return ((dfault == NULL_xdrproc_t) ? FALSE :
+ (*dfault) (xdrs, unp, LASTUNSIGNED));
+ }
+-libc_hidden_nolink (xdr_union, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_union, GLIBC_2_0)
+
+
+ /*
+@@ -806,7 +806,7 @@ xdr_string (xdrs, cpp, maxsize)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_string)
+ #else
+-libc_hidden_nolink (xdr_string, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_string, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -827,5 +827,5 @@ xdr_wrapstring (xdrs, cpp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_wrapstring)
+ #else
+-libc_hidden_nolink (xdr_wrapstring, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_wrapstring, GLIBC_2_0)
+ #endif
+diff --git a/sunrpc/xdr_array.c b/sunrpc/xdr_array.c
+index b832078342..a634861278 100644
+--- a/sunrpc/xdr_array.c
++++ b/sunrpc/xdr_array.c
+@@ -127,7 +127,7 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_array)
+ #else
+-libc_hidden_nolink (xdr_array, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_array, GLIBC_2_0)
+ #endif
+
+ /*
+@@ -162,4 +162,4 @@ xdr_vector (xdrs, basep, nelem, elemsize, xdr_elem)
+ }
+ return TRUE;
+ }
+-libc_hidden_nolink (xdr_vector, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_vector, GLIBC_2_0)
+diff --git a/sunrpc/xdr_float.c b/sunrpc/xdr_float.c
+index 1a9c260617..78e8f3bd2d 100644
+--- a/sunrpc/xdr_float.c
++++ b/sunrpc/xdr_float.c
+@@ -158,7 +158,7 @@ xdr_float(xdrs, fp)
+ }
+ return (FALSE);
+ }
+-libc_hidden_nolink (xdr_float, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_float, GLIBC_2_0)
+
+ /*
+ * This routine works on Suns (Sky / 68000's) and Vaxen.
+@@ -300,4 +300,4 @@ xdr_double(xdrs, dp)
+ }
+ return (FALSE);
+ }
+-libc_hidden_nolink (xdr_double, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_double, GLIBC_2_0)
+diff --git a/sunrpc/xdr_intXX_t.c b/sunrpc/xdr_intXX_t.c
+index fe06f45df3..02a0c09b5b 100644
+--- a/sunrpc/xdr_intXX_t.c
++++ b/sunrpc/xdr_intXX_t.c
+@@ -46,14 +46,14 @@ xdr_int64_t (XDR *xdrs, int64_t *ip)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_int64_t, GLIBC_2_1_1)
++libc_hidden_nolink_sunrpc (xdr_int64_t, GLIBC_2_1_1)
+
+ bool_t
+ xdr_quad_t (XDR *xdrs, quad_t *ip)
+ {
+ return xdr_int64_t (xdrs, (int64_t *) ip);
+ }
+-libc_hidden_nolink (xdr_quad_t, GLIBC_2_3_4)
++libc_hidden_nolink_sunrpc (xdr_quad_t, GLIBC_2_3_4)
+
+ /* XDR 64bit unsigned integers */
+ bool_t
+@@ -82,14 +82,14 @@ xdr_uint64_t (XDR *xdrs, uint64_t *uip)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_uint64_t, GLIBC_2_1_1)
++libc_hidden_nolink_sunrpc (xdr_uint64_t, GLIBC_2_1_1)
+
+ bool_t
+ xdr_u_quad_t (XDR *xdrs, u_quad_t *ip)
+ {
+ return xdr_uint64_t (xdrs, (uint64_t *) ip);
+ }
+-libc_hidden_nolink (xdr_u_quad_t, GLIBC_2_3_4)
++libc_hidden_nolink_sunrpc (xdr_u_quad_t, GLIBC_2_3_4)
+
+ /* XDR 32bit integers */
+ bool_t
+@@ -107,7 +107,7 @@ xdr_int32_t (XDR *xdrs, int32_t *lp)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_int32_t, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_int32_t, GLIBC_2_1)
+
+ /* XDR 32bit unsigned integers */
+ bool_t
+@@ -128,7 +128,7 @@ xdr_uint32_t (XDR *xdrs, uint32_t *ulp)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_uint32_t)
+ #else
+-libc_hidden_nolink (xdr_uint32_t, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_uint32_t, GLIBC_2_1)
+ #endif
+
+ /* XDR 16bit integers */
+@@ -153,7 +153,7 @@ xdr_int16_t (XDR *xdrs, int16_t *ip)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_int16_t, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_int16_t, GLIBC_2_1)
+
+ /* XDR 16bit unsigned integers */
+ bool_t
+@@ -177,7 +177,7 @@ xdr_uint16_t (XDR *xdrs, uint16_t *uip)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_uint16_t, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_uint16_t, GLIBC_2_1)
+
+ /* XDR 8bit integers */
+ bool_t
+@@ -201,7 +201,7 @@ xdr_int8_t (XDR *xdrs, int8_t *ip)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_int8_t, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_int8_t, GLIBC_2_1)
+
+ /* XDR 8bit unsigned integers */
+ bool_t
+@@ -225,4 +225,4 @@ xdr_uint8_t (XDR *xdrs, uint8_t *uip)
+ return FALSE;
+ }
+ }
+-libc_hidden_nolink (xdr_uint8_t, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_uint8_t, GLIBC_2_1)
+diff --git a/sunrpc/xdr_mem.c b/sunrpc/xdr_mem.c
+index 093a718739..ba7661aa54 100644
+--- a/sunrpc/xdr_mem.c
++++ b/sunrpc/xdr_mem.c
+@@ -81,7 +81,7 @@ xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdrmem_create)
+ #else
+-libc_hidden_nolink (xdrmem_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdrmem_create, GLIBC_2_0)
+ #endif
+
+ /*
+diff --git a/sunrpc/xdr_rec.c b/sunrpc/xdr_rec.c
+index 556c6c4bc0..f5d6ef2af9 100644
+--- a/sunrpc/xdr_rec.c
++++ b/sunrpc/xdr_rec.c
+@@ -189,7 +189,7 @@ xdrrec_create (XDR *xdrs, u_int sendsize,
+ rstrm->fbtbc = 0;
+ rstrm->last_frag = TRUE;
+ }
+-libc_hidden_nolink (xdrrec_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdrrec_create, GLIBC_2_0)
+
+
+ /*
+@@ -477,7 +477,7 @@ xdrrec_skiprecord (XDR *xdrs)
+ rstrm->last_frag = FALSE;
+ return TRUE;
+ }
+-libc_hidden_nolink (xdrrec_skiprecord, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdrrec_skiprecord, GLIBC_2_0)
+
+ /*
+ * Lookahead function.
+@@ -501,7 +501,7 @@ xdrrec_eof (XDR *xdrs)
+ return TRUE;
+ return FALSE;
+ }
+-libc_hidden_nolink (xdrrec_eof, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdrrec_eof, GLIBC_2_0)
+
+ /*
+ * The client must tell the package when an end-of-record has occurred.
+@@ -528,7 +528,7 @@ xdrrec_endofrecord (XDR *xdrs, bool_t sendnow)
+ rstrm->out_finger += BYTES_PER_XDR_UNIT;
+ return TRUE;
+ }
+-libc_hidden_nolink (xdrrec_endofrecord, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdrrec_endofrecord, GLIBC_2_0)
+
+
+ /*
+diff --git a/sunrpc/xdr_ref.c b/sunrpc/xdr_ref.c
+index 7510bed873..8fb4584a75 100644
+--- a/sunrpc/xdr_ref.c
++++ b/sunrpc/xdr_ref.c
+@@ -90,7 +90,7 @@ xdr_reference (xdrs, pp, size, proc)
+ }
+ return stat;
+ }
+-libc_hidden_nolink (xdr_reference, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_reference, GLIBC_2_0)
+
+
+ /*
+@@ -137,5 +137,5 @@ xdr_pointer (xdrs, objpp, obj_size, xdr_obj)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_pointer)
+ #else
+-libc_hidden_nolink (xdr_pointer, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdr_pointer, GLIBC_2_0)
+ #endif
+diff --git a/sunrpc/xdr_sizeof.c b/sunrpc/xdr_sizeof.c
+index 0119486c3d..56e870a455 100644
+--- a/sunrpc/xdr_sizeof.c
++++ b/sunrpc/xdr_sizeof.c
+@@ -161,5 +161,5 @@ xdr_sizeof (xdrproc_t func, void *data)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdr_sizeof)
+ #else
+-libc_hidden_nolink (xdr_sizeof, GLIBC_2_1)
++libc_hidden_nolink_sunrpc (xdr_sizeof, GLIBC_2_1)
+ #endif
+diff --git a/sunrpc/xdr_stdio.c b/sunrpc/xdr_stdio.c
+index d9866063f9..667515e0a6 100644
+--- a/sunrpc/xdr_stdio.c
++++ b/sunrpc/xdr_stdio.c
+@@ -191,5 +191,5 @@ xdrstdio_putint32 (XDR *xdrs, const int32_t *ip)
+ #ifdef EXPORT_RPC_SYMBOLS
+ libc_hidden_def (xdrstdio_create)
+ #else
+-libc_hidden_nolink (xdrstdio_create, GLIBC_2_0)
++libc_hidden_nolink_sunrpc (xdrstdio_create, GLIBC_2_0)
+ #endif
diff --git a/packages/glibc/2.15/998-obstack-common.patch b/packages/glibc/2.15/998-obstack-common.patch
new file mode 100644
index 0000000..4b95f06
--- /dev/null
+++ b/packages/glibc/2.15/998-obstack-common.patch
@@ -0,0 +1,30 @@
+commit 39b1f6172a2f9ddc74a8f82d6e84dd13b22dbaf2
+Author: Peter Collingbourne <pcc@google.com>
+Date: Wed May 15 20:28:08 2013 +0200
+
+ Move _obstack_compat out of common
+
+ it is impossible to create an alias of a common symbol (as
+ compat_symbol does), because common symbols do not have a section or
+ an offset until linked. GNU as tolerates aliases of common symbols by
+ simply creating another common symbol, but other assemblers (notably
+ LLVM's integrated assembler) are less tolerant.
+
+ 2013-05-15 Peter Collingbourne <pcc@google.com>
+
+ * malloc/obstack.c (_obstack_compat): Add initializer.
+ -
+
+diff --git a/malloc/obstack.c b/malloc/obstack.c
+index 25a90514f7..c3c7db4a96 100644
+--- a/malloc/obstack.c
++++ b/malloc/obstack.c
+@@ -115,7 +115,7 @@ int obstack_exit_failure = EXIT_FAILURE;
+ /* A looong time ago (before 1994, anyway; we're not sure) this global variable
+ was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
+ library still exports it because somebody might use it. */
+-struct obstack *_obstack_compat;
++struct obstack *_obstack_compat = 0;
+ compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
+ # endif
+ # endif
diff --git a/packages/glibc-ports/2.16.0/100-respect-env-CPPFLAGS.patch b/packages/glibc/2.16.0/100-respect-env-CPPFLAGS.patch
index dce491c..dce491c 100644
--- a/packages/glibc-ports/2.16.0/100-respect-env-CPPFLAGS.patch
+++ b/packages/glibc/2.16.0/100-respect-env-CPPFLAGS.patch
diff --git a/packages/glibc-ports/2.14.1/120-i386-x86_64-revert-clone-cfi.patch b/packages/glibc/2.16.0/120-i386-x86_64-revert-clone-cfi.patch
index c7f6182..c7f6182 100644
--- a/packages/glibc-ports/2.14.1/120-i386-x86_64-revert-clone-cfi.patch
+++ b/packages/glibc/2.16.0/120-i386-x86_64-revert-clone-cfi.patch
diff --git a/packages/glibc-ports/2.14.1/140-disable-ldconfig.patch b/packages/glibc/2.16.0/140-disable-ldconfig.patch
index 378e1df..378e1df 100644
--- a/packages/glibc-ports/2.14.1/140-disable-ldconfig.patch
+++ b/packages/glibc/2.16.0/140-disable-ldconfig.patch
diff --git a/packages/glibc-ports/2.14.1/150-queue-header-updates.patch b/packages/glibc/2.16.0/150-queue-header-updates.patch
index 7cbe70e..7cbe70e 100644
--- a/packages/glibc-ports/2.14.1/150-queue-header-updates.patch
+++ b/packages/glibc/2.16.0/150-queue-header-updates.patch
diff --git a/packages/glibc-ports/2.14.1/170-localedef-fix-trampoline.patch b/packages/glibc/2.16.0/170-localedef-fix-trampoline.patch
index 3cc6559..3cc6559 100644
--- a/packages/glibc-ports/2.14.1/170-localedef-fix-trampoline.patch
+++ b/packages/glibc/2.16.0/170-localedef-fix-trampoline.patch
diff --git a/packages/glibc-ports/2.14.1/180-resolv-dynamic.patch b/packages/glibc/2.16.0/180-resolv-dynamic.patch
index e916bce..e916bce 100644
--- a/packages/glibc-ports/2.14.1/180-resolv-dynamic.patch
+++ b/packages/glibc/2.16.0/180-resolv-dynamic.patch
diff --git a/packages/glibc-ports/2.14.1/200-fadvise64_64.patch b/packages/glibc/2.16.0/200-fadvise64_64.patch
index 71bca38..71bca38 100644
--- a/packages/glibc-ports/2.14.1/200-fadvise64_64.patch
+++ b/packages/glibc/2.16.0/200-fadvise64_64.patch
diff --git a/packages/glibc-ports/2.16.0/260-assume-pipe2.patch b/packages/glibc/2.16.0/260-assume-pipe2.patch
index 54f0382..54f0382 100644
--- a/packages/glibc-ports/2.16.0/260-assume-pipe2.patch
+++ b/packages/glibc/2.16.0/260-assume-pipe2.patch
diff --git a/packages/glibc-ports/2.14.1/270-china.patch b/packages/glibc/2.16.0/270-china.patch
index 41d7759..41d7759 100644
--- a/packages/glibc-ports/2.14.1/270-china.patch
+++ b/packages/glibc/2.16.0/270-china.patch
diff --git a/packages/glibc-ports/2.14.1/280-new-valencian-locale.patch b/packages/glibc/2.16.0/280-new-valencian-locale.patch
index 4cdd108..4cdd108 100644
--- a/packages/glibc-ports/2.14.1/280-new-valencian-locale.patch
+++ b/packages/glibc/2.16.0/280-new-valencian-locale.patch
diff --git a/packages/glibc-ports/2.16.0/300-nscd-one-fork.patch b/packages/glibc/2.16.0/300-nscd-one-fork.patch
index 13b2861..13b2861 100644
--- a/packages/glibc-ports/2.16.0/300-nscd-one-fork.patch
+++ b/packages/glibc/2.16.0/300-nscd-one-fork.patch
diff --git a/packages/glibc-ports/2.16.0/310-hppa-nptl-carlos.patch b/packages/glibc/2.16.0/310-hppa-nptl-carlos.patch
index 11e8a65..11e8a65 100644
--- a/packages/glibc-ports/2.16.0/310-hppa-nptl-carlos.patch
+++ b/packages/glibc/2.16.0/310-hppa-nptl-carlos.patch
diff --git a/packages/glibc-ports/2.14.1/340-dl_execstack-PaX-support.patch b/packages/glibc/2.16.0/340-dl_execstack-PaX-support.patch
index 2402af0..2402af0 100644
--- a/packages/glibc-ports/2.14.1/340-dl_execstack-PaX-support.patch
+++ b/packages/glibc/2.16.0/340-dl_execstack-PaX-support.patch
diff --git a/packages/glibc-ports/2.14.1/350-pre20040117-pt_pax.patch b/packages/glibc/2.16.0/350-pre20040117-pt_pax.patch
index f8f6b83..f8f6b83 100644
--- a/packages/glibc-ports/2.14.1/350-pre20040117-pt_pax.patch
+++ b/packages/glibc/2.16.0/350-pre20040117-pt_pax.patch
diff --git a/packages/glibc-ports/2.14.1/360-tests-sandbox-libdl-paths.patch b/packages/glibc/2.16.0/360-tests-sandbox-libdl-paths.patch
index 9f78c52..9f78c52 100644
--- a/packages/glibc-ports/2.14.1/360-tests-sandbox-libdl-paths.patch
+++ b/packages/glibc/2.16.0/360-tests-sandbox-libdl-paths.patch
diff --git a/packages/glibc-ports/2.14.1/380-dont-build-timezone.patch b/packages/glibc/2.16.0/380-dont-build-timezone.patch
index 11c358e..11c358e 100644
--- a/packages/glibc-ports/2.14.1/380-dont-build-timezone.patch
+++ b/packages/glibc/2.16.0/380-dont-build-timezone.patch
diff --git a/packages/glibc-ports/2.14.1/400-alpha-xstat.patch b/packages/glibc/2.16.0/400-alpha-xstat.patch
index 6e4ab8f..6e4ab8f 100644
--- a/packages/glibc-ports/2.14.1/400-alpha-xstat.patch
+++ b/packages/glibc/2.16.0/400-alpha-xstat.patch
diff --git a/packages/glibc-ports/2.14.1/430-alpha-creat.patch b/packages/glibc/2.16.0/430-alpha-creat.patch
index da6ddda..da6ddda 100644
--- a/packages/glibc-ports/2.14.1/430-alpha-creat.patch
+++ b/packages/glibc/2.16.0/430-alpha-creat.patch
diff --git a/packages/glibc-ports/2.15/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/2.16.0/490-alpha_alpha-add-fdatasync-support.patch
index acf250d..acf250d 100644
--- a/packages/glibc-ports/2.15/490-alpha_alpha-add-fdatasync-support.patch
+++ b/packages/glibc/2.16.0/490-alpha_alpha-add-fdatasync-support.patch
diff --git a/packages/glibc-ports/2.14.1/560-ppc-atomic.patch b/packages/glibc/2.16.0/560-ppc-atomic.patch
index ee1cb90..ee1cb90 100644
--- a/packages/glibc-ports/2.14.1/560-ppc-atomic.patch
+++ b/packages/glibc/2.16.0/560-ppc-atomic.patch
diff --git a/packages/glibc-ports/2.14.1/630-mips_shn_undef-hack.patch b/packages/glibc/2.16.0/630-mips_shn_undef-hack.patch
index 791d76c..791d76c 100644
--- a/packages/glibc-ports/2.14.1/630-mips_shn_undef-hack.patch
+++ b/packages/glibc/2.16.0/630-mips_shn_undef-hack.patch
diff --git a/packages/glibc-ports/2.14.1/640-alpha-atfcts.patch b/packages/glibc/2.16.0/640-alpha-atfcts.patch
index 7a8a94a..7a8a94a 100644
--- a/packages/glibc-ports/2.14.1/640-alpha-atfcts.patch
+++ b/packages/glibc/2.16.0/640-alpha-atfcts.patch
diff --git a/packages/glibc-ports/2.13/650-syslog.patch b/packages/glibc/2.16.0/650-syslog.patch
index c20cafc..c20cafc 100644
--- a/packages/glibc-ports/2.13/650-syslog.patch
+++ b/packages/glibc/2.16.0/650-syslog.patch
diff --git a/packages/glibc-ports/2.13/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/2.16.0/660-debug-readlink_chk-readklinkat_chk.patch
index a5a7052..a5a7052 100644
--- a/packages/glibc-ports/2.13/660-debug-readlink_chk-readklinkat_chk.patch
+++ b/packages/glibc/2.16.0/660-debug-readlink_chk-readklinkat_chk.patch
diff --git a/packages/glibc/2.16.0/998-obstack-common.patch b/packages/glibc/2.16.0/998-obstack-common.patch
new file mode 100644
index 0000000..4b95f06
--- /dev/null
+++ b/packages/glibc/2.16.0/998-obstack-common.patch
@@ -0,0 +1,30 @@
+commit 39b1f6172a2f9ddc74a8f82d6e84dd13b22dbaf2
+Author: Peter Collingbourne <pcc@google.com>
+Date: Wed May 15 20:28:08 2013 +0200
+
+ Move _obstack_compat out of common
+
+ it is impossible to create an alias of a common symbol (as
+ compat_symbol does), because common symbols do not have a section or
+ an offset until linked. GNU as tolerates aliases of common symbols by
+ simply creating another common symbol, but other assemblers (notably
+ LLVM's integrated assembler) are less tolerant.
+
+ 2013-05-15 Peter Collingbourne <pcc@google.com>
+
+ * malloc/obstack.c (_obstack_compat): Add initializer.
+ -
+
+diff --git a/malloc/obstack.c b/malloc/obstack.c
+index 25a90514f7..c3c7db4a96 100644
+--- a/malloc/obstack.c
++++ b/malloc/obstack.c
+@@ -115,7 +115,7 @@ int obstack_exit_failure = EXIT_FAILURE;
+ /* A looong time ago (before 1994, anyway; we're not sure) this global variable
+ was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
+ library still exports it because somebody might use it. */
+-struct obstack *_obstack_compat;
++struct obstack *_obstack_compat = 0;
+ compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
+ # endif
+ # endif
diff --git a/packages/glibc/2.17/998-obstack-common.patch b/packages/glibc/2.17/998-obstack-common.patch
new file mode 100644
index 0000000..4b95f06
--- /dev/null
+++ b/packages/glibc/2.17/998-obstack-common.patch
@@ -0,0 +1,30 @@
+commit 39b1f6172a2f9ddc74a8f82d6e84dd13b22dbaf2
+Author: Peter Collingbourne <pcc@google.com>
+Date: Wed May 15 20:28:08 2013 +0200
+
+ Move _obstack_compat out of common
+
+ it is impossible to create an alias of a common symbol (as
+ compat_symbol does), because common symbols do not have a section or
+ an offset until linked. GNU as tolerates aliases of common symbols by
+ simply creating another common symbol, but other assemblers (notably
+ LLVM's integrated assembler) are less tolerant.
+
+ 2013-05-15 Peter Collingbourne <pcc@google.com>
+
+ * malloc/obstack.c (_obstack_compat): Add initializer.
+ -
+
+diff --git a/malloc/obstack.c b/malloc/obstack.c
+index 25a90514f7..c3c7db4a96 100644
+--- a/malloc/obstack.c
++++ b/malloc/obstack.c
+@@ -115,7 +115,7 @@ int obstack_exit_failure = EXIT_FAILURE;
+ /* A looong time ago (before 1994, anyway; we're not sure) this global variable
+ was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
+ library still exports it because somebody might use it. */
+-struct obstack *_obstack_compat;
++struct obstack *_obstack_compat = 0;
+ compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
+ # endif
+ # endif
diff --git a/packages/glibc/2.23/997-regexp-common.patch b/packages/glibc/2.23/997-regexp-common.patch
new file mode 100644
index 0000000..7764c99
--- /dev/null
+++ b/packages/glibc/2.23/997-regexp-common.patch
@@ -0,0 +1,58 @@
+commit 388b4f1a02f3a801965028bbfcd48d905638b797
+Author: H.J. Lu <hjl.tools@gmail.com>
+Date: Fri Jun 23 14:38:46 2017 -0700
+
+ Avoid .symver on common symbols [BZ #21666]
+
+ The .symver directive on common symbol just creates a new common symbol,
+ not an alias and the newer assembler with the bug fix for
+
+ https://sourceware.org/bugzilla/show_bug.cgi?id=21661
+
+ will issue an error. Before the fix, we got
+
+ $ readelf -sW libc.so | grep "loc[12s]"
+ 5109: 00000000003a0608 8 OBJECT LOCAL DEFAULT 36 loc1
+ 5188: 00000000003a0610 8 OBJECT LOCAL DEFAULT 36 loc2
+ 5455: 00000000003a0618 8 OBJECT LOCAL DEFAULT 36 locs
+ 6575: 00000000003a05f0 8 OBJECT GLOBAL DEFAULT 36 locs@GLIBC_2.2.5
+ 7156: 00000000003a05f8 8 OBJECT GLOBAL DEFAULT 36 loc1@GLIBC_2.2.5
+ 7312: 00000000003a0600 8 OBJECT GLOBAL DEFAULT 36 loc2@GLIBC_2.2.5
+
+ in libc.so. The versioned loc1, loc2 and locs have the wrong addresses.
+ After the fix, we got
+
+ $ readelf -sW libc.so | grep "loc[12s]"
+ 6570: 000000000039e3b8 8 OBJECT GLOBAL DEFAULT 34 locs@GLIBC_2.2.5
+ 7151: 000000000039e3c8 8 OBJECT GLOBAL DEFAULT 34 loc1@GLIBC_2.2.5
+ 7307: 000000000039e3c0 8 OBJECT GLOBAL DEFAULT 34 loc2@GLIBC_2.2.5
+
+ [BZ #21666]
+ * misc/regexp.c (loc1): Add __attribute__ ((nocommon));
+ (loc2): Likewise.
+ (locs): Likewise.
+
+diff --git a/misc/regexp.c b/misc/regexp.c
+index 19d76c0c37..eaea7c3b89 100644
+--- a/misc/regexp.c
++++ b/misc/regexp.c
+@@ -29,14 +29,15 @@
+
+ #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
+
+-/* Define the variables used for the interface. */
+-char *loc1;
+-char *loc2;
++/* Define the variables used for the interface. Avoid .symver on common
++ symbol, which just creates a new common symbol, not an alias. */
++char *loc1 __attribute__ ((nocommon));
++char *loc2 __attribute__ ((nocommon));
+ compat_symbol (libc, loc1, loc1, GLIBC_2_0);
+ compat_symbol (libc, loc2, loc2, GLIBC_2_0);
+
+ /* Although we do not support the use we define this variable as well. */
+-char *locs;
++char *locs __attribute__ ((nocommon));
+ compat_symbol (libc, locs, locs, GLIBC_2_0);
+
+
diff --git a/packages/glibc/2.24/997-regexp-common.patch b/packages/glibc/2.24/997-regexp-common.patch
new file mode 100644
index 0000000..7764c99
--- /dev/null
+++ b/packages/glibc/2.24/997-regexp-common.patch
@@ -0,0 +1,58 @@
+commit 388b4f1a02f3a801965028bbfcd48d905638b797
+Author: H.J. Lu <hjl.tools@gmail.com>
+Date: Fri Jun 23 14:38:46 2017 -0700
+
+ Avoid .symver on common symbols [BZ #21666]
+
+ The .symver directive on common symbol just creates a new common symbol,
+ not an alias and the newer assembler with the bug fix for
+
+ https://sourceware.org/bugzilla/show_bug.cgi?id=21661
+
+ will issue an error. Before the fix, we got
+
+ $ readelf -sW libc.so | grep "loc[12s]"
+ 5109: 00000000003a0608 8 OBJECT LOCAL DEFAULT 36 loc1
+ 5188: 00000000003a0610 8 OBJECT LOCAL DEFAULT 36 loc2
+ 5455: 00000000003a0618 8 OBJECT LOCAL DEFAULT 36 locs
+ 6575: 00000000003a05f0 8 OBJECT GLOBAL DEFAULT 36 locs@GLIBC_2.2.5
+ 7156: 00000000003a05f8 8 OBJECT GLOBAL DEFAULT 36 loc1@GLIBC_2.2.5
+ 7312: 00000000003a0600 8 OBJECT GLOBAL DEFAULT 36 loc2@GLIBC_2.2.5
+
+ in libc.so. The versioned loc1, loc2 and locs have the wrong addresses.
+ After the fix, we got
+
+ $ readelf -sW libc.so | grep "loc[12s]"
+ 6570: 000000000039e3b8 8 OBJECT GLOBAL DEFAULT 34 locs@GLIBC_2.2.5
+ 7151: 000000000039e3c8 8 OBJECT GLOBAL DEFAULT 34 loc1@GLIBC_2.2.5
+ 7307: 000000000039e3c0 8 OBJECT GLOBAL DEFAULT 34 loc2@GLIBC_2.2.5
+
+ [BZ #21666]
+ * misc/regexp.c (loc1): Add __attribute__ ((nocommon));
+ (loc2): Likewise.
+ (locs): Likewise.
+
+diff --git a/misc/regexp.c b/misc/regexp.c
+index 19d76c0c37..eaea7c3b89 100644
+--- a/misc/regexp.c
++++ b/misc/regexp.c
+@@ -29,14 +29,15 @@
+
+ #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
+
+-/* Define the variables used for the interface. */
+-char *loc1;
+-char *loc2;
++/* Define the variables used for the interface. Avoid .symver on common
++ symbol, which just creates a new common symbol, not an alias. */
++char *loc1 __attribute__ ((nocommon));
++char *loc2 __attribute__ ((nocommon));
+ compat_symbol (libc, loc1, loc1, GLIBC_2_0);
+ compat_symbol (libc, loc2, loc2, GLIBC_2_0);
+
+ /* Although we do not support the use we define this variable as well. */
+-char *locs;
++char *locs __attribute__ ((nocommon));
+ compat_symbol (libc, locs, locs, GLIBC_2_0);
+
+
diff --git a/packages/glibc/2.25/997-regexp-common.patch b/packages/glibc/2.25/997-regexp-common.patch
new file mode 100644
index 0000000..7764c99
--- /dev/null
+++ b/packages/glibc/2.25/997-regexp-common.patch
@@ -0,0 +1,58 @@
+commit 388b4f1a02f3a801965028bbfcd48d905638b797
+Author: H.J. Lu <hjl.tools@gmail.com>
+Date: Fri Jun 23 14:38:46 2017 -0700
+
+ Avoid .symver on common symbols [BZ #21666]
+
+ The .symver directive on common symbol just creates a new common symbol,
+ not an alias and the newer assembler with the bug fix for
+
+ https://sourceware.org/bugzilla/show_bug.cgi?id=21661
+
+ will issue an error. Before the fix, we got
+
+ $ readelf -sW libc.so | grep "loc[12s]"
+ 5109: 00000000003a0608 8 OBJECT LOCAL DEFAULT 36 loc1
+ 5188: 00000000003a0610 8 OBJECT LOCAL DEFAULT 36 loc2
+ 5455: 00000000003a0618 8 OBJECT LOCAL DEFAULT 36 locs
+ 6575: 00000000003a05f0 8 OBJECT GLOBAL DEFAULT 36 locs@GLIBC_2.2.5
+ 7156: 00000000003a05f8 8 OBJECT GLOBAL DEFAULT 36 loc1@GLIBC_2.2.5
+ 7312: 00000000003a0600 8 OBJECT GLOBAL DEFAULT 36 loc2@GLIBC_2.2.5
+
+ in libc.so. The versioned loc1, loc2 and locs have the wrong addresses.
+ After the fix, we got
+
+ $ readelf -sW libc.so | grep "loc[12s]"
+ 6570: 000000000039e3b8 8 OBJECT GLOBAL DEFAULT 34 locs@GLIBC_2.2.5
+ 7151: 000000000039e3c8 8 OBJECT GLOBAL DEFAULT 34 loc1@GLIBC_2.2.5
+ 7307: 000000000039e3c0 8 OBJECT GLOBAL DEFAULT 34 loc2@GLIBC_2.2.5
+
+ [BZ #21666]
+ * misc/regexp.c (loc1): Add __attribute__ ((nocommon));
+ (loc2): Likewise.
+ (locs): Likewise.
+
+diff --git a/misc/regexp.c b/misc/regexp.c
+index 19d76c0c37..eaea7c3b89 100644
+--- a/misc/regexp.c
++++ b/misc/regexp.c
+@@ -29,14 +29,15 @@
+
+ #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23)
+
+-/* Define the variables used for the interface. */
+-char *loc1;
+-char *loc2;
++/* Define the variables used for the interface. Avoid .symver on common
++ symbol, which just creates a new common symbol, not an alias. */
++char *loc1 __attribute__ ((nocommon));
++char *loc2 __attribute__ ((nocommon));
+ compat_symbol (libc, loc1, loc1, GLIBC_2_0);
+ compat_symbol (libc, loc2, loc2, GLIBC_2_0);
+
+ /* Although we do not support the use we define this variable as well. */
+-char *locs;
++char *locs __attribute__ ((nocommon));
+ compat_symbol (libc, locs, locs, GLIBC_2_0);
+
+
diff --git a/packages/glibc/2.26/910-typedef-caddr.patch b/packages/glibc/2.26/910-typedef-caddr.patch
new file mode 100644
index 0000000..fc7979b
--- /dev/null
+++ b/packages/glibc/2.26/910-typedef-caddr.patch
@@ -0,0 +1,15 @@
+diff -urN glibc-2.23-orig/posix/sys/types.h glibc-2.23/posix/sys/types.h
+--- glibc-2.23-orig/posix/sys/types.h 2016-02-18 12:54:00.000000000 -0500
++++ glibc-2.23/posix/sys/types.h 2017-01-06 11:40:05.842147165 -0500
+@@ -113,7 +113,10 @@
+ #ifdef __USE_MISC
+ # ifndef __daddr_t_defined
+ typedef __daddr_t daddr_t;
++# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
+ typedef __caddr_t caddr_t;
++# define __caddr_t_defined
++# endif
+ # define __daddr_t_defined
+ # endif
+ #endif
+
diff --git a/packages/linux/4.11.3/version.desc b/packages/glibc/2.26/version.desc
index e69de29..e69de29 100644
--- a/packages/linux/4.11.3/version.desc
+++ b/packages/glibc/2.26/version.desc
diff --git a/packages/glibc/package.desc b/packages/glibc/package.desc
index 13e2233..675b113 100644
--- a/packages/glibc/package.desc
+++ b/packages/glibc/package.desc
@@ -1,4 +1,5 @@
origin='GNU'
repository='git git://sourceware.org/git/glibc.git'
-mirrors='$(CT_Mirrors GNU glibc) $(CT_Mirrors sourceware glibc/releases)'
-milestones='2.17 2.20 2.23'
+mirrors='$(CT_Mirrors GNU glibc)'
+milestones='2.14 2.17 2.20 2.23 2.24 2.26'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch b/packages/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch
deleted file mode 100644
index f60e88f..0000000
--- a/packages/gmp/4.3.0/100-multiplicity-that-does-not-fit-an-int.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff --git a/mpz/remove.c b/mpz/remove.c
---- a/mpz/remove.c
-+++ b/mpz/remove.c
-@@ -23,7 +23,7 @@
- unsigned long int
- mpz_remove (mpz_ptr dest, mpz_srcptr src, mpz_srcptr f)
- {
-- mpz_t fpow[40]; /* inexhaustible...until year 2020 or so */
-+ mpz_t fpow[GMP_LIMB_BITS]; /* Really MP_SIZE_T_BITS */
- mpz_t x, rem;
- unsigned long int pwr;
- int p;
-@@ -69,7 +69,7 @@
- mpz_set (dest, x);
- }
-
-- pwr = (1 << p) - 1;
-+ pwr = (1L << p) - 1;
-
- mpz_clear (fpow[p]);
-
-diff --git a/mpz/remove.c b/mpz/remove.c
---- a/mpz/remove.c
-+++ b/mpz/remove.c
-@@ -80,7 +80,7 @@
- mpz_tdiv_qr (x, rem, dest, fpow[p]);
- if (SIZ (rem) == 0)
- {
-- pwr += 1 << p;
-+ pwr += 1L << p;
- mpz_set (dest, x);
- }
- mpz_clear (fpow[p]);
diff --git a/packages/gmp/4.3.0/110-unbounded-alloc.patch b/packages/gmp/4.3.0/110-unbounded-alloc.patch
deleted file mode 100644
index 78e0588..0000000
--- a/packages/gmp/4.3.0/110-unbounded-alloc.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/mpn/generic/toom44_mul.c b/mpn/generic/toom44_mul.c
---- a/mpn/generic/toom44_mul.c
-+++ b/mpn/generic/toom44_mul.c
-@@ -116,17 +116,16 @@
-
- TMP_MARK;
-
-- as1 = TMP_SALLOC_LIMBS (n + 1);
-- asm1 = TMP_SALLOC_LIMBS (n + 1);
-- as2 = TMP_SALLOC_LIMBS (n + 1);
-- ash = TMP_SALLOC_LIMBS (n + 1);
-- asmh = TMP_SALLOC_LIMBS (n + 1);
--
-- bs1 = TMP_SALLOC_LIMBS (n + 1);
-- bsm1 = TMP_SALLOC_LIMBS (n + 1);
-- bs2 = TMP_SALLOC_LIMBS (n + 1);
-- bsh = TMP_SALLOC_LIMBS (n + 1);
-- bsmh = TMP_SALLOC_LIMBS (n + 1);
-+ as1 = TMP_ALLOC_LIMBS (10 * n + 10);
-+ asm1 = as1 + n + 1;
-+ as2 = asm1 + n + 1;
-+ ash = as2 + n + 1;
-+ asmh = ash + n + 1;
-+ bs1 = asmh + n + 1;
-+ bsm1 = bs1 + n + 1;
-+ bs2 = bsm1 + n + 1;
-+ bsh = bs2 + n + 1;
-+ bsmh = bsh + n + 1;
-
- gp = pp;
- hp = pp + n + 1;
diff --git a/packages/gmp/4.3.0/version.desc b/packages/gmp/4.3.0/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/gmp/4.3.0/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch b/packages/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch
deleted file mode 100644
index f60e88f..0000000
--- a/packages/gmp/4.3.1/100-multiplicity-that-does-not-fit-an-int.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff --git a/mpz/remove.c b/mpz/remove.c
---- a/mpz/remove.c
-+++ b/mpz/remove.c
-@@ -23,7 +23,7 @@
- unsigned long int
- mpz_remove (mpz_ptr dest, mpz_srcptr src, mpz_srcptr f)
- {
-- mpz_t fpow[40]; /* inexhaustible...until year 2020 or so */
-+ mpz_t fpow[GMP_LIMB_BITS]; /* Really MP_SIZE_T_BITS */
- mpz_t x, rem;
- unsigned long int pwr;
- int p;
-@@ -69,7 +69,7 @@
- mpz_set (dest, x);
- }
-
-- pwr = (1 << p) - 1;
-+ pwr = (1L << p) - 1;
-
- mpz_clear (fpow[p]);
-
-diff --git a/mpz/remove.c b/mpz/remove.c
---- a/mpz/remove.c
-+++ b/mpz/remove.c
-@@ -80,7 +80,7 @@
- mpz_tdiv_qr (x, rem, dest, fpow[p]);
- if (SIZ (rem) == 0)
- {
-- pwr += 1 << p;
-+ pwr += 1L << p;
- mpz_set (dest, x);
- }
- mpz_clear (fpow[p]);
diff --git a/packages/gmp/4.3.1/110-unbounded-alloc.patch b/packages/gmp/4.3.1/110-unbounded-alloc.patch
deleted file mode 100644
index 78e0588..0000000
--- a/packages/gmp/4.3.1/110-unbounded-alloc.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/mpn/generic/toom44_mul.c b/mpn/generic/toom44_mul.c
---- a/mpn/generic/toom44_mul.c
-+++ b/mpn/generic/toom44_mul.c
-@@ -116,17 +116,16 @@
-
- TMP_MARK;
-
-- as1 = TMP_SALLOC_LIMBS (n + 1);
-- asm1 = TMP_SALLOC_LIMBS (n + 1);
-- as2 = TMP_SALLOC_LIMBS (n + 1);
-- ash = TMP_SALLOC_LIMBS (n + 1);
-- asmh = TMP_SALLOC_LIMBS (n + 1);
--
-- bs1 = TMP_SALLOC_LIMBS (n + 1);
-- bsm1 = TMP_SALLOC_LIMBS (n + 1);
-- bs2 = TMP_SALLOC_LIMBS (n + 1);
-- bsh = TMP_SALLOC_LIMBS (n + 1);
-- bsmh = TMP_SALLOC_LIMBS (n + 1);
-+ as1 = TMP_ALLOC_LIMBS (10 * n + 10);
-+ asm1 = as1 + n + 1;
-+ as2 = asm1 + n + 1;
-+ ash = as2 + n + 1;
-+ asmh = ash + n + 1;
-+ bs1 = asmh + n + 1;
-+ bsm1 = bs1 + n + 1;
-+ bs2 = bsm1 + n + 1;
-+ bsh = bs2 + n + 1;
-+ bsmh = bsh + n + 1;
-
- gp = pp;
- hp = pp + n + 1;
diff --git a/packages/gmp/4.3.1/version.desc b/packages/gmp/4.3.1/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/gmp/4.3.1/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/gmp/4.3.2/version.desc b/packages/gmp/4.3.2/version.desc
index fcfe389..a114052 100644
--- a/packages/gmp/4.3.2/version.desc
+++ b/packages/gmp/4.3.2/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/gmp/5.0.1/100-fix-tests-ABI-long-long.patch b/packages/gmp/5.0.1/100-fix-tests-ABI-long-long.patch
deleted file mode 100644
index b6e303e..0000000
--- a/packages/gmp/5.0.1/100-fix-tests-ABI-long-long.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: http://gmplib.org:8000/gmp-5.0/raw-rev/794410151f5f
-
-Tweaked to remove the hunk in the Changelog, as it did not apply cleanly
-( and who needs Changelogs? ;-) )
-
-# HG changeset patch
-# User Torbjorn Granlund <tege@gmplib.org>
-# Date 1267122532 -3600
-# Node ID 794410151f5f966bcb5c3489b6441614990efe7c
-# Parent 948660e2e56d9cfaae035082b8fd473985505fb6
-Fix a test case to work for long long limbs.
-
-diff -r 948660e2e56d -r 794410151f5f tests/mpz/t-perfpow.c
---- a/tests/mpz/t-perfpow.c Thu Feb 25 16:08:21 2010 +0100
-+++ b/tests/mpz/t-perfpow.c Thu Feb 25 19:28:52 2010 +0100
-@@ -2,7 +2,7 @@
-
- Contributed to the GNU project by Torbjorn Granlund and Martin Boij.
-
--Copyright 2008, 2009 Free Software Foundation, Inc.
-+Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
-
- This file is part of the GNU MP Library.
-
-@@ -109,7 +109,8 @@
- {
- mpz_t n, np, temp, primes[NRP];
- int i, j, k, unique, destroy, res;
-- unsigned long int nrprimes, primebits, g, exp[NRP], e;
-+ unsigned long int nrprimes, primebits;
-+ mp_limb_t g, exp[NRP], e;
- gmp_randstate_ptr rands;
-
- rands = RANDS;
-
diff --git a/packages/gmp/5.0.1/110-get-mpn_sub_1-size-argument-right.patch b/packages/gmp/5.0.1/110-get-mpn_sub_1-size-argument-right.patch
deleted file mode 100644
index 2e0a1af..0000000
--- a/packages/gmp/5.0.1/110-get-mpn_sub_1-size-argument-right.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-
-# HG changeset patch
-# User Torbjorn Granlund <tege@gmplib.org>
-# Date 1310730221 -7200
-# Node ID 538dfce27f410b910d5e2f011119269e224d16a3
-# Parent 03ed209dd7efd4f4fff0ce297bb3a8f7e7ba2366
-(mpn_dcpi1_bdiv_q): Get mpn_sub_1 size argument right.
-
-diff -r 03ed209dd7ef -r 538dfce27f41 mpn/generic/dcpi1_bdiv_q.c
---- a/mpn/generic/dcpi1_bdiv_q.c Thu Jun 16 12:22:24 2011 +0200
-+++ b/mpn/generic/dcpi1_bdiv_q.c Fri Jul 15 13:43:41 2011 +0200
-@@ -7,7 +7,7 @@
- SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST
- GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE.
-
--Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
-+Copyright 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
-
- This file is part of the GNU MP Library.
-
-@@ -28,7 +28,6 @@
- #include "gmp-impl.h"
-
-
--
- mp_size_t
- mpn_dcpi1_bdiv_q_n_itch (mp_size_t n)
- {
-@@ -130,7 +129,7 @@
- qn = nn - qn;
- while (qn > dn)
- {
-- mpn_sub_1 (np + dn, np + dn, qn, cy);
-+ mpn_sub_1 (np + dn, np + dn, qn - dn, cy);
- cy = mpn_dcpi1_bdiv_qr_n (qp, np, dp, dn, dinv, tp);
- qp += dn;
- np += dn;
-
diff --git a/packages/gmp/5.0.1/120-fix-r0-clobbering-issue.patch b/packages/gmp/5.0.1/120-fix-r0-clobbering-issue.patch
deleted file mode 100644
index d12d6b2..0000000
--- a/packages/gmp/5.0.1/120-fix-r0-clobbering-issue.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-Removed ChangeLog part
-
-# HG changeset patch
-# User Torbjorn Granlund <tege@gmplib.org>
-# Date 1342891151 -7200
-# Node ID 829215e83ff1db3cd00e510a737092df691442d5
-# Parent 816c18dbd492050ef8892e91602d9e758abc2988
-Fix r0 clobbering issue with "large" code affecting elf+darwin PIC.
-
-diff -r 816c18dbd492 -r 829215e83ff1 mpn/powerpc32/vmx/mod_34lsub1.asm
---- a/mpn/powerpc32/vmx/mod_34lsub1.asm Tue Jun 19 15:02:48 2012 +0200
-+++ b/mpn/powerpc32/vmx/mod_34lsub1.asm Sat Jul 21 19:19:11 2012 +0200
-@@ -1,6 +1,7 @@
- dnl PowerPC-32 mpn_mod_34lsub1 -- mpn remainder mod 2^24-1.
-
--dnl Copyright 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
-+dnl Copyright 2002, 2003, 2005, 2006, 2007, 2012 Free Software Foundation,
-+dnl Inc.
-
- dnl This file is part of the GNU MP Library.
-
-@@ -135,15 +136,15 @@
-
- andi. r7, up, 15
- vxor a0, v0, v0
-- lis r0, 0xaaaa
-+ lis r9, 0xaaaa
- vxor a1, v0, v0
-- ori r0, r0, 0xaaab
-+ ori r9, r9, 0xaaab
- vxor a2, v0, v0
- li r5, 16
- vxor c0, v0, v0
- li r6, 32
- vxor c1, v0, v0
-- LEAL( r11, cnsts)
-+ LEAL( r11, cnsts) C CAUTION clobbers r0 for elf, darwin
- vxor c2, v0, v0
- vxor z, v0, v0
-
-@@ -158,7 +159,7 @@
- vsldoi a2, z, a2, 12
-
- addi n, n, 9
-- mulhwu r0, n, r0
-+ mulhwu r0, n, r9
- srwi r0, r0, 3 C r0 = floor(n/12)
- mtctr r0
-
-@@ -174,7 +175,7 @@
- vsldoi a1, z, a1, 8
-
- addi n, n, 6
-- mulhwu r0, n, r0
-+ mulhwu r0, n, r9
- srwi r0, r0, 3 C r0 = floor(n/12)
- mtctr r0
-
-@@ -188,7 +189,7 @@
- vsldoi a0, z, a0, 4
-
- addi n, n, 3
-- mulhwu r0, n, r0
-+ mulhwu r0, n, r9
- srwi r0, r0, 3 C r0 = floor(n/12)
- mtctr r0
-
-@@ -197,7 +198,7 @@
- b L(0)
-
- L(aligned16):
-- mulhwu r0, n, r0
-+ mulhwu r0, n, r9
- srwi r0, r0, 3 C r0 = floor(n/12)
- mtctr r0
-
-
diff --git a/packages/gmp/5.0.1/version.desc b/packages/gmp/5.0.1/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/gmp/5.0.1/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/gmp/5.0.2/110-get-mpn_sub_1-size-argument-right.patch b/packages/gmp/5.0.2/110-get-mpn_sub_1-size-argument-right.patch
deleted file mode 100644
index 2e0a1af..0000000
--- a/packages/gmp/5.0.2/110-get-mpn_sub_1-size-argument-right.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-
-# HG changeset patch
-# User Torbjorn Granlund <tege@gmplib.org>
-# Date 1310730221 -7200
-# Node ID 538dfce27f410b910d5e2f011119269e224d16a3
-# Parent 03ed209dd7efd4f4fff0ce297bb3a8f7e7ba2366
-(mpn_dcpi1_bdiv_q): Get mpn_sub_1 size argument right.
-
-diff -r 03ed209dd7ef -r 538dfce27f41 mpn/generic/dcpi1_bdiv_q.c
---- a/mpn/generic/dcpi1_bdiv_q.c Thu Jun 16 12:22:24 2011 +0200
-+++ b/mpn/generic/dcpi1_bdiv_q.c Fri Jul 15 13:43:41 2011 +0200
-@@ -7,7 +7,7 @@
- SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST
- GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE.
-
--Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
-+Copyright 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
-
- This file is part of the GNU MP Library.
-
-@@ -28,7 +28,6 @@
- #include "gmp-impl.h"
-
-
--
- mp_size_t
- mpn_dcpi1_bdiv_q_n_itch (mp_size_t n)
- {
-@@ -130,7 +129,7 @@
- qn = nn - qn;
- while (qn > dn)
- {
-- mpn_sub_1 (np + dn, np + dn, qn, cy);
-+ mpn_sub_1 (np + dn, np + dn, qn - dn, cy);
- cy = mpn_dcpi1_bdiv_qr_n (qp, np, dp, dn, dinv, tp);
- qp += dn;
- np += dn;
-
diff --git a/packages/gmp/5.0.2/version.desc b/packages/gmp/5.0.2/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/gmp/5.0.2/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/gmp/5.0.2/120-fix-r0-clobbering-issue.patch b/packages/gmp/5.0.5/120-fix-r0-clobbering-issue.patch
index d12d6b2..d12d6b2 100644
--- a/packages/gmp/5.0.2/120-fix-r0-clobbering-issue.patch
+++ b/packages/gmp/5.0.5/120-fix-r0-clobbering-issue.patch
diff --git a/packages/gmp/5.0.5/version.desc b/packages/gmp/5.0.5/version.desc
new file mode 100644
index 0000000..c898e11
--- /dev/null
+++ b/packages/gmp/5.0.5/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.xz .tar.bz2'
diff --git a/packages/gmp/5.1.1/100-fix-bulldozer-piledriver.patch b/packages/gmp/5.1.1/100-fix-bulldozer-piledriver.patch
deleted file mode 100644
index f6faca1..0000000
--- a/packages/gmp/5.1.1/100-fix-bulldozer-piledriver.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-
-# HG changeset patch
-# User Torbjorn Granlund <tege@gmplib.org>
-# Date 1368052461 -7200
-# Node ID 11fbd825bc45385d00b69c30bd7566acee11f0d2
-# Parent bd4c950486ab4c161ea69b91c25150719c3cb700
-Fix typo.
-
-diff -r bd4c950486ab -r 11fbd825bc45 mpn/x86_64/bd1/mul_1.asm
---- a/mpn/x86_64/bd1/mul_1.asm Thu May 02 18:20:37 2013 +0200
-+++ b/mpn/x86_64/bd1/mul_1.asm Thu May 09 00:34:21 2013 +0200
-@@ -53,7 +53,7 @@
- IFDOS(` define(`v0', ``%r9'') ') dnl
- IFDOS(` define(`r9', ``rdi'') ') dnl
- IFDOS(` define(`n', ``%r8'') ') dnl
--IFDOS(` define(`r8', ``r11'') ') dnl
-+IFDOS(` define(`r8', ``rbx'') ') dnl
-
- ASM_START()
- TEXT
-
diff --git a/packages/gmp/5.1.1/110-mpz_powm_ui.patch b/packages/gmp/5.1.1/110-mpz_powm_ui.patch
deleted file mode 100644
index f0d240c..0000000
--- a/packages/gmp/5.1.1/110-mpz_powm_ui.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-
-# HG changeset patch
-# User Torbjorn Granlund <tege@gmplib.org>
-# Date 1363174284 -3600
-# Node ID ec4d88674036804b26f22c6a2bfca6ae1e92d370
-# Parent e616ff715c34e112d0a5f7535d31ffe1194a5c7d
-(mod): Adhere to mpn_mu_div_qr's overlap requirements.
-
-diff -r e616ff715c34 -r ec4d88674036 mpz/powm_ui.c
---- a/mpz/powm_ui.c Sun Feb 17 19:40:16 2013 +0100
-+++ b/mpz/powm_ui.c Wed Mar 13 12:31:24 2013 +0100
-@@ -2,8 +2,8 @@
-
- Contributed to the GNU project by Torbjorn Granlund.
-
--Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2005, 2008,
--2009, 2011, 2012 Free Software Foundation, Inc.
-+Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2005, 2008, 2009,
-+2011, 2012, 2013 Free Software Foundation, Inc.
-
- This file is part of the GNU MP Library.
-
-@@ -70,9 +70,14 @@
- }
- else
- {
-+ /* We need to allocate separate remainder area, since mpn_mu_div_qr does
-+ not handle overlap between the numerator and remainder areas.
-+ FIXME: Make it handle such overlap. */
-+ mp_ptr rp = TMP_ALLOC_LIMBS (dn);
- mp_size_t itch = mpn_mu_div_qr_itch (nn, dn, 0);
- mp_ptr scratch = TMP_ALLOC_LIMBS (itch);
-- mpn_mu_div_qr (qp, np, np, nn, dp, dn, scratch);
-+ mpn_mu_div_qr (qp, rp, np, nn, dp, dn, scratch);
-+ MPN_COPY (np, rp, dn);
- }
-
- TMP_FREE;
-
diff --git a/packages/gmp/5.1.1/120-fix-mpn_sbpi1_div_qr_sec.patch b/packages/gmp/5.1.1/120-fix-mpn_sbpi1_div_qr_sec.patch
deleted file mode 100644
index 13a50ad..0000000
--- a/packages/gmp/5.1.1/120-fix-mpn_sbpi1_div_qr_sec.patch
+++ /dev/null
@@ -1,164 +0,0 @@
-
-# HG changeset patch
-# User Torbjorn Granlund <tege@gmplib.org>
-# Date 1373624469 -7200
-# Node ID a447c0c537891ed23edf180594a89616364ee633
-# Parent 6540e0b2925ead29f7158bb182e4fabfb9441433
-Partial rewrite.
-
-diff -r 6540e0b2925e -r a447c0c53789 mpn/generic/sbpi1_div_sec.c
---- a/mpn/generic/sbpi1_div_sec.c Mon Jul 01 19:16:32 2013 +0200
-+++ b/mpn/generic/sbpi1_div_sec.c Fri Jul 12 12:21:09 2013 +0200
-@@ -8,7 +8,7 @@
- SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST
- GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE.
-
--Copyright 2011, 2012 Free Software Foundation, Inc.
-+Copyright 2011, 2012, 2013 Free Software Foundation, Inc.
-
- This file is part of the GNU MP Library.
-
-@@ -29,6 +29,28 @@
- #include "gmp-impl.h"
- #include "longlong.h"
-
-+/* This side-channel silent division algorithm reduces the partial remainder by
-+ GMP_NUMB_BITS/2 bits at a time, compared to GMP_NUMB_BITS for the main
-+ division algorithm. We do not insists on reducing by exactly
-+ GMP_NUMB_BITS/2, but may leave a partial remainder that is D*B^i to 3D*B^i
-+ too large (B is the limb base, D is the divisor, and i is the induction
-+ variable); the subsequent step will handle the extra partial remainder bits.
-+
-+ WIth that partial remainder reduction, each step generates a quotient "half
-+ limb". The outer loop generates two quotient half limbs, an upper (q1h) and
-+ a lower (q0h) which are stored sparsely in separate limb arrays. These
-+ arrays are added at the end; using separate arrays avoids data-dependent
-+ carry propagation which could else pose a side-channel leakage problem.
-+
-+ The quotient half limbs may be between -3 to 0 from the accurate value
-+ ("accurate" being the one which corresponds to a reduction to a principal
-+ partial remainder). Too small quotient half limbs correspond to too large
-+ remainders, which we reduce later, as described above.
-+
-+ In order to keep quotients from getting too big, corresponding to a negative
-+ partial remainder, we use an inverse which is sligtly smaller than usually.
-+*/
-+
- #if OPERATION_sbpi1_div_qr_sec
- /* Needs (dn + 1) + (nn - dn) + (nn - dn) = 2nn - dn + 1 limbs at tp. */
- #define FNAME mpn_sbpi1_div_qr_sec
-@@ -49,7 +71,7 @@
- mp_limb_t dinv,
- mp_ptr tp)
- {
-- mp_limb_t nh, cy, q1h, q0h, dummy, h;
-+ mp_limb_t nh, cy, q1h, q0h, dummy, cnd;
- mp_size_t i;
- mp_ptr hp;
- #if OPERATION_sbpi1_div_qr_sec
-@@ -72,77 +94,69 @@
- #endif
- }
-
-+ /* Decremenet inverse to keep quotient half limbs from being too large. */
-+ dinv -= dinv != 0; /* FIXME: cmp-to-int */
-+
- /* Create a divisor copy shifted half a limb. */
- hp = tp; /* (dn + 1) limbs */
-- cy = mpn_lshift (hp, dp, dn, GMP_NUMB_BITS / 2);
-- hp[dn] = dp[dn - 1] >> GMP_NUMB_BITS / 2;
-+ hp[dn] = mpn_lshift (hp, dp, dn, GMP_NUMB_BITS / 2);
-
- #if OPERATION_sbpi1_div_qr_sec
- qlp = tp + (dn + 1); /* (nn - dn) limbs */
- qhp = tp + (nn + 1); /* (nn - dn) limbs */
- #endif
-
-- np += nn;
-+ np += nn - dn;
-+ nh = 0;
-
-- /* Main loop. Develop one full limb per iteration, but do it in two steps in
-- order to avoid conditionals. Quotient bits will be either correct or
-- underestimates. When a quotient is underestimated, the next quotient will
-- compensate, since quotients are to be added at consecutive weight distance
-- GMP_NUMB_BITS/2. We make two quotient arrays, each with GMP_NUMB_BITS/2+2
-- bits per entry. The arrays are added late after the loop. Separate
-- arrays avoid data-dependent carry propagation. */
-- nh = 0;
- for (i = nn - dn - 1; i >= 0; i--)
- {
- np--;
-
-- nh = (nh << GMP_NUMB_BITS/2) + (np[0] >> GMP_NUMB_BITS/2);
-+ nh = (nh << GMP_NUMB_BITS/2) + (np[dn] >> GMP_NUMB_BITS/2);
- umul_ppmm (q1h, dummy, nh, dinv);
- q1h += nh;
- #if OPERATION_sbpi1_div_qr_sec
- qhp[i] = q1h;
- #endif
-- cy = mpn_submul_1 (np - dn, hp, dn + 1, q1h);
-+ mpn_submul_1 (np, hp, dn + 1, q1h);
-
-- nh = np[0];
-+ nh = np[dn];
- umul_ppmm (q0h, dummy, nh, dinv);
- q0h += nh;
- #if OPERATION_sbpi1_div_qr_sec
- qlp[i] = q0h;
- #endif
-- cy = mpn_submul_1 (np - dn, dp, dn, q0h);
--
-- nh -= cy;
-+ nh -= mpn_submul_1 (np, dp, dn, q0h);
- }
-
-- np[0] = nh;
--
-- np -= dn;
--
- /* 1st adjustment depends on extra high remainder limb. */
-- h = np[dn];
-+ cnd = nh != 0; /* FIXME: cmp-to-int */
- #if OPERATION_sbpi1_div_qr_sec
-- qlp[0] += h;
-+ qlp[0] += cnd;
- #endif
-- h -= mpn_subcnd_n (np, np, dp, dn, h);
-+ nh -= mpn_subcnd_n (np, np, dp, dn, cnd);
-
-- /* 2nd adjustment depends on remainder/divisor comparision as well as whether
-+ /* 2nd adjustment depends on remainder/divisor comparison as well as whether
- extra remainder limb was nullified by previous subtract. */
- cy = mpn_sub_n (np, np, dp, dn);
-- cy = cy == h; /* FIXME: might leak on some archs */
-+ cy = cy - nh;
- #if OPERATION_sbpi1_div_qr_sec
-- qlp[0] += cy;
-+ qlp[0] += 1 - cy;
- #endif
-- mpn_addcnd_n (np, np, dp, dn, 1 - cy);
-+ mpn_addcnd_n (np, np, dp, dn, cy);
-
-+ /* 3rd adjustment depends on remainder/divisor comparison. */
-+ cy = mpn_sub_n (np, np, dp, dn);
-+#if OPERATION_sbpi1_div_qr_sec
-+ qlp[0] += 1 - cy;
-+#endif
-+ mpn_addcnd_n (np, np, dp, dn, cy);
-+
-+#if OPERATION_sbpi1_div_qr_sec
- /* Combine quotient halves into final quotient. */
--#if OPERATION_sbpi1_div_qr_sec
-- qh = 0;
-- if (nn - dn != 0)
-- {
-- qh = mpn_lshift (qhp, qhp, nn - dn, GMP_NUMB_BITS/2);
-- qh += mpn_add_n (qp, qhp, qlp, nn - dn);
-- }
-+ qh = mpn_lshift (qhp, qhp, nn - dn, GMP_NUMB_BITS/2);
-+ qh += mpn_add_n (qp, qhp, qlp, nn - dn);
-
- return qh;
- #else
-
diff --git a/packages/gmp/5.1.1/130-do-not-clobber-f16-f18.patch b/packages/gmp/5.1.1/130-do-not-clobber-f16-f18.patch
deleted file mode 100644
index 9f9f470..0000000
--- a/packages/gmp/5.1.1/130-do-not-clobber-f16-f18.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-
-# HG changeset patch
-# User Torbjorn Granlund <tege@gmplib.org>
-# Date 1369216954 -7200
-# Node ID 394bdf8fdaee749660cc5680cc0636ea0242fae7
-# Parent 0771124b9f13b218a3f07f7dd7c127961974489d
-Don't clobber f16-f18.
-
-diff -r 0771124b9f13 -r 394bdf8fdaee mpn/ia64/divrem_2.asm
---- a/mpn/ia64/divrem_2.asm Mon May 20 16:56:05 2013 +0200
-+++ b/mpn/ia64/divrem_2.asm Wed May 22 12:02:34 2013 +0200
-@@ -1,6 +1,6 @@
- dnl IA-64 mpn_divrem_2 -- Divide an mpn number by a normalized 2-limb number.
-
--dnl Copyright 2010 Free Software Foundation, Inc.
-+dnl Copyright 2010, 2013 Free Software Foundation, Inc.
-
- dnl This file is part of the GNU MP Library.
-
-@@ -98,17 +98,17 @@
- br.call.sptk.many b0 = mpn_invert_limb
- ;;
- setf.sig f11 = r8 // di (non-final)
-- setf.sig f18 = r39 // d1
-- setf.sig f17 = r36 // d0
-+ setf.sig f34 = r39 // d1
-+ setf.sig f33 = r36 // d0
- mov r1 = r43
- ;;
- mov r17 = 1
- setf.sig f9 = r38 // n2
-- xma.l f6 = f11, f18, f0 // t0 = LO(di * d1)
-+ xma.l f6 = f11, f34, f0 // t0 = LO(di * d1)
- ;;
- setf.sig f10 = r37 // n1
- setf.sig f15 = r17 // 1
-- xma.hu f8 = f11, f17, f0 // s0 = HI(di * d0)
-+ xma.hu f8 = f11, f33, f0 // s0 = HI(di * d0)
- ;;
- getf.sig r17 = f6
- getf.sig r16 = f8
-@@ -178,7 +178,7 @@
- (p9) br.cond.dptk .L52
- .L46:
- ')
-- setf.sig f16 = r8 // di
-+ setf.sig f32 = r8 // di
- shladd r32 = r35, 3, r32
- ;;
-
-@@ -189,8 +189,8 @@
- ;;
- (p8) mov r37 = r0
- (p9) ld8 r37 = [r34], -8
-- xma.hu f8 = f9, f16, f10 // 0,29
-- xma.l f12 = f9, f16, f10 // 0
-+ xma.hu f8 = f9, f32, f10 // 0,29
-+ xma.l f12 = f9, f32, f10 // 0
- ;;
- getf.sig r20 = f12 // q0 4
- xma.l f13 = f15, f8, f9 // q += n2 4
-@@ -198,8 +198,8 @@
- ;;
- getf.sig r18 = f13 // 8
- xma.l f7 = f14, f13, f10 // 8
-- xma.l f6 = f17, f13, f17 // t0 = LO(d0*q+d0) 8
-- xma.hu f9 = f17, f13, f17 // t1 = HI(d0*q+d0) 9
-+ xma.l f6 = f33, f13, f33 // t0 = LO(d0*q+d0) 8
-+ xma.hu f9 = f33, f13, f33 // t1 = HI(d0*q+d0) 9
- ;;
- getf.sig r38 = f7 // n1 12
- getf.sig r16 = f6 // 13
-
diff --git a/packages/gmp/5.1.1/version.desc b/packages/gmp/5.1.1/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/gmp/5.1.1/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/gmp/6.0.0a/version.desc b/packages/gmp/6.0.0a/version.desc
index fcfe389..71fe2fa 100644
--- a/packages/gmp/6.0.0a/version.desc
+++ b/packages/gmp/6.0.0a/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_dirname='gmp-6.0.0'
diff --git a/packages/gmp/6.1.0/100-fix-broadwell-skylake.patch b/packages/gmp/6.1.0/100-fix-broadwell-skylake.patch
deleted file mode 100644
index 9afd339..0000000
--- a/packages/gmp/6.1.0/100-fix-broadwell-skylake.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-
-# HG changeset patch
-# User Torbjorn Granlund <torbjorng@google.com>
-# Date 1450109109 -3600
-# Node ID 67d4ee9dead1ed8b1c9f4eb320ac72208fe1a015
-# Parent 20bf21d5f600710d62b040ea9b20da22871db1f1
-Add FUNC_EXITs.
-
-diff -r 20bf21d5f600 -r 67d4ee9dead1 NEWS
---- a/NEWS Mon Dec 14 08:37:18 2015 +0100
-+++ b/NEWS Mon Dec 14 17:05:09 2015 +0100
-@@ -4,6 +4,11 @@
- medium, provided this notice is preserved.
-
-
-+Changes between GMP version 6.1.1 and 6.1.0
-+
-+ BUGS FIXED
-+ * .
-+
- Changes between GMP version 6.0.* and 6.1.0
-
- BUGS FIXED
-diff -r 20bf21d5f600 -r 67d4ee9dead1 mpn/x86_64/coreibwl/mul_basecase.asm
---- a/mpn/x86_64/coreibwl/mul_basecase.asm Mon Dec 14 08:37:18 2015 +0100
-+++ b/mpn/x86_64/coreibwl/mul_basecase.asm Mon Dec 14 17:05:09 2015 +0100
-@@ -94,6 +94,7 @@
-
- L(s11): mov %rax, (rp)
- mov %r9, 8(rp)
-+ FUNC_EXIT()
- ret
-
- L(s2x): cmp $2, vn
-@@ -105,6 +106,7 @@
- mov %rax, (rp)
- mov %r9, 8(rp)
- mov %r10, 16(rp)
-+ FUNC_EXIT()
- ret
-
- L(s22): add %r8, %r9 C 1
-@@ -121,6 +123,7 @@
- mov %r9, 8(rp)
- mov %r10, 16(rp)
- mov %rdx, 24(rp)
-+ FUNC_EXIT()
- ret
-
- ALIGN(16)
-@@ -294,6 +297,7 @@
- pop %r12
- pop %rbp
- pop %rbx
-+ FUNC_EXIT()
- ret
-
- L(f2):
-
diff --git a/packages/gmp/6.1.0/version.desc b/packages/gmp/6.1.0/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/gmp/6.1.0/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/gmp/package.desc b/packages/gmp/package.desc
index eed0d3c..bb97cb5 100644
--- a/packages/gmp/package.desc
+++ b/packages/gmp/package.desc
@@ -1,4 +1,5 @@
repository='hg https://gmplib.org/repo/gmp/'
bootstrap='./.bootstrap'
-mirrors='https://gmplib.org/download/gmp $(CT_Mirrors GNU gmp)'
+mirrors='https://gmplib.org/download/gmp https://gmplib.org/download/gmp/archive $(CT_Mirrors GNU gmp)'
milestones='5.1'
+archive_formats='.tar.xz .tar.lz .tar.bz2'
diff --git a/packages/isl/0.11.1/version.desc b/packages/isl/0.11.1/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/isl/0.11.1/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/isl/0.11.2/version.desc b/packages/isl/0.11.2/version.desc
new file mode 100644
index 0000000..f96c492
--- /dev/null
+++ b/packages/isl/0.11.2/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.lzma .tar.bz2 .tar.gz'
diff --git a/packages/isl/0.12.2/version.desc b/packages/isl/0.12.2/version.desc
index fcfe389..f96c492 100644
--- a/packages/isl/0.12.2/version.desc
+++ b/packages/isl/0.12.2/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.lzma .tar.bz2 .tar.gz'
diff --git a/packages/uClibc-ng/1.0.20/version.desc b/packages/isl/0.14.1/version.desc
index fcfe389..fcfe389 100644
--- a/packages/uClibc-ng/1.0.20/version.desc
+++ b/packages/isl/0.14.1/version.desc
diff --git a/packages/isl/0.14/version.desc b/packages/isl/0.14/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/isl/0.14/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/isl/package.desc b/packages/isl/package.desc
index 1efde40..727bd30 100644
--- a/packages/isl/package.desc
+++ b/packages/isl/package.desc
@@ -2,3 +2,4 @@ repository='git git://repo.or.cz/isl.git'
bootstrap='./autogen.sh'
mirrors='http://isl.gforge.inria.fr'
milestones='0.12 0.13 0.14 0.15'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/libelf/0.8.12/100-fix-64-bit-detection.patch b/packages/libelf/0.8.12/100-fix-64-bit-detection.patch
deleted file mode 100644
index 7995443..0000000
--- a/packages/libelf/0.8.12/100-fix-64-bit-detection.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -dur libelf-0.8.10.orig/configure libelf-0.8.10/configure
---- libelf-0.8.10.orig/configure 2007-09-07 14:08:06.000000000 +0200
-+++ libelf-0.8.10/configure 2008-10-23 22:43:19.000000000 +0200
-@@ -1595,7 +1595,7 @@
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test "$cross_compiling" = yes; then
-- ac_cv_sizeof_long_long=0
-+ ac_cv_sizeof_long_long=8
- else
- cat > conftest.$ac_ext <<EOF
- #line 1602 "configure"
-diff -dur libelf-0.8.10.orig/configure.in libelf-0.8.10/configure.in
---- libelf-0.8.10.orig/configure.in 2007-09-07 14:07:59.000000000 +0200
-+++ libelf-0.8.10/configure.in 2008-10-23 22:43:10.000000000 +0200
-@@ -90,7 +90,7 @@
- AC_CHECK_SIZEOF(short,2)
- AC_CHECK_SIZEOF(int,4)
- AC_CHECK_SIZEOF(long,4)
--AC_CHECK_SIZEOF(long long,0)
-+AC_CHECK_SIZEOF(long long,8)
- # Windows port
- AC_CHECK_SIZEOF(__int64, 0)
-
diff --git a/packages/libelf/0.8.12/version.desc b/packages/libelf/0.8.12/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/libelf/0.8.12/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/libelf/package.desc b/packages/libelf/package.desc
index 4720cd4..e809220 100644
--- a/packages/libelf/package.desc
+++ b/packages/libelf/package.desc
@@ -1,3 +1,4 @@
# FIXME No public repository and no new releases.
# Consider switching to/adding project elftoolchain?
mirrors='http://www.mr511.de/software'
+archive_formats='.tar.gz'
diff --git a/packages/libiconv/package.desc b/packages/libiconv/package.desc
index f75054a..c80182d 100644
--- a/packages/libiconv/package.desc
+++ b/packages/libiconv/package.desc
@@ -3,3 +3,4 @@ repository='git https://git.savannah.gnu.org/git/libiconv.git'
# a separate package and depend on it in case of devel builds?
bootstrap='./autogen.sh'
mirrors='$(CT_Mirrors GNU libiconv)'
+archive_formats='.tar.gz'
diff --git a/packages/libtool/package.desc b/packages/libtool/package.desc
index 7338f84..ad15cfd 100644
--- a/packages/libtool/package.desc
+++ b/packages/libtool/package.desc
@@ -1,3 +1,4 @@
repository='git git://git.savannah.gnu.org/libtool.git'
bootstrap='./bootstrap'
mirrors='$(CT_Mirrors GNU libtool)'
+archive_formats='.tar.xz .tar.gz'
diff --git a/packages/linux/2.6.32.27/version.desc b/packages/linux/2.6.32.27/version.desc
index 3475dc2..1199456 100644
--- a/packages/linux/2.6.32.27/version.desc
+++ b/packages/linux/2.6.32.27/version.desc
@@ -1 +1,2 @@
# Not obsolete: used by CentOS6.x, EOL 11/2020
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/2.6.33.7/version.desc b/packages/linux/2.6.33.7/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/2.6.33.7/version.desc
+++ b/packages/linux/2.6.33.7/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/2.6.34.7/version.desc b/packages/linux/2.6.34.7/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/2.6.34.7/version.desc
+++ b/packages/linux/2.6.34.7/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/2.6.35.9/version.desc b/packages/linux/2.6.35.9/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/2.6.35.9/version.desc
+++ b/packages/linux/2.6.35.9/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/2.6.36.4/version.desc b/packages/linux/2.6.36.4/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/2.6.36.4/version.desc
+++ b/packages/linux/2.6.36.4/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/2.6.37.6/version.desc b/packages/linux/2.6.37.6/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/2.6.37.6/version.desc
+++ b/packages/linux/2.6.37.6/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/2.6.38.8/version.desc b/packages/linux/2.6.38.8/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/2.6.38.8/version.desc
+++ b/packages/linux/2.6.38.8/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/2.6.39.4/version.desc b/packages/linux/2.6.39.4/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/2.6.39.4/version.desc
+++ b/packages/linux/2.6.39.4/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/3.0.101/version.desc b/packages/linux/3.0.101/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/3.0.101/version.desc
+++ b/packages/linux/3.0.101/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/3.1.10/version.desc b/packages/linux/3.1.10/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/3.1.10/version.desc
+++ b/packages/linux/3.1.10/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/3.10.105/version.desc b/packages/linux/3.10.107/version.desc
index 7c0a082..7c0a082 100644
--- a/packages/linux/3.10.105/version.desc
+++ b/packages/linux/3.10.107/version.desc
diff --git a/packages/linux/3.11.10/version.desc b/packages/linux/3.11.10/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/3.11.10/version.desc
+++ b/packages/linux/3.11.10/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/4.1.40/version.desc b/packages/linux/3.16.46/version.desc
index e69de29..e69de29 100644
--- a/packages/linux/4.1.40/version.desc
+++ b/packages/linux/3.16.46/version.desc
diff --git a/packages/linux/3.18.55/version.desc b/packages/linux/3.18.55/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/linux/3.18.55/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/strace/4.5.19/version.desc b/packages/linux/3.18.66/version.desc
index fcfe389..fcfe389 100644
--- a/packages/strace/4.5.19/version.desc
+++ b/packages/linux/3.18.66/version.desc
diff --git a/packages/linux/3.2.88/version.desc b/packages/linux/3.2.91/version.desc
index e69de29..e69de29 100644
--- a/packages/linux/3.2.88/version.desc
+++ b/packages/linux/3.2.91/version.desc
diff --git a/packages/linux/3.3.8/version.desc b/packages/linux/3.3.8/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/3.3.8/version.desc
+++ b/packages/linux/3.3.8/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/3.5.7/version.desc b/packages/linux/3.5.7/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/3.5.7/version.desc
+++ b/packages/linux/3.5.7/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/3.6.11/version.desc b/packages/linux/3.6.11/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/3.6.11/version.desc
+++ b/packages/linux/3.6.11/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/3.7.10/version.desc b/packages/linux/3.7.10/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/3.7.10/version.desc
+++ b/packages/linux/3.7.10/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/3.8.13/version.desc b/packages/linux/3.8.13/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/3.8.13/version.desc
+++ b/packages/linux/3.8.13/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/3.9.11/version.desc b/packages/linux/3.9.11/version.desc
index fcfe389..40f81bc 100644
--- a/packages/linux/3.9.11/version.desc
+++ b/packages/linux/3.9.11/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/linux/3.16.43/version.desc b/packages/linux/4.1.43/version.desc
index e69de29..e69de29 100644
--- a/packages/linux/3.16.43/version.desc
+++ b/packages/linux/4.1.43/version.desc
diff --git a/packages/glibc-ports/2.14/version.desc b/packages/linux/4.11.12/version.desc
index e69de29..e69de29 100644
--- a/packages/glibc-ports/2.14/version.desc
+++ b/packages/linux/4.11.12/version.desc
diff --git a/packages/gcc/7.1.0/version.desc b/packages/linux/4.12.8/version.desc
index e69de29..e69de29 100644
--- a/packages/gcc/7.1.0/version.desc
+++ b/packages/linux/4.12.8/version.desc
diff --git a/packages/linux/4.4.70/version.desc b/packages/linux/4.4.83/version.desc
index 7d5188f..7d5188f 100644
--- a/packages/linux/4.4.70/version.desc
+++ b/packages/linux/4.4.83/version.desc
diff --git a/packages/expat/2.2.1/version.desc b/packages/linux/4.9.44/version.desc
index e69de29..e69de29 100644
--- a/packages/expat/2.2.1/version.desc
+++ b/packages/linux/4.9.44/version.desc
diff --git a/packages/linux/package.desc b/packages/linux/package.desc
index 3dae8f3..2ea5733 100644
--- a/packages/linux/package.desc
+++ b/packages/linux/package.desc
@@ -1,3 +1,5 @@
repository='git git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git'
mirrors='$(CT_Mirrors kernel.org linux ${CT_LINUX_VERSION})'
relevantpattern='2.*.*|. *.*|.'
+milestones='3.2'
+archive_formats='.tar.xz .tar.gz'
diff --git a/packages/ltrace/0.5.3/version.desc b/packages/ltrace/0.5.3/version.desc
index fcfe389..17de7cf 100644
--- a/packages/ltrace/0.5.3/version.desc
+++ b/packages/ltrace/0.5.3/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.gz'
diff --git a/packages/ltrace/package.desc b/packages/ltrace/package.desc
index 475c56b..df0bdda 100644
--- a/packages/ltrace/package.desc
+++ b/packages/ltrace/package.desc
@@ -3,3 +3,4 @@ bootstrap='./autogen.sh'
mirrors='http://ftp.debian.org/debian/pool/main/l/ltrace ftp:://ftp.debian.org/debian/pool/main/l/ltrace'
archive_filename='@{pkg_name}_@{version}.orig'
archive_dirname='@{pkg_name}-@{version}'
+archive_formats='.tar.bz2'
diff --git a/packages/m4/1.4.13/version.desc b/packages/m4/1.4.13/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/m4/1.4.13/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/m4/1.4.17/version.desc b/packages/m4/1.4.17/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/m4/1.4.17/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/m4/package.desc b/packages/m4/package.desc
index 6615cdc..eefb179 100644
--- a/packages/m4/package.desc
+++ b/packages/m4/package.desc
@@ -1,3 +1,4 @@
repository='git git://git.sv.gnu.org/m4'
bootstrap='./bootstrap'
mirrors='$(CT_Mirrors GNU m4)'
+archive_formats='.tar.xz .tar.bz2 .tar.gz'
diff --git a/packages/make/package.desc b/packages/make/package.desc
index 9eb9d07..8cb9ada 100644
--- a/packages/make/package.desc
+++ b/packages/make/package.desc
@@ -1,3 +1,4 @@
repository='git https://git.savannah.gnu.org/git/make.git'
bootstrap='autoreconf -i'
mirrors='$(CT_Mirrors GNU make)'
+archive_formats='.tar.bz2 .tar.gz'
diff --git a/packages/mingw-w64/package.desc b/packages/mingw-w64/package.desc
index bbe507a..12cb4f2 100644
--- a/packages/mingw-w64/package.desc
+++ b/packages/mingw-w64/package.desc
@@ -1,2 +1,4 @@
repository='git https://git.code.sf.net/p/mingw-w64/mingw-w64'
mirrors='http://downloads.sourceforge.net/sourceforge/mingw-w64 https://downloads.sourceforge.net/project/mingw-w64/mingw-w64/mingw-w64-release/'
+milestones='v4'
+archive_formats='.tar.bz2 .zip'
diff --git a/packages/mingw-w64/v4.0.5/100-mingw64-malloc.patch b/packages/mingw-w64/v2.0.10/100-mingw64-malloc.patch
index d9d5a61..d9d5a61 100644
--- a/packages/mingw-w64/v4.0.5/100-mingw64-malloc.patch
+++ b/packages/mingw-w64/v2.0.10/100-mingw64-malloc.patch
diff --git a/packages/mingw-w64/v2.0.10/200-gendef-explicit-fallthrough.patch b/packages/mingw-w64/v2.0.10/200-gendef-explicit-fallthrough.patch
new file mode 100644
index 0000000..7cfd511
--- /dev/null
+++ b/packages/mingw-w64/v2.0.10/200-gendef-explicit-fallthrough.patch
@@ -0,0 +1,42 @@
+commit b4416f9a54ca0f27adc4a5a2d576779ec1288047
+Author: sezero <sezero@users.sourceforge.net>
+Date: Thu Jun 15 09:50:00 2017 +0300
+
+ gendef.c (getMemonic): add /* fallthru */ comments in the switch to avoid -Wimplicit-fallthrough
+
+diff --git a/mingw-w64-tools/gendef/src/gendef.c b/mingw-w64-tools/gendef/src/gendef.c
+index a935abfe..0c5beaad 100644
+--- a/mingw-w64-tools/gendef/src/gendef.c
++++ b/mingw-w64-tools/gendef/src/gendef.c
+@@ -836,7 +836,7 @@ disassembleRetIntern (uint32_t pc, uint32_t *retpop, sAddresses *seen, sAddresse
+ if (!sz || code == c_ill)
+ {
+ PRDEBUG(" %s = 0x08%x ILL (%u) at least one==%d\n",name,
+- (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
++ (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
+ #if ENABLE_DEBUG == 1
+ {
+ unsigned char *ppc = (unsigned char *) map_va (pc);
+@@ -1031,10 +1031,10 @@ redo_switch:
+ PRDEBUG(" 0x%x illegal ", (unsigned int) b);
+ #endif
+ *aCode=c_ill; return 0;
+- case c_4: sz++;
+- case c_3: sz++;
++ case c_4: sz++;/* fallthru */
++ case c_3: sz++;/* fallthru */
+ case c_lb:
+- case c_2: sz++;
++ case c_2: sz++;/* fallthru */
+ case c_retn: case c_retf:
+ case c_iret: case c_int3:
+ case c_ad: case c_op:
+@@ -1061,7 +1061,7 @@ redo_switch:
+ p = (unsigned char *) map_va (pc + sz);
+ if (!p) { *aCode=c_ill; return 0; }
+ #if ENABLE_DEBUG == 1
+- enter_save_insn(lw,p[0]);
++ enter_save_insn(lw,p[0]);
+ #endif
+ b&=~0x7; b|=(p[0]&7);
+ sz+=1;
diff --git a/packages/mingw-w64/v2.0.10/version.desc b/packages/mingw-w64/v2.0.10/version.desc
new file mode 100644
index 0000000..17de7cf
--- /dev/null
+++ b/packages/mingw-w64/v2.0.10/version.desc
@@ -0,0 +1,2 @@
+obsolete='yes'
+archive_formats='.tar.gz'
diff --git a/packages/mingw-w64/v2.0.7/100-mingw64-malloc.patch b/packages/mingw-w64/v2.0.7/100-mingw64-malloc.patch
deleted file mode 100644
index d9d5a61..0000000
--- a/packages/mingw-w64/v2.0.7/100-mingw64-malloc.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
-@@ -26,7 +26,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
- #include <memory.h>
- #include <stdarg.h>
- #include <stdint.h>
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
-@@ -21,7 +21,10 @@
- #include "genidl_cfg.h"
- #include "genidl_typeinfo.h"
- #include "genidl_typinfo.h"
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
-+#include <stdlib.h>
- #include <string.h>
- #include <memory.h>
-
diff --git a/packages/mingw-w64/v2.0.7/version.desc b/packages/mingw-w64/v2.0.7/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mingw-w64/v2.0.7/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mingw-w64/v2.0.8/100-mingw64-malloc.patch b/packages/mingw-w64/v2.0.8/100-mingw64-malloc.patch
deleted file mode 100644
index d9d5a61..0000000
--- a/packages/mingw-w64/v2.0.8/100-mingw64-malloc.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
-@@ -26,7 +26,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
- #include <memory.h>
- #include <stdarg.h>
- #include <stdint.h>
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
-@@ -21,7 +21,10 @@
- #include "genidl_cfg.h"
- #include "genidl_typeinfo.h"
- #include "genidl_typinfo.h"
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
-+#include <stdlib.h>
- #include <string.h>
- #include <memory.h>
-
diff --git a/packages/mingw-w64/v2.0.8/version.desc b/packages/mingw-w64/v2.0.8/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mingw-w64/v2.0.8/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mingw-w64/v2.0.9/100-mingw64-malloc.patch b/packages/mingw-w64/v2.0.9/100-mingw64-malloc.patch
deleted file mode 100644
index d9d5a61..0000000
--- a/packages/mingw-w64/v2.0.9/100-mingw64-malloc.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
-@@ -26,7 +26,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
- #include <memory.h>
- #include <stdarg.h>
- #include <stdint.h>
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
-@@ -21,7 +21,10 @@
- #include "genidl_cfg.h"
- #include "genidl_typeinfo.h"
- #include "genidl_typinfo.h"
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
-+#include <stdlib.h>
- #include <string.h>
- #include <memory.h>
-
diff --git a/packages/mingw-w64/v2.0.9/version.desc b/packages/mingw-w64/v2.0.9/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mingw-w64/v2.0.9/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mingw-w64/v3.0.0/200-gendef-explicit-fallthrough.patch b/packages/mingw-w64/v3.0.0/200-gendef-explicit-fallthrough.patch
new file mode 100644
index 0000000..7cfd511
--- /dev/null
+++ b/packages/mingw-w64/v3.0.0/200-gendef-explicit-fallthrough.patch
@@ -0,0 +1,42 @@
+commit b4416f9a54ca0f27adc4a5a2d576779ec1288047
+Author: sezero <sezero@users.sourceforge.net>
+Date: Thu Jun 15 09:50:00 2017 +0300
+
+ gendef.c (getMemonic): add /* fallthru */ comments in the switch to avoid -Wimplicit-fallthrough
+
+diff --git a/mingw-w64-tools/gendef/src/gendef.c b/mingw-w64-tools/gendef/src/gendef.c
+index a935abfe..0c5beaad 100644
+--- a/mingw-w64-tools/gendef/src/gendef.c
++++ b/mingw-w64-tools/gendef/src/gendef.c
+@@ -836,7 +836,7 @@ disassembleRetIntern (uint32_t pc, uint32_t *retpop, sAddresses *seen, sAddresse
+ if (!sz || code == c_ill)
+ {
+ PRDEBUG(" %s = 0x08%x ILL (%u) at least one==%d\n",name,
+- (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
++ (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
+ #if ENABLE_DEBUG == 1
+ {
+ unsigned char *ppc = (unsigned char *) map_va (pc);
+@@ -1031,10 +1031,10 @@ redo_switch:
+ PRDEBUG(" 0x%x illegal ", (unsigned int) b);
+ #endif
+ *aCode=c_ill; return 0;
+- case c_4: sz++;
+- case c_3: sz++;
++ case c_4: sz++;/* fallthru */
++ case c_3: sz++;/* fallthru */
+ case c_lb:
+- case c_2: sz++;
++ case c_2: sz++;/* fallthru */
+ case c_retn: case c_retf:
+ case c_iret: case c_int3:
+ case c_ad: case c_op:
+@@ -1061,7 +1061,7 @@ redo_switch:
+ p = (unsigned char *) map_va (pc + sz);
+ if (!p) { *aCode=c_ill; return 0; }
+ #if ENABLE_DEBUG == 1
+- enter_save_insn(lw,p[0]);
++ enter_save_insn(lw,p[0]);
+ #endif
+ b&=~0x7; b|=(p[0]&7);
+ sz+=1;
diff --git a/packages/mingw-w64/v3.0.0/300-genpeimg-explicit-fallthrough.patch b/packages/mingw-w64/v3.0.0/300-genpeimg-explicit-fallthrough.patch
new file mode 100644
index 0000000..927c005
--- /dev/null
+++ b/packages/mingw-w64/v3.0.0/300-genpeimg-explicit-fallthrough.patch
@@ -0,0 +1,29 @@
+commit f9f2bd0641b89895ab42b1948f431dadf1e837a4
+Author: sezero <sezero@users.sourceforge.net>
+Date: Thu Jun 15 09:45:52 2017 +0300
+
+ genpeimg.c (pass_args): add a /* fallthru */ comment in the switch
+ after show_usage() to avoid -Wimplicit-fallthrough
+ (show_usage): mark the function with noreturn attribute.
+
+diff --git a/mingw-w64-tools/genpeimg/src/genpeimg.c b/mingw-w64-tools/genpeimg/src/genpeimg.c
+index b2430bbc..1ebe607d 100644
+--- a/mingw-w64-tools/genpeimg/src/genpeimg.c
++++ b/mingw-w64-tools/genpeimg/src/genpeimg.c
+@@ -28,7 +28,7 @@ unsigned short mask_pe_opt_hdr_dll_chara = 0xffff;
+ int dump_information = 0;
+ static char *file_name = NULL;
+
+-static void
++static void __attribute__((noreturn))
+ show_usage (void)
+ {
+ fprintf (stderr, "genpeimg [options] files...\n");
+@@ -204,6 +204,7 @@ pass_args (int argc, char **argv)
+ case 'h':
+ if (h[2] == 0)
+ show_usage ();
++ /* fallthru */
+ default:
+ error_point:
+ fprintf (stderr, "Unknown option ,%s'\n", h);
diff --git a/packages/mingw-w64/v3.0.0/version.desc b/packages/mingw-w64/v3.0.0/version.desc
index fcfe389..a114052 100644
--- a/packages/mingw-w64/v3.0.0/version.desc
+++ b/packages/mingw-w64/v3.0.0/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/mingw-w64/v3.1.0/200-gendef-explicit-fallthrough.patch b/packages/mingw-w64/v3.1.0/200-gendef-explicit-fallthrough.patch
new file mode 100644
index 0000000..7cfd511
--- /dev/null
+++ b/packages/mingw-w64/v3.1.0/200-gendef-explicit-fallthrough.patch
@@ -0,0 +1,42 @@
+commit b4416f9a54ca0f27adc4a5a2d576779ec1288047
+Author: sezero <sezero@users.sourceforge.net>
+Date: Thu Jun 15 09:50:00 2017 +0300
+
+ gendef.c (getMemonic): add /* fallthru */ comments in the switch to avoid -Wimplicit-fallthrough
+
+diff --git a/mingw-w64-tools/gendef/src/gendef.c b/mingw-w64-tools/gendef/src/gendef.c
+index a935abfe..0c5beaad 100644
+--- a/mingw-w64-tools/gendef/src/gendef.c
++++ b/mingw-w64-tools/gendef/src/gendef.c
+@@ -836,7 +836,7 @@ disassembleRetIntern (uint32_t pc, uint32_t *retpop, sAddresses *seen, sAddresse
+ if (!sz || code == c_ill)
+ {
+ PRDEBUG(" %s = 0x08%x ILL (%u) at least one==%d\n",name,
+- (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
++ (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
+ #if ENABLE_DEBUG == 1
+ {
+ unsigned char *ppc = (unsigned char *) map_va (pc);
+@@ -1031,10 +1031,10 @@ redo_switch:
+ PRDEBUG(" 0x%x illegal ", (unsigned int) b);
+ #endif
+ *aCode=c_ill; return 0;
+- case c_4: sz++;
+- case c_3: sz++;
++ case c_4: sz++;/* fallthru */
++ case c_3: sz++;/* fallthru */
+ case c_lb:
+- case c_2: sz++;
++ case c_2: sz++;/* fallthru */
+ case c_retn: case c_retf:
+ case c_iret: case c_int3:
+ case c_ad: case c_op:
+@@ -1061,7 +1061,7 @@ redo_switch:
+ p = (unsigned char *) map_va (pc + sz);
+ if (!p) { *aCode=c_ill; return 0; }
+ #if ENABLE_DEBUG == 1
+- enter_save_insn(lw,p[0]);
++ enter_save_insn(lw,p[0]);
+ #endif
+ b&=~0x7; b|=(p[0]&7);
+ sz+=1;
diff --git a/packages/mingw-w64/v3.1.0/300-genpeimg-explicit-fallthrough.patch b/packages/mingw-w64/v3.1.0/300-genpeimg-explicit-fallthrough.patch
new file mode 100644
index 0000000..927c005
--- /dev/null
+++ b/packages/mingw-w64/v3.1.0/300-genpeimg-explicit-fallthrough.patch
@@ -0,0 +1,29 @@
+commit f9f2bd0641b89895ab42b1948f431dadf1e837a4
+Author: sezero <sezero@users.sourceforge.net>
+Date: Thu Jun 15 09:45:52 2017 +0300
+
+ genpeimg.c (pass_args): add a /* fallthru */ comment in the switch
+ after show_usage() to avoid -Wimplicit-fallthrough
+ (show_usage): mark the function with noreturn attribute.
+
+diff --git a/mingw-w64-tools/genpeimg/src/genpeimg.c b/mingw-w64-tools/genpeimg/src/genpeimg.c
+index b2430bbc..1ebe607d 100644
+--- a/mingw-w64-tools/genpeimg/src/genpeimg.c
++++ b/mingw-w64-tools/genpeimg/src/genpeimg.c
+@@ -28,7 +28,7 @@ unsigned short mask_pe_opt_hdr_dll_chara = 0xffff;
+ int dump_information = 0;
+ static char *file_name = NULL;
+
+-static void
++static void __attribute__((noreturn))
+ show_usage (void)
+ {
+ fprintf (stderr, "genpeimg [options] files...\n");
+@@ -204,6 +204,7 @@ pass_args (int argc, char **argv)
+ case 'h':
+ if (h[2] == 0)
+ show_usage ();
++ /* fallthru */
+ default:
+ error_point:
+ fprintf (stderr, "Unknown option ,%s'\n", h);
diff --git a/packages/mingw-w64/v3.1.0/version.desc b/packages/mingw-w64/v3.1.0/version.desc
index fcfe389..a114052 100644
--- a/packages/mingw-w64/v3.1.0/version.desc
+++ b/packages/mingw-w64/v3.1.0/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/mingw-w64/v3.2.0/200-gendef-explicit-fallthrough.patch b/packages/mingw-w64/v3.2.0/200-gendef-explicit-fallthrough.patch
new file mode 100644
index 0000000..7cfd511
--- /dev/null
+++ b/packages/mingw-w64/v3.2.0/200-gendef-explicit-fallthrough.patch
@@ -0,0 +1,42 @@
+commit b4416f9a54ca0f27adc4a5a2d576779ec1288047
+Author: sezero <sezero@users.sourceforge.net>
+Date: Thu Jun 15 09:50:00 2017 +0300
+
+ gendef.c (getMemonic): add /* fallthru */ comments in the switch to avoid -Wimplicit-fallthrough
+
+diff --git a/mingw-w64-tools/gendef/src/gendef.c b/mingw-w64-tools/gendef/src/gendef.c
+index a935abfe..0c5beaad 100644
+--- a/mingw-w64-tools/gendef/src/gendef.c
++++ b/mingw-w64-tools/gendef/src/gendef.c
+@@ -836,7 +836,7 @@ disassembleRetIntern (uint32_t pc, uint32_t *retpop, sAddresses *seen, sAddresse
+ if (!sz || code == c_ill)
+ {
+ PRDEBUG(" %s = 0x08%x ILL (%u) at least one==%d\n",name,
+- (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
++ (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
+ #if ENABLE_DEBUG == 1
+ {
+ unsigned char *ppc = (unsigned char *) map_va (pc);
+@@ -1031,10 +1031,10 @@ redo_switch:
+ PRDEBUG(" 0x%x illegal ", (unsigned int) b);
+ #endif
+ *aCode=c_ill; return 0;
+- case c_4: sz++;
+- case c_3: sz++;
++ case c_4: sz++;/* fallthru */
++ case c_3: sz++;/* fallthru */
+ case c_lb:
+- case c_2: sz++;
++ case c_2: sz++;/* fallthru */
+ case c_retn: case c_retf:
+ case c_iret: case c_int3:
+ case c_ad: case c_op:
+@@ -1061,7 +1061,7 @@ redo_switch:
+ p = (unsigned char *) map_va (pc + sz);
+ if (!p) { *aCode=c_ill; return 0; }
+ #if ENABLE_DEBUG == 1
+- enter_save_insn(lw,p[0]);
++ enter_save_insn(lw,p[0]);
+ #endif
+ b&=~0x7; b|=(p[0]&7);
+ sz+=1;
diff --git a/packages/mingw-w64/v3.2.0/300-genpeimg-explicit-fallthrough.patch b/packages/mingw-w64/v3.2.0/300-genpeimg-explicit-fallthrough.patch
new file mode 100644
index 0000000..927c005
--- /dev/null
+++ b/packages/mingw-w64/v3.2.0/300-genpeimg-explicit-fallthrough.patch
@@ -0,0 +1,29 @@
+commit f9f2bd0641b89895ab42b1948f431dadf1e837a4
+Author: sezero <sezero@users.sourceforge.net>
+Date: Thu Jun 15 09:45:52 2017 +0300
+
+ genpeimg.c (pass_args): add a /* fallthru */ comment in the switch
+ after show_usage() to avoid -Wimplicit-fallthrough
+ (show_usage): mark the function with noreturn attribute.
+
+diff --git a/mingw-w64-tools/genpeimg/src/genpeimg.c b/mingw-w64-tools/genpeimg/src/genpeimg.c
+index b2430bbc..1ebe607d 100644
+--- a/mingw-w64-tools/genpeimg/src/genpeimg.c
++++ b/mingw-w64-tools/genpeimg/src/genpeimg.c
+@@ -28,7 +28,7 @@ unsigned short mask_pe_opt_hdr_dll_chara = 0xffff;
+ int dump_information = 0;
+ static char *file_name = NULL;
+
+-static void
++static void __attribute__((noreturn))
+ show_usage (void)
+ {
+ fprintf (stderr, "genpeimg [options] files...\n");
+@@ -204,6 +204,7 @@ pass_args (int argc, char **argv)
+ case 'h':
+ if (h[2] == 0)
+ show_usage ();
++ /* fallthru */
+ default:
+ error_point:
+ fprintf (stderr, "Unknown option ,%s'\n", h);
diff --git a/packages/mingw-w64/v3.2.0/version.desc b/packages/mingw-w64/v3.2.0/version.desc
index fcfe389..a114052 100644
--- a/packages/mingw-w64/v3.2.0/version.desc
+++ b/packages/mingw-w64/v3.2.0/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/mingw-w64/v3.3.0/200-gendef-explicit-fallthrough.patch b/packages/mingw-w64/v3.3.0/200-gendef-explicit-fallthrough.patch
new file mode 100644
index 0000000..7cfd511
--- /dev/null
+++ b/packages/mingw-w64/v3.3.0/200-gendef-explicit-fallthrough.patch
@@ -0,0 +1,42 @@
+commit b4416f9a54ca0f27adc4a5a2d576779ec1288047
+Author: sezero <sezero@users.sourceforge.net>
+Date: Thu Jun 15 09:50:00 2017 +0300
+
+ gendef.c (getMemonic): add /* fallthru */ comments in the switch to avoid -Wimplicit-fallthrough
+
+diff --git a/mingw-w64-tools/gendef/src/gendef.c b/mingw-w64-tools/gendef/src/gendef.c
+index a935abfe..0c5beaad 100644
+--- a/mingw-w64-tools/gendef/src/gendef.c
++++ b/mingw-w64-tools/gendef/src/gendef.c
+@@ -836,7 +836,7 @@ disassembleRetIntern (uint32_t pc, uint32_t *retpop, sAddresses *seen, sAddresse
+ if (!sz || code == c_ill)
+ {
+ PRDEBUG(" %s = 0x08%x ILL (%u) at least one==%d\n",name,
+- (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
++ (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
+ #if ENABLE_DEBUG == 1
+ {
+ unsigned char *ppc = (unsigned char *) map_va (pc);
+@@ -1031,10 +1031,10 @@ redo_switch:
+ PRDEBUG(" 0x%x illegal ", (unsigned int) b);
+ #endif
+ *aCode=c_ill; return 0;
+- case c_4: sz++;
+- case c_3: sz++;
++ case c_4: sz++;/* fallthru */
++ case c_3: sz++;/* fallthru */
+ case c_lb:
+- case c_2: sz++;
++ case c_2: sz++;/* fallthru */
+ case c_retn: case c_retf:
+ case c_iret: case c_int3:
+ case c_ad: case c_op:
+@@ -1061,7 +1061,7 @@ redo_switch:
+ p = (unsigned char *) map_va (pc + sz);
+ if (!p) { *aCode=c_ill; return 0; }
+ #if ENABLE_DEBUG == 1
+- enter_save_insn(lw,p[0]);
++ enter_save_insn(lw,p[0]);
+ #endif
+ b&=~0x7; b|=(p[0]&7);
+ sz+=1;
diff --git a/packages/mingw-w64/v3.3.0/300-genpeimg-explicit-fallthrough.patch b/packages/mingw-w64/v3.3.0/300-genpeimg-explicit-fallthrough.patch
new file mode 100644
index 0000000..927c005
--- /dev/null
+++ b/packages/mingw-w64/v3.3.0/300-genpeimg-explicit-fallthrough.patch
@@ -0,0 +1,29 @@
+commit f9f2bd0641b89895ab42b1948f431dadf1e837a4
+Author: sezero <sezero@users.sourceforge.net>
+Date: Thu Jun 15 09:45:52 2017 +0300
+
+ genpeimg.c (pass_args): add a /* fallthru */ comment in the switch
+ after show_usage() to avoid -Wimplicit-fallthrough
+ (show_usage): mark the function with noreturn attribute.
+
+diff --git a/mingw-w64-tools/genpeimg/src/genpeimg.c b/mingw-w64-tools/genpeimg/src/genpeimg.c
+index b2430bbc..1ebe607d 100644
+--- a/mingw-w64-tools/genpeimg/src/genpeimg.c
++++ b/mingw-w64-tools/genpeimg/src/genpeimg.c
+@@ -28,7 +28,7 @@ unsigned short mask_pe_opt_hdr_dll_chara = 0xffff;
+ int dump_information = 0;
+ static char *file_name = NULL;
+
+-static void
++static void __attribute__((noreturn))
+ show_usage (void)
+ {
+ fprintf (stderr, "genpeimg [options] files...\n");
+@@ -204,6 +204,7 @@ pass_args (int argc, char **argv)
+ case 'h':
+ if (h[2] == 0)
+ show_usage ();
++ /* fallthru */
+ default:
+ error_point:
+ fprintf (stderr, "Unknown option ,%s'\n", h);
diff --git a/packages/mingw-w64/v3.3.0/version.desc b/packages/mingw-w64/v3.3.0/version.desc
index fcfe389..a114052 100644
--- a/packages/mingw-w64/v3.3.0/version.desc
+++ b/packages/mingw-w64/v3.3.0/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/mingw-w64/v4.0.0/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.0/100-mingw64-malloc.patch
deleted file mode 100644
index d9d5a61..0000000
--- a/packages/mingw-w64/v4.0.0/100-mingw64-malloc.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
-@@ -26,7 +26,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
- #include <memory.h>
- #include <stdarg.h>
- #include <stdint.h>
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
-@@ -21,7 +21,10 @@
- #include "genidl_cfg.h"
- #include "genidl_typeinfo.h"
- #include "genidl_typinfo.h"
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
-+#include <stdlib.h>
- #include <string.h>
- #include <memory.h>
-
diff --git a/packages/mingw-w64/v4.0.0/version.desc b/packages/mingw-w64/v4.0.0/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mingw-w64/v4.0.0/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mingw-w64/v4.0.1/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.1/100-mingw64-malloc.patch
deleted file mode 100644
index d9d5a61..0000000
--- a/packages/mingw-w64/v4.0.1/100-mingw64-malloc.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
-@@ -26,7 +26,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
- #include <memory.h>
- #include <stdarg.h>
- #include <stdint.h>
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
-@@ -21,7 +21,10 @@
- #include "genidl_cfg.h"
- #include "genidl_typeinfo.h"
- #include "genidl_typinfo.h"
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
-+#include <stdlib.h>
- #include <string.h>
- #include <memory.h>
-
diff --git a/packages/mingw-w64/v4.0.1/version.desc b/packages/mingw-w64/v4.0.1/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mingw-w64/v4.0.1/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mingw-w64/v4.0.2/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.2/100-mingw64-malloc.patch
deleted file mode 100644
index d9d5a61..0000000
--- a/packages/mingw-w64/v4.0.2/100-mingw64-malloc.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
-@@ -26,7 +26,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
- #include <memory.h>
- #include <stdarg.h>
- #include <stdint.h>
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
-@@ -21,7 +21,10 @@
- #include "genidl_cfg.h"
- #include "genidl_typeinfo.h"
- #include "genidl_typinfo.h"
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
-+#include <stdlib.h>
- #include <string.h>
- #include <memory.h>
-
diff --git a/packages/mingw-w64/v4.0.2/version.desc b/packages/mingw-w64/v4.0.2/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mingw-w64/v4.0.2/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mingw-w64/v4.0.4/100-mingw64-malloc.patch b/packages/mingw-w64/v4.0.4/100-mingw64-malloc.patch
deleted file mode 100644
index d9d5a61..0000000
--- a/packages/mingw-w64/v4.0.4/100-mingw64-malloc.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
-@@ -26,7 +26,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
- #include <memory.h>
- #include <stdarg.h>
- #include <stdint.h>
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
-@@ -21,7 +21,10 @@
- #include "genidl_cfg.h"
- #include "genidl_typeinfo.h"
- #include "genidl_typinfo.h"
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
-+#include <stdlib.h>
- #include <string.h>
- #include <memory.h>
-
diff --git a/packages/mingw-w64/v4.0.4/version.desc b/packages/mingw-w64/v4.0.4/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mingw-w64/v4.0.4/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mingw-w64/v4.0.5/version.desc b/packages/mingw-w64/v4.0.5/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mingw-w64/v4.0.5/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mingw-w64/v4.0.6/200-gendef-explicit-fallthrough.patch b/packages/mingw-w64/v4.0.6/200-gendef-explicit-fallthrough.patch
new file mode 100644
index 0000000..7cfd511
--- /dev/null
+++ b/packages/mingw-w64/v4.0.6/200-gendef-explicit-fallthrough.patch
@@ -0,0 +1,42 @@
+commit b4416f9a54ca0f27adc4a5a2d576779ec1288047
+Author: sezero <sezero@users.sourceforge.net>
+Date: Thu Jun 15 09:50:00 2017 +0300
+
+ gendef.c (getMemonic): add /* fallthru */ comments in the switch to avoid -Wimplicit-fallthrough
+
+diff --git a/mingw-w64-tools/gendef/src/gendef.c b/mingw-w64-tools/gendef/src/gendef.c
+index a935abfe..0c5beaad 100644
+--- a/mingw-w64-tools/gendef/src/gendef.c
++++ b/mingw-w64-tools/gendef/src/gendef.c
+@@ -836,7 +836,7 @@ disassembleRetIntern (uint32_t pc, uint32_t *retpop, sAddresses *seen, sAddresse
+ if (!sz || code == c_ill)
+ {
+ PRDEBUG(" %s = 0x08%x ILL (%u) at least one==%d\n",name,
+- (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
++ (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
+ #if ENABLE_DEBUG == 1
+ {
+ unsigned char *ppc = (unsigned char *) map_va (pc);
+@@ -1031,10 +1031,10 @@ redo_switch:
+ PRDEBUG(" 0x%x illegal ", (unsigned int) b);
+ #endif
+ *aCode=c_ill; return 0;
+- case c_4: sz++;
+- case c_3: sz++;
++ case c_4: sz++;/* fallthru */
++ case c_3: sz++;/* fallthru */
+ case c_lb:
+- case c_2: sz++;
++ case c_2: sz++;/* fallthru */
+ case c_retn: case c_retf:
+ case c_iret: case c_int3:
+ case c_ad: case c_op:
+@@ -1061,7 +1061,7 @@ redo_switch:
+ p = (unsigned char *) map_va (pc + sz);
+ if (!p) { *aCode=c_ill; return 0; }
+ #if ENABLE_DEBUG == 1
+- enter_save_insn(lw,p[0]);
++ enter_save_insn(lw,p[0]);
+ #endif
+ b&=~0x7; b|=(p[0]&7);
+ sz+=1;
diff --git a/packages/mingw-w64/v4.0.6/300-genpeimg-explicit-fallthrough.patch b/packages/mingw-w64/v4.0.6/300-genpeimg-explicit-fallthrough.patch
new file mode 100644
index 0000000..927c005
--- /dev/null
+++ b/packages/mingw-w64/v4.0.6/300-genpeimg-explicit-fallthrough.patch
@@ -0,0 +1,29 @@
+commit f9f2bd0641b89895ab42b1948f431dadf1e837a4
+Author: sezero <sezero@users.sourceforge.net>
+Date: Thu Jun 15 09:45:52 2017 +0300
+
+ genpeimg.c (pass_args): add a /* fallthru */ comment in the switch
+ after show_usage() to avoid -Wimplicit-fallthrough
+ (show_usage): mark the function with noreturn attribute.
+
+diff --git a/mingw-w64-tools/genpeimg/src/genpeimg.c b/mingw-w64-tools/genpeimg/src/genpeimg.c
+index b2430bbc..1ebe607d 100644
+--- a/mingw-w64-tools/genpeimg/src/genpeimg.c
++++ b/mingw-w64-tools/genpeimg/src/genpeimg.c
+@@ -28,7 +28,7 @@ unsigned short mask_pe_opt_hdr_dll_chara = 0xffff;
+ int dump_information = 0;
+ static char *file_name = NULL;
+
+-static void
++static void __attribute__((noreturn))
+ show_usage (void)
+ {
+ fprintf (stderr, "genpeimg [options] files...\n");
+@@ -204,6 +204,7 @@ pass_args (int argc, char **argv)
+ case 'h':
+ if (h[2] == 0)
+ show_usage ();
++ /* fallthru */
+ default:
+ error_point:
+ fprintf (stderr, "Unknown option ,%s'\n", h);
diff --git a/packages/mingw-w64/v5.0.0/100-mingw64-malloc.patch b/packages/mingw-w64/v5.0.0/100-mingw64-malloc.patch
deleted file mode 100644
index 3d05b63..0000000
--- a/packages/mingw-w64/v5.0.0/100-mingw64-malloc.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
-@@ -26,7 +26,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
- #include <memory.h>
- #include <stdarg.h>
- #include <stdint.h>
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
-@@ -21,7 +21,10 @@
- #include "genidl_cfg.h"
- #include "genidl_typeinfo.h"
- #include "genidl_typinfo.h"
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
-+#include <stdlib.h>
- #include <string.h>
- #include <memory.h>
-
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:26:21.000000000 -0800
-@@ -12,9 +12,8 @@
- #define PATHTOOLS_H
-
- #include <unistd.h>
--#if defined(__APPLE__)
- #include <stdlib.h>
--#else
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
- #endif
- #include <stdio.h>
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:26:40.000000000 -0800
-@@ -8,9 +8,8 @@
- .email: <mingw.android@gmail.com>.
- */
-
--#if defined(__APPLE__)
- #include <stdlib.h>
--#else
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
- #endif
- #include <limits.h>
diff --git a/packages/mingw-w64/v5.0.0/version.desc b/packages/mingw-w64/v5.0.0/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mingw-w64/v5.0.0/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mingw-w64/v5.0.1/100-mingw64-malloc.patch b/packages/mingw-w64/v5.0.1/100-mingw64-malloc.patch
deleted file mode 100644
index 3d05b63..0000000
--- a/packages/mingw-w64/v5.0.1/100-mingw64-malloc.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
-@@ -26,7 +26,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
- #include <memory.h>
- #include <stdarg.h>
- #include <stdint.h>
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
-@@ -21,7 +21,10 @@
- #include "genidl_cfg.h"
- #include "genidl_typeinfo.h"
- #include "genidl_typinfo.h"
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
-+#endif
-+#include <stdlib.h>
- #include <string.h>
- #include <memory.h>
-
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:26:21.000000000 -0800
-@@ -12,9 +12,8 @@
- #define PATHTOOLS_H
-
- #include <unistd.h>
--#if defined(__APPLE__)
- #include <stdlib.h>
--#else
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
- #endif
- #include <stdio.h>
-diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c
---- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:20:09.000000000 -0800
-+++ mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:26:40.000000000 -0800
-@@ -8,9 +8,8 @@
- .email: <mingw.android@gmail.com>.
- */
-
--#if defined(__APPLE__)
- #include <stdlib.h>
--#else
-+#if defined(HAVE_MALLOC_H)
- #include <malloc.h>
- #endif
- #include <limits.h>
diff --git a/packages/mingw-w64/v5.0.2/200-gendef-explicit-fallthrough.patch b/packages/mingw-w64/v5.0.2/200-gendef-explicit-fallthrough.patch
new file mode 100644
index 0000000..7cfd511
--- /dev/null
+++ b/packages/mingw-w64/v5.0.2/200-gendef-explicit-fallthrough.patch
@@ -0,0 +1,42 @@
+commit b4416f9a54ca0f27adc4a5a2d576779ec1288047
+Author: sezero <sezero@users.sourceforge.net>
+Date: Thu Jun 15 09:50:00 2017 +0300
+
+ gendef.c (getMemonic): add /* fallthru */ comments in the switch to avoid -Wimplicit-fallthrough
+
+diff --git a/mingw-w64-tools/gendef/src/gendef.c b/mingw-w64-tools/gendef/src/gendef.c
+index a935abfe..0c5beaad 100644
+--- a/mingw-w64-tools/gendef/src/gendef.c
++++ b/mingw-w64-tools/gendef/src/gendef.c
+@@ -836,7 +836,7 @@ disassembleRetIntern (uint32_t pc, uint32_t *retpop, sAddresses *seen, sAddresse
+ if (!sz || code == c_ill)
+ {
+ PRDEBUG(" %s = 0x08%x ILL (%u) at least one==%d\n",name,
+- (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
++ (unsigned int) pc, (unsigned int) sz,atleast_one[0]);
+ #if ENABLE_DEBUG == 1
+ {
+ unsigned char *ppc = (unsigned char *) map_va (pc);
+@@ -1031,10 +1031,10 @@ redo_switch:
+ PRDEBUG(" 0x%x illegal ", (unsigned int) b);
+ #endif
+ *aCode=c_ill; return 0;
+- case c_4: sz++;
+- case c_3: sz++;
++ case c_4: sz++;/* fallthru */
++ case c_3: sz++;/* fallthru */
+ case c_lb:
+- case c_2: sz++;
++ case c_2: sz++;/* fallthru */
+ case c_retn: case c_retf:
+ case c_iret: case c_int3:
+ case c_ad: case c_op:
+@@ -1061,7 +1061,7 @@ redo_switch:
+ p = (unsigned char *) map_va (pc + sz);
+ if (!p) { *aCode=c_ill; return 0; }
+ #if ENABLE_DEBUG == 1
+- enter_save_insn(lw,p[0]);
++ enter_save_insn(lw,p[0]);
+ #endif
+ b&=~0x7; b|=(p[0]&7);
+ sz+=1;
diff --git a/packages/mingw-w64/v5.0.2/300-genpeimg-explicit-fallthrough.patch b/packages/mingw-w64/v5.0.2/300-genpeimg-explicit-fallthrough.patch
new file mode 100644
index 0000000..927c005
--- /dev/null
+++ b/packages/mingw-w64/v5.0.2/300-genpeimg-explicit-fallthrough.patch
@@ -0,0 +1,29 @@
+commit f9f2bd0641b89895ab42b1948f431dadf1e837a4
+Author: sezero <sezero@users.sourceforge.net>
+Date: Thu Jun 15 09:45:52 2017 +0300
+
+ genpeimg.c (pass_args): add a /* fallthru */ comment in the switch
+ after show_usage() to avoid -Wimplicit-fallthrough
+ (show_usage): mark the function with noreturn attribute.
+
+diff --git a/mingw-w64-tools/genpeimg/src/genpeimg.c b/mingw-w64-tools/genpeimg/src/genpeimg.c
+index b2430bbc..1ebe607d 100644
+--- a/mingw-w64-tools/genpeimg/src/genpeimg.c
++++ b/mingw-w64-tools/genpeimg/src/genpeimg.c
+@@ -28,7 +28,7 @@ unsigned short mask_pe_opt_hdr_dll_chara = 0xffff;
+ int dump_information = 0;
+ static char *file_name = NULL;
+
+-static void
++static void __attribute__((noreturn))
+ show_usage (void)
+ {
+ fprintf (stderr, "genpeimg [options] files...\n");
+@@ -204,6 +204,7 @@ pass_args (int argc, char **argv)
+ case 'h':
+ if (h[2] == 0)
+ show_usage ();
++ /* fallthru */
+ default:
+ error_point:
+ fprintf (stderr, "Unknown option ,%s'\n", h);
diff --git a/packages/mpc/0.7/version.desc b/packages/mpc/0.7/version.desc
index fcfe389..a529846 100644
--- a/packages/mpc/0.7/version.desc
+++ b/packages/mpc/0.7/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+mirrors='http://www.multiprecision.org/mpc/download'
diff --git a/packages/mpc/0.8.1/100-fix-build-with-mpfr-3_0_9.diff b/packages/mpc/0.8.1/100-fix-build-with-mpfr-3_0_9.diff
deleted file mode 100644
index 88e1517..0000000
--- a/packages/mpc/0.8.1/100-fix-build-with-mpfr-3_0_9.diff
+++ /dev/null
@@ -1,14 +0,0 @@
---- trunk/src/acos.c 2009/12/08 16:49:43 733
-+++ trunk/src/acos.c 2009/12/09 20:51:38 734
-@@ -188,10 +188,7 @@
- else
- rnd_im = rnd_im == GMP_RNDU ? GMP_RNDD
- : rnd_im == GMP_RNDD ? GMP_RNDU
--#if MPFR_VERSION_MAJOR >= 3
-- : rnd_im == GMP_RNDA ? GMP_RNDZ
--#endif
-- : rnd_im;
-+ : rnd_im; /* both RNDZ and RNDA map to themselves for -asin(z) */
- rnd1 = RNDC(GMP_RNDN, rnd_im);
- mpfr_init2 (pi_over_2, p);
- for (;;)
diff --git a/packages/mpc/0.8.1/version.desc b/packages/mpc/0.8.1/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mpc/0.8.1/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mpc/0.8.2/version.desc b/packages/mpc/0.8.2/version.desc
index fcfe389..a529846 100644
--- a/packages/mpc/0.8.2/version.desc
+++ b/packages/mpc/0.8.2/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+mirrors='http://www.multiprecision.org/mpc/download'
diff --git a/packages/mpc/0.9/version.desc b/packages/mpc/0.9/version.desc
index fcfe389..a529846 100644
--- a/packages/mpc/0.9/version.desc
+++ b/packages/mpc/0.9/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+mirrors='http://www.multiprecision.org/mpc/download'
diff --git a/packages/mpc/1.0.1/version.desc b/packages/mpc/1.0.1/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mpc/1.0.1/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mpc/1.0.2/version.desc b/packages/mpc/1.0.2/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mpc/1.0.2/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mpc/1.0/version.desc b/packages/mpc/1.0/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mpc/1.0/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mpc/package.desc b/packages/mpc/package.desc
index 8eba114..04c2ac2 100644
--- a/packages/mpc/package.desc
+++ b/packages/mpc/package.desc
@@ -1,3 +1,6 @@
repository='git https://scm.gforge.inria.fr/anonscm/git/mpc/mpc.git'
bootstrap='autoreconf -i'
+
mirrors='http://www.multiprecision.org/mpc/download $(CT_Mirrors GNU mpc)'
+
+archive_formats='.tar.gz'
diff --git a/packages/mpfr/2.4.0/100-printf-hh-ll.patch b/packages/mpfr/2.4.0/100-printf-hh-ll.patch
deleted file mode 100644
index e2a9f81..0000000
--- a/packages/mpfr/2.4.0/100-printf-hh-ll.patch
+++ /dev/null
@@ -1,359 +0,0 @@
-diff -Naurd mpfr-2.4.0-a/PATCHES mpfr-2.4.0-b/PATCHES
---- mpfr-2.4.0-a/PATCHES 2009-01-26 12:52:01.000000000 +0000
-+++ mpfr-2.4.0-b/PATCHES 2009-02-20 17:27:44.000000000 +0000
-@@ -0,0 +1 @@
-+printf-hh-ll
-diff -Naurd mpfr-2.4.0-a/VERSION mpfr-2.4.0-b/VERSION
---- mpfr-2.4.0-a/VERSION 2009-01-26 12:52:01.000000000 +0000
-+++ mpfr-2.4.0-b/VERSION 2009-02-20 17:27:44.000000000 +0000
-@@ -1 +1 @@
--2.4.0
-+2.4.0-p1
-diff -Naurd mpfr-2.4.0-a/acinclude.m4 mpfr-2.4.0-b/acinclude.m4
---- mpfr-2.4.0-a/acinclude.m4 2009-01-26 12:52:01.000000000 +0000
-+++ mpfr-2.4.0-b/acinclude.m4 2009-01-26 12:52:01.000000000 +0000
-@@ -722,6 +722,16 @@
- [AC_DEFINE([NPRINTF_J], 1, [gmp_printf cannot read intmax_t])])
- fi
-
-+MPFR_FUNC_PRINTF_SPEC([%hhd], [char], [
-+#include <gmp.h>
-+ ], [gmp_],,
-+ [AC_DEFINE([NPRINTF_HH], 1, [gmp_printf cannot use 'hh' length modifier])])
-+
-+MPFR_FUNC_PRINTF_SPEC([%lld], [long long int], [
-+#include <gmp.h>
-+ ], [gmp_],,
-+ [AC_DEFINE([NPRINTF_LL], 1, [gmp_printf cannot read long long int])])
-+
- MPFR_FUNC_PRINTF_SPEC([%.0Lf], [long double], [
- #include <gmp.h>
- ], [gmp_],,
-diff -Naurd mpfr-2.4.0-a/configure mpfr-2.4.0-b/configure
---- mpfr-2.4.0-a/configure 2009-01-26 12:54:36.000000000 +0000
-+++ mpfr-2.4.0-b/configure 2009-02-20 17:38:36.000000000 +0000
-@@ -24874,6 +24874,170 @@
- fi
-
-
-+{ $as_echo "$as_me:$LINENO: checking if gmp_printf supports \"%hhd\"" >&5
-+$as_echo_n "checking if gmp_printf supports \"%hhd\"... " >&6; }
-+if test "$cross_compiling" = yes; then
-+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-+See \`config.log' for more details." >&5
-+$as_echo "$as_me: error: cannot run test program while cross compiling
-+See \`config.log' for more details." >&2;}
-+ { (exit 1); exit 1; }; }; }
-+else
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+
-+#include <stdio.h>
-+
-+#include <gmp.h>
-+
-+
-+int
-+main ()
-+{
-+
-+ char s[256];
-+ char a = 0;
-+ return (gmp_sprintf (s, "%hhd", a) != 1) ? 1 : 0;
-+
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest$ac_exeext
-+if { (ac_try="$ac_link"
-+case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-+$as_echo "$ac_try_echo") >&5
-+ (eval "$ac_link") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-+ { (case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-+$as_echo "$ac_try_echo") >&5
-+ (eval "$ac_try") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-+ { $as_echo "$as_me:$LINENO: result: yes" >&5
-+$as_echo "yes" >&6; }
-+
-+else
-+ $as_echo "$as_me: program exited with status $ac_status" >&5
-+$as_echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+( exit $ac_status )
-+{ $as_echo "$as_me:$LINENO: result: no" >&5
-+$as_echo "no" >&6; }
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define NPRINTF_HH 1
-+_ACEOF
-+
-+fi
-+rm -rf conftest.dSYM
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+fi
-+
-+
-+
-+
-+
-+{ $as_echo "$as_me:$LINENO: checking if gmp_printf supports \"%lld\"" >&5
-+$as_echo_n "checking if gmp_printf supports \"%lld\"... " >&6; }
-+if test "$cross_compiling" = yes; then
-+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-+See \`config.log' for more details." >&5
-+$as_echo "$as_me: error: cannot run test program while cross compiling
-+See \`config.log' for more details." >&2;}
-+ { (exit 1); exit 1; }; }; }
-+else
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+
-+#include <stdio.h>
-+
-+#include <gmp.h>
-+
-+
-+int
-+main ()
-+{
-+
-+ char s[256];
-+ long long int a = 0;
-+ return (gmp_sprintf (s, "%lld", a) != 1) ? 1 : 0;
-+
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest$ac_exeext
-+if { (ac_try="$ac_link"
-+case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-+$as_echo "$ac_try_echo") >&5
-+ (eval "$ac_link") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-+ { (case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-+$as_echo "$ac_try_echo") >&5
-+ (eval "$ac_try") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-+ { $as_echo "$as_me:$LINENO: result: yes" >&5
-+$as_echo "yes" >&6; }
-+
-+else
-+ $as_echo "$as_me: program exited with status $ac_status" >&5
-+$as_echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+( exit $ac_status )
-+{ $as_echo "$as_me:$LINENO: result: no" >&5
-+$as_echo "no" >&6; }
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define NPRINTF_LL 1
-+_ACEOF
-+
-+fi
-+rm -rf conftest.dSYM
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-+fi
-+
-+
-+
-+
-+
- { $as_echo "$as_me:$LINENO: checking if gmp_printf supports \"%.0Lf\"" >&5
- $as_echo_n "checking if gmp_printf supports \"%.0Lf\"... " >&6; }
- if test "$cross_compiling" = yes; then
-diff -Naurd mpfr-2.4.0-a/mpfr.h mpfr-2.4.0-b/mpfr.h
---- mpfr-2.4.0-a/mpfr.h 2009-01-26 12:52:01.000000000 +0000
-+++ mpfr-2.4.0-b/mpfr.h 2009-02-20 17:27:44.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 2
- #define MPFR_VERSION_MINOR 4
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "2.4.0"
-+#define MPFR_VERSION_STRING "2.4.0-p1"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-2.4.0-a/tests/tfprintf.c mpfr-2.4.0-b/tests/tfprintf.c
---- mpfr-2.4.0-a/tests/tfprintf.c 2009-01-26 12:52:00.000000000 +0000
-+++ mpfr-2.4.0-b/tests/tfprintf.c 2009-02-20 16:31:02.000000000 +0000
-@@ -146,6 +146,7 @@
- short sh = -1;
- unsigned short ush = 1;
- int i = -1;
-+ int j = 1;
- unsigned int ui = 1;
- long lo = -1;
- unsigned long ulo = 1;
-@@ -179,12 +180,11 @@
-
- limb[0] = limb[1] = limb[2] = ~ (mp_limb_t) 0;
-
-- check_vfprintf (fout, "a. %Ra, b. %hhu, c. %u, d. %lx%hhn", mpfr, uch, ui,
-- ulo, &uch);
-- check_length (1, uch, 28, hhu);
-- check_vfprintf (fout, "a. %hhi, b. %Rb, c. %u, d. %li%ln", sch, mpfr, i,
-+ check_vfprintf (fout, "a. %Ra, b. %u, c. %lx%n", mpfr, ui, ulo, &j);
-+ check_length (1, j, 22, d);
-+ check_vfprintf (fout, "a. %c, b. %Rb, c. %u, d. %li%ln", i, mpfr, i,
- lo, &ulo);
-- check_length (2, ulo, 37, lu);
-+ check_length (2, ulo, 36, lu);
- check_vfprintf (fout, "a. %hi, b. %*f, c. %Re%hn", ush, 3, f, mpfr, &ush);
- check_length (3, ush, 29, hu);
- check_vfprintf (fout, "a. %hi, b. %f, c. %#.2Rf%n", sh, d, mpfr, &i);
-@@ -208,13 +208,18 @@
- check_length (9, sz, 30, zu);
- #endif
-
-+#ifndef NPRINTF_HH
-+ check_vfprintf (fout, "a. %hhi, b.%RA, c. %hhu%hhn", sch, mpfr, uch, &uch);
-+ check_length (10, uch, 21, hhu);
-+#endif
-+
- #if (__GNU_MP_VERSION * 10 + __GNU_MP_VERSION_MINOR) >= 42
- /* The 'M' specifier was added in gmp 4.2.0 */
- check_vfprintf (fout, "a. %Mx b. %Re%Mn", limb[0], mpfr, &limb[0]);
- if (limb[0] != 14 + BITS_PER_MP_LIMB / 4 || limb[1] != ~ (mp_limb_t) 0
- || limb[2] != ~ (mp_limb_t) 0)
- {
-- printf ("Error in test #10: mpfr_vfprintf did not print %d characters"
-+ printf ("Error in test #11: mpfr_vfprintf did not print %d characters"
- " as expected\n", 14 + (int) BITS_PER_MP_LIMB / 4);
- exit (1);
- }
-@@ -227,13 +232,13 @@
- if (limb[0] != 14 + 3 * BITS_PER_MP_LIMB / 4 || limb[1] != (mp_limb_t) 0
- || limb[2] != ~ (mp_limb_t) 0)
- {
-- printf ("Error in test #11: mpfr_vfprintf did not print %d characters"
-+ printf ("Error in test #12: mpfr_vfprintf did not print %d characters"
- " as expected\n", 14 + (int) BITS_PER_MP_LIMB / 4);
- exit (1);
- }
- #endif
-
--#ifdef HAVE_LONG_LONG
-+#if defined(HAVE_LONG_LONG) && !defined(NPRINTF_LL)
- {
- long long llo = -1;
- unsigned long long ullo = 1;
-diff -Naurd mpfr-2.4.0-a/tests/tprintf.c mpfr-2.4.0-b/tests/tprintf.c
---- mpfr-2.4.0-a/tests/tprintf.c 2009-01-26 12:52:00.000000000 +0000
-+++ mpfr-2.4.0-b/tests/tprintf.c 2009-02-20 16:31:02.000000000 +0000
-@@ -150,6 +150,7 @@
- short sh = -1;
- unsigned short ush = 1;
- int i = -1;
-+ int j = 1;
- unsigned int ui = 1;
- long lo = -1;
- unsigned long ulo = 1;
-@@ -178,11 +179,10 @@
- mpfr_set_f (mpfr, mpf, GMP_RNDN);
- prec = mpfr_get_prec (mpfr);
-
-- check_vprintf ("a. %Ra, b. %hhu, c. %u, d. %lx%hhn", mpfr, uch, ui, ulo,
-- &uch);
-- check_length (1, uch, 28, hhu);
-- check_vprintf ("a. %hhi, b. %Rb, c. %u, d. %li%ln", sch, mpfr, i, lo, &ulo);
-- check_length (2, ulo, 37, lu);
-+ check_vprintf ("a. %Ra, b. %u, c. %lx%n", mpfr, ui, ulo, &j);
-+ check_length (1, j, 22, d);
-+ check_vprintf ("a. %c, b. %Rb, c. %u, d. %li%ln", i, mpfr, i, lo, &ulo);
-+ check_length (2, ulo, 36, lu);
- check_vprintf ("a. %hi, b. %*f, c. %Re%hn", ush, 3, f, mpfr, &ush);
- check_length (3, ush, 29, hu);
- check_vprintf ("a. %hi, b. %f, c. %#.2Rf%n", sh, d, mpfr, &i);
-@@ -204,7 +204,12 @@
- check_length (9, sz, 30, zu);
- #endif
-
--#ifdef HAVE_LONG_LONG
-+#ifndef NPRINTF_HH
-+ check_vprintf ("a. %hhi, b. %Ra, c. %hhu%hhn", sch, mpfr, uch, &uch);
-+ check_length (10, uch, 22, hhu);
-+#endif
-+
-+#if defined(HAVE_LONG_LONG) && !defined(NPRINTF_LL)
- {
- long long llo = -1;
- unsigned long long ullo = 1;
-diff -Naurd mpfr-2.4.0-a/vasprintf.c mpfr-2.4.0-b/vasprintf.c
---- mpfr-2.4.0-a/vasprintf.c 2009-01-26 12:52:01.000000000 +0000
-+++ mpfr-2.4.0-b/vasprintf.c 2009-02-20 16:31:02.000000000 +0000
-@@ -235,10 +235,14 @@
- break;
- case 'h':
- if (*++format == 'h')
-+#ifndef NPRINTF_HH
- {
- ++format;
- specinfo->arg_type = CHAR_ARG;
- }
-+#else
-+ specinfo->arg_type = UNSUPPORTED;
-+#endif
- else
- specinfo->arg_type = SHORT_ARG;
- break;
-@@ -246,7 +250,7 @@
- if (*++format == 'l')
- {
- ++format;
--#ifdef HAVE_LONG_LONG
-+#if defined (HAVE_LONG_LONG) && !defined(NPRINTF_LL)
- specinfo->arg_type = LONG_LONG_ARG;
- #else
- specinfo->arg_type = UNSUPPORTED;
-diff -Naurd mpfr-2.4.0-a/version.c mpfr-2.4.0-b/version.c
---- mpfr-2.4.0-a/version.c 2009-01-26 12:52:01.000000000 +0000
-+++ mpfr-2.4.0-b/version.c 2009-02-20 17:27:44.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "2.4.0";
-+ return "2.4.0-p1";
- }
diff --git a/packages/mpfr/2.4.0/110-mpfr_snprintf.patch b/packages/mpfr/2.4.0/110-mpfr_snprintf.patch
deleted file mode 100644
index 92af137..0000000
--- a/packages/mpfr/2.4.0/110-mpfr_snprintf.patch
+++ /dev/null
@@ -1,176 +0,0 @@
-diff -Naurd mpfr-2.4.0-a/PATCHES mpfr-2.4.0-b/PATCHES
---- mpfr-2.4.0-a/PATCHES 2009-02-25 13:27:38.000000000 +0000
-+++ mpfr-2.4.0-b/PATCHES 2009-02-25 13:42:26.000000000 +0000
-@@ -0,0 +1 @@
-+mpfr_snprintf
-diff -Naurd mpfr-2.4.0-a/VERSION mpfr-2.4.0-b/VERSION
---- mpfr-2.4.0-a/VERSION 2009-02-20 17:27:44.000000000 +0000
-+++ mpfr-2.4.0-b/VERSION 2009-02-25 13:41:31.000000000 +0000
-@@ -1 +1 @@
--2.4.0-p1
-+2.4.0-p2
-diff -Naurd mpfr-2.4.0-a/mpfr.h mpfr-2.4.0-b/mpfr.h
---- mpfr-2.4.0-a/mpfr.h 2009-02-20 17:27:44.000000000 +0000
-+++ mpfr-2.4.0-b/mpfr.h 2009-02-25 13:41:31.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 2
- #define MPFR_VERSION_MINOR 4
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "2.4.0-p1"
-+#define MPFR_VERSION_STRING "2.4.0-p2"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-2.4.0-a/printf.c mpfr-2.4.0-b/printf.c
---- mpfr-2.4.0-a/printf.c 2009-01-26 12:52:01.000000000 +0000
-+++ mpfr-2.4.0-b/printf.c 2009-02-25 13:41:22.000000000 +0000
-@@ -154,16 +154,16 @@
- int ret;
- size_t min_size;
-
-- /* C99 allows SIZE to be null */
-- if (size == 0)
-- return 0;
--
-- MPFR_ASSERTD (buf != NULL);
--
- GET_STR (ret, str, fmt);
-- min_size = (size_t)ret < size ? (size_t)ret : size - 1;
-- strncpy (buf, str, min_size);
-- buf[min_size + 1] = '\0';
-+
-+ /* C99 allows SIZE to be zero */
-+ if (size != 0)
-+ {
-+ MPFR_ASSERTN (buf != NULL);
-+ min_size = (size_t)ret < size ? (size_t)ret : size - 1;
-+ strncpy (buf, str, min_size);
-+ buf[min_size] = '\0';
-+ }
-
- mpfr_free_str (str);
- return ret;
-@@ -176,16 +176,17 @@
- int ret;
- int min_size;
-
-- /* C99 allows SIZE to be null */
-- if (size == 0)
-- return 0;
-+ GET_STR_VA (ret, str, fmt, ap);
-
-- MPFR_ASSERTD (buf != NULL);
-+ /* C99 allows SIZE to be zero */
-+ if (size != 0)
-+ {
-+ MPFR_ASSERTN (buf != NULL);
-+ min_size = (size_t)ret < size ? (size_t)ret : size - 1;
-+ strncpy (buf, str, min_size);
-+ buf[min_size] = '\0';
-+ }
-
-- GET_STR_VA (ret, str, fmt, ap);
-- min_size = (size_t)ret < size ? (size_t)ret : size - 1;
-- strncpy (buf, str, min_size);
-- buf[min_size + 1] = '\0';
- mpfr_free_str (str);
- return ret;
- }
-diff -Naurd mpfr-2.4.0-a/tests/tsprintf.c mpfr-2.4.0-b/tests/tsprintf.c
---- mpfr-2.4.0-a/tests/tsprintf.c 2009-01-26 12:52:00.000000000 +0000
-+++ mpfr-2.4.0-b/tests/tsprintf.c 2009-02-25 13:41:22.000000000 +0000
-@@ -72,21 +72,37 @@
-
- /* test mpfr_snprintf */
- p = (int) (randlimb () % n0);
-- n1 = mpfr_snprintf (buffer, p, fmt, x);
-- if ((p != 0 && n0 != n1) || (p == 0 && n1 != 0))
-+ if (p == 0 && (randlimb () & 1) == 0)
-+ {
-+ n1 = mpfr_snprintf (NULL, 0, fmt, x);
-+ }
-+ else
-+ {
-+ buffer[p] = 17;
-+ n1 = mpfr_snprintf (buffer, p, fmt, x);
-+ if (buffer[p] != 17)
-+ {
-+ printf ("Buffer overflow in mpfr_snprintf for p = %d!\n", p);
-+ exit (1);
-+ }
-+ }
-+ if (n0 != n1)
- {
- printf ("Error in mpfr_snprintf (s, %d, \"%s\", x) return value\n",
- p, fmt);
- printf ("expected: %d\ngot: %d\n", n0, n1);
- exit (1);
- }
-- if (strncmp (expected, buffer, p) != 0)
-+ if ((p > 1 && strncmp (expected, buffer, p-1) != 0)
-+ || (p == 1 && buffer[0] != '\0'))
- {
-- printf ("Error in mpfr_snprintf (s, %d, \"%s\", x);\n", p, fmt);
-- printf ("expected: \"%s\"\ngot: \"%s\"\n", expected, buffer);
-+ char part_expected[p];
-+ strncpy (part_expected, expected, p);
-+ part_expected[p-1] = '\0';
-+ printf ("Error in mpfr_vsnprintf (s, %d, \"%s\", ...);\n", p, fmt);
-+ printf ("expected: \"%s\"\ngot: \"%s\"\n", part_expected, buffer);
- exit (1);
- }
--
- return n0;
- }
-
-@@ -116,8 +132,21 @@
-
- /* test mpfr_snprintf */
- p = (int) (randlimb () % n0);
-- n1 = mpfr_vsnprintf (buffer, p, fmt, ap1);
-- if ((p != 0 && n0 != n1) || (p == 0 && n1 != 0))
-+ if (p == 0 && (randlimb () & 1) == 0)
-+ {
-+ n1 = mpfr_vsnprintf (NULL, 0, fmt, ap1);
-+ }
-+ else
-+ {
-+ buffer[p] = 17;
-+ n1 = mpfr_vsnprintf (buffer, p, fmt, ap1);
-+ if (buffer[p] != 17)
-+ {
-+ printf ("Buffer overflow in mpfr_vsnprintf for p = %d!\n", p);
-+ exit (1);
-+ }
-+ }
-+ if (n0 != n1)
- {
- printf ("Error in mpfr_vsnprintf (s, %d, \"%s\", ...) return value\n",
- p, fmt);
-@@ -126,10 +155,14 @@
- va_end (ap1);
- exit (1);
- }
-- if (strncmp (expected, buffer, p) != 0)
-+ if ((p > 1 && strncmp (expected, buffer, p-1) != 0)
-+ || (p == 1 && buffer[0] != '\0'))
- {
-+ char part_expected[p];
-+ strncpy (part_expected, expected, p);
-+ part_expected[p-1] = '\0';
- printf ("Error in mpfr_vsnprintf (s, %d, \"%s\", ...);\n", p, fmt);
-- printf ("expected: \"%s\"\ngot: \"%s\"\n", expected, buffer);
-+ printf ("expected: \"%s\"\ngot: \"%s\"\n", part_expected, buffer);
-
- va_end (ap1);
- exit (1);
-diff -Naurd mpfr-2.4.0-a/version.c mpfr-2.4.0-b/version.c
---- mpfr-2.4.0-a/version.c 2009-02-20 17:27:44.000000000 +0000
-+++ mpfr-2.4.0-b/version.c 2009-02-25 13:41:31.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "2.4.0-p1";
-+ return "2.4.0-p2";
- }
diff --git a/packages/mpfr/2.4.0/version.desc b/packages/mpfr/2.4.0/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mpfr/2.4.0/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mpfr/2.4.1/100-remainder-neg.patch b/packages/mpfr/2.4.1/100-remainder-neg.patch
deleted file mode 100644
index ae92788..0000000
--- a/packages/mpfr/2.4.1/100-remainder-neg.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-diff -Naurd mpfr-2.4.1-a/PATCHES mpfr-2.4.1-b/PATCHES
---- mpfr-2.4.1-a/PATCHES 2009-02-20 09:43:17.000000000 +0000
-+++ mpfr-2.4.1-b/PATCHES 2009-02-27 16:56:29.000000000 +0000
-@@ -0,0 +1 @@
-+remainder-neg
-diff -Naurd mpfr-2.4.1-a/VERSION mpfr-2.4.1-b/VERSION
---- mpfr-2.4.1-a/VERSION 2009-02-25 16:16:08.000000000 +0000
-+++ mpfr-2.4.1-b/VERSION 2009-02-27 16:55:37.000000000 +0000
-@@ -1 +1 @@
--2.4.1
-+2.4.1-p1
-diff -Naurd mpfr-2.4.1-a/mpfr.h mpfr-2.4.1-b/mpfr.h
---- mpfr-2.4.1-a/mpfr.h 2009-02-25 16:16:08.000000000 +0000
-+++ mpfr-2.4.1-b/mpfr.h 2009-02-27 16:55:38.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 2
- #define MPFR_VERSION_MINOR 4
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "2.4.1"
-+#define MPFR_VERSION_STRING "2.4.1-p1"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-2.4.1-a/rem1.c mpfr-2.4.1-b/rem1.c
---- mpfr-2.4.1-a/rem1.c 2009-02-20 09:43:17.000000000 +0000
-+++ mpfr-2.4.1-b/rem1.c 2009-02-27 16:55:15.000000000 +0000
-@@ -170,7 +170,12 @@
- }
-
- if (mpz_cmp_ui (r, 0) == 0)
-- inex = mpfr_set_ui (rem, 0, GMP_RNDN);
-+ {
-+ inex = mpfr_set_ui (rem, 0, GMP_RNDN);
-+ /* take into account sign of x */
-+ if (signx < 0)
-+ mpfr_neg (rem, rem, GMP_RNDN);
-+ }
- else
- {
- if (rnd_q == GMP_RNDN)
-@@ -190,6 +195,9 @@
- *quo += 1;
- }
- }
-+ /* take into account sign of x */
-+ if (signx < 0)
-+ mpz_neg (r, r);
- inex = mpfr_set_z (rem, r, rnd);
- /* if ex > ey, rem should be multiplied by 2^ey, else by 2^ex */
- MPFR_EXP (rem) += (ex > ey) ? ey : ex;
-@@ -198,13 +206,6 @@
- if (quo)
- *quo *= sign;
-
-- /* take into account sign of x */
-- if (signx < 0)
-- {
-- mpfr_neg (rem, rem, GMP_RNDN);
-- inex = -inex;
-- }
--
- mpz_clear (mx);
- mpz_clear (my);
- mpz_clear (r);
-diff -Naurd mpfr-2.4.1-a/tests/tremquo.c mpfr-2.4.1-b/tests/tremquo.c
---- mpfr-2.4.1-a/tests/tremquo.c 2009-02-20 09:43:15.000000000 +0000
-+++ mpfr-2.4.1-b/tests/tremquo.c 2009-02-27 16:55:15.000000000 +0000
-@@ -25,6 +25,36 @@
-
- #include "mpfr-test.h"
-
-+static void
-+bug20090227 (void)
-+{
-+ mpfr_t x, y, r1, r2;
-+ int inex1, inex2;
-+
-+ mpfr_init2 (x, 118);
-+ mpfr_init2 (y, 181);
-+ mpfr_init2 (r1, 140);
-+ mpfr_init2 (r2, 140);
-+ mpfr_set_si (x, -1, GMP_RNDN);
-+ mpfr_set_str_binary (y, "1.100100100001111110110101010001000100001011010001100001000110100110001001100011001100010100010111000000011011100000111001101000100101001000000100100111000001000100010100110011111010");
-+ inex1 = mpfr_remainder (r1, x, y, GMP_RNDU);
-+ /* since the quotient is -1, r1 is the rounding of x+y */
-+ inex2 = mpfr_add (r2, x, y, GMP_RNDU);
-+ if (mpfr_cmp (r1, r2))
-+ {
-+ printf ("Error in mpfr_remainder (bug20090227)\n");
-+ printf ("Expected ");
-+ mpfr_dump (r2);
-+ printf ("Got ");
-+ mpfr_dump (r1);
-+ exit (1);
-+ }
-+ mpfr_clear (x);
-+ mpfr_clear (y);
-+ mpfr_clear (r1);
-+ mpfr_clear (r2);
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -50,6 +80,8 @@
-
- tests_start_mpfr ();
-
-+ bug20090227 ();
-+
- mpfr_init (x);
- mpfr_init (y);
- mpfr_init (r);
-diff -Naurd mpfr-2.4.1-a/version.c mpfr-2.4.1-b/version.c
---- mpfr-2.4.1-a/version.c 2009-02-25 16:16:08.000000000 +0000
-+++ mpfr-2.4.1-b/version.c 2009-02-27 16:55:38.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "2.4.1";
-+ return "2.4.1-p1";
- }
diff --git a/packages/mpfr/2.4.1/110-assert.patch b/packages/mpfr/2.4.1/110-assert.patch
deleted file mode 100644
index c6b6aac..0000000
--- a/packages/mpfr/2.4.1/110-assert.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -Naurd mpfr-2.4.1-a/PATCHES mpfr-2.4.1-b/PATCHES
---- mpfr-2.4.1-a/PATCHES 2009-03-04 13:15:05.000000000 +0000
-+++ mpfr-2.4.1-b/PATCHES 2009-03-04 13:17:04.000000000 +0000
-@@ -0,0 +1 @@
-+assert
-diff -Naurd mpfr-2.4.1-a/VERSION mpfr-2.4.1-b/VERSION
---- mpfr-2.4.1-a/VERSION 2009-02-27 16:55:37.000000000 +0000
-+++ mpfr-2.4.1-b/VERSION 2009-03-04 13:16:46.000000000 +0000
-@@ -1 +1 @@
--2.4.1-p1
-+2.4.1-p2
-diff -Naurd mpfr-2.4.1-a/mpfr-gmp.c mpfr-2.4.1-b/mpfr-gmp.c
---- mpfr-2.4.1-a/mpfr-gmp.c 2009-02-20 09:43:17.000000000 +0000
-+++ mpfr-2.4.1-b/mpfr-gmp.c 2009-03-04 13:16:39.000000000 +0000
-@@ -301,7 +301,7 @@
- if (linenum != -1)
- fprintf (stderr, "%d: ", linenum);
- }
-- fprintf (stderr, " assertion failed: %s\n", expr);
-+ fprintf (stderr, "MPFR assertion failed: %s\n", expr);
- abort();
- }
-
-diff -Naurd mpfr-2.4.1-a/mpfr.h mpfr-2.4.1-b/mpfr.h
---- mpfr-2.4.1-a/mpfr.h 2009-02-27 16:55:38.000000000 +0000
-+++ mpfr-2.4.1-b/mpfr.h 2009-03-04 13:16:46.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 2
- #define MPFR_VERSION_MINOR 4
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "2.4.1-p1"
-+#define MPFR_VERSION_STRING "2.4.1-p2"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-2.4.1-a/version.c mpfr-2.4.1-b/version.c
---- mpfr-2.4.1-a/version.c 2009-02-27 16:55:38.000000000 +0000
-+++ mpfr-2.4.1-b/version.c 2009-03-04 13:16:46.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "2.4.1-p1";
-+ return "2.4.1-p2";
- }
diff --git a/packages/mpfr/2.4.1/120-cast-to-void-ptr.patch b/packages/mpfr/2.4.1/120-cast-to-void-ptr.patch
deleted file mode 100644
index e85136a..0000000
--- a/packages/mpfr/2.4.1/120-cast-to-void-ptr.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -Naurd mpfr-2.4.1-a/tests/tfprintf.c mpfr-2.4.1-b/tests/tfprintf.c
---- mpfr-2.4.1-a/tests/tfprintf.c 2009-02-20 09:43:15.000000000 +0000
-+++ mpfr-2.4.1-b/tests/tfprintf.c 2009-03-10 01:12:45.000000000 +0000
-@@ -195,7 +195,7 @@
- check_vfprintf (fout, "a. %Pu, b. %c, c. %Zi%Zn", prec, ch, mpz, &mpz);
- check_length_with_cmp (6, mpz, 17, mpz_cmp_ui (mpz, 17), Zi);
- check_vfprintf (fout, "%% a. %#.0RNg, b. %Qx%Rn, c. %p", mpfr, mpq, &mpfr,
-- &i);
-+ (void *) &i);
- check_length_with_cmp (7, mpfr, 16, mpfr_cmp_ui (mpfr, 16), Rg);
-
- #ifndef NPRINTF_T
-diff -Naurd mpfr-2.4.1-a/tests/tprintf.c mpfr-2.4.1-b/tests/tprintf.c
---- mpfr-2.4.1-a/tests/tprintf.c 2009-02-20 09:43:15.000000000 +0000
-+++ mpfr-2.4.1-b/tests/tprintf.c 2009-03-10 01:12:45.000000000 +0000
-@@ -191,7 +191,8 @@
- check_length (5, sz, 34, zu);
- check_vprintf ("a. %Pu, b. %c, c. %RUG, d. %Zi%Zn", prec, ch, mpfr, mpz, &mpz);
- check_length_with_cmp (6, mpz, 24, mpz_cmp_ui (mpz, 24), Zi);
-- check_vprintf ("%% a. %#.0RNg, b. %Qx%Rn c. %p", mpfr, mpq, &mpfr, &i);
-+ check_vprintf ("%% a. %#.0RNg, b. %Qx%Rn c. %p",
-+ mpfr, mpq, &mpfr, (void *) &i);
- check_length_with_cmp (7, mpfr, 16, mpfr_cmp_ui (mpfr, 16), Rg);
-
- #ifndef NPRINTF_T
diff --git a/packages/mpfr/2.4.1/130-vasprintf-mp_limb_t.patch b/packages/mpfr/2.4.1/130-vasprintf-mp_limb_t.patch
deleted file mode 100644
index 08e21f2..0000000
--- a/packages/mpfr/2.4.1/130-vasprintf-mp_limb_t.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -Naurd mpfr-2.4.1-a/PATCHES mpfr-2.4.1-b/PATCHES
---- mpfr-2.4.1-a/PATCHES 2009-03-10 01:44:39.000000000 +0000
-+++ mpfr-2.4.1-b/PATCHES 2009-03-10 01:44:40.000000000 +0000
-@@ -0,0 +1 @@
-+vasprintf-mp_limb_t
-diff -Naurd mpfr-2.4.1-a/VERSION mpfr-2.4.1-b/VERSION
---- mpfr-2.4.1-a/VERSION 2009-03-04 13:16:46.000000000 +0000
-+++ mpfr-2.4.1-b/VERSION 2009-03-10 01:44:40.000000000 +0000
-@@ -1 +1 @@
--2.4.1-p2
-+2.4.1-p4
-diff -Naurd mpfr-2.4.1-a/mpfr.h mpfr-2.4.1-b/mpfr.h
---- mpfr-2.4.1-a/mpfr.h 2009-03-04 13:16:46.000000000 +0000
-+++ mpfr-2.4.1-b/mpfr.h 2009-03-10 01:44:40.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 2
- #define MPFR_VERSION_MINOR 4
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "2.4.1-p2"
-+#define MPFR_VERSION_STRING "2.4.1-p4"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-2.4.1-a/vasprintf.c mpfr-2.4.1-b/vasprintf.c
---- mpfr-2.4.1-a/vasprintf.c 2009-02-20 09:43:17.000000000 +0000
-+++ mpfr-2.4.1-b/vasprintf.c 2009-03-10 01:44:40.000000000 +0000
-@@ -398,7 +398,7 @@
- (void) va_arg ((ap), mpq_srcptr); \
- break; \
- case MP_LIMB_ARG: \
-- (void) va_arg ((ap), mp_ptr); \
-+ (void) va_arg ((ap), mp_limb_t); \
- break; \
- case MP_LIMB_ARRAY_ARG: \
- (void) va_arg ((ap), mp_ptr); \
-diff -Naurd mpfr-2.4.1-a/version.c mpfr-2.4.1-b/version.c
---- mpfr-2.4.1-a/version.c 2009-03-04 13:16:46.000000000 +0000
-+++ mpfr-2.4.1-b/version.c 2009-03-10 01:44:40.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "2.4.1-p2";
-+ return "2.4.1-p4";
- }
diff --git a/packages/mpfr/2.4.1/140-zeta_ui-shift.patch b/packages/mpfr/2.4.1/140-zeta_ui-shift.patch
deleted file mode 100644
index 710c698..0000000
--- a/packages/mpfr/2.4.1/140-zeta_ui-shift.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -Naurd mpfr-2.4.1-a/PATCHES mpfr-2.4.1-b/PATCHES
---- mpfr-2.4.1-a/PATCHES 2009-03-13 02:50:47.000000000 +0000
-+++ mpfr-2.4.1-b/PATCHES 2009-03-13 02:50:48.000000000 +0000
-@@ -0,0 +1 @@
-+zeta_ui-shift
-diff -Naurd mpfr-2.4.1-a/VERSION mpfr-2.4.1-b/VERSION
---- mpfr-2.4.1-a/VERSION 2009-03-10 01:44:40.000000000 +0000
-+++ mpfr-2.4.1-b/VERSION 2009-03-13 02:50:48.000000000 +0000
-@@ -1 +1 @@
--2.4.1-p4
-+2.4.1-p5
-diff -Naurd mpfr-2.4.1-a/mpfr.h mpfr-2.4.1-b/mpfr.h
---- mpfr-2.4.1-a/mpfr.h 2009-03-10 01:44:40.000000000 +0000
-+++ mpfr-2.4.1-b/mpfr.h 2009-03-13 02:50:48.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 2
- #define MPFR_VERSION_MINOR 4
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "2.4.1-p4"
-+#define MPFR_VERSION_STRING "2.4.1-p5"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-2.4.1-a/version.c mpfr-2.4.1-b/version.c
---- mpfr-2.4.1-a/version.c 2009-03-10 01:44:40.000000000 +0000
-+++ mpfr-2.4.1-b/version.c 2009-03-13 02:50:48.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "2.4.1-p4";
-+ return "2.4.1-p5";
- }
-diff -Naurd mpfr-2.4.1-a/zeta_ui.c mpfr-2.4.1-b/zeta_ui.c
---- mpfr-2.4.1-a/zeta_ui.c 2009-02-20 09:43:17.000000000 +0000
-+++ mpfr-2.4.1-b/zeta_ui.c 2009-03-13 02:50:48.000000000 +0000
-@@ -177,7 +177,9 @@
- mpz_mul_ui (t, t, 2 * k - 1);
- }
- mpz_div_2exp (t, t, 1);
-- if (n < 1UL << (BITS_PER_MP_LIMB / 2))
-+ /* Warning: the test below assumes that an unsigned long
-+ has no padding bits. */
-+ if (n < 1UL << ((sizeof(unsigned long) * CHAR_BIT) / 2))
- /* (n - k + 1) * (n + k - 1) < n^2 */
- mpz_divexact_ui (t, t, (n - k + 1) * (n + k - 1));
- else
diff --git a/packages/mpfr/2.4.1/150-test-tmul.patch b/packages/mpfr/2.4.1/150-test-tmul.patch
deleted file mode 100644
index 8b757d3..0000000
--- a/packages/mpfr/2.4.1/150-test-tmul.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff -up ./tests/Makefile.am.orig ./tests/Makefile.am
---- ./tests/Makefile.am.orig 2009-07-28 16:28:55.377059021 +0300
-+++ ./tests/Makefile.am 2009-07-28 16:31:01.136810734 +0300
-@@ -20,7 +20,7 @@ check_PROGRAMS = tversion tinternals tin
-
- EXTRA_DIST = tgeneric.c tgeneric_ui.c mpf_compat.h inp_str.data tmul.dat
-
--tmul_CPPFLAGS = -DMPFR_SRCDIR=$(srcdir)
-+tmul_CPPFLAGS = -DMPFR_SRCDIR=\"$(srcdir)\"
-
- LDADD = libfrtests.la $(MPFR_LIBM) $(top_builddir)/libmpfr.la
- INCLUDES = -I$(top_srcdir) -I$(top_builddir)
-diff -up ./tests/tmul.c.orig ./tests/tmul.c
---- ./tests/tmul.c.orig 2009-07-28 16:29:03.761058919 +0300
-+++ ./tests/tmul.c 2009-07-28 16:30:46.369812215 +0300
-@@ -26,10 +26,8 @@ MA 02110-1301, USA. */
- #include "mpfr-test.h"
-
- #ifndef MPFR_SRCDIR
--#define MPFR_SRCDIR .
-+#define MPFR_SRCDIR "."
- #endif
--#define QUOTE(X) NAME(X)
--#define NAME(X) #X
-
- #ifdef CHECK_EXTERNAL
- static int
-@@ -482,10 +480,10 @@ check_regression (void)
- mpfr_inits2 (6177, x, y, z, (mpfr_ptr) 0);
- /* we read long strings from a file since ISO C90 does not support strings of
- length > 509 */
-- fp = fopen (QUOTE (MPFR_SRCDIR)"/tmul.dat", "r");
-+ fp = fopen (MPFR_SRCDIR "/tmul.dat", "r");
- if (fp == NULL)
- {
-- fprintf (stderr, "Error, cannot open "QUOTE (MPFR_SRCDIR)"/tmul.dat\n");
-+ fprintf (stderr, "Error, cannot open " MPFR_SRCDIR "/tmul.dat\n");
- exit (1);
- }
- get_string (s, fp);
diff --git a/packages/mpfr/2.4.1/version.desc b/packages/mpfr/2.4.1/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mpfr/2.4.1/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mpfr/3.0.0/110-mpfr_out_str.patch b/packages/mpfr/3.0.0/110-mpfr_out_str.patch
deleted file mode 100644
index da98aab..0000000
--- a/packages/mpfr/3.0.0/110-mpfr_out_str.patch
+++ /dev/null
@@ -1,220 +0,0 @@
-diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
---- mpfr-3.0.0-a/PATCHES 2010-06-23 11:02:49.000000000 +0000
-+++ mpfr-3.0.0-b/PATCHES 2010-06-23 11:03:36.000000000 +0000
-@@ -0,0 +1 @@
-+mpfr_out_str
-diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
---- mpfr-3.0.0-a/VERSION 2010-06-10 11:00:14.000000000 +0000
-+++ mpfr-3.0.0-b/VERSION 2010-06-23 11:03:20.000000000 +0000
-@@ -1 +1 @@
--3.0.0
-+3.0.0-p1
-diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
---- mpfr-3.0.0-a/mpfr.h 2010-06-10 11:00:14.000000000 +0000
-+++ mpfr-3.0.0-b/mpfr.h 2010-06-23 11:03:20.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.0.0"
-+#define MPFR_VERSION_STRING "3.0.0-p1"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.0.0-a/mpfr.texi mpfr-3.0.0-b/mpfr.texi
---- mpfr-3.0.0-a/mpfr.texi 2010-06-10 11:00:14.000000000 +0000
-+++ mpfr-3.0.0-b/mpfr.texi 2010-06-23 11:03:12.000000000 +0000
-@@ -2050,7 +2050,7 @@
- are printed. If @var{base} is greater than 10, @samp{@@} will be used
- instead of @samp{e} as exponent delimiter.
-
--Return the number of bytes written, or if an error occurred, return 0.
-+Return the number of characters written, or if an error occurred, return 0.
- @end deftypefun
-
- @deftypefun size_t mpfr_inp_str (mpfr_t @var{rop}, FILE *@var{stream}, int @var{base}, mpfr_rnd_t @var{rnd})
-diff -Naurd mpfr-3.0.0-a/out_str.c mpfr-3.0.0-b/out_str.c
---- mpfr-3.0.0-a/out_str.c 2010-06-10 11:00:14.000000000 +0000
-+++ mpfr-3.0.0-b/out_str.c 2010-06-23 11:03:12.000000000 +0000
-@@ -22,6 +22,16 @@
-
- #include "mpfr-impl.h"
-
-+/* Warning! S should not contain "%". */
-+#define OUT_STR_RET(S) \
-+ do \
-+ { \
-+ int r; \
-+ r = fprintf (stream, (S)); \
-+ return r < 0 ? 0 : r; \
-+ } \
-+ while (0)
-+
- size_t
- mpfr_out_str (FILE *stream, int base, size_t n_digits, mpfr_srcptr op,
- mpfr_rnd_t rnd_mode)
-@@ -29,6 +39,7 @@
- char *s, *s0;
- size_t l;
- mpfr_exp_t e;
-+ int err;
-
- MPFR_ASSERTN (base >= 2 && base <= 62);
-
-@@ -36,37 +47,16 @@
- if (stream == NULL)
- stream = stdout;
-
-- if (MPFR_IS_NAN(op))
-- {
-- fprintf (stream, "@NaN@");
-- return 3;
-- }
--
-- if (MPFR_IS_INF(op))
-- {
-- if (MPFR_SIGN(op) > 0)
-- {
-- fprintf (stream, "@Inf@");
-- return 3;
-- }
-- else
-- {
-- fprintf (stream, "-@Inf@");
-- return 4;
-- }
-- }
--
-- if (MPFR_IS_ZERO(op))
-+ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (op)))
- {
-- if (MPFR_SIGN(op) > 0)
-- {
-- fprintf(stream, "0");
-- return 1;
-- }
-+ if (MPFR_IS_NAN (op))
-+ OUT_STR_RET ("@NaN@");
-+ else if (MPFR_IS_INF (op))
-+ OUT_STR_RET (MPFR_IS_POS (op) ? "@Inf@" : "-@Inf@");
- else
- {
-- fprintf(stream, "-0");
-- return 2;
-+ MPFR_ASSERTD (MPFR_IS_ZERO (op));
-+ OUT_STR_RET (MPFR_IS_POS (op) ? "0" : "-0");
- }
- }
-
-@@ -77,21 +67,31 @@
-
- l = strlen (s) + 1; /* size of allocated block returned by mpfr_get_str
- - may be incorrect, as only an upper bound? */
-- if (*s == '-')
-- fputc (*s++, stream);
-
-- /* outputs mantissa */
-- fputc (*s++, stream); e--; /* leading digit */
-- fputc ((unsigned char) MPFR_DECIMAL_POINT, stream);
-- fputs (s, stream); /* rest of mantissa */
-+ /* outputs possible sign and significand */
-+ err = (*s == '-' && fputc (*s++, stream) == EOF)
-+ || fputc (*s++, stream) == EOF /* leading digit */
-+ || fputc ((unsigned char) MPFR_DECIMAL_POINT, stream) == EOF
-+ || fputs (s, stream) == EOF; /* trailing significand */
- (*__gmp_free_func) (s0, l);
-+ if (MPFR_UNLIKELY (err))
-+ return 0;
-+
-+ e--; /* due to the leading digit */
-
- /* outputs exponent */
- if (e)
- {
-+ int r;
-+
- MPFR_ASSERTN(e >= LONG_MIN);
- MPFR_ASSERTN(e <= LONG_MAX);
-- l += fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e);
-+
-+ r = fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e);
-+ if (MPFR_UNLIKELY (r < 0))
-+ return 0;
-+
-+ l += r;
- }
-
- return l;
-diff -Naurd mpfr-3.0.0-a/tests/tout_str.c mpfr-3.0.0-b/tests/tout_str.c
---- mpfr-3.0.0-a/tests/tout_str.c 2010-06-10 11:00:13.000000000 +0000
-+++ mpfr-3.0.0-b/tests/tout_str.c 2010-06-23 11:03:12.000000000 +0000
-@@ -46,22 +46,54 @@
- special (void)
- {
- mpfr_t x;
-+ unsigned int n;
-
- mpfr_init (x);
-
- mpfr_set_nan (x);
-- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
-+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
-+ if (n != 5)
-+ {
-+ printf ("Error: mpfr_out_str (file, 10, 0, NaN, MPFR_RNDN) wrote %u "
-+ "characters instead of 5.\n", n);
-+ exit (1);
-+ }
-
- mpfr_set_inf (x, 1);
-- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
-+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
-+ if (n != 5)
-+ {
-+ printf ("Error: mpfr_out_str (file, 10, 0, +Inf, MPFR_RNDN) wrote %u "
-+ "characters instead of 5.\n", n);
-+ exit (1);
-+ }
-
- mpfr_set_inf (x, -1);
-- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
-+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
-+ if (n != 6)
-+ {
-+ printf ("Error: mpfr_out_str (file, 10, 0, -Inf, MPFR_RNDN) wrote %u "
-+ "characters instead of 6.\n", n);
-+ exit (1);
-+ }
-
- mpfr_set_ui (x, 0, MPFR_RNDN);
-- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
-+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
-+ if (n != 1)
-+ {
-+ printf ("Error: mpfr_out_str (file, 10, 0, +0, MPFR_RNDN) wrote %u "
-+ "characters instead of 1.\n", n);
-+ exit (1);
-+ }
-+
- mpfr_neg (x, x, MPFR_RNDN);
-- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
-+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN);
-+ if (n != 2)
-+ {
-+ printf ("Error: mpfr_out_str (file, 10, 0, -0, MPFR_RNDN) wrote %u "
-+ "characters instead of 2.\n", n);
-+ exit (1);
-+ }
-
- mpfr_clear (x);
- }
-diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
---- mpfr-3.0.0-a/version.c 2010-06-10 11:00:14.000000000 +0000
-+++ mpfr-3.0.0-b/version.c 2010-06-23 11:03:20.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.0";
-+ return "3.0.0-p1";
- }
diff --git a/packages/mpfr/3.0.0/120-alloca.patch b/packages/mpfr/3.0.0/120-alloca.patch
deleted file mode 100644
index af6dfb2..0000000
--- a/packages/mpfr/3.0.0/120-alloca.patch
+++ /dev/null
@@ -1,377 +0,0 @@
-diff -Naurd mpfr-3.0.0-a/Makefile.in mpfr-3.0.0-b/Makefile.in
---- mpfr-3.0.0-a/Makefile.in 2010-06-10 11:00:52.000000000 +0000
-+++ mpfr-3.0.0-b/Makefile.in 2010-06-10 11:00:52.000000000 +0000
-@@ -239,6 +239,7 @@
- distuninstallcheck_listfiles = find . -type f -print
- distcleancheck_listfiles = find . -type f -print
- ACLOCAL = @ACLOCAL@
-+ALLOCA = @ALLOCA@
- AMTAR = @AMTAR@
- AR = @AR@
- AS = @AS@
-diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
---- mpfr-3.0.0-a/PATCHES 2010-06-23 11:03:36.000000000 +0000
-+++ mpfr-3.0.0-b/PATCHES 2010-06-25 13:23:13.000000000 +0000
-@@ -0,0 +1 @@
-+alloca
-diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
---- mpfr-3.0.0-a/VERSION 2010-06-23 11:03:20.000000000 +0000
-+++ mpfr-3.0.0-b/VERSION 2010-06-25 13:23:13.000000000 +0000
-@@ -1 +1 @@
--3.0.0-p1
-+3.0.0-p2
-diff -Naurd mpfr-3.0.0-a/acinclude.m4 mpfr-3.0.0-b/acinclude.m4
---- mpfr-3.0.0-a/acinclude.m4 2010-06-10 11:00:14.000000000 +0000
-+++ mpfr-3.0.0-b/acinclude.m4 2010-06-10 11:00:14.000000000 +0000
-@@ -59,6 +59,9 @@
- dnl sys/fpu.h - MIPS specific
- AC_CHECK_HEADERS([sys/time.h sys/fpu.h])
-
-+dnl Check how to get `alloca'
-+AC_FUNC_ALLOCA
-+
- dnl SIZE_MAX macro
- gl_SIZE_MAX
-
-diff -Naurd mpfr-3.0.0-a/configure mpfr-3.0.0-b/configure
---- mpfr-3.0.0-a/configure 2010-06-10 11:00:51.000000000 +0000
-+++ mpfr-3.0.0-b/configure 2010-06-25 13:23:05.000000000 +0000
-@@ -783,6 +783,7 @@
- OBJDUMP
- DLLTOOL
- AS
-+ALLOCA
- MPFR_LIBM
- ANSI2KNR
- U
-@@ -5622,6 +5623,197 @@
- done
-
-
-+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-+# for constant arguments. Useless!
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
-+$as_echo_n "checking for working alloca.h... " >&6; }
-+if test "${ac_cv_working_alloca_h+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include <alloca.h>
-+int
-+main ()
-+{
-+char *p = (char *) alloca (2 * sizeof (int));
-+ if (p) return 0;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
-+ ac_cv_working_alloca_h=yes
-+else
-+ ac_cv_working_alloca_h=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
-+$as_echo "$ac_cv_working_alloca_h" >&6; }
-+if test $ac_cv_working_alloca_h = yes; then
-+
-+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
-+
-+fi
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
-+$as_echo_n "checking for alloca... " >&6; }
-+if test "${ac_cv_func_alloca_works+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#ifdef __GNUC__
-+# define alloca __builtin_alloca
-+#else
-+# ifdef _MSC_VER
-+# include <malloc.h>
-+# define alloca _alloca
-+# else
-+# ifdef HAVE_ALLOCA_H
-+# include <alloca.h>
-+# else
-+# ifdef _AIX
-+ #pragma alloca
-+# else
-+# ifndef alloca /* predefined by HP cc +Olibcalls */
-+char *alloca ();
-+# endif
-+# endif
-+# endif
-+# endif
-+#endif
-+
-+int
-+main ()
-+{
-+char *p = (char *) alloca (1);
-+ if (p) return 0;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_link "$LINENO"; then :
-+ ac_cv_func_alloca_works=yes
-+else
-+ ac_cv_func_alloca_works=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
-+$as_echo "$ac_cv_func_alloca_works" >&6; }
-+
-+if test $ac_cv_func_alloca_works = yes; then
-+
-+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
-+
-+else
-+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-+# that cause trouble. Some versions do not even contain alloca or
-+# contain a buggy version. If you still want to use their alloca,
-+# use ar to extract alloca.o from them instead of compiling alloca.c.
-+
-+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
-+
-+$as_echo "#define C_ALLOCA 1" >>confdefs.h
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
-+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
-+if test "${ac_cv_os_cray+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#if defined CRAY && ! defined CRAY2
-+webecray
-+#else
-+wenotbecray
-+#endif
-+
-+_ACEOF
-+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-+ $EGREP "webecray" >/dev/null 2>&1; then :
-+ ac_cv_os_cray=yes
-+else
-+ ac_cv_os_cray=no
-+fi
-+rm -f conftest*
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
-+$as_echo "$ac_cv_os_cray" >&6; }
-+if test $ac_cv_os_cray = yes; then
-+ for ac_func in _getb67 GETB67 getb67; do
-+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-+eval as_val=\$$as_ac_var
-+ if test "x$as_val" = x""yes; then :
-+
-+cat >>confdefs.h <<_ACEOF
-+#define CRAY_STACKSEG_END $ac_func
-+_ACEOF
-+
-+ break
-+fi
-+
-+ done
-+fi
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
-+$as_echo_n "checking stack direction for C alloca... " >&6; }
-+if test "${ac_cv_c_stack_direction+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test "$cross_compiling" = yes; then :
-+ ac_cv_c_stack_direction=0
-+else
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+$ac_includes_default
-+int
-+find_stack_direction ()
-+{
-+ static char *addr = 0;
-+ auto char dummy;
-+ if (addr == 0)
-+ {
-+ addr = &dummy;
-+ return find_stack_direction ();
-+ }
-+ else
-+ return (&dummy > addr) ? 1 : -1;
-+}
-+
-+int
-+main ()
-+{
-+ return find_stack_direction () < 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+ ac_cv_c_stack_direction=1
-+else
-+ ac_cv_c_stack_direction=-1
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+ conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
-+$as_echo "$ac_cv_c_stack_direction" >&6; }
-+cat >>confdefs.h <<_ACEOF
-+#define STACK_DIRECTION $ac_cv_c_stack_direction
-+_ACEOF
-+
-+
-+fi
-+
-+
-
- for ac_header in stdint.h
- do :
-@@ -7564,13 +7756,13 @@
- else
- lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
-- (eval echo "\"\$as_me:7567: $ac_compile\"" >&5)
-+ (eval echo "\"\$as_me:7759: $ac_compile\"" >&5)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&5
-- (eval echo "\"\$as_me:7570: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
-+ (eval echo "\"\$as_me:7762: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
- cat conftest.err >&5
-- (eval echo "\"\$as_me:7573: output\"" >&5)
-+ (eval echo "\"\$as_me:7765: output\"" >&5)
- cat conftest.out >&5
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
-@@ -8772,7 +8964,7 @@
- ;;
- *-*-irix6*)
- # Find out which ABI we are using.
-- echo '#line 8775 "configure"' > conftest.$ac_ext
-+ echo '#line 8967 "configure"' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
-@@ -10032,11 +10224,11 @@
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
-- (eval echo "\"\$as_me:10035: $lt_compile\"" >&5)
-+ (eval echo "\"\$as_me:10227: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
-- echo "$as_me:10039: \$? = $ac_status" >&5
-+ echo "$as_me:10231: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
-@@ -10371,11 +10563,11 @@
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
-- (eval echo "\"\$as_me:10374: $lt_compile\"" >&5)
-+ (eval echo "\"\$as_me:10566: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
-- echo "$as_me:10378: \$? = $ac_status" >&5
-+ echo "$as_me:10570: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
-@@ -10476,11 +10668,11 @@
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
-- (eval echo "\"\$as_me:10479: $lt_compile\"" >&5)
-+ (eval echo "\"\$as_me:10671: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
-- echo "$as_me:10483: \$? = $ac_status" >&5
-+ echo "$as_me:10675: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
-@@ -10531,11 +10723,11 @@
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
-- (eval echo "\"\$as_me:10534: $lt_compile\"" >&5)
-+ (eval echo "\"\$as_me:10726: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
-- echo "$as_me:10538: \$? = $ac_status" >&5
-+ echo "$as_me:10730: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
-@@ -12915,7 +13107,7 @@
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 12918 "configure"
-+#line 13110 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -13011,7 +13203,7 @@
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 13014 "configure"
-+#line 13206 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
---- mpfr-3.0.0-a/mpfr.h 2010-06-23 11:03:20.000000000 +0000
-+++ mpfr-3.0.0-b/mpfr.h 2010-06-25 13:23:13.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.0.0-p1"
-+#define MPFR_VERSION_STRING "3.0.0-p2"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.0.0-a/tests/Makefile.in mpfr-3.0.0-b/tests/Makefile.in
---- mpfr-3.0.0-a/tests/Makefile.in 2010-06-10 11:00:52.000000000 +0000
-+++ mpfr-3.0.0-b/tests/Makefile.in 2010-06-10 11:00:52.000000000 +0000
-@@ -960,6 +960,7 @@
- red=; grn=; lgn=; blu=; std=
- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
- ACLOCAL = @ACLOCAL@
-+ALLOCA = @ALLOCA@
- AMTAR = @AMTAR@
- AR = @AR@
- AS = @AS@
-diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
---- mpfr-3.0.0-a/version.c 2010-06-23 11:03:20.000000000 +0000
-+++ mpfr-3.0.0-b/version.c 2010-06-25 13:23:13.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.0-p1";
-+ return "3.0.0-p2";
- }
diff --git a/packages/mpfr/3.0.0/130-gamma_underflow.patch b/packages/mpfr/3.0.0/130-gamma_underflow.patch
deleted file mode 100644
index cf8a936..0000000
--- a/packages/mpfr/3.0.0/130-gamma_underflow.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
---- mpfr-3.0.0-a/PATCHES 2010-07-10 00:11:19.000000000 +0000
-+++ mpfr-3.0.0-b/PATCHES 2010-07-10 00:12:50.000000000 +0000
-@@ -0,0 +1 @@
-+gamma_underflow
-diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
---- mpfr-3.0.0-a/VERSION 2010-06-25 13:23:13.000000000 +0000
-+++ mpfr-3.0.0-b/VERSION 2010-07-10 00:11:53.000000000 +0000
-@@ -1 +1 @@
--3.0.0-p2
-+3.0.0-p3
-diff -Naurd mpfr-3.0.0-a/gamma.c mpfr-3.0.0-b/gamma.c
---- mpfr-3.0.0-a/gamma.c 2010-06-10 11:00:14.000000000 +0000
-+++ mpfr-3.0.0-b/gamma.c 2010-07-10 00:11:46.000000000 +0000
-@@ -274,7 +274,7 @@
- /* we want an upper bound for x * [log(2-x)-1].
- since x < 0, we need a lower bound on log(2-x) */
- mpfr_ui_sub (xp, 2, x, MPFR_RNDD);
-- mpfr_log (xp, xp, MPFR_RNDD);
-+ mpfr_log2 (xp, xp, MPFR_RNDD);
- mpfr_sub_ui (xp, xp, 1, MPFR_RNDD);
- mpfr_mul (xp, xp, x, MPFR_RNDU);
-
-@@ -303,8 +303,8 @@
- {
- mpfr_sub (tmp, tmp, tmp2, MPFR_RNDZ); /* low bnd on |sin(Pi*(2-x))| */
- mpfr_ui_div (tmp, 12, tmp, MPFR_RNDU); /* upper bound */
-- mpfr_log (tmp, tmp, MPFR_RNDU);
-- mpfr_add (tmp, tmp, xp, MPFR_RNDU);
-+ mpfr_log2 (tmp, tmp, MPFR_RNDU);
-+ mpfr_add (xp, tmp, xp, MPFR_RNDU);
- underflow = mpfr_cmp_si (xp, expo.saved_emin - 2) <= 0;
- }
-
-diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
---- mpfr-3.0.0-a/mpfr.h 2010-06-25 13:23:13.000000000 +0000
-+++ mpfr-3.0.0-b/mpfr.h 2010-07-10 00:11:53.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.0.0-p2"
-+#define MPFR_VERSION_STRING "3.0.0-p3"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.0.0-a/tests/tgamma.c mpfr-3.0.0-b/tests/tgamma.c
---- mpfr-3.0.0-a/tests/tgamma.c 2010-06-10 11:00:13.000000000 +0000
-+++ mpfr-3.0.0-b/tests/tgamma.c 2010-07-10 00:11:46.000000000 +0000
-@@ -461,6 +461,20 @@
- mpfr_clear (x);
- }
-
-+/* bug found by Stathis, only occurs on 32-bit machines */
-+static void
-+test20100709 (void)
-+{
-+ mpfr_t x;
-+ int inex;
-+
-+ mpfr_init2 (x, 100);
-+ mpfr_set_str (x, "-4.6308260837372266e+07", 10, MPFR_RNDN);
-+ inex = mpfr_gamma (x, x, MPFR_RNDN);
-+ MPFR_ASSERTN(MPFR_IS_ZERO(x) && MPFR_IS_NEG(x) && inex > 0);
-+ mpfr_clear (x);
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -471,6 +485,7 @@
- test_generic (2, 100, 2);
- gamma_integer ();
- test20071231 ();
-+ test20100709 ();
-
- data_check ("data/gamma", mpfr_gamma, "mpfr_gamma");
-
-diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
---- mpfr-3.0.0-a/version.c 2010-06-25 13:23:13.000000000 +0000
-+++ mpfr-3.0.0-b/version.c 2010-07-10 00:11:53.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.0-p2";
-+ return "3.0.0-p3";
- }
diff --git a/packages/mpfr/3.0.0/140-mpfr_cmp_set_ui_si.patch b/packages/mpfr/3.0.0/140-mpfr_cmp_set_ui_si.patch
deleted file mode 100644
index 67d6a6a..0000000
--- a/packages/mpfr/3.0.0/140-mpfr_cmp_set_ui_si.patch
+++ /dev/null
@@ -1,239 +0,0 @@
-diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
---- mpfr-3.0.0-a/PATCHES 2010-09-07 08:44:01.000000000 +0000
-+++ mpfr-3.0.0-b/PATCHES 2010-09-07 08:48:46.000000000 +0000
-@@ -0,0 +1 @@
-+mpfr_cmp/set_ui/si
-diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
---- mpfr-3.0.0-a/VERSION 2010-07-10 00:11:53.000000000 +0000
-+++ mpfr-3.0.0-b/VERSION 2010-09-07 08:46:06.000000000 +0000
-@@ -1 +1 @@
--3.0.0-p3
-+3.0.0-p4
-diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
---- mpfr-3.0.0-a/mpfr.h 2010-07-10 00:11:53.000000000 +0000
-+++ mpfr-3.0.0-b/mpfr.h 2010-09-07 08:46:06.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.0.0-p3"
-+#define MPFR_VERSION_STRING "3.0.0-p4"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-@@ -798,35 +798,45 @@
- anyway. Checking with other ICC versions is needed. Possibly detect
- whether warnings are produced or not with a configure test.
- + Remove C++ too, since it complains too much. */
-+/* Added casts to improve robustness in case of undefined behavior and
-+ compiler extensions based on UB (in particular -fwrapv). MPFR doesn't
-+ use such extensions, but these macros will be used by 3rd-party code,
-+ where such extensions may be required.
-+ Moreover casts to unsigned long have been added to avoid warnings in
-+ programs that use MPFR and are compiled with -Wconversion; such casts
-+ are OK since if X is a constant expression, then (unsigned long) X is
-+ also a constant expression, so that the optimizations still work. */
- #if defined (__GNUC__) && !defined(__ICC) && !defined(__cplusplus)
- #if (__GNUC__ >= 2)
- #undef mpfr_cmp_ui
--/* We use the fact that mpfr_sgn on NaN sets the erange flag and returns 0. */
--#define mpfr_cmp_ui(_f,_u) \
-- (__builtin_constant_p (_u) && (_u) == 0 ? \
-- mpfr_sgn (_f) : \
-- mpfr_cmp_ui_2exp ((_f),(_u),0))
-+/* We use the fact that mpfr_sgn on NaN sets the erange flag and returns 0.
-+ But warning! mpfr_sgn is specified as a macro in the API, thus the macro
-+ mustn't be used if side effects are possible, like here. */
-+#define mpfr_cmp_ui(_f,_u) \
-+ (__builtin_constant_p (_u) && (unsigned long) (_u) == 0 ? \
-+ (mpfr_sgn) (_f) : \
-+ mpfr_cmp_ui_2exp ((_f), (unsigned long) (_u), 0))
- #undef mpfr_cmp_si
--#define mpfr_cmp_si(_f,_s) \
-- (__builtin_constant_p (_s) && (_s) >= 0 ? \
-- mpfr_cmp_ui ((_f), (_s)) : \
-- mpfr_cmp_si_2exp ((_f), (_s), 0))
-+#define mpfr_cmp_si(_f,_s) \
-+ (__builtin_constant_p (_s) && (long) (_s) >= 0 ? \
-+ mpfr_cmp_ui ((_f), (unsigned long) (long) (_s)) : \
-+ mpfr_cmp_si_2exp ((_f), (long) (_s), 0))
- #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95
- #undef mpfr_set_ui
--#define mpfr_set_ui(_f,_u,_r) \
-- (__builtin_constant_p (_u) && (_u) == 0 ? \
-- __extension__ ({ \
-- mpfr_ptr _p = (_f); \
-- _p->_mpfr_sign = 1; \
-- _p->_mpfr_exp = __MPFR_EXP_ZERO; \
-- (void) (_r); 0; }) : \
-- mpfr_set_ui_2exp ((_f), (_u), 0, (_r)))
-+#define mpfr_set_ui(_f,_u,_r) \
-+ (__builtin_constant_p (_u) && (unsigned long) (_u) == 0 ? \
-+ __extension__ ({ \
-+ mpfr_ptr _p = (_f); \
-+ _p->_mpfr_sign = 1; \
-+ _p->_mpfr_exp = __MPFR_EXP_ZERO; \
-+ (void) (_r); 0; }) : \
-+ mpfr_set_ui_2exp ((_f), (unsigned long) (_u), 0, (_r)))
- #endif
- #undef mpfr_set_si
--#define mpfr_set_si(_f,_s,_r) \
-- (__builtin_constant_p (_s) && (_s) >= 0 ? \
-- mpfr_set_ui ((_f), (_s), (_r)) : \
-- mpfr_set_si_2exp ((_f), (_s), 0, (_r)))
-+#define mpfr_set_si(_f,_s,_r) \
-+ (__builtin_constant_p (_s) && (long) (_s) >= 0 ? \
-+ mpfr_set_ui ((_f), (unsigned long) (long) (_s), (_r)) : \
-+ mpfr_set_si_2exp ((_f), (long) (_s), 0, (_r)))
- #endif
- #endif
-
-diff -Naurd mpfr-3.0.0-a/tests/tcmp_ui.c mpfr-3.0.0-b/tests/tcmp_ui.c
---- mpfr-3.0.0-a/tests/tcmp_ui.c 2010-06-10 11:00:13.000000000 +0000
-+++ mpfr-3.0.0-b/tests/tcmp_ui.c 2010-09-07 08:45:12.000000000 +0000
-@@ -88,6 +88,126 @@
- mpfr_clear (x);
- }
-
-+/* Since mpfr_cmp_ui and mpfr_cmp_si are also implemented by a macro
-+ with __builtin_constant_p for GCC, check that side effects are
-+ handled correctly. */
-+static void
-+check_macros (void)
-+{
-+ mpfr_t x;
-+ int c;
-+
-+ mpfr_init2 (x, 32);
-+
-+ c = 0;
-+ mpfr_set_ui (x, 17, MPFR_RNDN);
-+ if (mpfr_cmp_ui (x, 17) != 0)
-+ {
-+ printf ("Error 1 on mpfr_cmp_ui(x,17) in check_macros\n");
-+ exit (1);
-+ }
-+ if (mpfr_cmp_ui (x, (c++, 17)) != 0)
-+ {
-+ printf ("Error 2 on mpfr_cmp_ui(x,17) in check_macros\n");
-+ exit (1);
-+ }
-+ if (c != 1)
-+ {
-+ printf ("Error 3 on mpfr_cmp_ui(x,17) in check_macros\n"
-+ "(c = %d instead of 1)\n", c);
-+ exit (1);
-+ }
-+ if (mpfr_cmp_si (x, 17) != 0)
-+ {
-+ printf ("Error 1 on mpfr_cmp_si(x,17) in check_macros\n");
-+ exit (1);
-+ }
-+ if (mpfr_cmp_si (x, (c++, 17)) != 0)
-+ {
-+ printf ("Error 2 on mpfr_cmp_si(x,17) in check_macros\n");
-+ exit (1);
-+ }
-+ if (c != 2)
-+ {
-+ printf ("Error 3 on mpfr_cmp_si(x,17) in check_macros\n"
-+ "(c = %d instead of 2)\n", c);
-+ exit (1);
-+ }
-+
-+ c = 0;
-+ mpfr_set_ui (x, 0, MPFR_RNDN);
-+ if (mpfr_cmp_ui (x, 0) != 0)
-+ {
-+ printf ("Error 1 on mpfr_cmp_ui(x,0) in check_macros\n");
-+ exit (1);
-+ }
-+ if (mpfr_cmp_ui (x, (c++, 0)) != 0)
-+ {
-+ printf ("Error 2 on mpfr_cmp_ui(x,0) in check_macros\n");
-+ exit (1);
-+ }
-+ if (c != 1)
-+ {
-+ printf ("Error 3 on mpfr_cmp_ui(x,0) in check_macros\n"
-+ "(c = %d instead of 1)\n", c);
-+ exit (1);
-+ }
-+ if (mpfr_cmp_si (x, 0) != 0)
-+ {
-+ printf ("Error 1 on mpfr_cmp_si(x,0) in check_macros\n");
-+ exit (1);
-+ }
-+ if (mpfr_cmp_si (x, (c++, 0)) != 0)
-+ {
-+ printf ("Error 2 on mpfr_cmp_si(x,0) in check_macros\n");
-+ exit (1);
-+ }
-+ if (c != 2)
-+ {
-+ printf ("Error 3 on mpfr_cmp_si(x,0) in check_macros\n"
-+ "(c = %d instead of 2)\n", c);
-+ exit (1);
-+ }
-+
-+ mpfr_clear (x);
-+}
-+
-+/* Bug in r7114 */
-+static void
-+test_macros (void)
-+{
-+ mpfr_t x[3];
-+ mpfr_ptr p;
-+
-+ mpfr_inits (x[0], x[1], x[2], (mpfr_ptr) 0);
-+ mpfr_set_ui (x[0], 0, MPFR_RNDN);
-+ p = x[0];
-+ if (mpfr_cmp_ui (p++, 0) != 0)
-+ {
-+ printf ("Error in mpfr_cmp_ui macro: result should be 0.\n");
-+ exit (1);
-+ }
-+ if (p != x[1])
-+ {
-+ printf ("Error in mpfr_cmp_ui macro: p - x[0] = %d (expecting 1)\n",
-+ (int) (p - x[0]));
-+ exit (1);
-+ }
-+ p = x[0];
-+ if (mpfr_cmp_si (p++, 0) != 0)
-+ {
-+ printf ("Error in mpfr_cmp_si macro: result should be 0.\n");
-+ exit (1);
-+ }
-+ if (p != x[1])
-+ {
-+ printf ("Error in mpfr_cmp_si macro: p - x[0] = %d (expecting 1)\n",
-+ (int) (p - x[0]));
-+ exit (1);
-+ }
-+ mpfr_clears (x[0], x[1], x[2], (mpfr_ptr) 0);
-+}
-+
- int
- main (void)
- {
-@@ -216,6 +336,8 @@
- mpfr_clear (x);
-
- check_nan ();
-+ check_macros ();
-+ test_macros ();
-
- tests_end_mpfr ();
- return 0;
-diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
---- mpfr-3.0.0-a/version.c 2010-07-10 00:11:53.000000000 +0000
-+++ mpfr-3.0.0-b/version.c 2010-09-07 08:46:06.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.0-p3";
-+ return "3.0.0-p4";
- }
diff --git a/packages/mpfr/3.0.0/150-tcan_round.patch b/packages/mpfr/3.0.0/150-tcan_round.patch
deleted file mode 100644
index 292e7a5..0000000
--- a/packages/mpfr/3.0.0/150-tcan_round.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
---- mpfr-3.0.0-a/PATCHES 2010-10-21 20:28:38.000000000 +0000
-+++ mpfr-3.0.0-b/PATCHES 2010-10-21 20:28:38.000000000 +0000
-@@ -0,0 +1 @@
-+tcan_round
-diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
---- mpfr-3.0.0-a/VERSION 2010-09-07 08:46:06.000000000 +0000
-+++ mpfr-3.0.0-b/VERSION 2010-10-21 20:28:38.000000000 +0000
-@@ -1 +1 @@
--3.0.0-p4
-+3.0.0-p5
-diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
---- mpfr-3.0.0-a/mpfr.h 2010-09-07 08:46:06.000000000 +0000
-+++ mpfr-3.0.0-b/mpfr.h 2010-10-21 20:28:38.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.0.0-p4"
-+#define MPFR_VERSION_STRING "3.0.0-p5"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.0.0-a/tests/tcan_round.c mpfr-3.0.0-b/tests/tcan_round.c
---- mpfr-3.0.0-a/tests/tcan_round.c 2010-06-10 11:00:13.000000000 +0000
-+++ mpfr-3.0.0-b/tests/tcan_round.c 2010-10-21 20:28:38.000000000 +0000
-@@ -41,7 +41,7 @@
- /* avoid mpn_random which leaks memory */
- for (i = 0; i < n; i++)
- buf[i] = randlimb ();
-- p = (mpfr_prec_t) randlimb() % ((n-1) * GMP_NUMB_BITS) + MPFR_PREC_MIN;
-+ p = randlimb() % ((n-1) * GMP_NUMB_BITS) + MPFR_PREC_MIN;
- err = p + randlimb () % GMP_NUMB_BITS;
- r1 = mpfr_round_p (buf, n, err, p);
- r2 = mpfr_can_round_raw (buf, n, MPFR_SIGN_POS, err,
-diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
---- mpfr-3.0.0-a/version.c 2010-09-07 08:46:06.000000000 +0000
-+++ mpfr-3.0.0-b/version.c 2010-10-21 20:28:38.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.0-p4";
-+ return "3.0.0-p5";
- }
diff --git a/packages/mpfr/3.0.0/160-mpfr_sub1.patch b/packages/mpfr/3.0.0/160-mpfr_sub1.patch
deleted file mode 100644
index 2ce98e9..0000000
--- a/packages/mpfr/3.0.0/160-mpfr_sub1.patch
+++ /dev/null
@@ -1,628 +0,0 @@
-diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
---- mpfr-3.0.0-a/PATCHES 2010-10-21 20:59:32.000000000 +0000
-+++ mpfr-3.0.0-b/PATCHES 2010-10-21 20:59:32.000000000 +0000
-@@ -0,0 +1 @@
-+mpfr_sub1
-diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
---- mpfr-3.0.0-a/VERSION 2010-10-21 20:28:38.000000000 +0000
-+++ mpfr-3.0.0-b/VERSION 2010-10-21 20:59:32.000000000 +0000
-@@ -1 +1 @@
--3.0.0-p5
-+3.0.0-p6
-diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
---- mpfr-3.0.0-a/mpfr.h 2010-10-21 20:28:38.000000000 +0000
-+++ mpfr-3.0.0-b/mpfr.h 2010-10-21 20:59:32.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.0.0-p5"
-+#define MPFR_VERSION_STRING "3.0.0-p6"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.0.0-a/sub1.c mpfr-3.0.0-b/sub1.c
---- mpfr-3.0.0-a/sub1.c 2010-06-10 11:00:14.000000000 +0000
-+++ mpfr-3.0.0-b/sub1.c 2010-10-21 20:59:32.000000000 +0000
-@@ -37,7 +37,9 @@
- mp_size_t cancel2, an, bn, cn, cn0;
- mp_limb_t *ap, *bp, *cp;
- mp_limb_t carry, bb, cc, borrow = 0;
-- int inexact, shift_b, shift_c, is_exact = 1, down = 0, add_exp = 0;
-+ int inexact, shift_b, shift_c, add_exp = 0;
-+ int cmp_low = 0; /* used for rounding to nearest: 0 if low(b) = low(c),
-+ negative if low(b) < low(c), positive if low(b)>low(c) */
- int sh, k;
- MPFR_TMP_DECL(marker);
-
-@@ -196,7 +198,8 @@
- }
-
- #ifdef DEBUG
-- printf ("shift_b=%d shift_c=%d diffexp=%lu\n", shift_b, shift_c,
-+ printf ("rnd=%s shift_b=%d shift_c=%d diffexp=%lu\n",
-+ mpfr_print_rnd_mode (rnd_mode), shift_b, shift_c,
- (unsigned long) diff_exp);
- #endif
-
-@@ -307,17 +310,18 @@
- {
- if (MPFR_LIKELY(sh))
- {
-- is_exact = (carry == 0);
- /* can decide except when carry = 2^(sh-1) [middle]
- or carry = 0 [truncate, but cannot decide inexact flag] */
-- down = (carry < (MPFR_LIMB_ONE << (sh - 1)));
- if (carry > (MPFR_LIMB_ONE << (sh - 1)))
- goto add_one_ulp;
-- else if ((0 < carry) && down)
-+ else if ((0 < carry) && (carry < (MPFR_LIMB_ONE << (sh - 1))))
- {
- inexact = -1; /* result if smaller than exact value */
- goto truncate;
- }
-+ /* now carry = 2^(sh-1), in which case cmp_low=2,
-+ or carry = 0, in which case cmp_low=0 */
-+ cmp_low = (carry == 0) ? 0 : 2;
- }
- }
- else /* directed rounding: set rnd_mode to RNDZ iff toward zero */
-@@ -344,12 +348,32 @@
- cn -= (long int) an + cancel2;
-
- #ifdef DEBUG
-- printf ("last %d bits from a are %lu, bn=%ld, cn=%ld\n",
-+ printf ("last sh=%d bits from a are %lu, bn=%ld, cn=%ld\n",
- sh, (unsigned long) carry, (long) bn, (long) cn);
- #endif
-
-+ /* for rounding to nearest, we couldn't conclude up to here in the following
-+ cases:
-+ 1. sh = 0, then cmp_low=0: we can either truncate, subtract one ulp
-+ or add one ulp: -1 ulp < low(b)-low(c) < 1 ulp
-+ 2. sh > 0 but the low sh bits from high(b)-high(c) equal 2^(sh-1):
-+ -0.5 ulp <= -1/2^sh < low(b)-low(c)-0.5 < 1/2^sh <= 0.5 ulp
-+ we can't decide the rounding, in that case cmp_low=2:
-+ either we truncate and flag=-1, or we add one ulp and flag=1
-+ 3. the low sh>0 bits from high(b)-high(c) equal 0: we know we have to
-+ truncate but we can't decide the ternary value, here cmp_low=0:
-+ -0.5 ulp <= -1/2^sh < low(b)-low(c) < 1/2^sh <= 0.5 ulp
-+ we always truncate and inexact can be any of -1,0,1
-+ */
-+
-+ /* note: here cn might exceed cn0, in which case we consider a zero limb */
- for (k = 0; (bn > 0) || (cn > 0); k = 1)
- {
-+ /* if cmp_low < 0, we know low(b) - low(c) < 0
-+ if cmp_low > 0, we know low(b) - low(c) > 0
-+ (more precisely if cmp_low = 2, low(b) - low(c) = 0.5 ulp so far)
-+ if cmp_low = 0, so far low(b) - low(c) = 0 */
-+
- /* get next limbs */
- bb = (bn > 0) ? bp[--bn] : 0;
- if ((cn > 0) && (cn-- <= cn0))
-@@ -357,76 +381,115 @@
- else
- cc = 0;
-
-- /* down is set when low(b) < low(c) */
-- if (down == 0)
-- down = (bb < cc);
-+ /* cmp_low compares low(b) and low(c) */
-+ if (cmp_low == 0) /* case 1 or 3 */
-+ cmp_low = (bb < cc) ? -2+k : (bb > cc) ? 1 : 0;
-+
-+ /* Case 1 for k=0 splits into 7 subcases:
-+ 1a: bb > cc + half
-+ 1b: bb = cc + half
-+ 1c: 0 < bb - cc < half
-+ 1d: bb = cc
-+ 1e: -half < bb - cc < 0
-+ 1f: bb - cc = -half
-+ 1g: bb - cc < -half
-+
-+ Case 2 splits into 3 subcases:
-+ 2a: bb > cc
-+ 2b: bb = cc
-+ 2c: bb < cc
-+
-+ Case 3 splits into 3 subcases:
-+ 3a: bb > cc
-+ 3b: bb = cc
-+ 3c: bb < cc
-+ */
-
- /* the case rounding to nearest with sh=0 is special since one couldn't
- subtract above 1/2 ulp in the trailing limb of the result */
-- if ((rnd_mode == MPFR_RNDN) && sh == 0 && k == 0)
-+ if (rnd_mode == MPFR_RNDN && sh == 0 && k == 0) /* case 1 for k=0 */
- {
- mp_limb_t half = MPFR_LIMB_HIGHBIT;
-
-- is_exact = (bb == cc);
--
- /* add one ulp if bb > cc + half
- truncate if cc - half < bb < cc + half
- sub one ulp if bb < cc - half
- */
-
-- if (down)
-+ if (cmp_low < 0) /* bb < cc: -1 ulp < low(b) - low(c) < 0,
-+ cases 1e, 1f and 1g */
- {
- if (cc >= half)
- cc -= half;
-- else
-+ else /* since bb < cc < half, bb+half < 2*half */
- bb += half;
-+ /* now we have bb < cc + half:
-+ we have to subtract one ulp if bb < cc,
-+ and truncate if bb > cc */
- }
-- else /* bb >= cc */
-+ else if (cmp_low >= 0) /* bb >= cc, cases 1a to 1d */
- {
- if (cc < half)
- cc += half;
-- else
-+ else /* since bb >= cc >= half, bb - half >= 0 */
- bb -= half;
-+ /* now we have bb > cc - half: we have to add one ulp if bb > cc,
-+ and truncate if bb < cc */
-+ if (cmp_low > 0)
-+ cmp_low = 2;
- }
- }
-
- #ifdef DEBUG
-- printf (" bb=%lu cc=%lu down=%d is_exact=%d\n",
-- (unsigned long) bb, (unsigned long) cc, down, is_exact);
-+ printf ("k=%u bb=%lu cc=%lu cmp_low=%d\n", k,
-+ (unsigned long) bb, (unsigned long) cc, cmp_low);
- #endif
-- if (bb < cc)
-+ if (cmp_low < 0) /* low(b) - low(c) < 0: either truncate or subtract
-+ one ulp */
- {
- if (rnd_mode == MPFR_RNDZ)
-- goto sub_one_ulp;
-+ goto sub_one_ulp; /* set inexact=-1 */
- else if (rnd_mode != MPFR_RNDN) /* round away */
- {
- inexact = 1;
- goto truncate;
- }
-- else /* round to nearest: special case here since for sh=k=0
-- bb = bb0 - MPFR_LIMB_HIGHBIT */
-+ else /* round to nearest */
- {
-- if (is_exact && sh == 0)
-- {
-- /* For k=0 we can't decide exactness since it may depend
-- from low order bits.
-- For k=1, the first low limbs matched: low(b)-low(c)<0. */
-- if (k)
-- {
-- inexact = 1;
-- goto truncate;
-- }
-- }
-- else if (down && sh == 0)
-- goto sub_one_ulp;
-- else
-- {
-- inexact = (is_exact) ? 1 : -1;
-+ /* If cmp_low < 0 and bb > cc, then -0.5 ulp < low(b)-low(c) < 0,
-+ whatever the value of sh.
-+ If sh>0, then cmp_low < 0 implies that the initial neglected
-+ sh bits were 0 (otherwise cmp_low=2 initially), thus the
-+ weight of the new bits is less than 0.5 ulp too.
-+ If k > 0 (and sh=0) this means that either the first neglected
-+ limbs bb and cc were equal (thus cmp_low was 0 for k=0),
-+ or we had bb - cc = -0.5 ulp or 0.5 ulp.
-+ The last case is not possible here since we would have
-+ cmp_low > 0 which is sticky.
-+ In the first case (where we have cmp_low = -1), we truncate,
-+ whereas in the 2nd case we have cmp_low = -2 and we subtract
-+ one ulp.
-+ */
-+ if (bb > cc || sh > 0 || cmp_low == -1)
-+ { /* -0.5 ulp < low(b)-low(c) < 0,
-+ bb > cc corresponds to cases 1e and 1f1
-+ sh > 0 corresponds to cases 3c and 3b3
-+ cmp_low = -1 corresponds to case 1d3 (also 3b3) */
-+ inexact = 1;
- goto truncate;
- }
-+ else if (bb < cc) /* here sh = 0 and low(b)-low(c) < -0.5 ulp,
-+ this corresponds to cases 1g and 1f3 */
-+ goto sub_one_ulp;
-+ /* the only case where we can't conclude is sh=0 and bb=cc,
-+ i.e., we have low(b) - low(c) = -0.5 ulp (up to now), thus
-+ we don't know if we must truncate or subtract one ulp.
-+ Note: for sh=0 we can't have low(b) - low(c) = -0.5 ulp up to
-+ now, since low(b) - low(c) > 1/2^sh */
- }
- }
-- else if (bb > cc)
-+ else if (cmp_low > 0) /* 0 < low(b) - low(c): either truncate or
-+ add one ulp */
- {
- if (rnd_mode == MPFR_RNDZ)
- {
-@@ -437,34 +500,70 @@
- goto add_one_ulp;
- else /* round to nearest */
- {
-- if (is_exact)
-+ if (bb > cc)
- {
-- inexact = -1;
-- goto truncate;
-+ /* if sh=0, then bb>cc means that low(b)-low(c) > 0.5 ulp,
-+ and similarly when cmp_low=2 */
-+ if (cmp_low == 2) /* cases 1a, 1b1, 2a and 2b1 */
-+ goto add_one_ulp;
-+ /* sh > 0 and cmp_low > 0: this implies that the sh initial
-+ neglected bits were 0, and the remaining low(b)-low(c)>0,
-+ but its weight is less than 0.5 ulp */
-+ else /* 0 < low(b) - low(c) < 0.5 ulp, this corresponds to
-+ cases 3a, 1d1 and 3b1 */
-+ {
-+ inexact = -1;
-+ goto truncate;
-+ }
- }
-- else if (down)
-+ else if (bb < cc) /* 0 < low(b) - low(c) < 0.5 ulp, cases 1c,
-+ 1b3, 2b3 and 2c */
- {
-- inexact = 1;
-+ inexact = -1;
- goto truncate;
- }
-- else
-- goto add_one_ulp;
-+ /* the only case where we can't conclude is bb=cc, i.e.,
-+ low(b) - low(c) = 0.5 ulp (up to now), thus we don't know
-+ if we must truncate or add one ulp. */
- }
- }
-+ /* after k=0, we cannot conclude in the following cases, we split them
-+ according to the values of bb and cc for k=1:
-+ 1b. sh=0 and cmp_low = 1 and bb-cc = half [around 0.5 ulp]
-+ 1b1. bb > cc: add one ulp, inex = 1
-+ 1b2: bb = cc: cannot conclude
-+ 1b3: bb < cc: truncate, inex = -1
-+ 1d. sh=0 and cmp_low = 0 and bb-cc = 0 [around 0]
-+ 1d1: bb > cc: truncate, inex = -1
-+ 1d2: bb = cc: cannot conclude
-+ 1d3: bb < cc: truncate, inex = +1
-+ 1f. sh=0 and cmp_low = -1 and bb-cc = -half [around -0.5 ulp]
-+ 1f1: bb > cc: truncate, inex = +1
-+ 1f2: bb = cc: cannot conclude
-+ 1f3: bb < cc: sub one ulp, inex = -1
-+ 2b. sh > 0 and cmp_low = 2 and bb=cc [around 0.5 ulp]
-+ 2b1. bb > cc: add one ulp, inex = 1
-+ 2b2: bb = cc: cannot conclude
-+ 2b3: bb < cc: truncate, inex = -1
-+ 3b. sh > 0 and cmp_low = 0 [around 0]
-+ 3b1. bb > cc: truncate, inex = -1
-+ 3b2: bb = cc: cannot conclude
-+ 3b3: bb < cc: truncate, inex = +1
-+ */
- }
-
-- if ((rnd_mode == MPFR_RNDN) && !is_exact)
-+ if ((rnd_mode == MPFR_RNDN) && cmp_low != 0)
- {
- /* even rounding rule */
- if ((ap[0] >> sh) & 1)
- {
-- if (down)
-+ if (cmp_low < 0)
- goto sub_one_ulp;
- else
- goto add_one_ulp;
- }
- else
-- inexact = (down) ? 1 : -1;
-+ inexact = (cmp_low > 0) ? -1 : 1;
- }
- else
- inexact = 0;
-diff -Naurd mpfr-3.0.0-a/tests/tfma.c mpfr-3.0.0-b/tests/tfma.c
---- mpfr-3.0.0-a/tests/tfma.c 2010-06-10 11:00:13.000000000 +0000
-+++ mpfr-3.0.0-b/tests/tfma.c 2010-10-21 20:59:32.000000000 +0000
-@@ -337,6 +337,94 @@
- mpfr_clears (x, y, z, r, (mpfr_ptr) 0);
- }
-
-+static void
-+bug20101018 (void)
-+{
-+ mpfr_t x, y, z, t, u;
-+ int i;
-+
-+ mpfr_init2 (x, 64);
-+ mpfr_init2 (y, 64);
-+ mpfr_init2 (z, 64);
-+ mpfr_init2 (t, 64);
-+ mpfr_init2 (u, 64);
-+
-+ mpfr_set_str (x, "0xf.fffffffffffffffp-14766", 16, MPFR_RNDN);
-+ mpfr_set_str (y, "-0xf.fffffffffffffffp+317", 16, MPFR_RNDN);
-+ mpfr_set_str (z, "0x8.3ffffffffffe3ffp-14443", 16, MPFR_RNDN);
-+ mpfr_set_str (t, "0x8.7ffffffffffc7ffp-14444", 16, MPFR_RNDN);
-+ i = mpfr_fma (u, x, y, z, MPFR_RNDN);
-+ if (mpfr_cmp (u, t) != 0)
-+ {
-+ printf ("Wrong result in bug20101018 (a)\n");
-+ printf ("Expected ");
-+ mpfr_out_str (stdout, 16, 0, t, MPFR_RNDN);
-+ printf ("\nGot ");
-+ mpfr_out_str (stdout, 16, 0, u, MPFR_RNDN);
-+ printf ("\n");
-+ exit (1);
-+ }
-+ if (i <= 0)
-+ {
-+ printf ("Wrong ternary value in bug20101018 (a)\n");
-+ printf ("Expected > 0\n");
-+ printf ("Got %d\n", i);
-+ exit (1);
-+ }
-+
-+ mpfr_set_str (x, "-0xf.fffffffffffffffp-11420", 16, MPFR_RNDN);
-+ mpfr_set_str (y, "0xf.fffffffffffffffp+9863", 16, MPFR_RNDN);
-+ mpfr_set_str (z, "0x8.fffff80ffffffffp-1551", 16, MPFR_RNDN);
-+ mpfr_set_str (t, "0x9.fffff01ffffffffp-1552", 16, MPFR_RNDN);
-+ i = mpfr_fma (u, x, y, z, MPFR_RNDN);
-+ if (mpfr_cmp (u, t) != 0)
-+ {
-+ printf ("Wrong result in bug20101018 (b)\n");
-+ printf ("Expected ");
-+ mpfr_out_str (stdout, 16, 0, t, MPFR_RNDN);
-+ printf ("\nGot ");
-+ mpfr_out_str (stdout, 16, 0, u, MPFR_RNDN);
-+ printf ("\n");
-+ exit (1);
-+ }
-+ if (i <= 0)
-+ {
-+ printf ("Wrong ternary value in bug20101018 (b)\n");
-+ printf ("Expected > 0\n");
-+ printf ("Got %d\n", i);
-+ exit (1);
-+ }
-+
-+ mpfr_set_str (x, "0xf.fffffffffffffffp-2125", 16, MPFR_RNDN);
-+ mpfr_set_str (y, "-0xf.fffffffffffffffp-6000", 16, MPFR_RNDN);
-+ mpfr_set_str (z, "0x8p-8119", 16, MPFR_RNDN);
-+ mpfr_set_str (t, "0x8.000000000000001p-8120", 16, MPFR_RNDN);
-+ i = mpfr_fma (u, x, y, z, MPFR_RNDN);
-+ if (mpfr_cmp (u, t) != 0)
-+ {
-+ printf ("Wrong result in bug20101018 (c)\n");
-+ printf ("Expected ");
-+ mpfr_out_str (stdout, 16, 0, t, MPFR_RNDN);
-+ printf ("\nGot ");
-+ mpfr_out_str (stdout, 16, 0, u, MPFR_RNDN);
-+ printf ("\n");
-+ exit (1);
-+ }
-+ if (i <= 0)
-+ {
-+ printf ("Wrong ternary value in bug20101018 (c)\n");
-+ printf ("Expected > 0\n");
-+ printf ("Got %d\n", i);
-+ exit (1);
-+ }
-+
-+ mpfr_clear (x);
-+ mpfr_clear (y);
-+ mpfr_clear (z);
-+ mpfr_clear (t);
-+ mpfr_clear (u);
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -345,6 +433,8 @@
-
- tests_start_mpfr ();
-
-+ bug20101018 ();
-+
- mpfr_init (x);
- mpfr_init (s);
- mpfr_init (y);
-diff -Naurd mpfr-3.0.0-a/tests/tsub.c mpfr-3.0.0-b/tests/tsub.c
---- mpfr-3.0.0-a/tests/tsub.c 2010-06-10 11:00:13.000000000 +0000
-+++ mpfr-3.0.0-b/tests/tsub.c 2010-10-21 20:59:32.000000000 +0000
-@@ -201,6 +201,8 @@
- if (mpfr_cmp (z, x))
- {
- printf ("Error in mpfr_sub (2)\n");
-+ printf ("Expected "); mpfr_print_binary (x); puts ("");
-+ printf ("Got "); mpfr_print_binary (z); puts ("");
- exit (1);
- }
- mpfr_set_str_binary (x, "1.1110111011110001110111011111111111101000011001011100101100101101");
-@@ -478,6 +480,156 @@
- mpfr_clear (u);
- }
-
-+/* Bug found by Jakub Jelinek
-+ * http://bugzilla.redhat.com/643657
-+ * https://gforge.inria.fr/tracker/index.php?func=detail&aid=11301
-+ * The consequence can be either an assertion failure (i = 2 in the
-+ * testcase below, in debug mode) or an incorrectly rounded value.
-+ */
-+static void
-+bug20101017 (void)
-+{
-+ mpfr_t a, b, c;
-+ int inex;
-+ int i;
-+
-+ mpfr_init2 (a, GMP_NUMB_BITS * 2);
-+ mpfr_init2 (b, GMP_NUMB_BITS);
-+ mpfr_init2 (c, GMP_NUMB_BITS);
-+
-+ /* a = 2^(2N) + k.2^(2N-1) + 2^N and b = 1
-+ with N = GMP_NUMB_BITS and k = 0 or 1.
-+ c = a - b should round to the same value as a. */
-+
-+ for (i = 2; i <= 3; i++)
-+ {
-+ mpfr_set_ui_2exp (a, i, GMP_NUMB_BITS - 1, MPFR_RNDN);
-+ mpfr_add_ui (a, a, 1, MPFR_RNDN);
-+ mpfr_mul_2ui (a, a, GMP_NUMB_BITS, MPFR_RNDN);
-+ mpfr_set_ui (b, 1, MPFR_RNDN);
-+ inex = mpfr_sub (c, a, b, MPFR_RNDN);
-+ mpfr_set (b, a, MPFR_RNDN);
-+ if (! mpfr_equal_p (c, b))
-+ {
-+ printf ("Error in bug20101017 for i = %d.\n", i);
-+ printf ("Expected ");
-+ mpfr_out_str (stdout, 16, 0, b, MPFR_RNDN);
-+ putchar ('\n');
-+ printf ("Got ");
-+ mpfr_out_str (stdout, 16, 0, c, MPFR_RNDN);
-+ putchar ('\n');
-+ exit (1);
-+ }
-+ if (inex >= 0)
-+ {
-+ printf ("Error in bug20101017 for i = %d: bad inex value.\n", i);
-+ printf ("Expected negative, got %d.\n", inex);
-+ exit (1);
-+ }
-+ }
-+
-+ mpfr_set_prec (a, 64);
-+ mpfr_set_prec (b, 129);
-+ mpfr_set_prec (c, 2);
-+ mpfr_set_str_binary (b, "0.100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001E65");
-+ mpfr_set_str_binary (c, "0.10E1");
-+ inex = mpfr_sub (a, b, c, MPFR_RNDN);
-+ if (mpfr_cmp_ui_2exp (a, 1, 64) != 0 || inex >= 0)
-+ {
-+ printf ("Error in mpfr_sub for b-c for b=2^64+1+2^(-64), c=1\n");
-+ printf ("Expected result 2^64 with inex < 0\n");
-+ printf ("Got "); mpfr_print_binary (a);
-+ printf (" with inex=%d\n", inex);
-+ exit (1);
-+ }
-+
-+ mpfr_clears (a, b, c, (mpfr_ptr) 0);
-+}
-+
-+/* hard test of rounding */
-+static void
-+check_rounding (void)
-+{
-+ mpfr_t a, b, c, res;
-+ mpfr_prec_t p;
-+ long k, l;
-+ int i;
-+
-+#define MAXKL (2 * GMP_NUMB_BITS)
-+ for (p = MPFR_PREC_MIN; p <= GMP_NUMB_BITS; p++)
-+ {
-+ mpfr_init2 (a, p);
-+ mpfr_init2 (res, p);
-+ mpfr_init2 (b, p + 1 + MAXKL);
-+ mpfr_init2 (c, MPFR_PREC_MIN);
-+
-+ /* b = 2^p + 1 + 2^(-k), c = 2^(-l) */
-+ for (k = 0; k <= MAXKL; k++)
-+ for (l = 0; l <= MAXKL; l++)
-+ {
-+ mpfr_set_ui_2exp (b, 1, p, MPFR_RNDN);
-+ mpfr_add_ui (b, b, 1, MPFR_RNDN);
-+ mpfr_mul_2ui (b, b, k, MPFR_RNDN);
-+ mpfr_add_ui (b, b, 1, MPFR_RNDN);
-+ mpfr_div_2ui (b, b, k, MPFR_RNDN);
-+ mpfr_set_ui_2exp (c, 1, -l, MPFR_RNDN);
-+ i = mpfr_sub (a, b, c, MPFR_RNDN);
-+ /* b - c = 2^p + 1 + 2^(-k) - 2^(-l), should be rounded to
-+ 2^p for l <= k, and 2^p+2 for l < k */
-+ if (l <= k)
-+ {
-+ if (mpfr_cmp_ui_2exp (a, 1, p) != 0)
-+ {
-+ printf ("Wrong result in check_rounding\n");
-+ printf ("p=%lu k=%ld l=%ld\n", p, k, l);
-+ printf ("b="); mpfr_print_binary (b); puts ("");
-+ printf ("c="); mpfr_print_binary (c); puts ("");
-+ printf ("Expected 2^%lu\n", p);
-+ printf ("Got "); mpfr_print_binary (a); puts ("");
-+ exit (1);
-+ }
-+ if (i >= 0)
-+ {
-+ printf ("Wrong ternary value in check_rounding\n");
-+ printf ("p=%lu k=%ld l=%ld\n", p, k, l);
-+ printf ("b="); mpfr_print_binary (b); puts ("");
-+ printf ("c="); mpfr_print_binary (c); puts ("");
-+ printf ("a="); mpfr_print_binary (a); puts ("");
-+ printf ("Expected < 0, got %d\n", i);
-+ exit (1);
-+ }
-+ }
-+ else /* l < k */
-+ {
-+ mpfr_set_ui_2exp (res, 1, p, MPFR_RNDN);
-+ mpfr_add_ui (res, res, 2, MPFR_RNDN);
-+ if (mpfr_cmp (a, res) != 0)
-+ {
-+ printf ("Wrong result in check_rounding\n");
-+ printf ("b="); mpfr_print_binary (b); puts ("");
-+ printf ("c="); mpfr_print_binary (c); puts ("");
-+ printf ("Expected "); mpfr_print_binary (res); puts ("");
-+ printf ("Got "); mpfr_print_binary (a); puts ("");
-+ exit (1);
-+ }
-+ if (i <= 0)
-+ {
-+ printf ("Wrong ternary value in check_rounding\n");
-+ printf ("b="); mpfr_print_binary (b); puts ("");
-+ printf ("c="); mpfr_print_binary (c); puts ("");
-+ printf ("Expected > 0, got %d\n", i);
-+ exit (1);
-+ }
-+ }
-+ }
-+
-+ mpfr_clear (a);
-+ mpfr_clear (res);
-+ mpfr_clear (b);
-+ mpfr_clear (c);
-+ }
-+}
-+
- #define TEST_FUNCTION test_sub
- #define TWO_ARGS
- #define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS)
-@@ -491,6 +643,8 @@
-
- tests_start_mpfr ();
-
-+ bug20101017 ();
-+ check_rounding ();
- check_diverse ();
- check_inexact ();
- bug_ddefour ();
-diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
---- mpfr-3.0.0-a/version.c 2010-10-21 20:28:38.000000000 +0000
-+++ mpfr-3.0.0-b/version.c 2010-10-21 20:59:32.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.0-p5";
-+ return "3.0.0-p6";
- }
diff --git a/packages/mpfr/3.0.0/170-mpfr_set_ld.patch b/packages/mpfr/3.0.0/170-mpfr_set_ld.patch
deleted file mode 100644
index 9209afe..0000000
--- a/packages/mpfr/3.0.0/170-mpfr_set_ld.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
---- mpfr-3.0.0-a/PATCHES 2010-10-21 21:18:26.000000000 +0000
-+++ mpfr-3.0.0-b/PATCHES 2010-10-21 21:18:26.000000000 +0000
-@@ -0,0 +1 @@
-+mpfr_set_ld
-diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
---- mpfr-3.0.0-a/VERSION 2010-10-21 20:59:32.000000000 +0000
-+++ mpfr-3.0.0-b/VERSION 2010-10-21 21:18:26.000000000 +0000
-@@ -1 +1 @@
--3.0.0-p6
-+3.0.0-p7
-diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
---- mpfr-3.0.0-a/mpfr.h 2010-10-21 20:59:32.000000000 +0000
-+++ mpfr-3.0.0-b/mpfr.h 2010-10-21 21:18:26.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.0.0-p6"
-+#define MPFR_VERSION_STRING "3.0.0-p7"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.0.0-a/set_ld.c mpfr-3.0.0-b/set_ld.c
---- mpfr-3.0.0-a/set_ld.c 2010-06-10 11:00:14.000000000 +0000
-+++ mpfr-3.0.0-b/set_ld.c 2010-10-21 21:18:26.000000000 +0000
-@@ -102,21 +102,25 @@
- {
- x /= div13; /* exact */
- shift_exp += 8192;
-+ mpfr_div_2si (t, t, 8192, MPFR_RNDZ);
- }
- if (ABS (x) >= div12)
- {
- x /= div12; /* exact */
- shift_exp += 4096;
-+ mpfr_div_2si (t, t, 4096, MPFR_RNDZ);
- }
- if (ABS (x) >= div11)
- {
- x /= div11; /* exact */
- shift_exp += 2048;
-+ mpfr_div_2si (t, t, 2048, MPFR_RNDZ);
- }
- if (ABS (x) >= div10)
- {
- x /= div10; /* exact */
- shift_exp += 1024;
-+ mpfr_div_2si (t, t, 1024, MPFR_RNDZ);
- }
- /* warning: we may have DBL_MAX=2^1024*(1-2^(-53)) < x < 2^1024,
- therefore we have one extra exponent reduction step */
-@@ -124,9 +128,10 @@
- {
- x /= div9; /* exact */
- shift_exp += 512;
-+ mpfr_div_2si (t, t, 512, MPFR_RNDZ);
- }
- } /* Check overflow of double */
-- else
-+ else /* no overflow on double */
- {
- long double div9, div10, div11;
-
-@@ -149,29 +154,34 @@
- {
- x /= div13; /* exact */
- shift_exp -= 8192;
-+ mpfr_mul_2si (t, t, 8192, MPFR_RNDZ);
- }
- if (ABS (x) <= div12)
- {
- x /= div12; /* exact */
- shift_exp -= 4096;
-+ mpfr_mul_2si (t, t, 4096, MPFR_RNDZ);
- }
- if (ABS (x) <= div11)
- {
- x /= div11; /* exact */
- shift_exp -= 2048;
-+ mpfr_mul_2si (t, t, 2048, MPFR_RNDZ);
- }
- if (ABS (x) <= div10)
- {
- x /= div10; /* exact */
- shift_exp -= 1024;
-+ mpfr_mul_2si (t, t, 1024, MPFR_RNDZ);
- }
- if (ABS(x) <= div9)
- {
- x /= div9; /* exact */
- shift_exp -= 512;
-+ mpfr_mul_2si (t, t, 512, MPFR_RNDZ);
- }
- }
-- else
-+ else /* no underflow */
- {
- inexact = mpfr_set_d (u, (double) x, MPFR_RNDZ);
- MPFR_ASSERTD (inexact == 0);
-diff -Naurd mpfr-3.0.0-a/tests/tset_ld.c mpfr-3.0.0-b/tests/tset_ld.c
---- mpfr-3.0.0-a/tests/tset_ld.c 2010-06-10 11:00:13.000000000 +0000
-+++ mpfr-3.0.0-b/tests/tset_ld.c 2010-10-21 21:18:26.000000000 +0000
-@@ -147,12 +147,39 @@
- test_fixed_bugs (void)
- {
- mpfr_t x;
-- long double d;
-+ long double l, m;
-
- /* bug found by Steve Kargl (2009-03-14) */
- mpfr_init2 (x, 64);
- mpfr_set_ui_2exp (x, 1, -16447, MPFR_RNDN);
-- d = mpfr_get_ld (x, MPFR_RNDN); /* an assertion failed in init2.c:50 */
-+ mpfr_get_ld (x, MPFR_RNDN); /* an assertion failed in init2.c:50 */
-+
-+ /* bug reported by Jakub Jelinek (2010-10-17)
-+ https://gforge.inria.fr/tracker/?func=detail&aid=11300 */
-+ mpfr_set_prec (x, MPFR_LDBL_MANT_DIG);
-+ /* l = 0x1.23456789abcdef0123456789abcdp-914L; */
-+ l = 8.215640181713713164092636634579e-276;
-+ mpfr_set_ld (x, l, MPFR_RNDN);
-+ m = mpfr_get_ld (x, MPFR_RNDN);
-+ if (m != l)
-+ {
-+ printf ("Error in get_ld o set_ld for l=%Le\n", l);
-+ printf ("Got m=%Le instead of l\n", m);
-+ exit (1);
-+ }
-+
-+ /* another similar test which failed with extended double precision and the
-+ generic code for mpfr_set_ld */
-+ /* l = 0x1.23456789abcdef0123456789abcdp-968L; */
-+ l = 4.560596445887084662336528403703e-292;
-+ mpfr_set_ld (x, l, MPFR_RNDN);
-+ m = mpfr_get_ld (x, MPFR_RNDN);
-+ if (m != l)
-+ {
-+ printf ("Error in get_ld o set_ld for l=%Le\n", l);
-+ printf ("Got m=%Le instead of l\n", m);
-+ exit (1);
-+ }
-
- mpfr_clear (x);
- }
-diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
---- mpfr-3.0.0-a/version.c 2010-10-21 20:59:32.000000000 +0000
-+++ mpfr-3.0.0-b/version.c 2010-10-21 21:18:26.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.0-p6";
-+ return "3.0.0-p7";
- }
diff --git a/packages/mpfr/3.0.0/180-macros.patch b/packages/mpfr/3.0.0/180-macros.patch
deleted file mode 100644
index 58a490f..0000000
--- a/packages/mpfr/3.0.0/180-macros.patch
+++ /dev/null
@@ -1,193 +0,0 @@
-diff -Naurd mpfr-3.0.0-a/PATCHES mpfr-3.0.0-b/PATCHES
---- mpfr-3.0.0-a/PATCHES 2010-11-09 15:15:07.000000000 +0000
-+++ mpfr-3.0.0-b/PATCHES 2010-11-09 15:15:07.000000000 +0000
-@@ -0,0 +1 @@
-+macros
-diff -Naurd mpfr-3.0.0-a/VERSION mpfr-3.0.0-b/VERSION
---- mpfr-3.0.0-a/VERSION 2010-10-21 21:18:26.000000000 +0000
-+++ mpfr-3.0.0-b/VERSION 2010-11-09 15:15:07.000000000 +0000
-@@ -1 +1 @@
--3.0.0-p7
-+3.0.0-p8
-diff -Naurd mpfr-3.0.0-a/mpfr.h mpfr-3.0.0-b/mpfr.h
---- mpfr-3.0.0-a/mpfr.h 2010-10-21 21:18:26.000000000 +0000
-+++ mpfr-3.0.0-b/mpfr.h 2010-11-09 15:15:07.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 0
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.0.0-p7"
-+#define MPFR_VERSION_STRING "3.0.0-p8"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-@@ -67,6 +67,16 @@
- # define _MPFR_H_HAVE_INTMAX_T 1
- #endif
-
-+/* Avoid some problems with macro expansion if the user defines macros
-+ with the same name as keywords. By convention, identifiers and macro
-+ names starting with mpfr_ are reserved by MPFR. */
-+typedef void mpfr_void;
-+typedef int mpfr_int;
-+typedef unsigned int mpfr_uint;
-+typedef long mpfr_long;
-+typedef unsigned long mpfr_ulong;
-+typedef size_t mpfr_size_t;
-+
- /* Definition of rounding modes (DON'T USE MPFR_RNDNA!).
- Warning! Changing the contents of this enum should be seen as an
- interface change since the old and the new types are not compatible
-@@ -136,7 +146,7 @@
- typedef mp_exp_t mpfr_exp_t;
-
- /* Definition of the standard exponent limits */
--#define MPFR_EMAX_DEFAULT ((mpfr_exp_t) (((unsigned long) 1 << 30) - 1))
-+#define MPFR_EMAX_DEFAULT ((mpfr_exp_t) (((mpfr_ulong) 1 << 30) - 1))
- #define MPFR_EMIN_DEFAULT (-(MPFR_EMAX_DEFAULT))
-
- /* Definition of the main structure */
-@@ -725,13 +735,13 @@
- unexpected results with future compilers and aggressive optimisations.
- Why not working only with signed types, using INT_MIN and LONG_MIN? */
- #if __GMP_MP_SIZE_T_INT
--#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(unsigned int)0)>>1))+2))
--#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(unsigned int)0)>>1))+1))
--#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(unsigned int)0)>>1))+3))
-+#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(mpfr_uint)0)>>1))+2))
-+#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(mpfr_uint)0)>>1))+1))
-+#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(mpfr_uint)0)>>1))+3))
- #else
--#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(unsigned long)0)>>1))+2))
--#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(unsigned long)0)>>1))+1))
--#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(unsigned long)0)>>1))+3))
-+#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(mpfr_ulong)0)>>1))+2))
-+#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(mpfr_ulong)0)>>1))+1))
-+#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(mpfr_ulong)0)>>1))+3))
- #endif
-
- /* Define MPFR_USE_EXTENSION to avoid "gcc -pedantic" warnings. */
-@@ -760,9 +770,9 @@
- #define mpfr_inf_p(_x) ((_x)->_mpfr_exp == __MPFR_EXP_INF)
- #define mpfr_zero_p(_x) ((_x)->_mpfr_exp == __MPFR_EXP_ZERO)
- #define mpfr_regular_p(_x) ((_x)->_mpfr_exp > __MPFR_EXP_INF)
--#define mpfr_sgn(_x) \
-- ((_x)->_mpfr_exp < __MPFR_EXP_INF ? \
-- (mpfr_nan_p (_x) ? mpfr_set_erangeflag () : (void) 0), 0 : \
-+#define mpfr_sgn(_x) \
-+ ((_x)->_mpfr_exp < __MPFR_EXP_INF ? \
-+ (mpfr_nan_p (_x) ? mpfr_set_erangeflag () : (mpfr_void) 0), 0 : \
- MPFR_SIGN (_x))
-
- /* Prevent them from using as lvalues */
-@@ -805,7 +815,19 @@
- Moreover casts to unsigned long have been added to avoid warnings in
- programs that use MPFR and are compiled with -Wconversion; such casts
- are OK since if X is a constant expression, then (unsigned long) X is
-- also a constant expression, so that the optimizations still work. */
-+ also a constant expression, so that the optimizations still work. The
-+ warnings are probably related to the following two bugs:
-+ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210
-+ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38470 (possibly a variant)
-+ and the casts could be removed once these bugs are fixed.
-+ Casts shouldn't be used on the generic calls (to the ..._2exp functions),
-+ where implicit conversions are performed. Indeed, having at least one
-+ implicit conversion in the macro allows the compiler to emit diagnostics
-+ when normally expected, for instance in the following call:
-+ mpfr_set_ui (x, "foo", MPFR_RNDN);
-+ If this is not possible (for future macros), one of the tricks described
-+ on http://groups.google.com/group/comp.std.c/msg/e92abd24bf9eaf7b could
-+ be used. */
- #if defined (__GNUC__) && !defined(__ICC) && !defined(__cplusplus)
- #if (__GNUC__ >= 2)
- #undef mpfr_cmp_ui
-@@ -813,45 +835,45 @@
- But warning! mpfr_sgn is specified as a macro in the API, thus the macro
- mustn't be used if side effects are possible, like here. */
- #define mpfr_cmp_ui(_f,_u) \
-- (__builtin_constant_p (_u) && (unsigned long) (_u) == 0 ? \
-+ (__builtin_constant_p (_u) && (mpfr_ulong) (_u) == 0 ? \
- (mpfr_sgn) (_f) : \
-- mpfr_cmp_ui_2exp ((_f), (unsigned long) (_u), 0))
-+ mpfr_cmp_ui_2exp ((_f), (_u), 0))
- #undef mpfr_cmp_si
--#define mpfr_cmp_si(_f,_s) \
-- (__builtin_constant_p (_s) && (long) (_s) >= 0 ? \
-- mpfr_cmp_ui ((_f), (unsigned long) (long) (_s)) : \
-- mpfr_cmp_si_2exp ((_f), (long) (_s), 0))
-+#define mpfr_cmp_si(_f,_s) \
-+ (__builtin_constant_p (_s) && (mpfr_long) (_s) >= 0 ? \
-+ mpfr_cmp_ui ((_f), (mpfr_ulong) (mpfr_long) (_s)) : \
-+ mpfr_cmp_si_2exp ((_f), (_s), 0))
- #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95
- #undef mpfr_set_ui
- #define mpfr_set_ui(_f,_u,_r) \
-- (__builtin_constant_p (_u) && (unsigned long) (_u) == 0 ? \
-+ (__builtin_constant_p (_u) && (mpfr_ulong) (_u) == 0 ? \
- __extension__ ({ \
- mpfr_ptr _p = (_f); \
- _p->_mpfr_sign = 1; \
- _p->_mpfr_exp = __MPFR_EXP_ZERO; \
-- (void) (_r); 0; }) : \
-- mpfr_set_ui_2exp ((_f), (unsigned long) (_u), 0, (_r)))
-+ (mpfr_void) (_r); 0; }) : \
-+ mpfr_set_ui_2exp ((_f), (_u), 0, (_r)))
- #endif
- #undef mpfr_set_si
- #define mpfr_set_si(_f,_s,_r) \
-- (__builtin_constant_p (_s) && (long) (_s) >= 0 ? \
-- mpfr_set_ui ((_f), (unsigned long) (long) (_s), (_r)) : \
-- mpfr_set_si_2exp ((_f), (long) (_s), 0, (_r)))
-+ (__builtin_constant_p (_s) && (mpfr_long) (_s) >= 0 ? \
-+ mpfr_set_ui ((_f), (mpfr_ulong) (mpfr_long) (_s), (_r)) : \
-+ mpfr_set_si_2exp ((_f), (_s), 0, (_r)))
- #endif
- #endif
-
- /* Macro version of mpfr_stack interface for fast access */
--#define mpfr_custom_get_size(p) ((size_t) \
-+#define mpfr_custom_get_size(p) ((mpfr_size_t) \
- (((p)+GMP_NUMB_BITS-1)/GMP_NUMB_BITS*sizeof (mp_limb_t)))
- #define mpfr_custom_init(m,p) do {} while (0)
--#define mpfr_custom_get_significand(x) ((void*)((x)->_mpfr_d))
-+#define mpfr_custom_get_significand(x) ((mpfr_void*)((x)->_mpfr_d))
- #define mpfr_custom_get_exp(x) ((x)->_mpfr_exp)
- #define mpfr_custom_move(x,m) do { ((x)->_mpfr_d = (mp_limb_t*)(m)); } while (0)
- #define mpfr_custom_init_set(x,k,e,p,m) do { \
- mpfr_ptr _x = (x); \
- mpfr_exp_t _e; \
- mpfr_kind_t _t; \
-- int _s, _k; \
-+ mpfr_int _s, _k; \
- _k = (k); \
- if (_k >= 0) { \
- _t = (mpfr_kind_t) _k; \
-@@ -868,11 +890,13 @@
- _x->_mpfr_exp = _e; \
- _x->_mpfr_d = (mp_limb_t*) (m); \
- } while (0)
--#define mpfr_custom_get_kind(x) \
-- ( (x)->_mpfr_exp > __MPFR_EXP_INF ? (int)MPFR_REGULAR_KIND*MPFR_SIGN (x) \
-- : (x)->_mpfr_exp == __MPFR_EXP_INF ? (int)MPFR_INF_KIND*MPFR_SIGN (x) \
-- : (x)->_mpfr_exp == __MPFR_EXP_NAN ? (int)MPFR_NAN_KIND \
-- : (int) MPFR_ZERO_KIND * MPFR_SIGN (x) )
-+#define mpfr_custom_get_kind(x) \
-+ ( (x)->_mpfr_exp > __MPFR_EXP_INF ? \
-+ (mpfr_int) MPFR_REGULAR_KIND * MPFR_SIGN (x) \
-+ : (x)->_mpfr_exp == __MPFR_EXP_INF ? \
-+ (mpfr_int) MPFR_INF_KIND * MPFR_SIGN (x) \
-+ : (x)->_mpfr_exp == __MPFR_EXP_NAN ? (mpfr_int) MPFR_NAN_KIND \
-+ : (mpfr_int) MPFR_ZERO_KIND * MPFR_SIGN (x) )
-
-
- #endif /* MPFR_USE_NO_MACRO */
-diff -Naurd mpfr-3.0.0-a/version.c mpfr-3.0.0-b/version.c
---- mpfr-3.0.0-a/version.c 2010-10-21 21:18:26.000000000 +0000
-+++ mpfr-3.0.0-b/version.c 2010-11-09 15:15:07.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.0.0-p7";
-+ return "3.0.0-p8";
- }
diff --git a/packages/mpfr/3.0.0/version.desc b/packages/mpfr/3.0.0/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mpfr/3.0.0/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mpfr/3.1.0/110-mpfr_unlikely.patch b/packages/mpfr/3.1.0/110-mpfr_unlikely.patch
deleted file mode 100644
index 437b1a2..0000000
--- a/packages/mpfr/3.1.0/110-mpfr_unlikely.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2011-10-05 21:39:57.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2011-10-05 21:39:57.000000000 +0000
-@@ -0,0 +1 @@
-+mpfr_unlikely
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2011-10-03 08:17:15.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2011-10-05 21:39:57.000000000 +0000
-@@ -1 +1 @@
--3.1.0
-+3.1.0-p1
-diff -Naurd mpfr-3.1.0-a/src/mpfr-impl.h mpfr-3.1.0-b/src/mpfr-impl.h
---- mpfr-3.1.0-a/src/mpfr-impl.h 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr-impl.h 2011-10-05 21:39:57.000000000 +0000
-@@ -988,10 +988,11 @@
- ******************************************************/
-
- /* Theses macros help the compiler to determine if a test is
-- * likely or unlikely. */
-+ likely or unlikely. The !! is necessary in case x is larger
-+ than a long. */
- #if __MPFR_GNUC(3,0) || __MPFR_ICC(8,1,0)
- # define MPFR_LIKELY(x) (__builtin_expect(!!(x),1))
--# define MPFR_UNLIKELY(x) (__builtin_expect((x),0))
-+# define MPFR_UNLIKELY(x) (__builtin_expect(!!(x),0))
- #else
- # define MPFR_LIKELY(x) (x)
- # define MPFR_UNLIKELY(x) (x)
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2011-10-05 21:39:57.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0"
-+#define MPFR_VERSION_STRING "3.1.0-p1"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2011-10-05 21:39:57.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0";
-+ return "3.1.0-p1";
- }
diff --git a/packages/mpfr/3.1.0/120-lib-search-path.patch b/packages/mpfr/3.1.0/120-lib-search-path.patch
deleted file mode 100644
index 4714ac9..0000000
--- a/packages/mpfr/3.1.0/120-lib-search-path.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2011-10-14 10:43:32.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2011-10-14 10:43:32.000000000 +0000
-@@ -0,0 +1 @@
-+lib-search-path
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2011-10-05 21:39:57.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2011-10-14 10:43:32.000000000 +0000
-@@ -1 +1 @@
--3.1.0-p1
-+3.1.0-p2
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2011-10-05 21:39:57.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2011-10-14 10:43:32.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0-p1"
-+#define MPFR_VERSION_STRING "3.1.0-p2"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2011-10-05 21:39:57.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2011-10-14 10:43:32.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0-p1";
-+ return "3.1.0-p2";
- }
-diff -Naurd mpfr-3.1.0-a/tests/Makefile.am mpfr-3.1.0-b/tests/Makefile.am
---- mpfr-3.1.0-a/tests/Makefile.am 2011-10-03 08:17:14.000000000 +0000
-+++ mpfr-3.1.0-b/tests/Makefile.am 2011-10-03 08:17:14.000000000 +0000
-@@ -65,8 +65,24 @@
- TESTS = $(check_PROGRAMS)
- TESTS_ENVIRONMENT = MPFR_QUIET=1 $(VALGRIND)
-
--# Option to prevent libtool from generating wrapper scripts for the tests.
-+# The -no-install option prevents libtool from generating wrapper scripts
-+# for the tests.
- # This is useful to easily run the test scripts under valgrind or gdb.
- # See discussion http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28033
- # http://article.gmane.org/gmane.comp.lib.gnulib.bugs/28140 in particular.
--AM_LDFLAGS = -no-install
-+#
-+# The -L$(top_builddir)/src/.libs option is necessary for some platforms,
-+# such as HP-UX, when --with-gmp or --with-gmp-lib is used and an old MPFR
-+# library is already installed in the corresponding lib directory: its
-+# purpose is to make sure that the local .libs comes first in the library
-+# search path (otherwise the tests are linked against the old MPFR library
-+# by the LINK command -- see the generated Makefile). See:
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00042.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00043.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00044.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00066.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00065.html
-+# and
-+# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9728
-+#
-+AM_LDFLAGS = -no-install -L$(top_builddir)/src/.libs
-diff -Naurd mpfr-3.1.0-a/tests/Makefile.in mpfr-3.1.0-b/tests/Makefile.in
---- mpfr-3.1.0-a/tests/Makefile.in 2011-10-03 08:17:35.000000000 +0000
-+++ mpfr-3.1.0-b/tests/Makefile.in 2011-10-03 08:17:35.000000000 +0000
-@@ -1124,11 +1124,27 @@
- TESTS = $(check_PROGRAMS)
- TESTS_ENVIRONMENT = MPFR_QUIET=1 $(VALGRIND)
-
--# Option to prevent libtool from generating wrapper scripts for the tests.
-+# The -no-install option prevents libtool from generating wrapper scripts
-+# for the tests.
- # This is useful to easily run the test scripts under valgrind or gdb.
- # See discussion http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28033
- # http://article.gmane.org/gmane.comp.lib.gnulib.bugs/28140 in particular.
--AM_LDFLAGS = -no-install
-+#
-+# The -L$(top_builddir)/src/.libs option is necessary for some platforms,
-+# such as HP-UX, when --with-gmp or --with-gmp-lib is used and an old MPFR
-+# library is already installed in the corresponding lib directory: its
-+# purpose is to make sure that the local .libs comes first in the library
-+# search path (otherwise the tests are linked against the old MPFR library
-+# by the LINK command -- see the generated Makefile). See:
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00042.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00043.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00044.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00066.html
-+# http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00065.html
-+# and
-+# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9728
-+#
-+AM_LDFLAGS = -no-install -L$(top_builddir)/src/.libs
- all: all-am
-
- .SUFFIXES:
diff --git a/packages/mpfr/3.1.0/130-vasprintf.patch b/packages/mpfr/3.1.0/130-vasprintf.patch
deleted file mode 100644
index aa1cfbc..0000000
--- a/packages/mpfr/3.1.0/130-vasprintf.patch
+++ /dev/null
@@ -1,247 +0,0 @@
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2011-11-03 15:15:11.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2011-11-03 15:15:11.000000000 +0000
-@@ -0,0 +1 @@
-+vasprintf
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2011-10-14 10:43:32.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2011-11-03 15:15:11.000000000 +0000
-@@ -1 +1 @@
--3.1.0-p2
-+3.1.0-p3
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2011-10-14 10:43:32.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2011-11-03 15:15:11.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0-p2"
-+#define MPFR_VERSION_STRING "3.1.0-p3"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/vasprintf.c mpfr-3.1.0-b/src/vasprintf.c
---- mpfr-3.1.0-a/src/vasprintf.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/vasprintf.c 2011-11-03 15:15:11.000000000 +0000
-@@ -1178,7 +1178,7 @@
- mpfr_exp_t exp;
- char * str;
- const int spec_g = (spec.spec == 'g' || spec.spec == 'G');
-- const int keep_trailing_zeros = spec_g && spec.alt;
-+ const int keep_trailing_zeros = !spec_g || spec.alt;
-
- /* WARNING: an empty precision field is forbidden (it means precision = 6
- and it should have been changed to 6 before the function call) */
-@@ -1356,7 +1356,7 @@
- else
- /* 1 <= |p| */
- {
-- size_t nsd; /* Number of significant digits */
-+ size_t str_len;
-
- /* Determine the position of the most significant decimal digit. */
- exp = floor_log10 (p);
-@@ -1365,12 +1365,10 @@
- /* P is too large to print all its integral part digits */
- return -1;
-
-- np->ip_size = exp + 1;
--
-- nsd = spec.prec + np->ip_size;
- if (dec_info == NULL)
-- {
-- str = mpfr_get_str (NULL, &exp, 10, nsd, p, spec.rnd_mode);
-+ { /* this case occurs with mpfr_printf ("%.0RUf", x) with x=9.5 */
-+ str =
-+ mpfr_get_str (NULL, &exp, 10, spec.prec+exp+1, p, spec.rnd_mode);
- register_string (np->sl, str);
- }
- else
-@@ -1379,81 +1377,60 @@
- str = dec_info->str;
- }
- np->ip_ptr = MPFR_IS_NEG (p) ? ++str : str; /* skip sign */
-+ str_len = strlen (str);
-+
-+ /* integral part */
-+ if (exp > str_len)
-+ /* mpfr_get_str gives no trailing zero when p is rounded up to the next
-+ power of 10 (p integer, so no fractional part) */
-+ {
-+ np->ip_trailing_zeros = exp - str_len;
-+ np->ip_size = str_len;
-+ }
-+ else
-+ np->ip_size = exp;
-
- if (spec.group)
- /* thousands separator in integral part */
- np->thousands_sep = MPFR_THOUSANDS_SEPARATOR;
-
-- if (nsd == 0 || (spec_g && !spec.alt))
-- /* compute how much non-zero digits in integral and fractional
-- parts */
-+ /* fractional part */
-+ str += np->ip_size;
-+ str_len -= np->ip_size;
-+ if (!keep_trailing_zeros)
-+ /* remove trailing zeros, if any */
- {
-- size_t str_len;
-- str_len = strlen (str); /* note: the sign has been skipped */
--
-- if (exp > str_len)
-- /* mpfr_get_str doesn't give the trailing zeros when p is a
-- multiple of 10 (p integer, so no fractional part) */
-- {
-- np->ip_trailing_zeros = exp - str_len;
-- np->ip_size = str_len;
-- if (spec.alt)
-- np->point = MPFR_DECIMAL_POINT;
-- }
-- else
-- /* str may contain some digits which are in fractional part */
-+ char *ptr = str + str_len - 1; /* pointer to the last digit of
-+ str */
-+ while ((*ptr == '0') && (str_len != 0))
- {
-- char *ptr;
--
-- ptr = str + str_len - 1; /* points to the end of str */
-- str_len -= np->ip_size; /* number of digits in fractional
-- part */
--
-- if (!keep_trailing_zeros)
-- /* remove trailing zeros, if any */
-- {
-- while ((*ptr == '0') && (str_len != 0))
-- {
-- --ptr;
-- --str_len;
-- }
-- }
--
-- if (str_len > INT_MAX)
-- /* too many digits in fractional part */
-- return -1;
--
-- if (str_len != 0)
-- /* some digits in fractional part */
-- {
-- np->point = MPFR_DECIMAL_POINT;
-- np->fp_ptr = str + np->ip_size;
-- np->fp_size = str_len;
-- }
-+ --ptr;
-+ --str_len;
- }
- }
-- else
-- /* spec.prec digits in fractional part */
-+
-+ if (str_len > 0)
-+ /* some nonzero digits in fractional part */
- {
-- if (np->ip_size == exp - 1)
-- /* the absolute value of the number has been rounded up to a power
-- of ten.
-- Insert an additional zero in integral part and put the rest of
-- them in fractional part. */
-- np->ip_trailing_zeros = 1;
-+ if (str_len > INT_MAX)
-+ /* too many digits in fractional part */
-+ return -1;
-
-- if (spec.prec != 0)
-- {
-- MPFR_ASSERTD (np->ip_size + np->ip_trailing_zeros == exp);
-- MPFR_ASSERTD (np->ip_size + spec.prec == nsd);
-+ np->point = MPFR_DECIMAL_POINT;
-+ np->fp_ptr = str;
-+ np->fp_size = str_len;
-+ }
-
-- np->point = MPFR_DECIMAL_POINT;
-- np->fp_ptr = str + np->ip_size;
-- np->fp_size = spec.prec;
-- }
-- else if (spec.alt)
-- np->point = MPFR_DECIMAL_POINT;
-+ if (keep_trailing_zeros && str_len < spec.prec)
-+ /* add missing trailing zeros */
-+ {
-+ np->point = MPFR_DECIMAL_POINT;
-+ np->fp_trailing_zeros = spec.prec - np->fp_size;
- }
-+
-+ if (spec.alt)
-+ /* add decimal point even if no digits follow it */
-+ np->point = MPFR_DECIMAL_POINT;
- }
-
- return 0;
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2011-10-14 10:43:32.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2011-11-03 15:15:11.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0-p2";
-+ return "3.1.0-p3";
- }
-diff -Naurd mpfr-3.1.0-a/tests/tsprintf.c mpfr-3.1.0-b/tests/tsprintf.c
---- mpfr-3.1.0-a/tests/tsprintf.c 2011-10-03 08:17:14.000000000 +0000
-+++ mpfr-3.1.0-b/tests/tsprintf.c 2011-11-03 15:15:11.000000000 +0000
-@@ -475,6 +475,18 @@
- check_sprintf ("-1.", "%- #0.1RG", x);
-
- /* precision zero */
-+ mpfr_set_d (x, 9.5, MPFR_RNDN);
-+ check_sprintf ("9", "%.0RDf", x);
-+ check_sprintf ("10", "%.0RUf", x);
-+
-+ mpfr_set_d (x, 19.5, MPFR_RNDN);
-+ check_sprintf ("19", "%.0RDf", x);
-+ check_sprintf ("20", "%.0RUf", x);
-+
-+ mpfr_set_d (x, 99.5, MPFR_RNDN);
-+ check_sprintf ("99", "%.0RDf", x);
-+ check_sprintf ("100", "%.0RUf", x);
-+
- mpfr_set_d (x, -9.5, MPFR_RNDN);
- check_sprintf ("-10", "%.0RDf", x);
- check_sprintf ("-10", "%.0RYf", x);
-@@ -1078,6 +1090,23 @@
- mpfr_clear (x);
- }
-
-+static void
-+bug20111102 (void)
-+{
-+ mpfr_t t;
-+ char s[100];
-+
-+ mpfr_init2 (t, 84);
-+ mpfr_set_str (t, "999.99999999999999999999", 10, MPFR_RNDN);
-+ mpfr_sprintf (s, "%.20RNg", t);
-+ if (strcmp (s, "1000") != 0)
-+ {
-+ printf ("Error in bug20111102, expected 1000, got %s\n", s);
-+ exit (1);
-+ }
-+ mpfr_clear (t);
-+}
-+
- /* In particular, the following test makes sure that the rounding
- * for %Ra and %Rb is not done on the MPFR number itself (as it
- * would overflow). Note: it has been reported on comp.std.c that
-@@ -1161,6 +1190,7 @@
- locale = setlocale (LC_ALL, "C");
- #endif
-
-+ bug20111102 ();
- native_types ();
- hexadecimal ();
- binary ();
diff --git a/packages/mpfr/3.1.0/140-gmp41compat.patch b/packages/mpfr/3.1.0/140-gmp41compat.patch
deleted file mode 100644
index 4b1ba08..0000000
--- a/packages/mpfr/3.1.0/140-gmp41compat.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2011-11-28 12:22:52.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2011-11-28 12:22:52.000000000 +0000
-@@ -0,0 +1 @@
-+gmp41compat
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2011-11-03 15:15:11.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2011-11-28 12:22:52.000000000 +0000
-@@ -1 +1 @@
--3.1.0-p3
-+3.1.0-p4
-diff -Naurd mpfr-3.1.0-a/doc/mpfr.info mpfr-3.1.0-b/doc/mpfr.info
---- mpfr-3.1.0-a/doc/mpfr.info 2011-10-03 09:43:04.000000000 +0000
-+++ mpfr-3.1.0-b/doc/mpfr.info 2011-11-28 12:22:52.000000000 +0000
-@@ -2994,11 +2994,12 @@
-
- * `mpfr_urandom' and `mpfr_urandomb' changed in MPFR 3.1. Their
- behavior no longer depends on the platform (assuming this is also
-- true for GMP's random generator). As a consequence, the returned
-- values can be different between MPFR 3.1 and previous MPFR
-- versions. Note: as the reproducibility of these functions was not
-- specified before MPFR 3.1, the MPFR 3.1 behavior is _not_ regarded
-- as backward incompatible with previous versions.
-+ true for GMP's random generator, which is not the case between GMP
-+ 4.1 and 4.2 if `gmp_randinit_default' is used). As a consequence,
-+ the returned values can be different between MPFR 3.1 and previous
-+ MPFR versions. Note: as the reproducibility of these functions
-+ was not specified before MPFR 3.1, the MPFR 3.1 behavior is _not_
-+ regarded as backward incompatible with previous versions.
-
-
- 
-@@ -4239,13 +4240,13 @@
- Node: Type and Macro Changes129308
- Node: Added Functions132029
- Node: Changed Functions134972
--Node: Removed Functions139167
--Node: Other Changes139579
--Node: Contributors141108
--Node: References143574
--Node: GNU Free Documentation License145315
--Node: Concept Index167758
--Node: Function and Type Index173677
-+Node: Removed Functions139253
-+Node: Other Changes139665
-+Node: Contributors141194
-+Node: References143660
-+Node: GNU Free Documentation License145401
-+Node: Concept Index167844
-+Node: Function and Type Index173763
- 
- End Tag Table
-
-diff -Naurd mpfr-3.1.0-a/doc/mpfr.texi mpfr-3.1.0-b/doc/mpfr.texi
---- mpfr-3.1.0-a/doc/mpfr.texi 2011-10-03 08:17:14.000000000 +0000
-+++ mpfr-3.1.0-b/doc/mpfr.texi 2011-11-28 12:22:52.000000000 +0000
-@@ -3466,8 +3466,9 @@
- a lack of specification.
-
- @item @code{mpfr_urandom} and @code{mpfr_urandomb} changed in MPFR 3.1.
--Their behavior no longer depends on the platform (assuming this is also
--true for GMP's random generator). As a consequence, the returned values
-+Their behavior no longer depends on the platform (assuming this is also true
-+for GMP's random generator, which is not the case between GMP 4.1 and 4.2 if
-+@code{gmp_randinit_default} is used). As a consequence, the returned values
- can be different between MPFR 3.1 and previous MPFR versions.
- Note: as the reproducibility of these functions was not specified
- before MPFR 3.1, the MPFR 3.1 behavior is @emph{not} regarded as
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2011-11-03 15:15:11.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2011-11-28 12:22:52.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0-p3"
-+#define MPFR_VERSION_STRING "3.1.0-p4"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2011-11-03 15:15:11.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2011-11-28 12:22:52.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0-p3";
-+ return "3.1.0-p4";
- }
-diff -Naurd mpfr-3.1.0-a/tests/trandom.c mpfr-3.1.0-b/tests/trandom.c
---- mpfr-3.1.0-a/tests/trandom.c 2011-10-03 08:17:14.000000000 +0000
-+++ mpfr-3.1.0-b/tests/trandom.c 2011-11-28 12:22:52.000000000 +0000
-@@ -114,21 +114,29 @@
- mpfr_t x;
- gmp_randstate_t s;
-
-+#if __MPFR_GMP(4,2,0)
-+# define C1 "0.895943"
-+# define C2 "0.848824"
-+#else
-+# define C1 "0.479652"
-+# define C2 "0.648529"
-+#endif
-+
- gmp_randinit_default (s);
- gmp_randseed_ui (s, 42);
- mpfr_init2 (x, 17);
- mpfr_urandomb (x, s);
-- if (mpfr_cmp_str1 (x, "0.895943") != 0)
-+ if (mpfr_cmp_str1 (x, C1) != 0)
- {
-- printf ("Error in bug20100914, expected 0.895943, got ");
-+ printf ("Error in bug20100914, expected " C1 ", got ");
- mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN);
- printf ("\n");
- exit (1);
- }
- mpfr_urandomb (x, s);
-- if (mpfr_cmp_str1 (x, "0.848824") != 0)
-+ if (mpfr_cmp_str1 (x, C2) != 0)
- {
-- printf ("Error in bug20100914, expected 0.848824, got ");
-+ printf ("Error in bug20100914, expected " C2 ", got ");
- mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN);
- printf ("\n");
- exit (1);
-diff -Naurd mpfr-3.1.0-a/tests/turandom.c mpfr-3.1.0-b/tests/turandom.c
---- mpfr-3.1.0-a/tests/turandom.c 2011-10-03 08:17:14.000000000 +0000
-+++ mpfr-3.1.0-b/tests/turandom.c 2011-11-28 12:22:52.000000000 +0000
-@@ -160,23 +160,29 @@
- mpfr_t x;
- gmp_randstate_t s;
-
-+#if __MPFR_GMP(4,2,0)
-+# define C1 "0.8488312"
-+# define C2 "0.8156509"
-+#else
-+# define C1 "0.6485367"
-+# define C2 "0.9362717"
-+#endif
-+
- gmp_randinit_default (s);
- gmp_randseed_ui (s, 42);
- mpfr_init2 (x, 17);
- mpfr_urandom (x, s, MPFR_RNDN);
-- /* the following values are obtained on a 32-bit computer, we should get
-- the same values on a 64-bit computer */
-- if (mpfr_cmp_str1 (x, "0.8488312") != 0)
-+ if (mpfr_cmp_str1 (x, C1) != 0)
- {
-- printf ("Error in bug20100914, expected 0.8488312, got ");
-+ printf ("Error in bug20100914, expected " C1 ", got ");
- mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN);
- printf ("\n");
- exit (1);
- }
- mpfr_urandom (x, s, MPFR_RNDN);
-- if (mpfr_cmp_str1 (x, "0.8156509") != 0)
-+ if (mpfr_cmp_str1 (x, C2) != 0)
- {
-- printf ("Error in bug20100914, expected 0.8156509, got ");
-+ printf ("Error in bug20100914, expected " C2 ", got ");
- mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN);
- printf ("\n");
- exit (1);
diff --git a/packages/mpfr/3.1.0/150-logging-freeze.patch b/packages/mpfr/3.1.0/150-logging-freeze.patch
deleted file mode 100644
index c664cee..0000000
--- a/packages/mpfr/3.1.0/150-logging-freeze.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2012-02-24 12:44:49.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2012-02-24 12:44:49.000000000 +0000
-@@ -0,0 +1 @@
-+logging-freeze
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2011-11-28 12:22:52.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2012-02-24 12:44:49.000000000 +0000
-@@ -1 +1 @@
--3.1.0-p4
-+3.1.0-p5
-diff -Naurd mpfr-3.1.0-a/src/add_d.c mpfr-3.1.0-b/src/add_d.c
---- mpfr-3.1.0-a/src/add_d.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/add_d.c 2012-02-24 12:44:49.000000000 +0000
-@@ -34,7 +34,7 @@
- (("b[%Pu]=%.*Rg c=%.20g rnd=%d",
- mpfr_get_prec(b), mpfr_log_prec, b, c, rnd_mode),
- ("a[%Pu]=%.*Rg inexact=%d",
-- mpfr_get_prec (a), mpfr_get_prec, a, inexact));
-+ mpfr_get_prec (a), mpfr_log_prec, a, inexact));
-
- MPFR_SAVE_EXPO_MARK (expo);
-
-diff -Naurd mpfr-3.1.0-a/src/add_ui.c mpfr-3.1.0-b/src/add_ui.c
---- mpfr-3.1.0-a/src/add_ui.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/add_ui.c 2012-02-24 12:44:49.000000000 +0000
-@@ -29,7 +29,7 @@
- MPFR_LOG_FUNC
- (("x[%Pu]=%.*Rg u=%d rnd=%d",
- mpfr_get_prec(x), mpfr_log_prec, x, u, rnd_mode),
-- ("y[%Pu]=%.*Rg", mpfr_get_prec (y), mpfr_get_prec, y));
-+ ("y[%Pu]=%.*Rg", mpfr_get_prec (y), mpfr_log_prec, y));
-
- if (MPFR_LIKELY(u != 0) ) /* if u=0, do nothing */
- {
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2011-11-28 12:22:52.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2012-02-24 12:44:49.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0-p4"
-+#define MPFR_VERSION_STRING "3.1.0-p5"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/mul_d.c mpfr-3.1.0-b/src/mul_d.c
---- mpfr-3.1.0-a/src/mul_d.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/mul_d.c 2012-02-24 12:44:49.000000000 +0000
-@@ -34,7 +34,7 @@
- (("b[%Pu]=%.*Rg c=%.20g rnd=%d",
- mpfr_get_prec(b), mpfr_log_prec, b, c, rnd_mode),
- ("a[%Pu]=%.*Rg inexact=%d",
-- mpfr_get_prec (a), mpfr_get_prec, a, inexact));
-+ mpfr_get_prec (a), mpfr_log_prec, a, inexact));
-
- MPFR_SAVE_EXPO_MARK (expo);
-
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2011-11-28 12:22:52.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2012-02-24 12:44:49.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0-p4";
-+ return "3.1.0-p5";
- }
diff --git a/packages/mpfr/3.1.0/160-logging-varfmt.patch b/packages/mpfr/3.1.0/160-logging-varfmt.patch
deleted file mode 100644
index 0f4bfad..0000000
--- a/packages/mpfr/3.1.0/160-logging-varfmt.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2012-02-24 13:50:05.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2012-02-24 13:50:05.000000000 +0000
-@@ -0,0 +1 @@
-+logging-varfmt
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2012-02-24 12:44:49.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2012-02-24 13:50:05.000000000 +0000
-@@ -1 +1 @@
--3.1.0-p5
-+3.1.0-p6
-diff -Naurd mpfr-3.1.0-a/src/mpfr-impl.h mpfr-3.1.0-b/src/mpfr-impl.h
---- mpfr-3.1.0-a/src/mpfr-impl.h 2011-10-05 21:39:57.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr-impl.h 2012-02-24 13:50:05.000000000 +0000
-@@ -1592,7 +1592,7 @@
- do \
- if ((MPFR_LOG_INTERNAL_F & mpfr_log_type) && \
- (mpfr_log_current <= mpfr_log_level)) \
-- LOG_PRINT ("%s.%d:%s[%#Pu]=%.*Rf\n", __func__, __LINE__, \
-+ LOG_PRINT ("%s.%d:%s[%#Pu]=%.*Rg\n", __func__, __LINE__, \
- #x, mpfr_get_prec (x), mpfr_log_prec, x); \
- while (0)
-
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2012-02-24 12:44:49.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2012-02-24 13:50:05.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0-p5"
-+#define MPFR_VERSION_STRING "3.1.0-p6"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2012-02-24 12:44:49.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2012-02-24 13:50:05.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0-p5";
-+ return "3.1.0-p6";
- }
diff --git a/packages/mpfr/3.1.0/170-large-prec.patch b/packages/mpfr/3.1.0/170-large-prec.patch
deleted file mode 100644
index 08e7b57..0000000
--- a/packages/mpfr/3.1.0/170-large-prec.patch
+++ /dev/null
@@ -1,591 +0,0 @@
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2012-03-08 15:17:03.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2012-03-08 15:17:03.000000000 +0000
-@@ -0,0 +1 @@
-+large-prec
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2012-02-24 13:50:05.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2012-03-08 15:17:03.000000000 +0000
-@@ -1 +1 @@
--3.1.0-p6
-+3.1.0-p7
-diff -Naurd mpfr-3.1.0-a/src/add1.c mpfr-3.1.0-b/src/add1.c
---- mpfr-3.1.0-a/src/add1.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/add1.c 2012-03-08 15:17:03.000000000 +0000
-@@ -44,12 +44,12 @@
- bq = MPFR_PREC(b);
- cq = MPFR_PREC(c);
-
-- an = (aq-1)/GMP_NUMB_BITS+1; /* number of limbs of a */
-+ an = MPFR_PREC2LIMBS (aq); /* number of limbs of a */
- aq2 = (mpfr_prec_t) an * GMP_NUMB_BITS;
- sh = aq2 - aq; /* non-significant bits in low limb */
-
-- bn = (bq-1)/GMP_NUMB_BITS+1; /* number of limbs of b */
-- cn = (cq-1)/GMP_NUMB_BITS+1; /* number of limbs of c */
-+ bn = MPFR_PREC2LIMBS (bq); /* number of limbs of b */
-+ cn = MPFR_PREC2LIMBS (cq); /* number of limbs of c */
-
- ap = MPFR_MANT(a);
- bp = MPFR_MANT(b);
-@@ -124,7 +124,7 @@
- dif = aq2 - diff_exp;
- /* dif is the number of bits of c which overlap with a' */
-
-- difn = (dif-1)/GMP_NUMB_BITS + 1;
-+ difn = MPFR_PREC2LIMBS (dif);
- /* only the highest difn limbs from c have to be considered */
- if (MPFR_UNLIKELY(difn > cn))
- {
-diff -Naurd mpfr-3.1.0-a/src/add1sp.c mpfr-3.1.0-b/src/add1sp.c
---- mpfr-3.1.0-a/src/add1sp.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/add1sp.c 2012-03-08 15:17:03.000000000 +0000
-@@ -107,7 +107,7 @@
-
- /* Read prec and num of limbs */
- p = MPFR_PREC(b);
-- n = (p+GMP_NUMB_BITS-1)/GMP_NUMB_BITS;
-+ n = MPFR_PREC2LIMBS (p);
- MPFR_UNSIGNED_MINUS_MODULO(sh, p);
- bx = MPFR_GET_EXP(b);
- d = (mpfr_uexp_t) (bx - MPFR_GET_EXP(c));
-diff -Naurd mpfr-3.1.0-a/src/agm.c mpfr-3.1.0-b/src/agm.c
---- mpfr-3.1.0-a/src/agm.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/agm.c 2012-03-08 15:17:03.000000000 +0000
-@@ -91,7 +91,7 @@
- q = MPFR_PREC(r);
- p = q + MPFR_INT_CEIL_LOG2(q) + 15;
- MPFR_ASSERTD (p >= 7); /* see algorithms.tex */
-- s = (p - 1) / GMP_NUMB_BITS + 1;
-+ s = MPFR_PREC2LIMBS (p);
-
- /* b (op2) and a (op1) are the 2 operands but we want b >= a */
- compare = mpfr_cmp (op1, op2);
-@@ -285,7 +285,7 @@
-
- /* Next iteration */
- MPFR_ZIV_NEXT (loop, p);
-- s = (p - 1) / GMP_NUMB_BITS + 1;
-+ s = MPFR_PREC2LIMBS (p);
- }
- MPFR_ZIV_FREE (loop);
-
-diff -Naurd mpfr-3.1.0-a/src/eq.c mpfr-3.1.0-b/src/eq.c
---- mpfr-3.1.0-a/src/eq.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/eq.c 2012-03-08 15:17:03.000000000 +0000
-@@ -56,8 +56,8 @@
- if (uexp != vexp)
- return 0; /* no bit agree */
-
-- usize = (MPFR_PREC(u) - 1) / GMP_NUMB_BITS + 1;
-- vsize = (MPFR_PREC(v) - 1) / GMP_NUMB_BITS + 1;
-+ usize = MPFR_LIMB_SIZE (u);
-+ vsize = MPFR_LIMB_SIZE (v);
-
- if (vsize > usize) /* exchange u and v */
- {
-diff -Naurd mpfr-3.1.0-a/src/exp.c mpfr-3.1.0-b/src/exp.c
---- mpfr-3.1.0-a/src/exp.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/exp.c 2012-03-08 15:17:03.000000000 +0000
-@@ -133,7 +133,7 @@
- mp_size_t yn;
- int sh;
-
-- yn = 1 + (MPFR_PREC(y) - 1) / GMP_NUMB_BITS;
-+ yn = MPFR_LIMB_SIZE (y);
- sh = (mpfr_prec_t) yn * GMP_NUMB_BITS - MPFR_PREC(y);
- MPFR_MANT(y)[0] += MPFR_LIMB_ONE << sh;
- inexact = 1;
-diff -Naurd mpfr-3.1.0-a/src/get_d.c mpfr-3.1.0-b/src/get_d.c
---- mpfr-3.1.0-a/src/get_d.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/get_d.c 2012-03-08 15:17:03.000000000 +0000
-@@ -100,7 +100,7 @@
- nbits += (1021 + e);
- MPFR_ASSERTD (nbits >= 1);
- }
-- np = (nbits + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
-+ np = MPFR_PREC2LIMBS (nbits);
- MPFR_ASSERTD ( np <= MPFR_LIMBS_PER_DOUBLE );
- carry = mpfr_round_raw_4 (tp, MPFR_MANT(src), MPFR_PREC(src), negative,
- nbits, rnd_mode);
-diff -Naurd mpfr-3.1.0-a/src/get_flt.c mpfr-3.1.0-b/src/get_flt.c
---- mpfr-3.1.0-a/src/get_flt.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/get_flt.c 2012-03-08 15:17:03.000000000 +0000
-@@ -92,7 +92,7 @@
- nbits += (125 + e);
- MPFR_ASSERTD (nbits >= 1);
- }
-- np = (nbits + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
-+ np = MPFR_PREC2LIMBS (nbits);
- MPFR_ASSERTD(np <= MPFR_LIMBS_PER_FLT);
- carry = mpfr_round_raw_4 (tp, MPFR_MANT(src), MPFR_PREC(src), negative,
- nbits, rnd_mode);
-diff -Naurd mpfr-3.1.0-a/src/get_str.c mpfr-3.1.0-b/src/get_str.c
---- mpfr-3.1.0-a/src/get_str.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/get_str.c 2012-03-08 15:17:03.000000000 +0000
-@@ -2351,7 +2351,7 @@
-
- /* the first digit will contain only r bits */
- prec = (m - 1) * pow2 + r; /* total number of bits */
-- n = (prec - 1) / GMP_NUMB_BITS + 1;
-+ n = MPFR_PREC2LIMBS (prec);
-
- MPFR_TMP_MARK (marker);
- x1 = MPFR_TMP_LIMBS_ALLOC (n + 1);
-@@ -2417,12 +2417,12 @@
- exact = 1;
-
- /* number of limbs */
-- n = 1 + (prec - 1) / GMP_NUMB_BITS;
-+ n = MPFR_PREC2LIMBS (prec);
-
- /* a will contain the approximation of the mantissa */
- a = MPFR_TMP_LIMBS_ALLOC (n);
-
-- nx = 1 + (MPFR_PREC(x) - 1) / GMP_NUMB_BITS;
-+ nx = MPFR_LIMB_SIZE (x);
-
- if ((mpfr_exp_t) m == g) /* final exponent is 0, no multiplication or
- division to perform */
-diff -Naurd mpfr-3.1.0-a/src/init2.c mpfr-3.1.0-b/src/init2.c
---- mpfr-3.1.0-a/src/init2.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/init2.c 2012-03-08 15:17:03.000000000 +0000
-@@ -51,7 +51,7 @@
- which both have an odd mantissa */
- MPFR_ASSERTN(p >= MPFR_PREC_MIN && p <= MPFR_PREC_MAX);
-
-- xsize = (mp_size_t) ((p - 1) / GMP_NUMB_BITS) + 1;
-+ xsize = MPFR_PREC2LIMBS (p);
- tmp = (mpfr_limb_ptr) (*__gmp_allocate_func)(MPFR_MALLOC_SIZE(xsize));
-
- MPFR_PREC(x) = p; /* Set prec */
-diff -Naurd mpfr-3.1.0-a/src/lngamma.c mpfr-3.1.0-b/src/lngamma.c
---- mpfr-3.1.0-a/src/lngamma.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/lngamma.c 2012-03-08 15:17:03.000000000 +0000
-@@ -67,7 +67,7 @@
-
- /* Now, the unit bit is represented. */
-
-- prec = ((prec - 1) / GMP_NUMB_BITS + 1) * GMP_NUMB_BITS - expo;
-+ prec = MPFR_PREC2LIMBS (prec) * GMP_NUMB_BITS - expo;
- /* number of represented fractional bits (including the trailing 0's) */
-
- x0 = *(MPFR_MANT (x) + prec / GMP_NUMB_BITS);
-diff -Naurd mpfr-3.1.0-a/src/mpfr-impl.h mpfr-3.1.0-b/src/mpfr-impl.h
---- mpfr-3.1.0-a/src/mpfr-impl.h 2012-02-24 13:50:05.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr-impl.h 2012-03-09 12:06:26.000000000 +0000
-@@ -646,10 +646,24 @@
- **************** mpfr_t properties *******************
- ******************************************************/
-
-+/* In the following macro, p is usually a mpfr_prec_t, but this macro
-+ works with other integer types (without integer overflow). Checking
-+ that p >= 1 in debug mode is useful here because this macro can be
-+ used on a computed precision (in particular, this formula does not
-+ work for a degenerate case p = 0, and could give different results
-+ on different platforms). But let us not use an assertion checking
-+ in the MPFR_LAST_LIMB() and MPFR_LIMB_SIZE() macros below to avoid
-+ too much expansion for assertions (in practice, this should be a
-+ problem just when testing MPFR with the --enable-assert configure
-+ option and the -ansi -pedantic-errors gcc compiler flags). */
-+#define MPFR_PREC2LIMBS(p) \
-+ (MPFR_ASSERTD ((p) >= 1), ((p) - 1) / GMP_NUMB_BITS + 1)
-+
- #define MPFR_PREC(x) ((x)->_mpfr_prec)
- #define MPFR_EXP(x) ((x)->_mpfr_exp)
- #define MPFR_MANT(x) ((x)->_mpfr_d)
--#define MPFR_LIMB_SIZE(x) ((MPFR_PREC((x))-1)/GMP_NUMB_BITS+1)
-+#define MPFR_LAST_LIMB(x) ((MPFR_PREC (x) - 1) / GMP_NUMB_BITS)
-+#define MPFR_LIMB_SIZE(x) (MPFR_LAST_LIMB (x) + 1)
-
-
- /******************************************************
-@@ -749,7 +763,8 @@
- #define MPFR_IS_FP(x) (!MPFR_IS_NAN(x) && !MPFR_IS_INF(x))
- #define MPFR_IS_SINGULAR(x) (MPFR_EXP(x) <= MPFR_EXP_INF)
- #define MPFR_IS_PURE_FP(x) (!MPFR_IS_SINGULAR(x) && \
-- (MPFR_ASSERTD (MPFR_MANT(x)[MPFR_LIMB_SIZE(x)-1] & MPFR_LIMB_HIGHBIT), 1))
-+ (MPFR_ASSERTD ((MPFR_MANT(x)[MPFR_LAST_LIMB(x)] \
-+ & MPFR_LIMB_HIGHBIT) != 0), 1))
-
- #define MPFR_ARE_SINGULAR(x,y) \
- (MPFR_UNLIKELY(MPFR_IS_SINGULAR(x)) || MPFR_UNLIKELY(MPFR_IS_SINGULAR(y)))
-@@ -1061,7 +1076,7 @@
- /* Set a number to 1 (Fast) - It doesn't check if 1 is in the exponent range */
- #define MPFR_SET_ONE(x) \
- do { \
-- mp_size_t _size = MPFR_LIMB_SIZE(x) - 1; \
-+ mp_size_t _size = MPFR_LAST_LIMB(x); \
- MPFR_SET_POS(x); \
- MPFR_EXP(x) = 1; \
- MPN_ZERO ( MPFR_MANT(x), _size); \
-@@ -1213,8 +1228,8 @@
- _destp = MPFR_MANT (dest); \
- if (MPFR_UNLIKELY (_destprec >= _srcprec)) \
- { \
-- _srcs = (_srcprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS; \
-- _dests = (_destprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS - _srcs; \
-+ _srcs = MPFR_PREC2LIMBS (_srcprec); \
-+ _dests = MPFR_PREC2LIMBS (_destprec) - _srcs; \
- MPN_COPY (_destp + _dests, srcp, _srcs); \
- MPN_ZERO (_destp, _dests); \
- inexact = 0; \
-@@ -1227,8 +1242,8 @@
- mp_limb_t _rb, _sb, _ulp; \
- \
- /* Compute Position and shift */ \
-- _srcs = (_srcprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS; \
-- _dests = (_destprec + GMP_NUMB_BITS-1)/GMP_NUMB_BITS; \
-+ _srcs = MPFR_PREC2LIMBS (_srcprec); \
-+ _dests = MPFR_PREC2LIMBS (_destprec); \
- MPFR_UNSIGNED_MINUS_MODULO (_sh, _destprec); \
- _sp = (srcp) + _srcs - _dests; \
- \
-@@ -1372,7 +1387,7 @@
- if (MPFR_LIKELY (MPFR_PREC (dest) == MPFR_PREC (src))) \
- { \
- MPN_COPY (MPFR_MANT (dest), MPFR_MANT (src), \
-- (MPFR_PREC (src) + GMP_NUMB_BITS-1)/GMP_NUMB_BITS); \
-+ MPFR_LIMB_SIZE (src)); \
- inexact = 0; \
- } \
- else \
-@@ -1682,7 +1697,7 @@
- MPFR_ASSERTD (_prec >= MPFR_PREC_MIN); \
- if (MPFR_UNLIKELY (_prec > MPFR_PREC_MAX)) \
- mpfr_abort_prec_max (); \
-- _size = (mpfr_prec_t) (_prec + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS; \
-+ _size = MPFR_PREC2LIMBS (_prec); \
- if (MPFR_UNLIKELY (_size * (num) > MPFR_GROUP_STATIC_SIZE)) \
- { \
- (g).alloc = (num) * _size * sizeof (mp_limb_t); \
-@@ -1733,7 +1748,7 @@
- MPFR_ASSERTD (_prec >= MPFR_PREC_MIN); \
- if (MPFR_UNLIKELY (_prec > MPFR_PREC_MAX)) \
- mpfr_abort_prec_max (); \
-- _size = (mpfr_prec_t) (_prec + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS; \
-+ _size = MPFR_PREC2LIMBS (_prec); \
- (g).alloc = (num) * _size * sizeof (mp_limb_t); \
- if (MPFR_LIKELY (_oalloc == 0)) \
- (g).mant = (mp_limb_t *) (*__gmp_allocate_func) ((g).alloc); \
-@@ -1886,7 +1901,7 @@
- MPFR_NORETURN_ATTR;
-
- __MPFR_DECLSPEC void mpfr_rand_raw _MPFR_PROTO((mpfr_limb_ptr, gmp_randstate_t,
-- unsigned long));
-+ mpfr_prec_t));
-
- __MPFR_DECLSPEC mpz_t* mpfr_bernoulli_internal _MPFR_PROTO((mpz_t*,
- unsigned long));
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2012-02-24 13:50:05.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2012-03-08 15:17:03.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0-p6"
-+#define MPFR_VERSION_STRING "3.1.0-p7"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/mul.c mpfr-3.1.0-b/src/mul.c
---- mpfr-3.1.0-a/src/mul.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/mul.c 2012-03-08 15:17:03.000000000 +0000
-@@ -93,15 +93,15 @@
-
- ax = MPFR_GET_EXP (b) + MPFR_GET_EXP (c);
-
-- bq = MPFR_PREC(b);
-- cq = MPFR_PREC(c);
-+ bq = MPFR_PREC (b);
-+ cq = MPFR_PREC (c);
-
-- MPFR_ASSERTD(bq+cq > bq); /* PREC_MAX is /2 so no integer overflow */
-+ MPFR_ASSERTN ((mpfr_uprec_t) bq + cq <= MPFR_PREC_MAX);
-
-- bn = (bq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of b */
-- cn = (cq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of c */
-+ bn = MPFR_PREC2LIMBS (bq); /* number of limbs of b */
-+ cn = MPFR_PREC2LIMBS (cq); /* number of limbs of c */
- k = bn + cn; /* effective nb of limbs used by b*c (= tn or tn+1) below */
-- tn = (bq + cq + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
-+ tn = MPFR_PREC2LIMBS (bq + cq);
- /* <= k, thus no int overflow */
- MPFR_ASSERTD(tn <= k);
-
-@@ -292,12 +292,12 @@
- bq = MPFR_PREC (b);
- cq = MPFR_PREC (c);
-
-- MPFR_ASSERTD (bq+cq > bq); /* PREC_MAX is /2 so no integer overflow */
-+ MPFR_ASSERTN ((mpfr_uprec_t) bq + cq <= MPFR_PREC_MAX);
-
-- bn = (bq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of b */
-- cn = (cq+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; /* number of limbs of c */
-+ bn = MPFR_PREC2LIMBS (bq); /* number of limbs of b */
-+ cn = MPFR_PREC2LIMBS (cq); /* number of limbs of c */
- k = bn + cn; /* effective nb of limbs used by b*c (= tn or tn+1) below */
-- tn = (bq + cq + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
-+ tn = MPFR_PREC2LIMBS (bq + cq);
- MPFR_ASSERTD (tn <= k); /* tn <= k, thus no int overflow */
-
- /* Check for no size_t overflow*/
-diff -Naurd mpfr-3.1.0-a/src/pow.c mpfr-3.1.0-b/src/pow.c
---- mpfr-3.1.0-a/src/pow.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/pow.c 2012-03-08 15:17:03.000000000 +0000
-@@ -136,7 +136,7 @@
- (b) all the 'z' bits are zero
- */
-
-- prec = ((prec - 1) / GMP_NUMB_BITS + 1) * GMP_NUMB_BITS - expo;
-+ prec = MPFR_PREC2LIMBS (prec) * GMP_NUMB_BITS - expo;
- /* number of z+0 bits */
-
- yn = prec / GMP_NUMB_BITS;
-diff -Naurd mpfr-3.1.0-a/src/print_raw.c mpfr-3.1.0-b/src/print_raw.c
---- mpfr-3.1.0-a/src/print_raw.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/print_raw.c 2012-03-08 15:17:03.000000000 +0000
-@@ -84,7 +84,7 @@
- int i;
- mpfr_prec_t count = 0;
- char c;
-- mp_size_t n = (r - 1) / GMP_NUMB_BITS + 1;
-+ mp_size_t n = MPFR_PREC2LIMBS (r);
-
- printf("%s ", str);
- for(n-- ; n>=0 ; n--)
-@@ -109,7 +109,7 @@
- int i;
- mpfr_prec_t count = 0;
- char c;
-- mp_size_t n = (r - 1) / GMP_NUMB_BITS + 1;
-+ mp_size_t n = MPFR_PREC2LIMBS (r);
-
- for(n-- ; n>=0 ; n--)
- {
-diff -Naurd mpfr-3.1.0-a/src/round_prec.c mpfr-3.1.0-b/src/round_prec.c
---- mpfr-3.1.0-a/src/round_prec.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/round_prec.c 2012-03-08 15:17:03.000000000 +0000
-@@ -55,12 +55,12 @@
-
- MPFR_ASSERTN(prec >= MPFR_PREC_MIN && prec <= MPFR_PREC_MAX);
-
-- nw = 1 + (prec - 1) / GMP_NUMB_BITS; /* needed allocated limbs */
-+ nw = MPFR_PREC2LIMBS (prec); /* needed allocated limbs */
-
- /* check if x has enough allocated space for the significand */
- /* Get the number of limbs from the precision.
- (Compatible with all allocation methods) */
-- ow = (MPFR_PREC (x) + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS;
-+ ow = MPFR_LIMB_SIZE (x);
- if (nw > ow)
- {
- /* FIXME: Variable can't be created using custom allocation,
-diff -Naurd mpfr-3.1.0-a/src/round_raw_generic.c mpfr-3.1.0-b/src/round_raw_generic.c
---- mpfr-3.1.0-a/src/round_raw_generic.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/round_raw_generic.c 2012-03-08 15:17:03.000000000 +0000
-@@ -80,7 +80,7 @@
- (xprec <= yprec || MPFR_IS_LIKE_RNDZ (rnd_mode, neg)))
- return 0;
-
-- xsize = (xprec-1)/GMP_NUMB_BITS + 1;
-+ xsize = MPFR_PREC2LIMBS (xprec);
- nw = yprec / GMP_NUMB_BITS;
- rw = yprec & (GMP_NUMB_BITS - 1);
-
-diff -Naurd mpfr-3.1.0-a/src/set.c mpfr-3.1.0-b/src/set.c
---- mpfr-3.1.0-a/src/set.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/set.c 2012-03-08 15:17:03.000000000 +0000
-@@ -48,8 +48,7 @@
- /* Same precision and b is not singular:
- * just copy the mantissa, and set the exponent and the sign
- * The result is exact. */
-- MPN_COPY (MPFR_MANT (a), MPFR_MANT (b),
-- (MPFR_PREC (b) + GMP_NUMB_BITS-1)/GMP_NUMB_BITS);
-+ MPN_COPY (MPFR_MANT (a), MPFR_MANT (b), MPFR_LIMB_SIZE (b));
- MPFR_RET (0);
- }
- else
-diff -Naurd mpfr-3.1.0-a/src/set_f.c mpfr-3.1.0-b/src/set_f.c
---- mpfr-3.1.0-a/src/set_f.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/set_f.c 2012-03-08 15:17:03.000000000 +0000
-@@ -43,7 +43,7 @@
- if (SIZ(x) * MPFR_FROM_SIGN_TO_INT(MPFR_SIGN(y)) < 0)
- MPFR_CHANGE_SIGN (y);
-
-- sy = 1 + (MPFR_PREC(y) - 1) / GMP_NUMB_BITS;
-+ sy = MPFR_LIMB_SIZE (y);
- my = MPFR_MANT(y);
- mx = PTR(x);
-
-diff -Naurd mpfr-3.1.0-a/src/set_prec.c mpfr-3.1.0-b/src/set_prec.c
---- mpfr-3.1.0-a/src/set_prec.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/set_prec.c 2012-03-08 15:17:03.000000000 +0000
-@@ -32,7 +32,7 @@
- MPFR_ASSERTN (p >= MPFR_PREC_MIN && p <= MPFR_PREC_MAX);
-
- /* Calculate the new number of limbs */
-- xsize = (p - 1) / GMP_NUMB_BITS + 1;
-+ xsize = MPFR_PREC2LIMBS (p);
-
- /* Realloc only if the new size is greater than the old */
- xoldsize = MPFR_GET_ALLOC_SIZE (x);
-diff -Naurd mpfr-3.1.0-a/src/setmax.c mpfr-3.1.0-b/src/setmax.c
---- mpfr-3.1.0-a/src/setmax.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/setmax.c 2012-03-08 15:17:03.000000000 +0000
-@@ -32,7 +32,7 @@
- mp_limb_t *xp;
-
- MPFR_SET_EXP (x, e);
-- xn = 1 + (MPFR_PREC(x) - 1) / GMP_NUMB_BITS;
-+ xn = MPFR_LIMB_SIZE (x);
- sh = (mpfr_prec_t) xn * GMP_NUMB_BITS - MPFR_PREC(x);
- xp = MPFR_MANT(x);
- xp[0] = MP_LIMB_T_MAX << sh;
-diff -Naurd mpfr-3.1.0-a/src/sqr.c mpfr-3.1.0-b/src/sqr.c
---- mpfr-3.1.0-a/src/sqr.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/sqr.c 2012-03-08 15:17:03.000000000 +0000
-@@ -56,11 +56,11 @@
- ax = 2 * MPFR_GET_EXP (b);
- bq = MPFR_PREC(b);
-
-- MPFR_ASSERTD (2 * bq > bq); /* PREC_MAX is /2 so no integer overflow */
-+ MPFR_ASSERTN (2 * (mpfr_uprec_t) bq <= MPFR_PREC_MAX);
-
-- bn = MPFR_LIMB_SIZE(b); /* number of limbs of b */
-- tn = 1 + (2 * bq - 1) / GMP_NUMB_BITS; /* number of limbs of square,
-- 2*bn or 2*bn-1 */
-+ bn = MPFR_LIMB_SIZE (b); /* number of limbs of b */
-+ tn = MPFR_PREC2LIMBS (2 * bq); /* number of limbs of square,
-+ 2*bn or 2*bn-1 */
-
- if (MPFR_UNLIKELY(bn > MPFR_SQR_THRESHOLD))
- return mpfr_mul (a, b, b, rnd_mode);
-diff -Naurd mpfr-3.1.0-a/src/stack_interface.c mpfr-3.1.0-b/src/stack_interface.c
---- mpfr-3.1.0-a/src/stack_interface.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/stack_interface.c 2012-03-08 15:17:03.000000000 +0000
-@@ -26,7 +26,7 @@
- size_t
- mpfr_custom_get_size (mpfr_prec_t prec)
- {
-- return (prec + GMP_NUMB_BITS -1) / GMP_NUMB_BITS * BYTES_PER_MP_LIMB;
-+ return MPFR_PREC2LIMBS (prec) * BYTES_PER_MP_LIMB;
- }
-
- #undef mpfr_custom_init
-diff -Naurd mpfr-3.1.0-a/src/strtofr.c mpfr-3.1.0-b/src/strtofr.c
---- mpfr-3.1.0-a/src/strtofr.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/strtofr.c 2012-03-08 15:17:03.000000000 +0000
-@@ -467,7 +467,7 @@
- /* Set y to the value of the ~prec most significant bits of pstr->mant
- (as long as we guarantee correct rounding, we don't need to get
- exactly prec bits). */
-- ysize = (prec - 1) / GMP_NUMB_BITS + 1;
-+ ysize = MPFR_PREC2LIMBS (prec);
- /* prec bits corresponds to ysize limbs */
- ysize_bits = ysize * GMP_NUMB_BITS;
- /* and to ysize_bits >= prec > MPFR_PREC (x) bits */
-diff -Naurd mpfr-3.1.0-a/src/sub1sp.c mpfr-3.1.0-b/src/sub1sp.c
---- mpfr-3.1.0-a/src/sub1sp.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/sub1sp.c 2012-03-08 15:17:03.000000000 +0000
-@@ -155,8 +155,8 @@
- MPFR_ASSERTD(MPFR_IS_PURE_FP(c));
-
- /* Read prec and num of limbs */
-- p = MPFR_PREC(b);
-- n = (p-1)/GMP_NUMB_BITS+1;
-+ p = MPFR_PREC (b);
-+ n = MPFR_PREC2LIMBS (p);
-
- /* Fast cmp of |b| and |c|*/
- bx = MPFR_GET_EXP (b);
-diff -Naurd mpfr-3.1.0-a/src/urandomb.c mpfr-3.1.0-b/src/urandomb.c
---- mpfr-3.1.0-a/src/urandomb.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/urandomb.c 2012-03-08 15:17:03.000000000 +0000
-@@ -31,13 +31,20 @@
- a sufficient number of limbs */
- void
- mpfr_rand_raw (mpfr_limb_ptr mp, gmp_randstate_t rstate,
-- unsigned long int nbits)
-+ mpfr_prec_t nbits)
- {
- mpz_t z;
-
-+ MPFR_ASSERTN (nbits >= 1);
- /* To be sure to avoid the potential allocation of mpz_urandomb */
-- ALLOC(z) = SIZ(z) = ((nbits - 1) / GMP_NUMB_BITS) + 1;
-+ ALLOC(z) = SIZ(z) = MPFR_PREC2LIMBS (nbits);
- PTR(z) = mp;
-+#if __MPFR_GMP(5,0,0)
-+ /* Check for integer overflow (unless mp_bitcnt_t is signed,
-+ but according to the GMP manual, this shouldn't happen).
-+ Note: mp_bitcnt_t has been introduced in GMP 5.0.0. */
-+ MPFR_ASSERTN ((mp_bitcnt_t) -1 < 0 || nbits <= (mp_bitcnt_t) -1);
-+#endif
- mpz_urandomb (z, rstate, nbits);
- }
-
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2012-02-24 13:50:05.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2012-03-08 15:17:03.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0-p6";
-+ return "3.1.0-p7";
- }
-diff -Naurd mpfr-3.1.0-a/tests/tinits.c mpfr-3.1.0-b/tests/tinits.c
---- mpfr-3.1.0-a/tests/tinits.c 2011-10-03 08:17:14.000000000 +0000
-+++ mpfr-3.1.0-b/tests/tinits.c 2012-03-08 15:17:03.000000000 +0000
-@@ -1,4 +1,4 @@
--/* Test file for mpfr_inits, mpfr_inits2 and mpfr_clears.
-+/* Test file for mpfr_init2, mpfr_inits, mpfr_inits2 and mpfr_clears.
-
- Copyright 2003, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
- Contributed by the Arenaire and Caramel projects, INRIA.
-@@ -20,18 +20,43 @@
- http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-+#include <stdlib.h>
-+
- #include "mpfr-test.h"
-
- int
- main (void)
- {
- mpfr_t a, b, c;
-+ long large_prec;
-
- tests_start_mpfr ();
-+
- mpfr_inits (a, b, c, (mpfr_ptr) 0);
- mpfr_clears (a, b, c, (mpfr_ptr) 0);
- mpfr_inits2 (200, a, b, c, (mpfr_ptr) 0);
- mpfr_clears (a, b, c, (mpfr_ptr) 0);
-+
-+ /* test for precision 2^31-1, see
-+ https://gforge.inria.fr/tracker/index.php?func=detail&aid=13918 */
-+ large_prec = 2147483647;
-+ if (getenv ("MPFR_CHECK_LARGEMEM") != NULL)
-+ {
-+ /* We assume that the precision won't be increased internally. */
-+ if (large_prec > MPFR_PREC_MAX)
-+ large_prec = MPFR_PREC_MAX;
-+ mpfr_inits2 (large_prec, a, b, (mpfr_ptr) 0);
-+ mpfr_set_ui (a, 17, MPFR_RNDN);
-+ mpfr_set (b, a, MPFR_RNDN);
-+ if (mpfr_get_ui (a, MPFR_RNDN) != 17)
-+ {
-+ printf ("Error in mpfr_init2 with precision 2^31-1\n");
-+ exit (1);
-+ }
-+ mpfr_clears (a, b, (mpfr_ptr) 0);
-+ }
-+
- tests_end_mpfr ();
-+
- return 0;
- }
diff --git a/packages/mpfr/3.1.0/180-__gmp_const.patch b/packages/mpfr/3.1.0/180-__gmp_const.patch
deleted file mode 100644
index 94444b6..0000000
--- a/packages/mpfr/3.1.0/180-__gmp_const.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2012-03-12 11:59:47.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2012-03-12 11:59:47.000000000 +0000
-@@ -0,0 +1 @@
-+__gmp_const
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2012-03-08 15:17:03.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2012-03-12 11:59:47.000000000 +0000
-@@ -1 +1 @@
--3.1.0-p7
-+3.1.0-p8
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2012-03-08 15:17:03.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2012-03-12 11:59:47.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0-p7"
-+#define MPFR_VERSION_STRING "3.1.0-p8"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-@@ -39,6 +39,18 @@
- # include <gmp.h>
- #endif
-
-+/* GMP's internal __gmp_const macro has been removed on 2012-03-04:
-+ http://gmplib.org:8000/gmp/rev/d287cfaf6732
-+ const is standard and now assumed to be available. If the __gmp_const
-+ definition is no longer present in GMP, this probably means that GMP
-+ assumes that const is available; thus let's define it to const.
-+ Note: this is a temporary fix that can be backported to previous MPFR
-+ versions. In the future, __gmp_const should be replaced by const like
-+ in GMP. */
-+#ifndef __gmp_const
-+# define __gmp_const const
-+#endif
-+
- /* Avoid some problems with macro expansion if the user defines macros
- with the same name as keywords. By convention, identifiers and macro
- names starting with mpfr_ are reserved by MPFR. */
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2012-03-08 15:17:03.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2012-03-12 11:59:47.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0-p7";
-+ return "3.1.0-p8";
- }
diff --git a/packages/mpfr/3.1.0/190-gamma-underflow.patch b/packages/mpfr/3.1.0/190-gamma-underflow.patch
deleted file mode 100644
index 3de1d19..0000000
--- a/packages/mpfr/3.1.0/190-gamma-underflow.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2012-04-27 01:13:15.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2012-04-27 01:13:15.000000000 +0000
-@@ -0,0 +1 @@
-+gamma-underflow
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2012-03-12 11:59:47.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2012-04-27 01:13:15.000000000 +0000
-@@ -1 +1 @@
--3.1.0-p8
-+3.1.0-p9
-diff -Naurd mpfr-3.1.0-a/src/gamma.c mpfr-3.1.0-b/src/gamma.c
---- mpfr-3.1.0-a/src/gamma.c 2011-10-03 08:17:09.000000000 +0000
-+++ mpfr-3.1.0-b/src/gamma.c 2012-04-27 01:13:15.000000000 +0000
-@@ -296,7 +296,7 @@
- /* we want an upper bound for x * [log(2-x)-1].
- since x < 0, we need a lower bound on log(2-x) */
- mpfr_ui_sub (xp, 2, x, MPFR_RNDD);
-- mpfr_log2 (xp, xp, MPFR_RNDD);
-+ mpfr_log (xp, xp, MPFR_RNDD);
- mpfr_sub_ui (xp, xp, 1, MPFR_RNDD);
- mpfr_mul (xp, xp, x, MPFR_RNDU);
-
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2012-03-12 11:59:47.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2012-04-27 01:13:15.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0-p8"
-+#define MPFR_VERSION_STRING "3.1.0-p9"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2012-03-12 11:59:47.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2012-04-27 01:13:15.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0-p8";
-+ return "3.1.0-p9";
- }
-diff -Naurd mpfr-3.1.0-a/tests/tgamma.c mpfr-3.1.0-b/tests/tgamma.c
---- mpfr-3.1.0-a/tests/tgamma.c 2011-10-03 08:17:14.000000000 +0000
-+++ mpfr-3.1.0-b/tests/tgamma.c 2012-04-27 01:13:15.000000000 +0000
-@@ -478,6 +478,36 @@
- mpfr_clear (x);
- }
-
-+/* bug found by Giridhar Tammana */
-+static void
-+test20120426 (void)
-+{
-+ mpfr_t xa, xb;
-+ int i;
-+ mpfr_exp_t emin;
-+
-+ mpfr_init2 (xa, 53);
-+ mpfr_init2 (xb, 53);
-+ mpfr_set_d (xb, -168.5, MPFR_RNDN);
-+ emin = mpfr_get_emin ();
-+ mpfr_set_emin (-1073);
-+ i = mpfr_gamma (xa, xb, MPFR_RNDN);
-+ i = mpfr_subnormalize (xa, i, MPFR_RNDN); /* new ternary value */
-+ mpfr_set_str (xb, "-9.5737343987585366746184749943e-304", 10, MPFR_RNDN);
-+ if (!((i > 0) && (mpfr_cmp (xa, xb) == 0)))
-+ {
-+ printf ("Error in test20120426, i=%d\n", i);
-+ printf ("expected ");
-+ mpfr_print_binary (xb); putchar ('\n');
-+ printf ("got ");
-+ mpfr_print_binary (xa); putchar ('\n');
-+ exit (1);
-+ }
-+ mpfr_set_emin (emin);
-+ mpfr_clear (xa);
-+ mpfr_clear (xb);
-+}
-+
- static void
- exprange (void)
- {
-@@ -821,6 +851,7 @@
- gamma_integer ();
- test20071231 ();
- test20100709 ();
-+ test20120426 ();
-
- data_check ("data/gamma", mpfr_gamma, "mpfr_gamma");
-
diff --git a/packages/mpfr/3.1.0/200-gamma-overunderflow.patch b/packages/mpfr/3.1.0/200-gamma-overunderflow.patch
deleted file mode 100644
index e6d6051..0000000
--- a/packages/mpfr/3.1.0/200-gamma-overunderflow.patch
+++ /dev/null
@@ -1,487 +0,0 @@
-diff -Naurd mpfr-3.1.0-a/PATCHES mpfr-3.1.0-b/PATCHES
---- mpfr-3.1.0-a/PATCHES 2012-05-07 18:52:45.000000000 +0000
-+++ mpfr-3.1.0-b/PATCHES 2012-05-07 18:52:45.000000000 +0000
-@@ -0,0 +1 @@
-+gamma-overunderflow
-diff -Naurd mpfr-3.1.0-a/VERSION mpfr-3.1.0-b/VERSION
---- mpfr-3.1.0-a/VERSION 2012-04-27 01:13:15.000000000 +0000
-+++ mpfr-3.1.0-b/VERSION 2012-05-07 18:52:45.000000000 +0000
-@@ -1 +1 @@
--3.1.0-p9
-+3.1.0-p10
-diff -Naurd mpfr-3.1.0-a/src/gamma.c mpfr-3.1.0-b/src/gamma.c
---- mpfr-3.1.0-a/src/gamma.c 2012-04-27 01:13:15.000000000 +0000
-+++ mpfr-3.1.0-b/src/gamma.c 2012-05-07 18:52:45.000000000 +0000
-@@ -100,7 +100,8 @@
- mpfr_t xp, GammaTrial, tmp, tmp2;
- mpz_t fact;
- mpfr_prec_t realprec;
-- int compared, inex, is_integer;
-+ int compared, is_integer;
-+ int inex = 0; /* 0 means: result gamma not set yet */
- MPFR_GROUP_DECL (group);
- MPFR_SAVE_EXPO_DECL (expo);
- MPFR_ZIV_DECL (loop);
-@@ -377,6 +378,15 @@
- mpfr_mul (GammaTrial, tmp2, xp, MPFR_RNDN); /* Pi*(2-x), error (1+u)^2 */
- err_g = MPFR_GET_EXP(GammaTrial);
- mpfr_sin (GammaTrial, GammaTrial, MPFR_RNDN); /* sin(Pi*(2-x)) */
-+ /* If tmp is +Inf, we compute exp(lngamma(x)). */
-+ if (mpfr_inf_p (tmp))
-+ {
-+ inex = mpfr_explgamma (gamma, x, &expo, tmp, tmp2, rnd_mode);
-+ if (inex)
-+ goto end;
-+ else
-+ goto ziv_next;
-+ }
- err_g = err_g + 1 - MPFR_GET_EXP(GammaTrial);
- /* let g0 the true value of Pi*(2-x), g the computed value.
- We have g = g0 + h with |h| <= |(1+u^2)-1|*g.
-@@ -411,11 +421,16 @@
- if (MPFR_LIKELY (MPFR_CAN_ROUND (GammaTrial, realprec - err_g,
- MPFR_PREC(gamma), rnd_mode)))
- break;
-+
-+ ziv_next:
- MPFR_ZIV_NEXT (loop, realprec);
- }
-+
-+ end:
- MPFR_ZIV_FREE (loop);
-
-- inex = mpfr_set (gamma, GammaTrial, rnd_mode);
-+ if (inex == 0)
-+ inex = mpfr_set (gamma, GammaTrial, rnd_mode);
- MPFR_GROUP_CLEAR (group);
- mpz_clear (fact);
-
-diff -Naurd mpfr-3.1.0-a/src/lngamma.c mpfr-3.1.0-b/src/lngamma.c
---- mpfr-3.1.0-a/src/lngamma.c 2012-03-08 15:17:03.000000000 +0000
-+++ mpfr-3.1.0-b/src/lngamma.c 2012-05-07 18:52:45.000000000 +0000
-@@ -49,9 +49,72 @@
- mpfr_set_ui_2exp (s, 9, -1, MPFR_RNDN); /* 4.5 */
- }
-
--#ifndef IS_GAMMA
-+#ifdef IS_GAMMA
-+
-+/* This function is called in case of intermediate overflow/underflow.
-+ The s1 and s2 arguments are temporary MPFR numbers, having the
-+ working precision. If the result could be determined, then the
-+ flags are updated via pexpo, y is set to the result, and the
-+ (non-zero) ternary value is returned. Otherwise 0 is returned
-+ in order to perform the next Ziv iteration. */
- static int
--unit_bit (mpfr_srcptr (x))
-+mpfr_explgamma (mpfr_ptr y, mpfr_srcptr x, mpfr_save_expo_t *pexpo,
-+ mpfr_ptr s1, mpfr_ptr s2, mpfr_rnd_t rnd)
-+{
-+ mpfr_t t1, t2;
-+ int inex1, inex2, sign;
-+ MPFR_BLOCK_DECL (flags1);
-+ MPFR_BLOCK_DECL (flags2);
-+ MPFR_GROUP_DECL (group);
-+
-+ MPFR_BLOCK (flags1, inex1 = mpfr_lgamma (s1, &sign, x, MPFR_RNDD));
-+ MPFR_ASSERTN (inex1 != 0);
-+ /* s1 = RNDD(lngamma(x)), inexact */
-+ if (MPFR_UNLIKELY (MPFR_OVERFLOW (flags1)))
-+ {
-+ if (MPFR_SIGN (s1) > 0)
-+ {
-+ MPFR_SAVE_EXPO_UPDATE_FLAGS (*pexpo, MPFR_FLAGS_OVERFLOW);
-+ return mpfr_overflow (y, rnd, sign);
-+ }
-+ else
-+ {
-+ MPFR_SAVE_EXPO_UPDATE_FLAGS (*pexpo, MPFR_FLAGS_UNDERFLOW);
-+ return mpfr_underflow (y, rnd == MPFR_RNDN ? MPFR_RNDZ : rnd, sign);
-+ }
-+ }
-+
-+ mpfr_set (s2, s1, MPFR_RNDN); /* exact */
-+ mpfr_nextabove (s2); /* v = RNDU(lngamma(z0)) */
-+
-+ if (sign < 0)
-+ rnd = MPFR_INVERT_RND (rnd); /* since the result with be negated */
-+ MPFR_GROUP_INIT_2 (group, MPFR_PREC (y), t1, t2);
-+ MPFR_BLOCK (flags1, inex1 = mpfr_exp (t1, s1, rnd));
-+ MPFR_BLOCK (flags2, inex2 = mpfr_exp (t2, s2, rnd));
-+ /* t1 is the rounding with mode 'rnd' of a lower bound on |Gamma(x)|,
-+ t2 is the rounding with mode 'rnd' of an upper bound, thus if both
-+ are equal, so is the wanted result. If t1 and t2 differ or the flags
-+ differ, at some point of Ziv's loop they should agree. */
-+ if (mpfr_equal_p (t1, t2) && flags1 == flags2)
-+ {
-+ MPFR_ASSERTN ((inex1 > 0 && inex2 > 0) || (inex1 < 0 && inex2 < 0));
-+ mpfr_set4 (y, t1, MPFR_RNDN, sign); /* exact */
-+ if (sign < 0)
-+ inex1 = - inex1;
-+ MPFR_SAVE_EXPO_UPDATE_FLAGS (*pexpo, flags1);
-+ }
-+ else
-+ inex1 = 0; /* couldn't determine the result */
-+ MPFR_GROUP_CLEAR (group);
-+
-+ return inex1;
-+}
-+
-+#else
-+
-+static int
-+unit_bit (mpfr_srcptr x)
- {
- mpfr_exp_t expo;
- mpfr_prec_t prec;
-@@ -75,6 +138,7 @@
-
- return (x0 >> (prec % GMP_NUMB_BITS)) & 1;
- }
-+
- #endif
-
- /* lngamma(x) = log(gamma(x)).
-@@ -99,12 +163,14 @@
- mpfr_t s, t, u, v, z;
- unsigned long m, k, maxm;
- mpz_t *INITIALIZED(B); /* variable B declared as initialized */
-- int inexact, compared;
-+ int compared;
-+ int inexact = 0; /* 0 means: result y not set yet */
- mpfr_exp_t err_s, err_t;
- unsigned long Bm = 0; /* number of allocated B[] */
- unsigned long oldBm;
- double d;
- MPFR_SAVE_EXPO_DECL (expo);
-+ MPFR_ZIV_DECL (loop);
-
- compared = mpfr_cmp_ui (z0, 1);
-
-@@ -122,7 +188,7 @@
- if (MPFR_EXP(z0) <= - (mpfr_exp_t) MPFR_PREC(y))
- {
- mpfr_t l, h, g;
-- int ok, inex2;
-+ int ok, inex1, inex2;
- mpfr_prec_t prec = MPFR_PREC(y) + 14;
- MPFR_ZIV_DECL (loop);
-
-@@ -157,14 +223,14 @@
- mpfr_sub (h, h, g, MPFR_RNDD);
- mpfr_mul (g, z0, z0, MPFR_RNDU);
- mpfr_add (h, h, g, MPFR_RNDU);
-- inexact = mpfr_prec_round (l, MPFR_PREC(y), rnd);
-+ inex1 = mpfr_prec_round (l, MPFR_PREC(y), rnd);
- inex2 = mpfr_prec_round (h, MPFR_PREC(y), rnd);
- /* Caution: we not only need l = h, but both inexact flags should
- agree. Indeed, one of the inexact flags might be zero. In that
- case if we assume lngamma(z0) cannot be exact, the other flag
- should be correct. We are conservative here and request that both
- inexact flags agree. */
-- ok = SAME_SIGN (inexact, inex2) && mpfr_cmp (l, h) == 0;
-+ ok = SAME_SIGN (inex1, inex2) && mpfr_cmp (l, h) == 0;
- if (ok)
- mpfr_set (y, h, rnd); /* exact */
- mpfr_clear (l);
-@@ -172,8 +238,9 @@
- mpfr_clear (g);
- if (ok)
- {
-+ MPFR_ZIV_FREE (loop);
- MPFR_SAVE_EXPO_FREE (expo);
-- return mpfr_check_range (y, inexact, rnd);
-+ return mpfr_check_range (y, inex1, rnd);
- }
- /* since we have log|gamma(x)| = - log|x| - gamma*x + O(x^2),
- if x ~ 2^(-n), then we have a n-bit approximation, thus
-@@ -205,9 +272,10 @@
- thus lngamma(x) = log(Pi*(x-1)/sin(Pi*(2-x))) - lngamma(2-x) */
-
- w = precy + MPFR_INT_CEIL_LOG2 (precy);
-+ w += MPFR_INT_CEIL_LOG2 (w) + 14;
-+ MPFR_ZIV_INIT (loop, w);
- while (1)
- {
-- w += MPFR_INT_CEIL_LOG2 (w) + 14;
- MPFR_ASSERTD(w >= 3);
- mpfr_set_prec (s, w);
- mpfr_set_prec (t, w);
-@@ -288,7 +356,9 @@
- + (rnd == MPFR_RNDN)))
- goto end;
- }
-+ MPFR_ZIV_NEXT (loop, w);
- }
-+ MPFR_ZIV_FREE (loop);
- }
-
- /* now z0 > 1 */
-@@ -298,10 +368,10 @@
- /* since k is O(w), the value of log(z0*...*(z0+k-1)) is about w*log(w),
- so there is a cancellation of ~log(w) in the argument reconstruction */
- w = precy + MPFR_INT_CEIL_LOG2 (precy);
--
-- do
-+ w += MPFR_INT_CEIL_LOG2 (w) + 13;
-+ MPFR_ZIV_INIT (loop, w);
-+ while (1)
- {
-- w += MPFR_INT_CEIL_LOG2 (w) + 13;
- MPFR_ASSERTD (w >= 3);
-
- /* argument reduction: we compute gamma(z0 + k), where the series
-@@ -441,6 +511,15 @@
- #ifdef IS_GAMMA
- err_s = MPFR_GET_EXP(s);
- mpfr_exp (s, s, MPFR_RNDN);
-+ /* If s is +Inf, we compute exp(lngamma(z0)). */
-+ if (mpfr_inf_p (s))
-+ {
-+ inexact = mpfr_explgamma (y, z0, &expo, s, t, rnd);
-+ if (inexact)
-+ goto end0;
-+ else
-+ goto ziv_next;
-+ }
- /* before the exponential, we have s = s0 + h where
- |h| <= (2m+48)*ulp(s), thus exp(s0) = exp(s) * exp(-h).
- For |h| <= 1/4, we have |exp(h)-1| <= 1.2*|h| thus
-@@ -480,16 +559,26 @@
- err_s = (err_t == err_s) ? 1 + err_s : ((err_t > err_s) ? err_t : err_s);
- err_s += 1 - MPFR_GET_EXP(s);
- #endif
-+ if (MPFR_LIKELY (MPFR_CAN_ROUND (s, w - err_s, precy, rnd)))
-+ break;
-+#ifdef IS_GAMMA
-+ ziv_next:
-+#endif
-+ MPFR_ZIV_NEXT (loop, w);
- }
-- while (MPFR_UNLIKELY (!MPFR_CAN_ROUND (s, w - err_s, precy, rnd)));
-
-+#ifdef IS_GAMMA
-+ end0:
-+#endif
- oldBm = Bm;
- while (Bm--)
- mpz_clear (B[Bm]);
- (*__gmp_free_func) (B, oldBm * sizeof (mpz_t));
-
- end:
-- inexact = mpfr_set (y, s, rnd);
-+ if (inexact == 0)
-+ inexact = mpfr_set (y, s, rnd);
-+ MPFR_ZIV_FREE (loop);
-
- mpfr_clear (s);
- mpfr_clear (t);
-diff -Naurd mpfr-3.1.0-a/src/mpfr.h mpfr-3.1.0-b/src/mpfr.h
---- mpfr-3.1.0-a/src/mpfr.h 2012-04-27 01:13:15.000000000 +0000
-+++ mpfr-3.1.0-b/src/mpfr.h 2012-05-07 18:52:45.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 0
--#define MPFR_VERSION_STRING "3.1.0-p9"
-+#define MPFR_VERSION_STRING "3.1.0-p10"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.0-a/src/version.c mpfr-3.1.0-b/src/version.c
---- mpfr-3.1.0-a/src/version.c 2012-04-27 01:13:15.000000000 +0000
-+++ mpfr-3.1.0-b/src/version.c 2012-05-07 18:52:45.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.0-p9";
-+ return "3.1.0-p10";
- }
-diff -Naurd mpfr-3.1.0-a/tests/tgamma.c mpfr-3.1.0-b/tests/tgamma.c
---- mpfr-3.1.0-a/tests/tgamma.c 2012-04-27 01:13:15.000000000 +0000
-+++ mpfr-3.1.0-b/tests/tgamma.c 2012-05-07 18:52:45.000000000 +0000
-@@ -838,6 +838,175 @@
- exit (1);
- }
-
-+/* Test mpfr_gamma in precision p1 by comparing it with exp(lgamma(x))
-+ computing with a working precision p2. Assume that x is not an
-+ integer <= 2. */
-+static void
-+exp_lgamma (mpfr_t x, mpfr_prec_t p1, mpfr_prec_t p2)
-+{
-+ mpfr_t yd, yu, zd, zu;
-+ int inexd, inexu, sign;
-+ int underflow = -1, overflow = -1; /* -1: we don't know */
-+ int got_underflow, got_overflow;
-+
-+ if (mpfr_integer_p (x) && mpfr_cmp_si (x, 2) <= 0)
-+ {
-+ printf ("Warning! x is an integer <= 2 in exp_lgamma: ");
-+ mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN); putchar ('\n');
-+ return;
-+ }
-+ mpfr_inits2 (p2, yd, yu, (mpfr_ptr) 0);
-+ inexd = mpfr_lgamma (yd, &sign, x, MPFR_RNDD);
-+ mpfr_set (yu, yd, MPFR_RNDN); /* exact */
-+ if (inexd)
-+ mpfr_nextabove (yu);
-+ mpfr_clear_flags ();
-+ mpfr_exp (yd, yd, MPFR_RNDD);
-+ if (! mpfr_underflow_p ())
-+ underflow = 0;
-+ if (mpfr_overflow_p ())
-+ overflow = 1;
-+ mpfr_clear_flags ();
-+ mpfr_exp (yu, yu, MPFR_RNDU);
-+ if (mpfr_underflow_p ())
-+ underflow = 1;
-+ if (! mpfr_overflow_p ())
-+ overflow = 0;
-+ if (sign < 0)
-+ {
-+ mpfr_neg (yd, yd, MPFR_RNDN); /* exact */
-+ mpfr_neg (yu, yu, MPFR_RNDN); /* exact */
-+ mpfr_swap (yd, yu);
-+ }
-+ /* yd < Gamma(x) < yu (strict inequalities since x != 1 and x != 2) */
-+ mpfr_inits2 (p1, zd, zu, (mpfr_ptr) 0);
-+ mpfr_clear_flags ();
-+ inexd = mpfr_gamma (zd, x, MPFR_RNDD); /* zd <= Gamma(x) < yu */
-+ got_underflow = underflow == -1 ? -1 : !! mpfr_underflow_p ();
-+ got_overflow = overflow == -1 ? -1 : !! mpfr_overflow_p ();
-+ if (! mpfr_less_p (zd, yu) || inexd > 0 ||
-+ got_underflow != underflow ||
-+ got_overflow != overflow)
-+ {
-+ printf ("Error in exp_lgamma on x = ");
-+ mpfr_out_str (stdout, 16, 0, x, MPFR_RNDN); putchar ('\n');
-+ printf ("yu = ");
-+ mpfr_dump (yu);
-+ printf ("zd = ");
-+ mpfr_dump (zd);
-+ printf ("got inexd = %d, expected <= 0\n", inexd);
-+ printf ("got underflow = %d, expected %d\n", got_underflow, underflow);
-+ printf ("got overflow = %d, expected %d\n", got_overflow, overflow);
-+ exit (1);
-+ }
-+ mpfr_clear_flags ();
-+ inexu = mpfr_gamma (zu, x, MPFR_RNDU); /* zu >= Gamma(x) > yd */
-+ got_underflow = underflow == -1 ? -1 : !! mpfr_underflow_p ();
-+ got_overflow = overflow == -1 ? -1 : !! mpfr_overflow_p ();
-+ if (! mpfr_greater_p (zu, yd) || inexu < 0 ||
-+ got_underflow != underflow ||
-+ got_overflow != overflow)
-+ {
-+ printf ("Error in exp_lgamma on x = ");
-+ mpfr_out_str (stdout, 16, 0, x, MPFR_RNDN); putchar ('\n');
-+ printf ("yd = ");
-+ mpfr_dump (yd);
-+ printf ("zu = ");
-+ mpfr_dump (zu);
-+ printf ("got inexu = %d, expected >= 0\n", inexu);
-+ printf ("got underflow = %d, expected %d\n", got_underflow, underflow);
-+ printf ("got overflow = %d, expected %d\n", got_overflow, overflow);
-+ exit (1);
-+ }
-+ if (mpfr_equal_p (zd, zu))
-+ {
-+ if (inexd != 0 || inexu != 0)
-+ {
-+ printf ("Error in exp_lgamma on x = ");
-+ mpfr_out_str (stdout, 16, 0, x, MPFR_RNDN); putchar ('\n');
-+ printf ("zd = zu, thus exact, but inexd = %d and inexu = %d\n",
-+ inexd, inexu);
-+ exit (1);
-+ }
-+ MPFR_ASSERTN (got_underflow == 0);
-+ MPFR_ASSERTN (got_overflow == 0);
-+ }
-+ else if (inexd == 0 || inexu == 0)
-+ {
-+ printf ("Error in exp_lgamma on x = ");
-+ mpfr_out_str (stdout, 16, 0, x, MPFR_RNDN); putchar ('\n');
-+ printf ("zd != zu, thus inexact, but inexd = %d and inexu = %d\n",
-+ inexd, inexu);
-+ exit (1);
-+ }
-+ mpfr_clears (yd, yu, zd, zu, (mpfr_ptr) 0);
-+}
-+
-+static void
-+exp_lgamma_tests (void)
-+{
-+ mpfr_t x;
-+ mpfr_exp_t emin, emax;
-+ int i;
-+
-+ emin = mpfr_get_emin ();
-+ emax = mpfr_get_emax ();
-+ set_emin (MPFR_EMIN_MIN);
-+ set_emax (MPFR_EMAX_MAX);
-+
-+ mpfr_init2 (x, 96);
-+ for (i = 3; i <= 8; i++)
-+ {
-+ mpfr_set_ui (x, i, MPFR_RNDN);
-+ exp_lgamma (x, 53, 64);
-+ mpfr_nextbelow (x);
-+ exp_lgamma (x, 53, 64);
-+ mpfr_nextabove (x);
-+ mpfr_nextabove (x);
-+ exp_lgamma (x, 53, 64);
-+ }
-+ mpfr_set_str (x, "1.7", 10, MPFR_RNDN);
-+ exp_lgamma (x, 53, 64);
-+ mpfr_set_str (x, "-4.6308260837372266e+07", 10, MPFR_RNDN);
-+ exp_lgamma (x, 53, 64);
-+ mpfr_set_str (x, "-90.6308260837372266e+15", 10, MPFR_RNDN);
-+ exp_lgamma (x, 53, 64);
-+ /* The following test gives a large positive result < +Inf */
-+ mpfr_set_str (x, "1.2b13fc45a92dea1@14", 16, MPFR_RNDN);
-+ exp_lgamma (x, 53, 64);
-+ /* Idem for a large negative result > -Inf */
-+ mpfr_set_str (x, "-1.2b13fc45a92de81@14", 16, MPFR_RNDN);
-+ exp_lgamma (x, 53, 64);
-+ /* The following two tests trigger an endless loop in r8186
-+ on 64-bit machines (64-bit exponent). The second one (due
-+ to undetected overflow) is a direct consequence of the
-+ first one, due to the call of Gamma(2-x) if x < 1. */
-+ mpfr_set_str (x, "1.2b13fc45a92dec8@14", 16, MPFR_RNDN);
-+ exp_lgamma (x, 53, 64);
-+ mpfr_set_str (x, "-1.2b13fc45a92dea8@14", 16, MPFR_RNDN);
-+ exp_lgamma (x, 53, 64);
-+ /* Similar tests (overflow threshold) for 32-bit machines. */
-+ mpfr_set_str (x, "2ab68d8.657542f855111c61", 16, MPFR_RNDN);
-+ exp_lgamma (x, 12, 64);
-+ mpfr_set_str (x, "-2ab68d6.657542f855111c61", 16, MPFR_RNDN);
-+ exp_lgamma (x, 12, 64);
-+ /* The following test is an overflow on 32-bit and 64-bit machines.
-+ Revision r8189 fails on 64-bit machines as the flag is unset. */
-+ mpfr_set_str (x, "1.2b13fc45a92ded8@14", 16, MPFR_RNDN);
-+ exp_lgamma (x, 53, 64);
-+ /* On the following tests, with r8196, one gets an underflow on
-+ 32-bit machines, while a normal result is expected (see FIXME
-+ in gamma.c:382). */
-+ mpfr_set_str (x, "-2ab68d6.657542f855111c6104", 16, MPFR_RNDN);
-+ exp_lgamma (x, 12, 64); /* failure on 32-bit machines */
-+ mpfr_set_str (x, "-12b13fc45a92deb.1c6c5bc964", 16, MPFR_RNDN);
-+ exp_lgamma (x, 12, 64); /* failure on 64-bit machines */
-+ mpfr_clear (x);
-+
-+ set_emin (emin);
-+ set_emax (emax);
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -852,6 +1021,7 @@
- test20071231 ();
- test20100709 ();
- test20120426 ();
-+ exp_lgamma_tests ();
-
- data_check ("data/gamma", mpfr_gamma, "mpfr_gamma");
-
diff --git a/packages/mpfr/3.1.0/version.desc b/packages/mpfr/3.1.0/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mpfr/3.1.0/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mpfr/3.1.1/110-get_decimal64.patch b/packages/mpfr/3.1.1/110-get_decimal64.patch
deleted file mode 100644
index d73a3d7..0000000
--- a/packages/mpfr/3.1.1/110-get_decimal64.patch
+++ /dev/null
@@ -1,235 +0,0 @@
-diff -Naurd mpfr-3.1.1-a/PATCHES mpfr-3.1.1-b/PATCHES
---- mpfr-3.1.1-a/PATCHES 2012-08-30 09:28:51.000000000 +0000
-+++ mpfr-3.1.1-b/PATCHES 2012-08-30 09:28:51.000000000 +0000
-@@ -0,0 +1 @@
-+get_decimal64
-diff -Naurd mpfr-3.1.1-a/VERSION mpfr-3.1.1-b/VERSION
---- mpfr-3.1.1-a/VERSION 2012-07-03 15:01:13.000000000 +0000
-+++ mpfr-3.1.1-b/VERSION 2012-08-30 09:28:51.000000000 +0000
-@@ -1 +1 @@
--3.1.1
-+3.1.1-p1
-diff -Naurd mpfr-3.1.1-a/src/get_d64.c mpfr-3.1.1-b/src/get_d64.c
---- mpfr-3.1.1-a/src/get_d64.c 2012-07-03 15:01:18.000000000 +0000
-+++ mpfr-3.1.1-b/src/get_d64.c 2012-08-30 09:28:51.000000000 +0000
-@@ -32,6 +32,10 @@
-
- #ifdef MPFR_WANT_DECIMAL_FLOATS
-
-+#ifndef DEC64_MAX
-+# define DEC64_MAX 9.999999999999999E384dd
-+#endif
-+
- #ifdef DPD_FORMAT
- static int T[1000] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 32,
-@@ -142,26 +146,14 @@
- static _Decimal64
- get_decimal64_min (int negative)
- {
-- union ieee_double_extract x;
--
-- x.s.sig = (negative) ? 1 : 0;
-- x.s.exp = 0;
-- x.s.manh = 0;
-- x.s.manl = 1;
-- return x.d;
-+ return negative ? - 1E-398dd : 1E-398dd;
- }
-
- /* construct the decimal64 largest finite number with given sign */
- static _Decimal64
- get_decimal64_max (int negative)
- {
-- union ieee_double_extract x;
--
-- x.s.sig = (negative) ? 1 : 0;
-- x.s.exp = 1919;
-- x.s.manh = 1048575; /* 2^20-1 */
-- x.s.manl = ~0;
-- return x.d;
-+ return negative ? - DEC64_MAX : DEC64_MAX;
- }
-
- /* one-to-one conversion:
-@@ -334,7 +326,8 @@
- /* the largest decimal64 number is just below 10^(385) < 2^1279 */
- else if (MPFR_UNLIKELY (e > 1279)) /* then src >= 2^1279 */
- {
-- if (MPFR_RNDZ || (rnd_mode == MPFR_RNDU && negative != 0)
-+ if (rnd_mode == MPFR_RNDZ
-+ || (rnd_mode == MPFR_RNDU && negative != 0)
- || (rnd_mode == MPFR_RNDD && negative == 0))
- return get_decimal64_max (negative);
- else
-@@ -354,6 +347,15 @@
- which corresponds to s=[0.]1000...000 and e=-397 */
- if (e < -397)
- {
-+ if (rnd_mode == MPFR_RNDN && e == -398)
-+ {
-+ /* If 0.5E-398 < |src| < 1E-398 (smallest subnormal),
-+ src should round to +/- 1E-398 in MPFR_RNDN. */
-+ mpfr_get_str (s, &e, 10, 1, src, MPFR_RNDA);
-+ return e == -398 && s[negative] <= '5' ?
-+ get_decimal64_zero (negative) :
-+ get_decimal64_min (negative);
-+ }
- if (rnd_mode == MPFR_RNDZ || rnd_mode == MPFR_RNDN
- || (rnd_mode == MPFR_RNDD && negative == 0)
- || (rnd_mode == MPFR_RNDU && negative != 0))
-@@ -379,7 +381,8 @@
- which corresponds to s=[0.]9999...999 and e=385 */
- else if (e > 385)
- {
-- if (MPFR_RNDZ || (rnd_mode == MPFR_RNDU && negative != 0)
-+ if (rnd_mode == MPFR_RNDZ
-+ || (rnd_mode == MPFR_RNDU && negative != 0)
- || (rnd_mode == MPFR_RNDD && negative == 0))
- return get_decimal64_max (negative);
- else
-diff -Naurd mpfr-3.1.1-a/src/mpfr.h mpfr-3.1.1-b/src/mpfr.h
---- mpfr-3.1.1-a/src/mpfr.h 2012-07-03 15:01:19.000000000 +0000
-+++ mpfr-3.1.1-b/src/mpfr.h 2012-08-30 09:28:51.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "3.1.1"
-+#define MPFR_VERSION_STRING "3.1.1-p1"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.1-a/src/version.c mpfr-3.1.1-b/src/version.c
---- mpfr-3.1.1-a/src/version.c 2012-07-03 15:01:18.000000000 +0000
-+++ mpfr-3.1.1-b/src/version.c 2012-08-30 09:28:51.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.1";
-+ return "3.1.1-p1";
- }
-diff -Naurd mpfr-3.1.1-a/tests/tget_set_d64.c mpfr-3.1.1-b/tests/tget_set_d64.c
---- mpfr-3.1.1-a/tests/tget_set_d64.c 2012-07-03 15:01:24.000000000 +0000
-+++ mpfr-3.1.1-b/tests/tget_set_d64.c 2012-08-30 09:28:51.000000000 +0000
-@@ -25,6 +25,10 @@
- #include <stdlib.h> /* for exit */
- #include "mpfr-test.h"
-
-+#ifndef DEC64_MAX
-+# define DEC64_MAX 9.999999999999999E384dd
-+#endif
-+
- /* #define DEBUG */
-
- static void
-@@ -149,6 +153,15 @@
- mpfr_set_str (x, "9.999999999999999E384", 10, MPFR_RNDZ);
- mpfr_set (y, x, MPFR_RNDZ);
- d = mpfr_get_decimal64 (x, MPFR_RNDU);
-+ ASSERT_ALWAYS (d == DEC64_MAX);
-+ mpfr_set_ui (x, 0, MPFR_RNDZ);
-+ mpfr_set_decimal64 (x, d, MPFR_RNDZ);
-+ ASSERT_ALWAYS (mpfr_cmp (x, y) == 0);
-+
-+ mpfr_set_str (x, "-9.999999999999999E384", 10, MPFR_RNDZ);
-+ mpfr_set (y, x, MPFR_RNDZ);
-+ d = mpfr_get_decimal64 (x, MPFR_RNDA);
-+ ASSERT_ALWAYS (d == -DEC64_MAX);
- mpfr_set_ui (x, 0, MPFR_RNDZ);
- mpfr_set_decimal64 (x, d, MPFR_RNDZ);
- ASSERT_ALWAYS (mpfr_cmp (x, y) == 0);
-@@ -225,6 +238,83 @@
- mpfr_clear (x);
- }
-
-+static void
-+check_overflow (void)
-+{
-+ mpfr_t x;
-+ int err = 0, neg, rnd;
-+
-+ mpfr_init2 (x, 96);
-+ for (neg = 0; neg < 2; neg++)
-+ RND_LOOP (rnd)
-+ {
-+ _Decimal64 d, e;
-+ mpfr_rnd_t r = (mpfr_rnd_t) rnd;
-+ int sign = neg ? -1 : 1;
-+
-+ e = sign * (MPFR_IS_LIKE_RNDZ (r, neg) ? 1 : 2) * DEC64_MAX;
-+ /* This tests the binary exponent e > 1279 case of get_d64.c */
-+ mpfr_set_si_2exp (x, sign, 9999, MPFR_RNDN);
-+ d = mpfr_get_decimal64 (x, r);
-+ if (d != e)
-+ {
-+ printf ("Error 1 in check_overflow for %s, %s\n",
-+ neg ? "negative" : "positive",
-+ mpfr_print_rnd_mode (r));
-+ err = 1;
-+ }
-+ /* This tests the decimal exponent e > 385 case of get_d64.c */
-+ mpfr_set_si_2exp (x, sign * 31, 1274, MPFR_RNDN);
-+ d = mpfr_get_decimal64 (x, r);
-+ if (d != e)
-+ {
-+ printf ("Error 2 in check_overflow for %s, %s\n",
-+ neg ? "negative" : "positive",
-+ mpfr_print_rnd_mode (r));
-+ err = 1;
-+ }
-+ /* This tests the last else (-382 <= e <= 385) of get_d64.c */
-+ mpfr_set_decimal64 (x, e, MPFR_RNDA);
-+ d = mpfr_get_decimal64 (x, r);
-+ if (d != e)
-+ {
-+ printf ("Error 3 in check_overflow for %s, %s\n",
-+ neg ? "negative" : "positive",
-+ mpfr_print_rnd_mode (r));
-+ err = 1;
-+ }
-+ }
-+ mpfr_clear (x);
-+ if (err)
-+ exit (1);
-+}
-+
-+static void
-+check_tiny (void)
-+{
-+ mpfr_t x;
-+ _Decimal64 d;
-+
-+ /* If 0.5E-398 < |x| < 1E-398 (smallest subnormal), x should round
-+ to +/- 1E-398 in MPFR_RNDN. Note: the midpoint 0.5E-398 between
-+ 0 and 1E-398 is not a representable binary number, so that there
-+ are no tests for it. */
-+ mpfr_init2 (x, 128);
-+ mpfr_set_str (x, "1E-398", 10, MPFR_RNDZ);
-+ d = mpfr_get_decimal64 (x, MPFR_RNDN);
-+ MPFR_ASSERTN (d == 1.0E-398dd);
-+ mpfr_neg (x, x, MPFR_RNDN);
-+ d = mpfr_get_decimal64 (x, MPFR_RNDN);
-+ MPFR_ASSERTN (d == -1.0E-398dd);
-+ mpfr_set_str (x, "0.5E-398", 10, MPFR_RNDU);
-+ d = mpfr_get_decimal64 (x, MPFR_RNDN);
-+ MPFR_ASSERTN (d == 1.0E-398dd);
-+ mpfr_neg (x, x, MPFR_RNDN);
-+ d = mpfr_get_decimal64 (x, MPFR_RNDN);
-+ MPFR_ASSERTN (d == -1.0E-398dd);
-+ mpfr_clear (x);
-+}
-+
- int
- main (void)
- {
-@@ -241,6 +331,8 @@
- check_inf_nan ();
- check_random ();
- check_native ();
-+ check_overflow ();
-+ check_tiny ();
-
- tests_end_mpfr ();
- return 0;
diff --git a/packages/mpfr/3.1.1/120-strtofr-ternary-value.patch b/packages/mpfr/3.1.1/120-strtofr-ternary-value.patch
deleted file mode 100644
index 76dbc45..0000000
--- a/packages/mpfr/3.1.1/120-strtofr-ternary-value.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-diff -Naurd mpfr-3.1.1-a/PATCHES mpfr-3.1.1-b/PATCHES
---- mpfr-3.1.1-a/PATCHES 2012-08-30 09:35:12.000000000 +0000
-+++ mpfr-3.1.1-b/PATCHES 2012-08-30 09:35:12.000000000 +0000
-@@ -0,0 +1 @@
-+strtofr-ternary-value
-diff -Naurd mpfr-3.1.1-a/VERSION mpfr-3.1.1-b/VERSION
---- mpfr-3.1.1-a/VERSION 2012-08-30 09:28:51.000000000 +0000
-+++ mpfr-3.1.1-b/VERSION 2012-08-30 09:35:12.000000000 +0000
-@@ -1 +1 @@
--3.1.1-p1
-+3.1.1-p2
-diff -Naurd mpfr-3.1.1-a/src/mpfr.h mpfr-3.1.1-b/src/mpfr.h
---- mpfr-3.1.1-a/src/mpfr.h 2012-08-30 09:28:51.000000000 +0000
-+++ mpfr-3.1.1-b/src/mpfr.h 2012-08-30 09:35:12.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "3.1.1-p1"
-+#define MPFR_VERSION_STRING "3.1.1-p2"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.1-a/src/strtofr.c mpfr-3.1.1-b/src/strtofr.c
---- mpfr-3.1.1-a/src/strtofr.c 2012-07-03 15:01:16.000000000 +0000
-+++ mpfr-3.1.1-b/src/strtofr.c 2012-08-30 09:35:12.000000000 +0000
-@@ -667,6 +667,20 @@
- /* (z, exp_z) = base^(exp_base-pstr_size) */
- z = result + 2*ysize + 1;
- err = mpfr_mpn_exp (z, &exp_z, pstr->base, exp_z, ysize);
-+ /* Since we want y/z rounded toward zero, we must get an upper
-+ bound of z. If err >= 0, the error on z is bounded by 2^err. */
-+ if (err >= 0)
-+ {
-+ mp_limb_t cy;
-+ unsigned long h = err / GMP_NUMB_BITS;
-+ unsigned long l = err - h * GMP_NUMB_BITS;
-+
-+ if (h >= ysize) /* not enough precision in z */
-+ goto next_loop;
-+ cy = mpn_add_1 (z, z, ysize - h, MPFR_LIMB_ONE << l);
-+ if (cy != 0) /* the code below requires z on ysize limbs */
-+ goto next_loop;
-+ }
- exact = exact && (err == -1);
- if (err == -2)
- goto underflow; /* FIXME: Sure? */
-@@ -730,6 +744,7 @@
- MPFR_RNDN, rnd, MPFR_PREC(x)))
- break;
-
-+ next_loop:
- /* update the prec for next loop */
- MPFR_ZIV_NEXT (loop, prec);
- } /* loop */
-diff -Naurd mpfr-3.1.1-a/src/version.c mpfr-3.1.1-b/src/version.c
---- mpfr-3.1.1-a/src/version.c 2012-08-30 09:28:51.000000000 +0000
-+++ mpfr-3.1.1-b/src/version.c 2012-08-30 09:35:12.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.1-p1";
-+ return "3.1.1-p2";
- }
-diff -Naurd mpfr-3.1.1-a/tests/tstrtofr.c mpfr-3.1.1-b/tests/tstrtofr.c
---- mpfr-3.1.1-a/tests/tstrtofr.c 2012-07-03 15:01:24.000000000 +0000
-+++ mpfr-3.1.1-b/tests/tstrtofr.c 2012-08-30 09:35:12.000000000 +0000
-@@ -1105,6 +1105,92 @@
- mpfr_clear (y);
- }
-
-+/* From a bug reported by Joseph S. Myers
-+ https://sympa.inria.fr/sympa/arc/mpfr/2012-08/msg00005.html */
-+static void
-+bug20120814 (void)
-+{
-+ mpfr_exp_t emin = -30, e;
-+ mpfr_t x, y;
-+ int r;
-+ char s[64], *p;
-+
-+ mpfr_init2 (x, 2);
-+ mpfr_set_ui_2exp (x, 3, emin - 2, MPFR_RNDN);
-+ mpfr_get_str (s + 1, &e, 10, 19, x, MPFR_RNDD);
-+ s[0] = s[1];
-+ s[1] = '.';
-+ for (p = s; *p != 0; p++) ;
-+ *p = 'e';
-+ sprintf (p + 1, "%d", (int) e - 1);
-+
-+ mpfr_init2 (y, 4);
-+ r = mpfr_strtofr (y, s, NULL, 0, MPFR_RNDN);
-+ if (r <= 0 || ! mpfr_equal_p (x, y))
-+ {
-+ printf ("Error in bug20120814\n");
-+ printf ("mpfr_strtofr failed on string \"%s\"\n", s);
-+ printf ("Expected inex > 0 and y = 0.1100E%d\n", (int) emin);
-+ printf ("Got inex = %-6d and y = ", r);
-+ mpfr_dump (y);
-+ exit (1);
-+ }
-+
-+ mpfr_clear (x);
-+ mpfr_clear (y);
-+}
-+
-+static void
-+bug20120829 (void)
-+{
-+ mpfr_t x1, x2, e;
-+ int inex1, inex2, i, r;
-+ char s[48] = "1e-1";
-+
-+ mpfr_init2 (e, 128);
-+ mpfr_inits2 (4, x1, x2, (mpfr_ptr) 0);
-+
-+ inex1 = mpfr_set_si (e, -1, MPFR_RNDN);
-+ MPFR_ASSERTN (inex1 == 0);
-+
-+ for (i = 1; i <= sizeof(s) - 5; i++)
-+ {
-+ s[3+i] = '0';
-+ s[4+i] = 0;
-+ inex1 = mpfr_mul_ui (e, e, 10, MPFR_RNDN);
-+ MPFR_ASSERTN (inex1 == 0);
-+ RND_LOOP(r)
-+ {
-+ mpfr_rnd_t rnd = (mpfr_rnd_t) r;
-+
-+ inex1 = mpfr_exp10 (x1, e, rnd);
-+ inex1 = SIGN (inex1);
-+ inex2 = mpfr_strtofr (x2, s, NULL, 0, rnd);
-+ inex2 = SIGN (inex2);
-+ /* On 32-bit machines, for i = 7, r8389, r8391 and r8394 do:
-+ strtofr.c:...: MPFR assertion failed: cy == 0
-+ r8396 is OK.
-+ On 64-bit machines, for i = 15,
-+ r8389 does: strtofr.c:678: MPFR assertion failed: err < (64 - 0)
-+ r8391 does: strtofr.c:680: MPFR assertion failed: h < ysize
-+ r8394 and r8396 are OK.
-+ */
-+ if (! mpfr_equal_p (x1, x2) || inex1 != inex2)
-+ {
-+ printf ("Error in bug20120829 for i = %d, rnd = %s\n",
-+ i, mpfr_print_rnd_mode (rnd));
-+ printf ("Expected inex = %d, x = ", inex1);
-+ mpfr_dump (x1);
-+ printf ("Got inex = %d, x = ", inex2);
-+ mpfr_dump (x2);
-+ exit (1);
-+ }
-+ }
-+ }
-+
-+ mpfr_clears (e, x1, x2, (mpfr_ptr) 0);
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -1117,6 +1203,8 @@
- check_retval ();
- bug20081028 ();
- test20100310 ();
-+ bug20120814 ();
-+ bug20120829 ();
-
- tests_end_mpfr ();
- return 0;
diff --git a/packages/mpfr/3.1.1/130-gmp51-compat.patch b/packages/mpfr/3.1.1/130-gmp51-compat.patch
deleted file mode 100644
index ecf7537..0000000
--- a/packages/mpfr/3.1.1/130-gmp51-compat.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-diff -Naurd mpfr-3.1.1-a/PATCHES mpfr-3.1.1-b/PATCHES
---- mpfr-3.1.1-a/PATCHES 2013-02-22 12:17:27.000000000 +0000
-+++ mpfr-3.1.1-b/PATCHES 2013-02-22 12:18:34.000000000 +0000
-@@ -0,0 +1 @@
-+gmp51-compat
-diff -Naurd mpfr-3.1.1-a/VERSION mpfr-3.1.1-b/VERSION
---- mpfr-3.1.1-a/VERSION 2012-08-30 09:35:12.000000000 +0000
-+++ mpfr-3.1.1-b/VERSION 2013-02-22 12:18:20.000000000 +0000
-@@ -1 +1 @@
--3.1.1-p2
-+3.1.1-p3
-diff -Naurd mpfr-3.1.1-a/src/get_f.c mpfr-3.1.1-b/src/get_f.c
---- mpfr-3.1.1-a/src/get_f.c 2012-07-03 15:01:19.000000000 +0000
-+++ mpfr-3.1.1-b/src/get_f.c 2013-02-22 12:18:06.000000000 +0000
-@@ -61,7 +61,7 @@
-
- sx = PREC (x);
- SIZ (x) = sx;
-- xp = LIMBS (x);
-+ xp = PTR (x);
- for (i = 0; i < sx; i++)
- xp[i] = MP_LIMB_T_MAX;
-
-diff -Naurd mpfr-3.1.1-a/src/mpfr-gmp.h mpfr-3.1.1-b/src/mpfr-gmp.h
---- mpfr-3.1.1-a/src/mpfr-gmp.h 2012-07-03 15:01:16.000000000 +0000
-+++ mpfr-3.1.1-b/src/mpfr-gmp.h 2013-02-22 12:18:06.000000000 +0000
-@@ -163,7 +163,6 @@
- #define SIZ(x) ((x)->_mp_size)
- #define ABSIZ(x) ABS (SIZ (x))
- #define PTR(x) ((x)->_mp_d)
--#define LIMBS(x) ((x)->_mp_d)
- #define EXP(x) ((x)->_mp_exp)
- #define PREC(x) ((x)->_mp_prec)
- #define ALLOC(x) ((x)->_mp_alloc)
-diff -Naurd mpfr-3.1.1-a/src/mpfr.h mpfr-3.1.1-b/src/mpfr.h
---- mpfr-3.1.1-a/src/mpfr.h 2012-08-30 09:35:12.000000000 +0000
-+++ mpfr-3.1.1-b/src/mpfr.h 2013-02-22 12:18:20.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 1
--#define MPFR_VERSION_STRING "3.1.1-p2"
-+#define MPFR_VERSION_STRING "3.1.1-p3"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.1-a/src/version.c mpfr-3.1.1-b/src/version.c
---- mpfr-3.1.1-a/src/version.c 2012-08-30 09:35:12.000000000 +0000
-+++ mpfr-3.1.1-b/src/version.c 2013-02-22 12:18:20.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.1-p2";
-+ return "3.1.1-p3";
- }
-diff -Naurd mpfr-3.1.1-a/tests/tadd.c mpfr-3.1.1-b/tests/tadd.c
---- mpfr-3.1.1-a/tests/tadd.c 2012-07-03 15:01:24.000000000 +0000
-+++ mpfr-3.1.1-b/tests/tadd.c 2013-02-22 12:18:06.000000000 +0000
-@@ -20,7 +20,7 @@
- http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */
-
--#define NUM 30000
-+#define N 30000
-
- #include <stdio.h>
- #include <stdlib.h>
-@@ -674,7 +674,7 @@
-
- mpfr_init2 (one, MPFR_PREC_MIN);
- mpfr_set_ui (one, 1, MPFR_RNDN);
-- for (n = 0; n < NUM; n++)
-+ for (n = 0; n < N; n++)
- {
- mpfr_prec_t prec_a, prec_b, prec_c;
- mpfr_exp_t tb=0, tc, diff;
-diff -Naurd mpfr-3.1.1-a/tests/tgeneric.c mpfr-3.1.1-b/tests/tgeneric.c
---- mpfr-3.1.1-a/tests/tgeneric.c 2012-07-03 15:01:24.000000000 +0000
-+++ mpfr-3.1.1-b/tests/tgeneric.c 2013-02-22 12:18:06.000000000 +0000
-@@ -121,7 +121,7 @@
- #endif
-
- static void
--test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int N)
-+test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax)
- {
- mpfr_prec_t prec, xprec, yprec;
- mpfr_t x, y, z, t, w;
-@@ -155,7 +155,7 @@
- mpfr_set_prec (w, yprec);
-
- /* Note: in precision p1, we test 4 special cases. */
-- for (n = 0; n < (prec == p1 ? N + 4 : N); n++)
-+ for (n = 0; n < (prec == p1 ? nmax + 4 : nmax); n++)
- {
- int infinite_input = 0;
-
diff --git a/packages/mpfr/3.1.1/version.desc b/packages/mpfr/3.1.1/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mpfr/3.1.1/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mpfr/3.1.2/110-exp_2.patch b/packages/mpfr/3.1.2/110-exp_2.patch
deleted file mode 100644
index 731ea92..0000000
--- a/packages/mpfr/3.1.2/110-exp_2.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
---- mpfr-3.1.2-a/PATCHES 2013-09-26 10:52:52.000000000 +0000
-+++ mpfr-3.1.2-b/PATCHES 2013-09-26 10:52:52.000000000 +0000
-@@ -0,0 +1 @@
-+exp_2
-diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
---- mpfr-3.1.2-a/VERSION 2013-03-13 15:37:28.000000000 +0000
-+++ mpfr-3.1.2-b/VERSION 2013-09-26 10:52:52.000000000 +0000
-@@ -1 +1 @@
--3.1.2
-+3.1.2-p1
-diff -Naurd mpfr-3.1.2-a/src/exp_2.c mpfr-3.1.2-b/src/exp_2.c
---- mpfr-3.1.2-a/src/exp_2.c 2013-03-13 15:37:28.000000000 +0000
-+++ mpfr-3.1.2-b/src/exp_2.c 2013-09-26 10:52:52.000000000 +0000
-@@ -204,7 +204,7 @@
- for (k = 0; k < K; k++)
- {
- mpz_mul (ss, ss, ss);
-- exps <<= 1;
-+ exps *= 2;
- exps += mpz_normalize (ss, ss, q);
- }
- mpfr_set_z (s, ss, MPFR_RNDN);
-diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
---- mpfr-3.1.2-a/src/mpfr.h 2013-03-13 15:37:37.000000000 +0000
-+++ mpfr-3.1.2-b/src/mpfr.h 2013-09-26 10:52:52.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 2
--#define MPFR_VERSION_STRING "3.1.2"
-+#define MPFR_VERSION_STRING "3.1.2-p1"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
---- mpfr-3.1.2-a/src/version.c 2013-03-13 15:37:34.000000000 +0000
-+++ mpfr-3.1.2-b/src/version.c 2013-09-26 10:52:52.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.2";
-+ return "3.1.2-p1";
- }
diff --git a/packages/mpfr/3.1.2/120-fits-smallneg.patch b/packages/mpfr/3.1.2/120-fits-smallneg.patch
deleted file mode 100644
index b229c18..0000000
--- a/packages/mpfr/3.1.2/120-fits-smallneg.patch
+++ /dev/null
@@ -1,605 +0,0 @@
-diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
---- mpfr-3.1.2-a/PATCHES 2013-09-26 10:56:55.000000000 +0000
-+++ mpfr-3.1.2-b/PATCHES 2013-09-26 10:56:55.000000000 +0000
-@@ -0,0 +1 @@
-+fits-smallneg
-diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
---- mpfr-3.1.2-a/VERSION 2013-09-26 10:52:52.000000000 +0000
-+++ mpfr-3.1.2-b/VERSION 2013-09-26 10:56:55.000000000 +0000
-@@ -1 +1 @@
--3.1.2-p1
-+3.1.2-p2
-diff -Naurd mpfr-3.1.2-a/src/fits_u.h mpfr-3.1.2-b/src/fits_u.h
---- mpfr-3.1.2-a/src/fits_u.h 2013-03-13 15:37:35.000000000 +0000
-+++ mpfr-3.1.2-b/src/fits_u.h 2013-09-26 10:56:55.000000000 +0000
-@@ -32,17 +32,20 @@
- int res;
-
- if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (f)))
-- /* Zero always fit */
-- return MPFR_IS_ZERO (f) ? 1 : 0;
-- else if (MPFR_IS_NEG (f))
-- /* Negative numbers don't fit */
-- return 0;
-- /* now it fits if
-- (a) f <= MAXIMUM
-- (b) round(f, prec(slong), rnd) <= MAXIMUM */
-+ return MPFR_IS_ZERO (f) ? 1 : 0; /* Zero always fits */
-
- e = MPFR_GET_EXP (f);
-
-+ if (MPFR_IS_NEG (f))
-+ return e >= 1 ? 0 /* f <= -1 does not fit */
-+ : rnd != MPFR_RNDN ? MPFR_IS_LIKE_RNDU (rnd, -1) /* directed mode */
-+ : e < 0 ? 1 /* f > -1/2 fits in MPFR_RNDN */
-+ : mpfr_powerof2_raw(f); /* -1/2 fits, -1 < f < -1/2 don't */
-+
-+ /* Now it fits if
-+ (a) f <= MAXIMUM
-+ (b) round(f, prec(slong), rnd) <= MAXIMUM */
-+
- /* first compute prec(MAXIMUM); fits in an int */
- for (s = MAXIMUM, prec = 0; s != 0; s /= 2, prec ++);
-
-diff -Naurd mpfr-3.1.2-a/src/fits_uintmax.c mpfr-3.1.2-b/src/fits_uintmax.c
---- mpfr-3.1.2-a/src/fits_uintmax.c 2013-03-13 15:37:33.000000000 +0000
-+++ mpfr-3.1.2-b/src/fits_uintmax.c 2013-09-26 10:56:55.000000000 +0000
-@@ -27,51 +27,19 @@
- #include "mpfr-intmax.h"
- #include "mpfr-impl.h"
-
--#ifdef _MPFR_H_HAVE_INTMAX_T
--
--/* We can't use fits_u.h <= mpfr_cmp_ui */
--int
--mpfr_fits_uintmax_p (mpfr_srcptr f, mpfr_rnd_t rnd)
--{
-- mpfr_exp_t e;
-- int prec;
-- uintmax_t s;
-- mpfr_t x;
-- int res;
--
-- if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (f)))
-- /* Zero always fit */
-- return MPFR_IS_ZERO (f) ? 1 : 0;
-- else if (MPFR_IS_NEG (f))
-- /* Negative numbers don't fit */
-- return 0;
-- /* now it fits if
-- (a) f <= MAXIMUM
-- (b) round(f, prec(slong), rnd) <= MAXIMUM */
--
-- e = MPFR_GET_EXP (f);
--
-- /* first compute prec(MAXIMUM); fits in an int */
-- for (s = MPFR_UINTMAX_MAX, prec = 0; s != 0; s /= 2, prec ++);
--
-- /* MAXIMUM needs prec bits, i.e. MAXIMUM = 2^prec - 1 */
--
-- /* if e <= prec - 1, then f < 2^(prec-1) < MAXIMUM */
-- if (e <= prec - 1)
-- return 1;
-+/* Note: though mpfr-impl.h is included in fits_u.h, we also include it
-+ above so that it gets included even when _MPFR_H_HAVE_INTMAX_T is not
-+ defined; this is necessary to avoid an empty translation unit, which
-+ is forbidden by ISO C. Without this, a failing test can be reproduced
-+ by creating an invalid stdint.h somewhere in the default include path
-+ and by compiling MPFR with "gcc -ansi -pedantic-errors". */
-
-- /* if e >= prec + 1, then f >= 2^prec > MAXIMUM */
-- if (e >= prec + 1)
-- return 0;
-+#ifdef _MPFR_H_HAVE_INTMAX_T
-
-- MPFR_ASSERTD (e == prec);
-+#define FUNCTION mpfr_fits_uintmax_p
-+#define MAXIMUM MPFR_UINTMAX_MAX
-+#define TYPE uintmax_t
-
-- /* hard case: first round to prec bits, then check */
-- mpfr_init2 (x, prec);
-- mpfr_set (x, f, rnd);
-- res = MPFR_GET_EXP (x) == e;
-- mpfr_clear (x);
-- return res;
--}
-+#include "fits_u.h"
-
- #endif
-diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
---- mpfr-3.1.2-a/src/mpfr.h 2013-09-26 10:52:52.000000000 +0000
-+++ mpfr-3.1.2-b/src/mpfr.h 2013-09-26 10:56:55.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 2
--#define MPFR_VERSION_STRING "3.1.2-p1"
-+#define MPFR_VERSION_STRING "3.1.2-p2"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
---- mpfr-3.1.2-a/src/version.c 2013-09-26 10:52:52.000000000 +0000
-+++ mpfr-3.1.2-b/src/version.c 2013-09-26 10:56:55.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.2-p1";
-+ return "3.1.2-p2";
- }
-diff -Naurd mpfr-3.1.2-a/tests/tfits.c mpfr-3.1.2-b/tests/tfits.c
---- mpfr-3.1.2-a/tests/tfits.c 2013-03-13 15:37:45.000000000 +0000
-+++ mpfr-3.1.2-b/tests/tfits.c 2013-09-26 10:56:55.000000000 +0000
-@@ -33,155 +33,176 @@
- #include "mpfr-intmax.h"
- #include "mpfr-test.h"
-
--#define ERROR1 { printf("Initial error for x="); mpfr_dump(x); exit(1); }
--#define ERROR2 { printf("Error for x="); mpfr_dump(x); exit(1); }
-+#define ERROR1(N) \
-+ do \
-+ { \
-+ printf("Error %d for rnd = %s and x = ", N, \
-+ mpfr_print_rnd_mode ((mpfr_rnd_t) r)); \
-+ mpfr_dump(x); \
-+ exit(1); \
-+ } \
-+ while (0)
-
- static void check_intmax (void);
-
- int
- main (void)
- {
-- mpfr_t x;
-+ mpfr_t x, y;
-+ int i, r;
-
- tests_start_mpfr ();
-
- mpfr_init2 (x, 256);
-+ mpfr_init2 (y, 8);
-
-- /* Check NAN */
-- mpfr_set_nan (x);
-- if (mpfr_fits_ulong_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_slong_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_uint_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_sint_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_ushort_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_sshort_p (x, MPFR_RNDN))
-- ERROR1;
-+ RND_LOOP (r)
-+ {
-
-- /* Check INF */
-- mpfr_set_inf (x, 1);
-- if (mpfr_fits_ulong_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_slong_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_uint_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_sint_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_ushort_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_sshort_p (x, MPFR_RNDN))
-- ERROR1;
-+ /* Check NAN */
-+ mpfr_set_nan (x);
-+ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (1);
-+ if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (2);
-+ if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (3);
-+ if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (4);
-+ if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (5);
-+ if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (6);
-
-- /* Check Zero */
-- MPFR_SET_ZERO (x);
-- if (!mpfr_fits_ulong_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_slong_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_uint_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_sint_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_ushort_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_sshort_p (x, MPFR_RNDN))
-- ERROR2;
-+ /* Check INF */
-+ mpfr_set_inf (x, 1);
-+ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (7);
-+ if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (8);
-+ if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (9);
-+ if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (10);
-+ if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (11);
-+ if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (12);
-
-- /* Check small op */
-- mpfr_set_str1 (x, "1@-1");
-- if (!mpfr_fits_ulong_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_slong_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_uint_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_sint_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_ushort_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_sshort_p (x, MPFR_RNDN))
-- ERROR2;
-+ /* Check Zero */
-+ MPFR_SET_ZERO (x);
-+ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (13);
-+ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (14);
-+ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (15);
-+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (16);
-+ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (17);
-+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (18);
-
-- /* Check 17 */
-- mpfr_set_ui (x, 17, MPFR_RNDN);
-- if (!mpfr_fits_ulong_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_slong_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_uint_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_sint_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_ushort_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_sshort_p (x, MPFR_RNDN))
-- ERROR2;
-+ /* Check small positive op */
-+ mpfr_set_str1 (x, "1@-1");
-+ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (19);
-+ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (20);
-+ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (21);
-+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (22);
-+ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (23);
-+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (24);
-
-- /* Check all other values */
-- mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN);
-- mpfr_mul_2exp (x, x, 1, MPFR_RNDN);
-- if (mpfr_fits_ulong_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_slong_p (x, MPFR_RNDN))
-- ERROR1;
-- mpfr_mul_2exp (x, x, 40, MPFR_RNDN);
-- if (mpfr_fits_ulong_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_uint_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_sint_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_ushort_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_sshort_p (x, MPFR_RNDN))
-- ERROR1;
-+ /* Check 17 */
-+ mpfr_set_ui (x, 17, MPFR_RNDN);
-+ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (25);
-+ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (26);
-+ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (27);
-+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (28);
-+ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (29);
-+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (30);
-
-- mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN);
-- if (!mpfr_fits_ulong_p (x, MPFR_RNDN))
-- ERROR2;
-- mpfr_set_ui (x, LONG_MAX, MPFR_RNDN);
-- if (!mpfr_fits_slong_p (x, MPFR_RNDN))
-- ERROR2;
-- mpfr_set_ui (x, UINT_MAX, MPFR_RNDN);
-- if (!mpfr_fits_uint_p (x, MPFR_RNDN))
-- ERROR2;
-- mpfr_set_ui (x, INT_MAX, MPFR_RNDN);
-- if (!mpfr_fits_sint_p (x, MPFR_RNDN))
-- ERROR2;
-- mpfr_set_ui (x, USHRT_MAX, MPFR_RNDN);
-- if (!mpfr_fits_ushort_p (x, MPFR_RNDN))
-- ERROR2;
-- mpfr_set_ui (x, SHRT_MAX, MPFR_RNDN);
-- if (!mpfr_fits_sshort_p (x, MPFR_RNDN))
-- ERROR2;
-+ /* Check all other values */
-+ mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN);
-+ mpfr_mul_2exp (x, x, 1, MPFR_RNDN);
-+ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (31);
-+ if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (32);
-+ mpfr_mul_2exp (x, x, 40, MPFR_RNDN);
-+ if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (33);
-+ if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (34);
-+ if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (35);
-+ if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (36);
-+ if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (37);
-
-- mpfr_set_si (x, 1, MPFR_RNDN);
-- if (!mpfr_fits_sint_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_sshort_p (x, MPFR_RNDN))
-- ERROR2;
-+ mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN);
-+ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (38);
-+ mpfr_set_ui (x, LONG_MAX, MPFR_RNDN);
-+ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (39);
-+ mpfr_set_ui (x, UINT_MAX, MPFR_RNDN);
-+ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (40);
-+ mpfr_set_ui (x, INT_MAX, MPFR_RNDN);
-+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (41);
-+ mpfr_set_ui (x, USHRT_MAX, MPFR_RNDN);
-+ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (42);
-+ mpfr_set_ui (x, SHRT_MAX, MPFR_RNDN);
-+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (43);
-
-- /* Check negative value */
-- mpfr_set_si (x, -1, MPFR_RNDN);
-- if (!mpfr_fits_sint_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_sshort_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_slong_p (x, MPFR_RNDN))
-- ERROR2;
-- if (mpfr_fits_uint_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_ushort_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_ulong_p (x, MPFR_RNDN))
-- ERROR1;
-+ mpfr_set_si (x, 1, MPFR_RNDN);
-+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (44);
-+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (45);
-+
-+ /* Check negative op */
-+ for (i = 1; i <= 4; i++)
-+ {
-+ int inv;
-+
-+ mpfr_set_si_2exp (x, -i, -2, MPFR_RNDN);
-+ mpfr_rint (y, x, (mpfr_rnd_t) r);
-+ inv = MPFR_NOTZERO (y);
-+ if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r) ^ inv)
-+ ERROR1 (46);
-+ if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (47);
-+ if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r) ^ inv)
-+ ERROR1 (48);
-+ if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (49);
-+ if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r) ^ inv)
-+ ERROR1 (50);
-+ if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (51);
-+ }
-+ }
-
- mpfr_clear (x);
-+ mpfr_clear (y);
-
- check_intmax ();
-
-@@ -189,85 +210,98 @@
- return 0;
- }
-
--static void check_intmax (void)
-+static void
-+check_intmax (void)
- {
- #ifdef _MPFR_H_HAVE_INTMAX_T
-- mpfr_t x;
-+ mpfr_t x, y;
-+ int i, r;
-
-- mpfr_init2 (x, sizeof (uintmax_t)*CHAR_BIT);
-+ mpfr_init2 (x, sizeof (uintmax_t) * CHAR_BIT);
-+ mpfr_init2 (y, 8);
-
-- /* Check NAN */
-- mpfr_set_nan (x);
-- if (mpfr_fits_uintmax_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_intmax_p (x, MPFR_RNDN))
-- ERROR1;
-+ RND_LOOP (r)
-+ {
-+ /* Check NAN */
-+ mpfr_set_nan (x);
-+ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (52);
-+ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (53);
-
-- /* Check INF */
-- mpfr_set_inf (x, 1);
-- if (mpfr_fits_uintmax_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_intmax_p (x, MPFR_RNDN))
-- ERROR1;
-+ /* Check INF */
-+ mpfr_set_inf (x, 1);
-+ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (54);
-+ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (55);
-
-- /* Check Zero */
-- MPFR_SET_ZERO (x);
-- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_intmax_p (x, MPFR_RNDN))
-- ERROR2;
-+ /* Check Zero */
-+ MPFR_SET_ZERO (x);
-+ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (56);
-+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (57);
-
-- /* Check small op */
-- mpfr_set_str1 (x, "1@-1");
-- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_intmax_p (x, MPFR_RNDN))
-- ERROR2;
-+ /* Check positive small op */
-+ mpfr_set_str1 (x, "1@-1");
-+ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (58);
-+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (59);
-
-- /* Check 17 */
-- mpfr_set_ui (x, 17, MPFR_RNDN);
-- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN))
-- ERROR2;
-- if (!mpfr_fits_intmax_p (x, MPFR_RNDN))
-- ERROR2;
-+ /* Check 17 */
-+ mpfr_set_ui (x, 17, MPFR_RNDN);
-+ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (60);
-+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (61);
-
-- /* Check hugest */
-- mpfr_set_ui_2exp (x, 42, sizeof (uintmax_t) * 32, MPFR_RNDN);
-- if (mpfr_fits_uintmax_p (x, MPFR_RNDN))
-- ERROR1;
-- if (mpfr_fits_intmax_p (x, MPFR_RNDN))
-- ERROR1;
-+ /* Check hugest */
-+ mpfr_set_ui_2exp (x, 42, sizeof (uintmax_t) * 32, MPFR_RNDN);
-+ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (62);
-+ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (63);
-
-- /* Check all other values */
-- mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN);
-- mpfr_add_ui (x, x, 1, MPFR_RNDN);
-- if (mpfr_fits_uintmax_p (x, MPFR_RNDN))
-- ERROR1;
-- mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN);
-- if (!mpfr_fits_uintmax_p (x, MPFR_RNDN))
-- ERROR2;
-- mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN);
-- mpfr_add_ui (x, x, 1, MPFR_RNDN);
-- if (mpfr_fits_intmax_p (x, MPFR_RNDN))
-- ERROR1;
-- mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN);
-- if (!mpfr_fits_intmax_p (x, MPFR_RNDN))
-- ERROR2;
-- mpfr_set_sj (x, MPFR_INTMAX_MIN, MPFR_RNDN);
-- if (!mpfr_fits_intmax_p (x, MPFR_RNDN))
-- ERROR2;
-- mpfr_sub_ui (x, x, 1, MPFR_RNDN);
-- if (mpfr_fits_intmax_p (x, MPFR_RNDN))
-- ERROR1;
-+ /* Check all other values */
-+ mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN);
-+ mpfr_add_ui (x, x, 1, MPFR_RNDN);
-+ if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (64);
-+ mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN);
-+ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (65);
-+ mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN);
-+ mpfr_add_ui (x, x, 1, MPFR_RNDN);
-+ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (66);
-+ mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN);
-+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (67);
-+ mpfr_set_sj (x, MPFR_INTMAX_MIN, MPFR_RNDN);
-+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (68);
-+ mpfr_sub_ui (x, x, 1, MPFR_RNDN);
-+ if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (69);
-
-- /* Check negative value */
-- mpfr_set_si (x, -1, MPFR_RNDN);
-- if (!mpfr_fits_intmax_p (x, MPFR_RNDN))
-- ERROR2;
-- if (mpfr_fits_uintmax_p (x, MPFR_RNDN))
-- ERROR1;
-+ /* Check negative op */
-+ for (i = 1; i <= 4; i++)
-+ {
-+ int inv;
-+
-+ mpfr_set_si_2exp (x, -i, -2, MPFR_RNDN);
-+ mpfr_rint (y, x, (mpfr_rnd_t) r);
-+ inv = MPFR_NOTZERO (y);
-+ if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r) ^ inv)
-+ ERROR1 (70);
-+ if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-+ ERROR1 (71);
-+ }
-+ }
-
- mpfr_clear (x);
-+ mpfr_clear (y);
- #endif
- }
--
diff --git a/packages/mpfr/3.1.2/130-clang-divby0.patch b/packages/mpfr/3.1.2/130-clang-divby0.patch
deleted file mode 100644
index 8e0cd8e..0000000
--- a/packages/mpfr/3.1.2/130-clang-divby0.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
---- mpfr-3.1.2-a/PATCHES 2013-10-09 13:34:21.000000000 +0000
-+++ mpfr-3.1.2-b/PATCHES 2013-10-09 13:34:21.000000000 +0000
-@@ -0,0 +1 @@
-+clang-divby0
-diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
---- mpfr-3.1.2-a/VERSION 2013-09-26 10:52:52.000000000 +0000
-+++ mpfr-3.1.2-b/VERSION 2013-10-09 13:34:21.000000000 +0000
-@@ -1 +1 @@
--3.1.2-p2
-+3.1.2-p3
-diff -Naurd mpfr-3.1.2-a/src/mpfr-impl.h mpfr-3.1.2-b/src/mpfr-impl.h
---- mpfr-3.1.2-a/src/mpfr-impl.h 2013-03-13 15:37:36.000000000 +0000
-+++ mpfr-3.1.2-b/src/mpfr-impl.h 2013-10-09 13:34:21.000000000 +0000
-@@ -468,8 +468,16 @@
- #define MPFR_LIMBS_PER_FLT ((IEEE_FLT_MANT_DIG-1)/GMP_NUMB_BITS+1)
-
- /* Visual C++ doesn't support +1.0/0.0, -1.0/0.0 and 0.0/0.0
-- at compile time. */
--#if defined(_MSC_VER) && defined(_WIN32) && (_MSC_VER >= 1200)
-+ at compile time.
-+ Clang with -fsanitize=undefined is a bit similar due to a bug:
-+ http://llvm.org/bugs/show_bug.cgi?id=17381
-+ but even without its sanitizer, it may be better to use the
-+ double_zero version until IEEE 754 division by zero is properly
-+ supported:
-+ http://llvm.org/bugs/show_bug.cgi?id=17000
-+*/
-+#if (defined(_MSC_VER) && defined(_WIN32) && (_MSC_VER >= 1200)) || \
-+ defined(__clang__)
- static double double_zero = 0.0;
- # define DBL_NAN (double_zero/double_zero)
- # define DBL_POS_INF ((double) 1.0/double_zero)
-@@ -501,6 +509,8 @@
- (with Xcode 2.4.1, i.e. the latest one). */
- #define LVALUE(x) (&(x) == &(x) || &(x) != &(x))
- #define DOUBLE_ISINF(x) (LVALUE(x) && ((x) > DBL_MAX || (x) < -DBL_MAX))
-+/* The DOUBLE_ISNAN(x) macro is also valid on long double x
-+ (assuming that the compiler isn't too broken). */
- #ifdef MPFR_NANISNAN
- /* Avoid MIPSpro / IRIX64 / gcc -ffast-math (incorrect) optimizations.
- The + must not be replaced by a ||. With gcc -ffast-math, NaN is
-diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
---- mpfr-3.1.2-a/src/mpfr.h 2013-09-26 10:52:52.000000000 +0000
-+++ mpfr-3.1.2-b/src/mpfr.h 2013-10-09 13:34:21.000000000 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 2
--#define MPFR_VERSION_STRING "3.1.2-p2"
-+#define MPFR_VERSION_STRING "3.1.2-p3"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
---- mpfr-3.1.2-a/src/version.c 2013-09-26 10:52:52.000000000 +0000
-+++ mpfr-3.1.2-b/src/version.c 2013-10-09 13:34:21.000000000 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.2-p2";
-+ return "3.1.2-p3";
- }
-diff -Naurd mpfr-3.1.2-a/tests/tget_flt.c mpfr-3.1.2-b/tests/tget_flt.c
---- mpfr-3.1.2-a/tests/tget_flt.c 2013-03-13 15:37:44.000000000 +0000
-+++ mpfr-3.1.2-b/tests/tget_flt.c 2013-10-09 13:34:21.000000000 +0000
-@@ -28,9 +28,17 @@
- main (void)
- {
- mpfr_t x, y;
-- float f, g, infp;
-+ float f, g;
- int i;
-+#if !defined(MPFR_ERRDIVZERO)
-+ float infp;
-+#endif
-+
-+ tests_start_mpfr ();
-
-+#if !defined(MPFR_ERRDIVZERO)
-+ /* The definition of DBL_POS_INF involves a division by 0. This makes
-+ "clang -O2 -fsanitize=undefined -fno-sanitize-recover" fail. */
- infp = (float) DBL_POS_INF;
- if (infp * 0.5 != infp)
- {
-@@ -38,8 +46,7 @@
- fprintf (stderr, "(this is probably a compiler bug, please report)\n");
- exit (1);
- }
--
-- tests_start_mpfr ();
-+#endif
-
- mpfr_init2 (x, 24);
- mpfr_init2 (y, 24);
-@@ -353,6 +360,7 @@
- printf ("expected %.8e, got %.8e\n", g, f);
- exit (1);
- }
-+#if !defined(MPFR_ERRDIVZERO)
- f = mpfr_get_flt (x, MPFR_RNDN); /* first round to 2^128 (even rule),
- thus we should get +Inf */
- g = infp;
-@@ -376,6 +384,7 @@
- printf ("expected %.8e, got %.8e\n", g, f);
- exit (1);
- }
-+#endif
-
- mpfr_clear (x);
- mpfr_clear (y);
-diff -Naurd mpfr-3.1.2-a/tests/tset_ld.c mpfr-3.1.2-b/tests/tset_ld.c
---- mpfr-3.1.2-a/tests/tset_ld.c 2013-03-13 15:37:44.000000000 +0000
-+++ mpfr-3.1.2-b/tests/tset_ld.c 2013-10-09 13:34:21.000000000 +0000
-@@ -47,8 +47,11 @@
- static int
- Isnan_ld (long double d)
- {
-- double e = (double) d;
-- if (DOUBLE_ISNAN (e))
-+ /* Do not convert d to double as this can give an overflow, which
-+ may confuse compilers without IEEE 754 support (such as clang
-+ -fsanitize=undefined), or trigger a trap if enabled.
-+ The DOUBLE_ISNAN macro should work fine on long double. */
-+ if (DOUBLE_ISNAN (d))
- return 1;
- LONGDOUBLE_NAN_ACTION (d, goto yes);
- return 0;
diff --git a/packages/mpfr/3.1.2/140-printf-alt0.patch b/packages/mpfr/3.1.2/140-printf-alt0.patch
deleted file mode 100644
index 2451f36..0000000
--- a/packages/mpfr/3.1.2/140-printf-alt0.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
---- mpfr-3.1.2-a/PATCHES 2013-11-15 00:51:49.211333830 +0000
-+++ mpfr-3.1.2-b/PATCHES 2013-11-15 00:51:49.323334999 +0000
-@@ -0,0 +1 @@
-+printf-alt0
-diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
---- mpfr-3.1.2-a/VERSION 2013-11-15 00:51:49.211333830 +0000
-+++ mpfr-3.1.2-b/VERSION 2013-11-15 00:51:49.323334999 +0000
-@@ -1 +1 @@
--3.1.2-p3
-+3.1.2-p4
-diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
---- mpfr-3.1.2-a/src/mpfr.h 2013-11-15 00:51:49.211333830 +0000
-+++ mpfr-3.1.2-b/src/mpfr.h 2013-11-15 00:51:49.323334999 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 2
--#define MPFR_VERSION_STRING "3.1.2-p3"
-+#define MPFR_VERSION_STRING "3.1.2-p4"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.2-a/src/vasprintf.c mpfr-3.1.2-b/src/vasprintf.c
---- mpfr-3.1.2-a/src/vasprintf.c 2013-03-13 15:37:37.000000000 +0000
-+++ mpfr-3.1.2-b/src/vasprintf.c 2013-11-15 00:51:49.267334408 +0000
-@@ -1040,7 +1040,7 @@
- }
-
- /* Determine the different parts of the string representation of the regular
-- number P when SPEC.SPEC is 'e', 'E', 'g', or 'G'.
-+ number P when spec.spec is 'e', 'E', 'g', or 'G'.
- DEC_INFO contains the previously computed exponent and string or is NULL.
-
- return -1 if some field > INT_MAX */
-@@ -1167,7 +1167,7 @@
- }
-
- /* Determine the different parts of the string representation of the regular
-- number P when SPEC.SPEC is 'f', 'F', 'g', or 'G'.
-+ number P when spec.spec is 'f', 'F', 'g', or 'G'.
- DEC_INFO contains the previously computed exponent and string or is NULL.
-
- return -1 if some field of number_parts is greater than INT_MAX */
-@@ -1559,7 +1559,7 @@
- /* fractional part */
- {
- np->point = MPFR_DECIMAL_POINT;
-- np->fp_trailing_zeros = (spec.spec == 'g' && spec.spec == 'G') ?
-+ np->fp_trailing_zeros = (spec.spec == 'g' || spec.spec == 'G') ?
- spec.prec - 1 : spec.prec;
- }
- else if (spec.alt)
-diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
---- mpfr-3.1.2-a/src/version.c 2013-11-15 00:51:49.211333830 +0000
-+++ mpfr-3.1.2-b/src/version.c 2013-11-15 00:51:49.323334999 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.2-p3";
-+ return "3.1.2-p4";
- }
-diff -Naurd mpfr-3.1.2-a/tests/tsprintf.c mpfr-3.1.2-b/tests/tsprintf.c
---- mpfr-3.1.2-a/tests/tsprintf.c 2013-03-13 15:37:44.000000000 +0000
-+++ mpfr-3.1.2-b/tests/tsprintf.c 2013-11-15 00:51:49.267334408 +0000
-@@ -456,10 +456,16 @@
- check_sprintf ("1.999900 ", "%-#10.7RG", x);
- check_sprintf ("1.9999 ", "%-10.7RG", x);
- mpfr_set_ui (x, 1, MPFR_RNDN);
-+ check_sprintf ("1.", "%#.1Rg", x);
-+ check_sprintf ("1. ", "%-#5.1Rg", x);
-+ check_sprintf (" 1.0", "%#5.2Rg", x);
- check_sprintf ("1.00000000000000000000000000000", "%#.30Rg", x);
- check_sprintf ("1", "%.30Rg", x);
- mpfr_set_ui (x, 0, MPFR_RNDN);
-- check_sprintf ("0.000000000000000000000000000000", "%#.30Rg", x);
-+ check_sprintf ("0.", "%#.1Rg", x);
-+ check_sprintf ("0. ", "%-#5.1Rg", x);
-+ check_sprintf (" 0.0", "%#5.2Rg", x);
-+ check_sprintf ("0.00000000000000000000000000000", "%#.30Rg", x);
- check_sprintf ("0", "%.30Rg", x);
-
- /* following tests with precision 53 bits */
diff --git a/packages/mpfr/3.1.2/150-custom_init_set.patch b/packages/mpfr/3.1.2/150-custom_init_set.patch
deleted file mode 100644
index 669b91d..0000000
--- a/packages/mpfr/3.1.2/150-custom_init_set.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
---- mpfr-3.1.2-a/PATCHES 2013-12-01 11:07:49.575329762 +0000
-+++ mpfr-3.1.2-b/PATCHES 2013-12-01 11:07:49.751331625 +0000
-@@ -0,0 +1 @@
-+custom_init_set
-diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
---- mpfr-3.1.2-a/VERSION 2013-12-01 11:07:49.571329714 +0000
-+++ mpfr-3.1.2-b/VERSION 2013-12-01 11:07:49.747331585 +0000
-@@ -1 +1 @@
--3.1.2-p4
-+3.1.2-p5
-diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
---- mpfr-3.1.2-a/src/mpfr.h 2013-12-01 11:07:49.571329714 +0000
-+++ mpfr-3.1.2-b/src/mpfr.h 2013-12-01 11:07:49.747331585 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 2
--#define MPFR_VERSION_STRING "3.1.2-p4"
-+#define MPFR_VERSION_STRING "3.1.2-p5"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-@@ -861,7 +861,7 @@
- _t = (mpfr_kind_t) _k; \
- _s = 1; \
- } else { \
-- _t = (mpfr_kind_t) -k; \
-+ _t = (mpfr_kind_t) - _k; \
- _s = -1; \
- } \
- _e = _t == MPFR_REGULAR_KIND ? (e) : \
-diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
---- mpfr-3.1.2-a/src/version.c 2013-12-01 11:07:49.575329762 +0000
-+++ mpfr-3.1.2-b/src/version.c 2013-12-01 11:07:49.747331585 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.2-p4";
-+ return "3.1.2-p5";
- }
diff --git a/packages/mpfr/3.1.2/160-li2-return.patch b/packages/mpfr/3.1.2/160-li2-return.patch
deleted file mode 100644
index 50cd04d..0000000
--- a/packages/mpfr/3.1.2/160-li2-return.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
---- mpfr-3.1.2-a/PATCHES 2014-04-15 21:56:49.609057464 +0000
-+++ mpfr-3.1.2-b/PATCHES 2014-04-15 21:56:49.697059857 +0000
-@@ -0,0 +1 @@
-+li2-return
-diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
---- mpfr-3.1.2-a/VERSION 2014-04-15 21:56:49.609057464 +0000
-+++ mpfr-3.1.2-b/VERSION 2014-04-15 21:56:49.697059857 +0000
-@@ -1 +1 @@
--3.1.2-p5
-+3.1.2-p6
-diff -Naurd mpfr-3.1.2-a/src/li2.c mpfr-3.1.2-b/src/li2.c
---- mpfr-3.1.2-a/src/li2.c 2013-03-13 15:37:32.000000000 +0000
-+++ mpfr-3.1.2-b/src/li2.c 2014-04-15 21:56:49.653058661 +0000
-@@ -630,5 +630,5 @@
- return mpfr_check_range (y, inexact, rnd_mode);
- }
-
-- MPFR_ASSERTN (0); /* should never reach this point */
-+ MPFR_RET_NEVER_GO_HERE ();
- }
-diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
---- mpfr-3.1.2-a/src/mpfr.h 2014-04-15 21:56:49.609057464 +0000
-+++ mpfr-3.1.2-b/src/mpfr.h 2014-04-15 21:56:49.697059857 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 2
--#define MPFR_VERSION_STRING "3.1.2-p5"
-+#define MPFR_VERSION_STRING "3.1.2-p6"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
---- mpfr-3.1.2-a/src/version.c 2014-04-15 21:56:49.609057464 +0000
-+++ mpfr-3.1.2-b/src/version.c 2014-04-15 21:56:49.697059857 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.2-p5";
-+ return "3.1.2-p6";
- }
diff --git a/packages/mpfr/3.1.2/170-exp3.patch b/packages/mpfr/3.1.2/170-exp3.patch
deleted file mode 100644
index 378c3bf..0000000
--- a/packages/mpfr/3.1.2/170-exp3.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
---- mpfr-3.1.2-a/PATCHES 2014-04-15 22:04:57.090286262 +0000
-+++ mpfr-3.1.2-b/PATCHES 2014-04-15 22:04:57.162288198 +0000
-@@ -0,0 +1 @@
-+exp3
-diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
---- mpfr-3.1.2-a/VERSION 2014-04-15 22:04:57.086286154 +0000
-+++ mpfr-3.1.2-b/VERSION 2014-04-15 22:04:57.162288198 +0000
-@@ -1 +1 @@
--3.1.2-p6
-+3.1.2-p7
-diff -Naurd mpfr-3.1.2-a/src/exp3.c mpfr-3.1.2-b/src/exp3.c
---- mpfr-3.1.2-a/src/exp3.c 2013-03-13 15:37:34.000000000 +0000
-+++ mpfr-3.1.2-b/src/exp3.c 2014-04-15 22:04:57.126287230 +0000
-@@ -283,7 +283,7 @@
- }
- }
-
-- if (mpfr_can_round (shift_x > 0 ? t : tmp, realprec, MPFR_RNDD, MPFR_RNDZ,
-+ if (mpfr_can_round (shift_x > 0 ? t : tmp, realprec, MPFR_RNDN, MPFR_RNDZ,
- MPFR_PREC(y) + (rnd_mode == MPFR_RNDN)))
- {
- inexact = mpfr_set (y, shift_x > 0 ? t : tmp, rnd_mode);
-diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
---- mpfr-3.1.2-a/src/mpfr.h 2014-04-15 22:04:57.086286154 +0000
-+++ mpfr-3.1.2-b/src/mpfr.h 2014-04-15 22:04:57.162288198 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 2
--#define MPFR_VERSION_STRING "3.1.2-p6"
-+#define MPFR_VERSION_STRING "3.1.2-p7"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
---- mpfr-3.1.2-a/src/version.c 2014-04-15 22:04:57.090286262 +0000
-+++ mpfr-3.1.2-b/src/version.c 2014-04-15 22:04:57.162288198 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.2-p6";
-+ return "3.1.2-p7";
- }
-diff -Naurd mpfr-3.1.2-a/tests/texp.c mpfr-3.1.2-b/tests/texp.c
---- mpfr-3.1.2-a/tests/texp.c 2013-03-13 15:37:44.000000000 +0000
-+++ mpfr-3.1.2-b/tests/texp.c 2014-04-15 22:04:57.126287230 +0000
-@@ -150,6 +150,22 @@
- exit (1);
- }
-
-+ mpfr_set_prec (x, 118);
-+ mpfr_set_str_binary (x, "0.1110010100011101010000111110011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000E-86");
-+ mpfr_set_prec (y, 118);
-+ mpfr_exp_2 (y, x, MPFR_RNDU);
-+ mpfr_exp_3 (x, x, MPFR_RNDU);
-+ if (mpfr_cmp (x, y))
-+ {
-+ printf ("mpfr_exp_2 and mpfr_exp_3 differ for prec=118\n");
-+ printf ("mpfr_exp_2 gives ");
-+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN);
-+ printf ("\nmpfr_exp_3 gives ");
-+ mpfr_out_str (stdout, 2, 0, x, MPFR_RNDN);
-+ printf ("\n");
-+ exit (1);
-+ }
-+
- mpfr_clear (x);
- mpfr_clear (y);
- return 0;
diff --git a/packages/mpfr/3.1.2/180-gmp6-compat.patch b/packages/mpfr/3.1.2/180-gmp6-compat.patch
deleted file mode 100644
index 2245c7c..0000000
--- a/packages/mpfr/3.1.2/180-gmp6-compat.patch
+++ /dev/null
@@ -1,254 +0,0 @@
-diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
---- mpfr-3.1.2-a/PATCHES 2014-04-15 22:20:32.243481506 +0000
-+++ mpfr-3.1.2-b/PATCHES 2014-04-15 22:22:32.418722707 +0000
-@@ -0,0 +1 @@
-+gmp6-compat
-diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
---- mpfr-3.1.2-a/VERSION 2014-04-15 22:20:20.755171478 +0000
-+++ mpfr-3.1.2-b/VERSION 2014-04-15 22:21:45.225450147 +0000
-@@ -1 +1 @@
--3.1.2-p7
-+3.1.2-p8
-diff -Naurd mpfr-3.1.2-a/configure mpfr-3.1.2-b/configure
---- mpfr-3.1.2-a/configure 2013-03-13 15:38:20.000000000 +0000
-+++ mpfr-3.1.2-b/configure 2014-04-15 22:21:38.821277476 +0000
-@@ -14545,26 +14545,30 @@
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-
--if test "$use_gmp_build" = yes ; then
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for valid GMP_NUMB_BITS" >&5
--$as_echo_n "checking for valid GMP_NUMB_BITS... " >&6; }
-- if test "$cross_compiling" = yes; then :
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency" >&5
-+$as_echo_n "checking for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency... " >&6; }
-+if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't test" >&5
- $as_echo "can't test" >&6; }
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
-+#include <stdio.h>
- #include <limits.h>
- #include "gmp.h"
--#include "gmp-impl.h"
-
- int
- main ()
- {
-
-- return GMP_NUMB_BITS == BYTES_PER_MP_LIMB * CHAR_BIT
-- && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1;
-+ if (GMP_NUMB_BITS == sizeof(mp_limb_t) * CHAR_BIT)
-+ return 0;
-+ fprintf (stderr, "GMP_NUMB_BITS = %ld\n", (long) GMP_NUMB_BITS);
-+ fprintf (stderr, "sizeof(mp_limb_t) = %ld\n", (long) sizeof(mp_limb_t));
-+ fprintf (stderr, "sizeof(mp_limb_t) * CHAR_BIT = %ld != GMP_NUMB_BITS\n",
-+ (long) (sizeof(mp_limb_t) * CHAR_BIT));
-+ return 1;
-
- ;
- return 0;
-@@ -14577,14 +14581,14 @@
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
-- as_fn_error $? "GMP_NUMB_BITS is incorrect.
--You probably need to change some of the GMP or MPFR compile options." "$LINENO" 5
-+ as_fn_error $? "GMP_NUMB_BITS and sizeof(mp_limb_t) are not consistent.
-+You probably need to change some of the GMP or MPFR compile options.
-+See 'config.log' for details (search for GMP_NUMB_BITS)." "$LINENO" 5
- fi
- rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
-
--fi
-
-
- if test "$dont_link_with_gmp" = yes ; then
-diff -Naurd mpfr-3.1.2-a/configure.ac mpfr-3.1.2-b/configure.ac
---- mpfr-3.1.2-a/configure.ac 2013-03-13 15:37:46.000000000 +0000
-+++ mpfr-3.1.2-b/configure.ac 2013-03-13 15:37:46.000000000 +0000
-@@ -435,23 +435,29 @@
- ])
- fi
-
--dnl Check for valid GMP_NUMB_BITS and BYTES_PER_MP_LIMB
-+dnl Check for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency.
-+dnl Problems may occur if gmp.h was generated with some ABI
-+dnl and is used with another ABI (or if nails are used).
- dnl This test doesn't need to link with libgmp (at least it shouldn't).
--if test "$use_gmp_build" = yes ; then
-- AC_MSG_CHECKING(for valid GMP_NUMB_BITS)
-- AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-+AC_MSG_CHECKING(for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency)
-+AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-+#include <stdio.h>
- #include <limits.h>
- #include "gmp.h"
--#include "gmp-impl.h"
- ]], [[
-- return GMP_NUMB_BITS == BYTES_PER_MP_LIMB * CHAR_BIT
-- && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1;
-+ if (GMP_NUMB_BITS == sizeof(mp_limb_t) * CHAR_BIT)
-+ return 0;
-+ fprintf (stderr, "GMP_NUMB_BITS = %ld\n", (long) GMP_NUMB_BITS);
-+ fprintf (stderr, "sizeof(mp_limb_t) = %ld\n", (long) sizeof(mp_limb_t));
-+ fprintf (stderr, "sizeof(mp_limb_t) * CHAR_BIT = %ld != GMP_NUMB_BITS\n",
-+ (long) (sizeof(mp_limb_t) * CHAR_BIT));
-+ return 1;
- ]])], [AC_MSG_RESULT(yes)], [
- AC_MSG_RESULT(no)
-- AC_MSG_ERROR([GMP_NUMB_BITS is incorrect.
--You probably need to change some of the GMP or MPFR compile options.])],
-+ AC_MSG_ERROR([GMP_NUMB_BITS and sizeof(mp_limb_t) are not consistent.
-+You probably need to change some of the GMP or MPFR compile options.
-+See 'config.log' for details (search for GMP_NUMB_BITS).])],
- [AC_MSG_RESULT([can't test])])
--fi
-
-
- dnl We really need to link using libtool. But it is impossible with the current
-diff -Naurd mpfr-3.1.2-a/src/init2.c mpfr-3.1.2-b/src/init2.c
---- mpfr-3.1.2-a/src/init2.c 2013-03-13 15:37:32.000000000 +0000
-+++ mpfr-3.1.2-b/src/init2.c 2014-04-15 22:21:06.220398489 +0000
-@@ -30,11 +30,11 @@
-
- /* Check if we can represent the number of limbs
- * associated to the maximum of mpfr_prec_t*/
-- MPFR_ASSERTN( MP_SIZE_T_MAX >= (MPFR_PREC_MAX/BYTES_PER_MP_LIMB) );
-+ MPFR_ASSERTN( MP_SIZE_T_MAX >= (MPFR_PREC_MAX/MPFR_BYTES_PER_MP_LIMB) );
-
-- /* Check for correct GMP_NUMB_BITS and BYTES_PER_MP_LIMB */
-- MPFR_ASSERTN( GMP_NUMB_BITS == BYTES_PER_MP_LIMB * CHAR_BIT
-- && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB );
-+ /* Check for correct GMP_NUMB_BITS and MPFR_BYTES_PER_MP_LIMB */
-+ MPFR_ASSERTN( GMP_NUMB_BITS == MPFR_BYTES_PER_MP_LIMB * CHAR_BIT
-+ && sizeof(mp_limb_t) == MPFR_BYTES_PER_MP_LIMB );
-
- MPFR_ASSERTN (mp_bits_per_limb == GMP_NUMB_BITS);
-
-diff -Naurd mpfr-3.1.2-a/src/mpfr-gmp.h mpfr-3.1.2-b/src/mpfr-gmp.h
---- mpfr-3.1.2-a/src/mpfr-gmp.h 2013-03-13 15:37:32.000000000 +0000
-+++ mpfr-3.1.2-b/src/mpfr-gmp.h 2014-04-15 22:21:06.220398489 +0000
-@@ -72,7 +72,6 @@
- #endif
-
- /* Define some macros */
--#define BYTES_PER_MP_LIMB (GMP_NUMB_BITS/CHAR_BIT)
-
- #define MP_LIMB_T_MAX (~(mp_limb_t)0)
-
-@@ -96,19 +95,19 @@
- #define SHRT_HIGHBIT SHRT_MIN
-
- /* MP_LIMB macros */
--#define MPN_ZERO(dst, n) memset((dst), 0, (n)*BYTES_PER_MP_LIMB)
--#define MPN_COPY_DECR(dst,src,n) memmove((dst),(src),(n)*BYTES_PER_MP_LIMB)
--#define MPN_COPY_INCR(dst,src,n) memmove((dst),(src),(n)*BYTES_PER_MP_LIMB)
-+#define MPN_ZERO(dst, n) memset((dst), 0, (n)*MPFR_BYTES_PER_MP_LIMB)
-+#define MPN_COPY_DECR(dst,src,n) memmove((dst),(src),(n)*MPFR_BYTES_PER_MP_LIMB)
-+#define MPN_COPY_INCR(dst,src,n) memmove((dst),(src),(n)*MPFR_BYTES_PER_MP_LIMB)
- #define MPN_COPY(dst,src,n) \
- do \
- { \
- if ((dst) != (src)) \
- { \
- MPFR_ASSERTD ((char *) (dst) >= (char *) (src) + \
-- (n) * BYTES_PER_MP_LIMB || \
-+ (n) * MPFR_BYTES_PER_MP_LIMB || \
- (char *) (src) >= (char *) (dst) + \
-- (n) * BYTES_PER_MP_LIMB); \
-- memcpy ((dst), (src), (n) * BYTES_PER_MP_LIMB); \
-+ (n) * MPFR_BYTES_PER_MP_LIMB); \
-+ memcpy ((dst), (src), (n) * MPFR_BYTES_PER_MP_LIMB); \
- } \
- } \
- while (0)
-diff -Naurd mpfr-3.1.2-a/src/mpfr-impl.h mpfr-3.1.2-b/src/mpfr-impl.h
---- mpfr-3.1.2-a/src/mpfr-impl.h 2013-10-09 13:34:21.000000000 +0000
-+++ mpfr-3.1.2-b/src/mpfr-impl.h 2014-04-15 22:21:06.220398489 +0000
-@@ -191,7 +191,7 @@
- # endif
- #endif
-
--
-+#define MPFR_BYTES_PER_MP_LIMB (GMP_NUMB_BITS/CHAR_BIT)
-
- /******************************************************
- ******************** Check GMP ***********************
-@@ -930,7 +930,7 @@
- #define MPFR_SET_ALLOC_SIZE(x, n) \
- ( ((mp_size_t*) MPFR_MANT(x))[-1] = n)
- #define MPFR_MALLOC_SIZE(s) \
-- ( sizeof(mpfr_size_limb_t) + BYTES_PER_MP_LIMB * ((size_t) s) )
-+ ( sizeof(mpfr_size_limb_t) + MPFR_BYTES_PER_MP_LIMB * ((size_t) s) )
- #define MPFR_SET_MANT_PTR(x,p) \
- (MPFR_MANT(x) = (mp_limb_t*) ((mpfr_size_limb_t*) p + 1))
- #define MPFR_GET_REAL_PTR(x) \
-@@ -964,7 +964,7 @@
- #endif
-
- #define MPFR_TMP_LIMBS_ALLOC(N) \
-- ((mp_limb_t *) MPFR_TMP_ALLOC ((size_t) (N) * BYTES_PER_MP_LIMB))
-+ ((mp_limb_t *) MPFR_TMP_ALLOC ((size_t) (N) * MPFR_BYTES_PER_MP_LIMB))
-
- /* temporary allocate 1 limb at xp, and initialize mpfr variable x */
- /* The temporary var doesn't have any size field, but it doesn't matter
-diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
---- mpfr-3.1.2-a/src/mpfr.h 2014-04-15 22:20:20.755171478 +0000
-+++ mpfr-3.1.2-b/src/mpfr.h 2014-04-15 22:21:45.225450147 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 2
--#define MPFR_VERSION_STRING "3.1.2-p7"
-+#define MPFR_VERSION_STRING "3.1.2-p8"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.2-a/src/mul.c mpfr-3.1.2-b/src/mul.c
---- mpfr-3.1.2-a/src/mul.c 2013-03-13 15:37:37.000000000 +0000
-+++ mpfr-3.1.2-b/src/mul.c 2014-04-15 22:21:06.224398597 +0000
-@@ -106,7 +106,7 @@
- MPFR_ASSERTD(tn <= k);
-
- /* Check for no size_t overflow*/
-- MPFR_ASSERTD((size_t) k <= ((size_t) -1) / BYTES_PER_MP_LIMB);
-+ MPFR_ASSERTD((size_t) k <= ((size_t) -1) / MPFR_BYTES_PER_MP_LIMB);
- MPFR_TMP_MARK(marker);
- tmp = MPFR_TMP_LIMBS_ALLOC (k);
-
-@@ -301,7 +301,7 @@
- MPFR_ASSERTD (tn <= k); /* tn <= k, thus no int overflow */
-
- /* Check for no size_t overflow*/
-- MPFR_ASSERTD ((size_t) k <= ((size_t) -1) / BYTES_PER_MP_LIMB);
-+ MPFR_ASSERTD ((size_t) k <= ((size_t) -1) / MPFR_BYTES_PER_MP_LIMB);
- MPFR_TMP_MARK (marker);
- tmp = MPFR_TMP_LIMBS_ALLOC (k);
-
-diff -Naurd mpfr-3.1.2-a/src/stack_interface.c mpfr-3.1.2-b/src/stack_interface.c
---- mpfr-3.1.2-a/src/stack_interface.c 2013-03-13 15:37:32.000000000 +0000
-+++ mpfr-3.1.2-b/src/stack_interface.c 2014-04-15 22:21:06.220398489 +0000
-@@ -26,7 +26,7 @@
- size_t
- mpfr_custom_get_size (mpfr_prec_t prec)
- {
-- return MPFR_PREC2LIMBS (prec) * BYTES_PER_MP_LIMB;
-+ return MPFR_PREC2LIMBS (prec) * MPFR_BYTES_PER_MP_LIMB;
- }
-
- #undef mpfr_custom_init
-diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
---- mpfr-3.1.2-a/src/version.c 2014-04-15 22:20:20.755171478 +0000
-+++ mpfr-3.1.2-b/src/version.c 2014-04-15 22:21:45.225450147 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.2-p7";
-+ return "3.1.2-p8";
- }
diff --git a/packages/mpfr/3.1.2/190-div-overflow.patch b/packages/mpfr/3.1.2/190-div-overflow.patch
deleted file mode 100644
index 6ff7c4a..0000000
--- a/packages/mpfr/3.1.2/190-div-overflow.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
---- mpfr-3.1.2-a/PATCHES 2014-06-30 15:15:25.533266905 +0000
-+++ mpfr-3.1.2-b/PATCHES 2014-06-30 15:15:25.617269178 +0000
-@@ -0,0 +1 @@
-+div-overflow
-diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
---- mpfr-3.1.2-a/VERSION 2014-06-30 15:15:25.529266797 +0000
-+++ mpfr-3.1.2-b/VERSION 2014-06-30 15:15:25.617269178 +0000
-@@ -1 +1 @@
--3.1.2-p8
-+3.1.2-p9
-diff -Naurd mpfr-3.1.2-a/src/div.c mpfr-3.1.2-b/src/div.c
---- mpfr-3.1.2-a/src/div.c 2013-03-13 15:37:33.000000000 +0000
-+++ mpfr-3.1.2-b/src/div.c 2014-06-30 15:15:25.585268312 +0000
-@@ -750,7 +750,9 @@
- truncate_check_qh:
- if (qh)
- {
-- qexp ++;
-+ if (MPFR_LIKELY (qexp < MPFR_EXP_MAX))
-+ qexp ++;
-+ /* else qexp is now incorrect, but one will still get an overflow */
- q0p[q0size - 1] = MPFR_LIMB_HIGHBIT;
- }
- goto truncate;
-@@ -765,7 +767,9 @@
- inex = 1; /* always here */
- if (mpn_add_1 (q0p, q0p, q0size, MPFR_LIMB_ONE << sh))
- {
-- qexp ++;
-+ if (MPFR_LIKELY (qexp < MPFR_EXP_MAX))
-+ qexp ++;
-+ /* else qexp is now incorrect, but one will still get an overflow */
- q0p[q0size - 1] = MPFR_LIMB_HIGHBIT;
- }
-
-diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
---- mpfr-3.1.2-a/src/mpfr.h 2014-06-30 15:15:25.533266905 +0000
-+++ mpfr-3.1.2-b/src/mpfr.h 2014-06-30 15:15:25.613269070 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 2
--#define MPFR_VERSION_STRING "3.1.2-p8"
-+#define MPFR_VERSION_STRING "3.1.2-p9"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
---- mpfr-3.1.2-a/src/version.c 2014-06-30 15:15:25.533266905 +0000
-+++ mpfr-3.1.2-b/src/version.c 2014-06-30 15:15:25.613269070 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.2-p8";
-+ return "3.1.2-p9";
- }
-diff -Naurd mpfr-3.1.2-a/tests/tdiv.c mpfr-3.1.2-b/tests/tdiv.c
---- mpfr-3.1.2-a/tests/tdiv.c 2013-03-13 15:37:44.000000000 +0000
-+++ mpfr-3.1.2-b/tests/tdiv.c 2014-06-30 15:15:25.585268312 +0000
-@@ -1104,6 +1104,96 @@
- #define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS)
- #include "tgeneric.c"
-
-+static void
-+test_extreme (void)
-+{
-+ mpfr_t x, y, z;
-+ mpfr_exp_t emin, emax;
-+ mpfr_prec_t p[4] = { 8, 32, 64, 256 };
-+ int xi, yi, zi, j, r;
-+ unsigned int flags, ex_flags;
-+
-+ emin = mpfr_get_emin ();
-+ emax = mpfr_get_emax ();
-+
-+ mpfr_set_emin (MPFR_EMIN_MIN);
-+ mpfr_set_emax (MPFR_EMAX_MAX);
-+
-+ for (xi = 0; xi < 4; xi++)
-+ {
-+ mpfr_init2 (x, p[xi]);
-+ mpfr_setmax (x, MPFR_EMAX_MAX);
-+ MPFR_ASSERTN (mpfr_check (x));
-+ for (yi = 0; yi < 4; yi++)
-+ {
-+ mpfr_init2 (y, p[yi]);
-+ mpfr_setmin (y, MPFR_EMIN_MIN);
-+ for (j = 0; j < 2; j++)
-+ {
-+ MPFR_ASSERTN (mpfr_check (y));
-+ for (zi = 0; zi < 4; zi++)
-+ {
-+ mpfr_init2 (z, p[zi]);
-+ RND_LOOP (r)
-+ {
-+ mpfr_clear_flags ();
-+ mpfr_div (z, x, y, (mpfr_rnd_t) r);
-+ flags = __gmpfr_flags;
-+ MPFR_ASSERTN (mpfr_check (z));
-+ ex_flags = MPFR_FLAGS_OVERFLOW | MPFR_FLAGS_INEXACT;
-+ if (flags != ex_flags)
-+ {
-+ printf ("Bad flags in test_extreme on z = a/b"
-+ " with %s and\n",
-+ mpfr_print_rnd_mode ((mpfr_rnd_t) r));
-+ printf ("a = ");
-+ mpfr_dump (x);
-+ printf ("b = ");
-+ mpfr_dump (y);
-+ printf ("Expected flags:");
-+ flags_out (ex_flags);
-+ printf ("Got flags: ");
-+ flags_out (flags);
-+ printf ("z = ");
-+ mpfr_dump (z);
-+ exit (1);
-+ }
-+ mpfr_clear_flags ();
-+ mpfr_div (z, y, x, (mpfr_rnd_t) r);
-+ flags = __gmpfr_flags;
-+ MPFR_ASSERTN (mpfr_check (z));
-+ ex_flags = MPFR_FLAGS_UNDERFLOW | MPFR_FLAGS_INEXACT;
-+ if (flags != ex_flags)
-+ {
-+ printf ("Bad flags in test_extreme on z = a/b"
-+ " with %s and\n",
-+ mpfr_print_rnd_mode ((mpfr_rnd_t) r));
-+ printf ("a = ");
-+ mpfr_dump (y);
-+ printf ("b = ");
-+ mpfr_dump (x);
-+ printf ("Expected flags:");
-+ flags_out (ex_flags);
-+ printf ("Got flags: ");
-+ flags_out (flags);
-+ printf ("z = ");
-+ mpfr_dump (z);
-+ exit (1);
-+ }
-+ }
-+ mpfr_clear (z);
-+ } /* zi */
-+ mpfr_nextabove (y);
-+ } /* j */
-+ mpfr_clear (y);
-+ } /* yi */
-+ mpfr_clear (x);
-+ } /* xi */
-+
-+ set_emin (emin);
-+ set_emax (emax);
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -1130,6 +1220,7 @@
- test_20070603 ();
- test_20070628 ();
- test_generic (2, 800, 50);
-+ test_extreme ();
-
- tests_end_mpfr ();
- return 0;
diff --git a/packages/mpfr/3.1.2/200-vasprintf.patch b/packages/mpfr/3.1.2/200-vasprintf.patch
deleted file mode 100644
index 43848f7..0000000
--- a/packages/mpfr/3.1.2/200-vasprintf.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
---- mpfr-3.1.2-a/PATCHES 2014-06-30 15:17:53.337268149 +0000
-+++ mpfr-3.1.2-b/PATCHES 2014-06-30 15:17:53.417270314 +0000
-@@ -0,0 +1 @@
-+vasprintf
-diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
---- mpfr-3.1.2-a/VERSION 2014-06-30 15:17:53.337268149 +0000
-+++ mpfr-3.1.2-b/VERSION 2014-06-30 15:17:53.413270206 +0000
-@@ -1 +1 @@
--3.1.2-p9
-+3.1.2-p10
-diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
---- mpfr-3.1.2-a/src/mpfr.h 2014-06-30 15:17:53.337268149 +0000
-+++ mpfr-3.1.2-b/src/mpfr.h 2014-06-30 15:17:53.413270206 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 2
--#define MPFR_VERSION_STRING "3.1.2-p9"
-+#define MPFR_VERSION_STRING "3.1.2-p10"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.2-a/src/vasprintf.c mpfr-3.1.2-b/src/vasprintf.c
---- mpfr-3.1.2-a/src/vasprintf.c 2013-11-15 00:51:49.267334408 +0000
-+++ mpfr-3.1.2-b/src/vasprintf.c 2014-06-30 15:17:53.377269231 +0000
-@@ -884,14 +884,18 @@
- first digit, we want the exponent for radix two and the decimal
- point AFTER the first digit. */
- {
-- MPFR_ASSERTN (exp > MPFR_EMIN_MIN /4); /* possible overflow */
-+ /* An integer overflow is normally not possible since MPFR_EXP_MIN
-+ is twice as large as MPFR_EMIN_MIN. */
-+ MPFR_ASSERTN (exp > (MPFR_EXP_MIN + 3) / 4);
- exp = (exp - 1) * 4;
- }
- else
- /* EXP is the exponent for decimal point BEFORE the first digit, we
- want the exponent for decimal point AFTER the first digit. */
- {
-- MPFR_ASSERTN (exp > MPFR_EMIN_MIN); /* possible overflow */
-+ /* An integer overflow is normally not possible since MPFR_EXP_MIN
-+ is twice as large as MPFR_EMIN_MIN. */
-+ MPFR_ASSERTN (exp > MPFR_EXP_MIN);
- --exp;
- }
- }
-diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
---- mpfr-3.1.2-a/src/version.c 2014-06-30 15:17:53.337268149 +0000
-+++ mpfr-3.1.2-b/src/version.c 2014-06-30 15:17:53.413270206 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.2-p9";
-+ return "3.1.2-p10";
- }
-diff -Naurd mpfr-3.1.2-a/tests/tsprintf.c mpfr-3.1.2-b/tests/tsprintf.c
---- mpfr-3.1.2-a/tests/tsprintf.c 2013-11-15 00:51:49.267334408 +0000
-+++ mpfr-3.1.2-b/tests/tsprintf.c 2014-06-30 15:17:53.377269231 +0000
-@@ -1184,6 +1184,69 @@
- check_emax_aux (MPFR_EMAX_MAX);
- }
-
-+static void
-+check_emin_aux (mpfr_exp_t e)
-+{
-+ mpfr_t x;
-+ char *s1, s2[256];
-+ int i;
-+ mpfr_exp_t emin;
-+ mpz_t ee;
-+
-+ MPFR_ASSERTN (e >= LONG_MIN);
-+ emin = mpfr_get_emin ();
-+ set_emin (e);
-+
-+ mpfr_init2 (x, 16);
-+ mpz_init (ee);
-+
-+ mpfr_setmin (x, e);
-+ mpz_set_si (ee, e);
-+ mpz_sub_ui (ee, ee, 1);
-+
-+ i = mpfr_asprintf (&s1, "%Ra", x);
-+ MPFR_ASSERTN (i > 0);
-+
-+ gmp_snprintf (s2, 256, "0x1p%Zd", ee);
-+
-+ if (strcmp (s1, s2) != 0)
-+ {
-+ printf ("Error in check_emin_aux for emin = %ld\n", (long) e);
-+ printf ("Expected %s\n", s2);
-+ printf ("Got %s\n", s1);
-+ exit (1);
-+ }
-+
-+ mpfr_free_str (s1);
-+
-+ i = mpfr_asprintf (&s1, "%Rb", x);
-+ MPFR_ASSERTN (i > 0);
-+
-+ gmp_snprintf (s2, 256, "1p%Zd", ee);
-+
-+ if (strcmp (s1, s2) != 0)
-+ {
-+ printf ("Error in check_emin_aux for emin = %ld\n", (long) e);
-+ printf ("Expected %s\n", s2);
-+ printf ("Got %s\n", s1);
-+ exit (1);
-+ }
-+
-+ mpfr_free_str (s1);
-+
-+ mpfr_clear (x);
-+ mpz_clear (ee);
-+ set_emin (emin);
-+}
-+
-+static void
-+check_emin (void)
-+{
-+ check_emin_aux (-15);
-+ check_emin_aux (mpfr_get_emin ());
-+ check_emin_aux (MPFR_EMIN_MIN);
-+}
-+
- int
- main (int argc, char **argv)
- {
-@@ -1203,6 +1266,7 @@
- decimal ();
- mixed ();
- check_emax ();
-+ check_emin ();
-
- #if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE)
- locale_da_DK ();
diff --git a/packages/mpfr/3.1.2/210-strtofr.patch b/packages/mpfr/3.1.2/210-strtofr.patch
deleted file mode 100644
index 462162e..0000000
--- a/packages/mpfr/3.1.2/210-strtofr.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff -Naurd mpfr-3.1.2-a/PATCHES mpfr-3.1.2-b/PATCHES
---- mpfr-3.1.2-a/PATCHES 2014-12-04 01:41:57.131789485 +0000
-+++ mpfr-3.1.2-b/PATCHES 2014-12-04 01:41:57.339791833 +0000
-@@ -0,0 +1 @@
-+strtofr
-diff -Naurd mpfr-3.1.2-a/VERSION mpfr-3.1.2-b/VERSION
---- mpfr-3.1.2-a/VERSION 2014-12-04 01:41:57.127789443 +0000
-+++ mpfr-3.1.2-b/VERSION 2014-12-04 01:41:57.339791833 +0000
-@@ -1 +1 @@
--3.1.2-p10
-+3.1.2-p11
-diff -Naurd mpfr-3.1.2-a/src/mpfr.h mpfr-3.1.2-b/src/mpfr.h
---- mpfr-3.1.2-a/src/mpfr.h 2014-12-04 01:41:57.127789443 +0000
-+++ mpfr-3.1.2-b/src/mpfr.h 2014-12-04 01:41:57.335791790 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 2
--#define MPFR_VERSION_STRING "3.1.2-p10"
-+#define MPFR_VERSION_STRING "3.1.2-p11"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.2-a/src/strtofr.c mpfr-3.1.2-b/src/strtofr.c
---- mpfr-3.1.2-a/src/strtofr.c 2013-03-13 15:37:32.000000000 +0000
-+++ mpfr-3.1.2-b/src/strtofr.c 2014-12-04 01:41:57.287791246 +0000
-@@ -473,8 +473,10 @@
- /* prec bits corresponds to ysize limbs */
- ysize_bits = ysize * GMP_NUMB_BITS;
- /* and to ysize_bits >= prec > MPFR_PREC (x) bits */
-- y = MPFR_TMP_LIMBS_ALLOC (2 * ysize + 1);
-- y += ysize; /* y has (ysize+1) allocated limbs */
-+ /* we need to allocate one more limb to work around bug
-+ https://gmplib.org/list-archives/gmp-bugs/2013-December/003267.html */
-+ y = MPFR_TMP_LIMBS_ALLOC (2 * ysize + 2);
-+ y += ysize; /* y has (ysize+2) allocated limbs */
-
- /* pstr_size is the number of characters we read in pstr->mant
- to have at least ysize full limbs.
-diff -Naurd mpfr-3.1.2-a/src/version.c mpfr-3.1.2-b/src/version.c
---- mpfr-3.1.2-a/src/version.c 2014-12-04 01:41:57.131789485 +0000
-+++ mpfr-3.1.2-b/src/version.c 2014-12-04 01:41:57.339791833 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.2-p10";
-+ return "3.1.2-p11";
- }
diff --git a/packages/mpfr/3.1.2/version.desc b/packages/mpfr/3.1.2/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mpfr/3.1.2/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mpfr/3.1.3/110-lngamma-and-doc.patch b/packages/mpfr/3.1.3/110-lngamma-and-doc.patch
deleted file mode 100644
index d7e1cbf..0000000
--- a/packages/mpfr/3.1.3/110-lngamma-and-doc.patch
+++ /dev/null
@@ -1,1117 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2015-07-02 10:49:23.950112879 +0000
-+++ mpfr-3.1.3-b/PATCHES 2015-07-02 10:49:24.042113845 +0000
-@@ -0,0 +1 @@
-+lngamma-and-doc
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2015-06-19 19:55:09.000000000 +0000
-+++ mpfr-3.1.3-b/VERSION 2015-07-02 10:49:24.042113845 +0000
-@@ -1 +1 @@
--3.1.3
-+3.1.3-p1
-diff -Naurd mpfr-3.1.3-a/doc/mpfr.texi mpfr-3.1.3-b/doc/mpfr.texi
---- mpfr-3.1.3-a/doc/mpfr.texi 2015-06-19 19:55:11.000000000 +0000
-+++ mpfr-3.1.3-b/doc/mpfr.texi 2015-07-02 10:49:24.018113593 +0000
-@@ -810,13 +810,17 @@
- When the input point is in the closure of the domain of the mathematical
- function and an input argument is +0 (resp.@: @minus{}0), one considers
- the limit when the corresponding argument approaches 0 from above
--(resp.@: below). If the limit is not defined (e.g., @code{mpfr_log} on
--@minus{}0), the behavior is specified in the description of the MPFR function.
-+(resp.@: below), if possible. If the limit is not defined (e.g.,
-+@code{mpfr_sqrt} and @code{mpfr_log} on @minus{}0), the behavior is
-+specified in the description of the MPFR function, but must be consistent
-+with the rule from the above paragraph (e.g., @code{mpfr_log} on @pom{}0
-+gives @minus{}Inf).
-
- When the result is equal to 0, its sign is determined by considering the
- limit as if the input point were not in the domain: If one approaches 0
- from above (resp.@: below), the result is +0 (resp.@: @minus{}0);
--for example, @code{mpfr_sin} on +0 gives +0.
-+for example, @code{mpfr_sin} on @minus{}0 gives @minus{}0 and
-+@code{mpfr_acos} on 1 gives +0 (in all rounding modes).
- In the other cases, the sign is specified in the description of the MPFR
- function; for example @code{mpfr_max} on @minus{}0 and +0 gives +0.
-
-@@ -832,8 +836,8 @@
- @c that advantages in practice), like for any bug fix.
- Example: @code{mpfr_hypot} on (NaN,0) gives NaN, but @code{mpfr_hypot}
- on (NaN,+Inf) gives +Inf (as specified in @ref{Special Functions}),
--since for any finite input @var{x}, @code{mpfr_hypot} on (@var{x},+Inf)
--gives +Inf.
-+since for any finite or infinite input @var{x}, @code{mpfr_hypot} on
-+(@var{x},+Inf) gives +Inf.
-
- @node Exceptions, Memory Handling, Floating-Point Values on Special Numbers, MPFR Basics
- @comment node-name, next, previous, up
-@@ -1581,7 +1585,8 @@
- @deftypefunx int mpfr_add_z (mpfr_t @var{rop}, mpfr_t @var{op1}, mpz_t @var{op2}, mpfr_rnd_t @var{rnd})
- @deftypefunx int mpfr_add_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mpfr_rnd_t @var{rnd})
- Set @var{rop} to @math{@var{op1} + @var{op2}} rounded in the direction
--@var{rnd}. For types having no signed zero, it is considered unsigned
-+@var{rnd}. The IEEE-754 rules are used, in particular for signed zeros.
-+But for types having no signed zeros, 0 is considered unsigned
- (i.e., (+0) + 0 = (+0) and (@minus{}0) + 0 = (@minus{}0)).
- The @code{mpfr_add_d} function assumes that the radix of the @code{double} type
- is a power of 2, with a precision at most that declared by the C implementation
-@@ -1599,7 +1604,8 @@
- @deftypefunx int mpfr_sub_z (mpfr_t @var{rop}, mpfr_t @var{op1}, mpz_t @var{op2}, mpfr_rnd_t @var{rnd})
- @deftypefunx int mpfr_sub_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mpfr_rnd_t @var{rnd})
- Set @var{rop} to @math{@var{op1} - @var{op2}} rounded in the direction
--@var{rnd}. For types having no signed zero, it is considered unsigned
-+@var{rnd}. The IEEE-754 rules are used, in particular for signed zeros.
-+But for types having no signed zeros, 0 is considered unsigned
- (i.e., (+0) @minus{} 0 = (+0), (@minus{}0) @minus{} 0 = (@minus{}0),
- 0 @minus{} (+0) = (@minus{}0) and 0 @minus{} (@minus{}0) = (+0)).
- The same restrictions than for @code{mpfr_add_d} apply to @code{mpfr_d_sub}
-@@ -1615,7 +1621,7 @@
- Set @var{rop} to @math{@var{op1} @GMPtimes{} @var{op2}} rounded in the
- direction @var{rnd}.
- When a result is zero, its sign is the product of the signs of the operands
--(for types having no signed zero, it is considered positive).
-+(for types having no signed zeros, 0 is considered positive).
- The same restrictions than for @code{mpfr_add_d} apply to @code{mpfr_mul_d}.
- @end deftypefun
-
-@@ -1635,7 +1641,7 @@
- @deftypefunx int mpfr_div_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mpfr_rnd_t @var{rnd})
- Set @var{rop} to @math{@var{op1}/@var{op2}} rounded in the direction @var{rnd}.
- When a result is zero, its sign is the product of the signs of the operands
--(for types having no signed zero, it is considered positive).
-+(for types having no signed zeros, 0 is considered positive).
- The same restrictions than for @code{mpfr_add_d} apply to @code{mpfr_d_div}
- and @code{mpfr_div_d}.
- @end deftypefun
-@@ -1643,15 +1649,18 @@
- @deftypefun int mpfr_sqrt (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
- @deftypefunx int mpfr_sqrt_ui (mpfr_t @var{rop}, unsigned long int @var{op}, mpfr_rnd_t @var{rnd})
- Set @var{rop} to @m{\sqrt{@var{op}}, the square root of @var{op}}
--rounded in the direction @var{rnd} (set @var{rop} to @minus{}0 if @var{op} is
--@minus{}0, to be consistent with the IEEE 754 standard).
-+rounded in the direction @var{rnd}. Set @var{rop} to @minus{}0 if
-+@var{op} is @minus{}0, to be consistent with the IEEE 754 standard.
- Set @var{rop} to NaN if @var{op} is negative.
- @end deftypefun
-
- @deftypefun int mpfr_rec_sqrt (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
- Set @var{rop} to @m{1/\sqrt{@var{op}}, the reciprocal square root of @var{op}}
--rounded in the direction @var{rnd}. Set @var{rop} to +Inf if @var{op} is
--@pom{}0, +0 if @var{op} is +Inf, and NaN if @var{op} is negative.
-+rounded in the direction @var{rnd}. Set @var{rop} to +Inf if @var{op} is
-+@pom{}0, +0 if @var{op} is +Inf, and NaN if @var{op} is negative. Warning!
-+Therefore the result on @minus{}0 is different from the one of the rSqrt
-+function recommended by the IEEE 754-2008 standard (Section 9.2.1), which
-+is @minus{}Inf instead of +Inf.
- @end deftypefun
-
- @deftypefun int mpfr_cbrt (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
-@@ -1832,7 +1841,9 @@
- @m{\log_2 @var{op}, log2(@var{op})} or
- @m{\log_{10} @var{op}, log10(@var{op})}, respectively,
- rounded in the direction @var{rnd}.
--Set @var{rop} to @minus{}Inf if @var{op} is @minus{}0
-+Set @var{rop} to +0 if @var{op} is 1 (in all rounding modes),
-+for consistency with the ISO C99 and IEEE 754-2008 standards.
-+Set @var{rop} to @minus{}Inf if @var{op} is @pom{}0
- (i.e., the sign of the zero has no influence on the result).
- @end deftypefun
-
-@@ -2003,8 +2014,11 @@
- @deftypefun int mpfr_lngamma (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
- Set @var{rop} to the value of the logarithm of the Gamma function on @var{op},
- rounded in the direction @var{rnd}.
--When @math{@minus{}2@var{k}@minus{}1 @le{} @var{op} @le{} @minus{}2@var{k}},
--@var{k} being a non-negative integer, @var{rop} is set to NaN.
-+When @var{op} is 1 or 2, set @var{rop} to +0 (in all rounding modes).
-+When @var{op} is an infinity or a nonpositive integer, set @var{rop} to +Inf,
-+following the general rules on special values.
-+When @math{@minus{}2@var{k}@minus{}1 < @var{op} < @minus{}2@var{k}},
-+@var{k} being a nonnegative integer, set @var{rop} to NaN@.
- See also @code{mpfr_lgamma}.
- @end deftypefun
-
-@@ -2012,10 +2026,11 @@
- Set @var{rop} to the value of the logarithm of the absolute value of the
- Gamma function on @var{op}, rounded in the direction @var{rnd}. The sign
- (1 or @minus{}1) of Gamma(@var{op}) is returned in the object pointed to
--by @var{signp}. When @var{op} is an infinity or a non-positive integer, set
--@var{rop} to +Inf. When @var{op} is NaN, @minus{}Inf or a negative integer,
--*@var{signp} is undefined, and when @var{op} is @pom{}0, *@var{signp} is
--the sign of the zero.
-+by @var{signp}.
-+When @var{op} is 1 or 2, set @var{rop} to +0 (in all rounding modes).
-+When @var{op} is an infinity or a nonpositive integer, set @var{rop} to +Inf.
-+When @var{op} is NaN, @minus{}Inf or a negative integer, *@var{signp} is
-+undefined, and when @var{op} is @pom{}0, *@var{signp} is the sign of the zero.
- @end deftypefun
-
- @deftypefun int mpfr_digamma (mpfr_t @var{rop}, mpfr_t @var{op}, mpfr_rnd_t @var{rnd})
-@@ -2064,7 +2079,10 @@
- @deftypefunx int mpfr_fms (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mpfr_t @var{op3}, mpfr_rnd_t @var{rnd})
- Set @var{rop} to @math{(@var{op1} @GMPtimes{} @var{op2}) + @var{op3}}
- (resp.@: @math{(@var{op1} @GMPtimes{} @var{op2}) - @var{op3}})
--rounded in the direction @var{rnd}.
-+rounded in the direction @var{rnd}. Concerning special values (signed zeros,
-+infinities, NaN), these functions behave like a multiplication followed by a
-+separate addition or subtraction. That is, the fused operation matters only
-+for rounding.
- @end deftypefun
-
- @deftypefun int mpfr_agm (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mpfr_rnd_t @var{rnd})
-@@ -2089,8 +2107,8 @@
- i.e., $\sqrt{x^2+y^2}$,
- @end tex
- rounded in the direction @var{rnd}.
--Special values are handled as described in Section F.9.4.3 of
--the ISO C99 and IEEE 754-2008 standards:
-+Special values are handled as described in the ISO C99 (Section F.9.4.3)
-+and IEEE 754-2008 (Section 9.2.1) standards:
- If @var{x} or @var{y} is an infinity, then +Inf is returned in @var{rop},
- even if the other number is NaN.
- @end deftypefun
-diff -Naurd mpfr-3.1.3-a/doc/mpfr.info mpfr-3.1.3-b/doc/mpfr.info
---- mpfr-3.1.3-a/doc/mpfr.info 2015-06-19 19:55:53.000000000 +0000
-+++ mpfr-3.1.3-b/doc/mpfr.info 2015-07-02 10:49:38.718267817 +0000
-@@ -1,4 +1,4 @@
--This is mpfr.info, produced by makeinfo version 5.2 from mpfr.texi.
-+This is mpfr.info, produced by makeinfo version 6.0 from mpfr.texi.
-
- This manual documents how to install and use the Multiple Precision
- Floating-Point Reliable Library, version 3.1.3.
-@@ -55,7 +55,7 @@
- MPFR Copying Conditions
- ***********************
-
--The GNU MPFR library (or MPFR for short) is "free"; this means that
-+The GNU MPFR library (or MPFR for short) is “free”; this means that
- everyone is free to use it and free to redistribute it on a free basis.
- The library is not in the public domain; it is copyrighted and there are
- restrictions on its distribution, but these restrictions are designed to
-@@ -418,7 +418,7 @@
- 4.2 Nomenclature and Types
- ==========================
-
--A "floating-point number", or "float" for short, is an arbitrary
-+A “floating-point number”, or “float” for short, is an arbitrary
- precision significand (also called mantissa) with a limited precision
- exponent. The C data type for such objects is ‘mpfr_t’ (internally
- defined as a one-element array of a structure, and ‘mpfr_ptr’ is the C
-@@ -432,7 +432,7 @@
- to the other functions supported by MPFR. Unless documented otherwise,
- the sign bit of a NaN is unspecified.
-
--The "precision" is the number of bits used to represent the significand
-+The “precision” is the number of bits used to represent the significand
- of a floating-point number; the corresponding C data type is
- ‘mpfr_prec_t’. The precision can be any integer between ‘MPFR_PREC_MIN’
- and ‘MPFR_PREC_MAX’. In the current implementation, ‘MPFR_PREC_MIN’ is
-@@ -446,7 +446,7 @@
- may abort, crash or have undefined behavior (depending on your C
- implementation).
-
--The "rounding mode" specifies the way to round the result of a
-+The “rounding mode” specifies the way to round the result of a
- floating-point operation, in case the exact result can not be
- represented exactly in the destination significand; the corresponding C
- data type is ‘mpfr_rnd_t’.
-@@ -499,14 +499,14 @@
- representable numbers, it is rounded to the one with the least
- significant bit set to zero. For example, the number 2.5, which is
- represented by (10.1) in binary, is rounded to (10.0)=2 with a precision
--of two bits, and not to (11.0)=3. This rule avoids the "drift"
-+of two bits, and not to (11.0)=3. This rule avoids the “drift”
- phenomenon mentioned by Knuth in volume 2 of The Art of Computer
- Programming (Section 4.2.2).
-
- Most MPFR functions take as first argument the destination variable,
- as second and following arguments the input variables, as last argument
- a rounding mode, and have a return value of type ‘int’, called the
--"ternary value". The value stored in the destination variable is
-+“ternary value”. The value stored in the destination variable is
- correctly rounded, i.e., MPFR behaves as if it computed the result with
- an infinite precision, then rounded it to the precision of this
- variable. The input variables are regarded as exact (in particular,
-@@ -572,15 +572,18 @@
- When the input point is in the closure of the domain of the
- mathematical function and an input argument is +0 (resp. −0), one
- considers the limit when the corresponding argument approaches 0 from
--above (resp. below). If the limit is not defined (e.g., ‘mpfr_log’ on
--−0), the behavior is specified in the description of the MPFR function.
-+above (resp. below), if possible. If the limit is not defined (e.g.,
-+‘mpfr_sqrt’ and ‘mpfr_log’ on −0), the behavior is specified in the
-+description of the MPFR function, but must be consistent with the rule
-+from the above paragraph (e.g., ‘mpfr_log’ on ±0 gives −Inf).
-
- When the result is equal to 0, its sign is determined by considering
- the limit as if the input point were not in the domain: If one
- approaches 0 from above (resp. below), the result is +0 (resp. −0); for
--example, ‘mpfr_sin’ on +0 gives +0. In the other cases, the sign is
--specified in the description of the MPFR function; for example
--‘mpfr_max’ on −0 and +0 gives +0.
-+example, ‘mpfr_sin’ on −0 gives −0 and ‘mpfr_acos’ on 1 gives +0 (in all
-+rounding modes). In the other cases, the sign is specified in the
-+description of the MPFR function; for example ‘mpfr_max’ on −0 and +0
-+gives +0.
-
- When the input point is not in the closure of the domain of the
- function, the result is NaN. Example: ‘mpfr_sqrt’ on −17 gives NaN.
-@@ -590,8 +593,8 @@
- numbers; such a case is always explicitly specified in *note MPFR
- Interface::. Example: ‘mpfr_hypot’ on (NaN,0) gives NaN, but
- ‘mpfr_hypot’ on (NaN,+Inf) gives +Inf (as specified in *note Special
--Functions::), since for any finite input X, ‘mpfr_hypot’ on (X,+Inf)
--gives +Inf.
-+Functions::), since for any finite or infinite input X, ‘mpfr_hypot’ on
-+(X,+Inf) gives +Inf.
-
- 
- File: mpfr.info, Node: Exceptions, Next: Memory Handling, Prev: Floating-Point Values on Special Numbers, Up: MPFR Basics
-@@ -1253,8 +1256,9 @@
- mpfr_rnd_t RND)
- -- Function: int mpfr_add_q (mpfr_t ROP, mpfr_t OP1, mpq_t OP2,
- mpfr_rnd_t RND)
-- Set ROP to OP1 + OP2 rounded in the direction RND. For types
-- having no signed zero, it is considered unsigned (i.e., (+0) + 0 =
-+ Set ROP to OP1 + OP2 rounded in the direction RND. The IEEE-754
-+ rules are used, in particular for signed zeros. But for types
-+ having no signed zeros, 0 is considered unsigned (i.e., (+0) + 0 =
- (+0) and (−0) + 0 = (−0)). The ‘mpfr_add_d’ function assumes that
- the radix of the ‘double’ type is a power of 2, with a precision at
- most that declared by the C implementation (macro
-@@ -1280,8 +1284,9 @@
- mpfr_rnd_t RND)
- -- Function: int mpfr_sub_q (mpfr_t ROP, mpfr_t OP1, mpq_t OP2,
- mpfr_rnd_t RND)
-- Set ROP to OP1 - OP2 rounded in the direction RND. For types
-- having no signed zero, it is considered unsigned (i.e., (+0) − 0 =
-+ Set ROP to OP1 - OP2 rounded in the direction RND. The IEEE-754
-+ rules are used, in particular for signed zeros. But for types
-+ having no signed zeros, 0 is considered unsigned (i.e., (+0) − 0 =
- (+0), (−0) − 0 = (−0), 0 − (+0) = (−0) and 0 − (−0) = (+0)). The
- same restrictions than for ‘mpfr_add_d’ apply to ‘mpfr_d_sub’ and
- ‘mpfr_sub_d’.
-@@ -1300,7 +1305,7 @@
- mpfr_rnd_t RND)
- Set ROP to OP1 times OP2 rounded in the direction RND. When a
- result is zero, its sign is the product of the signs of the
-- operands (for types having no signed zero, it is considered
-+ operands (for types having no signed zeros, 0 is considered
- positive). The same restrictions than for ‘mpfr_add_d’ apply to
- ‘mpfr_mul_d’.
-
-@@ -1327,21 +1332,24 @@
- mpfr_rnd_t RND)
- Set ROP to OP1/OP2 rounded in the direction RND. When a result is
- zero, its sign is the product of the signs of the operands (for
-- types having no signed zero, it is considered positive). The same
-+ types having no signed zeros, 0 is considered positive). The same
- restrictions than for ‘mpfr_add_d’ apply to ‘mpfr_d_div’ and
- ‘mpfr_div_d’.
-
- -- Function: int mpfr_sqrt (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
- -- Function: int mpfr_sqrt_ui (mpfr_t ROP, unsigned long int OP,
- mpfr_rnd_t RND)
-- Set ROP to the square root of OP rounded in the direction RND (set
-- ROP to −0 if OP is −0, to be consistent with the IEEE 754
-- standard). Set ROP to NaN if OP is negative.
-+ Set ROP to the square root of OP rounded in the direction RND. Set
-+ ROP to −0 if OP is −0, to be consistent with the IEEE 754 standard.
-+ Set ROP to NaN if OP is negative.
-
- -- Function: int mpfr_rec_sqrt (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
- Set ROP to the reciprocal square root of OP rounded in the
- direction RND. Set ROP to +Inf if OP is ±0, +0 if OP is +Inf, and
-- NaN if OP is negative.
-+ NaN if OP is negative. Warning! Therefore the result on −0 is
-+ different from the one of the rSqrt function recommended by the
-+ IEEE 754-2008 standard (Section 9.2.1), which is −Inf instead of
-+ +Inf.
-
- -- Function: int mpfr_cbrt (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
- -- Function: int mpfr_root (mpfr_t ROP, mpfr_t OP, unsigned long int K,
-@@ -1515,8 +1523,10 @@
- -- Function: int mpfr_log2 (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
- -- Function: int mpfr_log10 (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
- Set ROP to the natural logarithm of OP, log2(OP) or log10(OP),
-- respectively, rounded in the direction RND. Set ROP to −Inf if OP
-- is −0 (i.e., the sign of the zero has no influence on the result).
-+ respectively, rounded in the direction RND. Set ROP to +0 if OP is
-+ 1 (in all rounding modes), for consistency with the ISO C99 and
-+ IEEE 754-2008 standards. Set ROP to −Inf if OP is ±0 (i.e., the
-+ sign of the zero has no influence on the result).
-
- -- Function: int mpfr_exp (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
- -- Function: int mpfr_exp2 (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
-@@ -1649,17 +1659,21 @@
-
- -- Function: int mpfr_lngamma (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
- Set ROP to the value of the logarithm of the Gamma function on OP,
-- rounded in the direction RND. When −2K−1 <= OP <= −2K, K being a
-- non-negative integer, ROP is set to NaN. See also ‘mpfr_lgamma’.
-+ rounded in the direction RND. When OP is 1 or 2, set ROP to +0 (in
-+ all rounding modes). When OP is an infinity or a nonpositive
-+ integer, set ROP to +Inf, following the general rules on special
-+ values. When −2K−1 < OP < −2K, K being a nonnegative integer, set
-+ ROP to NaN. See also ‘mpfr_lgamma’.
-
- -- Function: int mpfr_lgamma (mpfr_t ROP, int *SIGNP, mpfr_t OP,
- mpfr_rnd_t RND)
- Set ROP to the value of the logarithm of the absolute value of the
- Gamma function on OP, rounded in the direction RND. The sign (1 or
- −1) of Gamma(OP) is returned in the object pointed to by SIGNP.
-- When OP is an infinity or a non-positive integer, set ROP to +Inf.
-- When OP is NaN, −Inf or a negative integer, *SIGNP is undefined,
-- and when OP is ±0, *SIGNP is the sign of the zero.
-+ When OP is 1 or 2, set ROP to +0 (in all rounding modes). When OP
-+ is an infinity or a nonpositive integer, set ROP to +Inf. When OP
-+ is NaN, −Inf or a negative integer, *SIGNP is undefined, and when
-+ OP is ±0, *SIGNP is the sign of the zero.
-
- -- Function: int mpfr_digamma (mpfr_t ROP, mpfr_t OP, mpfr_rnd_t RND)
- Set ROP to the value of the Digamma (sometimes also called Psi)
-@@ -1703,7 +1717,10 @@
- -- Function: int mpfr_fms (mpfr_t ROP, mpfr_t OP1, mpfr_t OP2, mpfr_t
- OP3, mpfr_rnd_t RND)
- Set ROP to (OP1 times OP2) + OP3 (resp. (OP1 times OP2) - OP3)
-- rounded in the direction RND.
-+ rounded in the direction RND. Concerning special values (signed
-+ zeros, infinities, NaN), these functions behave like a
-+ multiplication followed by a separate addition or subtraction.
-+ That is, the fused operation matters only for rounding.
-
- -- Function: int mpfr_agm (mpfr_t ROP, mpfr_t OP1, mpfr_t OP2,
- mpfr_rnd_t RND)
-@@ -1717,9 +1734,10 @@
- RND)
- Set ROP to the Euclidean norm of X and Y, i.e., the square root of
- the sum of the squares of X and Y, rounded in the direction RND.
-- Special values are handled as described in Section F.9.4.3 of the
-- ISO C99 and IEEE 754-2008 standards: If X or Y is an infinity, then
-- +Inf is returned in ROP, even if the other number is NaN.
-+ Special values are handled as described in the ISO C99 (Section
-+ F.9.4.3) and IEEE 754-2008 (Section 9.2.1) standards: If X or Y is
-+ an infinity, then +Inf is returned in ROP, even if the other number
-+ is NaN.
-
- -- Function: int mpfr_ai (mpfr_t ROP, mpfr_t X, mpfr_rnd_t RND)
- Set ROP to the value of the Airy function Ai on X, rounded in the
-@@ -2670,7 +2688,7 @@
- 5.16 Internals
- ==============
-
--A "limb" means the part of a multi-precision number that fits in a
-+A “limb” means the part of a multi-precision number that fits in a
- single word. Usually a limb contains 32 or 64 bits. The C data type
- for a limb is ‘mp_limb_t’.
-
-@@ -3140,7 +3158,7 @@
- 0. PREAMBLE
-
- The purpose of this License is to make a manual, textbook, or other
-- functional and useful document "free" in the sense of freedom: to
-+ functional and useful document “free” in the sense of freedom: to
- assure everyone the effective freedom to copy and redistribute it,
- with or without modifying it, either commercially or
- noncommercially. Secondarily, this License preserves for the
-@@ -3655,9 +3673,9 @@
- * Menu:
-
- * mpfr_abs: Basic Arithmetic Functions.
-- (line 160)
--* mpfr_acos: Special Functions. (line 51)
--* mpfr_acosh: Special Functions. (line 115)
-+ (line 165)
-+* mpfr_acos: Special Functions. (line 53)
-+* mpfr_acosh: Special Functions. (line 117)
- * mpfr_add: Basic Arithmetic Functions.
- (line 6)
- * mpfr_add_d: Basic Arithmetic Functions.
-@@ -3670,15 +3688,15 @@
- (line 8)
- * mpfr_add_z: Basic Arithmetic Functions.
- (line 14)
--* mpfr_agm: Special Functions. (line 210)
--* mpfr_ai: Special Functions. (line 226)
--* mpfr_asin: Special Functions. (line 52)
--* mpfr_asinh: Special Functions. (line 116)
-+* mpfr_agm: Special Functions. (line 219)
-+* mpfr_ai: Special Functions. (line 236)
-+* mpfr_asin: Special Functions. (line 54)
-+* mpfr_asinh: Special Functions. (line 118)
- * mpfr_asprintf: Formatted Output Functions.
- (line 193)
--* mpfr_atan: Special Functions. (line 53)
--* mpfr_atan2: Special Functions. (line 63)
--* mpfr_atanh: Special Functions. (line 117)
-+* mpfr_atan: Special Functions. (line 55)
-+* mpfr_atan2: Special Functions. (line 65)
-+* mpfr_atanh: Special Functions. (line 119)
- * mpfr_buildopt_decimal_p: Miscellaneous Functions.
- (line 162)
- * mpfr_buildopt_gmpinternals_p: Miscellaneous Functions.
-@@ -3690,7 +3708,7 @@
- * mpfr_can_round: Rounding Related Functions.
- (line 39)
- * mpfr_cbrt: Basic Arithmetic Functions.
-- (line 108)
-+ (line 113)
- * mpfr_ceil: Integer Related Functions.
- (line 7)
- * mpfr_check_range: Exception Related Functions.
-@@ -3735,18 +3753,18 @@
- (line 27)
- * mpfr_cmp_z: Comparison Functions.
- (line 11)
--* mpfr_const_catalan: Special Functions. (line 237)
--* mpfr_const_euler: Special Functions. (line 236)
--* mpfr_const_log2: Special Functions. (line 234)
--* mpfr_const_pi: Special Functions. (line 235)
-+* mpfr_const_catalan: Special Functions. (line 247)
-+* mpfr_const_euler: Special Functions. (line 246)
-+* mpfr_const_log2: Special Functions. (line 244)
-+* mpfr_const_pi: Special Functions. (line 245)
- * mpfr_copysign: Miscellaneous Functions.
- (line 109)
--* mpfr_cos: Special Functions. (line 29)
--* mpfr_cosh: Special Functions. (line 95)
--* mpfr_cot: Special Functions. (line 47)
--* mpfr_coth: Special Functions. (line 111)
--* mpfr_csc: Special Functions. (line 46)
--* mpfr_csch: Special Functions. (line 110)
-+* mpfr_cos: Special Functions. (line 31)
-+* mpfr_cosh: Special Functions. (line 97)
-+* mpfr_cot: Special Functions. (line 49)
-+* mpfr_coth: Special Functions. (line 113)
-+* mpfr_csc: Special Functions. (line 48)
-+* mpfr_csch: Special Functions. (line 112)
- * mpfr_custom_get_exp: Custom Interface. (line 75)
- * mpfr_custom_get_kind: Custom Interface. (line 65)
- * mpfr_custom_get_significand: Custom Interface. (line 70)
-@@ -3756,47 +3774,47 @@
- * mpfr_custom_move: Custom Interface. (line 82)
- * MPFR_DECL_INIT: Initialization Functions.
- (line 74)
--* mpfr_digamma: Special Functions. (line 166)
-+* mpfr_digamma: Special Functions. (line 172)
- * mpfr_dim: Basic Arithmetic Functions.
-- (line 166)
-+ (line 171)
- * mpfr_div: Basic Arithmetic Functions.
-- (line 72)
-+ (line 74)
- * mpfr_divby0_p: Exception Related Functions.
- (line 134)
- * mpfr_div_2exp: Compatibility with MPF.
- (line 49)
- * mpfr_div_2si: Basic Arithmetic Functions.
-- (line 181)
-+ (line 186)
- * mpfr_div_2ui: Basic Arithmetic Functions.
-- (line 179)
-+ (line 184)
- * mpfr_div_d: Basic Arithmetic Functions.
-- (line 84)
-+ (line 86)
- * mpfr_div_q: Basic Arithmetic Functions.
-- (line 88)
-+ (line 90)
- * mpfr_div_si: Basic Arithmetic Functions.
-- (line 80)
-+ (line 82)
- * mpfr_div_ui: Basic Arithmetic Functions.
-- (line 76)
-+ (line 78)
- * mpfr_div_z: Basic Arithmetic Functions.
-- (line 86)
-+ (line 88)
- * mpfr_d_div: Basic Arithmetic Functions.
-- (line 82)
-+ (line 84)
- * mpfr_d_sub: Basic Arithmetic Functions.
-- (line 35)
--* mpfr_eint: Special Functions. (line 133)
-+ (line 36)
-+* mpfr_eint: Special Functions. (line 135)
- * mpfr_eq: Compatibility with MPF.
- (line 28)
- * mpfr_equal_p: Comparison Functions.
- (line 59)
- * mpfr_erangeflag_p: Exception Related Functions.
- (line 137)
--* mpfr_erf: Special Functions. (line 177)
--* mpfr_erfc: Special Functions. (line 178)
--* mpfr_exp: Special Functions. (line 23)
--* mpfr_exp10: Special Functions. (line 25)
--* mpfr_exp2: Special Functions. (line 24)
--* mpfr_expm1: Special Functions. (line 129)
--* mpfr_fac_ui: Special Functions. (line 121)
-+* mpfr_erf: Special Functions. (line 183)
-+* mpfr_erfc: Special Functions. (line 184)
-+* mpfr_exp: Special Functions. (line 25)
-+* mpfr_exp10: Special Functions. (line 27)
-+* mpfr_exp2: Special Functions. (line 26)
-+* mpfr_expm1: Special Functions. (line 131)
-+* mpfr_fac_ui: Special Functions. (line 123)
- * mpfr_fits_intmax_p: Conversion Functions.
- (line 150)
- * mpfr_fits_sint_p: Conversion Functions.
-@@ -3815,20 +3833,20 @@
- (line 147)
- * mpfr_floor: Integer Related Functions.
- (line 8)
--* mpfr_fma: Special Functions. (line 203)
-+* mpfr_fma: Special Functions. (line 209)
- * mpfr_fmod: Integer Related Functions.
- (line 92)
--* mpfr_fms: Special Functions. (line 205)
-+* mpfr_fms: Special Functions. (line 211)
- * mpfr_fprintf: Formatted Output Functions.
- (line 157)
- * mpfr_frac: Integer Related Functions.
- (line 76)
--* mpfr_free_cache: Special Functions. (line 244)
-+* mpfr_free_cache: Special Functions. (line 254)
- * mpfr_free_str: Conversion Functions.
- (line 137)
- * mpfr_frexp: Conversion Functions.
- (line 45)
--* mpfr_gamma: Special Functions. (line 148)
-+* mpfr_gamma: Special Functions. (line 150)
- * mpfr_get_d: Conversion Functions.
- (line 7)
- * mpfr_get_decimal64: Conversion Functions.
-@@ -3887,7 +3905,7 @@
- (line 56)
- * mpfr_greater_p: Comparison Functions.
- (line 55)
--* mpfr_hypot: Special Functions. (line 218)
-+* mpfr_hypot: Special Functions. (line 227)
- * mpfr_inexflag_p: Exception Related Functions.
- (line 136)
- * mpfr_inf_p: Comparison Functions.
-@@ -3922,21 +3940,21 @@
- (line 31)
- * mpfr_integer_p: Integer Related Functions.
- (line 119)
--* mpfr_j0: Special Functions. (line 182)
--* mpfr_j1: Special Functions. (line 183)
--* mpfr_jn: Special Functions. (line 184)
-+* mpfr_j0: Special Functions. (line 188)
-+* mpfr_j1: Special Functions. (line 189)
-+* mpfr_jn: Special Functions. (line 190)
- * mpfr_lessequal_p: Comparison Functions.
- (line 58)
- * mpfr_lessgreater_p: Comparison Functions.
- (line 64)
- * mpfr_less_p: Comparison Functions.
- (line 57)
--* mpfr_lgamma: Special Functions. (line 157)
--* mpfr_li2: Special Functions. (line 143)
--* mpfr_lngamma: Special Functions. (line 152)
-+* mpfr_lgamma: Special Functions. (line 162)
-+* mpfr_li2: Special Functions. (line 145)
-+* mpfr_lngamma: Special Functions. (line 154)
- * mpfr_log: Special Functions. (line 16)
- * mpfr_log10: Special Functions. (line 18)
--* mpfr_log1p: Special Functions. (line 125)
-+* mpfr_log1p: Special Functions. (line 127)
- * mpfr_log2: Special Functions. (line 17)
- * mpfr_max: Miscellaneous Functions.
- (line 22)
-@@ -3947,29 +3965,29 @@
- * mpfr_modf: Integer Related Functions.
- (line 82)
- * mpfr_mul: Basic Arithmetic Functions.
-- (line 51)
-+ (line 53)
- * mpfr_mul_2exp: Compatibility with MPF.
- (line 47)
- * mpfr_mul_2si: Basic Arithmetic Functions.
-- (line 174)
-+ (line 179)
- * mpfr_mul_2ui: Basic Arithmetic Functions.
-- (line 172)
-+ (line 177)
- * mpfr_mul_d: Basic Arithmetic Functions.
-- (line 57)
-+ (line 59)
- * mpfr_mul_q: Basic Arithmetic Functions.
-- (line 61)
-+ (line 63)
- * mpfr_mul_si: Basic Arithmetic Functions.
-- (line 55)
-+ (line 57)
- * mpfr_mul_ui: Basic Arithmetic Functions.
-- (line 53)
-+ (line 55)
- * mpfr_mul_z: Basic Arithmetic Functions.
-- (line 59)
-+ (line 61)
- * mpfr_nanflag_p: Exception Related Functions.
- (line 135)
- * mpfr_nan_p: Comparison Functions.
- (line 39)
- * mpfr_neg: Basic Arithmetic Functions.
-- (line 159)
-+ (line 164)
- * mpfr_nextabove: Miscellaneous Functions.
- (line 15)
- * mpfr_nextbelow: Miscellaneous Functions.
-@@ -3983,13 +4001,13 @@
- * mpfr_overflow_p: Exception Related Functions.
- (line 133)
- * mpfr_pow: Basic Arithmetic Functions.
-- (line 116)
-+ (line 121)
- * mpfr_pow_si: Basic Arithmetic Functions.
-- (line 120)
-+ (line 125)
- * mpfr_pow_ui: Basic Arithmetic Functions.
-- (line 118)
-+ (line 123)
- * mpfr_pow_z: Basic Arithmetic Functions.
-- (line 122)
-+ (line 127)
- * mpfr_prec_round: Rounding Related Functions.
- (line 13)
- * ‘mpfr_prec_t’: Nomenclature and Types.
-@@ -3999,7 +4017,7 @@
- * mpfr_print_rnd_mode: Rounding Related Functions.
- (line 71)
- * mpfr_rec_sqrt: Basic Arithmetic Functions.
-- (line 103)
-+ (line 105)
- * mpfr_regular_p: Comparison Functions.
- (line 43)
- * mpfr_reldiff: Compatibility with MPF.
-@@ -4021,11 +4039,11 @@
- * ‘mpfr_rnd_t’: Nomenclature and Types.
- (line 34)
- * mpfr_root: Basic Arithmetic Functions.
-- (line 109)
-+ (line 114)
- * mpfr_round: Integer Related Functions.
- (line 9)
--* mpfr_sec: Special Functions. (line 45)
--* mpfr_sech: Special Functions. (line 109)
-+* mpfr_sec: Special Functions. (line 47)
-+* mpfr_sech: Special Functions. (line 111)
- * mpfr_set: Assignment Functions.
- (line 9)
- * mpfr_setsign: Miscellaneous Functions.
-@@ -4100,57 +4118,57 @@
- (line 49)
- * mpfr_signbit: Miscellaneous Functions.
- (line 99)
--* mpfr_sin: Special Functions. (line 30)
--* mpfr_sinh: Special Functions. (line 96)
--* mpfr_sinh_cosh: Special Functions. (line 101)
--* mpfr_sin_cos: Special Functions. (line 35)
-+* mpfr_sin: Special Functions. (line 32)
-+* mpfr_sinh: Special Functions. (line 98)
-+* mpfr_sinh_cosh: Special Functions. (line 103)
-+* mpfr_sin_cos: Special Functions. (line 37)
- * mpfr_si_div: Basic Arithmetic Functions.
-- (line 78)
-+ (line 80)
- * mpfr_si_sub: Basic Arithmetic Functions.
-- (line 31)
-+ (line 32)
- * mpfr_snprintf: Formatted Output Functions.
- (line 180)
- * mpfr_sprintf: Formatted Output Functions.
- (line 170)
- * mpfr_sqr: Basic Arithmetic Functions.
-- (line 69)
-+ (line 71)
- * mpfr_sqrt: Basic Arithmetic Functions.
-- (line 96)
-+ (line 98)
- * mpfr_sqrt_ui: Basic Arithmetic Functions.
-- (line 97)
-+ (line 99)
- * mpfr_strtofr: Assignment Functions.
- (line 80)
- * mpfr_sub: Basic Arithmetic Functions.
-- (line 25)
-+ (line 26)
- * mpfr_subnormalize: Exception Related Functions.
- (line 60)
- * mpfr_sub_d: Basic Arithmetic Functions.
-- (line 37)
-+ (line 38)
- * mpfr_sub_q: Basic Arithmetic Functions.
-- (line 43)
-+ (line 44)
- * mpfr_sub_si: Basic Arithmetic Functions.
-- (line 33)
-+ (line 34)
- * mpfr_sub_ui: Basic Arithmetic Functions.
-- (line 29)
-+ (line 30)
- * mpfr_sub_z: Basic Arithmetic Functions.
-- (line 41)
--* mpfr_sum: Special Functions. (line 252)
-+ (line 42)
-+* mpfr_sum: Special Functions. (line 262)
- * mpfr_swap: Assignment Functions.
- (line 150)
- * ‘mpfr_t’: Nomenclature and Types.
- (line 6)
--* mpfr_tan: Special Functions. (line 31)
--* mpfr_tanh: Special Functions. (line 97)
-+* mpfr_tan: Special Functions. (line 33)
-+* mpfr_tanh: Special Functions. (line 99)
- * mpfr_trunc: Integer Related Functions.
- (line 10)
- * mpfr_ui_div: Basic Arithmetic Functions.
-- (line 74)
-+ (line 76)
- * mpfr_ui_pow: Basic Arithmetic Functions.
-- (line 126)
-+ (line 131)
- * mpfr_ui_pow_ui: Basic Arithmetic Functions.
-- (line 124)
-+ (line 129)
- * mpfr_ui_sub: Basic Arithmetic Functions.
-- (line 27)
-+ (line 28)
- * mpfr_underflow_p: Exception Related Functions.
- (line 132)
- * mpfr_unordered_p: Comparison Functions.
-@@ -4181,61 +4199,61 @@
- (line 182)
- * mpfr_vsprintf: Formatted Output Functions.
- (line 171)
--* mpfr_y0: Special Functions. (line 193)
--* mpfr_y1: Special Functions. (line 194)
--* mpfr_yn: Special Functions. (line 195)
-+* mpfr_y0: Special Functions. (line 199)
-+* mpfr_y1: Special Functions. (line 200)
-+* mpfr_yn: Special Functions. (line 201)
- * mpfr_zero_p: Comparison Functions.
- (line 42)
--* mpfr_zeta: Special Functions. (line 171)
--* mpfr_zeta_ui: Special Functions. (line 172)
-+* mpfr_zeta: Special Functions. (line 177)
-+* mpfr_zeta_ui: Special Functions. (line 178)
- * mpfr_z_sub: Basic Arithmetic Functions.
-- (line 39)
-+ (line 40)
-
-
- 
- Tag Table:
- Node: Top775
- Node: Copying2007
--Node: Introduction to MPFR3766
--Node: Installing MPFR5880
--Node: Reporting Bugs11323
--Node: MPFR Basics13353
--Node: Headers and Libraries13669
--Node: Nomenclature and Types16828
--Node: MPFR Variable Conventions18874
--Node: Rounding Modes20418
--Ref: ternary value21544
--Node: Floating-Point Values on Special Numbers23526
--Node: Exceptions26572
--Node: Memory Handling29749
--Node: MPFR Interface30894
--Node: Initialization Functions33008
--Node: Assignment Functions40318
--Node: Combined Initialization and Assignment Functions49673
--Node: Conversion Functions50974
--Node: Basic Arithmetic Functions60035
--Node: Comparison Functions69200
--Node: Special Functions72687
--Node: Input and Output Functions86672
--Node: Formatted Output Functions88644
--Node: Integer Related Functions98431
--Node: Rounding Related Functions105051
--Node: Miscellaneous Functions108888
--Node: Exception Related Functions117568
--Node: Compatibility with MPF124386
--Node: Custom Interface127127
--Node: Internals131526
--Node: API Compatibility133066
--Node: Type and Macro Changes134995
--Node: Added Functions137844
--Node: Changed Functions141132
--Node: Removed Functions145545
--Node: Other Changes145973
--Node: Contributors147576
--Node: References150219
--Node: GNU Free Documentation License151973
--Node: Concept Index174562
--Node: Function and Type Index180659
-+Node: Introduction to MPFR3770
-+Node: Installing MPFR5884
-+Node: Reporting Bugs11327
-+Node: MPFR Basics13357
-+Node: Headers and Libraries13673
-+Node: Nomenclature and Types16832
-+Node: MPFR Variable Conventions18894
-+Node: Rounding Modes20438
-+Ref: ternary value21568
-+Node: Floating-Point Values on Special Numbers23554
-+Node: Exceptions26813
-+Node: Memory Handling29990
-+Node: MPFR Interface31135
-+Node: Initialization Functions33249
-+Node: Assignment Functions40559
-+Node: Combined Initialization and Assignment Functions49914
-+Node: Conversion Functions51215
-+Node: Basic Arithmetic Functions60276
-+Node: Comparison Functions69777
-+Node: Special Functions73264
-+Node: Input and Output Functions87862
-+Node: Formatted Output Functions89834
-+Node: Integer Related Functions99621
-+Node: Rounding Related Functions106241
-+Node: Miscellaneous Functions110078
-+Node: Exception Related Functions118758
-+Node: Compatibility with MPF125576
-+Node: Custom Interface128317
-+Node: Internals132716
-+Node: API Compatibility134260
-+Node: Type and Macro Changes136189
-+Node: Added Functions139038
-+Node: Changed Functions142326
-+Node: Removed Functions146739
-+Node: Other Changes147167
-+Node: Contributors148770
-+Node: References151413
-+Node: GNU Free Documentation License153167
-+Node: Concept Index175760
-+Node: Function and Type Index181857
- 
- End Tag Table
-
-diff -Naurd mpfr-3.1.3-a/src/lngamma.c mpfr-3.1.3-b/src/lngamma.c
---- mpfr-3.1.3-a/src/lngamma.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/lngamma.c 2015-07-02 10:49:24.018113593 +0000
-@@ -603,16 +603,17 @@
- mpfr_get_prec (y), mpfr_log_prec, y, inex));
-
- /* special cases */
-- if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x)))
-+ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x) ||
-+ (MPFR_IS_NEG (x) && mpfr_integer_p (x))))
- {
-- if (MPFR_IS_NAN (x) || MPFR_IS_NEG (x))
-+ if (MPFR_IS_NAN (x))
- {
- MPFR_SET_NAN (y);
- MPFR_RET_NAN;
- }
-- else /* lngamma(+Inf) = lngamma(+0) = +Inf */
-+ else /* lngamma(+/-Inf) = lngamma(nonpositive integer) = +Inf */
- {
-- if (MPFR_IS_ZERO (x))
-+ if (!MPFR_IS_INF (x))
- mpfr_set_divby0 ();
- MPFR_SET_INF (y);
- MPFR_SET_POS (y);
-@@ -620,8 +621,8 @@
- }
- }
-
-- /* if x < 0 and -2k-1 <= x <= -2k, then lngamma(x) = NaN */
-- if (MPFR_IS_NEG (x) && (unit_bit (x) == 0 || mpfr_integer_p (x)))
-+ /* if -2k-1 < x < -2k <= 0, then lngamma(x) = NaN */
-+ if (MPFR_IS_NEG (x) && unit_bit (x) == 0)
- {
- MPFR_SET_NAN (y);
- MPFR_RET_NAN;
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2015-07-02 10:49:24.038113803 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3"
-+#define MPFR_VERSION_STRING "3.1.3-p1"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/version.c 2015-07-02 10:49:24.042113845 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3";
-+ return "3.1.3-p1";
- }
-diff -Naurd mpfr-3.1.3-a/tests/tlngamma.c mpfr-3.1.3-b/tests/tlngamma.c
---- mpfr-3.1.3-a/tests/tlngamma.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tlngamma.c 2015-07-02 10:49:24.018113593 +0000
-@@ -33,7 +33,7 @@
- special (void)
- {
- mpfr_t x, y;
-- int inex;
-+ int i, inex;
-
- mpfr_init (x);
- mpfr_init (y);
-@@ -46,25 +46,29 @@
- exit (1);
- }
-
-- mpfr_set_inf (x, -1);
-+ mpfr_set_inf (x, 1);
-+ mpfr_clear_flags ();
- mpfr_lngamma (y, x, MPFR_RNDN);
-- if (!mpfr_nan_p (y))
-+ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 || __gmpfr_flags != 0)
- {
-- printf ("Error for lngamma(-Inf)\n");
-+ printf ("Error for lngamma(+Inf)\n");
- exit (1);
- }
-
-- mpfr_set_inf (x, 1);
-+ mpfr_set_inf (x, -1);
-+ mpfr_clear_flags ();
- mpfr_lngamma (y, x, MPFR_RNDN);
-- if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0)
-+ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 || __gmpfr_flags != 0)
- {
-- printf ("Error for lngamma(+Inf)\n");
-+ printf ("Error for lngamma(-Inf)\n");
- exit (1);
- }
-
- mpfr_set_ui (x, 0, MPFR_RNDN);
-+ mpfr_clear_flags ();
- mpfr_lngamma (y, x, MPFR_RNDN);
-- if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0)
-+ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 ||
-+ __gmpfr_flags != MPFR_FLAGS_DIVBY0)
- {
- printf ("Error for lngamma(+0)\n");
- exit (1);
-@@ -72,32 +76,58 @@
-
- mpfr_set_ui (x, 0, MPFR_RNDN);
- mpfr_neg (x, x, MPFR_RNDN);
-+ mpfr_clear_flags ();
- mpfr_lngamma (y, x, MPFR_RNDN);
-- if (!mpfr_nan_p (y))
-+ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 ||
-+ __gmpfr_flags != MPFR_FLAGS_DIVBY0)
- {
- printf ("Error for lngamma(-0)\n");
- exit (1);
- }
-
- mpfr_set_ui (x, 1, MPFR_RNDN);
-+ mpfr_clear_flags ();
- mpfr_lngamma (y, x, MPFR_RNDN);
-- if (MPFR_IS_NAN (y) || mpfr_cmp_ui (y, 0) || MPFR_IS_NEG (y))
-+ if (mpfr_cmp_ui0 (y, 0) || MPFR_IS_NEG (y))
- {
- printf ("Error for lngamma(1)\n");
- exit (1);
- }
-
-- mpfr_set_si (x, -1, MPFR_RNDN);
-- mpfr_lngamma (y, x, MPFR_RNDN);
-- if (!mpfr_nan_p (y))
-+ for (i = 1; i <= 5; i++)
- {
-- printf ("Error for lngamma(-1)\n");
-- exit (1);
-+ int c;
-+
-+ mpfr_set_si (x, -i, MPFR_RNDN);
-+ mpfr_clear_flags ();
-+ mpfr_lngamma (y, x, MPFR_RNDN);
-+ if (!mpfr_inf_p (y) || mpfr_sgn (y) < 0 ||
-+ __gmpfr_flags != MPFR_FLAGS_DIVBY0)
-+ {
-+ printf ("Error for lngamma(-%d)\n", i);
-+ exit (1);
-+ }
-+ if (i & 1)
-+ {
-+ mpfr_nextabove (x);
-+ c = '+';
-+ }
-+ else
-+ {
-+ mpfr_nextbelow (x);
-+ c = '-';
-+ }
-+ mpfr_lngamma (y, x, MPFR_RNDN);
-+ if (!mpfr_nan_p (y))
-+ {
-+ printf ("Error for lngamma(-%d%cepsilon)\n", i, c);
-+ exit (1);
-+ }
- }
-
- mpfr_set_ui (x, 2, MPFR_RNDN);
- mpfr_lngamma (y, x, MPFR_RNDN);
-- if (MPFR_IS_NAN (y) || mpfr_cmp_ui (y, 0) || MPFR_IS_NEG (y))
-+ if (mpfr_cmp_ui0 (y, 0) || MPFR_IS_NEG (y))
- {
- printf ("Error for lngamma(2)\n");
- exit (1);
-@@ -127,7 +157,7 @@
- mpfr_set_str (x, CHECK_X2, 10, MPFR_RNDN);
- mpfr_lngamma (y, x, MPFR_RNDN);
- mpfr_set_str (x, CHECK_Y2, 10, MPFR_RNDN);
-- if (MPFR_IS_NAN (y) || mpfr_cmp (y, x))
-+ if (mpfr_cmp0 (y, x))
- {
- printf ("mpfr_lngamma("CHECK_X2") is wrong:\n"
- "expected ");
-@@ -143,7 +173,7 @@
- mpfr_lngamma (y, x, MPFR_RNDU);
- mpfr_set_prec (x, 175);
- mpfr_set_str_binary (x, "0.1010001100011101101011001101110010100001000001000001110011000001101100001111001001000101011011100100010101011110100111110101010100010011010010000101010111001100011000101111E7");
-- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y))
-+ if (mpfr_cmp0 (x, y))
- {
- printf ("Error in mpfr_lngamma (1)\n");
- exit (1);
-@@ -155,7 +185,7 @@
- mpfr_lngamma (x, y, MPFR_RNDZ);
- mpfr_set_prec (y, 21);
- mpfr_set_str_binary (y, "0.111000101000001100101E9");
-- if (MPFR_IS_NAN (x) || mpfr_cmp (x, y))
-+ if (mpfr_cmp0 (x, y))
- {
- printf ("Error in mpfr_lngamma (120)\n");
- printf ("Expected "); mpfr_print_binary (y); puts ("");
-@@ -169,7 +199,7 @@
- inex = mpfr_lngamma (y, x, MPFR_RNDN);
- mpfr_set_prec (x, 206);
- mpfr_set_str_binary (x, "0.10000111011000000011100010101001100110001110000111100011000100100110110010001011011110101001111011110110000001010100111011010000000011100110110101100111000111010011110010000100010111101010001101000110101001E13");
-- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y))
-+ if (mpfr_cmp0 (x, y))
- {
- printf ("Error in mpfr_lngamma (768)\n");
- exit (1);
-@@ -185,7 +215,7 @@
- mpfr_set_str_binary (x, "0.1100E-66");
- mpfr_lngamma (y, x, MPFR_RNDN);
- mpfr_set_str_binary (x, "0.1100E6");
-- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y))
-+ if (mpfr_cmp0 (x, y))
- {
- printf ("Error for lngamma(0.1100E-66)\n");
- exit (1);
-@@ -199,7 +229,7 @@
- mpfr_lngamma (y, x, MPFR_RNDN);
- mpfr_set_prec (x, 32);
- mpfr_set_str_binary (x, "-0.10001000111011111011000010100010E207");
-- if (MPFR_IS_NAN (y) || mpfr_cmp (x, y))
-+ if (mpfr_cmp0 (x, y))
- {
- printf ("Error for lngamma(-2^199+0.5)\n");
- printf ("Got ");
diff --git a/packages/mpfr/3.1.3/120-muldiv-2exp-overflow.patch b/packages/mpfr/3.1.3/120-muldiv-2exp-overflow.patch
deleted file mode 100644
index df711fd..0000000
--- a/packages/mpfr/3.1.3/120-muldiv-2exp-overflow.patch
+++ /dev/null
@@ -1,161 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2015-07-02 10:50:08.046573308 +0000
-+++ mpfr-3.1.3-b/PATCHES 2015-07-02 10:50:08.126574142 +0000
-@@ -0,0 +1 @@
-+muldiv-2exp-overflow
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2015-07-02 10:49:24.042113845 +0000
-+++ mpfr-3.1.3-b/VERSION 2015-07-02 10:50:08.126574142 +0000
-@@ -1 +1 @@
--3.1.3-p1
-+3.1.3-p2
-diff -Naurd mpfr-3.1.3-a/src/div_2si.c mpfr-3.1.3-b/src/div_2si.c
---- mpfr-3.1.3-a/src/div_2si.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/div_2si.c 2015-07-02 10:50:08.106573933 +0000
-@@ -49,7 +49,7 @@
- rnd_mode = MPFR_RNDZ;
- return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y));
- }
-- else if (MPFR_UNLIKELY(n < 0 && (__gmpfr_emax < MPFR_EMIN_MIN - n ||
-+ else if (MPFR_UNLIKELY(n <= 0 && (__gmpfr_emax < MPFR_EMIN_MIN - n ||
- exp > __gmpfr_emax + n)) )
- return mpfr_overflow (y, rnd_mode, MPFR_SIGN(y));
-
-diff -Naurd mpfr-3.1.3-a/src/div_2ui.c mpfr-3.1.3-b/src/div_2ui.c
---- mpfr-3.1.3-a/src/div_2ui.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/div_2ui.c 2015-07-02 10:50:08.106573933 +0000
-@@ -32,7 +32,7 @@
- rnd_mode),
- ("y[%Pu]=%.*Rg inexact=%d", mpfr_get_prec(y), mpfr_log_prec, y, inexact));
-
-- if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x)))
-+ if (MPFR_UNLIKELY (n == 0 || MPFR_IS_SINGULAR (x)))
- return mpfr_set (y, x, rnd_mode);
- else
- {
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2015-07-02 10:49:24.038113803 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2015-07-02 10:50:08.126574142 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p1"
-+#define MPFR_VERSION_STRING "3.1.3-p2"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/mul_2si.c mpfr-3.1.3-b/src/mul_2si.c
---- mpfr-3.1.3-a/src/mul_2si.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/mul_2si.c 2015-07-02 10:50:08.106573933 +0000
-@@ -39,7 +39,7 @@
- {
- mpfr_exp_t exp = MPFR_GET_EXP (x);
- MPFR_SETRAW (inexact, y, x, exp, rnd_mode);
-- if (MPFR_UNLIKELY( n > 0 && (__gmpfr_emax < MPFR_EMIN_MIN + n ||
-+ if (MPFR_UNLIKELY(n >= 0 && (__gmpfr_emax < MPFR_EMIN_MIN + n ||
- exp > __gmpfr_emax - n)))
- return mpfr_overflow (y, rnd_mode, MPFR_SIGN(y));
- else if (MPFR_UNLIKELY(n < 0 && (__gmpfr_emin > MPFR_EMAX_MAX + n ||
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2015-07-02 10:49:24.042113845 +0000
-+++ mpfr-3.1.3-b/src/version.c 2015-07-02 10:50:08.126574142 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p1";
-+ return "3.1.3-p2";
- }
-diff -Naurd mpfr-3.1.3-a/tests/tmul_2exp.c mpfr-3.1.3-b/tests/tmul_2exp.c
---- mpfr-3.1.3-a/tests/tmul_2exp.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tmul_2exp.c 2015-07-02 10:50:08.106573933 +0000
-@@ -242,6 +242,76 @@
- large (MPFR_EMAX_MAX);
- }
-
-+/* Cases where the function overflows on n = 0 when rounding is like
-+ away from zero. */
-+static void
-+overflow0 (mpfr_exp_t emax)
-+{
-+ mpfr_exp_t old_emax;
-+ mpfr_t x, y1, y2;
-+ int neg, r, op;
-+ static char *sop[4] = { "mul_2ui", "mul_2si", "div_2ui", "div_2si" };
-+
-+ old_emax = mpfr_get_emax ();
-+ set_emax (emax);
-+
-+ mpfr_init2 (x, 8);
-+ mpfr_inits2 (6, y1, y2, (mpfr_ptr) 0);
-+
-+ mpfr_set_inf (x, 1);
-+ mpfr_nextbelow (x);
-+
-+ for (neg = 0; neg <= 1; neg++)
-+ {
-+ RND_LOOP (r)
-+ {
-+ int inex1, inex2;
-+ unsigned int flags1, flags2;
-+
-+ /* Even if there isn't an overflow (rounding ~ toward zero),
-+ the result is the same as the one of an overflow. */
-+ inex1 = mpfr_overflow (y1, (mpfr_rnd_t) r, neg ? -1 : 1);
-+ flags1 = MPFR_FLAGS_INEXACT;
-+ if (mpfr_inf_p (y1))
-+ flags1 |= MPFR_FLAGS_OVERFLOW;
-+ for (op = 0; op < 4; op++)
-+ {
-+ mpfr_clear_flags ();
-+ inex2 =
-+ op == 0 ? mpfr_mul_2ui (y2, x, 0, (mpfr_rnd_t) r) :
-+ op == 1 ? mpfr_mul_2si (y2, x, 0, (mpfr_rnd_t) r) :
-+ op == 2 ? mpfr_div_2ui (y2, x, 0, (mpfr_rnd_t) r) :
-+ op == 3 ? mpfr_div_2si (y2, x, 0, (mpfr_rnd_t) r) :
-+ (MPFR_ASSERTN (0), 0);
-+ flags2 = __gmpfr_flags;
-+ if (!(mpfr_equal_p (y1, y2) &&
-+ SAME_SIGN (inex1, inex2) &&
-+ flags1 == flags2))
-+ {
-+ printf ("Error in overflow0 for %s, mpfr_%s, emax = %"
-+ MPFR_EXP_FSPEC "d,\nx = ",
-+ mpfr_print_rnd_mode ((mpfr_rnd_t) r), sop[op],
-+ (mpfr_eexp_t) emax);
-+ mpfr_dump (x);
-+ printf ("Expected ");
-+ mpfr_dump (y1);
-+ printf (" with inex = %d, flags =", inex1);
-+ flags_out (flags1);
-+ printf ("Got ");
-+ mpfr_dump (y2);
-+ printf (" with inex = %d, flags =", inex2);
-+ flags_out (flags2);
-+ exit (1);
-+ }
-+ }
-+ }
-+ mpfr_neg (x, x, MPFR_RNDN);
-+ }
-+
-+ mpfr_clears (x, y1, y2, (mpfr_ptr) 0);
-+ set_emax (old_emax);
-+}
-+
- int
- main (int argc, char *argv[])
- {
-@@ -334,6 +404,11 @@
- underflow0 ();
- large0 ();
-
-+ if (mpfr_get_emax () != MPFR_EMAX_MAX)
-+ overflow0 (mpfr_get_emax ());
-+ overflow0 (MPFR_EMAX_MAX);
-+ overflow0 (-1);
-+
- tests_end_mpfr ();
- return 0;
- }
diff --git a/packages/mpfr/3.1.3/130-muldiv-2exp-underflow.patch b/packages/mpfr/3.1.3/130-muldiv-2exp-underflow.patch
deleted file mode 100644
index c7be09f..0000000
--- a/packages/mpfr/3.1.3/130-muldiv-2exp-underflow.patch
+++ /dev/null
@@ -1,217 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2015-07-17 08:54:48.592799981 +0000
-+++ mpfr-3.1.3-b/PATCHES 2015-07-17 08:54:48.616811495 +0000
-@@ -0,0 +1 @@
-+muldiv-2exp-underflow
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2015-07-02 10:50:08.126574142 +0000
-+++ mpfr-3.1.3-b/VERSION 2015-07-17 08:54:48.616811495 +0000
-@@ -1 +1 @@
--3.1.3-p2
-+3.1.3-p3
-diff -Naurd mpfr-3.1.3-a/src/div_2si.c mpfr-3.1.3-b/src/div_2si.c
---- mpfr-3.1.3-a/src/div_2si.c 2015-07-02 10:50:08.106573933 +0000
-+++ mpfr-3.1.3-b/src/div_2si.c 2015-07-17 08:54:48.608807656 +0000
-@@ -45,7 +45,8 @@
- if (rnd_mode == MPFR_RNDN &&
- (__gmpfr_emin > MPFR_EMAX_MAX - (n - 1) ||
- exp < __gmpfr_emin + (n - 1) ||
-- (inexact >= 0 && mpfr_powerof2_raw (y))))
-+ ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) &&
-+ mpfr_powerof2_raw (y))))
- rnd_mode = MPFR_RNDZ;
- return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y));
- }
-diff -Naurd mpfr-3.1.3-a/src/div_2ui.c mpfr-3.1.3-b/src/div_2ui.c
---- mpfr-3.1.3-a/src/div_2ui.c 2015-07-02 10:50:08.106573933 +0000
-+++ mpfr-3.1.3-b/src/div_2ui.c 2015-07-17 08:54:48.608807656 +0000
-@@ -44,7 +44,9 @@
- if (MPFR_UNLIKELY (n >= diffexp)) /* exp - n <= emin - 1 */
- {
- if (rnd_mode == MPFR_RNDN &&
-- (n > diffexp || (inexact >= 0 && mpfr_powerof2_raw (y))))
-+ (n > diffexp ||
-+ ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) &&
-+ mpfr_powerof2_raw (y))))
- rnd_mode = MPFR_RNDZ;
- return mpfr_underflow (y, rnd_mode, MPFR_SIGN (y));
- }
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2015-07-02 10:50:08.126574142 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2015-07-17 08:54:48.616811495 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p2"
-+#define MPFR_VERSION_STRING "3.1.3-p3"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/mul_2si.c mpfr-3.1.3-b/src/mul_2si.c
---- mpfr-3.1.3-a/src/mul_2si.c 2015-07-02 10:50:08.106573933 +0000
-+++ mpfr-3.1.3-b/src/mul_2si.c 2015-07-17 08:54:48.608807656 +0000
-@@ -48,7 +48,8 @@
- if (rnd_mode == MPFR_RNDN &&
- (__gmpfr_emin > MPFR_EMAX_MAX + (n + 1) ||
- exp < __gmpfr_emin - (n + 1) ||
-- (inexact >= 0 && mpfr_powerof2_raw (y))))
-+ ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) &&
-+ mpfr_powerof2_raw (y))))
- rnd_mode = MPFR_RNDZ;
- return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y));
- }
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2015-07-02 10:50:08.126574142 +0000
-+++ mpfr-3.1.3-b/src/version.c 2015-07-17 08:54:48.616811495 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p2";
-+ return "3.1.3-p3";
- }
-diff -Naurd mpfr-3.1.3-a/tests/tmul_2exp.c mpfr-3.1.3-b/tests/tmul_2exp.c
---- mpfr-3.1.3-a/tests/tmul_2exp.c 2015-07-02 10:50:08.106573933 +0000
-+++ mpfr-3.1.3-b/tests/tmul_2exp.c 2015-07-17 08:54:48.608807656 +0000
-@@ -50,77 +50,82 @@
- {
- mpfr_t x, y, z1, z2;
- mpfr_exp_t emin;
-- int i, k;
-+ int i, k, s;
- int prec;
- int rnd;
- int div;
- int inex1, inex2;
- unsigned int flags1, flags2;
-
-- /* Test mul_2si(x, e - k), div_2si(x, k - e) and div_2ui(x, k - e)
-- * with emin = e, x = 1 + i/16, i in { -1, 0, 1 }, and k = 1 to 4,
-- * by comparing the result with the one of a simple division.
-+ /* Test mul_2si(x, e - k), div_2si(x, k - e) and div_2ui(x, k - e) with
-+ * emin = e, x = s * (1 + i/16), i in { -1, 0, 1 }, s in { -1, 1 }, and
-+ * k = 1 to 4, by comparing the result with the one of a simple division.
- */
- emin = mpfr_get_emin ();
- set_emin (e);
- mpfr_inits2 (8, x, y, (mpfr_ptr) 0);
- for (i = 15; i <= 17; i++)
-- {
-- inex1 = mpfr_set_ui_2exp (x, i, -4, MPFR_RNDN);
-- MPFR_ASSERTN (inex1 == 0);
-- for (prec = 6; prec >= 3; prec -= 3)
-- {
-- mpfr_inits2 (prec, z1, z2, (mpfr_ptr) 0);
-- RND_LOOP (rnd)
-- for (k = 1; k <= 4; k++)
-- {
-- /* The following one is assumed to be correct. */
-- inex1 = mpfr_mul_2si (y, x, e, MPFR_RNDN);
-- MPFR_ASSERTN (inex1 == 0);
-- inex1 = mpfr_set_ui (z1, 1 << k, MPFR_RNDN);
-- MPFR_ASSERTN (inex1 == 0);
-- mpfr_clear_flags ();
-- /* Do not use mpfr_div_ui to avoid the optimization
-- by mpfr_div_2si. */
-- inex1 = mpfr_div (z1, y, z1, (mpfr_rnd_t) rnd);
-- flags1 = __gmpfr_flags;
--
-- for (div = 0; div <= 2; div++)
-+ for (s = 1; s >= -1; s -= 2)
-+ {
-+ inex1 = mpfr_set_si_2exp (x, s * i, -4, MPFR_RNDN);
-+ MPFR_ASSERTN (inex1 == 0);
-+ for (prec = 6; prec >= 3; prec -= 3)
-+ {
-+ mpfr_inits2 (prec, z1, z2, (mpfr_ptr) 0);
-+ RND_LOOP (rnd)
-+ for (k = 1; k <= 4; k++)
- {
-+ /* The following one is assumed to be correct. */
-+ inex1 = mpfr_mul_2si (y, x, e, MPFR_RNDN);
-+ MPFR_ASSERTN (inex1 == 0);
-+ inex1 = mpfr_set_ui (z1, 1 << k, MPFR_RNDN);
-+ MPFR_ASSERTN (inex1 == 0);
- mpfr_clear_flags ();
-- inex2 = div == 0 ?
-- mpfr_mul_2si (z2, x, e - k, (mpfr_rnd_t) rnd) : div == 1 ?
-- mpfr_div_2si (z2, x, k - e, (mpfr_rnd_t) rnd) :
-- mpfr_div_2ui (z2, x, k - e, (mpfr_rnd_t) rnd);
-- flags2 = __gmpfr_flags;
-- if (flags1 == flags2 && SAME_SIGN (inex1, inex2) &&
-- mpfr_equal_p (z1, z2))
-- continue;
-- printf ("Error in underflow(");
-- if (e == MPFR_EMIN_MIN)
-- printf ("MPFR_EMIN_MIN");
-- else if (e == emin)
-- printf ("default emin");
-- else if (e >= LONG_MIN)
-- printf ("%ld", (long) e);
-- else
-- printf ("<LONG_MIN");
-- printf (") with mpfr_%s,\nx = %d/16, prec = %d, k = %d, "
-- "%s\n", div == 0 ? "mul_2si" : div == 1 ?
-- "div_2si" : "div_2ui", i, prec, k,
-- mpfr_print_rnd_mode ((mpfr_rnd_t) rnd));
-- printf ("Expected ");
-- mpfr_out_str (stdout, 16, 0, z1, MPFR_RNDN);
-- printf (", inex = %d, flags = %u\n", SIGN (inex1), flags1);
-- printf ("Got ");
-- mpfr_out_str (stdout, 16, 0, z2, MPFR_RNDN);
-- printf (", inex = %d, flags = %u\n", SIGN (inex2), flags2);
-- exit (1);
-- } /* div */
-- } /* k */
-- mpfr_clears (z1, z2, (mpfr_ptr) 0);
-- } /* prec */
-- } /* i */
-+ /* Do not use mpfr_div_ui to avoid the optimization
-+ by mpfr_div_2si. */
-+ inex1 = mpfr_div (z1, y, z1, (mpfr_rnd_t) rnd);
-+ flags1 = __gmpfr_flags;
-+
-+ for (div = 0; div <= 2; div++)
-+ {
-+ mpfr_clear_flags ();
-+ inex2 =
-+ div == 0 ?
-+ mpfr_mul_2si (z2, x, e - k, (mpfr_rnd_t) rnd) :
-+ div == 1 ?
-+ mpfr_div_2si (z2, x, k - e, (mpfr_rnd_t) rnd) :
-+ mpfr_div_2ui (z2, x, k - e, (mpfr_rnd_t) rnd);
-+ flags2 = __gmpfr_flags;
-+ if (flags1 == flags2 && SAME_SIGN (inex1, inex2) &&
-+ mpfr_equal_p (z1, z2))
-+ continue;
-+ printf ("Error in underflow(");
-+ if (e == MPFR_EMIN_MIN)
-+ printf ("MPFR_EMIN_MIN");
-+ else if (e == emin)
-+ printf ("default emin");
-+ else if (e >= LONG_MIN)
-+ printf ("%ld", (long) e);
-+ else
-+ printf ("<LONG_MIN");
-+ printf (") with mpfr_%s,\nx = %d/16, prec = %d, k = %d,"
-+ " %s\n", div == 0 ? "mul_2si" : div == 1 ?
-+ "div_2si" : "div_2ui", s * i, prec, k,
-+ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd));
-+ printf ("Expected ");
-+ mpfr_out_str (stdout, 16, 0, z1, MPFR_RNDN);
-+ printf (", inex = %d, flags = %u\n",
-+ SIGN (inex1), flags1);
-+ printf ("Got ");
-+ mpfr_out_str (stdout, 16, 0, z2, MPFR_RNDN);
-+ printf (", inex = %d, flags = %u\n",
-+ SIGN (inex2), flags2);
-+ exit (1);
-+ } /* div */
-+ } /* k */
-+ mpfr_clears (z1, z2, (mpfr_ptr) 0);
-+ } /* prec */
-+ } /* i */
- mpfr_clears (x, y, (mpfr_ptr) 0);
- set_emin (emin);
- }
diff --git a/packages/mpfr/3.1.3/140-frexp.patch b/packages/mpfr/3.1.3/140-frexp.patch
deleted file mode 100644
index e0d5e09..0000000
--- a/packages/mpfr/3.1.3/140-frexp.patch
+++ /dev/null
@@ -1,204 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2015-07-17 08:58:21.094987384 +0000
-+++ mpfr-3.1.3-b/PATCHES 2015-07-17 08:58:21.118986898 +0000
-@@ -0,0 +1 @@
-+frexp
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2015-07-17 08:54:48.616811495 +0000
-+++ mpfr-3.1.3-b/VERSION 2015-07-17 08:58:21.118986898 +0000
-@@ -1 +1 @@
--3.1.3-p3
-+3.1.3-p4
-diff -Naurd mpfr-3.1.3-a/src/frexp.c mpfr-3.1.3-b/src/frexp.c
---- mpfr-3.1.3-a/src/frexp.c 2015-06-19 19:55:09.000000000 +0000
-+++ mpfr-3.1.3-b/src/frexp.c 2015-07-17 08:58:21.106987142 +0000
-@@ -26,6 +26,13 @@
- mpfr_frexp (mpfr_exp_t *exp, mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd)
- {
- int inex;
-+ unsigned int saved_flags = __gmpfr_flags;
-+ MPFR_BLOCK_DECL (flags);
-+
-+ MPFR_LOG_FUNC
-+ (("x[%Pu]=%.*Rg rnd=%d", mpfr_get_prec (x), mpfr_log_prec, x, rnd),
-+ ("y[%Pu]=%.*Rg exp=%" MPFR_EXP_FSPEC "d inex=%d", mpfr_get_prec (y),
-+ mpfr_log_prec, y, (mpfr_eexp_t) *exp, inex));
-
- if (MPFR_UNLIKELY(MPFR_IS_SINGULAR(x)))
- {
-@@ -49,8 +56,32 @@
- }
- }
-
-- inex = mpfr_set (y, x, rnd);
-+ MPFR_BLOCK (flags, inex = mpfr_set (y, x, rnd));
-+ __gmpfr_flags = saved_flags;
-+
-+ /* Possible overflow due to the rounding, no possible underflow. */
-+
-+ if (MPFR_UNLIKELY (MPFR_OVERFLOW (flags)))
-+ {
-+ int inex2;
-+
-+ /* An overflow here means that the exponent of y would be larger than
-+ the one of x, thus x would be rounded to the next power of 2, and
-+ the returned y should be 1/2 in absolute value, rounded (i.e. with
-+ possible underflow or overflow). This also implies that x and y are
-+ different objects, so that the exponent of x has not been lost. */
-+ MPFR_LOG_MSG (("Internal overflow\n", 0));
-+ MPFR_ASSERTD (x != y);
-+ *exp = MPFR_GET_EXP (x) + 1;
-+ inex2 = mpfr_set_si_2exp (y, MPFR_INT_SIGN (x), -1, rnd);
-+ MPFR_LOG_MSG (("inex=%d inex2=%d\n", inex, inex2));
-+ if (inex2 != 0)
-+ inex = inex2;
-+ MPFR_RET (inex);
-+ }
-+
- *exp = MPFR_GET_EXP (y);
-- MPFR_SET_EXP (y, 0);
-+ /* Do not use MPFR_SET_EXP because the range has not been checked yet. */
-+ MPFR_EXP (y) = 0;
- return mpfr_check_range (y, inex, rnd);
- }
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2015-07-17 08:54:48.616811495 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2015-07-17 08:58:21.114986979 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p3"
-+#define MPFR_VERSION_STRING "3.1.3-p4"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2015-07-17 08:54:48.616811495 +0000
-+++ mpfr-3.1.3-b/src/version.c 2015-07-17 08:58:21.118986898 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p3";
-+ return "3.1.3-p4";
- }
-diff -Naurd mpfr-3.1.3-a/tests/tfrexp.c mpfr-3.1.3-b/tests/tfrexp.c
---- mpfr-3.1.3-a/tests/tfrexp.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tfrexp.c 2015-07-17 08:58:21.106987142 +0000
-@@ -129,12 +129,115 @@
- mpfr_clear (x);
- }
-
-+static void check1 (void)
-+{
-+ mpfr_exp_t emin, emax, e;
-+ mpfr_t x, y1, y2;
-+ int r, neg, red;
-+
-+ emin = mpfr_get_emin ();
-+ emax = mpfr_get_emax ();
-+ set_emin (MPFR_EMIN_MIN);
-+ set_emax (MPFR_EMAX_MAX);
-+
-+ mpfr_init2 (x, 7);
-+ mpfr_inits2 (4, y1, y2, (mpfr_ptr) 0);
-+
-+ mpfr_set_ui_2exp (x, 1, -2, MPFR_RNDN);
-+ while (mpfr_regular_p (x))
-+ {
-+ /* Test the exponents up to 3 and with the maximum exponent
-+ (to check potential intermediate overflow). */
-+ if (MPFR_GET_EXP (x) == 4)
-+ mpfr_set_exp (x, MPFR_EMAX_MAX);
-+ e = MPFR_GET_EXP (x);
-+ for (neg = 0; neg < 2; neg++)
-+ {
-+ RND_LOOP (r)
-+ {
-+ int inex1, inex2;
-+ mpfr_exp_t e1, e2;
-+ unsigned int flags1, flags2;
-+
-+ for (red = 0; red < 2; red++)
-+ {
-+ if (red)
-+ {
-+ /* e1: exponent of the rounded value of x. */
-+ MPFR_ASSERTN (e1 == e || e1 == e + 1);
-+ set_emin (e);
-+ set_emax (e);
-+ mpfr_clear_flags ();
-+ inex1 = e1 < 0 ?
-+ mpfr_mul_2ui (y1, x, -e1, (mpfr_rnd_t) r) :
-+ mpfr_div_2ui (y1, x, e1, (mpfr_rnd_t) r);
-+ flags1 = __gmpfr_flags;
-+ }
-+ else
-+ {
-+ inex1 = mpfr_set (y1, x, (mpfr_rnd_t) r);
-+ e1 = MPFR_IS_INF (y1) ? e + 1 : MPFR_GET_EXP (y1);
-+ flags1 = inex1 != 0 ? MPFR_FLAGS_INEXACT : 0;
-+ }
-+ mpfr_clear_flags ();
-+ inex2 = mpfr_frexp (&e2, y2, x, (mpfr_rnd_t) r);
-+ flags2 = __gmpfr_flags;
-+ set_emin (MPFR_EMIN_MIN);
-+ set_emax (MPFR_EMAX_MAX);
-+ if ((!red || e == 0) &&
-+ (! mpfr_regular_p (y2) || MPFR_GET_EXP (y2) != 0))
-+ {
-+ printf ("Error in check1 for %s, red = %d, x = ",
-+ mpfr_print_rnd_mode ((mpfr_rnd_t) r), red);
-+ mpfr_dump (x);
-+ printf ("Expected 1/2 <= |y| < 1, got y = ");
-+ mpfr_dump (y2);
-+ exit (1);
-+ }
-+ if (!red)
-+ {
-+ if (e2 > 0)
-+ mpfr_mul_2ui (y2, y2, e2, MPFR_RNDN);
-+ else if (e2 < 0)
-+ mpfr_div_2ui (y2, y2, -e2, MPFR_RNDN);
-+ }
-+ if (! (SAME_SIGN (inex1, inex2) &&
-+ mpfr_equal_p (y1, y2) &&
-+ flags1 == flags2))
-+ {
-+ printf ("Error in check1 for %s, red = %d, x = ",
-+ mpfr_print_rnd_mode ((mpfr_rnd_t) r), red);
-+ mpfr_dump (x);
-+ printf ("Expected y1 = ");
-+ mpfr_dump (y1);
-+ printf ("Got y2 = ");
-+ mpfr_dump (y2);
-+ printf ("Expected inex ~= %d, got %d\n", inex1, inex2);
-+ printf ("Expected flags:");
-+ flags_out (flags1);
-+ printf ("Got flags: ");
-+ flags_out (flags2);
-+ exit (1);
-+ }
-+ }
-+ }
-+ mpfr_neg (x, x, MPFR_RNDN);
-+ }
-+ mpfr_nextabove (x);
-+ }
-+
-+ mpfr_clears (x, y1, y2, (mpfr_ptr) 0);
-+ set_emin (emin);
-+ set_emax (emax);
-+}
-+
- int
- main (int argc, char *argv[])
- {
- tests_start_mpfr ();
-
- check_special ();
-+ check1 ();
-
- tests_end_mpfr ();
- return 0;
diff --git a/packages/mpfr/3.1.3/150-divhigh-basecase.patch b/packages/mpfr/3.1.3/150-divhigh-basecase.patch
deleted file mode 100644
index ef8d891..0000000
--- a/packages/mpfr/3.1.3/150-divhigh-basecase.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2015-10-29 13:47:46.735901185 +0000
-+++ mpfr-3.1.3-b/PATCHES 2015-10-29 13:47:46.763900609 +0000
-@@ -0,0 +1 @@
-+divhigh-basecase
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2015-07-17 08:58:21.118986898 +0000
-+++ mpfr-3.1.3-b/VERSION 2015-10-29 13:47:46.763900609 +0000
-@@ -1 +1 @@
--3.1.3-p4
-+3.1.3-p5
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2015-07-17 08:58:21.114986979 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2015-10-29 13:47:46.759900692 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p4"
-+#define MPFR_VERSION_STRING "3.1.3-p5"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/mulders.c mpfr-3.1.3-b/src/mulders.c
---- mpfr-3.1.3-a/src/mulders.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/mulders.c 2015-10-29 13:47:46.751900855 +0000
-@@ -236,9 +236,10 @@
- that in addition to the limb np[n-1] to reduce, we have at least 2
- extra limbs, thus accessing np[n-3] is valid. */
-
-- /* warning: we can have np[n-1]=d1 and np[n-2]=d0, but since {np,n} < D,
-- the largest possible partial quotient is B-1 */
-- if (MPFR_UNLIKELY(np[n - 1] == d1 && np[n - 2] == d0))
-+ /* Warning: we can have np[n-1]>d1 or (np[n-1]=d1 and np[n-2]>=d0) here,
-+ since we truncate the divisor at each step, but since {np,n} < D
-+ originally, the largest possible partial quotient is B-1. */
-+ if (MPFR_UNLIKELY(np[n-1] > d1 || (np[n-1] == d1 && np[n-2] >= d0)))
- q2 = ~ (mp_limb_t) 0;
- else
- udiv_qr_3by2 (q2, q1, q0, np[n - 1], np[n - 2], np[n - 3],
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2015-07-17 08:58:21.118986898 +0000
-+++ mpfr-3.1.3-b/src/version.c 2015-10-29 13:47:46.763900609 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p4";
-+ return "3.1.3-p5";
- }
-diff -Naurd mpfr-3.1.3-a/tests/tdiv.c mpfr-3.1.3-b/tests/tdiv.c
---- mpfr-3.1.3-a/tests/tdiv.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tdiv.c 2015-10-29 13:47:46.751900855 +0000
-@@ -1099,6 +1099,69 @@
- mpfr_set_emax (old_emax);
- }
-
-+/* Bug in mpfr_divhigh_n_basecase when all limbs of q (except the most
-+ significant one) are B-1 where B=2^GMP_NUMB_BITS. Since we truncate
-+ the divisor at each step, it might happen at some point that
-+ (np[n-1],np[n-2]) > (d1,d0), and not only the equality.
-+ Reported by Ricky Farr
-+ <https://sympa.inria.fr/sympa/arc/mpfr/2015-10/msg00023.html>
-+ To get a failure, a MPFR_DIVHIGH_TAB entry below the MPFR_DIV_THRESHOLD
-+ limit must have a value 0. With most mparam.h files, this cannot occur. */
-+static void
-+test_20151023 (void)
-+{
-+ mpfr_prec_t p;
-+ mpfr_t n, d, q, q0;
-+ int inex, i;
-+
-+ for (p = GMP_NUMB_BITS; p <= 2000; p++)
-+ {
-+ mpfr_init2 (n, 2*p);
-+ mpfr_init2 (d, p);
-+ mpfr_init2 (q, p);
-+ mpfr_init2 (q0, GMP_NUMB_BITS);
-+
-+ /* generate a random divisor of p bits */
-+ mpfr_urandomb (d, RANDS);
-+ /* generate a random quotient of GMP_NUMB_BITS bits */
-+ mpfr_urandomb (q0, RANDS);
-+ /* zero-pad the quotient to p bits */
-+ inex = mpfr_prec_round (q0, p, MPFR_RNDN);
-+ MPFR_ASSERTN(inex == 0);
-+
-+ for (i = 0; i < 3; i++)
-+ {
-+ /* i=0: try with the original quotient xxx000...000
-+ i=1: try with the original quotient minus one ulp
-+ i=2: try with the original quotient plus one ulp */
-+ if (i == 1)
-+ mpfr_nextbelow (q0);
-+ else if (i == 2)
-+ {
-+ mpfr_nextabove (q0);
-+ mpfr_nextabove (q0);
-+ }
-+
-+ inex = mpfr_mul (n, d, q0, MPFR_RNDN);
-+ MPFR_ASSERTN(inex == 0);
-+ mpfr_nextabove (n);
-+ mpfr_div (q, n, d, MPFR_RNDN);
-+ MPFR_ASSERTN(mpfr_cmp (q, q0) == 0);
-+
-+ inex = mpfr_mul (n, d, q0, MPFR_RNDN);
-+ MPFR_ASSERTN(inex == 0);
-+ mpfr_nextbelow (n);
-+ mpfr_div (q, n, d, MPFR_RNDN);
-+ MPFR_ASSERTN(mpfr_cmp (q, q0) == 0);
-+ }
-+
-+ mpfr_clear (n);
-+ mpfr_clear (d);
-+ mpfr_clear (q);
-+ mpfr_clear (q0);
-+ }
-+}
-+
- #define TEST_FUNCTION test_div
- #define TWO_ARGS
- #define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS)
-@@ -1219,6 +1282,7 @@
- consistency ();
- test_20070603 ();
- test_20070628 ();
-+ test_20151023 ();
- test_generic (2, 800, 50);
- test_extreme ();
-
diff --git a/packages/mpfr/3.1.3/160-jn.patch b/packages/mpfr/3.1.3/160-jn.patch
deleted file mode 100644
index e7d04fa..0000000
--- a/packages/mpfr/3.1.3/160-jn.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2016-02-15 15:10:03.358066124 +0000
-+++ mpfr-3.1.3-b/PATCHES 2016-02-15 15:10:03.414066216 +0000
-@@ -0,0 +1 @@
-+jn
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2015-10-29 13:47:46.763900609 +0000
-+++ mpfr-3.1.3-b/VERSION 2016-02-15 15:10:03.414066216 +0000
-@@ -1 +1 @@
--3.1.3-p5
-+3.1.3-p6
-diff -Naurd mpfr-3.1.3-a/src/jyn_asympt.c mpfr-3.1.3-b/src/jyn_asympt.c
---- mpfr-3.1.3-a/src/jyn_asympt.c 2015-06-19 19:55:09.000000000 +0000
-+++ mpfr-3.1.3-b/src/jyn_asympt.c 2016-02-15 15:10:03.394066183 +0000
-@@ -253,9 +253,9 @@
- break;
- if (diverge != 0)
- {
-- mpfr_set (c, z, r); /* will force inex=0 below, which means the
-- asymptotic expansion failed */
-- break;
-+ MPFR_ZIV_FREE (loop);
-+ mpfr_clear (c);
-+ return 0; /* means that the asymptotic expansion failed */
- }
- MPFR_ZIV_NEXT (loop, w);
- }
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2015-10-29 13:47:46.759900692 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-15 15:10:03.410066210 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p5"
-+#define MPFR_VERSION_STRING "3.1.3-p6"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2015-10-29 13:47:46.763900609 +0000
-+++ mpfr-3.1.3-b/src/version.c 2016-02-15 15:10:03.414066216 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p5";
-+ return "3.1.3-p6";
- }
-diff -Naurd mpfr-3.1.3-a/tests/tj0.c mpfr-3.1.3-b/tests/tj0.c
---- mpfr-3.1.3-a/tests/tj0.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tj0.c 2016-02-15 15:10:03.394066183 +0000
-@@ -99,6 +99,18 @@
- mpfr_j0 (y, x, MPFR_RNDN);
- MPFR_ASSERTN (! mpfr_nan_p (y) && mpfr_cmp_ui_2exp (y, 41, -11) == 0);
-
-+ /* Bug reported by Fredrik Johansson on 19 Jan 2016 */
-+ mpfr_set_prec (x, 53);
-+ mpfr_set_str (x, "0x4.3328p+0", 0, MPFR_RNDN);
-+ mpfr_set_prec (y, 2);
-+ mpfr_j0 (y, x, MPFR_RNDD);
-+ /* y should be -0.5 */
-+ MPFR_ASSERTN (! mpfr_nan_p (y) && mpfr_cmp_si_2exp (y, -1, -1) == 0);
-+ mpfr_set_prec (y, 3);
-+ mpfr_j0 (y, x, MPFR_RNDD);
-+ /* y should be -0.4375 */
-+ MPFR_ASSERTN (! mpfr_nan_p (y) && mpfr_cmp_si_2exp (y, -7, -4) == 0);
-+
- /* Case for which s = 0 in mpfr_jn */
- mpfr_set_prec (x, 44);
- mpfr_set_prec (y, 44);
diff --git a/packages/mpfr/3.1.3/170-zeta.patch b/packages/mpfr/3.1.3/170-zeta.patch
deleted file mode 100644
index 12faf1d..0000000
--- a/packages/mpfr/3.1.3/170-zeta.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2016-02-15 15:11:00.898156344 +0000
-+++ mpfr-3.1.3-b/PATCHES 2016-02-15 15:11:00.966156445 +0000
-@@ -0,0 +1 @@
-+zeta
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2016-02-15 15:10:03.414066216 +0000
-+++ mpfr-3.1.3-b/VERSION 2016-02-15 15:11:00.966156445 +0000
-@@ -1 +1 @@
--3.1.3-p6
-+3.1.3-p7
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2016-02-15 15:10:03.410066210 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-15 15:11:00.962156439 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p6"
-+#define MPFR_VERSION_STRING "3.1.3-p7"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2016-02-15 15:10:03.414066216 +0000
-+++ mpfr-3.1.3-b/src/version.c 2016-02-15 15:11:00.966156445 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p6";
-+ return "3.1.3-p7";
- }
-diff -Naurd mpfr-3.1.3-a/src/zeta.c mpfr-3.1.3-b/src/zeta.c
---- mpfr-3.1.3-a/src/zeta.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/zeta.c 2016-02-15 15:11:00.942156410 +0000
-@@ -377,8 +377,8 @@
- }
- }
-
-- /* Check for case s= 1 before changing the exponent range */
-- if (mpfr_cmp (s, __gmpfr_one) ==0)
-+ /* Check for case s=1 before changing the exponent range */
-+ if (mpfr_cmp (s, __gmpfr_one) == 0)
- {
- MPFR_SET_INF (z);
- MPFR_SET_POS (z);
-@@ -420,7 +420,7 @@
- MPFR_ZIV_INIT (loop, prec1);
- for (;;)
- {
-- mpfr_sub (s1, __gmpfr_one, s, MPFR_RNDN);/* s1 = 1-s */
-+ mpfr_sub (s1, __gmpfr_one, s, MPFR_RNDN); /* s1 = 1-s */
- mpfr_zeta_pos (z_pre, s1, MPFR_RNDN); /* zeta(1-s) */
- mpfr_gamma (y, s1, MPFR_RNDN); /* gamma(1-s) */
- if (MPFR_IS_INF (y)) /* Zeta(s) < 0 for -4k-2 < s < -4k,
-@@ -432,17 +432,32 @@
- break;
- }
- mpfr_mul (z_pre, z_pre, y, MPFR_RNDN); /* gamma(1-s)*zeta(1-s) */
-- mpfr_const_pi (p, MPFR_RNDD);
-- mpfr_mul (y, s, p, MPFR_RNDN);
-- mpfr_div_2ui (y, y, 1, MPFR_RNDN); /* s*Pi/2 */
-- mpfr_sin (y, y, MPFR_RNDN); /* sin(Pi*s/2) */
-- mpfr_mul (z_pre, z_pre, y, MPFR_RNDN);
-+
-+ mpfr_const_pi (p, MPFR_RNDD); /* p is Pi */
-+
-+ /* multiply z_pre by 2^s*Pi^(s-1) where p=Pi, s1=1-s */
- mpfr_mul_2ui (y, p, 1, MPFR_RNDN); /* 2*Pi */
- mpfr_neg (s1, s1, MPFR_RNDN); /* s-1 */
- mpfr_pow (y, y, s1, MPFR_RNDN); /* (2*Pi)^(s-1) */
- mpfr_mul (z_pre, z_pre, y, MPFR_RNDN);
- mpfr_mul_2ui (z_pre, z_pre, 1, MPFR_RNDN);
-
-+ /* multiply z_pre by sin(Pi*s/2) */
-+ mpfr_mul (y, s, p, MPFR_RNDN);
-+ mpfr_div_2ui (p, y, 1, MPFR_RNDN); /* p = s*Pi/2 */
-+ mpfr_sin (y, p, MPFR_RNDN); /* y = sin(Pi*s/2) */
-+ if (MPFR_GET_EXP(y) < 0) /* take account of cancellation in sin(p) */
-+ {
-+ mpfr_t t;
-+ mpfr_init2 (t, prec1 - MPFR_GET_EXP(y));
-+ mpfr_const_pi (t, MPFR_RNDD);
-+ mpfr_mul (t, s, t, MPFR_RNDN);
-+ mpfr_div_2ui (t, t, 1, MPFR_RNDN);
-+ mpfr_sin (y, t, MPFR_RNDN);
-+ mpfr_clear (t);
-+ }
-+ mpfr_mul (z_pre, z_pre, y, MPFR_RNDN);
-+
- if (MPFR_LIKELY (MPFR_CAN_ROUND (z_pre, prec1 - add, precz,
- rnd_mode)))
- break;
-diff -Naurd mpfr-3.1.3-a/tests/tzeta.c mpfr-3.1.3-b/tests/tzeta.c
---- mpfr-3.1.3-a/tests/tzeta.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tzeta.c 2016-02-15 15:11:00.942156410 +0000
-@@ -394,6 +394,27 @@
- mpfr_nextabove (s);
- MPFR_ASSERTN (mpfr_equal_p (z, s) && inex > 0);
-
-+ /* bug reported by Fredrik Johansson on 19 Jan 2016 */
-+ mpfr_set_prec (s, 536);
-+ mpfr_set_ui_2exp (s, 1, -424, MPFR_RNDN);
-+ mpfr_sub_ui (s, s, 128, MPFR_RNDN); /* -128 + 2^(-424) */
-+ for (prec = 6; prec <= 536; prec += 8) /* should go through 318 */
-+ {
-+ mpfr_set_prec (z, prec);
-+ mpfr_zeta (z, s, MPFR_RNDD);
-+ mpfr_set_prec (y, prec + 10);
-+ mpfr_zeta (y, s, MPFR_RNDD);
-+ mpfr_prec_round (y, prec, MPFR_RNDD);
-+ if (! mpfr_equal_p (z, y))
-+ {
-+ printf ("mpfr_zeta fails near -128 for inprec=%lu outprec=%lu\n",
-+ (unsigned long) mpfr_get_prec (s), (unsigned long) prec);
-+ printf ("expected "); mpfr_dump (y);
-+ printf ("got "); mpfr_dump (z);
-+ exit (1);
-+ }
-+ }
-+
- mpfr_clear (s);
- mpfr_clear (y);
- mpfr_clear (z);
diff --git a/packages/mpfr/3.1.3/180-sqrt.patch b/packages/mpfr/3.1.3/180-sqrt.patch
deleted file mode 100644
index 4887009..0000000
--- a/packages/mpfr/3.1.3/180-sqrt.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2016-02-15 15:12:59.450314624 +0000
-+++ mpfr-3.1.3-b/PATCHES 2016-02-15 15:12:59.510314695 +0000
-@@ -0,0 +1 @@
-+sqrt
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2016-02-15 15:11:00.966156445 +0000
-+++ mpfr-3.1.3-b/VERSION 2016-02-15 15:12:59.510314695 +0000
-@@ -1 +1 @@
--3.1.3-p7
-+3.1.3-p8
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2016-02-15 15:11:00.962156439 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-15 15:12:59.510314695 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p7"
-+#define MPFR_VERSION_STRING "3.1.3-p8"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/sqrt.c mpfr-3.1.3-b/src/sqrt.c
---- mpfr-3.1.3-a/src/sqrt.c 2015-06-19 19:55:09.000000000 +0000
-+++ mpfr-3.1.3-b/src/sqrt.c 2016-02-15 15:12:59.490314671 +0000
-@@ -211,10 +211,11 @@
- rsize --;
- sh = 0;
- }
-+ /* now rsize = MPFR_LIMB_SIZE(r) */
- if (mpn_add_1 (rp0, rp, rsize, MPFR_LIMB_ONE << sh))
- {
- expr ++;
-- rp[rsize - 1] = MPFR_LIMB_HIGHBIT;
-+ rp0[rsize - 1] = MPFR_LIMB_HIGHBIT;
- }
- goto end;
-
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2016-02-15 15:11:00.966156445 +0000
-+++ mpfr-3.1.3-b/src/version.c 2016-02-15 15:12:59.510314695 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p7";
-+ return "3.1.3-p8";
- }
-diff -Naurd mpfr-3.1.3-a/tests/tsqrt.c mpfr-3.1.3-b/tests/tsqrt.c
---- mpfr-3.1.3-a/tests/tsqrt.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tsqrt.c 2016-02-15 15:12:59.490314671 +0000
-@@ -569,6 +569,35 @@
- mpfr_clear (y);
- }
-
-+/* Bug reported by Fredrik Johansson, occurring when:
-+ - the precision of the result is a multiple of the number of bits
-+ per word (GMP_NUMB_BITS),
-+ - the rounding mode is to nearest (MPFR_RNDN),
-+ - internally, the result has to be rounded up to a power of 2.
-+*/
-+static void
-+bug20160120 (void)
-+{
-+ mpfr_t x, y;
-+
-+ mpfr_init2 (x, 4 * GMP_NUMB_BITS);
-+ mpfr_init2 (y, GMP_NUMB_BITS);
-+
-+ mpfr_set_ui (x, 1, MPFR_RNDN);
-+ mpfr_nextbelow (x);
-+ mpfr_sqrt (y, x, MPFR_RNDN);
-+ MPFR_ASSERTN(mpfr_check (y));
-+ MPFR_ASSERTN(mpfr_cmp_ui (y, 1) == 0);
-+
-+ mpfr_set_prec (y, 2 * GMP_NUMB_BITS);
-+ mpfr_sqrt (y, x, MPFR_RNDN);
-+ MPFR_ASSERTN(mpfr_check (y));
-+ MPFR_ASSERTN(mpfr_cmp_ui (y, 1) == 0);
-+
-+ mpfr_clear(x);
-+ mpfr_clear(y);
-+}
-+
- #define TEST_FUNCTION test_sqrt
- #define TEST_RANDOM_POS 8
- #include "tgeneric.c"
-@@ -704,6 +733,8 @@
- data_check ("data/sqrt", mpfr_sqrt, "mpfr_sqrt");
- bad_cases (mpfr_sqrt, mpfr_sqr, "mpfr_sqrt", 8, -256, 255, 4, 128, 800, 50);
-
-+ bug20160120 ();
-+
- tests_end_mpfr ();
- return 0;
- }
diff --git a/packages/mpfr/3.1.3/190-si-ops.patch b/packages/mpfr/3.1.3/190-si-ops.patch
deleted file mode 100644
index e4df233..0000000
--- a/packages/mpfr/3.1.3/190-si-ops.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2016-02-15 15:17:39.214577503 +0000
-+++ mpfr-3.1.3-b/PATCHES 2016-02-15 15:17:39.282577552 +0000
-@@ -0,0 +1 @@
-+si-ops
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2016-02-15 15:12:59.510314695 +0000
-+++ mpfr-3.1.3-b/VERSION 2016-02-15 15:17:39.282577552 +0000
-@@ -1 +1 @@
--3.1.3-p8
-+3.1.3-p9
-diff -Naurd mpfr-3.1.3-a/src/div_ui.c mpfr-3.1.3-b/src/div_ui.c
---- mpfr-3.1.3-a/src/div_ui.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/div_ui.c 2016-02-15 15:17:39.258577534 +0000
-@@ -274,7 +274,8 @@
- res = mpfr_div_ui (y, x, u, rnd_mode);
- else
- {
-- res = -mpfr_div_ui (y, x, -u, MPFR_INVERT_RND (rnd_mode));
-+ res = - mpfr_div_ui (y, x, - (unsigned long) u,
-+ MPFR_INVERT_RND (rnd_mode));
- MPFR_CHANGE_SIGN (y);
- }
- return res;
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2016-02-15 15:12:59.510314695 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-15 15:17:39.282577552 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p8"
-+#define MPFR_VERSION_STRING "3.1.3-p9"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/mul_ui.c mpfr-3.1.3-b/src/mul_ui.c
---- mpfr-3.1.3-a/src/mul_ui.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/mul_ui.c 2016-02-15 15:17:39.258577534 +0000
-@@ -126,7 +126,8 @@
- res = mpfr_mul_ui (y, x, u, rnd_mode);
- else
- {
-- res = -mpfr_mul_ui (y, x, -u, MPFR_INVERT_RND (rnd_mode));
-+ res = - mpfr_mul_ui (y, x, - (unsigned long) u,
-+ MPFR_INVERT_RND (rnd_mode));
- MPFR_CHANGE_SIGN (y);
- }
- return res;
-diff -Naurd mpfr-3.1.3-a/src/si_op.c mpfr-3.1.3-b/src/si_op.c
---- mpfr-3.1.3-a/src/si_op.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/si_op.c 2016-02-15 15:17:39.258577534 +0000
-@@ -30,7 +30,7 @@
- if (u >= 0)
- return mpfr_add_ui (y, x, u, rnd_mode);
- else
-- return mpfr_sub_ui (y, x, -u, rnd_mode);
-+ return mpfr_sub_ui (y, x, - (unsigned long) u, rnd_mode);
- }
-
- int
-@@ -39,7 +39,7 @@
- if (u >= 0)
- return mpfr_sub_ui (y, x, u, rnd_mode);
- else
-- return mpfr_add_ui (y, x, -u, rnd_mode);
-+ return mpfr_add_ui (y, x, - (unsigned long) u, rnd_mode);
- }
-
- int
-@@ -49,9 +49,9 @@
- return mpfr_ui_sub (y, u, x, rnd_mode);
- else
- {
-- int res = -mpfr_add_ui (y, x, -u, MPFR_INVERT_RND (rnd_mode));
-- MPFR_CHANGE_SIGN (y);
-- return res;
-+ int res = - mpfr_add_ui (y, x, - (unsigned long) u,
-+ MPFR_INVERT_RND (rnd_mode));
-+ MPFR_CHANGE_SIGN (y);
-+ return res;
- }
- }
--
-diff -Naurd mpfr-3.1.3-a/src/ui_div.c mpfr-3.1.3-b/src/ui_div.c
---- mpfr-3.1.3-a/src/ui_div.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/ui_div.c 2016-02-15 15:17:39.258577534 +0000
-@@ -106,7 +106,8 @@
- res = mpfr_ui_div (y, u, x, rnd_mode);
- else
- {
-- res = -mpfr_ui_div (y, -u, x, MPFR_INVERT_RND(rnd_mode));
-+ res = - mpfr_ui_div (y, - (unsigned long) u, x,
-+ MPFR_INVERT_RND(rnd_mode));
- MPFR_CHANGE_SIGN (y);
- }
- return res;
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2016-02-15 15:12:59.510314695 +0000
-+++ mpfr-3.1.3-b/src/version.c 2016-02-15 15:17:39.282577552 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p8";
-+ return "3.1.3-p9";
- }
diff --git a/packages/mpfr/3.1.3/200-can_round.patch b/packages/mpfr/3.1.3/200-can_round.patch
deleted file mode 100644
index 6c0f79a..0000000
--- a/packages/mpfr/3.1.3/200-can_round.patch
+++ /dev/null
@@ -1,413 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2016-02-15 15:19:24.210647274 +0000
-+++ mpfr-3.1.3-b/PATCHES 2016-02-15 15:19:24.274647313 +0000
-@@ -0,0 +1 @@
-+can_round
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2016-02-15 15:17:39.282577552 +0000
-+++ mpfr-3.1.3-b/VERSION 2016-02-15 15:19:24.274647313 +0000
-@@ -1 +1 @@
--3.1.3-p9
-+3.1.3-p10
-diff -Naurd mpfr-3.1.3-a/src/div.c mpfr-3.1.3-b/src/div.c
---- mpfr-3.1.3-a/src/div.c 2015-06-19 19:55:09.000000000 +0000
-+++ mpfr-3.1.3-b/src/div.c 2016-02-15 15:19:24.250647299 +0000
-@@ -310,24 +310,23 @@
-
- qp = MPFR_TMP_LIMBS_ALLOC (n);
- qh = mpfr_divhigh_n (qp, ap, bp, n);
-+ MPFR_ASSERTD (qh == 0 || qh == 1);
- /* in all cases, the error is at most (2n+2) ulps on qh*B^n+{qp,n},
- cf algorithms.tex */
-
- p = n * GMP_NUMB_BITS - MPFR_INT_CEIL_LOG2 (2 * n + 2);
-- /* if qh is 1, then we need only PREC(q)-1 bits of {qp,n},
-- if rnd=RNDN, we need to be able to round with a directed rounding
-- and one more bit */
-+ /* If rnd=RNDN, we need to be able to round with a directed rounding
-+ and one more bit. */
-+ if (qh == 1)
-+ {
-+ mpn_rshift (qp, qp, n, 1);
-+ qp[n - 1] |= MPFR_LIMB_HIGHBIT;
-+ }
- if (MPFR_LIKELY (mpfr_round_p (qp, n, p,
-- MPFR_PREC(q) + (rnd_mode == MPFR_RNDN) - qh)))
-+ MPFR_PREC(q) + (rnd_mode == MPFR_RNDN))))
- {
- /* we can round correctly whatever the rounding mode */
-- if (qh == 0)
-- MPN_COPY (q0p, qp + 1, q0size);
-- else
-- {
-- mpn_rshift (q0p, qp + 1, q0size, 1);
-- q0p[q0size - 1] ^= MPFR_LIMB_HIGHBIT;
-- }
-+ MPN_COPY (q0p, qp + 1, q0size);
- q0p[0] &= ~MPFR_LIMB_MASK(sh); /* put to zero low sh bits */
-
- if (rnd_mode == MPFR_RNDN) /* round to nearest */
-@@ -335,15 +334,10 @@
- /* we know we can round, thus we are never in the even rule case:
- if the round bit is 0, we truncate
- if the round bit is 1, we add 1 */
-- if (qh == 0)
-- {
-- if (sh > 0)
-- round_bit = (qp[1] >> (sh - 1)) & 1;
-- else
-- round_bit = qp[0] >> (GMP_NUMB_BITS - 1);
-- }
-- else /* qh = 1 */
-- round_bit = (qp[1] >> sh) & 1;
-+ if (sh > 0)
-+ round_bit = (qp[1] >> (sh - 1)) & 1;
-+ else
-+ round_bit = qp[0] >> (GMP_NUMB_BITS - 1);
- if (round_bit == 0)
- {
- inex = -1;
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2016-02-15 15:17:39.282577552 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-15 15:19:24.270647311 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p9"
-+#define MPFR_VERSION_STRING "3.1.3-p10"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/round_p.c mpfr-3.1.3-b/src/round_p.c
---- mpfr-3.1.3-a/src/round_p.c 2015-06-19 19:55:09.000000000 +0000
-+++ mpfr-3.1.3-b/src/round_p.c 2016-02-15 15:19:24.250647299 +0000
-@@ -31,7 +31,11 @@
- {
- int i1, i2;
-
-+ MPFR_ASSERTN(bp[bn - 1] & MPFR_LIMB_HIGHBIT);
-+
- i1 = mpfr_round_p_2 (bp, bn, err0, prec);
-+
-+ /* compare with mpfr_can_round_raw */
- i2 = mpfr_can_round_raw (bp, bn, MPFR_SIGN_POS, err0,
- MPFR_RNDN, MPFR_RNDZ, prec);
- if (i1 != i2)
-@@ -42,6 +46,7 @@
- gmp_fprintf (stderr, "%NX\n", bp, bn);
- MPFR_ASSERTN (0);
- }
-+
- return i1;
- }
- # define mpfr_round_p mpfr_round_p_2
-@@ -62,6 +67,8 @@
- mp_limb_t tmp, mask;
- int s;
-
-+ MPFR_ASSERTD(bp[bn - 1] & MPFR_LIMB_HIGHBIT);
-+
- err = (mpfr_prec_t) bn * GMP_NUMB_BITS;
- if (MPFR_UNLIKELY (err0 <= 0 || (mpfr_uexp_t) err0 <= prec || prec >= err))
- return 0; /* can't round */
-diff -Naurd mpfr-3.1.3-a/src/round_prec.c mpfr-3.1.3-b/src/round_prec.c
---- mpfr-3.1.3-a/src/round_prec.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/round_prec.c 2016-02-15 15:19:24.250647299 +0000
-@@ -141,24 +141,40 @@
- mpfr_can_round_raw (const mp_limb_t *bp, mp_size_t bn, int neg, mpfr_exp_t err0,
- mpfr_rnd_t rnd1, mpfr_rnd_t rnd2, mpfr_prec_t prec)
- {
-- mpfr_prec_t err;
-+ mpfr_prec_t err, prec0 = prec;
- mp_size_t k, k1, tn;
- int s, s1;
- mp_limb_t cc, cc2;
- mp_limb_t *tmp;
- MPFR_TMP_DECL(marker);
-
-+ MPFR_ASSERTD(bp[bn - 1] & MPFR_LIMB_HIGHBIT);
-+
- if (MPFR_UNLIKELY(err0 < 0 || (mpfr_uexp_t) err0 <= prec))
- return 0; /* can't round */
-- else if (MPFR_UNLIKELY (prec > (mpfr_prec_t) bn * GMP_NUMB_BITS))
-- { /* then ulp(b) < precision < error */
-- return rnd2 == MPFR_RNDN && (mpfr_uexp_t) err0 - 2 >= prec;
-- /* can round only in rounding to the nearest and err0 >= prec + 2 */
-- }
-
- MPFR_ASSERT_SIGN(neg);
- neg = MPFR_IS_NEG_SIGN(neg);
-
-+ /* Transform RNDD and RNDU to Zero / Away */
-+ MPFR_ASSERTD((neg == 0) || (neg == 1));
-+ if (rnd1 != MPFR_RNDN)
-+ rnd1 = MPFR_IS_LIKE_RNDZ(rnd1, neg) ? MPFR_RNDZ : MPFR_RNDA;
-+ if (rnd2 != MPFR_RNDN)
-+ rnd2 = MPFR_IS_LIKE_RNDZ(rnd2, neg) ? MPFR_RNDZ : MPFR_RNDA;
-+
-+ if (MPFR_UNLIKELY (prec > (mpfr_prec_t) bn * GMP_NUMB_BITS))
-+ { /* Then prec < PREC(b): we can round:
-+ (i) in rounding to the nearest iff err0 >= prec + 2
-+ (ii) in directed rounding mode iff rnd1 is compatible with rnd2
-+ and err0 >= prec + 1, unless b = 2^k and rnd1=rnd2=RNDA in
-+ which case we need err0 >= prec + 2. */
-+ if (rnd2 == MPFR_RNDN)
-+ return (mpfr_uexp_t) err0 - 2 >= prec;
-+ else
-+ return (rnd1 == rnd2) && (mpfr_uexp_t) err0 - 2 >= prec;
-+ }
-+
- /* if the error is smaller than ulp(b), then anyway it will propagate
- up to ulp(b) */
- err = ((mpfr_uexp_t) err0 > (mpfr_prec_t) bn * GMP_NUMB_BITS) ?
-@@ -168,19 +184,25 @@
- k = (err - 1) / GMP_NUMB_BITS;
- MPFR_UNSIGNED_MINUS_MODULO(s, err);
- /* the error corresponds to bit s in limb k, the most significant limb
-- being limb 0 */
-+ being limb 0; in memory, limb k is bp[bn-1-k]. */
-
- k1 = (prec - 1) / GMP_NUMB_BITS;
- MPFR_UNSIGNED_MINUS_MODULO(s1, prec);
-- /* the last significant bit is bit s1 in limb k1 */
-+ /* the least significant bit is bit s1 in limb k1 */
-
-- /* don't need to consider the k1 most significant limbs */
-+ /* We don't need to consider the k1 most significant limbs.
-+ They will be considered later only to detect when subtracting
-+ the error bound yields a change of binade.
-+ Warning! The number with updated bn may no longer be normalized. */
- k -= k1;
- bn -= k1;
- prec -= (mpfr_prec_t) k1 * GMP_NUMB_BITS;
-
-- /* if when adding or subtracting (1 << s) in bp[bn-1-k], it does not
-- change bp[bn-1] >> s1, then we can round */
-+ /* We can decide of the correct rounding if rnd2(b-eps) and rnd2(b+eps)
-+ give the same result to the target precision 'prec', i.e., if when
-+ adding or subtracting (1 << s) in bp[bn-1-k], it does not change the
-+ rounding in direction 'rnd2' at ulp-position bp[bn-1] >> s1, taking also
-+ into account the possible change of binade. */
- MPFR_TMP_MARK(marker);
- tn = bn;
- k++; /* since we work with k+1 everywhere */
-@@ -190,11 +212,6 @@
-
- MPFR_ASSERTD (k > 0);
-
-- /* Transform RNDD and RNDU to Zero / Away */
-- MPFR_ASSERTD((neg == 0) || (neg ==1));
-- if (MPFR_IS_RNDUTEST_OR_RNDDNOTTEST(rnd1, neg))
-- rnd1 = MPFR_RNDZ;
--
- switch (rnd1)
- {
- case MPFR_RNDZ:
-@@ -203,33 +220,54 @@
- /* mpfr_round_raw2 returns 1 if one should add 1 at ulp(b,prec),
- and 0 otherwise */
- cc ^= mpfr_round_raw2 (bp, bn, neg, rnd2, prec);
-- /* cc is the new value of bit s1 in bp[bn-1] */
-+ /* cc is the new value of bit s1 in bp[bn-1] after rounding 'rnd2' */
-+
- /* now round b + 2^(MPFR_EXP(b)-err) */
-- cc2 = mpn_add_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s);
-+ mpn_add_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s);
-+ /* if there was a carry here, then necessarily bit s1 of bp[bn-1]
-+ changed, thus we surely cannot round for directed rounding, but this
-+ will be detected below, with cc2 != cc */
- break;
- case MPFR_RNDN:
- /* Round to nearest */
-- /* first round b+2^(MPFR_EXP(b)-err) */
-- cc = mpn_add_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s);
-+
-+ /* first round b+2^(MPFR_EXP(b)-err) */
-+ mpn_add_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s);
-+ /* same remark as above in case a carry occurs in mpn_add_1() */
- cc = (tmp[bn - 1] >> s1) & 1; /* gives 0 when cc=1 */
- cc ^= mpfr_round_raw2 (tmp, bn, neg, rnd2, prec);
-+ /* cc is the new value of bit s1 in bp[bn-1]+eps after rounding 'rnd2' */
-+
-+ subtract_eps:
- /* now round b-2^(MPFR_EXP(b)-err) */
- cc2 = mpn_sub_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s);
-+ /* propagate the potential borrow up to the most significant limb
-+ (it cannot propagate further since the most significant limb is
-+ at least MPFR_LIMB_HIGHBIT) */
-+ for (tn = 0; tn + 1 < k1 && (cc2 != 0); tn ++)
-+ cc2 = bp[bn + tn] == 0;
-+ /* We have an exponent decrease when either:
-+ (i) k1 = 0 and tmp[bn-1] < MPFR_LIMB_HIGHBIT
-+ (ii) k1 > 0 and cc <> 0 and bp[bn + tn] = MPFR_LIMB_HIGHBIT
-+ (then necessarily tn = k1-1).
-+ Then for directed rounding we cannot round,
-+ and for rounding to nearest we cannot round when err = prec + 1.
-+ */
-+ if (((k1 == 0 && tmp[bn - 1] < MPFR_LIMB_HIGHBIT) ||
-+ (k1 != 0 && cc2 != 0 && bp[bn + tn] == MPFR_LIMB_HIGHBIT)) &&
-+ (rnd2 != MPFR_RNDN || err0 == prec0 + 1))
-+ {
-+ MPFR_TMP_FREE(marker);
-+ return 0;
-+ }
- break;
- default:
- /* Round away */
- cc = (bp[bn - 1] >> s1) & 1;
- cc ^= mpfr_round_raw2 (bp, bn, neg, rnd2, prec);
-- /* now round b +/- 2^(MPFR_EXP(b)-err) */
-- cc2 = mpn_sub_1 (tmp + bn - k, bp + bn - k, k, MPFR_LIMB_ONE << s);
-- break;
-- }
-+ /* cc is the new value of bit s1 in bp[bn-1]+eps after rounding 'rnd2' */
-
-- /* if cc2 is 1, then a carry or borrow propagates to the next limb */
-- if (cc2 && cc)
-- {
-- MPFR_TMP_FREE(marker);
-- return 0;
-+ goto subtract_eps;
- }
-
- cc2 = (tmp[bn - 1] >> s1) & 1;
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2016-02-15 15:17:39.282577552 +0000
-+++ mpfr-3.1.3-b/src/version.c 2016-02-15 15:19:24.274647313 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p9";
-+ return "3.1.3-p10";
- }
-diff -Naurd mpfr-3.1.3-a/tests/tcan_round.c mpfr-3.1.3-b/tests/tcan_round.c
---- mpfr-3.1.3-a/tests/tcan_round.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tcan_round.c 2016-02-15 15:19:24.250647299 +0000
-@@ -1,4 +1,4 @@
--/* Test file for mpfr_can_round.
-+/* Test file for mpfr_can_round and mpfr_round_p.
-
- Copyright 1999, 2001-2015 Free Software Foundation, Inc.
- Contributed by the AriC and Caramel projects, INRIA.
-@@ -41,6 +41,8 @@
- /* avoid mpn_random which leaks memory */
- for (i = 0; i < n; i++)
- buf[i] = randlimb ();
-+ /* force the number to be normalized */
-+ buf[n - 1] |= MPFR_LIMB_HIGHBIT;
- p = randlimb() % ((n-1) * GMP_NUMB_BITS) + MPFR_PREC_MIN;
- err = p + randlimb () % GMP_NUMB_BITS;
- r1 = mpfr_round_p (buf, n, err, p);
-@@ -57,11 +59,72 @@
- }
- }
-
-+/* check x=2^i with precision px, error at most 1, and target precision prec */
-+static void
-+test_pow2 (mpfr_exp_t i, mpfr_prec_t px, mpfr_rnd_t r1, mpfr_rnd_t r2,
-+ mpfr_prec_t prec)
-+{
-+ mpfr_t x;
-+ int b, expected_b, b2;
-+
-+ mpfr_init2 (x, px);
-+ mpfr_set_ui_2exp (x, 1, i, MPFR_RNDN);
-+ b = !!mpfr_can_round (x, i+1, r1, r2, prec);
-+ /* Note: If mpfr_can_round succeeds for both
-+ (r1,r2) = (MPFR_RNDD,MPFR_RNDN) and
-+ (r1,r2) = (MPFR_RNDU,MPFR_RNDN), then it should succeed for
-+ (r1,r2) = (MPFR_RNDN,MPFR_RNDN). So, the condition on prec below
-+ for r1 = MPFR_RNDN should be the most restrictive between those
-+ for r1 = any directed rounding mode.
-+ For r1 like MPFR_RNDA, the unrounded, unknown number may be anyone
-+ in [2^i-1,i]. As both 2^i-1 and 2^i fit on i bits, one cannot round
-+ in any precision >= i bits, hence the condition prec < i; prec = i-1
-+ will work here for r2 = MPFR_RNDN thanks to the even-rounding rule
-+ (and also with rounding ties away from zero). */
-+ expected_b =
-+ MPFR_IS_LIKE_RNDD (r1, MPFR_SIGN_POS) ?
-+ (MPFR_IS_LIKE_RNDU (r2, MPFR_SIGN_POS) ? 0 : prec <= i) :
-+ MPFR_IS_LIKE_RNDU (r1, MPFR_SIGN_POS) ?
-+ (MPFR_IS_LIKE_RNDD (r2, MPFR_SIGN_POS) ? 0 : prec < i) :
-+ (r2 != MPFR_RNDN ? 0 : prec < i);
-+ /* We only require mpfr_can_round to return 1 when we can really
-+ round, it is allowed to return 0 in some rare boundary cases,
-+ for example when x = 2^k and the error is 0.25 ulp.
-+ Note: if this changes in the future, the test could be improved by
-+ removing the "&& expected_b == 0" below. */
-+ if (b != expected_b && expected_b == 0)
-+ {
-+ printf ("Error for x=2^%d, px=%lu, err=%d, r1=%s, r2=%s, prec=%d\n",
-+ (int) i, (unsigned long) px, (int) i + 1,
-+ mpfr_print_rnd_mode (r1), mpfr_print_rnd_mode (r2), (int) prec);
-+ printf ("Expected %d, got %d\n", expected_b, b);
-+ exit (1);
-+ }
-+
-+ if (r1 == MPFR_RNDN && r2 == MPFR_RNDZ)
-+ {
-+ /* Similar test to the one done in src/round_p.c
-+ for MPFR_WANT_ASSERT >= 2. */
-+ b2 = !!mpfr_round_p (MPFR_MANT(x), MPFR_LIMB_SIZE(x), i+1, prec);
-+ if (b2 != b)
-+ {
-+ printf ("Error for x=2^%d, px=%lu, err=%d, prec=%d\n",
-+ (int) i, (unsigned long) px, (int) i + 1, (int) prec);
-+ printf ("mpfr_can_round gave %d, mpfr_round_p gave %d\n", b, b2);
-+ exit (1);
-+ }
-+ }
-+
-+ mpfr_clear (x);
-+}
-+
- int
- main (void)
- {
- mpfr_t x;
-- mpfr_prec_t i, j;
-+ mpfr_prec_t i, j, k;
-+ int r1, r2;
-+ int n;
-
- tests_start_mpfr ();
-
-@@ -111,12 +174,30 @@
- mpfr_set_str (x, "0.ff4ca619c76ba69", 16, MPFR_RNDZ);
- for (i = 30; i < 99; i++)
- for (j = 30; j < 99; j++)
-- {
-- int r1, r2;
-- for (r1 = 0; r1 < MPFR_RND_MAX ; r1++)
-- for (r2 = 0; r2 < MPFR_RND_MAX ; r2++)
-- mpfr_can_round (x, i, (mpfr_rnd_t) r1, (mpfr_rnd_t) r2, j); /* test for assertions */
-- }
-+ for (r1 = 0; r1 < MPFR_RND_MAX; r1++)
-+ for (r2 = 0; r2 < MPFR_RND_MAX; r2++)
-+ {
-+ /* test for assertions */
-+ mpfr_can_round (x, i, (mpfr_rnd_t) r1, (mpfr_rnd_t) r2, j);
-+ }
-+
-+ test_pow2 (32, 32, MPFR_RNDN, MPFR_RNDN, 32);
-+ test_pow2 (174, 174, MPFR_RNDN, MPFR_RNDN, 174);
-+ test_pow2 (174, 174, MPFR_RNDU, MPFR_RNDN, 174);
-+ test_pow2 (176, 129, MPFR_RNDU, MPFR_RNDU, 174);
-+ test_pow2 (176, 2, MPFR_RNDZ, MPFR_RNDZ, 174);
-+ test_pow2 (176, 2, MPFR_RNDU, MPFR_RNDU, 176);
-+
-+ /* Tests for x = 2^i (E(x) = i+1) with error at most 1 = 2^0. */
-+ for (n = 0; n < 100; n++)
-+ {
-+ i = (randlimb() % 200) + 4;
-+ for (j = i - 2; j < i + 2; j++)
-+ for (r1 = 0; r1 < MPFR_RND_MAX; r1++)
-+ for (r2 = 0; r2 < MPFR_RND_MAX; r2++)
-+ for (k = MPFR_PREC_MIN; k <= i + 2; k++)
-+ test_pow2 (i, k, (mpfr_rnd_t) r1, (mpfr_rnd_t) r2, j);
-+ }
-
- mpfr_clear (x);
-
diff --git a/packages/mpfr/3.1.3/210-fits.patch b/packages/mpfr/3.1.3/210-fits.patch
deleted file mode 100644
index 888389c..0000000
--- a/packages/mpfr/3.1.3/210-fits.patch
+++ /dev/null
@@ -1,584 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2016-02-15 15:20:16.854677843 +0000
-+++ mpfr-3.1.3-b/PATCHES 2016-02-15 15:20:16.922677881 +0000
-@@ -0,0 +1 @@
-+fits
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2016-02-15 15:19:24.274647313 +0000
-+++ mpfr-3.1.3-b/VERSION 2016-02-15 15:20:16.922677881 +0000
-@@ -1 +1 @@
--3.1.3-p10
-+3.1.3-p11
-diff -Naurd mpfr-3.1.3-a/src/fits_intmax.c mpfr-3.1.3-b/src/fits_intmax.c
---- mpfr-3.1.3-a/src/fits_intmax.c 2015-06-19 19:55:09.000000000 +0000
-+++ mpfr-3.1.3-b/src/fits_intmax.c 2016-02-15 15:20:16.898677867 +0000
-@@ -33,6 +33,7 @@
- int
- mpfr_fits_intmax_p (mpfr_srcptr f, mpfr_rnd_t rnd)
- {
-+ unsigned int saved_flags;
- mpfr_exp_t e;
- int prec;
- mpfr_t x, y;
-@@ -85,6 +86,7 @@
- MPFR_ASSERTD (e == prec);
-
- /* hard case: first round to prec bits, then check */
-+ saved_flags = __gmpfr_flags;
- mpfr_init2 (x, prec);
- mpfr_set (x, f, rnd);
-
-@@ -97,10 +99,16 @@
- }
- else
- {
-- res = MPFR_GET_EXP (x) == e;
-+ /* Warning! Due to the rounding, x can be an infinity. Here we use
-+ the fact that singular numbers have a special exponent field,
-+ thus well-defined and different from e, in which case this means
-+ that the number does not fit. That's why we use MPFR_EXP, not
-+ MPFR_GET_EXP. */
-+ res = MPFR_EXP (x) == e;
- }
-
- mpfr_clear (x);
-+ __gmpfr_flags = saved_flags;
- return res;
- }
-
-diff -Naurd mpfr-3.1.3-a/src/fits_s.h mpfr-3.1.3-b/src/fits_s.h
---- mpfr-3.1.3-a/src/fits_s.h 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/fits_s.h 2016-02-15 15:20:16.898677867 +0000
-@@ -29,6 +29,7 @@
- int
- FUNCTION (mpfr_srcptr f, mpfr_rnd_t rnd)
- {
-+ unsigned int saved_flags;
- mpfr_exp_t e;
- int prec;
- mpfr_t x;
-@@ -81,9 +82,16 @@
- MPFR_ASSERTD (e == prec);
-
- /* hard case: first round to prec bits, then check */
-+ saved_flags = __gmpfr_flags;
- mpfr_init2 (x, prec);
- mpfr_set (x, f, rnd);
-- res = neg ? (mpfr_cmp_si (x, MINIMUM) >= 0) : (MPFR_GET_EXP (x) == e);
-+ /* Warning! Due to the rounding, x can be an infinity. Here we use
-+ the fact that singular numbers have a special exponent field,
-+ thus well-defined and different from e, in which case this means
-+ that the number does not fit. That's why we use MPFR_EXP, not
-+ MPFR_GET_EXP. */
-+ res = neg ? (mpfr_cmp_si (x, MINIMUM) >= 0) : (MPFR_EXP (x) == e);
- mpfr_clear (x);
-+ __gmpfr_flags = saved_flags;
- return res;
- }
-diff -Naurd mpfr-3.1.3-a/src/fits_u.h mpfr-3.1.3-b/src/fits_u.h
---- mpfr-3.1.3-a/src/fits_u.h 2015-06-19 19:55:09.000000000 +0000
-+++ mpfr-3.1.3-b/src/fits_u.h 2016-02-15 15:20:16.898677867 +0000
-@@ -25,6 +25,7 @@
- int
- FUNCTION (mpfr_srcptr f, mpfr_rnd_t rnd)
- {
-+ unsigned int saved_flags;
- mpfr_exp_t e;
- int prec;
- TYPE s;
-@@ -62,9 +63,16 @@
- MPFR_ASSERTD (e == prec);
-
- /* hard case: first round to prec bits, then check */
-+ saved_flags = __gmpfr_flags;
- mpfr_init2 (x, prec);
- mpfr_set (x, f, rnd);
-- res = MPFR_GET_EXP (x) == e;
-+ /* Warning! Due to the rounding, x can be an infinity. Here we use
-+ the fact that singular numbers have a special exponent field,
-+ thus well-defined and different from e, in which case this means
-+ that the number does not fit. That's why we use MPFR_EXP, not
-+ MPFR_GET_EXP. */
-+ res = MPFR_EXP (x) == e;
- mpfr_clear (x);
-+ __gmpfr_flags = saved_flags;
- return res;
- }
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2016-02-15 15:19:24.270647311 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-15 15:20:16.922677881 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p10"
-+#define MPFR_VERSION_STRING "3.1.3-p11"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2016-02-15 15:19:24.274647313 +0000
-+++ mpfr-3.1.3-b/src/version.c 2016-02-15 15:20:16.922677881 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p10";
-+ return "3.1.3-p11";
- }
-diff -Naurd mpfr-3.1.3-a/tests/tfits.c mpfr-3.1.3-b/tests/tfits.c
---- mpfr-3.1.3-a/tests/tfits.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tfits.c 2016-02-15 15:20:16.898677867 +0000
-@@ -33,258 +33,225 @@
- #include "mpfr-intmax.h"
- #include "mpfr-test.h"
-
--#define ERROR1(N) \
-+#define FTEST_AUX(N,NOT,FCT) \
- do \
- { \
-- printf("Error %d for rnd = %s and x = ", N, \
-- mpfr_print_rnd_mode ((mpfr_rnd_t) r)); \
-- mpfr_dump(x); \
-- exit(1); \
-+ __gmpfr_flags = ex_flags; \
-+ if (NOT FCT (x, (mpfr_rnd_t) r)) \
-+ { \
-+ printf ("Error %d for %s, rnd = %s and x = ", \
-+ N, #FCT, \
-+ mpfr_print_rnd_mode ((mpfr_rnd_t) r)); \
-+ mpfr_dump (x); \
-+ exit (1); \
-+ } \
-+ if (__gmpfr_flags != ex_flags) \
-+ { \
-+ unsigned int flags = __gmpfr_flags; \
-+ printf ("Flags error %d for %s, rnd = %s and x = ", \
-+ N, #FCT, \
-+ mpfr_print_rnd_mode ((mpfr_rnd_t) r)); \
-+ mpfr_dump(x); \
-+ printf ("Expected flags:"); \
-+ flags_out (ex_flags); \
-+ printf ("Got flags: "); \
-+ flags_out (flags); \
-+ exit (1); \
-+ } \
- } \
- while (0)
-
--static void check_intmax (void);
-+#define FTEST(N,NOT,FCT) \
-+ do \
-+ { \
-+ mpfr_exp_t e; \
-+ FTEST_AUX (N,NOT,FCT); \
-+ if (MPFR_IS_SINGULAR (x)) \
-+ break; \
-+ e = mpfr_get_exp (x); \
-+ set_emin (e); \
-+ set_emax (e); \
-+ FTEST_AUX (N,NOT,FCT); \
-+ set_emin (emin); \
-+ set_emax (emax); \
-+ } \
-+ while (0)
-+
-+#define CHECK_ALL(N,NOT) \
-+ do \
-+ { \
-+ FTEST (N, NOT, mpfr_fits_ulong_p); \
-+ FTEST (N, NOT, mpfr_fits_slong_p); \
-+ FTEST (N, NOT, mpfr_fits_uint_p); \
-+ FTEST (N, NOT, mpfr_fits_sint_p); \
-+ FTEST (N, NOT, mpfr_fits_ushort_p); \
-+ FTEST (N, NOT, mpfr_fits_sshort_p); \
-+ } \
-+ while (0)
-+
-+#define CHECK_MAX(N,NOT) \
-+ do \
-+ { \
-+ FTEST (N, NOT, mpfr_fits_uintmax_p); \
-+ FTEST (N, NOT, mpfr_fits_intmax_p); \
-+ } \
-+ while (0)
-+
-+/* V is a non-zero limit for the type (*_MIN for a signed type or *_MAX).
-+ * If V is positive, then test V, V + 1/4, V + 3/4 and V + 1.
-+ * If V is negative, then test V, V - 1/4, V - 3/4 and V - 1.
-+ */
-+#define CHECK_LIM(N,V,SET,FCT) \
-+ do \
-+ { \
-+ SET (x, V, MPFR_RNDN); \
-+ FTEST (N, !, FCT); \
-+ mpfr_set_si_2exp (y, (V) < 0 ? -1 : 1, -2, MPFR_RNDN); \
-+ mpfr_add (x, x, y, MPFR_RNDN); \
-+ FTEST (N+1, (r == MPFR_RNDN || \
-+ MPFR_IS_LIKE_RNDZ (r, (V) < 0)) ^ !!, FCT); \
-+ mpfr_add (x, x, y, MPFR_RNDN); \
-+ mpfr_add (x, x, y, MPFR_RNDN); \
-+ FTEST (N+3, MPFR_IS_LIKE_RNDZ (r, (V) < 0) ^ !!, FCT); \
-+ mpfr_add (x, x, y, MPFR_RNDN); \
-+ FTEST (N+4, !!, FCT); \
-+ } \
-+ while (0)
-
- int
- main (void)
- {
-+ mpfr_exp_t emin, emax;
- mpfr_t x, y;
-- int i, r;
-+ unsigned int flags[2] = { 0, MPFR_FLAGS_ALL }, ex_flags;
-+ int i, r, fi;
-
- tests_start_mpfr ();
-
-- mpfr_init2 (x, 256);
-+ emin = mpfr_get_emin ();
-+ emax = mpfr_get_emax ();
-+
-+ mpfr_init2 (x, sizeof (unsigned long) * CHAR_BIT + 2);
- mpfr_init2 (y, 8);
-
- RND_LOOP (r)
-- {
--
-- /* Check NAN */
-- mpfr_set_nan (x);
-- if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (1);
-- if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (2);
-- if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (3);
-- if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (4);
-- if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (5);
-- if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (6);
-+ for (fi = 0; fi < numberof (flags); fi++)
-+ {
-+ ex_flags = flags[fi];
-
-- /* Check INF */
-- mpfr_set_inf (x, 1);
-- if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (7);
-- if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (8);
-- if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (9);
-- if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (10);
-- if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (11);
-- if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (12);
-+ /* Check NaN */
-+ mpfr_set_nan (x);
-+ CHECK_ALL (1, !!);
-
-- /* Check Zero */
-- MPFR_SET_ZERO (x);
-- if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (13);
-- if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (14);
-- if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (15);
-- if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (16);
-- if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (17);
-- if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (18);
-+ /* Check +Inf */
-+ mpfr_set_inf (x, 1);
-+ CHECK_ALL (2, !!);
-
-- /* Check small positive op */
-- mpfr_set_str1 (x, "1@-1");
-- if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (19);
-- if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (20);
-- if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (21);
-- if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (22);
-- if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (23);
-- if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (24);
-+ /* Check -Inf */
-+ mpfr_set_inf (x, -1);
-+ CHECK_ALL (3, !!);
-
-- /* Check 17 */
-- mpfr_set_ui (x, 17, MPFR_RNDN);
-- if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (25);
-- if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (26);
-- if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (27);
-- if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (28);
-- if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (29);
-- if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (30);
-+ /* Check +0 */
-+ mpfr_set_zero (x, 1);
-+ CHECK_ALL (4, !);
-
-- /* Check all other values */
-- mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN);
-- mpfr_mul_2exp (x, x, 1, MPFR_RNDN);
-- if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (31);
-- if (mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (32);
-- mpfr_mul_2exp (x, x, 40, MPFR_RNDN);
-- if (mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (33);
-- if (mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (34);
-- if (mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (35);
-- if (mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (36);
-- if (mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (37);
-+ /* Check -0 */
-+ mpfr_set_zero (x, -1);
-+ CHECK_ALL (5, !);
-
-- mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN);
-- if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (38);
-- mpfr_set_ui (x, LONG_MAX, MPFR_RNDN);
-- if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (39);
-- mpfr_set_ui (x, UINT_MAX, MPFR_RNDN);
-- if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (40);
-- mpfr_set_ui (x, INT_MAX, MPFR_RNDN);
-- if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (41);
-- mpfr_set_ui (x, USHRT_MAX, MPFR_RNDN);
-- if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (42);
-- mpfr_set_ui (x, SHRT_MAX, MPFR_RNDN);
-- if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (43);
-+ /* Check small positive op */
-+ mpfr_set_str1 (x, "1@-1");
-+ CHECK_ALL (6, !);
-
-- mpfr_set_si (x, 1, MPFR_RNDN);
-- if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (44);
-- if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (45);
-+ /* Check 17 */
-+ mpfr_set_ui (x, 17, MPFR_RNDN);
-+ CHECK_ALL (7, !);
-
-- /* Check negative op */
-- for (i = 1; i <= 4; i++)
-- {
-- int inv;
-+ /* Check large values (no fit) */
-+ mpfr_set_ui (x, ULONG_MAX, MPFR_RNDN);
-+ mpfr_mul_2exp (x, x, 1, MPFR_RNDN);
-+ CHECK_ALL (8, !!);
-+ mpfr_mul_2exp (x, x, 40, MPFR_RNDN);
-+ CHECK_ALL (9, !!);
-
-- mpfr_set_si_2exp (x, -i, -2, MPFR_RNDN);
-- mpfr_rint (y, x, (mpfr_rnd_t) r);
-- inv = MPFR_NOTZERO (y);
-- if (!mpfr_fits_ulong_p (x, (mpfr_rnd_t) r) ^ inv)
-- ERROR1 (46);
-- if (!mpfr_fits_slong_p (x, (mpfr_rnd_t) r))
-- ERROR1 (47);
-- if (!mpfr_fits_uint_p (x, (mpfr_rnd_t) r) ^ inv)
-- ERROR1 (48);
-- if (!mpfr_fits_sint_p (x, (mpfr_rnd_t) r))
-- ERROR1 (49);
-- if (!mpfr_fits_ushort_p (x, (mpfr_rnd_t) r) ^ inv)
-- ERROR1 (50);
-- if (!mpfr_fits_sshort_p (x, (mpfr_rnd_t) r))
-- ERROR1 (51);
-- }
-- }
-+ /* Check a non-integer number just below a power of two. */
-+ mpfr_set_ui_2exp (x, 255, -2, MPFR_RNDN);
-+ CHECK_ALL (10, !);
-
-- mpfr_clear (x);
-- mpfr_clear (y);
-+ /* Check the limits of the types (except 0 for unsigned types) */
-+ CHECK_LIM (20, ULONG_MAX, mpfr_set_ui, mpfr_fits_ulong_p);
-+ CHECK_LIM (30, LONG_MAX, mpfr_set_si, mpfr_fits_slong_p);
-+ CHECK_LIM (35, LONG_MIN, mpfr_set_si, mpfr_fits_slong_p);
-+ CHECK_LIM (40, UINT_MAX, mpfr_set_ui, mpfr_fits_uint_p);
-+ CHECK_LIM (50, INT_MAX, mpfr_set_si, mpfr_fits_sint_p);
-+ CHECK_LIM (55, INT_MIN, mpfr_set_si, mpfr_fits_sint_p);
-+ CHECK_LIM (60, USHRT_MAX, mpfr_set_ui, mpfr_fits_ushort_p);
-+ CHECK_LIM (70, SHRT_MAX, mpfr_set_si, mpfr_fits_sshort_p);
-+ CHECK_LIM (75, SHRT_MIN, mpfr_set_si, mpfr_fits_sshort_p);
-
-- check_intmax ();
-+ /* Check negative op */
-+ for (i = 1; i <= 4; i++)
-+ {
-+ int inv;
-
-- tests_end_mpfr ();
-- return 0;
--}
-+ mpfr_set_si_2exp (x, -i, -2, MPFR_RNDN);
-+ mpfr_rint (y, x, (mpfr_rnd_t) r);
-+ inv = MPFR_NOTZERO (y);
-+ FTEST (80, inv ^ !, mpfr_fits_ulong_p);
-+ FTEST (81, !, mpfr_fits_slong_p);
-+ FTEST (82, inv ^ !, mpfr_fits_uint_p);
-+ FTEST (83, !, mpfr_fits_sint_p);
-+ FTEST (84, inv ^ !, mpfr_fits_ushort_p);
-+ FTEST (85, !, mpfr_fits_sshort_p);
-+ }
-+ }
-
--static void
--check_intmax (void)
--{
- #ifdef _MPFR_H_HAVE_INTMAX_T
-- mpfr_t x, y;
-- int i, r;
-
-- mpfr_init2 (x, sizeof (uintmax_t) * CHAR_BIT);
-- mpfr_init2 (y, 8);
-+ mpfr_set_prec (x, sizeof (uintmax_t) * CHAR_BIT + 2);
-
- RND_LOOP (r)
- {
-- /* Check NAN */
-+ /* Check NaN */
- mpfr_set_nan (x);
-- if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (52);
-- if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (53);
-+ CHECK_MAX (1, !!);
-
-- /* Check INF */
-+ /* Check +Inf */
- mpfr_set_inf (x, 1);
-- if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (54);
-- if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (55);
-+ CHECK_MAX (2, !!);
-
-- /* Check Zero */
-- MPFR_SET_ZERO (x);
-- if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (56);
-- if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (57);
-+ /* Check -Inf */
-+ mpfr_set_inf (x, -1);
-+ CHECK_MAX (3, !!);
-
-- /* Check positive small op */
-+ /* Check +0 */
-+ mpfr_set_zero (x, 1);
-+ CHECK_MAX (4, !);
-+
-+ /* Check -0 */
-+ mpfr_set_zero (x, -1);
-+ CHECK_MAX (5, !);
-+
-+ /* Check small positive op */
- mpfr_set_str1 (x, "1@-1");
-- if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (58);
-- if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (59);
-+ CHECK_MAX (6, !);
-
- /* Check 17 */
- mpfr_set_ui (x, 17, MPFR_RNDN);
-- if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (60);
-- if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (61);
-+ CHECK_MAX (7, !);
-
- /* Check hugest */
- mpfr_set_ui_2exp (x, 42, sizeof (uintmax_t) * 32, MPFR_RNDN);
-- if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (62);
-- if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (63);
-+ CHECK_MAX (8, !!);
-
-- /* Check all other values */
-- mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN);
-- mpfr_add_ui (x, x, 1, MPFR_RNDN);
-- if (mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (64);
-- mpfr_set_uj (x, MPFR_UINTMAX_MAX, MPFR_RNDN);
-- if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (65);
-- mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN);
-- mpfr_add_ui (x, x, 1, MPFR_RNDN);
-- if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (66);
-- mpfr_set_sj (x, MPFR_INTMAX_MAX, MPFR_RNDN);
-- if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (67);
-- mpfr_set_sj (x, MPFR_INTMAX_MIN, MPFR_RNDN);
-- if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (68);
-- mpfr_sub_ui (x, x, 1, MPFR_RNDN);
-- if (mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (69);
-+ /* Check a non-integer number just below a power of two. */
-+ mpfr_set_ui_2exp (x, 255, -2, MPFR_RNDN);
-+ CHECK_MAX (10, !);
-+
-+ /* Check the limits of the types (except 0 for uintmax_t) */
-+ CHECK_LIM (20, MPFR_UINTMAX_MAX, mpfr_set_uj, mpfr_fits_uintmax_p);
-+ CHECK_LIM (30, MPFR_INTMAX_MAX, mpfr_set_sj, mpfr_fits_intmax_p);
-+ CHECK_LIM (35, MPFR_INTMAX_MIN, mpfr_set_sj, mpfr_fits_intmax_p);
-
- /* Check negative op */
- for (i = 1; i <= 4; i++)
-@@ -294,14 +261,16 @@
- mpfr_set_si_2exp (x, -i, -2, MPFR_RNDN);
- mpfr_rint (y, x, (mpfr_rnd_t) r);
- inv = MPFR_NOTZERO (y);
-- if (!mpfr_fits_uintmax_p (x, (mpfr_rnd_t) r) ^ inv)
-- ERROR1 (70);
-- if (!mpfr_fits_intmax_p (x, (mpfr_rnd_t) r))
-- ERROR1 (71);
-+ FTEST (80, inv ^ !, mpfr_fits_uintmax_p);
-+ FTEST (81, !, mpfr_fits_intmax_p);
- }
- }
-
-+#endif /* _MPFR_H_HAVE_INTMAX_T */
-+
- mpfr_clear (x);
- mpfr_clear (y);
--#endif
-+
-+ tests_end_mpfr ();
-+ return 0;
- }
diff --git a/packages/mpfr/3.1.3/220-root.patch b/packages/mpfr/3.1.3/220-root.patch
deleted file mode 100644
index 9cd62a7..0000000
--- a/packages/mpfr/3.1.3/220-root.patch
+++ /dev/null
@@ -1,621 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2016-02-15 15:20:51.242696408 +0000
-+++ mpfr-3.1.3-b/PATCHES 2016-02-15 15:20:51.306696441 +0000
-@@ -0,0 +1 @@
-+root
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2016-02-15 15:20:16.922677881 +0000
-+++ mpfr-3.1.3-b/VERSION 2016-02-15 15:20:51.306696441 +0000
-@@ -1 +1 @@
--3.1.3-p11
-+3.1.3-p12
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2016-02-15 15:20:16.922677881 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-15 15:20:51.302696439 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p11"
-+#define MPFR_VERSION_STRING "3.1.3-p12"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/root.c mpfr-3.1.3-b/src/root.c
---- mpfr-3.1.3-a/src/root.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/root.c 2016-02-15 15:20:51.282696429 +0000
-@@ -23,13 +23,15 @@
- #define MPFR_NEED_LONGLONG_H
- #include "mpfr-impl.h"
-
-- /* The computation of y = x^(1/k) is done as follows:
-+ /* The computation of y = x^(1/k) is done as follows, except for large
-+ values of k, for which this would be inefficient or yield internal
-+ integer overflows:
-
- Let x = sign * m * 2^(k*e) where m is an integer
-
- with 2^(k*(n-1)) <= m < 2^(k*n) where n = PREC(y)
-
-- and m = s^k + r where 0 <= r and m < (s+1)^k
-+ and m = s^k + t where 0 <= t and m < (s+1)^k
-
- we want that s has n bits i.e. s >= 2^(n-1), or m >= 2^(k*(n-1))
- i.e. m must have at least k*(n-1)+1 bits
-@@ -38,11 +40,15 @@
- x^(1/k) = s * 2^e or (s+1) * 2^e according to the rounding mode.
- */
-
-+static int
-+mpfr_root_aux (mpfr_ptr y, mpfr_srcptr x, unsigned long k,
-+ mpfr_rnd_t rnd_mode);
-+
- int
- mpfr_root (mpfr_ptr y, mpfr_srcptr x, unsigned long k, mpfr_rnd_t rnd_mode)
- {
- mpz_t m;
-- mpfr_exp_t e, r, sh;
-+ mpfr_exp_t e, r, sh, f;
- mpfr_prec_t n, size_m, tmp;
- int inexact, negative;
- MPFR_SAVE_EXPO_DECL (expo);
-@@ -55,50 +61,27 @@
-
- if (MPFR_UNLIKELY (k <= 1))
- {
-- if (k < 1) /* k==0 => y=x^(1/0)=x^(+Inf) */
--#if 0
-- /* For 0 <= x < 1 => +0.
-- For x = 1 => 1.
-- For x > 1, => +Inf.
-- For x < 0 => NaN.
-- */
-+ if (k == 0)
- {
-- if (MPFR_IS_NEG (x) && !MPFR_IS_ZERO (x))
-- {
-- MPFR_SET_NAN (y);
-- MPFR_RET_NAN;
-- }
-- inexact = mpfr_cmp (x, __gmpfr_one);
-- if (inexact == 0)
-- return mpfr_set_ui (y, 1, rnd_mode); /* 1 may be Out of Range */
-- else if (inexact < 0)
-- return mpfr_set_ui (y, 0, rnd_mode); /* 0+ */
-- else
-- {
-- mpfr_set_inf (y, 1);
-- return 0;
-- }
-+ MPFR_SET_NAN (y);
-+ MPFR_RET_NAN;
- }
--#endif
-- {
-- MPFR_SET_NAN (y);
-- MPFR_RET_NAN;
-- }
-- else /* y =x^(1/1)=x */
-+ else /* y = x^(1/1) = x */
- return mpfr_set (y, x, rnd_mode);
- }
-
- /* Singular values */
-- else if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x)))
-+ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x)))
- {
- if (MPFR_IS_NAN (x))
- {
- MPFR_SET_NAN (y); /* NaN^(1/k) = NaN */
- MPFR_RET_NAN;
- }
-- else if (MPFR_IS_INF (x)) /* +Inf^(1/k) = +Inf
-- -Inf^(1/k) = -Inf if k odd
-- -Inf^(1/k) = NaN if k even */
-+
-+ if (MPFR_IS_INF (x)) /* +Inf^(1/k) = +Inf
-+ -Inf^(1/k) = -Inf if k odd
-+ -Inf^(1/k) = NaN if k even */
- {
- if (MPFR_IS_NEG(x) && (k % 2 == 0))
- {
-@@ -106,27 +89,31 @@
- MPFR_RET_NAN;
- }
- MPFR_SET_INF (y);
-- MPFR_SET_SAME_SIGN (y, x);
-- MPFR_RET (0);
- }
- else /* x is necessarily 0: (+0)^(1/k) = +0
- (-0)^(1/k) = -0 */
- {
- MPFR_ASSERTD (MPFR_IS_ZERO (x));
- MPFR_SET_ZERO (y);
-- MPFR_SET_SAME_SIGN (y, x);
-- MPFR_RET (0);
- }
-+ MPFR_SET_SAME_SIGN (y, x);
-+ MPFR_RET (0);
- }
-
- /* Returns NAN for x < 0 and k even */
-- else if (MPFR_IS_NEG (x) && (k % 2 == 0))
-+ if (MPFR_UNLIKELY (MPFR_IS_NEG (x) && (k % 2 == 0)))
- {
- MPFR_SET_NAN (y);
- MPFR_RET_NAN;
- }
-
- /* General case */
-+
-+ /* For large k, use exp(log(x)/k). The threshold of 100 seems to be quite
-+ good when the precision goes to infinity. */
-+ if (k > 100)
-+ return mpfr_root_aux (y, x, k, rnd_mode);
-+
- MPFR_SAVE_EXPO_MARK (expo);
- mpz_init (m);
-
-@@ -135,31 +122,24 @@
- mpz_neg (m, m);
- r = e % (mpfr_exp_t) k;
- if (r < 0)
-- r += k; /* now r = e (mod k) with 0 <= e < r */
-+ r += k; /* now r = e (mod k) with 0 <= r < k */
-+ MPFR_ASSERTD (0 <= r && r < k);
- /* x = (m*2^r) * 2^(e-r) where e-r is a multiple of k */
-
- MPFR_MPZ_SIZEINBASE2 (size_m, m);
- /* for rounding to nearest, we want the round bit to be in the root */
- n = MPFR_PREC (y) + (rnd_mode == MPFR_RNDN);
-
-- /* we now multiply m by 2^(r+k*sh) so that root(m,k) will give
-- exactly n bits: we want k*(n-1)+1 <= size_m + k*sh + r <= k*n
-- i.e. sh = floor ((kn-size_m-r)/k) */
-- if ((mpfr_exp_t) size_m + r > k * (mpfr_exp_t) n)
-- sh = 0; /* we already have too many bits */
-+ /* we now multiply m by 2^sh so that root(m,k) will give
-+ exactly n bits: we want k*(n-1)+1 <= size_m + sh <= k*n
-+ i.e. sh = k*f + r with f = max(floor((k*n-size_m-r)/k),0) */
-+ if ((mpfr_exp_t) size_m + r >= k * (mpfr_exp_t) n)
-+ f = 0; /* we already have too many bits */
- else
-- sh = (k * (mpfr_exp_t) n - (mpfr_exp_t) size_m - r) / k;
-- sh = k * sh + r;
-- if (sh >= 0)
-- {
-- mpz_mul_2exp (m, m, sh);
-- e = e - sh;
-- }
-- else if (r > 0)
-- {
-- mpz_mul_2exp (m, m, r);
-- e = e - r;
-- }
-+ f = (k * (mpfr_exp_t) n - (mpfr_exp_t) size_m - r) / k;
-+ sh = k * f + r;
-+ mpz_mul_2exp (m, m, sh);
-+ e = e - sh;
-
- /* invariant: x = m*2^e, with e divisible by k */
-
-@@ -203,3 +183,97 @@
- MPFR_SAVE_EXPO_FREE (expo);
- return mpfr_check_range (y, inexact, rnd_mode);
- }
-+
-+/* Compute y <- x^(1/k) using exp(log(x)/k).
-+ Assume all special cases have been eliminated before.
-+ In the extended exponent range, overflows/underflows are not possible.
-+ Assume x > 0, or x < 0 and k odd.
-+*/
-+static int
-+mpfr_root_aux (mpfr_ptr y, mpfr_srcptr x, unsigned long k, mpfr_rnd_t rnd_mode)
-+{
-+ int inexact, exact_root = 0;
-+ mpfr_prec_t w; /* working precision */
-+ mpfr_t absx, t;
-+ MPFR_GROUP_DECL(group);
-+ MPFR_TMP_DECL(marker);
-+ MPFR_ZIV_DECL(loop);
-+ MPFR_SAVE_EXPO_DECL (expo);
-+
-+ MPFR_TMP_INIT_ABS (absx, x);
-+
-+ MPFR_TMP_MARK(marker);
-+ w = MPFR_PREC(y) + 10;
-+ /* Take some guard bits to prepare for the 'expt' lost bits below.
-+ If |x| < 2^k, then log|x| < k, thus taking log2(k) bits should be fine. */
-+ if (MPFR_GET_EXP(x) > 0)
-+ w += MPFR_INT_CEIL_LOG2 (MPFR_GET_EXP(x));
-+ MPFR_GROUP_INIT_1(group, w, t);
-+ MPFR_SAVE_EXPO_MARK (expo);
-+ MPFR_ZIV_INIT (loop, w);
-+ for (;;)
-+ {
-+ mpfr_exp_t expt;
-+ unsigned int err;
-+
-+ mpfr_log (t, absx, MPFR_RNDN);
-+ /* t = log|x| * (1 + theta) with |theta| <= 2^(-w) */
-+ mpfr_div_ui (t, t, k, MPFR_RNDN);
-+ expt = MPFR_GET_EXP (t);
-+ /* t = log|x|/k * (1 + theta) + eps with |theta| <= 2^(-w)
-+ and |eps| <= 1/2 ulp(t), thus the total error is bounded
-+ by 1.5 * 2^(expt - w) */
-+ mpfr_exp (t, t, MPFR_RNDN);
-+ /* t = |x|^(1/k) * exp(tau) * (1 + theta1) with
-+ |tau| <= 1.5 * 2^(expt - w) and |theta1| <= 2^(-w).
-+ For |tau| <= 0.5 we have |exp(tau)-1| < 4/3*tau, thus
-+ for w >= expt + 2 we have:
-+ t = |x|^(1/k) * (1 + 2^(expt+2)*theta2) * (1 + theta1) with
-+ |theta1|, |theta2| <= 2^(-w).
-+ If expt+2 > 0, as long as w >= 1, we have:
-+ t = |x|^(1/k) * (1 + 2^(expt+3)*theta3) with |theta3| < 2^(-w).
-+ For expt+2 = 0, we have:
-+ t = |x|^(1/k) * (1 + 2^2*theta3) with |theta3| < 2^(-w).
-+ Finally for expt+2 < 0 we have:
-+ t = |x|^(1/k) * (1 + 2*theta3) with |theta3| < 2^(-w).
-+ */
-+ err = (expt + 2 > 0) ? expt + 3
-+ : (expt + 2 == 0) ? 2 : 1;
-+ /* now t = |x|^(1/k) * (1 + 2^(err-w)) thus the error is at most
-+ 2^(EXP(t) - w + err) */
-+ if (MPFR_LIKELY (MPFR_CAN_ROUND(t, w - err, MPFR_PREC(y), rnd_mode)))
-+ break;
-+
-+ /* If we fail to round correctly, check for an exact result or a
-+ midpoint result with MPFR_RNDN (regarded as hard-to-round in
-+ all precisions in order to determine the ternary value). */
-+ {
-+ mpfr_t z, zk;
-+
-+ mpfr_init2 (z, MPFR_PREC(y) + (rnd_mode == MPFR_RNDN));
-+ mpfr_init2 (zk, MPFR_PREC(x));
-+ mpfr_set (z, t, MPFR_RNDN);
-+ inexact = mpfr_pow_ui (zk, z, k, MPFR_RNDN);
-+ exact_root = !inexact && mpfr_equal_p (zk, absx);
-+ if (exact_root) /* z is the exact root, thus round z directly */
-+ inexact = mpfr_set4 (y, z, rnd_mode, MPFR_SIGN (x));
-+ mpfr_clear (zk);
-+ mpfr_clear (z);
-+ if (exact_root)
-+ break;
-+ }
-+
-+ MPFR_ZIV_NEXT (loop, w);
-+ MPFR_GROUP_REPREC_1(group, w, t);
-+ }
-+ MPFR_ZIV_FREE (loop);
-+
-+ if (!exact_root)
-+ inexact = mpfr_set4 (y, t, rnd_mode, MPFR_SIGN (x));
-+
-+ MPFR_GROUP_CLEAR(group);
-+ MPFR_TMP_FREE(marker);
-+ MPFR_SAVE_EXPO_FREE (expo);
-+
-+ return mpfr_check_range (y, inexact, rnd_mode);
-+}
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2016-02-15 15:20:16.922677881 +0000
-+++ mpfr-3.1.3-b/src/version.c 2016-02-15 15:20:51.306696441 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p11";
-+ return "3.1.3-p12";
- }
-diff -Naurd mpfr-3.1.3-a/tests/troot.c mpfr-3.1.3-b/tests/troot.c
---- mpfr-3.1.3-a/tests/troot.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/troot.c 2016-02-15 15:20:51.282696429 +0000
-@@ -25,6 +25,19 @@
-
- #include "mpfr-test.h"
-
-+#define DEFN(N) \
-+ static int root##N (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd) \
-+ { return mpfr_root (y, x, N, rnd); } \
-+ static int pow##N (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd) \
-+ { return mpfr_pow_ui (y, x, N, rnd); }
-+
-+DEFN(2)
-+DEFN(3)
-+DEFN(4)
-+DEFN(5)
-+DEFN(17)
-+DEFN(120)
-+
- static void
- special (void)
- {
-@@ -52,7 +65,7 @@
- exit (1);
- }
-
-- /* root(-Inf, 17) = -Inf */
-+ /* root(-Inf, 17) = -Inf */
- mpfr_set_inf (x, -1);
- mpfr_root (y, x, 17, MPFR_RNDN);
- if (!mpfr_inf_p (y) || mpfr_sgn (y) > 0)
-@@ -69,7 +82,7 @@
- exit (1);
- }
-
-- /* root(+/-0) = +/-0 */
-+ /* root(+/-0, k) = +/-0 for k > 0 */
- mpfr_set_ui (x, 0, MPFR_RNDN);
- mpfr_root (y, x, 17, MPFR_RNDN);
- if (mpfr_cmp_ui (y, 0) || mpfr_sgn (y) < 0)
-@@ -190,64 +203,39 @@
- i = mpfr_root (y, x, 1, MPFR_RNDN);
- if (mpfr_cmp_ui (x, 17) || i != 0)
- {
-- printf ("Error in root (17^(1/1))\n");
-+ printf ("Error in root for 17^(1/1)\n");
- exit (1);
- }
-
--#if 0
-- /* Check for k == 0:
-- For 0 <= x < 1 => +0.
-- For x = 1 => 1.
-- For x > 1, => +Inf.
-- For x < 0 => NaN. */
-- i = mpfr_root (y, x, 0, MPFR_RNDN);
-- if (!MPFR_IS_INF (y) || !MPFR_IS_POS (y) || i != 0)
-- {
-- printf ("Error in root 17^(1/0)\n");
-- exit (1);
-- }
-- mpfr_set_ui (x, 1, MPFR_RNDN);
-- i = mpfr_root (y, x, 0, MPFR_RNDN);
-- if (mpfr_cmp_ui (y, 1) || i != 0)
-- {
-- printf ("Error in root 1^(1/0)\n");
-- exit (1);
-- }
- mpfr_set_ui (x, 0, MPFR_RNDN);
- i = mpfr_root (y, x, 0, MPFR_RNDN);
-- if (!MPFR_IS_ZERO (y) || !MPFR_IS_POS (y) || i != 0)
-- {
-- printf ("Error in root 0+^(1/0)\n");
-- exit (1);
-- }
-- MPFR_CHANGE_SIGN (x);
-- i = mpfr_root (y, x, 0, MPFR_RNDN);
-- if (!MPFR_IS_ZERO (y) || !MPFR_IS_POS (y) || i != 0)
-+ if (!MPFR_IS_NAN (y) || i != 0)
- {
-- printf ("Error in root 0-^(1/0)\n");
-+ printf ("Error in root for (+0)^(1/0)\n");
- exit (1);
- }
-- mpfr_set_ui_2exp (x, 17, -5, MPFR_RNDD);
-+ mpfr_neg (x, x, MPFR_RNDN);
- i = mpfr_root (y, x, 0, MPFR_RNDN);
-- if (!MPFR_IS_ZERO (y) || !MPFR_IS_POS (y) || i != 0)
-+ if (!MPFR_IS_NAN (y) || i != 0)
- {
-- printf ("Error in root (17/2^5)^(1/0)\n");
-+ printf ("Error in root for (-0)^(1/0)\n");
- exit (1);
- }
--#endif
-- mpfr_set_ui (x, 0, MPFR_RNDN);
-+
-+ mpfr_set_ui (x, 1, MPFR_RNDN);
- i = mpfr_root (y, x, 0, MPFR_RNDN);
- if (!MPFR_IS_NAN (y) || i != 0)
- {
-- printf ("Error in root 0+^(1/0)\n");
-+ printf ("Error in root for 1^(1/0)\n");
- exit (1);
- }
-+
- /* Check for k==2 */
- mpfr_set_si (x, -17, MPFR_RNDD);
- i = mpfr_root (y, x, 2, MPFR_RNDN);
- if (!MPFR_IS_NAN (y) || i != 0)
- {
-- printf ("Error in root (-17)^(1/2)\n");
-+ printf ("Error in root for (-17)^(1/2)\n");
- exit (1);
- }
-
-@@ -255,11 +243,168 @@
- mpfr_clear (y);
- }
-
-+/* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=812779
-+ * https://bugzilla.gnome.org/show_bug.cgi?id=756960
-+ * is a GNOME Calculator bug (mpfr_root applied on a negative integer,
-+ * which is converted to an unsigned integer), but the strange result
-+ * is also due to a bug in MPFR.
-+ */
-+static void
-+bigint (void)
-+{
-+ mpfr_t x, y;
-+
-+ mpfr_inits2 (64, x, y, (mpfr_ptr) 0);
-+
-+ mpfr_set_ui (x, 10, MPFR_RNDN);
-+ if (sizeof (unsigned long) * CHAR_BIT == 64)
-+ {
-+ mpfr_root (x, x, ULONG_MAX, MPFR_RNDN);
-+ mpfr_set_ui_2exp (y, 1, -63, MPFR_RNDN);
-+ mpfr_add_ui (y, y, 1, MPFR_RNDN);
-+ if (! mpfr_equal_p (x, y))
-+ {
-+ printf ("Error in bigint for ULONG_MAX\n");
-+ printf ("Expected ");
-+ mpfr_dump (y);
-+ printf ("Got ");
-+ mpfr_dump (x);
-+ exit (1);
-+ }
-+ }
-+
-+ mpfr_set_ui (x, 10, MPFR_RNDN);
-+ mpfr_root (x, x, 1234567890, MPFR_RNDN);
-+ mpfr_set_str_binary (y,
-+ "1.00000000000000000000000000001000000000101011000101000110010001");
-+ if (! mpfr_equal_p (x, y))
-+ {
-+ printf ("Error in bigint for 1234567890\n");
-+ printf ("Expected ");
-+ mpfr_dump (y);
-+ printf ("Got ");
-+ mpfr_dump (x);
-+ exit (1);
-+ }
-+
-+ mpfr_clears (x, y, (mpfr_ptr) 0);
-+}
-+
- #define TEST_FUNCTION mpfr_root
- #define INTEGER_TYPE unsigned long
--#define INT_RAND_FUNCTION() (INTEGER_TYPE) (randlimb () % 3 +2)
-+#define INT_RAND_FUNCTION() \
-+ (INTEGER_TYPE) (randlimb () & 1 ? randlimb () : randlimb () % 3 + 2)
- #include "tgeneric_ui.c"
-
-+static void
-+exact_powers (unsigned long bmax, unsigned long kmax)
-+{
-+ long b, k;
-+ mpz_t z;
-+ mpfr_t x, y;
-+ int inex, neg;
-+
-+ mpz_init (z);
-+ for (b = 2; b <= bmax; b++)
-+ for (k = 1; k <= kmax; k++)
-+ {
-+ mpz_ui_pow_ui (z, b, k);
-+ mpfr_init2 (x, mpz_sizeinbase (z, 2));
-+ mpfr_set_ui (x, b, MPFR_RNDN);
-+ mpfr_pow_ui (x, x, k, MPFR_RNDN);
-+ mpz_set_ui (z, b);
-+ mpfr_init2 (y, mpz_sizeinbase (z, 2));
-+ for (neg = 0; neg <= 1; neg++)
-+ {
-+ inex = mpfr_root (y, x, k, MPFR_RNDN);
-+ if (inex != 0)
-+ {
-+ printf ("Error in exact_powers, b=%ld, k=%ld\n", b, k);
-+ printf ("Expected inex=0, got %d\n", inex);
-+ exit (1);
-+ }
-+ if (neg && (k & 1) == 0)
-+ {
-+ if (!MPFR_IS_NAN (y))
-+ {
-+ printf ("Error in exact_powers, b=%ld, k=%ld\n", b, k);
-+ printf ("Expected y=NaN\n");
-+ printf ("Got ");
-+ mpfr_out_str (stdout, 10, 0, y, MPFR_RNDN);
-+ printf ("\n");
-+ exit (1);
-+ }
-+ }
-+ else if (MPFR_IS_NAN (y) || mpfr_cmp_si (y, b) != 0)
-+ {
-+ printf ("Error in exact_powers, b=%ld, k=%ld\n", b, k);
-+ printf ("Expected y=%ld\n", b);
-+ printf ("Got ");
-+ mpfr_out_str (stdout, 10, 0, y, MPFR_RNDN);
-+ printf ("\n");
-+ exit (1);
-+ }
-+ mpfr_neg (x, x, MPFR_RNDN);
-+ b = -b;
-+ }
-+ mpfr_clear (x);
-+ mpfr_clear (y);
-+ }
-+ mpz_clear (z);
-+}
-+
-+/* Compare root(x,2^h) with pow(x,2^(-h)). */
-+static void
-+cmp_pow (void)
-+{
-+ mpfr_t x, y1, y2;
-+ int h;
-+
-+ mpfr_inits2 (128, x, y1, y2, (mpfr_ptr) 0);
-+
-+ for (h = 1; h < sizeof (unsigned long) * CHAR_BIT; h++)
-+ {
-+ unsigned long k = (unsigned long) 1 << h;
-+ int i;
-+
-+ for (i = 0; i < 10; i++)
-+ {
-+ mpfr_rnd_t rnd;
-+ unsigned int flags1, flags2;
-+ int inex1, inex2;
-+
-+ tests_default_random (x, 0, __gmpfr_emin, __gmpfr_emax, 1);
-+ rnd = RND_RAND ();
-+ mpfr_set_ui_2exp (y1, 1, -h, MPFR_RNDN);
-+ mpfr_clear_flags ();
-+ inex1 = mpfr_pow (y1, x, y1, rnd);
-+ flags1 = __gmpfr_flags;
-+ mpfr_clear_flags ();
-+ inex2 = mpfr_root (y2, x, k, rnd);
-+ flags2 = __gmpfr_flags;
-+ if (!(mpfr_equal_p (y1, y2) && SAME_SIGN (inex1, inex2) &&
-+ flags1 == flags2))
-+ {
-+ printf ("Error in cmp_pow on h=%d, i=%d, rnd=%s\n",
-+ h, i, mpfr_print_rnd_mode ((mpfr_rnd_t) rnd));
-+ printf ("x = ");
-+ mpfr_dump (x);
-+ printf ("pow = ");
-+ mpfr_dump (y1);
-+ printf ("with inex = %d, flags =", inex1);
-+ flags_out (flags1);
-+ printf ("root = ");
-+ mpfr_dump (y2);
-+ printf ("with inex = %d, flags =", inex2);
-+ flags_out (flags2);
-+ exit (1);
-+ }
-+ }
-+ }
-+
-+ mpfr_clears (x, y1, y2, (mpfr_ptr) 0);
-+}
-+
- int
- main (void)
- {
-@@ -270,7 +415,10 @@
-
- tests_start_mpfr ();
-
-+ exact_powers (3, 1000);
- special ();
-+ bigint ();
-+ cmp_pow ();
-
- mpfr_init (x);
-
-@@ -329,6 +477,13 @@
-
- test_generic_ui (2, 200, 30);
-
-+ bad_cases (root2, pow2, "mpfr_root[2]", 8, -256, 255, 4, 128, 800, 40);
-+ bad_cases (root3, pow3, "mpfr_root[3]", 8, -256, 255, 4, 128, 800, 40);
-+ bad_cases (root4, pow4, "mpfr_root[4]", 8, -256, 255, 4, 128, 800, 40);
-+ bad_cases (root5, pow5, "mpfr_root[5]", 8, -256, 255, 4, 128, 800, 40);
-+ bad_cases (root17, pow17, "mpfr_root[17]", 8, -256, 255, 4, 128, 800, 40);
-+ bad_cases (root120, pow120, "mpfr_root[120]", 8, -256, 255, 4, 128, 800, 40);
-+
- tests_end_mpfr ();
- return 0;
- }
diff --git a/packages/mpfr/3.1.3/230-gamma.patch b/packages/mpfr/3.1.3/230-gamma.patch
deleted file mode 100644
index 47d4e41..0000000
--- a/packages/mpfr/3.1.3/230-gamma.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2016-02-23 07:43:23.702095604 +0000
-+++ mpfr-3.1.3-b/PATCHES 2016-02-23 07:43:23.726095285 +0000
-@@ -0,0 +1 @@
-+gamma
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2016-02-15 15:20:51.306696441 +0000
-+++ mpfr-3.1.3-b/VERSION 2016-02-23 07:43:23.726095285 +0000
-@@ -1 +1 @@
--3.1.3-p12
-+3.1.3-p13
-diff -Naurd mpfr-3.1.3-a/src/gamma.c mpfr-3.1.3-b/src/gamma.c
---- mpfr-3.1.3-a/src/gamma.c 2015-06-19 19:55:09.000000000 +0000
-+++ mpfr-3.1.3-b/src/gamma.c 2016-02-23 07:43:23.718095391 +0000
-@@ -70,6 +70,9 @@
- {
- mpfr_t x, y;
- unsigned long r, k;
-+ MPFR_SAVE_EXPO_DECL (expo);
-+
-+ MPFR_SAVE_EXPO_MARK (expo);
- mpfr_init2 (x, 38);
- mpfr_init2 (y, 38);
- mpfr_set_ui (x, n, MPFR_RNDZ);
-@@ -86,6 +89,8 @@
- r -= n / k;
- mpfr_clear (x);
- mpfr_clear (y);
-+ MPFR_SAVE_EXPO_FREE (expo);
-+
- return r;
- }
-
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2016-02-15 15:20:51.302696439 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-23 07:43:23.726095285 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p12"
-+#define MPFR_VERSION_STRING "3.1.3-p13"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2016-02-15 15:20:51.306696441 +0000
-+++ mpfr-3.1.3-b/src/version.c 2016-02-23 07:43:23.726095285 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p12";
-+ return "3.1.3-p13";
- }
-diff -Naurd mpfr-3.1.3-a/tests/tgamma.c mpfr-3.1.3-b/tests/tgamma.c
---- mpfr-3.1.3-a/tests/tgamma.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tgamma.c 2016-02-23 07:43:23.718095391 +0000
-@@ -192,6 +192,18 @@
- exit (1);
- }
-
-+ mpfr_set_prec (x, 2);
-+ mpfr_set_prec (y, 2);
-+ mpfr_set_ui (x, 2, MPFR_RNDN);
-+ mpfr_clear_inexflag ();
-+ mpfr_gamma (y, x, MPFR_RNDN);
-+ if (mpfr_inexflag_p ())
-+ {
-+ printf ("Wrong inexact flag for gamma(2)\n");
-+ printf ("expected 0, got 1\n");
-+ exit (1);
-+ }
-+
- mpfr_clear (x);
- mpfr_clear (y);
- }
diff --git a/packages/mpfr/3.1.3/240-rem1.patch b/packages/mpfr/3.1.3/240-rem1.patch
deleted file mode 100644
index 9d5e3c1..0000000
--- a/packages/mpfr/3.1.3/240-rem1.patch
+++ /dev/null
@@ -1,337 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2016-02-23 07:54:06.617533218 +0000
-+++ mpfr-3.1.3-b/PATCHES 2016-02-23 07:54:06.641532898 +0000
-@@ -0,0 +1 @@
-+rem1
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2016-02-23 07:43:23.726095285 +0000
-+++ mpfr-3.1.3-b/VERSION 2016-02-23 07:54:06.641532898 +0000
-@@ -1 +1 @@
--3.1.3-p13
-+3.1.3-p14
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2016-02-23 07:43:23.726095285 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-23 07:54:06.641532898 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p13"
-+#define MPFR_VERSION_STRING "3.1.3-p14"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/rem1.c mpfr-3.1.3-b/src/rem1.c
---- mpfr-3.1.3-a/src/rem1.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/rem1.c 2016-02-23 07:54:06.633533004 +0000
-@@ -59,6 +59,7 @@
- mpfr_exp_t ex, ey;
- int compare, inex, q_is_odd, sign, signx = MPFR_SIGN (x);
- mpz_t mx, my, r;
-+ int tiny = 0;
-
- MPFR_ASSERTD (rnd_q == MPFR_RNDN || rnd_q == MPFR_RNDZ);
-
-@@ -109,13 +110,27 @@
- if (ex <= ey)
- {
- /* q = x/y = mx/(my*2^(ey-ex)) */
-- mpz_mul_2exp (my, my, ey - ex); /* divide mx by my*2^(ey-ex) */
-- if (rnd_q == MPFR_RNDZ)
-- /* 0 <= |r| <= |my|, r has the same sign as mx */
-- mpz_tdiv_qr (mx, r, mx, my);
-+
-+ /* First detect cases where q=0, to avoid creating a huge number
-+ my*2^(ey-ex): if sx = mpz_sizeinbase (mx, 2) and sy =
-+ mpz_sizeinbase (my, 2), we have x < 2^(ex + sx) and
-+ y >= 2^(ey + sy - 1), thus if ex + sx <= ey + sy - 1
-+ the quotient is 0 */
-+ if (ex + (mpfr_exp_t) mpz_sizeinbase (mx, 2) <
-+ ey + (mpfr_exp_t) mpz_sizeinbase (my, 2))
-+ {
-+ tiny = 1;
-+ mpz_set (r, mx);
-+ mpz_set_ui (mx, 0);
-+ }
- else
-- /* 0 <= |r| <= |my|, r has the same sign as my */
-- mpz_fdiv_qr (mx, r, mx, my);
-+ {
-+ mpz_mul_2exp (my, my, ey - ex); /* divide mx by my*2^(ey-ex) */
-+
-+ /* since mx > 0 and my > 0, we can use mpz_tdiv_qr in all cases */
-+ mpz_tdiv_qr (mx, r, mx, my);
-+ /* 0 <= |r| <= |my|, r has the same sign as mx */
-+ }
-
- if (rnd_q == MPFR_RNDN)
- q_is_odd = mpz_tstbit (mx, 0);
-@@ -181,7 +196,20 @@
- /* FIXME: the comparison 2*r < my could be done more efficiently
- at the mpn level */
- mpz_mul_2exp (r, r, 1);
-- compare = mpz_cmpabs (r, my);
-+ /* if tiny=1, we should compare r with my*2^(ey-ex) */
-+ if (tiny)
-+ {
-+ if (ex + (mpfr_exp_t) mpz_sizeinbase (r, 2) <
-+ ey + (mpfr_exp_t) mpz_sizeinbase (my, 2))
-+ compare = 0; /* r*2^ex < my*2^ey */
-+ else
-+ {
-+ mpz_mul_2exp (my, my, ey - ex);
-+ compare = mpz_cmpabs (r, my);
-+ }
-+ }
-+ else
-+ compare = mpz_cmpabs (r, my);
- mpz_fdiv_q_2exp (r, r, 1);
- compare = ((compare > 0) ||
- ((rnd_q == MPFR_RNDN) && (compare == 0) && q_is_odd));
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2016-02-23 07:43:23.726095285 +0000
-+++ mpfr-3.1.3-b/src/version.c 2016-02-23 07:54:06.641532898 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p13";
-+ return "3.1.3-p14";
- }
-diff -Naurd mpfr-3.1.3-a/tests/tfmod.c mpfr-3.1.3-b/tests/tfmod.c
---- mpfr-3.1.3-a/tests/tfmod.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tfmod.c 2016-02-23 07:54:06.633533004 +0000
-@@ -137,89 +137,90 @@
- special (void)
- {
- int inexact;
-- mpfr_t x, y, r, nan;
-- mpfr_inits (x, y, r, nan, (mpfr_ptr) 0);
-+ mpfr_t x, y, r, t;
-
-- mpfr_set_nan (nan);
-+ mpfr_inits (x, y, r, t, (mpfr_ptr) 0);
-+
-+ mpfr_set_nan (t);
-
- /* fmod (NaN, NaN) is NaN */
- mpfr_set_nan (x);
- mpfr_set_nan (y);
- inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
- if (!mpfr_nan_p (r) || inexact != 0)
-- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN);
-+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN);
-
- /* fmod (NaN, +0) is NaN */
- mpfr_set_ui (y, 0, MPFR_RNDN);
- inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
- if (!mpfr_nan_p (r) || inexact != 0)
-- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN);
-+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN);
-
- /* fmod (+1, 0) is NaN */
- mpfr_set_ui (x, 1, MPFR_RNDN);
- inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
- if (!mpfr_nan_p (r) || inexact != 0)
-- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN);
-+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN);
-
- /* fmod (0, 0) is NaN */
- mpfr_set_ui (x, 0, MPFR_RNDN);
- inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
- if (!mpfr_nan_p (r) || inexact != 0)
-- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN);
-+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN);
-
- /* fmod (+inf, +0) is NaN */
- mpfr_set_inf (x, +1);
- inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
- if (!mpfr_nan_p (r) || inexact != 0)
-- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN);
-+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN);
-
- /* fmod (-inf, +0) is NaN */
- mpfr_set_inf (x, -1);
- inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
- if (!mpfr_nan_p (r) || inexact != 0)
-- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN);
-+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN);
-
- /* fmod (-inf, -0) is NaN */
- mpfr_neg (x, x, MPFR_RNDN);
- inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
- if (!mpfr_nan_p (r) || inexact != 0)
-- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN);
-+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN);
-
- /* fmod (-inf, +1) is NaN */
- mpfr_set_ui (y, +1, MPFR_RNDN);
- inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
- if (!mpfr_nan_p (r) || inexact != 0)
-- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN);
-+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN);
-
- /* fmod (+inf, +1) is NaN */
- mpfr_neg (x, x, MPFR_RNDN);
- inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
- if (!mpfr_nan_p (r) || inexact != 0)
-- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN);
-+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN);
-
- /* fmod (+inf, -inf) is NaN */
- mpfr_set_inf (y, -1);
- inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
- if (!mpfr_nan_p (r) || inexact != 0)
-- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN);
-+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN);
-
- /* fmod (-inf, -inf) is NaN */
- mpfr_neg (x, x, MPFR_RNDN);
- inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
- if (!mpfr_nan_p (r) || inexact != 0)
-- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN);
-+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN);
-
- /* fmod (-inf, +inf) is NaN */
- mpfr_neg (y, y, MPFR_RNDN);
- inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
- if (!mpfr_nan_p (r) || inexact != 0)
-- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN);
-+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN);
-
- /* fmod (+inf, +inf) is NaN */
- mpfr_neg (x, x, MPFR_RNDN);
- inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
- if (!mpfr_nan_p (r) || inexact != 0)
-- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN);
-+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN);
-
- /* fmod (x, +inf) = x, if x is finite */
- mpfr_set_ui (x, 1, MPFR_RNDN);
-@@ -271,13 +272,13 @@
- mpfr_set_ui (y, 0, MPFR_RNDN);
- inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
- if (!mpfr_nan_p (r) || inexact != 0)
-- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN);
-+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN);
-
- /* fmod (+0, -0) is NaN */
- mpfr_neg (y, y, MPFR_RNDN);
- inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
- if (!mpfr_nan_p (r) || inexact != 0)
-- test_failed (r, nan, 0, inexact, x, y, MPFR_RNDN);
-+ test_failed (r, t, 0, inexact, x, y, MPFR_RNDN);
-
- /* fmod (+0, +1) = +0 */
- mpfr_set_ui (y, 1, MPFR_RNDN);
-@@ -303,7 +304,18 @@
- if (!mpfr_equal_p (r, x) || inexact != 0)
- test_failed (r, x, 0, inexact, x, y, MPFR_RNDN);
-
-- mpfr_clears (x, y, r, nan, (mpfr_ptr) 0);
-+ mpfr_set_prec (x, 380);
-+ mpfr_set_prec (y, 385);
-+ mpfr_set_str_binary (x, "0.11011010010110011101011000100100101100101011010001011100110001100101111001010100001011111110111100101110101010110011010101000100000100011101101100001011101110100111101111111010001001000010000110010110011100111000001110111010000100101001010111100100010001101001110100011110010000000001110001111001101100111011001000110110011100100011111110010100011001000001001011010111010000000000E0");
-+ mpfr_set_str_binary (y, "0.1100011000011101011010001100010111001110110111001101010010111100111100011010010011011101111101111001010111111110001001100001111101001000000010100101111001001110010110000111001000101010111001001000100101011111000010100110001111000110011011010101111101100110010101011010011101100001011101001000101111110110110110000001001101110111110110111110111111001001011110001110011111100000000000000E-1");
-+ mpfr_set_prec (r, 2);
-+ inexact = mpfr_fmod (r, x, y, MPFR_RNDA);
-+ mpfr_set_prec (t, 2);
-+ mpfr_set_ui_2exp (t, 3, -5, MPFR_RNDN);
-+ if (mpfr_cmp_ui_2exp (r, 3, -5) || inexact <= 0)
-+ test_failed (r, t, 1, inexact, x, y, MPFR_RNDA);
-+
-+ mpfr_clears (x, y, r, t, (mpfr_ptr) 0);
- return;
- }
-
-@@ -313,6 +325,7 @@
- {
- mpfr_t x, y, r;
- int inexact;
-+
- mpfr_inits2 (100, x, y, r, (mpfr_ptr) 0);
-
- mpfr_set_prec (x, 3);
-@@ -353,7 +366,46 @@
- mpfr_sin (y, y, MPFR_RNDN);
- check (r, x, y, MPFR_RNDN);
-
-- mpfr_clears(r, x, y, (mpfr_ptr) 0);
-+ mpfr_clears (x, y, r, (mpfr_ptr) 0);
-+}
-+
-+static void
-+bug20160217 (void)
-+{
-+ mpfr_t x, y, r;
-+ int inexact, i;
-+ mpfr_exp_t emin, emax;
-+
-+ mpfr_inits2 (53, x, y, r, (mpfr_ptr) 0);
-+
-+ emin = mpfr_get_emin ();
-+ emax = mpfr_get_emax ();
-+
-+ for (i = 0; i <= 1; i++)
-+ {
-+ mpfr_set_zero (x, 1);
-+ mpfr_nextabove (x);
-+ mpfr_set_inf (y, 1);
-+ mpfr_nextbelow (y);
-+ inexact = mpfr_fmod (r, x, y, MPFR_RNDN);
-+ if (!mpfr_equal_p (r, x) || inexact != 0)
-+ {
-+ printf ("Error for mpfr_fmod (r, nextabove(0), nextbelow(+inf),"
-+ " MPFR_RNDN)%s\n", i ? "extended exponent range" : "");
-+ printf ("Expected inex = 0, r = ");
-+ mpfr_dump (x);
-+ printf ("Got inex = %d, r = ", inexact);
-+ mpfr_dump (r);
-+ exit (1);
-+ }
-+ set_emin (MPFR_EMIN_MIN);
-+ set_emax (MPFR_EMAX_MAX);
-+ }
-+
-+ set_emin (emin);
-+ set_emax (emax);
-+
-+ mpfr_clears (x, y, r, (mpfr_ptr) 0);
- }
-
- int
-@@ -362,6 +414,7 @@
- tests_start_mpfr ();
-
- bug20090519 ();
-+ bug20160217 ();
-
- test_generic (2, 100, 100);
-
-diff -Naurd mpfr-3.1.3-a/tests/tremquo.c mpfr-3.1.3-b/tests/tremquo.c
---- mpfr-3.1.3-a/tests/tremquo.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tremquo.c 2016-02-23 07:54:06.633533004 +0000
-@@ -59,6 +59,7 @@
- {
- mpfr_t x, y, r;
- long q[1];
-+ int inex;
-
- if (argc == 3) /* usage: tremquo x y (rnd=MPFR_RNDN implicit) */
- {
-@@ -281,6 +282,15 @@
- MPFR_ASSERTN (mpfr_zero_p (r) && MPFR_SIGN (r) > 0);
- MPFR_ASSERTN (q[0] == 0);
-
-+ mpfr_set_prec (x, 380);
-+ mpfr_set_prec (y, 385);
-+ mpfr_set_str_binary (x, "0.11011010010110011101011000100100101100101011010001011100110001100101111001010100001011111110111100101110101010110011010101000100000100011101101100001011101110100111101111111010001001000010000110010110011100111000001110111010000100101001010111100100010001101001110100011110010000000001110001111001101100111011001000110110011100100011111110010100011001000001001011010111010000000000E-2");
-+ mpfr_set_str_binary (y, "0.1100011000011101011010001100010111001110110111001101010010111100111100011010010011011101111101111001010111111110001001100001111101001000000010100101111001001110010110000111001000101010111001001000100101011111000010100110001111000110011011010101111101100110010101011010011101100001011101001000101111110110110110000001001101110111110110111110111111001001011110001110011111100000000000000E-1");
-+ mpfr_set_prec (r, 2);
-+ inex = mpfr_remainder (r, x, y, MPFR_RNDA);
-+ MPFR_ASSERTN(mpfr_cmp_si_2exp (r, -3, -4) == 0);
-+ MPFR_ASSERTN(inex < 0);
-+
- mpfr_clear (x);
- mpfr_clear (y);
- mpfr_clear (r);
diff --git a/packages/mpfr/3.1.3/250-agm-eq.patch b/packages/mpfr/3.1.3/250-agm-eq.patch
deleted file mode 100644
index e59e914..0000000
--- a/packages/mpfr/3.1.3/250-agm-eq.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2016-02-23 07:55:17.208593082 +0000
-+++ mpfr-3.1.3-b/PATCHES 2016-02-23 07:55:17.232592762 +0000
-@@ -0,0 +1 @@
-+agm-eq
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2016-02-23 07:54:06.641532898 +0000
-+++ mpfr-3.1.3-b/VERSION 2016-02-23 07:55:17.232592762 +0000
-@@ -1 +1 @@
--3.1.3-p14
-+3.1.3-p15
-diff -Naurd mpfr-3.1.3-a/src/agm.c mpfr-3.1.3-b/src/agm.c
---- mpfr-3.1.3-a/src/agm.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/agm.c 2016-02-23 07:55:17.224592868 +0000
-@@ -96,10 +96,7 @@
- /* b (op2) and a (op1) are the 2 operands but we want b >= a */
- compare = mpfr_cmp (op1, op2);
- if (MPFR_UNLIKELY( compare == 0 ))
-- {
-- mpfr_set (r, op1, rnd_mode);
-- MPFR_RET (0); /* exact */
-- }
-+ return mpfr_set (r, op1, rnd_mode);
- else if (compare > 0)
- {
- mpfr_srcptr t = op1;
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2016-02-23 07:54:06.641532898 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-23 07:55:17.232592762 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p14"
-+#define MPFR_VERSION_STRING "3.1.3-p15"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2016-02-23 07:54:06.641532898 +0000
-+++ mpfr-3.1.3-b/src/version.c 2016-02-23 07:55:17.232592762 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p14";
-+ return "3.1.3-p15";
- }
-diff -Naurd mpfr-3.1.3-a/tests/tagm.c mpfr-3.1.3-b/tests/tagm.c
---- mpfr-3.1.3-a/tests/tagm.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tagm.c 2016-02-23 07:55:17.224592868 +0000
-@@ -169,6 +169,45 @@
- }
-
- static void
-+check_eq (void)
-+{
-+ mpfr_t a, b, agm;
-+ int p;
-+
-+ mpfr_init2 (a, 17);
-+ mpfr_init2 (b, 9);
-+
-+ mpfr_set_str_binary (b, "0.101000000E-3");
-+ mpfr_set (a, b, MPFR_RNDN);
-+
-+ for (p = MPFR_PREC_MIN; p <= 2; p++)
-+ {
-+ int inex;
-+
-+ mpfr_init2 (agm, p);
-+ inex = mpfr_agm (agm, a, b, MPFR_RNDU);
-+ if (mpfr_cmp_ui_2exp (agm, 5 - p, -5) != 0)
-+ {
-+ printf ("Error in check_eq for p = %d: expected %d*2^(-5), got ",
-+ p, 5 - p);
-+ mpfr_dump (agm);
-+ exit (1);
-+ }
-+ if (inex <= 0)
-+ {
-+ printf ("Wrong ternary value in check_eq for p = %d\n", p);
-+ printf ("expected 1\n");
-+ printf ("got %d\n", inex);
-+ exit (1);
-+ }
-+ mpfr_clear (agm);
-+ }
-+
-+ mpfr_clear (a);
-+ mpfr_clear (b);
-+}
-+
-+static void
- check_nans (void)
- {
- mpfr_t x, y, m;
-@@ -260,6 +299,7 @@
- check_nans ();
-
- check_large ();
-+ check_eq ();
- check4 ("2.0", "1.0", MPFR_RNDN, "1.456791031046906869", -1);
- check4 ("6.0", "4.0", MPFR_RNDN, "4.949360872472608925", 1);
- check4 ("62.0", "61.0", MPFR_RNDN, "61.498983718845075902", -1);
diff --git a/packages/mpfr/3.1.3/260-sum.patch b/packages/mpfr/3.1.3/260-sum.patch
deleted file mode 100644
index 6fae047..0000000
--- a/packages/mpfr/3.1.3/260-sum.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2016-02-23 07:55:54.028346753 +0000
-+++ mpfr-3.1.3-b/PATCHES 2016-02-23 07:55:54.052346433 +0000
-@@ -0,0 +1 @@
-+sum
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2016-02-23 07:55:17.232592762 +0000
-+++ mpfr-3.1.3-b/VERSION 2016-02-23 07:55:54.052346433 +0000
-@@ -1 +1 @@
--3.1.3-p15
-+3.1.3-p16
-diff -Naurd mpfr-3.1.3-a/src/mpfr-impl.h mpfr-3.1.3-b/src/mpfr-impl.h
---- mpfr-3.1.3-a/src/mpfr-impl.h 2015-06-19 19:55:09.000000000 +0000
-+++ mpfr-3.1.3-b/src/mpfr-impl.h 2016-02-23 07:55:54.040346593 +0000
-@@ -1876,7 +1876,8 @@
- __MPFR_DECLSPEC int mpfr_check _MPFR_PROTO ((mpfr_srcptr));
-
- __MPFR_DECLSPEC int mpfr_sum_sort _MPFR_PROTO ((mpfr_srcptr *const,
-- unsigned long, mpfr_srcptr *));
-+ unsigned long, mpfr_srcptr *,
-+ mpfr_prec_t *));
-
- __MPFR_DECLSPEC int mpfr_get_cputime _MPFR_PROTO ((void));
-
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2016-02-23 07:55:17.232592762 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-23 07:55:54.052346433 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p15"
-+#define MPFR_VERSION_STRING "3.1.3-p16"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/sum.c mpfr-3.1.3-b/src/sum.c
---- mpfr-3.1.3-a/src/sum.c 2015-06-19 19:55:09.000000000 +0000
-+++ mpfr-3.1.3-b/src/sum.c 2016-02-23 07:55:54.040346593 +0000
-@@ -45,9 +45,13 @@
- mpfr_exp_t, mpfr_uexp_t);
-
- /* Either sort the tab in perm and returns 0
-- Or returns 1 for +INF, -1 for -INF and 2 for NAN */
-+ Or returns 1 for +INF, -1 for -INF and 2 for NAN.
-+ Also set *maxprec to the maximal precision of tab[0..n-1] and of the
-+ initial value of *maxprec.
-+*/
- int
--mpfr_sum_sort (mpfr_srcptr *const tab, unsigned long n, mpfr_srcptr *perm)
-+mpfr_sum_sort (mpfr_srcptr *const tab, unsigned long n, mpfr_srcptr *perm,
-+ mpfr_prec_t *maxprec)
- {
- mpfr_exp_t min, max;
- mpfr_uexp_t exp_num;
-@@ -79,6 +83,8 @@
- if (MPFR_GET_EXP (tab[i]) > max)
- max = MPFR_GET_EXP(tab[i]);
- }
-+ if (MPFR_PREC (tab[i]) > *maxprec)
-+ *maxprec = MPFR_PREC (tab[i]);
- }
- if (MPFR_UNLIKELY (sign_inf != 0))
- return sign_inf;
-@@ -213,7 +219,8 @@
-
-
- /* Sum a list of float with order given by permutation perm,
-- * intermediate size set to F.
-+ * intermediate size set to F. Return non-zero if at least one of
-+ * the operations is inexact (thus 0 implies that the sum is exact).
- * Internal use function.
- */
- static int
-@@ -230,16 +237,19 @@
- for (i = 1; i < n - 1; i++)
- {
- MPFR_ASSERTD (!MPFR_IS_NAN (sum) && !MPFR_IS_INF (sum));
-- error_trap |= mpfr_add (sum, sum, tab[i], MPFR_RNDN);
-+ if (mpfr_add (sum, sum, tab[i], MPFR_RNDN))
-+ error_trap = 1;
- }
-- error_trap |= mpfr_add (ret, sum, tab[n - 1], MPFR_RNDN);
-+ if (mpfr_add (ret, sum, tab[n - 1], MPFR_RNDN))
-+ error_trap = 1;
- mpfr_clear (sum);
- return error_trap;
- }
-
- /* Sum a list of floating-point numbers.
-+ * If the return value is 0, then the sum is exact.
-+ * Otherwise the return value gives no information.
- */
--
- int
- mpfr_sum (mpfr_ptr ret, mpfr_ptr *const tab_p, unsigned long n, mpfr_rnd_t rnd)
- {
-@@ -266,7 +276,8 @@
- /* Sort and treat special cases */
- MPFR_TMP_MARK (marker);
- perm = (mpfr_srcptr *) MPFR_TMP_ALLOC (n * sizeof *perm);
-- error_trap = mpfr_sum_sort (tab, n, perm);
-+ prec = MPFR_PREC (ret);
-+ error_trap = mpfr_sum_sort (tab, n, perm, &prec);
- /* Check if there was a NAN or a INF */
- if (MPFR_UNLIKELY (error_trap != 0))
- {
-@@ -281,8 +292,7 @@
- MPFR_RET (0);
- }
-
-- /* Initial precision */
-- prec = MAX (MPFR_PREC (tab[0]), MPFR_PREC (ret));
-+ /* Initial precision is max(prec(ret),prec(tab[0]),...,prec(tab[n-1])) */
- k = MPFR_INT_CEIL_LOG2 (n) + 1;
- prec += k + 2;
- mpfr_init2 (cur_sum, prec);
-@@ -295,8 +305,7 @@
- error_trap = sum_once (cur_sum, perm, n, prec + k);
- if (MPFR_LIKELY (error_trap == 0 ||
- (!MPFR_IS_ZERO (cur_sum) &&
-- mpfr_can_round (cur_sum,
-- MPFR_GET_EXP (cur_sum) - prec + 2,
-+ mpfr_can_round (cur_sum, prec - 2,
- MPFR_RNDN, rnd, MPFR_PREC (ret)))))
- break;
- MPFR_ZIV_NEXT (loop, prec);
-@@ -305,11 +314,13 @@
- MPFR_ZIV_FREE (loop);
- MPFR_TMP_FREE (marker);
-
-- error_trap |= mpfr_set (ret, cur_sum, rnd);
-+ if (mpfr_set (ret, cur_sum, rnd))
-+ error_trap = 1;
- mpfr_clear (cur_sum);
-
- MPFR_SAVE_EXPO_FREE (expo);
-- error_trap |= mpfr_check_range (ret, 0, rnd);
-+ if (mpfr_check_range (ret, 0, rnd))
-+ error_trap = 1;
- return error_trap; /* It doesn't return the ternary value */
- }
-
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2016-02-23 07:55:17.232592762 +0000
-+++ mpfr-3.1.3-b/src/version.c 2016-02-23 07:55:54.052346433 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p15";
-+ return "3.1.3-p16";
- }
-diff -Naurd mpfr-3.1.3-a/tests/tsum.c mpfr-3.1.3-b/tests/tsum.c
---- mpfr-3.1.3-a/tests/tsum.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tsum.c 2016-02-23 07:55:54.040346593 +0000
-@@ -126,6 +126,7 @@
- mpfr_ptr *tabtmp;
- mpfr_srcptr *perm;
- unsigned long i;
-+ mpfr_prec_t prec = MPFR_PREC_MIN;
-
- /* Init stuff */
- tab = (mpfr_t *) (*__gmp_allocate_func) (n * sizeof (mpfr_t));
-@@ -140,7 +141,7 @@
- tabtmp[i] = tab[i];
- }
-
-- mpfr_sum_sort ((mpfr_srcptr *)tabtmp, n, perm);
-+ mpfr_sum_sort ((mpfr_srcptr *)tabtmp, n, perm, &prec);
-
- if (check_is_sorted (n, perm) == 0)
- {
-@@ -300,6 +301,41 @@
- mpfr_clears (tab[0], tab[1], tab[2], r, (mpfr_ptr) 0);
- }
-
-+/* bug reported by Joseph S. Myers on 2013-10-27
-+ https://sympa.inria.fr/sympa/arc/mpfr/2013-10/msg00015.html */
-+static void
-+bug20131027 (void)
-+{
-+ mpfr_t r, t[4];
-+ mpfr_ptr p[4];
-+ char *s[4] = {
-+ "0x1p1000",
-+ "-0x0.fffffffffffff80000000000000001p1000",
-+ "-0x1p947",
-+ "0x1p880"
-+ };
-+ int i;
-+
-+ mpfr_init2 (r, 53);
-+ for (i = 0; i < 4; i++)
-+ {
-+ mpfr_init2 (t[i], i == 0 ? 53 : 1000);
-+ mpfr_set_str (t[i], s[i], 0, MPFR_RNDN);
-+ p[i] = t[i];
-+ }
-+ mpfr_sum (r, p, 4, MPFR_RNDN);
-+
-+ if (MPFR_NOTZERO (r))
-+ {
-+ printf ("mpfr_sum incorrect in bug20131027: expected 0, got\n");
-+ mpfr_dump (r);
-+ exit (1);
-+ }
-+
-+ for (i = 0; i < 4; i++)
-+ mpfr_clear (t[i]);
-+ mpfr_clear (r);
-+}
-
- int
- main (void)
-@@ -310,6 +346,7 @@
- tests_start_mpfr ();
-
- check_special ();
-+ bug20131027 ();
- test_sort (1764, 1026);
- for (p = 2 ; p < 444 ; p += 17)
- for (n = 2 ; n < 1026 ; n += 42 + p)
diff --git a/packages/mpfr/3.1.3/270-cmp_d.patch b/packages/mpfr/3.1.3/270-cmp_d.patch
deleted file mode 100644
index f22e27a..0000000
--- a/packages/mpfr/3.1.3/270-cmp_d.patch
+++ /dev/null
@@ -1,219 +0,0 @@
-diff -Naurd mpfr-3.1.3-a/PATCHES mpfr-3.1.3-b/PATCHES
---- mpfr-3.1.3-a/PATCHES 2016-02-23 12:28:35.578442642 +0000
-+++ mpfr-3.1.3-b/PATCHES 2016-02-23 12:28:35.602442321 +0000
-@@ -0,0 +1 @@
-+cmp_d
-diff -Naurd mpfr-3.1.3-a/VERSION mpfr-3.1.3-b/VERSION
---- mpfr-3.1.3-a/VERSION 2016-02-23 07:55:54.052346433 +0000
-+++ mpfr-3.1.3-b/VERSION 2016-02-23 12:28:35.602442321 +0000
-@@ -1 +1 @@
--3.1.3-p16
-+3.1.3-p17
-diff -Naurd mpfr-3.1.3-a/src/cmp_d.c mpfr-3.1.3-b/src/cmp_d.c
---- mpfr-3.1.3-a/src/cmp_d.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/cmp_d.c 2016-02-23 12:28:35.590442481 +0000
-@@ -27,12 +27,19 @@
- {
- mpfr_t tmp;
- int res;
-+ MPFR_SAVE_EXPO_DECL (expo);
-+
-+ MPFR_SAVE_EXPO_MARK (expo);
-
- mpfr_init2 (tmp, IEEE_DBL_MANT_DIG);
- res = mpfr_set_d (tmp, d, MPFR_RNDN);
- MPFR_ASSERTD (res == 0);
-+
-+ mpfr_clear_flags ();
- res = mpfr_cmp (b, tmp);
-- mpfr_clear (tmp);
-+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags);
-
-+ mpfr_clear (tmp);
-+ MPFR_SAVE_EXPO_FREE (expo);
- return res;
- }
-diff -Naurd mpfr-3.1.3-a/src/cmp_ld.c mpfr-3.1.3-b/src/cmp_ld.c
---- mpfr-3.1.3-a/src/cmp_ld.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/src/cmp_ld.c 2016-02-23 12:28:35.590442481 +0000
-@@ -27,12 +27,19 @@
- {
- mpfr_t tmp;
- int res;
-+ MPFR_SAVE_EXPO_DECL (expo);
-+
-+ MPFR_SAVE_EXPO_MARK (expo);
-
- mpfr_init2 (tmp, MPFR_LDBL_MANT_DIG);
- res = mpfr_set_ld (tmp, d, MPFR_RNDN);
- MPFR_ASSERTD (res == 0);
-+
-+ mpfr_clear_flags ();
- res = mpfr_cmp (b, tmp);
-- mpfr_clear (tmp);
-+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags);
-
-+ mpfr_clear (tmp);
-+ MPFR_SAVE_EXPO_FREE (expo);
- return res;
- }
-diff -Naurd mpfr-3.1.3-a/src/mpfr.h mpfr-3.1.3-b/src/mpfr.h
---- mpfr-3.1.3-a/src/mpfr.h 2016-02-23 07:55:54.052346433 +0000
-+++ mpfr-3.1.3-b/src/mpfr.h 2016-02-23 12:28:35.598442376 +0000
-@@ -27,7 +27,7 @@
- #define MPFR_VERSION_MAJOR 3
- #define MPFR_VERSION_MINOR 1
- #define MPFR_VERSION_PATCHLEVEL 3
--#define MPFR_VERSION_STRING "3.1.3-p16"
-+#define MPFR_VERSION_STRING "3.1.3-p17"
-
- /* Macros dealing with MPFR VERSION */
- #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c))
-diff -Naurd mpfr-3.1.3-a/src/version.c mpfr-3.1.3-b/src/version.c
---- mpfr-3.1.3-a/src/version.c 2016-02-23 07:55:54.052346433 +0000
-+++ mpfr-3.1.3-b/src/version.c 2016-02-23 12:28:35.598442376 +0000
-@@ -25,5 +25,5 @@
- const char *
- mpfr_get_version (void)
- {
-- return "3.1.3-p16";
-+ return "3.1.3-p17";
- }
-diff -Naurd mpfr-3.1.3-a/tests/tcmp_d.c mpfr-3.1.3-b/tests/tcmp_d.c
---- mpfr-3.1.3-a/tests/tcmp_d.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tcmp_d.c 2016-02-23 12:28:35.590442481 +0000
-@@ -29,8 +29,10 @@
- main (void)
- {
- mpfr_t x;
-+ mpfr_exp_t emin;
-
- tests_start_mpfr ();
-+ emin = mpfr_get_emin ();
-
- mpfr_init2(x, IEEE_DBL_MANT_DIG);
-
-@@ -67,16 +69,31 @@
- exit (1);
- }
-
-+ /* Test in reduced exponent range. */
-+ set_emin (1);
-+ mpfr_set_ui (x, 1, MPFR_RNDN);
-+ if (mpfr_cmp_d (x, 0.9) <= 0)
-+ {
-+ printf ("Error in reduced exponent range.\n");
-+ exit (1);
-+ }
-+ set_emin (emin);
-+
- #if !defined(MPFR_ERRDIVZERO)
- /* Check NAN */
- {
- int c;
-
-- mpfr_clear_erangeflag ();
-+ mpfr_clear_flags ();
- c = mpfr_cmp_d (x, DBL_NAN);
-- if (c != 0 || !mpfr_erangeflag_p ())
-+ if (c != 0 || __gmpfr_flags != MPFR_FLAGS_ERANGE)
- {
- printf ("ERROR for NAN (1)\n");
-+ printf ("Expected 0, got %d\n", c);
-+ printf ("Expected flags:");
-+ flags_out (MPFR_FLAGS_ERANGE);
-+ printf ("Got flags: ");
-+ flags_out (__gmpfr_flags);
- #ifdef MPFR_NANISNAN
- printf ("The reason is that NAN == NAN. Please look at the configure "
- "output\nand Section \"In case of problem\" of the INSTALL "
-@@ -84,12 +101,18 @@
- #endif
- exit (1);
- }
-+
- mpfr_set_nan (x);
-- mpfr_clear_erangeflag ();
-+ mpfr_clear_flags ();
- c = mpfr_cmp_d (x, 2.0);
-- if (c != 0 || !mpfr_erangeflag_p ())
-+ if (c != 0 || __gmpfr_flags != MPFR_FLAGS_ERANGE)
- {
- printf ("ERROR for NAN (2)\n");
-+ printf ("Expected 0, got %d\n", c);
-+ printf ("Expected flags:");
-+ flags_out (MPFR_FLAGS_ERANGE);
-+ printf ("Got flags: ");
-+ flags_out (__gmpfr_flags);
- #ifdef MPFR_NANISNAN
- printf ("The reason is that NAN == NAN. Please look at the configure "
- "output\nand Section \"In case of problem\" of the INSTALL "
-diff -Naurd mpfr-3.1.3-a/tests/tcmp_ld.c mpfr-3.1.3-b/tests/tcmp_ld.c
---- mpfr-3.1.3-a/tests/tcmp_ld.c 2015-06-19 19:55:10.000000000 +0000
-+++ mpfr-3.1.3-b/tests/tcmp_ld.c 2016-02-23 12:28:35.590442481 +0000
-@@ -28,8 +28,10 @@
- main (void)
- {
- mpfr_t x;
-+ mpfr_exp_t emin;
-
- tests_start_mpfr ();
-+ emin = mpfr_get_emin ();
-
- mpfr_init2(x, MPFR_LDBL_MANT_DIG);
-
-@@ -66,16 +68,31 @@
- exit (1);
- }
-
-+ /* Test in reduced exponent range. */
-+ set_emin (1);
-+ mpfr_set_ui (x, 1, MPFR_RNDN);
-+ if (mpfr_cmp_ld (x, 0.9) <= 0)
-+ {
-+ printf ("Error in reduced exponent range.\n");
-+ exit (1);
-+ }
-+ set_emin (emin);
-+
- #if !defined(MPFR_ERRDIVZERO)
- /* Check NAN */
- {
- int c;
-
-- mpfr_clear_erangeflag ();
-+ mpfr_clear_flags ();
- c = mpfr_cmp_ld (x, DBL_NAN);
-- if (c != 0 || !mpfr_erangeflag_p ())
-+ if (c != 0 || __gmpfr_flags != MPFR_FLAGS_ERANGE)
- {
- printf ("ERROR for NAN (1)\n");
-+ printf ("Expected 0, got %d\n", c);
-+ printf ("Expected flags:");
-+ flags_out (MPFR_FLAGS_ERANGE);
-+ printf ("Got flags: ");
-+ flags_out (__gmpfr_flags);
- #ifdef MPFR_NANISNAN
- printf ("The reason is that NAN == NAN. Please look at the configure "
- "output\nand Section \"In case of problem\" of the INSTALL "
-@@ -83,12 +100,18 @@
- #endif
- exit (1);
- }
-+
- mpfr_set_nan (x);
-- mpfr_clear_erangeflag ();
-+ mpfr_clear_flags ();
- c = mpfr_cmp_ld (x, 2.0);
-- if (c != 0 || !mpfr_erangeflag_p ())
-+ if (c != 0 || __gmpfr_flags != MPFR_FLAGS_ERANGE)
- {
- printf ("ERROR for NAN (2)\n");
-+ printf ("Expected 0, got %d\n", c);
-+ printf ("Expected flags:");
-+ flags_out (MPFR_FLAGS_ERANGE);
-+ printf ("Got flags: ");
-+ flags_out (__gmpfr_flags);
- #ifdef MPFR_NANISNAN
- printf ("The reason is that NAN == NAN. Please look at the configure "
- "output\nand Section \"In case of problem\" of the INSTALL "
diff --git a/packages/mpfr/3.1.3/version.desc b/packages/mpfr/3.1.3/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/mpfr/3.1.3/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/mpfr/package.desc b/packages/mpfr/package.desc
index afab5e5..59cb5d4 100644
--- a/packages/mpfr/package.desc
+++ b/packages/mpfr/package.desc
@@ -2,3 +2,4 @@ repository='svn https://scm.gforge.inria.fr/anonscm/svn/mpfr'
# TBD: meta-package autoconf-archive to install extra m4's
bootstrap='wget -O m4/ax_pthread.m4 \\"http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_pthread.m4\\" && ./autogen.sh'
mirrors='http://www.mpfr.org/mpfr-${CT_MPFR_VERSION} $(CT_Mirrors GNU mpfr)'
+archive_formats='.tar.xz .tar.bz2 .tar.gz .zip'
diff --git a/packages/musl/package.desc b/packages/musl/package.desc
index f1b73dc..3dac0d1 100644
--- a/packages/musl/package.desc
+++ b/packages/musl/package.desc
@@ -1,2 +1,3 @@
repository='git git://git.musl-libc.org/musl'
mirrors='http://www.musl-libc.org/releases'
+archive_formats='.tar.gz'
diff --git a/packages/ncurses/package.desc b/packages/ncurses/package.desc
index bb5646d..0243856 100644
--- a/packages/ncurses/package.desc
+++ b/packages/ncurses/package.desc
@@ -1,2 +1,3 @@
# No public repository for ncurses
mirrors='ftp://invisible-island.net/ncurses $(CT_Mirrors GNU ncurses)'
+archive_formats='.tar.gz'
diff --git a/packages/newlib-linaro/2.1.0-2014.09/version.desc b/packages/newlib-linaro/2.1.0-2014.09/version.desc
index fcfe389..a114052 100644
--- a/packages/newlib-linaro/2.1.0-2014.09/version.desc
+++ b/packages/newlib-linaro/2.1.0-2014.09/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/newlib-linaro/package.desc b/packages/newlib-linaro/package.desc
index a11646d..bc92a5b 100644
--- a/packages/newlib-linaro/package.desc
+++ b/packages/newlib-linaro/package.desc
@@ -3,3 +3,4 @@ master='newlib'
repository='git https://git.linaro.org/toolchain/newlib.git'
mirrors='$(CT_Mirrors Linaro newlib ${CT_NEWLIB_LINARO_VERSION})'
experimental='yes'
+archive_formats='.tar.xz'
diff --git a/packages/newlib/2.5.0.20170519/100-fix-unaligned-access-memcpy-m68k.patch b/packages/newlib/2.5.0.20170720/100-fix-unaligned-access-memcpy-m68k.patch
index 1d0b49b..1d0b49b 100644
--- a/packages/newlib/2.5.0.20170519/100-fix-unaligned-access-memcpy-m68k.patch
+++ b/packages/newlib/2.5.0.20170720/100-fix-unaligned-access-memcpy-m68k.patch
diff --git a/packages/newlib/2.5.0.20170519/200-fix-mt-cflags.patch b/packages/newlib/2.5.0.20170720/200-fix-mt-cflags.patch
index cc15551..cc15551 100644
--- a/packages/newlib/2.5.0.20170519/200-fix-mt-cflags.patch
+++ b/packages/newlib/2.5.0.20170720/200-fix-mt-cflags.patch
diff --git a/packages/binutils/2.28/version.desc b/packages/newlib/2.5.0.20170720/version.desc
index e69de29..e69de29 100644
--- a/packages/binutils/2.28/version.desc
+++ b/packages/newlib/2.5.0.20170720/version.desc
diff --git a/packages/newlib/package.desc b/packages/newlib/package.desc
index 523bd47..5d09a77 100644
--- a/packages/newlib/package.desc
+++ b/packages/newlib/package.desc
@@ -3,3 +3,4 @@ repository='git git://sourceware.org/git/newlib-cygwin.git'
mirrors='ftp://sourceware.org/pub/newlib'
milestones='2.0 2.1 2.2'
relevantpattern='*.*.*|.'
+archive_formats='.tar.gz'
diff --git a/packages/binutils/2.26/version.desc b/packages/strace/4.17/version.desc
index e69de29..e69de29 100644
--- a/packages/binutils/2.26/version.desc
+++ b/packages/strace/4.17/version.desc
diff --git a/packages/automake/1.15/version.desc b/packages/strace/4.18/version.desc
index e69de29..e69de29 100644
--- a/packages/automake/1.15/version.desc
+++ b/packages/strace/4.18/version.desc
diff --git a/packages/strace/4.5.18/110-dont-use-REG_SYSCALL-for-sh.patch b/packages/strace/4.5.18/110-dont-use-REG_SYSCALL-for-sh.patch
deleted file mode 100644
index ebbf69a..0000000
--- a/packages/strace/4.5.18/110-dont-use-REG_SYSCALL-for-sh.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -dur strace-4.5.16.orig/process.c strace-4.5.16/process.c
---- strace-4.5.16.orig/process.c 2007-01-11 23:08:38.000000000 +0100
-+++ strace-4.5.16/process.c 2007-07-14 19:19:58.000000000 +0200
-@@ -2685,7 +2685,6 @@
- { 4*REG_GBR, "4*REG_GBR" },
- { 4*REG_MACH, "4*REG_MACH" },
- { 4*REG_MACL, "4*REG_MACL" },
-- { 4*REG_SYSCALL, "4*REG_SYSCALL" },
- { 4*REG_FPUL, "4*REG_FPUL" },
- { 4*REG_FPREG0, "4*REG_FPREG0" },
- { 4*(REG_FPREG0+1), "4*REG_FPREG1" },
diff --git a/packages/strace/4.5.18/130-fix-disabled-largefile-syscalls.patch b/packages/strace/4.5.18/130-fix-disabled-largefile-syscalls.patch
deleted file mode 100644
index 2f47dc9..0000000
--- a/packages/strace/4.5.18/130-fix-disabled-largefile-syscalls.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -dur strace-4.5.16.orig/syscall.c strace-4.5.16/syscall.c
---- strace-4.5.16.orig/syscall.c 2007-07-14 19:21:44.000000000 +0200
-+++ strace-4.5.16/syscall.c 2007-07-14 19:22:49.000000000 +0200
-@@ -125,6 +125,18 @@
- #define TP TRACE_PROCESS
- #define TS TRACE_SIGNAL
-
-+#ifndef HAVE_STATFS64
-+/*
-+ * Ugly hacks for systems that do not have LFS
-+ */
-+
-+#define sys_truncate64 sys_truncate
-+#define sys_ftruncate64 sys_ftruncate
-+#define sys_getdents64 sys_getdents
-+#define sys_statfs64 sys_statfs
-+#define sys_fstatfs64 sys_fstatfs
-+#endif
-+
- static const struct sysent sysent0[] = {
- #include "syscallent.h"
- };
diff --git a/packages/strace/4.5.18/140-statfs64-check.patch b/packages/strace/4.5.18/140-statfs64-check.patch
deleted file mode 100644
index 758966b..0000000
--- a/packages/strace/4.5.18/140-statfs64-check.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-diff -dur strace-4.5.16.orig/acinclude.m4 strace-4.5.16/acinclude.m4
---- strace-4.5.16.orig/acinclude.m4 2004-04-14 04:21:01.000000000 +0200
-+++ strace-4.5.16/acinclude.m4 2007-07-14 19:25:25.000000000 +0200
-@@ -210,6 +210,26 @@
- fi
- ])
-
-+dnl ### A macro to determine whether statfs64 is defined.
-+AC_DEFUN([AC_STATFS64],
-+[AC_MSG_CHECKING(for statfs64 in sys/(statfs|vfs).h)
-+AC_CACHE_VAL(ac_cv_type_statfs64,
-+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef LINUX
-+#include <linux/types.h>
-+#include <sys/statfs.h>
-+#else
-+#include <sys/vfs.h>
-+#endif]], [[struct statfs64 st;]])],[ac_cv_type_statfs64=yes],[ac_cv_type_statfs64=no])])
-+AC_MSG_RESULT($ac_cv_type_statfs64)
-+if test "$ac_cv_type_statfs64" = yes
-+then
-+ AC_DEFINE([HAVE_STATFS64], 1,
-+[Define if statfs64 is available in sys/statfs.h or sys/vfs.h.])
-+fi
-+])
-+
-+
-+
- dnl ### A macro to determine if off_t is a long long
- AC_DEFUN([AC_OFF_T_IS_LONG_LONG],
- [AC_MSG_CHECKING(for long long off_t)
-diff -dur strace-4.5.16.orig/configure.ac strace-4.5.16/configure.ac
---- strace-4.5.16.orig/configure.ac 2007-01-11 12:37:55.000000000 +0100
-+++ strace-4.5.16/configure.ac 2007-07-14 19:25:25.000000000 +0200
-@@ -169,6 +169,7 @@
- struct stat.st_level,
- struct stat.st_rdev])
- AC_STAT64
-+AC_STATFS64
-
- AC_TYPE_SIGNAL
- AC_TYPE_UID_T
-diff -dur strace-4.5.16.orig/file.c strace-4.5.16/file.c
---- strace-4.5.16.orig/file.c 2007-01-15 21:25:52.000000000 +0100
-+++ strace-4.5.16/file.c 2007-07-14 19:25:25.000000000 +0200
-@@ -1636,7 +1636,7 @@
- return 0;
- }
-
--#ifdef LINUX
-+#ifdef HAVE_STATFS64
- static void
- printstatfs64(tcp, addr)
- struct tcb *tcp;
diff --git a/packages/strace/4.5.18/160-fix-check-for-linux-netlink.patch b/packages/strace/4.5.18/160-fix-check-for-linux-netlink.patch
deleted file mode 100644
index e12b4e4..0000000
--- a/packages/strace/4.5.18/160-fix-check-for-linux-netlink.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Dmitry V. Levin [Tue, 3 Nov 2009 16:49:49 +0000]
-
-Fix check for linux/netlink.h on Linux 2.6.32-rc5+
-
-* configure.ac (AC_CHECK_HEADERS): In check for linux/netlink.h, include
- sys/socket.h instead of linux/socket.h beforehand.
-
-diff --git a/configure.ac b/configure.ac
---- a/configure.ac
-+++ b/configure.ac
-@@ -197,7 +197,7 @@ AC_CHECK_HEADERS([ \
- ], [], [])
- AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
- [], [], [#include <stddef.h>
--#include <linux/socket.h>])
-+#include <sys/socket.h>])
- AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include <signal.h>])
- AC_CHECK_TYPES([struct sigcontext_struct],,, [#include <signal.h>])
- AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>])
diff --git a/packages/strace/4.5.18/160-undef-syscall.patch b/packages/strace/4.5.18/160-undef-syscall.patch
deleted file mode 100644
index c7dcb07..0000000
--- a/packages/strace/4.5.18/160-undef-syscall.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -dur strace-4.5.16.orig/linux/syscallent.h strace-4.5.16/linux/syscallent.h
---- strace-4.5.16.orig/linux/syscallent.h 2006-10-16 03:17:52.000000000 +0200
-+++ strace-4.5.16/linux/syscallent.h 2007-07-14 19:30:16.000000000 +0200
-@@ -130,7 +130,11 @@
- { 2, TF, sys_statfs, "statfs" }, /* 99 */
- { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */
- { 3, 0, sys_ioperm, "ioperm" }, /* 101 */
-- { 2, TD, sys_socketcall, "socketcall", SYS_socketcall }, /* 102 */
-+ { 2, TD, sys_socketcall, "socketcall"
-+#ifdef __NR_socketcall
-+ , SYS_socketcall
-+#endif
-+ }, /* 102 */
- { 3, 0, sys_syslog, "syslog" }, /* 103 */
- { 3, 0, sys_setitimer, "setitimer" }, /* 104 */
- { 2, 0, sys_getitimer, "getitimer" }, /* 105 */
-@@ -145,7 +149,11 @@
- { 4, TP, sys_wait4, "wait4", SYS_wait4 }, /* 114 */
- { 1, 0, sys_swapoff, "swapoff" }, /* 115 */
- { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
-- { 6, 0, sys_ipc, "ipc", SYS_ipc }, /* 117 */
-+ { 6, 0, sys_ipc, "ipc"
-+#ifdef __NR_ipc
-+ , SYS_ipc
-+#endif
-+ }, /* 117 */
- { 1, TD, sys_fsync, "fsync" }, /* 118 */
- { 1, TS, sys_sigreturn, "sigreturn" }, /* 119 */
- { 5, TP, sys_clone, "clone", SYS_clone }, /* 120 */
-@@ -282,7 +290,11 @@
- { 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */
- { 5, 0, sys_fadvise64, "fadvise64" }, /* 250 */
- { 5, 0, printargs, "SYS_251" }, /* 251 */
-- { 1, TP, sys_exit, "exit_group", __NR_exit_group }, /* 252 */
-+ { 1, TP, sys_exit, "exit_group"
-+#ifdef __NR_exit_group
-+ , __NR_exit_group
-+#endif
-+ }, /* 252 */
- { 4, 0, printargs, "lookup_dcookie"}, /* 253 */
- { 1, 0, sys_epoll_create, "epoll_create" }, /* 254 */
- { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 255 */
diff --git a/packages/strace/4.5.18/170-no_cachectl.patch b/packages/strace/4.5.18/170-no_cachectl.patch
deleted file mode 100644
index a8fab23..0000000
--- a/packages/strace/4.5.18/170-no_cachectl.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-This patch is needed on newer uclibc becuase the uclibc header generation
-mechanism generates the sysnum.h properly NR_cacheflush is defined for ARM
-but there is no cachectl.h file which is exported to userspace. Strace
-assumes that if SYS_cacheflush is defined than it icludes asm/cachectl.h
-which breaks the build for ARM now.
-
-This patch adds a check for ARM architecture.
-
--Khem
-
-Here is error
-
-| if ccache arm-angstrom-linux-uclibcgnueabi-gcc -march=armv5te -mtune=arm926ej-s -DHAVE_CONFIG_H -I. -I. -I. -Ilinux/arm -I./linux/arm -Ilinux -I./linux -isystem/home/kraj/work/oe/build/uclibc/tmp-omap5912osk/staging/arm-angstrom-linux-uclibcgnueabi/usr/include -Wall -isystem/home/kraj/work/oe/build/uclibc/tmp-omap5912osk/staging/arm-angstrom-linux-uclibcgnueabi/usr/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -MT term.o -MD -MP -MF ".deps/term.Tpo" -c -o term.o term.c; \
-| then mv -f ".deps/term.Tpo" ".deps/term.Po"; else rm -f ".deps/term.Tpo"; exit 1; fi
-| system.c:69:26: error: asm/cachectl.h: No such file or directory
-| make[1]: *** [system.o] Error 1
-| make[1]: *** Waiting for unfinished jobs....
-| signal.c: In function 'sys_sigreturn':
-| signal.c:1221: warning: passing argument 4 of 'ptrace' makes integer from pointer without a cast
-| make[1]: Leaving directory `/home/kraj/work/oe/build/uclibc/tmp-omap5912osk/work/armv5te-angstrom-linux-uclibcgnueabi/strace-4.5.14-r5/strace-4.5.14'
-| make: *** [all] Error 2
-| FATAL: oe_runmake failed
-
-Index: strace-4.5.14/system.c
-===================================================================
---- strace-4.5.14.orig/system.c 2008-05-15 20:23:16.000000000 -0700
-+++ strace-4.5.14/system.c 2008-05-15 20:24:03.000000000 -0700
-@@ -65,7 +65,7 @@
- #include <linux/capability.h>
- #endif
-
--#ifdef SYS_cacheflush
-+#if defined SYS_cacheflush && !defined ARM
- #include <asm/cachectl.h>
- #endif
diff --git a/packages/strace/4.5.18/180-arm-EABI-syscalls.patch b/packages/strace/4.5.18/180-arm-EABI-syscalls.patch
deleted file mode 100644
index 1f28450..0000000
--- a/packages/strace/4.5.18/180-arm-EABI-syscalls.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Patch from upstream:
-http://strace.cvs.sourceforge.net/viewvc/strace/strace/linux/arm/syscallent.h?r1=1.17&r2=1.18&sortby=file
-
-2008-11-13 Kirill A. Shutemov <kirill@shutemov.name>
-
- * linux/arm/syscallent.h: Fix build on ARM EABI which does not
- provide syscalls socketcall and ipc.
-
---- strace-4.5.18.orig/linux/arm/syscallent.h 2008/12/29 20:04:15 1.17
-+++ strace-4.5.18/linux/arm/syscallent.h 2009/01/01 23:20:38 1.18
-@@ -431,6 +431,7 @@
- { 5, 0, printargs, "SYS_398" }, /* 398 */
- { 5, 0, printargs, "SYS_399" }, /* 399 */
-
-+#ifndef __ARM_EABI__
- #if SYS_socket_subcall != 400
- #error fix me
- #endif
-@@ -481,3 +482,4 @@
- { 4, TI, sys_shmdt, "shmdt" }, /* 440 */
- { 4, TI, sys_shmget, "shmget" }, /* 441 */
- { 4, TI, sys_shmctl, "shmctl" }, /* 442 */
-+#endif
diff --git a/packages/strace/4.5.18/900-autoreconf.patch b/packages/strace/4.5.18/900-autoreconf.patch
deleted file mode 100644
index cff775f..0000000
--- a/packages/strace/4.5.18/900-autoreconf.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-diff -ruN strace-4.5.19.orig/config.h.in strace-4.5.19/config.h.in
---- strace-4.5.19.orig/config.h.in 2009-10-21 19:41:12.000000000 +0200
-+++ strace-4.5.19/config.h.in 2010-01-01 10:39:36.000000000 +0100
-@@ -143,6 +143,9 @@
- /* Define if stat64 is available in asm/stat.h. */
- #undef HAVE_STAT64
-
-+/* Define if statfs64 is available in sys/statfs.h or sys/vfs.h. */
-+#undef HAVE_STATFS64
-+
- /* Define to 1 if stdbool.h conforms to C99. */
- #undef HAVE_STDBOOL_H
-
-diff -dur strace-4.5.16.orig/configure strace-4.5.16/configure
---- strace-4.5.16.orig/configure 2007-01-11 23:23:33.000000000 +0100
-+++ strace-4.5.16/configure 2007-07-14 19:18:43.000000000 +0200
-@@ -5994,6 +5994,73 @@
-
- fi
-
-+echo "$as_me:$LINENO: checking for statfs64 in sys/(statfs|vfs).h" >&5
-+echo $ECHO_N "checking for statfs64 in sys/(statfs|vfs).h... $ECHO_C" >&6
-+if test "${ac_cv_type_statfs64+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#ifdef LINUX
-+#include <linux/types.h>
-+#include <sys/statfs.h>
-+#else
-+#include <sys/vfs.h>
-+#endif
-+int
-+main ()
-+{
-+struct statfs64 st;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } &&
-+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
-+ ac_cv_type_statfs64=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ac_cv_type_statfs64=no
-+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+
-+echo "$as_me:$LINENO: result: $ac_cv_type_statfs64" >&5
-+echo "${ECHO_T}$ac_cv_type_statfs64" >&6
-+if test "$ac_cv_type_statfs64" = yes
-+then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_STATFS64 1
-+_ACEOF
-+
-+fi
-+
-
- { echo "$as_me:$LINENO: checking return type of signal handlers" >&5
- echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
-@@ -7580,7 +7647,7 @@
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <stddef.h>
--#include <linux/socket.h>
-+#include <sys/socket.h>
-
- #include <$ac_header>
- _ACEOF
diff --git a/packages/strace/4.5.18/version.desc b/packages/strace/4.5.18/version.desc
deleted file mode 100644
index fcfe389..0000000
--- a/packages/strace/4.5.18/version.desc
+++ /dev/null
@@ -1 +0,0 @@
-obsolete='yes'
diff --git a/packages/strace/4.5.19/120-fix-disabled-largefile-syscalls.patch b/packages/strace/4.5.19/120-fix-disabled-largefile-syscalls.patch
deleted file mode 100644
index a555fc2..0000000
--- a/packages/strace/4.5.19/120-fix-disabled-largefile-syscalls.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -durN strace-4.5.19.orig/syscall.c strace-4.5.19/syscall.c
---- strace-4.5.19.orig/syscall.c 2009-10-28 18:47:18.000000000 +0100
-+++ strace-4.5.19/syscall.c 2009-10-28 18:47:18.000000000 +0100
-@@ -110,6 +110,18 @@
- #define TP TRACE_PROCESS
- #define TS TRACE_SIGNAL
-
-+#ifndef HAVE_STATFS64
-+/*
-+ * Ugly hacks for systems that do not have LFS
-+ */
-+
-+#define sys_truncate64 sys_truncate
-+#define sys_ftruncate64 sys_ftruncate
-+#define sys_getdents64 sys_getdents
-+#define sys_statfs64 sys_statfs
-+#define sys_fstatfs64 sys_fstatfs
-+#endif
-+
- static const struct sysent sysent0[] = {
- #include "syscallent.h"
- };
diff --git a/packages/strace/4.5.19/130-statfs64-check.patch b/packages/strace/4.5.19/130-statfs64-check.patch
deleted file mode 100644
index 0959bdd..0000000
--- a/packages/strace/4.5.19/130-statfs64-check.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-diff -durN strace-4.5.19.orig/acinclude.m4 strace-4.5.19/acinclude.m4
---- strace-4.5.19.orig/acinclude.m4 2004-04-14 04:45:53.000000000 +0200
-+++ strace-4.5.19/acinclude.m4 2009-10-28 18:47:18.000000000 +0100
-@@ -210,6 +210,26 @@
- fi
- ])
-
-+dnl ### A macro to determine whether statfs64 is defined.
-+AC_DEFUN([AC_STATFS64],
-+[AC_MSG_CHECKING(for statfs64 in sys/(statfs|vfs).h)
-+AC_CACHE_VAL(ac_cv_type_statfs64,
-+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef LINUX
-+#include <linux/types.h>
-+#include <sys/statfs.h>
-+#else
-+#include <sys/vfs.h>
-+#endif]], [[struct statfs64 st;]])],[ac_cv_type_statfs64=yes],[ac_cv_type_statfs64=no])])
-+AC_MSG_RESULT($ac_cv_type_statfs64)
-+if test "$ac_cv_type_statfs64" = yes
-+then
-+ AC_DEFINE([HAVE_STATFS64], 1,
-+[Define if statfs64 is available in sys/statfs.h or sys/vfs.h.])
-+fi
-+])
-+
-+
-+
- dnl ### A macro to determine if off_t is a long long
- AC_DEFUN([AC_OFF_T_IS_LONG_LONG],
- [AC_MSG_CHECKING(for long long off_t)
-diff -durN strace-4.5.19.orig/configure.ac strace-4.5.19/configure.ac
---- strace-4.5.19.orig/configure.ac 2009-10-12 21:54:43.000000000 +0200
-+++ strace-4.5.19/configure.ac 2009-10-28 18:47:18.000000000 +0100
-@@ -187,6 +187,7 @@
- struct stat.st_level,
- struct stat.st_rdev])
- AC_STAT64
-+AC_STATFS64
-
- AC_TYPE_SIGNAL
- AC_TYPE_UID_T
-diff -durN strace-4.5.19.orig/file.c strace-4.5.19/file.c
---- strace-4.5.19.orig/file.c 2009-10-21 15:44:04.000000000 +0200
-+++ strace-4.5.19/file.c 2009-10-28 18:47:18.000000000 +0100
-@@ -1688,7 +1688,7 @@
- return 0;
- }
-
--#ifdef LINUX
-+#ifdef HAVE_STATFS64
- static void
- printstatfs64(struct tcb *tcp, long addr)
- {
diff --git a/packages/strace/4.5.19/150-undef-syscall.patch b/packages/strace/4.5.19/150-undef-syscall.patch
deleted file mode 100644
index 7d65e1d..0000000
--- a/packages/strace/4.5.19/150-undef-syscall.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -durN strace-4.5.19.orig/linux/syscallent.h strace-4.5.19/linux/syscallent.h
---- strace-4.5.19.orig/linux/syscallent.h 2009-09-01 21:53:29.000000000 +0200
-+++ strace-4.5.19/linux/syscallent.h 2009-10-28 18:47:18.000000000 +0100
-@@ -130,7 +130,11 @@
- { 2, TF, sys_statfs, "statfs" }, /* 99 */
- { 2, TD, sys_fstatfs, "fstatfs" }, /* 100 */
- { 3, 0, sys_ioperm, "ioperm" }, /* 101 */
-- { 2, TD, sys_socketcall, "socketcall", SYS_socketcall }, /* 102 */
-+ { 2, TD, sys_socketcall, "socketcall"
-+#ifdef __NR_socketcall
-+ , SYS_socketcall
-+#endif
-+ }, /* 102 */
- { 3, 0, sys_syslog, "syslog" }, /* 103 */
- { 3, 0, sys_setitimer, "setitimer" }, /* 104 */
- { 2, 0, sys_getitimer, "getitimer" }, /* 105 */
-@@ -145,7 +149,11 @@
- { 4, TP, sys_wait4, "wait4", SYS_wait4 }, /* 114 */
- { 1, 0, sys_swapoff, "swapoff" }, /* 115 */
- { 1, 0, sys_sysinfo, "sysinfo" }, /* 116 */
-- { 6, 0, sys_ipc, "ipc", SYS_ipc }, /* 117 */
-+ { 6, 0, sys_ipc, "ipc"
-+#ifdef __NR_ipc
-+ , SYS_ipc
-+#endif
-+ }, /* 117 */
- { 1, TD, sys_fsync, "fsync" }, /* 118 */
- { 1, TS, sys_sigreturn, "sigreturn" }, /* 119 */
- { 5, TP, sys_clone, "clone", SYS_clone }, /* 120 */
-@@ -282,7 +290,11 @@
- { 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */
- { 5, 0, sys_fadvise64, "fadvise64" }, /* 250 */
- { 5, 0, printargs, "SYS_251" }, /* 251 */
-- { 1, TP, sys_exit, "exit_group", __NR_exit_group }, /* 252 */
-+ { 1, TP, sys_exit, "exit_group"
-+#ifdef __NR_exit_group
-+ , __NR_exit_group
-+#endif
-+ }, /* 252 */
- { 4, 0, printargs, "lookup_dcookie"}, /* 253 */
- { 1, 0, sys_epoll_create, "epoll_create" }, /* 254 */
- { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 255 */
diff --git a/packages/strace/4.5.19/160-fix-check-for-linux-netlink.patch b/packages/strace/4.5.19/160-fix-check-for-linux-netlink.patch
deleted file mode 100644
index d8c6b2a..0000000
--- a/packages/strace/4.5.19/160-fix-check-for-linux-netlink.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Dmitry V. Levin [Tue, 3 Nov 2009 16:49:49 +0000]
-
-Fix check for linux/netlink.h on Linux 2.6.32-rc5+
-
-* configure.ac (AC_CHECK_HEADERS): In check for linux/netlink.h, include
- sys/socket.h instead of linux/socket.h beforehand.
-
-diff --git a/configure.ac b/configure.ac
---- a/configure.ac
-+++ b/configure.ac
-@@ -258,7 +258,7 @@ AC_CHECK_HEADERS([ \
- ], [], [])
- AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
- [], [], [#include <stddef.h>
--#include <linux/socket.h>])
-+#include <sys/socket.h>])
- AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include <signal.h>])
- AC_CHECK_TYPES([struct sigcontext_struct,
- struct sigcontext],,, [#include <signal.h>])
diff --git a/packages/strace/4.5.19/170-update-configure.patch b/packages/strace/4.5.19/170-update-configure.patch
deleted file mode 100644
index 5d12276..0000000
--- a/packages/strace/4.5.19/170-update-configure.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-diff -ruN strace-4.5.19.orig/config.h.in strace-4.5.19/config.h.in
---- strace-4.5.19.orig/config.h.in 2009-10-21 19:41:12.000000000 +0200
-+++ strace-4.5.19/config.h.in 2010-01-01 10:39:36.000000000 +0100
-@@ -161,6 +161,9 @@
- /* Define if stat64 is available in asm/stat.h. */
- #undef HAVE_STAT64
-
-+/* Define if statfs64 is available in sys/statfs.h or sys/vfs.h. */
-+#undef HAVE_STATFS64
-+
- /* Define to 1 if stdbool.h conforms to C99. */
- #undef HAVE_STDBOOL_H
-
-diff -ruN strace-4.5.19.orig/configure strace-4.5.19/configure
---- strace-4.5.19.orig/configure 2010-01-01 10:38:49.000000000 +0100
-+++ strace-4.5.19/configure 2010-01-01 10:39:36.000000000 +0100
-@@ -5374,6 +5374,44 @@
-
- fi
-
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for statfs64 in sys/(statfs|vfs).h" >&5
-+$as_echo_n "checking for statfs64 in sys/(statfs|vfs).h... " >&6; }
-+if test "${ac_cv_type_statfs64+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#ifdef LINUX
-+#include <linux/types.h>
-+#include <sys/statfs.h>
-+#else
-+#include <sys/vfs.h>
-+#endif
-+int
-+main ()
-+{
-+struct statfs64 st;
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+ ac_cv_type_statfs64=yes
-+else
-+ ac_cv_type_statfs64=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_statfs64" >&5
-+$as_echo "$ac_cv_type_statfs64" >&6; }
-+if test "$ac_cv_type_statfs64" = yes
-+then
-+
-+$as_echo "#define HAVE_STATFS64 1" >>confdefs.h
-+
-+fi
-+
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
- $as_echo_n "checking return type of signal handlers... " >&6; }
-@@ -5880,7 +5851,7 @@
- do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
- ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <stddef.h>
--#include <linux/socket.h>
-+#include <sys/socket.h>
- "
- eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
-diff -ruN strace-4.5.19.orig/Makefile.in strace-4.5.19/Makefile.in
---- strace-4.5.19.orig/Makefile.in 2009-10-21 19:41:14.000000000 +0200
-+++ strace-4.5.19/Makefile.in 2010-01-01 10:39:36.000000000 +0100
-@@ -42,8 +42,9 @@
- subdir = .
- DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-- $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS INSTALL \
-- NEWS TODO config.guess config.sub depcomp install-sh missing
-+ $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS \
-+ ChangeLog INSTALL NEWS TODO config.guess config.sub depcomp \
-+ install-sh missing
- ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
diff --git a/packages/strace/4.5.20/version.desc b/packages/strace/4.5.20/version.desc
index fcfe389..a114052 100644
--- a/packages/strace/4.5.20/version.desc
+++ b/packages/strace/4.5.20/version.desc
@@ -1 +1,2 @@
obsolete='yes'
+archive_formats='.tar.bz2'
diff --git a/packages/strace/package.desc b/packages/strace/package.desc
index 7b035c2..8d5f2c6 100644
--- a/packages/strace/package.desc
+++ b/packages/strace/package.desc
@@ -1,3 +1,4 @@
repository='git https://git.code.sf.net/p/strace/code'
bootstrap='./bootstrap'
mirrors='http://downloads.sourceforge.net/project/strace/strace/${CT_STRACE_VERSION}'
+archive_formats='.tar.xz'
diff --git a/packages/uClibc-ng/1.0.20/100-xtensa-static-link.patch b/packages/uClibc-ng/1.0.20/100-xtensa-static-link.patch
deleted file mode 100644
index 3f8a518..0000000
--- a/packages/uClibc-ng/1.0.20/100-xtensa-static-link.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-diff -urpN uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/Makefile.commonarch uClibc-ng-1.0.20/libpthread/nptl/sysdeps/Makefile.commonarch
---- uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/Makefile.commonarch 2016-12-06 13:02:51.385861492 -0800
-+++ uClibc-ng-1.0.20/libpthread/nptl/sysdeps/Makefile.commonarch 2016-12-06 19:08:53.150146970 -0800
-@@ -32,10 +32,11 @@ libpthread_arch_SOBJ = $(patsubst %.S,$(
- libpthread_arch_OBJS = $(libpthread_subarch_OBJS) $(libpthread_arch_COBJ) $(libpthread_arch_SOBJ)
-
- libc_arch_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(libc_arch_CSRC))
--libc_arch_SOBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(libc_arch_SSRC))
-+libc_arch_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(libc_arch_SSRC))
- libc_arch_OBJS = $(libc_arch_COBJ) $(libc_arch_SOBJ)
- libc_arch_a_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(libc_arch_a_CSRC))
--libc_arch_a_OBJS = $(libc_arch_a_COBJ)
-+libc_arch_a_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(libc_arch_a_SSRC))
-+libc_arch_a_OBJS = $(libc_arch_a_COBJ) $(libc_arch_a_SOBJ)
-
- librt_arch_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(librt_arch_CSRC))
- librt_arch_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(librt_arch_SSRC))
-diff -urpN uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S
---- uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S 1969-12-31 16:00:00.000000000 -0800
-+++ uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/libc-dl-tlsdesc.S 2016-12-06 19:08:53.150146970 -0800
-@@ -0,0 +1 @@
-+#include <ldso/ldso/xtensa/dl-tlsdesc.S>
-diff -urpN uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/Makefile.arch uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/Makefile.arch
---- uClibc-ng-1.0.20.orig/libpthread/nptl/sysdeps/xtensa/Makefile.arch 2016-12-06 13:02:51.401861642 -0800
-+++ uClibc-ng-1.0.20/libpthread/nptl/sysdeps/xtensa/Makefile.arch 2016-12-06 19:08:53.150146970 -0800
-@@ -20,7 +20,7 @@
- ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread
-
- libc_arch_a_CSRC = libc-tls.c
--librt_arch_a_SSRC = dl-tlsdesc.S
-+libc_arch_a_SSRC = libc-dl-tlsdesc.S
-
- CFLAGS-gen_tlsdesc.c = -S
- $(libpthread_arch_OUT)/gen_tlsdesc.c: $(libpthread_arch_DIR)/tlsdesc.sym | $(libpthread_arch_OUT)
diff --git a/packages/uClibc-ng/1.0.20/110-has-lfs.patch b/packages/uClibc-ng/1.0.20/110-has-lfs.patch
deleted file mode 100644
index c5b90de..0000000
--- a/packages/uClibc-ng/1.0.20/110-has-lfs.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 2a40d18badc4f0bff8c2e02507cd8d59cfeb3e7c Mon Sep 17 00:00:00 2001
-From: Alexey Neyman <stilor@att.net>
-Date: Mon, 23 Jan 2017 14:21:54 -0800
-Subject: [PATCH] Restore UCLIBC_HAS_LFS as "always enabled".
-
-Otherwise, buildroot rejects uClibc-ng in an external toolchain.
-
-Signed-off-by: Alexey Neyman <stilor@att.net>
----
- extra/Configs/Config.in | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
-index a9d62f5..b2cf977 100644
---- a/extra/Configs/Config.in
-+++ b/extra/Configs/Config.in
-@@ -566,6 +566,11 @@ config UCLIBC_HAS_SYSLOG
- Support sending messages to the system logger.
- This requires socket-support.
-
-+config UCLIBC_HAS_LFS
-+ def_bool y
-+ help
-+ Large file support (always enabled; config symbol retained for
-+ feature test to be compatible with uClibc).
- choice
- prompt "Malloc Implementation"
- default MALLOC if ! ARCH_USE_MMU
---
-2.9.3
-
diff --git a/packages/uClibc-ng/1.0.20/500-no-install-D.patch b/packages/uClibc-ng/1.0.20/500-no-install-D.patch
deleted file mode 100644
index 83d3ff6..0000000
--- a/packages/uClibc-ng/1.0.20/500-no-install-D.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff -urpN uClibc-ng-1.0.22.orig/utils/Makefile.in uClibc-ng-1.0.22/utils/Makefile.in
---- uClibc-ng-1.0.22.orig/utils/Makefile.in 2017-03-01 08:27:07.000000000 -0800
-+++ uClibc-ng-1.0.22/utils/Makefile.in 2017-03-01 08:43:25.000000000 -0800
-@@ -117,15 +117,22 @@ $(hostutils_OBJ): $(utils_OUT)/%.host :
- install-y += utils_install
-
- # This installs both utils and hostutils, so doesn't depend on either.
-+$(PREFIX)$(DEVEL_PREFIX)bin $(PREFIX)$(RUNTIME_PREFIX)sbin:
-+ $(do_mkdir)
-+
-+utils_install: $(PREFIX)$(DEVEL_PREFIX)bin
-+ifeq ($(HAVE_SHARED),y)
-+utils_install: $(PREFIX)$(RUNTIME_PREFIX)sbin
-+endif
-
- utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ))
-- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf
-+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf
- ifeq ($(HAVE_SHARED),y)
-- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd
-- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig
-+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd
-+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig
- endif
- ifeq ($(UCLIBC_HAS_LOCALE),y)
-- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv
-+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv
- $(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale
- endif
-
diff --git a/packages/uClibc-ng/1.0.20/600-prefer-multilib.patch b/packages/uClibc-ng/1.0.20/600-prefer-multilib.patch
deleted file mode 100644
index 4338f9f..0000000
--- a/packages/uClibc-ng/1.0.20/600-prefer-multilib.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c uClibc-ng-1.0.22/ldso/ldso/dl-elf.c
---- uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c 2017-03-14 12:17:57.754063532 -0700
-+++ uClibc-ng-1.0.22/ldso/ldso/dl-elf.c 2017-03-14 17:14:21.846398236 -0700
-@@ -307,6 +307,19 @@ struct elf_resolve *_dl_load_shared_libr
- }
- }
- #endif
-+
-+#ifdef LDSO_MULTILIB_DIR
-+ /* If multilib directory is selected, search it before falling back to
-+ standard lib directories. */
-+ _dl_if_debug_dprint("\tsearching multilib lib path list\n");
-+ tpnt1 = search_for_named_library(libname, rflags,
-+ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":"
-+ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR,
-+ rpnt, NULL);
-+ if (tpnt1 != NULL)
-+ return tpnt1;
-+#endif
-+
- #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__
- /* Look for libraries wherever the shared library loader
- * was installed */
-@@ -315,6 +328,7 @@ struct elf_resolve *_dl_load_shared_libr
- if (tpnt1 != NULL)
- return tpnt1;
- #endif
-+
- /* Lastly, search the standard list of paths for the library.
- This list must exactly match the list in uClibc/ldso/util/ldd.c */
- _dl_if_debug_dprint("\tsearching full lib path list\n");
-diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.22/ldso/ldso/Makefile.in
---- uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in 2017-03-14 12:17:57.754063532 -0700
-+++ uClibc-ng-1.0.22/ldso/ldso/Makefile.in 2017-03-14 15:35:35.277104175 -0700
-@@ -34,6 +34,11 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g
-
- CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
-
-+# Search non-default multilib directories
-+ifneq ($(MULTILIB_DIR),lib)
-+CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\"
-+endif
-+
- ifeq ($(TARGET_ARCH),arc)
- CFLAGS-ldso.c += -mno-long-calls
- endif
diff --git a/packages/uClibc-ng/1.0.20/700-features.h-c11.patch b/packages/uClibc-ng/1.0.20/700-features.h-c11.patch
deleted file mode 100644
index cb1d2a8..0000000
--- a/packages/uClibc-ng/1.0.20/700-features.h-c11.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb <wbx@openadk.org>
-Date: Sun, 7 May 2017 16:28:14 +0200
-Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation
-
----
- include/features.h | 17 ++++++++++++-----
- 1 file changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/include/features.h b/include/features.h
-index e76bbba..f982079 100644
---- a/include/features.h
-+++ b/include/features.h
-@@ -55,6 +55,7 @@
- These are defined by this file and are used by the
- header files to decide what to declare or define:
-
-+ __USE_ISOC11 Define ISO C11 things.
- __USE_ISOC99 Define ISO C99 things.
- __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
- __USE_POSIX Define IEEE Std 1003.1 things.
-@@ -91,6 +92,7 @@
-
-
- /* Undefine everything, so we get a clean slate. */
-+#undef __USE_ISOC11
- #undef __USE_ISOC99
- #undef __USE_ISOC95
- #undef __USE_POSIX
-@@ -151,6 +153,8 @@
- #ifdef _GNU_SOURCE
- # undef _ISOC99_SOURCE
- # define _ISOC99_SOURCE 1
-+# undef _ISOC11_SOURCE
-+# define _ISOC11_SOURCE 1
- # undef _POSIX_SOURCE
- # define _POSIX_SOURCE 1
- # undef _POSIX_C_SOURCE
-@@ -223,11 +227,14 @@
- # define _SVID_SOURCE 1
- #endif
-
--/* This is to enable the ISO C99 extension. Also recognize the old macro
-- which was used prior to the standard acceptance. This macro will
-- eventually go away and the features enabled by default once the ISO C99
-- standard is widely adopted. */
--#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \
-+/* This is to enable the ISO C11 extension. */
-+#if (defined _ISOC11_SOURCE \
-+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
-+# define __USE_ISOC11 1
-+#endif
-+
-+/* This is to enable the ISO C99 extension. */
-+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
- || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
- # define __USE_ISOC99 1
- #endif
---
-cgit v0.11.2-3-g2eb4
-
diff --git a/packages/uClibc-ng/1.0.21/110-has-lfs.patch b/packages/uClibc-ng/1.0.21/110-has-lfs.patch
deleted file mode 100644
index c5b90de..0000000
--- a/packages/uClibc-ng/1.0.21/110-has-lfs.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 2a40d18badc4f0bff8c2e02507cd8d59cfeb3e7c Mon Sep 17 00:00:00 2001
-From: Alexey Neyman <stilor@att.net>
-Date: Mon, 23 Jan 2017 14:21:54 -0800
-Subject: [PATCH] Restore UCLIBC_HAS_LFS as "always enabled".
-
-Otherwise, buildroot rejects uClibc-ng in an external toolchain.
-
-Signed-off-by: Alexey Neyman <stilor@att.net>
----
- extra/Configs/Config.in | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
-index a9d62f5..b2cf977 100644
---- a/extra/Configs/Config.in
-+++ b/extra/Configs/Config.in
-@@ -566,6 +566,11 @@ config UCLIBC_HAS_SYSLOG
- Support sending messages to the system logger.
- This requires socket-support.
-
-+config UCLIBC_HAS_LFS
-+ def_bool y
-+ help
-+ Large file support (always enabled; config symbol retained for
-+ feature test to be compatible with uClibc).
- choice
- prompt "Malloc Implementation"
- default MALLOC if ! ARCH_USE_MMU
---
-2.9.3
-
diff --git a/packages/uClibc-ng/1.0.21/120-module.patch b/packages/uClibc-ng/1.0.21/120-module.patch
deleted file mode 100644
index 2e8a989..0000000
--- a/packages/uClibc-ng/1.0.21/120-module.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-commit 03884934b32c79da545ef38a42835a6c257b125d
-Author: Waldemar Brodkorb <wbx@uclibc-ng.org>
-Date: Tue Dec 27 09:24:24 2016 +0100
-
- add init_module/delete_module syscall wrappers
-
- Add the wrappers unconditionally, because kmod package
- still uses them.
-
-diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
-index 595074c..faed6fd 100644
---- a/libc/sysdeps/linux/common/Makefile.in
-+++ b/libc/sysdeps/linux/common/Makefile.in
-@@ -31,6 +31,7 @@ CSRC-$(UCLIBC_LINUX_SPECIFIC) += \
- ioperm.c \
- iopl.c \
- modify_ldt.c \
-+ module.c \
- personality.c \
- pipe2.c \
- ppoll.c \
-diff --git a/libc/sysdeps/linux/common/module.c b/libc/sysdeps/linux/common/module.c
-new file mode 100644
-index 0000000..146a43e
---- /dev/null
-+++ b/libc/sysdeps/linux/common/module.c
-@@ -0,0 +1,23 @@
-+/*
-+ * init_module()/delete_module() for uClibc
-+ *
-+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
-+ *
-+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+ */
-+
-+#include <sys/syscall.h>
-+
-+#ifdef __NR_init_module
-+int init_module(void *first, void *second, void *third, void *fourth, void *fifth);
-+/* This may have 5 arguments (for old 2.0 kernels) or 2 arguments
-+ * (for 2.2 and 2.4 kernels). Use the greatest common denominator,
-+ * and let the kernel cope with whatever it gets. It's good at that. */
-+_syscall5(int, init_module, void *, first, void *, second, void *, third,
-+ void *, fourth, void *, fifth)
-+#endif
-+
-+#ifdef __NR_delete_module
-+int delete_module(const char *name, unsigned int flags);
-+_syscall2(int, delete_module, const char *, name, unsigned int, flags)
-+#endif
diff --git a/packages/uClibc-ng/1.0.21/500-no-install-D.patch b/packages/uClibc-ng/1.0.21/500-no-install-D.patch
deleted file mode 100644
index 83d3ff6..0000000
--- a/packages/uClibc-ng/1.0.21/500-no-install-D.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff -urpN uClibc-ng-1.0.22.orig/utils/Makefile.in uClibc-ng-1.0.22/utils/Makefile.in
---- uClibc-ng-1.0.22.orig/utils/Makefile.in 2017-03-01 08:27:07.000000000 -0800
-+++ uClibc-ng-1.0.22/utils/Makefile.in 2017-03-01 08:43:25.000000000 -0800
-@@ -117,15 +117,22 @@ $(hostutils_OBJ): $(utils_OUT)/%.host :
- install-y += utils_install
-
- # This installs both utils and hostutils, so doesn't depend on either.
-+$(PREFIX)$(DEVEL_PREFIX)bin $(PREFIX)$(RUNTIME_PREFIX)sbin:
-+ $(do_mkdir)
-+
-+utils_install: $(PREFIX)$(DEVEL_PREFIX)bin
-+ifeq ($(HAVE_SHARED),y)
-+utils_install: $(PREFIX)$(RUNTIME_PREFIX)sbin
-+endif
-
- utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ))
-- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf
-+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf
- ifeq ($(HAVE_SHARED),y)
-- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd
-- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig
-+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd
-+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig
- endif
- ifeq ($(UCLIBC_HAS_LOCALE),y)
-- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv
-+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv
- $(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale
- endif
-
diff --git a/packages/uClibc-ng/1.0.21/600-prefer-multilib.patch b/packages/uClibc-ng/1.0.21/600-prefer-multilib.patch
deleted file mode 100644
index 4338f9f..0000000
--- a/packages/uClibc-ng/1.0.21/600-prefer-multilib.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c uClibc-ng-1.0.22/ldso/ldso/dl-elf.c
---- uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c 2017-03-14 12:17:57.754063532 -0700
-+++ uClibc-ng-1.0.22/ldso/ldso/dl-elf.c 2017-03-14 17:14:21.846398236 -0700
-@@ -307,6 +307,19 @@ struct elf_resolve *_dl_load_shared_libr
- }
- }
- #endif
-+
-+#ifdef LDSO_MULTILIB_DIR
-+ /* If multilib directory is selected, search it before falling back to
-+ standard lib directories. */
-+ _dl_if_debug_dprint("\tsearching multilib lib path list\n");
-+ tpnt1 = search_for_named_library(libname, rflags,
-+ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":"
-+ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR,
-+ rpnt, NULL);
-+ if (tpnt1 != NULL)
-+ return tpnt1;
-+#endif
-+
- #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__
- /* Look for libraries wherever the shared library loader
- * was installed */
-@@ -315,6 +328,7 @@ struct elf_resolve *_dl_load_shared_libr
- if (tpnt1 != NULL)
- return tpnt1;
- #endif
-+
- /* Lastly, search the standard list of paths for the library.
- This list must exactly match the list in uClibc/ldso/util/ldd.c */
- _dl_if_debug_dprint("\tsearching full lib path list\n");
-diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.22/ldso/ldso/Makefile.in
---- uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in 2017-03-14 12:17:57.754063532 -0700
-+++ uClibc-ng-1.0.22/ldso/ldso/Makefile.in 2017-03-14 15:35:35.277104175 -0700
-@@ -34,6 +34,11 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g
-
- CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
-
-+# Search non-default multilib directories
-+ifneq ($(MULTILIB_DIR),lib)
-+CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\"
-+endif
-+
- ifeq ($(TARGET_ARCH),arc)
- CFLAGS-ldso.c += -mno-long-calls
- endif
diff --git a/packages/uClibc-ng/1.0.21/700-features.h-c11.patch b/packages/uClibc-ng/1.0.21/700-features.h-c11.patch
deleted file mode 100644
index cb1d2a8..0000000
--- a/packages/uClibc-ng/1.0.21/700-features.h-c11.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb <wbx@openadk.org>
-Date: Sun, 7 May 2017 16:28:14 +0200
-Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation
-
----
- include/features.h | 17 ++++++++++++-----
- 1 file changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/include/features.h b/include/features.h
-index e76bbba..f982079 100644
---- a/include/features.h
-+++ b/include/features.h
-@@ -55,6 +55,7 @@
- These are defined by this file and are used by the
- header files to decide what to declare or define:
-
-+ __USE_ISOC11 Define ISO C11 things.
- __USE_ISOC99 Define ISO C99 things.
- __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
- __USE_POSIX Define IEEE Std 1003.1 things.
-@@ -91,6 +92,7 @@
-
-
- /* Undefine everything, so we get a clean slate. */
-+#undef __USE_ISOC11
- #undef __USE_ISOC99
- #undef __USE_ISOC95
- #undef __USE_POSIX
-@@ -151,6 +153,8 @@
- #ifdef _GNU_SOURCE
- # undef _ISOC99_SOURCE
- # define _ISOC99_SOURCE 1
-+# undef _ISOC11_SOURCE
-+# define _ISOC11_SOURCE 1
- # undef _POSIX_SOURCE
- # define _POSIX_SOURCE 1
- # undef _POSIX_C_SOURCE
-@@ -223,11 +227,14 @@
- # define _SVID_SOURCE 1
- #endif
-
--/* This is to enable the ISO C99 extension. Also recognize the old macro
-- which was used prior to the standard acceptance. This macro will
-- eventually go away and the features enabled by default once the ISO C99
-- standard is widely adopted. */
--#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \
-+/* This is to enable the ISO C11 extension. */
-+#if (defined _ISOC11_SOURCE \
-+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
-+# define __USE_ISOC11 1
-+#endif
-+
-+/* This is to enable the ISO C99 extension. */
-+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
- || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
- # define __USE_ISOC99 1
- #endif
---
-cgit v0.11.2-3-g2eb4
-
diff --git a/packages/uClibc-ng/1.0.22/500-no-install-D.patch b/packages/uClibc-ng/1.0.22/500-no-install-D.patch
deleted file mode 100644
index 83d3ff6..0000000
--- a/packages/uClibc-ng/1.0.22/500-no-install-D.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff -urpN uClibc-ng-1.0.22.orig/utils/Makefile.in uClibc-ng-1.0.22/utils/Makefile.in
---- uClibc-ng-1.0.22.orig/utils/Makefile.in 2017-03-01 08:27:07.000000000 -0800
-+++ uClibc-ng-1.0.22/utils/Makefile.in 2017-03-01 08:43:25.000000000 -0800
-@@ -117,15 +117,22 @@ $(hostutils_OBJ): $(utils_OUT)/%.host :
- install-y += utils_install
-
- # This installs both utils and hostutils, so doesn't depend on either.
-+$(PREFIX)$(DEVEL_PREFIX)bin $(PREFIX)$(RUNTIME_PREFIX)sbin:
-+ $(do_mkdir)
-+
-+utils_install: $(PREFIX)$(DEVEL_PREFIX)bin
-+ifeq ($(HAVE_SHARED),y)
-+utils_install: $(PREFIX)$(RUNTIME_PREFIX)sbin
-+endif
-
- utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ))
-- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf
-+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf
- ifeq ($(HAVE_SHARED),y)
-- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd
-- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig
-+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd
-+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig
- endif
- ifeq ($(UCLIBC_HAS_LOCALE),y)
-- $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv
-+ $(Q)$(INSTALL) -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/iconv
- $(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/locale
- endif
-
diff --git a/packages/uClibc-ng/1.0.22/600-prefer-multilib.patch b/packages/uClibc-ng/1.0.22/600-prefer-multilib.patch
deleted file mode 100644
index 4338f9f..0000000
--- a/packages/uClibc-ng/1.0.22/600-prefer-multilib.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c uClibc-ng-1.0.22/ldso/ldso/dl-elf.c
---- uClibc-ng-1.0.22.orig/ldso/ldso/dl-elf.c 2017-03-14 12:17:57.754063532 -0700
-+++ uClibc-ng-1.0.22/ldso/ldso/dl-elf.c 2017-03-14 17:14:21.846398236 -0700
-@@ -307,6 +307,19 @@ struct elf_resolve *_dl_load_shared_libr
- }
- }
- #endif
-+
-+#ifdef LDSO_MULTILIB_DIR
-+ /* If multilib directory is selected, search it before falling back to
-+ standard lib directories. */
-+ _dl_if_debug_dprint("\tsearching multilib lib path list\n");
-+ tpnt1 = search_for_named_library(libname, rflags,
-+ UCLIBC_RUNTIME_PREFIX LDSO_MULTILIB_DIR ":"
-+ UCLIBC_RUNTIME_PREFIX "usr" LDSO_MULTILIB_DIR,
-+ rpnt, NULL);
-+ if (tpnt1 != NULL)
-+ return tpnt1;
-+#endif
-+
- #if defined SHARED && defined __LDSO_SEARCH_INTERP_PATH__
- /* Look for libraries wherever the shared library loader
- * was installed */
-@@ -315,6 +328,7 @@ struct elf_resolve *_dl_load_shared_libr
- if (tpnt1 != NULL)
- return tpnt1;
- #endif
-+
- /* Lastly, search the standard list of paths for the library.
- This list must exactly match the list in uClibc/ldso/util/ldd.c */
- _dl_if_debug_dprint("\tsearching full lib path list\n");
-diff -urpN uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in uClibc-ng-1.0.22/ldso/ldso/Makefile.in
---- uClibc-ng-1.0.22.orig/ldso/ldso/Makefile.in 2017-03-14 12:17:57.754063532 -0700
-+++ uClibc-ng-1.0.22/ldso/ldso/Makefile.in 2017-03-14 15:35:35.277104175 -0700
-@@ -34,6 +34,11 @@ CFLAGS-$(DODEBUG)-ldso/ldso := -O2 -g
-
- CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
-
-+# Search non-default multilib directories
-+ifneq ($(MULTILIB_DIR),lib)
-+CFLAGS-ldso.c += -DLDSO_MULTILIB_DIR=\"$(MULTILIB_DIR)\"
-+endif
-+
- ifeq ($(TARGET_ARCH),arc)
- CFLAGS-ldso.c += -mno-long-calls
- endif
diff --git a/packages/uClibc-ng/1.0.22/700-features.h-c11.patch b/packages/uClibc-ng/1.0.22/700-features.h-c11.patch
deleted file mode 100644
index cb1d2a8..0000000
--- a/packages/uClibc-ng/1.0.22/700-features.h-c11.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb <wbx@openadk.org>
-Date: Sun, 7 May 2017 16:28:14 +0200
-Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation
-
----
- include/features.h | 17 ++++++++++++-----
- 1 file changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/include/features.h b/include/features.h
-index e76bbba..f982079 100644
---- a/include/features.h
-+++ b/include/features.h
-@@ -55,6 +55,7 @@
- These are defined by this file and are used by the
- header files to decide what to declare or define:
-
-+ __USE_ISOC11 Define ISO C11 things.
- __USE_ISOC99 Define ISO C99 things.
- __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
- __USE_POSIX Define IEEE Std 1003.1 things.
-@@ -91,6 +92,7 @@
-
-
- /* Undefine everything, so we get a clean slate. */
-+#undef __USE_ISOC11
- #undef __USE_ISOC99
- #undef __USE_ISOC95
- #undef __USE_POSIX
-@@ -151,6 +153,8 @@
- #ifdef _GNU_SOURCE
- # undef _ISOC99_SOURCE
- # define _ISOC99_SOURCE 1
-+# undef _ISOC11_SOURCE
-+# define _ISOC11_SOURCE 1
- # undef _POSIX_SOURCE
- # define _POSIX_SOURCE 1
- # undef _POSIX_C_SOURCE
-@@ -223,11 +227,14 @@
- # define _SVID_SOURCE 1
- #endif
-
--/* This is to enable the ISO C99 extension. Also recognize the old macro
-- which was used prior to the standard acceptance. This macro will
-- eventually go away and the features enabled by default once the ISO C99
-- standard is widely adopted. */
--#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \
-+/* This is to enable the ISO C11 extension. */
-+#if (defined _ISOC11_SOURCE \
-+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
-+# define __USE_ISOC11 1
-+#endif
-+
-+/* This is to enable the ISO C99 extension. */
-+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
- || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
- # define __USE_ISOC99 1
- #endif
---
-cgit v0.11.2-3-g2eb4
-
diff --git a/packages/uClibc-ng/1.0.23/700-features.h-c11.patch b/packages/uClibc-ng/1.0.23/700-features.h-c11.patch
deleted file mode 100644
index cb1d2a8..0000000
--- a/packages/uClibc-ng/1.0.23/700-features.h-c11.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb <wbx@openadk.org>
-Date: Sun, 7 May 2017 16:28:14 +0200
-Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation
-
----
- include/features.h | 17 ++++++++++++-----
- 1 file changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/include/features.h b/include/features.h
-index e76bbba..f982079 100644
---- a/include/features.h
-+++ b/include/features.h
-@@ -55,6 +55,7 @@
- These are defined by this file and are used by the
- header files to decide what to declare or define:
-
-+ __USE_ISOC11 Define ISO C11 things.
- __USE_ISOC99 Define ISO C99 things.
- __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
- __USE_POSIX Define IEEE Std 1003.1 things.
-@@ -91,6 +92,7 @@
-
-
- /* Undefine everything, so we get a clean slate. */
-+#undef __USE_ISOC11
- #undef __USE_ISOC99
- #undef __USE_ISOC95
- #undef __USE_POSIX
-@@ -151,6 +153,8 @@
- #ifdef _GNU_SOURCE
- # undef _ISOC99_SOURCE
- # define _ISOC99_SOURCE 1
-+# undef _ISOC11_SOURCE
-+# define _ISOC11_SOURCE 1
- # undef _POSIX_SOURCE
- # define _POSIX_SOURCE 1
- # undef _POSIX_C_SOURCE
-@@ -223,11 +227,14 @@
- # define _SVID_SOURCE 1
- #endif
-
--/* This is to enable the ISO C99 extension. Also recognize the old macro
-- which was used prior to the standard acceptance. This macro will
-- eventually go away and the features enabled by default once the ISO C99
-- standard is widely adopted. */
--#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \
-+/* This is to enable the ISO C11 extension. */
-+#if (defined _ISOC11_SOURCE \
-+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
-+# define __USE_ISOC11 1
-+#endif
-+
-+/* This is to enable the ISO C99 extension. */
-+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
- || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
- # define __USE_ISOC99 1
- #endif
---
-cgit v0.11.2-3-g2eb4
-
diff --git a/packages/uClibc-ng/1.0.24/700-features.h-c11.patch b/packages/uClibc-ng/1.0.24/700-features.h-c11.patch
deleted file mode 100644
index cb1d2a8..0000000
--- a/packages/uClibc-ng/1.0.24/700-features.h-c11.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 5b0f49037e8ea8500b05c8f31ee88529ccac4cee Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb <wbx@openadk.org>
-Date: Sun, 7 May 2017 16:28:14 +0200
-Subject: sync features.h with GNU C library, fixes gcc 7.1 toolchain creation
-
----
- include/features.h | 17 ++++++++++++-----
- 1 file changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/include/features.h b/include/features.h
-index e76bbba..f982079 100644
---- a/include/features.h
-+++ b/include/features.h
-@@ -55,6 +55,7 @@
- These are defined by this file and are used by the
- header files to decide what to declare or define:
-
-+ __USE_ISOC11 Define ISO C11 things.
- __USE_ISOC99 Define ISO C99 things.
- __USE_ISOC95 Define ISO C90 AMD1 (C95) things.
- __USE_POSIX Define IEEE Std 1003.1 things.
-@@ -91,6 +92,7 @@
-
-
- /* Undefine everything, so we get a clean slate. */
-+#undef __USE_ISOC11
- #undef __USE_ISOC99
- #undef __USE_ISOC95
- #undef __USE_POSIX
-@@ -151,6 +153,8 @@
- #ifdef _GNU_SOURCE
- # undef _ISOC99_SOURCE
- # define _ISOC99_SOURCE 1
-+# undef _ISOC11_SOURCE
-+# define _ISOC11_SOURCE 1
- # undef _POSIX_SOURCE
- # define _POSIX_SOURCE 1
- # undef _POSIX_C_SOURCE
-@@ -223,11 +227,14 @@
- # define _SVID_SOURCE 1
- #endif
-
--/* This is to enable the ISO C99 extension. Also recognize the old macro
-- which was used prior to the standard acceptance. This macro will
-- eventually go away and the features enabled by default once the ISO C99
-- standard is widely adopted. */
--#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \
-+/* This is to enable the ISO C11 extension. */
-+#if (defined _ISOC11_SOURCE \
-+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
-+# define __USE_ISOC11 1
-+#endif
-+
-+/* This is to enable the ISO C99 extension. */
-+#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
- || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
- # define __USE_ISOC99 1
- #endif
---
-cgit v0.11.2-3-g2eb4
-
diff --git a/packages/android-ndk/r15b/version.desc b/packages/uClibc-ng/1.0.26/version.desc
index e69de29..e69de29 100644
--- a/packages/android-ndk/r15b/version.desc
+++ b/packages/uClibc-ng/1.0.26/version.desc
diff --git a/packages/uClibc-ng/package.desc b/packages/uClibc-ng/package.desc
index f03bd80..ee37b57 100644
--- a/packages/uClibc-ng/package.desc
+++ b/packages/uClibc-ng/package.desc
@@ -2,3 +2,4 @@ master='uClibc'
origin='uclibc-ng.org'
repository='git git://uclibc-ng.org/git/uclibc-ng'
mirrors='http://downloads.uclibc-ng.org/releases/${CT_UCLIBC_NG_VERSION}'
+archive_formats='.tar.xz .tar.lz .tar.bz2 .tar.gz'
diff --git a/packages/uClibc/package.desc b/packages/uClibc/package.desc
index 887e4c2..d7f15df 100644
--- a/packages/uClibc/package.desc
+++ b/packages/uClibc/package.desc
@@ -5,3 +5,4 @@ origin='uclibc.org'
repository='git git://git.busybox.net/uClibc'
mirrors='http://www.uclibc.org/downloads http://www.uclibc.org/downloads/old-releases'
milestones='0.9.33.2 1.0.0 1.0.15'
+archive_formats='.tar.xz .tar.bz2'
diff --git a/packages/zlib/package.desc b/packages/zlib/package.desc
index 789f3c7..1f7c64c 100644
--- a/packages/zlib/package.desc
+++ b/packages/zlib/package.desc
@@ -1,2 +1,3 @@
repository='git https://github.com/madler/zlib.git'
mirrors='http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION}'
+archive_formats='.tar.xz .tar.gz'
diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh
index 8fb51b8..e0fe7f4 100644
--- a/scripts/build/binutils/binutils.sh
+++ b/scripts/build/binutils/binutils.sh
@@ -188,7 +188,7 @@ do_binutils_backend() {
--disable-werror \
"${extra_config[@]}" \
${CT_ARCH_WITH_FLOAT} \
- ${BINUTILS_SYSROOT_ARG} \
+ ${CT_BINUTILS_SYSROOT_ARG} \
"${CT_BINUTILS_EXTRA_CONFIG_ARRAY[@]}"
if [ "${static_build}" = "y" ]; then
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index 6019b35..54dd514 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -14,7 +14,7 @@ do_cc_get() {
# GCC source tree, which will not be there unless we get it and
# put it there ourselves
if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" ]; then
- if ! CT_GetFile ecj-latest .jar $(CT_Mirrors sourceware java); then
+ if ! CT_GetFile ecj ecj-latest .jar $(CT_Mirrors sourceware java); then
# Should be a package, too - but with Java retirement in GCC,
# it may not make sense.
CT_Abort "Failed to download ecj-latest.jar"
@@ -453,6 +453,18 @@ do_gcc_core_backend() {
extra_config+=("--disable-libstdcxx-pch")
fi
+ if [ "${CT_LIBC_GLIBC}" = "y" ]; then
+ # Report GLIBC's version to GCC, it affects the defaults on other options.
+ # Pass-2 should be able to get it from the headers, but for some options
+ # (such as --with-long-double-128) we need to get it right even in pass-1.
+ # GCC expects just two numbers separated by a dot.
+ local glibc_version
+
+ CT_GetPkgVersion GLIBC glibc_version
+ glibc_version=`echo "${glibc_version}" | sed 's/\([1-9][0-9]*\.[1-9][0-9]*\).*/\1/'`
+ extra_config+=("--with-glibc-version=${glibc_version}")
+ fi
+
case "${CT_CC_GCC_LDBL_128}" in
y) extra_config+=("--with-long-double-128");;
m) ;;
@@ -560,7 +572,7 @@ do_gcc_core_backend() {
--target=${CT_TARGET} \
--prefix="${prefix}" \
--with-local-prefix="${CT_SYSROOT_DIR}" \
- ${CC_CORE_SYSROOT_ARG} \
+ ${CT_CC_CORE_SYSROOT_ARG} \
"${extra_config[@]}" \
--enable-languages="${lang_list}" \
"${extra_user_config[@]}"
@@ -1105,7 +1117,7 @@ do_gcc_backend() {
--host=${host} \
--target=${CT_TARGET} \
--prefix="${prefix}" \
- ${CC_SYSROOT_ARG} \
+ ${CT_CC_SYSROOT_ARG} \
"${extra_config[@]}" \
--with-local-prefix="${CT_SYSROOT_DIR}" \
--enable-long-long \
diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh
index eae64bc..c09ff5c 100644
--- a/scripts/build/libc/glibc.sh
+++ b/scripts/build/libc/glibc.sh
@@ -5,7 +5,6 @@
do_libc_get() {
local date
local version
- local -a addons_list
CT_Fetch GLIBC
if [ "${CT_GLIBC_USE_PORTS_EXTERNAL}" = "y" ]; then
@@ -15,13 +14,18 @@ do_libc_get() {
}
do_libc_extract() {
- local addon
-
CT_ExtractPatch GLIBC
if [ "${CT_GLIBC_USE_PORTS_EXTERNAL}" = "y" ]; then
CT_ExtractPatch GLIBC_PORTS
+
+ # This may create a bogus symlink if glibc-ports is using custom
+ # sources or has an overlay (and glibc is shared). However,
+ # we do not support concurrent use of the source directory
+ # and next run, if using different glibc-ports source, will override
+ # this symlink anyway.
+ CT_DoExecLog ALL ln -sf "${CT_GLIBC_PORTS_SRC_DIR}/${CT_GLIBC_PORTS_BASENAME}" \
+ "${CT_GLIBC_SRC_DIR}/${CT_GLIBC_BASENAME}/ports"
fi
- # TBD make patches for addons (ports? anything else?) uniformly using short names
# TBD make the configure timestamp fix in all patched packages (e.g. part of CT_ExtractPatch)
}
@@ -124,8 +128,9 @@ do_libc_backend_once() {
# Also, if those two are missing, iconv build breaks
extra_config+=( --disable-debug --disable-sanity-checks )
- # always include rpc, the user can still override it with TI-RPC
- extra_config+=( --enable-obsolete-rpc )
+ if [ "${CT_GLIBC_ENABLE_OBSOLETE_RPC}" = "y" ]; then
+ extra_config+=( --enable-obsolete-rpc )
+ fi
# Add some default glibc config options if not given by user.
# We don't need to be conditional on whether the user did set different
diff --git a/scripts/build/libc/mingw-w64.sh b/scripts/build/libc/mingw-w64.sh
index 295b313..21afb29 100644
--- a/scripts/build/libc/mingw-w64.sh
+++ b/scripts/build/libc/mingw-w64.sh
@@ -63,10 +63,10 @@ do_libc_start_files() {
do_check_mingw_vendor_tuple()
{
- if [ "${CT_MINGW_W64_VERSION%%.*}" -ge 4 ]; then
+ if [ "${CT_MINGW_W64_REQUIRES_W64_VENDOR}" = "y" ]; then
CT_DoStep INFO "Checking configured vendor tuple"
- if [ ${CT_TARGET_VENDOR} == w64 ]; then
- CT_DoLog EXTRA "The tuple is set to '${CT_TARGET_VENDOR}', as recommended by mingw-64 developers."
+ if [ ${CT_TARGET_VENDOR} = "w64" ]; then
+ CT_DoLog DEBUG "The tuple is set to '${CT_TARGET_VENDOR}', as recommended by mingw-64 developers."
else
CT_DoLog WARN "The tuple vendor is '${CT_TARGET_VENDOR}', not equal to 'w64' and might break the toolchain!"
fi
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index bd07c6b..d5066e2 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -40,6 +40,8 @@ if [ "${CT_DEBUG_INTERACTIVE}" = "y" -a ! \( -t 0 -a -t 6 -a -t 2 \) ]; then
exit 1
fi
+CT_TrapEnvExport
+
# Override the locale early, in case we ever translate crosstool-NG messages
if [ -z "${CT_NO_OVERRIDE_LC_MESSAGES}" ]; then
export LC_ALL=C
@@ -51,19 +53,19 @@ CT_SanitizePath
# Some sanity checks in the environment and needed tools
CT_DoLog INFO "Performing some trivial sanity checks"
-CT_TestAndAbort "Don't set LD_LIBRARY_PATH. It screws up the build." -n "${LD_LIBRARY_PATH}"
-CT_TestAndAbort "Don't set LIBRARY_PATH. It screws up the build." -n "${LIBRARY_PATH}"
-CT_TestAndAbort "Don't set LPATH. It screws up the build." -n "${LPATH}"
-CT_TestAndAbort "Don't set CPATH. It screws up the build." -n "${CPATH}"
-CT_TestAndAbort "Don't set C_INCLUDE_PATH. It screws up the build." -n "${C_INCLUDE_PATH}"
-CT_TestAndAbort "Don't set CPLUS_INCLUDE_PATH. It screws up the build." -n "${CPLUS_INCLUDE_PATH}"
-CT_TestAndAbort "Don't set OBJC_INCLUDE_PATH. It screws up the build." -n "${OBJC_INCLUDE_PATH}"
-CT_TestAndAbort "Don't set CFLAGS. It screws up the build." -n "${CFLAGS}"
-CT_TestAndAbort "Don't set CXXFLAGS. It screws up the build." -n "${CXXFLAGS}"
-CT_TestAndAbort "Don't set CC. It screws up the build." -n "${CC}"
-CT_TestAndAbort "Don't set CXX. It screws up the build." -n "${CXX}"
-CT_Test "GREP_OPTIONS screws up the build. Resetting." -n "${GREP_OPTIONS}"
-export GREP_OPTIONS=
+CT_TestAndAbort "Don't set LD_LIBRARY_PATH. It screws up the build." -n "${LD_LIBRARY_PATH+set}"
+CT_TestAndAbort "Don't set LIBRARY_PATH. It screws up the build." -n "${LIBRARY_PATH+set}"
+CT_TestAndAbort "Don't set LPATH. It screws up the build." -n "${LPATH+set}"
+CT_TestAndAbort "Don't set CPATH. It screws up the build." -n "${CPATH+set}"
+CT_TestAndAbort "Don't set C_INCLUDE_PATH. It screws up the build." -n "${C_INCLUDE_PATH+set}"
+CT_TestAndAbort "Don't set CPLUS_INCLUDE_PATH. It screws up the build." -n "${CPLUS_INCLUDE_PATH+set}"
+CT_TestAndAbort "Don't set OBJC_INCLUDE_PATH. It screws up the build." -n "${OBJC_INCLUDE_PATH+set}"
+CT_TestAndAbort "Don't set CFLAGS. It screws up the build." -n "${CFLAGS+set}"
+CT_TestAndAbort "Don't set CXXFLAGS. It screws up the build." -n "${CXXFLAGS+set}"
+CT_TestAndAbort "Don't set CC. It screws up the build." -n "${CC+set}"
+CT_TestAndAbort "Don't set CXX. It screws up the build." -n "${CXX+set}"
+CT_Test "GREP_OPTIONS screws up the build. Unsetting." -n "${GREP_OPTIONS+set}"
+unset GREP_OPTIONS
# Workaround against openSUSE 12.1 that breaks ./configure for cross-compilation:
export CONFIG_SITE=
@@ -141,9 +143,13 @@ CT_DoStep DEBUG "Dumping user-supplied crosstool-NG configuration"
CT_DoExecLog DEBUG ${grep} -E '^(# )?CT_' .config
CT_EndStep
-CT_DoLog DEBUG "Unsetting and unexporting MAKEFLAGS"
+CT_DoLog DEBUG "Unsetting MAKEFLAGS"
unset MAKEFLAGS
-export MAKEFLAGS
+
+# Set the shell to be used by ./configure scripts and by Makefiles (those
+# that support it!).
+export CONFIG_SHELL="${CT_CONFIG_SHELL}" # for ./configure
+export SHELL="${CT_CONFIG_SHELL}" # for Makefiles
CT_DoLog INFO "Building environment variables"
@@ -167,7 +173,7 @@ CT_PKGVERSION="crosstool-NG ${CT_VERSION}${CT_TOOLCHAIN_PKGVERSION:+ - ${CT_TOOL
# Compute the working directories names
CT_TARBALLS_DIR="${CT_WORK_DIR}/tarballs"
CT_COMMON_SRC_DIR="${CT_WORK_DIR}/src"
-CT_SRC_DIR="${CT_BUILD_DIR}/src"
+CT_SRC_DIR="${CT_BUILD_TOP_DIR}/src"
CT_BUILDTOOLS_PREFIX_DIR="${CT_BUILD_TOP_DIR}/buildtools"
CT_STATE_DIR="${CT_WORK_DIR}/${CT_TARGET}/state"
# Note about HOST_COMPLIBS_DIR: it's always gonna be in the buildtools dir, or a
@@ -304,9 +310,9 @@ if [ -z "${CT_RESTART}" ]; then
CT_DEBUGROOT_DIR="${CT_PREFIX_DIR}/${CT_TARGET}/${CT_SYSROOT_DIR_PREFIX}/debug-root"
CT_HEADERS_DIR="${CT_SYSROOT_DIR}/usr/include"
CT_SanitizeVarDir CT_SYSROOT_DIR CT_DEBUGROOT_DIR CT_HEADERS_DIR
- BINUTILS_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
- CC_CORE_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
- CC_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
+ CT_BINUTILS_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
+ CT_CC_CORE_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
+ CT_CC_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
# glibc's prefix must be exactly /usr, else --with-sysroot'd gcc will get
# confused when $sysroot/usr/include is not present.
# Note: --prefix=/usr is magic!
@@ -320,11 +326,11 @@ if [ -z "${CT_RESTART}" ]; then
# hack! Always use --with-sysroot for binutils.
# binutils 2.14 and later obey it, older binutils ignore it.
# Lets you build a working 32->64 bit cross gcc
- BINUTILS_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
+ CT_BINUTILS_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
# Use --with-headers, else final gcc will define disable_glibc while
# building libgcc, and you'll have no profiling
- CC_CORE_SYSROOT_ARG="--without-headers"
- CC_SYSROOT_ARG="--with-headers=${CT_HEADERS_DIR}"
+ CT_CC_CORE_SYSROOT_ARG="--without-headers"
+ CT_CC_SYSROOT_ARG="--with-headers=${CT_HEADERS_DIR}"
fi
CT_DoExecLog ALL mkdir -p "${CT_SYSROOT_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_DEBUGROOT_DIR}"
@@ -529,11 +535,6 @@ if [ -z "${CT_RESTART}" ]; then
CT_DoLog DEBUG "CFLAGS for host compiler: '${CT_CFLAGS_FOR_HOST}'"
CT_DoLog DEBUG "LDFLAGS for host compiler: '${CT_LDFLAGS_FOR_HOST}'"
- # Set the shell to be used by ./configure scripts and by Makefiles (those
- # that support it!).
- export CONFIG_SHELL="${CT_CONFIG_SHELL}" # for ./configure
- export SHELL="${CT_CONFIG_SHELL}" # for Makefiles
-
# And help make go faster
JOBSFLAGS=
# Override the configured jobs with what's been given on the command line
@@ -601,9 +602,7 @@ if [ -z "${CT_RESTART}" ]; then
CT_DoLog DEBUG "Other environment:"
printenv |${grep} -v -E '^CT_.+=' |CT_DoLog DEBUG
CT_EndStep
-fi
-if [ -z "${CT_RESTART}" ]; then
CT_DoStep INFO "Retrieving needed toolchain components' tarballs"
do_companion_tools_get
do_kernel_get
@@ -651,7 +650,7 @@ if [ "${CT_ONLY_DOWNLOAD}" != "y" -a "${CT_ONLY_EXTRACT}" != "y" ]; then
else
CT_DoSaveState ${step}
if [ ${do_stop} -eq 1 ]; then
- CT_DoLog ERROR "Stopping just after step '${prev_step}', as requested."
+ CT_DoLog INFO "Stopping just after step '${prev_step}', as requested."
exit 0
fi
fi
diff --git a/scripts/functions b/scripts/functions
index 5527fa2..f11ce23 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -155,8 +155,28 @@ CT_OnError() {
CT_DoLog ERROR ">> For more info on this error, look at the file: '${CT_BUILD_LOG#${CT_TOP_DIR}/}'"
fi
CT_DoLog ERROR ">> There is a list of known issues, some with workarounds, in:"
- CT_DoLog ERROR ">> '${CT_DOC_DIR#${CT_TOP_DIR}/}/B - Known issues.txt'"
+ if [ -r "${CT_DOC_DIR}/manual/B_Known_issues.md" ]; then
+ CT_DoLog ERROR ">> '${CT_DOC_DIR#${CT_TOP_DIR}/}/manual/B_Known_issues.md'"
+ else
+ CT_DoLog ERROR ">> https://crosstool-ng.github.io/docs/known-issues/"
+ fi
CT_DoLog ERROR ">>"
+ if [ -n "${CT_EXPERIMENTAL}" ]; then
+ CT_DoLog ERROR ">> NOTE: Your configuration includes features marked EXPERIMENTAL."
+ CT_DoLog ERROR ">> Before submitting a bug report, try to reproduce it without enabling"
+ CT_DoLog ERROR ">> any experimental features. Otherwise, you'll need to debug it"
+ CT_DoLog ERROR ">> and present an explanation why it is a bug in crosstool-NG - or"
+ CT_DoLog ERROR ">> preferably, a fix."
+ CT_DoLog ERROR ">>"
+ fi
+ if [ "${CT_PATCH_ORDER}" != "bundled" ]; then
+ CT_DoLog ERROR ">> NOTE: You configuration uses non-default patch sets. Please"
+ CT_DoLog ERROR ">> select 'bundled' as the set of patches applied and attempt"
+ CT_DoLog ERROR ">> to reproduce this issue. Issues reported with other patch"
+ CT_DoLog ERROR ">> set selections (none, local, bundled+local) are going to be"
+ CT_DoLog ERROR ">> closed without explanation."
+ CT_DoLog ERROR ">>"
+ fi
CT_DoLog ERROR ">> If you feel this is a bug in crosstool-NG, report it at:"
CT_DoLog ERROR ">> https://github.com/crosstool-ng/crosstool-ng/issues/"
CT_DoLog ERROR ">>"
@@ -178,7 +198,7 @@ trap CT_OnError ERR
set -E
# Make pipes fail on the _first_ failed command
-# Not supported on bash < 3.x, but we need it, so drop the obsoleting bash-2.x
+# Not supported on bash < 3.x, but we need it, so drop the obsolete bash-2.x
set -o pipefail
# Don't hash commands' locations, and search every time it is requested.
@@ -624,6 +644,7 @@ CT_DoListTarballExt()
{
printf ".tar.xz\n"
printf ".tar.lzma\n"
+ printf ".tar.lz\n"
printf ".tar.bz2\n"
printf ".tar.gz\n.tgz\n"
printf ".tar\n"
@@ -638,16 +659,13 @@ CT_GetFileExtension()
{
local ext
local file="$1"
- shift
- local first_ext="$1"
- for ext in ${first_ext} $(CT_DoListTarballExt); do
+ for ext in $(CT_DoListTarballExt); do
if [ -e "${file}${ext}" -o -L "${file}${ext}" ]; then
echo "${ext}"
exit 0
fi
done
-
exit 1
}
@@ -658,8 +676,8 @@ CT_GetFileBasename()
local ext
for ext in $(CT_DoListTarballExt); do
- if [ "${bn%.${ext}}" != "${bn}" ]; then
- echo "${bn%.${ext}}"
+ if [ "${bn%${ext}}" != "${bn}" ]; then
+ echo "${bn%${ext}}"
exit 0
fi
done
@@ -685,6 +703,7 @@ CT_DoGetFile() {
T="${CT_CONNECT_TIMEOUT}"
fi
+ CT_DoLog DEBUG "Trying '${url}'"
if [ "${CT_DOWNLOAD_AGENT_WGET}" = "y" ]; then
if CT_DoExecLog ALL wget ${CT_DOWNLOAD_WGET_OPTIONS} \
${T:+-T ${T}} \
@@ -705,43 +724,15 @@ CT_DoGetFile() {
# Success, we got it, good!
mv "${tmp}" "${dest}"
CT_DoLog DEBUG "Got it from: \"${url}\""
+ return 0
else
- # Woops...
+ # Whoops...
rm -f "${tmp}"
CT_DoLog DEBUG "Not at this location: \"${url}\""
+ return 1
fi
}
-# This function tries to retrieve a tarball form a local directory
-# Usage: CT_GetLocal <basename> [.extension]
-CT_GetLocal() {
- local basename="$1"
- local first_ext="$2"
- local ext
-
- # Do we already have it in *our* tarballs dir?
- if ext="$( CT_GetFileExtension "${CT_TARBALLS_DIR}/${basename}" ${first_ext} )"; then
- CT_DoLog DEBUG "Already have '${CT_TARBALLS_DIR}/${basename}${ext}'"
- return 0
- fi
-
- if [ -n "${CT_LOCAL_TARBALLS_DIR}" ]; then
- CT_DoLog DEBUG "Trying to retrieve an already downloaded copy of '${basename}'"
- # We'd rather have a bzip2'ed tarball, then gzipped tarball, plain tarball,
- # or, as a failover, a file without extension.
- for ext in ${first_ext} $(CT_DoListTarballExt) ''; do
- CT_DoLog DEBUG "Trying '${CT_LOCAL_TARBALLS_DIR}/${basename}${ext}'"
- if [ -r "${CT_LOCAL_TARBALLS_DIR}/${basename}${ext}" -a \
- "${CT_FORCE_DOWNLOAD}" != "y" ]; then
- CT_DoLog DEBUG "Got '${basename}' from local storage"
- CT_DoExecLog ALL ln -s "${CT_LOCAL_TARBALLS_DIR}/${basename}${ext}" "${CT_TARBALLS_DIR}/${basename}${ext}"
- return 0
- fi
- done
- fi
- return 1
-}
-
# This function saves the specified to local storage if possible,
# and if so, symlinks it for later usage
# Usage: CT_SaveLocal </full/path/file.name>
@@ -759,29 +750,34 @@ CT_SaveLocal() {
}
# Download the file from one of the URLs passed as argument
-# Usage: CT_GetFile <basename> [.extension] <url> [url ...]
+# Usage: CT_GetFile <packagename> <basename> <extensions> <url> [url ...]
CT_GetFile() {
local ext
local -a URLS
local url
- local file="$1"
- local first_ext
- shift
- # If next argument starts with a dot, then this is not an URL,
- # and we can consider that it is a preferred extension.
- case "$1" in
- .*) first_ext="$1"
- shift
- ;;
- esac
+ local package="$1"
+ local file="$2"
+ local extensions="$3"
+ shift 3
+
+ # Does any of the requested files exist localy?
+ for ext in ${extensions}; do
+ # Do we already have it in *our* tarballs dir?
+ if [ -r "${CT_TARBALLS_DIR}/${file}${ext}" ]; then
+ CT_DoLog DEBUG "Already have '${CT_TARBALLS_DIR}/${file}${ext}'"
+ return 0
+ fi
- # Does it exist localy?
- if CT_GetLocal "${file}" ${first_ext}; then
- return 0
- fi
- # No, it does not...
+ if [ -n "${CT_LOCAL_TARBALLS_DIR}" -a "${CT_FORCE_DOWNLOAD}" != "y" -a \
+ -r "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" ]; then
+ CT_DoLog DEBUG "Got '${file}' from local storage"
+ CT_DoExecLog ALL ln -s "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" \
+ "${CT_TARBALLS_DIR}/${file}${ext}"
+ return 0
+ fi
+ done
- # If not allowed to download from the Internet, don't
+ # No, it does not... If not allowed to download from the Internet, don't.
if [ "${CT_FORBID_DOWNLOAD}" = "y" ]; then
CT_DoLog DEBUG "Not allowed to download from the Internet, aborting ${file} download"
return 1
@@ -793,7 +789,9 @@ CT_GetFile() {
# Add URLs on the LAN mirror
if [ "${CT_USE_MIRROR}" = "y" ]; then
CT_TestOrAbort "Please set the mirror base URL" -n "${CT_MIRROR_BASE_URL}"
- URLS+=( "${CT_MIRROR_BASE_URL}/${file%-*}" )
+ if [ -n "${package}" ]; then
+ URLS+=( "${CT_MIRROR_BASE_URL}/${package}" )
+ fi
URLS+=( "${CT_MIRROR_BASE_URL}" )
fi
@@ -804,14 +802,11 @@ CT_GetFile() {
# Scan all URLs in turn, and try to grab a tarball from there
# Do *not* try git trees (ext=/.git), this is handled in a specific
# wrapper, below
- for ext in ${first_ext} $(CT_DoListTarballExt) ''; do
+ for ext in ${extensions}; do
# Try all urls in turn
for url in "${URLS[@]}"; do
[ -n "${url}" ] || continue
- CT_DoLog DEBUG "Trying '${url}/${file}${ext}'"
- CT_DoGetFile "${url}/${file}${ext}"
- if [ -f "${CT_TARBALLS_DIR}/${file}${ext}" ]; then
- CT_DoLog DEBUG "Got '${file}' from the Internet"
+ if CT_DoGetFile "${url}/${file}${ext}"; then
CT_SaveLocal "${CT_TARBALLS_DIR}/${file}${ext}"
return 0
fi
@@ -999,6 +994,30 @@ CT_DoPause() {
return 0
}
+# This function sets up trapping export/unset operations so that saving/restoring
+# the state can restore status of environment exactly.
+CT_TrapEnvExport()
+{
+ unset()
+ {
+ eval "builtin unset $*"
+ CT_ENVVAR_UNSET="${CT_ENVVAR_UNSET} $*"
+ }
+
+ export()
+ {
+ local v
+
+ for v in "$@"; do
+ eval "builtin export \"${v}\""
+ case "${CT_ENVVAR_EXPORTED} " in
+ *" ${v%%=*} "*) continue;;
+ esac
+ CT_ENVVAR_EXPORTED="${CT_ENVVAR_EXPORTED} ${v%%=*}"
+ done
+ }
+}
+
# This function creates a tarball of the specified directory, but
# only if it exists
# Usage: CT_DoTarballIfExists <dir> <tarball_basename> [extra_tar_options [...]]
@@ -1058,26 +1077,35 @@ CT_DoSaveState() {
[ "${CT_DEBUG_CT_SAVE_STEPS}" = "y" ] || return 0
local state_name="$1"
local state_dir="${CT_STATE_DIR}/${state_name}"
+ local v
CT_DoLog INFO "Saving state to restart at step '${state_name}'..."
rm -rf "${state_dir}"
mkdir -p "${state_dir}"
+ # Save only environment variables, not functions.
+ # Limit saving to our variables (CT_*) and exported variables.
+ # Also unset variables that have been removed from the environment.
+ # This generated script will be sourced from a function, so make
+ # all the definitions global by adding -g. Hope we don't have
+ # a multi-line variable that has a line starting with "declare"
+ # (or we'll need to run sed on each variable separately, only on
+ # the first line of it).
CT_DoLog STATE " Saving environment and aliases"
- # We must omit shell functions, and some specific bash variables
- # that break when restoring the environment, later. We could do
- # all the processing in the awk script, but a sed is easier...
- set |${awk} '
- BEGIN { _p = 1; }
- $0~/^[^ ]+ \(\)/ { _p = 0; }
- _p == 1
- $0 == "}" { _p = 1; }
- ' |${sed} -r -e '/^BASH_(ARGC|ARGV|LINENO|SOURCE|VERSINFO)=/d;
- /^(UID|EUID)=/d;
- /^(FUNCNAME|GROUPS|PPID|SHELLOPTS)=/d;' >"${state_dir}/env.sh"
+ {
+ for v in "${!CT_@}" ${CT_ENVVAR_EXPORTED}; do
+ # Check if it is still set
+ [ -n "${!v+set}" ] && declare -p "${v}"
+ done | ${sed} 's/^declare /declare -g /'
+ echo "builtin unset ${CT_ENVVAR_UNSET}"
+ } >"${state_dir}/env.sh"
+
+ # Save .config to check it hasn't changed when resuming.
+ CT_DoExecLog STATE cp ".config" "${state_dir}/config"
CT_DoTarballIfExists "${CT_BUILDTOOLS_PREFIX_DIR}" "${state_dir}/buildtools_dir"
+ CT_DoTarballIfExists "${CT_SRC_DIR}" "${state_dir}/src_dir"
CT_DoTarballIfExists "${CT_PREFIX_DIR}" "${state_dir}/prefix_dir" --exclude '*.log'
CT_DoLog STATE " Saving log file"
@@ -1098,10 +1126,14 @@ CT_DoLoadState(){
local old_STOP="${CT_STOP}"
CT_TestOrAbort "The previous build did not reach the point where it could be restarted at '${CT_RESTART}'" -d "${state_dir}"
+ if ! cmp ".config" "${state_dir}/config" >/dev/null 2>&1; then
+ CT_Abort "The configuration file has changed between two runs"
+ fi
CT_DoLog INFO "Restoring state at step '${state_name}', as requested."
CT_DoExtractTarballIfExists "${state_dir}/prefix_dir" "${CT_PREFIX_DIR}"
+ CT_DoExtractTarballIfExists "${state_dir}/src_dir" "${CT_SRC_DIR}"
CT_DoExtractTarballIfExists "${state_dir}/buildtools_dir" "${CT_BUILDTOOLS_PREFIX_DIR}"
# Restore the environment, discarding any error message
@@ -1112,7 +1144,6 @@ CT_DoLoadState(){
# Restore the new RESTART and STOP steps
CT_RESTART="${old_RESTART}"
CT_STOP="${old_STOP}"
- unset old_stop old_restart
CT_DoLog STATE " Restoring log file"
CT_LogDisable
@@ -1667,6 +1698,7 @@ CT_PackageRun()
{
local sym="${1}"
local run="${2}"
+ local src_dir="/unknown-src-dir"
local v
# Get rid of our arguments
@@ -1682,7 +1714,7 @@ CT_PackageRun()
# Variables that are per-fork
for v in basename pkg_name version \
- src_release mirrors archive_filename archive_dirname \
+ src_release mirrors archive_filename archive_dirname archive_formats \
src_devel devel_vcs devel_url devel_branch devel_revision devel_subdir devel_bootstrap \
src_custom custom_location; do
eval "local ${v}=\${CT_${use}_${v^^}}"
@@ -1701,7 +1733,8 @@ CT_PackageRun()
# Save certain variables that may be modified by the callback.
# Fetching the sources is run in the main process, so no need to
# use CT_EnvModify.
- for v in devel_branch devel_revision basename version; do
+ for v in devel_branch devel_revision basename version src_dir; do
+ eval "[ \"\${${v}}\" != \"\${CT_${use}_${v^^}}\" ] || continue"
eval "CT_${use}_${v^^}=\${${v}}"
eval "CT_DoLog DEBUG \"Override CT_${use}_${v^^}=\${CT_${use}_${v^^}}\""
done
@@ -1719,7 +1752,7 @@ CT_DoFetch()
else
basename="${pkg_name}-${version}"
fi
- if ! CT_GetFile "${archive_filename}" ${mirrors}; then
+ if ! CT_GetFile "${pkg_name}" "${archive_filename}" "${archive_formats}" ${mirrors}; then
CT_Abort "${pkg_name}: download failed"
fi
@@ -1748,8 +1781,9 @@ CT_DoFetch()
# Try getting the tarball with empty list of URLs: it will only
# attempt getting it from local storage or from the mirror if configured.
+ # Bzip2 offers a reasonable compromise between compression speed and size.
if [ "${unique_id}" != "to.be.determined" ] && \
- CT_GetFile "${basename}" .tar.bz2; then
+ CT_GetFile "${pkg_name}" "${basename}" '.tar.bz2'; then
return 0
fi
@@ -1777,7 +1811,7 @@ CT_DoFetch()
elif [ "${src_custom}" = "y" ]; then
# Will be handled during extraction/patching
version="local"
- basename="${pkg_name}-${version}"
+ basename="${dir_name}"
:;
else
CT_Abort "No known source for ${pkg_name}"
@@ -1806,6 +1840,9 @@ CT_Extract()
*.tar.lzma)
xz -fdc "${file}" | CT_DoExecLog FILE tar x -v -f - -C "${dir}" ${components}
;;
+ *.tar.lz)
+ lzip -fdc "${file}" | CT_DoExecLog FILE tar x -v -f - -C "${dir}" ${components}
+ ;;
*.tar.bz2)
bzip2 -dc "${file}" | CT_DoExecLog FILE tar x -v -f - -C "${dir}" ${components}
;;
@@ -1841,22 +1878,46 @@ CT_DoExtractPatch()
local -a patch_dirs
local bundled_patch_dir
local local_patch_dir
+ local overlay
+
+ # If using overlay, prepare it first - we need to determine where to unpack
+ # this component.
+ if [ "${CT_TARGET_USE_OVERLAY}" = "y" -a ! -d "${CT_BUILD_DIR}/overlay" ]; then
+ CT_DoExecLog ALL mkdir -p "${CT_BUILD_DIR}/overlay"
+ overlay="${CT_OVERLAY_LOCATION}/${CT_ARCH}_${CT_OVERLAY_NAME:-overlay}"
+ ext=`CT_GetFileExtension "${overlay}"`
+ if [ ! -r "${overlay}${ext}" ]; then
+ CT_Abort "Overlay ${overlay} not found"
+ fi
+ CT_Extract "${overlay}${ext}" "${CT_BUILD_DIR}/overlay"
+ fi
+
+ # Can use common location only if using non-custom source, only bundled patches
+ # and no overlays. Otherwise, this source directory is custom-tailored for this
+ # particular configuration and cannot be reused by different configurations.
+ if [ "${src_custom}" != "y" -a \
+ "${CT_PATCH_ORDER}" = "bundled" -a \
+ ! -d "${CT_BUILD_DIR}/overlay/${dir_name}" ]; then
+ src_dir="${CT_COMMON_SRC_DIR}"
+ else
+ src_dir="${CT_SRC_DIR}"
+ fi
if [ "${src_custom}" != "y" ]; then
# Non-custom: extract to shared location
# If the previous extraction/patching was aborted, clean up.
- if [ -r "${CT_COMMON_SRC_DIR}/.${basename}.extracting" -o \
- -r "${CT_COMMON_SRC_DIR}/.${basename}.patching" ]; then
+ if [ -r "${src_dir}/.${basename}.extracting" -o \
+ -r "${src_dir}/.${basename}.patching" ]; then
CT_DoLog WARN "Sources for ${basename} were partially extracted/patched, cleaning up"
- CT_DoExecLog ALL rm -rf "${CT_COMMON_SRC_DIR}/${basename}"
- CT_DoExecLog ALL rm -f "${CT_COMMON_SRC_DIR}/.${basename}".*
+ CT_DoExecLog ALL rm -rf "${src_dir}/${basename}"
+ CT_DoExecLog ALL rm -f "${src_dir}/.${basename}".*
fi
- if [ -f "${CT_COMMON_SRC_DIR}/.${basename}.extracted" ]; then
+ if [ -f "${src_dir}/.${basename}.extracted" ]; then
CT_DoLog DEBUG "Already extracted ${basename}"
else
CT_DoLog EXTRA "Extracting ${basename}"
- CT_DoExecLog ALL touch "${CT_COMMON_SRC_DIR}/.${basename}.extracting"
+ CT_DoExecLog ALL touch "${src_dir}/.${basename}.extracting"
if [ "${src_release}" = "y" ]; then
archive="${archive_filename}"
else
@@ -1865,21 +1926,21 @@ CT_DoExtractPatch()
# TBD save/discover the extension while fetching
ext=`CT_GetFileExtension "${CT_TARBALLS_DIR}/${archive}"`
if [ "${archive_dirname}" = "." ]; then
- CT_mkdir_pushd "${CT_COMMON_SRC_DIR}/${basename}"
- CT_Extract "${CT_TARBALLS_DIR}/${archive}${ext}" "${CT_COMMON_SRC_DIR}/${basename}"
+ CT_mkdir_pushd "${src_dir}/${basename}"
+ CT_Extract "${CT_TARBALLS_DIR}/${archive}${ext}" "${src_dir}/${basename}"
CT_Popd
else
- CT_Extract "${CT_TARBALLS_DIR}/${archive}${ext}" "${CT_COMMON_SRC_DIR}"
+ CT_Extract "${CT_TARBALLS_DIR}/${archive}${ext}" "${src_dir}"
fi
- CT_DoExecLog ALL touch "${CT_COMMON_SRC_DIR}/.${basename}.extracted"
- CT_DoExecLog ALL rm -f "${CT_COMMON_SRC_DIR}/.${basename}.extracting"
+ CT_DoExecLog ALL touch "${src_dir}/.${basename}.extracted"
+ CT_DoExecLog ALL rm -f "${src_dir}/.${basename}.extracting"
fi
- if [ -f "${CT_COMMON_SRC_DIR}/.${basename}.patched" ]; then
+ if [ -f "${src_dir}/.${basename}.patched" ]; then
CT_DoLog DEBUG "Already patched ${basename}"
else
CT_DoLog EXTRA "Patching ${basename}"
- CT_DoExecLog ALL touch "${CT_COMMON_SRC_DIR}/.${basename}.patching"
+ CT_DoExecLog ALL touch "${src_dir}/.${basename}.patching"
bundled_patch_dir="${CT_LIB_DIR}/packages/${pkg_name}/${version}"
local_patch_dir="${CT_LOCAL_PATCH_DIR}/${pkg_name}/${version}"
@@ -1892,7 +1953,7 @@ CT_DoExtractPatch()
none) patch_dirs=;;
esac
- CT_Pushd "${CT_COMMON_SRC_DIR}/${basename}"
+ CT_Pushd "${src_dir}/${basename}"
for d in "${patch_dirs[@]}"; do
CT_DoLog DEBUG "Looking for patches in '${d}'..."
if [ -n "${d}" -a -d "${d}" ]; then
@@ -1929,8 +1990,8 @@ CT_DoExtractPatch()
CT_Popd
- CT_DoExecLog ALL touch "${CT_COMMON_SRC_DIR}/.${basename}.patched"
- CT_DoExecLog ALL rm -f "${CT_COMMON_SRC_DIR}/.${basename}.patching"
+ CT_DoExecLog ALL touch "${src_dir}/.${basename}.patched"
+ CT_DoExecLog ALL rm -f "${src_dir}/.${basename}.patching"
fi
else
CT_DoLog WARN "${pkg_name}: using custom location, no patches applied"
@@ -1938,50 +1999,33 @@ CT_DoExtractPatch()
# Symlink/copy/overlay into per-target source directory
if [ "${src_custom}" = "y" ]; then
- # Custom sources: unpack or copy into per-target directory
- if [ "${CT_TARGET_USE_OVERLAY}" ]; then
- CT_DoLog WARN "${pkg_name}: using custom location, no overlays applied"
- fi
+ # Custom sources: unpack or copy into per-target directory. Note that
+ # ${src_dir} is never ${CT_COMMON_SRC_DIR} in this case.
if [ -d "${custom_location}" ]; then
- CT_DoExecLog ALL cp -av "${custom_location}" "${CT_SRC_DIR}/${dir_name}"
+ CT_DoExecLog ALL cp -av "${custom_location}" "${src_dir}/${dir_name}"
elif [ -f "${custom_location}" ]; then
# Assume "foo.tar.gz" (or likes) contain the "foo" directory
local bn
- CT_Extract "${custom_location}" "${CT_SRC_DIR}"
+ CT_Extract "${custom_location}" "${src_dir}"
bn=`CT_GetFileBasename "${custom_location##*/}"`
CT_TestOrAbort "Unknown file extension: ${custom_location}" -n "${bn}"
- CT_DoExecLog ALL mv -v "${CT_SRC_DIR}/${bn%${ext}}" "${CT_SRC_DIR}/${dir_name}"
+ CT_DoExecLog ALL mv -v "${src_dir}/${bn%${ext}}" "${src_dir}/${dir_name}"
else
CT_Abort "Neither file nor directory: ${custom_location}"
fi
- elif [ "${CT_TARGET_USE_OVERLAY}" = "y" ]; then
- # Possibly has overlays; check and if it has, copy from common source and apply
- # overlays.
- local overlay
-
- if [ ! -d "${CT_BUILD_DIR}/overlay" ]; then
- CT_DoLog ALL mkdir -p "${CT_BUILD_DIR}/overlay"
- overlay="${CT_OVERLAY_LOCATION}/${CT_ARCH}_${CT_OVERLAY_NAME:-overlay}"
- ext=`CT_GetFileExtension "${overlay}"`
- if [ ! -r "${overlay}${ext}" ]; then
- CT_Abort "Overlay ${overlay} not found"
- fi
- CT_Extract "${overlay}${ext}" "${CT_BUILD_DIR}/overlay"
- fi
-
- if [ -d "${CT_BUILD_DIR}/overlay/${dir_name}" ]; then
- CT_DoExecLog ALL cp -a "${CT_COMMON_SRC_DIR}/${basename}" "${CT_SRC_DIR}/${dir_name}"
- tar cf - -C "${CT_BUILD_DIR}/overlay" "${dir_name}" | \
- CT_DoExecLog FILE tar xvf - -C "${CT_SRC_DIR}"
- else
- # No overlay for this component, just symlink
- CT_DoExecLog ALL ln -s "${CT_COMMON_SRC_DIR}/${basename}" "${CT_SRC_DIR}/${dir_name}"
- fi
else
# Common source, just symlink
- CT_DoExecLog ALL ln -s "${CT_COMMON_SRC_DIR}/${basename}" "${CT_SRC_DIR}/${dir_name}"
+ CT_DoExecLog ALL ln -s "${src_dir}/${basename}" "${CT_SRC_DIR}/${dir_name}"
+ fi
+
+ # Check if it has overlays and if it has, apply
+ if [ "${CT_TARGET_USE_OVERLAY}" = "y" -a \
+ -d "${CT_BUILD_DIR}/overlay/${dir_name}" ]; then
+ tar cf - -C "${CT_BUILD_DIR}/overlay" "${dir_name}" | \
+ CT_DoExecLog FILE tar xvf - -C "${src_dir}"
fi
+
}
# Extract/copy the sources to the shared source directory, then either symlink
@@ -1994,3 +2038,13 @@ CT_ExtractPatch()
shift
CT_PackageRun "${pkg}" CT_DoExtractPatch "$@"
}
+
+# Set the specified variable to the version of the package (main or fork)
+# Usage: CT_GetPkgVersion PKG VAR
+CT_GetPkgVersion()
+{
+ local rv
+ __do_GetPkgVersion() { rv="${version}"; }
+ CT_PackageRun "${1}" __do_GetPkgVersion
+ eval "${2}=\"${rv}\""
+}